havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.5.0, 2.4.3, 2.3.6, 2.6.0-preview1: https://www.ruby-lang.org || Paste 4+ lines of text to https://gist.github.com || Rails questions? Ask in #RubyOnRails || Books: https://goo.gl/wpGhoQ || Logs: https://irclog.whitequark.org/ruby
alfiemax has quit [Ping timeout: 256 seconds]
white_lilies has joined #ruby
n0m4d1c has quit [Remote host closed the connection]
phaul has quit [Ping timeout: 256 seconds]
darkhanb has joined #ruby
n0m4d1c has joined #ruby
robscomputer has joined #ruby
dr3w_ has joined #ruby
erlend has quit [Ping timeout: 240 seconds]
erlend has joined #ruby
tekk has quit [Quit: ZNC - http://znc.in]
John_Ivan has quit [Read error: Connection reset by peer]
noobineer has quit [Ping timeout: 240 seconds]
BTRE has quit [Read error: Connection reset by peer]
BTRE has joined #ruby
duckpuppy has joined #ruby
robscomputer has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duckpuppy has quit [Ping timeout: 246 seconds]
n0m4d1c has quit [Remote host closed the connection]
meadmoon has joined #ruby
meadmoon has quit [Client Quit]
bmurt has joined #ruby
robscomputer has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
noobineer has joined #ruby
unreal_ has quit [Ping timeout: 246 seconds]
mtkd has quit []
millerti has quit [Ping timeout: 246 seconds]
duderonomy has joined #ruby
wald0 has quit [Quit: Lost terminal]
clemens3 has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ruby
ElFerna has joined #ruby
ElFerna has quit [Client Quit]
ElFerna has joined #ruby
ElFerna has quit [Client Quit]
AJA4350 has quit [Quit: AJA4350]
jcarl43 has quit [Quit: WeeChat 2.0.1]
workmad3 has joined #ruby
unreal has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duckpuppy has joined #ruby
alfiemax has joined #ruby
Emmanuel_Chanel has joined #ruby
Emmanuel_Chanel has quit [Max SendQ exceeded]
workmad3 has quit [Ping timeout: 248 seconds]
Emmanuel_Chanel has joined #ruby
maedi_ has joined #ruby
maedi_ has quit [Client Quit]
maedi has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
duckpuppy has quit [Ping timeout: 240 seconds]
chatchatt has joined #ruby
white_lilies has quit [Ping timeout: 256 seconds]
chatchat1 has quit [Ping timeout: 240 seconds]
kapil___ has quit [Quit: Connection closed for inactivity]
banisterfiend has joined #ruby
alfiemax has joined #ruby
maedi_ has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
maedi has quit [Ping timeout: 260 seconds]
dstrunk has joined #ruby
robscomputer has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kapil___ has joined #ruby
alfiemax has joined #ruby
claw_ has quit [Ping timeout: 256 seconds]
claw has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
banisterfiend has quit [Ping timeout: 264 seconds]
duderonomy has joined #ruby
erlend has quit [Ping timeout: 240 seconds]
gizmore has joined #ruby
erlend has joined #ruby
gizmore|2 has quit [Ping timeout: 263 seconds]
twe4ked has quit [Read error: Connection reset by peer]
twe4ked has joined #ruby
garyserj has joined #ruby
<garyserj> Say I do [1,2,3].each { |x| puts x } I've heard that the block is everything within the { } even perhaps including the {}. But i've also heard that |x| is passed into the block (which suggests that |x| is not part of the block itself). Which is it?
robscomputer has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
<Radar> garyserj: it's a block argument. The .each method takes the block and executes the block for each item in the list. Each item is available as "x" inside the block because you do |x|
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
dstrunk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<garyserj> So is it correct to say that the stuff between the { } is not just the block. It's the parameter to the block, and the block?
milardovich has joined #ruby
<weaksauce> pretty much yeah but the entire thing is the block
<weaksauce> the block is an anonymous function that gets called on each execution of the each loop
milardovich has quit [Client Quit]
duckpuppy has joined #ruby
<weaksauce> def somefunc(arg1, arg2) is very similar to something.anotherfunc do |arg1, arg2| puts x end
<weaksauce> er puts arg1
<Radar> fun = lambda { |x| puts x }
<Radar> >> fun = lambda { |x| puts x }; fun.call(1)
<ruby[bot]> Radar: # => 1 ...check link for more (https://eval.in/974240)
<Radar> >> fun = lambda { |x| puts x }; fun.(1)
<ruby[bot]> Radar: # => 1 ...check link for more (https://eval.in/974241)
<Radar> >> fun = lambda { |x| puts x }; [1,2,3].each(&fun)
<ruby[bot]> Radar: # => 1 ...check link for more (https://eval.in/974242)
jenrzzz has quit [Ping timeout: 240 seconds]
<baweaver> A block is basically an anonymous function.
<baweaver> |x| is just supplying the argument to it.
<Radar> garyserj: Maybe those executable examples might help you understand it?
<baweaver> [1,2,3].map { |x| x * 2 } is the same as Javascript: [1,2,3].map(function (x) { return x * 2; })
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
dinfuehr_ has joined #ruby
duckpuppy has quit [Ping timeout: 260 seconds]
robscomputer has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<garyserj> so in ruby, the block includes the signature?
<garyserj> well not so much signature 'cos it's an anonymous function
dinfuehr has quit [Ping timeout: 264 seconds]
<garyserj> but the block includes the formal parameter.
jenrzzz has quit [Ping timeout: 260 seconds]
<garyserj> baweaver: yes I understand that about how it works i'm just asking a definition question.
<baweaver> An argument is part of an anonymous function, so yes
<baweaver> { ... } is the block
<baweaver> do ... end is the block
<garyserj> and in other languages like c# or javascript, the block does not include the formal parameter, right?
Xeago_ has joined #ruby
<garyserj> like c# says (int a)=>{a++;}
<garyserj> i think.
<baweaver> It does, it just has them outside
<baweaver> Ruby also has stabby lambdas: -> x { x * 2 }
<garyserj> baweaver: if it's outside the block it's not in the block
<garyserj> but yeah would do the same thign
<baweaver> If we're being incredibly pedantic
<baweaver> It's a part of the block
Xeago has quit [Ping timeout: 256 seconds]
Xeago_ is now known as Xeago
<garyserj> baweaver: in c# if you say void a(int t) {..} would you say that 'int t' is part of the block?
<baweaver> I'd say that that's not a block
<baweaver> at least not insofar as ruby parlence
<garyserj> ok
<garyserj> what about (a,b)=>{..}
<garyserj> rather.
<garyserj> (int a, int b)=>{..}
<baweaver> ruby parlance conflates the idea of blocks and anonymous functions
<garyserj> would you say that int a, and int b, are part of the block?
<baweaver> redefine block to be anonymous function and I would say yes
<baweaver> because you're associating some other definition to block
<garyserj> well, without redefining block
<garyserj> e.g. is block meant to be {... } ?
<baweaver> though I would still argue that this really doesn't achieve anything other than being hopelessly pedantic
jeffreylevesque has quit [Ping timeout: 240 seconds]
<garyserj> it's just a definition question
<garyserj> whether block is {...} or a formal parameter outside of it too
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
<baweaver> you have a definition though
<garyserj> no I have a blurry definition with a question mark.
<Radar> garyserj: The block is everything including the argument.
<Radar> The block without the argument is meaningless.
<Radar> And it won't... ahem... function.
<Radar> >> blk = lambda { "block with no args" }; blk.()
<ruby[bot]> Radar: # => "block with no args" (https://eval.in/974243)
* baweaver approves of the punnery
noobineer has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
<garyserj> blk = lambda {|d| "abc" } <-- is it possible to move the |d| outside the {..} ?
jenrzzz has joined #ruby
<baweaver> -> d { 'abc' }
<Radar> hax
<Radar> blk = -> d { d }; blk.(1)
<Radar> >> blk = -> d { d }; blk.(1)
<ruby[bot]> Radar: # => 1 (https://eval.in/974244)
<Radar> "stabby lambda" syntax
<garyserj> thanks.. and what's the reason for the dot?
<morfin> method call?
<weaksauce> it's a method call
<morfin> i guerss
<morfin> *guess
<baweaver> being able to do paren-free has its drawbacks
<garyserj> but this is a dot between the name of the method and the arguments to the method
<Radar> garyserj: yes. It's a Ruby shortcut. Means the same as blk.call(1)
<baweaver> >> add2 = -> x { x + 2 }; [add2.(2), add2.call(2), add2[2]]
<ruby[bot]> baweaver: # => [4, 4, 4] (https://eval.in/974245)
<morfin> oh crap
<Radar> Elixir has the same shortcut for their anonymous functions.
<baweaver> [] because you can define the [] method: def [](arg) ... end
<weaksauce> >> 5.+(2)
<ruby[bot]> weaksauce: # => 7 (https://eval.in/974246)
<baweaver> Slightly different with plus
<weaksauce> sure
jenrzzz has quit [Ping timeout: 264 seconds]
<morfin> when i do blk.call() will scope available in block be same?
maedi_ has quit [Remote host closed the connection]
<garyserj> why do i have to say blk.call(4) Why can't I say blk(4)?
maedi has joined #ruby
<Radar> garyserj: You can say blk.(4)
<Radar> blk(4) will make the interpreter look for a method called blk.
<morfin> seems like yes )
<garyserj> ok.. I get that blk.(4) = blk.call(4)
<garyserj> so lambda syntax doesn't define a method?
<baweaver> nope
<garyserj> ok so in ruby, functions and methods are different?
<garyserj> methods are on objects only i suppose
<Radar> methods are functions
<Radar> :mindblown:
<Radar> >> def a(b); puts b; end; method(:a).call(2)
<ruby[bot]> Radar: # => 2 ...check link for more (https://eval.in/974253)
<Radar> >> def a(b); puts b; end; method(:a).(2)
<ruby[bot]> Radar: # => 2 ...check link for more (https://eval.in/974254)
<Radar> The difference is that methods are defined on instances, but lambdas / procs are just ... out there, floating in the ether.
<Radar> Well, whatever scope they're defined in I guess.
<baweaver> I'm _really_ dang tempted to hack the lexer to allow proc(), proc(1), etc
orbyt_ has joined #ruby
<garyserj> thanks
<garyserj> what about Class.new is .new a method and is Class an instance?
jenrzzz has joined #ruby
<morfin> Class is an instance
<morfin> >> Class.ancestors
<ruby[bot]> morfin: # => [Class, Module, Object, Kernel, BasicObject] (https://eval.in/974261)
<garyserj> Since classes are objects in ruby, then would be meant by 'an instance'?
<garyserj> then would = then what would
jenrzzz has quit [Ping timeout: 264 seconds]
yokel has quit [Ping timeout: 240 seconds]
<Radar> Class is a instance of the Class class.
<Radar> I was thinking of running an instance of my classes to teach my juniors that Class is an instance of the Class class but... I think that's too classy for them.
<Radar> There will come an instance when they need to know this knowledge.
<Radar> but right now they're content with it being along the lines of the Dothraki: "It is known."
<garyserj> is sounds a bit recursive in the definition though
yokel has joined #ruby
maedi has quit [Read error: Connection reset by peer]
<Radar> Yes. See also: the beginning of this line.
<garyserj> doesn't that make the definition flawed? there's no base case
<garyserj> the recursion is infinite
maedi has joined #ruby
<garyserj> a circular definition
* Radar feels like garyserj is trying to make a point
* Radar squints really hard
maedi has quit [Client Quit]
<baweaver> class is a keyword
<baweaver> Class is an instance of class which is an Object
<baweaver> though I agree there's a point trying to be made here, though I still stand by this getting to be incredibly pedantic over definitions
<garyserj> baweaver: you wrote "Class is an instance of class " Do you mean Class is an instance of Class? ;-)
<garyserj> the keyword was class
robscomputer has joined #ruby
<baweaver> In any case I'm done.
jenrzzz has joined #ruby
alfiemax has quit [Remote host closed the connection]
<Radar> garyserj: So what's the point for all these questions?
d^sh has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
<garyserj> Radar: just to improve my understanding, and it's improving. thanks
<Radar> Great :)
harry__ has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
d^sh has joined #ruby
KeyJoo has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
duckpuppy has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
Dimik has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
duckpuppy has quit [Ping timeout: 248 seconds]
p4tch3s has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
dr3w_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drab_20 has joined #ruby
drab_20 has quit [Client Quit]
Yzguy has quit [Quit: Zzz...]
ta_ has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
Dimik has quit [Ping timeout: 263 seconds]
trautwein has quit [Quit: ZNC 1.6.5 - http://znc.in]
trautwein has joined #ruby
alfiemax has joined #ruby
jcarl43 has joined #ruby
_whitelogger has joined #ruby
Antiarc has quit [Disconnected by services]
gix- has joined #ruby
gix has quit [Disconnected by services]
erlend has quit [Ping timeout: 256 seconds]
claw has quit [Ping timeout: 246 seconds]
Antiarc_ has joined #ruby
erlend has joined #ruby
duckpuppy has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
duckpuppy has quit [Ping timeout: 240 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claw has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
claw has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
claw has joined #ruby
robscomputer has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Burgestrand has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
za1b1tsu has joined #ruby
duderonomy has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
Yzguy has joined #ruby
robscomputer has joined #ruby
howdoi has joined #ruby
Azure|dc has quit [Read error: Connection reset by peer]
Azure has joined #ruby
coderphive has quit [Quit: coderphive]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
sidx64 has joined #ruby
duckpuppy has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
workmad3 has joined #ruby
reber has joined #ruby
duckpuppy has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
duderonomy has joined #ruby
stoffus has joined #ruby
anisha has joined #ruby
toks has joined #ruby
aupadhye has joined #ruby
robscomputer has quit [Quit: Textual IRC Client: www.textualapp.com]
jenrzzz has quit [Ping timeout: 240 seconds]
jamesaxl has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
aupadhye has quit [Quit: Leaving]
toks has quit [Quit: Leaving]
za1b1tsu has quit [Quit: Leaving]
mrx has joined #ruby
rwb has quit [Remote host closed the connection]
<dminuoso> >> -> f { -> y { y[y] }[->x { f[-> v { x[x][v] }] }] }[-> f, x { x == Math.cos(x) ? x : f[Math.cos(x)]}.curry][3]
<ruby[bot]> dminuoso: # => 0.7390851332151607 (https://eval.in/974305)
mrx has quit [Quit: mrx]
<dminuoso> Bah.
<dminuoso> The error does not imply infinite recursion. It just means you've run out of stack space (Which could happen in legitimate non-infinite-recursion as well)
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sidx64_ has joined #ruby
rwb has joined #ruby
sidx64 has quit [Read error: Connection reset by peer]
oleo has quit [Quit: Leaving]
sidx64 has joined #ruby
sidx64_ has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
ta_ has quit [Remote host closed the connection]
duckpuppy has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
erlend has quit [Ping timeout: 240 seconds]
alex`` has joined #ruby
erlend has joined #ruby
duckpuppy has quit [Ping timeout: 264 seconds]
shpoont has joined #ruby
karapetyan has joined #ruby
jcarl43 has quit [Quit: WeeChat 2.0.1]
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
za1b1tsu has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
apeiros has quit [Ping timeout: 248 seconds]
sidx64 has joined #ruby
minimalism has quit [Quit: minimalism]
sidx64 has quit [Ping timeout: 248 seconds]
sidx64 has joined #ruby
pwntrik has joined #ruby
<pwntrik> hey i'm trying to create modules (mixins?) that implement a class: https://paste.ofcode.org/34wkPJu3QV7Db7eQFAVATkG
sidx64 has quit [Client Quit]
n008f4g_ has joined #ruby
sidx64 has joined #ruby
sidx64 has quit [Client Quit]
sidx64 has joined #ruby
Yzguy has quit [Quit: Zzz...]
shpoont has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sidx64 has quit [Client Quit]
sidx64 has joined #ruby
<Mon_Ouie> pwntrik: I'm not sure how Rails autoloading works (see #rails), but maybe using ::TumbleTinder (to explicit the fact this is a top-level constant) would work?
<Mon_Ouie> Also if you want to call your method as Tumble::somefunc (or Tumble.somefunc) as opposed to Tumble.new.somefunc, you would have to use extend instead of include
<dminuoso> pwntrik: config/initializers is not an autoloaded directory. You have to restart the rails server to pick that class up (and probably spring as well)
ChaosBringer has quit [Quit: Leaving]
<dminuoso> pwntrik: Err, even lib/ is not autoloaded. :-)
conta has joined #ruby
<dminuoso> pwntrik: Or it might be, but the error if self explanatory. If you nest this inside Tumble::, then the defining file has to be inside a tumble/ directory.
<pwntrik> i shouldn't have posted that error :( It's actually loading the file just fine. the problem is more about how do I factor my code so that "bar" is outputed
toks has joined #ruby
<pwntrik> What I want is to reference Tumble throughout the application, but I can create modules for Tumble that would replace functions. Like in the example above, by default Tumble::somefunc would output "foo" but I could load the module TumbleTinder and it would output "bar" instead.
toks has quit [Client Quit]
<pwntrik> What I want is to reference Tumble throughout the application, but I can create modules for Tumble that would replace functions. Like in the example above, by default Tumble::somefunc would output "foo" but I could load the module TumbleTinder and it would output "bar" instead.
<pwntrik> oops sorry
<pwntrik> Now that I have the class and the module, how do I load the module so that calling Tumble::somefunc outputs "bar"? What code do I put in config/intializers or how do I do it?
aufi has joined #ruby
schneider has joined #ruby
psychicist__ has quit [Ping timeout: 240 seconds]
n008f4g_ has quit [Ping timeout: 256 seconds]
andikr has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
workmad3 has joined #ruby
duckpuppy has joined #ruby
<Mon_Ouie> included Modules are like parent classes, they appear above the class they are included in in the ancestry chain, which mains methods are looked up in the class itself first
<Mon_Ouie> You can use Module#prepend to make the module appear before the class
alfiemax has quit [Remote host closed the connection]
goatish has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
alex`` has quit [Quit: WeeChat 2.0.1]
duckpuppy has quit [Ping timeout: 264 seconds]
alex`` has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
za1b1tsu has quit [Quit: Leaving]
jamesaxl has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
rabajaj has joined #ruby
jenrzzz has joined #ruby
ryan_ford has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has joined #ruby
rabajaj has quit [Remote host closed the connection]
rabajaj has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
rabajaj has quit [Remote host closed the connection]
ta_ has joined #ruby
schneider has quit [Ping timeout: 276 seconds]
duderonomy has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
willmichael has joined #ruby
willmichael has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 256 seconds]
ferr1 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
venmx has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
dinfuehr_ is now known as dinfuehr
schneider has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sidx64 has joined #ruby
sidx64 has quit [Client Quit]
schneider has quit [Ping timeout: 256 seconds]
pwntrik has quit []
sidx64 has joined #ruby
sidx64 has quit [Client Quit]
claudiuinberlin has joined #ruby
schneider has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
aupadhye has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
mtkd has joined #ruby
riotjones has joined #ruby
mikecmpbll has joined #ruby
unreal has quit [Ping timeout: 240 seconds]
duckpuppy has joined #ruby
psychicist__ has joined #ruby
karapetyan has quit [Remote host closed the connection]
jenrzzz has joined #ruby
shuforov has joined #ruby
duckpuppy has quit [Ping timeout: 264 seconds]
karapetyan has joined #ruby
vondruch has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
nowhereman_ has joined #ruby
jenrzzz has joined #ruby
erlend has quit [Ping timeout: 268 seconds]
erlend has joined #ruby
nowhere_man has quit [Ping timeout: 240 seconds]
guille-moe has joined #ruby
rabajaj has joined #ruby
nadir has joined #ruby
za1b1tsu has joined #ruby
marr has joined #ruby
clemens3 has joined #ruby
tomphp has joined #ruby
venmx has quit [Remote host closed the connection]
d^sh_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
modin has quit [Ping timeout: 245 seconds]
d^sh has quit [Ping timeout: 256 seconds]
aloy has quit [Remote host closed the connection]
phaul has joined #ruby
ss942 has joined #ruby
aloy has joined #ruby
Nightmare has quit [Ping timeout: 256 seconds]
modin has joined #ruby
WhereIsMySpoon has joined #ruby
WhereIsMySpoon has joined #ruby
WhereIsMySpoon has quit [Changing host]
kenichi has quit [Ping timeout: 252 seconds]
Nightmare has joined #ruby
DarthGandalf has quit [Quit: Bye]
DarthGandalf has joined #ruby
Junaos has quit [Ping timeout: 240 seconds]
kenichi has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
Junaos has joined #ruby
_whitelogger has quit [K-Lined]
_whitelogger has joined #ruby
sidx64 has joined #ruby
creat has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
jenrzzz has joined #ruby
duckpuppy has joined #ruby
<ss942> Ok ladies and gentelmens. I had never wrote single line nor in ruby nor rails. But now is my time. I were Python/Django dev back days. (ok it was just intern) Now I have to write rest API for an open source project - ERPmine (redmine plugin)
<ss942> Deadline was yesterday, and I'm wondering where the hell should I start with this? Any tips? Ruby in X minutes, Rails in X minutes, then Rails API, then reading ERPmine code and contributing to it?
<ss942> Right now it even have "some" API, but it makes only one feature from whole system usable from API. I have to contribute, and make more jsons that returns more data, and more actions possible.
<dminuoso> ?rails ss942
<ruby[bot]> ss942: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<dminuoso> ss942: Though if the deadline is yesterday, I recommend hiring a consultant.
workmad3 has joined #ruby
alfiemax has quit [Remote host closed the connection]
venmx has joined #ruby
duckpuppy has quit [Ping timeout: 256 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 240 seconds]
venmx has quit [Remote host closed the connection]
Serpent7776 has joined #ruby
tomphp has joined #ruby
venmx has joined #ruby
karapetyan has joined #ruby
alfiemax has joined #ruby
dr3w_ has joined #ruby
dr3w_ has quit [Client Quit]
workmad3 has joined #ruby
Quentinius has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
Quentinius has quit [Client Quit]
tomphp has quit [Client Quit]
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jamesaxl has joined #ruby
KeyJoo has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
Guest33581 has quit [Quit: Gateway shutdown]
rabajaj has quit [Ping timeout: 264 seconds]
james541 has joined #ruby
karapetyan has quit []
rabajaj has joined #ruby
Guest33581 has joined #ruby
tvw has joined #ruby
dr3w_ has joined #ruby
tcopeland has quit [Quit: tcopeland]
dr3w_ has quit [Client Quit]
mtkd has quit [Ping timeout: 256 seconds]
ferr1 has left #ruby ["WeeChat 2.0.1"]
duckpuppy has joined #ruby
chegypcio has joined #ruby
chegypcio has quit [Client Quit]
AJA4350 has joined #ruby
mtkd has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
duckpuppy has quit [Ping timeout: 240 seconds]
apparition has joined #ruby
rabajaj has quit [Remote host closed the connection]
rabajaj has joined #ruby
jenrzzz has joined #ruby
dr3w_ has joined #ruby
dr3w_ has quit [Client Quit]
rabajaj has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
rabajaj has joined #ruby
james541 has quit [Quit: This computer has gone to sleep]
KeyJoo has joined #ruby
erlend has quit [Ping timeout: 256 seconds]
erlend has joined #ruby
lvmbdv has left #ruby ["WeeChat 2.0.1"]
chatchat1 has joined #ruby
chatchatt has quit [Ping timeout: 256 seconds]
cschneid has quit [Read error: Connection reset by peer]
cschneid has joined #ruby
armando has quit [Quit: ZNC 1.7.x-nightly-20171128-66897057 - https://znc.in]
psychicist__ has quit [Ping timeout: 256 seconds]
armando has joined #ruby
Psybur has joined #ruby
Psybur has quit [Changing host]
Psybur has joined #ruby
shinnya has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ldnunes has joined #ruby
jenrzzz has joined #ruby
Cavallari has joined #ruby
_Joes_ has joined #ruby
apeiros has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
alfiemax_ has joined #ruby
ryan_ford has quit [Ping timeout: 246 seconds]
dionysus69 has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
rabajaj has quit [Ping timeout: 256 seconds]
BH23 has quit [Quit: Konversation terminated!]
dionysus69 has quit [Quit: dionysus69]
imode has quit [Ping timeout: 256 seconds]
dionysus69 has joined #ruby
rabajaj has joined #ruby
duckpuppy has joined #ruby
ldnunes has quit [Read error: Connection reset by peer]
ldnunes has joined #ruby
duckpuppy has quit [Ping timeout: 240 seconds]
tcopeland has joined #ruby
sameerynho has joined #ruby
antoine1 has joined #ruby
wxmisterjack has joined #ruby
wxmisterjack has quit [Client Quit]
antoine1 has quit [Client Quit]
synthroid has joined #ruby
goatish has quit [Quit: bye]
Papierkorb has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has quit [Client Quit]
tomphp has joined #ruby
tomphp has quit [Client Quit]
sidx64 has joined #ruby
rabajaj has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 260 seconds]
n13z_ is now known as n13z
jenrzzz has joined #ruby
ryan_ford has joined #ruby
Burgestrand has quit [Quit: Good bye and have a nice day!]
rwb has quit [Ping timeout: 260 seconds]
tomphp has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
luoliyan has joined #ruby
luoliyan has quit [Max SendQ exceeded]
luoliyan has joined #ruby
luoliyan has quit [Max SendQ exceeded]
bmurt has joined #ruby
coderphive has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
John_Ivan has joined #ruby
sidx64 has joined #ruby
synthroi_ has joined #ruby
arquebus has joined #ruby
synthroid has quit [Ping timeout: 264 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
coderphive has quit [Quit: coderphive]
arquebus has quit [Quit: Konversation terminated!]
yeticry has quit [Ping timeout: 260 seconds]
luoliyan has joined #ruby
za1b1tsu has quit [Quit: Leaving]
luoliyan has quit [Max SendQ exceeded]
yeticry has joined #ruby
luoliyan has joined #ruby
luoliyan has quit [Max SendQ exceeded]
znz_jp has quit [Ping timeout: 276 seconds]
za1b1tsu has joined #ruby
luoliyan has joined #ruby
luoliyan has quit [Max SendQ exceeded]
perzival has joined #ruby
Papierkorb has left #ruby ["Konversation terminated!"]
za1b1tsu has quit [Quit: Leaving]
Cavallari has quit [Quit: Cavallari]
luoliyan has joined #ruby
luoliyan has quit [Max SendQ exceeded]
luoliyan has joined #ruby
luoliyan has quit [Max SendQ exceeded]
<dminuoso> Okay.. I want react-style nested string interpolation. What are my options?
duckpuppy has joined #ruby
<dminuoso> Oh nevermind. I was too stupid to bracket right.
<dminuoso> >> "fo#{"fo#{1+1}o"}o"
<ruby[bot]> dminuoso: # => "fofo2oo" (https://eval.in/974521)
luoliyan has joined #ruby
luoliyan has quit [Max SendQ exceeded]
luoliyan has joined #ruby
luoliyan has quit [Max SendQ exceeded]
alfiemax_ has quit [Remote host closed the connection]
duckpuppy has quit [Ping timeout: 265 seconds]
am55 has joined #ruby
cdg has joined #ruby
jcalla has joined #ruby
luoliyan has joined #ruby
luoliyan has quit [Max SendQ exceeded]
gnufied has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
luoliyan has joined #ruby
luoliyan has left #ruby [#ruby]
nowhereman_ has quit [Ping timeout: 276 seconds]
leah2 has quit [Remote host closed the connection]
jcalla has quit [Ping timeout: 264 seconds]
am55 has quit [Quit: am55]
luoliyan has joined #ruby
sidx64 has joined #ruby
luoliyan has left #ruby [#ruby]
sidx64 has quit [Client Quit]
howdoi has quit [Quit: Connection closed for inactivity]
leah2 has joined #ruby
tcopeland has quit [Quit: tcopeland]
sidx64 has joined #ruby
ledestin has joined #ruby
duckpuppy has joined #ruby
jshjsh has joined #ruby
tcopeland has joined #ruby
erlend has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
JoshS has quit [Ping timeout: 256 seconds]
erlend has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jcalla has joined #ruby
duckpuppy has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
ineb has joined #ruby
ghormoon has quit [Ping timeout: 252 seconds]
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ghormoon has joined #ruby
DLSteve has joined #ruby
sidx64 has joined #ruby
ghormoon has quit [Excess Flood]
sidx64 has quit [Client Quit]
ghormoon has joined #ruby
ghormoon has quit [Ping timeout: 260 seconds]
nowhereman_ has joined #ruby
jrafanie has joined #ruby
sidx64 has joined #ruby
venmx has quit [Quit: leaving]
am55 has joined #ruby
venmx has joined #ruby
coderphive has joined #ruby
AgentVenom has joined #ruby
duckpuppy has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
rsh has joined #ruby
tomphp has joined #ruby
ghormoon has joined #ruby
cdg has quit [Ping timeout: 240 seconds]
duckpuppy has quit [Ping timeout: 264 seconds]
KeyJoo has quit [Ping timeout: 256 seconds]
yeticry has quit [Remote host closed the connection]
yeticry has joined #ruby
tomphp has quit [Client Quit]
jenrzzz has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
ta_ has quit [Remote host closed the connection]
tomphp has joined #ruby
shinnya has quit [Ping timeout: 260 seconds]
ozaki has joined #ruby
roshanavand has quit [Ping timeout: 246 seconds]
psychicist__ has joined #ruby
synthroi_ has quit [Remote host closed the connection]
Rapture has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tens0r has joined #ruby
Dimik has joined #ruby
tcopeland has quit [Quit: tcopeland]
ghormoon has quit [Ping timeout: 246 seconds]
tomphp has joined #ruby
tomphp has quit [Client Quit]
tcopeland has joined #ruby
ghormoon has joined #ruby
ozaki has quit [Quit: Leaving]
tomphp has joined #ruby
chouhoulis has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
howdoi has joined #ruby
bmurt has joined #ruby
bmurt has quit [Client Quit]
kn-928 has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
SteenJobs has joined #ruby
troulouliou_div2 has joined #ruby
synthroid has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
SteenJobs has quit [Client Quit]
SteenJobs has joined #ruby
tens0r has quit [Quit: tens0r]
samort7 has joined #ruby
cschneid has quit [Remote host closed the connection]
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
netherwolfe has joined #ruby
Dimik has quit [Ping timeout: 264 seconds]
rabajaj has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
stoffus has quit [Ping timeout: 240 seconds]
duckpuppy has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apparition has quit [Quit: Bye]
mtkd has quit [Ping timeout: 260 seconds]
mtkd has joined #ruby
duckpuppy has quit [Ping timeout: 240 seconds]
apeiros has quit [Ping timeout: 248 seconds]
cschneid has joined #ruby
tomphp has joined #ruby
drale2k_ has joined #ruby
<drale2k_> i want to launch a go app from rails. Should i use exec() / system() or fork() ?
rippa has joined #ruby
<_insomniac> dralek2k_: depends... exec() replaces current process, probably not what you want; system() executes the app and wait for it to finish; fork doesn't help here (except I guess for fork+exec combo)
<drale2k_> by "replaces current process" would that mean if i launch this from my rails app, rails would crash ?
<_insomniac> don't know what your use case is but you probably want system() (sync) or Process.spawn() (async)
<drale2k_> i just want to lanuch the app and from there on the app is on its own
synthroi_ has joined #ruby
<_insomniac> then I would just use Process.spawn
<dminuoso> drale2k_: what do you want to do with the `go app` ?
yokel has quit [Ping timeout: 240 seconds]
<dminuoso> drale2k_: And when is it started?
<drale2k_> the go app will provide a html site which i will iframe into my rails app
<drale2k_> and it should start immediately
samort7 has quit [Ping timeout: 268 seconds]
<drale2k_> to be precise, this should be started by Rails https://github.com/yudai/gotty
samort7 has joined #ruby
yokel has joined #ruby
synthroid has quit [Ping timeout: 268 seconds]
synthroid has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
synthroi_ has quit [Ping timeout: 264 seconds]
grogerdus has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
<canton7> drale2k_, bear in mind you'll have to make sure that process terminates if someone just closes the web page
<drale2k_> canton7: ye i am still thinking about what the best way is. Probably a browser event
lytol has joined #ruby
cdg has joined #ruby
minimalism has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
coderphive has quit [Quit: coderphive]
oleo has joined #ruby
fiachetti has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
ghoti_ is now known as ghoti
erlend has quit [Ping timeout: 240 seconds]
cdg_ has joined #ruby
erlend has joined #ruby
apeiros has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Bish has quit [Remote host closed the connection]
cdg has quit [Ping timeout: 240 seconds]
apeiros has quit [Ping timeout: 256 seconds]
hinbody has quit [Read error: Connection reset by peer]
karapetyan has quit []
apeiros has joined #ruby
dionysus69 has quit [Remote host closed the connection]
crankharder has joined #ruby
alfiemax has joined #ruby
dionysus69 has joined #ruby
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
schneider has quit [Ping timeout: 245 seconds]
jcarl43 has joined #ruby
duckpuppy has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
SteenJobs has quit [Quit: SteenJobs]
cagomez has joined #ruby
ski7777 has quit [Read error: Connection reset by peer]
ski7777 has joined #ruby
ss942 has quit [Quit: Leaving.]
[Butch] has joined #ruby
duckpuppy has quit [Ping timeout: 256 seconds]
roca has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
InfinityFye has joined #ruby
SteenJobs has joined #ruby
desperek has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
shuforov has quit [Ping timeout: 256 seconds]
alfiemax has quit [Read error: Connection reset by peer]
alfiemax has joined #ruby
InfinityFye has quit [Quit: Leaving]
tomphp has joined #ruby
marxarelli has joined #ruby
duderonomy has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
tomphp has quit [Client Quit]
coderphive has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
hinbody has joined #ruby
breakfast1 has joined #ruby
breakfast1 has quit [Client Quit]
za1b1tsu has joined #ruby
synthroi_ has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rwb has joined #ruby
synthroid has quit [Ping timeout: 276 seconds]
conceivably has joined #ruby
<conceivably> Good morning. Why in the world does 'zip' with a block return nil? Of course it's easy to circumvent, but I'm trying to understand why it wouldn't return an enum or something. It seems to render that version mostly useless.
pastorinni has joined #ruby
<havenwood> conceivably: It does seem like something that'd be nice to improve in Ruby 3 with a breaking change.
<havenwood> I don't like it returning `nil` either.
darkhanb has joined #ruby
<dminuoso> conceivably: Have you tried hask.. oh hey havenwood!
<havenwood> dminuoso: o/
<dminuoso> \o
<havenwood> g'mornin
<dminuoso> Good evening indeed.
am55 has quit [Quit: am55]
<apeiros> conceivably: run into the same thing. a possible reason: the language designers thought zip with block means you want the side-effect, so they saved the cost of creating a new array.
<dminuoso> havenwood: Oh shoot, so you cant do something like...
coderphive has quit [Quit: coderphive]
<dminuoso> a.zip(b, &:+) ?
<dminuoso> That sucks.
<apeiros> conceivably: and as you say, it's easy enough to get around using e.g. a.zip(b).map { … }
<dminuoso> Though I guess that wouldn't work anyway.
<dminuoso> \o/ apeiros
Mike11 has joined #ruby
<apeiros> dminuoso: heh, yeah. it'd be nice if ruby had unobnoxious syntax for all the variants of one-method blocks
<conceivably> :D thanks for the input. I was just wondering whether maybe I was missing something super obvious.
<apeiros> there are gems to provide short-cuts. but without native support, I prefer the full block.
<dminuoso> Screw blocks
<dminuoso> Tacit programming.
* dminuoso hugs his combinatorically derived lambdas
orbyt_ has joined #ruby
<apeiros> ah right. you're having new shtiks to follow :-D
<WhereIsMySpoon> dminuoso: whats this now
<WhereIsMySpoon> ive not heard of those before
<dminuoso> WhereIsMySpoon: Simple. You start with class Proc; def *(o); ->(*arg) { self[o[*args]]}; end; end
<dminuoso> And then you start going.
Burgestrand has joined #ruby
<WhereIsMySpoon> ah yes
<WhereIsMySpoon> simple
<WhereIsMySpoon> (wtf)
<WhereIsMySpoon> im no ruby expert :P i just tinker every now and then
jimmylu2333-rpi3 has joined #ruby
<dminuoso> WhereIsMySpoon: Stare at that definition and think about it for one moment.
sameerynho has quit [Ping timeout: 240 seconds]
<dminuoso> WhereIsMySpoon: Ill give you one hint, o is assumed to be a proc/lambda.
<Burgestrand> WhereIsMySpoon you ever found out the true min/max values of your floats? :)
<WhereIsMySpoon> Burgestrand: ha, no i didnt get to, because the stupid portaudio library led me on a merry chase all of my 2nd day
<dminuoso> WhereIsMySpoon: After that you need to badly patch Proc#call and Proc#[] to do push/enter
<dminuoso> So you dont go insane
<WhereIsMySpoon> i eventually went home, talked to my friends who are c experts, and found out i NEED to call paComplete if i want to exit out of the stream’s block
nahra has joined #ruby
conta has quit [Ping timeout: 276 seconds]
<WhereIsMySpoon> otherwise it will keep going forever
<WhereIsMySpoon> even if you call stream.close
* dminuoso should make a blog post about this
<WhereIsMySpoon> dminuoso: what is *?
aufi has quit [Quit: Leaving]
<dminuoso> WhereIsMySpoon: its function composition
<dminuoso> facest: f * x = -> (a) { f[x[a]] }
<dminuoso> Err ^- WhereIsMySpoon.
mtkd has quit []
<dminuoso> (Look at this as a statement of equality, not actual ruby code)
<WhereIsMySpoon> sure
<dminuoso> f * g combines two lambdas into a single lambda that takes an argument, applies g to it, and then applies f to the result of f.
<WhereIsMySpoon> right
<dminuoso> *and then applies f to the result of g
shuforov has joined #ruby
<WhereIsMySpoon> i think i get it
<WhereIsMySpoon> so whats this for
<dminuoso> WhereIsMySpoon: About building functions that do things.
<dminuoso> You build functions with functions, rather than taking the pencil and drawing them bit by bit.
imode has joined #ruby
<WhereIsMySpoon> Burgestrand: I ended up being stuck in a while true loop for most of the day (sometimes) because of the interacton between portaudio’s ffi and the ruby code i was writing
<Burgestrand> WhereIsMySpoon hehe, rough day :)
<WhereIsMySpoon> Burgestrand: I was intensely frustrated at the end
<WhereIsMySpoon> Thats what comes of using ruby to do sound processing I guess :)
<dminuoso> WhereIsMySpoon: If you're around in 30 minutes Ill show you some tricks if you are interested
<WhereIsMySpoon> dminuoso: im interested
<WhereIsMySpoon> ill be around in about 30 minutes
mtkd has joined #ruby
<WhereIsMySpoon> Burgestrand: what frustrates me most is that I would have had no idea what was going on if I didn’t have friends who knew C
<dminuoso> WhereIsMySpoon: so before I get there, consider `f * g` to be a combinatoric way to do chaining like `x.g.f` but without having to talk about `xz
<dminuoso> And in a way that you can pass such constructions as blocks or values around
<dminuoso> *about `x`
<Burgestrand> WhereIsMySpoon either that or if you were curious enough to look up what :paContinue actually did :D
<WhereIsMySpoon> Burgestrand: I tried my best on that dude, the docs are little and I understand very little C
kn-928 has quit [Ping timeout: 264 seconds]
<WhereIsMySpoon> plus, it wasnt consistent
<WhereIsMySpoon> sometimes the stream would exit on stream.close
<WhereIsMySpoon> sometimes not
<WhereIsMySpoon> because it was all a race condition between the GIL and ffi
<WhereIsMySpoon> dminuoso: ok
<Burgestrand> WhereIsMySpoon ah yes, not saying it would be easy, I think you could've figured it out eventually, but you are indeed lucky to have your C friends :)
<WhereIsMySpoon> Burgestrand: I had no idea there was a problem at this level :) I didnt even think to look inside the internals
<WhereIsMySpoon> But yes I am
<WhereIsMySpoon> Maybe next time I will use another language for sound processing that has up to date libraries :D
alfiemax_ has joined #ruby
<morfin> hmm
eckhardt_ has joined #ruby
<WhereIsMySpoon> Burgestrand: thank you for all your help all the same :)
<Burgestrand> WhereIsMySpoon heh, yeah, there are drawbacks to being one of the pioneers
<morfin> i think i found solution how i can bulk create models
<WhereIsMySpoon> :D
<morfin> with validations
alfiemax has quit [Ping timeout: 260 seconds]
riotjones has quit [Remote host closed the connection]
sanscoeur has joined #ruby
duckpuppy has joined #ruby
Burgestrand has quit [Quit: Closing time!]
<X-Jester> has anyone tried the new jetbrains 2018 rubymine beta yet?
jeffreylevesque has joined #ruby
venmx has quit [Quit: leaving]
<cagomez> I'm chaining enumerators. is there an easy way to produce the result of the enumerator without having to guess their order? ie I don't know if the index, object being iterated over, or `memo` is the first arg
<cagomez> *first result?
tomphp has joined #ruby
duckpuppy has quit [Ping timeout: 264 seconds]
bmurt has joined #ruby
ramfjord has joined #ruby
<havenwood> cagomez: What does it mean to chain enumerators? Like concatenating multiple enumerators? Can you show the code for what you've tried?
<havenwood> There is a feature request for Enumerator#concat: https://bugs.ruby-lang.org/issues/14593
<havenwood> enums.lazy.flat_map(&:lazy).to_enum { enums.sum(&:size) if enums.all?(&:size) } >.>
<cagomez> I got it havenwood. %i(foo bar baz).each_with_object([]).with_index(1) { |*args| puts *args }
<cagomez> I was trying to see what order the arguments would appear in the block
cdg has joined #ruby
<havenwood> cagomez: #reduce is the opposite of #each_with_object, aye
<cagomez> aye
<havenwood> I like #each_with_object.
<cagomez> same. inject() and reduce() seem clunky in comparison
<dminuoso> cagomez: What you are complaining about is the lack of a type system to help you.
cdg__ has joined #ruby
<dminuoso> WhereIsMySpoon: Alright. So lets start first with the motivation behind all of this.
<havenwood> >> %i(foo bar baz).each_with_object([]).with_index(1).first.map(&:class)
<ruby[bot]> havenwood: # => [Array, Fixnum] (https://eval.in/974706)
<dminuoso> WhereIsMySpoon: In Ruby it's quite common to "chain" methods, such as str.f(args).g(moreArgs).h(evenMore)
<cagomez> wow nice
cdg___ has joined #ruby
<dminuoso> WhereIsMySpoon: This feels quite natural because it represents a processing pipeline where data are placed in from the left side, and results come out from the right side.
<dminuoso> WhereIsMySpoon: So far so good?
cdg_ has quit [Ping timeout: 245 seconds]
yashi has left #ruby [#ruby]
<cagomez> dminuoso: the Fluent Builder pattern is beautiful . ie FooBuilder.build.with_bar.with_baz.foo
<dminuoso> cagomez: function composition is beautiful and strong.
<WhereIsMySpoon> dminuoso: interesting, I wasnt aware this was a normal pattern in generic ruby programming, but im aware of that pattern
ramfjord has quit [Ping timeout: 276 seconds]
<dminuoso> WhereIsMySpoon: It happens quite frequently.
<dminuoso> For example
<dminuoso> >> (1..10).select(&:even?).map(&:to_s).zip(100..200)
<ruby[bot]> dminuoso: # => [["2", 100], ["4", 101], ["6", 102], ["8", 103], ["10", 104]] (https://eval.in/974707)
cdg has quit [Ping timeout: 256 seconds]
<dminuoso> Things like this happen rather frequently in idiomatic ruby code.
<havenwood> It tends to be a concise way to write code that reads well.
<dminuoso> WhereIsMySpoon: That's one half. Now the second is that Ruby is filled with higher order functions.
<WhereIsMySpoon> dminuoso: righto, this is becoming more common in java too with streams (c# linqs etc)
cdg__ has quit [Ping timeout: 256 seconds]
<dminuoso> WhereIsMySpoon: Right. Java has been experiencing a strong influx of FP ideas because they are quite powerful, even if you dont go all-in functional.
<WhereIsMySpoon> (im mainly a java dev)
<WhereIsMySpoon> indeed they are
<dminuoso> WhereIsMySpoon: So lets consider (1..10).select(&:even?) for a second. At first glance that looks like the command pattern, but in reality you are just taking a shortcut
<dminuoso> Conceptually this is just (1..10).select { |e| e.even? }
<dminuoso> But what is that block? That looks an awful lot like a function, doesn't it?
<dminuoso> If its a function it has input and output. #select wants not any function, but one that acts as a predicate
<havenwood> A proc without an object? Let's call it a block!
<WhereIsMySpoon> dminuoso: sure, that makes sense
<dminuoso> WhereIsMySpoon: So what if you wanted to filter based on a function, that first takes its input as a string, removes any non-digit characters, and then parses that into a number, and then checks if the number is even?
<dminuoso> That logic itself is a simple function. But how do we describe such a function?
<dminuoso> You split it into simple task.
<WhereIsMySpoon> as a composition of those functions
<WhereIsMySpoon> removal of non digits, parsing, then even check
<WhereIsMySpoon> right?
<dminuoso> Right.
<dminuoso> onlyDigit = -> e { e.gsub(/\D/, '') }
<dminuoso> toNum = -> e { e.to_i }
<dminuoso> even = -> e { e.even? }
Zaab1t has joined #ruby
<dminuoso> and then you have some: p = even * toNum * onlyDigit
<dminuoso> and then you can go arr.select(&p)
<dminuoso> Voila.
<WhereIsMySpoon> right, this is just syntactic sugar for map though
<dminuoso> Nope.
<WhereIsMySpoon> oh wait
<WhereIsMySpoon> right
jimmylu2333-fedo has joined #ruby
<WhereIsMySpoon> because you defined a function based on other ones
ledestin has joined #ruby
<WhereIsMySpoon> thats a thing you can do in haskell i think, right?
<WhereIsMySpoon> just with the base language
<dminuoso> Yeah.
<dminuoso> Though (.), which is the equivalent of *, is defined in terms of the language itself.
dionysus69 has joined #ruby
vdl has joined #ruby
<dminuoso> So it's not really important that the language has it, you could trivially define it yourself.
jimmylu2333-fedo has quit [Client Quit]
<dminuoso> Which is what I do in Ruby.
<WhereIsMySpoon> righto
<dminuoso> WhereIsMySpoon: So the next important part is currying
jimmylu2333-rpi3 has quit [Quit: WeeChat 1.6]
<dminuoso> Which is the final bit you need to create powerful things
<dminuoso> (well you kind of also want push/apply evaluation, but meh)
<dminuoso> so you could do
<dminuoso> at = -> i, a { a[i] }.curry
jimmylu2333-fedo has joined #ruby
<dminuoso> Which is kind of like Symbol#to_proc, but way cooler.
jimmylu2333-rpi3 has joined #ruby
Serpent7776 has quit [Quit: Leaving]
<dminuoso> WhereIsMySpoon: Assume we have some users = [{name: 'dminuoso',hobbies: ['nonsense', 'fp']},{name: 'havenwood',hobbies: ['being even more silly', 'fp']}];
jimmylu2333-fedo has quit [Client Quit]
<dminuoso> And we wanted to know the top hobbies of our users
<dminuoso> We could simply do: topHobby = at[0] * at[:hobbies]; users.map(&topHobby)
jimmylu2333-fedo has joined #ruby
jimmylu2333-fedo has quit [Client Quit]
<WhereIsMySpoon> er
<WhereIsMySpoon> im lost
<WhereIsMySpoon> :D
<dminuoso> Which part?
<WhereIsMySpoon> the start of your curring explanation
jimmylu2333-fedo has joined #ruby
<WhereIsMySpoon> what is i and a
<dminuoso> oh
<dminuoso> -> i, a { a[i] }
<dminuoso> is just a lambda that takes two arguments, and indexes into the second argument using the first
<dminuoso> seems rather boring doesnt it?
<WhereIsMySpoon> oh right sorry
<WhereIsMySpoon> now i still dont get your topHobby line
<dminuoso> WhereIsMySpoon: Currying just modifies a lambda to - conceptually - only have a single argument
<dminuoso> WhereIsMySpoon: Do you require further explanation of currying?
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso> it turns.. `-> i, a { a[i] }` into `-> i { -> a { a[i]} }`, so instead of function taking multiple parameters, each function only takes a single argument
<dminuoso> so if you pass a single parameter, you get a function back that is waiting for the remaining ones
<dminuoso> for example:
<dminuoso> add = -> a, b { a + b }.curry
<dminuoso> add[5] creates an adder, a function that takes an argument and adds 5 to it
<dminuoso> so you could say add[5] creates a 5-adder
<WhereIsMySpoon> right, i get that much
<dminuoso> right
<dminuoso> so
<WhereIsMySpoon> what does at[0] do
<dminuoso> at = -> i, a { a[i] }.curry
<dminuoso> you tell me
<dminuoso> ;)
<WhereIsMySpoon> returns a function that calls a() on 0?
<dminuoso> nope..
<WhereIsMySpoon> <_>
<dminuoso> so
<WhereIsMySpoon> oh, it returns the 0th element of a
<dminuoso> Right!
<dminuoso> So it creates an "accessor for the 0th element"
<WhereIsMySpoon> yeah
<dminuoso> so "at" creates accessors.
<dminuoso> WhereIsMySpoon: A useful intuition for function composition now is
<dminuoso> that `f * g` is pronounced "f after g"
<dminuoso> because first g is applied to an argument, and then f
<dminuoso> so f is applied after g.
<WhereIsMySpoon> ok, perhaps firstHobby is a better name :)
<dminuoso> right
<dminuoso> I was just thinking they were sorted by the persons interest in it
<dminuoso> but that works too
<WhereIsMySpoon> right, that wasnt so obvious :D i was wondering where this sorting comes in
<dminuoso> well if you want.. we can build that sorting in too!
<dminuoso> sort takes a comparing function..
<dminuoso> ;)
<WhereIsMySpoon> :)
guille-moe has quit [Ping timeout: 264 seconds]
<dminuoso> function means you can construct it from higher order functions and composition
krawchyk has joined #ruby
krawchyk has quit [Client Quit]
<dminuoso> WhereIsMySpoon: once you start that road, you can separate these functions - making them testable as well as refactorable
<WhereIsMySpoon> right
jimmylu2333-fedo has quit [Ping timeout: 260 seconds]
<WhereIsMySpoon> all this is coming back to me slowly, i remember reading all about this when i was learning haskell
vcavallo has quit [Read error: Connection reset by peer]
<dminuoso> WhereIsMySpoon: the only downside is that you have to create some helping things to make this work, because ruby is missing some of the important puzzle pieces
<dminuoso> that's mostly a one thing cost though
<WhereIsMySpoon> yeah
<WhereIsMySpoon> whats this push evaluation youre on about
<dminuoso> well
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso> let me give you an example
<dminuoso> WhereIsMySpoon: do you know what zip does?
<WhereIsMySpoon> yeah
<dminuoso> WhereIsMySpoon: please do explain in a very short sentence with your own words
<WhereIsMySpoon> it merges arrays together indexes at a time
<dminuoso> right. like a zipper it takes two arrays, and zips them together as it were.
<WhereIsMySpoon> [1,2,3].zip([4,5,6],[7,8,9] = [[1,4,7],[2,5,8],[3,6,9]]
<dminuoso> right.
<dminuoso> so what if
<dminuoso> we had two lists
<dminuoso> arr1 and arr2, and wanted to add them together component wise
<dminuoso> how would you do it?
<WhereIsMySpoon> zip then perform sum on the arrays
<WhereIsMySpoon> assuming by component wise you mean index wise
<dminuoso> alright.
<dminuoso> the plain ruby way would look like this
<dminuoso> >> [1,2,3].zip([3,4,5]).map { |arr| arr.reduce(&:+) }
<ruby[bot]> dminuoso: # => [4, 6, 8] (https://eval.in/974737)
<dminuoso> but thats not very nice
biberu has joined #ruby
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
<dminuoso> since this is a rather frequent thing to do - even in idiomatic ruby, we just lack the tools to develop good habits - we use this
<dminuoso> zipWith = -> f, l r {l.zip(r).map { |a, b| f.(a, b) }}
<dminuoso> zipWith = -> f, l r {l.zip(r).map { |a, b| f.(a, b) }}.curry
<dminuoso> and then you have some add = -> a, b { a + b }
<WhereIsMySpoon> right
<dminuoso> and then you go
<dminuoso> zipWith(add, arr1, arr2)
<dminuoso> voila
<dminuoso> looks pretty cool right?
<dminuoso> WhereIsMySpoon: Now what if we wanted an array of arrays..
<dminuoso> say a 3x3 matrix represented by nested arrays
<dminuoso> and you had two such matrices, and you wanted to add them element wise..
jrafanie has quit [Quit: Textual IRC Client: www.textualapp.com]
<dminuoso> with ruby you now start to write some pretty painful code to read.
mikecmpbll has quit [Ping timeout: 256 seconds]
<dminuoso> WhereIsMySpoon: https://eval.in/974750
<dminuoso> here's the code we have so far
perzival has quit [Ping timeout: 256 seconds]
<WhereIsMySpoon> right
aupadhye has quit [Quit: Leaving]
John_Ivan has quit [Read error: Connection reset by peer]
erlend has quit [Ping timeout: 264 seconds]
<dminuoso> WhereIsMySpoon: So ideally if we had some mat1 and mat2, we could now do this:
<dminuoso> (zipWith * zipWith)[add, arr1, arr2]
<dminuoso> So lets try this.
<dminuoso> WhereIsMySpoon: https://eval.in/974753
chatchatt has joined #ruby
<dminuoso> But something went wrong. The problem here is that lambda call doesn't consider the arity of arguments.
erlend has joined #ruby
<dminuoso> Instead of Proc#[] doing the right(tm) thing, and pushing one argument at a time (which is what we want in our curry happy world), it applies everything on each call.
<WhereIsMySpoon> which lambda call please
<dminuoso> line 16
<WhereIsMySpoon> right
chatchat1 has quit [Ping timeout: 260 seconds]
<dminuoso> WhereIsMySpoon: So ruby forces you to know when a lambda is "popped" and a "new one is returned" https://eval.in/974755
<WhereIsMySpoon> im lost a little
<dminuoso> so you cant mindlessly just shove arguments in like in Haskell
<WhereIsMySpoon> whats the output of that code
<dminuoso> which one, the last?
<WhereIsMySpoon> no
<WhereIsMySpoon> the one befor
<dminuoso> right so
<dminuoso> f * g
<dminuoso> creates some -> *args { f[g[*args]] }
<dminuoso> right?
<dminuoso> WhereIsMySpoon: Our problem is, we want just one argument to be pushed into zipWith, and the return of that + the remaining into the other zipWith
<dminuoso> or it may be more obvious if we fix our Proc#*
<morfin> weird
<dminuoso> class Proc; def *(o); -> args { self[o[args]] }; end; end
<dminuoso> so its clear, that this lambda expects only one argument right?
<morfin> with Capistrano i get Net::SSH::ConnectionTimeout: Net::SSH::ConnectionTimeout but when use SSH client everything is ok
<morfin> any idea?
<WhereIsMySpoon> dminuoso: right
<dminuoso> WhereIsMySpoon: We could just do this: (zipWith * zipWith)[add][mat1][mat2] which works fine
<dminuoso> but thats annoying, we dont want to manually apply each returned lambda
<dminuoso> instead we want to pass it "some arguments", and have it "apply one argument from that list at a time"
<morfin> looks ugly)
ryzokuken has joined #ruby
<morfin> Haskess can do better i believe
<morfin> *Haskell
<dminuoso> WhereIsMySpoon: so that's where push/apply comes in, where you keep a stack of arguments, and look at the arity, and provide as many as necessary
coderphive has joined #ruby
<WhereIsMySpoon> morfin: yes, but haskell was built with this in mind :)
<dminuoso> you can simply monkey patch Proc#[] and Proc#call to do just that, which should be a reasonably safe thing to do
<dminuoso> WhereIsMySpoon: with such a monkey patch you can simply say
<dminuoso> (zipWith * zipWith)[add, mat1, mat2]
<dminuoso> WhereIsMySpoon: and that is a rather elegant way of zipping nested lists together with add
<dminuoso> you can even do higher tensors too
<dminuoso> (zipWith * zipWith * zipWith)[add, t1, t2]
<dminuoso> For three dimensional lists..
ramfjord has joined #ruby
vcavallo has joined #ruby
<WhereIsMySpoon> so (zipWith * zipWith)[add, mat1, mat2] applies zipWith to the arguments twice, yes?
<dminuoso> nope..
<WhereIsMySpoon> <_>
<dminuoso> WhereIsMySpoon: let me rewrite slightly
<WhereIsMySpoon> then im a bit conufsed :D
<dminuoso> zipWith[zipWith[add], t1, t2]
<dminuoso> thats the same thing.
<dminuoso> so the thing you zipWith itself is a zipWith that adds.
<dminuoso> if you think about it
<dminuoso> zipWith takes a binary function that combines two things.
Mike11 has quit [Quit: Leaving.]
<dminuoso> well, zipWith[add] is a function that combines two lists right?
guanine has joined #ruby
<dminuoso> zipWith(f, mat1, mat2) requires f to be a function that combines two lists.
<dminuoso> because mat1 and mat2 are of type [[Int]]
\void has joined #ruby
<dminuoso> (i.e. they are 2 dimesional lists)
<WhereIsMySpoon> right
duckpuppy has joined #ruby
<dminuoso> so
<dminuoso> (zipWith * zipWith)[add] = zipWith[zipWith[add]]
<dminuoso> right?
<dminuoso> so from that follows
<dminuoso> (zipWith * zipWith * zipWith)[add, t1, t2] = zipWith[zipWith[add]][t1,t2]
<dminuoso> oops
<dminuoso> (zipWith * zipWith)[add, t1, t2] = zipWith[zipWith[add]][t1,t2]
<dminuoso> and equivalently
jrafanie has joined #ruby
<dminuoso> Ah well this becomes harder to talk about with ruby without type signatures
<dminuoso> but anyway
cdg has joined #ruby
<dminuoso> zipWith works on single lists
<dminuoso> zipWith * zipWith works on matrixes
<WhereIsMySpoon> i think i kinda get it :P
<dminuoso> :)
<WhereIsMySpoon> thanks
<WhereIsMySpoon> :)
<WhereIsMySpoon> now my brain is leaking
<WhereIsMySpoon> :D
cdg has quit [Read error: Connection reset by peer]
cdg_ has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
cdg___ has quit [Ping timeout: 256 seconds]
duckpuppy has quit [Ping timeout: 268 seconds]
<WhereIsMySpoon> i think in general adding ways to more easily code in fp paradigms is good :)
<WhereIsMySpoon> fp code is generally less prone to bugs and more succinct
<dminuoso> I wouldn't say that fp is less prone to bugs, its rather that fp languages tend to have strong and expressive type systems that prevent tons ofbugs.
<dminuoso> but the abstractions are stronger, so it's easier to maintain code
klabautermann has joined #ruby
conceivably has quit [Remote host closed the connection]
<WhereIsMySpoon> yeah
za1b1tsu has quit [Remote host closed the connection]
perzival has joined #ruby
<klabautermann> Any ideas why puts "Status: #{scan_info['status']}" won't print the actual status? It displays Status: but nothing after. However, if I remove ['status'], it prints the entire json response
SteenJobs has joined #ruby
<dminuoso> klabautermann: what is scan_info?
<klabautermann> scan_info = client.call('pro.task_status', task_id)
<dminuoso> No I mean..
<klabautermann> its stored json
<dminuoso> klabautermann: gist the output of `puts scan_info.inspect`
<klabautermann> Status: {"3"=>{"status"=>"done", "error"=>"", "created_at"=>1521473433, "progress"=>100, "description"=>"Discovering", "
<klabautermann> ze"=>91089}}
<klabautermann> ame"=>"admin", "result"=>"", "path"=>"C:/temp/apps/pro/tasks/2018-03-19T15-30-33_task_pro.discover_3.txt", "si
<klabautermann> info"=>"Sweep of 15.1.45.12-15.1.45.12 complete (1 new host, 11 new services)", "workspace"=>"newjoetest", "usern
cdg has joined #ruby
<klabautermann> Im wantiong the output of "done"
<dminuoso> klabautermann: With your own words, what are the keys of that entire hash?
<dminuoso> klabautermann: Formulate a hypothesis. Test it by chcking scan_info.values
perzival has quit [Ping timeout: 246 seconds]
<dminuoso> or scan_info.keys rather I guess =)
<klabautermann> ohh, these are things I didnt know about
<dminuoso> klabautermann: yes they are.
<klabautermann> ok, let me try those
<dminuoso> o
<dminuoso> no
<dminuoso> klabautermann: hold on one sec
<dminuoso> scan_info['status']
<dminuoso> tries to look up the value for the key 'status'
<dminuoso> so you are presuming that the outer hash must have a key called "status"
<dminuoso> so, if you look at the hash, what are the outermost keys?
<klabautermann> there is no hash here
WhereIsMySpoon has quit [Ping timeout: 240 seconds]
<dminuoso> klabautermann: What is there?
<klabautermann> im only passing arguments via rpc
<dminuoso> klabautermann: scan_info.class
<dminuoso> what do you get back?
<klabautermann> one moment
<klabautermann> ...hash
<dminuoso> =)
cdg_ has quit [Ping timeout: 264 seconds]
<klabautermann> haha, hmm
<klabautermann> when you say outermost keys
<klabautermann> what is that excatly? Thats new to me, and id like to look it up
<dminuoso> klabautermann: you're holding a russian doll in your hand.
<dminuoso> the outer most layer happens to be a hash
<dminuoso> if its a hash, it has keys
ryan_ford has quit [Quit: WeeChat 1.4]
<rsh> 2
Asher has quit [Quit: Leaving.]
<rsh> 3
clemens3 has quit [Ping timeout: 260 seconds]
shpoont has joined #ruby
Asher has joined #ruby
hsiktas_ is now known as hsiktas
perzival has joined #ruby
pd2000 has joined #ruby
coderphive has quit [Quit: coderphive]
kn-928 has joined #ruby
tomphp has joined #ruby
_hramrach is now known as hramrach
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
kn-928 has quit [Ping timeout: 240 seconds]
tvw has quit [Remote host closed the connection]
ltt has joined #ruby
coderphive has joined #ruby
alfiemax_ has quit [Remote host closed the connection]
ltt is now known as glutenfreebytes
<cagomez> I'm working within a rails app and my `const_get` is finding the incorrect class (a model in my Rails app rather than in my module) during an Rspec test. Any help? https://hastebin.com/wucehodaso.rb
<dminuoso> cagomez: Make a working testcase.
<dminuoso> (by working I mean one that reproduces your issue)
<dminuoso> or perhaps just gist the model and the spec.
andikr has quit [Remote host closed the connection]
ta_ has joined #ruby
O0SFGWmcintosh has joined #ruby
O0SFGWmcintosh has quit [Client Quit]
samort7_ has joined #ruby
John_Ivan has joined #ruby
tomphp_ has joined #ruby
samort7 has quit [Ping timeout: 276 seconds]
tomphp has quit [Ping timeout: 265 seconds]
duckpuppy has joined #ruby
erts has joined #ruby
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #ruby
ta_ has quit [Remote host closed the connection]
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
ta_ has joined #ruby
duckpuppy has quit [Ping timeout: 246 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
syndikate has quit [Quit: M'Kay]
conceivably has joined #ruby
<conceivably> Is there a name for arrays of the form [[k1, v1], [k2, v2],...,[kn, vn]] that can be hashed?
rsh has quit [Ping timeout: 246 seconds]
bmurt has joined #ruby
schneider has joined #ruby
<hahuang65_> anyone here knowledgable about TCPSocket and how that works in Ruby? I'm having trouble with it resolving a docker-style link "http://#{container_name}
<hahuang65_> "
<hahuang65_> I'm wondering if it just doesn't resolve those names and needs a specific IP
fiachetti has joined #ruby
roca has quit [Quit: roca]
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
clemens3 has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
tomphp_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nowhere_man has joined #ruby
nowhereman_ has quit [Ping timeout: 268 seconds]
ta_ has quit [Remote host closed the connection]
weird_error has joined #ruby
weird_error has quit [Client Quit]
jamiejackson2577 has joined #ruby
cagomez has quit [Remote host closed the connection]
jamiejackson2577 has quit [Remote host closed the connection]
venmx has joined #ruby
samort7_ has quit [Remote host closed the connection]
samort7 has joined #ruby
cdg_ has joined #ruby
shuforov has quit [Ping timeout: 246 seconds]
cdg has quit [Ping timeout: 246 seconds]
SteenJobs has quit [Quit: SteenJobs]
cdg_ has quit [Ping timeout: 264 seconds]
marxarelli is now known as marxarelli|afk
n0m4d1c has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
troulouliou_div2 has quit [Remote host closed the connection]
jamesaxl has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
c0ncealed has quit [Remote host closed the connection]
cagomez has joined #ruby
c0ncealed has joined #ruby
ldepandis has joined #ruby
Psybur has quit [Ping timeout: 240 seconds]
mtkd has quit [Ping timeout: 268 seconds]
deadnull has joined #ruby
cdg has joined #ruby
rsh has joined #ruby
cagomez has quit [Ping timeout: 246 seconds]
Dimik has joined #ruby
mtkd has joined #ruby
eckhardt_ has joined #ruby
John_Ivan has quit [Read error: Connection reset by peer]
tolerablyjake has joined #ruby
cdg has quit [Ping timeout: 246 seconds]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
pd2000 has quit [Remote host closed the connection]
pd2000 has joined #ruby
duckpuppy has joined #ruby
pd2000 has quit [Remote host closed the connection]
erlend has quit [Ping timeout: 252 seconds]
erlend has joined #ruby
pastorinni has quit [Remote host closed the connection]
pastorinni has joined #ruby
duckpuppy has quit [Ping timeout: 248 seconds]
cagomez has joined #ruby
pastorinni has quit [Ping timeout: 256 seconds]
SteenJobs has joined #ruby
SteenJobs has quit [Client Quit]
shpoont has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shpoont has joined #ruby
duderonomy has joined #ruby
cagomez has quit [Ping timeout: 240 seconds]
shpoont has quit [Client Quit]
deadnull has quit [Quit: Ciao]
shpoont has joined #ruby
graft has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
n0m4d1c has quit [Read error: Connection reset by peer]
sameerynho has joined #ruby
jenrzzz has joined #ruby
milardovich has joined #ruby
graft has joined #ruby
graft has joined #ruby
graft has quit [Changing host]
cagomez has joined #ruby
rwb has quit [Ping timeout: 240 seconds]
roshanavand has joined #ruby
glutenfreebytes has quit [Quit: Textual IRC Client: www.textualapp.com]
jeffreylevesque has quit [Ping timeout: 240 seconds]
kn-928 has joined #ruby
nahra has quit [Remote host closed the connection]
nahra has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
sameerynho has quit [Ping timeout: 268 seconds]
nahra has quit [Remote host closed the connection]
marxarelli|afk is now known as marxarelli
coderphive has quit [Quit: coderphive]
venmx has quit [Remote host closed the connection]
erts has quit [Quit: .]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has joined #ruby
klabautermann has quit [Quit: Going offline, see ya! (www.adiirc.com)]
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
shpoont has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
n008f4g_ has joined #ruby
pastorinni has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
duckpuppy has joined #ruby
duderonomy has joined #ruby
appdevolopur has joined #ruby
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
synthroi_ has quit []
duckpuppy has quit [Ping timeout: 256 seconds]
FrostCandy has joined #ruby
za1b1tsu has joined #ruby
SeepingN has joined #ruby
n008f4g_ has quit [Ping timeout: 264 seconds]
biberu has quit []
pastorinni has quit []
xelkarin has joined #ruby
venmx has joined #ruby
shpoont has joined #ruby
jcalla has quit [Quit: Leaving]
sameerynho has joined #ruby
ldnunes has quit [Read error: Connection reset by peer]
ldnunes has joined #ruby
reber has quit [Remote host closed the connection]
rsh has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby
John_Ivan has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
krawchyk has joined #ruby
cagomez has quit [Remote host closed the connection]
ldnunes has quit [Quit: Leaving]
workmad3 has quit [Ping timeout: 256 seconds]
<conceivably> Why is it legal to divide by 0.0 ?
za1b1tsu has quit [Ping timeout: 240 seconds]
shpoont has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
perzival has quit [Ping timeout: 240 seconds]
<kke> what's the most awesomely written web service api wrapper you ever saw? (looking for inspiration)
sameerynho has quit [Ping timeout: 240 seconds]
kn-928 has quit [Ping timeout: 240 seconds]
nowhereman_ has joined #ruby
nowhere_man has quit [Ping timeout: 264 seconds]
trautwein has quit [Quit: ZNC 1.6.5 - http://znc.in]
shpoont has joined #ruby
n008f4g_ has joined #ruby
chouhoul_ has joined #ruby
krawchyk has quit [Quit: krawchyk]
chouhoulis has quit [Ping timeout: 256 seconds]
<dminuoso> conceivably: Because IEEE 754 says so.
<kke> perhaps leaning towards droplet_kit in my current research
venmx has quit [Ping timeout: 240 seconds]
<dminuoso> conceivably: Note that
<dminuoso> >> 1 / 0
<ruby[bot]> dminuoso: # => divided by 0 (ZeroDivisionError) ...check link for more (https://eval.in/974843)
<dminuoso> >> 1 / 0.0
<ruby[bot]> dminuoso: # => Infinity (https://eval.in/974844)
<kke> to Float::INFINITY and beyond
<conceivably> Ah I see, that makes sense thank you :)
<kke> there's also Float::NaN
<kke> conceivably: maybe because floating point math is so weird. 0.0 could also be 0.00000....00000000234 but you just don't have enough precision
<dminuoso> kke: No. It has nothing to do with that.
<dminuoso> kke: It's only because IEEE 754 demands this behavior.
shpoont has quit [Max SendQ exceeded]
<dminuoso> Nothing more, nothing less.
<kke> let's get those bastards
jottr has joined #ruby
trautwein has joined #ruby
zipace has quit [Ping timeout: 256 seconds]
trautwein has quit [Client Quit]
Tempesta has quit [Quit: AdiIRC is updating to v3.1 Beta Build (2018/03/19) 64 Bit]
Tempesta has joined #ruby
karapetyan has joined #ruby
trautwein has joined #ruby
biox has quit [Quit: probably server crash]
tcopeland has quit [Quit: tcopeland]
biox has joined #ruby
shpoont has joined #ruby
trautwein has quit [Client Quit]
trautwein has joined #ruby
trautwein has quit [Client Quit]
trautwein has joined #ruby
[Butch] has quit [Quit: Textual IRC Client: www.textualapp.com]
ta_ has joined #ruby
FrostCandy has quit []
duckpuppy has joined #ruby
tomphp has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<kke> of course they had a reason to demand that
erlend has quit [Ping timeout: 256 seconds]
harrycs has joined #ruby
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
erlend has joined #ruby
<havenwood> reasoning that there is a reason seems reasonable
<kke> >> 1 / 1.0e-308
<kke> ok then.
<kke> 309 gives float::infinity on my machine, so that you know.
<havenwood> #=> 1.0e+308
duckpuppy has quit [Ping timeout: 256 seconds]
shpoont has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
psychicist__ has quit [Quit: Lost terminal]
<samort7> "The Well Grounded Rubyist" third edition is up for preorder on the publishers website. %50 off with code wm031618lt
<samort7> After shipping came to ~$31 for me if anyone's interested
<havenwood> samort7: I'm glad to see the third edition is out. thanks for the heas-up
<samort7> headius: np
shpoont has joined #ruby
<samort7> Also, their pre-order program is pretty neat. You get early access to the ebook as its written
<harrycs> nice, reminds me that maybe i should finish the second edition ':D
jamesaxl has quit [Quit: WeeChat 2.0.1]
<samort7> currently has 160 pages available. 5 chapters worth
duderonomy has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
kiltzman has quit [Ping timeout: 260 seconds]
chouhoulis has joined #ruby
milardovich has quit [Remote host closed the connection]
kiltzman has joined #ruby
sameerynho has joined #ruby
trautwein has quit [Quit: ZNC 1.6.5 - http://znc.in]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
trautwein has joined #ruby
trautwein has quit [Client Quit]
cagomez has joined #ruby
xall has joined #ruby
trautwein has joined #ruby
sameerynho has quit [Ping timeout: 240 seconds]
schneider has quit [Ping timeout: 264 seconds]
mooe has joined #ruby
ChaosBringer has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
netherwolfe has quit [Ping timeout: 256 seconds]
AJA4350 has quit [Remote host closed the connection]
mtkd has quit []
AJA4350 has joined #ruby
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
milardovich has joined #ruby
tomphp has quit [Read error: Connection reset by peer]
karapetyan has quit [Remote host closed the connection]
eckhardt_ has joined #ruby
milardovich has quit [Ping timeout: 246 seconds]
duderonomy has joined #ruby
shpoont has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
harrycs has quit [Ping timeout: 240 seconds]
samort7 has quit []
shpoont has joined #ruby
duderonomy has quit [Ping timeout: 256 seconds]
tomphp has joined #ruby
<havenwood> Someone should make sure they've changed the `(1..Float::INFINITY).each` examples to `1.step`.
tcopeland has joined #ruby
marxarelli is now known as marxarelli|afk
ryzokuken has quit [Quit: Connection closed for inactivity]
marxarelli|afk is now known as marxarelli
Zaab1t has quit [Quit: Zaab1t]
duckpuppy has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
tolerablyjake has quit [Ping timeout: 240 seconds]
duckpuppy has quit [Ping timeout: 256 seconds]
xelkarin has quit [Quit: WeeChat 2.0.1]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
n008f4g_ has quit [Ping timeout: 256 seconds]
cdg has quit [Remote host closed the connection]
eckhardt_ has joined #ruby
appdevolopur has quit [Quit: Connection closed for inactivity]
shpoont has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roshanavand has quit [Ping timeout: 255 seconds]
cschneid has quit [Remote host closed the connection]
roshanavand has joined #ruby
white_lilies has joined #ruby
Zedax has joined #ruby
shpoont has joined #ruby
workmad3 has joined #ruby
\void has quit [Quit: So long, and thanks for all the fish.]
kn-928 has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
jamiejackson2577 has joined #ruby
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jamiejackson2577 has quit [Remote host closed the connection]
brent_ has joined #ruby
eckhardt_ has joined #ruby
desperek has quit [Quit: xoxo]
cschneid has joined #ruby
<brent_> i'm having pulling down a file form S3, that I uploaded earlier due to the permissions being set to owner, when i need them as world
<brent_> when using aws-sdk is an option when doing AWS_BUCKET.objects[blah].write(file: blah, permission_option: 'public-read')
<brent_> ?
<brent_> or a way to set the permission on a specific file after it's been uploaded so i can pull it down later
lytol has quit [Remote host closed the connection]
cschneid has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 256 seconds]
ramfjord has joined #ruby
roca has joined #ruby
Yxhuvud has quit [Ping timeout: 240 seconds]
Azure has quit [Ping timeout: 240 seconds]
xall has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 260 seconds]
shpoont has quit [Quit: Textual IRC Client: www.textualapp.com]
Yxhuvud has joined #ruby
ramfjord has joined #ruby
houhoulis has joined #ruby
StreetOwl has joined #ruby
StreetOwl has left #ruby ["No boundaries on the net!"]
bmurt has joined #ruby
Azure has joined #ruby
postmodern has joined #ruby
bmurt has quit [Client Quit]
nikivi has quit [Remote host closed the connection]
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 264 seconds]
venmx has joined #ruby
milardovich has joined #ruby
phenom has joined #ruby
dstrunk has joined #ruby
roshanavand has quit [Read error: No route to host]
bmurt has joined #ruby
roshanavand has joined #ruby
nicesignal has quit [Remote host closed the connection]
nicesignal has joined #ruby
mikecmpbll has joined #ruby
roshanavand has quit [Ping timeout: 264 seconds]
ramfjord has joined #ruby
brent_ has quit [Remote host closed the connection]
cdg has joined #ruby
duckpuppy has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
clemens3 has quit [Ping timeout: 268 seconds]
cdg has quit [Ping timeout: 240 seconds]
stairmast0r has quit [Ping timeout: 264 seconds]
dionysus69 has quit [Ping timeout: 260 seconds]
eckhardt_ has joined #ruby
nicesignal has quit [Quit: WeeChat 1.4]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has joined #ruby
duckpuppy has quit [Ping timeout: 240 seconds]