apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p327: http://ruby-lang.org (ruby-2.0.0-preview2) || Paste >3 lines of text on http://gist.github.com
<elaptics> rstrip to to get rid of trailing whitespace
<apeiros_> no
mrsolo has quit [Quit: Leaving]
<apeiros_> rstrip gets read of leading whitespace
<apeiros_> gah
<apeiros_> you're correct, lstrip gets rid of leading, rstrip of trailing
<havenn> <-- left right -->
<elaptics> apeiros_: no, other way round :)
<elaptics> that's how I remember it
jfl0wers has joined #ruby
SCommette has quit [Quit: SCommette]
<apeiros_> yes, yes, of course…
* apeiros_ probably should go to bed and let his body take care of that bottle of wine…
<waxjar> lol
nwertman has quit [Ping timeout: 264 seconds]
<apeiros_> company christmas dinner 0:-)
<eph3meral> a = [ 1, -2, 5, -9, 30 ]; start = 100; b = [ 101, 99, 104, 95, 125 ]; any ideas on a map/reduce or other type of transformative technique to get from a to b?
* apeiros_ off & gn8
<apeiros_> eph3meral: looks like homework? o0
<eph3meral> nope
<eph3meral> i'm faaaar too old for homework
<apeiros_> looks like range zip + map
<seanstickle> I don't even know what you're doing there
nmabry has quit [Quit: nmabry]
<apeiros_> hm, can ruby do reverse range?
<eph3meral> it's more accurately thought of as deltas = [ 1, -2, 5, -9, 30 ]; start = 100; results = [ 101, 99, 104, 95, 125 ];
<seanstickle> Adding 100? Subtracting 101?
<apeiros_> at least it looks like 100..95 zip/mapped with that array (sum of the values)
<eph3meral> so the first list is a list of changes
Russell^^ has joined #ruby
<apeiros_> ah
<seanstickle> Makes no damn sense to me.
<eph3meral> and the second list would be, if you start at value X, where do you get to if you go those distances
<apeiros_> 100 + 1 = 101, -2 = 99, +5 = 104
<eph3meral> yep
<eph3meral> exactly
<apeiros_> memo + map
<eph3meral> so, think like, change in temperatures
<reppard> is this a project euler?
fumduq has joined #ruby
c0rn has quit []
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<apeiros_> memo = start; ary.map { |value| memo += value }
<eph3meral> or water levels, and really changes in water level, add a liter, remove two liters, add five liters
mybrainis404 has quit [Ping timeout: 276 seconds]
<apeiros_> wow, I'm drunk and I can solve a problem in less than a minute…
<eph3meral> apeiros_: hmm, ok, what about each_with_object()
heftig has quit [Read error: Connection reset by peer]
<eph3meral> but yes I think that is the appropriate solution, let me try it
<apeiros_> if you can show me a more concise solution with each_with_object…
heftig has joined #ruby
Nisstyre has quit [Ping timeout: 244 seconds]
<eph3meral> ohh, crap, nm
<eph3meral> there is no map_with_object
<eph3meral> is there? I think I've encountered this before
<apeiros_> write it
mahmoudimus has joined #ruby
<apeiros_> I'm not sure it's worth it, though
<eph3meral> yeah, ok cool so yes I guess your solution is the best one :)
<apeiros_> of course! drunksolutions.inc always comes up with the best solutions!
<apeiros_> waddayathink… tsk
<apeiros_> ;-)
<eph3meral> yep, that works nicely
ipsifendus has joined #ruby
Marius has joined #ruby
miskander has joined #ruby
Nisstyre has joined #ruby
ismaelabreu has left #ruby [#ruby]
<ipsifendus> I don't understand this: 1.8.7 :011 > Date.strptime('2012-12-14', '%Y-%m-%d')
<ipsifendus> => Fri, 14 Dec 2012 which is what I expect however when I do Date.strptime('2012-12-14', '%Y.%m.%d') I get: ArgumentError: invalid date
banisterfiend has joined #ruby
zigomir has joined #ruby
<apeiros_> and this surprises you why?
<apeiros_> your input string doesn't match your format…
<apeiros_> @ ipsifendus
cpruitt has quit [Quit: cpruitt]
<ipsifendus> oh, duh, it's the format, of course. what i need is strftime
fred909 has quit [Ping timeout: 244 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
<apeiros_> strftime won't work on the Date *class*
<apeiros_> only on an *instance* of Date
<ipsifendus> ya, DateTime
<ipsifendus> right right
<ipsifendus> gotta call .new with the string date as a constructor...
<apeiros_> gawd NO
pewter_tao has quit [Ping timeout: 265 seconds]
<ipsifendus> oh?
<elaptics> ipsifendus: what are you actually trying to do?
<apeiros_> strptime takes a String
<ipsifendus> reformat a date
<apeiros_> you shouldn't call Date.new, though it has been amended to cope with people who fail understanding date construction
<apeiros_> there's Date.civil, Date.ordinal and Date.commercial
slainer68 has quit [Remote host closed the connection]
ikaros has quit [Quit: Ex-Chat]
<apeiros_> you probably want Date.civil
newbie|2 has joined #ruby
slainer68 has joined #ruby
baroquebobcat has joined #ruby
zastern has joined #ruby
eka has joined #ruby
Marius is now known as nkts
<elaptics> or Date.parse("…")
<apeiros_> yes, though Date.parse is kind of a last resort
<ipsifendus> why's that?
<apeiros_> it says "ohmygosh I don't know wtf my input format looks like!!! please guess it for me!!!"
<ipsifendus> Date.parse('2012-12-14').strftime('%Y.%m.%d') works a charm, seemingly
cdt has joined #ruby
<apeiros_> yes, it's also the most expensive way to do it
<elaptics> ipsifendus: it guesses
<elaptics> ipsifendus: will you know the format of the date you're getting that you want to reformat?
<ipsifendus> oh, so I should feed in the format as an argument.
<apeiros_> if you're into guessing, you probably shouldn't be programming…
<elaptics> if so, don't use parse
<apeiros_> (except if you specialize in heuristics…)
* ipsifendus rolls eyes
u89 has quit [Remote host closed the connection]
<elaptics> e.g. try Date.parse(12-14-2012") and Date.parse("14-12-2012")
<ipsifendus> Date.strptime('2012-12-14', '%Y-%m-%d').strftime('%Y.%m.%d')
<elaptics> oops missed the opening " on the first one
<apeiros_> Date.iso8601('2012-12-14')
mengu has quit [Read error: Connection reset by peer]
<Solnse> what should I use to find two letters in a string? for example, I need to find 'qu' and move it.
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
wargasm has joined #ruby
<apeiros_> Solnse: probably gsub, but your question is too vague.
cdt has quit [Client Quit]
<Solnse> I need to treat 'qu' as if it was one letter. moving it for a pig latin method.
<Solnse> i'll look at the docs for gsub.
arya has joined #ruby
jaygen_ has quit [Remote host closed the connection]
art_man1 has quit [Quit: art_man1]
newfprag has joined #ruby
jaygen has joined #ruby
arya_ has quit [Ping timeout: 244 seconds]
<Solnse> apeiros_: this is what I have so far... now trying to treat 'qu' as a single letter even if it doesn't start the word. https://gist.github.com/4289914
chrstphrhrt has quit [Quit: chrstphrhrt]
nemesit has quit [Quit: Leaving...]
timonv has quit [Remote host closed the connection]
<apeiros_> Solnse: sorry, too much to read. got a smaller example?
<apeiros_> and `word[0..1].include?("qu")` is equivalent to `word[0,2] == 'qu'`
<apeiros_> (or word[0..1] == 'qu', if you insist on using ranges)
<Solnse> well, now I don't know what the range will be... trying to determine if the word contains QU and where.
etank has joined #ruby
<apeiros_> isn't piglatin some swiss thing? from bern I think?
<Solnse> lol
DatumDrop has joined #ruby
<Solnse> it's just an exercise I'm using to learn :)
<apeiros_> "fooobar".index("ba") # => 4
<apeiros_> that tells you whether and where
<apeiros_> =~ also does, btw.
<Solnse> .index ...ok, will read up on that.
<Solnse> apeiros_: thanks
zastern has quit [Ping timeout: 245 seconds]
cakehero has joined #ruby
darthdeus has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
hackerdude has quit [Remote host closed the connection]
arya has quit [Ping timeout: 244 seconds]
baroquebobcat has joined #ruby
cakehero has quit [Client Quit]
rezzack has quit [Quit: Leaving.]
DatumDrop has quit [Ping timeout: 255 seconds]
combataircraft has quit [Quit: combataircraft]
billiam has quit [Quit: Leaving]
combataircraft has joined #ruby
newfprag has left #ruby ["Konversation terminated!"]
<swarley> word[0...2]
<swarley> mmm dots galore
rezzack has joined #ruby
MarcOnline has joined #ruby
<Solnse> is it possible to use a variable in the position or an I chasing the wrong thought? position = word.index("qu")
<Solnse> result << word[0..(position - 1)] + "qu" + word[(position + 2)..-1] + "ay"
<chord> monadic errors in ruby exist?
MarcOnline has quit [Client Quit]
<swarley> chord; ?
<Solnse> in the range I meant.
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
<swarley> Solnse; yes you can
<swarley> [6] pry(main)> x = 3; [*x..5]
<swarley> => [3, 4, 5]
<swarley> [*range] is just to expand the range into an array
otters has joined #ruby
<swarley> you can do var..upperlimit
<swarley> to get just the range
<swarley> this might have been a better example
<swarley> [8] pry(main)> x = 3; y = 10; x..y
<swarley> => 3..10
<Solnse> so my syntax must be wrong then
baroquebobcat has quit [Quit: baroquebobcat]
<waxjar> Solnse, try to interpolate the string ("#{..}") or put brackets around it
<Solnse> https://gist.github.com/4290028 is the snippet
<waxjar> ruby doesn't know wether to do (result << word[0..pos]) + (etc) or result << (word[0..posetcetcetc)
<Solnse> waxjar: will try that
<swarley> Solnse; the other thing you can do instead of [0..(position - 1)] is [0...position]
<swarley> the ... essentially does the same thing
alexspeller has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 245 seconds]
jrajav has joined #ruby
Banistergalaxy has joined #ruby
SCommette has joined #ruby
ckrailo has quit [Quit: Leaving...]
<Solnse> using: elsif word.index("qu")as a conditional will pass true no matter what the position, right?
combataircraft has quit [Quit: combataircraft]
postmodern has joined #ruby
<waxjar> yes. there is an #include? though
Ziioynx has joined #ruby
osvico has joined #ruby
benlieb has joined #ruby
SCommette has quit [Client Quit]
ddd has quit [Quit: Leaving.]
Chryson has joined #ruby
banisterfiend has quit [Ping timeout: 256 seconds]
daniel_- has quit [Ping timeout: 260 seconds]
slainer68 has quit [Remote host closed the connection]
Solnse1 has joined #ruby
Godd2 has joined #ruby
<Godd2> I have a quick metaprogramming question
<Godd2> I posted it to Reddit a couple weeks ago, but no response, so I went ahead and made a gist of it: https://gist.github.com/4290078
Solnse has quit [Ping timeout: 246 seconds]
jrist is now known as jrist-afk
jenrzzz_ has joined #ruby
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
zastern has joined #ruby
v1n has quit [Quit: WeeChat 0.3.9.2]
ndboost has joined #ruby
zastern has quit [Remote host closed the connection]
ismaelabreu has joined #ruby
pwelch has joined #ruby
pwelch has quit [Client Quit]
ipsifendus has left #ruby [#ruby]
<waxjar> Godd2, you read wrong :) you *cannot* call a private method with an explicit receiver
mikepack has joined #ruby
SCommette has joined #ruby
<waxjar> self. is an explicit receiver
SCommette has quit [Client Quit]
<Godd2> then why does he call self an implicit receiver?
ismaelabreu has left #ruby [#ruby]
<Godd2> I understand yourstatement, and thanks for clarifying, but the book is still fuzzy...
brianpWins has quit [Quit: brianpWins]
Russell^^ has quit [Quit: Russell^^]
<Godd2> "it must be on the implicit receiver—self."
Guest8169 has quit [Quit: This computer has gone to sleep]
banisterfiend has joined #ruby
mikepack has quit [Remote host closed the connection]
havenn has quit [Ping timeout: 252 seconds]
eka has quit [Remote host closed the connection]
<Godd2> oh wait does he mean that there are two ways to use self?
<elaptics> Godd2: it means that when you call private_method within the class, it's implicitly being done on self. It's just you can't use self explicitly because it's a private_method
Dan_ has joined #ruby
<Godd2> explicitly, by typing out the 4 letters "s" "e" "l" f", and implicitly by just calling the privat emethod?
<elaptics> yes
<waxjar> yes
<Godd2> ok I see now
Dan_ has quit [Client Quit]
<waxjar> this isn't related to metaprogramming, btw :)
squidBits has quit [Quit: squidBits]
<Godd2> if Im not mistaken, self is the current instantiation of the class, no?
<waxjar> yes
dankest has quit [Ping timeout: 245 seconds]
<Solnse1> I can't figure out why my else statement is not catching word that contain "qu"... could somebody look please? https://gist.github.com/4290146
hamfz_ has joined #ruby
<Godd2> is there a difference between that definition and "the thing that made this method call"
pwelch has joined #ruby
joeycarm_ has quit [Remote host closed the connection]
<Solnse1> expected: "aresquay" got: "uaresqay" (using ==)
jrajav has quit [Quit: I tend to be neutral about apples]
<waxjar> Godd2, i don't understand your question, sorry
reset has joined #ruby
<Godd2> thats okay waxjar Ill get back to reading this book now that I understand what he meant
<Godd2> thank you :)
<waxjar> yw :)
Munto has joined #ruby
generalissimo has joined #ruby
beilabs has quit [Ping timeout: 250 seconds]
<waxjar> Solnse1: you can use word.start_with? 'qu' instead of word[0..1].include?("qu")
<Godd2> Solnse1: squares doesnt start with qu
tomsthumb has quit [Quit: Leaving.]
<Godd2> oh thats what the else is for
<Solnse1> right, so I want squares to be processed by the else statement
<Solnse1> but it's not catching it
<Solnse1> expected: "aresquay" got: "uaresqay" (using ==)
ndboost has quit [Remote host closed the connection]
<Godd2> "square".index("qu") == 1
<Solnse1> I tried putting in a return "break" statement under the else condition, and it doesn't trigger... so I guess it's not entering that branch at all
andalf has joined #ruby
<Godd2> "square"[0..1] == "sq"
<waxjar> i think you have to do position + 3 the ay is now overwriting the u in qu?
burgestrand has joined #ruby
<Solnse1> yeah I understand that... but I am not even entering that branch yet.
piotr_ has joined #ruby
elaptics is now known as elaptics`away
reppard has quit [Ping timeout: 256 seconds]
<Godd2> so you're tyring to get the Pig Latin output rihgt?
aces1up has joined #ruby
<Solnse1> yes
<waxjar> Solnse1: is all you have to do replay qu with quay?
<Solnse1> I've got all the code working, except for handling "qu" in the middle of a word
<waxjar> *replace
freeayu has quit [Remote host closed the connection]
<Solnse1> else#'qu' is somewhere else in the word.
<Solnse1> position = word.index("qu")
<Solnse1> return position
<Solnse1> does not trigger
punkrawkR has quit [Read error: Connection reset by peer]
<Godd2> result << + word[(position + 2)..-1] + word[0..(position-1)] + "quay"
ndboost has joined #ruby
generalissimo has quit [Remote host closed the connection]
<Godd2> "square" will make "aresquay"
<Godd2> oops
<Godd2> result << word...*
miskander has quit [Quit: miskander]
<Solnse1> I thank you for that... but the problem is the if/else statement... the path is not going into that tree with words containing qu
<Godd2> yea on line 6 of your gist you weren't moving the first syllable to the end of the word, and you were grabbing too many letters
<Godd2> oh Id need to see more code because "square".include?("qu") == true
<Solnse1> here's the full code: https://gist.github.com/4290228
sn0wb1rd has quit [Quit: sn0wb1rd]
NiteRain has joined #ruby
efrainolivares__ has quit [Quit: efrainolivares__]
efrainolivares has joined #ruby
beilabs has joined #ruby
efrainolivares has left #ruby [#ruby]
<Solnse1> I think I need to take the 'qu tree out of the vowle/consonant check compeltely
mengu has quit [Read error: Connection reset by peer]
benlieb has quit [Quit: benlieb]
<Godd2> oh well if your qord contains a vowel
zigomir has quit [Quit: zigomir]
<Godd2> it doesnt even attempt to do the stuff under consonants.include?(word[0])
<Godd2> word*
<Godd2> wait Im wrong
<Godd2> Ill shut up
keppy has joined #ruby
nanothief has joined #ruby
reset has quit [Quit: Leaving...]
<Godd2> ok I found it this time
<Godd2> line 18
<Godd2> you have an end
<Solnse1> yeah, problem is that the else statement above it is catching it because square starts with 2 consonants
kiyoura has joined #ruby
larissa has joined #ruby
mikepack has joined #ruby
pwelch has quit [Quit: pwelch]
<shevy> SEX
tommyvyo_ has quit [Quit: Computer has gone to sleep.]
<Godd2> yea line 14 is the culprit
mickn has joined #ruby
<Godd2> so I would check to see if a qu is near the beginning first
havenn has joined #ruby
<Godd2> then check if the second letter is a consonant
tyfighter has quit [Quit: tyfighter]
<Godd2> translate("square") => "aresquay"
jenrzzz_ has quit [Ping timeout: 265 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
jxriddle has quit [Quit: jxriddle]
chussenot has joined #ruby
chussenot has quit [Client Quit]
robotmay has quit [Remote host closed the connection]
<Solnse1> yeah I had to take it out of the vowel/consonant checks and put it top level in the block. https://gist.github.com/4290338
<Solnse1> it works perfectly now.
Slivka has joined #ruby
sn0wb1rd has joined #ruby
Vert has joined #ruby
woolite64 has quit []
mascool has quit [Ping timeout: 260 seconds]
billy_ran_away has quit [*.net *.split]
yacks has quit [*.net *.split]
dantesun has quit [*.net *.split]
ruzu has quit [*.net *.split]
madhatter has quit [*.net *.split]
Nykolla has quit [*.net *.split]
mikekelly has quit [*.net *.split]
inimino has quit [*.net *.split]
pcboy__ has quit [*.net *.split]
Slivka has quit [*.net *.split]
mickn has quit [*.net *.split]
mahmoudimus has quit [*.net *.split]
ryanf has quit [*.net *.split]
daniel_hinojosa has quit [*.net *.split]
rcj_ has quit [*.net *.split]
JDubs has quit [*.net *.split]
musl has quit [*.net *.split]
TTilus has quit [*.net *.split]
s4muel_ has quit [*.net *.split]
dcope has quit [*.net *.split]
ccooke has quit [*.net *.split]
strtok_ has quit [*.net *.split]
aetaric has quit [*.net *.split]
arusso has quit [*.net *.split]
GeekOnCoffee has quit [*.net *.split]
gurps_ has quit [*.net *.split]
percival_ has quit [*.net *.split]
G has quit [*.net *.split]
crazed has quit [*.net *.split]
tessi has quit [*.net *.split]
Solnse1 has quit [*.net *.split]
Guedes has quit [*.net *.split]
zeppelin has quit [*.net *.split]
Drewch_ has quit [*.net *.split]
yeban has quit [*.net *.split]
SegFaultAX has quit [*.net *.split]
Nanuq has quit [*.net *.split]
w|t has quit [*.net *.split]
jsilver has quit [*.net *.split]
alta has quit [*.net *.split]
digifiv5e has quit [*.net *.split]
libryder has quit [*.net *.split]
bjeanes has quit [*.net *.split]
seich has quit [*.net *.split]
waxjar has quit [*.net *.split]
havenn has quit [*.net *.split]
mikepack has quit [*.net *.split]
Raboo_ has quit [*.net *.split]
dmiller has quit [*.net *.split]
rramsden has quit [*.net *.split]
darthdeus has quit [*.net *.split]
alanp_ has quit [*.net *.split]
friskd has quit [*.net *.split]
lkba has quit [*.net *.split]
wf2f has quit [*.net *.split]
GeekOnCoffee_ has quit [*.net *.split]
FiveAcres has quit [*.net *.split]
companion has quit [*.net *.split]
elaptics`away has quit [*.net *.split]
arubin has quit [*.net *.split]
crazedpsyc has quit [*.net *.split]
Eiam has quit [*.net *.split]
Emmanuel_Chanel has quit [*.net *.split]
beandip has quit [*.net *.split]
Schmidt has quit [*.net *.split]
bier has quit [*.net *.split]
oGminor has quit [*.net *.split]
qubit has quit [*.net *.split]
katherinem13 has quit [*.net *.split]
Yarou has quit [*.net *.split]
pasties has quit [*.net *.split]
straind has quit [*.net *.split]
thomasfedb has quit [*.net *.split]
bricker has quit [*.net *.split]
digiwth has quit [*.net *.split]
verto|off has quit [*.net *.split]
benwoody has quit [*.net *.split]
aef has quit [*.net *.split]
weeb1e has quit [*.net *.split]
imami|afk has quit [*.net *.split]
malcolmva has quit [*.net *.split]
sn0wb1rd has quit [*.net *.split]
fumduq has quit [*.net *.split]
joast has quit [*.net *.split]
moshee has quit [*.net *.split]
haxrbyte has quit [*.net *.split]
gbchaosmaster has quit [*.net *.split]
Jasko has quit [*.net *.split]
grn_ has quit [*.net *.split]
robbyoconnor has quit [*.net *.split]
wang has quit [*.net *.split]
epochwolf has quit [*.net *.split]
greenarrow has quit [*.net *.split]
jds__ has quit [*.net *.split]
mpereira has quit [*.net *.split]
mvangala_ has quit [*.net *.split]
undyingr1ge has quit [*.net *.split]
MissionCritical has quit [*.net *.split]
rasmusth_ has quit [*.net *.split]
mosez has quit [*.net *.split]
frogstarr78 has quit [*.net *.split]
AlSquirikou has quit [*.net *.split]
mr-rich has quit [*.net *.split]
brjannc has quit [*.net *.split]
randym has quit [*.net *.split]
cbosh has quit [*.net *.split]
dash_ has quit [*.net *.split]
jalcine has quit [*.net *.split]
Elfix_113 has quit [*.net *.split]
BadLarry has quit [*.net *.split]
tonytonyjan has quit [*.net *.split]
Jelco_ has quit [*.net *.split]
virtuose has quit [*.net *.split]
tomku has quit [*.net *.split]
moted has quit [*.net *.split]
fearoffish has quit [*.net *.split]
EPIK has quit [*.net *.split]
rcs has quit [*.net *.split]
hyperboreean has quit [*.net *.split]
ged has quit [*.net *.split]
ping-pong has quit [*.net *.split]
p4tux has quit [*.net *.split]
bedouin has quit [*.net *.split]
jmccune has quit [*.net *.split]
eval-in has quit [*.net *.split]
ichilton has quit [*.net *.split]
Blue_Ice has quit [*.net *.split]
jedediah has quit [*.net *.split]
karupanerura has quit [*.net *.split]
RubyPanther has quit [*.net *.split]
larissa has quit [*.net *.split]
mahlon has quit [*.net *.split]
robert_ has quit [*.net *.split]
idoru has quit [*.net *.split]
Guest67996 has quit [*.net *.split]
banjara has quit [*.net *.split]
jonan has quit [*.net *.split]
wallerdev has quit [*.net *.split]
m3pow has quit [*.net *.split]
gregorg has quit [*.net *.split]
chiel_ has quit [*.net *.split]
FlyingFoX has quit [*.net *.split]
Mch1 has quit [*.net *.split]
yshh has quit [*.net *.split]
drizz_ has quit [*.net *.split]
robustus has quit [*.net *.split]
wmoxam has quit [*.net *.split]
xAndy has quit [*.net *.split]
chrxn has quit [*.net *.split]
TheFuzzball has quit [*.net *.split]
babinho_ has quit [*.net *.split]
jeedey_ has quit [*.net *.split]
busybox43 has quit [*.net *.split]
TomRone has quit [*.net *.split]
oz has quit [*.net *.split]
Weazy has quit [*.net *.split]
hibariya_ has quit [*.net *.split]
queequeg1 has quit [*.net *.split]
kirotan has quit [*.net *.split]
shammancer has quit [*.net *.split]
BombStrike has quit [*.net *.split]
JStoker has quit [*.net *.split]
jrist-afk has quit [*.net *.split]
kanzure has quit [*.net *.split]
maxmanders has quit [*.net *.split]
Poapfel has quit [*.net *.split]
crankycoder has quit [*.net *.split]
rking has quit [*.net *.split]
JoeJulian has quit [*.net *.split]
kalleth has quit [*.net *.split]
_br_ has quit [*.net *.split]
canton7 has quit [*.net *.split]
mephux has quit [*.net *.split]
Guest24761 has quit [*.net *.split]
Cork has quit [*.net *.split]
bastl has quit [*.net *.split]
dedis has quit [*.net *.split]
xid has quit [*.net *.split]
nanothief has quit [*.net *.split]
mguy_ has quit [*.net *.split]
io_syl has quit [*.net *.split]
segv- has quit [*.net *.split]
nazty has quit [*.net *.split]
eph3meral has quit [*.net *.split]
ejnahc has quit [*.net *.split]
jayne has quit [*.net *.split]
hsbt has quit [*.net *.split]
hackeron_ has quit [*.net *.split]
matti has quit [*.net *.split]
yxhuvud has quit [*.net *.split]
rodasc has quit [*.net *.split]
jeekl has quit [*.net *.split]
devdazed has quit [*.net *.split]
Bry8Star has quit [*.net *.split]
SeanTAllen has quit [*.net *.split]
klaas has quit [*.net *.split]
rismoney has quit [*.net *.split]
araujo has quit [*.net *.split]
undert has quit [*.net *.split]
krisfremen has quit [*.net *.split]
xkx has quit [*.net *.split]
TheNumb has quit [*.net *.split]
pizzahead has quit [*.net *.split]
SecretAgent has quit [*.net *.split]
BBonifield has quit [*.net *.split]
epta has quit [*.net *.split]
mmercer has quit [*.net *.split]
pasv has quit [*.net *.split]
fuho has quit [*.net *.split]
klip has quit [*.net *.split]
coasterD has quit [*.net *.split]
ezra has quit [*.net *.split]
David_Miller has quit [*.net *.split]
lahwran has quit [*.net *.split]
pigoz has quit [*.net *.split]
elektronaut has quit [*.net *.split]
nw has quit [*.net *.split]
rtl has quit [*.net *.split]
hamfz_ has quit [*.net *.split]
piotr_ has quit [*.net *.split]
beilabs has quit [*.net *.split]
Chryson has quit [*.net *.split]
Ziioynx has quit [*.net *.split]
Banistergalaxy has quit [*.net *.split]
etank has quit [*.net *.split]
emmanuelux has quit [*.net *.split]
awarner has quit [*.net *.split]
SoonerBourne has quit [*.net *.split]
Targen has quit [*.net *.split]
Hanmac has quit [*.net *.split]
telling has quit [*.net *.split]
callie has quit [*.net *.split]
deadalus has quit [*.net *.split]
tjbiddle has quit [*.net *.split]
nomenkun has quit [*.net *.split]
Synthead has quit [*.net *.split]
jbw has quit [*.net *.split]
sirecote has quit [*.net *.split]
flagg0204 has quit [*.net *.split]
swi7ch has quit [*.net *.split]
Goatbert has quit [*.net *.split]
spathi_ has quit [*.net *.split]
dreamfall has quit [*.net *.split]
yosafbridge has quit [*.net *.split]
Godd2 has quit [*.net *.split]
jaygen has quit [*.net *.split]
chord has quit [*.net *.split]
tekacs has quit [*.net *.split]
Spaceghost|cloud has quit [*.net *.split]
three18ti has quit [*.net *.split]
johnmilton has quit [*.net *.split]
rcsheets has quit [*.net *.split]
pkondzior_ has quit [*.net *.split]
joffery has quit [*.net *.split]
Paradox has quit [*.net *.split]
PhilK has quit [*.net *.split]
Y_Ichiro has quit [*.net *.split]
s14 has quit [*.net *.split]
zeroXten has quit [*.net *.split]
elspeth has quit [*.net *.split]
no_i_wont has quit [*.net *.split]
Lemtzas has quit [*.net *.split]
wunz has quit [*.net *.split]
ingvarha has quit [*.net *.split]
jasond has quit [*.net *.split]
xhoy has quit [*.net *.split]
UukGoblin has quit [*.net *.split]
verma has quit [*.net *.split]
prime has quit [*.net *.split]
stderr- has quit [*.net *.split]
Gate has quit [*.net *.split]
DarkFoxDK has quit [*.net *.split]
Guest26813 has quit [*.net *.split]
cibs has quit [*.net *.split]
zarubin has quit [*.net *.split]
io_syl has joined #ruby
beilabs has joined #ruby
Chryson has joined #ruby
hamfz_ has joined #ruby
Ziioynx has joined #ruby
tjbiddle has joined #ruby
nomenkun has joined #ruby
SoonerBourne has joined #ruby
emmanuelux has joined #ruby
etank has joined #ruby
Targen has joined #ruby
Hanmac has joined #ruby
Banistergalaxy has joined #ruby
Synthead has joined #ruby
telling has joined #ruby
callie has joined #ruby
deadalus has joined #ruby
awarner has joined #ruby
Goatbert has joined #ruby
sirecote has joined #ruby
flagg0204 has joined #ruby
yosafbridge has joined #ruby
jbw has joined #ruby
spathi_ has joined #ruby
swi7ch has joined #ruby
dreamfall has joined #ruby
ossareh has quit [Excess Flood]
io_syl has quit [Client Quit]
andalf has quit [Remote host closed the connection]
ndboost has quit [Remote host closed the connection]
robbyoconnor has joined #ruby
jsilver has joined #ruby
headius has quit [Quit: headius]
banister_ has joined #ruby
PhilK has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
voodoofish430 has quit [Quit: Leaving.]
postmodern has quit [Quit: Leaving]
io_syl has joined #ruby
postmodern has joined #ruby
io_syl has quit [Client Quit]
kanzure_ has joined #ruby
chiel_ has joined #ruby
robustus has joined #ruby
yshh has joined #ruby
drizz_ has joined #ruby
jeedey_ has joined #ruby
chrxn has joined #ruby
jonan has joined #ruby
busybox43 has joined #ruby
FlyingFoX has joined #ruby
wmoxam has joined #ruby
wallerdev has joined #ruby
TheFuzzball has joined #ruby
xAndy has joined #ruby
babinho_ has joined #ruby
gregorg has joined #ruby
Weazy has joined #ruby
TomRone has joined #ruby
Mch1 has joined #ruby
hibariya_ has joined #ruby
oz has joined #ruby
queequeg1 has joined #ruby
kirotan has joined #ruby
kalleth has joined #ruby
Poapfel has joined #ruby
shammancer has joined #ruby
rking has joined #ruby
canton7 has joined #ruby
Guest24761 has joined #ruby
Cork has joined #ruby
_br_ has joined #ruby
mephux has joined #ruby
BombStrike has joined #ruby
xid has joined #ruby
jrist-afk has joined #ruby
kanzure has joined #ruby
maxmanders has joined #ruby
bastl has joined #ruby
dedis has joined #ruby
crankycoder has joined #ruby
JStoker has joined #ruby
zarubin has joined #ruby
cibs has joined #ruby
robert_ has joined #ruby
dedis has quit [Max SendQ exceeded]
kanzure has quit [Max SendQ exceeded]
Guest67996 has joined #ruby
karupanerura has joined #ruby
Slivka has joined #ruby
Drewch_ has joined #ruby
ccooke has joined #ruby
strtok_ has joined #ruby
aetaric has joined #ruby
dcope has joined #ruby
ryanf has joined #ruby
mahmoudimus has joined #ruby
musl has joined #ruby
rcj_ has joined #ruby
JDubs has joined #ruby
mickn has joined #ruby
TTilus has joined #ruby
s4muel_ has joined #ruby
mickn has quit [Remote host closed the connection]
dbeest has joined #ruby
<dbeest> hi, how do I run wget via ruby?
Chryson has quit [*.net *.split]
beilabs has quit [*.net *.split]
Ziioynx has quit [*.net *.split]
hamfz_ has quit [*.net *.split]
Banistergalaxy has quit [*.net *.split]
etank has quit [*.net *.split]
SoonerBourne has quit [*.net *.split]
emmanuelux has quit [*.net *.split]
awarner has quit [*.net *.split]
Targen has quit [*.net *.split]
Hanmac has quit [*.net *.split]
nomenkun has quit [*.net *.split]
tjbiddle has quit [*.net *.split]
telling has quit [*.net *.split]
callie has quit [*.net *.split]
deadalus has quit [*.net *.split]
flagg0204 has quit [*.net *.split]
sirecote has quit [*.net *.split]
jbw has quit [*.net *.split]
Synthead has quit [*.net *.split]
dreamfall has quit [*.net *.split]
spathi_ has quit [*.net *.split]
swi7ch has quit [*.net *.split]
yosafbridge has quit [*.net *.split]
Goatbert has quit [*.net *.split]
thmzlt has joined #ruby
<swarley> dbeest; `wget #{args}`
io_syl has joined #ruby
Virunga has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
MissionCritical has joined #ruby
<swarley> or system("wget #{agrs}")
dbeest has left #ruby ["Leaving"]
robert_ has quit [Ping timeout: 245 seconds]
tjbiddle has joined #ruby
larissa has joined #ruby
squidBits has joined #ruby
pcarrier has quit []
yosafbridge has joined #ruby
apok has quit [Ping timeout: 264 seconds]
blazes816 has quit [Quit: blazes816]
benlieb has joined #ruby
charlie__some has joined #ruby
UdontKnow has quit [Ping timeout: 252 seconds]
tomaw is now known as 5EXAAG5WE
fumduq has joined #ruby
sn0wb1rd has joined #ruby
haxrbyte has joined #ruby
joast has joined #ruby
moshee has joined #ruby
gbchaosmaster has joined #ruby
Jasko has joined #ruby
grn_ has joined #ruby
epochwolf has joined #ruby
jds__ has joined #ruby
wang has joined #ruby
greenarrow has joined #ruby
mvangala_ has joined #ruby
mpereira has joined #ruby
undyingr1ge has joined #ruby
rasmusth_ has joined #ruby
frogstarr78 has joined #ruby
mr-rich has joined #ruby
brjannc has joined #ruby
randym has joined #ruby
AlSquirikou has joined #ruby
Elfix_113 has joined #ruby
cbosh has joined #ruby
BadLarry has joined #ruby
mosez has joined #ruby
jalcine has joined #ruby
dash_ has joined #ruby
Jelco_ has joined #ruby
fearoffish has joined #ruby
tomku has joined #ruby
tonytonyjan has joined #ruby
moted has joined #ruby
virtuose has joined #ruby
hyperboreean has joined #ruby
ichilton has joined #ruby
Blue_Ice has joined #ruby
p4tux has joined #ruby
EPIK has joined #ruby
jmccune has joined #ruby
ping-pong has joined #ruby
rcs has joined #ruby
eval-in has joined #ruby
bedouin has joined #ruby
jedediah has joined #ruby
idoru has joined #ruby
ged has joined #ruby
RubyPanther has joined #ruby
mahlon has joined #ruby
squidBits has quit [Quit: squidBits]
JoeJulian has joined #ruby
Guest26813 has joined #ruby
prime has joined #ruby
ingvarha has joined #ruby
Y_Ichiro has joined #ruby
Paradox has joined #ruby
stderr- has joined #ruby
elspeth has joined #ruby
verma has joined #ruby
rcsheets has joined #ruby
Gate has joined #ruby
tekacs has joined #ruby
johnmilton has joined #ruby
s14 has joined #ruby
zeroXten has joined #ruby
joffery has joined #ruby
pkondzior_ has joined #ruby
UukGoblin has joined #ruby
jaygen has joined #ruby
Lemtzas has joined #ruby
wunz has joined #ruby
three18ti has joined #ruby
Spaceghost|cloud has joined #ruby
no_i_wont has joined #ruby
DarkFoxDK has joined #ruby
xhoy has joined #ruby
tomsthumb has joined #ruby
thmzlt has quit [Remote host closed the connection]
pasties has joined #ruby
robert_ has joined #ruby
charlie__some is now known as charliesome
UdontKnow has joined #ruby
Solnse1 has joined #ruby
waxjar has joined #ruby
w|t has joined #ruby
yeban has joined #ruby
arusso has joined #ruby
G has joined #ruby
GeekOnCoffee has joined #ruby
crazed has joined #ruby
bjeanes has joined #ruby
percival_ has joined #ruby
alta has joined #ruby
gurps_ has joined #ruby
Guedes has joined #ruby
Nanuq has joined #ruby
libryder has joined #ruby
tessi has joined #ruby
zeppelin has joined #ruby
digifiv5e has joined #ruby
SegFaultAX has joined #ruby
seich has joined #ruby
nkts has quit []
alexim has quit [Quit: sleep]
johnmilton has quit [Quit: Leaving]
ClumsyFairyQueen has joined #ruby
klaas has joined #ruby
undert has joined #ruby
krisfremen has joined #ruby
araujo has joined #ruby
xkx has joined #ruby
BBonifield has joined #ruby
nazty has joined #ruby
rodasc has joined #ruby
jeekl has joined #ruby
SeanTAllen has joined #ruby
nanothief has joined #ruby
Bry8Star has joined #ruby
devdazed has joined #ruby
hsbt has joined #ruby
ejnahc has joined #ruby
yxhuvud has joined #ruby
epta has joined #ruby
TheNumb has joined #ruby
eph3meral has joined #ruby
SecretAgent has joined #ruby
matti has joined #ruby
mguy_ has joined #ruby
rismoney has joined #ruby
jayne has joined #ruby
hackeron_ has joined #ruby
segv- has joined #ruby
pizzahead has joined #ruby
rtl has joined #ruby
David_Miller has joined #ruby
pasv has joined #ruby
fuho has joined #ruby
mmercer has joined #ruby
klip has joined #ruby
pigoz has joined #ruby
ezra has joined #ruby
coasterD has joined #ruby
nw has joined #ruby
lahwran has joined #ruby
elektronaut has joined #ruby
yacks has joined #ruby
Nykolla has joined #ruby
mikekelly has joined #ruby
madhatter has joined #ruby
pcboy__ has joined #ruby
inimino has joined #ruby
dantesun has joined #ruby
billy_ran_away has joined #ruby
ruzu has joined #ruby
apok has joined #ruby
freakazoid0223 has joined #ruby
beilabs has joined #ruby
ddd has joined #ruby
deadalus has joined #ruby
Targen has joined #ruby
Goatbert has joined #ruby
nomenkun has joined #ruby
sirecote has joined #ruby
Banistergalaxy has joined #ruby
awarner has joined #ruby
etank has joined #ruby
swi7ch has joined #ruby
Hanmac has joined #ruby
hamfz_ has joined #ruby
flagg0204 has joined #ruby
emmanuelux has joined #ruby
Chryson has joined #ruby
jbw has joined #ruby
telling has joined #ruby
dreamfall has joined #ruby
SoonerBourne has joined #ruby
spathi_ has joined #ruby
Synthead has joined #ruby
havenn has joined #ruby
beandip has joined #ruby
alanp_ has joined #ruby
digiwth has joined #ruby
companion has joined #ruby
katherinem13 has joined #ruby
Eiam has joined #ruby
bricker has joined #ruby
wf2f has joined #ruby
bier has joined #ruby
crazedpsyc has joined #ruby
straind has joined #ruby
rramsden has joined #ruby
thomasfedb has joined #ruby
oGminor has joined #ruby
Emmanuel_Chanel has joined #ruby
45PABH7PW has joined #ruby
Schmidt has joined #ruby
Yarou has joined #ruby
mikepack has joined #ruby
malcolmva has joined #ruby
friskd has joined #ruby
verto|off has joined #ruby
benwoody has joined #ruby
weeb1e has joined #ruby
lkba has joined #ruby
elaptics`away has joined #ruby
imami|afk has joined #ruby
Raboo_ has joined #ruby
qubit has joined #ruby
Substrate has joined #ruby
Godd2 has joined #ruby
Godd2 has quit [Changing host]
Godd2 has joined #ruby
Substrate has joined #ruby
Substrate has quit [Changing host]
aef has joined #ruby
FiveAcres has joined #ruby
ossareh has joined #ruby
5EXAAG5WE is now known as tomaw
seanstickle has quit [Quit: seanstickle]
seanstickle has joined #ruby
keppy has quit [Ping timeout: 246 seconds]
benlieb has quit [Quit: benlieb]
phipes has joined #ruby
d2dchat has joined #ruby
joeycarmello has joined #ruby
phipes has quit [Client Quit]
poga has joined #ruby
poga has quit [Remote host closed the connection]
ossareh has quit [Ping timeout: 246 seconds]
poga has joined #ruby
poga has quit [Remote host closed the connection]
joeycarmello has quit [Ping timeout: 246 seconds]
DatumDrop has joined #ruby
larissa has quit [Quit: Leaving]
ryanlecompte has quit [Remote host closed the connection]
robbyoconnor has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby
hamfz_ has quit [Ping timeout: 245 seconds]
jxriddle has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
joeycarmello has joined #ruby
jeffreybaird has joined #ruby
Raboo_ has quit [Ping timeout: 244 seconds]
manizzle has quit [Ping timeout: 248 seconds]
cespare has quit [Ping timeout: 264 seconds]
Raboo has joined #ruby
benlieb has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
tommyvyo_ has joined #ruby
tommyvyo_ has quit [Changing host]
tommyvyo_ has joined #ruby
joeycarmello has quit [Remote host closed the connection]
Hanmac1 has joined #ruby
joeycarmello has joined #ruby
friskd has quit [Quit: friskd]
Hanmac has quit [Ping timeout: 245 seconds]
d2dchat has quit [Remote host closed the connection]
geeksir has joined #ruby
tungd has joined #ruby
joeycarmello has quit [Ping timeout: 255 seconds]
himsin has joined #ruby
epwhorl has quit [Ping timeout: 256 seconds]
mikepack has quit [Remote host closed the connection]
Godd2 has quit [Quit: Page closed]
SCommette has joined #ruby
hiroyuki has joined #ruby
havenn has quit [Remote host closed the connection]
DanBoy has quit [Quit: Leaving]
havenn has joined #ruby
lolcathost has joined #ruby
pcarrier has joined #ruby
igor_ has joined #ruby
luckyruby has quit [Remote host closed the connection]
adeponte has quit [Remote host closed the connection]
dmiller has joined #ruby
havenn has quit [Ping timeout: 264 seconds]
segv-_ has joined #ruby
invisime has quit [Quit: Leaving.]
andalf has joined #ruby
kanzure_ is now known as kanzure
segv- has quit [Ping timeout: 276 seconds]
crackfu has joined #ruby
segv-_ is now known as segv-
headius has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
eka has joined #ruby
pu22l3r has joined #ruby
pu22l3r has quit [Remote host closed the connection]
pu22l3r has joined #ruby
includex has quit [Ping timeout: 265 seconds]
eka has quit [Ping timeout: 245 seconds]
bradhe has joined #ruby
includex has joined #ruby
ClumsyFairyQueen has quit [Changing host]
ClumsyFairyQueen has joined #ruby
mahmoudimus has joined #ruby
benlieb has quit [Quit: benlieb]
bradhe has quit [Ping timeout: 255 seconds]
dmiller has quit [Remote host closed the connection]
ismaelab_ has joined #ruby
emmanuelux has quit [Remote host closed the connection]
pu22l3r_ has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
IceDragon has joined #ruby
nari has joined #ruby
ismaelab_ is now known as ismaelabreu_
Shamgar has quit [Read error: No route to host]
cakehero has joined #ruby
<Solnse1> when a block is passed into a method, how do I capture the parameters to manipulate them before the yield?
pu22l3r has quit [Ping timeout: 245 seconds]
butblack has joined #ruby
<charliesome> Solnse1: what do you mean?
<Banistergalaxy> Solnse1 don't get what you mean
<Solnse1> yeah, I'm a little fuzzy on how to ask the question... I'm working on blocks... and so a method is passing a word to another method to be manipulated (reversed) and then brought back
ismaelabreu_ is now known as ismaelabreu
<Solnse1> result = reverser do
<Solnse1> "hello"
<Solnse1> end
<Solnse1> so I set up a method named reverser...
<Solnse1> and within it I am trying to capture the hello, so I can do a "hello".reverse on it
Shamgar has joined #ruby
<Solnse1> but I'm sure I'll need to expand on that to allow for multiple words, etc.
<Solnse1> so how do I see the value that's being passed to the block?
pu22l3r_ has quit [Remote host closed the connection]
jonahR has joined #ruby
tungd has quit [Quit: leaving]
<Solnse1> I get the feeling that once I understand this concept, it's going to unlock a huge part of ruby for me. But the docs and tutorials I've found aren't very clear.
pu22l3r has joined #ruby
robert_ has quit [Ping timeout: 276 seconds]
<ismaelabreu> there are no values passed to the block. If there where it woudl be reverser do |some_param^
<ismaelabreu> |
includex has quit [Quit: Leaving...]
Substrate has quit [Quit: Page closed]
tungd has joined #ruby
<ismaelabreu> def reverser
epwhorl has joined #ruby
<ismaelabreu> yield.reverse
<ismaelabreu> end
cakehero has quit [Quit: Leaving...]
igor_ has quit [Quit: igor_]
<ismaelabreu> Solnse1
combataircraft has joined #ruby
bigmac has joined #ruby
<Solnse1> yeah I tried that but it's not going to work if I get sent multiple words...
<Solnse1> I was reading, and trying to set up the block something like:
<Solnse1> def reverser
<Solnse1> yield
<Solnse1> reverser { |a| a.to_s.reverse! }
<Solnse1> end
tungd has quit [Quit: leaving]
<Solnse1> but it doesn't work... am I right in assuming I can do processing in the brackets with the same name?
tungd has joined #ruby
quest88 has joined #ruby
pu22l3r has quit [Remote host closed the connection]
<ismaelabreu> I don't understand what you said
geeksir has quit [Quit: This computer has gone to sleep]
carlyle has joined #ruby
carlyle has quit [Remote host closed the connection]
geeksir has joined #ruby
tommyvyo_ has quit [Quit: Computer has gone to sleep.]
mjolk has joined #ruby
mjolk is now known as Guest95010
squidBits has joined #ruby
hsbt is now known as hsbt_away
andalf has quit [Remote host closed the connection]
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
lolcathost has quit [Ping timeout: 264 seconds]
lolcathost has joined #ruby
ryanf has quit [Ping timeout: 255 seconds]
geeksir has quit [Quit: Leaving]
combataircraft_ has joined #ruby
freakazoid0223 has quit [Quit: Leaving]
joeycarmello has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
g_bleezy has joined #ruby
eph3meral has left #ruby [#ruby]
otters has quit [Ping timeout: 265 seconds]
combataircraft has quit [Ping timeout: 250 seconds]
combataircraft_ is now known as combataircraft
cableray has quit [Quit: cableray]
joeycarmello has quit [Ping timeout: 246 seconds]
benlieb has joined #ruby
hsbt_away is now known as hsbt
cableray has joined #ruby
pcarrier has quit []
abstrakt has joined #ruby
g_bleezy has quit [Ping timeout: 250 seconds]
banister_ has quit [Ping timeout: 264 seconds]
tomsthumb has quit [Ping timeout: 255 seconds]
ToTo has quit [Ping timeout: 248 seconds]
yacks has quit [Ping timeout: 265 seconds]
tungd has quit [Quit: leaving]
benlieb has quit [Quit: benlieb]
generalissimo has joined #ruby
banisterfiend has joined #ruby
ewag has joined #ruby
<Solnse1> some one please tell me why I can't call .each on self?
<abstrakt> Solnse1: possibly because each is an instance method?
<Solnse1> ok, but the block is being called by another method, and I'm trying to use .each on it to process each element.
Slivka has quit [Read error: Connection reset by peer]
<Solnse1> is there another way to do it?
mockra has joined #ruby
<ozzloy> what is the 20152 part of this ruby log header? "I, [2012-12-12T15:45:08.311077 #20152] INFO -- : "
bradhe has joined #ruby
<ozzloy> my googling just shows a bunch of examples of writing ruby code to generate logs
squidBits has quit [Quit: whoops]
wildcard0 has quit [Ping timeout: 252 seconds]
jsilver has quit [Ping timeout: 252 seconds]
neurotech has quit [Remote host closed the connection]
mneorr has quit [Remote host closed the connection]
radic has joined #ruby
olds22 has joined #ruby
dmiller has joined #ruby
radic_ has quit [Ping timeout: 264 seconds]
neurotech has joined #ruby
epwhorl has quit [Ping timeout: 264 seconds]
Guest95010 has quit [Quit: This computer has gone to sleep]
benlieb has joined #ruby
pu22l3r has joined #ruby
art_man1 has joined #ruby
<charliesome> ozzloy: wild guess, but the pid?
cespare has joined #ruby
adeponte has joined #ruby
Vert has quit [Remote host closed the connection]
headius has quit [Quit: headius]
manizzle has joined #ruby
<ozzloy> charliesome, i thought that too, but no
<ozzloy> it doesn't even seem to be 1:1 to pid
<ozzloy> i just tried another process writing to the same file and got the same number there
DanBoy has joined #ruby
seanstickle has quit [Quit: seanstickle]
<charliesome> odd
<Solnse1> can somebody please recommend a *simple* guide on blocks and passing a block to methods, using yield, etc. ?
<Solnse1> I've wasted hours reading garbage.
poga has joined #ruby
skaczor has quit [Remote host closed the connection]
neurotech has quit [Remote host closed the connection]
<DanBoy> pickaxe :P
<DanBoy> Programming Ruby
<DanBoy> best book i've read on ruby so far
jaygen_ has joined #ruby
<Solnse1> own it.
yuruk has joined #ruby
<Solnse1> I want something simple... simple example, not a comprehensive explanation of everything it can do and the complexities of it.
<Solnse1> I just need a simple example.
jaygen has quit [Ping timeout: 252 seconds]
mercwithamouth has joined #ruby
mneorr has joined #ruby
<DanBoy> looks good
ryanf has joined #ruby
benlieb has quit [Quit: benlieb]
jaygen has joined #ruby
yacks has joined #ruby
<Solnse1> yeah I went through that an hour ago. I guess I'm just stupid.
DatumDrop has quit [Remote host closed the connection]
<Solnse1> I need to modify the string being passed, not just yield it.
<DanBoy> you new to coding or just ruby?
jaygen_ has quit [Ping timeout: 252 seconds]
<Solnse1> been beating my head against the wall for 11 months now.
jaygen_ has joined #ruby
butblack has quit [Quit: butblack]
rondale_sc has quit [Quit: rondale_sc]
<DanBoy> well sometimes just weathering through a book even if you dont get some parts is a lot better than trying to piece together things from random tutorials
<DanBoy> looks good
jaygen has quit [Ping timeout: 252 seconds]
tps_ has quit [Read error: Connection reset by peer]
<swarley> MMMMMM I love beginning ruby
<swarley> peter cooper is my programming hero
<DanBoy> i think i actually read this before Programming Ruby
tps_ has joined #ruby
<DanBoy> i read some beginning ruby book
<yuruk> MmmmMmmmMmmMMMmm I love beginning beginning rub
<yuruk> HEY GUYS
<yuruk> IS THE RUBY PROGRAMMING LANGUAGE GOOD?
<yuruk> AS IN THE BOOK
jaygen has joined #ruby
<yuruk> as compared to like Programming Ruby 1.9
<swarley> No idea
<swarley> Oh that
<DanBoy> i got them both
<DanBoy> i've only read programming ruby tho
fliqqer has joined #ruby
<yuruk> There's like -- Learning Ruby --- The Ruby Programming Language --- and Programming Ruby
<yuruk> Which is the best?
<swarley> It's good, not too very much changed. You can still learn a good deal from the language specification in The Ruby Programming Language
<yuruk> I know programming
jaygen_ has quit [Read error: Operation timed out]
jaygen has quit [Remote host closed the connection]
<yuruk> As in I've done python, perl and java before
<swarley> I like Beginning Ruby
<mockra> Eloquent Ruby is a pretty good book
<swarley> Yeah
<yuruk> I'll check it out thanks!
<yuruk> :)
jaygen has joined #ruby
<mockra> it has a few chapters on blocks
Pyro111 has joined #ruby
<swarley> As a person coming from perl, C/C++, and javascript, i liked Beginning Ruby
<DanBoy> i dunno i came from C/ASM and perl
<DanBoy> im still a ruby noob
<yuruk> DanBoy: ASM? Omg that's cool
<swarley> DanBoy; I would recommend Beginning Ruby, as a near advanced programmer I still use it as reference
<swarley> Pickax can be good though
<DanBoy> im finishing up literally the last 20 pages of Programming Ruby now
<DanBoy> i want to see the language in action so i got The Ruby Way
<yuruk> I know the Book of Ruby SUCKS
<swarley> I did some x86(_64)? asm a while back
nanothief has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
ClumsyFairyQueen has left #ruby ["Leaving"]
benlieb has joined #ruby
<swarley> just remaking the C stdlib
<yuruk> I totally love ruby
<yuruk> just that it's speed is quite a put-off sometimes
jaygen_ has joined #ruby
<swarley> 1.9 is much better than 1.8
<swarley> Closing the gap a lot. Other implementations are faster than MRI in many cases
<swarley> JRuby, Rubinius, etc
<charliesome> mri is fast enough
<charliesome> jruby and rbx are nice bonuses
mneorr has quit [Remote host closed the connection]
<swarley> Yeah, i usually don't deviate from MRI
<yuruk> Compared to Python?
<swarley> I don't notice a really bad speed drop
<charliesome> yuruk: from what i've seen, mri 1.9 is faster than python in a lot of cases
<swarley> yuruk; python has different optimizations than ruby that allow it to be faster in many cases
<Solnse1> I don't understand why I can't use the normal functions in this new method... I can't use .split, or .each, or anything.
<swarley> the way it handles strings is interesting from what I've heard
<charliesome> python wins in the memory management department because it does refcounting as well
<swarley> Solnse1; show some code in the form of a gist please
<charliesome> so you don't have long gc pauses if you create a lot of temp objects
<swarley> and yes, i would like ruby to use refcounts
jaygen has quit [Ping timeout: 252 seconds]
<swarley> It just seems to make the most sense out of every memory management technique
<swarley> I don't like mark and sweep
<charliesome> swarley: ref counting by itself is not enough
IceDragon has quit [Remote host closed the connection]
<swarley> Well no, but it does seem to be the most direct
ismaelabreu has quit [Remote host closed the connection]
<charliesome> circular references are very common in ruby
<charliesome> but doing ref counting + a proper gc would be nice
<charliesome> the problem is that mri is so huge that adding ref counting or write barriers for a generational gc would be a huge undertaking
nanothief has joined #ruby
<swarley> yeah.. I'm glad it at least adopted YARV though
<swarley> That was a huge speed consumtion, the way it handled the parsing
<swarley> consumption
browndawg has joined #ruby
<yuruk> Nevertheless I love ruby stilllllll I remember the time I did RAD on some networking ap
<yuruk> *app
<yuruk> Took 3 days
ryanf_ has joined #ruby
adeponte has quit [Remote host closed the connection]
<swarley> RAD?
guns has joined #ruby
<yuruk> *rapid application development
<swarley> ah
<yuruk> what's the fastest development you've ever had?
<swarley> Hm, probably writing an IRCd in about a week
<yuruk> That's superb man
yuruk has left #ruby ["Leaving..."]
ryanf has quit [Ping timeout: 245 seconds]
<swarley> It wasn't fully fledged, but it was well enough to support 5,000 users based on a huge load test
havenn has joined #ruby
danneu has joined #ruby
dmiller has quit [Remote host closed the connection]
beilabs has quit [Remote host closed the connection]
adeponte has joined #ruby
yuruk has joined #ruby
<yuruk> Oh yeah --- one more question
<yuruk> Any idea where to start P2P programming in ruby?
<swarley> P2P like, Limewire-esque?
<yuruk> yeah but not for filesharing
<yuruk> it's for a multiplayer game
<swarley> Oh, look at maybe GServe
<yuruk> I'll check it out thnks
<yuruk> ;)
yuruk has quit [Remote host closed the connection]
<swarley> err gserver
poga has quit [Remote host closed the connection]
ryanf_ has quit [Quit: broken pipes |||]
mneorr has joined #ruby
<danneu> man he had that finger ready on the esc button
jenrzzz_ has joined #ruby
<danneu> and he's off!
<swarley> LOL
<swarley> Yeah, didn't even have time to correct my typo
<swarley> And he probably wants to use EventMachine anyway..
havenn has quit [Remote host closed the connection]
hsbt is now known as hsbt_away
havenn has joined #ruby
mneorr has quit [Remote host closed the connection]
ryanf has joined #ruby
DatumDrop has joined #ruby
wildcard0 has joined #ruby
jenrzzz_ has quit [Ping timeout: 264 seconds]
havenn has quit [Ping timeout: 256 seconds]
jobicoppola has joined #ruby
davidcelis has joined #ruby
banjara has joined #ruby
Fezzler has joined #ruby
hsbt_away is now known as hsbt
Fezzler has quit [Client Quit]
DatumDrop has quit [Ping timeout: 245 seconds]
ryanf has quit [Quit: broken pipes |||]
gqlewis has joined #ruby
sorbo_ has joined #ruby
sorbo_ has quit [Remote host closed the connection]
sorbo_ has joined #ruby
benlieb has quit [Quit: benlieb]
dmiller has joined #ruby
ryanf has joined #ruby
brianpWins has joined #ruby
Junkyardhands has joined #ruby
epwhorl has joined #ruby
mneorr has joined #ruby
daniel_hinojosa has joined #ruby
benlieb has joined #ruby
centipedefarmer has quit [Remote host closed the connection]
hsbt is now known as hsbt_away
browndawg has quit [Ping timeout: 248 seconds]
gqlewis has quit [Remote host closed the connection]
emergion has joined #ruby
banjara has quit [Quit: Leaving.]
tomsthumb has joined #ruby
hsbt_away is now known as hsbt
Averna has quit [Quit: Leaving.]
emergion has quit [Client Quit]
swex_ has joined #ruby
hsbt is now known as hsbt_away
swex has quit [Ping timeout: 244 seconds]
generalissimo has quit [Remote host closed the connection]
x82_nicole has quit [Quit: Computer has gone to sleep.]
hsbt_away is now known as hsbt
art_man1 has quit [Quit: art_man1]
x82_nicole has joined #ruby
Junkyardhands has quit [Remote host closed the connection]
hsbt is now known as hsbt_away
skcin7 has joined #ruby
tommyvyo has quit [Quit: http://thomasvendetta.com]
sorbo_ has quit [Quit: sorbo_]
joofsh has quit [Remote host closed the connection]
browndawg has joined #ruby
tommyvyo has joined #ruby
headius has joined #ruby
pu22l3r has quit [Remote host closed the connection]
crackfu has quit [Remote host closed the connection]
lolcathost has quit [Ping timeout: 252 seconds]
hsbt_away is now known as hsbt
epwhorl has quit [Ping timeout: 248 seconds]
JDubs has quit [Ping timeout: 255 seconds]
tomsthumb has quit [Quit: Leaving.]
jobicoppola has quit [Quit: Computer has gone to sleep.]
phipes has joined #ruby
SCommette has quit [Quit: SCommette]
tjbiddle_ has joined #ruby
huoxito has quit [Ping timeout: 260 seconds]
tjbiddle__ has joined #ruby
hsbt is now known as hsbt_away
Taranis has quit [Remote host closed the connection]
tjbiddle has quit [Ping timeout: 248 seconds]
tjbiddle__ is now known as tjbiddle
hsbt_away is now known as hsbt
tjbiddle_ has quit [Ping timeout: 245 seconds]
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
dmiller has quit [Remote host closed the connection]
DanBoy has quit [Quit: Leaving]
tommyvyo has quit [Quit: Computer has gone to sleep.]
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
k_89 has joined #ruby
Solnse1 has quit [Quit: Leaving.]
Pyro111 has quit [Ping timeout: 244 seconds]
huoxito has joined #ruby
d34th4ck3r has joined #ruby
Targen has quit [Ping timeout: 245 seconds]
m3pow has joined #ruby
SCommette has joined #ruby
chriskk has quit [Quit: chriskk]
jonan has quit [Quit: jonan]
daniel_hinojosa has quit [Ping timeout: 245 seconds]
answer_42 has joined #ruby
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
shammancer has quit [Ping timeout: 255 seconds]
adeponte has quit [Remote host closed the connection]
kil0byte has joined #ruby
kiyoura has quit [Quit: Leaving]
adeponte has joined #ruby
hamfz_ has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
jekotia has quit [Quit: *passes out*]
iamjarvo1 has quit [Quit: Leaving.]
jonan has joined #ruby
<rismoney> Can this be neatened up with a hash table
d34th4ck3r has quit [Quit: Konversation terminated!]
cj3kim has joined #ruby
jonan has quit [Client Quit]
adeponte has quit [Remote host closed the connection]
adeponte has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
malcolmva has quit [Ping timeout: 244 seconds]
headius has quit [Quit: headius]
huoxito has quit [Ping timeout: 245 seconds]
zigomir has joined #ruby
aetcore has joined #ruby
Synthead has quit [Quit: p33 ba115]
Shamgar has quit [Ping timeout: 255 seconds]
Shamgar has joined #ruby
SCommette has quit [Quit: SCommette]
rippa has joined #ruby
osvico has quit [Ping timeout: 248 seconds]
robustus has quit [Ping timeout: 255 seconds]
robustus has joined #ruby
kil0byte has quit [Remote host closed the connection]
Nykolla_ has joined #ruby
tjbiddle has joined #ruby
phipes has quit [Quit: phipes]
manizzle has quit [Remote host closed the connection]
hsbt is now known as hsbt_away
cirwin has joined #ruby
adeponte has quit [Remote host closed the connection]
Nykolla has quit [Ping timeout: 265 seconds]
<davidcelis> rismoney: shit, son
<davidcelis> that doesn't even look like ruby
<davidcelis> is that java?
<ryanf> looks more like .net
hamfz_ has quit [Ping timeout: 245 seconds]
raddazong has joined #ruby
hamfz_ has joined #ruby
d34th4ck3r has joined #ruby
havenn has joined #ruby
fliqqer has quit [Ping timeout: 246 seconds]
hsbt_away is now known as hsbt
browndawg has left #ruby [#ruby]
tjbiddle has quit [Quit: tjbiddle]
andrewhl has joined #ruby
freeayu has joined #ruby
NiteRain has quit [Ping timeout: 246 seconds]
jcrawford has joined #ruby
pcboy_ has joined #ruby
<jcrawford> hello everyone, I am new to ruby and just trying to get a script i found to run. It is failing on trying to include active_support/inflector is that built into ruby or a gem i have to install?
billy_ran_away has quit [*.net *.split]
madhatter has quit [*.net *.split]
inimino has quit [*.net *.split]
ruzu has quit [*.net *.split]
dantesun has quit [*.net *.split]
mikekelly has quit [*.net *.split]
pcboy__ has quit [*.net *.split]
<charliesome> jcrawford: gem install activesupport
_alejandro has quit [Remote host closed the connection]
ruzu has joined #ruby
<jcrawford> thanks appreciate it :)
mikekelly has joined #ruby
<jcrawford> so no _ between active and support?
billy_ran_away has joined #ruby
SPYGAME has joined #ruby
benlieb has quit [Quit: benlieb]
k_89 has quit [Ping timeout: 244 seconds]
jonahR has quit [Quit: jonahR]
chord has joined #ruby
<chord> Ruby doesn't scale
headius has joined #ruby
<jtcoon> oh snaps
oGminor has quit [Quit: oGminor]
<chord> jtcoon: you know i'm right
<jtcoon> you are, forking perl scripts are superior'
<Boohbah> Any suggestions? http://pastie.org/5534349
havenn has quit [Remote host closed the connection]
oGminor has joined #ruby
havenn has joined #ruby
hsbt is now known as hsbt_away
karupanerura has quit [Excess Flood]
ewag has quit [Ping timeout: 255 seconds]
browndawg has joined #ruby
hsbt_away is now known as hsbt
zigomir has quit [Quit: zigomir]
karupanerura has joined #ruby
hsbt is now known as hsbt_away
havenn has quit [Ping timeout: 246 seconds]
bairui_ has joined #ruby
bairui has quit [Ping timeout: 250 seconds]
bairui_ is now known as bairui
dantesun has joined #ruby
aetcore has quit [Remote host closed the connection]
skcin7 has quit [Quit: Computer has gone to sleep.]
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
x82_nicole has joined #ruby
hamfz_ has quit [Ping timeout: 245 seconds]
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
mneorr has quit [Remote host closed the connection]
<jcrawford> why would I get this error when I run my script that is using Sequel
<jcrawford> mysql_api.bundle (Sequel::AdapterNotFound)
<jcrawford> i got the mysql gem installed fine
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
elkclone has joined #ruby
<chord> Someday some statically typed compiled scripting language will kill Ruby
<jcrawford> i installed myswl with gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config but still get that api error
<jcrawford> any ieas how i can resolve that error? I am on mac osx and not much is coming up in google
<jcrawford> *ideas
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
cj3kim has quit [Quit: This computer has gone to sleep]
odinswand has joined #ruby
Hanmac1 is now known as Hanmac
<odinswand> my ruby script can go wrong in a number of places, but i dont want it to crash the whole program if an error is thrown
<odinswand> is there any easy way to do this?
<cirwin> odinswand: add a rescue at the level whereever you want to restart from after an error
banisterfiend has quit [Ping timeout: 244 seconds]
k_89 has joined #ruby
<odinswand> cirwin: thx
hsbt_away is now known as hsbt
nari has quit [Ping timeout: 245 seconds]
hsbt is now known as hsbt_away
thufir_ has joined #ruby
Villadelfia_ has joined #ruby
hsbt_away is now known as hsbt
workmad3 has joined #ruby
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
Villadelfia has quit [Ping timeout: 252 seconds]
SeySayux has quit [Ping timeout: 264 seconds]
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
mokmok has joined #ruby
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
SeySayux has joined #ruby
hsbt is now known as hsbt_away
yacks has quit [Quit: Leaving]
kil0byte has joined #ruby
gordon1775 has quit [Ping timeout: 264 seconds]
x82_nicole has quit [Quit: Computer has gone to sleep.]
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
banisterfiend has joined #ruby
eldariof has joined #ruby
atmosx has joined #ruby
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
danneu has quit [Quit: WeeChat 0.3.8]
ewag has joined #ruby
xAndy is now known as xandy
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
Morkel has joined #ruby
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
blacktulip has joined #ruby
hsbt_away is now known as hsbt
pcarrier has joined #ruby
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
danneu has joined #ruby
danneu has quit [Client Quit]
Chryson has quit [Quit: Leaving]
lurch_ has quit [Quit: lurch_]
etehtsea has joined #ruby
kil0byte has quit [Remote host closed the connection]
<Mon_Ouie> hsbt: Stop doing that.
xandy is now known as xAndy
freeayu has quit [Remote host closed the connection]
guns has quit [Quit: guns]
tvw has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
odinswand has left #ruby [#ruby]
crazed has quit [Ping timeout: 246 seconds]
Morkel has quit [Quit: Morkel]
lkba has quit [Quit: Bye]
lkba has joined #ruby
SPYGAME has quit [Ping timeout: 246 seconds]
xAndy is now known as xandy
nemesit has joined #ruby
vlad_starkov has joined #ruby
hsbt is now known as hsbt_away
abstrakt has quit [Quit: abstrakt]
havenn has joined #ruby
jsaak has joined #ruby
d34th4ck3r has quit [Ping timeout: 248 seconds]
mokmok has quit [Remote host closed the connection]
<thufir_> Mon_Ouie: yeah
havenn has quit [Ping timeout: 260 seconds]
andrewhl has quit [Remote host closed the connection]
grzywacz has joined #ruby
osvico has joined #ruby
banjara has joined #ruby
visof has joined #ruby
mercwithamouth has quit [Ping timeout: 244 seconds]
hsbt_away is now known as hsbt
hsbt was kicked from #ruby by Mon_Ouie [Quit changing nicks like that]
hsbt has joined #ruby
olds22 has quit [Quit: Leaving]
u89 has joined #ruby
osvico has quit [Ping timeout: 260 seconds]
45PABH7PW has quit [Read error: Connection reset by peer]
arietis has joined #ruby
GeekOnCoffee_ has joined #ruby
banjara has quit [Quit: Leaving.]
workmad3 has quit [Ping timeout: 248 seconds]
hamed_r has joined #ruby
Shamgar has quit [Ping timeout: 260 seconds]
etehtsea has quit [Quit: Computer has gone to sleep.]
headius has quit [Quit: headius]
Shamgar has joined #ruby
ananthakumaran has joined #ruby
inimino has joined #ruby
Virunga has joined #ruby
rezzack has quit [Quit: Leaving.]
daniel_- has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
moshee has quit [Ping timeout: 260 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
foohey has joined #ruby
etehtsea has joined #ruby
hsbt is now known as hsbt_away
etehtsea is now known as Guest23108
mengu has joined #ruby
u89 has quit [Remote host closed the connection]
SPYGAME has joined #ruby
jenrzzz_ has joined #ruby
jxriddle has quit [Quit: jxriddle]
slainer68 has joined #ruby
ananthakumaran has joined #ruby
adambeynon has joined #ruby
tPl0ch has joined #ruby
mikey__ has joined #ruby
fyolnish has quit [Remote host closed the connection]
ananthakumaran has quit [Quit: Leaving.]
timonv has joined #ruby
zarubin has quit [Read error: No route to host]
daniel_- has quit [Quit: WeeChat 0.3.9.2]
lkba has quit [Ping timeout: 244 seconds]
lolmaus has joined #ruby
ebouchut has joined #ruby
FredLe has joined #ruby
mockra has quit [Remote host closed the connection]
darthdeus has joined #ruby
mikey__ has quit [Quit: leaving]
Neomex has joined #ruby
Neomex has quit [Client Quit]
jxriddle has joined #ruby
combataircraft has quit [Quit: combataircraft]
cableray has quit [Quit: cableray]
ananthakumaran has joined #ruby
Neomex has joined #ruby
ruzu has quit [Changing host]
ruzu has joined #ruby
bel3atar has joined #ruby
cirwin has quit [Quit: sleep...ping!]
hsbt_away is now known as hsbt
headius has joined #ruby
cableray has joined #ruby
jxriddle has quit [Ping timeout: 264 seconds]
F1skr has joined #ruby
headius has quit [Client Quit]
thone_ has joined #ruby
freeayu has joined #ruby
grzywacz has quit [Ping timeout: 248 seconds]
bel3atar has quit [Ping timeout: 245 seconds]
thone has quit [Ping timeout: 264 seconds]
Eiam has quit [Read error: Connection reset by peer]
lkba has joined #ruby
timonv has quit [Remote host closed the connection]
ebouchut has quit [Quit: This computer has gone to sleep]
visof has quit [Ping timeout: 245 seconds]
lurch_ has joined #ruby
grzywacz has joined #ruby
hsbt is now known as hsbt_away
bel3atar has joined #ruby
Bry8Star has quit [Ping timeout: 276 seconds]
cableray has quit [Quit: cableray]
ewag has quit [Read error: Connection reset by peer]
ewag has joined #ruby
ikaros has joined #ruby
bel3atar has quit [Ping timeout: 250 seconds]
jxriddle has joined #ruby
mneorr has joined #ruby
danneu has joined #ruby
xandy is now known as xAndy
rakunHo has joined #ruby
ryanf has quit [Ping timeout: 244 seconds]
darthdeus has quit [Quit: Leaving...]
Guest23108 has quit [Quit: Computer has gone to sleep.]
bel3atar has joined #ruby
darthdeus has joined #ruby
jxriddle has quit [Ping timeout: 245 seconds]
grn_ is now known as grn
browndawg has quit [Quit: Leaving.]
hsbt_away is now known as hsbt
hemanth_ has quit [Ping timeout: 244 seconds]
bel3atar has quit [Ping timeout: 265 seconds]
hamed_r has quit [Ping timeout: 245 seconds]
browndawg has joined #ruby
Bry8Star has joined #ruby
jenrzzz_ has quit [Ping timeout: 244 seconds]
visof has joined #ruby
elkclone has quit [Quit: It's never too late to unplug and run.]
robotmay has joined #ruby
ltsstar has joined #ruby
altious2 has joined #ruby
bel3atar has joined #ruby
sepp2k has joined #ruby
mockra has joined #ruby
grzywacz has quit [Ping timeout: 264 seconds]
hsbt is now known as hsbt_away
thufir_ has quit [Remote host closed the connection]
bel3atar has quit [Ping timeout: 248 seconds]
mockra has quit [Ping timeout: 255 seconds]
jxriddle has joined #ruby
scruple has quit [Ping timeout: 264 seconds]
visof has quit [Ping timeout: 246 seconds]
qwerxy_ has joined #ruby
qwerxy_ has quit [Client Quit]
F1skr has quit [Ping timeout: 252 seconds]
atmosx has quit [Ping timeout: 255 seconds]
bel3atar has joined #ruby
k_89 has quit [Ping timeout: 250 seconds]
jxriddle has quit [Ping timeout: 245 seconds]
ebouchut has joined #ruby
bel3atar has quit [Ping timeout: 244 seconds]
ram1 has joined #ruby
jenrzzz_ has joined #ruby
<ram1> hi
<ram1> what is best book for metaprogramming ?
wallerdev has quit [Quit: wallerdev]
<ram1> any beginner level book is appreciated :)
etehtsea has joined #ruby
etehtsea is now known as Guest37882
atmosx has joined #ruby
io_syl has quit [Quit: Computer has gone to sleep.]
Adget has joined #ruby
berserkr has joined #ruby
bel3atar has joined #ruby
F1skr has joined #ruby
io_syl has joined #ruby
FredLe has quit [Quit: Leaving.]
Kuifje has joined #ruby
Kuifje has quit [Changing host]
Kuifje has joined #ruby
io_syl has quit [Quit: Computer has gone to sleep.]
bel3atar has quit [Ping timeout: 255 seconds]
hamed_r has joined #ruby
arquebus has joined #ruby
kevinfagan has quit [Ping timeout: 244 seconds]
jxriddle has joined #ruby
agarie has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
eka has joined #ruby
jxriddle has quit [Ping timeout: 244 seconds]
<dash_> ram1: that's what I am searching too
rwalker has joined #ruby
arquebus has quit [Remote host closed the connection]
stayarrr has joined #ruby
mneorr has quit [Remote host closed the connection]
rwalker is now known as reppard
havenn has joined #ruby
<ram1> dash_: waooo we are on the same page :)
bel3atar has joined #ruby
skcin7 has joined #ruby
Adget has quit [Quit: Adget]
havenn has quit [Ping timeout: 252 seconds]
bel3atar has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
Guest73164 has joined #ruby
Shamgar has quit [Ping timeout: 264 seconds]
kevinfagan has joined #ruby
kevinfagan has quit [Remote host closed the connection]
Shamgar has joined #ruby
reppard has quit [Ping timeout: 250 seconds]
rakunHo has quit [Remote host closed the connection]
Gadgetoid has quit [Ping timeout: 252 seconds]
bel3atar has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
foohey has quit [Remote host closed the connection]
foohey has joined #ruby
foohey has quit [Remote host closed the connection]
jxriddle has joined #ruby
foohey has joined #ruby
vlad_starkov has joined #ruby
bel3atar has quit [Ping timeout: 245 seconds]
rjmt___ has joined #ruby
hoelzro|away is now known as hoelzro
jxriddle has quit [Ping timeout: 252 seconds]
ram1 has left #ruby [#ruby]
postmodern has quit [Quit: Leaving]
hamed_r has quit [Quit: Leaving]
rjmt___ has quit [Ping timeout: 265 seconds]
vlad_starkov has quit [Ping timeout: 244 seconds]
danneu has quit [Quit: WeeChat 0.3.8]
punkrawkR has joined #ruby
reppard has joined #ruby
beiter has joined #ruby
ebouchut has quit [Quit: This computer has gone to sleep]
Goles has joined #ruby
berserkr has quit [Quit: Leaving.]
xAndy is now known as xandy
xandy is now known as xAndy
reppard has quit [Ping timeout: 245 seconds]
tvw has quit [Remote host closed the connection]
jimeh has joined #ruby
kirun has joined #ruby
darthdeus has quit [Read error: Connection reset by peer]
darthdeu has joined #ruby
darthdeu has quit [Client Quit]
bel3atar has joined #ruby
emmanuelux has joined #ruby
chord has quit [Quit: Page closed]
Goles has quit [Ping timeout: 264 seconds]
tungd has joined #ruby
Goles has joined #ruby
crackfu has joined #ruby
ffranz has quit [Quit: Leaving]
browndawg has quit [Quit: Leaving.]
ddd has quit [Quit: Leaving.]
wargasm has quit [Ping timeout: 252 seconds]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
vlad_starkov has joined #ruby
Neomex has quit [Quit: Neomex]
x0F_ is now known as x0F
kirun has quit [Ping timeout: 264 seconds]
hoelzro is now known as hoelzro|away
crackfu has quit [Remote host closed the connection]
nari has joined #ruby
kennyvb has quit [Quit: ZNC - http://znc.in]
vlad_starkov has quit [Remote host closed the connection]
jenrzzz_ has quit [Quit: whyyyy]
kennyvb has joined #ruby
ebouchut has joined #ruby
Russell^^ has joined #ruby
lolmaus has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
ccooke has quit [Ping timeout: 255 seconds]
<jcrawford> why would I get this error when I run my script that is using Sequel
<jcrawford> mysql_api.bundle (Sequel::AdapterNotFound)
<jcrawford> i got the mysql gem installed fine
<jcrawford> i installed myswl with gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config but still get that api error
reppard has joined #ruby
<jcrawford> i am on mac osx 10.7
wermel has joined #ruby
nanothief has quit [Ping timeout: 250 seconds]
JonnieCache has joined #ruby
pwpw has joined #ruby
<reppard> good moring all
banisterfiend has quit [Remote host closed the connection]
Squarepy has joined #ruby
Squarepy has quit [Changing host]
Squarepy has joined #ruby
nignaztic has joined #ruby
NiteRain has joined #ruby
hsbt_away is now known as hsbt
<reppard> has anyone ever used the vmail gem?
rajesh_ has joined #ruby
mfridh has quit [Ping timeout: 250 seconds]
<rajesh_> I am new to Ruby and using it in ubuntu. I am using ruby 1.9.2 by rvm and have installed mysql connector when I require it from irb it shows true but when I try to connect to databse it give me error ENOENT: No such file or directory - /tmp/mysql.sock
<rajesh_> db = Mysql.connect("localhost", "test", "root", "pass")
lkba has quit [Ping timeout: 246 seconds]
<reppard> maybe you could find the needed sock file and require_relative?
slainer68 has quit [Remote host closed the connection]
<reppard> i've never messed with mysql from irb
kirun has joined #ruby
<rajesh_> Thanks, let me try it
pwpw has quit [Quit: pwpw]
mfridh has joined #ruby
ewag has quit [Ping timeout: 244 seconds]
timonv has joined #ruby
beiter has quit [Quit: beiter]
<tungd> rajesh_: the mysql socket in ubuntu is located at /var/run/mysqld/mysqld.sock
jslowe has joined #ruby
havenn has joined #ruby
Proshot is now known as statarb3
statarb3 has quit [Changing host]
statarb3 has joined #ruby
osvico has joined #ruby
Slivka has joined #ruby
xAndy is now known as xandy
havenn has quit [Ping timeout: 264 seconds]
banister_ has joined #ruby
<reppard> rajesh_: any luck?
<rajesh_> still trying :-(
<reppard> from the command line try ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock
xandy is now known as xAndy
Banistergalaxy has quit [Ping timeout: 245 seconds]
Banistergalaxy has joined #ruby
ccooke has joined #ruby
timonv has quit [Remote host closed the connection]
foohey has quit [Quit: Quitte]
havenn has joined #ruby
foohey has joined #ruby
freeayu has quit [Remote host closed the connection]
emmanuelux has quit [Read error: Connection reset by peer]
otters has joined #ruby
fyolnish has joined #ruby
emmanuelux has joined #ruby
samphippen has joined #ruby
<rajesh_> from the command line try ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock this actaully worked thanks but now new problem is "RuntimeError: Packets out of order: 0<> "
<rajesh_> :-(
punkrawkR has quit [Ping timeout: 250 seconds]
tomsthumb has joined #ruby
<reppard> rajesh_: what is the code that is making throwing that error
hoelzro|away is now known as hoelzro
<rajesh_> 1.9.2p320 :001 > require 'mysql'
<rajesh_> => true
<rajesh_> 1.9.2p320 :002 > db = Mysql.connect("localhost", "test", "root", "pass")
<rajesh_> RuntimeError: Packets out of order: 0<>
hsbt is now known as hsbt_away
huoxito has joined #ruby
<rajesh_> Mysql ver is 5.5.28 and I easly able to connect to database while using java but ruby is giving me hard time
tjbiddle has joined #ruby
<apeiros_> sounds to me like you compiled against a different version of mysql than you're connecting to. wonder why mysql wouldn't give a better error for that.
pwpw has joined #ruby
<apeiros_> more a guess, though
<apeiros_> you said you're on 10.7? iirc that ships with a mysql, so if you installed a mysql yourself too, that might how you ended up with 2 different mysql versions.
answer_42 has quit [Remote host closed the connection]
<rajesh_> If you are asking about ubuntu version then it is 12.10 and I am not facing problem when I am using java
<havenn> Competition is Perl 6, but kinda fun Ruby problems! http://strangelyconsistent.org/blog/the-2012-perl-6-coding-contest
F1skr has quit [Quit: WeeChat 0.3.9.2]
<apeiros_> ah, that was jcrawford who had issues with mysql and uses 10.7
MissionCritical has quit [K-Lined]
hsbt_away is now known as hsbt
iamjarvo has joined #ruby
<maetthew> I get this error when trying to run something I found
<maetthew> Please install the mysql adapter: `gem install activerecord-mysql-adapter` (Could not find mysql (~> 2.8.1) amongst [ALL MY GEMS HERE]
<maetthew> altough
tjbiddle has quit [Quit: tjbiddle]
<maetthew> i have the gem
<maetthew> activerecord-mysql-adapter-0.0.1
IrishGringo has joined #ruby
banister_ has quit [Read error: Connection timed out]
Goles has quit [Quit: Out.]
himsin has quit [Ping timeout: 245 seconds]
ltsstar has quit [Ping timeout: 260 seconds]
pwpw has quit [Quit: pwpw]
oz has quit [Quit: reboot]
kirun has quit [Quit: Client exiting]
<apeiros_> havenn: the knight/knave one sounds funny
<apeiros_> sad that they don't have a good amount of sample input/output :(
chiel_ is now known as chiel
Gadgetoid has joined #ruby
oz has joined #ruby
Guest73164 is now known as Jackneill
Jackneill has quit [Changing host]
Jackneill has joined #ruby
banister_ has joined #ruby
JonnieCache has quit [Quit: leaving]
reppard is now known as reppard-away
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
whowantstolivef1 has joined #ruby
miskander has joined #ruby
kirun has joined #ruby
IrishGringo has quit [Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121128204232]]
geeksir has joined #ruby
huoxito has quit [Quit: Leaving]
MissionCritical has joined #ruby
reppard-away has quit [Ping timeout: 248 seconds]
vlad_starkov has quit [Remote host closed the connection]
nemesit has quit [Ping timeout: 252 seconds]
banister_ has quit [Ping timeout: 246 seconds]
nemesit has joined #ruby
jfl0wers has quit [Ping timeout: 248 seconds]
ebouchut has quit [Quit: This computer has gone to sleep]
butblack has joined #ruby
rajesh_ has quit [Remote host closed the connection]
Adget has joined #ruby
rajesh has joined #ruby
rajesh has quit [Client Quit]
Slivka has quit [Remote host closed the connection]
DatumDrop has joined #ruby
horrror has joined #ruby
browndawg has joined #ruby
Guest37882 has quit [Quit: Computer has gone to sleep.]
Goles has joined #ruby
DatumDrop has quit [Ping timeout: 260 seconds]
geeksir has quit [Quit: Leaving]
fyolnish has quit [Remote host closed the connection]
reppard-away has joined #ruby
bel3atar has quit [Ping timeout: 264 seconds]
haxrbyte has quit [Ping timeout: 260 seconds]
abstrakt has joined #ruby
abstrakt has joined #ruby
abstrakt has quit [Changing host]
fyolnish has joined #ruby
vlad_starkov has joined #ruby
hsbt is now known as hsbt_away
nanothief has joined #ruby
rondale_sc has joined #ruby
NaviFullroot has joined #ruby
reppard-away has quit [Ping timeout: 248 seconds]
stayarrr has quit [Quit: Leaving...]
schaerli has joined #ruby
nanothief has quit [Ping timeout: 245 seconds]
sorbo_ has joined #ruby
alexspeller has joined #ruby
skcin7 has quit [Ping timeout: 245 seconds]
epwhorl has joined #ruby
ebouchut has joined #ruby
bel3atar has joined #ruby
nignaztic has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Quit: Lost terminal]
tommyvyo has joined #ruby
F1skr has joined #ruby
pettsson has joined #ruby
arturaz has joined #ruby
Hanmac has quit [Read error: Connection reset by peer]
Hanmac has joined #ruby
Neomex has joined #ruby
mjolk has joined #ruby
mjolk is now known as Guest38621
<horrror> how to set up rdflite?
fyolnish has quit [Remote host closed the connection]
alexspeller has quit [Remote host closed the connection]
NaviFullroot has quit [Ping timeout: 252 seconds]
horrror has quit [Quit: horrror]
fyolnish has joined #ruby
marr has joined #ruby
invisime has joined #ruby
ebouchut has quit [Quit: This computer has gone to sleep]
malcolmva has joined #ruby
adamben has joined #ruby
adamben has left #ruby ["Component based development - http://www.binpress.com"]
mercwithamouth has joined #ruby
alexspeller has joined #ruby
hsbt_away is now known as hsbt
banisterfiend has joined #ruby
timonv has joined #ruby
fyolnish has quit [Remote host closed the connection]
<shadewind> in a ruby C extension, is there any way to make MyClass.new return an instance which was created by Data_Wrap_Struct?
krisfremen has quit [Read error: Connection reset by peer]
krisfremen has joined #ruby
krisfremen has quit [Changing host]
krisfremen has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
jekotia has joined #ruby
shammancer has joined #ruby
<hoelzro> shadewind: sure there is
<apeiros_> Data_Wrap_Struct returns a VALUE, no? just return that VALUE
etehtsea has joined #ruby
etehtsea is now known as Guest18246
<shadewind> oh... should I just override MyClass.new then?
<hoelzro> exactly
<shadewind> and that's not considered bad practice?
<shadewind> for a C extension like this, that is
<apeiros_> is your Wrap_Struct not constructing an instance of MyClass?
<shadewind> it is
<shadewind> (of course not named MyClass but you get the point)
<apeiros_> then why should it be a bad practice?
<apeiros_> MyClass.new returns an instance of MyClass, that's the expected behavior
<apeiros_> don't forget MyClass.allocate
andrewhl has joined #ruby
rakunHo has joined #ruby
<shadewind> apeiros_: what should I don't forget about allocate?
<apeiros_> define the allocator
<apeiros_> rb_define_alloc_func
cableray has joined #ruby
<shadewind> apeiros_: why do I need to define it when my object is created in new?
Nisstyre has quit [Quit: Leaving]
vlad_starkov has joined #ruby
cableray has quit [Client Quit]
BSaboia has joined #ruby
cj3kim has joined #ruby
<apeiros_> because new and allocate serve different purposes.
jfl0wers has joined #ruby
<shadewind> so why even override new?
<apeiros_> who said something about overriding new?
<shadewind> isn't it better to override allocate and initialize?
<shadewind> 17:13 < shadewind> oh... should I just override MyClass.new then?
<shadewind> 17:14 < hoelzro> exactly
<hoelzro> that's my mistake, sorry!
<hoelzro> allocate is a much better choice
<shadewind> right
<shadewind> now I'm not confused anymore :)
cj3kim has quit [Client Quit]
hsbt is now known as hsbt_away
nomenkun has quit [Remote host closed the connection]
elico has joined #ruby
nomenkun has joined #ruby
DaZ has quit [Read error: Connection reset by peer]
rjmt___ has joined #ruby
io_syl has joined #ruby
lkba has joined #ruby
elico has quit [Remote host closed the connection]
pwelch has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
DaZ has joined #ruby
nari has quit [Ping timeout: 265 seconds]
stayarrr has joined #ruby
havenn has quit [Ping timeout: 250 seconds]
epwhorl has quit [Ping timeout: 252 seconds]
Xeago has quit [Remote host closed the connection]
BSaboia__ has joined #ruby
raz has joined #ruby
<raz> one thing that has been nagging me for a while..
<raz> is there a way to have bundler uninstall all gems from the gemfile and re-install from scratch?
<raz> it's kind of a pain when an underlying dep changes...
sorbo_ has quit [Quit: sorbo_]
miskander has quit [Quit: miskander]
BSaboia has quit [Ping timeout: 265 seconds]
ananthakumaran has quit [Quit: Leaving.]
ebouchut has joined #ruby
vlad_starkov has joined #ruby
jobicoppola has joined #ruby
yshh has quit [Remote host closed the connection]
DaZ has quit [Ping timeout: 246 seconds]
horrror has joined #ruby
osvico has quit [Read error: Connection reset by peer]
maletor has joined #ruby
eldariof has quit []
jxriddle has joined #ruby
Adget1 has joined #ruby
headius has joined #ruby
Adget has quit [Read error: Operation timed out]
jeffreybaird has joined #ruby
io_syl has quit [Quit: Computer has gone to sleep.]
Neomex has quit [Quit: Neomex]
havenn has joined #ruby
mercwithamouth has quit [Ping timeout: 248 seconds]
eldariof has joined #ruby
hsbt_away is now known as hsbt
joffery has quit [Quit: erm]
erm has joined #ruby
oGminor has quit [Quit: oGminor]
Vert has joined #ruby
dmiller has joined #ruby
eldariof has quit []
timonv has quit [Remote host closed the connection]
epwhorl has joined #ruby
BSaboia__ has quit [Quit: Fui embora]
katherinem13 is now known as katherinem13_out
eldariof has joined #ruby
erm has quit [Quit: erm]
seanstickle has joined #ruby
erm has joined #ruby
skaczor has joined #ruby
headius has quit [Quit: headius]
SCommette has joined #ruby
dmiller has quit [Remote host closed the connection]
Goles has quit [Quit: Computer has gone to sleep.]
reppard-away has joined #ruby
SCommette has quit [Client Quit]
Goles has joined #ruby
_alejandro has joined #ruby
Adget has joined #ruby
dorei has joined #ruby
seanstickle has quit [Client Quit]
mockra has joined #ruby
headius has joined #ruby
Adget1 has quit [Ping timeout: 256 seconds]
hsbt is now known as hsbt_away
<dorei> Hello, I have a: myServer = TCPServer.open(9900).accept , if a client connects to my tcpserver, I can use myServer.puts(data) to send data. Is there a way to find out if the client has closed the connection to my server?
seanstickle has joined #ruby
atmosx has quit [Quit: WeeChat 0.4.0-dev]
pwelch has quit [Quit: pwelch]
erm has quit [Quit: erm]
axl_ has joined #ruby
erm has joined #ruby
Goles has quit [Quit: Computer has gone to sleep.]
mercwithamouth has joined #ruby
butblack has quit [Quit: butblack]
centipedefarmer has joined #ruby
kidoz has joined #ruby
rjmt___ has quit [Ping timeout: 260 seconds]
jeffreybaird has quit [Quit: jeffreybaird]
ToTo has joined #ruby
erm has quit [Ping timeout: 250 seconds]
tungd has quit [Quit: leaving]
erm has joined #ruby
nignaztic has joined #ruby
wf2f has quit [Read error: Connection reset by peer]
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
schaerli has quit [Remote host closed the connection]
mockra has quit [Remote host closed the connection]
jgrevich has joined #ruby
yfeldblum has joined #ruby
<yfeldblum> is there a performance difference between using a string-valued constant and using a string literal? e.g. how does constant-lookup compare to GC?
Guest18246 is now known as etehtsea
jxriddle has quit [Read error: Connection reset by peer]
erm has quit [Quit: erm]
JohnBat26 has joined #ruby
joffery has joined #ruby
nanothief has joined #ruby
jxriddle has joined #ruby
heftig has quit [Ping timeout: 245 seconds]
<hoelzro> yfeldblum: a string valued constant would result in reuse of a single string object
<hoelzro> the difference in performance would probably be negilible, though
<yfeldblum> hoelzro, that's right, but it would also involve constant lookup
<hoelzro> constant lookup is a simple hash table lookup
<yfeldblum> hoelzro, the performance difference of doing it once would be negligible; but, if there is a performance difference, perhaps it would be useful to practice one over the other consistently across a codebase, and then the overall difference might be non-negligible
ebobby has joined #ruby
<hoelzro> yfeldblum: you could always use symbol literals as well
<hoelzro> which is probably the more proper way to do things
<yfeldblum> hoelzro, why would that be more proper?
<hoelzro> well, Ruby offers symbols for this sort of thing
ryanlecompte has joined #ruby
<hoelzro> however, if you *did* use a constant, you'd have a bit of built-in error checking
nanothief has quit [Ping timeout: 265 seconds]
banisterfiend has quit [Ping timeout: 264 seconds]
<yfeldblum> hoelzro, assume the code is tested :D
<hoelzro> ok
<hoelzro> I would use symbols then
<hoelzro> no constant
<hoelzro> but that's just me =)
<yfeldblum> hoelzro, does :"abc-def^xyz" need to create an intermediate string each time? ie is it a symbol literal, or is it a string literal on which #to_sym is called each time?
BrokenCog has joined #ruby
nignaztic has quit [Ping timeout: 264 seconds]
<hoelzro> it's a symbol lieral
<hoelzro> *literal
heftig has joined #ruby
michaelmartinez has joined #ruby
<yfeldblum> hoelzro, writing a benchmark script at the same time to test this ...
<hoelzro> that's probably a good idea ;)
<yfeldblum> user system total real
<yfeldblum> symbol-literal 0.740000 0.000000 0.740000 ( 0.746396)
<yfeldblum> constant 0.760000 0.000000 0.760000 ( 0.786762)
<yfeldblum> string-literal 1.970000 0.010000 1.980000 ( 1.992599)
jimeh has quit [Ping timeout: 255 seconds]
<hoelzro> it seems we have a winner!
<yfeldblum> hmmm didn't call to_s on the symbol
joffery has quit [Quit: erm]
<hoelzro> why do you need to?
erm has joined #ruby
<Mon_Ouie> I'd expect :"foo" to be the same as :foo — and to only "slow down" when using interpolation
<hoelzro> Mon_Ouie: as would I
<yfeldblum> hoelzro, suppose it's a network program that sends strings over the wire
jsaak has quit [Ping timeout: 252 seconds]
<oqa> yfeldblum: can you share the code for that benchmark?
<hoelzro> I see
arturaz has quit [Remote host closed the connection]
<yfeldblum> hoelzro, so symbols will eventually need to be #to_s'd
<hoelzro> right
mockra has joined #ruby
<hoelzro> are you going to be reusing a small set of the same symbols for this?
axl_ has quit [Quit: axl_]
horrror has quit [Quit: horrror]
BigO_ has joined #ruby
ebouchut has quit [Quit: This computer has gone to sleep]
jimeh has joined #ruby
Guest38621 has quit [Quit: This computer has gone to sleep]
<yfeldblum> hoelzro, think something like: LastModified = "Last-Modified".freeze
horrror has joined #ruby
wargasm has joined #ruby
zaki has quit [Ping timeout: 250 seconds]
zaki has joined #ruby
<hoelzro> if the number of symbols you're using is small, I would maintain a symbol -> string cache
SCommette has joined #ruby
hackerdude has joined #ruby
altious has joined #ruby
yshh has joined #ruby
tjbiddle has joined #ruby
michaelmartinez has quit [Quit: Check it, Wreck it http://www.caffeineindustries.com/blog]
altious2 has quit [Ping timeout: 264 seconds]
hackerdude has quit [Remote host closed the connection]
yshh has quit [Ping timeout: 245 seconds]
jobicoppola has quit [Quit: Computer has gone to sleep.]
zaki_ has joined #ruby
zaki has quit [Ping timeout: 250 seconds]
banisterfiend has joined #ruby
SCommette has quit [Quit: SCommette]
BadLarry has quit [Ping timeout: 260 seconds]
horrror has quit [Quit: horrror]
ryanf has joined #ruby
SCommette has joined #ruby
mjolk has joined #ruby
mjolk is now known as Guest74024
alexspeller has quit [Remote host closed the connection]
BadLarry has joined #ruby
Hama has joined #ruby
BigO_ has quit [Remote host closed the connection]
BigO_ has joined #ruby
SCommette has quit [Quit: SCommette]
elico has joined #ruby
Jackneill has quit [Quit: Jackneill]
zaki_ has quit [Ping timeout: 250 seconds]
phelps has joined #ruby
zaki_ has joined #ruby
ebouchut has joined #ruby
<oqa> yfeldblum: thanks
BigO_ has quit [Ping timeout: 255 seconds]
tjbiddle_ has joined #ruby
bel3atar has left #ruby ["Leaving"]
ebouchut has quit [Client Quit]
bwlang has joined #ruby
maletor has quit [Ping timeout: 265 seconds]
<yfeldblum> since constant-lookup has both lexical-scope and module-scope lookups, why was it faster than symbol-string-cache?
<yfeldblum> this is ruby-1.9.3-p327 with the falcon-gc patch
miskander has joined #ruby
tjbiddle has quit [Ping timeout: 265 seconds]
tjbiddle_ is now known as tjbiddle
BigO_ has joined #ruby
jsaak has joined #ruby
<yfeldblum> and why is symbol-literal slower than string-literal?
<hoelzro> yfeldblum: this is after to_s?
<hoelzro> I see it is
maletor has joined #ruby
<hoelzro> yfeldblum: think about it; you're calling a method that creates a string rather than simply creating that string
ebobby has quit [Quit: Lost terminal]
erm has quit [Quit: erm]
mockra has quit [Remote host closed the connection]
<apeiros_> yfeldblum: of course a .to_s is slower than a string literal
<apeiros_> to_s is a method call, method calls cost.
erm has joined #ruby
BigO_ has quit [Ping timeout: 255 seconds]
<apeiros_> the only thing that surprises me is that the hash is faster than Symbol#to_s
<yfeldblum> apeiros_, hoelzro, sounds right:
x82_nicole has joined #ruby
<yfeldblum> string-literal 1.770000 0.010000 1.780000 ( 1.770566)
<yfeldblum> string-literal-in-method 2.270000 0.000000 2.270000 ( 2.282503)
<yfeldblum> symbol-literal 2.210000 0.000000 2.210000 ( 2.210457)
fir_ed has joined #ruby
DatumDrop has joined #ruby
ryanf has quit [Quit: broken pipes |||]
mark06 has joined #ruby
u89 has joined #ruby
<mark06> how to know if current line in File.read_line is last line?
<apeiros_> mark06: you don't
<apeiros_> you will know when trying to read the next line
miskander has quit [Quit: miskander]
<apeiros_> also I guess you mean File#readline
<yfeldblum> apeiros_, oqa, hoelzro, https://gist.github.com/edee751c0eddb7a855b8
<apeiros_> as there's neither a File::read_line nor a File#read_line
wallerdev has joined #ruby
epwhorl has quit [Quit: Leaving]
kirun_ has joined #ruby
erm has quit [Ping timeout: 240 seconds]
erm has joined #ruby
<apeiros_> yfeldblum: to me the only unexpected result is the cache
<mark06> apeiros_: actually, you do
<yfeldblum> apeiros_, why is that?
<yfeldblum> apeiros_, this is with falcon's hash patch btw
<mark06> apeiros_: file.eof? (true for last line)
<apeiros_> yfeldblum: the symbol table is just one big hash
DatumDrop has quit [Ping timeout: 252 seconds]
kirun has quit [Ping timeout: 260 seconds]
<yfeldblum> apeiros_, but this is a single hash object plus a single string object, rather than a symbol table and a new string object from #to_s
maletor has quit [Quit: Computer has gone to sleep.]
<apeiros_> yfeldblum: that shouldn't matter much to a hash
Shadow_S has joined #ruby
<apeiros_> there should be more work involved when going through a generic hash vs. through the symbol table
u89 has quit [Remote host closed the connection]
<yfeldblum> apeiros_, so this seems to be testing the perf of hash-lookup vs new-obj
mark06 has left #ruby [#ruby]
<apeiros_> ah, right, the allocation of a new object might be the reason for the increased time needed
<apeiros_> yeah, Symbol#to_s creates a new string object every time
Guest74024 has quit [Quit: This computer has gone to sleep]
workmad3 has joined #ruby
<yfeldblum> apeiros_, not terribly sure if the GC is running ...
<yfeldblum> how can you tell how many times the GC ran between time A and time B?
lurch_ has quit [Quit: lurch_]
<apeiros_> you can turn GC off and see how much that affects the performance
ryanf has joined #ruby
mockra has joined #ruby
lurch_ has joined #ruby
mneorr has joined #ruby
tomsthumb has quit [Quit: Leaving.]
<yfeldblum> apeiros_, turning off the gc makes it take a little longer ...
<apeiros_> lol, ouch
<apeiros_> try less iterations
<apeiros_> (with and without gc)
<apeiros_> also gc between the tests
<yfeldblum> apeiros_, what i want to know is if the Symbol#to_s bench is factoring in the extra GC time required to collect the strings it creates
<yfeldblum> apeiros_, rather than if it's increasing ruby's heap
<apeiros_> gc is unpredictable
<yfeldblum> apeiros_, i'm looking for a throughput number
<yfeldblum> apeiros_, say this runs continuously for a day; we could then predict the GC will run many times
<yfeldblum> apeiros_, i'm looking for a way to approximate that without requiring a full day
timonv has joined #ruby
tommyvyo_ has joined #ruby
browndawg has quit [Quit: Leaving.]
BigO_ has joined #ruby
PolPot_ has joined #ruby
nilg` has quit [Remote host closed the connection]
zaki[] has joined #ruby
elico has quit [Quit: elico]
zaki_ has quit [Ping timeout: 250 seconds]
axl_ has joined #ruby
ebouchut has joined #ruby
dorei has quit [Ping timeout: 264 seconds]
cpruitt has joined #ruby
<reppard-away> .
ryanf has quit [Quit: broken pipes |||]
Adget has quit [Quit: Adget]
reppard-away is now known as reppard
<Hanmac> GC is punctually like a german train ...
hsbt_away is now known as hsbt
timonv has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
skaczor has quit [Remote host closed the connection]
zaki[] has quit [Ping timeout: 250 seconds]
ebouchut has quit [Quit: This computer has gone to sleep]
<Hanmac> german trains has four big problems ... sping, sommer, fall and winter
<heftig> canada has four seasons: almost winter, winter, still winter and road construction
<Mon_Ouie> If you make it run for long enough, GC time will be included in the times you measure
<shevy> Hanmac lol
zaki[] has joined #ruby
chrstphrhrt has joined #ruby
BigO_ has quit [Remote host closed the connection]
PolPot_ has quit []
ebouchut has joined #ruby
banisterfiend has quit [Ping timeout: 245 seconds]
<Hanmac> heftig they have more than fourty words for snow ... but most of them are not for child-ears
BigO_ has joined #ruby
ryanf has joined #ruby
Jackneill has joined #ruby
Jackneill is now known as Guest45363
erm has quit [Ping timeout: 246 seconds]
rezzack has joined #ruby
wallerdev has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
tommyvyo_ is now known as tommyvyo
BigO_ has quit [Ping timeout: 264 seconds]
erm has joined #ruby
arietis has quit [Read error: Connection reset by peer]
<yfeldblum> Mon_Ouie, :D
<yfeldblum> Mon_Ouie, tried with 100M iterations
<yfeldblum> Mon_Ouie, similar results, just 10 times larger
arietis has joined #ruby
zaki[] has quit [Ping timeout: 250 seconds]
<BrokenCog> yfeldblum: I don't think you can predict GC. At least, not a well implemented mechanism. Unless you run the same data set, with the same machine load, GC will be invoked at different times.
zaki[] has joined #ruby
<BrokenCog> but, if you run large enough data sets, GC can be "factored out" for timing.
Hama has quit [Remote host closed the connection]
Slivka has joined #ruby
<yfeldblum> BrokenCog, trying to factor *in* GC
<BrokenCog> that's the point - with a large enough data set, you dont't need to. on small sets, then they are too small to matter and GC will skew results.
<yfeldblum> BrokenCog, yep - that's why i ran it with a large enough data set :D
Nisstyre-laptop has joined #ruby
<BrokenCog> what is the framework, by the way?
<yfeldblum> BrokenCog, sorry?
<BrokenCog> waht system's GC are you testing?
<BrokenCog> language?
<yfeldblum> BrokenCog, ruby-1.9.3-p327 with falcon-gc patch on ubuntu 12.04
<BrokenCog> applicati... ah.
<BrokenCog> versus without I take it?
darthdeus has joined #ruby
<yfeldblum> BrokenCog, no, benching constant-lookup time vs string-literal (new-obj + gc) time
hsbt is now known as hsbt_away
<BrokenCog> i see.
kidoz has quit [Quit: Ухожу я от вас]
haxrbyte_ has joined #ruby
<BrokenCog> you could try disabling GC, do the runs, enable it and get a meaningful impact if GC.
workmad3 has quit [Ping timeout: 250 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
otters has quit [Ping timeout: 244 seconds]
banisterfiend has joined #ruby
<yfeldblum> BrokenCog, tried that; it takes longer
<yfeldblum> BrokenCog, also, i don't want to time this with the effects of GC removed; i want to time this with the effects of GC *included*
brianpWins has quit [Quit: brianpWins]
<yfeldblum> BrokenCog, i want to know if allocating a string and then collecting it later, done millions of times, is faster or slower than ruby's constant-lookup mechanism
<BrokenCog> you just showed the result by disabling GC and noting how much longer it took - that in effect differed collection until later.
<BrokenCog> you could try tuning GC. set RUBY_GC_MALLOC_LIMIT RUBY_HEAP_FREE_MIN RUBY_HEAP_MIN_SLOTS
<BrokenCog> to various values.
mercwithamouth has quit [Ping timeout: 255 seconds]
<yfeldblum> BrokenCog, i tried that once, it took longer, and then i stopped messing with the GC in the bench script
<BrokenCog> not surprised. it's probably quite well optimized out of the box.
alexspeller has joined #ruby
altious has quit [Ping timeout: 260 seconds]
<yfeldblum> BrokenCog, ruby GC is ... "optimized" ... sure :D
<BrokenCog> ...
<BrokenCog> just to understand ... your goal is to say what? that GC causes x % increase?
Shamgar has quit [Read error: Connection reset by peer]
<yfeldblum> BrokenCog, goal is to understand, if i do `io_obj << SOME_CONSTANT`, is it higher throughput than if i do `io_obj << "the bytes i want\r\n"`, or lower throughput, doing that many times over the course of a long period of time, during which time the GC is sure to run many times?
banisterfiend has quit [Ping timeout: 264 seconds]
Marco has joined #ruby
rondale_sc has quit [Quit: rondale_sc]
<BrokenCog> i see.
<BrokenCog> to understand the GC impact, or the io_obj throughput?
<yfeldblum> odd ... in jruby, constant-lookup is about as fast, but symbol-string-cache is ~50% slower, and string-literal, string-literal-in-method, and symbol-literal are all ~40% faster
<yfeldblum> BrokenCog, to see which way has higher throughput
<yfeldblum> BrokenCog, to see if the cost of alloc+gc is bigger or smaller than the cost of constant-lookup
<BrokenCog> okay.
zaki_ has joined #ruby
<BrokenCog> so, you need a way to control GC execution, and / or account for it when it runs.
zaki[] has quit [Ping timeout: 250 seconds]
abstrakt has quit [Quit: abstrakt]
<reppard> whats the preferred method for accessing and setting an objects attributes within its class?? @attribute or self.attribute
<reppard> minus one of those question marks
Shamgar has joined #ruby
obind has joined #ruby
nomenkun has quit [Remote host closed the connection]
<yfeldblum> BrokenCog, i just need to be sure it's being included
haxrbyte_ has quit [Ping timeout: 245 seconds]
<BrokenCog> try using those GC variables and shrink them to force it to run more often.
<BrokenCog> your run time should go up, constant value on different data set sizes.
chriskk has joined #ruby
banjara has joined #ruby
emmanuelux has quit [Quit: emmanuelux]
d34th4ck3r has joined #ruby
blacktulip has quit [Remote host closed the connection]
kirun_ has quit [Ping timeout: 245 seconds]
erm has quit [Quit: erm]
etehtsea has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Tarential has quit [Ping timeout: 252 seconds]
Guest45363 has quit [Quit: Guest45363]
Guest45363 has joined #ruby
Tarential has joined #ruby
nmeum has joined #ruby
segv- has quit [Quit: segv-]
thufir_ has joined #ruby
nmeum has quit [Client Quit]
Guest45363 is now known as Jackneill
Jackneill has quit [Changing host]
Jackneill has joined #ruby
wermel has quit [Remote host closed the connection]
chrstphrhrt has left #ruby [#ruby]
`brendan has joined #ruby
apeiros_ has quit [Ping timeout: 246 seconds]
apeiros_ has joined #ruby
<headius> yfeldblum: what's this?
kirun has joined #ruby
mark06 has joined #ruby
<yfeldblum> headius, what's what?
alexspeller has quit [Remote host closed the connection]
<headius> just saw your mention about speeds of things in jruby...
<headius> literal strings always create a new object, which is a big hit if you want something like that to be as fast as possible
<headius> in jruby they don't recreate the byte[], but the object wrapping it has to be recreated
<yfeldblum> headius, indeed; question was how does that hit compare to the hit from const-lookup
ruzu is now known as ruzu2
ruzu2 is now known as ruzu
<mark06> how come that first line doesn't work if using ## instead of $#?
<mark06> cols.each_with_index { |col, ix| row.gsub!(/##{ix + 1}/, col) }
<mark06> row.gsub!(/#\d+/, '')
<headius> constants should be easily the fastest out of those options
<headius> on an invokedynamic-supporting JVM constants will be free in most cases
<mark06> if the # is replaced with $, it works just fine, what an odd bug it would be!
<yfeldblum> headius, speed of running https://gist.github.com/edee751c0eddb7a855b8 in ruby-1.9.3-p327 with falcon-gc patch vs running it in jruby 1.7.1 on jvm 1.6
<Hanmac> information, there is cool stuff that does not work with jruby, so depending on it is not a good idea
<headius> Hanmac: like what?
SCommette has joined #ruby
<yfeldblum> headius, yeah that's what i had suspected, but i wanted to benchmark it too
<headius> yfeldblum: I only see one set of results…is that jruby or mri?
<headius> GC impact from literals will obviously be a lot higher
<Hanmac> headius: i have bindings for an 3d-engine, and an other for GUI-Programming
<yfeldblum> headius, ruby-1.9.3-p327 with falcon-gc patch
<Hanmac> both does not work with jruby
SCommette has quit [Client Quit]
<yfeldblum> headius, question isn't whether literals have a alloc+collect impact; question is the comparative impact w.r.t. constant-lookup
<headius> Hanmac: so you're saying libraries written to work only with MRI's C API
<headius> there's also a lot of cool stuff that doesn't work on MRI, so perhaps you shouldn't depend on MRI
daniel_hinojosa has joined #ruby
hsbt_away is now known as hsbt
<yfeldblum> headius, the real surprise is the symbol-string-cache, which is the one benchmark on which jruby performs slower than mri (jruby is equal or faster on the other ones)
<Hanmac> headius: yeah, but my stuff is cooler
<yfeldblum> headius, again, patched mri
nomenkun has joined #ruby
<headius> Hanmac: too bad it only works on the least advanced of the Ruby implementations :-)
banisterfiend has joined #ruby
Squarepy has quit [Quit: Leaving]
<headius> but hey, who needs 3D and GUI to be fast!
<headius> </troll>
<Hanmac> headius: 1) with the 3D i get more than 200FPS, and 2) my gems works on rubinus too, it only works not on jruby ... show me something for jruby that can do 3D like with ogre3d
<yfeldblum> headius, :D
<thufir_> once I have a mail object, how do I get the header object from it? http://rdoc.info/github/mikel/mail/Mail/Header
daniel_hinojosa has quit [Ping timeout: 260 seconds]
otters has joined #ruby
mark06 has left #ruby [#ruby]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
brianpWins has joined #ruby
ryanlecompte has quit [Remote host closed the connection]
<headius> and that's just ogre…there's probably a dozen 3d libraries for JVM
<wildcard0> i like jme3 as well and have had a bit of luck integrating it with jruby
<jcrawford> crap i missed the answer to my question :(
zaki_ has quit [Ping timeout: 250 seconds]
<wildcard0> it's a whole game dev suite, not just 3d. it also does sound, input, etc
frem has joined #ruby
<headius> indeed
<headius> there's also a physic engine for it
<headius> physics
<jcrawford> apeiros_: do you know the solution to the issue i was having with MySQL?
nomenkun has quit [Remote host closed the connection]
<jcrawford> apeiros_: understood saw what you said in logs, I did in-fact have to install my own version
<headius> yfeldblum: I'll have jruby+indy versus falcon numbers in a moment
<headius> a quick run had them all about the same, under .7s
<jcrawford> apeiros_: i don't believe mysql is in 10.7 Lion though, I believe that's why i installed it myself
<yfeldblum> headius, indy?
<headius> invokedynamic
SCommette has joined #ruby
<headius> JVM feature that speeds up jruby
rondale_sc has joined #ruby
<yfeldblum> headius, jvm 1.7?
<headius> yeah
<Dwarf> Good evening, whenever I try to use mysql with ruby I get main.rb:235:in `query': No database selected (Mysql::Error)
tPl0ch has quit [Quit: Verlassend]
BrokenCog has left #ruby [#ruby]
<Dwarf> How do I select a database?
<jcrawford> any ideas how i can resolve that error? I am on mac osx and not much is coming up in google
JDubs has joined #ruby
<jcrawford> mysql_api.bundle (Sequel::AdapterNotFound)
SCommette has quit [Client Quit]
<jcrawford> i installed myswl with gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config but still get that api error
<jcrawford> why would I get this error when I run my script that is using Sequel
<Dwarf> Oh it seems I can specify one after the password. Thanks anyway!
<Dwarf> jcrawford what API error?
<wildcard0> jcrawford: does /usr/local/mysql/bin/mysql_config produce results on the command line?
<wildcard0> does it make sense?
hsbt is now known as hsbt_away
<Dwarf> oh disregard anything I say
raz has quit [Ping timeout: 248 seconds]
<headius> meh, falcon + rvm not working for me…I'll just use 2.0.0
<jcrawford> outputs usage instructions because it requires flags to be sent
<wildcard0> oh i should look at 2. i played with it really briefly but i havent really looked at the new changes
SCommette has joined #ruby
<yfeldblum> headius, running this on ubuntu-12.04
<wildcard0> jcrawford: try --with-mysq-dir instead maybe?
<wildcard0> +l
SCommette has quit [Client Quit]
<jcrawford> if i call it with --include it shows the path the the include directory
stuartrexking has joined #ruby
<jcrawford> the command you stated showed the usage again as it is not a valid command
<stuartrexking> How can I work out where a monkey patch is occurring?
workmad3 has joined #ruby
<jcrawford> yeh i am on 5.5 32bit not 64bit
eldariof has quit []
<jcrawford> going to try it anyway :)
<jcrawford> thanks
<wildcard0> oh hmm. i've never tried the 32 bit one
<wildcard0> try the other switches though
<wildcard0> juset set the arch to i386 ?
manizzle has joined #ruby
kiyoura has joined #ruby
robotmay has quit [Remote host closed the connection]
AndChat| has joined #ruby
<Hanmac> headius: did you even read your link? "5 Jun 2009" was the last message
<headius> there's other libs that are more active…interest in this must have waned
<headius> in any case, there's lots of 3D libs for JVM you could use with JRuby
<jcrawford> something else this time
<jcrawford> LoadError: require 'mysql' did not define Mysql::CLIENT_MULTI_RESULTS! (Sequel::AdapterNotFound)
<jcrawford> heh
<jcrawford> always something :)
raz has joined #ruby
banjara has quit [Max SendQ exceeded]
ninp0 has joined #ruby
Banistergalaxy has quit [Ping timeout: 252 seconds]
<headius> Hanmac: anyway, trolling aside…I hate the MRI C API because it's impossible to implement on any modern VM without a lot of overhead
banjara has joined #ruby
<jcrawford> hah have to reinstall older mysql
<jcrawford> :(
<jcrawford> thanks for the help will write the script in anothe language for now
<headius> so people saying "you shouldn't use JRuby because it doesn't support MRI C API" makes me angry…it's an awful API and it's holding Ruby back
<wildcard0> jcrawford: ya mysql + ruby on the mac is a pain in the ass
vlad_starkov has quit [Ping timeout: 245 seconds]
<headius> I'm surprised maglev gets that close to jruby's times
<jcrawford> indeed
<headius> it's not that good on benchmarks with user-defined ruby objects
<wildcard0> osx is not easy to sys admin. it's non-standard and changes every minor revision
<headius> heh, there's a reason OS X servers went away
<wildcard0> you kinda need to know how to do all the dynamic library loading stuff to get a lot of the C modules working
<wildcard0> ya totally
<yfeldblum> headius, cool
<yfeldblum> headius, why is --1.8 faster?
reppard has quit [Ping timeout: 265 seconds]
lkba has quit [Ping timeout: 248 seconds]
<headius> m17n
<wildcard0> i wonder if the python guys have as much of an issue with their mysql stuff on osx
<headius> or encodings if that's not a familiar abbreviation
<yfeldblum> headius, why would m17n affect const-lookup or symbol-string-cache?
redgetan has joined #ruby
<headius> symbol string cache is barely faster…that's probably just noise
<headius> the others are appending to a string
<headius> er, well not appending, but creating
<yfeldblum> headius, const-lookup shouldn't be creating a string though
<yfeldblum> headius, shouldn't that be looking up a const by its symbol table id rather than by string?
<headius> could be differing block overhead, but yeah, that's strange
shevy2 has joined #ruby
<headius> occurs to me now we are probably not caching the coderange for literal strings in 1.9 mode and rescanning every construct
<yfeldblum> headius, this should be lexical-lookup rather than module-lookup so it should be the faster kind, right?
<headius> they're both the same in jruby
<headius> I think they're the same in 1.9 too
shevy has quit [Read error: Operation timed out]
<headius> all three major impls cache any constant lookup based on a global invalidator
rippa has quit [Ping timeout: 245 seconds]
lkba has joined #ruby
<yfeldblum> headius, ok
<yfeldblum> headius, that's good, so this is measuring a cached const-lookup rather than a full const-lookup?
<headius> ys
<headius> I don't have a way to measure full const lookup, but it's not a common case
<headius> unless you're modifying constants like mad
wargasm has quit [Ping timeout: 260 seconds]
F1skr has quit [Quit: WeeChat 0.3.9.2]
<yfeldblum> headius, i wasn't planning on `1_000_000.times { Object.new.extend(Kernel) ; io.write(THE_CONST) }`
<headius> heheh
<headius> that would certainly impact performance :)
<yfeldblum> headius, hehe yep, the alloc+collect itself would impact performance already, nevermind the global cache invalidation
robotmay has joined #ruby
<havenn> The question is, why doesn't CRuby support Java extensions? :P
<yfeldblum> headius, another subject entirely - how expensive is: /#{Regexp.quote(some_input_string)/
<headius> havenn: indeed!
<yfeldblum> headius, vs just: Regexp.quote(some_input_string)
<headius> well, let me count the number of objects created...
<headius> the first case passes the output of quote through a String before creating the Regexp
<headius> the second one just creates the String
butblack has joined #ruby
robotmay has quit [Remote host closed the connection]
<yfeldblum> headius, well, how expensive is creating Regexp instances from interpolated literals with interpolation?
<yfeldblum> headius, and do those Regexp instances get collected?
vlad_starkov has joined #ruby
SPYGAME has quit [Quit: Leaving]
<headius> we do have a cache of recently-used regexp, but it's not super deep
<yfeldblum> headius, suppose the instances are never used at all to match against a string (only Regexp#source and Regexp#options are ever called on it)
reppard has joined #ruby
<headius> in a perfect world the intermediate Regexp would get optimized away by the JVM, but in practice that doesn't happen right now
ryanh has joined #ruby
<yfeldblum> headius, are the regexp's compiled? are the compiled thingies kept around?
<headius> so there's a cost for creating the Regexp and possibly recompiling it
<yfeldblum> headius, is compiling expensive?
<headius> the compiled things are what we cache…not super expensive, but not free
IceDragon has joined #ruby
stuartrexking has quit [Quit: Leaving...]
<headius> yeah I'm confused now why 1.8 mode is faster for any of this
<headius> block overhead seems like the only likely candidate
reppard has quit [Ping timeout: 265 seconds]
<headius> yeah, seems to be it…a bare loop is about 25% faster in 1.8 mode
<headius> known issue
johnmilton has joined #ruby
butblack has left #ruby [#ruby]
<yfeldblum> headius, gotcha
daniel_hinojosa has joined #ruby
Shadow_S has quit [Quit: Textual IRC Client: www.textualapp.com]
BrokenCog has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
<Dwarf> <3 ruby
<yfeldblum> headius, benching making regexes ... /#{some_non_literal_expression}/ ...
banisterfiend has quit [Ping timeout: 246 seconds]
<headius> cool
tommyvyo has quit [Quit: http://thomasvendetta.com]
<headius> I love benchmarking :)
ner0x has joined #ruby
JDubs has quit [Ping timeout: 245 seconds]
BrokenCog has left #ruby [#ruby]
axl_ has quit [Quit: axl_]
kenneth has joined #ruby
mockra has quit [Remote host closed the connection]
<yfeldblum> headius, so jruby makes regexes at runtime (as opposed to parse-time) ~5x faster than 1.9.3-p327 + falcon-gc
nick_h has quit [Ping timeout: 265 seconds]
workmad3 has quit [Ping timeout: 260 seconds]
<headius> sounds good to me
reppard has joined #ruby
Beoran_ has joined #ruby
<lectrick> How do I define a class so that it can be called like Classname(some_arg) ?
<lectrick> is that just def Classname(arg)?
io_syl has joined #ruby
<headius> yes
<lectrick> And where does that get defined?
<lectrick> Like, what namespace is it in?
<headius> well that's up to you
moshee has quit [Remote host closed the connection]
<headius> if you want it to be everywhere, define it on Kernel
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
Beoran__ has quit [Ping timeout: 265 seconds]
reppard has quit [Ping timeout: 255 seconds]
nmeum has joined #ruby
nick_h has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
nmeum has quit [Client Quit]
generalissimo has joined #ruby
sn0wb1rd has joined #ruby
<yfeldblum> headius, i suppose the use-case i'm looking at is closest to regexp-inter-string-literal-m
jgrevich_ has joined #ruby
otters has quit [Ping timeout: 265 seconds]
jgrevich has quit [Ping timeout: 260 seconds]
jgrevich_ is now known as jgrevich
<yfeldblum> headius, not terribly sure how useful these benchmarks are
robotmay has joined #ruby
<headius> yfeldblum: jruby will optimize away a bare regexp in most cases
<headius> in these cases, though, it' a return value from the block so it won't go away
<headius> it's probably valid enough
<headius> I'll try numbers on indy in a sec
daniel_hinojosa has quit [Ping timeout: 244 seconds]
moshee has quit [Remote host closed the connection]
frem has quit [Quit: Computer has gone to sleep.]
friskd has joined #ruby
[KiSsPachYouSee] has joined #ruby
redgetan has quit [Quit: This computer has gone to sleep]
generalissimo has quit [Remote host closed the connection]
phipes has joined #ruby
pmros has joined #ruby
combataircraft has joined #ruby
<pmros> hi!
w400z has joined #ruby
<headius> yfeldblum: the -m versions are slow in jruby, which is a little strange
jenrzzz has joined #ruby
<lectrick> headius: so for example, Float(some_arg) is defined on Kernel?
<headius> yes
<lectrick> got it. thanks
<yfeldblum> headius, y is it strange? it's there to force it to go through a method call to force it not to be parsed once at parse-time and to be parsed each time during each iteration
<headius> well method calls should be pretty cheap on jruby
<headius> I guess they're about the same in all these cases
<headius> the literal non -m case optimizes to just be a literal regexp in all impls
<yfeldblum> headius, right
<headius> my numbers are about like yours
<headius> a regexp cache for stuff like this would be worthwhile
<headius> in your code, I mean
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
<yfeldblum> headius, heh i was just benching this to see if it would be better to just keep the string and options around separately rather than creating a regexp object
rakunHo has quit [Remote host closed the connection]
<yfeldblum> headius, these are highly variable regexps
aaronmacy has joined #ruby
<yfeldblum> headius, and i don't want to deal with threading issues
<headius> for what purpose?
<headius> just curious
<yfeldblum> headius, mongodb lets you do regexp queries, and you can either give it a regexp object or you can give it a regexp source string + a regexp options string
jenrzzz has quit [Read error: Connection reset by peer]
Solnse has joined #ruby
<headius> mmm I see
<headius> well an LRU cache would be worth considering at least
<headius> er, MRU whatever
<headius> a cache
<headius> :)
<yfeldblum> headius, heh :D
<headius> the thread_safe gem has a threadsafe cache impl
<yfeldblum> headius, really just wondering if creating the regexp object is something to avoid, which it is
<headius> yeah
<headius> it's not cheap
nomenkun has joined #ruby
<yfeldblum> headius, building a threadsafe mru cache is not on my top-10 list at the moment ...
<headius> fair enough :)
sepp2k1 has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<yfeldblum> headius, or using one but finding a good place to put it
nomenkun_ has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
sepp2k has quit [Ping timeout: 264 seconds]
pmros has quit [Quit: Page closed]
emmanuelux has joined #ruby
phipes has quit [Quit: phipes]
_alejandro has quit [Remote host closed the connection]
Jasko has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
combataircraft has quit [Quit: combataircraft]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Drewch_ has quit [Ping timeout: 255 seconds]
combataircraft has joined #ruby
nomenkun_ has quit [Remote host closed the connection]
workmad3 has joined #ruby
w400z has quit []
mockra has joined #ruby
fir_ed has quit [Ping timeout: 245 seconds]
Drewch has joined #ruby
cableray has joined #ruby
workmad3 has quit [Ping timeout: 250 seconds]
ryanf has quit [Quit: leaving]
tps_ has quit [Quit: tps_]
nomenkun has joined #ruby
slainer68 has joined #ruby
gordon1775 has joined #ruby
butblack has joined #ruby
ryanf has joined #ruby
hsbt_away is now known as hsbt
Jackneill has quit [Quit: Jackneill]
tommyvyo has joined #ruby
SuperrMann has joined #ruby
mockra has quit [Remote host closed the connection]
Jasko has joined #ruby
gordon1775 has quit [Ping timeout: 256 seconds]
agarie has joined #ruby
mockra has joined #ruby
xkx_ has joined #ruby
nomenkun has quit [Remote host closed the connection]
daniel_hinojosa has joined #ruby
cableray has quit [Quit: cableray]
mengu has quit [Quit: Konversation terminated!]
wargasm has joined #ruby
xkx_ has quit [Client Quit]
sirmarko has joined #ruby
xkx_ has joined #ruby
Dreamer3 has quit [Ping timeout: 265 seconds]
sirmarko has quit [Client Quit]
[KiSsPachYouSee] has quit [Ping timeout: 264 seconds]
iamjarvo has quit [Quit: Leaving.]
friskd has quit [Remote host closed the connection]
friskd has joined #ruby
Dreamer3 has joined #ruby
Slivka has quit [Remote host closed the connection]
butblack has quit [Quit: butblack]
combataircraft has quit [Quit: combataircraft]
KissPachYouSee has joined #ruby
pavilionXP has joined #ruby
frem has joined #ruby
hsbt is now known as hsbt_away
KissPachYouSee has quit [Client Quit]
chriskk has quit [Quit: chriskk]
DaZ has joined #ruby
guns has joined #ruby
g_bleezy has joined #ruby
kirun has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
cj3kim has joined #ruby
g_bleezy has quit [Ping timeout: 244 seconds]
arturaz has joined #ruby
SCommette has joined #ruby
[Gingersnap] has joined #ruby
slainer68 has quit [Remote host closed the connection]
io_syl has quit [Quit: Computer has gone to sleep.]
jlwestsr has joined #ruby
iamjarvo has joined #ruby
apok has quit [Remote host closed the connection]
apok has joined #ruby
xkx_ has quit [Quit: WeeChat 0.3.7]
frem has quit [Ping timeout: 246 seconds]
elico has joined #ruby
xkx has quit [Quit: leaving]
xkx has joined #ruby
x82_nicole has joined #ruby
darthdeu has joined #ruby
darthdeus has quit [Read error: Connection reset by peer]
agarie has quit [Ping timeout: 245 seconds]
xiphiasx_ has joined #ruby
xiphiasx_ has left #ruby [#ruby]
xiphiasx_ has joined #ruby
xiphiasx_ has quit [Client Quit]
io_syl has joined #ruby
xiphiasx_ has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
Goles has joined #ruby
io_syl has quit [Client Quit]
Guest67996 has quit [Ping timeout: 276 seconds]
hsbt_away is now known as hsbt
jslowe has quit [Quit: Leaving]
Guest67996 has joined #ruby
Russell^^ has quit [Quit: Russell^^]
vlad_starkov has joined #ruby
xiphiasx_ has quit [Quit: leaving]
SCommette has quit [Quit: SCommette]
xiphiasx_ has joined #ruby
postmodern has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
aaronmacy has quit [Quit: Leaving.]
jlwestsr has quit [Ping timeout: 246 seconds]
Goles has quit [Quit: Computer has gone to sleep.]
SCommette has joined #ruby
dougireton has joined #ruby
Jasko has quit [Read error: Connection reset by peer]
apok has quit [Ping timeout: 264 seconds]
alexspeller has joined #ruby
Jasko has joined #ruby
alexspeller has quit [Remote host closed the connection]
alexspeller has joined #ruby
headius has quit [Quit: headius]
alexspeller has quit [Read error: Connection reset by peer]
hsbt is now known as hsbt_away
alexspeller has joined #ruby
xkx has quit [Quit: WeeChat 0.3.9.2]
xkx has joined #ruby
xAndy is now known as xandy
dougireton has quit [Quit: Leaving.]
Godd2 has joined #ruby
bwlang has left #ruby [#ruby]
hoelzro is now known as hoelzro|away
workmad3 has joined #ruby
banisterfiend has joined #ruby
mahmoudimus has joined #ruby
andredieb has quit [Read error: Operation timed out]
jlwestsr has joined #ruby
nomenkun has joined #ruby
ewag has joined #ruby
seanstickle has quit [Quit: seanstickle]
nomenkun has quit [Ping timeout: 264 seconds]
andredieb has joined #ruby
andredieb has quit [Changing host]
andredieb has joined #ruby
joeycarmello has joined #ruby
stayarrr has quit [Quit: Linkinus - http://linkinus.com]
SCommette has quit [Quit: SCommette]
xandy is now known as xAndy
nomenkun has joined #ruby
alanp has joined #ruby
alanp has quit [Read error: Connection reset by peer]
alanp has joined #ruby
Shamgar has quit [Ping timeout: 255 seconds]
dagnachew has joined #ruby
CircleDot has joined #ruby
Shamgar has joined #ruby
nemesit has quit [Quit: Leaving...]
otters has joined #ruby
alanp_ has quit [Ping timeout: 244 seconds]
jlwestsr has quit [Quit: Ex-Chat]
CircleDot has quit [Client Quit]
dagnachew has quit [Quit: Leaving]
_alejandro has joined #ruby
nomenkun has quit [Remote host closed the connection]
apok has joined #ruby
chord has joined #ruby
ner0x has quit [Quit: Leaving]
ner0x has joined #ruby
<chord> in config/application.rb in Rails why are things like config.assets.enabled = true not using something like @config.assets.enabled = true
agarie has joined #ruby
<yfeldblum> chord, `config` is a method
apok has quit [Client Quit]
<yfeldblum> chord, and we always like to deal with other objects using their public API methods, not using ivars
<chord> yfeldblum: woah wait it config is a method then what does dot mean for config.assets.enabled
generalissimo has joined #ruby
<yfeldblum> chord, YourApp::Application.config is a method and it returns on object of type Rails::Application::Configuration
<apeiros_> chord: not much different from e.g. some_string.chomp.upcase.gsub(stuff, with_other)
<apeiros_> just an ordinary method chain
<Godd2> or "Hello".reverse.upcase
<Godd2> chord: when you're inside a class, you can call a class method simply by typing its name.
Goles has joined #ruby
<chord> so why did they decide to make this method chaining intsead of setting variables
wargasm has quit [Ping timeout: 248 seconds]
<yfeldblum> chord, because instance variables are almost never public API
hsbt_away is now known as hsbt
<yfeldblum> chord, instead, it's almost always this: "you're allowed to call methods X, Y, and Z; method X does this and returns that, etc."
<Godd2> also, isn't enabled set as an attr_accessor?
bwlang has joined #ruby
raz has quit [Ping timeout: 246 seconds]
SuperrMann has quit [Quit: Computer has gone to sleep.]
<apeiros_> also, setting variables is error prone
<apeiros_> (the public API part strikes me as the best reason)
_alejandro has quit [Remote host closed the connection]
arturaz has quit [Remote host closed the connection]
_alejandro has joined #ruby
aaronmacy has joined #ruby
darthdeu has quit [Quit: Linkinus - http://linkinus.com]
lushious has quit [Remote host closed the connection]
bwlang has left #ruby [#ruby]
io_syl has joined #ruby
hsbt is now known as hsbt_away
alexspeller has quit [Read error: Connection reset by peer]
alexspeller has joined #ruby
apok has joined #ruby
Jasko has quit [Read error: Connection reset by peer]
Jasko has joined #ruby
pettsson has quit [Remote host closed the connection]
wargasm has joined #ruby
hsbt_away is now known as hsbt
Solnse has quit [Ping timeout: 245 seconds]
rondale_sc has left #ruby [#ruby]
ltsstar has joined #ruby
rondale_sc has joined #ruby
Chryson has joined #ruby
<aces1up> does anyone have any good guides or books on best practices for programming threaded applications, as far as making object thread safe etc? Just seem to be having a lot of problems with threaded programming.
<aces1up> ruby specific would be nice as well.
_alejandro has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 245 seconds]
elaptics`away is now known as elaptics
d34th4ck3r has quit [Ping timeout: 255 seconds]
generalissimo has quit [Remote host closed the connection]
iosctr has joined #ruby
raz has joined #ruby
lurch_ has quit [Ping timeout: 264 seconds]
mockra_ has joined #ruby
SCommette has joined #ruby
mneorr has quit [Remote host closed the connection]
apeiros_ has quit [Remote host closed the connection]
<havenn> aces1up: Using Thread.new directly? Have you considered Actors (Celluloid http://celluloid.io/) or Agents (https://github.com/igrigorik/agent)?
elico has quit [Remote host closed the connection]
<havenn> I think I recall Matz saying something to the effect of wishing he'd gone with Agents in the first place and not had Threads. Can't remember.
mockra has quit [Ping timeout: 264 seconds]
stetho has joined #ruby
<havenn> Cool lib for doing a Process pool communicating between Channels: https://github.com/robgleeson/xpool
nkts has joined #ruby
<havenn> With 2.0.0's new GC forking is cheaper than it used to be! (Or 1.9 with --falcon patch).
nkts has quit [Excess Flood]
<yfeldblum> nodejs is webscale!!!
<havenn> With 2.0.0's new GC, fork is cheaper**
whowantstolivef1 has quit [Quit: have to get to bed]
nkts has joined #ruby
nkts has quit [Excess Flood]
<havenn> Celluloid::IO versus Node.js, discuss...
nkts has joined #ruby
nkts has quit [Excess Flood]
nkts has joined #ruby
nkts has quit [Excess Flood]
<stetho> Hi. I'm teaching myself ruby by copying examples and playing with them. I'm trying one that starts with "require 'mail'" but I get a LoadError: cannot load such file -- mail. Is there a generic mail gem or something? I tried gem install mail which installed something but didn't fix this problem. I'm on Ubuntu 12.04 with package installed everything.
nkts has joined #ruby
Targen has joined #ruby
nkts has quit [Excess Flood]
<havenn> stetho: Is mail a file named 'mail.rb'?
<havenn> stetho: Or a gem?
<yfeldblum> havenn, there is a gem named "mail"
<havenn> yfeldblum: Have you installed the gem?: gem install mail
<stetho> There is no mention (I know that much) of creating a mail.rb beforehand in this example I'm following. That's why I'm lost as to why this doesn't work.
nkts has joined #ruby
<havenn> stetho: Sorry, I suck at reading, you already said all that. :(
nkts has quit [Excess Flood]
<yfeldblum> stetho, havenn, sorry that was to stetho
<stetho> Reading is a pain.
nomenkun has joined #ruby
<havenn> stetho: Are you in a project with a file called "Gemfile"?
jenrzzz has quit [Quit: Lost terminal]
iamjarvo has quit [Quit: Leaving.]
<stetho> And it's no problem. I'm not new to programming but I am new to ruby. Please treat me like I know very little but know what objects are and instantiating is.
banisterfiend has quit [Ping timeout: 265 seconds]