Activity Graph

Page 1 of 1


[09:53:39] gray_-_wolf: has joined #ruby
[10:45:30] gray_-_wolf: Quit: WeeChat 2.5


[18:40:30] gray_-_wolf: has joined #ruby


[12:23:53] gray_-_wolf: has joined #ruby
[12:25:47] gray_-_wolf: has joined #ruby
[19:07:23] gray_-_wolf: Quit: WeeChat 2.4


[11:48:13] gray_-_wolf: has joined #ruby
[13:32:12] gray_-_wolf: Quit: WeeChat 2.4


[21:49:41] gray_-_wolf: has joined #ruby
[23:05:33] gray_-_wolf: Quit: WeeChat 2.3


[19:07:52] gray_-_wolf: has joined #ruby
[19:19:31] gray_-_wolf: Quit: WeeChat 2.3


[12:52:21] gray_-_wolf: has joined #ruby
[19:09:53] gray_-_wolf: Quit: WeeChat 2.3


[16:29:51] gray_-_wolf: has joined #ruby
[16:52:34] gray_-_wolf: ?- is same as '-'
[16:52:45] gray_-_wolf: ?- is same as '-'
[16:53:20] gray_-_wolf: one character ones :) and rubocop yells at you for it ;)
[16:55:22] gray_-_wolf: Quit: WeeChat 2.2


[13:14:45] gray_-_wolf: has joined #ruby
[16:46:09] gray_-_wolf: Quit: WeeChat 2.2


[11:03:58] gray_-_wolf: has joined #ruby
[12:45:21] gray_-_wolf: Quit: WeeChat 2.2


[11:14:40] gray_-_wolf: has joined #ruby
[14:34:37] gray_-_wolf: was on tracker or ml ever discussed option of adding precompiled (preparsed) ruby files into mri? Something like python's `.pyc` files? I didn't find anything so I'm trying to here
[14:41:30] gray_-_wolf: hm? I thought that JIT is about optimizations, not reducing parsing time. I'm looking at `ruby --help` of current trunk and I'm not seeing anything related to this...
[14:41:37] gray_-_wolf: where could I find more on this?
[14:43:54] gray_-_wolf: darix: well... not whole problem but part of. I have few very simple scripts which do some basic stuff but pull lot of things in.. based on my profiling the parsing is about 20% of the script run; I know python solves this via .pyc files so was looking if something like that is available for ruby
[14:50:40] gray_-_wolf: hm maybe I'll try to write it, could be interesting exercise
[15:07:44] gray_-_wolf: Quit: WeeChat 2.2


[10:30:17] gray_-_wolf: Is there noticeable performance impact when using refinements? I'm reading the docs on them and all this activating/deactivating on scope change seems expensive
[10:35:10] gray_-_wolf: Also, if anyone would be so kind, why I'm getting NoMethodError in this snippet ?
[11:00:51] gray_-_wolf: ooooh, so it's `refine ::String.signleton_class do ...` for me
[11:01:37] gray_-_wolf: thank you balo :)
[11:09:13] gray_-_wolf: serialization code, I have bunch of types I want to serialize/deserialize (and one of them is ::String), so I'm basically using `"foo".serialize` and `String.deserialize('bar')`; Since I'm putting stuff onto core class I thought refinements would be good idea
[11:40:50] gray_-_wolf: Quit: WeeChat 2.2


[13:47:07] gray_-_wolf: has joined #ruby
[13:48:01] gray_-_wolf: I want to have "read-only" Struct, I've come up with `, :bar) { members.each { |m| remove_method("#{m}=") } }`, is there a better way?
[13:53:43] gray_-_wolf: ineb: heh, that's probably a better way :) didn't think of that


[15:20:29] gray_-_wolf: has joined #ruby
[15:34:26] gray_-_wolf: hm, what do you people think about adding block support for Array#join ? Is it something worth rising on the ticket tracker?
[15:41:09] gray_-_wolf: basically allow you to change the "glue" for join base on the conditions... Something like ['foo', 'bar', 'foobar'].join { |i| i % 2 == 0 ? ',' : "\n" } would produce "foo, bar\nfoobar"
[15:41:55] gray_-_wolf: I needed it some time back and I just monkey patched it to the Array at the moment but then wondered if it could be useful in stdlib
[15:44:05] gray_-_wolf: sure don't you have quite more allocations in there?
[15:44:31] gray_-_wolf: but thx for the tip, will benchmark it to see a difference :)
[15:53:10] gray_-_wolf: hm will #lazy help here? It will still need to evaluate everything, correct?
[16:44:19] gray_-_wolf: heh that's nice :) will add it to my benchmark list
[16:46:14] gray_-_wolf: true but this one locks me to having "a, b\nc, d". the other one with `s.join` I can just pass another value into slice_each to get "a, b, c\nd"
[16:48:39] gray_-_wolf: there does not seem to be way to set capacity of existing string, but still, setting it in advance could be usuful :)
[16:52:00] gray_-_wolf: thanks for the options :) I'll play a bit with benchmarking this over the weekend and if by way would still be faster I'll try proposing it on the tracker
[17:14:05] gray_-_wolf:
[17:59:15] gray_-_wolf: it seems you need a github account for the ?
[18:01:34] gray_-_wolf: it kinda sucks having to create account just to post a paste.. :/
[19:04:17] gray_-_wolf: Quit: WeeChat 2.2


[16:02:01] gray_-_wolf: has joined #ruby
[16:02:52] gray_-_wolf: Hi all :) So I can capture SIGCHLD like Signal.trap("CLD") { puts "Child died" } , but how can I get pid of child that just died in the handle? Let's assume I want to do Signal.trap("CLD") { puts "Child with #{pid} died" }, how to set the `pid`?
[16:22:04] gray_-_wolf: I know that in C I can use waitpid inside the handler for this, however that does work in ruby... so just iterating my whole list of children for !alive? is best way?
[16:44:21] gray_-_wolf: that's not exposed in Process class :/ meh I'll just iterate the list for now, it will be tens of them max so it will be fast enough
[16:44:23] gray_-_wolf: Quit: WeeChat 2.2


[09:26:35] gray_-_wolf: when I start ruby from C (ruby_init, ..., rb_funcall2), start new thread in the called function and return back to C, the new thread seems to stop (it does not do anything). My assumption is that that's GVL in action, correct?
[14:11:47] gray_-_wolf: when I think ticket is stalled for way too long (I understand all the Japanese devs are busy people) and would like at least quick clarification and docs update, what's the best place to raise the issue? comment on existing ticket, create new ticket, ruby-talk or ruby-core?
[14:27:31] gray_-_wolf: will ping ruby-talk then, thx :)
[15:02:24] gray_-_wolf: URI.parse(url).host.downcase
[15:03:19] gray_-_wolf: Quit: WeeChat 2.2


[10:18:07] gray_-_wolf: has joined #ruby
[10:25:29] gray_-_wolf: hi :) I would like to ask what is recommended to way to print error after rb_protect. I looked into how Vim does it and it uses defines for RUBY_TAG_NONE, RUBY_TAG_RETURN, ... Those are in vm_core.h (and therefore not installed) so Vim just hardcodes the values. Is this the recommended way or should I take different route? Using ruby 2.5.1 and don't care about backward compatibility fwiw
[10:25:49] gray_-_wolf: oh, and I'm embedding ruby into C program, not writing an extension


[12:24:38] gray_-_wolf: has joined #ruby
[12:30:38] gray_-_wolf: Quit: WeeChat 2.1


[22:54:24] gray_-_wolf: Read error: Connection reset by peer


[13:48:49] gray_-_wolf: has joined #ruby


[13:05:41] gray_-_wolf: has joined #ruby
[13:06:53] gray_-_wolf: Hi :) I need a bit of help with ffi, I'm trying to iterate directory using FindFile{First,Next}, however I'm not sure how to use GetLastError using FFI. I'm always getting back 0. Is there some trick I'm missing?
[13:15:03] gray_-_wolf: oh... missed that. I've just tried attaching GetLastError, will try this, thank you
[13:17:09] gray_-_wolf: I think I understand, now just figure out why rest of the code is not working :D
[13:17:15] gray_-_wolf: Quit: WeeChat 2.1
[13:50:36] gray_-_wolf: has joined #ruby
[13:50:49] gray_-_wolf: to follow up on my previous question, any idea how to get FFI::LastError.error to work under cygwin?
[13:51:35] gray_-_wolf: based on quick look at the source code does not seem possible without patching ffi itself :/ ... but I find hard to believe I'm first one to encounter this
[15:45:51] gray_-_wolf: Quit: WeeChat 2.1


[12:47:40] gray_-_wolf: has joined #ruby
[17:46:20] gray_-_wolf: Quit: WeeChat 2.1


[11:00:16] gray_-_wolf: Read error: Connection reset by peer
[11:03:40] gray_-_wolf: has joined #ruby
[11:13:18] gray_-_wolf: Quit: WeeChat 2.1


[09:45:03] gray_-_wolf: has joined #ruby


[13:17:12] gray_-_wolf: Quit: WeeChat 2.1


[14:12:09] gray_-_wolf: has joined #ruby


[10:29:00] gray_-_wolf: nymous: why not just make own ruby package? that should allow you upgrade ruby without having to touch rest of the os
[10:30:37] gray_-_wolf: dminuoso: sometimes on the library/gem part though
[10:36:03] gray_-_wolf: so he's still good for 16 days ^_^
[10:36:33] gray_-_wolf: f... May X March... my English sucks
[10:38:41] gray_-_wolf: nymous: I think best solution here (assuming upgrading servers is not an option) is to make own ruby package; if possible it's probably better than monkeypatching it
[11:27:19] gray_-_wolf: *.net *.split


[13:13:52] gray_-_wolf: has joined #ruby