havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
rgrmatt has joined #ruby
jgt1 has quit [Ping timeout: 250 seconds]
IrishGringo has joined #ruby
rgrmatt has quit [Remote host closed the connection]
rgrmatt has joined #ruby
weemsledeux has joined #ruby
jgt2 has quit [Ping timeout: 240 seconds]
Gnut_ has quit [Ping timeout: 272 seconds]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
puria has quit [Ping timeout: 245 seconds]
underplank has quit [Quit: underplank]
kobain has quit [Ping timeout: 240 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vikas027 has quit [Read error: Connection reset by peer]
kobain has joined #ruby
hadees has quit [Quit: hadees]
djstorm has quit [Ping timeout: 244 seconds]
ascarter has joined #ruby
linduxed has joined #ruby
atomical_ has quit [Max SendQ exceeded]
diegoviola has quit [Quit: WeeChat 1.3]
atomical has joined #ruby
ascarter has quit [Client Quit]
Paradox has joined #ruby
linduxed has quit [Client Quit]
devbug has quit [Ping timeout: 250 seconds]
toretore has quit [Quit: Leaving]
n_blownapart has joined #ruby
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mary5030 has quit [Remote host closed the connection]
ascarter has joined #ruby
underplank has joined #ruby
CloCkWeRX has left #ruby [#ruby]
elcontrastador has joined #ruby
underplank has quit [Client Quit]
chouhoulis has joined #ruby
lemur has joined #ruby
underplank has joined #ruby
maloik_ has quit [Ping timeout: 256 seconds]
EasyCo has joined #ruby
lukeasrodgers has quit [Quit: Leaving.]
cmoneylulz has quit [Remote host closed the connection]
chouhoulis has quit [Ping timeout: 240 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fullofcaffeine has joined #ruby
lemur has quit [Ping timeout: 240 seconds]
ur5us has quit [Read error: No route to host]
sepp2k has quit [Read error: Connection reset by peer]
kobain has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 244 seconds]
cmoneylulz has joined #ruby
workmad3_ has quit [Ping timeout: 245 seconds]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
peterhil_ has joined #ruby
baweaver has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
underplank has quit [Quit: underplank]
devbug has joined #ruby
kam270 has joined #ruby
diegoviola has joined #ruby
devoldmx has joined #ruby
cmoneylulz has quit []
linduxed has joined #ruby
mroth has quit [Write error: Connection reset by peer]
dukedave has quit [Read error: Connection reset by peer]
tejasmanohar has quit [Write error: Connection reset by peer]
akahn has quit [Write error: Connection reset by peer]
glowcoil has quit [Read error: Connection reset by peer]
boxrick1 has quit [Read error: Connection reset by peer]
danzilio has quit [Write error: Connection reset by peer]
ELLIOTTCABLE has quit [Write error: Connection reset by peer]
andersh has quit [Read error: Connection reset by peer]
jhill has quit [Write error: Connection reset by peer]
jabreity__ has quit [Read error: Connection reset by peer]
jpinnix______ has quit [Read error: Connection reset by peer]
knowtheory has quit [Read error: Connection reset by peer]
ckrailo has quit [Read error: Connection reset by peer]
vcoinminer_ has quit [Read error: Connection reset by peer]
acadavid has quit [Write error: Connection reset by peer]
jmhmccr has quit [Write error: Connection reset by peer]
peterhil_ has quit [Ping timeout: 250 seconds]
belak has left #ruby ["WeeChat 1.3"]
ur5us has joined #ruby
axisys has quit [Remote host closed the connection]
baweaver has joined #ruby
kobain has joined #ruby
dukedave has joined #ruby
underplank has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
solocshaw has joined #ruby
rcvalle has quit [Quit: rcvalle]
peterhil_ has joined #ruby
jhill has joined #ruby
kobain has quit [Max SendQ exceeded]
mroth has joined #ruby
kobain has joined #ruby
nateberkopec has quit [Read error: Connection reset by peer]
ascarter has joined #ruby
n_blownapart has quit []
bahar has quit [Ping timeout: 250 seconds]
freerobby1 has quit [Read error: Connection reset by peer]
Hoosier_Daddy has joined #ruby
freerobby has joined #ruby
<Hoosier_Daddy> could I hv
kobain has quit [Max SendQ exceeded]
grilled-cheese has quit [Read error: Connection reset by peer]
grilled-cheese has joined #ruby
kobain has joined #ruby
ELLIOTTCABLE has joined #ruby
acadavid has joined #ruby
<Hoosier_Daddy> I need
<Hoosier_Daddy> I need penises!
jpinnix______ has joined #ruby
ckrailo has joined #ruby
underplank has quit [Quit: underplank]
<mg^> I've been using IRC for literally decades
<mg^> and there is always a new set of losers who can't find better entertainment than what this guy is doing. How sad.
bahar has joined #ruby
kallisti5 has quit [Ping timeout: 245 seconds]
atomical_ has joined #ruby
<demophoon> !ops
<ruboto> fflush, apeiros, banisterfiend, seanstickle, Mon_Ouie, zzak, Radar, Havenn, jhass, sevenseacat, miah, workmad3, Coraline, drbrain, zenspider, rubyhacker1, slyphon, Aria, ljarvis, baweaver, Adaedra
<Radar> !mute Hoosier_Daddy
<Radar> Shhhhh
akahn has joined #ruby
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<demophoon> ty
ascarter has quit [Client Quit]
<mozzarella> why would he destroy his anus this way? disgusting
<mozzarella> and why did I click
<jhass> and why are you talking aboout it
<Radar> ^
JDiPierro has joined #ruby
jmhmccr has joined #ruby
<mozzarella> we can't just pretend it didn't happen
atomical has quit [Ping timeout: 256 seconds]
glowcoil has joined #ruby
<eam> that would be cultural erasure
knowtheory has joined #ruby
Hoosier_Daddy was banned on #ruby by ChanServ [Hoosier_Daddy!*@*]
Hoosier_Daddy was kicked from #ruby by ChanServ [User is banned from this channel]
underplank has joined #ruby
ruby-lang359 has quit [Quit: Page closed]
vcoinminer_ has joined #ruby
<jhass> !unmute Hoosier_Daddy
moei has quit [Quit: Leaving...]
kallisti5 has joined #ruby
christiandsg has quit [Read error: Connection reset by peer]
christiandsg has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
moei has joined #ruby
<Radar> #ruby is now moderated. Please identify with Nickserv to speak.
<eam> I can't identify with nickserv, we just don't have anything in common
Radar changed the topic of #ruby to: Identify with Nickserv to send messages to the channel || Rules & more: http://ruby-community.com || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
DurstBurger has quit [Ping timeout: 246 seconds]
<xybre> +1
<baweaver> /clear
<baweaver> there we go
underplank has quit [Quit: underplank]
ascarter has joined #ruby
dfockler has joined #ruby
baweaver has left #ruby [#ruby]
baweaver has joined #ruby
<baweaver> test
baweaver has quit []
kobain has quit [Read error: Connection timed out]
baweaver has joined #ruby
Wsewolod has quit [Ping timeout: 250 seconds]
jhonglim has joined #ruby
jetpackjoe has joined #ruby
underplank has joined #ruby
kobain has joined #ruby
RobertBirnie has joined #ruby
dlitvak has joined #ruby
<mg^> OK should be identified now
boxrick1 has joined #ruby
davedev2_ has quit [Ping timeout: 250 seconds]
davedev24 has joined #ruby
underplank has quit [Client Quit]
DLSteve has joined #ruby
hxegon has quit [Ping timeout: 272 seconds]
FooMunki has quit [Quit: FooMunki]
<bubbys> intersting, how many people clicked on link
<baweaver> enough
peterhil_ has quit [Ping timeout: 272 seconds]
<jhass> please do not talk about it, any attention they get is too much
arturmoczulski has joined #ruby
arturmoczulski has left #ruby [#ruby]
sucks has quit [Remote host closed the connection]
Cantaberry has joined #ruby
sucks has joined #ruby
jabreity__ has joined #ruby
dlitvak has quit [Remote host closed the connection]
underplank has joined #ruby
andromedian has quit [Ping timeout: 250 seconds]
jhonglim has quit [Quit: jhonglim]
cwong_on_irc has quit [Quit: Leaving.]
aibot has quit [Remote host closed the connection]
aibot has joined #ruby
ap4y has quit [Remote host closed the connection]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gusrub has joined #ruby
kobain has quit [Read error: Connection timed out]
ap4y has joined #ruby
kobain has joined #ruby
lacuna has quit [Read error: Connection reset by peer]
gusrub has quit [Remote host closed the connection]
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
freerobby has quit [Quit: Leaving.]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ramfjord_ has joined #ruby
chouhoulis has joined #ruby
ap4y has quit [Client Quit]
jhonglim has joined #ruby
diego1 has joined #ruby
diego1 has quit [Changing host]
diego1 has joined #ruby
hackeron_ has quit [Ping timeout: 260 seconds]
diegoviola has quit [Ping timeout: 264 seconds]
maloik has joined #ruby
diego1 is now known as diegoviola
ramfjord has quit [Ping timeout: 250 seconds]
ap4y has joined #ruby
Spami has joined #ruby
blackmesa has joined #ruby
TheBloke has quit [Quit: Textual IRC Client: www.textualapp.com]
hackeron has joined #ruby
dlitvak has joined #ruby
marr has quit [Ping timeout: 246 seconds]
lucyinthesky has joined #ruby
chouhoulis has quit [Ping timeout: 250 seconds]
lucyinthesky has left #ruby ["Leaving"]
svoop has joined #ruby
svoop has quit [Client Quit]
maloik has quit [Ping timeout: 244 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
Wsewolod has joined #ruby
govg has quit [Ping timeout: 272 seconds]
_stu_ has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
douglas has quit [Ping timeout: 260 seconds]
djbkd_ has joined #ruby
baweaver has quit [Remote host closed the connection]
alexherbo2 has quit [Quit: WeeChat 1.3]
danzilio has joined #ruby
Regulati_ has quit [Remote host closed the connection]
jbrhbr has quit [Quit: Leaving.]
rgrmatt has quit [Remote host closed the connection]
djbkd_ has quit [Ping timeout: 256 seconds]
RegulationD has joined #ruby
supermar_ has joined #ruby
andersh has joined #ruby
jpfuentes2 has quit [Ping timeout: 256 seconds]
rgrmatt has joined #ruby
Yzguy has joined #ruby
rgrmatt has quit [Remote host closed the connection]
Trynemjoel has quit [Ping timeout: 250 seconds]
jackjackdripper has quit [Quit: Leaving.]
RegulationD has quit [Ping timeout: 240 seconds]
supermarin has quit [Ping timeout: 250 seconds]
supermar_ has quit [Ping timeout: 240 seconds]
jpfuentes2 has joined #ruby
rgrmatt has joined #ruby
rgrmatt has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
hadees has joined #ruby
ruby-lang937 has joined #ruby
jbrhbr has joined #ruby
zarubin has joined #ruby
podman has quit [Quit: Connection closed for inactivity]
TomPeed has joined #ruby
rgrmatt has joined #ruby
htmldrum has quit [Ping timeout: 256 seconds]
christiandsg has quit [Read error: Connection reset by peer]
finisherr has quit [Quit: finisherr]
zarubin has quit [Ping timeout: 240 seconds]
radgeRayden_ has quit [Ping timeout: 256 seconds]
tejasmanohar has joined #ruby
underplank has quit [Quit: underplank]
favadi has joined #ruby
freerobby has joined #ruby
sucks has quit [Ping timeout: 250 seconds]
hackeron has quit [Ping timeout: 272 seconds]
sucks has joined #ruby
htmldrum has joined #ruby
Arnvald has joined #ruby
thedusal has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hackeron has joined #ruby
christiandsg has joined #ruby
freerobby has quit [Quit: Leaving.]
christiandsg has quit [Read error: Connection reset by peer]
atomical_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<freedrull> is .gemtest an old thing https://github.com/vcr/vcr/blob/master/.gemtest
<freedrull> gem-testers.org :\
c355E3B has quit [Quit: Connection closed for inactivity]
howdoicomputer has quit [Ping timeout: 272 seconds]
davedev24 has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
underplank has joined #ruby
radgeRayden has joined #ruby
Jardayn has quit [Quit: Leaving]
underplank has quit [Client Quit]
christiandsg has joined #ruby
rgrmatt has quit [Remote host closed the connection]
sarkis has joined #ruby
rgrmatt has joined #ruby
sam__ has joined #ruby
maloik has joined #ruby
duncannz has joined #ruby
rgrmatt has quit [Remote host closed the connection]
<diegoviola> is there a better way to do this, don't think I like that unless there
<diegoviola> but one of them is giving me nil so it fails
maneco has joined #ruby
sam__ has quit [Client Quit]
denom has joined #ruby
supermarin has joined #ruby
dorei has quit []
maloik has quit [Ping timeout: 250 seconds]
<denom> I have a shim for the "make" command in rbenv that keeps reappearing, I'm stumped as to which gem it's coming from and how to get rid of it.
rgrmatt has joined #ruby
devbug has quit [Ping timeout: 256 seconds]
<denom> every time I run bundle, it reappears! And then all my builds fail with `rbenv: make: command not found`, any ideas?
<diegoviola> any ideas please?
rgrmatt has quit [Remote host closed the connection]
rgrmatt has joined #ruby
baweaver has joined #ruby
chouhoulis has joined #ruby
ruby-lang937 is now known as WatUpMyKnitta
Spami has quit [Quit: This computer has gone to sleep]
Spami has joined #ruby
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Bellthoven has quit []
Arnvald has quit []
grzegorz has joined #ruby
jimmybomb1 has joined #ruby
<jhass> anyone got a gem that basically provides AS::HWIA without having to depend on activesupport?
thedusal has quit [Ping timeout: 252 seconds]
claw has quit [Remote host closed the connection]
RobertBirnie has joined #ruby
rgrmatt has quit [Remote host closed the connection]
brendan- has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rodya_ has joined #ruby
lacuna has quit [Read error: Connection reset by peer]
lacuna has joined #ruby
RobertBirnie has quit [Max SendQ exceeded]
grzegorz has quit [Client Quit]
baweaver has quit [Ping timeout: 240 seconds]
grzegorz has joined #ruby
grzegorz has quit [Client Quit]
Arnvald has joined #ruby
chouhoulis has quit [Ping timeout: 250 seconds]
rsc___ has joined #ruby
jimmybomb has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
jimmybomb has joined #ruby
radgeRayden_ has joined #ruby
howdoicomputer has joined #ruby
RobertBirnie has joined #ruby
radgeRayden has quit [Ping timeout: 240 seconds]
kaka_ has left #ruby [#ruby]
<Yzguy> diegoviola the unless repeats itself
jimmybomb1 has quit [Ping timeout: 272 seconds]
<diegoviola> Yzguy: I just changed it to unless !sedex.nil?
<diegoviola> Yzguy: still not sure I want that
blackmesa has quit [Ping timeout: 250 seconds]
rgrmatt has joined #ruby
ap4y has quit [Quit: WeeChat 1.3]
supermarin has quit [Remote host closed the connection]
rgrmatt has quit [Remote host closed the connection]
<diegoviola> I wonder if I should give neovim a try, anyone tried it?
ScottNYC has joined #ruby
dlitvak has quit [Remote host closed the connection]
Moosashi has joined #ruby
supermarin has joined #ruby
weemsledeux has joined #ruby
dlitvak has joined #ruby
bronson has quit [Remote host closed the connection]
cdg has joined #ruby
sulky has quit [Ping timeout: 246 seconds]
devoldmx has joined #ruby
dlitvak has quit [Remote host closed the connection]
dimik has quit [Ping timeout: 240 seconds]
supermarin has quit [Remote host closed the connection]
sulky has joined #ruby
kam270 has quit [Ping timeout: 250 seconds]
dlitvak has joined #ruby
pwnd_nsfw has quit [Remote host closed the connection]
RegulationD has joined #ruby
supermarin has joined #ruby
devoldmx has quit [Ping timeout: 272 seconds]
dlitvak has quit [Remote host closed the connection]
<Yzguy> maybe valid? I'm new to all the crazy consolidation stuff you can do with ruby
<Yzguy> forgot the other " on Verde
<denom> oh man, the recipe 'rbenv-binstubs' was binstubbing the 'make' command. that seems really strange..
<Yzguy> @diegoviola ^^
Azure has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Arnvald_ has joined #ruby
Arnvald has quit [Read error: Connection reset by peer]
Azure has quit [Remote host closed the connection]
gusrub has joined #ruby
pwnd_nsfw has joined #ruby
<diegoviola> Yzguy: that just gives me false back
spt0 has joined #ruby
Moosashi has quit [Quit: Moosashi]
zarubin has joined #ruby
<Yzguy> i might have mssed up the !.nill thing
crazydiamond has quit [Ping timeout: 246 seconds]
<Yzguy> i've used a guard clause like twice before
bronson has joined #ruby
arooni has quit [Ping timeout: 264 seconds]
<Yzguy> yeah take out the !
nbdy has joined #ruby
avahey has joined #ruby
Arnvald_ has quit [Read error: Connection reset by peer]
Arnvald has joined #ruby
<diegoviola> Yzguy: that won't work either
symm- has quit [Ping timeout: 256 seconds]
<diegoviola> undefined method
spuk has joined #ruby
PaulCapestany has quit [Quit: .]
<diegoviola> Yzguy: I'll just use a if else block
zarubin has quit [Ping timeout: 272 seconds]
RegulationD has quit [Ping timeout: 250 seconds]
ur5us has quit [Read error: No route to host]
ur5us has joined #ruby
PaulCapestany has joined #ruby
yfeldblum has quit [Remote host closed the connection]
Azure has joined #ruby
wildlander has quit [Quit: Saliendo]
<Yzguy> ok, it shoulda worked though.
yfeldblum has joined #ruby
rubie has joined #ruby
<rubie> hi all: im getting unexpected behavior in the little script im writing, could someone take a look https://repl.it/B6ky
supermarin has quit [Remote host closed the connection]
devbug has joined #ruby
<diegoviola> Yzguy: maybe it's because I'm calling that helper method from my view so it has nothing to return to?
jimmybomb1 has joined #ruby
cdg has quit [Remote host closed the connection]
patdohere has joined #ruby
bronson has quit [Remote host closed the connection]
<diegoviola> actually
jimmybomb has quit [Ping timeout: 250 seconds]
<Yzguy> rubie i'm taking a look
devbug has quit [Ping timeout: 240 seconds]
<diegoviola> yeah the return doesn't work there
colleenmcguckin has quit []
fullofcaffeine has quit [Ping timeout: 240 seconds]
lacuna has quit [Remote host closed the connection]
djbkd has quit [Quit: My people need me...]
<rubie> Yzguy: thanks
jbrhbr has quit [Ping timeout: 272 seconds]
sarkis has quit [Ping timeout: 240 seconds]
sarkis has joined #ruby
fullofcaffeine has joined #ruby
<Yzguy> rubie its happening on line 14
<Yzguy> so somewhere in the function
<rubie> well i mutate it on line 24
<rubie> using #unshift
<rubie> but once it finishes the loop i would expect the value of test_word to be reset to word
<rubie> since we never mutate word
exadeci has quit [Quit: Connection closed for inactivity]
skweek has joined #ruby
denom has quit [Quit: leaving]
<Yzguy> right
<Yzguy> the shift is what is causing that h to go away
<Yzguy> im still trying to understand why
uberjar has joined #ruby
p1k has quit [Quit: Leaving]
maneco has left #ruby ["WeeChat 1.3"]
Moosashi has joined #ruby
<uberjar> Hi. For some reason after a fresh install issuing the following command just hangs for me.. what could be the problem ? gem install bundler
jessemcgilallen has joined #ruby
<Radar> uberjar: how did you do the install?
fullofca_ has joined #ruby
baweaver has joined #ruby
floatingpoint has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<uberjar> Radar: well for some reason, you know how it it can be.. this just started working all of a sudden
<Radar> uberjar: Yup.
howdoicomputer has quit [Ping timeout: 272 seconds]
<uberjar> so how about I just come back if it happens again… maybe some kind of odd network glitch
<uberjar> chers
uberjar has quit [Quit: uberjar]
maloik has joined #ruby
fullofcaffeine has quit [Ping timeout: 256 seconds]
houhoulis has quit [Remote host closed the connection]
Aerillith has quit [Quit: Leaving]
tahon has joined #ruby
Moosashi has quit [Quit: Moosashi]
dlitvak has joined #ruby
dlitvak has quit [Remote host closed the connection]
maloik has quit [Ping timeout: 240 seconds]
Moosashi has joined #ruby
<nerium> Is there a way to list all classes in a folder?
ScottNYC has quit [Quit: WeeChat 1.3]
TyroneBlack has joined #ruby
chouhoulis has joined #ruby
rsc___ has quit [Quit: rsc___]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
TyroneBlack has left #ruby [#ruby]
jgpawletko has joined #ruby
diegoviola has quit [Ping timeout: 264 seconds]
diego1 has joined #ruby
diego1 has quit [Changing host]
diego1 has joined #ruby
diego1 is now known as diegoviola
lacuna has joined #ruby
<Radar> nerium: no
howdoicomputer has joined #ruby
<Radar> ?xy
<ruboto> it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
sucks has quit [Ping timeout: 272 seconds]
TomPeed has joined #ruby
chouhoulis has quit [Ping timeout: 250 seconds]
Moosashi has quit [Quit: Moosashi]
blackmesa has joined #ruby
dfockler has quit [Ping timeout: 272 seconds]
sucks has joined #ruby
cjbottaro has joined #ruby
triangles has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
howdoicomputer has quit [Ping timeout: 272 seconds]
ramfjord_ has quit [Ping timeout: 250 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<nerium> @Radar I
<Radar> nerium
<nerium> @Radar I need to access and call all classes that exists in a folder
<nerium> I guess I can load all classes, that’s simple and then just look at all existing classes in that scope
<jhass> we should just make a bot that we can point at some one and it will reply with why? the next five times they say something
brendan- has joined #ruby
<nerium> jhass: Are you refering to me?
sucks has quit [Remote host closed the connection]
<jhass> not just
Spami has quit [Quit: This computer has gone to sleep]
<nerium> I’ll try to explain it a bit better then.
<nerium> I’m building something similuar to homebrew where each class represents a lib, like ”ps”. I need to call each class in the lib folder as each lib/class encapsulates its own tests
sucks has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<nerium> That’s why I need to list all classes in a folder
Moosashi has joined #ruby
devbug has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jgpawletko has quit [Quit: jgpawletko]
<Yzguy> rubie word is definitely getting changed
<rubie> where?
<Yzguy> not sure yet, but I'm doing some crazy "puts word = #{word}" everywhere
<Yzguy> and it has different values during the loop
<rubie> hah
<Radar> nerium: example code please kthx
<Yzguy> but nothing is directly touching the "word" variable
<Yzguy> blowing my mind
<rubie> unless test_word is being passed by reference
<rubie> like test_word is just a reference to word
<baweaver> nerium: why not just do something sane like use YML/JSON for packages and make a parser
* Radar opens mouth to sigh, gives up entirely on everything
<nerium> baweaver: What do you mean?
Moosashi has quit [Quit: Moosashi]
<baweaver> he meant your code
<baweaver> not homecrew
<baweaver> brew*
TheHodge has quit [Quit: Connection closed for inactivity]
tahon has quit [Remote host closed the connection]
<Radar> p.s. Forumla probably defines an inherited callback
JDiPierro has quit [Remote host closed the connection]
tonko has joined #ruby
<Radar> This is the whole "Radar is being silent on this because there is no actual code and he doesn't want to look like an idiot suggesting a fix for a non-issue"
<nerium> @Radar What did you expect? I not sure what code I could post that would be relevant
<Radar> "Please help me with my code issue" "Please show us some code" "I don't know what code to show"
maloik has joined #ruby
<Radar> So you don't understand your issue fully, then?
<Radar> I am literally exhausted by this roundabout dance that happens with code every day
<Yzguy> rubie when i = 1, right after testing = check_word(test_word, i)
<nerium> I do. I just need to list all classes in a folder. That would solve my problem.
<Radar> I guess something like that MIGHT womrk.
tonko has quit [Ping timeout: 252 seconds]
<Yzguy> is when "word" changes to "ello"
ap4y has joined #ruby
<nerium> Radar: Aha, that would be even better
<rubie> Yzguy: so it happens in the helper method?
<Yzguy> yeah something happening in that and returning is changing word
<rubie> Yzguy: maybe something to do with #shift
bronson has joined #ruby
<Yzguy> yeah I'm thinking so
<Radar> nerium: I missed the subclasses method, but it works for me.
<Yzguy> its just super weird because no where does "word" explicity get reassigned
<Radar> nerium: Anything that inherits from that Formula class will be available in subclasses, and then you'll have access to each of those subclasses that way.
<nerium> Radar: I think I can use that. Thanks
<Radar> np.
claw has joined #ruby
devbug has quit [Ping timeout: 244 seconds]
maloik has quit [Ping timeout: 250 seconds]
jhonglim has quit [Quit: jhonglim]
colegatron has quit [Ping timeout: 250 seconds]
<Yzguy> rubie yeah when rearrange gets assigned the second time its ["h"], then word is ["e","l","l","o"]
<rubie> Yzguy: maybe once we are in the while loop and test_word is assigned to word, ruby will not reach out of the while loop scope to reassign word. It will just re assign test_word to whatever test_word was in the previous iteration of the while loop
<Yzguy> well check_word doesn't know anything about "word", its out of scope
<rubie> but word follows test_word around
jetpackjoe has quit [Quit: Textual IRC Client: www.textualapp.com]
<rubie> Yzguy: just a guess
<rubie> Yzguy: if you change test_word = word to test_word = word1.split("") it works
claw has quit [Ping timeout: 256 seconds]
<rubie> lol not sure why
<Yzguy> i feel like it's some a = b, b = c, so a = c type thing
<rubie> yea
jessemcgilallen has quit [Quit: jessemcgilallen]
<Yzguy> i'm stumped haha
<rubie> can anyone help explain us this strange behavior https://repl.it/B6ky
maloik has joined #ruby
<Yzguy> ^^ when i = 1, right after line 14, "word" changes from "hello" to "ello"
claw has joined #ruby
<Yzguy> but no where is "word" actually reassigned
cwong_on_irc has joined #ruby
braincrash has quit [Quit: bye bye]
DurstBurger has joined #ruby
krzkrzkrz has joined #ruby
ap4y has quit [Quit: WeeChat 1.3]
ap4y has joined #ruby
colegatron has joined #ruby
maloik has quit [Ping timeout: 272 seconds]
puria has joined #ruby
Rodya_ has quit [Remote host closed the connection]
<baweaver> >> a = 'hello'; b = 'llohe'; a.chars.sort == b.chars.sort
<ruboto> baweaver # => true (https://eval.in/481938)
<baweaver> overcomplicating things
DanKnox is now known as DanKnox[away]
braincrash has joined #ruby
<rubie> baweaver: right, but were just trying to figure out whats going on
<Yzguy> rubie its the test_word.shift(i)
<rubie> i think its the assignment test_word = word
<Yzguy> no
<rubie> so the second loop around test_word = test_word
<Yzguy> nope
supermarin has joined #ruby
<Yzguy> second loop, when it hits rearrange = test_word.shift(1), rearrange gets the ["h"], but at the same time test_word changes to "ello"
<Yzguy> not sure how to reassigns back up to word, still don't understand that part
<baweaver> shift mutates things
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ap4y has quit [Quit: WeeChat 1.3]
<baweaver> >> a = 'string'; a.shift; a
<ruboto> baweaver # => undefined method `shift' for "string":String (NoMethodError) ...check link for more (https://eval.in/481939)
<blub> variables are names for objects, but they aren't the object itself
<blub> test_word = word makes both names point to the same object
<blub> so mutating one of them mutates the other
ap4y has joined #ruby
<blub> ie with a method like shift
<Yzguy> ahhh
<Yzguy> that makes sense
code has joined #ruby
<blub> but then if after you said test_word = 'foo', word would still be whatever it was
zast has joined #ruby
<blub> because you would just be making the name test_word point to the object 'foo' instead
NotTheFBI has quit [Disconnected by services]
Moosashi has joined #ruby
patdohere has quit [Ping timeout: 272 seconds]
TheHackOps has joined #ruby
underplank has joined #ruby
<Yzguy> oh and doing like test_word = word1.split("") points test_word to a new array object
<blub> right
chouhoulis has joined #ruby
<Yzguy> very interesting
<rubie> so why wouldn't test_word = (test_word + rearrange).join("") not work
<rubie> in #check_word
Yzguy has quit [Quit: Zzz...]
chouhoulis has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
<blub> i dont see that
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
lacuna has quit [Remote host closed the connection]
devoldmx has joined #ruby
yfeldblum has quit [Remote host closed the connection]
gix has quit [Ping timeout: 245 seconds]
blackmesa has quit [Ping timeout: 256 seconds]
Moosashi has quit [Quit: Moosashi]
sucks has quit [Remote host closed the connection]
gix has joined #ruby
sucks has joined #ruby
symbol has joined #ruby
WizJin has quit [Excess Flood]
supermarin has quit [Remote host closed the connection]
mtmcfarl has joined #ruby
hahuang65 has quit [Ping timeout: 264 seconds]
jimmybomb2 has joined #ruby
lacuna has joined #ruby
jimmybomb has joined #ruby
jimmybomb1 has quit [Ping timeout: 256 seconds]
tahon has joined #ruby
Aasha has joined #ruby
Rodya_ has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
WizJin has joined #ruby
jimmybomb2 has quit [Ping timeout: 272 seconds]
berserk_ren has joined #ruby
Wsewolod has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby
tahon has quit [Remote host closed the connection]
tahon has joined #ruby
ICantCook has joined #ruby
symbol has quit [Quit: WeeChat 1.1]
hadees has quit [Quit: hadees]
jpfuentes2 has quit [Ping timeout: 256 seconds]
mahk has joined #ruby
molay has joined #ruby
<diegoviola> do you guys use () in your if?
iateadonut has joined #ruby
<blub> no
<diegoviola> s/guys/folks/
underplank has quit [Quit: underplank]
<molay> why would an array sort give me something like this? https://gist.github.com/holaymolay/24c25d2bde8f41d7fc00#file-gistfile1-txt
underplank has joined #ruby
sh4d0wD has quit [Quit: Leaving.]
<molay> it doesn't make sense why it would do that
ap4y has quit [Quit: WeeChat 1.3]
Arnvald has quit [Remote host closed the connection]
<blub> it looks sorted ?
gusrub_ has joined #ruby
<blub> oh nvm
<molay> yeah.. lol. it is until it isn't.. kinda weird
ap4y has joined #ruby
<blub> how did you get it
<diegoviola> Radar: cool
<diegoviola> yeah this is not python
<molay> blub: its an array of rays... wavlist.sort_by! {|e| e[0]}
<molay> blub: its an array of arrays
gusrub has quit [Ping timeout: 256 seconds]
devoldmx has quit [Remote host closed the connection]
crazydiamond has joined #ruby
<molay> diegoviola: its better than python. At least it was for me
djbkd has joined #ruby
<diegoviola> molay: yeah
maloik has joined #ruby
<molay> diegoviola: There were programming concepts that totally eluded me in python... but with ruby they make total sense
WizJin has quit [Excess Flood]
kfrz has joined #ruby
<molay> diegoviola: don't get me wrong, I had a blast with python... but is so much more comprehendable
<molay> diegoviola: but ruby is so much more comprehendable
darkf has joined #ruby
maloik has quit [Ping timeout: 256 seconds]
<havenwood> molay: There are folk in the #ruby channel... :P
<molay> havenwood: lol. hard to know that if nobody responds
WizJin has joined #ruby
freerobby has quit [Quit: Leaving.]
underplank has quit [Quit: underplank]
berserk_ren has quit [Quit: =^.^=]
TheHackOps has quit [Disconnected by services]
NotTheFBI has joined #ruby
underplank has joined #ruby
<molay> oh forget it
Bloomer has joined #ruby
<havenwood> molay: It's not sorted.
<havenwood> molay: Have a gist of the code that created the Array?
rsc___ has joined #ruby
krzkrzkrz has quit [Ping timeout: 250 seconds]
<molay> havenwood: nevermind. i figured out why...
<havenwood> molay: Aha. :)
<molay> havenwood: the cause... pure stupidity
<havenwood> molay: Figured it was the first 145 sorted with more sorted appended.
<molay> havenwood: yes that's exactly what it was
chouhoulis has joined #ruby
<molay> havenwood: thanks for the push in the right direction!
rubie has quit [Remote host closed the connection]
kfrz has quit [Quit: Leaving.]
_stu_ has quit [Quit: _stu_]
codecop has joined #ruby
diego1 has joined #ruby
diego1 has quit [Changing host]
diego1 has joined #ruby
diegoviola is now known as Guest721
diego1 is now known as diegoviola
rsc___ has quit [Quit: rsc___]
vdamewood has quit [Ping timeout: 245 seconds]
Guest721 has quit [Ping timeout: 272 seconds]
rsc___ has joined #ruby
chouhoulis has quit [Ping timeout: 256 seconds]
blackmesa has joined #ruby
hellschreiber_ has quit []
ayonkhan has joined #ruby
diegoviola has quit [Ping timeout: 256 seconds]
gusTester has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
DavidDudson has joined #ruby
gusTester has quit [Client Quit]
boxofrox has quit [Ping timeout: 245 seconds]
lubarch has joined #ruby
radgeRayden_ has quit [Ping timeout: 250 seconds]
diego1 has joined #ruby
<tejasmanohar> is there anything like lib2git for homebrew? https://github.com/Homebrew/homebrew
diego1 has quit [Changing host]
diego1 has joined #ruby
diego1 is now known as diegoviola
underplank has quit [Quit: underplank]
cwong_on_irc has quit [Quit: Leaving.]
<tejasmanohar> like a way to programmatically interact with homebrew (on the user's system) without just executing `brew ...` commands and parsing their output with pattern matching?
kfrz has joined #ruby
<tejasmanohar> i see it is a ruby project but dont see a gem or anything i can plug into
bb010g has joined #ruby
cubicme has joined #ruby
DurstBurger has quit [Ping timeout: 240 seconds]
underplank has joined #ruby
lubarch has quit [Client Quit]
lubarch has joined #ruby
sucks has quit [Read error: Connection reset by peer]
hahuang65 has joined #ruby
phillips1012 has quit [Ping timeout: 272 seconds]
moeSeth has joined #ruby
diegoviola has quit [Ping timeout: 272 seconds]
cryocaustik has joined #ruby
CrazyEddy has quit [Remote host closed the connection]
dmcp has quit [Quit: Disconnecting...]
hahuang65 has quit [Ping timeout: 240 seconds]
rsc___ has quit [Quit: rsc___]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diego1 has joined #ruby
dimik has joined #ruby
diego1 has quit [Changing host]
diego1 has joined #ruby
diego1 is now known as diegoviola
bronson has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 250 seconds]
devoldmx has joined #ruby
cwong_on_irc has joined #ruby
bronson has joined #ruby
cwong_on_irc has quit [Client Quit]
phillips1012 has joined #ruby
supermarin has joined #ruby
favadi has joined #ruby
tahon has quit [Remote host closed the connection]
mahk has quit [Ping timeout: 256 seconds]
rubie has joined #ruby
devoldmx has quit [Remote host closed the connection]
mtmcfarl has quit [Remote host closed the connection]
cryocaustik has quit [Quit: went to chop soup]
tildes has joined #ruby
Arnvald has joined #ruby
<cubicme> hi, is there any reason that calling a lot of IO.popen {} should cause memory/resource leak? I’m caliing tiny script in my server process, and after a while it’s consuming all of the memory and I get “Cannot allocate memory”
sarkis has quit [Ping timeout: 264 seconds]
AlexRussia has quit [Ping timeout: 260 seconds]
Arnvald has quit [Remote host closed the connection]
Arnvald_ has joined #ruby
bubbys has quit [Ping timeout: 246 seconds]
kfrz has quit [Quit: Leaving.]
S01780 has joined #ruby
IrishGringo has quit [Ping timeout: 272 seconds]
supermarin has quit [Remote host closed the connection]
rakm has joined #ruby
jud^ has joined #ruby
skade has joined #ruby
sarkis has joined #ruby
bronson has quit [Remote host closed the connection]
lubarch has quit [Quit: leaving]
rakm has quit [Client Quit]
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
htmldrum has quit [Ping timeout: 244 seconds]
sarkis has quit [Ping timeout: 250 seconds]
Arnvald_ has quit []
Arnvald has joined #ruby
sapslaj has joined #ruby
supermarin has joined #ruby
bubbys has joined #ruby
last_staff has joined #ruby
otherj has joined #ruby
sarkis has joined #ruby
rattatmatt has joined #ruby
tahon has joined #ruby
EasyCo has quit [Quit: Connection closed for inactivity]
tahon has quit [Remote host closed the connection]
chouhoulis has joined #ruby
tahon has joined #ruby
FatKuntz has joined #ruby
FatKuntz has left #ruby [#ruby]
sarkis has quit [Ping timeout: 240 seconds]
leat has joined #ruby
rubie has quit [Remote host closed the connection]
edwinvdg_ has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
mahk has joined #ruby
chouhoulis has quit [Ping timeout: 250 seconds]
tahon has quit [Ping timeout: 250 seconds]
George|Orwell has joined #ruby
George|Orwell has left #ruby [#ruby]
blackmesa has joined #ruby
sarkis has joined #ruby
jud^ is now known as jud
jud has quit [Changing host]
jud has joined #ruby
underplank has quit [Quit: underplank]
sarkis has quit [Ping timeout: 250 seconds]
blackmesa has quit [Ping timeout: 272 seconds]
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
duckpuppy has joined #ruby
sarkis has joined #ruby
yqt has quit [Ping timeout: 240 seconds]
bronson has joined #ruby
sarkis has quit [Ping timeout: 240 seconds]
yardenbar has joined #ruby
ur5us has joined #ruby
Moosashi has joined #ruby
Oog has joined #ruby
ur5us has quit [Remote host closed the connection]
RegulationD has joined #ruby
dionysus69 has joined #ruby
diegoviola has quit [Ping timeout: 240 seconds]
B1n4r10 has quit [Ping timeout: 240 seconds]
sarkis has joined #ruby
skade has quit [Ping timeout: 250 seconds]
dionysus69 has quit [Client Quit]
maloik has joined #ruby
RegulationD has quit [Ping timeout: 256 seconds]
dionysus69 has joined #ruby
trautwein has joined #ruby
tagrudev has joined #ruby
ta has quit [Remote host closed the connection]
sarkis has quit [Ping timeout: 264 seconds]
moeabdol has quit [Ping timeout: 256 seconds]
maloik has quit [Ping timeout: 250 seconds]
moeabdol has joined #ruby
lacuna has quit [Remote host closed the connection]
Arnvald has quit [Remote host closed the connection]
otherj has quit [Quit: .]
mahk has quit [Quit: mahk]
sarkis has joined #ruby
djbkd has quit [Quit: My people need me...]
ramfjord has joined #ruby
diegoviola has joined #ruby
jimmybomb has quit [Ping timeout: 250 seconds]
lacuna has joined #ruby
Arnvald has joined #ruby
lacuna has quit [Read error: Connection reset by peer]
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
christiandsg has quit [Remote host closed the connection]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
tildes has quit [Ping timeout: 272 seconds]
bubbys has quit [Ping timeout: 244 seconds]
bubbys has joined #ruby
duckpuppy has quit [Ping timeout: 256 seconds]
sarkis has quit [Ping timeout: 250 seconds]
diegoviola has quit [Quit: WeeChat 1.3]
cornerman has quit [Ping timeout: 260 seconds]
sandstrom has joined #ruby
ur5us has joined #ruby
ohaibbq has joined #ruby
cornerman has joined #ruby
tesuji has joined #ruby
amclain has quit [Quit: Leaving]
sarkis has joined #ruby
Arnvald has quit [Remote host closed the connection]
tahon has joined #ruby
sarkis has quit [Ping timeout: 272 seconds]
Jet4Fire has joined #ruby
dimik has quit [Ping timeout: 250 seconds]
lxsameer has quit [Ping timeout: 244 seconds]
naftilos76 has joined #ruby
B1n4r10 has joined #ruby
tahon has quit [Ping timeout: 240 seconds]
chouhoulis has joined #ruby
anisha has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
jbrhbr has joined #ruby
Emmanuel_Chanel has joined #ruby
maloik has joined #ruby
devoldmx has joined #ruby
chouhoulis has quit [Ping timeout: 250 seconds]
roshanavand has joined #ruby
kmckelvin has quit [Ping timeout: 245 seconds]
blackmesa has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
roshanavand has quit [Remote host closed the connection]
maloik has quit [Ping timeout: 240 seconds]
roshanavand has joined #ruby
devoldmx has quit [Ping timeout: 250 seconds]
naftilos76 has quit [Ping timeout: 240 seconds]
ur5us has quit [Remote host closed the connection]
sarkis has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
ap4y has quit [Quit: WeeChat 1.3]
svoop has joined #ruby
djbkd has joined #ruby
aganov has joined #ruby
andikr has joined #ruby
lxsameer has joined #ruby
sarkis has quit [Ping timeout: 240 seconds]
B1n4r10 has quit [Ping timeout: 250 seconds]
ta has joined #ruby
djbkd has quit [Ping timeout: 256 seconds]
nhhagen has joined #ruby
CrazyEddy has joined #ruby
Emmanuel_Chanel has joined #ruby
nhhagen has quit [Client Quit]
ur5us has joined #ruby
atomical has joined #ruby
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
svoop has quit [Quit: Textual IRC Client: www.textualapp.com]
minimalism has quit [Quit: leaving]
duckpuppy has joined #ruby
jas02 has joined #ruby
Moosashi has quit [Quit: Moosashi]
mahk has joined #ruby
nerium has quit [Quit: nerium]
saneax_AFK is now known as saneax
SolarSailor has joined #ruby
karapetyan has joined #ruby
code has quit [Quit: Leaving]
InvGhost has joined #ruby
ta has quit [Remote host closed the connection]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
googleAPIsucks has joined #ruby
tjad has joined #ruby
yfeldblum has quit [Remote host closed the connection]
therealcode has joined #ruby
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<S01780> Morning. I'm trying to install a github program using RoR and bundler. Upon running install bundle in the file, it says "error, cannot find pg_conf," which is from the PostgreSQL install.
<S01780> I installed PostGre using sudo, would that mess up the path?
jgt2 has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
therealcode has quit [Client Quit]
rsc___ has joined #ruby
rsc___ has quit [Client Quit]
googleAPIsucks has quit [Quit: Page closed]
muON has joined #ruby
rsc___ has joined #ruby
<muON> hi, is anyone familiar with the google drive API here?
<muON> I'm having some trouble discerning the difference between oauth2 creds and implementing service accounts
<muON> main issue is that I can only refresh oauth once an hour and only 5 times a day, and i get auth errors if it refreshes after an hour which is inevitable
lacuna has quit [Remote host closed the connection]
glenny has joined #ruby
Bloomer has quit []
maloik has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
Oog has quit []
juddey has quit [Ping timeout: 256 seconds]
edwinvdgraaf has joined #ruby
norc_ has joined #ruby
symm- has joined #ruby
ohaibbq has quit [Quit: Leaving...]
shredding has joined #ruby
kmckelvin has joined #ruby
supermarin has quit [Remote host closed the connection]
aufi has joined #ruby
SCHAAP137 has joined #ruby
TomyWork has joined #ruby
amincd has joined #ruby
JiYu has left #ruby [#ruby]
brunto has joined #ruby
<amincd> Hi, if I assign the value of str to str2, then modify str2 with sub!(pattern, replacement), why does the value of str also change?
zeroDivisible has quit [Quit: WeeChat 1.3]
Unicorn| has quit [Quit: Connection closed for inactivity]
chouhoulis has joined #ruby
sulky has quit [Ping timeout: 272 seconds]
ta has joined #ruby
gusrub has joined #ruby
gusrub has quit [Client Quit]
lkba has joined #ruby
sulky has joined #ruby
Musashi007 has joined #ruby
DavidDudson has joined #ruby
sandstrom has joined #ruby
muON has quit [Quit: Page closed]
chouhoulis has quit [Ping timeout: 272 seconds]
gusrub_ has quit [Ping timeout: 256 seconds]
blackmesa has joined #ruby
Musashi007 has quit [Quit: Musashi007]
jgt2 has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 250 seconds]
sarkis has joined #ruby
SolarSailor has quit [Quit: Textual IRC Client: www.textualapp.com]
maloik has quit [Ping timeout: 240 seconds]
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
<amincd> ok, so ruby is pass-by-reference
sarkis has quit [Ping timeout: 256 seconds]
peterhil_ has joined #ruby
maloik has joined #ruby
blackmesa has joined #ruby
<norc_> amincd: No
<norc_> amincd: Technically Ruby is pass by value only.
<norc_> But that terminology doesn't work well under Ruby due to the way things work.
Spami has joined #ruby
sarkis has joined #ruby
<norc_> >> def foo(bar) bar = 'a' end; quux = 'b'; foo(quux); p quux
<ruboto> norc_ # => "b" ...check link for more (https://eval.in/482010)
<norc_> ^^ amincd
ramfjord has quit [Ping timeout: 240 seconds]
sarkis has quit [Ping timeout: 256 seconds]
Hounddog has joined #ruby
zast has left #ruby [#ruby]
<norc_> >> require 'ostruct'; o = OpenStruct.new; def foo(a) a.foo = 1 end; foo(o); puts o;
<ruboto> norc_ # => #<OpenStruct foo=1> ...check link for more (https://eval.in/482017)
<norc_> Things get more fun now though.
<norc_> The thing is you are passing objects by value.
jud has quit [Quit: Leaving]
<norc_> Which means you can directly modify them
sarkis has joined #ruby
duckpupp1 has joined #ruby
duckpuppy has quit [Ping timeout: 250 seconds]
TheHodge has joined #ruby
duckpupp1 is now known as duckpuppy
Rodya_ has quit [Remote host closed the connection]
mooe has joined #ruby
steffkes has joined #ruby
<amincd> isn't "passing objects by value" the same as passing by reference?
duckpuppy has quit [Client Quit]
<amincd> ah nevermind, I don't know the terminology well enough to even comment
duckpuppy has joined #ruby
sarkis has quit [Ping timeout: 256 seconds]
peterhil_ has quit [Ping timeout: 240 seconds]
bronson has quit [Remote host closed the connection]
<norc_> amincd: Ruby is pass by value, but the value passed is a reference.
<norc_> Think of it that way.
yfeldblum has quit [Remote host closed the connection]
<amincd> norc_: I see
skade has joined #ruby
<amincd> norc_: I don't understand the distinction well enough to fully grok this yet, but that helps
yfeldblum has joined #ruby
saneax is now known as saneax_AFK
<norc_> amincd: Pass by reference would be something like void foo(int &bar) {} in c++
<amincd> right..
<amincd> and pass value as reference?
<norc_> Where as void foo(int *bar) {} is pass by value (but the value is a reference)
tvw has joined #ruby
<norc_> Since you are passing a pointer which really is just a memory address.
Mon_Ouie has quit [Ping timeout: 240 seconds]
<norc_> Which is just a value itself.
sarkis has joined #ruby
<norc_> amincd: So when you pass an argument to a ruby function it creates a local variable and stores that object in there. If you assign a new object, you are just changing the content of that variable.
mark4 has joined #ruby
joonty has joined #ruby
<norc_> amincd: Try to inspect the whole thing with #object_id - that should make things clearer.
<amincd> so in ruby, assigning var1 to var2, means assigning var1's object id to var2
<amincd> *assigning the value of var
peterhil_ has joined #ruby
jgt2 has joined #ruby
Rumbles has joined #ruby
<norc_> amincd: In a nutshell, yes. Remember we also have op= though, but that is just a method that happens to look the same.
<norc_> Errr, nevermind that.
sarkis has quit [Ping timeout: 240 seconds]
<norc_> op[]= I meant. :)
<norc_> or generally assignment operator.
<amincd> ok thanks, I think I get it. I still don't fully understand how a pass-by-reference assignment would be different, in practice, from a pass by reference-of-value assignment which happens in Ruby
<norc_> >> def foo(bar); bar.object_id; end; a = ""; puts "%d %d" % [a.object_id, foo(a)]
<ruboto> norc_ # => 545800120 545800120 ...check link for more (https://eval.in/482021)
<norc_> err
<norc_> >> def foo(bar) bar = 'a' end; quux = 'b'; foo(quux); p quux
<norc_> That one.
<norc_> >> def foo(bar) bar = 'a' end; quux = 'b'; foo(quux); p quux
<ruboto> norc_ # => "b" ...check link for more (https://eval.in/482022)
rsc___ has quit [Quit: rsc___]
<norc_> If ruby was pass by reference, then the method foo would have changed the content of quux to "a"
<adaedra> Hello
<amincd> norc_: yeah I see..
<norc_> Hi adaedra
<adaedra> ruby pass by reference.
<adaedra> well, it pass a reference, if you prefer.
<norc_> ruby passes reference by value. important distinction I think. :P
roshanavand has quit [Remote host closed the connection]
<norc_> for the case mentioned above
<adaedra> yeah, but still to take in mind. It's not full copy.
<norc_> yup. we covered that a while ago :)
<adaedra> great
<norc_> amincd: Things get a bit messy once you understand how Ruby shallow copies objects.
sarkis has joined #ruby
<norc_> Or rather they become clear again.
cubicme has quit [Ping timeout: 272 seconds]
<norc_> Will avoid some nasty surprises in the long run too.
Arnvald has joined #ruby
ayonkhan has quit [Quit: Textual IRC Client: www.textualapp.com]
[k- has joined #ruby
peterhil_ has quit [Ping timeout: 256 seconds]
DanKnox[away] has quit [Ping timeout: 260 seconds]
ramfjord has joined #ruby
sarkis has quit [Ping timeout: 256 seconds]
chouhoulis has joined #ruby
DanKnox[away] has joined #ruby
felixal has quit [Ping timeout: 250 seconds]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DavidDudson has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
riffraff has joined #ruby
devoldmx has joined #ruby
DavidDudson has quit [Client Quit]
chouhoulis has quit [Ping timeout: 250 seconds]
skweek has quit [Ping timeout: 264 seconds]
marr has joined #ruby
Aasha is now known as Wsewolod
ramfjord has quit [Ping timeout: 250 seconds]
devoldmx has quit [Ping timeout: 240 seconds]
tvw has quit []
rsc___ has joined #ruby
rsc___ has quit [Client Quit]
moeabdol has quit [Quit: WeeChat 1.3]
<amincd> thanks for your help norc_
amincd has quit [Quit: Page closed]
joonty has quit [Quit: joonty]
djbkd has joined #ruby
peterhil_ has joined #ruby
troulouliou_div2 has joined #ruby
rsc___ has joined #ruby
mikecmpbll has joined #ruby
nbdy has quit [Quit: Textual IRC Client: www.textualapp.com]
<Cork> anyone know a way to handle exitcode and stderr from Shell.new executions?
djbkd has quit [Ping timeout: 256 seconds]
Cantaberry has quit [Ping timeout: 260 seconds]
skade has quit [Quit: Computer has gone to sleep.]
bweston92 has joined #ruby
joonty has joined #ruby
peterhil_ has quit [Ping timeout: 256 seconds]
AlexRussia has joined #ruby
sarkis has joined #ruby
phillips1012 has quit [Ping timeout: 240 seconds]
nkts_ is now known as marius
ur5us has quit [Remote host closed the connection]
rsc___ has quit [Quit: rsc___]
rodfersou has joined #ruby
InvGhostt has joined #ruby
<sami> Hi, I'm trying to write a ruby gem. I have a class within my module for block configuration and trying to use the config, configured in what ever script/rails in another class in the same module. Anyone have any experience in that? Happy to post a couple of examples.
<ljarvis> sami: probably lots of people, do you have a question?
sarkis has quit [Ping timeout: 240 seconds]
Averna has joined #ruby
<sami> Well, can't post examples it seems :(. This is going to be a lot harder. Sitting on a highly resctricted wifi.
SegFaultAX has quit [Ping timeout: 260 seconds]
<sami> Hmm. Where do I begin :)
<ljarvis> the first problem, perhaps :)
colegatron has quit [Ping timeout: 272 seconds]
<sami> First of, my minitests works however, I can't access the "newly set" configuration from my other class.
<ljarvis> we're going to struggle without examples here I think
<sami> ljarvis: I'm basically copying this: http://juanitofatas.com/2015/05/19/rubygem-configuration-pattern/
<sami> Ok, let me try to explain without sounding stupid :)
InvGhost has quit [Ping timeout: 250 seconds]
Junaos has joined #ruby
<ljarvis> right ok makes sense, that's a common pattern
<sami> I have 2 classes in my gem. MyClass and Configuration. I have a script outside of this gem which I'm trying to use the gem.
<sami> Inside that script I'm trying to set a configuration (from the Configuration class)
mblagden has joined #ruby
miah has joined #ruby
alexherbo2 has joined #ruby
[k- has quit [Quit: -a- IRC for Android 2.1.23]
<sami> And from MyClass, I'm trying to use that configuration. However, the configuration does not get "forwarded" or set.
<sami> Does that make sense?
Musashi007 has joined #ruby
Sou|cutter has joined #ruby
<ljarvis> I think so yes
<sami> Basically, I want to set a URL from config to use in myclass.
<ljarvis> but I would probably need the code to reproduce it to see where the issue is
<sami> Basically, I want to set a URL _using_ config to use in myclass.
sarkis has joined #ruby
bmn has joined #ruby
<sami> ljarvis: Yeah I kind of guessed that.. Hmm.
<sami> I can tarball and sent it to you?
SegFaultAX has joined #ruby
<ljarvis> sure..
<ljarvis> ljjarvis+n@gmail.com
Rodya_ has joined #ruby
<sami> ljarvis: could we do a dcc?
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ljarvis> that wont work on this box i use for irc i'm afraid
<sami> Ah, ok :)
<ljarvis> you dont have any access to any code pasties online?
lkba has quit [Ping timeout: 272 seconds]
<sami> Let me try and email it. Is there a "+" in your address?
<ljarvis> indeed
<sami> ljarvis: Nope :(
<ljarvis> that sucks
<sami> Enterprise networking. hehe...
jbrhbr has quit [Quit: Leaving.]
<ljarvis> you do programming and dont have access to github? :)
<sami> Haha, exactly..
sarkis has quit [Ping timeout: 264 seconds]
<sami> ljarvis: sent..
<sami> You're welcome to virus scan and what ever you want :)
<ljarvis> the problem is in QRadar?
<flughafen> hey guys
<ljarvis> hey gurl
<sami> No, I have no connection to it yet.
aufi has quit [Remote host closed the connection]
bronson has joined #ruby
<sami> I'm testing the gem in QRadarTestGem dir.
Wsewolod has quit [Ping timeout: 250 seconds]
aufi has joined #ruby
phillips1012 has joined #ruby
Rodya_ has quit [Ping timeout: 272 seconds]
skweek has joined #ruby
<sami> Ohh, you mean the class?
rsc___ has joined #ruby
<sami> Sorry, yes, it in within the QRadar class :)
<sami> Sorry about that.
<ljarvis> right ok, the api_url is being set properly for me
<sami> If you run the test.rb?
<ljarvis> ah hold on im looking in offence now
<ljarvis> ah i see
tomphp has joined #ruby
<ljarvis> you're assigning the config values to constants before they're ever changed
sarkis has joined #ruby
skade has joined #ruby
<sami> Ohhhh!
<ljarvis> you need to use the full QRadar.configuration.xxx every time you use it
<ljarvis> (maybe setup a convenience method: def config; QRadar.configuration; end)
skade has quit [Client Quit]
Moosashi has joined #ruby
<sami> ljarvis: Thank you!!
bronson has quit [Ping timeout: 256 seconds]
yfeldblum has quit [Ping timeout: 250 seconds]
<ljarvis> np :)
colegatron has joined #ruby
sarkis has quit [Ping timeout: 250 seconds]
blackmesa has quit [Ping timeout: 272 seconds]
roshanavand has joined #ruby
huyderman has joined #ruby
Musashi007 has quit [Quit: Musashi007]
<sami> Now I just need to figure out how to auth with headers in Faraday :)
peterhil_ has joined #ruby
mikecmpbll has quit [Ping timeout: 272 seconds]
<ljarvis> your basic_auth call should handle that
yfeldblum has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
duncannz has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 240 seconds]
roshanavand has quit [Ping timeout: 272 seconds]
havenn has joined #ruby
havenn has joined #ruby
pipework has joined #ruby
spt0 has quit [Read error: Connection reset by peer]
SOLDIERz has joined #ruby
havenn is now known as havenwood
rsc___ has quit [Quit: rsc___]
sarkis has joined #ruby
Eiam has quit [Ping timeout: 260 seconds]
rsc___ has joined #ruby
ajb has joined #ruby
rikkipitt has joined #ruby
greister has quit [Quit: WeeChat 1.3]
Nilium has joined #ruby
greister has joined #ruby
toretore has joined #ruby
chouhoulis has joined #ruby
Arnvald has quit [Remote host closed the connection]
Moosashi has quit [Quit: Moosashi]
azgil has joined #ruby
ebertx has joined #ruby
sarkis has quit [Ping timeout: 264 seconds]
djbt has joined #ruby
<rikkipitt> hey guys, what's a good way of accessing "question" name in this json response according to the answer? https://gist.github.com/rikkipitt/0ee61a858db9268a0b3d
yqt has joined #ruby
Moosashi has joined #ruby
blackmesa has joined #ruby
<rikkipitt> It's hard to explain, but is there an easy way to merge these arrays by key/value to easily get the answers question name?
chouhoulis has quit [Ping timeout: 240 seconds]
mahk has quit [Quit: mahk]
Peg-leg has joined #ruby
mahk has joined #ruby
AlphaAtom has joined #ruby
Moosashi has quit [Client Quit]
<ljarvis> that's not valid json
blackmesa has quit [Ping timeout: 244 seconds]
sarkis has joined #ruby
ldnunes has joined #ruby
duckpuppy has quit [Ping timeout: 240 seconds]
Moosashi has joined #ruby
<ljarvis> anyway, something like this would work https://gist.github.com/leejarvis/0cc2762546c36891abb8
<ljarvis> rikkipitt: ^
[k- has joined #ruby
spt0 has joined #ruby
moeSeth has quit [Quit: Connection closed for inactivity]
sarkis has quit [Ping timeout: 240 seconds]
Moosashi has quit [Client Quit]
<rikkipitt> thanks ljarvis, that looks good!
<rikkipitt> i'll try and adapt it to work in my case
<norc_> [1,3,6,8] - Given a float f, I want to obtain the number from the array that is the next one in descending order. Is this doable in a compact one liner?
<norc_> (i.e. for 5.5 I want to get 3)
lubarch has joined #ruby
felixal has joined #ruby
naftilos76 has joined #ruby
<shevy> hmm
passerine has joined #ruby
RegulationD has joined #ruby
<norc_> >> def foo(f) [1,3,6,8].sort_by { |e| (f-e).abs }[0..1].sort.first end; f(5.5)
<ruboto> norc_ # => undefined method `f' for main:Object (NoMethodError) ...check link for more (https://eval.in/482084)
nfk|laptop has joined #ruby
<norc_> >> def foo(f) [1,3,6,8].sort_by { |e| (f-e).abs }[0..1].sort.first end; foo(5.5)
<ruboto> norc_ # => 3 (https://eval.in/482085)
<norc_> Think that is about as compact as it can get
mahk has quit [Quit: mahk]
karapetyan has quit []
Jet4Fire has quit [Ping timeout: 240 seconds]
linduxed_ has joined #ruby
joonty has quit [Quit: joonty]
platzhirsch has joined #ruby
RegulationD has quit [Ping timeout: 256 seconds]
rsc___ has quit [Quit: rsc___]
linduxed_ has quit [Client Quit]
puria has quit [Ping timeout: 250 seconds]
workmad3 has joined #ruby
joonty has joined #ruby
<ljarvis> what does the float have to do with it? is the array going to possibly contain floats?
<gregf_> >> [1,3,5,6,8].select{ |v| v < 5.5 }.last
<ruboto> gregf_ # => 5 (https://eval.in/482100)
<norc_> ljarvis: No, but the input is a float. Im just looking for a closest match
<blub> oh duh
<norc_> gregf_: Oh. oh...
<blub> why didnt i think of that
<gregf_> it needs to be sorted tho. kinda a binary search
<norc_> gregf_: Yeah that is fine. The list is presorted already. :)
mahk_ has joined #ruby
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<gregf_> haha, ruby and scala seem to do the same thing at times :|
<gregf_> List(1,4,2,5,6).sorted.filter(x => x < 5.5).last
<Caius> >> [1,3,5,6,8].each_slice(2) { |a, b| break(a) if b >= 5.5 }
<ruboto> Caius # => 5 (https://eval.in/482102)
arup_r has joined #ruby
<Caius> Not as short in characters, but saves building an intermediate array
<KrzaQ> I have trouble with this code: http://melpon.org/wandbox/permlink/0KHGzPLh4nIFLaO5 When I uncomment lines 75-77 I'm getting "wrong number of arguments (1 for 0) (ArgumentError)", but the same thing above and below doesn't trigger that warning :(
c355E3B has joined #ruby
Rodya_ has joined #ruby
<shevy> KrzaQ which method do you use
blackmesa has joined #ruby
mahk_ has quit [Remote host closed the connection]
sarkis has joined #ruby
joonty has quit [Quit: joonty]
<KrzaQ> shevy: I'm not sure what you mean.
<KrzaQ> I add methods to Calc as I read their definitions from stdin
NET||abuse has joined #ruby
puria has joined #ruby
<KrzaQ> calc.b is very simple, it returns some integer and it seems to work
Rodya_ has quit [Ping timeout: 250 seconds]
<shevy> you got the error above but you did not show the full error message
<KrzaQ> I uncommented lines 75-77
<KrzaQ> no other change at all
<KrzaQ> it was working before, but not now
sarkis has quit [Ping timeout: 256 seconds]
FooMunki has joined #ruby
drptbl has joined #ruby
ramfjord has joined #ruby
Ropeney has joined #ruby
Averna has quit [Ping timeout: 272 seconds]
<KrzaQ> prog.rb:75:in `block (2 levels) in <main>': wrong number of arguments (given 1, expected 0) (ArgumentError)
<KrzaQ> I don't see where I gave it an argument it wasn't expecting :|
mahk has joined #ruby
joonty has joined #ruby
joonty has quit [Client Quit]
sarkis has joined #ruby
<shevy> trust the ruby parser!
joonty has joined #ruby
skade has joined #ruby
sepp2k has joined #ruby
<KrzaQ> Sure
f4cl3y has joined #ruby
<KrzaQ> I just don't understand the message
dionysus69 has joined #ruby
<KrzaQ> I understand the words, but where is this superfluous argument?!
<shevy> >> def foo; end; foo 5
<ruboto> shevy # => wrong number of arguments (1 for 0) (ArgumentError) ...check link for more (https://eval.in/482107)
<shevy> I also don't understand the error message you showed, ruboto showed another error format
felixal has quit [Ping timeout: 256 seconds]
<KrzaQ> I do almost exactly the same thing in the case above and below
<KrzaQ> and it works
<shevy> well that is not true
<KrzaQ> I tried emptying the function body, but it still says something about an extra argument
<KrzaQ> how so?
<shevy> self.send($2.downcase, $1, $3)
f4cl3y has quit [Remote host closed the connection]
<shevy> self.send(text)
<shevy> how is this the same thing
<KrzaQ> I commented that out
<KrzaQ> still errors
<KrzaQ> the error is on the "calc.class.send(:define_method, line) do" line
favadi has joined #ruby
atom3 has joined #ruby
<shevy> so this method accepts how many arguments
sarkis has quit [Ping timeout: 256 seconds]
colli5ion has joined #ruby
Rickmasta has joined #ruby
<KrzaQ> 0
favadi has quit [Client Quit]
<KrzaQ> and I'm passing none
<KrzaQ> exactly as above and belo
<KrzaQ> s/belo/below
<shevy> btw do you use a special editor?
<KrzaQ> ST3
tahon has joined #ruby
<j416> KrzaQ: I wouldn't be surprised if you've tangled yourself in method redefinition hell; why do you need to define all those methods?
<shevy> I remember one... redcar or some other r* one, modified ruby code before evaluating
<KrzaQ> j416: doing advent of code, decided it would be nice to let ruby do all the work for me and parse the call graph
<KrzaQ> every line is defined only once
<shevy> KrzaQ can you put up a new pastie with the exact code that errors?
<shevy> ideally onto https://gist.github.com/ if you don't mind :D
shanemcd has quit [Ping timeout: 272 seconds]
<j416> KrzaQ: I see. Have fun :)
glenny has quit [Quit: Konversation terminated!]
ponga has joined #ruby
mahk has quit [Ping timeout: 250 seconds]
Rickmasta has quit [Ping timeout: 256 seconds]
chouhoulis has joined #ruby
sarkis has joined #ruby
tahon has quit [Ping timeout: 256 seconds]
rsc___ has joined #ruby
rsc___ has quit [Client Quit]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rsc___ has joined #ruby
devoldmx has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
Ox0dea has joined #ruby
<Ox0dea> [k-!
sarkis has quit [Ping timeout: 250 seconds]
skweek has quit [Ping timeout: 250 seconds]
<shevy> it's his ghost
<Ox0dea> Alas.
<shevy> he probably can not speak
<Ox0dea> Good.
<shevy> lol
brunto has quit [Ping timeout: 256 seconds]
roshanavand has joined #ruby
<Ox0dea> KrzaQ: Would you like to see my super-hackish "solution" for AoC #7?
devoldmx has quit [Ping timeout: 256 seconds]
krzkrzkrz has joined #ruby
<Ox0dea> Ooh!
<norc_> Here. Finally RubyVM can be abused completely.
<Ox0dea> Is this what I think it is?
<norc_> Yes.
dionysus69 has quit [Ping timeout: 240 seconds]
rikkipitt has quit [Remote host closed the connection]
<norc_> Ox0dea: https://eval.in/482114
<norc_> Example
<Ox0dea> norc_: How to go from ISeq to Proc?
<Ox0dea> Well, s/Proc/a callable/.
<norc_> Ox0dea: Check my eval.in
djbkd has joined #ruby
<Ox0dea> norc_: https://eval.in/482115
<norc_> mmm
puria has quit [Remote host closed the connection]
<KrzaQ> Ox0dea: not before I get my own to work :P
<Ox0dea> KrzaQ: Fair enough.
stamina has joined #ruby
bMalum has joined #ruby
NotTheFBI has quit [Read error: Connection reset by peer]
<norc_> Ox0dea: Looking at the vm code it does not seem possible at this point.
NotTheFBI has joined #ruby
<Ox0dea> What a tease.
djbkd has quit [Ping timeout: 256 seconds]
<Ox0dea> ISeq is general is where Ruby really loses the comparison to other languages. :<
<Ox0dea> *in general
<Ox0dea> I don't know how to fix that. :/
prestorium has joined #ruby
brainslug has quit [Ping timeout: 256 seconds]
sarkis has joined #ruby
knight- has quit [Quit: No Ping reply in 180 seconds.]
puria has joined #ruby
ahuman has joined #ruby
knight_ has joined #ruby
joeyjones has joined #ruby
adeponte has joined #ruby
raenk has joined #ruby
perry has joined #ruby
perry has quit [Changing host]
perry has joined #ruby
<KrzaQ> I checked to be 100% sure, all lines (my methods) appear in the input exactly once.
Mon_Ouie has joined #ruby
<KrzaQ> and at at least the first glance, my code seems ok
solars has quit [Ping timeout: 246 seconds]
<Ox0dea> KrzaQ: There is another crucial observation to be made.
bafbomb has joined #ruby
brainslug has joined #ruby
csmb has joined #ruby
rikkipitt has joined #ruby
dlitvak has joined #ruby
<KrzaQ> Ox0dea: what is it?
<Ox0dea> KrzaQ: See any "m" outputs feeding into "c" ones? :P
<Ox0dea> How about "k" into "d"?
sarkis has quit [Ping timeout: 256 seconds]
CloCkWeRX has joined #ruby
<KrzaQ> I didn't look too precisely
<KrzaQ> but it seems that a doesn't depend on all the other nodes
Coldblackice has quit [Ping timeout: 256 seconds]
Jet4Fire has joined #ruby
<KrzaQ> but that doesn't change my current issue
hakunin has quit [Remote host closed the connection]
<Ox0dea> That picture isn't loading. What's your issue?
<KrzaQ> it's pretty big (it's the full call graph from AoC, ~6mb I think)
<KrzaQ> Ox0dea: my code doesn't run
<Ox0dea> "Call graph"?
<KrzaQ> well
Couch has quit [Read error: Connection reset by peer]
<KrzaQ> gk AND gq -> gs - I view gs as a function of gf and gq
blackmesa has quit [Ping timeout: 240 seconds]
<KrzaQ> where gk is a function of (...) and gq is a function of (...)
agit0 has joined #ruby
jhass changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
naftilos76 has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 240 seconds]
<KrzaQ> I guess dependency graph would be a better name
<Ox0dea> Right.
<Ox0dea> So, what does "doesn't run" even mean?
Evan_ has joined #ruby
platzhirsch has quit [Quit: Leaving.]
<KrzaQ> https://gist.github.com/KrzaQ/c75bb3e9a8bafebc286d - if I uncomment lines 75-77 I get prog.rb:75:in `block (2 levels) in <main>': wrong number of arguments (given 1, expected 0) (ArgumentError)
<KrzaQ> which is weird, because if they're commented, I get the desired result (line b is trivial for my input and is directly a number)
brunto has joined #ruby
stamina has quit [Quit: WeeChat 1.3]
shredding has quit [Ping timeout: 250 seconds]
Snowy has joined #ruby
Rickmasta has joined #ruby
ij has joined #ruby
akem has quit [Remote host closed the connection]
<ij> Why does this produce an error "child fd 8 is not redirected"? i, o = IO.pipe; IO.popen(%w{date - -}, :err => [:child, o]) { |p| }
dlitvak has quit [Remote host closed the connection]
Evan_ has quit [Ping timeout: 240 seconds]
Rodya_ has joined #ruby
joeyjones has quit [Ping timeout: 240 seconds]
ixti has joined #ruby
csmb has quit [Ping timeout: 256 seconds]
gbailey has joined #ruby
akem has joined #ruby
bronson has joined #ruby
CloCkWeRX has quit [Ping timeout: 256 seconds]
solars has joined #ruby
M-shine has joined #ruby
raenk has quit [Ping timeout: 240 seconds]
roshanavand has quit [Remote host closed the connection]
<Ox0dea> KrzaQ: I realize you almost certainly aren't trying to write obfuscated code, but you've managed to do so. :P
CloCkWeRX has joined #ruby
<Ox0dea> You're doing this with on-the-fly methods to defer evaluation, right?
skade has quit [Quit: Computer has gone to sleep.]
FifthWall has joined #ruby
Couch has joined #ruby
Rodya_ has quit [Ping timeout: 256 seconds]
<KrzaQ> yeah, mostly
ixti has quit [Client Quit]
keyviewer_210489 has joined #ruby
Evan_ has joined #ruby
<Ox0dea> How do you mean?
csmb has joined #ruby
<Ox0dea> What other "advantage" do you perceive?
joeyjones has joined #ruby
joeyjones has quit [Changing host]
joeyjones has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
favadi has joined #ruby
<KrzaQ> They'll be truly function calls. I guess that's weak
bMalum has quit [Quit: bMalum]
shanemcd has joined #ruby
<KrzaQ> Still, I see no reason for this not to work
<KrzaQ> yet it doesn't
raenk has joined #ruby
InvGhosttt has joined #ruby
<shevy> foo.rb:32: warning: ARGF#lines is deprecated; use #each_line instead
<shevy> aha, we need 'data.txt' right?
Robert_ has joined #ruby
passerine has left #ruby ["Leaving"]
Robert_ is now known as Guest62985
<KrzaQ> shevy: that's why I put it on wandbox, it was a running live example
<KrzaQ> Added data.txt to the gist
InvGhostt has quit [Ping timeout: 264 seconds]
<KrzaQ> hm, funny
<KrzaQ> it seems I redefined p
<shevy> does this take a long time
<shevy> or does nothing happen?
<shevy> I invoke the ruby code but it just seems to not do anything
<KrzaQ> <0.1 second to execute/fail
<shevy> save for the "warning: ARGF#lines is deprecated; use #each_line instead"
myztic has joined #ruby
Cantaberry has joined #ruby
<KrzaQ> ah, I modified it to read from stdin for wandbox
<shevy> ah
<KrzaQ> anyhow, I found the problem
<KrzaQ> maybe I should have used longer method names
Kruppe has joined #ruby
<shevy> which method was it? .p() on class Calc?
<Ox0dea> Get 'im!
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
allcentury has joined #ruby
<Ox0dea> That class is perfectly useless, by the way.
<Ox0dea> "Classes as namespaces" is derpy as.
<KrzaQ> shevy: yeah
<KrzaQ> Ox0dea: I'm not a ruby proffessional :P
<KrzaQ> I think you kinda gathered that by now
<Ox0dea> I mean, you clearly know enough Ruby to be dangerous.
<Ox0dea> To yourself and others.
<Ox0dea> Look at this mess you've made for all of us.
chouhoulis has joined #ruby
<Ox0dea> KrzaQ: You can use `::Kernel.p` instead of just `p` to invoke the right method.
<Ox0dea> You'll be better able to see what's going wrong.
dlitvak has joined #ruby
<KrzaQ> mhm
<KrzaQ> Ox0dea: it's toy code, so I don't have any inhibitions
<ij> Solved my issue, :child was unneccessary.
<Ox0dea> KrzaQ: I'm not sure I follow?
puria has quit [Ping timeout: 240 seconds]
<Ox0dea> Giving one fuck is a fool's errand.
<KrzaQ> it's advent of code, if something looks particularly clever or nice or fun: I'll do it, even if I would scalp myself for it in code review in a real project
akem has quit [Remote host closed the connection]
<Ox0dea> KrzaQ: And are you having fun?
<Ox0dea> Your code certainly doesn't look nice. Do you reckon it's clever?
<KrzaQ> until this one I had
<Ox0dea> Oh, right.
<Ox0dea> Day 7 was definitely tricksy.
<Ox0dea> And then a dead-simple Day 8. Bah humbug.
<KrzaQ> I'll see how it looks after cleanup anyway
dlitvak has quit [Remote host closed the connection]
<KrzaQ> I can always redo it in a saner way
chouhoulis has quit [Ping timeout: 256 seconds]
<Ox0dea> But zen eet vood not be a toy, ja?
puria has joined #ruby
<KrzaQ> Ja
p0wn3d has joined #ruby
<adaedra> Nein
<ij> eet is a dutch woord for eat
<Ox0dea> I believed you immediately because of the repeated O.
<Ox0dea> So Dutch.
lubarch has quit [Quit: leaving]
boxofrox has joined #ruby
soulisson has joined #ruby
mooe has quit [Quit: Connection closed for inactivity]
Mon_Ouie has quit [Ping timeout: 250 seconds]
<soulisson> Hi, I'm new to unit testing and I have troubles understanding what a unit test is exactly, when writing a TestCase is each method a unit test?
rikkipitt has quit [Quit: Leaving...]
<Ox0dea> soulisson: You could do much worse as first approximations go.
yfeldblum has quit [Ping timeout: 264 seconds]
platzhirsch has joined #ruby
<soulisson> Ox0dea, sorry I don't understand
<Ox0dea> soulisson: One test case per method isn't a bad way to start testing.
<Ox0dea> A case can (and generally should) contain multiple assertions, mind.
<soulisson> Ox0dea, so if we speak in a general manner each method defined in a TestCase class is a unit test?
<Ox0dea> soulisson: Oh, you're hung up on the terminology? Technically, the definition of "unit test" is predicated on what constitutes a "unit" in a given project.
dlitvak has joined #ruby
ij has left #ruby ["WeeChat 1.3"]
<Ox0dea> soulisson: But yeah, your intuition is pretty much correct.
sameerynho has joined #ruby
<soulisson> Ox0dea, ok,thanks
icey has joined #ruby
icey has quit [Changing host]
icey has joined #ruby
InvGhosttt has quit [Ping timeout: 250 seconds]
JDiPierro has joined #ruby
<Ox0dea> soulisson: Happy to help. Any reason you went with test/unit?
nertzy has quit [Quit: This computer has gone to sleep]
JDiPierro has quit [Remote host closed the connection]
<soulisson> Ox0dea, I read something about TDD, I thought it was nice
<Ox0dea> soulisson: Hm? TDD is great, but test/unit is pretty spare.
<Ox0dea> It'll certainly suffice for getting your feet wet, I suppose.
krzkrzkrz has quit [Read error: Connection reset by peer]
<soulisson> ok, I see, thanks
krzkrzkrz has joined #ruby
<Ox0dea> To clarify, test/unit is one of many unit testing libraries availa
<Ox0dea> ble to you.
blackmesa has joined #ruby
<Ox0dea> In hindsight, I suppose you could already be using Minitest, but with the old API.
epochwolf has joined #ruby
sdothum has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
pandaant has joined #ruby
JammyHammy has quit [Read error: Connection reset by peer]
skweek has joined #ruby
arup_r has quit [Remote host closed the connection]
IrishGringo has joined #ruby
<KrzaQ> it could've been worse
<adaedra> Are those tabs?
<KrzaQ> yeah
bMalum has joined #ruby
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rodya_ has joined #ruby
radgeRayden_ has joined #ruby
<Ox0dea> KrzaQ: I must ask: from which resource(s) did you learn Ruby? :P
ruid has joined #ruby
ruid has quit [Changing host]
ruid has joined #ruby
bronson has joined #ruby
bMalum has quit [Quit: bMalum]
<shevy> :D
<[k-> computer science class!
Jardayn has joined #ruby
<Ox0dea> It's just... very strange code.
bMalum has joined #ruby
Rodya_ has quit [Ping timeout: 256 seconds]
norc_ has quit [Ping timeout: 252 seconds]
<[k-> that's what they all say about computer science phds writing code
Guest62985 has quit [Ping timeout: 272 seconds]
<KrzaQ> I'm not sure, Ox0dea
<Ox0dea> KrzaQ: Huh?
<KrzaQ> Nothing formal
<Ox0dea> That doesn't say much.
<KrzaQ> Just looked at rbot code and wrote some small scripts for myself
<Ox0dea> I see.
<KrzaQ> I like the idea of data being a stream and Ruby certainly lets me take that concept far
bronson has quit [Ping timeout: 256 seconds]
<Ox0dea> Sure, I get that.
keyviewer_210489 has quit [Remote host closed the connection]
<Ox0dea> Proof: https://eval.in/482109
<KrzaQ> but is it weird or is it wrong? (let's put the dynamic method creation aside)
<Ox0dea> Oh, shit. I thought you'd got it working.
<Ox0dea> Don't visit that link.
<adaedra> TOO LATE
<Ox0dea> Onoes!
<KrzaQ> I did get that working Ox0dea
<Ox0dea> Okay, good.
peterhil_ has quit [Ping timeout: 240 seconds]
<Ox0dea> Then it's definitionally not wrong?
<KrzaQ> It worked correctly for my input
<Ox0dea> Unorthodox as hell, sure, but it makes the right figures come out.
<KrzaQ> Trying to decipher your code now :P
skade has joined #ruby
lubarch has joined #ruby
<KrzaQ> what's the upcase for?
<[k-> DOOM
atomical has joined #ruby
<KrzaQ> upcase of DOOM?
<Ox0dea> KrzaQ: Can't have identifiers named `do`, `if`, or `in`.
<[k-> damn that hack
<KrzaQ> ah
<Ox0dea> KrzaQ: Don't you love it?
<Ox0dea> Whoops. That was for [k-.
wmdrossard has joined #ruby
<[k-> this is why we should have comments!
<KrzaQ> p is pretty dangerous, if I can say so myself
<KrzaQ> too*
<KrzaQ> but wait
<KrzaQ> aren't upcase names constants?
decoponio has joined #ruby
<KrzaQ> I guess you write to them only once, so it works
<[k-> ruby does allow you to override constants
last_staff has quit [Quit: last_staff]
d0nn1e has quit [Ping timeout: 260 seconds]
<[k-> there are warnings in the output
<KrzaQ> Fair enough
sgambino has joined #ruby
<KrzaQ> okay
synthroid has joined #ruby
<KrzaQ> so you're relying on the fact that, when sorted, there are no references to yet-to-be-defined constatns
peterhil_ has joined #ruby
d0nn1e has joined #ruby
<solars> is vim-ruby-refactoring dead?
<KrzaQ> and you're not taking into account that ~ will return negative result
<KrzaQ> but overall, awesome Ox0dea
<[k-> the power of functional programming!
<Ox0dea> KrzaQ: More technically, I'm taking advantage of the fact that the input is just the "taps" of an LFSR.
<Ox0dea> The math for ~ works out fine regardless of integer width.
favadi has joined #ruby
<Ox0dea> Not in the general case, obviously.
<KrzaQ> it could be a problem if they made it so, same with <<
<KrzaQ> not a big one, but you'd see -1 instead of 65535 for example :P
chouhoulis has joined #ruby
ruid has quit [Ping timeout: 256 seconds]
rsc___ has quit [Quit: rsc___]
<shevy> this has now reached NASA quality!
solocshaw has joined #ruby
<Ox0dea> That was insensitive?
devoldmx has joined #ruby
DurstBurger has joined #ruby
kmckelvin has quit [Ping timeout: 272 seconds]
ruid has joined #ruby
ruid has quit [Changing host]
ruid has joined #ruby
yqt has quit [Ping timeout: 272 seconds]
dmoe has quit [Quit: Connection closed for inactivity]
chouhoulis has quit [Ping timeout: 256 seconds]
CloCkWeRX has quit [Ping timeout: 256 seconds]
arup_r has joined #ruby
toomus has joined #ruby
mikecmpbll has joined #ruby
<toomus> Hi all
<toomus> Why this doesnt work?
mloy is now known as mloy|afk
<toomus> "+".gsub('+', '\+')
<KrzaQ> Heh, day 8 was so simple
devoldmx has quit [Ping timeout: 256 seconds]
<shevy> toomus perhaps because + is special
<jhass> >> "+".gsub('+', '\+'
<ruboto> jhass # => /tmp/execpad-14ec7efdfcaf/source-14ec7efdfcaf:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/482178)
<jhass> d'oh
<jhass> >> "+".gsub('+', '\+')
<ruboto> jhass # => "" (https://eval.in/482179)
<toomus> shevy: so how to escape +?
<mikecmpbll> weird
<toomus> from "+" to "\+"
<shevy> what do you want to replace actually? from + to ?
freerobby has joined #ruby
<jhass> I wonder if it's eaten by the backreference parser, mh
<mikecmpbll> seems unique to gsub
<shevy> ok so you want a "\\+"
jas02 has quit [Quit: jas02]
solocshaw has quit [Ping timeout: 240 seconds]
<toomus> shevy: nope, still doesnt work
roshanavand has joined #ruby
<[k-> %20?
<Ox0dea> >> 0x20.chr # [k-
<ruboto> Ox0dea # => " " (https://eval.in/482183)
<shevy> toomus hmm
<mikecmpbll> seems like a bug to me
solars has quit [Ping timeout: 240 seconds]
<Ox0dea> Definitely.
<[k-> >> "\+". length
<ruboto> [k- # => 1 (https://eval.in/482184)
<[k-> it exists!
dlitvak has quit [Ping timeout: 250 seconds]
<mikecmpbll> works with double quotes
aryaching has joined #ruby
<jhass> >> "+".gsub('+', '\\\\+')
<ruboto> jhass # => "\\+" (https://eval.in/482185)
<apeiros> backslashes in replacement are a bit arduous
<apeiros> ^ jhass was a bit faster :)
<Ox0dea> It's got nothing to do with #gsub.
<jhass> apeiros: still I wouldn't expect to consume \anything, only \d and \k<n> as the docs only mention that
<Ox0dea> >> ['\+', "\+"]
dlitvak has joined #ruby
<ruboto> Ox0dea # => ["\\+", "+"] (https://eval.in/482186)
<mikecmpbll> that's different.
<apeiros> basically you need to have an additional layer of escaping
<Ox0dea> You're different.
kmckelvin has joined #ruby
<mikecmpbll> >> "\\+" == '\+'
<apeiros> >> "\\\\+" == '\\\\+'
<ruboto> mikecmpbll # => true (https://eval.in/482189)
<ruboto> apeiros # => true (https://eval.in/482189)
<[k-> stop shortening my your face joke!
<Ox0dea> >> ['+'.sub('+', 'x\+'), '+'.sub('+', '\\\+')]
<jhass> >> '\+' == "\\+"
<ruboto> jhass # => true (https://eval.in/482191)
<ruboto> Ox0dea # => ["x", "\\+"] (https://eval.in/482191)
<mikecmpbll> doesn't work with doubles, nvm :)
grill has joined #ruby
roshanavand has quit [Ping timeout: 256 seconds]
<Ox0dea> This is the same bug eam and I poked at regarding #tr.
<Caius> >> a ="+"; a["+"] = "\\+"; a
<Ox0dea> Or a very similar one, anyway.
<ruboto> Caius # => "\\+" (https://eval.in/482192)
<jhass> Caius: that's just calling String#sub btw
djbkd has joined #ruby
<[k-> >> "\\\u002b"
<ruboto> [k- # => "\\+" (https://eval.in/482193)
<Caius> jhass: except it behaves differently
<Caius> >> "+".sub("+", "\\+")
<ruboto> Caius # => "" (https://eval.in/482194)
<Caius> Same arguments to String#sub directly results in different result
<jhass> mh
<mikecmpbll> oh nice..
<Caius> String#[]= disables backreferencing perhaps?
<Ox0dea> >> '\\+'.tr '\\+', ''
<ruboto> Ox0dea # => "\\" (https://eval.in/482198)
<[k-> sub only replaces the first + it finds thougj
<jhass> >> "++"["+"] = "\\+"
<ruboto> jhass # => "\\+" (https://eval.in/482199)
<Ox0dea> jhass: You're returning the RHS there.
<jhass> derp
<jhass> >> x = "++"; x["+"] = "\\+"; x
<ruboto> jhass # => "\\++" (https://eval.in/482200)
<jhass> Caius: ^ not replacing gsub anyhow
skade has quit [Quit: Computer has gone to sleep.]
<Caius> >> a = "abc"; a[/(.)/] = "\\1"; a
<ruboto> Caius # => "\\1bc" (https://eval.in/482201)
<Caius> >> "abc".sub(/(.)/, "\\1")
<ruboto> Caius # => "abc" (https://eval.in/482202)
dlitvak has quit [Ping timeout: 272 seconds]
<mikecmpbll> wild.
JDiPierro has joined #ruby
dlitvak has joined #ruby
djbkd has quit [Ping timeout: 256 seconds]
<Ox0dea> Not terribly.
CloCkWeRX has joined #ruby
<Ox0dea> In fact, KRI calls that argument (Caius' "\\1") `backref` internally.
malconis has joined #ruby
<Ox0dea> Never mind.
keyviewer_57179 has joined #ruby
<[k-> suddenly a new ruby interpreter pops up?
<mikecmpbll> heh
<mikecmpbll> did you write it, [k- ?
<Ox0dea> It's more Koichi's (and nobu's) than matz's, in my opinion.
aryaching has quit [Ping timeout: 272 seconds]
Rumbles has quit [Ping timeout: 272 seconds]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
favadi has joined #ruby
<[k-> i do not have much knowledge on much
<devster31> ok, today I even went on reddit to check the solutions but they're not doing it in a substantially different way... http://dpaste.com/26VNDBY problem is 2fold, the first line is a lower number than the solution, the second errors out with a bad unicode escape
<Ox0dea> [k-: There's wisdom in knowing that.
_stu_ has joined #ruby
emilkarl has joined #ruby
<emilkarl> How could you wrap digits in a string when a span-tag the easiest way?
blackmesa has joined #ruby
<emilkarl> with*
bnizzle has joined #ruby
goodcodeguy has joined #ruby
<emilkarl> ex “15 hours 10minutes” -> “<span>15</span> hours 10<span>minutes</span>”
aufi has quit [Ping timeout: 256 seconds]
<Ox0dea> >> 'foo'.center 17, '=-'
<ruboto> Ox0dea # => "=-=-=-=foo=-=-=-=" (https://eval.in/482204)
<Ox0dea> Use that instead.
<[k-> that wisdom only matters if you plan to act on it though
<emilkarl> Ox0dea: me?
<Ox0dea> >> '15 hours 10 minutes'.gsub /\d+/, '<span>\0</span>' # emilkarl
<ruboto> Ox0dea # => "<span>15</span> hours <span>10</span> minutes" (https://eval.in/482205)
jgt2 has quit [Ping timeout: 240 seconds]
<Ox0dea> [k-: Acting on ignorance is a bad idea.
<emilkarl> oh nice.
<emilkarl> thanks Ox0dea
<Ox0dea> Happy to help.
* [k- flags Ox0dea for misinterpretation
allcentury has quit [Read error: Connection reset by peer]
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
<Ox0dea> Defense, number 11; roughing the interpreter; 42-yard penalty, zeroth down.
cwong_on_irc has joined #ruby
<[k-> what is a 42-yard penalty, or a zeroth down?
<Ox0dea> Sports.
allcentury has joined #ruby
<Ox0dea> They're handegg terms.
houhoulis has joined #ruby
blackmesa has quit [Ping timeout: 272 seconds]
<Ox0dea> *American handegg, I guess.
chouhoulis has joined #ruby
<[k-> not ad rem
<[k-> i used ad rem :>
<[k-> clever huh
codecop has quit [Remote host closed the connection]
skade has joined #ruby
aryaching has joined #ruby
ruid has quit [Ping timeout: 240 seconds]
BSarante has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
<BSarante> hi
platzhirsch has quit [Ping timeout: 240 seconds]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<BSarante> Algum Brasileiro que possa me ajudar?
<jhass> English only please
toomus has quit [Quit: Page closed]
<jhass> check /msg alis help for other channels
kristofferR has joined #ruby
<BSarante> It has specific community of ruby to Brazil ?
goodcodeguy has quit [Read error: Connection reset by peer]
<BSarante> I'm having trouble with respect to a form in js
favadi has joined #ruby
<jhass> so look for a javascript channel?
puria has quit [Ping timeout: 244 seconds]
<BSarante> I'm kind layman in ruby programming
JDiPierro has quit [Remote host closed the connection]
<jhass> http://ruby-community.com/pages/channels lists all language specific Ruby channels we noticed
JDiPierro has joined #ruby
<BSarante> I'm doing a program in ruby ​​to enter a website
<jhass> actually I see a #ruby-br, only 4 people though
roshanavand has joined #ruby
<Ox0dea> I have some anecdata here which suggest that people who at least occasionally talk to themselves aloud do so most frequently while they are cooking for themselves. I'm in the market for corroborators.
<jhass> not sure if it's country or language code
<jhass> ?offtopic Ox0dea :P
<ruboto> Ox0dea, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<Ox0dea> I'll ask again later. ^_^
<devster31> wow, the bot is smart
puria has joined #ruby
<jhass> wow, there's a #ruby-creative
<jhass> do I want to know?
yardenbar has quit [Ping timeout: 256 seconds]
allcentury has quit [Ping timeout: 240 seconds]
<[k-> ruboto is equipped with machine learning and natural language processing abilities
<devster31> what's rubycoin?
<devster31> what's behind ruboto?
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
User458764 has joined #ruby
<[k-> ruboto is equipped with machine learning and natural language processing abilities
cdg has joined #ruby
InvGhost has joined #ruby
<[k-> how dare they use the ruby logo for their thingu
<devster31> yes, but is it based on hubot, on lita, sopel, something else?
<jhass> current on cinch, next gen on butler
<devster31> nice
<shevy> good old butler
jgt2 has joined #ruby
<Ankhers> under what circumstances can I call `obj.send(:key)', but be unable to call `obj.method(:key)'?
<[k-> funny jhass did not expose my lie
JDiPierr_ has joined #ruby
<jhass> Ankhers: the method being private
platzhirsch has joined #ruby
<jhass> Ankhers: hence why you should prefer public_send
<Ox0dea> jhass:
<Ox0dea> That was a pretty speedy homework answer.
<jhass> mh
<jhass> maybe
<Ox0dea> I thought we weren't supposed to do that?
<jhass> their problem for not learning how to research
<Ankhers> okay, public_send still works.
<Ox0dea> Your problem for teaching them they don't have to.
<jhass> I didn't recognize it as such but I can see why you think so in hindsight
davedev24 has joined #ruby
<shevy> Ankhers is now wiser than before
<Ox0dea> Fair enough.
<jhass> ?code Ankhers
<ruboto> Ankhers, We can't help you without your code, please post it to https://gist.github.com
<Ankhers> sure, one sec.
<[k-> devster31: look how ruboto read Ankhers' mind
ramfjord has quit [Ping timeout: 250 seconds]
JDiPierro has quit [Ping timeout: 256 seconds]
davedev2_ has joined #ruby
<Ankhers> https://gist.github.com/anonymous/5820c9da68be73853a0f -- the commented out line crashes.
mostlybadfly has quit [Quit: Connection closed for inactivity]
devoldmx has joined #ruby
<Ox0dea> jhass: Yep.
<jhass> Ankhers: this is nothing something we can use locally to reproduce your issue
<jhass> er, s/something//
davedev24 has quit [Ping timeout: 240 seconds]
<[k-> correction: this is not* something [...]
<Ankhers> jhass: Unfortunately I cannot really give my company's code. Which is why I was just asking about scenarios where one would work, and not the other.
<jhass> >> class MyObject; def key; end; end; o = MyObject.new; [o.public_send(:key), o.method(:key)]
<ruboto> jhass # => [nil, #<Method: MyObject#key>] (https://eval.in/482213)
rodfersou is now known as rodfersou|lunch
TomPeed has joined #ruby
<jhass> Ankhers: if you're not able to produce a minimal reproducing example nor share your real code and not able to solve your issue yourself, it's time to hire a consultant
freerobby has quit [Quit: Leaving.]
<[k-> if you do not tell us the error, we might not be able to tell the issue at all
kp666 has joined #ruby
<[k-> error loggggg
<Ox0dea> Symbol.new should do gensym.
akem has joined #ruby
tesuji has quit [Ping timeout: 250 seconds]
devoldmx has quit [Ping timeout: 256 seconds]
allcentury has joined #ruby
cwong_on_irc has quit [Quit: Leaving.]
dlitvak has quit [Remote host closed the connection]
stamina has joined #ruby
mary5030 has joined #ruby
InvGhost has quit [Ping timeout: 256 seconds]
dlitvak has joined #ruby
sankaber has joined #ruby
InvGhost has joined #ruby
lukeasrodgers has joined #ruby
puria has quit [Ping timeout: 250 seconds]
banister has joined #ruby
<devster31> Ox0dea, http://dpaste.com/0MY4YAH I've tried .encode('utf-8') eval (returns an error for unicode escape) and inspect, but I can't get it to print as intended
<Ox0dea> devster31: "As intended"?
<devster31> the paste contains what I'd like to output
<devster31> basically the same string I used as input
<Ox0dea> devster31: Are you *certain* AoC gave you this string?
<devster31> this is line 8 in my input "ckhorczuiudfjmmcc\\u\"wozqxibsfjma"
<Ox0dea> devster31: How are you getting hold of your input?
<devster31> copy paste, like in the paste I gave you, I copy the input, open a single quote in a repl, paste everything in, close the single quote
tagrudev has quit [Remote host closed the connection]
RegulationD has joined #ruby
treehug88 has joined #ruby
kmckelvi1 has joined #ruby
krzkrzkrz has quit [Read error: Connection reset by peer]
ESpiney has joined #ruby
tahon has joined #ruby
kmckelvin has quit [Ping timeout: 272 seconds]
RegulationD has quit [Ping timeout: 256 seconds]
blackmesa has joined #ruby
<Ox0dea> devster31: https://eval.in/482227
<Ox0dea> I'm just as confused as you, my friend.
<Ox0dea> That code works, but I can't get it to do so with literals. :<
puria has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
<Ox0dea> Oh, well, it's because `"\\" + "u" != "\u"`, but I can't finagle the literals into being interpreted correctly by `eval`.
favadi has joined #ruby
ta has quit [Remote host closed the connection]
whippythellama has joined #ruby
sankaber has quit [Remote host closed the connection]
sepp2k has quit [Read error: Connection reset by peer]
sankaber has joined #ruby
Bellthoven has joined #ruby
<Ox0dea> >> eval '"\\u"'
<ruboto> Ox0dea # => (eval):1: invalid Unicode escape (SyntaxError) ...check link for more (https://eval.in/482231)
<Ox0dea> devster31: There's the crux of the problem, but I don't see why it should be happening.
favadi has quit [Client Quit]
<devster31> I think it's my repl
<devster31> this is how I did it https://eval.in/482233 and it works
<devster31> is it possible it's a specific version with this issue?
<Ox0dea> Right, but it's because you're not using string literals.
stannard has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
duckpuppy has joined #ruby
<Ox0dea> You're not bumping into the escaping problem presented above.
puria has quit [Ping timeout: 250 seconds]
lubarch has quit [Quit: leaving]
saddad has joined #ruby
tahon has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
skade has quit [Read error: Connection reset by peer]
skade has joined #ruby
favadi has joined #ruby
mary5030 has joined #ruby
Ox0dea has quit [Quit: WeeChat 1.4-dev]
TomyWork has quit [Ping timeout: 246 seconds]
nettoweb has joined #ruby
TheHodge has joined #ruby
lubarch has joined #ruby
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
freerobby has joined #ruby
bronson has joined #ruby
[k- has quit [Read error: No route to host]
[k- has joined #ruby
krzkrzkrz has joined #ruby
Ox0dea has joined #ruby
kristofferR has quit [Quit: Textual IRC Client: www.textualapp.com]
davedev24 has joined #ruby
imperator has joined #ruby
lacuna has quit [Remote host closed the connection]
WatUpMyKnitta has quit [Ping timeout: 252 seconds]
bronson has quit [Ping timeout: 256 seconds]
davedev2_ has quit [Ping timeout: 240 seconds]
[k- has quit [Read error: No route to host]
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
mary5030 has quit [Remote host closed the connection]
[k- has joined #ruby
icey has quit [Remote host closed the connection]
bahar has quit [Changing host]
bahar has joined #ruby
<Ankhers> Turns out the answer is meta programming.
_stu_ has quit [Quit: _stu_]
bronson has joined #ruby
anisha has quit [Quit: Leaving]
duckpuppy has quit [Ping timeout: 256 seconds]
icey has joined #ruby
User458764 has quit [Quit: Textual IRC Client: www.textualapp.com]
User458764 has joined #ruby
tvw has joined #ruby
fullofca_ has quit [Remote host closed the connection]
dlitvak has quit [Remote host closed the connection]
dlitvak has joined #ruby
<Ox0dea> Ankhers: Yes, this is #ruby.
duckpuppy has joined #ruby
tahon has joined #ruby
riffraff has quit [Quit: Leaving]
<Ankhers> Ox0dea: Fair enough. Though, I am referring to my question about when `send' would work and `method' did not.
Bellthoven has quit []
bronson has quit [Ping timeout: 256 seconds]
Rodya_ has joined #ruby
greg has joined #ruby
dlitvak has quit [Remote host closed the connection]
symm- has joined #ruby
atomical_ has joined #ruby
User458764 has quit [Client Quit]
gigetoo has quit [Ping timeout: 272 seconds]
adgtl has joined #ruby
<greg> hello
dlitvak has joined #ruby
fullofcaffeine has joined #ruby
<adgtl> is it called snail operator?
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
lxsameer has quit [Quit: Leaving]
gigetoo has joined #ruby
sarkis has joined #ruby
atomical has quit [Ping timeout: 250 seconds]
puria has joined #ruby
adgtl has quit [Read error: Connection reset by peer]
User458764 has joined #ruby
User458764 has quit [Max SendQ exceeded]
greister has quit [Quit: WeeChat 1.3]
tahon has quit [Ping timeout: 272 seconds]
User458764 has joined #ruby
babblebre has joined #ruby
greister has joined #ruby
IrishGringo has quit [Ping timeout: 240 seconds]
nertzy has joined #ruby
greister has quit [Client Quit]
greister has joined #ruby
ItSANgo has quit [Ping timeout: 246 seconds]
greg has quit [Ping timeout: 252 seconds]
BadBlock has quit [Ping timeout: 250 seconds]
greister has quit [Client Quit]
dlitvak has quit [Ping timeout: 250 seconds]
imperator has left #ruby ["Leaving"]
<Ox0dea> The best name for `&.`: https://youtu.be/LE0g2TUsJ4U?t=996
<Ox0dea> Bonus adorable matz chuckles.
adgtl has joined #ruby
tjad has quit [Ping timeout: 256 seconds]
IrishGringo has joined #ruby
weemsledeux has joined #ruby
noark9 has joined #ruby
_stu_ has joined #ruby
soulisson has quit [Read error: Connection reset by peer]
chalky_ has joined #ruby
akem has quit [Remote host closed the connection]
rubie has joined #ruby
duckpuppy has quit [Ping timeout: 240 seconds]
BSarante has quit [Ping timeout: 252 seconds]
<shevy> the lonely operator
RobertBirnie has joined #ruby
puria has quit [Ping timeout: 240 seconds]
nerium has joined #ruby
Rodya_ has quit [Remote host closed the connection]
ta has joined #ruby
zarubin has joined #ruby
djbkd has joined #ruby
RegulationD has joined #ruby
ItSANgo_ has joined #ruby
zacts has quit [Read error: Connection reset by peer]
djbt has quit [Ping timeout: 252 seconds]
bmurt has joined #ruby
duckpuppy has joined #ruby
zacts has joined #ruby
zacts is now known as Guest24432
djbkd has quit [Ping timeout: 256 seconds]
mikecmpbll has quit [Ping timeout: 256 seconds]
zarubin has quit [Ping timeout: 256 seconds]
rodfersou|lunch has quit [Quit: leaving]
greister has joined #ruby
duckpuppy has quit [Ping timeout: 250 seconds]
Guest24432 has quit [Client Quit]
greister has quit [Client Quit]
mary5030 has joined #ruby
greister has joined #ruby
mary5030 has quit [Remote host closed the connection]
greister has quit [Client Quit]
<Jet4Fire> exit
<Jet4Fire> exit
mary5030 has joined #ruby
Jet4Fire has quit [Quit: leaving]
colegatron has quit [Ping timeout: 250 seconds]
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
emilkarl has quit [Quit: emilkarl]
<shevy> rescue
dlitvak has joined #ruby
aufi has joined #ruby
hobodave has joined #ruby
Anderson69s_Deb has joined #ruby
<[k-> raise SystemExit
zacts|pi has joined #ruby
lavros has joined #ruby
Rodya_ has joined #ruby
puria has joined #ruby
houhoulis has quit [Remote host closed the connection]
chalky_ has quit [Quit: leaving]
sucks has joined #ruby
psy_ has joined #ruby
adgtl has quit [Remote host closed the connection]
tahon has joined #ruby
nertzy has quit [Quit: This computer has gone to sleep]
psy_ has quit [Max SendQ exceeded]
tahon has quit [Client Quit]
greister has joined #ruby
psy_ has joined #ruby
InvGhost has quit [Ping timeout: 272 seconds]
steffkes has quit [Ping timeout: 244 seconds]
sh4d0wD has joined #ruby
aganov has quit [Remote host closed the connection]
nerium has quit [Quit: nerium]
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
The_Phoenix has joined #ruby
djstorm has joined #ruby
radgeRayden__ has joined #ruby
radgeRayden_ has quit [Read error: Connection reset by peer]
puria has quit [Ping timeout: 244 seconds]
colegatron has joined #ruby
User458764 has quit [Quit: Textual IRC Client: www.textualapp.com]
BTRE has quit [Quit: Leaving]
InvGhost has joined #ruby
SOLDIERz has quit [Ping timeout: 250 seconds]
Jackneill has joined #ruby
freerobby has quit [Quit: Leaving.]
synthroid has quit [Remote host closed the connection]
kobain has joined #ruby
podman has joined #ruby
dhollinger has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
BTRE has joined #ruby
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zacts|pi is now known as zacts
psy_ has quit [Ping timeout: 250 seconds]
noark9 has quit [Remote host closed the connection]
sh4d0wD1 has joined #ruby
maloik has quit [Ping timeout: 240 seconds]
puria has joined #ruby
araujo has quit [Ping timeout: 246 seconds]
sh4d0wD has quit [Read error: Connection reset by peer]
diegoviola has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
sneakerhax has quit [Ping timeout: 260 seconds]
dlitvak has quit [Ping timeout: 256 seconds]
devoldmx has joined #ruby
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
freerobby has joined #ruby
roshanavand has quit [Read error: Network is unreachable]
SCHAAP137 has quit [Remote host closed the connection]
nerium has joined #ruby
favadi has joined #ruby
dlitvak has joined #ruby
ilovelinux has joined #ruby
<ilovelinux> hi
<blub> hi i love linux
<havenwood> ilovelinux: hi
puria has quit [Ping timeout: 240 seconds]
<ilovelinux> i have problem :(
<blub> whats that
<ilovelinux> :/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- msf/core (LoadError)
devoldmx has quit [Ping timeout: 250 seconds]
<ilovelinux> this ^
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ilovelinux> why it return this error?
imperator has joined #ruby
hobodave has joined #ruby
aufi has quit [Ping timeout: 240 seconds]
agit0 has joined #ruby
pdoherty has quit [Ping timeout: 272 seconds]
<jhass> ?metasploit
<ruboto> I don't know anything about metasploit
<jhass> meh
<imperator> I don't suppose there's a base64_encoded? method somewhere in core that i'm missing, is there?
jbrhbr has joined #ruby
cwong_on_irc has joined #ruby
<jhass> ?metasploit=Please join #metasploit for help with it.
<ruboto> I don't know anything about metasploit
<jhass> derp
<jhass> !fact add metasploit Please join #metasploit for help with it.
<ruboto> jhass, I will remember that metasploit is Please join #metasploit for help with it.
<jhass> ?metasploit ilovelinux
<ruboto> ilovelinux, Please join #metasploit for help with it.
duckpuppy has joined #ruby
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
uri_ has joined #ruby
baroquebobcat has joined #ruby
favadi has joined #ruby
<ilovelinux> uhm
zotherstupidguy has quit [Ping timeout: 245 seconds]
<ilovelinux> ruboto, jhass, thank you :)
<ilovelinux> ruboto, is a bot gh
<adaedra> ?justabot
<ruboto> I'm just a bot. You don't need to address me.
duckpuppy has quit [Ping timeout: 256 seconds]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DurstBurger has quit [Ping timeout: 240 seconds]
atomical has joined #ruby
ramortegui has joined #ruby
<shevy> ?cookie
<ruboto> here's your cookie:
aryaching has quit [Ping timeout: 256 seconds]
favadi has quit [Client Quit]
nfk|laptop has quit [Quit: yawn]
sh4d0wD1 has quit [Quit: Leaving.]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k-> ?rejected
<ruboto> I don't know anything about rejected
<blub> hi ruboto
atomical_ has quit [Ping timeout: 240 seconds]
<diegoviola> you have to be kidding me, sqlite is like the slowest db I ever tried
<diegoviola> importing 3k records to it shouldn't take like 5 minutes
nettoweb has joined #ruby
solars has joined #ruby
<diegoviola> with postgres it takes like 5 seconds
noark9 has joined #ruby
[Butch] has joined #ruby
<sarkis> what version
<canton7> get your transactions right
<canton7> then it flies
sh4d0wD has joined #ruby
<diegoviola> [diego@myhost beta360]$ time rake import_csv
huyderman has quit [Ping timeout: 256 seconds]
<diegoviola> real 5m39.009s
<diegoviola> :(
pdoherty has joined #ruby
<shevy> diegoviola postgres is very fast and great for big data
aryaching has joined #ruby
kp666 has quit [Read error: Connection reset by peer]
sh4d0wD has quit [Client Quit]
<shevy> I can see it when I download the official NCBI taxonomy database ftp://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz - importing through INSERT takes much longer in sqlite than it does in postgresql
kp666 has joined #ruby
kp666 has quit [Max SendQ exceeded]
<jhass> ?crosspost diegoviola
<ruboto> diegoviola, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
kp666 has joined #ruby
kp666 has quit [Client Quit]
dlitvak has quit [Remote host closed the connection]
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sh4d0wD has joined #ruby
edwinvdgraaf has quit [Ping timeout: 256 seconds]
<diegoviola> sorry
<diegoviola> with pg
<diegoviola> [diego@myhost beta360]$ time rake import_csv
<diegoviola> real 0m35.988s
<diegoviola> user 0m21.837s
<diegoviola> sys 0m1.040s
<diegoviola> it's not much better, but still
skade has quit [Quit: Computer has gone to sleep.]
<shevy> how big is that
<diegoviola> 3k records
lavros has quit [Quit: leaving]
<diegoviola> [diego@myhost beta360]$ wc -l correspondence.csv
<diegoviola> 3861 correspondence.csv
dionysus69 has joined #ruby
<shevy> I mean the filesize of the csv originally? the NCBI taxonomy one is about 100 MB or extracted, becomes much bigger when one has it as .sql insert statements
<diegoviola> I'm on a 5 years old computer
<diegoviola> with 2GB of RAM
<diegoviola> should be faster on my new thinkpad
jas02 has joined #ruby
freerobby has quit [Quit: Leaving.]
Wsewolod has joined #ruby
brunto has quit [Ping timeout: 250 seconds]
psy_ has joined #ruby
qhartman has quit [Quit: Ex-Chat]
pdoherty has quit [Ping timeout: 250 seconds]
synthroid has joined #ruby
DurstBur1er has joined #ruby
favadi has joined #ruby
noark9 has quit []
Coldblackice has joined #ruby
Pumukel has joined #ruby
RobertBirnie has joined #ruby
godzillaenlacasa has quit [Quit: Peace Out Peeps!]
davedev2_ has joined #ruby
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
davedev24 has quit [Ping timeout: 250 seconds]
bb010g has quit [Quit: Connection closed for inactivity]
zacts is now known as acts
acts is now known as zacts
SCHAAP137 has joined #ruby
ur5us has joined #ruby
DexterLB has quit [Ping timeout: 260 seconds]
joonty has quit [Quit: joonty]
dlitvak has joined #ruby
DexterLB has joined #ruby
sh4d0wD has quit [Quit: Leaving.]
ur5us has quit [Ping timeout: 272 seconds]
dlitvak has quit [Remote host closed the connection]
hxegon has joined #ruby
nertzy has joined #ruby
thejamespinto has joined #ruby
lacuna has quit [Remote host closed the connection]
<ljarvis> not much better? it went from 5 minutes to 30 seconds?
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
devbug has joined #ruby
amclain has joined #ruby
akem has joined #ruby
bb010g has joined #ruby
ethe has joined #ruby
andikr has quit [Remote host closed the connection]
thejamespinto has quit [Client Quit]
ur5us has joined #ruby
tomphp has quit [Ping timeout: 240 seconds]
agit0 has joined #ruby
<[k-> what is this magic doohickey rake that hides all the magic
chandlerbing has joined #ruby
maloik has joined #ruby
yqt has joined #ruby
banister has quit [Read error: Connection reset by peer]
iateadonut has left #ruby [#ruby]
Lorn has quit [Changing host]
Lorn has joined #ruby
bronson has joined #ruby
minimalism has joined #ruby
pdoherty has joined #ruby
Ishido has joined #ruby
duckpuppy has joined #ruby
sh4d0wD has joined #ruby
maloik has quit [Ping timeout: 244 seconds]
RTG` has quit [Ping timeout: 245 seconds]
sh4d0wD has quit [Client Quit]
christiandsg has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
Pumukel has quit [Ping timeout: 240 seconds]
Snowy has quit [Remote host closed the connection]
RegulationD has quit [Remote host closed the connection]
wldcordeiro has quit [Ping timeout: 256 seconds]
zast has joined #ruby
KensoDev has quit [Remote host closed the connection]
rakm has joined #ruby
KensoDev has joined #ruby
<solars> does anyone know if vim ruby refactoring is dead? or are there any alternatives?
JDiPierr_ has quit [Remote host closed the connection]
kmckelvi1 has quit [Ping timeout: 256 seconds]
JDiPierro has joined #ruby
mostlybadfly has joined #ruby
RobertBirnie has joined #ruby
codecop has joined #ruby
jbrhbr has quit [Quit: Leaving.]
programmerq has quit [Ping timeout: 245 seconds]
lacrymology has joined #ruby
sucks has quit [Ping timeout: 240 seconds]
<lacrymology> how can I get a variable or call a method from its name, as a symbol?
<lacrymology> (I'm not sure which one it is right now, I'll check when I know how to do it)
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
tomphp has joined #ruby
<adaedra> To call a method, you have ri:Object#public_send
<`derpy> method `Object#public_send`: Invokes the method identified by _symbol_, passing it any arguments specified. U… • http://rubydoc.info/stdlib/core/Object#public_send-instance_method
<[k-> ooooooooo i see `derpy got upgraded
sepp2k has joined #ruby
ilovelinux has left #ruby ["Leaving"]
sneakerhax has joined #ruby
devbug has quit [Ping timeout: 256 seconds]
zarubin has joined #ruby
favadi has quit [Quit: Textual IRC Client: www.textualapp.com]
* `derpy updates [k-
<ljarvis> ri:nice
<`derpy> No results found
<adaedra> That ri: syntax is a bit misleading for people not knowing it's a call for the bot tho, I wonder how this can be made better
<lacrymology> change it for a > or a !, which are pretty standard?
<ljarvis> i think the only way to do that is for a separate line like it was before
<ljarvis> but at least this way you have the option
<adaedra> It still works
<ljarvis> right, that's what I mean
<ljarvis> you have the option to do either
<ljarvis> so it's fine
zarubin has quit [Ping timeout: 250 seconds]
<adaedra> Yeah
supermarin has joined #ruby
<[k-> maybe a `Object#public_send`
<adaedra> It's still being adjusted
devbug has joined #ruby
IrishGringo has quit [Ping timeout: 256 seconds]
<ljarvis> that's too ambiguous
<adaedra> Yeah, `` is too common
chandlerbing has quit []
<[k-> do you have statistics to show that 68% of the time is not intended to link a method?
<lacrymology> adaedra: and to access a variable in scope?
<adaedra> There's also the way to mention people that I have to look if I can do better
<adaedra> lacrymology: I think you have to look at binding for that
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k-> binding.local_variable_get
<[k-> or something
<[k-> binding exists everywhere
<[k-> so you can call it anywhere in your code
dlitvak has joined #ruby
<ljarvis> lacrymology: why do you want to do that?
<adaedra> I'm not sure where it comes from, let's play hide and seek
<ljarvis> it's generally a bad idea
<adaedra> &ri Object#binding Kernel#binding
<adaedra> Uhuh
mrtomme has quit [Ping timeout: 246 seconds]
ramfjord has joined #ruby
tenderlove has quit [Remote host closed the connection]
mrtomme has joined #ruby
<lacrymology> ljarvis: it's complicated, I'm using rspec and I need to access a thing that is defined in a let from an example group. That is not possible, so I'm thinking of passing a symbol (call this method to find the value for this thing). I just did it and works (it's a method, not a variable)
freerobby has joined #ruby
sh4d0wD has joined #ruby
<ljarvis> wouldn't a hash do?
KensoDev_ has joined #ruby
sh4d0wD has quit [Client Quit]
Rodya_ has quit [Remote host closed the connection]
tier has joined #ruby
tier has quit [Remote host closed the connection]
mark4 has left #ruby ["PART #RubyOnRails :PART #jquery :PART #reactjs :PART ##javascript :PART #elixir-lang :PART #debian :PONG :wilhelm.freenode.net"]
KensoDev has quit [Ping timeout: 256 seconds]
hahuang65 has joined #ruby
jpfuentes2 has joined #ruby
platzhirsch has left #ruby [#ruby]
christiandsg has quit [Remote host closed the connection]
programmerq has joined #ruby
stamina has quit [Quit: WeeChat 1.3]
howdoicomputer has joined #ruby
Eiam has joined #ruby
jbrhbr has joined #ruby
hxegon has quit [Quit: leaving]
bronson has joined #ruby
hxegon has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
wldcordeiro has joined #ruby
colli5ion has quit [Ping timeout: 255 seconds]
Xiti has quit [Quit: Xiti]
wldcordeiro has quit [Client Quit]
JDiPierro has quit [Remote host closed the connection]
wldcordeiro has joined #ruby
Xiti has joined #ruby
FLeiXiuS has joined #ruby
christiandsg has joined #ruby
<FLeiXiuS> Is there an easy way to do a tail -f in ruby?
<jhass> FLeiXiuS: open the file and read_nonblock from it in a loop?
<jhass> or even just gets
hobodave has quit [Quit: Computer has gone to sleep.]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Ishido has quit [Ping timeout: 240 seconds]
<FLeiXiuS> jhass, Thats actually a good idea. I was going about it way wrong lol
christiandsg has quit [Remote host closed the connection]
<hxegon> is rspec-mocks a part of rspec by default?
<hxegon> I'm having trouble using the allow way of stubbing.
<mg^> ruby -e 'print ARGF.read while true' /var/log/messages
Tempesta has quit [Ping timeout: 256 seconds]
ur5us has quit [Remote host closed the connection]
atomical has joined #ruby
dlitvak has quit [Remote host closed the connection]
<jhass> ruby -ne 'print $_' or whatever it was
InvGhost has quit [Ping timeout: 240 seconds]
<blub> ruby -pe ''
sh4d0wD has joined #ruby
Tempesta has joined #ruby
djbkd has joined #ruby
<mg^> ahh I should have remembered that
nertzy has quit [Quit: This computer has gone to sleep]
<jhass> there should be an stdlib called l so we can -perl
<mg^> actuale -pe doesn't work because it quits at EOF
<mg^> I have all the typos today
kmckelvi1 has joined #ruby
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
davedev24 has joined #ruby
davedev2_ has quit [Ping timeout: 250 seconds]
sameerynho has quit [Remote host closed the connection]
steffkes has joined #ruby
steffkes has joined #ruby
mloy has joined #ruby
mloy has quit [Client Quit]
mattyohe has joined #ruby
dhollinger has quit [Quit: WeeChat 1.3]
Hounddog has quit [Remote host closed the connection]
spider-mario has joined #ruby
Ishido has joined #ruby
<slash_nick> you can keep 'em
berserk_ren has joined #ruby
* slash_nick doesn't need them
arup_r has quit []
dfockler has joined #ruby
InvGhost has joined #ruby
kirun has joined #ruby
RegulationD has joined #ruby
skade has joined #ruby
freerobby has quit [Quit: Leaving.]
Xentil has joined #ruby
last_staff has joined #ruby
christiandsg has joined #ruby
<Xentil> hello
saddad has quit [Ping timeout: 272 seconds]
edwinvdgraaf has joined #ruby
RegulationD has quit [Remote host closed the connection]
RegulationD has joined #ruby
podman has quit [Quit: Connection closed for inactivity]
weemsledeux has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
puria has joined #ruby
Peg-leg has quit [Quit: Leaving.]
livcd has joined #ruby
<livcd> can anyone point me to a very simple static-site generator in Ruby (something like jekyll)
<jhass> livcd: jekyll
<jhass> scnr
<jhass> I like middleman
<[k-> i wanted to say that!
dhollinger has joined #ruby
<livcd> I am looking to study the code but jekyll looks too big / complicated
nemesit|znc has left #ruby ["WeeChat 1.3"]
govg has joined #ruby
hxegon has quit [Ping timeout: 272 seconds]
blackjid has quit [Max SendQ exceeded]
ramfjord has joined #ruby
blackjid has joined #ruby
AlphaAtom has joined #ruby
jbrhbr has quit [Quit: Leaving.]
jbrhbr has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
zarubin has joined #ruby
dionysus69 has quit [Quit: dionysus69]
dkphenom has joined #ruby
blackmesa has joined #ruby
saddad has joined #ruby
allcentury has quit [Quit: WeeChat 1.2]
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dlitvak has joined #ruby
zarubin has quit [Ping timeout: 240 seconds]
skade has quit [Ping timeout: 272 seconds]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has joined #ruby
hobodave has joined #ruby
skade has quit [Read error: Connection reset by peer]
hxegon has joined #ruby
davejlong has joined #ruby
blackmesa has quit [Ping timeout: 256 seconds]
dlitvak has quit [Ping timeout: 240 seconds]
tenderlove has joined #ruby
jas02 has quit [Quit: jas02]
jas02 has joined #ruby
bmurt has joined #ruby
iamnix has joined #ruby
skade has joined #ruby
otherj has joined #ruby
ohaibbq has joined #ruby
unreal has joined #ruby
ScottNYC has joined #ruby
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
dlitvak has joined #ruby
ur5us has joined #ruby
unreal_ has quit [Ping timeout: 272 seconds]
tenderlove has quit [Remote host closed the connection]
nertzy has joined #ruby
freerobby has joined #ruby
ScottNYC has quit [Quit: WeeChat 1.3]
blackmesa has joined #ruby
norc has joined #ruby
<norc> Hi.
Xentil2 has joined #ruby
<Xentil2> hi
bubbys has quit [Ping timeout: 250 seconds]
jessemcgilallen has joined #ruby
bubbys has joined #ruby
dlitvak has quit [Remote host closed the connection]
jas02 has quit [Quit: jas02]
unreal has quit [Read error: Connection reset by peer]
<norc> I cant figure out how to reference global variables (in particular Im interested about ruby_current_thread) using Fiddle alone. Any pointers? Ox0dea maybe?
unreal has joined #ruby
hahuang65 has quit [Ping timeout: 272 seconds]
jessemcgilallen_ has joined #ruby
hakunin has joined #ruby
ghoorst has joined #ruby
jessemcgilallen has quit [Ping timeout: 250 seconds]
jessemcgilallen_ is now known as jessemcgilallen
<ghoorst> hi! I'm trying to encrypt and decrypt using openssl, it works, but the first few characters are scrambled, how can this be?
<apeiros> ghoorst: you do something wrong. that's how.
nertzy has quit [Quit: Leaving]
colleenmcguckin has joined #ruby
<ghoorst> apeiros: obviously, but my thought was that if something regarding the encryption/decryption was wrong, nothing of the original text would come out right
ramfjord has quit [Ping timeout: 256 seconds]
huddy has joined #ruby
<hxegon> apeiros: make a gist so we can see what you are doing
<ghoorst> so I'm wondering where it might have gone wrong, encoding? File.open?
* apeiros points hxegon at the backlog
<apeiros> wrong recipient :-p
<apeiros> ghoorst: how'd we know?
<apeiros> ghoorst: reading your thoughts?
<ghoorst> hxegon: one second
<hxegon> apeiros: oops :P
brunto has joined #ruby
Moosashi has joined #ruby
Eiam has joined #ruby
shadoi has joined #ruby
zast has quit [Remote host closed the connection]
* hxegon looks up how to make /me posts
kadoppe has quit [Ping timeout: 256 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
<apeiros> by typing /me does stuff
dstarh has joined #ruby
* shevy does stuff
* apeiros thinks hxegon already figured
saddad has quit [Quit: WeeChat 1.4-dev]
* hxegon agrees with apeiros
<apeiros> shevy: lies
kadoppe has joined #ruby
<jhass> no drugs shevy!
dlitvak has joined #ruby
* hxegon puts bong under the desk
peterhil_ has quit [Ping timeout: 272 seconds]
otherj has quit [Quit: .]
<apeiros> hxegon: doesn't that make it a bit difficult?
<ghoorst> I'm sort of new to ruby and programming...
<ghoorst> so any help is much appreciated
<hxegon> apeiros: not if your desk has a bong hole
jas02 has joined #ruby
atomical_ has joined #ruby
<hxegon> ghoorst: probably can't help too much, but if I were you, I would look at 32-33 of encrypt.rb
<apeiros> hxegon: I don't think you're supposed to use a random iv to decrypt…
imperator has left #ruby ["Leaving"]
atomical has quit [Ping timeout: 250 seconds]
* apeiros returns the favor :D
dlitvak has quit [Ping timeout: 272 seconds]
<jhass> agreed, you probably need the same iv
yardenbar has joined #ruby
<jhass> don't just store a static one with the key though
zeroDivisible has joined #ruby
<ghoorst> all right, so using the same IV for encryption/decryption is required, seems fair
<ghoorst> thanks
<ghoorst> any other input on the code? style etc? is it decent?
RTG` has joined #ruby
<jhass> ghoorst: File.read and File.write should be very useful shortcuts here
akem has quit [Remote host closed the connection]
keyviewer_57179 has quit [Quit: keyviewer_57179]
<ghoorst> jhass: thanks
norc has quit [Ping timeout: 252 seconds]
<mfqr> ghoorst: What book are you reading?
lacrymology has left #ruby [#ruby]
<ghoorst> mfqr: none
<mfqr> Lovely.
<shevy> lol
<ghoorst> probably should heh
<jhass> ghoorst: ah yeah and we're all not particular crypto experts here, don't use this for anything serious, use gpg instead ;)
<ghoorst> jhass: it's not for anything serious, it's just for learning ruby and basics of symmetric cryptography
agit0 has joined #ruby
Moosashi has quit [Quit: Moosashi]
Shapeshifter has quit [Ping timeout: 245 seconds]
<jhass> ghoorst: figured just much, it's just better to always include the disclaimer ;)
ponga has quit [Quit: Connection closed for inactivity]
<ghoorst> jhass: indeed :)
nertzy has joined #ruby
<jhass> ghoorst: personally I find Base64.encode64/decode64 a lot clearer than Array#pack/unpack("m")
stannard has quit [Remote host closed the connection]
tekku is now known as tekk
<ghoorst> jhass: thanks, will definitely use that instead
Shapeshifter has joined #ruby
[Butch] has quit [Quit: I'm out . . .]
stannard has joined #ruby
akem has joined #ruby
_stu_ has quit [Quit: _stu_]
freerobby has quit [Quit: Leaving.]
KensoDev_ has quit []
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RTG` has quit [Ping timeout: 256 seconds]
juddey has joined #ruby
Xentil has quit [Quit: leaving]
DeXterbed has joined #ruby
hahuang65 has joined #ruby
* apeiros would just store it as binary
Xentil2 is now known as Xentil
freerobby has joined #ruby
davejlong has quit [Remote host closed the connection]
Cohedrin has joined #ruby
<jhass> but what if you FTP it in ascii mode!
yardenbar has quit [Ping timeout: 250 seconds]
<shevy> then you can upload text!
davejlong has joined #ruby
<hxegon> anyone have advice for testing module instance methods in isolation? I'm having trouble stubbing a method on the dummy mixin.
lacuna_ has joined #ruby
freerobby has quit [Client Quit]
<apeiros> jhass: then you're a dummbatz
[Butch] has joined #ruby
<shevy> dummmatz?
ramfjord has joined #ruby
lacuna has quit [Ping timeout: 264 seconds]
sepp2k has quit [Read error: Connection reset by peer]
zarubin has joined #ruby
dlitvak has joined #ruby
<hxegon> specifically this example: https://gist.github.com/clebrun/8339dd224a825ec0ba59
maloik has joined #ruby
jessemcgilallen has quit [Read error: Connection reset by peer]
<jhass> hxegon: .and_return("test") perhaps? it's weird
peterhil_ has joined #ruby
zarubin has quit [Ping timeout: 272 seconds]
<hxegon> jhass: trying it out...
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
<Papierkorb> hxegon: you don't have a instance of the class
<Papierkorb> hxegon: 'bar' is not a class method, but a instance method in your case.
bronson has quit [Remote host closed the connection]
JDiPierro has joined #ruby
JDiPierro has quit [Remote host closed the connection]
<Papierkorb> hxegon: if you just want to check that #to_s is called, but not override its implementation, replace the .and_return with .and_call_original
hahuang65 has quit [Ping timeout: 272 seconds]
maloik has quit [Ping timeout: 250 seconds]
JDiPierro has joined #ruby
<hxegon> Papierkorb: so I'm getting a new anonymous class, but not an instance of that class?
<Papierkorb> >> Class.new{}.inspect
<ruboto> Papierkorb # => "#<Class:0x41708e74>" (https://eval.in/482342)
<Papierkorb> hxegon: correct ^
lacuna_ has quit [Ping timeout: 256 seconds]
<Papierkorb> hxegon: the 'class Foo < bar' keyword is actually just syntactic sugar for: Foo = Class.new(Bar){ .. }
<hxegon> hmm... I'm still getting does not implement for this
benhuda has joined #ruby
<Papierkorb> hxegon: the second 'describe' should be 'context'. doesn't change any semantics here
freerobby has joined #ruby
<hxegon> Papierkorb: still getting it, but thanks for the style tip
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
<Papierkorb> hxegon: updated https://gist.github.com/Papierkorb/e56273f0da711687f72e - It works for me
<Papierkorb> "1 example, 0 failures"
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gizmore has joined #ruby
davejlong has quit [Remote host closed the connection]
atomical_ has quit [Quit: Textual IRC Client: www.textualapp.com]
speakingcode has quit [Ping timeout: 245 seconds]
speakingcode has joined #ruby
dlitvak has quit [Remote host closed the connection]
<hxegon> Papierkorb: what the hell, I pasted your example in the same file and that works
jessemcgilallen has joined #ruby
lacuna has quit [Read error: Connection reset by peer]
durant_ has joined #ruby
<durant_> Is ruby anything like C++
<Papierkorb> No.
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
bMalum has quit [Quit: bMalum]
<Papierkorb> Great. Next question.
<Papierkorb> hxegon: cheers
<Papierkorb> :P
<hxegon> Papierkorb: https://gist.github.com/anonymous/538a267c22f68b8ae7da somehow doesn't work, but I can't find a difference (that's not style)
<Papierkorb> hxegon: lil' TL;DR: If you have the same objects in multiple examples ("it"s), try to use let() instead.
peterhil_ has quit [Read error: Connection reset by peer]
hays has joined #ruby
durant_ has left #ruby ["Leaving"]
<Papierkorb> hxegon: what does it say?
peterhil_ has joined #ruby
dfockler has quit [Ping timeout: 256 seconds]
ghoorst has quit [Quit: leaving]
<hxegon> Papierkorb: what does what say?
<Papierkorb> hxegon: the error message?
casadei has joined #ruby
<hxegon> <class:...> does not implement: read
<Papierkorb> then there's no #read
bmurt has joined #ruby
_stu_ has joined #ruby
<Papierkorb> is read supposed to be a class method or a instance method?
<hxegon> Papierkorb: instance method
axl_ has joined #ruby
<Papierkorb> then it's really not there
dkphenom has joined #ruby
davejlong has joined #ruby
<Papierkorb> hxegon: the method must exist on the object.
<hxegon> Papierkorb: isn't that the purpose of allow... to receive?
<Papierkorb> you can't receive something which does not exist
<Papierkorb> it's like waiting at a post box which does not exist either.
jas02 has quit [Quit: jas02]
<hxegon> then how does your example work when klass doesn't have a #to_s?
<Papierkorb> >> Object.method :to_s
<ruboto> Papierkorb # => #<Method: Class(Module)#to_s> (https://eval.in/482354)
<Papierkorb> hxegon: ^
dlitvak has joined #ruby
centrx has joined #ruby
<Papierkorb> just provide an empty read method in the class.
Antiarc_ is now known as Antiarc
<hxegon> wow, poor choice of example method...
atomical has joined #ruby
yfeldblum has joined #ruby
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
<tubbo> yo
<tubbo> what the fuck is this bullshit
jas02 has joined #ruby
<Papierkorb> wazzup
<tubbo> Digest::MD5.new.digest "fucking anything" # => Encoding::CompatibilityError
<tubbo> wtf is that shit
davejlong has quit [Remote host closed the connection]
<tubbo> in a Haml file
<tubbo> why is MD5 now UTF-8 by default?????
<tubbo> not*
<Papierkorb> >> Digest::MD5.hexdiges "asdasdsads"
<ruboto> Papierkorb # => uninitialized constant Digest (NameError) ...check link for more (https://eval.in/482356)
<tubbo> fucking stupid
<Papierkorb> >> require 'digest'; Digest::MD5.hexdiges "asdasdsads"
<ruboto> Papierkorb # => undefined method `hexdiges' for Digest::MD5:Class (NoMethodError) ...check link for more (https://eval.in/482357)
<apeiros> because hashing is a binary based operation
<tubbo> >> require 'digest/md5'; Digest::MD5.hexdigest 'seriously fuck you ruby'
<ruboto> tubbo # => "d16a3a91bcc9b7d7b36e7013e1873ad6" (https://eval.in/482358)
<tubbo> blam. doin it.
<apeiros> though I'd expect it to just .b it
<Papierkorb> tubbo: #digest gives you the binary representation
jas02 has quit [Client Quit]
<tubbo> ugh
<tubbo> lol
<tubbo> was that always the case? i distinctly remember this being a lot easier like 2 years ago.
<apeiros> anyway, the problem is trivial to solve.
freerobby has quit [Quit: Leaving.]
<hxegon> maybe stubbing isn't what I think it is? I want to make a fake method so I can test #to_json...
<apeiros> tubbo: hm, no, I think your problem stems from how you deal with the output
<Papierkorb> hxegon: a stub: def read; end
<apeiros> because it reads utf-8 just fine.
dlitvak has quit [Ping timeout: 256 seconds]
<Papierkorb> maybe there's something more fancy than that. OTOH, it won't get much more readable than good ol' def
PlasmaStar has quit [Ping timeout: 240 seconds]
<hxegon> Papierkorb: :|
<tubbo> it is, but the fact that i had to solve it seems wrong. ruby is supposed to be utf-8 by default, all the time, everywhere...so i don't assume that i have to deal with encoding problems.
<tubbo> because i haven't really had to in a long time!
prestorium has quit [Quit: Leaving]
<tubbo> :)
<apeiros> tubbo: that makes no sense
<apeiros> digest data is *binary* data
<apeiros> you *cannot* represent it in utf-8
<Papierkorb> hxegon: also, use expect when you *expect* it to happen (so, it must happen). use allow when you allow it to happen, and then act upon it. but it may not happen, and in that case, you don't really care either.
ldnunes has quit [Quit: Leaving]
<apeiros> tubbo: did you in all seriousness embed binary as-is in a utf-8 template?
<apeiros> because frankly, that's just insane.
<Papierkorb> ^ ahahahaha
duckpuppy has quit [Ping timeout: 250 seconds]
<tubbo> apeiros: agreed...it's not a problem with the code, it's a problem with the docs. i wasn't aware digest() was returning binary data to me.
<tubbo> if i cared enough i might contribute to ruby/ruby just to say "hey, if you want a String version of this, use hexdigest"
aryaching has quit [Ping timeout: 256 seconds]
<Papierkorb> the docs could maybe add the word 'binary' ..
<apeiros> um, digest returns a string just fine
IrishGringo has joined #ruby
<apeiros> s/String/printable ascii-only string/
* apeiros prefers just using appropriate naming. .hex_digest, .binary_digest
<tubbo> apeiros: so in your world, digest() throws a NoMethodError.
<apeiros> it raises, but yes.
<hxegon> Papierkorb: thanks, I don't know why I was trying to do it that way
Moosashi has joined #ruby
<tubbo> apeiros: im not interested in discussing samantics with u
<tubbo> disgusting* sory 4 speling
<apeiros> tubbo: I noticed that semantics isn't up your alley
<tubbo> br0 do u even spel
peterhil_ has quit [Ping timeout: 250 seconds]
<Papierkorb> I feel like punching someone when s/he's using a letter as substitute for a proper word. kthxbai
centrx has quit [Remote host closed the connection]
decoponio has quit [Quit: Leaving...]
<hxegon> u mad bruh?
<tubbo> Papierkorb: well, i feel like punching people whenever they drop pronoun
<mg^> If I were implementing it from scratch, I'd want to get a digest back as its own String-like object with conversion methods (.hex!, .binary!)
<mg^> but of course that's just opinion
<tubbo> Papierkorb: but i realize it's just because y'all aren't from God's Country
* apeiros suggests the two of you get punching bags
<tubbo> and you don't have pointless chain words like "a", "or", "as", "the", etc
<Papierkorb> tubbo: instead, we've got proper health care
<tubbo> well seeing as i'm a programmer, i also have proper health care ;)
<tubbo> i just have to pay for it
<tubbo> unfortunately
* hxegon quietly puts on murica shirt and red/white/blue stunner shades
<Papierkorb> mhenrixon_: imo too verbose
Fredrich010 has quit [Remote host closed the connection]
<Papierkorb> mg^: *
Xentil has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
symm- has quit [Quit: Leaving...]
Xentil has joined #ruby
<pipework> tubbo: your employer doesn't?
Moosashi has quit [Quit: Moosashi]
jessemcgilallen has quit [Quit: jessemcgilallen]
<jhass> well, that went OT fast
<tubbo> pipework: lol they do, i just meant the gubmint doesn't
<eam> ultimately the employee is paying for any of their compensation through their labor
christiandsg has quit [Remote host closed the connection]
<pipework> eam: How "no free lunch" of you.
devoldmx has joined #ruby
PlasmaStar has joined #ruby
DavidDudson has joined #ruby
dorei has joined #ruby
hobodave_ has joined #ruby
<eam> TANSTAAFL
akem has quit [Remote host closed the connection]
<pipework> eam: What does the second letter mean?
<pipework> There is?
<pipework> Or plural?
<eam> ain't ('murica)
uri__ has joined #ruby
Fredrich010 has joined #ruby
<pipework> eam: huh.
hobodave has quit [Ping timeout: 240 seconds]
darkf has quit [Quit: Leaving]
devoldmx has quit [Ping timeout: 250 seconds]
sandstrom has joined #ruby
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
uri_ has quit [Ping timeout: 250 seconds]
colleenmcguckin has quit [Read error: Connection reset by peer]
colleenmcguckin has joined #ruby
uri__ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
maloik has joined #ruby
symm- has joined #ruby
uri_ has joined #ruby
skade has joined #ruby
naftilos76 has joined #ruby
<naftilos76> Hi, is there a gem that lets me set a terminal's cursor position or draw certain characters with certain colors on certain x,y cursor coordinates. I am talking about text mode!!! Not graphics mode.
<hxegon> naftilos76: isn't that curses?
lemur has joined #ruby
lemur has quit [Remote host closed the connection]
<hxegon> naftilos76: https://github.com/ruby/curses
<naftilos76> hxegon, not sure but let me have a look
<naftilos76> thanks
<mg^> In addition to curses, I saw another one recently that can do the basics
<mg^> can't recall the name
<zacts> hi rubyists
hahuang65 has joined #ruby
freerobby has joined #ruby
<hxegon> zacts: o/
christiandsg has joined #ruby
christiandsg has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
moeabdol has joined #ruby
sucks has joined #ruby
<naftilos76> mg^, thanks looks nice
codecop has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 250 seconds]
bronson has joined #ruby
<jhass> naftilos76: you can some stuff with ANSI codes
InvGhost has quit [Ping timeout: 250 seconds]
<naftilos76> jhass, not sure how to do that. Can you pls be more specific?
<jhass> naftilos76: google "ANSI codes ruby"
<naftilos76> ok
DeXterbed has quit [Ping timeout: 272 seconds]
bronson has quit [Ping timeout: 256 seconds]
tvw has quit [Remote host closed the connection]
ascarter has joined #ruby
goodcodeguy has joined #ruby
p0wn3d has quit [Ping timeout: 244 seconds]
BTRE has quit [Read error: Connection reset by peer]
jbrhbr has quit [Quit: Leaving.]
nerium has quit [Quit: nerium]
lemur has joined #ruby
<shevy> ncurses!
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nerium has joined #ruby
fmcgeough has joined #ruby
stannard has quit [Remote host closed the connection]
BTRE has joined #ruby
krzkrzkrz has quit [Ping timeout: 272 seconds]
stannard has joined #ruby
christiandsg has joined #ruby
InvGhost has joined #ruby
skweek has quit [Ping timeout: 256 seconds]
yfeldblum has quit [Ping timeout: 250 seconds]
shanemcd has quit [Remote host closed the connection]
shanemcd has joined #ruby
nerium has quit [Quit: nerium]
evlute has joined #ruby
<evlute> hey dudes :)
nerium has joined #ruby
<evlute> someone here who knows how to use the composite design pattern in ruby in a very easy example?
shanemcd has quit [Remote host closed the connection]
shanemcd has joined #ruby
<Papierkorb> evlute: you mean compared to Java interfaces?
podman has joined #ruby
<evlute> no, compared to nothing :) just wanna learn this pattern for school :)
<evlute> normally you have an abstract class, a leaf class and a composite class
Moosashi has joined #ruby
uri_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bMalum has joined #ruby
<Papierkorb> evlute: You can inherit from another class. there are no per-se 'abstract' classes in ruby though.
akem has joined #ruby
davedev2_ has joined #ruby
<mg^> It really is about the interfacing. You make the behavior of the individual objects and the composite object meet the expectations of the things making use of those objects.
<Papierkorb> evlute: Ruby uses mostly what we call 'duck typing'. If you have an object, which walks like a duck, and quacks like a duck, then that object *is* a duck. For this it doesn't matter if the object 'inherits' from Animal or whatever, it's a duck.
davedev24 has quit [Ping timeout: 250 seconds]
<Papierkorb> (If you're wondering: Yes, duck-typing is the official name)
thiagofm has joined #ruby
<adaedra> \_o< kwak
jgt2 has quit [Ping timeout: 272 seconds]
IrishGringo has quit [Ping timeout: 256 seconds]
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
<evlute> i tried this one as an example for composite - but i'm not sure if this goes into the right direction - http://nopaste.linux-dev.org/?878775
trautwein has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Papierkorb> ...
<evlute> ???
<Papierkorb> evlute: please see attr_accessor
<evlute> yeah i know attr_accessor to get easy access to variables :)
dkphenom has joined #ruby
spk has left #ruby ["WeeChat 1.3"]
<evlute> but how to i access objects in objects in objects?
<Papierkorb> Mh. I'm not even sure if that concept, if taken by the letter, makes sense without abstract methods
nerium has quit [Quit: nerium]
<Papierkorb> evlute: objects in objects? What do you mean?
tomchapin has joined #ruby
shanemcd has quit [Remote host closed the connection]
nerium has joined #ruby
shanemcd has joined #ruby
devgiant has joined #ruby
devgiant has quit [Read error: Connection reset by peer]
tildes has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
DavidDudson has joined #ruby
<evlute> the composite pattern makes sense for a part of relationship where every object in the "tree" is handled equaly. so i have an atomic leaf and a composite class which could have more composite classes or one or more leafs
uri_ has joined #ruby
puria has quit [Quit: Leaving]
<evlute> who do i access a composite in a composite
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mg^> the composite is a tree structure
<mg^> where a tree and a leaf have the same interface (both look like a duck)
<evlute> yeah that's what i mean
FooMunki has quit [Quit: FooMunki]
<evlute> but how to i access the tree in the tree
<evlute> to/do
<mg^> well if you do it right
<mg^> then you access it like a leaf
Moosashi has quit [Quit: Moosashi]
<mg^> e.g. if you have c = composite with a and b as children, you don't care if a is a composite and b is a leaf
<mg^> what c does with them is exactly the same
<mg^> if you implement the pattern correctly
InvGhostt has joined #ruby
<evlute> yeah in theory it is like this, but how do i implement it in ruby
moeabdol has quit [Ping timeout: 272 seconds]
<Papierkorb> attr_accessor :children; def initialize; @children = []; super; end
<mg^> exactly the same as you'd implement it in any other language. If you must have some abstract class to define your interface
<mg^> then do something like def perform; fail "implement me!"; end
shanemcd has quit [Ping timeout: 250 seconds]
DavidDud_ has joined #ruby
<evlute> why attr_accessor :children?
hahuang65 has joined #ruby
pdoherty has quit [Ping timeout: 272 seconds]
InvGhost has quit [Ping timeout: 256 seconds]
<mg^> then your composite and your individual classes inherit from that, and you deal with implementing #perform for both classes
<mg^> normally the composite would gather and compose whatever data is contained in its children
DavidDudson has quit [Ping timeout: 272 seconds]
skade has quit [Quit: Computer has gone to sleep.]
<mg^> or call the method that does the action, etc.
tildes has quit [Ping timeout: 256 seconds]
<mg^> For instance, if your objects are each steps in a process, and you have to gather performance times and execute composite or single steps. Well, you have perform and time_to_perform methods. The individuals do their thing and report what time it takes to do that thing, and the composite will implement them such that perform calls perform on all the children, and time_to_perform sums all of the time_to_perform of its children.
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nerium has quit [Quit: nerium]
<mg^> then, anything expecting to use them can call perform or time_to_perform, and the underlying object, whether a single or composite, is transparent to the user.
nerium has joined #ruby
lubarch has quit [Ping timeout: 272 seconds]
<evlute> http://nopaste.linux-dev.org/?878783 <- is this something like a composite pattern? :( sorry i'm a noob in design patterns.
<evlute> oh fuck, forget about it
htmldrum has joined #ruby
<evlute> forgot to inherit my class B ....
<evlute> i don't see the sense of this... but i have to understand it for school.... :/
rayzaum has joined #ruby
supermar_ has joined #ruby
GiveMe1Like has joined #ruby
nertzy has quit [Quit: This computer has gone to sleep]
<mg^> well, that's a start, but in order to implement the pattern, your objects have to *do* something with a well-defined interface
bMalum has quit [Quit: bMalum]
<Papierkorb> evlute: IMO it makes more sense in a language outside of ruby.
<Papierkorb> *language other than
<evlute> hmmm
<mg^> that is, they have to quack the right way whether you ask A to quack or B to quack
<evlute> hm
<mg^> and whether the object is a single or a composite does not matter to you when you ask
thelastinuit has joined #ruby
Gadgetoid has quit [Ping timeout: 246 seconds]
banister has joined #ruby
<rayzaum> algum brasileiro para me tirar uma duvida
<rayzaum> ?
banister has quit [Client Quit]
<mg^> if you ask your single duck or composite duck to quack, and you care about whether or not it was a single or a composite, you haven't implemented the pattern
<adaedra> rayzaum: in English, please.
<mg^> does that make sens?
<mg^> sense
gravspeed has joined #ruby
supermarin has quit [Ping timeout: 272 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
<evlute> you mean, if its a leaf or a composite - in the tree it does not matter, both will behave like a "duck" because from outside the tree it's not important if its a composite or leaf
<mg^> exactly
rdark has quit [Ping timeout: 260 seconds]
<gravspeed> hey guys, i'm having an issue capturing the shell output of snmpget ... | grep ...
rubie has quit [Remote host closed the connection]
moeabdol has joined #ruby
nerium has quit [Quit: nerium]
moeabdol has quit [Client Quit]
<evlute> i understand this mg^ but its hard for me to translate this to a programming language. maybe i should try java with interfaces
djbkd has joined #ruby
<hxegon> rayzaum: não há brasileiros aqui
edwinvdgraaf has quit [Remote host closed the connection]
<evlute> i don't know how i can modulate the qack method for the leaf and the composite
<gravspeed> if i run it myself it returns an integer value
<gravspeed> but inside ruby it returns nothing.
nerium has joined #ruby
ascarter has joined #ruby
duncannz has joined #ruby
<Papierkorb> evlute: No information is leaked outside of the Node (sub-)class, the user just calls #value on it and it does whatever it wants basically. Which in this case is doing a little computation
<adaedra> hxegon: what's this about?
<hxegon> adaedra: rayzaum asked a question in portuguese
<hxegon> adaedra: or rather, asked if anyone spoke portuguese here
<evlute> thank you Papierkorb - this is really interessting - study it right now
<Papierkorb> evlute: note that there's ValueNode, which is a node which has just a value, and BinaryNode, which is binary (as in 'two'), which is basically a helper to implement Sum and Multiply
_djbkd has joined #ruby
poguez_ has joined #ruby
moeabdol has joined #ruby
RTG` has joined #ruby
<adaedra> hxegon: ok
jhn has joined #ruby
Jackneill has quit [Ping timeout: 256 seconds]
bmurt has joined #ruby
djbkd has quit [Ping timeout: 256 seconds]
<Papierkorb> mg^: could you have a look, does my example match the definition? I think it does, but don't wanna teach something wrong heh ..
christiandsg has quit [Read error: Connection reset by peer]
diegoviola has quit [Quit: WeeChat 1.3]
momomomomo has joined #ruby
christiandsg has joined #ruby
<rayzaum> ok sorry, =) thanks for answer
<mg^> Papierkorb: It looks like a fine example to me.
colegatron has quit [Ping timeout: 250 seconds]
akem has quit [Remote host closed the connection]
timonv has joined #ruby
<evlute> this looks very interessting to me :) i'm facinated
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lacuna has quit [Read error: Connection reset by peer]
Gadgetoid has joined #ruby
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
berserk_ren has quit [Ping timeout: 240 seconds]
rubie has joined #ruby
_djbkd has quit [Ping timeout: 256 seconds]
DurstBur1er has quit [Ping timeout: 256 seconds]
<Papierkorb> evlute: That concept is regularly used for "ASTs", Abstract Syntax Trees. You can use an AST to 'store' instructions the computer can then evaluate (like #value does in the example). While you don't need this concept every day, it is a really elegant solution for such problems.
<mg^> ahh AST is a *perfect* example of a real-world use of this pattern
passcod has quit [Remote host closed the connection]
cloaked1 has joined #ruby
cloaked1 has quit [Changing host]
cloaked1 has joined #ruby
<mg^> basically anything that can be represented in BNF can be implemented this way
<evlute> i will memorize ast for my classmates - have to introduce this pattern
jbrhbr has joined #ruby
<mg^> er, described in BNF I should say
nerium has quit [Quit: nerium]
passcod has joined #ruby
ochkoffein has joined #ruby
maloik has quit [Ping timeout: 240 seconds]
nerium has joined #ruby
<Papierkorb> evlute: if you want a challenge (note that I don't know how far you are knowledge wise, also this requires quite some time investment), you could try implementing a calculator: Have the user input a string like "4+3*2", and then calculate the correct result. The groundwork for the computational part is what I posted. The part of getting the string into that form is where a parser comes into play, for which in turn knowing BNF is really helpful
<Papierkorb> evlute: This is an advanced topic if you're new to this, so beware.
<Papierkorb> More like a week-end project (I'm really bad at estimating this, so maybe even more) than a "2 hour challenge"
<evlute> i know the a little about bakus naur form - so this would be a great practise for me
DurstBur2er has joined #ruby
shanemcd has joined #ruby
yeticry has quit [Read error: Connection reset by peer]
jabberwock has joined #ruby
jabberwock has left #ruby ["Textual IRC Client: www.textualapp.com"]
ap4y has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yeticry has joined #ruby
sucks has quit [Remote host closed the connection]
lacuna has quit [Read error: Connection reset by peer]
sucks has joined #ruby
ESpiney has quit [Quit: Leaving]
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
duoi has joined #ruby
BTRE has quit [Ping timeout: 240 seconds]
treehug88 has quit [Quit: Textual IRC Client: www.textualapp.com]
<Papierkorb> evlute: afterwards, you can toy around with the 'parser' gem. it's a parser for ruby code. I use it for code and template instrumentation for my stuff.
shanemcd has quit [Remote host closed the connection]
<Papierkorb> (You could even cheat and use that gem, but then you'd learn nothing about parsers themselves :P)
christiandsg has quit [Remote host closed the connection]
art-solopov has joined #ruby
djbkd has joined #ruby
moeabdol has quit [Read error: Connection reset by peer]
<Papierkorb> fsck now I forgot what I was working on >_>
moeabdol has joined #ruby
kies has quit [Ping timeout: 245 seconds]
momomomomo has quit [Quit: momomomomo]
colegatron has joined #ruby
<evlute> Papierkorb: i have to thank you very much. And thanks mg^ too. Both of you put me a huge step forward.
nerium has quit [Quit: nerium]
<Papierkorb> Cheers!
<mg^> No proib
<mg^> prob
timonv has quit [Ping timeout: 256 seconds]
cjbottaro has joined #ruby
ibouvousaime has joined #ruby
nerium has joined #ruby
skade has joined #ruby
skade has quit [Client Quit]
futilegames has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jhn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ascarter has quit [Quit: Textual IRC Client: www.textualapp.com]
shanemcd has joined #ruby
DavidDud_ has quit [Quit: Goodbye all, and thankyou.]
skade has joined #ruby
djbkd has quit [Quit: My people need me...]
tomphp has joined #ruby
momomomomo has joined #ruby
shanemcd has quit [Ping timeout: 250 seconds]
calderonroberto has joined #ruby
BTRE has joined #ruby
djbkd has joined #ruby
c355E3B has quit [Quit: Connection closed for inactivity]
chadmandoo has joined #ruby
yfeldblum has joined #ruby
<chadmandoo> hey all. if i want to learn ruby on rails should I learn ruby first or dive right into ruby on rails
skweek has joined #ruby
shanemcd has joined #ruby
<hxegon> ?rails chadmandoo
<ruboto> chadmandoo, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
naftilos76 has quit [Quit: Αποχώρησε]
<hxegon> chadmandoo: but you want to get some ruby under your belt for sure
<chadmandoo> maybe i learn simultaneously
ascarter has joined #ruby
<hxegon> chadmandoo: It's not impossible, but rails by itself is already a lot, and learning that without knowing ruby basics at least is going to be challenging
fumduq has joined #ruby
Ox0dea has quit [Read error: No route to host]
<chadmandoo> so maybe ruby first then rails
<hxegon> chadmandoo: IMHO
shanemcd has quit [Remote host closed the connection]
<chadmandoo> sounds good thats what ill do. thank you
chadmandoo has left #ruby [#ruby]
<hxegon> chadmandoo: no problem.
jgpawletko has joined #ruby
TheRokh has joined #ruby
TheRokh has quit [Max SendQ exceeded]
iamnix has quit [Ping timeout: 272 seconds]
TheRokh has joined #ruby
iamnix has joined #ruby
TheRokh has quit [Max SendQ exceeded]
devoldmx has joined #ruby
TheRokh has joined #ruby
TheRokh has quit [Max SendQ exceeded]
<calderonroberto> @chadmandoo The RoR tutorial is great at providing resources. In the prerequisites you can see Michael points you in the right direction https://www.railstutorial.org/book/beginning#sec-prerequisites
TheRokh has joined #ruby
supermar_ has quit [Remote host closed the connection]
jgpawletko has quit [Quit: jgpawletko]
ap4y has quit [Quit: WeeChat 1.3]
ZeroAbility has joined #ruby
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<calderonroberto> From which I really like http://tryruby.org/levels/1/challenges/0
skweek has quit [Ping timeout: 264 seconds]
jhn has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
devoldmx has quit [Ping timeout: 250 seconds]
Mon_Ouie has joined #ruby
_djbkd has joined #ruby
_djbkd has quit [Read error: Connection reset by peer]
fmcgeough has quit [Quit: fmcgeough]
_djbkd has joined #ruby
_djbkd has quit [Client Quit]
_djbkd has joined #ruby
Contigi has joined #ruby
malconis has quit [Ping timeout: 250 seconds]
djbkd has quit [Ping timeout: 256 seconds]
circ-user-mgcmJ has joined #ruby
ramortegui has quit [Quit: Ex-Chat]
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
sandstrom has quit [Quit: My computer has gone to sleep.]
[Butch] has quit [Quit: I'm out . . .]
solars has quit [Ping timeout: 244 seconds]
uri_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davedev2_ has quit [Ping timeout: 250 seconds]
freerobby has quit [Quit: Leaving.]
TomPeed has joined #ruby
freerobby has joined #ruby
davedev24 has joined #ruby
_djbkd has quit [Quit: My people need me...]
jeips has quit [Quit: Leaving]
edwinvdgraaf has joined #ruby
dhollinger has quit [Quit: WeeChat 1.3]
lipoqil has joined #ruby
djbkd has joined #ruby
kobain has quit [Read error: Connection reset by peer]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brunto has quit [Ping timeout: 250 seconds]
synthroid has quit []
stannard has quit [Remote host closed the connection]
jgpawletko has joined #ruby
devbug has quit [Ping timeout: 244 seconds]
steffkes has quit [Ping timeout: 256 seconds]
NotTheFBI is now known as TheHackOps
TheHackOps has quit [Changing host]
TheHackOps has joined #ruby
stannard has joined #ruby
stannard has quit [Remote host closed the connection]
jimmybomb has joined #ruby
lxsameer has quit [Quit: Leaving]
jimmybomb has quit [Read error: Connection reset by peer]
hxegon has quit [Quit: leaving]
colleenmcguckin has quit []
rayzaum has quit [Quit: Leaving]
jgpawletko has quit [Quit: jgpawletko]
last_staff has quit [Quit: last_staff]
kallisti5 has quit [Remote host closed the connection]
kallisti5 has joined #ruby
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TheHackOps has quit [Read error: Connection reset by peer]
ScottNYC has joined #ruby
myztic has quit [Ping timeout: 272 seconds]
spider-mario has quit [Read error: Connection reset by peer]
art-solopov has quit [Quit: Konversation terminated!]
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jgpawletko has joined #ruby
jgpawletko has quit [Client Quit]
kobain has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
colleenmcguckin has joined #ruby
jgt2 has joined #ruby
iamnix has quit [Ping timeout: 256 seconds]
cdg has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 256 seconds]
skweek has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chandlerbing has joined #ruby
aptrcki has joined #ruby
nerium has quit [Quit: nerium]
moeabdol has quit [Quit: WeeChat 1.3]
kies has joined #ruby
nerium has joined #ruby
lkba has joined #ruby
diegoviola has joined #ruby
malconis has joined #ruby
devbug has joined #ruby
daivyk has joined #ruby
tomphp has joined #ruby
ur5us has quit [Remote host closed the connection]
cdg has joined #ruby
benhuda has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lemur has quit [Remote host closed the connection]
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Ropeney has joined #ruby
tomphp has quit [Client Quit]
<evlute> Papierkorb: are you there?
<Papierkorb> ?
tsou has quit [Remote host closed the connection]
Azure|dc has joined #ruby
<evlute> in the class sum - why do the values left and right have value as method?
supermarin has joined #ruby
<Papierkorb> evlute: have a look what type left and right have
M-shine has quit [Read error: Connection reset by peer]
M-prosodyContext has quit [Write error: Connection reset by peer]
DavidDudson has joined #ruby
malconis has quit [Ping timeout: 256 seconds]
hobodave_ has quit [Quit: Computer has gone to sleep.]
<evlute> thats the thing i don't see the relation to the value method. binarynode inhertis from node. but @left and @right are just variables of BinaryNode
Azure has quit [Ping timeout: 272 seconds]
saneax_AFK is now known as saneax
devbug has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
blub` has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
uri_ has joined #ruby
shanemcd has joined #ruby
xet7 has quit [Ping timeout: 245 seconds]
<Papierkorb> evlute: what values are those two initialized to?
<evlute> oh yes i see to ValueNode and the value method :)
blub has quit [Ping timeout: 260 seconds]
arescorpio has joined #ruby
<evlute> damn this is crazy, love it :) thank you for making me see :D
skweek has quit [Ping timeout: 250 seconds]
aptrcki has left #ruby [#ruby]
stannard has joined #ruby
<Papierkorb> np
supermarin has quit [Remote host closed the connection]
supermarin has joined #ruby
shanemcd has quit [Remote host closed the connection]
lemur has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
stannard has quit [Ping timeout: 256 seconds]
momomomomo has quit [Quit: momomomomo]
futilegames has left #ruby [#ruby]
grill has joined #ruby
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
bmurt has joined #ruby
<ramfjord> Hey guys, I've got a question about unix pipes in ruby. I've got one process reading from one DB, and another writing to a much slower DB. They are connected by a unix pipe. I want the fast DB to be able to store as much as it could want on the file system, but the process is clearly not getting scheduled once the pipe reaches a certain size. I've found that I can emulate this behavior with the following one line snippet:
<ramfjord> fork { rd.close; 100000.times { |i| wr.write "#{i}\n"; puts i if (i % 5000) == 0 } }
<ramfjord> this will print out up to 10,000 on my machine, but after that will only start printing more once I call wr.read
dimik has joined #ruby
<ramfjord> whoops - forgot the preceding line: rd, wr = IO.pipe
<Papierkorb> ramfjord: sounds like your kernel is blocking after the pipe buffer gets full
InvGhostt has quit [Ping timeout: 250 seconds]
yqt has quit [Ping timeout: 240 seconds]
mostlybadfly has joined #ruby
<ramfjord> Papierkorb: yeah, that makes sense
_stu_ has quit [Quit: _stu_]
diegoviola has quit [Ping timeout: 264 seconds]
shanemcd has joined #ruby
Mon_Ouie has quit [Ping timeout: 256 seconds]
M-mistake has joined #ruby
M-prosodyContext has joined #ruby
JDiPierro has quit [Remote host closed the connection]
chandlerbing has quit [Remote host closed the connection]
<ramfjord> hmmm, doesn't look like there's a way I can set any kind of buffer size on IO.pipe - would there likely be a way to configure this through the OS?
SCHAAP137 has quit [Quit: Leaving]
<jhass> not that will never write to disk, just use up your RAM
<jhass> *note
<ramfjord> that must be why it's faster. I guess I'll have to write to a file directly then...
peterhil_ has joined #ruby
<jhass> /proc/sys/fs/pipe-max-size seems to control the system wide limit, you still need a fcntl to set it for a particular instance and I doubt ruby exposes that
shanemcd has quit [Ping timeout: 250 seconds]
ascarter has joined #ruby
uri_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lukeasrodgers has quit [Quit: Leaving.]
<ramfjord> right - I'll have to look more into this. I don't know why I assumed a named pipe would just page to disk if necessary, and it wouldn't matter.
M-Kodo has joined #ruby
<ramfjord> I need at least 100MB for this, which shouldn't be a problem with the available RAM, but if I IO.read it into memory at the beginning I'll have to wait for the first db read to finish before I can start writing
FooMunki has joined #ruby
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
toretore has quit [Ping timeout: 256 seconds]
<jhass> you probably could have a thread and a StringIO, db -> stringio -> fifo -> db
shanemcd has joined #ruby
M-shine has joined #ruby
lemur has quit [Ping timeout: 250 seconds]
BTRE has quit [Ping timeout: 250 seconds]
<ramfjord> Process 1: (Thread A: DB -> StringIO), (Thread B: StringIO -> FIFO)
<jhass> yeah
<ramfjord> Process 2: (Thread C: FIFO -> DB2)
<ramfjord> eh, seems like it could work
bmurt has joined #ruby
ohaibbq has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
<ramfjord> not quite as clean as I was initially hoping, but I'll give it a go
djbkd_ has joined #ruby
bmurt has quit [Client Quit]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thiagofm has quit [Remote host closed the connection]
<ramfjord> ahh, nice - IO::copy_stream
<jhass> not sure that works with StringIO though
ur5us has joined #ruby
asteros has joined #ruby
axl_ has left #ruby [#ruby]
cloaked1 has quit [Ping timeout: 250 seconds]
lemur has joined #ruby
DurstBur2er has quit [Ping timeout: 272 seconds]
djbkd_ has quit [Ping timeout: 256 seconds]
evlute has quit [Ping timeout: 240 seconds]
c355E3B has joined #ruby
thiagofm has joined #ruby
DavidDudson has joined #ruby
jgt3 has joined #ruby
chandlerbing has joined #ruby
devoldmx has joined #ruby
devbug has joined #ruby
bruce_lee has joined #ruby
bb010g has joined #ruby
<ramfjord> I feel like this is going to get ugly writing to the end and reading from the front concurrently