« Back to channel list

#ruby - 09 June 2015

« Back 1 day Forward 1 day »
[00:00:21] djbkd: has joined #ruby
[00:00:31] deric_skibotn: has joined #ruby
[00:00:42] nobitanobi: has joined #ruby
[00:01:20] djbkd: has joined #ruby
[00:02:02] nobitanobi: Is it correct that whenever a class is defined, all the method cache gets invalidated?
[00:02:58] hahuang65: has joined #ruby
[00:03:14] jhass: it was at least, not sure if recent rubies changed something in that regard
[00:03:56] nobitanobi: jhass: I am asking this because I know OpenStruct.new invalidates the method cache, so I decided to just create a class that sets instance variables. But apparently it also invalidates the cache
[00:04:05] nobitanobi: so, might go back to use OpenStruct
[00:04:06] nobitanobi: interesting.
[00:04:24] jhass: uh, you're sure it does?
[00:04:29] jhass: would surprise me
[00:04:39] nobitanobi: jhass: I am reading through these: https://github.com/charliesome/charlie.bz/blob/master/posts/things-that-clear-rubys-method-cache.md
[00:04:51] nobitanobi: Defining a class/module and OpenStructs
[00:04:55] nettoweb: has joined #ruby
[00:05:22] jhass: oh, it does that? odd
[00:05:44] nobitanobi: I am confused too, that means that everytime we define a class or module, the cache gets invalidated :O
[00:06:16] fabrice31: has joined #ruby
[00:06:38] ss_much: has joined #ruby
[00:07:10] jhass: meh https://github.com/ruby/ruby/blob/trunk/lib/ostruct.rb#L169
[00:07:11] nettoweb: has joined #ruby
[00:07:35] mark[oz]: has joined #ruby
[00:07:40] jhass: well yeah, which is why those DCI via extend approaches never got popular
[00:08:26] nobitanobi: I guess I am missing the point here though. This is just if we are defining the class in run time though (that the cache gets invalidated)
[00:08:56] jhass: well, being a bit nitpicky pays of here
[00:08:59] nettoweb: has joined #ruby
[00:09:06] jhass: so in Ruby there's only parse time and runtime
[00:09:42] jhass: and runtime starts already after the AST was build, it starts right as your class definitions get run
[00:09:52] jhass: class Foo is pretty much just sugar for Foo = Class.new
[00:10:13] dgutierrez1287: has joined #ruby
[00:10:14] mrsolo: has joined #ruby
[00:10:14] sevenseacat: has joined #ruby
[00:10:32] symm-: has joined #ruby
[00:10:36] jhass: so, as your program enters runtime all your classes get defined and the toplevel code gets run, that's where method caches start to build up usually
[00:10:43] nettoweb: has joined #ruby
[00:10:59] jhass: you run into trouble if after that initial phase you continue to define classes
[00:11:10] nobitanobi: I see, interesting
[00:11:12] Ox0dea: sevenseacat: We Elixir yet? https://eval.in/377980
[00:11:21] nobitanobi: thanks jhass
[00:12:40] nettoweb: has joined #ruby
[00:13:28] nobitanobi: jhass: having that said, in terms of performance, for this example: https://gist.github.com/novito/4906339fca5aa24cf235, the first approach (using a private class), would be more performant, because it does not invalidate the cache correct?
[00:14:27] nettoweb: has joined #ruby
[00:14:46] nobitanobi: interesting. thanks!
[00:14:53] jhass: though to say it again I didn't check if recent versions changed something about that, like busting only local caches instead of all of them
[00:16:23] nettoweb: has joined #ruby
[00:18:04] nettoweb: has joined #ruby
[00:19:44] MatthewsFace: has joined #ruby
[00:19:51] nettoweb: has joined #ruby
[00:20:14] noethics: has joined #ruby
[00:20:33] jmhmccr: has joined #ruby
[00:20:42] discord: if I have an array of strings, is there an easy way to pass it as arguments to an external program?
[00:20:51] NeverDie: has joined #ruby
[00:21:34] x0F: has joined #ruby
[00:21:44] jhass: discord: sure, check Kernel#system's array form and more documentation for the arguments it takes at Kernel#spawn
[00:22:09] baweaver: Probably as JSON
[00:23:03] jacor: has joined #ruby
[00:24:29] discord: baweaver: lol
[00:24:40] discord: jhass: thanks, having a look
[00:25:30] drbrain: Array form is the best form
[00:25:38] charliesome: has joined #ruby
[00:27:00] mdz_: has joined #ruby
[00:27:19] eam: be careful, array form can still create a shell if the array has one element
[00:27:19] Cache_Money: has joined #ruby
[00:28:00] _seanc_: has joined #ruby
[00:29:30] datanois1: has joined #ruby
[00:30:51] fmcgeough: has joined #ruby
[00:30:52] discord: eam: ? Not sure I'm understanding how to pass an array from the documentation
[00:31:04] yaogwai: has joined #ruby
[00:31:09] drbrain: discord: what did you try?
[00:31:18] bigkevmcd: has joined #ruby
[00:31:34] discord: just reading still
[00:32:11] Ox0dea: discord: Why not just splat it?
[00:32:42] drbrain: yep ??? is how you do it
[00:33:50] laurentide: has joined #ruby
[00:34:04] fujimura: has joined #ruby
[00:34:09] bb010g: has joined #ruby
[00:34:36] vikaton: has joined #ruby
[00:35:48] Ox0dea: >> [1].cycle.last
[00:35:49] ruboto: Ox0dea # => undefined method `last' for #<Enumerator: [1]:cycle> (NoMethodError) ...check link for more (https://eval.in/377984)
[00:35:53] Ox0dea: Kinda seems like that should work.
[00:37:42] fgo: has joined #ruby
[00:38:07] criosphinx: has joined #ruby
[00:38:29] jackjackdripper1: has joined #ruby
[00:38:41] symbol: has joined #ruby
[00:38:56] discord: Ox0dea: thanks!
[00:39:23] robustus|Off: has joined #ruby
[00:39:27] mark[oz]: has joined #ruby
[00:40:09] shock_one: has joined #ruby
[00:40:30] blue_deref: has joined #ruby
[00:41:14] Oog: has joined #ruby
[00:41:35] criosphinx: lmfao!!!!!!!!! https://www.youtube.com/watch?v=XR_GkTLg
[00:41:38] criosphinx: lmfao!!!!!!!!! https://www.youtube.com/watch?v=XR_GkTLg
[00:41:40] criosphinx: lmfao!!!!!!!!! https://www.youtube.com/watch?v=XR_GkTLg
[00:41:45] jpfuentes2: has joined #ruby
[00:42:59] mark[oz]: has joined #ruby
[00:43:36] eam: discord: recommend something like this: https://github.com/square/mssh/blob/master/lib/mcmd.rb#L29-35
[00:44:26] pawel2: has joined #ruby
[00:44:52] n80: has joined #ruby
[00:45:38] ecksit: has joined #ruby
[00:45:42] ecksit: join #rubyonrails
[00:45:54] discord: eam: what problem does that address?
[00:45:54] ecksit: has left #ruby: ()
[00:46:24] eam: discord: it's a method that takes an array of tokenized args and runs them, guaranteed to avoid spawning a shell to tokenize
[00:46:54] eam: handles corner cases such as spaces in filenames
[00:47:39] bruno-: has joined #ruby
[00:48:22] CloCkWeRX1: has joined #ruby
[00:48:24] psye: has joined #ruby
[00:48:28] mrmargolis: has joined #ruby
[00:49:16] revoohc: has joined #ruby
[00:51:34] felixjet: has joined #ruby
[00:51:58] discord: eam: I was using something like system("/path/to/command",*Array), and Array is never empty. This looks different then what you are discussing.
[00:52:17] ur5us_: has joined #ruby
[00:53:07] eam: that should be fine, mine is more general
[00:53:47] edwinvdgraaf: has joined #ruby
[00:54:53] drbrain: Ox0dea: #cycle never stops, so there is no last thing
[00:55:50] mark[oz]: has joined #ruby
[00:56:49] paulcsmith: has joined #ruby
[00:57:24] mary5030: has joined #ruby
[00:58:44] serivich: has joined #ruby
[00:59:18] nb_bez___: has joined #ruby
[00:59:25] charliesome: has joined #ruby
[01:01:28] kies: has joined #ruby
[01:01:51] tkuchiki: has joined #ruby
[01:05:04] Ox0dea: drbrain: Right, but the "last" thing could nevertheless be inferred in that particular case.
[01:05:43] Radar: That would require special-case knowledge of the object that the Enumerator is for.
[01:06:19] drbrain: Ox0dea: ah, right, unfortunately ruby isn't yet that smart
[01:07:12] Ox0dea: drbrain: Nor GHC, for what it's worth.
[01:07:19] coderjk: has joined #ruby
[01:08:08] drbrain: I wonder if prolog can do that
[01:09:22] Yiota: has joined #ruby
[01:09:47] drbrain: ??? I suppose it also depends on if you think of "last" as "end of the enumeration" or not
[01:11:02] hackeron: has joined #ruby
[01:11:02] Sweeper: whoa dbrain is here
[01:12:07] GriffinHeart: has joined #ruby
[01:12:17] codelurker: has joined #ruby
[01:12:21] ght: has joined #ruby
[01:12:25] djbkd: has joined #ruby
[01:12:25] mark[oz]: has joined #ruby
[01:14:49] luckyme: has joined #ruby
[01:15:10] drbrain: I have rearranged my windows so I can see activity across all the IRC servers I have connected
[01:16:28] omegahm: has joined #ruby
[01:20:00] kinduff: has joined #ruby
[01:21:21] bootstrappm: has left #ruby: ()
[01:21:26] ur5us: has joined #ruby
[01:21:45] Rubie: has joined #ruby
[01:22:35] Aeyrix: Six screens, filled with nothing but IRC windows.
[01:24:41] Zamerick: has joined #ruby
[01:25:49] spider-mario: has joined #ruby
[01:26:31] jackjackdripper: has joined #ruby
[01:27:10] Sweeper: drbrain: still on magnesium? :P
[01:27:24] dnlbyl: has joined #ruby
[01:30:05] A205B064: has joined #ruby
[01:30:15] RegulationD: has joined #ruby
[01:30:24] swgillespie: has joined #ruby
[01:32:28] shazaum_: has joined #ruby
[01:33:50] bkxd_: has joined #ruby
[01:35:39] mello: has joined #ruby
[01:35:39] mello: has joined #ruby
[01:37:14] unreal_: has joined #ruby
[01:37:18] B1n4r10: has joined #ruby
[01:37:54] dnlbyl: has joined #ruby
[01:40:18] justintv90: has joined #ruby
[01:43:26] CloCkWeRX: has joined #ruby
[01:45:35] Rodya_: has joined #ruby
[01:49:48] fujimura: has joined #ruby
[01:50:33] willharr_: has joined #ruby
[01:53:17] Rubie: has joined #ruby
[01:53:19] furoido: has joined #ruby
[01:53:29] furoido: anyone familiar with wordmove gem?
[01:54:05] yaogwai: has joined #ruby
[01:55:07] fabrice31: has joined #ruby
[01:58:23] Rodya_: has joined #ruby
[01:58:40] edwinvdgraaf: has joined #ruby
[02:00:44] Fooster: has joined #ruby
[02:02:38] vin`: has joined #ruby
[02:03:18] jpfuentes2: has joined #ruby
[02:04:14] x1337807x: has joined #ruby
[02:05:18] Vile`: has joined #ruby
[02:06:10] affenhoden: has left #ruby: ()
[02:06:29] fmcgeough: has joined #ruby
[02:06:34] Palmer11: has left #ruby: ()
[02:07:09] affenhoden: has joined #ruby
[02:07:23] bahar: has joined #ruby
[02:09:27] tkuchiki: has joined #ruby
[02:09:35] jackjackdripper1: has joined #ruby
[02:10:45] Limix: has joined #ruby
[02:14:26] gix: has joined #ruby
[02:15:39] drbrain: sweeper: no
[02:16:08] PlasmaStar: has joined #ruby
[02:17:14] fgo: has joined #ruby
[02:17:16] Seanzie: has joined #ruby
[02:17:36] bogdanteleaga: has joined #ruby
[02:22:54] iamjarvo: has joined #ruby
[02:23:30] iamjarvo: has joined #ruby
[02:24:21] commondream: has joined #ruby
[02:25:29] mdz_: has joined #ruby
[02:26:34] iamninja: has joined #ruby
[02:27:17] vin`: has joined #ruby
[02:30:54] nofxx: has joined #ruby
[02:30:54] RegulationD: has joined #ruby
[02:31:07] Spami: has joined #ruby
[02:31:29] greenride: has joined #ruby
[02:31:30] darkf: has joined #ruby
[02:32:35] greenride: Can someone suggest a guide for stepping through Ruby C code? I'd like to step through OpenSSL:Cipher.update.
[02:33:25] skade: has joined #ruby
[02:33:37] bnagy: most of that stuff vanishes into openssl pretty fast
[02:34:32] bnagy: imho just modify the ruby and use printf debugging to get the ruby side, but the real C side you'll need a debugger
[02:36:15] MatthewsFace: has joined #ruby
[02:36:54] pengin: has joined #ruby
[02:37:04] bruno-: has joined #ruby
[02:37:56] bahar: has joined #ruby
[02:38:57] moretti: has joined #ruby
[02:39:01] agilenav: has joined #ruby
[02:39:04] commondream: has joined #ruby
[02:39:07] greenride: bnagy: I'm just wondering if there's a guide that allows one to do the following: 1.) Instruct rbenv to compile Ruby with debugging symbols. 2.) Use some IDE to insert breakpoints. 3.) Use gdb to debug.
[02:39:43] krz: has joined #ruby
[02:39:59] jerematic: has joined #ruby
[02:40:02] bnagy: ok. No idea.
[02:40:17] c_nick: has joined #ruby
[02:40:27] bnagy: that won't help you debug openssl though :)
[02:40:38] davedev24_: has joined #ruby
[02:41:10] agilenav: has joined #ruby
[02:41:17] jerematic: has joined #ruby
[02:41:27] greenride: The bug is probably of my creation. I just want to see exactly what the inputs and outputs from OpenSSL are.
[02:41:30] c_nick: how to group array items such that all types can be obtained viz ['a1','a2',a3'] => should give a
[02:42:06] Ox0dea: greenride: Are you quite sure Ruby isn't already exposing sufficient information?
[02:42:20] noethics: greenride, is this web ssl?
[02:42:53] noethics: yeah.. i mean are you using it for http encryption
[02:42:55] noethics: or something else
[02:42:58] bnagy: greenride: ok well as I said, imho you'd be better off debugging the openssl code not the ruby code
[02:43:11] bnagy: all that method does is shim ossl_cipher_update_long
[02:43:28] bnagy: so all you'll see in the ruby is conversion to RSTRING etc
[02:43:28] noethics: most things you can test with openssl command line in verbose mode
[02:43:32] noethics: unless youre sure it's your ruby code
[02:44:55] greenride: noethics: How do I test openssl in verbose mode?
[02:45:08] noethics: greenride, depends how you're using openssl
[02:46:05] greenride: noethics: I'm creating a decipher object using OpenSSL:Cipher.new. Then, I'm setting some values and calling cipher.update
[02:46:15] greenride: This is all Ruby code.
[02:46:45] failshell: has joined #ruby
[02:46:45] greenride: When called, cipher.update is decrypting incorrectly.
[02:46:48] noethics: greenride, find out what the equivalent of whatever you're doing is on the command line
[02:46:52] noethics: and try doing it manually
[02:46:59] noethics: to see if it's your code or our keys or whatever
[02:47:27] balazs: has joined #ruby
[02:47:43] bnagy: the openssl cipher API is such a shitshow :(
[02:47:44] greenride: noethics: That's what I'm trying to do. One step exists between where I'm at and passing command line arguments to OpenSSL.
[02:47:58] noethics: i've never used it
[02:48:11] rbowlby: has joined #ruby
[02:48:21] bnagy: it's basically the same as using the openssl C api
[02:48:26] bnagy: which is also a shitshow
[02:48:40] greenride: bnagy: Good to know.
[02:49:10] GriffinHeart: has joined #ruby
[02:49:32] greenride: To determine what Openssl is being passed, I need to determine what the Ruby C code for OpenSSL::Cipher's instance method update is passing OpenSSL.
[02:49:40] greenride: That's why I need to debug the Ruby code.
[02:49:46] greenride: The Ruby C code.
[02:50:02] noethics: it seems like you don't really know what you're doing
[02:50:21] noethics: go look at the source and see what it does
[02:50:26] havenwood: has joined #ruby
[02:50:30] michael_mbp: has joined #ruby
[02:51:07] bnagy: almost nothing
[02:51:15] greenride: https://dpaste.de/m9tC
[02:51:19] greenride: That's the source
[02:51:23] greenride: I've looked at it
[02:51:24] bnagy: http://ruby-doc.org/stdlib-2.0.0/libdoc/openssl/rdoc/OpenSSL/Cipher.html#method-i-update (you can click view source)
[02:51:39] pcfreak30: has joined #ruby
[02:51:49] greenride: I want to validate with a debugger
[02:51:56] greenride: My C is a bit rusty.
[02:51:57] bnagy: so it literally just casts to char* and sends it
[02:52:54] bnagy: why are you against breaking on ossl_cipher_update_long?
[02:53:06] greenride: bnagy: Don't know how to do it.
[02:53:08] bnagy: that way you'll actually for real get what openssl is seeing
[02:53:32] greenride: bnagy: bad reason
[02:53:42] greenride: bnagy: bad reason = my reason was bad
[02:53:52] bronson: has joined #ruby
[02:54:04] hahuang65: has joined #ruby
[02:54:17] greenride: bnagy: To break on ossl_cipher_update_long, I need to build openssl with debug symbols and break on it.
[02:54:25] bnagy: look, shoot me if I'm wrong but I am very confident that the bug is just with your ruby
[02:54:29] bnagy: why do you need debug symbols?
[02:54:32] bnagy: it's an export
[02:54:37] Limix: has joined #ruby
[02:54:56] greenride: bnagy: I know the bug is 99.9999% with my Ruby code.
[02:55:24] bnagy: I'm staring at this source and I can't think of anything weird ruby could possibly be doing to your input buffer
[02:55:33] bnagy: a ruby string is just a raw byte array
[02:55:59] bnagy: how about we play the "you describe the actual problem you're having" game instead?
[02:56:16] greenride: When I type `decipher.update(my_string)`, what is argc, argv, and self that are passed to ossl_cipher_update?
[02:56:24] Joufflu: has joined #ruby
[02:56:42] bnagy: they're just C's way of seeing the args you gave to the ruby method
[02:57:07] bnagy: rb_scan_args(argc, argv, "11", &data, &str); pulls out the ruby args
[02:57:30] bnagy: in = (unsigned char *)RSTRING_PTR(data); that casts your data arg to *char (byte array in C)
[02:57:53] bnagy: ossl_cipher_update_long(ctx, (unsigned char *)RSTRING_PTR(str), &out_len, in, in_len)) that's the money shot
[02:57:58] greenride: date = my_string in the example?
[02:58:55] bnagy: str is the (weirdly named) optional output buffer arg
[02:59:56] greenride: bnagy: Now, I understand why you were talking about ossl_cipher_update_long. That method doesn't appear in the Ruby 1.9.3 version, which is what I was looking at.
[03:00:23] bnagy: it doesn't? k lemme shift versions
[03:00:29] pepperbreath: has joined #ruby
[03:00:44] greenride: I'm actually using 2.1.6
[03:01:00] greenride: But, I was looking at 1.9.3.
[03:01:05] greenride: So, your link is better.
[03:01:13] bnagy: oh EVP_CipherUpdate is probably just a wrapper
[03:01:24] jacobdam: has joined #ruby
[03:01:24] phutchins: has joined #ruby
[03:01:53] noethics: im just curious why youre using ssl?
[03:01:54] ChanServ: -b FlyAssNigga!*@*
[03:01:58] noethics: whats the purpose
[03:02:01] edwinvdgraaf: has joined #ruby
[03:02:19] greenride: So, what I need to know is what ctx, str, &out_len, in, and in_len are in Ruby variables.
[03:02:26] greenride: noethics: encrypting data
[03:02:35] noethics: why ssl though?
[03:02:39] baweaver: has joined #ruby
[03:02:54] greenride: noethics: Actually, I'm writing specs for someone elses code
[03:03:23] bnagy: fwiw if this is not for a school project or "fun" then you shouldn't be using openssl directly
[03:03:26] bnagy: it's awful
[03:03:47] bnagy: like very hard to use safely
[03:03:57] greenride: Our code is a shitshow???
[03:04:07] jacobdam: I am tracing a memory leak problem in ruby 2.1. There are some application objects are kept by an object RubyVM::Env. I am not sure what is RubyVM::Env. Anyone could explain to me what is RubyVM::Env?
[03:04:13] bnagy: well in that case you're using the right lib!
[03:04:17] greenride: It'll be refactored.
[03:04:18] jpfuentes2: has joined #ruby
[03:04:47] greenride: if the product is successful
[03:04:47] bnagy: see if you can convince whomever to just use nacl
[03:04:56] noethics: or just rsa
[03:05:07] bnagy: =__= not rsa
[03:05:08] nobitanobi: has joined #ruby
[03:05:13] noethics: wanna fight about it bnagy
[03:05:15] bnagy: nacl is a good crypto lib
[03:05:20] greenride: I'll look it up
[03:05:24] bnagy: which is very hard to use wrong
[03:05:28] greenride: Thanks for the advise.
[03:05:31] bnagy: symmetric / asymmetric
[03:05:34] noethics: you can implement your own rsa algo
[03:05:38] noethics: in like 10 lines of code
[03:05:56] c_nick: how to group array items such that all types can be obtained viz ['a1','a2',a3'] => should give a
[03:06:02] bnagy: why was this child sent to plague me? What have I done?
[03:06:21] bnagy: c_nick: 'a' is not a type, it's a string prefix
[03:07:18] noethics: WHATS YOUR PROBLEM WITH RSA bnagy
[03:07:30] bnagy: so many problems
[03:07:36] greenride: bnagy: Do you know what ctx, str, &out_len, in, and in_len are in Ruby variables?
[03:07:41] c_nick: bnagy, yes string prefix sorry
[03:07:54] bnagy: greenride: nothing
[03:07:55] Aria: https://twitter.com/claudijd/status/608012289212440577
[03:08:03] pengin: has joined #ruby
[03:08:14] bnagy: greenride: sorry... str is the out buffer, the rest nothing, they are created by the C wrapper
[03:08:17] sevenseacat: Aria: awesome.
[03:08:22] bnagy: because they need to be passed to openssl
[03:08:31] noethics: >> ['a1','a2'].map { |e| e[0] }
[03:08:31] ruboto: noethics # => ["a", "a"] (https://eval.in/377995)
[03:08:56] bnagy: greenride: in is also something. Sorry. :) in, str are your args
[03:09:09] platosha: has joined #ruby
[03:09:40] bnagy: standard C api is like "here's some data, here's how long it is, here's where to put the output, here's a pointer to an int that you should fill in to tell me how long the output is"
[03:09:49] noethics: bnagy, tell me why you think rsa is bad :(
[03:09:51] greenride: bnagy: As far as I know, I'm passing at least iv, key, and my_string to the Ruby library. At least those three args and maybe more are passed to Openssl, right?
[03:09:53] c_nick: noethics, suppose your array holds values like ARR1 AR2 ARR3 AR4 i want it to give ARR and AR
[03:10:13] bnagy: greenride: no, the iv and key etc are used to create the context
[03:10:34] Ox0dea: c_nick: What are some of your actual values?
[03:10:52] greenride: bnagy: Is there an input other than iv, key, and my_string that comes from Ruby?
[03:10:57] bnagy: noethics: it's hard to use correctly. People screw up the padding all the time.
[03:11:02] braincrash: has joined #ruby
[03:11:13] c_nick: Ox0dea, here is my array ['WEST123','WEST234','WEST456','WEST567','STAR001','STAR002','STAR003','STAR004','STAR005','STAR006','FPG01','FPG02','FPG03','FPG04','FPG05','FPG06','BCG001','BCG002','BCG003']
[03:11:15] bnagy: plus if you use e=3 there's hijinx
[03:11:24] greenride: bnagy: Like me. I'm almost positive my issue is padding related.
[03:11:54] bnagy: greenride: well that's why I asked a few times about your _actual_ problem rather than what you think will help you solve it
[03:12:03] noethics: >> ['a1','a2'].map { |e| /^[^0-9]*/.match(e)[0] }
[03:12:04] ruboto: noethics # => ["a", "a"] (https://eval.in/377996)
[03:12:14] noethics: >> ['abc1','def2'].map { |e| /^[^0-9]*/.match(e)[0] }
[03:12:15] ruboto: noethics # => ["abc", "def"] (https://eval.in/377998)
[03:12:19] Ox0dea: >> ['WEST123','WEST234','WEST456','WEST567','STAR001','STAR002','STAR003'].group_by { |x| x[/\D+/] }
[03:12:20] ruboto: Ox0dea # => {"WEST"=>["WEST123", "WEST234", "WEST456", "WEST567"], "STAR"=>["STAR001", "STAR002", "STAR003"]} (https://eval.in/377999)
[03:12:41] bnagy: Ox0dea wins
[03:12:46] noethics: Ox0dea is better
[03:12:55] noethics: im a ruby shitter unfortunately
[03:13:25] bin_005: has joined #ruby
[03:13:38] xcesariox: has joined #ruby
[03:13:39] c_nick: noethics, you win too :)
[03:14:56] greenride: bnagy: Here's my actual problem. I'm writing specs. I monkey patched OpenSSL::Cipher with a class_eval within the specs. I monkey patched two methods. random_key and random_iv to return the same values every time. I made sure they are the correct number of bytes. I used these values for both the encryption and decryption. However, when I decrypt, I'm not getting the original values.
[03:15:02] mary5030: has joined #ruby
[03:15:14] c_nick: thanks Ox0dea and noethics :)
[03:15:18] bahar: has joined #ruby
[03:15:18] Ox0dea: Sure thing.
[03:15:27] sevenseacat: 'monkey patched OpenSSL::Cipher' ......*backs away slowly*
[03:15:29] noethics: i am going to just right away stop reading after "monkey patched OpenSSL" and advise you abort mission
[03:15:45] bnagy: greenride: ok, have you written a round-trip POC using the same cipher / mode ?
[03:15:48] greenride: sevenseacat: Only in the specs.
[03:15:52] sevenseacat: screw 'slowly' *runs away screaming*
[03:15:54] serivichi: has joined #ruby
[03:16:09] greenride: bnagy: POC = ? (Proof of Concept?)
[03:16:13] GriffinHeart: has joined #ruby
[03:16:42] Ox0dea: Precipice of Chaos.
[03:16:45] benlieb_: has joined #ruby
[03:17:09] bnagy: just write something like the example code in the docs
[03:17:46] bnagy: actually the docs code should work perfectly, just change decipher.key = cipher.random_key
[03:17:52] greenride: bnagy: I did. The code works without monkey patching random_iv and random_key. However, it fails with those two methods monkey patched.
[03:18:09] bnagy: (and iv also) if your monkey patch is correct then that example code will still work
[03:18:14] zenguy_pc: has joined #ruby
[03:18:22] jacobdam: I am tracing a memory leak problem in ruby 2.1. There are some application objects are kept by an object RubyVM::Env. I am not sure what is RubyVM::Env. Anyone could explain to me what is RubyVM::Env? And how to remove those references from RubyVM::Env. http://stackoverflow.com/questions/30722395/ruby-leaked-objects-are-referenced-by-rubyvmenv
[03:18:44] bnagy: otherwise, just p decipher.key from ruby, and that should let you debug :)
[03:19:09] greenride: bnagy: I monkey patched random_key and random_iv. You're telling me that I also need to monkey patch iv=?
[03:19:10] affenhoden: has joined #ruby
[03:19:17] bnagy: greenride: no
[03:19:29] GriffinHeart: has joined #ruby
[03:19:49] segfalt: Can we back up to why you???re monkey patching SSL in specs?
[03:19:55] bnagy: I'm saying if you take the example code here http://ruby-doc.org/stdlib-1.9.3/libdoc/openssl/rdoc/OpenSSL/Cipher.html and use random_key for decipher as well
[03:19:56] greenride: What do you mean by `just p decipher.key from ruby, and that should let you debug`?
[03:20:00] bantic: has joined #ruby
[03:20:10] bnagy: then assuming your monkey patch is right then it will still work
[03:20:44] bnagy: decipher.key = key <- change to decipher.key = cipher.random_key
[03:21:06] bnagy: if it doesn't work, see what you're getting for decipher.key and why it's not the same as cipher.key
[03:21:17] bnagy: you can do all of that from ruby
[03:21:56] retornam: has joined #ruby
[03:21:57] greenride: bnagy: That's exactly what I did. I used the code on that page. If I don't Monkey patch random_iv and random_key. The code works. The object I get after encrypting and decrypting is identical to the original object.
[03:22:12] vivekananda: has joined #ruby
[03:22:25] greenride: bnagy: After Monkey patching random_iv and random_key, the value I get is not identical to the original value.
[03:22:33] bnagy: so check the keys
[03:22:49] greenride: I checked their length.
[03:22:50] bnagy: who cares what you're passing in update?
[03:22:59] bnagy: if the keys aren't the same it's not going to work
[03:23:08] greenride: The keys are identical.
[03:23:33] bnagy: I don't believe you :)
[03:23:33] greenride: What I wonder is whether there is another random element that I'm not monkey patching.
[03:24:25] mello: has joined #ruby
[03:24:29] affenhoden: has joined #ruby
[03:24:36] greenride: bnagy: I already checked four or five times because that's the first thing I suspected, but let me check again.
[03:24:49] bnagy: how are you checking?
[03:24:58] bnagy: gist your poc
[03:26:09] greenride: I checked by inserting a debugger statement at every relevant point. This allowed me to test if the Monkey patch was working and to test if the key and iv were identical.
[03:26:37] greenride: I also converted the strings to a byte array using bytes.
[03:26:44] greenride: And testing the numerical values.
[03:27:42] greenride: Let me isolate the problem and create something that is easier to read.
[03:28:11] greenride: bnagy: As far as you know, iv and key are the only random elements. Correct?
[03:28:16] djbkd: has joined #ruby
[03:28:34] Ox0dea: greenride: The universe is non-deterministic.
[03:28:50] mdz_: has joined #ruby
[03:28:59] ecksit: has joined #ruby
[03:29:22] greenride: Ox0dea: measurement is non-deterministic
[03:30:25] rickmasta: has joined #ruby
[03:31:12] bnagy: greenride: https://eval.in/378003
[03:31:39] bnagy: greenride: yes
[03:32:02] ledestin: has joined #ruby
[03:32:06] mark[oz]: has joined #ruby
[03:33:19] bnagy: greenride: ugh actually I don't know if they made key a getter, sec
[03:34:43] bnagy: no they didn't sry https://eval.in/378006
[03:37:05] jenrzzz: has joined #ruby
[03:38:32] fujimura: has joined #ruby
[03:39:27] WildBamboo-Josh: has joined #ruby
[03:40:38] Oog: has joined #ruby
[03:42:50] tubuliferous_: has joined #ruby
[03:43:13] noethics: <Ox0dea> greenride: The universe is non-deterministic.
[03:43:59] AlexAltea: has joined #ruby
[03:44:13] noethics: i think even people who study entropy wouldn't blatantly make that claim
[03:44:25] noethics: unless u wanna fight about it m8
[03:46:03] bnagy: let's just hope it's true and move on
[03:46:27] bnagy: otherwise I'll be trapped on Phil 101 hell which is probably even worse than being trapped in crypto X/Y hell ;)
[03:46:34] Ox0dea: noethics: http://en.wikipedia.org/wiki/Quantum_indeterminacy
[03:47:05] Ox0dea: I was, of course, only poking fun, and I'm glad greenride took it in stride.
[03:47:23] noethics: Ox0dea, i didnt read context sry
[03:47:32] noethics: Ox0dea, but yeah something something relativity of wrong
[03:51:36] greenride: What package supports AES-256-CBC and AES-256-GCM?
[03:51:38] ellisTAA: has joined #ruby
[03:51:41] ellisTAA: i???m trying to create a quick sort algorithm but something is wrong w/ my algorithm ??? can anyone take a look @ it https://gist.github.com/ellismarte/71846137adef00c361a7#file-results-rb-L1-L10
[03:52:17] Yiota: has joined #ruby
[03:52:36] iamjarvo: has joined #ruby
[03:53:11] iamjarvo: has joined #ruby
[03:53:46] dgutierrez1287: has joined #ruby
[03:55:04] havenwood: has joined #ruby
[03:55:41] gix: has joined #ruby
[03:55:58] bnagy: greenride: openssl?
[03:56:41] bnagy: I don't know how you pass AAD through the ruby api though
[03:57:19] noethics: CTR or bust
[03:57:55] bnagy: GCM is awesome
[03:58:21] bnagy: rogaway makes a pretty compelling case for un-RFCing all unauthenticated modes, tbh
[03:58:40] bnagy: just because the HMAC constructions trip people up
[04:00:15] bkxd: has joined #ruby
[04:00:15] commondream: has joined #ruby
[04:00:22] arup_r: has joined #ruby
[04:01:00] Nuck: has joined #ruby
[04:02:33] slawrence00: has joined #ruby
[04:02:45] commondream: has joined #ruby
[04:04:00] edwinvdgraaf: has joined #ruby
[04:05:12] Aeyrix: Is there a shorthand to return the opposite of a boolean?
[04:05:15] baweaver_: has joined #ruby
[04:05:18] Aeyrix: return (not) false
[04:05:25] Exponential: has joined #ruby
[04:05:28] Aeyrix: I can't remember off the top of my head and it's irritating me.
[04:05:54] Aeyrix: Aeyrix confirmed for moron.
[04:06:13] Ox0dea: Careful, though; ! is a method.
[04:06:23] noethics: USE UNLESS IF POSSIBLE
[04:06:30] noethics: NOT ! because it has SIDEFEECTS
[04:06:57] Aeyrix: turn your caps down
[04:07:04] Ox0dea: >> class FalseClass; def !; 'lol' end end; !false
[04:07:05] ruboto: Ox0dea # => "lol" (https://eval.in/378015)
[04:07:16] Aeyrix: unless false; return true; else return false;
[04:07:35] Aeyrix: That seems super cumbersome.
[04:07:38] Ox0dea: Aeyrix: Consider whether you should explicitly return a boolean value.
[04:07:40] sevenseacat: that makes little sense
[04:07:45] Aeyrix: Ox0dea: I do.
[04:07:56] sevenseacat: the 'use unless if possible'
[04:08:01] Aeyrix: Ox0dea: The method name is `authorized?`.
[04:08:08] Ox0dea: Excellent.
[04:08:09] Aeyrix: So, yes, I want to return a boolean only.
[04:08:10] noethics: sevenseacat, how does it make little sense
[04:08:11] sevenseacat: given we're talking about return values
[04:08:15] noethics: if !a == unless a
[04:08:23] Aeyrix: Jesus Christ
[04:08:25] Aeyrix: that's not easy to read
[04:08:32] Aeyrix: fairly sure you just broke like seven sacred tenets of Ruby
[04:08:33] noethics: does return true unless a work?
[04:08:45] Aeyrix: No, because then it won't return anything if a is true.
[04:08:50] Aeyrix: It'll return nil.
[04:08:52] sevenseacat: it'll return nil
[04:09:05] bnagy: you can force a return of a bool with !!(thing)
[04:09:06] shevy: he likes caps
[04:09:09] Ox0dea: Aeyrix: noethics (and the style guide) recommend using "unless" instead of "if not".
[04:09:09] bnagy: but it's ew
[04:09:26] sevenseacat: that i can agree with
[04:09:44] noethics: i am good at ruby
[04:09:46] noethics: if you didnt know
[04:09:49] kp666: has joined #ruby
[04:09:58] bantic: has joined #ruby
[04:10:40] baweaver: What the hell did I just read?
[04:10:42] noethics: honestly 99% of my ruby experience comes with rubuto
[04:10:47] mrsolo: has joined #ruby
[04:11:06] noethics: baweaver, just go with it m8
[04:11:19] baweaver: ACTION shuffles on
[04:11:45] noethics: >> a = false; unless a;
[04:11:46] ruboto: noethics # => /tmp/execpad-daa7afd7547e/source-daa7afd7547e:3: syntax error, unexpected keyword_rescue ...check link for more (https://eval.in/378016)
[04:11:55] noethics: u fukin wut
[04:11:55] greenride: bnagy: Here is a simple example reproducing the problem I'm experiencing. https://dpaste.de/6Xxx
[04:11:58] Aeyrix: > a = true; return !a;
[04:12:02] Aeyrix: >> a = true; return !a;
[04:12:03] ruboto: Aeyrix # => unexpected return (LocalJumpError) ...check link for more (https://eval.in/378017)
[04:12:07] Aeyrix: Fuck you say?
[04:12:15] shevy: hey workmad3 when you document your ruby code, do you use "honored" notation or "honoured", as example?
[04:12:16] Aeyrix: o rite no def
[04:12:19] balazs: has joined #ruby
[04:12:39] noethics: shevy is NSA
[04:12:45] noethics: fishing for those location detes
[04:13:02] shevy: noethics I need to find out whether I should drop support for british english
[04:13:06] mike1: has joined #ruby
[04:13:16] Aeyrix: I use BritEng.
[04:13:18] commondream: has joined #ruby
[04:13:25] shevy: Aeyrix you are from the UK?
[04:13:57] stardiviner: has joined #ruby
[04:14:00] sevenseacat: I use whatever comes out of my keyboard at the time. never really thought about it.
[04:14:07] MasterPiece: has joined #ruby
[04:14:15] mike1: has left #ruby: ("WeeChat 0.4.3")
[04:14:25] noethics: sevenseacat, i take you for someone who doesn't use an oxford comma
[04:14:36] sevenseacat: i definitely use oxford commas.
[04:14:47] duderonomy: has joined #ruby
[04:14:51] noethics: otherwise we would have had a problem
[04:15:06] noethics: non-oxford-comma users are gross
[04:15:13] sevenseacat: https://twitter.com/lenabitts/status/594175918173790208
[04:15:17] Ox0dea: YARV uses 89 opcodes, Python 101; what to make of this?
[04:16:00] shevy: a dildo collector?
[04:16:16] shevy: Ox0dea that ruby is simpler than python!
[04:16:33] Ox0dea: (It's not at all, of course.)
[04:16:48] Aeyrix: yes it is
[04:17:00] Aeyrix: self.__self__.init())()()((()<><><>{}{}{}}}{}{}
[04:17:12] Aeyrix: "oh yeah that's called a magic class. ~~METAPROGRAMMING~~"
[04:17:15] Aeyrix: Thanks Python.
[04:17:34] greenride: noethics: Here's a simplified version of the problem I was encountering with OpenSSL::Cipher. https://dpaste.de/6Xxx
[04:17:41] shevy: I think you may have exaggerated there a little
[04:17:47] pepperbreath1: has joined #ruby
[04:17:58] greenride: noethics: The code works without the class_eval that is monkey patching.
[04:18:01] Aeyrix: shevy: selfselfselfselfselfselfself
[04:18:03] towski_: has joined #ruby
[04:18:09] shevy: you can call self any way in python!
[04:18:17] shevy: like not_self
[04:18:31] Ox0dea: Non-alphanumeric Ruby is Turing-complete.
[04:18:33] shevy: I hate explicit self
[04:18:36] minmax: has joined #ruby
[04:19:06] greenride: Ox0dea: Is that actually true?
[04:19:13] noethics: greenride, so it works?
[04:19:25] greenride: The code I posted?
[04:19:37] beneggett: has joined #ruby
[04:19:45] RegulationD: has joined #ruby
[04:19:58] greenride: noethics: It works if the class_eval is commented out. With the class_eval, it does not work. I want to know why.
[04:20:28] greenride: That's why I wanted to debug Ruby libraries and openssl and all that.
[04:20:32] Ox0dea: greenride: https://eval.in/private/d29c19795708bb
[04:21:01] noethics: that looks like brainfuck
[04:21:11] Ox0dea: It's a brainfuck interpreter.
[04:21:37] anaeem1_: has joined #ruby
[04:22:14] shevy: Ox0dea is the brain of the channel
[04:22:15] bnagy: greenride: OHHH hahah
[04:22:17] greenride: Ox0dea: That's brilliant.
[04:22:27] Polysics: has joined #ruby
[04:22:34] Ox0dea: It's really very silly, but it's nice to look at.
[04:22:47] shevy: it looks like a neuronal network
[04:22:55] greenride: bnagy: https://dpaste.de/6Xxx
[04:22:56] mistermocha: has joined #ruby
[04:23:00] bnagy: greenride: your monkey patch is wrong I guess
[04:23:09] greenride: bnagy: Do you know why?
[04:23:20] shevy: http://www.extremetech.com/wp-content/uploads/2013/09/340.jpg
[04:23:56] bnagy: I think you're probably not setting the key
[04:25:51] bnagy: greenride: https://eval.in/378032
[04:27:05] Exponential: has joined #ruby
[04:27:19] Evidlo: has joined #ruby
[04:28:04] Evidlo: Is a bundle kind of like a python virtualenv?
[04:28:48] failshell: has joined #ruby
[04:29:09] greenride: bnagy: brilliant - A key can't be set directly with a string???. that's odd.
[04:30:13] charliesome: has joined #ruby
[04:30:26] greenride: bnagy: Actually??? why does your version work?
[04:30:48] bnagy: because I set it manually, not in the monkeypatch
[04:30:57] bnagy: I just use the monkeypatch value
[04:31:08] ellisTAA: when i run my second_sort method i my commandline doesn???t stop running, anyone know what???s going on? https://gist.github.com/ellismarte/277cd531d9124d2a5772#file-merge_sort-rb-L17-L35
[04:31:13] bnagy: there's some weirdness going on with the methods in there though
[04:31:19] Oog: has joined #ruby
[04:31:28] bnagy: inside your patched method you should be able to call self.key = blah but you can't
[04:32:46] jcaho: has joined #ruby
[04:33:48] greenride: bnagy: You aren't actually using k to set a value. You're using cipher.random_value and decipher.random_value.
[04:33:57] MatthewsFace: has joined #ruby
[04:34:25] bnagy: greenride: https://eval.in/378042
[04:34:29] bnagy: theeeere we go
[04:34:40] bnagy: no k was leftover from debugging before
[04:35:30] bnagy: the monkeypatch I was messing with just had a derp error. That should be what you want, now
[04:36:15] kstuart_: has joined #ruby
[04:36:56] astrobunny: has joined #ruby
[04:38:11] greenride: bnagy: Brilliant. Thank you. Now, I get it! https://dpaste.de/At4X
[04:38:14] duncannz: has joined #ruby
[04:38:37] greenride: bnagy: I wasn't monkey patching correctly. random_iv and random_key both generate the random element and set it.
[04:38:37] bnagy: yours isn't a true test
[04:38:55] bnagy: and you don't need to class_eval for this, just open up the class like normal imho
[04:39:23] bnagy: you're setting the saved key value directly with decipher - that would work with "real" random as well
[04:39:31] aapole: has joined #ruby
[04:39:36] Liothen: has joined #ruby
[04:39:37] bnagy: ie you're not testing your monkeypatch
[04:40:49] greenride: bnagy: I used the class_eval because it's inside a method in my rspec tests.
[04:41:11] greenride: bnagy: Not sure I understand what you mean by not testing my monkeypatch.
[04:41:28] greenride: bnagy: The monkey patch is used for testing.
[04:41:35] bnagy: your code would work without it
[04:41:35] greenride: bnagy: not in the code itself.
[04:41:55] bnagy: there's no point to hardwiring the result of random_key
[04:42:09] bnagy: because whatever the result you save it in key and then set that on decipher
[04:42:16] greenride: bnagy: In this case, you're right.
[04:42:34] greenride: bnagy: The real code I'm testing had more complexity.
[04:42:40] houhoulis: has joined #ruby
[04:43:10] mdz_: has joined #ruby
[04:43:47] bnagy: anyway, MORAL OF THE STORY
[04:43:55] bnagy: this was all a massive X/Y waste of time
[04:44:09] bnagy: could have fixed it an hour ago if you'd described the actual problem and supplied code
[04:44:13] bnagy: #justsaying
[04:44:53] bnagy: aes-256-gcm is lowercase, btw ( re earlier q )
[04:45:06] bnagy: I don't know why, blame openssl devs
[04:45:51] revath: has joined #ruby
[04:45:52] Exponential: has joined #ruby
[04:46:16] swgillespie: has joined #ruby
[04:48:18] greenride: bnagy: Thanks for your help. Will be ready with example code next time I post a question.
[04:48:44] bnagy: np, and don't forget nacl
[04:48:49] swgillespie: has joined #ruby
[04:49:00] greenride: bnagy: Will definitely recommend that.
[04:49:22] bnagy: noethics: dork.
[04:49:44] greenride: noethics: Using rsa directly isn't much better than using Openssl::Cipher directly. Is it?
[04:50:03] bnagy: rsa isn't even a symmetric cipher, they can't be compared
[04:50:06] noethics: greenride, you can whip up a full rsa impl with no external code with like 10 lines of coad
[04:50:19] bnagy: no you can't
[04:50:28] noethics: i mean with an stdlib
[04:50:31] noethics: yeah you can
[04:50:34] bnagy: you can whip up an incredibly dangerous unpadded version
[04:50:38] noethics: with padding
[04:50:49] ferr: has joined #ruby
[04:50:57] greenride: You'd have to test whether your padding is exploitable.
[04:51:04] greenride: I'd rather leave that to experts.
[04:51:16] greenride: One can only master so many things.
[04:51:18] noethics: jk bnagy is the true expert
[04:51:25] bnagy: you can do pkcs fairly "easily', but pkcs is a bad idea anyway
[04:51:35] bnagy: but none of it matters because still not a symmetric cipher
[04:51:46] noethics: HEY MAN I HEARD ACHTERBAHN WAS PRE GOOD
[04:51:50] shock_one: has joined #ruby
[04:51:59] mrsolo: has joined #ruby
[04:56:02] poguez_: has joined #ruby
[04:58:33] shock_one: has joined #ruby
[04:58:49] TommyTheKid: has left #ruby: ("Leaving")
[05:01:57] Polysics: has joined #ruby
[05:03:49] rht: has joined #ruby
[05:04:27] Maletor: has joined #ruby
[05:04:31] Rubie: has joined #ruby
[05:05:53] iceden: has joined #ruby
[05:06:19] Miphix: has joined #ruby
[05:07:04] fujimura: has joined #ruby
[05:07:13] Deele: has joined #ruby
[05:08:10] yfeldblum: has joined #ruby
[05:09:32] edwinvdgraaf: has joined #ruby
[05:11:19] ohaibbq: has joined #ruby
[05:11:53] rickmasta: has joined #ruby
[05:12:04] _jesterfraud: has joined #ruby
[05:12:49] Polysics: has joined #ruby
[05:13:13] mello: has joined #ruby
[05:13:13] jenksy: has joined #ruby
[05:15:15] lxsameer: has joined #ruby
[05:15:59] ellisTAA: has joined #ruby
[05:16:42] yfeldblum: has joined #ruby
[05:17:31] shevy: you are still all caps
[05:23:03] bluOxigen: has joined #ruby
[05:24:53] Polysics_: has joined #ruby
[05:25:26] joshbamboo1: has joined #ruby
[05:25:41] MatthewsFace: has joined #ruby
[05:26:11] tsujp: has joined #ruby
[05:26:53] stoogenmeyer__: has joined #ruby
[05:27:53] _jesterfraud_: has joined #ruby
[05:28:29] Axsuul: has joined #ruby
[05:29:02] aganov: has joined #ruby
[05:30:20] failshell: has joined #ruby
[05:31:04] tubuliferous_: has joined #ruby
[05:31:15] mrsolo: has joined #ruby
[05:34:46] Oog: has joined #ruby
[05:35:01] yaogwai: has joined #ruby
[05:35:25] Radar: How can I make Nokogiri process both a and b in this case? Nokogiri::XML.parse("<a>foo</a><b>bar</b>")
[05:35:34] Radar: Is the answer "wrap it in another element" ?
[05:36:44] sandstrom: has joined #ruby
[05:37:03] railsraider: has joined #ruby
[05:37:57] kadoppe: has joined #ruby
[05:37:57] balazs: has joined #ruby
[05:41:25] Polysics: has joined #ruby
[05:41:54] timonv: has joined #ruby
[05:42:20] dcarmich: has joined #ruby
[05:42:52] jack_rabbit: has joined #ruby
[05:43:45] CloCkWeRX1: has joined #ruby
[05:45:14] ruby-lang084: has joined #ruby
[05:45:35] tagrudev: has joined #ruby
[05:46:04] Iskarlar: has joined #ruby
[05:47:29] baweaver: Radar: poking about, but found this gem: https://github.com/sparklemotion/nokogiri/wiki/Cheat-sheet
[05:48:06] baweaver: Not finding anything of note for getting two nodes
[05:48:17] baweaver: Unless it magically supports regex for paths
[05:48:24] sevenseacat: I'mma bookmark that, every time nokogiri I have to hammer google
[05:48:30] sevenseacat: *every time I use nokogiri
[05:49:25] baweaver: Though tenderlove is on, might put it by him.
[05:51:45] MVPhelp: has joined #ruby
[05:52:39] Radar: I think it's an on-purpose thing and the people who are sending us this XML file are idiots.
[05:53:20] baweaver: I have very colorful words for people that use XML for responses, but I'll save that.
[05:54:38] lsmola: has joined #ruby
[05:54:40] bmalum: has joined #ruby
[05:54:48] baweaver: One time I saw Java programmers trying to program using XML because it was 'more flexible'
[05:55:10] baweaver: Got an interesting look when I said just bite the bullet and learn LISP already
[05:56:08] baweaver: yaml isn't horrid either, but slow on the parse
[05:57:32] tenderlove: has joined #ruby
[05:58:20] apofis: has joined #ruby
[05:58:49] skade: has joined #ruby
[05:58:52] khebbie: has joined #ruby
[06:00:24] datanois1: has joined #ruby
[06:00:40] Radar: JSON or gtfo is also my opinion
[06:00:51] Exponent_: has joined #ruby
[06:01:03] Radar: Unfortunately these people are all Serious Business(tm) types and due to the fact that they wear suits to work every day they need to only use XML
[06:01:22] baweaver: Well I have a solution for you Radar
[06:01:26] baweaver: Both of you can get what you want
[06:01:37] Radar: Use JSON? :D
[06:01:45] Radar: Or are you going to link to that JSON-as-XML service?
[06:01:57] baweaver: ACTION backspaces link
[06:02:17] hahuang61: has joined #ruby
[06:02:20] noethics: one of my clients uses a "web service" that uploads an xml document once a day via ftp to their server, containing ALL of their data. every time. it takes like a minute to parse
[06:02:44] baweaver: Radar: http://www-01.ibm.com/support/knowledgecenter/SS9H2Y_7.0.0/com.ibm.dp.xi.doc/json_jsonxconversionexample.html
[06:03:17] JohnBat26: has joined #ruby
[06:03:17] mrsolo: has joined #ruby
[06:03:22] multi_io: has joined #ruby
[06:03:22] baweaver: everyone wins!
[06:03:31] Oog: has joined #ruby
[06:03:45] shevy: json and XML
[06:03:46] Radar: noethics: that was one of the options for integrating with these people
[06:03:50] shevy: isn't that painful?
[06:03:52] IanVorn: has joined #ruby
[06:03:52] baweaver: Mainly because the pesky JSON suggester quit while running and screaming for some reason
[06:03:58] Radar: We have opted instead to provide them with an endpoint that they upload XML to and then we parse it from there
[06:04:11] noethics: yeah it would be nice if that were an option
[06:04:34] noethics: i wish bson didnt have the whole mongodb stigma
[06:04:39] noethics: it's so superior
[06:06:10] pusewicz: has joined #ruby
[06:06:12] baweaver: There's a fragmentation joke in here somewhere.
[06:06:46] yardenbar: has joined #ruby
[06:07:21] chinmay_dd: has joined #ruby
[06:07:50] metallicrwr: has joined #ruby
[06:08:39] RegulationD: has joined #ruby
[06:08:53] DukeDave: has joined #ruby
[06:09:21] harleypig: has joined #ruby
[06:10:24] roolo: has joined #ruby
[06:10:27] vcoinminer: has joined #ruby
[06:10:48] Stan: has joined #ruby
[06:11:10] mroth: has joined #ruby
[06:11:39] avdi: has joined #ruby
[06:11:56] alol___: has joined #ruby
[06:11:56] jeregrine: has joined #ruby
[06:11:56] x0F: has joined #ruby
[06:12:04] ckrailo: has joined #ruby
[06:12:29] akahn: has joined #ruby
[06:13:10] kerunaru: has joined #ruby
[06:13:30] hahuang61: has joined #ruby
[06:13:49] shevy: and a tree joke
[06:14:05] bjeanes: has joined #ruby
[06:14:12] Frem: has joined #ruby
[06:14:18] bruno-: has joined #ruby
[06:14:41] huddy: has joined #ruby
[06:14:42] featheryahn_: has joined #ruby
[06:14:57] alxndr: has joined #ruby
[06:15:48] n0f3: has joined #ruby
[06:16:08] hellschreiber: has joined #ruby
[06:16:50] adambeynon: has joined #ruby
[06:17:38] j4cknewt: has joined #ruby
[06:17:58] Hanmac1: has joined #ruby
[06:17:59] commondream: has joined #ruby
[06:18:49] hahuang61: has joined #ruby
[06:18:52] revath: has joined #ruby
[06:19:27] railsraider: has joined #ruby
[06:19:34] Macaveli: has joined #ruby
[06:19:41] Maletor: has joined #ruby
[06:20:33] KnownSyntax: has joined #ruby
[06:21:11] pizzaops: has joined #ruby
[06:21:24] PhilK: has joined #ruby
[06:21:56] rushed: has joined #ruby
[06:22:17] towski_: has joined #ruby
[06:22:47] n1ftyn8: has joined #ruby
[06:23:36] krz: has joined #ruby
[06:25:33] ndrei: has joined #ruby
[06:25:43] bb010g: has joined #ruby
[06:26:08] greenride: has joined #ruby
[06:27:10] bmalum: has joined #ruby
[06:28:10] maZtah: has joined #ruby
[06:28:44] Macaveli: has joined #ruby
[06:28:45] greenride: has joined #ruby
[06:29:01] michael_mbp: has joined #ruby
[06:29:16] mdz_: has joined #ruby
[06:30:01] flughafen: sevenseacat: i figured out what the issue was... i didn't know I should set the javascript_driver to poltergeist
[06:30:11] sevenseacat: flughafen: ah hah
[06:30:17] culturelabs: has joined #ruby
[06:30:22] Seanzie: has joined #ruby
[06:30:22] amitchellbullard: has joined #ruby
[06:30:28] mrsolo: has joined #ruby
[06:30:38] flughafen: sevenseacat: now i'm trying to make our testsuite work with phantomjs
[06:31:07] cek: has joined #ruby
[06:31:09] shevy: poltergeist is a cool name
[06:31:11] deimos: has joined #ruby
[06:31:22] shevy: "a poltergeist is now haunting the flughafen in Berlin"
[06:31:45] flughafen: shevy: my day is now complete!
[06:31:55] Radar: http://knowyourmeme.com/memes/this-is-a-flammenwerfer-it-werfs-flammen
[06:31:59] Radar: reminds me of ^
[06:32:05] shevy: it werfs flammen
[06:32:08] shevy: that is also great
[06:32:37] shevy: proper german would be "wirft Flammen" btw, from "werfen"; to throw
[06:33:10] sevenseacat: I've seen the nebelwerfer one before
[06:33:10] flughafen: i like it when you speak deutsch to me
[06:33:21] sevenseacat: ACTION sucks at German and is learning Esperanto instead
[06:33:33] flughafen: ah, the language of espresso. good choice sevenseacat
[06:33:41] shevy: fog machine? Flammenwerfer is ok, Nebelwerfer is a bit weird... how do you throw fog...
[06:34:00] ecksit: has joined #ruby
[06:34:14] charles81: has joined #ruby
[06:34:24] flughafen: sevenseacat: https://www.youtube.com/watch?v=63Y5XjlO4vk
[06:34:38] zrl: has joined #ruby
[06:34:38] flughafen: shevy: how do you throw fire?
[06:34:39] tenderlove: has joined #ruby
[06:34:42] manveru: has joined #ruby
[06:34:52] bcavileer: has joined #ruby
[06:35:02] shevy: like that http://is3.myvideo.de/de/movie13/83/thumbs/5689165_1.jpg
[06:35:04] p1k: has joined #ruby
[06:35:15] flughafen: shevy: do you not know what a fog machine is?
[06:35:25] shevy: flughafen I only know what a Schneewerfer is
[06:35:26] sevenseacat: flughafen: i loled. 'shooting fish in a barrel....... wat?'
[06:35:33] beneggett: has joined #ruby
[06:35:35] shevy: it werfs Schnee
[06:35:36] balazs: has joined #ruby
[06:35:38] flughafen: http://www.antari.com/upload/pro_main/28_3.jpg
[06:35:42] sevenseacat: this is awesome
[06:35:44] jrunning_: has joined #ruby
[06:35:53] sevenseacat: I am genuinely laughing out loud
[06:35:56] shevy: this werfs Nebel
[06:36:11] flughafen: now it makes sense that it didn't make sense to you
[06:36:13] shevy: I am looking for something that werfs Cats
[06:36:23] sevenseacat: i have the fish, why am i putting them in a barrel?
[06:36:27] flughafen: katzenwerfer
[06:37:04] sevenseacat: I am so gonna watch all of these
[06:37:17] shevy: this may be a catapult http://goo.gl/6NcSSe
[06:37:23] ballPointPenguin: has joined #ruby
[06:37:41] flughafen: haha sevenseacat
[06:38:33] sevenseacat: this guy is a legend
[06:38:33] mc_fail: has joined #ruby
[06:38:39] micmus: has joined #ruby
[06:38:41] flughafen: shevy: you might like the video too
[06:39:01] hahuang61: has joined #ruby
[06:39:02] shevy: linux is pretty cool
[06:39:05] shevy: it has a command for cats
[06:39:11] dumdedum: has joined #ruby
[06:39:16] rfv: has joined #ruby
[06:39:26] petems: has joined #ruby
[06:39:26] sevenseacat: https://www.youtube.com/watch?v=drJFtBBqh80&list=PL48258D69C3DD1228 ahhh a whole playlist of them
[06:39:27] djbender: has joined #ruby
[06:39:36] spastorino: has joined #ruby
[06:41:26] psye: has joined #ruby
[06:41:33] skmp: has joined #ruby
[06:42:05] baweaver: https://twitter.com/BoingBoing/status/607746423732498432 - This makes that fog machine so much more awesome
[06:42:49] flughafen: baweaver: there was a survey done and something like 60% of americans thought bad weather could affect the cloud\
[06:43:12] baweaver: This does not surprise me unfortunately
[06:43:52] baweaver: Though to be fair it can affect it
[06:44:32] baweaver: One good flood that breaks in, a well timed lightning strike, a tornado that takes out the power in the area or flat out levels the place
[06:44:39] baweaver: lot of fun can happen
[06:45:10] cstrahan: has joined #ruby
[06:45:41] allomov: has joined #ruby
[06:45:53] ndrei: has joined #ruby
[06:46:28] shevy: sevenseacat this accent is so awful, how can you listen!
[06:46:38] sevenseacat: its hilarious
[06:46:42] ramblinpeck_: has joined #ruby
[06:46:44] MiracleBlue: has joined #ruby
[06:46:47] sevenseacat: ACTION still watching
[06:47:05] sevenseacat: 'the rule of elevators, do not toot in the elevator, so the rule of the internet, you say bae?'
[06:47:47] baweaver: Oh, people can be endorsed for Awesomeness on LinkedIn now
[06:48:02] sevenseacat: you can endorse people for anything you want
[06:48:04] chrisseaton: has joined #ruby
[06:48:09] sevenseacat: I think Radar has been endorsed for ukelele or something?
[06:48:22] Radar: That's because I'm AWESOME at Ukulele
[06:48:33] bahar: has joined #ruby
[06:48:35] flughafen: Radar: youtube?
[06:49:02] troter___: has joined #ruby
[06:49:02] Jandre: has joined #ruby
[06:49:07] baweaver: https://www.linkedin.com/in/keystonelemur - If people want to contribute to my awesome score
[06:49:19] GriffinHeart: has joined #ruby
[06:49:34] baweaver: Magic internet points make the world go round
[06:49:44] allenn: has joined #ruby
[06:50:26] Radar: flughafen: not that awesome :)
[06:51:02] codecop: has joined #ruby
[06:51:03] baweaver: ACTION has youtube videos of guitar/singing
[06:51:15] baweaver: ACTION still isn't that great
[06:51:20] GriffinHeart: has joined #ruby
[06:51:27] shevy: hmm if I have a hash with 50 elements, and I wish to randomly pick 5 entries (key -> value pairs), what would be a good way? for an Array, I could use .sample 5x times
[06:51:29] flughafen: hey Radar did you know baweaver won best in show at the midwest hackathon?
[06:51:40] Radar: I didn't know that.
[06:51:43] ta: has joined #ruby
[06:51:48] shevy: the beaver is a legendary ruby hacker?
[06:52:23] Radar: shevy: >> { :one => "one" }.to_a.sample(5)
[06:52:24] AdamMeghji: has joined #ruby
[06:52:27] baweaver: I'll take Ruby and Hacker, legendary I still have a ways there.
[06:52:45] sinkensabe: has joined #ruby
[06:53:26] flughafen: baweaver: i'll endorse you as legendary on linkedin
[06:53:49] baweaver: ACTION checks to see if he can add that as a skill
[06:54:04] pengin: has joined #ruby
[06:54:29] shock_one: has joined #ruby
[06:55:06] hubcaps: has joined #ruby
[06:55:06] hubcaps: has joined #ruby
[06:55:13] flughafen: we have linux in common
[06:55:42] fabrice31: has joined #ruby
[06:56:00] baweaver: I end up in a lot of odd spots somehow. I mentioned offhandedly that I knew Scala and now I'm the one giving talks and presentations on it and usage in Spark.
[06:56:07] roqo: has joined #ruby
[06:56:20] andikr: has joined #ruby
[06:56:26] shevy: Radar cool thanks
[06:57:15] shevy: flughafen do you understand "Fettes Brot" in the song "nordish by nature"?
[06:57:45] baweaver: US Hackathons are awesome though, top prizes normally walk off with ~$5000 in prizes
[06:57:57] baweaver: redundant is redundant
[06:58:03] flughafen: shevy: i'm looking at the lyrics now.
[06:58:09] baweaver: well if that's not a sign to go to sleep already
[06:58:26] sevenseacat: ACTION still watching videos
[06:58:37] shevy: flughafen haha that's cheating! :D
[06:59:04] flughafen: I will not take responsibility for sevenseacat losing productivity or not playing eso
[06:59:16] shevy: "um die de Norden antokieken"
[07:00:16] bmalum: has joined #ruby
[07:00:26] hahuang65: has joined #ruby
[07:00:37] flughafen: i don't get antokieken?
[07:01:02] DEA7TH_: has joined #ruby
[07:01:56] mello: has joined #ruby
[07:01:56] mello: has joined #ruby
[07:02:27] jpinnix______: has joined #ruby
[07:02:47] metallicrwr: has joined #ruby
[07:02:57] strmpnk: has joined #ruby
[07:03:30] fujimura: has joined #ruby
[07:03:54] tonini: has joined #ruby
[07:03:56] revath: has joined #ruby
[07:04:03] shevy: me neither
[07:04:14] grubernaut: has joined #ruby
[07:04:20] shevy: without the lyrics I wouldn't understand anything, save for the "regular" german
[07:04:24] Neomex_: has joined #ruby
[07:04:36] glowcoil: has joined #ruby
[07:04:41] shevy: Ik krakeel veel platt in dat mikrofon
[07:04:44] existensil: has joined #ruby
[07:04:49] shevy: krakeel :D man ...
[07:04:58] shevy: this is right from Cthulhu
[07:05:04] [diecast]: has joined #ruby
[07:05:10] knowtheory: has joined #ruby
[07:05:12] yaogwai: has joined #ruby
[07:05:23] kapowaz: has joined #ruby
[07:05:27] Guest85414______: has joined #ruby
[07:06:18] cbetta: has joined #ruby
[07:06:21] skyrocker: has left #ruby: ()
[07:06:46] sonOfRa: has joined #ruby
[07:06:55] ec: has joined #ruby
[07:07:01] mister_solo: has joined #ruby
[07:07:55] Hounddog: has joined #ruby
[07:09:21] troulouliou_dev: has joined #ruby
[07:09:44] astrobunny: has joined #ruby
[07:09:48] pmarreck: has joined #ruby
[07:10:03] certainty: so #ruby-lang is mostly dead?
[07:10:30] sevenseacat: it redirects here now
[07:10:31] certainty: flughafen: anzuschauen
[07:10:37] certainty: sevenseacat: cool
[07:10:42] tsujp: has joined #ruby
[07:10:52] Iskarlar: has joined #ruby
[07:11:13] apeiros: certainty: s/mostly//, ftfy
[07:11:18] flughafen: hey certainty
[07:11:21] krainboltgreene: has joined #ruby
[07:11:23] hakunin: has joined #ruby
[07:11:43] im0b: has joined #ruby
[07:12:01] sinpai9090: has joined #ruby
[07:12:20] mhoungbo: has joined #ruby
[07:12:30] Zai00: has joined #ruby
[07:12:33] solars: has joined #ruby
[07:12:39] sinpai9090: has left #ruby: ()
[07:12:47] neersighted: has joined #ruby
[07:12:53] jlyndon: has joined #ruby
[07:12:56] jack_rabbit: has joined #ruby
[07:13:15] poikon: has joined #ruby
[07:13:35] baweaver: well, bed for me
[07:13:55] blackmesa: has joined #ruby
[07:14:05] mister_s_: has joined #ruby
[07:14:17] sinpai9: has joined #ruby
[07:14:40] krz: has joined #ruby
[07:15:02] HashNuke: has joined #ruby
[07:15:32] sinpai9: has left #ruby: ()
[07:15:35] Rubie: has joined #ruby
[07:15:42] whoojemaflip: has joined #ruby
[07:15:43] cardoni: has joined #ruby
[07:15:52] fabrice31: has joined #ruby
[07:16:15] DoubleMalt: has joined #ruby
[07:16:36] firevolt: has joined #ruby
[07:17:02] zero7: has joined #ruby
[07:17:14] neektza: has joined #ruby
[07:17:51] zzak: has joined #ruby
[07:17:54] tenderlove: has joined #ruby
[07:18:56] shelling__: has joined #ruby
[07:18:59] failshell: has joined #ruby
[07:19:05] kwd: has joined #ruby
[07:19:29] akitada: has joined #ruby
[07:19:37] tubuliferous_: has joined #ruby
[07:20:05] jas02: has joined #ruby
[07:20:05] Contigi: has joined #ruby
[07:20:13] jgt1: has joined #ruby
[07:20:14] poguez_: has joined #ruby
[07:20:29] Macaveli: has joined #ruby
[07:20:30] ggherdov: has joined #ruby
[07:21:43] rflot: has joined #ruby
[07:21:59] dmoe: has joined #ruby
[07:22:35] andrewstewart: has joined #ruby
[07:23:31] fujimura_: has joined #ruby
[07:23:43] machty: has joined #ruby
[07:24:56] bkxd: has joined #ruby
[07:25:12] Polysics: has joined #ruby
[07:25:25] yo61: has joined #ruby
[07:25:43] parduse: has joined #ruby
[07:25:57] mjc_: has joined #ruby
[07:26:20] frankS2: has joined #ruby
[07:26:37] certainty: apeiros: yeah i read your tweet yesterday. That's why i was asking. Alright
[07:27:05] Wobbley: has joined #ruby
[07:27:06] niitotantei: has joined #ruby
[07:27:07] holsee_: has joined #ruby
[07:27:08] bahar: has joined #ruby
[07:27:15] dhjondoh: has joined #ruby
[07:27:23] AlexRussia: has joined #ruby
[07:27:58] flughafen: you guys tweet with each other? nobody tweets with me :(
[07:28:27] certainty: flughafen: what's your twitter handle?
[07:28:38] flughafen: certainty: i don't have twitte
[07:28:58] thesheff17: has joined #ruby
[07:28:59] Hanmac: has joined #ruby
[07:29:13] jack_rabbit: has joined #ruby
[07:29:15] hubcaps: how can you expect anyone to tweet you if you don't have a twitter? how can you eat your pudding if you don't eat your meat?
[07:29:30] sevenseacat: "yolo? yo-no!"
[07:29:34] certainty: flughafen: that i can'n help you :p
[07:29:43] bove: has joined #ruby
[07:30:21] benlakey: has joined #ruby
[07:30:50] Xeago: has joined #ruby
[07:31:09] lancetw: has joined #ruby
[07:32:03] flughafen: sevenseacat: still?
[07:32:18] jmcc: has joined #ruby
[07:32:20] Forgetful_Lion: has joined #ruby
[07:32:21] sevenseacat: I'm only up to video 23 of 75!
[07:32:32] mrsolow: has joined #ruby
[07:32:47] sandstrom: has joined #ruby
[07:32:50] daxroc: has joined #ruby
[07:32:51] preyalone: has joined #ruby
[07:34:10] vdamewood: has joined #ruby
[07:34:17] brb3: has joined #ruby
[07:34:44] Ox0dea: sevenseacat: Do you happen to watch Game of Thrones?
[07:35:02] Ox0dea: You are in for such a treat.
[07:35:03] bmalum: has joined #ruby
[07:35:11] flughafen: last episode was brutal
[07:35:23] Ox0dea: sevenseacat: https://www.youtube.com/watch?v=xCM_P1rfXSc
[07:35:28] Ox0dea: Flula + GoT = <3
[07:35:46] certainty: that reminds me: http://uploads.neatorama.com/images/posts/365/59/59365/1364179608-0.jpg
[07:36:12] ki0: has joined #ruby
[07:36:21] exadeci: has joined #ruby
[07:37:22] prosodyContext: has joined #ruby
[07:38:00] bronson: has joined #ruby
[07:38:05] sevenseacat: aw shit this guy is a pisser
[07:38:10] saintcajetan: has joined #ruby
[07:38:42] surrounder: certainty: haha nice one
[07:38:47] Kharma: has joined #ruby
[07:39:15] surrounder: certainty: http://imgur.com/gallery/cuMOQeX :D
[07:40:39] phutchins: has joined #ruby
[07:40:40] edwinvdgraaf: has joined #ruby
[07:40:45] Guest5307: has joined #ruby
[07:41:20] k3asd`: has joined #ruby
[07:41:31] Guest12375: has joined #ruby
[07:41:32] sevenseacat: gonna save the rest of the vids for later
[07:41:40] nmyster: has joined #ruby
[07:42:12] greenride: has left #ruby: ()
[07:42:18] tesuji: has joined #ruby
[07:42:31] zipkid: has joined #ruby
[07:42:59] nso95: has joined #ruby
[07:43:08] countryHick: has joined #ruby
[07:43:18] pskosinski: has joined #ruby
[07:43:21] al2o3-cr: has joined #ruby
[07:44:06] flughafen: sevenseacat: quitter!
[07:45:28] Kedare: has joined #ruby
[07:46:17] Heero: has joined #ruby
[07:46:36] bestie: has joined #ruby
[07:46:58] tvw: has joined #ruby
[07:50:39] jxf: has joined #ruby
[07:50:57] alekst_: has joined #ruby
[07:51:11] ur5us: has joined #ruby
[07:51:19] ur5us: has joined #ruby
[07:53:55] vikram___: has joined #ruby
[07:54:15] bmalum: has joined #ruby
[07:54:18] Scroff: has joined #ruby
[07:55:10] charliesome: has joined #ruby
[07:55:25] jack_rabbit: has joined #ruby
[07:55:35] unshadow: has joined #ruby
[07:55:49] ghr: has joined #ruby
[07:56:00] michael_mbp: has joined #ruby
[07:57:25] olistik: has joined #ruby
[07:57:32] RegulationD: has joined #ruby
[07:58:27] al2o3-cr: has joined #ruby
[08:00:01] rdark: has joined #ruby
[08:01:27] bttf: has joined #ruby
[08:02:49] ndrei: has joined #ruby
[08:03:01] yoongkang: has joined #ruby
[08:03:05] coderkevin: has joined #ruby
[08:03:12] epistrephein: has joined #ruby
[08:05:19] stardiviner: has joined #ruby
[08:05:20] mikecmpbll: has joined #ruby
[08:05:25] bruno-: has joined #ruby
[08:07:10] autrilla: has joined #ruby
[08:07:24] balazs: has joined #ruby
[08:08:47] mdz_: has joined #ruby
[08:10:13] nateberkope: has joined #ruby
[08:10:52] iamdevnul: has joined #ruby
[08:11:53] chris-sonar: has joined #ruby
[08:12:15] t-richards: has joined #ruby
[08:12:25] arta82: has joined #ruby
[08:12:26] skandi: has joined #ruby
[08:13:37] troulouliou_dev: has joined #ruby
[08:13:43] ahmetkapikiran: has joined #ruby
[08:14:23] Lloyd: has joined #ruby
[08:15:00] flughafen: ACTION sighs
[08:15:21] auzty: has joined #ruby
[08:15:29] bkxd: has joined #ruby
[08:16:08] chthon: has joined #ruby
[08:16:13] hahuang65: has joined #ruby
[08:16:17] IanVorn: has joined #ruby
[08:17:28] kevkev: has joined #ruby
[08:17:40] mello: has joined #ruby
[08:17:47] axl_: has joined #ruby
[08:17:53] plashchynski: has joined #ruby
[08:18:07] codeitagile: has joined #ruby
[08:18:17] krz: has joined #ruby
[08:18:30] michael_mbp: has joined #ruby
[08:18:49] hoey: has joined #ruby
[08:20:43] Exponential: has joined #ruby
[08:21:25] chussenot: has joined #ruby
[08:21:35] willharrison: has joined #ruby
[08:22:06] shevy: flughafen trouble in Berlin again?
[08:23:54] livathinos: has joined #ruby
[08:24:29] pepperbreath: has joined #ruby
[08:25:17] lkba: has joined #ruby
[08:25:29] flughafen: no eh, i didn't set the browser to phantomjs, so i wasted a lot of time doign tests against firefox
[08:25:48] n008f4g_: has joined #ruby
[08:26:05] blue_deref: has joined #ruby
[08:26:46] bluOxigen: has joined #ruby
[08:27:03] A205B064: has joined #ruby
[08:30:04] lordkryss: has joined #ruby
[08:31:12] alphaatom: has joined #ruby
[08:31:13] fgo: has joined #ruby
[08:31:21] olistik: has joined #ruby
[08:32:23] ahmetkapikiran: has joined #ruby
[08:32:31] alphaatom: has joined #ruby
[08:32:37] GriffinHeart: has joined #ruby
[08:33:16] cvtsx: has joined #ruby
[08:33:46] arup_r: has joined #ruby
[08:34:06] GriffinHeart: has joined #ruby
[08:34:21] bmalum: has joined #ruby
[08:34:37] axl_: has joined #ruby
[08:35:54] ndrei: has joined #ruby
[08:36:05] joonty: has joined #ruby
[08:37:51] _jesterfraud_: has left #ruby: ("Leaving")
[08:38:06] terlar: has joined #ruby
[08:38:16] jesterfraud: has joined #ruby
[08:38:47] jesterfraud: huh, weird, I couldn't change my nick and reidentify because I was banned in this channel O.o
[08:38:53] GriffinHeart: has joined #ruby
[08:38:57] bruno-: has joined #ruby
[08:40:11] yaogwai: has joined #ruby
[08:40:46] jhass: jesterfraud: huh?
[08:41:03] c0m0: has joined #ruby
[08:41:56] jesterfraud: jhass, I was _jesterfraud_ due to dis/reconnecting
[08:42:09] jesterfraud: tried to change nick, server told me I couldn't because I was banned in this channel
[08:42:23] jesterfraud: so I had to quit this channel, re nick, identify, rejoin
[08:42:49] jesterfraud: IRC hates me?
[08:43:23] jhass: I kinda fail to see anything matching your mask
[08:43:40] jesterfraud: could it have simply been that I wasn't ident'd?
[08:43:42] jhass: btw we have #ruby-banned that you can always join for stuff like that
[08:43:43] sevenseacat: the server is a bit weird sometimes.
[08:43:56] jesterfraud: sevenseacat, affirmative
[08:44:13] jesterfraud: freenode, must be written in node, explains everything ;)
[08:44:33] bin_005: has joined #ruby
[08:45:15] A205B064: has joined #ruby
[08:45:39] jesterfraud: so this channel technically doesn't have ops?
[08:45:49] ruboto: To call for ops use the !ops command.
[08:45:53] ruboto: fflush, apeiros, banisterfiend, seanstickle, Mon_Ouie, Radar, zzak, Havenn, jhass, sevenseacat, miah, workmad3, Coraline, drbrain, zenspider, slyphon, rubyhacker1, Aria, ljarvis
[08:45:55] jesterfraud: or is there a channel mode that hides those stati?
[08:45:56] apeiros: jesterfraud: this channel is not the place to discuss ops stuff
[08:46:04] sevenseacat: aaand I just tagged them all. oops.
[08:46:08] ljarvis: WHERE'S THE DANGER
[08:46:10] jesterfraud: sorry, was only curious
[08:46:20] jesterfraud: sevenseacat xD
[08:46:32] pyon: has joined #ruby
[08:46:42] apeiros: sevenseacat: my fault. jhass made a patch to only query online ops and I still haven't released it :(
[08:47:13] jds: has joined #ruby
[08:47:31] jhass: jesterfraud: freenode recommends to not permanently display op status
[08:47:33] sevenseacat: jesterfraud: but yeah, we're supposed to use ruboto for all that kind of stuff :)
[08:49:34] jesterfraud: ruboto always makes me think of the font
[08:49:45] krz: has joined #ruby
[08:49:48] jesterfraud: anyway, back to lurking.
[08:49:54] yorickpeterse: what's wrong about a clearly visible police force at all times?
[08:50:54] Flemzord: has joined #ruby
[08:51:57] plashchynski: has joined #ruby
[08:51:57] jhass: 1) you bait the trolls to focus on you 2) in normal discussions some people react differently to you because "authority"
[08:52:36] anisha: has joined #ruby
[08:53:23] shevy: yorickpeterse I shoot them down!
[08:54:42] jhass: yorickpeterse: for reference http://freenode.net/channel_guidelines.shtml 6 & 7
[08:54:52] tsujp: has joined #ruby
[08:56:59] jesterfraud: I've seen sevenseacat ban someone before. It still haunts my dreams.
[08:57:08] shevy: sevenseacat is a killer cat, no doubt about it
[08:57:19] jesterfraud: (s)he was in the room for all of ten seconds
[08:57:29] jesterfraud: and was never seen again
[08:57:43] shevy: it's one idling cat at times for sure
[08:58:07] jesterfraud: http://idling.cat/ has nothing, not sure if sad or genius
[08:58:17] shevy: it's weird insofar that some people are like permanently connected; and some people log out when they sleep, and reconnect when they are awake again
[08:58:52] shevy: hi my french connection!
[08:59:02] DaniG2k: has joined #ruby
[08:59:09] jesterfraud: I bet adaedra has sweet armour
[08:59:12] sevenseacat: if I'm in the channel, I'm generally sitting at my PC. I do ignore IRC most of the time though, or I'd never get any work done.
[08:59:18] adaedra: How's my stereotypy Austrian?
[08:59:37] mikecmpbll: how very dare you ignore us.
[08:59:39] doerteDev: has joined #ruby
[09:00:35] shevy: adaedra I am very atypical!
[09:00:44] adaedra: Best way to hide all trolls!
[09:00:56] jgoyon: has joined #ruby
[09:01:11] jhass: adaedra: uhm /mode +D might be easier
[09:01:13] bahar: has joined #ruby
[09:01:25] jhass: don't have to configure each client
[09:03:38] Jandre: has joined #ruby
[09:05:13] marr: has joined #ruby
[09:05:55] mdw: has joined #ruby
[09:06:01] fabrice31_: has joined #ruby
[09:06:26] yfeldblum: has joined #ruby
[09:07:41] failshell: has joined #ruby
[09:07:48] tubuliferous_: has joined #ruby
[09:08:09] fabrice31_: has joined #ruby
[09:08:11] Rubie: has joined #ruby
[09:10:28] LJT: has joined #ruby
[09:10:37] khebbie: has joined #ruby
[09:11:00] yorickpeterse: jhass: *wooooosh*
[09:12:02] aapole: has joined #ruby
[09:12:23] afrianska: has joined #ruby
[09:12:25] msgodf: has joined #ruby
[09:12:34] sandstrom: has joined #ruby
[09:13:32] tesuji: has joined #ruby
[09:15:52] blackmesa: has joined #ruby
[09:16:08] timonv: has joined #ruby
[09:17:16] dseitz: has joined #ruby
[09:17:22] yfeldblum: has joined #ruby
[09:17:40] mrsolo: has joined #ruby
[09:17:45] Juanchito: has joined #ruby
[09:17:54] DoubleMalt: has joined #ruby
[09:18:16] arup_r: has joined #ruby
[09:18:40] olistik_: has joined #ruby
[09:19:01] bmalum: has joined #ruby
[09:20:10] krz: has joined #ruby
[09:21:00] adaedra: irc: exit: Command not found
[09:22:12] edwinvdgraaf: has joined #ruby
[09:22:53] multi_io: has joined #ruby
[09:23:18] jgt1: has joined #ruby
[09:23:30] withnale_: has joined #ruby
[09:24:00] krz: has joined #ruby
[09:26:00] arta82: has joined #ruby
[09:27:08] dmolina: has joined #ruby
[09:27:50] revath: has left #ruby: ()
[09:28:23] jesterfraud: what's the SSH code?
[09:30:38] jaycee_: has joined #ruby
[09:30:45] fujimura: has joined #ruby
[09:31:51] yoongkang: has joined #ruby
[09:32:35] flughafen: ctl+alt+fist
[09:32:36] fgo: has joined #ruby
[09:32:53] platzhirsch: has joined #ruby
[09:32:57] adaedra: jesterfraud: Return ~ .
[09:34:15] jesterfraud: adaedra, thanks, only learned about that yesterday
[09:34:51] al2o3-cr: has joined #ruby
[09:35:41] mhoungbo: has joined #ruby
[09:36:22] Soda: has joined #ruby
[09:38:11] pepperbreath: has joined #ruby
[09:38:57] Oog: has joined #ruby
[09:40:40] Scrofff: has joined #ruby
[09:42:35] Oog: has joined #ruby
[09:43:39] lkba: has joined #ruby
[09:45:40] atm0sphere: has joined #ruby
[09:45:57] olistik: has joined #ruby
[09:46:26] RegulationD: has joined #ruby
[09:48:23] ponga: has joined #ruby
[09:49:10] duncanm: has joined #ruby
[09:50:29] Palmer11: has joined #ruby
[09:50:32] starfox_sf: has joined #ruby
[09:50:50] bin_005: has joined #ruby
[09:50:55] commondream: has joined #ruby
[09:52:15] ringarin: has joined #ruby
[09:52:45] A205B064: has joined #ruby
[09:52:47] quimrstorres: has joined #ruby
[09:53:38] Miphix: has joined #ruby
[09:57:48] jgoyon___: has joined #ruby
[09:57:55] mary5030: has joined #ruby
[09:58:04] SouL_|_: has joined #ruby
[09:59:06] Exponential: has joined #ruby
[10:00:51] Xeago: has joined #ruby
[10:02:56] araujo: has joined #ruby
[10:04:32] Axilla: has joined #ruby
[10:04:56] hahuang65: has joined #ruby
[10:05:12] rodfersou: has joined #ruby
[10:05:13] seme: has joined #ruby
[10:05:48] plashchynski: has joined #ruby
[10:06:28] Xeago: has joined #ruby
[10:06:28] khebbie: has joined #ruby
[10:06:30] mello: has joined #ruby
[10:06:41] Scroff: has joined #ruby
[10:06:49] iamninja: has joined #ruby
[10:08:48] balazs: has joined #ruby
[10:09:24] Iskarlar: has joined #ruby
[10:09:59] Darkwater: having some issues with passenger
[10:10:04] Darkwater: (using nginx)
[10:10:20] Darkwater: I've got a simple-ish sinatra app serving some data, that data is updated in the background in a thread
[10:10:58] Darkwater: so something like foo = 0; Thread.new { loop { foo = whatever; sleep 60; } }; get '/foo' { foo }
[10:11:27] Darkwater: works like I'd expect when run normally, but the value only updates once when I run it with passenger
[10:12:55] Darkwater: it feels like passenger is either spinning multiple instances or goes funky with threads
[10:13:13] wpp: has joined #ruby
[10:13:13] Darkwater: actually I think the process just stopped, or at least the thread did
[10:13:28] Darkwater: I put `echo things > /tmp/blah` in the thread loop and it's not being called anymore
[10:14:57] sandstrom: has joined #ruby
[10:14:58] meph: has joined #ruby
[10:17:15] rht: has joined #ruby
[10:17:22] wprice: has joined #ruby
[10:20:27] rickmasta: has joined #ruby
[10:21:34] sarkyniin: has joined #ruby
[10:21:38] apeiros: Darkwater: threads die silently by default
[10:21:56] Darkwater: is that passenger's doing or is that a thing from ruby?
[10:22:00] mrsolo: has joined #ruby
[10:22:00] apeiros: Darkwater: either `Thread.abort_on_exception = true` so it crashes the app loudly, or box your code block in begin/rescue
[10:22:04] apeiros: that's ruby.
[10:22:23] Darkwater: but wait, what is it dying on?
[10:22:23] jgoyon: has joined #ruby
[10:22:25] apeiros: >> Thread.new { 21 }.value # checking whether threading is active in eval-in
[10:22:26] ruboto: apeiros # => (https://eval.in/378180)
[10:22:31] Darkwater: it runs fine outside of passenger
[10:22:35] Darkwater: s/outside of/without
[10:22:39] apeiros: Darkwater: no idea
[10:22:53] apeiros: ah, and yes, passenger probably starts child processes
[10:22:58] ljarvis: guh llvm documentation frustrates me to hell
[10:23:00] apeiros: and child processes only take over the main thread
[10:23:13] Darkwater: is Thread.abort_on_exception global? ie. do I set it soutside the thread?
[10:23:24] apeiros: Darkwater: yes. you usually set it at app start
[10:23:51] apeiros: Darkwater: sadly can't demo in ruboto, but try in irb: `Thread.new do raise "You'll never see this" end`
[10:24:02] apeiros: then try again after setting Thread.abort_on_exception = true
[10:24:25] lxsameer: has joined #ruby
[10:25:08] Darkwater: hm, looks like that doesn't even work in pry
[10:25:11] Darkwater: tried in irb though, works there
[10:25:48] chinmay_dd: has joined #ruby
[10:27:15] apeiros: funny, I get an output error with pry???
[10:28:23] micmus: has joined #ruby
[10:28:46] alphaatom: has joined #ruby
[10:29:18] Darkwater: http://novaember.com/s/8f9453/WuHRZv.png
[10:29:50] plashchynski: has joined #ruby
[10:30:01] alphaatom: has joined #ruby
[10:31:38] fabrice31: has joined #ruby
[10:33:04] apeiros: Darkwater: well, try in pure ruby. i.e. save it to a file and run it :)
[10:33:12] LJT: has joined #ruby
[10:33:38] Scrofff: has joined #ruby
[10:33:43] Darkwater: yeah as I said, it works fine in irb
[10:34:05] arup_r: drive safe! :/ https://www.facebook.com/StanleyRobertsKRON4/videos/837957919558435/ request to all of you!
[10:35:01] Darkwater: fucking shit
[10:35:21] jhass: ljarvis: indeed
[10:35:48] jhass: I had an index of the C interface once, but never found it again
[10:36:22] ndrei: has joined #ruby
[10:37:23] stamina: has joined #ruby
[10:37:50] jerematic: has joined #ruby
[10:37:59] j4cknewt: has joined #ruby
[10:38:08] jhass: arup_r: wth... why do you post this...
[10:38:18] jhass: it's not even funny or anything
[10:38:51] arup_r: not fun.. I got shocked after seeing this... jhass:
[10:38:58] arup_r: pls drive safe.
[10:39:12] jhass: arup_r: so you want to shock other people?
[10:39:24] arup_r: no.. warn. be safe
[10:39:36] apeiros: there are tons of shocking videos on the internet. I don't think we want any of those in here.
[10:39:51] arup_r: well.. will rember.
[10:40:07] Darkwater: anyway, apeiros, the data is still not refreshed
[10:40:18] apeiros: 12:22 apeiros: ah, and yes, passenger probably starts child processes
[10:40:21] apeiros: 12:22 apeiros: and child processes only take over the main thread
[10:40:23] apeiros: Darkwater: ^
[10:40:23] arup_r: apeiros: if you have access remove the link..
[10:40:26] Darkwater: it runs at least five times, but the data is only updated once, at the very beginning
[10:40:30] arup_r: I wouldn't ever.
[10:40:34] apeiros: arup_r: that's not possible in irc.
[10:40:47] Darkwater: hm, what do you mean?
[10:41:07] Darkwater: I know for sure there's only one instance by the way
[10:41:08] troulouliou_dev: has joined #ruby
[10:41:15] Darkwater: I log something on start, it's only logged once
[10:41:39] apeiros: I don't know when/how passenger forks
[10:41:48] phutchins: has joined #ruby
[10:41:59] apeiros: I'd log $$ for every request. or use ps. or top. or htop.
[10:42:33] apeiros: I know it can do it after the start, given that it can preload a rails app. I'd assume it forks on rackapp.call
[10:42:35] JamesBrink: has joined #ruby
[10:43:21] lxsameer: has joined #ruby
[10:43:25] Darkwater: ah, logging pids is a good idea
[10:43:32] railsraider: has joined #ruby
[10:43:35] Darkwater: though it shouldn't matter
[10:45:56] Darkwater: hm, the start and loop log the same pid
[10:46:04] apeiros: that's expected
[10:46:10] apeiros: and the requests won't
[10:46:10] Darkwater: the requests have another one
[10:46:19] Darkwater: loop pid stays the same
[10:46:30] pcfreak30: has joined #ruby
[10:46:32] apeiros: and the requests don't have the loop either because as said, loop is in a thread which is not the main thread -> not carried over to children
[10:46:52] sdothum: has joined #ruby
[10:46:55] apeiros: there's an after-fork hook/callback in passenger iirc
[10:47:28] apeiros: so you can either start the loop in the children too, or you can use some sharing mechanism like memcached.
[10:47:34] jhass: though I'd consider running whatever you do externally and communicate over a DB/file/socket/whatever
[10:47:54] adaedra: I have a hash (i.e. { a: 1, b: 2, c: 3 }) and want to split it in two according to a list of keys to keep (so with [ :b ] would be { b: 2 } and { a: 1, c: 3 }). I have access to facets gem (so Hash#slice and Hash#slice!). What would be the best way of doing it?
[10:48:30] jhass: isn't there Hash#partition?
[10:48:31] Darkwater: I was almost going to extract it into a separate process like jhass suggests, but I jsut read about sinatra's configure block
[10:48:34] Darkwater: gonna try that first
[10:48:38] Guest30625: has joined #ruby
[10:48:49] rushed: has joined #ruby
[10:49:20] bluOxigen: has joined #ruby
[10:49:37] Guest30625: are there any ruby experts here? i'm looking for help on expressing a ruby code
[10:49:37] Guest30625: i want to read a JSON file, modify the values from key:value pairs and post the change to a url
[10:49:37] jhass: >> keys = %(a b); {a: 1, b: 2, c: 3, d: 4}.partition {|k, v| keys.include? k }
[10:49:38] ruboto: jhass # => no implicit conversion of Symbol into String (TypeError) ...check link for more (https://eval.in/378211)
[10:49:39] Guest30625: would anyone here be able to help me accomplish this challenge ... i would gladly appreciate it
[10:49:47] jhass: >> keys = %i(a b); {a: 1, b: 2, c: 3, d: 4}.partition {|k, v| keys.include? k }
[10:49:47] ruboto: jhass # => [[[:a, 1], [:b, 2]], [[:c, 3], [:d, 4]]] (https://eval.in/378212)
[10:49:49] adaedra: it's in Enumerable, so I guess I could work with it
[10:49:56] chinmay_dd: has joined #ruby
[10:49:58] rodfersou: has joined #ruby
[10:50:00] jhass: well, yeah, need to_h the result
[10:50:29] apeiros: jhass: that'd be what I called "sharing mechanism"
[10:50:44] CloCkWeRX: has joined #ruby
[10:50:44] jhass: apeiros: yeah, only read after :)
[10:50:46] Darkwater: meh never mind, I'll just extract it
[10:50:55] Darkwater: how should I run ruby daemons?
[10:51:04] Darkwater: is there something like forever for nodejs?
[10:51:37] apeiros: Darkwater: there's a daemonize gem
[10:51:37] jhass: I'd use in order of preference: systemd, daemontools, your init system, eye, god, monit, bluepill
[10:51:41] Darkwater: or is there a good way to start a daemon (if not already running) from my sinatra app?
[10:51:58] apeiros: and there's stuff in core by now to make daemonizing easier
[10:52:05] Guest30625: hey guys could anyone help me think through resolving a coding problem in ruby?
[10:52:14] ruboto: Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
[10:52:15] apeiros: Guest30625: your question is vague. please provide more details.
[10:52:20] jhass: meh, -1 to self daemoniziation
[10:52:41] Guest30625: sure let me explain
[10:52:47] Darkwater: still running upstart, and I'd rather not mess around with init systems right now
[10:53:24] jhass: Darkwater: daemontools would be my choice then
[10:53:53] yardenbar: has joined #ruby
[10:54:21] Darkwater: reminds me of a certain ISO mounting program :>
[10:54:37] Darkwater: is it ruby-specific? no idea where to look because of that
[10:54:38] jhass: talking about the djb stuff though ;)
[10:54:52] ccooke: jhass: don't say that name! ;-)
[10:54:58] ylla: has joined #ruby
[10:55:11] jhass: heh, the attitude is meh but the stuff works
[10:55:51] ccooke: Some of it works, although often not in ways I'd suggest.
[10:55:54] jhass: and I do enjoy his talks :P
[10:56:03] rht: has joined #ruby
[10:56:25] tubuliferous_: has joined #ruby
[10:56:25] failshell: has joined #ruby
[10:56:35] bkxd: has joined #ruby
[10:56:46] ccooke: The worst thing about djb is that he's actually made enough definitively positive contributions to outweigh his rather strange worldview and the mess of problems his software has caused :-)
[10:57:28] ccooke: (Particularly if you look at his contributions to security; he's worked on some important stuff)
[10:57:34] jhass: anyway, I just replaced daemontools with systemd because systemd is easier to use, daemontools didn't fail on me once though
[10:57:48] ccooke: But as a sysadmin, I will never forgive him for having to deal with qmail
[10:57:59] jhass: that might be true
[10:59:22] imperator: has joined #ruby
[10:59:24] ndrei: has joined #ruby
[10:59:25] imperator: good morning
[10:59:45] imperator: is there a way to silence the output of gem update --system? I tried -q and --no-document, didn't seem to do it
[11:01:48] ItSANgo: has joined #ruby
[11:03:37] jhass: well, then just >/dev/null I guess
[11:03:39] ljarvis: redirect it
[11:04:49] vdamewood: has joined #ruby
[11:05:19] afrianska: has joined #ruby
[11:05:52] rikkipitt: has joined #ruby
[11:06:24] symm-: has joined #ruby
[11:07:59] abirazor: has joined #ruby
[11:08:15] pepperbreath1: has joined #ruby
[11:08:50] flughafen: ACTION hates it when the package is in your town but doesn't get out for delivery
[11:09:48] arup_r1: has joined #ruby
[11:09:50] flughafen: they should lie to me and tell me it's somewhere else
[11:10:12] adaedra: You should suffer.
[11:10:35] flughafen: why meeee! why meeeee!
[11:10:54] arup_r__: has joined #ruby
[11:11:39] adaedra: I guess I'm the only one to get their deliveries in the 5 minutes I took going home to fetch something
[11:12:14] rickmasta: has joined #ruby
[11:12:35] revath1: has joined #ruby
[11:13:05] pepperbreath: has joined #ruby
[11:13:15] flughafen: adaedra: do they not accept them for you at work?
[11:13:32] adaedra: I was at school at this time
[11:13:34] flughafen: i ship all my stuff to work minus the heavy stuff like kitty litter
[11:13:40] bakednotfried: has joined #ruby
[11:13:55] dalafa: has joined #ruby
[11:14:03] kerunaru: has joined #ruby
[11:14:40] astrobunny: has joined #ruby
[11:14:44] Guest30625: hey guys ..here's the challenge i would like to know if it's doable
[11:14:47] Guest30625: class NewClass
[11:14:47] Guest30625: def initialize(id,name,notes,class,createdat)
[11:14:49] Guest30625: @name = name
[11:14:51] Guest30625: @notes = notes
[11:14:53] Guest30625: @room = room
[11:14:55] Guest30625: @createdat = created
[11:15:00] apeiros: !kick Guest30625 gist
[11:15:00] helpa: apeiros: No.
[11:15:01] ruboto: ruboto kicked Guest30625:
[11:15:01] ruboto: -o ruboto
[11:15:15] jhass: meh, weechat is slower? :P
[11:15:17] adaedra: too slow, jhass
[11:15:26] adaedra: too slow, adaedra
[11:15:48] apeiros: pm'ed about reason and that they can rejoin
[11:15:52] jhass: ACTION shall make a /flood macro
[11:16:01] apeiros: shall make !gist
[11:16:13] adaedra: ruboto could kick automatically for a large number of lines in short amount of time
[11:16:16] apeiros: I think I'll even add that on the current cinch base
[11:16:17] jhass: meh, you don't deploy stuff anyway, why bother :P
[11:16:25] startupality: has joined #ruby
[11:16:50] apeiros: right. clarifying. *I* shall make???
[11:16:57] ndrei: has joined #ruby
[11:17:31] Guest30625: has joined #ruby
[11:17:37] Guest30625: hey sorry all
[11:17:47] Guest30625: i was not aware of the rules here
[11:17:51] apeiros: we noticed
[11:18:07] yoongkang: has joined #ruby
[11:18:10] chinmay_dd: has joined #ruby
[11:18:32] Guest30625: here's the code i would like your help with using https://gist.github.com/pcajuste/9c9c60a820fa230013b0
[11:18:38] Guest30625: as suggested
[11:18:51] adaedra: we have a fact for this extension thing?
[11:19:19] bakednotfried: has joined #ruby
[11:19:35] jhass: ?gist_usage
[11:19:35] ruboto: To properly use gist, please enable syntax highlighting, either by choosing the language manually or by entering a proper filename. If you post multiple things, separate them into multiple files. If you have a Github account, please update your gist with new information instead of posting a new one.
[11:20:05] apeiros: Guest30625: `replace the ???value??? data` - which value data?
[11:20:26] apeiros: ah, I think I get it now
[11:20:40] jhass: good, I don't :D
[11:20:57] jhass: "bring as file" doesn't parse for me :P
[11:21:05] apeiros: >> require 'json'; @name = "name"; data = {"name" => @name}; JSON.dump(data)
[11:21:05] Guest30625: the @name, @id, @notes, @room and @created within the JSON
[11:21:06] ruboto: apeiros # => "{\"name\":\"name\"}" (https://eval.in/378245)
[11:21:13] apeiros: Guest30625: ^
[11:21:33] apeiros: you're already close. you'd build a ruby datastructure (a Hash), and use JSON.dump to convert it to JSON
[11:21:44] jhass: mmh, wasn't there something that you want to prefer to_json over JSON.dump?
[11:21:50] apeiros: the part with "as a file" I didn't really get either. you can use File.write to write your json string to a file
[11:22:27] imperator: jhass, i guess that will work (well, > $null for powershell)
[11:22:59] c355E3B: has joined #ruby
[11:23:38] Guest30625: i want the json hash to be file instead and change the values as i bring it in
[11:23:53] jhass: so reading not writing?
[11:24:25] tokik_: has joined #ruby
[11:24:29] apeiros: ACTION brb
[11:25:09] Guest30625: i would read the file and change the @id, @name values then post the new change
[11:25:20] ahmetkapikiran: has joined #ruby
[11:25:35] Guest30625: i'm trying to use resclient.post gem for that
[11:27:32] chinmay_dd: has joined #ruby
[11:28:54] Fooster: has joined #ruby
[11:29:08] Locke23rus: has joined #ruby
[11:29:26] auzty: has joined #ruby
[11:29:34] jgpawletko: has joined #ruby
[11:30:20] Locke23rus: has left #ruby: ()
[11:30:55] fabrice31: has joined #ruby
[11:31:49] kt2: has joined #ruby
[11:32:22] dgutierrez1287: has joined #ruby
[11:33:19] khebbie: has joined #ruby
[11:33:26] apt-get_: has joined #ruby
[11:34:05] Macaveli: has joined #ruby
[11:34:12] yoongkang: has joined #ruby
[11:34:29] fgo: has joined #ruby
[11:34:48] jcromartie: has joined #ruby
[11:35:17] RegulationD: has joined #ruby
[11:37:41] allomov: has joined #ruby
[11:38:18] justintv90: has joined #ruby
[11:38:43] mandarinkin: has joined #ruby
[11:39:15] starfox_sf: has joined #ruby
[11:39:20] arup_r: has joined #ruby
[11:39:54] niitotantei: has joined #ruby
[11:41:19] arup_r1: has joined #ruby
[11:42:38] bkxd: are there any gems that watch a folder / file and re-run every time it changes?
[11:43:04] iamninja: has joined #ruby
[11:43:24] jhass: bkxd: rb-fsevent -> listen -> god
[11:43:29] chussenot: has joined #ruby
[11:43:32] dorei: has joined #ruby
[11:43:34] jhass: in rising layers of abstraction
[11:43:55] jhass: eh, right
[11:44:03] jhass: that's what I wanted to write
[11:44:08] ljarvis: sounds like god
[11:44:10] jhass: and rb-inotify for linux
[11:44:11] ljarvis: if you say god like guard
[11:44:33] idafyaid: has joined #ruby
[11:44:45] bkxd: wierd i thought guard was for haskell
[11:44:48] ndrei: has joined #ruby
[11:46:27] Xzanron: has joined #ruby
[11:47:57] sandstrom: has joined #ruby
[11:49:01] chinmay_dd: has joined #ruby
[11:50:41] Xeago: has joined #ruby
[11:52:27] IanVorn: has joined #ruby
[11:53:15] chinmay_dd: has joined #ruby
[11:53:17] strixd: has joined #ruby
[11:53:41] chinmay_dd: has joined #ruby
[11:53:56] hahuang65: has joined #ruby
[11:55:17] mello: has joined #ruby
[11:57:27] TheHodge: has joined #ruby
[11:58:11] datanois1: has joined #ruby
[12:01:07] yqt: has joined #ruby
[12:01:12] alphaatom: has joined #ruby
[12:02:56] fabrice31: has joined #ruby
[12:03:02] Palmer11: has joined #ruby
[12:03:53] a346: has joined #ruby
[12:07:40] CloCkWeRX1: has joined #ruby
[12:13:35] ebbflowgo: has joined #ruby
[12:15:23] khebbie: has joined #ruby
[12:15:27] astrobunny: has joined #ruby
[12:15:38] bmalum: has joined #ruby
[12:15:57] AugustoCesar: has left #ruby: ("PONG :hobana.freenode.net")
[12:16:09] bahar: has joined #ruby
[12:16:18] flughafen: i use the py-ionotify but wasn't too happy with it
[12:16:30] ndrei: has joined #ruby
[12:17:06] sdothum: has joined #ruby
[12:18:00] lapide_viridi: has joined #ruby
[12:18:16] mase-chatter: has joined #ruby
[12:19:11] yaogwai: has joined #ruby
[12:19:16] strixd: has joined #ruby
[12:25:01] langlands: has joined #ruby
[12:26:31] ndrei: has joined #ruby
[12:27:25] papz: has joined #ruby
[12:27:25] ylla: Windows users... do you setup Ruby in a Linux VM or going native Windows? Best practice?
[12:27:53] Darkwater: I'd use a VM
[12:27:54] nickjj: ylla, i run vmware
[12:28:43] nickjj: it has a special mode where you can run it in such a way that it's like you're running both windows and linux together
[12:28:44] ylla: nickjj: I've used VMWare before but sometimes find it clunky. But you'd still recommend it over Windows?
[12:29:03] nickjj: when was the last time you used it?
[12:29:18] ylla: Two weeks ago? :)
[12:29:26] nickjj: i've tried everything over the years. virtualbox, vmware, dual booting, etc.
[12:29:30] ylla: Only Win7, though, isn't it? I'm using Win8.. because touchscreen
[12:29:44] nickjj: i run win 8 as a host with xubuntu as a guest through vmware
[12:30:00] ylla: oh that's quite brilliant
[12:30:24] ylla: I didn't know you could do that
[12:30:34] nickjj: yeah, in vmware it's called unity mode
[12:30:54] nickjj: it doesn't even feel like a vm is running, windows just appear normally
[12:30:54] Darkwater: http://status.novaember.com/load yay, things work! (ping apeiros)
[12:31:02] Darkwater: (0.00..0.02 is padding dummy data)
[12:31:03] ylla: I've been using nitrous.io for learning rails but... they limited the free account and I guess it's time to go local
[12:31:22] Darkwater: you could also get a cheap vps
[12:31:32] Darkwater: if you want to work online
[12:32:51] ylla: Darkwater: What would be the benefits of that? Assuming I will only ever use one computer
[12:33:05] Darkwater: then not much, apart from that it'll run 24/7 etc
[12:33:16] Darkwater: accessible for others without opening your ports
[12:33:40] nickjj: you can make your personal workstation temporarily accessible with ngrok
[12:33:48] nickjj: ngrok 3000 , done
[12:34:41] idafyaid: has joined #ruby
[12:35:11] bahar: has joined #ruby
[12:35:12] ylla: mm.. Well I have aws to share my more or less awful pet projects
[12:35:31] Blizzy: has joined #ruby
[12:35:51] niitotantei: has joined #ruby
[12:35:53] ylla: Darkwater: What's your setup?
[12:35:58] Scroff: has joined #ruby
[12:36:07] RegulationD: has joined #ruby
[12:36:28] ylla: nickjj: What were your reasons for selecting xubuntu?
[12:37:14] Hanmac1: my ubuntu does grap all stuff from other *buntus because i can ;P
[12:37:18] nickjj: it's a lot less bloated than the original ubuntu distro and i like the xfce window manager (the way the windows look)
[12:38:03] nickjj: all of the ubuntu guides you'll find will still work, it's still using ubuntu under the hood for the core of the os
[12:38:27] Darkwater: ylla: I got a decent vps that I also use for production websites
[12:38:35] Darkwater: novaember.com runs on it
[12:38:47] Darkwater: but it's also my dev machine for some things
[12:38:55] Darkwater: since I don't host anything really important on it
[12:39:24] Darkwater: I edit directly on the server though, I'm an avid vim user
[12:39:32] Darkwater: s/though/btw
[12:39:57] tokik_: has joined #ruby
[12:40:44] futilegames: has joined #ruby
[12:41:56] ylla: Which vps are you using?
[12:42:48] Rubie: has joined #ruby
[12:44:09] anisha: has joined #ruby
[12:44:57] tubuliferous_: has joined #ruby
[12:45:11] imperator: has joined #ruby
[12:45:29] symbol: has joined #ruby
[12:47:28] jcaho: has joined #ruby
[12:48:04] pothibo: has joined #ruby
[12:49:47] revoohc: has joined #ruby
[12:49:59] symbol: has joined #ruby
[12:50:23] malconis: has joined #ruby
[12:51:10] symbol: has joined #ruby
[12:51:22] malconis: has joined #ruby
[12:51:25] banister: has joined #ruby
[12:51:32] psye: has joined #ruby
[12:54:56] sgambino: has joined #ruby
[12:54:57] segfalt: has joined #ruby
[12:55:06] commondream: has joined #ruby
[12:55:11] jhooker: has joined #ruby
[12:55:46] tsvenson: has joined #ruby
[12:56:04] _aeris_: has joined #ruby
[12:57:58] failshell: has joined #ruby
[12:57:58] yfeldblum: has joined #ruby
[12:58:41] xenog: has joined #ruby
[12:59:47] davedev24_: has joined #ruby
[13:00:43] Scripore: has joined #ruby
[13:01:22] griffindy: has joined #ruby
[13:02:13] ruby-lang285: has joined #ruby
[13:02:13] Scroff: has joined #ruby
[13:02:17] ruby-lang285: hey there, guys!
[13:02:37] but3k4: has joined #ruby
[13:03:02] flughafen: i don't know why but when i read that I think of that guy from the goonies. "hey you guyyyyyysssssss"
[13:03:13] ruby-lang285: has left #ruby: ()
[13:03:21] jhass: you scared them away :(
[13:03:30] ruby-lang271: has joined #ruby
[13:03:34] flughafen: ha, awww no!
[13:03:59] flughafen: sloth was his name.
[13:04:05] startupality: has joined #ruby
[13:04:30] fabrice31_: has joined #ruby
[13:04:49] LJT: has joined #ruby
[13:04:55] ruby-lang271: can someone think of a simpler way of doing this? https://gist.github.com/cdb7b1a14f3e26d55641.git
[13:05:13] sevenseacat: has joined #ruby
[13:05:44] khebbie: has joined #ruby
[13:05:53] jhass: ruby-lang271: for future reference share the URL in your browser, not the clone URL ;)
[13:06:13] sem__: has joined #ruby
[13:06:21] Xeago: has joined #ruby
[13:06:32] jhass: in as isolated as that is, no. Might have something for the larger context though
[13:06:45] ytti: facemelting
[13:07:11] ytti: greetings from cyprus
[13:07:36] chinmay__: has joined #ruby
[13:07:37] fschuindt: has joined #ruby
[13:07:48] NeverDie: has joined #ruby
[13:08:03] fabrice31: has joined #ruby
[13:08:18] ylla: nickjj: I really like the unity solution
[13:08:22] zotherstupidguy: has joined #ruby
[13:08:34] atomical: has joined #ruby
[13:08:57] [1]abirazor: has joined #ruby
[13:09:04] GriffinHeart: has joined #ruby
[13:09:09] nickjj: ylla, yeah it's pretty good. it has a few occasional quirks but overall it's suitable for full time dev work
[13:09:20] ruby-lang271: the context looks pretty much the same
[13:09:35] jhass: ruby-lang271: figured, that'S why I said it ;)
[13:09:55] jhass: my typing skills have a bad day again :/
[13:10:09] jhass: ruby-lang271: so if you'd share some more...
[13:11:07] mdz_: has joined #ruby
[13:12:36] lxsameer: has joined #ruby
[13:13:03] pandaant: has joined #ruby
[13:13:11] n1x: has joined #ruby
[13:14:22] ruby-lang271: sorry, had to rename a few things in the code
[13:14:37] ruby-lang271: jhass, gist is the same, wanna have a look at it now? https://gist.github.com/jjsantos/cdb7b1a14f3e26d55641
[13:15:40] jhass: well, if you're repeating that pattern all over again in your code there might a way to DRY it up, but judging on the single line you show that's as good as it gets
[13:15:51] jhass: can't really say much with that amount of context, sorry
[13:16:14] astrobunny: has joined #ruby
[13:16:14] jhass: oh, wait, you updated it m(
[13:16:26] davidhq: has joined #ruby
[13:16:47] jhass: let's see
[13:17:37] anisha: has joined #ruby
[13:17:48] aryaching: has joined #ruby
[13:18:41] failshell: has joined #ruby
[13:18:45] sem__: hello, I'm beginner and student . I've a personal project to improve my skills (ruby, sinatra) and I 've some difficulties to parse a json string. Can somone help me in private message ? Thx
[13:18:53] zotherstupidguy: has joined #ruby
[13:19:08] torpor: has joined #ruby
[13:19:10] Darkwater: why private?
[13:19:14] bahar: has joined #ruby
[13:19:17] mary5030: has joined #ruby
[13:19:33] torpor: dumb ruby question: i want a buffer to be the sum total of three files using file.read .. how do i concatentate the reads from 3 different files?
[13:19:54] torpor: file1 = FILE.open("file1.txt")
[13:20:02] torpor: file2 = file.open("file2.txt")
[13:20:10] torpor: data = file1.read + file2.read
[13:20:12] torpor: ^^ is that how?
[13:20:29] Darkwater: I think filen.get(nil) is better
[13:20:33] Darkwater: should get the entire contents
[13:20:34] apeiros: torpor: File.read(a)+File.read(b)+File.read(c)
[13:20:40] torpor: okay it is just plain concat.
[13:20:41] mary5030: has joined #ruby
[13:20:42] oddmunds: a guess from the hip: data << file1 << file2
[13:20:50] apeiros: no point in using File#open if all you do is slurp the whole file.
[13:20:51] Darkwater: so many ways
[13:20:54] amystephen: has joined #ruby
[13:21:11] krz: has joined #ruby
[13:21:13] apeiros: note: slurping whole files is not advised if the files are potentially large.
[13:21:19] torpor: oh, i can just do: data = file.read("file.txt") + file.read("file2.txt")?
[13:21:29] torpor: (the files are not large.. 80 lines each max)
[13:22:04] apeiros: alternatively: data = [path_a, b, c].map { |path| File.read(path) }.inject(:+)
[13:22:12] torpor: hah hah, lol.
[13:22:15] jhass: ruby-lang271: http://paste.mrzyx.de/pmdkfnxa1 maybe not worth it for just two
[13:22:20] torpor: oddmunds' answer seems nicest.
[13:22:21] failshell: has joined #ruby
[13:22:21] Guest58610: has joined #ruby
[13:22:23] apeiros: if it'll always be 3 files, I'd stick with 3 times File.read
[13:22:28] torpor: btw, ruby-1.9. :)
[13:22:35] oddmunds: torpor: but it doesnt work :D
[13:22:45] torpor: yeah i thought so
[13:22:57] apeiros: torpor: yeah, 1.9 is relevant info. 2.2 is current.
[13:23:23] torpor: has to be 1.9
[13:23:30] jhass: sem__: don't worry about appearing as dumb or anything, just ask the channel ;)
[13:23:32] torpor: i'm hacking on it anyway now, thx
[13:23:50] ruby-lang271: jhass totally worth it!
[13:24:01] ruby-lang271: states the intention much better!
[13:24:32] oddmunds: torpor: how about `cat file1.txt > data.txt && cat file2.txt >> data.txt` ?
[13:24:36] ruby-lang271: I'm goinf to use a modified version of this, if you don't mind
[13:24:46] jhass: ruby-lang271: consider it public domain
[13:24:52] torpor: oddmunds: i want to do it in ruby
[13:25:01] oddmunds: to learn ruby?
[13:25:37] oddmunds: sometimes 'the ruby way' is to use the unix tools already there
[13:25:52] hinbody: has joined #ruby
[13:25:59] decoponio: has joined #ruby
[13:26:08] dudedudeman: has joined #ruby
[13:26:26] jhass: I wonder how ARGF does it
[13:26:36] dudedudeman: has joined #ruby
[13:26:49] jhass: do you have to restart the read for each file? I don't remember
[13:26:56] Xeago: has joined #ruby
[13:27:36] lavros: has joined #ruby
[13:27:36] dopie: has joined #ruby
[13:27:37] phat4life: has left #ruby: ("WeeChat 1.2")
[13:27:57] nertzy: has joined #ruby
[13:28:04] starfox_sf: has joined #ruby
[13:28:19] a346: has joined #ruby
[13:28:21] apeiros: with ARGF? no
[13:28:28] startupality_: has joined #ruby
[13:28:41] willharrison: oddmunds: if the guy wants to learn ruby by reimplementing a unix command I think that's a good idea
[13:28:43] apeiros: ARGF.gets/.read will read each input file and then stdin until stdin is closed.
[13:29:03] oddmunds: willharrison: yeah, i agree.
[13:29:34] jerius: has joined #ruby
[13:29:43] willharrison: oddmunds: ah ok I misunderstood then
[13:31:29] bigkevmcd: has joined #ruby
[13:31:35] mrchris: has joined #ruby
[13:31:51] sem__: @jhass thx
[13:32:37] thelastinuit: has joined #ruby
[13:33:50] banister: has joined #ruby
[13:34:05] thiagovsk: has joined #ruby
[13:34:31] freerobby: has joined #ruby
[13:35:59] Deck`: has joined #ruby
[13:36:04] ndrei: has joined #ruby
[13:36:42] torpor: ok it works and now i understand ruby enough to be able to ignore it and move on. thx!
[13:36:59] duggiefresh: has joined #ruby
[13:37:44] LJT_: has joined #ruby
[13:38:11] Seanzie: has joined #ruby
[13:40:47] aryaching: has joined #ruby
[13:40:52] Deck`: How to get difference between values of two hashes ? https://dpaste.de/JnKf
[13:41:00] mello: has joined #ruby
[13:42:19] IanVorn: has joined #ruby
[13:42:24] hahuang65: has joined #ruby
[13:42:29] jhass: Deck`: I think I'd go for result = h1.map.with_object({}) {|(k, v| result| result[k] = h2[k]-v }
[13:42:40] yqt: has joined #ruby
[13:42:48] agarie: has joined #ruby
[13:43:15] ljarvis: ACTION hands jhass a )
[13:43:44] jhass: ACTION thanks and hands ljarvis the superfluous | back
[13:43:47] ljarvis: also that wont work because b would be -4
[13:44:02] znz_jp: has joined #ruby
[13:44:17] ljarvis: LJT_: carry on
[13:44:25] ljarvis: you jelly?
[13:44:35] LJT_: ljarvis ???
[13:44:45] yorickpeterse: if I want to get drunk I can just grab some soju
[13:44:49] ljarvis: LJT_: i accidentally your name, please ignore
[13:44:57] LJT_: all good :)
[13:44:59] ljarvis: yorickpeterse: when are you back in the land of the home
[13:45:08] yorickpeterse: Friday evening
[13:45:13] havenwood: has joined #ruby
[13:45:16] yorickpeterse: kinda miss my own not-crappy wifi
[13:45:19] ljarvis: was this a vacay?
[13:45:21] apeiros: jhass: that'll run into troubles with key diffs
[13:45:30] niitotantei: Deck`: Hash#merge
[13:45:35] ljarvis: workation?
[13:45:42] ljarvis: niitotantei: that's not the same, read their code
[13:45:47] yorickpeterse: ljarvis: well I'm not working for $WORK
[13:45:48] jhass: niitotantei: Hash#merge won't result in their example result :/
[13:45:52] yorickpeterse: but I'm doing FOSS
[13:45:59] ljarvis: yorickpeterse: ah
[13:46:04] ljarvis: yorickpeterse: dat rust
[13:46:06] jhass: apeiros: can only work by the examples given...
[13:46:24] apeiros: jhass: true. information is vague. and your solution does fit the example.
[13:46:28] yorickpeterse: I'm not venturing into multi-threading land
[13:46:28] tkuchiki: has joined #ruby
[13:46:48] apeiros: jhass: but given the missing :c key I extrapolated that only common keys should be summed
[13:46:58] ljarvis: rust is the first language since c++ 10 years ago that i really find difficult to read
[13:47:12] jhass: and I extrapolated that the keyset of h2 is a superset of h1 :P
[13:47:16] ljarvis: i can write it.. but reading it? nup
[13:48:15] sevenseacat: ljarvis: isnt it usually the opposite >_>
[13:48:15] apeiros: jhass: yupp. valid. as said, vague info.
[13:48:24] ndrei: has joined #ruby
[13:48:39] ljarvis: sevenseacat: I'd assume so yeah, i guess i'm special :(
[13:48:47] bahar: has joined #ruby
[13:48:49] ellisTAA: has joined #ruby
[13:49:24] g0rx: has joined #ruby
[13:49:28] ellisTAA: i want to create a website that can pull up code and execute it. with my limited knowledge i was thinking i need an ide ??? is that true if so can i just embed one??
[13:49:32] shevy: it's often easier to understand what you just wrote, than reading something that you did not write or wrote years ago
[13:49:52] shevy: I had that a lot more with perl; ruby code on the other hand can be very readable
[13:49:54] sevenseacat: EllisTAA: what?
[13:50:07] sevenseacat: thats..... not a straightforward thing to do.
[13:50:11] jhass: EllisTAA: I'd suggest you don't run untrusted code if you have that level of questions
[13:50:17] ellisTAA: ha uh so i want to create a website that allows me to store my sourcecode and then let visitors execute it ???
[13:50:19] apeiros: EllisTAA: no, you can't embed an IDE into a website.
[13:50:26] sevenseacat: and will very likely lead to your entire server getting hosed.
[13:50:44] apeiros: you can develop a web-based IDE. but given your apparent knowledge, I think that's not realistic.
[13:50:47] ellisTAA: *dreams crushed* ok
[13:50:48] fgo: has joined #ruby
[13:51:04] jhass: nah, not crushed, put on hold
[13:51:12] jhass: you'll know when you can revisit it
[13:51:14] adaedra: go step by step
[13:51:32] CloCkWeRX: has joined #ruby
[13:52:20] MasterPiece: has joined #ruby
[13:53:30] DoubleMalt: has joined #ruby
[13:53:31] jhass: that said of the roughly 400 people that've been to http://carc.in nobody tried to really break it so far, it's quite disappointing
[13:54:57] bmalum: has joined #ruby
[13:55:14] axl_: has joined #ruby
[13:55:27] yorickpeterse: bah, it handles fork bombs
[13:55:32] yorickpeterse: as if somebody thought about it
[13:55:59] jhass: and it's only the second fork bomb!
[13:56:09] jhass: the first one was a shell one that failed to execute
[13:56:14] umgrosscol: has joined #ruby
[13:57:03] ellisTAA: what???s a fork bomb
[13:57:11] fujimura: has joined #ruby
[13:57:19] CloCkWeRX1: has joined #ruby
[13:57:21] jhass: but I mean I allow to run C and don't even see the known privilege escalation thingies
[13:57:32] edmagne: has joined #ruby
[13:57:46] edmagne: has left #ruby: ()
[13:57:51] jhass: EllisTAA: a process that clones itself in an infinite loop consuming all system resources
[13:57:58] shevy: the zombie mother
[13:58:41] chinmay_dd: has joined #ruby
[13:59:54] g0rx_: has joined #ruby
[13:59:56] g0rx_: has left #ruby: ()
[14:00:05] yorickpeterse: jhass: I take it this runs under a VM/container/cgroups?
[14:00:12] zombirx: has joined #ruby
[14:00:21] zombirx: any ruby coder ?
[14:00:32] yorickpeterse: cbf h4x0ring it
[14:00:37] jhass: yorickpeterse: https://github.com/thestinger/playpen
[14:01:01] mdz_: has joined #ruby
[14:01:04] jhass: zombirx: no, we're 1000 geologists
[14:02:07] chinmay_dd: has joined #ruby
[14:02:11] jhass: of geology!
[14:02:19] ljarvis: i really want something like the rust/go playgrounds which let you run code and display the output underneath without the UI changing (but in multiple languages)
[14:02:36] pandaant: has joined #ruby
[14:02:44] yorickpeterse: pull down your pants and cough
[14:03:02] yorickpeterse: (that's what doctors say right?)
[14:03:08] apeiros: yorickpeterse: that's uninteresting. s/a/the/ and suddenly you've got my attention :)
[14:03:11] psye: has joined #ruby
[14:03:19] sem__: this is my problem : @point = game.point values = JSON.parse(@point.to_json) File.open('data.json', 'w'){|file| file.write(values)} erb :index end
[14:03:26] yorickpeterse: replace what "a"?
[14:03:35] yorickpeterse: oh, "I'm the doctor"?
[14:03:38] sem__: I want to display the points in sinatra
[14:03:38] adaedra: <yorickpeterse> I'm a doctor ??? I'd say
[14:03:38] apeiros: yorickpeterse: *sob*, ok: s/\ba\b/the/
[14:03:48] adaedra: meh, too slow
[14:03:56] flughafen: what the hell
[14:03:56] ruv: has joined #ruby
[14:03:59] thelastinuit: has joined #ruby
[14:04:02] apeiros: there was no other "a" in that phrase
[14:04:10] apeiros: those \b were unnecessary
[14:04:18] yorickpeterse: you didn't specify the input buffer
[14:04:29] apeiros: yorickpeterse: and yes, "I'm the doctor" :)
[14:04:34] jhass: apeiros: it's nice that you gave them a home & purpose anyway
[14:04:51] apeiros: and WHO ever doesn't get the reference - that's your own damn fault :-p
[14:04:55] yorickpeterse: stop discrimination against \
[14:05:06] adaedra: apeiros: ahah.
[14:05:13] yorickpeterse: all escape sequences are equal
[14:05:21] apeiros: but some are more equal
[14:05:41] Darkwater: sem__: what is the problem?
[14:05:50] Darkwater: I see some code and somethign you want
[14:05:59] jhass: sem__: start by removing that JSON.parse(x.to_json), just File.write("data.json", game.point.to_json)
[14:06:04] bmalum: has joined #ruby
[14:06:35] jhass: sem__: then in your sinatra app you can get back your array/hash with JSON.parse(File.read("data.json"))
[14:06:35] sem__: ok thx jhass and Darkwater
[14:06:54] hinbody: has joined #ruby
[14:07:06] Darkwater: jhass: I think that's in his sinatra app
[14:07:09] Darkwater: because he's calling erb
[14:07:13] chinmay_dd: has joined #ruby
[14:07:17] kbcxpgbsa: has joined #ruby
[14:07:26] jhass: Darkwater: yeah, I made my best guess :P
[14:07:44] Darkwater: it's hard to tell anyway
[14:07:45] ylla: has joined #ruby
[14:08:00] pleiosaur: ljarvis: try http://repl.it/languages
[14:08:29] Darkwater: sem__: if you set an @instancevar in a get/post/whatever block, you can access it in the erb template
[14:08:30] bantic: has joined #ruby
[14:08:32] Xeago: has joined #ruby
[14:08:42] Darkwater: so get '/' do @something = 5; erb :index; end
[14:08:45] ljarvis: pleiosaur: that comes pretty close, thanks
[14:08:52] Darkwater: <%= @something %> in index.erb
[14:09:40] Senjai`work: has joined #ruby
[14:10:26] jpfuentes2: has joined #ruby
[14:11:19] iamjarvo: has joined #ruby
[14:11:33] atomical: has joined #ruby
[14:11:41] Senjai`work: has joined #ruby
[14:11:50] bahar: has joined #ruby
[14:12:59] Senjai: Morning ruby
[14:13:03] bmalum: has joined #ruby
[14:14:45] sevenseacat: evening Senjai
[14:14:50] pdoherty: has joined #ruby
[14:15:16] CloCkWeRX: has joined #ruby
[14:15:39] zombirx: any body for hire ?
[14:16:10] Scroff: has joined #ruby
[14:16:19] sepp2k: has joined #ruby
[14:16:27] Scroff: has joined #ruby
[14:16:53] jhass: oh, you changed nick
[14:16:55] avat: has joined #ruby
[14:16:56] astrobunny: has joined #ruby
[14:17:22] Darkwater: yeah someone nicked g0rx just asked me as well
[14:17:28] Senjai: jhass: me?
[14:17:30] gamename: has joined #ruby
[14:17:34] jhass: Senjai: zombirx
[14:17:38] surrounder: Darkwater: again? where ?
[14:17:48] jhass: Darkwater: oh
[14:17:59] avat: Hello guys! I'm trying to "unwire" my classes from each other - is this the proper way for dependency injection? https://gist.github.com/ZyzioZiom/c7bc2a9a25c38779307e
[14:18:16] jhass: !kick zombirx http://ruby-community.com/pages/user_rules please see channel rule 2.9
[14:18:16] helpa: jhass: No.
[14:18:16] ruboto: ruboto kicked zombirx: please see channel rule 2.9
[14:18:16] ruboto: -o ruboto
[14:18:20] stoogenmeyer__: has joined #ruby
[14:18:34] zombirx: has joined #ruby
[14:18:43] jhass: zombirx: got the kick reason?
[14:18:44] gamename: has joined #ruby
[14:18:51] sem__: get '/' do game = Game.new @point = game.point JSON.parse(File.read("data.json")) erb :index end post '/' do game = Game.new game.point!(params[:marque].gsub(/oueur /, '').to_sym) @point = game.point File.write("data.json", game.point.to_json) erb :index end
[14:18:58] zombirx: an other one plz
[14:19:00] sem__: I have A JSON text must at least contain two octets!
[14:19:02] adaedra: gist, gist, gist
[14:19:08] jhass: ?gist sem__
[14:19:08] ruboto: sem__, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[14:19:33] _seanc_: has joined #ruby
[14:19:34] adaedra: And if your data.json is empty, the error is normal
[14:19:43] zombirx: !kick jhass don t
[14:19:55] jhass: zombirx: say what?
[14:20:03] yorickpeterse: "Offensive behavior include but are not limited to (in no particular order): Trolling" fuck
[14:20:08] zombirx: the bot don t obey
[14:20:16] zombirx: how to kick you also ?
[14:20:26] yorickpeterse: you're not an op
[14:20:41] adaedra: yorickpeterse: no troll for you!
[14:20:44] Senjai: jhass: just ban the guy :P
[14:20:52] RegulationD: has joined #ruby
[14:21:00] jhass: Senjai: will on the next channel rule violation
[14:21:08] jwaldrip: has joined #ruby
[14:23:00] tenderlove: has joined #ruby
[14:23:39] nricciar: has joined #ruby
[14:23:40] sem__: https://gist.github.com/anonymous/a907ccbe1cd767f71cb6
[14:23:59] cmisenas: has joined #ruby
[14:24:08] jhass: sem__: okay, cool, now you parse the file but you don't do anything with the parsed result
[14:24:21] jhass: sem__: JSON.parse returns it, but you ignore its return value
[14:24:33] jhass: you should assign it to something for starters
[14:24:43] avat: I guess I was lost in trollwar, repeating my question :) - I'm trying to "unwire" my classes from each other - is this the proper way for dependency injection? https://gist.github.com/ZyzioZiom/c7bc2a9a25c38779307e
[14:25:06] blackmesa: has joined #ruby
[14:25:06] plashchynski: has joined #ruby
[14:25:09] AhabsBeard: has joined #ruby
[14:25:51] commondream: has joined #ruby
[14:25:54] gamename: has joined #ruby
[14:26:52] roolo_: has joined #ruby
[14:26:58] Lector: has joined #ruby
[14:27:26] torpor: has joined #ruby
[14:27:59] Scrofff: has joined #ruby
[14:28:38] enebo: has joined #ruby
[14:28:58] kies: has joined #ruby
[14:28:58] poguez_: has joined #ruby
[14:29:22] thomasvm: has joined #ruby
[14:29:34] beneggett: has joined #ruby
[14:29:56] alex88: has joined #ruby
[14:30:31] tvw: has joined #ruby
[14:30:32] _aeris_: hello everybody !
[14:30:47] _aeris_: i have a HUGE crazy problem :(
[14:30:55] _aeris_: here is my example code https://gist.github.com/aeris/cfa68513f24a263323e9
[14:31:07] _aeris_: if i comment the ?? require 'ui_bibz' ??, no problem
[14:31:23] sem__: ok thx jhass
[14:31:31] _aeris_: if i uncomment it, dead-lock on Foo.find
[14:31:31] jhass: _aeris_: is this a game to guess what error you're getting?
[14:32:08] _aeris_: if i uncomment it but empty-ing the corresponding ui_bibz.rb, dead-lock ><
[14:32:47] Darkwater: are you 100% sure you're emptying the right ui_bibz.rb>
[14:32:55] endash: has joined #ruby
[14:33:05] _aeris_: Darkwater > yep, echoing something at the top
[14:33:31] tubuliferous_: has joined #ruby
[14:33:39] _aeris_: and this is the only gem version i have for this
[14:34:24] jhass: https://github.com/thooams/Ui-Bibz/blob/master/lib/ui_bibz/rails/engine.rb mmh it only seems to patch ActionView stuff
[14:34:40] sem__: but I don't know how to assign something for starters I have this code
[14:34:43] sem__: https://gist.github.com/anonymous/62290a8f68b9569bcda0
[14:34:44] hdev1: has joined #ruby
[14:34:52] Tamae: has joined #ruby
[14:35:17] jhass: sem__: @data = JSON.parse(File.read("data.json"))
[14:35:27] jhass: sem__: would assign it to the instance variable @data
[14:35:35] _aeris_: jhass > i took hours on this bug, no tip at this time
[14:35:38] jhass: which you then could use in your index template for example
[14:36:12] j4cknewt: has joined #ruby
[14:36:25] ndrei: has joined #ruby
[14:36:39] _aeris_: the only clue i have : seems the dead-lock created by kernel_require
[14:36:41] _aeris_: https://paste.imirhil.fr/?4bd76183929a14ae#gJq4Ze+8sSdjDaqk/auZnyVfBF+CQ8R1GAKDiX/LGTA=
[14:37:36] _aeris_: seems the mutex RUBYGEMS_ACTIVATION_MONITOR.enter (line 39)
[14:37:53] Iskarlar: has joined #ruby
[14:38:09] _aeris_: here : https://github.com/rubygems/rubygems/blob/master/lib/rubygems/core_ext/kernel_require.rb#L39
[14:38:11] Zai00: has joined #ruby
[14:38:33] intinig: has joined #ruby
[14:39:40] jhass: _aeris_: I'm afraid it doesn't reproduce for me
[14:39:59] jhass: _aeris_: can you add your Gemfile.lock?
[14:41:08] jhass: _aeris_: also given there's no require "bundler/setup", do you ruby wtf.rb or bundle exec ruby wtf.rb?
[14:41:21] jgt1: has joined #ruby
[14:41:23] n1x: has joined #ruby
[14:41:33] pyon: has joined #ruby
[14:41:55] _aeris_: from scratch, indeed, no dead lock ><
[14:42:03] _aeris_: rhaaaaaaaaaaaaa ><
[14:42:27] fschuindt: jhass: hey bro, remember me? UTF-16LE hahaha
[14:42:39] jhass: fschuindt: didn't work out? :(
[14:42:39] casadei: has joined #ruby
[14:42:42] fschuindt: kind of the same problem here, any help? https://gist.github.com/fschuindt/7c5494e9386654d1cc1e
[14:42:49] fschuindt: jhass: kinf of :S
[14:43:34] rippa: has joined #ruby
[14:43:37] jhass: well, did you try BE? :P
[14:43:58] AhabsBeard: has joined #ruby
[14:44:01] ellisTAA: has joined #ruby
[14:44:05] apeiros: fschuindt: `.encode!("UTF-8", "UTF-16LE") ==` <-- *don't* chain on ! methods
[14:44:18] fschuindt: jhass: yes, it stops to work.
[14:44:20] jhass: also doing it at all seems strange
[14:44:21] fschuindt: apeiros: ty
[14:44:41] d10n-work: has joined #ruby
[14:44:44] ellisTAA: hey yall. i want to create a crappy search engine for my homework assignment. would that be easy to do? I just have to create a spider right?
[14:44:47] apeiros: fschuindt: also, if you already properly set the encoding of the string, you don't need from + to, the to alone is sufficient
[14:44:55] jhass: >> "INSERT".encode("UTF-16LE") == "INSERT".encode("UTF-8")
[14:44:56] ruboto: jhass # => false (https://eval.in/378377)
[14:44:58] apeiros: from defaults to string.encoding
[14:45:20] fschuindt: jhass: hahaha
[14:45:22] apeiros: encoding matters in ==
[14:45:38] apeiros: >> "".encode("UTF-16") == ""
[14:45:40] ruboto: apeiros # => true (https://eval.in/378380)
[14:45:51] AhabsBeard: has joined #ruby
[14:45:53] apeiros: or was it that == is a binary comparison?
[14:46:18] caseypatrickdris: has joined #ruby
[14:46:28] denver: has joined #ruby
[14:46:38] apeiros: >> "\xFE\xFF\x00h\x00i".b == "hi".encode('utf-16')
[14:46:39] ruboto: apeiros # => false (https://eval.in/378386)
[14:46:43] sarink: has joined #ruby
[14:46:49] apeiros: ok, seems it depends :D
[14:47:13] apeiros: anyway, bottom of the line is that you want to == only with same encoding.
[14:47:19] fschuindt: one script works, the other one dont. I think that is related to the line 32 @ splitter.rb. When I store the string in the array. I don't know, somewhere it mess up with the accents :((
[14:47:44] ogpastaling: has joined #ruby
[14:48:04] jhass: I think it's the encode! line
[14:48:27] fschuindt: it makes all the sense
[14:48:31] fschuindt: w8 hahahahaha
[14:48:39] apeiros: the strip is also relatively pointless
[14:48:54] apeiros: if those 6 chars contain spaces, then the string is necessarily NOT equal to "INSERT" ;-)
[14:49:16] jhass: File.new should convert to UTF-16LE to UTF-8 and then you interpret that UTF-8 as UTF-16LE and convert it to UTF-8, no?
[14:49:20] fschuindt: apeiros: yeah, thats right
[14:49:30] mandarinkin: has joined #ruby
[14:49:32] fschuindt: jhass: wait, what
[14:50:08] _aeris_: jhass > trouble with ./wtf.rb, no trouble with bundle exec ./wtf.rb ><
[14:50:09] jhass: doesn't File.new convert to Encoding.default_internal?
[14:50:19] jhass: _aeris_: then just use that :P
[14:50:21] ebbflowgo: has joined #ruby
[14:50:34] fschuindt: whats the difference between enconde and encode!? the second changes the proper value, right?
[14:50:34] _aeris_: jhass > not a response :P
[14:50:36] apeiros: jhass: true
[14:50:37] jhass: _aeris_: else you're loosing the benefit of bundler anyway
[14:50:40] banister: has joined #ruby
[14:50:47] mdw: has joined #ruby
[14:50:55] apeiros: fschuindt: File.read(???, encoding: "UTF-16LE") translates to Encoding.default_internal
[14:51:12] jhass: _aeris_: you can also add said require "bundler/setup" as first require, which does the same thing
[14:51:15] apeiros: if you don't want it to be translated, you set external + internal encoding
[14:51:50] jhass: fschuindt: and .encode with two parameters the second parameter changes how it's interpreted again
[14:51:55] apeiros: another reason why 2-param encode is bad???
[14:53:51] whippythellama: has joined #ruby
[14:54:25] bahar: has joined #ruby
[14:54:48] k3asd`: has joined #ruby
[14:55:55] pothibo: has joined #ruby
[14:55:57] ebbflowgo: has joined #ruby
[14:57:06] fschuindt: apeiros: jhass: I have changed the line 26 @ splitter.rb https://gist.github.com/fschuindt/7c5494e9386654d1cc1e but it stills messing the accents. :(
[14:57:33] Papierkorb: has joined #ruby
[14:57:36] apeiros: line[0..5].encode("UTF-8") # that .encode is a no-op since the string already is in utf-8
[14:57:40] apeiros: assuming you use ruby 2.1+
[14:57:48] apeiros: sorry, 2.0+
[14:58:03] fschuindt: apeiros: the string is UTF-16LE
[14:58:03] joaomdmoura: has joined #ruby
[14:58:10] apeiros: fschuindt: no
[14:58:23] apeiros: add a `p line.encoding` before that line
[14:58:26] apeiros: see what it prints
[14:59:06] fschuindt: apeiros: UTF16-LE
[14:59:06] apeiros: fschuindt: https://gist.github.com/apeiros/39acc5b486f932403638 - I suggest you read this and tell me whether it helps you. and what's left missing.
[14:59:26] fschuindt: apeiros: ok
[14:59:43] apeiros: fschuindt: for real? what does `p Encoding.default_internal` print
[14:59:53] phat4life: has joined #ruby
[15:00:05] jhass: I'm starting to think that UCS 2 might not be as UTF-16 compatible as thought...
[15:00:05] phat4life: how to i supress stdout when i am running rspec tests?
[15:00:19] jhass: phat4life: >/dev/null
[15:00:36] nertzy: has joined #ruby
[15:01:16] fschuindt: apeiros: p Encoding.default_internal prints nil
[15:01:35] chipotle: has joined #ruby
[15:01:46] jhass: fschuindt: how about "".encoding ?
[15:01:52] jhass: (p "".encoding)
[15:02:22] alphaatom: has joined #ruby
[15:02:23] apeiros: sorry, got to commute. back in ~45min
[15:02:45] fschuindt: apeiros: no problem
[15:02:58] fschuindt: jhass: #<Encoding:UTF-8>
[15:03:00] treehug88: has joined #ruby
[15:03:19] Scroff: has joined #ruby
[15:03:45] fschuindt: I am going out to the lunch time, see ya
[15:03:50] fschuindt: thank you guys
[15:03:52] yekKhaste: has joined #ruby
[15:03:55] yekKhaste: has left #ruby: ()
[15:04:04] alphaatom: has joined #ruby
[15:04:49] fiveseven_: has joined #ruby
[15:05:13] fiveseven_: has left #ruby: ("=)")
[15:05:21] sarkyniin: has joined #ruby
[15:05:44] atm0sphere: has joined #ruby
[15:05:44] commondream: has joined #ruby
[15:06:02] Jinkins: has joined #ruby
[15:06:03] porfa: has joined #ruby
[15:06:28] _aeris_: thanks jhass for the ?? non ?? help :P
[15:06:29] AhabsBeard: has joined #ruby
[15:06:45] jhass: apeiros: looks like we're wrong and it doesn't convert, at least not in the encoding: form
[15:07:02] Rubie: has joined #ruby
[15:07:09] jhass: _aeris_: heh, educating on how to use bundler correctly is no help? :P
[15:07:52] bahar: has joined #ruby
[15:09:02] startupality: has joined #ruby
[15:09:19] dblessing: has joined #ruby
[15:09:56] cdnsteve: has joined #ruby
[15:10:19] slawrence: has joined #ruby
[15:10:35] someword: has joined #ruby
[15:11:01] jhass: fschuindt: I think Ruby simply doesn't support UCS-2LE and it's not UTF-16LE compatible for your usecase, you'll have to resort to an external converter or look if there's a gem that provides UCS-2LE support
[15:11:23] sandstrom: has joined #ruby
[15:11:36] _seanc_: has joined #ruby
[15:12:38] dgutierrez1287: has joined #ruby
[15:13:12] _seanc_1: has joined #ruby
[15:13:21] jhass: fschuindt: or since you only care about two specific tokens, INSERT and \n, you could look up the byte sequences for these in UCS-2LE and work with that
[15:13:25] kobain: has joined #ruby
[15:14:11] Cache_Money: has joined #ruby
[15:15:37] mrsolo: has joined #ruby
[15:16:26] porfa: hello guys...
[15:16:42] porfa: haha whats up jhass ? :)
[15:16:47] porfa: everythings ok?
[15:16:51] starfox_sf: has joined #ruby
[15:17:07] beneggett: has joined #ruby
[15:17:26] porfa: there's to much heat in here some heatwave going on.. damn
[15:17:33] jhass: some concert outside not matching up well with my music, but that's all
[15:17:39] ixti: has joined #ruby
[15:17:41] astrobunny: has joined #ruby
[15:17:45] iamjarvo: has joined #ruby
[15:18:05] porfa: so i've been looking around but i rather have the opinion of an user directly, rather than a blog???.
[15:18:28] Spami: has joined #ruby
[15:18:44] Spami: has joined #ruby
[15:18:46] phat4life: jhass: but i have an rspec test that expects stdout
[15:18:52] porfa: i need to automate some page clicks and submits and wtv, i only have access to ssh to work on ruby??? i've read about selenium and mechanize??? if you could recumbent me one gem to start learning.. with one would it be?
[15:19:03] kies: has joined #ruby
[15:19:18] mase-chatter: has joined #ruby
[15:19:42] keen___: has joined #ruby
[15:19:46] phat4life: expect { AccountManager.print_report }.to output(report).to_stdout, how can i suprress the output and have this test still pass?
[15:19:51] porfa: what i want to so is to help out some employers.. i need my script to login at our company back office, select a couple of products, change the dates of the products availability, and expand the dates if required.. something like that.
[15:20:31] jhass: Porfa: heard good things about mechanize, pick that until it doesn't work for you
[15:20:42] sarkyniin: mechanize is pretty good
[15:20:55] sarkyniin: using it to fetch some forum titles on a xenforo forum
[15:20:55] xenog: has left #ruby: ()
[15:21:05] porfa: thanks! :) and i hope mechanize is text only.. because most of the selenium tutorials i've seen required an open webbrowser..
[15:21:28] freerobby: has joined #ruby
[15:21:39] porfa: ok, i'll make a mechanize tattoo then! thanks
[15:22:47] jhass: !ban g0rx !T 1w unsolicited private messages
[15:22:48] ChanServ: +b g0rx!*@*
[15:22:48] ChanServ: ChanServ kicked g0rx: unsolicited private messages
[15:23:06] hubcaps: lmao g0rx never learns huh?
[15:23:18] Zarthus: has joined #ruby
[15:23:59] ljarvis: Porfa: yep mechanize is what you want. Shout if you have any issues
[15:24:03] ljarvis: also wat tattoo
[15:24:04] zombirx: has joined #ruby
[15:24:25] porfa: hahah languages and gems that help me put food on the table deserve a place in my body
[15:24:51] ljarvis: Porfa: well, if you get a mechanize tattoo i will formally make it the mechanize logo
[15:25:18] ljarvis: (disclaimer: please dont do that)
[15:26:10] phat4life: anyone know how to capture stdout for rspec, but suppressing printing?
[15:26:32] jhass: phat4life: just >/dev/null if you invoke it
[15:27:17] balazs: has joined #ruby
[15:27:21] beneggett: has joined #ruby
[15:28:11] balazs: has joined #ruby
[15:28:56] porfa: let's see how it will work out haha
[15:29:57] mello: has joined #ruby
[15:30:37] fgo: has joined #ruby
[15:30:55] A124: has joined #ruby
[15:32:00] [H]unt3r: has joined #ruby
[15:33:57] bluOxigen: has joined #ruby
[15:34:03] Xeago: has joined #ruby
[15:34:19] pothibo: has joined #ruby
[15:34:46] Polysics: has joined #ruby
[15:35:17] snockerton: has joined #ruby
[15:37:24] bahar: has joined #ruby
[15:38:45] iwishiwerearobot: has joined #ruby
[15:41:33] yoongkang: has joined #ruby
[15:41:48] bryancp: has joined #ruby
[15:42:13] speakingcode: has joined #ruby
[15:43:17] unshadow: has joined #ruby
[15:44:33] sandstrom: has joined #ruby
[15:44:41] moretti: has joined #ruby
[15:45:56] fujimura: has joined #ruby
[15:47:04] gkra: has joined #ruby
[15:47:08] Xeago: has joined #ruby
[15:47:18] Scripore: has joined #ruby
[15:47:39] fschuindt: has joined #ruby
[15:48:03] alphaatom: has joined #ruby
[15:50:04] beneggett: has joined #ruby
[15:50:08] nixmaniack: has joined #ruby
[15:50:56] niitotantei: has left #ruby: ()
[15:51:08] OrbitalKitten: has joined #ruby
[15:52:31] KrzaQ: has joined #ruby
[15:52:48] speaking1ode: has joined #ruby
[15:53:23] caseypatrickdris: has joined #ruby
[15:53:43] baweaver: has joined #ruby
[15:54:41] yeticry: has joined #ruby
[15:56:07] tjbiddle: has joined #ruby
[15:56:10] cdnsteve: has joined #ruby
[15:59:30] cdnsteve: has left #ruby: ()
[15:59:35] Scrofff: has joined #ruby
[15:59:36] starfox_sf: has joined #ruby
[15:59:41] Sou|cutter: phat4life: https://relishapp.com/rspec/rspec-core/v/3-2/docs/configuration/custom-output-stream is another way
[16:00:33] chrishough: has joined #ruby
[16:00:42] bronson: has joined #ruby
[16:01:00] cmisenas: has joined #ruby
[16:01:18] Sou|cutter: I think it's weird that you have a test which depends on stdout though
[16:01:50] towski_: has joined #ruby
[16:01:51] Sou|cutter: I would write the class under test to use any stream, just $stdout by default
[16:02:33] dfockler: has joined #ruby
[16:02:49] SouL_|_: has joined #ruby
[16:03:32] sanguisdex: has joined #ruby
[16:03:42] Evidlo: has joined #ruby
[16:04:04] Limix: has joined #ruby
[16:04:13] failshell: has joined #ruby
[16:05:01] fschuindt: has joined #ruby
[16:05:38] ndrei: has joined #ruby
[16:10:21] jackjackdripper: has joined #ruby
[16:10:22] arooni-mobile: has joined #ruby
[16:10:32] ogpastaling: has joined #ruby
[16:11:49] hakunin: has joined #ruby
[16:12:03] kies: has joined #ruby
[16:12:15] commondream: has joined #ruby
[16:13:00] Scripore: has joined #ruby
[16:14:11] tjbiddle: has joined #ruby
[16:14:18] borodin: has joined #ruby
[16:14:39] borodin: what is the current best way to get a modern ruby running in RHEL 6?
[16:14:42] rhllor: has joined #ruby
[16:14:51] treehug88: borodin: I presume rvm
[16:15:02] borodin: I have root but I may not have visibiilty to the interwebs from the server
[16:15:10] borodin: so I don't think RVM is going to work
[16:15:29] havenwood: borodin: https://rvm.io/rvm/offline
[16:15:31] treehug88: hm, root not needed but access to the gems and tarballs needed
[16:15:34] nahtnam: has joined #ruby
[16:15:35] adaedra: borodin: package collections have 1.9.3 iirc, if that's modern enough for you...
[16:15:44] adaedra: s/package/software/
[16:15:47] treehug88: nice, havenwood and adaedra
[16:15:56] hoov: has joined #ruby
[16:16:15] ljarvis: huh? they should have 2.2 as well..
[16:17:03] ljarvis: lee@jarvo:~$ apt-cache search ruby2 | grep ^ruby
[16:17:06] ljarvis: meh, close enough
[16:17:22] havenwood: In maintenance mode but at least not past end-of-life!
[16:17:29] stef204: has joined #ruby
[16:17:42] adaedra: > apt-cache
[16:18:27] astrobunny: has joined #ruby
[16:18:52] ljarvis: o I missed that part
[16:19:21] ljarvis: anyway, if you have yum/another package manager, then you can install rvm
[16:19:24] iamninja: has joined #ruby
[16:19:35] NeverDie: has joined #ruby
[16:19:53] borodin: how do you tell bundler to store all necessary gems for an app in vendor/cache?
[16:19:59] fschuindt: has joined #ruby
[16:20:08] adaedra: I don't want to imagine how old the RHEL6-provided rvm would be
[16:20:11] borodin: is it bundle install --deployment ?
[16:20:11] adaedra: borodin: --path ?
[16:20:32] ljarvis: bundle help install
[16:20:46] borodin: I need to check in my ap and have as a part of the check in a directory containing all the necessary gems
[16:20:58] borodin: my prod box doesn't have access to the internet to download gems
[16:21:35] ahmetkapikiran: has joined #ruby
[16:22:14] tubuliferous_: has joined #ruby
[16:22:48] NeverDie: has joined #ruby
[16:23:15] seank_: has joined #ruby
[16:23:17] OrbitalKitten: has joined #ruby
[16:23:21] tjbiddle: has joined #ruby
[16:23:22] banister: has joined #ruby
[16:23:24] borodin: ljarvis: bundle help install == http://bundler.io/bundle_install.html (minus the t-shirt ad0 right?
[16:23:31] zoo-zed: has joined #ruby
[16:23:37] ljarvis: looks like it
[16:24:31] zoo-zed: has joined #ruby
[16:24:53] borodin: so in dev, I can do bundle install--path vendor/bundle, then check in the code, then in prod I can do bundle install --path vendor/bundle, and it'll only search there for the needed gems?
[16:25:14] borodin: or bundle install --deployment?
[16:25:45] shakes: has joined #ruby
[16:26:31] adaedra: if you move the vendor/bundle with the project (don't put it in VCS please) and the system is the same, it should directly use the gems in the folder I guess
[16:26:41] adaedra: don't know how good of an idea it is though
[16:27:11] borodin: I can't build a gem server, I can't see rubygems.org from the box. I have little choice than to move the gems locally with the install
[16:28:08] bricker: has joined #ruby
[16:28:09] hdev1: has joined #ruby
[16:29:22] iamninja: has joined #ruby
[16:29:43] ogpastaling: has joined #ruby
[16:29:43] rodferso1: has joined #ruby
[16:29:53] aaeron: has joined #ruby
[16:30:00] beneggett: has joined #ruby
[16:30:25] vikaton: has joined #ruby
[16:30:27] commondream: has joined #ruby
[16:30:40] aaeron_: has joined #ruby
[16:31:26] Polysics: has joined #ruby
[16:32:19] bgmarx: has joined #ruby
[16:33:11] apofis: has joined #ruby
[16:33:51] bayed: has joined #ruby
[16:33:52] _seanc_: has joined #ruby
[16:33:53] Soda: has joined #ruby
[16:34:42] RobertBirnie: has joined #ruby
[16:36:33] centrx: has joined #ruby
[16:36:56] lordkryss: has joined #ruby
[16:36:57] pengin: has joined #ruby
[16:37:20] moretti: has joined #ruby
[16:37:46] ogpastaling: has joined #ruby
[16:38:34] moretti: has left #ruby: ()
[16:39:02] segfalt: has joined #ruby
[16:40:27] ldnunes: has joined #ruby
[16:41:28] imperator: has joined #ruby
[16:43:08] M-Technic: has joined #ruby
[16:43:48] deric_skibotn: has joined #ruby
[16:44:04] intinig: has joined #ruby
[16:44:12] Torsten`: has joined #ruby
[16:45:35] mello: has joined #ruby
[16:46:05] yqt: has joined #ruby
[16:46:16] MatthewsFace: has joined #ruby
[16:48:20] Scripore: has joined #ruby
[16:48:51] Matthews_: has joined #ruby
[16:48:59] jgoyon_: has joined #ruby
[16:50:13] shock_one: has joined #ruby
[16:50:38] Xeago: has joined #ruby
[16:50:56] spider-mario: has joined #ruby
[16:51:30] pikos: has joined #ruby
[16:51:46] djbkd: has joined #ruby
[16:51:58] fabrice31: has joined #ruby
[16:53:38] codenihal: has joined #ruby
[16:53:46] RobertBirnie: has joined #ruby
[16:54:20] Filete: has joined #ruby
[16:55:20] alphaatom: has joined #ruby
[16:55:23] Spami: has joined #ruby
[16:56:03] jcaho: has joined #ruby
[16:56:03] Dreamer3: has joined #ruby
[16:56:06] stoogenmeyer__: has joined #ruby
[16:57:23] chris2: has joined #ruby
[16:57:43] The_Phoenix: has joined #ruby
[16:57:46] tvw: has joined #ruby
[16:58:55] The_Phoenix: has joined #ruby
[16:59:35] The_Phoenix: has joined #ruby
[16:59:49] aapole: has joined #ruby
[17:00:18] x1337807x: has joined #ruby
[17:00:41] IanVorn: has joined #ruby
[17:02:46] msnyon: has joined #ruby
[17:05:06] bricker: has joined #ruby
[17:05:09] balazs: has joined #ruby
[17:06:12] ki0_: has joined #ruby
[17:06:36] n3k00n3: has joined #ruby
[17:07:33] pengin: has joined #ruby
[17:07:36] Pqi: has joined #ruby
[17:09:30] fschuindt: has joined #ruby
[17:09:32] edwinvdgraaf: has joined #ruby
[17:09:39] Pqi: Hello, What is the type of the object on which I can iterate such as " X.each do |key, value| " ? Is that an hashmap ? I tried to iterate on something like this: ['array'] = { x=>y, a=>b } but it doesnt seem to be the right type
[17:10:09] drPoggs: Pqi: That's a Hash, yes
[17:10:39] drPoggs: Pqi: On an Array, you could do ['foo', 'bar', 'baz'].each do |qux|...end
[17:11:31] kerunaru: has joined #ruby
[17:11:51] centrx: Pqi, Could also be any Enumerable of pairs
[17:12:30] quimrstorres: has joined #ruby
[17:12:45] but3k4: has joined #ruby
[17:13:57] failshell: has joined #ruby
[17:14:16] d0lph1n98: has joined #ruby
[17:15:06] sarink: is there an easy way to tell if a variable is a regex
[17:15:13] OrbitalKitten: has joined #ruby
[17:15:27] centrx: sarink, myvar.class
[17:15:47] iamjarvo: has joined #ruby
[17:17:06] dmolina: has joined #ruby
[17:17:17] prereflect: has joined #ruby
[17:18:40] Pqi: drPoggs: centrx okay thanks fine it's perfect
[17:18:53] but3k4_: has joined #ruby
[17:18:59] commondream: has joined #ruby
[17:19:12] rbowlby: has joined #ruby
[17:19:12] astrobunny: has joined #ruby
[17:19:26] Hanmac: sarink: probably better: myvar.is_a?(Regexp)
[17:20:06] RobertBi_: has joined #ruby
[17:20:12] phat4life: has left #ruby: ("WeeChat 1.2")
[17:20:33] banister: has joined #ruby
[17:21:12] commondr_: has joined #ruby
[17:21:51] nertzy: has joined #ruby
[17:22:21] PaulCapestany: has joined #ruby
[17:22:47] codenihal: Just joined, Ruby is awesome
[17:23:46] Scripore: has joined #ruby
[17:23:54] pengin: has joined #ruby
[17:24:07] torpor: has joined #ruby
[17:24:21] revath: has joined #ruby
[17:25:13] Senjai: sarink: variable.is_a?(Regex), but you should ducktype instead
[17:25:17] ElkEater: has joined #ruby
[17:25:31] IanVorn: has joined #ruby
[17:25:33] ElkEater: has left #ruby: ()
[17:26:54] IanVorn: has joined #ruby
[17:27:53] Limix: has joined #ruby
[17:28:36] hdev1: has joined #ruby
[17:28:58] Evidlo: has joined #ruby
[17:29:05] mrsolo: has joined #ruby
[17:29:06] nonparfumee: has joined #ruby
[17:30:25] CloCkWeRX: has left #ruby: ()
[17:33:20] ebbflowgo: has joined #ruby
[17:33:37] CloCkWeRX1: has joined #ruby
[17:34:17] snockerton: has joined #ruby
[17:34:41] hotpancakes: has joined #ruby
[17:34:42] fujimura: has joined #ruby
[17:36:28] RegulationD: has joined #ruby
[17:36:51] chussenot: has joined #ruby
[17:38:46] bootstrappm: has joined #ruby
[17:39:11] snockerton1: has joined #ruby
[17:41:03] OrbitalKitten: has joined #ruby
[17:44:36] baweaver: has joined #ruby
[17:44:38] mbeasley: has joined #ruby
[17:44:56] mbeasley: has left #ruby: ()
[17:45:23] lkba: has joined #ruby
[17:45:26] symm-: has joined #ruby
[17:46:02] but3k4: has joined #ruby
[17:46:42] Ox0dea: has joined #ruby
[17:46:55] CloCkWeRX: has joined #ruby
[17:46:55] cmisenas: has joined #ruby
[17:47:22] Ox0dea: sarink: Regex ain't no Ruby class I ever heard of.
[17:47:24] camonz: has joined #ruby
[17:47:28] Ox0dea: They respond_to?(last_match) in Regex?
[17:47:50] aryaching: has joined #ruby
[17:48:24] bgmarx: has joined #ruby
[17:49:59] DLSteve: has joined #ruby
[17:50:19] Diabolik: what would be the most efficient way of doing a buy one get one free method on items in an array, i.e. if there are 2 instances of item1 then only count 1
[17:50:27] Diabolik: (2, 4, 6 etc)
[17:50:30] slackbotgz: has joined #ruby
[17:51:08] Soda: has joined #ruby
[17:51:09] Ox0dea: Diabolik: Provide example input and desired output.
[17:51:10] apeiros: Diabolik: got an example?
[17:51:33] shock_one: has joined #ruby
[17:52:44] caconym: has joined #ruby
[17:53:25] mc_fail: has joined #ruby
[17:54:00] ghr: has joined #ruby
[17:54:02] kubunto: has joined #ruby
[17:54:07] Scroff: has joined #ruby
[17:54:29] hinbody: has joined #ruby
[17:54:33] kubunto: good idea or bad idea to use dropbox api to transfer files
[17:55:51] apeiros: kubunto: context
[17:56:06] __butch__: has joined #ruby
[17:56:20] StephenOTT: has joined #ruby
[17:56:32] CloCkWeRX: has joined #ruby
[17:57:31] kubunto: transfering pictures over the wire
[17:58:00] _seanc_: kubunto: what are you doing with the photos though?
[17:58:01] apeiros: that's not really context.
[17:58:08] _seanc_: if you???re storing them in Dropbox, then using Dropbox makes sense.
[17:58:17] _seanc_: If you???re displaying them on a website, Dropbox probably doesn???t make much sense.
[17:58:25] apeiros: anyway, there's much better ways than dropbox to copy data from one computer to another
[17:58:30] apeiros: so without context - bad idea.
[17:58:36] kubunto: midway point for file transfer
[17:58:45] Scripore: has joined #ruby
[17:58:46] symbol: has joined #ruby
[17:59:48] gert7: has joined #ruby
[18:00:24] qwertme: has joined #ruby
[18:01:27] jerius_: has joined #ruby
[18:01:29] jackjackdripper1: has joined #ruby
[18:02:48] mdw: has joined #ruby
[18:03:04] towski_: has joined #ruby
[18:03:58] Ox0dea: kubunto: That would be the Atlantic Ocean, no?
[18:04:15] kubunto: ACTION facepalms
[18:04:22] Polysics: has joined #ruby
[18:04:55] miah: i'd recommend; http://www.whence.com/minimodem/ for pc -> pc transfers ;)
[18:05:44] Ox0dea: Because rsync and scp aren't things.
[18:06:07] kubunto: Ox0dea: thats why i was asking
[18:06:20] miah: scp / rsync are my first choices; im just being silly.
[18:06:41] miah: also i want to walk into a office and hear people transfering data to each other over modems
[18:07:13] apeiros: kubunto: you see, scp/rsync require ssh connection to the target. that's why *you providing context* would be important.
[18:07:35] kubunto: apeiros: i dont know the best way to do what i want
[18:07:36] miah: rsync doesnt require ssh
[18:07:44] kubunto: i only know i want to transfer files over the wire
[18:07:56] _seanc_: Just cause?
[18:07:58] apeiros: kubunto: no. that's why you come here. but if you want a good answer, provide good information about what you have.
[18:08:02] kirun: has joined #ruby
[18:08:13] _seanc_: You certainly have a reason to transfer those files, that???s what people are trying to figure out :]
[18:08:15] nonparfumee: has joined #ruby
[18:08:27] kubunto: _seanc_: reason is because i will be in germany but i want it in the states
[18:08:35] Ox0dea: So you do need the Atlantic!
[18:08:54] _seanc_: kubunto: Doesn???t sound like you need Ruby or an API at all.
[18:09:27] _seanc_: Use Dropbox, Box, S3, Amazon Prime Photos, etc...
[18:09:39] ruby-lang441: has joined #ruby
[18:10:12] shadoi: has joined #ruby
[18:10:14] Ox0dea: Use Sneakernet.
[18:10:17] kubunto: _seanc_: the thing is i will likely burst data limit on dropbox
[18:10:25] tubuliferous_: has joined #ruby
[18:10:26] Ox0dea: kubunto: How many blank CDs do you have lying around?
[18:10:34] commondream: has joined #ruby
[18:10:34] failshell: has joined #ruby
[18:10:38] _seanc_: kubunto: Then don???t use Dropbox. Use S3.
[18:10:47] kubunto: _seanc_: also i dont like image hosting services
[18:10:55] kubunto: kills quality of my shot
[18:11:05] _seanc_: S3 is just a document storage.
[18:11:15] _seanc_: You can put whatever image want up there, of any quality.
[18:11:53] miah: http://www.tarsnap.com/ =)
[18:11:57] mello: has joined #ruby
[18:12:48] dgutierrez1287: has joined #ruby
[18:13:11] duderonomy: has joined #ruby
[18:13:18] RobertBirnie: has joined #ruby
[18:13:30] kubunto: _seanc_: s3 is moneys
[18:13:37] kubunto: and i have a pi i can leverage
[18:13:47] Scripore: has joined #ruby
[18:14:04] mikecmpbll: has joined #ruby
[18:14:29] miah: setup rsyncd on pi and just write a small script to rsync your files to your pi rsyncd and store on local storage then? =)
[18:15:10] miah: unless you truly want to write something in ruby
[18:15:17] swgillespie: has joined #ruby
[18:15:47] tvw: has joined #ruby
[18:16:48] OrbitalKitten: has joined #ruby
[18:17:00] michael_mbp: has joined #ruby
[18:17:11] kubunto: can rsync be run over an ssh connection
[18:17:22] drbrain: it usually is
[18:17:33] drbrain: it would be weird to run it over a non-ssh connection
[18:17:34] ur5us: has joined #ruby
[18:17:45] sandelius: has joined #ruby
[18:19:01] bougyman: public rsyncs are often non-ssh
[18:19:09] bougyman: software repositories and such.
[18:19:21] bougyman: debmirror uses this, as does void linux's mirroring system.
[18:19:33] postmodern: has joined #ruby
[18:19:51] bougyman: but for day-to-day use, it's almost always ssh-transport
[18:19:52] baweaver: has joined #ruby
[18:20:00] astrobunny: has joined #ruby
[18:20:24] centrx: has joined #ruby
[18:20:36] miah: if its totally internal; just run rsyncd
[18:20:45] miah: and if you're rsycning over ssh a lot; disable compression
[18:20:51] miah: (compression in ssh)
[18:21:27] hotpancakes: has joined #ruby
[18:21:29] kubunto: totally internal?
[18:21:41] IanVorn: has joined #ruby
[18:21:45] miah: aka, a server in your house on your lan and not the public internet
[18:22:01] kubunto: this is over public internet
[18:22:11] kubunto: germany to the states
[18:22:33] shevy: yeah, I also think germany should join the other US states
[18:22:45] pothibo: has joined #ruby
[18:22:46] miah: you could still run rsyncd on the 'net. but make sure you use passwords on the account. i'd also probably set some firewall rules up =)
[18:23:11] miah: its clearly safer if you do it over ssh
[18:23:34] miah: because youre limiting your inputs and putting all your trust in openbsd's sshd =)
[18:24:11] AhabsBeard: has joined #ruby
[18:24:21] wprice: has joined #ruby
[18:24:45] jerius: has joined #ruby
[18:24:49] miah: compiling ssh for sco openserver was not fun
[18:24:57] apofis: has joined #ruby
[18:25:14] kubunto: dumb question: i can change the port that ssh runs on for a server yes?
[18:25:17] miah: ssh has come a long ways =)
[18:25:29] miah: kubunto: yes. but people are constantly scanning.
[18:25:37] miah: _firewall_
[18:25:49] miah: limit your inputs to select ip's / ranges
[18:26:14] apofis: has joined #ruby
[18:26:16] miah: and if you're using ssh for everything. disable password authentication and use ssh keys only.
[18:26:23] Authenticator: has joined #ruby
[18:26:47] kubunto: i dunno my ip ahead of time
[18:27:05] _aeris_: has joined #ruby
[18:27:18] kubunto: tho i may be able to get help on the american side with that
[18:28:56] kies: has joined #ruby
[18:28:56] miah: also; we should move this discussion to #ruby-offtopic
[18:29:20] miah: should have a while ago, but its new =)
[18:29:31] ex0ns: has joined #ruby
[18:29:42] shevy: discuss here!
[18:30:08] hahuang65: has joined #ruby
[18:31:32] timonv: has joined #ruby
[18:31:35] Scroff: has joined #ruby
[18:33:29] jhass: borodin: a bit late, but what you actually want is bundle package
[18:33:58] IanVorn: has joined #ruby
[18:34:09] borodin: bundle package is different that bundle --path ?
[18:34:15] snockerton: has joined #ruby
[18:34:35] AlexRussia: has joined #ruby
[18:35:02] centrx: has joined #ruby
[18:35:13] ledestin: has joined #ruby
[18:35:45] AhabsBeard: has joined #ruby
[18:36:02] caiges: has joined #ruby
[18:36:33] hoey: has joined #ruby
[18:37:56] choke: has joined #ruby
[18:38:14] k3asd`: has joined #ruby
[18:38:58] bantic: has joined #ruby
[18:39:27] dopie: has joined #ruby
[18:40:25] jhass: borodin: yes, quite
[18:40:27] solars: has joined #ruby
[18:40:29] jhass: bundle help package
[18:40:39] glcx: has joined #ruby
[18:40:41] chussenot: has joined #ruby
[18:40:42] borodin: thanks I'll read some more
[18:41:09] fabrice31: has joined #ruby
[18:42:31] _blizzy_: has joined #ruby
[18:42:59] _blizzy_: could anyone help me figure out why https://gist.github.com/NotBlizzard/27014eae384d2d9eeee6 is returning: "undefined method '[]' for nil:NilClass"
[18:43:53] drPoggs: _blizzy_: At which line? Line 2?
[18:44:33] kubunto: miah: thank you for the info
[18:44:49] jhass: _blizzy_: doesn't reproduce here
[18:45:05] drPoggs: jhass: nor here on 2.1.5
[18:45:15] _blizzy_: let me gist the real code then.
[18:45:16] ddv: _blizzy_, there is no :bar symbol in the hash?
[18:45:22] AhabsBeard: has joined #ruby
[18:45:33] jhass: ddv: notice the block to Hash.new though
[18:45:34] ddv: oh it will create it anyways
[18:45:39] tjbiddle: has joined #ruby
[18:45:50] x1337807x: has joined #ruby
[18:46:45] ddv: what is k supposed to refer to anyways?, isn't it nil?
[18:46:59] jhass: no, it's the missing key
[18:47:06] nertzy: has joined #ruby
[18:47:25] blackmesa: has joined #ruby
[18:47:42] _blizzy_: I thought it auto creates the key?
[18:47:45] ddv: but k is nil right?
[18:47:50] jhass: ddv: no, :bar
[18:47:56] jhass: ddv: try it, that code has no issue
[18:48:04] ddv: jhass, ok
[18:48:07] _blizzy_: oh, sorry then.
[18:48:11] Zackio: has joined #ruby
[18:48:13] _blizzy_: IDK what I'm doing wrong then.
[18:48:23] jhass: _blizzy_ just presented an invalid reduction of their real problem
[18:48:36] jhass: _blizzy_: do what you said, show your real code
[18:48:40] jhass: + backtrace
[18:49:13] baweaver: ACTION elbows Radar whilst smirking
[18:50:44] sinkensabe: has joined #ruby
[18:50:52] _blizzy_: https://gist.github.com/NotBlizzard/dfc9012f1ef5d04dd65b
[18:50:54] kadoppe: has joined #ruby
[18:50:55] Jinkins: has joined #ruby
[18:51:25] jhass: _blizzy_: backtrace?
[18:51:25] baweaver: Ohai sepp2k, keep forgetting you're on here.
[18:51:30] shock_one: has joined #ruby
[18:51:34] baweaver: (baweaver == lemur == keystonelemur)
[18:51:37] shevy: they are so silent
[18:51:55] shevy: jhass pulled them all the way here to - and they never say anything now :(
[18:52:01] quimrstorres: has joined #ruby
[18:52:16] baweaver: shevy: well you're talkative enough for the lot of them
[18:52:27] shevy: yeah but quantity is not quality
[18:52:36] baweaver: ACTION shrugs
[18:52:37] jhass: shevy: it wasn't different over in #ruby-lang, hence I wanted the newbies join here ;)
[18:52:39] baweaver: you said it, not me
[18:52:55] shevy: ACTION cuddles the great beaver coder
[18:53:02] _blizzy_: actually, I figured it out, jhass
[18:53:13] shevy: well, at least we won't have to explain "Why are there two channels?" anymore
[18:53:26] _blizzy_: I was trying to push to the wrong hash
[18:53:30] _blizzy_: thanks for the help, everyone.
[18:53:42] Ox0dea: "Push" isn't really the word you want there.
[18:53:55] _blizzy_: then what is the word?
[18:54:01] Ox0dea: Store, I reckon.
[18:55:54] mhoungbo: has joined #ruby
[18:56:08] jhass: shevy: right, reminds me of something
[18:56:32] shevy: we may still have to explain "What happened to #ruby-lang" :)
[18:56:44] Scroff: has joined #ruby
[18:57:07] mhoungbo: has joined #ruby
[18:57:18] Ox0dea: Out of curiosity, why'd the merge go in this direction?
[18:57:33] pothibo: has joined #ruby
[18:57:42] Aria: This is the more obvious channel name
[18:57:42] millerti: has joined #ruby
[18:57:53] Aria: (Was a problem all the way back to early days of #ruby-lang)
[18:58:29] mhoungbo: has joined #ruby
[18:58:55] shevy: and it's shorter to type too!
[18:59:13] jhass: Ox0dea: this one is also bigger, so change for less people
[18:59:29] miah: i never realised there was a #ruby-lang
[18:59:37] shevy: yeah we already are forgetting our dark past
[18:59:46] jhass: heh, it's still referred to at ruby-lang.org
[18:59:56] bin_005: has joined #ruby
[19:00:09] shevy: I actually don't remember but I think I joined #ruby-lang first, because of the homepage (or the pickaxe mentioning it, probably)
[19:00:09] jpfuentes2: has joined #ruby
[19:00:48] adaedra: jhass: sssh, no name calling :)
[19:01:01] bronson: has joined #ruby
[19:01:09] jhass: I didn't call anyone specific!
[19:02:21] jhass: wait, I see zzak has commit rights...
[19:04:30] lkba_: has joined #ruby
[19:06:26] jpfuentes2: has joined #ruby
[19:06:48] arooni-mobile: has joined #ruby
[19:08:09] ghr: has joined #ruby
[19:08:29] metallicrwr: has joined #ruby
[19:09:25] affenhoden: has joined #ruby
[19:09:51] aryaching_: has joined #ruby
[19:09:57] shevy: another silent one
[19:10:06] nfk: has joined #ruby
[19:10:13] shevy: they are IRC ghosts
[19:10:18] xxneolithicxx: has joined #ruby
[19:10:19] jhass: yeah, dunno how apeiros got him talk
[19:11:02] whippythellama: has joined #ruby
[19:11:13] Scroff: has joined #ruby
[19:11:53] zotherstupidguy: has joined #ruby
[19:11:58] drbrain: there was a time when #ruby didn't exist
[19:12:11] vickleton: has joined #ruby
[19:12:20] bricker: has joined #ruby
[19:12:33] discord: has joined #ruby
[19:13:20] drbrain: back when lilo (????) was still an admin
[19:13:52] jenrzzz: has joined #ruby
[19:14:02] Scroff: has joined #ruby
[19:14:42] yfeldblum: has joined #ruby
[19:14:54] arescorpio: has joined #ruby
[19:15:34] agilenav: has joined #ruby
[19:16:33] SouL_|_: has joined #ruby
[19:16:47] agilenav: has left #ruby: ()
[19:16:51] yqt: has joined #ruby
[19:17:28] dfockler: Jeremy Evans is my Ruby Hero
[19:17:34] Scrofff: has joined #ruby
[19:18:28] bilal: has joined #ruby
[19:19:23] kubunto: has left #ruby: ()
[19:19:49] IanVorn: has joined #ruby
[19:20:47] astrobunny: has joined #ruby
[19:20:50] RobertBirnie: has joined #ruby
[19:20:50] discord: has joined #ruby
[19:21:21] dfockler: what do people think of rubytogether?
[19:21:34] bilal: has left #ruby: ("Leaving")
[19:21:39] hotpancakes: has joined #ruby
[19:22:10] sinkensabe: has joined #ruby
[19:22:18] dfockler: must be lunchtime in here
[19:22:28] ebbflowgo: has joined #ruby
[19:23:27] fujimura: has joined #ruby
[19:23:40] n008f4g_: has joined #ruby
[19:23:46] qwertme: has joined #ruby
[19:24:15] nertzy: has joined #ruby
[19:24:33] jefus_: has joined #ruby
[19:24:34] cjbottaro: has joined #ruby
[19:25:38] cjbottaro: Hello. How come Socket.gethostbyname("blah.com") raises "Name or service not known", but `host blah.com` at the bash prompt resolves fine? Does Ruby does DNS resolution differently from the `host` command?
[19:26:04] sandelius: has joined #ruby
[19:26:17] m8: has joined #ruby
[19:26:58] sts: cjbottaro: yes. host would for example evaluate /etc/hosts. 'dig blah.com' wouldn't
[19:28:26] cjbottaro: sts: Ok, well blah.com isn't in my hosts file. Also `dig blah.com` resolved it, while Ruby's Socket.gethostbyname didn't. I'm worried that Ruby isn't using resolvconf or something... ?
[19:28:54] djbkd: has joined #ruby
[19:29:02] cjbottaro: Ruby's Socket.gethostbyname *eventually* resolves it (these are newly created DNS entries), but host and dig resolve them much faster.
[19:29:14] shevy: dfockler dunno; never even heard of rubytogether
[19:29:32] j4cknewt: has joined #ruby
[19:30:03] miah: https://rubytogether.org/
[19:30:06] dfockler: oh wow, it's basically a non-profit that pays for ruby infrastructure
[19:30:33] commondream: has joined #ruby
[19:30:34] dfockler: so people can work full time on bundler and rubygems and such
[19:30:39] ebbflowgo: has joined #ruby
[19:30:47] miah: i think its great
[19:31:02] plashchynski: has joined #ruby
[19:32:37] dblessing: has joined #ruby
[19:33:16] ogpastal_: has joined #ruby
[19:33:51] shock_one: has joined #ruby
[19:34:15] freerobby: has joined #ruby
[19:34:44] shock_one: has joined #ruby
[19:34:57] sepp2k: shevy: Not dead, just idling.
[19:35:03] shock_one: has joined #ruby
[19:37:24] Polysics: has joined #ruby
[19:37:28] centrx: has joined #ruby
[19:37:54] dfockler: drbrain is my Unsung Ruby Hero
[19:39:19] sts: cjbottaro: I think the function also doesn't return AAAA records. Try using ruby's Resolv library instead.
[19:39:22] rbowlby: has joined #ruby
[19:40:29] Ox0dea: The origin of some of Smalltalk's (and thus Ruby's) collection methods: http://genius.com/Arlo-guthrie-alices-restaurant-massacree-lyrics#note-2519068
[19:40:40] shevy: sepp2k is back!
[19:40:55] IanVorn: has joined #ruby
[19:40:56] dblessing: has joined #ruby
[19:41:04] Ox0dea: "Neglect" and "reject" are loosely synonymous, and #taint is OBJ_INFECT internally, so they're all covered!
[19:41:07] jmhmccr: has joined #ruby
[19:41:12] cjbottaro: sts: I'm using network client libraries (for example Cassandra client, Elasticsearch client). I don't have control over how they try to resolve DNS. Is there a way to say "globally" use this method for DNS resolution?
[19:41:26] sts: cjbottaro: resolv-replace.rb?
[19:41:36] cjbottaro: sts: Thank you, will look into that.
[19:43:02] mhoungbo: has joined #ruby
[19:43:30] sandstrom: has joined #ruby
[19:43:44] shevy: dfockler https://rubytogether.org/projects
[19:43:48] shevy: they should really unify on bundler and rubygems
[19:44:20] mhoungbo: has joined #ruby
[19:44:56] dfockler: shevy: there are a few projects out there that don't use bundler with rubygems but I'm sure that option could be left open
[19:45:34] shevy: I use rubygems and not bundler for instance :)
[19:45:44] dfockler: what do you mean unify then?
[19:45:45] mhoungbo: has joined #ruby
[19:46:11] Xeago: has joined #ruby
[19:47:15] dfockler: just put them together under the same project?
[19:47:24] mhoungbo: has joined #ruby
[19:48:01] ta: has joined #ruby
[19:49:02] shevy: their functionality
[19:49:06] robbyoconnor: has joined #ruby
[19:49:12] Diabolik: https://github.com/askl56/Checkout
[19:49:15] Diabolik: if you check the readme
[19:49:16] shevy: or at the least the part that makes sense
[19:49:23] Diabolik: what's the most efficient way of implementing the math logic
[19:50:09] zotherstupidguy: has joined #ruby
[19:50:23] Scroff: has joined #ruby
[19:50:47] OrbitalKitten: has joined #ruby
[19:50:55] _aeris_: has left #ruby: ("Konversation terminated!")
[19:51:33] Frem: has joined #ruby
[19:52:31] dfockler: Diabolik: usually checkout systems have a finished with transaction that generates the total
[19:52:55] Diabolik: yeah i was debating whether it was better to deduct at the ned
[19:53:00] Diabolik: or to do it within the alog
[19:53:25] dfockler: otherwise you have to check the current state against the discount rule on every scan
[19:53:50] dfockler: which could work based on the item, just check rules related to that item
[19:54:25] centrx: has joined #ruby
[19:54:37] ChanServ: -b Gnar!*@*
[19:55:01] chadwtaylor: has joined #ruby
[19:55:10] baweaver: has joined #ruby
[19:55:34] dfockler: it gets harder when you have something mixing item discounts together
[19:55:48] Ox0dea: So strawberries are buy three, get 10% off instead of BOGO? That's practically a racket!
[19:56:42] dfockler: Ox0dea: at scale that would really add up
[19:56:43] Ox0dea: You should organize some sort of strike, and perhaps even motion to litigate.
[19:57:05] premera: has joined #ruby
[19:57:16] finisherr: has joined #ruby
[19:58:02] Ox0dea: dfockler: BOGO tends to be repeatedly applicable.
[19:58:13] Iskarlar: has joined #ruby
[19:58:19] hplar: has joined #ruby
[19:58:22] Ox0dea: So the "deal" on strawberries is really just turning the customer's discount from 50% to ten.
[19:58:25] Ox0dea: It's outrageous.
[19:58:57] Ox0dea: Diabolik: Do you have a lawyer?
[19:59:05] tubuliferous_: has joined #ruby
[20:00:33] bgmarx: has joined #ruby
[20:00:50] willharr_: has joined #ruby
[20:01:00] choke: has joined #ruby
[20:01:25] Ox0dea: I don't think you appreciate the gravity of the situation.
[20:01:30] faitswulff1: has joined #ruby
[20:01:45] segfalt: has joined #ruby
[20:02:16] faitswulff1: has joined #ruby
[20:02:48] sdwrage: has joined #ruby
[20:03:13] Aria: Four inches.
[20:03:53] sarkyniin: has joined #ruby
[20:03:55] faitswulff1: has left #ruby: ()
[20:04:20] Aria: But Diabolik, I don't think efficiency is the thing you have to worry about -- business computers have always done slow decimal math and been fine. What'd be good to focus on is clear logic for calculating, and figuring out if anything needs to be rule-driven. Ad hoc logic around discounts gets dicy.
[20:04:35] centrx: has joined #ruby
[20:04:48] timonv: has joined #ruby
[20:05:15] shevy: four inches.... hmmm
[20:05:18] bgmarx: has joined #ruby
[20:05:28] centrx: has joined #ruby
[20:06:07] x1337807x: has joined #ruby
[20:07:07] alphaatom: has joined #ruby
[20:07:23] Ox0dea: MRI used to have a function called Fdic_length().
[20:07:32] Ox0dea: Back when Hash was Dict.
[20:07:48] dseitz: has joined #ruby
[20:08:11] Diabolik: Aria should i do a module called Rules
[20:08:14] Diabolik: with all this shit in there?
[20:08:24] alphaatom: has joined #ruby
[20:08:53] Aria: Perhaps. That gets into the business case and how this will actually change.
[20:08:59] Aria: And gets into user interface concerns.
[20:09:11] cntrx: has joined #ruby
[20:09:55] baweaver: has joined #ruby
[20:10:29] alphaatom: has joined #ruby
[20:10:57] AhabsBeard: has joined #ruby
[20:11:16] havenwood: has joined #ruby
[20:11:50] alphaatom: has joined #ruby
[20:12:11] cntrx: has joined #ruby
[20:13:17] alphaatom: has joined #ruby
[20:14:06] tjbiddle: has joined #ruby
[20:15:13] ta: has joined #ruby
[20:15:37] rbowlby: has joined #ruby
[20:15:47] sarkyniin: has joined #ruby
[20:18:04] arooni-mobile: has joined #ruby
[20:20:46] doodleha_: has joined #ruby
[20:21:25] zzak: has joined #ruby
[20:21:29] astrobunny: has joined #ruby
[20:21:30] Guest5307: has joined #ruby
[20:21:31] djbender: has joined #ruby
[20:21:32] ckrailo: has joined #ruby
[20:22:41] chrishough: has joined #ruby
[20:22:49] snockerton: has left #ruby: ()
[20:23:36] nahtnam: has joined #ruby
[20:23:37] autrilla: has joined #ruby
[20:23:38] hdev1: has joined #ruby
[20:23:50] pskosinski: has joined #ruby
[20:24:04] allomov: has joined #ruby
[20:24:06] towski_: has joined #ruby
[20:24:29] adefa: has joined #ruby
[20:24:38] skade: has joined #ruby
[20:24:40] willharrison: has joined #ruby
[20:24:40] iamdevnul: has joined #ruby
[20:24:40] lancetw: has joined #ruby
[20:24:53] Diabolik: Aria this is only being used in a theoretical environment
[20:25:55] codeitagile: has joined #ruby
[20:26:08] pietr0: has joined #ruby
[20:26:58] Ox0dea: I assure you, irb is real.
[20:27:48] tenderlove: has joined #ruby
[20:28:07] machty: has joined #ruby
[20:30:00] fabrice31: has joined #ruby
[20:32:17] bruno-: has joined #ruby
[20:32:18] swgillespie: has joined #ruby
[20:33:40] pengin: has joined #ruby
[20:33:50] plashchynski: has joined #ruby
[20:34:20] sandstrom: has joined #ruby
[20:34:39] OrbitalKitten: has joined #ruby
[20:34:59] pikos: has joined #ruby
[20:35:24] alphaatom: has joined #ruby
[20:36:12] shevy: irb is wonderland
[20:36:58] atomical: irb is a panacea
[20:37:14] alphaatom: has joined #ruby
[20:38:43] djbkd: has joined #ruby
[20:39:15] tjbiddle: has joined #ruby
[20:39:45] centrx: has joined #ruby
[20:39:59] dgutierrez1287: has joined #ruby
[20:40:34] adaedra: pry, man, pry
[20:41:56] apofis_: has joined #ruby
[20:42:00] ponga: is there any technical difference between pry and irb other than highlighting?
[20:42:18] zotherstupidguy: has joined #ruby
[20:42:28] Cache_Money: has joined #ruby
[20:43:45] ogpastaling: has joined #ruby
[20:44:48] ebbflowgo: has joined #ruby
[20:45:03] atomical: stay pure, bro
[20:46:07] Ox0dea: ponga: You can `cd` into anything and `ls` everything about it.
[20:46:44] ponga: interesting
[20:47:11] Ox0dea: Have you just... never tried it?
[20:47:12] nonparfumee: has joined #ruby
[20:47:14] havenwood: ponga: Pry can find a method's source or get the binding of a method's caller from higher up the call stack and eval from there.
[20:47:26] havenwood: ponga: In Pry check: help
[20:47:33] axisys: has joined #ruby
[20:47:55] havenwood: ponga: It isn't just a skinned irb.
[20:48:22] ponga: Ox0dea: havenwood i pretty much treated as coloured irb
[20:48:27] pikos: has joined #ruby
[20:48:36] Fooster: has joined #ruby
[20:49:03] havenwood: ponga: Try out some of the commands that `help` shows or check out their help, like: help ls
[20:49:40] havenwood: ponga: And if you haven't already: gem install pry-doc
[20:50:01] balazs: has joined #ruby
[20:50:19] psyprus: has joined #ruby
[20:50:23] havenwood: ponga: Try `ls`ing some stuff, like: ls 5
[20:50:26] havenwood: ponga: Or: ls []
[20:50:43] ponga: god damn it 'help' in pry's too long i can't end it
[20:51:04] commondream: has joined #ruby
[20:51:15] gregf: has joined #ruby
[20:51:36] victorko_: has joined #ruby
[20:52:12] ponga: havenwood: with help that text is too long, it kinda breaks my terminal
[20:52:22] ponga: i can't get out of (END)
[20:52:40] havenwood: ponga: I put `Pry.pager = false` in my ~/.pryrc file, but you can press space to read on, or colon-q to move along.
[20:52:51] victorkohl: has joined #ruby
[20:53:39] bgmarx: has joined #ruby
[20:53:42] ponga: havenwood: its weird, 'q' now works but it didn't work for my first attempt i had to restart terminal
[20:53:49] ponga: another weird mac exprience day
[20:53:57] Ox0dea: You probably paused your terminal.
[20:54:10] TheHodge: has joined #ruby
[20:54:34] jacor_m: has joined #ruby
[20:56:05] ebbflowgo: has joined #ruby
[20:57:42] shock_one: has joined #ruby
[20:57:56] jcaho_m: has joined #ruby
[20:57:56] zotherstupidguy: has joined #ruby
[20:58:13] commondream: has joined #ruby
[21:00:06] skade: has joined #ruby
[21:01:03] jefus_: has joined #ruby
[21:01:26] kartouch: has joined #ruby
[21:01:52] centrx: has joined #ruby
[21:01:54] commondr_: has joined #ruby
[21:04:14] jcaho: has joined #ruby
[21:04:16] jefus: has joined #ruby
[21:05:11] pengin: has joined #ruby
[21:05:11] RobertBi_: has joined #ruby
[21:05:33] phutchins: has joined #ruby
[21:07:08] dfockler: has joined #ruby
[21:07:14] hal_9000_: imperator: u there?
[21:07:17] OrbitalK_: has joined #ruby
[21:07:38] imperator: leaving soon, what's up?
[21:07:50] ntln: has joined #ruby
[21:08:21] thiagofm: has joined #ruby
[21:08:34] cntrx: has joined #ruby
[21:12:13] fujimura: has joined #ruby
[21:12:31] choke: has joined #ruby
[21:12:33] wald0: has joined #ruby
[21:15:17] Xeago: has joined #ruby
[21:16:31] mello: has joined #ruby
[21:16:31] mello: has joined #ruby
[21:17:19] baweaver: has joined #ruby
[21:20:02] uris: has joined #ruby
[21:20:54] mrsolo: has joined #ruby
[21:21:04] jwilson: has joined #ruby
[21:22:14] astrobunny: has joined #ruby
[21:22:43] centrx: has joined #ruby
[21:23:29] adaedra: "expected true to respond to `true?`"
[21:23:34] adaedra: rspec, why u do this
[21:23:58] ljarvis: meh, eq > be_*
[21:24:04] ur5us: has joined #ruby
[21:24:05] havenwood: ACTION coughs *minitest*
[21:24:08] Xeago: has joined #ruby
[21:24:18] bin_005: has joined #ruby
[21:24:26] adaedra: I tried, I was not conviced
[21:24:26] tjbiddle: has joined #ruby
[21:24:43] ljarvis: minitest spec + assertions = delightful
[21:24:51] dgutierrez1287: has joined #ruby
[21:25:03] ddfreyne: havenwood: I was a big minitest fan for a long time, but I found that RSpec, when used properly, can be really really awesome.
[21:25:09] KC9YDN: has joined #ruby
[21:25:12] KC9YDN: has joined #ruby
[21:25:12] bgmarx_: has joined #ruby
[21:25:15] imperator: expect(marley) be_jammin
[21:25:17] ddfreyne: (One of my colleagues showed me how to properly use it. It's awesome.)
[21:25:29] plashchynski: has joined #ruby
[21:25:30] ddfreyne: So now for nanoc 4, I'm writing all new spec in RSpec.
[21:25:43] ljarvis: it's better now it has expect(); .should was awful
[21:25:54] zotherstupidguy: has joined #ruby
[21:26:09] mdw: has joined #ruby
[21:26:18] adaedra: so, minitest aside, I should rather `eq(true)` than `be_true`?
[21:26:19] Sou|cutter: it's funny how some people really got rubbed the wrong way by 'expect' when it was introduced
[21:26:28] ljarvis: adaedra: I prefer that myself
[21:26:45] imperator: dunno what advantage expect(x).to be_whatever has over assert_whatevever(x)
[21:26:48] havenwood: ddfreyne: Is it worth it? Minitest ships with Ruby and can't you get the same level of awesome but simpler and kinder to beginners?
[21:26:51] ljarvis: or you can; be_truthy I think
[21:26:58] ddfreyne: adaedra: Yes.
[21:26:58] bricker: does `be_true` work? That would just call a "true?" method which doesn't exist
[21:27:03] Sou|cutter: be_truthy or eq(true)
[21:27:09] Sou|cutter: be_truthy is looser
[21:27:17] ddfreyne: bricker: It doesn't
[21:27:23] ddfreyne: havenwood: I find that it is worth it.
[21:27:28] adaedra: yeah, be_truthy works
[21:27:39] adaedra: why does be_true exists if it doesn't works >_>
[21:27:40] ljarvis: adaedra: be aware that it'll be true for anything that isn't nil or false
[21:27:48] Sou|cutter: adaedra: it doesn't exist
[21:27:54] ljarvis: yeah, it used to exist
[21:27:58] ljarvis: before truthy
[21:28:01] Sou|cutter: it did used to exist
[21:28:49] Sou|cutter: you should get a deprecation warning if you try it on rspec 2.99
[21:29:12] adaedra: I'm on 3.2.3...
[21:29:40] tjbiddle_: has joined #ruby
[21:29:45] adaedra: I got a warning for eq vs equal, not this
[21:29:49] Sou|cutter: yeah, just mentioning for no reason that there was a warning
[21:30:28] adaedra: ???no reason???
[21:30:34] adaedra: that was a good point
[21:30:40] adaedra: there should still be one
[21:30:51] Sou|cutter: deprecation warnings don't live forever
[21:30:59] Sou|cutter: but that is one that would probably help a lot of people
[21:31:22] havenwood: ddfreyne: I think I'd rather go in the direction of Elixir's ExUnit, which I think is simple and elegant and sure has a heck of a lot fewer assertions.
[21:31:57] adaedra: Well, I guess "Don't use be_true" would be clearer than "Undefined true.true?"...
[21:32:19] ddfreyne: havenwood: Whatever works for you!
[21:32:21] ljarvis: meh, who defines true? and false? methods. Their expect object should just handle it
[21:32:35] Sou|cutter: why would somebody new to rspec at this point expect be_true to work in a different way than be_XXX ?
[21:32:40] Sou|cutter: I think that may be the argument
[21:33:07] ddfreyne: I found RSpec's contexts quite useful for catching all cases, and shared_examples to verify that two objects that are supposed to behave the same, actually *do* behave the same.
[21:33:21] ddfreyne: I haven't found a good way to do that in minitest as nicely yet.
[21:33:46] Scripore: has joined #ruby
[21:33:49] adaedra: The thing I don't like the most about rspec is that their HTML report is hideous.
[21:33:51] michaeldeol: has joined #ruby
[21:34:12] Sou|cutter: matchers also give you pretty good output for 'free' (not in terms of perf, but in terms of you having to think about it)
[21:34:28] speakingcode: has joined #ruby
[21:34:44] abyss: has joined #ruby
[21:35:12] stephenh: has joined #ruby
[21:35:39] paulcsmith: has joined #ruby
[21:35:56] ddfreyne: adaedra: Yup, true.
[21:36:15] ddfreyne: Sou|cutter: matchers (and custom ones) are really really nice.
[21:36:34] IanVorn: has joined #ruby
[21:36:36] neanderslob: has joined #ruby
[21:36:37] ddfreyne: I wrote one myself: https://github.com/nanoc/nanoc/blob/master/spec/spec_helper.rb#L26-L49
[21:36:53] adaedra: (I'm sorry, didn't want to start a war about test systems :x )
[21:37:06] adaedra: (I go back to my vim :x )
[21:37:11] michaeldeol: is #ruby-lang no more? and is there plans to update ruby-lang.org with the #ruby irc channel?
[21:37:17] ddfreyne: Why don't you use emacs?
[21:37:17] Filete: has joined #ruby
[21:37:21] jhass: michaeldeol: yes and yes
[21:37:22] ddfreyne: michaeldeol: #ruby and #ruby-lang were merged
[21:38:11] Ox0dea: adaedra: Why do you hate Neovim?
[21:38:29] adaedra: ACTION whispers ???success???
[21:39:16] chrisgeorge: has joined #ruby
[21:39:27] Ox0dea: I run Neovim inside of Spacemacs in the left pane of a tmux window, and Spacemacs inside of Neovim in the right pane.
[21:39:34] EvangelistaT: has joined #ruby
[21:40:40] jhass: where do you run screen though? and fish?
[21:41:24] nateberkopec: has joined #ruby
[21:41:41] miah: surely you have a tmux pane devoted to running a fish shell in a screen session ;)
[21:42:00] Ox0dea: jhass: Surely you misspelled tty1 and zsh.
[21:42:16] sdwrage: has joined #ruby
[21:42:24] jhass: ACTION goes back to porting systemd to minix
[21:42:59] Ox0dea: Would you want module and class definitions to evaluate to symbols or constants?
[21:43:04] centrx: has joined #ruby
[21:43:12] Ox0dea: Hypothetically, because parse.y is fucking scary.
[21:43:24] jhass: no, I'd like them to return the Module and Class instances
[21:43:33] Ox0dea: Which would be the constants, no?
[21:43:44] eggoez: has joined #ruby
[21:44:11] jhass: you can view class Foo as syntax sugar for Foo = Class.new, and an assignment returns its RHS
[21:44:28] adaedra: would you use eq() or equal() for symbols?
[21:44:55] jhass: I'd say default to eq until you need the difference equal provides
[21:45:12] imperator: has left #ruby: ("Leaving")
[21:45:17] gkra: has joined #ruby
[21:46:12] CustosLimen: has joined #ruby
[21:46:27] Ox0dea: jhass: How are they different for Symbols?
[21:46:34] FernandoBasso: has joined #ruby
[21:46:40] Maletor: has joined #ruby
[21:46:44] jhass: I don't follow?
[21:46:53] nateberkope: has joined #ruby
[21:47:03] jhass: they probably aren't
[21:47:14] tubuliferous_: has joined #ruby
[21:47:14] jhass: but the left side could fake it
[21:47:24] EvangelistaT: has left #ruby: ()
[21:47:27] adaedra: you can fake object id?
[21:47:36] Ox0dea: Aye, that's why there's __id__.
[21:47:58] adaedra: eq() it is then
[21:48:09] jhass: well, iirc eq maps to #== iirc and equal to #equal? and the latter is less likely to be overridden by a proxy object
[21:48:21] nonparfumee: has joined #ruby
[21:48:26] blt: has joined #ruby
[21:48:44] blt: has joined #ruby
[21:49:02] terabytest: has joined #ruby
[21:49:06] adaedra: double iirc :)
[21:49:18] Ox0dea: No, #== and #equal? call the same function internally.
[21:49:27] Ox0dea: On Object, anyhow.
[21:49:45] adefa: has joined #ruby
[21:49:49] Zai00: has joined #ruby
[21:49:52] adaedra: well, according to rspec warning, eq() is == and equal() is equal?, which uses the object id
[21:50:13] adaedra: so eq("a", "a") is a yes but not equal("a", "a")
[21:50:18] commondream: has joined #ruby
[21:51:11] Ox0dea: adaedra: That's correct, but such a correspondence doesn't exist for Symbols.
[21:51:31] adaedra: yes, since the symbols have 'fixed' ids, so :a has always the same id
[21:51:51] adaedra: hence my question, is there a preference for one or another, since they do basically the same?
[21:52:30] irk: has joined #ruby
[21:52:56] jhass: the contract is different
[21:53:04] jhass: eq means "an object that is like"
[21:53:07] ValicekB: has joined #ruby
[21:53:10] jhass: equal means "the very same object"
[21:53:32] iamjarvo: has joined #ruby
[21:53:40] jhass: hence proxy objects tend to override the former while keeping the later at the object identity comparison
[21:53:44] pengin: has joined #ruby
[21:54:03] adaedra: so for a symbol I want the very same object, no?
[21:54:03] volty: has joined #ruby
[21:54:23] jhass: I think it's not important hence my first suggestion
[21:54:41] jhass: which is also closer to duck typing, maybe you want to allow an object that just pretends to be a Symbol
[21:54:53] startupality: has joined #ruby
[21:55:38] apt-get_: has joined #ruby
[21:55:46] deric_skibotn: has joined #ruby
[21:56:25] kinduff: has joined #ruby
[21:56:25] kinduff: has joined #ruby
[21:56:27] Scripore: has joined #ruby
[21:57:20] blackmesa: has joined #ruby
[21:59:51] ghr: has left #ruby: ()
[22:02:22] bgmarx: has joined #ruby
[22:02:36] Exponential: has joined #ruby
[22:02:47] davidhq: has joined #ruby
[22:04:31] Sevelina: has joined #ruby
[22:06:27] PaulCapestany: has joined #ruby
[22:07:25] sevvie: has joined #ruby
[22:07:50] zotherstupidguy: has joined #ruby
[22:08:30] bootstrappm: has left #ruby: ()
[22:08:53] k3asd`: has joined #ruby
[22:11:01] A205B064: has joined #ruby
[22:13:04] mdz_: has joined #ruby
[22:13:24] qwertme: has joined #ruby
[22:13:50] rickmasta: has joined #ruby
[22:15:56] Jandre: has joined #ruby
[22:16:22] mister_solo: has joined #ruby
[22:17:22] shock_one: has joined #ruby
[22:17:30] plashchynski: has joined #ruby
[22:18:19] Axsuul: has joined #ruby
[22:19:07] lindii_: has joined #ruby
[22:19:44] e1nh4nd3r: has joined #ruby
[22:20:22] Maxed: has joined #ruby
[22:20:26] malconis: has joined #ruby
[22:21:51] plashchynski: has joined #ruby
[22:22:19] choke: has joined #ruby
[22:22:28] axsuul_: has joined #ruby
[22:22:59] astrobunny: has joined #ruby
[22:23:19] lindii_: where is the syntax error here USER = [:name, profile_attributes: { :location, :status, :content }]
[22:23:40] axsuul_: has joined #ruby
[22:23:44] Rubie: has joined #ruby
[22:24:19] jhass: lindii_: [this, is, an, array], {this => is, a => hash}
[22:24:40] jhass: {or: this, is: a_hash}
[22:24:51] jhass: but {this, is, nothing}
[22:25:08] lindii_: darn im lost with this ruby syntax
[22:26:15] jhass: note that [:foo, bar: {baz: :quux}] is the same as [:foo, {bar: {baz: :quux}}]
[22:26:26] jhass: the { } for the last argument to something are optional
[22:26:32] wldcordeiro: has joined #ruby
[22:26:44] Axsuul: has joined #ruby
[22:27:06] lindii_: jhass: but in my example how is the correct way to write that
[22:27:14] Sevelina: lindii_: If you are lost with Ruby syntax, good luck with other languages syntax.
[22:27:29] jhass: well, I'd have to guess what you actually want, but probably []
[22:27:37] Jandre_: has joined #ruby
[22:27:38] Ox0dea: Sevelina: No, Ruby has one of the most complex syntaxes of any mainstream language.
[22:28:05] Jandre: has joined #ruby
[22:28:10] dmolina: has joined #ruby
[22:28:18] Ox0dea: It's... not an opinion.
[22:28:21] jhass: ruby has few keywords but it exhausts the symbol space pretty much, yeah
[22:28:35] Darkwater: this (isnt).the same(as,this
[22:28:40] lindii_: im confused with symbols
[22:28:40] Darkwater: this (isnt).the same(as).this
[22:28:44] jhass: other languages tend to have more keywords instead
[22:29:24] eam: 10k loc parser not counting oniguruma
[22:29:56] Sevelina: lindii_: Just forget about Ruby and go with Elixir :)
[22:30:09] jhass: heh, wrong channel
[22:30:09] Darkwater: nah man lisp
[22:30:25] Darkwater: (its (just parentheses))
[22:30:39] Darkwater: (cant (go (wrong (am (i (right))))))
[22:30:45] lindii_: is that php?
[22:30:50] Sevelina: Darkwater: What are you even talking about?
[22:30:51] Darkwater: almost but no
[22:31:10] fmcgeough: has joined #ruby
[22:31:15] Darkwater: idk Sevelina, what are you talking about?
[22:31:19] metallicrwr: has joined #ruby
[22:31:58] metallicrwr: has joined #ruby
[22:32:19] Sevelina: Darkwater: You seem to be lost.
[22:32:28] Darkwater: I do not exist
[22:32:30] Sevelina: lindii_: What do you want to do?
[22:32:32] bronson: has joined #ruby
[22:32:34] Darkwater: ACTION makes spooky arm movements
[22:32:51] Sevelina: Too much free time I guess
[22:33:01] WillAmes: has joined #ruby
[22:33:09] Darkwater: time to kill
[22:33:17] Darkwater: wanna go to bed but also wanna finish listening to this song
[22:33:38] Darkwater: and there we go, good night
[22:34:20] lindii_: im just trying ruby
[22:34:46] commondream: has joined #ruby
[22:34:53] jhass: >> [:name, profile_attributes: [:location, :status, :content]]
[22:34:54] ruboto: jhass # => [:name, {:profile_attributes=>[:location, :status, :content]}] (https://eval.in/378626)
[22:34:58] volty: you should learn it a bit, before trying it
[22:35:11] jhass: whether that's what you actually want, *shrug*
[22:35:25] lindii_: which one of both
[22:35:33] jhass: they're the same
[22:35:34] Rubie: has joined #ruby
[22:36:15] Sevelina: lindii_: For what reason? Hobby/Job?
[22:36:30] Sevelina: There are called hashes, the => way is an older way.
[22:36:30] jhass: Sevelina: why's that important?
[22:36:32] wald0: has joined #ruby
[22:36:46] jhass: s/older/general/
[22:37:00] Sevelina: jhass: Older.
[22:37:06] lindii_: Sevelina: hobby
[22:37:18] OrbitalKitten: has joined #ruby
[22:37:28] lindii_: im a lawyer.. nothing to do with programming
[22:37:29] bkxd_: has joined #ruby
[22:37:29] Sevelina: lindii_: Then reconsider my advice.
[22:37:41] Palmer11: has joined #ruby
[22:37:41] Sevelina: lindii_: Learn both Ruby and Elixir.
[22:37:55] volty: why not another then of them ?
[22:38:03] volty: s/then/ten/
[22:38:09] jhass: Sevelina: it's great that you like Elixir, however they picked Ruby and came here for help with it, please respect their choice
[22:38:19] lindii_: like they adopt too many conventions to do one thing
[22:38:25] lindii_: i dont like that
[22:38:51] Sevelina: jhass: You don't know that something exist before someone tells you or you find out.
[22:38:53] paulcsmith: has joined #ruby
[22:38:56] iamninja: has joined #ruby
[22:39:19] Sevelina: lindii_: What is it that you don't like?
[22:39:24] jhass: Sevelina: first time was mentioning it, second time is talking them out
[22:39:36] c355E3B: has joined #ruby
[22:39:47] hotpancakes: has joined #ruby
[22:39:53] jhass: (is that English? it's too late here)
[22:40:17] volty: it's small coinish :)
[22:40:18] lindii_: jhass: i want to define a constant with attributes and a profile object
[22:40:31] lindii_: looks like a profile array
[22:40:48] jhass: lindii_: perhaps you want two structs?
[22:40:49] Sevelina: jhass: Talking them out? I'm a professional Ruby developer for ~8 years. You should try and teach people from your own mistakes rather than whining about it.
[22:41:07] lindii_: jhass: by the way is something im trying with rails
[22:41:14] lindii_: jhass: nesting attributes
[22:41:50] KrzaQ: has joined #ruby
[22:42:35] Sevelina: lindii_: Do you understand the difference between hashes and arrays?
[22:42:49] jhass: lindii_: I agree with Sigma00, you're not having repetition there
[22:43:31] lindii_: hashes = associative arrays
[22:43:55] jhass: well, map is the general term
[22:44:03] jhass: associative array is the PHP term
[22:44:27] havenwood: has joined #ruby
[22:44:27] lindii_: right.. same as dictionaries in python
[22:44:32] Scripore: has joined #ruby
[22:44:33] dorei: isn't hashtable the general term? :p
[22:45:08] eam: hash is a typical implementation of a dictionary and is what most people use to call it generally
[22:45:23] eam: arguably yes but the kids aren't doing it anymore
[22:45:34] idafyaid: has joined #ruby
[22:45:42] eam: iirc php doesn't have an array type
[22:45:49] jhass: dictionary is just what python (and perl I guess? :P) calls it
[22:45:51] eam: it's all an associative map
[22:45:55] hakunin: has joined #ruby
[22:45:57] Sevelina: jhass: And C#.
[22:45:59] eam: perl calls it hash
[22:46:21] volty: I call it ??what's in a name???
[22:46:23] eam: I think python ushered in the "dictionary" terminology, I guess they're trying to distinguish the function from the implementation
[22:46:29] lacrosse__: has joined #ruby
[22:46:40] bkxd: has joined #ruby
[22:46:46] eam: php is crazy land, the "array" there is actually a hash
[22:47:06] jhass: meh, WP why can't you be consistent http://en.wikipedia.org/wiki/Abstract_data_type#Examples_2
[22:47:12] Sevelina: Dictionary? You never hear that in the industry (if you don't work with C# developers).
[22:47:20] plashchynski: has joined #ruby
[22:47:23] babykosh: has joined #ruby
[22:47:28] faitswulff: has joined #ruby
[22:47:40] blue_deref: has joined #ruby
[22:47:56] jhass: "Map" links to "Associative array", sigh
[22:48:07] startupality: has joined #ruby
[22:48:07] eam: jhass: and wikipedia runs on php so there you go
[22:48:20] faitswulff: has left #ruby: ()
[22:48:34] d0lph1n98: has joined #ruby
[22:48:40] jhass: naming things is hard
[22:48:42] jhass: I stick to map
[22:48:47] lindii_: so in ruby {name => "John", age => 37} is the same as {name: "John", age: 37}
[22:48:52] asteros: has joined #ruby
[22:49:04] Sevelina: As it says, it is more a CS term than PHP term. PHP just adopted it.
[22:49:11] JoshGlzBrk: has joined #ruby
[22:49:16] jhass: lindii_: almost, {:name => "John", :age => 37} is the same as {name: "John", age: 37}
[22:49:19] Sevelina: lindii_: Yes.
[22:49:39] jhass: lindii_: the => is the general syntax that works for any object, foo: bar always creates Symbol keys
[22:50:00] avat: has joined #ruby
[22:50:36] avat: Hi guys, I have a question - is this proper way to use dependency injection or not? https://gist.github.com/ZyzioZiom/c7bc2a9a25c38779307e
[22:50:38] jhass: so notice that {"name" => "John", "age" => 37} is a different hash compared to the former two
[22:51:17] lindii_: jhass: you mean :name is not the same as "name"
[22:51:23] volty: distinct keys
[22:51:26] jhass: lindii_: exactly
[22:51:33] baweaver: has joined #ruby
[22:51:34] aaeron: has joined #ruby
[22:51:43] eam: >> [:name.class, "name".class]
[22:51:43] ruboto: eam # => [Symbol, String] (https://eval.in/378629)
[22:51:44] lindii_: though symbols work almost like strings
[22:52:00] rickmasta: has joined #ruby
[22:52:05] aaeron: How shall I have nested threading in ruby?
[22:52:11] aaeron: I have a method
[22:52:18] jhass: lindii_: use Symbols to identify stuff, where you need a name as value. To represent user data use strings
[22:52:21] volty: symbols should be faster than strings
[22:52:21] eam: lindii_: yes it's trivial to convert between the two
[22:52:26] eam: volty: not always!
[22:52:41] volty: for the hashes yes @ea
[22:52:45] adefa: has joined #ruby
[22:52:48] Ox0dea: >> ['foo'.object_id, 'foo'.object_id, :foo.object_id, :foo.object_id]
[22:52:49] ruboto: Ox0dea # => [540651580, 540651680, 417458, 417458] (https://eval.in/378630)
[22:52:59] Sevelina: lindii_: Symbols are immutable. Strings, compared to symbols, when used are new objects. So if you use a string as a key 50 times, you are creating 50 different strings. With symbols, it's 1.
[22:53:47] volty: and encoded, so no comparison is necessary
[22:53:55] Ox0dea: volty: Interned.
[22:54:03] avat: Is this proper way to use dependency injection? https://gist.github.com/ZyzioZiom/c7bc2a9a25c38779307e
[22:54:07] jcaho_m: has joined #ruby
[22:54:07] eam: volty: depends on what you're doing, there were a few bugs which made symbols much slower for certain operations
[22:54:10] miah: >> 'foo'.object_id; 'foo'.object_id
[22:54:11] ruboto: miah # => 546177070 (https://eval.in/378631)
[22:54:12] volty: Ox0dea: thx, all the same
[22:54:17] miah: easy way to show that =)
[22:54:35] miah: though my newline isnt working? werid.
[22:54:41] eam: miah: return a []
[22:54:46] a1fa: has joined #ruby
[22:54:49] miah: anyways, both 'foo' will have different id's; but :foo would always be the same
[22:54:50] volty: @eam: for example?
[22:54:53] a1fa: anyone else get headache from nokogiri?
[22:54:59] jhass: miah: also scroll up :P
[22:55:10] miah: ah, my window is tiny right now =)
[22:55:19] a1fa: i am trying to use nokogiri to paste a simple xml: http://pastebin.com/raw.php?i=RuwZfVfL
[22:55:20] ruboto: a1fa, we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
[22:55:34] [H]unt3r: has joined #ruby
[22:55:48] a1fa: i'm trying to print id,make,new,description
[22:55:50] jhass: a1fa: the bot didn't repost, that means it's at least the second time you used pastebin.com
[22:55:52] volty: a1fa: have not used it much; only headache is that I can't use it with qtruby (and don't know why)
[22:55:59] mark[oz]: has joined #ruby
[22:56:07] Scroff: has joined #ruby
[22:56:12] a1fa: jhass: repasting
[22:56:30] a1fa: https://gist.github.com/anonymous/48f620ed444dea22a342
[22:56:48] a1fa: so i tried with xpath(cars).each
[22:57:07] Channel6: has joined #ruby
[22:57:12] jhass: a1fa: literally? what did you define the local variable or method cars to?
[22:57:15] aaeron: jhass: My nested threads are running multiple times.
[22:57:38] chadwtaylor: has joined #ruby
[22:57:57] jenrzzz: has joined #ruby
[22:58:24] a1fa: jhass: https://gist.github.com/anonymous/8d1f6c0dd9b93957c88f
[22:58:41] a1fa: so with this i was able to print "cars" xmany times
[22:59:03] a1fa: but with xpath('cars') it would not work
[22:59:13] a1fa: or '/cars' for that matter
[22:59:29] eam: volty: for example http://omniref.com/blog/blog/2014/11/12/making-ruby-faster/
[22:59:40] jhass: a1fa: yes, because xpath works differently than CSS
[22:59:49] jhass: a1fa: if you know CSS, why use xpath?
[22:59:52] pengin: has joined #ruby
[23:00:35] a1fa: because i keep going from tutorial to tutorial, and nothing wants to work right :(
[23:00:58] fujimura: has joined #ruby
[23:01:11] jhass: aaeron: uh, my scrollback doesn't seem to have the context for that, so that means and so does my memory ;)
[23:01:17] millerti: has joined #ruby
[23:01:21] tjbiddle: has joined #ruby
[23:01:26] aaeron: jhass, I am getting the code
[23:01:28] aaeron: Will update you
[23:01:31] aaeron: in a moment
[23:01:35] jhass: a1fa: well, what's your actual problem?
[23:01:37] aaeron: thanks for the reply
[23:01:50] volty: eam: thx, interesting.
[23:01:52] a1fa: jhass: not knowing how to read nokogiris documentation for the most part
[23:02:03] fgo: has joined #ruby
[23:02:04] kinduff: I'm developing this gem and I'm adding geocoder gem as a dependency inside my gemspec file. When I add it to my project it's not being grabbed. I'm calling `require 'geocoder'` from lib/gem_name.rb file. Any ideas?
[23:02:33] jhass: a1fa: we can help you with an actual problem, teaching very general things from the ground up is a bit out of scope ;)
[23:02:48] a1fa: so if i do doc.css and i loop through each car, how do i access id attribute in the car?
[23:02:49] Iskarlar: has joined #ruby
[23:03:06] jhass: a1fa: treat the node like a hash
[23:03:11] jhass: car["id"]
[23:03:28] djbkd: has joined #ruby
[23:03:38] a1fa: ACTION tests.
[23:03:44] eam: volty: it's fixed in newer rubies though, so :) but the cost of comparing contiguous areas of memory is so very small it's easy for other aspects of the VM to overshadow -- the trouble with micro-optimizing in a high level language like ruby
[23:03:46] jhass: well, n["id"] in your example
[23:04:08] jhass: a1fa: btw do you know pry? it's great to play and discover an API with it
[23:04:11] a1fa: i'll be damned ;)
[23:04:19] eam: I wrote a binding for a shared memory hash table a few weeks ago. The cost of looking up an ivar is about on par with the entire cost of doing the store/fetch operations entirely
[23:04:29] a1fa: i've heard of pry, have not used it -- i will look it up
[23:04:33] RobertBirnie: has joined #ruby
[23:04:34] jhass: ?pry a1fa
[23:04:34] ruboto: a1fa, Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting ???binding.pry??? directy in your source code. Visit https://pryrepl.org/ or get it now with gem install pry pry-doc
[23:04:46] eam: (because, you know, accessing a variable by name is itself a hashtable operation)
[23:05:13] volty: a1fa: page.xpath('//cars')
[23:05:22] RobertBirnie: has joined #ruby
[23:05:36] mello: has joined #ruby
[23:05:36] mello: has joined #ruby
[23:05:37] jhass: volty: not the same and not the best xpath (avoid // where possible, it's slow) ;)
[23:06:36] jhass: the xpath I'd go with is /cars/car, but why bother if the css selector works for them and is understood
[23:06:50] volty: jhass: I prefer css, but since I noticed he was indexing with only one / ...
[23:09:01] mdz_: has joined #ruby
[23:10:34] dorei: jhass: i use xpaths starting with // all the time without noticable delays. i think that more time is needed to fetch the page than run the xpath query
[23:11:08] Fooster: has joined #ruby
[23:11:17] revoohc: has joined #ruby
[23:11:35] langlands: has joined #ruby
[23:11:38] jhass: yes, still it's good habit to avoid them and learn how to avoid them while doing that, since the day will come that running one on a big XML tree will screw you
[23:13:55] volty: yap, it could matter only if running inside something like web server serving heavy traffic. Btw I do not have memory for slow vs fast ??? I usually (unintentionally) just ignore notions about what is slow or fast.
[23:14:25] mary5030: has joined #ruby
[23:14:39] jhass: developing notions for cheap and expensive helped me
[23:14:50] prereflect: has joined #ruby
[23:15:19] jhass: in this example consider how many nodes /cars/car needs to iterate over and how many nodes //car would need to iterate over to come to the conclusion that there's no match
[23:16:07] volty: ??developing?? is a quite wide paradigm ??? there are high level considerations that could be spoiled (distracted) by low level ones
[23:16:28] volty: never mind, the processors get cheaper and cheaper :)
[23:17:00] volty: and, otherwise, I could stay with c++ if the main purpose is the speed
[23:17:37] jhass: you mean crystal :P
[23:18:13] spider-mario: has joined #ruby
[23:18:28] volty: yap, could be a personal taste, at the end ??? I get distracted by that kind of considerations, other people could just have got used, without burden :)
[23:18:38] zotherstupidguy: has joined #ruby
[23:18:44] zotherstupidguy: has joined #ruby
[23:19:08] Ropeney: has joined #ruby
[23:19:14] jhass: I'm not saying to desperately seek the cheapest solution all the time
[23:19:39] jhass: this was a case for a quite obvious one if you consider what amount of work each has to do
[23:20:23] pengin: has joined #ruby
[23:20:45] Axsuul: has joined #ruby
[23:21:01] a1fa: this really sucks ;(
[23:21:06] volty: I know, I know. I remember you. And I appreciate the advice. The mines were more about some people that I find on scripting langs channels talking all the time about optimizing on speed, speed, speed :)
[23:21:40] Axsuul: has joined #ruby
[23:22:01] a1fa: so docs.xpath('//cars').each doesnt work eaither
[23:22:15] jhass: dorei see what you did!
[23:22:31] Axsuul: has joined #ruby
[23:22:41] jhass: a1fa: again, why not stick to the one that was working?
[23:22:55] jack_rabbit: has joined #ruby
[23:23:11] jhass: dorei: oh, sorry, it was volty with the cars typo
[23:23:42] astrobunny: has joined #ruby
[23:23:43] a1fa: jhass: because i got other elements within it
[23:24:02] vikaton: has joined #ruby
[23:24:03] jhass: a1fa: the (correct) xpath won't change that
[23:25:19] a1fa: so i want to loop through all cars, if i do what i posted
[23:25:39] wallerdev: has joined #ruby
[23:25:55] a1fa: i can only get the car id, cant go back down and get the type, unless i do another doc.css('type')
[23:26:04] a1fa: but then there is no guaruantee you are matching to the correct car
[23:26:05] volty: docs.xpath('//car')
[23:26:17] a1fa: volty: thast didnt work
[23:26:18] atmosx: how's everybody?
[23:26:18] jhass: volty: sigh, really?
[23:26:31] volty: car, singular
[23:26:35] a1fa: and if jhass says it wont help, it wont help :(
[23:26:58] hahuang65: has joined #ruby
[23:26:59] jhass: a1fa: type = car.css('type') (or n.css('type') in your example)
[23:27:46] a1fa: within doc.css?
[23:28:32] al2o3-cr: yes nokogiri very nice
[23:28:40] a1fa: i hate you :)
[23:28:46] jhass: mh, may need a .first or you use car.at('type')
[23:28:51] jhass: I always forget about that
[23:29:03] a1fa: it worked just fine
[23:30:00] Rubie: has joined #ruby
[23:30:15] al2o3-cr: poker lies...
[23:30:39] a1fa: jhass: what is a good way to remove html from string?
[23:31:12] jhass: if you have nokogiri at hand, just use .text
[23:31:31] rubie_: has joined #ruby
[23:32:13] Guest72543: has joined #ruby
[23:32:37] a1fa: n.css('type').text ?
[23:32:52] a1fa: the <description> has html tags </
[23:32:53] jhass: .at('type').text
[23:33:03] x1337807x: has joined #ruby
[23:34:21] ogpastal_: has joined #ruby
[23:34:35] JoshGlzBrk: has joined #ruby
[23:34:41] a1fa: its still doing it
[23:34:53] volty: doing what?
[23:35:01] a1fa: not stripping html
[23:35:03] jhass: so they're like &lt;em&gt; in the source or what?
[23:35:17] jhass: (I don't like all that guessing btw)
[23:35:25] tubuliferous_: has joined #ruby
[23:35:59] a1fa: it stripped <p>
[23:36:03] a1fa: but it didnt strip </p?
[23:36:14] jhass: what's the source
[23:36:21] jhass: source xml
[23:36:45] mistermocha: has joined #ruby
[23:37:20] millerti: has joined #ruby
[23:37:26] tmoor: has joined #ruby
[23:38:26] mistermo_: has joined #ruby
[23:39:13] a1fa: https://gist.github.com/anonymous/a2d6716fe570d1840483
[23:39:39] volty: you cannot strip from CDATA that way
[23:39:40] meph: has joined #ruby
[23:40:07] jhass: could do Nokogiri::HTML(n.at('description').text).text
[23:40:49] volty: though I'm curious why the need to strip from cdata
[23:41:47] a1fa: if i do .at
[23:41:59] a1fa: if i do .at - it only prints the first <description>
[23:42:29] a1fa: eventhough i am looping through all cars by usind doc.css('cars')
[23:42:41] jhass: sounds like you do doc.at
[23:42:52] jhass: instead of n.at
[23:44:00] j4cknewt: has joined #ruby
[23:44:07] a1fa: ok this is now starting to make more sense
[23:44:21] volty: imho .text does not properly handle ctext. (though i am bit tired)
[23:45:07] volty: though it shouldn't handle it at all
[23:47:17] zubov: has joined #ruby
[23:47:28] Yiota: has joined #ruby
[23:47:56] charliesome: has joined #ruby
[23:48:10] ght: Quetsion: I have a ruby app and I need to launch a lightweight web server on the host to accept commands from a separate ruby app, just wondering on thoughts regarding that.
[23:48:17] willharr_: has joined #ruby
[23:48:32] mark[oz]: has joined #ruby
[23:49:00] michael_mbp: has joined #ruby
[23:49:01] volty: http://pastebin.com/33SxhMu6
[23:49:02] ruboto: volty, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/991b6ff6c413f39467a6
[23:49:02] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[23:50:25] kriskropd: has joined #ruby
[23:51:24] djbkd: has joined #ruby
[23:51:27] discord: has joined #ruby
[23:51:37] gambl0re: has joined #ruby
[23:51:56] volty: get that cdata and do whatever with the text by other means
[23:52:38] jbomo: has joined #ruby
[23:53:55] kotk_: has joined #ruby
[23:54:10] volty: ght: could be that somebody is going to answer if you give an example. or at least what kind of commands (ipc, via web ....) ?
[23:55:49] volty: or, in case of ipc, rpc, maybe just omit that one of the apps is a web server, irrelevant
[23:55:55] commondream: has joined #ruby
[23:55:56] hotpancakes: has joined #ruby
[23:56:10] zotherstupidguy: has joined #ruby
[23:59:35] havenwood: has joined #ruby