samphippen has quit [Quit: Computer has gone to sleep.]
d2dchat has joined #ruby
joeycarmello has joined #ruby
mmlac has quit [Quit: mmlac]
yshh has joined #ruby
kbeddingfield has joined #ruby
arietis has joined #ruby
bigmac has joined #ruby
tds has joined #ruby
joeycarmello has quit [Ping timeout: 240 seconds]
bricker has quit [Quit: leaving]
kbeddingfield has quit [Remote host closed the connection]
quest88_ has joined #ruby
savage- has joined #ruby
BadLarry has quit [Ping timeout: 245 seconds]
joeycarmello has joined #ruby
Vert has quit [Remote host closed the connection]
BadLarry has joined #ruby
kbeddingfield_ph has joined #ruby
voodoofish430 has quit [Quit: Leaving.]
artOfWar has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
icole has quit [Remote host closed the connection]
artOfWar has quit [Remote host closed the connection]
rakl has quit [Quit: sleeping]
icole has joined #ruby
artOfWar has joined #ruby
Juul has quit [Ping timeout: 240 seconds]
gabrielrotbart has joined #ruby
arubin- has quit []
slainer68 has quit [Remote host closed the connection]
arubin has joined #ruby
carlyle has quit [Remote host closed the connection]
hbpoison has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
vickaita has joined #ruby
icole has quit [Ping timeout: 276 seconds]
richardjortega has quit [Remote host closed the connection]
dakine has quit [Quit: Leaving]
erichmenge has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
richardjortega has joined #ruby
JStoker_ is now known as JStoker
kbeddingfield_ph has quit [Remote host closed the connection]
hbpoison has quit [Ping timeout: 260 seconds]
dmiller has joined #ruby
armenb has joined #ruby
vickaita has quit [Ping timeout: 265 seconds]
erichmenge has quit [Client Quit]
cableray has joined #ruby
<rcsheets>
I am using bundler, and one of the gems I specify in my bundle has a native extension, but that native extension needs an option passed to extconf.rb in order to build on my system. What's the right way to get this built?
greenarrow has quit [Quit: IRC is just multiplayer notepad]
xcvd`` has quit [Read error: Connection reset by peer]
Dreamer3__ has joined #ruby
_bart has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
_bart_ has quit [Read error: Connection reset by peer]
mklappstuhl has quit [Ping timeout: 256 seconds]
maletor has joined #ruby
cableray has quit [Quit: cableray]
elementz has quit [Quit: leaving]
joeycarmello has quit [Remote host closed the connection]
mmitchell has joined #ruby
fantazo has quit [Read error: Operation timed out]
mmitchell has quit [Remote host closed the connection]
n_blownapart has joined #ruby
fantazo has joined #ruby
seanstickle has quit [Quit: seanstickle]
Takehiro_ has joined #ruby
jorgeastorga has joined #ruby
savage- has quit [Read error: Connection reset by peer]
JustinCampbell has quit [Remote host closed the connection]
savage- has joined #ruby
<n_blownapart>
hi I'm wondering why line 9 doesn't return an empty array as the textbook claims. I'm not certain about the [1] notation so I tried $1 in the commented line which I'm also not certain about. the commented line returns an empty array then nil. thanks: http://pastie.org/5147991
keyvan has joined #ruby
keyvan has quit [Changing host]
keyvan has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
jpreyer has joined #ruby
<n_blownapart>
^^ btw this program is a part of the book in so many words "what not to do in ruby."
guns has joined #ruby
perryh has quit [Excess Flood]
slainer68 has joined #ruby
sn0wb1rd has joined #ruby
perryh has joined #ruby
jorgeastorga has quit [Remote host closed the connection]
<DaDaDOSPrompt>
What's the name of that one library which will use Ruby to automatically fill out webforms on an open browser as though the data were being entered at least semi-manually? Is there such a thing? Many such things?
gabrielrotbart has quit [Remote host closed the connection]
cakehero has joined #ruby
Slivka has quit [Remote host closed the connection]
<catepillar>
DaDaDOSPrompt: watir
<catepillar>
i believe
<DaDaDOSPrompt>
thank you
<catepillar>
I haven't touched it in several years, so I don't know how it handles 1.9.*
<DaDaDOSPrompt>
ah, hm, so Ruby is in a troubling version hump at the moment, eh?
Iszak has quit []
<DaDaDOSPrompt>
alas, so it goes.
<catepillar>
not really
<catepillar>
1.9.* has been stable and is very usuable
eternicode has joined #ruby
Tarential has joined #ruby
<n_blownapart>
catepillar could you take a look at this? thanks hi I'm wondering why line 9 doesn't return an empty array as the textbook claims. I'm not certain about the [1] notation so I tried $1 in the commented line which I'm also not certain about. the commented line returns an empty array then nil. thanks: http://pastie.org/5147991
<catepillar>
i just haven't used watir since 1.8.6, and I know watir is an active community, so I can't say if anything has changed since i used it
* catepillar
isn't a ruby expert...
slainer68 has quit [Remote host closed the connection]
<catepillar>
i would much rather leave that to someone who is a bit more established in ruby than I am
rwa has joined #ruby
rwa has left #ruby [#ruby]
<catepillar>
i just dabble a little
<n_blownapart>
catepillar: cool thanks
rwa has joined #ruby
xorspark has joined #ruby
<rwa>
when using haml, where should I add this line to include Gravatarify's methods?? "Haml::Helpers.send(:include, Gravatarify::Helper)"
fyolnish has quit [Remote host closed the connection]
jeremywrowe has quit [Quit: jeremywrowe]
d2dchat has quit [Remote host closed the connection]
nitti has joined #ruby
luckyruby has joined #ruby
<ryanf>
probably an initializer
<ryanf>
i.e., a file in config/initializers
<ryanf>
oh sorry forgot which room this is
<ryanf>
are you talking about using it outside rails?
<rwa>
no, thats ok
tjbiddle has quit [Ping timeout: 260 seconds]
<n_blownapart>
ryanf would you mind clarifying this for me? thanks: could you take a look at this? thanks hi I'm wondering why line 9 doesn't return an empty array as the textbook claims. I'm not certain about the [1] notation so I tried $1 in the commented line which I'm also not certain about. the commented line returns an empty array then nil. thanks: http://pastie.org/5147991
jarred has joined #ruby
jarred has left #ruby [#ruby]
jarred has joined #ruby
jarred has left #ruby [#ruby]
nitti has quit [Ping timeout: 260 seconds]
medik has quit [Remote host closed the connection]
rakl has joined #ruby
charliesome has joined #ruby
jeremywrowe has joined #ruby
havenn has joined #ruby
dakine has joined #ruby
eternicode has left #ruby ["buh-byez."]
SCommette has quit [Quit: SCommette]
ttt has joined #ruby
cableray has joined #ruby
ffranz has quit [Ping timeout: 260 seconds]
daniel_-_ has quit [Ping timeout: 252 seconds]
kbeddingfield has joined #ruby
ctwiz has quit [Quit: ctwiz]
techhelp has joined #ruby
JonnieCache has joined #ruby
kbeddingfield has quit [Ping timeout: 252 seconds]
hbpoison has joined #ruby
luckyruby has quit [Remote host closed the connection]
c0rn has quit [Quit: Computer has gone to sleep.]
BoomCow has quit [Quit: This computer has gone to sleep]
Araxia has joined #ruby
richardjortega has left #ruby [#ruby]
jarred_ has joined #ruby
jarred_ has left #ruby [#ruby]
J-_-L has joined #ruby
g-ram has joined #ruby
IrishGringo has quit [Read error: Operation timed out]
Quadlex has quit [Read error: Connection reset by peer]
justinmcp has quit [Remote host closed the connection]
JonnieCache has quit [Ping timeout: 244 seconds]
ffranz has joined #ruby
vickaita has joined #ruby
justinmcp has joined #ruby
mneorr has quit [Remote host closed the connection]
Monie has quit [Ping timeout: 260 seconds]
IrishGringo has joined #ruby
kidoz has quit [Quit: Ухожу я от вас]
justinmcp has quit [Ping timeout: 268 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
dogweather has quit [Remote host closed the connection]
nateberkopec has joined #ruby
thinkdevcode has joined #ruby
moshee has quit [Ping timeout: 246 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
mercwithamouth has quit [Ping timeout: 248 seconds]
tvw has quit [Ping timeout: 260 seconds]
mneorr has joined #ruby
bbttxu has joined #ruby
BadLarry has quit [Ping timeout: 240 seconds]
keyvan has quit [Remote host closed the connection]
tvw has joined #ruby
nateberkopec has quit [Client Quit]
mneorr has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
BadLarry has joined #ruby
brendan` has joined #ruby
n_blownapart has quit [Remote host closed the connection]
lukeholder has joined #ruby
hbpoison has quit [Ping timeout: 240 seconds]
nari has joined #ruby
maletor has joined #ruby
fyolnish has joined #ruby
stkowski has quit [Quit: stkowski]
BadLarry has quit [Ping timeout: 256 seconds]
J-_-L has quit [Ping timeout: 260 seconds]
Grieg has joined #ruby
<Grieg>
hello
chrisja has quit [Quit: leaving]
<Grieg>
was wondering what ruby is. it isnt for a system programming or is it?
BadLarry has joined #ruby
<arietis>
Grieg: it can be used for it
<havenn>
Grieg: It is a general purpose programming language that is good for systems programming amongst other things.
<catepillar>
no adding anything to apache conf files?
dekroning has joined #ruby
hoelzro|away is now known as hoelzro
emergion has joined #ruby
Astral__ has joined #ruby
BoomCow has quit [Quit: Leaving]
g_bleezy_ has joined #ruby
g_bleezy has quit [Ping timeout: 244 seconds]
Astral_ has quit [Ping timeout: 255 seconds]
moshee has quit [Ping timeout: 246 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
chendo has quit [Read error: Operation timed out]
maletor has joined #ruby
Tearan has quit [Quit: Sleepy Badger....]
chendo_ has joined #ruby
dangerousdave has quit [Quit: Leaving...]
artOfWar has quit [Ping timeout: 255 seconds]
cento has quit [Quit: Ex-Chat]
wallerdev has quit [Quit: wallerdev]
codecaster has joined #ruby
HieLo has joined #ruby
und3f has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
ZubKonst has joined #ruby
justinmcp has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
<HieLo>
helloo
<hoelzro>
ahohy
<hoelzro>
er, ahoy.
<HieLo>
how are you
ZubKonst_ has quit [Ping timeout: 255 seconds]
cezar has joined #ruby
<hoelzro>
I'm doing well, thanks
<hoelzro>
and you?
cezar has quit [Client Quit]
<HieLo>
i'm ok man
apeiros_ has quit [Remote host closed the connection]
<HieLo>
where are you, hoelzro ?
<hoelzro>
at work
apeiros_ has joined #ruby
<HieLo>
xDD
<HieLo>
ah well, you either mild hackeron
<HieLo>
[hoelzro]
ddd has quit [Ping timeout: 245 seconds]
<HieLo>
bye : )
HieLo has quit [Quit: • IRcap • 8.6 •]
<hoelzro>
that was odd.
<yangchenyun>
Mon_Ouie, what do you mean by 'this object', is it [1,2,3] or just 1?
<yangchenyun>
Mon_Ouie, is there some doc to read . I search for & in the Ruby doc, but comes no clear result.
gener1c has joined #ruby
yangchenyun has quit [Quit: yangchenyun]
yangchenyun has joined #ruby
<yangchenyun>
hello, is there some doc for the usage of '&' in this expression? [1,2,3].map(&:to_s)
<hoelzro>
yangchenyun: it's a "Proc splat"
<hoelzro>
it interprets the argument as a Proc and associates it with the called method as that method's block
<hoelzro>
in that case, it's equivalent to [1,2,3].map { |n| n.to_s }
hbpoison has joined #ruby
nitti has joined #ruby
blacktulip has joined #ruby
hbpoison has quit [Ping timeout: 240 seconds]
Grieg has quit [Quit: laterz! :D]
Shrink has quit [Ping timeout: 244 seconds]
rdark has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
gabrielrotbart has quit [Remote host closed the connection]
<Mon_Ouie>
yangchenyun: The object is to_s
<Mon_Ouie>
:to_s I mmean
nitti has quit [Ping timeout: 260 seconds]
irleif has joined #ruby
gabrielrotbart has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
d3vic3 has joined #ruby
Virunga has joined #ruby
mahmoudimus has joined #ruby
adambeynon has joined #ruby
emergion has joined #ruby
sertaconay has joined #ruby
fantazo has joined #ruby
Shrink has joined #ruby
irleif has quit [Quit: Computer has gone to sleep.]
paul_s has joined #ruby
irleif has joined #ruby
justinmcp has quit [Remote host closed the connection]
justinmcp has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
JonnieCache has joined #ruby
justinmcp has quit [Ping timeout: 260 seconds]
daniel_-_ has joined #ruby
baphled has joined #ruby
ephemerian has joined #ruby
skum has joined #ruby
JonnieCache has quit [Ping timeout: 240 seconds]
nkts has quit []
shtirlic has joined #ruby
nari has quit [Ping timeout: 260 seconds]
icole has quit [Remote host closed the connection]
nohonor has joined #ruby
fixl has quit [Remote host closed the connection]
cantonic has quit [Quit: cantonic]
cantonic has joined #ruby
Xeago has joined #ruby
elaptics`away is now known as elaptics
Androidnewbe has joined #ruby
cantonic has quit [Client Quit]
<Androidnewbe>
hi guys can someone tell me how do i create envrionmental varaible form ruby ?
cantonic has joined #ruby
sepp2k has joined #ruby
<hoelzro>
Androidnewbe: I'm guessing ENV
<Androidnewbe>
set ENV['varialbe name'] = value
<Androidnewbe>
?
timmillwood has joined #ruby
emergion has joined #ruby
<hoelzro>
yeah
<catepillar>
does that last after the ruby session closes?
lukeholder has quit [Quit: Computer has gone to sleep.]
workmad3 has joined #ruby
mmlac has quit [Quit: mmlac]
<Androidnewbe>
im not sure
<Mon_Ouie>
No, setting an env variable only affects the current process and its children
<catepillar>
that's what i figured
nemesit has joined #ruby
hbpoison has joined #ruby
nitti has joined #ruby
arturaz has joined #ruby
hbpoison has quit [Ping timeout: 240 seconds]
mukesh-rk has joined #ruby
Progster has joined #ruby
mklappstuhl has joined #ruby
ramu3 has joined #ruby
nitti has quit [Ping timeout: 256 seconds]
<Androidnewbe>
testFile.rb:3:in `<main>': undefined method `set' for main:Object (NoMethodError)
<Androidnewbe>
hmm
<Androidnewbe>
mabe it cannot be doe
ramu3 has quit [Client Quit]
Neomex has joined #ruby
Neomex has quit [Client Quit]
drcode has joined #ruby
<drcode>
hi all
<drcode>
I got strange error rex/io load error, any idea? I did try to install librex and rex + io ?
timmow has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Gonzih has quit [Quit: WeeChat 0.3.5]
armenb has quit [Ping timeout: 255 seconds]
Gonzih has joined #ruby
fyolnish has quit [Remote host closed the connection]
xpen has joined #ruby
awestroke has quit [Remote host closed the connection]
Takehiro_ has quit [Remote host closed the connection]
paul_s has quit [Quit: paul_s]
arkiver has joined #ruby
drcode has quit [Quit: Leaving]
fermion has joined #ruby
codecaster has quit [Read error: Connection reset by peer]
love_color_text has quit [Remote host closed the connection]
codecaster has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
love_color_text has joined #ruby
greenarrow has joined #ruby
arkiver has quit [Quit: Leaving]
reinaldob has joined #ruby
kylemcgi_ has joined #ruby
<mukesh-rk>
if i have 3 strings like x="string" and i say a=x and b=x, how does these objects are stored in memory?
kylemcgill has quit [Read error: Connection reset by peer]
<apeiros_>
in memory, you have only 1 string
<apeiros_>
variables reference objects
<mukesh-rk>
okay now say this: x="string"
<mukesh-rk>
a=x
<mukesh-rk>
b=
bier has quit [Read error: Operation timed out]
<mukesh-rk>
x="newstring
<mukesh-rk>
"
<mukesh-rk>
why a and b doesnt change?
<apeiros_>
thus if you perform in-place operations, like x.upcase!, it'll be reflected everywhere where you reference the same string, e.g. a and b will both return "STRING"
<apeiros_>
a & b don't change because they reference the object, not the variable
<apeiros_>
a=x says "a references now the same object as x references", it doesn't say "a references x"
justsee has quit [Quit: Leaving...]
<mukesh-rk>
okay. thx
<mukesh-rk>
so every variable is an object ref rite?
arturaz has quit [Remote host closed the connection]
<apeiros_>
every variable references an object, yes
arturaz has joined #ruby
<mukesh-rk>
which object is tht?
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
tvw has joined #ruby
Androidnewbe has quit [Ping timeout: 260 seconds]
awestroke has joined #ruby
keyvan has joined #ruby
arturaz has quit [Remote host closed the connection]
<apeiros_>
what do you mean by "tht"?
mikecmpbll has joined #ruby
<mukesh-rk>
i mean if ii say [1,3,"string",0] wht wil happen in mem?
arturaz has joined #ruby
<mikecmpbll>
how do I stop IO.read converting the string to html encoded stuff like > etc?
<apeiros_>
mikecmpbll: IO.read does no such thing
<mikecmpbll>
darn
<mikecmpbll>
okay
<apeiros_>
mukesh-rk: I don't understand your question
<mikecmpbll>
that makes sense i guess, must be this damned web service thing
<mukesh-rk>
elements in an array is stored as refs to to each element's object right?
<apeiros_>
yes
fantazo has quit [Remote host closed the connection]
<mukesh-rk>
so 3 in my array wil be a fixnum obj and string wil be a string(whatever) object right?
xpen has quit [Ping timeout: 260 seconds]
<apeiros_>
*will
<apeiros_>
yes. the array doesn't care what kind of object it contains.
<mukesh-rk>
ok
icole has joined #ruby
<apeiros_>
ruby in general doesn't care about object type
<apeiros_>
you have to explicitly add a check if you want that
<apeiros_>
usually you should check for behavior, not type, though
<mukesh-rk>
fine
bier has joined #ruby
<mukesh-rk>
okay
<mukesh-rk>
and how can i disable a function returning its last line?
<apeiros_>
you can't
<apeiros_>
also, it's methods, not functions
<mukesh-rk>
tht sucks
<apeiros_>
do you intentionally mutilate words? like tht instead of that?
<apeiros_>
just return nil if you don't want to return a value
<apeiros_>
or self
<Ry>
you can override it, alias the old method, define a replacement that calls the old and returns nil.. but it sounds like a strange thing to want to do :E
<mukesh-rk>
tht<that :)
<apeiros_>
tht makes you look like a moron…
<catepillar>
s/tht/that/
justsee has quit [Quit: Leaving...]
<mukesh-rk>
Ry: great
samphippen has joined #ruby
MrSamuel has joined #ruby
<MrSamuel>
Is this the best way to forward each: def each(&b) ; @a.each(&b) ; end
<apeiros_>
Ry: I think it's easier to just add "nil" on your last line :-p
<MrSamuel>
I thougt
<apeiros_>
MrSamuel: yes
<MrSamuel>
def each ; @a.each ; end would work better
<apeiros_>
*a if you want to pass args too
<MrSamuel>
but it doesnt..
<Ry>
apeiros_: I'm kinda assuming he doesn't have control over original source
<MrSamuel>
i see
<apeiros_>
Ry: doesn't sound like from his question
<Ry>
well then it's just funny if he implements the alias
<Ry>
:D
<mukesh-rk>
:)
JarJar has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
<apeiros_>
Ry: indeed. might add a meta-method to do that for him… nil_returning :foo, :bar etc.
JarJar has left #ruby [#ruby]
<apeiros_>
but, yeah… pointless IMO
<Ry>
should gem it up just for reusability
<apeiros_>
lol
<mukesh-rk>
is that how u make gems??
<Ry>
mukesh-rk: just ignore us, we're being arseholes :D
icrazyhack has joined #ruby
Angel_Dark has joined #ruby
Angel_Dark has quit [Client Quit]
<apeiros_>
are we?
<Ry>
:D
Progster has quit [Ping timeout: 256 seconds]
<mukesh-rk>
not asshole.. Rusterholz.. :D just joking
<apeiros_>
bravo, you get 100 internet points for knowing how to google
<mukesh-rk>
yay!
irleif has quit [Quit: Computer has gone to sleep.]
Takehiro_ has joined #ruby
<apeiros_>
rofl, working with a friend, always lost track of the mouse cursor - now we increased its size. it looks hilarious.
hamed_r has quit [Remote host closed the connection]
hbpoison has joined #ruby
nitti has joined #ruby
Banistergalaxy has joined #ruby
AndChat- has quit [Ping timeout: 260 seconds]
hbpoison has quit [Ping timeout: 240 seconds]
mukesh-rk has left #ruby [#ruby]
arkiver has joined #ruby
Ry has quit [Ping timeout: 255 seconds]
<arkiver>
When I run this code, I get the output. But a "%" sign in printed at the end. Why does this happen and how to avoid it ?
fermion has quit [Read error: Operation timed out]
casheew has quit [Read error: Connection reset by peer]
Shrink has quit [Ping timeout: 252 seconds]
casheew has joined #ruby
paul_s has quit [Client Quit]
maesbn has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
<csmrfx>
gnagno you mean Hash[ [a,1,b,2] ]?
Gmind has quit [Quit: Leaving.]
kylemcgill is now known as aetcore
<timmillwood>
'and' vs '&&' opinions?
keyvan has joined #ruby
keyvan has quit [Changing host]
keyvan has joined #ruby
gnagno has quit [Remote host closed the connection]
timmow has quit [Quit: is having a nap]
aetcore has quit []
aetcore has joined #ruby
timmow has joined #ruby
ddd has joined #ruby
Shrink has joined #ruby
Rydefalk has quit [Read error: Connection reset by peer]
Rydefalk has joined #ruby
samphippen has joined #ruby
hbpoison has joined #ruby
skaczor has joined #ruby
JarJar has joined #ruby
samphippen has quit [Client Quit]
Takehiro_ has quit [Remote host closed the connection]
BrianJ has quit [Quit: BrianJ]
nitti has joined #ruby
Axsuul has quit [Ping timeout: 255 seconds]
Progster has joined #ruby
hotovson has quit [Remote host closed the connection]
Androidnewbe has joined #ruby
<Androidnewbe>
im slightly confused :) i have selenium, cucumber and capybara and ruby :) so capybara is the library that makes accessing the webpage easy ? but i also set up the webdriver with capybara ? but i also can setupt the driver without capybara with just selenium library ?
samphippen has joined #ruby
maesbn has quit [Remote host closed the connection]
cousine has joined #ruby
vlad_starkov has joined #ruby
hbpoison has quit [Ping timeout: 252 seconds]
mklappstuhl has joined #ruby
cousine has quit [Remote host closed the connection]
nanderoo has joined #ruby
nitti has quit [Ping timeout: 260 seconds]
hotovson has joined #ruby
yshh_ has joined #ruby
<MrSamuel>
is there a better way to write
<MrSamuel>
(0..x).collect {|i| foo(i)}
<workmad3>
Androidnewbe: selenium is a library for automating control of a browser, capybara is a library that provides a DSL for driving tests against a web app that can use various 'drivers' (the default being selenium if you need JS support) to interact with the actual page
yshh has quit [Ping timeout: 260 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
shtirlic has quit [Remote host closed the connection]
maasha has joined #ruby
Takehiro has joined #ruby
hotovson has quit [Ping timeout: 245 seconds]
<maasha>
yay, I have problems understanding Threads. I would like to write to iterate over an array and write chunks of the array to files in parallel.
<maasha>
It gets garbled though. Errors happen
<Androidnewbe>
workmad3 but it is possible to set up webdriver with capybara and with selenium ?
jrist-afk is now known as jrist
<workmad3>
Androidnewbe: I don't understand what you're asking now
daniel_-_ has quit [Read error: Operation timed out]
<Androidnewbe>
do i have to use capybara to set up the webdriver ?
<Androidnewbe>
the problem i have is that there is no option to delete browsing hisory when i look ant capybara api
MrSamuel has quit [Quit: MrSamuel]
paul_s has joined #ruby
slainer68 has joined #ruby
<Androidnewbe>
but i think it is possible by straight selenium
<Androidnewbe>
by using 'profile'
<Androidnewbe>
or i am just too confused
hotovson has joined #ruby
beiter has joined #ruby
<Androidnewbe>
or does it mean that if i dont use capybara werbdriver i will not be able to use capybara api in the test
vlad_sta_ has joined #ruby
cantonic has quit [Quit: cantonic]
d3vic3 has quit [Ping timeout: 252 seconds]
aetcore has quit [Read error: Connection reset by peer]
aetcore_ has joined #ruby
<lxsameer>
can i manipulate a instance variable in a class method ?
aetcore_ has quit [Read error: Connection reset by peer]
ffranz has joined #ruby
nari has joined #ruby
cantonic has quit [Ping timeout: 244 seconds]
mark_locklear has joined #ruby
carloslopes has joined #ruby
<burgestrand>
lxsameer: yes, but not in the way you most likely think.
<lxsameer>
burgestrand: by using meta programming ?
reisl has joined #ruby
<burgestrand>
lxsameer: when people say instance variables, they think of instance variables belonging to an actual instance of a class. You cannot manipulate those without having an instance.
Guest53566 has joined #ruby
<Guest53566>
yes
Guest53566 has left #ruby [#ruby]
daniel_-_ has joined #ruby
<burgestrand>
Androidnewbe: capybara allows you to reach the native driver if you ever need to use API:s that capybara does not support
Shrink has quit [Ping timeout: 268 seconds]
paul_s has quit [Quit: paul_s]
<burgestrand>
Androidnewbe: capybara helps you by giving you a uniform way of talking to selenium, rack-test, webkit, phantomjs and all other drivers, geared mostly towards testing your application as a simulated user.
<burgestrand>
lxsameer: you cannot set a default value for @instance_instance_variable on the class level, like you could do in (for example) PHP or (maybe, don’t quite remember) Java
paul_s has quit [Client Quit]
vlad_sta_ has quit [Remote host closed the connection]
hefgi has quit [Quit: This computer has gone to sleep]
iamjarvo has joined #ruby
snearch has joined #ruby
chimkan_ has joined #ruby
Ry has quit [Read error: Connection reset by peer]
casheew has quit [Read error: Connection reset by peer]
alesguzik has quit [Ping timeout: 268 seconds]
hbpoison has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
samphippen has joined #ruby
x0F has quit [Disconnected by services]
workmad3_ has joined #ruby
x0F_ has joined #ruby
alesguzik has joined #ruby
x0F_ is now known as x0F
workmad3 has quit [Ping timeout: 260 seconds]
casheew has joined #ruby
casheew has quit [Read error: Connection reset by peer]
krawchyk has joined #ruby
aquaranto has joined #ruby
hbpoison has quit [Ping timeout: 256 seconds]
arkiver has quit [Quit: Leaving]
mmitchell has joined #ruby
jeffreybaird has joined #ruby
casheew has joined #ruby
mohanmcgeek has joined #ruby
chimkan_ has quit [Ping timeout: 240 seconds]
<Androidnewbe>
but i am using the grid 2 so i dont need to dowlonad separate drivers
g-ram has quit [Quit: Computer has gone to sleep.]
nobitanobi_ has joined #ruby
casheew has quit [Read error: Connection reset by peer]
<nobitanobi_>
How should I test with Rspec a program that given an input file generates an output file? I basically have a method "parse" that goes line by line of the input file and generate a line in the output file.
g-ram has joined #ruby
casheew has joined #ruby
mikepack has joined #ruby
Banistergalaxy has joined #ruby
carloslo_ has joined #ruby
pjb3 has quit [Quit: pjb3]
AndChat| has quit [Ping timeout: 260 seconds]
v0n has joined #ruby
Androidnewbe has quit [Quit: irc2go]
JarJar has quit [Remote host closed the connection]
und3f has quit [Ping timeout: 252 seconds]
<lupine_85>
nobitanobi_, you could test on results - generate a file in /tmp, make it do an output file, check the output file is as expected, delete both - or you could alter the API so that you can pass it file or data
Shrink has quit [Ping timeout: 245 seconds]
jcaudle has joined #ruby
mikepack has quit [Remote host closed the connection]
<lupine_85>
def parse(input_stream, output_stream) ; ... ; end for instance
carloslopes has quit [Ping timeout: 240 seconds]
workmad3_ is now known as workmad3
invisime has joined #ruby
casheew has quit [Read error: Connection reset by peer]
und3f has joined #ruby
JarJar has joined #ruby
casheew has joined #ruby
daniel_-_ has quit [Ping timeout: 260 seconds]
sailias has joined #ruby
irleif has quit [Quit: Computer has gone to sleep.]
Araxia has joined #ruby
drPoggs has quit [Quit: Goodbye]
warb0 has joined #ruby
rubylogger has joined #ruby
xpen has joined #ruby
<nobitanobi_>
lupine_85: ok...it's a little bit confusing
<warb0>
anyone here able to give me a tiny bit of help?
<nobitanobi_>
lupine_85: would you create the file in the rspec itself? I mean, it's a long file
<warb0>
I have a programming question, I cannot remember what algo it is though lmao
jeremywrowe has joined #ruby
jerius has joined #ruby
rubylogger has quit [Remote host closed the connection]
<lupine_85>
nobitanobi_, if I were doing it, I'd alter the API so I could pass an input stream and an output stream, as shown. for tests, you push a fragment into the stream that exercises the functionality you want to test, and check that the output contains the data you expect
und3f has quit [Ping timeout: 260 seconds]
<nobitanobi_>
lupine_85: let me show you the code, I am trying to test.
jrajav has joined #ruby
<lupine_85>
it's not very *good* testing, but one doubts your code is structured in a way that lets you do it more extensively
<lupine_85>
(and I generally wouldn't bother with more than that, anyway)
<nobitanobi_>
lupine_85: https://gist.github.com/3993567 -- Basically I pass it an input with several lines. And for each line I recalculate and generate anew line in the output.
yshh_ has quit [Remote host closed the connection]
Shrink has joined #ruby
cinch_ has joined #ruby
warb0 has quit [Quit: Leaving]
Ry has joined #ruby
cinch_ has quit [Remote host closed the connection]
<lupine_85>
nobitanobi_, right, if you want it to be testable without touching the filesystem, you have to be able to tell it where to put the output
drPoggs has joined #ruby
<nobitanobi_>
mmm, I might jsut access the output
<nobitanobi_>
it will be generated in teh same folder of the specs
<nobitanobi_>
lupine_85: wow. let me process that :)
<lupine_85>
now you can do, for instance, in, out = [StringIO.new, StringIO.new] ; in.puts <<-EOF my test data\nEOF ; TaxCalculator.new(in).calculate(out) ; out.read.should ...
icole has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
<lupine_85>
if you wanted better testing, you'd have more classes - serializer, deserializer, and an object representing each item on the shopping list with an +add_tax+ method
casheew has quit [Read error: Connection reset by peer]
<nobitanobi_>
ok lupine_85 thanks a lot for your recommendation
casheew has joined #ruby
joofsh has joined #ruby
emmanuelux has quit [Quit: emmanuelux]
artm has joined #ruby
elico has quit [Remote host closed the connection]
und3f has joined #ruby
mikecmpbll has quit [Quit: Computer has gone to sleep.]
justsee has quit [Quit: Leaving...]
irleif has joined #ruby
mikecmpbll has joined #ruby
Cultofmetatron has joined #ruby
asobrasil has joined #ruby
pjb3 has quit [Quit: pjb3]
emmanuelux has joined #ruby
bbttxu has quit [Quit: bbttxu]
cjs226 has joined #ruby
kil0byte has quit [Ping timeout: 252 seconds]
classix has quit [Ping timeout: 256 seconds]
daniel_-_ has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
pipopopo has joined #ruby
reinaldob has quit [Remote host closed the connection]
iamjarvo has quit [Quit: Computer has gone to sleep.]
<burgestrand>
withnale: hash.fetch('key', {}).fetch('key2', 'default') is an option, or a hash that always returns an empty hash for any unset key, or the andand thing.
x82_nicole has joined #ruby
<JonnieCache>
burgestrands first suggestion is clearly the best
mercwithamouth has joined #ruby
jeremywrowe has left #ruby [#ruby]
joshman_ has joined #ruby
icole has quit [Ping timeout: 276 seconds]
nitti has joined #ruby
hotovson_ has joined #ruby
JarJar has joined #ruby
elico has joined #ruby
irleif has quit [Quit: Computer has gone to sleep.]
elico has quit [Remote host closed the connection]
_alejandro has joined #ruby
cakehero has joined #ruby
cpruitt has quit [Quit: cpruitt]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
irleif has joined #ruby
snearch has quit [Quit: Verlassend]
casheew has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
paolooo has joined #ruby
SoonerBourne has quit [Quit: HydraIRC -> http://www.hydrairc.com <- In tests, 0x09 out of 0x0A l33t h4x0rz prefer it :)]
casheew has joined #ruby
jrist is now known as jrist-rubyconf
casheew has quit [Read error: Connection reset by peer]
nari has joined #ruby
vlad_starkov has joined #ruby
quest88_ has joined #ruby
casheew has joined #ruby
tomeo has joined #ruby
freeayu has quit [Remote host closed the connection]
SoonerBourne has joined #ruby
IrishGringo has joined #ruby
jgarvey has joined #ruby
rasbonics has joined #ruby
und3f has quit [Read error: Operation timed out]
mohanmcgeek has quit [Quit: Leaving.]
metrix has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
daniel_-_ has quit [Ping timeout: 260 seconds]
SCommette has joined #ruby
tds has joined #ruby
tintin has joined #ruby
<tintin>
Hi, how do you run ruby website on windows?
cjs226 has quit []
tomsthumb has quit [Quit: Leaving.]
hbpoison has joined #ruby
<tintin>
Is there any problem if i make ruby website with rack instead of using any ruby framework like rails or others?
Gmind has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
jerius has quit [Quit: Computer has gone to sleep.]
<metrix>
Let's say I have an Oven object that I would use to bake something like so: oven = Oven.new; oven.temp('350') oven.insert(Dough); cake = oven.output. I want to make a shortcut class method like so: cake = Oven.bake(dough)
<metrix>
how would I do this?
SCommette has quit [Ping timeout: 276 seconds]
guns has quit [Read error: Connection reset by peer]
seanyo_ has joined #ruby
<tintin>
Is there any problem if i make ruby website with rack instead of using any ruby framework like rails or others?
pu22l3r has joined #ruby
clj_newb has joined #ruby
ltsstar has joined #ruby
seanyo has quit [Ping timeout: 260 seconds]
<burgestrand>
tintin: no.
<burgestrand>
tintin: rails uses rack, btw.
<burgestrand>
tintin: most web frameworks for ruby do, because it abstracts away the webserver, which is nice.
cyt93cs has quit [Quit: leaving]
cyt93cs has joined #ruby
cyt93cs has quit [Client Quit]
tvw has quit [Remote host closed the connection]
apeiros_ has quit [Read error: Connection reset by peer]
tvw has joined #ruby
apeiros_ has joined #ruby
quest88_ has quit [Quit: quest88_]
pjb3 has joined #ruby
cyt93cs_ has joined #ruby
artm has quit [Quit: artm]
Slivka has joined #ruby
<tintin>
burgestrand: How does framework abstract away webserver?
apeiros_ has quit [Read error: Connection reset by peer]
<hoelzro>
so I'd like a service for sharing these ideas so people with free time can implement them
<tintin>
hoelzro: Ok, i'm here to do it.
<hoelzro>
tintin: please feel free!
<apeiros>
ddd: duly noted.
<arietis>
how can i send message to object of such class?
<tintin>
hoelzro: Can i pm you?
<hoelzro>
sure
<banisterfiend>
tintin: you talk too much
<arietis>
i could add messages in class file after methods declaration
<arietis>
but it looks wrong to me
samphippen has quit [Quit: Computer has gone to sleep.]
jrajav has quit []
Vinz_` is now known as Vinz_
<tintin>
Sou|cutter: That's good.
adelcampo has joined #ruby
adelcampo is now known as doritostains
<burgestrand>
tintin: I don‘t remember what type of application it was. I didn’t care much.
<wmoxam>
tintin: pls make me an app that makes me a sandwich
tokarev has quit [Quit: Leaving]
<wmoxam>
k thx
<tintin>
wmoxam: Buy a sandwich maker
<wmoxam>
tintin: make me a sammich app and deploy it on Windows
apeiros has quit [Read error: Connection reset by peer]
apeiros_ has joined #ruby
<tintin>
wmoxam: Go to mcdonalds
<wmoxam>
tintin: sudo make me a sammich app and deploy it on Windows
<ddd>
hey that'd be a good home project. a website that lets you place sandwich orders that you make at the house, and then deliver. set your radius to oh, 10 miles.
kpshek has quit []
<tintin>
wmoxam: What is sammich app?
<tintin>
ddd: That's good.
<Sou|cutter>
ddd: or how about an app that lets you gps track sandwiches that are already made and ready to eat, so you can find the sandwich closest to you. call it uber sandwich
<ddd>
set a list of ingredients you are willing to work with, let them mix and match from that set of ingredients to make a custom sandwich from that ingredient set. Have them place the order, including paypal integration and/or other payment methods, with a spot for the address. Charge a specific amount for delivery.
<wmoxam>
tintin: why do you ask so many questions?
<ddd>
go. make it happen
<Xeago>
can anyone tell me if these are two different characters? "—–"
und3f has quit [Quit: Leaving.]
<ddd>
Xeago: the solid line (which is usually approximated as two -s) is one, the single - is another
<Sou|cutter>
Xeago: they are different
<ddd>
Remember the old dos days where they had menu screens with the double lines and double line corners. ASCII extended charset
beiter has quit [Read error: Connection reset by peer]
<ddd>
the first is from that
<Xeago>
the first is an en dash
<Xeago>
it seems
<Xeago>
but my font doesn't differentiate between them
<ddd>
shows as a single solid here
<ddd>
yeah mine either then
aganov has quit [Remote host closed the connection]
<Sou|cutter>
you can't trust fonts
<Sou|cutter>
just look at the codepoints
hsbt_away is now known as hsbt
<Xeago>
the em—dash should be wider than the en–dash
<Ry>
arietis: not sure what you're asking? You trying to find all instances of this class and message them? ObjectSpace.each_object(Converter) perhaps? :)
<ddd>
monaco on osx is the set im using under WTF-8
<arietis>
Ry: trying to figure out how to properly run init->prepare->convert chain
<tintin>
"Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning."
<tintin>
The most important thing is not to stop questioning: The most important thing is not to stop asking questions, since questions make you learn stuff and make you smarter, since learning makes you smart.
<wmoxam>
tintin: Are you a literalist?
<arietis>
is there any analogue of main() in ruby?
maasha has quit [Quit: Page closed]
xpen has quit [Remote host closed the connection]
<burgestrand>
arietis: the script itself is the main().
<tintin>
wmoxam: That was said by scientist, not by literalist
icole has joined #ruby
cakehero has joined #ruby
eph3meral has joined #ruby
<burgestrand>
arietis: if you want to figure out if the script currently running is the script that was executed, the way to do it is is: "if $0 == __FILE__; …; end"
<wmoxam>
tintin: do you take all quotes literally?
<tintin>
cakehero: Hi hero, what are you doing here?
linoj has joined #ruby
<cakehero>
chililn
icole_ has joined #ruby
<cakehero>
chillaxing
<ddd>
tintin: why are you acting literally on a scientist's quote?
<tintin>
wmoxam: That quote is very common to all.
<ddd>
tintin: why aren't you working on the sandwich app?
<cakehero>
ddd he's maximum troll
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
<ddd>
tintin: why are you so bored?
<LennyLinux>
Hi, is there a method that let me iterate over an array copy?
<burgestrand>
LennyLinux: yes, #each.
<ddd>
LennyLinux: you can use each
<tintin>
cakehero: Why are you here? it's not #cakephp, go to #cakephp
<arietis>
burgestrand: i just wanna run each method of this script step-by-step
<tintin>
cakehero: ARe ou making cake here?
<cakehero>
tintin are you banned from #cakephp?
BigFatFatty has joined #ruby
<burgestrand>
arietis: then call them in succession
<tintin>
cakehero: Or are you here to introduce me.
<LennyLinux>
burgestrand: ddd so i can modify the array while i'm iterating?
<arietis>
burgestrand: but it looks wrong to me
<burgestrand>
LennyLinux: yeah but it could be confusing.
<cakehero>
Everyone, this is tintin, he's a maximum troll
<burgestrand>
arietis: I'm sorry.
<tintin>
cakehero: NO
<ddd>
cakehero: we know.
<cakehero>
Troll++
<ddd>
we aren't inexperienced with tintin/manhunter
<wmoxam>
cakehero: no shit
<tintin>
cakehero: I disagree. Sorry.
<cakehero>
ddd ahhh you know of his alter ego as well
<ddd>
yes
<burgestrand>
yes
<arietis>
burgestrand: may be i should create runner class?
<burgestrand>
arietis: sounds like overengineering to me.
<cakehero>
I feel as though we now share a common bond
<tintin>
That is 'James Bond'
<wmoxam>
tintin: what is a James bond?
<wmoxam>
tintin: is it a type of glue?
<cakehero>
tintin are you a rich american programmer yet?
<tintin>
wmoxam: Ask hero.
<tintin>
cakehero: Ask savant.
<ddd>
trust me, i'm behaving only because *I* value this resource. otherwise i'd be blitzing him. Not going to lose this resource though over a.. hmm, can't think of a kind word so leaving it there
<wmoxam>
tintin: why should I ask him?
Trioke has joined #ruby
linoj has quit [Client Quit]
<wmoxam>
tintin: were you ever bonded to cakehero?
icole has quit [Ping timeout: 256 seconds]
<tintin>
cakehero: By the way, how is going on in NYC these days, are you under water?
Grieg has joined #ruby
Grieg has quit [Changing host]
Grieg has joined #ruby
<ddd>
wmoxam: Confessor!
<cakehero>
tintin I'm in San Fransisco
<ddd>
bwahahah
<tintin>
cakehero: Why?
<cakehero>
and there is a hot chick staying in my apartment in NYC
jgrevich has joined #ruby
<cakehero>
and I'm here with her sister
<cakehero>
it's pretty strong
<wmoxam>
tintin: where do you live?
<wmoxam>
tintin: are you underwater?
<wmoxam>
tintin: where do you live?
<cakehero>
wmoxam he lives in ethernopia
<tintin>
cakehero: Did you leave NYC right before Sandy storm?
<cakehero>
he/she
<cakehero>
tintin my flight back was cancelled
<cakehero>
i left about 4 weeks ago
JarJar has quit [Remote host closed the connection]
icole_ has quit [Remote host closed the connection]
jprovazn has quit [Quit: Leaving]
<tintin>
cakehero: So you survived from that Sandy storm, lucky
<apeiros_>
can we stop that, please?
jaygen has joined #ruby
<tintin>
Ok, bye
tintin has left #ruby [#ruby]
<cakehero>
=(
<cakehero>
So lonely without him
mrsolo has joined #ruby
<cakehero>
i wonder if he'll come back
<apeiros_>
he will
<cakehero>
to his credit....
<cakehero>
apparently he switched to ruby earlier than i did
<cakehero>
heh
_bart has quit [Quit: _bart]
burgestrand has quit [Quit: Leaving.]
<banisterfiend>
i remember banning him once before
sertaconay has quit [Read error: Connection reset by peer]
<banisterfiend>
he's a pretty unusual troll, i think it's really just extreme autism rather than outright trolling
davidcelis has joined #ruby
tvw has quit [Ping timeout: 260 seconds]
JohnBat26 has quit [Ping timeout: 240 seconds]
JarJar has joined #ruby
<cakehero>
heh
<cakehero>
banisterfiend I think there are some cultural discrepancies
<banisterfiend>
cakehero: oh, what's his ethnicity/culture ?
pu22l3r has quit [Remote host closed the connection]
<cakehero>
I think he's from a country in africa
<cakehero>
he told us once
<cakehero>
i don't know if he was lying or not
<cakehero>
but he would always ask about salaries and making money
kidoz has joined #ruby
beiter has joined #ruby
JustinCampbell has quit [Remote host closed the connection]
anachronistic has joined #ruby
<ddd>
only other thing i can feasibly think of is a young kid in a poor land/country thats trying to get out of that shadow but hasn't learned internet etiquette yet, or banisterfiend's autistic possibility
<ddd>
because he's a *really* crappy troll
Grieg has quit [Quit: laterz! :D]
<matti>
Ohai ddd
jasond has quit [Ping timeout: 246 seconds]
<matti>
ddd -- Data Display Debugger
<ddd>
hehe
<matti>
Every time I see your nick ;p
<ddd>
how's things matti?
vickaita has quit [Ping timeout: 240 seconds]
Grieg has joined #ruby
Grieg has quit [Changing host]
Grieg has joined #ruby
<matti>
ddd: Not bad.
<matti>
You?
<ddd>
yeah, its my own nick and it brings that to mind
samphippen has joined #ruby
nwertman has joined #ruby
kidoz has quit [Quit: Ухожу я от вас]
<ddd>
still sick, recovering slowly. insurance kicks in today, so hopefully can pick up the antibiotics either tonight when the wife gets home or tomorrow morning
nwertman has left #ruby [#ruby]
monkegjinni has joined #ruby
* Xeago
was output by a password generator: X34g0^, never used as such tho
Takehiro has quit [Remote host closed the connection]
<ddd>
other than that, just busy reading and self educating when not taking pauses to track the channels. REALLY liking this Ruby Under a Microscope ebook!
<matti>
Oh.
<matti>
Never seen this book before.
<matti>
Good?
<matti>
Xeago: LOL
kidoz has joined #ruby
<ddd>
matti: oh my, yes!
maesbn has joined #ruby
erichmenge has joined #ruby
clj_newb has quit [Ping timeout: 255 seconds]
<JonnieCache>
are they selling paper copies?
<ddd>
if you already know this stuff, as in you already dive deep into what makes ruby tick under the hood it might not be worth it, however for me because I never have but always wanted to, its a great read
<ddd>
JonnieCache: hmm, i don't think so.
tvw has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
drbawb has quit [Ping timeout: 240 seconds]
<ddd>
he's quite good at his talking points too. and as you can see from the example TOC, he's quite thorough. Where he glosses he explains why he is, so far I'm loving it
hoelzro is now known as hoelzro|away
<Xeago>
a question about spacing after a sentence
maletor has joined #ruby
<Xeago>
in a monospace setting, do you use single or double space after a sentence?
<ddd>
single far as i remember.
<matti>
ddd: Thanks for the ebook recommendation ;]
<ddd>
matti: oh any time!
<ddd>
keep me in mind if you find something good as well.
<ddd>
i'm an ebook junkie when it comes to ruby, design patterns, better testing techniques, object oriented thought processes, etc. I've no formal training of any kind. All self taught. I'm 42 going back to college to gain some starting in Jan. (Enrolled already, just waiting to pick classes on Nov 5) so anything that speaks to those things are of great use to me
<matti>
:>
alvaro_o has joined #ruby
<ddd>
well I'll be 42 next Friday
<ddd>
wow, feel like i'm only 26-28 in the head
<matti>
42?
<matti>
LOL age ;]
<matti>
Because of "42" ;]
<matti>
[ that sounded badly ;p ]
<ddd>
hehe. yeah hitchhiker's guide to the universe iirc
<matti>
Yeah.
sepp2k has quit [Ping timeout: 260 seconds]
<Sou|cutter>
age is nothing. I'm 84, and a liar
<ddd>
answer to life's question was 42 but what was the question? no one knows :)
<withnale>
If you're looking for book recommendations, I strongly recommend 'eloquent ruby' - teaches you how to write programs in the ruby style - not just converting from other languages.
<matti>
ddd: I know.
<matti>
ddd: "What's for lunch"
<Sou|cutter>
withnale: my laptop is sitting on that book rgt now :)
chrisbolton has joined #ruby
eldariof has quit []
<Sou|cutter>
it's good
dakine has joined #ruby
<ddd>
withnale: got it. on my to-read list. I'm working through the microscope book, the xunit test patterns book, the design patterns in ruby, and objects on rails ebook right now
rakl has joined #ruby
d3vic3 has quit [Ping timeout: 265 seconds]
<ddd>
matti: hah!
blazes816 has joined #ruby
<Sou|cutter>
I want to read the object on rails one
<ddd>
that and the object oriented thought processes book as well. too many books to read and a bit slow working through them all
<withnale>
yeah. they were going to get ppl training courses in ruby here for the guys who didn't know it. I just told them to buy a copy of the book for everyone instead.
`brendan has joined #ruby
Rydefalk_ has quit [Read error: Connection reset by peer]
<Sou|cutter>
withnale: different people have different learning styles. Should've done both! :)
eugynon has joined #ruby
IrishGringo has quit [Read error: Operation timed out]
pu22l3r has joined #ruby
macabre has quit [Read error: Connection reset by peer]
<ddd>
phone
macabre has joined #ruby
mrsrikanth has quit [Quit: Leaving]
<invisime>
is there a nice way to run an rspec test against a rake task?
havenn has joined #ruby
iamjarvo has joined #ruby
<invisime>
that's not "run rspec from a rake task." that's "run rspec to test a rake task."
mahmoudimus has joined #ruby
kidoz has quit [Quit: Ухожу я от вас]
Tearan has joined #ruby
JustinCampbell has joined #ruby
Rydefalk_ has joined #ruby
kidoz has joined #ruby
<Sou|cutter>
invisime: I'd try to make your rakefile as simple as ossible, the maybe creating a custom rake task for whatever your complicated operation is, then test that rather than your rakefile
hsbt is now known as hsbt_away
havenn has quit [Remote host closed the connection]
Rydefalk has quit [Read error: Connection reset by peer]
<invisime>
Sou|cutter: yeah, that's the idea. but how would I test the task?
`brendan has quit [Read error: Connection reset by peer]
havenn has joined #ruby
Tearan has quit [Client Quit]
dpatel has joined #ruby
`brendan has joined #ruby
JustinCampbell has quit [Remote host closed the connection]
<JonnieCache>
fucking hell i hate browsers so much
<JonnieCache>
why am i a web developer
<Xeago>
JonnieCache: what wall did you run into this time?
Takehiro has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
<JonnieCache>
its just forms and the horrible string mutation operations one has to do in order to make complex nested dynamic forms work
<JonnieCache>
it doesnt help that im working in raw html without any framework/helpers/etc
slainer68 has joined #ruby
jeremywrowe has joined #ruby
illsci has joined #ruby
rakl has quit [Quit: sleeping]
<apeiros_>
hm, dunno, you mean things like has_many :whatever and you have a form with (+) and (-) buttons for the whatever?
<illsci>
hey what's up
samphippen has joined #ruby
<illsci>
I'm trying to setup different versions of ruby with rbenv and the ruby-build plugin
<apeiros_>
freenode is up
<JonnieCache>
apeiros_: yes. that but nested 3 times
<illsci>
I cloned ruby-build into rbenv/plugins/ruby-build and rbenv doesn't appear to magically have a rbenv install
<illsci>
how do I get that to happen?
<apeiros_>
JonnieCache: sounds like fun
<JonnieCache>
the ruby part is simplicity itself
<JonnieCache>
its making the DOM in the browser line up with it thats the problem
<JonnieCache>
regexes ahoy!
<apeiros_>
I've done it for a single level of nesting, and that's relatively easy IMO
walbert has joined #ruby
<apeiros_>
hm, I only had a single regex
tvw has quit [Remote host closed the connection]
<JonnieCache>
the problem is i have 3 levels of nesting and im trying to use the same javascript function to manipulate the form at each level
Araxia has joined #ruby
<JonnieCache>
so the regex has to cope with any scenario
<JonnieCache>
its not that hard but its just one thing after another, you know?
<apeiros_>
hm, I'd imagine with proper cascading, that should not be an issue. but the devil is often in the details, so I might well be unaware of a couple of nastinesses…
<JonnieCache>
it wouldnt be an issue if i were a better programmer and if i didnt have the rest of the office asking me questions every 10 minutes
<apeiros_>
or put in another way: I know how seemingly harmless things can turn into monstrosities within minutes :)
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
Takehiro has quit [Ping timeout: 240 seconds]
artOfWar has quit [Remote host closed the connection]
pu22l3r has quit [Remote host closed the connection]
illsci has left #ruby [#ruby]
artOfWar has joined #ruby
sepp2k has joined #ruby
havenn has joined #ruby
icole has joined #ruby
apok has joined #ruby
icole_ has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
paul_s has quit [Quit: paul_s]
icole__ has joined #ruby
hbpoison has joined #ruby
jerius has joined #ruby
icole_ has quit [Read error: Connection reset by peer]
ephemerian has quit [Quit: Leaving.]
Araxia_ has joined #ruby
thinkdevcode has joined #ruby
Araxia has quit [Read error: Connection reset by peer]
Araxia_ is now known as Araxia
mjb2k has joined #ruby
<timmillwood>
anyone got any datamapper performance tips?
samuel02 has quit [Remote host closed the connection]
mrsolo has quit [Quit: Leaving]
havenn has quit [Ping timeout: 260 seconds]
icole has quit [Ping timeout: 246 seconds]
hbpoison has quit [Ping timeout: 240 seconds]
paolooo has quit [Quit: Page closed]
GoGoGarrett has joined #ruby
<mr-rich>
rking: ping
d3vic3 has quit [Quit: leaving]
<rking>
mr-rich: Kinda pong.
mmitchell has quit [Remote host closed the connection]
ryanlecompte has joined #ruby
mmitchell has joined #ruby
sn0wb1rd has joined #ruby
jasond has joined #ruby
khakimov has joined #ruby
dekroning has quit [Ping timeout: 276 seconds]
<mr-rich>
rking: do you use savon to make requests to any machines with self signed certs?
rakl has joined #ruby
mklappstuhl has joined #ruby
icole__ has quit [Read error: Connection reset by peer]
linoj has joined #ruby
mmitchell has quit [Ping timeout: 240 seconds]
rasbonics has quit [Quit: rasbonics]
icole has joined #ruby
<rking>
mr-rich: No cert stuff yet. Just turning cert checks off. =\
mogaj has joined #ruby
greasegum has quit [Ping timeout: 260 seconds]
havenn has joined #ruby
<banisterfiend>
rking: sup ryan
<banisterfiend>
rking: did cirwin/ryanf say anything about visiting devswag?
<rking>
banisterfiend: I've not been following the IRC happenings too closely, but I don't recall anything about that.
sertaconay has joined #ruby
<rking>
banisterfiend: Do you want me to drive to devswag, myself?
<banisterfiend>
rking: ah ok, you checked out ruby 2.0?
<banisterfiend>
rking: nawwww, they're get around to it, eventually..
Essobi has quit [Ping timeout: 276 seconds]
<banisterfiend>
rking: i just want my pry stickers so i can attract all the womens
nat2610 has joined #ruby
omry has quit [Quit: Leaving]
<banisterfiend>
rking: did you see the /^$/ command that guard use?
<mr-rich>
rking: all the devices I deal with have self signed certs. Setting http.auth.ssl.verify_mode = :none lets the requests through, but prints "at depth 0 - 18: self signed certificate" to STDOUT ... just wondering if you knew how to suppress those messages ...
<rking>
banisterfiend: a) I still haven't successfully compiled Ruby 2.0, but I keep a distant eye on the code changes as they come in. Did your binding_of_caller thing get addressed? b) I was joking about driving. That'd take me >10 hrs.
<banisterfiend>
rking: it's pretty clever, i never thought of using that to just hook an 'enter' press
<rking>
banisterfiend: I invented that. =P
<banisterfiend>
rking: oh really? cool
icole_ has joined #ruby
kidoz has quit [Quit: Ухожу я от вас]
<banisterfiend>
rking: if you get it to replay Pry.history[-1] that would be a pretty nice default
BrianJ has joined #ruby
davidcelis has quit [Quit: K-Lined.]
<rking>
banisterfiend: Problem with replaying history[-1] is recursion
csaunders has joined #ruby
<rking>
Oh, no, maybe not
davidcelis has joined #ruby
<rking>
I was trying to make a ,r command that would rerun the last one, but then it'd end up re-running itself the next time.
Jamone has joined #ruby
Jamone has joined #ruby
Jamone has quit [Changing host]
hsbt_away is now known as hsbt
<rking>
But maybe doing the regex thing would sidestep that.
<davidcelis>
arietis: it tells you _exactly_ what is wrong
<RubyPanther>
nils don't get to #gsub
<banisterfiend>
rking: it even worked inside a multi-line expression (such as a method definition) so pressing enter caused the method to have two lines with "puts 'hi'" in it :D
<RubyPanther>
Bad nil! Stop trying to do something. You are nothing. Know your place.
<arietis>
but i define arguments
<rking>
banisterfiend: Cool. I'm not sure if such a short input should rerun previous. It's good for pry-debugger but I don't know if it's good enough elsewhere.
Monie has quit [Ping timeout: 260 seconds]
<rking>
banisterfiend: And for pry-debugger, the best solution IMO is to map F-keys like other debuggers (e.g. Chrome/FF/MSVS)
<davidcelis>
arietis: doesn't matter if you pass in nil for the argument
<davidcelis>
arietis: which you did
<davidcelis>
convert(nil) # you passed in nil as the argument, which doesn't have gsub
<banisterfiend>
rking: still, it's a k00 trick ;)
<Paradox>
stoopid paypal
icole_ has quit [Remote host closed the connection]
Jamone has quit [Client Quit]
<banisterfiend>
rking: i like when nifty little things like that are invented by other people (i.e you), when i had thought it wasn't going to be so simple
casheew has quit [Read error: Connection reset by peer]
Monie has joined #ruby
<arietis>
davidcelis: i passed str which is @content
<davidcelis>
arietis: then @content is nil, dude
rasbonics has joined #ruby
<davidcelis>
arietis: whatever you passed into convert is nil. your error message makes that pretty obvious
monobit_ has joined #ruby
<arietis>
davidcelis: how can i debug it?
<rking>
banisterfiend: I think that makes the score: ☈:2, B:875, but hey.
<blazes816>
use pry and check the contents
casheew has joined #ruby
<davidcelis>
^
<blazes816>
or "puts 'aaaaaaaa' if @content.nil?"
<davidcelis>
or ruby-debug or some fucking puts statement
monobit_ has quit [Client Quit]
<davidcelis>
i usually just puts the shit i want to see unless i need to do something more
xclite has quit [Remote host closed the connection]
<rking>
davidcelis: But then you have to do it several times in a row if you guess wrong.
elico has joined #ruby
* davidcelis
doesn't guess wrong
Emmanuel_Chanel has joined #ruby
<rking>
davidcelis: Then why do you need to debug in the first place?
<blazes816>
knowing wrong isn't any better ;)
qwerxy has joined #ruby
<davidcelis>
rking: sshhhhhhh
erichmenge has quit [Quit: Be back later]
samphippen has quit [Quit: Computer has gone to sleep.]
xclite has joined #ruby
<davidcelis>
just let me be bad
erichmenge has joined #ruby
<davidcelis>
;)
<rking>
ruby-debug is a viable option, but I'd miss other pry features, e.g. show-source (the $ command)
erichmenge has quit [Client Quit]
mogaj has quit [Quit: Leaving]
<rking>
I'm not sure what ruby-debug offers over pry-debugger. I need to examine that.
<davidcelis>
i don't think there's a reason to use ruby-debug over pry-debugger
<rking>
davidcelis: Hehe, not jQuery on this one. A few of the highly-used pry commands have terse aliases. "$ Foo" is the same as "show-source Foo", and "? Foo" is the same as "show-doc Foo"
voodoofish430 has joined #ruby
mblb has joined #ruby
<davidcelis>
haha i was joking :P
Monie has quit [Client Quit]
<rking>
(And, if you use pry-de, "?$ Foo" is the same as doing "? Foo" then "$ Foo")
nohonor_alt has quit [Quit: Leaving]
postmodern has quit [Quit: Leaving]
nohonor has joined #ruby
nohonor has quit [Client Quit]
nohonor has joined #ruby
nohonor has quit [Client Quit]
enricostn has joined #ruby
icole_ has joined #ruby
Monie has joined #ruby
casheew has quit [Read error: Connection reset by peer]
<JonnieCache>
apeiros_: i forgot the thing that made my problem hard: the three levels are all different. theres no recursion involved
Araxia has quit [Read error: No route to host]
<enricostn>
(reading The Ruby Programming, Flanagan & Matsumoto) raise Invalid, "Initial puzzle has duplicates" if has_duplicates? give me NameError: uninitialized constant Invalid
<JonnieCache>
thats why writing a single function to handle all 3 levels is doing my head in
<enricostn>
it seems Invalid is deprecated
casheew has joined #ruby
samphippen has joined #ruby
dhruvasagar has quit [Ping timeout: 260 seconds]
<enricostn>
what excepcion I should use instead now?
<rking>
enricostn: I've never seen that class before.
<rking>
enricostn: My guess is they have some line above that which is like: class Invalid < Exception; end
nitti_ has quit [Remote host closed the connection]
emmanuelux has joined #ruby
baphled has quit [Ping timeout: 248 seconds]
linoj has quit [Quit: linoj]
hsbt is now known as hsbt_away
Emmanuel_Chanel has joined #ruby
bricker has joined #ruby
yshh has quit [Read error: Connection reset by peer]
nat2610 has quit [Quit: Leaving.]
kpshek has joined #ruby
emmanuelux has quit [Client Quit]
casheew has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 252 seconds]
nat2610 has joined #ruby
casheew has joined #ruby
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
geggam has quit [Remote host closed the connection]
havenn has quit [Read error: Connection reset by peer]
IrishGringo has quit [Read error: Operation timed out]
havenn has joined #ruby
beiter has quit [Quit: beiter]
mmlac has quit [Quit: mmlac]
schronicles47 has quit [Remote host closed the connection]
ckrailo has joined #ruby
schronicles47 has joined #ruby
yshh has joined #ruby
jrajav has joined #ruby
havenn has quit [Remote host closed the connection]
brianpWins has joined #ruby
havenn has joined #ruby
BoomCow has quit [Quit: This computer has gone to sleep]
BoomCow has joined #ruby
mjb2k has quit [Quit: Leaving]
burgestrand has joined #ruby
casheew has quit [Read error: Connection reset by peer]
burgestrand has quit [Client Quit]
Morkel has joined #ruby
casheew has joined #ruby
havenn has quit [Ping timeout: 265 seconds]
haxrbyte has quit [Remote host closed the connection]
geggam has joined #ruby
ABK has quit [Read error: Connection reset by peer]
samuel02 has joined #ruby
mmlac has joined #ruby
<Trioke>
Under what circumstances would I want to use hash.map { |k, v| ... } versus hash.each { |k, v| ... }? Are they the same thing in this particular instance?
<apeiros_>
you use map when you care about the (mapped, hence the name) return value
<apeiros_>
you'd use each when you don't care about the return value, only about the side-effects of the loop. in that case, use do/end instead of {}
<catepillar>
which is faster (generally)?
qwerxy has quit [Quit: offski]
<apeiros_>
each
mmlac has quit [Client Quit]
<apeiros_>
doesn't have to build a return value
<apeiros_>
doesn't have to store the results in that return value
<catepillar>
cool
<catepillar>
i should really read up on the rvm
<apeiros_>
o0
<Trioke>
apeiros_: What do you mean by build a return value? Say I have this snippet: h1.map { |k, v| result[k] = h1[k] if h2[k].nil? }
<apeiros_>
Trioke: you *probably* should read up on what map actually does
<Trioke>
apeiros_: Does that mean in this case, I can replace map with each?
<apeiros_>
it seems to me you have no idea…
<Trioke>
apeiros_: Yeah, I have no idea O.o
<apeiros_>
you do know that there's documentation, right?
kpshek has quit []
<Trioke>
apeiros_: I just know the code works :D.
<blazes816>
(facepalm)
<apeiros_>
yeah, that's called 'voodoo coding'
jankly has joined #ruby
havenn has joined #ruby
<apeiros_>
it somehow works, but you have no idea how or why
<Trioke>
apeiros_: I like voodoo. Sort of.
<apeiros_>
that's fine. but generally a horrible idea in the realm of programming.
<apeiros_>
really, read the docs. if you have trouble understanding/applying them, then come back and ask.
sullenel has joined #ruby
<Xeago>
map builds an array of the results of the block you pass
<apeiros_>
but we ain't no docs. thank you for not wasting our time.
<Xeago>
sorry for spoiling it..
<apeiros_>
great, Xeago is your doc-tool then :-p
<Trioke>
Lol.
pr0ton has joined #ruby
* apeiros_
wonders whether that's where "you're a tool" comes from…
* apeiros_
ducks, hides, runs
havenn has quit [Remote host closed the connection]
<blazes816>
a tool of the establishment man
Xeago has quit [Read error: Connection reset by peer]
havenn has joined #ruby
JonnieCache has quit [Ping timeout: 244 seconds]
arielpts has quit [Ping timeout: 256 seconds]
Xeago has joined #ruby
havenn has quit [Read error: No route to host]
havenn has joined #ruby
Danielpk has quit [Ping timeout: 248 seconds]
<catepillar>
so with map you can do something like x = hash.map {|k,v| "#{k}:#{v}"}
<Trioke>
Okay, new problem (which has nothing to do with docs). I'm trying to write a hash to file: File.open(path, 'w+') { |f| f.write(hash.to_yaml) } Except the file isn't being written?
<catepillar>
and that would return "k1:v1k2:v2"?
Danielpk has joined #ruby
<Trioke>
catepillar: I'm guessing more like [[k1:v1],[k2:v2]]
arielpts has joined #ruby
<blazes816>
["k1:v1", "k2:v2"]
<blazes816>
map returns an array
<blazes816>
and the block returns a string
<catepillar>
ok, makes sense
<blazes816>
t
<catepillar>
interesting
mvangala has quit [Read error: Connection reset by peer]
Neomex has joined #ruby
<catepillar>
i dont think i can find uses for that in my code though ...
mvangala has joined #ruby
<blazes816>
I wish there was a #hashy_map!, but there isn't
<blazes816>
really?
Neomex has quit [Client Quit]
<Xeago>
consider an array of users, you want all usernames: users.map { |u| u.name }
<blazes816>
or
<blazes816>
users.map(&:name)
nitti has joined #ruby
<Xeago>
but you would probably use symbol to proc: users.map(&:name)
<blazes816>
ah yeah
Araxia has quit [Read error: No route to host]
<Xeago>
blazes816: I wasn't sure if he knew symbol-to-proc :)
<blazes816>
whats the age of the oldest user? users.map(:age).max
olrrai has joined #ruby
philcrissman has joined #ruby
<apeiros_>
blazes816: users.max_by(&:age).age
bluenemo has quit [Remote host closed the connection]
<apeiros_>
also you forgot an &
<blazes816>
that's the oldest user himself
<blazes816>
(or her self)
<apeiros_>
blazes816: no
LennyLinux has quit [Remote host closed the connection]
<blazes816>
but I did forget &
<Xeago>
the .age gets that user age
<apeiros_>
that
<apeiros_>
must. read. full. code. :-p
<apeiros_>
assuming you have a lot of users, this saves you quite a bit of memory and mapping time.
Araxia has joined #ruby
<x82_nicole>
How can I interact with an API using ruby? Our company is all in PHP, and I want to re-work their API in ruby (at my own pace :p)
<Trioke>
x82_nicole: What an ambiguous question. You're really asking for two things. 1) How to figure out the current API's functionality (docs?). 2) How to replicate the same functionality in Ruby.
<x82_nicole>
Well, I'm new to programming in general, but I'm trying to understand how you call URL's from within Ruby. Now, I assume you interact with an API the same way you would with a browser, and just take that data and "do" something with it.
<Trioke>
x82_nicole: If it's a restful API, check out the rest_client gem.
<Xeago>
x82_nicole: there are two parts of the api: consuming and serving
<Xeago>
know which you are writing
Takehiro has joined #ruby
<x82_nicole>
They have the API already, I'm just "calling" it, and getting the data. So it would be the consuming one (I think :c)
<Trioke>
x82_nicole: Correct.
<X-Jester>
mm, consumption
perryh has quit [Excess Flood]
adeponte has quit [Remote host closed the connection]
<Trioke>
x82_nicole: Your original question was ambiguous, so I was under the impression that you wanted to re-implement it in Ruby (i.e. a 'port')
<x82_nicole>
Ohhhh, no no, that's not something I'm ready for.
<Xeago>
there are several kinds of API's: SOAP, RESTfull, mixmatch and non of the former
clj_newb has joined #ruby
Vinz_ is now known as Vinz_`
Takehiro has quit [Ping timeout: 252 seconds]
<bricker>
I'm getting a list of files recursively like so: Dir["/path/to/**/*"]... when I print out those files, how can I also know the file's parent directory?
walbert has quit [Remote host closed the connection]
olrrai has quit [Quit: Saliendo]
<X-Jester>
bricker: File.dirname() ?
jaygen has quit [Remote host closed the connection]
<bricker>
X-Jester: Good idea, thanks!
maletor has quit [Quit: Computer has gone to sleep.]
Xeago has quit [Ping timeout: 245 seconds]
<bricker>
X-Jester: Wait, I misunderstood. I'm using Dir[] which just returns an array of strings
<X-Jester>
bricker: If that doesn't work (i.e. i think dirname only splits a file at the last '/'), you can mess with File.absolute_path
davidcelis has quit [Quit: K-Lined.]
<X-Jester>
bricker: if you don't have the file's parent directory as part of one of those strings, you're going to have to at least get ruby pointed at the file in order to inspect it and locate its parent directory
havenn has quit [Remote host closed the connection]
<X-Jester>
if i understand what you're trying to do correctly, which i may not
kpshek has joined #ruby
havenn has joined #ruby
Keva161 has joined #ruby
<bricker>
X-Jester: I think I just need to loop through the directories, and then loop through each directory's files, rather than loop through a directory recursively.
hbpoison has joined #ruby
maletor has joined #ruby
<X-Jester>
that may be a better way to do what you're after if you don't want to have to do string manipulation on everything returned from a single recursive call
havenn has quit [Read error: Connection reset by peer]
justinmcp has quit [Ping timeout: 246 seconds]
Ry has joined #ruby
jerius has joined #ruby
stkowski has joined #ruby
doritostains has quit [Read error: Connection reset by peer]
ABK has quit [Read error: Connection reset by peer]
adelcampo has joined #ruby
ABK has joined #ruby
mappum has joined #ruby
vickaita_ has quit [Ping timeout: 240 seconds]
ltsstar has quit [Quit: ltsstar]
<mappum>
Does anyone know where gem installs binaries on windows? like the equivalent of /usr/bin
Trevoke has joined #ruby
glyytchy has quit [Quit: glyytchy]
<Grieg>
isn't it C:\RubyXXX\bin ?
Vert has quit [Remote host closed the connection]
<Trevoke>
Hi all, has anyone successfully used OAuth to talk to Intuit before? Possibly through Rails? Possibly using this gist? https://gist.github.com/3853297
cakehero has joined #ruby
codecaster has left #ruby [#ruby]
<mappum>
Grieg: ah, it is, thanks
csaunders has quit [Quit: Computer has gone to sleep.]
<Muz>
mappum: Grieg: `gem environment` and look for EXECUTATABLE DIRECTORY
apok_ has joined #ruby
<Muz>
You can't just rely on hardcoded paths like the one Grieg's suggested as it may vary, depending on the installation setup.
<Muz>
Also, the above should work across platforms in a more or less deterministic manner.
Russell^^ has quit [Quit: Russell^^]
apok has quit [Ping timeout: 260 seconds]
apok_ is now known as apok
sambio has joined #ruby
adeponte has quit [Remote host closed the connection]
fredjean has joined #ruby
bbttxu has quit [Quit: bbttxu]
fredjean has quit [Client Quit]
Takehiro has joined #ruby
fredjean has joined #ruby
emergion has joined #ruby
adeponte has joined #ruby
jonn has joined #ruby
jonn has quit [Remote host closed the connection]
Russell^^ has joined #ruby
perryh has quit [Excess Flood]
Iszak has joined #ruby
apeiros_ has quit [Remote host closed the connection]
Iszak has quit [Changing host]
Iszak has joined #ruby
sailias has joined #ruby
apeiros_ has joined #ruby
frogstarr78 has quit [Remote host closed the connection]
apeiros_ has quit [Read error: Connection reset by peer]
frogstarr78 has joined #ruby
und3f has quit [Ping timeout: 252 seconds]
apeiros_ has joined #ruby
apeiros_ has quit [Remote host closed the connection]
cakehero has quit [Quit: Computer has gone to sleep.]
apeiros_ has joined #ruby
perryh has joined #ruby
fredjean has quit [Client Quit]
und3f has joined #ruby
Morkel has quit [Quit: Morkel]
hsbt is now known as hsbt_away
Takehiro has quit [Ping timeout: 260 seconds]
<havenn_>
/join #maglev
philcrissman has quit [Remote host closed the connection]
<x82_nicole>
The error: [: errorI"}Rack::Lint::LintError: Body yielded non-string value ["errors", [{"message"=>"Sorry, that page does not exist", "code"=>34}]
<catepillar>
its missing a closeing ]
blacktulip has quit [Remote host closed the connection]
otters has quit [Ping timeout: 252 seconds]
<apeiros_>
x82_nicole: when you invoke /test ?
<reactormonk>
x82_nicole, rack calls Array(response), depends what your httparty object does
<x82_nicole>
apeiros_, yeah, a lot of tutorials seem to choose that url for some reason
miphe has joined #ruby
<apeiros_>
probably outdated
jgarvey has quit [Quit: Leaving]
<x82_nicole>
Also not quite sure why response even gets invoked, I didn't say to print it.
<apeiros_>
again
<apeiros_>
the return value is sent to the browser
<apeiros_>
this ain't php
<apeiros_>
and the return value is whatever the last statement's value is
<x82_nicole>
Ahh, right! Makes sense!
jenrzzz has quit [Ping timeout: 256 seconds]
<apeiros_>
get '/test' do "Hello World" end # <-- this will render "Hello World" in your browser
ABK has joined #ruby
minijupe has quit [Quit: minijupe]
<x82_nicole>
the whole return thing, is that a ruby thing? or a sinatra thing?
bigmac has joined #ruby
macabre has quit [Remote host closed the connection]
<reactormonk>
x82_nicole, ruby
<havenn_>
csmrfx: GemStone VM is free up to 2 GB shared cache with unlimited disk storage.
<csmrfx>
what
<reactormonk>
x82_nicole, well, rack to be precise. but that's what most of the ruby web frameworks use
ABK has quit [Read error: Connection reset by peer]
<havenn_>
csmrfx: Maglev's Ruby code is MIT license, and the VM is free (with the limitation of 2GB cache).
<csmrfx>
2GB shared cache means what
ABK has joined #ruby
marius has joined #ruby
<havenn_>
csmrfx: You can store as much data as you want, but only get 2GB in your cache.
<csmrfx>
its my local cache?
cakehero has quit [Quit: Computer has gone to sleep.]
hsbt_away is now known as hsbt
nemish has quit [Read error: Connection reset by peer]
<csmrfx>
(or yet another PaaScloud scheme)
ABK has quit [Read error: Connection reset by peer]
<havenn_>
csmrfx: 2GB distributed shared cache, you can cache whatever you want locally.
ABK has joined #ruby
vickaita has joined #ruby
nemish has joined #ruby
<havenn_>
csmrfx: Yeah, not ideal - but nice to have a free version that is very usable!
cakehero has joined #ruby
stopbit has quit [Quit: Leaving]
qwerxy has quit [Quit: offski]
<csmrfx>
not still having clear picture of what that cache is so not forming opinion on that
h4mz1d has joined #ruby
<csmrfx>
you using it for what btw?
ablankfield has joined #ruby
<havenn_>
csmrfx: For fun.
gabrielrotbart has joined #ruby
justinmcp has joined #ruby
love_color_text has quit [Remote host closed the connection]
love_color_text has joined #ruby
sailias has joined #ruby
jenrzzz has joined #ruby
<havenn_>
csmrfx: A RubyConf presentation this morning showed off a worker queue in Maglev, and I'm working on a fork of it that is asynchronous.
samuel02 has quit [Remote host closed the connection]
kbeddingfield has joined #ruby
icole_ has joined #ruby
<havenn_>
Speaking of RubyConf, grr I'm late to refactoring talk!
_numbers has joined #ruby
havenn_ has quit [Remote host closed the connection]
_numbers has left #ruby [#ruby]
hotovson has joined #ruby
bigmac has quit [Remote host closed the connection]
thinkdevcode has quit [Remote host closed the connection]
ABK has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 255 seconds]
heftig has quit [Quit: leaving]
schronicles47 has quit [Ping timeout: 246 seconds]
ABK has joined #ruby
staafl has quit [Quit: Leaving]
BadProphet has quit [Quit: This computer has gone to sleep]
theRoUS has quit [Ping timeout: 240 seconds]
BigFatFatty has left #ruby [#ruby]
und3f has quit [Quit: Leaving.]
love_color_text has quit [Remote host closed the connection]
daniel__ has joined #ruby
kbedding_ has joined #ruby
combatai` has quit [Read error: Connection reset by peer]
combatai` has joined #ruby
<daniel__>
I'm having trouble getting my jasmine tests (coffeescript) to compile and run in a sinatra app i'm building, does anyone have a project i can use to help me?
LennyLinux has quit [Remote host closed the connection]
billiam has quit [Quit: Leaving]
<daniel__>
im using sinatra-assetpack to compile the coffeescript on the fly for the app, i just cant seem to get the tests running
cableray has quit [Quit: cableray]
kbeddingfield has quit [Ping timeout: 244 seconds]
sebastorama has quit [Quit: Computer has gone to sleep.]
TheNumb has quit [Ping timeout: 276 seconds]
TheNumb has joined #ruby
tvw has joined #ruby
Russell^^ has quit [Quit: Russell^^]
kpshek has quit []
GoGoGarrett has joined #ruby
samphippen has joined #ruby
irleif has quit [Quit: Computer has gone to sleep.]
keyvan has quit [Remote host closed the connection]
awestroke has quit [Remote host closed the connection]
twopoint718 has quit [Ping timeout: 264 seconds]
ABK has quit [Read error: Connection reset by peer]
ABK has quit [Read error: Connection reset by peer]
<shadewind>
why is that method called "value"?
staafl has joined #ruby
armenb has quit [Ping timeout: 245 seconds]
vickaita has quit [Ping timeout: 260 seconds]
<shadewind>
it does not return a value
<shadewind>
it throws exceptions...
ABK has joined #ruby
Serial_Killer_C has quit [Remote host closed the connection]
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
jimeh has joined #ruby
jrajav has quit [Ping timeout: 240 seconds]
Takehiro has joined #ruby
DrShoggoth has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
lkba has joined #ruby
kirun has quit [Quit: Client exiting]
h4mz1d has quit [Ping timeout: 265 seconds]
ABK has quit [Read error: Connection reset by peer]
Takehiro has quit [Ping timeout: 260 seconds]
nemesit has quit [Quit: Leaving...]
ABK has joined #ruby
hefgi has quit [Quit: This computer has gone to sleep]
love_color_text has joined #ruby
joeycarmello has quit [Remote host closed the connection]
alanp_ has joined #ruby
TTilus has quit [Ping timeout: 260 seconds]
tenmilestereo has quit [Quit: Leaving]
savage- has quit [Remote host closed the connection]
chrisbolton has quit [Quit: chrisbolton]
alanp has quit [Ping timeout: 244 seconds]
jrajav has joined #ruby
ryanlecompte has joined #ruby
TTilus has joined #ruby
irleif has joined #ruby
apok has quit [Remote host closed the connection]
slainer68 has quit [Remote host closed the connection]
apok has joined #ruby
jlwestsr has joined #ruby
nari has joined #ruby
<csmrfx>
shadewind: returns a value, and if not gotten, raises an error
Servidorv has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
<Servidorv>
hey guys
<Servidorv>
how are you
<Servidorv>
can i ask a question
<Servidorv>
what does period = period == :day ? '%A' : '%I%P' means???
<csmrfx>
its a definition with ternary symbol and interpolated strings I suppose
<eph3meral>
i don't see any interpolation
fantazo has quit [Ping timeout: 240 seconds]
Astral_ has quit [Ping timeout: 252 seconds]
<csmrfx>
yeah you are right
<csmrfx>
no interpolation
<csmrfx>
just strings
Jeffferson has joined #ruby
F1skr has quit [Quit: WeeChat 0.3.9]
<csmrfx>
uhm literal strings
hsbt is now known as hsbt_away
icole_ has quit [Remote host closed the connection]
<eph3meral>
servidorv: google for "ruby ternary"
<eph3meral>
servidorv: or just 'ternary'
mmlac has joined #ruby
<eph3meral>
sorry, 'ternary operator' - it exists in many languages
<eph3meral>
servidorv: it's a shorthand if/then
<eph3meral>
though, ruby's syntactic sugar makes it sort of moot IMO since usually you can express it in a more elegant manner using the if or unless keywords
SCommette has quit [Quit: SCommette]
<csmrfx>
I use tons of ternary with ruby
<csmrfx>
if/unless dont give you alternatives without the end...
BadProphet has joined #ruby
<csmrfx>
...or else
<csmrfx>
lol, shoulda written and
GeekOnCoffee has quit [Ping timeout: 244 seconds]
justinmcp has quit [Remote host closed the connection]
F1skr has joined #ruby
miphe has quit [Quit: Leaving]
linoj has quit [Quit: linoj]
palyboy has quit []
werdnativ has quit [Ping timeout: 260 seconds]
linoj has joined #ruby
palyboy has joined #ruby
scx has joined #ruby
linoj has quit [Client Quit]
anachronistic has quit [Quit: anachronistic]
GeekOnCoffee has joined #ruby
Cultofmetatron has joined #ruby
heftig has joined #ruby
fredjean has joined #ruby
jrajav has quit [Ping timeout: 245 seconds]
ablankfield has quit [Ping timeout: 260 seconds]
Cultofmetatron has quit [Remote host closed the connection]
scx has quit [Read error: Connection reset by peer]
omg765 has joined #ruby
jrajav has joined #ruby
Jeffferson has quit [Quit: Leaving...]
GoGoGarrett has joined #ruby
havenn has joined #ruby
Jeffferson has joined #ruby
linoj has joined #ruby
vickaita has joined #ruby
joeycarmello has joined #ruby
g-ram has joined #ruby
Villadelfia has quit [Read error: Operation timed out]
justinmcp has joined #ruby
froy has joined #ruby
slainer68 has joined #ruby
dagnachewa has joined #ruby
irleif has quit [Quit: Computer has gone to sleep.]
kbedding_ has quit [Remote host closed the connection]
qwerxy has joined #ruby
apok_ has joined #ruby
mblb has quit [Quit: mblb]
hefgi has joined #ruby
apok_ has quit [Remote host closed the connection]
apok has quit [Read error: Operation timed out]
slainer68 has quit [Remote host closed the connection]
awaage has left #ruby [#ruby]
apok has joined #ruby
nat26101 has joined #ruby
nat2610 has quit [Read error: Connection reset by peer]
Villadelfia has joined #ruby
jenrzzz has joined #ruby
icole has joined #ruby
mpereira has joined #ruby
v0n has quit [Read error: Operation timed out]
fredjean has quit [Quit: Computer has gone to sleep.]
<Servidorv>
sorry guys thanks for the answers
jcaudle has joined #ruby
Servidorv has quit [Quit: Few women admit their age. Few men act theirs.]
Cultofmetatron has joined #ruby
SCommette has joined #ruby
SCommette has quit [Client Quit]
rasbonics has quit [Quit: rasbonics]
daniel_-_ has quit [Ping timeout: 260 seconds]
jeffreybaird has quit [Quit: jeffreybaird]
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
Juul has quit [Quit: Leaving]
jeffreybaird has joined #ruby
jblack has joined #ruby
nari has quit [Ping timeout: 246 seconds]
Servidorv has joined #ruby
erichmenge has joined #ruby
<Servidorv>
hey guys
<Servidorv>
i have a question
Xeago has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 246 seconds]
JonnieCache has joined #ruby
<Servidorv>
is ther any way that i can see a text and check if it is negative or positive??
hsbt_away is now known as hsbt
<Servidorv>
like to make ruby actually read the text and then tell me i the text was positive or negative??
<MarcWeber>
servidorv: what is positive/negative text?
<MarcWeber>
Are you talking about numbers?
<Servidorv>
nop
<MarcWeber>
Or about "I feel well" vs "I feel good"?
<Servidorv>
an actuall text
clj_newb has quit [Ping timeout: 265 seconds]
<Servidorv>
kind of like, that posts is stupid
<MarcWeber>
servidorv: Depends on your view point.
<MarcWeber>
The same text can be both: good and bad..
<Servidorv>
or "i dont think this product is good"
<eph3meral>
you're talking about classification basically
jeffreybaird has quit [Client Quit]
<Servidorv>
yeah
<eph3meral>
servidorv: ruby has very little in the way of libs like that
<eph3meral>
servidorv: java and python do, so you could look at using jruby
<MarcWeber>
Ask 10 people - and they all will give you a different response. Thus how can you expect a machine being able to do so? :)
manizzle has quit [Quit: Leaving]
<eph3meral>
servidorv: you're talking basically about NLP, it's a topic of artificial intelligence
<Sou|cutter>
you might be able to train a bayesian classifier to be pretty good for your typical data set
adeponte has quit [Remote host closed the connection]
<eph3meral>
indeed, there are many types of classifiers
cobragoat has quit [Remote host closed the connection]
u89 has joined #ruby
<Servidorv>
so what you are sying that i can use bayesian
<eph3meral>
a big problem is that people both make typos and use sarcasm/humor/idioms/facetiousness
<Servidorv>
and then somehow tell the user to put comment good or bad, so that way bayesian learns what is good or what is bad??
<Sou|cutter>
servidorv: that is one approach, but there are lots of different ones
Edward_ has quit [Ping timeout: 240 seconds]
<eph3meral>
servidorv: try #ai
<Servidorv>
ok well you guys gave me the right treack classifiers
Cultofmetatron has quit [Remote host closed the connection]
JustinCampbell has joined #ruby
otters has joined #ruby
<Servidorv>
thanks guys
mklappstuhl has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
<Servidorv>
i will have to experiment with classifiers to see which on is better
Servidorv has quit [Quit: If your not living on the edge, you're taking up too much space]
JustinCampbell has quit [Remote host closed the connection]
<shadewind>
csmrfx: no, that's the point... it does not return a value
<shadewind>
csmrfx: if it returns at all, it returns nil
davidcelis has quit [Quit: K-Lined.]
kiyoura has joined #ruby
Takehiro has joined #ruby
rudle has joined #ruby
clj_newb has joined #ruby
fyolnish has quit [Remote host closed the connection]
JonnieCache has quit [Ping timeout: 240 seconds]
Jeffferson has quit [Remote host closed the connection]
<rudle>
hello friends. when i run rspec, i don't always get the right exit code. at first i wanted to blame Kernel::at_exit, but logging all calls to it (using alias_method) shows that it's behaving normally. are there any other ways to affect a ruby process's exit code besides at_exit or exit?
cakehero has joined #ruby
<rudle>
i suspect one of my gems is at fault, since rspec behaves correctly when i start a new rails app (which is the same, modulo gems & rails configuration)