« Back to channel list

#ruby - 01 March 2016

« Back 1 day Forward 1 day »
[00:00:03] justbleed: has joined #ruby
[00:02:48] sts: I think I'm gonna try with: puts 'Hi %{user}' % { user: 'drbrain' }
[00:02:57] sts: >> puts 'Hi %{user}' % { user: 'drbrain' }
[00:02:58] ruby[bot]: sts: # => Hi drbrain ...check link for more (https://eval.in/527697)
[00:03:46] platzhirsch: has joined #ruby
[00:05:19] uglybandersnatch: has joined #ruby
[00:05:39] baweaver: has joined #ruby
[00:07:10] firstdayonthejob: has joined #ruby
[00:07:16] Eiam_: has joined #ruby
[00:07:23] Renich: has joined #ruby
[00:10:37] trosborn: has joined #ruby
[00:11:02] darix: moin drbrain
[00:11:30] bubbys: has joined #ruby
[00:14:03] drbrain: darix: hi!
[00:14:12] netwoodle: has joined #ruby
[00:15:15] DLSteve: has joined #ruby
[00:16:00] darix: https://rt.cpan.org/Public/Bug/Display.html?id=112559
[00:17:05] kirillzh: has joined #ruby
[00:17:26] ur5us: has joined #ruby
[00:17:45] ur5us: has joined #ruby
[00:19:18] ruby[bot]: -b *!*@172.56.40.97$#ruby-banned
[00:19:39] Rodya_: has joined #ruby
[00:24:09] snowy: has joined #ruby
[00:24:42] askhat: has joined #ruby
[00:24:45] rodfersou: has joined #ruby
[00:25:39] Rodya_: has joined #ruby
[00:26:38] darix: time to fix extension building for 2.3
[00:27:17] Rodya_: has joined #ruby
[00:28:18] trosborn: has joined #ruby
[00:31:33] idefine: has joined #ruby
[00:32:14] trosborn: has joined #ruby
[00:32:19] ruby-lang796: has joined #ruby
[00:34:29] diegoviola: has joined #ruby
[00:34:56] platzhirsch: having a local scoped variable x how can I pass in a condition like == 4 or <= 5 through a block
[00:35:06] platzhirsch: so that I can do if condition.call(x)
[00:35:17] platzhirsch: oh well, there it is. Is there another way to do it? looks legit
[00:35:31] cdg: has joined #ruby
[00:35:46] openstruct: has joined #ruby
[00:36:03] SegFaultAX: `condition = proc { |e| e == 4 }; condition.call(10)`
[00:36:31] SegFaultAX: You can also do condition[10], but that kinda sucks.
[00:36:56] teej: has joined #ruby
[00:38:17] Oxford: SegFaultAX: Does it?
[00:39:02] crystal77: Hello ruby folks! I need some help in just understanding something. So I know all about rbenv/rvm/gemsets. What about projects that don't use any of that? How do I make an isolate enviroment? virtualenv? vagrant? I guess it would be nice to know the gems I install and whatnot are only for that folder, so when I'm done, I don't pollute my system.
[00:39:25] Renich: has joined #ruby
[00:39:38] platzhirsch: SegFaultAX: yeah agreed
[00:40:26] pawnbox: has joined #ruby
[00:40:44] goodcodeguy: has joined #ruby
[00:41:32] cstls`: has joined #ruby
[00:41:33] Renich: has joined #ruby
[00:42:25] Oxford: "Use round brackets to call methods and no one bats an eye. Use square brackets to call functions and everyone loses their minds."
[00:43:03] darkf: has joined #ruby
[00:44:22] Renich: has joined #ruby
[00:45:05] baweaver: has joined #ruby
[00:45:23] Renich: has joined #ruby
[00:45:25] SegFaultAX: Ox0dea: Yes it does
[00:46:16] SegFaultAX: Because if the variable you're using [] with was defined more than a page of code away, then you can no idea what the semantics of the subscript operator are.
[00:46:31] SegFaultAX: Is it calling comething, fetching an item from a hash/array, etc.
[00:46:52] SegFaultAX: .call is obvious and unambiguous.
[00:47:34] Renich: has joined #ruby
[00:48:13] duckpupp1: has joined #ruby
[00:48:17] jottr: has joined #ruby
[00:48:30] cholq: has joined #ruby
[00:50:42] dostoyevsky: has joined #ruby
[00:50:51] dostoyevsky: > \\ud862\\udf46\\u7684\\u540c\\u4f4d\\u7d20".gsub(/((\\u[a-f\d]{4})+)/i) { p $1; a= $1.split('\\u'); p a[1..-1].map{|v| v.to_i(16)}.pack("U")} =~ /\\u/
[00:50:52] Axy: has joined #ruby
[00:50:52] Axy: has joined #ruby
[00:51:04] Renich: has joined #ruby
[00:51:08] dostoyevsky: > ArgumentError: invalid byte sequence in UTF-8
[00:51:56] dostoyevsky: Anybody knowing what's going on there? I try to read a dump from wikidata but I cannot convert the encoded characters...
[00:52:22] apeiros: pack("U*")
[00:52:34] apeiros: could write the whole thing simpler I think
[00:52:38] apeiros: but /me off
[00:52:46] eregi: has joined #ruby
[00:53:09] statelesscode: has joined #ruby
[00:53:26] dostoyevsky: that looks much better...
[00:53:45] Azure: has joined #ruby
[00:54:28] dostoyevsky: > "\\ud862\\udf46\\u7684\\u540c\\u4f4d\\u7d20".gsub(/((\\u[a-f\d]{4})+)/i) { a= $1.split('\\u'); a[1..-1].map{|v| v.to_i(16)}.pack("U*")} =~ /t/
[00:54:41] dostoyevsky: but the error persists: ArgumentError: invalid byte sequence in UTF-8
[00:55:55] apeiros: that'd be because the given string isn't valid.
[00:55:56] strongcode: in IRB, what does the rightmost number on the prompt indicate?
[00:55:59] strongcode: stack level?
[00:56:02] apeiros: >> "\ud862\udf46\u7684\u540c\u4f4d\u7d20".valid_encoding?
[00:56:04] ruby[bot]: apeiros: # => false (https://eval.in/527737)
[00:56:20] astrobun_: has joined #ruby
[00:57:55] kam270: has joined #ruby
[00:59:06] robbyoconnor: has joined #ruby
[00:59:50] Ox0dea: strongcode: "Nesting level" is perhaps a little more appropriate.
[01:00:21] dlitvak: has joined #ruby
[01:00:30] dostoyevsky: apeiros: thanks. I am going to check if I read it the string correctly from the wikidata dump
[01:00:37] strongcode: ah, thank you Ox0dea. I was trying to break things by having recursive default args in a method
[01:00:43] strongcode: and was trying to figure just exactly where I ended up
[01:00:59] Ox0dea: strongcode: That's terrifying! :P
[01:01:25] Ox0dea: It's worth noting that default arguments are evaluated every time you invoke the method.
[01:02:07] strongcode: I thought so
[01:02:17] strongcode: are they evaluated as a proc/lambda?
[01:02:22] lyoshaja_: has joined #ruby
[01:02:27] strongcode: and stored in case the conditional logic calls?
[01:02:33] joneshf-laptop: has joined #ruby
[01:03:55] krzkrzkrz: has joined #ruby
[01:04:29] Ox0dea: strongcode: It's not clear to me how you mean.
[01:04:40] Ox0dea: They're only evaluated if they "take effect", as it were.
[01:05:54] strongcode: so, if i have `def foo(a = bar())`
[01:06:20] strongcode: and i call `foo(2)`, is the bar() call evaluated? Or is it only evaluated if a = nil?
[01:06:28] AustinMatherne: has joined #ruby
[01:06:34] Ox0dea: It's only evaluated if you don't explicitly pass an argument.
[01:06:44] Ox0dea: Passing `nil` would cause `a` to be nil, not whatever `bar` returned.
[01:06:53] lyoshajapan: has joined #ruby
[01:07:28] Rodya_: has joined #ruby
[01:08:15] dostoyevsky: >> "\ud862\ude0f\u7684\u540c\u4f4d\u7d20".valid_encoding?
[01:08:16] ruby[bot]: dostoyevsky: # => false (https://eval.in/527739)
[01:08:31] brijesh: has joined #ruby
[01:08:39] dostoyevsky: alas, that's really what's in the wikidata dump
[01:09:02] Ox0dea: dostoyevsky: http://www.fileformat.info/info/unicode/char/d862/index.htm
[01:09:24] strongcode: >> def foo(arg = foo.send(arg)); puts 'inside foo'; end; foo
[01:09:58] strongcode: did I do something wrong
[01:10:14] darkf_: has joined #ruby
[01:10:31] pawnbox: has joined #ruby
[01:11:52] strongcode: >> puts 'hi'
[01:12:08] dostoyevsky: And also: node > "\ud862\ude0f\u7684\u540c\u4f4d\u7d20" -> '𨨏的同位素'
[01:12:25] spleeze: has joined #ruby
[01:12:51] dostoyevsky: hmmm... I cannot copy & paste that string from node...
[01:13:09] Ox0dea: strongcode: You'll need to register with NickServ.
[01:13:24] dostoyevsky: but node displays "\ud862\ude0f\u7684\u540c\u4f4d\u7d20" just like it's written in wikidata
[01:13:24] Ox0dea: That won't help you with the problem of wanting to invoke a method in its signature, though.
[01:14:08] Rodya_: has joined #ruby
[01:14:12] bronson: has joined #ruby
[01:14:20] strongcode: I want it to break, and it seems to be doing just that in irb
[01:14:25] strongcode: is this a false negative?
[01:15:12] blackmesa: has joined #ruby
[01:15:14] Azure: has joined #ruby
[01:15:30] Mojo_Nixon: has joined #ruby
[01:16:16] Donnie28064212: has joined #ruby
[01:16:19] Ox0dea: strongcode: https://eval.in/527741
[01:16:34] Ox0dea: strongcode: That seems to be doing "the right thing"?
[01:17:06] nofxx: has joined #ruby
[01:17:06] nofxx: has joined #ruby
[01:17:16] rorra: has joined #ruby
[01:17:19] Donnie28064212: s00pcan: Ox0dea what do you mean by "the right thing"?
[01:17:40] bb010g: has joined #ruby
[01:17:47] strongcode: Ox0dea https://eval.in/527742
[01:18:09] strongcode: why are they different if you call it normally vs use foo.send?
[01:18:33] Ox0dea: strongcode: Yours never makes it into the body of the method.
[01:19:41] chouhoul_: has joined #ruby
[01:19:46] augcesar: has joined #ruby
[01:19:51] jeanlinux: has joined #ruby
[01:19:54] bronson: has joined #ruby
[01:19:56] strongcode: I dont understand why yours doesnt fall victim to recursive looping
[01:20:21] Donnie28064212: It does? That is what the output said
[01:20:26] hackeron: has joined #ruby
[01:20:42] Ox0dea: strongcode: This is interesting: https://eval.in/527744
[01:20:53] benlieb: has joined #ruby
[01:20:57] Ox0dea: I've never run into that error from eval.in, but do run it locally to see a strange anomaly.
[01:20:57] strongcode: but he still got `nil` and `:return_value` Donnie28064212
[01:21:28] strongcode: hah, it kicked me out of IRB locally Ox0dea
[01:21:43] Ox0dea: strongcode: Sure, but did you see the TracePoint events being emitted?
[01:21:50] Ox0dea: It gets stuck in `return` rather than `call`.
[01:21:57] ramfjord_: has joined #ruby
[01:22:32] KramerC: has joined #ruby
[01:22:41] Ox0dea: Which would indicate that it is in fact making it into the method body.
[01:22:43] Ox0dea: ¯\_(ツ)_/¯
[01:23:46] alexishuard: has joined #ruby
[01:24:22] strongcode: weird, if you put any statement in the method body it doesnt evaluate it
[01:24:46] Rodya_: has joined #ruby
[01:25:11] jeanlinux: has joined #ruby
[01:25:12] Ropeney: has joined #ruby
[01:28:11] ramfjord: has joined #ruby
[01:29:23] Donnie28064212: has left #ruby: ()
[01:29:28] noodle: has joined #ruby
[01:31:19] trosborn: has joined #ruby
[01:33:55] Ox0dea: strongcode: What's the use case here?
[01:34:16] uglybandersnatch: has joined #ruby
[01:34:21] strongcode: none at all, I was just messing around
[01:34:51] Ox0dea: Well, that's a relief. :P
[01:36:30] dostoyevsky: Seems like ruby is unable to process utf16 strings?
[01:36:49] dostoyevsky: Which is what wikidata is using.. or just emojis
[01:37:05] Ox0dea: >> Encoding::UTF_16 # dostoyevsky
[01:37:06] ruby[bot]: Ox0dea: # => #<Encoding:UTF-16 (dummy) (autoload)> (https://eval.in/527755)
[01:37:26] drbrain: there are two UTF-16 encodings
[01:37:39] Ox0dea: Oh, right.
[01:37:43] dostoyevsky: > Encoding::UTF_16
[01:37:51] dostoyevsky: > "\ud83d\ude0d".valid_encoding? # -> false
[01:37:58] jenrzzz: has joined #ruby
[01:38:21] dostoyevsky: node has no problem with that emoji, though... and they use utf16 natively
[01:39:40] drbrain: dostoyevsky: you need to tell ruby what the encoding is
[01:40:18] drbrain: >> s = "\ud83d\ude0d"; orig_encoding = s.encoding; s.force_encoding Encoding::UTF_16BE; [orig_encoding, s]
[01:40:19] ruby[bot]: drbrain: # => [#<Encoding:UTF-8>, "\uEDA0\uBDED\uB88D"] (https://eval.in/527757)
[01:40:26] pawnbox: has joined #ruby
[01:40:39] drbrain: dostoyevsky: ↑ ruby knows what to do when you tell it the kind of string you have
[01:41:03] drbrain: I should have added s.valid_encoding?, which returns `true`
[01:41:40] dostoyevsky: drbrain: ok, that seems to work now!!
[01:42:04] drbrain: dostoyevsky: yay! (ruby assumes UTF-8 by default)
[01:42:37] drbrain: however, .rb files must be ASCII-compatible, so in that sense ruby doesn't handle UTF-16
[01:42:43] nfk: has joined #ruby
[01:42:59] Ox0dea: So what's going on here? https://eval.in/527758
[01:43:17] drbrain: Ox0dea: that's only half the code-point
[01:43:20] dostoyevsky: The only thing is that I read "\ud83d\ude0d" from that wikidata dump... so I'd like to convert that string... but there is only [].pack("U*") ... so only utf8.. or could I just use force_encoding on that result?
[01:43:43] drbrain: dostoyevsky: what kind of string?
[01:44:14] Rodya_: has joined #ruby
[01:45:31] dostoyevsky: >> s = "\\ud83d\\ude0d".gsub(/((\\u[a-f\d]{4})+)/i) { a= $1.split('\\u'); a[1..-1].map{|v| v.to_i(16)}.pack("U*")}; s.force_encoding Encoding::UTF_16BE; s =~ /t/
[01:45:32] ruby[bot]: dostoyevsky: # => incompatible encoding regexp match (US-ASCII regexp with UTF-16BE string) (Encoding::CompatibilityEr ...check link for more (https://eval.in/527793)
[01:45:51] drbrain: Ox0dea: https://en.wikipedia.org/wiki/Unicode#Character_General_Category
[01:46:02] drbrain: paragraph starting "Code points in the range U+D800–U+DBFF"
[01:46:36] Ox0dea: drbrain: Aye, just needed to see "surrogate pair" again. :)
[01:46:57] drbrain: so if you see "\ud8…" for a UTF-16 string it's like seeing "\xf…" for a UTF-8 string
[01:47:18] Rodya_: has joined #ruby
[01:47:32] drbrain: >> s = "\ud83d\ude0d"; s.force_encoding Encoding::UTF.16BE; s.encode Encoding::UTF_8
[01:47:33] ruby[bot]: drbrain: # => /tmp/execpad-c8bde875a973/source-c8bde875a973:2: no .<digit> floating literal anymore; put 0 before ...check link for more (https://eval.in/527794)
[01:47:46] drbrain: >> s = "\ud83d\ude0d"; s.force_encoding Encoding::UTF_16BE; s.encode Encoding::UTF_8
[01:47:47] ruby[bot]: drbrain: # => "뷭뢍" (https://eval.in/527795)
[01:47:56] drbrain: dostoyevsky: ↑
[01:47:59] Ox0dea: That didn't work?
[01:48:00] dlitvak: has joined #ruby
[01:48:06] dostoyevsky: drbrain: hmmm... that's not a smiley... :)
[01:48:13] drbrain: I did UTF.16BE instead of UTF_16BE
[01:48:15] drbrain: could be LE?
[01:48:21] drbrain: >> s = "\ud83d\ude0d"; s.force_encoding Encoding::UTF_16LE; s.encode Encoding::UTF_8
[01:48:22] dostoyevsky: I am not sure if emojis are available in utf8
[01:48:22] ruby[bot]: drbrain: # => "ꃭ趸" (https://eval.in/527796)
[01:48:30] drbrain: dostoyevsky: they are
[01:49:01] Ox0dea: >> "\ud83d\ude0d" # This is the fundamental problem.
[01:49:02] ruby[bot]: Ox0dea: # => "\xED\xA0\xBD\xED\xB8\x8D" (https://eval.in/527797)
[01:49:03] dostoyevsky: drbrain: interesting, I cannot even c&p emojis from my browser to my utf8 terminal here.. they just become broken characters
[01:49:06] duckpupp1: has joined #ruby
[01:49:20] kies^: has joined #ruby
[01:49:50] Ox0dea: Isn't information being lost?
[01:49:57] drbrain: dostoyevsky: what's the source page you're getting them from?
[01:50:37] astrobun_: has joined #ruby
[01:51:33] drbrain: >> s = "🛳"; [s, s.bytes]
[01:51:34] ruby[bot]: drbrain: # => ["🛳", [240, 159, 155, 179]] (https://eval.in/527798)
[01:52:13] drbrain: >> "🛳".ord.to_s 16
[01:52:14] ruby[bot]: drbrain: # => "1f6f3" (https://eval.in/527799)
[01:52:45] drbrain: ↑ is the higest emoji character, PASSENGER SHIP
[01:53:00] drbrain: following it are alchemical symbols and CJK unified ideographs
[01:53:29] fullofcaffeine: has joined #ruby
[01:53:41] havenwood: >> [128126].pack 'U'
[01:53:42] ruby[bot]: havenwood: # => "👾" (https://eval.in/527800)
[01:54:30] drbrain: dostoyevsky: oh, if it's \u…\u…, but supposed to be a single code-point it might already have been broken
[01:54:49] Ox0dea: As he's pointed out, Node handles it just fine.
[01:55:40] Rodya_: has joined #ruby
[01:56:43] spuk: has joined #ruby
[01:56:47] dostoyevsky: http://pastebin.com/AJZszkpH
[01:56:47] ruby[bot]: dostoyevsky: 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
[01:57:10] dostoyevsky: Over on #unicode they say that javascript's unicode implementation is broken...
[01:57:16] drbrain: ah-ha, it's supposed to be 😍
[01:57:21] Rodya_: has joined #ruby
[01:57:56] Ox0dea: >> "\xf0\x9f\x98\x8d"
[01:57:57] ruby[bot]: Ox0dea: # => "😍" (https://eval.in/527801)
[01:58:04] drbrain: if I use "\xd8\x3d\xde\x0d" instead of "\ud83d\ude0d"
[01:58:15] mattwildig: has joined #ruby
[01:58:17] drbrain: then I can s.force_encoding Encoding::UTF_16BE
[01:58:25] ensyde_: has joined #ruby
[01:58:26] drbrain: and I get "\u{1F60D}"
[01:58:45] rodolfowtf: has joined #ruby
[01:58:48] drbrain: libedit seems to have a problem displaying ↑, but it is an emoji
[01:59:04] drbrain: (and a valid unicode code-point
[01:59:09] platzhirsch: has left #ruby: ()
[01:59:31] drbrain: oh, right, I have to puts s.encode Encoding::UTF_8
[01:59:45] drbrain: dostoyevsky: ↑
[02:00:55] benlieb: has joined #ruby
[02:01:51] goodcodeguy: has joined #ruby
[02:01:56] stardiviner: has joined #ruby
[02:02:27] drbrain: dostoyevsky: so I think your input to ruby, "\ud83d\ude0d", is already corrupt and should be "\u{1f60d}"
[02:02:38] ramfjord: has joined #ruby
[02:02:54] drbrain: but you can swap out \u.... for \x..\x.. and get something that works with a force_encoding
[02:03:15] drbrain: or, the \u from where you're getting it has a different meaning that ruby's \u
[02:04:06] dostoyevsky: drbrain: maybe because it's a json dump, the JS \u semantics are used too.. and that's why it's no problem for me to display these dump strings in node..
[02:04:41] hxegon: has joined #ruby
[02:04:46] Rodya_: has joined #ruby
[02:04:56] drbrain: that explains it
[02:06:07] drbrain: >> require 'json'; JSON.parse '["\ud83d\ude0d"]'
[02:06:09] ruby[bot]: drbrain: # => ["😍"] (https://eval.in/527810)
[02:06:25] drbrain: you have a JSON string, so you need to JSON.parse it
[02:06:41] drbrain: see the fourth paragraph of section 7 (Strings): https://tools.ietf.org/html/rfc7159
[02:07:00] drbrain: starting "To escape an extended character that is not in the Basic Multilingual Plane"
[02:07:32] drbrain: and I bet node uses JSON string semantics because they're both JavaScript-based
[02:07:41] Rodya_: has joined #ruby
[02:08:03] cassioscabral: has joined #ruby
[02:09:32] drbrain: the whole section on strings makes we facepalm
[02:10:24] drbrain: "we don't support UTF-8, except for the basic multilingual plane, so you have to do this kludgy workaround to write arbitrary Unicode characters"
[02:10:54] drbrain: I may be not quite right on that
[02:11:01] havenwood: http://codeology.braintreepayments.com/ruby/ruby
[02:11:43] goodcodeguy: has joined #ruby
[02:13:50] drbrain: ok, so you can have any utf-8 character in JSON, but when you escape a character from beyond the basic multilingual plane they do this weird thing
[02:17:07] Rodya_: has joined #ruby
[02:17:56] dome22xl: has joined #ruby
[02:17:56] dostoyevsky: drbrain: yeah.. now I can see that smiley in ruby too!!! :)
[02:19:40] kirillzh: has joined #ruby
[02:20:03] crystal77: has joined #ruby
[02:21:04] dostoyevsky: >> JSON.parse('["\\ud83d\\ude0d"]')
[02:21:05] ruby[bot]: dostoyevsky: # => uninitialized constant JSON (NameError) ...check link for more (https://eval.in/527816)
[02:21:15] nanoz: has joined #ruby
[02:21:16] dostoyevsky: >> require 'json'; JSON.parse('["\\ud83d\\ude0d"]')
[02:21:17] ruby[bot]: dostoyevsky: # => ["😍"] (https://eval.in/527817)
[02:21:21] kirillzh: has joined #ruby
[02:22:27] justin_pdx: has joined #ruby
[02:23:49] krzkrzkrz: has joined #ruby
[02:26:27] shanemcd_: has joined #ruby
[02:27:59] ohaibbq: has joined #ruby
[02:28:00] jenrzzz: has joined #ruby
[02:28:22] pdoherty: has joined #ruby
[02:29:22] swills: has joined #ruby
[02:30:33] pawnbox: has joined #ruby
[02:30:45] Channel6: has joined #ruby
[02:31:15] eregi: has joined #ruby
[02:31:34] baweaver: has joined #ruby
[02:31:51] elifoster: has joined #ruby
[02:32:19] Rodya_: has joined #ruby
[02:32:47] matcouto: has joined #ruby
[02:34:57] idefine: has joined #ruby
[02:35:49] bluOxigen_: has joined #ruby
[02:37:44] uglybandersnatch: has joined #ruby
[02:38:19] nbdy: has joined #ruby
[02:39:42] cholq: has joined #ruby
[02:40:34] Rodya_: has joined #ruby
[02:41:08] jenrzzz: has joined #ruby
[02:42:08] dlitvak: has joined #ruby
[02:42:24] bronson: has joined #ruby
[02:45:15] krzkrzkrz: has joined #ruby
[02:45:18] Rodya_: has joined #ruby
[02:45:47] dopamean_: has joined #ruby
[02:47:14] cholq: has joined #ruby
[02:48:19] Rodya_: has joined #ruby
[02:49:42] duckpupp1: has joined #ruby
[02:51:34] aaeron: has joined #ruby
[02:53:02] Guest34101: has joined #ruby
[02:57:36] ericn81: has joined #ruby
[02:57:40] eurialo_: has joined #ruby
[02:58:04] william3: has joined #ruby
[02:58:35] aryaching: has joined #ruby
[03:00:29] cholq: has left #ruby: ("WeeChat 0.4.0")
[03:00:51] pawnbox: has joined #ruby
[03:01:10] DmitryBochkarev: has joined #ruby
[03:06:14] sneakerhax: has joined #ruby
[03:12:12] shevy: https://www.youtube.com/watch?v=fGFM_UrSp70
[03:12:45] shevy: my world is shattered
[03:12:50] shevy: (1..100).map(&:to_s) is faster than (1..100).map {|i| i.to_s }
[03:15:16] uglybandersnatch: has joined #ruby
[03:15:23] stolid: has joined #ruby
[03:21:19] rorra: has joined #ruby
[03:21:20] dhollinger: has joined #ruby
[03:24:25] statelesscode: has joined #ruby
[03:24:28] shevy: And {:bar => :uco }.fetch(:bar, (0..9).to_a) is slower than {:bar => :uco }.fetch(:bar) { (0..9).to_a }
[03:27:38] freerobby: has joined #ruby
[03:28:49] bronson: has joined #ruby
[03:29:09] astrobun_: has joined #ruby
[03:30:35] sushi_: has joined #ruby
[03:35:50] sushi_: has joined #ruby
[03:36:26] dlitvak: has joined #ruby
[03:36:42] djbkd: has joined #ruby
[03:38:37] kp666: has joined #ruby
[03:39:03] pawnbox: has joined #ruby
[03:41:24] shadoi: has joined #ruby
[03:47:03] Renich: has joined #ruby
[03:50:29] duckpupp1: has joined #ruby
[03:51:35] allcentury: has joined #ruby
[03:52:43] UtkarshRay: has joined #ruby
[03:54:34] sushi_: has joined #ruby
[03:55:37] segy: has joined #ruby
[03:55:50] chouhoulis: has joined #ruby
[03:56:14] eurialo_: has joined #ruby
[03:58:27] teejayen: has joined #ruby
[04:00:28] Vingador: has joined #ruby
[04:02:50] peteyg: has joined #ruby
[04:05:23] devbug: has joined #ruby
[04:06:30] hahuang65: has joined #ruby
[04:06:50] allcentury: has joined #ruby
[04:07:17] eregi: has joined #ruby
[04:07:54] zast: has joined #ruby
[04:10:46] Guest34101: has joined #ruby
[04:11:31] julieeharshaw: has joined #ruby
[04:12:44] braincrash: has joined #ruby
[04:13:28] ensyde_: has joined #ruby
[04:13:48] allcentury: has joined #ruby
[04:14:59] shanemcd_: has joined #ruby
[04:15:58] sushi_: has joined #ruby
[04:16:40] gix: has joined #ruby
[04:19:06] anaeem1: has joined #ruby
[04:23:23] aupadhye: has joined #ruby
[04:25:34] LoneHerm_: has joined #ruby
[04:26:12] sneakerhax: has joined #ruby
[04:27:12] shadoi: has joined #ruby
[04:29:57] HakN99: has joined #ruby
[04:30:34] darkf_: has joined #ruby
[04:30:34] dlitvak: has joined #ruby
[04:31:20] shadoi: has joined #ruby
[04:32:44] shadoi: has joined #ruby
[04:36:41] pawnbox: has joined #ruby
[04:39:06] Pupp3tm4st3r: has joined #ruby
[04:40:39] nachoman: has joined #ruby
[04:43:05] Maako: has joined #ruby
[04:43:26] Maako: has left #ruby: ()
[04:46:31] rdavila: has joined #ruby
[04:47:43] nerium: has joined #ruby
[04:49:13] krobzaur: has joined #ruby
[04:49:59] bronson: has joined #ruby
[04:51:14] duckpupp1: has joined #ruby
[04:52:52] astrobun_: has joined #ruby
[04:58:52] cpup: has joined #ruby
[04:59:21] fedexo: has joined #ruby
[04:59:33] shevy: https://github.com/ash-shell/ash huh - they even use yaml files too
[04:59:45] shevy: ash for bash, uby for ruby
[04:59:55] Renich: has joined #ruby
[05:02:23] uglybandersnatch: has joined #ruby
[05:03:23] rkazak: has joined #ruby
[05:04:26] anonyanoy: has joined #ruby
[05:04:37] anonyanoy: has left #ruby: ()
[05:05:23] Maletor: has joined #ruby
[05:06:06] llua: https://en.wikipedia.org/wiki/Almquist_shell
[05:06:41] floatingpoint: has joined #ruby
[05:06:43] kam270: has joined #ruby
[05:09:29] kam270: has joined #ruby
[05:10:44] skweek: has joined #ruby
[05:11:27] hahuang65: has joined #ruby
[05:11:28] krzkrzkrz: has joined #ruby
[05:13:02] pawnbox: has joined #ruby
[05:19:31] UtkarshRay: has joined #ruby
[05:20:04] bmalum: has joined #ruby
[05:20:49] eregi: has joined #ruby
[05:21:03] rickmasta: has joined #ruby
[05:23:17] eam: your ash is bash
[05:23:27] eam: and I'm the lawnmower man
[05:23:29] Ropeney: has joined #ruby
[05:24:26] dlitvak: has joined #ruby
[05:24:30] baweaver: has joined #ruby
[05:25:32] ensyde_: has joined #ruby
[05:32:42] mattwildig: has joined #ruby
[05:34:55] djbkd: has joined #ruby
[05:36:08] LoneHerm_: has joined #ruby
[05:41:52] cpup: has joined #ruby
[05:41:55] DoubleMalt: has joined #ruby
[05:42:13] chipotle: has joined #ruby
[05:42:14] allcentury: has joined #ruby
[05:48:34] ur5us: has joined #ruby
[05:50:42] counterapparatus: has joined #ruby
[05:51:23] pawnbox: has joined #ruby
[05:51:43] Asher: has joined #ruby
[05:51:44] PlasmaStar: has joined #ruby
[05:52:00] duckpupp1: has joined #ruby
[05:54:00] nw: has joined #ruby
[05:54:35] BtcBen: Is there a way to make rake tasks continue even if an error occurs?
[05:55:23] BtcBen: should prob ask in ror
[05:56:48] jeanlinux: has joined #ruby
[05:57:26] benlieb: has joined #ruby
[05:59:13] devbug_: has joined #ruby
[06:05:03] uglybandersnatch: has joined #ruby
[06:05:53] justin_pdx: has joined #ruby
[06:06:48] ur5us: has joined #ruby
[06:07:46] ramfjord: has joined #ruby
[06:11:53] sauvin: has joined #ruby
[06:16:15] shanemcd_: has joined #ruby
[06:18:38] dlitvak: has joined #ruby
[06:21:32] Puffball: has joined #ruby
[06:22:21] pawnbox: has joined #ruby
[06:22:48] dome22xl: has joined #ruby
[06:32:28] devbug__: has joined #ruby
[06:35:23] lxsameer: has joined #ruby
[06:36:19] intrigueD: has joined #ruby
[06:38:53] codecop: has joined #ruby
[06:39:43] the_drow: has joined #ruby
[06:42:21] jayc0b0: has joined #ruby
[06:43:25] drbrain: BtcBen: if you expect an error from a task then that task should handle it with begin/rescue/end
[06:43:31] jenrzzz: has joined #ruby
[06:43:42] ur5us: has joined #ruby
[06:44:01] BtcBen: I got it fixed, thanks though drbrain
[06:44:56] graffix222: has joined #ruby
[06:49:16] dopie: has joined #ruby
[06:50:10] JimmytheNewKid: has joined #ruby
[06:52:43] duckpupp1: has joined #ruby
[06:52:47] vdamewood: has joined #ruby
[06:54:27] JimmytheNewKid: has left #ruby: ()
[06:55:56] dlitvak: has joined #ruby
[06:56:10] uglybandersnatch: has joined #ruby
[06:56:26] terminal_: has joined #ruby
[06:57:12] jeanlinux: has joined #ruby
[07:02:13] crdpink: has joined #ruby
[07:02:39] krzkrzkrz: has joined #ruby
[07:03:00] Mon_Ouie: has joined #ruby
[07:03:49] [spoiler]: has joined #ruby
[07:03:49] Maletor: has joined #ruby
[07:04:08] Disavowed: has joined #ruby
[07:04:52] cnrroxx: has joined #ruby
[07:05:52] ramfjord: has joined #ruby
[07:05:54] Macaveli: has joined #ruby
[07:08:32] KreeK: has joined #ruby
[07:15:52] TBAA: has joined #ruby
[07:17:20] vernetit: has joined #ruby
[07:17:56] nw: has joined #ruby
[07:18:22] rkazak: has joined #ruby
[07:20:17] snowy: has joined #ruby
[07:20:26] scepticulous: has joined #ruby
[07:20:57] pawnbox: has joined #ruby
[07:22:10] cnr_roxx: has joined #ruby
[07:22:12] solars: has joined #ruby
[07:24:16] LoneHermit: has joined #ruby
[07:24:30] arup_r: has joined #ruby
[07:27:39] MrDoctor: has joined #ruby
[07:33:42] crankharder: has joined #ruby
[07:33:44] mattwildig: has joined #ruby
[07:37:18] PlasmaStar: has joined #ruby
[07:37:52] infoget: has joined #ruby
[07:39:05] firstdayonthejob: has joined #ruby
[07:39:21] tAn: has joined #ruby
[07:41:10] tjbiddle: has joined #ruby
[07:43:12] chipotle: has joined #ruby
[07:43:34] andikr: has joined #ruby
[07:43:39] lvn: has joined #ruby
[07:44:19] lvn: has joined #ruby
[07:45:38] sp4rrow: has joined #ruby
[07:46:49] nixmaniack: has joined #ruby
[07:47:08] symm-: has joined #ruby
[07:47:11] htmldrum: has joined #ruby
[07:48:44] al2o3-cr: has joined #ruby
[07:50:36] aganov: has joined #ruby
[07:50:56] bronson: has joined #ruby
[07:53:27] duckpupp1: has joined #ruby
[07:54:04] anisha: has joined #ruby
[07:54:26] Pupp3tm4st3r: has joined #ruby
[07:55:25] djbkd: has joined #ruby
[07:57:12] trosborn: has joined #ruby
[07:57:23] steffkes: has joined #ruby
[08:00:24] jeanlinux: has joined #ruby
[08:00:39] rigel_: has joined #ruby
[08:01:02] kenndel_: has joined #ruby
[08:01:22] diprotic: has joined #ruby
[08:01:23] diprotic: has joined #ruby
[08:01:58] william3: has joined #ruby
[08:03:47] mfaeh: has joined #ruby
[08:04:03] Guest-ru: has joined #ruby
[08:05:44] pawnbox: has joined #ruby
[08:05:56] vondruch: has joined #ruby
[08:06:14] last_staff: has joined #ruby
[08:06:26] solars: has joined #ruby
[08:07:52] jas02: has joined #ruby
[08:08:24] allcentury: has joined #ruby
[08:09:39] nixmaniack: has joined #ruby
[08:10:06] colegatron: has joined #ruby
[08:10:18] kies: has joined #ruby
[08:13:54] mark4: has joined #ruby
[08:15:55] astrobun_: has joined #ruby
[08:16:47] emilkarl: has joined #ruby
[08:18:05] skade: has joined #ruby
[08:21:51] aufi: has joined #ruby
[08:25:34] graffix222: has joined #ruby
[08:25:37] mhoungbo: has joined #ruby
[08:26:18] platzhirsch: has joined #ruby
[08:27:16] terlar: has joined #ruby
[08:27:28] rigel_: has joined #ruby
[08:28:34] soc42: has joined #ruby
[08:29:00] Spami: has joined #ruby
[08:30:25] Ox0dea: Bon morgen et guten jour.
[08:31:38] TomyWork: has joined #ruby
[08:31:57] htmldrum: has joined #ruby
[08:33:30] tesuji: has joined #ruby
[08:33:38] tesuji: has joined #ruby
[08:34:28] kfpratt: has joined #ruby
[08:34:35] vondruch: has joined #ruby
[08:36:14] dlitvak: has joined #ruby
[08:36:59] ixti: has joined #ruby
[08:37:41] baweaver: has joined #ruby
[08:37:47] DoubleMalt: has joined #ruby
[08:38:20] robbyoconnor: has joined #ruby
[08:41:22] biberu: has joined #ruby
[08:42:43] dede: has joined #ruby
[08:42:49] shaman42: has joined #ruby
[08:47:52] platzhirsch: Ox0dea: Aloha
[08:48:10] Xeago: has joined #ruby
[08:49:16] Ox0dea: platzhirsch: Freman nur, s'il vous plait.
[08:52:13] n008f4g_: has joined #ruby
[08:54:23] duckpupp1: has joined #ruby
[08:56:24] Pupp3tm4_: has joined #ruby
[08:56:37] mikecmpbll: has joined #ruby
[08:56:53] tvw: has joined #ruby
[08:58:22] hayden_: has joined #ruby
[08:59:14] atmosx: has joined #ruby
[08:59:37] crankharder: has joined #ruby
[09:02:27] graffix222: has joined #ruby
[09:04:11] toretore: has joined #ruby
[09:04:34] laith: has joined #ruby
[09:07:54] rdark: has joined #ruby
[09:08:15] mlehrer: has joined #ruby
[09:08:58] jenrzzz: has joined #ruby
[09:09:22] atmosx_: has joined #ruby
[09:10:21] aryaching: has joined #ruby
[09:10:49] sepp2k: has joined #ruby
[09:11:25] jeanlinux: has joined #ruby
[09:12:07] astrobun_: http://davidsiaw.github.io/weaver-docs/
[09:12:27] rigel_: has joined #ruby
[09:12:40] the_drow: has joined #ruby
[09:12:41] platzhirsch: has left #ruby: ()
[09:13:19] _www-bukolay-com: has joined #ruby
[09:13:30] ferr: has joined #ruby
[09:16:06] Couch: has joined #ruby
[09:20:23] lukebyrne: has joined #ruby
[09:20:29] htmldrum: has joined #ruby
[09:21:54] marr: has joined #ruby
[09:22:38] ziyadb: has joined #ruby
[09:23:31] thevaliantx: has joined #ruby
[09:27:34] pandaant: has joined #ruby
[09:27:56] william3: has joined #ruby
[09:30:44] Pupp3tm4st3r: has joined #ruby
[09:32:37] Danishman: has joined #ruby
[09:32:40] lxsameer: has joined #ruby
[09:33:03] FooMunki: has joined #ruby
[09:34:26] mattwildig: has joined #ruby
[09:34:45] i8igmac: has joined #ruby
[09:34:51] blackmesa: has joined #ruby
[09:35:11] pawnbox: has joined #ruby
[09:35:41] i8igmac: has joined #ruby
[09:38:08] Xeago: has joined #ruby
[09:39:35] tomphp: has joined #ruby
[09:39:52] shanemcd_: has joined #ruby
[09:40:59] blaxter: has joined #ruby
[09:46:23] hahuang65: has joined #ruby
[09:46:49] jeanlinux: has joined #ruby
[09:48:13] solars: has joined #ruby
[09:49:39] solars: has joined #ruby
[09:50:01] jenrzzz: has joined #ruby
[09:50:45] htmldrum: has joined #ruby
[09:53:09] UtkarshRay: has joined #ruby
[09:54:35] troulouliou_div2: has joined #ruby
[09:54:58] duckpupp1: has joined #ruby
[09:55:01] chipotle: has joined #ruby
[09:56:49] allcentury: has joined #ruby
[09:57:00] evidex: has joined #ruby
[09:57:06] binaryplease: has joined #ruby
[09:57:17] jeanlinux: has joined #ruby
[09:59:26] Xeago: has joined #ruby
[09:59:53] htmldrum: has joined #ruby
[10:01:27] justin_pdx: has joined #ruby
[10:01:51] solars: quick question, having a subclass like this: https://gist.github.com/solars/472e905dc202a2772ba1 how can I make the defined? check work, so that I do not have to re-implement say_hello in each subclass but simply check if the const is defined or not?
[10:03:37] apeiros: uh, what? you shouldn't get that exception
[10:03:48] apeiros: at least if I run your very own code, I don't get one.
[10:04:07] ljarvis: they dont get it
[10:04:16] hahuang65: has joined #ruby
[10:04:19] ljarvis: they're asking how they check if B::MYCONST is defined
[10:04:32] ljarvis: e.g. if it's not, don't call the say_hello from the superclass
[10:04:35] apeiros: read the gist
[10:04:45] apeiros: says "NameError: uninitialized constant B::MYCONST"
[10:04:48] nixmaniack: has joined #ruby
[10:04:54] ljarvis: yeah that except won't happen
[10:05:03] ljarvis: ugh is it monday
[10:05:21] adaedra: It's written "Mar" on my clock, so it seems not
[10:05:38] pawnbox: has joined #ruby
[10:06:17] apeiros: ACTION waits for clarification by solars
[10:06:25] ljarvis: ACTION waits for the weekend
[10:06:37] apeiros: ACTION waits for godot
[10:07:02] adaedra: ACTION waits for chtulu
[10:07:51] apeiros: chtulu moved on
[10:08:15] adaedra: Looks like I missed a h
[10:08:33] AlexRussia: has joined #ruby
[10:09:06] graffix222: has joined #ruby
[10:09:16] apeiros: looks like an abandoned question. lovely. I'm out.
[10:10:22] workmad3: has joined #ruby
[10:13:19] solars: sorry, I figured out that was a redundant question
[10:13:46] vondruch: has joined #ruby
[10:14:14] ur5us: has joined #ruby
[10:14:39] dlitvak_: has joined #ruby
[10:16:03] apeiros: well, nice that you decided to let us know.
[10:16:36] solars: apeiros, well, people have to work sometimes, right - this is irc not a phone call
[10:16:46] platzhirsch: has joined #ruby
[10:17:06] solars: apologies for letting you wait
[10:17:12] apeiros: solars: sure. knowing your priorities I'll adjust mine wrt to questions from you.
[10:17:29] dlitvak_: has joined #ruby
[10:18:28] solars: apeiros, that's no problem, I know what to expect
[10:20:25] allcentury: has joined #ruby
[10:22:31] dlitvak: has joined #ruby
[10:24:33] shinnya: has joined #ruby
[10:29:14] Ishido: has joined #ruby
[10:29:18] howdoi: has joined #ruby
[10:29:20] Ropeney: has joined #ruby
[10:30:34] htmldrum: has joined #ruby
[10:32:02] Gasher: has joined #ruby
[10:36:02] troulouliou_div2: has joined #ruby
[10:37:08] graffix222: has joined #ruby
[10:37:09] DexterLB: has joined #ruby
[10:38:00] n008f4g_: has joined #ruby
[10:39:26] blackms: has joined #ruby
[10:39:56] htmldrum: has joined #ruby
[10:41:04] Xeago: has joined #ruby
[10:41:16] tvw: has joined #ruby
[10:41:38] Xeago: has joined #ruby
[10:42:22] norc_: has joined #ruby
[10:45:12] htmldrum: has joined #ruby
[10:45:49] Xeago: has joined #ruby
[10:46:11] flughafen: has joined #ruby
[10:50:13] pschichtel: has joined #ruby
[10:51:57] pschichtel: Hi! I'm using IPAddr to work with IP addresses and I'd like to get the subnet mask from the CIDR notation (e.g. 10.0.8.0/21 -> 255.255.248.0). I couldn't find a property/method, but to_s will contain the mask. How can I get it?
[10:52:44] jenrzzz: has joined #ruby
[10:53:54] bronson: has joined #ruby
[10:55:43] duckpupp1: has joined #ruby
[10:59:56] LoneHermit: has joined #ruby
[11:00:26] alexherbo2: has joined #ruby
[11:05:36] trinaldi: has joined #ruby
[11:07:52] uglybandersnatch: has joined #ruby
[11:09:09] inukshuk_: has joined #ruby
[11:09:25] c355E3B: has joined #ruby
[11:14:14] shanemcd_: has joined #ruby
[11:17:03] Guest00-ru: has joined #ruby
[11:18:54] rodfersou: has joined #ruby
[11:20:31] blackmesa: has joined #ruby
[11:23:21] agent_white: has joined #ruby
[11:26:02] Trynemjoel: has joined #ruby
[11:29:25] ljarvis: pschichtel: check out the source for IPAddr#to_s ? If it includes it then there's probably clues
[11:31:36] Ropeney: has joined #ruby
[11:32:13] ldnunes: has joined #ruby
[11:33:27] Hanmac: pschichtel: yeah that feature seems to be missing ... i will make a ticket about it later: for now you can add it yourself:
[11:33:27] Hanmac: >> require "ipaddr"; class IPAddr; def mask_addr; _to_string(@mask_addr); end; end; IPAddr.new("10.0.8.0/21").mask_addr
[11:33:44] Hanmac: >>require "ipaddr"; class IPAddr; def mask_addr; _to_string(@mask_addr); end; end; IPAddr.new("10.0.8.0/21").mask_addr
[11:33:46] ruby[bot]: hanmac: # => "255.255.248.0" (https://eval.in/528101)
[11:34:36] pschichtel: hanmac: yep the mask_addr is private, just found out
[11:35:16] openstruct: has joined #ruby
[11:35:19] mattwildig: has joined #ruby
[11:36:36] Ishido: has joined #ruby
[11:36:41] karapetyan: has joined #ruby
[11:36:59] laith: has joined #ruby
[11:38:40] i8igmac: has joined #ruby
[11:38:44] dionysus69: has joined #ruby
[11:40:33] evidex: has joined #ruby
[11:45:54] TTilus: has joined #ruby
[11:46:01] zenlot: has joined #ruby
[11:47:45] chipotle: has joined #ruby
[11:48:14] zotherstupidguy: has joined #ruby
[11:51:38] pawnbox: has joined #ruby
[11:51:40] thevaliantx: has joined #ruby
[11:51:46] platzhirsch: has joined #ruby
[11:53:56] adgtl: has joined #ruby
[11:53:56] adgtl: has joined #ruby
[11:54:35] shanemcd_: has joined #ruby
[11:54:42] jenrzzz: has joined #ruby
[11:55:08] kgutteridge: has joined #ruby
[11:56:04] bronson: has joined #ruby
[11:56:38] duckpupp1: has joined #ruby
[11:59:22] sdothum: has joined #ruby
[11:59:34] skade: has joined #ruby
[12:00:54] darix: pschichtel: require 'ipaddress' ; IPAddress::IPv4.new("10.0.8.0/21").netmask
[12:02:09] johnmilton: has joined #ruby
[12:02:56] dlitvak: has joined #ruby
[12:02:58] tulak: has joined #ruby
[12:03:05] blackmesa: has joined #ruby
[12:03:39] verdan: has joined #ruby
[12:04:36] shanemcd_: has joined #ruby
[12:07:09] darix: if you want it a not caring about v4 vs v6: require 'ipaddress' ; IPAddress.parse("10.0.8.0/21").netmask
[12:09:59] Domaldel: has joined #ruby
[12:10:58] evidex: has joined #ruby
[12:12:57] allcentury: has joined #ruby
[12:15:04] arup_r: has joined #ruby
[12:17:33] Aswebb_: has joined #ruby
[12:19:21] trinaldi: has joined #ruby
[12:20:56] sgambino: has joined #ruby
[12:21:51] emilkarl: has joined #ruby
[12:26:21] biberu\: has joined #ruby
[12:27:18] emilkarl: has joined #ruby
[12:29:38] biberu: has joined #ruby
[12:33:51] krzkrzkrz: has joined #ruby
[12:35:18] BSaboia: has joined #ruby
[12:39:01] Lobosque: has joined #ruby
[12:40:36] Lobosque: I'm new to ruby. How do I change the return value of a method for testing? the method isn't inside a class.
[12:41:40] Snowy_: has joined #ruby
[12:41:53] apeiros: ?toolbox Lobosque
[12:41:53] ruby[bot]: Lobosque: https://www.ruby-toolbox.com is a website which lists lots of gems, topically organized
[12:42:02] apeiros: search for stub, mock, testdouble
[12:42:22] apeiros: those things enable you to easily change methods for the time of a single test
[12:43:20] joneshf-laptop: has joined #ruby
[12:45:31] Lobosque: I can't find a single example of mocha stubbing a method without a class
[12:46:40] apeiros: you probably can replace SomeClass in the examples with some_object.singleton_class then
[12:48:36] pawnbox: has joined #ruby
[12:49:14] rikkipitt: has joined #ruby
[12:49:49] adgtl: has joined #ruby
[12:53:25] jeanlinux: has joined #ruby
[12:53:38] binaryplease: has joined #ruby
[12:53:46] adgtl: has joined #ruby
[12:55:02] dgncn: has joined #ruby
[12:55:14] tulak: has joined #ruby
[12:57:08] pawnbox: has joined #ruby
[12:57:12] duckpupp1: has joined #ruby
[12:58:01] Lobosque: how am I supposed to access a class variable? https://repl.it/BrgJ
[13:00:52] inukshuk_: has joined #ruby
[13:01:14] Pupp3tm4st3r: has joined #ruby
[13:01:57] adaedra: Lobosque: https://eval.in/528150
[13:06:43] nocontrol: has joined #ruby
[13:07:11] nocontrol: guys what is the difference between running something as bundle exec <command> and simple <command> ?
[13:07:48] adaedra: bundle exec setups gem path correctly to load and load only gems from your Gemfile, at the version required in the Gemfile.lock
[13:08:09] adaedra: it also allows to load gems managed by bundler (installed with --path)
[13:10:01] Abrin_AWAY: has joined #ruby
[13:10:55] rickmasta: has joined #ruby
[13:11:24] synthroid: has joined #ruby
[13:12:48] tvw: has joined #ruby
[13:17:18] Kedare: has joined #ruby
[13:17:21] c0ncealed: has joined #ruby
[13:17:31] workmad3: nocontrol: `bundle exec <command>` == `RUBYOPT="-r bundler/setup" <command>`
[13:17:38] Pupp3tm4st3r: has joined #ruby
[13:17:53] nocontrol: workmad3: what does it mean ?
[13:17:58] nocontrol: what is RUBYOPT ?
[13:18:23] workmad3: RUBYOPT is an environment variable the `ruby` command looks at when loading as additional command line options
[13:18:49] workmad3: so if you run `RUBYOPT="-r bundler/setup" ruby foobar` it's like running `ruby -r bundler/setup foobar`
[13:19:45] mattwildig: has joined #ruby
[13:20:09] nocontrol: I still don't get it
[13:20:12] nocontrol: what's the point ?
[13:20:40] nocontrol: If you use rvm/rbenv for ruby versions you're running everything in a specific environment
[13:21:06] nocontrol: so why running a command like rails with "bundle exec" in front of it ?
[13:21:12] railsForDaiz: has joined #ruby
[13:21:29] workmad3: nocontrol: because that `-r bundler/setup` option loads bundler
[13:21:35] s00pcan_: has joined #ruby
[13:21:44] nocontrol: and why do we need it to be loaded ?
[13:22:01] Guest34101: has joined #ruby
[13:22:33] workmad3: because you're running a command in an app that uses bundler and you want to use the bundled gems
[13:22:46] apeiros: nocontrol: slightly different goals
[13:23:02] apeiros: nocontrol: bundler allows you to lock and share the specific gems used by a project
[13:23:05] Tempesta: has joined #ruby
[13:23:19] apeiros: with rvm, you can isolate it for your own machine but you can't share which specific versions you're using
[13:23:37] nocontrol: so If you use bundle exec you force the use of the gems that are described inside Gemfile ?
[13:23:42] emilkarl: has joined #ruby
[13:23:53] apeiros: Gemfile.lock even
[13:24:05] nocontrol: IF you don't ?
[13:24:17] apeiros: you'll use whichever versions are installed for your ruby
[13:24:19] nocontrol: you're using the default versions installed globally ?
[13:24:28] Pupp3tm4st3r: has joined #ruby
[13:24:29] apeiros: note that rvm auto-prefixes `bundle exec`
[13:24:37] workmad3: ^ in some circumstances
[13:24:49] nocontrol: I never cared about bundle exec until today and it's been almost 2 years of developing in Ruby
[13:25:01] nocontrol: and all this time I've been using the global gems ?
[13:25:12] apeiros: sure. when you're working only with gems, it's barely necessary.
[13:25:16] nocontrol: omg I am an idiot
[13:25:17] apeiros: I only use it in rails world either.
[13:25:20] workmad3: nocontrol: most of the time you don't need to care... you only really need it when you're using something like `rake` in an app that needs an earlier version than the latest installed
[13:25:40] nocontrol: workmad3: I see
[13:26:03] nocontrol: workmad3: We use cloud66 @ work which forces you to use bundle exec
[13:26:04] workmad3: especially in rails, where one of the early steps of initialisation is to pull in `bundler/setup` anyway
[13:26:12] nocontrol: and I wondered why
[13:26:31] nocontrol: ok this makes sense
[13:26:36] workmad3: nocontrol: yeah, it's also very useful on servers because it sets things up when you have bundled gems into `vendor/bundle`
[13:26:50] apeiros: yupp, net-less server deploys
[13:27:00] apeiros: nice for intranet boxen
[13:27:05] nocontrol: thank you both
[13:27:13] jottr: has joined #ruby
[13:27:30] nocontrol: I don't believe I have been missing this
[13:27:32] workmad3: apeiros: I was thinking just `bundle install --deployment` which vendors your bundle, but yeah also if you `bundle pack` and `bundle install` :)
[13:27:39] Pupp3tm4st3r: has joined #ruby
[13:28:04] AlexRussia: has joined #ruby
[13:29:16] apeiros: OF COURSE there's no Zlib::GzipFile::read, why would there? щ(゚д゚щ)
[13:29:28] apeiros: ACTION grumbles
[13:29:41] apeiros: ACTION ( `Д´)=◯)`ν°) Zlib
[13:34:25] oz: apeiros: no love for Zlib::GzipReader ?
[13:34:37] malconis: has joined #ruby
[13:34:44] apeiros: doesn't seem to have ::read either
[13:34:57] apeiros: well, .open(…, &:read) it is
[13:35:28] apeiros: hurray for 16 line `read_file(path)` method to handle this :-S
[13:35:32] ruby[bot]: adaedra: I don't know anything about pr
[13:36:01] skade: has joined #ruby
[13:36:28] shanemcd_: has joined #ruby
[13:36:42] B4daBing73: has joined #ruby
[13:37:40] malconis: has joined #ruby
[13:38:32] apeiros: ACTION sees the irony of adaedra trying to pull a "?pr" and then not adding it…
[13:39:03] adaedra: I suspect that if I add this, it will get used a lot against me, and I ponder about factoids multiplications.
[13:39:05] adaedra: But can do.
[13:39:21] apeiros: you mean they're reproducing uncontrollably?
[13:39:43] shevy: tribbles!
[13:40:10] apeiros: who'da thunked shevy was a ST:TOS fan
[13:40:28] adaedra: !fact mk pr You think this is broken, could be done better, or have a good feature idea? Make an issue on the concerned project, or even better, fix it and submit a Pull Request! ;)
[13:40:29] ruby[bot]: adaedra: I will remember that pr is You think this is broken, could be done better, or have a good feature idea? Make an issue on the concerned project, or even better, fix it and submit a Pull Request! ;)
[13:41:59] adaedra: Mh, "Submit an issue" instead of "Make an issue" would it be better?
[13:43:05] goodcodeguy: has joined #ruby
[13:44:30] goodcodeguy: has joined #ruby
[13:45:06] dn5: has joined #ruby
[13:45:36] workmad3_: has joined #ruby
[13:45:59] cdg: has joined #ruby
[13:47:45] apeiros: adaedra: yes
[13:48:14] duckpupp1: has joined #ruby
[13:48:38] adaedra: !fact ed pr You think this is broken, could be done better, or have a good feature idea? Submit an issue on the concerned project, or even better, fix it and submit a Pull Request! ;)
[13:48:39] ruby[bot]: adaedra: I stand corrected that pr is You think this is broken, could be done better, or have a good feature idea? Submit an issue on the concerned project, or even better, fix it and submit a Pull Request! ;)
[13:48:42] adaedra: Voilà, apeiros
[13:48:45] mattwildig: has joined #ruby
[13:49:24] InternetFriend: has joined #ruby
[13:50:06] allcentury: has joined #ruby
[13:50:40] workmad3: has joined #ruby
[13:51:06] shevy: apeiros some of the old ones were quite good... the apollo-hand thing was a nice idea... tribbles were so funny.. also fun were how the klingons looked, and in the later new generation ones, worf would not want to talk about why the klingons would look so differently haha
[13:51:43] apeiros: shevy: too bad you're not in #ruby-offtopic. could have told you why they did :)
[13:52:30] Pupp3tm4st3r: has joined #ruby
[13:52:39] shevy: unicode hangman!
[13:52:44] quaristice: has joined #ruby
[13:54:41] BaroMeter: has joined #ruby
[13:55:27] adaedra: shevy: just ignore it like other sensible people who don't want to see it do.
[13:56:27] jenrzzz: has joined #ruby
[13:56:35] platzhirsch: has joined #ruby
[13:56:49] ramortegui: has joined #ruby
[13:56:56] Hanmac: shevy & apeiros i read on the ruby mailing list that they did discuss about obj->meth to return the method object (for blocks) matz itself did like the idea, but not the -> one because its already used
[13:58:34] chouhoulis: has joined #ruby
[13:58:41] allcentury: has joined #ruby
[13:58:49] astrofog: has joined #ruby
[13:59:20] blackmesa: has joined #ruby
[14:02:59] thevaliantx: has joined #ruby
[14:04:39] thevaliantx: has joined #ruby
[14:06:45] r4z3r: has joined #ruby
[14:08:13] crystal77: has joined #ruby
[14:08:37] nachoman: has joined #ruby
[14:09:00] s00pcan: has joined #ruby
[14:10:27] platzhirsch: This doesn't work, oh man
[14:11:25] kobain: has joined #ruby
[14:12:30] JakFrist: has joined #ruby
[14:12:52] Meow-J: has joined #ruby
[14:12:55] shanemcd_: has joined #ruby
[14:13:10] shanemcd_: has joined #ruby
[14:13:37] chipotle: has joined #ruby
[14:14:10] anirban: has joined #ruby
[14:14:34] graffix222: has joined #ruby
[14:15:03] decoponio: has joined #ruby
[14:15:08] SCHAAP137: has joined #ruby
[14:16:42] tomphp: has joined #ruby
[14:17:32] apeiros: which ruby version added Hash#to_proc again?
[14:17:38] apeiros: 22>> {}.to_proc
[14:17:40] ruby[bot]: apeiros: # => undefined method `to_proc' for {}:Hash (NoMethodError) ...check link for more (https://eval.in/528174)
[14:17:43] apeiros: 23>> {}.to_proc
[14:17:44] ruby[bot]: apeiros: # => #<Proc:0x41a81c90> (https://eval.in/528175)
[14:18:12] apeiros: oh, only 2.3? so sad. well then, required_ruby just increased for this gem 0:-)
[14:19:24] b|ackwolf: has joined #ruby
[14:19:26] haylon: has joined #ruby
[14:19:42] b|ackwolf: how can I use rbconfig in ruby2.2.x?
[14:20:01] b|ackwolf: I meant. what is the equivalent?
[14:20:25] b|ackwolf: irb --simple-prompt -rrbconfig
[14:21:26] b|ackwolf: Is Config class called anything different in the current version?
[14:21:45] sgambino: has joined #ruby
[14:24:15] TomPeed: has joined #ruby
[14:25:23] dn5: what is equivalent of Rails "yield" in sinatra?
[14:25:41] ddv: dn5: has nothing to do with Rails
[14:25:48] ddv: or Sinatra for that matter
[14:26:05] dn5: It's still Ruby tho
[14:26:50] dn5: Rails is framework and gem like any other
[14:27:00] adaedra: yield is yield
[14:27:12] adaedra: maybe explain what you want?
[14:29:18] The_Phoenix: has joined #ruby
[14:29:27] dn5: adaedra: I'm trying to rewrite my app from Rails to Sinatra. The Rails serve yield as a main body of some view. I'm asking for approach on how to load body from a view in Sinatra. Sinatra allows erb :index (for e.g) to load index.erb, but how do I serve html head without the body.
[14:29:55] workmad3: dn5: are you talking about the rails templating override of `yield` to allow for named blocks of content provided by content_for?
[14:30:07] treehug88: has joined #ruby
[14:30:27] workmad3: dn5: or just more generally regarding rails templates, layouts etc. all of which are somewhat lacking in sinatra because it's not trying to fill the same space as rails?
[14:30:28] adaedra: it's still yield iirc, but you have to provide a block to `erb :index` (long time no sinatra'd tho)
[14:30:49] dn5: workmad3: the first one
[14:30:56] ddv: dn5: you are wasting time by converting this app to sinatra
[14:31:13] workmad3: dn5: I'd second what ddv said then... what you're basically asking for is sinatra to be rails
[14:31:30] workmad3: or at least for sinatra templating to be equivalent to rails templating... which it simply isn't
[14:31:32] dn5: ddv: Learning something is not wasting time.
[14:32:09] adaedra: dn5: then start a sinatra app from scratch. Way less painful and you may learn more things.
[14:32:25] rikkipitt: has joined #ruby
[14:32:33] workmad3: also don't assume that there's a 1:1 feature parity between sinatra and rails... there isn't :)
[14:32:44] dn5: adaedra: what else I'm doing?
[14:33:10] dn5: workmad3: Yes, I do understand that. Especially for secureity reasons.
[14:33:34] karapetyan: has joined #ruby
[14:33:43] workmad3: 'security reasons'?
[14:33:52] workmad3: what brought that up? :)
[14:34:05] hayden_: has joined #ruby
[14:34:39] dn5: for a start, the csrf protection I get in rails automatically
[14:34:51] dn5: more or less
[14:35:11] darix: dn5: that is mostly a rack plugin
[14:35:19] i8igmac: has joined #ruby
[14:35:36] darix: you need to understand which libraries rails combined to achieve what feature
[14:36:23] dn5: it still helped not to hassle around for libraries as for sinatra
[14:36:32] ddv: dn5: try lotus if you want to learn something new
[14:36:51] ddv: hanami :P
[14:37:10] i8igmac: has joined #ruby
[14:37:30] adaedra: dn5: sinatra is not rails. If you want the same features, you have to bring them back or recode some before you have parity.
[14:38:08] i8igmac: has joined #ruby
[14:38:21] dn5: adaedra: who says I want the same features in Sinatra as in rails?
[14:38:39] chouhoulis: has joined #ruby
[14:38:52] i8igmac: has joined #ruby
[14:38:54] adaedra: until now, you have spoken about rails templating and csrf protection
[14:39:21] Zackio: has joined #ruby
[14:39:25] dn5: the guy asked me a question, I answered.. I asked a particular question in a start
[14:39:34] pschichtel: How can I iterate over the top level of a multidimensional array? Array.each iterates recursively...
[14:39:39] i8igmac: has joined #ruby
[14:39:45] babblebre: has joined #ruby
[14:39:47] adaedra: pschichtel: wat
[14:39:55] workmad3: pschichtel: err... no it doesn't?
[14:40:04] adaedra: >> a = 0; [1, [2, 3], 4].each { a += 1 }; a
[14:40:05] ruby[bot]: adaedra: # => 3 (https://eval.in/528178)
[14:40:11] adaedra: see, it don't go down
[14:40:16] baweaver: has joined #ruby
[14:40:53] jeanlinux: has joined #ruby
[14:40:53] pschichtel: ohh, puts prints the entire array ...
[14:40:59] pschichtel: ok that was misleading
[14:41:17] i8igmac: has joined #ruby
[14:41:55] i8igmac: has joined #ruby
[14:43:19] yardenbar: has joined #ruby
[14:43:41] skade: has joined #ruby
[14:44:10] pdoherty: has joined #ruby
[14:45:26] izaac: has joined #ruby
[14:47:26] rippa: has joined #ruby
[14:49:53] sushi_: has joined #ruby
[14:50:01] nanoz: has joined #ruby
[14:50:29] thevaliantx: has joined #ruby
[14:51:13] thevaliantx: has joined #ruby
[14:51:43] karapetyan: has joined #ruby
[14:52:01] _rsc`: has joined #ruby
[14:52:48] crystal77: has joined #ruby
[14:53:03] flughafen_: has joined #ruby
[14:54:31] tristanp: has joined #ruby
[14:55:14] mary5030: has joined #ruby
[14:56:56] rdavila: has joined #ruby
[14:57:28] jenrzzz: has joined #ruby
[14:58:12] idefine: has joined #ruby
[14:58:24] bronson: has joined #ruby
[14:59:11] dstarh: has joined #ruby
[15:00:49] karapetyan: has joined #ruby
[15:01:12] floatingpoint: has joined #ruby
[15:01:47] davidpgero: has joined #ruby
[15:02:44] Guest34101: has joined #ruby
[15:03:07] czerasz: has joined #ruby
[15:03:49] dlitvak_: has joined #ruby
[15:03:52] czerasz: hi, has anybody experience with yaks? https://github.com/plexus/yaks
[15:03:58] Vingador: has joined #ruby
[15:04:22] adgtl: has joined #ruby
[15:06:31] idefine_: has joined #ruby
[15:08:18] arbys: has joined #ruby
[15:09:00] arbys: has left #ruby: ()
[15:09:49] dlitvak: has joined #ruby
[15:09:52] Ben_1: has joined #ruby
[15:10:07] Ben_1: have a dependency problem with rack
[15:10:11] pawnbox: has joined #ruby
[15:10:13] BTRE: has joined #ruby
[15:10:19] Ben_1: rails (~> 4.1.4) was resolved to 4.1.4, which depends on railties (= 4.1.4) was resolved to 4.1.4, which depends on actionpack (= 4.1.4) was resolved to 4.1.4, which depends on rack (~> 1.5.2)
[15:10:23] Ben_1: gitlab-grack was resolved to 2.0.0.pre, which depends on rack (~> 1.6.0)
[15:10:29] Ben_1: Bundler could not find compatible versions for gem "rack":
[15:10:44] chouhoulis: has joined #ruby
[15:11:42] A124: has joined #ruby
[15:11:51] GeorgesLeYeti: has joined #ruby
[15:12:53] idefine: has joined #ruby
[15:13:02] GeorgesLeYeti: I have a hash a = {:"3" => "a", :"4" => "b", :"2" => "c", :"1" => "d"} and i want to sort it a = {:"1" => "d", :"2" => "c" ...}
[15:13:31] Hanmac: GeorgesLeYeti: Hash are not sorted
[15:13:56] bmalum: has joined #ruby
[15:13:58] nachoman: a = a.sort.to_h
[15:14:11] nachoman: it is (only in ruby)
[15:14:19] karapetyan: has joined #ruby
[15:15:13] karapetyan: has joined #ruby
[15:15:29] haylon: Hey everyone, what's a way, or method to perform authentication for an cli application? Not sure if that's the correct way to ask, but we'll go from there.
[15:16:18] al2o3-cr: has joined #ruby
[15:19:37] malconis_: has joined #ruby
[15:19:55] uglybandersnatch: has joined #ruby
[15:21:04] adgtl: has joined #ruby
[15:21:43] treehug88: haylon typical is to check env vars for some key
[15:21:53] znz_jp: has joined #ruby
[15:22:10] treehug88: (in a way that doesn't show what exact key you're looking for in your code)
[15:23:03] haylon: Got ya. I was thinking of doing a Hashed-password in a DB, then if the hashes match, the application gives a unique auth-string to use, Similar to how Zabbix does it
[15:23:22] haylon: but I was wondering if there was a ruby methodoly that anyone else would recommend, or think is easier
[15:23:35] momomomomo: has joined #ruby
[15:23:52] hxegon: has joined #ruby
[15:24:20] BSaboia: has joined #ruby
[15:25:34] jgpawletko: has joined #ruby
[15:26:21] linduxed: has joined #ruby
[15:26:44] idefine: has joined #ruby
[15:27:06] ddv: haylon: rails?
[15:27:24] haylon: ddv, how does rails do that?
[15:27:37] ddv: no I meant are you using rails?
[15:27:38] haylon: I haven't learned Rails yet, mostly Sinatra
[15:27:43] haylon: oh, I'm using Sinatra
[15:27:48] adgtl: has joined #ruby
[15:27:48] adgtl: has joined #ruby
[15:27:58] malconis: has joined #ruby
[15:28:03] haylon: I wouldn't be opposed to learning Rails, just Sinatra seemed to fit in what I wanted.
[15:28:05] ddv: haylon: bcrypt-ruby
[15:29:12] dionysus69: has joined #ruby
[15:29:51] chagel: has joined #ruby
[15:30:48] atmosx: has joined #ruby
[15:31:27] snowy: has joined #ruby
[15:32:02] Ben_1: has left #ruby: ()
[15:32:42] haylon: Cool, thanks ddv, I'll read that as well
[15:32:47] karapetyan: has joined #ruby
[15:33:33] nachoman: what types are subclass of Enumerable?
[15:33:56] qu: has joined #ruby
[15:34:05] x77686d: has joined #ruby
[15:35:01] aufi: has joined #ruby
[15:35:17] Gasher: has joined #ruby
[15:36:24] idefine_: has joined #ruby
[15:36:25] jeanlinux: has joined #ruby
[15:36:29] rht: has joined #ruby
[15:36:41] adaedra: >> ObjectSpace.each_object.select { |e| Class === e && e.ancestors.include?(Enumerable) }
[15:36:42] ruby[bot]: adaedra: # => [Process::Tms, Enumerator::Generator, Enumerator::Lazy, Enumerator, ObjectSpace::WeakMap, Dir, File, ...check link for more (https://eval.in/528206)
[15:37:01] LoneHerm_: has joined #ruby
[15:37:05] jeanlinux: has joined #ruby
[15:38:29] dopie: has joined #ruby
[15:38:37] tristanp_: has joined #ruby
[15:40:16] rikkipitt: has joined #ruby
[15:40:18] B1n4r10: has joined #ruby
[15:40:26] diegoviola: has joined #ruby
[15:41:58] jeanlinux: has joined #ruby
[15:42:48] aegis3121: has joined #ruby
[15:44:11] tesuji: has joined #ruby
[15:44:48] Icey: has joined #ruby
[15:44:49] ljarvis: e < Enumerable would work too
[15:44:57] ljarvis: (I always liked that method)
[15:45:08] dhollinger: has joined #ruby
[15:46:24] arlek: has joined #ruby
[15:46:38] dubek: has joined #ruby
[15:52:22] flughafen_: has joined #ruby
[15:52:38] ljames: has joined #ruby
[15:53:35] blackgoat: has joined #ruby
[15:53:39] zast: has joined #ruby
[15:54:28] jeanlinux: has joined #ruby
[15:55:11] rkazak: has joined #ruby
[15:56:14] william3: has joined #ruby
[15:56:39] dlitvak: has joined #ruby
[15:57:43] jeanlinux: has joined #ruby
[15:57:59] adgtl: has joined #ruby
[15:58:29] jenrzzz: has joined #ruby
[15:58:43] devbug: has joined #ruby
[15:59:17] stennowork: has joined #ruby
[15:59:28] stennowork: has left #ruby: ()
[16:00:08] malconis: has joined #ruby
[16:00:19] bronson: has joined #ruby
[16:00:29] LoneHerm_: has joined #ruby
[16:00:34] DmitryBochkarev: has joined #ruby
[16:00:45] theRoUS: has joined #ruby
[16:00:47] podman: has joined #ruby
[16:03:12] Rodya_: has joined #ruby
[16:03:21] Jardayn: has joined #ruby
[16:04:15] adgtl: Trying out to play producer consumer problem in Ruby
[16:04:45] adgtl: here is the gist https://gist.github.com/b673b443a87c25b1ac8f
[16:04:48] william3: has joined #ruby
[16:04:53] adgtl: is this the right implementation?
[16:05:09] The_Phoenix: has joined #ruby
[16:05:43] adgtl: he is original implemation https://gist.github.com/733f292800237cc3d47d
[16:07:34] snowy: has joined #ruby
[16:08:06] laith: has joined #ruby
[16:08:52] karapetyan: has joined #ruby
[16:08:53] laith: has left #ruby: ()
[16:09:00] nfk: has joined #ruby
[16:09:24] tjohnson: has joined #ruby
[16:09:42] apeiros: adgtl: you can simplify your code a lot by using Thread::Queue
[16:09:54] karapetyan: has joined #ruby
[16:10:01] baweaver: has joined #ruby
[16:10:15] adgtl: apeiros: okay
[16:10:59] apeiros: adgtl: also you only synchronize over push/shift on the queue
[16:11:20] apeiros: the production and consumption should not be within the semaphore. otherwise you throw away the main point of the prod/cons design.
[16:13:00] apeiros: also you'll usually have a mechanism to stop produces instead of `while true`, and similarly a mechanism to a) stop consumers and b) wait until all work is consumed
[16:13:04] idefine: has joined #ruby
[16:13:07] apeiros: *producers
[16:14:22] adgtl: apeiros: here is updated example https://gist.github.com/b9441df00eb7870289f0
[16:14:31] idefine_: has joined #ruby
[16:14:46] apeiros: adgtl: you know, you can update gists. no need to create a new one.
[16:14:58] apeiros: has the nice advantage of keeping the history neatly in place.
[16:15:15] apeiros: I think ::Queue is deprecated in favor of Thread::Queue
[16:15:44] adgtl: apeiros: ah
[16:15:45] idefine__: has joined #ruby
[16:16:09] apeiros: and the point of Thread::Queue is that you can drop the semaphore around push/shift
[16:17:36] roger_rabbit: has joined #ruby
[16:17:46] adgtl: apeiros: updated the gist https://gist.github.com/anildigital/b9441df00eb7870289f0
[16:18:08] adgtl: apeiros: is is correct implementation of producer consumer problem?
[16:18:17] rcvalle: has joined #ruby
[16:18:56] apeiros: as said, the semaphore around producing/consuming the thread beats the purpose of using it. if you fix that, then IMO yes.
[16:18:57] sgambino: has joined #ruby
[16:19:16] apeiros: ACTION grumbles - what's up with those errors in my sentences today?
[16:19:23] apeiros: as said, the semaphore around producing/consuming the *item* beats the purpose of using it. if you fix that, then IMO yes.
[16:19:37] apeiros: (and "using it" = "using the prod/cons pattern)
[16:19:39] pschichtel: I have this custom puppet function: http://pastebin.com/y7jxSke8 it takes an IP adresses and a 2d array with subnet information. when iterating over the 2d array, I'm not getting the inner arrays, but the first element of the inner array (the subnet name). why is that so?
[16:19:40] ruby[bot]: pschichtel: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/7e9f6a255db644bd54e3
[16:19:40] ruby[bot]: pschichtel: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[16:20:03] adgtl: apeiros: do you mean.. don't use semaphores?
[16:20:03] idefine: has joined #ruby
[16:20:43] apeiros: adgtl: if you use an array, use semaphores, but only around the push/shift operation. if you use thread::queue, you don't need a semaphore.
[16:20:44] william3: has joined #ruby
[16:21:18] godzillaenlacasa: has joined #ruby
[16:22:34] evidex: has joined #ruby
[16:23:40] idefine_: has joined #ruby
[16:23:43] linduxed: has joined #ruby
[16:24:55] infernix: has joined #ruby
[16:25:26] anirban: has joined #ruby
[16:25:30] idefine: has joined #ruby
[16:26:38] sphex: has joined #ruby
[16:26:59] ponga: has joined #ruby
[16:28:18] DaniG2k: has joined #ruby
[16:28:50] adgtl: apeiros: cool
[16:29:34] darkf_: has joined #ruby
[16:29:47] william3: has joined #ruby
[16:32:14] cubicme: has joined #ruby
[16:32:24] idefine: has joined #ruby
[16:32:24] rodolfowtf: has joined #ruby
[16:33:53] cubicme: is there a way to install or rather have gems for for other platforms? I’m running gem server on mac and I want to serve a libv8 gem to a linux machine. is it possible to do this?
[16:34:55] baweaver: has joined #ruby
[16:35:38] Psyq: has left #ruby: ("Conversation terminated")
[16:35:41] cdg: has joined #ruby
[16:36:35] chipotle: has joined #ruby
[16:38:54] darix: cubicme: gem fetch
[16:39:29] djbender: has left #ruby: ()
[16:40:46] cnr_roxx: has joined #ruby
[16:41:46] Hanmac: cubicme: it can be complicated with gems that does have external dependencies (C(++) libs) if i remember correctly libv8 does have different bundled versions for different architectures
[16:41:54] dopamean_: has joined #ruby
[16:43:43] cubicme: darix: thanks, but now how I can make gem server serve this file
[16:44:31] darix: cubicme: you can gem fetch the ruby platform version
[16:44:37] darix: then it will be build on the client
[16:44:41] darix: but not sure about gem server
[16:44:51] darix: #rubygems might have a better audience for you
[16:44:55] cubicme: hanmac: yeah, I tried —platform=linux and apparently it worked, without it, i got the file libv8_darwin.gem; with it, libv8.gem
[16:45:43] cubicme: darix: ow, by platform i meant mac/linux, not the ruby
[16:47:46] openstruct: has joined #ruby
[16:49:11] YankNYC: has joined #ruby
[16:49:47] mark4: has left #ruby: ("PART #RubyOnRails :PART #jquery :PART #reactjs :PART ##javascript :PART #elixir-lang :PART #debian :PART #zsh :QUIT :Leaving.")
[16:50:20] KensoDev: has joined #ruby
[16:50:53] YankNYC: Hey everyone, I'm trying to configure this gem as a dependency for my gem. https://github.com/YotpoLtd/geoip2 Do I put that configure block in my gemspec file? and require the geoip2 gem at the top?
[16:53:45] idefine: has joined #ruby
[16:54:11] Papierkorb: YankNYC: I'd redirect the user of your gem to that readme to have it configured.
[16:54:42] YankNYC: it's for a cli app so should i just make a config folder
[16:54:46] YankNYC: and plop it in there
[16:55:12] fmcgeough: has joined #ruby
[16:55:15] YankNYC: it doesn't say hey make a config folder it shows a config block lol
[16:57:06] william3: has joined #ruby
[16:57:59] sgambino: has joined #ruby
[16:58:11] biberu: has joined #ruby
[16:58:11] Don_John: has joined #ruby
[16:59:28] jenrzzz: has joined #ruby
[17:00:38] RalfJ: has joined #ruby
[17:00:41] william3: has joined #ruby
[17:00:53] s00pcan: has joined #ruby
[17:02:36] amclain: has joined #ruby
[17:02:44] myntcake: has joined #ruby
[17:04:03] [Butch]: has joined #ruby
[17:04:36] karapetyan: has joined #ruby
[17:05:05] Guest38: has joined #ruby
[17:06:10] aryaching: has joined #ruby
[17:06:28] shanemcd: has joined #ruby
[17:06:40] Mon_Ouie: has joined #ruby
[17:11:33] pschichtel: has left #ruby: ()
[17:11:48] symm-: has joined #ruby
[17:11:53] adgtl: has joined #ruby
[17:12:46] sepp2k: has joined #ruby
[17:13:29] synthroid: has joined #ruby
[17:13:48] sneakerhax: has joined #ruby
[17:14:10] sp4rrow: has joined #ruby
[17:14:34] jeanlinux: has joined #ruby
[17:14:49] synthroid: has joined #ruby
[17:15:50] idefine_: has joined #ruby
[17:15:50] Ben_1: has joined #ruby
[17:16:13] chipotle: has joined #ruby
[17:16:22] Ben_1: someone experiences in passenger? Updated to the latest version but my buildout directory is missing so I can not Load the shared object.
[17:16:59] Maletor: has joined #ruby
[17:20:04] s00pcan: has joined #ruby
[17:24:15] RE: has joined #ruby
[17:26:23] poguez_: has joined #ruby
[17:26:37] wmytwu: has joined #ruby
[17:27:15] diegok: has joined #ruby
[17:27:22] diegok: has joined #ruby
[17:28:54] RE: Hello, I am trying to install Puppet on windows XP embedded and the Ruby install it is not working, it workds fine on windows 7 embedded. On XP embedded, Ruby crashes with SegFault…
[17:29:18] RE: So I installed, Ruby 1.9.3.3p551 directly and it crashes with the same error.
[17:29:19] haylon: has joined #ruby
[17:29:19] Papierkorb: RE: Why do you want to use Win XP ..?
[17:29:32] chadhs: has joined #ruby
[17:29:33] Papierkorb: RE: That's way past end of life
[17:29:56] RE: Windows XP Embedded is used on a lot of thin clients in my company, and we have extended support from Microsoft….
[17:30:05] RE: its not XP, XP embedded.
[17:31:16] davedev24: has joined #ruby
[17:31:18] RE: I’d love to move all these thin clients to win 7, but unfortunately its not possible at this time, and I dont want this be a reason why we dont use Puppet.
[17:32:24] charlemagne: has joined #ruby
[17:33:17] RE: http://pastebin.ca/3385589 Here’s the error on XPE
[17:33:48] railsForDaiz: has joined #ruby
[17:35:06] Papierkorb: RE: If no one in here knows, ask the ruby installer guys http://rubyinstaller.org/
[17:35:11] s00pcan: has joined #ruby
[17:35:43] Papierkorb: RE: https://github.com/oneclick/rubyinstaller/wiki/faq#win_ver so below ruby 2.2.2 should be fine (?)
[17:36:27] amargherio: has joined #ruby
[17:36:28] tomphp: has joined #ruby
[17:36:41] baweaver: has joined #ruby
[17:37:04] RE: thanks, I’ll search their bugtracker
[17:37:05] adgtl: Anything you expect here http://ruby-operators.herokuapp.com
[17:38:25] Papierkorb: adgtl: lonely person operator
[17:38:55] havenwood: adgtl: at my work they call "skull tag" the "ice cream with sprinkles tag"
[17:39:03] Papierkorb: adgtl: and =~ as "bacon cannon"
[17:39:35] goodcodeguy: has joined #ruby
[17:39:40] Papierkorb: ah there is the lonely one
[17:39:48] havenwood: "tiddle wakka" is also "pessimistic person operator"
[17:39:58] havenwood: err, no person
[17:40:05] havenwood: lonely person bled over
[17:40:12] rsc___: has joined #ruby
[17:40:31] havenwood: adgtl: shebang
[17:40:58] havenwood: adgtl: twoquals
[17:41:30] floatingpoint: has joined #ruby
[17:41:38] havenwood: adgtl: pipes
[17:42:23] Disavowed: has joined #ruby
[17:42:34] havenwood: adgtl: it is "lonely person" operator though, not just "lonely" since it's a person sitting cross-legged staring at the dot
[17:42:35] Papierkorb: adgtl: the '.' if you wanna catch em' all
[17:42:37] Boohbah: has joined #ruby
[17:42:44] jxs_: has joined #ruby
[17:44:19] workmad3_: has joined #ruby
[17:47:39] justin_pdx: has joined #ruby
[17:48:06] mfb2: has joined #ruby
[17:49:22] workmad3: has joined #ruby
[17:50:15] sp4rrow: has joined #ruby
[17:50:34] eregi: has joined #ruby
[17:50:58] rizenine: has joined #ruby
[17:53:26] mattwildig: has joined #ruby
[17:53:27] wldcordeiro: has joined #ruby
[17:56:29] godzillaenlacasa: has joined #ruby
[17:58:31] Tref: has joined #ruby
[17:58:55] stannard_: has joined #ruby
[17:59:09] Gasher: has joined #ruby
[17:59:22] karapetyan: has joined #ruby
[18:00:08] william3: has joined #ruby
[18:00:21] jenrzzz: has joined #ruby
[18:02:18] Azulinho: has joined #ruby
[18:02:22] bronson: has joined #ruby
[18:05:16] baweaver: has joined #ruby
[18:06:35] arup_r: has joined #ruby
[18:07:24] Ben_1: has left #ruby: ()
[18:08:19] pawnbox: has joined #ruby
[18:08:53] shanemcd: has joined #ruby
[18:09:11] volty: has joined #ruby
[18:10:47] sushi_: has joined #ruby
[18:10:53] intrigueD: has joined #ruby
[18:12:50] shadeslayer: has joined #ruby
[18:12:56] counterapparatus: has joined #ruby
[18:13:01] webopsx: has joined #ruby
[18:14:03] Ox0dea: Papierkorb: Is that an operator?
[18:14:19] Ox0dea: adgtl: The bangarang (!~) is still missing.
[18:15:34] jeanlinux: has joined #ruby
[18:16:42] Bounga: has joined #ruby
[18:17:29] adgtl: Ox0dea: example?
[18:18:38] Aviio: has joined #ruby
[18:18:46] Ox0dea: adgtl: It means "doesn't match".
[18:18:48] Ox0dea: >> 'rhythm' !~ /[aeiou]/
[18:18:49] ruby[bot]: Ox0dea: # => true (https://eval.in/528281)
[18:18:56] arlek: has joined #ruby
[18:18:59] Aviio: hi all - anybody used puppet before?
[18:19:05] adgtl: Ox0dea: thanks..
[18:19:10] Ox0dea: Sure thing.
[18:19:31] adgtl: Can someone else confirm that !~ is called as Bangarang operator? Thanks Ox0dea anyways ;)
[18:19:44] adgtl: Ox0dea: you could send a pull request :)
[18:19:52] Ox0dea: adgtl: I made up that name, but I think it's pretty great.
[18:20:11] Ox0dea: Or, well, it's the name of a Skrillex song, but nobody else calls the operator that.
[18:20:14] adgtl: Ox0dea: you coined it so you can send a PR :)
[18:20:26] adgtl: Ox0dea: if you send PR, I will tweet about it :)
[18:20:40] jayc0b0: has joined #ruby
[18:22:09] shadoi: has joined #ruby
[18:22:52] shadoi: has joined #ruby
[18:22:58] despai: has joined #ruby
[18:23:18] nerium: has joined #ruby
[18:23:23] counterapparatus: has joined #ruby
[18:23:38] rdavila: has joined #ruby
[18:24:20] nerium: I’m looking for a gem to query complex nested hashes, like ”key1.key2[0].key3”. Is there such a tool?
[18:25:15] jeanlinux: has joined #ruby
[18:25:30] tAn: has joined #ruby
[18:25:33] shadoi: I wrote a method once, but it's super nasty :)
[18:25:44] apeiros: nerium: use ruby 2.3 and #dig
[18:25:53] apeiros: though, the smug answer is: use proper classes
[18:26:23] lvn: has joined #ruby
[18:26:24] skade: has joined #ruby
[18:27:08] nerium: apeiros: Proper classes?
[18:27:11] Shaboum: has joined #ruby
[18:27:21] inukshuk_: has joined #ruby
[18:27:26] shadoi: nerium: disgusting solution: https://gist.github.com/anonymous/677026973cb241819a23
[18:27:35] apeiros: "querying complex hash" is very often an xy problem
[18:27:49] allcentury: has joined #ruby
[18:27:51] apeiros: you solve a symptom, not the cause. using proper classes is meant to avoid the problem to begin with
[18:28:12] blackmesa: has joined #ruby
[18:28:39] gmci: has joined #ruby
[18:28:43] Papierkorb: Ox0dea: of course it is
[18:29:00] nerium: apeiros: No it isn’t. I’m extracting data from an API that’s all
[18:29:01] holyGlitch_: has joined #ruby
[18:29:33] tejasmanohar: has joined #ruby
[18:29:37] IrishGringo: has joined #ruby
[18:29:43] chipotle: has joined #ruby
[18:29:47] halfdan: has joined #ruby
[18:29:57] DiabolikFreenode: has joined #ruby
[18:29:59] Papierkorb: Ox0dea: Every terminal pretty much is. I can't think of a terminal atm which is not an operator.
[18:30:08] mattwildig: has joined #ruby
[18:30:20] thesheff17_: has joined #ruby
[18:30:29] kireevco_: has joined #ruby
[18:31:22] jmhmccr_: has joined #ruby
[18:31:27] Trieste_: has joined #ruby
[18:31:29] EvilJStoker: has joined #ruby
[18:31:30] nerium: apeiros: The code you posted seams to do something else (according to the examples)
[18:31:32] HashNuke_: has joined #ruby
[18:31:32] platzhirsch: has left #ruby: ()
[18:31:43] idefine: has joined #ruby
[18:31:47] cjk101010_: has joined #ruby
[18:31:48] bitwise_: has joined #ruby
[18:32:04] spk_: has joined #ruby
[18:32:07] jlyndon_: has joined #ruby
[18:32:24] skmp_: has joined #ruby
[18:32:29] JStoker: has joined #ruby
[18:32:49] AdamMeghji_: has joined #ruby
[18:33:24] danzilio_: has joined #ruby
[18:33:36] countera1paratus: has joined #ruby
[18:33:57] x77686d: has joined #ruby
[18:34:25] rideh-: has joined #ruby
[18:34:43] chrisseaton_: has joined #ruby
[18:34:45] jhill_: has joined #ruby
[18:34:51] yosafbridge`: has joined #ruby
[18:35:06] lancetw_: has joined #ruby
[18:35:33] sepp2k: has joined #ruby
[18:37:04] podman: has joined #ruby
[18:37:05] Guest34101: has joined #ruby
[18:37:06] trinaldi: has joined #ruby
[18:37:20] jhass|off: has joined #ruby
[18:37:28] Trynemjoel2: has joined #ruby
[18:37:29] Nanuq: has joined #ruby
[18:39:11] baweaver: has joined #ruby
[18:39:30] arup_r: I had an exam, where I had been asked A Range expression such as 1..5 may be used to refer to a subrange of elements in the array. ( True/False) . I said True and I got negative.. why ?
[18:39:55] adaedra: >> (1..10).to_a[2..4]
[18:39:57] ruby[bot]: adaedra: # => [3, 4, 5] (https://eval.in/528288)
[18:40:01] adaedra: because this, maybe?
[18:40:11] adaedra: Ah wait, misread
[18:40:14] volty: nerium: imho you should consider also using xml & xpath
[18:40:15] adaedra: ACTION wakes up
[18:40:45] nerium: volty: How?
[18:40:51] eam: arup_r: sounds like a bad question
[18:41:11] arup_r: lol.. so true is wrong answer
[18:41:25] volty: you write to xml instead to write into hash, then query the xml using xpath. but forget if you don't have experience with xml & xpath
[18:41:30] adaedra: arup_r: ¯\_(ツ)_/¯
[18:41:40] volty: * instead of writing into hash
[18:42:08] fullofcaffeine: has joined #ruby
[18:43:04] arup_r: adaedra: as oer you true is correct right ?
[18:43:20] SenpaiSilver_: has joined #ruby
[18:43:28] kerunaru: has joined #ruby
[18:43:33] arup_r: I would like to know what is right.. haha.. because mine was not correct
[18:43:35] adaedra: arup_r: would have said yes, but lack a bit of context to be sure
[18:43:36] steffkes: has joined #ruby
[18:43:38] BtcBen: has joined #ruby
[18:43:49] adaedra: arup_r: this is something you want to discuss with your examiner, I think.
[18:44:13] arup_r: yeah, that question is gone with OMR..
[18:44:55] Eiam_: has joined #ruby
[18:45:05] crystal77: has joined #ruby
[18:45:26] Papierkorb: arup_r: is that exam about ruby or language agnostic?
[18:46:39] nocontrol: has joined #ruby
[18:46:56] Jardayn: has joined #ruby
[18:47:16] Papierkorb: If it's about ruby, it not only depends on the definition of 'refer to', but also we're lacking context as adaedra mentioned. Though I'd be interested in the reasoning if you do ask the examiner arup_r
[18:47:41] Alayde: has joined #ruby
[18:47:49] fullofcaffeine: has joined #ruby
[18:48:16] Alayde: has left #ruby: ()
[18:48:40] modin: has joined #ruby
[18:48:43] cubicme: has joined #ruby
[18:48:51] Puffball: has joined #ruby
[18:48:56] hahuang65: has joined #ruby
[18:49:11] arup_r: there was many.. one naughty question was like that as I asked
[18:49:27] nocontrol: I am trying to ping 254 clients by using Threads: https://gist.github.com/chrisvel/579619860ec55e263921 My problem is that I don't know If I need to "exit" or "kill" them. Can someone help ?
[18:49:28] arup_r: There was no examiner..
[18:49:32] arup_r: online test
[18:49:44] idefine_: has joined #ruby
[18:49:52] kp666: has joined #ruby
[18:50:18] helpa: has joined #ruby
[18:50:22] Papierkorb: arup_r: is there a contact available you could ask? Or some coworker/senior dev you could ask?
[18:50:36] JoshL: has joined #ruby
[18:50:40] BiHi: has joined #ruby
[18:50:41] arup_r: I will email them
[18:50:42] MuffinPimp: has joined #ruby
[18:50:42] moei: has joined #ruby
[18:50:43] synthroid: has joined #ruby
[18:50:48] unsymbol: has joined #ruby
[18:50:54] LnxBil: has joined #ruby
[18:50:56] meal_: has joined #ruby
[18:50:58] Aviio: Anybody know if you're able to have more than 1 puppet provisioner per vagrant file?
[18:51:05] B1n4r10: has joined #ruby
[18:51:37] bradland: has joined #ruby
[18:51:56] Dimik: has joined #ruby
[18:52:00] zackattack: has joined #ruby
[18:52:23] zackattack: Does anyone here also use the statistical environment "R"? I'm trying to wrap my mind around moving a hash of arrays from Ruby into R
[18:52:24] LnxBil: Can someone explain why this simple thing is not working as expected? (I use the exact ruby version from the url inside): http://paste.debian.net/410723/
[18:52:51] hackeron: has joined #ruby
[18:53:00] Liothen: has joined #ruby
[18:53:00] Liothen: has joined #ruby
[18:53:25] Papierkorb: nocontrol: The thread(s) will die when their code block has finished execution. That's the moment another thread, which is waiting for that thread using #join like you do, wakes up and continues its work
[18:53:32] rdark: has joined #ruby
[18:53:42] nocontrol: Papierkorb: so my threads are safe
[18:53:51] nocontrol: Papierkorb: but is there a limit that I should know ?
[18:54:10] tobiasvl: LnxBil: LnxBil what doesn't work?
[18:54:23] sauvin: has joined #ruby
[18:54:24] Papierkorb: nocontrol: There is no limit per se, but your operating system may have one.
[18:54:29] tobiasvl: LnxBil: you are aware that the initialize method is commented out, right?
[18:54:49] nocontrol: Papierkorb: the error is WARN: ThreadError: can't create Thread: Resource temporarily unavailable
[18:54:57] Papierkorb: nocontrol: You could however look at the Open3 library to asynchronously call ping a ton of times and wait for the processes to finish from a single thread
[18:54:58] nocontrol: Papierkorb: but not always
[18:55:00] firstdayonthejob: has joined #ruby
[18:55:20] nisstyre_: has joined #ruby
[18:55:24] LnxBil: tobiasvl: according to documentation, "creates and instance variable". Shouldn't it be visible via '.instance_variables'?
[18:55:40] LnxBil: tobiasvl: s/ and //
[18:55:46] Morrolan: has joined #ruby
[18:55:48] karapetyan: has joined #ruby
[18:56:03] tobiasvl: LnxBil: the variable is never instantiated
[18:56:04] Papierkorb: nocontrol: Then you're hitting some kind of limit. May be a max amount of threads, or something else. But starting ~256 threads sounds like a bad idea anyway.
[18:56:43] nocontrol: Papierkorb: you think so ? I am just experimenting. Do you think is not possible at all ?
[18:56:48] Papierkorb: nocontrol: Start the process and wait for them to finish
[18:56:54] nocontrol: Papierkorb: Actually I am pinging in chunks of 50s
[18:56:56] tobiasvl: LnxBil: your attr_reader creates a var1 method which returns @var1, but there is no @var1 because initialize is commented out
[18:57:10] Papierkorb: nocontrol: Maybe it's possible, but you're hammering a nail with a screwdriver there
[18:57:17] nocontrol: Papierkorb: you mean for "Each" ping ? I have set the wait time -W to 1 sec
[18:57:18] LnxBil: tobiasvl: So, there is no method available to create getter/setter and initialize?
[18:57:37] tobiasvl: LnxBil: getter and setter can be created with attr_accessor
[18:57:45] armyriad: has joined #ruby
[18:57:53] nocontrol: Papierkorb: there is no other way that I know to ping fast 254 nodes in 1 sec or less
[18:57:54] tobiasvl: but initializing is done in the initialize method as the name suggests
[18:58:16] arup_r: has left #ruby: ()
[18:58:17] Papierkorb: nocontrol: Use Process and/or Open3 classes. They're much better suited for that. No threads needed.
[18:58:47] LnxBil: tobiasvl: so I have to create my own register_and_initilize_what_i_want method.
[18:58:54] Ox0dea: LnxBil: In short, the `attr_*` methods create methods, not instance variables.
[18:58:59] tobiasvl: LnxBil: no, just put it in initialize
[18:58:59] graffix222: has joined #ruby
[18:59:10] nocontrol: Papierkorb: so you just iterate 254 times with Open3 ?
[18:59:21] LnxBil: Ox0dea: So, the documentation is wrong
[18:59:27] djellemah: has joined #ruby
[18:59:38] Papierkorb: nocontrol: basically yes, which will spin up that amount of ping processes. You can batch them if you like, see the Enumerable methods for that
[18:59:50] nocontrol: Papierkorb: thanks for the tips
[18:59:58] nocontrol: Papierkorb: I 'll read a bit and come back
[19:00:11] tobiasvl: LnxBil: what part of the documentation is wrong?
[19:00:12] Ox0dea: LnxBil: It's misleading, yes.
[19:00:18] freerobby: has joined #ruby
[19:00:19] LnxBil: tobiasvl: I can't, attributes will be generated on the fly. I tried first with instance_variable_set, which sets instance variables, but not getter/setter.
[19:00:28] kerunaru: has joined #ruby
[19:00:37] LnxBil: tobiasvl: that it creates instance variables ...
[19:00:54] LnxBil: tobiasvl: if it is created, it should be visible with .instance_variables
[19:00:56] TomyLobo: has joined #ruby
[19:01:05] Ox0dea: Instance variables "always exist" in some sense; `@foo` essentially just kicks off a search into an object's instance variable table.
[19:01:11] kies^: has joined #ruby
[19:01:11] Sp4rKy: has joined #ruby
[19:01:11] tobiasvl: ah. yes, I agree. but they're not instantiated.
[19:01:15] jenrzzz: has joined #ruby
[19:01:35] alexherbo2: has joined #ruby
[19:01:52] shadoi: has joined #ruby
[19:02:01] B1n4r10: has joined #ruby
[19:02:08] Ox0dea: LnxBil: Ruby certainly provides the means to get and set attributes dynamically.
[19:02:08] drbrain: LnxBil: the documentation is misleading
[19:02:08] Tobias|: has joined #ruby
[19:02:41] karapetyan: has joined #ruby
[19:02:45] drbrain: attr_reader only creates a method
[19:02:49] johnny56_: has joined #ruby
[19:02:57] majoh: has joined #ruby
[19:03:21] djbkd: has joined #ruby
[19:03:25] LnxBil: so, what can I use to create the instance variable and get setter/getter? self.instance_variable_set takes care of the first, but the second? (dynamic attribute names)
[19:03:32] bmn: has joined #ruby
[19:03:55] drbrain: why do you want both?
[19:04:03] platzhirsch: has joined #ruby
[19:04:09] cookiez: has joined #ruby
[19:04:09] drbrain: I ask because there may be better ways to address your problem
[19:04:43] LnxBil: Because I need to query all attributes from outside (e.g. .instance_variables) and need to access them via .attribute_name
[19:04:59] drbrain: nocontrol: why not use https://rubygems.org/gems/net-ping ?
[19:05:21] drbrain: LnxBil: why do you want to query the attributes?
[19:05:22] Ox0dea: Someone needs a <Leader> mapping.
[19:05:45] drbrain: LnxBil: … maybe you want openstruct?
[19:05:45] KensoDev: has joined #ruby
[19:05:48] Papierkorb: drbrain: You need root permissions to craft ICMP ping packets (well, to send them off)
[19:05:58] LnxBil: drbrain: I need to query the attributes from a parent class
[19:06:02] kspencer: has joined #ruby
[19:06:12] kspencer: has joined #ruby
[19:06:18] drbrain: for what purpose?
[19:06:57] tobiasvl: LnxBil: you can always do "class << self; self; end.class_eval do; attr_reader something; end" inside initialize. or dynamically create var and var= methods
[19:07:00] Papierkorb: drbrain: usually, OSes don't let non-admin users to send off custom (ICMP is custom in that sense) network packets.
[19:07:07] LnxBil: the query interface needs columns/attributes
[19:07:10] infernix: has joined #ruby
[19:07:21] LnxBil: tobiasvl: Yes, but there is no "short form" available?
[19:07:29] wldcordeiro: has joined #ruby
[19:07:36] Ox0dea: &ri singleton_class
[19:07:36] `derpy: http://ruby-doc.org/core-2.3.0/Object.html#method-i-singleton_class
[19:07:39] Anderson69s_Deb: has joined #ruby
[19:07:48] justbleed: has joined #ruby
[19:07:50] Papierkorb: drbrain: Thus, the script would need to run as root user. Even a SUID bit wouldn't help on a script, as it's interpreted which makes a difference on UNIX systems at least.
[19:08:04] tobiasvl: LnxBil: self.singleton_class.send(:attr_accessor, varname) ?
[19:08:21] drbrain: LnxBil: then why not use a Hash?
[19:08:33] karapetyan: has joined #ruby
[19:08:51] drbrain: columns -> keys, attributes -> values
[19:08:57] drbrain: Papierkorb: I see
[19:09:01] LnxBil: drbrain: It is a hash, I want to wrap it in a class for "similar" use in a rails environment
[19:09:12] drbrain: LnxBil: sounds like you want OpenStruct
[19:09:31] kaleido: openstruct: they want you
[19:09:50] openstruct: I am the elite data structure, after all.
[19:09:54] Ox0dea: Nonsense.
[19:10:09] Ox0dea: You're lipstick on a unicorn.
[19:10:22] kaleido: you callin him pure magic?
[19:10:32] openstruct: Sounds like a win!
[19:10:41] ss_much: has joined #ruby
[19:10:55] Ox0dea: No, I was complimenting Hash for being so useful; OpenStruct just adds alleged aesthetic appeal.
[19:12:09] Kryptonical: has joined #ruby
[19:12:21] crystal77: has joined #ruby
[19:12:24] mfaeh: has joined #ruby
[19:12:29] pawnbox_: has joined #ruby
[19:12:46] mburns: has joined #ruby
[19:12:55] hollywood: has joined #ruby
[19:13:06] kerunaru: has joined #ruby
[19:13:24] ur5us: has joined #ruby
[19:13:56] shanemcd: has joined #ruby
[19:13:57] ytti: has joined #ruby
[19:14:16] wilbert: has joined #ruby
[19:15:32] shadoi: has joined #ruby
[19:15:48] LnxBil: tobiasvl, drbrain: I solved it via instance_eval('def var1; @var1; end')
[19:17:01] Kryptonical: has joined #ruby
[19:17:14] freerobby1: has joined #ruby
[19:18:18] sarlalia1: has joined #ruby
[19:19:58] nocontrol: has joined #ruby
[19:20:29] drbrain: LnxBil: or you could let openstruct do everything you need without piling up weird things
[19:21:28] LnxBil: drbrain: How to do a '.<dynamic_name>' thing with openStruct?
[19:21:50] uglybandersnatch: has joined #ruby
[19:22:09] drbrain: http://docs.ruby-lang.org/en/2.3.0/OpenStruct.html#label-Examples-3A
[19:23:01] LoneHermit: has joined #ruby
[19:23:28] drbrain: so you can ostruct.age or ostruct[:age]
[19:23:46] LnxBil: so, send is what i should be looking for
[19:24:06] drbrain: yeah, send would also work
[19:24:15] apeiros: public_send > send
[19:24:27] apeiros: but with ostruct, why not [] as drbrain showed?
[19:24:35] LnxBil: drbrain: it is the only thing that works with not known variable names at write-time
[19:24:50] LnxBil: or the hash-assignment
[19:26:46] Guest85: has joined #ruby
[19:26:57] moss: has joined #ruby
[19:27:59] chouhoulis: has joined #ruby
[19:28:01] majoh: has joined #ruby
[19:28:06] dlitvak: has joined #ruby
[19:28:31] kalzz: has joined #ruby
[19:29:15] LnxBil: drbrain, Ox0dea, tobiasvl: Thank you for your help and suggestions. Appreciated.
[19:30:53] SenpaiSilver_: has joined #ruby
[19:31:33] cookiez: has joined #ruby
[19:31:33] modin: has joined #ruby
[19:31:33] Nanuq: has joined #ruby
[19:31:33] tim_s007: has joined #ruby
[19:31:33] jimeh: has joined #ruby
[19:31:33] manveru: has joined #ruby
[19:31:33] Eleeleth: has joined #ruby
[19:31:33] cstrahan: has joined #ruby
[19:31:33] deepak: has joined #ruby
[19:31:33] Zarthus: has joined #ruby
[19:31:33] marsjaninzmarsa: has joined #ruby
[19:31:33] techietrash: has joined #ruby
[19:31:33] demophoon: has joined #ruby
[19:31:33] bjmllr: has joined #ruby
[19:31:34] _whitelogger: has joined #ruby
[19:31:34] kellabyte: has joined #ruby
[19:31:34] ckrailo: has joined #ruby
[19:31:34] rfv: has joined #ruby
[19:31:34] heyimwill: has joined #ruby
[19:31:34] jokke: has joined #ruby
[19:31:34] ddfreyne: has joined #ruby
[19:31:34] ramblinpeck: has joined #ruby
[19:31:34] knowtheory: has joined #ruby
[19:31:34] jevs: has joined #ruby
[19:31:34] Apocalypse: has joined #ruby
[19:31:34] Nightmare: has joined #ruby
[19:31:34] voker57: has joined #ruby
[19:31:34] ohcibi: has joined #ruby
[19:31:34] crayfishx: has joined #ruby
[19:31:34] krasnus: has joined #ruby
[19:31:34] kapowaz: has joined #ruby
[19:31:34] gremax: has joined #ruby
[19:31:34] SuperTux88: has joined #ruby
[19:31:34] dellavg: has joined #ruby
[19:31:34] Mekkis: has joined #ruby
[19:31:34] Hobbyboy: has joined #ruby
[19:31:34] drPoggs: has joined #ruby
[19:31:34] elektronaut: has joined #ruby
[19:31:34] phrozen77: has joined #ruby
[19:31:34] soahccc: has joined #ruby
[19:31:34] bodgix: has joined #ruby
[19:31:34] artmann: has joined #ruby
[19:31:34] kalleth: has joined #ruby
[19:32:02] marsjaninzmarsa: has joined #ruby
[19:32:03] Zarthus: has joined #ruby
[19:32:04] baweaver: has joined #ruby
[19:32:05] Hobbyboy: has joined #ruby
[19:32:06] Hobbyboy: has joined #ruby
[19:32:11] tim_s007: has joined #ruby
[19:33:14] johnny56_: has joined #ruby
[19:34:11] phrozen77: has joined #ruby
[19:34:35] cstrahan: has joined #ruby
[19:34:39] manveru: has joined #ruby
[19:34:57] sp4rrow: has joined #ruby
[19:35:01] kalz: has joined #ruby
[19:35:18] nocontrol: has joined #ruby
[19:35:22] rfv: has joined #ruby
[19:36:13] cpup: has joined #ruby
[19:37:27] shanemcd: has joined #ruby
[19:40:12] Dbugger: has joined #ruby
[19:40:13] Dbugger: has left #ruby: ()
[19:40:49] shevy: openstruct is in da house
[19:42:29] last_staff: has joined #ruby
[19:42:34] Cohedrin: has joined #ruby
[19:43:45] LnxBil: drbrain: I rewrote the code with OpenStruct only to find out that instance_variables is still not set and I cannot query the attributes directly (only via .to_h.keys)
[19:44:41] jayc0b0: has joined #ruby
[19:45:57] Gadgetoid: has joined #ruby
[19:46:33] michael_mbp: has joined #ruby
[19:52:00] Ox0dea: LnxBil: https://eval.in/528329
[19:52:53] shinnya: has joined #ruby
[19:53:27] tomphp: has joined #ruby
[19:53:30] LnxBil: Ox0dea: Thank you. I have two lines actually: ret.instance_variable_set("@#{k}", v); ret.instance_eval("def #{k}; @#{k}; end")
[19:53:46] myntcake: has joined #ruby
[19:53:57] unreal: has joined #ruby
[19:55:56] wldcordeiro: has joined #ruby
[19:56:56] dlitvak: has joined #ruby
[19:57:18] Ox0dea: LnxBil: I won't presume to know more about what you're trying to do than you do, but that sure seems like an awful lot of machinery where a Hash might suffice.
[19:57:44] Ox0dea: This *is* Ruby, though, so more power to ya. :P
[19:59:02] LnxBil: Ox0dea: I want it to feel like an ActiveRecord
[19:59:32] Papierkorb: LnxBil: to the second statement, you can do without evil eval: ret.singleton_class.instance_exec{ attr_reader(k) }
[20:01:35] justbleed: has joined #ruby
[20:02:26] solars: has joined #ruby
[20:04:04] bronson: has joined #ruby
[20:04:31] chouhoul_: has joined #ruby
[20:04:56] swills: has joined #ruby
[20:05:15] LnxBil: Papierkorb: Thank you. Other suggested singleton, too. It works. I know that eval is more insecure, but this is more secure? Because of the singleton or why exactly?
[20:06:19] chouhoul_: has joined #ruby
[20:06:26] Papierkorb: LnxBil: It's not more secure (as long that 'k' is not user controlled), but easier to read and less magical to me. Also, code linters understand it, whereas eval is just a random string to such tools
[20:06:56] symm-: has joined #ruby
[20:07:02] Ox0dea: Never mind that `eval` is dog-slow.
[20:07:42] LoneHerm_: has joined #ruby
[20:09:57] shadoi: nerium: about your question before about querying deeply nested hashes, I suggest using JQ (there are ruby bindings)
[20:10:22] nerium: shadoi: jq?
[20:10:38] shadoi: it's a query language for json
[20:10:48] shadoi: you can ask for nested values, etc.
[20:11:05] shadoi: https://stedolan.github.io/jq/
[20:11:17] nerium: shadoi: thanks!
[20:13:13] pawnbox: has joined #ruby
[20:13:37] sp4rrow: has joined #ruby
[20:15:01] Ox0dea: shadoi: But we have #dig?
[20:15:34] lvn: has joined #ruby
[20:18:59] shadoi: Ox0dea: yeah in 2.3, which most don't have in production yet :)
[20:19:04] tvw: has joined #ruby
[20:19:42] chipotle: has joined #ruby
[20:19:42] shadoi: also doesn't let you query by values, etc.
[20:20:01] shadoi: jq is xpath-like
[20:21:03] Respek: has joined #ruby
[20:21:44] benlieb: has joined #ruby
[20:22:28] DexterLB: has joined #ruby
[20:23:15] Papierkorb: Wat jq isn't "just" a CLI tool?
[20:23:23] Ox0dea: Not anymore!
[20:23:33] SCHAAP137: has joined #ruby
[20:23:39] Papierkorb: lets hope it's just not some damn wrapper around the binary
[20:23:53] laphlaw: has joined #ruby
[20:24:58] laphlaw: Hi, I'm using two gems that happen to have identical method names. How can I specify one method is invoked over the other?
[20:25:30] Papierkorb: laphlaw: I take these two gems monkey-patch the same class?
[20:25:57] laphlaw: Papierkorb: not sure...
[20:26:22] shadoi: Papierkorb: https://github.com/winebarrel/ruby-jq
[20:26:35] tobiasvl: well if they don't, the methods don't collide, do they?
[20:26:54] laphlaw: I'm not entirely sure if they do or don't.. sorry, still new at Ruby
[20:27:10] Papierkorb: tobiasvl: Or the gems have modules, which are included into the same class overriding each other. Who knows?
[20:27:16] tobiasvl: yeah, who knows
[20:27:33] Papierkorb: laphlaw: Can you paste your code showing the problem? gist.github.com or pastie.org are services for that
[20:27:37] laphlaw: all I know is the behavior I see.. the method I don't want invoked is getting invoked
[20:27:51] cnr_roxx: has joined #ruby
[20:28:21] Papierkorb: shadoi: That sounds interesting
[20:29:04] laphlaw: let me create a gist
[20:31:15] duckpupp1: has joined #ruby
[20:31:17] dlitvak: has joined #ruby
[20:31:26] tAn: has joined #ruby
[20:33:31] laphlaw: This should give you an idea of the issue I'm seeing:
[20:33:33] laphlaw: https://gist.github.com/anonymous/ae3690bab83fcc69f5bc
[20:33:33] tomphp: has joined #ruby
[20:33:44] FooMunki: has joined #ruby
[20:34:33] tulak: has joined #ruby
[20:35:20] tobiasvl: so yes, they both monkey patch Hash and add a plist method?
[20:35:28] shadoi: laphlaw: if cfpropertylist also contains a #to_plist method then it will take priority since it's loaded last.
[20:35:46] laphlaw: shadoi: yes. how do i prevent that?
[20:35:59] shadoi: don't load it last, or don't use one or the other libs.
[20:36:08] laphlaw: and if i need both?
[20:36:31] shadoi: move the require for plist to after cfpropertylist
[20:37:05] graydot: has joined #ruby
[20:37:54] laphlaw: in a related question: anyone familiar with the plist gem? essentially, i'm trying to load a binary plist file
[20:38:10] laphlaw: i couldn't figure out how to do it in that gem, so i had to use another one
[20:38:14] shadoi: really though, those gems should not be monkey patching core objects. That's really nasty.
[20:38:34] vilislacis: has joined #ruby
[20:38:41] m0rph: has joined #ruby
[20:39:03] zacts: has joined #ruby
[20:40:00] trosborn: has joined #ruby
[20:40:35] baweaver: has joined #ruby
[20:42:36] stannard: has joined #ruby
[20:44:01] mattwildig: has joined #ruby
[20:44:19] ICantCook: has joined #ruby
[20:46:44] Marsupermammal: has joined #ruby
[20:49:04] baweaver: has joined #ruby
[20:49:39] B4daBing73: has joined #ruby
[20:49:54] blackgoat: has joined #ruby
[20:50:25] spider-mario: has joined #ruby
[20:50:42] n008f4g_: has joined #ruby
[20:51:10] x77686d: has joined #ruby
[20:53:45] NeckBeardPrince: has joined #ruby
[20:54:30] NeckBeardPrince: has joined #ruby
[20:55:53] jmignault: has joined #ruby
[20:56:46] kuroro: has joined #ruby
[20:57:40] idefine: has joined #ruby
[20:59:02] robbyoconnor: has joined #ruby
[21:00:42] stannard: has joined #ruby
[21:01:12] tAn: has joined #ruby
[21:01:25] Rodya_: has joined #ruby
[21:01:43] shanemcd: has joined #ruby
[21:02:06] counterapparatus: has joined #ruby
[21:02:08] kuroro: hi everyoone. i have 4+ years of rubyonrails/javascript experience and currently available for remote contract work. if anyone is looking, PM me :)
[21:02:19] BrunoSaboia: has joined #ruby
[21:03:16] jenrzzz: has joined #ruby
[21:03:55] lvn: you're from canada?
[21:04:00] RE: has left #ruby: ()
[21:05:12] stannard: has joined #ruby
[21:10:48] baweaver: kuroro: y'might mention it in ruby-offtopic as well
[21:11:30] baweaver: look up rails-link Slack, they have a fairly extensive jobs board on there.
[21:12:53] Aviio: has joined #ruby
[21:13:29] kuroro: baweaver: thanks! i'll look it up
[21:16:00] FernandoBasso: has joined #ruby
[21:16:22] RudolphFenz: has joined #ruby
[21:17:17] jgpawletko: has joined #ruby
[21:18:02] n008f4g_: has joined #ruby
[21:18:21] Abrin: has left #ruby: ()
[21:19:18] jenrzzz: has joined #ruby
[21:20:47] goodcodeguy: has joined #ruby
[21:20:49] snowy: has joined #ruby
[21:21:37] rickmasta: has joined #ruby
[21:22:09] idefine: has joined #ruby
[21:24:29] shanemcd: has joined #ruby
[21:24:51] djbkd: has joined #ruby
[21:25:52] cpup: has joined #ruby
[21:26:45] Respek: has joined #ruby
[21:27:08] allcentury: has joined #ruby
[21:27:29] flopsec-: has joined #ruby
[21:28:16] B1n4r10: has joined #ruby
[21:29:50] TobiG77: has joined #ruby
[21:33:22] duckpupp1: has joined #ruby
[21:34:11] seth_: has joined #ruby
[21:35:42] seth_: just wondering if this is a bug? `((BigDecimal.new(5898) / 181) * 181).to_i == 5897`
[21:36:31] seth_: `to_f` works correctly `((BigDecimal.new(5898) / 181) * 181).to_f == 5898.0`
[21:37:22] ruby-lang531: has joined #ruby
[21:37:46] shanemcd: has joined #ruby
[21:39:46] apeiros: seth_: no. that's normal truncation happening. you probably want .round, not .to_i.
[21:40:31] apeiros: and equality comparisons of floats is something you really shouldn't do
[21:40:47] sp4rrow: has joined #ruby
[21:41:34] seth_: apeiros: that was just for show, so you can see what its returning
[21:42:10] Ox0dea: >> require 'bigdecimal'; a, b = [5898, 181].map &BigDecimal.method(:new); a / b * b == a
[21:42:11] ruby[bot]: Ox0dea: # => false (https://eval.in/528388)
[21:42:15] Ox0dea: Looks buggy to me.
[21:42:17] amargherio: has joined #ruby
[21:42:26] seth_: apeiros: shouldn't `to_i` return `5898`
[21:42:30] seth_: apeiros: shouldn't `to_i` return `5898`?
[21:42:42] Ox0dea: It's truncating, not rounding.
[21:42:45] apeiros: seth_: no. inspect the value before to_i
[21:43:05] apeiros: to_i truncates. it doesn't round.
[21:43:17] HalcyonicStorm: has joined #ruby
[21:43:33] apeiros: BigDecimal has arbitrary precision. that still doesn't allow it to represent some values. it's not Rational.
[21:43:34] seth_: apeiros: then why does `to_f` give a different result?
[21:43:47] apeiros: seth_: does to_f truncate?
[21:44:14] HalcyonicStorm: has left #ruby: ()
[21:44:17] seth_: apeiros: truncate would just remove the 0, not round down
[21:44:44] apeiros: ok, you probably should look up what truncate means.
[21:49:07] watersoul: has joined #ruby
[21:49:40] shanemcd: has joined #ruby
[21:49:41] baweaver: seth_: what is 5/2?
[21:50:15] benlieb: has joined #ruby
[21:50:16] hund9443: has joined #ruby
[21:50:43] ledestin: has joined #ruby
[21:51:19] baweaver: answer, then try in your irb/pry. Meditate on the answer, and become enlightened.
[21:52:09] bronson: has joined #ruby
[21:52:23] moei: has joined #ruby
[21:52:29] krobzaur: has joined #ruby
[21:53:34] RalfJ: has joined #ruby
[21:53:53] seth_: baweaver: i don't get ur point?
[21:54:07] baweaver: What is the answer to 5 / 2?
[21:54:09] htmldrum: has joined #ruby
[21:54:18] seth_: or 2 with ints
[21:54:21] ruby[bot]: baweaver: # => 2 (https://eval.in/528389)
[21:54:30] baweaver: that's your issue
[21:54:36] baweaver: and that's truncation
[21:55:09] seth_: i want to do this without floats `(5898 / 181) * 181`
[21:55:12] seth_: any suggestions?
[21:55:29] seth_: my answer should be `5898`
[21:56:39] seth_: yeah, but how about without floats?
[21:56:41] baweaver: or continue to meditate on the nature of truncation
[21:56:45] Ox0dea: seth_: Use Rational.
[21:56:51] seth_: shouldnt big decimal work?
[21:57:16] fullofcaffeine: has joined #ruby
[21:57:27] Ox0dea: >> 5898r / 181 * 181
[21:57:28] ruby[bot]: Ox0dea: # => (5898/1) (https://eval.in/528390)
[21:58:32] Aviio: has joined #ruby
[21:59:37] apeiros: seth_: as said before, inspect the value before your to_i and look up what truncation is. hint: 5.999 truncated is not 6.
[21:59:41] snockerton: has joined #ruby
[22:00:16] apeiros: I already gave all the answers the first time around.
[22:02:15] apeiros: (rational is the better choice if it's only addition/subtraction/multiplication/division)
[22:04:34] jenrzzz: has joined #ruby
[22:04:50] seth_: Ok cool rational looks like it solves the issue
[22:04:58] hund9443: has left #ruby: ()
[22:05:55] trinaldi: has joined #ruby
[22:07:14] apeiros: ACTION sobs again and decides it's not worth it
[22:07:34] Noxilex: has joined #ruby
[22:07:51] idefine: has joined #ruby
[22:08:14] kenpoint: has joined #ruby
[22:09:05] shevy: it looked like a StackOverflow "question" :D
[22:09:14] snowy: has joined #ruby
[22:09:31] QORRiE: has joined #ruby
[22:10:02] idefine: has joined #ruby
[22:10:54] mattwildig: has joined #ruby
[22:10:56] tlaxkit: has joined #ruby
[22:13:52] dn`: has joined #ruby
[22:13:53] mattwildig: has joined #ruby
[22:13:56] chipotle: has joined #ruby
[22:14:09] idefine: has joined #ruby
[22:15:46] hahuang65: has joined #ruby
[22:16:34] idefine: has joined #ruby
[22:17:14] uglybandersnatch: has joined #ruby
[22:18:02] Canar: /help mode
[22:18:04] Canar: /help mode
[22:18:07] Canar: argh sorrt
[22:18:48] lacuna: has joined #ruby
[22:18:50] william3: has joined #ruby
[22:18:55] thevaliantx: has joined #ruby
[22:19:44] shevy: /help sort
[22:21:03] fullofcaffeine: has joined #ruby
[22:23:21] tobiasvl: Canar: what are you trying to do
[22:23:43] Canar: tobiasvl: not fail
[22:24:07] Canar: get help on the mode command in weechat
[22:24:09] binaryplease: has joined #ruby
[22:24:24] tobiasvl: no space in front
[22:24:32] tobiasvl: I thought you were trying to summon the ruby[bot]
[22:24:37] mary5030_: has joined #ruby
[22:24:38] Canar: no, just failing
[22:25:37] idefine: has joined #ruby
[22:26:03] KensoDev: has joined #ruby
[22:26:15] fullofcaffeine: has joined #ruby
[22:27:12] stolid: has joined #ruby
[22:27:56] alphaatom: has joined #ruby
[22:29:50] x77686d: has joined #ruby
[22:30:15] Azure: has joined #ruby
[22:30:38] mjc_: has joined #ruby
[22:30:39] DenysLins: has joined #ruby
[22:31:03] shevy: Oh I can relate to that Canar ... I always mispasted via weechat and irssi
[22:31:04] pandaant: has joined #ruby
[22:31:19] DenysLins: has left #ruby: ()
[22:31:21] idefine: has joined #ruby
[22:34:02] duckpupp1: has joined #ruby
[22:34:55] jhack: has joined #ruby
[22:36:21] idefine: has joined #ruby
[22:37:58] idefine: has joined #ruby
[22:38:35] intrigueD: has joined #ruby
[22:39:22] marr: has joined #ruby
[22:40:13] tulak: has joined #ruby
[22:40:28] Vingador: has joined #ruby
[22:40:53] zenlot_away: has joined #ruby
[22:41:31] josh1: has joined #ruby
[22:42:23] Vingador: has joined #ruby
[22:45:44] Trynemjoel: has joined #ruby
[22:49:40] Rodya_: has joined #ruby
[22:49:46] shanemcd: has joined #ruby
[22:49:51] idefine: has joined #ruby
[22:50:16] skade: has joined #ruby
[22:51:40] trosborn: has joined #ruby
[22:51:40] moei: has joined #ruby
[22:52:54] idefine: has joined #ruby
[22:53:21] baweaver: has joined #ruby
[22:53:31] hangelo: has joined #ruby
[22:54:24] volty: has joined #ruby
[22:55:14] pdoherty: has joined #ruby
[22:56:57] idefine: has joined #ruby
[22:57:30] hiljusti: has joined #ruby
[22:59:32] cpup: has joined #ruby
[22:59:32] IrishGringo: has joined #ruby
[23:01:46] elifoster: has joined #ruby
[23:02:53] uglybandersnatch: has joined #ruby
[23:03:35] shanemcd: has joined #ruby
[23:04:28] kies^: has joined #ruby
[23:05:29] n008f4g_: has joined #ruby
[23:05:30] idefine: has joined #ruby
[23:06:01] baweaver: has joined #ruby
[23:08:48] robbyoconnor: has joined #ruby
[23:09:16] augcesar: has joined #ruby
[23:09:54] augcesar: has joined #ruby
[23:10:38] audiodude: has joined #ruby
[23:12:11] malconis: has joined #ruby
[23:13:19] audiodude: In case anyone is interested, I'll be livecoding the Railsbridge message board curriculum (https://t.co/EUgXPjUfTo) tonight at 6 PM PT, YouTube link is: https://t.co/eUGsbLtSfh
[23:15:08] zmartAzz: has joined #ruby
[23:16:48] Mr0rris0: has joined #ruby
[23:17:15] justin_pdx: has joined #ruby
[23:20:16] sgambino: has joined #ruby
[23:21:34] tAn: has joined #ruby
[23:21:55] Rodya_: has joined #ruby
[23:25:19] kam270: has joined #ruby
[23:30:15] sethrmo: has joined #ruby
[23:31:13] fmcgeough: has joined #ruby
[23:32:14] duderono_: has joined #ruby
[23:32:45] b|ackwolf: does Ruby coerce a string that start with a digit to that digit and becomes truth?
[23:33:11] uglybandersnatch: has joined #ruby
[23:33:43] azure32: has joined #ruby
[23:34:06] mattwildig: has joined #ruby
[23:34:12] audiodude: b|ackwolf: no, everything in ruby is true except for false and nil
[23:34:27] audiodude: or "truthy" rather
[23:34:52] duckpupp1: has joined #ruby
[23:35:24] duderono_: has joined #ruby
[23:35:38] karapetyan: has joined #ruby
[23:37:11] TheMoonMaster: has joined #ruby
[23:37:11] TheMoonMaster: has joined #ruby
[23:38:03] shevy: b|ackwolf what a strange question :)
[23:39:16] b|ackwolf: shevy, I saw languages do that. VimL, Perl
[23:40:00] rickmasta: has joined #ruby
[23:40:18] b|ackwolf: shevy, Ben Orenstein one of the "thoughtbot" members said Ruby does that as well.
[23:40:45] b|ackwolf: shevy, If you watched his first video from "Onramp to Vim"
[23:40:45] sonOfRa: has joined #ruby
[23:42:45] Pisuke: has joined #ruby
[23:43:12] n008f4g_: has joined #ruby
[23:43:17] drbrain: ruby only coerces numeric types to other numeric types via #coerce
[23:43:52] drbrain: so "12345" can't become 12345 without you calling #Integer or #to_i
[23:44:03] drbrain: s/you/someone
[23:44:09] r4z3r: has joined #ruby
[23:44:51] b|ackwolf: drbrain, I didn't mean that.
[23:46:00] Maletor: has joined #ruby
[23:47:02] drbrain: internally, "1" is as true as "a" or "" or " " * 10_000_000
[23:47:07] duderono_: has joined #ruby
[23:47:23] drbrain: b|ackwolf: ↑ ?
[23:48:13] jenrzzz: has joined #ruby
[23:48:32] chouhoulis: has joined #ruby
[23:50:00] shevy: b|ackwolf yeah I think perl does that a lot, that auto-coercion thingy. ruby went another way
[23:51:32] idefine: has joined #ruby
[23:52:13] idefine: has joined #ruby
[23:54:17] p0p0pr37: has joined #ruby
[23:54:59] chouhoulis: has joined #ruby
[23:55:31] sp4rrow: has joined #ruby
[23:56:19] Aviio: has joined #ruby
[23:58:50] Cohedrin: has joined #ruby