cout

Activity Graph

Page 1 of 2 | Next »

2018-10-08

[17:36:23] cout: has joined #ruby
[19:07:18] cout: a class is a box only because a class is an object, and objects are boxes
[19:08:49] cout: (at least in Alan Kay's OOP -- other OOPs can differ)
[21:30:28] cout: zenspider: hio
[21:31:53] cout: zenspider: busy growing new ruby/c++ programmer
[21:32:55] cout: pain is an important part of the childhood experience. :)
[21:38:05] cout: Fine like a saw blade, maybe
[21:39:08] cout: Or maybe fine like a parking ticket
[21:40:10] cout: zenspider: why wouldn't you be able to set an ivar on an RTypedData?
[21:43:28] cout: zenspider: I think rb_ivar_set should work with anything that holds an RBasic
[21:44:31] cout: and maybe also some things that don't
[21:48:12] cout: zenspider: what are you talking on?
[21:49:45] cout: a month is plenty of time!
[21:50:38] cout: there was less than 24 hours between the first line of Rubygems and the first demo...
[21:59:59] cout: zenspider: looks interesting
[22:00:17] cout: zenspider: though weirdly I had to run "rake newb" twice, and it worked the second time
[22:03:52] cout: zenspider: what do you mean "These allow simple things like Trigonometry functions to work as expected"? Doesn't Math.sin et. al. use radians?
[22:05:40] cout: zenspider: it looks like a useful teaching tool

2018-07-20

[00:07:02] cout: *.net *.split
[00:15:38] cout: has joined #ruby

2018-07-16

[00:00:10] cout: Ping timeout: 268 seconds
[00:00:44] cout: has joined #ruby

2018-07-01

[11:29:29] cout: I just learned that if you type "irb" inside irb, it gives new a new irb inside irb
[11:29:53] cout: yes I know pry > *
[19:55:41] cout: tbuehlmann: my irc client doesn't either
[19:56:00] cout: tbuehlmann: I said irb inside irb

2018-06-30

[08:51:48] cout: has joined #ruby
[08:51:58] cout: is there a name for the idiom "if __FILE__ == $0" ?
[08:52:30] cout: I know what it does, but in conversation, it's a mouthful
[08:56:10] cout: perhaps it's time to invent a bacronym for bin
[08:58:38] cout: you might spell it "backronym"
[08:59:57] cout: it's where you take an existing word and turn it into an acronym, rather than inventing an acronym from scratch
[09:00:10] cout: https://en.wikipedia.org/wiki/Backronym

2018-05-09

[04:04:43] cout: Remote host closed the connection

2018-05-04

[05:15:43] cout: *.net *.split
[05:15:54] cout: has joined #ruby

2018-04-25

[12:25:53] cout: *.net *.split
[12:27:21] cout: has joined #ruby
[15:01:24] cout: *.net *.split
[15:03:16] cout: has joined #ruby

2018-04-07

[16:48:38] cout: Remote host closed the connection
[16:50:57] cout: has joined #ruby

2018-03-15

[11:27:21] cout: *.net *.split

2018-03-09

[17:10:49] cout: wow, instance_variable_set is really slow
[17:14:04] cout: havenwood: oh cool
[17:14:49] cout: I wouldn't expect it to be optimizable in MRI since it's just a method call to C

2018-01-19

[07:00:41] cout: Remote host closed the connection
[15:50:21] cout: has joined #ruby

2017-12-12

[20:35:13] cout: Ping timeout: 248 seconds
[20:37:09] cout: has joined #ruby

2017-12-09

[05:06:25] cout: *.net *.split
[05:15:55] cout: has joined #ruby

2017-12-07

[14:48:35] cout: *.net *.split
[14:55:08] cout: has joined #ruby

2017-12-01

[02:28:51] cout: has joined #ruby

2017-11-15

[12:33:03] cout: has joined #ruby

2017-10-31

[20:23:07] cout: Remote host closed the connection

2017-10-27

[04:51:32] cout: Ping timeout: 260 seconds
[05:04:52] cout: has joined #ruby

2017-10-11

[02:43:43] cout: Ping timeout: 258 seconds
[02:45:44] cout: has joined #ruby

2017-09-30

[15:31:00] cout: Remote host closed the connection
[17:02:11] cout: has joined #ruby

2017-09-25

[15:14:52] cout: Remote host closed the connection
[21:46:23] cout: has joined #ruby

2017-09-19

[06:05:24] cout: *.net *.split
[06:10:53] cout: has joined #ruby

2017-09-14

[03:51:23] cout: Remote host closed the connection
[13:37:51] cout: has joined #ruby

2017-09-10

[20:25:37] cout: RedNifre: a byte data type wouldn't make sense in ruby due to the way it manages memory; all values (either immediate values or object references) are the same size as the platform's pointer type
[20:29:55] cout: RedNifre: what is it you are trying to do? You might find NArray useful.

2017-09-09

[05:02:45] cout: Remote host closed the connection
[15:47:26] cout: has joined #ruby

2017-08-12

[04:02:02] cout: Remote host closed the connection
[13:29:01] cout: has joined #ruby

2017-07-28

[07:43:27] cout: Ping timeout: 240 seconds
[07:44:09] cout: has joined #ruby

2017-06-23

[17:02:05] cout: sorry wrong window

2017-06-21

[10:01:22] cout: Remote host closed the connection
[14:10:22] cout: has joined #ruby

2017-06-20

[00:17:10] cout: *.net *.split
[00:23:02] cout: has joined #ruby

2017-06-16

[23:26:14] cout: *.net *.split
[23:33:20] cout: has joined #ruby

2017-06-15

[10:00:44] cout: Remote host closed the connection
[14:06:26] cout: has joined #ruby

2017-06-02

[18:30:25] cout: is there any [preferably but not necessarily non-hacky] way to guarantee ordering of finalizer calls at shutdown?
[18:31:02] cout: I have an application that uses ffi-rzmq, and if the zmq socket isn't closed before the context is destroyed, the process hangs
[18:31:25] cout: (IMO zmq is being stupid here, but that's another story)

2017-05-24

[11:49:27] cout: Ping timeout: 240 seconds
[11:49:34] cout: has joined #ruby

2017-05-14

[21:43:10] cout: Ping timeout: 268 seconds

2017-05-02

[17:33:49] cout: has joined #ruby
[17:35:33] cout: I have a short script that calls out to another program (let's say with system()) and I want to pass the exit status back unmodified. If I use exit $?.to_i, then that fails for the false command ($?.to_i is 256 so the effective exit code is 0). If I use exit $?.exitstatus then that fails for a program that aborts and dumps core ($?.to_i is 134 but $?.exitstatus is nil since the program terminated abnormally).
[17:36:01] cout: I'm tempted to write exit($?.exitstatus || $?.to_i), but I'm not confident that's right either
[17:48:58] cout: eam: but if the child terminates abnormally, exitstatus is nil, and exit(nil) isn't valid since nil is not an integer
[17:50:47] cout: int main() { abort(); }
[17:54:05] cout: man 2 wait
[17:54:30] cout: WEXITSTATUS() has no meaning unless the child terminated normally
[17:54:48] cout: toretore: exitstatus does that for you
[17:55:05] cout: eam: I think it's undefined in that case (so maybe 0, maybe something else)
[17:56:17] cout: I could probably argue it both ways
[17:56:37] cout: eam: seems to be 8 bits; not sure if that's guaranteed
[17:57:37] cout: toretore: I think to_i is probably wrong but I don't know why
[17:57:49] cout: toretore: so I'm using exitstatus || 127 for now
[18:01:50] cout: eam: I'm wanting to stick to convention
[18:02:33] cout: eam: or rather, I'm wanting to stick to _correct_ convention (convention in ruby seems to be to blindly use exitstatus, which for reasons mentioned above is wrong)

2017-04-29

[10:00:40] cout: Remote host closed the connection

2017-04-04

[10:00:47] cout: Remote host closed the connection
[15:55:05] cout: has joined #ruby

2017-03-20

[20:29:15] cout: *.net *.split

2017-03-16

2017-03-15

[21:51:26] cout: ACTION shakes his fist at zenspider

2017-03-09

[20:23:22] cout: cek: this is how I did something similar: https://github.com/cout/ruby-libjit/blob/master/lib/jit/function.rb
[20:25:41] cout: cek: it's basically the same as what you wanted to do, but with an explicit receiver, so f.if instead of if?

2017-03-08

[15:51:05] cout: oh man I feel old -- I just tried to call a method that apparently got removed between ruby 1.8 and 1.9
[15:52:02] cout: anyone know what the fastest alternative is to Array#nitems ?
[15:52:53] cout: the changelog says to use count {|i| !i.nil?} but without benchmarking I have a feeling that's slower than nitems was due to the block
[15:53:30] cout: leah2: oh nice
[15:56:43] cout: matthewd: yeah it's a hot loop
[15:57:34] cout: .compact.size is faster than .count(nil)
[15:58:12] cout: (for an array of 10 elements; might be slower for larger arrays, but 5-10 is my use case)
[16:01:06] cout: matthewd: yeah, it has to fall back on #== if the array element is non-nil
[16:03:17] cout: matthewd: I can get away with just using count() since I don't care about false
[16:05:15] cout: er nm, I was reading rb_ary_count wrong -- saw the RTEST and got all excited
[16:06:53] cout: matthewd: is that a rails thing?
[16:08:27] cout: count(&:nil?) would be more direct
[16:11:13] cout: oh right I had it backward
[16:12:04] cout: I don't really want nitems, I just figured that would be the fastest way to implement a.any? { |i| i.nil? }
[16:14:38] cout: .all? without a block is still slower than compact/compact!
[16:23:47] cout: while loop beats compact! by a hair
[16:26:00] cout: https://gist.github.com/anonymous/e8bbc4e754abd79245d6bd4133fdb71b
[16:26:32] cout: using 2.1.7
[16:27:27] cout: matthewd: I already made all those changes
[16:27:44] cout: matthewd: now I'm modifying code that was optimized and I'm trying to avoid making it slower
[16:28:27] cout: upgrading to 1.9.3p484 from 1.9.3p0 was like pulling teeth; it's a miracle were even on 2.1 now :(
[16:29:19] cout: good point about splat; I'm not sure why the interface uses it
[16:34:09] cout: that's probably even more significant in the code I'm working on, which destroys the global method cache as an optimization
[17:19:25] cout: leah: I don't
[17:20:16] cout: leah: I'm guessing the while to be slower on 1.8 because it has to walk the AST
[17:55:31] cout: matthewd: on 1.8 I would expect nitems to be the fastest
[18:02:35] cout: apeiros: yeah I know I didn't make them all have the same result
[18:26:13] cout: seepingN: I thought of airplane the movie

2016-07-25

[02:00:27] cout: Remote host closed the connection

2016-06-26

[19:25:52] cout: Remote host closed the connection
[19:31:01] cout: has joined #ruby

2016-06-15

[23:13:01] cout: *.net *.split

2016-04-15

[02:25:34] cout: Ping timeout: 252 seconds
[02:32:48] cout: has joined #ruby
[15:25:52] cout: *.net *.split

2016-04-14

[06:08:46] cout: *.net *.split
[21:52:49] cout: Ping timeout: 250 seconds
[21:52:55] cout: has joined #ruby

2016-03-30

[20:03:33] cout: Ping timeout: 240 seconds
[20:04:47] cout: has joined #ruby

2016-03-22

[19:58:20] cout: Ping timeout: 260 seconds
[20:00:05] cout: has joined #ruby

2016-03-05

[22:34:36] cout: Ping timeout: 246 seconds
[22:36:24] cout: has joined #ruby

2016-02-28

[09:33:10] cout: Ping timeout: 244 seconds
[09:33:19] cout: has joined #ruby
[19:54:43] cout: Ping timeout: 244 seconds
[19:54:50] cout: has joined #ruby

2016-02-27

[21:36:51] cout: Ping timeout: 240 seconds
[22:54:04] cout: has joined #ruby

2016-02-24

[21:20:41] cout: huh, this is odd. I'm using ripper to parse ruby code, and column() is returning a column number for a line that doesn't exist
[21:21:01] cout: returning a column number past the end of the line I mean
[21:21:39] cout: (yes, I know I should be using something more sophisticated than ripper)
[21:23:51] cout: I hadn't thought of that though
[21:25:52] cout: Ox0dea: ruby -rripper -e 'class P < Ripper; def on_var_ref(*x); p lineno, column; end; end; P.parse("class << self;\n42\nend")'
[21:27:31] cout: oh wait, bad example
[21:30:00] cout: Ox0dea: yeah let me try again
[21:36:50] cout: Ox0dea: ruby -rripper -e 'class P < Ripper; def on_var_ref(*a); p lineno, column, a; end; end; P.parse("class F\n def s\n class << self\n def abcdefghijklmnopqrstuvwxyz; end\n end\n end\nend")'
[21:37:13] cout: looks like it's returning the last column in the following line
[21:38:00] cout: ok, I guess it's doing the "right" thing, just not what I want it to do :)
[21:40:09] cout: or maybe not
[21:40:51] cout: I was thinking the var_ref was for the def, but it gets printed even without the def
[21:47:28] cout: Ox0dea: I think maybe column() is the current column of the scanner rather than the parser

2016-02-18

[15:47:46] cout: has joined #ruby

2016-01-22

[21:25:08] cout: so I've got this odd problem: I'm requiring 'net/ssh' inside a method (not at the toplevel), and it spuriously fails with LoadError. Afaict, there's never a case where I call this method outside the main thread (and in fact, require is only ever called from the main thread). Yet sometimes it succeeds and sometimes it fails. Any ideas?
[21:25:25] cout: tried GC.disable in case this was an odd GC issue but no change in behavior

2016-01-20

[13:56:02] cout: *.net *.split

2016-01-07

[13:05:49] cout: what does the DLDLIBS variable in rbconfig.rb represent?
[13:07:12] cout: on my platform it's set to -lc, so I think it's superfluous, but I'm wondering what it might be set to on other platforms that would cause things to break if I didn't include it on the link line for an extension or for an app that uses the ruby library

2015-12-29

[13:38:35] cout: Ping timeout: 256 seconds
[13:57:04] cout: has joined #ruby

2015-12-28

[07:43:04] cout: Ping timeout: 245 seconds
[08:01:47] cout: has joined #ruby

2015-12-26

[16:44:10] cout: Ping timeout: 272 seconds
[16:56:36] cout: has joined #ruby

2015-12-25

[20:01:09] cout: Ping timeout: 265 seconds
[20:36:44] cout: has joined #ruby

2015-12-21

[10:13:00] cout: *.net *.split

2015-12-16

[03:01:16] cout: Remote host closed the connection
[14:11:20] cout: has joined #ruby

2015-12-02

[15:39:06] cout: *.net *.split
[15:41:24] cout: has joined #ruby
[15:51:48] cout: *.net *.split
[16:47:40] cout: has joined #ruby

2015-10-22

[05:01:49] cout: Remote host closed the connection

2015-10-19

[16:29:01] cout: Ping timeout: 264 seconds
[16:30:37] cout: has joined #ruby-offtopic
[16:30:37] cout: has joined #ruby

2015-10-16

[00:13:39] cout: has joined #ruby-offtopic
[00:15:52] cout: has joined #ruby

2015-10-10

[21:43:05] cout: *.net *.split

2015-10-06

[20:48:56] cout: Ping timeout: 265 seconds
[20:54:53] cout: has joined #ruby-offtopic
[20:54:53] cout: has joined #ruby

2015-09-14

[10:59:25] cout: Ping timeout: 246 seconds
[10:59:32] cout: has joined #ruby-offtopic
[10:59:32] cout: has joined #ruby

2015-08-28

[10:27:08] cout: *.net *.split
[10:29:51] cout: has joined #ruby

2015-07-28

[21:17:30] cout: as far as I can remember, my memory is never correct

2015-07-25

[01:00:41] cout: what's the principle called that says that you shouldn't in a derived class change the meaning of a method defined in a base class?
[01:02:00] cout: is that Liskov or a corollary?
[01:04:43] cout: cool thanks

2015-07-23

[19:56:31] cout: ElSif: depends on whom you ask
[20:13:51] cout: ElSif: I thought so too

2015-07-15

[03:46:44] cout: I cannot for the life of me figure out how rspec calls the before(:all) block in RSpec.configure { }
[03:55:10] cout: radar: reproduce what?
[06:47:47] cout: Ox0dea: no I'm building an rspec-to-minitest bridge
[06:47:59] cout: oh he pinged out :(
[06:51:48] cout: I want to run a set of rspec examples inside of minitest, which I can successfully do by mirroring each of the rspec examples in a minispec example, but RSpec.configure { |c| c.before(:all) } block isn't getting called automatically, so I'm trying to figure out how to invoke it manually
[07:44:21] cout: will that do all the ivar saving that hooks do?

2015-07-14

[18:30:51] cout: *.net *.split

2015-07-13

[15:36:52] cout: *.net *.split
[15:37:05] cout: has joined #ruby

2015-07-11

[23:18:15] cout: fenjamin: if you start with Zero then the result should should be a multiple of Tree :)

2015-07-09

[00:37:32] cout: hi zenko
[06:08:16] cout: midi_: you might be happier using rest-client
[12:58:17] cout: apeiros: I've been saying this for years
[12:59:05] cout: apeiros: people think of the South (US) as this backward place, but really we're quite advanced, at least in our grammar. we've had a gender-neutral second-person plural pronoun for ages!
[21:59:30] cout: murraycoin > *

2015-07-08

[02:32:44] cout: mmm.. sage
[02:33:04] cout: ACTION licks his chops
[23:52:42] cout: if you have experience you can pick up the basics of ruby in a day or so

2015-07-07

[17:52:50] cout: eam: yeah but then I have to modify YARV to solve the halting problem