« Back to channel list

#ruby - 02 February 2016

« Back 1 day Forward 1 day »
[00:01:59] arthropodado: has joined #ruby
[00:02:00] luckyme: has joined #ruby
[00:02:04] youch: has joined #ruby
[00:02:16] KensoDev: has joined #ruby
[00:02:36] chipotle: has joined #ruby
[00:03:34] baweaver: has joined #ruby
[00:04:37] b2zeldafreak: has joined #ruby
[00:08:09] shevy: let's see if http://rubular.com/ can help
[00:09:40] shevy: x = "abc <Bottom Page> yo there"; x.gsub!(/\s*<Bottom Page>.*/,'') # => "abc"
[00:09:43] shevy: probably goes even shorter than that
[00:09:52] shevy: http://rubular.com/r/YyLiBVl9rG
[00:11:04] grill: has joined #ruby
[00:12:17] mfb2: has joined #ruby
[00:14:53] elifoster: has joined #ruby
[00:16:03] sankaber: has joined #ruby
[00:16:19] zyzioziom: has joined #ruby
[00:18:04] tomaw: has joined #ruby
[00:24:03] pdoherty: has joined #ruby
[00:25:03] speakingcode: has joined #ruby
[00:26:04] bb010g: has joined #ruby
[00:26:26] kriskropd: has joined #ruby
[00:26:39] Mojo_Nixon: has joined #ruby
[00:28:54] Azure|dc: has joined #ruby
[00:30:09] shaileshg: has joined #ruby
[00:32:23] ur5us: has joined #ruby
[00:33:05] kirillzh: has joined #ruby
[00:33:09] baweaver: has joined #ruby
[00:38:00] LoneHerm_: has joined #ruby
[00:38:07] aupadhye: has joined #ruby
[00:39:48] kalopsian: has joined #ruby
[00:40:15] shevy: this page is kinda cool https://jekyllrb.com/docs/home/
[00:40:32] Musashi007: has joined #ruby
[00:40:34] shevy: I haven't before seen an "Improve this page" link like that
[00:41:01] shevy: would be even cooler to do all editing in the browser for everything!
[00:41:29] Ox0dea: Native is dead! Long live native!
[00:41:41] jazzonmymind: has joined #ruby
[00:43:28] Ox0dea: liblinux: https://lwn.net/Articles/662953/
[00:44:37] arlek: has joined #ruby
[00:44:39] chipotle: has joined #ruby
[00:45:12] sankaber: has joined #ruby
[00:46:07] k13nox_: has joined #ruby
[00:46:11] shevy: yeah that is kinda weird
[00:46:21] shevy: but then again it also sorta interconnects with a libruby for a RubyOS!!!
[00:46:46] slawrence00: has joined #ruby
[00:48:18] DLSteve: has joined #ruby
[00:48:30] shevy: I'd like to do a "VM all the things" memegenerator with either the dude with the beard or the apache indian http://cdn.meme.am/instances/62553668.jpg
[00:50:00] cjbottaro: has joined #ruby
[00:50:16] Ox0dea: Where is this dude with the beard?!
[00:52:59] shevy: let me try to find out his name... I know it's in some bloopers on youtube
[00:53:22] shevy: Anchorman bloopers!
[00:55:07] Ox0dea: Nobody in that film has a beard.
[00:55:09] moeabdol: has joined #ruby
[00:55:21] Ox0dea: They're all mustachioed.
[00:55:37] riceandbeans: what does this mean?
[00:56:04] riceandbeans: I've never seen def followed by symbols rather than a word
[00:56:34] riceandbeans: def [](keylist)
[00:56:56] akaiiro: has joined #ruby
[00:57:18] Ox0dea: riceandbeans: Those are just legal method names.
[00:57:31] Ox0dea: When you say `some_array[4]`, you're actually invoking the #[] method.
[00:58:24] Chachi: has joined #ruby
[00:58:49] riceandbeans: so you're not actually referencing the 5th member of the array, but using the number 4 as an argument to the [] method?
[00:58:56] Ox0dea: That's exactly right.
[00:59:03] Ox0dea: >> a = [1,2,3]; a.[](1)
[00:59:04] ruby[bot]: Ox0dea: # => 2 (https://eval.in/511471)
[00:59:57] ESpiney_: has joined #ruby
[00:59:58] Ox0dea: Ruby provides this syntactic sugar for the #[] and #[]= methods, and you don't have to use the dot for other symbolic method names like #<<.
[01:00:54] danielwzd: has joined #ruby
[01:00:57] k13nox: has joined #ruby
[01:01:04] riceandbeans: so what is << ?
[01:01:12] Ox0dea: The "shovel" operator.
[01:01:29] Ox0dea: You can define it however you wish, but it's generally meant to be used as a synonym for "push".
[01:01:31] kies^: has joined #ruby
[01:01:41] Ox0dea: >> a = [1,2,3]; a.push(4); a << 5; a
[01:01:42] ruby[bot]: Ox0dea: # => [1, 2, 3, 4, 5] (https://eval.in/511472)
[01:01:46] riceandbeans: like adding an element to an array
[01:02:03] riceandbeans: so this module is reimplementing basic array methods?
[01:02:18] Ox0dea: Maybe? I'm not omniscient.
[01:02:53] riceandbeans: there's a module from this code I'm looknig at
[01:02:55] _Tariq: has joined #ruby
[01:03:12] Ox0dea: I can't confirm.
[01:03:43] mikeiniowa: has joined #ruby
[01:05:21] ramfjord_: has joined #ruby
[01:07:35] Ox0dea: riceandbeans: Just to clarify, any object can have its own definition for #<<.
[01:07:54] cmckee: has joined #ruby
[01:07:56] kirillzh: has joined #ruby
[01:08:14] Ox0dea: It's roughly a synonym for #push on Array, but then it's also left shift for Integer.
[01:08:16] kirillzh: has joined #ruby
[01:08:27] sucks: has joined #ruby
[01:08:47] platzhirsch: has left #ruby: ()
[01:08:55] kirillzh: has joined #ruby
[01:08:55] cmckee: Im trying to refactor and move logive from view/controller to the model. Anyone free to look at my current code and point me in the right direction?
[01:08:56] cmckee: https://gist.github.com/cmckee-dev/c409b883d49540ba63c8
[01:09:32] Ox0dea: ?rails cmckee
[01:09:32] ruby[bot]: cmckee: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[01:10:20] cmckee: Yeah rails
[01:10:21] kirillzh_: has joined #ruby
[01:12:42] dopamean_: has joined #ruby
[01:13:03] Pharaoh2: has joined #ruby
[01:14:49] renancarvalho: has joined #ruby
[01:15:44] blackgoat: has joined #ruby
[01:17:02] ogpastal_: has joined #ruby
[01:21:16] renancarvalho1: has joined #ruby
[01:21:37] renancarvalho1: has left #ruby: ()
[01:22:01] nettoweb: has joined #ruby
[01:24:10] KensoDev: has joined #ruby
[01:24:28] ferr: has joined #ruby
[01:26:45] moeabdol1: has joined #ruby
[01:28:27] meves: has joined #ruby
[01:29:15] reaVer: has joined #ruby
[01:29:25] kalopsian: has joined #ruby
[01:29:43] mfb2: has joined #ruby
[01:30:23] zyzioziom: has joined #ruby
[01:31:17] dlitvak: has joined #ruby
[01:34:19] krobzaur_: has joined #ruby
[01:34:47] mfb2: has joined #ruby
[01:35:08] moss: has joined #ruby
[01:35:09] benlieb: has joined #ruby
[01:36:15] hxegon: has joined #ruby
[01:36:31] yoongkang: has joined #ruby
[01:37:23] aibot_: has joined #ruby
[01:41:32] Chachi: has joined #ruby
[01:43:00] sankaber: has joined #ruby
[01:43:37] oetjenj: has joined #ruby
[01:45:33] hinbody: has joined #ruby
[01:46:16] meves_: has joined #ruby
[01:47:47] Pintor: has joined #ruby
[01:50:16] Pintor: has joined #ruby
[01:50:40] Pintor: Hi :3 (again)
[01:51:52] luckyme: has joined #ruby
[01:51:56] Ox0dea: Hey, Pintor.
[01:52:27] Pintor: can you help me with a problem on a 2D hash? :c sorry hehe
[01:53:01] Pintor: I wrote something like this https://gist.github.com/anonymous/46615ab67eb065695de3
[01:53:12] Ox0dea: Seems fine.
[01:53:33] Pintor: My trouble is when I add "puts creatures['fiction']", don't shows the full array
[01:53:35] luckyme: has joined #ruby
[01:54:04] Ox0dea: How are you initializing `creatures`?
[01:54:11] jottr_: has joined #ruby
[01:54:26] govg: has joined #ruby
[01:54:28] Ox0dea: https://eval.in/511474
[01:54:48] Ox0dea: Everything looks good there, so your problem is in another castle.
[01:54:52] Pintor: oh, I need to use "p"?
[01:55:10] Ox0dea: For debug-printing, yeah.
[01:55:17] Ox0dea: Not for user-visible output, usually.
[01:55:43] Pintor: I need make it visible, now I got "nil" with "p" instead "puts"
[01:56:07] Ox0dea: Should be the other way around.
[01:56:30] Pintor: wait, check this
[01:56:30] ogpastaling: has joined #ruby
[01:57:07] Pintor: https://gist.github.com/anonymous/ee03bba4f84f81bb095d I am doing something like this
[01:57:20] Pintor: I don't put my code because has 1200 lines
[01:58:11] bronson: has joined #ruby
[01:58:16] Ox0dea: Thank you. :)
[01:58:19] Ox0dea: https://eval.in/511475
[01:58:36] yfeldblum: has joined #ruby
[01:59:04] Ox0dea: The standard input I provided is all the way down at the bottom.
[01:59:31] meves: has joined #ruby
[01:59:58] Pintor: ok, works in that example but in my code not, that's weird...
[02:00:25] Ox0dea: ??\_(???)_/??
[02:00:34] Pintor: well, I need to change some things, haha
[02:01:17] weemsledeux: has joined #ruby
[02:02:50] znz_jp: has joined #ruby
[02:05:13] kalopsia1: has joined #ruby
[02:05:59] rickmasta: has joined #ruby
[02:06:24] paradisaeidae: has joined #ruby
[02:06:39] arescorpio: has joined #ruby
[02:09:05] lessless: has joined #ruby
[02:10:35] Ox0dea: Is there any way other than #const_missing to have Foo::Bar be a method call?
[02:11:05] zacstewa_: has joined #ruby
[02:16:21] skcin7: has joined #ruby
[02:16:36] freerobby: has joined #ruby
[02:17:22] jackjackdripper: has joined #ruby
[02:18:58] kirillzh: has joined #ruby
[02:21:56] shevy: are you doing the evil again
[02:22:02] juddey: has joined #ruby
[02:24:02] Ox0dea: Not even! GCC is the right name for this method, but Foo.GCC looks weird.
[02:28:44] northfurr: has joined #ruby
[02:28:50] northfurr: has joined #ruby
[02:29:57] persistence: has joined #ruby
[02:31:01] hinbody: has joined #ruby
[02:31:16] betabet: has joined #ruby
[02:31:33] ramfjord: has joined #ruby
[02:32:29] pipework: Ox0dea: Foo::GCC isn't cool anymore.
[02:32:44] Ox0dea: I'm doing it.
[02:34:12] Ebok: has joined #ruby
[02:34:18] pwnd_nsfw`: has joined #ruby
[02:34:31] Ox0dea: >> '2edgy4u'.gsub /\d/, &:succ
[02:34:32] ruby[bot]: Ox0dea: # => "3edgy5u" (https://eval.in/511479)
[02:36:12] arthropodado: has joined #ruby
[02:37:21] yoongkang: has joined #ruby
[02:38:53] jackjackdripper1: has joined #ruby
[02:39:30] Alazoral: has joined #ruby
[02:39:39] droptone: Question: is this the correct syntax for increasing the timeout for RestClient to 100 seconds? response = RestClient::Request.execute(method: :get, url: "https://our.api.endpoint/api", timeout: 100, headers: {authorization: "#{account.auth_header}" })
[02:40:03] pizzaops: I have whta's probably a silly question. If I have class Foo::Bar::Baz and I want to write a module called Foo::Bar::Baz::New, is that possible, or once Baz is a class, you can't do that? Since I can't write module Foo; module Bar; module Baz; Module New, once Baz is already a class.
[02:40:38] Alazoral: pizzaops that should be totally doable, classes can have modules in
[02:41:38] Alazoral: you know, inside their scopes
[02:41:54] Rodya_: has joined #ruby
[02:43:14] Alazoral: your class is not called Foo::Bar::Baz, it's Baz in the scope of Bar in the scope of Foo
[02:43:46] baweaver: has joined #ruby
[02:43:49] Ox0dea: That's not quite right.
[02:43:57] Ox0dea: >> class Foo; class Bar; name end end
[02:43:58] ruby[bot]: Ox0dea: # => "Foo::Bar" (https://eval.in/511482)
[02:44:34] Alazoral: Ox0dea that's the equivalent of an absolute path though
[02:45:09] Ox0dea: Alazoral: What message do I send Foo::Bar to get it to return just "Bar"?
[02:45:10] pizzaops: Ox0dea: yeah I didn't type out all the code since typing all the ends doesn't add any information to my question :)
[02:46:13] Ebok: has joined #ruby
[02:47:32] ogpastaling: has joined #ruby
[02:47:38] at46: has joined #ruby
[02:47:42] Alazoral: Ox0dea conceptually, it's just like a file system; you can refer to sister modules in the same directory, and you can escape to 'root' with a prefixed ::
[02:49:04] cpup: has joined #ruby
[02:49:08] Ox0dea: Alazoral: I'm quite familiar with the notion of fully qualified names. I maintain that Foo:Bar's "name" (i.e., what it's called) is "Foo::Bar".
[02:49:41] arthropodado: has joined #ruby
[02:49:42] Alazoral: Ox0dea whoa hold on there buddy
[02:49:48] Alazoral: Ox0dea a name is what it's called
[02:50:03] Alazoral: Ox0dea called
[02:50:03] ruby-lang511: has joined #ruby
[02:50:34] Alazoral: Ox0dea called has a very specific definition in programming, and most of the time you would not use the fully qualified name to call
[02:50:57] Alazoral: Ox0dea people have fully qualified names but they are rarely called by them
[02:50:59] Ox0dea: Obfuscatory pedantry! My favorite kind.
[02:52:46] Ox0dea: Alazoral: Would you agree that there is a subtle but important difference between scope and hierarchy?
[02:53:42] al2o3-cr: has joined #ruby
[02:54:20] Alazoral: Ox0dea: Without making the context of that statement more concrete, I'm afraid not
[02:54:28] jackjackdripper: has joined #ruby
[02:55:30] Ox0dea: >> (Foo = Class.new).const_set(:Bar, Class.new); Foo.const_get(:Bar).name # Alazoral
[02:55:31] ruby[bot]: Ox0dea: # => "Foo::Bar" (https://eval.in/511483)
[02:55:59] Ox0dea: We never leave the top-level lexical scope there, and yet an obvious hierarchy has been constructed.
[02:56:47] Alazoral: in terms of lexical scope
[02:57:15] oetjenj: has joined #ruby
[02:57:50] Ox0dea: > your class is not called Foo::Bar::Baz, it's Baz in the scope of Bar in the scope of Foo
[02:58:08] Ox0dea: I said that that wasn't "quite right", but it's really just wrong.
[02:58:30] Alazoral: no, you can refer to Baz in the scope of Bar in the scope of Foo. it's exactly right
[02:58:48] Ox0dea: How do we ask a class what it's called?
[02:59:02] Alazoral: if i am inside module Baz and there is a module Bar in there, I can refer to it, to send it messages, by 'Bar'
[02:59:13] Ox0dea: Is that its name?
[02:59:15] Alazoral: because they share scope
[02:59:32] zyzioziom: has joined #ruby
[02:59:49] Alazoral: Did I use the word 'name'?
[03:01:46] Ox0dea: Constant resolution works by walking a hierarchy, not a scope chain; these are often (but hardly always) the same thing.
[03:02:10] Ox0dea: Using two notions to explain something where one would suffice is to be frowned upon.
[03:02:16] krobzaur_: has joined #ruby
[03:02:22] jottr_: has joined #ruby
[03:02:28] incite: has joined #ruby
[03:02:52] arthropodado: has joined #ruby
[03:03:48] Guest1834: has joined #ruby
[03:05:06] ogpastaling: has joined #ruby
[03:08:29] Alazoral: i fear you might be the pendant now. if i evaluate source which creates a module, inside the lexical scope of another module, the writer of that source cannot, at time of writing, know what their module will return 'name'. the only truth they have is a truth they define themselves. all they can depend on is the relative name. similarly, the declaration class Foo::Bar::Baz only asserts that Baz is a class. Foo and Bar could be classes or
[03:08:29] Alazoral: modules. It was this confusion I was trying to clear up, by explaining how I think about it.
[03:08:34] infernix: has joined #ruby
[03:09:11] KnownSyntax: has joined #ruby
[03:11:58] chipotle: has joined #ruby
[03:12:30] elifoster: has joined #ruby
[03:14:08] gidlf: has joined #ruby
[03:15:34] arthropodado: has joined #ruby
[03:16:38] paradisaeidae: has joined #ruby
[03:21:40] Brklyn: has joined #ruby
[03:24:40] supertylerc: has joined #ruby
[03:25:18] Bloomer: has joined #ruby
[03:27:05] B1n4r10: has joined #ruby
[03:27:46] Ox0dea: Alazoral: I appreciated the philosophical touch, but https://eval.in/511485 demonstrates that the writer can in fact act based on whose lexical scope they find themselves in.
[03:28:03] babblebre: has joined #ruby
[03:29:11] Alazoral: You misunderstand. During *writing* class C, there is no way to know its name.
[03:29:14] Ox0dea: You're right that lexical scope and constant resolution don't come apart quite so easily as I might have inadvertently insinuated, but they are most certainly different sides of the same token.
[03:29:16] Alazoral: other than C
[03:29:45] vishwa: has joined #ruby
[03:29:54] Ox0dea: Or by invoking #name...
[03:30:16] vishwa: Hey guys, I'm using this ruby AI gem called ai4r. requiring it works, but I want to import a class inside it called DataSet.
[03:30:28] vishwa: Whenever I import it, it calls undefined constant
[03:30:31] Alazoral: how do you invoke #name during writing?
[03:30:36] Alazoral: you seem obsessive about the results of a method, but methods are not truth in Ruby, because every method can change at any time.
[03:31:05] vishwa: I've tried defining it as ai4r::Data::Dataset (the complete definition), but this also spoouts an error - undefined ai4r
[03:31:13] vishwa: wtf is going on? :O
[03:31:29] Ox0dea: They nevertheless return what was true at the time they were invoked. I, for one, don't want my programs travelling in time.
[03:31:58] vishwa: http://pastebin.com/UaJv9vdF contains a few lines in IRB to explain the issue
[03:31:59] ruby[bot]: vishwa: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/c9a48a83ebf2117f9461
[03:31:59] ruby[bot]: vishwa: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[03:32:29] vishwa: Thanks ruby bot
[03:32:53] Ox0dea: vishwa: http://www.ai4r.org/rdoc/Ai4r/Data/DataSet.html
[03:33:11] Ox0dea: You've got to capitalize the namespace.
[03:33:12] Alazoral: i believe I proved you believe a paradox, Ox0dea. if the #name IS the real true name of the class, but the programmer cannot call it that and have it work under every circumstance, it cannot be the real true name.
[03:33:29] Ox0dea: Alazoral: Welcome to the inherent dynamism of computational systems.
[03:33:44] Alazoral: ruby has a ton of syntactic sugar. it's really important when learning it you learn what are the truths you can build on. #name is not one of them. the relative name, however, is.
[03:34:11] gidlf: has joined #ruby
[03:34:48] vishwa: Ox0dea: new error, unitialised constant Dataset
[03:34:54] Ox0dea: vishwa: More capitalization woes.
[03:34:57] vishwa: data_set = DataSet.new(:data_items=>$training, :data_labels=>$labels)
[03:35:22] vishwa: Do I need to say Data::DataSet?
[03:35:42] ruby[bot]: Why don't you try it and see for yourself?
[03:36:37] arup_r: has joined #ruby
[03:37:04] vishwa: I did, same error for that now lol
[03:37:16] bnagy: vishwa: playing around in irb is a good way to explore namespaces
[03:37:28] vishwa: yeah bro working on it
[03:37:33] Ox0dea: s/irb/pry/
[03:37:38] vishwa: that's how i narrowed it down
[03:37:53] bnagy: basically you just need to find some toplevel constant that actually exists :)
[03:38:12] bnagy: but it's can't be ai4r because that's lowercase (so can't be a constant)
[03:38:36] Ox0dea: >> Complex.constants false
[03:38:37] ruby[bot]: Ox0dea: # => [:compatible, :I] (https://eval.in/511486)
[03:38:45] Ox0dea: Checkmate, bnagy.
[03:38:51] krz: has joined #ruby
[03:39:29] bnagy: I'm actually completely fine with lying for didactic purposes
[03:39:53] x77686d: has joined #ruby
[03:41:06] vishwa: bnagy: if I have an array of numeric and non numeric values, how do I print all on one line?
[03:41:09] hxegon: has joined #ruby
[03:41:31] vishwa: i figured that out. Ai4r also need caps smh
[03:41:35] bnagy: about a dozen ways :\
[03:41:52] devbug: has joined #ruby
[03:42:52] bnagy: the first way that springs to mind is to turn it into one string and print that, eg with join
[03:43:05] vishwa: join is failing, that was my first idea too
[03:43:13] bnagy: but there's also interpolation, or just iterating the collection and using print not puts
[03:43:25] vishwa: undefined method join for 0:Fixnum
[03:43:55] bnagy: well a Fixnum is not an Array so maybe you're invoking join on the wrong thing
[03:44:09] bnagy: >> ['a', 3].join ' '
[03:44:11] ruby[bot]: bnagy: # => "a 3" (https://eval.in/511487)
[03:44:20] vishwa: huh well thanks
[03:44:50] baweaver: has joined #ruby
[03:45:07] workmad3: has joined #ruby
[03:47:53] zacts: evening rubyists
[03:48:57] mpistone: has joined #ruby
[03:50:19] benlakey_: has joined #ruby
[03:52:24] jbrhbr: has joined #ruby
[03:52:56] djbkd: has joined #ruby
[03:55:30] MyMind: has joined #ruby
[03:56:11] meves: has joined #ruby
[03:57:02] al2o3-cr: has joined #ruby
[03:59:30] terminalrecluse: has joined #ruby
[04:03:09] jottr_: has joined #ruby
[04:04:08] dcunit3d: has joined #ruby
[04:05:01] baweaver: has joined #ruby
[04:05:58] lemur: has joined #ruby
[04:07:42] peterevjan: has joined #ruby
[04:07:43] aupadhye: has joined #ruby
[04:08:10] peterevjan: if you do a "bundle install --without development" and then run a "bundle exec scriptname.rb" and get an error saying "could not find development-dependency-gemname", what are you doing wrong?
[04:08:26] danielwzd: has joined #ruby
[04:08:54] Ox0dea: Not installing the development dependencies when one or more of them is required to run scriptname.rb.
[04:09:09] ^CrYpto^: has joined #ruby
[04:09:34] Ox0dea: Close enough.
[04:09:41] Ox0dea: Consider mapping that to a key.
[04:10:49] techtomas: has joined #ruby
[04:11:05] cjbottaro: has joined #ruby
[04:12:37] Rodya_: has joined #ruby
[04:13:57] pawnbox: has joined #ruby
[04:15:21] ^CrYpto^: prints "Good Evening"
[04:16:12] braincrash: has joined #ruby
[04:20:11] atmosx: has joined #ruby
[04:21:08] cjbottaro: has joined #ruby
[04:21:11] peterevjan: turns out I didn't have the gems installed when I thought I did. duh
[04:21:17] gidlf: has joined #ruby
[04:21:23] peterevjan: Ox0dea: thanks!
[04:21:28] barhum2013: has joined #ruby
[04:21:41] Ox0dea: peterevjan: Derp. :P Happy to help.
[04:23:26] northfurr: has joined #ruby
[04:23:56] nofxx: >> p 'Good morning'
[04:23:57] nofxx: you can use only 'p' ... but it's #puts, not #print ... btw there's no bot here?
[04:23:58] ruby[bot]: nofxx: # => "Good morning" ...check link for more (https://eval.in/511489)
[04:24:46] nofxx: hehe, it's a lazy bot or I gained supercow powers? =D
[04:25:18] al2o3-cr: has joined #ruby
[04:25:24] zast: has joined #ruby
[04:26:19] Ox0dea: nofxx: Huh? #p, #puts, and #print are all different.
[04:26:21] Eiam_: has joined #ruby
[04:26:51] nofxx: Ox0dea, hmmm... p is #inspect, right?
[04:27:13] nofxx: yeah, thanks... forgot it
[04:27:54] hahuang61: has joined #ruby
[04:27:57] nofxx: ACTION hates when the #each block wants a |p| ... omg don't rename #p 
[04:28:01] bluOxigen: has joined #ruby
[04:29:03] nofxx: It's the only method with one letter?
[04:29:19] Ox0dea: nofxx: Rarely a problem, mind: https://eval.in/511491
[04:29:24] Ox0dea: Just a little confusing, at worst.
[04:30:01] Ox0dea: There's also String#b.
[04:30:07] nofxx: Ox0dea, didn't knew that, very cool! haha... but yeah, it's just OCD
[04:30:25] zyzioziom: has joined #ruby
[04:30:33] Ox0dea: Oh, and Numeric#i.
[04:30:38] Ox0dea: >> 3.14.i
[04:30:39] ruby[bot]: Ox0dea: # => (0+3.14i) (https://eval.in/511492)
[04:31:04] cjbottaro: has joined #ruby
[04:31:44] nofxx: That's very cool. I remeber #i from something now, but #b was first acquaintance
[04:32:51] Ox0dea: I didn't even know #i was a method until just now.
[04:33:10] Ox0dea: I knew you could make Complex literals by suffixing the i.
[04:33:41] DLSteve: has joined #ruby
[04:37:53] krz: has joined #ruby
[04:42:40] nickjj_: has joined #ruby
[04:44:34] at46: has joined #ruby
[04:45:24] sankaber: has joined #ruby
[04:46:04] gix: has joined #ruby
[04:46:07] JDiPierro: has joined #ruby
[04:54:53] betabet: has joined #ruby
[04:58:06] peterevjan: has joined #ruby
[05:00:52] aryaching: has joined #ruby
[05:01:25] barhum2013: has joined #ruby
[05:02:11] pawnbox: has joined #ruby
[05:02:48] rdark: has joined #ruby
[05:03:43] fedexo: has joined #ruby
[05:04:03] jottr_: has joined #ruby
[05:07:42] ftj: has joined #ruby
[05:07:50] ayonkhan: has joined #ruby
[05:09:20] dc1: has joined #ruby
[05:10:34] syk: has joined #ruby
[05:12:24] Ebok: has joined #ruby
[05:14:13] dc1: has joined #ruby
[05:15:42] arup_r: has joined #ruby
[05:17:52] tuelz1: has joined #ruby
[05:18:44] moeabdol: has joined #ruby
[05:21:27] PedramT: has joined #ruby
[05:24:43] nickjj: has joined #ruby
[05:24:49] benlieb_: has joined #ruby
[05:26:29] peterevjan: has joined #ruby
[05:26:44] supremekay: has joined #ruby
[05:26:49] supremekay: teach me ruby
[05:26:58] tvw: has joined #ruby
[05:28:16] PedramT: has joined #ruby
[05:30:14] hdfhdf: has joined #ruby
[05:32:41] Limix: has joined #ruby
[05:33:55] praveen: has joined #ruby
[05:35:42] aupadhye: has joined #ruby
[05:36:57] atmosx_laptop: has joined #ruby
[05:42:30] moeabdol1: has joined #ruby
[05:42:54] ramfjord: has joined #ruby
[05:43:12] Chachi: has joined #ruby
[05:43:26] Rodya_: has joined #ruby
[05:43:58] zacstewart: has joined #ruby
[05:44:17] Rodya_: has joined #ruby
[05:45:22] stevemackinnon: has joined #ruby
[05:46:55] supremekay: has joined #ruby
[05:47:44] baweaver: supremekay: what have you tried so far?
[05:49:24] paradisaeidae: has joined #ruby
[05:49:28] elifoster: has joined #ruby
[05:49:31] baweaver: depending on your experience in programming, the answers vary a lot, though by your question I'm guessing not much, so I would suggest tryruby
[05:51:18] Ox0dea: The most recently uploaded TED talk is about Ruby!
[05:51:25] Ox0dea: (Tangentially.)
[05:52:16] hdfhdf: has joined #ruby
[05:52:32] baweaver: Who is this ted, and why is he talking?
[05:53:51] peterevjan: has joined #ruby
[05:53:54] baweaver: Guess they don't want to learn ruby then.
[05:54:20] baweaver: ACTION closes the book of divine secrets
[05:56:31] djbkd: has joined #ruby
[05:57:17] lxsameer: has joined #ruby
[05:57:58] Ox0dea: I'm not convinced you don't know what TED is, but I'll bite: http://www.ted.com/talks/linda_liukas_a_delightful_way_to_teach_kids_about_computers
[06:00:03] zyzioziom: has joined #ruby
[06:00:04] Yeomra: has joined #ruby
[06:02:04] ziyadb: has joined #ruby
[06:04:53] jottr_: has joined #ruby
[06:06:01] arup_r: Well, when we convert say a Hash to Array, this is not called serialization. But when converting Hash to YAML/JSON, this process called serialization. What does this *serialization* mean actually ?
[06:07:13] zacstewart: has joined #ruby
[06:08:25] yeticry_: has joined #ruby
[06:09:04] zacts: arup_r: https://en.wikipedia.org/wiki/Serialization
[06:09:11] zacts: ^ don't know if this would be useful
[06:09:25] zacts: but it seemed like what you are asking to me, but I'm a newbie too
[06:09:30] Ox0dea: arup_r: The term "serialization" is meant to capture the idea that the data is intended to be transferred from one place to another.
[06:09:36] Ox0dea: Even if that just means from memory to disk.
[06:11:22] peterevjan: has joined #ruby
[06:11:43] rodfersou: has joined #ruby
[06:12:34] Kryptonic: has joined #ruby
[06:12:40] arup_r: Ox0dea: thanks. You definition is much closer to "Serialization is the process of converting an object into a stream of bytes in order to store the object or transmit it to memory, a database, or a file. Its main purpose is to save the state of an object in order to be able to recreate it when needed. The reverse process is called deserialization." and it seems, I get it why I did so many serialization in different projects..
[06:13:45] benlieb: has joined #ruby
[06:14:08] Ox0dea: arup_r: Yep, that's about the size of it. There's bound to be some kind of persistence layer in any application of even modest size.
[06:14:30] arup_r: https://msdn.microsoft.com/en-us/library/ms233843.aspx
[06:15:39] arup_r: Ox0dea: what you meant by the last line though ? Would you say more?
[06:17:04] dionysus69: has joined #ruby
[06:17:22] flughafen_: has joined #ruby
[06:18:09] Ox0dea: arup_r: RAM == memory for CPUs, serialization == memory for programs.
[06:18:23] Ox0dea: ACTION puts away his broadest brush.
[06:18:40] tuelz1: has joined #ruby
[06:18:59] arup_r: o i see now
[06:21:43] neanderslob: has joined #ruby
[06:23:11] devyn_: has joined #ruby
[06:23:51] sandstrom: has joined #ruby
[06:24:04] Brklyn: has joined #ruby
[06:24:10] william3: has joined #ruby
[06:25:41] yoongkang: has joined #ruby
[06:27:23] UtkarshRay: has joined #ruby
[06:28:43] moeabdol1: has joined #ruby
[06:29:29] peterevjan: has joined #ruby
[06:31:56] ur5us: has joined #ruby
[06:33:06] ur5us: has joined #ruby
[06:33:15] chouhoul_: has joined #ruby
[06:34:13] troulouliou_div2: has joined #ruby
[06:34:16] DoubleMalt: has joined #ruby
[06:34:47] IrishGringo: has joined #ruby
[06:35:35] mdw: has joined #ruby
[06:35:51] User458764: has joined #ruby
[06:38:06] krz: has joined #ruby
[06:39:28] anisha: has joined #ruby
[06:39:32] Alazoral: has joined #ruby
[06:43:28] workmad3: has joined #ruby
[06:52:58] baweaver: has joined #ruby
[06:53:16] claw: has joined #ruby
[06:55:39] karapetyan: has joined #ruby
[06:58:19] peterevjan: has joined #ruby
[06:59:45] codecop: has joined #ruby
[07:02:09] SOLDIERz: has joined #ruby
[07:02:49] followinfrared: has joined #ruby
[07:03:05] kerunaru: has joined #ruby
[07:03:17] ur5us: has joined #ruby
[07:03:46] nodejunkie: has joined #ruby
[07:04:17] zacstewa_: has joined #ruby
[07:05:01] gaiada: has joined #ruby
[07:06:43] symm-: has joined #ruby
[07:07:14] jottr_: has joined #ruby
[07:12:44] moeabdol1: has joined #ruby
[07:14:37] phredus: has joined #ruby
[07:14:42] adgtl: has joined #ruby
[07:14:47] IrishGringo: has joined #ruby
[07:16:59] scepticulous: has joined #ruby
[07:17:58] agit0: has joined #ruby
[07:18:43] anisha: has joined #ruby
[07:18:51] moeabdol: has joined #ruby
[07:19:24] tuelz1: has joined #ruby
[07:19:41] User458764: has joined #ruby
[07:19:51] Spami: has joined #ruby
[07:23:41] solars: has joined #ruby
[07:24:01] darkf: has joined #ruby
[07:24:08] ogpastaling: has joined #ruby
[07:24:43] aibot_: has joined #ruby
[07:24:52] pawnbox: has joined #ruby
[07:26:02] burgestrand: has joined #ruby
[07:26:15] musgravejw: has joined #ruby
[07:27:48] LoneHerm_: has joined #ruby
[07:32:25] stevemackinnon: has joined #ruby
[07:33:04] howdoi: has joined #ruby
[07:33:42] musgravejw: has joined #ruby
[07:33:49] weemsledeux: has joined #ruby
[07:37:24] bahar: has joined #ruby
[07:39:16] Brklyn: has joined #ruby
[07:40:02] chouhoulis: has joined #ruby
[07:43:24] firstdayonthejob: has joined #ruby
[07:43:40] yfeldblum: has joined #ruby
[07:44:34] aryaching: has joined #ruby
[07:44:44] ta: has joined #ruby
[07:45:41] arup_r: has joined #ruby
[07:46:22] zacstewart: has joined #ruby
[07:47:30] pawnbox: has joined #ruby
[07:47:31] oetjenj: has joined #ruby
[07:47:53] moeabdol: has joined #ruby
[07:48:00] ur5us: has joined #ruby
[07:49:01] toretore: has joined #ruby
[07:50:40] flaguy48: has joined #ruby
[07:52:40] arlek: has joined #ruby
[07:53:40] lipoqil: has joined #ruby
[07:54:08] skade: has joined #ruby
[07:55:06] al2o3-cr: has joined #ruby
[07:55:20] karapetyan: has joined #ruby
[07:56:17] djbkd: has joined #ruby
[07:56:34] djbkd: has joined #ruby
[07:58:19] karapetyan: has joined #ruby
[07:58:38] duncannz: has joined #ruby
[07:59:07] LoneHerm_: has joined #ruby
[07:59:14] baweaver: has joined #ruby
[08:00:02] arup_r: has joined #ruby
[08:00:24] skade: has joined #ruby
[08:01:14] aganov: has joined #ruby
[08:02:44] zyzioziom: has joined #ruby
[08:03:48] aryaching: has joined #ruby
[08:06:01] Voyage: has joined #ruby
[08:08:01] jottr_: has joined #ruby
[08:08:37] lessless: has joined #ruby
[08:09:18] lessless: folks, how to understand subscription operator in `class Products < ROM::Relation[:csv]`
[08:12:00] sandstrom: has joined #ruby
[08:12:34] tsunamie: has joined #ruby
[08:14:00] pawnbox_: has joined #ruby
[08:14:02] aufi: has joined #ruby
[08:14:33] Azulinho: has joined #ruby
[08:14:47] TomyWork: has joined #ruby
[08:15:15] TomyLobo2: has joined #ruby
[08:15:19] araujo_: has joined #ruby
[08:16:09] apeiros: lessless: you don't know inheritance?
[08:16:11] donnoc: has joined #ruby
[08:16:16] darkf: has joined #ruby
[08:16:30] apeiros: class A < B # <-- A inherits from B, B does not have to be a constant, it can be any expression returning a class
[08:17:42] zacstewart: has joined #ruby
[08:18:03] lsmola: has joined #ruby
[08:18:04] yoongkang: has joined #ruby
[08:18:58] lessless: apeiros, I didn't knew that B can expression
[08:19:00] Atomic_LduoX: has joined #ruby
[08:19:04] Macaveli: has joined #ruby
[08:19:18] huyderman: has joined #ruby
[08:19:50] mark2: has joined #ruby
[08:20:09] tuelz1: has joined #ruby
[08:20:57] karapetyan: has joined #ruby
[08:21:00] adgtl: has joined #ruby
[08:21:23] jbrhbr: has joined #ruby
[08:22:27] yoongkang: has joined #ruby
[08:22:27] Atomic_LduoX: has left #ruby: ()
[08:23:52] yoongkang: has left #ruby: ()
[08:24:08] neanderslob: has joined #ruby
[08:25:46] apeiros: lessless: there's very few places in ruby where an expression can't be used :)
[08:25:50] Cohedrin: has joined #ruby
[08:26:07] lessless: ok, I will take that into account
[08:26:47] grekko: has joined #ruby
[08:28:38] Brklyn: has joined #ruby
[08:28:43] Voyage: has left #ruby: ("Leaving")
[08:29:05] JaReAx: has joined #ruby
[08:29:09] ruby-lang064: has joined #ruby
[08:29:44] Dimik: has joined #ruby
[08:29:49] praveen: has joined #ruby
[08:30:48] jbrhbr: has joined #ruby
[08:31:54] einarj: has joined #ruby
[08:32:06] Polysics: has joined #ruby
[08:32:11] troulouliou_div2: has joined #ruby
[08:32:48] ruby-lang064: Hello, I have a time issue that has me scratching my head. I am recording time at various points during a program that takes about 10 minutes to run. I am basically recording time in a hash periodically using Time.new.to_s. The problem is that by the time my program finishes, all recorded timestamps are the current time at the end of the run. It's as if the hash stored the Time objects and 'puts'ing the time causes the object to
[08:33:20] karapetyan: has joined #ruby
[08:33:27] apeiros: ?code ruby-lang064
[08:33:27] ruby[bot]: ruby-lang064: We can't help you without your code, please post it to https://gist.github.com
[08:34:00] apeiros: also your message was cut at "causes the object to"
[08:34:59] Xeago: has joined #ruby
[08:35:59] lsmola: has joined #ruby
[08:36:28] ruby-lang064: Ah, okay. Creating a gist now. thanks. The end of the message was "causes the object to return #now rather than the strings."
[08:36:59] apeiros: even without having seen the code, I can tell you that that's not whats happening ;-)
[08:37:12] apeiros: also, why do you store strings instead of time objects?
[08:37:16] Macaveli: has joined #ruby
[08:37:48] sepp2k: has joined #ruby
[08:37:59] karapetyan: has joined #ruby
[08:38:38] mdw: has joined #ruby
[08:38:42] krz: has joined #ruby
[08:39:35] zyzioziom: has joined #ruby
[08:40:58] Emmanuel_Chanel: has joined #ruby
[08:41:07] chouhoulis: has joined #ruby
[08:41:11] mauricio: has joined #ruby
[08:41:50] snowy: has joined #ruby
[08:42:43] Snowy_: has joined #ruby
[08:46:19] ruby-lang064: I started with time objects, but then after my hash ended up with 4 identical time stamps, I thought the objects always returned current time or something.
[08:46:42] ruby-lang064: I thought string would be a sure fire way to guard against that hunch
[08:46:48] mdw: has joined #ruby
[08:52:21] ruby-lang064: Well, I can't seem to recreate the issue in a simple ruby file. I can't really post my actual code b/c it is for work. I will just keep digging. Thanks for your time!
[08:54:01] TomyWork: has joined #ruby
[08:54:45] al2o3-cr: has joined #ruby
[08:55:00] ruby-lang341: has joined #ruby
[08:56:24] donnoc: has joined #ruby
[08:57:39] PedramT: has joined #ruby
[09:02:06] solars: has joined #ruby
[09:02:16] bronson: has joined #ruby
[09:02:20] pandaant: has joined #ruby
[09:02:26] pawnbox: has joined #ruby
[09:03:11] fumk: has joined #ruby
[09:03:56] bruce_lee: has joined #ruby
[09:03:57] mondok: has joined #ruby
[09:05:44] rhg135: has joined #ruby
[09:06:26] blackgoat: has joined #ruby
[09:06:33] snowy: has joined #ruby
[09:07:52] OS-15951: has joined #ruby
[09:08:30] OS-15951: Does anyone know how one would pass a URL to a ruby program via ARGV and not have to put double quotes around it?
[09:08:45] yoongkang: has joined #ruby
[09:09:16] OS-15951: Example: ruby script.rb http://somesite.com/index.php?id=0&page=about
[09:09:38] OS-15951: Have that run without bash interpreting the & and other chars?
[09:10:28] burgestrand: Put single quotes around it. :)
[09:10:51] burgestrand: But no, that's shell behavior, not Ruby behavior. You could put it in a file and possibly pass that.
[09:11:39] OS-15951: I was hoping there was a way without quotes. I've seen some python programs do it
[09:12:41] burgestrand: OS-15951 which python program?
[09:12:44] caliostro: has joined #ruby
[09:13:12] c0m0: has joined #ruby
[09:13:28] OS-15951: sqlmap is one
[09:14:03] william3: has joined #ruby
[09:14:08] k13nox: has joined #ruby
[09:14:16] burgestrand: OS-15951 from its website the URLs are quoted in their examples.
[09:14:20] praveen: has joined #ruby
[09:15:36] OS-15951: Hmm. Weird. I swear I've used it without quotes before.
[09:15:41] OS-15951: Alright then. Thanks
[09:16:21] burgestrand: OS-15951 URLs don't necessarily need quotes, it's only if they contain characters that need to be escaped due to your shell.
[09:17:54] donnoc: has joined #ruby
[09:17:59] jamw: has joined #ruby
[09:18:20] TomyWork: has joined #ruby
[09:19:44] bmalum: has joined #ruby
[09:22:16] tuelz1: has joined #ruby
[09:23:16] sftrabbit: has joined #ruby
[09:23:33] hayden_: has joined #ruby
[09:24:01] enkristoffer: has joined #ruby
[09:24:07] Pumukel: has joined #ruby
[09:25:42] dcunit3d: has joined #ruby
[09:26:41] blaxter: has joined #ruby
[09:27:18] william3: has joined #ruby
[09:27:42] moeabdol1: has joined #ruby
[09:29:26] PedramT: has joined #ruby
[09:30:27] nodejunkie: has joined #ruby
[09:31:04] rdark: has joined #ruby
[09:31:14] jds: has joined #ruby
[09:31:36] anisha: has joined #ruby
[09:31:46] DirtyFInn: has joined #ruby
[09:31:47] jgt1: has joined #ruby
[09:32:01] lsmola_: has joined #ruby
[09:33:58] tomphp: has joined #ruby
[09:34:15] loechel: has joined #ruby
[09:34:54] chthon: has joined #ruby
[09:34:55] ur5us: has joined #ruby
[09:36:29] mauricio: has joined #ruby
[09:38:23] karapetyan: has joined #ruby
[09:38:31] dc1: has joined #ruby
[09:39:51] followin_: has joined #ruby
[09:41:53] chouhoulis: has joined #ruby
[09:43:02] workmad3: has joined #ruby
[09:46:23] shevy: OS-15951 I am pretty sure that this can not be done due to the shell
[09:46:27] Ishido: has joined #ruby
[09:47:28] shevy: when I input the gnome ftp, and select it in kde konsole http://ftp.gnome.org/pub/gnome/sources/?C=M;O=D it selects only up to "C=M" and stops there on the first click
[09:48:04] workmad3: has joined #ruby
[09:50:16] nettoweb: has joined #ruby
[09:51:32] evidex: has joined #ruby
[09:52:23] bruce__lee: has joined #ruby
[09:52:53] dmolina: has joined #ruby
[09:55:16] rickmasta: has joined #ruby
[09:55:35] shevy: let's dance \o/
[09:56:14] bruce__lee: has joined #ruby
[09:59:01] jaiks: has joined #ruby
[09:59:15] tsunamie: has joined #ruby
[09:59:37] platzhirsch: has joined #ruby
[09:59:41] blaxter: has joined #ruby
[10:01:18] Xeago: has joined #ruby
[10:02:45] mpistone: has joined #ruby
[10:02:52] vqrs: has joined #ruby
[10:08:58] pawnbox: has joined #ruby
[10:09:39] william3: has joined #ruby
[10:10:44] FernandoBasso: has joined #ruby
[10:12:16] Xeago: has joined #ruby
[10:12:24] govg: has joined #ruby
[10:13:12] blackms: has joined #ruby
[10:13:31] sftrabbit: has joined #ruby
[10:14:19] DaniG2k: has joined #ruby
[10:15:11] jaiks: has joined #ruby
[10:16:07] huyderman: has joined #ruby
[10:19:11] crissae: has joined #ruby
[10:22:43] pawnbox_: has joined #ruby
[10:22:56] tuelz1: has joined #ruby
[10:24:19] yeticry_: has joined #ruby
[10:26:53] yeticry_: has joined #ruby
[10:28:46] blackmes1: has joined #ruby
[10:30:00] tsunamie: has joined #ruby
[10:30:00] 92AACA3RA: has joined #ruby
[10:30:17] yeticry_: has joined #ruby
[10:30:18] mhoungbo: has joined #ruby
[10:30:41] dangerousdave: has joined #ruby
[10:30:43] arup_r: has joined #ruby
[10:31:08] DaniG2k: has joined #ruby
[10:31:17] Macaveli: has joined #ruby
[10:31:52] kwesidev: has joined #ruby
[10:32:53] karapetyan: has joined #ruby
[10:32:58] Azulinho: has joined #ruby
[10:33:40] baweaver: has joined #ruby
[10:34:01] kwesidev: has left #ruby: ()
[10:34:23] atmosx: has joined #ruby
[10:36:14] kwesidev: has joined #ruby
[10:37:00] PedramT: has joined #ruby
[10:37:41] anisha: has joined #ruby
[10:39:04] aufilab: has joined #ruby
[10:42:38] chouhoulis: has joined #ruby
[10:43:01] dangerousdave: Morning, why cant I insert a variable into a regexp please? https://gist.github.com/deathwishdave/ff4a5c814e1d4545b87c
[10:43:50] shevy: it should work
[10:43:55] shevy: perhaps the \ confuses things
[10:44:41] shevy: Here is proof that variable substitution works in regexp objects:
[10:44:42] burgestrand: has joined #ruby
[10:44:43] shevy: x = /abc/; 'hi there abc def'.gsub(/#{x}/, 'OK! ') # => "hi there OK! def"
[10:44:43] DoubleMalt: has joined #ruby
[10:45:07] ljarvis: dangerousdave: you're escaping the # so it's not interpolated
[10:45:16] followinfrared: has joined #ruby
[10:45:35] dangerousdave: so, can i escape the escape?
[10:45:50] ljarvis: well, this begs the question, do you need it?
[10:45:59] followinfrared: has joined #ruby
[10:46:15] dangerousdave: ljarvis: the #?
[10:46:19] ljarvis: you could just use File.extname(file)
[10:46:25] ljarvis: dangerousdave: no, the regexp altogether
[10:46:50] ljarvis: >> File.extname("foo.pdf")
[10:46:51] ruby[bot]: ljarvis: # => ".pdf" (https://eval.in/511723)
[10:47:32] ljarvis: so, matches << match if extensions.include?(File.extname(path))
[10:47:44] ljarvis: and make extensions/patterns a Set and not an array
[10:48:09] Trieste: has joined #ruby
[10:48:16] dangerousdave: ljarvis, the script I am writing will read in a .gitignore, and search a repository for ignored files and delete them
[10:48:21] jhass: ^ for the future what you wanted was #{Regexp.escape(pattern)}
[10:48:36] ljarvis: dangerousdave: ok but that's beside the point
[10:48:49] ljarvis: my point is why use regex for this
[10:49:07] jhass: &ri File#fnmatch @dangerousdave
[10:49:07] `derpy: No results
[10:49:10] dangerousdave: ljarvis, because thats what is in the .gitignore
[10:49:14] jhass: where was it again
[10:49:25] jhass: &ri File::fnmatch @dangerousdave
[10:49:25] `derpy: dangerousdave: http://ruby-doc.org/core-2.3.0/File.html#method-c-fnmatch
[10:49:25] FooMunki: has joined #ruby
[10:49:39] zacstewart: has joined #ruby
[10:50:00] Timba-as: has joined #ruby
[10:50:21] ElFerna_: has joined #ruby
[10:51:13] shellie_: I have an object resulting from YAML.load(<file>) which is of string type. I want to convert it into a hash, so that I can modify it and transform it back into yaml string and write it to the file. Any idea how to transform from string representation to hash? some people on the web claim you need to hash = YAML.parse(string) but that results in a Psych::Nodes::Document which I have no idea what the underlying type is
[10:51:18] dangerousdave: thanks for the help guys
[10:51:44] ljarvis: ?code shellie_
[10:51:44] ruby[bot]: shellie_: We can't help you without your code, please post it to https://gist.github.com
[10:52:11] jhass: shellie_: wild guess: YAML.load_file(<file>) instead of YAML.load(<file>)
[10:52:27] shellie_: jhass: I'm using the latter
[10:52:38] jhass: you wrote the earlier
[10:52:38] shellie_: let me look again
[10:53:04] shellie_: oops, yeah, I'm using the load_file
[10:53:20] jhass: then what ljarvis said
[10:53:24] jhass: it should return a hash
[10:54:17] followinfrared: has joined #ruby
[10:55:25] shellie_: my code is a little entwined. I'll try to write a simple example that replicates the behaviour
[10:56:11] Kryptonical: has joined #ruby
[10:56:25] shellie_: btw, is there any semantical difference about calling YAML::load_file vs YAML.load_file ?
[10:56:49] JaReAx: has joined #ruby
[10:56:49] jhass: no, use the latter
[10:58:16] baweaver: has joined #ruby
[10:58:35] snowy: has joined #ruby
[10:58:55] phredus: has joined #ruby
[10:59:03] marr: has joined #ruby
[10:59:24] binaryplease: has joined #ruby
[11:01:02] barhum2013: has joined #ruby
[11:01:29] snowy: has joined #ruby
[11:02:54] PedramT: has joined #ruby
[11:03:48] fsapo: has joined #ruby
[11:04:44] vondruch: has joined #ruby
[11:06:49] jgt1: has joined #ruby
[11:07:07] Axy: has joined #ruby
[11:11:31] karapetyan: has joined #ruby
[11:12:05] k13nox: has joined #ruby
[11:12:34] dlitvak: has joined #ruby
[11:13:34] shellie_: here https://gist.github.com/nihilistidealist/598ae8afc24a73ea880a
[11:14:17] betabet: has joined #ruby
[11:14:25] jhass: shellie_: could you edit it and choose foo.rb as filename?
[11:15:17] jhass: and take out the ``` mess
[11:15:33] jhass: and maybe add error messages/wrong behavior description or make it runnable
[11:15:35] apeiros: shellie_: YAML.load_file already parses the data
[11:15:58] apeiros: there's no point in doing YAML.parse(YAML.load_file(path))
[11:16:03] apeiros: which is what you essentially do.
[11:16:11] shellie_: this works fine if the file is empty or does not exist, but the next run it does not work :)
[11:16:18] apeiros: same thing for the double dumping
[11:16:20] apeiros: that's silly
[11:16:34] apeiros: YAML.dump(data.to_yaml, fd) # either drop the to_yaml or use File.write
[11:16:51] jhass: ^ you dump the yaml as yaml string
[11:17:13] jhass: basically you double serialize it
[11:17:18] Brklyn: has joined #ruby
[11:17:19] jhass: and unserialize it once
[11:17:23] apeiros: and YAML.parse is if you want full control over the parsing. YAML.load if you don't need that (which is the 99% case)
[11:17:36] jhass: creating the empty file feels a bit stupid too tbh
[11:17:48] jhass: just return an empty hash
[11:17:49] shellie_: why does it feel stupid?
[11:18:06] User458764: has joined #ruby
[11:18:29] apeiros: data = file_load # --> data = File.exist?($db) ? YAML.load_file($db) : {}
[11:18:33] jhass: def load_db(path); File.exists?(path) ? YAML.load_file(path) : {}; end
[11:18:39] jhass: bah, too slow
[11:18:44] apeiros: or yeah, keep it in the method
[11:18:49] jamw: has joined #ruby
[11:19:02] apeiros: also writing "---" into a file: File.write(path, "---")
[11:19:05] shellie_: let me adapt
[11:19:17] jhass: and given your naming you might find YAML::DBM interesting
[11:19:19] apeiros: aaaand last but not least: use File.open with block-form.
[11:19:32] jhass: ^ or File.read/File.write
[11:19:58] apeiros: that's what I suggested first ;-)
[11:20:49] apeiros: basically those 31 lines of code could be reduced to ~9
[11:22:11] shellie_: apeiros: what is meant by block form?
[11:22:31] apeiros: File.open(path, 'w') do |fh| fh.puts("---") end
[11:22:38] apeiros: this is block form. less ways to fuck up.
[11:23:01] shellie_: I'm removing the empty file creation
[11:23:33] shellie_: the only thing is, the file_load is now returning a yaml formated in a string (if file exists) or a hash. How can I make both result in a hash?
[11:23:41] tuelz1: has joined #ruby
[11:24:33] apeiros: if it is returning a yaml string, then it means you still have double serialization
[11:24:49] apeiros: it means you've written the file wrongly. don't fix the symptom. fix the cause.
[11:25:56] zacstewart: has joined #ruby
[11:27:18] apeiros: bit more than 9 lines because I made it a proper class: https://gist.github.com/apeiros/a921375e8c92188c7973
[11:27:31] pawnbox: has joined #ruby
[11:27:42] apeiros: whoops, had path in it which should have been @db.
[11:28:25] howdoi: has joined #ruby
[11:29:20] praveen: has joined #ruby
[11:30:23] shellie_: I see. I made the assumption load_file returned a string (I can't remember why I thought that was the case) but it does return a hash
[11:34:45] baweaver: has joined #ruby
[11:36:05] dionysus69: has joined #ruby
[11:37:52] praveen: has joined #ruby
[11:38:06] shellie_: all working now, thanks for your help jhass and apeiros
[11:38:28] phredus: has joined #ruby
[11:38:48] dEPy: has joined #ruby
[11:39:29] Mia: has joined #ruby
[11:39:29] Mia: has joined #ruby
[11:40:06] govg: has joined #ruby
[11:40:12] dlitvak: has joined #ruby
[11:41:07] tsunamie: has joined #ruby
[11:41:55] yoongkang: has joined #ruby
[11:42:37] snowy: has joined #ruby
[11:43:10] kerunaru: has joined #ruby
[11:43:25] k13nox: has joined #ruby
[11:43:25] chouhoulis: has joined #ruby
[11:44:32] shevy: they make broken things work again
[11:47:22] dlitvak_: has joined #ruby
[11:49:25] nobitanobi: has joined #ruby
[11:50:58] Xeago: has joined #ruby
[11:51:12] c355E3B: has joined #ruby
[11:52:01] nobitanobi: Do you guys see a good way to avoid repeating myself in here: https://gist.github.com/novito/3efb0bb8fc3e6fa5c176 - I define as many attr_accessor as instance variables the class has, so maybe some metaprogramming would help, but I'm unsure how.
[11:52:34] evidex: has joined #ruby
[11:52:35] printf: has joined #ruby
[11:53:03] iateadonut1: has joined #ruby
[11:53:50] workmad3: nobitanobi: you could rewrite your create_user as `update_user(User.new)` and re-use that code
[11:53:59] govg: has joined #ruby
[11:54:52] nobitanobi: workmad3: good call!
[11:55:14] workmad3: nobitanobi: you could also consider having an array like `FIELDS = %i(name phone_number address1 address2)` at the top of your class, then you can do `attr_accessor *FIELDS` and `FIELDS.each { |field| user[field] = send(field) }` inside your update
[11:55:53] nobitanobi: workmad3: I think that's what I am looking for.
[11:55:56] nobitanobi: Let me try that
[11:56:20] Patrezze: has joined #ruby
[11:56:20] devgiant: has joined #ruby
[11:56:46] workmad3: nobitanobi: you could also consider having your form take a user on initialize, and then you could delegate accessors and setters to the user
[11:56:59] ogpastaling: has joined #ruby
[11:57:20] kaka__: has joined #ruby
[11:57:40] Shaboum: has joined #ruby
[11:57:45] nobitanobi: workmad3: mmm that's an interesting approach
[11:57:52] nobitanobi: I'm pretty new to this form pattern :)
[11:58:27] bauruine: has joined #ruby
[11:58:49] arian0n: has joined #ruby
[11:59:23] binaryplease: has joined #ruby
[12:00:15] Timba-as: has joined #ruby
[12:01:48] PedramT: has joined #ruby
[12:02:27] krz: has joined #ruby
[12:03:12] tsunamie: has joined #ruby
[12:06:41] Brklyn: has joined #ruby
[12:07:42] andikr: has joined #ruby
[12:07:57] sftrabbit: has joined #ruby
[12:08:12] bmalum: has joined #ruby
[12:09:18] CalydOn: has joined #ruby
[12:09:22] Xeago: has joined #ruby
[12:10:29] ElFerna_: has joined #ruby
[12:10:30] adgtl: has joined #ruby
[12:13:26] nobitanobi: workmad3: how could I do product.field = send(field) instead of product[field] = send(field)? One of the attributes is not a direct column, but an association. If I do product[field] it complains that it can't write unknown attribute
[12:14:04] workmad3: nobitanobi: product.send("#{field}=", send(field))
[12:14:19] workmad3: (it's uglier, which is why I went for the [] version :) )
[12:14:20] zacstewa_: has joined #ruby
[12:14:28] nobitanobi: workmad3: thanks.
[12:17:36] pawnbox: has joined #ruby
[12:17:56] dlitvak: has joined #ruby
[12:18:14] Ebok: has joined #ruby
[12:21:22] devgiant: has joined #ruby
[12:21:48] sftrabbit: has joined #ruby
[12:24:26] tuelz1: has joined #ruby
[12:24:47] meinside_: has joined #ruby
[12:26:39] snowy: has joined #ruby
[12:26:42] nobitanobi: workmad3: works like a charm. txs
[12:27:38] blackmes1: has joined #ruby
[12:27:54] platzhirsch: has joined #ruby
[12:28:13] vqrs: has joined #ruby
[12:28:19] vondruch: has joined #ruby
[12:29:48] snowy: has joined #ruby
[12:30:25] DoubleMalt: has joined #ruby
[12:30:32] kalopsian: has joined #ruby
[12:30:56] snowy: has joined #ruby
[12:31:52] Meow-J: has joined #ruby
[12:32:04] bmalum: has joined #ruby
[12:32:57] einarj_: has joined #ruby
[12:32:57] AccordsLTN: has joined #ruby
[12:33:01] PedramT: has joined #ruby
[12:33:46] solars: has joined #ruby
[12:34:02] dc4: has joined #ruby
[12:34:02] platzhirsch: has left #ruby: ()
[12:34:16] mrsolow: has joined #ruby
[12:34:43] bahar: has joined #ruby
[12:34:58] benlakey_: has joined #ruby
[12:34:59] flaguy481: has joined #ruby
[12:35:09] Kero_: has joined #ruby
[12:35:48] kalopsian: has joined #ruby
[12:36:07] bruce__lee: has joined #ruby
[12:36:18] bove_: has joined #ruby
[12:36:23] Timba-as_: has joined #ruby
[12:36:24] Xeago: has joined #ruby
[12:36:42] crank1988_: has joined #ruby
[12:37:03] ICantCook: has joined #ruby
[12:37:09] LoganG_: has joined #ruby
[12:37:17] amitchellbullard: has joined #ruby
[12:37:19] sdothum: has joined #ruby
[12:37:34] bruce__lee: has joined #ruby
[12:37:35] rfv: has joined #ruby
[12:37:37] cbednarski: has joined #ruby
[12:37:40] A124: has joined #ruby
[12:37:57] Affix: has joined #ruby
[12:38:36] gnarld_: has joined #ruby
[12:38:37] AdamMeghji: has joined #ruby
[12:38:45] Lloyd: has joined #ruby
[12:38:51] lancetw: has joined #ruby
[12:39:10] JoL1hAHN: has joined #ruby
[12:39:10] Radar: has joined #ruby
[12:39:12] gagrio: has joined #ruby
[12:39:14] bigkevmcd: has joined #ruby
[12:39:22] FooMunki: has joined #ruby
[12:39:37] Guest4184_____: has joined #ruby
[12:40:36] jottr_: has joined #ruby
[12:40:59] burgestrand: has joined #ruby
[12:42:39] PedramT: has joined #ruby
[12:43:26] persistence: has joined #ruby
[12:44:08] chouhoulis: has joined #ruby
[12:44:20] bauruine: has joined #ruby
[12:45:34] IrishGringo: has joined #ruby
[12:45:53] praveen__: has joined #ruby
[12:46:50] mickey_mouse: has joined #ruby
[12:47:46] blackmesa: has joined #ruby
[12:48:30] ferr: has joined #ruby
[12:50:13] icbm: has joined #ruby
[12:51:30] devgiant: has joined #ruby
[12:51:38] arthropododo: has joined #ruby
[12:52:05] f4cl3y: has joined #ruby
[12:52:32] yardenbar: has joined #ruby
[12:52:46] tsunamie: has joined #ruby
[12:56:53] mondok: has joined #ruby
[12:57:40] flughafen_: has joined #ruby
[12:57:54] bauruine: has joined #ruby
[12:59:30] tomphp: has joined #ruby
[13:00:17] codecop: has joined #ruby
[13:01:10] vqrs: has joined #ruby
[13:01:19] karapetyan: has joined #ruby
[13:04:05] bronson: has joined #ruby
[13:04:14] gregf: has joined #ruby
[13:07:21] zacstewart: has joined #ruby
[13:09:16] mdw: has joined #ruby
[13:10:14] dlitvak: has joined #ruby
[13:10:19] ElFerna_: has joined #ruby
[13:11:44] arup_r: has joined #ruby
[13:13:12] bauruine: has joined #ruby
[13:15:13] synthroid: has joined #ruby
[13:17:05] sankaber: has joined #ruby
[13:19:35] jamw: has joined #ruby
[13:19:44] solars: quick question: I'm requiring a file that definines a class, somehow right below this require, the class is not recognized - can anyone tell me how to debug this?
[13:20:39] saush: has joined #ruby
[13:21:23] saush: Are GSOC 2016 ideas for ruby organization out?
[13:22:05] blasius: has joined #ruby
[13:22:10] k13nox: has joined #ruby
[13:24:12] rickmasta: has joined #ruby
[13:24:41] vqrs: has joined #ruby
[13:24:48] tsunamie: has joined #ruby
[13:24:48] 92AACA3RA: has joined #ruby
[13:25:00] malconis: has joined #ruby
[13:25:09] tuelz1: has joined #ruby
[13:25:16] User458764: has joined #ruby
[13:25:59] malconis: has joined #ruby
[13:26:35] CloCkWeRX: has joined #ruby
[13:26:40] DEA7TH: has joined #ruby
[13:26:43] saush: Are GSOC 2016 ideas for ruby organization out?
[13:27:43] Lochez: has joined #ruby
[13:28:15] SCHAAP137: has joined #ruby
[13:29:02] hxegon: has joined #ruby
[13:29:23] apeiros: solars: how do you figure it is "not recognized"?
[13:30:07] apeiros: solars: a) make sure the file you think is being required is actually the one which is required, b) make sure you're correctly setting and referencing the constant
[13:30:15] ZoffixW: has joined #ruby
[13:32:29] Abrin: has joined #ruby
[13:32:35] burgestrand: has joined #ruby
[13:36:42] duckpuppy: has joined #ruby
[13:37:42] anisha: has joined #ruby
[13:37:56] solars: apeiros, did another test, the file is called Reservation.rb, I'm using require BASE_PATH + 'lib/Reservation' require returns false in the debugger. if I rename the file to Test.rb, it works. I can also require it multiple times (I thought it might be because it is already loaded)
[13:38:04] solars: I'm not sure how to find out why it returns false
[13:39:39] apeiros: require returning false is not an error. it means it's already loaded.
[13:40:03] geekbri: has joined #ruby
[13:40:05] apeiros: if it couldn't require the file, you'd get an exception, not just a mere return value. this isn't C ;-p
[13:41:00] apeiros: you still haven't answered my initial question, though.
[13:41:04] solars: why can I rename it then and require multiple times?
[13:41:10] Abrin: has joined #ruby
[13:41:28] solars: apeiros, well I'm requiring it, it contains a class ResGlobalInfo definition
[13:41:43] solars: and then try to access the class constant ResGlobalInfo, which is not found
[13:41:50] solars: in a pry console
[13:42:02] apeiros: "which is not found" - *always* copy & paste the precise exception
[13:42:05] solars: it could be that it is loaded in a different namespace or module, but I'm no tsure
[13:42:17] apeiros: you wouldn't be the first to badly retell an exception.
[13:42:41] solars: apeiros, NameError: uninitialized constant ResGlobalInfo
[13:42:50] solars: so the class is loaded, but where..
[13:43:59] apeiros: how did you ensure it required the correct file?
[13:44:53] chouhoulis: has joined #ruby
[13:44:54] apeiros: given that "it works" when you rename it leads me to believe that there's another file being loaded when you require it as Reservation
[13:45:05] solars: the path is right and if I rename the filename to an unloaded copy of the file, it works
[13:45:09] apeiros: (also, why the heck does Reservation define ResGlobalInfo???)
[13:45:14] supremekay: has joined #ruby
[13:45:34] solars: apeiros, it's an older project full of happymapper (gem) classes for a XML structure, legacy code
[13:48:19] apeiros: the path is right - you mean you're using an absolute path?
[13:48:59] apeiros: (anti pattern btw.)
[13:49:25] solars: I did not write the code, I just have to find that class as a first step :)
[13:49:43] solars: the BASE_PATH uses File.dirname, yes
[13:50:22] devgiant: has joined #ruby
[13:51:39] apeiros: File.dirname doesn't create an absolute path
[13:52:16] solars: BASE_PATH = File.dirname(__FILE__)+'/'
[13:52:31] solars: I tried to find the constant ResGlobalInfo in Object.constants, but it's not there
[13:52:46] apeiros: __FILE__ isn't necessarily absolute either
[13:52:48] solars: apeiros, if I output the path that is used, it's absolute and I can cat the file
[13:53:01] apeiros: so instead of assuming it is an absolute path - how about making sure by printing it?
[13:53:02] shevy: cat the file, dog the path!
[13:53:13] solars: apeiros, I did
[13:53:16] apeiros: you could have said that right away :-p
[13:54:27] burgestrand: has joined #ruby
[13:54:44] apeiros: well, got to go to a meeting. pretty sure there's some tiny silly thing missing in this puzzle.
[13:55:07] burgestrand: has joined #ruby
[13:55:26] apeiros: I suggest for others to continue help, you gist the contents of that Reservation.rb file.
[13:55:27] solars: I have no idea how to find out why require returns false if the constant is not in Object.constants
[13:55:44] apeiros: again, require returning false only means *the file* has already been required
[13:55:47] praveen: has joined #ruby
[13:55:50] apeiros: nothing else
[13:55:58] apeiros: it has no relation to the contents or anything
[13:56:54] Chau: has joined #ruby
[13:57:32] mfb2: has joined #ruby
[13:58:17] solars: what could be the reason that the class is not available then?
[13:59:05] adgtl: has joined #ruby
[13:59:21] shevy: it's not installed or could not be found
[13:59:43] ramortegui: has joined #ruby
[13:59:59] dlitvak: has joined #ruby
[14:00:15] solars: installed?
[14:00:29] shevy: yeah, like if you would install a gem
[14:01:11] binaryplease: has joined #ruby
[14:01:19] solars: it's a class definition inside a file
[14:01:29] shevy: then if you load that file, it will be available. there is no alternative
[14:01:59] meves: has joined #ruby
[14:02:52] solars: apparently there is :)
[14:03:04] tesuji: has joined #ruby
[14:03:25] shevy: it works the same way for all my .rb files
[14:03:38] blasius: has joined #ruby
[14:04:04] dtordable: has left #ruby: ()
[14:04:04] truenito: has joined #ruby
[14:04:35] burgestrand: Like, small reproducible examples.
[14:04:37] solars: there seems to be something that screws up the loading, the file contains: https://gist.github.com/solars/d2d8bc56dcfa2aaff069
[14:04:40] solars: A is printed, B is not
[14:04:43] makenoise: has joined #ruby
[14:04:59] praveen: has joined #ruby
[14:05:03] burgestrand: solars you have something swallowing errors?
[14:05:36] shevy: solars are you sure that all the files are required?
[14:05:40] burgestrand: Om nom nom nom.
[14:05:45] shevy: make more debug statements to find out which file is the culprit
[14:05:55] solars: ok that seems to be a circular dependency I just added, nevermind
[14:05:57] solars: now both print
[14:06:12] burgestrand: If you run ruby with -d, you will see all errors being thrown regardless if they are being caught or not. :)
[14:07:56] cdg: has joined #ruby
[14:08:17] cdg: has joined #ruby
[14:08:30] CustosLimen: so I want to change some things here: https://github.com/gjtorikian/mathematical
[14:08:38] CustosLimen: so I git cloned it - and did bundle install
[14:09:30] CustosLimen: and when I run rake it fails
[14:09:34] CustosLimen: not sure what to do
[14:09:59] burgestrand: CustosLimen fails how? Can you show the output?
[14:10:09] yonatankoren: has joined #ruby
[14:10:17] shevy: it is a native gem
[14:10:32] CustosLimen: Burgestrand, https://bpaste.net/show/0ef5516897e1
[14:10:40] CustosLimen: shevy, I actually want to make the native code work
[14:10:42] CustosLimen: cos it does not
[14:10:43] meves: has joined #ruby
[14:10:58] burgestrand: CustosLimen try `rake compile`
[14:11:34] shevy: hmm the gem hangs during ri installation
[14:11:43] ElFerna_: has joined #ruby
[14:12:06] aufi: has joined #ruby
[14:12:23] CustosLimen: Burgestrand, it seems better: https://bpaste.net/show/e74e3216b240
[14:12:28] shevy: require 'mathematical'
[14:12:28] shevy: LoadError: incompatible library version - /Programs/Ruby/2.3.0/lib/ruby/gems/2.3.0/gems/mathematical-1.5.12/lib/mathematical/mathematical.so
[14:12:29] Bloomer: has joined #ruby
[14:12:33] CustosLimen: but this is not really what happens when I do gem install
[14:12:34] sgambino: has joined #ruby
[14:12:37] karapetyan: has joined #ruby
[14:12:54] burgestrand: CustosLimen there's instructions here: https://github.com/gjtorikian/mathematical#building
[14:12:58] Mr0rris0: has joined #ruby
[14:13:05] shevy: /var/opt/disk000/projects/github.com/gjtorikian/mathematical/ext/mathematical/lasem_overrides.c:5:22: fatal error: mtex2MML.h: No such file or directory
[14:13:08] burgestrand: CustosLimen it appears you need to follow them if you want to develop on it
[14:13:10] shevy: yeah you already miss some header files CustosLimen
[14:13:57] shevy: I can't get it to work either
[14:14:14] william3: has joined #ruby
[14:14:32] shevy: require 'mathematical'
[14:14:32] shevy: LoadError: cannot load such file -- mathematical/mathematical
[14:14:51] CustosLimen: wait, when I do gem install mathematical I get this: https://bpaste.net/show/baa6f2ec5ded
[14:16:27] CustosLimen: Thanks for pointing that out to me Burgestrand - but I'm expecting to be able to somehow do local install of gem
[14:16:42] jaiks: has joined #ruby
[14:16:45] shevy: environment.c:(.text+0x1c5f): undefined reference to `ceil'
[14:16:46] bmalum: has joined #ruby
[14:16:51] CustosLimen: like with pip I do pip3 install --user --editable .
[14:17:04] tsunamie: has joined #ruby
[14:17:12] william3: has joined #ruby
[14:17:13] adgtl: has joined #ruby
[14:17:18] CustosLimen: shevy, I know, and I want to fix it - but I want the same as `gem install mathematical` just from git
[14:17:31] CustosLimen: or from local checked out git rather
[14:17:36] CustosLimen: I'm a noob at ruby
[14:19:35] blackmesa: has joined #ruby
[14:19:44] TomPeed: has joined #ruby
[14:19:56] Channel6: has joined #ruby
[14:20:14] freerobby: has joined #ruby
[14:21:14] shevy: I don't know
[14:21:22] shevy: if you ask me, the gem is crap and the code is crap
[14:21:32] krobzaur_: has joined #ruby
[14:21:43] shevy: nokogiri works without a fuzz and many other native gems that I compile here, work too
[14:21:54] shevy: like ruby-gnome bindings
[14:22:15] AimlessRAven: has joined #ruby
[14:22:19] PedramT: has joined #ruby
[14:22:30] devgiant: has joined #ruby
[14:25:34] JDiPierro: has joined #ruby
[14:25:55] tuelz1: has joined #ruby
[14:26:20] zast: has joined #ruby
[14:26:29] atomical: has joined #ruby
[14:26:30] burgestrand: CustosLimen you can point bundler towards git repositories, or a local path, or a mix of the two.
[14:26:40] hinbody_: has joined #ruby
[14:26:47] snowy: has joined #ruby
[14:26:47] burgestrand: CustosLimen http://bundler.io/v1.11/git.html
[14:27:21] aef: has joined #ruby
[14:27:40] CustosLimen: Burgestrand, can I point gem utility to local path like in `pip install --user .`
[14:28:05] praveen: has joined #ruby
[14:28:30] aegis3121: has joined #ruby
[14:29:19] burgestrand: CustosLimen if you have a packaged .gem-file, you can `gem install ./path/to/mygem.gem`
[14:29:44] burgestrand: CustosLimen but I don't understand what `pip install --user` is different from.
[14:30:17] burgestrand: CustosLimen ah, there's a dot there, no, gems needs to be built, using `gem build`, and then you will have a .gem-file that can be uploaded to rubygems or installed.
[14:30:23] CustosLimen: Burgestrand, ok cool, thanks `pip install --user .` will just install the python package in current directory (e.g. from cloned git)
[14:30:38] CustosLimen: Burgestrand, ok cool, I get it now
[14:31:04] burgestrand: CustosLimen you point `gem build mypackage.gemspec` and you will get your package out from it.
[14:31:28] ftj: has joined #ruby
[14:33:43] tekk: has joined #ruby
[14:34:04] CustosLimen: ugh ok, let me just drop this think, its insanely weird - not sure its worth using
[14:34:25] antgel: has joined #ruby
[14:34:47] griffindy: has joined #ruby
[14:35:26] bkxd: has joined #ruby
[14:36:12] treehug88: has joined #ruby
[14:37:38] platzhirsch: has joined #ruby
[14:38:07] stannard: has joined #ruby
[14:38:10] lipoqil: has joined #ruby
[14:39:06] adgtl: has joined #ruby
[14:40:00] mary5030: has joined #ruby
[14:40:57] tomphp: has joined #ruby
[14:41:41] solars: apeiros, it's a simple circular dependency that someone added
[14:42:19] mary5030: has joined #ruby
[14:44:36] gnudon: has joined #ruby
[14:45:40] chouhoulis: has joined #ruby
[14:45:49] zyzioziom: has joined #ruby
[14:46:40] UtkarshRay: has joined #ruby
[14:47:30] zacstewart: has joined #ruby
[14:47:59] shredding: has joined #ruby
[14:48:43] jaiks: has joined #ruby
[14:49:06] vagnerd: has joined #ruby
[14:50:43] ready: has joined #ruby
[14:50:56] moredhel: has joined #ruby
[14:51:48] centrx: has joined #ruby
[14:51:55] dajobat: has joined #ruby
[14:52:14] FernandoBasso: has joined #ruby
[14:53:12] zyzioziom: has joined #ruby
[14:54:06] makenoise: has joined #ruby
[14:56:34] dajobat: has joined #ruby
[14:58:23] Chachi: has joined #ruby
[14:58:59] snowy: has joined #ruby
[14:59:27] karapetyan: has joined #ruby
[14:59:52] makenoise: has joined #ruby
[15:00:20] decoponio: has joined #ruby
[15:00:51] ElFerna_: has joined #ruby
[15:01:04] darkxploit: has joined #ruby
[15:01:16] polishdub: has joined #ruby
[15:01:16] zyzioziom: has joined #ruby
[15:02:06] karl___: has joined #ruby
[15:03:15] apeiros: solars: so a full backtrace would have helped figuring that out? cue to my original "full exception" :-p
[15:03:36] sftrabbit: has joined #ruby
[15:03:39] zyzioziom: has joined #ruby
[15:03:43] karl___: I'm using RestClient and need to send a Get request that has JSON in the body of the request (because the API resource I'm using expects parameters that way). Any suggestions on how to accomplish this?
[15:05:32] solars: apeiros, I was not aware that this is visible in the missing constants exception
[15:06:12] apeiros: in the backtrace. and that's precisely the point why you always provide the full exception - because you might miss something or your interpretation of the exception may lack an important aspect
[15:06:26] babblebre: has joined #ruby
[15:07:10] dhollinger: has joined #ruby
[15:08:16] momomomomo: has joined #ruby
[15:09:25] evidex: has joined #ruby
[15:09:37] whippythellama: has joined #ruby
[15:10:21] hobodave: has joined #ruby
[15:10:23] Brklyn: has joined #ruby
[15:11:02] dlitvak: has joined #ruby
[15:12:01] B1n4r10: has joined #ruby
[15:13:24] solars: apeiros, alright.. still have to find a way how to resolve this .. is there anything like a tool to analyze requires in a project? :)
[15:13:32] solars: seems to be quite chaotic
[15:14:02] shevy: what I found helps is to try to make minimal requires, that is, require what you may need in that file alone and ideally nothing else
[15:14:12] VeryBewitching: has joined #ruby
[15:14:47] shevy: and to build by starting from the foundation of the project, until you reach the more specialized classes
[15:14:56] mrsolow: has joined #ruby
[15:14:57] VeryBewitching: Good morning folks.
[15:14:58] solars: of course, I just need to get an overview of all these dependencies somehow
[15:15:24] mrmargolis: has joined #ruby
[15:15:26] karapetyan: has joined #ruby
[15:15:44] apeiros: solars: monkey-patch Kernel#require
[15:15:50] solars: looks like there is no tool or script for this :/
[15:16:08] solars: apeiros, hm yeah that would probably be the next step
[15:16:19] solars: a graph would be nice :)
[15:16:31] apeiros: shouldn't be too difficult
[15:16:50] apeiros: I mean all you need is caller/caller_locations + the argument to have an edge
[15:17:08] ftj: has joined #ruby
[15:17:11] apeiros: print it to a file with -> in between, call it .dot, run it through graphviz - voil??, visual graph.
[15:17:26] solars: never used that
[15:17:34] solars: but it sounds easy :)
[15:17:53] truenito: has joined #ruby
[15:17:55] vqrs: has joined #ruby
[15:18:19] freerobby: has joined #ruby
[15:18:26] apeiros: http://www.graphviz.org/content/dot-language
[15:19:05] ElFerna_: has joined #ruby
[15:19:29] apeiros: you can do a lot. but all you need is more or less `digraph foo { "requiring file" -> "required file"; ??? }`
[15:19:31] the_drow: has joined #ruby
[15:19:48] atomical: has joined #ruby
[15:20:11] the_drow: Hi, how do I replace the default JSON parser in grape with Oj?
[15:20:16] the_drow: Does it support multi_json?
[15:20:19] jamw: has joined #ruby
[15:20:46] solars: apeiros, thanks a lot for the suggestion!
[15:22:36] nettoweb: has joined #ruby
[15:23:54] pdoherty: has joined #ruby
[15:24:08] jaiks: has joined #ruby
[15:24:15] sucks: has joined #ruby
[15:24:31] zacts: what does monkey-patch mean?
[15:25:08] dlitvak: has joined #ruby
[15:25:58] apeiros: zacts: it means to change a class which exists already (and usually which you don't own)
[15:26:08] sgambino: has joined #ruby
[15:26:13] apeiros: most often done with core classes. but it's not limited to those.
[15:26:20] zacts: is it analagous to operator overloading, but at the class level?
[15:26:38] tuelz1: has joined #ruby
[15:26:41] blasius: has joined #ruby
[15:26:43] zacts: oh I think I see, ok
[15:26:54] apeiros: no. ruby can't have overloading.
[15:27:01] burgestrand: Code equivalent of duct tape.
[15:27:19] zacts: apeiros: oh so you really are modifying the core class proper?
[15:27:27] zacts: Burgestrand: nice
[15:27:31] apeiros: rubys classes are open
[15:27:32] solars: apeiros, something like this https://gist.github.com/solars/b9ad14feb06f5e8081fe
[15:27:33] dajobat: apeiros: I think you can overload operators in ruby
[15:27:50] apeiros: >> class Array; def gimme3; first(3); end; end; [*1..10].gimme3
[15:27:52] ruby[bot]: apeiros: # => [1, 2, 3] (https://eval.in/511970)
[15:27:54] solars: "just" have to add the graphviz stuff haha
[15:28:07] apeiros: dajobat: no. you can't.
[15:28:13] william3: has joined #ruby
[15:28:23] apeiros: dajobat: overloading requires multiple methods of the same name to be able to coexist. ruby does not have that. no overloading.
[15:28:36] apeiros: dajobat: you can define +/-/* etc. methods. but that's not overloading.
[15:28:40] aegis3121: If you're talking about things like '+' or '/', you're just re-defining the method with the name of that symbol as defined for that class.
[15:28:53] zacts: interesting
[15:29:29] Abrin: has joined #ruby
[15:30:22] apeiros: (also technically they aren't operators in ruby either ;-p)
[15:30:42] adgtl: has joined #ruby
[15:31:13] dajobat: apeiros: i've read some stuff that refers to redefining operators for classes as operator overloading, so that might be what zacts is referring to
[15:31:25] JDiPierro: has joined #ruby
[15:31:28] Jardayn: has joined #ruby
[15:31:39] sftrabbit: has joined #ruby
[15:31:40] apeiros: yeah, redefining an operator isn't overloading.
[15:32:02] apeiros: overloading is when you define the same operator multiple times with different behaviors depending on the arguments
[15:32:21] apeiros: such as sum(float, float), sum(int, int), ???
[15:32:38] apeiros: depending on the arguments, the proper function is invoked.
[15:33:11] dajobat: isn't that basically what you're doing (if not technically) when you redefine + to be concat for a string rather than an int?
[15:33:37] apeiros: only if you consider the receiver to be an argument
[15:33:39] aegis3121: But it's the calling class that matters, not the parameters. Overloading relies on parameter signatures.
[15:33:51] apeiros: and then it'd be a limited overloading as you can only overload based on a single argument (the receiver)
[15:34:14] tjohnson: has joined #ruby
[15:34:18] catt: has joined #ruby
[15:34:35] apeiros: you can't define String#+(String) and String#+(Integer) at the same time in ruby. you can handle it, but you have to do so within the method, not through multiple definitions of the same method.
[15:35:53] zacts: my mistake
[15:35:57] zacts: re: terminology
[15:36:14] dajobat: Yeah, you're right.
[15:37:03] snowy: has joined #ruby
[15:37:31] baweaver: has joined #ruby
[15:39:23] dopamean_: has joined #ruby
[15:40:20] truenito: has joined #ruby
[15:41:38] dangerousdave: has joined #ruby
[15:42:07] sgambino: has joined #ruby
[15:45:23] weemsledeux: has joined #ruby
[15:46:01] atomical_: has joined #ruby
[15:46:28] chouhoulis: has joined #ruby
[15:46:42] Xeago: has joined #ruby
[15:47:24] roshanavand: has joined #ruby
[15:48:20] chouhoul_: has joined #ruby
[15:48:43] hxegon: is there a way to suppress the context output when you start pry with binding.pry?
[15:49:43] slawrence00: has joined #ruby
[15:50:33] weemsledeux: has joined #ruby
[15:50:57] aufi: has joined #ruby
[15:52:02] Papierkorb: hxegon: binding.pry quiet: true
[15:52:13] hxegon: Thanks Papierkorb!
[15:52:28] Papierkorb: That may silence other things too, not sure
[15:53:45] terminalrecluse: has joined #ruby
[15:53:49] dionysus69: has joined #ruby
[15:55:39] rickmasta: has joined #ruby
[15:55:47] ogpastaling: has joined #ruby
[15:57:01] mpistone: has joined #ruby
[15:57:55] User458764: has joined #ruby
[15:57:56] Guest38: has joined #ruby
[15:58:22] shevy: I got a question... style question mostly, but also speed consideration
[15:58:38] Frem: has joined #ruby
[15:58:40] shevy: it is said that using @ivars directly is faster than using an reader method like: def ivars; @ivars
[15:59:10] shevy: but I found that, using methods, makes it more convenient for me to read my own code. should I use @vars instead or continue to use methods? (inside the class that is)
[15:59:24] machinewar: has joined #ruby
[15:59:46] machinewar: whats the community's opinion on multiple return values?
[16:00:00] machinewar: seems useful in some cases, or maybe ive just been writing too much Golang recently
[16:00:30] sgambino: has joined #ruby
[16:00:45] dajobat: machinewar: like returning two different values at the same time from a method, or returning different values in different places?
[16:01:02] machinewar: dajobat: two values at the same time from method
[16:01:11] machinewar: i.e. a, b = my_method()
[16:02:06] Xeago: has joined #ruby
[16:02:08] ponga: has joined #ruby
[16:02:14] ogpastaling: has joined #ruby
[16:02:15] EdwardIII: has joined #ruby
[16:02:26] ponga: hey guys I found this, https://glade.gnome.org would you suggest this is good idea to GUI with ruby?
[16:02:48] roshanav_: has joined #ruby
[16:02:57] bauruine: has joined #ruby
[16:04:06] shevy: it depends
[16:04:27] ponga: shevy: can you elaborate, please
[16:04:38] shevy: it's mostly XML yes? and XML is not a lot of fun... BUT, you can sorta just describe your whole UI in one file, which is actually pretty cool because you don't have to deal with UI stuff much at all when you write application logic ponga
[16:04:50] shevy: there are a few examples... let me try to find it
[16:04:54] dajobat: machinewar: Don't know how I feel about them really, better than having to make loads of custom classes for return values I guess.
[16:05:04] dajobat: I do like C#'s Tuples though, which are similar
[16:05:26] nofxx: has joined #ruby
[16:05:26] shevy: you are a korean in japan or something right? let me introduce to you to kuja, a korean, who used to be on #rubyforce :)
[16:05:37] shevy: like 8 years ago he wrote an application called TubePod - let me try to upload
[16:05:49] ponga: shevy: to me it seemed like I'd not have to worry about XML
[16:07:02] shevy: https://gist.github.com/shevegen/a2cff537b754fb1100d8
[16:07:04] machinewar: dajobat: good point
[16:07:17] shevy: the page is a bit messed up... you can ignore the ruby part if you want to, just look at the XML part
[16:07:26] shevy: ponga not sure, perhaps glade changed... but in gnome2 era, it was 100% XML
[16:07:33] shevy: <property name="authors">Matthew Harris</property>
[16:07:35] shevy: that was kuja :)
[16:07:36] EdwardIII: hey is it OK to ask about third party libs? i've set savon to :info level, asked it to pretty print xml, but when it gets a SoapFault in a test, it doesn't show the xml that caused it
[16:07:54] shevy: actually I think he was a korean but born in the USA or something
[16:08:00] ponga: shevy: It is in XML, but i thought the concept was the glade'user wouldnt have to worry about reading XML :\
[16:08:18] shevy: yeah the user won't have to worry
[16:08:30] shevy: and once you finished the UI design part with XML, you also don't have to worry about it
[16:08:43] shevy: it's a bit odd to deal with perhaps:
[16:08:48] shevy: <property name="visible">True</property>
[16:08:49] shevy: <property name="xalign">0.5</property>
[16:08:57] shevy: in pure ruby you'd have similar means, like
[16:09:01] shevy: widget.visible = true
[16:09:05] shevy: widget.xalign = 0.5
[16:09:15] stannard: has joined #ruby
[16:09:26] shevy: more work in XML, but the benefit is that you can just grab any arbitrary glade file and have your application work on it
[16:09:48] shevy: I guess people manage to deal with it by using editors for glade hehe
[16:10:17] Limix: has joined #ruby
[16:10:36] ponga: shevy: yeah that's what i was going to do, use editor for glade
[16:10:38] ponga: then forget about it
[16:10:43] ponga: *forget about XML
[16:10:57] ponga: isn't that what OOP is about? at least partially?
[16:11:05] ponga: don't bother with what's inside the object
[16:11:19] EdwardIII: i wish i could forget about xml heh
[16:11:26] EdwardIII: life would be so glorious
[16:11:35] ponga: and regex for me
[16:11:53] EdwardIII: doing a lot of regex?
[16:11:56] shevy: ponga yeah for objects + messages + communicating with other objects, sorta the way how Alan Kay thought about OOP and less so the C++ or java way
[16:12:03] ponga: EdwardIII: recently, yeah
[16:12:08] ponga: regex in asian language
[16:12:11] shevy: my gripe with XML is that it is so verbose
[16:12:16] EdwardIII: i don't mind regex heh but my regex is write-only to the extreme
[16:12:24] dajobat: yeah, xml's pretty heavy.
[16:12:40] EdwardIII: plus the lack of distinction between a single element and a collection
[16:12:47] EdwardIII: that's my biggest reason for prefering json to xml
[16:13:03] EdwardIII: *preferring
[16:14:28] dajobat: Also the fact that the angle brackets on your keyboard can only sustain so much punishment before breaking.
[16:14:33] sgambino: has joined #ruby
[16:15:08] ponga: shevy: I can't bare writing raw codes for GUI, so im looking for an editor
[16:15:14] ponga: and glade was what I hit by
[16:15:31] shevy: my GUIs end up awful
[16:15:43] shevy: but I gave up on beautiful, I have settled for functional
[16:15:55] x77686d: has joined #ruby
[16:16:12] tomchapin: has joined #ruby
[16:16:41] ponga: do we have any alternative to glade? GUI editor that can work with ruby?
[16:16:49] ponga: cos I hear you guys say XML is heavy
[16:16:52] ponga: I don't like heavy
[16:17:22] shevy: I think there is some gnome editor for glade stuff
[16:17:39] shevy: https://en.wikipedia.org/wiki/Glade_Interface_Designer
[16:17:45] dajobat: this http://visualruby.net/ appears to exist
[16:17:47] ramfjord: has joined #ruby
[16:17:49] dajobat: don't know how good it is though.
[16:18:02] cschneid_: has joined #ruby
[16:18:05] shevy: oh yes I remember that
[16:18:07] JDiPierro: has joined #ruby
[16:18:20] shevy: well give it a try ponga
[16:18:27] dajobat: report back with your findings.
[16:20:09] ferr: has joined #ruby
[16:20:49] poguez_: has joined #ruby
[16:21:20] Rodya_: has joined #ruby
[16:23:48] Rodya_: has joined #ruby
[16:25:43] MyMind: has joined #ruby
[16:26:08] EdwardIII: so.... i'm pretty green. does anyone know how i can find out if savon *should* be logging xml requests/responses when exceptions happen?
[16:26:17] arup_r: ponga: hi.. take care
[16:26:44] Infra-Red: has joined #ruby
[16:26:59] anisha: has joined #ruby
[16:27:07] jbrhbr: has joined #ruby
[16:27:16] EdwardIII: it keeps saying '(soap:Server) Server was unable to process request. ---> Not authenticated' but i know i'm giving the right details. this is a stupid soap service, it doesn't use proper auth like plain auth or something, it gets you to include some auth xml in the header based on their own ns/schema, and what i've told it to use is correct
[16:27:26] aegis3121: has joined #ruby
[16:27:27] tuelz1: has joined #ruby
[16:27:31] EdwardIII: my guess is it's an NS issue
[16:28:02] quaristice: has joined #ruby
[16:30:37] jimmtt: has joined #ruby
[16:32:34] treehug88: has joined #ruby
[16:32:43] ponga: dajobat: will visualruby support ruby 2.3.0
[16:32:52] ponga: guess I'd have to install 1.9.3 for safety
[16:33:18] sgambino: has joined #ruby
[16:33:29] Pumukel: has joined #ruby
[16:35:12] agentmeerkat: has joined #ruby
[16:35:41] Ox0dea: c0m0: Did you get seeking figured out?
[16:36:01] Ox0dea: For IO#last_line or the like.
[16:36:15] dlitvak_: has joined #ruby
[16:36:17] roshanavand: has joined #ruby
[16:36:30] c0m0: 0x0dea: No
[16:37:08] Ox0dea: 0x5adface
[16:37:22] arup_r: has joined #ruby
[16:38:39] TomPeed: has joined #ruby
[16:38:59] SCHAAP137: has joined #ruby
[16:39:27] Infra-Red: has joined #ruby
[16:40:16] symm-: has joined #ruby
[16:40:33] chouhoulis: has joined #ruby
[16:41:48] Infra-Red: has joined #ruby
[16:42:05] dajobat: ponga: No idea, I only found it just now.
[16:42:21] ponga: ok I will try with 2.3.0
[16:42:31] ponga: and if it doesn,t have to follow what guide says
[16:42:40] ElFerna_: has joined #ruby
[16:42:52] dajobat: Good luck!
[16:43:01] Timba-as_: has joined #ruby
[16:43:51] Rodya_: has joined #ruby
[16:47:40] yoongkang: has joined #ruby
[16:48:00] jbrhbr: has joined #ruby
[16:51:14] mfb2: has joined #ruby
[16:52:31] kirillzh: has joined #ruby
[16:53:31] tekk: has joined #ruby
[16:53:45] davedev24: has joined #ruby
[16:53:59] EdwardIII: hm managed to get it printing out. it's weird, it's not applying the right namespace to a particular element
[16:55:06] adgtl: has joined #ruby
[16:56:34] Xeago: has joined #ruby
[16:56:34] iateadonut: has joined #ruby
[16:57:08] arup_r: has joined #ruby
[16:57:37] Rodya_: has joined #ruby
[16:58:23] zyzioziom: has joined #ruby
[16:58:46] Infra-Red: has joined #ruby
[16:58:56] djbkd: has joined #ruby
[16:59:01] agit0: has joined #ruby
[17:00:02] adgtl: has joined #ruby
[17:00:47] luckyme: has joined #ruby
[17:01:09] blasius: has joined #ruby
[17:03:25] luckyme: has joined #ruby
[17:03:35] avenj: has joined #ruby
[17:03:35] avenj: has joined #ruby
[17:03:48] gizmore: has joined #ruby
[17:04:55] dajobat: Edward: I've never used SOAP, only done RESTful stuff. What's it like?
[17:05:04] amclain: has joined #ruby
[17:05:16] weemsledeux: has joined #ruby
[17:05:22] anisha: has joined #ruby
[17:05:27] mfb2: has joined #ruby
[17:05:53] bronson: has joined #ruby
[17:06:11] IanMalcolm: has joined #ruby
[17:06:38] dlitvak: has joined #ruby
[17:08:01] spiman: has joined #ruby
[17:08:13] ramortegui: has joined #ruby
[17:08:47] maho: has joined #ruby
[17:09:06] maho: Can I talk of languages other than Ruby here?
[17:09:17] evidex: has joined #ruby
[17:09:51] Timba-as_: has joined #ruby
[17:09:54] snowy: has joined #ruby
[17:10:09] disconnekted: has joined #ruby
[17:11:04] The_Phoenix: has joined #ruby
[17:11:05] snowy: has joined #ruby
[17:11:09] EdwardIII: dajobat: horrid
[17:11:25] EdwardIII: dajobat: it's supposed to be very structured to make it more comfortable in languages like java & c#
[17:11:40] EdwardIII: dajobat: but in reality nothing ever works right and it's hugely irritating and often complex
[17:11:49] OS-15951: has joined #ruby
[17:13:21] krobzaur_: has joined #ruby
[17:14:24] ramfjord: has joined #ruby
[17:16:12] maho: Well, here's my question: http://paste.ofcode.org/j7PV7bmgwpVZJAhTWCNJF7 and my answer: http://paste.ofcode.org/35Qh4Hbtqbge5aUMHF34yCY. What's wrong? Can someone help?
[17:16:18] vishwa: has joined #ruby
[17:17:39] stannard: has joined #ruby
[17:17:56] Ebok: has joined #ruby
[17:18:13] last_staff: has joined #ruby
[17:18:15] User458764: has joined #ruby
[17:18:19] ElFerna_: has joined #ruby
[17:18:35] Sigma00: maho: you'll have better luck in ##c or ##c++
[17:18:50] Ox0dea: The nerve.
[17:21:02] jamw: has joined #ruby
[17:21:35] skingsbu: has joined #ruby
[17:22:19] Timba-as_: has joined #ruby
[17:22:24] maho: Sigma00: Very few people there right now...So I wondered if some expert is here right now
[17:22:30] synthroid: has joined #ruby
[17:22:56] elifoster: has joined #ruby
[17:23:08] tomphp: has joined #ruby
[17:24:46] agit0: has joined #ruby
[17:24:46] tomchapin: has joined #ruby
[17:25:05] bb010g: has joined #ruby
[17:26:19] dajobat: EdwardIII: Sounds great, really.
[17:26:30] Limix: has joined #ruby
[17:27:41] Ox0dea: c0m0: https://eval.in/512049
[17:28:12] tuelz1: has joined #ruby
[17:28:32] Ox0dea: I used StringIO only because eval.in doesn't permit creating actual files; you could swap it out for IO and have it do The Right Thing.
[17:29:01] Infra-Red: has joined #ruby
[17:29:21] Ox0dea: Having one approach be ~4 orders of magnitude faster than another is a rare thing.
[17:29:36] Infra-Red: has joined #ruby
[17:29:39] sgambino: has joined #ruby
[17:30:37] Anderson69s_Deb: has joined #ruby
[17:30:52] justinweiss: has joined #ruby
[17:30:56] mfb2: has joined #ruby
[17:31:02] Timba-as_: has joined #ruby
[17:32:04] Rodya_: has joined #ruby
[17:34:46] bmalum: has joined #ruby
[17:35:23] Rodya_: has joined #ruby
[17:37:06] psye: has joined #ruby
[17:37:36] maho: has left #ruby: ()
[17:38:10] c0m0: 0x0dea: Nice :) thanks
[17:38:16] baweaver: has joined #ruby
[17:38:21] mostlybadfly: has joined #ruby
[17:39:09] freerobby: has joined #ruby
[17:39:09] anisha: has joined #ruby
[17:42:58] Rodya_: has joined #ruby
[17:44:04] dlitvak: has joined #ruby
[17:45:10] shinnya: has joined #ruby
[17:46:26] Rodya_: has joined #ruby
[17:47:28] symm-: has joined #ruby
[17:48:31] yoongkang: has joined #ruby
[17:49:45] ElFerna_: has joined #ruby
[17:50:12] Rodya_: has joined #ruby
[17:50:34] IrishGringo: has joined #ruby
[17:51:56] dmolina: has joined #ruby
[17:52:03] GeorgesLeYeti: has joined #ruby
[17:52:05] pwnd_nsfw: has joined #ruby
[17:52:30] dlitvak_: has joined #ruby
[17:53:37] Infra-Red: has joined #ruby
[17:53:47] JDiPierro: has joined #ruby
[17:54:59] Mon_Ouie: has joined #ruby
[17:55:11] hahuang65: has joined #ruby
[17:55:38] floatingpoint: has joined #ruby
[17:56:22] floatingpoint: should Open3.capture3(command) be able to overflow the stdout buffer?
[17:56:37] Xeago: has joined #ruby
[17:57:45] wldcordeiro: has joined #ruby
[17:58:49] eam: floatingpoint: what does "overflow" mean to you in that context? can you describe the question a bit more?
[17:59:15] grill: has joined #ruby
[18:01:52] kfpratt: has joined #ruby
[18:03:13] adgtl: has joined #ruby
[18:03:45] jbrhbr: has joined #ruby
[18:03:54] floatingpoint: has joined #ruby
[18:04:03] floatingpoint: should Open3.capture3(command) be able to overflow the stdout buffer?
[18:04:29] kevinml: has joined #ruby
[18:04:54] jottr: has joined #ruby
[18:06:06] kevinml: has left #ruby: ()
[18:06:33] dexter_e: has joined #ruby
[18:07:32] treehug88: has joined #ruby
[18:07:37] adgtl: has joined #ruby
[18:08:04] firstdayonthejob: has joined #ruby
[18:09:52] cpup: has joined #ruby
[18:09:53] GeorgesLeYeti: I have a float 361.145 and i want to return the closest float where decimal part is 0.04*i (i from 0 to 96 => [0.0, 0.04, 0.08, 0.12, 0.16, 0.2, 0.24, 0.28, 0.32, 0.36, 0.4, 0.44, 0.48, 0.52, 0.56, 0.6, 0.64, 0.68, 0.72, 0.76, 0.8, 0.84, 0.88, 0.92, 0.96] )
[18:10:11] GeorgesLeYeti: So here it's 361.16
[18:11:00] GeorgesLeYeti: I'm sorry for this "shitty" explaination but I'dont know how to express it.
[18:12:22] rgs: has joined #ruby
[18:12:46] OS-15951: has left #ruby: ()
[18:13:19] chouhoulis: has joined #ruby
[18:13:44] meves: has joined #ruby
[18:13:51] GeorgesLeYeti: Btw if you want to know the complete problem. I want to convert 25 fps (frame per second) into second.
[18:14:01] chouhoulis: has joined #ruby
[18:14:29] akaiiro: has joined #ruby
[18:15:05] GeorgesLeYeti: And i want my timecode stop at the exact frame
[18:15:14] Eiam_: has joined #ruby
[18:16:11] Papierkorb: GeorgesLeYeti: 1.0/25 ?
[18:16:19] Ox0dea: >> [12.0, 14.5].map { |f| (f / 4).ceil * 4 } # GeorgesLeYeti
[18:16:20] ruby[bot]: Ox0dea: # => [12, 16] (https://eval.in/512066)
[18:16:24] Emmanuel_Chanel: has joined #ruby
[18:16:30] mooru: has joined #ruby
[18:16:52] GeorgesLeYeti: Papierkorb, yes that why my step is 0.04
[18:17:56] TomyLobo: has joined #ruby
[18:18:41] tjohnson: has joined #ruby
[18:18:49] Papierkorb: GeorgesLeYeti: So given a timestamp, you want to find the closest frame to that?
[18:18:56] aegis3121: has joined #ruby
[18:19:13] geekbri: has joined #ruby
[18:19:42] momomomomo: has joined #ruby
[18:19:49] TheMoonMaster: has joined #ruby
[18:20:14] einarj: has joined #ruby
[18:20:21] mrsolow: has joined #ruby
[18:21:31] GeorgesLeYeti: Papierkorb, yes
[18:22:09] Papierkorb: >> time = 13.37; fps = 25; p (time * fps).round # GeorgesLeYeti
[18:22:10] ruby[bot]: Papierkorb: # => 334 ...check link for more (https://eval.in/512070)
[18:23:46] grill: has joined #ruby
[18:24:10] snowy: has joined #ruby
[18:24:14] mame3: has joined #ruby
[18:24:40] Rodya_: has joined #ruby
[18:25:26] dajobat: Cheerio all, home time.
[18:27:21] oetjenj: has joined #ruby
[18:27:46] Limix: has joined #ruby
[18:28:46] nettoweb: has joined #ruby
[18:28:57] tuelz1: has joined #ruby
[18:30:17] borodin: has joined #ruby
[18:31:18] Xeago: has joined #ruby
[18:32:19] Azulinho: has joined #ruby
[18:32:49] ta: has joined #ruby
[18:33:36] baweaver: has joined #ruby
[18:34:30] binaryplease: has joined #ruby
[18:35:28] william3: has joined #ruby
[18:35:57] grill: should Open3.capture3(command) be able to overflow the stdout buffer? (ruby)
[18:36:16] x77686d: has joined #ruby
[18:36:32] baweaver: has joined #ruby
[18:37:28] cpup: has joined #ruby
[18:38:12] roshanavand: has joined #ruby
[18:38:24] solars: has joined #ruby
[18:39:18] solars: apeiros, do you know how I can get the caller filename when monkey patching Kernel#require?
[18:39:23] mdw: has joined #ruby
[18:39:29] mooru: has joined #ruby
[18:39:33] apeiros: solars: Kernel#caller
[18:39:40] apeiros: or newer variant: caller_locations
[18:40:01] Azulinho: has joined #ruby
[18:40:03] apeiros: in the latter, it's easier to extract the filename as it's not just an array of strings.
[18:40:18] User458764: has joined #ruby
[18:40:33] solars: figured out the graphviz thing, a very nice tool
[18:40:59] Infra-Red: has joined #ruby
[18:41:13] apeiros: it tits is
[18:41:46] apeiros: ACTION probably shouldn't type one-handed while lying on the side :D
[18:41:56] Ox0dea: Wow: https://eval.in/512073
[18:42:03] adaedra: like one of your french girls, apeiros?
[18:42:49] adaedra: lying on the side
[18:42:51] apeiros: Ox0dea: you caught yaml red-handed in the require-jar!
[18:43:05] apeiros: adaedra: I don't think I get the reference :-S
[18:43:11] Ox0dea: apeiros: Titanic!
[18:43:15] adaedra: http://knowyourmeme.com/memes/draw-me-like-one-of-your-french-girls
[18:43:27] adaedra: ACTION requires Ox0dea 
[18:43:32] Ox0dea: # => false
[18:43:51] havenwood: Ox0dea must have been already required!
[18:43:54] Ox0dea: You already had me. <3
[18:43:55] atomical: has joined #ruby
[18:44:01] Ox0dea: You had me at _start().
[18:44:02] zeroDivisible: has joined #ruby
[18:44:11] adaedra: I?????????????? s????????????????h????????????????o????????????u????l??????????????????d????????????????n????????'????????????????t?????????????? ????????????h????????????????????????????a??????????v??????????????????e???????? ??????????????d??????????????o??????n????????????????????????e???????? ??????????????????t??????????h??????a??t????????????????
[18:44:46] Rubie: has joined #ruby
[18:45:42] IanMalcolm: has joined #ruby
[18:46:10] adaedra: Ox0dea: you really got me ???
[18:46:26] grill: what's the easiest way to match all files recursively in a directory?
[18:46:40] adaedra: Dir['**/*'] ?
[18:46:55] grill: will that only match files?
[18:46:57] grill: not dirs?
[18:47:16] ruby[bot]: Why don't you try it and see for yourself?
[18:47:26] grill: no one say that coming
[18:47:48] grill: i should start making bets on how many times tias gets issued in various channels
[18:48:19] eam: hopefully regularly, when spurious questions get asked
[18:48:48] jottr_: has joined #ruby
[18:49:30] Ox0dea: grill: For once you've gotten your answer by way of an insatiable desire to explore: Dir['**/*'].select &File.method(:file?)
[18:50:47] ferr: has joined #ruby
[18:50:49] Xeago_: has joined #ruby
[18:51:16] eam: is &File.method(:file?) more clear than {|f| File.file? f} ?
[18:52:14] grill: what is &File? I've never seen that syntax before
[18:53:39] Mon_Ouie: foo(&something) calls method foo with the object something as a block argument (after converting it to a Proc by calling #to_proc on it)
[18:54:02] adaedra: It's the same as .select { |file| File.file? file }
[18:54:16] Mon_Ouie: I like the look of File.file? file
[18:54:25] Ox0dea: Looks like Java.
[18:54:34] Mon_Ouie: had_had = 'had'; Had.had?(had_had) ? 'had' : 'had_had'
[18:55:09] Ox0dea: Relevant: https://git.io/vgIcF
[18:55:24] adaedra: pokemon.rb
[18:55:36] dionysus69: has joined #ruby
[18:55:40] roshanavand: has joined #ruby
[18:55:52] Ox0dea: Some of them can say more than their names nowadays.
[18:55:54] eam: ruby should've adopted perl's dash-functions
[18:56:13] eam: Dir['*'].select { -f }
[18:56:24] eam: and the implicit _ iterator
[18:56:39] adaedra: If you want to do perl, you can, you know, do perl
[18:56:49] eam: if only it were that simple
[18:57:30] Rodya_: has joined #ruby
[18:57:59] grill: I don't undetstand the logical difference between Dir["**/*"] and Dir["*"]
[18:58:14] eam: "**" is a recursive descent
[18:58:14] karapetyan: has joined #ruby
[18:58:32] adaedra: grill: try both in a directory with subdirectories
[18:58:49] Swappticon: has joined #ruby
[18:58:50] grill: nah that's ok. i'll just ask around / stackoverflow for an answer. it's faster
[18:59:03] tubbo: grill: no wonder you're such a shitty programmer
[18:59:19] eam: MINASWAN
[18:59:22] grill: probably getting paid more than you too
[18:59:30] burgestrand: has joined #ruby
[18:59:42] grill: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[19:00:03] mary5030: has joined #ruby
[19:00:04] adaedra: no need to oil the fire, people.
[19:00:12] aegis3121: has joined #ruby
[19:00:23] dstarh: has joined #ruby
[19:00:26] Ox0dea: It's really weird, though; switching from student to troll once something becomes a little confusing is a strange coping mechanism.
[19:00:39] tubbo: haha i just meant that i live in an area where my cost of living isn't so high
[19:02:38] TorpedoSkyline: has joined #ruby
[19:02:43] darkf_: has joined #ruby
[19:02:45] Ox0dea: It's really hard to find usage numbers for "oil the fire" because there's a song called "The Oil, the Fire".
[19:02:51] chouhoul_: has joined #ruby
[19:02:55] solars: apeiros, pretty cool, works nicely with graphviz and Kernel#require
[19:03:03] amclain_: has joined #ruby
[19:03:18] dopamean1: has joined #ruby
[19:03:18] adaedra: Ox0dea: did I use an expression which doesn't translate well again?
[19:03:22] synthroid: has joined #ruby
[19:03:22] Axy: has joined #ruby
[19:03:38] Ox0dea: adaedra: Aye, "fuel" is more idiomatic there.
[19:03:55] bafbomb_: has joined #ruby
[19:04:10] uxp_: has joined #ruby
[19:04:19] jbrhbr: has joined #ruby
[19:04:19] astrobun_: has joined #ruby
[19:05:01] Rutix`away: has joined #ruby
[19:05:01] Rutix`away: has joined #ruby
[19:05:18] eregon_: has joined #ruby
[19:05:29] Pisuke: has joined #ruby
[19:05:53] plonk_: has joined #ruby
[19:05:53] plonk_: has joined #ruby
[19:06:20] webhat_: has joined #ruby
[19:06:36] crowell_: has joined #ruby
[19:06:36] phredus_: has joined #ruby
[19:06:41] apeiros: solars: ????????
[19:06:42] symm-_: has joined #ruby
[19:06:46] iamvery_: has joined #ruby
[19:06:46] mondok: has joined #ruby
[19:07:06] sungji: has joined #ruby
[19:07:13] Marsjan: has joined #ruby
[19:07:14] jsaak_: has joined #ruby
[19:07:14] livcd_: has joined #ruby
[19:07:19] rethi_: has joined #ruby
[19:07:25] lianj_: has joined #ruby
[19:07:26] sunya7a_: has joined #ruby
[19:07:26] mooru: has joined #ruby
[19:07:32] ihme-TTilus: has joined #ruby
[19:07:40] ozzloy_: has joined #ruby
[19:07:42] Sp4rKy_: has joined #ruby
[19:07:55] hahuang65: has joined #ruby
[19:07:56] tokik_: has joined #ruby
[19:07:58] ironcame1: has joined #ruby
[19:08:01] ltd_: has joined #ruby
[19:08:10] Eising_: has joined #ruby
[19:08:11] Swappticon: has joined #ruby
[19:08:23] pilne: has joined #ruby
[19:09:21] atomical_: has joined #ruby
[19:10:01] oz`: has joined #ruby
[19:10:46] csaunders_: has joined #ruby
[19:10:48] j0bk_: has joined #ruby
[19:10:50] kadoppe_: has joined #ruby
[19:11:02] D9-: has joined #ruby
[19:11:03] wanderer_: has joined #ruby
[19:11:04] greenhat|: has joined #ruby
[19:11:05] tvsutton_: has joined #ruby
[19:11:07] kenichi_: has joined #ruby
[19:11:08] spacemud_: has joined #ruby
[19:11:12] Ankhers_: has joined #ruby
[19:11:12] xMopxShe-: has joined #ruby
[19:11:12] crank1988: has joined #ruby
[19:11:19] konopka_: has joined #ruby
[19:11:23] hfp__work: has joined #ruby
[19:11:23] bmn_: has joined #ruby
[19:11:30] skakri`: has joined #ruby
[19:11:38] davidcelis_: has joined #ruby
[19:11:40] russt_: has joined #ruby
[19:11:41] M-shine1: has joined #ruby
[19:11:44] Fire-Dragon-DoL-: has joined #ruby
[19:11:51] bakingbread: has joined #ruby
[19:11:59] pawnbox: has joined #ruby
[19:12:19] psyq_: has joined #ruby
[19:12:30] armyriad: has joined #ruby
[19:12:52] segy: has joined #ruby
[19:13:02] redlegion: has joined #ruby
[19:13:12] baweaver: has joined #ruby
[19:13:23] ozzloy: has joined #ruby
[19:13:34] CloCkWeRX: has joined #ruby
[19:13:34] eam: has joined #ruby
[19:13:39] Swappticon: has joined #ruby
[19:13:43] Psyq: has joined #ruby
[19:14:12] akkad: has joined #ruby
[19:14:21] atomical: has joined #ruby
[19:14:43] k13nox: has joined #ruby
[19:14:54] shaman42: has joined #ruby
[19:14:59] adgtl: has joined #ruby
[19:15:09] sftrabbit: has joined #ruby
[19:15:10] harushimo: has joined #ruby
[19:15:11] floatingpoint: has joined #ruby
[19:15:28] david2: has joined #ruby
[19:15:39] meves: has joined #ruby
[19:15:43] matp: has joined #ruby
[19:16:00] mprelude: has joined #ruby
[19:16:01] skingsbu: has joined #ruby
[19:16:02] programmerq: has joined #ruby
[19:16:07] platzhirsch: has left #ruby: ()
[19:16:15] dextertzu: has joined #ruby
[19:16:17] raimumizu: has joined #ruby
[19:16:37] netcho: has joined #ruby
[19:16:43] gilesww: has joined #ruby
[19:16:46] Sou|cutter: has joined #ruby
[19:16:53] sarlalian: has joined #ruby
[19:17:00] davidcelis: has joined #ruby
[19:17:29] mickey_mouse_2: has joined #ruby
[19:17:31] grill: has joined #ruby
[19:19:12] jackjackdripper: has joined #ruby
[19:19:18] jackjackdripper1: has joined #ruby
[19:19:59] mooru: has joined #ruby
[19:21:07] pwnd_nsfw: has joined #ruby
[19:22:35] ftj: has joined #ruby
[19:24:02] william3: has joined #ruby
[19:24:06] bqscott: has joined #ruby
[19:24:09] jackjackdripper: has joined #ruby
[19:24:24] Synthead: has joined #ruby
[19:24:51] theery: has joined #ruby
[19:24:53] snowy: has joined #ruby
[19:25:47] brendan-: has joined #ruby
[19:27:04] weaksauce: has joined #ruby
[19:27:35] brendan-: has joined #ruby
[19:29:24] shevy: code code code
[19:29:44] tuelz1: has joined #ruby
[19:30:16] Dimik: has joined #ruby
[19:30:18] zyzioziom: has joined #ruby
[19:30:50] [Butch]: has joined #ruby
[19:33:52] shevy: https://www.nczonline.net/blog/2013/06/25/eval-isnt-evil-just-misunderstood/
[19:34:03] shevy: I'm gonna use that as slogan next time says "don't use eval, it is evil"
[19:34:07] snowy: has joined #ruby
[19:34:18] shevy: even though that is an old link for javascript
[19:34:57] william3: has joined #ruby
[19:35:59] dsilfen: has joined #ruby
[19:36:13] symm-: has joined #ruby
[19:36:48] gnudon: has joined #ruby
[19:38:14] william3: has joined #ruby
[19:39:03] lemur: has joined #ruby
[19:39:50] TomPeed: has joined #ruby
[19:39:59] floatingpoint: has joined #ruby
[19:40:39] PedramT: has joined #ruby
[19:40:52] Polymorphism: has joined #ruby
[19:42:10] dudedudeman: has joined #ruby
[19:42:56] dudedudeman: howdy. i have a ruby script that i???m running that ends up giving me the name of afile. what i???d like to do, is have that name of the file accessible for a bash script to pull from and run using that name of the file. any best ways to do this?
[19:43:53] n_blownapart: has joined #ruby
[19:44:12] aegis3121: You could call the bash script at the end of the ruby script using the filename...
[19:44:27] finisherr: has joined #ruby
[19:44:35] anisha: has joined #ruby
[19:44:40] zapata: has joined #ruby
[19:45:19] Xeago: has joined #ruby
[19:45:42] selfadhesivefilm: has joined #ruby
[19:46:01] dudedudeman: taht???s a really good point
[19:46:07] grill: has joined #ruby
[19:46:14] dudedudeman: and heck, i???m already doing that for a curl command in the script lol
[19:47:02] jbrhbr1: has joined #ruby
[19:48:03] philtr_: has joined #ruby
[19:48:12] mfb2_: has joined #ruby
[19:48:12] n_blowna_: has joined #ruby
[19:48:26] nofacade: has joined #ruby
[19:48:55] Guest4184______: has joined #ruby
[19:49:07] stannard_: has joined #ruby
[19:49:07] yoongkang: has joined #ruby
[19:49:25] icedp: has joined #ruby
[19:49:29] twodayslate_: has joined #ruby
[19:49:38] kirun: has joined #ruby
[19:49:51] int: has joined #ruby
[19:50:00] kaspergrubbe: has joined #ruby
[19:50:26] frem_: has joined #ruby
[19:50:59] bb010g_: has joined #ruby
[19:51:07] russt: has joined #ruby
[19:51:10] sarlalian: has joined #ruby
[19:51:15] Arcanjo: has joined #ruby
[19:53:03] Arcanjo: has left #ruby: ()
[19:53:18] juddey: has joined #ruby
[19:53:51] serbalgi: has joined #ruby
[19:53:55] akaiiro: has joined #ruby
[19:55:11] Ox0dea: dudedudeman: Alternatively, wire things together as was intended: ./bash_script `ruby script.rb`
[19:55:20] william3: has joined #ruby
[19:55:53] dudedudeman: currently there???s one main bash script, that fires off a ruby script, adn then some other bash scripts from within itself
[19:57:07] Psyq: has joined #ruby
[19:57:27] yfeldblum: has joined #ruby
[19:57:58] shadoi: has joined #ruby
[19:58:38] pwnd_nsfw: has joined #ruby
[19:58:41] bauruine: has joined #ruby
[20:00:34] boboc: has joined #ruby
[20:01:18] stannard: has joined #ruby
[20:03:29] kwesidev: has joined #ruby
[20:04:39] kwesidev: has joined #ruby
[20:05:37] dopie: has joined #ruby
[20:05:40] Eiam: has joined #ruby
[20:06:02] nettoweb: has joined #ruby
[20:06:13] zambini: has joined #ruby
[20:06:13] kwesidev: has joined #ruby
[20:06:31] adac: has joined #ruby
[20:07:12] kwesidev: has joined #ruby
[20:07:35] dlitvak: has joined #ruby
[20:08:20] hasitha: has joined #ruby
[20:09:23] Azulinho: has joined #ruby
[20:09:39] gizmore: has joined #ruby
[20:09:55] yqt: has joined #ruby
[20:11:51] kwesidev1: has joined #ruby
[20:12:51] duckpuppy: has joined #ruby
[20:13:15] burgestrand: has joined #ruby
[20:13:18] kwesidev1: has joined #ruby
[20:15:15] kwesidev1: has joined #ruby
[20:15:56] adgtl_: has joined #ruby
[20:16:03] meves: has joined #ruby
[20:16:19] kwesidev1: has joined #ruby
[20:16:29] geekbri_: has joined #ruby
[20:16:41] grill: has joined #ruby
[20:17:26] roshanavand: has joined #ruby
[20:17:48] kwesidev1: has joined #ruby
[20:18:27] kwesidev1: has joined #ruby
[20:18:46] robbyoconnor: has joined #ruby
[20:19:57] kwesidev1: has joined #ruby
[20:20:33] User458764: has joined #ruby
[20:20:55] kwesidev1: has joined #ruby
[20:21:54] FernandoBasso: has joined #ruby
[20:22:19] kwesidev1: has joined #ruby
[20:23:16] robbyoconnor: has joined #ruby
[20:23:29] kwesidev2: has joined #ruby
[20:23:40] aegis3121: has joined #ruby
[20:24:55] n_blownapart: has joined #ruby
[20:25:18] mdw: has joined #ruby
[20:25:24] ferr: has joined #ruby
[20:25:40] kwesidev: has joined #ruby
[20:27:01] william3: has joined #ruby
[20:27:52] jordanm: has joined #ruby
[20:28:14] kwesidev: has joined #ruby
[20:28:23] mwlang: has joined #ruby
[20:28:27] DoubleMalt: has joined #ruby
[20:29:54] kwesidev: has joined #ruby
[20:30:28] tuelz1: has joined #ruby
[20:31:48] ur5us: has joined #ruby
[20:32:23] ftj: has joined #ruby
[20:32:26] kwesidev: has joined #ruby
[20:34:05] Infra-Red: has joined #ruby
[20:34:33] dsilfen: has joined #ruby
[20:34:41] kwesidev: has joined #ruby
[20:35:03] dlitvak: has joined #ruby
[20:35:04] baweaver: has joined #ruby
[20:35:55] spider-mario: has joined #ruby
[20:36:25] kwesidev: has joined #ruby
[20:37:09] miles: has joined #ruby
[20:38:28] kwesidev: has joined #ruby
[20:38:31] Infra-Red: has joined #ruby
[20:38:34] lucky: has joined #ruby
[20:39:51] baweaver: has joined #ruby
[20:40:17] kwesidev: has joined #ruby
[20:40:19] lemur: has joined #ruby
[20:40:27] ^CrYpto^: has joined #ruby
[20:40:45] k13nox: has joined #ruby
[20:41:39] sandstrom: has joined #ruby
[20:42:12] kwesidev: has joined #ruby
[20:42:33] BTRE: has joined #ruby
[20:43:12] dlitvak: has joined #ruby
[20:43:28] tomchapin: has joined #ruby
[20:44:14] ftj: has joined #ruby
[20:44:24] dsilfen: has joined #ruby
[20:44:41] kwesidev: has joined #ruby
[20:44:49] grill: has joined #ruby
[20:44:55] alexherbo2: has joined #ruby
[20:46:50] dayjo: has joined #ruby
[20:46:56] kwesidev: has joined #ruby
[20:47:32] dayjo: has left #ruby: ()
[20:47:33] stannard: has joined #ruby
[20:47:35] aegis3121: has joined #ruby
[20:48:23] floatingpoint: has joined #ruby
[20:48:26] kwesidev: has joined #ruby
[20:49:00] blackmesa: has joined #ruby
[20:50:33] kwesidev: has joined #ruby
[20:50:37] cpup: has joined #ruby
[20:51:17] segy: has joined #ruby
[20:51:28] meves: has joined #ruby
[20:53:03] kwesidev: has joined #ruby
[20:53:07] x77686d: has joined #ruby
[20:54:03] kwesidev: has joined #ruby
[20:54:38] mary5030: has joined #ruby
[20:55:34] serbalgi: has joined #ruby
[20:56:21] kwesidev: has joined #ruby
[20:56:52] tuelz1: has joined #ruby
[20:57:11] ziyadb: has joined #ruby
[20:57:19] kwesidev: has joined #ruby
[20:58:55] TheHodge: has joined #ruby
[20:59:04] atomical_: has joined #ruby
[20:59:40] kirillzh: has joined #ruby
[20:59:42] kwesidev: has joined #ruby
[21:00:07] ramfjord: has joined #ruby
[21:00:09] ellisTAA: has joined #ruby
[21:01:02] ftj: has joined #ruby
[21:01:05] kirillzh: has joined #ruby
[21:01:18] kwesidev: has joined #ruby
[21:01:21] pawnbox: has joined #ruby
[21:01:43] karapetyan: has joined #ruby
[21:01:46] musgravejw: has joined #ruby
[21:02:44] dudedudeman: has joined #ruby
[21:02:51] kwesidev: has joined #ruby
[21:04:03] kwesidev: has joined #ruby
[21:05:11] kwesidev: has joined #ruby
[21:06:03] toretore: has joined #ruby
[21:06:53] kwesidev: has joined #ruby
[21:06:57] diegoviola: has joined #ruby
[21:07:31] dsilfen: has joined #ruby
[21:07:33] bronson: has joined #ruby
[21:07:42] at46: has joined #ruby
[21:07:44] glcx: has joined #ruby
[21:08:00] shevy: got a question... if your string is string = "php-7.0.3.tar.xz"
[21:08:39] at46_: has joined #ruby
[21:08:58] shevy: is there a standard way in ruby to find out the next logical version candidates? that is.. for "7.0.3", three candidates would be possible... "7.0.4", "7.1.0" and also "8.0.0" ... it's trivial to write this myself I guess but I wondered if gem itself or some other software has this already
[21:08:59] dlitvak_: has joined #ruby
[21:09:32] mary5030: has joined #ruby
[21:09:37] phredus: has joined #ruby
[21:09:59] rickmasta: has joined #ruby
[21:10:03] eam: shevy: like http://ruby-doc.org/stdlib-2.0.0/libdoc/rubygems/rdoc/Gem/Version.html#method-i-bump ?
[21:10:24] eam: that seems kinda not useful though
[21:10:55] shevy: ah it is semi-useful!
[21:10:58] shevy: Gem::Version.new("7.0.3").bump.to_s # => "7.1"
[21:11:24] eam: why would it only bump the minor though
[21:11:32] pizzaops: Do you have to install the `psych` gem generally? I see it listed on rubygems.org but it also seems to always already be present whenever I install Ruby.
[21:11:43] pizzaops: So I'm not clear on if it's built in or if I need to list it in my gemspecs.
[21:12:03] danielwzd: has joined #ruby
[21:12:11] Ox0dea: pizzaops: Psych is bundled with Ruby.
[21:12:18] Ox0dea: >> require 'yaml'; YAML
[21:12:33] pizzaops: Yeah, I know about require 'yaml' but I can also require 'psych', so I wasn't sure.
[21:12:38] Ox0dea: Where's the bot?!
[21:12:51] shevy: pizzaops you can also require 'syck' :)
[21:12:59] shevy: (after you installed the gem that is)
[21:13:07] pizzaops: Thanks folks.
[21:13:14] Ox0dea: pizzaops: That would've evaluated to `Psych` was the point I meant to make.
[21:15:03] mary5030: has joined #ruby
[21:15:19] adgtl: has joined #ruby
[21:16:03] nettoweb: has joined #ruby
[21:17:41] jgt1: has joined #ruby
[21:18:35] freerobby: has joined #ruby
[21:21:35] betabet: has joined #ruby
[21:21:42] Ox0dea: shevy: http://dazuma.github.io/versionomy/
[21:22:11] mkosaki: has joined #ruby
[21:22:14] e4xit: has joined #ruby
[21:22:32] jamw: has joined #ruby
[21:22:37] dsilfen: has joined #ruby
[21:23:02] Ox0dea: The name horrifies you as well, I see.
[21:23:15] shevy: no I am thinking, that usually takes a while
[21:23:36] shevy: right now I am wondering whether "major", "minor", "tiny" is a common name
[21:25:17] william3: has joined #ruby
[21:25:48] dsilfen: has joined #ruby
[21:25:49] FooMunki: has joined #ruby
[21:26:01] baweaver: has joined #ruby
[21:26:20] eam: major, minor, patch
[21:27:24] CloCkWeRX: has joined #ruby
[21:28:22] last_staff: has joined #ruby
[21:28:46] ruby[bot]: has joined #ruby
[21:28:46] ChanServ: +o ruby[bot]
[21:29:09] snz: has joined #ruby
[21:29:42] ElFerna_: has joined #ruby
[21:30:06] Ox0dea: MRI uses "teeny".
[21:30:31] Ox0dea: Major, minor, teeny, and patch, to clarify.
[21:30:45] betabet: has joined #ruby
[21:30:45] solocshaw: has joined #ruby
[21:31:13] shevy: now I need to pull that dude with a beard on you Ox0dea - I can't believe you!
[21:31:32] Ox0dea: shevy: Can you please link to this dude?
[21:31:46] shevy: It's somewhere in the channel log!
[21:32:39] Ox0dea: https://www.youtube.com/watch?v=TZB8HRrJ0KM
[21:32:43] trinaldi: has joined #ruby
[21:33:23] shevy: ack now I am blind
[21:34:47] jbrhbr: has joined #ruby
[21:36:05] glcx: has joined #ruby
[21:36:05] glcx: has joined #ruby
[21:37:29] Ox0dea: http://betterthanack.com/
[21:38:16] djbkd: has joined #ruby
[21:38:22] glcx: has joined #ruby
[21:39:49] dlitvak: has joined #ruby
[21:43:04] nik0: has joined #ruby
[21:43:16] gizless: has joined #ruby
[21:43:56] solars: has joined #ruby
[21:44:04] solocshaw1: has joined #ruby
[21:44:20] atomical: has joined #ruby
[21:44:49] Cohedrin: has joined #ruby
[21:45:50] arlek: has joined #ruby
[21:46:46] dsilfen: has joined #ruby
[21:49:46] cdg: has joined #ruby
[21:49:59] yoongkang: has joined #ruby
[21:50:44] cdg: has joined #ruby
[21:51:04] pawnbox: has joined #ruby
[21:52:25] b01t: has joined #ruby
[21:53:08] kbni: is it possible to overload !object?
[21:53:12] b01t: has left #ruby: ("WeeChat 1.3")
[21:53:26] Ox0dea: Override? Certainly.
[21:53:47] Ox0dea: >> class Fixnum; def !; 42 end end; !0
[21:53:48] ruby[bot]: Ox0dea: # => 42 (https://eval.in/512113)
[21:54:12] apeiros: oy! 42 is indeed !0 :D
[21:54:23] Ox0dea: Computers can't lie.
[21:54:49] eam: well sure they can
[21:55:03] eam: indeed, and I'm a computer am I not?
[21:55:35] vqrs: has joined #ruby
[21:55:43] Ox0dea: http://i.imgur.com/7Oj4n6i.gif
[21:55:53] blackgoat: has joined #ruby
[21:56:11] VeryBewitching: Ox0dea: That made me smile.
[21:56:15] shevy: you are the memegenerator
[21:56:28] s00pcan: has joined #ruby
[21:57:01] Ox0dea: Six seasons and a movie!
[21:57:06] MaveonRemaes: has joined #ruby
[21:57:23] VeryBewitching: eam: A biological creature is different from digital instructions.
[21:57:41] eam: is it? how?
[21:57:49] hxegon: has joined #ruby
[21:58:06] Ox0dea: The only difference is the substrate.
[21:58:14] VeryBewitching: eam: Biologics are not just thinking things, they are feeling things. Our body exists in a state of constant chemical reaction.
[21:58:30] VeryBewitching: eam: A computer is simple compared to us, and they do exactly what you tell them to.
[21:58:43] Ox0dea: We do exactly what the laws of physics tell us to.
[21:58:54] shevy: I am a magician.
[21:58:58] eam: I hear you saying that it's merely a matter of relative complexity -- but that they're both computers
[21:59:30] VeryBewitching: Analysis != Ecstasy
[21:59:42] eam: VeryBewitching: https://de.wikipedia.org/wiki/TT-100
[21:59:50] Ox0dea: You know I don't speak Spanish.
[22:00:11] VeryBewitching: Your brain doesn't have pathways, it has webs upon webs of neural acreage.
[22:00:33] eam: well, it has both. my laptop also has both ...
[22:00:42] atomical_: has joined #ruby
[22:00:58] zambini: has joined #ruby
[22:01:22] moeabdol1: has joined #ruby
[22:01:29] mary5030_: has joined #ruby
[22:01:36] VeryBewitching: To think that a thing we created will defeat us, or lead to our defeat, demeans our species.
[22:01:39] Limix: has joined #ruby
[22:02:01] eam: how do you think your parents feel?
[22:02:05] VeryBewitching: Computers don't try to survive, they do not fear or worry.
[22:02:10] mary5030_: has joined #ruby
[22:02:29] VeryBewitching: Sorry, forgot this was #ruby for a bit there.
[22:02:42] Ox0dea: Where do we rendezvous?
[22:02:47] eam: (that german link, btw, was about the development of a DNA based computer which could solve the hamiltonian path problem)
[22:02:53] k13nox: has joined #ruby
[22:03:03] shevy: a german computer?!
[22:03:10] eam: well, all germans are computers
[22:03:12] kbni: I for one welcome our logical AI overlords
[22:03:13] Ox0dea: The first computer was a German one.
[22:03:38] Ox0dea: It wasn't called the Entscheidungsproblem for nothin'.
[22:03:39] shevy: kbni skynet!!!
[22:03:51] shevy: oh god... those long german words...
[22:03:58] centrx: https://www.youtube.com/watch?v=lj1MCjeFxrM
[22:04:12] VeryBewitching: shevy: It really depends on who is saying them, and how many drinks they've had.
[22:04:31] eam: I can speak most languages if I have enough booze
[22:04:35] zacstewa_: has joined #ruby
[22:05:22] apeiros: eam: is that like lots of people can sing if they have enough booze?
[22:05:29] JCOE: has joined #ruby
[22:05:34] eam: indeed, indeed
[22:05:52] meves: has joined #ruby
[22:05:54] kbni: Aside from Rspec - what other test libraries are out there? I'm specifically after something as easy as possible for a newbie such as myself to use.
[22:06:01] Ox0dea: minitest.
[22:06:07] kbni: (new to ruby and to ttd)
[22:06:20] kbni: yes, thanks
[22:06:22] Ox0dea: No worries.
[22:06:23] havenwood: kbni: Minitest is simple and ships with Ruby.
[22:06:39] mary5030: has joined #ruby
[22:06:43] ASTP001: has joined #ruby
[22:08:19] Ox0dea: VeryBewitching: Is it a stretch, then, for AlphaGo's developers to ascribe to it an "intuitive" model of the game?
[22:08:32] uris: has joined #ruby
[22:09:05] ASTP001: has joined #ruby
[22:09:22] VeryBewitching: Ox0dea: There is more than one type of game.
[22:09:36] Ox0dea: I'm learning so many things.
[22:09:45] eam: imagine a computer, convinced that its own computations are somehow more than mere computations
[22:10:03] apeiros: ?ot VeryBewitching & eam
[22:10:03] ruby[bot]: VeryBewitching: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
[22:10:12] havenwood: eam: I'm familiar with these "humans" you speak of.
[22:10:25] VeryBewitching: apeiros: I had digressed, above, sorry :D
[22:10:29] tomphp: has joined #ruby
[22:10:37] havenwood: <3 Minitest
[22:11:00] VeryBewitching: I prefer RSpec myself.
[22:11:03] eam: is there a gem for implementing a strange loop in ruby
[22:11:27] adaedra: a strange loop...?
[22:11:44] eam: https://en.wikipedia.org/wiki/Strange_loop
[22:11:56] VeryBewitching: eam: if you're creative, you can make hashes pretty hashy.
[22:12:09] Ox0dea: eam: Kernel#loop without a block is pretty strange.
[22:12:47] Ox0dea: See: https://eval.in/512115
[22:15:12] pdoherty: has joined #ruby
[22:17:05] elifoster: has joined #ruby
[22:17:18] PaulCape_: has joined #ruby
[22:18:25] yfeldblum: has joined #ruby
[22:19:01] stevemackinnon: has joined #ruby
[22:19:14] kobain: has joined #ruby
[22:19:41] kirillzh: has joined #ruby
[22:20:48] n_blownapart: has joined #ruby
[22:22:21] eam: Ox0dea: that really is strange. Why is ruby -e'loop.any?' uninterruptable?
[22:22:41] pawnbox: has joined #ruby
[22:22:51] eam: some kind of ensure nonsense?
[22:24:10] Musashi007: has joined #ruby
[22:24:32] kirillzh: has joined #ruby
[22:24:47] dlitvak: has joined #ruby
[22:24:47] coyo: has joined #ruby
[22:25:09] Ox0dea: eam: Close! s/ensure/retry/, it seems.
[22:25:44] dc4: has joined #ruby
[22:26:36] k13nox: has joined #ruby
[22:26:59] djbkd: has joined #ruby
[22:27:20] Gadgetoid: has joined #ruby
[22:27:48] Ox0dea: What's weird is that #any? without a block uses an implicit one like `{ |x| x }`, but not here.
[22:28:25] symm-: has joined #ruby
[22:28:46] Yeomra: has joined #ruby
[22:31:20] Ebok: has joined #ruby
[22:31:35] x77686d: has joined #ruby
[22:32:19] mephistophocles: has joined #ruby
[22:32:38] blackmesa: has joined #ruby
[22:33:06] dlitvak_: has joined #ruby
[22:34:31] william3: has joined #ruby
[22:36:30] atomical: has joined #ruby
[22:38:17] crdpink: has joined #ruby
[22:39:58] jgt2: has joined #ruby
[22:40:38] baweaver: has joined #ruby
[22:41:17] cpup: has joined #ruby
[22:41:22] rgtk: has joined #ruby
[22:43:43] zenlot1: has joined #ruby
[22:44:29] atomical_: has joined #ruby
[22:44:38] hxegon: has joined #ruby
[22:44:59] cdg_: has joined #ruby
[22:46:46] mary5030: has joined #ruby
[22:48:38] marchelzo: has joined #ruby
[22:50:47] atomical: has joined #ruby
[22:54:19] snowy: has joined #ruby
[22:54:52] Azure: has joined #ruby
[22:55:25] dlitvak: has joined #ruby
[22:57:25] phredus: has joined #ruby
[22:57:32] TomPeed: has joined #ruby
[22:57:41] baweaver: has joined #ruby
[22:57:44] ledestin: has joined #ruby
[22:59:38] william3: has joined #ruby
[23:01:18] Rodya_: has joined #ruby
[23:01:36] malconis: has joined #ruby
[23:01:41] meves: has joined #ruby
[23:02:19] matp: has joined #ruby
[23:02:25] pawnbox: has joined #ruby
[23:03:02] theery: has joined #ruby
[23:03:04] nunchuck: has joined #ruby
[23:03:16] ftj: has joined #ruby
[23:03:20] Rodya_: has joined #ruby
[23:05:20] jeregrine: has left #ruby: ()
[23:05:40] yoongkang: has joined #ruby
[23:07:05] dsilfen: has joined #ruby
[23:07:24] vishwa: Getting this weird error msg: failed to allocate memory (NoMemoryError)
[23:07:27] vishwa: Getting this weird error msg: failed to allocate memory (NoMemoryError)
[23:07:50] vishwa: Dammit keyboard
[23:08:22] vishwa: offending line is f = f.to_i where f is the name of a json file that I've just stripped of the 'json' part
[23:08:31] jottr_: has joined #ruby
[23:08:31] vishwa: why would I get this error?
[23:08:41] Ox0dea: That's not the line causing that error.
[23:08:43] mary5030_: has joined #ruby
[23:09:25] Ox0dea: >> Array.new(99999999) rescue $!
[23:09:26] ruby[bot]: Ox0dea: # => failed to allocate memory (NoMemoryError) ...check link for more (https://eval.in/512143)
[23:09:57] baweaver: has joined #ruby
[23:10:13] vishwa: Ox0dea: next line I'm passing this f into a method
[23:10:19] Ox0dea: vishwa: Post code.
[23:10:20] vishwa: that's the line calling error
[23:10:29] vishwa: it's very convoluted mate, I can't really simplify it
[23:10:30] k13nox: has joined #ruby
[23:10:35] vishwa: let me see what I can do
[23:10:35] Ox0dea: Good luck.
[23:11:05] symm-: has joined #ruby
[23:11:16] Ox0dea: String#to_i is extremely unlikely to ever result in a NoMemoryError.
[23:11:53] marchelzo: do most people use pry over irb?
[23:12:10] baweaver: `free` or `top` in unix-like OSs to see memory usage
[23:12:21] baweaver: command prompt in windows
[23:12:28] baweaver: I seriously doubt Ruby did it.
[23:12:35] baweaver: marchelzo: yeah
[23:13:54] Ox0dea: vishwa: It's probably the case that you're inadvertently growing some collection way faster than you think you are.
[23:14:04] zyzioziom: has joined #ruby
[23:14:37] KnownSyntax: has joined #ruby
[23:14:39] KnownSyntax: has joined #ruby
[23:15:02] TomyLobo: has joined #ruby
[23:15:25] Ox0dea: >> a = [1,2,3]; loop { a.concat a } # vishwa
[23:15:26] ruby[bot]: Ox0dea: # => failed to allocate memory (NoMemoryError) ...check link for more (https://eval.in/512145)
[23:15:33] pizzaops: This feels really inelegant to me: https://gist.github.com/pizzaops/a0bba1d73286abdabc35 ??? Is there some succinct way of creating an array of all the lines in a file?
[23:15:53] pizzaops: Aside from just doing it on a single line with curly braces.
[23:15:54] Ox0dea: &ri File#each_line @pizzaops
[23:15:54] `derpy: pizzaops: http://ruby-doc.org/core-2.3.0/IO.html#method-i-each_line
[23:16:59] pizzaops: But wouldn't that be the same `derpy? lines = []; File.read('/some/path').each_line { |line| lines.push(line)};
[23:17:40] Ox0dea: `derpy: All yours.
[23:17:44] karapetyan: has joined #ruby
[23:17:47] mary5030: has joined #ruby
[23:17:58] ferr: has joined #ruby
[23:18:41] mary5030: has joined #ruby
[23:19:10] canton7: has joined #ruby
[23:19:17] law: has joined #ruby
[23:19:53] cpup: has joined #ruby
[23:19:57] law: hey all, I'm trying to spider through a bunch of nested hashes and create a NEW nested hash that is more easily parsable for later on in my program.
[23:20:06] law: I am... getting bogged down by Hash syntax though
[23:20:18] Ox0dea: pizzaops: #each_line will give you back an Enumerator over all the lines in the file. Assuming you want to do some further transformation, that's basically like having an Array only better.
[23:20:48] Ox0dea: law: 2.3's Hash#dig method might help ease the pain a little.
[23:20:58] pizzaops: Ah right I can skip the actual saving it to a variable step as an array step. That makes sense.
[23:21:38] reactor16: has joined #ruby
[23:22:35] dlitvak_: has joined #ruby
[23:22:44] PaulCapestany: has joined #ruby
[23:23:20] jamw: has joined #ruby
[23:23:21] mary5030: has joined #ruby
[23:24:35] s00pcan: has joined #ruby
[23:24:58] dlitvak__: has joined #ruby
[23:25:03] law: http://pastebin.com/X1Vsy6VN
[23:25:04] ruby[bot]: law: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/803a8aa6d3f1219e61c2
[23:25:04] ruby[bot]: law: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[23:25:04] mg^: pizzaops: IO::readlines
[23:25:19] law: noted, thanks rubybot
[23:25:39] mg^: if you want it as an array, that is
[23:26:05] pizzaops: mg^: thanks!
[23:26:32] law: my target platform is Ruby 2.2.3, unfortunately
[23:26:48] dlitvak: has joined #ruby
[23:27:30] baweaver: has joined #ruby
[23:27:34] JDiPierro: has joined #ruby
[23:27:46] law: I'm trying to kick off the festivities with something like: https://gist.github.com/law/b8990af9bbf437557073
[23:28:01] law: but I'm getting lots of syntax errors, and I can't quite suss out what's wrong with that
[23:28:10] law: "SyntaxError: unexpected =>, expecting keyword_end"
[23:29:01] Ox0dea: pizzaops: In that case, you might even want `IO.read('foo').split(?\n)`.
[23:29:55] Ox0dea: law: Nix the '>' on Line 2.
[23:31:10] law: sweeeet, that did it. thank you!
[23:31:24] cpup: has joined #ruby
[23:32:11] Ropeney: has joined #ruby
[23:32:14] pawnbox: has joined #ruby
[23:32:29] matp: has joined #ruby
[23:33:34] Ox0dea: Happy to help. :)
[23:33:35] phredus: has joined #ruby
[23:35:01] k13nox: has joined #ruby
[23:35:02] Uranio: has joined #ruby
[23:35:06] dsilfen: has joined #ruby
[23:37:26] spooq: has joined #ruby
[23:37:32] wanderer: has joined #ruby
[23:39:51] law: any thoughts on why this is throwing NilClass? https://gist.github.com/law/6819f03fb5b7c1622706
[23:40:04] _Tariq: has joined #ruby
[23:40:06] cajone: has left #ruby: ()
[23:40:27] law: err, "No Method Error", even
[23:40:32] dlitvak_: has joined #ruby
[23:40:40] chipotle: has joined #ruby
[23:40:48] uber: has joined #ruby
[23:40:49] law: I can reference streamresult['streams'][0]['media_info']['width'] just fine
[23:40:53] braincrash: has joined #ruby
[23:42:28] baweaver: 0, yes, others?
[23:42:33] baweaver: probably not so much
[23:42:40] baweaver: something be blank
[23:42:52] giraffe: has joined #ruby
[23:43:45] law: ooooh, excellent point
[23:44:14] law: I *believe* others, can I test for existence of that key/value before I assign it to the new hash?
[23:45:05] Ox0dea: Not from within the Hash being constructed, no.
[23:45:48] al2o3-cr: has joined #ruby
[23:45:55] mikeiniowa: has joined #ruby
[23:46:57] phredus_: has joined #ruby
[23:47:32] baweaver: also why all the string interpolation?
[23:47:52] volty: has joined #ruby
[23:47:57] baweaver: stream['media_info'] && stream['media_info']['height']
[23:48:32] aaronm: has left #ruby: ()
[23:49:01] cajone: has joined #ruby
[23:49:36] radgeRayden: has joined #ruby
[23:50:09] ElFerna_: has joined #ruby
[23:51:02] CloCkWeRX: has joined #ruby
[23:51:36] mary5030: has joined #ruby
[23:54:34] law: because I don't know a better way to do it :-(
[23:55:05] IrishGringo: has joined #ruby
[23:55:10] uris: has joined #ruby
[23:55:32] antgel: has joined #ruby
[23:56:05] dlitvak: has joined #ruby
[23:56:51] law: I'm certainly open to a better way to do it!
[23:57:26] dlitvak__: has joined #ruby