baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.5.0, 2.4.3, 2.3.6: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby || Books: https://goo.gl/wpGhoQ
n0m4d1c_ has joined #ruby
n0m4d1c_ has quit [Read error: Connection reset by peer]
n0m4d1c has quit [Read error: Connection reset by peer]
n0m4d1c has joined #ruby
n0m4d1c has quit [Remote host closed the connection]
n0m4d1c has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
<rasterick_> newbie to Rake ... rakefile gives error instead of compiling prog after config ... any ideas please
Asher has quit [Quit: Leaving.]
apeiros_ has quit [Ping timeout: 264 seconds]
aguestuser has quit [Remote host closed the connection]
alfiemax has joined #ruby
aguestuser has joined #ruby
n0m4d1c_ has joined #ruby
mtkd has quit [Ping timeout: 240 seconds]
bigblind has quit [Ping timeout: 256 seconds]
apeiros_ has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
<miah> gist your rakefile as well as the error
mtkd has joined #ruby
<rasterick_> line 3: syntax error near unexpected token `'ALRM''
n0m4d1c has quit [Ping timeout: 248 seconds]
Asher has joined #ruby
kies has quit [Ping timeout: 255 seconds]
marxarelli is now known as marxarelli|afk
pastorinni has quit [Remote host closed the connection]
<rasterick_> am using Ruby v2.5.0 .... should i use v2.4 instead maybe ?
alfiemax has joined #ruby
apeiros_ has quit [Ping timeout: 268 seconds]
Mia has quit [Read error: Connection reset by peer]
John_Ivan has quit [Read error: Connection reset by peer]
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
jnyw has joined #ruby
zigzig has quit [Remote host closed the connection]
zigzig has joined #ruby
white_lilies has joined #ruby
vutral|kali has quit [Ping timeout: 240 seconds]
elphe has quit [Ping timeout: 276 seconds]
John_Ivan has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
alfiemax has quit [Ping timeout: 240 seconds]
elphe has joined #ruby
TomyLobo has quit [Ping timeout: 240 seconds]
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
jottr has quit [Quit: WeeChat 2.0.1]
<miah> i cant help without details
white_lilies has quit [Ping timeout: 256 seconds]
apeiros_ has joined #ruby
maum has joined #ruby
chouhoulis has joined #ruby
<rasterick_> i appreciate your help miah ... there are only 2 lines of errors ... so far , if i comment them out, i get more at line 7
<rasterick_> here are the 2 error lines :
alfiemax has joined #ruby
sylario has quit [Quit: Connection closed for inactivity]
<rasterick_> line 3: syntax error near unexpected token `'ALRM''
<rasterick_> line 3: ` if Signal.list.key?('ALRM')'
nowhere_man has quit [Read error: Connection reset by peer]
nowhere_man has joined #ruby
<rasterick_> i get those errors when typing rakefile in the dir of the configured program .. what am i missing ?
RougeR has quit [Ping timeout: 260 seconds]
quobo has quit [Quit: Connection closed for inactivity]
apeiros_ has quit [Ping timeout: 248 seconds]
<rasterick_> what other info would be helpful ?
milardovich has joined #ruby
<rasterick_> i have never used Ruby b4 ... i use GCC which produces a Makefile ... type 'make' and it compiles
<rasterick_> this program config produced a 'Rakefile' .. documentation says just type rake to compile
<rasterick_> i am lost .. thank you for your help
leitz has joined #ruby
<rasterick_> google has been unproductive also *sigh*
milardovich has quit [Ping timeout: 248 seconds]
konsolebox has quit [Ping timeout: 256 seconds]
sameerynho has quit [Ping timeout: 256 seconds]
cschneid has joined #ruby
<rasterick_> is that the proper way to execute a rakefile ??? just type rakefile in the console ?
sameerynho has joined #ruby
hahuang65 has quit [Quit: WeeChat 2.0.1]
marmorkreb has joined #ruby
alfiemax has quit [Ping timeout: 276 seconds]
cschneid has quit [Ping timeout: 256 seconds]
konsolebox has joined #ruby
<leitz> I just type rake
<leitz> But I'm a newbie.
safetypin has joined #ruby
apeiros_ has joined #ruby
Papierkorb has left #ruby ["Konversation terminated!"]
<rasterick_> yeah, it seemed simple to me also, but i am a newbie and it did not work, so i went here for help
marmorkreb has quit [Ping timeout: 268 seconds]
<rasterick_> actually i thought it would be a laughable easy question
chouhoulis has quit [Remote host closed the connection]
<rasterick_> for ppl that use Ruby
hahuang65 has joined #ruby
<leitz> what is it you're trying to do?
noobineer has joined #ruby
aguestuser has quit [Remote host closed the connection]
apeiros_ has quit [Ping timeout: 252 seconds]
<leitz> Here's my rakefile. It just runs the tests for me. https://github.com/makhidkarun/2d6_ogl_chargen/blob/master/rakefile
aguestuser has joined #ruby
<rasterick_> leitz, i am building a program, configure created a 'rakefile' instead of a 'makefile'
desperek has quit [Quit: xoxo]
<rasterick_> so to compile i need to run the 'rakefile' .. docs say just type rake
hahuang65 has quit [Client Quit]
white_lilies has joined #ruby
<rasterick_> but i get errors: line 3: syntax error near unexpected token `'ALRM'' line 3: ` if Signal.list.key?('ALRM')'
<rasterick_> i am lost as how to fix this
<leitz> How much ruby do you know?
<rasterick_> how much Ruby ? well, i installed it last night ... so very much a newbie
<rasterick_> google has been no help either *sigh* so i went here for help
<leitz> Ruby code isn't usually "compiled", more run. It is interepreted as it goes.
<leitz> So, if you write "my_code.rb" that is just "puts 'hello'" you run it with ruby my_code.rb
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
white_lilies has quit [Ping timeout: 256 seconds]
<rasterick_> all i am finding on google is how to write Ruby code ... your code looks nice btw
<leitz> Thanks! Don't look at it as the best way to code, but I enjoy it.
<rasterick_> as long as you enjoy, that is the main thing i think
<leitz> Are you trying to use rake to compile?
<leitz> Is your code on github or a gist?
<rasterick_> no, i took source code to build a program, configured it ... it produced a 'rakefile' to make the compiler (GCC) to compile the code
safetypin has quit [Quit: ZZZzzz…]
<rasterick_> i am using a released tarball, but the snapshot does the same ... it is designed to produce a rakefile
<leitz> Okay, I'm not sure I understand what that code is trying to do. Unless you're just using a rake file vice a makefile. Which is not something i'd understand.
<rasterick_> i have never used a rakefile b4 .. all my past compiles produce a 'Makefile' .. just type 'make' and it compiles the prog
iceden has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<leitz> Have you tried "rake"
<leitz> And yeah, make files can be "fun", for various interpretations of the word...
<rasterick_> yes, i tried rakefile, rake, rake rakefile, rake --trace ... i am stumped
<leitz> Odd guess, try "ruby rakefile"
<leitz> Probably won't work, but you never knwo.
<leitz> Did the rake work at all?
<rasterick_> let me find the readme link for the program, it may help a bit
<rasterick_> rakefile gives me errors : line 3: syntax error near unexpected token `'ALRM'' line 3: ` if Signal.list.key?('ALRM')'
<leitz> Also, if you run "gem list" do you see "rake" in there?
tomphp has joined #ruby
<rasterick_> yes rake is in there
<rasterick_> is it ok to paste links in here ?
tomphp has quit [Client Quit]
<leitz> Links here, yes.
<rasterick_> or should it be in a pvt window
<leitz> Some folks don't like pastebin, most use gist.
<rasterick_> ok, here is the prog readme : https://mkvtoolnix.download/doc/README.md
<leitz> Post it here. Just the linik. I accidently posted a few pages of code once...
<leitz> Only once.
<rasterick_> it is a simple txt page
<rasterick_> i think i have never used pastebin or gist ... i usually just email stuff or DCC
sanscoeu_ has joined #ruby
<leitz> No worries, that page was fine.
tomphp has joined #ruby
<leitz> Let's try gist. Go to gist.github.com and paste the rakefile into it. "Create a secret gist", and then cut and paste the really long URL here.
sanscoeur has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
sanscoeu_ has quit [Ping timeout: 265 seconds]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
milardovich has joined #ruby
<rasterick_> ok, lemme try
<rasterick_> are we able to send files directly here ?
DTZUZO has joined #ruby
cagomez has quit [Remote host closed the connection]
apeiros_ has joined #ruby
<rasterick_> you want the entire rakefile pasted there ?
n0m4d1c_ has quit [Remote host closed the connection]
tomphp has quit [Client Quit]
<leitz> Posted in the gist, not here.
<leitz> Just post the gist URL here.
<rasterick_> ok, rakefile is 41kb
<leitz> Don't be a leitz. :)
<leitz> Or, just the first few dozen lines. :)
pocketprotector has quit [Ping timeout: 248 seconds]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rasterick_> add the file or paste ... i pasted entire file
schneide_ has joined #ruby
<leitz> Paste is fine.
<rasterick_> ok, where do i get the url to send
pocketprotector has joined #ruby
cdg has joined #ruby
apeiros_ has quit [Ping timeout: 276 seconds]
<rasterick_> that github is really cool, i never used it b4
schneide_ has quit [Ping timeout: 256 seconds]
<leitz> Yup.
cdg_ has quit [Ping timeout: 248 seconds]
<leitz> Okay, maybe a "make clean" and restart the configure? Line 3-11 seem indented, like there's something before it missing.
<leitz> That, however, is just a wild guess. The "key?" is looking to see if there's an 'ALRM' in the list generated by Signal. So, what's generating the Signal?
<leitz> Or more to the point, why aren't the smart folks saying anything?
white_lilies has joined #ruby
cdg has quit [Ping timeout: 276 seconds]
<rasterick_> ohmy, that has been a problem, impossible to 'make clean' without a 'makefile' and only a 'Rakefile' but i can do this: reconfigure the program
<rasterick_> this will make a NEW 'Rakefile'
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rasterick_> gimme a few moments to do this
<rasterick_> you are very keen! i did mess with the first few lines of that code, was going to re.configure anyway
mcr1 has joined #ruby
marr has quit [Ping timeout: 260 seconds]
alfiemax has quit [Ping timeout: 265 seconds]
<rasterick_> done, here is the freshly created Rakefile: https://gist.github.com/anonymous/28030c5f0a862e81cace7e88b56f2f53
<leitz> Their git page says use make. https://github.com/Matroska-Org/libmatroska
<leitz> Unless I'm on the wrong thing.
white_lilies has quit [Ping timeout: 256 seconds]
orbyt_ has joined #ruby
<rasterick_> well, that is why i did not mention the name of the prog ... it is rather comprehensive: libmatroska is one of about 8 libs that you must build BEFORE you configure
<mcr1> https://gist.github.com/mcr/a0e003af6d3e400a7553543c19da8b95 I think that URI should strip [] from IPv6 literals. Or is it Addrinfo's fault? Where/how to file bug?
xcesariox has joined #ruby
<rasterick_> that url was no good ???
<rasterick_> i am using Ruby v2.5.0 btw .. not sure if it matters
<rasterick_> but, yes you are correct ... ALL the libs use 'make' to compile them .. it is only the final prog build that uses a Rakefile
rasterick_ has quit [Quit: Page closed]
rasterick has joined #ruby
bigblind has joined #ruby
<rasterick> drat, clicked the link and closed the freenode
<leitz> Okay, so, you have a differnet issue.
<rasterick> well, it was not me that used the ipv6
<mcr1> leitz, thanks.....
<leitz> I don't have a great answer, but here's something to note.
<rasterick> i appreciate your time and help leitz
xcesariox has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<leitz> Happy to help, BTW. I get a lot of help here myself.
drewmcmillan has joined #ruby
<rasterick> what does that snippet do ?
govg has quit [Ping timeout: 260 seconds]
<mcr1> leitz, so hostname rather than host.
dinfuehr has quit [Ping timeout: 240 seconds]
<leitz> It says that the syntax error isn't in your Signal.list.key? bit.
dinfuehr has joined #ruby
<rasterick> can you translate that to english for me please ?
govg has joined #ruby
<leitz> Sure. Your error was "syntax error". I ran the code straight in Ruby's interactive interpreter; irb. No syntax error. So my guess is that something else is trying to parse your rakefile and isn't Ruby.
<leitz> Make sense?
<leitz> If you're on Linux, try: which rake
<rasterick> yes, makes very much sense
<rasterick> well, get ready for a clear confusion ... here goes
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rasterick> i am on windows 7 64bit , running a 32bit linux bash shell, that compiles with GCC 7.2
<leitz> :)
<rasterick> and Ruby and rake are running INSIDE that bash console
bigblind has quit [Ping timeout: 268 seconds]
<leitz> In theory. That error makes me think something else is off.
<rasterick> maybe that is the prob? should i be running ruby from a CMD prompt ? but then it could not access the GCC compiler
<rasterick> what do you think is off ?? ... listening
sameerynho has quit [Ping timeout: 256 seconds]
govg has quit [Ping timeout: 264 seconds]
govg has joined #ruby
<rasterick> the only preprocessors that i know of that i have are g++ and bison
<leitz> If you run rake then it should be the ruby tool. In the directory with the rakefile you should be able to just run "rake".
CPngN has quit [Quit: The system is going down for reboot NOW!]
<leitz> The 32 vs 64 bit version thing bothers me less than the syntax error. We've shown that the syntax is fine.
<rasterick> i think i installed the Ruby 64bit version
<rasterick> but that is a good experiment .. i will install Ruby in the same tree as the program and run rake from the '.root dir
<rasterick> if that does not work i will try the 32bit ver of Ruby
<leitz> Can you install ruby via the bash shell? I don't know windows, but the issue seems to be you're not acutally using ruby/rake.
govg has quit [Ping timeout: 240 seconds]
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<leitz> That, and it's about my nappy time so I'm making less sense as I go.
<rasterick> yep, the 64bit Ruby is what i installed
<rasterick> oh !! you were VERY helpful and knowledgeable about this leitz ! Thank You! so very much!
npgm has quit [Quit: Connection closed for inactivity]
<rasterick> at lease i have some ideas how to approach this problem now .. thank you again
drewmcmillan has joined #ruby
<leitz> Wish I could have helped more. The test is just run "rake" in the directory with the rakefile.
<rasterick> and enjoy your nap ;)
<leitz> All 8 hours of it. Enjoy!
xcesariox has joined #ruby
leitz has quit [Quit: Nappy time]
<rasterick> 8pm here, im just getting started :> imma niteowl
<rasterick> lemme go try these experiments ... bbl
white_lilies has joined #ruby
rasterick has quit [Ping timeout: 260 seconds]
white_lilies has quit [Ping timeout: 248 seconds]
orbyt_ has joined #ruby
xcesariox has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aguestuser has quit [Remote host closed the connection]
xcesariox has joined #ruby
aguestuser has joined #ruby
alfiemax has joined #ruby
xcesariox has quit [Client Quit]
alfiemax has quit [Ping timeout: 264 seconds]
marmorkreb has joined #ruby
xcesariox has joined #ruby
mtkd has quit [Ping timeout: 256 seconds]
mtkd has joined #ruby
jameser has joined #ruby
MzrE has joined #ruby
arkinor has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
herbmillerjr has joined #ruby
apeiros_ has joined #ruby
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
MzrE has quit [Quit: Leaving]
apeiros_ has quit [Ping timeout: 248 seconds]
osvico has quit [Read error: Connection reset by peer]
osvico has joined #ruby
aguestuser has quit [Remote host closed the connection]
swills has quit [Quit: quit]
aguestuser has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
John_Ivan has quit [Read error: Connection reset by peer]
apeiros_ has joined #ruby
Dimik has quit [Ping timeout: 256 seconds]
white_lilies has joined #ruby
orbyt_ has joined #ruby
apeiros_ has quit [Ping timeout: 256 seconds]
white_lilies has quit [Ping timeout: 248 seconds]
ramfjord has quit [Ping timeout: 248 seconds]
woodruffw has quit [Quit: And then he took off.]
bruce_lee has quit [Remote host closed the connection]
ramfjord has joined #ruby
vutral|kali has quit [Ping timeout: 256 seconds]
xcesariox has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sedawkvim has joined #ruby
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
cdg_ has joined #ruby
amirite has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 255 seconds]
AJA4350 has quit [Quit: AJA4350]
safetypin has joined #ruby
cadillac_ has quit [Quit: I quit]
cadillac_ has joined #ruby
pastorinni has joined #ruby
apeiros_ has joined #ruby
woodruffw has joined #ruby
woodruffw has joined #ruby
noobineer has quit [Remote host closed the connection]
white_lilies has joined #ruby
kies has joined #ruby
xcesariox has joined #ruby
apeiros_ has quit [Ping timeout: 260 seconds]
white_lilies has quit [Ping timeout: 265 seconds]
safetypin has quit [Quit: ZZZzzz…]
white_lilies has joined #ruby
jnyw has quit [Quit: WeeChat 2.0.1]
davidcsi has joined #ruby
xcesariox has quit [Ping timeout: 248 seconds]
white_lilies has quit [Ping timeout: 276 seconds]
gnufied has quit [Quit: Leaving]
amirite has joined #ruby
aguestuser has quit [Remote host closed the connection]
aguestuser has joined #ruby
amirite has quit [Ping timeout: 248 seconds]
LastWhisper____ has joined #ruby
safetypin has joined #ruby
suhdood has joined #ruby
elphe has quit [Ping timeout: 248 seconds]
govg has joined #ruby
elphe has joined #ruby
elphe has quit [Ping timeout: 248 seconds]
elphe has joined #ruby
jnollette has quit [Ping timeout: 255 seconds]
_aeris_ has quit [Ping timeout: 255 seconds]
white_lilies has joined #ruby
zigzig has quit [Ping timeout: 255 seconds]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zigzig has joined #ruby
ledestin has joined #ruby
jnollette has joined #ruby
_aeris_ has joined #ruby
cdg_ has quit [Remote host closed the connection]
cdg has joined #ruby
white_lilies has quit [Ping timeout: 256 seconds]
safetypin has quit [Quit: ZZZzzz…]
darkhanb has joined #ruby
alex`` has joined #ruby
cdg has quit [Ping timeout: 276 seconds]
safetypin has joined #ruby
aguestuser has quit [Ping timeout: 255 seconds]
_aeris_ has quit [Ping timeout: 255 seconds]
jnollette has quit [Ping timeout: 255 seconds]
zigzig has quit [Ping timeout: 255 seconds]
sedawkvim has quit [Quit: Leaving]
amirite has joined #ruby
zigzig has joined #ruby
apeiros_ has joined #ruby
jnollette has joined #ruby
_aeris_ has joined #ruby
rasterick has joined #ruby
apeiros_ has quit [Ping timeout: 276 seconds]
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cschneid has joined #ruby
apeiros_ has joined #ruby
gix has joined #ruby
cschneid has quit [Ping timeout: 255 seconds]
gix- has quit [Ping timeout: 256 seconds]
apeiros_ has quit [Ping timeout: 260 seconds]
white_lilies has joined #ruby
aguestuser has joined #ruby
apeiros_ has joined #ruby
mtkd has quit [Ping timeout: 264 seconds]
ramfjord has joined #ruby
mtkd has joined #ruby
white_lilies has quit [Ping timeout: 265 seconds]
pastorin_ has joined #ruby
trautwein has quit [Quit: ZNC 1.6.5 - http://znc.in]
trautwein has joined #ruby
pastorinni has quit [Ping timeout: 260 seconds]
apeiros_ has quit [Ping timeout: 248 seconds]
ramfjord has quit [Ping timeout: 264 seconds]
amirite has quit [Ping timeout: 276 seconds]
apeiros_ has joined #ruby
spiette has quit [Ping timeout: 248 seconds]
apeiros_ has quit [Ping timeout: 256 seconds]
suhdood has quit [Remote host closed the connection]
JoshS has joined #ruby
jshjsh has quit [Ping timeout: 265 seconds]
ozzloy has joined #ruby
ozzloy has quit [Changing host]
ozzloy has joined #ruby
x77686d has quit [Quit: x77686d]
apeiros_ has joined #ruby
pastorin_ has quit [Remote host closed the connection]
white_lilies has joined #ruby
apeiros_ has quit [Ping timeout: 260 seconds]
x77686d has joined #ruby
white_lilies has quit [Ping timeout: 248 seconds]
elphe has quit [Quit: Lost terminal]
apeiros_ has joined #ruby
safetypin has quit [Quit: ZZZzzz…]
apeiros_ has quit [Ping timeout: 260 seconds]
xrlk has joined #ruby
pombreda has quit [Ping timeout: 260 seconds]
xcesariox has joined #ruby
ozzloy has quit [Remote host closed the connection]
alex`` has quit [Ping timeout: 276 seconds]
apeiros_ has joined #ruby
Nicmavr has quit [Ping timeout: 252 seconds]
xrlk has quit [Quit: HEIL HITLER]
davidcsi has quit [Ping timeout: 276 seconds]
apeiros_ has quit [Ping timeout: 264 seconds]
pombreda has joined #ruby
white_lilies has joined #ruby
nowhereman_ has joined #ruby
apeiros_ has joined #ruby
xcesariox has quit [Quit: Textual IRC Client: www.textualapp.com]
nowhere_man has quit [Ping timeout: 256 seconds]
sundhell_away is now known as sundhell
white_lilies has quit [Ping timeout: 256 seconds]
apeiros_ has quit [Ping timeout: 265 seconds]
d10n-work has quit [Quit: Connection closed for inactivity]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oleo has quit [Quit: Leaving]
milardovich has quit []
d5sx43 has joined #ruby
d5sx43 has quit [Client Quit]
davidcsi has joined #ruby
x77686d has quit [Quit: x77686d]
halt has joined #ruby
halt is now known as Guest99450
apeiros_ has joined #ruby
Slyda1 has joined #ruby
x77686d has joined #ruby
danielpclark has joined #ruby
xuyuheng has joined #ruby
<rasterick> well, i am learning about Ruby ... gem install drake worked
<rasterick> downgraded to ruby 2.3 with same results .. *sigh*
white_lilies has joined #ruby
<rasterick> drake will not run the rakefile either ... im lost
<rasterick> anyone have an idea ?
apeiros_ has quit [Ping timeout: 264 seconds]
white_lilies has quit [Ping timeout: 255 seconds]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apeiros_ has joined #ruby
rasterick has quit [Ping timeout: 260 seconds]
naprimer has quit [Ping timeout: 263 seconds]
apeiros_ has quit [Ping timeout: 248 seconds]
naprimer has joined #ruby
mtkd has quit [Ping timeout: 248 seconds]
mtkd has joined #ruby
conta has joined #ruby
apeiros_ has joined #ruby
terens has quit [Ping timeout: 264 seconds]
marmorkr_ has joined #ruby
apeiros_ has quit [Ping timeout: 260 seconds]
white_lilies has joined #ruby
marmorkreb has quit [Ping timeout: 255 seconds]
guardianx has joined #ruby
white_lilies has quit [Ping timeout: 268 seconds]
aufi has joined #ruby
Dimik has joined #ruby
za1b1tsu has joined #ruby
apeiros_ has joined #ruby
white_lilies has joined #ruby
za1b1tsu has quit [Quit: Leaving]
apeiros_ has quit [Ping timeout: 248 seconds]
amatas has joined #ruby
white_lilies has quit [Ping timeout: 264 seconds]
cadillac_ has quit [Ping timeout: 256 seconds]
x77686d has quit [Quit: x77686d]
terens has joined #ruby
x77686d has joined #ruby
darkhanb has joined #ruby
cadillac_ has joined #ruby
white_lilies has joined #ruby
jshjsh has joined #ruby
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
webhat_ is now known as webhat
LocaMocha has joined #ruby
white_lilies has quit [Ping timeout: 240 seconds]
JoshS has quit [Ping timeout: 268 seconds]
apeiros_ has joined #ruby
guardianx has quit []
LocaMocha has joined #ruby
zigzig has quit [Remote host closed the connection]
zigzig has joined #ruby
<dminuoso> apeiros_
<dminuoso> Without running this, what do you think this will do? f = proc{ return }; G = lambda{ f.(); puts "bla"}; def h; G.(); puts "woo"; end;
dionysus69 has joined #ruby
<dminuoso> Im so close to filing a bug report.
<dminuoso> This has got to be one of the weirdest inconsistencies around.
<dminuoso> And I meant what happens if you call :h
harris has joined #ruby
harris has quit [Client Quit]
<apeiros_> dminuoso: I'd expect it to raise (return in the proc)
<dminuoso> Okay.
apeiros_ is now known as apeiros
<dminuoso> apeiros: And why?
<apeiros> because return in a proc returns from the closure context
<apeiros> can I run it now? getting anxious over whether I'm having this correct :D
<dminuoso> apeiros: No you can not.
<dminuoso> So
<apeiros> with lambda iirc the return would work
<dminuoso> def f proc{ return }; end; G = lambda{ f.(); puts "bla"}; def h; G.(); puts "woo"; end; h()
<dminuoso> This?
<apeiros> the proc{return} returns from closure context, so returns from f
<dminuoso> apeiros: It's surprising as heck that dont think it will properly return from the lambda.
<dminuoso> The first.
<dminuoso> *you
<apeiros> so not entirely sure how that'd work. probably still a jumperror since f is gone at the point you run the proc?
<apeiros> oh wow, the first one doesn't raise
<apeiros> my world is shaking :D
ahrs has quit [Read error: Connection reset by peer]
<dminuoso> No both throw.
<dminuoso> >> f = proc{ return }; G = lambda{ f.(); puts "bla"}; def h; G.(); puts "woo"; end; h()
<ruby[bot]> dminuoso: # => unexpected return (LocalJumpError) ...check link for more (https://eval.in/952631)
x77686d has quit [Quit: x77686d]
<dminuoso> >> def f; proc{ return }; end; G = lambda{ f.(); puts "bla"}; def h; G.(); puts "woo"; end; h()
<apeiros> which ruby?
<ruby[bot]> dminuoso: # => unexpected return (LocalJumpError) ...check link for more (https://eval.in/952632)
<dminuoso> ruby[bot]: All of them
Kero has joined #ruby
bauruine has joined #ruby
<apeiros> I copy pasted your first one and get :h in both, 2.3.5 and 2.5
<apeiros> I'm confused now
ahrs has joined #ruby
andikr has joined #ruby
<dminuoso> apeiros: I forgot h() in the inital example.
<dminuoso> The :h is just from defining that method at the end.
<apeiros> aha!
<apeiros> mind you, I just got up. literally 5min ago :D
Slyda1 has quit [Ping timeout: 248 seconds]
<dminuoso> That's fine, I got up 30 minutes ago
alex`` has joined #ruby
<apeiros> my bootup process > 30min
troys has quit [Quit: Bye]
<apeiros> and I haven't had coffee yet!
<apeiros> (though, I don't drink coffee, at all. that might have something to do with it…)
davidcsi has quit [Ping timeout: 248 seconds]
Slyda1 has joined #ruby
x77686d has joined #ruby
white_lilies has joined #ruby
guardianx has joined #ruby
clemens3 has joined #ruby
guille-moe has joined #ruby
white_lilies has quit [Ping timeout: 265 seconds]
TomyLobo has joined #ruby
<dminuoso> apeiros: I think return is so weird and hard to understand.
<dminuoso> Well.
<apeiros> just use lambda instead of proc and be happy :-p
<dminuoso> apeiros: That's what Im doing already. However, core forces me to use blocks left and right which behave just as badly.
<dminuoso> apeiros: And I dont use my Q library everywhere yet.
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso> But.. that reminds me. One more thing to test.
<dminuoso> >> def f; lambda{ return }; end; G = lambda{ yield }; def h; G.(&f()); puts "woo"; end; h()
<ruby[bot]> dminuoso: # => no block given (yield) (LocalJumpError) ...check link for more (https://eval.in/952669)
<dminuoso> Say what?
schneide_ has joined #ruby
<dminuoso> >> G = lambda{ yield }; def h; G.(&->{ return }); puts "woo"; end; h()
<ruby[bot]> dminuoso: # => no block given (yield) (LocalJumpError) ...check link for more (https://eval.in/952670)
<dminuoso> I guess yield only works in methods
<dminuoso> >> def f; lambda{ return }; end; def g; yield; end; def h; g(&f()); puts "woo"; end; h()
<ruby[bot]> dminuoso: # => woo ...check link for more (https://eval.in/952671)
<dminuoso> >> def f; proc{ return }; end; def g; yield; end; def h; g(&f()); puts "woo"; end; h()
<ruby[bot]> dminuoso: # => unexpected return (LocalJumpError) ...check link for more (https://eval.in/952672)
ozzloy has joined #ruby
ozzloy has joined #ruby
ozzloy has quit [Changing host]
<dminuoso> >> def f; proc{ return }; end; def g(&blk); blk.call; end; def h; g(&f()); puts "woo"; end; h()
<ruby[bot]> dminuoso: # => unexpected return (LocalJumpError) ...check link for more (https://eval.in/952673)
<apeiros> yes, with proc/lambda &block syntax is required
<dminuoso> So I guess I could live if I used &lambdas
<apeiros> yield too works with the context. otherwise things like `def foo; @bar.each do |x| yield(x) end; end` would not work
<dminuoso> That seems to behave nicely.
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso> I want list comprehensions. :(
<dminuoso> Oh goodie!
darkhanb has joined #ruby
<apeiros> I'm not sure I should read that code
x77686d has quit [Quit: x77686d]
<dminuoso> That's one heck of a trick.
<dminuoso> You should.
<apeiros> I mean it starts with $stack, $draws
<dminuoso> Its freaking amazing.
schneide_ has quit [Ping timeout: 248 seconds]
<dminuoso> Somethings going on. What are +@ and -@ ?
<dminuoso> Ohh unary nevermind.
arkinor has joined #ruby
x77686d has joined #ruby
arkinor has quit [Read error: Connection timed out]
orbyt_ has joined #ruby
<dminuoso> Especially this is cool: [i ** 2 / 3 | i <- [3,6..100], :even?]
tpendragon has quit [Remote host closed the connection]
giraffe has quit [Remote host closed the connection]
cschneid has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
konsolebox has quit [Ping timeout: 256 seconds]
konsolebox has joined #ruby
guardianx has quit []
za1b1tsu has joined #ruby
cschneid has quit [Ping timeout: 256 seconds]
white_lilies has joined #ruby
konsolebox has quit [Ping timeout: 248 seconds]
_main_ has joined #ruby
oetjenj has joined #ruby
konsolebox has joined #ruby
white_lilies has quit [Ping timeout: 240 seconds]
guille-moe has quit [Ping timeout: 255 seconds]
__main__ has quit [Ping timeout: 240 seconds]
_main_ is now known as __main__
ramfjord has joined #ruby
oetjenj has quit [Client Quit]
<apeiros> andkerosine… that nick sounds familiar
phate408 has joined #ruby
claudiuinberlin has joined #ruby
justinfaler has quit [Quit: justinfaler]
xuyuheng_ has joined #ruby
__main__ has quit [Read error: Connection reset by peer]
ramfjord has quit [Ping timeout: 255 seconds]
xuyuheng has quit [Ping timeout: 240 seconds]
traxnov has joined #ruby
__main__ has joined #ruby
TomyLobo has quit [Ping timeout: 276 seconds]
vondruch has joined #ruby
traxnov has quit [Client Quit]
mtkd has quit [Ping timeout: 256 seconds]
schneide_ has joined #ruby
reber has joined #ruby
mtkd has joined #ruby
Dimik has quit [Ping timeout: 256 seconds]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guille-moe has joined #ruby
aupadhye has joined #ruby
x77686d has quit [Quit: x77686d]
za1b1tsu has quit [Remote host closed the connection]
atchoum has quit [Ping timeout: 256 seconds]
sylario has joined #ruby
x77686d has joined #ruby
agent_white has joined #ruby
<terens> hello
tvw has joined #ruby
devil_tux has joined #ruby
xuyuheng_ has quit [Read error: Connection reset by peer]
KeyJoo has joined #ruby
guille-moe has quit [Ping timeout: 248 seconds]
Mike11 has joined #ruby
white_lilies has joined #ruby
xuyuheng_ has joined #ruby
zapata has quit [Read error: Connection reset by peer]
zapata has joined #ruby
white_lilies has quit [Ping timeout: 252 seconds]
n13z has quit [Remote host closed the connection]
guille-moe has joined #ruby
maum has quit [Remote host closed the connection]
bijan_ has joined #ruby
mikecmpbll has joined #ruby
zigzig has quit [Remote host closed the connection]
zigzig has joined #ruby
n13z has joined #ruby
Skarlso has joined #ruby
bijan__ has joined #ruby
yitsushi has joined #ruby
TomyWork has joined #ruby
bijan__ has quit [Client Quit]
x77686d has quit [Quit: x77686d]
x77686d has joined #ruby
x77686d has quit [Client Quit]
bijan__ has joined #ruby
m4rCsi has quit [Quit: No Ping reply in 180 seconds.]
m4rCsi has joined #ruby
conta1 has joined #ruby
livcd has quit [Changing host]
livcd has joined #ruby
ramfjord has joined #ruby
anisha has joined #ruby
guille-moe has quit [Ping timeout: 265 seconds]
ramfjord has quit [Ping timeout: 248 seconds]
<terens> hi
_main_ has joined #ruby
oetjenj has joined #ruby
__main__ has quit [Ping timeout: 276 seconds]
_main_ is now known as __main__
white_lilies has joined #ruby
RougeR has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
__main__ has quit [Read error: Connection reset by peer]
white_lilies has quit [Ping timeout: 248 seconds]
__main__ has joined #ruby
<terens> Suppose I have a class called Client. This class can be instantiated. Also It will create instances for some XYService classes. Now lets suppose I have a generic MessageHandler class.When a MessageHandler will process a message how can it find the instance of services in client?
<dminuoso> terens: Look into reactor pattern, like with em.
<terens> I use EM but I dont get how it would help
<terens> My problem is more like "dependecy injection"
iron_houzi has left #ruby ["WeeChat 2.0.1"]
<dminuoso> terens: No my point is: The pattern itself, not the gem.
<dminuoso> terens: You could simply maintain a registry in your dispatcher.
<dminuoso> terens: It's not exactly the dispatchers job to "be able and find all services", it's rather the consumers job to register any desired handlers.
<terens> Yeah handlers is ok. But lets say I have a handler XYMessageHandler... So this handler should call XYService instance. My problem is how it is better to get this instance from Client class.
guille-moe has joined #ruby
tomphp has joined #ruby
phate408 has quit [Remote host closed the connection]
marr has joined #ruby
Serpent7776 has joined #ruby
white_lilies has joined #ruby
jaruga has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Cavallari has joined #ruby
white_lilies has quit [Ping timeout: 248 seconds]
DTZUZO has quit [Ping timeout: 256 seconds]
x77686d has joined #ruby
za1b1tsu has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guille-moe has quit [Ping timeout: 256 seconds]
Mia has quit [Read error: Connection reset by peer]
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
r3dc0d3r has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Junaos has quit [Ping timeout: 240 seconds]
ldnunes has joined #ruby
Junaos has joined #ruby
guille-moe has joined #ruby
mtkd has quit [Ping timeout: 264 seconds]
mtkd has joined #ruby
Junaos has quit [Ping timeout: 265 seconds]
jaruga has quit [Quit: jaruga]
ramfjord has joined #ruby
Junaos has joined #ruby
heftig has quit [Remote host closed the connection]
jaruga_ has joined #ruby
heftig has joined #ruby
white_lilies has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
bijan__ is now known as bijan_awaaaay
bijan_ has quit [Remote host closed the connection]
bijan_awaaaay has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
white_lilies has quit [Ping timeout: 240 seconds]
cdg has joined #ruby
xuyuheng_ has quit [Ping timeout: 256 seconds]
cdg has quit [Ping timeout: 252 seconds]
anisha has quit [Quit: This computer has gone to sleep]
mikecmpbll has joined #ruby
AJA4350 has joined #ruby
im0nde has joined #ruby
milardovich has joined #ruby
<soahccc> I already thought that it might not work but is it "right" that constants defined in an instance_eval vanish into nothingness?
white_lilies has joined #ruby
<soahccc> ups, rather class_eval, `self::CONSTANT = value` works though smh
Cavallari has quit [Quit: Cavallari]
white_lilies has quit [Ping timeout: 256 seconds]
jamesaxl has joined #ruby
<dminuoso> soahccc: Can you give a concrete code example?
white_lilies has joined #ruby
xfbs has joined #ruby
<soahccc> dminuoso: I'm just playing with an idea so bear with me and this dirtyness :) https://gist.github.com/2called-chaos/2fd69601962e7e0866fd9fc49ccfb3af
<soahccc> dminuoso: I get that constants are lexically scoped but after the class eval the non-self:: constants are just gone, not in Module.constants anymore
white_lilies has quit [Ping timeout: 268 seconds]
<dminuoso> soahccc: Can you make a working testcase?
<dminuoso> There's some stray constant Tcomp in there. I'd like to understand what you are doing
<dminuoso> soahccc: Because my minimal testcase for "setting constants in class_eval" works just fine:https://eval.in/952858
za1b1tsu has quit [Remote host closed the connection]
<dminuoso> For a really minimal testcase.
eroux has quit [Remote host closed the connection]
tomphp has joined #ruby
ferr1 has joined #ruby
<soahccc> dminuoso: hmm is it possible that pry is causing that?
ferr1 has left #ruby [#ruby]
<soahccc> I don't have this issue with a minimal example but what on earth could cause them to vanish here? It's one process, one thread, nothing fancy... https://gist.github.com/2called-chaos/c27eb8fc0b7e3fb179c978f286e81145
x77686d has quit [Quit: x77686d]
<dminuoso> soahccc: You are in different contexts.
<dminuoso> soahccc: Please check the current
<dminuoso> &ri Module#nesting
<`derpy> No results
<dminuoso> Err
<dminuoso> #ri nesting
<dminuoso> ri nesting
<dminuoso> &ri nesting
<dminuoso> &ri Module.nesting
Ishido has joined #ruby
eroux has joined #ruby
* dminuoso kicks `derpy
<dminuoso> soahccc: This is also hinted at by different `self` inspection in pry
<dminuoso> [1] pry(SMR::Plugin::MapchooserExtended)>
<dminuoso> [2] pry(SMR)>
amatas_ has joined #ruby
<soahccc> yeah but Module.constants always shows a list of top level constants, no?
<dminuoso> soahccc: No.
<dminuoso> soahccc: It shows the constants available from the current nesting.
<dminuoso> Whereas Module.nesting shows the current nesting.
<soahccc> Alright, I mean I have to use self:: anyway I suppose but I was curious as to where those constants ended up since it wasn't on self context
<soahccc> thanks :)
<dminuoso> soahccc: constants are basically class instance variables if you want.
<soahccc> yeah but this lexical scope lookup thing is confusing sometimes
marmorkr_ has quit [Remote host closed the connection]
<dminuoso> There's no "top level constants" so to speak
<dminuoso> In truth ::Foo is just shorthand for ::Object::Foo
desperek has joined #ruby
conta1 has quit [Quit: conta1]
<soahccc> yeah now that I think about it. But what I meant is that even though code get's eval'd somewhere, constant lookup is not relative to that context but where it was defined, e.g. the lookup scope is defined by where the code is written
<soahccc> and the quirk with constant lookup and "shorthand class/module notation" aka class Foo::Bar::Baz
<dminuoso> soahccc: I dont follow.
white_lilies has joined #ruby
justinweiss has quit []
justinweiss has joined #ruby
<dminuoso> soahccc: Do you mean const lookup when you explicitly name constants?
avdi has quit []
avdi has joined #ruby
<soahccc> dminuoso: if you define a nested class or module in one line with the double colons the lookup/nesting is different as if you write them in multiple lines without the colons, you know what I mean? :D
thinkpad has quit [Quit: lawl]
<dminuoso> soahccc: Yes.
<dminuoso> ?nesting
<ruby[bot]> dminuoso: I don't know anything about nesting
<dminuoso> Mmm. We have a factoid for this.
<dminuoso> soahccc: const lookup is a non-intuitive
<dminuoso> soahccc: and its not about where the code is defined
<dminuoso> soahccc: nesting is essentially a stack that is modified according to ruby code
<dminuoso> it doesn't relate to what a class _is_, but its a context of the current execution
<dminuoso> asm>> class Foo; puts 1; end
<ruby[bot]> dminuoso: I have disassembled your code, the result is at https://eval.in/952911
white_lilies has quit [Ping timeout: 248 seconds]
<dminuoso> soahccc: defining a class causes :Foo to be pushed to nesting, leaving :Foo pops it.
<dminuoso> same goes with `class << foo` (there the singleton class gets pushed)
<dminuoso> soahccc: and for class_eval the receiver is pushed
<dminuoso> but only if you specify a string arugment
thinkpad has joined #ruby
<soahccc> I guess that's the gotcha with my evals :)
apparition has joined #ruby
thinkpad has quit [Client Quit]
<soahccc> Btw I'm trying to evaluate if I'm capable of writing a sortof transcompile from and with ruby... Guess I'm missing a grade for that
<dminuoso> soahccc: So basically instance/class_eval with blocks _dont_ push nesting.
<dminuoso> and thats what trips you up
gr33n7007h has joined #ruby
gr33n7007h is now known as al2o3-cr
<soahccc> and what about `class Foo::Bar` vs `class Foo; class Bar` and nesting?
<dminuoso> soahccc: It might be easier to compile straight to YARV
jameser has joined #ruby
<dminuoso> soahccc: Like I said: Each time a "class is opened" that class is pushed to nesting.
<apeiros> soahccc: they differ in how a constant is searched
<apeiros> Module.nesting can be used to inspect the "search path" for constants
<dminuoso> soahccc: the first pushes "Foo::Bar", the second pushes "Foo", and when it opens Bar it pushes "Bar"
<apeiros> be aware though that it, similarly to e.g. __LINE__, depends on the location it's being called
<dminuoso> Not exactly location
schaary has quit []
<soahccc> I see, i find that kindof annoying at times to be honest, so much indentation just for that
<dminuoso> more like it depends on how you end up in the line of code
adambeynon has quit []
schaary has joined #ruby
adambeynon has joined #ruby
<dminuoso> soahccc: Just fully qualify constant names.
<dminuoso> class Foo::Bar; puts ::Foo::M; end
<dminuoso> This is fine
<soahccc> dminuoso: and I was hoping to get away with a DSL but starting with keywords I'm kinda screwed already
al2o3-cr has quit [Client Quit]
<soahccc> yeah I know but do you really do that? fully address every class everytime?
<apeiros> dminuoso: if by "how you end up" you mean "callstack", then I disagree. Module.nesting depends on lexical locality.
gr33n7007h has joined #ruby
gr33n7007h is now known as al2o3-cr
jameser has quit [Ping timeout: 240 seconds]
<dminuoso> apeiros: Let me prove this.
bigblind has joined #ruby
John_Ivan has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
ams__ has joined #ruby
<dminuoso> apeiros: https://eval.in/952935
<dminuoso> apeiros: It's a runtime thing.
John_Ivan has quit [Remote host closed the connection]
<dminuoso> Not lexical.
John_Ivan has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
<dminuoso> apeiros: Ruby has a stack machine hidden somewhere that manages soley the nesting.
jameser has joined #ruby
<dminuoso> Same goes for `class << a` as a less exotic example
<dminuoso> Oh wait..
pizzaops has quit []
<apeiros> string interpolation seems to be handled differently. interesting. I did not expect that to result in [A]
<apeiros> compare with: `A.class_eval do p Module.nesting end`
pizzaops has joined #ruby
<dminuoso> apeiros: indeed.
<dminuoso> apeiros: yield_under is very different from eval_under
tcopeland has quit [Quit: tcopeland]
<apeiros> haven't played with yield_under/eval_under yet
<dminuoso> apeiros: They are the underyling implementations for eval'ing blocks/strings
<apeiros> oh, C?
<dminuoso> Yeah
<apeiros> thought it was a ruby 2.5 thing
andikr has quit [Remote host closed the connection]
<apeiros> string eval is actually the first thing I see manipulating nesting. none of the block form evals do afaik.
thinkpad has joined #ruby
<dminuoso> apeiros: But I kind of love that "class_eval" kind of runs inside the class context. But only kind of. Keeps you awake.
<apeiros> I still want an universal eval, where you can set all the scopes ruby has.
Mike11 has quit [Ping timeout: 260 seconds]
<dminuoso> apeiros: May be simplest to show how nesting is determined: https://github.com/ruby/ruby/blob/trunk/eval.c#L329-L344
<dminuoso> those crefs are a runtime thing
Psybur has joined #ruby
Psybur has joined #ruby
Psybur has quit [Changing host]
Strepsils has joined #ruby
Psybur_ has joined #ruby
<dminuoso> apeiros: And from browsing through the source code, it might be possible to have weird interaction when dealing with iseq streams too.
amatas_ has quit [Quit: amatas_]
Psybur has quit [Ping timeout: 276 seconds]
white_lilies has joined #ruby
<dminuoso> More fun stuff
Psybur_ has quit [Ping timeout: 276 seconds]
oetjenj has joined #ruby
<dminuoso> Likewise lexical scope couldn't explain this, apeiros: https://eval.in/952964
white_lilies has quit [Ping timeout: 256 seconds]
drewmcmillan has joined #ruby
<apeiros> dminuoso: why not?
<apeiros> nesting is precisely [a.singleton_class], which is where you lexically are at
zautomata has joined #ruby
zautomata has quit [Changing host]
zautomata has joined #ruby
goatish has joined #ruby
<dminuoso> apeiros: `a` being some dynamic value
<dminuoso> this is kind of the definition of dynamic scope
<dminuoso> `a` could even be any valid ruby expression
<apeiros> ok, I guess we have a terminology issue here.
trautwein has quit [Quit: ZNC 1.6.5 - http://znc.in]
<dminuoso> lexical scope means if you can resolve bindings or whatever based on lexical context, i.e. it can happen during compilation
<dminuoso> kind of how variables are lexically resolved in ruby
<apeiros> point is: you can't create a nesting (other than string eval, which makes some sense since that's the same, or at least immitating, how literal code is interpreted)
<apeiros> the way your code is written matters, not how you invoke it. it's not the callstack which matters.
<dminuoso> yes you can.
<apeiros> I don't have any better terms to explain what I mean
<apeiros> other than string eval?
<dminuoso> class << a; class << b; class << c; /* execute code with your arbitrary fun nesting */ end; end; end;
<dminuoso> Albeit, whether this is sensible is a different question entirely
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> yes, you're using syntax there. not callstack.
<dminuoso> asm>> class << a; end
<ruby[bot]> dminuoso: I have disassembled your code, the result is at https://eval.in/952971
<dminuoso> apeiros: `class` is not just syntax, it compiles into `defineclass`, which is callstack.
RougeR has quit [Ping timeout: 240 seconds]
<apeiros> *sob*
<apeiros> which is *not reachable from ruby*
<dminuoso> mmm
<dminuoso> apeiros: I suppose you could just gen yarv ops? :P
<dminuoso> We can load arbitrary ISeqs nowadays
<apeiros> …
<dminuoso> apeiros: But I get your point
<apeiros> I give up :-p
lipoqil has quit []
dionysus69 has quit [Ping timeout: 248 seconds]
lipoqil has joined #ruby
guille-moe has quit [Ping timeout: 240 seconds]
guille-moe has joined #ruby
<dminuoso> apeiros: https://eval.in/952979
<dminuoso> This should be a pattern.
nowhereman_ has quit [Ping timeout: 248 seconds]
cdg has joined #ruby
tobiasvl has quit [Quit: Power off]
mtkd has quit [Ping timeout: 252 seconds]
deimos has quit []
deimos has joined #ruby
mtkd has joined #ruby
moei has joined #ruby
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has quit [Ping timeout: 255 seconds]
charles81_ has quit []
manveru has quit []
charles81_ has joined #ruby
bcavileer has quit []
manveru has joined #ruby
bcavileer has joined #ruby
tomeaton17 has left #ruby ["WeeChat 2.0.1"]
jeffreylevesque has quit [Ping timeout: 256 seconds]
rfv has quit []
rfv has joined #ruby
white_lilies has joined #ruby
RougeR has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
skmp has quit []
skmp has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cstrahan has quit []
cstrahan has joined #ruby
white_lilies has quit [Ping timeout: 256 seconds]
ziadoz has joined #ruby
drewmcmillan has joined #ruby
ziadoz has quit [Client Quit]
ewilliam has quit []
ewilliam has joined #ruby
bijan__ has joined #ruby
BuildTheRobots has quit []
BuildTheRobots has joined #ruby
pfg has quit []
pfg has joined #ruby
Psybur_ has joined #ruby
nowhereman_ has joined #ruby
jcalla has joined #ruby
tvl has joined #ruby
tvl is now known as tobiasvl
yohji has joined #ruby
synthroid has joined #ruby
Psybur_ is now known as Psybur
Psybur has quit [Changing host]
Psybur has joined #ruby
bijan__ has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
stormpack has joined #ruby
rwb has quit [Ping timeout: 260 seconds]
tcopeland has joined #ruby
Yonk has quit []
Yonk has joined #ruby
Xentil has joined #ruby
white_lilies has joined #ruby
drewmcmillan has quit [Read error: Connection reset by peer]
white_lilies has quit [Ping timeout: 256 seconds]
drewmcmillan has joined #ruby
shinnya has joined #ruby
codepete has quit []
codepete has joined #ruby
jeffreylevesque has joined #ruby
Slyda1 has quit [Ping timeout: 265 seconds]
Bosma has quit []
Bosma has joined #ruby
danzilio has quit []
danzilio has joined #ruby
stormpack_ has joined #ruby
Travis-42 has quit []
bigblind has quit [Ping timeout: 255 seconds]
Travis-42 has joined #ruby
ltt has joined #ruby
ta__ has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
stormpack has quit [Ping timeout: 265 seconds]
jameser_ has joined #ruby
jameser has quit [Ping timeout: 255 seconds]
rrutkowski has joined #ruby
jimeh has quit []
jimeh has joined #ruby
rrutkowski has quit [Client Quit]
rrutkowski has joined #ruby
cdg has joined #ruby
oleo has joined #ruby
sundhell is now known as sundhell_away
jottr has joined #ruby
govg has quit [Ping timeout: 255 seconds]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has quit [Ping timeout: 240 seconds]
govg has joined #ruby
conta has quit [Ping timeout: 268 seconds]
c0mrad3 has joined #ruby
conta has joined #ruby
konsolebox has quit [Ping timeout: 240 seconds]
haylon has joined #ruby
konsolebox has joined #ruby
rrutkowski has quit [Ping timeout: 276 seconds]
jcalla has quit [Ping timeout: 248 seconds]
white_lilies has joined #ruby
jcalla has joined #ruby
bigblind has joined #ruby
amirite has joined #ruby
giraffe has joined #ruby
conta has quit [Ping timeout: 276 seconds]
tpendragon has joined #ruby
ferox has joined #ruby
white_lilies has quit [Ping timeout: 255 seconds]
cdg has joined #ruby
rwb has joined #ruby
jameser_ has quit [Remote host closed the connection]
jameser has joined #ruby
xuyuheng_ has joined #ruby
<kke> is there some thread safe shared hash-like thing that can be used with eventmachine?
xuyuheng_ has quit [Ping timeout: 255 seconds]
<dminuoso> kke: check out concurrent-ruby
dionysus69 has joined #ruby
iloveitaly has joined #ruby
iloveitaly has quit [Client Quit]
<kke> hmm, right, so i can use Concurrent::Hash without using the rest of the concurrent-ruby package
DLSteve_ has joined #ruby
n0m4d1c has joined #ruby
gnufied has joined #ruby
shinnya has quit [Ping timeout: 248 seconds]
oetjenj has joined #ruby
n0m4d1c has quit [Remote host closed the connection]
ptr4ce has joined #ruby
white_lilies has joined #ruby
ferox_hacker has joined #ruby
ferox has quit [Read error: Connection reset by peer]
white_lilies has quit [Ping timeout: 240 seconds]
<dminuoso> kke: You can simply just require 'concurrent/hash'
ramfjord has joined #ruby
haylon has quit [Remote host closed the connection]
marmorkreb has joined #ruby
griffindy has joined #ruby
devil_tux has quit [Quit: leaving]
amatas_ has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
milardovich has quit []
ltt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
white_lilies has joined #ruby
griffindy has quit [Quit: Textual IRC Client: www.textualapp.com]
guille-moe1 has joined #ruby
mtkd has quit [Ping timeout: 260 seconds]
ltt has joined #ruby
mtkd has joined #ruby
JJonah has quit []
JJonah has joined #ruby
ferox_hacker has quit [Ping timeout: 256 seconds]
Papierkorb has joined #ruby
guille-moe has quit [Ping timeout: 240 seconds]
guille-moe1 is now known as guille-moe
Diabolik_ has quit []
Diabolik_ has joined #ruby
Rapture has joined #ruby
banisterfiend has joined #ruby
jameser has quit [Ping timeout: 255 seconds]
jameser has joined #ruby
workmad3 has joined #ruby
bmurt has quit [Ping timeout: 268 seconds]
Psybur has quit [Ping timeout: 255 seconds]
LastWhisper____ has joined #ruby
raggi has quit []
bigblind has quit [Ping timeout: 276 seconds]
raggi has joined #ruby
<schneide_> Hey guys, how can I check if I'm inside a ruby project and get the main project path
Papierkorb has left #ruby ["Konversation terminated!"]
<schneide_> I'm thinking into searching for Gemfile backwards in every directory
<schneide_> and if found one to return the patch where it's found
<schneide_> but I'm new to ruby and don't know how to implement that
<apeiros> what defines whether you're inside "a ruby project"?
<apeiros> and what is "I"? the currently evaluated file? the working directory? something else?
bijan__ has joined #ruby
bijan__ is now known as bijan_awaaaay
bijan_awaaaay is now known as bijan__
<schneide_> well as I said, the presence of Gemfile, if found in parents directories then return that one path
<apeiros> ok. and the second part? parent directory of what?
<apeiros> working directory?
<schneide_> for example if I'm running the script from /home/me/project/ruby/lib/scripts/ and Gemfile lives in /home/me/project/ruby/Gemfile then the function should return /home/me/project/ruby
micalexander has quit []
ltt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brendan- has joined #ruby
micalexander has joined #ruby
r3my has quit []
<schneide_> it should recursively check every directory: /home/me/project/ruby/lib/scripts/, /home/me/project/ruby/lib/, /home/me/project/ruby/, /home/me/project/, /home/me/, /home/, / and raise something if no Gemfile found
<apeiros> I'll repeat: every directory *relative to what*?
r3my has joined #ruby
<schneide_> to the $(pwd)
<apeiros> you can run /home/me/project/ruby/lib/scripts/foo from /
<apeiros> Dir.getwd + File.dirname will help you. Pathname might have useful methods too.
bigblind has joined #ruby
ecuanaso has joined #ruby
ptr4ce has quit [Remote host closed the connection]
<schneide_> hm ok
<schneide_> is there a better terminal for ruby than irb?
<schneide_> I use IPython when working with python and it's powerful
<schneide_> is there something similar for ruby?
<apeiros> I don't know ipython. but pry is generally regarded as the better irb
<dminuoso> ?pry
<ruby[bot]> Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
<dminuoso> See. It's better.
<schneide_> oh, thank you
<schneide_> I had it installed already :D
<mikecmpbll> i know style guides are just guides blah blah blah, but when i come across something that is discouraged, it makes me wonder if there's a better way to do it. i have a case statement with an empty `when` clause, e.g. https://gist.github.com/mikecmpbll/ca1a60c6621a2b7ef9b8b32a4bd3cc89
<mikecmpbll> however, with the else clause the empty when clause becomes important.
dionysus69 has quit [Ping timeout: 265 seconds]
<mikecmpbll> one of the causes in my when is genuinely a 'no-op' case..
<mikecmpbll> cases*
ltt has joined #ruby
<apeiros> mikecmpbll: there's IMO value in exhaustive listing of options. I really like how rust even enforces this.
<apeiros> so noop when is IMO not just fine, but even good
<mikecmpbll> i think i agree.
ferox_hacker has joined #ruby
<dminuoso> mikecmpbll: I would argue it to be required.
<mikecmpbll> :O ok i'll turn that cop off.
<apeiros> as for alternatives: in case of only 3 options like in your example, if/elsif
<dminuoso> mikecmpbll: Personally I view it from a totality point of view.
<dminuoso> mikecmpbll: Code needs to be clear that its total.
schneide_ has quit [Remote host closed the connection]
<dminuoso> Hiding empty when clauses hides bugs.
<mikecmpbll> 👍🏼
<apeiros> i.e. if x == "foo" elsif x != "bar"; end
<dminuoso> mikecmpbll: Good languages require either mathematical proof of totality, or at least produce a runtime crash if all patterns are exhausted.
<dminuoso> apeiros: What does Rust do?
<apeiros> but that's not exhaustive, and as a reader of such code I always wonder "is there intentionally no else, or is that a bug?"
apparition has quit [Quit: Bye]
safetypin has joined #ruby
<dminuoso> mikecmpbll: For consistency I would do something like `when foo then nil` though
<apeiros> dminuoso: referring to its match operator. https://doc.rust-lang.org/book/second-edition/ch06-02-match.html
schneide_ has joined #ruby
bijan__ has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> mikecmpbll: I go as far as having a Kernel#unreachable in my code and doing `case …; else unreachable; end`
bijan_ has joined #ruby
<dminuoso> Kernel#unreachable?
<apeiros> noops I just leave a comment, as in your example: `when "foo"; # noop`
<dminuoso> &ri Kernel#unreachable
<`derpy> No results
<soahccc> I have this mostly in iterations and I then to `when x then next`
<dminuoso> You sir monkey patch Kernel?
* dminuoso slaps apeiros
<apeiros> of course
terens has quit [Ping timeout: 276 seconds]
<dminuoso> Good lad.
woodruffw has quit [Ping timeout: 265 seconds]
phate408 has joined #ruby
<dminuoso> apeiros: Yeah things become saner if you think of case/pattern matching as a kind of `mapping` rather than a big `if/elseif construct. Rust seems to enforce this nicely.
<dminuoso> apeiros: Curious how good pattern matching works in Rust.
Psybur has joined #ruby
Psybur has joined #ruby
Psybur has quit [Changing host]
<apeiros> dminuoso: so far pretty well. but I'm a very early beginner still.
<dminuoso> apeiros: If Rust had HKTs, I'd rewrite my kernel in Rust immediately.
<dminuoso> Today.
<apeiros> your kernel?
<apeiros> and what's HKT?
<dminuoso> higher kinded types
ltt has quit [Ping timeout: 276 seconds]
woodruffw has joined #ruby
woodruffw has joined #ruby
woodruffw has quit [Changing host]
<dminuoso> Yeah, the C++ kernel I wrote over a year ago
<apeiros> we're sooo far OT I can't even tell :D
CrazyEddy has quit [Ping timeout: 248 seconds]
johnny56 has quit [Ping timeout: 256 seconds]
johnny56_ has joined #ruby
krawchyk has joined #ruby
white_lilies has quit [Ping timeout: 268 seconds]
kapil___ has joined #ruby
bijan_ has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
bijan_ has joined #ruby
bijan_ has quit [Client Quit]
bijan_ has joined #ruby
<jsaak> schneide_: chruby does exactly what you are looking for: https://github.com/postmodern/chruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
za1b1tsu has joined #ruby
bigblind has quit [Ping timeout: 248 seconds]
<schneide_> jsaak: why? https://pastebin.com/4c8X8BZS
<ruby[bot]> schneide_: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/09cba33d02b84bb801aea514169c0c2d
<ruby[bot]> schneide_: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<jsaak> schneide_: that is fine, chruby does the same with the file .ruby-version in https://github.com/postmodern/chruby/blob/master/share/chruby/auto.sh
CrazyEddy has joined #ruby
marmorkreb has quit [Remote host closed the connection]
marmorkreb has joined #ruby
damonf has joined #ruby
alfiemax has joined #ruby
nowhereman_ has quit [Ping timeout: 256 seconds]
krawchyk is now known as krawchyk[away]
scorphus has quit [Quit: Coyote finally caught me]
bijan_ has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
RougeR is now known as RubyTester00
krawchyk[away] has quit [Quit: krawchyk[away]]
alfiemax has quit [Remote host closed the connection]
bijan_ has joined #ruby
alfiemax has joined #ruby
zleap has quit [Ping timeout: 240 seconds]
cschneid has joined #ruby
zleap has joined #ruby
white_lilies has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
raynold has quit [Quit: Connection closed for inactivity]
alfiemax has joined #ruby
troys has joined #ruby
aufi has quit [Remote host closed the connection]
damonf has quit [Ping timeout: 260 seconds]
white_lilies has quit [Ping timeout: 255 seconds]
schneide_ has quit [Remote host closed the connection]
rippa has joined #ruby
schneide_ has joined #ruby
Kero has left #ruby ["quit"]
poutyredlips has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
schneide_ has quit [Remote host closed the connection]
white_lilies has joined #ruby
so_so_fresh has joined #ruby
nicosmaris has joined #ruby
nicosmaris has quit [Client Quit]
herbmillerjr has quit [Quit: Konversation terminated!]
alfiemax has joined #ruby
white_lilies has quit [Ping timeout: 260 seconds]
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
synthroid has quit [Remote host closed the connection]
so_so_fresh has quit [Remote host closed the connection]
jordanm has quit [Read error: Connection reset by peer]
marmorkreb has quit [Ping timeout: 252 seconds]
bijan_ is now known as bijan_awaaaay
poutyredlips has quit [Read error: Connection reset by peer]
bijan_awaaaay has quit [Quit: System has gone to sleep. ZZZzzz…]
jottr has quit [Ping timeout: 256 seconds]
poutyredlips has joined #ruby
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
za1b1tsu has quit [Quit: Leaving]
Strepsils has quit [Quit: Textual IRC Client: www.textualapp.com]
marxarelli|afk is now known as marxarelli
gregf_ has quit [Ping timeout: 260 seconds]
ltt has joined #ruby
so_so_fresh has joined #ruby
jordanm has joined #ruby
bigblind has joined #ruby
TomyWork has quit [Remote host closed the connection]
white_lilies has joined #ruby
al2o3-cr has quit [Quit: WeeChat 2.0.1]
synthroid has joined #ruby
white_lilies has quit [Ping timeout: 240 seconds]
[Butch] has joined #ruby
npgm has joined #ruby
oetjenj has joined #ruby
schneide_ has joined #ruby
mtkd has quit [Ping timeout: 268 seconds]
pastorinni has joined #ruby
oetjenj has quit [Client Quit]
mtkd has joined #ruby
schneide_ has quit [Ping timeout: 276 seconds]
ferox_hacker has quit [Ping timeout: 256 seconds]
ledestin has joined #ruby
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
naquad has quit [Quit: ZNC - http://znc.in]
alfiemax has quit [Remote host closed the connection]
naquad has joined #ruby
orbyt_ has joined #ruby
alfiemax has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bigblind has quit [Read error: Connection reset by peer]
aupadhye has quit [Quit: Leaving]
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
cagomez has joined #ruby
d10n-work has joined #ruby
TomyLobo has joined #ruby
zleap has quit [Changing host]
zleap has joined #ruby
mikecmpbll has quit [Ping timeout: 240 seconds]
yohji has quit [Ping timeout: 240 seconds]
white_lilies has joined #ruby
t0m has joined #ruby
za1b1tsu has joined #ruby
ldnunes has quit [Ping timeout: 248 seconds]
white_lilies has quit [Ping timeout: 264 seconds]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
so_so_fresh has quit [Remote host closed the connection]
yohji has joined #ruby
t0m has quit [Quit: leaving]
pombreda has quit [Quit: Leaving]
<zleap> hi
<zleap> i am working through codecademy ruby course if I use
<zleap> my_array.each { |num| puts num unless num % 2 !=0 }
<zleap> so an array of 1,2,3,4 up to 10, I then use the above expression to pick out even numbers is the !=0 equal to zero on the remainder or not = to zero
ldnunes has joined #ruby
marmorkreb has joined #ruby
jottr has joined #ruby
<apeiros> zleap: `unless` = `if not`, and `!= 0` means `is not equal to zero`
Serpent7776 has quit [Quit: Leaving]
darkhanb has joined #ruby
<zleap> ok
jobewan has joined #ruby
<zleap> so modulus is about the remainder in a division
<apeiros> yes
<zleap> so in this case if the remainder is not zero then print the numbers
<zleap> 2,4,6,8,10
<apeiros> you have double negation there
<zleap> ok
<apeiros> if the remainder is not not equal to zero
<zleap> ok
<zleap> the code is
<zleap> my_array.each { |num| puts num unless num % 2 !=0 }
<apeiros> and yes, that's stupid, use `if num % 2 == 0` instead. much more readable.
<zleap> yeah
x77686d has joined #ruby
<zleap> my_array.each { |num| puts num unless num % 2 ==0 }
<apeiros> because "reminder is not not equal" is "remainder is equal"
<zleap> prints odd numbers
<zleap> 1,3,5,7,9
marmorkreb has quit [Ping timeout: 260 seconds]
<apeiros> also newer rubies have .even? and .odd?
<apeiros> so `puts num if num.even?`
<zleap> ok
<zleap> so what the origianl code said was if there is no remainder print the number
<zleap> just in a way that was confusing
white_lilies has joined #ruby
<zleap> thanks for that, i'll be back shortly
<apeiros> mathematicians wouldn't like that phrasing ;-o
<apeiros> (zero is not nothing)
<apeiros> but yes, that's what the original code said.
<zleap> thanks
<zleap> back shortly, i'll get the hang of this stuff soon
<zleap> so if using .odd i can have if num.odd print num
<zleap> else
<apeiros> not `odd`, `odd?`
<soahccc> Anyone ever used net-scp? Is it any faster than net-sftp?
<apeiros> and yes, you can use that in the condition instead of % 2 == 0
RubyTester00 has quit [Ping timeout: 256 seconds]
goatish has quit [Quit: bye]
gr33n7007h has joined #ruby
gr33n7007h is now known as al2o3-cr
n0m4d1c has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Slyda1 has joined #ruby
zleap has quit [Ping timeout: 252 seconds]
zleap has joined #ruby
zleap has joined #ruby
zleap has quit [Changing host]
sanscoeur has joined #ruby
<soahccc> Meh, net-scp is indeed way faster but still CPU bound... any idea on how to find out where the bottleneck is? I assume somewhere in net-ssh
jrafanie has joined #ruby
<soahccc> Or an alternative plan for fast and secure data transfer? Already thought about exposing the files via https, don't really want to shell out in the script
sanscoeur has quit [Read error: Connection reset by peer]
alex`` has quit [Quit: WeeChat 2.0.1]
sanscoeur has joined #ruby
oo_func has joined #ruby
<za1b1tsu> Hello, anybody using mongodb ruby driver? Do you need to do batch size it wont load all the data at once?
alfiemax has quit [Remote host closed the connection]
terens has joined #ruby
yohji has quit [Remote host closed the connection]
ldnunes has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
ldnunes has joined #ruby
schneide_ has joined #ruby
ptr4ce has joined #ruby
nowhereman_ has joined #ruby
white_lilies has quit [Ping timeout: 240 seconds]
alfiemax has quit [Ping timeout: 240 seconds]
danguita has joined #ruby
xcyclist has quit [Ping timeout: 260 seconds]
schneide_ has quit [Ping timeout: 260 seconds]
alfiemax has joined #ruby
za1b1tsu has quit [Quit: Leaving]
schneide_ has joined #ruby
chouhoulis has joined #ruby
<dminuoso> 18:35 apeiros | mathematicians wouldn't like that phrasing ;-o
<dminuoso> Id say given the context, these two statements are extensionally equivalent.
guest2 has joined #ruby
alfiemax has quit [Ping timeout: 265 seconds]
ptr4ce has quit [Read error: Connection reset by peer]
<dminuoso> >> 1.step.lazy.select(&:odd?).take(10)
<ruby[bot]> dminuoso: # => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:select>:take(10)> ...check link for more (https://eval.in/953260)
<dminuoso> >> 1.step.lazy.select(&:odd?).take(10).to_a
<ruby[bot]> dminuoso: # => [1, 3, 5, 7, 9, 11, 13, 15, 17, 19] (https://eval.in/953261)
Ltem has joined #ruby
<havenwood> >> 1.step(by: 2).lazy.take(10).force
<ruby[bot]> havenwood: # => [1, 3, 5, 7, 9, 11, 13, 15, 17, 19] (https://eval.in/953262)
<dminuoso> >> add = ->(a, b) { a + b }.curry; inc = add.(1); 1.step(by: 2).lazy.map(&inc).take(10).force
<ruby[bot]> dminuoso: # => [2, 4, 6, 8, 10, 12, 14, 16, 18, 20] (https://eval.in/953263)
Xentil has quit [Read error: No route to host]
<dminuoso> havenwood: Lazy enums are so weird in Ruby. Feels like a lot of effort :D
mikecmpbll has joined #ruby
<havenwood> dminuoso: It'd be interesting to try to go a bit further with lazy enums and parallel execution.
alfiemax has joined #ruby
<havenwood> dminuoso: I like the looks of what Elixir is doing with Flow.
<havenwood> Stream is to Flow as lazy enum is to what I want.
<dminuoso> havenwood: take 10 [1,3..]
<dminuoso> take that against 1.step(by: 2).lazy.take(10)
<havenwood> Alchemists use Stream a lot more than I see Rubyists use Lazy Enumerators though.
<havenwood> dminuoso: mm
<dminuoso> Alchemists is the term for elixir programmers?
<havenwood> yerp
nowhereman_ has quit [Remote host closed the connection]
nowhereman_ has joined #ruby
raynold has joined #ruby
<havenwood> dminuoso: A bunch of the Elixir core team use emacs, and the most popular Elixir plugin is Alchemy.
drewmcmillan has joined #ruby
white_lilies has joined #ruby
cagomez has quit [Remote host closed the connection]
<dminuoso> 19:28 havenwood | Alchemists use Stream a lot more than I see Rubyists use Lazy Enumerators though.
<dminuoso> Most Rubyists dont know much about FP so..
<havenwood> aye
<dminuoso> havenwood: Btw I finally grasped why I hate transducers.
cagomez has joined #ruby
<havenwood> dminuoso: why?
<dminuoso> Transducers merely exist because the execution model of Ruby is so bad, that you cant expect loop fusion to happen on its own.
<dminuoso> So you kind of need to holds Ruby's hand.
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
oo_func has quit [Ping timeout: 276 seconds]
<dminuoso> Also lack of currying and compose..
RubyTester00 has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
white_lilies has quit [Ping timeout: 248 seconds]
<dminuoso> havenwood: I mean if you could do `sum * map(double) * filter(odd)` and expect this to be fused into a single loop, then I think that's tons more readable.
larcara has joined #ruby
white_lilies has joined #ruby
larcara has quit [Client Quit]
guille-moe has quit [Ping timeout: 240 seconds]
xuyuheng_ has joined #ruby
white_lilies has quit [Ping timeout: 248 seconds]
claudiuinberlin has joined #ruby
sameerynho has joined #ruby
xuyuheng_ has quit [Ping timeout: 268 seconds]
rippa has quit [Ping timeout: 248 seconds]
flak has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
nogic has joined #ruby
oo_func has joined #ruby
jottr has quit [Ping timeout: 260 seconds]
Slyda1 has quit [Ping timeout: 276 seconds]
bigblind has joined #ruby
chouhoulis has quit [Ping timeout: 248 seconds]
rrutkowski has joined #ruby
Dimik has joined #ruby
chouhoulis has joined #ruby
rrutkowski has quit [Remote host closed the connection]
alex`` has joined #ruby
alex`` is now known as alexherbo2
alexherbo2 is now known as alex``
white_lilies has joined #ruby
mtkd has quit [Ping timeout: 260 seconds]
rrutkowski has joined #ruby
c0mrad3 has quit [Quit: Connection closed for inactivity]
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
c0ncealed has quit [Remote host closed the connection]
mtkd has joined #ruby
minimalism has quit [Ping timeout: 248 seconds]
c0ncealed has joined #ruby
eckhardt has joined #ruby
bijan_ has joined #ruby
white_lilies has quit [Ping timeout: 252 seconds]
dinfuehr has quit [Ping timeout: 260 seconds]
cadillac_ has quit [Read error: Connection reset by peer]
dinfuehr has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
jrafanie has quit [Quit: Textual IRC Client: www.textualapp.com]
jaruga_ has quit [Ping timeout: 240 seconds]
cadillac_ has joined #ruby
cdg has quit [Remote host closed the connection]
ziadoz has joined #ruby
cadillac_ has quit [Read error: Connection reset by peer]
lytol has joined #ruby
ogres has joined #ruby
white_lilies has joined #ruby
jaruga_ has joined #ruby
Rapture has joined #ruby
nogic has quit [Ping timeout: 276 seconds]
schneide_ has quit [Remote host closed the connection]
white_lilies has quit [Ping timeout: 256 seconds]
marmorkreb has joined #ruby
dionysus69 has joined #ruby
cadillac_ has joined #ruby
schneide_ has joined #ruby
amatas_ has quit [Quit: amatas_]
marmorkreb has quit [Ping timeout: 240 seconds]
darkhanb_ has joined #ruby
cadillac_ has quit [Read error: Connection reset by peer]
darkhanb has quit [Ping timeout: 260 seconds]
stormpack_ has quit [Quit: Leaving]
jottr has joined #ruby
ziadoz has quit [Quit: Bye!]
ziadoz has joined #ruby
cadillac_ has joined #ruby
ziadoz has quit [Client Quit]
alfiemax has quit [Remote host closed the connection]
ziadoz has joined #ruby
schneide_ has quit [Remote host closed the connection]
cadillac_ has quit [Read error: Connection reset by peer]
bigblind has quit [Ping timeout: 255 seconds]
white_lilies has joined #ruby
ramfjord has joined #ruby
nowhereman_ has quit [Ping timeout: 256 seconds]
alfiemax has joined #ruby
darkhanb has joined #ruby
ziadoz has quit [Quit: Bye!]
bijan_ has quit [Quit: System has gone to sleep. ZZZzzz…]
darkhanb_ has quit [Ping timeout: 240 seconds]
cthulchu has joined #ruby
bigblind has joined #ruby
dionysus69 has quit [Ping timeout: 248 seconds]
cadillac_ has joined #ruby
ali_g has joined #ruby
cthulchu_ has quit [Ping timeout: 248 seconds]
vutral|kali has quit [Ping timeout: 255 seconds]
tcopeland has quit [Quit: tcopeland]
white_lilies has quit [Ping timeout: 240 seconds]
jottr has quit [Ping timeout: 240 seconds]
biberu has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
n0m4d1c has quit [Remote host closed the connection]
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
vutral|kali has joined #ruby
<ali_g> hello all! not sure if proper channel but i'm using jekyll. I'm trying to put a list of items in 3 different divs. It shouldn't be so difficult but I'm printing a single concatenated line with all the items of the list and don't understand why. Can anybody help? here's the gist: https://gist.github.com/ponentesincausa/760b687acbd76c35665f4b87466a4b7f
jaruga_ has quit [Quit: jaruga_]
cadillac_ has quit [Read error: Connection reset by peer]
ams__ has quit [Quit: Connection closed for inactivity]
alfiemax has joined #ruby
marxarelli is now known as marxarelli|afk
Toggi3 has joined #ruby
leitz has joined #ruby
jobewan has quit [Ping timeout: 255 seconds]
cadillac_ has joined #ruby
cadillac_ has quit [Read error: Connection reset by peer]
cadillac_ has joined #ruby
pastorinni has quit [Read error: Connection reset by peer]
pastorinni has joined #ruby
cadillac_ has quit [Read error: Connection reset by peer]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aef has quit [Remote host closed the connection]
pastorinni has quit [Ping timeout: 260 seconds]
<leitz> How do you pass a symbol hash key to a method? https://gist.github.com/LeamHall/86d3e66f0247d0487eb4b888af9af4f0
<leitz> So far sending as a symbol and as a variable don't seem to work.
ramfjord has quit [Ping timeout: 265 seconds]
chouhoul_ has joined #ruby
ramfjord has joined #ruby
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
alfiemax has quit [Read error: Connection timed out]
cadillac_ has joined #ruby
xuyuheng_ has joined #ruby
Psybur has quit [Ping timeout: 276 seconds]
white_lilies has joined #ruby
tcopeland has joined #ruby
x77686d has quit [Quit: x77686d]
amirite has quit [Ping timeout: 240 seconds]
ldnunes has quit [Quit: Leaving]
cagomez has quit [Ping timeout: 255 seconds]
xuyuheng_ has quit [Ping timeout: 240 seconds]
x77686d has joined #ruby
x77686d has quit [Client Quit]
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 248 seconds]
alfiemax has joined #ruby
ecuanaso has joined #ruby
RubyTester00 is now known as RougeR
amirite has joined #ruby
RougeR has quit [Changing host]
RougeR has joined #ruby
<apeiros> leitz: I assume in `def upp_mod(upp, :stat)` you meant `def upp_mod(upp, stat)`
<apeiros> :stat is a value, it makes as little sense as e.g. `def upp_mod(upp, 12)`, as 12 is a value too.
ramfjord has joined #ruby
John_Ivan has quit [Ping timeout: 260 seconds]
oo_func has quit [Quit: Leaving]
oo_func has joined #ruby
nogic has joined #ruby
fp- has joined #ruby
bigblind has quit [Ping timeout: 256 seconds]
fp- has quit [Client Quit]
oo_func_ has joined #ruby
<leitz> apeiros, I tried that too. The easy way would be to send "upp[:int]" but I'm trying to not make the method caller know about the method.
<leitz> Could be futile on my part.
bigblind has joined #ruby
terens has quit [Ping timeout: 240 seconds]
alfiemax has quit [Ping timeout: 240 seconds]
<leitz> You know, it helps to not be real tired and forget that a hash uses {}...
Vapez has joined #ruby
<leitz> Hmm....upp[:int] seems to be the way to go.
* leitz steps away for a few minutes.
xuyuheng_ has joined #ruby
alfiemax has joined #ruby
safetypin has quit [Quit: ZZZzzz…]
chouhoul_ has quit [Remote host closed the connection]
chouhoulis has joined #ruby
white_lilies has quit [Ping timeout: 256 seconds]
<apeiros> leitz: "I tried that", and what went wrong?
alfiemax has quit [Ping timeout: 248 seconds]
xuyuheng_ has quit [Ping timeout: 255 seconds]
chouhoulis has quit [Ping timeout: 248 seconds]
RougeR has quit [Ping timeout: 240 seconds]
cschneid has quit [Remote host closed the connection]
drewmcmillan has joined #ruby
cschneid has joined #ruby
alfiemax has joined #ruby
knight33 has joined #ruby
guille-moe has joined #ruby
John_Ivan has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
cagomez has joined #ruby
cschneid has quit [Ping timeout: 248 seconds]
ldepandis has joined #ruby
alfiemax has quit [Ping timeout: 268 seconds]
ramfjord has quit [Ping timeout: 255 seconds]
cagomez has quit [Ping timeout: 248 seconds]
[Butch] has quit [Quit: Textual IRC Client: www.textualapp.com]
jcalla has quit [Ping timeout: 276 seconds]
ramfjord has joined #ruby
xuyuheng_ has joined #ruby
minimalism has joined #ruby
cagomez has joined #ruby
orbyt_ has quit [Ping timeout: 248 seconds]
cagomez has quit [Remote host closed the connection]
xuyuheng_ has quit [Ping timeout: 240 seconds]
chouhoulis has joined #ruby
guille-moe has quit [Ping timeout: 276 seconds]
ramfjord has quit [Ping timeout: 248 seconds]
ltt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yokel has quit [Remote host closed the connection]
mtkd has quit [Ping timeout: 256 seconds]
Puffball has quit [Remote host closed the connection]
yokel has joined #ruby
n0m4d1c has joined #ruby
schneide_ has joined #ruby
mtkd has joined #ruby
x77686d has joined #ruby
pharo-user has joined #ruby
Strepsils has joined #ruby
schneide_ has quit [Ping timeout: 260 seconds]
rasterick has joined #ruby
synthroid has quit [Remote host closed the connection]
nadir has quit [Quit: Connection closed for inactivity]
synthroid has joined #ruby
<rasterick> cool, my friend leitz is here :) .. are you awake ?
pharo-user has quit [Quit: pharo-user]
<rasterick> i have been learning about ruby .. i downgraded to v2.3 with same results .. was worth a try tho
ramfjord has joined #ruby
<rasterick> and did the gem install rake and drake ... same results
<rasterick> i noticed a folder with 13 .rb files and other errors i forgot to mention
<rasterick> rake aborted! LoadError: cannot load such file -- pty
<rasterick> rake.d/pch.rb:21:in `<top (required)>'
<qyliss> rasterick: pty usually comes with Ruby. How did you install it?
<rasterick> with installer
alfiemax has joined #ruby
oo_func_ has quit [Remote host closed the connection]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cschneid has joined #ruby
<apeiros> oh, qyliss - you use the same nick on twitter?
<qyliss> I do!
<apeiros> nice, didn't know you were on irc as well
<leitz> rasterick, you might want to explain your setup. In a "normal" environment running rake in the directory with a rakefile works.
<qyliss> a fairly recent development
<qyliss> rasterick: which installer?
<qyliss> apeiros: do I know you from twitter?
* leitz is stil groggy from the current nap.
<apeiros> I don't think you do, no, since I use the same nick on twitter too :D
<apeiros> I follow you on twitter. iirc through some retweets which piqued my interest.
chouhoulis has quit [Remote host closed the connection]
atchoum has joined #ruby
chouhoulis has joined #ruby
rasterick has quit [Ping timeout: 260 seconds]
alfiemax has quit [Ping timeout: 260 seconds]
rasterick has joined #ruby
<rasterick> got dc i think
rwb has quit [Ping timeout: 264 seconds]
<rasterick> only 5 lines but nicer to see all on one page instead of here
alex`` has quit [Ping timeout: 256 seconds]
ahrs has quit [Ping timeout: 252 seconds]
<baweaver> >> M = -> *a { -> b { a.each_with_index.all? { |e, i| e === b[i] || e == :* }}}; case ['Bob', 25]; when M[/^B/, :*] then 'B name!' else 'Not B!' end
<ruby[bot]> baweaver: # => "B name!" (https://eval.in/953480)
<baweaver> :D
alfiemax has joined #ruby
<rasterick> at least you know this stuff
<leitz> Yeah, baweaver and apeiros are my external "genius Ruby brains".
<rasterick> the situation is: building a prog, the config gives me a Rakefile instead of a Makefile ... i cannot seem to get Ruby rake or drake to compile the prog ... any help is appreciated
xuyuheng_ has joined #ruby
<leitz> he's using bash on Winderz.
<leitz> Not seeing the rakefile in there.
<baweaver> What's the actual script?
sundhell_away is now known as sundhell
<rasterick> the rakefile is in the root dir .. that is a subdir with the .rb files
jeffreylevesque has quit [Ping timeout: 260 seconds]
<rasterick> what is actual script ?? i do not understand the question
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xuyuheng_ has quit [Ping timeout: 256 seconds]
<leitz> rasterick, keep in mind they haven't read your set up and the error.
<mattwc> I might just be blind, but does anyone know where the documentation for socket.gets is?
<baweaver> mattwc: I'd bank on it using IO somehow
<baweaver> &ri Socket
<apeiros> mattwc: probably in IO
<rasterick> i just ran: gem install drake ... worked ! :)
<banisterfiend> baweaver how are your emus
<banisterfiend> or lemers or dolphins or whatever they are
<banisterfiend> :D
<mattwc> ah yeah its in IO
<rasterick> hello leitz! hope all is well for you today
<baweaver> yep: "From: io.c (C Method):"
<baweaver> me and havenwood are working out the book deal details banisterfiend :D
<banisterfiend> k00
<banisterfiend> baweaver pretty soon that delving is going to get a lot deeper homie
<baweaver> delving?
<banisterfiend> baweaver http://g.recordit.co/upGqTjoP4q.gif
<baweaver> Ah, pry, right
<baweaver> Kinda like you wrote the thing or something
<banisterfiend> baweaver no i mean that you can now explore MRI source code
<baweaver> nifty
<banisterfiend> previously pry would stop at the method/c-function interface
<banisterfiend> now you can explore the entire MRI code base
alfiemax has quit [Ping timeout: 276 seconds]
<leitz> apeiros, "tried that": changing the method to use (upp, stat) and then trying to access it via upp[:stat].
<banisterfiend> structs, enums, functions, macros etc
<banisterfiend> well i'll release it on monday
<apeiros> leitz: yes, got that. and as asked before, what went wrong when you used `def upp_mod(upp, stat)`?
* leitz is still waking up and checking.
biberu has quit []
<leitz> apeiros, okay. "def upp_mod(upp, stat)" and called with "upp_mod(upp, :int)" works.
sundhell is now known as sundhell_away
<leitz> The issue is, should the caller know the stats are stored as symbols?
<leitz> I just changed upp from a struct back to a hash.
<apeiros> is the signature all you changed? if so, it won't work the way you expect it to. look at line 11 (https://gist.github.com/LeamHall/86d3e66f0247d0487eb4b888af9af4f0#file-symbol-rb-L11 )
cdg has joined #ruby
<apeiros> using smybols as identifiers is fine. it also does not mean that the caller knows anything about how it's internally stored. all it knows is how the stat is identified.
<apeiros> and you're correct. the *how* it is stored is none of the caller's business
eckhardt has joined #ruby
minimalism has quit [Ping timeout: 276 seconds]
<leitz> That works.
<apeiros> leitz: that looks correct. also IMO you should prefer a struct over a hash.
pastorinni has joined #ruby
<apeiros> you can access the values just the same too
<leitz> And I can mostly understand it. Tried the struct, it was beyond my ability to use well.
<apeiros> i.e. `stat = :int; upp[stat]` will work just fine with upp being a Struct
synthroid has quit []
<apeiros> and it'll properly complain if you make typos, i.e. `upp[:innt]` will raise
rrutkowski has quit [Quit: rrutkowski]
rrutkowski has joined #ruby
<apeiros> (and it's a good first stop before making it a proper class, which should be your end goal)
jxf has quit []
axsuul has joined #ruby
mendel has quit []
jxf has joined #ruby
mendel has joined #ruby
<leitz> Prefer upp to be simple, it's a part of Character class.
pastorinni has quit [Remote host closed the connection]
cdg has quit [Remote host closed the connection]
pastorinni has joined #ruby
<leitz> Current use case is that a task will pass in the chacracter and the stat that would modify the roll, and the method would return the modifier.
cdg has joined #ruby
chouhoul_ has joined #ruby
cardoni has quit []
cardoni has joined #ruby
Vapez has quit [Remote host closed the connection]
<apeiros> leitz: simple can take different forms. IMO a struct is far simpler than a hash.
minimalism has joined #ruby
<apeiros> the other aspects of simple will become more visible when you make upp a full class and don't have to distribute knowledge about how it works, and instead can organize it within said class.
chouhoulis has quit [Ping timeout: 248 seconds]
Tony-St4rk has quit []
Tony-St4rk has joined #ruby
<leitz> apeiros, I'm trying to figure out how to show old code on Github. The upp was a struct and I was having issues with needing to define methods inside and outside of the struct to do the same thing.
John_Ivan has quit [Quit: Leaving]
<leitz> Never fear, I have plenty of challenges lined up for the group, mentally planning my first "large app".
John_Ivan has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
<rasterick> ... dons his coding gloves ...
zautomata has quit [Ping timeout: 252 seconds]
John_Ivan has quit [Remote host closed the connection]
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoul_ has quit [Remote host closed the connection]
John_Ivan has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
chouhoulis has joined #ruby
Toggi3 has quit [Ping timeout: 268 seconds]
alfiemax has joined #ruby
kireevco has quit []
nogic has quit [Ping timeout: 265 seconds]
<leitz> Philosophical question: "How much magic to include?"
rwb has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<oo_func> What kind of magic are you talking about?
<leitz> Ruby can do all sorts of cool stuff. I write basic code and invite other newbies to join in. In Ruby this works, but I'm not sure it's the best due do being very Ruby specific. https://github.com/makhidkarun/2d6_ogl_chargen/blob/master/lib/character_tools.rb#L46
alfiemax has quit [Ping timeout: 240 seconds]
<rasterick> looks like a WoW game script
<leitz> If you rank Ruby skill on a 1-10, I may be growing into a 2. There's a lot of 0's and 1's who don't yet know the fun of Ruby so I try to encourage.
<rasterick> i think i am at the -0 level right now
<leitz> rasterick, a Ruby method returns the last result. In other languages that might be "return 3". Which works in Ruby, but you don't have to.
<leitz> Hey, I have about three months of experience gained over the last couple years.
<apeiros> leitz: any sufficiently analyzed magic is indistuingishable from science
nadir has joined #ruby
<rasterick> ... offers lietz his top hat, wand, and white rabbie for the magic show
<apeiros> but regarding code - it depends on the audience. if you're the sole developer, that audience is your future you.
<rasterick> the pretty female assistant stays with me tho *grin*
<leitz> Yeah, that's why I use {} vice "do...end"
<apeiros> i.e., include as much magic as you think you can understand one month, three months, 6 months, one year from now.
<apeiros> s/vice/versus/
<apeiros> hm
<leitz> vice can also mean versus.
<apeiros> though that makes little sense too in that phrase?
alfiemax has joined #ruby
<leitz> Sorry, though, it's an older English'ism.
<leitz> I'm older and Americanism'd.
<apeiros> o0
<leitz> If rasterick gets the pretty female assistant I get to keep a vice or two.
<apeiros> you're thinking of vice versa, I think
* leitz pities those who have to learn English...
<leitz> "This thing, vice that thing" == "This thing, versus that thing."
<apeiros> but I don't speak english natively, much less old english, so maybe I'm wrong.
<leitz> English has its good points. "Follow the Rules of English" isn't one of them.
Ishido has quit [Read error: Connection reset by peer]
axsuul has quit [Ping timeout: 248 seconds]
<rasterick> .... gets the lexicon ready ...
eckhardt has joined #ruby
ecuanaso has joined #ruby
nowhereman_ has joined #ruby
<leitz> rasterick, don't worry. I have tried to learn other human languages. Because of that I try to keep my English direct and clear.
boxrick has quit []
flak has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
marmorkreb has joined #ruby
nowhere_man has joined #ruby
* leitz has heard American college students with native English worse than aperios'...
boxrick has joined #ruby
<apeiros> thanks, I guess?
jabreity has quit []
jabreity has joined #ruby
<leitz> You are welcome. Your English is very good.
<leitz> In the entire time I have known you I have seen less than half a dozen phrases that made me think you were not a native speaker.
<leitz> Most American college students wouldn't get "vice" either.
<s1detracking> if i learn ruby do i get a pretty female assistant
nowhereman_ has quit [Ping timeout: 248 seconds]
<s1detracking> HEEEEEEEEEEEEES A REEEEEEEEEEEEEEEEEEL nowhere_man
<leitz> s1detracking, maybe. At the old Linux World they had models in BSD Demon suits.
<s1detracking> hot
<leitz> Long ago.
marmorkreb has quit [Ping timeout: 265 seconds]
<qyliss> I’m native Scottish English and have never heard “vice”
<s1detracking> any linux expos nowadays?
amirite has quit [Ping timeout: 260 seconds]
andersh has quit []
andersh has joined #ruby
clemens3 has quit [Ping timeout: 248 seconds]
<leitz> qyliss, I'm an introvert with a speech impediment. As a kid I read a lot of older books. Much easier on the ego.
bigblind has quit [Ping timeout: 256 seconds]
<rasterick> models in demon suits ? *perk*
<rasterick> outta those suits may be better
solidsnack has quit []
cttttt has quit []
solidsnack has joined #ruby
cttttt has joined #ruby
<rasterick> i used to enjoy old books about fur trappers from the 1800s
<rasterick> but now i have computers :>
guardianx has joined #ruby
chouhoul_ has joined #ruby
pwillard has quit []
* leitz bets the demon suits made rasterick forget his syntax error.
ryandv has joined #ruby
<rasterick> what syntax error
<ryandv> Why does precision need to be specified for a Float but not a String in `BigDecimal::new`?
<rasterick> oh yeah , the syntax error
pwillard has joined #ruby
<ryandv> is it because we want to omit possible imprecisions from the IEEE 754 representation of Floats?
<ryandv> whereas Strings are "exact" in some sense?
<apeiros> ryandv: because floats are based on the binary system which can only approximate most decimal values
<rasterick> btw, i just DL and installed this: rubysl-pty 2.0.3 Ruby standard library pty
<apeiros> whereas with a string you can just use the arbitrary precision the string already provides
<leitz> rasterick, make sure it works with the current version of Ruby you're using.
<ryandv> apeiros: I see, thanks!
<rasterick> is that like -0 is NAN ?
<apeiros> >> "%.60f" % 0.3
<ruby[bot]> apeiros: # => "0.299999999999999988897769753748434595763683319091796875000000" (https://eval.in/953520)
<apeiros> f.ex.
chouhoulis has quit [Ping timeout: 264 seconds]
<apeiros> rasterick: -0 isn't nan
<rasterick> leitz, it said patching gem
chouhoul_ has quit [Ping timeout: 260 seconds]
jordanm has quit [Remote host closed the connection]
<rasterick> does this make me patched now ? .. hmm
<leitz> Perky and Patched. Sounds like a new IRC /nick
* leitz really needs to get focussed on his coding...
<rasterick> i guess it would be -0 divided by 1 to be nan
<rasterick> ... checks the syntax lexicon ...
<qyliss> rasterick: other way round
<rasterick> i was close ;>
<rasterick> pesky dislexyia
<qyliss> Actually, in Ruby, it might be -Float::INFINITY
<qyliss> Not at a computer I can check with
<rasterick> that sounds like an open loop
<apeiros> >> 0.0/0 # rasterick
<ruby[bot]> apeiros: # => NaN (https://eval.in/953521)
alfiemax has quit [Ping timeout: 265 seconds]
<apeiros> division by zero in float domain is treated as if it was a limes, and hence results in ±∞
peteretep has quit []
<rasterick> ah, thank you apeiros
xuyuheng_ has joined #ruby
<apeiros> there are a couple of other operations which result in NaN
peteretep has joined #ruby
<apeiros> though IMO a language like ruby should rather raise :-|
<rasterick> ... gets the NAN lexicon out ...
n0m4d1c has quit [Remote host closed the connection]
ogres has quit [Quit: Connection closed for inactivity]
cagomez has joined #ruby
<rasterick> ... wades thru all the prime numbers ...
<apeiros> that'll take a while
<rasterick> Indeed!
<rasterick> remember friends in past wrote linux script that would find prime numbers ... runs for months!, never ends
<apeiros> oh, then they wrote it well, means they implemented it in a way to exceed native integer representation (or terrible, because after months it wouldn't reach those limits)
<rasterick> btw, leitz, Ruby works in windows cmd prompt for me just as well
<apeiros> or they used ruby or a language similarly natively being able to go beyond 64bit ints :D
<rasterick> prob so, these were some very intelligent linux geeks from SoCal
<rasterick> as best i remember it was a linux script , sorta like a prog i guess
alfiemax has joined #ruby
<apeiros> well, a linux script can be in about any language ;-)
xuyuheng_ has quit [Ping timeout: 260 seconds]
<rasterick> oh, ok. they would for fun write smaller scripts to do tasks , eg.. parse a dir and sort by size,date, etc.
reber has quit [Remote host closed the connection]
<rasterick> these were command line scripts , too long ago to remember actual chars
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DTZUZO has joined #ruby
amatas has quit [Quit: amatas]
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
DTZUZO has quit [Ping timeout: 256 seconds]
schneide_ has joined #ruby
<leitz> Sort by size: ls -l | sort -n -k 5
* leitz just got back from building a fire in the fireplace.
ramfjord has quit [Ping timeout: 240 seconds]
Toggi3 has joined #ruby
ramfjord has joined #ruby
alfiemax has quit [Read error: Connection timed out]
Ltem has quit [Quit: Leaving]
AndyWojo has quit []
schneide_ has quit [Ping timeout: 256 seconds]
mtkd has quit [Ping timeout: 240 seconds]
ryandv has quit [Ping timeout: 265 seconds]
AndyWojo has joined #ruby
<rasterick> leitz is good at this coding stuff ! :)
<rasterick> ... gets the marshmallows ready by the fireplace
<leitz> rasterick hasn't compared leitz to a lot of people...
<rasterick> well, ls -l | sort was quite good imo
<rasterick> dir o w p works in winders
mtkd has joined #ruby
<leitz> That was sort of plain. A better one is "du -xk . | sort -n | tail -10" to find the direcotries taking up all the space in your filesystem.
tcopeland has quit [Quit: tcopeland]
<rasterick> aha! leitz is an intelligent linux geek
* leitz is an old linux geek.
<rasterick> over 30 eh?
Strepsils has quit [Read error: Connection reset by peer]
<rasterick> i got into linux heavy last year, peppermint was my fav, even installed it on a HDD
moei has quit [Quit: Leaving...]
alfiemax has joined #ruby
claudiuinberlin has joined #ruby
<rasterick> it would not run any of my exe.s so i removed and put w2kSP4 on it ... works fine now
paraxial has quit [Quit: The Lounge - https://thelounge.github.io]
paraxial has joined #ruby
goepsilongo has joined #ruby
* leitz thinks it's about time to enjoy the fire with his wife.
ryandv has joined #ruby
<rasterick> enjoy the evening Mr. Leitz
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rasterick> ... just had a handrolled NF cig with fresh Boho coffee .. yum!
xfbs has quit []
<rasterick> 73F here btw
KeyJoo has quit [Ping timeout: 265 seconds]
ecuanaso has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ryandv has quit [Ping timeout: 260 seconds]
ecuanaso has quit [Ping timeout: 260 seconds]
alfiemax has quit [Ping timeout: 264 seconds]
shinnya has joined #ruby
alfiemax has joined #ruby
tvw has quit [Read error: Connection reset by peer]
rann has quit []
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
rann has joined #ruby
sanscoeur has quit [Ping timeout: 240 seconds]
desperek has quit [Quit: xoxo]
eb0t has quit [Read error: Connection reset by peer]
eb0t has joined #ruby
eblip has joined #ruby
eb0t- has quit [Ping timeout: 256 seconds]
DLSteve_ has quit [Quit: All rise, the honorable DLSteve has left the channel.]
pastorinni has quit [Remote host closed the connection]
bigblind has joined #ruby
goepsilongo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
goepsilongo has joined #ruby
comet23 has joined #ruby
guacamole has joined #ruby
guacamole has joined #ruby
schneide_ has joined #ruby
bijan_ has joined #ruby
goepsilongo has quit [Client Quit]
bigblind has quit [Ping timeout: 248 seconds]
alfiemax has quit [Ping timeout: 256 seconds]
amirite has joined #ruby
schneide_ has quit [Ping timeout: 276 seconds]