apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p286: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com
workmad3 has joined #ruby
Tania has joined #ruby
Tania has quit [Changing host]
Tania has joined #ruby
Tania has quit [Client Quit]
nwertman has quit [Ping timeout: 268 seconds]
jeffreybaird has joined #ruby
fyolnish has quit [Remote host closed the connection]
hsbt is now known as hsbt_away
etcetera has quit [Quit: Computer has gone to sleep.]
nari has quit [Ping timeout: 255 seconds]
mercwithamouth has quit [Ping timeout: 252 seconds]
ossareh has quit [Ping timeout: 276 seconds]
etcetera has joined #ruby
postmodern has joined #ruby
lethjakmans_lap has joined #ruby
<lethjakmans_lap> Hey, I've got a small script, but it's telling me a file that I know is there that it isn't. am I doing something od wrong?
Goles has joined #ruby
tbrock has joined #ruby
staafl has quit [Ping timeout: 255 seconds]
banisterfiend has quit [Read error: Connection reset by peer]
Vainoharhainen has quit [Quit: Leaving...]
vlad_starkov has joined #ruby
seeingidog__ has quit [Quit: Leaving.]
banisterfiend has joined #ruby
ebouchut has joined #ruby
jbw has quit [Ping timeout: 255 seconds]
vlad_starkov has quit [Ping timeout: 252 seconds]
jbw has joined #ruby
nat2610 has quit [Quit: Leaving.]
<bill_> quit
mercwithamouth has joined #ruby
_alejandro has joined #ruby
bill_ has quit [Quit: Lost terminal]
seeingidog__ has joined #ruby
dmiller has quit [Remote host closed the connection]
devdude has left #ruby [#ruby]
marienz has quit [Ping timeout: 615 seconds]
the_jeebster1 has left #ruby [#ruby]
the_jeebster1 has joined #ruby
Xeago has quit [Remote host closed the connection]
freeayu has joined #ruby
bigmac has joined #ruby
<lethjakmans_lap> hey, I wana make a for each use a hash for it's output....is there any way to do that?
<lethjakmans_lap> E.G.
bwlang has joined #ruby
<lethjakmans_lap> foreach object do |blah|
<lethjakmans_lap> I want to use a hash in blah
nat2610 has joined #ruby
<shevy> lethjakmans_lap what
emptyflask has quit [Read error: Operation timed out]
danneu has quit [Ping timeout: 252 seconds]
mercwithamouth has quit [Ping timeout: 255 seconds]
<shevy> start irb
<lethjakmans_lap> can I set up blah so that I can use blah => firstName = "alex"
<lethjakmans_lap> ok
Cadwallion has quit [Quit: Lost terminal]
<shevy> inputFile = "/Users/alexanderkardos/Desktop/RubyWhirlpool/allWhirlpool.csv"
jackdanger has quit [Quit: Leaving.]
<shevy> File.exist? inputFile
<lethjakmans_lap> I got that part working
<shevy> ok so the file exists
<shevy> if the file exists, csv will not fail
<lethjakmans_lap> I'm using a CSV.foreach on it
<shevy> so you must do a mistake
mybrainis404 has quit [Ping timeout: 255 seconds]
<lethjakmans_lap> I have that working, I'm wanting to name the fields in eachcsv
<lethjakmans_lap> so I can call them with a name rather than a number
<shevy> a name rather than a number?
jackdanger has joined #ruby
<shevy> you can name the variable in |foo| however you want to
<shevy> %w( a b c ) .map{|y| y+"x"} # => ["ax", "bx", "cx"]
<rking> shevy: What If I want to name it "|`sudo rm -rf ~shevy`"
<rking> Caen i du tht?
atmosx_ has joined #ruby
thone_ has joined #ruby
<the_jeebster1> are there any ruby libraries that can search docs, pdfs, etc. for keyword arguments?
<lethjakmans_lap> I know, I want to name eachcsv[0] so I can call it with eachcsv[:firstName]
mklappstuhl has joined #ruby
Cadwallion has joined #ruby
<lethjakmans_lap> and eachcsv[1] could be eachcsv[:lastName]
<shevy> rking no idea, only stupid people have this idea
tbrock has quit [Quit: Computer has gone to sleep.]
<shevy> lethjakmans_lap when you use a pastie, always provide the error in that pastie, that makes help much easier
<rking> shevy: Nm then.
<lethjakmans_lap> I'm working on another problem
<shevy> rking I am just short on time right now, wanna help lethjakmans_lap before I have to sleep :)
thone has quit [Ping timeout: 252 seconds]
<the_jeebster1> or are there any standard practices for opening docs, pdfs, etc. searching for keywords and creating objects based on those keyword arguments. just not too familiar with process intensity of ruby scripts working with binary files
<rking> shevy: I was only giving you a hard time. I had no valuable thing to add.
jlast_ has quit [Read error: Operation timed out]
mercwithamouth has joined #ruby
mklappstuhl has quit [Ping timeout: 245 seconds]
NuclearLucifer has quit [Ping timeout: 260 seconds]
<shevy> the_jeebster1 search for keywords within a .pdf file?
<the_jeebster1> yeah
Drewch has quit [Quit: ZNC - http://znc.sourceforge.net]
arya has quit [Ping timeout: 244 seconds]
<the_jeebster1> I'm writing a script for someone that wants to pass in some keywords and I'd take the array of string arguments, search for each one in a binary file, if I find an instance, create an object
Drewch has joined #ruby
<the_jeebster1> just wondering if that's actually feasible and scalable in ruby
<the_jeebster1> for pdf and word docs mostly. I'm sure I'll have to standardize the text in the files before I search anyways
<JohnTeddy> ok, I got it working: http://pastebin.com/WvG3AQw0
dankest has quit [Quit: Leaving...]
jenrzzz has joined #ruby
<the_jeebster1> shevy: any idea?
d2dchat has joined #ruby
<shevy> the_jeebster1 hmm dont have much experience with binary files, unfortunately
h8R has quit [Read error: Connection reset by peer]
slainer68 has quit [Remote host closed the connection]
<shevy> I'd rather use a binding in ruby to interface with .pdf files too, than scan through the binary stream
<the_jeebster1> I feel like this is something that should be run through a queue system anyways
atmosx_ has quit [Ping timeout: 276 seconds]
Agis__ has joined #ruby
<the_jeebster1> shevy: hmm, not too familiar with bindings. how exactly do they function?
<the_jeebster1> looking at the docs..
pyr0commie has quit [Quit: Leaving]
<the_jeebster1> persisten objects?
<shevy> the_jeebster1 dunno. I even forgot which one I tried last... one on github it was
<shevy> you could get every page in a .pdf
havenn has joined #ruby
Agis__ is now known as keer
<keer> i know that mri has the GIL so we can not do real concurrency , is that right?
<the_jeebster1> so it essentially stores and returns the object from memory
workmad3 has quit [Ping timeout: 276 seconds]
bricker_ has joined #ruby
jrist is now known as jrist-afk
LouisGB has quit [Ping timeout: 252 seconds]
carlyle has joined #ruby
Goles has quit [Remote host closed the connection]
danneu has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
ckrailo has quit [Quit: Computer has gone to sleep.]
joeycarmello has quit [Remote host closed the connection]
fyolnish has joined #ruby
bricker has quit [Ping timeout: 265 seconds]
mtree0 is now known as mtree
iamjarvo has quit [Quit: Computer has gone to sleep.]
etcetera has quit [Quit: Computer has gone to sleep.]
d34th4ck3r has quit [Ping timeout: 276 seconds]
Danny_Joris has joined #ruby
elaptics is now known as elaptics`away
Trioke_ has quit [Ping timeout: 252 seconds]
chimkan_ has quit [Quit: chimkan_]
Danny_Joris has quit [Client Quit]
chussenot has quit [Quit: chussenot]
<havenn> keer: Ruby can do *real* concurrency. Threads are not the only tool in the box.
chongyu123 has quit [Remote host closed the connection]
chrishunt has quit [Quit: Leaving...]
dinkytoy has quit []
<havenn> keer: Unicorn is a nice example of the *nix concurrency that MRI Ruby supports out-of-the-box.
dinkytoy has joined #ruby
dhruvasagar has quit [Ping timeout: 268 seconds]
dankest has joined #ruby
cardoni has quit [Quit: cardoni]
artem has joined #ruby
chrishunt has joined #ruby
artem has quit [Client Quit]
swarley has quit [Ping timeout: 268 seconds]
joeycarmello has joined #ruby
tuannat has joined #ruby
lethjakmans_lap has quit [Remote host closed the connection]
dakine has joined #ruby
danneu has quit [Ping timeout: 260 seconds]
slainer68 has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
slainer68 has quit [Remote host closed the connection]
gridaphobe` has joined #ruby
gridaphobe has quit [Ping timeout: 264 seconds]
gridaphobe` is now known as gridaphobe
jimeh has quit [Quit: Computer has gone to sleep.]
austinbv has joined #ruby
chimkan has joined #ruby
mengu has quit [Read error: Connection reset by peer]
beilabs has quit [Ping timeout: 248 seconds]
beilabs has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
tomsthumb has joined #ruby
Goles has joined #ruby
seanyo has joined #ruby
otters has quit [Ping timeout: 252 seconds]
seanyo has quit [Remote host closed the connection]
Retistic has quit [Quit: Retistic]
chimkan has quit [Client Quit]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
johnmilton has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
_alejandro has quit [Remote host closed the connection]
<JohnTeddy> https://gist.github.com/4122454 ... what is wrong with this method?
Goles has quit [Remote host closed the connection]
<havenn> JohnTeddy: Not an answer but suggestion, it would make the paste more readable in Pry if you type: simple-prompt
araujo has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
<havenn> JohnTeddy: start_of_word != start_of_the_word
Goles has joined #ruby
tomsthumb has quit [Quit: Leaving.]
artnez has joined #ruby
<JohnTeddy> o woops
<JohnTeddy> I'm not using the variable name that rspec wants
<JohnTeddy> that makes a lot of sense
<JohnTeddy> heh
emmanuelux has quit [Ping timeout: 245 seconds]
<JohnTeddy> sweet, it works
<JohnTeddy> Thanks havenn
davidcelis has quit [Quit: K-Lined.]
mengu has quit [Read error: Connection reset by peer]
artnez has quit [Client Quit]
mmitchell has quit [Ping timeout: 245 seconds]
nwertman has joined #ruby
artnez has joined #ruby
dakine has left #ruby ["Leaving"]
the_jeebster1 has quit [Quit: Leaving.]
iamjarvo has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
havenn has quit [Remote host closed the connection]
maletor has joined #ruby
araujo has quit [Quit: Leaving]
havenn has joined #ruby
LouisGB has joined #ruby
statarb3 has quit [Quit: Leaving]
dmiller has joined #ruby
havenn has quit [Ping timeout: 255 seconds]
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
aleiphoenix has joined #ruby
guy1` has quit [Remote host closed the connection]
guy1` has joined #ruby
J-_-L has joined #ruby
slainer68 has joined #ruby
jjang has quit [Read error: Connection reset by peer]
jjang has joined #ruby
kennyvb has quit [Ping timeout: 255 seconds]
<Drewch> Is there a way to make ruby fail loudly? It seems that I run my script and it will just have no output if it fails. Where as if I run in irb then it will fail with the errors
c0smic has left #ruby [#ruby]
<Drewch> But it keeps running when I run it with ruby <script.rb>, even though it has failed
nwertman has quit [Ping timeout: 265 seconds]
cousine has quit [Remote host closed the connection]
v0n has joined #ruby
carlyle has quit [Remote host closed the connection]
sn0wb1rd has quit [Quit: sn0wb1rd]
nyrb has quit [Read error: Connection reset by peer]
ner0x has joined #ruby
nyrb has joined #ruby
Bootstrapper has quit [Remote host closed the connection]
kennyvb has joined #ruby
Liothen has quit [Read error: Connection reset by peer]
seeingidog__ has quit [Read error: Connection reset by peer]
bwlang has left #ruby [#ruby]
etcetera has joined #ruby
seeingidog__ has joined #ruby
Liothen has joined #ruby
Liothen has quit [Changing host]
Liothen has joined #ruby
austinbv has quit [Quit: WeeChat 0.3.8]
jjang has quit [Remote host closed the connection]
Axsuul has quit [Ping timeout: 246 seconds]
ixx has quit [Ping timeout: 246 seconds]
nat2610 has quit [Quit: Leaving.]
passbe has quit [Ping timeout: 246 seconds]
dankest has quit [Quit: Leaving...]
passbe has joined #ruby
ixx has joined #ruby
jlast has joined #ruby
guy1` has quit [Remote host closed the connection]
ixx is now known as Guest69898
slainer68 has quit [Ping timeout: 255 seconds]
guy1` has joined #ruby
ephemerian has quit [Quit: Leaving.]
hsbt_away is now known as hsbt
ryanf has joined #ruby
LouisGB has quit [Ping timeout: 240 seconds]
mmercer has quit [Ping timeout: 246 seconds]
emptyflask has joined #ruby
danneu has joined #ruby
tbrock has joined #ruby
xnm has quit [Quit: WeeChat 0.3.8]
mmercer has joined #ruby
<ner0x> https://gist.github.com/4122574 Regex help. Am I even close?
otters has joined #ruby
g-ram has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
u89 has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Leaving...]
bradhe has quit [Remote host closed the connection]
u89 has joined #ruby
Goles has quit [Remote host closed the connection]
chrishunt has quit [Quit: Leaving...]
rakl has quit [Quit: sleeping]
ttt has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
yshh has quit [Read error: Connection reset by peer]
nilg has joined #ruby
frogstarr78 has quit [Read error: Connection reset by peer]
yshh has joined #ruby
nilg has quit [Read error: Connection reset by peer]
nilg has joined #ruby
brimil01 has quit [Quit: Bye!]
adamholt has quit [Quit: ZNC - http://znc.sourceforge.net]
Bosma has quit [Ping timeout: 268 seconds]
jeffreybaird has joined #ruby
robbyoconnor has joined #ruby
bigmcq77 has joined #ruby
nari has joined #ruby
adamholt has joined #ruby
Bosma has joined #ruby
<JohnTeddy> split(/(\W)/).map(&:capitalize).join
<JohnTeddy> This capitalizes all words in a string. How can I make it not capitalize words that are 3 characters or less, so 'the', 'and', etc
Hanmac1 has joined #ruby
Slivka has joined #ruby
daniel_-_ has joined #ruby
Emmanuel_Chanel has joined #ruby
daniel_-_ has quit [Client Quit]
elkclone has quit [Ping timeout: 276 seconds]
pcarrier has quit [Ping timeout: 255 seconds]
ryanlecompte has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 252 seconds]
ttt has quit [Remote host closed the connection]
daniel_- has quit [Ping timeout: 265 seconds]
jlast has quit [Remote host closed the connection]
g-ram has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
rakl has joined #ruby
ttt has joined #ruby
d2dchat has quit [Remote host closed the connection]
bradhe has joined #ruby
<postmodern> JohnTeddy, use gsub with a block
nateberkopec has joined #ruby
<postmodern> JohnTeddy, gsub(/\w{4,}/) { |long_word| long_word.capitalize }
johnmilton has joined #ruby
kidoz has quit [Quit: Ухожу я от вас]
mickn has joined #ruby
nateberkopec has quit [Client Quit]
love_color_text_ has quit [Remote host closed the connection]
Emmanuel_Chanel has quit [Quit: Leaving]
cardoni has joined #ruby
forced_request has joined #ruby
love_color_text_ has joined #ruby
love_color_text_ has quit [Changing host]
love_color_text_ has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
bigmcq77 has quit [Quit: Computer has gone to sleep.]
u89 has quit [Remote host closed the connection]
bigmac has quit [Ping timeout: 245 seconds]
Emmanuel_Chanel has joined #ruby
Guest47056 has quit [Quit: Computer has gone to sleep.]
mikepack has quit [Remote host closed the connection]
<ner0x> /\A(\d{3}){1}(\d{3}){1}(\d{4}){1}(x\d+)?/ Is my regexp-foo strong?
tjbiddle has quit [Quit: tjbiddle]
tomsthumb has joined #ruby
<ner0x> /\A(\d{3}){1}(\d{3}){1}(\d{4}){1}(x{1}\d+)?\z/ Actually that's it.
<ner0x> I don't know that I need the {1} after the groups.
gmci has joined #ruby
gmci is now known as Guest20366
quest88_ has joined #ruby
ryanf has quit [Quit: leaving]
gridaphobe has quit [Ping timeout: 245 seconds]
<reactormonk> ner0x, no need for them
bigmcq77 has joined #ruby
<ner0x> reactormonk: Right. I got it working.
<ner0x> My foo is strong now..
jenrzzz has joined #ruby
bradhe has quit [Remote host closed the connection]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
slainer68 has joined #ruby
bigmcq77 has quit [Quit: Textual IRC Client: www.textualapp.com]
_numbers has joined #ruby
dakine has joined #ruby
bigmcq77 has joined #ruby
<JohnTeddy> postmodern: How do I make it so the first word is capitalized, even if it's 3 words? like 'war and peace'
<_numbers> is there a way i could convert a string value like 'a.b.c.d' to a hash path like hash['a']['b']['c']['d'] ?
xnm has joined #ruby
emptyflask has quit [Remote host closed the connection]
freezway has joined #ruby
<freezway> so what do you do with gems (where do you put them)
<JohnTeddy> I think you could make text.split(".")
slainer68 has quit [Ping timeout: 240 seconds]
<_numbers> right. i could do something like eval("hash['"+('a.b.c.d'.split('.').join("']['"))+"']")
<_numbers> but i am wondering if i can avoid eval. maybe using some method of Hash or splat
robbyoconnor has quit [Ping timeout: 248 seconds]
<_numbers> maybe passing an array to a Hash object like ['a','b','c','d'] that gets translated into key hierarchy
<JohnTeddy> _numbers: https://gist.github.com/4122734
<JohnTeddy> => [["a", 1], ["b", 1], ["c", 1], ["d", 1]]
<JohnTeddy> (note, I have no idea what I'm doing in ruby.. so imagine i'm like a 4 year old giving you coding suggestions on irc)
<freezway> where do i put a gem i downloaded and want to use
<JohnTeddy> freezway: What operating system are you using?
<freezway> linux
<JohnTeddy> freezway: Why not do 'sudo gem install gemnamehere'?
seeingidog__ has quit [Quit: Leaving.]
<freezway> oh thanks
<JohnTeddy> np
<freezway> wait
<freezway> it still wont run
<freezway> WARNING: You don't have /home/andrew/.gem/ruby/1.9.1/bin in your PATH,
<freezway> gem executables will not run.
<_numbers> JohnTeddy: here is a test illustrating desired input and desired output http://www.hastebin.com/yufokomoka.sm
<JohnTeddy> freezway: Don't do the sudo.
samphippen has quit [Quit: Computer has gone to sleep.]
<freezway> i didnt
<freezway> well
<freezway> i tried both
keer has quit [Quit: keer]
<_numbers> actually here's a better one http://www.hastebin.com/kenociwihi.sm
<JohnTeddy> freezway: What does echo $GEM_HOME say?
<freezway> nothing
<postmodern> JohnTeddy, adjust the regexp to exclude spaces
<postmodern> JohnTeddy, actually /[a-z]{4,}/ would work
<postmodern> JohnTeddy, since you don't care about already capitalized words or numbers
seeingidog__ has joined #ruby
tomsthumb has quit [Quit: Leaving.]
areil has joined #ruby
<freezway> JohnTeddy, i do already have the gem command
<JohnTeddy> freezway: What distribution are you using?
<freezway> arch
mugger has joined #ruby
<freezway> brb
<JohnTeddy> freezway: What does whereis ruby output?
<JohnTeddy> Are you using some locally compiled ruby, or a global one part of the package manager.
<postmodern> freezway, just add that missing path to your $PATH variable in .bashrc
mahmoudimus has joined #ruby
tomsthumb has joined #ruby
segmond has joined #ruby
segmond has left #ruby [#ruby]
<freezway> ruby: /usr/bin/ruby /lib/ruby /usr/lib/ruby /lib64/ruby /usr/share/man/man1/ruby.1.gz
pipopopo has quit [Ping timeout: 265 seconds]
<postmodern> freezway, http://pastie.org/5409728
<freezway> im using the arch ruby package (i didnit compile iy)
pipopopo has joined #ruby
<postmodern> freezway, also might want to open a bug with Arch about their rubygems package
<freezway> postmodern, still deosnty work
<postmodern> freezway, restart the shell?
<freezway> fuck
<freezway> back to bash i guess
<postmodern> freezway, or put that same code in /etc/profile
<postmodern> freezway, or .zshrc
<postmodern> freezway, or /etc/zshenv
Axsuul has joined #ruby
alexim has quit [Quit: sleep]
tommyvyo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
tommyvyo has joined #ruby
bigmcq77 has quit [Quit: Textual IRC Client: www.textualapp.com]
tommyvyo has quit [Client Quit]
mickn has quit [Quit: Leaving]
pipopopo has quit [Ping timeout: 246 seconds]
BoomCow has quit [Quit: This computer has gone to sleep]
pac1 has joined #ruby
wallerdev has quit [Quit: wallerdev]
mascool has quit [Ping timeout: 256 seconds]
pipopopo has joined #ruby
forced_request has quit [Read error: Connection reset by peer]
Guest69898 is now known as ixx
ksaw123 has joined #ruby
bradhe has joined #ruby
<ksaw123> hey guys. I need some help. I am getting a in "attr_accessor" nil is not a symbol error on line 2. My code is here : http://pastie.org/5409752
SuperrMann has quit [Quit: Computer has gone to sleep.]
<postmodern> ksaw123, remove the trailing ,
robert__ has joined #ruby
<ksaw123> ahhh cool ty
codezombie has quit [Quit: Linkinus - http://linkinus.com]
Dreamer3 has quit [Quit: Computer has gone to sleep.]
robert__ has quit [Read error: Connection reset by peer]
<ksaw123> block in get_officer_name on line 98, could you help me debug this postmodern? I would be greatly appreciative
<postmodern> ksaw123, remove the "then" on line 99
Lover has joined #ruby
<postmodern> ksaw123, in fact remove all "then"s
<ksaw123> use break if answer == "" ?
<postmodern> ksaw123, sure
<postmodern> ksaw123, "then" is only needed if the statement is on the same line
<postmodern> ksaw123, "if foo then bar()"
<postmodern> ksaw123, "bar() if foo" also works
bradhe has quit [Ping timeout: 248 seconds]
<ksaw123> gotcha
alvaro_o_ has quit [Quit: Ex-Chat]
<Lover> Welckom www.maghrebchat.ma chta and chat voice :) /server irc.maghrebchat.ma
<Lover> Welckom www.maghrebchat.ma chta and chat voice :) /server irc.maghrebchat.ma
<Lover> Welckom www.maghrebchat.ma chta and chat voice :) /server irc.maghrebchat.ma
Lover has quit [Killed (idoru (Spam is off topic on freenode.))]
chrishunt has joined #ruby
medik has quit [Quit: medik has no reason]
tbrock has quit [Quit: Computer has gone to sleep.]
AlbireoX has joined #ruby
AlbireoX has quit [Remote host closed the connection]
rh1n0 has joined #ruby
brianpWins has joined #ruby
ryanlecompte has joined #ruby
<_numbers> how can i recursively merge two hashes?
rh1n0 has quit [Client Quit]
davidcelis has joined #ruby
<postmodern> _numbers, there's gems that do that
krisfremen has quit [Ping timeout: 260 seconds]
ping-pong has quit [Ping timeout: 245 seconds]
Grieg has joined #ruby
Grieg has quit [Changing host]
Grieg has joined #ruby
pac1 has quit [Quit: I got it one line of code at a time]
bradhe has joined #ruby
stephenetyler has joined #ruby
<ksaw123> line 54 error Car.minparked == answer from main Car.get_minutes_parked() code: http://pastie.org/5409818 I feel like I am fat fingering this entire thing
bigmcq77 has joined #ruby
guy1` has quit [Remote host closed the connection]
guy1` has joined #ruby
jrajav has joined #ruby
Banistergalaxy has quit [Ping timeout: 245 seconds]
ping-pong has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Banistergalaxy has joined #ruby
uris has joined #ruby
krz has joined #ruby
bricker_ has quit [Ping timeout: 264 seconds]
BoomCow has joined #ruby
stephenetyler has quit [Quit: Page closed]
mahmoudimus has joined #ruby
mahmoudimus has quit [Client Quit]
bradhe has quit [Remote host closed the connection]
Chryson has joined #ruby
Dreamer3 has joined #ruby
mikepack has joined #ruby
adeponte has quit [Remote host closed the connection]
starship has joined #ruby
etcetera has quit [Quit: Computer has gone to sleep.]
jenrzzz has quit [Ping timeout: 255 seconds]
v0n has quit [Quit: Leaving]
xaq has joined #ruby
niklasb has quit [Ping timeout: 240 seconds]
blazes816 has quit [Quit: blazes816]
uris has quit [Quit: Leaving]
bigmac has joined #ruby
ZubKonst_ has joined #ruby
pencilcheck has joined #ruby
ZubKonst has quit [Ping timeout: 245 seconds]
<krz> if i got the following: [4.769021739130435,4.610054347826087,4.5040760869565215,4.239130434782608,3.8152173913043477,3.65625,3.603260869565217,3.232336956521739,2.861413043478261,2.331521739130435,1.377717391304348]. total sum is 39.00000000000001. whats the best way to turn all these values into a whole number but still have the total sum as 39?
hyperboreean has quit [Ping timeout: 245 seconds]
jeffreybaird has quit [Quit: jeffreybaird]
<krz> [4.769021739130435,4.610054347826087,4.5040760869565215,4.239130434782608,3.8152173913043477,3.65625,3.603260869565217,3.232336956521739,2.861413043478261,2.331521739130435,1.377717391304348].map { |i| i.floor }.sum returns 33
hyperboreean has joined #ruby
<jrajav> You want to discard most of the precision of your numbers, and then rely on that precision for a computation?
wallerdev has joined #ruby
<krz> jrajav: thats one way to look at it. i guess
wallerdev has quit [Client Quit]
starship has quit [Quit: WeeChat 0.3.9.2]
joeycarmello has quit [Remote host closed the connection]
<jrajav> Or are you trying to find the right application of rounding to each number to make the resulting integers sum to roughly the same number as the floats do?
<jrajav> Because that's a much less silly but also much tougher problem :P
<krz> i was also thinking of distributing the remainders evenly across each value in the array
starship has joined #ruby
joeycarmello has joined #ruby
<jrajav> I could do it very slowly and inelegantly by first taking the float sum, rounding it to the nearest integer, then take the difference between that and the floor sum and change that many of the numbers to do ceiling instead
<krz> so if my return result is 33. 39-33=6 (remainder). i add 1 to the top 6 elements
<jrajav> (IS there really a better way though?)
<jrajav> Well yeah that's basically what I just said :P
<jrajav> That's a difference, not a remainder
Emmanuel_Chanel has quit [Ping timeout: 252 seconds]
postmodern has quit [Quit: Leaving]
<krz> jrajav: how would you suggest i distribute the difference? through an each loop?
mahmoudimus has joined #ruby
ksaw123 has quit [Quit: irc2go]
tjbiddle has joined #ruby
Emmanuel_Chanel has joined #ruby
BoomCow has quit [Quit: Leaving]
chimkan has joined #ruby
afgeneralist has quit [Ping timeout: 256 seconds]
krisfremen has joined #ruby
krzkrzkrz has joined #ruby
<Dreamer3> is there a way for me to introspect the module a class is inside inside a method?
<jrajav> krz: You could do that, sure, but then you'd have to keep track of the index
jwang has joined #ruby
<krzkrzkrz> each_with_index
krz has quit [Ping timeout: 260 seconds]
krzkrzkrz is now known as krz
<jrajav> krz: You could also do something like arr[0..diff].each { |x| x + 1 }.concat(arr.drop(diff+1))
<jrajav> Where arr is your array and diff is the difference
maletor has joined #ruby
<krz> hm
<krz> let me try that out jrajav
<jrajav> And the array is already floored
postmodern has joined #ruby
<krz> hm
<krz> think that needs a bit of working
tomsthumb has quit [Quit: Leaving.]
<krz> arr=[4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 1]; diff=6; arr[0..diff].each { |x| x + 1 }.concat(arr.drop(diff+1))
<krz> doesn't do much
bradhe has joined #ruby
ananthakumaran has joined #ruby
frem_ has joined #ruby
alexshenoy has quit [Quit: alexshenoy]
<jrajav> Oh, sorry, map, not each
<jrajav> I was thinking about two different things at once
<jrajav> Also, I think I was off by one
<jrajav> arr[0..diff-1].map { |x| x + 1}.concat(arr.drop(diff))
guy1` has quit [Remote host closed the connection]
guy1` has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
banisterfiend has quit [Ping timeout: 245 seconds]
skaczor has quit [Ping timeout: 260 seconds]
<krz> jrajav: i was thinking of doing something like diff.times { |i| arr[i] + 1 }
<krz> but the last part isn't correct
<krz> jrajav: diff.times { |i| arr[i] = arr[i] + 1 } works. wondering if there is a better way to write this though
tuan_nat has joined #ruby
<krz> diff.times { |i| arr[i] += 1 }
<jrajav> Yeah that looks better
nwertman has joined #ruby
tuannat has quit [Ping timeout: 255 seconds]
alexshenoy has joined #ruby
Chryson has quit [Quit: Leaving]
jenrzzz has joined #ruby
seeingidog__ has quit [Quit: Leaving.]
etcetera has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
nwertman has quit [Ping timeout: 245 seconds]
<rking> Really small thing here, but I'd like to understand. I was surprised that `assert not foo` unworks while `assert ! foo` works.
johnmilton has quit [Quit: Leaving]
codezombie has joined #ruby
<rking> I know that there's a precedence difference, but I can't see where the imaginary parens are going that is causing it to fail
johnmilton has joined #ruby
codezombie has quit [Client Quit]
<rking> This also fails: assert(not false)
<rking> unexpected kNOT, expecting ')'
kil0byte has joined #ruby
ninegrid has quit [Ping timeout: 240 seconds]
_numbers has left #ruby [#ruby]
etcetera has quit [Quit: Computer has gone to sleep.]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
rohit_ has joined #ruby
joenobody has joined #ruby
adeponte has joined #ruby
voodoofish4301 has quit [Quit: Leaving.]
thinkdevcode has joined #ruby
alexshenoy has quit [Quit: alexshenoy]
jenrzzz has quit [Ping timeout: 252 seconds]
xaq has quit [Remote host closed the connection]
afgeneralist has joined #ruby
arya has joined #ruby
rohit_ has quit [Read error: Operation timed out]
araujo has quit [Quit: Leaving]
hemanth has joined #ruby
Banistergalaxy has quit [Ping timeout: 240 seconds]
danneu has quit [Ping timeout: 252 seconds]
joenobody has quit [Quit: See ya!]
nari has quit [Ping timeout: 268 seconds]
Banistergalaxy has joined #ruby
arya__ has joined #ruby
frem_ has quit [Quit: Computer has gone to sleep.]
johnmilton has quit [Quit: Leaving]
arya has quit [Ping timeout: 244 seconds]
alexshenoy has joined #ruby
ninegrid has joined #ruby
jeff_sebring has quit [Quit: Leaving]
havenn has joined #ruby
arya__ is now known as arya
joofsh has quit [Remote host closed the connection]
F1skr has quit [Quit: WeeChat 0.3.9.2]
ananthakumaran has quit [Quit: Leaving.]
joenobody has joined #ruby
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
seeingidog__ has joined #ruby
BrianJ has quit [Quit: BrianJ]
nari has joined #ruby
diegoviola has joined #ruby
mahmoudimus has joined #ruby
chrishunt has quit [Quit: Linkinus - http://linkinus.com]
rohit_ has joined #ruby
ninegrid has quit [Ping timeout: 276 seconds]
mahmoudimus has quit [Client Quit]
kil0byte_ has joined #ruby
cogweh has joined #ruby
seeingidog__ has quit [Ping timeout: 260 seconds]
gcds has joined #ruby
gcds has quit [Client Quit]
cantonic has joined #ruby
kil0byte has quit [Ping timeout: 268 seconds]
cogweh has quit [Client Quit]
joenobody has quit [Quit: See ya!]
freezway has quit [Ping timeout: 260 seconds]
alexim has joined #ruby
alexim has quit [Client Quit]
rohit_ has quit [Ping timeout: 265 seconds]
arya has quit [Ping timeout: 244 seconds]
ner0x has quit [Quit: Leaving]
xybre_ has quit [Ping timeout: 256 seconds]
xybre has joined #ruby
arya has joined #ruby
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
etcetera has joined #ruby
bigmac has quit [Quit: Leaving]
BoomCow has joined #ruby
joeycarmello has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
Guest92676 has joined #ruby
BoomCow has quit [Client Quit]
mikepack has quit [Remote host closed the connection]
ninegrid has joined #ruby
gcds has joined #ruby
Guest20366 has quit [Quit: Computer has gone to sleep.]
brianpWins has quit [Quit: brianpWins]
arya has quit [Ping timeout: 244 seconds]
chimkan__ has joined #ruby
rippa has joined #ruby
chimkan has quit [Ping timeout: 256 seconds]
chimkan__ is now known as chimkan
kil0byte has joined #ruby
arya has joined #ruby
kil0byte_ has quit [Ping timeout: 264 seconds]
lotus2015 has joined #ruby
bluOxigen has joined #ruby
kbeddingfield has joined #ruby
rippa has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
<lotus2015> /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
gcds has quit [Quit: gcds]
<lotus2015> Any idea with this?
BoomCow has joined #ruby
<reactormonk> lotus2015, did you install ruby-dev or similar?
reset has quit [Quit: Linkinus - http://linkinus.com]
<lotus2015> yes
<lotus2015> I googled for a while but without an answer.
wchun_ has joined #ruby
wchun has quit [Ping timeout: 264 seconds]
reset has joined #ruby
benlieb has joined #ruby
<lotus2015> I pasted some output to gist for reference
cantonic_ has joined #ruby
thinkdevcode has quit [Read error: No route to host]
thinkdevcode has joined #ruby
chimkan has quit [Quit: chimkan]
J-_-L has quit [Ping timeout: 252 seconds]
danneu has joined #ruby
wchun has joined #ruby
kil0byte has quit [Ping timeout: 240 seconds]
wchun_ has quit [Client Quit]
<rking> lotus2015: What did you do just prior to that?
benlieb has quit [Client Quit]
<rking> mkmf.rb is a file that any given gem can define
cantonic has quit [Ping timeout: 245 seconds]
cantonic_ is now known as cantonic
<rking> It makes Makefiles for the native (usually C) extensions.
kil0byte has joined #ruby
<rking> lotus2015: And BTW good that you tried 'locate', but in this case it'd probably deceive you, because the mkmf.rb in question probably only got downloaded minutes ago, so it won't be in the locatedb yet.
<rking> Try running that same command again after your daily cron fires. ☺
mikepack has joined #ruby
kil0byte_ has joined #ruby
elkclone has joined #ruby
<lotus2015> https://gist.github.com/4123354. I think the problem is related to the default soft link
<lotus2015> How do you think?
<lotus2015> rking?
<lotus2015> Sorry. My English is broken.
<rking> lotus2015: I gotta go, but gist /var/lib/gems/1.9.1/gems/pg-0.14.1/ext/gem_make.out
seeingidog__ has joined #ruby
dmiller has quit [Remote host closed the connection]
kiyoura has quit [Quit: Leaving]
kil0byte has quit [Ping timeout: 255 seconds]
oivoodoo has joined #ruby
<lotus2015> Thank you very much anyway.
bradhe has quit [Remote host closed the connection]
Slivka has quit [Read error: Connection reset by peer]
Slivka has joined #ruby
Guest92676 has quit [Ping timeout: 252 seconds]
rohit has joined #ruby
oivoodoo has quit [Remote host closed the connection]
seeingidog__ has quit [Ping timeout: 260 seconds]
oivoodoo has joined #ruby
oivoodoo has quit [Remote host closed the connection]
oivoodoo has joined #ruby
gregorg_taf has joined #ruby
rmcafee has joined #ruby
rmcafee has quit [Remote host closed the connection]
gregorg has quit [Read error: Connection reset by peer]
ryanf has joined #ruby
rohit has quit [Quit: Leaving]
rohit has joined #ruby
dedis has joined #ruby
rohit has quit [Read error: Connection reset by peer]
Hanmac1 is now known as Hanmac
robbyoconnor has joined #ruby
Banistergalaxy has quit [Ping timeout: 240 seconds]
tagrudev has joined #ruby
Banistergalaxy has joined #ruby
r0bby has joined #ruby
topek has joined #ruby
mahmoudimus has joined #ruby
topek has quit [Client Quit]
robbyoconnor has quit [Ping timeout: 252 seconds]
r0bby is now known as robbyoconnor
danneu has quit [Ping timeout: 248 seconds]
<MarcWeber> http://dpaste.com/834121/ Is there a way to do this without using eval? I don't know how to forward the block using a lambda or proc
u89 has joined #ruby
kil0byte has joined #ruby
kil0byte_ has quit [Ping timeout: 248 seconds]
u89 has quit [Remote host closed the connection]
topek has joined #ruby
nonotza has joined #ruby
slainer68 has joined #ruby
havenn has quit [Remote host closed the connection]
guy1` has quit [Remote host closed the connection]
guy1` has joined #ruby
slainer68 has quit [Ping timeout: 252 seconds]
arya has quit [Ping timeout: 244 seconds]
arya has joined #ruby
Banistergalaxy has quit [Ping timeout: 240 seconds]
wallerdev has joined #ruby
Banistergalaxy has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jgrevich_ has joined #ruby
jgrevich has quit [Ping timeout: 255 seconds]
jgrevich_ is now known as jgrevich
Elhu has joined #ruby
brianpWins has joined #ruby
meskyanichi has joined #ruby
JohnBat26 has joined #ruby
a1ph4g33k has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
cirwin has joined #ruby
bradhe has joined #ruby
danneu has joined #ruby
mikepack has quit [Remote host closed the connection]
tonini has joined #ruby
kil0byte_ has joined #ruby
segmond has joined #ruby
prezioso has joined #ruby
<ryanf> MarcWeber: define_method(m) do |*args, &block|
<ryanf> block.call
<ryanf> but you can just use the built-in Forwardable library for this
<MarcWeber> Thanks, I found it.
<MarcWeber> Many additional thansk for that last tip :)
<ryanf> sure
<ryanf> np
kil0byte has quit [Ping timeout: 248 seconds]
danneu has quit [Ping timeout: 264 seconds]
kil0byte_ has quit [Ping timeout: 246 seconds]
d34th4ck3r has joined #ruby
prezioso has quit [Ping timeout: 260 seconds]
Grieg has quit [Ping timeout: 268 seconds]
seeingidog__ has joined #ruby
kil0byte has joined #ruby
kil0byte_ has joined #ruby
piotr has quit [Ping timeout: 265 seconds]
seeingidog__ has quit [Ping timeout: 276 seconds]
Elhu has joined #ruby
bradhe has quit [Remote host closed the connection]
maesbn has joined #ruby
margle has joined #ruby
kil0byte has quit [Ping timeout: 276 seconds]
bradhe has joined #ruby
kbeddingfield has quit [Remote host closed the connection]
tjbiddle has joined #ruby
tuan_nat has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
tuannat has joined #ruby
hyperboreean has quit [Read error: Operation timed out]
thinkdevcode has quit [Read error: No route to host]
morf has joined #ruby
hamed_r has joined #ruby
thinkdevcode has joined #ruby
nemesit has joined #ruby
afgeneralist has quit [Ping timeout: 276 seconds]
Morkel has joined #ruby
hyperboreean has joined #ruby
tchebb has quit [Quit: Leaving.]
tchebb has joined #ruby
slamice_ has joined #ruby
eldariof has joined #ruby
slamice has quit [Ping timeout: 240 seconds]
slamice_ is now known as slamice
aganov has joined #ruby
pyx has joined #ruby
zommi has joined #ruby
kbeddingfield has joined #ruby
dekroning has joined #ruby
tjbiddle_ has joined #ruby
tjbiddle_ has quit [Client Quit]
answer_42 has joined #ruby
punkrawkR^Home has quit [Read error: Connection reset by peer]
dr_bob has joined #ruby
guy1` is now known as guy__
tchebb has quit [Read error: Connection reset by peer]
guy__ is now known as guy___
workmad3 has joined #ruby
tchebb has joined #ruby
jds_ has joined #ruby
cezar has joined #ruby
tchebb has quit [Client Quit]
tjbiddle has quit [Ping timeout: 240 seconds]
elsifaka has joined #ruby
parzorep has joined #ruby
dhruvasagar has joined #ruby
haxrbyte_ has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
kil0byte has joined #ruby
margle has quit [Quit: Computer has gone to sleep.]
kil0byte_ has quit [Ping timeout: 256 seconds]
margle has joined #ruby
cary has joined #ruby
nonotza_ has joined #ruby
FredLe has joined #ruby
cary has quit [Client Quit]
BoomCow has quit [Quit: This computer has gone to sleep]
nonotza has quit [Ping timeout: 245 seconds]
nonotza_ is now known as nonotza
answer_42 has quit [Ping timeout: 276 seconds]
JohnBat26 has quit [Remote host closed the connection]
marienz has joined #ruby
oivoodoo has quit [Remote host closed the connection]
oivoodoo has joined #ruby
slamice_ has joined #ruby
slamice has quit [Ping timeout: 240 seconds]
slamice_ is now known as slamice
qwerxy has joined #ruby
filipe has joined #ruby
elliottcable is now known as TuckChesta
JohnBat26 has joined #ruby
TuckChesta is now known as tuck
matrixise has joined #ruby
arya has quit [Ping timeout: 244 seconds]
xpen has joined #ruby
hoelzro|away is now known as hoelzro
Coretracker has joined #ruby
tomsthumb has joined #ruby
piotr has joined #ruby
arya has joined #ruby
mkillebrew has quit [Ping timeout: 268 seconds]
hakunin has quit [Remote host closed the connection]
hakunin has joined #ruby
mkillebrew has joined #ruby
guns has quit [Quit: guns]
kil0byte_ has joined #ruby
topek has quit [Quit: Leaving.]
topek has joined #ruby
telling_ is now known as telling
telling has quit [Changing host]
telling has joined #ruby
topek has quit [Client Quit]
kil0byte has quit [Ping timeout: 240 seconds]
topek has joined #ruby
thinkdevcode has quit [Remote host closed the connection]
segmond has left #ruby ["Leaving"]
thinkdevcode has joined #ruby
hakunin has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 265 seconds]
kil0byte has joined #ruby
xpen has quit [Ping timeout: 268 seconds]
BoomCow has joined #ruby
pyx has quit [Quit: WeeChat 0.3.9.2]
bradhe has quit [Remote host closed the connection]
dertyp has joined #ruby
kil0byte_ has quit [Ping timeout: 260 seconds]
thinkdevcode has quit [Ping timeout: 246 seconds]
apeiros_ has joined #ruby
seeingidog__ has joined #ruby
hsbt is now known as hsbt_away
seeingidog__ has quit [Read error: Operation timed out]
hsbt_away is now known as hsbt
nemesit has quit [Read error: Connection reset by peer]
qwerxy has quit [Quit: offski]
gcds has joined #ruby
codeFiend has joined #ruby
codeFiend has quit [Remote host closed the connection]
codeFiend has joined #ruby
prezioso has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
<gcds> Hello, I have a little complicated situation and maybe someone could suggest something about it.. I have many classes and attributes in these classes which intercept ruby reserved words for e.g. class names like "Class","Signal" and attributes: "class" what you would recommend for this situation? Now I just changed names like clazz and SSignal but this thing will use many people and I think it would be strange if you have to type clazz isn
<gcds> simple users
casheew has quit [Read error: Connection reset by peer]
zigomir has joined #ruby
casheew has joined #ruby
shtirlic has joined #ruby
Elhu has joined #ruby
blacktulip has joined #ruby
k610 has joined #ruby
mklappstuhl has joined #ruby
casheew has quit [Read error: Connection reset by peer]
k610 has quit [Client Quit]
casheew has joined #ruby
staafl has joined #ruby
<gcds> anyone?
slamice has quit [Ping timeout: 240 seconds]
lolmaus has joined #ruby
casheew has quit [Read error: Connection reset by peer]
chendo has quit [Ping timeout: 260 seconds]
charliesome has joined #ruby
slamice has joined #ruby
<hoelzro> gcds: when you intercept these terms from a user, what do you do with them?
<hoelzro> what's the high level view of what you're trying to do?
<gcds> hoelzro: attribute retuns normal instance variable
Virunga has joined #ruby
k610 has joined #ruby
u89 has joined #ruby
chendo_ has joined #ruby
hsbt is now known as hsbt_away
etcetera has quit [Quit: Computer has gone to sleep.]
casheew has joined #ruby
Slivka has quit [Read error: Connection reset by peer]
casheew has quit [Read error: Connection reset by peer]
AllStruck has quit [Changing host]
AllStruck has joined #ruby
<gcds> I dont know what to do about class name Signal its used by ruby i could rename it like SSignal but it would be odd for user
<apeiros_> use namespaces
<gcds> if I wrap it inside module would it workout?
<apeiros_> YourStuff::Signal
<gcds> apeiros_: and what about reserved word attributes?
<apeiros_> ?
Xeago has joined #ruby
<gcds> apeiros_: currently now is class variable which interference self.class
kil0byte_ has joined #ruby
casheew has joined #ruby
<apeiros_> what?
BoomCow has quit [Ping timeout: 248 seconds]
<gcds> apeiros_: I mean i have variable "class" which interference with self.class
<apeiros_> you can't name an lvar 'class'
u89 has quit [Remote host closed the connection]
<apeiros_> and all other types of variables won't have a problem. @class works fine.
nemesit has joined #ruby
<apeiros_> I don't understand your problem
fudanchii has joined #ruby
kil0byte has quit [Ping timeout: 248 seconds]
<gcds> apeiros_: if I call instance_variable_get("@class") it does return that I need but if call somewhere self.class it returns @class value
Xeago has quit [Remote host closed the connection]
dedis has quit [Remote host closed the connection]
tobinharris has joined #ruby
<apeiros_> then use another name
<apeiros_> thesaurus is your friend
<gcds> apeiros_: the problem is that i dont make this names it comes from definition which I implement in ruby
<apeiros_> you implement it. you can translate.
nomenkun has joined #ruby
<gcds> I thinking about gsub "class" to "clazz" and then back "clazz" to "class"
<apeiros_> …
<gcds> apeiros_: what?
nomenkun_ has joined #ruby
casheew has quit [Read error: Connection reset by peer]
<apeiros_> so obviously you already know that you can translate, but instead of going for a proper name you use some misspelling - well, your choice, I guess…
arya has quit [Ping timeout: 244 seconds]
pavilionXP has quit [Ping timeout: 240 seconds]
casheew has joined #ruby
ryanf has quit [Quit: leaving]
<gcds> oh ok thanks for suggest :)
jds_ has quit [Remote host closed the connection]
casheew has quit [Read error: Connection reset by peer]
locriani has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
locriani_ has quit [Read error: Connection reset by peer]
shtirli__ has joined #ruby
<apeiros_> and depending on your problem, you can "namespace" that too
<apeiros_> .attributes[:class]
atno|AFK is now known as atno
<apeiros_> i.e., use a hash.
matrixise has quit [Ping timeout: 240 seconds]
nomenkun has quit [Ping timeout: 260 seconds]
jimeh has joined #ruby
clj_newb has joined #ruby
Shamgar has quit [Ping timeout: 246 seconds]
shtirlic has quit [Ping timeout: 252 seconds]
casheew has joined #ruby
slamice has quit [Quit: slamice]
jgrevich_ has joined #ruby
Shamgar has joined #ruby
casheew has quit [Read error: Connection reset by peer]
jgrevich has quit [Ping timeout: 240 seconds]
jgrevich_ is now known as jgrevich
jprovazn has joined #ruby
tuck is now known as elliottcable
<witchdoc> hi all
ephemerian has joined #ruby
xnm has quit [Quit: WeeChat 0.3.8]
supersid has joined #ruby
casheew has joined #ruby
fantazo has quit [Remote host closed the connection]
arya has joined #ruby
casheew has quit [Read error: Connection reset by peer]
dantesun has joined #ruby
mvangala_ has quit [Read error: Connection reset by peer]
mvangala has joined #ruby
<gcds> supersid: you use IO.read for file operation?
sn0wb1rd_ has joined #ruby
statarb3 has quit [Quit: Leaving]
casheew has joined #ruby
<supersid> gcds: No Im trying to use IO.read_nonblock. However read doesn't work either. Its seems to work only with gets.
casheew has quit [Read error: Connection reset by peer]
Iszak has joined #ruby
swex_ has joined #ruby
swex has quit [Read error: Operation timed out]
FailDrain has joined #ruby
Ivo has quit [Read error: Connection reset by peer]
<FailDrain> Having seveer issues trying to program a filled pixel circle could anyone tell me what I need to do , to achieve an fast filled pixel circle in c++-> http://pastebin.com/3N8tC3GH
u89 has joined #ruby
casheew has joined #ruby
u89 has quit [Read error: Connection reset by peer]
ghanima has quit [Quit: Leaving.]
robotmay has joined #ruby
arya has quit [Ping timeout: 244 seconds]
u89 has joined #ruby
atno has quit [Read error: Connection timed out]
dertyp has quit [Quit: Leaving...]
arturaz has joined #ruby
grzywacz has joined #ruby
grzywacz has quit [Changing host]
grzywacz has joined #ruby
chococrois has quit [Quit: Leaving.]
atno has joined #ruby
jgrevich has quit [Remote host closed the connection]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
pcarrier has joined #ruby
pcarrier has quit [Client Quit]
rdark has joined #ruby
pcarrier has joined #ruby
bradhe has joined #ruby
seeingidog__ has joined #ruby
clocKwize has quit [Quit: Leaving]
maxmanders has quit [Read error: Operation timed out]
clocKwize has joined #ruby
maxmanders has joined #ruby
sn0wb1rd_ has quit [Quit: changing servers]
LucidDreamZzZ has quit [Ping timeout: 276 seconds]
bradhe has quit [Ping timeout: 246 seconds]
dertyp has joined #ruby
hmmmmm has joined #ruby
elliottcable is now known as elliotcabk
seeingidog__ has quit [Ping timeout: 260 seconds]
<hmmmmm> hi
kbeddingfield has quit [Remote host closed the connection]
slainer68 has joined #ruby
hmmmmm is now known as aboy
adambeynon has joined #ruby
cdt has joined #ruby
tvw has joined #ruby
cdt_ has joined #ruby
aboy has left #ruby [#ruby]
u89 has quit [Ping timeout: 252 seconds]
Mon_Ouie has quit [Ping timeout: 245 seconds]
kil0byte has joined #ruby
u89 has joined #ruby
LucidDreamZzZ has joined #ruby
chussenot has joined #ruby
kil0byte_ has quit [Ping timeout: 265 seconds]
sn0wb1rd_ has joined #ruby
cdt has quit [Ping timeout: 245 seconds]
hsbt_away is now known as hsbt
d34th4ck3r has quit [Quit: Konversation terminated!]
elliotcabk is now known as elliottcable
dhruvasagar has quit [Read error: Operation timed out]
<lupine_85> can anyone find http://rubygems.org/gems/activerecord-jdbc-adapter/versions/1.1.3 using the gem command-line client? because I don't seem to be able to do so
reinaldob has joined #ruby
LouisGB has joined #ruby
fyolnish has quit [Remote host closed the connection]
qubit__ has quit [Ping timeout: 268 seconds]
codecaster has joined #ruby
sn0wb1rd_ has quit [Quit: changing servers]
kbeddingfield has joined #ruby
dhruvasagar has joined #ruby
Coretracker has quit [Quit: Textual IRC Client: www.textualapp.com]
maus has joined #ruby
richardjapenga has joined #ruby
nari has quit [Ping timeout: 260 seconds]
codecaster has quit [Read error: Connection reset by peer]
krz has quit [Quit: krz]
brianpWins has quit [Quit: brianpWins]
xnm has joined #ruby
codecaster has joined #ruby
qwerxy has joined #ruby
<MarcWeber> Does hash.to_json or hash.keys make any guarantees about order of keys?
<FailDrain> MarcWeber:probably not
gcds has quit [Quit: Page closed]
heftig has quit [Quit: leaving]
margle has quit [Quit: Computer has gone to sleep.]
<MarcWeber> there is sort_by in enumerable ..
lotus2015 has quit [Quit: lotus2015]
pcarrier has quit []
codecaster has quit [Client Quit]
kil0byte_ has joined #ruby
heftig has joined #ruby
kil0byte has quit [Ping timeout: 252 seconds]
workmad3 has joined #ruby
dekroning has quit [Read error: Connection reset by peer]
dekroning has joined #ruby
ebouchut_ has joined #ruby
chussenot has quit [Quit: chussenot]
ebouchut_ has left #ruby [#ruby]
hsbt is now known as hsbt_away
SSteppen has joined #ruby
zz_chrismcg is now known as chrismcg
SSteppen has quit [Remote host closed the connection]
chussenot has joined #ruby
Steppen has joined #ruby
shtirli__ has quit [Ping timeout: 240 seconds]
ebouchut_ has joined #ruby
shtirli__ has joined #ruby
reset has quit [Quit: Leaving...]
Steppen has quit [Remote host closed the connection]
ebouchut_ has quit [Client Quit]
tobinharris has quit [Quit: tobinharris]
Steppen has joined #ruby
gregorg_taf has quit [Changing host]
gregorg_taf has joined #ruby
gregorg_taf is now known as gregorg
Steppen has quit [Remote host closed the connection]
frogstarr78 has joined #ruby
nomenkun_ has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
nkts has quit []
timmow has joined #ruby
dertyp has quit [Ping timeout: 276 seconds]
Iszak has quit [Quit: Textual IRC Client: www.textualapp.com]
Xeago has joined #ruby
dhruvasagar has quit [Ping timeout: 276 seconds]
jds_ has joined #ruby
sepp2k has joined #ruby
lethjakmans_lap has joined #ruby
<lethjakmans_lap> hey, I'm trying to output to a csv, but I don't want to use a block. is there any way to just open the file and output to it?
dhruvasagar has joined #ruby
xnm has quit [Ping timeout: 264 seconds]
maus has quit [Quit: leaving]
maus has joined #ruby
shtirli__ has quit [Ping timeout: 264 seconds]
k610 has quit [Ping timeout: 260 seconds]
fumduq has quit [Ping timeout: 244 seconds]
nasso has quit [Quit: No Ping reply in 180 seconds.]
tobinharris has joined #ruby
jds_ has quit [Ping timeout: 252 seconds]
k610 has joined #ruby
nasso has joined #ruby
nonotza has quit [Quit: nonotza]
kbeddingfield has quit [Remote host closed the connection]
polymar has joined #ruby
cardoni has quit [Quit: cardoni]
ikaros has joined #ruby
shiin has quit [Ping timeout: 244 seconds]
nasso has quit [Client Quit]
<timmow> I'm iterating through an array and building another array, so map seems like a good choice, but is there a way of adding more than one element to the array?
<timmow> ['a','b'].map { |x| [x, x]}.flatten
<Paradox> ʕ•ᴥ• ʔ
shtirlic has joined #ruby
<apeiros_> timmow: flat_map
<timmow> seems to work, I'm wondering if there is a more elegant solution
<apeiros_> lethjakmans_lap: 1.9+: File.write(path, content)
qubit has joined #ruby
shiin has joined #ruby
nilg has quit [Remote host closed the connection]
<timmow> apeiros_: cool, thanks
yshh has quit [Remote host closed the connection]
matrixise has joined #ruby
reinaldob has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 246 seconds]
nasso has joined #ruby
dhruvasagar has joined #ruby
seeingidog__ has joined #ruby
shtirli__ has joined #ruby
shtirlic has quit [Read error: Connection reset by peer]
adeponte has quit [Remote host closed the connection]
shtirli__ has quit [Client Quit]
shtirlic has joined #ruby
a1ph4g33k has quit [Quit: Leaving]
<lethjakmans_lap> apeiros_: thanks! :) I was hoping to use the csv class, but this is probably faster anyways.
<lethjakmans_lap> i was also wondering...I have a for each loop on the csv, and I'd like to skip the first row, is there an easy way to do that?
<apeiros_> lethjakmans_lap: huh? in that case I misunderstood your question
<Xeago> I believe enumerable has a skip method
<apeiros_> what's your problem with blocks then? sounds silly in that case…
<lethjakmans_lap> CSV.foreach(inputFile) do |eachcsv|
<Xeago> anyone here using glimmerblocker?
<lethjakmans_lap> can I skip row one? I saw that you could do
<lethjakmans_lap> CSV.foreach(inputFile) do |eachcsv, 1|
<lethjakmans_lap> but it didn't seem to work
seeingidog__ has quit [Ping timeout: 252 seconds]
cirwin has quit [Ping timeout: 260 seconds]
<shevy> I dont know what that is
<shevy> lethjakmans_lap where did you see this abomination?
<shevy> who brought you this |eachcsv, 1|
<lethjakmans_lap> stackoverflow?
<lethjakmans_lap> what exactly is wrong?
<lethjakmans_lap> does that simply not exist? how do I skip the first iteration?
ebouchut_ has joined #ruby
<hoelzro> lethjakmans_lap: it's just that using a constant in a block parameter list doesn't make any sense
<shevy> lethjakmans_lap do you have the link? it is time to put an end to people who are funny like that
<Paradox> lethjakmans_lap, is there a particular reason you arent using CSV.read?
<Paradox> not #read?
<Paradox> but #read
<hoelzro> lethjakmans_lap: have you tried simply calling readline once before your main loop?
<lethjakmans_lap> oh here's what I used
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<shevy> well
<Paradox> to use an old saying of my grandpa
<Paradox> sounds like you're trying to build a horse out of cow parts
<shevy> I that link you just gave, there is no occurence of |eachcsv, 1|
<lethjakmans_lap> File.open('file.txt', 'r').each_with_index do |line,index|
<lethjakmans_lap> that's what I was trying to mimic
<Paradox> why do you need the index?
<shevy> ;P
<Paradox> to skip one?
<shevy> notice the name "index", rather than 1
<shevy> index will be the variable holding the integer
mengu has joined #ruby
<shevy> if you use |1,2,3| you are trying to name them that way, which doesnt make sense
<shevy> you wont see things like
<shevy> 1 = 'hello world'
<hoelzro> in some version of Fortran you could overwrite the value of 1.
rakunHo has quit [Remote host closed the connection]
<hoelzro> *versions
<lethjakmans_lap> so should I assign 1 to an variable?
elaptics`away is now known as elaptics
npx has joined #ruby
<lethjakmans_lap> the documentation for csv in ruby-doc seems confusing
<npx> I want to do 0..400.each{|i| puts i}
<npx> but that doesn't work
jackiechan0 has joined #ruby
<npx> i recall some very similar syntax; can someone refresh my memory?
<hoelzro> lethjakmans_lap: did you try a single readline before foreach?
<Xeago> npx (0..400)
<npx> ahh thanks!
<timmow> so the tmp var doesn't feel necessary here - ['a','b'].flat_map { |x| tmp = []; tmp << x; tmp << x * 2}
cousine has joined #ruby
fyolnish has joined #ruby
<lethjakmans_lap> hoelzro: I'm not sure how I'd do that with the format I'm using. CSV.foreach(inputFile) do |eachcsv|
xpen has joined #ruby
<hoelzro> lethjakmans_lap: create a CSV object?
<sonne> poll: which ide do you folks use for ruby, if you use one?
xpen has quit [Remote host closed the connection]
xpen has joined #ruby
<Xeago> textmate or vim
<Xeago> depending where I ma
reinaldob has joined #ruby
<hoelzro> lethjakmans_lap: try this: index = 0 CSV.foreach(inputFile) do |row| index += 1 next if index == 1 ... end
<Xeago> hoelzro: can't you put an enumerator after .foreach?
<hoelzro> Xeago: does .foreach return one?
<Xeago> asin CSV.foreach(input).skip(1).foreach
<Xeago> I guess so
<hoelzro> I didn't see a reference to supporting enumerators in CSV's docs
Vainoharhainen has joined #ruby
<Paradox> why not just CSV.read('filename.txt')[1..-1].each {|x| stuff here}
margle has joined #ruby
<Xeago> Paradox: that would be my approach if I can't .skip(1)
nomenkun has quit [Read error: Connection reset by peer]
<hoelzro> I think that's an ok approach if you can afford the memory
nomenkun has joined #ruby
<Paradox> its as memory hungry as any of the others
<Paradox> they all load the csv into memory
<Paradox> unless you dump it out immediately
<hoelzro> Paradox: foreach loads the whole thing into memory?
maus has quit [Remote host closed the connection]
<Paradox> it probably does
<Paradox> but dont quote me on that
<Paradox> disk reads are slow
<timmow> ['a','b'].flat_map { |x| [] << x << x * 2} is better...
<hoelzro> I really hope not =(
<shevy> hehehe
<hoelzro> let the FS buffer worry about that
<Paradox> how big a CSV are you loading that you're worried about system memory
nomenkun has quit [Read error: Connection reset by peer]
* Paradox i mean
bnagy has joined #ruby
<hoelzro> Paradox: I've seen CSVs a few gigs in size
<Paradox> as have i
<hoelzro> granted, I can't speak for lethjakmans_lap
<Paradox> but most base computers now have at least 4
<Paradox> and the OSes have gotten a lot better at swap/paging
<hoelzro> that's why I said "if you can afford the memory"
Slivka has joined #ruby
nomenkun has joined #ruby
rakl has quit [Quit: sleeping]
<Paradox> it just looks to me like someone suffering from pre-optimizatitis
<hoelzro> meaning if you have 96GB of RAM, or if your CSV is the list of your fantasy baseball team players or something
<lethjakmans_lap> this is what I ended up doing
dertyp has joined #ruby
<Paradox> uh…
<hoelzro> Paradox: I said the approach was ok, didn't I?
<lethjakmans_lap> I didn't realize that CSV was basically a read file.
<shevy> do you understand your own code lethjakmans_lap
<Paradox> lethjakmans_lap, thats needlessly complex
<lethjakmans_lap> yes, is there something wrong with it?
<lethjakmans_lap> how so? it opens the file, puts the header, and iterates through it
<lethjakmans_lap> given that was just the test and it's going to output to different files
<Paradox> CSV.read('file.csv')[1..-1].each(&:puts)
<Paradox> does the same thing
nemesit has quit [Quit: Leaving...]
codeFiend is now known as aeontech
xpen has quit [Remote host closed the connection]
<Paradox> and if you want eachcsv as a var
<lethjakmans_lap> it's going to get more complex inside of the loop, I have multiple files I'm going to have to output to
<Paradox> so…just load the big thing once into an array
<Paradox> then output to each file based off of a #select
<Paradox> eachcsv = CSV.read('mycsv.csv')[1..-1]
<Paradox> then file1 = eachcsv.select { |x| x == y } or whatever
elkclone has quit [Quit: It's never too late to unplug and run.]
<Paradox> or you can do that in loops
elkclone_ has joined #ruby
<Paradox> im too tired to think
<lethjakmans_lap> hm, makes sense
<Paradox> do what you think is right, then optimize it and fix problems :)
<Paradox> if you want the minimum number of iterations
<Paradox> load it once
<Paradox> then iterate it once, build file variables, then use File.write to dump them into files all at once
<Paradox> now goodnight (づಠ_ಠ)づ
<Paradox> lol
vlad_starkov has joined #ruby
<lethjakmans_lap> :) thanks for your help, good night!
pcarrier has joined #ruby
pcarrier_ has joined #ruby
arya has joined #ruby
lotus2015 has joined #ruby
yshh has joined #ruby
pcarrier has quit [Ping timeout: 245 seconds]
pcarrier_ is now known as pcarrier
ToTo has joined #ruby
elkclone_ has quit [Ping timeout: 240 seconds]
tonini has quit [Remote host closed the connection]
banisterfiend has joined #ruby
ebouchut has quit [Quit: Quitte]
kil0byte has joined #ruby
rdark has quit [Ping timeout: 252 seconds]
kil0byte_ has quit [Ping timeout: 240 seconds]
jprovazn has quit [Quit: Leaving]
jackiechan0 has quit [Quit: Sto andando via]
arya has quit []
banisterfiend has quit [Ping timeout: 252 seconds]
ebouchut_ has quit [Ping timeout: 255 seconds]
mikecmpbll has joined #ruby
dekroning has quit [Ping timeout: 268 seconds]
danneu has joined #ruby
kil0byte_ has joined #ruby
tuannat has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
hamed_r has quit [Ping timeout: 240 seconds]
danneu has quit [Ping timeout: 252 seconds]
kil0byte has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Remote host closed the connection]
Goles has joined #ruby
bradhe has joined #ruby
sspiff has joined #ruby
sspiff has quit [Changing host]
sspiff has joined #ruby
seeingidog__ has joined #ruby
kbeddingfield has joined #ruby
Goles_ has joined #ruby
seeingidog__ has quit [Read error: Operation timed out]
Goles__ has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
Goles has quit [Ping timeout: 240 seconds]
kbeddingfield has quit [Ping timeout: 260 seconds]
Goles has joined #ruby
mklappstuhl has quit [Ping timeout: 240 seconds]
Goles_ has quit [Ping timeout: 248 seconds]
rohit has joined #ruby
Goles__ has quit [Ping timeout: 240 seconds]
Goles has quit [Read error: Connection reset by peer]
kil0byte has joined #ruby
Axsuul has quit [Ping timeout: 252 seconds]
lethjakmans_lap has quit [Remote host closed the connection]
gcds has joined #ruby
kil0byte_ has quit [Ping timeout: 255 seconds]
rohit has quit [Read error: Connection reset by peer]
nemesit has joined #ruby
ToTo has quit [Ping timeout: 240 seconds]
parzorep has quit [Quit: parzorep]
<slainer68> Hi. In RDOC, String#sum it is written it's basically the sum of the value of each char mod 2**n-1. "1" has value 49. So "111" should be 49 * 3 = 147. So "111".sum(8) should be 147 mod 128 = 19, but "111".sum(8) returns 147. Where's my misunderstanding ?
<JonnieCache> oh my good gosh why do i only know about VIPS now
<JonnieCache> anyone who has suffered with imagemagick in their life, take a look at this: http://www.vips.ecs.soton.ac.uk/index.php?title=Speed_and_Memory_Use
hoelzro is now known as hoelzro|away
<heftig> slainer68: wrong precedence
<heftig> 2**8-1 is 255, not 128
AndChat- has joined #ruby
<slainer68> heftig: thank you very much :)
bier_ has quit [Read error: Operation timed out]
bier has quit [Ping timeout: 248 seconds]
Goles has joined #ruby
<heftig> slainer68: hmm, still, the rdoc seems to be wrong
jackiechan0 has joined #ruby
<heftig> it calculates mod 2**n, not 2**(n-1) or (2**n)-1
rdark has joined #ruby
pcarrier has quit []
Banistergalaxy has quit [Ping timeout: 245 seconds]
elaptics is now known as elaptics`away
Virunga has quit [Remote host closed the connection]
AndChat- has quit [Ping timeout: 240 seconds]
<slainer68> heftig: you've looked at the source code?
Goles__ has joined #ruby
Banistergalaxy has joined #ruby
<slainer68> heftig: you seem to be right. it calculates mod 2**n.
Goles has quit [Ping timeout: 240 seconds]
rohit has joined #ruby
Goles has joined #ruby
hamed_r has joined #ruby
<heftig> slainer68: it's just the same as "111".bytes.inject(:+) % 2**8
lotus2015 has quit [Quit: lotus2015]
heftig has quit [Quit: leaving]
beiter has joined #ruby
Goles__ has quit [Ping timeout: 256 seconds]
Goles_ has joined #ruby
dekroning has joined #ruby
Goles has quit [Ping timeout: 245 seconds]
volta has joined #ruby
davidokner has quit [Ping timeout: 245 seconds]
Goles_ has quit [Ping timeout: 264 seconds]
bier_ has joined #ruby
bier has joined #ruby
shtirli__ has joined #ruby
\13k has joined #ruby
davidokner has joined #ruby
monkegjinni has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 240 seconds]
kil0byte_ has joined #ruby
d2dchat has joined #ruby
nari has joined #ruby
monkegji_ has joined #ruby
wallerdev has quit [Quit: wallerdev]
shtirlic has quit [Ping timeout: 264 seconds]
kil0byte has quit [Ping timeout: 260 seconds]
monkegji_ has quit [Remote host closed the connection]
samphippen has joined #ruby
monkegjinni has joined #ruby
[Neurotic] has quit [Ping timeout: 268 seconds]
shtirli__ has quit [Read error: Connection reset by peer]
timonv has joined #ruby
shtirlic has joined #ruby
monkegjinni has quit [Ping timeout: 240 seconds]
sullenel has joined #ruby
jrajav has joined #ruby
Hanmac has quit [Quit: Leaving.]
Hanmac has joined #ruby
LucidDreamZzZ has quit [Remote host closed the connection]
nari has quit [Ping timeout: 240 seconds]
LucidDreamZzZ has joined #ruby
nari has joined #ruby
Banistergalaxy has joined #ruby
Slivka has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
Slivka has joined #ruby
fudanchii has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
rohit has quit [Quit: Leaving]
bradhe has joined #ruby
jamesaxl has quit [Remote host closed the connection]
arturaz has quit [Ping timeout: 252 seconds]
seeingidog__ has joined #ruby
chussenot has quit [Quit: chussenot]
arturaz has joined #ruby
tuannat has joined #ruby
tuannat has quit [Max SendQ exceeded]
tuannat has joined #ruby
postmodern has quit [Quit: Leaving]
tuannat has quit [Max SendQ exceeded]
mklappstuhl has joined #ruby
tuannat has joined #ruby
bradhe has quit [Ping timeout: 245 seconds]
sullenel has quit [Quit: Leaving.]
seeingidog__ has quit [Ping timeout: 276 seconds]
pcarrier has joined #ruby
g-ram has joined #ruby
chussenot has joined #ruby
schaary has joined #ruby
pcarrier has quit [Read error: Operation timed out]
pcarrier has joined #ruby
statarb3 has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
KRF has joined #ruby
<KRF> hey there. i am wondering where File.cmp vanished from 1.8.6 to 1.9.3? It is no longer available in 1.9.3 but that is nowhere documented(?)
Goles has joined #ruby
richardjapenga has quit [Read error: Connection reset by peer]
gyre007_ has joined #ruby
Slivka has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: Computer has gone to sleep.]
gyre007_ has quit [Client Quit]
gyre007_ has joined #ruby
gyre007_ has quit [Remote host closed the connection]
gyre007_ has joined #ruby
Dreamer3 has quit [Quit: Computer has gone to sleep.]
gyre007_ has quit [Client Quit]
SuperrMann has joined #ruby
alexshenoy has quit [Quit: alexshenoy]
gyre007 has quit [Ping timeout: 246 seconds]
lupine_85 is now known as lupine
vlad_starkov has quit [Remote host closed the connection]
guy___ has quit [Remote host closed the connection]
gyre007 has joined #ruby
guy1` has joined #ruby
richardjapenga has joined #ruby
siefca has joined #ruby
heftig has joined #ruby
<gcds> I have seen that is possible to make classes act as array a = A.new a[:foo] = "bar" like so?
<siefca> anyone into hexagonal Rails or similar?
<shevy> sounds kinky
<siefca> i'm wondering whether single Entity should contain relations within or a place for relations is one level up (in Interactor perhaps)
<shevy> gcds I am not sure what that does. what is A.new, just a random class? ah... you probably wonder how a[:foo] = "bar" works
carlyle has joined #ruby
<shevy> gcds, in that case, in class A, you would define a method like so: def [](input); @hash[
<shevy> moment
<shevy> def []=(input); @hash[bla] = input
<shevy> now it's the setter
Virunga has joined #ruby
<gcds> oh thank you :D
<gcds> kind strange ruby :D
carloslopes has joined #ruby
siefca has left #ruby [#ruby]
schaary is now known as schaary|afk
answer_42 has joined #ruby
cardoni has joined #ruby
<FailDrain> ANAL AND PUBES COMBINED INTO ONE MAKE A COMBUSTION OF THE RECTUM!
hoelzro|away is now known as hoelzro
Grieg has joined #ruby
Grieg has quit [Changing host]
Grieg has joined #ruby
guy1` is now known as guy__
<morf> huh? FailBrain?
<Xeago> ":w !sudo tee % > /dev/null "
Elico has quit [Quit: elico]
<FailDrain> lol
<Xeago> prompts for password but it immediately gets filled in 3 times and bails out
<Xeago> how is it suipposed to work?
Elico has joined #ruby
rohit has joined #ruby
fbernier has quit [Read error: Connection reset by peer]
gyre007 has quit [Remote host closed the connection]
seme has joined #ruby
<tobinharris> Hi folks
seme is now known as Guest7055
<tobinharris> Anyone know how to do database-per-request in rack?
Elhu has quit [Quit: Computer has gone to sleep.]
<tobinharris> Thread.current[User.current.db_name] kind of thing?
gyre007 has joined #ruby
Goles has quit [Remote host closed the connection]
Guest22517 has quit [Ping timeout: 255 seconds]
love_color_text has quit [Remote host closed the connection]
* lupine sighs at bundler
geekbri has joined #ruby
nemesit has quit [Quit: Leaving...]
rohit has quit [Ping timeout: 240 seconds]
nemesit has joined #ruby
<JonnieCache> tobinharris: cant you just set up and tear down the db in each request?
<tobinharris> Thanks Mr Cache. It's actually a CouchDB and different accounts have different DB's
mark_locklear has joined #ruby
<tobinharris> But I think I understand
gyre007 has quit [Read error: Connection reset by peer]
<tobinharris> You're saying setup the connection based on the user in the session?
<tobinharris> The Couch library I'm using stores the current database at class level, so having to monkey patch it
Goles has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
tk__ has joined #ruby
ner0x has joined #ruby
gyre007 has joined #ruby
<JonnieCache> tobinharris: get a different couch library because it sounds like that one sucks
gyre007 has quit [Read error: No buffer space available]
gyre007 has joined #ruby
jackiechan0 has quit [Quit: Sto andando via]
<JonnieCache> you should be able to just go @db = CouchDB.new("/path/to/couchdb/or/whatever")
<JonnieCache> or something
CamonZ has joined #ruby
<tobinharris> Yeah, you're right
<tobinharris> JonnieCache: Yeah, that would be nicer. Most Couch libs seem to such on Ruby
vlad_starkov has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
BrianJ has joined #ruby
gmci has joined #ruby
fbernier has joined #ruby
gmci is now known as Guest92806
punkrawkR has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
seeingidog__ has joined #ruby
chussenot has quit [Quit: chussenot]
chussenot has joined #ruby
tectonic has quit [Ping timeout: 255 seconds]
cousine has quit [Remote host closed the connection]
JohnRedcorn is now known as enroxorz-work
tectonic has joined #ruby
tk___ has joined #ruby
estan_ has joined #ruby
bradhe has quit [Ping timeout: 248 seconds]
FDj has joined #ruby
invisime has joined #ruby
ttt has quit [Remote host closed the connection]
Agis__ has joined #ruby
Agis__ has quit [Client Quit]
KRF_ has joined #ruby
seeingidog__ has quit [Ping timeout: 276 seconds]
weeb1e_ has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
fasta_ has joined #ruby
stderr-_ has joined #ruby
havenn has joined #ruby
nwkr has joined #ruby
joppe has joined #ruby
issyl0_ has joined #ruby
classix has quit [Disconnected by services]
Ivo has joined #ruby
psino_ has joined #ruby
issyl0_ is now known as Guest30602
emdub_ has joined #ruby
zaiste_ has joined #ruby
theoros_ has joined #ruby
wunz_ has joined #ruby
irving_ has joined #ruby
classix has joined #ruby
tdubz has joined #ruby
redbull_ has joined #ruby
sunhay_ has joined #ruby
udk has joined #ruby
SeySayux has quit [Ping timeout: 240 seconds]
ericwood_ has joined #ruby
kapowaz_ has joined #ruby
nonotza has joined #ruby
freeayu__ has joined #ruby
thorncp has quit [Ping timeout: 258 seconds]
phrame has quit [Ping timeout: 258 seconds]
SeySayux has joined #ruby
banisterfiend has joined #ruby
richardjapenga has quit [Ping timeout: 240 seconds]
phrame has joined #ruby
zigidias_ has joined #ruby
Armand has joined #ruby
richardjapenga has joined #ruby
redbull has quit [Ping timeout: 244 seconds]
dubios_ has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
yosafbridge` has joined #ruby
Cork- has joined #ruby
Armand is now known as Guest64954
arya has joined #ruby
J-_-L has joined #ruby
nomenkun has joined #ruby
tk__ has quit [*.net *.split]
Grieg has quit [*.net *.split]
Hanmac has quit [*.net *.split]
jrajav has quit [*.net *.split]
marienz has quit [*.net *.split]
invisime1 has quit [*.net *.split]
freeayu has quit [*.net *.split]
voodoofish has quit [*.net *.split]
fasta has quit [*.net *.split]
weeb1e has quit [*.net *.split]
zaiste has quit [*.net *.split]
theoros has quit [*.net *.split]
NimeshNeema has quit [*.net *.split]
Nowaker has quit [*.net *.split]
irving has quit [*.net *.split]
joppe_ has quit [*.net *.split]
kkh has quit [*.net *.split]
nyuszika7h has quit [*.net *.split]
tekacs has quit [*.net *.split]
FDj_ has quit [*.net *.split]
Koshian__ has quit [*.net *.split]
zooz has quit [*.net *.split]
Cork has quit [*.net *.split]
Apocalypse has quit [*.net *.split]
issyl0 has quit [*.net *.split]
kapowaz has quit [*.net *.split]
zigidias has quit [*.net *.split]
emdub has quit [*.net *.split]
KRF has quit [*.net *.split]
acies has quit [*.net *.split]
randym has quit [*.net *.split]
thomas has quit [*.net *.split]
ericwood has quit [*.net *.split]
wunz has quit [*.net *.split]
faen has quit [*.net *.split]
Spaceghostc2c has quit [*.net *.split]
psino has quit [*.net *.split]
UdontKnow has quit [*.net *.split]
stderr- has quit [*.net *.split]
dubios has quit [*.net *.split]
yosafbridge has quit [*.net *.split]
inimino has quit [*.net *.split]
sunhay has quit [*.net *.split]
estan has quit [*.net *.split]
dubios_ is now known as dubios
goraxe has quit [Write error: Connection reset by peer]
tekmaster has joined #ruby
tekmaster is now known as tekacs
dubios has quit [Changing host]
dubios has joined #ruby
Liothen has quit [Write error: Connection reset by peer]
goraxe has joined #ruby
enroxorz-work is now known as TheSisko
TheSisko has left #ruby ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
Spaceghostc2c has joined #ruby
Liothen has joined #ruby
Liothen has quit [Changing host]
Liothen has joined #ruby
thorncp has joined #ruby
dhruvasagar has quit [Read error: Operation timed out]
chussenot has quit [Quit: chussenot]
Imapickle has joined #ruby
NimeshNeema has joined #ruby
faen has joined #ruby
havenn has quit [Remote host closed the connection]
maddog_ has quit [Ping timeout: 240 seconds]
maddog__ has joined #ruby
gyre007 has quit [Ping timeout: 240 seconds]
nyuszika7h has joined #ruby
FailDrain has quit [Ping timeout: 240 seconds]
havenn has joined #ruby
dhruvasagar has joined #ruby
skipper has joined #ruby
skipper is now known as Guest47589
acies has joined #ruby
niklasb has joined #ruby
chussenot has joined #ruby
voodoofish has joined #ruby
randym has joined #ruby
Koshian__ has joined #ruby
ToTo has joined #ruby
supersid has quit [Quit: Page closed]
marienz has joined #ruby
Hanmac has joined #ruby
zooz has joined #ruby
kkh has joined #ruby
Elhu has joined #ruby
inimino has joined #ruby
havenn has quit [Ping timeout: 276 seconds]
iPhoneMRZ has joined #ruby
gurps_ has joined #ruby
Guest47589 has quit [Ping timeout: 245 seconds]
dr_Poggs has joined #ruby
BadLarry has quit [Ping timeout: 246 seconds]
erichmenge has quit [Ping timeout: 246 seconds]
gurps has quit [Ping timeout: 246 seconds]
Spaceghostc2c has quit [Ping timeout: 246 seconds]
drPoggs has quit [Ping timeout: 246 seconds]
DrShoggoth has quit [Ping timeout: 246 seconds]
moted has quit [Ping timeout: 246 seconds]
Seich has quit [Ping timeout: 246 seconds]
moted has joined #ruby
biju has joined #ruby
EyesIsMine has quit [Ping timeout: 246 seconds]
quest88_ is now known as quest88
prakriti has joined #ruby
mikecmpbll has joined #ruby
erichmenge has joined #ruby
EyesIsServer has joined #ruby
<biju> newb q: I have a text file with some content and a yaml header, I know u can get the metatdata using YAML.load_file, but howto get the content without the yaml header? please help tyvm
reinaldob has quit [Remote host closed the connection]
Spaceghostc2c has joined #ruby
BadLarry has joined #ruby
seich- has joined #ruby
havenn has joined #ruby
biju is now known as tabbot
havenn has quit [Remote host closed the connection]
sspiff has quit [Remote host closed the connection]
joofsh has joined #ruby
straind has quit [Remote host closed the connection]
nari has quit [Ping timeout: 240 seconds]
nonotza has quit [Ping timeout: 265 seconds]
SuperrMann has quit [Quit: Computer has gone to sleep.]
jrist-afk is now known as jrist
NimeshNeema is now known as NimeshNeema_
NimeshNeema_ has quit [Excess Flood]
fgro has joined #ruby
phantasm66 has quit [Quit: *sleeeeep*]
<fgro> in good ruby manner, how would "invert" a string "200x500" to "500x200" ?
<fgro> *you
tdubz is now known as thomas
NimeshNeema has joined #ruby
<shevy> fgro several ways
<fgro> shevy: split?
crocket has joined #ruby
tuannat has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<shevy> .split is one yes
<shevy> "200x500".split('x').reverse.join('x') # => "500x200"
<fgro> shevy: nice
<shevy> regex could also be used but tends to be not so easy to read
srji has joined #ruby
cantonic has quit [Quit: cantonic]
skaczor has joined #ruby
<tabbot> quit
tabbot has quit [Quit: leaving]
<fgro> shevy: thx
ananthakumaran has quit [Quit: Leaving.]
keymone has quit [Ping timeout: 240 seconds]
tommyvyo has joined #ruby
robotmay has quit [Remote host closed the connection]
robotmay has joined #ruby
toto-_ has joined #ruby
ql6wlld has joined #ruby
nanderoo has joined #ruby
u89 has quit [Remote host closed the connection]
aquaranto has joined #ruby
Imapickle is now known as FailDrain
ToTo has quit [Ping timeout: 245 seconds]
gyre007 has joined #ruby
solidoodlesuppor has joined #ruby
macabre has joined #ruby
bpfh has quit [Ping timeout: 245 seconds]
yshh has quit [Remote host closed the connection]
yshh has joined #ruby
yshh has quit [Remote host closed the connection]
ebouchut has joined #ruby
sailias has joined #ruby
elsifaka has quit [Quit: Veloma e!]
elsifaka has joined #ruby
elsifaka has quit [Client Quit]
elsifaka has joined #ruby
hamed_r has quit [Quit: Leaving]
gyre007 has quit [Ping timeout: 240 seconds]
cantonic has joined #ruby
jrajav has joined #ruby
bpfh has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
keymone has joined #ruby
<shevy> hmm
<shevy> I'd wish I could interface with linux from ruby on every level, including the kernel, or compiling software
phantasm66 has joined #ruby
<Muz> You might be very alone in having that desire.
<Muz> Theoretically, you could do it though. Not sure why you'd want to.
<shevy> Muz: you never feel like compiling something?
<Muz> Not that I'd want or need to do so within Ruby.
tommyvyo has joined #ruby
bwlang has joined #ruby
banisterfiend has quit [Remote host closed the connection]
vlad_sta_ has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
bradhe has joined #ruby
jackiechan0 has joined #ruby
seeingidog__ has joined #ruby
jackiechan0 has quit [Read error: Connection reset by peer]
<workmad3> shevy: have you looked at tools like chef?
phantasm66 has quit [Ping timeout: 252 seconds]
mmitchell has joined #ruby
<shevy> workmad3 hmm no, what is that?
cousine has joined #ruby
<workmad3> shevy: ruby based configuration management
rdark has quit [Ping timeout: 246 seconds]
RantriX has joined #ruby
<shevy> cool
<jrajav> shevy: Some languages are suited best for different purposes
J-_-L has quit [Quit: Leaving.]
kzrl has quit [Ping timeout: 276 seconds]
<jrajav> You wouldn't want to use Ruby to interface with a kernel, just as you wouldn't want to use C to write a simple web application
cantonic has quit [Remote host closed the connection]
macabre has quit [Remote host closed the connection]
cantonic has joined #ruby
rdark has joined #ruby
kzrl has joined #ruby
cousine_ has joined #ruby
bradhe has quit [Ping timeout: 245 seconds]
Mkman has joined #ruby
seeingidog__ has quit [Ping timeout: 246 seconds]
cousine has quit [Ping timeout: 240 seconds]
mklappstuhl has quit [Ping timeout: 240 seconds]
tk___ has quit [Quit: ばいばい]
itchyouch has joined #ruby
macabre has joined #ruby
QKO has quit [Read error: Operation timed out]
jeffreybaird has joined #ruby
QKO has joined #ruby
<bnagy> jrajav: I recently wrote a ton of ruby to interface with the windows kernel
ffranz1 has quit [Remote host closed the connection]
_huoxito has joined #ruby
<apeiros_> bnagy: ruby on windows still such a pain?
<bnagy> meh
ffranz has joined #ruby
Mkman has quit [Quit: Lost terminal]
<bnagy> compared to using c#.net... no?
<Xeago> does anybody know a more efficient way to get uptime stats?
<apeiros_> lol
mklappstuhl has joined #ruby
<Xeago> sorry, load averages
<apeiros_> bnagy: got to install ruby on windows myself soon - what's your recommended way of installing ruby on windows?
reset has joined #ruby
<bnagy> mainly I end up FFIing a ton of stuff
<JonnieCache> bnagy: i thought people liked c sharp?
<bnagy> apeiros_: I would use jruby
<bnagy> cause it works on x64 as well
<jrajav> C# is definitely not that bad
<bnagy> JonnieCache: yeah I was just making shit up, I never used it
carloslo_ has joined #ruby
<jrajav> If I were doing more than a few trivial calls to the API I would use a language with a native interface.
<bnagy> but I hate VS
<jrajav> Of course, it's unlikely I would ever voluntarily work on a native Windows application
<Xeago> I hate vs, unless it is my highly modified version which does not look like vs at all..
<jrajav> VS isn't that bad either
reinaldob has joined #ruby
<jrajav> Definitely much better than the shitpile of Eclipse
<bnagy> jrajav: for my purposes, the c# abstraction doesn't even present the stuff I want to wrap
jackiechan0 has joined #ruby
carloslopes has quit [Ping timeout: 255 seconds]
<jrajav> Uh.. there are API calls that the C#/.NET stack doesn't expose?
kzrl has quit [Ping timeout: 276 seconds]
<bnagy> yes :)
<jrajav> Like what?
<bnagy> I'm in GDI at present
<bnagy> there are calls the c++ api does not presnt
ttt has joined #ruby
<bnagy> nor MSDN documents
BigO has joined #ruby
<bnagy> the whole point of c# is to lead people to managed code
kil0byte_ has quit [Ping timeout: 255 seconds]
zzyybb has joined #ruby
<bnagy> well .net in geberal
kzrl has joined #ruby
<jrajav> Isn't GDI deprecated?
kil0byte has joined #ruby
<bnagy> yep
<bnagy> HI! Have we met?
samphippen has quit [Quit: Computer has gone to sleep.]
iPhoneMRZ has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
piotr_ has joined #ruby
ttt has quit [Ping timeout: 276 seconds]
Uranio has joined #ruby
piotr has quit [Ping timeout: 240 seconds]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
<Uranio> sorry, was here yesterday where I was tlaking about a encoding problem?
<Uranio> why are #ruby and #ruby-lang two channels?
clocKwize has quit [Read error: Connection reset by peer]
<bnagy> that is an excellent question
<bnagy> basically, #ruby-lang is for people that have the IQ and stamina to register with freenode and #ruby is for students with homework problems
<Xeago> I registered with freenode, but #ruby is more fun
jlast has joined #ruby
<Xeago> and imo a bit more active
<bnagy> :>
<bnagy> a lot more active
carlyle has quit [Remote host closed the connection]
srji has quit [Ping timeout: 244 seconds]
phantasm66 has joined #ruby
d34th4ck3r has joined #ruby
<shevy> hehehe
<shevy> I have a crappy ISP, so I get a new dynamic IP every few hours where I disconnect. I am too lazy to auto-authenticate with freenode, so I always end up having to do so, if I want to talk on #ruby-lang these days
seeingidog__ has joined #ruby
<shevy> since that was too much hassle for me, I stopped going there after they forced people to be registered in order to speak freely
ananthakumaran has joined #ruby
erichmenge has quit [Quit: Arrivederci!]
booginga has joined #ruby
erichmenge has joined #ruby
<workmad3> shevy: man, you're lazy
kkh has quit [Changing host]
kkh has joined #ruby
<bnagy> shevy: you could learn how to use a computer?
<workmad3> shevy: and not even the normal pro-active lazy... just plain lazy :P
<shevy> bnagy: I am a minimalist
Guest92676 has joined #ruby
<shevy> workmad3: yeah :)
<bnagy> I bet you a car I disc more than you :P
srji has joined #ruby
guy__ has quit [Remote host closed the connection]
<jrajav> Not having a car doesn't make you not a minimalist
guy__ has joined #ruby
GoGoGarrett has joined #ruby
<jrajav> What if you live a good distance from work and there isn't practical public transportation
<bnagy> rrrr parse...logic....
schaary|afk is now known as schaary
<bnagy> ok so I don't have a car, I disc more than shevy
<bnagy> the car was just the bet
<jrajav> disc == discard?
<bnagy> disconnect
Ivo has quit [Quit: WeeChat 0.3.9.2]
<jrajav> Not sure what disconnecting has to do with minimalism
<workmad3> jrajav: nothing, unless you're shevy
<bnagy> yeah, like... run screen
<bnagy> anyone that's too minimal for screen is probably not on irc at all
frem has joined #ruby
RantriX has quit [Remote host closed the connection]
segv_ has joined #ruby
<jrajav> There's a difference between minimalism and purposefully restricting yourself to a certain set of tools with a large tradeoff in productivity
<jrajav> Minimalism acknowledges utility
tobinharris has quit [Quit: tobinharris]
<Uranio> "kupfer" is minimalist but use many system resources
<workmad3> bnagy: I nohup my server processes :P
<Uranio> to make the diference exposed by jrajav betwen <jrajav | There's a difference between minimalism and purposefully restricting yourself to a certain set of tools>
guy__ has quit [Remote host closed the connection]
<bnagy> yes... good point... now is DEFINITELY the time I need to have dinner
guy__ has joined #ruby
morf has quit [Quit: eof]
nemesit has quit [Quit: Leaving...]
answer_42 has quit [Quit: WeeChat 0.3.9.1]
nateberkopec has joined #ruby
<Xeago> how do I turn an array of ascii numbers into a string? pack "C*"?
GoGoGarrett has quit [Remote host closed the connection]
answer_42 has joined #ruby
ThaDick has joined #ruby
ToTo has joined #ruby
itchyouch has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
wchun has quit [Quit: Leaving]
<jrajav> Xeago: Yeah
<jrajav> Xeago: U* would also work
toto-_ has quit [Ping timeout: 265 seconds]
wchun has joined #ruby
<Xeago> U is utf8?
quest88 has quit [Ping timeout: 252 seconds]
<jrajav> Yes
<Xeago> ah ok
<jrajav> If it's always ASCII it won't matter which you use out of those two
seme has joined #ruby
stopbit has joined #ruby
seme is now known as Guest26077
carlyle has joined #ruby
allanm has joined #ruby
atmosx has joined #ruby
Guest7055 has quit [Ping timeout: 252 seconds]
wchun has quit [Client Quit]
margle has quit [Quit: Computer has gone to sleep.]
tobinharris has joined #ruby
v0n has joined #ruby
itchyouch has joined #ruby
samphippen has joined #ruby
gyre007 has joined #ruby
<atmosx> a begin/rescuee/end section is taken as "different scope" ? I mean if after the 'begin' I create a list, can this list be read-en inteh end of the function?
* atmosx tests
<shevy> jrajav there are some channels on freenode where you must be registered in order to connect
<shevy> so if you are not registered, and reconnect, you must manually rejoin those channels again
<jrajav> Yes indeed
<atmosx> no it cannot.
reinaldo_ has joined #ruby
<Xeago> tbh, that is all handled by my client
<jrajav> If you don't have auto-auth, you're either lazy or bad at choosing IRC clients
<shevy> Xeago what do you use as client?
<Xeago> err
<Xeago> limechat
<shevy> most IRC clients, especially those irssi like ones, suck immensely
<Xeago> with sasl authentication
<shevy> awwww
<shevy> mac only :(
<jrajav> It's been years since I used a CLI client, but you could try out weechat
<Xeago> the client waits till it is authenticated to join stuff
<Xeago> shevy, jrajav I've heard good stuff about weechat
<jrajav> Yeah, it served me well
<jrajav> Easy to configure and extend, too
<Xeago> I coded something similar in MSL when I was using mIRC, like 14 years ago
_nitti has joined #ruby
<shevy> hehe
<shevy> good old mIRC
<shevy> :)
samphippen has quit [Read error: Connection reset by peer]
mybrainis404 has joined #ruby
gyre007 has quit [Ping timeout: 246 seconds]
wchun has joined #ruby
reinaldob has quit [Ping timeout: 256 seconds]
daniel_- has joined #ruby
mpereira has quit [Ping timeout: 240 seconds]
reinaldob has joined #ruby
* JonnieCache slaps shevy about with a wet fish
<shevy> yeah
<shevy> and things
<shevy> like this
mpereira has joined #ruby
<JonnieCache> those were the days. efnet, color control codes and wet fish
SegFaultAX has quit [Ping timeout: 240 seconds]
<shevy> a trout!
<JonnieCache> that was it
<shevy> also old school browser games
<shevy> where you coordinated guild activity via IRC... today's browser games seem completely unfit for that (or are so big that they have "integrated" chat anyway)
reinaldo_ has quit [Ping timeout: 260 seconds]
rippa has joined #ruby
nwertman has joined #ruby
samphippen has joined #ruby
kapowaz_ is now known as kapowaz
hakunin has joined #ruby
SegFaultAX has joined #ruby
zommi has quit [Quit: Leaving.]
nomenkun_ has joined #ruby
reinaldo_ has joined #ruby
samphippen has quit [Client Quit]
kirun has joined #ruby
reinaldob has quit [Ping timeout: 260 seconds]
nomenkun has quit [Ping timeout: 240 seconds]
cakehero has joined #ruby
bradhe has joined #ruby
<atmosx> Xeago: I use weechat and textual
<atmosx> both are good, weechat is way better than irssi
<atmosx> Xeago: SASL auth is good, what's the prob? :-)
<Xeago> not having a problem, shevy had :)
nwertman has quit [Ping timeout: 255 seconds]
xscc has joined #ruby
Guest21979 has quit [Ping timeout: 246 seconds]
redbull__ has joined #ruby
zaki has quit [Read error: Operation timed out]
_nitti has quit [Remote host closed the connection]
mklappstuhl has quit [Ping timeout: 240 seconds]
Guest26077 has quit [Ping timeout: 248 seconds]
_nitti has joined #ruby
rdark has quit [Ping timeout: 255 seconds]
seme_ has joined #ruby
xscc has quit [Client Quit]
Guest63674 has joined #ruby
bradhe has quit [Ping timeout: 255 seconds]
redbull_ has quit [Ping timeout: 240 seconds]
u89 has joined #ruby
thorncp has quit [Ping timeout: 240 seconds]
thorncp_ has joined #ruby
freeayu__ has quit [Remote host closed the connection]
danneu has joined #ruby
_bart has quit [Read error: Connection reset by peer]
allanm has quit [Read error: No buffer space available]
sj26 has quit [Ping timeout: 245 seconds]
allanm has joined #ruby
tagrudev has quit [Quit: my people need me]
allanm has quit [Read error: Connection reset by peer]
_bart has joined #ruby
SuperrMann has joined #ruby
allanm has joined #ruby
samphippen has joined #ruby
nomenkun_ has quit [Read error: Connection reset by peer]
IRLConor_ has quit [Quit: leaving]
IRLConor has joined #ruby
sj26 has joined #ruby
polymar_ has joined #ruby
polymar_ has quit [Remote host closed the connection]
rakl has joined #ruby
daniel_- has quit [Read error: Operation timed out]
baroquebobcat has joined #ruby
chussenot has quit [Quit: chussenot]
seme_ has quit [Quit: leaving]
polymar has quit [Ping timeout: 245 seconds]
hsbt_away is now known as hsbt
chussenot has joined #ruby
rdark has joined #ruby
baroquebobcat has quit [Client Quit]
banisterfiend has joined #ruby
reinaldo_ has quit [Remote host closed the connection]
reinaldob has joined #ruby
zaki has joined #ruby
baroquebobcat has joined #ruby
JohnBat26 has quit [Ping timeout: 276 seconds]
rakl has quit [Quit: sleeping]
heftig has quit [Quit: leaving]
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
dinkytoy has quit []
dinkytoy has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
philcrissman has joined #ruby
alexwh has quit [Quit: ZNC - http://znc.in]
ibrahima has joined #ruby
seeingidog__ has quit [Quit: Leaving.]
<shevy> SASL? auth? I dont have a problem with either of these, I just am way too lazy to auto-authenticate
ToTo has quit [Quit: Leaving...]
<shevy> what was that name... chef
mkillebr1w has joined #ruby
mkillebrew has quit [Disconnected by services]
mkillebr1w is now known as mkillebrew
ltsstar has joined #ruby
dnievas has joined #ruby
dnievas has left #ruby [#ruby]
generalissimo has joined #ruby
<atmosx> textual uses SASL auth by default
<atmosx> weechat can use either nickserve or sasl, the thing that I'm usually connected via TOR
schaary has quit [Quit: Leaving.]
mculp has joined #ruby
<Xeago> can't you proxy it over tor?
eldariof has quit [Read error: Operation timed out]
<atmosx> and in order to connect via tor you need sasl
atno is now known as atno|AFK
tommyvyo has joined #ruby
<atmosx> Xeago: sure, if my ISP wasn't *that* lame. I have an internet problem connection at home. Now I'm at the library. I took also a USB stick for irc/ssh/www
<mculp> hey guys i was thinking of writing a voting app… I think I'll call it VoteIt… how would i store the votes in ruby
dr_bob has quit [Quit: Leaving.]
<atmosx> mculp: sqlite3
<atmosx> mculp: why would you do that anyway? Small project or… ebcause e-voting is not considered sercure. You can't go back and re-count
<atmosx> safely...
<atmosx> It's way too easy to manipulate the voting
<atmosx> procedure
<shevy> mculp def vote(how = '+'); case how; when '+'; @vote +=1; when '-'; @vote -= 1; end
reinaldo_ has joined #ruby
daniel_- has joined #ruby
<shevy> atmosx, eh? he can ensure that his own code works or? :-)
<atmosx> shevy: why do you set 'how' to '+' in the def row?
reinaldob has quit [Ping timeout: 265 seconds]
d34th4ck3r has quit [Ping timeout: 252 seconds]
<workmad3> shevy: how about @vote = @vote.send(how, 1) ;)
iamjarvo has quit [Quit: Computer has gone to sleep.]
<generalissimo> mculp: can i come work for your company when you do?
<atmosx> 1 and 0 might be enough
<shevy> workmad3: nah, too verbose with .send
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
<shevy> big_fat_ballot.vote '+'
<shevy> well
<shevy> big_fat_ballot.vote :+
<atmosx> generalissimo: I'll hire you.
<shevy> nah that looks ugly
<lectrick> anyone have a shorter fizzbuzz in ruby? (1..100).map{|n| [f=(n%3).zero?,b=(n%5).zero?].any? ? "#{'Fizz' if f}#{'Buzz' if b}" : n}
kolz has joined #ruby
<workmad3> shevy: it's the same way as your method
<atmosx> generalissimo: we'll do a social network app, like facebook but better!
<atmosx> lol
<workmad3> shevy: for calling at least
<shevy> workmad3 more CHARACTERS!!!!
zemanel has joined #ruby
mtree has quit [Ping timeout: 245 seconds]
<shevy> you are a java man!!!
<workmad3> shevy: and fewer characters in implementation :P
jrajav has joined #ruby
<workmad3> shevy: because it doesn't need the case statement :P
wheeler has joined #ruby
<shevy> case is so beautiful
jrajav has quit [Remote host closed the connection]
jbpros has quit [Quit: May the Cuke be with you!]
_huoxito has quit [Quit: Leaving]
<generalissimo> mculp: you can lay me off 6 months into it when you realize that startups lose money sometimes
daybreaker has joined #ruby
seeingidog__ has joined #ruby
jbpros has joined #ruby
<shevy> who works at a startup here?
mtree has joined #ruby
<generalissimo> it's cool to tell inside jokes in a giant public channel, right?
rmc3 has quit [Ping timeout: 240 seconds]
rmc3 has joined #ruby
<grzywacz> shevy, #define startup ;)
<atmosx> I'm not.
topek has quit [Quit: Leaving.]
dr_bob has joined #ruby
<atmosx> a 2-year old company is a startup.
allanm has quit [Read error: Connection reset by peer]
<atmosx> if you're 3-year old, you're not.
<atmosx> easy
allanm has joined #ruby
<atmosx> I'm too bored… to study again Mg2+ cations
<atmosx> fuck..
<mculp> generalissimo: yes
<mculp> generalissimo: lets vote it
<workmad3> atmosx: how about if the company went for 2 years doing consultancy work, then pivoted into being a startup and doing their own product dev?
<atmosx> workmad3: that'd be a startup.
mjolk has joined #ruby
mjolk_ has joined #ruby
<shevy> atmosx what is "magnesia milk"
<generalissimo> shevy: i did... now i'm my own startup
<workmad3> atmosx: how about if they did consultancy for 3 years before pivoting? :)
reinaldo_ has quit [Remote host closed the connection]
<atmosx> shevy: yeah, could be.
<wheeler> if you use the word "pivoted," you're a startup
<JonnieCache> wheeler: ++
<JonnieCache> lol
<workmad3> :D
<shevy> atmosx it's Mg(OH)2
<atmosx> workmad3: again, startup. The pivoting point is 0-ing the previous experience.
atno|AFK is now known as anto
GeekOnCoffee has quit [Read error: Connection reset by peer]
<mculp> M NIGHT SMALYLAJHLALYJALHLALMYLANANANA -- generalissimo used to work for a startup named VoteIt
mjolk_ has quit [Remote host closed the connection]
<JonnieCache> if you have square glasses and wear a fucking blazer and sneakers then you are a startup
<atmosx> shevy: nah, I have to read about… what his role in enzymes, learn a couple of structures Mg2+ takes place on...
anto is now known as atno
<atmosx> it's a fucking mess, for biochem
<workmad3> atmosx: how about if I was a startup consultancy, went for 3 years, and after that pirouetted and restarted consultancy?
<atmosx> workmad3: that's fraud.
<mculp> I'm hiring @ Vote IT
<mculp> plz PM me
<grzywacz> are there any standard for formatting deeply nested hashes (or data structures in general)?
<grzywacz> *s
<workmad3> atmosx: bah :P
<generalissimo> what if you wear hoodies to work and forget to brush the cheetos out of your beard?
<atmosx> :-P
<generalissimo> is that a startup?
<shevy> grzywacz: the only standard I can think of is to murder people in reallife if they use deeply nested arrays & hashes
jbpros has quit [Ping timeout: 252 seconds]
<mculp> besides generalissimo ne1 else want to work @ Vote IT
<workmad3> generalissimo: no, that's just normal coders
<kalleth> i work in an office the same size as a shipping container near edgware road in central london
<kalleth> does that count as a startup
<shevy> kalleth: YES
<wheeler> Vote IT sounds like a tech consultancy
<workmad3> kalleth: is it an actual shipping container?
<kalleth> unfortunately not
<grzywacz> shevy, that's for a test case, shouldn't be too bad :)
<kalleth> would be cool if it was though
<shevy> lol
<kalleth> except for, you know, insulation
casheew has quit [Quit: leaving]
<mculp> no i tihnk we just need to add enunciation
<JonnieCache> kalleth: do you have free beer and a disregard for revenue?
<shevy> who would want to code in a container that _is_ actually shipped around the world?
<mculp> Vote IT
<kalleth> no free beer, and we're profitable
<mculp> tell them what you are voting for
<workmad3> kalleth: sounds non-startup then
<kalleth> just a digital media agency
<grzywacz> kalleth, "I work in a MAERSK-branded office!"
<grzywacz> ;-)
<kalleth> so we're not actually a startup
<JonnieCache> not a startup then :)
banisterfiend has quit [Read error: Connection reset by peer]
<atmosx> kalleth: that's pathetic. What's your revenue?
realniko has quit [Ping timeout: 245 seconds]
<kalleth> atmosx: like i'm going t tell an IRC channel that ;p
<shevy> and no free beer, so you are an evil company :(
realniko has joined #ruby
<kalleth> i'm just an employee
daniel_- has quit [Ping timeout: 252 seconds]
<kalleth> also, we have no tests
<atmosx> kalleth: well you never know.
<shevy> kalleth: lie to us!
* kalleth watches the channel twitch
<atmosx> I mean, Inever know :-P
<workmad3> startups don't make money... startups haven't figured out how to make money yet
<JonnieCache> what kind of startup actually makes money jesus some people
<kalleth> shevy: okay, we have full CI on all our projects with 100% code coverage
<kalleth> :D
<kalleth> how's that
<workmad3> once they figure that out, they're no longer a startup :P
<JonnieCache> you should be *spending* other peoples money
* atmosx is tracing kalleth in order to find his real identity and sell it on Silk Road for $$$
<mculp> Vote it Is Also a Startup is ne1 interested PM ME
<kalleth> i have no drugs
<slainer68> hi. if b is not defined, why you can't write : a = b if b = true (one line), but if b = true; a = b; end; works ?
<kalleth> sorry
<shevy> JonnieCache isn't that like... fraud?
<atmosx> what is a CI ?
<atmosx> champions league?
<JonnieCache> no thats venture capitalism
<kalleth> ..
<workmad3> shevy: no, it's called 'investment' :P
<kalleth> C i
<kalleth> CI
<kalleth> oh god
<generalissimo> and here i am buying my own beer and writing my own paychecks like a sucker
<shevy> lol
Glottis has joined #ruby
<atmosx> shevy: yeah, business idiots use abbreviations like ROI (return on invest), etc. Makes them feel smart.
mtree has quit [Ping timeout: 260 seconds]
<mculp> generalissimo I need a vote algorithm then I have beer for u
<kalleth> ROI is a standard acronym used for pretty much everything and actually has a valid meaning
<atmosx> generalissimo: see? there you go! :-P
<workmad3> generalissimo: yeah, you should be getting a rich billionaire convinced that you're the next big facebook so that they'll buy your beer for the next 6 months :P
<generalissimo> i keep getting hits from angellist from people who want to hire me at 50k with 2% equity... in SF
<generalissimo> lol
<generalissimo> can you rent a dumpster on 50k a year in SF?
<atmosx> kalleth: yeah, still… it's pretty self-explaionatory
<kalleth> when used in conjunction with 'synergy' or 'synergistically' thoug
<kalleth> iwant to burn faces
<kalleth> CI means continuous integration, i was making a ruby joke, btw, atmosx
<workmad3> atmosx: don't forget about equity... and break-even points, and profit-loss charts...
<atmosx> SF has pretty skilled guys, but most of them already have a paycheck...
<kalleth> i don't understand what happened to the original way of making a company
<JonnieCache> were programmers surely we cant rag on the beancounters for using technical terms
<kalleth> do something yourself, make some money, make enough to hire other people, then make more money
<mculp> does ne1 know when ruby 1.8.7 comes out
<kalleth> or is that just not cool aymore?
<JonnieCache> kalleth: no
<kalleth> AHAHAHAHA
<kalleth> mculp: AHAHAHAHAHAHAHAHA
<workmad3> JonnieCache: no, but we can rag on them for not using *our* technical terms :P
<atmosx> sure
<kalleth> please tell me that's ironic.
<workmad3> JonnieCache: because our terms are obviously better :P
jgrevich has joined #ruby
<atmosx> mculp: you're gonna be one hell of dev
<generalissimo> kalleth: bingo.
<JonnieCache> workmad3: they do use our technical terms. most of their technical terms are just our technical terms misapplied
<atmosx> kalleth: sure, he's back to 2005
<shevy> atmosx the most complicated thing to ever want to memorize are all different names for all proteins in all biological cells
<workmad3> JonnieCache: heh
gyre007 has joined #ruby
<shevy> mculp I have both ruby working! 1.8.7 and 1.9.3something
<atmosx> I have to learn the structure of 25 of those for the Molecular Biology exam
<atmosx> cool shit
<mculp> wtf????
<atmosx> why do people still use 1.8.x anyway?
<mculp> what is 1.9.3
<shevy> atmosx yeah and write down the detailed mechanism they use for the catalysis too!
<atmosx> mculp: 1.8.x is obsolet, we're heading towards 2.0 now
<shevy> 1.8.x was cool. no encoding annoyances
<mculp> last i heard 1.8.8 was coming soon
<atmosx> shevy: that's not even possible.
<mculp> and 1.8.7
<mculp> wtf
tommyvyo has quit [Quit: Computer has gone to sleep.]
<atmosx> mculp: last you heard was in 2008?
jenrzzz has joined #ruby
<kalleth> mculp: holy shit bro are you recently awakeed from a 5 year coma
<shevy> mculp 1.8.x died
<shevy> mculp it does not even compile on most recent glibc/gcc anymore :(
<atmosx> matz would be proud
<atmosx> lol
<shevy> matz authored 8 hours ago!
<atmosx> awesome, I needed to write a sinatra application to understand how to display data from my functions, all these puts and p … made me sick.
<mculp> matz?
<atmosx> mculp: yeah, a ruby dev.
<atmosx> not as skilled as generalissimo
<mculp> oh ok
<mculp> yeah generalissimo PMd me
<mculp> is smart
ProT-0-TypE has joined #ruby
<atmosx> mculp: how did you get here anyway? (out of curiosity)
ProT-0-TypE has quit [Client Quit]
ProT-0-TypE has joined #ruby
<atmosx> cool, I think I'm gonna grab a cake
<atmosx> and then go to the poool
<mculp> i downloaded windows version of BitchX and it recommended this as a good community
shtirlic has quit [Remote host closed the connection]
gyre007 has quit [Ping timeout: 264 seconds]
elsifaka has quit [Quit: Veloma e!]
<generalissimo> lol
<shevy> ewww
<npx> that's like chlamydia recommending AIDS as a good STD
<shevy> cant people stop with those non GUI clients
<atmosx> mculp: you use, BitchX on windows?
<shevy> use silverex build for xchat on windows!!!
<atmosx> mculp: you're a kinky mothafuckah you know that?
maesbn has quit [Remote host closed the connection]
prezioso has quit [Ping timeout: 252 seconds]
Monie[ip] has joined #ruby
monkegjinni has joined #ruby
<atmosx> shevy: makes a huge impressions on girls when sitting right next to me, to fire up weechat
<shevy> I think he comes from #python and has infiltrated us here
iamjarvo has joined #ruby
<atmosx> they ask me "Are you hacking a website???"
<atmosx> sure
ProT-0-TypE has quit [Client Quit]
<shevy> better than "Are you using a software called ... peechat???"
kidoz has joined #ruby
<atmosx> talking to shevy and hacking the FBI holds the degree of danger
lolmaus has quit []
<shevy> why, I am nicer than the FBI
<atmosx> I'm not sure, I don't have prior FBI experience
<lectrick> wow, this channel is wild this morning (EST)
<wheeler> so, how often to girls go up to you and ask if you can move so they can sit with their friend?
<bnagy> aw shit there are hackers here?
<shevy> hah I dont have either
<mculp> c yall later. generalissimo u have my number
<bnagy> fuck, hide
<shevy> I guess they only scan for certain keywords anyway
pavilionXP has joined #ruby
mculp has left #ruby ["["Textual IRC Client: www.textualapp.com"]"]
<atmosx> wheeler: actually never. But you know… They still give you the 'look' like (wtf is this guy doing)
<atmosx> wheeler: much safer stalking people on facebook
<wheeler> haha
<shevy> hmm
<lectrick> npx: lol
theoldroadhog has joined #ruby
tommyvyo has joined #ruby
<atmosx> talking about *other girls*, my GF just pm-ed me...
ThaDick has quit [Ping timeout: 240 seconds]
Slivka has joined #ruby
redbull__ has quit [Read error: Connection reset by peer]
<atmosx> lol hah kinda
daybreaker has left #ruby [#ruby]
<kolz> guardian force?
Slivka has quit [Read error: Connection reset by peer]
wheeler has left #ruby ["Audi 5000"]
<kolz> like Ifrit
<kolz> and Shiva
Slivka has joined #ruby
redbull__ has joined #ruby
Slivka has quit [Read error: Connection reset by peer]
kolz has left #ruby [#ruby]
cardoni has quit [Quit: cardoni]
x82_nicole has joined #ruby
g-ram has quit [Quit: Computer has gone to sleep.]
Guest92676 has quit [Ping timeout: 260 seconds]
GeekOnCoffee has joined #ruby
Zai00 has joined #ruby
etcetera has joined #ruby
linoj has joined #ruby
ibrahima has quit []
mark_locklear has quit [Remote host closed the connection]
bradhe has joined #ruby
<atmosx> I'm off
atmosx has quit [Quit: And so the story goes…]
mtree has joined #ruby
g-ram has joined #ruby
chimkan_ has joined #ruby
apeiros_ has quit [Remote host closed the connection]
bwlang has left #ruby [#ruby]
mculp has joined #ruby
<mculp> hey generalissimo u there
<mculp> cal me back
mculp has left #ruby ["["Textual IRC Client: www.textualapp.com"]"]
emptyflask has joined #ruby
mengu has quit [Read error: Connection reset by peer]
emptyflask has quit [Remote host closed the connection]
emptyflask has joined #ruby
anachronistic has joined #ruby
Virunga has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 240 seconds]
<generalissimo> lol trollin' so hard
jbpros has joined #ruby
<kalleth> what the fuck even happened there
Guest92676 has joined #ruby
schwap has quit [Ping timeout: 257 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
schwap has joined #ruby
fantazo has joined #ruby
ThaDick has joined #ruby
davidcelis has quit [Quit: K-Lined.]
quest88 has joined #ruby
mtree has left #ruby ["WeeChat 0.3.8"]
g-ram has quit [Quit: Computer has gone to sleep.]
tjbiddle has joined #ruby
guy__ has quit [Remote host closed the connection]
matrixise has quit [Ping timeout: 246 seconds]
guy__ has joined #ruby
GeekOnCoffee has quit [Quit: ZNC - http://znc.in]
GeekOnCoffee has joined #ruby
aganov has quit [Remote host closed the connection]
richardjapenga has quit [Quit: Leaving]
<shevy> hmmm
<shevy> notice that his girlfriend called and he is off of IRC
<shevy> what does this tell us about you all!!!
gyre007 has joined #ruby
<JonnieCache> kalleth: something is weird on freenode today
dertyp has quit [Quit: Leaving...]
rumba has joined #ruby
<shevy> yeah
<shevy> they all act like drunks
<rumba> does anyone have experience with Savon, please? i have this piece of code http://pastebin.com/eAVsZy04 which doesn't authenticate to the remote server. i've tried both basic and digest (line 7) and it's still not working, while the Python Suds library works fine. i don't understand what the difference is...
k610 has quit [Ping timeout: 255 seconds]
hsbt is now known as hsbt_away
Rym has joined #ruby
lethjak__ has joined #ruby
<lethjak__> hey, in ruby is there any way to append to a file rather than overwriting it?
nopoliti1a has joined #ruby
soyapi has joined #ruby
baroquebobcat has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
invisime has quit [Ping timeout: 240 seconds]
invisime has joined #ruby
allanm has quit [Read error: Connection reset by peer]
ryanlecompte has quit [Remote host closed the connection]
Bootstrapper has joined #ruby
allanm has joined #ruby
zooz has quit [Quit: Leaving IRC]
ryanlecompte has joined #ruby
hsbt_away is now known as hsbt
CamonZ has quit [Ping timeout: 252 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
jasond has joined #ruby
icooba has quit [Ping timeout: 240 seconds]
shevy has quit [Ping timeout: 245 seconds]
johnmilton has joined #ruby
CaptainJet has joined #ruby
beiter has quit [Read error: Connection reset by peer]
rhys has joined #ruby
ryanlecompte has quit [Ping timeout: 252 seconds]
ltsstar has quit [Ping timeout: 264 seconds]
<Xeago> how do I pad strings when printed in ruby?
Monie[ip] has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<workmad3> Xeago: with ljust and rjust
zigomir has quit [Quit: Leaving]
<rhys> what is #{stuff} in ruby? I thought it was like the bash subshell. if I do 'echo $(cat file)' it first puts the output of cat file into $() and then re-evaluates the line.
<workmad3> rhys: "this is #{string interpolation}"
<rhys> workmad3, thanks. i'll google that now.
zigomir has joined #ruby
zigomir has quit [Remote host closed the connection]
<Xeago> workmad3: thanks
Elhu has quit [Quit: Computer has gone to sleep.]
schaary has joined #ruby
heftig has joined #ruby
<sweet_kid> lethjak__: use "a" option in File.open()
wheeler has joined #ruby
cousine_ has quit [Remote host closed the connection]
tjbiddle has quit [Quit: tjbiddle]
hoelzro is now known as hoelzro|away
<lethjak__> thanks sweet_kid! :)
quest88 has quit [Quit: quest88]
allanm has quit [Read error: No buffer space available]
Glottis has quit [Ping timeout: 245 seconds]
allanm has joined #ruby
davidcelis has joined #ruby
jrajav has joined #ruby
Elhu has joined #ruby
samphippen has joined #ruby
shevy has joined #ruby
_nitti_ has joined #ruby
_nitti__ has joined #ruby
Trioke has joined #ruby
mmitchell has quit [Remote host closed the connection]
_nitti has quit [Ping timeout: 252 seconds]
zigomir has joined #ruby
dr_bob has quit [Quit: Leaving.]
mahmoudimus has joined #ruby
blazes816 has joined #ruby
_nitti_ has quit [Ping timeout: 255 seconds]
etcetera has quit [Quit: Computer has gone to sleep.]
schaary has quit [Quit: Leaving.]
icooba has joined #ruby
v0n has quit [Ping timeout: 240 seconds]
_nitti has joined #ruby
FailDrain has quit [Quit: Leaving]
F1skr has joined #ruby
zigomir has quit [Ping timeout: 242 seconds]
vlad_starkov has joined #ruby
reset has quit [Quit: Leaving...]
_nitti__ has quit [Ping timeout: 260 seconds]
rakl has joined #ruby
beilabs has quit [Ping timeout: 245 seconds]
margle has joined #ruby
ryanlecompte has joined #ruby
BoomCow has joined #ruby
etcetera has joined #ruby
beilabs has joined #ruby
schaary has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
dr_bob has joined #ruby
dr_bob has quit [Client Quit]
mikepack has joined #ruby
nwertman has joined #ruby
ninegrid has quit [Read error: Connection reset by peer]
<Xeago> how would I make 2 dimensional array of 2 loose arrays
baroquebobcat_ has joined #ruby
<Xeago> the items in the 2 arrays are keys and the value gets computed from those keys
allanm has quit [Read error: Connection reset by peer]
_nitti_ has joined #ruby
jackiechan0 has quit [Quit: Sto andando via]
allanm has joined #ruby
bradhe has joined #ruby
baroquebobcat has quit [Ping timeout: 256 seconds]
baroquebobcat_ is now known as baroquebobcat
grzywacz has quit [Ping timeout: 240 seconds]
ianbrandt has joined #ruby
_nitti has quit [Ping timeout: 276 seconds]
jplaza_ has joined #ruby
nwertman has quit [Ping timeout: 255 seconds]
areil has quit [Remote host closed the connection]
_nitti has joined #ruby
jplaza_ has quit [Client Quit]
seeingidog__ has quit [Quit: Leaving.]
alvaro_o has joined #ruby
ryannielson has joined #ruby
pcarrier has quit []
nopoliti1a has quit [Quit: leaving]
bradhe has quit [Ping timeout: 252 seconds]
JohnBat26 has joined #ruby
swarley has joined #ruby
robbyoconnor has quit [Ping timeout: 246 seconds]
robbyoconnor has joined #ruby
_nitti_ has quit [Ping timeout: 276 seconds]
oivoodoo has quit [Remote host closed the connection]
<Xeago> I guess that would be more like nested hashes
Elhu has quit [Quit: Computer has gone to sleep.]
<matti> :>
wheeler has left #ruby ["Audi 5000"]
guy__ has quit [Ping timeout: 252 seconds]
clj_newb has quit [Ping timeout: 265 seconds]
margle has quit [Quit: Computer has gone to sleep.]
ebouchut has quit [Quit: ebouchut]
BrianJ has quit [Quit: BrianJ]
adeponte has joined #ruby
alexwh has joined #ruby
chussenot has quit [Quit: chussenot]
maletor has joined #ruby
chussenot has joined #ruby
the_jeebster has joined #ruby
Elhu has joined #ruby
jekotia has joined #ruby
hsbt is now known as hsbt_away
nat2610 has joined #ruby
_nitti_ has joined #ruby
brianpWins has joined #ruby
ninegrid has joined #ruby
tobinharris has quit [Ping timeout: 240 seconds]
v0n has joined #ruby
d2dchat has quit [Remote host closed the connection]
_nitti__ has joined #ruby
_nitti__ has quit [Remote host closed the connection]
_nitti has quit [Ping timeout: 252 seconds]
banisterfiend has joined #ruby
<Xeago> how would I match words that have an l in the second or third position
volta has quit [Remote host closed the connection]
<Xeago> E.g. Hello and All
_nitti has joined #ruby
wallerdev has joined #ruby
<Xeago> ^.[l.][l.]
<Xeago> does not work..
polysics has joined #ruby
<polysics> anyone familiar with the Ruby internals can tell me what exactly File.rename does?
<polysics> it's a s if it's touching the file twice, causing some issues with filesystem polling
tjbiddle has joined #ruby
afgeneralist has joined #ruby
_nitti_ has quit [Ping timeout: 252 seconds]
<davidcelis> Xeago: /^.{1-2}l/
<davidcelis> er sorry, /^.{1,2}l/
<davidcelis> not a hyphen
<davidcelis> Xeago: http://rubular.com/ is a good site to play with regexes in real time
<banisterfiend> davidcelis: sup
timmow has quit [Ping timeout: 252 seconds]
redbull__ has quit [Read error: Connection reset by peer]
<davidcelis> hi
redbull__ has joined #ruby
ThaDick has quit [Quit: zzzZZZ ...]
<polysics> might it be that File.rename, don't know, closes the handle too late?
<polysics> this is a very weird issue here
Nisstyre has quit [Remote host closed the connection]
sepp2k has quit [Read error: No buffer space available]
<Xeago> how to use ack with a regex?
theoros_ is now known as theoros
<Xeago> and also read from stdin
sepp2k has joined #ruby
cantonic_ has joined #ruby
jekotia has quit [Quit: irc.quakenet.net]
Elhu has quit [Quit: Computer has gone to sleep.]
cantonic has quit [Ping timeout: 264 seconds]
cantonic_ is now known as cantonic
soyapi has quit [Read error: Connection reset by peer]
JohnBat26 has quit [Read error: Operation timed out]
alexim has joined #ruby
bwlang has joined #ruby
Nisstyre has joined #ruby
Vainoharhainen has quit [Quit: Leaving...]
fantazo has quit [Remote host closed the connection]
kil0byte has quit [Remote host closed the connection]
Rym has quit [Read error: Connection reset by peer]
hakunin has quit [Remote host closed the connection]
qwerxy has quit [Ping timeout: 260 seconds]
qwerxy has joined #ruby
v0n has quit [Ping timeout: 240 seconds]
vandemar has quit [Ping timeout: 240 seconds]
fmcgeough has joined #ruby
rdark has quit [Quit: leaving]
workmad3 has quit [Ping timeout: 264 seconds]
bradhe has joined #ruby
<shevy> Xeago use ruby!
schaary has quit [Quit: Leaving.]
<jrajav> Xeago: Isn't that precisely what sed is for?
<jrajav> awk, but with regexes?
<Xeago> no idea
<Xeago> btw ack!=awk
<Xeago> no idea what awk is
mascool has joined #ruby
<jrajav> no idea what ack is
<jrajav> Sooooo
<jrajav> Awkward
<jrajav> (See what I did there?)
eldariof has joined #ruby
<Xeago> ack is 'better than grep' :) yea :)
<jrajav> Doesn't sound like it could be that much better without a manpage
<Xeago> it has a man page if you install it?
robbyoconnor has quit [Ping timeout: 276 seconds]
<jrajav> BAM
JohnBat26 has joined #ruby
caleb_io has joined #ruby
bradhe has quit [Ping timeout: 255 seconds]
chrismcg is now known as zz_chrismcg
<shevy> the most awful software can have a great manpage
<shevy> and still suck
arturaz has quit [Ping timeout: 256 seconds]
<Xeago> but all excellent command line tools have a man page
slainer68 has quit [Remote host closed the connection]
havenn has joined #ruby
macabre has quit [Remote host closed the connection]
kzrl has quit [Ping timeout: 276 seconds]
mityaz has joined #ruby
<shevy> what for
filipe has quit [Read error: No buffer space available]
u89 has quit [Remote host closed the connection]
<shevy> we live in the age of wikipedia
fuho has quit [Ping timeout: 276 seconds]
<shevy> in-built help
michaelmartinez has joined #ruby
<shevy> and a tutorial with plenty of examples
kzrl has joined #ruby
BigO has quit [Remote host closed the connection]
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
arturaz has joined #ruby
caleb_io has quit [Quit: caleb_io]
allanm has quit [Read error: Connection reset by peer]
jrajav has quit [Quit: I tend to be neutral about apples]
allanm has joined #ruby
eroc has joined #ruby
Slivka has joined #ruby
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
cantonic has quit [Remote host closed the connection]
cantonic has joined #ruby
chococrois has joined #ruby
kzrl has quit [Ping timeout: 260 seconds]
tvw has quit [Remote host closed the connection]
<havenn> gists are like bbq ribs
robustus has joined #ruby
carlyle_ has joined #ruby
Synthead has joined #ruby
cardoni has joined #ruby
<GeekOnCoffee> havenn: they don't microwave well?
bondar has joined #ruby
carlyle has quit [Ping timeout: 245 seconds]
kzrl has joined #ruby
thorncp_ is now known as thorncp
seeingidog__ has joined #ruby
seeingidog__ has quit [Ping timeout: 246 seconds]
allanm has quit [Read error: Connection reset by peer]
allanm has joined #ruby
bondar has quit []
banisterfiend has quit [Ping timeout: 260 seconds]
bondar has joined #ruby
bondar has quit [Excess Flood]
dakine has quit [Quit: Leaving]
kidoz has quit [Quit: Ухожу я от вас]
bondar has joined #ruby
bondar has quit [Excess Flood]
bondar has joined #ruby
bondar has quit [Client Quit]
bondar has joined #ruby
bondar has quit [Excess Flood]
<lethjak__> hey, I'm getting a weird error, it's telling me that > is undefined
<lethjak__> is there something wrong with this?
<lethjak__> !(checkArray.index(sku) > -1)
bondar has joined #ruby
bondar has quit [Excess Flood]
bondar has joined #ruby
bondar has quit [Excess Flood]
bondar has joined #ruby
bondar has quit [Excess Flood]
bondar has joined #ruby
bondar has quit [Excess Flood]
ThaDick has joined #ruby
<havenn> lethjak__: What is the return value of just: checkArray.index(sku)
h4mz1d has joined #ruby
SpartanF31 has joined #ruby
v0n has joined #ruby
<havenn> lethjak__: If it is 'nil' then '>' will be undefined? Gist the error?
cdt_ has quit [Ping timeout: 245 seconds]
<lethjak__> I thought it was -1 if the value didn't exist. but there are some empty ones
cantonic has quit [Quit: cantonic]
voodoofish430 has joined #ruby
<lethjak__> it looks like just using .nil? works for me
<lethjak__> I just want to see if a value is in the array
gyre007 has quit [Remote host closed the connection]
<blazes816> include?
bricker has joined #ruby
tomsthumb has quit [Quit: Leaving.]
fgro has quit [Quit: Lost terminal]
Tuxist has joined #ruby
qwerxy has quit [Quit: offski]
<lethjak__> include seems to be undefined?
spike|spiegel has joined #ruby
<lethjak__> blazes816: was that directed at me?
Zai00 has quit [Quit: Zai00]
kil0byte has joined #ruby
SpartanF31 has quit [Quit: Sto andando via]
<blazes816> lethjak__: you want to test for the existence of something in an array?
nat2610 has quit [Quit: Leaving.]
<blazes816> lethjak__: [:a, :b].include?(:a) #=> true
v0n has quit [Ping timeout: 240 seconds]
<blazes816> [:a, :b].include?(:c) #=> false
cardoni has quit [Quit: cardoni]
jaygen_ has joined #ruby
jaygen has quit [Ping timeout: 252 seconds]
leifmadsen has quit [Quit: This is how I roll; animal print pants outta control!]
hsbt_away is now known as hsbt
nat2610 has joined #ruby
itchyouch has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
robotmay has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
chussenot has quit [Quit: chussenot]
gridaphobe has joined #ruby
mikeg has joined #ruby
atno is now known as atno|AFK
emptyflask has quit [Remote host closed the connection]
BigO has joined #ruby
allanm has quit [Read error: No buffer space available]
allanm has joined #ruby
<lethjak__> thanks blazes816 :) that's faster
mercwithamouth has joined #ruby
Dreamer3 has joined #ruby
itchyouch has joined #ruby
vlad_starkov has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
carlyle has joined #ruby
mikepack has quit [Remote host closed the connection]
emmanuelux has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
Xeago has quit [Ping timeout: 260 seconds]
v0n has joined #ruby
jrist is now known as jrist-afk
carlyle_ has quit [Ping timeout: 245 seconds]
baroquebobcat has joined #ruby
greenarrow has quit [Read error: Connection reset by peer]
greenarrow has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
answer_42 has quit [Ping timeout: 276 seconds]
hoelzro|away is now known as hoelzro
reset has joined #ruby
reset has quit [Client Quit]
atno|AFK is now known as atno
vlad_starkov has quit [Ping timeout: 264 seconds]
hsbt is now known as hsbt_away
answer_42 has joined #ruby
bbloom has left #ruby ["["Textual IRC Client: www.textualapp.com"]"]
d2dchat has joined #ruby
rippa has joined #ruby
margle has joined #ruby
kbeddingfield has joined #ruby
vlad_starkov has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
atno is now known as atno|forASmoke
applesarefruits has joined #ruby
d34th4ck3r has joined #ruby
ThaDick has quit [Quit: I'm outta here!]
mercwithamouth has quit [Quit: Lost terminal]
c0rn has joined #ruby
tchebb has joined #ruby
h4mz1d has quit [Ping timeout: 240 seconds]
g-ram has joined #ruby
nat2610 has left #ruby [#ruby]
maletor has quit [Quit: Computer has gone to sleep.]
maletor has joined #ruby
BaconPancakes has joined #ruby
v0n has quit [Read error: Operation timed out]
geekbri has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
maletor has quit [Client Quit]
g-ram has quit [Ping timeout: 252 seconds]
bradhe has joined #ruby
meskyanichi has quit [Quit: Linkinus - http://linkinus.com]
aquaranto has quit [Remote host closed the connection]
tvw has joined #ruby
g-ram has joined #ruby
vlad_sta_ has joined #ruby
gbchaosmaster has joined #ruby
bradhe has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
rippa has quit [Ping timeout: 264 seconds]
ltsstar has joined #ruby
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
elkclone has joined #ruby
pcarrier has joined #ruby
tectonic has quit [Ping timeout: 260 seconds]
sullenel has joined #ruby
tectonic has joined #ruby
seeingidog__ has joined #ruby
arya has quit [Ping timeout: 244 seconds]
cakehero has quit [Quit: Computer has gone to sleep.]
Trioke_ has joined #ruby
carlyle has quit [Read error: Connection reset by peer]
senj has quit []
v0n has joined #ruby
Tuxist has quit [Remote host closed the connection]
seeingidog__ has quit [Ping timeout: 252 seconds]
arturaz has quit [Read error: Connection reset by peer]
carlyle has joined #ruby
Xeago has joined #ruby
Trioke has quit [Ping timeout: 248 seconds]
margle has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
vlad_sta_ has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Russell^^ has joined #ruby
Tuxist has joined #ruby
carlyle has quit [Remote host closed the connection]
chococrois has quit [Quit: Leaving.]
Tuxist has quit [Remote host closed the connection]
Trioke has joined #ruby
SuperrMann has quit [Quit: Computer has gone to sleep.]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
macabre has joined #ruby
ryannielson has quit [Quit: ryannielson]
elux has joined #ruby
arietis has joined #ruby
Trioke_ has quit [Ping timeout: 264 seconds]
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
etcetera has quit [Quit: Computer has gone to sleep.]
pcarrier has quit []
macabre has quit [Remote host closed the connection]
pcarrier has joined #ruby
CamonZ has joined #ruby
eroc has quit [Quit: eroc]
havenn has quit [Ping timeout: 260 seconds]
stephenjudkins has joined #ruby
ewag has quit [Ping timeout: 276 seconds]
KevinSjoberg has joined #ruby
elux has quit [Quit: Bye!]
tenmilestereo has joined #ruby
emmanuelux has quit [Quit: emmanuelux]
yekta has joined #ruby
mib_mib has joined #ruby
<mib_mib> hi guys, is there a library that will escape quotes and double quotes auotmatically in a string?
<Xeago> mib_mib: for what purpose?
<Xeago> there is probably a gem, but I am not aware of it, check github and rubygems
<mib_mib> Xeago: i have a class that generates a javascript, but i need to escape some strings inside the javascript
<mib_mib> i.e. 'some\'name\''
<mib_mib> Xeago: wanted something better than a simple gsub
Xeago has quit [Remote host closed the connection]
Uranio has quit [Quit: WeeChat 0.3.8]
BaconPancakes has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
jrajav has joined #ruby
emmanuelux has joined #ruby
ltsstar has quit [Ping timeout: 260 seconds]
pyx has joined #ruby
havenn has joined #ruby
kil0byte has quit [Ping timeout: 255 seconds]
nicoulaj has joined #ruby
carloslo_ has quit [Remote host closed the connection]
thinkdevcode has joined #ruby
davidcelis has quit [Quit: K-Lined.]
jackiechan0 has joined #ruby
yekta has quit [Quit: yekta]
imami|afk is now known as banseljaj
Morkel_ has joined #ruby
Axsuul has joined #ruby
seeingidog__ has joined #ruby
atno|forASmoke is now known as atno
Morkel has quit [Ping timeout: 240 seconds]
Morkel_ is now known as Morkel
daniel_hinojosa has joined #ruby
polysics has quit [Remote host closed the connection]
beilabs has quit [Ping timeout: 246 seconds]
michaelmartinez has quit [Read error: Connection reset by peer]
beilabs has joined #ruby
Cicloid has joined #ruby
ner0x has quit [Remote host closed the connection]
micsha has joined #ruby
<micsha> If I have a module that I've written, I know I can require it, but is there any reason that I can't include it?
xnm has joined #ruby
<micsha> as in
eldariof has quit []
<micsha> include ./MyModule.rb
<waxjar> you should use the module name: include SomeModule
spike|spiegel has quit [Ping timeout: 252 seconds]
<micsha> k, I'll give that a shot, then.
<micsha> thanks.
<waxjar> also, i think the convention is to have the file names in snake_case
<micsha> it's still throwing errors at me, is it possible that it's a bug on windows?
<waxjar> what does it say?
Virunga has joined #ruby
<micsha> NameError: undefined local variable or method `ex25' for main:Object
<micsha> from (irb):9
<micsha> from C:/Ruby193/bin/irb:in `<main>'
<micsha> ex25 being my module name
<shevy> micsha there is no method named ex25() known
<shevy> no, that can not be
<shevy> a module name must start Upcased
<micsha> k, I'll try fixing that and see if that works.
<shevy> in irb try this:
<micsha> will the ruby interpreter not work if it isn't uppercased or is that just convention?
<waxjar> modules and classes are constants, and constant need to start with an uppercase letter
<shevy> module Foo; def test3; puts 'testing'; end; extend self; end; Foo::test3
<waxjar> *constants
Slivka has quit [Remote host closed the connection]
<shevy> micsha all constants in ruby, first character, must be upcased, as waxjar wrote
<micsha> I'm just asking if that is convention or if the Ruby interpreter will actually not understand what's going on?
<shevy> you could do this in theory too
<shevy> module FOO
<shevy> but people prefer this:
<shevy> module Foo
<shevy> you see?
headius has joined #ruby
<micsha> yeah
<shevy> F is upcased in both situations
<waxjar> it's required micsha
<shevy> what will not work is this
<shevy> module foo
<JohnTeddy> https://gist.github.com/4127389 ... I am trying to write a 'titleize' method.. initially I just capitalized the first word of the title, and all words bigger than 4 characters... though that's buggy. So I made an array with every preposition, coordinating conjunction, and article.. how can I change the gsub method so instead of using the '5' character limit... it just does an isinarray? check.. if it's in there.. .downcase
<micsha> huh... I learned something today.
<shevy> micsha, it is more than a convention, the ruby parser actually works that way
jrist-afk is now known as jrist
<waxjar> ruby will think you're calling a variable called foo or a method called foo
<shevy> yeah
<micsha> ahh. ok, i gotcha.
v0n has quit [Ping timeout: 244 seconds]
<shevy> JohnTeddy, that is a long chunk of words
<micsha> so is it [code]include (Ex25.rb)[/code]
BadProphet has joined #ruby
<heftig> JohnTeddy: title.split.map { |x| downcasedwords.include?(x) ? x.downcase : x.capitalize }.join(" ")
<heftig> well, or more correctly:
u89 has joined #ruby
<shevy> micsha no
<waxjar> micsha, are you coming from php perhaps?
<shevy> micsha include works on a module name
<micsha> no, coming from C
<heftig> JohnTeddy: title.split(/ /, -1).map { |x| downcasedwords.include?(x) ? x.downcase : x.capitalize }.join(" ")
<micsha> kind of
<JohnTeddy> shevy: yea, I had to get all the words in the english language that are prepositions/articles/coordinating conjunctions
<waxjar> ah, ok. include is used to mix a module into another module or class
<waxjar> not to load files
<shevy> micsha as the name of a module must start with upcased character, (Foo) never works. where from does the ( come
<JohnTeddy> thanks heftig
<shevy> [code]include Ex25[/code]
<micsha> following the learn ruby the hard way tutorial
<waxjar> to load files you use require 'filename' or load 'filename.rb'
<shevy> micsha: that could explain it. as far as I know the author who wrote it left ruby in a ragequitting fashion
BrianJ has joined #ruby
<micsha> I was trying to seperate my code from sentance, upon further review that may have made things more confusing
<heftig> JohnTeddy: not the most performant option, though
<micsha> hahah, great.
<micsha> so, now I have to look up this backstory
<shevy> micsha, just notice the difference - require 'filename', it is using '' you see? include does not use '', it uses just: include NameOfModule
<shevy> so if your module is inside foo.rb, and is also named Foo, then you could do: require 'foo.rb'; include Foo but also require 'foo'; include Foo, but never require foo; include 'Foo'
<micsha> oh, ok, but as long as i have Ex25.rb and not ex25.rb it should be ok?
<shevy> hehehe the filename does not matter
<shevy> the name of your module matters!
<micsha> hmm
xorigin has joined #ruby
<waxjar> micsha, with include 'ex25.rb', are you trying to load the code in that file?
<micsha> gimme a second, I have to read this through again.
<shevy> if you want to you can call your filename 'i_hate_ruby.rb' and inside put: module Ex25; end
Guest5820 is now known as sts
xorigin has left #ruby [#ruby]
<micsha> waxjar: yes, I'm trying to load the code in the file into irb.
Beoran__ has joined #ruby
carlyle_ has joined #ruby
<micsha> ooooh! I get it!
clj_newb has joined #ruby
Beoran_ has quit [Read error: Operation timed out]
<waxjar> Ruby uses require 'filename' (to require once) or load 'filename.ext' (to load a file a second, third, etc time)
<micsha> I have to require the file and then I have to tell irb, all of the code in the required file to be included in the code, right?
kbeddingfield has quit [Remote host closed the connection]
<shevy> micsha, yeah
<shevy> well
nanderoo has quit [Quit: Leaving.]
<shevy> require alone works for that
<shevy> include is used if you want to include a module into your class, for instance
<micsha> ok, so why even have include, then?
<shevy> you can avoid scoping via Foo:: in that case
<shevy> all methods will be pulled into your class
<waxjar> here's an example micsha: https://gist.github.com/4127470
<shevy> module Foo; def test; puts 'testing'; end; end; class Bar; include Foo; end
stephenjudkins has quit [Quit: stephenjudkins]
<shevy> Bar.new.test # => "testing"
<micsha> ooh.
<micsha> that's the feature where you can break open classes and add to them with modules and such, then, huh?
<micsha> or am I missing the point on that one.
<_bart> Hi, I'm using Geocoder, but when I do this, I get NaN: item.shop.distance_to([params[:lat], params[:lng]])
<waxjar> yep, mixins they're called
<micsha> huh... that's kinda neat.
<_bart> ah nevermind, mistyped
bradhe has quit [Remote host closed the connection]
<micsha> mixins == modules?
<micsha> kind of? not really?
<reactormonk> micsha, require is for files, include is for namespaces
<reactormonk> micsha, exactly the same.
<waxjar> essentially, yes. modules can be used as mixing (when you include them into another Module or Class, people call them mixins)
<waxjar> *mixins
fantazo has joined #ruby
statarb3 has quit [Quit: Leaving]
v0n has joined #ruby
<micsha> oh! so, I can have one file pull code from another file and use it's code, but I'd have to go Requiredfile.method, where if I included it I could just have the new namespace and call it as if it where in the current namespace?
danneu has quit [Ping timeout: 252 seconds]
clj_newb has quit [Ping timeout: 246 seconds]
<reactormonk> micsha, yep. You can also add callbacks for includes, so it's not entirely transparent
<waxjar> when you require a file, it's code is just available everywhere
<waxjar> require 'ex25'; Ex25.some_method would also work
verto|off is now known as verto
<waxjar> it doesn't matter in what file you put the code
<reactormonk> waxjar, it does, every file has its own main. But if you work in modules (which includes classes), it's globally available
verto is now known as verto|off
<waxjar> ah yea, that's true
<waxjar> module names and whatnot are not linked to filenames though, i think maybe that's what confusing you micsha?
<micsha> neat! I think I get it now. thanks!
<micsha> YES!
<micsha> exactly
<micsha> I'm used to
<micsha> #include <stdio.h>
<swarley> Now to really confuse you, you can load 'file', :Herp
<_bart> Using https://github.com/alexreisner/geocoder, how do I turn a set of long/lat into an address?
etcetera has joined #ruby
<reactormonk> swarley, which does?
<micsha> printf("some stuf %d", integervar)
<_bart> I know it can do stuff to models, but I want it to run it just on some params values.
<swarley> reactormonk; loads file 'file' within a module of name Herp
<micsha> and just having that like it's part of the file and not having to worry about namespaces and stuff.
<reactormonk> micsha, that's the convention - but people may break it
<swarley> avoids pollution of the global namespace
<reactormonk> swarley, so main is the module?
<swarley> yes
<reactormonk> and namespaces are relative to main?
hoelzro is now known as hoelzro|away
<swarley> main is just an object
<waxjar> that's very neat swarley, i didn't know that
<swarley> Object*
v0n has quit [Ping timeout: 244 seconds]
<micsha> reactormonk: I guess I'll have to cross that bridge when I come to it.
<micsha> Thanks for your help, guys.
<reactormonk> micsha, did it, where this kind of code split made more sense
fuho has joined #ruby
<swarley> err
<swarley> sorry, i was wrong
<swarley> the module isnt named
<swarley> It's anonymous
<swarley> Hm, maybe i should write code that imports it named
<swarley> That would be all of, two lines
<micsha> reactormonk: yes, it helped, I'll probably have more questions about it later, but it's more clearn to me now.
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
<reactormonk> swarley, looks like rb_load_internal doesn't return the module it loads?
clj_newb has joined #ruby
<swarley> reactormonk; yeah, it turns out i remembered incorrectly
<swarley> But the gist i just pasted would effectively do the same
<micsha> ok, when I see something like Name1::Name2 what does the :: mean? Is that delimiting namespaces?
<reactormonk> swarley, except you should check for valid syntax before evaling
<swarley> reactormonk; it will do that on its own in eval
<reactormonk> swarley, do it pry-style
<swarley> well, not with my addition of the module
<swarley> Pry does it with eval ;)
<reactormonk> that's why I said pry-style
<swarley> and throw catch
<Beoran__> :: is constant lookup
<Beoran__> micsha,
<reactormonk> micsha, yes.
<swarley> :: looks up definitions under a namespace
<Beoran__> or class method lookup
<reactormonk> micsha, note that you can also call methods this way Name1::method()
<swarley> don't use :: for class methods though
seeingidog__ has quit [Quit: Leaving.]
<swarley> It will break syntax hilighting and it's better to stay consistent with dot syntax
<Beoran__> t's not really namecpaces though, since ruby has no explicit namespaces. More loike look up in a class of module
dedis has joined #ruby
cirwin has joined #ruby
sullenel has quit [Quit: Leaving.]
<swarley> the thing i love most about ruby are the paradoxes
<swarley> [5] pry(main)> Class.is_a? Module
<swarley> => true
<swarley> [6] pry(main)> Module.is_a? Class
<swarley> => true
<micsha> ok, so that would be like the 'path' the interpreter would take.
bradhe has joined #ruby
workmad3 has joined #ruby
<swarley> micsha; in reference to what?
nkts has joined #ruby
<swarley> Something like Foo::Bar.baz
<swarley> ?
mityaz has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
<swarley> That's like saying, Foo.const_get(:Bar).method(:baz).call (just much prettier)
Guest92676 has quit [Quit: Guest92676]
yshh has joined #ruby
dekroning has quit [Read error: Connection reset by peer]
<Beoran__> class Foo ; def self.bar ; return "bar" ; end ; Const = 7 ; end ; puts Foo::bar ; puts Foo::Const
dekroning has joined #ruby
<Beoran__> will print bar 7
davidcelis has joined #ruby
dedis has quit [Remote host closed the connection]
jphpsf has joined #ruby
alexshenoy has joined #ruby
u89 has quit [Read error: Connection reset by peer]
seeingidog__ has joined #ruby
v0n has joined #ruby
<Beoran__> so to be short if you see Foo::Bar (second is upper case, then it's equivalent to .const_get(:Bar) and if it's lowercase like Foo::bar it's equivalent to .method(:bar)
vlad_starkov has quit [Remote host closed the connection]
<Beoran__> So that's why I call :: the lookup operator, not the namespace one.
sailias has quit [Quit: Leaving.]
<micsha> sorry, I had to take care of something.
F1skr has quit [Quit: WeeChat 0.3.9.2]
banisterfiend has joined #ruby
jackiechan0 has quit [Quit: Sto andando via]
<Beoran__> no problem
danneu has joined #ruby
<banisterfiend> Beoran__: have you been to brugges?
<Beoran__> the special case that is if you do :: without anything in front of it, it means the ytop-level scope, which is the "main" scope
<Beoran__> banisterfiend, yes
<Beoran__> why you ask?
tommyvyo has quit [Quit: Computer has gone to sleep.]
dangerousdave has joined #ruby
iamjarvo has quit [Quit: Computer has gone to sleep.]
jlwestsr has joined #ruby
swarley has quit [Read error: Connection reset by peer]
emanu has joined #ruby
<micsha> Beoran: thanks for the explination, I don't think I'm far enough along just yet to understand it but it makes a little more sense now.
cardoni has joined #ruby
dekroning has quit [Quit: leaving]
swarley has joined #ruby
freezway has joined #ruby
kennyvb has quit [Ping timeout: 260 seconds]
atno is now known as atno|SoA
tenmilestereo has quit [Quit: Leaving]
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
jrajav has quit [Quit: I tend to be neutral about apples]
kennyvb has joined #ruby
Zai00 has joined #ruby
yshh has quit [Remote host closed the connection]
Zai00 has quit [Client Quit]
davidcelis has quit [Quit: K-Lined.]
v0n has quit [Ping timeout: 244 seconds]
havenn has quit [Ping timeout: 250 seconds]
kennyvb has quit [Ping timeout: 252 seconds]
[Neurotic] has joined #ruby
dedis has joined #ruby
havenn has joined #ruby
lenovodroid has joined #ruby
<npx> Once you know the way broadly, you can see it in all things.
<npx> --Miyamoto Musashi
dangerousdave has quit [Quit: Leaving...]
becom33 has joined #ruby
dedis has quit [Remote host closed the connection]
<micsha> havenn, I just want you to know how much I approve of your naming conventions
shakesoda has joined #ruby
Xeago has joined #ruby
davidcelis has joined #ruby
kennyvb has joined #ruby
nwertman has joined #ruby
<shevy> npx hah that reminds me... some scientist once said that a problem needs to be looked at from all sides / multiple angles
F1skr has joined #ruby
vlad_starkov has joined #ruby
<micsha> so, the :: is how you traverse namespaces within files. Is this correct?
<micsha> or namespaces within namespaces, rather.
nwertman has quit [Ping timeout: 260 seconds]
BigO has quit [Remote host closed the connection]
<shevy> micsha you use :: for scoping
diegoviola has quit [Ping timeout: 256 seconds]
<shevy> Foo::Bla::Ble.new
<shevy> module Foo; module Bla; class Ble
parzorep has joined #ruby
anachronistic has quit [Quit: anachronistic]
<shevy> you see?
parzorep has quit [Client Quit]
<shevy> you could not have many other ways
<shevy> what would you wanna use... Foo.Bla.Ble.new perhaps
fms has joined #ruby
KevinSjoberg has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<shevy> FooBlaBle - not possible to distinguish
<shevy> with module FooBlaBle
<shevy> or PHP style... via ... what did they use? \ or something
yshh has joined #ruby
<micsha> oh, ok, thanks shevy.
<waxjar> php uses -> and :: i believe
<micsha> not sure, shevy, I've never written php.
<micsha> which I'm to understand is probably a good thing.
alexshenoy has quit [Quit: alexshenoy]
emanu has quit [Ping timeout: 276 seconds]
cardoni has quit [Quit: cardoni]
jackiechan0 has joined #ruby
g0rd0n has joined #ruby
<g0rd0n> i installed ruby 1.9.1 but gem still complainsi don't have ruby 1.9 for installing a package... how do i tell gem to actually use ruby 1.9?
<shevy> micsha, I used to write PHP, but I abandoned it for the better looking girl
<shevy> her name was ruby
<micsha> haha
<shevy> g0rd0n do you use debian
nomenkun has joined #ruby
<shevy> second information you should provide is - how exactly did you install ruby
dinkytoy has quit [Ping timeout: 245 seconds]
<waxjar> php got the job done i guess but it taught me so much bad conventions
<g0rd0n> shevy: yes
<shevy> third information, afterwards, would be the precise error you get in that gem g0rd0n
<micsha> shevy: Probably for the best. That thing is, apparently, an abomination.
vlad_starkov has quit [Ping timeout: 244 seconds]
<g0rd0n> shevy: i did apt-get install ruby1.9
<shevy> I suspected it was debian - the world is a small place after all :-)
<shevy> yup
<shevy> debian hates ruby
<g0rd0n> i know
fms is now known as ebobby
<g0rd0n> makes me hate ruby too :(
<shevy> hehe
elux has joined #ruby
<shevy> there is nothing wrong with ruby as such
<shevy> but I compile from source, so I dont get issues that debian users have
undersc0re97 has quit [Remote host closed the connection]
<shevy> g0rd0n, I suspect that apt-get install ruby1.9 does not give you the .h header files
<shevy> since debian policy is to cripple everything
<g0rd0n> shevy: i guess i could install ruby1.9-dev
<shevy> micsha, yeah but php is more widespread :\
<g0rd0n> oops i meand shevy
<shevy> g0rd0n, yeah. then you should be able to compile extensions natively that use ruby-c
<shevy> g0rd0n, problem is still, debian modified gem, and as such some gems may not work properly
<shevy> g0rd0n, Hanmac here uses ubuntu and knows a lot
BigO has joined #ruby
<shevy> he will know what to do
<havenn> g0rd0n: Using ruby-build with chruby is my fav method to install and manage Ruby on Ubuntu. RVM is a really popular alternative.
joeycarmello has joined #ruby
<micsha> g0rd0n, you should probably get the current ruby build from the site, there are some bugfixes in there that are kind of nice.
nemesit has joined #ruby
dakine has joined #ruby
<havenn> g0rd0n: chruby is like 80 lines of code for managing the annoying env variables that need to be set, and ruby-build takes some of the pain away from common builds.
<g0rd0n> i guess the problem is i still ahve tuby 1.8.7 on the system, if i do ruby -v i get 1.8.7
BigO has quit [Disconnected by services]
Xeago has quit [Remote host closed the connection]
<g0rd0n> so i guess i should switch the interpreter somehow
<Beoran__> unforunately, debian's (and hence all other debian based distros like ububtu) 's packaging of ruby isn't very useful. You're almost forced to build ruby yourself.
itchyouch_ has joined #ruby
<micsha> which isn't really all that hard.
BigO_ has joined #ruby
<Beoran__> g0rd0n, that's why thre is rvm the ruby version manager and other alternatives to it
<havenn> g0rd0n: Set the Ruby you want to use: https://github.com/postmodern/chruby
<micsha> uninstalling it is kind of a pain, though.
<havenn> g0rd0n: Options in decreasing order of footprint are: RVM, rbenv, rbfu, and chruby.
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<shevy> or compile from the source :-)
v0n has joined #ruby
<havenn> micsha: Just rm -rf the install dir?
<shevy> g0rd0n, the source URLs are ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.bz2 and ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p358.tar.bz2
<micsha> no, you have to pulls some files out of /usr/local/bin I think
<shevy> g0rd0n, you would need readline-dev zlib-dev ... openssl-dev... and for 1.9.3 you also need libyaml (source would be: http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz)
<micsha> I mean, yeah, you rm -rf the install directory but you also have to go through the makefile and find out where it moves files to and rm those as well but it's not that bad, it's a smallish makefile
kbeddingfield has joined #ruby
<shevy> g0rd0n, all of which you would never need if debian would give you a simple choice to never cripple packages. but their mandatory policy is "we are a server OS, and people should not compile because they are idiots anyway, so we don't provide .h files for them in an easy way"
<micsha> it's not like building named or anything.
<shevy> and the best thing is... the different distributions name their dev-packages differently, for no reason at all
undersc0re97 has joined #ruby
undersc0re97 has joined #ruby
undersc0re97 has quit [Changing host]
h4mz1d has joined #ruby
itchyouch has quit [Ping timeout: 240 seconds]
itchyouch_ is now known as itchyouch
<micsha> you're all touching on a bunch of reasons I don't prefer linux.
<shevy> micsha, or you compile into a standalone directory
<havenn> shevy: I may have dreamt it, but I swear Debian was going to update to a modern Ruby and RubyGems in an upcoming distro - should come downstream to Ubuntu!
itchyouch has quit [Client Quit]
<shevy> linux is ok-ish, it's just that the distributions fight one another
<micsha> I haven't done that, but I don't see why you couldn't
ryanlecompte has quit [Remote host closed the connection]
ryanlecompte has joined #ruby
<micsha> yeah, and they don't have much uniformity across the different distrobutions, it's kind of irritating.
<micsha> I stick to *BSD if I can.
<shevy> havenn, yeah. well it is possible to have a good environment in default debian or ubuntu just as well, Hanmac is an example for that... just that 80% of the people who use debian will never know how to do that
<shevy> Hanmac uses only debian-ruby stuff! (or ubuntu... almost the same thing for me)
<micsha> really quick question
<micsha> puts("stuff")
<micsha> or
<micsha> puts "stuff"
<havenn> micsha: The latter.
<micsha> why?
<havenn> micsha: Less cruft.
<micsha> is it more common to see the puts "stuff" rather than puts("stuff")?
<shevy> micsha, both will work but most people will prefer the one without parens
<havenn> More readable. I usually prefer no parens unless it breaks the interpreter. :P
joeycarmello has quit [Remote host closed the connection]
<shevy> micsha, yeah
<micsha> k, sticking to puts "stuff" from now on.
answer_42 has quit [Remote host closed the connection]
<shevy> micsha, especially for puts
<havenn> micsha: Much more common to see without parens.
kbeddingfield has quit [Ping timeout: 245 seconds]
<micsha> k, thanks again.
<shevy> with method invocations, it's 50-50
skaczor has quit [Remote host closed the connection]
<shevy> some people like to do object.foo('bla'), some prefer object.foo 'bla'
<shevy> or foo('bla') vs foo 'bla'
<shevy> even if defines...
Trioke has quit [Ping timeout: 260 seconds]
<shevy> def foo bla
<shevy> vs
<havenn> micsha: To use no parens at all is sometimes known as "Seattle Style" since many of their libs use no parens. There are different opinions but nobody uses them for #puts.
<shevy> def foo(bla)
MasterIdler has joined #ruby
<shevy> the difficulty of choice :-)
tchebb_ has joined #ruby
joeycarmello has joined #ruby
workmad3 has quit [Read error: Operation timed out]
<micsha> as a C programmer I kind of like them around most things.
ryanf has joined #ruby
<micsha> puts is the only thing I've been on the fence about.
<shevy> micsha, you can do this: alias e puts
Russell^^ has quit [Quit: Russell^^]
<shevy> e 'hello world'
<JohnTeddy> https://gist.github.com/4128078 ... instead of doing x[0..99] how can I make 99 the end of the string or infinity?
<JohnTeddy> actually I guess I can do x.length
<micsha> I actually don't like useing that feature.
<micsha> i've seen it with p "stuff"
<micsha> I see that as not enough
<micsha> I can see cutting things down.
<shevy> p is different though, I think it calls the method .inspect on the object
<shevy> puts calls .to_s
<micsha> I mean, I don't love writing printf("%d", int_var); a whole bunch of times but, just p isn't enough.
medik has joined #ruby
medik has quit [Excess Flood]
<shevy> ruby has sprintf too! :) or the shorter variant...
medik has joined #ruby
xclite has quit [Remote host closed the connection]
<shevy> '%3s' % '1' # => ' 1'
<micsha> printf() and sprintf() i think, yeah.
tchebb_ has quit [Client Quit]
seeingidog__ has quit [Quit: Leaving.]
<havenn> JohnTeddy: #each is the way to do it, but if you wanted to go to inifinity: (1..Float::INFINITY).each { |n| puts n }
<micsha> when I found that out, I printf'd all the things.
<shevy> x = "hi there"; '%15s' % x # => " hi there"
iamjarvo has joined #ruby
hsbt_away is now known as hsbt
booginga has quit [Quit: This computer has gone to sleep]
zemanel has quit [Quit: Remote hottie closed the connection]
stephenjudkins has joined #ruby
<micsha> there's a guy here that has a huge white beard, I asked him if he was a unix admin, he looked at me, rather befuddled and asked me what that was.
Russell^^ has joined #ruby
<micsha> no clue what I was talking about.
<banisterfiend> micsha: he must be a geologist
<havenn> ∞ = Float::INFINITY; 1.upto(∞).each &method(:puts)
<banisterfiend> geology-beards are even more impressive than unix beards
<micsha> do geology beards go down and out?
<havenn> banisterfiend: Reminds me of: http://www.malevole.com/mv/misc/killerquiz/
<havenn> banisterfiend: They should add Geologist as an alternative comparison.
cantonic has joined #ruby
etcetera has quit [Quit: Computer has gone to sleep.]
<banisterfiend> havenn: hehe i assum eu've seen "professor or hobo?"
<havenn> banisterfiend: Oooh, no - that sounds like a hard one!
g0rd0n has quit [Quit: Leaving]
seeingidog__ has joined #ruby
<banisterfiend> havenn: i would get u the link but my internet is being a cunt, if you google it, it'll come up soon though
Morkel has quit [Quit: Morkel]
chococrois has joined #ruby
h4mz1d has quit [Ping timeout: 246 seconds]
jeffreybaird has quit [Quit: jeffreybaird]
chococrois has quit [Max SendQ exceeded]
<micsha> hahah! banisterfiend: I got 8/10!
<micsha> professor... professor... hobo... professor... student?
<havenn> 7/10 here
<micsha> I love the things you find on IRC.
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
<JohnTeddy> https://gist.github.com/4128078 .. my translate method currently fails for 'stupid', it turns it into tupiday, when it should be upidstay. What is a good way to have this method repeat the cycle I have until a vowel is included in the first character?
theoldroadhog has quit [Quit: Leaving.]
chococrois has joined #ruby
<havenn> JohnTeddy: For your vowels, it would be nice to do: %w[ a e i o u]
chococrois has quit [Max SendQ exceeded]
<havenn> %w[ a e i o u ] **
<JohnTeddy> havenn: Do you have a ruby docs link on what that is?
<JohnTeddy> Or a search term
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
elux has quit [Quit: Bye!]
becom33 has quit [Ping timeout: 265 seconds]
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
bradhe has quit [Remote host closed the connection]
chococrois has joined #ruby
bluOxigen has quit [Ping timeout: 264 seconds]
chococrois has quit [Max SendQ exceeded]
senj has joined #ruby
eroc has joined #ruby
<JohnTeddy> havenn: How does that help with my multiple consonant in the beginning of a word problem? Or is that just an alternative to the way I have my array variable now?
<havenn> JohnTeddy: Doesn't help with your problem, sry - just an aside.
chococrois has joined #ruby
mib_mib has quit [Ping timeout: 245 seconds]
chococrois has quit [Max SendQ exceeded]
trey_ has joined #ruby
trey_ has quit [Remote host closed the connection]
Xeago has joined #ruby
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
jrajav has joined #ruby
invisime has quit [Quit: Leaving.]
rouss has joined #ruby
itchyouch has joined #ruby
cardoni has joined #ruby
rouss is now known as Guest30495
chococrois has joined #ruby
cakehero has joined #ruby
chococrois has quit [Max SendQ exceeded]
thinkdevcode has quit [Remote host closed the connection]
neersighted has joined #ruby
v0n has quit [Ping timeout: 244 seconds]
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
tchebb_ has joined #ruby
banseljaj is now known as imami|afk
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
theRoUS has quit [Read error: Operation timed out]
robustus has quit [Ping timeout: 255 seconds]
jaygen_ has quit [Remote host closed the connection]
chococrois has joined #ruby
nicoulaj has quit [Remote host closed the connection]
chococrois has quit [Max SendQ exceeded]
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
atno|SoA is now known as atno
g-ram has quit [Quit: Computer has gone to sleep.]
Steppen has joined #ruby
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
jds has joined #ruby
tchebb has quit [Quit: Leaving.]
tchebb_ is now known as tchebb
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
jphpsf has quit [Ping timeout: 244 seconds]
segv_ has quit [Quit: segv_]
jrajav has quit [Read error: Connection reset by peer]
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
jrajav has joined #ruby
chococrois has joined #ruby
alexshenoy has joined #ruby
chococrois has quit [Max SendQ exceeded]
tchebb has quit [Quit: ZNC - http://znc.in]
tchebb has joined #ruby
chococrois has joined #ruby
ikaros has quit [Quit: Ex-Chat]
jlwestsr has quit [Ping timeout: 246 seconds]
[2]micsha has joined #ruby
carlyle_ has quit [Remote host closed the connection]
becom33 has joined #ruby
<[2]micsha> thought you guys might be interested in this.
juarlex_ has quit [Remote host closed the connection]
Goles has quit [Remote host closed the connection]
micsha has quit [Ping timeout: 255 seconds]
[2]micsha is now known as micsha
<shevy> micsha yeah that was his ancient rant
<shevy> soon it's 5 years old, kinda outdated
devdazed has quit [Quit: Bye]
<shevy> active software always changes as time goes by
froy has quit [Quit: kablam!]
jrajav has quit [Quit: I tend to be neutral about apples]
<JohnTeddy> havenn: translate("eat pie"), expected: "eatay iepay" got: "eatay ayiepay" (using ==)
Steppen has quit [Quit: Leaving]
v0n has joined #ruby
jenrzzz has joined #ruby
love_color_text has joined #ruby
gyre007 has joined #ruby
Trioke has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
<havenn> JohnTeddy: Hard to read iepay, it is Irish style Ayeipay! Aye?
mikepack has joined #ruby
jds has quit [Remote host closed the connection]
<shevy> man
<shevy> is this drunk-language or what JohnTeddy
<shevy> al bundy speak
itchyouch has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
cakehero has joined #ruby
<JohnTeddy> shevy: https://github.com/alexch/learn_ruby (see 04)
afgeneralist has quit [Ping timeout: 252 seconds]
jlwestsr has joined #ruby
ikaros has joined #ruby
sepp2k has quit [Remote host closed the connection]
w400z has joined #ruby
daniel_- has joined #ruby
[1]micsha has joined #ruby
phantasm66 has quit [Quit: *sleeeeep*]
micsha has quit [Ping timeout: 276 seconds]
[1]micsha is now known as micsha
mikeg has quit [Ping timeout: 260 seconds]
kbeddingfield has joined #ruby
Goles has joined #ruby
stephenjudkins has left #ruby [#ruby]
jphpsf has joined #ruby
kbeddingfield has quit [Read error: Operation timed out]
stephenjudkins has joined #ruby
nemesit has quit [Quit: Linkinus - http://linkinus.com]
_nitti has quit [Remote host closed the connection]
nemesit has joined #ruby
gyre007 has quit [Remote host closed the connection]
cakehero has quit [Quit: Computer has gone to sleep.]
[1]micsha has joined #ruby
micsha has quit [Ping timeout: 252 seconds]
[1]micsha is now known as micsha
stephenjudkins has quit [Quit: stephenjudkins]
CaptainJet has quit []
<JohnTeddy> How can I search a string and find the first instance of a letter in that string that is in an array?
<banisterfiend> JohnTeddy: string.chars.find_index { |v| array.include?(v) }
dedis has joined #ruby
<JohnTeddy> banisterfiend: Thanks!
<banisterfiend> JohnTeddy: that returns the index of the char which is found int he arry
applesarefruits has quit [Ping timeout: 264 seconds]
micsha has quit [Client Quit]
gyre007 has joined #ruby
nemesit has quit [Quit: Leaving...]
dedis has quit [Remote host closed the connection]
joeycarmello has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
joeycarmello has joined #ruby
iamjarvo has quit [Quit: Computer has gone to sleep.]
mikeg has joined #ruby
dedis has joined #ruby
chococrois has quit [Read error: Connection reset by peer]
Guest30495 has quit [Quit: Computer has gone to sleep.]
staafl has quit [Read error: Connection reset by peer]
emanu has joined #ruby
staafl has joined #ruby
joeycarmello has quit [Ping timeout: 255 seconds]
cascalheira has joined #ruby
x82_nicole has quit [Quit: Textual IRC Client: www.textualapp.com]
alanp_ has quit [Read error: Connection reset by peer]
chococrois has joined #ruby
alanp has joined #ruby
chococrois has quit [Max SendQ exceeded]
seeingidog__ has quit [Quit: Leaving.]
BigO_ has quit [Remote host closed the connection]
blacktulip has quit [Remote host closed the connection]
nari has joined #ruby
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
love_color_text has quit [Remote host closed the connection]
chococrois has joined #ruby
gyre007 has quit [Remote host closed the connection]
chococrois has quit [Max SendQ exceeded]
mascool_ has joined #ruby
bwlang has left #ruby [#ruby]
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
Zolrath has joined #ruby
mascool has quit [Ping timeout: 255 seconds]
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
pyx has quit [Quit: WeeChat 0.3.9.2]
MasterIdler_ has joined #ruby
MasterIdler_ has quit [Client Quit]
tomsthumb has joined #ruby
solidoodlesuppor has quit [Remote host closed the connection]
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
dakine has quit [Quit: Leaving]
MasterIdler has quit [Ping timeout: 240 seconds]
postmodern has joined #ruby
v0n has quit [Ping timeout: 244 seconds]
joofsh has quit [Ping timeout: 240 seconds]
havenn has quit [Remote host closed the connection]
g-ram has joined #ruby
voodoofish430 has quit [Quit: Leaving.]
afgeneralist has joined #ruby
gcds has quit [Quit: gcds]
mikepack has quit [Remote host closed the connection]
nomenkun has quit [Remote host closed the connection]
applesarefruits has joined #ruby
cascalheira has quit [Quit: Leaving...]
i_s has joined #ruby
nwertman has joined #ruby
applesarefruits has quit [Ping timeout: 240 seconds]
judd7 has joined #ruby
icole has quit [Remote host closed the connection]
seeingidog__ has joined #ruby
xnm has quit [Ping timeout: 244 seconds]
nwertman has quit [Ping timeout: 255 seconds]
gridapho` has joined #ruby
jjang has joined #ruby
gridapho` is now known as gridaphobe`
tbrock has joined #ruby
stopbit has quit [Quit: Leaving]
c0rn has quit [Quit: Computer has gone to sleep.]
gridaphobe has quit [Ping timeout: 260 seconds]
<JohnTeddy> hehehe
seanstickle has joined #ruby
DaZ has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 252 seconds]
anachronistic has joined #ruby
v0n has joined #ruby
c0rn has joined #ruby
lenovodroid has quit [Ping timeout: 248 seconds]
afgeneralist has quit [Ping timeout: 276 seconds]
CaptainJet has joined #ruby
seeingidog__ has quit [Quit: Leaving.]
<JohnTeddy> damn, I am failing the 'qu' corner case. https://github.com/alexch/learn_ruby/tree/master/04_pig_latin
love_color_text_ has quit [Remote host closed the connection]
love_color_text has joined #ruby
bigmac has joined #ruby
etcetera has joined #ruby
frem has quit [Quit: Computer has gone to sleep.]
seeingidog__ has joined #ruby
maletor has joined #ruby
Virunga has quit [Remote host closed the connection]
<maletor> I have an array of array list this https://gist.github.com/6e399420e76287face2b I need to get the first element of one of them given the second.
Trioke has quit [Quit: Lost terminal]
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
kbeddingfield has joined #ruby
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
<lethjak__> hey, is there any way to get ruby to stop dropping my prepending zero? I have a 01, and it drops it
<lethjak__> so it just looks like 0
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
jrajav has joined #ruby
<seanstickle> maletor: Hash[SALUTATION].invert[value]
<seanstickle> lethjak__: make it a string
Sharcho has joined #ruby
seeingidog__ has quit [Quit: Leaving.]
<lethjak__> how do I do that?
nari has quit [Ping timeout: 244 seconds]
chococrois has joined #ruby
kbeddingfield has quit [Ping timeout: 255 seconds]
chococrois has quit [Max SendQ exceeded]
<seanstickle> lethjak__: provide an example of your code that is a problem
<maletor> seanstickle: thanks. that's elegant
<JohnTeddy> woo, I fixed it. https://gist.github.com/4128264 -> 8 examples, 0 failures Finished in 0.00253 seconds
<seanstickle> maletor: sure thing
<lethjak__> oldsku = $product_series + "-" + writingCSV[5]
<lethjak__> the end array isnt' printing the 0
<seanstickle> lethjak__: wow, there is all sorts of stuff wrong there.
<JohnTeddy> Thanks banisterfiend
chococrois has joined #ruby
<lethjak__> like what?
<seanstickle> What makes you think that writingCSV[5] has a prepended "0" ?
<lethjak__> seanstickle: I'm grabbing the first two, it's in the file
<seanstickle> Provide an example of the file.
<lethjak__> it exists for everything that isn't double digit
piotr_ has quit [Ping timeout: 248 seconds]
<lethjak__> I'm using the csv parser
<lethjak__> 01 - CABINET PARTS
arya has joined #ruby
<seanstickle> Wait, so $product_series has the number in it?
<seanstickle> How about this … pastie.org your code
<seanstickle> So we don't have to guess
gyre007 has joined #ruby
Sharcho has quit [Quit: Leaving]
chococrois has quit [Read error: Connection reset by peer]
jlast has quit [Remote host closed the connection]
chococrois has joined #ruby
avelldiroll has joined #ruby
chococrois has quit [Max SendQ exceeded]
bigmac_ has joined #ruby
ninegrid has quit [Read error: Connection reset by peer]
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
<JohnTeddy> https://gist.github.com/4128264 .. can someone comment on my code. It works.. I'm just learning.. would experienced ruby coders think the way that is written is absurd/bad?
chococrois has joined #ruby
chococrois has quit [Max SendQ exceeded]
bigmac has quit [Ping timeout: 240 seconds]
ffranz has quit [Quit: Leaving]
<lethjak__> I fixed it, I cast it to a int, added the 0 with "%02d" % and cast it back to a string
<lethjak__> thanks for the help though :)
slainer68 has joined #ruby
<jrajav> JohnTeddy: That line is way too long
<jrajav> JohnTeddy: Don't use ternaries like that