g-ram has quit [Quit: Computer has gone to sleep.]
<mklappstuhl>
heftig, I'm open to other suggestions
buibex has quit [Remote host closed the connection]
<heftig>
mklappstuhl: i assume the cover image always has the same path inside the epub?
x82_nicole has joined #ruby
<mklappstuhl>
heftig, It does not
<heftig>
so how do you discover it?
<mklappstuhl>
by parsing some other files within the epub
rezzack has quit [Quit: Leaving.]
Michael_ has joined #ruby
<heftig>
that gets you the filename you want
<heftig>
so what are you missing?
buibex has joined #ruby
xclite has quit [Remote host closed the connection]
rezzack has joined #ruby
dross has joined #ruby
TheNumb has joined #ruby
chimkan_ has quit [Quit: chimkan_]
cakehero has joined #ruby
TheNumb has quit [Changing host]
TheNumb has joined #ruby
<mklappstuhl>
heftig, how would I make this file easily accessible without showing the zip stuff that happens in the background?
punkrawkR^Home has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
<heftig>
accessible as what?
<heftig>
just a data stream?
xkx has joined #ruby
wargasm has joined #ruby
robbyoconnor has joined #ruby
<mklappstuhl>
heftig, yeah, maybe that might be a good option. just in a way that makes persistence of that file at another place possible
nari has quit [Ping timeout: 245 seconds]
<heftig>
eh, IMO just expose the ZipInputStream
ephemerian has left #ruby [#ruby]
<heftig>
if you can't, you need to wrap it in a custom object that just delegates read and stuff
byennen has joined #ruby
jeremywrowe has left #ruby [#ruby]
joshlegs has joined #ruby
<joshlegs>
Spaceghostc2c: heya
<joshlegs>
u around bud?
_alejandro has quit [Remote host closed the connection]
<mklappstuhl>
heftig, I can. but how would I know which file suffix to use then?
<heftig>
if the entry in the zip file doesn't have a usable name, you need to check the contents
gbchaosmaster has joined #ruby
k_sze has quit [Ping timeout: 260 seconds]
robbyoconnor has quit [Ping timeout: 256 seconds]
<Spaceghostc2c>
joshlegs: !
<mklappstuhl>
heftig, does the Zip::ZipInputStream allow me to access this name? the name in the zip file itself is usbale
jds_ has joined #ruby
<joshlegs>
Spaceghostc2c!
<joshlegs>
hey i gotta question about rails. u think you can help?
byennen has quit [Ping timeout: 264 seconds]
grzywacz has quit [Quit: :wq]
<Spaceghostc2c>
joshlegs: Sure, query me.
<joshlegs>
aight
<heftig>
mklappstuhl: No.
R3dy has joined #ruby
elaptics is now known as elaptics`away
buibex has quit [Remote host closed the connection]
dmiller_ has joined #ruby
dmiller has quit [Ping timeout: 246 seconds]
breefield has joined #ruby
falieson has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
_nitti has joined #ruby
x77686d has quit [Quit: x77686d]
<mklappstuhl>
heftig, yeah and thats the whole problem. basically I need to provide two things (the contents and the original name) so that its usable but returning one standard ruby object like File would be nice imho, but apparently thats not possible
gyre007 has joined #ruby
apok has quit [Remote host closed the connection]
BoomCow has left #ruby ["Leaving"]
apok has joined #ruby
g-ram has joined #ruby
_nitti has quit [Ping timeout: 250 seconds]
spanx has quit [Remote host closed the connection]
riley526 has quit [Remote host closed the connection]
banjara has quit [Quit: Leaving.]
yeban has quit [Remote host closed the connection]
spanx_ has joined #ruby
jmeeuwen has quit [Quit: Disconnecting from stoned server.]
yeban_ has joined #ruby
jds_ has quit [Ping timeout: 255 seconds]
kaichanvong has quit [Remote host closed the connection]
ryanf_ has joined #ruby
jmeeuwen has joined #ruby
kaichanvong has joined #ruby
thym has quit [Remote host closed the connection]
Niamkik has quit [Ping timeout: 260 seconds]
byennen has joined #ruby
LouisGB has quit [Ping timeout: 252 seconds]
tbrock has quit [Quit: Computer has gone to sleep.]
ryanf has quit [Ping timeout: 260 seconds]
icole has quit [Remote host closed the connection]
x77686d has joined #ruby
Marius has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
v0n has joined #ruby
thone_ has joined #ruby
bbttxu has joined #ruby
hadees has quit [Quit: hadees]
mybrainis404 has quit [Ping timeout: 260 seconds]
Mon_Ouie has quit [Ping timeout: 260 seconds]
seanstickle has joined #ruby
thone has quit [Ping timeout: 250 seconds]
x77686d_ has joined #ruby
shorne has quit [Ping timeout: 244 seconds]
tomsthumb has quit [Quit: Leaving.]
x77686d_ has quit [Client Quit]
jlast has joined #ruby
seanstickle has quit [Client Quit]
flori has joined #ruby
x77686d has quit [Ping timeout: 260 seconds]
byennen has quit [Remote host closed the connection]
daniel_-_ has quit [Quit: WeeChat 0.3.9.2]
nateberkopec has joined #ruby
rezzack has quit [Quit: Leaving.]
nateberkopec has quit [Client Quit]
daniel_-_ has joined #ruby
daniel_-_ has quit [Client Quit]
skattyadz has quit [Quit: skattyadz]
kbeddingfield has joined #ruby
x0F has joined #ruby
jslowe has quit [Read error: Connection reset by peer]
eykosioux has joined #ruby
qubit has quit [Read error: Operation timed out]
invisime1 has quit [Quit: Leaving.]
_nitti has joined #ruby
boludiko has joined #ruby
kbeddingfield has quit [Ping timeout: 245 seconds]
daniel_-_ has joined #ruby
<boludiko>
hello all
<boludiko>
i'm trying to execute a ruby script on boot
<boludiko>
in a ubuntu 11.10 server
jlast has quit [Remote host closed the connection]
<boludiko>
but it doesnt worl
<boludiko>
work
<boludiko>
anyone can help me?
<JohnTeddy>
boludiko: That sounds more like an Ubuntu question.
<boludiko>
i know how to run scripts on boot
<havenn>
boludiko: Do you have Ruby 1.9.3 installed?
<JohnTeddy>
boludiko: So the script doesn't work when you manually try to execute it now?
<boludiko>
the problem is with ruby
<boludiko>
yes
<havenn>
boludiko: ruby -v
<boludiko>
the script manualy works
<boludiko>
manually
robertondc has joined #ruby
<waxjar>
is it executable and all that?
<boludiko>
yes
<waxjar>
in the path?
<robertondc>
hi people!
<boludiko>
yes
qubit has joined #ruby
<waxjar>
this is where my knowledge ends :p
<boludiko>
xD
<robertondc>
i having some problems with rvm, buts the #rvm channel is unavailable
<robertondc>
when I run ' rvmsudo thin -e production start -p 80' returns 'sudo: thin: command not found'
pyr0commie has quit [Remote host closed the connection]
<JohnTeddy>
waxjar: This sounds like an Ubuntu problem. I would see if you can get anything running on boot. See if you can dump an empty file into /tmp or something.
kbeddingfield has joined #ruby
<JohnTeddy>
er, s/waxjar/ boludiko/
<havenn>
mklappstuhl: Haven't read the whole log, so not at all sure if this actually relates to your problem - but I was curious so i threw together a naive unzip-a-single-file-by-name gist (apologies in advance that this is likely unhelpful :P): https://gist.github.com/4158251
<robertondc>
somebody already have that problem?
<boludiko>
now im trying to save the output from ruby -v with a boot script to check if the version is correct
burntbit has joined #ruby
<havenn>
boludiko: Mmm, could be the script is running before your .bashrc (or whatev) is sourced.
<boludiko>
yes
<boludiko>
this is the problem
<boludiko>
the script tell me the version is 1.9.2p290
<boludiko>
and must be 1.9.2p320
machty has joined #ruby
<havenn>
boludiko: You could source .bashrc (or .zshrc .bash_profile whatev) at the top of the startup Ruby script I suppose. >.>
rezzack has joined #ruby
bigmcq77 has joined #ruby
<havenn>
robertondc: Does this work (no rvmsudo)?: thin -v
<mklappstuhl>
havenn, thanks a lot. actually my code looks similar. I just wanted to make it even simpler
<robertondc>
havenn: for the port 80 no
<mklappstuhl>
havenn, but I gave up on it know so nevermind :)
<robertondc>
havenn: but 300 yes
<robertondc>
ops
<robertondc>
3000
<havenn>
mklappstuhl: Glad you gave up, that was enough .zip for me for one day! :)
<robertondc>
havenn: if I try 'rvmsudo rvm' gives 'sudo: rvm: command not found'
<robertondc>
everything
_nitti has quit [Remote host closed the connection]
troll` has joined #ruby
epochwolf has quit [Quit: Uh no...]
<troll`>
HI
daniel_-_ is now known as daniel_-
<robertondc>
troll`: hi
bjeanes has joined #ruby
<troll`>
Is this the currect channel?
joeycarmello has quit [Remote host closed the connection]
<havenn>
robertondc: Have you?: rvmsudo install thin
<havenn>
** rvmsudo gem install thin
epochwolf has joined #ruby
<troll`>
Why am i here?
daniel_- has quit [Changing host]
daniel_- has joined #ruby
yshh has joined #ruby
<robertondc>
yea
<robertondc>
havenn: sudo: gem: command not found
<troll`>
Guyz i want to be a ruby professional
<robertondc>
troll`: buy a hat! ;)
stkowski has quit [Quit: stkowski]
<troll`>
A ruby hat?
postmodern has joined #ruby
<Sou|cutter>
troll`: put some stickers on your laptop
<troll`>
Ruby stickers?
<havenn>
robertondc: Thin technically *shouldn't* serve up to port 80 directly, as it needs a load balancer like Nginx or Apache. Not sure what the RVM issue is. Is #rvm just empty?
<waxjar>
perhaps it only allows registered nicks
_alejandro has joined #ruby
<robertondc>
waxjar: my nick is registred
<boludiko>
the thing is, how can i get work rvm for root on startup script
love_color_text has quit [Remote host closed the connection]
<troll`>
Does RUBY give me a job?
<robertondc>
havenn: hum
<waxjar>
i can join #rvm robertondc?
notfunk has quit [Read error: Connection reset by peer]
<robertondc>
havenn: So I will install nginx
<troll`>
I want to program in Ruby
<troll`>
TEACH ME TEACH ME!
<havenn>
robertondc: Nice. Thin behind Nginx is a great setup. Puma is my newest fav though: http://puma.io/
<troll`>
I want to be a pro
<boludiko>
working… sudo -u user -i ruby prog.rb
<troll`>
Puma
<troll`>
ha
cakehero has quit [Quit: Computer has gone to sleep.]
nga4 has quit [Read error: Operation timed out]
<troll`>
RUBY RUBY RUBY
<troll`>
RUBY RUBY RUBY
<troll`>
RUBY RUBY RUBY
troll` has quit [Killed (idoru (Spam is off topic on freenode.))]
<robertondc>
havenn: but puma need nginx or apache too?
<havenn>
robertondc: Yes.
atno has quit [Ping timeout: 255 seconds]
boludiko has quit [Quit: boludiko]
<havenn>
robertondc: Unicorn on a single server I think technically doesn't, but always advised.
<havenn>
robertondc: *does its own load balancing*
dmiller_ has quit [Remote host closed the connection]
<robertondc>
havenn: I'm already using thin instead webrick in development
<mklappstuhl>
havenn, yeah. kind of annoying :P
_nitti has joined #ruby
havenn has quit [Read error: Connection reset by peer]
g-ram has quit [Quit: Computer has gone to sleep.]
stephenjudkins has quit [Quit: stephenjudkins]
snorkdude has quit [Quit: snorkdude]
havenn has joined #ruby
<robertondc>
havenn: but I thought that did not need of a loadbalancer like nginx
Monie has quit [Read error: Connection reset by peer]
Monie has joined #ruby
<gbchaosmaster>
gener1c: Not sure if serious results... or subtle Lisp joke.
busybox42 has quit [Ping timeout: 256 seconds]
cakehero has joined #ruby
Monie has quit [Read error: Connection reset by peer]
jlwestsr has quit [Quit: Ex-Chat]
Monie has joined #ruby
tomsthumb has joined #ruby
Monie has quit [Read error: Connection reset by peer]
<gener1c>
gbchaosmaster: i saw the joke but i think its legit, all he had to do is scan github code and turn the statistics into a vidual
<gener1c>
visual*
<seanstickle>
gener1c: "e" has the highest frequency in the English language
steffes has joined #ruby
<gener1c>
makes sense
Monie has joined #ruby
havenn has quit [Read error: Connection reset by peer]
cakehero has quit [Client Quit]
havenn has joined #ruby
havenn has quit [Remote host closed the connection]
ffranz has quit [Quit: Leaving]
Monie has quit [Read error: Connection reset by peer]
<gener1c>
either this is not serious of no one on github uses class variables in ruby
<gener1c>
i mean instance variables
alee- has quit [Ping timeout: 276 seconds]
<gener1c>
no @ sig
joeycarmello has joined #ruby
phantasm66 has joined #ruby
Monie has joined #ruby
atno has joined #ruby
freeayu has joined #ruby
mrsolo has quit [Quit: Leaving]
cakehero has joined #ruby
judd7 has joined #ruby
tommyvyo_ has joined #ruby
googya has joined #ruby
<the_jeebster>
what's the official or most active redis gem for ruby? redis-rb?
eykosioux has joined #ruby
Takehiro has joined #ruby
mneorr has joined #ruby
Monie has quit [Read error: Connection reset by peer]
<waxjar>
haha, that's neat gener1c
h4mz1d has joined #ruby
Monie has joined #ruby
robertondc has quit [Remote host closed the connection]
tyfighter has quit [Quit: tyfighter]
Monie has quit [Read error: Connection reset by peer]
<gbchaosmaster>
This would probably be my keymap if it were actually watching my keystrokes http://i.imgur.com/G6Wcv.png
johnmilton has quit [Remote host closed the connection]
Monie has joined #ruby
cakehero has quit [Client Quit]
eykosioux has left #ruby [#ruby]
daniel_- has quit [Ping timeout: 245 seconds]
Marius has quit []
mneorr_ has joined #ruby
Monie has quit [Read error: Connection reset by peer]
Monie has joined #ruby
kbeddingfield has quit [Remote host closed the connection]
Trioke has quit [Ping timeout: 264 seconds]
mneorr has quit [Read error: No route to host]
ghanima has joined #ruby
<ghanima>
hello all question
Monie has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
Takehiro has quit [Remote host closed the connection]
daniel_- has joined #ruby
<ghanima>
I am trying to calculate the date between 2 objects configured as Time.new
<ghanima>
I want to be able to take the results of each obj and compare the differences between them in seconds and evaluate if the result is over a certain amount of seconds
joeycarmello has quit [Remote host closed the connection]
Takehiro has joined #ruby
reset has quit [Quit: Leaving...]
joeycarmello has joined #ruby
BigO has quit [Remote host closed the connection]
Goles__ has quit [Remote host closed the connection]
ikaros has quit [Quit: Ex-Chat]
mneorr has quit [Ping timeout: 250 seconds]
mneorr has joined #ruby
aces1up has joined #ruby
Michael_ has joined #ruby
<aces1up>
can I do a join on an array where I don't want to join the last element via a seperator, basically I just want the last element appended to string.
<gbchaosmaster>
heftig: Was gonna say that, but [0...-1] expresses its intent clearer IMO.
<gbchaosmaster>
Both are okay, I guess.
<heftig>
i dislike ... if .. can do the same
<heftig>
it's just easy to miss
mneorr has quit [Ping timeout: 255 seconds]
<gbchaosmaster>
Fair enough.
beneggett has quit [Ping timeout: 264 seconds]
Takehiro has quit [Remote host closed the connection]
gregorg_taf has joined #ruby
<gbchaosmaster>
I guess it just goes back to how I process it when I read it. "Slice the first element to the second to last element." vs. "Slice the first element up until the last element."
gregorg has quit [Read error: Connection reset by peer]
statarb3 has quit [Quit: Leaving]
hackerdude has quit [Remote host closed the connection]
yosafbridge has quit [Read error: Operation timed out]
dmiller has quit [Remote host closed the connection]
oddraisin has quit [Ping timeout: 240 seconds]
freakazoid0223 has joined #ruby
Aiur has quit [Quit: Computer has gone to sleep.]
mephux has quit [Ping timeout: 240 seconds]
canton7 has quit [Ping timeout: 246 seconds]
oddraisin has joined #ruby
mukul_d has quit [Quit: mukul_d]
arusso has joined #ruby
yosafbridge has joined #ruby
jgrevich has quit [Read error: No route to host]
mneorr has joined #ruby
atno has quit [Read error: Connection reset by peer]
mephux has joined #ruby
jgrevich has joined #ruby
atno has joined #ruby
apok_ has joined #ruby
sepp2k1 has quit [Remote host closed the connection]
ttt has joined #ruby
daniel_- has quit [Quit: WeeChat 0.3.9.2]
alvaro_o has quit [Quit: Ex-Chat]
tommyvyo_ has quit [Quit: Computer has gone to sleep.]
Elico has joined #ruby
aeontech has quit [Remote host closed the connection]
Hanmac1 has joined #ruby
dmiller has joined #ruby
skaczor has quit [Ping timeout: 255 seconds]
apok has quit [Ping timeout: 260 seconds]
Takehiro has joined #ruby
aeontech has joined #ruby
apok_ has quit [Ping timeout: 240 seconds]
Michael_ has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 246 seconds]
breefield has quit [Quit: breefield]
Michael_ has joined #ruby
mahmoudimus has joined #ruby
justinlilly is now known as justinabrahms
Goles has quit [Remote host closed the connection]
aeontech has quit [Ping timeout: 246 seconds]
Michael_ has quit [Remote host closed the connection]
<the_jeebster>
ruby integer to octal notation? :)
gbchaosmaster has quit [Ping timeout: 260 seconds]
mklappstuhl has quit [Ping timeout: 246 seconds]
mikepack has joined #ruby
Michael_ has joined #ruby
Marius is now known as nkts
gridaphobe has quit [Ping timeout: 250 seconds]
<the_jeebster>
any ideas?
<the_jeebster>
more specifically, integer to ip_address
Dan- has quit [Quit: Leaving...]
Bootstrapper has quit [Remote host closed the connection]
hackerdude has joined #ruby
<seanstickle>
ruby-ip
punkrawkR has quit [Read error: Connection reset by peer]
aeontech has joined #ruby
hackerdude has quit [Remote host closed the connection]
codeFiend has joined #ruby
hackerdude has joined #ruby
lupine has quit [Read error: Operation timed out]
pac1 has joined #ruby
hackerdude has quit [Read error: Connection reset by peer]
hackerdude has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
yellow5 has quit [Ping timeout: 252 seconds]
epochwolf has quit [Ping timeout: 252 seconds]
epochwolf has joined #ruby
yellow5 has joined #ruby
aeontech has quit [Ping timeout: 245 seconds]
codeFiend is now known as aeontech
matti has quit [Ping timeout: 252 seconds]
matti has joined #ruby
matti has quit [Changing host]
matti has joined #ruby
patronus_ has quit [Ping timeout: 240 seconds]
Michael_ has quit [Remote host closed the connection]
lupine has joined #ruby
ryanlecompte has quit [Remote host closed the connection]
hackerdude has quit [Ping timeout: 245 seconds]
ninegrid has quit [Ping timeout: 256 seconds]
patronus_ has joined #ruby
joeycarmello has quit [Remote host closed the connection]
hackerdude has joined #ruby
Michael_ has joined #ruby
breefield has joined #ruby
jds has joined #ruby
ninegrid has joined #ruby
mand__ has joined #ruby
mneorr has quit [Remote host closed the connection]
<the_jeebster>
seanstickle: I see both IPAddr and ruby-ip do ip address to integer, but can either convert from integer to ip?
<the_jeebster>
well I didn't see the Socket::AF_INET scope. excuse me.
<seanstickle>
The thing I posted twice.
<the_jeebster>
but thanks
<seanstickle>
Yeah, I could see how you'd miss that
eka has quit [Remote host closed the connection]
<havenn>
Curious for any feedback... Implemented Futures with Threads and then compare it to Futures with Fork and IChannel: https://gist.github.com/4158708
<the_jeebster>
really not interested in a flame war. thanks, though. guess I won't be asking anymore questions.
bricker has quit [Ping timeout: 246 seconds]
jgrevich has quit [Quit: jgrevich]
kbeddingfield has quit [Remote host closed the connection]
linoj has joined #ruby
arya has joined #ruby
Michael_ has quit [Remote host closed the connection]
jackbrownhf has quit [Quit: Sto andando via]
ryanlecompte has joined #ruby
shiin has quit [Quit: Computer has gone to sleep.]
SCommette has joined #ruby
love_color_text has quit [Remote host closed the connection]
machty has joined #ruby
ryanlecompte has quit [Read error: Connection reset by peer]
cakehero has joined #ruby
arya has quit [Ping timeout: 265 seconds]
gabrielrotbart has joined #ruby
kbeddingfield has joined #ruby
ryanlecompte has joined #ruby
nkts has quit []
cj3kim has joined #ruby
Hanmac has joined #ruby
froy has quit [Quit: kablam!]
zastern has joined #ruby
cakehero has quit [Client Quit]
arya has joined #ruby
gyre007 has joined #ruby
Hanmac1 has quit [Ping timeout: 248 seconds]
h4mz1d has quit [Read error: Operation timed out]
ddd has quit [Quit: Leaving.]
adeponte has quit [Remote host closed the connection]
pipopopo has quit [Ping timeout: 260 seconds]
Ruler_Of_Heaven_ has joined #ruby
gyre007 has quit [Ping timeout: 260 seconds]
mascool_ has quit [Ping timeout: 264 seconds]
fir_ed has quit [Ping timeout: 256 seconds]
medik has quit [Quit: medik has no reason]
iamjarvo has joined #ruby
SCommette has quit [Quit: SCommette]
DAYSofVICE has quit [Quit: Leaving]
Bootstrapper has joined #ruby
freakazoid0223 has quit [Read error: Connection reset by peer]
fyolnish has quit [Remote host closed the connection]
ryanf_ has quit [Ping timeout: 240 seconds]
gabrielrotbart has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
arya has quit [Ping timeout: 256 seconds]
havenn has joined #ruby
ninp0 has quit [Ping timeout: 244 seconds]
nga4 has quit [Ping timeout: 246 seconds]
arya has joined #ruby
havenn has quit [Ping timeout: 246 seconds]
Rym has quit [Quit: Rym]
bjeanes has quit [Ping timeout: 246 seconds]
joeycarmello has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
arya has quit [Ping timeout: 252 seconds]
xsbeats has quit [Ping timeout: 244 seconds]
ckrailo has quit [Quit: Computer has gone to sleep.]
seanstickle has quit [Quit: seanstickle]
classix_ has quit [Ping timeout: 245 seconds]
arya has joined #ruby
pcarrier has quit []
Aiur has joined #ruby
chrisja has quit [Quit: leaving]
Trioke has joined #ruby
steffes has quit [Remote host closed the connection]
v0n has quit [Ping timeout: 244 seconds]
mjolk has joined #ruby
arya has quit [Ping timeout: 245 seconds]
jrajav has quit [Quit: I tend to be neutral about apples]
rtd__ has quit [Quit: rtd__]
rtd has joined #ruby
n_blownapart has joined #ruby
nga4 has joined #ruby
pac1 has quit [Quit: I got it one line of code at a time]
tommyvyo has quit [Quit: Computer has gone to sleep.]
cakehero has joined #ruby
tommyvyo has joined #ruby
<n_blownapart>
hi - why does the textbook author use this example to illustrate a thread ; and what does join do here? It seems so little is going on aside from the regex. thank you: http://pastie.org/5445908
arya has joined #ruby
nat2610 has left #ruby [#ruby]
danktamagachi has joined #ruby
ghanima has quit [Ping timeout: 264 seconds]
Bootstrapper has quit [Read error: Connection reset by peer]
xyzodiac has joined #ruby
breefield has quit [Quit: breefield]
fyolnish has joined #ruby
<n_blownapart>
the book says that 'the $n variables are not really global once you see them in the context of the language having threads.'
<n_blownapart>
^^
gurps_ is now known as gurps
<GeekOnCoffee>
dear jesus don't use global variables
jenrzzz has quit [Ping timeout: 246 seconds]
<n_blownapart>
GeekOnCoffee: I think its just an illustration regarding scope but I can't grep the thread code. it seems like its not doing anything...comments? thanks
aeontech has quit [Quit: aeontech]
adeponte has joined #ruby
xyzodiac has quit [Client Quit]
jrunning has joined #ruby
maz-dev has quit [Ping timeout: 260 seconds]
<GeekOnCoffee>
n_blownapart: $1 was changed in the thread, but outside the thread the variable stayed the same
danktamagachi has quit [Ping timeout: 260 seconds]
<n_blownapart>
yeah, thanks GeekOnCoffee. but does it make sense to put a regex inside a thread. what is the purpose of the example do you think?
<GeekOnCoffee>
simply to illustrate the point
<GeekOnCoffee>
`theres no point to it
charliesome has joined #ruby
<n_blownapart>
GeekOnCoffee: hmmm. thanks. should I also ignore $n 's that are assigned to captures in a regex?
<n_blownapart>
generally? ^^
<GeekOnCoffee>
n_blownapart: using special $vars is fine
<GeekOnCoffee>
just don't assign them
areil has joined #ruby
gabrielrotbart has joined #ruby
falieson has quit [Quit: falieson]
maz-dev has joined #ruby
xyzodiac has joined #ruby
<n_blownapart>
GeekOnCoffee: thanks much
n_blownapart has quit [Remote host closed the connection]
<GeekOnCoffee>
n_blownapart: tbh I've been programming ruby since late 2007 and I've never really seen a use for global variables that wasn't a code smell
<GeekOnCoffee>
and you're gone
jlwestsr has joined #ruby
<GeekOnCoffee>
but if you really need something to be global, it should be constant
<GeekOnCoffee>
just to complete my point
nwertman has quit [Quit: leaving]
mmitchell has quit [Remote host closed the connection]
hackerdude has quit [Remote host closed the connection]
B|aster has quit []
krz has joined #ruby
<zastern>
Does #{} not only interpolate variables but allow you to run ruby code inside a string? E.g. an example I'm looking at has: puts "#{line_count} #{f.readline()}"
Takehiro has quit [Remote host closed the connection]
forced_request has quit [Read error: Connection reset by peer]
<zastern>
the f.readline() bit makes me ask the question
<zastern>
(just learning ruby)
shimokawa has quit [Remote host closed the connection]
<Brainix>
zastern: Yes, #{} allows you to run Ruby code.
havenn has joined #ruby
ossareh has quit [Ping timeout: 255 seconds]
<zastern>
Ah ok, I previously thought it only was for variables. Thanks!
L1 has quit [Read error: Connection reset by peer]
<Brainix>
zastern: No problem.
drnfx has quit [Ping timeout: 260 seconds]
v0n has joined #ruby
Takehiro has joined #ruby
headius has quit [Quit: headius]
x82_nicole has quit [Quit: Computer has gone to sleep.]
BoomCow has joined #ruby
falieson has joined #ruby
pu22l3r has joined #ruby
tbrock has joined #ruby
pu22l3r has quit [Read error: Connection reset by peer]
tbrock has quit [Max SendQ exceeded]
ebobby has joined #ruby
pu22l3r has joined #ruby
tbrock has joined #ruby
Monie has joined #ruby
havenn has quit [Remote host closed the connection]
Takehiro has quit [Remote host closed the connection]
havenn has joined #ruby
adeponte has quit [Read error: Connection reset by peer]
adeponte has joined #ruby
sham78 has joined #ruby
sham78 has quit [Client Quit]
drnfx has joined #ruby
havenn has quit [Ping timeout: 245 seconds]
GoGoGarrett has joined #ruby
bigmac has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
icole has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
shimokawa has joined #ruby
tbrock has quit [Quit: Computer has gone to sleep.]
postmodern has quit [Quit: Leaving]
xsbeats has joined #ruby
Bane__ has joined #ruby
breefield has joined #ruby
tommyvyo has joined #ruby
s0ber_ has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
ahuman_ has joined #ruby
tbrock has joined #ruby
Bane has quit [Read error: Connection reset by peer]
s0ber has quit [Remote host closed the connection]
ahuman has quit [Ping timeout: 244 seconds]
s0ber_ is now known as s0ber
Ivo has quit [Quit: WeeChat 0.3.9.2]
gabrielrotbart has joined #ruby
Slivka has quit [Ping timeout: 245 seconds]
ryanf has joined #ruby
arya has quit [Ping timeout: 240 seconds]
Guest59321 has joined #ruby
icole has quit [Remote host closed the connection]
Guest59321 has left #ruby [#ruby]
mikepack has quit [Remote host closed the connection]
radic has quit [Disconnected by services]
radic_ has joined #ruby
Guest59321 has joined #ruby
kbeddingfield has quit [Remote host closed the connection]
arya has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
Guest59321 has quit [Remote host closed the connection]
Guest51695 has joined #ruby
adeponte has quit [Remote host closed the connection]
ryanf has quit [Ping timeout: 246 seconds]
eka has joined #ruby
segv- has joined #ruby
headius has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
aeontech has joined #ruby
ryanf has joined #ruby
<zastern>
Is there somewhere I can find documenation for what += does in ruby? It's ungoogleable since its so generic
Aiur has quit [Quit: Computer has gone to sleep.]
<zastern>
I spoke too soon. Hah.
aeontech has quit [Remote host closed the connection]
<Brainix>
zastern: It depends on the types of the things that you're operating on.
<Brainix>
zastern: But in general, this += that is equivalent to this = this + that.
<zastern>
yeah i found it, thanks
the_jeebster has quit [Quit: Leaving.]
<Brainix>
zastern: So really, the question is what does + do? For integers, it adds. For strings, it concatenates. :-)
mahmoudimus has joined #ruby
<zastern>
so doing var = var + 1 is the same as var += 1
<zastern>
right?
<Brainix>
zastern: Correct.
headius has quit [Client Quit]
adeponte has joined #ruby
<zastern>
woo
falieson has quit [Quit: falieson]
cableray has joined #ruby
marioooo has joined #ruby
ryanf has quit [Ping timeout: 264 seconds]
marioooo has left #ruby [#ruby]
Guest51695 has quit [Remote host closed the connection]
hydrozen has quit [Quit: Computer has gone to sleep.]
<aces1up>
how do I do a find on a hash and return the key for instance myhash.find{|ele| ele.fire?} #<--- should return the key that matches
arya has quit [Ping timeout: 260 seconds]
<cableray>
you could do a #select on the hash.
<cableray>
let me see if there is a better way
davidcelis has joined #ruby
ryanf has joined #ruby
Slivka has joined #ruby
arya has joined #ruby
_jmartin has joined #ruby
_jmartin has quit [Remote host closed the connection]
<cableray>
nope, looks like it would be myhash.select{|ele| ele.fire?}.keys[0], aces1up
<aces1up>
cableray thanks.
falieson has joined #ruby
byennen has quit [Remote host closed the connection]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
johnmilton has joined #ruby
johnmilton has quit [Client Quit]
<cableray>
you could also do something with #each_pair
johnmilton has joined #ruby
wmoxam_ is now known as wmoxam
mjolk has quit [Quit: returning some videotapes]
cakehero has joined #ruby
blazes816 has quit [Quit: blazes816]
ebobby has quit [Quit: Lost terminal]
segv- has quit [Quit: segv-]
<joshlegs>
if i wrap a custom class with a default class (say, Logger), all the methods in Logger should be available in my custom class unless i override those, correct?
falieson has quit [Quit: you're awesome!]
wmoxam has quit [Changing host]
wmoxam has joined #ruby
billiam has joined #ruby
<Brainix>
joshlegs: "Wrap"?
tbrock has quit [Quit: Computer has gone to sleep.]
<cableray>
joshlegs: do you mean 'inherit from'?
cpruitt has quit [Quit: cpruitt]
<joshlegs>
i think probably inherit :) ... i.e. Class Rakelogger < Logger
<cableray>
yeah, that's inherit
<cableray>
and yes, all public and protected methods of the inherited class are available to you.
<cableray>
but not private methods.
<joshlegs>
hmmm. ok
eignerchris has joined #ruby
joeycarmello has quit [Remote host closed the connection]
brianpWins has joined #ruby
<cableray>
although I think you can access private methods if you really want to, but you shouldn't do that if you can help it.
<joshlegs>
yeah... probably a reason they're private
<joshlegs>
i'm just trying to figure out why i'm getting an undefined method error when i run this rake task that includes a logger.
JohnBat26 has joined #ruby
nat2610 has joined #ruby
johnmilton has quit [Quit: Leaving]
johnmilton has joined #ruby
elkclone has quit [Quit: It's never too late to unplug and run.]
<cableray>
includes how?
<joshlegs>
well, it calls the custom logger i built that inherits from Logger. but i think i might have just found the problem
joofsh has quit [Remote host closed the connection]
<joshlegs>
my rubymine is telling me it can't find "RakeLogger" in this statement "Rake_log = RakeLogger.new(RAILS_ROOT+'/log/rake_tasks_log.log')" ... even though i define the class right above it
ananthakumaran has joined #ruby
<cableray>
name spacing perhaps?
<cableray>
gist your rake task and I'll take a look.
<joshlegs>
i think i had a syntax error :)
<joshlegs>
let me check something real quick
<joshlegs>
yep i got it :)
<joshlegs>
my class definition had a capital C.
<joshlegs>
thanks for the help cableray !!
<cableray>
Haha.
<cableray>
sure
<joshlegs>
its funny how sometimes (read, usually) it's just some DUMB mistake preventing your code (ok my code) from working
johnmilton has quit [Read error: Connection reset by peer]
dan2 has joined #ruby
dmiller has quit [Ping timeout: 255 seconds]
dan2 has quit [Client Quit]
<cableray>
happens to the best of us.
sterNiX has quit [Ping timeout: 252 seconds]
jrist is now known as jrist-afk
Drakevr has quit [Ping timeout: 264 seconds]
Drakevr has joined #ruby
Drakevr has quit [Changing host]
Drakevr has joined #ruby
burgestrand has quit [Quit: Leaving.]
thinkdevcode has quit [Remote host closed the connection]
burgestrand has joined #ruby
sterNiX has joined #ruby
sterNiX has quit [Excess Flood]
sterNiX has joined #ruby
burgestrand has quit [Ping timeout: 245 seconds]
arya has quit [Ping timeout: 245 seconds]
johnmilton has joined #ruby
kbeddingfield has joined #ruby
BoomCow has quit [Quit: Leaving]
EyesIsServer has quit [Remote host closed the connection]
replore has joined #ruby
arya has joined #ruby
replore has quit [Remote host closed the connection]
EyesIsMine has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
ryanf has quit [Ping timeout: 245 seconds]
joeycarmello has joined #ruby
danktamagachi has joined #ruby
kbeddingfield has quit [Ping timeout: 260 seconds]
icole has joined #ruby
lemonsparrow has joined #ruby
<lemonsparrow>
!object.is_safe? && !object.departments_enabled? any better way to write this comdition
mercwithamouth has joined #ruby
sterNiX has quit [Ping timeout: 250 seconds]
<reactormonk>
lemonsparrow, go learn some boolean logic
sterNiX has joined #ruby
mahmoudimus has joined #ruby
freezway has quit [Ping timeout: 264 seconds]
<lemonsparrow>
reactormonk: !(object.is_safe? or object.departments_enabled?)
rezzack has quit [Quit: Leaving.]
icole has quit [Ping timeout: 245 seconds]
<reactormonk>
lemonsparrow, go learn some boolean logic
joeycarmello has quit [Ping timeout: 264 seconds]
x82_nicole has joined #ruby
mikepack has joined #ruby
arya has quit [Ping timeout: 256 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
gbchaosmaster has joined #ruby
arya_ has joined #ruby
cableray has quit [Quit: cableray]
benlieb has quit [Quit: benlieb]
Niamkik has joined #ruby
sterNiX has quit [Ping timeout: 260 seconds]
nemesit has joined #ruby
djdb has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
danktamagachi has quit [Ping timeout: 248 seconds]
kil0byte has joined #ruby
Nisstyre has quit [Quit: Leaving]
kbeddingfield has joined #ruby
kbeddingfield has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
codecop has joined #ruby
sterNiX has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
burgestrand has joined #ruby
maz-dev has quit [Ping timeout: 265 seconds]
jekotia has quit [Quit: facedesk, snore]
mneorr has joined #ruby
byennen has joined #ruby
machty has quit [Quit: machty]
xbayrockx has quit []
xpen has joined #ruby
rippa has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
Goopyo has joined #ruby
<Goopyo>
whats wrong with this: url_addon << "?auth_code=#{auth_code}" if auth_code else '' ?
joshlegs has quit [Quit: leaving]
maz-dev has joined #ruby
<cout>
Goopyo: I think you are looking for the ternary operator
<Goopyo>
a = true ? 'a' : 'b' ?
xpen_ has joined #ruby
robbyoconnor has joined #ruby
byennen has quit [Ping timeout: 245 seconds]
havenn has joined #ruby
<burgestrand>
Goopyo: itÆs missing an end
havenn has quit [Remote host closed the connection]
xpen has quit [Ping timeout: 260 seconds]
<burgestrand>
I can see what you want to do there but it won’t work that way.
xpen has joined #ruby
nemesit has quit [Quit: Leaving...]
<Goopyo>
yeah its how we do it in python 'a if bool else b'
remmy444 has joined #ruby
zommi has joined #ruby
<tsou>
Goopyo: looks like you just want to do: url_addon << "?auth_code=#{auth_code}" if auth_code
<burgestrand>
Goopyo: in short, trailing if-statements like that won’t work the way you want them to with an else-statement :)
<burgestrand>
Goopyo: url_addon << if auth_code then "?auth_code=#{auth_code}" else "" end — might work, haven’t tried it, but it’ll look something like that.
Slivka has quit [Read error: Connection reset by peer]
bobsaget has joined #ruby
xpen_ has quit [Ping timeout: 252 seconds]
x82_nicole has quit [Quit: Computer has gone to sleep.]
Slivka has joined #ruby
Slivka has quit [Read error: Connection reset by peer]
<burgestrand>
Goopyo: the way tsou wrote it would suffice in many cases, perhaps that’s what you really want?
johnmilton has quit [Quit: Leaving]
<Goopyo>
yeah thanks tsou and burgestrand. Thats a good shorthand version (in python the else has to be there so thats why I put it)
<burgestrand>
Goopyo: in ruby, it affects the entire line, so the url_addon.<< method won’t even run in the falsy case
<tsou>
Goopyo: for a complete if-then-else statement that is actually an expression that returns a value, use what burgestrand suggested
gbchaosmaster has quit [Ping timeout: 245 seconds]
<Goopyo>
gotcha
<tsou>
Goopyo: what i suggested is a modifier you can add to some statements in ruby, and only if it succeeds (evaluates to true) the statement will run
remmy444 has left #ruby ["WeeChat 0.3.8"]
<tsou>
(i'm not a rubyist though, so don't count on what i just said :P)
BoomCow has joined #ruby
<Goopyo>
this works too right: url_addon << auth_code ? "?auth_code=#{auth_code}" : "" ?
<tsou>
you might find the dual "unless" handy as well
sterNiX has quit [Ping timeout: 250 seconds]
SCommette has joined #ruby
lushious has quit [Ping timeout: 252 seconds]
<tsou>
it'd work, but in this particular case, you should use the simple "if auth_code" approach
bjeanes has joined #ruby
nat2610 has left #ruby [#ruby]
otters has quit [Ping timeout: 245 seconds]
tonini has joined #ruby
nomenkun has joined #ruby
sterNiX has joined #ruby
lushious has joined #ruby
ryanf has joined #ruby
kbeddingfield has joined #ruby
rezzack has joined #ruby
wookiehangover is now known as wookiehanover
jrunning has quit [Ping timeout: 260 seconds]
mikepack has quit [Remote host closed the connection]
wookiehanover is now known as wookiehangover
sterNiX has quit [Ping timeout: 252 seconds]
Brainix has quit [Quit: Brainix]
Nisstyre has joined #ruby
zommi has left #ruby [#ruby]
<Goopyo>
is it atypical to use parentheses when calling a method with params?
<Goopyo>
Looks weird to me considering all the other languages I've worked with
adeponte has quit [Remote host closed the connection]
a_a_g has joined #ruby
adeponte has joined #ruby
topek has joined #ruby
sterNiX has joined #ruby
<ryanf>
it varies a lot
<ryanf>
some people never use parens unless absolutely necessary, but I think it's more common to use them in most places
swex_ has joined #ruby
<Spaceghostc2c>
I'm that kind.
<Spaceghostc2c>
message param, param, param
<tsou>
i avoid them if i can
_veer has quit [Ping timeout: 245 seconds]
rakl has joined #ruby
<Spaceghostc2c>
I also avoid people who suck if I can. :D
rippa has quit [Ping timeout: 245 seconds]
swex has quit [Ping timeout: 265 seconds]
<Goopyo>
yeah its seems like ruby is filled with syntax tricks
answer_42 has joined #ruby
<ryanf>
there are even some people who do "def some_method param1, param2" but they're wrong
<tsou>
Goopyo: some can be confusing
banseljaj has quit [Read error: Connection reset by peer]
<Goopyo>
for sure
sgupta is now known as Shrink
Shrink has quit [Changing host]
Shrink has joined #ruby
segv- has joined #ruby
v0n has quit [Remote host closed the connection]
gbchaosmaster has joined #ruby
shimokawa has quit [Remote host closed the connection]
pu22l3r has quit [Remote host closed the connection]
arya_ has quit [Ping timeout: 256 seconds]
apeiros_ has quit [Ping timeout: 245 seconds]
BoomCow has quit [Quit: Leaving]
arya_ has joined #ruby
kil0byte has quit [Ping timeout: 252 seconds]
rezzack has quit [Quit: Leaving.]
vasile has joined #ruby
iamjarvo has quit [Quit: Computer has gone to sleep.]
bobsaget has quit [Quit: Leaving]
gbchaosmaster has quit [Remote host closed the connection]
sterNiX has quit [Ping timeout: 240 seconds]
jackdanger has joined #ruby
SCommette has quit [Quit: SCommette]
SCommette has joined #ruby
paolooo has joined #ruby
sterNiX has joined #ruby
SCommette has quit [Ping timeout: 245 seconds]
adkron has joined #ruby
benlieb has joined #ruby
Bootstrapper has joined #ruby
roadt has joined #ruby
bluOxigen has joined #ruby
_guy has joined #ruby
ChampS666 has joined #ruby
segv- has quit [Quit: segv-]
Takehiro has joined #ruby
Nisstyre has quit [Ping timeout: 252 seconds]
nomenkun has quit [Remote host closed the connection]
h4mz1d has joined #ruby
FredLe has joined #ruby
kbeddingfield has quit [Remote host closed the connection]
shtirlic_ has joined #ruby
adeponte has quit [Remote host closed the connection]
ltsstar has joined #ruby
paolooo has quit [Ping timeout: 245 seconds]
FDj has quit [Read error: Connection reset by peer]
FDj has joined #ruby
nemesit has joined #ruby
sterNiX has quit [Ping timeout: 265 seconds]
eldariof has joined #ruby
h4mz1d has quit [Ping timeout: 245 seconds]
alanp has joined #ruby
adeponte has joined #ruby
SCommette has joined #ruby
dr_bob has joined #ruby
Bootstrapper has quit [Remote host closed the connection]
Drewch has quit [Ping timeout: 264 seconds]
adeponte has quit [Remote host closed the connection]
workmad3 has joined #ruby
Nisstyre has joined #ruby
alanp_ has quit [Ping timeout: 256 seconds]
Drewch has joined #ruby
sterNiX has joined #ruby
ryanlecompte has quit [Remote host closed the connection]
morf has joined #ruby
grzywacz has joined #ruby
L1 has joined #ruby
reset has joined #ruby
breefield has quit [Quit: breefield]
benlieb has quit [Quit: benlieb]
nomenkun has joined #ruby
joeycarmello has joined #ruby
arya_ has quit [Ping timeout: 240 seconds]
adeponte has joined #ruby
BoomCow has joined #ruby
haxrbyte has quit [Ping timeout: 265 seconds]
arya_ has joined #ruby
vasile has quit [Ping timeout: 250 seconds]
segv- has joined #ruby
joeycarmello has quit [Ping timeout: 248 seconds]
paolooo has joined #ruby
postmodern has joined #ruby
ChampS666 has quit [Ping timeout: 256 seconds]
jlogsdon has joined #ruby
tagrudev has joined #ruby
maesbn has joined #ruby
aganov has joined #ruby
_veer has joined #ruby
L1_ has joined #ruby
eph3meral has joined #ruby
xsbeats_ has joined #ruby
xsbeats has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 240 seconds]
L1 has quit [Ping timeout: 256 seconds]
jds has joined #ruby
tbrock has joined #ruby
riteshno has joined #ruby
riteshno has quit [Remote host closed the connection]
mneorr has quit [Remote host closed the connection]
jlogsdon has quit [Remote host closed the connection]
bjeanes has quit [Ping timeout: 246 seconds]
nomenkun has quit [Remote host closed the connection]
nomenkun has joined #ruby
L1_ has quit [Remote host closed the connection]
hrr has joined #ruby
jarred_ has joined #ruby
kil0byte has joined #ruby
margle has joined #ruby
nomenkun has quit [Remote host closed the connection]
yeban_ is now known as yeban
apeiros_ has joined #ruby
Grieg has joined #ruby
Grieg has quit [Changing host]
Grieg has joined #ruby
hoelzro|away is now known as hoelzro
RudyValencia has quit [Ping timeout: 248 seconds]
matrixise has joined #ruby
reset has quit [Quit: Leaving...]
ananthakumaran1 has joined #ruby
tobinharris has joined #ruby
slainer68 has quit [Remote host closed the connection]
ananthakumaran has quit [Ping timeout: 248 seconds]
kil0byte_ has joined #ruby
sterNiX has quit [Ping timeout: 256 seconds]
matthewrobbins has joined #ruby
sspiff has joined #ruby
kil0byte has quit [Ping timeout: 248 seconds]
RudyValencia has joined #ruby
zigomir has joined #ruby
sterNiX has joined #ruby
ssspiff has quit [Ping timeout: 246 seconds]
Slivka has joined #ruby
k610 has joined #ruby
k610 has quit [Client Quit]
Mon_Ouie has joined #ruby
mand__ has quit [Ping timeout: 260 seconds]
ltsstar has quit [Quit: ltsstar]
maz-dev has quit [Ping timeout: 245 seconds]
matthewrobbins has quit [Read error: Connection reset by peer]
matthewrobbins has joined #ruby
ephemerian has joined #ruby
sterNiX has quit [Ping timeout: 255 seconds]
maz-dev has joined #ruby
billiam has quit [Quit: Leaving]
BiHi has joined #ruby
Elhu has joined #ruby
sterNiX has joined #ruby
zigomir has quit [Quit: zigomir]
Paradox has quit [Quit: derpderp]
Virunga has joined #ruby
tbrock has quit [Quit: Computer has gone to sleep.]
mugger has quit [Ping timeout: 255 seconds]
Paradox has joined #ruby
Morkel has joined #ruby
_veer has quit [Ping timeout: 245 seconds]
Marius has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
fyolnish has quit [Remote host closed the connection]
jslowe has joined #ruby
sterNiX has quit [Ping timeout: 256 seconds]
FredLe has quit [Quit: Leaving.]
sterNiX has joined #ruby
greenarrow has joined #ruby
ryanf has quit [Quit: leaving]
krz has quit [Read error: Connection reset by peer]
d2dchat has joined #ruby
krz has joined #ruby
ssspiff has joined #ruby
ryanlecompte has joined #ruby
sspiff has quit [Ping timeout: 250 seconds]
fyolnish has joined #ruby
d2dchat has quit [Remote host closed the connection]
hotovson has joined #ruby
xcvd`` has joined #ruby
Elico has quit [Quit: elico]
kil0byte has joined #ruby
ryanlecompte has quit [Ping timeout: 250 seconds]
blaxter has joined #ruby
kil0byte_ has quit [Ping timeout: 245 seconds]
paolooo has quit [Quit: Page closed]
hamed_r has joined #ruby
jslowe has quit [Ping timeout: 264 seconds]
blacktulip has joined #ruby
cableray has joined #ruby
sterNiX has quit [Ping timeout: 260 seconds]
Paradox has quit [Quit: derpderp]
Paradox has joined #ruby
rdark has joined #ruby
jds has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 265 seconds]
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
pcarrier has quit []
GeekOnCoffee has quit [Ping timeout: 276 seconds]
xpen_ has joined #ruby
GeekOnCoffee has joined #ruby
xpen has quit [Ping timeout: 256 seconds]
matrixise has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
jackbrownhf has joined #ruby
jackbrownhf has quit [Changing host]
jackbrownhf has joined #ruby
<workmad3>
evelyette: also, use $1 in your block rather than 'line'
_veer has quit [Ping timeout: 245 seconds]
<workmad3>
evelyette: the parameter contains the entire matched text, $1 will contain your first capture group
<evelyette>
workmad3: yes of course, thanks
jackbrownhf has quit [Client Quit]
mand__ has joined #ruby
xpen_ is now known as xpen
seoaqua has joined #ruby
shtirli__ has joined #ruby
margle has quit [Quit: Computer has gone to sleep.]
Slivka has quit [Read error: Connection reset by peer]
shtirlic has quit [Ping timeout: 264 seconds]
MarcWeber has joined #ruby
cdt has joined #ruby
cdt_ has joined #ruby
Virunga_ has joined #ruby
Virunga has quit [Read error: Connection reset by peer]
kil0byte has joined #ruby
mklappstuhl has joined #ruby
cdt has quit [Ping timeout: 246 seconds]
vasile has quit [Ping timeout: 256 seconds]
gyre007 has joined #ruby
SPYGAME has joined #ruby
fyolnish has joined #ruby
Morkel has quit [Quit: Morkel]
xpen has quit [Remote host closed the connection]
kil0byte_ has quit [Ping timeout: 252 seconds]
seoaqua has quit [Ping timeout: 240 seconds]
rdark has joined #ruby
branon has joined #ruby
SPYGAME has quit [Ping timeout: 250 seconds]
Marius has quit [Quit: Leaving]
tobinharris has quit [Quit: tobinharris]
AndChat| has quit [Remote host closed the connection]
arya_ has quit [Ping timeout: 244 seconds]
rippa has quit [Ping timeout: 264 seconds]
mklappstuhl has quit [Ping timeout: 260 seconds]
jslowe has joined #ruby
mercwithamouth has joined #ruby
swex_ has quit [Ping timeout: 244 seconds]
swex has joined #ruby
xcvd`` has quit [Ping timeout: 240 seconds]
arya has joined #ruby
hamed_r has quit [Quit: Leaving]
lkba has quit [Ping timeout: 260 seconds]
mklappstuhl has joined #ruby
SPYGAME has joined #ruby
tobinharris has joined #ruby
lkba has joined #ruby
grzywacz has quit [Quit: :wq]
Goles has joined #ruby
rakl has quit [Quit: gone]
Trioke has quit [Ping timeout: 256 seconds]
wallerdev has quit [Quit: wallerdev]
oposomme has joined #ruby
mercwithamouth has quit [Ping timeout: 264 seconds]
nari has joined #ruby
berserkr has joined #ruby
beiter has joined #ruby
googya1 has joined #ruby
jackbrownhf has joined #ruby
Goles_ has joined #ruby
googya has quit [Ping timeout: 255 seconds]
tvw has joined #ruby
Goles has quit [Ping timeout: 245 seconds]
ExxKA has quit [Read error: Connection reset by peer]
chussenot has quit [Quit: chussenot]
ottbot has quit [Quit: WeeChat 0.3.9.1]
googya1 has quit [Ping timeout: 256 seconds]
googya has joined #ruby
googya has quit [Read error: Connection reset by peer]
moshee has quit [Ping timeout: 256 seconds]
moshee has joined #ruby
googya has joined #ruby
darth_ has joined #ruby
sterNiX has quit [Ping timeout: 252 seconds]
darth_ is now known as darthdeus
<darthdeus>
when would I want to use autoload instead of explicit require?
<darthdeus>
for example I found this autoload :Pool, 'em/deferrable/pool' in EventMachine's source ... but not erally sure why they don't just require "em/deferrable/pool"
googya1 has joined #ruby
googya2 has joined #ruby
Goles_ has quit [Ping timeout: 246 seconds]
kil0byte_ has joined #ruby
lampe2 has quit [Ping timeout: 260 seconds]
Michael_ has joined #ruby
googya has quit [Ping timeout: 245 seconds]
margle has joined #ruby
banisterfiend has joined #ruby
googya has joined #ruby
googya has quit [Read error: Connection reset by peer]
kil0byte has quit [Ping timeout: 255 seconds]
googya1 has quit [Ping timeout: 255 seconds]
googya2 has quit [Ping timeout: 244 seconds]
SPYGAME has quit [Ping timeout: 240 seconds]
rovalent has joined #ruby
statarb3 is now known as proshot
chussenot has joined #ruby
_guy has quit [Remote host closed the connection]
_guy has joined #ruby
googya has joined #ruby
googya has quit [Read error: Connection reset by peer]
googya has joined #ruby
googya has quit [Read error: Connection reset by peer]
googya has joined #ruby
Takehiro has quit [Remote host closed the connection]
Ruler_Of_Heaven_ is now known as pipopopo
cmarques has joined #ruby
ananthakumaran has joined #ruby
g-ram has joined #ruby
Takehiro has joined #ruby
<workmad3>
darthdeus: it allows for unused code to not be loaded
_guy has quit [Remote host closed the connection]
sterNiX has joined #ruby
pcarrier has joined #ruby
_guy has joined #ruby
fyolnish has quit [Remote host closed the connection]
ananthakumaran1 has quit [Ping timeout: 265 seconds]
pyx has quit [Quit: WeeChat 0.3.9.2]
beiter has quit [Quit: beiter]
fyolnish has joined #ruby
googya has quit [Ping timeout: 256 seconds]
samphippen has joined #ruby
fyolnish has quit [Read error: Connection reset by peer]
fyolnish has joined #ruby
sepp2k has joined #ruby
oposomme has quit [Quit: Leaving...]
_guy has quit [Ping timeout: 245 seconds]
googya has joined #ruby
googya has quit [Read error: Connection reset by peer]
_guy has joined #ruby
proshot has quit [Quit: Leaving]
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
statarb3 is now known as proshot
hoelzro is now known as hoelzro|away
googya has joined #ruby
googya has quit [Read error: Connection reset by peer]
<gcds>
i am creating gem and have made a bin executable which includes gem. I have question how to run this executable without releasing gem ?
googya1 has quit [Ping timeout: 265 seconds]
Averna has joined #ruby
BiHi has quit [Quit: Computer has gone to sleep]
oposomme has joined #ruby
jds has quit [Ping timeout: 260 seconds]
Michael_ has quit [Remote host closed the connection]
carloslopes has joined #ruby
bier_ has quit [Ping timeout: 260 seconds]
bier has quit [Ping timeout: 256 seconds]
robotmay has joined #ruby
robotmay has quit [Remote host closed the connection]
hamed_r has joined #ruby
robotmay has joined #ruby
googya has joined #ruby
googya has quit [Read error: Connection reset by peer]
googya has joined #ruby
googya has quit [Read error: Connection reset by peer]
Goles has joined #ruby
hoelzro|away is now known as hoelzro
googya has joined #ruby
googya1 has joined #ruby
tobinharris has quit [Quit: tobinharris]
arya has quit [Ping timeout: 255 seconds]
codecaster has quit [Read error: Connection reset by peer]
arya has joined #ruby
carloslopes has quit [Remote host closed the connection]
carloslopes has joined #ruby
codecaster has joined #ruby
googya has quit [Ping timeout: 250 seconds]
g-ram has quit [Quit: Computer has gone to sleep.]
googya1 has quit [Ping timeout: 255 seconds]
heftig has quit [Quit: leaving]
bier_ has joined #ruby
ToTo has joined #ruby
bier has joined #ruby
_veer has joined #ruby
_veer has joined #ruby
_veer has quit [Changing host]
googya has joined #ruby
googya has quit [Read error: Connection reset by peer]
oposomme has quit [Quit: Leaving...]
samuel02 has joined #ruby
tk__ has joined #ruby
[Neurotic] has quit [Ping timeout: 260 seconds]
googya has joined #ruby
oposomme has joined #ruby
googya1 has joined #ruby
oposomme has quit [Client Quit]
chussenot has quit [Quit: chussenot]
mklappstuhl has quit [Read error: Connection reset by peer]
_veer has quit [Ping timeout: 245 seconds]
<cmarques>
gcds: Add a "shebang" to the beggining of the file (something like #!/usr/bin/env ruby) so the system knows that it should use your Ruby interpreter to run the file, and make it executable with chmod +x bin/your_file. Then run it with bin/your_file.
beiter has joined #ruby
<gcds>
cmarques: I know this but the problem is that I need to release gem to able to include it with require 'gem_name'
googya has quit [Ping timeout: 260 seconds]
_veer has joined #ruby
ToTo has quit [Read error: No route to host]
googya1 has quit [Ping timeout: 265 seconds]
<cmarques>
gcds: is the executable file inside a bin folder, and that bin folder inside your gem?
googya has joined #ruby
googya has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
samuel02 has quit [Remote host closed the connection]
samuel02 has joined #ruby
samuel02 has quit [Remote host closed the connection]
googya has joined #ruby
googya has quit [Read error: Connection reset by peer]
linoj has quit [Quit: linoj]
<shevy>
there are women in my gems!!!
blaxter has quit [Quit: foo]
googya has joined #ruby
<shevy>
gcds, you could always call the .rb file directly. I use aliases for that
kil0byte has joined #ruby
googya1 has joined #ruby
niklasb has joined #ruby
<shevy>
when I have a file like "clean_system.rb", I usually also have an alias called "clean_system" and one more with "cleansystem" and then another one with "cleans", which explains why I have around +20.000 aliases
rakunHo has quit [Remote host closed the connection]
<gcds>
shevy: everything works but execpt i havent release gem so if I require "gem name" it throus no such file
<shevy>
well
<shevy>
require 'foo' can only work if you installed it into the ruby SITE_DIR
<shevy>
you can use setup.rb if you dont want a gem
<konid45>
Hello, beginner Ruby programmer here. I don't understand why (in irb on its own line) { puts "foo" } is a syntax error. Surely this just evaluates to a code block? I get unexpected tSTRING_BEG
<shevy>
konid45 you must remember that {} is also used for hashes
samphippen has joined #ruby
<konid45>
shevy: ah, of course. How can I create a code block and, for example, assign it to a variable then. I'm from a Haskell background and I'm used to doing x = \y -> y * 2 or whatever
<JonnieCache>
konid45: code blocks cant just hang out on their own
<JonnieCache>
you want x = proc {puts foo}
<shevy>
konid45 every method in ruby can accept a code block
<codecaster>
code = lambda { code_here }
<JonnieCache>
or x = lambda {puts foo}
<shevy>
if the method is called foo, you can call it as either of these ways:
<shevy>
foo, foo(), foo() {puts 'hi there!!!'}
<codecaster>
Hanmac: are you here?
<codecaster>
come back
<shevy>
Hanmac someone wants to kiss you!
<konid45>
JonnieCache: so lambda and proc are the same thing, and are just applicable wrapper that take the code block. Like some kind of code block monoid?
<codecaster>
they aren't the same thing
<codecaster>
they are very similar
<codecaster>
returns in procs return in the parent
<heftig>
not quite, executing a lambda is more like calling a method
daniel_- has quit [Quit: WeeChat 0.3.9.2]
<codecaster>
procs can get a variable amount of args
<heftig>
it's strict about the number of arguments it takes (wrong number is a runtime error)
<codecaster>
but lambdas not
<JonnieCache>
konid45: they *are* code blocks. "code blocks" arent a first class concept in ruby except in the form of procs and lambdas etc
mmitchell has joined #ruby
<heftig>
codecaster: so can lambdas, if you use a splat
_bart has joined #ruby
<heftig>
a "return" from a lambda returns from the lambda, not from the enclosing context
lkba has joined #ruby
<konid45>
JonnieCache: ok, guess i got carried away with the everything is an object cool-aid! thanks
<JonnieCache>
they are objects as well :)
vasile has quit [Ping timeout: 246 seconds]
TommyBlue has quit [Quit: Coyote finally caught me]
berserkr has quit [Quit: Leaving.]
maxmande1s has quit [Quit: Changing server]
<codecaster>
heftig: yeah, but if you have a specific amout of args, you must provide them
<JonnieCache>
konid45: so i guess you could say that they are wrappers for code blocks, but that mode of thinking wont help you understand ruby, because you never actually take off the wrapper
<codecaster>
you can always use &block and blocks become objects as well :)
machty has joined #ruby
u89 has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
<konid45>
JonnieCache: is it common to use a lambda or proc in ruby, or does most stuff happen with a standard code block at the end of a method?
BiHi has joined #ruby
<heftig>
most stuff happens with the standard block
<JonnieCache>
yep. like, more than 90%
maxmanders has joined #ruby
<JonnieCache>
bare in mind, methods will often transform the block you give them into a proc for use internally
<heftig>
but e.g. if you do an asynchronous operation that has both a success and an error callback, one block is not enough
<JonnieCache>
but when dealing with public APIs you almost always use a block
<JonnieCache>
heftig: that usually happens by multiple method calls each with a block though
sailias has quit [Quit: Leaving.]
a_a_g has quit [Quit: Leaving.]
tommyvyo_ has joined #ruby
skattyadz has quit [Quit: skattyadz]
lolmaus has joined #ruby
ToTo has joined #ruby
banisterfiend has quit [Remote host closed the connection]
<konid45>
thanks everyone, bye
leifmadsen has joined #ruby
konid45 has quit [Quit: Page closed]
xyzodiac has joined #ruby
nga4 has quit [Ping timeout: 264 seconds]
chrismcg is now known as zz_chrismcg
p4tux has quit [Remote host closed the connection]
Goles has quit [Remote host closed the connection]
reinaldob has quit [Remote host closed the connection]
jds has joined #ruby
superc has joined #ruby
gener1c has quit [Remote host closed the connection]
seanyo has quit [Read error: Connection reset by peer]
<superc>
I'm trying to get a ruby-pocketsphinx-server running. I get an error message ERROR -- : undefined method `set_property' for nil:NilClass (NoMethodError) .... any ideas if I need to install something else?
Goles has joined #ruby
skattyadz has joined #ruby
samuel02 has quit [Remote host closed the connection]
<evelyette>
hi
seanyo has joined #ruby
<evelyette>
I'm trying to match everything between ! and ! across multiple lines. Currently I have this: lines.sub %r{!(.*)!} do |line|
<evelyette>
the above only works on one line, not multiple ... how can I change it to work on multiple lines ?
<hoelzro>
evelyette: lines.each_line.filter?
jds has quit [Ping timeout: 240 seconds]
iamjarvo has joined #ruby
DiogoPOLISHOP has joined #ruby
<DiogoPOLISHOP>
ALGUM BRASILEIRO AEW?!
chimkan has joined #ruby
ner0x has joined #ruby
<tsou>
evelyette: maybe \A and \Z would help?
fifigyuri has joined #ruby
love_color_text has joined #ruby
<evelyette>
tsou: is there a help page for that, since it would be incredibly cumbersome to search for \A and \Z on google?
<tsou>
DiogoPOLISHOP: não, ningem. fala inglês aqui.
<ner0x>
If I wish to build ruby myself and plan on using checkinstall, do I put the src in /usr/local/src and build from there? If so, are there are special groups/permissions that folder needs? I notice when I try to build from my home dir it takes forever.
vlad_starkov has quit [Ping timeout: 256 seconds]
pixie79 has quit [Ping timeout: 240 seconds]
cpruitt has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
twopoint718 has joined #ruby
twopoint718 has joined #ruby
twopoint718 has quit [Changing host]
Goles has quit [Remote host closed the connection]
chimkan___ has joined #ruby
chimkan has quit [Ping timeout: 245 seconds]
chimkan___ is now known as chimkan
<evelyette>
tsou: ok this still doesn't work: lines.sub %r{\A!(.*)!\Z}
bbttxu has quit [Quit: bbttxu]
machty has quit [Quit: machty]
adac has joined #ruby
<adac>
did anyone of you ever tried to use "paperclip" gem within a ruby project?
<evelyette>
tsou: I'm also reading that \A and \Z are the default in ruby, so I shouldn't need them ... something else is wrong
vlad_starkov has joined #ruby
<_axx>
Hello! :) I want to compare two arrays and want to see which values of array1 are also in array2, is there a function in ruby for a task like this? :
a_a_g has joined #ruby
x82_nicole has quit [Client Quit]
<D4T>
_axx: you can do array1 - array2 i believe
jrist-afk is now known as jrist
jackbrownhf has quit [Quit: Sto andando via]
<_axx>
hm
frem has joined #ruby
machty has joined #ruby
<D4T>
in your case array1 & array2
R3dy has joined #ruby
<tsou>
evelyette: try the /m switch after the regexp?
<_axx>
oooh, awesome
<_axx>
thanks D4T! :))
<D4T>
np
<tsou>
evelyette: /\A!(.*)!\Z/m ?
sterNiX has quit [Read error: Connection reset by peer]
<_axx>
did'nt thought about an easy way like that ^^
<_axx>
*didn't
<D4T>
always easy when you know how
<_axx>
ya, hehe
u89 has quit [Remote host closed the connection]
<evelyette>
tsou: yes I also tried that, doesn't work
<tsou>
evelyette: hmmm it works for me :|
<tsou>
evelyette: oh wait, you are calling it on lines
<tsou>
?
<tsou>
what is lines?
<tsou>
evelyette: is it a string, or is it the .lines of a string?
<_bart>
D4T: I highly recommend you to try it in IRB/Pry or Rails console, it makes it easier.
<_bart>
(my experience with nokogiri)
phantasm66 has joined #ruby
<D4T>
yeah but I'm still struggling for reason. although this is day 2 of my headache so i blame that
blitzrage has joined #ruby
iamjarvo has quit [Quit: Computer has gone to sleep.]
<Cadwallion>
D4T: which domain element? domain:chkData, domain:cd, or domain:name ?
_alejandro has quit [Remote host closed the connection]
samphippen has joined #ruby
<D4T>
domain:name
arya has joined #ruby
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
vlad_starkov has quit [Remote host closed the connection]
<dreinull>
apeiros_: also '.where' already returns the array, right?
love_color_text has quit [Remote host closed the connection]
leifmadsen has quit [Ping timeout: 264 seconds]
joshman_ has joined #ruby
blitzrage is now known as leifmadsen
Takehiro has quit [Remote host closed the connection]
tommyvyo_ has quit [Ping timeout: 264 seconds]
roadt has quit [Ping timeout: 250 seconds]
nwertman has joined #ruby
pcarrier has quit []
tommyvyo_ has joined #ruby
tobinharris has quit [Quit: tobinharris]
reinaldob has joined #ruby
codecaster has quit [Read error: Connection reset by peer]
rjmt__ has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
tommyvyo_ is now known as tommyvyo
codecaster has joined #ruby
nat2610 has joined #ruby
jgarvey has joined #ruby
kil0byte_ has joined #ruby
kebomix has left #ruby [#ruby]
ghanima has joined #ruby
sie has joined #ruby
kil0byte has quit [Ping timeout: 260 seconds]
noxoc has joined #ruby
<sie>
I'm opening nc with IO.popen("nc localhost 1234") and something's starting to go wrong with the stdin -- although it should go to irb, it goes to nc's stdin, why?
x77686d has joined #ruby
Morkel has joined #ruby
chussenot has quit [Quit: chussenot]
jlast has joined #ruby
yshh has quit [Remote host closed the connection]
byennen has joined #ruby
chussenot has joined #ruby
xyzodiac has joined #ruby
Uranio has joined #ruby
jchauncey has joined #ruby
<D4T>
cadwallion: sorry any thoughts, its hurting me head :S
krawchyk has quit [Ping timeout: 245 seconds]
vasile has quit [Ping timeout: 264 seconds]
kil0byte has joined #ruby
krawchyk has joined #ruby
krawchyk has quit [Remote host closed the connection]
bbttxu has joined #ruby
nat2610 has left #ruby [#ruby]
tomsthumb has quit [Quit: Leaving.]
kil0byte_ has quit [Ping timeout: 255 seconds]
t0rc has quit [Quit: WeeChat 0.3.9.2]
margle has quit [Quit: Computer has gone to sleep.]
v0n has quit [Ping timeout: 245 seconds]
xyzodiac has quit [Quit: Computer has gone to sleep.]
alex__c2022 has joined #ruby
nga4 has quit []
<sie>
n
sie has quit [Quit: WeeChat 0.3.7]
Snugug has joined #ruby
<apeiros_>
dreinull: no, where returns a relation
<apeiros_>
dreinull: but relations are enumerable, and additionally you can still add more scopes, which makes them more useful than the array.
Spami has joined #ruby
bluOxigen has joined #ruby
<Spami>
hello
<apeiros_>
and last but not least - theoretically, AR could optimize the iteration
tagrudev has quit [Quit: C-x C-c]
joeycarmello has joined #ruby
sie has joined #ruby
oqa has quit [Remote host closed the connection]
<dreinull>
apeiros_: so you would always use the relation even for actually applying your data in a view?
zipkid has left #ruby [#ruby]
nga4 has joined #ruby
<apeiros_>
dreinull: I do
<dreinull>
apeiros_: interesting. I never really thought about that.
<apeiros_>
I might not if I'd stream
<apeiros_>
(exception catching and stuff…)
nomenkun has quit [Remote host closed the connection]
dankest has joined #ruby
mattaf123 has joined #ruby
Takehiro has joined #ruby
<dreinull>
apeiros_: I never thought about the enumerative capabilities of relations. Always assumed I'd have to get the array first and then operate on that.
xyzodiac has joined #ruby
<dreinull>
These things happen when you code on your own...
<mattaf123>
i'm trying to figure out an issue with greater than / less than for strings (comparing alphabetical). what does ruby consider non letter characters? (e.g. @, $, #, etc). is this documented somewhere? i'm trying to figure out if there's a difference between mysql's order by and ruby "" >
joeycarmello has quit [Ping timeout: 255 seconds]
blitzrage has joined #ruby
carloslopes has joined #ruby
freeayu has quit [Remote host closed the connection]
adkron has joined #ruby
<hoelzro>
mattaf123: one may be using Unicode collations, while the other may be using the difference in the ASCII value of the first non-matching character
Marius has joined #ruby
<workmad3>
mysql's order by will use the collation set for the field
<workmad3>
that might be a unicode (or other) collation, it might also be case-insensitive
<mattaf123>
ok yeah, it's set to utf-8 for mysql
fish_sticks has joined #ruby
<workmad3>
there are about a dozen different utf-8 collations for mysql
<workmad3>
maybe more
tobinharris has joined #ruby
<mattaf123>
ok the collation is utf8_unicode_ci
<workmad3>
right, so that's a case-insensitive collation for starters
<workmad3>
so yes, that will be different from a plain sort_by in ruby
_alejandro has joined #ruby
leifmadsen has quit [Ping timeout: 240 seconds]
<mattaf123>
but just because of the case insensitive fact right? the symbols are what are messing it up as far as i can tell, but haven't really played with casing as it will be case insensitive for the sort.
DrShoggoth has joined #ruby
<workmad3>
if you want consistent sort, you should basically always use the same thing for it
rippa has joined #ruby
SCommette has quit [Quit: SCommette]
<workmad3>
whether that's ordered by ruby or ordered by mysql (my recommendation would be mysql btw)
headius has joined #ruby
<workmad3>
and then don't worry about ordering in ruby, just trust that the ordering is correct from your data source
lolmaus has quit []
<mattaf123>
yeah so what's happening is i'm sorting in mysql and then looping over the result collection and comparing the strings to make sure they are alphabetical.
<sie>
Why does IO.popen intercept my stdin?
lenovodroid has quit [Ping timeout: 260 seconds]
<workmad3>
mattaf123: yeah... don't do that
<mattaf123>
it's in a test/spec, so what do you recommend for testing alphabetical order?
<workmad3>
mattaf123: trust mysql to do its job
tk__ has quit [Quit: ばいばい]
<_br_->
Weird. RVM, Bundler, gem list, shows socky-client-rails. Still getting the error when executing rake, "cannot load such file -- socky/client/rails". Anyone an idea what is going on?
Takehiro has quit [Ping timeout: 256 seconds]
_veer has quit [Ping timeout: 246 seconds]
<workmad3>
mattaf123: if you must do something in a test, validate that you are specifying an order
<mattaf123>
right, but somehow i'd still need to test that the strings are coming out in the right order right? like i didn't reverse a "ASC" or "DSC"
roadt has joined #ruby
<workmad3>
no, test that you're sending the correct order to the database
<workmad3>
and then trust the database to do its job
Neomex has quit [Quit: Neomex]
<workmad3>
otherwise what you're doing is basically re-implementing mysql's sorting inside your tests... and mysql's sorting is pretty sophisticated
iamjarvo has joined #ruby
rbennacer has joined #ruby
<rbennacer>
hello everybody
bwlang has joined #ruby
<workmad3>
which would probably end up meaning that when you change from utf8_unicode_ci to utf8_general_ci (or similar) you end up with test failures in your test because your incomplete implementation of mysql's sorting can't handle the change, even though it's actually nothing to do with your app and everything is still actually correct
jds has joined #ruby
<workmad3>
alternatively, ignore what I'm saying, keep on doing what you're doing and enjoy your test failures and test pain :)
<mattaf123>
workmad3: no, i think what you're saying makes sense. thanks :)
krawchyk has joined #ruby
carlyle has joined #ruby
<workmad3>
mattaf123: my general guideline is that it's hard enough to get decent tests on your code, the limit of testing beyond that is validating that you're integrating correctly
cmarques has quit [Ping timeout: 260 seconds]
jchauncey has quit [Quit: jchauncey]
jchauncey has joined #ruby
Virunga_ is now known as Virunga
<D4T>
woo hoo! figured my nokogiri issue :)
ltsstar has joined #ruby
jds has quit [Ping timeout: 260 seconds]
xclite has joined #ruby
jamesaxl has quit [Read error: No route to host]
blitzrage is now known as leifmadsen
<jchauncey>
/join #selenium
jrajav has joined #ruby
jchauncey has left #ruby [#ruby]
kil0byte has quit [Ping timeout: 255 seconds]
mengu has quit [Quit: Konversation terminated!]
daniel_- has joined #ruby
kil0byte has joined #ruby
<rbennacer>
will naming a model/controller Asset cause issues in rails 3?
sailias1 has joined #ruby
v0n has joined #ruby
Virunga has quit [Remote host closed the connection]
dr_bob has quit [Quit: Leaving.]
eldariof has quit [Ping timeout: 255 seconds]
sailias has quit [Ping timeout: 256 seconds]
sailias has joined #ruby
tomsthumb has joined #ruby
krawchyk has quit [Remote host closed the connection]
swex has quit [Remote host closed the connection]
fish_sticks has quit [Quit: Page closed]
krawchyk has joined #ruby
dr_bob has joined #ruby
SCommette has joined #ruby
burgestrand has quit [Quit: Leaving.]
swex has joined #ruby
topek has quit [Quit: Leaving.]
sailias1 has quit [Ping timeout: 246 seconds]
ddd has joined #ruby
p4tux has joined #ruby
Guest24042 has joined #ruby
Taranis has joined #ruby
yshh has joined #ruby
solidoodlesuppor has joined #ruby
maesbn has quit [Remote host closed the connection]
cakehero has joined #ruby
mikepack has joined #ruby
mattaf123 has left #ruby [#ruby]
theRoUS has quit [Ping timeout: 246 seconds]
blaxter has joined #ruby
zigomir has joined #ruby
vlad_starkov has joined #ruby
v0n has quit [Ping timeout: 246 seconds]
zurich_ is now known as zurich
Yarou_ has joined #ruby
lenovodroid has joined #ruby
pcarrier has joined #ruby
Elico has joined #ruby
Yarou has quit [Ping timeout: 260 seconds]
schaary has quit [Quit: Leaving.]
theRoUS has joined #ruby
joeycarmello has joined #ruby
bbttxu has quit [Quit: bbttxu]
ltsstar has quit [Quit: ltsstar]
jekotia has joined #ruby
vlad_starkov has quit [Ping timeout: 256 seconds]
apeiros_ has quit [Remote host closed the connection]
<shevy>
I loved eating that before I stopped eating animals
berserkr has joined #ruby
daniel_- has quit [Ping timeout: 246 seconds]
pcarrier has quit []
* lupine
still enjoys steak
<lupine>
I was vegetarian for 18 months, but bacon brought me back from that
hackerdude has joined #ruby
brianpWins has quit [Quit: brianpWins]
Xeago has joined #ruby
<havenn>
fgro: I know its a URL not a File, but: uri = 'https://code/mina/lib/mina.com'; File.split(uri).last #=> "mina.com"
rbennacer has left #ruby ["Leaving"]
jazzanova has joined #ruby
nemesit has quit [Ping timeout: 246 seconds]
<fgro>
thanks all for the feedback. i'm using lupins solution with URI
<lupine>
well, if you're going to use File, you might as well use File.basename
Drager has quit [Changing host]
Drager has joined #ruby
vlad_starkov has joined #ruby
<lupine>
but it doesn't cope with querystring
<jazzanova>
is anyone here wants to work in SF ?
swex has quit [Remote host closed the connection]
<lupine>
jazzanova, did it secede from the US yet?
<gcds>
how to check array elements if includes another array elements?
<havenn>
lupine: Heh, true, true. :P URI is way to go.
<jazzanova>
if it did, would you ?
<Xeago>
gcds: ary.all? { |e| ary2.contains? e
<lupine>
jazzanova, I might consider it
birderic has quit [Ping timeout: 245 seconds]
eignerchris has quit [Remote host closed the connection]
<lupine>
as it is, I won't even visit, never mind work there
<jazzanova>
lupine, I just joined this company, call 500friends. they are looking for people with brains
<lupine>
^^
<jazzanova>
I thought I'd help them out
<shevy>
hehe
R3dy has quit [Ping timeout: 250 seconds]
Xeago has quit [Read error: Connection reset by peer]
<shevy>
lupine you don't want to move there?
<jazzanova>
lupine: where do you live?
<lupine>
hell no
<lupine>
the UK
Xeago has joined #ruby
* lupine
has been working where he is for four years, and is expected to help with recruiting an uber-bod in the new year
kil0byte_ has joined #ruby
<jazzanova>
what is uber-bod ?
<shevy>
I think a typo
<Xeago>
a typo for what?
<lupine>
highly skilled senior programmer
<shevy>
uber-god!!!
<lupine>
it was not a typo :)
swex has joined #ruby
<lupine>
("bod" =~ "body" =~ "person")
<havenn>
biochemical oxygen demand?
<havenn>
oh.
<shevy>
lol
<shevy>
guessing words :)
dankest has joined #ruby
<lupine>
ruby programmers are like rocking-horse leavings over here, though. senior ones are like unicorn-rocking horse hybrid leavings
<gcds>
Xeago: undefined method `contains?' for [5, 6, 7]:Array
<jazzanova>
ok, thats what these guys at work tell me, lots of ruby programmers, but they can't pass a test
Xeago has quit [Read error: Connection reset by peer]
<lupine>
we generally get single-digit levels of applicants when we advertise
<shevy>
jazzanova what kind of test
<havenn>
jazzanova: Challenge Accepted.
<lupine>
the ones that apply are generally competent, but not senior
<shevy>
single digit level?
kil0byte has quit [Ping timeout: 256 seconds]
<lupine>
0..9 people
<shevy>
ah
Xeago has joined #ruby
<Lope>
anyone here use Aptana? I'm trying to set up the debugger. Google has not been yielding any guides or docs that are current or official.
<shevy>
lupine why the 0 :)
<lupine>
we don't even specify ruby as an absolute dependency
<lupine>
shevy, that happened once. it was most depressing
<jazzanova>
shevvy, havenn: ok, email me at galt007@nym.hush.com your CV I will pass it on.
<shevy>
ruby is awesome... unfortunately most of the jobs advertized are just boring
* lupine
gets to build a cloud hosting platform
<shevy>
jazzanova I am sitting in central europe, can't really relocate easily
<lupine>
it's quite interesting most of the time
<jazzanova>
do you know someone in the states ?
<shevy>
jazzanova have you tried on #rubyonrails yet?
<havenn>
There was a very cool post on TopRubyJobs the other day for remote work with a Melbourne team, not up anymore though :( http://toprubyjobs.com
cmarques has joined #ruby
<jazzanova>
no
<lupine>
ISTR they're fairly hostile to recruitment attempts there
<havenn>
jazzanova: I don't want the job, I just want to take the test... :P
<lupine>
I asked politely if it was on-topic and got a few nos back, last time we were hunting
<jazzanova>
shevy: here's a puzzle for you (not programming related), but just for kicks. Use numbers 1,3,4,6 to make 24. You can use plus, minus, times, divide, and any number of parenthesis. can't juxtapose digits. must use all numbers.
<shevy>
whoa... Melbourne... that's australia isn't it? that's even more far away than the USA
lampe2 has joined #ruby
jackbrownhf has quit [Quit: Sto andando via]
<lupine>
that belongs on countdown, not in a programming test
<shevy>
hehe
<shevy>
6 * 24 = 24, so we multiply with 1, which we can get by 1 ** 3, if ** is allowed
kkh has quit [Quit: Good bye!]
<jazzanova>
havenn: do you know about InterviewStreet.com ? they have good challenges
__miha__ has quit [Ping timeout: 252 seconds]
<shevy>
I mean 6 * 4 of course
mikepack has quit [Remote host closed the connection]
kkh has joined #ruby
<jazzanova>
** is not allowed
<shevy>
:(
<lupine>
if someone asked that kind of a question at an interview, I'd probably lose interest in the job
Uranio has quit [Remote host closed the connection]
<lupine>
and don't forget: rare as rocking-horse leavings
<havenn>
The answer in Ruby is easy... >.>: 6 * 4 + 1 / 3 #=> 24
<shevy>
oh yeah
<Sou|cutter>
isn't that juxtaposing digits?
<shevy>
I thought it was a math problem though
Trioke has joined #ruby
Xeago has quit [Ping timeout: 246 seconds]
v0n has quit [Ping timeout: 246 seconds]
<havenn>
shevy: I jest.
<shevy>
but it is true!
tobinharris has quit [Quit: tobinharris]
<lupine>
if they permit that but forbid **, they need stabbing ^^
<jazzanova>
:)
mikepack has joined #ruby
<jazzanova>
its a fun problem
<shevy>
that's perfectly valid ruby code giving the correct answer
moted has joined #ruby
<shevy>
havenn, you have the job man
ghanima has joined #ruby
tvw has quit [Remote host closed the connection]
lenovodroid has quit [Ping timeout: 264 seconds]
jaygen has quit [Read error: Operation timed out]
generalissimo has joined #ruby
<Sou|cutter>
still it should be 1/3 + 4*6
<Sou|cutter>
you broke the juxtaposition rule
<lupine>
6/(1-3/4) ?
iamvery has joined #ruby
aganov has quit [Remote host closed the connection]
R3dy has joined #ruby
<shevy>
that gives me 6
stkowski has joined #ruby
<lupine>
in ruby: 6.0 / (1-3.0/4.0)
<jrajav>
Sou|cutter: Do you know what juxtapose means?
thisirs has quit [Remote host closed the connection]
<Sou|cutter>
jrajav: no, I thought it meant switching the order
<jrajav>
It means to put two things beside each other
<Sou|cutter>
jrajav: I am so ashamed
<shevy>
lupine, you got the junior job, with havenn being your senior!
<shevy>
hehe cool... even a website solving such things
<shevy>
soon we need no humans anymore
Xeago has joined #ruby
<jrajav>
lupine: Mensa is going to burn you at the stake
<havenn>
lupine: sweet!
<lupine>
if the recruiting people thought that was a worthwhile test of skill, I'd probably expect to see performance assessed on the basis of automated code metrics
<Sou|cutter>
jrajav: this public shaming will mean I never forget, though!
hydrozen has joined #ruby
<lupine>
I just wouldn't want to work there
<jrajav>
Sou|cutter: Uh.. good? I guess? :P
<lupine>
and being rare, we can all be very picky about where we work
jaygen has joined #ruby
<lupine>
at my interview for this job, they gave me a short ruby program and asked me to explain what it did and suggest improvements
d2dchat has quit [Remote host closed the connection]
<lupine>
(at the time, my only experience with ruby was via chunky bacon, but I managed to satisfy them, and enjoyed the test)
<shevy>
hehe
<hydrozen>
is there a way I can use the Thor::Shell::Basic methods (such as 'say', 'yes?') in a class that does not inherit from Thor? I kept the implementation of my actual tasks outside of the cli Thor class… so I'm wondering how I can use those methods in there.
<lupine>
class MyClass ; def initialize(thor_instance) ; @thor_instance = thor_instance ; end ; def say ; @thor_instance.say ; end
<lupine>
end
love_color_text has joined #ruby
Xeago has quit [Ping timeout: 260 seconds]
alx- has quit [Quit: alx-]
samphippen has joined #ruby
nabeen has joined #ruby
brandon|work has quit [Ping timeout: 245 seconds]
nabeen has quit [Client Quit]
_nitti has joined #ruby
swex has quit [Read error: Connection reset by peer]
cableray has joined #ruby
v0n has joined #ruby
FredLe has quit [Ping timeout: 246 seconds]
adeponte has joined #ruby
swex has joined #ruby
dr_bob has quit [Quit: Leaving.]
dnstbr has quit [Ping timeout: 260 seconds]
carlyle has quit [Remote host closed the connection]
u89 has quit [Remote host closed the connection]
apeiros_ has joined #ruby
kil0byte_ has quit [Remote host closed the connection]
ghanima has quit [Quit: Leaving.]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
R3dy has quit [Changing host]
R3dy has joined #ruby
lkba has quit [Quit: Bye]
rippa has joined #ruby
breefield has joined #ruby
dnstbr has joined #ruby
robustus has joined #ruby
hoelzro is now known as hoelzro|away
u89 has joined #ruby
dr_bob has joined #ruby
trevortwining has quit [Quit: trevortwining]
machty has joined #ruby
ryanlecompte has joined #ruby
Slivka has joined #ruby
breefield has quit [Client Quit]
slainer68 has quit [Remote host closed the connection]
eignerchris has joined #ruby
olrrai has joined #ruby
olrrai has quit [Client Quit]
jazzanova has left #ruby [#ruby]
blazes816 has joined #ruby
mark_locklear has quit [Read error: Connection reset by peer]
lampe2 has quit [Remote host closed the connection]
lampe2 has joined #ruby
lampe2 has quit [Read error: Connection reset by peer]
lampe2 has joined #ruby
classix has joined #ruby
brianpWins has joined #ruby
h4mz1d has quit [Ping timeout: 260 seconds]
lkba has joined #ruby
Banistergalaxy has joined #ruby
matthewrobbins has quit [Quit: matthewrobbins]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
ch4se has joined #ruby
branon has joined #ruby
danneu has joined #ruby
wallerdev has joined #ruby
shtirlic has quit [Remote host closed the connection]
leifmadsen has quit [Ping timeout: 256 seconds]
shtirlic has joined #ruby
bjeanes has quit [Ping timeout: 246 seconds]
shtirlic_ has joined #ruby
lusory has joined #ruby
ToTo has quit [Quit: Leaving...]
_cheney has joined #ruby
Uranio has joined #ruby
<lectrick>
what is more expensive, a local variable creation or a symbol key lookup on a medium size hash?
shtirlic has quit [Ping timeout: 255 seconds]
<lectrick>
(I guessed the latter, just confirming)
manizzle has quit [Ping timeout: 252 seconds]
luki3k5 has quit [Quit: Leaving...]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
Ivo has joined #ruby
u89 has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 246 seconds]
tpe11etier_ has joined #ruby
king313 has joined #ruby
ninegrid has quit [Read error: Connection reset by peer]
<shevy>
lectrick hah those questions are great
<shevy>
lectrick I'd say the local variable
<lectrick>
I suppose I could answer it with a quick irb session and bm, eh?
<shevy>
perhaps we can reason logically
<shevy>
pffft testing is overrated
<lectrick>
haha
iamjarvo has quit [Quit: Computer has gone to sleep.]
<shevy>
when is a hash more expensive than a local variable
<shevy>
hash = Hash.new; local_variable = nil
scriabin has joined #ruby
<shevy>
right at that moment?
kil0byte has joined #ruby
<shevy>
are objects in ruby occupying the same amount of RAM?
Elhu has quit [Quit: Computer has gone to sleep.]
naquad has quit [Ping timeout: 260 seconds]
<lectrick>
basically I am looking up the same key about 3 times in a method and I decided to memoize it with a local variable in the if clause, so for example if(rt=params[:some_key]); URL(rt)... ; rt.whatever... end
d2dchat has joined #ruby
u89 has joined #ruby
Uranio has quit [Quit: WeeChat 0.3.8]
v0n has quit [Ping timeout: 246 seconds]
<lectrick>
shevy: at that moment, neither is
<scriabin>
if I have Switch.log_result as a method of the Switch class, and @switch is a Switch, and @switch.class returns Switch then how come @switch.class.log_result returns NoMethodError: undefined method `log_result' for #<Class:0x00000018cade70> ?
<lectrick>
although I imagine the hash creation takes CPU, just via object generation
Bootstrapper has joined #ruby
<scriabin>
is there some ruby magic required here?
birderic has joined #ruby
danneu has quit [Quit: WeeChat 0.3.8]
<lectrick>
scriabin: is log_result a class method or instance method? Does Switch.log_result return something? If so it's actually a class method
adeponte has quit [Remote host closed the connection]
FredLe has joined #ruby
danneu has joined #ruby
<birderic>
I am trying to parse a 200 MB json file but am having trouble, can anyone help me out?
rippa has joined #ruby
<lectrick>
scriabin: it looks like you defined it as an instance method, which means you can't access it via Switch.log_result OR @switch.class.log_result
<danneu>
birderic: what's the Q
joeycarmello has quit [Quit: Leaving...]
<lectrick>
birderic: you probably need a streaming json parser, that should be enough to google on eup
<lectrick>
birderic: "google one up" I meant
<birderic>
I am using yajl
buibex has joined #ruby
Marius has quit [Quit: Leaving]
<lectrick>
i'm not familiar with particular json parsers, i just know that parsing a large file requires a streaming parser
<JonnieCache>
yajl does streaming i think
<JonnieCache>
yajl is the fancy C one that goes really fast
<lectrick>
birderic: yajl might have a streaming mode you have to turn on manually, possibly
<birderic>
Ok, any recommendations besides yajl?
<danneu>
yajl is pretty much *the* streaming json parser for ruby
<lectrick>
birderic: yeah that's all I got, good luck though, just bang around a bit more, you will probably get it working
jamesaxl has joined #ruby
Vainoharhainen has quit [Quit: Leaving...]
<birderic>
Thanks, I'm new to ruby so I'm having a little trouble
<lectrick>
birderic: remember to close your IO objects :)
<birderic>
But I'll try to work throught it
<lectrick>
birderic: ah ok. well... it is worth struggling a bit, I guess, is what I mean
ninegrid has joined #ruby
<lectrick>
birderic: that yaji-ruby page had some examples
<lectrick>
go play around with em
<birderic>
Yea I followed the examples
pothibo has quit [Quit: pothibo]
<birderic>
But beyond that is where I get lost
<lectrick>
if you get a specific error while playing, shoot it here
huoxito has joined #ruby
<lectrick>
birderic: any specific piece of code or concept you need explanation with?
Snugug has joined #ruby
<birderic>
Yes, let me get the error
rakl has joined #ruby
Aiur has joined #ruby
wallerdev has quit [Quit: wallerdev]
<birderic>
Found multiple JSON objects in the stream but no block or the on_parse_complete callback was assigned to handle them. (Yajl::ParseError)
samphippen has quit [Quit: Computer has gone to sleep.]
manizzle has joined #ruby
<lectrick>
birderic: so you need to pass a block to the method that actually parses the input stream. it looks like that block should take 1 variable, which will contain the JSON object that that block will then do something with
<lectrick>
birderic: FYI I know nothing about this particular gem or functionality, I just know Ruby fairly well
<birderic>
Ok, so I did that, and its parsing it now, but its only parsing like 20 records and then it stops
<birderic>
There should be like 6000 records
<lectrick>
birderic: is there a json parse error at that point?
heftig has joined #ruby
<birderic>
No, it just stops
samphippen has joined #ruby
mnaser has quit [Excess Flood]
<lectrick>
birderic: maybe inspect the parse object itself for any errors it ran into? you can put a "p " before objects to print out an inspection of them.
<rking>
LOL, typing and voiping leads to strange things (on both sides)
<rking>
I meant s/\?/!/
<cableray>
you're welcome?
kirun has joined #ruby
<cableray>
lolz
noxoc has quit [Quit: noxoc]
xyzodiac has joined #ruby
mjb2k has joined #ruby
jackdanger has quit [Quit: Leaving.]
_br_ has quit [Excess Flood]
havenn has joined #ruby
jlogsdon has joined #ruby
jlogsdon has quit [Remote host closed the connection]
jlogsdon has joined #ruby
_br_ has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
<Poapfel>
do enviorment variables such as 'RUBY_GC_MALLOC_LIMIT' only apply for rails or do they apply for ruby in general?
jds has quit [Remote host closed the connection]
soyapi has quit [Read error: Connection reset by peer]
_br_ has quit [Excess Flood]
_br_ has joined #ruby
Monie has quit [Ping timeout: 255 seconds]
aaronmcadam has joined #ruby
eldariof has joined #ruby
<aaronmcadam>
hey can someone take a quick look at this please, it's a very simple selenium file I want to run standalone https://gist.github.com/4163911
<aaronmcadam>
getting require': cannot load such file -- selenium-webdriver (LoadError)
elkclone has joined #ruby
<Hanmac>
Poapfel i never saw this before
soyapi has joined #ruby
seanyo has quit [Ping timeout: 264 seconds]
gilligan_ has quit [Quit: Leaving]
jackdanger has joined #ruby
whowantstolivef has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
<Hanmac>
Poapfel i dont trust the script ... flicking with GC itself could be backfiring
jlogsdon_ has joined #ruby
rippa has quit [Ping timeout: 255 seconds]
<Hanmac>
in short: the patch may break C-extendions
mikepack has joined #ruby
_br_ has joined #ruby
<aaronmcadam>
waxjar, you're right
<aaronmcadam>
waxjar: if i run ruby with `rvm ruby..` it works
jlogsdon has quit [Ping timeout: 260 seconds]
hotovson has joined #ruby
<aaronmcadam>
tho it runs the script twice for some reason
Nisstyre has quit [Read error: Connection reset by peer]
<cableray>
so I'm looking for some open source projects to contribute to. Anyone know of some interesting projects that need help? Preferably smaller ones with active maintainers.
ebouchut_ has joined #ruby
rezzack has joined #ruby
<waxjar>
hmm, i'm not familiar with rvm aaronmcadam, sorry
<aaronmcadam>
alrighty, thanks anyway!!
ebouchut_ has quit [Client Quit]
ChampS666 has quit []
<waxjar>
yw
_br_ has quit [Excess Flood]
ryanf has joined #ruby
Nisstyre has joined #ruby
Guest24042 has quit [Quit: Guest24042]
_br_ has joined #ruby
reinaldob has quit [Remote host closed the connection]
hotovson has quit [Ping timeout: 246 seconds]
carloslopes has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 250 seconds]
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
jrist-afk is now known as jrist
eka has quit [Remote host closed the connection]
scriabin has quit [Ping timeout: 245 seconds]
iamjarvo has joined #ruby
_br_ has quit [Excess Flood]
_br_ has joined #ruby
carlyle has quit [Remote host closed the connection]
ejdyksen has quit []
adeponte has joined #ruby
xyzodiac has joined #ruby
k611 has joined #ruby
eka has joined #ruby
<havenn>
cableray: Pure Ruby only?
tenmilestereo has quit [Quit: Leaving]
<havenn>
cableray: How small by small? 200 lines of code? 2000? 200,000?
jrajav has quit [Quit: I tend to be neutral about apples]
<havenn>
Or does it matter?
_br_ has quit [Excess Flood]
darthdeus has quit [Read error: Connection reset by peer]
k610 has quit [Ping timeout: 260 seconds]
lenovodroid has joined #ruby
darthdeu has joined #ruby
jackbrownhf has quit [Quit: Sto andando via]
timonv has joined #ruby
_br_ has joined #ruby
pyr0commie has joined #ruby
_br_ has quit [Excess Flood]
_br_ has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
bricker has quit [Read error: Connection reset by peer]
DocAwesome has joined #ruby
<apeiros_>
hakunin: a being a method not a variable is not closed over
jackdanger has quit [Client Quit]
<hakunin>
apeiros_: wait, methods never are, right? this gets me every freaking time
_alejandro has quit [Remote host closed the connection]
codecop has quit [Quit: Išeinu]
<apeiros_>
methods depend on the receiver
manizzle has joined #ruby
<apeiros_>
proc/lambda close over self, unless the evaluation of the Proc sets the self. instance_eval, define_method, define_singleton_method do that
davidcelis has joined #ruby
<apeiros_>
for obvious reasons
leifmadsen has quit [Ping timeout: 260 seconds]
blitzrage has quit [Ping timeout: 246 seconds]
jeffreybaird has quit [Quit: jeffreybaird]
<apeiros_>
(your instance method wouldn't really be an instance method if self wasn't changed to the object it is called on)
leifmadsen has joined #ruby
iPhoneMRZ has joined #ruby
iPhoneMRZ has quit [Client Quit]
dangerousdave has quit [Quit: Leaving...]
<hakunin>
apeiros_: yes i knew about instance_eval's self-swapping behavior, but failed to relate it to dynamic method definition, it makes sense now, thx
* apeiros_
has a swiss brain, holes like a cheese, but the programming stuff sticks :)
shtirlic has quit [Remote host closed the connection]
nomenkun has joined #ruby
<hakunin>
heh
ejdyksen has joined #ruby
aaronmcadam has quit [Quit: aaronmcadam]
proshot has quit [Quit: Leaving]
<hakunin>
apeiros_: so that question - i mean, ideally you should about it somewhere :)
clop has quit [Quit: Leaving]
<apeiros_>
you are a verb
<hakunin>
blog
<Virunga>
Hi, i have to define a bunch of variables inside a script that share the base name and i thought to use metaprogramming, but i don't know how to do it. Could you help me, please?
<Virunga>
Is instance_variable_set ok ?
<v0n>
quick-hack-request! How would you remove consecutive duplicates in an array? [1, 1, 3, 3, 1] => [1, 3, 1]
<apeiros_>
Virunga: you want to abuse the variable name system as a hash
<apeiros_>
Virunga: use a hash instead.
iPhoneMRZ has joined #ruby
_guy has quit [Ping timeout: 260 seconds]
iPhoneMRZ has quit [Client Quit]
<apeiros_>
v0n: hm, Enumerable#chunk might be useful
schleppy has joined #ruby
leifmadsen has quit [Ping timeout: 250 seconds]
DocAwesome has quit [Ping timeout: 260 seconds]
_guy has joined #ruby
<apeiros_>
v0n: alternatively reject with a helper variable. needs a safe initial value, though. or you have to start iterating at index 1 instead of 0
brianpWins has quit [Remote host closed the connection]
breefield has quit [Quit: breefield]
brianpWins has joined #ruby
iPhoneMRZ has joined #ruby
<Virunga>
Something like h = {}; %w(1 2 3).each_with_object(h) {|e| h["base_#{e}"] = something} ?
<apeiros_>
v0n: just tried it. you can solve it quite nicely with chunk.
<apeiros_>
Virunga: why not base[1] = something?
<apeiros_>
i.e., base={}; %w[1 2 3].each do |k| base[k] = something end
<v0n>
apeiros_, actually looking at the doc, didn't know #chunk :-)
phantasm66 has quit [Quit: *sleeeeep*]
xyzodiac has joined #ruby
bricker_ has quit [Quit: leaving]
bricker has joined #ruby
<Virunga>
apeiros_: your example is simpler and mine is also wrong, thanks.
proshot has joined #ruby
shufflebot has joined #ruby
aldodelgado has joined #ruby
Virunga has quit [Remote host closed the connection]
txdv_ is now known as txdv
dangerousdave has quit [Quit: Leaving...]
Xeago_ has quit [Remote host closed the connection]
bwlang has left #ruby [#ruby]
GoGoGarrett has quit [Remote host closed the connection]
mengu has quit [Read error: Connection reset by peer]
hukl has quit [Quit: Leaving...]
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
jgarvey has quit [Quit: Leaving]
benlieb has quit [Quit: benlieb]
alex__c2022 has quit [Ping timeout: 256 seconds]
<elementz>
hi all. I am trying to parse a yml-file from a url, and then select specific items. please see my gist: https://gist.github.com/4165359 . but when i run this code, i always get the exact same output, which is the complete yml-file. what am i missing?
mrluc has joined #ruby
<apeiros_>
elementz: s/yml/yaml/, please, DOS 8.3 names are sooo over
phantasm66 has joined #ruby
daniel_- has quit [Quit: WeeChat 0.3.9.2]
alanp has quit [Read error: Operation timed out]
alanp has joined #ruby
ikaros has joined #ruby
<elementz>
apeiros_: please excuse me, but what are you referring to?
<apeiros_>
it's yaml, not yml
lastd0nkeY has quit [Remote host closed the connection]
<davidcelis>
YAML
<davidcelis>
YAML Ain't Markup Language
<apeiros_>
elementz: Array#select returns all elements in the array for which the block returns a trueish value
<apeiros_>
you probably want `lang = yml[0]['language'] instead
<elementz>
apeiros_: hm. ok will try
nemesit has quit [Quit: Leaving...]
ner0x has quit [Quit: Leaving]
emanu has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
emanu has joined #ruby
Michael__ has joined #ruby
invisime has quit [Quit: Leaving.]
i_s has quit [Quit: i_s]
stephenjudkins has joined #ruby
schleppy has quit [Ping timeout: 252 seconds]
i_s has joined #ruby
<v0n>
apeiros_, hum, it's gonna be tricky with #chunk
jenrzzz has joined #ruby
<apeiros_>
v0n: how did you try to do it?
<apeiros_>
it's very simple with chunk…
fgro has joined #ruby
aldodelgado has quit [Quit: aldodelgado]
Elfix has quit [Quit: server moving]
oponder has joined #ruby
schleppy has joined #ruby
phantasm66 has quit [Quit: *sleeeeep*]
oponder has quit [Read error: Connection reset by peer]
Dave_ has joined #ruby
arya has quit [Ping timeout: 252 seconds]
Michael__ has quit [Remote host closed the connection]
error_code has quit [Ping timeout: 260 seconds]
emanu has quit [Read error: Connection reset by peer]
fir_ed has joined #ruby
dankest is now known as dankest|away
berserkr1 has joined #ruby
mugger has quit [Ping timeout: 246 seconds]
theRoUS has quit [Ping timeout: 255 seconds]
sspiff has quit [Ping timeout: 246 seconds]
joofsh has quit [Ping timeout: 245 seconds]
_nitti has quit [Remote host closed the connection]
emanu has joined #ruby
branon has quit [Ping timeout: 256 seconds]
reinaldob has joined #ruby
sspiff has joined #ruby
DrShoggoth has quit [Quit: Leaving]
Michael__ has joined #ruby
platzhirsch has joined #ruby
<platzhirsch>
I love ruby
solidoodlesuppor has quit [Remote host closed the connection]
<eka>
platzhirsch: and ruby loves you ;)
manizzle has quit [Remote host closed the connection]
schleppy has quit [Read error: Connection reset by peer]
schleppy1 has joined #ruby
bricker has quit [Ping timeout: 260 seconds]
arya has joined #ruby
stopbit has quit [Quit: Leaving]
Spami has quit [Quit: This computer has gone to sleep]
jamesaxl has quit [Ping timeout: 255 seconds]
jamesaxl has joined #ruby
reinaldob has quit [Remote host closed the connection]
Chryson has joined #ruby
shufflebot has joined #ruby
L1_ has quit [Quit: Quitter]
elementz has quit [Quit: leaving]
jackbrownhf has quit [Quit: Sto andando via]
L1 has joined #ruby
generalissimo has quit [Remote host closed the connection]
arya has quit [Ping timeout: 246 seconds]
alex__c2022 has joined #ruby
zigomir has joined #ruby
Michael__ has quit [Remote host closed the connection]
dankest|away is now known as dankest
jrunning_ has joined #ruby
_guy has quit [Ping timeout: 245 seconds]
twopoint718 has quit [Ping timeout: 264 seconds]
k611 has quit [Ping timeout: 252 seconds]
alex__c2022 has quit [Ping timeout: 248 seconds]
Axsuul has joined #ruby
soyapi has quit [Read error: Operation timed out]
sspiff has quit [Ping timeout: 256 seconds]
havenn_ has quit [Remote host closed the connection]
Synthead has quit [Quit: p33 ba115]
x77686d has quit [Quit: x77686d]
havenn has joined #ruby
_guy has joined #ruby
zigomir has quit [Quit: zigomir]
vasile has joined #ruby
R3dy has joined #ruby
sjkaliski has quit [Quit: Leaving...]
jlogsdon_ has joined #ruby
carlyle has quit [Remote host closed the connection]
julio_ has joined #ruby
gabrielrotbart has joined #ruby
i_s has quit [Quit: i_s]
<apeiros_>
v0n?
havenn has quit [Ping timeout: 248 seconds]
jds has quit [Remote host closed the connection]
tommyvyo has quit [Ping timeout: 246 seconds]
jlogsdon has quit [Ping timeout: 255 seconds]
x77686d has joined #ruby
kiwnix has joined #ruby
julio_ has left #ruby [#ruby]
dukedave has quit [Quit: Leaving.]
jimeh has quit [Quit: Computer has gone to sleep.]