<butteredballman>
foohey why do you use the ipv7 and where can i ask my mailman for the same thing
slainer68 has quit [Ping timeout: 240 seconds]
<foohey>
because my ISP & my OS have IPV6 by default ?
<butteredballman>
sounds like a bunch of buffets in a cabinet
<habstinat>
New to Ruby. I get this error when I try to gem install debugger-linecache -v '1.1.2': <http://sprunge.us/dILf> Any ideas as to what could be done to fix this?
<foohey>
woah, interesting guy
<foohey>
i'm drinking, so, tell what you wan't
<foohey>
I have time to lost
<foohey>
:)
mcoffee has quit [Ping timeout: 264 seconds]
werdnativ has quit [Quit: FAMOUS_LAST_WORDS is nil]
<foohey>
because ruby is so awesome, i have nothing to do
foohey was kicked from #ruby by seanstickle [foohey]
<seanstickle>
davidcelis: nothing at all
foohey has joined #ruby
poisonarms has quit [Ping timeout: 255 seconds]
<foohey>
sorry seanstickle
<seanstickle>
:)
devdazed has quit [Ping timeout: 265 seconds]
<foohey>
I was just trolling ...
<foohey>
no serious in my words
<banisterfiend>
seanstickle: it was butteredballman who was linking pics of naked dudes
<banisterfiend>
probably the same guy...
<seanstickle>
Whoa, didn't see that.
<postmodern>
foohey, trolling is for /b/ not irc :P
<seanstickle>
Or at least, not THIS irc
chimkan_ has quit [Quit: chimkan_]
<foohey>
yup but a guy like that... and #ruby is idleing
<foohey>
:D
jenrzzz has joined #ruby
devdazed has joined #ruby
<foohey>
my apologies, ruby community
nga4 has quit [Ping timeout: 252 seconds]
h8R has joined #ruby
otters has joined #ruby
dukedave has quit [Quit: Leaving.]
dmiller has quit [Remote host closed the connection]
bronson has quit [Quit: bronson]
h8R has quit [Remote host closed the connection]
tommyvyo has quit [Quit: Computer has gone to sleep.]
emergion has quit [Quit: Computer has gone to sleep.]
bel3atar has left #ruby ["Leaving"]
pu22l3r_ has joined #ruby
error_code has quit [Remote host closed the connection]
friskd has quit [Ping timeout: 256 seconds]
icole has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
otters has quit [Ping timeout: 252 seconds]
poisonarms has joined #ruby
senj has quit []
otters has joined #ruby
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
johnmilton has quit [Remote host closed the connection]
scruple has joined #ruby
senj has joined #ruby
hsbt_away is now known as hsbt
dukedave has joined #ruby
mmitchell has joined #ruby
pyr0commie has quit [Remote host closed the connection]
eka has quit [Remote host closed the connection]
googya has joined #ruby
danshultz has quit [Remote host closed the connection]
chendo_ has quit [Ping timeout: 264 seconds]
riley526 has quit [Remote host closed the connection]
moos3 has quit [Quit: Computer has gone to sleep.]
chendo_ has joined #ruby
mmitchell has quit [Remote host closed the connection]
devdazed has quit [Ping timeout: 240 seconds]
<pr0ton>
how do i rescue multiple exceptions in the same block?
<pr0ton>
like rescue (exA, exB) => e ?
<pr0ton>
intellij says it's wrong
LouisGB has quit [Ping timeout: 252 seconds]
devdazed has joined #ruby
mathie has joined #ruby
moos3 has joined #ruby
chendo_ has quit [Ping timeout: 255 seconds]
generalissimo has quit [Remote host closed the connection]
advorak has joined #ruby
<heftig>
pr0ton: just remove the parentheses
<heftig>
then the syntax is correct
<pr0ton>
got it thx
mildfate has quit [Quit: Leaving.]
chendo_ has joined #ruby
mathie has quit [Ping timeout: 255 seconds]
mildfate has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
NiteRain has joined #ruby
davidcelis has quit [Quit: K-Lined.]
mrsolo has quit [Quit: Leaving]
louism2_ has joined #ruby
tommyvyo_ has joined #ruby
<louism2_>
hello
<foohey>
hi
<louism2_>
haha
<louism2_>
wasn't sure if I could post to the chat
burlesona has joined #ruby
<foohey>
seems you can
<foohey>
:)
leonardorb has quit [Remote host closed the connection]
dankest is now known as dankest|away
jds__ has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
Virunga has quit [Remote host closed the connection]
<louism2_>
I am trying to find instances of a website string (www.google.com) within a larger string of text. I then want to add the anchor tags around it so it shows up as a link in the text. I am ok with Regexps and I get how to find the website using Strings gsub method but I am unclear as to how I would add the tags to the text and then insert it back into the larger string?
Goles has joined #ruby
fred909 has quit [Ping timeout: 256 seconds]
jobicoppola has quit [Quit: Computer has gone to sleep.]
Jasko2 has quit [Read error: Connection reset by peer]
fms has quit [Quit: leaving]
jds__ has quit [Ping timeout: 252 seconds]
Jasko2 has joined #ruby
sn0wb1rd has joined #ruby
joeycarmello has quit [Remote host closed the connection]
a_a_g1 has quit [Read error: Connection reset by peer]
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
miso1337 has quit [Quit: afk]
FrankMartin has joined #ruby
<FrankMartin>
given R rectangles, numbered 1 through R. The width and height of the i-th rectangle are Ni and Mi unit respectively. There is a turtle located on the top-left corner of each rectangle. For each rectangle, count the number of ways the turtle can reach the bottom-right corner, if each turtle can only move right or down 1 unit at any time.The turtle is not allowed to move outside the rectangle, but, of course, the turtle can move on the boundary of the re
<FrankMartin>
count the number of ways each turtle can reach the bottom-right corner using the same rule as before
techhelp2 has quit [Quit: This computer has gone to sleep]
<FrankMartin>
anybody listening?
<FrankMartin>
what the hell place it is. Nobody interested outta 462 fellows
<FrankMartin>
:(
robbyoconnor has joined #ruby
cantonic has quit [Ping timeout: 240 seconds]
cantonic_ is now known as cantonic
burgestrand has joined #ruby
staafl has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
haxrbyte has joined #ruby
mercwithamouth has joined #ruby
haxrbyte_ has joined #ruby
<havenn>
FrankMartin: Turtles?
Goles has quit [Quit: Computer has gone to sleep.]
rohit has joined #ruby
<havenn>
FrankMartin: I would suggest not having turtles traverse rectangles.
haxrbyte has quit [Ping timeout: 256 seconds]
<jtcoon>
put the turtles in the cloud and parallelize them
<jtcoon>
then apply a genetic algorithm to determine the best turtle
<jtcoon>
then make them have sex using the computer cloud
keyvan has joined #ruby
keyvan has joined #ruby
keyvan has quit [Changing host]
jakehow has quit [Ping timeout: 264 seconds]
djdb has joined #ruby
digitalcakestudi has quit [Quit: Leaving.]
skcin7 has joined #ruby
<havenn>
Homework complete.
love_color_text has quit [Ping timeout: 255 seconds]
manizzle has quit [Ping timeout: 255 seconds]
postmodern has joined #ruby
mathie has joined #ruby
mneorr has joined #ruby
<FrankMartin>
are you gone nuts? jtcoon?
<FrankMartin>
given R rectangles, numbered 1 through R. The width and height of the i-th rectangle are Ni and Mi unit respectively. There is a turtle located on the top-left corner of each rectangle. For each rectangle, count the number of ways the turtle can reach the bottom-right corner, if each turtle can only move right or down 1 unit at any time.The turtle is not allowed to move outside the rectangle, but, of course, the turtle can move on the boundary of the re
tagrudev has joined #ruby
<FrankMartin>
count the number of ways each turtle can reach the bottom-right corner using the same rule as before . time =1 sec
mathie has quit [Ping timeout: 260 seconds]
rohit has quit [Read error: Connection reset by peer]
FrankMartin has quit [Ping timeout: 240 seconds]
<cj3kim>
lol
zommi has joined #ruby
dyrot has quit [Quit: ThrashIRC v2.8 sic populo comunicated]
luckyruby has quit [Remote host closed the connection]
nga4 has quit [Ping timeout: 250 seconds]
moshee has quit [Ping timeout: 264 seconds]
chendo_ has quit [Ping timeout: 264 seconds]
rohit has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
chendo_ has joined #ruby
chendo_ has joined #ruby
chendo_ has quit [Changing host]
GoGoGarrett has quit [Remote host closed the connection]
<burgestrand>
aquagrunty: ruby does not have named arguments until v2.0 that is not properly out yet.
<burgestrand>
aquagrunty: what you have there are two optional arguments.
<burgestrand>
aquagrunty: ruby does have this quirk, that when passing a hash to a method without brackets, ruby will assume it’s all part of the same (and last) argument. This way you can pass a hash to a method, that looks like keyword arguments.
aaronmacy has joined #ruby
<burgestrand>
aquagrunty: but you still have to extract your parameters, handle defaults, and invalid options.
matrixise has quit [Ping timeout: 252 seconds]
rvchangue has quit [Read error: Connection reset by peer]
BoomCow has quit [Quit: This computer has gone to sleep]
banjara has joined #ruby
benlieb has quit [Client Quit]
scruple has quit [Quit: Leaving]
mafolz has quit [Client Quit]
mafolz has joined #ruby
RudyValencia has joined #ruby
Elhu has joined #ruby
Phoop has joined #ruby
Whackatre is now known as w|t
blaxter has joined #ruby
[Neurotic] has joined #ruby
mafolz has quit [Client Quit]
jsilver has quit [Remote host closed the connection]
mafolz has joined #ruby
chimkan has quit [Quit: chimkan]
Elhu has quit [Ping timeout: 252 seconds]
havenn has quit [Remote host closed the connection]
aaronmacy has quit [Quit: Leaving.]
havenn has joined #ruby
Elhu has joined #ruby
KevinSjoberg has joined #ruby
keyvan has quit [Remote host closed the connection]
L1 has quit [Quit: Quitter]
yankeefan04 has joined #ruby
havenn has quit [Ping timeout: 265 seconds]
Morkel has joined #ruby
yankeefan04 has quit [Remote host closed the connection]
rohit has quit [Quit: Leaving]
mathie has joined #ruby
maesbn has joined #ruby
mathie has quit [Ping timeout: 255 seconds]
jsilver_ has joined #ruby
hotovson has joined #ruby
jsilver_ has quit [Remote host closed the connection]
Jasko2 has quit [Read error: Connection reset by peer]
Elhu has quit [Quit: Computer has gone to sleep.]
Jasko2 has joined #ruby
xpen has quit [Ping timeout: 264 seconds]
Slivka has joined #ruby
schaary has joined #ruby
iamjarvo1 has quit [Quit: Leaving.]
a_a_g has joined #ruby
dr_bob has joined #ruby
zigomir has joined #ruby
frihd has joined #ruby
Dreamer3 has quit [Ping timeout: 252 seconds]
Rydefalk has joined #ruby
Dreamer3 has joined #ruby
ephemerian has joined #ruby
maletor has quit [Ping timeout: 240 seconds]
eldariof has joined #ruby
Dreamer3 has quit [Ping timeout: 252 seconds]
miso1337 has joined #ruby
<aquagrunty>
right
mcoffee has quit [Ping timeout: 252 seconds]
<aquagrunty>
burgestrand: you use the :notation too
<aquagrunty>
i'm not quite sure yet
<aquagrunty>
what it means
<aquagrunty>
sorry i just started this week
<aquagrunty>
i don't understand the difference between
<aquagrunty>
{ :a=>1 }
<aquagrunty>
and
nga4 has joined #ruby
<aquagrunty>
{ 'a'=>1 }
<burgestrand>
aquagrunty: how about { 5 => 1 } vs { "five" => 1 }?
<aquagrunty>
are they the same
<aquagrunty>
i don't get it
<burgestrand>
aquagrunty: you see the difference there?
<aquagrunty>
well
<aquagrunty>
no i get that
<aquagrunty>
yeah
<aquagrunty>
number vs str
<aquagrunty>
int vs str as the key
Tumulte has joined #ruby
<aquagrunty>
but what the heck is a :this
<Tumulte>
hi
Dreamer3 has joined #ruby
banjara has quit [Quit: Leaving.]
<burgestrand>
aquagrunty: { :a => 1 } and { "a" => 1 } looks more similar, but is no more alike than { 5 => 1 } and { "five" => 1 }
<aquagrunty>
ive never seen this notation in any other language
baphled has joined #ruby
aharris6 has joined #ruby
<aquagrunty>
so what is a :a
<aquagrunty>
is there a name for this
<aquagrunty>
strange looking variable
<aquagrunty>
like @
<aquagrunty>
is a property
<burgestrand>
aquagrunty: we call it a symbol in ruby, you often use them in places where you need an identifier of some sort, but don’t care about what the value is
<aquagrunty>
?
<burgestrand>
aquagrunty: say, sometimes you want a name for something
<burgestrand>
aquagrunty: like, describing a person, you have { "name" => "Moo", "race" => "Monkey" }
<burgestrand>
this person is very primitive
Phoop has quit [Quit: Phoop]
<burgestrand>
aquagrunty: problem is, "name" is a string, and when ruby compare strings, ruby most look at all of the string
<aquagrunty>
with hash keys of 'name' and 'race' right?
<burgestrand>
aquagrunty: yes
<aquagrunty>
oh
<aquagrunty>
ok
mneorr has quit [Remote host closed the connection]
<aquagrunty>
so then how does :x perform differently?
<burgestrand>
aquagrunty: thing with ruby strings is that, whenever you use a string, it is always a new string
<burgestrand>
aquagrunty: those are two objects, even though they look like the same string
<burgestrand>
aquagrunty: so when you do "name" == "name", ruby must look at every character of both strings to see if they are equal or not
<aquagrunty>
allocating it in memory
<aquagrunty>
which sucks
<aquagrunty>
and is slow
<aquagrunty>
right
<burgestrand>
not sucks, but can be slow if you do it many many many items
<Tumulte>
I got users with password crypted with php's crypt($string,$salt). I'd like my users to be able to log in a ruby program, but can I compare php's hashes with ruby ?
<burgestrand>
… items -> time
mneorr has joined #ruby
filipe has joined #ruby
<burgestrand>
aquagrunty: so, to optimize this you change it
<burgestrand>
aquagrunty: you do { NAME_ID => "Moo", RACE_ID => "monkey" }, and then assign NAME_ID = 5, RACE_ID = 6
<aquagrunty>
oh
<aquagrunty>
:accessor?
<burgestrand>
aquagrunty: now NAME_ID == NAME_ID is very very fast, because the number 5 is always the number 5, i.e. 5.object_id == 5.object_id
<aquagrunty>
it would
<burgestrand>
aquagrunty: so ruby don’t need to compare contents of NAME_ID, because it does not matter
<aquagrunty>
need to be in the same scope though right?
<aquagrunty>
eg
<burgestrand>
aquagrunty: yeah, but if you ignore that, this new method is faster than { "name" => "Moo", "race" => "monkey" }, you understand this?
<aquagrunty>
yeah i get that
<aquagrunty>
same memory allocation
<burgestrand>
aquagrunty: but it is also problematic, one thing is scope like you said
<burgestrand>
aquagrunty: but also, say you want a new field, last name
<burgestrand>
aquagrunty: so you make LAST_NAME_ID = 5
Villadelfia has quit [Read error: Operation timed out]
jenrzzz has joined #ruby
<burgestrand>
aquagrunty: and make your new hash { NAME_ID => "Moo", LAST_NAME_ID => "Boo", RACE_ID => "monkey" }, you see a problem here?
<aquagrunty>
oh
<aquagrunty>
boom
<aquagrunty>
explosion
<burgestrand>
aquagrunty: NAME_ID == LAST_NAME_ID
<burgestrand>
aquagrunty: but there is no way to tell
elkclone has joined #ruby
artm has joined #ruby
<burgestrand>
aquagrunty: what you can do now is replace it with a symbol instead
<burgestrand>
aquagrunty: a symbol in ruby is always the same as the same symbol, so :name.object_id == :name.object_id, same memory
<aquagrunty>
whoa cool
piotr has joined #ruby
bradhe has quit [Remote host closed the connection]
<burgestrand>
aquagrunty: so when ruby compares them, it is almost instant, no speed loss at all
SeySayux has quit [Ping timeout: 244 seconds]
<aquagrunty>
thats a very cool concept of the language
<burgestrand>
aquagrunty: and, in addition, since it is always the same memory, ruby will also not allocate new object
banister`sleep has quit [Ping timeout: 240 seconds]
Phoop has joined #ruby
<burgestrand>
aquagrunty: so, :name is a symbol, it is always the same object, and the *value* of :name is just :name, like the value of 5 is just 5
mneorr has quit [Remote host closed the connection]
<aquagrunty>
i'm still getting used to this whole everything is an object perspective
rellin has quit [Ping timeout: 252 seconds]
<aquagrunty>
nice
<burgestrand>
aquagrunty: so, like you might understand, symbols are useful in hashes for this reason, but only as an optimization :)
<aquagrunty>
so it's like
<aquagrunty>
a definition
<burgestrand>
aquagrunty: yes, an identifier, or a name
bradhe has joined #ruby
<aquagrunty>
is it still limited by scope?
<burgestrand>
aquagrunty: no
<burgestrand>
aquagrunty: and it can never clash with another identifier
<aquagrunty>
?
frihd1 has joined #ruby
<burgestrand>
aquagrunty: :name != :last_name
<aquagrunty>
you can't assign identifiers to other identifiers?
<burgestrand>
aquagrunty: perhaps obvious, just wanted to point it out :)
<aquagrunty>
yeah
<burgestrand>
aquagrunty: no, you cannot do :name = something, just like you cannot do 5 = something, or "name" = something
<aquagrunty>
its still contained to the scope of the file?
Jasko2 has quit [Read error: Connection reset by peer]
<burgestrand>
aquagrunty: :name is the same everywhere in your entire program
<aquagrunty>
like if i have includeme.rb
<aquagrunty>
and i require "includeme"
Jasko2 has joined #ruby
Villadelfia has joined #ruby
<aquagrunty>
and i define :name in there
<burgestrand>
aquagrunty: not define, use
SeySayux has joined #ruby
<burgestrand>
but okay
<aquagrunty>
right
<burgestrand>
:)
frihd has quit [Ping timeout: 244 seconds]
<aquagrunty>
but in say
<burgestrand>
aquagrunty: ruby creates symbols when they are used, no need for a separate definition
<burgestrand>
aquagrunty: once created, ruby never forgets about a symbol, which is the main downside of them
xpen has joined #ruby
<burgestrand>
aquagrunty: when you type them out in your code, you never need to worry about memory usage of symbols, but if you create them dynamically, you need to be careful
<aquagrunty>
so its like a global?
<burgestrand>
aquagrunty: yeah, like a global id
<aquagrunty>
ahh ok
<aquagrunty>
this language is very flexible, i'm enjoying it so far
<burgestrand>
aquagrunty: so never do 1_000_000.times { |i| i.to_s.to_sym } (makes 1 million symbols of every number 0-1mill)
<burgestrand>
aquagrunty: because they are never garbage collected
<aquagrunty>
ew
<aquagrunty>
right
<aquagrunty>
thats totally cool that you can do that on one line though
<aquagrunty>
lol
banister`sleep has joined #ruby
<aquagrunty>
heh
Slivka has quit [Remote host closed the connection]
<burgestrand>
aquagrunty: I got to go, live well :)
<aquagrunty>
you too
<aquagrunty>
thanks for explaining!
aquagrunty has left #ruby [#ruby]
nomenkun has quit [Remote host closed the connection]
jds__ has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
kstephens has quit [Ping timeout: 264 seconds]
Meck has joined #ruby
kstephens has joined #ruby
Meck has left #ruby [#ruby]
jenrzzz has quit [Ping timeout: 260 seconds]
dankest is now known as dankest|away
dankest|away is now known as dankest
jon_than_ has joined #ruby
Choobie has quit [Remote host closed the connection]
igro has joined #ruby
baphled has quit [Ping timeout: 252 seconds]
Elhu has joined #ruby
bradhe has quit [Remote host closed the connection]
ryanf has quit [Quit: leaving]
bradhe has joined #ruby
hoelzro|away is now known as hoelzro
icooba has joined #ruby
miso1337 has quit [Quit: afk]
jds__ has quit [Remote host closed the connection]
mafolz has quit [Read error: Connection reset by peer]
osvico has quit [Ping timeout: 252 seconds]
cdt has joined #ruby
jds__ has quit [Ping timeout: 276 seconds]
h8R has joined #ruby
mafolz has joined #ruby
Hanmac1 has quit [Ping timeout: 265 seconds]
mafolz has quit [Read error: Connection reset by peer]
u89 has joined #ruby
u89 has quit [Remote host closed the connection]
manizzle has quit [Ping timeout: 255 seconds]
u89 has joined #ruby
aaronmacy has joined #ruby
icole has quit [Remote host closed the connection]
mafolz has joined #ruby
icole has joined #ruby
maletor has joined #ruby
babonk has quit [Read error: Connection reset by peer]
babonk has joined #ruby
babonk has quit [Changing host]
babonk has joined #ruby
maletor has quit [Max SendQ exceeded]
dawkirst has joined #ruby
dankest is now known as dankest|away
dankest|away is now known as dankest
maletor has joined #ruby
icole has quit [Ping timeout: 252 seconds]
jimeh has joined #ruby
mathie has joined #ruby
aharris6 has quit [Remote host closed the connection]
bradhe has joined #ruby
mafolz has quit [Ping timeout: 265 seconds]
mafolz has joined #ruby
tobinharris has joined #ruby
estan_ is now known as estan
BiHi has joined #ruby
bradhe has quit [Ping timeout: 255 seconds]
dmiller has joined #ruby
jds__ has joined #ruby
dmiller has quit [Ping timeout: 246 seconds]
eka has joined #ruby
Jasko2 has quit [Read error: Connection reset by peer]
Jasko2 has joined #ruby
ChampS666 has joined #ruby
goraxe has quit [Ping timeout: 244 seconds]
timonv has joined #ruby
jds__ has quit [Ping timeout: 255 seconds]
marr has joined #ruby
BiHi has quit [Quit: Computer has gone to sleep]
bel3atar has joined #ruby
ttt has quit [Remote host closed the connection]
BiHi has joined #ruby
crazed_ has joined #ruby
Gooder has joined #ruby
nomenkun has joined #ruby
nomenkun has quit [Remote host closed the connection]
nomenkun has joined #ruby
crazed has quit [Ping timeout: 260 seconds]
elaptics`away is now known as elaptics
sepp2k has quit [Quit: Leaving.]
ChampS666 has quit [Ping timeout: 256 seconds]
dankest is now known as dankest|away
slainer68 has joined #ruby
adambeynon has joined #ruby
aaronmacy has quit [Quit: Leaving.]
crazed_ has quit [Ping timeout: 252 seconds]
postmodern has quit [Ping timeout: 248 seconds]
ttt has joined #ruby
crazed has joined #ruby
LouisGB has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
fyolnish has quit [Remote host closed the connection]
slainer68 has quit [Remote host closed the connection]
berserkr has joined #ruby
postmodern has joined #ruby
chussenot has joined #ruby
slainer68 has joined #ruby
arya has joined #ruby
timmow has joined #ruby
timonv has quit [Remote host closed the connection]
rdark has joined #ruby
lele has quit [Ping timeout: 246 seconds]
arturaz has joined #ruby
Jasko2 has quit [Read error: Connection reset by peer]
Jasko2 has joined #ruby
jds__ has joined #ruby
timonv has joined #ruby
rohit has joined #ruby
marr has quit [Ping timeout: 252 seconds]
lele has joined #ruby
arturaz has quit [Remote host closed the connection]
aganov has joined #ruby
nari has quit [Ping timeout: 245 seconds]
nemesit has joined #ruby
Zai00 has joined #ruby
matiit has joined #ruby
h8R has quit [Read error: Connection reset by peer]
tk___ has joined #ruby
matiit has left #ruby [#ruby]
sebastianb has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby
apeiros_ has joined #ruby
sebastianb has joined #ruby
adeponte has quit [Remote host closed the connection]
jds__ has quit [Ping timeout: 264 seconds]
rweng has joined #ruby
bel3atar has quit [Ping timeout: 248 seconds]
hoelzro is now known as hoelzro|away
<rweng>
hi, I'm a little stuck with my regex, can you help? /\s*(?<country>.*)/ matches, making it optional with /(\s*(?<country>.*))?/ doesn't work though
arturaz has joined #ruby
F1skr has quit [Quit: WeeChat 0.3.9.2]
cableray has quit [Quit: cableray]
frihd1 has quit [Quit: Leaving.]
sebastianb has quit [Ping timeout: 246 seconds]
krz has quit [Quit: krz]
devdazed has quit [Ping timeout: 252 seconds]
devdazed has joined #ruby
Russell^^ has joined #ruby
rohit has quit [Read error: Connection reset by peer]
gyre007 has joined #ruby
sebastianb has joined #ruby
frihd has joined #ruby
<JonnieCache>
rweng: im guessing its to do with the whitespace
<oqa>
aww.. I got hit by the "variable pass-by-ref between threads if defined in same scope" issue. does anyone remember any articles about that would explain the issue and its semantics
nerd has quit [Ping timeout: 265 seconds]
goraxe has joined #ruby
hotovson has joined #ruby
carloslopes has joined #ruby
leonardorb has joined #ruby
nerd has joined #ruby
<Hanmac>
oO
leonardorb has quit [Read error: No route to host]
leonardorb has joined #ruby
dayvulTBK has joined #ruby
jackbrownhf has joined #ruby
jackbrownhf has quit [Changing host]
jackbrownhf has joined #ruby
jaygen_ has quit [Remote host closed the connection]
<oqa>
still wondering about the actual semantics that make it behave like that
<oqa>
what would be a good source for information
<burgestrand>
oqa: yeah, sorry, can‘t help you with that at the moment, but it’s good practice to pass your arguments through Thread.new and into the block via block arguments.
<burgestrand>
(like in my above code)
<burgestrand>
oqa: pretty much the same thing that your first example does, only without the extra method
Bry8Star has joined #ruby
<oqa>
that was actually a problem in jruby test code that originally used java's ThreadExecutor
kil0byte_ has joined #ruby
<banister`sleep>
burgestrand: is it snowing in swe?
<oqa>
it didn't offer that kind of a passthrough option
<burgestrand>
banister`sleep: not at the moment in gothenburg, clear blue sky and -10C or so, stockholm has had snow chaos with buses and trains cancelled all week pretty much
<burgestrand>
banister`sleep: lots of my friends had to sleep in the city (at work, friends etc) because buses wouldn’t take them home
<oqa>
oh crap.. I guess the same weather is coming to finland with a little delay
karupanerura has joined #ruby
Iszak has joined #ruby
Iszak has quit [Max SendQ exceeded]
browndawg has quit [Quit: Leaving.]
kil0byte has quit [Ping timeout: 256 seconds]
<Hanmac>
be prepared about when block arguments are the same name than local variables ... that can be cokoloko on <1.9
Iszak has joined #ruby
Iszak has quit [Max SendQ exceeded]
Iszak has joined #ruby
Iszak has quit [Max SendQ exceeded]
Iszak has joined #ruby
Iszak has quit [Max SendQ exceeded]
dayvulTBK has quit [Ping timeout: 264 seconds]
Iszak has joined #ruby
Iszak has quit [Max SendQ exceeded]
atmosx has quit [Remote host closed the connection]
<CamonZ>
shevy: yes; thanks. I already tried it on this end as well
<CamonZ>
shevy: it's for a resque job that uses resque-retry which catches the Resque::Failure in order to re-schedule the retry
<CamonZ>
shevy: but in this particular case I need to do some cleanup before the job ends to reset the processing status to false so it can perform the job again
<shevy>
hehehe
<shevy>
sounds like a big office, where a paper must be written, but everyone sends it to another delegate :D
<shevy>
"you write this... no, you do! no... I give it to john..."
<CamonZ>
shevy: hehehehe, nah, it's a small startup actually
GoGoGarrett has joined #ruby
<CamonZ>
but the idea to use resque-retry was because since it's a job that connects to the internet there's a lot of transient connection errors
NiteRain has joined #ruby
kpshek has joined #ruby
DrShoggoth has joined #ruby
ryez has joined #ruby
nari has joined #ruby
eka has joined #ruby
postmodern has quit [Quit: Leaving]
solidoodlesuppor has joined #ruby
binaryplease has joined #ruby
juarlex has quit [Read error: Connection reset by peer]
juarlex has joined #ruby
eka has quit [Read error: Connection reset by peer]
GoGoGarrett has quit [Remote host closed the connection]
eka has joined #ruby
tonytonyjan is now known as Jian
Jian is now known as tonytonyjan
schaary has quit [Quit: Leaving.]
carloslopes has joined #ruby
Goles has joined #ruby
arya has quit []
hsbt_away is now known as hsbt
Goles has quit [Max SendQ exceeded]
icooba has quit [Read error: Connection reset by peer]
adamnbowen has joined #ruby
Goles has joined #ruby
wdf has joined #ruby
icooba has joined #ruby
muloka has joined #ruby
tonytonyjan has quit [Quit: Reconnecting]
tonytonyjan has joined #ruby
skaczor has joined #ruby
jlast has joined #ruby
ryez has quit [Read error: Connection reset by peer]
maesbn has quit [Remote host closed the connection]
Goles has quit [Read error: Connection reset by peer]
rweng has joined #ruby
ananthakumaran has joined #ruby
geekbri has joined #ruby
techhelp has quit [Quit: This computer has gone to sleep]
jackbrownhf has joined #ruby
jackbrownhf has quit [Changing host]
jackbrownhf has joined #ruby
timmow has quit [Quit: is having a nap]
rweng has quit [Client Quit]
sailias has joined #ruby
dr_bob has quit [Quit: Leaving.]
_nitti has joined #ruby
sweet_kid has joined #ruby
clj_newb has joined #ruby
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
joeycarmello has joined #ruby
chimkan has joined #ruby
xyzodiac has joined #ruby
osvico has quit [Ping timeout: 255 seconds]
baphled has joined #ruby
dr_bob has joined #ruby
Goles has joined #ruby
phantasm66 has joined #ruby
nathankleyn has joined #ruby
mengu has joined #ruby
chussenot has quit [Quit: chussenot]
g_bleezy has quit [Ping timeout: 240 seconds]
tjbiddle has joined #ruby
binaryplease has joined #ruby
mikepack_ has joined #ruby
chussenot has joined #ruby
nilg has joined #ruby
the_hack has quit [Quit: Leaving...]
baphled has quit [Ping timeout: 260 seconds]
stopbit has joined #ruby
Morkel has joined #ruby
arya has joined #ruby
nilg has quit [Remote host closed the connection]
generalissimo has joined #ruby
joeycarmello has quit [Read error: Connection reset by peer]
joeycarmello has joined #ruby
nari has quit [Ping timeout: 260 seconds]
burlesona has joined #ruby
nathankleyn has left #ruby [#ruby]
nomenkun_ has quit [Remote host closed the connection]
<sonne>
when exactly does ruby's garbage collector get to work?
nomenkun has joined #ruby
browndawg has quit [Quit: Leaving.]
CodeVision has joined #ruby
<sonne>
i have a class that does Tempfile.new on initialize(), and the tempfile persists on the file system.... until i create another object of that class, at that point the file gets deleted (which is what happens when Tempfile is GCed, according to doc)
<hoelzro>
sonne: it's nondeterministic
<sonne>
hoelzro, what do you mean?
<hoelzro>
it means you can't rely on it running at any particular point in your program
<_nitti>
i'm pretty sure there's a method on GC that will let you manually trigger collection
<hoelzro>
you can only rely on it running *sometime*
<hoelzro>
there is
<sonne>
well, i would hope that the GC doesn't run at least until my object is destroyed
<_nitti>
GC::start
<sonne>
but the old object is still there, why should it be GCed?
<_nitti>
GC::disable
<hoelzro>
sonne: the GC will clean up your object only after there are no more strong references to it
<_nitti>
yes
<_nitti>
it won't collect your object if you still have references out somewhere
<hoelzro>
if you need to mess with GC::*, you're likely doing something wrong.
<sonne>
sec, let me pastebin
<_nitti>
the whole point of GC is that you don't have to screw with it ;)
<hoelzro>
exactly
jackbrownhf has quit [Remote host closed the connection]
wermel has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
ebouchut has joined #ruby
rakuN has joined #ruby
<shevy>
thx
filipe has quit [Read error: Connection reset by peer]
<shevy>
that is so weird ... :\
silent1mezzo has left #ruby ["Leaving..."]
yshh has quit [Ping timeout: 260 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
<Hanmac>
but funny gameplay
vivien_ has joined #ruby
ben225 has joined #ruby
mame0 has quit [Ping timeout: 244 seconds]
fbernier has quit [Ping timeout: 244 seconds]
jhunter has quit [Ping timeout: 252 seconds]
headius_ has joined #ruby
headius has quit [Read error: Connection reset by peer]
headius_ is now known as headius
nat2610 has quit [Quit: Leaving.]
banister_ has joined #ruby
mame0 has joined #ruby
<shevy>
lol nuclear winter? reminds me of the computer game Fallout
<shevy>
too bad there are so few games in ruby
beneggett has quit [Quit: Computer has gone to sleep.]
tvw has quit [Remote host closed the connection]
nat2610 has joined #ruby
psychouroboros has joined #ruby
psychouroboros has quit [Changing host]
psychouroboros has joined #ruby
psychouroboros has quit [Read error: Connection reset by peer]
psychouroboros has joined #ruby
psychouroboros has joined #ruby
psychouroboros has quit [Changing host]
g_bleezy has joined #ruby
fbernier has joined #ruby
rakuN has quit [Quit: rakuN]
workmad3 has joined #ruby
Monie has quit [*.net *.split]
alexim has quit [*.net *.split]
nick_h has quit [*.net *.split]
pkeni has quit [*.net *.split]
Adget has quit [*.net *.split]
RickSchmitty has quit [*.net *.split]
SCommette has quit [*.net *.split]
banisterfiend has quit [*.net *.split]
Weazy has quit [*.net *.split]
tr4656 has quit [*.net *.split]
aef has quit [*.net *.split]
v0n has quit [*.net *.split]
TomRone has quit [*.net *.split]
chendo_ has quit [*.net *.split]
jbermudes has quit [*.net *.split]
kennyvb has quit [*.net *.split]
zaki has quit [*.net *.split]
ionte has quit [*.net *.split]
stnly has quit [*.net *.split]
RailWolf has quit [*.net *.split]
nazty has quit [*.net *.split]
dv_ has quit [*.net *.split]
lorn has quit [*.net *.split]
akl has quit [*.net *.split]
jrabbit has quit [*.net *.split]
m_3 has quit [*.net *.split]
tectonic has quit [*.net *.split]
bluehavana has quit [*.net *.split]
justinabrahms has quit [*.net *.split]
juha_ has quit [*.net *.split]
kkh has quit [*.net *.split]
zaiste has quit [*.net *.split]
rotor has quit [*.net *.split]
SoonerBourne has quit [*.net *.split]
Rious has quit [*.net *.split]
{^_^}_______ has quit [*.net *.split]
elliottcable has quit [*.net *.split]
dubios has quit [*.net *.split]
KRF has quit [*.net *.split]
phrame has quit [*.net *.split]
mksm has quit [*.net *.split]
undert_ has quit [*.net *.split]
karnowski has quit [*.net *.split]
SecretAgent has quit [*.net *.split]
fatninja has quit [*.net *.split]
rapha has quit [*.net *.split]
bakedb_ has quit [*.net *.split]
JoeTheGuest has quit [*.net *.split]
happosade has quit [*.net *.split]
brian-_ has quit [*.net *.split]
willcodeforfoo has quit [*.net *.split]
psychouroboros has quit [Client Quit]
jgarvey has joined #ruby
Rix is now known as Gliner
_nitti has joined #ruby
pandres has left #ruby [#ruby]
ryanf has joined #ruby
ChampS666 has joined #ruby
timonv has quit [Remote host closed the connection]
arya_ has quit [Ping timeout: 260 seconds]
g_bleezy has quit [Ping timeout: 248 seconds]
arya has joined #ruby
Monie has joined #ruby
aef has joined #ruby
Adget has joined #ruby
pkeni has joined #ruby
nick_h has joined #ruby
alexim has joined #ruby
SCommette has joined #ruby
Weazy has joined #ruby
tr4656 has joined #ruby
RailWolf has joined #ruby
RickSchmitty has joined #ruby
jbermudes has joined #ruby
dv_ has joined #ruby
tectonic has joined #ruby
akl has joined #ruby
zaki has joined #ruby
lorn has joined #ruby
m_3 has joined #ruby
kennyvb has joined #ruby
rapha has joined #ruby
TomRone has joined #ruby
bluehavana has joined #ruby
16WABGBA3 has joined #ruby
nazty has joined #ruby
justinabrahms has joined #ruby
jrabbit has joined #ruby
karnowski has joined #ruby
ionte has joined #ruby
stnly has joined #ruby
zaiste has joined #ruby
juha_ has joined #ruby
rotor has joined #ruby
phrame has joined #ruby
kkh has joined #ruby
dubios has joined #ruby
SoonerBourne has joined #ruby
mksm has joined #ruby
Rious has joined #ruby
SecretAgent has joined #ruby
fatninja has joined #ruby
undert_ has joined #ruby
bakedb_ has joined #ruby
elliottcable has joined #ruby
JoeTheGuest has joined #ruby
{^_^}_______ has joined #ruby
KRF has joined #ruby
happosade has joined #ruby
brian-_ has joined #ruby
willcodeforfoo has joined #ruby
statarb3 has quit [Quit: Leaving]
Gliner is now known as Fewona
elliottcable has quit [Max SendQ exceeded]
SecretAgent has quit [Max SendQ exceeded]
Adget has quit [Read error: Connection reset by peer]
aef has quit [Excess Flood]
Adget has joined #ruby
SecretAgent has joined #ruby
mneorr_ has joined #ruby
elliottcable has joined #ruby
ben225 has quit [Quit: Computer has gone to sleep.]
shevy has quit [Ping timeout: 264 seconds]
slash_nick has quit [Ping timeout: 240 seconds]
bradhe has quit [Remote host closed the connection]
mneorr has quit [Read error: Connection reset by peer]
aef has joined #ruby
wallerdev has joined #ruby
reset has quit [Quit: Leaving...]
Proshot has joined #ruby
slash_nick has joined #ruby
tombar has quit [Remote host closed the connection]
bradhe has joined #ruby
ryannielson has joined #ruby
beneggett has joined #ruby
arusso has left #ruby [#ruby]
_nitti has quit [Remote host closed the connection]
_nitti has joined #ruby
arusso has joined #ruby
jhunter has joined #ruby
Jackneill has quit [Quit: Jackneill]
thomasfedb has quit [Ping timeout: 244 seconds]
hsbt_away is now known as hsbt
BadProphet has joined #ruby
havenn has joined #ruby
thomasfedb has joined #ruby
u89 has quit [Read error: Connection reset by peer]
gridaphobe has joined #ruby
u89 has joined #ruby
shevy has joined #ruby
Eplemosen has joined #ruby
Slivka has joined #ruby
JDubs has joined #ruby
<JDubs>
Hello o/
elico has quit [Remote host closed the connection]
<JDubs>
Need some quick help: http://pastie.org/5495600 The code works fine when I run it from IRB calling the run method manually, however it won't print the results properly on its own
fmcgeough has quit [Quit: fmcgeough]
<banister_>
JDubs: what ruby version r u on
Eplemosen has quit [Client Quit]
<JDubs>
sec
jonathanwallace has joined #ruby
bradhe has quit [Remote host closed the connection]
<JDubs>
1.9.3p194
<banister_>
JDubs: you're not showing 1. how you load it in irb. 2. what error you're getting
kryl99_ has joined #ruby
mahmoudimus has quit [Remote host closed the connection]
<JDubs>
I'm not getting any errors. I'm just using load, and then that runs the part at the bottom...I enter some years, and then it exits without an error but doesn't print anything
<JDubs>
however, if I create a Years and run Years.run manually, it works
havenn has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 255 seconds]
mahmoudimus has joined #ruby
havenn has joined #ruby
<waxjar>
JDubs, i think you have to convert your gets.chomp to Integers first, because it makes a Range of String now?
<JDubs>
ahhh i see!
Spaceboy has joined #ruby
<JDubs>
let me try that
<waxjar>
*Strings
<JDubs>
wxjar: Yay, that worked XD
<JDubs>
thanks!
<waxjar>
yw :)
mengu has quit [Quit: Konversation terminated!]
aaronmacy has quit [Quit: Leaving.]
dmiller has joined #ruby
havenn has quit [Read error: No route to host]
ebouchut has quit [Quit: This computer has gone to sleep]
jrist-afk is now known as jrist
hsbt is now known as hsbt_away
ebobby has joined #ruby
bradhe has joined #ruby
ddd has quit [Quit: Leaving.]
Coolhand|laptop has quit [Ping timeout: 255 seconds]
havenn has joined #ruby
Juul has joined #ruby
nomenkun has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
beneggett has joined #ruby
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
ddd has joined #ruby
headius has quit [Read error: Connection reset by peer]
Hannes3 has quit [Remote host closed the connection]
<rakl>
oh really
jonathanwallace has quit [Ping timeout: 252 seconds]
pcarrier has quit [Ping timeout: 255 seconds]
<rakl>
how do you know what failure you're referring to then
ryanf_ has joined #ruby
<waxjar>
you can give rescue a constant
<waxjar>
for example: rescue StandardError
<waxjar>
you can have multiple rescue blocks, to handle multiple exceptions
pcarrier has joined #ruby
acampos has quit [Read error: Connection reset by peer]
ryanf has quit [Quit: broken pipes |||]
ryanf_ is now known as ryanf
v0n has joined #ruby
pcarrier has quit [Client Quit]
acampos has joined #ruby
marr has joined #ruby
frogstarr78 has joined #ruby
DDAZZA has joined #ruby
Goles has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Remote host closed the connection]
mengu has joined #ruby
bluOxigen has quit [Ping timeout: 244 seconds]
ebouchut has joined #ruby
ebouchut has quit [Client Quit]
yaymukund has quit [Quit: leaving]
<lectrick>
Is the only way of creating a local value dynamically in Ruby via "eval"?
vlad_starkov has joined #ruby
dankest has joined #ruby
<banister_>
lectrick: that wont even work
<banister_>
lectrick: you can't create locals dynamically
<lectrick>
that's... seriously?
<banister_>
lectrick: true story
<lectrick>
is there a reason?
<Hanmac>
i tryed it too, you cant
<Hanmac>
its the scope
<lectrick>
Local variables assigned within eval are available after eval only if they were defined outside of eval” - dave thomas
<lectrick>
well, you can pass in the scope with binding
<banister_>
lectrick: exactly, so you're note creating the local within the eval
<banister_>
not*
jrajav has quit [Quit: I tend to be neutral about apples]
<lectrick>
but that seems like... a failing, not a logical omission
<banister_>
lectrick: yeah that'll only have the local alive inside the binding
<lectrick>
banister_: not even that, it won't do it unless the binding already defined it
<banister_>
lectrick: no, you can define it inside the binding
<banister_>
lectrick: that's how pry works :)
DDAZZA has quit [Quit: Leaving]
savant has joined #ruby
<savant>
Hi all
<savant>
I was wondering if anyone knows how I can break out of an IO.popen block
<lectrick>
banister_: but it's not available after the eval inside the binding unless it was defined before the eval inside the binding
<banister_>
lectrick: of course, it's local to the binding
<savant>
I'm using IO.popen to tail a file, but want to stop tailing as soon as I see a certain value in the file
<savant>
and I'm passing the output to a block
sailias has quit [Quit: Leaving.]
<lectrick>
banister_: well if that's the case then why isn't it available after the eval runs, which affects the binding? no?
vlad_starkov has quit [Ping timeout: 252 seconds]
<banister_>
lectrick: do u know what a binding is
<lectrick>
the current context or stack, no?
jarred_ has joined #ruby
<lectrick>
maybe i'm not 100% clear on it yet, but that's my understanding
dukedave has joined #ruby
<banister_>
it's a snapshot of the current frame, but any locals you define it it are local to the binding, they won't percolate back into the original frame the binding is a snapshot of
<lectrick>
I don't understand why if I do eval('a=5'); a; that it errors
jenrzzz has joined #ruby
tvw has joined #ruby
<waxjar>
savant, return or raising an exception?
timonv has joined #ruby
muloka has quit []
louism2_ has quit [Quit: This computer has gone to sleep]
<lectrick>
banister_: ah so it's evaluated in the context of a "snapshot" of a stack, but NOT the actual stack
jarred_ has quit [Client Quit]
<lectrick>
banister_: is this why calling 'binding' is expensive? because it's basically duping the stack or whatever?
<lectrick>
banister_: ok if that's the case then why are side effects allowed if the variable is already defined before the eval?
<banister_>
lectrick: yeah, it copies the stack to the heap
<savant>
hmmm
<lectrick>
a = 1; eval('a=5'); a #=>5, does not error
<lectrick>
eval('a=5'); a #=> DOES error
dukedave has quit [Client Quit]
<banister_>
lectrick: think of it as a closure
timonv_ has joined #ruby
<banister_>
lectrick: proc { a = 10 }.call #=> a #=> error
<banister_>
lectrick: a = 20; proc { a = 10 }.call; a #=> 10
<lectrick>
aha.
<lectrick>
now we're getting somewhere
forced_request has joined #ruby
<lectrick>
ok that makes sense! I would still like to be able to define local variables dynamically, but now I at least understand why it won't fly out of the box
<lectrick>
INTERESTING NOTE: in Ruby 1.8, this used to work :O
Nykolla_ has quit [Remote host closed the connection]
<havenn>
banister_: I wonder if a symlink in ~/.rbenv/versions/ would do it?
<banister_>
havenn: nah, paths are all screwed up
<banister_>
i think..
Proshot has quit [Quit: Leaving]
hsbt is now known as hsbt_away
bwlang has left #ruby [#ruby]
louism2_ has quit [Quit: This computer has gone to sleep]
Troy^ has joined #ruby
_nitti has joined #ruby
foohey_ has joined #ruby
havenn has quit [Remote host closed the connection]
foohey_ has quit [Client Quit]
jonathanwallace has joined #ruby
havenn has joined #ruby
robbyoconnor has joined #ruby
jslowe has joined #ruby
Adget has quit [Quit: Adget]
_jds has joined #ruby
havenn has quit [Ping timeout: 255 seconds]
Russell^^ has joined #ruby
jharris1 has quit [Quit: WeeChat 0.3.8]
dmiller has joined #ruby
dmiller has quit [Read error: Connection reset by peer]
<nateberkopec>
Is there any way to stop an enumerator from returning anything? I'm calling User.all and, when it's done, it takes about a minute to print the return value to the console.
bkzl has joined #ruby
havenn has joined #ruby
beneggett has joined #ruby
ikaros_ has quit [Quit: Ex-Chat]
MrIlyas has quit [Ping timeout: 255 seconds]
chrisbolton has joined #ruby
frogstarr78 has quit [Ping timeout: 255 seconds]
faoiseamh has quit []
<banister_>
nateberkopec: in pry? just end your expression with ';'
mmitchell has quit [Remote host closed the connection]
banseljaj is now known as imami|afk
bkzl has quit [Client Quit]
bkzl has joined #ruby
DaltonUS has quit [Quit: DaltonUS]
bbttxu has quit [Quit: bbttxu]
generalissimo has quit [Remote host closed the connection]
_nitti has quit [Remote host closed the connection]
blacktul_ has quit [Remote host closed the connection]
DaltonUS has joined #ruby
xcvd`` has joined #ruby
bkzl has quit [Client Quit]
Proshot has joined #ruby
syamajala has quit [Remote host closed the connection]
yaymukund has joined #ruby
DaltonUS has quit [Client Quit]
alanp_ has joined #ruby
alanp_ has quit [Read error: Connection reset by peer]