« Back to channel list

#ruby - 06 November 2015

« Back 1 day Forward 1 day »
[00:00:00] tsunamie: netule, references?
[00:00:03] idefine: has joined #ruby
[00:00:14] netule: http://ruby-doc.org/ is a great place to start for a Ruby reference
[00:00:24] Ox0dea: tsunamie: But now that you know about the #methods method...
[00:00:26] netule: Ox0dea I didn't suggest that codeacademy was a reference
[00:00:45] netule: maybe my phrasing was off, im getting to my 4:00 PM burnout
[00:00:54] _aeris_: has joined #ruby
[00:00:55] derailed: has joined #ruby
[00:01:12] Ox0dea: netule: How else could I have interpreted "that's what references are for" in the context of a discussion about Codecademy?
[00:01:22] millerti: has joined #ruby
[00:01:26] devoldmx: has joined #ruby
[00:01:43] tsunamie: Ox0dea, netule sorry for ranting. I am going to sleep it's midnight here
[00:01:43] ruurd: has joined #ruby
[00:01:53] Ox0dea: tsunamie: Night.
[00:01:59] idefine_: has joined #ruby
[00:02:11] tsunamie: just so we are clear. how would I find all the methodes for an object?
[00:02:23] Ox0dea: tsunamie: The #methods method.
[00:02:36] arescorpio: has joined #ruby
[00:02:44] Ox0dea: >> [1,2,3].methods # tsunamie
[00:02:45] ruboto: Ox0dea # => [:inspect, :to_s, :to_a, :to_h, :to_ary, :frozen?, :==, :eql?, :hash, :[], :[]=, :at, :fetch, :first ...check link for more (https://eval.in/463968)
[00:02:54] tsunamie: ahhhhhhhhhhhhhh
[00:03:05] tsunamie: Ox0dea, are you based in london?
[00:03:07] zenspider_: tsunamie: that sucks. Everytime I teach the FIRST thing I do is teach ri and irb
[00:03:11] tsunamie: I want to buy you a drink
[00:03:14] Ox0dea: >> [1,2,3].methods == Array.instance_methods # tsunamie
[00:03:15] ruboto: Ox0dea # => true (https://eval.in/463969)
[00:03:35] nibbo: has joined #ruby
[00:03:57] Ox0dea: tsunamie: Nah, and I don't think I deserve a beer for giving you the incentive to stay up now. :P
[00:04:17] idefine: has joined #ruby
[00:04:19] tsunamie: lol goodnight and thanks everyone
[00:04:30] zenspider_: tsunamie: please give them feedback. that's a huge oversight
[00:04:36] s00pcan: has joined #ruby
[00:04:54] tsunamie: zenspider_, sure thing
[00:04:58] millerti: has joined #ruby
[00:06:50] idefine: has joined #ruby
[00:08:01] netule: Ox0dea yup, like I said, my phrasing was way off on that sentence.
[00:09:15] Ox0dea: netule: "Off" is a little lukewarm, don't you think?
[00:09:18] Ox0dea: It's okay to be wrong sometimes.
[00:10:23] TheNet: has joined #ruby
[00:12:57] ruurd: has joined #ruby
[00:15:48] Blaguvest: has joined #ruby
[00:18:21] user9956: has joined #ruby
[00:18:45] user9956: may I ask what is the "::" operator in Ruby
[00:19:15] user9956: can I use it in "send" method for example to dynamically dereference nested modules?
[00:20:53] jhass: user9956: primarily the namespace resolution operator
[00:20:58] zenspider_: user9956: it's 2 things. it is an alias for "." as in Module::method
[00:21:01] jhass: user9956: you can use it in place of . too, but that's highly discouraged
[00:21:05] baweaver: has joined #ruby
[00:21:11] zenspider_: it's also namespace access: Module::SubModule
[00:21:50] Ox0dea: user9956: The method you want is #const_get.
[00:23:05] vigintas: has joined #ruby
[00:23:20] user9956: how can I call it dynamically?
[00:23:23] roxtrongo: has joined #ruby
[00:23:34] user9956: for example like Module1.send "::", "Module2"
[00:23:58] rabbithole: has joined #ruby
[00:24:11] Ox0dea: user9956: M1.const_get 'M2'
[00:25:07] user9956: but I don't want to get the constant
[00:25:21] user9956: i want to dynamically execute the operator
[00:25:24] user9956: or isnt it possible
[00:25:31] barhum2013: has joined #ruby
[00:25:58] Ox0dea: >> module A; module B; end end; A.const_get 'B' # user9956
[00:25:59] ruboto: Ox0dea # => A::B (https://eval.in/463970)
[00:26:05] Ox0dea: Check your assumptions.
[00:27:13] A124: has joined #ruby
[00:28:03] adaedra: class Z; end <=> Z = Class.new
[00:28:24] DiCablo: has joined #ruby
[00:28:43] ruurd: has joined #ruby
[00:29:02] Ox0dea: It's situational, though.
[00:30:30] nertzy: has joined #ruby
[00:30:46] northfurr: has joined #ruby
[00:33:10] zenspider: user9956: what are you REALLY trying to do?
[00:33:27] user9956: nothing, just a beginner in Ruby
[00:33:47] user9956: trying to unserstand the message passing nature of method calls
[00:34:12] user9956: thought I could execute the operator in the form of smalltalk messaging
[00:34:43] moeabdol: has joined #ruby
[00:34:58] Ox0dea: user9956: That understanding is valid only for the operators that're actually methods.
[00:35:46] Ox0dea: >> [].methods.sort.take 14 # user9956: These, more or less.
[00:35:47] ruboto: Ox0dea # => [:!, :!=, :!~, :&, :*, :+, :-, :<<, :<=>, :==, :===, :=~, :[], :[]=] (https://eval.in/463972)
[00:36:31] Ox0dea: That's missing :|, :^, :+@, :-@, :~, and :>>.
[00:36:58] Ebok: wouldnt take 20 have included them? >_>
[00:37:14] yfeldblum: has joined #ruby
[00:37:14] Ox0dea: They don't all have definitions on Array.
[00:37:18] Ebok: ah right array--yeah
[00:38:08] user9956: ahh ok understood now Ox0dea
[00:38:08] Ox0dea: >> ObjectSpace.each_object(Class).flat_map(&:instance_methods).uniq.grep(/^\W/).size
[00:38:09] ruboto: Ox0dea # => 27 (https://eval.in/463973)
[00:38:19] Ox0dea: user9956: There are 27 "operators" you can #send.
[00:38:27] Ox0dea: We're not quite Smalltalk, but you can't get too much closer.
[00:38:39] roxtrongo: has joined #ruby
[00:39:24] charliesome: has joined #ruby
[00:39:25] jgt1: has joined #ruby
[00:39:54] solocshaw: has joined #ruby
[00:40:30] zenguy_pc: has joined #ruby
[00:41:07] DLSteve: has joined #ruby
[00:42:12] chipotle: has joined #ruby
[00:42:14] nateberkopec: has joined #ruby
[00:42:20] djbkd: has joined #ruby
[00:43:30] ruurd: has joined #ruby
[00:43:49] predator117: has joined #ruby
[00:43:50] mndoci: has joined #ruby
[00:44:45] yfeldblum: has joined #ruby
[00:47:08] wilbert: has joined #ruby
[00:47:44] gusTester: has joined #ruby
[00:47:55] RegulationD: has joined #ruby
[00:48:09] lemur: has joined #ruby
[00:48:55] shmilan: has joined #ruby
[00:49:20] zenspider: ARGH... my stuuupid apache setup is trying to run "seattle.rb.png" as a cgi because .rb is in the middle. wtf
[00:49:40] tmtwd: has joined #ruby
[00:49:45] zenspider: so much for apache looking at the "extension" of the file
[00:49:59] idefine: has joined #ruby
[00:50:12] bnagy: that... o_0 that sounds like a security issue
[00:50:23] adaedra: MultiViews?
[00:50:27] bnagy: for anything that allows user uploaded images, anyway
[00:50:34] bahar: has joined #ruby
[00:50:35] bahar: has joined #ruby
[00:52:05] ruurd: has joined #ruby
[00:52:29] zenspider: adaedra: pardon?
[00:52:55] zenspider: bnagy: it's all static shit. I could rename the file to make this problem go away but that's a hassle (not that this config shit isn't)
[00:54:19] bnagy: yeah, not a security issue for you, but maybe for someone
[00:54:25] adaedra: zenspider: mh, looks like I mixed it with something else.
[00:54:40] zenspider: adaedra: ah I see what you're asking. yes, MultiViews is on. dunno what that is
[00:54:45] bnagy: assuming this setup isn't unique to you :P
[00:54:50] abucha: has joined #ruby
[00:55:10] adaedra: But I remember there is an option for Apache to consider consecutive file extensions or something like that.
[00:55:18] adaedra: Haven't apached for sometime though.
[00:55:23] adaedra: May be totally wrong.
[00:56:48] VeryBewitching: has joined #ruby
[00:56:58] zenspider: I'm turning it off and poking
[00:57:14] adaedra: Might me relevant. http://httpd.apache.org/docs/2.2/mod/mod_mime.html#multipleext
[00:57:38] zenspider: argh. no help.
[00:57:51] zenspider: Options ExecCGI is off in this directory: .../Ruby_Sadist_files/Seattle.rb.small.png, referer: http://sadi.st/Ruby_Sadist.html
[00:58:38] zenspider: adaedra: that's totally relevant. Thanks. I'll patch it that way
[01:00:43] pontiki_: has joined #ruby
[01:00:49] _blizzy_: has joined #ruby
[01:01:10] zenspider: that did it
[01:01:35] EminenceHC: has joined #ruby
[01:01:40] adaedra: Good ol' apache.
[01:02:11] moeabdol: has joined #ruby
[01:04:26] karapetyan: has joined #ruby
[01:04:32] hxegon: has joined #ruby
[01:04:39] ruurd: has joined #ruby
[01:08:21] duncannz: has joined #ruby
[01:08:31] idefine: has joined #ruby
[01:09:20] roxtrongo: has joined #ruby
[01:10:06] kaskalu: has joined #ruby
[01:10:07] shevy: may it rest in peace
[01:10:44] mistermocha: has joined #ruby
[01:13:01] d34th4ck3r: has joined #ruby
[01:13:48] spleeze: has joined #ruby
[01:14:04] [Butch]: has joined #ruby
[01:15:46] bruno-: has joined #ruby
[01:16:47] Ox0dea: What is the opposite of "rest in peace"?
[01:16:52] tkuchiki: has joined #ruby
[01:17:48] Ox0dea: I'm not sure that's right.
[01:17:56] th0m_: has joined #ruby
[01:18:00] Ox0dea: Whatever it is, it applies to Apache with its ~50% market share.
[01:19:06] asad_: has joined #ruby
[01:19:57] pontiki: "to your health"
[01:20:17] asad_: I have a shell command that has an alias. How can I invoke the command using the alias from within ruby?
[01:21:38] mndoci: has joined #ruby
[01:21:50] etcetcetc: has joined #ruby
[01:23:20] mistermocha: has joined #ruby
[01:24:18] ekinmur: has joined #ruby
[01:26:33] hxegon: has joined #ruby
[01:27:38] freerobby: has joined #ruby
[01:29:03] duckpupp1: has joined #ruby
[01:31:25] beauby: has joined #ruby
[01:33:56] jdawgaz: has joined #ruby
[01:34:50] Nick_ZWG: has joined #ruby
[01:36:00] [Butch]: has joined #ruby
[01:36:06] cyle: has joined #ruby
[01:40:15] mndoci: has joined #ruby
[01:41:16] ellisTAA: has joined #ruby
[01:42:27] Ox0dea: aliases = `bash -cl 'declare -p BASH_ALIASES'`.scan(/\[([^\]]+)\]="([^"]+)/).to_h
[01:42:37] Ox0dea: Reminiscent of the bad ol' days.
[01:42:59] nateberkopec: has joined #ruby
[01:45:14] skweek: has joined #ruby
[01:45:50] Musashi007: has joined #ruby
[01:46:18] mattwildig: has joined #ruby
[01:46:45] cwong_on_irc: has joined #ruby
[01:48:06] Ox0dea: So, you can include "Rakefile" in a gem's extension list to have your default Rake task executed post-install; this is pretty awesome, but RubyGems is mucking about with the output streams, so printing is annoying. :< https://eval.in/463874 only prints "--0--", indicating that I apparently have to repurpose stdin for output, and I don't wanna do that. Please advise.
[01:48:56] baweaver: has joined #ruby
[01:49:11] rakm: has joined #ruby
[01:50:37] djbkd: has joined #ruby
[01:51:24] sankaber: has joined #ruby
[01:52:16] dnomyar: has joined #ruby
[01:54:12] havenwood: Ox0dea: --0----1----2--=> [#<Proc:0x007f8c140d9bf0@(pry):2>]
[01:54:48] Ox0dea: havenwood: Did you execute `rake` directly?
[01:54:58] havenwood: Ox0dea: Rake::Task[:default].invoke
[01:55:01] Rinzlit1: has joined #ruby
[01:55:14] bb010g: has joined #ruby
[01:55:22] havenwood: Ox0dea: I just ran it in Pry.
[01:55:36] Ox0dea: havenwood: Right, it's specifically RubyGems' invocation of `rake` that's causing this.
[01:55:45] havenwood: Ox0dea: Gotcha, that makes sense.
[01:55:52] havenwood: Ox0dea: Just confirming.
[01:56:08] Ox0dea: I don't think I'm able to get in front of it to stop it redirecting output to Gem::Util::NULL_DEVICE. :<
[01:56:17] soulisson_: has joined #ruby
[01:56:24] blue_deref: has joined #ruby
[01:57:33] mdih: has joined #ruby
[01:58:04] Ox0dea: I could put code in the gemspec. :<
[01:58:11] chipotle: has joined #ruby
[01:58:38] Ox0dea: I think I'm just gonna write to stdin.
[01:59:59] giuseppesolinas: has joined #ruby
[02:00:45] havenwood: Ox0dea: I didn't know about default post-install with extension list include. Interesting!
[02:01:56] x-light: has joined #ruby
[02:02:10] devoldmx: has joined #ruby
[02:02:37] krzkrz: has joined #ruby
[02:02:41] soulisson_: has joined #ruby
[02:04:00] Musashi007: has joined #ruby
[02:06:39] cwong_on_irc: has joined #ruby
[02:06:52] soulisson_: Sorry, connection issue
[02:07:11] TheNet: has joined #ruby
[02:07:16] Ox0dea: havenwood: With great power...
[02:08:14] rabbithole: has joined #ruby
[02:10:51] kstuart: has joined #ruby
[02:11:37] hxegon_: has joined #ruby
[02:14:05] s00pcan: has joined #ruby
[02:14:28] rgrmatt: has joined #ruby
[02:16:45] edj979: has joined #ruby
[02:17:41] bruno-: has joined #ruby
[02:18:41] Nick_ZWG: has joined #ruby
[02:22:36] beauby: has joined #ruby
[02:23:25] yfeldblum: has joined #ruby
[02:23:31] roshanavand: has joined #ruby
[02:23:36] cdg: has joined #ruby
[02:23:50] charliesome: has joined #ruby
[02:24:52] kobain: has joined #ruby
[02:25:23] qiukun: has joined #ruby
[02:25:29] ellisTAA: has joined #ruby
[02:25:36] mistermo_: has joined #ruby
[02:25:36] TomPeed: has joined #ruby
[02:28:46] to_json: has joined #ruby
[02:28:46] to_json: has joined #ruby
[02:29:42] qiukun: has joined #ruby
[02:29:54] duckpupp1: has joined #ruby
[02:30:06] blackmesa: has joined #ruby
[02:30:44] mistermocha: has joined #ruby
[02:30:57] bigmac_: has joined #ruby
[02:31:50] bigmac_: what are all special characters that will cause issues with gsub?
[02:31:57] bigmac_: like backslash for exmaple
[02:32:04] freerobby: has joined #ruby
[02:33:07] pontiki: see the docs for Regexp
[02:34:19] Ox0dea: >> all = [*?!..?~]; all - all.select { |c| /#{c}/ rescue nil } # bigmac_
[02:34:20] ruboto: Ox0dea # => ["(", ")", "*", "+", "?", "[", "\\"] (https://eval.in/463996)
[02:34:30] ledestin: has joined #ruby
[02:34:31] Ox0dea: But that fails to account for various contexts.
[02:35:34] Ox0dea: '^', '-', and ']' are meaningful in character classes, for instance.
[02:36:10] pontiki: ACTION still prefers reading the docs
[02:36:24] mistermocha: has joined #ruby
[02:39:30] zenguy_pc: has joined #ruby
[02:41:18] Musashi007: has joined #ruby
[02:42:45] malconis: has joined #ruby
[02:42:53] radgeRayden: has joined #ruby
[02:42:56] Ox0dea: pontiki: Needs more Jedi.
[02:42:59] Ox0dea: http://catb.org/jargon/html/U/UTSL.html
[02:43:39] havenwood: The source is strong with this one...
[02:43:45] nateberkopec: has joined #ruby
[02:45:27] inteq: has joined #ruby
[02:46:12] Musashi007: has joined #ruby
[02:49:42] baweaver: has joined #ruby
[02:53:02] cwong_on_irc: has joined #ruby
[02:53:17] willardg: has joined #ruby
[02:53:25] Melpaws: has joined #ruby
[02:53:42] cwong_on_irc: has joined #ruby
[02:54:18] cwong_on_irc: has joined #ruby
[02:56:57] Melpaws: i need some guidance on converting a string to an array (i know how to convert strings to array). But my problem is i need to convert the string based on a regex pattern . So, the string would be broken up as the first part as [0], and the #after # to be [1] . String example : Doctor Strange #1 . Suggestions?
[02:58:06] niftylettuce: has joined #ruby
[02:58:30] c_nick: has joined #ruby
[02:59:03] atomical: has joined #ruby
[02:59:09] mndoci: has joined #ruby
[02:59:27] TheNet: has joined #ruby
[02:59:56] havenwood: Melpaws: I don't understand the example.
[03:01:18] c_nick: I have a MySQL::Results object which essentailly is an array of hashes. [{:name => "Nicolas", :continent => "EU"},{:name => "Nathan", :continent => "US"}] and I want to create an array of all unique names from this how should i go about it .. i can loop and store hash[:name] in another array and use but I am not sure if this is the right way to do it
[03:02:00] havenwood: c_nick: You've said what you have. What do you want? What would the desired result look like?
[03:02:00] bnagy: >> "Doctor Strange #1".split '#'
[03:02:01] ruboto: bnagy # => ["Doctor Strange ", "1"] (https://eval.in/463999)
[03:02:23] Melpaws: thank you both
[03:02:27] bnagy: c_nick: check Enumerable#group_by maybe
[03:02:49] havenwood: bnagy: You're better at . : notation than I am. :P
[03:03:15] havenwood: I was so lost with that example.
[03:03:24] ebbflowgo: has joined #ruby
[03:03:41] bnagy: was kind of guessing :/
[03:05:00] c_nick: bnagy: Ah! yes group by could help
[03:05:17] havenwood: c_nick: What would the desired result look like? An example?
[03:06:02] drizzle: has joined #ruby
[03:06:39] drizzle: has left #ruby: ()
[03:07:42] mistermocha: has joined #ruby
[03:07:43] charliesome: has joined #ruby
[03:07:44] havenwood: c_nick: What you're looking for leaves much to guess. A couple examples of expected input and desired output work wonders.
[03:08:06] havenwood: Or at least one example of desired output.
[03:08:11] ebbflowgo: has joined #ruby
[03:08:40] hxegon: has joined #ruby
[03:10:34] shevy: webservers marketshare http://news.netcraft.com/archives/2015/08/13/august-2015-web-server-survey.html
[03:11:02] favadi: has joined #ruby
[03:11:37] Prawnzy: has joined #ruby
[03:11:46] havenwood: c_nick: Anyways, in absence of any examples of desired output I'll guess: map { |h| h[:name] }.uniq
[03:11:54] kinduff: has joined #ruby
[03:12:00] havenwood: Who knows...
[03:12:58] bnagy: a.group_by {|e| e[:name]}.keys! \o/
[03:14:04] solocshaw: has joined #ruby
[03:15:40] TheNet: has joined #ruby
[03:19:00] astrobunny: has joined #ruby
[03:21:11] abucha_: has joined #ruby
[03:21:25] c_nick: havenwood: sorry i was AFK
[03:21:50] c_nick: more than map collect seems better .
[03:22:02] abucha_: has joined #ruby
[03:22:19] c_nick: This is what i have : [ {:name => "Nicolas", :continent => "EU"} , {:name => "Nathan", :continent => "US"} ]
[03:22:27] mordocai: has joined #ruby
[03:22:34] c_nick: This is what I want : array of all :name
[03:22:44] Ox0dea: c_nick: foo.map { |h| h[:name] }
[03:23:26] Ox0dea: How come that's not good?
[03:23:47] c_nick: that should work too
[03:24:17] c_nick: thats essentially same like array1 = [] MySql_Object.each { |s| array1 << s }
[03:24:30] c_nick: s[:name]*
[03:25:04] Ox0dea: c_nick: Yes, but #map more clearly expresses the intent in this case.
[03:25:13] Ox0dea: It's a transformation, not a process.
[03:26:08] c_nick: >> [{:name => "Nicolas", :continent => "EU"} , {:name => "Nathan", :continent => "US"}].map{ |k| k{:name]}.uniq
[03:26:09] ruboto: c_nick # => /tmp/execpad-af0cef562468/source-af0cef562468:2: syntax error, unexpected ']', expecting '}' ...check link for more (https://eval.in/464000)
[03:26:29] c_nick: >> [{:name => "Nicolas", :continent => "EU"} , {:name => "Nathan", :continent => "US"}].map{ |k| k[:name]}.uniq
[03:27:27] c_nick: map says that I will apply some algorithm on every element of the array / list .. while group by says i will group all the elements in the array based on a condition
[03:27:40] c_nick: map would be faster than group by per say ..
[03:28:28] mistermocha: has joined #ruby
[03:28:46] finisherr: has joined #ruby
[03:29:58] c_nick: Ox0dea: yes, a transformation
[03:30:09] c_nick: your right
[03:30:27] Ox0dea: c_nick: #group_by is also a transformation, but it's overly complex here.
[03:30:38] duckpupp1: has joined #ruby
[03:31:36] A124: has joined #ruby
[03:32:14] to_json: has joined #ruby
[03:32:14] to_json: has joined #ruby
[03:32:38] hxegon_: has joined #ruby
[03:32:53] blackmesa: has joined #ruby
[03:32:58] c_nick: yeah ok cool thanks all
[03:33:14] c_nick: i'll use map/collect
[03:33:20] Ox0dea: Just #map.
[03:33:24] Ox0dea: Nobody uses #collect.
[03:33:53] c_nick: hmm ok :)
[03:34:16] Guest53: has joined #ruby
[03:35:08] adam12: Ox0dea: :( I wish I was consistent but I use collect a lot more.
[03:35:21] Ox0dea: adam12: I don't understand.
[03:35:29] Ox0dea: Do you also use #collect_concat instead of #flat_map?
[03:35:47] adam12: No, but I use flat_map very rarely sooo
[03:39:36] DLSteve: has joined #ruby
[03:41:43] nateberkopec: has joined #ruby
[03:42:52] mattwildig: has joined #ruby
[03:45:50] sanjayu: has joined #ruby
[03:46:53] Musashi007: has joined #ruby
[03:48:48] Ox0dea: I just don't get it. https://eval.in/464011
[03:50:31] baweaver: has joined #ruby
[03:52:28] Ox0dea: Object.const_missing is definitely the method that gets invoked at the top level, and it clearly has no supermethod, and yet `super` works just fine.
[03:53:07] Ox0dea: https://www.youtube.com/watch?v=G3onOjHki-k
[03:54:23] d5sx43: has joined #ruby
[03:57:47] rabbithole: has joined #ruby
[03:57:47] d5sx43: has joined #ruby
[03:58:52] The_Phoenix: has joined #ruby
[03:59:06] Peteykun: has joined #ruby
[03:59:36] slawrence00: has joined #ruby
[04:00:35] EasyCo: Hey team, how do you guys typically test main/run type method? For instance, imagine a class method called .run. In that method we initialize a few other classes then we return a result in the form of a string.
[04:01:45] abucha: has joined #ruby
[04:02:05] EasyCo: Would you actually test what's happening inside that method or would you just black-box it and test the result of calling that method?
[04:02:44] mndoci: has joined #ruby
[04:02:56] devoldmx: has joined #ruby
[04:03:08] Ox0dea: EasyCo: Make pure everything that can be, and test those things.
[04:03:40] EasyCo: Ox0dea: What do you mean by make pure?
[04:04:01] Ox0dea: EasyCo: "Pure" here means "not reliant on state".
[04:04:21] krzkrz: has joined #ruby
[04:06:00] EasyCo: Right, that's still all pretty vague to me, haha.
[04:06:17] RegulationD: has joined #ruby
[04:08:07] slackbotgz: has joined #ruby
[04:08:48] cacam9621: has joined #ruby
[04:10:21] gusTester: has joined #ruby
[04:11:16] braincras: has joined #ruby
[04:11:52] kstuart: has joined #ruby
[04:15:05] baweaver: has joined #ruby
[04:16:11] devoldmx: has joined #ruby
[04:16:59] gix: has joined #ruby
[04:17:05] ni431: has joined #ruby
[04:18:15] subscope: has joined #ruby
[04:18:26] Melpaws: im converting a line in a file to an array but i get the \r\n in it. Example line : 1602 Witch Hunter Angela #4 . Example code : content = line.split '#'. . Example result : ["1602 Witch Hunter Angela ", "4\r\n"] . What am I doing wrong?
[04:22:27] Ox0dea: >> "foo\r\n".chomp # Melpaws
[04:22:28] ruboto: Ox0dea # => "foo" (https://eval.in/464035)
[04:23:20] leafybas_: has joined #ruby
[04:24:22] Ox0dea: A line isn't technically a line without a terminator.
[04:24:32] Ox0dea: I know it seems annoying, but it's actually the right definition.
[04:24:35] kp666: has joined #ruby
[04:24:40] krzkrz: has joined #ruby
[04:24:45] Contigi777: has joined #ruby
[04:31:23] duckpupp1: has joined #ruby
[04:31:46] tkuchiki: has joined #ruby
[04:33:36] cwong_on_irc: has joined #ruby
[04:33:40] blackmesa: has joined #ruby
[04:36:51] mistermocha: has joined #ruby
[04:37:08] RobertBirnie: has joined #ruby
[04:39:51] foomanchu: has joined #ruby
[04:41:05] solocshaw: has joined #ruby
[04:41:12] zenguy_pc: has joined #ruby
[04:41:14] slackbotgz: has joined #ruby
[04:41:14] krzkrzkrz: has joined #ruby
[04:43:20] abucha_: has joined #ruby
[04:43:50] darkf: has joined #ruby
[04:44:07] djbkd: has joined #ruby
[04:44:29] mloy: has joined #ruby
[04:44:44] cwong_on_irc: has joined #ruby
[04:44:57] saddad: has joined #ruby
[04:46:51] rbennacer: has joined #ruby
[04:46:54] infamos: has joined #ruby
[04:47:07] bluOxigen: has joined #ruby
[04:48:25] baweaver: has joined #ruby
[04:48:57] Musashi007: has joined #ruby
[04:49:15] Ox0dea: has joined #ruby
[04:49:50] lemur: has joined #ruby
[04:55:09] skweek: has joined #ruby
[04:55:37] cwong_on_irc: has joined #ruby
[04:55:47] dionysus69: has joined #ruby
[04:56:11] cwong_on_irc: has joined #ruby
[04:56:15] haraoka: has joined #ruby
[05:00:23] edj: has joined #ruby
[05:00:40] edj: is there a better place for ruby methods and stuff than ruby docs?
[05:00:51] edj: rubys docs is kind of sloppy and unorganized
[05:02:09] mesamoo: has joined #ruby
[05:02:54] edj: anibodi ?
[05:04:23] Ox0dea: edj: Could you cite a particularly egregious offender?
[05:05:36] edj: I'm not sure what you mean by that?
[05:05:49] edj: are you talking about pages?
[05:06:01] subscope: has joined #ruby
[05:06:20] trosborn: has joined #ruby
[05:07:21] Ox0dea: edj: What prompted you to ask for alternatives?
[05:07:59] edj: It's difficult to navigate. Especially when I'm not entirely sure what I'm looking for.
[05:08:47] edj: I'm looking for something formated more like mdn
[05:09:03] Ox0dea: So it's just a stylistic concern?
[05:09:27] shinenelson: has joined #ruby
[05:10:02] dopie: has joined #ruby
[05:10:21] luriv: has joined #ruby
[05:10:28] edj: I'm more concerned with the form of the data.
[05:10:31] edj: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators
[05:11:23] edj: The way this is organized seems more logical to me. That being said I am a total noob.
[05:13:23] edj: I probably don't even know how to say what I'm having trouble with.
[05:15:36] rokr1: has joined #ruby
[05:23:09] roxtrongo: has joined #ruby
[05:24:16] leafybas_: has joined #ruby
[05:28:24] rabbitho1e: has joined #ruby
[05:28:36] ohaibbq: has joined #ruby
[05:29:41] mistermocha: has joined #ruby
[05:30:42] peppers: has joined #ruby
[05:30:54] baweaver: has joined #ruby
[05:32:09] duckpupp1: has joined #ruby
[05:32:45] Nick_ZWG: has joined #ruby
[05:34:25] blackmesa: has joined #ruby
[05:35:08] simplyianm: has joined #ruby
[05:35:39] simplyia_: has joined #ruby
[05:36:43] Ox0dea: edj: I concede that those docs are "nicer", but it doesn't strike me as a fundamentally "better" way to present that kind of information.
[05:37:29] favadi: has joined #ruby
[05:37:53] kfpratt: has joined #ruby
[05:38:04] x-light: has joined #ruby
[05:38:05] neanderslob_: has joined #ruby
[05:42:44] User458764: has joined #ruby
[05:43:36] tkuchiki: has joined #ruby
[05:43:39] kstuart: has joined #ruby
[05:50:39] mistermocha: has joined #ruby
[05:52:23] krzkrzkrz: has joined #ruby
[05:53:08] Peteykun: has joined #ruby
[05:53:24] pdoherty_: has joined #ruby
[05:53:49] charliesome: has joined #ruby
[05:53:50] infamos: has joined #ruby
[05:58:13] DrCode: has joined #ruby
[05:58:58] Badman703: has joined #ruby
[05:59:08] Badman703: hi guys i need some help with ruby
[05:59:13] Badman703: first time user, jsut installed it for windows
[05:59:52] arup_r: has joined #ruby
[06:00:00] Badman703: im trying to run a script thing and in the installation it says
[06:00:02] Badman703: "Add this line to your application's Gemfile:"
[06:00:06] Badman703: what does that mean?
[06:00:24] Ox0dea: Badman703: Could you elaborate on "script thing"?
[06:00:41] Badman703: its a program/script that merges two images
[06:01:00] Badman703: https://github.com/trishume/doubleVision#doublevision
[06:01:10] Badman703: Can you help me with this?
[06:01:39] Ox0dea: Badman703: If you've installed Ruby properly, you should be able to say `gem install doubleVision`.
[06:02:45] d34th4ck3r: has joined #ruby
[06:03:32] Badman703: ok that seem slike it worked
[06:03:34] Badman703: 2 gems installed
[06:03:49] zoskia: has joined #ruby
[06:03:53] Ox0dea: Badman703: Excellent. And now you can follow the usage instructions presented in the README.
[06:04:26] zoskia: $ ruby -e $'p :#\n foo'
[06:04:46] Ox0dea: zoskia: It's been fixed.
[06:05:13] Badman703: doubleVision withgamma.png withoutgamma.png out.png
[06:05:18] Badman703: so thats how i urn it?^
[06:05:28] Badman703: what abotu the file loactiopn of the actula png?
[06:05:37] Ox0dea: You'll have to provide them?
[06:05:40] Badman703: di put the path or where i put them
[06:05:48] zoskia: 3562: That it was a problem to begin with, relied upon for years, is the issue.
[06:05:56] Badman703: ok si instead doubleVision foldder/withgamma.png fodler/withoutgamma.png out.png
[06:05:59] Ox0dea: zoskia: Relied upon?
[06:06:25] Ox0dea: Badman703: Yes, but you could also `cd` into that folder and run it without the explicit path.
[06:06:27] Badman703: would it default the loaction to whatever cmd says, so c:/users/myusername> ?
[06:06:35] Badman703: ok great i shoudl know how to take it form here
[06:06:38] Badman703: lets see if it works
[06:06:42] Ox0dea: Godspeed.
[06:06:54] Badman703: how do i cd up a directory?
[06:06:56] astrobunny: has joined #ruby
[06:06:57] Badman703: like backwards?
[06:07:02] Ox0dea: `cd ..` might work.
[06:07:15] Badman703: yup, thanks, dont use cmd often
[06:07:19] Ox0dea: Nor I. :P
[06:08:01] Nick_ZWG: has joined #ruby
[06:08:09] mkilic: has joined #ruby
[06:08:10] zoskia: None of you learned to Linux.
[06:08:27] Ox0dea: I think you missed my joke...
[06:08:37] zoskia: Clearly, 3562.
[06:10:04] Badman703: im takign a UNIX class next sem
[06:10:08] Ox0dea: >> eval ":#\nfoo" # zoskia: So how come you were using this trick?
[06:10:09] ruboto: Ox0dea # => :foo (https://eval.in/464046)
[06:10:41] Ox0dea: Badman703: UNIX all caps is the AT&T trademark.
[06:10:58] zoskia: Was just going through parser rejected code that Ruby MRI erroneously accepts.
[06:11:09] Ox0dea: I don't believe you.
[06:11:32] zoskia: I don't think I care.
[06:12:00] Ox0dea: https://github.com/ruby/ruby/commit/7484d
[06:12:04] zoskia: Badman703: Studying the SuS probably?
[06:12:13] zoskia: 3562: I raise, https://github.com/ruby/ruby/commit/7484d07ca765770619b32a744fde15ae240a3517
[06:12:33] Ox0dea: You are a character, eh?
[06:12:57] zoskia: Not particularly. It's just simpler to say that where the patch for a bug is backported to releases several years old, I'm pretty sure the syntax can be said to be erroneous.
[06:13:07] zoskia: Badman703: UNIX. :)
[06:14:00] Ox0dea: Yes, it was obviously a bug, but that it survived so long is indicative of the fact that nobody encountered it.
[06:14:18] zoskia: I think apeiros is going to give me an earshot for a change-of-nick against #ruby-pro again. Not sure I'm ready to deal with it. :(
[06:14:39] diegoaguilar: has joined #ruby
[06:16:43] Nick_ZWG: has joined #ruby
[06:17:17] zoskia: Badman703: There is no UNIX, only the trademark where things are UNIX compliant against the Single UNIX Specification.
[06:18:12] dhjondoh: has joined #ruby
[06:18:12] zoskia: Like Mac OS!
[06:19:05] zoskia: I have trouble deciding on a Dell XPS or the (upcoming, unreleased, undocumented) Macbook Pro.
[06:19:08] bruno-: has joined #ruby
[06:19:42] abucha: has joined #ruby
[06:20:45] Ox0dea: "UNIX" is like some sort of reverse-shibboleth, like "VIM" and "Brainfuck"; miscasing them reveals you to be an outsider.
[06:21:33] cwong_on_irc: has joined #ruby
[06:22:13] tubuliferous: has joined #ruby
[06:22:21] Axsuul: has joined #ruby
[06:22:48] RegulationD: has joined #ruby
[06:23:04] Ox0dea: Yay, computers!
[06:23:11] Nick_ZWG: has joined #ruby
[06:23:36] x-light: has joined #ruby
[06:24:12] roshanavand: has joined #ruby
[06:25:16] abucha_: has joined #ruby
[06:27:44] araujo: has joined #ruby
[06:27:44] araujo: has joined #ruby
[06:28:27] aufi: has joined #ruby
[06:28:29] fantazo: has joined #ruby
[06:28:47] karapetyan: has joined #ruby
[06:30:11] EminenceHC: has joined #ruby
[06:30:14] timonv: has joined #ruby
[06:32:02] baweaver: has joined #ruby
[06:32:53] duckpupp1: has joined #ruby
[06:33:16] rrichardsr3: has joined #ruby
[06:33:45] solocshaw: has joined #ruby
[06:34:00] krzkrzkrz: has joined #ruby
[06:35:13] blackmesa: has joined #ruby
[06:35:29] startupality: has joined #ruby
[06:36:40] abucha: has joined #ruby
[06:38:19] djbkd: has joined #ruby
[06:41:45] Fredrich010: has joined #ruby
[06:41:48] tagrudev: has joined #ruby
[06:41:54] zenguy_pc: has joined #ruby
[06:46:35] krzkrzkrz: has joined #ruby
[06:46:51] last_staff: has joined #ruby
[06:47:02] zoskia: You enjoy your own company a little too much.
[06:48:14] hxegon: has joined #ruby
[06:51:45] fedexo: has joined #ruby
[06:52:38] klaas: has joined #ruby
[06:52:40] ruurd: has joined #ruby
[06:52:52] abucha_: has joined #ruby
[06:53:32] User458764: has joined #ruby
[06:54:59] Pupp3tm4st3r: has joined #ruby
[06:55:22] Pupp3tm4st3r: has joined #ruby
[06:55:49] krzkrzkrz: has joined #ruby
[06:56:54] roshanavand: has joined #ruby
[06:57:29] Xzanron: has joined #ruby
[06:57:55] axsuul_: has joined #ruby
[06:59:34] etcetcetc: has joined #ruby
[06:59:59] auzty: has joined #ruby
[07:02:05] lsmola: has joined #ruby
[07:02:14] dikaio: has joined #ruby
[07:02:56] yfeldblum: has joined #ruby
[07:09:19] mndoci: has joined #ruby
[07:09:42] CloCkWeRX1: has left #ruby: ()
[07:09:42] Dreamer3: has joined #ruby
[07:12:26] x-light: has joined #ruby
[07:14:48] astrobun_: has joined #ruby
[07:17:00] kies^: has joined #ruby
[07:18:08] bmalum: has joined #ruby
[07:19:54] jas02: has joined #ruby
[07:21:01] bigkevmcd: has joined #ruby
[07:22:24] ponga: has joined #ruby
[07:22:50] sanjayu: has joined #ruby
[07:25:32] ahmetkapikiran: has joined #ruby
[07:26:09] abucha: has joined #ruby
[07:27:49] arup_r: has joined #ruby
[07:28:20] passcod: has joined #ruby
[07:28:29] codecop: has joined #ruby
[07:29:00] ruurd: has joined #ruby
[07:29:08] firstdayonthejob: has joined #ruby
[07:32:32] bmalum: has joined #ruby
[07:32:44] baweaver: has joined #ruby
[07:33:14] moei: has joined #ruby
[07:33:22] Nick_ZWG: has joined #ruby
[07:33:39] duckpupp1: has joined #ruby
[07:36:04] blackmesa: has joined #ruby
[07:39:03] ta: has joined #ruby
[07:43:48] karapetyan: has joined #ruby
[07:44:10] vigintas: has joined #ruby
[07:44:26] kalusn: has joined #ruby
[07:44:30] abucha_: has joined #ruby
[07:45:36] bluOxigen: has left #ruby: ()
[07:50:28] symm-: has joined #ruby
[07:52:53] Coldblackice: has joined #ruby
[07:52:54] Pupp3tm4_: has joined #ruby
[07:55:21] x-light: has joined #ruby
[07:58:35] SCHAAP137: has joined #ruby
[07:58:36] charliesome: has joined #ruby
[07:58:45] sgambino: has joined #ruby
[08:01:07] Bloomer: has joined #ruby
[08:02:00] DoubleMalt: has joined #ruby
[08:02:13] krzkrzkrz: has joined #ruby
[08:02:49] charliesome: has joined #ruby
[08:04:49] Xeago: has joined #ruby
[08:04:57] djbkd: has joined #ruby
[08:06:33] yashinbasement: has joined #ruby
[08:06:52] relix: has joined #ruby
[08:08:27] teclator: has joined #ruby
[08:09:39] charliesome: has joined #ruby
[08:10:28] solars: has joined #ruby
[08:13:54] craysiii: has joined #ruby
[08:14:54] ahmetkapikiran: has joined #ruby
[08:18:41] Sheperson: has joined #ruby
[08:19:12] marr: has joined #ruby
[08:20:14] bruce_lee: has joined #ruby
[08:20:34] sudiptamondal: has joined #ruby
[08:21:23] rabbithole: has joined #ruby
[08:22:36] trosborn: has joined #ruby
[08:22:52] charliesome: has joined #ruby
[08:28:37] pwnd_nsfw: has joined #ruby
[08:29:15] scottstamp: has joined #ruby
[08:31:17] troulouliou_div2: has joined #ruby
[08:31:28] shredding: has joined #ruby
[08:32:02] Polysics: has joined #ruby
[08:32:59] voker57: has joined #ruby
[08:33:41] dionysus69: has joined #ruby
[08:33:56] araujo: has joined #ruby
[08:34:25] duckpupp1: has joined #ruby
[08:35:16] araujo: has joined #ruby
[08:36:46] blackmesa: has joined #ruby
[08:37:29] jgt1: has joined #ruby
[08:38:11] build22: has joined #ruby
[08:38:37] krzkrzkrz: has joined #ruby
[08:40:17] acke: has joined #ruby
[08:41:20] brendan-: has joined #ruby
[08:42:40] zenguy_pc: has joined #ruby
[08:43:47] roshanavand: has joined #ruby
[08:44:50] lipoqil: has joined #ruby
[08:45:03] skade: has joined #ruby
[08:46:02] Thaumiel|Work: has joined #ruby
[08:49:34] kalusn: has joined #ruby
[08:53:11] bahar: has joined #ruby
[08:53:21] pu22l3r_: has joined #ruby
[08:55:53] nkts_: has joined #ruby
[08:57:04] catsquotl: has joined #ruby
[08:57:14] subscope: has joined #ruby
[08:58:00] catsquotl: can someone help me with something i don't understand?
[08:58:14] catsquotl: I have a small class
[08:58:25] haraoka: has joined #ruby
[08:58:33] catsquotl: that i wrapped inside a module
[08:58:46] apeiros: ?gist catsquotl
[08:58:46] ruboto: catsquotl, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[08:58:50] catsquotl: I later removed the module code
[08:59:11] catsquotl: now the class wont instantiate due to a typeerror
[08:59:19] kimegede: has joined #ruby
[08:59:32] apeiros: ok. gist the relevant code and the full error.
[08:59:37] catsquotl: just a minute i'll put it in a gist
[09:00:02] yorickpeterse: https://github.com/ruby/ruby/commit/837babd56459aafc1232a12fbfa783025d619b98 lol
[09:00:11] apeiros: you can gist the code and error in separate files (same gist, though), so code has proper highlighting
[09:00:15] apeiros: moin yorickpeterse
[09:00:22] A124: has joined #ruby
[09:00:31] nfk|laptop: has joined #ruby
[09:00:43] skade: has joined #ruby
[09:00:45] apeiros: yorickpeterse, interesting change, do you know the rationale behind it?
[09:00:55] blubjr: hi yorickpeterse
[09:01:07] Axsuul: has joined #ruby
[09:02:30] teclator: has joined #ruby
[09:02:37] mikecmpbll: has joined #ruby
[09:02:58] Ox0dea: catsquotl: You didn't completely remove the module.
[09:03:21] Ox0dea: A module and a class aren't allowed to have the exact same name.
[09:03:34] catsquotl: https://gist.github.com/Catsquotl/c6262e4f6af74d3fa436
[09:03:35] devoldmx: has joined #ruby
[09:03:46] Ox0dea: >> Marshal.class # catsquotl
[09:03:47] ruboto: Ox0dea # => Module (https://eval.in/464163)
[09:04:18] catsquotl: this error comes after i removed all module related code
[09:04:27] Ox0dea: catsquotl: Marshal is part of Ruby core.
[09:04:37] catsquotl: does ruby hold on to modules it loaded before?
[09:04:44] Ox0dea: Am I muted?
[09:05:13] catsquotl: so it seems.. I just can't find how or why.
[09:05:18] joonty: has joined #ruby
[09:05:26] Ox0dea: catsquotl: Marshal is already a thing.
[09:05:49] DEA7TH: has joined #ruby
[09:05:54] catsquotl: so renaming it should fix it?
[09:06:05] Ox0dea: catsquotl: It worked before because you had your Marshal in its own namespace.
[09:06:18] SamGerber: has joined #ruby
[09:06:25] Ox0dea: YourModule::Marshal != ::Marshal
[09:07:17] catsquotl: duh... feeling stupid now..
[09:07:24] catsquotl: thanks so much
[09:07:30] Ox0dea: Happy to help.
[09:07:34] catsquotl: it had me baffled for days now
[09:07:52] chthon: has joined #ruby
[09:08:25] arne: has joined #ruby
[09:09:08] arne: hi, when having a hash containing a string containing a binary string, i cannot serialize it using json, any tips?
[09:10:47] arne: hm, json simply does not support binary data, bullocks.
[09:11:51] Stan: has joined #ruby
[09:12:21] Ox0dea: catsquotl: What's your nick about, if you don't mind my prying? Axolotl? Quetzalcoatl?
[09:12:49] catsquotl: Quetzalcoatl
[09:12:58] mndoci: has joined #ruby
[09:13:01] Ox0dea: Is it ironic that "bullock" refers to a bull with no bollocks?
[09:13:04] catsquotl: didn't know how to spell it many years ago
[09:13:10] Ox0dea: That's adorable.
[09:13:22] catsquotl: but it's been my nick ever since
[09:13:55] Ox0dea: arne: Well, your timing couldn't've been worse; we were just (inadvertently) discussing the Marshal module.
[09:13:57] danneu: arne: you could base64 it
[09:14:17] arne: Ox0dea, ;) hi again
[09:15:14] arne: yeah i know that i could encode it, but im lazy and i built a generalized interface to my database, i have no clue to tell the client "this is binary data in base64"
[09:15:15] catsquotl: well my Marshal(l) is a pathfinder character..
[09:15:19] Xeago: has joined #ruby
[09:15:37] arne: i was just assuming json would handle binary data
[09:15:47] Ox0dea: It's kinda dumb that it doesn't.
[09:15:59] arne: json was so cool when discovered it, but over time, there are soooo many flaw
[09:16:11] arne: like the missing date datatype
[09:16:17] Ox0dea: Put a little more YAML in your life.
[09:16:23] Ox0dea: (You'll thank you.)
[09:16:41] cacam9621: has joined #ruby
[09:16:57] danneu: you could use https://github.com/cognitect/transit-format :P
[09:17:00] arne: well, im trying my best at my first webapp, learning a lot during it. but already did everything in json
[09:17:27] arne: can you decode yaml in javascript ( i know that question is googleable, but you guys are always so nice )
[09:18:41] luriv: has joined #ruby
[09:19:02] subscope: has joined #ruby
[09:19:27] vigintas: has joined #ruby
[09:20:41] bruno-: has joined #ruby
[09:21:00] User458764: has joined #ruby
[09:21:00] mark2: has joined #ruby
[09:21:06] blackmesa: has joined #ruby
[09:22:09] arne: well im having a angular frontend with a ruby backend, how to i get my data to the frontend side :(, sure this is not a ruby question
[09:23:09] Axsuul: has joined #ruby
[09:23:20] danneu: i'd just use json
[09:23:23] senayar: has joined #ruby
[09:23:43] dANO-: has joined #ruby
[09:23:44] danneu: though i don't understand your limitation
[09:23:48] Peg-leg: has joined #ruby
[09:23:49] arne: well i do, but when having binary data ( which i loooooooooooooooooove to ), this sucks
[09:24:24] Sheperson: Does anyone know a good resource for teaching programming with Ruby?
[09:24:25] arne: and when having to encode it, how do i know that i have to encode it?
[09:24:27] apeiros: catsquotl: sorry, got interrupted at work. but I see somebody else already helped you :)
[09:24:43] Sheperson: A friend of mine asked me to help her learn how to program
[09:24:47] leafybas_: has joined #ruby
[09:24:48] catsquotl: Thats ok...
[09:24:58] Sheperson: and I am looking for a book (or anything) for her
[09:25:01] arne: http://tryruby.org/levels/1/challenges/0
[09:25:07] Sheperson: He knows nothing about programming
[09:25:15] catsquotl: learn to program by...
[09:25:29] arne: sheperson, http://tryruby.org/levels/1/challenges/0 <= this is great, got me into ruby
[09:26:20] apeiros: ?books sheperson
[09:26:20] ruboto: sheperson, You can find a list of recommended books at http://ruby-community.com/pages/links
[09:26:27] arne: danneu, i want to build an import mechanism, where a token acts as authorization, i got that one as random bytes in the database, how would you do it?
[09:26:35] Bloomer: has joined #ruby
[09:26:54] Ox0dea: arne: Restrict the bytes to seven bits?
[09:27:18] arne: Ox0dea, your ideas are always great! how can anyone hire you!?
[09:27:24] Ox0dea: You fully halve the keyspace, so maybe you shouldn't do that.
[09:27:30] TheHodge: has joined #ruby
[09:27:37] danneu: i'd just keep it encoded in some text format
[09:27:49] Ox0dea: arne: I try to keep my suggestions balanced between great and mind-numbingly terrible.
[09:27:52] arne: but that would mean bad performance?
[09:28:02] arne: why not?
[09:28:08] danneu: if you have millions and millions of rows, it will take up more space
[09:28:12] mooru: has joined #ruby
[09:28:33] arne: no actually even long strings would be fine :/ i just like the idea to have performance
[09:28:58] arne: danneu, so you would just save a random string, like a password?
[09:29:08] arne: well, like an unhashed password.
[09:29:22] sebstrax: has joined #ruby
[09:29:47] tkuchiki: has joined #ruby
[09:29:59] Ox0dea: arne: Why do you want an auth token to be binary...?
[09:30:11] danneu: yeah, for the same reason i would keep a UUID in text UUID format
[09:30:22] arne: i don't want it to be binary, i would encode it and decode it
[09:30:31] vigintas: has joined #ruby
[09:30:33] arne: just binary in database
[09:30:43] danneu: binary in db is just a space optimization
[09:30:59] cacam9621: has joined #ruby
[09:31:13] danneu: roundtripping through encodings client side is far worse
[09:31:38] arne: okay, i gonna store it as string
[09:32:02] Xzanron_: has joined #ruby
[09:32:02] danneu: what db are you using?
[09:32:07] Ox0dea: arne: A 40-character SHA1 is still 20 bytes encoded; the "savings" are scarcely worth it.
[09:32:52] arne: i would like to use mongodb, but my data is highyl relational
[09:33:06] rdark: has joined #ruby
[09:33:13] galeido: has joined #ruby
[09:33:42] Feyn: has joined #ruby
[09:33:48] danneu: i use the UUID column in postgres all the time for random numbers like tokens
[09:34:15] arne: yeah i wanted to stick to things i know, because i get paid a lot, lol.
[09:34:41] arne: otherwise i would've experimented.
[09:35:13] duckpupp1: has joined #ruby
[09:35:14] terlar: has joined #ruby
[09:35:25] baweaver: has joined #ruby
[09:36:20] danneu: it's for the best
[09:36:37] danneu: nobody ever used mongo and, 6 months later, went "man this was a great decision"
[09:36:53] avril14th: has joined #ruby
[09:36:56] Balllkenende: has joined #ruby
[09:36:56] arne: yeah i figured
[09:37:14] danneu: "sure glad i used mongo instead of postgres, nectar of the gods"
[09:37:16] arne: but for small things i did, it was a charm
[09:37:50] arne: if mongo was always as great, or usable for relational stuff
[09:37:57] arne: that would be cool *_*
[09:38:06] al2o3-cr: has joined #ruby
[09:39:06] avril14th: has joined #ruby
[09:39:11] arne: i remember having a slow query on mongodb, and i was like "hm, this should be a key" *adds key in runtime*, works. that was impressive, but i always imagined it wouldn't be that easy in big projects
[09:40:08] djbkd: has joined #ruby
[09:40:21] danneu: is that much different than `create index users (user_id)` in sql?
[09:41:20] arne: well, if i remember correctly the last time i did that, it ended up in a pile of slow queries. but again, that could've been because of the size
[09:41:58] danneu: as in the query planner got confused?
[09:42:26] arne: well, im not a database experts.. the querries were slow and piled up, i don't know more
[09:42:31] tkuchiki: has joined #ruby
[09:42:54] arne: also import and export of mongodb always been faster, even for high amount of data.
[09:43:57] colegatron: has joined #ruby
[09:45:12] user083: has joined #ruby
[09:47:17] danneu: yeah, mongo is definitely more beginner friendly
[09:47:25] shevy: catsquotl do you have anything to do with cats?
[09:48:48] yorickpeterse: apeiros: re rationale, no
[09:49:07] Ox0dea: shevy: https://github.com/ruby/ruby/commit/837ba
[09:49:11] Ox0dea: I think it's a much better.
[09:49:17] Ox0dea: And it feels like it's opened the door for `.=`.
[09:49:19] arne: danneu, irony?
[09:49:33] apeiros: yorickpeterse: I wonder whether they thought "foo&.bar is closer to the current foo && foo.bar pattern"
[09:49:45] Ox0dea: apeiros: Clearly?
[09:49:46] apeiros: other whether they detected a syntax issue
[09:49:55] arne: >danneu> yeah, mongo is definitely more beginner friendly
[09:50:24] catsquotl: @shecy uhm no
[09:50:26] danneu: what's the irony :p
[09:50:38] catsquotl: @shevy uhm no
[09:50:48] trosborn: has joined #ruby
[09:50:49] shevy: Ox0dea huh what happened there?
[09:50:51] yorickpeterse: apeiros: at this point I just think they're drunk
[09:51:06] Ox0dea: shevy: A discussion amongst the Japanese developers, it seems.
[09:51:43] shevy: so it is no longer "u.?profile.?thumbnails.?large" ?
[09:51:45] arne: danneu, im asking if you were serious about that
[09:52:00] Ox0dea: shevy: Nope; `u&.profile&.thumbnails&.large`.
[09:52:08] danneu: arne: yeah, i think it's uncontroversial to say that mongo has a better quickstart experience than a sql database
[09:52:39] apeiros: danneu: uh, no
[09:52:46] apeiros: danneu: best quickstart is sqlite :-p
[09:52:47] shevy: I can't help it...
[09:52:54] shevy: I think both variants are ugly :(
[09:53:04] Ox0dea: shevy: Thomas Enebo suggested \
[09:53:06] apeiros: and it probably has better safety guarantees than mongo too *trollol*
[09:53:24] Ox0dea: I think he was sent to the issue tracker by Satan.
[09:53:40] shevy: or the php devs
[09:53:45] shevy: they use \\ as namespace right?
[09:53:54] Ox0dea: Well, just one, yeah?
[09:53:58] Ox0dea: You don't have to escape it in IRC. :P
[09:54:19] shevy: hmm I thought it was two
[09:54:25] shevy: like :: in ruby
[09:55:20] apeiros: ACTION uses / in his toy language
[09:55:23] apeiros: maps nicely to filenames
[09:55:30] Ox0dea: But that was the PHP logic.
[09:55:41] apeiros: yeah, friggin windows devs :D
[09:56:09] apeiros: everbody knows that slash is the one true??? separator
[09:56:23] Ox0dea: apeiros, yorickpeterse: Halp? https://eval.in/464011
[09:56:24] tomphp: has joined #ruby
[09:56:35] User458764: has joined #ruby
[09:56:38] Ox0dea: Where's it coming from?!
[09:56:41] apeiros: Ox0dea: if this is one of your asciiless codes I'm going to eyebleach
[09:56:57] Ox0dea: > asciiless
[09:57:24] shevy: the only ever useful code written by Ox0dea is related to the unicode snowman!
[09:57:34] Ox0dea: Literally ever.
[09:57:35] apeiros: Ox0dea: blind guess - it's in C and not exposed
[09:57:53] Ox0dea: apeiros: I'm not sure I follow?
[09:58:14] yorickpeterse: Ox0dea: you're defining const_missing on Object, not an instance of Object
[09:58:24] apeiros: with regards to unicode emoji, this is all I've got to say: http://dilbert.com/strip/2015-11-06
[09:58:26] Ox0dea: yorickpeterse: Right, as intended.
[09:58:54] yorickpeterse: errr wait, that was supposed to be a class method yeah
[09:59:01] apeiros: yorickpeterse: it triggers correctly
[09:59:08] apeiros: i.e. it's the right place
[09:59:42] cwong_on_irc: has joined #ruby
[09:59:48] apeiros: Ox0dea: I mean that your super call causes the normal const lookup to resume and against expectations doesn't raise a nomethod error and instead triggers the normal const missing ex
[09:59:49] yorickpeterse: https://eval.in/464198 this works
[10:00:01] tomphp: has joined #ruby
[10:00:21] dhjondoh: has joined #ruby
[10:00:32] apeiros: Ox0dea: and I assume it's got to do with how that all is implemented in C at the root level.
[10:00:46] Ox0dea: ACTION waves hands too.
[10:00:46] apeiros: Ox0dea: and I assume your confusion is "why doesn't this raise a NoMethodError"?
[10:00:48] sepp2k: has joined #ruby
[10:01:01] apeiros: iirc method_missing behaves the same
[10:01:04] Xzanron: has joined #ruby
[10:01:04] apeiros: ACTION checks
[10:01:15] Ox0dea: Nope, #method_missing is implemented correctly. :<
[10:01:29] Ox0dea: https://bugs.ruby-lang.org/issues/11655
[10:01:57] Ox0dea: Constant resolution doesn't like to be poked this hard.
[10:02:01] apeiros: Ox0dea: nope, method_missing does the same
[10:02:28] apeiros: unless I misunderstand what you're confused about
[10:04:10] nfk|laptop: has joined #ruby
[10:04:11] apeiros: Ox0dea: https://eval.in/464204
[10:04:16] leafybas_: has joined #ruby
[10:04:29] apeiros: same behavior. there's no super, super in Object resumes normal behavior
[10:04:45] shevy: superman!
[10:04:55] apeiros: supermethodman!
[10:05:06] apeiros: wasn't there a singer who called himself methodman?
[10:05:16] shevy: yeah I think some rapper in the old days
[10:05:23] apeiros: ah right, wu-tang
[10:05:25] Ox0dea: apeiros: https://eval.in/464206
[10:05:37] Ox0dea: #const_missing and #method_missing do not exhibit the same behavior at all.
[10:05:46] d34th4ck3r: has joined #ruby
[10:05:48] Ox0dea: Object's #method_missing can be refined.
[10:06:25] Ox0dea: But that trace demonstrates that top-level #const_missing is absolutely the one on Object's singleton class.
[10:06:26] apeiros: Ox0dea: I'm not sure what your evalin should show. yes, constant resolution happens in class space, method resolution in instance space. obvious, no?
[10:06:45] Ox0dea: But then where is Object finding a supermethod for #const_missing?
[10:07:35] apeiros: same as method_missing - it resumes what would happen if you hadn't defined it at all.
[10:08:01] apeiros: and wrt method_missing - same behavior if you work with main instead of Object
[10:08:17] apeiros: (i.e. main.singleton_class, aka toplevel self.singleton_class)
[10:08:39] ebbflowgo: has joined #ruby
[10:08:52] Ox0dea: >> method(:method_missing).super_method # You're right.
[10:08:53] ruboto: Ox0dea # => nil (https://eval.in/464207)
[10:09:03] nfk|laptop: has joined #ruby
[10:09:41] leafybas_: has joined #ruby
[10:11:31] dravine: has joined #ruby
[10:11:42] charliesome: has joined #ruby
[10:11:43] rikkipitt: has joined #ruby
[10:13:15] stamina: has joined #ruby
[10:13:16] tkuchiki: has joined #ruby
[10:15:00] Ox0dea: It doesn't look like the C is doing anything particularly fancy.
[10:15:28] Ox0dea: It just sends #const_missing, and the default implementation on Object is to raise a NameError.
[10:15:42] Ox0dea: It's not creating any weird anonymous modules or anything.
[10:17:36] terlar: has joined #ruby
[10:17:44] platzhirsch: has joined #ruby
[10:19:40] [ddmp]: has joined #ruby
[10:20:47] charliesome: has joined #ruby
[10:21:06] terlar: has joined #ruby
[10:21:12] cacam9621: has joined #ruby
[10:21:25] bruno-: has joined #ruby
[10:21:35] Fredrich010: has joined #ruby
[10:22:43] tomphp: has joined #ruby
[10:22:45] bonemind: has joined #ruby
[10:22:58] charliesome: has joined #ruby
[10:24:21] RegulationD: has joined #ruby
[10:24:48] but3k4: has joined #ruby
[10:24:54] Thaumiel|Work: has joined #ruby
[10:25:13] Ox0dea: apeiros: I guess it's the "does what it would've done" aspect of your explanation that's not clicking for me; are we not actually redefining methods when we redefine them?
[10:28:04] bjmllr: has joined #ruby
[10:28:06] cbetta: has joined #ruby
[10:29:15] shinenelson: has joined #ruby
[10:29:34] colstrom: has joined #ruby
[10:29:47] apeiros: Ox0dea: try removing the method
[10:31:04] Ox0dea: apeiros: It removes just fine.
[10:31:05] apeiros: also fun: Object.method(:const_missing).owner # => Module
[10:31:13] apeiros: Ox0dea: how did you remove it?
[10:31:17] Ox0dea: apeiros: Object.singleton_class.send :undef_method, :const_missing
[10:31:40] terlar: has joined #ruby
[10:31:59] Ox0dea: And then referencing an uninitialized constant tries to invoke Object.const_missing and fails.
[10:32:02] apeiros: use remove_method. undef inserts a method which prevents calling iirc
[10:32:36] leafybas_: has joined #ruby
[10:32:41] ahmetkapikiran: has joined #ruby
[10:32:58] Ox0dea: It says it's not defined on Object or its singleton class.
[10:33:33] TheMoonMaster: has joined #ruby
[10:33:34] leafybas_: has joined #ruby
[10:33:42] it_tard: has joined #ruby
[10:33:44] Ox0dea: Because good reasons, surely.
[10:33:54] apeiros: curious, isn't it? :)
[10:34:08] Ox0dea: It's wrong... somehow.
[10:34:16] apeiros: but I think it answers the "are we not redefining?"
[10:34:20] qba73: has joined #ruby
[10:34:35] Ox0dea: Aye, and thus invalidates your "does what it would've done" explanation for that magic supermethod.
[10:34:48] apeiros: I'm not sure I concur on that :D
[10:35:13] Ox0dea: Have we not concluded that it is in fact Object's singleton class's #const_missing which is invoked if all else fails?
[10:35:35] apeiros: owner says it's not in Object. c source says same.
[10:35:46] apeiros: says it's Module. but removing that method says it doesn't exist
[10:35:53] apeiros: same for object
[10:35:55] duckpupp1: has joined #ruby
[10:36:12] apeiros: which IMO rather reinforces that it's low level trapping which is triggered upon a missing constant
[10:36:19] baweaver: has joined #ruby
[10:36:27] ldnunes: has joined #ruby
[10:36:28] apeiros: and that defining your own Object.const_missing calling super invokes the same low level trapping
[10:36:37] apeiros: but reading the C source I'm not sure how that actually happens
[10:36:47] apeiros: because so far it looks like an ordinary method on Module
[10:36:51] apeiros: (class method)
[10:37:21] lukaszes: has joined #ruby
[10:37:26] Ox0dea: Well, that call to rb_vm_pop_cfunc_frame() in rb_mod_const_missing() is surely of some pertinence.
[10:37:41] Ox0dea: That's where I lose the plot, though. :<
[10:37:50] apeiros: I fear I lack the time to do a proper analysis
[10:37:59] apeiros: but I'm interested in your findings when your done :D
[10:38:05] Ox0dea: I shall surely share them.
[10:38:24] Ox0dea: (I appreciate the subtle jab.)
[10:38:29] charliesome: has joined #ruby
[10:41:47] ramfjord: has joined #ruby
[10:42:36] zenguy_pc: has joined #ruby
[10:42:44] dtordable: is Ruby so complicated that has a dont-know-what-happens mode?
[10:44:03] yorickpeterse: uguugugh I hate Socket
[10:44:09] yorickpeterse: another 17 methods to implement and test
[10:44:14] yorickpeterse: this time for Socket::AncillaryData
[10:44:30] dtordable: that makes it more interesting to me..
[10:44:36] tomphp: has joined #ruby
[10:46:00] yorickpeterse: https://github.com/ruby/ruby/blob/832c74f428db6c5bd6e575e1f6ea7fe0891c84d2/test/socket/test_ancdata.rb of course this is all MRI has in terms of tests
[10:46:06] yorickpeterse: at least the rdoc is usefuk
[10:46:38] it_tard: has joined #ruby
[10:46:41] tulak: has joined #ruby
[10:47:15] Rollabunna: has joined #ruby
[10:50:26] dtordable: what is that rdpc?
[10:50:38] abucha: has joined #ruby
[10:50:44] yorickpeterse: I guess the nice part about implementing shit in rubysl is not having to write documentation ???(???)???
[10:50:58] yorickpeterse: because this code totally explains itself
[10:51:03] Bloomer: has joined #ruby
[10:51:06] bruno-_: has joined #ruby
[10:51:10] dtordable: rdoc i mean...
[10:52:29] giuseppesolinas: has joined #ruby
[10:53:10] Ox0dea: yorickpeterse: How come rubysl is a thing?
[10:53:20] yorickpeterse: because Rubinius needs a stdlib?
[10:53:30] yorickpeterse: one that doesn't involve all the piles of shit from MRI
[10:53:37] Ox0dea: Fair enough.
[10:53:45] yorickpeterse: e.g. simple example: bigdecimal uses a bunch of MRI internals we can't support
[10:53:50] yorickpeterse: so we actually can't upgrade to the latest version atm
[10:53:55] yorickpeterse: until we port all that crap
[10:54:02] yorickpeterse: which I started over a year ago but never got to completing
[10:54:18] yorickpeterse: https://github.com/rubinius/rubinius/issues/3089
[10:54:36] yorickpeterse: For a few Gems (e.g. openssl) we just copy MRI's stuff and make it work
[10:54:48] yorickpeterse: but for others we do things in Ruby
[10:54:53] yorickpeterse: e.g. our Socket stdlib is pure Ruby
[10:54:59] yorickpeterse: (with some FFI)
[10:55:21] yorickpeterse: it's a massive time spunge, but so is keeping up with all MRI internals
[10:56:26] Thaumiel|Work: has joined #ruby
[10:56:46] tkuchiki: has joined #ruby
[10:57:02] but3k4: has joined #ruby
[10:57:17] yorickpeterse: For Socket the problem is that its codebase is based on 1.8
[10:57:27] yorickpeterse: so basically everything added starting from 2009 is missing
[10:57:33] yorickpeterse: which is a lot
[10:57:47] tomphp: has joined #ruby
[10:57:53] yorickpeterse: and the people that worked on it didn't really keep things consistent, so I had to clean up a ton as well
[10:58:32] gregf_: o_O an HTTP server in 8 lines of code
[10:59:10] gregf_: i guess thats what its all about :( bind --> listen --> accept connections
[11:00:06] gregf_: yorickpeterse: sorry for being so vague :/. i was reading the docs for 'socket'
[11:01:19] gregf_: the RFC for the HTTP protocol are prolly some 50 pages *exaggerating*, but the implementation is only 8 lines :/
[11:02:35] aganov: has joined #ruby
[11:04:09] yorickpeterse: "+4,563 ???1,870 " lol dat diffstat
[11:04:14] yorickpeterse: and still more to come
[11:04:20] devoldmx: has joined #ruby
[11:05:00] karapetyan: has joined #ruby
[11:05:17] blackmesa: has joined #ruby
[11:05:43] weckl: has joined #ruby
[11:05:51] cacam9621: has joined #ruby
[11:08:00] blaxter: has joined #ruby
[11:10:45] leafybas_: has joined #ruby
[11:12:01] ibouvousaime: has joined #ruby
[11:12:08] aspiers: has joined #ruby
[11:12:44] ibouvousaime: has joined #ruby
[11:13:48] _blizzy_: has joined #ruby
[11:14:13] yorickpeterse: Hm, I do like how the Socket::AncillaryData docs are lying
[11:14:28] yorickpeterse: " Socket::SCM_RIGHTS, "SCM_RIGHTS", "RIGHTS", :SCM_RIGHTS, :RIGHTS for SOL_SOCKET"
[11:14:35] yorickpeterse: Socket::AncillaryData.new(:INET, :TCP, :TIMESTAMP, '') # => works fine
[11:14:51] yorickpeterse: which is also an SCM_ option
[11:14:54] ljarvis: Socket::Yorick
[11:15:07] yorickpeterse: Yet when you pass it :RIGHTS (= Socket::SCM_RIGHTS) it does barf
[11:15:26] yorickpeterse: well, time to read MRI C code I guess
[11:15:50] tomphp: has joined #ruby
[11:16:01] yorickpeterse: it's kinda worrying I have to read C code to see how a Ruby method has to behave
[11:20:09] abucha_: has joined #ruby
[11:20:29] rickmasta: has joined #ruby
[11:21:07] abucha_: has joined #ruby
[11:21:30] mndoci: has joined #ruby
[11:21:58] nettoweb: has joined #ruby
[11:22:43] prestorium: has joined #ruby
[11:23:53] bmalum: has joined #ruby
[11:24:19] Fredrich010: has joined #ruby
[11:25:04] Ox0dea: Hypothetically, is there any way to circumvent the interpreter's preference for constants over no-arg method calls?
[11:25:35] Billias: has joined #ruby
[11:26:04] User458764: has joined #ruby
[11:26:32] Ox0dea: To clarify, I'm trying to make `using Foo` use the method named Foo and not the module.
[11:26:38] yorickpeterse: Ox0dea: No, you can only do so by adding parenthesis
[11:27:02] yorickpeterse: Since the difference is determined on parser level
[11:27:07] Ox0dea: yorickpeterse: Right. There's also sticking one of the unary operators in to "catch" the call, but that's gross.
[11:27:37] Ox0dea: Well, to catch the reference and invoke the call.
[11:28:56] yorickpeterse: what on earth are you trying to do?
[11:29:05] Ox0dea: Module has #included, #extended, and #prepended, but not #used. :<
[11:29:23] bruno-: has joined #ruby
[11:29:29] yorickpeterse: what would #used do?
[11:29:39] Ox0dea: Be the hook for `using`?
[11:30:11] yorickpeterse: "what does this method do" "it's the hook for X" <- that doesn't describe behaviour
[11:30:39] Ox0dea: `include Foo` tries to invoke `Foo.included`...
[11:31:02] ljarvis: eyah that does kinda make sense
[11:31:07] Ox0dea: https://bugs.ruby-lang.org/issues/11525
[11:31:09] ljarvis: eyah! like a cowboy
[11:31:28] yorickpeterse: brrrr, refinements
[11:31:33] Ox0dea: #dealwithem
[11:31:39] yorickpeterse: but hey clearly MRI makes good design decisions
[11:31:57] yorickpeterse: or was it !. by now?
[11:32:10] yorickpeterse: hm, maybe it will be changed to .(??????????)?????? ????????? tomorrow
[11:32:25] ljarvis: yeh that .? is absolute bollocks
[11:32:30] Ox0dea: Ruby 3 is the new Perl 6.
[11:32:33] yorickpeterse: some_model.(??????????)?????? ?????????address.(??????????)?????? ?????????.street # just like Rails
[11:32:36] Ox0dea: ljarvis: No such thing.
[11:32:44] ljarvis: you knew what i mean pedant
[11:33:12] Ox0dea: (By which I mean it's gonna take forever to arrive and everybody'll've moved on. :<)
[11:33:20] ljarvis: i would not have
[11:33:24] yorickpeterse: It will be in Ruby 2.3
[11:33:36] Ox0dea: It *is* in 2.3.
[11:33:36] yorickpeterse: or maybe even 2.2.4
[11:33:40] Ox0dea: I was talking about 3.0.
[11:33:40] ljarvis: yeah, and 2.3 will be release christmas day 2021
[11:33:41] yorickpeterse: because fukit why not
[11:33:57] yorickpeterse: Christmas versioning really is annoying
[11:34:02] yorickpeterse: still no clue if shit's going to break or not
[11:34:02] ljarvis: but yeah seriously, why not a fucking method name
[11:34:30] yorickpeterse: I don't get why people just don't use a fucking if statement
[11:34:37] ljarvis: well that too
[11:34:40] yorickpeterse: or maybe stop writing Ruby like they're writing jQuery
[11:34:45] Ox0dea: Someone needs more Sandi Metz in their life.
[11:34:48] yorickpeterse: it's called Ruby on Rails, RUBY on Rails, not jQuery on Rails
[11:34:56] ljarvis: also try() is a code smell, why the hell that was ever added is beyond me
[11:35:13] ljarvis: try should function like try! ffs
[11:35:18] bluOxigen: has joined #ruby
[11:35:21] ljarvis: NUBS EVERYWHERE
[11:35:23] ljarvis: *signs off*
[11:35:26] bluOxigen: has left #ruby: ()
[11:35:36] yorickpeterse: Rails really is it's own language at this point
[11:35:49] ljarvis: hey, recruiters believe that already so why not
[11:35:55] yorickpeterse: You can hardly call it "just Ruby" since it adds so many things and forces people to work in such weird ways at times
[11:36:17] yorickpeterse: I eagerly away the day until we have BasicObject::Base
[11:36:19] ljarvis: to be fair we have an incredibly "Rubyish" rails app
[11:36:24] tomphp: has joined #ruby
[11:36:38] yorickpeterse: String::Base#create_new_string_from_ruby_string
[11:36:39] ljarvis: Base::Base
[11:36:43] duckpupp1: has joined #ruby
[11:36:44] ljarvis: Base::BasicBase
[11:36:50] ljarvis: ok I'm off, bye
[11:36:59] yorickpeterse: there should also be base eigenclasses
[11:37:22] gizmore: has joined #ruby
[11:39:04] yardenbar: has joined #ruby
[11:39:29] norc: has joined #ruby
[11:40:24] Ox0dea: >> 42.times.reduce([]){|_|_.singleton_class}.to_s[/\W+$/]
[11:40:25] ruboto: Ox0dea # => ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" (https://eval.in/464309)
[11:41:18] CoderPuppy: has joined #ruby
[11:41:33] joonty: has joined #ruby
[11:43:16] lukaszes: has joined #ruby
[11:43:19] adac: has joined #ruby
[11:43:52] subscope: has joined #ruby
[11:43:53] norc: Just to verify I didnt say nonsense.
[11:43:55] norc: >> NilClass.new
[11:43:56] ruboto: norc # => undefined method `new' for NilClass:Class (NoMethodError) ...check link for more (https://eval.in/464311)
[11:44:01] snebel: has joined #ruby
[11:44:06] yorickpeterse: nil is a singleton
[11:44:07] norc: Is this failing because NilClass is only a singleton class and thus cant be constructed?
[11:44:22] yorickpeterse: norc: technically it doesn't work because MRI just removes the "new" method
[11:44:33] yorickpeterse: `nil` basically refers to an already existing instance
[11:44:40] snebel: I'm trying to understand if is possible to call a class method from a class variable within a class
[11:44:42] snebel: https://gist.github.com/snebel29/4b224ed7b2b52a773d0a
[11:44:44] yorickpeterse: I guess you could consider it sort of like a global variable
[11:44:51] snebel: Not sure even if this really make sense..
[11:45:02] dzejrou: has joined #ruby
[11:45:13] yorickpeterse: snebel: you'd have to move the variable after the method definition
[11:45:18] yorickpeterse: since right now the method is called before it's defined
[11:45:28] tomphp: has joined #ruby
[11:46:24] norc: yorickpeterse: Let me see whether I can apply the gathered knowledge from my book to figure this one out. :)
[11:46:25] snebel: ah cool! just that?. I didn't realize
[11:46:59] snebel: cause i have the feeling for method when calling other method order doesn't matter
[11:47:02] snebel: but now not sure completely
[11:47:14] ghostbox: has joined #ruby
[11:47:33] Billias: has joined #ruby
[11:47:34] monthy: has joined #ruby
[11:48:19] norc: yorickpeterse: In YARV I see a putnil here, so this seems to be optimized away directly at compile time.
[11:49:26] yorickpeterse: snebel: it does when you call methods on class level
[11:49:30] syath: has joined #ruby
[11:49:39] krzkrzkrz: has joined #ruby
[11:49:56] norc: Damn this RubyVM::InstructionSequence is neat. :)
[11:50:03] Ox0dea: Ain't it just?
[11:50:03] yorickpeterse: MRI, Rubinius and JRuby all have special instructions for `nil` IIRC
[11:50:56] skade: has joined #ruby
[11:50:58] snebel: cool! really appreciated i always have good answers here even if my questions may be are not very interesting.. +1 for ruby community!
[11:51:07] Ox0dea: >> RubyVM::INSTRUCTION_NAMES.size # norc
[11:51:08] ruboto: Ox0dea # => 88 (https://eval.in/464312)
[11:51:22] Peteykun: has joined #ruby
[11:52:15] giuseppesolinas: has joined #ruby
[11:52:25] norc: Ox0dea: Just started on the topic today on the train.
[11:52:27] DEA7TH: has joined #ruby
[11:52:53] blackmesa: has joined #ruby
[11:53:50] Ox0dea: norc: `bitblt` and `answer` are the best instructions.
[11:54:01] Ox0dea: Also, I have no idea why `toregexp` is one.
[11:56:20] ahmetkapikiran: has joined #ruby
[11:56:30] charliesome_: has joined #ruby
[11:59:29] TDJACR: has joined #ruby
[12:00:34] pawnbox: has joined #ruby
[12:01:40] Xeago: has joined #ruby
[12:03:16] zoskia: ACTION mumbles "xps vs mbp" in his sleep.
[12:06:09] norc: Ox0dea: One bit at a time. Was the first time I heard about stack machines today. :)
[12:06:27] norc: Before I dive into weird "joke" (is this for real) vm instructions. :
[12:06:47] roshanavand: has joined #ruby
[12:07:10] northfurr: has joined #ruby
[12:08:04] Ox0dea: norc: Ah, my apologies; it's not often one accidentally stumbles onto that particular Ruby class. :P
[12:08:39] Ox0dea: They're real, but you have to compile Ruby with -DSUPPORT_JOKE, and you can't not get __goto__ support.
[12:08:42] norc: "Ruby Under a Microscope" led me under that stone. :)
[12:08:48] Ox0dea: Ah, yep, that'd do it.
[12:09:52] SCHAAP137: has joined #ruby
[12:10:08] donske: has joined #ruby
[12:13:42] karapetyan: has joined #ruby
[12:14:17] FDostoyevsky: has joined #ruby
[12:17:43] DexterLB: has joined #ruby
[12:17:43] charliesome: has joined #ruby
[12:19:00] karapetyan: has joined #ruby
[12:21:38] nfk|laptop: has joined #ruby
[12:24:50] mndoci: has joined #ruby
[12:26:42] leafybas_: has joined #ruby
[12:28:55] CloCkWeRX: has joined #ruby
[12:29:52] SCHAAP137: has joined #ruby
[12:30:31] karapetyan: has joined #ruby
[12:31:00] wprice: has joined #ruby
[12:31:12] voker57: has joined #ruby
[12:32:14] build22: has joined #ruby
[12:33:41] solocshaw: has joined #ruby
[12:36:43] charliesome: has joined #ruby
[12:37:25] moeabdol: has joined #ruby
[12:37:28] duckpupp1: has joined #ruby
[12:38:01] radgeRayden_: has joined #ruby
[12:38:38] weihan: has joined #ruby
[12:39:01] ahmetkapikiran: has joined #ruby
[12:41:13] tvw: has joined #ruby
[12:41:46] Xzanron: has joined #ruby
[12:42:57] solocshaw1: has joined #ruby
[12:43:32] zenguy_pc: has joined #ruby
[12:43:41] ramfjord: has joined #ruby
[12:45:42] Jardayn: has joined #ruby
[12:47:37] miskatonic: has joined #ruby
[12:48:41] Icey: has joined #ruby
[12:49:14] prestorium_: has joined #ruby
[12:50:42] jdawgaz: has joined #ruby
[12:50:53] Balllkenende: has joined #ruby
[12:50:58] bahar: has joined #ruby
[12:51:23] tknz: has joined #ruby
[12:51:36] gizmore: has joined #ruby
[12:52:05] sdothum: has joined #ruby
[12:54:14] sankaber: has joined #ruby
[12:54:24] bodik: has joined #ruby
[12:54:58] sankaber: has joined #ruby
[12:55:07] bodik: hi, can i somehow log some selfid or something through logger ? . when i try logger.debug(self) or self.inspect the thread hangs ;(
[12:57:19] norc: bodik: Can you provide some context?
[12:57:24] mdih: has joined #ruby
[12:57:56] kab: has joined #ruby
[12:57:57] norc: >> Logger.new(STDOUT).debug(self)
[12:57:58] ruboto: norc # => uninitialized constant Logger (NameError) ...check link for more (https://eval.in/464340)
[12:58:04] norc: >> require 'logger', Logger.new(STDOUT).debug(self)
[12:58:05] ruboto: norc # => uninitialized constant Logger (NameError) ...check link for more (https://eval.in/464341)
[12:58:07] kab: has left #ruby: ()
[12:58:10] norc: >> require 'logger'; Logger.new(STDOUT).debug(self)
[12:58:11] ruboto: norc # => D, [2015-11-06T12:58:10.748752 #25198] DEBUG -- : main ...check link for more (https://eval.in/464342)
[12:58:16] mdih: has joined #ruby
[12:58:30] lubarch: has joined #ruby
[13:00:10] VladGh: has joined #ruby
[13:00:17] _stu_: has joined #ruby
[13:01:57] Xeago: has joined #ruby
[13:03:22] bmalum: has joined #ruby
[13:03:39] Spami: has joined #ruby
[13:04:15] mattwildig: has joined #ruby
[13:04:59] apeiros: norc: seems to work? maybe your object's #inspect is bugged?
[13:05:06] synthroid: has joined #ruby
[13:05:53] norc: apeiros > bodik
[13:06:28] apeiros: ah, I see. 10min no answer to your follow up question. I guess bodik doesn't care too much for an answer then.
[13:07:08] tvw: has joined #ruby
[13:07:10] norc: Some channels have a response time of a few hours. :)
[13:07:15] s00pcan: has joined #ruby
[13:07:38] apeiros: norc: sure, but that's for the person who asks. not for those who help.
[13:08:01] apeiros: if somebody's not willing to check back in sensible intervals, then I can't be bothered to help them
[13:08:08] norc: True. I mean I am not hurt either way, each interaction helps me figure out bits and pieces about Ruby. :)
[13:08:46] nateberkopec: has joined #ruby
[13:09:00] kobain: has joined #ruby
[13:11:52] fgo: has joined #ruby
[13:12:33] karapetyan: has joined #ruby
[13:13:13] yqt: has joined #ruby
[13:13:40] VladGh: has joined #ruby
[13:13:44] Polysics: has joined #ruby
[13:17:13] rippa: has joined #ruby
[13:17:59] rikkipitt: has joined #ruby
[13:19:22] segfalt: has joined #ruby
[13:20:12] yorickpeterse: "1 file, 43 examples, 43 expectations, 0 failures, 0 errors" yay, that only took 4-something hours
[13:20:12] professor_soap: has joined #ruby
[13:20:20] yorickpeterse: now to clean up this giant case/else statement
[13:20:33] yorickpeterse: https://gist.github.com/YorickPeterse/aab6902a604ac34a519a lol Ruby
[13:21:44] rabbithole: has joined #ruby
[13:21:49] zapata_: has joined #ruby
[13:22:19] shevy: did you inherit that codebase?
[13:22:24] goodcodeguy: has joined #ruby
[13:22:43] shevy: norc are you really using ruby :)
[13:22:58] yorickpeterse: shevy: No, this is what I wrote
[13:23:10] yorickpeterse: it's a pretty much literal transaltion of MRI's C implementation
[13:23:15] yorickpeterse: without any proper cleanups yet
[13:23:21] troulouliou_div2: has joined #ruby
[13:23:42] norc: shevy: If I say no, will it stop your comments?
[13:23:46] roshanavand: has joined #ruby
[13:26:15] abucha: has joined #ruby
[13:26:16] dionysus69: has joined #ruby
[13:26:18] mostlybadfly: has joined #ruby
[13:26:19] RegulationD: has joined #ruby
[13:26:38] mndoci: has joined #ruby
[13:26:47] Balllkenende: has joined #ruby
[13:27:00] davedev24: has joined #ruby
[13:27:13] Jackneill: has joined #ruby
[13:33:42] jdawgaz: has joined #ruby
[13:34:12] AlexRussia: has joined #ruby
[13:34:33] ljarvis: yorickpeterse: what even is that
[13:34:38] Guest53: has joined #ruby
[13:34:50] ljarvis: ACTION passes yorickpeterse some methods
[13:35:05] shevy: norc I'll remain sceptical but curious :)
[13:35:20] k3asd`: has joined #ruby
[13:35:25] ljarvis: oh "now to clean up" you get a pass
[13:37:11] diegoaguilar: has joined #ruby
[13:37:47] build22: has joined #ruby
[13:38:13] Xeago: has joined #ruby
[13:38:14] duckpupp1: has joined #ruby
[13:38:40] joonty: has joined #ruby
[13:38:58] sdothum: has joined #ruby
[13:39:36] rzsd: has joined #ruby
[13:39:37] SamGerber: has joined #ruby
[13:39:48] diegoaguilar_: has joined #ruby
[13:40:42] rickmasta: has joined #ruby
[13:40:59] DoctorOsman: has joined #ruby
[13:41:08] DoctorOsman: GENERAL SERVER ?
[13:41:12] DoctorOsman: has left #ruby: ()
[13:43:55] Rodya_: has joined #ruby
[13:44:00] yalue: has joined #ruby
[13:44:15] yorickpeterse: ljarvis: welcome to Socket
[13:44:20] anisha: has joined #ruby
[13:44:43] atomical: has joined #ruby
[13:44:51] ljarvis: no tnx *walks to exit*
[13:45:00] yorickpeterse: https://gist.github.com/YorickPeterse/aab6902a604ac34a519a#file-ancillary_data-rb cleaned up version
[13:45:04] yorickpeterse: now to doc a bunch of things
[13:45:10] yorickpeterse: https://gist.github.com/YorickPeterse/aab6902a604ac34a519a#file-initialize_spec-rb check out the specs too :P
[13:45:30] yorickpeterse: https://github.com/ruby/ruby/blob/832c74f428db6c5bd6e575e1f6ea7fe0891c84d2/test/socket/test_ancdata.rb now compare that with MRI
[13:45:33] ljarvis: and by cleaned up you mean still a giant constructor. Can't you lazy load some of the ivars?
[13:46:14] yorickpeterse: lazy load? wtf
[13:46:29] Balllkenende: has joined #ruby
[13:46:29] luriv_: has joined #ruby
[13:46:34] yorickpeterse: Shit like this is sadly kinda required if you want to support stdlib
[13:46:37] dstarh: has joined #ruby
[13:46:56] yorickpeterse: https://github.com/rubysl/rubysl-socket/blob/yak-address-list/lib/socket/addrinfo.rb#L41-L127 even better
[13:47:17] ljarvis: im not sure why the suggestion was so baffling but does seem like you're having to jump through hoops so i'm not envious
[13:48:00] yorickpeterse: Once I have everything implemented I do intend to do a final cleanup
[13:48:10] yorickpeterse: Probably at that point there are quite a few bits that are re-used
[13:48:16] apeiros: "final". haha.
[13:48:19] yorickpeterse: right now I just dump all those in a Helpers module, but that one should be broken up
[13:48:32] yorickpeterse: apeiros: "final" as in "final before I ship it"
[13:48:44] apeiros: akak "final before I have my breakdown"? :D
[13:48:47] norc: shevy: But yes, I have written a fully working production library in Ruby so far.
[13:48:48] bmalum: has joined #ruby
[13:49:01] norc: shevy: Nothing major in the grand scheme of things, and developing Ruby applications is not my main occupation.
[13:49:05] ddv: size of the intialize is insane
[13:49:26] Macaveli: has joined #ruby
[13:49:29] norc: Most other things in Ruby Im doing are small in comparison.
[13:49:30] apeiros: norc: in the grand scheme of things nothing man made ever was nor ever will be major :(
[13:49:32] yorickpeterse: brace yourselves, the "methods should be no more than 5 lines" people are coming
[13:49:40] ljarvis: norc: don't feel any obligation to explain yourself
[13:49:44] ddv: well 10 or something
[13:50:01] apeiros: if you have more than a single line between your def/end, yer doin it wr??ng!
[13:50:19] yorickpeterse: Every method should just contain 1 method call to something else
[13:50:20] ddv: you can joke about it but it way too large
[13:50:22] yorickpeterse: then it's easy to read
[13:50:24] apeiros: I like decomposing stuff into functional units
[13:50:27] apeiros: but sometimes locality beats that
[13:50:36] yorickpeterse: ddv: there are a few things you're forgetting here
[13:50:40] yorickpeterse: 1) this isn't some dumb Rails app
[13:50:49] yorickpeterse: 2) this is low level stuff where I have to replicate MRI behaviour, which is super gnarly
[13:51:06] yorickpeterse: 3) delegating everything to extra methods can lead to negative performance impacts
[13:51:08] ddv: excuses
[13:51:17] yorickpeterse: But yes, there's work to be done
[13:51:30] apeiros: decomposing a 50 line method into 10 5 line methods which are each called once does not always increase readability.
[13:51:54] ruurd: has joined #ruby
[13:52:02] yorickpeterse: apeiros: shut up, I read this book that says otherwise
[13:52:13] apeiros: ACTION hands yorickpeterse a torch
[13:52:16] apeiros: print is dead
[13:52:28] ljarvis: did you just use a method overhead excuse
[13:52:43] JDiPierro: has joined #ruby
[13:52:53] apeiros: s/excuse//
[13:52:53] norc: yorickpeterse: http://rxr.whitequark.org/mri/source/compile.c#3166
[13:52:57] ljarvis: the struggle is real
[13:53:01] yorickpeterse: ljarvis: that was a joke reference to the 1 method call per method call
[13:53:10] yorickpeterse: But there's a hint of truth to it
[13:53:21] norc: yorickpeterse: Just as a taste where one of the core functions of the ruby implementation "slightly" exceeds that common 10 lines idiom.
[13:53:21] yorickpeterse: norc: nothing beats parse.y
[13:53:34] ljarvis: you gotta be doing some deep ass level of nesting to care in most scenarios
[13:53:44] ljarvis: deep ass is regretable part of that sentence
[13:53:45] apeiros: norc: I think C isn't considered wrt 5lines/method
[13:54:29] ljarvis: in b4 that big ass method in Ruby that I forgot the location of
[13:54:31] ljarvis: benchmark?
[13:54:45] ljarvis: it was like 500 lines or something
[13:54:57] ljarvis: optionparser has some of those
[13:55:08] norc: apeiros: Commonly C functions should be small too. The thing most of the time is either readability (so you dont have to scroll over a function to get an impression what it does), or general code style.
[13:55:30] ahmetkapikiran: has joined #ruby
[13:55:39] norc: The issue is just: Small functions dont lead to better code. But good code often consists of small functions.
[13:55:47] ljarvis: fat c functions dont offend me, i've seen too many pointer mistakes to care
[13:58:36] norc: So when rubocop complains about large methods, it can (!) be an indicator of bad code design. Simply shortening the functions does not necessarily address that.
[13:59:19] Pupeno: has joined #ruby
[13:59:19] Pupeno: has joined #ruby
[13:59:47] yorickpeterse: finally somebody who doesn't just go "SHORTER IS BETTER BECAUSE RUBOCOP SAYS SO"
[13:59:59] ljarvis: but my boss says so
[14:00:10] ruurd: has joined #ruby
[14:00:10] apeiros: norc: precisely
[14:00:15] ljarvis: haha just kidding i dont have a boss
[14:00:30] Xeago: has joined #ruby
[14:00:59] yorickpeterse: ljarvis: you do
[14:01:05] yorickpeterse: The European railroad schedules :>
[14:01:13] bougyman: I generally see a handful of # rubocop:disable Metrics/LineLength and three or fewer Metrics/MethodLength is a normal project.
[14:01:21] ljarvis: yorickpeterse: right in the feels :(
[14:01:45] bougyman: also I set my LineLength to 110
[14:01:52] jgt2: has joined #ruby
[14:02:05] bougyman: hey, 220 fits find in a side-by-side diff on my screen.
[14:02:07] bougyman: get a better monitor.
[14:02:20] ljarvis: mine is 120
[14:02:31] abucha: has joined #ruby
[14:02:45] ddv: we can't be all geniuses like me
[14:03:27] ytti: resolutions keep getting better
[14:03:32] ytti: and my eye sight keeps getting worse
[14:04:06] yorickpeterse: The whole resolution argument is bollocks but let's not go there
[14:04:23] ljarvis: lets go there
[14:04:34] ljarvis: get a 5k imac and be done with it
[14:04:41] Guest53: has joined #ruby
[14:04:54] skade: has joined #ruby
[14:04:59] TheNet: has joined #ruby
[14:05:03] magic__: has joined #ruby
[14:05:39] duckpupp1: has joined #ruby
[14:05:51] gusTester: has joined #ruby
[14:06:02] araujo_: has joined #ruby
[14:06:10] InternetFriend: has joined #ruby
[14:06:21] dtordable: ??resolution are getting strange
[14:06:46] SamGerber: has joined #ruby
[14:07:05] subscope: has joined #ruby
[14:07:14] yorickpeterse: yay I get to check off one more method of my TODO
[14:07:28] araujo_: has joined #ruby
[14:07:51] kimegede: has joined #ruby
[14:08:14] dtordable: screens are getting comfortable nowadays
[14:08:19] Guest53: has joined #ruby
[14:08:38] big|bad|wolf: has joined #ruby
[14:09:26] norc: I still prefer a pillow at night though.
[14:09:47] treehug88: has joined #ruby
[14:09:56] norc: But I'm oldschool when it comes to things like that so...
[14:10:05] sankaber: has joined #ruby
[14:10:41] ElFerna: has joined #ruby
[14:12:03] rickmasta: has joined #ruby
[14:12:11] abucha_: has joined #ruby
[14:13:07] shredding: has joined #ruby
[14:14:23] yorickpeterse: https://github.com/ruby/ruby/blob/d2e48a3f01d9ce2fa6fd860ad5bd2fee28e29e66/ext/socket/ancdata.c#L953-L1076
[14:14:39] yorickpeterse: Yeah I'm not going to replicate that
[14:14:41] yorickpeterse: fukit it's just #inspect
[14:14:59] jdawgaz: has joined #ruby
[14:15:10] umgrosscol: has joined #ruby
[14:15:57] spew: has joined #ruby
[14:17:00] maikowblue: has joined #ruby
[14:17:32] shevy: well it's not just about resolution but also about how much information your brain can process. since I have a bad brain, I happily accepted 80 chars per lines :)
[14:18:15] ruurd: has joined #ruby
[14:18:17] sankaber: has joined #ruby
[14:18:48] yorickpeterse: no but everybody has HiDPI these days
[14:18:55] yorickpeterse: so it's totally OK to dump 200 characters on a line
[14:18:59] yorickpeterse: just like you do when writing in a book
[14:19:03] nertzy: has joined #ruby
[14:19:03] yorickpeterse: everybody has big books these days
[14:19:20] yorickpeterse: I personally prefer 4 meter wide books, it's really pleasant to write everything on a single line
[14:19:39] norc: shevy: Just do some Java coding in between your gems. After a week, you will even ignore the width of your monitor if you follow some peoples conventions..
[14:19:47] skweek: has joined #ruby
[14:20:56] cdg: has joined #ruby
[14:21:02] shevy: I can't do java... it's way too verbose
[14:21:04] babblebre: has joined #ruby
[14:21:16] klingeldraht: has joined #ruby
[14:21:21] to_json: has joined #ruby
[14:21:21] to_json: has joined #ruby
[14:21:22] ruurd: has joined #ruby
[14:21:39] Xeago: has joined #ruby
[14:22:16] rbennacer: has joined #ruby
[14:22:51] gusTester: has left #ruby: ()
[14:24:30] ddv: You need to tilt your monitor to work with Java
[14:24:41] mattwildig: has joined #ruby
[14:24:58] ddv: Because of its verboseness
[14:27:34] ibouvousaime: has joined #ruby
[14:27:57] ruurd: has joined #ruby
[14:27:58] jamesaxl: has joined #ruby
[14:28:46] roshanavand: has joined #ruby
[14:29:09] User458764: Hi, I want to do basic cryptography my goal is have an url with a cryptographic code that I can decrypt with key and give me the correct address mail I am looking for. It is a mailing list unsubscribe system
[14:29:16] User458764: How do I do that?
[14:30:09] kfpratt: has joined #ruby
[14:30:18] tlaxkit: has joined #ruby
[14:30:57] jamesaxl: has joined #ruby
[14:31:39] ddv: User458764: this won't end well
[14:31:45] saddad: has joined #ruby
[14:32:44] User458764: ddv ok so what is the solution? I have an url like unsubscribe.mydomain.com/<code> and would like to retrieve the mail?
[14:34:42] jamesaxl|2: has joined #ruby
[14:34:46] ruurd: has joined #ruby
[14:36:35] agentmeerkat: has joined #ruby
[14:36:42] whippythellama: has joined #ruby
[14:36:53] idefine: has joined #ruby
[14:37:10] bigmac: has joined #ruby
[14:37:32] freerobby: has joined #ruby
[14:38:18] bigmac: i have 2 arrays, how do i find the difference between the 2...
[14:38:27] bigmac: a.size=262144
[14:38:30] bigmac: b.size=262145
[14:39:09] idefine_: has joined #ruby
[14:39:14] bigmac: there i tried a-b but it shows nothing
[14:39:40] bigmac: oh, it worked lol
[14:39:53] Hanmac: has joined #ruby
[14:39:58] malconis: has joined #ruby
[14:40:22] abucha: has joined #ruby
[14:40:24] ddv: bigmac would be nice
[14:40:31] ddv: still stuck at work tho
[14:40:42] bigmac: wish it was served all day
[14:40:45] Cyberheb: has joined #ruby
[14:41:04] Cyberheb: has left #ruby: ()
[14:41:41] bigmac: is there a way i can make irb, silent
[14:41:51] bmalum: has joined #ruby
[14:41:52] bigmac: a.each{|x| }
[14:42:01] bigmac: this block will output the contents of a,
[14:42:04] RegulationD: has joined #ruby
[14:42:05] bigmac: a.each{|x| }; sleep 1
[14:42:10] bigmac: this will now be silent
[14:42:15] nfk|laptop: has joined #ruby
[14:42:15] idefine: has joined #ruby
[14:42:21] cgfbee: has joined #ruby
[14:42:33] kp666: has joined #ruby
[14:42:54] cfloare: has joined #ruby
[14:43:17] zenguy_pc: has joined #ruby
[14:43:31] timmow: has joined #ruby
[14:43:32] yorickpeterse: "TypeError: size differ. expected as sizeof(int)=4 but 3"
[14:43:34] yorickpeterse: lol what an error
[14:43:47] norc: bigmac: You can either set IRB.conf[:PROMPT][:DEFAULT][:RETURN] = ""
[14:44:12] norc: bigmac: Or if you just want it once, append something like "and nil" to your statement.
[14:44:45] yardenbar: has joined #ruby
[14:44:53] ruurd: has joined #ruby
[14:45:32] roshanavand: has joined #ruby
[14:46:09] tomaz_b: has joined #ruby
[14:46:11] roshanavand: has joined #ruby
[14:46:52] TomPeed: has joined #ruby
[14:47:13] bdnelson: has joined #ruby
[14:47:13] tomaz_b: hi guys... i need some newbie help. how could i know which gem would allow me to require this as -> require 'xsd/mapping'
[14:47:32] timmow: has joined #ruby
[14:47:36] tomaz_b: i need some functionality from it... but i am not really sure which one is it
[14:47:36] krzkrzkrz: has joined #ruby
[14:47:58] apeiros: tomaz_b: if the author is sane, either xsd, or xsd-mapping
[14:48:22] timmow: has joined #ruby
[14:48:37] idefine_: has joined #ruby
[14:49:43] blackmesa: has joined #ruby
[14:50:24] Xeago: has joined #ruby
[14:51:06] _blizzy_: has joined #ruby
[14:51:46] karapetyan: has joined #ruby
[14:52:24] tomaz_b: apeiros: thanks
[14:52:57] apeiros: (if it's neither, that consequently means the author is not sane and should be hit with the bug-stick)
[14:53:13] dharmdip_: has joined #ruby
[14:53:42] psye: has joined #ruby
[14:54:01] freerobby: has joined #ruby
[14:54:06] tomaz_b: i am affraid it is this last option
[14:54:25] Kero: has joined #ruby
[14:54:56] psye: has joined #ruby
[14:55:21] ruurd: has joined #ruby
[14:55:47] apeiros: tomaz_b: I'd use google then. site:rdoc.info Xsd::Mapping
[14:56:07] decoponio: has joined #ruby
[14:56:12] musou: has joined #ruby
[14:56:32] apeiros: tomaz_b: or does that require succeed in any of your projects?
[14:56:53] ljarvis: doesn't sound very useful if it's just a stick
[14:56:57] shum: has joined #ruby
[14:57:11] apeiros: ljarvis: it's painful enough if you stab the person in the eye with it
[14:57:20] ljarvis: ah yes that'll do it
[14:57:37] lavros: has joined #ruby
[14:57:59] mark2: has left #ruby: ("PART #RubyOnRails :PART #jquery :PART #reactjs :PART ##javascript :PART #elixir-lang :PART #debian :PART #zsh :PART #nethunter :PONG :sendak.freenode.net")
[14:58:01] tomaz_b: i am following this -> if anyone can see anything. http://stackoverflow.com/questions/543709/generate-ruby-classes-from-xsd
[14:58:15] tomaz_b: i have a working xsd2ruby.rb
[14:58:17] skweek: has joined #ruby
[14:58:32] tomaz_b: but this last answer... somehow i can't figure it out ... how to get this
[14:58:35] apeiros: tomaz_b: oy, it looks like it's actually from stdlib
[14:58:43] apeiros: maybe older ruby
[14:58:59] axl_: has joined #ruby
[14:59:06] blue_deref: has joined #ruby
[14:59:27] tomaz_b: this is what i get from irb LoadError: cannot load such file -- xsb/mapping
[14:59:44] idefine: has joined #ruby
[14:59:47] tomaz_b: sorry mistake
[14:59:52] polishdub: has joined #ruby
[14:59:52] tomaz_b: but the same error
[14:59:56] okdas: has joined #ruby
[14:59:56] okdas: has joined #ruby
[15:00:00] apeiros: yes, it's no longer in stdlib
[15:00:06] apeiros: it was in 1.8.7 (long dead)
[15:00:30] tomaz_b: i've installed soap4r-ng...
[15:00:38] tomaz_b: to get this cmd tool
[15:01:01] apeiros: does not look like this has ever been released as a gem
[15:01:04] apeiros: it just died
[15:01:10] The_Phoenix: has joined #ruby
[15:01:39] tomaz_b: which works quite ok... but the problem is... if i start creating objects from those XSD classes... i somehow can't find a way to write them to a actual xml file... in a way that i would get TAG names correct
[15:02:32] shevy: ddv> bigmac would be nice
[15:02:37] shevy: ddv you are always so hungry!!!
[15:02:37] aadam21: has joined #ruby
[15:02:44] ddv: perhaps
[15:02:46] Thaumiel|Work: has joined #ruby
[15:03:05] shevy: don't worry, if the bigmac won't suit you, we also got some noodle and mozzarella here
[15:03:14] shevy: it's a cuisine channel after all
[15:03:34] rgb-one: has joined #ruby
[15:03:35] idefine: has joined #ruby
[15:05:29] ruby-lang109: has joined #ruby
[15:05:34] ddv: pizzaops
[15:07:12] ruurd: has joined #ruby
[15:07:52] thezanke: has joined #ruby
[15:09:34] thezanke: Has anyone used HTTParty for consuming an api? Is there a better option?
[15:10:06] The_Phoenix: has joined #ruby
[15:10:10] yorickpeterse: https://github.com/ruby/ruby/blob/d2e48a3f01d9ce2fa6fd860ad5bd2fee28e29e66/ext/socket/ancdata.c#L218-L219 lol
[15:10:18] yorickpeterse: lets just inject ivars from the outside
[15:10:21] rbennacer: has joined #ruby
[15:10:34] ruurd: has joined #ruby
[15:10:49] Croves: has joined #ruby
[15:11:07] havenwood: thezanke: Maybe give HTTP.rb a look: https://github.com/httprb/http#readme
[15:12:58] lavros_: has joined #ruby
[15:15:14] momomomomo: has joined #ruby
[15:15:38] ekinmur: has joined #ruby
[15:16:15] blueOxigen: has joined #ruby
[15:16:26] TheNet: has joined #ruby
[15:16:29] blueOxigen: has left #ruby: ()
[15:16:43] cfloare: has joined #ruby
[15:18:23] cgfbee: has joined #ruby
[15:18:28] kalusn: has joined #ruby
[15:18:31] roshanavand: has joined #ruby
[15:19:02] big|bad|wolf: has joined #ruby
[15:19:26] dmitch: has joined #ruby
[15:20:17] gard_: has joined #ruby
[15:20:52] idefine: has joined #ruby
[15:21:28] Peteykun: has joined #ruby
[15:21:48] to_json: has joined #ruby
[15:21:48] to_json: has joined #ruby
[15:21:56] bluOxigen: has joined #ruby
[15:22:58] davedev24: has joined #ruby
[15:22:58] User458764: has joined #ruby
[15:23:40] Fire-Dragon-DoL: has joined #ruby
[15:24:07] NeverDie: has joined #ruby
[15:24:28] solars: has joined #ruby
[15:25:06] pandaant: has joined #ruby
[15:26:20] bruno-: has joined #ruby
[15:27:28] idefine: has joined #ruby
[15:28:42] rabbithole: has joined #ruby
[15:30:22] bluOxigen: has joined #ruby
[15:33:47] sinkensabe: has joined #ruby
[15:35:13] dnomyar: has joined #ruby
[15:36:14] teclator: has joined #ruby
[15:39:02] leafybas_: has joined #ruby
[15:40:53] jeffreylevesque: has joined #ruby
[15:41:23] mordocai: has joined #ruby
[15:43:11] Zarthus: has joined #ruby
[15:43:53] TheNet: has joined #ruby
[15:44:11] hbx: has joined #ruby
[15:46:11] ramfjord: has joined #ruby
[15:46:55] gusTester: has joined #ruby
[15:47:11] sung: has joined #ruby
[15:47:34] infamos: has joined #ruby
[15:48:35] sung: hola. i've a variable that has a long string in it with lots of funky characters. i want to encode/escape them so that i can use it in a printed SQL statement for a mysql database (not located on the machine where the script is running). the different libraries i've found for mysql that have an escape function seemingly require connectivity to a mysql database to perform the escape. any ideas on how i can do this without also installing mysql on my dev machine?
[15:48:42] Xeago: has joined #ruby
[15:48:49] gusTester: has left #ruby: ()
[15:49:06] blackmesa: has joined #ruby
[15:49:27] dmitch: has joined #ruby
[15:49:42] RegulationD: has joined #ruby
[15:52:00] rodfersou: has joined #ruby
[15:53:20] build22: has joined #ruby
[15:53:24] yorickpeterse: >> p "\x9A\x02\x00\x00\x7F\x00\x00\x01\x7F\x00\x00\x01".unpack('Ic*')
[15:53:25] ruboto: yorickpeterse # => [666, 127, 0, 0, 1, 127, 0, 0, 1] ...check link for more (https://eval.in/464425)
[15:54:43] _stu_: has joined #ruby
[15:54:56] The_Phoenix: has joined #ruby
[15:56:18] yorickpeterse: fukit, I'll assume this works everywhere
[15:56:26] yorickpeterse: yay unpacking structures
[15:56:42] gusTester: has joined #ruby
[15:57:00] baweaver: has joined #ruby
[15:57:13] i: has joined #ruby
[15:57:39] gusTester: has joined #ruby
[15:59:06] Rodya_: has joined #ruby
[16:00:16] slawrence00: has joined #ruby
[16:01:08] Melpaws: has joined #ruby
[16:01:09] mary5030: has joined #ruby
[16:02:08] ESpiney: has joined #ruby
[16:02:36] davedev24: has joined #ruby
[16:02:47] ruurd: has joined #ruby
[16:02:53] mary5030: has joined #ruby
[16:03:51] davedev24: has joined #ruby
[16:03:53] jhass: sung: run the script on something with connectivity to the mysql server?
[16:04:31] jhass: sung: the proper solution to this doesn't use escaping at all, it sends the query with a placeholder and the data separately to the db
[16:05:18] sung: jhass: agreed, but that's assuming i have access to od anything else besisdes say "hey, take newupdates.sql and run this" (which i don't)
[16:05:29] sung: jhass: so i was hoping to generate all the necessary sql somewhere else
[16:05:53] jhass: can't you do hey, take newupdates.json and run ruby import.rb newupdates.json ?
[16:07:48] jhass: but I mean you want to test this stuff, so you'll need a local mysql server anyway
[16:08:29] jhass: it's not like this is any harder than package_manager install mysql/mariadb
[16:08:36] arup_r: has joined #ruby
[16:08:37] radgeRayden: has joined #ruby
[16:09:24] nibbo: has joined #ruby
[16:09:29] centrx: has joined #ruby
[16:09:56] fedexo: has joined #ruby
[16:10:53] victortyau: has joined #ruby
[16:10:58] kies^: has joined #ruby
[16:11:06] malconis_: has joined #ruby
[16:11:16] Quandl: has joined #ruby
[16:11:47] malconis_: has joined #ruby
[16:13:02] finisherr: has joined #ruby
[16:13:50] Nick_ZWG: has joined #ruby
[16:14:03] momomomomo: has joined #ruby
[16:14:05] tsunamie: can someone help me?
[16:14:06] tsunamie: https://gist.github.com/anonymous/b572ee419560defb059c
[16:14:20] dhollinger: has joined #ruby
[16:14:41] havenwood: tsunamie: OS/distro?
[16:14:53] tsunamie: havenwood, cygwin
[16:15:17] tsunamie: I am setting up my local env for development and I prefer linux enviroments
[16:15:21] tsunamie: even thow I am on windows
[16:15:24] havenwood: tsunamie: Usually one would install the ca-certificates packages. I'm not sure how that works for cygwin.
[16:15:41] tsunamie: havenwood, how would you install that package for you?
[16:15:45] TheNet: has joined #ruby
[16:15:51] tsunamie: yum, aptget or simply a download drop in
[16:16:05] leafybas_: has joined #ruby
[16:16:06] havenwood: tsunamie: apt-get/yum/brew/etc install ca-certificates
[16:16:22] tsunamie: havenwood, I see
[16:16:31] tsunamie: havenwood, https://gist.github.com/luislavena/f064211759ee0f806c88
[16:16:41] tsunamie: looks like my version should work it's the latest version of gem
[16:16:46] tsunamie: or is that refering to ruby version
[16:16:52] synthroid: has joined #ruby
[16:17:15] havenwood: tsunamie: The latest version of RubyGems is actually now 2.5.0 with a recent release.
[16:17:35] Bloomer: has joined #ruby
[16:17:56] tsunamie: if I install that will I need to talso update ruby?
[16:18:35] leafybas_: has joined #ruby
[16:18:45] havenwood: tsunamie: I ran into someone else with a similar issue and made a little Ruby script to add a trust certificate. Unfortunately I forgot I'm grabbing it from an https location so it doesn't quite work: https://gist.github.com/havenwood/9cd08a0b66b75d726ef6
[16:18:52] timonv: has joined #ruby
[16:19:17] havenwood: tsunamie: But that might give you some insight into how you can solve it manually. Or yeah, Lavena's gist!
[16:19:45] bmalum_: has joined #ruby
[16:19:51] havenwood: tsunamie: If you change that URL ^ to a non-https one I think it actually would work.
[16:21:01] havenwood: tsunamie: I wouldn't be surprised if there was a ca-certificates package for cygwin, but yeah I'm unfamiliar.
[16:21:52] lubarch: has joined #ruby
[16:22:37] lubarch: has joined #ruby
[16:22:47] ELCALOR: has joined #ruby
[16:23:26] victortyau: has joined #ruby
[16:23:49] leafybas_: has joined #ruby
[16:24:02] blueOxigen: has joined #ruby
[16:24:07] tsunamie: havenwood, says ssl_certs does'nt exist
[16:24:22] tsunamie: in /usr/share/rubygems/rubygems ssl_certs does'nt exist
[16:24:27] umgrosscol: has joined #ruby
[16:24:52] TheNet: has joined #ruby
[16:26:06] tsunamie: havenwood, manaylly created and just droped the file in there
[16:26:13] tsunamie: running gem install now and seeing it this works
[16:27:14] havenwood: tsunamie: Yay! Yeah, I never tested the script but would be nice to get one working for the folk who run into this.
[16:27:42] radgeRayden: has joined #ruby
[16:28:23] Trieste: has joined #ruby
[16:28:48] atomical_: has joined #ruby
[16:28:56] tsunamie: havenwood, this is the new error https://gist.github.com/anonymous/e66ddf591ee31fd86b02
[16:29:09] cajone: has left #ruby: ()
[16:29:14] havenwood: tsunamie: Oops
[16:29:35] tsunamie: permissions seem fine
[16:29:39] havenwood: tsunamie: Sems to be balking at verifying the fastly CDN cert now.
[16:29:43] tsunamie: havenwood, don't know what is wrong
[16:29:53] cajone: has joined #ruby
[16:31:01] baroquebobcat: has joined #ruby
[16:31:45] arthurix: has joined #ruby
[16:32:13] hhatch: has joined #ruby
[16:32:14] havenwood: tsunamie: If you're going through a proxy you might need to put the proxy's root CA cert in the ssl_cert dir as well.
[16:32:36] rgb-one: has joined #ruby
[16:32:38] tsunamie: havenwood, gem sources -a http://rubygems.org
[16:32:46] tsunamie: I am hoping this will work
[16:32:47] havenwood: tsunamie: Ooh, nope
[16:32:56] havenwood: tsunamie: https://rubygems.org
[16:33:00] havenwood: tsunamie: https!
[16:33:17] tsunamie: havenwood, why?
[16:33:21] fgo: has joined #ruby
[16:33:23] tsunamie: I purpously removed it
[16:33:27] havenwood: tsunamie: Don't do that!
[16:33:33] tsunamie: havenwood, why?
[16:33:35] tsunamie: its not working
[16:33:41] mattwildig: has joined #ruby
[16:34:33] apeiros: has joined #ruby
[16:35:08] rgb-one: has left #ruby: ()
[16:35:22] bb010g: has joined #ruby
[16:35:24] The_Phoenix: has joined #ruby
[16:36:40] willardg: has joined #ruby
[16:36:42] havenwood: tsunamie: The same reason one doesn't disable SSL across the board. I don't like to start taking those gambles. We have little enough security as is that I don't want to disable the little shreds we do have.
[16:36:47] k3asd`: has joined #ruby
[16:37:06] mistermocha: has joined #ruby
[16:37:21] tsunamie: havenwood, just me downloading gems right
[16:37:39] mistermocha: has joined #ruby
[16:37:49] Xeago: has joined #ruby
[16:37:57] havenwood: tsunamie: I cringe when folk disable SSL but *maybe* in practice you wont get MITMed. :P
[16:38:15] momomomomo: has joined #ruby
[16:38:16] havenwood: Speaking of RubyGems security, who wants to finish the TUF implementation?!
[16:38:21] tsunamie: one everything else like git and so on I still have it
[16:38:23] tsunamie: so I am cool there
[16:38:27] retornam: has joined #ruby
[16:38:29] minimalism: has joined #ruby
[16:38:32] senayar: has joined #ruby
[16:38:38] jxs_: has joined #ruby
[16:39:02] havenwood: https://github.com/rubygems/rubygems/pull/719
[16:39:30] roshanavand: has joined #ruby
[16:40:03] EminenceHC: has joined #ruby
[16:40:10] AnoHito: has joined #ruby
[16:40:13] tsunamie: havenwood, wtf?
[16:40:15] solars: has joined #ruby
[16:40:40] symm-: has joined #ruby
[16:40:46] Pupeno: has joined #ruby
[16:41:49] havenwood: tsunamie: Since you're familiar with GNU/Linux and that's a smoother path you might should consider Vagrant or Docker or some sort of VM.
[16:42:08] tsunamie: havenwood, DOCKER! FTW
[16:42:08] hxegon: has joined #ruby
[16:42:25] havenwood: tsunamie: I'd expect you'll run into a fair number of funky issues with Cygwin.
[16:42:36] solenoids: has joined #ruby
[16:42:37] havenwood: tsunamie: A quick Vagrant box might save you a lot of hassle.
[16:42:37] tsunamie: havenwood, however I can download gems now :) OVER HTRTP muhahaha let it burn inside you
[16:42:40] jackjackdripper: has joined #ruby
[16:42:48] tsunamie: burn I say burn
[16:43:00] tsunamie: :) I needed some release sorry I don't know what came over me
[16:43:05] Guest53: has joined #ruby
[16:43:16] havenwood: Freyja's Day!
[16:43:20] atomical: has joined #ruby
[16:43:27] blueOxigen: has left #ruby: ()
[16:43:34] ahmetkapikiran: has joined #ruby
[16:43:42] havenwood: ACTION rides off on a sky chariot pulled by cats
[16:43:47] zenguy_pc: has joined #ruby
[16:43:56] bruce_lee: has joined #ruby
[16:44:42] gusTester: has left #ruby: ()
[16:45:25] ivanskie: has joined #ruby
[16:46:05] k3asd`: has joined #ruby
[16:46:56] luriv_: has joined #ruby
[16:47:43] diegoaguilar: has joined #ruby
[16:48:21] mrevd: has joined #ruby
[16:48:28] A124: has joined #ruby
[16:49:36] JDiPierro: has joined #ruby
[16:49:48] nibbo: has joined #ruby
[16:50:06] hxegon: has joined #ruby
[16:52:15] Elysia: has joined #ruby
[16:53:06] Oatmeal: has joined #ruby
[16:53:16] momomomomo: >> puts "POOP"
[16:53:17] ruboto: momomomomo # => POOP ...check link for more (https://eval.in/464440)
[16:54:07] [Butch]: has joined #ruby
[16:55:05] tulak: has joined #ruby
[16:55:11] DanielI: has joined #ruby
[16:55:44] zarathostra: has joined #ruby
[16:56:22] EminenceHC: has joined #ruby
[16:56:47] zarathostra: Hey, I was wondering how does Ruby parser deals with custom operators since it doesn't now it's precendence, do you guys have any ideas ?
[16:57:20] mattwildig: has joined #ruby
[16:58:02] relix: has joined #ruby
[16:59:00] mrevd: has left #ruby: ()
[16:59:11] baweaver: has joined #ruby
[17:00:52] Pupeno: has joined #ruby
[17:01:40] gard_: has joined #ruby
[17:02:53] araujo: has joined #ruby
[17:03:01] leafybas_: has joined #ruby
[17:03:26] diegoaguilar: has joined #ruby
[17:04:08] jackjackdripper: has joined #ruby
[17:04:43] willardg: has joined #ruby
[17:06:08] gigetoo: has joined #ruby
[17:06:24] karapetyan: has joined #ruby
[17:06:52] shevy: there are no "custom" operators
[17:07:07] RobertBirnie: has joined #ruby
[17:08:12] gusTester: has joined #ruby
[17:08:59] Xeago: has joined #ruby
[17:09:03] baweaver: has joined #ruby
[17:11:15] RobertBirnie: has joined #ruby
[17:12:01] zarathostra: shevy: Ok I've never done Ruby but I heard that you could define for example "def +(rhs) ... end" so you could write "obj + rhs" as a shortcut for "obj.+(rhs)"
[17:12:12] aadam21: has joined #ruby
[17:12:24] arup_r: has joined #ruby
[17:12:34] zarathostra: couldn't you define a new operator with a different (not builtin) symbol ?
[17:12:42] vigintas1: has joined #ruby
[17:13:09] ahegyi: has joined #ruby
[17:15:36] EminenceHC: has joined #ruby
[17:15:38] towski_: has joined #ruby
[17:16:08] pdoherty: has joined #ruby
[17:17:36] Nick_ZWG: has joined #ruby
[17:18:05] baweaver: has joined #ruby
[17:18:42] __butch__: has joined #ruby
[17:19:03] mistermocha: has joined #ruby
[17:20:13] rbennacer: has joined #ruby
[17:22:32] finisherr: has joined #ruby
[17:23:35] shevy: and another webchatster gone, didn't even have the patience to idle to power
[17:23:53] foomanchu: has joined #ruby
[17:24:24] shevy: when someone includes a method, into a class from a module, is there a way to find out where it was defined? e. g
[17:24:28] shevy: class Foo; def test; end; end
[17:24:38] shevy: versus: module Foo; def test; end; end; class Bar; include Foo; end
[17:24:55] shevy: I need to override some methods dynamically, depending on whether they were defined in the class itself, or whether they were pulled-in from another module
[17:25:10] mooru: has joined #ruby
[17:25:11] Ox0dea: shevy: #method+added + Method#owner?
[17:25:18] Ox0dea: *#method_added
[17:26:02] Musashi007: has joined #ruby
[17:26:22] Ox0dea: Well, no, #included in this case, but the Method class surely has all the methods you'll need.
[17:26:57] Ox0dea: >> method(:method).methods.method(:method).owner
[17:26:58] ruboto: Ox0dea # => Kernel (https://eval.in/464481)
[17:28:27] cwong_on_irc: has joined #ruby
[17:28:32] dc: has joined #ruby
[17:29:02] cwong_on_irc: has joined #ruby
[17:29:10] gusTester: has left #ruby: ()
[17:29:35] purplexed-: has joined #ruby
[17:29:35] purplexed-: has joined #ruby
[17:30:39] subscope: has joined #ruby
[17:30:55] shevy: you did this on purpose right... using 5 times the word 'method' there
[17:31:23] sdothum: has joined #ruby
[17:31:32] marr: has joined #ruby
[17:31:40] nertzy: has joined #ruby
[17:32:41] umgrosscol: has joined #ruby
[17:33:41] rabbithole: has joined #ruby
[17:33:56] cornerma1: has joined #ruby
[17:34:26] fgo: has joined #ruby
[17:34:41] Guest53: has joined #ruby
[17:34:55] tomaz_b: guys what would you use for handling XMLs especially workflow... XSD -> XML (signed) today... with ruby > 2.1.x
[17:35:31] dotix: has joined #ruby
[17:35:31] dotix: has joined #ruby
[17:35:35] idefine: has joined #ruby
[17:35:55] tomaz_b: i spent few hours on soap4r but it looks like... it is buggy... since it calls/uses xsd from rubys std library... which was last used in ruby 1.8.x
[17:36:13] infamos: has joined #ruby
[17:36:32] tomaz_b: or let say... xsd2ruby which you get with this gem does.
[17:36:51] tomaz_b: i might be wrong... since i am really new to ruby..
[17:37:14] FDostoyevsky: has joined #ruby
[17:37:32] Guest53: has joined #ruby
[17:37:39] Melpaws: has joined #ruby
[17:37:54] The_Phoenix: has joined #ruby
[17:38:45] agentmeerkat: has joined #ruby
[17:42:44] ZeeNoodley: has joined #ruby
[17:43:05] bb010g: has joined #ruby
[17:43:53] mikecmpbll: has joined #ruby
[17:44:33] JDiPierro: has joined #ruby
[17:45:51] aspiers: has joined #ruby
[17:45:59] Ox0dea: shevy: I didn't "pick" five; that's just how many mentions it takes to get to the cent^W fixpoint.
[17:46:43] Rodya_: has joined #ruby
[17:47:47] shevy: method(:method).methods.method(:method)
[17:47:49] sdothum: has joined #ruby
[17:47:50] shevy: I can't help it...
[17:48:58] shevy: tomaz_b I radically abandoned XML, you are a brave person to still use it
[17:49:35] shevy: people tend to use nokogiri when they want to traverse around xpath-thingies
[17:49:42] tomaz_b: shevy: shit if would be up to me... i would be faaaar away :D but i have to fix something for some government tax bla, bla
[17:50:03] shevy: damn governments
[17:50:10] djbkd: has joined #ruby
[17:50:48] Ox0dea: shevy: That was yesterday.
[17:52:33] mrtomme: has joined #ruby
[17:52:37] cdg: has joined #ruby
[17:52:38] willardg: has joined #ruby
[17:53:17] cdg: has joined #ruby
[17:53:22] Contigi: has joined #ruby
[17:53:44] UtkarshRay: has joined #ruby
[17:54:24] idefine: has joined #ruby
[17:54:36] jpfuentes2: has joined #ruby
[17:55:05] casadei: has joined #ruby
[17:55:55] cdg: has joined #ruby
[17:56:34] robbyoconnor: has joined #ruby
[17:56:58] User458764: has joined #ruby
[17:57:43] ruurd: has joined #ruby
[17:57:57] Spami: has joined #ruby
[17:59:00] soulisson: has joined #ruby
[17:59:19] tubuliferous: has joined #ruby
[17:59:28] kalusn: has joined #ruby
[17:59:58] lemur: has joined #ruby
[18:00:05] soulisson: Hello, sorry to bother you, I'm new to Ruby, I would like to know if in "loop do ... end" the "do ... end" part is considered a block in the Ruby sense?
[18:00:14] Rodya_: has joined #ruby
[18:01:10] TheNet: has joined #ruby
[18:01:29] idefine: has joined #ruby
[18:01:31] jas02: has joined #ruby
[18:01:43] Ox0dea: soulisson: Yep.
[18:01:49] darthdeus: has joined #ruby
[18:01:55] rakm: has joined #ruby
[18:02:07] ekinmur: has joined #ruby
[18:02:26] kfpratt: has joined #ruby
[18:02:32] gregf_: a = 1; loop do a+=1; sleep 1; break if a == 10 end == 'a = 1; loop { a+=1; sleep 1; break if a == 10 }'
[18:03:11] soulisson: Ox0dea, ok, I thought a block must be associated to a yield
[18:03:16] kfpratt: has joined #ruby
[18:03:21] rbennacer: has joined #ruby
[18:03:24] Ox0dea: soulisson: The #loop method is yielding to your block.
[18:04:13] soulisson: Ox0dea, ok, loop is a method?
[18:04:23] Ox0dea: >> method(:loop) # soulisson: Sure is.
[18:04:24] ruboto: Ox0dea # => #<Method: Object(Kernel)#loop> (https://eval.in/464489)
[18:04:31] idefine_: has joined #ruby
[18:04:54] Ox0dea: soulisson: def loop; yield while true; end
[18:05:00] Ox0dea: And there's how you could implement it yourself. :P
[18:05:15] jobewan: has joined #ruby
[18:05:16] A124: has joined #ruby
[18:05:39] soulisson: Ox0dea, and is this also the case with the while statement?
[18:05:48] Ox0dea: soulisson: No, that's special.
[18:06:40] soulisson: Ox0dea, so ywhile true do ... end, do ... end is not really a block in the ruby sense?
[18:06:53] Ox0dea: soulisson: Yes, it is.
[18:07:03] Ox0dea: Oh, wait.
[18:08:13] PaulCapestany: has joined #ruby
[18:08:28] Ox0dea: soulisson: You're right, it's not, and that's why you shouldn't use `do` in a `while` header; it's superfluous and potentially confusing.
[18:08:55] Ox0dea: But the `do...end` passed to #loop *is* a block.
[18:08:59] soulisson: Ox0dea, thanks, sorry about this questions I'm still very new to Ruby
[18:09:10] shevy: 'while true' is worse than 'loop {}' !
[18:09:21] shinnya: has joined #ruby
[18:09:39] Ox0dea: Well, yeah, but the former leads to the "cleanest" definition of the latter.
[18:09:59] craysiii: what about cycle
[18:10:30] Maletor: has joined #ruby
[18:10:57] Ox0dea: Whale, there are any number of ways to get hold of "forever" in Ruby, but #loop is procedural and shouldn't bother to hide it.
[18:11:11] shevy: you and your whales
[18:11:28] arthurix_: has joined #ruby
[18:12:34] Ox0dea: logs $ grep -ci 'Ox.*whale' *ruby.*
[18:12:38] Ox0dea: Could be worse.
[18:13:36] aadam21: has joined #ruby
[18:14:23] pandaant: has joined #ruby
[18:15:06] kfpratt: has joined #ruby
[18:16:30] jackjackdripper1: has joined #ruby
[18:17:23] TheHodge: has joined #ruby
[18:18:02] Spami: has joined #ruby
[18:19:04] northfurr: has joined #ruby
[18:19:28] ellisTAA: has joined #ruby
[18:19:32] xet7: has joined #ruby
[18:19:36] dikaio: has joined #ruby
[18:20:31] wsewolod: has joined #ruby
[18:20:48] ruby-lang421: has joined #ruby
[18:20:54] jackjackdripper: has joined #ruby
[18:21:37] RegulationD: has joined #ruby
[18:21:57] mozzarella: my gems are installed in $HOME/.gem/ruby/gems, but every time I install a new OS, it seems that the currently installed gems are ignored and get downloaded again when I??run "bundle install", why is this?
[18:23:15] Musashi007: has joined #ruby
[18:23:19] yfeldblum: has joined #ruby
[18:24:09] Guest53: has joined #ruby
[18:25:34] Maletor: has joined #ruby
[18:26:27] bdnelson: has joined #ruby
[18:26:56] roshanavand: has joined #ruby
[18:27:47] User458764: has joined #ruby
[18:27:56] willywos: has joined #ruby
[18:28:13] closer: has joined #ruby
[18:28:32] RegulationD: has joined #ruby
[18:28:55] skweek: has joined #ruby
[18:29:19] jackjackdripper: has joined #ruby
[18:29:44] SleepySensei: has joined #ruby
[18:30:42] Rodya_: has joined #ruby
[18:31:36] Pupeno: has joined #ruby
[18:31:45] roshanavand: has joined #ruby
[18:33:35] postmodern: has joined #ruby
[18:34:13] roshanavand: has joined #ruby
[18:35:33] fgo: has joined #ruby
[18:36:00] DEA7TH: has joined #ruby
[18:36:11] leafybas_: has joined #ruby
[18:37:33] kalusn: has joined #ruby
[18:37:59] mattwashere: has joined #ruby
[18:39:07] th0m__: has joined #ruby
[18:42:09] Spami: has joined #ruby
[18:43:43] tubuliferous: has joined #ruby
[18:43:57] Spami: has joined #ruby
[18:44:25] zenguy_pc: has joined #ruby
[18:45:11] blackmesa: has joined #ruby
[18:45:30] asianMike: has joined #ruby
[18:45:36] dikaio: has joined #ruby
[18:46:10] tjohnson: has joined #ruby
[18:46:54] karapetyan: has joined #ruby
[18:48:24] idefine: has joined #ruby
[18:50:04] Rodya_: has joined #ruby
[18:50:10] DanielI: has joined #ruby
[18:50:28] blackmesa: has joined #ruby
[18:50:41] idefine: has joined #ruby
[18:51:38] leat: has joined #ruby
[18:52:56] yqt: has joined #ruby
[18:53:02] p0wn3d__: has joined #ruby
[18:53:08] idefine: has joined #ruby
[18:53:46] ruurd: has joined #ruby
[18:54:13] dc_: has joined #ruby
[18:54:18] karapetyan: has joined #ruby
[18:54:38] TheNet: has joined #ruby
[18:54:48] JinglesCafe: has joined #ruby
[18:55:23] JinglesCafe: I love ruby, its better than fortan
[18:55:38] jas02: has joined #ruby
[18:55:47] idefine: has joined #ruby
[18:56:48] TheNet: has joined #ruby
[18:56:51] Melpaws1: has joined #ruby
[18:56:57] fantazo: has joined #ruby
[18:59:26] dionysus69: has joined #ruby
[18:59:35] idefine: has joined #ruby
[19:00:00] dionysus69: has joined #ruby
[19:00:17] jdawgaz: has joined #ruby
[19:00:36] skweek: has joined #ruby
[19:00:40] Pupeno: has joined #ruby
[19:00:47] lemur: has joined #ruby
[19:01:25] mattwashere: has joined #ruby
[19:01:27] Rodya_: has joined #ruby
[19:02:06] willardg: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[19:02:23] sdothum: has joined #ruby
[19:02:58] Okioo: has joined #ruby
[19:03:16] willardg: has joined #ruby
[19:03:20] mistermocha: has joined #ruby
[19:03:22] willardg: http://codeshare.io/SKxrk
[19:03:48] SCHAAP137: has joined #ruby
[19:03:54] willardg: I keep getting an error telling me that I need the right ruby version. the snippit shows all the versions I have right now
[19:03:57] The_Phoenix: has joined #ruby
[19:04:09] Okioo: Hello, I have seen a class declaring a function like this: def []() , can someone explain me this syntax please ? It seems weird
[19:04:25] willardg: rbenv issue, sorry, didn't preface that
[19:04:30] gard_: has joined #ruby
[19:05:14] bahar: has joined #ruby
[19:05:15] Ox0dea: Okioo: You know how you say some_array[n] to get the nth element?
[19:05:31] Okioo: Ox0dea: yes sure
[19:05:40] Okioo: but here it looks like it is the name of the function ?
[19:05:52] Ox0dea: Okioo: Yeah, #[] is just a regular method.
[19:06:00] Ox0dea: Objects can define their own version for custom behavior.
[19:06:01] Axsuul: has joined #ruby
[19:06:36] Okioo: Ox0dea: so I can call it like this myvariable= []() ?
[19:06:38] Ox0dea: >> class Doubler; def [](n); n * 2; end end; Doubler.new[21] # Okioo
[19:06:39] ruboto: Ox0dea # => 42 (https://eval.in/464503)
[19:06:59] Ox0dea: You'd have to define #[]= to create a writer, but yeah.
[19:07:47] hahuang65: has joined #ruby
[19:08:07] acy: has joined #ruby
[19:08:38] Okioo: Ox0dea: in your example, it looks like it is the constructor
[19:08:44] mattwildig: has joined #ruby
[19:09:14] Ox0dea: Okioo: Aye, it is there, but you can define it arbitrarily.
[19:09:28] lucianosousa: has joined #ruby
[19:10:01] Okioo: that's so strange but I think i get it
[19:10:12] Okioo: would you have an other quick example with a String instead of an array please ?
[19:10:15] Ox0dea: Another idiom is to have it delegate to a Hash, so that you can say `MyThing[prop] = value` for "pretty" configuration.
[19:10:26] Ox0dea: Okioo: Well, String already has #[]?
[19:10:41] Ox0dea: I think the problem is that you're association the #[] method with Arrays.
[19:10:54] Ox0dea: It's just a valid method name, and any object can potentially respond to it.
[19:11:00] Ox0dea: *associating
[19:11:04] fantazo: has joined #ruby
[19:11:23] eam: kinda funny that String doesn't inherit from Array
[19:11:44] Okioo: but in your example" Doubler.new[21] it really looks like it is an array
[19:11:53] axl_: has joined #ruby
[19:12:12] Okioo: if it was the method it would be more like Doubler.[](21) I guess
[19:12:43] eam: Okioo: [] is a method that takes its args inside the []
[19:12:56] Ox0dea: >> String.include(Enumerable).send :alias_method, :each, :each_char; '`vdrnld'.map(&:next) # eam
[19:12:57] ruboto: Ox0dea # => ["a", "w", "e", "s", "o", "m", "e"] (https://eval.in/464518)
[19:13:18] Okioo: that's funny first time I see that
[19:13:19] eam: >> class Thing; def [](a, b); a + b; end; end; Thing.new[1,2]
[19:13:20] ruboto: eam # => 3 (https://eval.in/464519)
[19:13:48] Croves: I run sudo gem install rails but nothing happens
[19:13:50] Ox0dea: >> ObjectSpace.each_object(Class).flat_map(&:instance_methods).uniq.grep(/^\W/).sort # Okioo
[19:13:51] ruboto: Ox0dea # => [:!, :!=, :!~, :%, :&, :*, :**, :+, :+@, :-, :-@, :/, :<, :<<, :<=, :<=>, :==, :===, :=~, :>, :>=, : ...check link for more (https://eval.in/464520)
[19:13:54] ruurd: has joined #ruby
[19:14:02] Ox0dea: Okioo: Those are all the "operators" that are actually method calls.
[19:14:03] nfk: has joined #ruby
[19:14:08] Ox0dea: And they're all at your disposal.
[19:14:34] pipework: Ox0dea: Sir, I have a thing I'm doing that might be neat or it might be trash.
[19:14:41] Ox0dea: pipework: Me too! <3
[19:14:46] _stu_: has joined #ruby
[19:14:51] Ox0dea: Please do go on.
[19:15:02] Ox0dea: Mine involves a suicidal TracePoint. ^_^
[19:15:29] roshanavand: has joined #ruby
[19:15:46] dnewkerk: has joined #ruby
[19:16:04] aadam21: has joined #ruby
[19:16:16] benjwadams: has joined #ruby
[19:16:20] pipework: Ox0dea: You are truly nuts, sir. How do you find all the time to explore so much?
[19:16:49] benjwadams: where are file locks stored in ruby? A process crashed due to OOM and I have a lock that was not released properly
[19:17:37] gard_: has joined #ruby
[19:17:39] pipework: benjwadams: Did you get the pid?
[19:17:41] Ox0dea: benjwadams: Flocks are stored on instances of IO themselves.
[19:18:06] eam: benjwadams: what kind of lock?
[19:18:24] benjwadams: i'm going to try to do LOCK_UN
[19:18:34] pipework: Ox0dea: are those like file descriptors with a mutex in front?
[19:19:08] eam: benjwadams: flock() locks are removed when the descriptors are closed
[19:19:17] eam: I suspect your crashed process is not fully dead
[19:19:32] pipework: benjwadams: http://unix.stackexchange.com/a/85997 does that help?
[19:19:38] eam: you can use fuser / lsof to see what processes have a descriptor on the file open
[19:19:45] yardenbar: has joined #ruby
[19:19:52] leafybas_: has joined #ruby
[19:20:35] shevy: fuser! fuuuuuser!
[19:20:38] shevy: fuuuuuuuuuuuuser!!!
[19:20:44] pipework: shevy: luser
[19:21:00] shevy: pipe|work
[19:21:21] synthroid: has joined #ruby
[19:21:34] deg-: has joined #ruby
[19:22:05] dikaio: has joined #ruby
[19:22:11] |work: I am |work!
[19:22:23] EminenceHC: has joined #ruby
[19:23:19] Arkon: has joined #ruby
[19:25:32] sdothum: has joined #ruby
[19:26:22] synthroid: has joined #ruby
[19:27:07] idefine_: has joined #ruby
[19:27:10] spider-mario: has joined #ruby
[19:27:22] Melpaws: has joined #ruby
[19:28:24] pedahzur: has joined #ruby
[19:29:10] kaleido: has joined #ruby
[19:29:30] hahuang65: has joined #ruby
[19:29:42] kaleido: has left #ruby: ()
[19:29:57] benjwadams: Thanks so much! The `fuser -k` did the trick
[19:30:16] Spaceghost|work: Ox0dea: Mine has to do with wrapping json-schema into a lot of cool tooling so that you can build a system by writing the documentation for it, which will write the tests for the endpoints, and do a lot more than just testing.
[19:30:33] nertzy: has joined #ruby
[19:30:42] pedahzur: Sorry to ask this here. I've asked in #berkshelf, and am getting no response. I'm hitting ":gzip is not registered on Faraday::Response" when trying to run 'berks update' and cannot figure out a solution. Unlike https://github.com/berkshelf/berkshelf/issues/1466, I am *NOT* running it from 'chef exec'. I've tried fiddling with Faraday versions and berks-api-client versions, but have not gotten anywhere!
[19:31:11] Spaceghost|work: Executable specification through the use of something like swagger's spec or something helpful for describing the API.
[19:31:23] ss_much: has joined #ruby
[19:32:05] Ox0dea: spaceghost|work: Using NLP to parse the documentation, then, or?
[19:33:19] ahegyi_: has joined #ruby
[19:34:10] zapata: has joined #ruby
[19:34:37] tomphp: has joined #ruby
[19:34:46] Spaceghost|work: Ox0dea: No, write the docs in json schema!
[19:35:10] Ox0dea: Ah, gotcha.
[19:35:16] [Butch]: has joined #ruby
[19:36:01] odigity: has joined #ruby
[19:36:13] Ox0dea: spaceghost|work: How faithfully do you intend to represent Ruby's object model?
[19:36:14] djbkd: has joined #ruby
[19:36:25] odigity: If I have an object with an instance var containing a hash, can I delegate the #each method to it?
[19:36:36] fgo: has joined #ruby
[19:36:37] Spaceghost|work: Ox0dea: it has nothing to do with ruby object models though. It's just for describing json schemas.
[19:36:49] Spaceghost|work: It's all written in JSON.
[19:36:53] Ox0dea: spaceghost|work: A JSON schema describing a JSON schema...?
[19:37:17] Spaceghost|work: Ox0dea: A nested object, sure. An object type described in JSON Schema that can have other objects inside it.
[19:37:22] conta: has joined #ruby
[19:37:43] ruurd: has joined #ruby
[19:37:45] Ox0dea: spaceghost|work: What kind of objects?
[19:37:52] Spaceghost|work: Ox0dea: JSON objects.
[19:38:02] Spaceghost|work: They're just JSON objects with a schema file to validate against.
[19:38:14] Ox0dea: To validate what against?
[19:38:21] Ox0dea: Ruby objects, right?
[19:38:22] Spaceghost|work: Ox0dea: JSON payloads!
[19:38:27] Ox0dea: Oh, I see.
[19:38:27] rabbithole: has joined #ruby
[19:38:34] Spaceghost|work: Anything could create them, it's not language-bound.
[19:38:57] mloy_: has joined #ruby
[19:39:04] Spaceghost|work: It's like super slow and not remotely comparable protocol-buffers in an HTTP resource oriented fashion.
[19:39:34] Spaceghost|work: Or you could throw 'em down a socket as json payloads wrapped in an envelope
[19:39:35] last_staff: has joined #ruby
[19:39:57] PaulCape_: has joined #ruby
[19:40:22] build22_: has joined #ruby
[19:42:41] infamos: has joined #ruby
[19:43:57] Coldblackice: has joined #ruby
[19:44:15] dotix: has joined #ruby
[19:44:15] dotix: has joined #ruby
[19:44:26] kies^: has joined #ruby
[19:47:12] agentmeerkat: has joined #ruby
[19:48:43] ledestin: has joined #ruby
[19:48:57] idefine: has joined #ruby
[19:50:37] lucianosousa: has joined #ruby
[19:51:01] mloy_: has joined #ruby
[19:51:10] idefine: has joined #ruby
[19:52:53] jmonreal: If I have a json array with strings like this {test => ["key1=value1", "key2=value2"] }, how can I get the keys and values ?
[19:53:01] jmonreal: without knowing them of course
[19:53:05] VeryBewitching: has joined #ruby
[19:53:45] Ox0dea: jmonreal: How did you end up in this position?
[19:54:02] JoshL: Ox0dea: a question we all ask ourselves every day
[19:54:26] ghostbox: has joined #ruby
[19:54:32] Galas: has joined #ruby
[19:54:48] jmonreal: Ox0dea: its a json I am getting from someplace
[19:55:00] Ox0dea: jmonreal: But "key=value" isn't really JSON.
[19:55:10] mattwildig: has joined #ruby
[19:55:17] Ox0dea: Are you sure there's no way to convince your data source to not be a dick?
[19:55:29] jmonreal: Ox0dea: its a string that has that configuration
[19:55:36] jmonreal: its an array of strings
[19:55:40] Ox0dea: Yes, I see.
[19:55:54] VeryBewitching: "Dear Datasource, I've been meaning to mention this for some time now, but never had the heart to tell you... you're a dick."
[19:56:20] Ox0dea: >> ["key1=value1", "key2=value2"].map { |s| s.split "=" }.transpose # jmonreal
[19:56:21] ruboto: Ox0dea # => [["key1", "key2"], ["value1", "value2"]] (https://eval.in/464554)
[19:56:40] Ox0dea: >> keys, vals = ["key1=value1", "key2=value2"].map { |s| s.split "=" }.transpose; keys
[19:56:42] ruboto: Ox0dea # => ["key1", "key2"] (https://eval.in/464555)
[19:57:22] Guest53: has joined #ruby
[19:57:39] jmonreal: thanks Ox0dea
[19:57:42] Ox0dea: jmonreal: Sure thing.
[19:57:48] anisha: has joined #ruby
[19:57:49] JoshL: >> Hash[["key1=value1", "key2=value2"].map { |item| item.split('=') }] # jmonreal
[19:57:51] ruboto: JoshL # => {"key1"=>"value1", "key2"=>"value2"} (https://eval.in/464556)
[19:57:55] JoshL: to make a hash from it
[19:58:15] dikaio: has joined #ruby
[19:58:19] jmonreal: Ox0dea: and what if i want to iterate over them like array.each do |key, value|
[19:58:41] felltir: has joined #ruby
[19:58:43] Ox0dea: jmonreal: Do that.
[19:58:45] mooru: has joined #ruby
[19:59:25] jmonreal: but Ox0dea woudl it be something like ["key1=value1", "key2=value2"].map { |s| s.split "=" }.transpose.each do |key, value|
[19:59:34] Ox0dea: jmonreal: Nix the call to #transpose.
[19:59:42] Ox0dea: That groups them in the way your initial question seemed to want.
[19:59:57] Ox0dea: But if you want to iterate over them as key-value pairs, it's enough just to #split 'em.
[20:01:53] odigity: What's the term for the expression 'a, b' in the expression 'a, b = 1, 2'? It's 'array', because that's a type. Is it 'list'?.
[20:02:08] odigity: Also in 'return a, b'
[20:02:18] drbrain: multiple assignment
[20:02:22] drbrain: multiple return values
[20:02:28] blubjr: the [] are implicit i think
[20:02:46] blubjr: ruby doesn't have proper multiple return values
[20:02:52] Ox0dea: >> _,(_,_,((_,(foo,_)),_)) = [1, [2, [3, 4], [[5, [:target], 6], [7], 8, [9], 10]]]; foo
[20:02:53] ruboto: Ox0dea # => :target (https://eval.in/464561)
[20:02:59] Ox0dea: I never get tired of whipping that one out.
[20:03:01] dc: has joined #ruby
[20:03:19] Ox0dea: Ruby has bona fide destructuring, but only for Array. :<
[20:03:56] iateadonut: has joined #ruby
[20:04:14] SHyx0rmZ: has joined #ruby
[20:04:43] northfurr: has joined #ruby
[20:04:49] Ox0dea: >> a,(b,(c,),d),e = [1, [2, [3], 4], 5]; [a, b, c, d ,e] # A little clarity.
[20:04:50] ruboto: Ox0dea # => [1, 2, 3, 4, 5] (https://eval.in/464562)
[20:05:01] odigity: drbrain, multiple assignment/return values describes what you're doing with the whole expression. I guess there's not a term just for the comma-separated rvalue / lvalue list. Ok.
[20:05:24] PaulCapestany: has joined #ruby
[20:05:26] drbrain: odigity: yeah, I haven't seen any consistent label for it
[20:05:31] odigity: Ox0dea, that hurts muh brain
[20:05:50] Ox0dea: odigity: LHS seems most appropriate?
[20:05:54] drbrain: odigity: if you add * to the mix it gets even more fun
[20:05:57] blubjr: you're destructuring a return value, but there's still only one
[20:06:10] blubjr: multiple return values is different
[20:06:19] eam: perl would call it list context
[20:06:21] Ox0dea: blubjr: Sure, I know Ruby doesn't have real multiple return values, but it does have "real" destructuring.
[20:06:23] odigity: blubjr, that's what weirds my out. it's one value, but it's multiple values, but it's not an array :)
[20:06:33] Ox0dea: odigity: It is an Array, though.
[20:06:36] drbrain: odigity: ruby creates an Array for you
[20:06:42] ivanskie: has joined #ruby
[20:06:56] drbrain: I use `return a, b` to signal the user "I'm returning multiple values"
[20:07:11] odigity: Ruby creates an array if you do a = 1, 2 but not a,_ = 1, 2 right? like, only if there are no commas on the left side?
[20:07:14] drbrain: and `return [a, b]` to signal "I'm returning an Array" (but usually without the return)
[20:07:18] blubjr: ya Ox0dea
[20:08:17] drbrain: you could add an optimization to the compiler that eliminates array creation across the call, but I doubt it would change performance much
[20:08:30] odigity: What I was ultimately trying to figure out is if returning 'a,b' to someone only expecting a would screw things up, or if the b would silently be ignored. so that I could, for example, implement a [] method that returns a piece of metadata about the value in addition to the value, but still have normal ruby libs and idioms work
[20:08:48] odigity: I should have said "implement *an* [] method"
[20:08:58] Ox0dea: odigity: Was it you who asked about this before? :P
[20:09:04] odigity: nope, first time
[20:09:06] drbrain: it would screw things up if they only expected one value
[20:09:07] stamina: has joined #ruby
[20:09:16] odigity: because they'd get an array
[20:09:23] drbrain: they'd need to change `result = your_method` to `result, = your_method`
[20:09:27] odigity: unless they have a west-side comma
[20:09:38] odigity: ok. I'll refrain, then :)
[20:09:46] rakm: has joined #ruby
[20:09:59] odigity: to the editor!
[20:10:24] kirun: has joined #ruby
[20:10:25] Ox0dea: odigity: http://irclog.whitequark.org/ruby/2015-07-06#13327081;
[20:10:26] blubjr: odigity you would need real multiple return values for that
[20:10:51] Ox0dea: Some fellow named sphex was also quite displeased with Ruby having forsaken this facet of its heritage.
[20:14:32] inate: has joined #ruby
[20:15:50] mattwashere: has joined #ruby
[20:16:13] dc: has joined #ruby
[20:16:49] borodin: has joined #ruby
[20:16:49] aadam21: has joined #ruby
[20:17:08] kadoppe: has joined #ruby
[20:17:21] borodin: has joined #ruby
[20:17:42] jmonreal: how can I get the hostname of the server ?
[20:19:02] northfurr_: has joined #ruby
[20:19:25] jordanm: jmonreal: Socket.gethostname
[20:19:41] nertzy: has joined #ruby
[20:19:52] jas02: has joined #ruby
[20:21:48] jessemcgilallen: has joined #ruby
[20:21:48] baweaver: has joined #ruby
[20:22:28] Maletor: has joined #ruby
[20:22:38] VeryBewitching: has joined #ruby
[20:23:04] Rollabunna: has joined #ruby
[20:23:17] ciccio: has joined #ruby
[20:24:06] ciccio: has left #ruby: ()
[20:24:36] yfeldblum: has joined #ruby
[20:26:29] skcin7: has joined #ruby
[20:28:30] FernandoBasso: has joined #ruby
[20:29:41] arup_r: has joined #ruby
[20:30:36] tvw: has joined #ruby
[20:30:53] agentmeerkat: has joined #ruby
[20:30:57] seydar: has joined #ruby
[20:31:22] willardg: has joined #ruby
[20:31:29] hahuang65: has joined #ruby
[20:31:40] Spaceghost|work: Why isn't there an ENV() method on Kernel? D:
[20:31:52] Ox0dea: spaceghost|work: Because there's ENV?
[20:32:04] vigintas: has joined #ruby
[20:32:24] seydar: rubygems take too long to load. any wisdom for making them not slow?
[20:32:39] Spaceghost|work: Ox0dea: But I just wanna type less to emulate ENV.fetch
[20:32:59] adaedra: syath: load less gems?
[20:33:13] VladGh: has joined #ruby
[20:33:24] Spaceghost|work: >> def Kernel.ENV(key); ENV.fetch(key); end; ENV('WAFFLES')
[20:33:26] ruboto: spaceghost|work # => undefined method `ENV' for main:Object (NoMethodError) ...check link for more (https://eval.in/464582)
[20:33:49] seydar: adaedra: i only load one :'(
[20:34:03] Ox0dea: spaceghost|work: S'gotta be an instance method.
[20:34:07] ReK2: has joined #ruby
[20:34:20] adaedra: &ri ENV @spaceghost|work
[20:34:20] `derpy: spaceghost|work: http://www.rubydoc.info/stdlib/core/ENV
[20:34:32] purplexed-: has joined #ruby
[20:34:32] purplexed-: has joined #ruby
[20:34:34] duncannz: has joined #ruby
[20:34:41] azure32: has joined #ruby
[20:34:41] adaedra: I'd have hoped something more detailled.
[20:35:28] adaedra: http://ruby-doc.org/core-2.2.3/ENV.html
[20:35:45] Spaceghost|work: `derpy: I know about ENV, but that's not ENV()
[20:36:07] adaedra: What would it do?
[20:36:20] Spaceghost|work: adaedra: Like I showed above, essentially just call fetch.
[20:36:44] jmonreal: jordanm: thanks!
[20:36:45] Spaceghost|work: Like when ::Integer() can't return an int, it raises an exception. so should ::ENV()
[20:37:17] naftilos76: has joined #ruby
[20:37:45] adaedra: What's wrong with ENV#fetch ?
[20:37:59] fgo: has joined #ruby
[20:38:20] Ox0dea: There's gotta be a better way. https://eval.in/464583
[20:39:13] solenoids: has joined #ruby
[20:39:24] idefine_: has joined #ruby
[20:39:50] firstdayonthejob: has joined #ruby
[20:40:55] blackmesa: has joined #ruby
[20:41:07] lipoqil: has joined #ruby
[20:41:25] ellisTAA: has joined #ruby
[20:42:46] momomomomo: has joined #ruby
[20:44:27] molay: has joined #ruby
[20:45:13] zenguy_pc: has joined #ruby
[20:46:58] molay: is it possible to have ruby code in, say, example.rb rename the file example.rb?
[20:47:20] molay: in other words, can a .rb file rename itself?
[20:47:29] adaedra: it should be able to
[20:47:36] adaedra: at least under non-windows
[20:47:45] Arkon: has joined #ruby
[20:47:49] adaedra: try and see what happens
[20:48:15] molay: well, i'm sure it could be done, especially if I use system commands
[20:48:28] JoshL: molay: sure. https://gist.github.com/jlindsey/576949302f2cfcbcbff1
[20:48:42] molay: but i'm wondering if there's a ruby way of doing it, so that this would also work for windows users as well.
[20:49:33] molay: JoshL: would this work in windows too?
[20:49:37] adaedra: Problem is that windows locks open files.
[20:49:49] molay: yeah, i'm using linux, but I'm making this for windows users
[20:50:23] Pupeno: has joined #ruby
[20:50:24] molay: I suppose I could have my script call a separate .rb file to do the work for me
[20:50:58] JoshL: molay: I don't know what would happen if you tried that code in windows, no
[20:51:20] molay: freakin windows
[20:52:46] TheNet: has joined #ruby
[20:53:24] molay: thanks adaedra & JoshL
[20:54:02] JoshL: molay: Not sure how much help I was, but no problem!
[20:54:15] tulak: has joined #ruby
[20:54:54] ekinmur: has joined #ruby
[20:56:07] Z00t: has joined #ruby
[20:56:08] molay: JoshL: yeah you helped me determine that there's not an easy solution. lol
[20:56:14] mattwashere: has joined #ruby
[20:56:21] idefine: has joined #ruby
[20:57:24] adaedra: It may still be worth a try, though.
[20:57:48] dmitch: has joined #ruby
[20:58:10] slawrence00: has joined #ruby
[20:59:05] ivanskie: has joined #ruby
[20:59:16] pdoherty: has joined #ruby
[20:59:16] willardg: has joined #ruby
[20:59:36] TheNet: has joined #ruby
[20:59:37] blackmesa: has joined #ruby
[21:00:14] Ox0dea: has joined #ruby
[21:00:19] molay: Here's an idea...
[21:00:48] dikaio: has joined #ruby
[21:01:07] molay: it appears as though "system('ruby example.rb','')" might work regardless of the OS
[21:01:09] momomomomo: has joined #ruby
[21:01:15] tubuliferous: has joined #ruby
[21:02:16] lemur: has joined #ruby
[21:04:03] rakm: has joined #ruby
[21:04:29] charliesome: has joined #ruby
[21:05:16] EdwardIII: has joined #ruby
[21:06:05] luriv: has joined #ruby
[21:06:58] Channel6: has joined #ruby
[21:07:04] idefine_: has joined #ruby
[21:07:19] vF3hNGxc47h8: has joined #ruby
[21:08:05] User458764: What library can I use to indent correctly Ruby. I search something like tidy but for Ruby.
[21:08:29] RegulationD: has joined #ruby
[21:09:17] JoshL: User458764: rubocop will autocorrect indentation if you run it with -a
[21:09:29] JoshL: among other things
[21:09:50] User458764: JoshL thanks :)
[21:09:56] JoshL: If you only want indentation, you can set up a .rubocop.yaml with everything but Style/IndentationWidth disabled
[21:10:02] Rodya_: has joined #ruby
[21:10:20] robbyoconnor: has joined #ruby
[21:12:11] ahegyi_: has joined #ruby
[21:12:28] rakm: has joined #ruby
[21:13:11] last_staff: has joined #ruby
[21:14:11] s2013: has joined #ruby
[21:14:46] Coldblackice: has joined #ruby
[21:14:47] chouhoulis: has joined #ruby
[21:16:46] jas02: has joined #ruby
[21:17:03] Spami: has joined #ruby
[21:17:46] riceandbeans: http://pastebin.com/6LZtDijp
[21:17:47] ruboto: riceandbeans, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/780a6a73a86b3a89aa9a
[21:17:47] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[21:18:15] riceandbeans: that's annoying, because once you post to gist you can never take it down
[21:18:42] aadam21: has joined #ruby
[21:18:43] JoshL: riceandbeans: Yes those two method invocations are the same
[21:18:59] mooru: has joined #ruby
[21:19:10] hakunin: has joined #ruby
[21:19:33] riceandbeans: JoshL: would you argue that the latter is more readable for a shorter line?
[21:19:44] riceandbeans: JoshL: the latter would pass my linter
[21:20:47] JoshL: riceandbeans: Sure, I often call methods like that. I think rubocop's only lint re: that syntax is that method arguments on subsequent lines are aligned
[21:21:02] mooru: has joined #ruby
[21:23:18] EdwardIII: has joined #ruby
[21:24:49] Ox0dea: has joined #ruby
[21:25:04] Ox0dea: molay: So, uh, whatcha renaming the current file for?
[21:25:38] Ox0dea: riceandbeans: Gists can be deleted just fine.
[21:26:36] idefine: has joined #ruby
[21:27:02] infamos: has joined #ruby
[21:27:45] cluda01: has joined #ruby
[21:27:59] riceandbeans: Ox0dea: I dare you to delete the gist that ruboto made
[21:28:25] platzhirsch: has left #ruby: ()
[21:28:38] Ox0dea: > once you post to gist you can never take it down
[21:28:58] dikaio: has joined #ruby
[21:29:04] Ox0dea: riceandbeans: I didn't post it. ruboto *could* be made to take it down, though.
[21:29:13] riceandbeans: you can modify it if you own it, but you can't delete it
[21:29:15] axl__: has joined #ruby
[21:29:29] riceandbeans: ruboto can't take it down because ruboto posted it as anonymous
[21:29:38] riceandbeans: so ruboto forfeited all priveleges to it
[21:29:55] Arkon: has joined #ruby
[21:29:59] riceandbeans: even if you modify though, you have revisions
[21:30:04] Ox0dea: riceandbeans: http://i.imgur.com/Ky4hUWm.png
[21:30:09] riceandbeans: I dislike gist for anything I want to be temporary
[21:30:13] Ox0dea: I'm having trouble reading that first button; could you tell me what it says?
[21:30:22] karapetyan: has joined #ruby
[21:31:39] Ox0dea: riceandbeans: Please, I can't find my glasses.
[21:31:52] freerobby: has joined #ruby
[21:32:00] riceandbeans: then that's a new feature
[21:32:14] riceandbeans: when I started with github years ago there was no delete feature
[21:32:25] riceandbeans: not for gists
[21:32:36] Ox0dea: Cool story. Learn to check your assumptions from time to time.
[21:32:37] karapetyan: has joined #ruby
[21:32:47] chenx: has joined #ruby
[21:34:07] teclator: has joined #ruby
[21:34:36] chenx: why is the singleton class returning nil? https://eval.in/464606
[21:34:46] azure32: has joined #ruby
[21:35:47] Ox0dea: chenx: Wrong channel.
[21:36:05] Ox0dea: Or wrong paste?
[21:36:42] chenx: this is so weird why is the link python
[21:37:04] willardg: has joined #ruby
[21:37:41] trosborn: has joined #ruby
[21:37:42] mloy: has joined #ruby
[21:38:50] fgo: has joined #ruby
[21:40:04] Glenny: has joined #ruby
[21:41:54] EminenceHC: has joined #ruby
[21:45:15] mordocai: has left #ruby: ("ERC (IRC client for Emacs 24.5.1)")
[21:45:30] nickjj_: has joined #ruby
[21:46:28] rabbithole: has joined #ruby
[21:46:49] kobain: has joined #ruby
[21:47:44] sinkensabe: has joined #ruby
[21:48:40] shock_one: has joined #ruby
[21:51:20] wsewolod: has joined #ruby
[21:53:35] Oatmeal: has joined #ruby
[21:53:35] freerobby: has joined #ruby
[21:53:52] build22__: has joined #ruby
[21:57:19] mattwashere: has joined #ruby
[21:58:13] skweek: has joined #ruby
[21:58:37] diegoviola: has joined #ruby
[21:58:46] asianMike: has joined #ruby
[21:59:03] gard_: has joined #ruby
[21:59:34] Cork: has joined #ruby
[22:02:20] diegoviola: has joined #ruby
[22:02:30] The__Ball: has joined #ruby
[22:02:42] The__Ball: What does a -%> end tag in a ruby template mean?
[22:02:55] rakm: has joined #ruby
[22:03:16] shevy: I don't know what the - is there
[22:04:03] Sigma00: it's an old thing http://stackoverflow.com/questions/4407862/minus-sign-at-the-end-of-a-erb-sequence
[22:04:50] danneu: pretty common in templating markup
[22:05:48] dfockler: has joined #ruby
[22:05:51] yardenbar: has joined #ruby
[22:06:41] Z00t: has joined #ruby
[22:06:49] The__Ball: Sigma00, ah, I see, thanks
[22:07:44] pandaant: has joined #ruby
[22:08:41] jud: has joined #ruby
[22:09:22] infamos: has joined #ruby
[22:10:05] hahuang65: has joined #ruby
[22:10:56] jas02: has joined #ruby
[22:12:07] Pupeno: has joined #ruby
[22:12:16] ebbflowgo: has joined #ruby
[22:13:11] tulak: has joined #ruby
[22:13:19] Coldblackice: has joined #ruby
[22:13:55] baweaver: has joined #ruby
[22:14:08] rakm: do we know if old style ruby hashes will be removed at any point? just curious
[22:14:18] Xiti: has joined #ruby
[22:14:32] havenwood: rakm: Nope, the Hash rocket is around to stay.
[22:14:33] rakm: (talking about {:foo => "bar"} syntax
[22:14:37] rakm: ok cool, just wondeirng
[22:15:55] rakm: was new style purely for syntactic sugar?
[22:18:16] Ox0dea: rakm: Literal keys are so often Symbols that it makes sense for there to be a more convenient way to type them.
[22:19:51] aadam21: has joined #ruby
[22:23:49] Sigma00: plus it has to stay so that you can do stuff like `:"using-this-sort => 'of key'`
[22:23:52] mattwashere: has joined #ruby
[22:23:53] Rollabunna: has joined #ruby
[22:24:00] Sigma00: er, I missed a doublequote
[22:24:45] havenwood: >> {"allowed now?": true}
[22:24:46] ruboto: havenwood # => {:"allowed now?"=>true} (https://eval.in/464616)
[22:25:03] Sigma00: RIP my reasons
[22:25:26] Ox0dea: `foo: :bar` still squicks, though. :<
[22:26:44] swgillespie: has joined #ruby
[22:27:25] havenwood: >> {':': :':'}
[22:27:26] ruboto: havenwood # => {:":"=>:":"} (https://eval.in/464617)
[22:28:11] yfeldblum: has joined #ruby
[22:29:02] momomomomo: has joined #ruby
[22:29:11] Ox0dea: It's beautiful... get it away from me.
[22:31:24] Ox0dea: Oh, hey! I found a bug in the new safe call syntax.
[22:31:58] BraddPitt: please share, Ox0dea
[22:32:20] Ox0dea: BraddPitt: Just making sure it's really a bug.
[22:32:33] BraddPitt: still interested
[22:33:56] idefine: has joined #ruby
[22:34:23] ivanskie: has joined #ruby
[22:34:49] ivanskie: has joined #ruby
[22:35:06] Ox0dea: It wasn't a bug.
[22:35:07] Ox0dea: >> 2.*2 + 3
[22:35:08] ruboto: Ox0dea # => 10 (https://eval.in/464618)
[22:35:14] Ox0dea: That's slightly confusing, though.
[22:35:22] ivanskie: has joined #ruby
[22:36:10] Ox0dea: I realize it's just that invocation binds somewhat loosely.
[22:36:25] Synthead: has joined #ruby
[22:36:33] aadam21: has joined #ruby
[22:36:36] TheNet: has joined #ruby
[22:37:12] bruno-: has joined #ruby
[22:37:35] symm-: has joined #ruby
[22:40:10] fgo: has joined #ruby
[22:42:43] pandaant: has joined #ruby
[22:43:39] ruurd: has joined #ruby
[22:45:33] cbetta: has joined #ruby
[22:45:49] zenguy_pc: has joined #ruby
[22:46:36] Channel6: has joined #ruby
[22:46:37] dtordable: has joined #ruby
[22:49:59] ebbflowgo: has joined #ruby
[22:50:25] jdawgaz: has joined #ruby
[22:51:50] doddok: has joined #ruby
[22:52:28] bluOxigen: has joined #ruby
[22:54:08] zenspider: headius: ping. yt?
[22:54:09] ruurd: has joined #ruby
[22:55:11] ruurd: has joined #ruby
[22:55:18] RegulationD: has joined #ruby
[22:55:56] dotix: has joined #ruby
[22:56:14] bodik: norc: thank you for effort ;) i get to the channel buw but in meantime i've solved the issue with Thread...[name]="" and logger.formater ;)
[22:56:22] rgb-one: has joined #ruby
[22:56:24] _blizzy_: has joined #ruby
[22:57:07] karapetyan: has joined #ruby
[22:59:14] Rodya_: has joined #ruby
[22:59:37] Axsuul: has joined #ruby
[22:59:45] vdamewood: has joined #ruby
[23:00:00] sp4rrow: has joined #ruby
[23:03:22] jessemcgilallen: has joined #ruby
[23:04:01] charliesome: has joined #ruby
[23:04:46] baroquebobcat: has joined #ruby
[23:05:39] arthurix: has joined #ruby
[23:06:43] shevy: Hey Ox0dea have you ever seen a rogue exclamation character before?
[23:07:55] shum: has joined #ruby
[23:08:50] ebbflowgo: has joined #ruby
[23:09:36] exadeci: has joined #ruby
[23:10:29] stannard: has joined #ruby
[23:11:03] shevy: http://foxglovesecurity.com/2015/11/06/what-do-weblogic-websphere-jboss-jenkins-opennms-and-your-application-have-in-common-this-vulnerability/
[23:11:11] shevy: 'Further, if we read the output from "xxd" to see what was written to disk, we don?t see any trace of the rogue exclamation point!'
[23:11:17] shevy: damn those rogue characters
[23:12:43] Ox0dea: shevy: These exclamation points are going rogue! https://eval.in/457517
[23:13:08] Ox0dea: Shame about having to cap the iterations.
[23:13:37] Ox0dea: I wonder if it's been proved that Langton's ant never deviates once it gets on the highway.
[23:14:40] pu22l3r: has joined #ruby
[23:17:18] crdpink: has joined #ruby
[23:17:22] socialjackie: has joined #ruby
[23:17:24] riotjones: has joined #ruby
[23:20:13] arthurix_: has joined #ruby
[23:20:46] bruno-_: has joined #ruby
[23:24:34] goodcodeguy: has joined #ruby
[23:25:43] Yzguy: has joined #ruby
[23:33:03] lipoqil: has joined #ruby
[23:33:41] markfletcher: has joined #ruby
[23:34:48] to_json: has joined #ruby
[23:34:49] to_json: has joined #ruby
[23:37:28] aadam21: has joined #ruby
[23:38:17] ekinmur: has joined #ruby
[23:40:08] teclator: has joined #ruby
[23:40:52] platzhirsch: has joined #ruby
[23:40:59] socialjackie: has left #ruby: ("Leaving")
[23:41:29] mg^: How ironic is it that I managed to hang up the regexp engine matching a Larry Wall quote about backtracking?
[23:42:03] fgo: has joined #ruby
[23:44:58] Ox0dea: > fail Errno::EDOOFUS, 'You deserve this confusion.', caller
[23:45:04] armyriad: has joined #ruby
[23:45:07] hahuang65: has joined #ruby
[23:45:51] shinnya: has joined #ruby
[23:46:40] sp3: has joined #ruby
[23:47:59] jhass: mg^: 42 ironic
[23:49:05] TomPeed: has joined #ruby
[23:51:23] trosborn: has joined #ruby
[23:51:48] shock_one: has joined #ruby
[23:52:27] RegulationD: has joined #ruby
[23:53:14] mg^: Well, at least I figured out what particulars about the string it's getting locked up on
[23:55:28] rabbithole: has joined #ruby
[23:57:11] dotix: has joined #ruby
[23:59:10] Vile`: has joined #ruby
[23:59:21] Oog: has joined #ruby