« Back to channel list

#ruby - 07 November 2017

« Back 1 day Forward 1 day »
[00:02:03] baweaver: avdi also does the Tapas route (small video lessons for a fixed monthly)
[00:02:27] JsilverT: has joined #ruby
[00:05:55] mkroman: has joined #ruby
[00:09:18] DWSR: has joined #ruby
[00:10:18] waveprop: how can i unit test a function which adds a value to a hash. just expect reading that key's value to return true?
[00:10:33] havenwood: waveprop: Check that the Hash was modified.
[00:10:47] waveprop: havenwood: okay cool. thanks
[00:13:25] sgen_: has joined #ruby
[00:13:54] baweaver: waveprop: I'd use merge instead if possible, don't mutate the original argument
[00:14:05] baweaver: makes things easier to test and verify later.
[00:14:56] dminuoso: ACTION smells baweaver's immutability
[00:16:25] waveprop: baweaver: thanks. use merge instead of what now
[00:16:31] Psybur: has joined #ruby
[00:17:00] waveprop: ACTION needs to read about mutability
[00:17:38] RickHull: >> h = Hash.new; h[:foo] = :bar; p h; h.merge(foo: :baz)
[00:17:39] ruby[bot]: RickHull: # => {:foo=>:bar} ...check link for more (https://eval.in/894189)
[00:18:20] havenwood: waveprop: #merge! mutates the receiver (the instance of the hash) but #merge doesn't
[00:18:21] RickHull: hsh1.merge(hsh2) says that hsh2 kv pairs should get applied to hsh1
[00:18:27] aviraldg: has joined #ruby
[00:18:27] M107262[m]: has joined #ruby
[00:18:27] Hanma[m]: has joined #ruby
[00:18:28] yana[m]: has joined #ruby
[00:18:28] lasenna[m]: has joined #ruby
[00:18:28] torarne: has joined #ruby
[00:18:28] dtcristo: has joined #ruby
[00:18:28] jonjits[m]: has joined #ruby
[00:18:28] watzon: has joined #ruby
[00:18:28] Orbixx[m]: has joined #ruby
[00:18:28] astronavt[m]: has joined #ruby
[00:18:29] zalipuha[m]: has joined #ruby
[00:18:29] haylon: has joined #ruby
[00:18:29] Giphy[m]: has joined #ruby
[00:18:29] velu_aon[m]: has joined #ruby
[00:18:29] dman[m]: has joined #ruby
[00:18:29] KevinMGranger: has joined #ruby
[00:18:29] turt2live: has joined #ruby
[00:18:31] RickHull: and a new hash is returned
[00:18:34] RickHull: hsh1 is not modified
[00:18:35] aagdbl[m]: has joined #ruby
[00:18:35] kua[m]: has joined #ruby
[00:18:36] itmerc[m]: has joined #ruby
[00:18:36] Matt[m]2: has joined #ruby
[00:18:37] gokul_mr[m]: has joined #ruby
[00:18:58] jphase: has joined #ruby
[00:19:01] RickHull: merge is a great way for user vars to override defaults
[00:19:40] RickHull: set up your class defaults in a constant. reify your config by CONSTANT.merge(user_params).merge(env_vars) # or whatever
[00:19:47] waveprop: okay, nice. so i can use .merge() to add elements to a hash, and it is better to cobine them into a new hash?
[00:20:01] dminuoso: waveprop: Yes.
[00:20:08] RickHull: it's good to be aware of the difference. I add keys to hashes all the time ;)
[00:20:29] dminuoso: waveprop: Generally "mutating" elements in place might seem shorter, but it leads to far more unexpected scenarios down the right.
[00:20:41] dminuoso: It's harder to reason about such code.
[00:20:51] dminuoso: *down the road.
[00:20:52] waveprop: okay. so, why is it bad to mutate the original hash; isnt it more efficient to not create a new object in memory
[00:21:25] havenwood: waveprop: There are tradeoffs, and it's often not as much of a win to mutate as you might expect.
[00:21:48] havenwood: waveprop: A functional style in Ruby can save you many headaches.
[00:21:52] baweaver: Efficient yes, but if you have 10 functions that may mutate something in an unexpected manner it gets hard to trace. This way you don't have to duplicate everything all the time either
[00:22:02] baweaver: Take for instance a recent case I had in Javascript
[00:22:25] dminuoso: waveprop: One of the problems is that Ruby has call-by-sharing behavior. Which means you get an argument, and you just transform that hash to store it in a database. Now what you (and nobody else considered), is that the caller reuses that same hash that was passed to you
[00:22:25] baweaver: I was using reverse to reverse a list for display. When I called it twice everything was fine, all tests were green
[00:22:31] dminuoso: Not knowing that you mutated it.
[00:22:36] bmurt: has joined #ruby
[00:22:37] baweaver: when I called it once more all of the sudden everything broke and I had no idea why
[00:23:18] conta: has joined #ruby
[00:23:30] RickHull: for most newbies, mutation is intuitive, and returning a new object feels inefficient
[00:23:41] RickHull: but it is best to understand and use immutable behavior first, by default
[00:23:49] RickHull: and only reach for mutability if needed
[00:24:16] al2o3-cr: h = {foo: :baz}; {foo: :bar, **h} should be faster (maybe)
[00:24:42] havenwood: The double splat is nice.
[00:24:47] dminuoso: I promise that in most cases, performance concerns can safely be ignored. Algorithmic choices are much more relevant, but only address issues if a performance problem exists and has been profiled to that part.
[00:25:04] dminuoso: asm>> {foo: :bar, **h}
[00:25:05] ruby[bot]: dminuoso: I have disassembled your code, the result is at https://eval.in/894190
[00:25:10] dminuoso: asm>> h.merge({foo: :bar})
[00:25:12] cagomez: has joined #ruby
[00:25:20] ruby[bot]: dminuoso: I have disassembled your code, the result is at https://eval.in/894191
[00:25:43] RickHull: how does it know what h is?
[00:26:12] dminuoso: RickHull: it doesnt
[00:26:15] dminuoso: 0003 opt_send_without_block <callinfo!mid:h, argc:0, FCALL|VCALL|ARGS_SIMPLE>, <callcache>
[00:26:18] waveprop: thank you guys. i'll experiment with this
[00:26:35] havenwood: RickHull: h from ERB or from Rails?
[00:26:51] RickHull: in the asm>> example
[00:27:03] dminuoso: asm>> {foo:, :baz}.merge({foo: :bar})
[00:27:04] ruby[bot]: dminuoso: I have disassembled your code, the result is at https://eval.in/894192
[00:27:11] dminuoso: asm>> {foo: :baz}.merge({foo: :bar})
[00:27:12] ruby[bot]: dminuoso: I have disassembled your code, the result is at https://eval.in/894193
[00:28:04] dminuoso: al2o3-cr: based on the assembly Id say there's no real difference
[00:28:15] waveprop: where should i put my unit tests when i have separate class files and a main instance-level application file?
[00:28:48] al2o3-cr: dminuoso: thats why i said maybe, but it should be in theory.
[00:28:49] waveprop: i.e. config.ru and app.rb
[00:28:50] RickHull: in general, from your project dir: put classes and modules in lib/ and tests in test/
[00:28:58] dminuoso: al2o3-cr: whats your reasoning?
[00:29:04] waveprop: okay RickHull
[00:29:06] RickHull: waveprop: oh, for web projects, maybe some differences
[00:29:06] baweaver: lib/name/class.rb -> spec/name/class_spec.rb
[00:29:12] waveprop: RickHull: np
[00:29:18] mim1k: has joined #ruby
[00:29:26] baweaver: spec / test, depends on preference / tool really
[00:29:46] al2o3-cr: dminuoso: benchmark it, if you will
[00:29:53] waveprop: okay. i'm using minitest::test and ::spec
[00:29:54] eckhardt: has joined #ruby
[00:29:54] dminuoso: ACTION does not know how to benchmark
[00:29:56] RickHull: waveprop: also, learn about: `ruby -I lib path/to/script.rb`
[00:29:57] dminuoso: but turns out baweaver knows!
[00:30:04] dminuoso: ACTION is just lazy
[00:30:15] waveprop: RickHull: okay cool. thanks
[00:30:31] al2o3-cr: if merge is faster **, i'll plait saw dust.
[00:30:31] dminuoso: >> {**h, foo: :bar}
[00:30:32] ruby[bot]: dminuoso: # => undefined local variable or method `h' for main:Object (NameError) ...check link for more (https://eval.in/894197)
[00:30:36] RickHull: waveprop: if you understand how ruby's load path works, then you don't need weird require statements or require_relative (for many things, anyway)
[00:30:38] dminuoso: asm>> {**h, foo: :bar}
[00:30:39] ruby[bot]: dminuoso: I have disassembled your code, the result is at https://eval.in/894198
[00:30:59] dminuoso: Okay *that* is not a wise thing to do.
[00:31:16] dminuoso: Does anyone know what the `swap` instruction does?
[00:31:23] dminuoso: baweaver: Please don't say `swapping`
[00:31:32] RickHull: it exchanges
[00:32:00] RickHull: it makes the machine grind to a halt while it downloads more ram?
[00:32:14] baweaver: >>require'benchmark';n=100_000;"splat: #{Benchmark.measure{n.times{h={a: :b}; {c: :d, **h}}}} - merge: #{Benchmark.measure{n.times{h={a: :b}; {c: :d}.merge(h)}}}"
[00:32:15] ruby[bot]: baweaver: # => "splat: 0.230000 0.000000 0.230000 ( 0.243101)\n - merge: 0.390000 0.000000 0.390000 ( ...check link for more (https://eval.in/894200)
[00:32:26] dminuoso: Mmmm, it just swaps the top two values on the stack
[00:32:30] baweaver: what was that about sawdust?
[00:32:35] dminuoso: That seems like a compiler bug
[00:33:07] RickHull: how does one plait sawdust anyhow?
[00:33:18] baweaver: I have a feeling we're going to find out :D
[00:33:52] baweaver: >>require'benchmark';n=100_000;"splat: #{Benchmark.measure{n.times{h={a: :b}; {c: :d, **h}}}} - merge: #{Benchmark.measure{n.times{h={a: :b}; {c: :d}.merge(h)}}}"
[00:33:54] ruby[bot]: baweaver: # => "splat: 0.260000 0.000000 0.260000 ( 0.260387)\n - merge: 0.470000 0.000000 0.470000 ( ...check link for more (https://eval.in/894202)
[00:34:03] baweaver: Huh, well that's interesting.
[00:34:26] eckhardt: has joined #ruby
[00:34:36] dminuoso: What did you learn?
[00:34:47] RickHull: splat all the things?
[00:35:20] dminuoso: "splat: 1.080000 0.030000 1.110000 ( 1.126947)\n - merge: 2.200000 0.040000 2.240000 ( 2.271193)\n"
[00:35:24] dminuoso: What causes that massive difference?
[00:35:32] RickHull: i'm telling you, it's the darkside. deathstars
[00:35:34] enterprisey: has joined #ruby
[00:35:35] dminuoso: ACTION facepalms
[00:39:51] _aeris_: has joined #ruby
[00:41:38] RickHull: https://gist.github.com/rickhull/56bc3326c05f848d4428e87280b52d60
[00:45:41] Dimik: anybody using capybara?
[00:45:56] baweaver: dminuoso: so, are we livestreaming the sawdust experience then?
[00:47:02] oetjenj: has joined #ruby
[00:47:12] alveric4: has joined #ruby
[00:49:53] baweaver: RickHull: your example is corrupted
[00:49:57] baweaver: ah, nevermind
[00:50:03] baweaver: It doesn't mutate it at all
[00:50:13] lucz: has joined #ruby
[00:50:32] RickHull: the mutation ones should be mutating
[00:50:37] RickHull: i don't know if it gets optimized out
[00:51:09] RickHull: but yeah, mutating on a new object each time
[00:51:30] Dimik: ACTION np: Dark Drum & Bass MIX [VOL.4] [HQ] [43:00m/320kbps/44kHz]
[00:53:35] veeti: has joined #ruby
[00:54:44] alan_w: has joined #ruby
[00:56:58] DWSR: Hey all, I have an app that is using Passenger standalone that is built in a Docker container based on phusion/baseimage. I'm in the process of building it in ruby-alpine instead to slim the image down. How can I get Passenger to download a binary rather than trying to compile from source?
[00:58:07] PaulCapestany: has joined #ruby
[00:58:43] sucks: has joined #ruby
[01:00:09] swills: has joined #ruby
[01:00:09] swills: has joined #ruby
[01:00:11] swills_: has joined #ruby
[01:01:26] RickHull: is passenger itself being compiled here?
[01:01:49] RickHull: what component is being compiled? presumably written in C
[01:04:34] def_jam: has joined #ruby
[01:04:58] eb0t_: has joined #ruby
[01:05:15] orbyt_: has joined #ruby
[01:05:35] swills: has joined #ruby
[01:06:16] swills_: has joined #ruby
[01:06:34] cdg_: has joined #ruby
[01:12:16] goyox86: has joined #ruby
[01:13:47] eblip: has joined #ruby
[01:13:56] def_jam: has joined #ruby
[01:19:31] eblip: has joined #ruby
[01:19:49] def_jam: has joined #ruby
[01:20:07] weaksauce: has joined #ruby
[01:20:43] imode: has joined #ruby
[01:21:32] ap4y: has joined #ruby
[01:22:30] veeti: has joined #ruby
[01:22:58] gigetoo: has joined #ruby
[01:22:59] ramfjord: has joined #ruby
[01:25:25] jdawgaz: has joined #ruby
[01:26:09] cagomez: has joined #ruby
[01:28:51] ramfjord: has joined #ruby
[01:30:19] sonne: has joined #ruby
[01:31:45] bdnelson: has joined #ruby
[01:39:36] veeti: has joined #ruby
[01:39:53] jdawgaz: has joined #ruby
[01:40:38] jdawgaz: has joined #ruby
[01:41:28] jdawgaz: has joined #ruby
[01:41:29] ramfjord: has joined #ruby
[01:42:15] jdawgaz: has joined #ruby
[01:43:05] jdawgaz: has joined #ruby
[01:43:51] jdawgaz: has joined #ruby
[01:44:40] jdawgaz: has joined #ruby
[01:45:25] jdawgaz: has joined #ruby
[01:46:15] jdawgaz: has joined #ruby
[01:47:05] jdawgaz: has joined #ruby
[01:47:59] ogres: has joined #ruby
[01:48:33] ramfjord: has joined #ruby
[01:52:09] b100s: has joined #ruby
[01:52:25] b100s: hi2all! when i do `puts 'hello'` i send message puts to self object isn't it? but when i do it explicitly `self.puts('hello')` it doesn't work. Why?
[01:53:52] elomatreb: b100s: Because the latter self might not include the Kernel module, which provides the puts method
[01:54:31] ramfjord: has joined #ruby
[01:55:03] oetjenj: has joined #ruby
[01:55:17] elomatreb: Actually, I'm wrong. puts is a private method on Kernel. The way private method access control works in ruby is that private methods can never be called with an explicit receiver
[01:55:17] RickHull: >> [self, method(:puts)]
[01:55:18] ruby[bot]: RickHull: # => [main, #<Method: Object(Kernel)#puts>] (https://eval.in/894217)
[01:55:44] RickHull: the relationship between main, Object, and Kernel has never been clear to me
[01:55:49] oetjenj: has joined #ruby
[01:55:59] RickHull: well maybe once and then I forgot again
[01:56:09] elomatreb: main is just an instance of Object
[01:56:35] oetjenj: has joined #ruby
[01:57:21] oetjenj: has joined #ruby
[01:57:31] elomatreb: As to the reason the methods are not actually defined in Object but rather in an additional module, I suspect something to do with BasicObject?
[01:57:46] RickHull: apparently puts is a private method on Object as well as Kernel
[01:58:00] jdawgaz: has joined #ruby
[01:58:07] oetjenj: has joined #ruby
[01:58:15] alan_w: has joined #ruby
[01:58:43] RickHull: dminuoso explained it earlier, I think, but it didn't make much sense to me
[01:58:54] DWSR: RickHull: Passenger is being compiled. It was specified in the Gemfile, but when I tried running it via bundler it tried to download a binary?
[01:59:24] DWSR: Note: I am the Infrastructure engineer, not a Ruby dev.
[01:59:31] RickHull: DWSR: dunno, sounds like something very specific to Passenger
[01:59:38] DWSR: Yeah, it would appear to be.
[01:59:47] bdnelson: has joined #ruby
[02:00:29] ramfjord: has joined #ruby
[02:01:12] RickHull: from here, it looks like it is not installed via rubygems: https://www.phusionpassenger.com/library/install/standalone/install/oss/
[02:01:25] RickHull: so your Gemfile would not control the passenger install
[02:02:11] DWSR: https://www.phusionpassenger.com/library/install/standalone/install/oss/rubygems_norvm/
[02:02:13] RickHull: it's an apache module right?
[02:02:25] DWSR: It's...middleware, as far as I can tell.
[02:02:32] DWSR: It can integrate with either Apache or Nginx and rack
[02:03:32] enterprisey: has joined #ruby
[02:03:37] b100s: elomatreb, RickHull thanks! in well-grounded rubies, second edition, said: `Here, in spite of the lack of a message-sending dot and an explicit receiver for the message, we’re sending the message puts with the argument "Hello." to an object: the default object self. There’s always a self defined when your program is running, although which object is self changes, according to specific rules.`
[02:03:44] uZiel: has joined #ruby
[02:04:57] elomatreb: That is entirely true, the only thing that's tripping us up here is that puts is a private method (otherwise you'd be able to do "some_string".puts "asdf", which doesn't really make much sense)
[02:06:04] RickHull: frankly I don't think the relationship web between main, Object, and Kernel is all that sensible, plus the addition of certain ways that certain private methods suddenly become public
[02:06:35] elomatreb: Where do methods become public?
[02:07:02] RickHull: >> puts "calling a non-private method, right?"
[02:07:03] ruby[bot]: RickHull: # => calling a non-private method, right? ...check link for more (https://eval.in/894218)
[02:07:17] elomatreb: >> self.puts "test"
[02:07:18] ruby[bot]: elomatreb: # => private method `puts' called for main:Object ...check link for more (https://eval.in/894219)
[02:07:42] RickHull: why does omitting self make a private method callable?
[02:07:52] elomatreb: It's really just that: You cannot have any explicit receiver, self included
[02:08:42] ramfjord: has joined #ruby
[02:09:03] ozcanesen: has joined #ruby
[02:09:17] elomatreb: (The IO#puts method is an exception, because it was redefined as a public instance method on the class)
[02:09:21] RickHull: and so the only place, normally, you can call without an explicit receiver is inside the class?
[02:10:22] elomatreb: And in cases where you bend the implicit receiver around, like with instance_eval and friends
[02:10:43] RickHull: reeks of hack and circumstance IMHO
[02:11:01] RickHull: where a private method is just kinda like OOP privacy sometimes
[02:11:31] elomatreb: How would you like access control instead? I think it's a fairly elegant solution
[02:12:12] RickHull: I would say, no access to private methods from outside the class. you could bypass it with #send or whatever_eval
[02:12:25] RickHull: but don't hinge on explicit receivership
[02:12:33] RickHull: that seems circumstantial
[02:13:18] jdawgaz: has joined #ruby
[02:13:46] RickHull: as for puts, I'd rather see it as a method on, say, Kernel, and allow kernel methods to be called from toplevel with or without self
[02:13:55] elomatreb: That's the overall goal of course, but how would you decide whats internal access and what's external access? You can't do a lot of the static stuff other programming languages do due to the dynamic nature of Ruby
[02:14:00] RickHull: Object#puts seems odd
[02:14:18] Cork: has joined #ruby
[02:14:18] RickHull: so I can understand wanting to hide that away
[02:14:27] elomatreb: In that case you'd have made Kernel methods special again, not sure if that's a good idea either
[02:14:29] RickHull: but making #puts a private method? that's goofy
[02:14:41] ramfjord: has joined #ruby
[02:15:04] RickHull: the toplevel is special, no getting around it
[02:15:18] RickHull: i think making toplevel friendly to Kernel or something Kernel-like is fine
[02:15:37] RickHull: Object#puts is just weird
[02:15:41] elomatreb: Kernel is not special, you can make your own module and include it in the same place as Kernel and your methods will behave the same exact way
[02:16:32] elomatreb: You could argue the main-is-self outside of other scopes is special, but I don't see any solution to that except prohibiting calling and defining methods outside of those scopes entirely, which is just inconvenient for one-off scripts
[02:17:09] RickHull: I'd rather have nothing be particular special and call IO.puts (defaults to $stdout) or $stdout.puts
[02:17:43] RickHull: but if we want naked puts, then there's got to be a better way
[02:17:52] jdawgaz: has joined #ruby
[02:17:58] bmurt: has joined #ruby
[02:18:55] RickHull: def IO.puts; include IO # ?
[02:19:49] RickHull: there is something to be said for an implied "system" context, where puts seems more like a command than a method call
[02:20:36] ramfjord: has joined #ruby
[02:20:37] elomatreb: That's a lot of "special" behavior just to avoid a minor ugliness in a context most people don't really need to worry about (i.e. puts just works)
[02:20:59] RickHull: i feel the opposite, unsurprisingly :)
[02:21:40] elomatreb: Pretty useless discussion anyway, because I doubt we could get people to change a major Ruby mechanism just like that
[02:22:27] RickHull: my version, which I have no idea accomplishes its goals, doesn't have special behavior like main and the funky Kernel/Object partial equivalence or whatever
[02:22:59] rhyselsmore: has joined #ruby
[02:23:15] RickHull: just the base ruby primitives, without compromising consistency. perhaps at a slight penalty, like having to `include IO`
[02:23:28] RickHull: or `include System`
[02:24:34] RickHull: hm, i guess that doesn't get you naked methods
[02:24:42] RickHull: welp, i give up on language UI design
[02:25:42] mson: has joined #ruby
[02:26:33] rfoust: has joined #ruby
[02:29:46] mim1k: has joined #ruby
[02:31:50] darix: has joined #ruby
[02:32:24] alfiemax: has joined #ruby
[02:34:10] Cork: has joined #ruby
[02:38:53] alfiemax: has joined #ruby
[02:44:25] guacamole: has joined #ruby
[02:45:26] orbyt_: has joined #ruby
[02:45:36] arescorpio: has joined #ruby
[02:52:10] kculpis: has joined #ruby
[02:52:31] alfiemax: has joined #ruby
[02:54:08] Guest76467: Do I need something other than Gemfile to use bunder in a project?
[02:54:13] gizmore|2: has joined #ruby
[02:56:17] JsilverT: has joined #ruby
[03:00:32] RickHull: not that I can think of
[03:01:09] Guest76467: So, I have a gemfile with the source and gem -entries. I guess I'm done.
[03:03:00] d^sh: has joined #ruby
[03:07:20] darkmorph: has joined #ruby
[03:09:07] def_jam: has joined #ruby
[03:09:33] eb0t_: has joined #ruby
[03:13:57] RickHull: depending on what you have to accomplish, sure
[03:15:38] Guest76467: Enabling people, including me, to easily install project deps that I'm planning to share on github
[03:16:09] RickHull: you probably want to to run `bundle install` and if that looks good, then try `bundle exec $project_thingie`
[03:16:24] RickHull: but the docs should guide you
[03:17:17] uZiel: has joined #ruby
[03:28:31] alfiemax: has joined #ruby
[03:29:43] Cork: has joined #ruby
[03:30:05] baweaver: fastest way to get going: bundle gem (name)
[03:30:15] baweaver: If you want to share I'd just make it into a gem
[03:30:23] baweaver: easier to distribute, version, and manage
[03:30:52] chouhoulis: has joined #ruby
[03:37:59] bdnelson: has joined #ruby
[03:39:41] Iacobus: has joined #ruby
[03:39:47] Guest76467: I think its just going to be a github repo for a while. Afaics git clone and bundle install would then be enough to testdrive
[03:41:26] mtkd: has joined #ruby
[03:41:38] eb0t: has joined #ruby
[03:41:54] eb0t_: has joined #ruby
[03:42:19] alan_w: has joined #ruby
[03:42:44] JsilverT: has joined #ruby
[03:43:48] RickHull: yep, nothing wrong with that
[03:47:24] agent_white: has joined #ruby
[03:49:32] RickHull: is it working for you?
[03:53:32] eblip: has joined #ruby
[03:54:08] def_jam: has joined #ruby
[03:54:53] Guest76467: Well, $ bundle exec init.rb - does start it
[03:55:23] agent_white: has joined #ruby
[03:55:34] cschneid_: has joined #ruby
[03:55:58] cschneid_: has joined #ruby
[03:56:10] Guest76467: hey cschneid_
[03:57:29] agent_white: has joined #ruby
[04:00:28] bfs666: has joined #ruby
[04:04:28] sucks: has joined #ruby
[04:05:02] sucks: has joined #ruby
[04:05:53] bfs666: has left #ruby: ("Leaving")
[04:07:45] Asher: has joined #ruby
[04:13:54] krz: has joined #ruby
[04:21:44] Freshnuts: has joined #ruby
[04:22:00] jphase: has joined #ruby
[04:30:15] mim1k: has joined #ruby
[04:41:37] gix: has joined #ruby
[04:46:10] uneeb: has joined #ruby
[04:48:18] howdoi: has joined #ruby
[04:49:35] veloutin: has joined #ruby
[04:52:54] ramfjord: has joined #ruby
[04:57:30] eb0t: has joined #ruby
[04:58:02] fishcooker: has joined #ruby
[05:01:34] jphase_: has joined #ruby
[05:08:46] ramfjord: has joined #ruby
[05:09:50] Devalo: has joined #ruby
[05:14:56] eblip: has joined #ruby
[05:16:03] Derperpe-: has joined #ruby
[05:20:46] oetjenj: has joined #ruby
[05:22:00] sagax: has joined #ruby
[05:26:12] k3rn31: has joined #ruby
[05:27:59] def_jam: has joined #ruby
[05:28:06] eckhardt: has joined #ruby
[05:28:46] mim1k: has joined #ruby
[05:30:03] rabajaj: has joined #ruby
[05:35:56] ramfjord: has joined #ruby
[05:42:16] JsilverT: has joined #ruby
[05:47:12] Puffball: has joined #ruby
[05:47:15] JsilverT_: has joined #ruby
[05:53:42] jenrzzz: has joined #ruby
[05:53:42] jenrzzz: has joined #ruby
[06:04:24] JsilverT: has joined #ruby
[06:06:01] al2o3-cr: has joined #ruby
[06:06:32] anisha: has joined #ruby
[06:07:30] cdg: has joined #ruby
[06:19:56] wunz: has joined #ruby
[06:20:47] michael1: has joined #ruby
[06:28:07] haraoka: has joined #ruby
[06:29:35] duderonomy: has joined #ruby
[06:31:15] reber: has joined #ruby
[06:32:23] michael1: has joined #ruby
[06:33:56] eb0t: has joined #ruby
[06:34:47] eb0t_: has joined #ruby
[06:36:58] biberu: has joined #ruby
[06:37:11] dionysus69: has joined #ruby
[06:37:52] kapil___: has joined #ruby
[06:41:03] charliesome: has joined #ruby
[06:45:25] karapetyan: has joined #ruby
[06:45:33] dionysus69: has joined #ruby
[06:50:09] charliesome: has joined #ruby
[06:50:55] apeiros: has joined #ruby
[06:56:35] kies: has joined #ruby
[06:59:31] charliesome: has joined #ruby
[07:02:36] cschneid_: has joined #ruby
[07:06:08] bkxd: has joined #ruby
[07:28:02] alfiemax: has joined #ruby
[07:29:23] alex``: has joined #ruby
[07:30:01] conta: has joined #ruby
[07:31:44] apeiros: has joined #ruby
[07:35:54] Haris: has joined #ruby
[07:35:57] Haris: hello all
[07:36:09] ramfjord: has joined #ruby
[07:36:47] Haris: I'm trying to install crowdtilt. in its doc ( https://github.com/Crowdtilt/CrowdtiltOpen/wiki/Setup-Instructions ), its showing a command for bundle install. when I run this command on shell/cli, I get error about it being unknown. Am I doing something wrong ?
[07:37:28] Haris: I'v installed 1.9.3 as per requirement of this app. this version is set to default. do I need to activate it or something for this command to work ?
[07:37:52] Haris: the rake secret command is also not working
[07:38:02] Haris: is that related to ruby ?
[07:38:24] snickers: has joined #ruby
[07:38:49] RickHull: yep, a couple things:
[07:38:51] Dimik: has joined #ruby
[07:39:12] RickHull: 1. ruby 1.9.3 is ancient -- you are probably fine with 2.x line and should prefer it
[07:39:16] apeiros: has joined #ruby
[07:39:36] RickHull: 2. ruby comes packaged with rake
[07:39:54] RickHull: 3. bundler is a separate gem (a ruby package)
[07:40:45] Haris: ok, so rake is not working. that means ruby install didn't go ok ? and I need to install the bundler pkg/gem first ?
[07:40:47] RickHull: with rvm, you may need to log in again for rvm to recognize your installed rubies -- not sure
[07:40:58] RickHull: confirm your ruby install with `ruby --version`
[07:41:19] Haris: that was confirmed. my shell/cli was showing 1.9.3 output for ruby --version
[07:41:27] Haris: ..as+ output..
[07:41:40] Haris: %s/as/in/
[07:42:01] RickHull: if you have ruby 1.9.3, then you should have rake in your path as well
[07:42:14] RickHull: what do you have for `which ruby` ?
[07:48:17] Haris: hold please
[07:48:47] trosa: has joined #ruby
[07:50:39] Haris: on mac, I have its mapped to a username's home folder ----> /Users/username/.rvm/rubies/ruby-1.9.3-p551/bin/ruby
[07:50:40] charliesome: has joined #ruby
[07:50:44] michael1: has joined #ruby
[07:50:52] Haris: %s/I have its/its/
[07:51:57] RickHull: is there anything else in that bin/ dir?
[07:53:13] RickHull: like maybe bin/rake ?
[07:53:13] Haris: there's erb, gem, lrb, rake, ri, ruby, testdb
[07:53:20] Haris: yes, its there
[07:53:26] RickHull: so `which ruby` returns that bin/ dir
[07:53:27] Haris: I need to have this folder on my path ?
[07:53:33] RickHull: what about `which rake` ?
[07:53:52] Haris: returns same path with rake
[07:54:02] RickHull: so what is the problem you are having with rake?
[07:54:28] Haris: let me check in the other shell. hold please
[07:54:45] RickHull: use the same shell that `which rake` is successful
[07:54:54] RickHull: or make sure `which rake` is successful before proceeding
[07:55:32] RickHull: if you are having a problem, then try restarting your shell session, otherwise consult the rvm docs for making sure it is set up properly
[07:55:46] RickHull: but if `ruby --version` works, then `rake --version` should too
[07:56:24] andikr: has joined #ruby
[07:56:40] eckhardt: has joined #ruby
[07:57:49] Haris: yep, rake is ok
[07:57:56] Haris: it just can't find the file it has to process
[07:58:43] RickHull: it's all good, making progress :)
[07:59:08] RickHull: so we've got rvm working, with ruby and rake
[07:59:13] RickHull: we need bundler, right?
[07:59:20] RickHull: `gem install bundler` should do it
[07:59:40] konsolebox: has joined #ruby
[08:00:57] RickHull: you may want to update rubygems first -- you can try `gem install rubygems-update` or `gem update --system`
[08:01:30] RickHull: prefer the latter to the former
[08:02:28] Haris: YAML safe loading is not available. Please upgrade psych to a version that supports safe loading (>= 2.0).
[08:02:34] Haris: get this msg when I run gem update --system
[08:02:39] Haris: but its working
[08:03:05] Haris: ok, now bundle install command is working
[08:04:07] Hien: has joined #ruby
[08:04:17] zautomata2: has joined #ruby
[08:05:26] pfg: has joined #ruby
[08:07:33] aiguuu: has joined #ruby
[08:08:40] SegFaultAX: has joined #ruby
[08:09:53] Antiarc: has joined #ruby
[08:10:47] ta: has joined #ruby
[08:11:05] RickHull: if you can get crowdtilt working on 1.9.3, congrats
[08:11:23] RickHull: don't go too far with it. next install ruby 2.0 - 2.4 with rvm
[08:11:52] RickHull: and do the same jig with `gem update --system` and `gem install bundler` etc
[08:12:09] RickHull: if there is a problem with ruby 2.x, then at least you still have 1.9.3
[08:12:25] RickHull: but you should STRONGLY prefer ruby 2.x and focus on that if you can
[08:13:08] RickHull: maybe poke around their wiki to see if they have more update instructions hidden somewhere
[08:13:23] RickHull: ruby 2.0 was EOL'd years ago, FYI
[08:13:46] PaulCape_: has joined #ruby
[08:14:56] RickHull: ok, nearly 2 ago: https://www.ruby-lang.org/en/news/2016/02/24/support-plan-of-ruby-2-0-0-and-2-1/
[08:15:06] aufi: has joined #ruby
[08:15:50] zautomata2: has joined #ruby
[08:16:08] Haris: system update did it
[08:16:18] Haris: this app is old. it snot being maintained anymore
[08:16:22] Haris: its in its requirement
[08:16:25] Haris: requirements+
[08:16:40] RickHull: sure, i mean -- they wrote that when 1.9.3 was the latest
[08:17:09] RickHull: lacking a claim that it works on 2.x is not evidence that it doesn't
[08:17:36] RickHull: it will be painful to try to run 1.9.3 stuff
[08:17:42] RickHull: and you run security risks
[08:17:53] RickHull: a lot of libs and gems and stuff will be out of date and vulnerable
[08:18:04] RickHull: and a lot of docs and such won't work for you
[08:18:32] claudiuinberlin: has joined #ruby
[08:18:33] adlerdias: has joined #ruby
[08:18:48] adlerdias: has joined #ruby
[08:21:01] JsilverT: has joined #ruby
[08:27:15] mikecmpbll: has joined #ruby
[08:34:50] InfinityFye: has joined #ruby
[08:36:12] jphase: has joined #ruby
[08:37:02] Mont3: has joined #ruby
[08:38:34] aeaeaeae2: has joined #ruby
[08:40:03] zautomata2: has joined #ruby
[08:40:08] jenrzzz: has joined #ruby
[08:40:08] jenrzzz: has joined #ruby
[08:41:54] Dimik: has joined #ruby
[08:46:16] iamarun: has joined #ruby
[08:49:04] sina: has joined #ruby
[08:49:57] miskatonic: has joined #ruby
[08:49:58] jphase: has joined #ruby
[08:59:06] jphase: has joined #ruby
[09:00:44] blackmesa1: has joined #ruby
[09:04:11] anas: has joined #ruby
[09:06:12] zautomata3: has joined #ruby
[09:08:08] burgestrand: has joined #ruby
[09:09:29] Silthias: has joined #ruby
[09:10:03] quobo: has joined #ruby
[09:11:03] zautomata4: has joined #ruby
[09:12:35] mikecmpbll: has joined #ruby
[09:14:53] charliesome: has joined #ruby
[09:19:22] karapetyan: has joined #ruby
[09:22:43] mim1k: has joined #ruby
[09:23:08] mark_66: has joined #ruby
[09:23:46] ur5us: has joined #ruby
[09:24:06] ur5us: has joined #ruby
[09:25:11] vondruch: has joined #ruby
[09:27:00] waveprop: sorry to crosspost but i don't think #rubyonrails will support rack. please guide me in the right direction, i don't understand what i'm doing wrong, http://termbin.com/p9lh
[09:28:30] wunz: has joined #ruby
[09:28:59] matthewd: waveprop: What do you expect `use First::Base 'go' do` to do?
[09:29:27] r3QuiEm_cL: has joined #ruby
[09:29:54] waveprop: matthewd: i expect it to pass the string 'go' as the second parameter to First::Base.initialize, and the block as the second
[09:31:05] waveprop: as outlined here http://www.rubydoc.info/gems/rack/Rack%2FBuilder:use
[09:32:15] mim1k: has joined #ruby
[09:33:15] matthewd: waveprop: Try adding a comma
[09:35:14] waveprop: matthewd: that was the first thing i tried, and i get unexpected keyword_do_block http://termbin.com/rrc4
[09:35:56] zenspider: has joined #ruby
[09:36:06] matthewd: Try adding a comma in the right place ¯\_(ツ)_/¯
[09:36:23] ramfjord: has joined #ruby
[09:37:07] Ayey_: has joined #ruby
[09:38:27] mim1k: has joined #ruby
[09:40:10] waveprop: strange. so the last argument before a block doesnt need a comma
[09:40:23] waveprop: matthewd: thanks very much for your help.
[09:40:51] matthewd: Right; the block is not a positional parameter
[09:41:23] waveprop: okay good to know
[09:41:46] waveprop: can i ask why
[09:42:28] matthewd: The short answer is that it's just the way the syntax works
[09:43:02] matthewd: Slightly longer is that blocks are a syntax construct, not a value, so they have their own syntax
[09:43:23] matthewd: And as they're already distinguished by that syntax, a comma would be redundant
[09:44:18] waveprop: okay. thanks
[09:44:49] marr: has joined #ruby
[09:45:00] waveprop: i would never have figured that out
[09:47:13] redhedded1: has joined #ruby
[09:49:47] zautomata: has joined #ruby
[09:57:33] wunz: has joined #ruby
[09:58:18] Beams: has joined #ruby
[10:00:42] Serpent7776: has joined #ruby
[10:02:10] cschneid_: has joined #ruby
[10:02:55] dhollin: has joined #ruby
[10:08:09] iamarun: has joined #ruby
[10:08:51] mim1k_: has joined #ruby
[10:15:47] alfiemax: has joined #ruby
[10:18:24] karapetyan: has joined #ruby
[10:21:55] redondos: has joined #ruby
[10:24:15] charliesome: has joined #ruby
[10:25:41] cschneid_: has joined #ruby
[10:26:11] adlerdias: has joined #ruby
[10:28:31] kapil___: has joined #ruby
[10:30:46] karapetyan: has joined #ruby
[10:30:53] jphase: has joined #ruby
[10:38:19] troulouliou_div2: has joined #ruby
[10:38:20] darkness: has joined #ruby
[10:40:02] jphase: has joined #ruby
[10:41:01] ferr: has joined #ruby
[10:43:18] ldnunes: has joined #ruby
[10:44:21] n13z: has joined #ruby
[10:44:39] Silthias1: has joined #ruby
[10:44:54] sekmo: has joined #ruby
[10:48:07] shaun: has joined #ruby
[10:48:16] shaun: hello room
[10:53:39] zanoni: has joined #ruby
[10:55:18] jottr__: has joined #ruby
[10:58:23] jphase: has joined #ruby
[11:00:20] waveprop: http://termbin.com/tgft => how do i get the block from config.ru " First::Base.post '/hello' do" to execute in the class context of lib/first.rb:Base#call ?
[11:01:57] waveprop: i'm getting NilClass no method []. i think it's because the @routes structure isnt getting populated with my route definitions in config.ru.
[11:03:24] waveprop: i think i need to get that inner block to populate @routes at the instance level.. in the class definition. am i wrong?
[11:04:39] drptbl: has joined #ruby
[11:10:01] cschneid_: has joined #ruby
[11:33:49] GodFather: has joined #ruby
[11:35:56] jaruga: has joined #ruby
[11:36:31] jaruga: has joined #ruby
[11:36:34] ramfjord: has joined #ruby
[11:37:14] selim: has joined #ruby
[11:38:43] burgestrand: has joined #ruby
[11:39:29] Psybur: has joined #ruby
[11:42:02] milardovich: has joined #ruby
[11:46:21] blackbaba: has joined #ruby
[11:49:05] banisterfiend: has joined #ruby
[11:51:09] mim1k: has joined #ruby
[11:54:26] nadir: has joined #ruby
[12:00:30] thinkpad: has joined #ruby
[12:00:33] yokel: has joined #ruby
[12:05:07] blackbaba: has joined #ruby
[12:06:27] thinkpad: has joined #ruby
[12:12:48] mim1k: has joined #ruby
[12:17:04] alfiemax: has joined #ruby
[12:23:30] milardov_: has joined #ruby
[12:26:58] ajaysingh: has joined #ruby
[12:30:08] jphase: has joined #ruby
[12:30:52] alfiemax: has joined #ruby
[12:31:01] banisterfiend: has joined #ruby
[12:35:51] johno84: has joined #ruby
[12:39:19] jphase: has joined #ruby
[12:42:18] ldnunes: has joined #ruby
[12:42:42] VladGh: has joined #ruby
[12:42:43] JsilverT: has joined #ruby
[12:45:41] tvw: has joined #ruby
[12:48:30] jphase: has joined #ruby
[12:57:38] jphase: has joined #ruby
[12:57:56] jrafanie: has joined #ruby
[12:59:45] bmurt: has joined #ruby
[13:01:03] mim1k: has joined #ruby
[13:01:50] ldnunes: has joined #ruby
[13:02:17] truenito: has joined #ruby
[13:02:33] darkmorph: has joined #ruby
[13:03:16] ramfjord: has joined #ruby
[13:04:51] milardovich: has joined #ruby
[13:07:04] jphase_: has joined #ruby
[13:07:29] shinnya: has joined #ruby
[13:07:55] blackbaba: has joined #ruby
[13:08:07] truenito: has joined #ruby
[13:12:25] huyderman: has joined #ruby
[13:12:41] blackbaba: has left #ruby: ()
[13:13:34] konsolebox: has joined #ruby
[13:14:44] synthroid: has joined #ruby
[13:15:09] nowhereman: has joined #ruby
[13:21:53] GodFather_: has joined #ruby
[13:22:56] dminuoso: matthewd: See, this is why I like my lambdas. No weird confusion about how functions have to be passed compared to values. ;p
[13:23:03] dminuoso: Functions are values. ;p
[13:23:04] GodFather: has joined #ruby
[13:23:05] GodFather_: has joined #ruby
[13:23:14] DWSR: has joined #ruby
[13:24:06] dminuoso: Also I tried my fiddle hacks to turn procs into lambdas yesterday but gave up after realizing that it might not be as stable as I would like (because there's quite a few structs before the final uint8_t that makes the decision)
[13:25:40] DWSR: Hey guys, I'm in the process of trying to compile PassengerAgent on Alpine and getting the following error: https://gist.github.com/DWSR/fd114736451c013e59744e00fcf1f439. Is there a way that I can get more verbose information? I'm trying to figure out what's missing from the system in order to successfully build.
[13:26:36] infernix: has joined #ruby
[13:27:11] jphase: has joined #ruby
[13:27:12] dminuoso: DWSR: How did you "compile PassengerAgent" ? If it's done with gem, you should obtain an mkmf.log
[13:27:32] DWSR: dminuoso: So Passenger (the gem) needs a helper binary.
[13:28:02] DWSR: Once you have the Gem, if you try to run `passenger start`, it will try to either download or compile this helper binary.
[13:28:22] dminuoso: DWSR: I know why I avoid passenger. Puma is simply much less of a hassle. :|
[13:28:31] DWSR: dminuoso: Yes, I know. :(
[13:28:35] dminuoso: It just works, without quirky native extensions, weird nginx integration, etc.
[13:28:48] DWSR: Unfortunately this isn't my call. I'm trying to slim down my images and speed up the build process for the containers.
[13:29:11] DWSR: At the moment, even with compilation of Passenger, I've still got about a 30% time savings and about a 1.2GB space reduction
[13:30:19] DWSR: I am pressuring PTB to moving to Puma or Unicorn
[13:30:50] DWSR: But that may not make it on the priority list, so this work is still valid for the meantime.
[13:31:00] alfiemax: has joined #ruby
[13:31:24] dminuoso: Partido Trabalhista Brasileiro?
[13:31:35] dminuoso: Powers That Be?
[13:31:36] DWSR: Powers That Be.
[13:31:47] DWSR: I was originally going to use PHB, but I like him
[13:32:16] Rapture: has joined #ruby
[13:33:17] dminuoso: Polyhydroxybutyrate?
[13:34:01] DWSR: Pointy Haired Boss.
[13:34:23] DWSR: dminuoso: Anyway, anything that you can suggest that's more directly relevant to my inquiry?
[13:36:27] ramfjord: has joined #ruby
[13:36:34] alex``: has joined #ruby
[13:36:51] alfiemax: has joined #ruby
[13:40:29] govg: has joined #ruby
[13:40:31] mson: has joined #ruby
[13:42:21] dminuoso: DWSR: Nothing conclusive.
[13:42:49] dminuoso: I know how I would debug it, but its unlikely to be helpful.
[13:43:18] dminuoso: DWSR: Is that the entire output, or is there more? Perhaps a ruby stack trace? Or additional output before that?
[13:43:42] DWSR: The additional output before is very similar to L1 in that snippet.
[13:43:53] dminuoso: gist it anyway.
[13:44:03] dminuoso: I want to see the entirety of it.
[13:44:04] DWSR: Otherwise, that's the entire output. I'm trying to get more verbose output to start
[13:44:07] DWSR: Sure, sec.
[13:44:21] DWSR: Just following https://github.com/lincheney/alpine-passenger/blob/master/Dockerfile
[13:44:27] Psybur: has joined #ruby
[13:44:35] DWSR: If this works, then it gives me an area to look in
[13:46:05] gnufied: has joined #ruby
[13:46:06] DWSR: Yeah, looks like that worked.
[13:46:17] DWSR: Sec, I'll gist you the Dockerfile and the full output (need to generate it again)
[13:46:46] zapata: has joined #ruby
[13:47:09] jphase: has joined #ruby
[13:48:01] DWSR: It's compiling nginx from source ffs.
[13:48:28] jphase_: has joined #ruby
[13:50:29] jphase_: has joined #ruby
[13:51:08] DWSR: dminuoso: https://gist.github.com/DWSR/fd114736451c013e59744e00fcf1f439
[13:51:14] cdg: has joined #ruby
[13:51:40] dminuoso: DWSR: See, you cut off exactly after the the relevant line I wanted to see.
[13:51:51] DWSR: That's the end of the output.
[13:51:54] dminuoso: c++ -o /tmp/passenger-install.3ys0md/common/libpassenger_common/Utils/IOUtils.o -Isrc/cxx_supportlib -Isrc/cxx_supportlib/vendor-copy -Isrc/cxx_supportlib/vendor-modified -Isrc/cxx_supportlib/vendor-modified/libev -Isrc/cxx_supportlib/vendor-copy/libuv/include -O -D_REENTRANT -I/usr/local/include -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long
[13:51:56] dminuoso: -Wno-missing-field-initializers -feliminate-unused-debug-symbols -feliminate-unused-debug-types -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -DHAS_ALLOCA_H -DHAVE_ACCEPT4 -DHAS_SFENCE -DHAS_LFENCE -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -ggdb -std=gnu++11 -Wno-unused-local-typ edefs -DHASH_NAMESPACE="__gnu_cxx" -DHASH_MAP_HEADER="<hash_map>" -DHASH_MAP_CLASS="hash_map"
[13:51:58] dminuoso: -DHASH_FUN_H="<hash_fun.h>" -c src/cxx_supportlib/Utils/IOUtils.cpp src/cxx_supportlib/Utils/IOUtils.cpp:58:24: fatal error: linux/net.h: No such file or directory
[13:52:25] adlerdias: has left #ruby: ()
[13:52:36] DWSR: What line is that?
[13:53:19] dminuoso: https://gist.github.com/DWSR/fd114736451c013e59744e00fcf1f439#file-output-txt-L942
[13:53:58] DWSR: Yeah, found it
[13:54:08] dminuoso: That's what causes the compilation abortion (if you correlate this with https://gist.github.com/DWSR/fd114736451c013e59744e00fcf1f439#file-output-txt-L1025 ) you can see that its explicitly the cause.
[13:54:10] DWSR: I have been staring at this way too long
[13:54:27] dminuoso: So my best guess is that you are missing linux kernel headers.
[13:54:29] DWSR: So probably just missing the musl headers.
[13:54:43] dminuoso: No, linux kernel headers.
[13:55:05] dminuoso: e.g. https://github.com/torvalds/linux/blob/master/include/uapi/linux/net.h
[13:55:24] dminuoso: apk add linux-headers
[13:55:26] dminuoso: is what you want
[13:55:31] DWSR: Yeah, recompiling now
[13:55:44] DWSR: Hah, that's in the other Dockerfile that I linked.
[13:55:54] DWSR: (The other one where someone knows what they're doing()
[13:56:00] dminuoso: DWSR: For future reference, gist entire log outputs. It's not offensive to dump 10 pages of logs, it's much more helpful.
[13:56:08] dminuoso: (unless you know with absolute certainty that its not relevant)
[14:01:25] alnewkirk: has joined #ruby
[14:03:43] mikecmpb_: has joined #ruby
[14:03:50] JsilverT: has joined #ruby
[14:06:03] Bish: has joined #ruby
[14:06:12] Bish: how would i get all tributes in "body"
[14:06:16] Bish: nokogiri that is.
[14:07:03] dminuoso: Nokogiri lenses.
[14:07:06] dminuoso: Its all clear to me.
[14:07:08] dminuoso: That's what we need.
[14:07:09] JsilverT: has joined #ruby
[14:07:16] Bish: xpath is bullshit, so yeah.
[14:07:31] Bish: still haven't solved that issue
[14:07:46] Bish: #(Attr:0x8d8768 { name = "xmlns:v", value = "urn:schemas-microsoft-com:vml" }),
[14:07:47] Bish: #(Attr:0x8d8754 { name = "xmlns:o", value = "urn:schemas-microsoft-com:office:office" })]
[14:07:55] Bish: having these 2 in my "doc"
[14:08:00] Bish: fucks everything up
[14:08:29] GodFather: has joined #ruby
[14:08:40] waveprop: functions are values?
[14:08:54] tobiasvl: waveprop: what do you mean?
[14:09:14] Bish: should be the other way around, values should be function, amiright dminuoso
[14:09:17] waveprop: tobiasvl: in the scrollback dminuoso said it
[14:10:11] waveprop: i think he was talking about a specific code, now that i reread what he said
[14:10:20] waveprop: s/code/bit of code/
[14:11:30] tobiasvl: aha. well, depends what you think of as a "function" and what a "value" is ;) ruby METHODS are neither functions nor "values" (if you mean first-class objects), but procs are
[14:16:17] dminuoso: tobiasvl: methods can directly be obtained
[14:16:22] dminuoso: >> method(:puts)
[14:16:23] ruby[bot]: dminuoso: # => #<Method: Object(Kernel)#puts> (https://eval.in/894601)
[14:16:53] Bish: >> method(:method)[:method].call(:method)
[14:17:02] Bish: >> method(:method)[:method].call(:method)
[14:17:03] ruby[bot]: Bish: # => #<Method: Object(Kernel)#method> (https://eval.in/894602)
[14:17:06] Bish: for clarification
[14:17:09] dminuoso: Methodception.
[14:17:36] Bish: thats my methodology
[14:17:44] dminuoso: Trying to pull a baweaver, eh?
[14:18:09] Bish: sorry, what?
[14:18:22] quobo: has joined #ruby
[14:19:09] rfoust: has joined #ruby
[14:21:00] konsolebox: has joined #ruby
[14:21:08] bkxd: has joined #ruby
[14:22:04] Bish: dminuoso: you know how i would get all nodes which are NOT containing something THEIR attributes?
[14:25:00] Silthias: has joined #ruby
[14:25:38] Haris: has left #ruby: ()
[14:26:04] waveprop: has minitest been removed from stdlib
[14:26:11] DWSR: dminuoso: lol, running tests against my codebase in this new container right now and forgot we needed redis. Was freaking out because errors EVERYWHERE
[14:26:31] havenwood: waveprop: Nope.
[14:26:44] havenwood: waveprop: https://stdgems.org
[14:27:10] waveprop: thanks havenwood
[14:29:02] ahrs: has joined #ruby
[14:30:35] oleo: has joined #ruby
[14:31:43] Psybur: has joined #ruby
[14:33:12] Bish: is : a special character in regex?
[14:33:55] polishdub: has joined #ruby
[14:34:13] Bish: attributes = parsed_body.xpath(XPATH_ATTRIBUTES).select { |x| x.name ^~ /:/ }
[14:34:24] Bish: if someone has a better solution to do this, he may speak now
[14:35:44] DLSteve: has joined #ruby
[14:36:55] aufi: has joined #ruby
[14:38:35] TinkerTyper: has joined #ruby
[14:40:06] johno84: has joined #ruby
[14:42:14] mtkd: has joined #ruby
[14:42:59] havenwood: Bish: or she
[14:43:01] havenwood: Bish: grep_v
[14:43:44] havenwood: >> ['nerp', 'y:erp', ':'].grep_v /:/ # Bish
[14:43:46] ruby[bot]: havenwood: # => ["nerp"] (https://eval.in/894619)
[14:43:46] stoffus: has joined #ruby
[14:46:17] jrafanie: has joined #ruby
[14:47:27] alan_w: has joined #ruby
[14:47:57] rippa: has joined #ruby
[14:49:15] brw: has left #ruby: ("Off to listen to some tunes...")
[14:50:39] aufi_: has joined #ruby
[14:51:43] michael1: has joined #ruby
[14:51:46] milardovich: has joined #ruby
[14:54:25] mim1k: has joined #ruby
[14:57:40] nowhereman: has joined #ruby
[14:58:35] ozcanesen: has joined #ruby
[14:58:43] tcopeland: has joined #ruby
[15:03:23] hgost: has joined #ruby
[15:09:47] uZiel: has joined #ruby
[15:11:19] mim1k: has joined #ruby
[15:12:46] Bish: well, im used to that, sorry
[15:13:42] Bish: >> ['.','not'].grep('.')
[15:13:43] ruby[bot]: Bish: # => ["."] (https://eval.in/894636)
[15:13:43] iamarun: has joined #ruby
[15:13:50] Bish: >> ['.','not'].grep(/./)
[15:13:51] ruby[bot]: Bish: # => [".", "not"] (https://eval.in/894637)
[15:13:55] FahmeF: has joined #ruby
[15:13:58] Bish: havenwood:
[15:14:37] Bish: so that didnt help much
[15:15:04] tvw: has joined #ruby
[15:15:07] havenwood: Bish: Dot is a special character in Regexp.
[15:15:57] havenwood: >> ['.', 'Bish', 'not'].grep Regexp.new Regexp.escape '.'
[15:15:58] ruby[bot]: havenwood: # => ["."] (https://eval.in/894642)
[15:16:15] Bish: havenwood: yeah and i asked if : is too
[15:16:22] Bish: and you given me that example, which could be useless
[15:16:24] havenwood: Bish: No, it isn't.
[15:16:31] Bish: thanks :>
[15:16:43] havenwood: Bish: My example isn't useless. And the second example lets you check.
[15:17:13] havenwood: >> ':' == Regexp.escape(':')
[15:17:14] ruby[bot]: havenwood: # => true (https://eval.in/894645)
[15:17:35] Bish: now thats helpful
[15:19:20] joast: has joined #ruby
[15:21:50] ldnunes: has joined #ruby
[15:22:42] chouhoulis: has joined #ruby
[15:22:53] alfiemax: has joined #ruby
[15:25:10] Mont3: has joined #ruby
[15:28:46] kozrar: has joined #ruby
[15:29:04] dviola: has joined #ruby
[15:29:50] vondruch: has joined #ruby
[15:31:57] kozrar: has joined #ruby
[15:32:49] mikecmpbll: has joined #ruby
[15:33:11] milardov_: has joined #ruby
[15:33:32] kozrar: has joined #ruby
[15:34:54] guardian: if there a shorter way to write if !(baz = foo[bar]).nil? then return baz
[15:36:04] alfiemax_: has joined #ruby
[15:37:00] dinoangelov: has joined #ruby
[15:37:02] Bish: [foo[bar]].compact.first
[15:37:40] vondruch: has joined #ruby
[15:37:52] Bish: [foo[bar]].compact.each{|x|return x}
[15:38:38] sucks: has joined #ruby
[15:39:00] Bish: return x unless x = foo[bar]
[15:39:03] Bish: should work, too
[15:39:19] guardian: return foo[bar] is foo[bar]
[15:39:31] ldnunes: has joined #ruby
[15:39:43] guardian: return foo[bar] if foo[bar]
[15:39:58] Bish: yeah, youre right, lol
[15:39:59] guardian: not sure how people write these early returns, I'm a bit annoyed by the double evaluation
[15:40:01] Bish: but then you can do
[15:40:02] xco: has joined #ruby
[15:40:09] Bish: return x if x = foo[bar]
[15:40:13] Bish: since u asked for shorter versions
[15:40:28] guardian: didn't know I can write it this way
[15:40:37] guardian: I'm a ruby noob
[15:40:49] Bish: >> def y;foo={bar:1};return x if x=foo[:bar];end;y
[15:40:50] ruby[bot]: Bish: # => undefined local variable or method `x' for main:Object ...check link for more (https://eval.in/894679)
[15:40:59] Bish: mioght not be possible either way.
[15:41:54] Bish: but return x if x
[15:42:11] Bish: >> def y;foo={bar:1};x = foo[:bar];return x if x;end;y
[15:42:12] ruby[bot]: Bish: # => 1 (https://eval.in/894680)
[15:42:37] Bish: guardian: every value in ruby is "true" in ruby no falsy things
[15:42:41] Bish: EXCEPT for nil and false
[15:42:47] Bish: thats literally, the only 2 that should be false
[15:43:34] Bish: >> ["",0,false,nil].map { |x| x ? true : false }
[15:43:35] ruby[bot]: Bish: # => [true, true, false, false] (https://eval.in/894681)
[15:44:17] Bish: thats particulary important.. which things like.. #find_index() where javascript would fuck you up by 0 being false
[15:44:35] zanoni: has joined #ruby
[15:46:05] Bish: how do you actually check for falsyness?
[15:46:11] Bish: >> ["",0,false,nil].compact
[15:46:12] ruby[bot]: Bish: # => ["", 0, false] (https://eval.in/894691)
[15:49:51] troys: has joined #ruby
[15:50:12] cdg: has joined #ruby
[15:51:02] Bish: asm>> !!1
[15:51:03] ruby[bot]: Bish: I have disassembled your code, the result is at https://eval.in/894694
[15:52:20] Bish: so there is no way to check for falsyness except for tenary, !, and if?
[15:52:20] cschneid_: has joined #ruby
[15:56:33] LyndsySimon: I'm considering writing a gem to ease CSV parsing in Ruby - if you have a sec, I'd appreciate a quick review of the short README. I'm looking for community input before I decide whether or not writing it is worth my time: https://gitlab.com/lyndsysimon/ideas/blob/master/csv_parser.md
[15:58:53] Bish: LyndsySimon: keep me updated
[15:59:00] Bish: i hate 'csv'
[15:59:20] Bish: uhh, thats cool
[15:59:58] LyndsySimon: Bish: Oh? I've honestly never used it. I came up with this idea after discussing options to reduce code duplication for CSV import scripts in a web app at work.
[16:00:21] Bish: in your dsl, the order in which "fields" are givin is the same as in the file?
[16:00:26] Bish: what about headlines in csv?
[16:00:34] LyndsySimon: I'm kind of on a kick writing DSLs right now, and it seemed like a natural fit. Too much work to justify it for work, but not if others find it useful.
[16:00:43] Bish: dsl are the sickest shit ever
[16:00:56] LyndsySimon: Bish: Yes, fields are defined by default in the order they are presented in the file.
[16:01:04] Bish: DSLs are always natural fit.. because thats what they do
[16:01:12] Bish: theyre specific for the domain.. they work for
[16:01:26] LyndsySimon: Bish: I've not yet thought much about title rows. I may just exclude them, or I may allow you to define fields based upon the titles in the title row.
[16:02:03] LyndsySimon: Bish: My favorite DSL I've written so far is for defining datatables. It's written on top of ajax-datatables-rails.
[16:02:31] Bish: field :family_name, from: last_name what does this mean then?
[16:02:50] Bish: your type also says ":integer"
[16:02:56] Bish: you should use Integer instead
[16:03:13] Bish: there is no reason to use the class itself, it's a value/object, too
[16:03:29] jarnalyrkar: has joined #ruby
[16:03:32] mim1k: has joined #ruby
[16:04:33] LyndsySimon: Bish: It's still rough :) I planned to support using it as an object or a keyword, and to allow you to register new types as keywords.
[16:04:56] jarnalyrkar: has left #ruby: ()
[16:04:56] Bish: yeah if you're giving a type for integer use
[16:04:58] Bish: >> 1.class
[16:04:59] ruby[bot]: Bish: # => Fixnum (https://eval.in/894706)
[16:05:07] LyndsySimon: The "from: last_name" part, I was thinking that the field was named "last_name" in the CSV. Like I said, not fully formed, just trying to illustrate the overall idea.
[16:05:09] Bish: or rather :D something of
[16:05:14] Bish: >> 1.class.ancestors
[16:05:15] ruby[bot]: Bish: # => [Fixnum, Integer, Numeric, Comparable, Object, Kernel, BasicObject] (https://eval.in/894707)
[16:05:16] michael3: has joined #ruby
[16:05:38] LyndsySimon: `object.class < Integer` :)
[16:05:44] havenwood: Ruby 2.4: 1.class #=> Integer
[16:06:02] LyndsySimon: >> 1.class < Numeric
[16:06:03] ruby[bot]: LyndsySimon: # => true (https://eval.in/894709)
[16:06:09] Bish: but i like the idea of having a dsl for getting a result out of a csv
[16:06:18] Bish: you should add support for bad encoding and stuff
[16:06:25] Bish: because the things.. fuck me up most in ruby csv
[16:06:32] Bish: and quoting which isn't correct... detection for it
[16:07:00] LyndsySimon: Bish: What about the idea of splitting out the process into several steps? i.e., schema definition, row validation, excluding rows, processing rows, etc.
[16:07:00] Bish: remember a stackoverflow where someone did quote_char:"<utf8snowman>"
[16:07:32] Bish: LyndsySimon: i think you can split hsoe, but not as detailed as you do
[16:07:47] Bish: you could put "schema & row validation" together
[16:07:55] Bish: and exluding and processing
[16:07:59] Bish: kinda like
[16:08:00] jarnalyrkar: has joined #ruby
[16:08:09] LyndsySimon: Bish: My general approach is to handle the 80% use case first, and by default. Only schema definition and per-row processing would actually be required.
[16:08:45] Bish: parsed = imgoingtoparse("some.csv") { x.schema = whopdidu";x.shouldexclude=[1,2,3] };parsed.output_with {...}
[16:08:49] Bish: that's how i'd like it
[16:08:55] LyndsySimon: Ideally, I'd like most uses of my code to be only a few short, clear, concise lines. Only if things deviate from the norm should there be additional complexity exposed to the dev.
[16:09:35] jarnalyrkar: has joined #ruby
[16:10:08] LyndsySimon: Anyhow, thanks for letting me bounce the idea off you :) I have an inkling I may write the gem this week for fun.
[16:10:43] jarnalyrkar: has joined #ruby
[16:10:46] orbyt_: has joined #ruby
[16:11:15] Bish: weird definition of fun you have there
[16:11:18] jnollette: has joined #ruby
[16:11:20] LyndsySimon: FWIW I'm not a huge fan of Ruby as a language. I come from a Python background mostly and have branching out into more functional languages, specifically those centered on immutable types. I've discovered that I really like Ruby for writing DSLs though.
[16:11:36] Bish: reminds of that dude, who writes stellaris mods, which are super sophisticated
[16:11:46] Bish: "i do actually not play stellaris, i like writing mods, though"
[16:11:56] LyndsySimon: Yeah, I can see that.
[16:12:07] Bish: LyndsySimon: well skip ruby, do haskell :D
[16:12:13] Bish: i've been there
[16:12:19] LyndsySimon: My problem is time. This gem seems like something I can whip up fairly quickly, and something that won't require a ton of ongoing maintenance.
[16:12:20] Bish: still am, but i've been there
[16:12:22] jarnalyrkar: has joined #ruby
[16:13:15] Bish: in haskell you can have DSLs compiled to native code, if that's not cool i don't know what is
[16:13:25] jarnalyrkar: has joined #ruby
[16:13:26] LyndsySimon: I've dabbled in Haskell. It fits the way I think, but I'm not yet fluent in the syntax. Every time I go back to it, I get to the point where I'm overwhelmed by the terminology that's used - monads, functors, et. al.
[16:13:42] Bish: same here
[16:14:01] LyndsySimon: Clojure fits me pretty well too, but I find that every time I get in the flow I have to reach back into Java for something and it breaks my flow.
[16:14:14] Bish: same here**2
[16:14:30] LyndsySimon: Plus, Clojure's tooling is *slow*.
[16:15:04] LyndsySimon: Nim is very, very interesting to me. The only real issue I have with it is that the standard library uses mutable types by default.
[16:15:38] Devalo: has joined #ruby
[16:16:04] LyndsySimon: Oh hey - here's an example of a previous DSL I've written, in use:
[16:16:09] LyndsySimon: https://usercontent.irccloud-cdn.com/file/MRsUnoK2/image.png
[16:16:39] Bish: reminds me strongly of sequel
[16:16:40] Bish: so i like it.
[16:16:41] LyndsySimon: `get_raw_records` was named by the library the DSL sits atop, not me.
[16:16:49] LyndsySimon: ACTION looks up sequel
[16:17:09] Bish: you cannot keep up with that, it's the best thing there is in ruby
[16:17:41] Bish: i based a company on that shit and it's great, might make me broke & depressive
[16:17:51] Bish: but roda and sequel are the best 2 things ever happened to me in programming
[16:17:52] LyndsySimon: Hell yeah, that's awesome.
[16:18:05] Bish: LyndsySimon: look up stuff from jeremy evans, it's DSL all the way
[16:18:09] LyndsySimon: Sequel looks a lot like my style.
[16:18:26] Bish: https://www.youtube.com/watch?v=yCjtdfv9Z_0
[16:18:37] Bish: https://www.youtube.com/watch?v=W8zglFFFRMM
[16:19:13] Bish: kinda like an idol to me, super nice guy, most awesome code
[16:19:25] LyndsySimon: I'm skimming the docs now. I love it. It's both simpler and more powerful that ActiveRecord.
[16:19:45] LyndsySimon: composite key support! :P
[16:19:51] Bish: they're not even in the same universe
[16:19:57] Bish: when it comes to usage
[16:20:06] milardovich: has joined #ruby
[16:20:44] Bish: LyndsySimon: roda is a webserver which allows you to program ruby "off-rails" and is also DSL all the way
[16:20:54] Bish: then you basicially write webprojects like
[16:21:16] petrichorx_: has joined #ruby
[16:21:28] Bish: route.get("someObject") { Model::Something[r.params[:id]] }
[16:21:33] jarnalyrkar: has joined #ruby
[16:21:40] Bish: and the guy gets a json encoded version of your model
[16:21:47] Bish: sorry.. i get carried away
[16:22:58] LyndsySimon: Nah, that's a good thing.
[16:23:16] LyndsySimon: I will point out that you were just making fun of me for seeing this kind of thing as fun, though :)
[16:23:36] Bish: i really liked ruby until i discovered sequel and roda, then i freaking loved it, eye-opening
[16:23:46] Bish: LyndsySimon: well, nerdy stuff is the most fun there is.. csv isn't
[16:23:52] Bish: nerdy stuff is not what i meant
[16:24:24] LyndsySimon: CSV is only a convenient hook I'm using to get to do the nerdy stuff
[16:24:35] Bish: csv is the worst transport there is.. hell http get parameter are better
[16:24:39] Bish: since they encode stuff
[16:25:35] jarnalyrkar: has joined #ruby
[16:25:44] Bish: LyndsySimon: 2 lines of sequel are written by me, never been so proud
[16:26:10] dinfuehr: has joined #ruby
[16:26:31] mikecmpbll: has joined #ruby
[16:27:11] LyndsySimon: CSV is actually quite sane - it's the implementations that make you want to shoot yourself.
[16:28:10] LyndsySimon: Bish: I got a commit into the Nim core repo a while back! https://github.com/nim-lang/Nim/commit/8ea78b1bc9dc0b4d883b4f0750ee84e93605b82a#diff-172294a35ce6ecdb390ca1d591297682
[16:28:15] LyndsySimon: ACTION iz proud.
[16:28:47] Bish: LyndsySimon: and people not using it correctly
[16:28:59] Bish: varying column count... quotation without escaping quotations inside
[16:29:06] Bish: encoding switching
[16:29:08] LyndsySimon: IIRC, Excel's CSV exports are bad, too.
[16:29:54] LyndsySimon: I want to say there's a problem where it only allows escaping quotes with `""`, instead of `\"`, or vice versa. It's been a while.
[16:30:03] Bish: LyndsySimon: pg, eh? you make the right choices, keep up the good work
[16:31:07] Bish: well, g2g, see ya!
[16:31:52] Bish: screw rails, sequel&roda all the way
[16:32:29] Bish: https://github.com/ruby-hyperloop also super interesting stuff, never used it though
[16:32:45] Bish: just for experimenting
[16:32:50] lucz: has joined #ruby
[16:35:25] glundgren: has joined #ruby
[16:36:08] Technodrome: has joined #ruby
[16:36:37] cagomez: has joined #ruby
[16:40:08] kozrar_: has joined #ruby
[16:40:38] apeiros: LyndsySimon: excel doesn't even know what the C in CSV stands for :-S
[16:41:23] kozrar_: has joined #ruby
[16:42:12] synthroid: has joined #ruby
[16:43:32] polishdub: has left #ruby: ()
[16:44:43] kozrar_: has left #ruby: ()
[16:45:22] kozrar: has joined #ruby
[16:45:47] kozrar: has joined #ruby
[16:47:56] Ayey_: has joined #ruby
[16:50:25] milardovich: has joined #ruby
[16:52:55] dostoyevsky: has joined #ruby
[16:54:43] dionysus69: has joined #ruby
[16:56:53] Technodrome: has joined #ruby
[16:59:34] darkmorph: has joined #ruby
[17:02:07] milardov_: has joined #ruby
[17:02:52] ozcanesen: has joined #ruby
[17:03:05] Silthias1: has joined #ruby
[17:06:35] cdg_: has joined #ruby
[17:07:21] cdg_: has joined #ruby
[17:08:24] chouhoulis: has joined #ruby
[17:10:40] RickHull: has joined #ruby
[17:11:50] mtkd: has joined #ruby
[17:12:06] orbyt_: has joined #ruby
[17:14:08] iceden: has joined #ruby
[17:15:07] dionysus69: has joined #ruby
[17:17:16] Devalo: has joined #ruby
[17:18:05] infernix: has joined #ruby
[17:21:01] cdg: has joined #ruby
[17:21:24] conta1: has joined #ruby
[17:28:10] Ayey_: has joined #ruby
[17:28:49] tsglove: has left #ruby: ("Leaving")
[17:29:32] Puffball: has joined #ruby
[17:29:51] Technodrome: has joined #ruby
[17:32:07] imode: has joined #ruby
[17:33:59] sucks: has joined #ruby
[17:39:03] the_f0ster: has joined #ruby
[17:39:29] FahmeF: has joined #ruby
[17:40:04] milardovich: has joined #ruby
[17:40:07] KeyJoo: has joined #ruby
[17:40:13] lucz: has joined #ruby
[17:48:48] Ayey_: has joined #ruby
[17:50:09] Dimik: has joined #ruby
[17:51:20] Toggi3: has joined #ruby
[17:53:23] dangerousdave: has joined #ruby
[17:58:26] bkxd: has joined #ruby
[18:01:06] darkmorph: has joined #ruby
[18:02:27] xco: has joined #ruby
[18:07:28] Xiti: has joined #ruby
[18:09:20] alex``: has joined #ruby
[18:10:19] mjolnird: has joined #ruby
[18:11:57] quobo: has joined #ruby
[18:14:44] raatiniemi: has joined #ruby
[18:14:56] lucz: has joined #ruby
[18:15:55] ramfjord: has joined #ruby
[18:19:45] chouhoulis: has joined #ruby
[18:21:20] chouhoulis: has joined #ruby
[18:23:24] moei: has joined #ruby
[18:24:28] GodFather: has joined #ruby
[18:25:19] Silthias: has joined #ruby
[18:31:34] ozcanesen: has joined #ruby
[18:33:19] truenito: has joined #ruby
[18:39:00] mikecmpbll: has joined #ruby
[18:40:42] kies: has joined #ruby
[18:41:04] alfiemax: has joined #ruby
[18:41:36] milardovich: has joined #ruby
[18:42:38] hahuang65: has joined #ruby
[18:45:34] dminuoso: apeiros: Haha.
[18:46:27] dminuoso: apeiros: Yeah, I love how I have gotten tab-separated files from other companies with .csv extension, called "csv" in mails and named "comma separated value using semicolon separators" in specs.
[18:47:05] dminuoso: That has the same quality as that "Chili con carne without meat" sign on a restaurant a few years back.
[18:48:00] alfiemax: has joined #ruby
[18:49:07] Ayey_: has joined #ruby
[18:50:47] eckhardt_: has joined #ruby
[18:51:55] milardovich: has joined #ruby
[18:52:32] orbyt_: has joined #ruby
[18:54:51] raynold: has joined #ruby
[18:55:46] Rapture: has joined #ruby
[18:55:50] Silthias1: has joined #ruby
[18:57:31] ta: has joined #ruby
[18:57:55] ta: has joined #ruby
[18:58:37] ledestin: has joined #ruby
[19:01:24] ozcanesen: has joined #ruby
[19:05:26] lucz: has joined #ruby
[19:05:44] cdg: has joined #ruby
[19:06:03] Rapture: has joined #ruby
[19:06:31] jrafanie: has joined #ruby
[19:06:40] Technodrome: has joined #ruby
[19:07:49] ozcanesen: has joined #ruby
[19:12:06] naprimer: has joined #ruby
[19:13:49] ozcanesen: has joined #ruby
[19:13:55] lucz: has joined #ruby
[19:14:08] reber: has joined #ruby
[19:18:24] LyndsySimon: Can anyone tell me why this fails?
[19:18:29] Devalo: has joined #ruby
[19:18:31] LyndsySimon: >> x = Integer; x('1')
[19:18:32] ruby[bot]: LyndsySimon: # => undefined method `x' for main:Object (NoMethodError) ...check link for more (https://eval.in/894905)
[19:18:56] dminuoso: LyndsySimon: methods and local variables occupy different namespaces.
[19:19:14] ozcanesen: has joined #ruby
[19:19:27] LyndsySimon: dminuoso: OK... I'm not following.
[19:19:30] dminuoso: LyndsySimon: so the way ruby works, is whenever ruby sees an assignment to a variable, lexigraphically following code assumes `x` to be a variable, a method otherwise.
[19:19:44] dminuoso: LyndsySimon: However, if you explicitly use (), it will assume you try to use a method instead.
[19:19:53] dminuoso: so it will not use the local variable, but look for a method named x instead.
[19:20:18] ruby[bot]: LyndsySimon: # => undefined method `x' for main:Object (NoMethodError) ...check link for more (https://eval.in/894906)
[19:20:18] cdg: has joined #ruby
[19:20:26] LyndsySimon: ^ That doesn't work either.
[19:20:52] LyndsySimon: I have a glimmer of understanding, though.
[19:21:00] dminuoso: LyndsySimon: https://eval.in/894907
[19:21:03] LyndsySimon: There's a lookup table for methods, and another for variables in scope. Right?
[19:21:05] dminuoso: this shows the exact behavior.
[19:21:18] dminuoso: LyndsySimon: How advanced is your ruby knowledge?
[19:21:34] dminuoso: (I just need to know whether I have to say yes or no)
[19:21:36] LyndsySimon: I think it's pretty advanced, honestly.
[19:21:58] dminuoso: LyndsySimon: ruby maintains a table of local variables, but not exactly a "table of methods"
[19:22:11] dminuoso: methods *always* in absolutely all instances belong to either a class or a module.
[19:22:22] lucz: has joined #ruby
[19:22:24] dminuoso: (which themsevles have method tables)
[19:22:46] LyndsySimon: I haven't thought about it like that, but that makes sense.
[19:22:52] dminuoso: LyndsySimon: look at that eval.in though. it shows exactly how this works.
[19:22:55] Technodrome: has joined #ruby
[19:22:59] LyndsySimon: Yeah, I'm digesting it.
[19:25:14] LyndsySimon: OK, I think I understand the eval.in - the existence of an in-scope variable `x` means that it shadows the method `x`, which is a method. Adding parens skips the lookup in the variable table(s), so it gets the actual object.
[19:25:53] LyndsySimon: My problem is that I need to assign the Integer - the callable - to a variable, then call it on another object later.
[19:26:10] dminuoso: LyndsySimon: Exactly.
[19:26:17] dminuoso: LyndsySimon: If you want to invoke a callable object. you use .() instead.
[19:26:28] dminuoso: >> a = -> { puts "hi" }; a.()
[19:26:29] LyndsySimon: `x` does in fact contain the object I want to call, but neither method allows me to actually call it. Is there another way to call it?
[19:26:30] ruby[bot]: dminuoso: # => hi ...check link for more (https://eval.in/894914)
[19:26:49] LyndsySimon: Ahhhh. That makes sense.
[19:26:55] dminuoso: Or, since .() is just syntax sugar, you can use .call() explicitly
[19:27:04] dminuoso: .() is basically just short-form of .call()
[19:27:09] [Butch]: has joined #ruby
[19:27:28] LyndsySimon: ACTION laughs
[19:27:39] LyndsySimon: >> x = Integer; x.('1')
[19:27:41] ruby[bot]: LyndsySimon: # => undefined method `call' for Integer:Class ...check link for more (https://eval.in/894915)
[19:27:41] dminuoso: 20:25 LyndsySimon | OK, I think I understand the eval.in - the existence of an in-scope variable `x` means that it shadows the method `x`, which is a method. Adding parens skips the lookup in the variable table(s), so it gets the
[19:27:42] dminuoso: | actual object.
[19:27:57] dminuoso: LyndsySimon: Now comes the trick.
[19:28:06] apeiros: >> x = method(:Integer); x.call('1')
[19:28:07] ruby[bot]: apeiros: # => 1 (https://eval.in/894917)
[19:28:15] dminuoso: LyndsySimon: Remember how there are method tables *and local variable tables* ?
[19:28:22] dminuoso: LyndsySimon: Integer is defined twice!
[19:28:27] LyndsySimon: Yep. Yay, that makes sense.
[19:28:30] dminuoso: LyndsySimon: Once as a method, and once as an object.
[19:28:40] dminuoso: Integer() is something completely different than Integer.
[19:28:52] apeiros: >> [defined?(Integer), defined?(Integer())]
[19:28:53] ruby[bot]: apeiros: # => ["constant", "method"] (https://eval.in/894918)
[19:29:10] dminuoso: Integer shadows Integer(), but by adding () you tell ruby "dont look for an object Integer, look for a method instead"
[19:29:44] apeiros: actually, with constants versus methods, there's no shadowing
[19:29:53] apeiros: ruby requires unambiguous syntax with capitalized methods
[19:30:00] LyndsySimon: dminuoso: ... but `Integer '`'` works. I assume there is something special in `Integer` that tells it to call `Integer()` if it's being called and not assigned to a variable?
[19:30:04] apeiros: that is: either pass an argument, or write parens explicitly
[19:30:13] apeiros: but `Foo` will never invoke a method `Foo()`
[19:30:25] LyndsySimon: apeiros: Thank you, that part was missing for me
[19:31:12] dminuoso: ast>> Integer 1
[19:31:14] ruby[bot]: dminuoso: I have parsed your code, the result is at https://eval.in/894919
[19:31:25] dminuoso: ast>> Integer(1)
[19:31:26] ruby[bot]: dminuoso: I have parsed your code, the result is at https://eval.in/894920
[19:31:35] cdg_: has joined #ruby
[19:33:35] milardovich: has joined #ruby
[19:34:56] michael1: has joined #ruby
[19:35:18] apeiros: interesting that it parses differently
[19:35:55] dminuoso: asm>> Integer(1)
[19:35:56] ruby[bot]: dminuoso: I have disassembled your code, the result is at https://eval.in/894921
[19:35:58] dminuoso: asm>> Integer 1
[19:35:59] ruby[bot]: dminuoso: I have disassembled your code, the result is at https://eval.in/894922
[19:36:38] apeiros: ok, at least it generates the same code. so I guess the ast just differs so you could reconstruct the parens
[19:36:56] Devalo: has joined #ruby
[19:37:01] chouhoulis: has joined #ruby
[19:37:34] dminuoso: apeiros: I remember digging through this in the compiler.
[19:37:42] LyndsySimon: The DSL stuff I'm working on where I needed that piece of functionality is now working - thanks dminuoso and apeiros
[19:37:43] dminuoso: I couldn't figure out why there was a distinction between commands and method calls.
[19:37:46] apeiros: dminuoso: and yeah, chili con carne senza carne is ridiculous :)
[19:38:23] dminuoso: LyndsySimon: Functionality! Functions!
[19:38:25] dminuoso: I can help you with that!
[19:38:28] dminuoso: ACTION knows functions
[19:38:38] dminuoso: apeiros: Yeah :)
[19:39:25] dinoangelov: has joined #ruby
[19:40:00] milardovich: has joined #ruby
[19:41:18] Ayey_: has joined #ruby
[19:41:37] bmurt: has joined #ruby
[19:43:35] apeiros: dminuoso: huh? distinction between commands and method calls?
[19:44:02] apeiros: btw., the requirement for unambiguous syntax re capitalized methods is almost certainly so const_missing and method_missing don't conflict
[19:44:35] synthroid: has joined #ruby
[19:44:49] dminuoso: apeiros: well it was weird quirks in the parser.
[19:45:00] dminuoso: but honestly the entirety of parse.y (the lexer. THAT LEXER) is weird.
[19:45:40] apeiros: I have heard that before :D
[19:47:20] Devalo: has joined #ruby
[19:48:56] ur5us: has joined #ruby
[19:51:31] ramfjord: has joined #ruby
[19:54:54] lucz: has joined #ruby
[19:56:46] Technodrome: has joined #ruby
[19:58:21] ramfjord: has joined #ruby
[20:03:16] xco: has joined #ruby
[20:04:02] xco: has joined #ruby
[20:05:19] hgost: has joined #ruby
[20:09:15] ramfjord: has joined #ruby
[20:09:25] someguy: has joined #ruby
[20:11:49] ule: has joined #ruby
[20:12:18] ozcanesen: has joined #ruby
[20:12:44] imode: has joined #ruby
[20:17:21] Ayey_: has joined #ruby
[20:18:16] jrafanie: has joined #ruby
[20:18:50] lucz: has joined #ruby
[20:19:01] fizzycola: has left #ruby: ()
[20:20:00] banisterfiend: has joined #ruby
[20:21:22] milardov_: has joined #ruby
[20:22:04] FrostCandy: has joined #ruby
[20:23:07] ramfjord: has joined #ruby
[20:24:31] johno84: has joined #ruby
[20:26:18] RickHull: has joined #ruby
[20:27:45] Technodrome: has joined #ruby
[20:28:38] elcontrastador: has joined #ruby
[20:29:07] ramfjord: has joined #ruby
[20:33:18] orbyt_: has joined #ruby
[20:33:35] yabbes: has joined #ruby
[20:35:02] ramfjord: has joined #ruby
[20:35:54] Rapture: has joined #ruby
[20:36:41] darkmorph: has joined #ruby
[20:40:05] Technodrome: has joined #ruby
[20:40:08] mson: has joined #ruby
[20:40:15] InfinityFye: has joined #ruby
[20:40:24] ivanskie: has joined #ruby
[20:41:46] Ney: has joined #ruby
[20:44:41] alfiemax: has joined #ruby
[20:46:52] minimalism: has joined #ruby
[20:47:09] alfiemax_: has joined #ruby
[20:52:02] tomphp: has joined #ruby
[20:52:50] Toggi3: has joined #ruby
[20:53:22] ivanskie: hi. anyone here working on/with mruby stuff?
[20:53:27] Ayey_: has joined #ruby
[20:53:28] jenrzzz: has joined #ruby
[20:54:01] RickHull: only looked at it, myself. but there is #mruby
[20:56:31] Ney: has joined #ruby
[20:59:13] cdg: has joined #ruby
[20:59:41] tvw: has joined #ruby
[21:02:58] eclm: has joined #ruby
[21:04:57] cdg_: has joined #ruby
[21:10:05] eckhardt: has joined #ruby
[21:13:12] johno84: has joined #ruby
[21:19:18] SeepingN: has joined #ruby
[21:19:55] ramfjord: has joined #ruby
[21:26:01] rhyselsmore: has joined #ruby
[21:29:20] greengriminal: has joined #ruby
[21:31:09] greengriminal: Hey all, is it possible to override a method and call its original method i.e https://gist.github.com/davidpatters0n/2ab898de0deb4a1f18ed817947bcd80a
[21:31:34] greengriminal: I know I could use inheritance.
[21:33:19] cluelessperson_: has joined #ruby
[21:33:19] dminuoso: greengriminal: The trick is to use a module, prepend, then you can use super
[21:33:38] dminuoso: (Or you could use two alias_method, but prepending a module is cleaner)
[21:33:59] dminuoso: So you do use inheritance, but in a less intuitive way. :)
[21:34:01] cluelessperson_: hi, is it normal I've to use sudo permission to install a gem on macos?
[21:34:14] dminuoso: cluelessperson_: That depends. Are you using the macOS supplied ruby?
[21:34:39] SeepingN: consider not doing that ;)
[21:35:22] Nilium: You should probably just install gems local to your user
[21:35:34] cluelessperson_: dminuoso: I'm on a very fresh install of macos and when I'm trying to install a simple gem I get: "ERROR while executing gem, you don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory"
[21:35:40] dminuoso: cluelessperson_: Then yes. But you should *really* not use it, it brings 2.0.0 which is extremely old, has plenty of bugs and is on the border of not running modern things.
[21:35:54] dminuoso: cluelessperson_: Please consider either installing a newer version using ruby-install or chruby.
[21:35:55] Nilium: Mmm, no, I think Ruby on OS X these days is 2.3 or 2.4
[21:36:02] Nilium: Oh, 2.3, per that path
[21:36:33] dminuoso: Nilium: nope
[21:36:33] Nilium: 2.4 would be moving a bit fast for Apple.
[21:36:34] dminuoso: ActionController::InvalidCrossOriginRequest
[21:36:38] dminuoso: ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
[21:36:47] dminuoso: 2.0 is still on the most recent version of macOS.
[21:36:50] Nilium: cluelessperson_: Uh, no, cluelessperson_ has 2.3
[21:36:59] dminuoso: cluelessperson_: and I meant *ruby-install or brew
[21:37:10] Nilium: dminuoso: If you do `which ruby` what do you get?
[21:37:24] cluelessperson_: dminuoso: I use brew I think I'm going to install ruby with that
[21:37:26] dminuoso: Nilium: its the system ruby.
[21:37:37] Nilium: And you're on 10.13?
[21:37:39] dminuoso: cluelessperson_: either is fine
[21:37:46] Nilium: You've somehow avoided getting Ruby upgraded, I guess.
[21:37:47] dminuoso: Nilium: Ah. 10.12
[21:38:09] dminuoso: Well it doesnt matter anyway, I have dozens of ruby installations that I manage with chruby. I dont care for macOS supplied tools much.
[21:38:14] dminuoso: But good to know, Nilium.
[21:38:16] dminuoso: Was about time
[21:38:25] dminuoso: Wonder whether they finally upgraded vim too.
[21:38:28] Nilium: Yeah. You should still probably use either brew or chruby or rbenv
[21:38:41] Nilium: They keep git pretty up to date through the CLI tools package.
[21:38:47] Nilium: Vim: probably not.
[21:38:55] dminuoso: Nilium: In 10.12 its old enough to reliably seg fault it a few times a day.
[21:39:18] Nilium: And it's usually best to just install macvim anyway
[21:39:25] SeepingN: is rvm no longer cool?
[21:39:27] Nilium: Also install git through homebrew
[21:39:36] Nilium: SeepingN: If it still works for you, it's fine. I've never used it.
[21:39:38] dminuoso: SeepingN: RVM is kind of annoying in many ways.
[21:39:39] veeti: has joined #ruby
[21:39:51] dminuoso: SeepingN: chruby is the popular choice nowadays (its simple and bug free), or rbenv if you prefer that.
[21:40:30] cluelessperson_: dminuoso: what are the difference between brew ruby, chruby and rbenv?
[21:40:42] havenwood: cluelessperson_: brew is a package manager for OS X
[21:40:46] havenwood: cluelessperson_: ruby is a language
[21:40:48] fishcooker: has joined #ruby
[21:41:22] cluelessperson_: havenwood: yes but what are the differences during the install process i meant
[21:41:29] havenwood: cluelessperson_: RVM, chruby/ruby-install and rbenv/ruby-build install and switch Rubies
[21:41:54] dminuoso: cluelessperson_: chruby is a version manager. ruby-install is the bit that installs ruby things.
[21:42:01] miah: i think your more limited on ruby version choices when using brew
[21:42:08] greengriminal: dminuoso, - So trying your prepend suggestion but I seem to be doing something wrong here: https://gist.github.com/davidpatters0n/609e6b4af3f58f5658caf640c2b44fd6
[21:42:14] Ayey_: has joined #ruby
[21:42:37] miah: whereas with chruby, you use ruby-install to handle the installation of ruby, and can have literally every supported version of ruby on your system and use chruby to switch between them
[21:42:46] miah: if you only need a single version of ruby, brew is probably fine
[21:42:50] havenwood: cluelessperson_: LIke miah said, brew will limit choices you have. You'll be able to install latest Ruby, JRuby or Rubinius - but it's harder to do exact versions.
[21:42:56] dminuoso: greengriminal: You got things swapped around.
[21:43:16] dminuoso: greengriminal: When you prepend, method dispatch will consider prepended modules *before* the class.
[21:43:17] miah: and fwiw, you can brew install chruby and brew install ruby-install
[21:43:33] havenwood: cluelessperson_: RVM lets you use a precompiled binary, like brew, but provides more versions. Both ruby-install and ruby-build compile Ruby from source.
[21:43:36] dminuoso: greengriminal: So in a weird way it acts as if Float is an ancestor of SpecialFloat (in a super hacky way)
[21:43:40] havenwood: brew install chruby ruby-install
[21:43:47] miah: so you can _still_ use brew to manage those things, but you'd have to manually invoke ruby-install to install say, 2.4.2 'ruby-install ruby 2.4.2'
[21:44:49] cluelessperson_: havenwood, miah: perfect explications now I get it, thanks for the clarification guys!
[21:45:10] xco: has joined #ruby
[21:45:53] alfiemax: has joined #ruby
[21:46:17] ap4y: has joined #ruby
[21:46:26] enterprisey: has joined #ruby
[21:46:30] greengriminal: dminuoso, I ended up using the `alias`
[21:46:40] blackwind_123: has joined #ruby
[21:47:32] dminuoso: greengriminal: I recommend you use the prepend method, Let me show you
[21:48:05] dminuoso: greengriminal: https://gist.github.com/dminuoso/d973fa9449dfe4879f2b157f2dd4c54f
[21:48:13] miah: cluelessperson_: you're welcome =)
[21:48:19] greengriminal: oh interesting
[21:48:46] dminuoso: greengriminal: That being said: Do not use float for currency.
[21:48:59] Devalo: has joined #ruby
[21:52:24] michael1: has joined #ruby
[21:54:17] PaulCapestany: has joined #ruby
[21:59:03] mtkd: has joined #ruby
[21:59:07] RickHull: do integer math with e.g. pennies or use rationals like pennies / 100r
[21:59:16] veeti: has joined #ruby
[21:59:22] RickHull: >> dollars = 99 / 100r
[21:59:23] ruby[bot]: RickHull: # => (99/100) (https://eval.in/894966)
[22:01:54] apeiros: or use bigdecimal
[22:01:57] apeiros: or use the money gem
[22:02:50] dminuoso: apeiros: In all fairness, I personally believe this is blown out of proportion.
[22:02:53] Ayey_: has joined #ruby
[22:03:13] dminuoso: If double precision is good enough for almost the entirety of physics, simulations, then its good enough for money.
[22:03:23] apeiros: you're mistaken
[22:04:34] michael1: has joined #ruby
[22:04:38] dminuoso: That isn't to say that I agree that rational or integral representation is better, but I don't think using `double` is that much of an issue for the majority of folks.
[22:04:58] apeiros: again, you're mistaken
[22:05:04] RickHull: how can we show that?
[22:05:29] apeiros: it's the other way round. some few people would be able to use doubles properly for money. the majority will do stupid mistakes which lead to errors.
[22:05:44] dminuoso: apeiros: Care to elaborate further?
[22:05:47] dminuoso: Perhaps with a concrete example?
[22:06:00] apeiros: google will produce better examples than what I can come up with from the top of my head
[22:07:08] blackwind_123: has joined #ruby
[22:07:56] RickHull: i think what tends to happen is multiple layers in a federated app will do various truncations and rounding at different steps
[22:08:08] RickHull: and things don't reconcile at the end when they're supposed to
[22:08:22] RickHull: and it costs a million bucks to trace the error
[22:08:28] RickHull: only sorta kidding on the last point
[22:08:58] RickHull: integer bucks, mind you
[22:11:35] jarnalyrkar: has joined #ruby
[22:12:39] elomatreb: If you really want to be serious use Complex for your monetary values, obviously
[22:13:12] elomatreb: That's $5+0i, please
[22:14:21] apeiros: elomatreb: for your imaginary amounts of money? :)
[22:14:29] elomatreb: You never know
[22:14:32] xco: has joined #ruby
[22:14:44] apeiros: I'm an imaginary billionaire :D
[22:19:24] GodFather: has joined #ruby
[22:25:16] karapetyan: has joined #ruby
[22:25:47] darkmorph: has joined #ruby
[22:26:15] jordanm: has joined #ruby
[22:26:49] dminuoso: Or a very complex billionaire.
[22:28:13] baweaver: dminuoso: Be rational
[22:29:17] dminuoso: baweaver: Pff. I have transcended from such verbal attacks.
[22:31:52] dminuoso: This is so surreal. :|
[22:34:53] RickHull: has joined #ruby
[22:38:32] alan_w: has joined #ruby
[22:40:26] Toggi3: has joined #ruby
[22:40:36] Technodrome: has joined #ruby
[22:41:12] ogres: has joined #ruby
[22:44:26] mim1k: has joined #ruby
[22:49:21] waveprop: has joined #ruby
[22:50:38] havenwood: Ruby solutions needed: https://code-golf.io
[22:51:34] Guest7694: if i store a method name and parametrs as a string, can i execute the contents of that stringas the method
[22:52:16] dminuoso: &ri Object#public_send Guest7694
[22:52:17] `derpy: Guest7694: http://ruby-doc.org/core-2.4.1/Object.html#method-i-public_send
[22:54:01] Ayey_: has joined #ruby
[22:55:40] jokke: what would you recommend as fast non-cryptographic hashing algorithm in ruby?
[22:57:22] shinnya: has joined #ruby
[22:58:06] elomatreb: Well, what do you want to do? Usually there's no good reason not to use the standard "cryptographic" functions
[22:58:31] jokke: i want to maintain a cache
[22:58:39] jokke: see if files have changed
[22:59:32] elomatreb: Git uses SHA1 for exactly that, and it's not a performance problem
[23:00:17] jokke: for me it is, even with md5
[23:00:42] elomatreb: Are you sure the performance critical part is actually the hashing, or the waiting on the disk IO?
[23:00:52] jokke: good point
[23:00:59] jokke: i will have to check that
[23:02:48] jokke: no it's something completely different ;)
[23:03:17] Guest7694: what am i doing incorrectly to set the instance variable @routes['testing'] from config.ru? http://termbin.com/t01v
[23:04:39] Guest7694: i think i cant run the instance method post() from within the nested blocks in config.ru but i dont know why. is there a concept i am missing
[23:04:53] dminuoso: Guest7694: Please use gist at github for future pastes. Syntax highlighting improves readability a lot.
[23:05:26] thinkpad: has joined #ruby
[23:07:54] Guest7694: dminuoso: okay. https://gist.github.com/anonymous/8fb382108df63e2602ff662668e97fc7
[23:08:37] hopsoft: has joined #ruby
[23:09:23] havenwood: >> @routes = Hash.new { |h, k| h[k] = {} }; @routes[:verb][:path] = :handler; @routes # Guest7694
[23:09:24] ruby[bot]: havenwood: # => {:verb=>{:path=>:handler}} (https://eval.in/894973)
[23:09:56] Guest7694: has joined #ruby
[23:11:03] ap4y: has joined #ruby
[23:11:04] havenwood: Guest7694: Should this `||=` just be an `=`?: https://gist.github.com/anonymous/8fb382108df63e2602ff662668e97fc7#file-somefile-rb-L49
[23:11:53] havenwood: It'd be nice to use #require_relative here and rop the `./`: https://gist.github.com/anonymous/8fb382108df63e2602ff662668e97fc7#file-somefile-rb-L3
[23:11:58] arescorpio: has joined #ruby
[23:12:45] veeti: has joined #ruby
[23:12:50] waveprop: havenwood: okay i'll use that. and yes i think i can drop the ||
[23:12:52] jphase: has joined #ruby
[23:13:26] havenwood: waveprop: It's nice to set the content type in your headers hash: {'Content-Type' => 'text/plain'}
[23:13:44] havenwood: waveprop: (Between the 209 and ['yo']): https://gist.github.com/anonymous/8fb382108df63e2602ff662668e97fc7#file-somefile-rb-L20
[23:17:44] waveprop: havenwood: i will. this is just a stripped down subset of my code for debugging purposes
[23:17:57] jphase: has joined #ruby
[23:20:30] waveprop: i don't understand why i cant call the method from within the nested blocks in config.ru. i have tried many ways
[23:20:49] waveprop: i mean, the post method is the one i'm triyng to call as you can see
[23:21:22] waveprop: thanks for pointing out that incorrect ||=
[23:23:48] David_H_Smith: has joined #ruby
[23:24:56] waveprop: i think that Rack's "use" command runs each middleware class as an instance but i cant seem to wrap my mind around how to define instance level behavior within the class-level code. do i misunderstand here
[23:26:34] Psybur: has joined #ruby
[23:26:56] charliesome: has joined #ruby
[23:27:10] waveprop: previously, i could write instance-level code within config.ru because i was instantiating the app and then run-ing it. but now that i've moved it into a middleware, i have to nest these blocks which 'punch-in' to the class level code, and i'm finding that i can't do things the same way
[23:27:56] waveprop: if anyone can suggest something to read which might address my problem, please do
[23:28:29] chouhoulis: has joined #ruby
[23:30:30] jphase: has joined #ruby
[23:30:39] David_H_Smith: has joined #ruby
[23:31:06] waveprop: i thought this was a problem with method scope but directly refering to post as a class method doesnt seem to act at instance-level, and the instance variable @routes remains unset
[23:36:21] banisterfiend: has joined #ruby
[23:38:03] hahuang65: has joined #ruby
[23:38:09] waveprop: maybe it's a problem that i'm mutating @routes
[23:38:46] waveprop: but isnt that sort of the point of an instance variable
[23:39:01] jphase: has joined #ruby
[23:39:59] jphase: has joined #ruby
[23:41:32] aclark: has joined #ruby
[23:44:03] karapetyan: has joined #ruby
[23:45:08] Ayey_: has joined #ruby
[23:47:24] lucz: has joined #ruby
[23:50:23] charliesome: has joined #ruby
[23:50:32] xco_: has joined #ruby
[23:51:16] nofxx: has joined #ruby
[23:54:24] cschneid_: has joined #ruby
[23:57:27] cschneid_: has joined #ruby