<centrx>
There is nothing really concise for rows.is_a?(Hash)
<BubonicPestilenc>
hm...
<centrx>
No special operator
<centrx>
Idiomatic Ruby might use a case statement
<centrx>
Ruby favors clarity
<centrx>
Though your description of it was actually different from the code you pasted
<centrx>
From your description, it could just be:
<BubonicPestilenc>
it's slightly different =P
<BubonicPestilenc>
following your code, it should look like: rows || (rows === Hash && [rows]) || []
<BubonicPestilenc>
but
toastynerd has joined #ruby-lang
znz_jp has quit [Quit: kill -QUIT $$]
<centrx>
yes, exactly
<BubonicPestilenc>
if rows initially is a hash, OR won't be ran :)
<BubonicPestilenc>
p.s. isn't it sshould be Hash === rows?
viscera has quit [Quit: viscera]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<BubonicPestilenc>
wow, funny behaviour
LMity has joined #ruby-lang
<BubonicPestilenc>
i never thought that ruby will return last expression of (a && b) instead of true|false
znz_jp has joined #ruby-lang
<BubonicPestilenc>
centrx:
<BubonicPestilenc>
(Hash === x && [x]) || (x || [])
<BubonicPestilenc>
this is working way, ty for idea
apeiros has joined #ruby-lang
<centrx>
It is reliable to return things for true, because anything that would be returned is truthy
<centrx>
Only false and nil are falsy
<BubonicPestilenc>
yeah, but if you do in php or java, it will typecase result to boolean :)
<BubonicPestilenc>
*typecast
knu has quit [Ping timeout: 252 seconds]
<centrx>
PHP type system is messed up, so it probably wouldn't work with PHP
mdub has quit [Read error: Connection reset by peer]
<BubonicPestilenc>
You got what i meant :)
woollyams has joined #ruby-lang
<centrx>
Yeah
canton7 has joined #ruby-lang
knu has joined #ruby-lang
<centrx>
Python and Perl are more similar to Ruby in this respect,
charliesome has joined #ruby-lang
knu has quit [Ping timeout: 252 seconds]
woollyams has quit [Ping timeout: 252 seconds]
solars has joined #ruby-lang
yann_ck has joined #ruby-lang
woollyams has joined #ruby-lang
knu has joined #ruby-lang
<BubonicPestilenc>
centrx: can i ask additional stupid question? )
<centrx>
Sure
tonni has quit [Remote host closed the connection]
<BubonicPestilenc>
i have input array (from remote API server) which gives me hash, containing: 15 static fields(string/int/float), 1 hash, 1 array of hashes
<BubonicPestilenc>
i want to separate this data into 2 variables: (with static + hash converted to static) + (array of rowsets)
<BubonicPestilenc>
and question: should i copy 1 by 1, like: newHash = { var1: remoteHash[var1], var2: remoteHash[var2], varN: removeHash[varN] }
<BubonicPestilenc>
or there is another approach for such tasks?
<BubonicPestilenc>
yeah, extract is what i'm looking for :)
LMity2 has quit [Ping timeout: 255 seconds]
kitak_ has joined #ruby-lang
ndrst has joined #ruby-lang
kitak has quit [Read error: Connection reset by peer]
sdouglas has quit [Remote host closed the connection]
sdouglas has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
francisfish has joined #ruby-lang
tea-boy_ has quit [Read error: Connection reset by peer]
tea-boy has joined #ruby-lang
sdouglas has quit [Ping timeout: 255 seconds]
phansch has quit [Quit: WeeChat 0.4.2]
francisfish has quit [Ping timeout: 240 seconds]
Jeticus has quit [Ping timeout: 246 seconds]
heftig has joined #ruby-lang
|jemc| has quit [Read error: Operation timed out]
CaptainJet has joined #ruby-lang
tonni has joined #ruby-lang
nertzy3 has joined #ruby-lang
CaptainJet has quit [Read error: Connection reset by peer]
vondruch has joined #ruby-lang
danijoo has joined #ruby-lang
CaptainJet has joined #ruby-lang
caral has joined #ruby-lang
CaptainJet has quit [Client Quit]
centrx has quit [Quit: All this computer hacking is making me thirsty]
DEac- has quit [Read error: Connection reset by peer]
DEac- has joined #ruby-lang
LMity has quit [Ping timeout: 240 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
marr has joined #ruby-lang
joonty has quit [Quit: WeeChat 0.4.2]
qba73 has joined #ruby-lang
elia has joined #ruby-lang
riffraff has joined #ruby-lang
LMity2 has joined #ruby-lang
joonty has joined #ruby-lang
francisfish has joined #ruby-lang
woollyams has quit [Ping timeout: 252 seconds]
c_s_g has joined #ruby-lang
jason_ has joined #ruby-lang
alex-quiterio has joined #ruby-lang
<ddfreyne>
How does Thread#raise work? Does the thread stop executing and just raise an exception? That seems like a weird mechanism to me...
arBmind has quit [Ping timeout: 255 seconds]
jason_ has quit [Ping timeout: 246 seconds]
<ddfreyne>
(I'm investigating this because I want to handle execptiosn on all threads in this case)
mikecmpbll has joined #ruby-lang
<ddfreyne>
Aha: Ruby's Thread#raise, Thread#kill, and the timeout.rb standard library based on them are inherently broken and should not be used for any purpose.
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
banister has joined #ruby-lang
mbj has left #ruby-lang [#ruby-lang]
francisfish has joined #ruby-lang
yfeldblum has quit [Ping timeout: 255 seconds]
vlad_sta_ has joined #ruby-lang
Speed has quit [Ping timeout: 240 seconds]
kgrz has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 240 seconds]
skade has joined #ruby-lang
caral has joined #ruby-lang
caral has quit [Client Quit]
charliesome has joined #ruby-lang
<sluukkonen>
ddfreyne: yeah, especially on jruby
<sluukkonen>
killing a thread on the jvm isn't as simple as it sounds
elia has quit [Ping timeout: 240 seconds]
mehlah has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mehlah has quit [Client Quit]
nertzy3 has quit [Quit: This computer has gone to sleep]
kgrz has joined #ruby-lang
yfeldblum has joined #ruby-lang
workmad3 has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
workmad3 has joined #ruby-lang
workmad3 has quit [Client Quit]
Speed has joined #ruby-lang
cored has joined #ruby-lang
yfeldblum has quit [Ping timeout: 265 seconds]
workmad3 has joined #ruby-lang
mehlah has joined #ruby-lang
vlad_sta_ has quit []
workmad3_ has joined #ruby-lang
cored has quit [Ping timeout: 240 seconds]
workmad3 has quit [Quit: leaving]
workmad3 has joined #ruby-lang
workmad3_ has quit [Client Quit]
workmad3 has quit [Client Quit]
stamina has joined #ruby-lang
cored has joined #ruby-lang
diegoviola has quit [Quit: WeeChat 0.4.3]
cored has quit [Ping timeout: 252 seconds]
banister has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
tea-boy has quit [Ping timeout: 240 seconds]
zastern has joined #ruby-lang
tea-boy has joined #ruby-lang
jds has joined #ruby-lang
cored has joined #ruby-lang
kukyakya has joined #ruby-lang
kukyakya has quit [Remote host closed the connection]
woollyams has quit [Ping timeout: 252 seconds]
viscera has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
woollyams has joined #ruby-lang
sdouglas has joined #ruby-lang
yfeldblum has joined #ruby-lang
yfeldblum has quit [Read error: Connection reset by peer]
lolmaus has joined #ruby-lang
francisfish has joined #ruby-lang
araujo has joined #ruby-lang
ur5us has joined #ruby-lang
toretore has joined #ruby-lang
elia has joined #ruby-lang
yalue has joined #ruby-lang
ur5us has quit [Ping timeout: 240 seconds]
rofel has quit [Quit: Leaving...]
<ddfreyne>
sluukkonen: yup.
<ddfreyne>
I was getting a bit wary about recommendations for Thread.main.raise
jacky has quit [Excess Flood]
<ddfreyne>
Other question: should custom exception classes inherit from StandardError or RuntimeError?
<ddfreyne>
I usually use StandardError, but I don't understand the different between the two.
<gnufied>
ddfreyne: I use StandardError
<gnufied>
my reasoning being RuntimeError seems like for specific purpose
<ddfreyne>
RuntimeError feels like a "I was too lazy to create a proper exception class" to me
<yorickpeterse>
ddfreyne: StandardError
<gnufied>
A generic error class raised when an invalid operation is attempted.
<ledestin>
RuntimeError < StandardError
<yorickpeterse>
class DdfreyneError < StandardError; end
<yorickpeterse>
(enjoy typing that)
<ddfreyne>
That is what I've been doing all along.
BubonicPestilenc has quit [Quit: BubonicPestilenc]
<ddfreyne>
But I just don't know *why* :)
<ddfreyne>
The documentation is pretty unclear on the difference.
<ddfreyne>
“Programs may make subclasses of Exception, typically of StandardError or RuntimeError, to provide custom classes and add additional information. ”
<ddfreyne>
Even the documentation is confused about the difference.
<ddfreyne>
“It is recommended that a library should have one subclass of StandardError or RuntimeError and have specific exception types inherit from it.”
<yorickpeterse>
whitequark: it's amazingly....accurate for me
<yorickpeterse>
I quote:
<yorickpeterse>
"Startup suggestion #1: use multiple indistinguishable date formats in your Ruby so you can Smalltalk while Rubying"
<yorickpeterse>
Still need to set up the actual bot for this
yfeldblum has joined #ruby-lang
miqui has joined #ruby-lang
yfeldblum has quit [Ping timeout: 255 seconds]
jgpawletko has joined #ruby-lang
Coincidental has quit [Remote host closed the connection]
jperry has quit [Remote host closed the connection]
jperry has joined #ruby-lang
viscera has quit [Quit: viscera]
tkuchiki has joined #ruby-lang
ledestin has quit [Quit: ledestin]
johnpcla_ has joined #ruby-lang
johnpcla_ has quit [Read error: Connection reset by peer]
johnpcla_ has joined #ruby-lang
johnpcla_ has quit [Read error: Connection reset by peer]
mrwooh333 has joined #ruby-lang
johnpcla_ has joined #ruby-lang
johnpcla_ has quit [Read error: Connection reset by peer]
shinnya has joined #ruby-lang
johnpcla_ has joined #ruby-lang
johnpcla_ has quit [Read error: Connection reset by peer]
johnpcla_ has joined #ruby-lang
ledestin has joined #ruby-lang
johnpcla_ has quit [Read error: Connection reset by peer]
zlogan has quit [Ping timeout: 246 seconds]
emaxi has joined #ruby-lang
zlogan has joined #ruby-lang
ledestin has quit [Client Quit]
ledestin has joined #ruby-lang
johnpcla_ has joined #ruby-lang
johnpcl__ has joined #ruby-lang
johnpcla_ has quit [Read error: Connection reset by peer]
alexju has joined #ruby-lang
johnpcl__ has quit [Read error: Connection reset by peer]
johnpcla_ has joined #ruby-lang
johnpcl__ has joined #ruby-lang
johnpc___ has joined #ruby-lang
johnpcla_ has quit [Ping timeout: 240 seconds]
viscera has joined #ruby-lang
johnpc___ has quit [Read error: Connection reset by peer]
johnpcl__ has quit [Ping timeout: 240 seconds]
johnpcla_ has joined #ruby-lang
whitecrow1 has quit [Quit: Leaving]
enebo has joined #ruby-lang
johnpcla_ has quit [Read error: Connection reset by peer]
johnpcl__ has joined #ruby-lang
johnpcl__ has quit [Read error: Connection reset by peer]
rahul_j has quit [Quit: rahul_j]
AncientAmateur has joined #ruby-lang
rolfb has joined #ruby-lang
vondruch has quit [Ping timeout: 240 seconds]
Technodrome has joined #ruby-lang
emaxi has quit [Remote host closed the connection]
cored has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby-lang
emaxi has joined #ruby-lang
Cakey has joined #ruby-lang
cored has joined #ruby-lang
caral has joined #ruby-lang
johnpcla_ has joined #ruby-lang
nathanstitt has joined #ruby-lang
mib_mib has joined #ruby-lang
johnpcl__ has joined #ruby-lang
mbj has joined #ruby-lang
mib_mib has quit [Remote host closed the connection]
emaxi has quit [Ping timeout: 252 seconds]
<mbj>
whitequark: I think begin nodes with only one child, as parsed by your parser, can savely be optimized away? Would you accept a PR the does this?
yfeldblum has quit [Ping timeout: 265 seconds]
mrwooh333 has quit [Ping timeout: 246 seconds]
johnpcla_ has quit [Read error: Operation timed out]
tkuchiki has quit [Remote host closed the connection]
vondruch has joined #ruby-lang
kgrz has quit [Remote host closed the connection]
kgrz has joined #ruby-lang
dik_dak has joined #ruby-lang
loincloth has joined #ruby-lang
t4nk925 has joined #ruby-lang
AncientAmateur has quit [Remote host closed the connection]
t4nk925 has left #ruby-lang [#ruby-lang]
AncientAmateur has joined #ruby-lang
francisfish has joined #ruby-lang
Lewix has joined #ruby-lang
kgrz has quit [Ping timeout: 252 seconds]
saarinen has joined #ruby-lang
elia has quit [Read error: Operation timed out]
gix has quit [Ping timeout: 240 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shinnya has quit [Ping timeout: 240 seconds]
emaxi has joined #ruby-lang
mib_mib has quit [Remote host closed the connection]
khaase has joined #ruby-lang
khaase has joined #ruby-lang
gix has joined #ruby-lang
charliesome has joined #ruby-lang
AncientAmateur has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
emaxi has quit [Ping timeout: 252 seconds]
AncientAmateur has joined #ruby-lang
emaxi has joined #ruby-lang
johnpcl__ has quit [Ping timeout: 252 seconds]
matp has joined #ruby-lang
elia has joined #ruby-lang
tbuehlmann has joined #ruby-lang
LMity has joined #ruby-lang
caral has quit [Quit: caral]
viscera has quit [Ping timeout: 252 seconds]
ledestin has quit [Ping timeout: 255 seconds]
ledestin has joined #ruby-lang
simono has joined #ruby-lang
LMity has quit [Ping timeout: 255 seconds]
vondruch_ has joined #ruby-lang
Technodrome has quit [Quit: Technodrome]
vondruch has quit [Ping timeout: 246 seconds]
viscera has joined #ruby-lang
blurredbits has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 255 seconds]
cored has quit [Ping timeout: 240 seconds]
kitak has joined #ruby-lang
yfeldblum has joined #ruby-lang
cored has joined #ruby-lang
t4nk166 has joined #ruby-lang
t4nk166 has left #ruby-lang [#ruby-lang]
toastynerd has joined #ruby-lang
yfeldblum has quit [Ping timeout: 265 seconds]
viscera has quit [Quit: viscera]
tea-boy_ has joined #ruby-lang
enebo has quit [Quit: enebo]
tea-boy has quit [Ping timeout: 252 seconds]
mib_mib has joined #ruby-lang
Technodrome has joined #ruby-lang
Technodrome has quit [Changing host]
Technodrome has joined #ruby-lang
mistym has joined #ruby-lang
yann_ck has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
heftig has quit [Quit: Quitting]
kgrz has joined #ruby-lang
mistym has quit [Remote host closed the connection]
|jemc| has joined #ruby-lang
kgrz has quit [Ping timeout: 240 seconds]
xiella has left #ruby-lang ["Leaving"]
tea-boy_ has quit [Read error: Connection reset by peer]
enebo has joined #ruby-lang
yfeldblum has joined #ruby-lang
solars has quit [Ping timeout: 240 seconds]
sdouglas has quit [Remote host closed the connection]
sdouglas has joined #ruby-lang
robbyoconnor has joined #ruby-lang
benlovell has joined #ruby-lang
sdouglas has quit [Ping timeout: 240 seconds]
mistym has joined #ruby-lang
rahul_j has joined #ruby-lang
VTLob has joined #ruby-lang
rahul_j has quit [Client Quit]
tbuehlmann has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
sdouglas has joined #ruby-lang
saarinen has quit [Quit: saarinen]
phansch has quit [Quit: WeeChat 0.4.2]
chouhoul_ has joined #ruby-lang
alekst has joined #ruby-lang
zlogan has quit [Ping timeout: 240 seconds]
robbyoconnor has quit [Ping timeout: 240 seconds]
robbyoconnor has joined #ruby-lang
chouhoul_ has quit [Read error: Connection reset by peer]
chouhoul_ has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
chouhoulis has quit [Ping timeout: 240 seconds]
cnivolle has quit []
emaxi has quit [Remote host closed the connection]
rippa has joined #ruby-lang
benlovell has quit [Quit: Lost terminal]
emaxi_ has joined #ruby-lang
caral has joined #ruby-lang
r0bby has joined #ruby-lang
<whitequark>
mbj: they have location info
r0bby has quit [Client Quit]
caral has quit [Client Quit]
<mbj>
whitequark: Apart from locations there is no semantics they cover? (So I do not cause harm with ignoring them when dealing with ruby semantics)?
<mbj>
whitequark: I agree they should not be optimized away. Just learning if I'm doing something dump when interpreting the AST with those kinds removed.
<mbj>
whitequark: So if im not interested in location info. And I strip begin nodes with one child away (using the child instead), I do not loose semantics?
<mbj>
thats how I understand it currently, but I wanted an external opinon.
robbyoconnor has quit [Ping timeout: 252 seconds]
mib_mib has quit [Remote host closed the connection]
arBmind has quit [Quit: Leaving.]
dwknoxy has joined #ruby-lang
rahul_j has joined #ruby-lang
tonni has quit [Remote host closed the connection]
charlies_ has joined #ruby-lang
francisfish has quit [Ping timeout: 252 seconds]
francisfish has joined #ruby-lang
charliesome has quit [Ping timeout: 240 seconds]
jgpawletko has quit [Read error: Connection reset by peer]
Cakey has quit [Ping timeout: 255 seconds]
Cakey has joined #ruby-lang
thrillagorilla has joined #ruby-lang
<yorickpeterse>
Today I fight date formats
RobertBirnie has joined #ruby-lang
sdouglas has quit [Remote host closed the connection]
<yorickpeterse>
because herp derp lets use different ones that require you to sift through 5 pages to figure out the format
<yorickpeterse>
except they can change per page too
apeiros has quit [Remote host closed the connection]
znz_jp has quit [Quit: kill -QUIT $$]
apeiros has joined #ruby-lang
RobertBirnie has quit [Ping timeout: 252 seconds]
<darix>
yorickpeterse: just force usage of iso date/time format
<darix>
problem solved
<darix>
imho it should be use for everything. logfiles and so on
znz_jp has joined #ruby-lang
emaxi_ has quit [Remote host closed the connection]
emaxi has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
apeiros has quit [Ping timeout: 240 seconds]
robmiller has joined #ruby-lang
mib_mib has joined #ruby-lang
<whitequark>
mbj: apart from location there's no function they serve.
<whitequark>
kwbegin, as well.
kgrz has joined #ruby-lang
emaxi has quit [Ping timeout: 240 seconds]
dagobah has quit [Quit: Leaving...]
nathanstitt has joined #ruby-lang
<mbj>
whitequark: thx. As expected.
mykoweb has quit [Remote host closed the connection]
__butch__ has joined #ruby-lang
kgrz has quit [Ping timeout: 255 seconds]
vtonkovich has joined #ruby-lang
AncientAmateur has quit [Remote host closed the connection]
khaase has quit [Remote host closed the connection]
<Technodrome>
is an empty array in ruby evaluate to true in a conditional?
__butch__ has quit [Client Quit]
<robmiller>
Technodrome: yes
__butch__ has joined #ruby-lang
<Technodrome>
blah
<Technodrome>
so best way if i want a boolean out of it, is to just use the .empty? right?
<darix>
Technodrome: everything is "true" besides nil and false
<Technodrome>
i keep forgetting this
<darix>
Technodrome: well it depends on what your conditional should describe
<darix>
if empty array means dont continue
<darix>
then yes
<Technodrome>
yes
<Technodrome>
empty means don't continue
<Technodrome>
if not @some.empty? did the trick
<Technodrome>
thanks
qba73 has quit []
Cakey has quit [Ping timeout: 252 seconds]
<darix>
Technodrome: unless @some.empty?
RobertBirnie has joined #ruby-lang
toastynerd has joined #ruby-lang
<Technodrome>
yes that too darix
bjh13 has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
chouhoul_ has quit [Remote host closed the connection]
chouhoulis has joined #ruby-lang
mistym has quit [Remote host closed the connection]
mistym has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
rue_XIW has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
rofel has joined #ruby-lang
sdouglas has joined #ruby-lang
rue|w has quit [Ping timeout: 240 seconds]
mistym has quit [Ping timeout: 246 seconds]
pixelhandler has joined #ruby-lang
Technodrome has quit [Quit: Technodrome]
charlies_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sferik has joined #ruby-lang
saarinen has joined #ruby-lang
michaeldeol has joined #ruby-lang
saarinen has quit [Client Quit]
nathanstitt has joined #ruby-lang
emaxi has joined #ruby-lang
Technodrome has joined #ruby-lang
dstynchula has joined #ruby-lang
michaeldeol has quit [Client Quit]
sferik has quit [Ping timeout: 252 seconds]
canton7-mac has quit [Remote host closed the connection]
jgpawletko has joined #ruby-lang
apeiros has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
sdouglas has quit [Remote host closed the connection]
saarinen has joined #ruby-lang
sdouglas has joined #ruby-lang
Cakey has joined #ruby-lang
amsi has joined #ruby-lang
AncientAmateur has joined #ruby-lang
emaxi has quit [Remote host closed the connection]
emaxi has joined #ruby-lang
sdouglas has quit [Ping timeout: 252 seconds]
AncientAmateur has quit [Ping timeout: 246 seconds]
mikecmpbll has quit [Read error: Operation timed out]
elia has quit [Read error: Operation timed out]
emaxi has quit [Ping timeout: 252 seconds]
yfeldblum has quit [Remote host closed the connection]
Cakey has quit [Ping timeout: 240 seconds]
hahuang65 has joined #ruby-lang
vsorlov has joined #ruby-lang
jgpawletko_ has joined #ruby-lang
havenwood has joined #ruby-lang
ascarter has joined #ruby-lang
ascarter has quit [Max SendQ exceeded]
vtonkovich has quit [Remote host closed the connection]
ascarter has joined #ruby-lang
wallerdev has joined #ruby-lang
stamina has quit [Quit: WeeChat 0.4.3]
jgpawletko has quit [Quit: jgpawletko]
jgpawletko_ is now known as jgpawletko
alexju has quit [Read error: Connection reset by peer]
<centrx>
cout, Either that or something else in Process
|jemc| has joined #ruby-lang
<centrx>
cout, Also, you can always run a shell command with #system
<centrx>
(renice)
<cout>
centrx: yes, that's what I was looking for, thanks
havenwood has quit []
<cout>
I thought about renice but it seemed like the wrong solution
lcdhoffman has joined #ruby-lang
pixelhandler has quit [Quit: pixelhandler]
Paradoxic is now known as prdx
kgrz has quit [Ping timeout: 240 seconds]
threeifbywhiskey has joined #ruby-lang
cnivolle has quit [Remote host closed the connection]
agarie has quit [Remote host closed the connection]
nathanstitt has quit [Quit: I growing sleepy]
JohnBat26 has quit [Ping timeout: 240 seconds]
cnivolle has joined #ruby-lang
threeifbywhiskey has left #ruby-lang ["Leaving"]
nathanstitt has joined #ruby-lang
yalue has quit [Quit: Leaving]
[spoiler] has quit [Quit: Leaving]
yfeldblum has quit [Read error: Operation timed out]
tonni has joined #ruby-lang
swills` has joined #ruby-lang
ItSAN____ has joined #ruby-lang
vsorlov has joined #ruby-lang
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
yfeldblum has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 252 seconds]
jgpawletko has quit [Quit: jgpawletko]
jhass is now known as jhass|off
vlad_starkov has joined #ruby-lang
AncientA_ has quit [Remote host closed the connection]
jtoy_ has joined #ruby-lang
`micro_ has joined #ruby-lang
Muz_ has joined #ruby-lang
michael_imac has joined #ruby-lang
AncientAmateur has joined #ruby-lang
emaxi has quit [Remote host closed the connection]
FastJack_ has joined #ruby-lang
aef_ has joined #ruby-lang
glide has joined #ruby-lang
sdouglas has joined #ruby-lang
<glide>
Hi all, what does the * do in def meth(*args) ?
paul__k has joined #ruby-lang
lguardiola has joined #ruby-lang
aef has quit [*.net *.split]
ItSANgo__ has quit [*.net *.split]
FiXato has quit [*.net *.split]
FastJack has quit [*.net *.split]
lguardiola_ has quit [*.net *.split]
paul_k has quit [*.net *.split]
m4t- has quit [*.net *.split]
`micro has quit [*.net *.split]
jtperreault has quit [*.net *.split]
go|dfish has quit [*.net *.split]
jtoy has quit [*.net *.split]
lupine has quit [*.net *.split]
swills has quit [*.net *.split]
Muz has quit [*.net *.split]
michael_mbp has quit [*.net *.split]
dfr|work has quit [*.net *.split]
FastJack_ is now known as FastJack
lupine_85 has joined #ruby-lang
MichD is now known as michd
<|jemc|>
glide: it's called the "splat" operator
<|jemc|>
it does some slightly different things depending on where its used
jhass|off is now known as jhass
<|jemc|>
and you should read about those things, but in this case
lupine_85 is now known as lupine
<glide>
jemc: thanks. It makes it so multiple values are accepted, and they become an array?
<|jemc|>
it collects all the arguments passed to meth into an array named args
<glide>
Ok, cool :)
<|jemc|>
yes
<|jemc|>
it's a really nifty thing to have under your belt, so be sure to read about the other uses as well
<|jemc|>
also, read about the keyword-argument equivalent, **
<glide>
jemc: I'm a beginner. How do you recommend I learn all the ins and outs? Should I just print out of the documentation and review all of it? should I just program as much as possible and learn by doing?
<|jemc|>
honestly, the body of ruby-the-language documentation isn't that great or approachable
<|jemc|>
often the best info for beginners in ruby would be in blogs and in books
vsorlov has quit [Ping timeout: 240 seconds]
<|jemc|>
although in both cases, you have to be wary of old information
emaxi has joined #ruby-lang
<glide>
Ok, so the ** returns a hash instead of an array, right?
robbyoconnor has joined #ruby-lang
<|jemc|>
essentially, but there are some nuances you may be glossing over
<glide>
jemc: Ok, thanks. Yeah I can't absorb the documentation very well, but I'm not sure whether it's because I haven't dedicated time to focus on it 100%.
<glide>
I need to read up on hashes. Is there a recognized best resource for a beginner to read>
phansch_ has joined #ruby-lang
michaeldeol has joined #ruby-lang
dfr|work has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
go|dfish has joined #ruby-lang
FiXato has joined #ruby-lang
jtperreault has joined #ruby-lang
<|jemc|>
not sure - someone can probably give book recommendations
<|jemc|>
I know some beginners also run through the "ruby koans" to pick up the basics
phansch has quit [Ping timeout: 255 seconds]
<glide>
I'm working on the koans now :) also picked up a couple books.
<|jemc|>
my learning style is usually just to start a new project and research everything I need to learn along the way to accomplish that project
<|jemc|>
and reading through other people's source code is really valuable
<|jemc|>
there's a wealth of code to peruse through on github at your leisure
<glide>
Like on github? How do I find a source code that I can understand? I have enormous difficulty reading source code.
<glide>
I guess it's just like learning another language though... :|
francisfish has joined #ruby-lang
<|jemc|>
yeah, and it's a really good way to pick up language idioms, reading through some well-respected code
vlad_starkov has quit []
<glide>
Cool, thanks.
phansch_ has quit [Quit: WeeChat 0.4.2]
wallerdev has quit [Quit: wallerdev]
pixelhandler has joined #ruby-lang
sferik has joined #ruby-lang
<deg->
there's a good slide done by phillyonrails taht went through some common ruby idioms i found very useful, i saw it on an SO answer i think about ruby idioms
yfeldblum has quit [Remote host closed the connection]
AncientAmateur has quit [Remote host closed the connection]
<gnufied>
But if you really need more than one version, chruby, rvm or rbenv
<BjornW>
postmodern & gnufied : thanks, I'll start with using 1.9.3 which is available as a package for Ubuntu and should work with this book I'm trying out
<postmodern>
+1 for using packages, that way you can turn on unattended-updates and not worry about applying security updates
centrx has joined #ruby-lang
agarie has joined #ruby-lang
agarie_ has joined #ruby-lang
amsi has joined #ruby-lang
agarie_ has quit [Remote host closed the connection]
agarie_ has joined #ruby-lang
mykoweb has joined #ruby-lang
bradland has quit [Quit: bradland]
kgrz has joined #ruby-lang
agarie has quit [Ping timeout: 240 seconds]
kitak has quit [Remote host closed the connection]
kitak has joined #ruby-lang
nisstyre has joined #ruby-lang
kgrz has quit [Ping timeout: 246 seconds]
justinweiss has joined #ruby-lang
agarie_ has quit [Read error: Connection reset by peer]
agarie has joined #ruby-lang
agarie has quit [Read error: Connection reset by peer]
robbyoconnor has quit [Ping timeout: 255 seconds]
riffraff has joined #ruby-lang
ap4y has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
momomomomo has quit [Remote host closed the connection]
nertzy3 has joined #ruby-lang
LMity has quit [Ping timeout: 246 seconds]
chichou has quit [Remote host closed the connection]
alex-quiterio has joined #ruby-lang
m4t- has joined #ruby-lang
alex-quiterio has quit [Client Quit]
riffraff has quit [Quit: Leaving]
chichou has joined #ruby-lang
danijoo has quit [Remote host closed the connection]
wallerdev has joined #ruby-lang
sepp2k has quit [Quit: Leaving.]
toastynerd has quit [Remote host closed the connection]
stamina has quit [Quit: WeeChat 0.4.3]
francisfish has quit [Remote host closed the connection]
nertzy3 is now known as nertzy
nathanstitt has joined #ruby-lang
toastynerd has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
cored has quit [Ping timeout: 255 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblu_ has joined #ruby-lang
miqui has quit [Remote host closed the connection]
solars has joined #ruby-lang
robbyoconnor has joined #ruby-lang
face has joined #ruby-lang
faces has quit [Ping timeout: 246 seconds]
Johz has quit [Quit: Leaving]
nisstyre has quit [Quit: WeeChat 0.4.3]
dknox-docappt is now known as dknox
solars has quit [Ping timeout: 255 seconds]
nathanstitt has quit [Quit: I growing sleepy]
danijoo has joined #ruby-lang
BjornW has quit [Quit: Ex-Chat]
momomomomo has joined #ruby-lang
AncientAmateur has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
emaxi has quit [Remote host closed the connection]
glide has quit [Ping timeout: 252 seconds]
sdouglas has quit [Remote host closed the connection]
sdouglas has joined #ruby-lang
dorei has joined #ruby-lang
fezziwig has joined #ruby-lang
nertzy has quit [Quit: This computer has gone to sleep]
viscera has joined #ruby-lang
bjh13 has quit [Quit: leaving]
jackyalcine has joined #ruby-lang
nertzy has joined #ruby-lang
mykoweb has quit [Ping timeout: 246 seconds]
loincloth has quit [Remote host closed the connection]
jackyalcine is now known as jalcine
jhass is now known as jhass|off
Olipro has quit [Ping timeout: 246 seconds]
kitak has quit [Remote host closed the connection]
kitak has joined #ruby-lang
viscera has left #ruby-lang [#ruby-lang]
skade has joined #ruby-lang
skade has quit [Ping timeout: 255 seconds]
kitak has quit [Ping timeout: 260 seconds]
nathanstitt has joined #ruby-lang
enebo has quit [Quit: enebo]
VTLob has quit [Quit: VTLob]
caral has quit [Quit: caral]
ScaredWee has joined #ruby-lang
Cakey has joined #ruby-lang
ScaredWee is now known as weems
weems has quit [Changing host]
weems has joined #ruby-lang
djinni`_ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
allomov has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 246 seconds]
havenwood has joined #ruby-lang
bantic has joined #ruby-lang
blurredbits has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bin7me has quit [Quit: Leaving]
djinni` has joined #ruby-lang
sferik has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
achal has quit [Quit: Connection closed for inactivity]
lcdhoffman has quit [Quit: lcdhoffman]
Cakey has quit [Ping timeout: 252 seconds]
MindfulMonk has quit [Read error: Connection reset by peer]
MindfulMonk has joined #ruby-lang
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ylluminate has joined #ruby-lang
joast has quit [Quit: Leaving.]
herpless has quit [Quit: Connection closed for inactivity]
slacker101 has joined #ruby-lang
mikecmpbll has quit [Quit: ciao.]
joast has joined #ruby-lang
Raycaster has left #ruby-lang [#ruby-lang]
bantic has quit [Quit: bantic]
allomov has quit [Remote host closed the connection]