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)
<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? ;-)
<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]
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.
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
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?
<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>
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.
<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>
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
<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]