djellemah

Activity Graph

Page 1 of 5 | Next »

2018-11-13

[07:49:58] djellemah: Ping timeout: 252 seconds

2018-11-08

[01:31:31] djellemah: Ping timeout: 260 seconds

2018-11-01

[01:31:20] djellemah: Ping timeout: 268 seconds
[12:10:33] djellemah: NL3limin4t0r: fiddle is (as usual for ruby's lesser-known std libraries) very competent but somewhat under-documented.

2018-10-31

[18:06:59] djellemah: has joined #ruby

2018-10-22

[12:10:16] djellemah: Ping timeout: 264 seconds

2018-10-21

[12:23:23] djellemah: has joined #ruby

2018-10-20

[19:45:28] djellemah: Remote host closed the connection

2018-10-18

[09:26:58] djellemah: Ping timeout: 246 seconds
[09:28:57] djellemah: has joined #ruby

2017-07-30

[09:29:17] djellemah: has joined #ruby-offtopic
[09:29:17] djellemah: has joined #ruby
[11:12:57] djellemah: Ping timeout: 260 seconds

2017-07-28

[07:09:17] djellemah: has joined #ruby-offtopic
[08:37:19] djellemah: Ping timeout: 240 seconds

2017-03-29

[14:34:59] djellemah: has joined #ruby-offtopic
[18:42:37] djellemah: Ping timeout: 246 seconds

2017-03-25

[00:57:41] djellemah: Ping timeout: 240 seconds

2017-03-23

[12:58:28] djellemah: Remote host closed the connection
[13:10:17] djellemah: has joined #ruby-offtopic

2017-03-20

[08:41:32] djellemah: Ping timeout: 246 seconds
[10:08:04] djellemah: has joined #ruby-offtopic
[12:14:36] djellemah: Ping timeout: 240 seconds
[12:16:15] djellemah: has joined #ruby-offtopic
[14:31:46] djellemah: Ping timeout: 240 seconds
[14:34:55] djellemah: has joined #ruby-offtopic
[14:40:53] djellemah: Ping timeout: 260 seconds
[14:43:20] djellemah: has joined #ruby-offtopic

2017-03-17

[06:56:08] djellemah: has joined #ruby-offtopic

2017-03-16

[11:52:54] djellemah: has joined #ruby-offtopic
[16:23:40] djellemah: Read error: Connection reset by peer

2017-03-15

[14:06:50] djellemah: Ping timeout: 246 seconds

2017-03-08

[10:01:32] djellemah: has joined #ruby-offtopic
[12:43:03] djellemah: Ping timeout: 256 seconds
[22:57:29] djellemah: has joined #ruby-offtopic

2016-07-29

[18:34:36] djellemah: Ping timeout: 276 seconds

2016-07-24

[19:54:34] djellemah: has joined #ruby-offtopic
[19:54:34] djellemah: has joined #RubyOnRails
[19:54:34] djellemah: has joined #ruby

2016-05-24

[13:15:56] djellemah: Remote host closed the connection

2016-05-23

[19:16:31] djellemah: Ping timeout: 252 seconds
[19:33:46] djellemah: has joined #ruby
[19:33:46] djellemah: has joined #RubyOnRails
[19:33:46] djellemah: has joined #ruby-offtopic
[19:40:39] djellemah: Ping timeout: 250 seconds
[19:41:37] djellemah: has joined #ruby-offtopic
[19:41:38] djellemah: has joined #ruby
[19:41:38] djellemah: has joined #RubyOnRails

2016-05-18

[17:55:14] djellemah: ha.reduce(ObjectSpace.memsize_of ha){|mem,(k,v)| mem + (ObjectSpace.memsize_of k) + (ObjectSpace.memsize_of v)}

2016-05-17

[08:03:02] djellemah: Remote host closed the connection
[08:04:46] djellemah: has joined #ruby-offtopic
[08:04:46] djellemah: has joined #RubyOnRails
[08:04:46] djellemah: has joined #ruby

2016-05-12

[06:29:39] djellemah: Ping timeout: 244 seconds

2016-05-11

[05:11:49] djellemah: has joined #ruby
[05:11:49] djellemah: has joined #RubyOnRails
[05:11:49] djellemah: has joined #ruby-offtopic
[07:35:03] djellemah: Ping timeout: 240 seconds
[19:17:24] djellemah: has joined #ruby-offtopic
[19:17:24] djellemah: has joined #RubyOnRails
[19:17:24] djellemah: has joined #ruby

2016-04-28

[19:08:59] djellemah: Ping timeout: 250 seconds

2016-04-25

[13:43:39] djellemah: Ping timeout: 250 seconds
[14:27:26] djellemah: has joined #ruby
[14:27:26] djellemah: has joined #RubyOnRails
[14:27:26] djellemah: has joined #ruby-offtopic
[14:33:05] djellemah: Ping timeout: 244 seconds

2016-04-23

[14:32:35] djellemah: has joined #ruby-offtopic
[14:32:35] djellemah: has joined #RubyOnRails
[14:32:35] djellemah: has joined #ruby

2016-04-17

[07:39:23] djellemah: Quit: Leaving

2016-04-16

[18:05:27] djellemah: Mattx: Are you sure you know what Thread.abort_on_exception = true will do?

2016-04-15

[08:53:01] djellemah: Baz walks into a bar and says "the foo is strong with this one".
[20:04:46] djellemah: Ping timeout: 244 seconds
[20:21:21] djellemah: has joined #ruby
[20:21:21] djellemah: has joined #RubyOnRails
[20:21:21] djellemah: has joined #ruby-offtopic

2016-04-12

[13:42:20] djellemah: shevy: pretend Hash.new does not take a block, and you have to use Hash#default_proc=
[15:32:55] djellemah: >> ha = { trip: 1234, driver: 1890, car: 890 }; driver, car = ha.values_at(:driver, :car) # might help davejlong
[18:26:16] djellemah: Disconnected by services
[18:26:35] djellemah: >> require 'prime'; Prime.take(11)
[18:29:07] djellemah: Oh, *those* kind of magic numbers :-p
[20:53:30] djellemah: Ping timeout: 246 seconds

2016-04-11

[09:13:04] djellemah: Ping timeout: 240 seconds
[09:37:17] djellemah: has joined #ruby
[09:37:17] djellemah: has joined #RubyOnRails
[09:37:17] djellemah: has joined #ruby-offtopic

2016-04-08

[06:43:15] djellemah: baweaver: Out of curiosity, I did some performance testing on select_map and friends a little while ago. Turns out map{}.compact is faster in most useful cases. I was sad.
[06:45:17] djellemah: That might be worth trying. But I think the slowdown is because of the reallocations of the array as its being built up.
[06:50:19] djellemah: Ox0dea: I had a go at finding a generic way to handle falsy, but I gave up when I realised that I also couldn't think of any realworldish uses.
[06:52:38] djellemah: I couldn't think of a way to track the end of such an array. But Doh! you just keep an index and increment it.
[06:56:21] djellemah: turns out random access structures can be quite useful...
[07:06:51] djellemah: I'm looking for solid information on DRb reliability. I'm not finding much - I'm guessing because the material I'm looking for is in Japanese. I asked last night, and I'm asking again to see if anyone on the other side of the planet knows of anything?
[07:07:56] djellemah: ag4ve: see Hash#default_proc, also Hash.new
[12:34:17] djellemah: Disconnected by services
[16:06:54] djellemah: Ping timeout: 260 seconds

2016-04-07

[07:40:22] djellemah: ag4ve: I'd use a custom Enumerator for concatenating lines, but that might be overkill if you're new at ruby.
[07:41:50] djellemah: :-O right up perler's street...
[07:56:24] djellemah: ag4ve: if you feel like doing a bug report https://redmine.ruby-lang.org/
[14:42:15] djellemah: Remote host closed the connection
[14:43:24] djellemah: has joined #ruby-offtopic
[14:43:24] djellemah: has joined #RubyOnRails
[14:43:24] djellemah: has joined #ruby
[14:56:17] djellemah: Quit: Leaving
[14:56:31] djellemah: has joined #ruby-offtopic
[14:56:31] djellemah: has joined #RubyOnRails
[14:56:31] djellemah: has joined #ruby
[15:25:21] djellemah: zomba: self.print_todo is a class method. Which in your case means that the @items it uses is not the one that you assign in TodoList.initialize
[19:54:14] djellemah: I have this perception that DRb is ... not production-ready, slightly flaky. But, I can't find any solid information on the matter.
[20:00:41] djellemah: Maybe it works really well, and doesn't need fixing. I've used it, and I didn't have any trouble. But that was for a test-harness.
[20:12:13] djellemah: The closest I could get is a mention that DRb is widely used in Japan. So my english language google searches wouldn't turn up much.
[20:37:34] djellemah: Yeah, so try it and see what happens. I would do that, but unfortunately it's not my production system.
[20:42:04] djellemah: apeiros: Good to hear. Have you used it in that context? You know anyone who has?

2016-04-06

[11:42:15] djellemah: hays_: I have a note in some of my code that Monitors are reentrant, but I have no idea where that was from. This might help http://ruby-doc.org/stdlib-2.3.0/libdoc/monitor/rdoc/MonitorMixin.html
[12:48:44] djellemah: Napear: maybe flush on the server side, or a series of getc on the client side. That might help find where it's not working the way you expect it to.
[13:34:42] djellemah: ferr: case @load.status when 'billed', 'billed_pending' then do_yer_stuff end
[13:35:37] djellemah: ok, ok, so case is not normally a one-liner ;-p
[13:38:02] djellemah: >> %w[billed, billed_pending]
[13:38:10] djellemah: >> %w[billed billed_pending]

2016-04-05

[07:23:20] djellemah: karioleez: http://ruby-doc.org/stdlib-2.3.0/libdoc/fiddle/rdoc/Fiddle.html is a good place to start
[07:26:38] djellemah: dunno. Depends on the device, I think. If the device has /dev entries, you might be able to use those. I've talked to a serial port before using /dev/ttyS0
[10:25:53] djellemah: chridal: https://github.com/JuanitoFatas/fast-ruby might be good for performance
[19:19:21] djellemah: 19>> %I[dir srcdir builddir include] # ruby-lang725
[19:20:02] djellemah: ruby-lang725: in other words, your currently installed version of ruby is too old.
[19:50:39] djellemah: goglosh: I've always thought that send is a bit of a misnomer when it comes to most OO implementations. sending implies that the message itself is an object. Which isn't really the case in ruby. You can kinda get the relevant pieces from caller, __method__ and method(...) But mostly send(m) just calls the method named m.
[20:56:46] djellemah: dunpeal: https://relishapp.com/rspec/rspec-core/v/2-0/docs/pending/pending-examples see xit, and tagging
[21:23:26] djellemah: If you're still interested in message passing, search for "messenger structure" in http://worrydream.com/EarlyHistoryOfSmalltalk/ Also "To eval a program list" :-p

2016-04-04

[07:39:41] djellemah: Ping timeout: 268 seconds
[07:43:05] djellemah: has joined #ruby
[07:43:05] djellemah: has joined #RubyOnRails
[07:43:05] djellemah: has joined #ruby-offtopic
[11:28:12] djellemah: BlackW0lf: there are several ways to install ruby. Which one did you use?

2016-04-01

[12:39:52] djellemah: >> ry = [0.1,0.7,0.7,0.1]; stop_index = ry.size / 2; ry.reject!.each_with_index{|v,i| break if i >= stop_index; v < 0.5}; ry # Dysp
[12:47:24] djellemah: Dysp: gives you back a new array without the odd numbers
[12:51:28] djellemah: Dysp: you've got reject now, and almost there with reject!
[12:54:16] djellemah: >> name_it_whatever_you_like = [1,2,3,4].reject{|v| v.odd?} # Dysp
[12:56:31] djellemah: write code, and occasionally help others write code :-p
[13:00:05] djellemah: It's only fair - I've been using open source software for years.
[14:37:57] djellemah: imperator: looks like HTTPProxyServer.new just ignores options it doesn't recognise, including SSLEnable.

2016-03-31

[17:15:54] djellemah: Zarthus_: That expression only evaluates to true when config['item'] is nil (or config['item'] is true). Which is what you want.
[18:03:10] djellemah: shevy: you're right, I didn't think of the case where config['item'] => false
[18:03:17] djellemah: >> [{'item' => 42}, {'item' => true}, {'item' => false}, {'item' => nil}, {}].map{|config| config['item'] || true}
[18:11:59] djellemah: Kimm: You'll needs another -I something like -I/home/wh/.rbenv/versions/2.1.6/include/ruby-2.1.0/x86_64-linux
[20:53:24] djellemah: >> [1,2].map{|i| [i,1]}.to_h
[20:53:53] djellemah: Radar: I noticed ;-p
[20:58:19] djellemah: >> Hash[1,2,3,4]
[21:06:13] djellemah: >> [[1,2],[3,4]].to_h
[21:07:44] djellemah: that's what Hash[] is for, traditionally ;-)

2016-03-30

[09:13:14] djellemah: Quit: Leaving
[09:13:27] djellemah: has joined #ruby-offtopic
[09:13:27] djellemah: has joined #RubyOnRails
[09:13:27] djellemah: has joined #ruby
[10:01:39] djellemah: A124: do you mean a cross-product?
[10:48:53] djellemah: A124: lazy enumerators are good for memory efficiency when you have large sets
[11:00:13] djellemah: vasilakisfil: looks like you want to have your initialize method work with a block argument. There are several other ways to make object instances behave like procs.
[11:05:01] djellemah: vasilakisfil: Not sure I understand what you're after, but you might be able to call binding, and pass the result of that to a method. OTOH, there's probably a better way to do what you want.
[11:07:12] djellemah: ferr: try Array#select and Array#join
[11:12:51] djellemah: >> a = 1; l = ->{a}; a = 2; l.call # vasilakisfil
[11:15:00] djellemah: vasilakisfil: in other words, a proc/lambda binds the variable, not the value of the variable. Unless A and B are in different methods/classes where you could define params as a method differently for A and B
[11:20:08] djellemah: ACTION can rely on apeiros to tighten up imprecision ;-)
[11:25:30] djellemah: collective nouns: school of fish, pod of whales, giggle of teenage girls, wunch of bankers, actually of pedants.
[13:09:36] djellemah: Dysp: time = 0.0; volt.map{|v| rv = [time,v]; time += 0.001; rv}.to_h
[13:12:05] djellemah: Yes, although I'm guessing the data will end up in a chart of some kind.
[13:13:38] djellemah: Dysp: Not dansk.
[13:14:15] djellemah: That's the precision problem.
[13:15:20] djellemah: volt.each_with_index.map{|v,i| [i/1000.0,v]}.to_h
[13:22:28] djellemah: Dysp is less interested in learning to code and more interested in getting the data into the shape needed.
[13:29:18] djellemah: It's fairly common in research environments. Researchers need the data, but they're not programmers. Sometimes researchers learn a little coding to help their job. But it's a different focus from learning to be a developer.
[14:13:50] djellemah: 23>> enum = (3..11).map; loop{ enum.feed(enum.next * 2) }
[14:15:57] djellemah: Dysp: ^ that, and what's in array?
[14:20:53] djellemah: array.reduce(:+) / array.size.to_f :-p
[15:18:36] djellemah: timeout: Process.waitpid and friends, but I've only used that for child processes and I'm not sure that applies in your situation.

2016-03-29

[07:31:29] djellemah: Remote host closed the connection
[07:31:56] djellemah: has joined #ruby-offtopic
[07:31:56] djellemah: has joined #RubyOnRails
[07:31:56] djellemah: has joined #ruby
[11:31:48] djellemah: atmosx: Thread#value will give back the last value in the thread block, or re-raise any exception. That might help structure your code.
[14:24:38] djellemah: >> ha = {one: 1, two: 2, tre: 3}; ha.each{|k,v| break v if k == :two}
[14:56:24] djellemah: apeiros: Sure is. But break has return-like semantics in a block...
[14:56:29] djellemah: >> def meth; rv = [1,2].each{|i| break :early; :later }; [rv, :value] end; meth
[15:16:26] djellemah: Dysp: http://www.sitepoint.com/understanding-scope-in-ruby/
[19:50:49] djellemah: floatingpoint: just raise "your message here" is fine, unless you need to rescue by class
[19:54:21] djellemah: floatingpoint: RuntimeError, or a subclass of that
[19:55:31] djellemah: floatingpoint: all the other standard exception classes already have well-defined meanings. RuntimeError is the base class for your errors.
[20:10:18] djellemah: #ruby-official-support - $5 for an argument. 10 for a parameter. 15 if you want to ignore the advice you've asked for.

2016-03-27

[07:58:16] djellemah: has joined #ruby-offtopic
[07:58:16] djellemah: has joined #RubyOnRails
[07:58:16] djellemah: has joined #ruby
[18:13:20] djellemah: Quit: Leaving
[18:18:14] djellemah: has joined #ruby-offtopic
[18:18:14] djellemah: has joined #RubyOnRails
[18:18:14] djellemah: has joined #ruby

2016-03-26

[17:50:27] djellemah: Ping timeout: 276 seconds

2016-03-25

[09:35:21] djellemah: has joined #ruby-community
[09:36:07] djellemah: has left #ruby-community: ("Leaving")
[19:22:56] djellemah: theRoUS: how about Queue? - it's in core.
[19:23:45] djellemah: unless, GVL.
[20:55:26] djellemah: Read error: Connection reset by peer
[22:29:50] djellemah: has joined #ruby-offtopic
[22:29:50] djellemah: has joined #RubyOnRails
[22:29:50] djellemah: has joined #ruby

2016-03-24

[08:04:39] djellemah: Ping timeout: 276 seconds
[09:25:58] djellemah: has joined #ruby-offtopic
[09:25:58] djellemah: has joined #RubyOnRails
[09:25:58] djellemah: has joined #ruby
[12:14:24] djellemah: Ping timeout: 268 seconds
[17:29:15] djellemah: has joined #ruby-offtopic
[17:29:15] djellemah: has joined #RubyOnRails
[17:29:15] djellemah: has joined #ruby

2016-03-23

[08:44:19] djellemah: Ping timeout: 248 seconds
[15:20:13] djellemah: has joined #ruby-offtopic
[15:20:13] djellemah: has joined #RubyOnRails
[15:20:13] djellemah: has joined #ruby
[20:11:20] djellemah: >> ha = {dog: 1, cat: 2}; {**ha, eek: 3} # what's mwlang's altitude now?

2016-03-22

[12:17:28] djellemah: Remote host closed the connection
[12:54:55] djellemah: has joined #ruby-offtopic
[12:54:55] djellemah: has joined #RubyOnRails
[12:54:55] djellemah: has joined #ruby
[13:56:58] djellemah: schemanic: afaik 'echo' is the command, 'argv0' is the name you'll see in top and ps. That's rarely used though, so the array form is optional.
[13:58:35] djellemah: schemanic: pretty much. If you just want to specify the command name, use a single string.
[14:04:43] djellemah: schemanic: yeah ruby has some shortcuts and syntax sugar that can be confusing in this context. And these system calls have been around since the dawn of ruby-time. So they're a bit, uhm, crufty sometimes.
[14:17:43] djellemah: Ping timeout: 244 seconds
[16:53:25] djellemah: has joined #ruby-offtopic
[16:53:25] djellemah: has joined #RubyOnRails
[16:53:25] djellemah: has joined #ruby
[17:51:40] djellemah: what's that grep-like tool called? ack?
[17:54:06] djellemah: Hmm. ag sounds like the one. thanks.
[17:58:21] djellemah: smathy: holy crap, its fast
[18:06:38] djellemah: eam: linux. ag found what I was looking for faster than I'm used to. But that's anecdotal ¯\_(ツ)_/¯
[18:08:57] djellemah: is it just me, or is (e)grep not friends with lookahead syntax?
[18:12:43] djellemah: grep -P real 0m0.376s, ag real 0m0.250s. glibc source. slightly less anecdotal.
[19:59:06] djellemah: PaulePanter: pair, as in Hash#each_pair

2016-03-21

[13:27:01] djellemah: shevy: ( cond | true | false ) was just messing around with TrueClass#| operator http://ruby-doc.org/core-2.3.0/TrueClass.html . I wouldn't want to lead anyone astray :-O
[19:09:19] djellemah: Read error: Connection reset by peer
[19:18:00] djellemah: has joined #ruby-offtopic
[19:18:00] djellemah: has joined #RubyOnRails
[19:18:00] djellemah: has joined #ruby
[19:43:42] djellemah: eam: DeBot seems to dominate the conversation over there :-p
[20:11:21] djellemah: Ping timeout: 250 seconds
[20:28:43] djellemah: has joined #ruby
[20:28:43] djellemah: has joined #RubyOnRails
[20:28:43] djellemah: has joined #ruby-offtopic