apeiros changed the topic of #ruby-lang to: RIP Jim || Ruby 2.1.1; 2.0.0-p451; 1.9.3-p545: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com
havenwood has joined #ruby-lang
Cakey has joined #ruby-lang
LMity has quit [Ping timeout: 246 seconds]
LMity has joined #ruby-lang
jhass is now known as jhass|off
herbert_ has joined #ruby-lang
Cakey has quit [Ping timeout: 252 seconds]
Cakey has joined #ruby-lang
mistym has joined #ruby-lang
bin8me has quit [Read error: Connection reset by peer]
tyrbo has joined #ruby-lang
jsutt has quit [Read error: Operation timed out]
mykoweb has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
herbert_ has quit [Quit: ChatZilla 0.9.90.1 [Firefox 28.0/20140317233501]]
saarinen has joined #ruby-lang
Cakey has quit [Ping timeout: 240 seconds]
toastyne_ has quit [Remote host closed the connection]
toastynerd has joined #ruby-lang
Jeticus has quit [Ping timeout: 246 seconds]
toastynerd has quit [Ping timeout: 255 seconds]
emaxi has quit [Remote host closed the connection]
amclain has quit [Quit: Leaving]
emaxi has joined #ruby-lang
emaxi has quit [Ping timeout: 252 seconds]
Lewix has joined #ruby-lang
jackyalcine has joined #ruby-lang
jackyalcine is now known as jacky
slawrence00 has quit [Ping timeout: 252 seconds]
Speed has quit [Ping timeout: 252 seconds]
tkuchiki has joined #ruby-lang
alekst has quit [Quit: Leaving...]
jacky has quit [Excess Flood]
knu has quit [Ping timeout: 240 seconds]
emaxi has joined #ruby-lang
axv has joined #ruby-lang
axv has quit [Client Quit]
bousquet has quit []
<Technodrome> how many different formats are there for hashes?
<ledestin> Technodrome: ?
<Technodrome> how many different kinds of syntax is there?
<ledestin> dunno. Hash.new, {}, :foo => 1
<Technodrome> oh wait no
<ledestin> foo: 1
<Technodrome> render text: "here you go, thank you"
<Technodrome> i was thinking that was a hash
<tyrbo> It is, right?
<Technodrome> then i realize ruby got keyword arguments
<tyrbo> { :text => "Here you go, thank you" }
<tyrbo> or no?
charliesome has joined #ruby-lang
<Technodrome> looks like the syntax of a keyword argument
<ledestin> Technodrome: it's a hash all irght
jacky has joined #ruby-lang
arBmind has quit [Read error: Operation timed out]
<Technodrome> ledestin: i need proof
<ledestin> Technodrome: :) h = text: 'foo'; p h
<ledestin> well, if that works
<Technodrome> my example doesn't have that though
arBmind has joined #ruby-lang
<Technodrome> render text: "here you go, thank you"
knu has joined #ruby-lang
<Technodrome> was just looking at that myself
<ledestin> all right, it doesn't work that way
<ledestin> you have to pass it to a method
kukyakya has joined #ruby-lang
<Technodrome> ledestin: what do you mean?
<ledestin> Technodrome: ruby -e 'def foo h; p h; end; foo foo: 1 '
havenwood has quit []
<epitron> Technodrome: -v
<epitron> [1] pry(main)> def whatami(thing); thing; end
<epitron> [2] pry(main)> whatami a: "hash"
<epitron> => {:a=>"hash"}
<Technodrome> yeah ok, so hashes can be sent without being identified as such when doing method calls
<epitron> if you put keyword arguments in the method definition though, it treats it differntly
<epitron> +e
<Technodrome> so syntax wise, there is no way of telling the difference between a hash and a keyword argument?
<epitron> the difference is "def"
<Technodrome> i meant from the method call perspective in general
<epitron> hmmmmmm.. lemme check
<ledestin> Technodrome: interesting question
<Technodrome> i mean render text: "here you go, thank you" could be either, purely from syntax
<Technodrome> i didn't *think* that rails went crazy with adding keyword arguments yet?
francisfish has joined #ruby-lang
* ledestin is still on 1.9
<Technodrome> seems a bit early for that
<epitron> [3] pry(main)> method(def kw(a, b, key: 1); end).parameters
<epitron> => [[:req, :a], [:req, :b], [:key, :key]]
<Technodrome> that's why my first question was , is there an alternative hash syntax
<Technodrome> which i guess there is when doing a method call
vpretzel has joined #ruby-lang
<epitron> that's obviously not syntax :)
<ledestin> Technodrome: well, :foo => 1
<epitron> Technodrome: why are you concerned about this?
<Technodrome> yes thats the alternative one introduced
<Technodrome> i'm not
<Technodrome> not at all, i just was curious if that was a hash or a keyword argument
<epitron> i mean, i'm not sure why you're asking
<Technodrome> because i believe in knowing what it is i'm typing
<epitron> i guess you'll have to discard that belief :)
<Technodrome> render text: "here you go, thank you", text: "there you are"
<epitron> ruby: land of the magical hash
<tyrbo> If you know the method definition (which you do), then you already know what you're typing.
<Technodrome> the method definition is quite sparse unless you want to dig, heavily
<Technodrome> they do the usual *args
<Technodrome> then use a bunch of super methods from way up to process everything :)
<epitron> Technodrome: i can't think of any language that lets you pass the same kwarg twice :)
<Technodrome> yes epitron
<Technodrome> my point
<Technodrome> so it's a hash
<Technodrome> epitron: from a pure syntax perspective though, it's just one of those cases
emaxi_ has joined #ruby-lang
<epitron> hah, you're right
<epitron> wow, that's crazy
francisfish has quit [Ping timeout: 252 seconds]
<epitron> syntactic kwarg sugar
havenwood has joined #ruby-lang
emaxi has quit [Ping timeout: 240 seconds]
michaeldeol has joined #ruby-lang
eban has joined #ruby-lang
danijoo has joined #ruby-lang
LMity has quit [Ping timeout: 255 seconds]
Technodrome has quit [Quit: Technodrome]
chichou has joined #ruby-lang
kgrz has joined #ruby-lang
Technodrome has joined #ruby-lang
kgrz has quit [Remote host closed the connection]
danijoo has quit [Remote host closed the connection]
toretore has quit [Quit: This computer has gone to sleep]
rahul_j has joined #ruby-lang
Cakey has joined #ruby-lang
Coincidental has joined #ruby-lang
tectonic has quit []
slacker101 has joined #ruby-lang
slacker101 has left #ruby-lang ["Leaving"]
Coincidental has quit [Remote host closed the connection]
tectonic has joined #ruby-lang
slacker111 has joined #ruby-lang
<slacker111> test
tectonic has quit [Client Quit]
iliketurtles has quit [Quit: zzzzz…..]
nertzy3 has joined #ruby-lang
kitak_ has quit [Remote host closed the connection]
kitak has joined #ruby-lang
kgrz has joined #ruby-lang
viscera has joined #ruby-lang
kgrz has quit [Ping timeout: 240 seconds]
Paradoxic is now known as spulk
spulk is now known as Paradoxic
nertzy3 has quit [Quit: This computer has gone to sleep]
mistym has quit [Remote host closed the connection]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nertzy3 has joined #ruby-lang
michaeldeol has joined #ruby-lang
Coincidental has joined #ruby-lang
jason___ has quit [Remote host closed the connection]
robbyoconnor has quit [Excess Flood]
robbyoconnor has joined #ruby-lang
knu has quit [Ping timeout: 252 seconds]
knu has joined #ruby-lang
nertzy3 has quit [Quit: This computer has gone to sleep]
Barrin6 has joined #ruby-lang
Cakey has quit [Ping timeout: 240 seconds]
francisfish has joined #ruby-lang
nisstyre has joined #ruby-lang
francisfish has quit [Ping timeout: 240 seconds]
hahuang65 has quit [Ping timeout: 246 seconds]
saarinen has quit [Quit: saarinen]
mehlah has quit [Quit: Leaving...]
sepp2k has quit [Quit: Leaving.]
gix has quit [Ping timeout: 255 seconds]
gix has joined #ruby-lang
willmarshall has joined #ruby-lang
mr-foobar has quit [Read error: Connection reset by peer]
Coincidental has quit [Remote host closed the connection]
tkuchiki_ has joined #ruby-lang
danijoo has joined #ruby-lang
CaptainJet has joined #ruby-lang
knu has quit [Ping timeout: 252 seconds]
tkuchiki has quit [Ping timeout: 255 seconds]
knu has joined #ruby-lang
centrx has quit [Quit: All this computer hacking is making me thirsty]
Coincidental has joined #ruby-lang
tbuehlmann has joined #ruby-lang
emaxi_ has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
slacker111 has quit [Ping timeout: 252 seconds]
mrwooh333_ has quit [Remote host closed the connection]
danijoo has quit [Remote host closed the connection]
miqui has quit [Remote host closed the connection]
emaxi has joined #ruby-lang
sdouglas has joined #ruby-lang
Barrin5 has joined #ruby-lang
Barrin5 has quit [Read error: Connection reset by peer]
Barrin6 has quit [Read error: Connection reset by peer]
Barrin6 has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
sdouglas has quit [Remote host closed the connection]
sdouglas has joined #ruby-lang
kukyakya has quit [Remote host closed the connection]
tkuchiki_ has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
phansch has joined #ruby-lang
Coincidental has quit [Remote host closed the connection]
Coincidental has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
Coincidental has quit [Remote host closed the connection]
mistym has joined #ruby-lang
Cakey has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
nisstyre has quit [Quit: bai]
iliketurtles has joined #ruby-lang
Karql_ has joined #ruby-lang
Karql_ has left #ruby-lang [#ruby-lang]
Xzyx987X_ has joined #ruby-lang
kitak has quit [Remote host closed the connection]
Barrin6 has quit [Quit: Leaving]
nertzy3 has joined #ruby-lang
Xzyx987X has quit [Ping timeout: 264 seconds]
ur5us_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby-lang
rtlong has quit [Ping timeout: 245 seconds]
znz_jp has quit [Ping timeout: 245 seconds]
omegahm has quit [Ping timeout: 264 seconds]
hinbody has quit [Ping timeout: 264 seconds]
apeiros has quit [Ping timeout: 240 seconds]
hinbody has joined #ruby-lang
kitak has joined #ruby-lang
rtlong has joined #ruby-lang
mib_mib has joined #ruby-lang
mib_mib has quit [Remote host closed the connection]
francisfish has joined #ruby-lang
znz_jp has joined #ruby-lang
_ht has joined #ruby-lang
francisfish has quit [Read error: Operation timed out]
tonni has quit [Remote host closed the connection]
johnpclaus has quit [Ping timeout: 240 seconds]
emaxi has quit [Read error: Connection reset by peer]
omegahm has joined #ruby-lang
nertzy3 has quit [Quit: This computer has gone to sleep]
araujo has quit [Quit: Leaving]
woollyams has joined #ruby-lang
centrx has joined #ruby-lang
Technodrome has quit [Quit: Technodrome]
iliketurtles has quit [Quit: Textual IRC Client: www.textualapp.com]
zlogan has joined #ruby-lang
tonni has joined #ruby-lang
kgrz has joined #ruby-lang
apeiros_ is now known as apeiros
rahul_j has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
kgrz has quit [Ping timeout: 240 seconds]
woollyams has quit [Ping timeout: 252 seconds]
mdub has joined #ruby-lang
toastynerd has joined #ruby-lang
apeiros has quit [Ping timeout: 246 seconds]
achal has joined #ruby-lang
mechan1c has joined #ruby-lang
mechan1c_ has quit [Read error: Operation timed out]
sdouglas has quit [Remote host closed the connection]
chichou has quit [Remote host closed the connection]
toastynerd has quit [Remote host closed the connection]
jsutt has joined #ruby-lang
danijoo has joined #ruby-lang
sdouglas has joined #ruby-lang
jsutt has quit [Ping timeout: 255 seconds]
jsutt has joined #ruby-lang
tonni has quit [Ping timeout: 252 seconds]
Lewix has quit [Remote host closed the connection]
kgrz has joined #ruby-lang
jsutt has quit [Ping timeout: 255 seconds]
tonni has joined #ruby-lang
danijoo has quit [Remote host closed the connection]
dc5ala has joined #ruby-lang
CaptainJet has quit [Ping timeout: 255 seconds]
Jeticus has joined #ruby-lang
ur5us has joined #ruby-lang
relix has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
x0f_ has joined #ruby-lang
dagobah has joined #ruby-lang
x0f has quit [Read error: Operation timed out]
BubonicPestilenc has joined #ruby-lang
<BubonicPestilenc> hey all
<BubonicPestilenc> are there ways to shorten:
<BubonicPestilenc> rows = rowset["row"] || []
<BubonicPestilenc> rows = [rows] if rows.is_a?(Hash)
yfeldblum has quit [Remote host closed the connection]
<centrx> Those seem pretty short already
mistym has quit [Remote host closed the connection]
<BubonicPestilenc> i.e. if rowset["row"].nil? convert to array; if rowset["row"] not an array, convert to array
<centrx> case rows
<BubonicPestilenc> centrx: btw, i was looking for voodoo(ruby)-magic :)
yfeldblum has joined #ruby-lang
<BubonicPestilenc> e.g. [*(rowset["rows"] || [])
yfeldblum has quit [Ping timeout: 255 seconds]
<centrx> rowset["row"] || (rows === Hash && [rows]) || []
<centrx> that's probablly not the same anyway
<centrx> but that's the idea
<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?
sferik has joined #ruby-lang
<BubonicPestilenc> atm thinking about: def copyVars([var1, var2, varN]); return hash
<BubonicPestilenc> centrx:
<BubonicPestilenc> link to input hash example
Rahnarss1n is now known as Rahnarsson
LMity2 has joined #ruby-lang
<centrx> BubonicPestilenc, Not sure what you mean by separating the data, but if it is like your example, then you would do something like
michd is now known as MichD
LMity has quit [Ping timeout: 240 seconds]
<centrx> BubonicPestilenc, With ActiveSupport/Rails, you can do something like new_hash = remote_hash.extract(*vars)
<centrx> extract! actually
<BubonicPestilenc> added at the bottom
<BubonicPestilenc> what i would like to see :)
yfeldblum has joined #ruby-lang
LMity has joined #ruby-lang
<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.
<ddfreyne> Answered!
canton7-mac has joined #ruby-lang
canton7-mac has quit [Remote host closed the connection]
canton7-mac has joined #ruby-lang
LMity2 has quit [Ping timeout: 240 seconds]
sferik has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
herpless has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skade has joined #ruby-lang
sferik has joined #ruby-lang
mehlah has joined #ruby-lang
sdouglas has joined #ruby-lang
sferik has quit [Client Quit]
sdouglas has quit [Ping timeout: 252 seconds]
mbj has joined #ruby-lang
Lewix has joined #ruby-lang
arBmind has joined #ruby-lang
phansch has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
mikecmpbll has quit [Quit: ciao.]
mikecmpbll has joined #ruby-lang
robbyoconnor has quit [Excess Flood]
robbyoconnor has joined #ruby-lang
robbyoconnor has quit [Excess Flood]
robbyoconnor has joined #ruby-lang
caral has quit [Quit: caral]
willmarshall has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
willmarshall has joined #ruby-lang
<yorickpeterse> morning
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
willmarshall has quit [Ping timeout: 252 seconds]
zlogan has quit [Read error: Operation timed out]
Forgetful_Lion has joined #ruby-lang
Forgetful_Lion has quit [Read error: Connection reset by peer]
CaptainJet has joined #ruby-lang
crazysim has quit [Ping timeout: 246 seconds]
erichmenge has quit [Ping timeout: 240 seconds]
zastern has quit [Ping timeout: 240 seconds]
crazysim has joined #ruby-lang
erichmenge has joined #ruby-lang
woollyams has joined #ruby-lang
xiella has joined #ruby-lang
mehlah has quit [Quit: Leaving...]
mr-foobar has joined #ruby-lang
CaptainJet has quit []
cnivolle has joined #ruby-lang
Speed has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
faces has joined #ruby-lang
face has quit [Ping timeout: 240 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ij has joined #ruby-lang
elia has quit [Read error: Operation timed out]
elia has joined #ruby-lang
cnivolle has quit [Remote host closed the connection]
cnivolle has joined #ruby-lang
elia has quit [Ping timeout: 255 seconds]
vlad_starkov has joined #ruby-lang
cnivolle has quit [Ping timeout: 240 seconds]
Cakey has quit [Ping timeout: 252 seconds]
francisfish has quit [Remote host closed the connection]
rofel has joined #ruby-lang
Fushi has joined #ruby-lang
francisfish has joined #ruby-lang
elia has joined #ruby-lang
zlogan has joined #ruby-lang
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
bin7me has joined #ruby-lang
cnivolle has joined #ruby-lang
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.”
<ddfreyne> Moar confusion!!!
<ddfreyne> And the exaple uses RuntimeError: http://ruby-doc.org/core/Exception.html
<ddfreyne> +m
<ledestin> what rescue catches by default? StandardError?
<ddfreyne> ledestin: Yes
<ddfreyne> (And thus also RuntimeError)
<sluukkonen> I guess the most important thing is not to rescue Exception
<sluukkonen> as it covers things like SyntaxError
workmad3 has joined #ruby-lang
<sluukkonen> StandardError is what I usually (probably always) inherit from
tbuehlmann has quit [Quit: Leaving]
tkuchiki has quit [Ping timeout: 255 seconds]
<ddfreyne> Yup
whitecrow1 has joined #ruby-lang
whitecrow1 has joined #ruby-lang
<ddfreyne> Darn that confusing documentation :)
<gnufied> Exception also captures signals
<sluukkonen> yeah, it covers everything
<sluukkonen> it's like catching Throwable in java
<sluukkonen> bad stuff will happen
<gnufied> so, if somewhere somone handled it, good luck trying to Control-C out of an app
jperry has quit [Remote host closed the connection]
jperry has joined #ruby-lang
<yorickpeterse> gotta catch em all
chouhoulis has joined #ruby-lang
davispuh has joined #ruby-lang
<ddfreyne> Hm, I thought nanoc captured Exception but it apparently doesn't, whew
Guedes has joined #ruby-lang
<workmad3> yorickpeterse: 'pokemon = catch(:pokemon) {throw :pokemon, :pikachu}'
<ddfreyne> I still haven't found a use for catch/throw
<yorickpeterse> pikachu is for scrubs
<yorickpeterse> ddfreyne: sec
<ddfreyne> scrubs?
davispuh has quit [Remote host closed the connection]
<yorickpeterse> "noob" would also be a similar term
davispuh has joined #ruby-lang
<yorickpeterse> I use that to break out of deeply nested recursion
<yorickpeterse> heh
<yorickpeterse> deeply nested recursion
<yorickpeterse> the irony
<workmad3> ddfreyne: I think I just demonstrated a perfect use for throw/catch... catching pokemon!
<yorickpeterse> Sinatra uses it for halt!
<workmad3> ddfreyne: even if yorickpeterse does have an issue with pikachu...
<ddfreyne> Hmmm.
<ddfreyne> 'kay.
<yorickpeterse> you can basically use it as a fancy break statement
davispuh has quit [Remote host closed the connection]
<yorickpeterse> The one annoying thing is that a throw will bubble up
<yorickpeterse> e.g. if you do
<workmad3> yorickpeterse: how about pokemon = catch(:pokemon) {throw :pokemon, %w(charmander squirtle bulbasaur pikachu jigglypuff).sample} ?
skade has quit [Ping timeout: 255 seconds]
<yorickpeterse> catch(:foo) { catch(:foo) { } } it will trigger both catch() blocks
<yorickpeterse> workmad3: those are all beginner pokemon
<yorickpeterse> I'll take Alakawhatever any day
davispuh has joined #ruby-lang
<yorickpeterse> the one with the spoons and the mustache
<c_s_g> Alakazam
<yorickpeterse> ah
<yorickpeterse> totally knew that
<workmad3> yorickpeterse: it would seem a bit unfair if mew2 appeared in that list :)
skade has joined #ruby-lang
woollyams has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
[spoiler] has joined #ruby-lang
Coincidental has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
<yorickpeterse> whitequark: https://github.com/mispy/twitter_ebooks you need to try this
<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]
rolfb has quit [Quit: Linkinus - http://linkinus.com]
riffraff has quit [Quit: Leaving]
mib_mib has joined #ruby-lang
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]
alexju has joined #ruby-lang
mistym has joined #ruby-lang
AncientAmateur has joined #ruby-lang
c_s_g has quit [Quit: Textual IRC Client: www.textualapp.com]
CaptainJet has joined #ruby-lang
chichou has joined #ruby-lang
momomomomo has joined #ruby-lang
vondruch_ has quit [Ping timeout: 240 seconds]
loincloth has quit [Remote host closed the connection]
emaxi has joined #ruby-lang
hahuang65 has quit [Ping timeout: 264 seconds]
saarinen has quit [Quit: saarinen]
jgpawletko has quit [Read error: Connection reset by peer]
toastynerd has quit [Remote host closed the connection]
vpretzel has quit []
vpretzel has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
toastynerd has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
khaase has joined #ruby-lang
vsorlov has quit [Read error: Operation timed out]
havenwood has joined #ruby-lang
cnivolle has joined #ruby-lang
apeiros has quit [Ping timeout: 252 seconds]
zlogan has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
nirix has quit [Ping timeout: 246 seconds]
kitak has quit [Remote host closed the connection]
kitak has joined #ruby-lang
mikecmpbll has joined #ruby-lang
tonni has joined #ruby-lang
zlogan has quit [Ping timeout: 252 seconds]
kgrz has joined #ruby-lang
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cored has quit [Ping timeout: 255 seconds]
tonni has quit [Read error: Connection reset by peer]
tonni has joined #ruby-lang
cored has joined #ruby-lang
phansch has joined #ruby-lang
loincloth has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
ascarter has joined #ruby-lang
nathanstitt has joined #ruby-lang
khaase has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
ascarter has quit [Client Quit]
toastynerd has joined #ruby-lang
saarinen has joined #ruby-lang
francisfish has joined #ruby-lang
saarinen has quit [Client Quit]
JohnBat26 has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
hahuang65 has joined #ruby-lang
kgrz has quit [Remote host closed the connection]
Raycaster has joined #ruby-lang
khaase has joined #ruby-lang
khaase has quit [Changing host]
khaase has joined #ruby-lang
cored has quit [Ping timeout: 240 seconds]
tonni has quit [Remote host closed the connection]
<yorickpeterse> darix: agree, but alas people came up with different date formats
<yorickpeterse> actually have to write some code tomorrow to detect the used format based on a collection of those dates
jgpawletko has joined #ruby-lang
<yorickpeterse> though I might just write the boilerplate + specs and let the intern do it
<darix> yorickpeterse: didnt ljarvis or so write a date parsing lib?
benlovell has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
johnpclaus has joined #ruby-lang
caral has joined #ruby-lang
<yorickpeterse> Different use case
<yorickpeterse> Chronic for stuff like "1 days ago"
<yorickpeterse> It can't handle "04/03/13"
<yorickpeterse> or "04/22/13" (that only is obviously m/d/y)
<darix> yorickpeterse: even most people get confused with a date like that
<yorickpeterse> Yup
<yorickpeterse> I *have* to parse it though
<yorickpeterse> So we'll be setting up a classifier for it to figure out what format is used, then use that
jhass|off is now known as jhass
<yorickpeterse> Discussed some ways with a co-worker, not entirely convinced yet it will be 100% accurate
<yorickpeterse> (which is more or less required)
crazysim has quit [Max SendQ exceeded]
crazysim has joined #ruby-lang
<yorickpeterse> ah the wonders of review websites
heftig has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
saarinen has joined #ruby-lang
danijoo has quit [Remote host closed the connection]
mib_mib has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
saarinen has quit [Client Quit]
arBmind has joined #ruby-lang
toastynerd has joined #ruby-lang
kirin` has quit [Ping timeout: 255 seconds]
mib_mib has joined #ruby-lang
yfeldblu_ has quit [Ping timeout: 265 seconds]
cored has quit [Ping timeout: 255 seconds]
mbj has quit [Quit: leaving]
avdi_ has quit []
avdi_ has joined #ruby-lang
robmiller has quit [Quit: Leaving.]
wallerdev has quit [Quit: wallerdev]
mehlah has quit [Quit: Leaving...]
saarinen has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
cnivolle has quit [Remote host closed the connection]
Technodrome has quit [Read error: Connection reset by peer]
Technodrome has joined #ruby-lang
Technodrome has quit [Client Quit]
centrx has joined #ruby-lang
kirin` has joined #ruby-lang
cored has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
wallerdev has joined #ruby-lang
avdi_ has quit []
avdi has joined #ruby-lang
danijoo has joined #ruby-lang
benlovell has quit [Ping timeout: 240 seconds]
cored has quit [Ping timeout: 255 seconds]
rofel has quit [Remote host closed the connection]
dstynchu_ has joined #ruby-lang
dstynchula has quit [Read error: Connection reset by peer]
kirin` has quit [Ping timeout: 252 seconds]
alexju has quit [Ping timeout: 246 seconds]
toastynerd has quit [Remote host closed the connection]
mib_mib has quit []
Johz has joined #ruby-lang
sepp2k has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
kirin` has joined #ruby-lang
AncientAmateur has quit [Remote host closed the connection]
alexju has joined #ruby-lang
AncientAmateur has joined #ruby-lang
benlovell has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
vsorlov has joined #ruby-lang
gix- has joined #ruby-lang
gix has quit [Disconnected by services]
solars has joined #ruby-lang
toastynerd has joined #ruby-lang
sepp2k has quit [Ping timeout: 240 seconds]
gix- has quit [Ping timeout: 255 seconds]
postmodern has joined #ruby-lang
kgrz has joined #ruby-lang
rofel has joined #ruby-lang
nertzy3 has joined #ruby-lang
gix has joined #ruby-lang
agarie has joined #ruby-lang
kgrz has quit [Ping timeout: 240 seconds]
francisfish has quit [Remote host closed the connection]
gix has quit [Quit: Client exiting]
mehlah has joined #ruby-lang
vsorlov has quit [Ping timeout: 255 seconds]
dwknoxy is now known as dknox-docappt
sepp2k has joined #ruby-lang
Fushi has quit [Quit: Connection closed for inactivity]
jsutt has joined #ruby-lang
cnivolle has joined #ruby-lang
alex-quiterio has quit [Quit: Leaving.]
AncientAmateur has quit [Remote host closed the connection]
robbyoconnor has joined #ruby-lang
benlovell has quit [Ping timeout: 255 seconds]
nertzy3 has quit [Quit: This computer has gone to sleep]
AncientA_ has joined #ruby-lang
skade has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
khaase has quit [Ping timeout: 240 seconds]
stamina has joined #ruby-lang
yfeldblum has joined #ruby-lang
nathanstitt has joined #ruby-lang
yfeldblum has quit [Ping timeout: 240 seconds]
skade has quit [Quit: Computer has gone to sleep.]
alexju has quit [Remote host closed the connection]
solars has quit [Ping timeout: 252 seconds]
skade has joined #ruby-lang
jds has quit [Quit: Connection closed for inactivity]
bradland has joined #ruby-lang
bradland has quit [Client Quit]
bradland has joined #ruby-lang
loincloth has quit [Remote host closed the connection]
ij has quit [Ping timeout: 252 seconds]
_ht has quit [Remote host closed the connection]
LMity has joined #ruby-lang
rpriskyplayer has joined #ruby-lang
rpriskyplayer has left #ruby-lang [#ruby-lang]
alex-quiterio has joined #ruby-lang
amsi has quit [Ping timeout: 255 seconds]
yfeldblum has joined #ruby-lang
mistym_ has joined #ruby-lang
loincloth has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
ij has joined #ruby-lang
<cout> can I tell a ruby script to nice itself?
toastynerd has joined #ruby-lang
kgrz has joined #ruby-lang
|jemc| has quit [Ping timeout: 240 seconds]
Paradoxic is now known as Zyme
<cout> if I google `ruby "nice itself"` I get information on hotels in france :(
Zyme is now known as Skale
Skale is now known as Skaled
Skaled is now known as Paradoxic
<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]
<glide> thanks, deg.
<deg-> ah here was the link http://cbcg.net/talks/rubyidioms/
mistym_ has quit [Remote host closed the connection]
AncientAmateur has joined #ruby-lang
<glide> Cool, thanks. I'm in Philly now so it's nice to see this stuff by locals :)
nathanstitt has joined #ruby-lang
ij has left #ruby-lang ["WeeChat 0.4.3"]
jarib has quit [Quit: leaving]
nathanstitt has quit [Client Quit]
jarib has joined #ruby-lang
jarib has joined #ruby-lang
jarib has quit [Changing host]
alex-quiterio has quit [Quit: Leaving.]
BjornW has joined #ruby-lang
<BjornW> Is using RVM the recommened way to install Ruby on Ubuntu Linux?
nathanstitt has joined #ruby-lang
swills` is now known as swills
ur5us has joined #ruby-lang
centrx has quit [Quit: All this computer hacking is making me thirsty]
<postmodern> BjornW, apt-get install ruby1.9.1-full
<postmodern> BjornW, or try using ruby-install to install your desired ruby into /usr/local
<drbrain> why use ruby 1.9.3?
<drbrain> it is nearing EOL
<postmodern> drbrain, it's stable
<postmodern> drbrain, debian/ubuntu maintains it and backports patches
<drbrain> but then you don't get any of the GC and performance improvements
<gnufied> :-)
<postmodern> drbrain, if you want to use a specific version and maintain it yourself, then install into /usr/local
<postmodern> drbrain, but you knew that already ;)
robbyoconnor has quit [Max SendQ exceeded]
<gnufied> I am waiting for postmodern to recommend chruby
<postmodern> BjornW, basically, if you just need one ruby version, you probably don't need a ruby manager, just install it
Guedes has left #ruby-lang ["Saindo"]
robbyoconnor has joined #ruby-lang
<gnufied> BjornW: if you need more latest ruby than what is bundled in ubtunu, you should try - https://launchpad.net/~brightbox/+archive/ruby-ng
<gnufied> We try and keep up.
<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]
nathanstitt has quit [Quit: I growing sleepy]
francisfish has joined #ruby-lang
dknox has quit [Quit: Textual IRC Client: www.textualapp.com]
tkuchiki has joined #ruby-lang
emaxi has joined #ruby-lang
francisfish has quit [Read error: Operation timed out]
allomov has joined #ruby-lang
|jemc| has quit [Ping timeout: 240 seconds]
sdouglas has quit [Remote host closed the connection]
nisstyre has joined #ruby-lang
sdouglas_ has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
allomov has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
sdouglas_ has quit [Remote host closed the connection]
lcdhoffman has joined #ruby-lang
slacker101 has quit [Read error: Operation timed out]
yfeldblu_ has quit [Remote host closed the connection]
robbyoconnor has joined #ruby-lang
yfeldblum has joined #ruby-lang
willmarshall has joined #ruby-lang
fuhgeddaboudit has joined #ruby-lang
woollyams has joined #ruby-lang
jalcine has quit [Excess Flood]
pixelhandler has quit [Quit: pixelhandler]
marr has quit [Ping timeout: 252 seconds]
viscera has joined #ruby-lang
gix has joined #ruby-lang