<Columcille>
I'm still a nub, but from what I understand the difference between 1.9 and 2.0 are not major so I'd say 2.0
lys has joined #ruby
emmanuelux has quit [Remote host closed the connection]
viszu has quit [Quit: Leaving.]
matematikaadit has quit [Quit: Leaving]
Tobarja has left #ruby ["PING 1373247137"]
JZTech101 has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC]
<bnagy>
you should ask in #rubyonrails
<bnagy>
for general ruby stuff I'd say 2.0 but rails ecosystem has a ton of hoopy shit
<popl>
not in the HGTTG sense of the word
airtonix_ has quit [Remote host closed the connection]
sahil has joined #ruby
viszu has joined #ruby
airtonix has joined #ruby
nomenkun has joined #ruby
vlad_starkov has joined #ruby
Domon has joined #ruby
codelurker has joined #ruby
Levin_22 has joined #ruby
hamakn has joined #ruby
nomenkun has quit [Ping timeout: 240 seconds]
codelurker has quit [Client Quit]
Zeeraw has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Ping timeout: 260 seconds]
sevenseacat1 is now known as sevenseacat
ttt has joined #ruby
codesoda_ is now known as codesoda
bubblehead has joined #ruby
Anarch has quit [Ping timeout: 264 seconds]
jmsbrwr has quit [Quit: Leaving]
huoxito has joined #ruby
Zeeraw has joined #ruby
brennanMKE has quit [Remote host closed the connection]
Kabaka has quit [Ping timeout: 240 seconds]
rickmasta has quit [Quit: Leaving...]
kevinykchan has quit [Quit: Computer has gone to sleep.]
blischalk has joined #ruby
jalcine has quit [Excess Flood]
arya__ has joined #ruby
CaptainJet has joined #ruby
CaptainJet has quit [Client Quit]
wallerdev has quit [Quit: wallerdev]
Mars` has joined #ruby
iamjarvo has joined #ruby
Guest33512 has joined #ruby
ILoveYou[ has joined #ruby
arya_ has quit [Ping timeout: 268 seconds]
wallerdev has joined #ruby
ILoveYou has quit [Ping timeout: 276 seconds]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Anarch has joined #ruby
ILoveYou[ has quit [Read error: Connection reset by peer]
viszu has quit [Quit: Leaving.]
Banistergalaxy has quit [Ping timeout: 256 seconds]
splittingred has joined #ruby
Anarch has quit [Client Quit]
niklasb has quit [Ping timeout: 256 seconds]
ILoveYou has joined #ruby
Anarch has joined #ruby
Guest33512 is now known as jalcine
jalcine has quit [Changing host]
jalcine has joined #ruby
jds has quit [Ping timeout: 240 seconds]
cads has joined #ruby
Kabaka has joined #ruby
Devo has joined #ruby
nycjv321 has joined #ruby
Opettaja has quit [Quit: WeeChat 0.4.1]
ILoveYou has quit [Read error: Connection reset by peer]
matematikaadit has joined #ruby
ILoveYou has joined #ruby
cofin has joined #ruby
cburyta has quit [Remote host closed the connection]
Spooner has quit [Remote host closed the connection]
robustus has quit [Ping timeout: 248 seconds]
bigkm has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
queston has quit [Remote host closed the connection]
ILoveYou has quit [Read error: Connection reset by peer]
robustus has joined #ruby
ILoveYou has joined #ruby
matematikaadit has quit [Quit: Leaving]
jonahR has joined #ruby
matematikaadit has joined #ruby
nfk has quit [Ping timeout: 264 seconds]
brennanMKE has joined #ruby
thecreators has joined #ruby
Wesley has joined #ruby
queston has joined #ruby
Wesley is now known as Guest26120
buzzybron has joined #ruby
Devo has quit [Quit: Devo]
<buzzybron>
where should attribute accessors be placed in the class? end of it or in the initalize method?
Mars` has quit [Ping timeout: 256 seconds]
gstamp has quit [Read error: Connection reset by peer]
brennanMKE has quit [Ping timeout: 246 seconds]
vivmbbs has joined #ruby
v0n has quit [Read error: Connection reset by peer]
Guest26120 has quit [Quit: Page closed]
machuga is now known as machuga|away
reset has joined #ruby
jds has joined #ruby
wsterling has joined #ruby
iamjarvo has quit [Quit: Leaving.]
nycjv321 has quit [Ping timeout: 246 seconds]
<bnagy>
anywhere in the class body, but traditionally near the top
nomenkun has joined #ruby
Astral_ has quit [Ping timeout: 256 seconds]
gstamp has joined #ruby
wsterling has quit [Ping timeout: 260 seconds]
<alainus>
I'm using Sequel to make some queries, and my script is freezing at some point. I've checked that the method used is correct in irb. Any suggestions on how to debug that ?
bubblehead has quit [Remote host closed the connection]
radic__ has joined #ruby
nomenkun has quit [Ping timeout: 260 seconds]
bubblehead has joined #ruby
Zeeraw has quit [Quit: Computer has gone to sleep.]
ILoveYou has quit [Read error: Connection reset by peer]
<popl>
alainus: freezing?
Astralum has joined #ruby
<popl>
do you know where it's freezing?
freeayu has joined #ruby
ILoveYou has joined #ruby
<alainus>
popl. Yes, I'm making an update statement: @usuarios.update(:usu_email => Sequel.function(:REPLACE, :usu_email, o, r))
<alainus>
it just stays there.
radic_ has quit [Ping timeout: 256 seconds]
<alainus>
I started the script with rdebug and does the same. Doesn't get past that line.
<bnagy>
freezing comes in two flavours, looping and blocking
echevemaster has joined #ruby
<bnagy>
if it's using a full core then it's looping, if it's using 0 then it's blocking
<alainus>
I'm getting this in the trace: usuarios.update(:usu_email => Sequel.function(:REPLACE, :usu_email, o, r))
<alainus>
and from ./script.rb:104:in `block in <main>'
<alainus>
could that be it ?
<alainus>
sorry, bad paste on the first one.
<bnagy>
uh
NeilCarvalho has quit [Quit: NeilCarvalho]
<bnagy>
that just looks like an exception
<alainus>
from /home/alainus/.rvm/gems/ruby-head/gems/sequel-4.0.0/lib/sequel/adapters/mysql2.rb:75:in `block in _execute'
<alainus>
that's it.
<alainus>
oh.
<alainus>
Any idea how to debug it?
<bnagy>
wait is this running standalone or what? usually if it starts throwing exceptions stuff will blow up
<bnagy>
if it's running inside some web crap then I have nfi
<bnagy>
but if you can pull it out and run it standalone then we might get somewhere
blischalk has quit [Read error: Operation timed out]
<alainus>
nope, it's just an .rb script
<alainus>
standalone
bubblehead has quit [Read error: Connection reset by peer]
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
<bnagy>
so what's ouputting this exception info?
bubblehead has joined #ruby
<bnagy>
I think you're going to have to gist some code
<alainus>
I think I got something here with the debugger, tell me if it tells you something, and If not, I'll gist the code for you: http://i.imgur.com/xdOkHT5.png
<popl>
:|
twoism has joined #ruby
<bnagy>
not really
twoism has quit [Remote host closed the connection]
twoism has joined #ruby
<bnagy>
I imagine your replace function is wrong somehow, but it's hard to say
cofin has quit [Quit: cofin]
<bnagy>
anyway whatever is outputting that exception - just change it to dump $@ as well - that's the full exception stack
<alainus>
The thing is that if I put that complete statement with replace_sql on irb, and then copy that output to the database, and works 100%
<alainus>
maybe Sequel is having some kind of short-circuit because I'm using the variables o, and r there ?
<alainus>
perhaps I should use Sequel.lit, or something.
<alainus>
How do I do that about $@ ?
<bnagy>
I don't know, because you haven't gisted any code
<bnagy>
so this isn't really going anywhere at the moment
Myconix has quit [Quit: Server Error 482: The server has been shot by a 12-gauge, please contact an administrator]
darth_chatri has joined #ruby
stingeyb has quit [Remote host closed the connection]
v0n has quit [Ping timeout: 246 seconds]
vlad_starkov has joined #ruby
[narcan] has joined #ruby
CaptainJet_ has joined #ruby
CaptainJet has quit [Disconnected by services]
renderful has quit [Remote host closed the connection]
nomenkun has joined #ruby
vlad_starkov has quit [Ping timeout: 256 seconds]
v0yager has joined #ruby
bassir has joined #ruby
nomenkun has quit [Ping timeout: 246 seconds]
pootler has quit [Ping timeout: 240 seconds]
CaptainJet_ has quit []
thebastl has joined #ruby
<bassir>
I have an array a and a method a.nextpage that creates another array. How can I create another array b that equals a.nextpage.nextpage + a.nextpage + a, where the number of terms is the number of pages that exist until the nextpage method returns nil.
Jefus has quit [Ping timeout: 268 seconds]
paissad has quit [Quit: This computer has gone to sleep]
apeiros has quit [Read error: Connection reset by peer]
apeiros_ has joined #ruby
Guest27539 has joined #ruby
<Guest27539>
A modern-day "digital" computer, as opposed to an older "analog" computer, operates on the principle of two possible states of something – "on" and "off". This directly corresponds to there either being an electrical current present, or said electrical current being absent. The "on" state is assigned the value "1", while the "off" state is assigned the value "0". A modern-day "digital" computer,
<Guest27539>
as opposed to an older "analog" computer, operates on the principle of two possible states of something – "on" and "off". This directly corresponds to there either being an electrical current present, or said electrical current being absent. The "on" state is assigned the value "1", while the "off" state is assigned the value "0".
<Guest27539>
A modern-day "digital" computer, as opposed to an older "analog" computer, operates on the principle of two possible states of something – "on" and "off". This directly corresponds to there either being an electrical current present, or said electrical current being absent. The "on" state is assigned the value "1", while the "off" state is assigned the value "0". A modern-day "digital" computer,
<Guest27539>
as opposed to an older "analog" computer, operates on the principle of two possible states of something – "on" and "off". This directly corresponds to there either being an electrical current present, or said electrical current being absent. The "on" state is assigned the value "1", while the "off" state is assigned the value "0".
<Guest27539>
A modern-day "digital" computer, as opposed to an older "analog" computer, operates on the principle of two possible states of something – "on" and "off". This directly corresponds to there either being an electrical current present, or said electrical current being absent. The "on" state is assigned the value "1", while the "off" state is assigned the value "0". A modern-day "digital" computer,
Guest27539 has quit [Killed (idoru (Spam is off topic on freenode.))]
CaptainJet has joined #ruby
Guest27539 has joined #ruby
wookiehangover has joined #ruby
Quadlex is now known as AwayLex
Astralum has quit [Ping timeout: 268 seconds]
<Guest27539>
A modern-day "digital" computer, as opposed to an older "analog" computer, operates on the principle of two possible states of something – "on" and "off". This directly corresponds to there either being an electrical current present, or said electrical current being absent. The "on" state is assigned the value "1", while the "off" state is assigned the value "0". A modern-day "digital" computer,
<Guest27539>
as opposed to an older "analog" computer, operates on the principle of two possible states of something – "on" and "off". This directly corresponds to there either being an electrical current present, or said electrical current being absent. The "on" state is assigned the value "1", while the "off" state is assigned the value "0".
Guest27539 has quit [K-Lined]
lethjakman has joined #ruby
Astralum has joined #ruby
rickmasta has joined #ruby
codesoda has quit [Ping timeout: 246 seconds]
lethjakm1 has quit [Ping timeout: 256 seconds]
voglster has quit [Ping timeout: 252 seconds]
codesoda has joined #ruby
freeayu has joined #ruby
<keanehsiao>
bnagy: hi.. I tried "\\" and it's work... and what if I wanna display it correctly after eval?? for example : eval("\"12345\\\\6 \"") and I want it display as "12345\6"
ruslo has left #ruby ["Leaving"]
<bnagy>
keanehsiao: irb is an awesome tool, you should try it
<valta>
A modern-day "digital" computer, as opposed to an older "analog" computer, operates on the principle of two possible states of something – "on" and "off". This directly corresponds to there either being an electrical current present, or said electrical current being absent. The "on" state is assigned the value "1", while the "off" state is assigned the value "0".
<keanehsiao>
bnagy: ok.. let me try it
gstamp has quit [Read error: Connection reset by peer]
<joelteon>
man i love spammers
<valta>
A modern-day "digital" computer, as opposed to an older "analog" computer, operates on the principle of two possible states of something – "on" and "off". This directly corresponds to there either being an electrical current present, or said electrical current being absent. The "on" state is assigned the value "1", while the "off" state is assigned the value "0".
<joelteon>
he's sure showing us
<valta>
A modern-day "digital" computer, as opposed to an older "analog" computer, operates on the principle of two possible states of something – "on" and "off". This directly corresponds to there either being an electrical current present, or said electrical current being absent. The "on" state is assigned the value "1", while the "off" state is assigned the value "0".
valta has quit [Killed (idoru (Spam is off topic on freenode.))]
<keanehsiao>
spammers.. you are so cool
apeiros_ has quit [Remote host closed the connection]
jazar_ has joined #ruby
<jazar_>
A modern-day "digital" computer, as opposed to an older "analog" computer, operates on the principle of two possible states of something – "on" and "off". This directly corresponds to there either being an electrical current present, or said electrical current being absent. The "on" state is assigned the value "1", while the "off" state is assigned the value "0".
jazar_ has quit [Killed (idoru (Spam is off topic on freenode.))]
codesoda has quit [Remote host closed the connection]
Kabaka has quit [Ping timeout: 240 seconds]
poseid has quit [Quit: poseid]
paissad has joined #ruby
dhruvasagar has joined #ruby
adeponte has joined #ruby
AlHafoudh has joined #ruby
robbyoconnor has quit [Ping timeout: 248 seconds]
darth_chatri1 has joined #ruby
_seanc_ has quit [Quit: _seanc_]
Kabaka has joined #ruby
gstamp has quit [Read error: Connection reset by peer]
darth_chatri has quit [Ping timeout: 240 seconds]
banghouse has quit [Remote host closed the connection]
dinnertime has joined #ruby
luckyruby has joined #ruby
staafl_123 has joined #ruby
gstamp has joined #ruby
rickmasta has joined #ruby
ChristianS has quit [Excess Flood]
ChristianS has joined #ruby
ayaz has joined #ruby
saarinen has quit [Quit: saarinen]
gstamp has quit [Read error: Connection reset by peer]
adeponte has quit [Ping timeout: 268 seconds]
tonini has joined #ruby
staafl_alt has quit [Ping timeout: 260 seconds]
darth_chatri has joined #ruby
darth_chatri1 has quit [Ping timeout: 240 seconds]
r0bby_ has joined #ruby
julweber has joined #ruby
banjara has quit [Ping timeout: 276 seconds]
darth_chatri1 has joined #ruby
lovio has quit [Quit: Page closed]
pranny has joined #ruby
renderful has joined #ruby
ffio_ has joined #ruby
banjara has joined #ruby
gstamp has joined #ruby
darth_chatri has quit [Ping timeout: 246 seconds]
girija has joined #ruby
ffio has quit [Ping timeout: 240 seconds]
r0bby has quit [Ping timeout: 240 seconds]
k610 has joined #ruby
takezawa has quit [Read error: Connection reset by peer]
takezawa has joined #ruby
JohnBat26 has joined #ruby
adeponte has joined #ruby
Guest58165 has quit [Quit: Page closed]
dash_ has joined #ruby
workmad3 has quit [Read error: Operation timed out]
brennanMKE has joined #ruby
oceanbreeze has joined #ruby
banjara1 has joined #ruby
banjara has quit [Ping timeout: 246 seconds]
robbyoconnor has joined #ruby
axeman- has quit [Remote host closed the connection]
zz_jinie is now known as jinie
bubbajones has quit [Ping timeout: 252 seconds]
axeman- has joined #ruby
brennanMKE has quit [Ping timeout: 246 seconds]
r0bby_ has quit [Ping timeout: 246 seconds]
Zeeraw has quit [Quit: Computer has gone to sleep.]
jprovazn has joined #ruby
vlad_starkov has joined #ruby
axeman- has quit [Remote host closed the connection]
Davey has joined #ruby
axeman- has joined #ruby
bubbajones has joined #ruby
tvw has joined #ruby
vlad_sta_ has joined #ruby
adeponte has quit [Remote host closed the connection]
huoxito has quit [Quit: Leaving]
rickmasta has quit [Quit: Leaving...]
vlad_starkov has quit [Ping timeout: 268 seconds]
bigkevmcd has joined #ruby
axeman- has quit [Ping timeout: 240 seconds]
MrZYX is now known as MrZYX|off
thebastl_ has joined #ruby
AlHafoudh has quit [Quit: Computer has gone to sleep.]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jinie is now known as zz_jinie
renderful has quit [Remote host closed the connection]
Davey has quit [Quit: Computer has gone to sleep.]
v0yager has quit [Remote host closed the connection]
thebastl has quit [Ping timeout: 260 seconds]
jds has quit [Remote host closed the connection]
rien has quit [Quit: leaving]
jds has joined #ruby
Brando753 has joined #ruby
v0yager has joined #ruby
anay has quit [Remote host closed the connection]
anay has joined #ruby
dinnertime is now known as LemurCharlie
anay has quit [Ping timeout: 246 seconds]
alup has joined #ruby
twoism_ has quit [Ping timeout: 256 seconds]
LemurCharlie is now known as dinnertime
dodosan has joined #ruby
tonini has quit [Remote host closed the connection]
cads has quit [Quit: Leaving]
anay has joined #ruby
cads has joined #ruby
filipe has joined #ruby
CaptainJet_ has joined #ruby
CaptainJet has quit [Disconnected by services]
threesome has quit [Ping timeout: 264 seconds]
zigomir has joined #ruby
emergion has joined #ruby
k610 has quit [Quit: Leaving]
elentras has joined #ruby
mist has quit [Quit: leaving]
fgo has quit [Remote host closed the connection]
brianpWins has joined #ruby
julweber has quit [Remote host closed the connection]
axeman- has joined #ruby
axeman- has quit [Remote host closed the connection]
Zeeraw has joined #ruby
adeponte has joined #ruby
pootler has quit [Ping timeout: 268 seconds]
buibex has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
anay has quit [Remote host closed the connection]
anay has joined #ruby
tonini has joined #ruby
mrmist has joined #ruby
anay has quit [Read error: Connection reset by peer]
anay has joined #ruby
mrmist is now known as mist
TIJ has joined #ruby
jbpros has joined #ruby
romockee has joined #ruby
adeponte has quit [Read error: Connection reset by peer]
_adeponte has joined #ruby
dinnertime has quit [Quit: Leaving]
lewis has quit [Remote host closed the connection]
ephemerian has joined #ruby
gstamp has quit [Quit: Computer has gone to sleep.]
senayar has joined #ruby
noop has joined #ruby
Ortuna has quit [Ping timeout: 252 seconds]
anay has quit [Ping timeout: 268 seconds]
persand has joined #ruby
anay has joined #ruby
axeman- has joined #ruby
marr has joined #ruby
v0yager has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
dawkirst_ is now known as dawkirst
axeman- has quit [Remote host closed the connection]
dawkirst has quit [Quit: Leaving]
maxmanders has joined #ruby
icecandy has joined #ruby
Bry8Star{T2 has quit [Remote host closed the connection]
luckyruby has quit [Remote host closed the connection]
_adeponte has quit [Remote host closed the connection]
optobear has quit [Ping timeout: 240 seconds]
threesome has joined #ruby
goshakkk has joined #ruby
milardovich_ has quit [Quit: Leaving]
matematikaadit has joined #ruby
Bry8Star{T2 has joined #ruby
julweber has joined #ruby
byprdct has joined #ruby
<maloik>
Last friday I made a gem that allows my colleague to use their terminal to do some stuff via our api. Right now their api token goes into a file, but I'd like to handle this better so that only them can see and access the token, and not any other users on the system (if any)
<maloik>
where's a good place to store this ?
lethjakman has quit [Ping timeout: 240 seconds]
<rcs>
Environment variables are a popular choice.
<maloik>
i was thinking of letting the method that gets the token check their env vars, if it's not there read the file and export it
tacos1de has joined #ruby
<maloik>
sound about right ?
<rcs>
My favorite pattern is explicit in constructor, with fallback to env variables.
<rcs>
I don't generally think it should be the responsibility of an api gem to read from a filesystem.
<maloik>
rcs: it's not an api gem, down the line we'll use our api wrapper in that gem
<maloik>
but it's sole function is to add tools to the command line
<rcs>
ah. then yeah. env with file fallback is pretty good.
emergion has joined #ruby
<rcs>
You can always set mode 600 on sensitive files.
<maloik>
Yep I planned on doing that
<maloik>
Going to try and figure out if I can ask for user input when installing the gem so they can set it right there and then
obs has joined #ruby
<rcs>
Strongly suggest against that. Informative error messages, a "--init" option to a command, might be a better place.
<rcs>
Installs shouldn't require user interaction
nomenkun has quit [Remote host closed the connection]
tonini has quit [Remote host closed the connection]
ybart has joined #ruby
pootler has joined #ruby
timonv has joined #ruby
dawkirst has joined #ruby
mengu has joined #ruby
leonid__ has joined #ruby
lsmola has joined #ruby
Soliah has quit [Quit: Soliah]
tonini has joined #ruby
madb055 has quit [Quit: Konversation terminated!]
arya__ has quit [Ping timeout: 276 seconds]
renderful has joined #ruby
jds has quit [Remote host closed the connection]
jds has joined #ruby
_Andres has joined #ruby
renderful has quit [Read error: Connection reset by peer]
troessner has joined #ruby
renderful has joined #ruby
yashshah has joined #ruby
dodosan has quit [Remote host closed the connection]
TIJ has quit [Ping timeout: 256 seconds]
relix has joined #ruby
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
bamdad has joined #ruby
jds has quit [Ping timeout: 260 seconds]
shaunbaker has joined #ruby
jonahR has quit [Quit: jonahR]
pwnfactory has joined #ruby
pootler_ has joined #ruby
<oceanbreeze>
Hey guys i am trying to launch some windows software wthich has authentication menu ( login, password), how to fill these fields using Ruby?
vigintas has joined #ruby
pwnfactory has quit [Client Quit]
pwnfactory has joined #ruby
camilasan has joined #ruby
dayepa has quit [Quit: dayepa]
DaniG2k has joined #ruby
dayepa has joined #ruby
bamdad has quit [Quit: bamdad]
keanehsiao has quit [Quit: Leaving...]
queequeg2 has quit [Ping timeout: 268 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
<nouitfvf>
it is impossible
<oceanbreeze>
really?
timonv_ has joined #ruby
Soliah has joined #ruby
timonv__ has joined #ruby
bamdad has joined #ruby
Soliah has quit [Client Quit]
subbyyy has quit [Ping timeout: 256 seconds]
vlad_sta_ has quit [Remote host closed the connection]
joonty has joined #ruby
timonv has quit [Ping timeout: 268 seconds]
<nouitfvf>
I think so :)
emergion has joined #ruby
Banistergalaxy has joined #ruby
timonv_ has quit [Ping timeout: 256 seconds]
Muz_ is now known as Muz
lkba has quit [Ping timeout: 256 seconds]
Muz has quit [Changing host]
Muz has joined #ruby
bamdad has quit [Quit: bamdad]
cj3kim has quit [Remote host closed the connection]
workmad3 has joined #ruby
tatsuya_o has joined #ruby
niceguyjames has joined #ruby
TIJ has joined #ruby
<effbiai>
trying to install gitlab. bundle is failing with missing psych. here's full updated output plus some debugging http://pastebin.com/c4amG3XB should i file a bugreport to (fedoras) bugzilla?
blaxter_ has joined #ruby
CaptainJet_ has quit []
mklappstuhl has joined #ruby
TIJ has quit [Ping timeout: 246 seconds]
DaniG2k has quit [Quit: Leaving.]
blaxter_ is now known as blaxter
jds has joined #ruby
adeponte has joined #ruby
julweber has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 268 seconds]
goodgame has joined #ruby
<oceanbreeze>
Damn, thought Ruby can do everything!
vlad_starkov has joined #ruby
nomenkun has joined #ruby
<bnagy>
oceanbreeze: check out autoit, but you'll have to mess with bindings
<bnagy>
there's a rubyonwindows blog which has some autoit snippets
timonv__ has quit [Remote host closed the connection]
queequeg1 has joined #ruby
noname001 has joined #ruby
adeponte has quit [Remote host closed the connection]
ffio_ has quit [Ping timeout: 246 seconds]
colonolGron has joined #ruby
buibex has quit [Remote host closed the connection]
vivmbbs has joined #ruby
flaritycat has joined #ruby
dayepa has quit [Quit: dayepa]
dayepa has joined #ruby
vigintas has quit [Read error: Connection reset by peer]
apeiros has joined #ruby
buibex has joined #ruby
Zai00 has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
fomatin has quit [Quit: Computer has gone to sleep.]
afd___ has joined #ruby
afd__ has quit [Ping timeout: 248 seconds]
krainboltgreene has quit [Ping timeout: 246 seconds]
popl has quit [Quit: We must make an idol of our fear, and call it God.]
Axsuul has quit [Ping timeout: 276 seconds]
<epic>
I am trying to write a ruby script that takes a array if file names and launches system commands on them in parallell, using peach for parallellism, the problem is that ruby/peach does not seem to wait for the commands to end so even though i use peach(2) it ends up launching millions of system procs.
elaptics`away is now known as elaptics
maxmanders has joined #ruby
Bry8Star{T2 has joined #ruby
<bnagy>
what is this peach?
flaritycat has quit [Remote host closed the connection]
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
<pontiki>
@unique references the instvar. unique references a localvar
merovingien has joined #ruby
<moufe>
pontiki: in my gist unique would reference a method
vlad_starkov has quit [Remote host closed the connection]
<merovingien>
Hello, i need some help. I'm trying to set capabilities on ruby, the way a normal user can bind port under 1080. but whenever i setcap cap_net_raw,cap_net_admin,cap_net_bind_service+p /usr/bin/ruby1.9.1, and run ruby1.9.1 i got segmentation fault. any idea?
<pontiki>
i don't think ruby has enough context. put self.unique instead and see?
kirun has joined #ruby
nezumi has quit [Ping timeout: 268 seconds]
<moufe>
pontiki: i think it's self.unique, but i was just wondering why would someone use it instead of @unique in this situation
<moufe>
Banistergalaxy: ?
<waxjar>
moufe, i think Ruby chokes on (@unique << unique.size) - 1 vs @unique << (unique.size - 1)
jibi_ has quit [Quit: .]
jibi has joined #ruby
<pontiki>
moufe: is your code failing?
jonkri has joined #ruby
<moufe>
pontiki: waxjar : it works fine
vivmbbs has quit [Quit: Leaving]
<moufe>
waxjar: + and - have a higher precedence than <<
<waxjar>
yea, i just realised that
<waxjar>
what's the problem exactly, though?
Maoko has quit [Read error: Connection reset by peer]
<moufe>
waxjar: im wondering why in this code unique.size was used instead of @unique.size
buzzybron has quit [Quit: Leaving.]
<waxjar>
sloppyness, probably :P
takezawa has joined #ruby
<moufe>
hmm
niceguyjames has joined #ruby
<moufe>
waxjar: something tells me it wasnt
devoldmx has quit [Ping timeout: 246 seconds]
BizarreCake has quit [Quit: Leaving]
Evixion has quit [Remote host closed the connection]
Evixion has joined #ruby
<waxjar>
only reason i can think of the way unique is accessed might change in the future. using the method won't break #initialize
<waxjar>
though it is slower
Aiea has quit [Ping timeout: 250 seconds]
<MrZYX>
yeah, it's just inconsistent, either line 10 should be i = unique.index word or line 15 @unique << @unique.size -1
<MrZYX>
and I've never seen such a spacing... ( var)
<moufe>
waxjar: both work but the author prefer the former for a reason
kpshek has joined #ruby
<moufe>
MrZYX: what about line 14
<moufe>
unique << word ?
<MrZYX>
hm, right, that should use the attr_reader too
<MrZYX>
yeah
<MrZYX>
since << really is just a method call too
<moufe>
MrZYX: it's from eloquent ruby
<MrZYX>
also line 12 should be index << i then
<moufe>
rihgt
<moufe>
thanks i feel better
<moufe>
i thought i was nuts
<MrZYX>
I can't say I prefer either way
<MrZYX>
but it needs to be consistent IMO
<moufe>
i agree
Zeeraw has quit [Quit: Computer has gone to sleep.]
<MrZYX>
I'd probably move lines 8-18 into a private method too
ArchBeOS has joined #ruby
Zeeraw has joined #ruby
<MrZYX>
so it's just def initialize; @foo = initial_value; compute_stuff; end
<MrZYX>
then you don't mix attr_reader and @ in a method at all
bamdad has joined #ruby
ggordan has quit [Remote host closed the connection]
Neomex has joined #ruby
Neomex has quit [Client Quit]
k610 has joined #ruby
<moufe>
MrZYX: right this part is what the author changes later on
LarsSmit has joined #ruby
<moufe>
but he sticks with the inconsistency of using @unique and unique
LarsSmit has quit [Client Quit]
LarsSmit has joined #ruby
<moufe>
MrZYX: thanks
sumark has quit [Ping timeout: 248 seconds]
andredieb has quit [Quit: Coyote finally caught me]
<MrZYX>
oh and btw, most ruby code I read uses two spaces for indentation, not tabs ;)
sumark has joined #ruby
girija has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 260 seconds]
<moufe>
MrZYX: this one is my fault alone. lazyness
<moufe>
=)
philcrissman_ has quit [Remote host closed the connection]
<MrZYX>
nah, I don't want to convince you about any style, just sayin' :P
devoldmx has joined #ruby
andredieb has joined #ruby
<moufe>
-)
LennyLin_ has joined #ruby
DaniG2k has quit [Quit: Leaving.]
DaniG2k has joined #ruby
LennyLinux has quit [Ping timeout: 260 seconds]
bamdad has quit [Quit: bamdad]
mark_locklear has joined #ruby
maxmanders has quit [Ping timeout: 268 seconds]
bamdad has joined #ruby
bamdad has quit [Client Quit]
pipework has quit [Remote host closed the connection]
pen has quit [Read error: Connection reset by peer]
pen has joined #ruby
goodgame has quit [Ping timeout: 256 seconds]
huttan_ has quit [Quit: leaving]
<MrZYX>
let me highlight the important part: checking for sqlite3.h... no
ashleyis has quit [Ping timeout: 256 seconds]
<Dwarf>
Odd thing, it's installed
huttan has joined #ruby
<MrZYX>
the header files too?
bcarrell has quit [Quit: bcarrell]
ezkl has quit [Ping timeout: 246 seconds]
<MrZYX>
most distributions put them into separate packages
<Dwarf>
Oh I see, my system admin says it's installed in /opt/
ldnunes has joined #ruby
LennyLinux has joined #ruby
tomoyuki28jp has quit [Remote host closed the connection]
obs has quit [Quit: Konversation terminated!]
LennyLin_ has quit [Ping timeout: 268 seconds]
marvelous has joined #ruby
mljsimone|away is now known as mljsimone
marvelous has left #ruby [#ruby]
keanehsiao has joined #ruby
breakingthings has joined #ruby
subbyyy has joined #ruby
chrisja has joined #ruby
buibex has quit [Read error: Connection reset by peer]
sambao21 has quit [Quit: Computer has gone to sleep.]
marvelous has joined #ruby
marvelous has left #ruby [#ruby]
ravster has joined #ruby
camilasan has quit [Remote host closed the connection]
sambao21 has joined #ruby
mljsimone is now known as mljsimone|away
ryannielson has joined #ruby
Mattix has joined #ruby
MHI has quit [Ping timeout: 246 seconds]
cj3kim has joined #ruby
goodgame has joined #ruby
pipework has joined #ruby
ravster has left #ruby [#ruby]
tk_ has joined #ruby
cj3kim has quit [Ping timeout: 240 seconds]
YaNakilon has quit [Ping timeout: 264 seconds]
niklasb has quit [Ping timeout: 240 seconds]
moufe has quit [Ping timeout: 250 seconds]
kofno has joined #ruby
codesoda has joined #ruby
ElCapitanMarklar has joined #ruby
DaniG2k has quit [Quit: Leaving.]
<ryannielson>
Is there a good way to convert a time string like 12:50 to the number of seconds since the start of the day? I'll be then appending that to an existing DateTime object.
postmodern has quit [Quit: Leaving]
timonv has quit [Remote host closed the connection]
johnmilton has joined #ruby
krawchyk has joined #ruby
tomzx_mac has joined #ruby
<ElCapitanMarklar>
ive got a hash like {1 => 9, 2=>99, 3=>999} and i want to perform an operation on each of the keys. say square them all. what would be my easiest way of doing this
Uranio has joined #ruby
<waxjar>
ryannielson: something like existing_date_time + DateTime.parse("12.50")
<ElCapitanMarklar>
e.g. i want to end up with {1 => 9, 4=>99, 9=>999}
angusiguess has joined #ruby
<ElCapitanMarklar>
the only way i can think of right now is by using map hash.map{|k, v| {k*k, v}}
<ryannielson>
waxjar: Seems to almost work, but DateTime.parse("12.50") gives the datetime of today with that time. So I guess now it's just a matter of finding out how many seconds to add to the last date time.
mljsimone|away is now known as mljsimone
ferdev has quit [Quit: ferdev]
<r0bgleeson>
ryannielson: cant you just calculate the number of seconds in 12 hours 50 minutes
ferdev has joined #ruby
ferdev has quit [Client Quit]
bklane has joined #ruby
alem0lars has quit [Quit: Leaving]
<ryannielson>
r0bgleeson: Well there are a ton of different formats, so I'm trying to find a way to do it programmatically. Unfortunetely the data I'm writing an importer for wasn't validated to a proper format. :(
blackmesa has joined #ruby
<bnagy>
why not just use parse or strftime or whatever for the correct date at that time?
pipework has quit [Remote host closed the connection]
dawkirst has quit [Read error: Connection reset by peer]
Astralum has quit [Read error: Connection reset by peer]
Astralum has joined #ruby
<ElCapitanMarklar>
bnagy - thanks :D
<bnagy>
DateTime.parse is fairly smart..
wmoxam has joined #ruby
jibi has quit [Quit: .]
fuzzyhorns has joined #ruby
<r0bgleeson>
bnagy: it is, but he wants the number of seconds since EPOCH, and Time.parse("12.50") defaults to current day
JZTech101 has joined #ruby
vlad_starkov has joined #ruby
<bnagy>
r0bgleeson: oh, sorry, he said "I'll be then appending that to an existing DateTime object" so I assumed not
<bnagy>
like some date + epoch is not going to end well
<ryannielson>
bnagy: Well, I do have another DateTime object which holds the date, and I want to append "12:30" to it, basically add the amount of seconds since midnight to that time (or various other formats) to the existing DateTimess
fixl has quit [Remote host closed the connection]
subbyyy has quit [Ping timeout: 256 seconds]
Guedes1 has quit [Quit: Saindo]
Guedes has joined #ruby
Guedes has joined #ruby
Tarathiel has joined #ruby
anay has quit [Remote host closed the connection]
<Tarathiel>
hi
baordog has joined #ruby
anay has joined #ruby
romockee has joined #ruby
<bnagy>
ryannielson: oh.. I htink you can add seconds to a time
<wmoxam>
How can one parse an internation DateTime string?
codecop has quit [Quit: Išeinu]
emptymag00 has quit [Remote host closed the connection]
<Tarathiel>
i'm trying to execute a window command with the help of ruby, i've tried witihn the same console with ruby -e `psloglist` and with ruby -e system("C:\....\psloglist), but neither could run it (i can run it without ruby)
<wmoxam>
ex: Time.parse('do, 16 mei 2013 09:36:36 +0200').to_s
<ryannielson>
bnagy: Ya, time's are in different formats though. Some are 12:50, some 1:25 some 5:15pm, some 5:15 pm, etc. It's kind of a mess haha. So I guess the big issue is parsing all those different formats.
vigintas_ has joined #ruby
rickruby has quit [Remote host closed the connection]
<DestinyAwaits>
and it's honestly saying Ruby on Rails
<DestinyAwaits>
so I need something around that
Trynemjoel has quit [Ping timeout: 245 seconds]
b0oh has joined #ruby
<will_grr>
okay, well ruby syntax is fairly straightforward. If you want to get your toes wet with ruby syntax and writing a simple rails app, I would recommend using http://www.codeschool.com/paths/ruby
<will_grr>
all the code is run within the browser so you don't need to worry about configuring an environment yet, slides and videos are free to accompany you on the Try Ruby and Rails for Zombies Redux courses.
johnnyfuchs has quit [Remote host closed the connection]
hogeo has joined #ruby
binaryplease has quit [Ping timeout: 246 seconds]
pitzips has joined #ruby
dodosan has quit [Remote host closed the connection]
Evixion has joined #ruby
blackmesa has joined #ruby
burlyscudd has quit [Quit: Leaving.]
echevemaster has joined #ruby
echevemaster has quit [Changing host]
echevemaster has joined #ruby
alex__c2022 has joined #ruby
r0bgleeson has quit [Read error: Connection reset by peer]
pranny has joined #ruby
pranny has quit [Remote host closed the connection]
angusiguess has joined #ruby
dodosan has joined #ruby
<_br_>
Curious question, COMET aka LongPolling aka ServerPush. Node community has the nice socket.io. Does the ruby community have something that is not since 2 years abandoned?
angusiguess has quit [Read error: Connection reset by peer]
<codesoda>
_br_: isn't there a ruby version of Faye?
<AliRezaTaleghani>
heftig: how is the complete syntax? or an example
hadees has joined #ruby
gustavn has quit [Quit: Leaving]
RonScagz has joined #ruby
<heftig>
%x followed by a delimiter
burlyscudd has joined #ruby
<havenwood>
%x|ls|
<heftig>
e.g. %x"ls"
<heftig>
%x(ls)
gustavn has joined #ruby
<heftig>
%x{ls} %x[ls] %x@ls@
<havenwood>
%x ls
<r0bgleeson>
oh yeah perl all up in my shit
<havenwood>
^ there is a space after ls (evil, don't do that)
c0rn has joined #ruby
kpshek has joined #ruby
<AliRezaTaleghani>
heftig: wow :D I preffer to use backticks... ;-)
baordog has quit [Remote host closed the connection]
<heftig>
system(*%w"rm -rf pkg src")
carlyle has quit [Remote host closed the connection]
<heftig>
i actually wrote that to avoid the shell fork. wee.
milardovich has joined #ruby
bzitzow has joined #ruby
JZTech101 has joined #ruby
pootler has joined #ruby
pootler_ has joined #ruby
adeponte has joined #ruby
jbpros has joined #ruby
Ziarkaen` has joined #ruby
mklappstuhl has joined #ruby
_seanc_ has quit [Quit: _seanc_]
codesoda has quit [Remote host closed the connection]
burlyscudd has quit [Ping timeout: 246 seconds]
anay has quit [Remote host closed the connection]
[[thufir]] has joined #ruby
Ziarkaen has quit [Ping timeout: 268 seconds]
poseid_ has joined #ruby
fenicks has joined #ruby
fomatin has joined #ruby
Zai00 has quit [Quit: Zai00]
mklappstuhl has quit [Ping timeout: 246 seconds]
poseid has quit [Ping timeout: 260 seconds]
poseid_ is now known as poseid
Ziarkaen` has quit [Ping timeout: 256 seconds]
airlok has joined #ruby
moshee has joined #ruby
DanKnox_away is now known as DanKnox
carlyle has joined #ruby
paul_k has joined #ruby
brianpWins has quit [Quit: brianpWins]
ffranz has joined #ruby
cortexman has joined #ruby
mrfoo has quit [Ping timeout: 250 seconds]
_ffio_ has joined #ruby
poseid has quit [Quit: poseid]
ffio_ has quit [Ping timeout: 240 seconds]
diegoviola has joined #ruby
<r0bgleeson>
heftig: system *["foo", "bar", "baz"] seems more readable
brianpWins has joined #ruby
theRoUS has quit [Ping timeout: 246 seconds]
DrShoggoth has joined #ruby
icecandy has quit [Read error: Connection reset by peer]
jonathanwallace has quit [Quit: WeeChat 0.4.0]
icecandy has joined #ruby
eladmeidar has joined #ruby
jonathanwallace has joined #ruby
tatsuya_o has joined #ruby
Voodoofish430 has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
browndawg has left #ruby [#ruby]
milardovich has quit [Ping timeout: 276 seconds]
interactionjaxsn has joined #ruby
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
[[thufir]] has quit [Ping timeout: 260 seconds]
poseid has joined #ruby
jonahR has joined #ruby
poseid has quit [Client Quit]
mklappstuhl has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
apeiros has joined #ruby
mklappstuhl has joined #ruby
interactionjaxsn has quit [Ping timeout: 256 seconds]
browndawg has joined #ruby
krawchyk has quit [Remote host closed the connection]
eldariof has joined #ruby
Mars` has joined #ruby
Solnse has joined #ruby
krisfremen-home has quit [Ping timeout: 268 seconds]
Nisstyre-laptop has joined #ruby
krawchyk has joined #ruby
optimusprimem has quit [Quit: Saindo]
Nisstyre-laptop is now known as Nisstyre
blackmesa has quit [Ping timeout: 240 seconds]
zeade has joined #ruby
optimusprimem has joined #ruby
Targen has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
krisfremen-home has joined #ruby
eladmeidar has quit [Quit: eladmeidar]
mklappstuhl has joined #ruby
codezombie has joined #ruby
cj3kim has quit [Remote host closed the connection]
xardas has quit [Read error: Connection reset by peer]
zigomir has quit [Read error: Connection reset by peer]
sambao21 has quit [Quit: Computer has gone to sleep.]
zigomir has joined #ruby
xardas has joined #ruby
maxmanders has joined #ruby
verto has joined #ruby
lkba has quit [Ping timeout: 246 seconds]
interactionjaxsn has joined #ruby
ebobby has joined #ruby
dnyy has joined #ruby
jbpros has quit [Ping timeout: 245 seconds]
obs has quit [Quit: Konversation terminated!]
devoldmx has quit [Ping timeout: 256 seconds]
shaileshg has joined #ruby
chichou has quit [Remote host closed the connection]
keyvan has joined #ruby
cool has joined #ruby
phasma has joined #ruby
heidar has joined #ruby
mroth has joined #ruby
notbrent___ has joined #ruby
karnowski has joined #ruby
bluehavana has joined #ruby
davidboy has joined #ruby
xerxas has joined #ruby
JoeTheGuest has joined #ruby
moeSeth has joined #ruby
dotemacs has joined #ruby
[[thufir]] has joined #ruby
sarcilav has joined #ruby
sambao21 has joined #ruby
chuk has joined #ruby
Spaceghost|cloud has joined #ruby
realDAB has quit [Quit: realDAB]
randym_ has joined #ruby
burlyscudd has joined #ruby
geoffw8_ has joined #ruby
niftylettuce has joined #ruby
Guest85414__ has joined #ruby
thebastl has quit [Remote host closed the connection]
kapowaz has joined #ruby
[0x1a] has joined #ruby
<Spooner>
I'm giving up a contract to write Ruby docs, to concentrate on coding. The client asked if I could recommend anyone (PM me if interested and I've seen you here enough to know you are Ruby-wise).
shaunbaker has quit [Remote host closed the connection]
<Beoran__>
is green shoes the best offshoot of shoes nowadays?
<_br_>
Sort of, imo
blaxter_ has joined #ruby
<flaritycat>
Why can't it actually install in the right place...once in a while ...
<Beoran__>
are there other shoes soffshoots that are useful?
[[thufir]] has joined #ruby
Skelz0r_ has quit [Ping timeout: 264 seconds]
* _br_
points at the shoe rack over there
<Beoran__>
flagg0204, how so?
reset has quit [Ping timeout: 245 seconds]
brennanMKE has quit [Read error: Connection reset by peer]
eladmeidar has joined #ruby
jztech101_ has joined #ruby
JZTech101 has quit [Ping timeout: 264 seconds]
Guest77334 has quit [Quit: EOF]
rsahae has quit [Quit: rsahae]
autumn has joined #ruby
kindjal has joined #ruby
brennanMKE has joined #ruby
thesheff17 has joined #ruby
<Beoran__>
I mean flaritycat how so?
johnmilton has joined #ruby
braincrash has joined #ruby
workmad3 has joined #ruby
khushildep has joined #ruby
<flaritycat>
Beoran__: Oh, I thought it where installed in wrong dir, but it wasn't. It just wasn't installed at all, a wall of errors occured.
v0n has quit [Read error: Operation timed out]
v1n has joined #ruby
<flaritycat>
ERROR: Failed to build gem native extension.
machuga|away is now known as machuga_
viszu has quit [Quit: Leaving.]
icco has quit [Read error: Operation timed out]
rsahae has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
<Beoran__>
flaritycat, on what operating system are you working?
<Eiam>
If I have two arrays a,b with numbers, and I want the numbers in b that are not in a, is there a math construct for this? its not the union or the intersection
<flaritycat>
Beoran__: Ubuntu 12.04
k610 has joined #ruby
<flaritycat>
I see there is some problems on debian/ubuntu when updating... But it is up to date.
<MrZYX>
Eiam: b-a
<Beoran__>
flaritycat, this means you are missing the development headers of the various libraries
machuga_ is now known as machuga
chrisja has quit [Quit: leaving]
<Eiam>
MrZYX: hmmm
fomatin has joined #ruby
[[thufir]] has quit [Ping timeout: 264 seconds]
* Eiam
stares at irb
<Eiam>
I already tried that and swear it wasn't the right answer
icecandy has quit [Remote host closed the connection]
<Eiam>
upon further consideration, it appears perhaps it was ;)
icco has joined #ruby
fuzzyhorns has quit [Read error: Connection reset by peer]
alvaro_o has joined #ruby
<sventon>
hi all
<sventon>
I struggle to understand how to write regular expressions
cburyta has quit [Remote host closed the connection]
cburyta has joined #ruby
mark_locklear has quit [Ping timeout: 268 seconds]
rickmasta has quit [Quit: Leaving...]
txdv_ has joined #ruby
krainboltgreene has joined #ruby
kindjal has quit [Quit: Computer has gone to sleep.]
txdv has quit [Read error: Connection reset by peer]
kindjal has joined #ruby
vasilakisFiL has joined #ruby
[[thufir]] has joined #ruby
fomatin has quit [Quit: Computer has gone to sleep.]
<vasilakisFiL>
Hello! Does anyone know how do you return the sliced string and not affect the original? For example if I have "hello world", I want to slice "hello " and return just the "world" part, without modifying the original string object?
sambao21 has quit [Quit: Computer has gone to sleep.]
<goodgame>
I've got a trivial problem, i'm beginning, i've the following class http://pastebin.com/CuzDP4GS in the file 'ticket.rb' and I try 'th = Ticket.new' in irb but I've an error
<Eiam>
havenwood: lemme try to parse that… access the array based on the last word in the line?/
<apeiros>
(yes, I hate superfluous groups! kill them! with fire!)
geggam has quit [Remote host closed the connection]
<goodgame>
davidcelis: is it a path problem?
<Morrolan>
goodgame: If you're using a recent version of Ruby, then you'll have to use `require_relative 'relative/path/to/file'` for files which aren't part of Ruby's loadpath.
<goodgame>
Morrolan: wouldn't it be easier to update this path?
geggam has joined #ruby
eladmeidar has joined #ruby
<Morrolan>
Inside a project you generally use require_relative. When you then distribute your library you'll probably distribute it as a 'gem', which people then install into a folder which is part of Ruby's load path.
cj3kim has joined #ruby
eladmeidar has left #ruby [#ruby]
druonysus has quit [Quit: Konversation terminated!]
nikeita has joined #ruby
<goodgame>
ok ok =)
druonysus has joined #ruby
maxmanders has joined #ruby
<goodgame>
but require_relative 'ticket' and require_relative './ticket' don't work (i'm using 1.9.3)
cburyta has joined #ruby
<Morrolan>
irb, right?
<goodgame>
yes
forrest has joined #ruby
Astralum has quit [Ping timeout: 260 seconds]
nbouscal has quit [Quit: Computer has commenced electric sheep tracking protocol.]
<Morrolan>
IRB's pwd is probably not what you think it to be, but I'm unsure. Try a require_relative with an absolute path to the file.
[[thufir]] has quit [Ping timeout: 264 seconds]
milardovich has joined #ruby
eldariof has quit [Read error: Operation timed out]
<goodgame>
cannot infer base path
nikeita has quit [Client Quit]
milardovich has quit [Max SendQ exceeded]
<goodgame>
i come back later thanks for your help
milardovich has joined #ruby
cj3kim has quit [Ping timeout: 248 seconds]
<Morrolan>
Oh, sorry, 'require' with an absolute path should work in IRB.
nikeita has joined #ruby
<Morrolan>
(There's probably more elegant / proper ways, but I don't know.)
Astralum has joined #ruby
daidoji has joined #ruby
hadees has joined #ruby
<goodgame>
ok thanks, seems to work
timonv has quit [Remote host closed the connection]
<Morrolan>
Stick around a while, one of the other guys/gals might have something to add. :)
nbouscal has joined #ruby
vlad_starkov has joined #ruby
<MrZYX>
irb takes the -I flag, just like ruby
fyym has joined #ruby
<goodgame>
i've gotta log out, not much battery, it'll help for now thanks
dodosan has quit [Remote host closed the connection]
enroxorz has joined #ruby
dodosan has joined #ruby
<enroxorz>
is there a way to attach ruby debugger to an active ruby process...in windows?
cburyta has quit [Remote host closed the connection]
pierre1 has joined #ruby
goodgame has quit [Ping timeout: 268 seconds]
javiferrer has quit [Ping timeout: 256 seconds]
cburyta has joined #ruby
diegoviola has quit [Ping timeout: 264 seconds]
threesome has quit [Ping timeout: 276 seconds]
ravster has joined #ruby
vlad_starkov has quit [Ping timeout: 248 seconds]
ner0x has quit [Quit: Leaving]
vasilakisFiL has left #ruby ["Konversation terminated!"]
maxmanders has quit [Ping timeout: 248 seconds]
kirun has quit [Quit: Client exiting]
Ripp__ has joined #ruby
maxmanders has joined #ruby
pierre1 has quit [Remote host closed the connection]
milardovich has quit [Quit: Leaving]
pierre1 has joined #ruby
reset has joined #ruby
Xeago has joined #ruby
burlyscudd has quit [Quit: Leaving.]
tatsuya_o has joined #ruby
cburyta has quit [Remote host closed the connection]
Zai00 has joined #ruby
_main_ has joined #ruby
diegoviola has joined #ruby
daidoji has quit []
tvw has quit []
tvw has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
__main__ has quit [Ping timeout: 256 seconds]
_main_ is now known as __main__
geekbri has quit [Remote host closed the connection]
zarubin has quit [Ping timeout: 240 seconds]
jerius has joined #ruby
sventon has quit [Ping timeout: 276 seconds]
<nikeita>
how to assign e dafault value if blank or nil without a ternary operator?
jkline has joined #ruby
<yebyen>
nikeita: you're looking for the elvis operator, or "coalesce"
<yebyen>
i don't think there is one in ruby
pskosinski has joined #ruby
<MrZYX>
"blank"?
<nikeita>
i.e.: hp = motor.hp.blank? ? "0" : motor.hp
<MrZYX>
you can shorten the blank check to foo = "bar" if foo.blank?
<nikeita>
yep but if foo is nil foo.blank? dump
<MrZYX>
?
c0rn_ has quit [Quit: Computer has gone to sleep.]
sventon has joined #ruby
danshultz has joined #ruby
codepython7771 has joined #ruby
<yebyen>
unless foo.nil?; foo="bar" if foo.blank?; else foo ||= "bar; end
<nikeita>
if foo = nil …the call foo.blank? trow exception?
<MrZYX>
no
<Eiam>
what the heck
x1337807x has joined #ruby
<Eiam>
there is no .blank in ruby!
<jkline>
I am new to Ruby and RSpec. When you create spec files do you typically create only one spec file per class file? Or, do you break up the functionality of a complex class and test in different spec files?
ybart has joined #ruby
<MrZYX>
yebyen: what the...?
<yebyen>
Eiam: there is .empty? though right?
tatsuya_o has quit [Remote host closed the connection]
baordog has quit [Remote host closed the connection]
<TheMoonMaster>
That is an ugly line of Ruby.
<MrZYX>
exactly
jerius has quit [Ping timeout: 268 seconds]
xardas has quit [Ping timeout: 276 seconds]
JZTech101 has quit [Ping timeout: 268 seconds]
<yebyen>
jsonperl: you'll use --prefix (i haven't compiled ruby by hand but I expect it uses the standard ./configure --prefix) to put it in a separate location from your current install
<Eiam>
TheMoonMaster: because someone is being difficult
<Eiam>
TheMoonMaster: if they want .blank? they should add blank to their class and call it
<yebyen>
jsonperl: stow is really only helpful if you used it from the beginning
<Eiam>
instead of partying around some stupid construct
<TheMoonMaster>
Eiam: I'm glad that wasn't a serious line. Haha
<TheMoonMaster>
That would make me cry if I saw that in a project.
<jsonperl>
yebyen I missed your chat… i have no desire to keep 1.9.3
<MrZYX>
TheMoonMaster: nikeita seems to prefer that over foo = "bar" if (foo || "").empty?
<Eiam>
TheMoonMaster: I would approve being punched in the face for writing that.
<Eiam>
If I wrote it =)
<flaritycat>
Any thoughts on how long it takes for an experienced programmer to build an Ruby backend with some mathematical sequences?
<jsonperl>
my question is merely… if i configure, make, and install, will 2.0.0 properly replace my previous install
<yebyen>
oh :)
<TheMoonMaster>
MrZYX: Well that's not good.
<TheMoonMaster>
nikeita: What language are you coming from? If any?
spider-mario has quit [Remote host closed the connection]
<MrZYX>
then you can do [] as well
<Eiam>
MrZYX: both examples supported the original case ;p
<Eiam>
>>"a"[]
<eval-in>
Eiam => wrong number of arguments (0 for 1..2) (ArgumentError) ... (https://eval.in/36962)
<MrZYX>
Array("a") == ["a"] (mostly)
<MrZYX>
MarcWeber: maybe you search for [*array_or_string] ?
<jsonperl>
allright off to build some servers… thanks
Ripp__ has quit [Read error: Connection reset by peer]
jsonperl has left #ruby [#ruby]
<MarcWeber>
MrZYX: That's even shorter :)
zarubin has joined #ruby
angusiguess has quit [Ping timeout: 246 seconds]
sambao21 has joined #ruby
Ripp__ has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
Adawerk has joined #ruby
forced_request has joined #ruby
huoxito has quit [Read error: Connection reset by peer]
<apeiros>
the use of Kernel#Array is indicative of bad parameter normalization
redgirl has quit [Ping timeout: 264 seconds]
DanKnox is now known as DanKnox_away
gr33n7007h has joined #ruby
jonahR has quit [Quit: jonahR]
nomenkun has joined #ruby
huoxito has joined #ruby
mmitchell has quit [Ping timeout: 268 seconds]
<Eiam>
apeiros: because its reliant on a specific type?
<Eiam>
or rather, it assumes a type
<Eiam>
?
<apeiros>
that's fine
<apeiros>
what's not fine is pretending you knew how to normalize the data you get from the user.
<apeiros>
you don't. the user does. hence let the user handle it.
<apeiros>
(user == the one calling your method)
staafl has joined #ruby
cburyta has joined #ruby
<Eiam>
isn't that why you document what you support?
JZTech101 has joined #ruby
ldnunes has quit [Quit: Leaving]
<apeiros>
yes, but I think you're deviating from the problem.
zarubin has quit [Ping timeout: 248 seconds]
<Eiam>
I'm not sure I understand the problem ;)
<apeiros>
you document what you support. you potentially raise if you don't get that. but you should only very very rarely coerce your input into what you support.
nomenkun has quit [Read error: Operation timed out]
<MrZYX>
hm, what about SomeModel.get(id) vs SomeModel.get([id1, id2])? You'd prefer SomeModel.get(id) and SomeModel.get_all([id1, id2]) ?
<apeiros>
i.e., you should not use Array().
<apeiros>
MrZYX: yes
codecop has quit [Remote host closed the connection]
<apeiros>
it's fugly to have a method which has two entirely different modes of operation.
<Eiam>
MrZYX: I'd prefer just one method, and an array of 1 =)
<apeiros>
once it takes a single id and returns a single model
<apeiros>
once it takes an array and returns an array
<Eiam>
d3 style where its all an array
<apeiros>
say what you mean. do what you say.
<apeiros>
Eiam: you're free to use get_all with a single element array all the time :-p
<Eiam>
apeiros: right, I'm saying from an interface standpoint
<Eiam>
just expose noe
<Eiam>
one
arya__ has joined #ruby
<Eiam>
SomeModel.get_all
<apeiros>
I think it's fine to expose both
arya_ has quit [Ping timeout: 248 seconds]
syamajala has quit [Quit: leaving]
tvw has quit []
arya__ is now known as arya_
<Eiam>
code duplication, just wrap it in a function that returns .first for you
<Eiam>
if you care that much
staafl_alt has quit [Ping timeout: 246 seconds]
<apeiros>
it's an assumption of yours that it is code duplication
<apeiros>
in the opposite, exposing both will reduce code duplication
<apeiros>
(code to either map single ids to models, or to get a single model from a single id)
blackmesa has joined #ruby
<apeiros>
(depending on which one you expose)
flaritycat has quit [Remote host closed the connection]
cburyta has quit [Remote host closed the connection]
workmad3 has joined #ruby
adambeynon has quit [Quit: Computer has gone to sleep.]
jonahR has joined #ruby
codepython7771 has quit [Ping timeout: 264 seconds]
nicoulaj has quit [Remote host closed the connection]
freerobby has joined #ruby
cburyta has joined #ruby
mortik has joined #ruby
<jkline>
any suggestions on how to name spec files for my classes?
<jkline>
and should I have one spec file per class, or several?
<mortik>
how can I test if the length of a string is within a given range with minitest::spec?
interactionjaxsn has quit [Remote host closed the connection]
BrianJ has joined #ruby
interactionjaxsn has joined #ruby
breakingthings has quit [Quit: breakingthings]
rien has joined #ruby
crankycoder has quit [Quit: leaving]
danshultz has quit [Remote host closed the connection]
<mortik>
I've tried name.lenth.must include 3..50 but that causes a failure expected 5 (fixnum) to respond to include?
<apeiros>
wow. ^ this is the reason I don't use silly things like spec.
<rien>
hey folks. when installing a ruby from source, how can I specify which folder to install to?
<apeiros>
or with an assertion helper: assert_between 3, 50, name.length # assuming you wrote one - might even exist one, I'm too lazy too look it up
carlyle has quit [Remote host closed the connection]
mansi has joined #ruby
<rien>
I just compiled ruby-2.0.0-p247 from source but I want to do it again but this time picking a directory
<MrZYX>
I guess I'd work if you swap it, (3..50).must include name.length
<rien>
I want it to go to /opt/ruby2 for instance
<MrZYX>
but that's ugly
<Beoran__>
configure --prefix=/opt/ruby2
<apeiros>
rien: check the configure options?
<Beoran__>
normally it's --prefix=XXX with ./configure
brianpWins has quit [Quit: brianpWins]
<jkline>
rien: I would suggest ruby20 because I have see ruby19 refer to the 1.9 branch
saarinen has joined #ruby
milardovich has joined #ruby
cburyta has quit [Remote host closed the connection]
interactionjaxsn has quit [Ping timeout: 268 seconds]
<rien>
apeiros: how do I check the configure options?
vlad_starkov has joined #ruby
milardovich has quit [Max SendQ exceeded]
<jkline>
some places do not support those extra dots, like for example package names I have seen ruby and ruby19 corresponding to ruby 1.8.x and ruby 1.9.x respectively
milardovich has joined #ruby
brianpWins has joined #ruby
LennyLinux has joined #ruby
<apeiros>
rien: ./configure -h
marcdel has quit [Ping timeout: 246 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
zarubin has joined #ruby
milardovich has quit [Max SendQ exceeded]
<rien>
apeiros: thanks!
redgirl has joined #ruby
milardovich has joined #ruby
sventon has quit [Ping timeout: 268 seconds]
milardovich has quit [Max SendQ exceeded]
marcdel has joined #ruby
milardovich has joined #ruby
milardovich has quit [Max SendQ exceeded]
fyym has quit [Remote host closed the connection]
milardovich has joined #ruby
zarubin has quit [Ping timeout: 264 seconds]
moted has quit [Quit: moted]
vlad_starkov has quit [Ping timeout: 264 seconds]
moted has joined #ruby
<mortik>
MrZYX: That worked.
<mortik>
apeiros: Well I figured I might give the spec library a try
<apeiros>
mortik: sure. why not. just don't expect me to be sorry if you suffer :-p
<mortik>
T_T
Kruppe has quit [Ping timeout: 246 seconds]
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mortik has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
brianpWins has quit [Quit: brianpWins]
cortexman has quit [Quit: Leaving.]
cortexman has joined #ruby
cortexman has quit [Max SendQ exceeded]
tonini has quit [Remote host closed the connection]
cortexman has joined #ruby
dash_ has quit [Quit: Time to beer :)]
ybart has joined #ruby
chriskk has joined #ruby
brianpWins has joined #ruby
Es0teric has joined #ruby
johnnyfuchs has quit [Remote host closed the connection]
moos3 has quit [Quit: Computer has gone to sleep.]
axl_ has joined #ruby
axl_ has quit [Client Quit]
moos3 has joined #ruby
goshakkk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
matematikaadit has left #ruby ["Leaving"]
khushildep has quit [Quit: khushildep]
mocfive_ has quit [Remote host closed the connection]
colinafoley has joined #ruby
JZTech101 has joined #ruby
DanKnox_away is now known as DanKnox
realDAB has quit [Quit: realDAB]
nanoxd has joined #ruby
rien has quit [Quit: leaving]
colinafoley has left #ruby [#ruby]
Ripp__ has quit [Ping timeout: 256 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
jonathanwallace has quit [Ping timeout: 246 seconds]
jonathanwallace has joined #ruby
_veer has quit [Ping timeout: 256 seconds]
maxmanders has joined #ruby
zigomir has quit [Ping timeout: 276 seconds]
brianpWins has quit [Quit: brianpWins]
sailias has joined #ruby
iamjarvo has quit [Quit: Leaving.]
cjsarette has joined #ruby
nbouscal has quit [Quit: Computer has commenced electric sheep tracking protocol.]
mklappstuhl has joined #ruby
maxmanders has quit [Ping timeout: 246 seconds]
gstamp has joined #ruby
suporte85 has quit [Quit: Saindo]
Inside has joined #ruby
Inside has quit [Changing host]
Inside has joined #ruby
bigoldrock has quit [Quit: Leaving.]
wmoxam has joined #ruby
bigoldrock has joined #ruby
apeiros has quit [Remote host closed the connection]
emergion has joined #ruby
r0bby is now known as robbyoconnor
apeiros has joined #ruby
bklane has quit [Remote host closed the connection]
emergion has quit [Max SendQ exceeded]
emergion has joined #ruby
jonahR has quit [Quit: jonahR]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brianpWins has joined #ruby
emergion has quit [Client Quit]
rezzack has quit [Ping timeout: 246 seconds]
druonysus has quit [Remote host closed the connection]
maxmanders has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
bklane has joined #ruby
stuartrexking has quit [Quit: Leaving...]
cortexman has quit [Quit: Leaving.]
reset has quit [Quit: Leaving...]
jonkri has joined #ruby
druonysus has joined #ruby
druonysus has joined #ruby
druonysus has quit [Changing host]
nbouscal has joined #ruby
fridim_ has joined #ruby
Jefus has quit [Ping timeout: 246 seconds]
ybart has quit [Quit: ybart]
jonkri_ has quit [Ping timeout: 256 seconds]
anonymuse has quit [Remote host closed the connection]
anonymuse has joined #ruby
devoldmx has joined #ruby
forcefsck has joined #ruby
ryanhirsch has joined #ruby
jkline has quit [Quit: jkline]
ryanhirsch has quit [Max SendQ exceeded]
moufe has joined #ruby
ybart has joined #ruby
ryanhirsch has joined #ruby
<moufe>
whenever you join a project that has been going on for years what's the best approach to understand the existing code?
Davey has quit [Quit: Computer has gone to sleep.]
wsterling has joined #ruby
<havenwood>
read it
<havenwood>
moufe: like a web app?
druonysus has quit [Ping timeout: 264 seconds]
<moufe>
havenwood: yes, I dont know where to start
jkline has joined #ruby
realDAB has joined #ruby
<havenwood>
moufe: Maybe look at the Gemfile first, see what type of app it is. Does it have a Gemfile?
anonymuse has quit [Ping timeout: 264 seconds]
rickruby has joined #ruby
<moufe>
havenwood: yes it does
predator117 has quit [Ping timeout: 246 seconds]
<havenwood>
moufe: That should give you a good idea of the apps' dependencies and how dated it is.
<havenwood>
moufe: Is it a Rails app? :O
<moufe>
havenwood: it is. it's a good idea to get familiar with the gems involved I suppose?
freerobby has joined #ruby
fredjean has quit [Quit: Computer has gone to sleep.]
<moufe>
havenwood: where do you usually start when it's a rather large app
<havenwood>
moufe: You could make a Gist of your Gemfile and paste it in #RubyOnRails for feedback. If you aren't familiar with Rails, it comes with a bunch of gems so you might want to look at a vanilla install so you have something to compare it to.
CaptainJet_ has quit []
forcefsck has quit [Read error: Connection reset by peer]
<havenwood>
moufe: Run the tests. Does it have tests, like a test/ or spec/ directory?
adkron has quit [Ping timeout: 248 seconds]
zeromodulus has joined #ruby
zeromodulus has quit [Changing host]
zeromodulus has joined #ruby
<moufe>
havenwood: i was thinking about going one by one through the gems in the gemfile to get familiar with it.
<moufe>
havenwood: not a lot of tests
cj3kim has joined #ruby
fwaokda has joined #ruby
<moufe>
havenwood: but after second thought it might not be the most efficient way to go about it
<moufe>
havenwood: I tried to read what's in the model/ I was overwhelmed
predator117 has joined #ruby
freerobby has quit [Ping timeout: 240 seconds]
ybart has quit [Quit: ybart]
<havenwood>
moufe: The thing of interest in the Gemfile is its diff from the default Gemfile, mostly. (Other than what version of Rails you're using.)
<havenwood>
moufe: If there aren't tests or documentation for the model, slogging through is only way I know.
statarb3 has quit [Quit: Leaving]
vlad_starkov has joined #ruby
CaptainJet has joined #ruby
<havenwood>
moufe: Is it a git repo, can you go back in history to the apps creation?
mklappstuhl has quit [Remote host closed the connection]
<moufe>
havenwood: yup i could do to that looking at the commits but theres about 10000, havenwood ill be done by the time you have two kids
<havenwood>
stepping through a specific model file on Github might help make it more absorbable, even if you just go by chunks
<havenwood>
moufe: you might ask in #RubyOnRails
<havenwood>
moufe: good luck!!
<moufe>
havenwood: thanks
Mo0O has quit [Ping timeout: 268 seconds]
optobear has joined #ruby
arubin has joined #ruby
druonysus has joined #ruby
druonysus has joined #ruby
druonysus has quit [Changing host]
kofno_ has quit [Remote host closed the connection]
madb055 has joined #ruby
dodosan has quit [Remote host closed the connection]
Ripp__ has joined #ruby
vlad_starkov has quit [Ping timeout: 256 seconds]
Pacra has quit [Ping timeout: 246 seconds]
breadtk has left #ruby [#ruby]
maxmanders has quit [Ping timeout: 256 seconds]
rhys has quit [Quit: Leaving]
moufe has quit [Ping timeout: 250 seconds]
rezzack has joined #ruby
ephemerian has left #ruby [#ruby]
mansi has joined #ruby
Mo0O has joined #ruby
Ripp__ has quit [Ping timeout: 256 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
mansi has quit [Ping timeout: 240 seconds]
sailias has quit [Ping timeout: 248 seconds]
wmoxam has quit [Read error: Connection reset by peer]
cburyta has joined #ruby
jds has joined #ruby
pygospa has quit [Read error: Operation timed out]