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>
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]
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]
<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
<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]
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
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?
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?
<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
<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#== ?
<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?
<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…]
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
<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"
<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: 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.
<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 :)
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>
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*
<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
<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>
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?
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.