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
<havenwood> arahael: YAML can serialize all sorts of things. What it deserializes to depends on what you serialized.
<arahael> havenwood: For the yaml module... As for the yaml file, the root consists of a series of name: value's.
<arahael> I think that's a hash.
<havenwood> arahael: If you serialize an Array, it'll deserialize to an Array. If you serialize a Hash, it'll deserialize to a Hash. Et cetera.
<arahael> havenwood: If it helps, I'm more familiar in other languages (python, go, delphi, c#, etc)
<lupine> delphi \o/
<havenwood> All those langs should likewise deserialize to whatever was serialized.
<havenwood> &ri Hash
<lupine> (your yaml might deserialise to a hash, but it might now)
<lupine> not*
<arahael> havenwood: If I puts it, I get nothing. If I puts the doc.inspect, it magically gets me the data.
<havenwood> >> require 'psych'; Psych.load(Psych.dump({aim: true}))[:aim] # arahael
<ruby[bot]> havenwood: # => true (https://eval.in/955050)
<arahael> havenwood: That also works, too. Is the "yaml" module obsolete?
<arahael> Ah, no, that's fine.
clemens3 has quit [Ping timeout: 265 seconds]
<arahael> Found my mistake, I was confusing :definitions with "definitions".
netherwolfe has quit [Ping timeout: 260 seconds]
Fobhep has quit [Ping timeout: 240 seconds]
<arahael> havenwood: Sorry for taking up your time!
tcopeland has joined #ruby
marr has quit [Ping timeout: 260 seconds]
despai has quit [Ping timeout: 256 seconds]
x77686d has joined #ruby
troulouliou_dev has quit [Quit: Leaving]
leitz has joined #ruby
jobewan has quit [Ping timeout: 240 seconds]
<leitz> If I'm in the project's base dir and run "rake", which has a default to run unit tests, the tests pass. If I comment out those lines, the number of tests, decreases by one.
<leitz> This issue is that there is no "roll_2" method. What is passing the tests?
Dimik has joined #ruby
<leitz> A new trend in TDD, tests pass if you intend on writing the code!
orbyt_ has joined #ruby
<leitz> Ah, interesting. It loads stuff from a module even without the require.
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
spuk has joined #ruby
cdg has joined #ruby
eckhardt has joined #ruby
asqrd_ has quit [Read error: Connection reset by peer]
cagomez_ has quit [Remote host closed the connection]
cagomez has joined #ruby
cdg_ has quit [Ping timeout: 268 seconds]
TomyLobo has quit [Read error: Connection reset by peer]
asqrd_ has joined #ruby
cdg has quit [Ping timeout: 268 seconds]
shinnya has quit [Ping timeout: 248 seconds]
<leitz> Now that there is code, it gives a "can't find it" error.
alfiemax_ has quit [Remote host closed the connection]
alfiemax has joined #ruby
alfiemax_ has joined #ruby
<leitz> Okay, fixed that last bit.
SeepingN has quit [Quit: The system is going down for reboot NOW!]
cagomez has quit [Remote host closed the connection]
alfiemax has quit [Ping timeout: 255 seconds]
cagomez has joined #ruby
alfiemax_ has quit [Ping timeout: 256 seconds]
marmorkreb has joined #ruby
<leitz> Time to git push and git to napping.
cagomez_ has joined #ruby
kobain has quit [Ping timeout: 256 seconds]
cdg has joined #ruby
cagomez has quit [Remote host closed the connection]
leitz has quit [Quit: Nappy time]
<banisterfiend> baweaver yo you here?
cdg has quit [Ping timeout: 260 seconds]
jottr has joined #ruby
knight33 has joined #ruby
marxarelli is now known as marxarelli|afk
jottr has quit [Ping timeout: 240 seconds]
<havenwood> banisterfiend: baweaver is standing next to me - he says 'hi'
<banisterfiend> havenwood lol yo
<baweaver> ding
<baweaver> was getting tea
<banisterfiend> wb
jnollette has quit [Ping timeout: 255 seconds]
apparition has joined #ruby
cagomez_ has quit [Remote host closed the connection]
jnollette has joined #ruby
nahra has quit [Remote host closed the connection]
elomatreb has quit [Ping timeout: 240 seconds]
Kilo`byte has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Kilo`byte has joined #ruby
elomatreb has joined #ruby
morenoh149 has quit [Ping timeout: 248 seconds]
uptime has quit [Quit: Quit.]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
govg has quit [Ping timeout: 265 seconds]
morenoh149 has joined #ruby
rrutkowski has joined #ruby
govg has joined #ruby
workmad3 has joined #ruby
rrutkowski has quit [Quit: rrutkowski]
govg has quit [Ping timeout: 256 seconds]
flakrat has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
<flakrat> Is there any way to elevate a chunk of code within a ruby script? For example, I have a script that performs a number of things that don't require sudo, however two lines do, Dir.mkdir and File.chown. Is there any mechanism in Ruby to tap into sudo access from within a script without have to run the entire script that way?
sanscoeu_ has joined #ruby
<flakrat> Alternate, use `sudo mkdir #{dir}` and `sudo chown ...`, but was hoping for a way to use the builtin ruby methods
sanscoeur has quit [Ping timeout: 256 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
sanscoeu_ has quit [Ping timeout: 248 seconds]
ramfjord has joined #ruby
brendan- is now known as bmurt
apparition has quit [Read error: Connection reset by peer]
apparition has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
alfiemax has joined #ruby
flakrat has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> flakrat: Would it work for you to mkdir and chown early then drop privilege?
x77686d has quit [Quit: x77686d]
<havenwood> require 'etc'; Process::Sys.setuid Etc.getpwnam('nobody').uid
alfiemax has quit [Ping timeout: 260 seconds]
alex`` has quit [Ping timeout: 255 seconds]
ramfjord has joined #ruby
sylario has quit [Quit: Connection closed for inactivity]
hndk has joined #ruby
snath has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
bijan_ is now known as bijan_awaaaay
bijan_awaaaay is now known as bijan_
bijan_ is now known as bijan_awaaaay
cschneid has joined #ruby
ramfjord has joined #ruby
cschneid has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 260 seconds]
konsolebox has quit [Ping timeout: 248 seconds]
John_Ivan has quit [Read error: Connection reset by peer]
ramfjord has joined #ruby
konsolebox has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bijan_awaaaay is now known as bijan_
ramfjord has quit [Ping timeout: 248 seconds]
kapil___ has joined #ruby
gizmore|2 has joined #ruby
eckhardt has joined #ruby
goatish has quit [Ping timeout: 255 seconds]
ramfjord has joined #ruby
bijan_ has quit [Quit: System has gone to sleep. ZZZzzz…]
alfiemax has joined #ruby
gizmore has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 265 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
ramfjord has quit [Ping timeout: 268 seconds]
ramfjord has joined #ruby
rasterick has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rasterick> hello, anyone awake ?
<rasterick> gem install gemname --version gem not found ... whats up with that ? any ideas ?
cschneid has joined #ruby
<rasterick> yet, the gem is right there in the gem directory
ramfjord has quit [Ping timeout: 260 seconds]
graft has quit [Ping timeout: 276 seconds]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
<rasterick> so quiet in here today
<kapil___> It should work
konsolebox has quit [Ping timeout: 265 seconds]
xt233 has joined #ruby
konsolebox has joined #ruby
<rasterick> hello kapil
<kapil___> Yes
<rasterick> well, yeah, true, it should work ... but i cannot seem to get rake to compile a rakefile *sigh*
<rasterick> get errors
<rasterick> google has just led me in circles
<rasterick> when i do: gem list , all the gems are listed
<kapil___> What errors. Please tell
<rasterick> lemme paste
<rasterick> rake aborted ! LoadError: cannot load such file -- pty
<rasterick> and ....
<rasterick> rake.d/pch.rb:21:in `<top (required)>'
<rasterick> target.rb:1:in `require_relative'
<rasterick> make any sense to you ?
<kapil___> What ruby version you using?
<rasterick> 2.5.0
<kapil___> Linux?
<rasterick> rake, version 12.3.0
<rasterick> not linux, linux shell: MinGW
<rasterick> i use it to build all sorts of progs .. works well
<rasterick> this prog has a rakefile ... my first encounter .. i configured the prog , now i am stuck here *sigh*
<rasterick> the rakefile builds off of the configure file
<kapil___> How you installed ruby?
<rasterick> with ruby installer
<rasterick> have tried ruby 2.3.3 up to 2.5.0 .. same results
<rasterick> have tried diff vers of rake also
<rasterick> 12.3.0, 10.5.0, 0.9.0, 0.8.7
<rasterick> same results
<kapil___> Can you try old ruby version?
cdg has joined #ruby
<kapil___> Ok
<rasterick> yes, i tried 2.3.3 ...same error
<rasterick> lieze ran the rakefile through a tester .. said no syntax errors
<kapil___> What gem you are installing?
<rasterick> well, i installed the rake dependencies .. those do not show up in the --version
<rasterick> that is baffling
infernix has quit [Ping timeout: 248 seconds]
<rasterick> bundler, nokogiri, rack, json, mime-types, and a few others
netherwolfe has joined #ruby
<rasterick> gem install works Very Well ! smooth, fast ! :)
cdg has quit [Ping timeout: 276 seconds]
<kapil___> I not know about rake file compile process, but you could try c9.io cloud platform. It compile everything
<rasterick> sounds great! i have searched for an alternative
<kapil___> Other people here will help you.
<rasterick> awesome :D
x77686d has joined #ruby
cdg has joined #ruby
jobewan has joined #ruby
<rasterick> looks like a java app
<kapil___> No
netherwolfe has quit [Ping timeout: 276 seconds]
<kapil___> It is Ubuntu docker
<rasterick> ah, Ubuntu is a good distro imo
<rasterick> i got into linux heavy last year, peppermint was my fav, and fluxbox my fav desktop
<rasterick> fluxbox is a fork of openbox
morenoh149 has quit [Ping timeout: 256 seconds]
<kapil___> i use `rvm install 2.5.0 --disable-binary`
<rasterick> it looks like KDE but is very light and fast
darkhanb has joined #ruby
<kapil___> yes its very light and fast
<rasterick> rvm = ruby virtual manager ? why --disable binary ?
x77686d has quit [Quit: x77686d]
<havenwood> *version
<kapil___> it compiles ruby for your plateform.
<rasterick> oops, my brain is getting mushy
<kapil___> no. i found a bug in ruby 2.5.0 so i have to use this.
<rasterick> hey, maybe that is where my mistake is !
<rasterick> oh, wait, it compiles ruby , not the gems
<kapil___> yes
<rasterick> what kinda bug did you find ?
DTZUZO has quit [Quit: WeeChat 2.0]
xt233 has left #ruby ["Leaving"]
<kapil___> i using devise gem. but it don't worked well. so i had to use this. i get suggession on its issue tracker/
<rasterick> that is odd, Ubuntu is a good os
<rasterick> i did search the buglist for probs with rake ...dint find much, only bugs building rake i think
arescorpio has quit [Excess Flood]
<kapil___> sorry wrong link
<kapil___> c9.io is actually free.try it
<rasterick> hmm the path says ... /.rvm/gems/ruby-2.5.0 ... i do not have a .rvm dir
<rasterick> i did google c9.io .. will try later ... it will make an .exe ?
neo95 has quit [Quit: Leaving]
<rasterick> but all my source code in on the HDD ... gotta upload it ?
<kapil___> try it. i think it should.
dfinn has joined #ruby
<rasterick> is c9.io a build bot ?
<kapil___> yes its easy.upload to git/bitbucket and download in c9.
<dfinn> anyone know how to get ruby to ignore lines in an erb template that start with %?
<dfinn> https://apidock.com/ruby/ERB says to use %% but when I do that I'm getting a literal %% in the output file
<kapil___> dfinn: <% -%>
<dfinn> that's not working for me
<dfinn> I'm trying to templatize my /etc/sudoers file in puppet. puppet uses erb for templates. the sudoers file has valid lines that start with %blah
<dfinn> I need to get it to ignore those lines
<kapil___> dfinn: just use % it works
<dfinn> we most definitely are not on the same page. either you don't understand what I'm looking for or I have no clue what you're suggesting
<kapil___> do you want to ignore a line in erb template?
<dfinn> yeah, I don't want ruby to do anything with the line other than print it how it is
<dfinn> maybe it will help if I show the template
<kapil___> yes
<kapil___> then use <% "THIS LINE PRINT AS IT IS" %>
<ruby[bot]> dfinn: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/78b22ddb834fb0217cf88f3ceeb6203a
<ruby[bot]> dfinn: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<kapil___> sorry
<dfinn> ok, let me try that
DTZUZO has joined #ruby
<kapil___> use this <%= "THIS LINE PRINT AS IT IS" %>
<dfinn> <%= "%admin ALL=(ALL) ALL %> like that?
<kapil___> yes
<dfinn> ok, testing now
<kapil___> you forgot last quote
<dfinn> I think that did it, thanks
<kapil___> ok
infernix has joined #ruby
jobewan has quit [Ping timeout: 276 seconds]
<rasterick> Woo Hoo! Celebration time :D
workmad3 has joined #ruby
<rasterick> Champagne , baloons ...
<kapil___> you get the solution?
<rasterick> c9.io is not free anymore: A valid credit card is required for new user registration, and the service cannot be used without one
<kapil___> just need for registration. it not charge anything.
venmx has quit [Quit: leaving]
<kapil___> until you use free plan.
govg has joined #ruby
<kapil___> but free plan is enough
<rasterick> sounds good ! :D
MyMind has joined #ruby
<kapil___> rasterick: can i know how you compile to exe?
Sembei has quit [Ping timeout: 276 seconds]
morenoh149 has joined #ruby
zautomata1 has joined #ruby
dfinn has left #ruby [#ruby]
<rasterick> i use GCC as my compiler
workmad3 has quit [Ping timeout: 240 seconds]
<kapil___> ok but what gem ?
<kapil___> for compiling ruby program to exe?
zautomata has quit [Ping timeout: 240 seconds]
<rasterick> i use MinGW with GCC as the compiler ... it uses no ruby or gems
<kapil___> ok
<rasterick> i installed ruby for this projects Rakefile , but the Rakefile uses the config file and GCC to make the exe
<kapil___> sound cool. so your main language of code is not ruby?
<rasterick> MinGW is short for Minimal Gnu on Windows , basically a bash shell or a linux shell on windows
osvico has joined #ruby
<rasterick> i am self taught so i sorta have no main lang .. i have only been learning Ruby for about a week now
<kapil___> ok
<rasterick> QEMU is very similar to MinGW except QEMU is a linux emulator MinGW is an environment similar to Ruby
<kapil___> i suggest you use c9.io its easy on linux
xt233 has joined #ruby
<rasterick> i have been wondering , everyone discussing here lines of Ruby script and code ... what do people make with Ruby ?
<kapil___> i am using rails for web framework,
<rasterick> well , i did try using linux in a VM, but only Gentoo had GCC of 6.2 and none had higher in repositories ...
<rasterick> this prog requires GCC 6.4 or better i think , so the VM did not work
xt233 has quit [Client Quit]
<kapil___> c9.io os is great.
<rasterick> ah, ruby on rails, i have read about that
orbyt_ has joined #ruby
<kapil___> yes
xt233 has joined #ruby
konsolebox has quit [Ping timeout: 264 seconds]
<rasterick> what do you make with ROR ? webpages ?
<kapil___> i use it as api only
konsolebox has joined #ruby
<kapil___> i manage fontend in nodejs
xt233 has quit [Client Quit]
xt233 has joined #ruby
AJA4350 has quit [Quit: AJA4350]
xt233 has quit [Client Quit]
<kapil___> i have to go now.
xt233 has joined #ruby
<rasterick> have a good day kapil___
<rasterick> thank you for your help
xt233 has left #ruby [#ruby]
<rasterick> node js is quite impressive !
<kapil___> yes
morenoh149 has quit [Ping timeout: 248 seconds]
d10n-work has quit [Quit: Connection closed for inactivity]
ahuman has quit [Ping timeout: 264 seconds]
Pisuke has joined #ruby
MyMind has quit [Ping timeout: 260 seconds]
<rasterick> i DL node js ... imma try it later tonite
<rasterick> and try to build from source too
<rasterick> tea time, brb
ahuman has joined #ruby
howdoi has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
gix has joined #ruby
cschneid has quit []
gix- has quit [Ping timeout: 276 seconds]
morenoh149 has joined #ruby
cdg has quit [Ping timeout: 276 seconds]
konsolebox has quit [Ping timeout: 248 seconds]
konsolebox has joined #ruby
meadmoon has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sig_ has joined #ruby
trautwein has quit [Quit: ZNC 1.6.5 - http://znc.in]
hndk has quit [Quit: Leaving]
trautwein has joined #ruby
ogres has joined #ruby
roonsauce has joined #ruby
roonsauce has quit [Ping timeout: 260 seconds]
kies has joined #ruby
andydna has joined #ruby
MrBismuth has quit [Quit: https://www.youtube.com/watch?v=xIIqYqtR1lY -- Suicide is Painless - Johnny Mandel]
rasterick has quit [Ping timeout: 260 seconds]
eckhardt has joined #ruby
konsolebox has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
alfiemax has quit [Remote host closed the connection]
konsolebox has joined #ruby
x77686d has joined #ruby
morenoh149 has quit [Ping timeout: 248 seconds]
MrBusiness has joined #ruby
vutral|kali has quit [Ping timeout: 248 seconds]
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
vutral|kali has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
KeyJoo has joined #ruby
DTZUZU has quit [Quit: WeeChat 1.9]
knight33 has quit [Ping timeout: 248 seconds]
eckhardt has joined #ruby
DTZUZU has joined #ruby
konsolebox has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
konsolebox has joined #ruby
darkhanb has joined #ruby
tefa has joined #ruby
<tefa> hello, anybody can help me? im codding something and im getting always "nil" insted of true or false.. even changing the condition... only if i use something like 1==1 works...
morenoh149 has joined #ruby
troys has quit [Quit: Bye]
workmad3 has quit [Ping timeout: 264 seconds]
<tefa> Anyone can help me with this??? https://gist.github.com/anonymous/2852f9ce9dc62849bc28473de2a8845f if i execute juego_recomendable?(un_juego) or completa? i get nil... always...
tefangaaa has joined #ruby
<tefangaaa> Anyone can help me with this??? https://gist.github.com/anonymous/2852f9ce9dc62849bc28473de2a8845f if i execute juego_recomendable?(un_juego) or completa? i get nil... always...
tefa has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
za1b1tsu has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<tefangaaa> alguien me da una mano con un ejercicio por favor???
<andydna> are your constants defined?
<havenwood> tefangaaa: The if statements are evaluating falsey, so `nil` is returned.
<havenwood> tefangaaa: module Biblioteca; module Nope; def self.violento?; true end end end; Biblioteca.juego_recomendable? Biblioteca::Nope #=> true
<havenwood> tefangaaa: get rid of the if statements altogether
<havenwood> tefangaaa: then look more closely at your logic
<havenwood> tefangaaa: also, you're using a module with state, which suggests you should be using a singleton class (if you have one instance of state) or a regular class (if you have more than one instance of state).
<havenwood> tefangaaa: Omit the if statement ^ there, leaving the method body: @puntos > 1000 && juegos.size > 5
<havenwood> tefangaaa: That ^ statement will already always evaluate to `true` or `false`.
<havenwood> Wrapping it in an if statement doesn't help anything, it's just more code without any wins.
<havenwood> tefangaaa: On this line, I'd suggest getting rid of the extra parens: https://gist.github.com/anonymous/2852f9ce9dc62849bc28473de2a8845f#file-gistfile1-txt-L29
<havenwood> tefangaaa: Just: !Biblioteca.juegos.include?(un_juego)
<havenwood> The parens don't do anything, and they're confusing.
morenoh149 has quit [Ping timeout: 248 seconds]
konsolebox has quit [Ping timeout: 248 seconds]
<havenwood> tefangaaa: Use a .rb extension on your gist filename and you'll get nice syntax highlighting.
dinfuehr has quit [Ping timeout: 265 seconds]
snickers has joined #ruby
snickers has quit [Client Quit]
dinfuehr has joined #ruby
alfiemax has joined #ruby
alfiemax has quit [Remote host closed the connection]
<tefangaaa> havenwood hey, ok, as i was saying...
<havenwood> tefangaaa: hey
_aeris_ has quit [Ping timeout: 255 seconds]
_aeris_ has joined #ruby
<tefangaaa> havenwood ok, like i said, im using mumuki.io its like a virtual room teacher for ruby... well actually it teach goobstones... javascript haskell and others.. including ruby...
konsolebox has joined #ruby
<tefangaaa> havenwood so, there are some rules to follow... i must use the things i already wrote in there... cant use other "tricks"
meadmoon has quit [Quit: ZZZzzz…]
<tefangaaa> havenwood apart from that if i erase the "if" and use the condition directly.. wont work.. i get an error
<havenwood> tefangaaa: I replied to your gist with what your code might look like as a class.
<havenwood> tefangaaa: Update your gist with your latest code?
<havenwood> tefangaaa: If you can show how you're using it and what the result is I'm sure someone here can help get you on the right track.
<tefangaaa> havenwood i dont understand.. what you are trying to say to me :D
<havenwood> tefangaaa: That's ^ one suggestion, to use a class.
<tefangaaa> havenwood ya haven.. thats what i was trying to say..
<tefangaaa> havenwood i cant use other stuffs....
<tefangaaa> havenwood only the ones on the gist
<havenwood> tefangaaa: If you must use a module, show us your latest code and how you're using it.
<tefangaaa> havenwood if you check out my code... you can see there is un_juego.violento? and ".violento?" isnt on my gist...
<havenwood> You showed us the Biblioteca module. Gist the latest version and the code your running it with.
<tefangaaa> havenwood but it works.. because the virtual room has saved for me.. on other exercise.. so now i dont have to write it again.. just use it
<tefangaaa> havenwood thats all... thats what i was saying... haha.. dont know how to explaing myself..
<tefangaaa> havenwood how can i send you a screenshoot ?
<tefangaaa> havenwood may i use imgur ?
<tefangaaa> havenwood so you can see what i see
<havenwood> I don't think I understand your constraints. Ha, sure you can use imgur, but usually a gist suffices.
<havenwood> Maybe this isn't gistable?
<havenwood> ¯\_(ツ)_/¯
eckhardt has joined #ruby
<tefangaaa> isnt gistable xd
<tefangaaa> i will show give me a sec
<tefangaaa> ok... this is what i see... i know its in spanish... but as you can see.. its a ruby teacher...
spectrum has joined #ruby
<tefangaaa> and i must use the things that are on the screen... cant use other stuffs... and like i told you.. i dont have to define violento? for example.. because its already defined in other exercise...
<havenwood> >> true if false # tefangaaa
<ruby[bot]> havenwood: # => nil (https://eval.in/955119)
<havenwood> tefangaaa: you should get rid of those if statements
<havenwood> if you have trouble once they're gone, show us the updated code and the error you get
roonsauce has joined #ruby
<tefangaaa> i dont know if i understand you... you mean for example... (talking in javascript), if i use return (here the condition) on javascript that would be enought.. to get true.. if the condition its true.,.. if not will get false.. that what you mean when telling me erase if ?
<tefangaaa> if thats so... i cant delete if..i will show
LocaMocha has joined #ruby
roonsauce has quit [Ping timeout: 240 seconds]
<tefangaaa> havenwood i updated the gist... but i dont know how to answer the gist using colors etc like you did...
<havenwood> use a .rb extension on your filename
<tefangaaa> lol.. i dont have file names xd like i said.. im using a virtual class room...
<havenwood> On the gist.
<tefangaaa> everything its online..
<havenwood> Gists can have multiple files. You can name the gist file.
<havenwood> ?gist
<ruby[bot]> https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<tefangaaa> you killed me over there... haha
armyriad has quit [Quit: Leaving]
<tefangaaa> sorry for being so noob... im trying to learn.. so im using that website... i manage to get this chat room... thats all.. first time using gist..
<havenwood> tefangaaa: If you get rid of the `if`, you'll also want to get rid of the `true` and `end`.
<havenwood> Use indentation so you can see there's an extra `end`.
<tefangaaa> exactly!
<tefangaaa> now i understand you!
<tefangaaa> omg...
<tefangaaa> thanks.. really..
<baweaver> Jajajaja, mi español es lo suficientemente bueno para leer este Ruby code
<tefangaaa> i have been with it for hours... hoursss... so many hours that i couldnt see the fact...
spuk has quit [Ping timeout: 264 seconds]
<baweaver> but not that great overall. Yay library applications.
<tefangaaa> havenwood now i understand! ty...
comet23 has joined #ruby
<comet23> puts "help>
<comet23> >>puts "HI"
<baweaver> SYNTAX ERROR
<ruby[bot]> comet23: # => HI ...check link for more (https://eval.in/955129)
<baweaver> ohai
<tefangaaa> ty i solved it
morenoh149 has joined #ruby
<havenwood> tefangaaa: yw
<baweaver> havenwood: this is why I want to teach nil early :D
schneide_ has joined #ruby
<havenwood> baweaver: Could the chapter just be blank? True `nil`.
<tefangaaa> havenwood you know.. i tried before deleting "if" but wasnt deleting true and end xd
armyriad has joined #ruby
LocaMocha has quit [Ping timeout: 240 seconds]
<tefangaaa> baweaver y que entendiste del ruby code? xd
<baweaver> Just that it's a library application for checking out books, returning them, getting points, and apparently not recommending violent ones.
_aeris_ has quit [Remote host closed the connection]
<baweaver> I can guess read some spanish, working on the rest :)
morenoh149 has quit [Ping timeout: 240 seconds]
_aeris_ has joined #ruby
LocaMocha has joined #ruby
schneide_ has quit [Ping timeout: 252 seconds]
ramfjord has joined #ruby
<tefangaaa> baweaver nice.. haha but violent returns true if the game is violent.. so..when i used ! was telling me that if the game is violent recommend it XD
<baweaver> not a bad recommendation engine then XD
<tefangaaa> baweaver i started ruby yesterday... so understand me xd
<tefangaaa> baweaver i was desesperate haha
<baweaver> might be why it recommends violent games :P
<baweaver> everyone starts somewhere, don't worry about it :)
<tefangaaa> baweaver had no option.. its what the teacher or the web wants..
<tefangaaa> baweaver just following the exercise instruccions xd
<tefangaaa> baweaver CarlosDuty its a parody name in spanish of CallOfDuty xd
<baweaver> Yeah, I noticed that one
ramfjord has quit [Ping timeout: 256 seconds]
<tefangaaa> baweaver He was a president long time ago 90s xd
Matthew1 has joined #ruby
comet23 has quit [K-Lined]
sig_ has quit [Quit: Leaving]
LocaMocha has quit [Ping timeout: 248 seconds]
x77686d has quit [Quit: x77686d]
x77686d has joined #ruby
<pavelz> trouble is that I need sql query tha
LocaMocha has joined #ruby
<Matthew1> hi pavelz
konsolebox has quit [Ping timeout: 240 seconds]
konsolebox has joined #ruby
ogres has quit [Quit: Connection closed for inactivity]
kies has quit [Ping timeout: 252 seconds]
CrazyEddy has quit [Ping timeout: 248 seconds]
kies has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
CrazyEddy has joined #ruby
LocaMocha has quit [Ping timeout: 255 seconds]
LocaMocha has joined #ruby
LocaMocha has quit [Read error: Connection reset by peer]
lytol has joined #ruby
masterasia has quit [Ping timeout: 256 seconds]
roonsauce has joined #ruby
LocaMocha has joined #ruby
masterasia has joined #ruby
<pavelz> hi Matthew1
LocaMocha is now known as Sauvin
snickers has joined #ruby
roonsauce has quit [Ping timeout: 276 seconds]
ptx0 has quit [Read error: Connection reset by peer]
ptx0 has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
morenoh149 has joined #ruby
za1b1tsu has quit [Quit: Leaving]
rupam123456 has quit [Remote host closed the connection]
workmad3 has joined #ruby
conta has joined #ruby
morenoh149 has quit [Ping timeout: 276 seconds]
alex`` has joined #ruby
dextrey has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
mjolnird has quit [Quit: Leaving]
marmorkr_ has joined #ruby
RougeR has quit [Ping timeout: 240 seconds]
mjolnird has joined #ruby
marmorkreb has quit [Ping timeout: 256 seconds]
kapil___ has quit [Quit: Connection closed for inactivity]
sundhell_away is now known as sundhell
amatas has joined #ruby
devil_tux has joined #ruby
dionysus69 has joined #ruby
maum has joined #ruby
alfiemax has joined #ruby
Matthew1 has quit [Quit: Leaving]
andydna has quit [Ping timeout: 276 seconds]
aufi has joined #ruby
andydna has joined #ruby
Matthew1 has joined #ruby
mrush has joined #ruby
apeiros_ has joined #ruby
<mrush> are all methods closures
<apeiros_> moin!
apeiros_ is now known as apeiros
<dminuoso> mrush: No.
<mrush> dminuoso: okay
<dminuoso> mrush: Although I guess it kind of depends on the perspective.
minimalism has quit [Ping timeout: 248 seconds]
<mrush> dminuoso: well, i've been doing fp tutorails in js, but ruby has more complex scoping than js, i probably should have thought a bit longer before asking the question
venmx has joined #ruby
<dminuoso> mrush: The thing is, strictly speaking the syntax sugared method definition does not give you closures.
<dminuoso> However.
<dminuoso> You have define_method, which accepts a block. And blocks are closues.
<dminuoso> mrush: And the same thing applies to all such dynamic features (defining classes included)
morenoh149 has joined #ruby
<dminuoso> >>
<ruby[bot]> dminuoso: # => nil (https://eval.in/955171)
<dminuoso> >> a = 1; class A; def self.m; puts a; end; end; A.m
<ruby[bot]> dminuoso: # => undefined local variable or method `a' for A:Class (NameError) ...check link for more (https://eval.in/955174)
<dminuoso> >> a = 1; B = Class.new { self.singleton_class.send(:define_method, :m) { puts a } }; B.m
<ruby[bot]> dminuoso: # => 1 ...check link for more (https://eval.in/955175)
aufi_ has joined #ruby
yohji has joined #ruby
<dminuoso> mrush: Does this answer your question?
schneide_ has joined #ruby
<mrush> dminuoso: it does, thank you
milardovich has joined #ruby
aufi has quit [Ping timeout: 256 seconds]
morenoh149 has quit [Ping timeout: 276 seconds]
alfiemax has quit [Remote host closed the connection]
maum has quit [Remote host closed the connection]
char_var[buffer] has quit [Ping timeout: 256 seconds]
nowhereman_ has quit [Ping timeout: 260 seconds]
aupadhye has joined #ruby
ramfjord has joined #ruby
tefangaaa has quit [Ping timeout: 276 seconds]
venmx has quit [Quit: leaving]
_aeris_ has quit [Ping timeout: 255 seconds]
clemens3 has joined #ruby
_aeris_ has joined #ruby
venmx has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
maufart__ has joined #ruby
aufi_ has quit [Ping timeout: 240 seconds]
marmorkreb has joined #ruby
marmorkr_ has quit [Ping timeout: 248 seconds]
Bish has joined #ruby
<Bish> whats wrong with the guys that created selenium and such
<Bish> changing the way it's getting used every 5 minutes
RougeR has joined #ruby
guille-moe has joined #ruby
npgm has quit [Quit: Connection closed for inactivity]
Matthew1 has quit [Quit: Leaving]
roonsauce has joined #ruby
DTZUZO has quit [Ping timeout: 256 seconds]
venmx has quit [Remote host closed the connection]
roonsauce has quit [Ping timeout: 265 seconds]
<dminuoso> Bish: stable APIs are overrated.
Matthew1 has joined #ruby
morenoh149 has joined #ruby
venmx has joined #ruby
<apeiros> dminuoso: how is it that I always have a different opinion than you? 😂
morenoh149 has quit [Ping timeout: 256 seconds]
<dminuoso> Oh boy. Here comes the "effort" and "maintenance" and "cost" argument all over again!
<dminuoso> o/ apeiros
venmx has quit [Remote host closed the connection]
x77686d has quit [Quit: x77686d]
rabajaj has joined #ruby
vichib has joined #ruby
vichib has quit [Max SendQ exceeded]
haraoka has joined #ruby
vichib has joined #ruby
vichib has quit [Max SendQ exceeded]
vichib has joined #ruby
_aeris_ has quit [Remote host closed the connection]
vichib has quit [Max SendQ exceeded]
vichib has joined #ruby
vichib has quit [Max SendQ exceeded]
_aeris_ has joined #ruby
vichib has joined #ruby
vichib has quit [Max SendQ exceeded]
vichib has joined #ruby
vichib has quit [Max SendQ exceeded]
vichib has joined #ruby
vichib has quit [Max SendQ exceeded]
vichib has joined #ruby
vichib has quit [Max SendQ exceeded]
vichib has joined #ruby
vichib has quit [Max SendQ exceeded]
vichib has joined #ruby
alfiemax has joined #ruby
vichib has quit [Max SendQ exceeded]
vichib has joined #ruby
konsolebox has quit [Ping timeout: 268 seconds]
vichib has quit [Max SendQ exceeded]
vichib has joined #ruby
konsolebox has joined #ruby
vichib has quit [Max SendQ exceeded]
vichib has joined #ruby
vichib has quit [Client Quit]
Serpent7776 has joined #ruby
kliq has joined #ruby
konsolebox has quit [Ping timeout: 256 seconds]
konsolebox has joined #ruby
Beams has joined #ruby
marmorkreb has quit [Remote host closed the connection]
marmorkreb has joined #ruby
venmx has joined #ruby
morenoh149 has joined #ruby
dinfuehr has quit [Ping timeout: 255 seconds]
dinfuehr has joined #ruby
marmorkreb has quit [Ping timeout: 248 seconds]
silviu has joined #ruby
morenoh149 has quit [Ping timeout: 248 seconds]
jottr has joined #ruby
tomphp has joined #ruby
jaruga has joined #ruby
venmx has quit [Quit: leaving]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Mike11 has joined #ruby
podman has quit []
podman has joined #ruby
ta_ has quit [Ping timeout: 248 seconds]
<clemens3> dminuoso: are you serious? non stable api=garbage
ta_ has joined #ruby
mostlybadfly has quit []
Mike11 has quit [Quit: Leaving.]
mostlybadfly has joined #ruby
quobo has joined #ruby
amatas has quit [Quit: amatas]
ggherdov has quit []
HashNuke has quit []
ggherdov has joined #ruby
HashNuke has joined #ruby
nowhereman_ has joined #ruby
schneide_ has quit [Remote host closed the connection]
amatas has joined #ruby
schneide_ has joined #ruby
schneide_ has quit [Remote host closed the connection]
asqrd_ has quit [Quit: Leaving]
schneide_ has joined #ruby
aupadhye is now known as aupadhye|brb
milardovich has quit []
nowhere_man has joined #ruby
nowhereman_ has quit [Ping timeout: 265 seconds]
ramfjord has joined #ruby
schneide_ has quit [Ping timeout: 255 seconds]
sundhell is now known as sundhell_away
ramfjord has quit [Ping timeout: 248 seconds]
Brak____________ has quit []
Brak____________ has joined #ruby
meinside has quit []
kapil___ has joined #ruby
meinside has joined #ruby
drewmcmillan has joined #ruby
marmorkreb has joined #ruby
dextrey has quit [Ping timeout: 256 seconds]
nowhereman_ has joined #ruby
nowhere_man has quit [Ping timeout: 255 seconds]
drewmcmillan has quit [Ping timeout: 240 seconds]
Fenhl has quit []
Fenhl has joined #ruby
marmorkreb has quit [Ping timeout: 248 seconds]
graft has joined #ruby
graft has joined #ruby
graft has quit [Changing host]
daxroc has quit []
daxroc has joined #ruby
Chew has quit []
Chew has joined #ruby
schneide_ has joined #ruby
jnix has quit []
jnix has joined #ruby
drewmcmillan has joined #ruby
drewmcmillan has quit [Client Quit]
marr has joined #ruby
darthThorik has quit []
darthThorik has joined #ruby
cdg has joined #ruby
zipkid has quit []
cdg has quit [Ping timeout: 276 seconds]
zipkid has joined #ruby
McSoFake has joined #ruby
scrptktty has quit [Quit: Connection closed for inactivity]
tvw has joined #ruby
<dminuoso> Some people have no sense of humour, clearly.
workmad3 has joined #ruby
konsolebox has quit [Ping timeout: 248 seconds]
drewmcmillan has joined #ruby
apparition47 has joined #ruby
Dimik has quit [Ping timeout: 265 seconds]
silviu has quit [Remote host closed the connection]
alfiemax has quit [Remote host closed the connection]
silviu has joined #ruby
nadir has quit []
konsolebox has joined #ruby
alfiemax has joined #ruby
nadir has joined #ruby
HalcyonicStorm has quit []
HalcyonicStorm has joined #ruby
apparition47 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
alfiemax has quit [Remote host closed the connection]
<Bish> dminuoso: are you serious!???
<Bish> changing apis would be totally fine
<Bish> if you had a documentation explaining the current one
<Bish> but working with selenium seems to be trial and error on stack overflow
* apeiros gets himself some 🍿
apparition47 has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
silviu has quit [Remote host closed the connection]
AJA4350 has joined #ruby
Guest87151 has quit [Quit: ZNC 1.6.5 - http://znc.in]
alfiemax has joined #ruby
konsolebox has quit [Ping timeout: 248 seconds]
untitaker has quit []
konsolebox has joined #ruby
terens has joined #ruby
<terens> hi
<terens> tapa[:ee][:ee]="eee" how can I set this ?
<terens> if tapa = {}
<terens> and [:ee] is not se
untitaker has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
fury has quit []
fury has joined #ruby
dinfuehr has quit [Ping timeout: 248 seconds]
jamesaxl_05 has joined #ruby
dinfuehr has joined #ruby
spectrum has quit [Ping timeout: 248 seconds]
<apeiros> terens: tapa[:ee] = {ee: "eee"}
<apeiros> though your "[:ee] is not se(sic)" is ambiguous
konsolebox has quit [Ping timeout: 240 seconds]
<oroborous> are there any methods similar to attr_accessor for accessing class instance variables from within instances/objects? or do I have to define them myself? hope I'm not getting it wrong
minimalism has joined #ruby
<apeiros> oroborous: yes. attr_accessor. ;-)
konsolebox has joined #ruby
<apeiros> >> class A; class << self; attr_accessor :foo; end; end; A.foo = "hello there"; A.foo
<ruby[bot]> apeiros: # => "hello there" (https://eval.in/955483)
<apeiros> oh, from within instances
<apeiros> not really. you can use Forwardable. but IMO either just define them, or don't even bother and call on the class directly.
<oroborous> ok, didn't know this 'class << self' "thing" :) thank you
konsolebox has quit [Ping timeout: 240 seconds]
meadmoon has joined #ruby
konsolebox has joined #ruby
marmorkreb has joined #ruby
<dminuoso> Bish: Documentation is overrated.
jeffreylevesque has quit [Ping timeout: 240 seconds]
<apeiros> rating things is overrated
alfiemax has quit [Remote host closed the connection]
<dminuoso> Allegedly.
<dminuoso> singleton_class.public_send :attr_accessor, :foo
<dminuoso> mmm
silviu has joined #ruby
jnollette has quit [Remote host closed the connection]
jnollette has joined #ruby
<apeiros> o0
<apeiros> public_send with a literal method name = always wrong 😁
<apeiros> ok. I correct myself. in some cases it's the method name which is wrong 😄
quobo has quit [Quit: Connection closed for inactivity]
Pisuke has quit [Read error: Connection reset by peer]
jshjsh has quit [Read error: Connection reset by peer]
jshjsh has joined #ruby
ramfjord has joined #ruby
Pisuke has joined #ruby
silviu has quit [Remote host closed the connection]
silviu has joined #ruby
ramfjord has quit [Ping timeout: 276 seconds]
DoubleMalt has joined #ruby
DoubleMalt has quit [Read error: Connection reset by peer]
ujjain has joined #ruby
<ujjain> How can I make ruby escape a string for json?
<apeiros> JSON.dump(string)
Matthew1 has quit [Ping timeout: 265 seconds]
minimalism has quit [Quit: minimalism]
* dminuoso imagines ujjain writing a JSON dumper, thinking "wait.. ruby has this out of the box? *sighs*"
* dminuoso imagines then grinning
<ujjain> Yeah, I imagine ruby would have everything out of the box
<apeiros> dminuoso: I think you have to elaborate for them
John_Ivan has joined #ruby
nowhere_man has joined #ruby
milardovich has joined #ruby
jeffreylevesque has joined #ruby
nowhereman_ has quit [Ping timeout: 264 seconds]
apeiros__ has joined #ruby
meadmoon has quit [Quit: I am functioning within established parameters.]
kapil___ has quit [Quit: Connection closed for inactivity]
haraoka has quit [Ping timeout: 264 seconds]
apeiros has quit [Ping timeout: 265 seconds]
dinfuehr has quit [Ping timeout: 252 seconds]
dinfuehr has joined #ruby
KeyJoo has quit [Read error: Connection reset by peer]
KeyJoo has joined #ruby
apeiros__ has quit [Remote host closed the connection]
apeiros has joined #ruby
jobewan has joined #ruby
Psybur has joined #ruby
Ganesh has joined #ruby
Ganesh is now known as Guest74089
DTZUZO has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
minimalism has joined #ruby
John_Ivan has quit [Read error: Connection reset by peer]
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
zapata has quit [Read error: Connection reset by peer]
anisha has joined #ruby
zapata has joined #ruby
jamesaxl_work has joined #ruby
ramfjord has joined #ruby
jamesaxl_05 has quit [Ping timeout: 256 seconds]
jamesaxl_work has quit [Client Quit]
jamesaxl_05 has joined #ruby
keyjoo_ has joined #ruby
jamesaxl_work has joined #ruby
kliq has quit [Ping timeout: 260 seconds]
keyjoo_ has quit [Remote host closed the connection]
KeyJoo has quit [Ping timeout: 240 seconds]
galeido has quit []
galeido has joined #ruby
ramfjord has quit [Ping timeout: 276 seconds]
jamesaxl_05 has quit [Ping timeout: 260 seconds]
kapil___ has joined #ruby
cdg has joined #ruby
alfiemax has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has quit [Ping timeout: 256 seconds]
cdg has quit [Ping timeout: 255 seconds]
jobewan has quit [Quit: jobewan]
cdg has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
drewmcmillan has joined #ruby
drewmcmillan has quit [Read error: Connection reset by peer]
dextrey has joined #ruby
drewmcmillan has joined #ruby
jottr has joined #ruby
tomphp has joined #ruby
milardovich has quit [Remote host closed the connection]
jcalla has joined #ruby
milardovich has joined #ruby
tomphp has quit [Client Quit]
nahra has joined #ruby
banisterfiend has joined #ruby
spuk has joined #ruby
desperek has joined #ruby
tomphp has joined #ruby
roshanavand has joined #ruby
tomphp has quit [Client Quit]
tomphp has joined #ruby
tomphp has quit [Client Quit]
koenrh has quit []
koenrh has joined #ruby
nadir has joined #ruby
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
rabajaj has quit [Quit: Leaving]
troulouliou_dev has joined #ruby
<terens> what is the best way to read a queue
<terens> using concurrent ruby?
Pisuke has quit [Read error: Connection reset by peer]
Serpent7776 has quit [Read error: Connection reset by peer]
Serpent7776 has joined #ruby
jobewan has joined #ruby
kobain has joined #ruby
Pisuke has joined #ruby
<apeiros> >> require 'thread'; q = Thread::Queue.new; q.push "hi"; q.shift # @ terens
<ruby[bot]> apeiros: # => "hi" (https://eval.in/955602)
<apeiros> that's assuming you need a thread safe queue. if not, just use an array.
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
POKE53280 has joined #ruby
<terens> I mean that I want a loop to read from queue but not blocking main thread
<terens> the naive is Thread.new do ..... queue.pop .... end
dionysus69 has quit [Quit: dionysus69]
* dminuoso gives apeiros an array
<apeiros> you do realize that you didn't formulate that in any way in your original question? :)
<dminuoso> Here, just for you.
aguestuser has quit [Read error: Connection reset by peer]
jnollette has quit [Read error: Connection reset by peer]
_aeris_ has quit [Read error: Connection reset by peer]
<apeiros> dminuoso: thanks
* apeiros throws it on his heap of arrays
jnollette has joined #ruby
aguestuser has joined #ruby
_aeris_ has joined #ruby
<apeiros> terens: so how does the data get into the queue in the first place?
amatas_ has joined #ruby
Rapture has joined #ruby
<dminuoso> apeiros: You keep yours on a heap? That's quite messy.
<dminuoso> I like mine stacked.
<apeiros> dminuoso: that's so linear
<dminuoso> apeiros: And yet I find mine constantly!
<dminuoso> *my I guess
<apeiros> but your access!
maciuszek has quit []
<apeiros> oh actually, only removing/replacing
bogdanteleaga has quit [Quit: ZNC - http://znc.in]
maciuszek has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banisterfiend has joined #ruby
<terens> apeiros: I don't do it my self but it is from other thread
jnollette has quit [Quit: ZNC 1.6.5 - http://znc.in]
devil_tux has quit [Quit: leaving]
<apeiros> yes, then without blocking the main thread you either have to peek (Queue#empty?) or use a separate thread for processing.
jnollette has joined #ruby
<terens> I dont care using separate thread
dextrey has quit [Ping timeout: 252 seconds]
apparition47 has quit [Quit: Bye]
jnollette has quit [Client Quit]
k0mpa has joined #ruby
KeyJoo has joined #ruby
konsolebox has quit [Ping timeout: 265 seconds]
POKE53280 has quit [Quit: Konversation terminated!]
<havenwood> terens: Thread.new { loop { queue.pop.call } }
POKE53280 has joined #ruby
jnollette has joined #ruby
jamesaxl_work has quit [Quit: WeeChat 2.0.1]
aguestuser has quit [Remote host closed the connection]
jamesaxl_05 has joined #ruby
aguestuser has joined #ruby
d10n-work has joined #ruby
adelyne has left #ruby [#ruby]
schneide_ has quit [Remote host closed the connection]
nuck has quit []
<terens> havenwood in case of error ?
KeyJoo has quit [Read error: Connection reset by peer]
nuck has joined #ruby
schneide_ has joined #ruby
<apeiros> Thread.abort_on_exception = true # let the app die in a fire
<apeiros> additionally: exception handling as usual.
<terens> lol ok
<havenwood> terens: You could use a threadpool with a single thread and a reaper, if you need the thread to be restarted if dead.
<terens> I tried singlethreadexecutor
<terens> not sure if it has reaper
<havenwood> terens: it does - that should work well
<terens> ok thanks.
<terens> However there is no purpose using this queue
<apeiros> I don't get the reaper concept. just handle all exceptions in the loop. if you can't handle an exception, a reaper won't help either, no?
<apeiros> just makes the architecture more complex
<apeiros> or am I missing something?
krawchyk has joined #ruby
<havenwood> apeiros: If the thread blows up unexpectedly it just comes by intermittently and removes it from the pool. Maybe it's unnecessarily complex, but pools like Puma use it because a wonky dead thread messes up the pool.
silviu has quit [Quit: Leaving...]
Iambchop has quit []
Iambchop has joined #ruby
<terens> I use a gem from other developer. However 1. He wants method param as json string. 2. doesnt return a value/obj when calling methods but puts messages in a queue . 3. messages use metaprogramming to find the caller class.
<terens> is this rational?
kies has quit [Ping timeout: 276 seconds]
<havenwood> "Should the thread die for any reason it will be removed and replaced, thus ensuring that the executor will always remain viable and available to process jobs."
<apeiros> dunno. I prefer Thread.abort_on_exception = true + Thread.new do until stop_this_worker?; begin; work; rescue *StuffToPassOn; raise; rescue Exception; …; end; end; ?end? (I lost count, whatever)
<apeiros> my threads just never die.
<havenwood> Perfection is nicer than fault tolerance? :-)
<apeiros> no, I just put the handling in a different place
<havenwood> aye
<apeiros> if your reaper dies, what then?
<havenwood> reap the reaper
<havenwood> ;-P
<apeiros> i.e. my reaper is having begin/rescue around the work unit
kliq has joined #ruby
<havenwood> yeah, that makes sense
<apeiros> and due to ignorants inheriting from Exception for their exception classes, I do that dance with the double rescue clause
<apeiros> StuffToPass on is an array with things like Interrupt, NoMemoryError etc.
<apeiros> i.e. legit <Exception classes, unlike JonnyWeirdos::Exception < Exception :)
<terens> what do you think about the issues with the gem ?
krawchyk has quit [Quit: krawchyk]
mr-robert has quit []
<apeiros> terens: "issues"? I saw a description of an architecture, I missed the "issue" part?
<apeiros> as for judging said architecture - lack of details. can't tell whether it makes sense.
mr-robert has joined #ruby
<terens> indeed'
<apeiros> if all code is executed in ruby and the method param is never passed outside the ruby process, then I can't come up with a sensible reason to require json
<terens> all code is executed in ruby
<apeiros> as for not returning - sounds like an async pattern? hard to tell. async patterns can make a lot of sense.
netherwolfe has joined #ruby
<terens> it gets parsed into hash etc
rippa has joined #ruby
<terens> not returning maybe but it has no threads at all
konsolebox has joined #ruby
<apeiros> how about telling us which gem it is?
<terens> it is not on rubygems
krawchyk has joined #ruby
drewmcmillan has joined #ruby
<terens> but it is hard for me to get messages from queue and glue them together
<apeiros> that indicates that you somehow know the author - why not ask them yourself?
krawchyk has quit [Client Quit]
<terens> and check whether operation failed or not
roonsauce has joined #ruby
<terens> he told me check last message
<terens> but this doesnt work
<terens> always
<terens> about the json params he told me - "for validation"
<apeiros> look, I don't enjoy discussing code I can't see. so IMO talk with the author.
krawchyk has joined #ruby
<terens> ok have to go thanks
snath has quit [Ping timeout: 260 seconds]
krawchyk has quit [Client Quit]
terens has quit [Quit: Leaving]
hndk has joined #ruby
jnollette has quit [Remote host closed the connection]
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
jnollette has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
netherwolfe has quit [Read error: Connection reset by peer]
bijan_ has joined #ruby
bijan_ has quit [Client Quit]
schneide_ has quit [Remote host closed the connection]
aguestuser has quit [Remote host closed the connection]
aguestuser has joined #ruby
schneide_ has joined #ruby
TinkerTyper has quit [Quit: ZNC 1.7.x-nightly-20180120-fcc710b4 - https://znc.in]
kapil___ has quit [Quit: Connection closed for inactivity]
netherwolfe has joined #ruby
jamesaxl_05 has quit [Ping timeout: 256 seconds]
hndk has quit [Ping timeout: 240 seconds]
cagomez has joined #ruby
yohji has quit [Ping timeout: 276 seconds]
LastWhisper____ has joined #ruby
alfiemax has quit [Remote host closed the connection]
nowhereman_ has joined #ruby
troys has joined #ruby
jordanm has quit [Remote host closed the connection]
pierrethierry has joined #ruby
nowhere_man has quit [Ping timeout: 260 seconds]
pierrethierry is now known as nowhere_man
nowhereman_ has quit [Ping timeout: 252 seconds]
cagomez has quit []
alfiemax has joined #ruby
hndk has joined #ruby
alfiemax has quit [Remote host closed the connection]
schneide_ has quit [Remote host closed the connection]
yohji has joined #ruby
maufart__ has quit [Ping timeout: 260 seconds]
schneide_ has joined #ruby
conta has quit [Ping timeout: 252 seconds]
spuk has quit [Ping timeout: 252 seconds]
hndk has quit [Ping timeout: 256 seconds]
jordanm has joined #ruby
John_Ivan has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
schneide_ has quit [Ping timeout: 248 seconds]
kies has joined #ruby
milardovich has quit [Remote host closed the connection]
moei has joined #ruby
marmorkreb has quit [Remote host closed the connection]
tcopeland has quit [Ping timeout: 240 seconds]
marmorkreb has joined #ruby
raynold has joined #ruby
Silmarilion has joined #ruby
s1detracking has quit [Quit: Leaving]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
marmorkreb has quit [Ping timeout: 248 seconds]
milardovich has joined #ruby
hndk has joined #ruby
marmorkreb has joined #ruby
milardovich has quit [Ping timeout: 264 seconds]
marmorkreb has quit [Ping timeout: 256 seconds]
jhass has quit [Ping timeout: 240 seconds]
snath has joined #ruby
jhass has joined #ruby
mcr1 has quit [Ping timeout: 276 seconds]
nowhereman_ has joined #ruby
nowhere_man has quit [Ping timeout: 252 seconds]
FrostCandy has joined #ruby
x77686d has joined #ruby
n0m4d1c has joined #ruby
kies has quit [Ping timeout: 276 seconds]
tomlukeywood has joined #ruby
claudiuinberlin has joined #ruby
claudiuinberlin has quit [Client Quit]
sylario has joined #ruby
despai has joined #ruby
[Butch] has joined #ruby
yohji has quit [Ping timeout: 240 seconds]
anisha has quit [Quit: This computer has gone to sleep]
kies has joined #ruby
reber has joined #ruby
devil_tux has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
guacamole has joined #ruby
teej has joined #ruby
darkhanb has joined #ruby
<hoylemd> 79/wc
hoylemd has left #ruby [#ruby]
schneide_ has joined #ruby
aupadhye|brb has quit [Remote host closed the connection]
marxarelli|afk is now known as marxarelli
tcopeland has joined #ruby
yohji has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
schneide_ has quit [Ping timeout: 276 seconds]
n0m4d1c_ has joined #ruby
kanobt61 has quit [Ping timeout: 255 seconds]
n0m4d1c has quit [Ping timeout: 240 seconds]
Xiti has quit [Quit: Xiti]
roonsauce has quit [Remote host closed the connection]
n0m4d1c_ has quit [Remote host closed the connection]
roonsauce has joined #ruby
Serpent7776 has quit [Quit: Leaving]
xenops has joined #ruby
minimalism has quit [Quit: minimalism]
roonsauce has quit [Remote host closed the connection]
roonsauce has joined #ruby
Xiti has joined #ruby
yohji has quit [Remote host closed the connection]
dionysus69 has joined #ruby
n0m4d1c has joined #ruby
tomlukeywood has quit [Remote host closed the connection]
n0m4d1c_ has joined #ruby
schneide_ has joined #ruby
n0m4d1c has quit [Ping timeout: 264 seconds]
SeepingN has joined #ruby
tvw has quit [Remote host closed the connection]
guille-moe has quit [Ping timeout: 256 seconds]
dextrey has joined #ruby
govg has quit [Ping timeout: 260 seconds]
mcr1 has joined #ruby
orbyt_ has joined #ruby
Beams has quit [Quit: .]
alex`` has quit [Quit: WeeChat 2.0.1]
alex`` has joined #ruby
mcr1 has quit [Ping timeout: 240 seconds]
sanscoeur has joined #ruby
ujjain has quit [Read error: Connection reset by peer]
s3nd1v0g1us has joined #ruby
clemens3 has quit [Ping timeout: 268 seconds]
jamiejackson has joined #ruby
char_var[buffer] has joined #ruby
char_var[buffer] has quit [Remote host closed the connection]
iamsoami has joined #ruby
x77686d has quit [Ping timeout: 265 seconds]
PaulCapestany has quit [Quit: .]
regedit has joined #ruby
PaulCapestany has joined #ruby
<iamsoami> hey, do you know a function who can provide this kind of behavior: https://gist.github.com/anonymous/6de3abe358f1593d39cdbc546e6e0481
apeiros has joined #ruby
kobain has quit [Ping timeout: 256 seconds]
<iamsoami> sorry, meant something like this: https://gist.github.com/anonymous/85aaf72315204b00c4877ed0b059e975
devil_tux has quit [Ping timeout: 248 seconds]
apeiros has quit [Remote host closed the connection]
mcr1 has joined #ruby
larcara has joined #ruby
devil_tux has joined #ruby
dviola has joined #ruby
<havenwood> iamsoami: i can think of a few ways to write such a method, but one that does exactly that doesn't ship with Ruby
dextrey has quit [Ping timeout: 240 seconds]
<havenwood> iamsoami: have you taken a stab at writing it yet?
chouhoulis has joined #ruby
jottr has quit [Ping timeout: 264 seconds]
<iamsoami> was searching the web to find a solution. there is values_at which delivers nil if it doesn't find the key. but it returns only the values as an array. not what i search.
tomphp has joined #ruby
tomphp has quit [Client Quit]
pkayokay has joined #ruby
andydna has quit [Quit: leaving]
eckhardt has joined #ruby
n0m4d1c_ has quit [Read error: Connection reset by peer]
n0m4d1c has joined #ruby
spiette_ has quit [Quit: :qa!]
jaruga_ has joined #ruby
andydna has joined #ruby
<andydna> asdf = :something ; def asdf; :something_else; end. how do i undefine the instance variable?
PaulCape_ has joined #ruby
<andydna> err, local variable not instance variable
PaulCapestany has quit [Ping timeout: 256 seconds]
<havenwood> iamsoami: There're many ways to implement it, here's one: https://gist.github.com/havenwood/ab7336fcef83e5f9dd2f7f3788295780
jaruga has quit [Ping timeout: 248 seconds]
<andydna> nvm
<havenwood> >> asdf = :something ; def asdf; :something_else; end; self.asdf # andydna
<ruby[bot]> havenwood: # => private method `asdf' called for main:Object (NoMethodError) ...check link for more (https://eval.in/955757)
alfiemax has joined #ruby
<havenwood> #=> :something_else
<headius> hmm, anyone know how to install a debug build with ruby-install?
tomphp has joined #ruby
<havenwood> headius: what's a debug build? like passing debugflags?
rgiscard has joined #ruby
pkayokay_ has joined #ruby
drewmcmi_ has joined #ruby
jeffreylevesque has quit [Remote host closed the connection]
<headius> yeah I guess I thought I needed something special to step debug through MRI source, but my ruby-install builds seem to work fine for that
<headius> carry on!
drewmcmi_ has quit [Read error: Connection reset by peer]
drewmcmillan has quit [Read error: Connection reset by peer]
drewmcmi_ has joined #ruby
antoniobeyah has joined #ruby
antoniobeyah has quit [Max SendQ exceeded]
pkayokay_ has left #ruby [#ruby]
antoniobeyah has joined #ruby
snickers has joined #ruby
pkayokay_ has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
RougeR has quit [Ping timeout: 240 seconds]
pkayokay_ has quit [Client Quit]
drakko has joined #ruby
t0m has joined #ruby
jeffreylevesque has joined #ruby
<t0m> hey all i have a react on rails app that keeps trying to serve service-worker.js on the root route, has anyone encountered that before?
jerikl has joined #ruby
t0m has left #ruby [#ruby]
desperek has quit [Ping timeout: 256 seconds]
guille-moe has joined #ruby
fmccann has quit [Quit: ZNC 1.6.5 - http://znc.in]
jottr has joined #ruby
orbyt_ has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 248 seconds]
sameerynho has joined #ruby
jaruga_ has quit [Quit: jaruga_]
jottr has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
jottr has quit [Ping timeout: 248 seconds]
larcara has quit []
Psybur is now known as SecretNINJA
Matthew1 has joined #ruby
cdg has quit [Ping timeout: 252 seconds]
guille-moe has quit [Ping timeout: 260 seconds]
krawchyk has joined #ruby
Sauvin has quit [Read error: Connection reset by peer]
POKE53280 has quit [Ping timeout: 256 seconds]
clemens3 has joined #ruby
despai has quit [Quit: ...]
ramfjord has joined #ruby
krawchyk_ has joined #ruby
krawchyk has quit [Ping timeout: 256 seconds]
krawchyk_ has quit [Client Quit]
amatas_ has quit [Quit: amatas_]
despai has joined #ruby
alfiemax has quit [Remote host closed the connection]
Vapez has joined #ruby
jerikl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Azure has quit [Read error: Connection reset by peer]
jerikl has joined #ruby
Azure has joined #ruby
jeffreylevesque has quit [Ping timeout: 264 seconds]
alfiemax_ has joined #ruby
claudiuinberlin has joined #ruby
marmorkreb has joined #ruby
Matthew1 has quit [Remote host closed the connection]
McSoFake has quit [Quit: McSoFake]
Matthew1 has joined #ruby
drakko has quit [Quit: xoxo]
spuk has joined #ruby
pkayokay has quit [Quit: Page closed]
marmorkreb has quit [Ping timeout: 260 seconds]
jottr has joined #ruby
tfitts has joined #ruby
akkad has quit [Excess Flood]
masterasia has quit [Ping timeout: 276 seconds]
Puffball has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 240 seconds]
despai has quit [Quit: ...]
Puffball has joined #ruby
Gnubie_ has quit [Read error: Connection reset by peer]
morenoh149 has joined #ruby
nowhereman_ has quit [Ping timeout: 260 seconds]
krawchyk has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akkad has joined #ruby
dionysus69 has quit [Ping timeout: 264 seconds]
jerikl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomlukeywood has joined #ruby
nwm_ has joined #ruby
<nwm_> so I'm wondering what the best way to implement DI/interface in ruby would be
<nwm_> there is the constructor def initialize(impl); @impl = impl; end
<nwm_> but it could also be done per instance with bar = Foo.new; bar.extend(Impl)
regedit has quit [Quit: Connection closed for inactivity]
jerikl has joined #ruby
gizmore|2 is now known as gizmore
<baweaver> ?xy
<ruby[bot]> it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
tomlukeywood has quit [Remote host closed the connection]
Mrrobota has joined #ruby
RougeR has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
[spoiler] has quit [Quit: Cheers!]
[spoiler] has joined #ruby
[spoiler] has quit [Client Quit]
[spoiler] has joined #ruby
Mrrobota has quit [Read error: Connection reset by peer]
oroborous has quit [Remote host closed the connection]
tvw has joined #ruby
mcr1 has quit [Ping timeout: 256 seconds]
drewmcmi_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
woop has joined #ruby
woop has quit [Client Quit]
SecretNINJA has quit [Ping timeout: 256 seconds]
morenoh149 has quit [Ping timeout: 256 seconds]
elcontrastador has joined #ruby
Azure has quit [Read error: Connection reset by peer]
Azure|dc has joined #ruby
Matthew1 has quit [Remote host closed the connection]
apeiros has joined #ruby
n0m4d1c_ has joined #ruby
Dimik has joined #ruby
despai has joined #ruby
tefa has joined #ruby
n0m4d1c has quit [Read error: Connection reset by peer]
<tefa> alguien que hable español???
<havenwood> tefa: There's a #ruby-es channel with a few folk.
troulouliou_dev has quit [Quit: Leaving]
jerikl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apeiros has quit [Remote host closed the connection]
<tefa> what does it mean that a module must not incializate by default another module...?
workmad3 has joined #ruby
jottr has joined #ruby
n0m4d1c has joined #ruby
n0m4d1c_ has quit [Ping timeout: 276 seconds]
alfiemax_ has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 256 seconds]
workmad3 has quit [Ping timeout: 263 seconds]
krawchyk has quit [Quit: krawchyk]
n0m4d1c_ has joined #ruby
krawchyk has joined #ruby
n0m4d1c has quit [Ping timeout: 268 seconds]
roonsauce has quit [Remote host closed the connection]
roonsauce has joined #ruby
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
krawchyk has quit [Quit: krawchyk]
DoubleMalt has joined #ruby
cdg has joined #ruby
DoubleMalt has quit [Client Quit]
roonsauce has quit [Ping timeout: 260 seconds]
cdg_ has joined #ruby
cdg_ has quit [Remote host closed the connection]
cdg_ has joined #ruby
cdg has quit [Read error: Connection reset by peer]
roonsauce has joined #ruby
apeiros has joined #ruby
mcr1 has joined #ruby
cdg has joined #ruby
spiette has joined #ruby
roonsauce has quit [Remote host closed the connection]
apeiros has quit [Remote host closed the connection]
cdg_ has quit [Ping timeout: 260 seconds]
morenoh149 has joined #ruby
nowhereman_ has joined #ruby
jerikl has joined #ruby
lxsameer has quit [Ping timeout: 255 seconds]
Vapez has quit [Remote host closed the connection]
<tefa> can anybody help me with an exercise ?
jaruga has joined #ruby
<tefa> solved
kobain has joined #ruby
eckhardt has joined #ruby
alfiemax has joined #ruby
marxarelli is now known as marxarelli|afk
drewmcmillan has joined #ruby
nwm_ has quit [Ping timeout: 260 seconds]
alex`` has quit [Quit: WeeChat 2.0.1]
alex`` has joined #ruby
jamesaxl has quit [Quit: WeeChat 2.0.1]
n0m4d1c_ has quit [Remote host closed the connection]
roonsauce has joined #ruby
alfiemax has quit [Remote host closed the connection]
jottr has joined #ruby
krawchyk has joined #ruby
jottr has quit [Ping timeout: 248 seconds]
orbyt_ has joined #ruby
quobo has joined #ruby
FrostCandy has quit []
<arahael> nwm_: If you were here, I"d have asuggested that the best solution would be one that is still 1) Simple to use, and 2) Correct, in that if you have a successful instantiation, then the behaviour is well defined.
devil_tux has quit [Ping timeout: 256 seconds]
<arahael> headius: I keep reading that as "Magnetic Resonance Imaging", the Ruby jargon keeps getting lost on me! :)
apeiros has joined #ruby
alex`` has quit [Quit: WeeChat 2.0.1]
Pisuke has quit [Quit: WeeChat 2.1-dev]
jerikl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kies has quit [Ping timeout: 268 seconds]
Sembei has joined #ruby
amatas has quit [Quit: amatas]
DroidBurgundy has joined #ruby
drewmcmillan has quit [Read error: Connection reset by peer]
jcalla has quit [Quit: Leaving]
apeiros has quit [Ping timeout: 256 seconds]
drewmcmillan has joined #ruby
ledestin has joined #ruby
Azure|dc has quit [Read error: Connection reset by peer]
schneide_ has quit [Remote host closed the connection]
Azure has joined #ruby
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
benjen has quit [Ping timeout: 252 seconds]
benjen has joined #ruby
Gnut has joined #ruby
<Gnut> Is there a way to create an instance method that defines the attributes to use for a comparison?
<Radar> Gnut: yes. Can you give an example of what you're trying to do before I tell you the answer though?
<Radar> I just want to make sure we're solving the right problem.
<Gnut> For example, I have an attribute `id` and when I determine equivalency between two objects of that class i want it to use that `id` attribute
<Radar> Gnut: What's happening at the moment when you compare those two objects?
<Gnut> so `o1 == o2` if `o1.@id == o2.@id`
nwm_ has joined #ruby
<Gnut> Well I'm trying to put the objects into a Set
<Gnut> just to ensure duplicate values aren't produced if the return creates duplicate values
<Radar> iirc, Set uses `obj#hash` to determine if the objects are unique or not. You can define `hash` as an instance method on your class.
<Gnut> Radar: perfect, exactly what i was looking for. Thanks
<Radar> Here's how Active Record does it. They use a combination of the object's class name and the id.
[Butch] has quit [Quit: Textual IRC Client: www.textualapp.com]
<Radar> I was just telling a mentee of mine last week that this information has come in handy _twice_ in my decade-long Ruby experience. Now this makes it 3 times.
cpruitt has joined #ruby
jottr has joined #ruby
reber has quit [Read error: Connection reset by peer]
<cpruitt> Hope this isn't too offtopic, but I'm looking for some naming advice. In a game with two players, "the other player" would be the "opponent". Anyone got a good word for "the ME player"? I'm looking for something better than #player_a and #player_b.
k0mpa has quit [Ping timeout: 255 seconds]
<cpruitt> Nevermind. Offense & Defense is perfectly useable.
<guacamole> home team away team
<cpruitt> guacamole: Yeah, I thought about that but it's not entirely accurate.
<cpruitt> I'm playing with writing a battleship clone so there's not really a "home" or "away".
drewmcmillan has quit [Read error: Connection reset by peer]
<cpruitt> Even offense & defense isn't really ideal
drewmcmillan has joined #ruby
apeiros has joined #ruby
<guacamole> us & them
apeiros has quit [Remote host closed the connection]
morenoh149 has quit [Ping timeout: 264 seconds]
apeiros has joined #ruby
<cpruitt> guacamole: Good as anything else I guess. At least it makes the viewpoint of the player clear.
<guacamole> can battleship have more than 2 players?
<cpruitt> No
<cpruitt> At least not traditionally
<guacamole> what about like "threat" and "homeland" or something war-ish like that
<guacamole> that might be more confusing
<guacamole> idk!
skweek has quit [Ping timeout: 240 seconds]
DLSteve has quit [Read error: Connection reset by peer]
sameerynho has quit [Ping timeout: 240 seconds]
<guacamole> here's a dod dictionary, maybe something good in there (might have lots of variables names for you if you're making battleship) https://fas.org/irp/doddir/dod/jp1_02-april2010.pdf
jottr has quit [Quit: WeeChat 2.0.1]
jnollette has quit [Ping timeout: 255 seconds]
pragmatism has quit [Ping timeout: 240 seconds]
<cpruitt> Good link. Thanks!
pragmatism has joined #ruby
reinh1 has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
infernix has quit [Remote host closed the connection]
<tefa> cpruitt the name is for the public or for the players?
<tefa> cpruitt if name for players... it would be you & enemy xd
chouhoulis has quit [Ping timeout: 276 seconds]
<tefa> cpruitt if its for public view.. and its a battleship game.. i would use fleet to determinate insted of players...
advorak has joined #ruby
<cpruitt> tefa: More just model attributes. In a game where a player can see one half of the game, the "game board" has two players, and the view has a "me" half and an "opponent" half. I'm looking for something in the way of Game#opponent and Game#something_that_means_myself.
n0m4d1c has joined #ruby
<cpruitt> In the actual game, the player will inherently know which is "them" cause it's the only view that shows their pieces.
<cpruitt> Writing first person code like @game.myself feels weird though.
<tefa> cpruitt wouldnt be fleet accuarate ? i mean.. i suppose.. both have fleets under their commands..
milardovich has quit [Ping timeout: 264 seconds]
jnollette has joined #ruby
<cpruitt> tefa: Yeah, that's the difficulty with all of the names I came up with. Every name applies when viewed from the other point of view.
<tefa> cpruitt player1 fleet...
jamiejackson has quit [Remote host closed the connection]
mikhael_k33hl has joined #ruby
marxarelli|afk is now known as marxarelli
roonsauce has quit [Remote host closed the connection]
<arahael> cpruitt: activePlayer
<tefa> cpruitt maybe seeing it this way ? -> if the board for player one is blue and for player 2 is red.. i would use red/blue
<mikhael_k33hl> Is there an easy way to determine if an IP Address is version 4 and is private?
roonsauce has joined #ruby
<cpruitt> arahael: Thought about that except that they're not "active" when it's not their turn so that could get confusing.
<Radar> mikhael_k33hl: two methods there: ipv4? and private?
advorak has quit [Quit: Leaving]
<mikhael_k33hl> Radar: Don't see any private? method though
<mikhael_k33hl> Radar: Oh I s33 it, thanks man
<Radar> Cmd+F, "private"
<cpruitt> tefa: Not bad. This is an exercise project sO I might keep thinking till I find something that communicates intent a little better, but it's certainly as usable as player1 / player2.
<mikhael_k33hl> Radar: the method doesn't seem to be in version 2.4.0 http://ruby-doc.org/stdlib-2.4.0/libdoc/ipaddr/rdoc/IPAddr.html
<cpruitt> At any rate, for now, the kids' need to consume food trumps method naming. Maybe stepping away & doing something else will help think of something fabulous. Thanks guys for the suggestions.
<Radar> mikhael_k33hl: Pretty good reason to upgrade to 2.5.0 imo
<Radar> bbl
roonsauce has quit [Ping timeout: 240 seconds]
<tefa> hey, im new at ruby, my doubt its.. if i use for example "say_hello = "hello" as a variable.. its fine and its works.. but i had to use a variable with @ to work... why? whats the difference? example "@say_hello = "hello""
<apeiros> they have different rules where they are available
<tefa> i mean.. both work... but in the past i had to use @ for the variable to work... if not it wont work
<mikhael_k33hl> Radar: Can't seem to do it since I'm stuck with 2.4 hehe
<apeiros> it's called scoping
kies has joined #ruby
<apeiros> the one without an @ is a local variable. it ceases to exist e.g. at the end of a method.
roshanavand has quit [Ping timeout: 256 seconds]
<tefa> check out this please. https://gist.github.com/tefanga/23b78fc5b1706634e648a8869624ea39 in that example.. if i use the variable "afinacion" it wont work in the entire module... i have to use @afinacion if i want it to work.. i understand half what you said...
morenoh149 has joined #ruby
<tefa> variable without @ will ceases to exist.. at the end of a method.. but if its only inside a module... why wouldnt work ?
<tefa> i get "undefined local variable or method `afinacion' for PianoFamiliar:Module"
<apeiros> tefa: there are a couple of syntax elements (keywords) which introduce a new scope for local variables. class, module, def (there might be more, those are from the top of my head)
workmad3 has joined #ruby
<apeiros> so 4-6 has its own local variable scope, 8-11, 13-15 and 17-21. also all lines between 1 and 23 which are not part of the previously mentioned lines have their own lvar scope
milardovich has joined #ruby
<apeiros> meaning all mentions of afinacion are different variables (except for line 18 & 19, those are in the same scope as each other)
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> we call that kind of scoping ruleset "lexical scoping", because the code as it is written matters.
marmorkreb has joined #ruby
<tefa> Thank you, very much. I got it.
workmad3 has quit [Ping timeout: 255 seconds]
PaulCape_ has quit [Ping timeout: 255 seconds]
reinh1 has joined #ruby
marmorkreb has quit [Ping timeout: 256 seconds]
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
PaulCapestany has joined #ruby
alex`` has joined #ruby
snath has quit [Ping timeout: 256 seconds]
armando_ has quit [Ping timeout: 264 seconds]
clemens3 has quit [Ping timeout: 265 seconds]
roonsauce has joined #ruby
DroidBurgundy has quit [Remote host closed the connection]
DroidBurgundy has joined #ruby
VeryBewitching has joined #ruby
<zenspider> hey hey hey... I am trying to help someone with some interview type q's... where can I find a large hosts file that isn't all 127.0.0.1?
skweek has joined #ruby
morenoh149 has quit [Ping timeout: 240 seconds]
roonsauce has quit [Ping timeout: 248 seconds]
DroidBurgundy has quit [Read error: Connection reset by peer]
armando_ has joined #ruby
DroidBurgundy has joined #ruby
Mike11 has joined #ruby
<SeepingN> sure. take one of those files, read into a script, look up the real IP for each line, create new file with proper IP and names
jaruga has quit [Quit: jaruga]
DroidBurgundy has quit [Ping timeout: 256 seconds]
<zenspider> that's more work than I want to do on a cafe network
<zenspider> but... you could probably guess that I knew that was a possiblity... so...
<havenwood> zenspider: it's mostly all 0.0.0.0 but this one has a few others up front: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
jobewan has quit [Quit: jobewan]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<zenspider> heh. with a couple exceptions for default localhosts... it's all 0.0.0.0. :)
<zenspider> but that's a good idea. I didn't mine github
<zenspider> heh. I think I just found THE hosts file for 1995. :P
<zenspider> a TON of army.mil :)
DroidBurgundy has joined #ruby
<zenspider> oh. specifically DOD
<zenspider> huh. this is harder than I think it should be. meh
j416 has quit [Ping timeout: 248 seconds]
<zenspider> he's working in go... it's interesting to see how much code it'll take to parse a hosts file and group by IP quads. It's a fairly readable 1-liner in ruby
<oz> well, ruby is more expressive than go, so I wouldn't expect a miracle. :P
orbyt_ has joined #ruby
<zenspider> yeah. but 1 vs 45 lines is a bit much...
<zenspider> I'm also a bit surprised they don't have regexps as a compile-time datatype
<zenspider> he's more of a devops guy than a coder, so I'm not sure how idiomatic his go is, but it seems on par with what I've seen before
moei has quit [Quit: Leaving...]
j416 has joined #ruby
tefa2 has joined #ruby
tefa2 has left #ruby [#ruby]
despai has quit [Ping timeout: 265 seconds]
tefa has quit [Ping timeout: 265 seconds]
tefa has joined #ruby
morenoh149 has joined #ruby
<zenspider> ya'll are no fun
jerikl has joined #ruby
morenoh149 has quit [Ping timeout: 240 seconds]
Gnut has quit [Ping timeout: 260 seconds]
<guacamole> ruby > go
<guacamole> is that fun enough for you zenspider ?
orbyt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
roonsauce has joined #ruby
<weaksauce> ruby >> go
<tefa> can anybody help me here ?? https://gist.github.com/tefanga/399905367c95d6499a9d8eed117cc89a (explanation and errors inside)
Puffball has quit [Remote host closed the connection]
krawchyk has quit [Quit: krawchyk]
roonsauce has quit [Ping timeout: 240 seconds]
<havenwood> tefa: Show the errors?
<havenwood> tefa: From the snippet of the error you showed it seems one of those methods you defined with one argument is being called with two arguments.
krawchyk has joined #ruby
krawchyk has quit [Client Quit]
jeffreylevesque has joined #ruby
netherwolfe has quit [Ping timeout: 248 seconds]
rubycoder37 has joined #ruby
<rubycoder37> hi
sanscoeu_ has joined #ruby
xt233 has joined #ruby
<tefa> havenwood the error is inside the gist, yes, i understood that.. that something is repling by 2 arguments insted of 1.. cant get wich one it is
<havenwood> rubycoder37: hi
<rubycoder37> hi havenwood, how are you?
<havenwood> tefa: that's just the end of the error, so it doesn't show the method that it relates to
<rubycoder37> I have a very tough problem and I'm running into some issues, I thought about asking here
<havenwood> rubycoder37: what seems to be the trouble?
<tefa> havenwood thats the error the virtual room gives me :(
<rubycoder37> let me share some code, 1 min... thanks in advance