havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.1; 2.2.5; 2.1.9: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || logs @ http://irclog.whitequark.org/ruby/
tubuliferous_ has quit [Ping timeout: 272 seconds]
mistermocha has joined #ruby
CloCkWeRX has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
davedev24 has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
Regulati_ has quit [Remote host closed the connection]
<RickHull> >> puts { foo: true }.to_json, true.to_json
<ruby[bot]> RickHull: # => /tmp/execpad-457a96ab9263/source-457a96ab9263:2: syntax error, unexpected ':', expecting '}' ...check link for more (https://eval.in/590492)
cdg has joined #ruby
ramfjord_ has joined #ruby
<RickHull> >> puts({ foo: true }.to_json), true.to_json
<ruby[bot]> RickHull: # => /tmp/execpad-cc891f51a215/source-cc891f51a215:2: syntax error, unexpected ',', expecting keyword_end ...check link for more (https://eval.in/590493)
<RickHull> oops, nvm
<jhass> ?experiment RickHull
<ruby[bot]> RickHull: Please use your local irb or pry (see ?pry) to experiment, ruby[bot]'s eval functionality is for demonstration purposes only.
sesquipedalian has quit [Quit: WeeChat 1.5]
<RickHull> sorry, my question is: isn't true in json supposed to be a quoted string?
sesquipedalian has joined #ruby
<RickHull> oh, hm, guess not
<RickHull> all set, nvm
mistermocha has joined #ruby
ramfjord has quit [Ping timeout: 252 seconds]
karmatr0n has quit [Ping timeout: 240 seconds]
certainty has joined #ruby
the_drow__ has quit [Ping timeout: 252 seconds]
mistermocha has quit [Ping timeout: 250 seconds]
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
tildes has quit [Read error: Connection timed out]
tildes has joined #ruby
pwnd_nsfw` has joined #ruby
certainty has quit [Ping timeout: 244 seconds]
danostrowski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
the_drow has joined #ruby
cdg has quit [Remote host closed the connection]
pwnd_nsfw has quit [Ping timeout: 252 seconds]
smathy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zeroDi has quit [Quit: WeeChat 1.5]
mattwashere has joined #ruby
aberen has quit [Ping timeout: 244 seconds]
brandon_j has joined #ruby
<brandon_j> How do I create a range of time from the beginning of a the current month to TIme.now?
<brandon_j> of the current*
<jhass> brandon_j: rails/activesupport?
Snowy has joined #ruby
smathy has joined #ruby
symm- has quit [Ping timeout: 244 seconds]
ICantCook has joined #ruby
brandon_j has quit [Ping timeout: 250 seconds]
Snowy has quit [Ping timeout: 264 seconds]
jetpackjoe has quit [Ping timeout: 250 seconds]
the_drow has quit [Read error: Connection reset by peer]
nettoweb has quit [Ping timeout: 252 seconds]
LoneHermit has joined #ruby
evidex has joined #ruby
nettoweb has joined #ruby
aupadhye has joined #ruby
mattwashere has quit [Remote host closed the connection]
the_drow has joined #ruby
the_drow has quit [Max SendQ exceeded]
vipinj has joined #ruby
the_drow has joined #ruby
debajit has joined #ruby
roamingdog has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
vipinj has left #ruby ["Leaving"]
roamingdog has quit [Remote host closed the connection]
vipinj has joined #ruby
vjain_ has joined #ruby
lightt has quit [Remote host closed the connection]
vjain_ has left #ruby [#ruby]
charliesome has joined #ruby
LoneHermit has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
the_drow has quit [Read error: Connection reset by peer]
rffleiae has quit [Read error: Connection reset by peer]
vipinj has quit [Client Quit]
rffleiae has joined #ruby
debajit has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Rickmasta has quit [Ping timeout: 244 seconds]
lightt has joined #ruby
ramfjord_ has quit [Ping timeout: 258 seconds]
smathy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
the_drow has joined #ruby
jancel has joined #ruby
debajit has joined #ruby
tlaxkit has quit [Quit: ¡Adiós!]
Rickmasta has joined #ruby
nankyokusei has joined #ruby
jancel has quit [Ping timeout: 272 seconds]
arescorpio has joined #ruby
Rickmasta has quit [Ping timeout: 264 seconds]
debajit has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
duckpuppy has joined #ruby
c0mrad3 has quit [Quit: Connection closed for inactivity]
ElFerna has quit [Read error: Connection reset by peer]
ramfjord has joined #ruby
LoneHermit has joined #ruby
Rickmasta has joined #ruby
nankyokusei has quit [Ping timeout: 264 seconds]
lucky_rem has quit [Ping timeout: 250 seconds]
polll has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
LoneHermit has quit [Remote host closed the connection]
duckpuppy has quit [Ping timeout: 250 seconds]
RegulationD has joined #ruby
the_drow has joined #ruby
GodFather has quit [Ping timeout: 240 seconds]
ledestin has joined #ruby
LoneHerm_ has joined #ruby
polll has quit [Quit: leaving]
inoic has joined #ruby
polll has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
Omen has joined #ruby
Omen is now known as Guest34632
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
allcentury has quit [Ping timeout: 246 seconds]
ponga has joined #ruby
certainty has joined #ruby
Rickmasta has quit [Ping timeout: 258 seconds]
AcidCras_ has joined #ruby
polll has quit [Client Quit]
jgt3 has quit [Ping timeout: 246 seconds]
polll has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rickmasta has joined #ruby
rcvalle has quit [Quit: rcvalle]
jetpackjoe has joined #ruby
AcidCrash has quit [Ping timeout: 258 seconds]
<ponga> hey
Rickmasta has quit [Read error: Connection reset by peer]
certainty has quit [Ping timeout: 250 seconds]
aberen has joined #ruby
Rickmasta has joined #ruby
Yiota has joined #ruby
skweek has joined #ruby
jaguarmagenta has joined #ruby
mistermocha has joined #ruby
Coldblackice has quit [Ping timeout: 244 seconds]
lightt has quit [Remote host closed the connection]
jhack has joined #ruby
G has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ta_ has quit [Read error: Connection reset by peer]
yqt has quit [Ping timeout: 244 seconds]
mistermo_ has joined #ruby
nerium has quit [Quit: nerium]
RickHull has quit [Ping timeout: 250 seconds]
jaguarmagenta has quit [Ping timeout: 244 seconds]
aberen has quit [Ping timeout: 272 seconds]
Snowy has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jetpackjoe has quit [Ping timeout: 246 seconds]
mistermocha has quit [Ping timeout: 250 seconds]
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
ta_ has joined #ruby
jhack has quit [Ping timeout: 276 seconds]
lightt has joined #ruby
mattwashere has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
mistermo_ has quit [Ping timeout: 250 seconds]
<ponga> anyone familiar with concurrency in ruby
<jhass> ?anyone
<ruby[bot]> Just ask your question, if anyone has or can, they will respond.
<ponga> nice, jhass :) i was already writing question in a sane format
drahosj has joined #ruby
Snowy has quit [Ping timeout: 244 seconds]
<jhass> !fact ed anyone Just ask your question, if anyone has, is or can, they will respond.
<ruby[bot]> jhass: I stand corrected that anyone is Just ask your question, if anyone has, is or can, they will respond.
inoic has quit [Quit: Textual IRC Client: www.textualapp.com]
Yiota has joined #ruby
kgrz has joined #ruby
Rickmasta has quit [Ping timeout: 244 seconds]
c355e3b has quit [Quit: Connection closed for inactivity]
mattwashere has quit [Ping timeout: 258 seconds]
<ponga> how can i achieve in ruby, of concurrency or multithreading, that you stress-freely just squeeze the tasks into a queue , where processors are having a cup of tea and one of them come to the table and pick it up?
<ponga> not sure my analogy is making sense
the_drow has joined #ruby
Rickmasta has joined #ruby
saneax is now known as saneax_AFK
JeremyM_ has joined #ruby
tildes has quit [Ping timeout: 240 seconds]
<ponga> sounds like thread pool would work
<ponga> havenwood: my god i just found your answer
<havenwood> ponga: You might consider trying JRuby with the concurrent-ruby gem.
<ponga> does thread pool distribute tasks over multiple cores?
<havenwood> ponga: On JRuby it does. On CRuby it might.
chopin has joined #ruby
chopin is now known as Guest46366
rffleiae has quit [Read error: Connection reset by peer]
<ponga> uh I never used JRuby extensively before
<ponga> would i need to write everything into JRuby syntax
rffleiae has joined #ruby
karmatr0n has joined #ruby
<havenwood> ponga: JRuby runs regular Ruby code. Give it a try.
<ponga> thanks
Zai00 has quit [Quit: Zai00]
wrkrcoop has quit [Quit: wrkrcoop]
ensyde has joined #ruby
Guest46366 has quit [Remote host closed the connection]
ta_ has quit [Read error: Connection reset by peer]
<ponga> about this thread_pool thing, what if both A and B tasks are initially put into pool, where A needs a result return from B to execute, do I have to manually set A to 'wait' somehow
kgrz has quit [Read error: Connection reset by peer]
Xiti has quit [Quit: Xiti]
allcentury has joined #ruby
karmatr0n has quit [Ping timeout: 264 seconds]
ta_ has joined #ruby
hutch34 has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
Guest34632 has quit [Ping timeout: 264 seconds]
<havenwood> ponga: If you haven't already, take a look at Ruby's Mutex, ConditionVariable and Queue classes.
<ponga> thanks
mattwashere has joined #ruby
<ponga> you are a champion
polll has quit [Quit: leaving]
Caerus|Away has quit [Ping timeout: 260 seconds]
Coldblackice has joined #ruby
roamingdog has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
allcentury has quit [Ping timeout: 246 seconds]
mattwashere has quit [Ping timeout: 250 seconds]
Long has joined #ruby
roamingdog has quit [Ping timeout: 244 seconds]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
evidex has quit [Ping timeout: 244 seconds]
SilverKey has joined #ruby
SilverKey has quit [Client Quit]
moeabdol has quit [Ping timeout: 258 seconds]
roamingdog has joined #ruby
lacuna has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rickmasta has quit [Ping timeout: 252 seconds]
Rickmasta has joined #ruby
PaulCape_ has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
eljimmy has quit [Quit: Leaving]
ta_ has joined #ruby
PaulCapestany has quit [Ping timeout: 244 seconds]
Yiota has joined #ruby
Caerus|Away has joined #ruby
solocshaw has joined #ruby
banister has joined #ruby
dhk has quit [Quit: Leaving]
ryan_notabot has joined #ruby
tjohnson has quit [Quit: Connection closed for inactivity]
<shevy> a true champignon
Alazoral has joined #ruby
jgt3 has joined #ruby
hutch34 has quit [Ping timeout: 250 seconds]
certainty has joined #ruby
jgt3 has quit [Ping timeout: 250 seconds]
certainty has quit [Ping timeout: 240 seconds]
JeremyM_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aberen has joined #ruby
rffleiae has quit [Read error: Connection reset by peer]
aberen has quit [Ping timeout: 244 seconds]
ur5us has joined #ruby
vipinj has joined #ruby
vipinj has quit [Max SendQ exceeded]
vipinj has joined #ruby
rffleiae has joined #ruby
Coldblackice has quit [Ping timeout: 264 seconds]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mattwashere has joined #ruby
mattwashere has quit [Read error: Connection reset by peer]
mattwashere has joined #ruby
mattwashere has quit [Client Quit]
wald0 has quit [Ping timeout: 258 seconds]
cbyrda has joined #ruby
Yiota has joined #ruby
Alazoral has quit [Quit: Textual IRC Client: www.textualapp.com]
Dimik has quit [Ping timeout: 276 seconds]
Niham has joined #ruby
Niham has quit [Client Quit]
jrafanie_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karmatr0n has joined #ruby
yokel has quit [Ping timeout: 264 seconds]
ICantCook has quit [Quit: bye]
cbyrda has quit [Quit: Gone]
pilne has quit [Quit: Quitting!]
phutchins2 has quit [Ping timeout: 240 seconds]
karmatr0n has quit [Ping timeout: 250 seconds]
mistermocha has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
brianpWins_ has joined #ruby
ramfjord has joined #ruby
cbyrda has joined #ruby
nankyokusei has joined #ruby
brianpWins has quit [Ping timeout: 244 seconds]
brianpWins_ is now known as brianpWins
Xiti has joined #ruby
rueben has joined #ruby
nankyokusei has quit [Ping timeout: 244 seconds]
duckpuppy has joined #ruby
RegulationD has joined #ruby
duckpuppy has quit [Ping timeout: 272 seconds]
braincrash has quit [Quit: bye bye]
rffleiae has quit [Read error: Connection reset by peer]
rffleiae has joined #ruby
RegulationD has quit [Ping timeout: 250 seconds]
jgt3 has joined #ruby
certainty has joined #ruby
jhack has joined #ruby
duckpuppy has joined #ruby
rffleiae has quit [Read error: Connection reset by peer]
jgt3 has quit [Ping timeout: 260 seconds]
rffleiae has joined #ruby
certainty has quit [Ping timeout: 264 seconds]
jaguarmagenta has joined #ruby
jhack has quit [Client Quit]
rhg331 is now known as rhg135
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
aberen has joined #ruby
roundabout22 has quit [Ping timeout: 250 seconds]
ta_ has quit [Read error: Connection reset by peer]
k3rn31 has joined #ruby
braincras has joined #ruby
ryan_notabot has quit [Quit: Leaving]
jaguarmagenta has quit [Ping timeout: 244 seconds]
lightt has quit [Remote host closed the connection]
aberen has quit [Ping timeout: 258 seconds]
czerasz has quit [Ping timeout: 252 seconds]
ta_ has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hahuang62 has joined #ruby
amclain has quit [Quit: Leaving]
binaryplease1 has joined #ruby
gix has quit [Ping timeout: 244 seconds]
duckpuppy has quit [Ping timeout: 258 seconds]
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
binaryplease has quit [Ping timeout: 276 seconds]
gix has joined #ruby
karmatr0n has joined #ruby
binaryplease1 is now known as binaryplease
kareeoleez has joined #ruby
Yiota has joined #ruby
karmatr0n has quit [Ping timeout: 252 seconds]
kareeoleez has quit [Remote host closed the connection]
astrobunny has joined #ruby
postmodern has quit [Quit: Leaving]
kareeoleez has joined #ruby
robmclark has joined #ruby
vipinj has quit [Quit: This computer has gone to sleep]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rikai has quit [Ping timeout: 250 seconds]
tubbo has quit [Ping timeout: 272 seconds]
Yiota has joined #ruby
Amoeba has quit [Quit: Ex-Chat]
lightt has joined #ruby
LoneHerm_ has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
rffleiae has quit [Ping timeout: 272 seconds]
rffleiae has joined #ruby
rikai has joined #ruby
arlek has joined #ruby
rueben has quit [Ping timeout: 250 seconds]
<robmclark> Hello. How do I get my terminal on my mac to run my .rb files? chmod x was mentioned on a google search, but as a newbie using Ruby to learn programming in general I have no clue what to do with that info. thanks.
tubbo has joined #ruby
LoneHerm_ has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
LoneHermit has joined #ruby
pharaoh2 has joined #ruby
LoneHermit has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
<shevy> robmclark execute it. "ruby foo.rb"
LoneHerm_ has quit [Remote host closed the connection]
<robmclark> hello shevy
<robmclark> do you mean simply open the terminal and click and drag it and hit enter?
LoneHerm_ has joined #ruby
<robmclark> oh, one second.
<robmclark> I get you
LoneHerm_ has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
<robmclark> load error, No such file or directory.
Rodya_ has quit [Quit: Leaving...]
LoneHerm_ has quit [Remote host closed the connection]
LoneHermit has joined #ruby
LoneHermit has quit [Remote host closed the connection]
<robmclark> this problem is not there on the PC
LoneHerm_ has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<robmclark> also get permission denied
tvw has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
Yiota has joined #ruby
LoneHerm_ has joined #ruby
astrobunny has quit [Remote host closed the connection]
LoneHerm_ has quit [Remote host closed the connection]
RegulationD has joined #ruby
<robmclark> sorry to bother Shevy. What exactly do I type in the terminal?
Madplatypus has quit [Quit: Connection closed for inactivity]
pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
solocshaw has quit [Ping timeout: 244 seconds]
LoneHermit has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
LoneHermit has quit [Remote host closed the connection]
jgt3 has joined #ruby
ruskie has quit [Excess Flood]
LoneHerm_ has joined #ruby
d0nn1e has quit [Ping timeout: 250 seconds]
LoneHerm_ has quit [Remote host closed the connection]
vipinj has joined #ruby
tmtwd has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
d0nn1e has joined #ruby
<robmclark> Shevy, I'll jump on another time (crashing) Thanks for trying to help.
pharaoh2 has joined #ruby
robmclark has quit []
jgt3 has quit [Ping timeout: 250 seconds]
ta_ has quit [Read error: Connection reset by peer]
digneety has joined #ruby
aberen has joined #ruby
ta_ has joined #ruby
Long has quit [Quit: Leaving.]
vuoto has joined #ruby
G has joined #ruby
Vile` has quit [Ping timeout: 258 seconds]
aberen has quit [Ping timeout: 258 seconds]
jas02 has joined #ruby
AcidCrash has joined #ruby
KnownSy0 has joined #ruby
jancel has joined #ruby
xue has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
arlek has quit [Ping timeout: 240 seconds]
AcidCras_ has quit [Ping timeout: 244 seconds]
KnownSyntax has quit [Ping timeout: 250 seconds]
jaguarmagenta has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
jancel has quit [Ping timeout: 258 seconds]
yesthatallen has joined #ruby
ruskie has joined #ruby
hahuang62 has quit [Ping timeout: 258 seconds]
<yesthatallen> thanks @havenwood for the advice on speeding up ruby install
<yesthatallen> I'm trying it now
<yesthatallen> also, I couldn't find the straight up download link for brightbox's ruby installer, and one of the requirements is that we need to be able to install offline
xue has joined #ruby
evansbee has quit [Ping timeout: 240 seconds]
Rutix`away is now known as Rutix
<yesthatallen> so, I'm not sure how to leverage their repository
A124 has joined #ruby
pawnbox has joined #ruby
biggernashing has joined #ruby
<biggernashing> i would like to get better at technical interview questions and word problems could you please help me out by pointing me out to the right direction?
arooni has joined #ruby
SilverKey has joined #ruby
Long has joined #ruby
cbyrda has quit [Quit: Gone]
mistermocha has joined #ruby
mistermo_ has joined #ruby
digneety has quit [Quit: digneety]
misterm__ has joined #ruby
pawnbox has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 246 seconds]
nankyokusei has joined #ruby
<Radar> biggernashing: http://exercism.io/
<biggernashing> thanks Radar
<biggernashing> today i had my very first technical interview
<biggernashing> i failed miserably
duncannz has joined #ruby
misterm__ has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
mistermo_ has quit [Ping timeout: 250 seconds]
mistermocha has quit [Read error: Connection reset by peer]
bluOxigen has quit [Ping timeout: 244 seconds]
<Radar> biggernashing: It's pretty normal to bomb the first technical interview
bluOxigen has joined #ruby
mistermocha has joined #ruby
<Radar> Keep persisting :) You'll get there.
nankyokusei has quit [Ping timeout: 246 seconds]
<biggernashing> well the thing is i am really bad at arithmetical thinking or whatever it's called Radar
<biggernashing> i can't figure out the formula
<biggernashing> i'd love to learn how to do it and get the mindset =(
mistermo_ has joined #ruby
<biggernashing> i can figure out simple stuff, but not stuff i haven't seen before or more complex things
vdamewood has joined #ruby
misterm__ has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
spectra has quit [Ping timeout: 244 seconds]
<Radar> biggernashing: How long have you been doing Ruby for?
<Radar> biggernashing: How long have you been doing Ruby for?
<Radar> Whoops
<biggernashing> a few months
mistermocha has joined #ruby
mistermo_ has quit [Ping timeout: 272 seconds]
<Radar> You should go through the exercises on Exercism. There's also the Ruby Koans which are great for practicing some Ruby basics: http://rubykoans.com/
<Radar> The only way you're going to get better at it is by practicing it.
mistermo_ has joined #ruby
misterm__ has quit [Ping timeout: 240 seconds]
karmatr0n has joined #ruby
mistermo_ has quit [Read error: Connection reset by peer]
astrobunny has joined #ruby
mistermo_ has joined #ruby
<biggernashing> Radar: i'm bad at logic
mistermocha has quit [Ping timeout: 240 seconds]
mistermo_ has quit [K-Lined]
LoneHermit has joined #ruby
<biggernashing> i'm very good at intuition and figuring out whether or not something will turn out the way it's supposed to
<biggernashing> but figuring out how to draw characters on a screen is hard for me
SilverKey has quit [Quit: Halted.]
sauvin has joined #ruby
<biggernashing> like i would never be able to create a script that draws a smiley face with my current knowledge and mindset
_kfpratt has quit []
astrobunny has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
kfpratt has joined #ruby
pawnbox has joined #ruby
Niham has joined #ruby
Niham has quit [Client Quit]
arescorpio has quit [Quit: Leaving.]
<Radar> I don't even think I can do that.
<Radar> Not without a lot of futzing anyway
aberen has joined #ruby
kareeoleez has quit [Remote host closed the connection]
elifoster has joined #ruby
yfeldblum has quit [Remote host closed the connection]
kareeoleez has joined #ruby
spectra has joined #ruby
lightt has quit [Remote host closed the connection]
aberen has quit [Ping timeout: 272 seconds]
kareeoleez has quit [Remote host closed the connection]
arooni has quit [Ping timeout: 250 seconds]
houhoulis has joined #ruby
hahuang62 has joined #ruby
madgen has joined #ruby
rffleiae has quit [Quit: -a- IRC for Android 2.1.32]
hahuang62 has quit [Ping timeout: 250 seconds]
astrobunny has joined #ruby
karmatr0n has quit [Ping timeout: 272 seconds]
Madplatypus has joined #ruby
KnownSy0 is now known as KnownSyntax
KnownSyntax has quit [Changing host]
KnownSyntax has joined #ruby
saneax_AFK is now known as saneax
tvw has quit [Ping timeout: 264 seconds]
<biggernashing> Radar: if i can't solve an exercise on exercism what should i do?
<Radar> biggernashing: You can ask for help here.
<biggernashing> if i want to become self-reliant?
<biggernashing> i like having fishermen catch fish for me that i buy at the store and use at home for food
TomyLobo has joined #ruby
<biggernashing> but eventually i'd like to go fishing
<apeiros> !badnick biggernashing
biggernashing was kicked from #ruby by ruby[bot] [nickname is not suitable for this channel, see http://ruby-community.com/pages/user_rules]
jenrzzz has quit [Ping timeout: 244 seconds]
pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pharaoh2 has joined #ruby
shinnya has joined #ruby
vipinj has quit [Quit: This computer has gone to sleep]
last_staff has joined #ruby
Coldblackice has joined #ruby
yeticry has quit [Quit: leaving]
saneax is now known as saneax_AFK
matp has quit [Remote host closed the connection]
tildes has joined #ruby
ensyde has quit [Quit: Leaving]
astrobunny has quit [Remote host closed the connection]
aberen has joined #ruby
madgen has quit [Ping timeout: 246 seconds]
astrobunny has joined #ruby
kareeoleez has joined #ruby
nashville45 has joined #ruby
saneax_AFK is now known as saneax
kareeoleez has quit [Remote host closed the connection]
elifoster has quit [Quit: sleep]
kareeoleez has joined #ruby
RegulationD has joined #ruby
<Radar> nashville45: welcome back
jgt3 has joined #ruby
<Radar> nashville45: If you want to become self-reliant you need to practice.
<nashville45> thanks :)
andikr has joined #ruby
<nashville45> well i would like to learn what to practice
<nashville45> because i have been learning on my own and i feel like i have been learning the wrong things
<Radar> Exercism exercises and the ruby koans should be enough for now.
<Radar> Ask here if you get stuck. There's always someone around to help out.
<nashville45> what kind of problems are exercism problems?
<nashville45> like what are they called?
RegulationD has quit [Ping timeout: 240 seconds]
sheperson has joined #ruby
fenre has joined #ruby
eGGshke has joined #ruby
d0lph1n98 has joined #ruby
axxyhtrx has joined #ruby
tildes has quit [Ping timeout: 260 seconds]
jancel has joined #ruby
Silthias has quit [Ping timeout: 244 seconds]
astrobunny has quit [Remote host closed the connection]
jancel has quit [Ping timeout: 244 seconds]
tmtwd has quit [Ping timeout: 276 seconds]
karmatr0n has joined #ruby
mistermocha has joined #ruby
Silthias has joined #ruby
ta_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
Wsewolod has joined #ruby
roamingdog has quit [Read error: Connection reset by peer]
mistermocha has quit [Ping timeout: 250 seconds]
LoneHermit has quit [Remote host closed the connection]
jaguarmagenta has quit [Remote host closed the connection]
certainty has joined #ruby
jaguarmagenta has joined #ruby
mistermocha has joined #ruby
moeabdol has joined #ruby
CloCkWeRX has quit [Ping timeout: 244 seconds]
skade has joined #ruby
craigp has quit [Ping timeout: 276 seconds]
TomyLobo has quit [Ping timeout: 250 seconds]
blaxter has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
dionysus69 has joined #ruby
moeabdol has quit [Ping timeout: 264 seconds]
firstdayonthejob has quit [Ping timeout: 250 seconds]
axxyhtrx has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aganov has joined #ruby
digneety has joined #ruby
davedev24 has quit []
saneax is now known as saneax_AFK
xcesariox has joined #ruby
ferr has joined #ruby
xcesariox has quit [Client Quit]
xcesariox has joined #ruby
stan has quit [Ping timeout: 240 seconds]
aufi has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
saneax_AFK is now known as saneax
lsmola has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
nankyokusei has joined #ruby
nankyokusei has quit [Ping timeout: 252 seconds]
jordanm has quit [Ping timeout: 250 seconds]
biberu has joined #ruby
Guest_ has joined #ruby
lightt has joined #ruby
danostrowski has joined #ruby
houhoulis has quit [Remote host closed the connection]
jaruga___ has joined #ruby
jaruga___ is now known as jaruga____
jaruga____ has quit [Remote host closed the connection]
aberen has quit [Ping timeout: 240 seconds]
Ishido has joined #ruby
TomyWork has joined #ruby
danostrowski has quit [Ping timeout: 250 seconds]
dionysus69 has joined #ruby
aberen has joined #ruby
al2o3-cr has joined #ruby
lightt has quit [Quit: exit()]
terlar has joined #ruby
norc has joined #ruby
aberen has quit [Ping timeout: 240 seconds]
k3rn31 has quit [Quit: Computer has gone to sleep.]
craigp has joined #ruby
Beverage has joined #ruby
norc has quit [Ping timeout: 250 seconds]
norc has joined #ruby
jordanm has joined #ruby
axxyhtrx has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
Wsewolod has quit [Ping timeout: 250 seconds]
jgt3 has quit [Ping timeout: 246 seconds]
skade has quit [Quit: Computer has gone to sleep.]
DoubleMalt has joined #ruby
Hounddog has joined #ruby
aberen has joined #ruby
Dimik has joined #ruby
hutch34 has joined #ruby
jaguarmagenta has joined #ruby
iCHAIT has joined #ruby
<iCHAIT> How do I reinitialize a Hash in ruby? For instance take a look at this code - http://dpaste.com/3G6Z429
jgt3 has joined #ruby
bnjf_ is now known as bnjf
bnjf has quit [Quit: Reconnecting]
bnjf has joined #ruby
<iCHAIT> IN this line 12 prints - {"password"=>"password"} but I think it should have printed - {'username': 'example-user', 'password': 'password'}
karmatr0n has quit [Ping timeout: 252 seconds]
certainty has quit [Ping timeout: 260 seconds]
<iCHAIT> So it looks like user_to_test is not getting reinitialized correctly.
pamatya has joined #ruby
<baweaver> deelte mutates
<iCHAIT> Can someoone help?
<baweaver> delete*
<baweaver> also, Ruby tends to not use for loops
minimalism has quit [Quit: minimalism]
<baweaver> >> {user: 'foobar', password: 'baz'}.reject { |key, value| key == :password }
<ruby[bot]> baweaver: # => {:user=>"foobar"} (https://eval.in/590602)
exilarch has joined #ruby
d0lph1n98 has quit [Ping timeout: 250 seconds]
<pamatya> is there a ruby hook for class methods being called ?
codecop has joined #ruby
<baweaver> >> h = {user: 'foobar', password: 'baz'}; h.reject { |key, value| key == :password }; h
<ruby[bot]> baweaver: # => {:user=>"foobar", :password=>"baz"} (https://eval.in/590603)
<baweaver> notice how reject does not mutate the hash.
hutch34 has quit [Ping timeout: 276 seconds]
<baweaver> pamatya: how so?
<baweaver> like you call Class.method and something else gets called?
Mia has quit [Read error: Connection reset by peer]
<iCHAIT> baweaver: Oh thanks for that info, BTW does that mean that we should avoid use of delete?
<baweaver> unless you want to delete the key from the hash
<baweaver> I would recommend reading through Eloquent Ruby and getting more familiar with the language
Mia has joined #ruby
<baweaver> pamatya: if so then no, there's not unless you make one. Even then, the question becomes why would you?
multi_io has quit [Ping timeout: 244 seconds]
nashville45 has quit [Ping timeout: 250 seconds]
multi_io has joined #ruby
vdamewood has quit [Quit: Life beckons.]
aryaching has joined #ruby
fujinuma has joined #ruby
<fujinuma> is this correct? class Node < Struct.new(:value, :left, :right); end
edwinvdgraaf has joined #ruby
jgt3 has quit [Ping timeout: 250 seconds]
<apeiros> just do Node = Struct.new(…) do … end
<apeiros> no need for an additional layer of inheritance
ta_ has joined #ruby
Silthias1 has joined #ruby
Dimik has quit [Ping timeout: 250 seconds]
<fujinuma> apeiros: thanks
Silthias has quit [Ping timeout: 246 seconds]
yfeldblum has quit [Remote host closed the connection]
SenpaiSilver has joined #ruby
LoneHerm_ has joined #ruby
evidex has joined #ruby
neanderslob has quit [Ping timeout: 240 seconds]
neanderslob_ has quit [Ping timeout: 260 seconds]
workmad3 has joined #ruby
certainty has joined #ruby
neanderslob has joined #ruby
neanderslob has quit [Disconnected by services]
neanderslob_ has joined #ruby
neanderslob has joined #ruby
nerium has joined #ruby
skade has joined #ruby
LoneHerm_ has quit [Ping timeout: 252 seconds]
dasher^0_o has joined #ruby
<norc> apeiros: Though I think the extra inheritance allows for the common "class A; end" style.
<apeiros> yes, but what for?
pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<norc> Style?
<apeiros> so "let's make it worse so it looks better"?
<pamatya> sorry @baweaver, was away for a while
<norc> I wouldn't go as far as calling it "worse" ;p
<apeiros> it is
<apeiros> lookup chain is increased for no technical reason
RegulationD has joined #ruby
<norc> apeiros: And that is bad because?
<pamatya> actual task is i need to be able to print out name of class method being called within given class
dionysus69 has quit [Ping timeout: 240 seconds]
<apeiros> norc: because your lookup chain is longer?
<norc> apeiros: And that has a notable impact how?
<pamatya> Foo.my_method => should print 'my_method'
ramfjord has joined #ruby
<norc> pamatya: __method__
dasher00 has quit [Ping timeout: 264 seconds]
<apeiros> norc: the impact is more notable than "oh shiny"?
<pamatya> its a interview question
<norc> pamatya: Is this for a Ruby job?
<pamatya> yah
<norc> pamatya: How about you learn Ruby properly, instead of asking us to give you answers for basic Ruby problems.
<pamatya> gone through metaprogramming blogs
ocbtec has joined #ruby
<pamatya> i have been learning it, been able to work around most of the problem so far
<norc> pamatya: The goal of interview questions is to ascertain your skills with Ruby. Giving you the answers will not make you a better candidate.
<pamatya> i cldn't figure this one out, don't mind me asking if u think its a easy one.
<norc> pamatya: Considering I gave you a hint already that was completely ignored, I shall go do productive things instead.
<norc> Good luck.
RegulationD has quit [Ping timeout: 260 seconds]
<pamatya> i am walking through that lead, thanks for that @norc
lightt has joined #ruby
anisha has joined #ruby
dextertzu has quit [Read error: No route to host]
<norc> pamatya: By the way, let this be a good tip for you. If you had googled for "current method name ruby" the first 10 hits would have given you the answer. If you cannot utilise google to find out about unknown features in Ruby, I would think about a different job.
stan has joined #ruby
<norc> (I really don't mind beginners asking questions here, but if the goal is to get past an interview it pisses me off - because it's these people whose code I might have to clean up later)
Azure has quit [Read error: Connection reset by peer]
AcidCras_ has joined #ruby
mozzarel1 has joined #ruby
nickjj_ has joined #ruby
Azure has joined #ruby
adeponte has quit [Ping timeout: 244 seconds]
callumacrae has quit [Ping timeout: 244 seconds]
ryotarai has quit [Ping timeout: 244 seconds]
Trynemjoel has quit [Ping timeout: 244 seconds]
Morrolan has quit [Ping timeout: 244 seconds]
cyphactor has joined #ruby
Antiarc has quit [Quit: No Ping reply in 180 seconds.]
crowell has quit [Quit: No Ping reply in 180 seconds.]
AcidCrash has quit [Ping timeout: 244 seconds]
mozzarella has quit [Ping timeout: 244 seconds]
LiquidInsect has quit [Ping timeout: 244 seconds]
D9 has quit [Ping timeout: 244 seconds]
LiquidInsect has joined #ruby
PaulePanter has quit [Ping timeout: 244 seconds]
nickjj has quit [Ping timeout: 244 seconds]
kbni has quit [Ping timeout: 244 seconds]
PaulePanter has joined #ruby
ryotarai has joined #ruby
crowell has joined #ruby
Morrolan has joined #ruby
Antiarc has joined #ruby
moeabdol has joined #ruby
D9 has joined #ruby
ruisanto1 has quit [Remote host closed the connection]
ruisantos has joined #ruby
hiddenloop has quit [Ping timeout: 244 seconds]
joonty has joined #ruby
kbni has joined #ruby
Trynemjoel has joined #ruby
hiddenloop has joined #ruby
craigp has quit [Ping timeout: 260 seconds]
moeabdol has quit [Ping timeout: 252 seconds]
callumacrae has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
xall has joined #ruby
[74]HELLth has joined #ruby
karmatr0n has joined #ruby
fenre_ has joined #ruby
eGGshke_ has joined #ruby
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
certainty has quit [Ping timeout: 260 seconds]
last_staff1 has joined #ruby
icey has quit [Quit: No Ping reply in 180 seconds.]
neanderslob_ has quit [Remote host closed the connection]
hfp_work has quit [Ping timeout: 272 seconds]
the_drow has joined #ruby
sirecote has quit [Ping timeout: 276 seconds]
sjums_ has joined #ruby
fumk has quit [Ping timeout: 246 seconds]
prooftechnique_ has joined #ruby
knight_ has quit [Quit: No Ping reply in 180 seconds.]
GinoManWorks has quit [Quit: No Ping reply in 180 seconds.]
gsingh93 has quit [Ping timeout: 250 seconds]
edwardly has quit [Ping timeout: 264 seconds]
raddazong has joined #ruby
axxyhtrx has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
GreyKite has quit [Ping timeout: 244 seconds]
sindork has quit [Ping timeout: 264 seconds]
nadir has quit [Quit: Connection closed for inactivity]
Synthead has quit [Ping timeout: 276 seconds]
Lightsword has quit [Ping timeout: 276 seconds]
knight_ has joined #ruby
lianj has quit [Ping timeout: 244 seconds]
PaulePan1er has joined #ruby
GreyKite has joined #ruby
sirecote has joined #ruby
My_Hearing has joined #ruby
Coldblackice has quit [Ping timeout: 272 seconds]
hfp_work has joined #ruby
GinoManWorks has joined #ruby
johnDoe111 has quit [Ping timeout: 276 seconds]
exilarch0 has joined #ruby
exilarch0 has quit [Client Quit]
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
hightower2 has joined #ruby
ricer2 has quit [Ping timeout: 240 seconds]
gomix has quit [Ping timeout: 246 seconds]
Amnez777- has joined #ruby
gsingh93 has joined #ruby
fumk has joined #ruby
karmatr0n has quit [Ping timeout: 244 seconds]
funnel_ has joined #ruby
gf3 has quit [Ping timeout: 244 seconds]
izaac has joined #ruby
izaac_ has quit [Ping timeout: 276 seconds]
lianj has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
last_staff has quit [Ping timeout: 244 seconds]
lianj has quit [Changing host]
lianj has joined #ruby
last_staff1 is now known as last_staff
voodoofish430 has quit [Ping timeout: 246 seconds]
mgorbach has quit [Ping timeout: 260 seconds]
araujo has joined #ruby
statelesscode has quit [Ping timeout: 276 seconds]
spectra has quit [Ping timeout: 260 seconds]
jtoy has quit [Ping timeout: 244 seconds]
Evan_ has quit [Ping timeout: 246 seconds]
atmosx_alt has joined #ruby
mgorbach has joined #ruby
johnDoe111 has joined #ruby
araujo has quit [Max SendQ exceeded]
pragmati- has quit [Ping timeout: 276 seconds]
Lightsword has joined #ruby
blingrang has quit [Ping timeout: 246 seconds]
_Suntzu has joined #ruby
Kuukunen has joined #ruby
Synthead has joined #ruby
jtoy has joined #ruby
strongcode has quit [Remote host closed the connection]
mosheee has quit [Ping timeout: 276 seconds]
unvexp has joined #ruby
strongcode has joined #ruby
sindork has joined #ruby
adam^ is now known as adam
erlend has joined #ruby
veloutin has quit [Ping timeout: 276 seconds]
exchgr has quit [Ping timeout: 264 seconds]
D9 has quit [Ping timeout: 260 seconds]
adam is now known as Guest11947
tsunamie has quit [Quit: ZNC - http://znc.in]
joeyjones has quit [Remote host closed the connection]
drbrain has quit [Ping timeout: 272 seconds]
quarcu_ has joined #ruby
ironcame1 has quit [Ping timeout: 264 seconds]
mayamai has quit [Ping timeout: 276 seconds]
ironcamel has joined #ruby
tekku has joined #ruby
NightMonkey has quit [Ping timeout: 264 seconds]
thoraxe has quit [Ping timeout: 264 seconds]
schmoot- has joined #ruby
chrisarc1nd has quit [Ping timeout: 276 seconds]
certainty has joined #ruby
svkurowski has quit [Ping timeout: 240 seconds]
dasher^0_o has quit [Ping timeout: 240 seconds]
eGGshke has quit [Ping timeout: 240 seconds]
quarcu has quit [Ping timeout: 240 seconds]
funnel has quit [Ping timeout: 240 seconds]
Mon_Ouie has quit [Ping timeout: 240 seconds]
exilarch has quit [Ping timeout: 240 seconds]
mic_e has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
voodoofish4302 has joined #ruby
vircung has quit [Ping timeout: 240 seconds]
timonv has quit [Ping timeout: 240 seconds]
joeyjones_ has joined #ruby
Fridtjof has quit [Ping timeout: 240 seconds]
ghr has joined #ruby
tmi has quit [Ping timeout: 240 seconds]
svkurowski has joined #ruby
funnel_ is now known as funnel
araujo has joined #ruby
thoraxe has joined #ruby
dling` has quit [Remote host closed the connection]
tmi1 has joined #ruby
sandelius has joined #ruby
exchgr has joined #ruby
veloutin has joined #ruby
Amnez777 has quit [Ping timeout: 252 seconds]
prooftechnique has quit [Ping timeout: 252 seconds]
sjums has quit [Ping timeout: 252 seconds]
PaulePanter has quit [Ping timeout: 252 seconds]
fenre has quit [Ping timeout: 252 seconds]
madhatter has quit [Ping timeout: 252 seconds]
lightt has quit [Ping timeout: 252 seconds]
tekk has quit [Ping timeout: 252 seconds]
iNs_ has joined #ruby
hightower has quit [Ping timeout: 252 seconds]
mic_e_ has quit [Ping timeout: 252 seconds]
zeroDivisible has quit [Ping timeout: 252 seconds]
Suntzu has quit [Ping timeout: 252 seconds]
atmosx has quit [Ping timeout: 252 seconds]
iNs has quit [Ping timeout: 252 seconds]
Kuukunen- has quit [Ping timeout: 252 seconds]
unsymbol has quit [Excess Flood]
erlendf has quit [Ping timeout: 252 seconds]
bier has quit [Ping timeout: 252 seconds]
schmoot has quit [Ping timeout: 252 seconds]
Karunamon|2 has quit [Ping timeout: 252 seconds]
iamayam has joined #ruby
Fridtjof has joined #ruby
joeyjones_ has quit [Changing host]
joeyjones_ has joined #ruby
tommylommykins has quit [Ping timeout: 252 seconds]
vircung has joined #ruby
angelixd has quit [Ping timeout: 276 seconds]
sheperson has quit [Quit: sheperson]
awk has quit [Remote host closed the connection]
dling has joined #ruby
zeroDivisible has joined #ruby
aryaching has quit [Remote host closed the connection]
tommylommykins has joined #ruby
awk has joined #ruby
joeyjones_ is now known as joeyjones
abort has quit [Remote host closed the connection]
PaulePan1er is now known as PaulePanter
abort has joined #ruby
chrisarcand has joined #ruby
tsunamie has joined #ruby
drbrain has joined #ruby
unsymbol has joined #ruby
bier_ has joined #ruby
pragmatism has joined #ruby
D9 has joined #ruby
Karunamon has joined #ruby
angelixd has joined #ruby
blingrang has joined #ruby
gf3 has joined #ruby
awk is now known as Guest15111
Evan- has joined #ruby
the_drow has joined #ruby
apeiros has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
gomix has joined #ruby
ytti has quit [Ping timeout: 240 seconds]
Hates_ has quit [Ping timeout: 258 seconds]
incomprehensibly has quit [Ping timeout: 258 seconds]
timonv has joined #ruby
NightMonkey has joined #ruby
deeprave has quit [Ping timeout: 258 seconds]
ytti has joined #ruby
kapowaz has quit [Ping timeout: 258 seconds]
yfeldblum has joined #ruby
kapowaz has joined #ruby
Hates_ has joined #ruby
gmci has quit [Ping timeout: 258 seconds]
jcp has quit [Ping timeout: 258 seconds]
deeprave has joined #ruby
incomprehensibly has joined #ruby
Fridtjof has quit [Read error: Connection timed out]
jcp has joined #ruby
Fridtjof has joined #ruby
spectra has joined #ruby
marr has joined #ruby
gmci has joined #ruby
blackmesa has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
tvw has joined #ruby
weckl has joined #ruby
axxyhtrx has joined #ruby
pamatya has quit [Quit: pamatya]
nankyokusei has joined #ruby
the_drow has joined #ruby
LoneHerm_ has joined #ruby
nankyokusei has quit [Ping timeout: 252 seconds]
nerium has quit [Quit: nerium]
mdw has joined #ruby
pamatya has joined #ruby
LoneHerm_ has quit [Ping timeout: 244 seconds]
craigp has joined #ruby
ramfjord has joined #ruby
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
marens_ is now known as marens
the_drow has quit [Read error: Connection reset by peer]
the_drow has joined #ruby
axxyhtrx has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nerium has joined #ruby
czerasz has joined #ruby
Mia has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 244 seconds]
ramfjord has quit [Ping timeout: 246 seconds]
axxyhtrx has joined #ruby
ramfjord has joined #ruby
ineb_ has joined #ruby
<ineb_> iam havin troubles in hashing hex strings. Doing Digest::SHA256.hexdigest "1" is hashing the String "1" but what i really want is hashing the number, like Digest::SHA256.hexdigest "\x01". How can i hash a long hex-string like 'deadbeef' that way?
AlexRussia has quit [Ping timeout: 246 seconds]
edwinvdgraaf has quit [Remote host closed the connection]
<apeiros> you convert the number into its binary (string) form first
the_drow has quit [Read error: Connection reset by peer]
<apeiros> which depends some contextual questions, like how many bits? which endian?
<apeiros> you can use e.g. Array#pack for the conversion
<apeiros> >> [0xdeadbeef].pack("N*")
<ruby[bot]> apeiros: # => "\xDE\xAD\xBE\xEF" (https://eval.in/590698)
<ineb_> good idea. i will tinker with that.
noodle has quit [Ping timeout: 240 seconds]
<ineb_> the hash values are coming from a chipcard and iam trying to check, if they are valid.
<ineb_> took me a while to realize that "1" is not 1 :/
the_drow has joined #ruby
blaxter has quit [Quit: foo]
<apeiros> even "1" can be different from "1"
<ineb_> depending on the encoding
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
ramfjord has quit [Ping timeout: 272 seconds]
edwinvdgraaf has joined #ruby
<apeiros> correct
kristofferR has joined #ruby
<ineb_> yeah, tricky stuff.
astrobunny has joined #ruby
axxyhtrx has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kristofferR has quit [Client Quit]
jgt3 has joined #ruby
xcesariox has quit [Quit: Textual IRC Client: www.textualapp.com]
opentux has joined #ruby
noodle has joined #ruby
karmatr0n has joined #ruby
saneax is now known as saneax_AFK
the_drow has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
iCHAIT has left #ruby [#ruby]
the_drow has joined #ruby
<ineb_> >> ["dc79c4664aa45aa5eb4ccd3b63aaf5c06e1605609b4ba1cda16702831a13a441"].pack("N*")
c355e3b has joined #ruby
<ineb_> this is doing the trick for me
ngw has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
<ineb_> oh, how can i trigger the bot?
karmatr0n has quit [Ping timeout: 240 seconds]
certainty has quit [Ping timeout: 244 seconds]
the_drow has joined #ruby
unvexp has quit [Remote host closed the connection]
aupadhye has quit [Ping timeout: 260 seconds]
codecop has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Snowy has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
the_drow has joined #ruby
certainty has joined #ruby
jancel has joined #ruby
moeabdol has joined #ruby
mdw has quit [Ping timeout: 240 seconds]
aryaching has quit [Ping timeout: 244 seconds]
jancel has quit [Ping timeout: 250 seconds]
the_drow has quit [Read error: Connection reset by peer]
xall has quit [Ping timeout: 260 seconds]
moeabdol has quit [Client Quit]
xall has joined #ruby
the_drow has joined #ruby
charliesome has joined #ruby
the_drow has quit [Max SendQ exceeded]
the_drow has joined #ruby
Vingador has joined #ruby
axxyhtrx has joined #ruby
aryaching has joined #ruby
aryaching has quit [Client Quit]
<jhass> ineb_: you need to be identified with nickserv
chip_ has joined #ruby
mercerist has joined #ruby
sneakerhax has quit [Excess Flood]
RegulationD has joined #ruby
kedare has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
the_drow has quit [Read error: Connection reset by peer]
Vingador has quit [Remote host closed the connection]
blackmesa has joined #ruby
koooge has quit [Quit: Leaving...]
RegulationD has quit [Ping timeout: 244 seconds]
Gasher has joined #ruby
koooge has joined #ruby
jgt3 has quit [Quit: WeeChat 1.4]
jgt has joined #ruby
the_drow has joined #ruby
astrobunny has quit [Remote host closed the connection]
suchness has joined #ruby
<suchness> So I have a class with an instance method that returns __FILE__, when I create another class that subclasses the first class and call that method, it gives me back the path from the top level class. Is there a way to get around this?
Long has quit [Quit: Leaving.]
pawnbox has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 250 seconds]
terlar has quit [Ping timeout: 276 seconds]
kotk has quit [Quit: Leaving...]
saneax_AFK is now known as saneax
vdamewood has joined #ruby
jgt has quit [Ping timeout: 276 seconds]
hk238 has joined #ruby
armyriad has quit [Ping timeout: 244 seconds]
the_drow has quit [Ping timeout: 252 seconds]
nickjj_ has quit [Read error: Connection reset by peer]
armyriad has joined #ruby
TvL2386 has joined #ruby
nerium has quit [Quit: nerium]
chosen1 has quit [Read error: Connection reset by peer]
the_drow has joined #ruby
pawnbox has joined #ruby
the_drow has quit [Client Quit]
k3rn31 has joined #ruby
<jhass> I doubt so
<lupine> override the method ^^
pamatya has quit [Quit: pamatya]
the_drow has joined #ruby
axxyhtrx has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
matp has joined #ruby
karmatr0n has joined #ruby
karmatr0n has quit [Ping timeout: 260 seconds]
d0lph1n98 has joined #ruby
tvw has quit [Ping timeout: 260 seconds]
k3rn31 has quit [Quit: Computer has gone to sleep.]
nadir has joined #ruby
ur5us has joined #ruby
koooge has quit [Quit: Leaving...]
the_drow has quit [Read error: Connection reset by peer]
the_drow has joined #ruby
k3rn31 has joined #ruby
saneax is now known as saneax_AFK
charliesome has joined #ruby
LoneHermit has joined #ruby
Mia has quit [Read error: Connection reset by peer]
LoneHermit has quit [Ping timeout: 260 seconds]
sdothum has joined #ruby
aries_liuxueyang has quit [Ping timeout: 240 seconds]
certainty has quit [Ping timeout: 252 seconds]
toretore has joined #ruby
allcentury has joined #ruby
bkxd has joined #ruby
aries_liuxueyang has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
nankyokusei has joined #ruby
czerasz has quit [Quit: Ex-Chat]
the_drow has joined #ruby
bkxd has quit [Ping timeout: 250 seconds]
jgt has joined #ruby
AlexJakeGreen has joined #ruby
nankyokusei has quit [Ping timeout: 250 seconds]
amtrivedi has joined #ruby
<amtrivedi> Does anyone here has experience with bcrypt?
last_staff has quit [Quit: last_staff]
chip_ has quit [Ping timeout: 250 seconds]
anisha has quit [Quit: Leaving]
<jhass> ?anyone amtrivedi
<ruby[bot]> amtrivedi: Just ask your question, if anyone has, is or can, they will respond.
last_staff has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
<amtrivedi> I want to know how do I a hash corresponds to a password that was hashed earlier?
<jhass> using the bcrypt gem?
kies has quit [Ping timeout: 276 seconds]
<jhass> or bcrytp-ruby ?
blackmesa has quit [Ping timeout: 260 seconds]
gnufied has joined #ruby
<jhass> mh, I guess it's the same by now
* norc fails to parse amtrivedi's question
<amtrivedi> Now, I want to check if password and hashed correspond to each other.
xall has quit [Ping timeout: 276 seconds]
gnufied has quit [Client Quit]
<amtrivedi> Basically, this - https://github.com/pyca/bcrypt#basic
<norc> amtrivedi: Just use ==
<jhass> amtrivedi: stored = BCrytp::Password.new(hashed); stored == password #=> true
<norc> amtrivedi: So hashed_password == unhashed_password
<norc> (BCrypt has that method override to automatically hash the right side)
the_drow has quit [Read error: Connection reset by peer]
gnufied has joined #ruby
the_drow has joined #ruby
tvw has joined #ruby
pawnbox has quit [Remote host closed the connection]
Fernando-Basso has joined #ruby
moeabdol has joined #ruby
jgt has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
startupality has joined #ruby
craigp has quit [Ping timeout: 258 seconds]
the_drow has joined #ruby
d0lph1n98 has quit [Ping timeout: 244 seconds]
the_drow has quit [Max SendQ exceeded]
phutchins2 has joined #ruby
the_drow has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
Guest_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
startupality has quit [Client Quit]
<flughafen> hello
the_drow has quit [Read error: Connection reset by peer]
the_drow has joined #ruby
AlexJakeGreen has quit [Quit: Leaving]
Fernando-Basso has quit [Ping timeout: 250 seconds]
blackmesa has joined #ruby
karmatr0n has joined #ruby
ldnunes has joined #ruby
jgt has joined #ruby
amtrivedi has quit [Quit: Leaving.]
hanmac has quit [Ping timeout: 258 seconds]
amtrivedi has joined #ruby
amtrivedi has quit [Client Quit]
fujinuma has quit [Quit: WeeChat 1.4]
karmatr0n has quit [Ping timeout: 244 seconds]
craigp has joined #ruby
Guest_ has joined #ruby
dionysus69 has joined #ruby
Snowy has quit [Ping timeout: 260 seconds]
the_drow has quit [Read error: Connection reset by peer]
terlar has joined #ruby
Ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
Vingador has joined #ruby
the_drow has joined #ruby
d0lph1n98 has joined #ruby
Fernando-Basso has joined #ruby
rodfersou has joined #ruby
ryan_notabot has joined #ruby
ferr has quit [Quit: WeeChat 1.5]
mdw has joined #ruby
hanmac has joined #ruby
certainty has joined #ruby
norc has quit [Ping timeout: 250 seconds]
the_drow has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
the_drow has joined #ruby
the_drow has quit [Max SendQ exceeded]
certainty has quit [Ping timeout: 260 seconds]
the_drow has joined #ruby
iCHAIT has joined #ruby
mistermocha has quit [Ping timeout: 276 seconds]
allcentury has quit [Ping timeout: 252 seconds]
<iCHAIT> In ruby how can I parse a time string containing invalid time?
<iCHAIT> for example  - If I want to parse "3h30m2h"
<iCHAIT> I know I can parse for a valid string time using Time.strptime
<iCHAIT> But strptime doesn't catches the above invalid time duration.
<shevy> Time.parse "3h30m2h" # => 2016-06-17 03:30:02 +0800
araujo_ has joined #ruby
<shevy> I don't know what your format is there
<shevy> why do you have 2x h
phutchins2 has quit [Quit: WeeChat 1.4]
<iCHAIT> I am writing tests for a ruby app, and it involves testing for an invalid time string passed by a user "3h30m2h" for example.
jgt has quit [Ping timeout: 246 seconds]
dionysus69 has quit [Ping timeout: 260 seconds]
araujo_ has quit [Max SendQ exceeded]
jaguarmagenta has quit [Remote host closed the connection]
araujo_ has joined #ruby
kedare_ has joined #ruby
sergio_101 has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
ornerymoose has joined #ruby
mdw_ has joined #ruby
araujo has quit [Ping timeout: 258 seconds]
Vile` has joined #ruby
skweek has quit [Ping timeout: 260 seconds]
mdw has quit [Ping timeout: 264 seconds]
Vingador has quit [Remote host closed the connection]
the_drow has joined #ruby
christianrojas has joined #ruby
kedare has quit [Ping timeout: 244 seconds]
mercerist has quit [Read error: Connection reset by peer]
jhass has quit [Read error: Connection reset by peer]
araujo__ has joined #ruby
mercerist has joined #ruby
ornerymoose has quit [Ping timeout: 252 seconds]
araujo__ has quit [Max SendQ exceeded]
constantinexvi has quit [Quit: Exiting]
araujo__ has joined #ruby
RegulationD has joined #ruby
araujo_ has quit [Ping timeout: 252 seconds]
FastJack_ has joined #ruby
synthroid has joined #ruby
araujo__ has quit [Max SendQ exceeded]
the_drow has quit [Read error: Connection reset by peer]
araujo__ has joined #ruby
FastJack has quit [Ping timeout: 244 seconds]
FastJack_ is now known as FastJack
jhass has joined #ruby
araujo_ has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
GodFather has joined #ruby
the_drow has joined #ruby
synthroi_ has joined #ruby
last_staff has quit [Quit: last_staff]
Snowy has joined #ruby
synthroid has quit [Ping timeout: 244 seconds]
araujo__ has quit [Ping timeout: 276 seconds]
conta has joined #ruby
christianrojas has quit [Quit: Be back later ...]
ricer2 has joined #ruby
fmcgeough has joined #ruby
Silthias1 has quit [Ping timeout: 260 seconds]
Silthias has joined #ruby
last_staff has joined #ruby
yesthatallen has quit []
saneax_AFK is now known as saneax
joonty has quit [Quit: This computer has gone to sleep]
hanle has quit [Ping timeout: 246 seconds]
jhass has quit [Quit: Bye]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
snebel has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
joonty has joined #ruby
tesuji has joined #ruby
bkxd has joined #ruby
swills has quit [Ping timeout: 252 seconds]
duoi has quit [Ping timeout: 250 seconds]
jhass has joined #ruby
the_drow has joined #ruby
the_drow has quit [Max SendQ exceeded]
the_drow has joined #ruby
the_drow has quit [Max SendQ exceeded]
ornerymoose has joined #ruby
the_drow has joined #ruby
the_drow has quit [Max SendQ exceeded]
duoi has joined #ruby
the_drow has joined #ruby
the_drow has quit [Max SendQ exceeded]
blackgoat has quit [Ping timeout: 240 seconds]
the_drow has joined #ruby
JakFrist has joined #ruby
tubuliferous_ has joined #ruby
pawnbox has quit [Remote host closed the connection]
Yiota has joined #ruby
jgt has joined #ruby
karmatr0n has joined #ruby
mercerist has quit [Quit: Computer has gone to sleep.]
certainty has joined #ruby
nettoweb has quit [Read error: Connection reset by peer]
the_drow has quit [Read error: Connection reset by peer]
nettoweb has joined #ruby
Snowy has quit [Remote host closed the connection]
pawnbox has joined #ruby
karmatr0n has quit [Ping timeout: 250 seconds]
Silthias has quit [Ping timeout: 260 seconds]
yqt has joined #ruby
GarethAdams has joined #ruby
vuoto has quit [Quit: Lost terminal]
Vile` has quit [Ping timeout: 252 seconds]
edwinvdgraaf has joined #ruby
nettoweb has quit [Ping timeout: 246 seconds]
bruce_lee has quit [Ping timeout: 264 seconds]
bruce_lee has joined #ruby
aries_liuxueyang has quit [Quit: No Ping reply in 180 seconds.]
goget has joined #ruby
GarethAdams has quit [Quit: Linkinus - http://linkinus.com]
aries_liuxueyang has joined #ruby
CloCkWeRX has joined #ruby
fenre_ has quit [Ping timeout: 244 seconds]
the_drow has joined #ruby
duckpuppy has joined #ruby
ponga has quit []
strigonLeader has joined #ruby
CloCkWeRX has quit [Ping timeout: 250 seconds]
ramortegui has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Yiota has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
karmatr0n has joined #ruby
nankyokusei has joined #ruby
xue has quit [Remote host closed the connection]
cgfbee has quit [Quit: cgfbee]
evansbee has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
aryaching has joined #ruby
k3rn31 has quit [Quit: Computer has gone to sleep.]
ChiefAlexander has joined #ruby
Snowy has joined #ruby
certainty has quit [Ping timeout: 246 seconds]
dionysus69 has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
jaguarmagenta has joined #ruby
matp has quit [Remote host closed the connection]
hutch34 has joined #ruby
last_staff has quit [Quit: last_staff]
vipinj has joined #ruby
evidex has quit [Ping timeout: 264 seconds]
ta_ has quit [Remote host closed the connection]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vdamewood has quit [Quit: Life beckons.]
flashpoint9 has joined #ruby
cgfbee has joined #ruby
FernandoBasso has joined #ruby
CloCkWeRX has joined #ruby
suchness has quit [Remote host closed the connection]
greg has joined #ruby
<iCHAIT> jhass: Thanks.
bkxd has quit [Ping timeout: 258 seconds]
Azure has quit [Ping timeout: 250 seconds]
jaguarmagenta has quit [Remote host closed the connection]
k3dare has joined #ruby
malconis has joined #ruby
araujo__ has joined #ruby
malconis has quit [Remote host closed the connection]
araujo_ has quit [Ping timeout: 260 seconds]
startupality has joined #ruby
malconis has joined #ruby
Vile` has joined #ruby
aegis3121 has joined #ruby
kedare_ has quit [Ping timeout: 258 seconds]
jrafanie has joined #ruby
rippa has joined #ruby
greg has quit [Remote host closed the connection]
sepp2k has joined #ruby
eGGshke_ has quit [Quit: Leaving...]
roamingdog has joined #ruby
startupality has quit [Quit: startupality]
Dysp has joined #ruby
Snowy has quit [Remote host closed the connection]
startupality has joined #ruby
tk__ has joined #ruby
<Dysp> Mjello! When I initialize an object of the class, I do this by opening the excel sheet, grabbing what data I need and return an array of arrays. I like dat. However, when I next call my .calculate function to deal with these arrays, the data is gone. I think this is because I don't assign it to an instance-variable. The reason why I don't want to do this, is because I don't need the raw data to stay in the object when the calculations are
<Dysp> What would be the proper way of doing this?
<Dysp> Create the instance variable and then remove it from the instance when used?
jancel has joined #ruby
CJKinni has joined #ruby
Snowy has joined #ruby
Silthias has joined #ruby
<snebel> Hi all
startupality has quit [Client Quit]
<opentux> Hi snebel
<jhass> Dysp: no, repeating the same pattern you already did between load and extract_values
<Dysp> So basicly just passing the data as a parameter?
CJKinni has quit [Read error: Connection reset by peer]
JakFrist has joined #ruby
<jhass> yes
<Dysp> Alrighty! ty
<snebel> I'm wondering if anybody knows if is possible to get an object.hash value which is always the same value no matter the session is running, I'd like to store that value and use it to compare objects later..
<ruby[bot]> snebel: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
jancel has quit [Ping timeout: 272 seconds]
LoneHerm_ has joined #ruby
<snebel> that's the issue...
JeremyM_ has joined #ruby
<toretore> snebel: why do you need it to be the same?
<snebel> well I try to compare objects such a hash
<snebel> but i want to compare them later in time..
mattwashere has joined #ruby
Hounddog has quit [Remote host closed the connection]
<toretore> snebel: why?
Silthias has quit [Ping timeout: 276 seconds]
moty66 has quit [Read error: Connection reset by peer]
agentmeerkat has joined #ruby
<snebel> I'm working in an script that produce yaml files, then I import them into an external software (rundeck) that produces job definitions, I'd like to being able to see if somebody modified the initial yaml definition by generating some kind of hash...
<snebel> I'm experimenting how to produce this "hash" from a yaml object definition.
allcentury has joined #ruby
nicoulaj has joined #ruby
Silthias has joined #ruby
<toretore> then use a predictive hasging algorithm like sha or md5
<jhass> why do you have to compare a "hash"? Can't you just load the whole object and use Hash#== ?
<toretore> Digest::MD5.hexdigest(File.read('some.yaml'))
<snebel> Yeah I started using that but there is a problem with that
<toretore> what you want to know is if the bytes inside the file have changed
<snebel> the yaml files are not always ordered on the same way before import and after import
<lupine> well, semantic change is what you're interested in
<lupine> a mere whitespace commit can be skipped
<snebel> yaml/pysch produce and object that is an array of nested arrays and hashes
moty66 has joined #ruby
<snebel> hashes are not always ordered so the md5/sha1 don't produce always the same "hash"
<lupine> hashes are ordered from 1.9 up aren't they?
glcx has joined #ruby
glcx has quit [Changing host]
glcx has joined #ruby
<snebel> yes
<lupine> and positional changes in arrays may be significant, of course
<snebel> but don't forget that i'm importing/exporting the yaml defintion from a third party software rundeck
<snebel> which is not using ruby...
<snebel> so the order is not always the same
<toretore> you have to define more clearly what kind of change you care about
<lupine> right, but a DeepEquals-alike of a hash loaded from the yaml in ruby should be correct
mshowman has joined #ruby
<toretore> whether it's any change at all or only if it's semantically significant
<snebel> DeepEquals ?
<lupine> certainly more so than an md5sum
flashpoint9 has quit [Remote host closed the connection]
<snebel> sorry what is that?
<lupine> sorry, I do more go than ruby these days (for now)
<lupine> I'm sure ruby has an equivalent
roamingdog has quit [Remote host closed the connection]
<toretore> snebel: it's hash == other_hash
<snebel> yeah but the hash is different in differnt sessions
<snebel> see it here
<toretore> hash being an instance of Hash
swills has joined #ruby
matp has joined #ruby
<snebel> this is basicaly what i'm looking for..
<toretore> i'm not talking about the hash method
<snebel> ok
<Dysp> Okay, okay, I am getting an "else without rescue is useless" warning for this: return true if array.inject(:+).quo(array.size) > 0 else return false
<toretore> what you're trying to do is not the way to do it
<Dysp> It's all in one line. Is this bad practice? I'm just trying to short it down. Would there be a more proper way of writing it?
<snebel> well i'm looking for inspiration :-)
<snebel> any suggestion?
<toretore> you have two real options: use Hash#== or compare the byte contents of the file using MD5 or SHA
<toretore> and to know which one to use, you have to define exactly what changes you care about
allcentury has quit [Ping timeout: 260 seconds]
<toretore> Dysp: use a proper if-else-end
<Dysp> Do I dare ask why?
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
<toretore> because what you have is incorrect
<snebel> I started trying to do SHA1 on a file but seems a mess because the same YAML can be expressed on different ways
flashpoint9 has joined #ruby
<toretore> snebel: does it make a difference?
<snebel> so you have a different file for the same definition plus the pbm of order
<Dysp> Well okay. Will do then
palms has joined #ruby
<snebel> yes, the SHA1 is different because of how the array es defined
<snebel> or if the yaml is exported using &1 values
<toretore> snebel: yes, but does it matter?
<toretore> snebel: context is important
blackmesa has quit [Ping timeout: 272 seconds]
<snebel> well, I think yes because the sha1 produced when i created the file an the one that i compute later is different
<toretore> you've said that 5 times now
<toretore> this is established
<jhass> let me repeat myself since you didn't answer: why do you have to compare a "hash"? Can't you just load the whole object and use Hash#== ?
vipinj has quit [Quit: This computer has gone to sleep]
<toretore> the question is, does it matter for your use case whether or not you get false positives?
vipinj has joined #ruby
<snebel> mmmmm
<snebel> never used #== method let me check...
<snebel> the dcos
<snebel> the doc
<jhass> oh I'm sure you did
<jhass> >> {a: 1, b: 2} == {b: 2, a: 1}
<ruby[bot]> jhass: # => true (https://eval.in/590896)
<snebel> fuck yes looks like could work
jgt has quit [Ping timeout: 240 seconds]
<snebel> ah!
<snebel> you meant ==
<snebel> sorry
<jhass> only cavehat is
<jhass> >> [1, 2] == [2, 1]
<shevy> :D
<ruby[bot]> jhass: # => false (https://eval.in/590897)
<snebel> yeah but for arrays is fine
<snebel> because order matters
<snebel> well, I'm going to test it but i'm going to feel really stupid if that works after the whole morning playing with that :-)
<toretore> cavehat :P
dkam has joined #ruby
allcentury has joined #ruby
<jhass> I don't English :P
<aegis3121> Going spelunking in sourcecode
LoneHerm_ has joined #ruby
valkyrka has quit [Ping timeout: 258 seconds]
Silthias1 has joined #ruby
<snebel> ah yes, the thing is I'm trying to store just a hash like string, not the whole yaml defintion...
<snebel> for compare it later
<snebel> may be I should store the whole yaml/object definition..
ncthom91 has joined #ruby
<snebel> but yes I was all the time trying to just store some short string and being able to produce that same string later
<snebel> only way of comparing obj == obj would be storing the whole initial yaml definition
<snebel> i was trying to avoid that
<lupine> another option is to write your own semantic hasher for your own data
babblebre has joined #ruby
<snebel> semantic hasher? what you mean?
<jhass> or to bring it into a canonical from
<snebel> sorry i'm bit newbie
Silthias has quit [Ping timeout: 260 seconds]
<snebel> canonical form? mm let's google some..
<jhass> that is sort by hash key, recursively, join all string values, sha1/md5 that
<jhass> something like that
<snebel> ah yes, i start this morning working on that
LoneHerm_ has quit [Ping timeout: 272 seconds]
rueben has joined #ruby
<snebel> but found that array of hashes some times don't have same key to use for ordering
blackmesa has joined #ruby
<snebel> so it start getting more and more complex..
<lupine> it's a reasonably hard problem, TBH
<snebel> yeah
eljimador has quit [Read error: Connection reset by peer]
<lupine> ruby lets you ignore these things for a very long time, until suddenly the built-in stuff stops working
<snebel> well I got some good ideas here
<snebel> may be i'll have to store the whole defintionm
<snebel> if i want to do it simple..
<snebel> may be i have to really go for this complex canonical regularisation
<snebel> method
certainty has joined #ruby
<snebel> thank you all for you time :-)
flok420 has joined #ruby
idle_task has quit [Ping timeout: 250 seconds]
certainty has quit [Ping timeout: 258 seconds]
c0mrad3 has joined #ruby
evansbee has quit [Ping timeout: 260 seconds]
vipinj has quit [Ping timeout: 260 seconds]
blaxter has joined #ruby
<flok420> trying to learn ruby. doing so by creating a bf to ruby converter. the result is http://vps001.vanheusden.com/~folkert/rub.rb running fails with "rub.rb:41: syntax error, unexpected keyword_end" but I see not why. any suggestions?
dionysus69 has quit [Ping timeout: 252 seconds]
kobain has joined #ruby
vipinj has joined #ruby
<jhass> why does that thing force me to download it? -.-
<flok420> I'm not sure. let me paste it in pastebin. hold on
<jhass> huh, three spaces for indentation? that's... unique
<flok420> oh you got it
chouhoulis has joined #ruby
<jhass> flok420: ruby doesn't have foo++
<jhass> use foo += 1
RegulationD has joined #ruby
Silthias1 has left #ruby [#ruby]
<flok420> ok!
<flok420> works much better :-)
cek has left #ruby [#ruby]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
idle_task has joined #ruby
nerium has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
deuterium has joined #ruby
SilverKey has joined #ruby
digneety has quit [Quit: digneety]
Guest_ has quit [Quit: Textual IRC Client: www.textualapp.com]
augcesar has joined #ruby
Dysp has quit [Quit: Page closed]
<flok420> ok works. thanks!
dionysus69 has joined #ruby
dstarh has joined #ruby
Silthias has joined #ruby
kareeoleez has quit [Remote host closed the connection]
ljarvis has joined #ruby
pawnbox has quit [Remote host closed the connection]
davedev24 has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
SilverKey has quit [Quit: Halted.]
DanyC has joined #ruby
pawnbox has joined #ruby
fenre has joined #ruby
ChiefAlexander has joined #ruby
nerium has quit [Quit: nerium]
snath has quit [Ping timeout: 252 seconds]
nerium has joined #ruby
certainty has joined #ruby
blackgoat has joined #ruby
fenre has quit [Remote host closed the connection]
sid_fules has joined #ruby
fenre has joined #ruby
bkxd has joined #ruby
mattwashere has quit [Remote host closed the connection]
Guest11947 is now known as adam12
ur5us has quit [Remote host closed the connection]
clubsoda_christ has joined #ruby
jhack has joined #ruby
tesuji has quit [Ping timeout: 250 seconds]
pawnbox has quit [Remote host closed the connection]
blackgoat has quit [Ping timeout: 244 seconds]
GinoManWorks has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
spiette has joined #ruby
prestorium has joined #ruby
christianrojas has joined #ruby
cdg has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
evidex has joined #ruby
yardenbar has joined #ruby
dkam has quit [Quit: Be back later ...]
DanyC has quit []
frem_ has joined #ruby
pawnbox has joined #ruby
Renich has joined #ruby
tjohnson has joined #ruby
mercerist has joined #ruby
jhack has quit [Quit: jhack]
hs366 has quit [Quit: Leaving]
arajakul has joined #ruby
yardenbar has quit [Ping timeout: 276 seconds]
mrgrieves has joined #ruby
mattwashere has joined #ruby
fenre has quit [Remote host closed the connection]
TvL2386 has quit [Ping timeout: 276 seconds]
<mrgrieves> with an array of integers, how would you suggest to check if the sum of any 2 items returns an specific number
<mrgrieves> ?
bmbouter has joined #ruby
<bmbouter> I'm trying to configure a redirect using WEBrick
<bmbouter> the docs seem almost non-existant
Renich has quit [Quit: leaving]
<snebel> mrgrieves: how much data are you expeting? how big the numbers?
kareeoleez has joined #ruby
fenre has joined #ruby
kareeoleez has quit [Remote host closed the connection]
<jhass> mrgrieves: sounds like a code challenge, what did you try so far?
tubuliferous_ has quit [Ping timeout: 246 seconds]
<mrgrieves> snebel: not big
danieli has quit [Changing host]
danieli has joined #ruby
<snebel> not big numbers and not too much numbers?
moos3 has joined #ruby
<mrgrieves> jhass: I'm looking at the enumerable docs trying to find the best way to iterate
RegulationD has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
<dsimon> mrgrieves, you probably want to start off with "each"
mistermocha has joined #ruby
<snebel> why just not use some nested loop to sum each element which each other?
<mrgrieves> snebel: not too much numbers
<arajakul> Anyone know how to best practise recommendations for provisioning a cluster? 3 node cluster, node 2 and 3 require node 1 to perform certain tasks first, then node 2/3 run tasks, then node 1 require to perform tasks again.
<mrgrieves> dsimon: thanks I guess I'll have to combine it with snebel 's suggestion
<dsimon> arajakul, can you be more specific? what are these nodes doing?
polishdub has joined #ruby
allcentury has quit [Ping timeout: 244 seconds]
ChiefAlexander has joined #ruby
<dsimon> that said: the best approach for inter-node data dependencies is usually queues
<dsimon> assuming you can get away with asynchronicity
<arajakul> dsimon, node 1 generates a file and pushes them to node 2 and 3/ or node 2and3 pull the file from node 1 after generation
mistermocha has quit [Read error: Connection reset by peer]
<dsimon> arajakul, where is the file coming in initially?
<arajakul> node 1 runs a script
<arajakul> it generates a file
<dsimon> ok
CJKinni has joined #ruby
agent_white has joined #ruby
allcentury has joined #ruby
<dsimon> so i'd recommend something like a rabbitmq work queue
<agent_white> Mornin'
nankyokusei has joined #ruby
<arajakul> omg i feel like an idiot
<arajakul> i asked that in the wrong channel, meant to ask in #chef
<arajakul> hahaha
startupality has joined #ruby
<dsimon> ah, no worries :-)
<arajakul> appreciate the answer tho dsimon ;D
chouhoulis has quit [Remote host closed the connection]
moeabdol has quit [Ping timeout: 246 seconds]
chouhoulis has joined #ruby
mistermo_ has joined #ruby
fenre has quit [Remote host closed the connection]
kareeoleez has joined #ruby
SilverKey has joined #ruby
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
mistermo_ has quit [Remote host closed the connection]
aganov has quit [Remote host closed the connection]
snath has joined #ruby
mistermocha has joined #ruby
pglombardo has joined #ruby
jhack has joined #ruby
nankyokusei has quit [Ping timeout: 276 seconds]
moeabdol has joined #ruby
kareeoleez has quit [Ping timeout: 250 seconds]
<alexandernst> What is the difference between "has_many :services, :dependent => :destroy" and "has_many :services, dependent: :destroy" ?
<jhass> ?rails
<ruby[bot]> Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<jhass> on the ruby level there's none
Madplatypus has quit [Quit: Connection closed for inactivity]
kareeoleez has joined #ruby
lictor36 has joined #ruby
solars has quit [Ping timeout: 264 seconds]
mistermocha has quit [Remote host closed the connection]
startupality has quit [Quit: startupality]
eGGshke has joined #ruby
moeabdol has quit [Ping timeout: 244 seconds]
<alexandernst> jhass: yes
<alexandernst> ok, thank you
tuelz has quit [Ping timeout: 264 seconds]
moeabdol has joined #ruby
jas02 has quit [Quit: jas02]
aufi has quit [Remote host closed the connection]
Long has joined #ruby
tvw has quit [Ping timeout: 244 seconds]
chouhoul_ has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
aryaching has quit [Ping timeout: 272 seconds]
tvw has joined #ruby
moeabdol has quit [Ping timeout: 244 seconds]
chouhoul_ has quit [Remote host closed the connection]
tuelz has joined #ruby
chouhoul_ has joined #ruby
mdw_ has quit [Quit: Sleeping Zzzzz]
chouhoulis has quit [Ping timeout: 260 seconds]
karmatr0n has quit [Ping timeout: 258 seconds]
SilverKey has quit [Quit: Halted.]
SilverKey has joined #ruby
GodFather has quit [Quit: Ex-Chat]
GodFather has joined #ruby
TomyWork has quit [Ping timeout: 244 seconds]
christianrojas has quit [Quit: Be back later ...]
christianrojas has joined #ruby
conta has quit [Ping timeout: 252 seconds]
moeabdol has joined #ruby
pglombar_ has joined #ruby
pglombardo has quit [Ping timeout: 240 seconds]
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bkxd_ has joined #ruby
fergal has joined #ruby
bkxd has quit [Ping timeout: 244 seconds]
RegulationD has quit [Remote host closed the connection]
<fergal> hi guys, does anyone here use browser mob?
moos3 has left #ruby [#ruby]
certainty has quit [Ping timeout: 276 seconds]
<shevy> never heard of that before
moeabdol has quit [Ping timeout: 252 seconds]
moeabdol has joined #ruby
evansbee has joined #ruby
aryaching has joined #ruby
astrobunny has joined #ruby
xall has joined #ruby
moeabdol has quit [Ping timeout: 252 seconds]
goget has quit [Ping timeout: 276 seconds]
nettoweb has joined #ruby
khaki has joined #ruby
wrkrcoop has joined #ruby
mesamoo has quit [Quit: Konversation terminated!]
aberen has quit [Ping timeout: 264 seconds]
k3rn31 has joined #ruby
craigp has quit [Ping timeout: 260 seconds]
<khaki> 2
smathy has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
koochdog has left #ruby [#ruby]
<shevy> 3
Yiota has quit [Ping timeout: 252 seconds]
dkam has joined #ruby
GodFather has quit [Ping timeout: 240 seconds]
moeabdol has joined #ruby
<jhass> 4
dstarh has joined #ruby
<apeiros> 5
<apeiros> though I think jhass failed and should have said 5…
<jhass> :(
<jhass> apeiros: weekend?
Yiota has joined #ruby
<apeiros> if I say yes, are you gonna ping me? :D
<shevy> lol
<jhass> maybe :P
<apeiros> yes, weekend. alright, let's get that thing done :)
<jhass> <3
gregor3005 has joined #ruby
dcunit3d has joined #ruby
diegoviola has joined #ruby
[Butch] has joined #ruby
jgt has joined #ruby
moeabdol has quit [Ping timeout: 240 seconds]
khaki has quit [Quit: ircII EPIC5-2.0 -- Are we there yet?]
DroidBurgundy has joined #ruby
Long has quit [Quit: Leaving.]
Yiota has quit [Ping timeout: 260 seconds]
zacstewa1t has joined #ruby
dkam has quit [Ping timeout: 276 seconds]
iCHAIT has left #ruby [#ruby]
Yiota has joined #ruby
zacstewart has quit [Quit: Lost terminal]
devsterknight|ZN has quit [Quit: cya]
devster31 has joined #ruby
zacstewa1t is now known as zacstewart
danostrowski has joined #ruby
astrobunny has quit [Remote host closed the connection]
khaki has joined #ruby
davedev24 has quit []
danostrowski has quit [Ping timeout: 246 seconds]
rueben has quit [Quit: Ex-Chat]
whathappens has joined #ruby
<bmbouter> I'm using WEBrick and doing a server.mount which is working
<bmbouter> I want it to match "/" and only "/"
yqt has quit [Ping timeout: 260 seconds]
<bmbouter> server.mount "/", WebForm
<bmbouter> instead that matches / and also /someotherpage
TomyLobo has joined #ruby
ncthom91 has quit [Quit: Textual IRC Client: www.textualapp.com]
<bmbouter> how can I have the "dir" option in server.mount use a regex?
chip_ has joined #ruby
<ljarvis> bmbouter: that's not how it works, you'll need to check for the request path inside your WebForm and then reject it if it's not "/"
SilverKey has quit [Quit: Halted.]
blackmesa has quit [Ping timeout: 260 seconds]
<bmbouter> and if I reject it will it server from the static filesystem?
flok420 has left #ruby ["Looking for an alternative to irssi/x-chat? Check f-irc! http://www.vanheusden.com/fi/"]
k3dare has quit [Quit: Leaving]
terminalrecluse has joined #ruby
<ljarvis> well, you would explicitly respond with whatever behaviour you wanted
aegis3121 has quit [Ping timeout: 240 seconds]
joonty has quit [Quit: This computer has gone to sleep]
<ljarvis> it sounds like you want a bit more flexibility than webrick provides though. Have you thought about alternatives?
matp has quit [Remote host closed the connection]
khaki has quit [Quit: ircII EPIC5-2.0 -- Are we there yet?]
mrgrieves has quit [Ping timeout: 260 seconds]
matp has joined #ruby
<bmbouter> ljarvis: I have considered switching
<ljarvis> (and no, the dir option can't use a regex)
khaki has joined #ruby
ngw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bmbouter> can't I just tell it to match against the next rule
omphe has joined #ruby
<bmbouter> "I'm not the handler you're looking for"
christianrojas has quit [Quit: Lingo: www.lingoirc.com]
<ljarvis> what's the next rule? if you match against "/" then you match everything under "/". So you should add rules for more specific paths
<ljarvis> then "/" could be your catch-all
khaki has left #ruby [#ruby]
amclain has joined #ruby
yqt has joined #ruby
khaki has joined #ruby
jetpackjoe has joined #ruby
khaki has quit [Quit: leaving]
khaki has joined #ruby
khaki has quit [Client Quit]
roamingdog has joined #ruby
choke has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nerium has quit [Quit: nerium]
deuterium has quit [Ping timeout: 246 seconds]
Yiota has joined #ruby
robmclark has joined #ruby
glcx has quit [Quit: Quitte]
dkam has joined #ruby
blackmesa has joined #ruby
<robmclark> Hello. When I try to drag a .rb file to my mac terminal, I get permission denied or no such directory. I am very new to programming so I haven’t been able to understand the solution recs when I googled my problem.
JakFrist has quit [Read error: Connection reset by peer]
terlar has quit [Ping timeout: 260 seconds]
braincras has quit [Ping timeout: 250 seconds]
<adaedra> try typing 'ruby ' before drag'n'droping into the terminal
roamingdog has quit [Remote host closed the connection]
<robmclark> okay I will try now
pglombar_ has quit [Remote host closed the connection]
pglombardo has joined #ruby
braincrash has joined #ruby
chrismytton has quit []
jancel has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
khaki has joined #ruby
mercerist has quit [Quit: Computer has gone to sleep.]
weckl has quit [Remote host closed the connection]
<robmclark> Adaedra- Thank you very much. Worked like a charm. Now back to tutorials :)
yokel has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Fernando-Basso has quit [Quit: Leaving]
mistermocha has joined #ruby
Lewix has joined #ruby
mdw has joined #ruby
<Lewix> hey folks
<Lewix> It's been a while
<Lewix> O
khaki has left #ruby [#ruby]
mattwashere has quit [Remote host closed the connection]
<Lewix> I"m refreshing my ruby. Definition question; what does it mean "arguments shadow the same named variables from outer scope"
khaki has joined #ruby
mattwashere has joined #ruby
jancel has quit [Ping timeout: 244 seconds]
dkam has quit [Ping timeout: 260 seconds]
<Veejay> Arguments to what?
khaki has left #ruby [#ruby]
<Veejay> Block?
khaki has joined #ruby
dstarh has quit [Ping timeout: 276 seconds]
wrkrcoop has quit [Quit: wrkrcoop]
robmclark has left #ruby [#ruby]
braincrash has quit [Ping timeout: 252 seconds]
khaki has quit [Client Quit]
flashpoint9 has joined #ruby
<Veejay> Lewix: If you have foo = "blah"; 10.times {|foo| puts foo}, it will display 0, 1, 2, etc.
<Veejay> I think that's what it means
<Lewix> here's how I understand it: attr ={sex: male} debug_only {|foo| attr = {} ; attr[:sex] = foo} attr is on the outer scope is overriden
chouhoulis has joined #ruby
Yiota has joined #ruby
<Lewix> Veejay: what does shadow mean? it's a definition problem I'm having
cschneid has joined #ruby
mattwashere has quit [Ping timeout: 244 seconds]
<Lewix> Veejay: I assumed shadow meant that 'it's a reference to..."
aberen has joined #ruby
<smathy> No, shadow means it hides the outer var,.
allcentury has quit [Ping timeout: 276 seconds]
<smathy> It puts it in shade, so it can't be seen anymore.
<Lewix> smathy: thanks now it makes sense to use this term
* Lewix kicks English in the butt
noodle has quit [Read error: Connection reset by peer]
tk__ has quit [Quit: ばいばい]
chouhoul_ has quit [Ping timeout: 260 seconds]
<smathy> In this sense it's basically a synonym for "obscure"
chouhoulis has quit [Ping timeout: 244 seconds]
marr has quit [Remote host closed the connection]
pglombardo has quit []
braincrash has joined #ruby
jxs_ has joined #ruby
Yiota has quit [Client Quit]
<Veejay> Yeah, the former variable with that name is now in the shadow of the glory of the new variable
aegis3121 has joined #ruby
<Lewix> smathy: I was thinking of shadow as in a dark area or shape produced by a body coming between rays of light and a surface. - basically a reference to my body
jorrin has joined #ruby
<apeiros> Lewix: btw., same term is used for "local variable shadows method"
choke has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> >> def foo; 123; end; foo = 987; foo # <-- won't call the method
<ruby[bot]> apeiros: # => 987 (https://eval.in/591032)
<smathy> Lewix, yeah, in that sense and in the other sense (of shadowing someone, as in following them around and observing them) the usage here is confusing.
<Lewix> smathy: bad name if you ask me
<Lewix> apeiros: yup
aberen has quit [Ping timeout: 252 seconds]
<smathy> ...but y'know, we English speakers all just decided spontaneously to start using the word as a synonym for "obscure"
<Lewix> smathy: I'm sorry to hear that :)
<Lewix> smathy: it probably add a lot of complexity in your life
pilne has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Lewix> thanks guys
<smathy> We don't even notice :)
noodle has joined #ruby
dcunit3d has quit [Ping timeout: 250 seconds]
<smathy> ...until some poor bugger has to ask about it and it's like: "Oh yeah, we fucked that one up.... again."
tuelz has quit [Ping timeout: 250 seconds]
<Lewix> smathy: so you instinctively thought about shadow as in obscure while I thought about shadow as in shadowing someone
<smathy> Yep.
<Lewix> that's complexity right there
<smathy> It's like casting a shadow on something makes it harder to see.
<smathy> ...makes perfect sense ;)
allcentury has joined #ruby
sepp2k has quit [Quit: Leaving.]
<Lewix> lol
<Veejay> Hey Apeiros, meant to ask, outside of Ruby, which other languages do you use and like?
<Lewix> Veejay: am I eligible to answer?
blaxter has quit [Quit: foo]
<Veejay> go ahead
<Lewix> Clojure
<apeiros> Veejay: sadly not too many atm. javascript is the only other language I use to a relevant degree. C++ and C to a much lesser degree.
<Veejay> Color me surprised
<apeiros> the list of languages I'd like to play more with is long, the available time to do so is short :-/
blaxter has joined #ruby
<Veejay> apeiros: Ever checked Crystal?
spudowiar has quit [Ping timeout: 240 seconds]
<Veejay> Close enough to Ruby that it's appealing
moeabdol has joined #ruby
wrkrcoop has joined #ruby
<ytti> :)
spudowiar has joined #ruby
<Veejay> I'm afraid it's actually too close to Ruby and ends up being deceiving
<ytti> surely you're joking mr. feynman
<apeiros> Veejay: no. atm I prefer investing otherwise unspent time in C++
<Veejay> C++ is solid
<Veejay> It's a great language to have up your sleeve
<Veejay> It's like C, they're never going away those languages
<smathy> Despite many people's wishes.
kenichi_ is now known as kenichi
banister has joined #ruby
<Veejay> smathy: If you start listening to "people" when picking your PLs, you do nothing
araujo__ has quit [Quit: Leaving]
d0lph1n98 has quit [Ping timeout: 276 seconds]
<smathy> I'm one of those people, C++ has never appealed to me.
<Veejay> The versatility, the speed, the tooling and the ubiquity has never appealed to you?
<Veejay> have*
snebel has quit [Quit: Leaving]
<lupine> har
Snowy has quit [Remote host closed the connection]
<lupine> I've used C++, but I don't *like* it
oncall-pokemon has quit [Quit: Connection closed for inactivity]
<Veejay> To be honest, I don't much like the look of it either
<lupine> fortunately, the state of programming language research is pretty good these days
<Veejay> But I can still recognize the strengths
<lupine> OSes and languages are experiencing a bit of a boom time at the moment
<bmbouter> ljarvis: yeah good point about the catch all
synthroi_ has quit []
tuelz has joined #ruby
mistermocha has quit [Remote host closed the connection]
<pilne> in my learning/reading about ruby, i saw there were some serious debates a few years ago (at least... strongly worded blogs) about inheritence vs. composition, i've always thought that a nice thing about ruby is that it gives the options for either and you can utilized them together to make the most elegant solution?
<smathy> Veejay, sure, but those exist in other languages without any of the downsides, eg. C. I don't remember a time when any of the appealing features of the C++ ecosystem weren't fairly quickly copied into the C world.
<lupine> wellll, it's not really a ruby thing
duckpuppy has quit [Quit: WeeChat 1.5]
<lupine> the language features might tip the cost-benefit one way or another slightly
<lupine> but this has been going on since at least SOLID, surely?
marr has joined #ruby
<smathy> Yep, most of it boils down to personal preference.
<smathy> I find C++ cumbersome.
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
<lupine> a bad inheritence hierarchy in ruby is still going to be bad
<pilne> correct
<pilne> but having both options, instead of the one-or-another that some languages go for, allows to make it all neat and tidy during refactoring (or creation if you are a better coder than i)
<lupine> well, no. with the general standard of the workforce, it's easy to convincingly argue that people should default to not using inheritence
dkam has joined #ruby
fergal has quit [Quit: Page closed]
<smathy> ...maybe because I learnt C first and in the 90s, I think by that time C was a lot friendlier than it was when Stroustrup started C++
<shevy> hehe
<lupine> pepole who actually know better will continue to use it, they're not the target audience
chip_ has quit [Ping timeout: 250 seconds]
<pilne> i'm not talking "general code-monkeying" i'm talking someone's pet project type code.
sid_fules has quit [Remote host closed the connection]
AcidCras_ is now known as AcidCrash
lsmola has quit [Ping timeout: 250 seconds]
<smathy> pilne, I agree btw, re Ruby and inheritance vs composition - it's something that appealed to me a lot too.
<pilne> i see myself creating it all initically with composition, and then refactoring to use inheritence where it is more elegant.
<pilne> initially*
mistermocha has joined #ruby
ChiefAlexander has joined #ruby
jsownz has joined #ruby
dreinull has joined #ruby
clubsoda_christ has quit [Ping timeout: 250 seconds]
<lupine> Metz is of the opinion that when introducing subclasses, you should start with an empty superclass and promote behaviour upwards, ISTR
<dreinull> I include a module that has a method that might or might not exist in my class. if it dooesn't exist, fine, use it. If it does, use the original one. How can I do that?
<lupine> which could be seen as the same sort of thing
bluOxigen has quit [Ping timeout: 250 seconds]
bluOxigen has joined #ruby
nankyokusei has joined #ruby
<smathy> dreinull, use prepend instead of include
omphe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dreinull> prepend does the same thing here, right? The prepended modules method will be accessed first.
<dreinull> I want it the other way round, but you reminded me of something
<smathy> dreinull, so you think that prepend is just an alias for include ?
<lupine> I really need my own copy of POODR
mercerist has joined #ruby
jiblet has joined #ruby
<shevy> good old poodle
babblebre has quit [Quit: Connection closed for inactivity]
bluOxigen has quit [Ping timeout: 276 seconds]
<jiblet> I need im using the select method and I was wondering if there was any easy way to return the results which returned true along with another list of the ones which returned false
last_staff has joined #ruby
dkam has quit [Ping timeout: 240 seconds]
nankyokusei has quit [Ping timeout: 264 seconds]
<eam> jiblet: #partition
omphe has joined #ruby
<jiblet> aaaah
<jiblet> much obliged eam
<dreinull> no, I assumed it puts those modules methods first
<eam> yw
hahuang62 has joined #ruby
<jiblet> christ ruby has such specific methods
bkxd_ has quit [Read error: Connection reset by peer]
<dreinull> smathy and include depends on where it is included
firstdayonthejob has joined #ruby
<lupine> things get really exciting with diamond inheritence
ramfjord has joined #ruby
<smathy> dreinull, so if prepend puts the module methods first, then if they're in the class too then they will override the module methods, isn't that what you wanted?
<dreinull> smathy ouch, you got me.
<smathy> lupine, meh, as long as there's a rule that's easy to understand, it's no different than any method overriding.
<lupine> welp
<lupine> that's that long-standing issue in computer science resolved
<lupine> on to the next one, I guess
hahuang61 has quit [Quit: WeeChat 1.5]
<dreinull> smathy ok, it's more complicated than that. I also dynamically create that class with all its methods so I can't prepend it because it doesn't yet exist.
hahuang65 has joined #ruby
<smathy> lupine, the fact that there are multiple ways to implement the solution to it doesn't mean that there's no solution. Languages already do exactly what I suggested.
<smathy> dreinull, prepend is just a method call.
hahuang62 has quit [Ping timeout: 264 seconds]
<lupine> smathy: having an arbitrary rule does not solve the problem
<lupine> you've obviously got to do something if you permit diamond inheritance, and that something is more likely to be deterministic than not
LoganG has quit [Quit: robots are cool]
<smathy> lupine, it does for the user of that language. The author of that language has to select which implementation to use, but this is not something that they don't already have to do with multiple inheritance or really, with any method dispatching / ancestor chain.
<lupine> that doesn't stop it from getting very insane, very quickly
Hiryu has left #ruby [#ruby]
<apeiros> random preference in diamond inheritance - that sounds like fun
aryaching has quit [Ping timeout: 244 seconds]
<apeiros> preferably the randomness is at run-time, not compile-time
tvw has quit [Remote host closed the connection]
<smathy> ):
<cschneid> From inside of ruby, is there a constant that is the location ruby is installed to?
<smathy> That was meant to be a smile.
<lupine> apeiros: personally I'd prefer it if ruby would forbid conflicting method definitions in this case
<apeiros> lupine: ruby doesn't have diamond inheritance
<lupine> modules are pretty close to it
<cschneid> something like this, but less hacky - >> Set.new.method(:each).source_location ## => => ["/Users/cschneid/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/set.rb", 304]
<apeiros> lupine: no they're not
<apeiros> they're strictly linear
mdw_ has joined #ruby
omphe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<lupine> mm, I know
<apeiros> then you should also know that there's no "almost diamond inheritance" :)
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
elifoster has joined #ruby
GodFather has joined #ruby
malconis has joined #ruby
<lupine> the problem is identical. the solution is the adoption of linearity, which is arbitrary
<shevy> ruby is a gentle language, not the forbidding type
<lupine> if you rely on including lots of interdependent modules, you're going to suffer quickly
xall has quit [Ping timeout: 272 seconds]
<apeiros> yeah. you can suffer quickly in many languages in even more ways.
<apeiros> news at eleven :D
<lupine> for sure
<apeiros> it's a trade-off problem. something's gotta give.
mdw has quit [Ping timeout: 260 seconds]
<smathy> apeiros, you can have the same diamond problem in ruby, one class includes two modules which each include the same single module.
<apeiros> my preference would go another way than yours, lupine
<smathy> apeiros, it's just that ruby has a very clearly defined "last in wins" implementation.
<lupine> permit the language to have the feature, but fire anyone using it?
pharaoh2 has joined #ruby
pharaoh2 has quit [Client Quit]
<apeiros> hm, seems the mechanism for modules including modules has changed since I last fiddled with it. or I misremember. afaik it used to be "copy", not truly "include"
* lupine got to learn how all this works the hard way, with a massive ruby-qt monolith using many many modules that had to be included *just so*
<lupine> *shudder*
jhack has quit [Quit: jhack]
<smathy> apeiros, I can't speak for < 2
<shevy> don't say you use ruby-qt lupine
<lupine> *I* don't :D
<apeiros> smathy: seems I can't speak for >2 :D
<lupine> that was a hell of a week
<apeiros> got to update my knowledge
blackmesa has quit [Ping timeout: 246 seconds]
<lupine> (incidentally, it's really hard to get it working on macs)
<apeiros> but not now
<smathy> apeiros, I can't speak for < 2
<shevy> is this a loop
Guest38__ has joined #ruby
<smathy> Ha, sorry, I `arrow-up enter`ed in the wrong window :)
RegulationD has joined #ruby
<smathy> Seriously, focus-follows-eyes, it's 2016 already!!!
wrkrcoop has quit [Quit: wrkrcoop]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banister has joined #ruby
RegulationD has quit [Ping timeout: 246 seconds]
dkam has joined #ruby
wrkrcoop has joined #ruby
GodFather has quit [Quit: Ex-Chat]
GodFather has joined #ruby
omphe has joined #ruby
JeremyM_ has quit [Read error: Connection reset by peer]
dionysus69 has quit [Ping timeout: 276 seconds]
aberen has joined #ruby
chouhoulis has joined #ruby
tristanp has quit [Read error: Connection reset by peer]
tristanp has joined #ruby
snath has quit [Ping timeout: 260 seconds]
<shevy> I remember my days with irssi... I constantly mispasted into different channel buffers
Pwnna has joined #ruby
SilverKey has joined #ruby
mtkd has quit [Ping timeout: 276 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
yqt has quit [Ping timeout: 276 seconds]
mtkd has joined #ruby
aberen has quit [Ping timeout: 260 seconds]
rcvalle has joined #ruby
whathapp_ has joined #ruby
whathapp_ has quit [Read error: Connection reset by peer]
dkam has quit [Ping timeout: 260 seconds]
rkoller has joined #ruby
whathapp_ has joined #ruby
whathapp_ has quit [Read error: Connection reset by peer]
whathapp_ has joined #ruby
GodFather has quit [Quit: Ex-Chat]
GodFather has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
whathappens has quit [Ping timeout: 258 seconds]
whathapp_ has quit [Read error: Connection reset by peer]
whathappens has joined #ruby
minimalism has joined #ruby
k3rn31 has quit [Quit: Computer has gone to sleep.]
jhack has joined #ruby
jhack has quit [Client Quit]
sp4rrow has joined #ruby
mattwashere has joined #ruby
blackmesa has joined #ruby
k3rn31 has joined #ruby
jhack has joined #ruby
GodFather has quit [Quit: Ex-Chat]
GodFather has joined #ruby
jorrin2 has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
dcunit3d has joined #ruby
vqrs has quit [Quit: ZNC 1.6.1 - http://znc.in]
blackmesa has quit [Ping timeout: 276 seconds]
jorrin has quit [Ping timeout: 240 seconds]
ChiefAlexander has quit [Remote host closed the connection]
ChiefAlexander has joined #ruby
jorrin2 has quit [Ping timeout: 264 seconds]
aegis3121 has quit [Quit: Textual IRC Client: www.textualapp.com]
nerium has joined #ruby
roamingdog has joined #ruby
Xiti has quit [Ping timeout: 240 seconds]
wrkrcoop has quit [Ping timeout: 250 seconds]
cdg has quit [Remote host closed the connection]
nerium has quit [Read error: Connection reset by peer]
davedev24 has joined #ruby
davedev24 has quit [Client Quit]
Silthias has quit [Ping timeout: 260 seconds]
jas02 has joined #ruby
dkam has joined #ruby
andikr has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 250 seconds]
wrkrcoop has joined #ruby
whathappens has quit [Quit: Leaving...]
workmad3 has quit [Ping timeout: 252 seconds]
mistermocha has quit [Remote host closed the connection]
symm- has joined #ruby
moos3 has joined #ruby
Dimik has joined #ruby
ramfjord has joined #ruby
mistermocha has joined #ruby
al2o3-cr has quit [Ping timeout: 258 seconds]
hutch34 has joined #ruby
Guest38__ has quit [Read error: Connection reset by peer]
Guest60015 has joined #ruby
RegulationD has joined #ruby
flashpoint9 has joined #ruby
axl_ has joined #ruby
<Guest60015> Hi
mozzarel1 is now known as mozzarella
snath has joined #ruby
<apeiros> hi Guest60015
SCHAAP137 has joined #ruby
dkam has quit [Ping timeout: 264 seconds]
kgrz has joined #ruby
Guest60015 has quit [Remote host closed the connection]
Rickmasta has quit [Ping timeout: 252 seconds]
evansbee has quit [Ping timeout: 260 seconds]
Rickmasta has joined #ruby
craigp has joined #ruby
davedev24 has joined #ruby
whathappens has joined #ruby
arlek has joined #ruby
whathappens has quit [Remote host closed the connection]
bmurt has joined #ruby
sauvin has quit [Read error: Connection reset by peer]
evansbee has joined #ruby
yokel has quit [Ping timeout: 246 seconds]
yokel has joined #ruby
jhack has quit [Quit: jhack]
jhack has joined #ruby
Rickmasta has quit [Ping timeout: 276 seconds]
arlek has quit [Ping timeout: 240 seconds]
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
Rickmasta has joined #ruby
vqrs has joined #ruby
GodFather has quit [Quit: Ex-Chat]
GodFather has joined #ruby
cdg has joined #ruby
omphe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rickmasta has quit [Read error: Connection reset by peer]
aberen has joined #ruby
SilverKey has quit [Quit: Halted.]
dn`_ has joined #ruby
aryaching has joined #ruby
omphe has joined #ruby
Rickmasta has joined #ruby
chopin has joined #ruby
replay has joined #ruby
replay has quit [Max SendQ exceeded]
chopin is now known as Guest67997
replay has joined #ruby
vuoto has joined #ruby
diegoviola has quit [Quit: WeeChat 1.5]
dn` has quit [Ping timeout: 246 seconds]
dn`_ is now known as dn`
vuoto has quit [Client Quit]
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aberen has quit [Ping timeout: 252 seconds]
vuoto has joined #ruby
hahuang62 has joined #ruby
wnd has quit [Excess Flood]
miqlas-H has joined #ruby
wnd has joined #ruby
Rickmasta has quit [Ping timeout: 240 seconds]
SilverKey has joined #ruby
dkam has joined #ruby
Rickmasta has joined #ruby
hahuang62 has quit [Ping timeout: 260 seconds]
yfeldblum has joined #ruby
sp4rrow has joined #ruby
SilverKey has quit [Client Quit]
bmurt has joined #ruby
saneax is now known as saneax_AFK
bluOxigen has joined #ruby
aryaching has quit [Ping timeout: 260 seconds]
kgrz has quit [Ping timeout: 244 seconds]
omphe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
GinoManWorks has joined #ruby
ryan_notabot has quit [Ping timeout: 258 seconds]
ryan_notabot has joined #ruby
cdg has quit [Remote host closed the connection]
dkam has quit [Ping timeout: 276 seconds]
mistermocha has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 272 seconds]
ghoti has left #ruby [#ruby]
jgt has quit [Ping timeout: 260 seconds]
Rickmasta has quit [Ping timeout: 272 seconds]
mistermocha has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
flashpoint9 has joined #ruby
wrkrcoop has quit [Quit: wrkrcoop]
dionysus69 has joined #ruby
Rickmasta has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
nankyokusei has joined #ruby
tubuliferous_ has joined #ruby
gregor3005 has quit [Quit: Leaving.]
mistermocha has quit [Ping timeout: 250 seconds]
iCHAIT_ has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
nankyokusei has quit [Ping timeout: 250 seconds]
yqt has joined #ruby
SilverKey has joined #ruby
tubuliferous_ has quit [Ping timeout: 276 seconds]
Avinty-L_ has joined #ruby
kirun has joined #ruby
jancel has joined #ruby
k3rn31 has quit [Quit: Computer has gone to sleep.]
sid_fules has joined #ruby
helpa has quit [Remote host closed the connection]
Xiti has joined #ruby
gusrub has quit [Quit: Leaving]
helpa has joined #ruby
kraken has joined #ruby
kraken is now known as kraken_
<kraken_> If I'm in a method in ruby, and in a loop, will a return statement break out of the loop and end the method, returning whatever I return, or will if simply break out the loop?
gusrub has joined #ruby
wald0 has joined #ruby
<apeiros> return returns from the current method, regardless of whether you're in a loop o rnot
<apeiros> *or not
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jgt has joined #ruby
norc_ has joined #ruby
jancel has quit [Ping timeout: 260 seconds]
pwnd_nsfw` has quit [Ping timeout: 250 seconds]
pwnd_nsfw has joined #ruby
<kraken_> awesome, thank you
nofxx has quit [Read error: Connection reset by peer]
mattwashere has quit [Remote host closed the connection]
nofxx has joined #ruby
davedev24 has quit []
flowing-farrows has joined #ruby
<apeiros> the return is lexical btw., which means you'll get LocalJump errors if you have a return statement in a block which you execute later/elsewhere (i.e. not in the method from which the return would return)
aryaching has joined #ruby
Ikri has quit [Remote host closed the connection]
flowing-farrows has quit [Client Quit]
iCHAIT_ has left #ruby [#ruby]
Rickmasta has quit [Ping timeout: 260 seconds]
Gasher has quit [Quit: Leaving]
jgt has quit [Ping timeout: 272 seconds]
Gasher has joined #ruby
futilegames has joined #ruby
lacuna has joined #ruby
Rickmasta has joined #ruby
marsjaninzmarsa has quit [Quit: ZNC 1.7.x-git-487-cbf5c38 - http://znc.in]
Ikri has joined #ruby
Avinty-L__ has joined #ruby
marsjaninzmarsa has joined #ruby
dkam has joined #ruby
zeroDi has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
Miron has quit [Quit: bye]
RedNifre has joined #ruby
ChiefAlexander has quit [Quit: Leaving...]
Miron has joined #ruby
bmurt has joined #ruby
<RedNifre> Hi. Still on my quest to get the getontracks rails app running (first time setting up a ruby app on my server!). While it runs now, I have no css because the step where you turn your .css.scss files into .css failed but I don't quite understand the error message. What does this mean?: https://gist.github.com/RedNifre/7132b8da0510aa7f1cf6bbfebe9014a3
<lupine> RedNifre: #rubyonrails might be more help but it looks like a dependency of the project is not installed or not present
<lupine> if you're trying to get a rails application working and it has a Gemfile, i'd suggest looking at packager.io / https://github.com/crohr/pkgr
<RedNifre> That's odd, I thought bundler takes care of missing dependencies?
<lupine> well, if you'r eusing bundling, try prefixing your command with bundle exec
Zai00 has joined #ruby
Avinty-L__ has quit [Read error: Connection reset by peer]
<lupine> my best guess from the error message is that the rack-dev-mark gem isn't being loaded before it's being used
<lupine> this might be because it's not in ruby's load path, or it could be because of some other breakage
<lupine> but in general, running bundle install on production hosts is a terrible idea
<lupine> (hence pkgr, etc)
<RedNifre> I'm trying to install the tracks app which comes with installation instruction: https://github.com/TracksApp/tracks/blob/master/doc/installation.md
<RedNifre> ah, okay...
<RedNifre> what's terrible about it?
lictor36 has quit [Quit: lictor36]
eGGshke has quit [Quit: Leaving...]
<lupine> welcome to a 10-year epic discussion, predating bundler itself
schuuu has joined #ruby
Mia has quit [Read error: Connection reset by peer]
<lupine> tl;dr it's a build-dep and build-deps don't go on production machines
Guest67997 has quit [Ping timeout: 240 seconds]
Avinty-L_ has quit [Read error: Connection reset by peer]
<lupine> for hobbyist stuff it doesn't really matter
balo has quit [Quit: leaving]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
<RedNifre> It's hobbyist stuff, I'm trying to set up a todo list app on my toy server that's sitting at my home.
<lupine> I wouldn't worry about it then
dkam has quit [Ping timeout: 240 seconds]
<RedNifre> well, but why doesn't it work? So it's something about rails?
<shevy> rails has its own channel
banister has joined #ruby
<lupine> config/environments/development.rb references a method that isn't present. it looks like the method *should* come from a gem, so something there is borke
<RedNifre> alright, I'll ask them.
tvw has joined #ruby
aberen has joined #ruby
blackmesa has joined #ruby
SilverKey has quit [Quit: Halted.]
infra-red has joined #ruby
jackjackdripper has joined #ruby
wrkrcoop has joined #ruby
infra-red has quit [Remote host closed the connection]
vuoto_ has joined #ruby
wrkrcoop has quit [Client Quit]
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
vuoto has quit [Remote host closed the connection]
vuoto_ has quit [Remote host closed the connection]
vuoto has joined #ruby
aberen has quit [Ping timeout: 250 seconds]
hahuang62 has joined #ruby
SilverKey has joined #ruby
joonty has joined #ruby
omphe has joined #ruby
omphe has quit [Client Quit]
conta has joined #ruby
wrkrcoop has joined #ruby
Zai00 has quit [Quit: Zai00]
wald0 has quit [Read error: Connection reset by peer]
whathappens has joined #ruby
Rickmasta has quit [Ping timeout: 250 seconds]
ElFerna has joined #ruby
Rickmasta has joined #ruby
dkam has joined #ruby
wald0 has joined #ruby
mtkd has quit [Ping timeout: 250 seconds]
mtkd has joined #ruby
vipinj has quit [Ping timeout: 246 seconds]
norc has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
<shevy> hmmmm
dkam has quit [Ping timeout: 258 seconds]
nick_traveling has joined #ruby
smathy has quit [Read error: Connection reset by peer]
<shevy> can there ever be a situation where one would have "too much documentation" for ruby code? :D
neanderslob has quit [Ping timeout: 252 seconds]
meatchicken has joined #ruby
<meatchicken> What does @@ mean/
<meatchicken> in a class
<meatchicken> class variable?
smathy has joined #ruby
<apeiros> yes
<meatchicken> which means?
<apeiros> and usually you'll not want to use them (most ruby coders do *not* understand fully how they work)
<meatchicken> Shared by all instances of the class/
<meatchicken> Ohh
<meatchicken> Okay
<apeiros> and all descendants
<apeiros> and all instances of all descendants
<apeiros> and <insert long description> included modules
schuuu has quit [Quit: Leaving.]
<apeiros> most ruby coders fail already at "all descendants and instances of descendants"
whathappens has quit [Quit: Leaving...]
<lupine> heh
<apeiros> and most of those remaining (me included) fail at the specifics of "included modules" and/or "order of occurrence in subclasses"
<norc> I failed much earlier than that apeiros.
<lupine> it means "run far from this codebase"
<meatchicken> Lmao got it
dkam has joined #ruby
<apeiros> it'd be reeeal nice if @@vars were just shared among class + its instances
yfeldblum has quit [Ping timeout: 250 seconds]
CJKinni has quit [Read error: Connection reset by peer]
<norc> apeiros: and then there is class instance variables
pwnd_nsfw` has joined #ruby
<norc> apeiros: which is when things get confusing until you explain about the internal object model.
pwnd_nsfw has quit [Ping timeout: 276 seconds]
<apeiros> yes, which - once you got it - means stuff actually gets a lot simpler again :)
CJKinni has joined #ruby
<norc> Indeed.
Regulati_ has joined #ruby
<apeiros> "only modules (and descendants) can have only instance methods - there's no such thing as class methods"
* lupine re-read the ruby style guide last night
<lupine> it's quite funny just how many things have "do not use" next to them
<norc> apeiros: well.. module and classes can have modules.
<norc> But objects cannot. :p
<norc> *methods
<My_Hearing> Are we talking about C++ again? :p
futilegames has quit [Quit: futilegames]
<lupine> but classes are objects
<norc> lupine: RClasses can have modules.
<norc> METHODS
<norc> ffs
<lupine> hehe
edwinvdgraaf has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
<apeiros> norc: what does "have modules" mean?
<norc> apeiros: I meant to say
<norc> apeiros: modules and classes can have methods.
<apeiros> +instance
<norc> apeiros: My itchy finger wants to type module everytime I think method.
<norc> apeiros: there are no "instance" methods under the hood. only methods. ;-)
nick_traveling has quit [Quit: Page closed]
<apeiros> yes. since Class < Module, you can simplify that to "modules and descendants"
<apeiros> norc: um, no?
<norc> fair enough
<apeiros> method is bound
<apeiros> instance method is unbound
<apeiros> and the method definition is unbound
neanderslob has joined #ruby
<norc> huh?
<apeiros> you define a method before you have an object responding to it
edwinvdgraaf has joined #ruby
RegulationD has quit [Ping timeout: 250 seconds]
<apeiros> (object responding to it = bound)
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<norc> huh?
<norc> Which language are we talking about?
<apeiros> def self.… being the exception.
<norc> apeiros: No it is not an exception.
<norc> You just define it on a different class. It is still a very regular method
mdw_ has quit [Quit: Sleeping Zzzzz]
<norc> The only exceptional thing is the syntax by which you do it.
<apeiros> wrt "definition exists without a bound receiver", they are. because a singleton class requires an object to exist a priori
<Lewix> what's the concesus. rspec vs minitest?
<apeiros> they're instance methods too, in that regard they're no exception (which is what you mean, I presume)
<norc> Lewix: whichever you prefer.
<apeiros> Lewix: no consensus
<norc> Next customer please.
<apeiros> Lewix: I prefer minitest
<norc> Lewix: I prefer rspec because I actually threw a coin on my office and rspec won.
<norc> Now Im too lazy to learn minitest.
<norc> (True story)
<apeiros> haha
<apeiros> I prefer minitest because it's much less to learn and much less of a moving target
<Lewix> norc: same here except that rspec won, but I prefer minitest but too lazy to look that way
<apeiros> maybe the latter has been "fixed" by now
<dsimon> i like rspec cause of --fail-fast
<dsimon> though maybe there's a minitest plugin for that now that i think
<lupine> minitest has a spec module
* lupine isn't strongly opinionated, will use whichever one is already there
<Lewix> lupine: and the spec module is very similar to rspec
<lupine> if you're writing your tests well, it doesn't make too much difference
hirvi has quit [Quit: leaving]
dkam has quit [Ping timeout: 252 seconds]
sp4rrow has joined #ruby
smathy is now known as smathy_afk
<norc> apeiros: It is a matter of perspective.
<Lewix> ok i need to get up to speed with minitest. good tutorial out there? (I used to use rspec back in the days)
<norc> apeiros: Internally there are no such things as "Modules" or "Classes" since these are actually ruby objects
<norc> apeiros: Internally you just have an RClass that has a method table. Nothing else.
<norc> But from a Ruby perspective you have a fair point.
<havenwood> <3 Minitest
akahn has joined #ruby
<lupine> I'd love minitest more if it were a bit more stable and *not shipped in stdlib*
elifoster has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<apeiros> norc: sure. my perspective usually is "observable". you could implement the observable behavior in quite a couple of ways :)
<Lewix> lupine: what do you mean
<norc> apeiros: absolutely.
joonty has quit [Quit: This computer has gone to sleep]
<lupine> managing transitions from minitest2 to minitest5 was hard
<shevy> are you jumping PHP style there
<apeiros> norc: it might actually even be interesting how different ruby implementations handle the observable behavior
<Lewix> lupine: rspec has a lot of breaking changes too..over the years
<lupine> sure, and I dislike those too
<apeiros> I'd assume most differences would mostly relate to performance characteristics and/or ease of maintenance
<norc> apeiros: Did you watch chrisseaton's presentation about deoptimization?
<apeiros> no, I have far too little time for all those fun topics :(
<norc> (regarding jruby+truffle)
<Lewix> lupine: anyways, if you have nice links about getting up to speed with minitest please shoot
<havenwood> norc: i enjoyed it
<apeiros> I honestly ponder going 80% after this work project to have more time for fun stuff again
<apeiros> the current situation is rather dissatisfying
<lupine> nothing comes especially to mind
mattwashere has joined #ruby
<norc> havenwood: Though some of the JIT topics were bizarre to me, but then I dont understand JIT all to well.
<norc> Plus I'm a fair beginner with all of this.
<havenwood> norc: Have you checked out his thesis?: http://chrisseaton.com/phd/specialising-ruby.pdf
<norc> But it was really interesting to see someone give a presentation about how things are done in Ruby... that is not in Japanese.
<havenwood> norc: Worth a read!
jas02 has quit [Quit: jas02]
<norc> havenwood: Oh nice. I shall read it next week. :)
<norc> Lewix: bit oudated if you look at the version number
<norc> &ri MiniTest
<`derpy> No results
* norc kicks `derpy and adaedra
edwinvdgraaf has quit [Read error: Connection reset by peer]
edwinvdg_ has joined #ruby
sent-hil has joined #ruby
<adaedra> › ri MiniTest
<adaedra> Nothing known about MiniTest
<adaedra> ¯\_(ツ)_/¯
<norc> Heh.
<havenwood> Lewix: Here's a gist about mocks in Minitest: https://gist.github.com/havenwood/84207afa092ce5d5a680
blackgoat has joined #ruby
<adaedra> For MiniTest I usually base myself on the github readme
conta has quit [Ping timeout: 264 seconds]
fmcgeough has quit [Quit: fmcgeough]
<Lewix> havenwood: thanks
<Lewix> I guess I just learned minitest..
<havenwood> adaedra: speaking of Minitest changes, the T lost its caps
<sent-hil> hello, i'm having trouble with vim-ruby; getting https://gist.github.com/sent-hil/245538f243e2251fa910e387357837e0 whenever i open a ruby file (even empty one); my vimrc is what i use on other computers and not having this problem there: https://github.com/sent-hil/dotfiles-1/blob/master/vim/vimrc.symlink. Using rvm installed ruby (2.1.6), happens on others
<sent-hil> ruby version as well
<adaedra> I tested without the capital, ri is still clueless.
<havenwood> adaedra: but it's a good way to see if an article is up-to-date!
<dsimon> sent-hil, i think this is a vim problem, not a ruby problem
<norc> sent-hil: My first instinct is: rvm is probably an issue.
mercerist has quit [Quit: Computer has gone to sleep.]
<havenwood> norc: haha
<dsimon> cause the errors are vimscript errors
<dsimon> possibly your vim is old?
lightt has joined #ruby
mattwashere has quit [Ping timeout: 246 seconds]
<sent-hil> dsimon: yep :) happens on 7.3, but not 7.4
<chrisseaton> norc: I'm writing a new toy JIT to try to explain how they work - I'll send you a copy when it's done if you DM me and want to give me some feedback?
<sent-hil> dsimon: thanks!
ElFerna has quit [Ping timeout: 240 seconds]
<shevy> wheeeee chrisseaton is at it again!
<lupine> ?
<norc> chrisseaton: I would be thrilled to.
hutch34 has quit [Quit: WeeChat 1.5]
sid_fules has quit [Remote host closed the connection]
sid_fules has joined #ruby
jsownz has quit []
dcunit3d has quit [Ping timeout: 272 seconds]
symm- has quit [Ping timeout: 260 seconds]
postmodern has joined #ruby
Zai00 has joined #ruby
<chrisseaton> i'll ping you when it's ready
mostlybadfly has joined #ruby
mistermocha has joined #ruby
ornerymoose has quit [Quit: ornerymoose]
CrappyDill has joined #ruby
vuoto has quit [Remote host closed the connection]
Yiota has joined #ruby
sid_fules has quit [Remote host closed the connection]
dcunit3d has joined #ruby
edwinvdg_ has quit []
CrappyDill has quit [Quit: Page closed]
dkam has joined #ruby
lightt has quit [Read error: Connection reset by peer]
aberen has joined #ruby
aryaching has quit [Quit: Bye]
aryaching has joined #ruby
SilverKey has quit [Quit: Halted.]
Beverage has quit [Read error: Connection reset by peer]
superlou_ has quit [Read error: Connection reset by peer]
Beverage has joined #ruby
jorrin has joined #ruby
aberen has quit [Ping timeout: 260 seconds]
jorrin has quit [Client Quit]
arajakul has quit [Ping timeout: 244 seconds]
bmurt has joined #ruby
jokke is now known as jogi
jogi is now known as jokke
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Wsewolod has joined #ruby
Beverage has quit [Ping timeout: 250 seconds]
dkam has quit [Ping timeout: 260 seconds]
Rafcio has joined #ruby
<Rafcio> hey guys, in Ruby how can I add 7 days to a date? Rails has helpers but don’t help in plain ruby
smathy_afk is now known as smathy
<havenwood> >> require 'date'; Date.new + 7
<ruby[bot]> havenwood: # => #<Date: -4712-01-08 ((7j,0s,0n),+0s,2299161j)> (https://eval.in/591095)
<dsimon> well, you could convert it to a timestamp and then add 60*60*24*7 seconds
rodfersou has quit [Quit: leaving]
<dsimon> ... or that
<dsimon> that works too
* dsimon slaps his forehead in that memey way
<Rafcio> ok i’ll try requiring date
al2o3-cr has joined #ruby
RedNifre has quit [Quit: ZZ]
Yiota has joined #ruby
roamingdog has quit [Read error: Connection reset by peer]
wrkrcoop has quit [Quit: wrkrcoop]
Yiota has quit [Client Quit]
bruce_lee has quit [Quit: Konversation terminated!]
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sergio_101 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
GinoManWorks has quit [Read error: Connection reset by peer]
aryaching_ has joined #ruby
nankyokusei has joined #ruby
elifoster has joined #ruby
bmurt has joined #ruby
aryaching has quit [Ping timeout: 264 seconds]
ramfjord_ has joined #ruby
Rafcio has quit [Quit: Rafcio]
yfeldblum has joined #ruby
sepp2k has joined #ruby
nankyokusei has quit [Ping timeout: 276 seconds]
ramfjord has quit [Ping timeout: 258 seconds]
mshowman has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
GodFather has quit [Quit: Ex-Chat]
johnmilton has quit [Ping timeout: 240 seconds]
GodFather has joined #ruby
jetpackjoe has quit [Quit: WeeChat 1.5]
roamingdog has joined #ruby
pietr0 has joined #ruby
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pietr0 has quit [Client Quit]
dkam has joined #ruby
allcentury has quit [Ping timeout: 276 seconds]
sesquipedalian has quit [Quit: WeeChat 1.5]
vipinj has joined #ruby
sesquipedalian has joined #ruby
eljimmy has joined #ruby
cdg has joined #ruby
ldnunes has quit [Quit: Leaving]
hirvi has joined #ruby
ur5us has joined #ruby
gnufied__ has joined #ruby
mshowman has joined #ruby
gnufied has quit [Quit: Leaving]
early90spants has joined #ruby
tvw has quit [Remote host closed the connection]
Synthead has quit [Remote host closed the connection]
dkam has quit [Ping timeout: 250 seconds]
<lupine> oh no, i'm missing Nordic Ruby
prestorium has quit [Quit: Leaving]
<shevy> is that ruby in the ice?
<bougyman> ruby with manic depression.
mistermocha has quit [Remote host closed the connection]
arooni has joined #ruby
mistermocha has joined #ruby
cb has quit [Read error: Connection reset by peer]
dionysus69 has quit [Ping timeout: 272 seconds]
jancel has joined #ruby
Zai00 has quit [Ping timeout: 276 seconds]
Synthead has joined #ruby
Zai00 has joined #ruby
CJKinni has quit [Ping timeout: 244 seconds]
nicoulaj has quit [Remote host closed the connection]
swills has quit [Ping timeout: 244 seconds]
cb has joined #ruby
aberen has joined #ruby
arooni has quit [Ping timeout: 250 seconds]
lightt has joined #ruby
aberen has quit [Ping timeout: 250 seconds]
mistermocha has quit [Remote host closed the connection]
slackbotgz has joined #ruby
cbyrda has joined #ruby
beneggett has joined #ruby
vipinj has quit [Ping timeout: 240 seconds]
mattwashere has joined #ruby
mattwashere has quit [Remote host closed the connection]
lightt has quit [Quit: exit()]
dkam has joined #ruby
evansbee has quit [Ping timeout: 246 seconds]
skweek has joined #ruby
r1v3r_ has joined #ruby
r1v3r_ has quit [Client Quit]
aryaching_ has quit [Ping timeout: 244 seconds]
axl_ has quit [Quit: axl_]
GodFather has quit [Remote host closed the connection]
arooni has joined #ruby
GodFather has joined #ruby
c0mrad3 has quit [Quit: Connection closed for inactivity]
iooner has quit [Quit: http://www.iooner.me]
kareeoleez has quit [Remote host closed the connection]
dkam has quit [Ping timeout: 244 seconds]
r1v3r_ has joined #ruby
ur5us has quit [Remote host closed the connection]
kareeoleez has joined #ruby
phoo1234567 has joined #ruby
<miqlas-H> Bye Guys
early90spants has left #ruby [#ruby]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
miqlas-H has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hahuang62 has quit [Ping timeout: 246 seconds]
kareeoleez has quit [Ping timeout: 240 seconds]
mistermocha has joined #ruby
arooni has quit [Ping timeout: 250 seconds]
jancel has quit [Remote host closed the connection]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
r1v3r_ has quit [Quit: ZZZzzz…]
last_staff has quit [Quit: last_staff]
MrBusiness2 has quit [Quit: Leaving]
agent_white has quit [Quit: leaving]
lightt has joined #ruby
ramfjord_ has quit [Ping timeout: 260 seconds]
ramfjord has joined #ruby
[Butch] has quit [Quit: I'm out . . .]
MrBusiness has joined #ruby
snebel has joined #ruby
jenrzzz has joined #ruby
<snebel> may be stupid question but i see it often and i'd like to know...
<snebel> why people extend after require?
<snebel> for exmaple here
augcesar has quit [Quit: Connection closed for inactivity]
<snebel> require processor_count
<snebel> then extend it
jancel has joined #ruby
workmad3 has joined #ruby
<adaedra> require loads the module (here Parallel::ProcessorCount)
<snebel> shouldn't those module methods be available even if you don't extend?
<adaedra> extend actually inserts it into the class
<snebel> mmm
<snebel> but is doing it just below module Parallel
<snebel> sounds like inserting within the same scope isn't it?
mattwashere has joined #ruby
<adaedra> extend inserts the module into the Parallel class
mattwashere has quit [Remote host closed the connection]
<adaedra> it actually uses it
mattwashere has joined #ruby
polishdub has quit [Quit: Leaving]
<adaedra> if you just require it, the module Parallel::ProcessorCount is available but not used; it's like buying a new printer but not plugging it
mattwashere has quit [Client Quit]
<snebel> mmmm
kareeoleez has joined #ruby
snath has quit [Ping timeout: 264 seconds]
<snebel> but in both cases I'd be able to call it and in the same way isn't it?
slackbotgz has quit [Remote host closed the connection]
dcunit3d has quit [Ping timeout: 250 seconds]
mattwashere has joined #ruby
<snebel> Parallel::Procesorcount.method
mattwashere has quit [Client Quit]
<adaedra> But after extend, the methods become available in the scope of Parallel directly, without having to go through Parallel::ProcessorCount
<snebel> ah!
<snebel> that's the trick
<snebel> thanks i got it..
gooba has joined #ruby
<adaedra> >> module A; def foo; puts "hello!"; end; end; module B; extend A; foo; end
<ruby[bot]> adaedra: # => hello! ...check link for more (https://eval.in/591142)
SilverKey has joined #ruby
ramortegui has quit [Remote host closed the connection]
mdw has joined #ruby
mwlang has joined #ruby
<snebel> make sense thanks!
<adaedra> yw
kareeoleez has quit [Ping timeout: 244 seconds]
palms has quit [Ping timeout: 246 seconds]
Hobogrammer has joined #ruby
sent-hil has quit [Quit: Connection closed for inactivity]
dkam has joined #ruby
beneggett has quit [Ping timeout: 244 seconds]
akahn has quit [Quit: Connection closed for inactivity]
dh64 has joined #ruby
hahuang62 has joined #ruby
gnufied__ has quit [Quit: Leaving]
Akuma has quit [Quit: So long sukkas!]
dkam has quit [Ping timeout: 276 seconds]
benzrf_ has joined #ruby
<benzrf_> hey!
<benzrf_> i'm having a really fucking weird issue
KnownSyntax_ has joined #ruby
<benzrf_> an unqualified constant lookup is failing, even though one of the elements of Module.nesting contains a constant by that name
jackjackdripper has quit [Quit: Leaving.]
<benzrf_> the method that this is happening in is included via a module rather than declared directly in the class - could that be an issue?
snebel has quit [Quit: Leaving]
hahuang62 has quit [Ping timeout: 272 seconds]
kareeoleez has joined #ruby
KnownSyntax has quit [Ping timeout: 240 seconds]
vircung has quit [Quit: Oppa, oppa]
aberen has joined #ruby
KnownSyntax_ has quit [Max SendQ exceeded]
<benzrf_> anybody around? :\
iooner has joined #ruby
<toretore> benzrf_: code?
KnownSyntax_ has joined #ruby
sepp2k has quit [Quit: Leaving.]
drahosj has quit [Quit: Konversation terminated!]
phoo1234567 has quit [Quit: Gotta go]
roamingdog has quit [Remote host closed the connection]
kareeoleez has quit [Ping timeout: 260 seconds]
<benzrf_> toretore: uh, give me a minute
Ishido has quit [Remote host closed the connection]
<toretore> if you include a module in an outer module, the inner module won't have access to it
Regulati_ has quit [Remote host closed the connection]
<toretore> * to the included module's constants
aberen has quit [Ping timeout: 240 seconds]
<toretore> or something like that - constant lookup rules are weird and complex
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
<norc> toretore: They are quite simple actually.
<toretore> hah
diegoaguilar has joined #ruby
sp4rrow has joined #ruby
spiette has quit [Quit: :qa!]
KnownSyntax has joined #ruby
KnownSyntax has quit [Changing host]
KnownSyntax has joined #ruby
<benzrf_> managed to make a a more or less minimal example toretore, norc https://gist.github.com/9adb925c41e3ff20be0562df1cd87d64
diegoaguilar has quit [Max SendQ exceeded]
<toretore> benzrf_: yes, that is exactly what i was talking about
nettoweb has joined #ruby
diegoaguilar has joined #ruby
<benzrf_> can you rephrase? i didn't really follow sorry
<toretore> intuitively, it should work, but it won't
<toretore> i'm just saying it doesn't work
<benzrf_> well - why?
KnownSyntax_ has quit [Ping timeout: 240 seconds]
<benzrf_> norc: can you explain this?
<norc> benzrf_: Yes.
<toretore> if you do V = Val; in Mod::Foo it will work
<toretore> or Val = Val
dcunit3d has joined #ruby
Qommand0r has quit [Quit: Exiting...]
<benzrf_> norc: that was an actual request for an explanation, if unclear :(
<norc> benzrf_: I know, Im quite tired and I was just reducing your test case to show.
<norc> benzrf_: https://eval.in/591143
<benzrf_> ah
<benzrf_> looking...
jancel has quit [Remote host closed the connection]
<benzrf_> norc: why does that happen!
elifoster has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Gasher has quit [Ping timeout: 260 seconds]
Qommand0r has joined #ruby
<norc> benzrf_: https://eval.in/591144
<norc> benzrf_: This is why.
mistermocha has quit [Remote host closed the connection]
Synthead has quit [Quit: Synthead]
<norc> benzrf_: If you give me a moment I can give you the exact reason.
Synthead has joined #ruby
<benzrf_> norc: yes, but - M2::C *works*
kareeoleez has joined #ruby
<benzrf_> so if M2 is in the nesting, shouldnt C be found
<benzrf_> or... wait. does the 'constant in scope' check used in lookup not work the same way as 'constant in module' check used when you try to ::
<norc> benzrf_: Looking at the implementation right now before I say anything wrong.
saneax_AFK is now known as saneax
<benzrf_> "it's simple" my butt :D
dfockler has joined #ruby
kareeoleez has quit [Ping timeout: 250 seconds]
dkam has joined #ruby
zeroDi has quit [Quit: WeeChat 1.5]
millerti has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
Madplatypus has joined #ruby
dcunit3d has quit [Ping timeout: 246 seconds]
frem_ has quit [Quit: Connection closed for inactivity]
mistermocha has joined #ruby
nankyokusei has joined #ruby
duderonomy has quit [Quit: Textual IRC Client: www.textualapp.com]
cschneid has quit [Remote host closed the connection]
truenito has joined #ruby
snath has joined #ruby
chipotle has joined #ruby
firstdayonthejob has quit [Ping timeout: 240 seconds]
mistermocha has quit [Ping timeout: 264 seconds]
jpterry has quit [Quit: ZNC Quit]
nankyokusei has quit [Ping timeout: 250 seconds]
rcvalle has quit [Quit: rcvalle]
Guest18897 has quit [Ping timeout: 258 seconds]
r1v3r has joined #ruby
kappy has quit [Quit: Lost terminal]
dudepare has joined #ruby
coyo has quit [Ping timeout: 250 seconds]
<benzrf_> norc: still figuring it out?
jancel has joined #ruby
nick_traveling has joined #ruby
GodFather has quit [Ping timeout: 250 seconds]
Omni_ has joined #ruby
MrBusiness has quit [Ping timeout: 250 seconds]
r1v3r has quit [Quit: Textual IRC Client: www.textualapp.com]
kareeoleez has joined #ruby
dfockler has quit [Quit: Leaving]
<shevy> he fell asleep
snath has quit [Ping timeout: 276 seconds]
<benzrf_> i think i kind of hate ruby[bot]
<benzrf_> *ruby
xall has joined #ruby
jhack has quit [Quit: jhack]
kareeoleez has quit [Ping timeout: 244 seconds]
<norc> benzrf_: Sorry, I actually almost fell asleep. :|
<norc> benzrf_: The thing about constant resolution is two things. Lexical scope and ancestry.
jancel has quit [Remote host closed the connection]
unreal_ has joined #ruby
jnoob22 has quit [Quit: Leaving]
mwlang has quit [Quit: mwlang]
cdg has quit [Remote host closed the connection]
<norc> benzrf_: The thing I cant tell you from the top off my head is why Ruby can actually sometimes find things in an included module - lets ignore this for now.
<norc> benzrf_: In essence what Ruby really does under the hood is recurse the internal representation of rclass and look at its constant table
<norc> (From each rclass to its superclass)
<norc> benzrf_: What you are however trying is to access this by lexical scope - which does not work because an included module is not in lexical scope.
unreal has quit [Ping timeout: 240 seconds]
<benzrf_> yeah, but -
<benzrf_> something the *included* the module, *is* in lexical scope
<norc> no it never is in lexical scope.
<benzrf_> something *that *included* the module, *is* in lexical scope
<norc> No it is not.
Gasher has joined #ruby
<norc> what you mean is this:
coyo has joined #ruby
<norc> >> module A; C = 1; puts C; end
<benzrf_> M2 is in lexical scope
<ruby[bot]> norc: # => 1 ...check link for more (https://eval.in/591167)
<benzrf_> M2 included the module
<norc> benzrf_: ^- that is what you mean.
<benzrf_> therefore, something that included the module is in lexical scope
<norc> Or bad example.
<norc> benzrf_: code example please
<benzrf_> the one you posted
ledestin has joined #ruby
<norc> benzrf_: Yes, but M1 is not in lexical scope!
<norc> You are not seeing it all.
<norc> Include does not "take the code you are seeing and inject it where you have the include"
<benzrf_> i KnownSyntax
<benzrf_> *know
<norc> benzrf_: That last bit is kinda important. :P
<benzrf_> but M2::C works
<benzrf_> so -
<benzrf_> is there different code that checks if "M2 has C" in M2::C than in the eval.in
<benzrf_> that is to say - in the posted code, at some point ruby checks whether there is a 'C' in M2, since M2 is in lexical scope. when it does so - it does it differently from when it looks for C in M2 while evaluating the expression M2::C?
blackmesa has quit [Ping timeout: 250 seconds]
rkoller has quit [Quit: Textual IRC Client: www.textualapp.com]
kareeoleez has joined #ruby
jpterry has joined #ruby
DroidBurgundy has quit []
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
<norc> benzrf_: Okay I just brushed up on how ruby actually includes modules.
roamingdog has joined #ruby
kareeoleez has quit [Ping timeout: 246 seconds]
kobain has quit [Ping timeout: 260 seconds]
toretore has quit [Ping timeout: 264 seconds]
whiteline has quit [Remote host closed the connection]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
[reed] has joined #ruby
whiteline has joined #ruby
aberen has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
<benzrf_> norc: and?
<kraken_> This is driving me crazy: I'm building a binary tree, and I'm retrieving a node using the depth first search, and it appears that I'm retrieving the right node based on the value, but the object id's are different. Is this due to something I'm messing up, or is it a functino of ruby?
<norc> benzrf_: Let's stop talking about lexical scope because that is a bit confusing.
SirOliver has joined #ruby
<norc> benzrf_: In a nutshell the lookup just "look at current class if it has it, if not check next class"
<norc> *next superclass
<benzrf_> norc: no, hold on.
RegulationD has joined #ruby
<norc> benzrf_: just stick with me.
aberen has quit [Ping timeout: 240 seconds]
<benzrf_> *this* works https://eval.in/591172
biberu has quit []
queequeg2 has quit [Ping timeout: 250 seconds]
opentux has quit [Quit: Leaving.]
<norc> benzrf_: ruby has internal pointers for lexical scope.
<benzrf_> i don't know what that means
dcunit3d has joined #ruby
<benzrf_> but regardless -
swills has joined #ruby
<norc> benzrf_: inside your M3 ruby keeps a pointer that says "nd_class" and one that says "nd_next"
<benzrf_> clearly what's happening is that in the version i just linked, ruby says "ok yes there's a C in M2, so let's return that"
<norc> benzrf_: Now if you nest modules, then nd_next will point at the outer one.
<benzrf_> while in the failing version, ruby says "no, there is not a C in M2"
<benzrf_> *BUT*, "M2::C" will work in *either* case
<benzrf_> am i wrong?
<norc> benzrf_: fully qualified constants will work yes.
<norc> benzrf_: then it just looks for M2
evansbee has joined #ruby
<norc> after that it will follow however you specified them
<benzrf_> stop
<benzrf_> in either case M2::C works - but in one case, ruby thinks there is no C in M2
<norc> No!
<norc> If you specify "C" it can only either a) check in lexical scope, or follow super classes.
<norc> Include does not give you lexical access!
<norc> Let me provide an accurate example that demonstrates this.
<benzrf_> no, i understand what is happening
<benzrf_> you don
<benzrf_> you don't understand what i'm asking
<norc> benzrf_: https://eval.in/591179
RegulationD has quit [Ping timeout: 260 seconds]
<benzrf_> sorry, i'm being abrasive - let me try to be less of a dick
<norc> benzrf_: This is what you are doing effectively.
<benzrf_> norc: no, because:
hahuang62 has joined #ruby
<benzrf_> wait, what?
<benzrf_> no, one second
<norc> It is exactly that!
<benzrf_> no it isn't
<benzrf_> hold on!
<norc> This is not a problem about constants, its about lexical scope!
<benzrf_> 19:46 < benzrf_> *this* works https://eval.in/591172
pawnbox has joined #ruby
<norc> benzrf_: yes you are in the same lexical scope!
<norc> well
<norc> actually
<benzrf_> you are *not* in the same lexical scope
<norc> That is nested lexical scope
kareeoleez has joined #ruby
<norc> Which for the purpose of this discussion is the same.
<norc> for example
<norc> actually that is the example. :P
mdw has quit [Quit: Sleeping Zzzzz]
<norc> But it is more obvious if you do not reopen the module.
<benzrf_> i am 90% sure i understand exactly what is going on, but i don't think i've managed to get across what i'm trying to say
<benzrf_> so please, listen for a moment
agentmeerkat has quit [Ping timeout: 260 seconds]
evansbee has quit [Ping timeout: 240 seconds]
<benzrf_> in the example i just linked, when it looks up "C" on line 8 -
__ian__r has joined #ruby
<__ian__r> ?
<benzrf_> it initially proceeds by travelling up the chain of modules that line 8 is lexically contained within
<benzrf_> then it tests if each one has 'C'
<norc> No it does not travel the chain of modules.
<norc> It travels the chain of lexical scope.
<benzrf_> "lexical scope" refers to scope that is lexical
ur5us has joined #ruby
<benzrf_> this is not lexical
queequeg1 has joined #ruby
Zai00 has quit [Quit: Zai00]
<norc> This is lexical.
<benzrf_> unless you identify modules with scopes
<norc> They are identified with scope.
Zai00 has joined #ruby
Zai00 has quit [Client Quit]
<benzrf_> then why did you say it doesnt travel the chain of modules?
<benzrf_> if modules are identified with scopes, travelling the chain of modules is the same thing as travelling the chain of scopes
<norc> it could be classes too?
agentmeerkat has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
<norc> do not think of them as modules or classes
<norc> its a lexical issue
<benzrf_> i've been using 'module' this whole time to mean 'either module or class'
kareeoleez has quit [Ping timeout: 250 seconds]
<norc> fair enough
<benzrf_> if modules are identified with scopes, travelling the chain of modules is the same thing as travelling the chain of scopes
<benzrf_> so why is it wrong tosay that it travels the chain of modules?
kirun has quit [Remote host closed the connection]
<norc> benzrf_: because its shit when you suddenly define methods.
<norc> because then its "travelling the chain of moduels and method definitions"
<norc> which is just a cumbersume way of saying "lexical scope"
<norc> its shit when you have blocks inside your class bodies.
hahuang62 has quit [Ping timeout: 260 seconds]
<benzrf_> i never mentioned modules
<norc> benzrf_: Im just saying.
startupality has joined #ruby
<benzrf_> ok, but saying "No it does not travel the chain of modules." is extremely misleading
<benzrf_> it sounds like you're disagreeing with what i mean, not with my choice of words
<norc> benzrf_: https://eval.in/591182
<norc> Fair enough.
<norc> Either way.
<benzrf_> that is the precise behaior i would expect
<benzrf_> i don't know why you're showing me this
<norc> benzrf_: It was an example to show that it recurses lexical scope.
ur5us has quit [Ping timeout: 240 seconds]
<benzrf_> 19:53 < benzrf_> it initially proceeds by travelling up the chain of modules that line 8 is lexically contained within
<norc> you start from inside a lambda
<benzrf_> "the chain of modules the line 8 *is lexically contained within*"
<benzrf_> please read what i'm writing!