Index

Show enters and exits. Hide enters and exits.

00:01:17marcandreOK, it's split...
00:02:06marcandreAh, missing a nil?.
00:03:16marcandreCool. That was it. Thanks for the help!
00:11:34evanmarcandre: weird.
00:11:48evanok
01:29:41marcandreIs the current rbx broken or did I do something wrong? mspec core/enumerable/all_spec.rb -t rbx gives 4 errors.
01:29:48marcandreAll "should raise_error(...)" seem to fail for me.
01:30:05marcandreExpected ...Error but no exception was raised
01:50:15marcandreWeird. bin/mspec from rbx is ok, but not my (up to date) mspec.
01:50:29marcandreThere's some really basic thing that's escaping me.
02:53:41marcandreCan anyone try "mspec core/enumerable/all_spec.rb -t rbx" with the current head of mspec, rubyspecs and rubinius?
03:21:25marcandreevan: ping
04:37:54boyscoutUsed Undefined instead of nil for optional arguments of Strign#initialize, #split, #gsub, #gsub!, #sub & #gsub - b8d6262 - Marc-Andre Lafortune
04:37:54boyscout1.8.7: String#gsub, #each, #each_line, #each_byte now have optional blocks - 6f7b355 - Marc-Andre Lafortune
04:37:54boyscout1.8.7: String#end_with?, #start_with? (implemented new methods) - 6b0ec71 - Marc-Andre Lafortune
04:41:46boyscoutCI: 6b0ec71 success. 2682 files, 10332 examples, 32881 expectations, 0 failures, 0 errors
04:46:32perlooooooooowhy a timeout could happen when we use agent.get(url) ????
04:46:35perlooooooooothnals
14:05:02ruehttp://murmurhash.googlepages.com/
14:05:20rue2.0 version is, apparently, ~52 instructions on x86 :P
14:47:11tilmanrue: the simple version isn't portable though (unaligned accesses)
15:38:09rueBut, but, ~52 instructions!
16:47:11sandalAnyone want to help with a newbie FFI question?
16:47:36sandalI'm wrapping a function that takes a char* buffer and writes to it
16:48:02sandalI can't figure out the right way to deal with this
16:48:13sandalas just passing in a string doesn't capture the side effect
16:48:29sandalI've been playing around with FFI::Pointer but not sure of the exact setup
16:54:37yakischlobasandal: MemoryPointer?
16:56:31sandalyakischloba: yep, just got it to work thanks!
16:56:42yakischlobacool
16:56:58sandalI just had to tweak the parameter to be of type :pointer instead of :string
16:58:54yakischlobaright
18:25:13rueHm, is it looking for a char** instead, then?
18:25:49rueOr I suppose it could be that the string does not re-evaluate itself
18:26:28yakischlobaare you supposed to be able to pass a string in as a char* and have the string be modified if thats what it does?
18:26:54yakischlobai hadn't encountered that situation before, but it sounded like thats what hes talking about
18:27:04rueA :string *is* char*
18:27:17yakischlobaright
18:27:42rueSo if so desired, it could be modified
18:27:53yakischlobabut if my function writes "foo" to a passed pointer, and i attach_function :func, [:string], :void
18:27:56yakischlobacan I then do
18:28:00rue(It could be const char*, too, but it is somewhat less general-purpose)
18:28:15yakischlobastr = "barbaz"; func(str); str == "foobaz" ?
18:28:55rueIt depends on exactly the char* <-> String mapping is done. Your function can certainly alter the string it gets
18:29:42yakischlobaSo it is dependent on ffi/ruby impl?
18:29:57rueBut if the conversion dups the String you give it, then obviously it will not reflect the changes back
18:30:24rueIt depends on what the conversion mechanism is
18:31:30tilmanat least you cannot have ffi functions fill in buffers you pass though
18:31:47tilmana la readlink(2)
18:35:46rueWell, you can if you give a :pointer to a buffer
18:36:51tilmanoh?
18:37:02tilmantakes a note
18:37:25yakischlobatilman: otherwise it would be quite useless, no? ;)
18:43:09rueAnd giving a char* with some memory allocated works too, on the C side...apparently it just does not propagate back right
18:43:52rueAlthough maybe it would be neater to use char** anyway
18:45:34evanI changed it at one point
18:45:56evanpassing a :string in copies the String#data into a local buffer and passes that to the funtction
18:46:10evanif we pass the internal String#data directly, it could easily break
18:46:11yakischlobai see.
18:46:17evanbecause the GC could move the String object
18:46:35evanif you want it to be mutated, you use a MemoryPointer
18:46:46evanwhich always points to memory thats unmanaged and nonmoving
18:48:07evanok, off to breakfast!
18:48:19yakischloba:)
22:07:30boyscoutAdding rb_big2dbl to capi, with specs. - 37cf902 - Cezar Sa Espinola
22:07:30boyscoutAdding rb_cProc constant to capi, specs updated. - e723e16 - Cezar Sa Espinola
22:07:30boyscoutAdding rb_str2cstr to capi and fixing STR2CSTR, specs included. - 363f8fa - Cezar Sa Espinola
22:07:30boyscoutAdding rb_range_new to capi, with specs. - 930a31b - Cezar Sa Espinola
22:14:10boyscoutCI: 930a31b success. 2683 files, 10344 examples, 32915 expectations, 0 failures, 0 errors