apeiros_ changed the topic of #ruby-lang to: Ruby 2.2.0; 2.1.5; 2.0.0-p598; 1.9.3-p551: http://ruby-lang.org || Paste code on http://gist.github.com
djbkd has quit [Ping timeout: 272 seconds]
root-lee has joined #ruby-lang
root-lee has quit [Client Quit]
SuMo_D has joined #ruby-lang
nunayerBeezwax has joined #ruby-lang
the_real_intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
marr has quit [Ping timeout: 240 seconds]
tenderlove has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby-lang
skade has joined #ruby-lang
intinig has quit [Ping timeout: 265 seconds]
dzejrou has quit [Quit: Leaving]
apeiros_ has quit [Ping timeout: 272 seconds]
sferik has joined #ruby-lang
<zenspider> sferik: oi. you wouldn't happen to be on linux, would you?
havenn has joined #ruby-lang
<sferik> zenspider: no, darwin
<sferik> zenspider: why do you ask?
SilentNuke has joined #ruby-lang
havenwood has quit [Ping timeout: 250 seconds]
Aova has quit [Read error: Connection reset by peer]
skade has quit [Quit: Computer has gone to sleep.]
SilentNuke has quit [Client Quit]
<zenspider> sferik: need to test some siginfo handler patches against a non bsd and setting up linux is a PITA I don't want to spend time on
<zenspider> thanks tho
<zenspider> patching... building... installing... ugh. all for an 80 line diff
Aova has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
tunaCanBruh has joined #ruby-lang
gwendall has joined #ruby-lang
intinig has joined #ruby-lang
havenn has quit []
tunaCanBruh has quit [Ping timeout: 276 seconds]
Bwild has quit [Read error: No route to host]
sferik has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Iskarlar_ has quit [Read error: Connection reset by peer]
Iskarlar has joined #ruby-lang
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eam has quit [Ping timeout: 256 seconds]
eam has joined #ruby-lang
Iskarlar_ has joined #ruby-lang
|jemc| has quit [Ping timeout: 272 seconds]
the_real_intinig has joined #ruby-lang
Iskarlar has quit [Ping timeout: 265 seconds]
<womble> zenspider: If you're still fighting the beast, I'm on Linux.
sferik has joined #ruby-lang
intinig has quit [Ping timeout: 244 seconds]
leandros1 has quit [Ping timeout: 256 seconds]
leandros1 has joined #ruby-lang
ta_ has joined #ruby-lang
diegoviola has quit [Ping timeout: 244 seconds]
<darix> zenspider: want a disk image that you can just boot up in a VM?
the_real_intinig has quit [Ping timeout: 245 seconds]
diegoviola has joined #ruby-lang
<zenspider> it keeps LOOKING like I'm close. but I'm afraid I'm trapped in xeno's paradox of neverending dependencies
deol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zenspider> FINALLY. tests that run
timanema has quit [Ping timeout: 245 seconds]
<zenspider> darix: yes, but I'm in a cafe :)
ta_ has quit [Ping timeout: 276 seconds]
cantonic has joined #ruby-lang
leandros1 has quit [Quit: WeeChat 1.0]
nunayerBeezwax has quit []
hahuang62 has quit [Ping timeout: 272 seconds]
cornerma1 has joined #ruby-lang
cornerman has quit [Ping timeout: 245 seconds]
cornerma1 is now known as cornerman
djbkd has joined #ruby-lang
nathanstitt has joined #ruby-lang
hendranata_ has joined #ruby-lang
godd2 has quit [Ping timeout: 246 seconds]
|jemc| has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
godd2 has joined #ruby-lang
rigidspleen has joined #ruby-lang
Iskarlar_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sferik has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Aova has joined #ruby-lang
lguardiola has quit [Remote host closed the connection]
RobertBirnie has quit [Quit: Textual IRC Client: www.textualapp.com]
intinig has joined #ruby-lang
cantonic has quit [Read error: Connection reset by peer]
cantonic has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
lytol has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
tunaCanBruh has joined #ruby-lang
harly has joined #ruby-lang
djbkd has quit [Ping timeout: 246 seconds]
hackeron has quit [Ping timeout: 256 seconds]
test45566 has joined #ruby-lang
Iskarlar has joined #ruby-lang
tunaCanBruh has quit [Ping timeout: 265 seconds]
ta_ has joined #ruby-lang
hackeron has joined #ruby-lang
<harly> nooby returning to ruby qs: setting up a clean env again. using chruby and ruby-install. after i get a ruby/rails package, doing gem intsall bundler, then bundle install. that about right?
<harly> package = a git checkout for example.
intinig has quit [Remote host closed the connection]
<womble> harly: Yeah, that sounds about right in general.
intinig has joined #ruby-lang
<zenspider> depends on the package... none of mine use bundler for example
<harly> hmm. Well. There's a Gemfile.
<harly> goal is to install what that specifies is needed. i sbundler the best way?
<zenspider> its the ... popular way.
<harly> :)
<harly> how would you do it?
<zenspider> I try my best not to
ta_ has quit [Ping timeout: 265 seconds]
<harly> so you don't have a Gemfile? or you install the dependencies it specifies a different way?
<waxjar> if it's distributed as a gem, it'll have a gemspec listing the dependencies
<harly> ok. well this isn't. it has a Gemfile.
<harly> it's also a rails app. maybe that restricts it further.
godd2 has quit [Ping timeout: 244 seconds]
<waxjar> rails comes with bundler i believe
<pipework> Rails depends on bundler.
<harly> ok. not sure it's even installed railsyet. :)
<pipework> harly: install bundler then bundle install, youer' right.
<pipework> I prefer install bundler then bundle install over install rails then bundle install.
<zenspider> inevitably it'll be different anyway. :)
amsi has quit [Quit: Leaving]
<zenspider> the only thing I throw in there different is using ohmygems to create a new gem repo so I can nuke it when I'm done (and to keep everyone's garbage separate)
<pipework> zenspider: Sometimes I keep a Gemfile in my ~/projects directory with the version of rails I want to generate new apps with.
test45566 has quit [Remote host closed the connection]
<pipework> zenspider: In development?
<zenspider> released as a gem.
<pipework> Oh
<zenspider> stupid tiny shell script
<zenspider> eg: omg rails41
intinig has quit [Ping timeout: 276 seconds]
<zenspider> bundle install
ta_ has joined #ruby-lang
<harly> that looks handy.
<harly> i've not run into problems yet with chruby's partitioning. but i've not done much either.
iamninja has quit [Quit: ZZZzzz…]
<waxjar> that's neat zenspider
ta_ has quit [Ping timeout: 265 seconds]
fclausen has joined #ruby-lang
ta_ has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
ta has quit [Read error: Connection reset by peer]
skyrocker has quit [Read error: Connection reset by peer]
ta has joined #ruby-lang
skyrocker has joined #ruby-lang
ta_ has quit [Ping timeout: 265 seconds]
Aova has joined #ruby-lang
amclain has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
chills42 has joined #ruby-lang
David_H_Smith has joined #ruby-lang
martinbmadsen has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
simi has joined #ruby-lang
amclain has quit [Quit: Leaving]
|jemc| has quit [Read error: Connection reset by peer]
amclain has joined #ruby-lang
|jemc| has joined #ruby-lang
intinig has joined #ruby-lang
ruby-lang171 has joined #ruby-lang
ruby-lang171 has quit [Client Quit]
fclausen has quit [Ping timeout: 272 seconds]
ta_ has joined #ruby-lang
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
yfeldblum has joined #ruby-lang
ta_ has quit [Ping timeout: 244 seconds]
intinig has quit [Ping timeout: 245 seconds]
ddd has quit [Ping timeout: 245 seconds]
lytol has joined #ruby-lang
wallerdev has joined #ruby-lang
wallerdev has quit [Client Quit]
yellowgh0st has joined #ruby-lang
ur5us has joined #ruby-lang
pabloh has joined #ruby-lang
sankaber has joined #ruby-lang
lytol has quit [Read error: Connection reset by peer]
lytol has joined #ruby-lang
xsdg_ has quit [Ping timeout: 244 seconds]
xsdg has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
<pabloh> hey,
<pabloh> Does anyone knows if there's an API to look up for a file at ruby load's path without actually loading the file?
Aova has joined #ruby-lang
fet has joined #ruby-lang
tkuchiki has joined #ruby-lang
<fet> hola alguien me ofria traducir chmops
<fet> esa sentencia la uso
<fet> para eliminar una linea
<fet> al introducir variables
<fet> ejemplo nombre = gets.chomp
<fet> gets es otbener
<fet> pero chomp ???
David_H_Smith has quit [Remote host closed the connection]
tunaCanBruh has joined #ruby-lang
marcdel has joined #ruby-lang
tunaCanBruh has quit [Ping timeout: 256 seconds]
hellome has joined #ruby-lang
<pabloh> fet chomp, borra el ultimo salto de carro de la linea si esta present
<pabloh> fet, y este es un canal en inglés :)
timanema has joined #ruby-lang
symm- has quit [Ping timeout: 272 seconds]
marcdel has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby-lang
<fet> ok thank you
fet has quit [Quit: Leaving]
marcdel has joined #ruby-lang
lytol has quit [Remote host closed the connection]
roamingdog has quit []
djbkd has joined #ruby-lang
chills42 has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
sferik has joined #ruby-lang
doobi-sham-96336 has joined #ruby-lang
tkuchiki has quit [Ping timeout: 265 seconds]
intinig has joined #ruby-lang
simi has quit [Ping timeout: 272 seconds]
ta_ has joined #ruby-lang
ta_ has quit [Ping timeout: 272 seconds]
intinig has quit [Ping timeout: 246 seconds]
symm- has joined #ruby-lang
joast has quit [Quit: Leaving.]
David_H_Smith has joined #ruby-lang
gwendall has quit [Remote host closed the connection]
timanema has quit [Ping timeout: 276 seconds]
chinmay_dd has joined #ruby-lang
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Aova has quit [Read error: Connection reset by peer]
ta_ has joined #ruby-lang
wallerdev has joined #ruby-lang
ShawnHill has joined #ruby-lang
David_H_Smith has quit []
Aova has joined #ruby-lang
ta_ has quit [Ping timeout: 246 seconds]
sferik has quit [Quit: Textual IRC Client: www.textualapp.com]
yellowgh0st has quit [Quit: yellowgh0st]
doobi-sham-96336 has quit [K-Lined]
lytol has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
lytol has quit [Ping timeout: 244 seconds]
ur5us has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby-lang
symm- has quit [Ping timeout: 276 seconds]
_djbkd has joined #ruby-lang
kapil__ has joined #ruby-lang
cantonic has quit [Quit: cantonic]
bb010g has joined #ruby-lang
jgpawletko has quit [Quit: jgpawletko]
gix has quit [Ping timeout: 245 seconds]
sudoubuntu has joined #ruby-lang
gix has joined #ruby-lang
intinig has joined #ruby-lang
cantonic has joined #ruby-lang
ItSANgo_ has quit [Quit: Leaving...]
cantonic has quit [Read error: Connection reset by peer]
cantonic has joined #ruby-lang
intinig has quit [Ping timeout: 264 seconds]
gwendall has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
tunaCanBruh has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
ur5us has quit []
gwendall has quit [Ping timeout: 276 seconds]
Miphix has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
tunaCanBruh has quit [Ping timeout: 276 seconds]
Aova has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
ta_ has joined #ruby-lang
Pugsley_ has quit [Quit: Lingo: www.lingoirc.com]
ta_ has quit [Ping timeout: 272 seconds]
ItSANgo has joined #ruby-lang
Lewix_ has joined #ruby-lang
ta_ has joined #ruby-lang
ruby-lang775 has joined #ruby-lang
ta_ has quit [Ping timeout: 272 seconds]
<ruby-lang775> Hi everybody, I'm having problems with breaking out from a loop can someone help me with this? http://repl.it/95U/1
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<cdtaylor> ruby-lang775: Give me a moment
<weaksauce> ruby-lang775 you are breaking but you are not breaking out of the outer loop
<ruby-lang775> aye. I can break from the second loop but i dont know from where to break the outer loop from..
<weaksauce> add a line after 23 and say break
<weaksauce> and in line 8 put next
<weaksauce> well actually that is not going to work. this is not the best ruby style
<cdtaylor> That's what I'm scratching my head at.
<ruby-lang775> weaksauce: I tried that too but if the name is caught by if/else of first loop the whole code will break.. it is possible to avoid that..
<weaksauce> the loop do constructs are not the best idea
<ruby-lang775> ohh, so I need to find an alternative for the script?
hendranata_ has quit [Ping timeout: 246 seconds]
<cdtaylor> Are you familiar with functions?
<ruby-lang775> You mean methods?
Lewix_ has quit [Remote host closed the connection]
<cdtaylor> Does the keyword "def" mean anything to you?
<ruby-lang775> def example; #so smth; end
<weaksauce> methods function are almost synonyms
<weaksauce> and*
crdpink has joined #ruby-lang
<weaksauce> ruby-lang775 try using a while first_name == "" && last_name == "" as an outer loop
<ruby-lang775> I'm still here.
crdpink2 has quit [Ping timeout: 265 seconds]
<weaksauce> set first_name = "" when you get some info that you don't like
<ruby-lang775> I'm trying.
willwish has joined #ruby-lang
<harly> 1) you can't 'break' out two levels. 2) if that's relaly needed, a try/catch is generally set up. 3) it's not needed here. 4) dont' have your last name as an inner loop. Just have it run after the outer loop finishes. 5) better is what weaksauce suggestted. You know when the loop will end; when you set a firstname. and when you set a lastname. so use that.
cantonic has quit [Quit: cantonic]
lytol has joined #ruby-lang
<ruby-lang775> Okay thanks
<ruby-lang775> Are variables defined inside a loop only local to the loop??? :o
<harly> yes.
<harly> define them before the loop if you want them outside the loop.
nisstyre has quit [Changing host]
nisstyre has joined #ruby-lang
<ruby-lang775> Alright
lytol has quit [Ping timeout: 264 seconds]
skade has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
Aova has quit [Read error: Connection reset by peer]
ruby-lang775 has quit [Ping timeout: 246 seconds]
Aova has joined #ruby-lang
Vivex_ has joined #ruby-lang
yfeldblum has joined #ruby-lang
dvorkbjel has quit [Excess Flood]
Kero has quit [Ping timeout: 255 seconds]
Kero has joined #ruby-lang
Vivex has quit [Ping timeout: 255 seconds]
kyb3r_ has quit [Ping timeout: 255 seconds]
dvorkbjel has joined #ruby-lang
iamninja has joined #ruby-lang
kyb3r_ has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
iamninja has quit [Quit: Textual IRC Client: www.textualapp.com]
j4cknewt has joined #ruby-lang
lytol has joined #ruby-lang
chinmay_dd has quit [Quit: Connection closed for inactivity]
gix has quit [Ping timeout: 245 seconds]
gwendall has joined #ruby-lang
gix has joined #ruby-lang
tunaCanBruh has joined #ruby-lang
gwendall has quit [Ping timeout: 264 seconds]
tunaCanBruh has quit [Ping timeout: 255 seconds]
ta_ has joined #ruby-lang
linc01n has quit [Ping timeout: 245 seconds]
linc01n has joined #ruby-lang
joast has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
ta_ has quit [Ping timeout: 245 seconds]
Aova has joined #ruby-lang
cawil has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Remote host closed the connection]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
skade has joined #ruby-lang
cawil has joined #ruby-lang
mattyohe has quit [Quit: Connection closed for inactivity]
canton7 has quit [Ping timeout: 265 seconds]
canton7 has joined #ruby-lang
canton7 has joined #ruby-lang
pabloh has quit [Quit: Saliendo]
yfeldblum has joined #ruby-lang
canton7 has quit [Quit: ZNC - http://znc.in]
yfeldblu_ has joined #ruby-lang
oddmunds has quit [Read error: Connection timed out]
yfeldblum has quit [Ping timeout: 264 seconds]
dellavg_ has joined #ruby-lang
oddmunds has joined #ruby-lang
willwish has left #ruby-lang [#ruby-lang]
skade has quit [Quit: Computer has gone to sleep.]
oddmunds has quit [Ping timeout: 246 seconds]
skade has joined #ruby-lang
skade has quit [Client Quit]
oddmunds has joined #ruby-lang
SuMo_D has quit [Remote host closed the connection]
j0n3 has joined #ruby-lang
lytol has quit [Remote host closed the connection]
Iskarlar has joined #ruby-lang
oddmunds has quit [Ping timeout: 255 seconds]
bb010g has quit [Quit: Connection closed for inactivity]
_djbkd has quit [Quit: My people need me...]
Aova has quit [Read error: Connection reset by peer]
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Aova has joined #ruby-lang
amclain has quit [Quit: Leaving]
oddmunds has joined #ruby-lang
martinbmadsen has quit [Ping timeout: 265 seconds]
chussenot has joined #ruby-lang
j4cknewt has quit [Ping timeout: 255 seconds]
canton7 has joined #ruby-lang
gwendall has joined #ruby-lang
godd2 has joined #ruby-lang
gwendall has quit [Ping timeout: 276 seconds]
tunaCanBruh has joined #ruby-lang
ta_ has joined #ruby-lang
apeiros_ has joined #ruby-lang
Bwild has joined #ruby-lang
j4cknewt has joined #ruby-lang
wmoxam has quit [Ping timeout: 245 seconds]
wmoxam has joined #ruby-lang
tunaCanBruh has quit [Ping timeout: 240 seconds]
ta_ has quit [Ping timeout: 276 seconds]
Aova has quit [Read error: Connection reset by peer]
Aova has joined #ruby-lang
skade has joined #ruby-lang
ta_ has joined #ruby-lang
aarshpatel has joined #ruby-lang
chussenot has quit [Quit: chussenot]
<aarshpatel> Hey guys. I just started learning ruby a couple of weeks ago andI feel like I have the basics down. I want to move on to intermediate topics. What should i learn next?
<aarshpatel> And I was wondering how you guys got better at programming?
wprice has quit [Quit: wprice]
simi has joined #ruby-lang
ta_ has quit [Ping timeout: 276 seconds]
<apeiros_> aarshpatel: practice :)
<harly> what have you done so far?
skade has quit [Quit: Computer has gone to sleep.]
<ljarvis> aarshpatel: write code
intinig has joined #ruby-lang
ledestin has quit [Quit: ledestin]
wallerdev has quit [Quit: wallerdev]
havenwood has quit [Remote host closed the connection]
aarshpatel has quit [Ping timeout: 246 seconds]
Bwild has quit [Ping timeout: 272 seconds]
ShawnHill has left #ruby-lang [#ruby-lang]
Bwild has joined #ruby-lang
intinig has quit [Remote host closed the connection]
Iskarlar has quit [Quit: Textual IRC Client: www.textualapp.com]
hahuang61 has quit [Quit: WeeChat 0.4.2]
Iskarlar has joined #ruby-lang
Bwild has quit [Quit: leaving]
Miphix has quit [Quit: Leaving]
godd2 has quit [Ping timeout: 245 seconds]
gix has quit [Ping timeout: 276 seconds]
<apeiros_> so yorickpeterse talks about eternal yaks, I see :D
mostlybadfly has joined #ruby-lang
<ljarvis> a wild ranting yorick appears
priodev has quit [Ping timeout: 264 seconds]
<apeiros_> "There's a wild unshaved yak in front of you, what do you do?"
<apeiros_> "Go west"
<apeiros_> "You have been killed by a ranting yorick"
<apeiros_> I think it's obvious why I still haven't made a game yet :(
priodev has joined #ruby-lang
gix has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
rippa has joined #ruby-lang
<harly> i'd play that game
Aova has joined #ruby-lang
gwendall has joined #ruby-lang
ta_ has joined #ruby-lang
ta_ has quit [Ping timeout: 276 seconds]
kyb3r_ has quit [Read error: Connection reset by peer]
stamina has joined #ruby-lang
tunaCanBruh has joined #ruby-lang
futilegames has joined #ruby-lang
tunaCanBruh has quit [Ping timeout: 256 seconds]
banister has joined #ruby-lang
oleo is now known as Guest84095
oleo__ has joined #ruby-lang
<yorickpeterse> apeiros_: hi
Guest84095 has quit [Ping timeout: 255 seconds]
<apeiros_> howdy yorickpeterse
aef has joined #ruby-lang
<yorickpeterse> totally nailed the timing
<yorickpeterse> ~12 minutes for Q/A
futilegames has quit [Quit: futilegames]
<apeiros_>
<apeiros_> aaaah, yes, of course:
<apeiros_> $ css2sass -h
<apeiros_> /Users/apeiros/.rvm/gems/ruby-2.2.0/gems/css2sass-0.0.10/bin/css2sass:14:in `each': No such file or directory @ rb_sysopen - -h (Errno::ENOENT)
gwendall has quit [Remote host closed the connection]
aef has quit [Remote host closed the connection]
aef has joined #ruby-lang
futilegames has joined #ruby-lang
<yorickpeterse> hm, the wifi here isn't too bad
aef has quit [Remote host closed the connection]
futilegames has quit [Client Quit]
sarkyniin has joined #ruby-lang
<apeiros_> yorickpeterse: you're a rubinius core dev?
aef has joined #ruby-lang
martinbmadsen has joined #ruby-lang
<yorickpeterse> No I pretend I am for internet points
<yorickpeterse> (but yes, I'm a core dev)
martinbmadsen has quit [Ping timeout: 245 seconds]
<apeiros_> I need to start fiches on ruby people :D
Aova has quit [Read error: Connection reset by peer]
kramsee has quit [Ping timeout: 264 seconds]
Aova has joined #ruby-lang
ta_ has joined #ruby-lang
kramsee has joined #ruby-lang
ledestin has joined #ruby-lang
ledestin has quit [Ping timeout: 240 seconds]
mnngfltg has joined #ruby-lang
ta_ has quit [Read error: Connection timed out]
ta_ has joined #ruby-lang
gwendall has joined #ruby-lang
gix has quit [Ping timeout: 255 seconds]
skade has joined #ruby-lang
skade has quit [Client Quit]
gwendall has quit [Remote host closed the connection]
gwendall has joined #ruby-lang
gwendall has quit [Client Quit]
gix has joined #ruby-lang
tkuchiki has joined #ruby-lang
Voker57 has quit [Remote host closed the connection]
dorei has joined #ruby-lang
skade has joined #ruby-lang
djbkd has quit [Ping timeout: 264 seconds]
skade has quit [Client Quit]
ledestin has joined #ruby-lang
stamina has quit [Quit: WeeChat 1.1.1]
araujo has quit [Ping timeout: 246 seconds]
Aova has quit [Read error: Connection reset by peer]
ta_ has quit [Ping timeout: 276 seconds]
ta_ has joined #ruby-lang
Aova has joined #ruby-lang
intinig has joined #ruby-lang
ta_ has quit [Ping timeout: 276 seconds]
araujo has joined #ruby-lang
araujo has joined #ruby-lang
tunaCanBruh has joined #ruby-lang
tunaCanBruh has quit [Ping timeout: 255 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
chussenot has joined #ruby-lang
ta_ has joined #ruby-lang
chussenot has quit [Quit: chussenot]
fclausen has joined #ruby-lang
ta_ has quit [Ping timeout: 240 seconds]
arBmind1 has joined #ruby-lang
arBmind has quit [Ping timeout: 264 seconds]
arBmind1 has quit [Read error: Connection reset by peer]
aef has quit [Remote host closed the connection]
aef has joined #ruby-lang
arBmind has joined #ruby-lang
yfeldblu_ has quit [Ping timeout: 255 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ta_ has joined #ruby-lang
simi has quit [Ping timeout: 264 seconds]
sankaber has joined #ruby-lang
ta_ has quit [Ping timeout: 276 seconds]
chinmay_dd has joined #ruby-lang
qba73 has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
Miphix has joined #ruby-lang
cornerma1 has joined #ruby-lang
Aova has joined #ruby-lang
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cornerman has quit [Ping timeout: 265 seconds]
cornerma1 is now known as cornerman
chussenot has joined #ruby-lang
qba73 has quit [Remote host closed the connection]
timanema has joined #ruby-lang
tunaCanBruh has joined #ruby-lang
ledestin has quit [Quit: ledestin]
Forgetful_Lion has quit [Quit: indeed]
tunaCanBruh has quit [Ping timeout: 255 seconds]
mnngfltg has quit [Quit: This computer has gone to sleep]
ta_ has joined #ruby-lang
fclausen has quit [Ping timeout: 272 seconds]
symm- has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
ta_ has quit [Ping timeout: 265 seconds]
timanema has quit [Quit: Lost terminal]
oleo__ has quit [Quit: Verlassend]
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
oleo has joined #ruby-lang
yfeldblum has joined #ruby-lang
arBmind has joined #ruby-lang
intinig has quit [Ping timeout: 240 seconds]
j4cknewt has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 244 seconds]
ta_ has joined #ruby-lang
unsymbol has quit [Ping timeout: 246 seconds]
sarkyniin has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 264 seconds]
face has joined #ruby-lang
unsymbol has joined #ruby-lang
elia has joined #ruby-lang
qba73 has joined #ruby-lang
faces has quit [Ping timeout: 246 seconds]
arBmind has quit [Ping timeout: 245 seconds]
Aova has quit [Read error: Connection reset by peer]
Aova has joined #ruby-lang
djinni` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
arBmind has joined #ruby-lang
arBmind has left #ruby-lang [#ruby-lang]
intinig has joined #ruby-lang
jgpawletko has joined #ruby-lang
ta_ has joined #ruby-lang
djinni` has joined #ruby-lang
tunaCanBruh has joined #ruby-lang
ta_ has quit [Ping timeout: 264 seconds]
tunaCanBruh has quit [Ping timeout: 246 seconds]
harly has quit [Quit: Leaving]
red_menace has joined #ruby-lang
Pugsley_ has joined #ruby-lang
qba73 has quit []
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
martinbmadsen has joined #ruby-lang
Integralist has joined #ruby-lang
clamstar has quit [Ping timeout: 264 seconds]
martinbmadsen has quit [Ping timeout: 240 seconds]
intinig has quit [Ping timeout: 245 seconds]
Integralist has quit [Client Quit]
clamstar has joined #ruby-lang
intinig has joined #ruby-lang
djinni` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
djinni` has joined #ruby-lang
rikkipitt has joined #ruby-lang
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
Aova has joined #ruby-lang
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
SuMo_D has joined #ruby-lang
roamingdog has joined #ruby-lang
symm- has quit [Ping timeout: 245 seconds]
djinni` has quit [Ping timeout: 252 seconds]
yfeldblum has joined #ruby-lang
SuMo_D has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 255 seconds]
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
SuMo_D_ has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
intinig has quit [Ping timeout: 264 seconds]
kapil__ has quit [Quit: Connection closed for inactivity]
tkuchiki has quit [Ping timeout: 272 seconds]
intinig has joined #ruby-lang
tunaCanBruh has joined #ruby-lang
roamingdog has quit [Remote host closed the connection]
tunaCanBruh has quit [Ping timeout: 256 seconds]
ta_ has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
ta_ has quit [Ping timeout: 265 seconds]
mcclurmc_ has joined #ruby-lang
mcclurmc has quit [Ping timeout: 272 seconds]
diegoviola has quit [Quit: WeeChat 1.1.1]
symm- has joined #ruby-lang
Aova has joined #ruby-lang
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SuMo_D_ has quit [Remote host closed the connection]
SuMo_D has joined #ruby-lang
tekacs has quit [Ping timeout: 272 seconds]
tekacs has joined #ruby-lang
SuMo_D has quit [Ping timeout: 264 seconds]
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
SuMo_D has joined #ruby-lang
<|jemc|> yorickpeterse: nice gif :)
Voker57|2 has joined #ruby-lang
intinig has quit [Ping timeout: 245 seconds]
brixen has quit [Ping timeout: 256 seconds]
malev has quit [Ping timeout: 264 seconds]
sindork has quit [Ping timeout: 276 seconds]
intinig has joined #ruby-lang
sindork has joined #ruby-lang
xybre has quit [Ping timeout: 256 seconds]
brixen has joined #ruby-lang
djinni` has joined #ruby-lang
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
roamingdog has joined #ruby-lang
Miphix has quit [Quit: Leaving]
roamingdog has quit [Ping timeout: 264 seconds]
ta_ has joined #ruby-lang
fedexo has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
Voker57|2 has quit []
ta_ has quit [Ping timeout: 244 seconds]
tunaCanBruh has joined #ruby-lang
havenwood has joined #ruby-lang
Aova has joined #ruby-lang
hinbody-mobile has joined #ruby-lang
tunaCanBruh has quit [Ping timeout: 264 seconds]
yellowgh0st has joined #ruby-lang
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
yfeldblum has joined #ruby-lang
banister has joined #ruby-lang
aarshpatel has joined #ruby-lang
mnngfltg has joined #ruby-lang
yfeldblum has quit [Ping timeout: 246 seconds]
<aarshpatel> Hey guys. How did you guys get better at programming in ruby. Any tips?
Iskarlar has joined #ruby-lang
ta_ has joined #ruby-lang
<red_menace> just do something
<aarshpatel> like what
araujo has quit [Ping timeout: 276 seconds]
Lewix has joined #ruby-lang
Lewix has joined #ruby-lang
<red_menace> like an application or script that does something
<red_menace> you will usually run into stuff that you have done wrong (it doesn't work), so you look up how to do it correctly, and then you remember (theoretically)
araujo has joined #ruby-lang
[H]unt3r has joined #ruby-lang
banister is now known as banisterfiend
mattyohe has joined #ruby-lang
<jhass> aarshpatel: if the result's small enough, once you're done, post it here for review
<jhass> seeing alternate versions of things you already thought through is a quite good learning experience IMO
ta_ has quit [Ping timeout: 246 seconds]
<aarshpatel> are there any essential books thtat I can read
<aarshpatel> to get better
<bougyman> SICP
<tobiasvl> SICp is a great book but not sure if it's recommended in this case
<tobiasvl> although it helps you think in the functional paradigm
[H]unt3r has quit [Read error: Connection reset by peer]
[H]unt3r has joined #ruby-lang
<tobiasvl> aarshpatel: just code a lot of ruby I guess! have some projects and look up stuff all the time
wallerdev has joined #ruby-lang
rikkipitt has quit [Remote host closed the connection]
__butch__ has joined #ruby-lang
__butch__ has quit [Client Quit]
[H]unt3r has quit [Quit: Leaving]
aarshpatel has quit [Ping timeout: 246 seconds]
SuMo_D has quit [Remote host closed the connection]
martinbmadsen has joined #ruby-lang
roamingdog has joined #ruby-lang
SuMo_D has joined #ruby-lang
SuMo_D has quit [Remote host closed the connection]
SuMo_D has joined #ruby-lang
djbkd has joined #ruby-lang
martinbmadsen has quit [Ping timeout: 245 seconds]
roamingdog has quit [Ping timeout: 245 seconds]
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
chussenot has quit [Quit: chussenot]
MartynKeigher has joined #ruby-lang
lytol has joined #ruby-lang
tunaCanBruh has joined #ruby-lang
Aova has joined #ruby-lang
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<MartynKeigher> hey all... wondering if some could help me out. I'm try to run PUMA (webserver) as a daemon. right now i am able to run it from command - sudo bunlde exec puma - and it runs fine. I just need it to STAY running, and if poss, run on startup. http://i.imgur.com/kHhZhKy.png
[H]unt3r has joined #ruby-lang
<MartynKeigher> ^ youi can ignore the issue about twitter. its unrelated.
intinig has quit [Ping timeout: 264 seconds]
<epitron> MartynKeigher: that looks like windows to me
<epitron> No wait
<epitron> Just the font
<epitron> :)
<epitron> You could integrate it into your distribution's init system
tunaCanBruh has quit [Ping timeout: 246 seconds]
<epitron> Or just make a bash script that loops forever, starting it whenever it quits
<epitron> Or use one of those process manager things
<epitron> Like monit
<epitron> There you go
<epitron> Some options there
x0f has quit [Ping timeout: 272 seconds]
x0f has joined #ruby-lang
<MartynKeigher> epitron, ... looks like windows???
hinbody-mobile has quit [Ping timeout: 272 seconds]
<MartynKeigher> oh. its a screenshot of the linux vm on an esx host
matju has joined #ruby-lang
intinig has joined #ruby-lang
[H]unt3r has quit [Read error: Connection reset by peer]
[H]unt3r has joined #ruby-lang
oleo has quit [Quit: Verlassend]
aemeredith has joined #ruby-lang
rikkipitt has joined #ruby-lang
lytol has quit [Remote host closed the connection]
xybre has joined #ruby-lang
oleo has joined #ruby-lang
roamingdog has joined #ruby-lang
Iskarlar has joined #ruby-lang
amclain has joined #ruby-lang
roamingdog has quit [Remote host closed the connection]
mnngfltg has quit [Quit: Leaving]
roamingdog has joined #ruby-lang
mnngfltg has joined #ruby-lang
mnngfltg has quit [Client Quit]
mnngfltg2 has joined #ruby-lang
intinig has quit [Remote host closed the connection]
mnngfltg2 has quit [Client Quit]
mnngfltg2 has joined #ruby-lang
intinig has joined #ruby-lang
fedexo has quit [Read error: Connection reset by peer]
chills42 has joined #ruby-lang
oleo has quit [Quit: Verlassend]
spuk has quit [Ping timeout: 245 seconds]
lytol has joined #ruby-lang
oleo has joined #ruby-lang
spuk has joined #ruby-lang
intinig has quit [Ping timeout: 272 seconds]
intinig has joined #ruby-lang
chills42 has quit [Remote host closed the connection]
<jhass> MartynKeigher: the other term for the thing you want to use/google is supervisor or process supervisor. These come as stand alone program or your init system might already be one
Iskarlar_ has joined #ruby-lang
oleo has quit [Quit: Verlassend]
Iskarlar has quit [Ping timeout: 265 seconds]
sarkyniin has joined #ruby-lang
nathanstitt has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
tunaCanBruh has joined #ruby-lang
oleo has joined #ruby-lang
Aova has joined #ruby-lang
aemeredith has quit [Remote host closed the connection]
oleo has quit [Read error: Connection reset by peer]
oleo has joined #ruby-lang
mcclurmc has joined #ruby-lang
intinig has quit [Remote host closed the connection]
SuMo_D has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 245 seconds]
oleo has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 265 seconds]
tunaCanBruh has quit [Ping timeout: 256 seconds]
oleo has joined #ruby-lang
oleo has quit [Client Quit]
mcclurmc_ has quit [Ping timeout: 245 seconds]
oleo has joined #ruby-lang
oleo has joined #ruby-lang
mnngfltg2_ has joined #ruby-lang
yellowgh0st has quit [Quit: yellowgh0st]
Iskarlar_ has quit [Ping timeout: 240 seconds]
mnngfltg2 has quit [Ping timeout: 276 seconds]
lytol has quit [Remote host closed the connection]
sudoubuntu has joined #ruby-lang
hahuang62 has joined #ruby-lang
hahuang62 has quit [Client Quit]
hahuang61 has joined #ruby-lang
lytol has joined #ruby-lang
mnngfltg2_ has quit [Ping timeout: 245 seconds]
arBmind has joined #ruby-lang
futilegames has joined #ruby-lang
lytol has quit [Remote host closed the connection]
pabs has quit [Ping timeout: 245 seconds]
pabs has joined #ruby-lang
djbkd has quit [Quit: Leaving...]
rikkipitt has quit [Quit: Leaving...]
rikkipitt has joined #ruby-lang
symm- has joined #ruby-lang
simi has joined #ruby-lang
ta_ has joined #ruby-lang
djbkd has joined #ruby-lang
malev has joined #ruby-lang
ta_ has quit [Ping timeout: 276 seconds]
intinig has joined #ruby-lang
matju has quit [Ping timeout: 245 seconds]
yellowgh0st has joined #ruby-lang
mnngfltg2_ has joined #ruby-lang
drewdavis_ is now known as drewdavis
ta_ has joined #ruby-lang
Voker57 has joined #ruby-lang
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Aova has quit [Read error: Connection reset by peer]
matju has joined #ruby-lang
j4cknewt has joined #ruby-lang
ta_ has quit [Ping timeout: 265 seconds]
Aova has joined #ruby-lang
Iskarlar has joined #ruby-lang
ta_ has joined #ruby-lang
iamninja has joined #ruby-lang
roamingdog has quit [Remote host closed the connection]
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
ta_ has quit [Ping timeout: 276 seconds]
oleo has quit [Quit: Verlassend]
oleo has joined #ruby-lang
intinig has quit [Ping timeout: 256 seconds]
roamingdog has joined #ruby-lang
hagabaka has quit [Ping timeout: 246 seconds]
oleo has quit [Quit: Verlassend]
oleo has joined #ruby-lang
oleo has quit [Read error: Connection reset by peer]
trajing|Mobile has joined #ruby-lang
trajing|Mobile has quit [Read error: Connection reset by peer]
malconis has joined #ruby-lang
chussenot has joined #ruby-lang
oleo has joined #ruby-lang
mnngfltg2 has joined #ruby-lang
chills42 has joined #ruby-lang
martinbmadsen has joined #ruby-lang
mnngfltg2_ has quit [Ping timeout: 255 seconds]
chills42 has quit [Ping timeout: 265 seconds]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
martinbmadsen has quit [Ping timeout: 272 seconds]
yfeldblum has joined #ruby-lang
lytol has joined #ruby-lang
tunaCanBruh has joined #ruby-lang
mnngfltg2 has quit [Remote host closed the connection]
kyb3r_ has joined #ruby-lang
yfeldblum has quit [Ping timeout: 246 seconds]
malconis_ has joined #ruby-lang
tunaCanBruh has quit [Ping timeout: 246 seconds]
Aova has quit [Read error: Connection reset by peer]
malconis has quit [Ping timeout: 264 seconds]
banisterfiend has quit [Read error: Connection reset by peer]
Aova has joined #ruby-lang
banister has joined #ruby-lang
[H]unt3r has quit [Quit: Leaving]
yfeldblum has joined #ruby-lang
red_menace has quit [Quit: ...zzzZZZzzz...]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
yfeldblu_ has joined #ruby-lang
intinig has joined #ruby-lang
yfeldblum has quit [Ping timeout: 272 seconds]
ta_ has joined #ruby-lang
mksm has joined #ruby-lang
<mksm> Hi. How can I convert "0xaa" (String) to 0xaa (Integer)?
thang has quit [Ping timeout: 245 seconds]
intinig has quit [Ping timeout: 264 seconds]
<|jemc|> >> "0xaa".to_i(16)
<eval-in__> |jemc| => 170 (https://eval.in/273625)
<havenwood> >> "0xaa".hex
<eval-in__> havenwood => 170 (https://eval.in/273627)
<mksm> I need to use the 0xaa notation
<apeiros_> >> Integer("0xaa")
<eval-in__> apeiros_ => 170 (https://eval.in/273628)
<apeiros_> soooo many ways
ta_ has quit [Ping timeout: 276 seconds]
wallerdev has quit [Quit: wallerdev]
<havenwood> >> 0xaa
<eval-in__> havenwood => 170 (https://eval.in/273629)
ta_ has joined #ruby-lang
<mksm> OK, so is there a way to make it return an Integer in hex notation?
<mksm> like 170 => 0xaa
<womble> mksm: They're the same thing.
thang has joined #ruby-lang
<apeiros_> notation is presentation. you have to convert the integer to a string for that.
<apeiros_> >> 0xaa.to_s(16)
<eval-in__> apeiros_ => "aa" (https://eval.in/273630)
<apeiros_> >> "%x" % 0xaa
<eval-in__> apeiros_ => "aa" (https://eval.in/273631)
<mksm> "%#x" % 0xaa
<heftig> >> "0x%08x" % 0xaa
<eval-in__> heftig => "0x000000aa" (https://eval.in/273632)
<mksm> It is the same. But not for activerecord when writing to a binary column.
<heftig> mksm: what are you seeing and what do you expect?
<womble> mksm: A lot of time could have been saved if you'd mentioned the *entire* problem up-front.
Iskarlar has joined #ruby-lang
<womble> (And what is a "binary column" in activerecord, anyway?)
<apeiros_> blob
wallerdev has joined #ruby-lang
<womble> apeiros_: That doesn't make sense, though... BLOBs don't care about hex vs integer.
<mksm> I'm trying to save a MD5 hexdigest string to a BINARY(16) MySQL column through activerecord
<apeiros_> womble: they do care if you think you could store binary data as hex
<apeiros_> at least that's what I suspect is happening here
matrisking has joined #ruby-lang
<womble> apeiros_: Fair enough.
<apeiros_> mksm: so let me guess, that MD5 hexdigest is 16 bytes large? (32 hex digits)
<mksm> When I try to save "653bb75f2bf95d447ce2ebce958c52f4", it converts to x'3635336262373566326266393564343437636532656263653935386335326634', which is what mysql expects but it's not 16 bytes
<mksm> apeiros_: yes
<apeiros_> mksm: you're confusing hex and binary
Iskarlar has quit [Ping timeout: 240 seconds]
<apeiros_> >> "6".chr.hex
<eval-in__> apeiros_ => 6 (https://eval.in/273644)
<apeiros_> gah
<apeiros_> >> "6".chr.to_s(16)
<eval-in__> apeiros_ => wrong number of arguments (1 for 0) (ArgumentError) ... (https://eval.in/273645)
<apeiros_> ok, would help if I didn't mess up chr and ord
<womble> >> Digest::MD5.hexdigest("ohai!").scan(/../).map(&:hex).map(&:chr).join
<apeiros_> >> "6".ord.to_s(16)
<eval-in__> womble => uninitialized constant Digest (NameError) ... (https://eval.in/273646)
<eval-in__> apeiros_ => "36" (https://eval.in/273647)
thang has quit [Ping timeout: 246 seconds]
<womble> >> require 'digest/md5'; Digest::MD5.hexdigest("ohai!").scan(/../).map(&:hex).map(&:chr).join
<eval-in__> womble => "6%,\x01\x90ky\x93\xEA\xBD\xC5\x04\xFD\xF8\xAF\x96" (https://eval.in/273648)
<apeiros_> womble: eeew :-p
dellavg_ has quit [Ping timeout: 264 seconds]
<womble> mksm: Of course, you can avoid all of that crap if you just use #digest instead of #hexdigest in the first place...
<apeiros_> mksm: you want .digest, not .hexdigest
<apeiros_> womble: pack("H*"), much nicer and faster ;-)
<womble> >> require 'digest/md5'; Digest::MD5.digest("ohai!")
<eval-in__> womble => "6%,\x01\x90ky\x93\xEA\xBD\xC5\x04\xFD\xF8\xAF\x96" (https://eval.in/273649)
<mksm> Yep, but the hexdigest is already generated, i'm not generating the md5
<apeiros_> anyway, to make the point I utterly failed to make before:
[H]unt3r has joined #ruby-lang
<apeiros_> 6 --> 36, so your string is stored as hex encoded binary. that's what you see.
<womble> >> require 'digest/md5'; [Digest::MD5.hexdigest("ohai!")].pack("H*")
<eval-in__> womble => "6%,\x01\x90ky\x93\xEA\xBD\xC5\x04\xFD\xF8\xAF\x96" (https://eval.in/273650)
<womble> Neat.
thang has joined #ruby-lang
<apeiros_> and womble just showed you how to convert hex data to binary
<apeiros_> (which your driver will then dutifully convert back to hex to push it over to the db…)
futilegames has quit [Quit: futilegames]
<mksm> I understand the diff between hex and binary (and pack/unpack), just trying to make the conversions work with AR reading/saving from the DB
<mksm> Thanks for the help :D
<apeiros_> AR expects a binary encoded string
<apeiros_> not a hex decoded string
<womble> apeiros_: Why would the driver re-encode the binary blob into hex to put it over the wire?
<apeiros_> womble: 23:00 mksm: … it converts to x'363…
<apeiros_> because that's what it seems to use.
<apeiros_> I'd got to check, but I think pg wants it that way too, even with bind params
mqt_ has quit [Ping timeout: 246 seconds]
mqt has joined #ruby-lang
<apeiros_> yepp, does
<womble> apeiros_: The x'<stuff>' string looks like Python notation; that's just a different representation of the string "653bb<etc>"
<apeiros_> womble: no
ta_ has quit [Ping timeout: 276 seconds]
dzejrou has joined #ruby-lang
<apeiros_> pg.escape_bytea("hi") # => "\\x6869"
intinig has joined #ruby-lang
<apeiros_> and you execute a query like: pg.exec_params("INSERT INTO foo VALUES($1)", [pg.escape_bytea("hi")])
thang has quit [Ping timeout: 240 seconds]
<apeiros_> so you literally pass '\x6869'. i.e., the data is converted to a hex representation. and I'd not be surprised if that got reencoded as binary before it actually goes over the wire.
<apeiros_> and people wonder why I think sql is a stupid idea for machine/machine communications…
<hackeron> hey, I have a bizzare issue, when I run bundle install I get 'Bundler::GemspecError: Could not read gem at /home/deployer/timeagent/shared/bundle/ruby/2.2.0/cache/nokogiri-1.6.6.2.gem. It may be corrupted' - when I run gem install nokogiri -v '1.6.6.2' - it installs fine. Despite being installed, if I re-run the bundle command, it fails to install it with the same error, any ideas?
thang has joined #ruby-lang
hackeron was kicked from #ruby-lang by apeiros_ [when cross-posting, at least inform all channels that you cross post.]
tunaCanBruh has joined #ruby-lang
hackeron has joined #ruby-lang
<womble> apeiros_: pg does the escaping transparently: db.exec_params("INSERT INTO blobby VALUES ($1)", ["ohai"]) does the same thing as db.exec_params("INSERT INTO blobby VALUES ($1)", [db.escape_bytea("ohai")]) (puts the same string into the DB)
<womble> select * from blobby returns \x6f686169 twice
xsdg has quit [Ping timeout: 265 seconds]
<apeiros_> have you tried with binary data?
<apeiros_> I admit, I haven't tried bind params with unescaped data.
<womble> That *is* "binary data"
xsdg has joined #ruby-lang
<apeiros_> womble: I mean control codes and other fun stuff
<apeiros_> 0x00-0x19 and 0x80-0xff
Bwild has joined #ruby-lang
karma_ has joined #ruby-lang
tunaCanBruh has quit [Ping timeout: 265 seconds]
<karma_> Hello all, I have a problem I can't find a solution for in the docs
Aova has quit [Read error: Connection reset by peer]
<karma_> using Time I can't seem to get ruby to understand that the time I have is in UTC, it uses my local time instead
<womble> karma_: How do you have the time you have?
<karma_> I scrape a site with mechanize, use Time.parse
<womble> Let me be more specific: what is the format of the time that you have.
<karma_> 2015-01-31 12:34:43
Forgetful_Lion has joined #ruby-lang
<karma_> That is what I get from the site
<womble> karma_: Tack " UTC" on the end of it
<karma_> so that would be the correct way to do it?
<womble> .parse (and .strptime) all expect local time.
<apeiros_> womble: doesn't seem to like it
<womble> <shrug> It's the way I've always done it.
<karma_> ok, that is how I was going to do it, but I thought there would be a way to more tell Ruby what it was but could not find anything
<karma_> Now I know why then :)
<karma_> Thanks for your help
<womble> karma_: Alternately, you can set ENV["TZ"] = "UTC", but that's rather excessively brutal.
<karma_> Yeah, that seemed like a huge thing to do to solve a "simple" problem
<apeiros_> so does not seem like it handles it transparently
Aova has joined #ruby-lang
<karma_> once again, thanks :)
<womble> karma_: Also, as a "safety net", you might want to use .strptime with a format of "%F %T %Z", just to make sure you're not getting fed misformatted dates
<apeiros_> womble: so unless you use bytea for values which don't need bytea, you definitively want to have that fun of converting binary to hex and back half a dozen times :)
<karma_> ok, I'll look into that
<womble> Time.parse tries to deal with ambiguities sometimes, and doesn't always get it quite right. When you're dealing with times you've scraped off the Internet...
yellowgh0st has quit [Quit: yellowgh0st]
izietto has joined #ruby-lang
ta_ has joined #ruby-lang
rikkipitt has quit [Remote host closed the connection]
lytol has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 276 seconds]
rbpd5015 has joined #ruby-lang
dzejrou has quit [Ping timeout: 246 seconds]
dzejrou has joined #ruby-lang
<rbpd5015> hey everyone, I am trying to parse an HRML page with NOKOGIRI and got a small problem
<rbpd5015> I am parsing a number that shows at 13.5
ta_ has joined #ruby-lang
<rbpd5015> however it PUTS as 13½
<rbpd5015> Please help I have been stuck on this for quite some time URRRRRRR
<apeiros_> rbpd5015: you're having encoding issues
<rbpd5015> ok how ca i fix this apeiros?
<rbpd5015> any help would be great
<jhass> are you porfa in #ruby?
<apeiros_> rbpd5015: difficult. figure out which encoding your file has and read it with the correct encoding.
<rbpd5015> ok I did this doc = Nokogiri::HTML(f, nil, "UTF-8")
ta_ has quit [Ping timeout: 256 seconds]
<rbpd5015> and now it parses 13½
<rbpd5015> but still not 13.5
<rbpd5015> can i do a replacement of 1/2 with .5
<apeiros_> well, is 13.5 really what's written in the html?
<apeiros_> I doubt nokogiri just creates that from thin air…
mattyohe has quit [Quit: Connection closed for inactivity]
<rbpd5015> crap
<rbpd5015> your right
<rbpd5015> this will cause a hiccup in my DB
<rbpd5015> it does say 1/2
<rbpd5015> so what is the best solution can replace it thorught the entire doc?
lytol has joined #ruby-lang
<rbpd5015> if so what is the synatax for that still learning as you can tell
<jhass> you could do it before passing it to nokogiri, yes
<jhass> use String#gsub
<apeiros_> rbpd5015: either literally or with an html escape sequence. looks like &...;
<jhass> I suspect it's literally if he got encoding issues on it
<apeiros_> and there's at least 3 forms of escapes. &NAME; or &#xHEX; or &#CODEPOINT; iirc
<rbpd5015> ok sok what is best i am really sorry
<jhass> jse St
<jhass> blergh, sorry
<jhass> the answer is use String#gsub
<rbpd5015> ok let me tyry the syntax and see if it works
<jhass> you should look it up in some doc tool, like http://ruby-doc.org/core-2.2.0/String.html#method-i-gsub
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
gix has quit [Ping timeout: 245 seconds]
martinbmadsen has joined #ruby-lang
matrisking has quit [Quit: leaving]
deol has joined #ruby-lang
gix has joined #ruby-lang
<rbpd5015> fudge guys I cant figure this crap out?
martinbmadsen has quit [Ping timeout: 244 seconds]
<jhass> what did you try so far?
<rbpd5015> I am confused where to put it
<rbpd5015> do I need to make a function for it
<rbpd5015> and then call it
<rbpd5015> just for 1 lettteR?
<jhass> Nokogiri takes not only an IO, it happily takes a string too
intinig has quit [Ping timeout: 272 seconds]
<jhass> so you can read the file into a string and do things on the string before passing it to nokogiri
<ljarvis> (an IO is better though)
<ljarvis> ah you want preprocessing
<rbpd5015> ill take it anyway
<ljarvis> ow it's not better, go figure
<rbpd5015> just trying for most simple solution
j4cknewt has quit [Remote host closed the connection]
<rbpd5015> doc.search('½').each { |br| br.replace(".5") }
<rbpd5015> tried this and it errored out?
apt-get_ has joined #ruby-lang
<jhass> rbpd5015: I really would do it on the string before passing it to nokogiri
Lewix has quit [Remote host closed the connection]
oleo is now known as Guest74747
oleo__ has joined #ruby-lang
<rbpd5015> ok i dont know that syntax jhass sorry what would it be?
<jhass> I'd use File.read and String#gsub
<jhass> as I said
<jhass> rbpd5015: grab irb (or better pry) and play around
<ljarvis> this seems like a complex task if you're not familiar with Ruby
<jefus> pry is amazing.
<rbpd5015> ok let me mess with it
* apeiros_ is always tempted to correct people when they ask for "the syntax of X"
sarkyniin has quit [Ping timeout: 264 seconds]
Guest74747 has quit [Ping timeout: 256 seconds]
<ljarvis> heh
bradland has quit [Ping timeout: 246 seconds]
riotjones has joined #ruby-lang
oleo__ has quit [Read error: Connection reset by peer]
euphoria64 has joined #ruby-lang
riotjone_ has quit [Ping timeout: 246 seconds]
Aova has quit [Read error: Connection reset by peer]
duderonomy has quit [Quit: Textual IRC Client: www.textualapp.com]
Bwild has quit [Read error: No route to host]
ta_ has joined #ruby-lang
Aova has joined #ruby-lang
euphoria64 has left #ruby-lang [#ruby-lang]
oleo__ has joined #ruby-lang
bradland has joined #ruby-lang
ta_ has quit [Ping timeout: 255 seconds]
Bwild has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
<rbpd5015> ok guys this didnt work
<rbpd5015> doc = doc.gsub!("½", ".5")
<rbpd5015> so I did this before I passed doc to NOKOGIRI
simi has quit [Ping timeout: 264 seconds]
Rayford has joined #ruby-lang
<womble> rbpd5015: Was the document actually transformed in the way you expected?
<rbpd5015> womble i am so lost i have spent 3 hours on such a dumb thing
<rbpd5015> frustrating
<apeiros_> rbpd5015: as said, it might not be in the html literally. it might be escaped.
<apeiros_> search for 13& in your document
<rbpd5015> it is i looked in the source
<rbpd5015> +13½&nbsp;-105
<apeiros_> >> "13½".gsub("½", ".5")
<rbpd5015> thats my line I really need it to print as two objects 13.5 and then -105
<rbpd5015> however Ill do that part after
* apeiros_ kicks eval-in__
<apeiros_> well, since eval-in__ is dead or something:
<apeiros_> "13½".gsub("½", ".5") # => "13.5"
<apeiros_> works fine
<rbpd5015> I dont know 13 cause it changes
brixen has quit [Ping timeout: 264 seconds]
<rbpd5015> so it would be "½".gsub("½", ".5")
<rbpd5015> right
weaksauce has quit [Ping timeout: 264 seconds]
sideshowcoder has quit [Ping timeout: 264 seconds]
funnel has quit [Ping timeout: 264 seconds]
<apeiros_> so whatever you do wrong, it's not the gsub (well, apart from using gsub! *and* assigning - use either gsub, or don't reassign)
brixen has joined #ruby-lang
deg has quit [Ping timeout: 264 seconds]
funnel has joined #ruby-lang
stonith has joined #ruby-lang
stonith has joined #ruby-lang
stoked has quit [Ping timeout: 264 seconds]
gregf_ has quit [Ping timeout: 264 seconds]
<rbpd5015> ??
Xney has joined #ruby-lang
kyb3r_ has quit [Ping timeout: 264 seconds]
Xney2 has quit [Ping timeout: 264 seconds]
gregf_ has joined #ruby-lang
<apeiros_> rbpd5015: um, "use either gsub, or don't reassign", not "use gsub and don't assign".
kyb3r_ has joined #ruby-lang
deg has joined #ruby-lang
gix has quit [Ping timeout: 264 seconds]
<apeiros_> also as jhass said - you should do the gsub *before* passing the string to nokogiri.
<rbpd5015> ??
ta_ has joined #ruby-lang
<apeiros_> gsub *returns* the gsubbed string, it does *not* modify the string
<apeiros_> gsub! *modifies* the string, and potentially returns *nil*
<apeiros_> so it's either `result = str.gsub(…)` or `str.gsub!(…)`
apt-get_ has quit [Quit: Quitte]
<apeiros_> but: `str.gsub(…)` <- wrong. `str = str.gsub!(…)` <- wrong too
enkristoffer has quit [Ping timeout: 264 seconds]
<apeiros_> and "??" is not a question I can answer.
enkristoffer has joined #ruby-lang
Rayford has quit [Quit: Rayford]
face has quit [Ping timeout: 264 seconds]
robbyoconnor has quit [Excess Flood]
face has joined #ruby-lang
robbyoconnor has joined #ruby-lang
Bwild has quit [Remote host closed the connection]
jefus has quit [Ping timeout: 264 seconds]
gix has joined #ruby-lang
ta_ has quit [Ping timeout: 240 seconds]
ReinH has quit [Ping timeout: 264 seconds]
Gate has quit [Ping timeout: 264 seconds]
Gate has joined #ruby-lang
cornerman has quit [Ping timeout: 264 seconds]
<rbpd5015> ok so now I am before nokogiri
<rbpd5015> I first opened the file and stored it as a variable f
<rbpd5015> so now when I do f.gsub("½", ".5")
<rbpd5015> that doesnt work?
DEac-_ has quit [Ping timeout: 264 seconds]
<rbpd5015> f.gsub!("½", ".5")
<rbpd5015> I mean
<apeiros_> rbpd5015: for future reference: "doesn't work" is a shitty problem description
DEac- has joined #ruby-lang
<rbpd5015> haha yeah your right
Guest52388 has quit [Ping timeout: 264 seconds]
<rbpd5015> I get an error which says undefined method gsub
<apeiros_> see
<apeiros_> it could also have meant "the value does not get replaced"
<apeiros_> and "an error" is only a tiny bit less shitty.
<apeiros_> when you get an error, you gist it.
<apeiros_> in this case it's not necessary because I know without.
Lewix has joined #ruby-lang
Lewix has joined #ruby-lang
<apeiros_> File.read, not File.open
<rbpd5015> gotcha, so I got to be missing a step sorry man, Ill get it shortly
<apeiros_> gsub works on a string, not on a file
<rbpd5015> ahh ok
<rbpd5015> but I still got to open it for NOKOGIRI, so Am I going to read it first, then make the gsub then save then open?
LBo has joined #ruby-lang
<apeiros_> rbpd5015: as somebody already told you - nokogiri accepts a string just fine
sideshowcoder has joined #ruby-lang
<rbpd5015> oh ok it worked fine
<rbpd5015> now gives me an error on close, so I jsut need to remove that part
<rbpd5015> ok last question then i am off for a bit
<rbpd5015> so now I got this in the HTML
<rbpd5015> <div class="eventLine-book-value" id="eventLineOpener-338831-238-1159-1"> -13.5 -105 </div>
<rbpd5015> and I want both 13.5 and -105 to be seperated
<rbpd5015> I got that ugly &nbsp;
<rbpd5015> can I do a gsub on that also with a /n
<rbpd5015> ?
<apeiros_> just try it?
<apeiros_> you can usually easily answer "can I" questions yourself using irb/pry
hagabaka has joined #ruby-lang
cornerman has joined #ruby-lang
<rbpd5015> well '\n' worked it replace it, but now it wasnt seen as a newline LOL