havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.2, 2.3.5 & 2.2.8: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby || Books: https://goo.gl/wpGhoQ
<baweaver> avdi also does the Tapas route (small video lessons for a fixed monthly)
JsilverT has joined #ruby
mkroman has joined #ruby
DWSR has joined #ruby
DLSteve_ has quit [Quit: All rise, the honorable DLSteve has left the channel.]
<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?
<havenwood> waveprop: Check that the Hash was modified.
<waveprop> havenwood: okay cool. thanks
sgen_ has joined #ruby
<baweaver> waveprop: I'd use merge instead if possible, don't mutate the original argument
<baweaver> makes things easier to test and verify later.
* dminuoso smells baweaver's immutability
cagomez has quit [Remote host closed the connection]
<waveprop> baweaver: thanks. use merge instead of what now
Psybur has joined #ruby
* waveprop needs to read about mutability
<RickHull> >> h = Hash.new; h[:foo] = :bar; p h; h.merge(foo: :baz)
<ruby[bot]> RickHull: # => {:foo=>:bar} ...check link for more (https://eval.in/894189)
<havenwood> waveprop: #merge! mutates the receiver (the instance of the hash) but #merge doesn't
<RickHull> hsh1.merge(hsh2) says that hsh2 kv pairs should get applied to hsh1
aviraldg has joined #ruby
M107262[m] has joined #ruby
Hanma[m] has joined #ruby
yana[m] has joined #ruby
lasenna[m] has joined #ruby
torarne has joined #ruby
dtcristo has joined #ruby
watzon has joined #ruby
Orbixx[m] has joined #ruby
haylon has joined #ruby
astronavt[m] has joined #ruby
jonjits[m] has joined #ruby
zalipuha[m] has joined #ruby
Giphy[m] has joined #ruby
velu_aon[m] has joined #ruby
dman[m] has joined #ruby
KevinMGranger has joined #ruby
turt2live has joined #ruby
<RickHull> and a new hash is returned
<RickHull> hsh1 is not modified
aagdbl[m] has joined #ruby
kua[m] has joined #ruby
itmerc[m] has joined #ruby
Matt[m]2 has joined #ruby
gokul_mr[m] has joined #ruby
jphase has joined #ruby
<RickHull> merge is a great way for user vars to override defaults
<RickHull> set up your class defaults in a constant. reify your config by CONSTANT.merge(user_params).merge(env_vars) # or whatever
<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?
<dminuoso> waveprop: Yes.
<RickHull> it's good to be aware of the difference. I add keys to hashes all the time ;)
<dminuoso> *down the road.
<waveprop> okay. so, why is it bad to mutate the original hash; isnt it more efficient to not create a new object in memory
<waveprop> ah okay
JsilverT has quit [Quit: WeeChat 2.0-dev]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> waveprop: There are tradeoffs, and it's often not as much of a win to mutate as you might expect.
<havenwood> waveprop: A functional style in Ruby can save you many headaches.
<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
<baweaver> Take for instance a recent case I had in Javascript
<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
<baweaver> I was using reverse to reverse a list for display. When I called it twice everything was fine, all tests were green
<dminuoso> Not knowing that you mutated it.
bmurt has joined #ruby
<baweaver> when I called it once more all of the sudden everything broke and I had no idea why
conta has joined #ruby
<RickHull> for most newbies, mutation is intuitive, and returning a new object feels inefficient
<RickHull> but it is best to understand and use immutable behavior first, by default
<RickHull> and only reach for mutability if needed
<al2o3-cr> h = {foo: :baz}; {foo: :bar, **h} should be faster (maybe)
<havenwood> The double splat is nice.
<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.
<dminuoso> asm>> {foo: :bar, **h}
<ruby[bot]> dminuoso: I have disassembled your code, the result is at https://eval.in/894190
<dminuoso> asm>> h.merge({foo: :bar})
cagomez has joined #ruby
<ruby[bot]> dminuoso: I have disassembled your code, the result is at https://eval.in/894191
<RickHull> how does it know what h is?
<dminuoso> RickHull: it doesnt
<dminuoso> 0003 opt_send_without_block <callinfo!mid:h, argc:0, FCALL|VCALL|ARGS_SIMPLE>, <callcache>
<waveprop> thank you guys. i'll experiment with this
<havenwood> RickHull: h from ERB or from Rails?
shinnya has quit [Ping timeout: 268 seconds]
<RickHull> in the asm>> example
sgen_ has quit [Remote host closed the connection]
<dminuoso> asm>> {foo:, :baz}.merge({foo: :bar})
<ruby[bot]> dminuoso: I have disassembled your code, the result is at https://eval.in/894192
<dminuoso> asm>> {foo: :baz}.merge({foo: :bar})
<ruby[bot]> dminuoso: I have disassembled your code, the result is at https://eval.in/894193
conta has quit [Ping timeout: 260 seconds]
<dminuoso> al2o3-cr: based on the assembly Id say there's no real difference
<waveprop> where should i put my unit tests when i have separate class files and a main instance-level application file?
<al2o3-cr> dminuoso: thats why i said maybe, but it should be in theory.
<waveprop> i.e. config.ru and app.rb
<RickHull> in general, from your project dir: put classes and modules in lib/ and tests in test/
<dminuoso> al2o3-cr: whats your reasoning?
<waveprop> okay RickHull
<waveprop> thx
<RickHull> waveprop: oh, for web projects, maybe some differences
<baweaver> lib/name/class.rb -> spec/name/class_spec.rb
<waveprop> RickHull: np
mim1k has joined #ruby
<baweaver> spec / test, depends on preference / tool really
<al2o3-cr> dminuoso: benchmark it, if you will
<waveprop> okay. i'm using minitest::test and ::spec
eckhardt has joined #ruby
* dminuoso does not know how to benchmark
<RickHull> waveprop: also, learn about: `ruby -I lib path/to/script.rb`
<dminuoso> but turns out baweaver knows!
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
* dminuoso is just lazy
<waveprop> RickHull: okay cool. thanks
<al2o3-cr> if merge is faster **, i'll plait saw dust.
<dminuoso> >> {**h, foo: :bar}
<ruby[bot]> dminuoso: # => undefined local variable or method `h' for main:Object (NameError) ...check link for more (https://eval.in/894197)
<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)
<dminuoso> asm>> {**h, foo: :bar}
<ruby[bot]> dminuoso: I have disassembled your code, the result is at https://eval.in/894198
<dminuoso> Okay *that* is not a wise thing to do.
<dminuoso> Does anyone know what the `swap` instruction does?
eckhardt has quit [Client Quit]
<dminuoso> baweaver: Please don't say `swapping`
<RickHull> it exchanges
<RickHull> ;)
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<RickHull> it makes the machine grind to a halt while it downloads more ram?
<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)}}}"
<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)
<dminuoso> Mmmm, it just swaps the top two values on the stack
<baweaver> what was that about sawdust?
<dminuoso> That seems like a compiler bug
<RickHull> how does one plait sawdust anyhow?
<baweaver> I have a feeling we're going to find out :D
<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)}}}"
<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)
<baweaver> Huh, well that's interesting.
mim1k has quit [Ping timeout: 248 seconds]
<baweaver> TIL
eckhardt has joined #ruby
<dminuoso> What did you learn?
<RickHull> splat all the things?
<dminuoso> "splat: 1.080000 0.030000 1.110000 ( 1.126947)\n - merge: 2.200000 0.040000 2.240000 ( 2.271193)\n"
<dminuoso> What causes that massive difference?
<dminuoso> Oh
<dminuoso> Oh.
<RickHull> i'm telling you, it's the darkside. deathstars
enterprisey has joined #ruby
* dminuoso facepalms
Psybur has quit [Ping timeout: 250 seconds]
_aeris_ has quit [Ping timeout: 248 seconds]
_aeris_ has joined #ruby
vee__ has quit [Ping timeout: 240 seconds]
<RickHull> updated
<Dimik> anybody using capybara?
<baweaver> dminuoso: so, are we livestreaming the sawdust experience then?
oetjenj has joined #ruby
alveric4 has joined #ruby
konsolebox has quit [Ping timeout: 268 seconds]
<baweaver> RickHull: your example is corrupted
<baweaver> ah, nevermind
<baweaver> It doesn't mutate it at all
lucz has joined #ruby
alveric3 has quit [Ping timeout: 260 seconds]
<RickHull> the mutation ones should be mutating
<RickHull> i don't know if it gets optimized out
<RickHull> but yeah, mutating on a new object each time
* Dimik np: Dark Drum & Bass MIX [VOL.4] [HQ] [43:00m/320kbps/44kHz]
PaulCapestany has quit [Read error: Connection reset by peer]
vee__ has joined #ruby
<SeepingN> nice
alan_w has joined #ruby
<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?
PaulCapestany has joined #ruby
darkmorph has quit [Ping timeout: 240 seconds]
sucks has joined #ruby
swills has joined #ruby
swills has joined #ruby
swills has quit [Changing host]
swills_ has joined #ruby
<RickHull> is passenger itself being compiled here?
swills has quit [Remote host closed the connection]
<RickHull> what component is being compiled? presumably written in C
swills_ has quit [Remote host closed the connection]
def_jam has joined #ruby
eb0t_ has joined #ruby
orbyt_ has joined #ruby
swills has joined #ruby
eblip has quit [Ping timeout: 268 seconds]
eb0t has quit [Ping timeout: 252 seconds]
def_jam is now known as eb0t
swills_ has joined #ruby
swills_ has quit [Client Quit]
cdg_ has joined #ruby
kies has quit [Ping timeout: 250 seconds]
jphase has quit [Remote host closed the connection]
alan_w has quit [Ping timeout: 268 seconds]
cdg has quit [Ping timeout: 268 seconds]
mson has quit [Quit: Connection closed for inactivity]
cdg_ has quit [Ping timeout: 268 seconds]
goyox86 has joined #ruby
vee__ has quit [Ping timeout: 248 seconds]
eblip has joined #ruby
def_jam has joined #ruby
blackmesa1 has quit [Ping timeout: 250 seconds]
eb0t_ has quit [Ping timeout: 268 seconds]
eb0t has quit [Ping timeout: 260 seconds]
lucz has quit [Remote host closed the connection]
def_jam has quit [Read error: Connection reset by peer]
eblip has quit [Read error: Connection reset by peer]
ramfjord has quit [Ping timeout: 240 seconds]
eblip has joined #ruby
def_jam has joined #ruby
weaksauce has joined #ruby
imode has joined #ruby
ap4y has quit [Quit: WeeChat 1.9.1]
ap4y has joined #ruby
gigetoo has quit [Ping timeout: 240 seconds]
vee__ has joined #ruby
raatiniemi has quit [Ping timeout: 255 seconds]
gigetoo has joined #ruby
cagomez has quit [Remote host closed the connection]
ramfjord has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jdawgaz has joined #ruby
marr has quit [Ping timeout: 240 seconds]
cagomez has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
ramfjord has joined #ruby
troys is now known as troys_
jottr__ has quit [Ping timeout: 246 seconds]
sonne has joined #ruby
cagomez has quit [Ping timeout: 240 seconds]
bdnelson has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
vee__ has quit [Ping timeout: 260 seconds]
marxarelli is now known as marxarelli|afk
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vee__ has joined #ruby
ramfjord has quit [Ping timeout: 250 seconds]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
ramfjord has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
ramfjord has quit [Ping timeout: 248 seconds]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
ogres has joined #ruby
ramfjord has joined #ruby
bdnelson has quit [Quit: Textual IRC Client: www.textualapp.com]
jenrzzz has quit [Ping timeout: 264 seconds]
b100s has joined #ruby
<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?
enterprisey has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 250 seconds]
<elomatreb> b100s: Because the latter self might not include the Kernel module, which provides the puts method
ramfjord has joined #ruby
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oetjenj has joined #ruby
<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
<RickHull> >> [self, method(:puts)]
<ruby[bot]> RickHull: # => [main, #<Method: Object(Kernel)#puts>] (https://eval.in/894217)
oetjenj has quit [Client Quit]
<RickHull> the relationship between main, Object, and Kernel has never been clear to me
oetjenj has joined #ruby
<RickHull> well maybe once and then I forgot again
<elomatreb> main is just an instance of Object
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
kculpis has quit [Ping timeout: 268 seconds]
oetjenj has joined #ruby
<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?
<RickHull> apparently puts is a private method on Object as well as Kernel
oetjenj has quit [Client Quit]
jdawgaz has joined #ruby
oetjenj has joined #ruby
alan_w has joined #ruby
oetjenj has quit [Client Quit]
<RickHull> dminuoso explained it earlier, I think, but it didn't make much sense to me
<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?
ramfjord has quit [Ping timeout: 240 seconds]
<DWSR> Note: I am the Infrastructure engineer, not a Ruby dev.
<RickHull> DWSR: dunno, sounds like something very specific to Passenger
<DWSR> Yeah, it would appear to be.
bdnelson has joined #ruby
ramfjord has joined #ruby
<RickHull> from here, it looks like it is not installed via rubygems: https://www.phusionpassenger.com/library/install/standalone/install/oss/
<RickHull> so your Gemfile would not control the passenger install
goyox86 has quit [Ping timeout: 250 seconds]
<RickHull> it's an apache module right?
<DWSR> It's...middleware, as far as I can tell.
<DWSR> It can integrate with either Apache or Nginx and rack
enterprisey has joined #ruby
<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.`
uZiel has joined #ruby
<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)
ramfjord has quit [Ping timeout: 268 seconds]
<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
<elomatreb> Where do methods become public?
<RickHull> >> puts "calling a non-private method, right?"
<ruby[bot]> RickHull: # => calling a non-private method, right? ...check link for more (https://eval.in/894218)
Cork has quit [Ping timeout: 246 seconds]
<elomatreb> No:
<elomatreb> >> self.puts "test"
<ruby[bot]> elomatreb: # => private method `puts' called for main:Object ...check link for more (https://eval.in/894219)
<RickHull> why does omitting self make a private method callable?
<elomatreb> It's really just that: You cannot have any explicit receiver, self included
<RickHull> hmmm
ramfjord has joined #ruby
ozcanesen has joined #ruby
<elomatreb> (The IO#puts method is an exception, because it was redefined as a public instance method on the class)
<RickHull> and so the only place, normally, you can call without an explicit receiver is inside the class?
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<elomatreb> Yep
<elomatreb> And in cases where you bend the implicit receiver around, like with instance_eval and friends
<RickHull> reeks of hack and circumstance IMHO
<RickHull> where a private method is just kinda like OOP privacy sometimes
<elomatreb> How would you like access control instead? I think it's a fairly elegant solution
<RickHull> I would say, no access to private methods from outside the class. you could bypass it with #send or whatever_eval
<RickHull> but don't hinge on explicit receivership
<RickHull> that seems circumstantial
jdawgaz has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
<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
<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
<RickHull> Object#puts seems odd
Cork has joined #ruby
<RickHull> so I can understand wanting to hide that away
<elomatreb> In that case you'd have made Kernel methods special again, not sure if that's a good idea either
<RickHull> but making #puts a private method? that's goofy
mikecmpbll has quit [Quit: inabit. zz.]
ramfjord has joined #ruby
<RickHull> the toplevel is special, no getting around it
uZiel has quit [Ping timeout: 240 seconds]
<RickHull> i think making toplevel friendly to Kernel or something Kernel-like is fine
<RickHull> Object#puts is just weird
<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
apeiros has quit [Remote host closed the connection]
<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
jdawgaz has quit [Client Quit]
<RickHull> I'd rather have nothing be particular special and call IO.puts (defaults to $stdout) or $stdout.puts
<RickHull> but if we want naked puts, then there's got to be a better way
jdawgaz has joined #ruby
bmurt has joined #ruby
<RickHull> def IO.puts; include IO # ?
ramfjord has quit [Ping timeout: 240 seconds]
<RickHull> there is something to be said for an implied "system" context, where puts seems more like a command than a method call
ramfjord has joined #ruby
<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)
<RickHull> i feel the opposite, unsurprisingly :)
<elomatreb> Pretty useless discussion anyway, because I doubt we could get people to change a major Ruby mechanism just like that
<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
jdawgaz has quit [Ping timeout: 260 seconds]
rhyselsmore has joined #ruby
<RickHull> just the base ruby primitives, without compromising consistency. perhaps at a slight penalty, like having to `include IO`
<RickHull> or `include System`
<RickHull> hm, i guess that doesn't get you naked methods
<RickHull> welp, i give up on language UI design
darix has quit [Quit: may the packets be with you...]
ramfjord has quit [Ping timeout: 250 seconds]
Cork has quit [Ping timeout: 250 seconds]
mson has joined #ruby
rfoust has joined #ruby
tekacs has quit [Quit: Disappearing... *poof*]
mim1k has joined #ruby
darix has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
Cork has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
alfiemax has quit [Client Quit]
DWSR has quit [Quit: Page closed]
alfiemax has joined #ruby
guacamole has joined #ruby
orbyt_ has joined #ruby
arescorpio has joined #ruby
gnufied has quit [Quit: Leaving]
alfiemax has quit [Remote host closed the connection]
kculpis has joined #ruby
alfiemax has joined #ruby
def_jam is now known as eb0t
<Guest76467> Do I need something other than Gemfile to use bunder in a project?
gizmore|2 has joined #ruby
JsilverT has joined #ruby
alfiemax has quit [Ping timeout: 248 seconds]
gizmore has quit [Ping timeout: 240 seconds]
Dimik has quit [Ping timeout: 250 seconds]
duderonomy has quit [Ping timeout: 248 seconds]
<RickHull> not that I can think of
<Guest76467> So, I have a gemfile with the source and gem -entries. I guess I'm done.
d^sh has quit [Ping timeout: 240 seconds]
d^sh has joined #ruby
JsilverT has quit [Quit: WeeChat 2.0-dev]
sucks has quit [Remote host closed the connection]
darkmorph has joined #ruby
def_jam has joined #ruby
eb0t_ has joined #ruby
eb0t has quit [Ping timeout: 240 seconds]
eblip has quit [Ping timeout: 250 seconds]
Cork has quit [Ping timeout: 258 seconds]
<RickHull> depending on what you have to accomplish, sure
guacamole has quit [Quit: My face has gone to sleep. ZZZzzz…]
<Guest76467> Enabling people, including me, to easily install project deps that I'm planning to share on github
<RickHull> you probably want to to run `bundle install` and if that looks good, then try `bundle exec $project_thingie`
<RickHull> but the docs should guide you
Ney has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
uZiel has joined #ruby
bdnelson has quit [Quit: WeeChat 1.9.1]
GodFather has quit [Ping timeout: 258 seconds]
alfiemax has joined #ruby
Cork has joined #ruby
<baweaver> fastest way to get going: bundle gem (name)
<baweaver> If you want to share I'd just make it into a gem
<baweaver> easier to distribute, version, and manage
chouhoulis has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
mtkd has quit [Ping timeout: 240 seconds]
dviola has quit [Quit: WeeChat 1.9.1]
bdnelson has joined #ruby
Guest42469_ has quit []
eb0t_ has quit [Read error: Connection reset by peer]
Iacobus has joined #ruby
<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
alan_w has quit [Ping timeout: 240 seconds]
mtkd has joined #ruby
eb0t has joined #ruby
eb0t_ has joined #ruby
alan_w has joined #ruby
JsilverT has joined #ruby
<RickHull> yep, nothing wrong with that
def_jam has quit [Ping timeout: 268 seconds]
agent_white has joined #ruby
<RickHull> is it working for you?
agent_white has quit [Quit: brb]
eblip has joined #ruby
def_jam has joined #ruby
eb0t has quit [Ping timeout: 260 seconds]
<Guest76467> Well, $ bundle exec init.rb - does start it
eb0t_ has quit [Ping timeout: 248 seconds]
agent_white has joined #ruby
cschneid_ has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cschneid_ has quit [Remote host closed the connection]
cschneid_ has joined #ruby
<Guest76467> hey cschneid_
agent_white has quit [Client Quit]
agent_white has joined #ruby
Guest76467 is now known as csmrfx
bfs666 has joined #ruby
bdnelson has quit [Ping timeout: 240 seconds]
sucks has joined #ruby
sucks has quit [Remote host closed the connection]
sucks has joined #ruby
bfs666 has left #ruby ["Leaving"]
Asher has joined #ruby
ogres has quit [Quit: Connection closed for inactivity]
sucks has quit [Ping timeout: 240 seconds]
Asher has quit [Client Quit]
krz has joined #ruby
zanoni has quit [Ping timeout: 260 seconds]
alan_w has quit [Quit: WeeChat 1.9.1]
Freshnuts has joined #ruby
jphase has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mim1k has joined #ruby
mim1k has quit [Ping timeout: 248 seconds]
gix has quit [Ping timeout: 240 seconds]
krz has quit [Quit: WeeChat 1.7]
vondruch has quit [Ping timeout: 240 seconds]
gix has joined #ruby
uneeb has joined #ruby
howdoi has joined #ruby
uneeb has quit [Remote host closed the connection]
veloutin has quit [Ping timeout: 240 seconds]
veloutin has joined #ruby
ramfjord has joined #ruby
ramfjord has quit [Ping timeout: 268 seconds]
eb0t has joined #ruby
darkmorph has quit [Ping timeout: 258 seconds]
fishcooker has joined #ruby
def_jam has quit [Ping timeout: 268 seconds]
eblip has quit [Ping timeout: 250 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cschneid_ has quit [Remote host closed the connection]
jphase_ has joined #ruby
jphase has quit [Ping timeout: 260 seconds]
ramfjord has joined #ruby
Devalo has joined #ruby
ramfjord has quit [Ping timeout: 268 seconds]
Devalo has quit [Ping timeout: 240 seconds]
eblip has joined #ruby
Derperpe- has joined #ruby
Derperperd has quit [Excess Flood]
eb0t has quit [Ping timeout: 268 seconds]
oetjenj has joined #ruby
sagax has joined #ruby
nowhereman has quit [Ping timeout: 248 seconds]
ozcanesen has quit [Quit: ozcanesen]
k3rn31 has joined #ruby
def_jam has joined #ruby
eckhardt has joined #ruby
mim1k has joined #ruby
rabajaj has joined #ruby
jphase_ has quit [Remote host closed the connection]
mim1k has quit [Ping timeout: 248 seconds]
arescorpio has quit [Quit: Leaving.]
JsilverT has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
al2o3-cr has quit [Ping timeout: 240 seconds]
rhyselsmore has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 250 seconds]
whippythellama has quit [Quit: WeeChat 1.4]
JsilverT has joined #ruby
moei has quit [Quit: Leaving...]
Puffball has joined #ruby
JsilverT_ has joined #ruby
JsilverT has quit [Ping timeout: 268 seconds]
nadir has quit [Quit: Connection closed for inactivity]
oetjenj has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
ta has quit [Remote host closed the connection]
JsilverT_ has quit [Quit: WeeChat 2.0-dev]
JsilverT has joined #ruby
al2o3-cr has joined #ruby
anisha has joined #ruby
cdg has joined #ruby
cdg has quit [Ping timeout: 250 seconds]
kculpis has quit [Ping timeout: 268 seconds]
wu__ has joined #ruby
michael1 has joined #ruby
michael1 has quit [Ping timeout: 268 seconds]
haraoka has joined #ruby
duderonomy has joined #ruby
reber has joined #ruby
michael1 has joined #ruby
eb0t has joined #ruby
eb0t_ has joined #ruby
def_jam has quit [Ping timeout: 268 seconds]
mson has quit [Quit: Connection closed for inactivity]
eblip has quit [Ping timeout: 250 seconds]
biberu has joined #ruby
dionysus69 has joined #ruby
kapil___ has joined #ruby
charliesome has joined #ruby
lacour has quit [Quit: Leaving]
dionysus69 has quit [Quit: dionysus69]
karapetyan has joined #ruby
dionysus69 has joined #ruby
charliesome has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
thuryn has quit [Remote host closed the connection]
apeiros has joined #ruby
karapetyan has quit [Remote host closed the connection]
apeiros has quit [Ping timeout: 240 seconds]
oleo has quit [Quit: Leaving]
kies has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
cschneid_ has joined #ruby
bkxd has joined #ruby
cschneid_ has quit [Ping timeout: 250 seconds]
ap4y has quit [Quit: WeeChat 1.9.1]
bkxd has quit [Ping timeout: 248 seconds]
troys_ is now known as troys
troys has quit [Quit: Bye]
michael1 has quit [Ping timeout: 268 seconds]
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
alex`` has joined #ruby
conta has joined #ruby
apeiros has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
Haris has joined #ruby
<Haris> hello all
ramfjord has joined #ruby
apeiros has quit [Ping timeout: 260 seconds]
<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 ?
<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 ?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Haris> the rake secret command is also not working
<Haris> is that related to ruby ?
snickers has joined #ruby
<RickHull> yep, a couple things:
Dimik has joined #ruby
<RickHull> 1. ruby 1.9.3 is ancient -- you are probably fine with 2.x line and should prefer it
apeiros has joined #ruby
<RickHull> 2. ruby comes packaged with rake
<RickHull> 3. bundler is a separate gem (a ruby package)
<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 ?
ramfjord has quit [Ping timeout: 268 seconds]
<RickHull> with rvm, you may need to log in again for rvm to recognize your installed rubies -- not sure
<Haris> hmm
<RickHull> confirm your ruby install with `ruby --version`
<Haris> that was confirmed. my shell/cli was showing 1.9.3 output for ruby --version
<Haris> ..as+ output..
<Haris> %s/as/in/
<RickHull> if you have ruby 1.9.3, then you should have rake in your path as well
<RickHull> what do you have for `which ruby` ?
b100s has quit [Quit: Leaving]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
quobo has quit [Quit: Connection closed for inactivity]
<Haris> hold please
trosa has joined #ruby
<Haris> on mac, I have its mapped to a username's home folder ----> /Users/username/.rvm/rubies/ruby-1.9.3-p551/bin/ruby
charliesome has joined #ruby
michael1 has joined #ruby
<Haris> %s/I have its/its/
<RickHull> is there anything else in that bin/ dir?
<Haris> yep
<RickHull> like maybe bin/rake ?
<Haris> there's erb, gem, lrb, rake, ri, ruby, testdb
<Haris> testrb+
<Haris> yes, its there
<RickHull> so `which ruby` returns that bin/ dir
<Haris> I need to have this folder on my path ?
<RickHull> what about `which rake` ?
<Haris> returns same path with rake
<RickHull> so what is the problem you are having with rake?
<Haris> let me check in the other shell. hold please
<RickHull> use the same shell that `which rake` is successful
<RickHull> or make sure `which rake` is successful before proceeding
<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
<RickHull> but if `ruby --version` works, then `rake --version` should too
andikr has joined #ruby
eckhardt has joined #ruby
<Haris> yep, rake is ok
<Haris> it just can't find the file it has to process
<Haris> my bad
<RickHull> it's all good, making progress :)
Antiarc has quit [Ping timeout: 240 seconds]
<RickHull> so we've got rvm working, with ruby and rake
<RickHull> we need bundler, right?
<RickHull> `gem install bundler` should do it
konsolebox has joined #ruby
<RickHull> you may want to update rubygems first -- you can try `gem install rubygems-update` or `gem update --system`
<RickHull> prefer the latter to the former
Hien_ has quit [Ping timeout: 255 seconds]
<Haris> YAML safe loading is not available. Please upgrade psych to a version that supports safe loading (>= 2.0).
<Haris> get this msg when I run gem update --system
pfg has quit [Ping timeout: 255 seconds]
aiguuu has quit [Ping timeout: 255 seconds]
<Haris> but its working
<Haris> ok, now bundle install command is working
SegFaultAX has quit [Ping timeout: 255 seconds]
Hien has joined #ruby
zautomata2 has joined #ruby
zautomata has quit [Ping timeout: 240 seconds]
pfg has joined #ruby
PaulCapestany has quit [Read error: Connection reset by peer]
aiguuu has joined #ruby
SegFaultAX has joined #ruby
Antiarc has joined #ruby
Freshnuts has quit [Quit: Leaving]
ta has joined #ruby
michael1 has quit [Ping timeout: 240 seconds]
<RickHull> if you can get crowdtilt working on 1.9.3, congrats
<RickHull> don't go too far with it. next install ruby 2.0 - 2.4 with rvm
zautomata2 has quit [Ping timeout: 258 seconds]
<RickHull> and do the same jig with `gem update --system` and `gem install bundler` etc
<RickHull> if there is a problem with ruby 2.x, then at least you still have 1.9.3
wu__ has quit [Ping timeout: 268 seconds]
<RickHull> but you should STRONGLY prefer ruby 2.x and focus on that if you can
<RickHull> maybe poke around their wiki to see if they have more update instructions hidden somewhere
<RickHull> ruby 2.0 was EOL'd years ago, FYI
PaulCape_ has joined #ruby
JsilverT has quit [Ping timeout: 268 seconds]
aufi has joined #ruby
zautomata2 has joined #ruby
<Haris> system update did it
<Haris> this app is old. it snot being maintained anymore
<Haris> its in its requirement
<Haris> requirements+
<Haris> hmm
<RickHull> sure, i mean -- they wrote that when 1.9.3 was the latest
<Haris> =)
<RickHull> lacking a claim that it works on 2.x is not evidence that it doesn't
enterprisey has quit [Remote host closed the connection]
<RickHull> it will be painful to try to run 1.9.3 stuff
<RickHull> and you run security risks
<RickHull> a lot of libs and gems and stuff will be out of date and vulnerable
<RickHull> and a lot of docs and such won't work for you
claudiuinberlin has joined #ruby
adlerdias has joined #ruby
adlerdias has quit [Remote host closed the connection]
adlerdias has joined #ruby
JsilverT has joined #ruby
Dimik has quit []
adlerdias has quit [Client Quit]
mikecmpbll has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 260 seconds]
InfinityFye has joined #ruby
jphase has joined #ruby
Puffball has quit [Remote host closed the connection]
Mont3 has joined #ruby
zautomata2 has quit [Ping timeout: 240 seconds]
andikr has quit [Ping timeout: 240 seconds]
<Mont3> o/
aeaeaeae2 has joined #ruby
zautomata2 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
Dimik has joined #ruby
jphase has quit [Ping timeout: 246 seconds]
iamarun has joined #ruby
brent__ has quit [Quit: Connection closed for inactivity]
Mont3 has quit [Ping timeout: 268 seconds]
Sina has joined #ruby
miskatonic has joined #ruby
jphase has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Quit: inabit. zz.]
jphase has quit [Ping timeout: 240 seconds]
jphase has joined #ruby
blackmesa1 has joined #ruby
iamarun has quit [Ping timeout: 240 seconds]
ana_ has joined #ruby
aeaeaeae2 has quit [Quit: Lost terminal]
zautomata3 has joined #ruby
Dimik has quit [Remote host closed the connection]
zautomata2 has quit [Ping timeout: 246 seconds]
Burgestrand has joined #ruby
Silthias has joined #ruby
quobo has joined #ruby
Silthias1 has quit [Ping timeout: 252 seconds]
blackmesa1 has quit [Quit: WeeChat 1.9.1]
zautomata4 has joined #ruby
zautomata3 has quit [Ping timeout: 250 seconds]
mikecmpbll has joined #ruby
jphase has quit [Ping timeout: 268 seconds]
imode has quit [Ping timeout: 264 seconds]
charliesome has joined #ruby
charliesome has quit [Client Quit]
kapil___ has quit [Quit: Connection closed for inactivity]
karapetyan has joined #ruby
mim1k has joined #ruby
mark_66 has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
vondruch has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
<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
mim1k has quit [Ping timeout: 258 seconds]
wu__ has joined #ruby
<matthewd> waveprop: What do you expect `use First::Base 'go' do` to do?
r3QuiEm_cL has joined #ruby
zenspider has quit [Ping timeout: 248 seconds]
<waveprop> matthewd: i expect it to pass the string 'go' as the second parameter to First::Base.initialize, and the block as the second
mim1k has joined #ruby
RickHull has quit [Ping timeout: 260 seconds]
<matthewd> waveprop: Try adding a comma
<waveprop> matthewd: that was the first thing i tried, and i get unexpected keyword_do_block http://termbin.com/rrc4
zenspider has joined #ruby
<matthewd> Try adding a comma in the right place ¯\_(ツ)_/¯
ramfjord has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
wu__ has quit [Ping timeout: 268 seconds]
Ayey_ has joined #ruby
mim1k has joined #ruby
<waveprop> strange. so the last argument before a block doesnt need a comma
<waveprop> matthewd: thanks very much for your help.
ramfjord has quit [Ping timeout: 248 seconds]
<matthewd> Right; the block is not a positional parameter
<waveprop> okay good to know
<waveprop> can i ask why
<matthewd> The short answer is that it's just the way the syntax works
<matthewd> Slightly longer is that blocks are a syntax construct, not a value, so they have their own syntax
<matthewd> And as they're already distinguished by that syntax, a comma would be redundant
<waveprop> okay. thanks
marr has joined #ruby
<waveprop> i would never have figured that out
redhedded1 has joined #ruby
zautomata has joined #ruby
haraoka has quit [Ping timeout: 240 seconds]
zautomata4 has quit [Ping timeout: 250 seconds]
wu__ has joined #ruby
Beams has joined #ruby
Serpent7776 has joined #ruby
cschneid_ has joined #ruby
dhollin has joined #ruby
dhollin3 has quit [Ping timeout: 246 seconds]
cschneid_ has quit [Ping timeout: 252 seconds]
r3QuiEm_cL has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
iamarun has joined #ruby
mim1k has quit [Disconnected by services]
mim1k_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wu__ has quit [Ping timeout: 240 seconds]
ur5us has quit [Remote host closed the connection]
alfiemax has joined #ruby
karapetyan has joined #ruby
redondos has joined #ruby
karapetyan has quit [Ping timeout: 246 seconds]
charliesome has joined #ruby
cschneid_ has joined #ruby
adlerdias has joined #ruby
kapil___ has joined #ruby
cschneid_ has quit [Ping timeout: 250 seconds]
karapetyan has joined #ruby
jphase has joined #ruby
Burgestrand has quit [Quit: Closing time!]
jphase has quit [Ping timeout: 240 seconds]
karapetyan has quit [Remote host closed the connection]
troulouliou_div2 has joined #ruby
darkness has joined #ruby
darkness has quit [Client Quit]
jphase has joined #ruby
ferr has joined #ruby
n13z has quit [Ping timeout: 240 seconds]
ldnunes has joined #ruby
n13z has joined #ruby
Silthias1 has joined #ruby
sekmo has joined #ruby
Silthias has quit [Ping timeout: 240 seconds]
JsilverT has quit [Ping timeout: 240 seconds]
shaun has joined #ruby
<shaun> hello room
jphase has quit [Ping timeout: 240 seconds]
zanoni has joined #ruby
alfiemax has quit [Ping timeout: 248 seconds]
jottr__ has joined #ruby
jphase has joined #ruby
jottr__ has quit [Client Quit]
<apeiros> hi shaun
<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 ?
<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.
<waveprop> i think i need to get that inner block to populate @routes at the instance level.. in the class definition. am i wrong?
drptbl has joined #ruby
jphase has quit [Ping timeout: 258 seconds]
cschneid_ has joined #ruby
Hexafox[I] has quit [Ping timeout: 240 seconds]
cschneid_ has quit [Ping timeout: 250 seconds]
fishcooker has quit [Quit: Leaving.]
shaun has quit [Quit: Page closed]
drptbl has quit [Quit: See you later!]
GodFather has joined #ruby
selim has quit [Ping timeout: 250 seconds]
jaruga has joined #ruby
jaruga has quit [Remote host closed the connection]
sekmo has quit [Quit: Textual IRC Client: www.textualapp.com]
jaruga has joined #ruby
ramfjord has joined #ruby
selim has joined #ruby
miskatonic has quit [Read error: Connection reset by peer]
Burgestrand has joined #ruby
Psybur has joined #ruby
mim1k_ has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
iamarun has quit [Remote host closed the connection]
snickers has quit [Read error: Connection reset by peer]
blackbaba has joined #ruby
banisterfiend has joined #ruby
thinkpad has quit [Read error: Connection reset by peer]
mim1k has joined #ruby
nadir has joined #ruby
FahmeF has quit [Ping timeout: 260 seconds]
Psybur has quit [Ping timeout: 260 seconds]
yokel has quit [Remote host closed the connection]
thinkpad has joined #ruby
yokel has joined #ruby
blackbaba has quit [Remote host closed the connection]
thinkpad has quit [Read error: Connection reset by peer]
mim1k has quit [Ping timeout: 258 seconds]
blackbaba has joined #ruby
thinkpad has joined #ruby
blackbaba has quit [Client Quit]
minimalism has quit [Quit: minimalism]
mim1k has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alfiemax has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
milardov_ has joined #ruby
milardovich has quit [Ping timeout: 250 seconds]
ajaysingh has joined #ruby
ldnunes has quit [Ping timeout: 260 seconds]
uZiel has quit [Ping timeout: 250 seconds]
jphase has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
banisterfiend has joined #ruby
anisha has quit [Ping timeout: 260 seconds]
alfiemax has quit [Remote host closed the connection]
jphase has quit [Ping timeout: 250 seconds]
John___ has joined #ruby
jphase has joined #ruby
VladGh has quit [Remote host closed the connection]
ldnunes has joined #ruby
VladGh has joined #ruby
JsilverT has joined #ruby
jphase has quit [Ping timeout: 250 seconds]
tvw has joined #ruby
jphase has joined #ruby
ldnunes has quit [Ping timeout: 250 seconds]
jphase has quit [Ping timeout: 248 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jphase has joined #ruby
jrafanie has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
bmurt has joined #ruby
mim1k has joined #ruby
ldnunes has joined #ruby
truenito has joined #ruby
darkmorph has joined #ruby
ramfjord has joined #ruby
milardovich has joined #ruby
jphase has quit [Ping timeout: 250 seconds]
truenito has quit [Remote host closed the connection]
jphase_ has joined #ruby
milardov_ has quit [Ping timeout: 240 seconds]
shinnya has joined #ruby
konsolebox has quit [Ping timeout: 268 seconds]
infernix has quit [Ping timeout: 240 seconds]
blackbaba has joined #ruby
truenito has joined #ruby
ramfjord has quit [Ping timeout: 268 seconds]
huyderman has quit [Ping timeout: 240 seconds]
quobo has quit [Quit: Connection closed for inactivity]
govg has quit [Ping timeout: 240 seconds]
jphase_ has quit [Ping timeout: 252 seconds]
huyderman has joined #ruby
blackbaba has left #ruby [#ruby]
truenito has quit [Ping timeout: 268 seconds]
konsolebox has joined #ruby
synthroid has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
nowhereman has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
GodFather_ has joined #ruby
GodFather has quit [Quit: Ex-Chat]
GodFather_ has quit [Client Quit]
<dminuoso> matthewd: See, this is why I like my lambdas. No weird confusion about how functions have to be passed compared to values. ;p
<dminuoso> Functions are values. ;p
GodFather has joined #ruby
GodFather_ has joined #ruby
DWSR has joined #ruby
alex`` has quit [Quit: WeeChat 1.9.1]
<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)
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<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.
infernix has joined #ruby
jphase has joined #ruby
<dminuoso> DWSR: How did you "compile PassengerAgent" ? If it's done with gem, you should obtain an mkmf.log
<DWSR> dminuoso: So Passenger (the gem) needs a helper binary.
<DWSR> Once you have the Gem, if you try to run `passenger start`, it will try to either download or compile this helper binary.
<dminuoso> DWSR: I know why I avoid passenger. Puma is simply much less of a hassle. :|
<DWSR> dminuoso: Yes, I know. :(
<dminuoso> It just works, without quirky native extensions, weird nginx integration, etc.
<DWSR> Unfortunately this isn't my call. I'm trying to slim down my images and speed up the build process for the containers.
<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
<DWSR> I am pressuring PTB to moving to Puma or Unicorn
<DWSR> But that may not make it on the priority list, so this work is still valid for the meantime.
alfiemax has joined #ruby
jphase has quit [Ping timeout: 240 seconds]
<dminuoso> Partido Trabalhista Brasileiro?
<dminuoso> Powers That Be?
<DWSR> Powers That Be.
<dminuoso> ;o
<DWSR> I was originally going to use PHB, but I like him
Rapture has joined #ruby
zapata has quit [Ping timeout: 252 seconds]
<dminuoso> Polyhydroxybutyrate?
<DWSR> Pointy Haired Boss.
<DWSR> dminuoso: Anyway, anything that you can suggest that's more directly relevant to my inquiry?
milardovich has quit []
alfiemax has quit [Remote host closed the connection]
ramfjord has joined #ruby
alex`` has joined #ruby
alfiemax has joined #ruby
govg has joined #ruby
mson has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
alfiemax has quit [Ping timeout: 260 seconds]
<dminuoso> DWSR: Nothing conclusive.
<dminuoso> I know how I would debug it, but its unlikely to be helpful.
ajaysingh has quit [Remote host closed the connection]
<dminuoso> DWSR: Is that the entire output, or is there more? Perhaps a ruby stack trace? Or additional output before that?
<DWSR> The additional output before is very similar to L1 in that snippet.
<dminuoso> gist it anyway.
<dminuoso> I want to see the entirety of it.
<DWSR> Otherwise, that's the entire output. I'm trying to get more verbose output to start
<DWSR> Sure, sec.
Psybur has joined #ruby
mim1k has quit [Ping timeout: 248 seconds]
<DWSR> If this works, then it gives me an area to look in
GodFather_ has quit [Ping timeout: 250 seconds]
GodFather has quit [Ping timeout: 258 seconds]
gnufied has joined #ruby
<DWSR> Yeah, looks like that worked.
<DWSR> Sec, I'll gist you the Dockerfile and the full output (need to generate it again)
zapata has joined #ruby
jphase has joined #ruby
<DWSR> It's compiling nginx from source ffs.
jphase_ has joined #ruby
jphase_ has quit [Remote host closed the connection]
jphase_ has joined #ruby
cdg has joined #ruby
jphase has quit [Ping timeout: 260 seconds]
<dminuoso> DWSR: See, you cut off exactly after the the relevant line I wanted to see.
<dminuoso> ;-)
<DWSR> That's the end of the output.
<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
<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"
<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
adlerdias has left #ruby [#ruby]
<DWSR> What line is that?
<DWSR> Yeah, found it
<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.
<DWSR> I have been staring at this way too long
<dminuoso> So my best guess is that you are missing linux kernel headers.
<DWSR> So probably just missing the musl headers.
<dminuoso> No, linux kernel headers.
<dminuoso> apk add linux-headers
<dminuoso> is what you want
<DWSR> Yeah, recompiling now
<DWSR> Hah, that's in the other Dockerfile that I linked.
<DWSR> (The other one where someone knows what they're doing()
<dminuoso> DWSR: For future reference, gist entire log outputs. It's not offensive to dump 10 pages of logs, it's much more helpful.
<dminuoso> (unless you know with absolute certainty that its not relevant)
tcopeland has quit [Quit: tcopeland]
alnewkirk has joined #ruby
JsilverT has quit [Read error: Connection reset by peer]
s3nd1v0g1us has quit [Ping timeout: 246 seconds]
mikecmpb_ has joined #ruby
JsilverT has joined #ruby
mikecmpbll has quit [Read error: Connection reset by peer]
Bish has joined #ruby
<Bish> how would i get all tributes in "body"
<Bish> nokogiri that is.
JsilverT has quit [Client Quit]
<dminuoso> Nokogiri lenses.
<dminuoso> Its all clear to me.
<dminuoso> That's what we need.
JsilverT has joined #ruby
<Bish> xpath is bullshit, so yeah.
<Bish> still haven't solved that issue
<Bish> #(Attr:0x8d8768 { name = "xmlns:v", value = "urn:schemas-microsoft-com:vml" }),
<Bish> #(Attr:0x8d8754 { name = "xmlns:o", value = "urn:schemas-microsoft-com:office:office" })]
<Bish> having these 2 in my "doc"
<Bish> fucks everything up
GodFather has joined #ruby
<waveprop> functions are values?
<tobiasvl> waveprop: what do you mean?
<Bish> should be the other way around, values should be function, amiright dminuoso
<waveprop> tobiasvl: in the scrollback dminuoso said it
<waveprop> i think he was talking about a specific code, now that i reread what he said
<waveprop> s/code/bit of code/
<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
zanoni has quit [Read error: Connection reset by peer]
konsolebox has quit [Ping timeout: 260 seconds]
John___ has quit [Read error: Connection reset by peer]
<dminuoso> tobiasvl: methods can directly be obtained
<dminuoso> >> method(:puts)
<ruby[bot]> dminuoso: # => #<Method: Object(Kernel)#puts> (https://eval.in/894601)
<Bish> >> method(:method)[:method].call(:method)
<Bish> >> method(:method)[:method].call(:method)
<ruby[bot]> Bish: # => #<Method: Object(Kernel)#method> (https://eval.in/894602)
<Bish> for clarification
<dminuoso> Methodception.
<Bish> thats my methodology
<dminuoso> Trying to pull a baweaver, eh?
<Bish> sorry, what?
quobo has joined #ruby
rfoust has joined #ruby
konsolebox has joined #ruby
bkxd has joined #ruby
aufi has quit [Ping timeout: 250 seconds]
<Bish> dminuoso: you know how i would get all nodes which are NOT containing something THEIR attributes?
dionysus69 has quit [Ping timeout: 250 seconds]
Silthias has joined #ruby
Silthias1 has quit [Ping timeout: 268 seconds]
Haris has left #ruby [#ruby]
<waveprop> has minitest been removed from stdlib
bkxd has quit [Ping timeout: 248 seconds]
<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
<havenwood> waveprop: Nope.
<waveprop> okay
<havenwood> waveprop: https://stdgems.org
<waveprop> thanks havenwood
<waveprop> i see
ahrs has quit [Read error: Connection reset by peer]
ahrs has joined #ruby
oleo has joined #ruby
nowhereman has quit [Ping timeout: 260 seconds]
Psybur has quit [Read error: Connection reset by peer]
Psybur has joined #ruby
<Bish> is : a special character in regex?
polishdub has joined #ruby
<Bish> attributes = parsed_body.xpath(XPATH_ATTRIBUTES).select { |x| x.name ^~ /:/ }
<Bish> if someone has a better solution to do this, he may speak now
DLSteve has joined #ruby
TinkerTyper has quit [Read error: Connection reset by peer]
aufi has joined #ruby
TinkerTyper has joined #ruby
mtkd has quit [Ping timeout: 260 seconds]
John___ has joined #ruby
mtkd has joined #ruby
<havenwood> Bish: or she
<havenwood> Bish: grep_v
<havenwood> >> ['nerp', 'y:erp', ':'].grep_v /:/ # Bish
<ruby[bot]> havenwood: # => ["nerp"] (https://eval.in/894619)
stoffus has joined #ruby
swills has quit [Remote host closed the connection]
ta has quit [Remote host closed the connection]
jrafanie has joined #ruby
alan_w has joined #ruby
rippa has joined #ruby
brw has left #ruby ["Off to listen to some tunes..."]
aufi_ has joined #ruby
michael1 has joined #ruby
milardovich has joined #ruby
croberts has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
mim1k has joined #ruby
aufi has quit [Ping timeout: 268 seconds]
rabajaj has quit [Quit: Leaving]
nowhereman has joined #ruby
ozcanesen has joined #ruby
tcopeland has joined #ruby
mim1k has quit [Ping timeout: 250 seconds]
hgost has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ldnunes has quit [Ping timeout: 240 seconds]
John___ has quit [Ping timeout: 268 seconds]
uZiel has joined #ruby
mim1k has joined #ruby
<Bish> well, im used to that, sorry
<Bish> >> ['.','not'].grep('.')
<ruby[bot]> Bish: # => ["."] (https://eval.in/894636)
iamarun has joined #ruby
<Bish> >> ['.','not'].grep(/./)
<ruby[bot]> Bish: # => [".", "not"] (https://eval.in/894637)
FahmeF has joined #ruby
<Bish> havenwood:
<Bish> so that didnt help much
tvw has quit []
tvw has joined #ruby
<havenwood> Bish: Dot is a special character in Regexp.
<havenwood> >> ['.', 'Bish', 'not'].grep Regexp.new Regexp.escape '.'
<ruby[bot]> havenwood: # => ["."] (https://eval.in/894642)
<Bish> havenwood: yeah and i asked if : is too
<Bish> and you given me that example, which could be useless
<havenwood> Bish: No, it isn't.
<Bish> thanks :>
<havenwood> Bish: My example isn't useless. And the second example lets you check.
<havenwood> >> ':' == Regexp.escape(':')
<ruby[bot]> havenwood: # => true (https://eval.in/894645)
<Bish> now thats helpful
joast has quit [Quit: Leaving.]
joast has joined #ruby
ldnunes has joined #ruby
chouhoulis has joined #ruby
alfiemax has joined #ruby
shinnya has quit [Ping timeout: 268 seconds]
Mont3 has joined #ruby
ldnunes has quit [Ping timeout: 240 seconds]
kozrar has quit [Quit: Leaving]
vondruch has quit [Quit: vondruch]
kozrar has joined #ruby
kozrar has quit [Remote host closed the connection]
dviola has joined #ruby
vondruch has joined #ruby
Mont3 has quit [Ping timeout: 268 seconds]
mikecmpb_ has quit [Quit: inabit. zz.]
kozrar has joined #ruby
kozrar has quit [Max SendQ exceeded]
mikecmpbll has joined #ruby
milardov_ has joined #ruby
Ayey_ has quit [Ping timeout: 250 seconds]
kozrar has joined #ruby
<guardian> if there a shorter way to write if !(baz = foo[bar]).nil? then return baz
vondruch has quit [Quit: vondruch]
milardovich has quit [Ping timeout: 240 seconds]
alfiemax_ has joined #ruby
dinoangelov has joined #ruby
<Bish> [foo[bar]].compact.first
<Bish> :p
vondruch has joined #ruby
<Bish> [foo[bar]].compact.each{|x|return x}
sucks has joined #ruby
<Bish> return x unless x = foo[bar]
<Bish> should work, too
<guardian> return foo[bar] is foo[bar]
alfiemax has quit [Ping timeout: 240 seconds]
<Bish> eh?
ldnunes has joined #ruby
<guardian> s/is/if
<guardian> return foo[bar] if foo[bar]
<Bish> yeah, youre right, lol
<guardian> not sure how people write these early returns, I'm a bit annoyed by the double evaluation
<Bish> but then you can do
xco has joined #ruby
<Bish> return x if x = foo[bar]
<Bish> since u asked for shorter versions
<guardian> didn't know I can write it this way
<guardian> I'm a ruby noob
<Bish> >> def y;foo={bar:1};return x if x=foo[:bar];end;y
<ruby[bot]> Bish: # => undefined local variable or method `x' for main:Object ...check link for more (https://eval.in/894679)
<Bish> mioght not be possible either way.
<Bish> but return x if x
<Bish> works
<Bish> >> def y;foo={bar:1};x = foo[:bar];return x if x;end;y
<ruby[bot]> Bish: # => 1 (https://eval.in/894680)
<Bish> guardian: every value in ruby is "true" in ruby no falsy things
<Bish> EXCEPT for nil and false
<Bish> thats literally, the only 2 that should be false
<Bish> >> ["",0,false,nil].map { |x| x ? true : false }
<ruby[bot]> Bish: # => [true, true, false, false] (https://eval.in/894681)
<Bish> thats particulary important.. which things like.. #find_index() where javascript would fuck you up by 0 being false
zanoni has joined #ruby
<Bish> how do you actually check for falsyness?
<Bish> >> ["",0,false,nil].compact
<ruby[bot]> Bish: # => ["", 0, false] (https://eval.in/894691)
cdg has quit [Remote host closed the connection]
troys has joined #ruby
cdg has joined #ruby
<Bish> asm>> !!1
<ruby[bot]> Bish: I have disassembled your code, the result is at https://eval.in/894694
<Bish> so there is no way to check for falsyness except for tenary, !, and if?
cschneid_ has joined #ruby
cdg has quit [Ping timeout: 258 seconds]
reber has quit [Quit: Leaving]
<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
ana_ has quit [Quit: Leaving]
mim1k has quit [Ping timeout: 258 seconds]
<Bish> LyndsySimon: keep me updated
<Bish> i hate 'csv'
<Bish> uhh, thats cool
<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.
<Bish> in your dsl, the order in which "fields" are givin is the same as in the file?
<Bish> what about headlines in csv?
<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.
<Bish> dsl are the sickest shit ever
<LyndsySimon> Bish: Yes, fields are defined by default in the order they are presented in the file.
synthroid has quit [Remote host closed the connection]
<Bish> DSLs are always natural fit.. because thats what they do
<Bish> theyre specific for the domain.. they work for
<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.
<LyndsySimon> Bish: My favorite DSL I've written so far is for defining datatables. It's written on top of ajax-datatables-rails.
<Bish> field :family_name, from: last_name what does this mean then?
<Bish> your type also says ":integer"
<Bish> you should use Integer instead
<Bish> there is no reason to use the class itself, it's a value/object, too
jarnalyrkar has joined #ruby
mim1k has joined #ruby
<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.
jarnalyrkar has left #ruby [#ruby]
<Bish> yeah if you're giving a type for integer use
<Bish> >> 1.class
<ruby[bot]> Bish: # => Fixnum (https://eval.in/894706)
<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.
<Bish> or rather :D something of
<Bish> >> 1.class.ancestors
<ruby[bot]> Bish: # => [Fixnum, Integer, Numeric, Comparable, Object, Kernel, BasicObject] (https://eval.in/894707)
michael3 has joined #ruby
<LyndsySimon> `object.class < Integer` :)
<havenwood> Ruby 2.4: 1.class #=> Integer
<LyndsySimon> >> 1.class < Numeric
<ruby[bot]> LyndsySimon: # => true (https://eval.in/894709)
<Bish> but i like the idea of having a dsl for getting a result out of a csv
<Bish> you should add support for bad encoding and stuff
<Bish> because the things.. fuck me up most in ruby csv
<Bish> and quoting which isn't correct... detection for it
<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.
<Bish> remember a stackoverflow where someone did quote_char:"<utf8snowman>"
<Bish> LyndsySimon: i think you can split hsoe, but not as detailed as you do
<Bish> you could put "schema & row validation" together
<Bish> and exluding and processing
michael1 has quit [Ping timeout: 240 seconds]
<Bish> kinda like
jarnalyrkar has joined #ruby
<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.
<Bish> parsed = imgoingtoparse("some.csv") { x.schema = whopdidu";x.shouldexclude=[1,2,3] };parsed.output_with {...}
<Bish> that's how i'd like it
<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.
jarnalyrkar has quit [Client Quit]
Burgestrand has quit [Quit: Closing time!]
jarnalyrkar has joined #ruby
<LyndsySimon> Anyhow, thanks for letting me bounce the idea off you :) I have an inkling I may write the gem this week for fun.
jarnalyrkar has quit [Client Quit]
jarnalyrkar has joined #ruby
jnollette has quit [Quit: All your IRC are belong to ZNC]
orbyt_ has joined #ruby
<Bish> weird definition of fun you have there
jnollette has joined #ruby
<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.
<Bish> reminds of that dude, who writes stellaris mods, which are super sophisticated
<Bish> "i do actually not play stellaris, i like writing mods, though"
<LyndsySimon> LOL.
<LyndsySimon> Yeah, I can see that.
jarnalyrkar has quit [Client Quit]
<Bish> LyndsySimon: well skip ruby, do haskell :D
<Bish> or lisp
<Bish> i've been there
<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.
<Bish> still am, but i've been there
jarnalyrkar has joined #ruby
jarnalyrkar has quit [Client Quit]
<Bish> in haskell you can have DSLs compiled to native code, if that's not cool i don't know what is
jarnalyrkar has joined #ruby
<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.
<Bish> same here
<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.
<Bish> same here**2
<LyndsySimon> Plus, Clojure's tooling is *slow*.
<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.
aufi_ has quit [Quit: Leaving]
Devalo has joined #ruby
<LyndsySimon> Oh hey - here's an example of a previous DSL I've written, in use:
dostoyevsky has quit [Ping timeout: 248 seconds]
<Bish> reminds me strongly of sequel
<Bish> so i like it.
<LyndsySimon> `get_raw_records` was named by the library the DSL sits atop, not me.
* LyndsySimon looks up sequel
<Bish> you cannot keep up with that, it's the best thing there is in ruby
<Bish> i based a company on that shit and it's great, might make me broke & depressive
<Bish> but roda and sequel are the best 2 things ever happened to me in programming
<LyndsySimon> Hell yeah, that's awesome.
<Bish> LyndsySimon: look up stuff from jeremy evans, it's DSL all the way
<LyndsySimon> Sequel looks a lot like my style.
<Bish> kinda like an idol to me, super nice guy, most awesome code
<LyndsySimon> I'm skimming the docs now. I love it. It's both simpler and more powerful that ActiveRecord.
<LyndsySimon> composite key support! :P
<Bish> they're not even in the same universe
<Bish> when it comes to usage
milardovich has joined #ruby
<Bish> LyndsySimon: roda is a webserver which allows you to program ruby "off-rails" and is also DSL all the way
<Bish> then you basicially write webprojects like
jarnalyrkar has quit [Quit: Leaving]
petrichorx_ has joined #ruby
<Bish> route.get("someObject") { Model::Something[r.params[:id]] }
jarnalyrkar has joined #ruby
<Bish> and the guy gets a json encoded version of your model
<Bish> sorry.. i get carried away
jarnalyrkar has quit [Client Quit]
<LyndsySimon> Nah, that's a good thing.
<LyndsySimon> I will point out that you were just making fun of me for seeing this kind of thing as fun, though :)
<Bish> i really liked ruby until i discovered sequel and roda, then i freaking loved it, eye-opening
milardov_ has quit [Ping timeout: 250 seconds]
<Bish> LyndsySimon: well, nerdy stuff is the most fun there is.. csv isn't
conta has quit [Ping timeout: 260 seconds]
<Bish> nerdy stuff is not what i meant
<LyndsySimon> CSV is only a convenient hook I'm using to get to do the nerdy stuff
dinfuehr has quit [Ping timeout: 240 seconds]
<Bish> csv is the worst transport there is.. hell http get parameter are better
<Bish> since they encode stuff
mikecmpbll has quit [Quit: inabit. zz.]
jarnalyrkar has joined #ruby
<Bish> LyndsySimon: 2 lines of sequel are written by me, never been so proud
dinfuehr has joined #ruby
mikecmpbll has joined #ruby
<LyndsySimon> CSV is actually quite sane - it's the implementations that make you want to shoot yourself.
* LyndsySimon iz proud.
<Bish> LyndsySimon: and people not using it correctly
<Bish> varying column count... quotation without escaping quotations inside
<Bish> encoding switching
<LyndsySimon> IIRC, Excel's CSV exports are bad, too.
<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.
<Bish> LyndsySimon: pg, eh? you make the right choices, keep up the good work
<Bish> well, g2g, see ya!
<Bish> screw rails, sequel&roda all the way
<Bish> https://github.com/ruby-hyperloop also super interesting stuff, never used it though
raynold has quit [Quit: Connection closed for inactivity]
<Bish> just for experimenting
lucz has joined #ruby
thinkpad has quit [Ping timeout: 268 seconds]
milardovich has quit [Remote host closed the connection]
glundgren has joined #ruby
Technodrome has joined #ruby
darkmorph has quit [Ping timeout: 246 seconds]
cagomez has joined #ruby
lucz has quit [Remote host closed the connection]
kozrar_ has joined #ruby
<apeiros> LyndsySimon: excel doesn't even know what the C in CSV stands for :-S
kozrar_ has quit [Remote host closed the connection]
kozrar_ has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
synthroid has joined #ruby
kozrar has quit [Ping timeout: 240 seconds]
polishdub has left #ruby [#ruby]
kozrar_ has left #ruby [#ruby]
kozrar has joined #ruby
kozrar has quit [Max SendQ exceeded]
iamarun has quit [Ping timeout: 240 seconds]
kozrar has joined #ruby
ferr has quit [Quit: WeeChat 1.9.1]
Ayey_ has joined #ruby
redhedded1 has quit [Quit: Textual IRC Client: www.textualapp.com]
milardovich has joined #ruby
troys is now known as troys_
Ayey_ has quit [Ping timeout: 240 seconds]
dostoyevsky has joined #ruby
dionysus69 has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
trosa has quit [Quit: Under DDoS attack]
Technodrome has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
ozcanesen has quit [Quit: ozcanesen]
darkmorph has joined #ruby
infernix has quit [Read error: Connection reset by peer]
hgost has quit [Quit: Textual IRC Client: www.textualapp.com]
milardov_ has joined #ruby
ozcanesen has joined #ruby
Silthias1 has joined #ruby
jaruga has quit [Quit: jaruga]
mark_66 has quit [Remote host closed the connection]
Silthias has quit [Ping timeout: 268 seconds]
sucks has quit [Remote host closed the connection]
milardovich has quit [Ping timeout: 240 seconds]
cdg_ has joined #ruby
cdg_ has quit [Remote host closed the connection]
cdg_ has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
glundgren has quit []
mtkd has quit [Ping timeout: 268 seconds]
RickHull has joined #ruby
mtkd has joined #ruby
orbyt_ has joined #ruby
chouhoulis has quit [Ping timeout: 246 seconds]
iceden has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
Serpent7776 has quit [Quit: Leaving]
infernix has joined #ruby
GodFather has quit [Ping timeout: 252 seconds]
cdg has joined #ruby
conta1 has joined #ruby
Devalo has quit [Ping timeout: 248 seconds]
cdg_ has quit [Ping timeout: 240 seconds]
Rapture has quit [Ping timeout: 268 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
conta1 has quit [Ping timeout: 250 seconds]
troys_ is now known as troys
Ayey_ has joined #ruby
tsglove has left #ruby ["Leaving"]
Puffball has joined #ruby
Technodrome has joined #ruby
imode has joined #ruby
Ayey_ has quit [Ping timeout: 240 seconds]
darkmorph has quit [Ping timeout: 258 seconds]
sucks has joined #ruby
sucks has quit [Max SendQ exceeded]
mikecmpbll has quit [Quit: inabit. zz.]
mim1k has quit [Ping timeout: 250 seconds]
Beams has quit [Quit: .]
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
FahmeF has quit [Remote host closed the connection]
the_f0ster has joined #ruby
FahmeF has joined #ruby
milardov_ has quit [Remote host closed the connection]
quobo has quit [Quit: Connection closed for inactivity]
milardovich has joined #ruby
KeyJoo has joined #ruby
lucz has joined #ruby
milardovich has quit [Ping timeout: 240 seconds]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ayey_ has joined #ruby
Dimik has joined #ruby
Toggi3 has joined #ruby
Ayey_ has quit [Ping timeout: 250 seconds]
dangerousdave has joined #ruby
kies has quit [Ping timeout: 258 seconds]
xco has quit [Read error: Connection reset by peer]
bkxd has joined #ruby
darkmorph has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xco has joined #ruby
bkxd has quit [Ping timeout: 264 seconds]
dangerousdave has quit [Quit: Textual IRC Client: www.textualapp.com]
marxarelli|afk is now known as marxarelli
ozcanesen has quit [Quit: ozcanesen]
alex`` has quit [Quit: WeeChat 1.9.1]
Xiti has joined #ruby
alex`` has joined #ruby
mjolnird has joined #ruby
lucz has quit [Remote host closed the connection]
tvw has quit [Remote host closed the connection]
quobo has joined #ruby
InfinityFye has quit [Ping timeout: 260 seconds]
raatiniemi has joined #ruby
lucz has joined #ruby
ramfjord has joined #ruby
DWSR has quit [Ping timeout: 260 seconds]
chouhoulis has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
waveprop has quit [Ping timeout: 248 seconds]
moei has joined #ruby
GodFather has joined #ruby
Silthias has joined #ruby
chouhoulis has quit [Ping timeout: 250 seconds]
Silthias1 has quit [Ping timeout: 250 seconds]
ozcanesen has joined #ruby
truenito has joined #ruby
the_f0ster has quit [Quit: leaving]
ozcanesen has quit [Quit: ozcanesen]
mikecmpbll has joined #ruby
alfiemax_ has quit [Remote host closed the connection]
kies has joined #ruby
alfiemax has joined #ruby
milardovich has joined #ruby
imode has quit [Ping timeout: 258 seconds]
hahuang65 has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has quit [Ping timeout: 250 seconds]
<dminuoso> apeiros: Haha.
<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.
milardovich has quit [Ping timeout: 268 seconds]
<dminuoso> That has the same quality as that "Chili con carne without meat" sign on a restaurant a few years back.
alfiemax has joined #ruby
Ayey_ has joined #ruby
mson has quit [Quit: Connection closed for inactivity]
eckhardt_ has joined #ruby
milardovich has joined #ruby
orbyt_ has joined #ruby
Ayey_ has quit [Ping timeout: 258 seconds]
raynold has joined #ruby
Rapture has joined #ruby
Silthias1 has joined #ruby
milardovich has quit [Ping timeout: 248 seconds]
Silthias has quit [Ping timeout: 250 seconds]
ta has joined #ruby
ta has quit [Remote host closed the connection]
ta has joined #ruby
troulouliou_div2 has quit [Remote host closed the connection]
ledestin has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ozcanesen has joined #ruby
kozrar has quit [Quit: Leaving]
cdg has quit [Remote host closed the connection]
lucz has quit [Remote host closed the connection]
naprimer2 has quit [Quit: Leaving]
ozcanesen has quit [Client Quit]
lucz has joined #ruby
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
cdg has joined #ruby
Rapture has joined #ruby
jrafanie has joined #ruby
Technodrome has joined #ruby
ozcanesen has joined #ruby
cdg has quit [Ping timeout: 250 seconds]
troys is now known as troys_
naprimer has joined #ruby
ozcanesen has quit [Quit: ozcanesen]
lucz has quit [Remote host closed the connection]
ozcanesen has joined #ruby
lucz has joined #ruby
reber has joined #ruby
JsilverT has quit [Ping timeout: 240 seconds]
alfiemax has quit [Remote host closed the connection]
<LyndsySimon> Can anyone tell me why this fails?
Devalo has joined #ruby
<LyndsySimon> >> x = Integer; x('1')
<ruby[bot]> LyndsySimon: # => undefined method `x' for main:Object (NoMethodError) ...check link for more (https://eval.in/894905)
ozcanesen has quit [Quit: ozcanesen]
lucz has quit [Remote host closed the connection]
<dminuoso> LyndsySimon: methods and local variables occupy different namespaces.
ozcanesen has joined #ruby
<LyndsySimon> dminuoso: OK... I'm not following.
<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.
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso> LyndsySimon: However, if you explicitly use (), it will assume you try to use a method instead.
ozcanesen has quit [Client Quit]
<dminuoso> so it will not use the local variable, but look for a method named x instead.
<LyndsySimon> >> x '1'
<ruby[bot]> LyndsySimon: # => undefined method `x' for main:Object (NoMethodError) ...check link for more (https://eval.in/894906)
cdg has joined #ruby
<LyndsySimon> ^ That doesn't work either.
<dminuoso> LyndsySimon: https://eval.in/894907
<LyndsySimon> There's a lookup table for methods, and another for variables in scope. Right?
<LyndsySimon> I have a glimmer of understanding, though.
<dminuoso> LyndsySimon: How advanced is your ruby knowledge?
<dminuoso> LyndsySimon: ruby maintains a table of local variables, but not exactly a "table of methods"
<LyndsySimon> LOL.
<dminuoso> (I just need to know whether I have to say yes or no)
<dminuoso> this shows the exact behavior.
<LyndsySimon> I think it's pretty advanced, honestly.
<dminuoso> methods *always* in absolutely all instances belong to either a class or a module.
lucz has joined #ruby
<dminuoso> (which themsevles have method tables)
<LyndsySimon> I haven't thought about it like that, but that makes sense.
<dminuoso> LyndsySimon: look at that eval.in though. it shows exactly how this works.
Technodrome has joined #ruby
<LyndsySimon> Yeah, I'm digesting it.
Devalo has quit [Ping timeout: 250 seconds]
<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.
<LyndsySimon> My problem is that I need to assign the Integer - the callable - to a variable, then call it on another object later.
<dminuoso> LyndsySimon: Exactly.
<dminuoso> LyndsySimon: If you want to invoke a callable object. you use .() instead.
<dminuoso> >> a = -> { puts "hi" }; a.()
<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?
<ruby[bot]> dminuoso: # => hi ...check link for more (https://eval.in/894914)
<LyndsySimon> Ahhhh. That makes sense.
uZiel has quit [Ping timeout: 268 seconds]
<dminuoso> Or, since .() is just syntax sugar, you can use .call() explicitly
<dminuoso> .() is basically just short-form of .call()
[Butch] has joined #ruby
* LyndsySimon laughs
<LyndsySimon> >> x = Integer; x.('1')
<ruby[bot]> LyndsySimon: # => undefined method `call' for Integer:Class ...check link for more (https://eval.in/894915)
<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
<dminuoso> | actual object.
<dminuoso> LyndsySimon: Now comes the trick.
<apeiros> >> x = method(:Integer); x.call('1')
<ruby[bot]> apeiros: # => 1 (https://eval.in/894917)
<dminuoso> LyndsySimon: Remember how there are method tables *and local variable tables* ?
<dminuoso> LyndsySimon: Integer is defined twice!
<LyndsySimon> Yep. Yay, that makes sense.
<dminuoso> LyndsySimon: Once as a method, and once as an object.
<dminuoso> Integer() is something completely different than Integer.
<apeiros> >> [defined?(Integer), defined?(Integer())]
<ruby[bot]> apeiros: # => ["constant", "method"] (https://eval.in/894918)
<dminuoso> Integer shadows Integer(), but by adding () you tell ruby "dont look for an object Integer, look for a method instead"
<apeiros> actually, with constants versus methods, there's no shadowing
darkmorph has quit [Ping timeout: 264 seconds]
<apeiros> ruby requires unambiguous syntax with capitalized methods
<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?
<apeiros> that is: either pass an argument, or write parens explicitly
<apeiros> but `Foo` will never invoke a method `Foo()`
<LyndsySimon> apeiros: Thank you, that part was missing for me
<dminuoso> ast>> Integer 1
<ruby[bot]> dminuoso: I have parsed your code, the result is at https://eval.in/894919
<dminuoso> ast>> Integer(1)
<ruby[bot]> dminuoso: I have parsed your code, the result is at https://eval.in/894920
cdg_ has joined #ruby
milardovich has joined #ruby
synthroid has quit [Remote host closed the connection]
michael1 has joined #ruby
cdg has quit [Ping timeout: 240 seconds]
<apeiros> interesting that it parses differently
<dminuoso> asm>> Integer(1)
<ruby[bot]> dminuoso: I have disassembled your code, the result is at https://eval.in/894921
cdg_ has quit [Ping timeout: 240 seconds]
<dminuoso> asm>> Integer 1
<ruby[bot]> dminuoso: I have disassembled your code, the result is at https://eval.in/894922
<apeiros> ok, at least it generates the same code. so I guess the ast just differs so you could reconstruct the parens
Devalo has joined #ruby
chouhoulis has joined #ruby
dinoangelov has quit [Quit: (null)]
<dminuoso> apeiros: I remember digging through this in the compiler.
<LyndsySimon> The DSL stuff I'm working on where I needed that piece of functionality is now working - thanks dminuoso and apeiros
<dminuoso> I couldn't figure out why there was a distinction between commands and method calls.
<apeiros> dminuoso: and yeah, chili con carne senza carne is ridiculous :)
michael3 has quit [Ping timeout: 248 seconds]
milardovich has quit [Ping timeout: 250 seconds]
<dminuoso> LyndsySimon: Functionality! Functions!
<dminuoso> I can help you with that!
* dminuoso knows functions
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso> apeiros: Yeah :)
dinoangelov has joined #ruby
milardovich has joined #ruby
Ayey_ has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
bmurt has joined #ruby
<apeiros> dminuoso: huh? distinction between commands and method calls?
<apeiros> btw., the requirement for unambiguous syntax re capitalized methods is almost certainly so const_missing and method_missing don't conflict
synthroid has joined #ruby
<dminuoso> apeiros: well it was weird quirks in the parser.
<dminuoso> but honestly the entirety of parse.y (the lexer. THAT LEXER) is weird.
<apeiros> I have heard that before :D
Ayey_ has quit [Ping timeout: 248 seconds]
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
ur5us has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
Devalo has quit [Ping timeout: 260 seconds]
lucz has quit [Remote host closed the connection]
lucz has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
Technodrome has joined #ruby
truenito has quit [Remote host closed the connection]
ramfjord has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
petrichorx_ has quit [Quit: Connection closed for inactivity]
xco has quit [Quit: xco]
ramfjord has quit [Ping timeout: 250 seconds]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
hgost has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xco has quit [Ping timeout: 260 seconds]
ramfjord has joined #ruby
someguy has joined #ruby
cagomez has quit []
dhollin is now known as dhollinger
ule has joined #ruby
ozcanesen has joined #ruby
imode has joined #ruby
dinoangelov has quit [Quit: (null)]
rfoust has quit [Quit: Textual IRC Client: www.textualapp.com]
ldnunes has quit [Quit: Leaving]
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ayey_ has joined #ruby
jrafanie has joined #ruby
lucz has quit [Remote host closed the connection]
lucz has joined #ruby
fizzycola has left #ruby [#ruby]
banisterfiend has joined #ruby
ramfjord has quit [Ping timeout: 250 seconds]
milardov_ has joined #ruby
Ayey_ has quit [Ping timeout: 248 seconds]
FrostCandy has joined #ruby
RickHull has quit [Ping timeout: 260 seconds]
lucz has quit [Ping timeout: 246 seconds]
ramfjord has joined #ruby
John___ has joined #ruby
milardovich has quit [Ping timeout: 260 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
RickHull has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
Technodrome has joined #ruby
troys_ is now known as troys
elcontrastador has joined #ruby
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
ramfjord has joined #ruby
orbyt_ has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
yabbes has joined #ruby
ramfjord has joined #ruby
Rapture has joined #ruby
darkmorph has joined #ruby
hgost has quit [Quit: Textual IRC Client: www.textualapp.com]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Technodrome has joined #ruby
mson has joined #ruby
InfinityFye has joined #ruby
ivanskie has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
Ney has joined #ruby
dionysus69 has quit [Ping timeout: 246 seconds]
alfiemax has joined #ruby
Toggi3 has quit [Ping timeout: 248 seconds]
minimalism has joined #ruby
alfiemax_ has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
michael1 has quit [Ping timeout: 268 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
milardov_ has quit []
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
Toggi3 has joined #ruby
<ivanskie> hi. anyone here working on/with mruby stuff?
Ayey_ has joined #ruby
jenrzzz has joined #ruby
<RickHull> only looked at it, myself. but there is #mruby
<ivanskie> ooh
<ivanskie> excellent
<ivanskie> thanks
Ney has quit [Read error: Connection reset by peer]
Ney has joined #ruby
Ayey_ has quit [Ping timeout: 260 seconds]
cdg has joined #ruby
tvw has joined #ruby
John___ has quit [Read error: Connection reset by peer]
eclm has joined #ruby
alan_w has quit [Ping timeout: 250 seconds]
cdg_ has joined #ruby
biberu has quit []
mjolnird has quit [Quit: Leaving]
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
cdg has quit [Ping timeout: 240 seconds]
eckhardt has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
John___ has joined #ruby
jarnalyrkar has quit [Read error: Connection reset by peer]
alex`` has quit [Ping timeout: 250 seconds]
SeepingN has joined #ruby
ramfjord has joined #ruby
rhyselsmore has joined #ruby
PaulCape_ has quit [Ping timeout: 260 seconds]
greengriminal has joined #ruby
vee__ has quit [Ping timeout: 250 seconds]
<greengriminal> Hey all, is it possible to override a method and call its original method i.e https://gist.github.com/davidpatters0n/2ab898de0deb4a1f18ed817947bcd80a
<greengriminal> I know I could use inheritance.
Psybur has quit [Ping timeout: 248 seconds]
cluelessperson_ has joined #ruby
<dminuoso> greengriminal: The trick is to use a module, prepend, then you can use super
<greengriminal> ohhh saucy
<dminuoso> (Or you could use two alias_method, but prepending a module is cleaner)
<dminuoso> So you do use inheritance, but in a less intuitive way. :)
<cluelessperson_> hi, is it normal I've to use sudo permission to install a gem on macos?
<dminuoso> cluelessperson_: That depends. Are you using the macOS supplied ruby?
<SeepingN> consider not doing that ;)
<Nilium> You should probably just install gems local to your user
reber has quit [Quit: Leaving]
<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"
<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.
<dminuoso> cluelessperson_: Please consider either installing a newer version using ruby-install or chruby.
<Nilium> Mmm, no, I think Ruby on OS X these days is 2.3 or 2.4
<Nilium> Oh, 2.3, per that path
<cluelessperson_> oh I see
<dminuoso> Nilium: nope
<Nilium> 2.4 would be moving a bit fast for Apple.
<dminuoso> ActionController::InvalidCrossOriginRequest
<dminuoso> ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
<dminuoso> 2.0 is still on the most recent version of macOS.
<Nilium> cluelessperson_: Uh, no, cluelessperson_ has 2.3
<dminuoso> cluelessperson_: and I meant *ruby-install or brew
<Nilium> dminuoso: If you do `which ruby` what do you get?
<cluelessperson_> dminuoso: I use brew I think I'm going to install ruby with that
<dminuoso> Nilium: its the system ruby.
<Nilium> And you're on 10.13?
<dminuoso> cluelessperson_: either is fine
<Nilium> You've somehow avoided getting Ruby upgraded, I guess.
<dminuoso> Nilium: Ah. 10.12
<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.
<dminuoso> But good to know, Nilium.
<dminuoso> Was about time
<dminuoso> Wonder whether they finally upgraded vim too.
<Nilium> Yeah. You should still probably use either brew or chruby or rbenv
<dminuoso> And git.
<Nilium> They keep git pretty up to date through the CLI tools package.
<Nilium> Vim: probably not.
<dminuoso> Nilium: In 10.12 its old enough to reliably seg fault it a few times a day.
<Nilium> And it's usually best to just install macvim anyway
<SeepingN> is rvm no longer cool?
<Nilium> Also install git through homebrew
<Nilium> SeepingN: If it still works for you, it's fine. I've never used it.
<dminuoso> SeepingN: RVM is kind of annoying in many ways.
vee__ has joined #ruby
<dminuoso> SeepingN: chruby is the popular choice nowadays (its simple and bug free), or rbenv if you prefer that.
Bish has quit [Disconnected by services]
<cluelessperson_> dminuoso: what are the difference between brew ruby, chruby and rbenv?
<havenwood> cluelessperson_: brew is a package manager for OS X
<havenwood> cluelessperson_: ruby is a language
fishcooker has joined #ruby
<cluelessperson_> havenwood: yes but what are the differences during the install process i meant
<havenwood> cluelessperson_: RVM, chruby/ruby-install and rbenv/ruby-build install and switch Rubies
<dminuoso> cluelessperson_: chruby is a version manager. ruby-install is the bit that installs ruby things.
<miah> i think your more limited on ruby version choices when using brew
<greengriminal> dminuoso, - So trying your prepend suggestion but I seem to be doing something wrong here: https://gist.github.com/davidpatters0n/609e6b4af3f58f5658caf640c2b44fd6
Ayey_ has joined #ruby
<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
<miah> if you only need a single version of ruby, brew is probably fine
<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.
<dminuoso> greengriminal: You got things swapped around.
<dminuoso> greengriminal: When you prepend, method dispatch will consider prepended modules *before* the class.
<miah> and fwiw, you can brew install chruby and brew install ruby-install
<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.
<dminuoso> greengriminal: So in a weird way it acts as if Float is an ancestor of SpecialFloat (in a super hacky way)
<havenwood> brew install chruby ruby-install
<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'
vee__ has quit [Ping timeout: 250 seconds]
<cluelessperson_> havenwood, miah: perfect explications now I get it, thanks for the clarification guys!
xco has joined #ruby
alfiemax_ has quit [Remote host closed the connection]
alfiemax has joined #ruby
ap4y has joined #ruby
enterprisey has joined #ruby
<greengriminal> dminuoso, I ended up using the `alias`
blackwind_123 has joined #ruby
Ayey_ has quit [Ping timeout: 258 seconds]
Toggi3 has quit [Ping timeout: 260 seconds]
<dminuoso> greengriminal: I recommend you use the prepend method, Let me show you
<miah> cluelessperson_: you're welcome =)
<greengriminal> oh interesting
<greengriminal> I see
<dminuoso> greengriminal: That being said: Do not use float for currency.
Devalo has joined #ruby
FrostCandy has quit []
alfiemax has quit [Ping timeout: 248 seconds]
darkmorph has quit [Ping timeout: 258 seconds]
<greengriminal> Thanks : )
michael1 has joined #ruby
PaulCapestany has joined #ruby
Devalo has quit [Ping timeout: 250 seconds]
xco has quit [Quit: xco]
someguy has quit [Quit: Page closed]
mtkd has quit [Read error: Connection reset by peer]
mtkd has joined #ruby
<RickHull> do integer math with e.g. pennies or use rationals like pennies / 100r
vee__ has joined #ruby
<RickHull> >> dollars = 99 / 100r
<ruby[bot]> RickHull: # => (99/100) (https://eval.in/894966)
michael1 has quit [Ping timeout: 248 seconds]
<apeiros> or use bigdecimal
<apeiros> or use the money gem
<dminuoso> apeiros: In all fairness, I personally believe this is blown out of proportion.
Ayey_ has joined #ruby
<dminuoso> If double precision is good enough for almost the entirety of physics, simulations, then its good enough for money.
<apeiros> you're mistaken
michael1 has joined #ruby
<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.
<apeiros> again, you're mistaken
<RickHull> how can we show that?
<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.
blackwind_123 has quit [Ping timeout: 250 seconds]
<dminuoso> apeiros: Care to elaborate further?
<dminuoso> Perhaps with a concrete example?
<apeiros> google will produce better examples than what I can come up with from the top of my head
blackwind_123 has joined #ruby
Ayey_ has quit [Ping timeout: 268 seconds]
<RickHull> i think what tends to happen is multiple layers in a federated app will do various truncations and rounding at different steps
<RickHull> and things don't reconcile at the end when they're supposed to
<RickHull> and it costs a million bucks to trace the error
<RickHull> only sorta kidding on the last point
<RickHull> integer bucks, mind you
alnewkirk has quit [Ping timeout: 268 seconds]
greengriminal has quit [Quit: Leaving]
yabbes has quit [Quit: lu]
David_H_Smith has quit [Remote host closed the connection]
jarnalyrkar has joined #ruby
<elomatreb> If you really want to be serious use Complex for your monetary values, obviously
cluelessperson_ has quit [Quit: Page closed]
michael1 has quit [Ping timeout: 250 seconds]
<elomatreb> That's $5+0i, please
GodFather has quit [Ping timeout: 252 seconds]
imode has quit [Ping timeout: 264 seconds]
RickHull has quit [Ping timeout: 260 seconds]
<apeiros> elomatreb: for your imaginary amounts of money? :)
<elomatreb> You never know
xco has joined #ruby
<apeiros> 0+1e9i
<apeiros> I'm an imaginary billionaire :D
marxarelli is now known as marxarelli|afk
GodFather has joined #ruby
jordanm has quit [Remote host closed the connection]
karapetyan has joined #ruby
darkmorph has joined #ruby
jordanm has joined #ruby
<dminuoso> Or a very complex billionaire.
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<baweaver> dminuoso: Be rational
<dminuoso> baweaver: Pff. I have transcended from such verbal attacks.
InfinityFye has quit [Quit: Leaving]
<dminuoso> This is so surreal. :|
RickHull has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
alan_w has joined #ruby
KeyJoo has quit [Ping timeout: 240 seconds]
eclm has quit [Ping timeout: 240 seconds]
Toggi3 has joined #ruby
Technodrome has joined #ruby
jarnalyrkar has quit [Quit: Leaving]
ogres has joined #ruby
[Butch] has quit [Quit: Textual IRC Client: www.textualapp.com]
hahuang65 has quit [Ping timeout: 260 seconds]
mim1k has joined #ruby
darkmorph has quit [Ping timeout: 264 seconds]
waveprop has joined #ruby
waveprop is now known as Guest7694
tcopeland has quit [Quit: tcopeland]
<havenwood> Ruby solutions needed: https://code-golf.io
troys is now known as troys_
<Guest7694> if i store a method name and parametrs as a string, can i execute the contents of that stringas the method
synthroid has quit []
<dminuoso> &ri Object#public_send Guest7694
<Guest7694> thx derpy
Ayey_ has joined #ruby
<jokke> hi
<jokke> what would you recommend as fast non-cryptographic hashing algorithm in ruby?
vee__ has quit [Ping timeout: 260 seconds]
shinnya has joined #ruby
<elomatreb> Well, what do you want to do? Usually there's no good reason not to use the standard "cryptographic" functions
Ayey_ has quit [Ping timeout: 250 seconds]
<jokke> i want to maintain a cache
<jokke> see if files have changed
jphase_ has quit [Remote host closed the connection]
<elomatreb> Git uses SHA1 for exactly that, and it's not a performance problem
<jokke> for me it is, even with md5
<elomatreb> Are you sure the performance critical part is actually the hashing, or the waiting on the disk IO?
<jokke> good point
<jokke> i will have to check that
<jokke> ah
<jokke> no it's something completely different ;)
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Guest7694> what am i doing incorrectly to set the instance variable @routes['testing'] from config.ru? http://termbin.com/t01v
<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
<dminuoso> Guest7694: Please use gist at github for future pastes. Syntax highlighting improves readability a lot.
thinkpad has joined #ruby
hopsoft has joined #ruby
alan_w has quit [Ping timeout: 260 seconds]
<havenwood> >> @routes = Hash.new { |h, k| h[k] = {} }; @routes[:verb][:path] = :handler; @routes # Guest7694
<ruby[bot]> havenwood: # => {:verb=>{:path=>:handler}} (https://eval.in/894973)
Guest7694 has quit [Changing host]
Guest7694 has joined #ruby
ap4y has quit [Quit: WeeChat 1.9.1]
Guest7694 is now known as waveprop
ap4y has joined #ruby
<havenwood> It'd be nice to use #require_relative here and rop the `./`: https://gist.github.com/anonymous/8fb382108df63e2602ff662668e97fc7#file-somefile-rb-L3
arescorpio has joined #ruby
vee__ has joined #ruby
<waveprop> havenwood: okay i'll use that. and yes i think i can drop the ||
jphase has joined #ruby
<havenwood> waveprop: It's nice to set the content type in your headers hash: {'Content-Type' => 'text/plain'}
k3rn31 has quit [Ping timeout: 268 seconds]
jphase has quit [Ping timeout: 258 seconds]
<waveprop> havenwood: i will. this is just a stripped down subset of my code for debugging purposes
agent_white has quit [Quit: bbl]
jphase has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
<waveprop> i don't understand why i cant call the method from within the nested blocks in config.ru. i have tried many ways
marxarelli|afk is now known as marxarelli
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<waveprop> i mean, the post method is the one i'm triyng to call as you can see
<waveprop> thanks for pointing out that incorrect ||=
jphase has quit [Ping timeout: 258 seconds]
David_H_Smith has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
<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
Psybur has joined #ruby
charliesome has joined #ruby
<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
<waveprop> if anyone can suggest something to read which might address my problem, please do
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
David_H_Smith has quit [Remote host closed the connection]
jphase has joined #ruby
David_H_Smith has joined #ruby
<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
gnufied has quit [Remote host closed the connection]
chouhoulis has quit [Ping timeout: 250 seconds]
charliesome has quit [Ping timeout: 260 seconds]
jphase has quit [Ping timeout: 250 seconds]
banisterfiend has joined #ruby
banisterfiend has quit [Client Quit]
ozcanesen has quit [Quit: ozcanesen]
hahuang65 has joined #ruby
<waveprop> maybe it's a problem that i'm mutating @routes
troys_ is now known as troys
<waveprop> but isnt that sort of the point of an instance variable
jphase has joined #ruby
jphase has quit [Read error: Connection reset by peer]
mson has quit [Quit: Connection closed for inactivity]
jphase has joined #ruby
aclark has quit [Remote host closed the connection]
aclark has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
jphase has quit [Ping timeout: 258 seconds]
Ayey_ has joined #ruby
lucz has joined #ruby
nofxx has quit [Remote host closed the connection]
<waveprop> /wc
<waveprop> /wc
waveprop has quit [Quit: leaving]
Ayey_ has quit [Ping timeout: 268 seconds]
John___ has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
xco_ has joined #ruby
xco has quit [Ping timeout: 260 seconds]
xco_ is now known as xco
nofxx has joined #ruby
David_H_Smith has quit [Remote host closed the connection]
cschneid_ has quit [Remote host closed the connection]
cschneid_ has joined #ruby
cschnei__ has joined #ruby
cschneid_ has quit [Ping timeout: 240 seconds]