apeiros_ changed the topic of #ruby to: Ruby 2.1.2; 2.0.0-p481; 1.9.3-p545: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
<benzrf> banister fix ur shit
<benzrf> !!@ causes pry to exit
<benzrf> is this intended behavior
<moneydouble> havenwood: Whats chruby? And yeah you're right probably. I wanna keep it simple so I don't get overwhelmed haha.
Robbo` has quit [Read error: Connection reset by peer]
timonv has joined #ruby
<havenwood> moneydouble: it just switches rubies (on of the jobs of rvm)
<havenwood> one of*
Robbo` has joined #ruby
d34th4ck3r has joined #ruby
shime has joined #ruby
<moneydouble> havenwood: Interesting. I feel like I have a lot to learn :O lol Kinda scary ha.
phutchins has quit [Ping timeout: 240 seconds]
<Freddan962> DouweM: https://www.youtube.com/watch?v=K4NQouw-bW8&feature=youtu.be FlappyTappy (My Flappy Bird clone)
sabfer has quit [Remote host closed the connection]
<havenwood> moneydouble: just environment switching stuff. if you only need one Ruby you can use system Ruby, brew Ruby or ruby-install to /usr/local.
coderhs has quit [Ping timeout: 240 seconds]
cwc has quit [Remote host closed the connection]
kl0__ has joined #ruby
GriffinHeart has quit [Ping timeout: 252 seconds]
kl0_ has quit [Ping timeout: 258 seconds]
kl0__ is now known as kl0_
<shevy> how can I find out this
hermanmunster has quit [Remote host closed the connection]
<moneydouble> havenwood: True. Any tips on getting up to speed on Ruby and Ruby dev itself? I'm coming from Python so I know the basic syntax of Ruby already, and get the concept but still not 100% sure on it. I've done the tutorial on the site ruby-lang.org already
andrewjanssen has joined #ruby
<shevy> "if file was created in the last 60 seconds, do something" ?
<moneydouble> or any cheap courses? books?
shinobi_one has quit [Quit: shinobi_one]
Ginfuru_ has quit [Quit: Computer has gone to sleep.]
jimbow has quit [Quit: jimbow]
hermanmunster has joined #ruby
<shevy> moneydouble do you understand "yield" already?
timonv has quit [Ping timeout: 252 seconds]
yfeldblu_ has quit [Remote host closed the connection]
<moneydouble> shevy: noo lol
<havenwood> moneydouble: or i've heard people talking about coursera ruby or rubymonks
<shevy> moneydouble, ok then work through this, afterwards you understand yield: https://pine.fm/LearnToProgram/?Chapter=01
<havenwood> oh, it already lists the latter in documentation
combusean has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Freddan962 has quit [Quit: Leaving]
testcore has quit [Quit: BitchX: the Cadillac of all clients]
hermanmunster has quit [Read error: Connection reset by peer]
redondos has quit [Excess Flood]
cwc has joined #ruby
b1205 has joined #ruby
hermanmunster has joined #ruby
<moneydouble> hmm
Bira has quit [Remote host closed the connection]
<havenwood> yeah, learn to program is good
redondos has joined #ruby
thomasxie has joined #ruby
Bira has joined #ruby
thomasxie has quit [Client Quit]
thomasxie has joined #ruby
apeiros has quit [Remote host closed the connection]
MrSamuel has joined #ruby
apeiros has joined #ruby
Avahey_ has joined #ruby
geggam has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Leaving...]
toastynerd has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
jmurray has quit [Quit: jmurray]
bradhe has quit [Remote host closed the connection]
<moneydouble> havenwood: shevy: DouweM: Thanks guys. Gonna go through these links and stuff and give her a shot :)
bmurt has joined #ruby
IceDragon has quit [Remote host closed the connection]
davedev2_ has quit []
jmurray has joined #ruby
davedev24_ has joined #ruby
ghr has joined #ruby
lw has quit [Quit: s]
IceDragon has joined #ruby
kitak_ has joined #ruby
Atttwww has quit [Ping timeout: 240 seconds]
danshultz has joined #ruby
ascarter has joined #ruby
<shevy> \o/
<shevy> you seem to be the third guy today coming from python
<shevy> normally we have days without any python converts
<shevy> what is going on... what is going on ...
<shevy> people could master python3!
kitak_ has quit [Remote host closed the connection]
kitak_ has joined #ruby
bradhe has joined #ruby
justinxreese has quit [Ping timeout: 246 seconds]
benzrf is now known as benzrf|offline
<moneydouble> shevy: If you want the truth… I'd prefer Python but the frameworks are terrible. But I'm hoping I'll like Ruby as much :)
ghr has quit [Ping timeout: 245 seconds]
jonahR has joined #ruby
jmurray has quit [Quit: jmurray]
<moneydouble> It seems to be being used quite a lot for large web apps these days too, so thats a plus IMO.
<shevy> oh
<shevy> web stuff :(
* shevy is a sad shevy ...
jottr has quit [Ping timeout: 264 seconds]
combusean has quit [Ping timeout: 276 seconds]
<moneydouble> shevy: heh yeah I know :P I don't have any other reasons to code tho ;P
jmurray has joined #ruby
jottr has joined #ruby
<moneydouble> shevy: I'm an entrepreneur, don't have the cash to pay someone at the moment so I figured I'd build it.
<shevy> hehe
<shevy> aaah ok
<shevy> so you follow the money trail
Xeago_ has joined #ruby
<moneydouble> shevy: heh, hence my irc name :P I coded in PHP for 6 years before realizing how bad it was.
<moneydouble> so I'm not a complete newbie ha
lw has joined #ruby
<shevy> ack
<shevy> 6 years
ixti has quit [Ping timeout: 245 seconds]
<shevy> I could endure php only for 2 years
eataix has quit []
maletor has quit [Quit: Computer has gone to sleep.]
Xeago_ has quit [Read error: Connection reset by peer]
Xeago has quit [Ping timeout: 240 seconds]
<terrellt> No whitespace sensitivity ftw!
Xeago has joined #ruby
<terrellt> Respect for community wide coding standards though.
<shevy> hehe
<shevy> guido said this he would undo if he could jump back in time
<shevy> that python is whitespace sensitive
zz_karupa is now known as karupa
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nemesit|znc has quit [Ping timeout: 255 seconds]
maestrojed has quit [Quit: Computer has gone to sleep.]
lukec has quit [Quit: lukec]
Xeago has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
spastorino has joined #ruby
nemesit|znc has joined #ruby
Megtastique has quit []
magicien has quit [Ping timeout: 240 seconds]
<omosoj> what is yield? it's basically a space in an erb file where another erb file is input, right?
<omosoj> well, i guess that's what it would be in rails. not sure if it's the same in ruby.
Xeago has quit [Read error: Connection reset by peer]
<shevy> omosoj yield is generic, it is valid in ruby, not only in erb files
<shevy> to understand yield, you first must understand what a block is in ruby
<rkazak_> yield will execute the block passed to it…
Xeago has joined #ruby
<shevy> hehe
<terrellt> Yield is a function that says "give over processing to the block passed to this code"
<rkazak_> omosoj: shevy is right… a simple example will help you understand.
j_mcnally has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
roolo has quit [Quit: Leaving...]
amclain has joined #ruby
<terrellt> >> def stuff; x = "world"; yield x; end; stuff {|item| "Hello #{item}"}
<terrellt> =(
Xeago has joined #ruby
b1205 has quit [Ping timeout: 252 seconds]
<terrellt> >> "Broken?"
<eval-in__> terrellt => "Broken?" (https://eval.in/156783)
MrSamuel has quit [Ping timeout: 252 seconds]
<terrellt> >> def stuff; x = "world"; yield x; end; stuff {|item| "Hello #{item}"}
<eval-in__> terrellt => "Hello world" (https://eval.in/156784)
<omosoj> ok.. i've heard about this, about how it's distinctive to ruby. don't totally understand it still though
<DouweM> night fellas
magicien has joined #ruby
MrSamuel has joined #ruby
benzrf|offline is now known as benzrf
<rkazak_> def foo yield; yield; end ; foo { print “Hello World” }
<omosoj> gnite DouweM
<rkazak_> >> def foo yield; yield; end ; foo { print “Hello World” }
<eval-in__> rkazak_ => /tmp/execpad-06509811ed3e/source-06509811ed3e:2: syntax error, unexpected keyword_yield, expecting ';' or '\n' ... (https://eval.in/156785)
b1205 has joined #ruby
andrewjanssen has quit [Quit: Leaving...]
combusean has joined #ruby
jottr has quit [Ping timeout: 255 seconds]
blackmesa has quit [Ping timeout: 265 seconds]
sdwrage has quit [Quit: This computer has gone to sleep]
<omosoj> how is yield used most often?
sdwrage has joined #ruby
<gr33n7007h> >> def foo; yield; end; foo { "Hello World" }
<eval-in__> gr33n7007h => "Hello World" (https://eval.in/156786)
<b1205> Can someone please explain the syntax is this one liner?
<b1205> ?a.upto('password'){|c| $> << c+ ' '}
<b1205> It tries character combinations
<b1205> ?a. and $> are new to me
<rkazak_> Hmm when I submit that to eval-in I get Internal Server Error….
<terrellt> >> ?a
<eval-in__> terrellt => "a" (https://eval.in/156787)
adthul has joined #ruby
qhartman has quit [Quit: Ex-Chat]
<terrellt> Returns the ASCII character code, or it should.
nanoyak has quit [Quit: Computer has gone to sleep.]
n_blownapart has joined #ruby
toastynerd has joined #ruby
<terrellt> $> is a shortcut for stdout, I believe.
Toger has quit [Read error: Connection reset by peer]
<b1205> terrellt: thank you! :)
omosoj has left #ruby ["Leaving"]
<havenwood> b1205: `?a` is oft called a character literal as opposed to the `"a"` string literal
omosoj has joined #ruby
<b1205> havenwood: wow, that is neat. I did not know there was a difference
<ari-_-e> there isn't
<ari-_-e> not in new ruby versions
iamvery has quit [Quit: Leaving...]
<havenwood> >> putc ?a
<eval-in__> havenwood => a"a" (https://eval.in/156788)
marr has quit [Ping timeout: 276 seconds]
<terrellt> >> ?a == "a"
<eval-in__> terrellt => true (https://eval.in/156789)
<b1205> terrellt: where would I find `?a` looking in ri
<b1205> terrellt: I did not find it under String
<ari-_-e> it's part of the syntax...
<ari-_-e> not a method
lethe has joined #ruby
<b1205> ari-_-e: ah, thanks
oo_ has joined #ruby
parzzix has joined #ruby
<terrellt> Should be documented somewhere.
<terrellt> Can't seem to find it.
toordog has joined #ruby
<ari-_-e> ri is for the standard library, it wouldn't be in there
endash has quit [Quit: endash]
Megtastique has joined #ruby
toastynerd has quit [Remote host closed the connection]
<moneydouble> Can anyone recommend any tools for Ruby dev for Sublime Text 3?
<moneydouble> Plugins*
<moneydouble> For like auto complete, syntax error checks etc
combusean has quit [Ping timeout: 240 seconds]
wallerdev has quit [Quit: wallerdev]
toastynerd has joined #ruby
MrSamuel has quit [Ping timeout: 255 seconds]
wallerdev has joined #ruby
Robbo` has quit [Ping timeout: 252 seconds]
kitak_ has quit [Remote host closed the connection]
toastynerd has quit [Remote host closed the connection]
bin_bash has joined #ruby
kitak_ has joined #ruby
mois3x has joined #ruby
kitak_ has quit [Read error: Connection reset by peer]
RyanV has quit [Quit: Computer has gone to sleep.]
kitak_ has joined #ruby
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
bmurt has quit []
MrSamuel has joined #ruby
abstrakt has joined #ruby
trhodes_ has quit [Ping timeout: 264 seconds]
IceDragon has quit [Ping timeout: 265 seconds]
IceDragon has joined #ruby
bin_bash has quit [Quit: bonitas non est pessimis esse meliorem]
bin_bash has joined #ruby
trhodes_ has joined #ruby
havenwood has quit [Ping timeout: 272 seconds]
wiscas has quit [Ping timeout: 255 seconds]
Scient has quit [Ping timeout: 252 seconds]
Brando753 has quit [Ping timeout: 240 seconds]
omosoj has quit [Quit: Leaving]
verto has quit [Ping timeout: 240 seconds]
i_s has quit [Remote host closed the connection]
jso has quit [Ping timeout: 240 seconds]
Muz has quit [Ping timeout: 240 seconds]
<miah> sup
binaryhat has quit [Quit: Leaving]
verto has joined #ruby
Muz has joined #ruby
toastynerd has joined #ruby
<b1205> "/ignore -JOINS PARTS QUITS NICKS"
jso has joined #ruby
Scient has joined #ruby
toordog has quit [Read error: Connection reset by peer]
angusiguess has joined #ruby
toordog has joined #ruby
subbyyy has quit [Ping timeout: 255 seconds]
tkuchiki has joined #ruby
lethjakman has quit [Ping timeout: 252 seconds]
dfedde has quit [Ping timeout: 252 seconds]
dfedde has joined #ruby
Brando753 has joined #ruby
wiscas has joined #ruby
simono has joined #ruby
The_NetZ has joined #ruby
tiguser has quit [Ping timeout: 255 seconds]
havenwood has joined #ruby
tiguser has joined #ruby
<The_NetZ> hey. msys/mingw; compiliation, ./configure && make; make fails "process_begin: CreateProcess(NULL, /bin/mkdir -p win32, ...) filed.
bin_bash has left #ruby ["proprium humani ingenii est odisse quem laeseris"]
<The_NetZ> make (e=2): The system cannot find the file specified.
<The_NetZ> uncommon.mk:602: recipe for target 'win32/.time' failed
MatthewsFace has joined #ruby
BHensley has joined #ruby
A1Aiden has joined #ruby
n_blownapart has quit [Remote host closed the connection]
robustus has quit [Ping timeout: 264 seconds]
MrSamuel has quit [Ping timeout: 240 seconds]
aspires has quit []
GriffinHeart has joined #ruby
robustus has joined #ruby
<shevy> brave guy
<shevy> fearlessly trying to use windows
<shevy> hey miah farrow
<moneydouble> hey shevy what editor do you use?
doodlehaus has joined #ruby
<shevy> moneydouble bluefish 1.0.7 most of the time, nano for smaller text files, vim unfortunately sometimes too
cashnguns has quit [Ping timeout: 240 seconds]
debajit has joined #ruby
<shevy> I'd be happy with a nano with minimal vim commands
robbyoconnor has joined #ruby
n_blownapart has joined #ruby
<debajit> Can someone help me out with this ruby error? I'm trying to run "heckle" (gem install heckle) on a file. When I do a "heckle <filename.rb>" I get the following error: ~/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- test/unit/autorunner (LoadError). How could I fix this?
jamto11 has quit [Remote host closed the connection]
<shevy> sounds like a poor installation
<shevy> seems ludicrous to have to rely on test
<The_NetZ> shevy: hehe, yeah.
<shevy> debajit, try to ensure that you have unit-test gem installed
<shevy> debajit, https://rubygems.org/gems/heckle here you see the runtime deps
Valesk has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
A1Aiden has quit [Quit: A1Aiden]
<The_NetZ> shevy: I've tried a fuck-tonne of windows thingus's to get half-decent setup
MrSamuel has joined #ruby
<shevy> hehe
<shevy> The_NetZ cool
<The_NetZ> right now I'm trying out msys/mingw
<shevy> if that would only be available for every windows user!
<debajit> shevy: Trying it out...
sepp2k has quit [Read error: Connection reset by peer]
thesheff17 has joined #ruby
<The_NetZ> shevy: hmm?
<debajit> shevy: There doesn't seem to be any gems called "unit-test" or "unittest" — are they superseded by minitest in 2.1.1 ?
<The_NetZ> SUA was pretty cool, but its deprecated/dying/dead
<debajit> shevy: Taking a look at the runtime deps now...
saarinen has joined #ruby
<shevy> debajit unsure
thomasxie has quit [Remote host closed the connection]
<shevy> debajit I don't even think a gem should depend on that at runtime ever either
<shevy> but I did not write heckle :)
thomasxie has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
thomasxie has quit [Remote host closed the connection]
<debajit> shevy: So it seems I might have an older version of heckle.. (1.4.3 from 2009) — it seems there's a newer version available (that "gem install heckle" did not install) (Sorry I'm a little new to Ruby)
n_blownapart has quit []
csavola has joined #ruby
<The_NetZ> shevy: btw, mingw/msys in this situation is just a build environment, makes native binaries.
niftylettuce_ has joined #ruby
phutchins has joined #ruby
csavola has quit [Client Quit]
cashnguns has joined #ruby
<shevy> The_NetZ yeah
<shevy> people will fail to set it up ;P
bmurt has joined #ruby
<The_NetZ> shevy: won't be needed for my end-users
thomasxie has joined #ruby
thomasxie has quit [Read error: Connection reset by peer]
fluve has quit [Remote host closed the connection]
chrisseaton has quit []
thomasxie has joined #ruby
bmurt has quit [Client Quit]
gr33n7007h has quit [Quit: Leaving]
fresham has quit [Quit: fresham]
rm_ has joined #ruby
sambao21 has joined #ruby
rm_ is now known as sassamo
karupa is now known as zz_karupa
User458764 has joined #ruby
andrewjanssen has joined #ruby
MrSamuel has quit [Quit: MrSamuel]
kl0_ has quit [Ping timeout: 258 seconds]
jack_rabbit has joined #ruby
lw has quit [Quit: s]
AMcP has joined #ruby
ValicekB has quit [Ping timeout: 252 seconds]
oo_ has quit [Remote host closed the connection]
lukec has joined #ruby
datafirm has quit [Quit: Computer has gone to sleep.]
gr33n7007h has joined #ruby
datafirm has joined #ruby
<The_NetZ> shevy: Console2 is a half-decent windows command window
MrSamuel has joined #ruby
Bira has quit [Read error: Connection reset by peer]
AMcP has quit [Remote host closed the connection]
Bira has joined #ruby
jmurray has quit [Quit: jmurray]
b1205 has quit [Ping timeout: 240 seconds]
zz_karupa is now known as karupa
timonv has joined #ruby
<shevy> hmm
datafirm has quit [Ping timeout: 252 seconds]
iamcalledrob has joined #ruby
cashnguns has quit [Ping timeout: 245 seconds]
Sawbones has joined #ruby
andrewjanssen has quit [Quit: Leaving...]
ValicekB has joined #ruby
MrSamuel has quit [Quit: MrSamuel]
sdwrage has joined #ruby
GodPuppe_ has joined #ruby
b1205 has joined #ruby
GodPuppet has quit [Ping timeout: 264 seconds]
timonv has quit [Ping timeout: 240 seconds]
Bira has quit [Remote host closed the connection]
jmurray has joined #ruby
redondos has quit [Excess Flood]
sabfer has joined #ruby
papercode has quit [Quit: WeeChat 0.4.4-dev]
redondos has joined #ruby
redondos has quit [Changing host]
redondos has joined #ruby
JoeGaudet has quit [Quit: Computer has gone to sleep.]
jobewan has joined #ruby
oo_ has joined #ruby
wallerdev has quit [Quit: wallerdev]
Megtastique has quit []
Robbo` has joined #ruby
redondos has quit [Excess Flood]
mosez has quit [Ping timeout: 252 seconds]
iamcalledrob has quit [Ping timeout: 252 seconds]
rkazak_ has quit [Quit: rkazak_]
jmurray has quit [Client Quit]
redondos has joined #ruby
redondos has quit [Changing host]
redondos has joined #ruby
mosez has joined #ruby
SegFaultAX has quit [Excess Flood]
SegFaultAX has joined #ruby
Megtastique has joined #ruby
moneydouble has quit [Quit: Leaving.]
User458764 is now known as User458764_NotHe
jonahR has quit [Quit: ¡Adios amigos, me fui para el carajo!]
s3ri0us is now known as s3ri0us|away
Spami has quit [Quit: This computer has gone to sleep]
alvaro_o has quit [Quit: Ex-Chat]
mjsmith2 has joined #ruby
benlieb has joined #ruby
hamakn_ has quit [Remote host closed the connection]
User458764_NotHe has quit [Ping timeout: 240 seconds]
bmurt has joined #ruby
Nahra` has quit [Remote host closed the connection]
braincra- has joined #ruby
Nahra` has joined #ruby
Bira has joined #ruby
duggiefresh has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 255 seconds]
duggiefresh has joined #ruby
mercerist has quit [Quit: Computer has gone to sleep.]
benlieb_ has joined #ruby
benlieb has quit [Read error: Connection reset by peer]
benlieb_ is now known as benlieb
braincrash has quit [Ping timeout: 255 seconds]
Bira has quit [Remote host closed the connection]
mehlah has quit [Quit: Leaving...]
Bira has joined #ruby
Sawbones has quit [Remote host closed the connection]
duggiefresh has quit [Ping timeout: 240 seconds]
trhodes_ has quit [Ping timeout: 264 seconds]
Hobogrammer has quit [Ping timeout: 265 seconds]
wallerdev has joined #ruby
s3ri0us|away has quit [Quit: Leaving...]
radic has quit [Ping timeout: 240 seconds]
datafirm has joined #ruby
zorak has quit [Ping timeout: 255 seconds]
trhodes_ has joined #ruby
dopie has joined #ruby
lethjakman has joined #ruby
<dopie> hey all
<dopie> on line 16 is that the corerct way to concat to remove_letter! ????
yfeldblum has joined #ruby
radic has joined #ruby
havenwood has quit [Remote host closed the connection]
doodlehaus has quit [Remote host closed the connection]
<ari-_-e> dopie: no... what are you trying to do?
redondos has quit [Excess Flood]
doodlehaus has joined #ruby
bradhe has quit [Remote host closed the connection]
redondos has joined #ruby
wenshan has joined #ruby
sabfer has quit [Read error: Connection reset by peer]
robbyoconnor has quit [Quit: Konversation terminated!]
hamakn has joined #ruby
silky__ has quit [Ping timeout: 240 seconds]
orolo has joined #ruby
<dopie> ari-_-e, im trying to make it so that it runs @user.remove_foo!
saarinen has quit [Quit: saarinen]
doodlehaus has quit [Ping timeout: 252 seconds]
<ari-_-e> I mean, you can do that with #send, but this seems weird
<ari-_-e> maybe not
<ari-_-e> I dunnp
<ari-_-e> dunno
Skyler has joined #ruby
<dopie> ari-_-e,
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
brunops has joined #ruby
moneydouble has joined #ruby
zorak has joined #ruby
krz has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
robert___ has joined #ruby
robert___ has quit [Changing host]
robert___ has joined #ruby
Takle has quit [Remote host closed the connection]
WishBoy- has joined #ruby
WishBoy- has quit [Excess Flood]
parduse has joined #ruby
benlieb_ has joined #ruby
parduse has quit [Changing host]
parduse has joined #ruby
WishBoy- has joined #ruby
Hobogrammer has joined #ruby
sambao21 has quit [Ping timeout: 245 seconds]
musl_ has joined #ruby
todor has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Skyler> hello ruby people
dopie has quit [Read error: Connection reset by peer]
robert_ has quit [Read error: Connection reset by peer]
WishBoy has quit [Read error: Connection reset by peer]
musl has quit [Read error: Connection reset by peer]
benlieb has quit [Read error: Connection reset by peer]
Guest47072 has quit [Ping timeout: 252 seconds]
mesamoo has quit [Excess Flood]
todor_ has quit [Read error: Connection reset by peer]
ryotarai has quit [Ping timeout: 252 seconds]
benlieb_ is now known as benlieb
GodPuppe_ has quit [Remote host closed the connection]
Skyler has quit [Ping timeout: 252 seconds]
gr33n7007h has quit [Ping timeout: 252 seconds]
ua has quit [Ping timeout: 252 seconds]
Sawbones has joined #ruby
gr33n7007h has joined #ruby
ryotarai has joined #ruby
ua has joined #ruby
hfp has joined #ruby
gr33n7007h has quit [Changing host]
gr33n7007h has joined #ruby
sambao21 has joined #ruby
toastynerd has quit [Remote host closed the connection]
sambao21 has quit [Client Quit]
toastynerd has joined #ruby
silky__ has joined #ruby
jobewan has quit [Quit: Leaving]
charliesome has joined #ruby
thomasxie has quit [Remote host closed the connection]
<The_NetZ> any pure windows rubyists here?
dopie has joined #ruby
<dopie> #rubyonrails
<dopie> ari-_-e, sorry got disconnected
<mois3x> evil!
thesheff17 has quit [Read error: Connection reset by peer]
GriffinHeart has quit [Remote host closed the connection]
gorpon has joined #ruby
GriffinHeart has joined #ruby
agjacome has quit [Quit: leaving]
Valesk has joined #ruby
toastynerd has quit [Remote host closed the connection]
brunops has quit [Changing host]
brunops has joined #ruby
RyanV has joined #ruby
amargherio has joined #ruby
MrSamuel has joined #ruby
bmurt has quit []
GriffinHeart has quit [Ping timeout: 264 seconds]
RyanV has quit [Client Quit]
havenwood has joined #ruby
p8952 has quit [Ping timeout: 240 seconds]
b1205 has quit [Ping timeout: 240 seconds]
i_s has joined #ruby
nicksloan has joined #ruby
papercode has joined #ruby
<nicksloan> is it more common to install unicorn independently of an application, or to toss it in the Gemfile and let bundler install it?
JokerDoomWork has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
adthul has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Megtastique has quit []
charliesome has joined #ruby
b1205 has joined #ruby
<dopie> ari-_-e, send("remove_#{document}") :)
baroquebobcat has joined #ruby
GriffinHeart has joined #ruby
jottr has joined #ruby
luckyruby has quit [Ping timeout: 255 seconds]
lw has joined #ruby
Sawbones has quit [Remote host closed the connection]
Sawbones has joined #ruby
SegFaultAX has quit [Excess Flood]
SegFaultAX has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
Takle has joined #ruby
orolo has quit [Quit: This computer has gone to sleep]
Megtastique has joined #ruby
WishBoy- has quit [Read error: Connection reset by peer]
WishBoy has joined #ruby
Sawbones has quit [Ping timeout: 255 seconds]
angusiguess has joined #ruby
moneydouble has quit [Quit: Leaving.]
saarinen has joined #ruby
lethjakman has quit [Ping timeout: 240 seconds]
braincra- has quit [Quit: bye bye]
jottr has quit [Ping timeout: 240 seconds]
sambao21 has joined #ruby
elioat has joined #ruby
thesheff17 has joined #ruby
Solnse has quit [Quit: Leaving.]
braincrash has joined #ruby
cashnguns has joined #ruby
angusiguess has quit [Ping timeout: 258 seconds]
Takle has quit [Ping timeout: 240 seconds]
toastynerd has joined #ruby
saarinen has quit [Read error: Connection reset by peer]
saarinen has joined #ruby
elioat has quit [Ping timeout: 240 seconds]
davedev24_ has quit [Ping timeout: 265 seconds]
moneydouble has joined #ruby
davedev24_ has joined #ruby
wjimenez5271 has joined #ruby
ghr has joined #ruby
debajit has quit [Quit: Leaving...]
sambao21 has quit [Quit: Computer has gone to sleep.]
iasj has joined #ruby
Lucky_ has joined #ruby
Steve21 has joined #ruby
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
Bira has quit [Remote host closed the connection]
d34th4ck3r has quit [Quit: zzz]
amargherio has quit [Remote host closed the connection]
<Steve21> Is there a way to run a rake task on server start?
NukePuppy has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
WishBoy has quit [Remote host closed the connection]
lw has quit [Quit: s]
iasj has quit [Read error: Connection reset by peer]
jamto11 has joined #ruby
<The_NetZ> Steve21: /etc/init.d or sommat
<Steve21> can you point me to some docs explaining steps?
<Steve21> been looking around but not sure of the right keywords to be searching for/looking for
<b1205> Steve21: What is the operating system of the server?
<Steve21> heroku
<Steve21> (but does not have to be)
<ari-_-e> hah
<b1205> :/
Sawbones has joined #ruby
toastynerd has quit [Remote host closed the connection]
<b1205> Steve21: Why the requirement of when the server starts?
<Steve21> it starts a worker for a endless process
<b1205> Steve21: Is this the same as when your app starts?
gorpon has quit [Ping timeout: 252 seconds]
<Steve21> yes
<b1205> Is it a Rails app
<b1205> ?
zorak has quit [Ping timeout: 245 seconds]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Sawbones has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
jamto11 has quit [Ping timeout: 265 seconds]
toastynerd has joined #ruby
jxf has quit [Ping timeout: 252 seconds]
<Steve21> sinatra
toastynerd has quit [Remote host closed the connection]
zorak has joined #ruby
SegFaultAX has quit [Excess Flood]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SegFaultAX has joined #ruby
<b1205> Steve21: My guess is would want to put something in the Sinatra equivalent of config/initalizers
<b1205> Steve21: You can run the task like this: Rake::Task["my:great:task"].invoke
<Steve21> can rake tasks be run with config.ru?
baroquebobcat has quit [Quit: baroquebobcat]
cashnguns has quit [Remote host closed the connection]
jilk23 has joined #ruby
<b1205> I would imagine since it is just Ruby code (not sure if it is proper practice)
jilk23 has quit [Client Quit]
timonv has joined #ruby
jilk23 has joined #ruby
gorpon has joined #ruby
charliesome has joined #ruby
baroquebobcat has joined #ruby
x1337807x has joined #ruby
Steve21 has quit [Quit: Steve21]
timonv has quit [Ping timeout: 276 seconds]
bluOxigen has joined #ruby
The_NetZ has left #ruby ["Leaving"]
ffranz has quit [Quit: Leaving]
oso96_2000 has quit [Ping timeout: 240 seconds]
brunops has quit [Ping timeout: 240 seconds]
toordog has quit [Ping timeout: 240 seconds]
phinfonet has quit []
mjsmith2 has quit [Remote host closed the connection]
hfp has quit [Quit: bye]
MrSamuel has quit [Ping timeout: 276 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
hfp has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
baroquebobcat has joined #ruby
danijoo has joined #ruby
b1205 has quit [Ping timeout: 240 seconds]
<havenwood> helloo
angusiguess has joined #ruby
kitak_ has quit [Remote host closed the connection]
aspires has joined #ruby
drizz_ has quit [Quit: Reconnecting]
drizz has joined #ruby
thomasxie has joined #ruby
kitak_ has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
iamcalledrob has joined #ruby
angusiguess has quit [Ping timeout: 240 seconds]
tylersmith has joined #ruby
oso|away has joined #ruby
oso|away is now known as oso96_2000
porco has joined #ruby
max__ has joined #ruby
max__ is now known as Synthead
sqwirl has joined #ruby
deric_skibotn has quit [Ping timeout: 252 seconds]
wjimenez5271 has quit [Quit: Leaving.]
MrSamuel has joined #ruby
yacks has joined #ruby
lxsameer has joined #ruby
wjimenez5271 has joined #ruby
nanoyak has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sputnik13 has joined #ruby
jilk23 has quit [Quit: jilk23]
jilk23 has joined #ruby
Deele has joined #ruby
duncannz has joined #ruby
gorpon has quit [Ping timeout: 240 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gr33n7007h> ?a.upto('password'){|c| $> << c+ ' '} had me thinking... Standard UK SKY ROUTERS have default psk of 8 uppercase letters wounder if this will work ruby -e '("A"*8).upto("Z"*8) {|c| $> << c + "\n" }' | aircrack-ng -b AA:BB:CC:DD:EE:FF sky-01.cap -w - ?
lukec has quit [Quit: lukec]
<gr33n7007h> to see if it will crack my router
<gr33n7007h> hmm....
chipotle has joined #ruby
SegFaultAX has quit [Excess Flood]
SegFaultAX has joined #ruby
x1337807x has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
mostlybadfly has quit [Quit: Connection closed for inactivity]
Robbo` has quit [Ping timeout: 240 seconds]
b1205 has joined #ruby
Megtastique has quit []
subbyyy has joined #ruby
d34th4ck3r has joined #ruby
CorpusCallosum has quit [Quit: Computer has gone to sleep.]
arrubin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gorpon has joined #ruby
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
porco has quit [Quit: Leaving...]
Synthead has quit [Ping timeout: 255 seconds]
_JokerDoomWork has joined #ruby
jxf has joined #ruby
Synthead has joined #ruby
oo_ has quit [Remote host closed the connection]
gorpon has quit [Ping timeout: 240 seconds]
JokerDoomWork has quit [Ping timeout: 245 seconds]
oo_ has joined #ruby
sputnik13 has joined #ruby
Morkel has joined #ruby
combusean has joined #ruby
JokerDoomWork has joined #ruby
_JokerDoomWork has quit [Read error: Connection reset by peer]
NukePuppy has quit [Ping timeout: 265 seconds]
oo_ has quit [Remote host closed the connection]
kenneth has joined #ruby
sputnik13 has quit [Ping timeout: 245 seconds]
axsuul has joined #ruby
MrSamuel has quit [Ping timeout: 245 seconds]
fresham has joined #ruby
<axsuul> Is there any way I can make a data structure so that i can do ... struct.each { |a, b, c, d, e, f, g| ... }
pwh_ has joined #ruby
MrSamuel has joined #ruby
IceDragon has quit [Quit: Space~~~]
<mozzarella> yes
Hobogrammer has quit [Read error: Connection reset by peer]
<mozzarella> wait
pwh has quit [Ping timeout: 245 seconds]
Hobogrammer has joined #ruby
sigurding has joined #ruby
volk_ has quit [Quit: volk_]
bluntman is now known as elliot_rodger
<havenwood> >> [[1, 2, 3], ['x', 'y', 'z']].each { |a, b, c| puts "#{a} to the #{b} to the #{c}" }
<eval-in__> havenwood => 1 to the 2 to the 3 ... (https://eval.in/156790)
<havenwood> axsuul: ^, unless by struct you mean a Struct :P
reference has joined #ruby
User458764 has joined #ruby
<axsuul> havenwood: ah really? didnt know that, cool
yfeldblum has quit [Ping timeout: 240 seconds]
<dopie> so just to get this straight...
sputnik13 has joined #ruby
<dopie> .send turns a string into a symbol ?
<havenwood> dopie: yup
doev has joined #ruby
spicerack has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
angusiguess has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
JokerDoomWork has quit [Ping timeout: 276 seconds]
b1205 has quit [Ping timeout: 255 seconds]
wjimenez5271 has quit [Quit: Leaving.]
b1205 has joined #ruby
angusiguess has quit [Ping timeout: 255 seconds]
tkuchiki_ has joined #ruby
porco has joined #ruby
parzzix has quit [Read error: Connection reset by peer]
spicerack has quit [Quit: Textual IRC Client: www.textualapp.com]
aspires has quit []
GriffinHeart has quit [Remote host closed the connection]
aganov has joined #ruby
b1205 has quit [Ping timeout: 240 seconds]
MrSamuel has quit [Ping timeout: 240 seconds]
benlieb has quit [Quit: benlieb]
tkuchiki has quit [Ping timeout: 240 seconds]
brandonshowers has joined #ruby
User458764 is now known as User458764_NotHe
benlieb has joined #ruby
bradhe has joined #ruby
<havenwood> dopie: #send uses send_internal, which calls rb_check_id described here: https://github.com/ruby/ruby/blob/trunk/README.EXT#L466-478
<dopie> havenwood, too advanced for me :)
zcreative has joined #ruby
sinkensabe has joined #ruby
Bira has joined #ruby
User458764_NotHe has quit [Ping timeout: 240 seconds]
oo_ has joined #ruby
SegFaultAX has quit [Excess Flood]
GriffinHeart has joined #ruby
benzrf is now known as benzrf|offline
nanoyak has quit [Quit: Computer has gone to sleep.]
SegFaultAX has joined #ruby
<havenwood> dopie: TL;DR: if a symbol check if known symbol. if string check if known symbol. if not string or symbol convert to string and check if known symbol.
mois3x has quit [Quit: mois3x]
brandonshowers has quit [Remote host closed the connection]
Bira has quit [Ping timeout: 264 seconds]
<havenwood> dopie: i should have stuck with "yup", that's fine answer :P
tkuchiki_ has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
MrSamuel has joined #ruby
relix has joined #ruby
brandonshowers has joined #ruby
phansch has joined #ruby
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
<havenwood> dopie: caveating what i said above, you'd get a type error i think with anything other than a Symbol or String (i think)
sski has quit [Remote host closed the connection]
sski has joined #ruby
MatthewsFace has quit [Quit: This computer has gone to sleep]
CorpusCallosum has joined #ruby
<havenwood> dopie: too advanced for me too :)
mr_snowf1ake has quit [Quit: Leaving]
tagrudev has joined #ruby
parzzix has joined #ruby
sski has quit [Ping timeout: 252 seconds]
tkuchiki has joined #ruby
User458764 has joined #ruby
saarinen has quit [Read error: Connection reset by peer]
mityaz has joined #ruby
saarinen has joined #ruby
adthul has joined #ruby
ghr has joined #ruby
iamcalledrob has quit [Quit: Computer has gone to sleep.]
jrhe has quit [Quit: Connection closed for inactivity]
BHensley has quit [Remote host closed the connection]
nutoi has joined #ruby
BHensley has joined #ruby
brandonshowers has quit [Remote host closed the connection]
timonv has joined #ruby
baroquebobcat has joined #ruby
brandonshowers has joined #ruby
huoxito has quit [Quit: Leaving]
baroquebobcat has quit [Client Quit]
ghr has quit [Ping timeout: 252 seconds]
timonv has quit [Read error: Connection reset by peer]
timonv has joined #ruby
jamto11 has joined #ruby
BHensley has quit [Remote host closed the connection]
BHensley has joined #ruby
Leif has joined #ruby
sassamo has quit []
gr33n7007h has quit [Quit: Leaving]
Burgestrand has joined #ruby
jamto11 has quit [Ping timeout: 255 seconds]
nutoi has quit []
subraminion has joined #ruby
spastorino has quit [Quit: Connection closed for inactivity]
fschuindt has quit [Quit: Textual IRC Client: www.textualapp.com]
Leif has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timonv has quit [Remote host closed the connection]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brunops has joined #ruby
dymv has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
zkay11 has left #ruby [#ruby]
User458764 is now known as User458764_NotHe
dymv has quit [Client Quit]
MatthewsFace has joined #ruby
shime has quit [Read error: No route to host]
TripTastic has left #ruby ["Leaving"]
subraminion has quit [Remote host closed the connection]
brunops has quit [Quit: leaving]
subbyyy has quit [Quit: none 0.4.3]
User458764_NotHe has quit [Ping timeout: 255 seconds]
subraminion has joined #ruby
Leif has joined #ruby
duncannz has quit [Ping timeout: 255 seconds]
rkazak_ has joined #ruby
baroquebobcat has joined #ruby
baroquebobcat has quit [Client Quit]
Leif is now known as IRLeif
<rkazak_> goodnight
rkazak_ has left #ruby [#ruby]
IRLeif has quit [Client Quit]
SegFaultAX has quit [Excess Flood]
x1337807x has joined #ruby
yfeldblum has joined #ruby
bal has joined #ruby
SegFaultAX has joined #ruby
jimbow has joined #ruby
<jimbow> in irb, if you don't close an array with ] it doesn't register any consequent arrays
<jimbow> why?
angusiguess has joined #ruby
toastynerd has joined #ruby
JohnBat26 has joined #ruby
angusiguess has quit [Ping timeout: 240 seconds]
<DouweM> because it thinks you're still entering the first array, so you need to hit ] at some point and then it'll behave as expected
speakingcode has joined #ruby
<jimbow> oh
<jimbow> thanks
shaileshg has joined #ruby
<jimbow> could someone help me with thiis please?
<DouweM> what are you having trouble with?
Vivekananda has joined #ruby
<jimbow> i don't get what is wrong with it
akonny has joined #ruby
<DouweM> does it work?
fluve has joined #ruby
roolo has joined #ruby
tanmay_ has joined #ruby
tanmay__ has joined #ruby
Macaveli has joined #ruby
SegFaultAX has quit [Excess Flood]
MatthewsFace has quit [Quit: This computer has gone to sleep]
havenwood has quit [Remote host closed the connection]
gigetoo has quit [Remote host closed the connection]
<jimbow> it does nothing, but there's an answer
gigetoo has joined #ruby
SegFaultAX has joined #ruby
<jimbow> it's for this, i passed the first example
<jimbow> but i'm stuck on this… i want to understand why :)
<DouweM> well there you go, that's what's wrong with it :P have you learned about variables and instance variables? what do you think `name` in `my name is #{name}` refers to?
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jimbow> i think #{name} refers to @name = "name"
<jimbow> just "name
<jimbow> "name"
<DouweM> have you learned about variables? because inside that greet method, `name` doesn't have a value
<jimbow> oh
BHensley has quit []
mityaz has quit [Ping timeout: 255 seconds]
<jimbow> i didn't know that thank you so much
<DouweM> the name in line 4 can't just jump over to the other method
<jimbow> i figured it could because it's in the same class
<DouweM> variables that do span multiple methods are prefixed with an @, so called instance variables.
MrSamuel has quit [Ping timeout: 240 seconds]
<DouweM> So @name *does* exist in #greet, because you set it in initialize, and it'll be available to every instance method
<DouweM> so try that
GriffinHeart has quit [Remote host closed the connection]
mityaz has joined #ruby
doev has quit [Quit: Verlassend]
<jimbow> whoops that was my old code
<jimbow> the one that i edited, this is the unedited code
robbyoconnor has joined #ruby
<jimbow> wait a sec, nvm
<jimbow> my cookies are acting weird
reference has quit [Remote host closed the connection]
<jimbow> but greet is set to (other_name)
MrSamuel has joined #ruby
reference has joined #ruby
<jimbow> and other_name isn't in initialize
Hanmac has joined #ruby
<DouweM> right, it's a method argument to greet, it's a veriable that's provided by whoever calls greet, and that is only available in that method
<DouweM> doesn't matter that it's not in initialize, you can use other_name in greet
<DouweM> name, however, is only passed to initialize, so you can't use it in greet
yacks has quit [Read error: Connection reset by peer]
<DouweM> but luckily for you, it was saved into the instance variable @name
<DouweM> which can be read from every instance method, including greet
<DouweM> so `name` doesn't exist in greet, but `@name` does
<jimbow> i see
<jimbow> so like this?
<DouweM> now you're just referencing @name without doing anything with it
<DouweM> on line 8, #{name} means "replace this by the value of variable name", but variable name doesn't exist. you want it to be "replace this by value of variable @name"
yacks has joined #ruby
<DouweM> so what would you change #{name} into?
<jimbow> oh
<jimbow> i didn't know you could do that
<jimbow> wow this is amazing
<DouweM> haha
<DouweM> I wish I could still be so easily amazed by programming
<jimbow> i wish i could be on your level so i could help the future generations of people like me :)
iamcalledrob has joined #ruby
<DouweM> hehe, just keep it up and maybe you'll find yourself helping people here in a couple of months ;)
<jimbow> i'd love to
<jimbow> i'm trying to get into app academy
<jimbow> i want to do amazing stuff with programming and web development
<DouweM> that's the spirit
<jimbow> i wanna make people more lazy… err productive with the ideas i have in my head
<jimbow> i have a ton of ideas and my ultimate goal is to have a think tank group =)
<jimbow> where we just make stuff because we can!
<DouweM> haha, ambitious you are
kiri has joined #ruby
<jimbow> well i'm 21 and i feel like i'm a bit old for this stuff, but better late then never!
<jimbow> than8
<jimbow> than*
<DouweM> that's not old at all, maybe a little later to start than most, but you're still in college so this is probably the best time to learn
<DouweM> I'm 20, fwiw ;)
subraminion has quit [Quit: Computer has gone to sleep.]
<jimbow> well i've been around computers since i was 4
Atttwww has joined #ruby
<jimbow> but i never had a dad or mom teach me stuff
toastynerd has quit [Remote host closed the connection]
<jimbow> instead i chose to waste my time playing games =(
<DouweM> haha
<jimbow> mom or dad in regards to programming
moneydouble has quit [Quit: Leaving.]
<jimbow> all the "rich" people had their parents teach them
<DouweM> I don't think many of us had our parents teach us, everyone I know is self-taught
<jimbow> whether it's zuckerberg, wozniak or others lol
LadyRainicorn has joined #ruby
ghr has joined #ruby
<jimbow> the ones that did became "prodigies"
GriffinHeart has joined #ruby
<DouweM> I very much doubt that was what set them apart. starting early doesn't mean your parents need to teach you, and starting late doesn't mean failure as much as starting early doesn't mean success
roolo has quit [Ping timeout: 240 seconds]
<jimbow> i see what you're saying and hopefully it won't mean anything
<fluve> hey jimbow i would not stress at all about what background/environment other people have/had, if you enjoy it and work hard you'll do well
<DouweM> +1
adthul has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<fluve> didn't one of the snapchat guys grow up on foodstamps?
<LadyRainicorn> No one who started coding after the age of 2 has any chance of making a program longer than Hello, world! of any quality.
<jimbow> i've got a "creative" mindsed
<jimbow> but the snapchat guys i don't think so
sqwirl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MatthewsFace has joined #ruby
ghr has quit [Ping timeout: 252 seconds]
<jimbow> i heard they were rich kids whose parents bought their way into stanford
<LadyRainicorn> (This explains a lot.)
<DouweM> jimbow: you're 21, don't sweat it. you don't need an expensive education to be a good developer
MatthewsFace has quit [Remote host closed the connection]
<jimbow> i think you're talking about the whatsapp guys
<fluve> you are right, i'm talking about whatsapp
<jimbow> the thing i like about the "programming community" is that anyone could come to a chat network and ask any question
<jimbow> this is amazing
<jimbow> and inspirational
<fluve> coding is actually pretty meritocratic in a sense, i've worked in management consulting and everyone had the same background, coding the barriers the entry are a lot smaller (need a computer and internet connection, no degree required necessarily etc..)
Takle has joined #ruby
ncopa has left #ruby ["Leaving"]
charliesome has joined #ruby
<DouweM> yup, most people in the business realize your education says very little and experience is that much more important
<jimbow> if i started when i was younger i'd have a lot of experience
axsuul has quit [Ping timeout: 245 seconds]
<fluve> true but don't sweat, i'm 27 and i only started last year (did 5 years of university in totally different discipline etc.)
<DouweM> The best time to plant a tree is twenty years ago. The second best time is now.
ringarin has joined #ruby
ringarin is now known as kbv
<DouweM> and with that thought I'm off to my algorithms exam, ttyl
<jimbow> i love you guys!
<jimbow> later
<jimbow> thanks for all the help!
tobago has joined #ruby
Takle has quit [Ping timeout: 255 seconds]
akonny has quit [Quit: akonny]
jxf has quit [Ping timeout: 265 seconds]
jackneill has joined #ruby
alpha123 has quit [Ping timeout: 258 seconds]
oo_ has quit [Remote host closed the connection]
alpha123 has joined #ruby
Rainicorn has joined #ruby
MrSamuel has quit [Ping timeout: 265 seconds]
akonny has joined #ruby
x1337807x has quit [Ping timeout: 276 seconds]
MrSamuel has joined #ruby
LadyRainicorn has quit [Ping timeout: 252 seconds]
x1337807x has joined #ruby
oo_ has joined #ruby
akonny has quit [Quit: akonny]
brandonshowers has quit [Quit: brandonshowers]
Czupa has joined #ruby
Nahra` has quit [Remote host closed the connection]
Nahra has quit [Remote host closed the connection]
Nahra` has joined #ruby
Nahra has joined #ruby
tylersmith has quit [Remote host closed the connection]
b1205 has joined #ruby
tylersmith has joined #ruby
axsuul has joined #ruby
tesuji has joined #ruby
Shidash1 has quit [Ping timeout: 255 seconds]
Nahra has quit [Remote host closed the connection]
Nahra` has quit [Remote host closed the connection]
b1205 has quit [Ping timeout: 252 seconds]
tylersmith has quit [Ping timeout: 245 seconds]
havenwood has joined #ruby
angusiguess has joined #ruby
x1337807x has quit [Ping timeout: 255 seconds]
i_s has quit [Remote host closed the connection]
picca has joined #ruby
angusiguess has quit [Ping timeout: 258 seconds]
x1337807x has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
saarinen has quit [Quit: saarinen]
iamcalledrob has quit [Quit: Computer has gone to sleep.]
bradhe has quit [Remote host closed the connection]
picca has quit [Quit: Lingo - http://lingoirc.com]
bradhe has joined #ruby
picca has joined #ruby
Czupa has quit [Remote host closed the connection]
zcreative has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
anarang has joined #ruby
jimbow has quit [Quit: jimbow]
claymore has joined #ruby
jimbow has joined #ruby
anarang has quit [Client Quit]
bradhe has quit [Ping timeout: 255 seconds]
jimbow has quit [Client Quit]
ryotarai has quit [Ping timeout: 245 seconds]
nevans has quit [Ping timeout: 245 seconds]
miah has quit [Ping timeout: 245 seconds]
relix has joined #ruby
anarang has joined #ruby
ryotarai has joined #ruby
havenwood has quit [Ping timeout: 272 seconds]
nevans has joined #ruby
Hamled has quit [Ping timeout: 245 seconds]
tesuji has quit [Ping timeout: 240 seconds]
fabrice31 has joined #ruby
miah has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skaflem has joined #ruby
Hamled has joined #ruby
alex88 has joined #ruby
claymore has quit [Ping timeout: 252 seconds]
blackmesa has joined #ruby
bigkevmcd has quit [Remote host closed the connection]
axsuul has quit [Ping timeout: 245 seconds]
amclain has quit [Quit: Leaving]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
koell has joined #ruby
bigkevmcd has joined #ruby
picca has quit [Remote host closed the connection]
claymore has joined #ruby
tanmay_ has quit [Ping timeout: 252 seconds]
tanmay__ has quit [Ping timeout: 258 seconds]
picca has joined #ruby
moneydouble has joined #ruby
alem0lars has joined #ruby
oo_ has quit [Remote host closed the connection]
ghr has joined #ruby
abstrakt has quit [Quit: Leaving]
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
andikr has joined #ruby
oo_ has joined #ruby
subraminion has joined #ruby
sk87 has joined #ruby
ghr has quit [Ping timeout: 264 seconds]
jamto11 has joined #ruby
havenwood has joined #ruby
dseitz has joined #ruby
64MAAUYFD has joined #ruby
6JTAAUE0A has joined #ruby
sk87 has quit [Client Quit]
subraminion has quit [Ping timeout: 245 seconds]
sk87 has joined #ruby
jamto11 has quit [Ping timeout: 255 seconds]
havenwood has quit [Ping timeout: 272 seconds]
alem0lars has quit [Quit: Going AFK...]
alexju has joined #ruby
mikecmpbll has joined #ruby
blackmesa has quit [Ping timeout: 255 seconds]
charliesome has joined #ruby
datafirm has quit [Quit: Computer has gone to sleep.]
datafirm has joined #ruby
jprovazn has joined #ruby
hermanmunster has quit [Remote host closed the connection]
volk_ has joined #ruby
Nahra has joined #ruby
hermanmunster has joined #ruby
datafirm has quit [Ping timeout: 265 seconds]
adthul has joined #ruby
mijicd has joined #ruby
LiohAu has joined #ruby
oo_ has quit [Remote host closed the connection]
axsuul has joined #ruby
gancl has joined #ruby
hermanmunster has quit [Ping timeout: 240 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RaptorJesus has quit [Ping timeout: 272 seconds]
volk_ has quit [Client Quit]
mikecmpbll has quit [Quit: i've nodded off.]
Azulinho has quit [Ping timeout: 252 seconds]
nvrch has joined #ruby
angusiguess has joined #ruby
reference has quit [Remote host closed the connection]
obs has joined #ruby
reference has joined #ruby
charliesome has joined #ruby
ghr has joined #ruby
lyuzashi has joined #ruby
ikaros has joined #ruby
oo_ has joined #ruby
angusiguess has quit [Ping timeout: 240 seconds]
mehlah has joined #ruby
mikecmpbll has joined #ruby
reference has quit [Ping timeout: 255 seconds]
MrSamuel has quit [Ping timeout: 276 seconds]
coderhs has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
sheperson has joined #ruby
jilk23 has quit [Ping timeout: 255 seconds]
debajit has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
chrisseaton has joined #ruby
iamcalledrob has joined #ruby
mengu has quit [Ping timeout: 255 seconds]
bradhe has joined #ruby
mengu has joined #ruby
euclides has joined #ruby
i_s has joined #ruby
iamcalledrob has quit [Ping timeout: 264 seconds]
picca has quit [Quit: Computer has gone to sleep.]
wallerdev has quit [Quit: wallerdev]
bradhe has quit [Ping timeout: 245 seconds]
picca has joined #ruby
adac has joined #ruby
noop has joined #ruby
MrSamuel has joined #ruby
datafirm has joined #ruby
i_s has quit [Ping timeout: 265 seconds]
picca has quit [Ping timeout: 240 seconds]
hermanmunster has joined #ruby
frobrob has joined #ruby
jottr has joined #ruby
einarj has joined #ruby
bluenemo has joined #ruby
b1205 has joined #ruby
zcreative has joined #ruby
nfk has joined #ruby
datafirm has quit [Ping timeout: 276 seconds]
GriffinHeart has quit [Remote host closed the connection]
axsuul has quit [Ping timeout: 240 seconds]
tacos1de has quit [Remote host closed the connection]
b1205 has quit [Ping timeout: 252 seconds]
hermanmunster has quit [Remote host closed the connection]
marr has joined #ruby
Burgestrand has quit [Quit: Burgestrand]
hermanmunster has joined #ruby
picca has joined #ruby
fluve has quit [Remote host closed the connection]
timonv has joined #ruby
karupa is now known as zz_karupa
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
wenshan has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
phansch has quit [Quit: WeeChat 0.4.3]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
havenwood has joined #ruby
hermanmunster has quit [Ping timeout: 265 seconds]
anarang has quit [Quit: Leaving]
danijoo has quit [Read error: Connection reset by peer]
lyuzashi has quit [Ping timeout: 256 seconds]
fresham has quit [Quit: fresham]
koell has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
timonv has quit [Ping timeout: 252 seconds]
xcv has joined #ruby
combusean has quit [Ping timeout: 255 seconds]
xcv has quit [Client Quit]
xcv has joined #ruby
timonv has joined #ruby
timonv_ has joined #ruby
jottr has quit [Ping timeout: 258 seconds]
jottr_ has joined #ruby
havenwood has quit [Ping timeout: 272 seconds]
duncannz has joined #ruby
einarj has quit []
GriffinHeart has joined #ruby
AlSquire has joined #ruby
timonv has quit [Read error: Connection reset by peer]
debajit has quit [Quit: Leaving...]
d34th4ck3r has quit [Quit: zzz]
alem0lars has joined #ruby
einarj has joined #ruby
_tpavel has joined #ruby
Giorgio has joined #ruby
koell has joined #ruby
euclides has quit [Quit: Leaving...]
alem0lars has quit [Client Quit]
d34th4ck3r has joined #ruby
dumdedum has joined #ruby
reference has joined #ruby
MrSamuel has quit [Ping timeout: 265 seconds]
alem0lars has joined #ruby
jack_rabbit has quit [Ping timeout: 258 seconds]
tadejm has joined #ruby
MrSamuel has joined #ruby
kris has joined #ruby
oo__ has joined #ruby
oo_ has quit [Read error: Connection reset by peer]
zcreative has quit [Quit: Computer has gone to sleep.]
alem0lars has quit [Client Quit]
Takle has joined #ruby
andrewlio has joined #ruby
AndChat| has joined #ruby
tacos1de has joined #ruby
Azulinho has joined #ruby
thomasxie has quit [Read error: Connection reset by peer]
picca has left #ruby [#ruby]
datafirm has joined #ruby
anarang has joined #ruby
havenwood has joined #ruby
lkba has quit [Ping timeout: 276 seconds]
AndChat| has quit [Ping timeout: 252 seconds]
Zai00 has joined #ruby
kris has quit [Quit: Computer has gone to sleep.]
kris has joined #ruby
sk87 has joined #ruby
kris_ has joined #ruby
kris has quit [Read error: Connection reset by peer]
havenwood has quit [Ping timeout: 272 seconds]
sk87 has quit [Client Quit]
datafirm has quit [Ping timeout: 258 seconds]
tvw has joined #ruby
sk87 has joined #ruby
obs has quit [Quit: Saliendo]
sk87 has quit [Client Quit]
obs has joined #ruby
angusiguess has joined #ruby
banister has quit [Ping timeout: 255 seconds]
mengu has quit [Remote host closed the connection]
workmad3 has joined #ruby
<dva> hi guys
bradhe has joined #ruby
<dva> I'm learning ruby atm
<dva> was wondering what the equivalent to this: https://gist.github.com/anonymous/84548117b3825ebb4f12 is using the ruby httparty gem ( https://github.com/jnunemaker/httparty )
datafirm has joined #ruby
coderhs has quit [Ping timeout: 276 seconds]
joonty has quit [Quit: WeeChat 0.4.2]
kris_ has quit [Quit: Computer has gone to sleep.]
Advocation has joined #ruby
rghose1 has joined #ruby
angusiguess has quit [Ping timeout: 252 seconds]
heftig has joined #ruby
kris_ has joined #ruby
<DouweM> `HTTParty.post(@register_url, headers: @client_headers, body: data, basic_auth: auth)`, somewhat depending on your variable data types
bradhe has quit [Ping timeout: 245 seconds]
xcv_ has joined #ruby
mehlah has quit [Quit: Leaving...]
kris_ has quit [Client Quit]
jackneill has quit [Remote host closed the connection]
timonv_ has quit [Remote host closed the connection]
iamcalledrob has joined #ruby
datafirm has quit [Ping timeout: 276 seconds]
chrissea_ has joined #ruby
xcv has quit [Ping timeout: 240 seconds]
adthul has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chrisseaton has quit [Ping timeout: 240 seconds]
akemrir has joined #ruby
blackmesa has joined #ruby
iamcalledrob has quit [Ping timeout: 255 seconds]
<certainty> moin
decoponio has joined #ruby
mikeg has joined #ruby
bluOxigen has quit [Ping timeout: 258 seconds]
mattmcclure has quit [Quit: Connection closed for inactivity]
joonty has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
iamcalledrob has joined #ruby
frogssgy has joined #ruby
finster has joined #ruby
mehlah has joined #ruby
axsuul has joined #ruby
MrSamuel has quit [Ping timeout: 264 seconds]
kirun has joined #ruby
<finster> hey all. i'd like to do something like "tail -f" on a file in ruby with the small detail that the file being read is rotated away. thus i'd need to periodically reopen the file descriptor being read. is there a library for that or would anyone have pointer for further reading?
<dva> DouweM thanks
frosgy has quit [Ping timeout: 240 seconds]
<tobiasvl> finster: hmm, well I guess you could just read continually from the file and catch the error that is raised when the file descriptor doesn't point to a file anymore, and reopen it? maybe
sarno has joined #ruby
robbyoconnor has quit [Ping timeout: 255 seconds]
<DouweM> yeah, I'd go with tobiasvl's approach
iamcalledrob has quit [Ping timeout: 264 seconds]
<DouweM> no idea if there's an existing library
<tobiasvl> dva: @client_headers != client_headers
MrSamuel has joined #ruby
<tobiasvl> two different variables
<DouweM> yeah that
<dva> tobiasvl it is inside a class
<finster> tobiasvl: yes, that may be a solution
<tobiasvl> dva: doesn't matter, @client_headers is an instance variable and client_headers is a local variable
<dva> if I remove @ I get the following err: twitter.rb:84:in `say': undefined local variable or method `client_headers' for #<Twitter:0x007fe58d0f3be0> (NameError) from twitter.rb:90:in `<main>'
robbyoconnor has joined #ruby
<tobiasvl> dva: you probably want to add @ to the other variable name
<DouweM> dva: which also makes sense, because client_headers doesn't exist inside the method
<DouweM> dva: so yeah, make client_headers an instance var so you can use it from say
axsuul has quit [Ping timeout: 255 seconds]
chrissea_ has quit [Ping timeout: 252 seconds]
<dva> and you make client_headers an instance var by adding @?
<tobiasvl> yes
<tobiasvl> read up on scope
<tobiasvl> dva: http://www.techotopia.com/index.php/Ruby_Variable_Scope might be an okay read (just ignore what it says about class variables)
<DouweM> the fuck are you doing all that stuff inside the class def for
<DouweM> dva: most of those should either be constants or instance vars initialized in your #initialize method
<DouweM> and the keys you so generously shared with us should probably be in your env
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
<tobiasvl> haha
<dva> the keys are sort of public nowadays
<dva> so shrug
<DouweM> ah I thought they were yours
<DouweM> anyway. read up on scope and instance vars
<tobiasvl> dva: make an initialize method and stuff @client_headers inside there
<DouweM> your @client_headers and all of those other vars are now in scope of the class definition, not of its instances
<dva> those are the Twitter native Android client app xauth keys
<tobiasvl> ah ok
jamto11 has joined #ruby
TwinkleHood has joined #ruby
Takle has quit [Remote host closed the connection]
<dva> tobiasvl ok, let's see
<tobiasvl> dva: this is a bit confusing, I agree. Ruby has "class variables" too, @@vars, but many people use @vars in the class definition instead to get class variables (they become instance variables for the class instance, because in ruby classes are just instances of the class Class)
<tobiasvl> so your @client_headers there doesn't belong to your Twitter instances, it belongs to the instance Twitter of the class Class
<tobiasvl> :) :)
<DouweM> don't mention ze class variables
<tobiasvl> yeah agreed
<DouweM> if you want your Twitter instances to have @client_headers, define it in #initialize or any other instance methods
Giorgio has quit [Ping timeout: 245 seconds]
klaut has joined #ruby
joonty has quit [Ping timeout: 255 seconds]
joonty has joined #ruby
timonv has joined #ruby
zz_karupa is now known as karupa
<dva> okay, that does work
jamto11 has quit [Ping timeout: 258 seconds]
LadyRainicorn has joined #ruby
hamakn has quit [Remote host closed the connection]
phansch has joined #ruby
mengu has quit [Ping timeout: 255 seconds]
<dva> I'm getting the following error when calling a function inside another
<dva> : twitter.rb:89: syntax error, unexpected end-of-input, expecting keyword_end
<dva> namely generate_device_id
Rainicorn has quit [Ping timeout: 255 seconds]
<DouweM> share yo code. you can edit the gist
<DouweM> you're missing an end on line 77
DaniG2k has joined #ruby
tesuji has joined #ruby
moneydouble has quit [Quit: Leaving.]
karupa is now known as zz_karupa
<dva> didn't realise you have to close if statements
<DouweM> dva: indentation doesn't matter in Ruby, you need to close everything you open
<Hanmac> dva & DouweM you can do generate_device_id unless @device_id but i would prefer: @device_id ||= generate_device_id
<DouweM> this isn't python ;)
platzhirsch has joined #ruby
<DouweM> in the latter case, generate_device_id should only return the uuid, not set it
<DouweM> but yeah, that's what I'd go for as well
<dva> thanks for the advice
<dva> can you explain ||=? >_>
<dva> oh it is obvious
<workmad3> dva: '@device_id || @device_id = generate_device_id'
<popl> ||=, +=, -=
<dva> @device_id (if it is is _not nil or false) OR generate..
porco has quit [Quit: Leaving...]
<dva> nice nice
<workmad3> popl: there's also &&=, |=, &=, *=, /=, **=... :D
<workmad3> popl: ||= and &&= are slightly different from the rest though, as they don't always produce an assignment
<popl> workmad3: sure sure
shashin has joined #ruby
RaptorJesus has joined #ruby
havenwood has joined #ruby
iamthesky has joined #ruby
iamthesky has left #ruby [#ruby]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
porco has joined #ruby
havenwood has quit [Ping timeout: 272 seconds]
<dva> how can I do something like: SecureRandom.hex(8) . "@gmail.com"
<dva> so it appends the string in the end of the variable
alexju has quit [Remote host closed the connection]
<Hanmac> use +
<canton7> this isn't PHP
MrSamuel has quit [Ping timeout: 265 seconds]
<dva> pretty!
angusiguess has joined #ruby
<Hanmac> dva https://gist.github.com/anonymous/19aecfefc4b78df6a096#file-gistfile1-rb-L28-L34 this does not work like you think it does ... when the variables inside have changed, the bigger variable @client_headers does not
<dva> oh
<dva> Just realised that as well
<dva> how can I do that?
hello_world101 has joined #ruby
shaileshg has quit [Quit: Connection closed for inactivity]
datafirm has joined #ruby
zorak has quit [Ping timeout: 276 seconds]
hello_world101 has quit [Client Quit]
angusiguess has quit [Ping timeout: 252 seconds]
MrSamuel has joined #ruby
<Hanmac> extra function that returns that hash
fabrice31 has quit [Remote host closed the connection]
datafirm has quit [Ping timeout: 240 seconds]
<Hanmac> dva works without variable https://gist.github.com/Hanmac/dace80b5ac0d8a5fe24d
<dva> woah
<dva> bit weird syntax imo :P
reference has quit [Remote host closed the connection]
eka has joined #ruby
duncannz has quit [Quit: Leaving]
fijimunkii has quit [Ping timeout: 264 seconds]
reference has joined #ruby
dingus_khan has joined #ruby
shashin has quit [Quit: Leaving...]
reference-lost has joined #ruby
noop has quit [Ping timeout: 252 seconds]
MrSamuel has quit [Ping timeout: 240 seconds]
akonny has joined #ruby
noop has joined #ruby
reference has quit [Ping timeout: 252 seconds]
akonny has quit [Client Quit]
koell has quit [Ping timeout: 245 seconds]
sigurding has quit [Ping timeout: 276 seconds]
fabrice31 has joined #ruby
sinkensabe has quit [Remote host closed the connection]
sinkensabe has joined #ruby
banister has joined #ruby
LekeFly has joined #ruby
banister has quit [Max SendQ exceeded]
iamcalledrob has joined #ruby
porco has quit [Quit: Linkinus - http://linkinus.com]
banister has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
banister has quit [Max SendQ exceeded]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
sigurding has joined #ruby
b1205 has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
sinkensabe has quit [Ping timeout: 240 seconds]
sandbags has joined #ruby
sandbags has quit [Changing host]
sandbags has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
mercerist has joined #ruby
sarno has quit [Remote host closed the connection]
sigurding has quit [Client Quit]
banister has joined #ruby
timfoo has quit [Ping timeout: 255 seconds]
iamcalledrob has quit [Ping timeout: 276 seconds]
banister has quit [Max SendQ exceeded]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
b1205 has quit [Ping timeout: 258 seconds]
timfoo has joined #ruby
elaptics`away is now known as elaptics
nvrch has quit [Quit: nvrch]
phansch has quit [Ping timeout: 258 seconds]
User458764 has joined #ruby
shashin has joined #ruby
Squarepy has joined #ruby
hermanmunster has joined #ruby
sk87 has joined #ruby
<krz> i have a sql query that returns [null, null, null, null, null, "2", null, "19", null]. id like to convert this into a ruby array. whats the best way to go about this?
freggles has quit [Ping timeout: 240 seconds]
<krz> apparently [null, null, null, null, null, null, null, "19", null] is a string
mercwithamouth has joined #ruby
hamakn has joined #ruby
<tobiasvl> weeeell maybe str.gsub(/null/, 'nil').gsub(/\[\]/, '').split(',').map(&:to_i)
moritzs has joined #ruby
<apeiros> o0
<Morrolan> AAAAH
<apeiros> how do you get that result in the first place?
<tobiasvl> nah that might not work with the nils
frosgy has joined #ruby
<tobiasvl> krz: JSON?
<apeiros> seems to me like you should rather aim at getting a proper result back in the first place
JasmeetQA has joined #ruby
sarno has joined #ruby
<tobiasvl> krz: I changed my mind, eval(str.gsub(/null/, 'nil'))
<tobiasvl> MUCH BETTER
<apeiros> oh, interesting… #postgresql/#ruby cross-post
strax has joined #ruby
<Morrolan> It's probably a field which contains JSON. But that's only speculation, whoever filled that DB should know.
<tobiasvl> >> str = '[null, null, null, null, null, null, null, "19", null]'; eval(str.gsub(/null/, 'nil'))
<eval-in__> tobiasvl => [nil, nil, nil, nil, nil, nil, nil, "19", nil] (https://eval.in/156791)
<apeiros> obviously it's this query: https://gist.github.com/krzkrzkrz/94afe06db4a0a92f8d65
<apeiros> krz: you know, telling that it is json you have there would have been useful.
<apeiros> JSON.parse
frogssgy has quit [Ping timeout: 245 seconds]
<tobiasvl> indeed but I called it!
<tobiasvl> 12:34:24 tobiasvl | krz: JSON?
<apeiros> yepp. well spotted.
<Morrolan> apeiros: With those capabilities, you should consider becoming a clairvoyant. :)
<apeiros> Morrolan: it's cheating when you come from the future
<Morrolan> I guess so. But eh, surely a little cheating doesn't hurt? :D
<apeiros> :-p
snakebald has joined #ruby
<krz> hmm well i did class on it and it returned String
<apeiros> but yeah, irc is the proper training for clairvoyance
segfalt has quit [Ping timeout: 252 seconds]
genta has quit [Ping timeout: 252 seconds]
frogssgy has joined #ruby
ziyadb__ has quit [Ping timeout: 245 seconds]
im0b has quit [Ping timeout: 245 seconds]
dioms_ has quit [Ping timeout: 245 seconds]
<apeiros> krz: of course. json is a string.
<apeiros> but you wrote (or at least have) the query, and it is `json_agg(to_json(properties->'attachment_id')) AS attachment_ids`
<krz> ah, sorry for the confusion
d34th4ck3r has quit [Ping timeout: 252 seconds]
<apeiros> of course json_agg gives you json
<Morrolan> Well, except in Javascript. There JSON is an object. Or an object is JSON. Or whatever.
LekeFly_ has joined #ruby
dioms_ has joined #ruby
im0b has joined #ruby
<apeiros> Morrolan: nope
d34th4ck3r has joined #ruby
ziyadb__ has joined #ruby
<Morrolan> Not?
segfalt has joined #ruby
<apeiros> in JS too, if you have the serialized json data, it's just a string.
<apeiros> there too, you do JSON.parse to get the objects
<Morrolan> Right, then.
Eyess has quit [Remote host closed the connection]
frosgy has quit [Ping timeout: 245 seconds]
Eyes has joined #ruby
<apeiros> JSON is a serialization. in languages with a string some kind of binary-buffer type, that'll be its representation
<apeiros> *a string +or+ some kind of …
sarno has quit [Remote host closed the connection]
genta has joined #ruby
Atttwww has quit [Ping timeout: 240 seconds]
LekeFly has quit [Ping timeout: 252 seconds]
Xiti has quit [Quit: Leaving]
Ginfuru_ has joined #ruby
snakebald has quit []
Ginfuru_ has quit [Client Quit]
kyb3r_ has quit [Read error: Connection reset by peer]
Hanmac1 has joined #ruby
shaileshg has joined #ruby
Advocation has quit [Quit: Advocation]
Hanmac has quit [Ping timeout: 264 seconds]
subraminion has joined #ruby
hello_world101 has joined #ruby
d34th4ck3r has quit [Quit: zzz]
<apeiros> ooooh, niiiice, OSX seems to have gotten better at remembering other screen configs
<apeiros> plugged in the monitors and bam, all windows are where I last had them yesterday
Squarepy has quit [Quit: Leaving]
alem0lars has joined #ruby
alem0lars has quit [Read error: Connection reset by peer]
Eyes has quit [Remote host closed the connection]
Eyes has joined #ruby
phansch has joined #ruby
havenwood has joined #ruby
alem0lars has joined #ruby
niftylettuce_ has quit [Quit: Connection closed for inactivity]
danshultz has quit [Remote host closed the connection]
tesuji has quit [Ping timeout: 252 seconds]
danshultz has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
<_tpavel> what would you recommend I use to transliterate French characters to English characters (ex: Égypte -> Egypte)?
danshultz has joined #ruby
dingus_khan has quit [Remote host closed the connection]
frobrob has quit [Ping timeout: 240 seconds]
<apeiros> active support has transliteration @ _tpavel
havenwood has quit [Ping timeout: 272 seconds]
<_tpavel> yes, but I have to manually define the rules inside locales, right?
<apeiros> I think only if it deviates from what they've added
<apeiros> i.e. if you want ä -> ae
<apeiros> but if you're fine with ä -> a, then that's what's already present. not sure, though.
sheperson has quit [Ping timeout: 240 seconds]
<_tpavel> oh yes, it is! Great, thanks apeiros
angusiguess has joined #ruby
<apeiros> hm, I guess with a huge screen setup, a tiling window manager would actually be nice…
frobrob has joined #ruby
Eyes is now known as Eyess
dingus_khan has joined #ruby
hamakn has quit [Ping timeout: 258 seconds]
datafirm has joined #ruby
angusiguess has quit [Ping timeout: 252 seconds]
<dva> hi guys
<dva> what's the equivalent to https://github.com/requests/requests-oauthlib in ruby?
parzzix has quit [Quit: Leaving]
mikemac has quit [Ping timeout: 252 seconds]
shashin has quit [Quit: Leaving...]
Takle has joined #ruby
kaspergrubbe has joined #ruby
Xeago has quit [Ping timeout: 245 seconds]
sigurding has joined #ruby
Bira has joined #ruby
sheperson has joined #ruby
Bira has quit [Remote host closed the connection]
<crome> so you want an "equivalent" of an extension to a non-ruby library (requests)
<crome> how does that even make sense?
<apeiros> dva: get an oauth gem and read its docs
artm has joined #ruby
sinkensabe has joined #ruby
linuxnewb2 has joined #ruby
datafirm has quit [Ping timeout: 240 seconds]
linuxnewb2 has quit [Max SendQ exceeded]
Jrz- has joined #ruby
Jrz- has quit [Max SendQ exceeded]
linuxnewb2 has joined #ruby
Jrz- has joined #ruby
hamakn has joined #ruby
Eyess has quit [Quit: Leaving]
maximski has joined #ruby
Eyes has joined #ruby
Takle has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 255 seconds]
ixti has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
kl0_ has joined #ruby
blackmesa has quit [Quit: WeeChat 0.4.3]
phansch has quit [Ping timeout: 255 seconds]
Virtualize|away has joined #ruby
Eyes has quit [Remote host closed the connection]
Eyes has joined #ruby
Advocation has joined #ruby
iamcalledrob has joined #ruby
nateberkopec has joined #ruby
axsuul has joined #ruby
noob101 has joined #ruby
<noob101> Hello everyone.
<shevy> how's it going
<noob101> I am doing ok shevy, thank you for asking.
<noob101> How about you?
iamcalledrob has quit [Ping timeout: 240 seconds]
<shevy> dunno, slept too long
phansch has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
Advocation has quit [Quit: Advocation]
Advocation has joined #ruby
axsuul has quit [Ping timeout: 255 seconds]
Advocation has quit [Client Quit]
<noob101> shevy: Oh slept long!
<noob101> shevy: Sleeping beauty. *Snooooores*
<noob101> *Chokes in sleep*
<noob101> Bah! *Wakes up out of sleep*
<shevy> it feels more like someone or something knocking me unconscious
Deejay_ has joined #ruby
<noob101> I created this game in ruby, I will post the link to it soon either this morning or in the afternoon.
<noob101> shevy: o_O?
<noob101> shevy: Wow, that's um..wow.
<noob101> shevy: Will you be ok? How come?
jamto11 has joined #ruby
<shevy> who knows
kitak_ has quit [Remote host closed the connection]
Xeago has joined #ruby
<noob101> shevy: I'll pray for you if I remember.
kitak_ has joined #ruby
jamto11 has quit [Ping timeout: 252 seconds]
dblessing has joined #ruby
frobrob has quit [Ping timeout: 240 seconds]
Nilium has quit [Ping timeout: 252 seconds]
elaptics is now known as elaptics`away
Bira has joined #ruby
maximski has quit []
<sandbags> I just extended a Clojure protocol to clojure.lang.Keyword ... it feels just like the first time I re-opened a Ruby class only without the shabby raincoat sensation afterwards :)
LekeFly_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sandbags> at least, i think so...
<sandbags> probably i am about to be descended on by a bunch of angry Clojurians
kitak_ has quit [Remote host closed the connection]
Nilium has joined #ruby
reference-lost has quit [Remote host closed the connection]
mercerist has quit [Quit: Computer has gone to sleep.]
Bira has quit [Ping timeout: 252 seconds]
reference has joined #ruby
timfoo has quit [Ping timeout: 255 seconds]
shashin has joined #ruby
cambridge has joined #ruby
<cambridge> would anyone know a good way to rank sentences that are most relevent to certain key words?
timfoo has joined #ruby
kiri has quit [Read error: Connection reset by peer]
<sandbags> cambridge: in an arbitrary sense there isn't one good way, it depends what you really mean by "rank relevant to certain keywords"
<sandbags> whether you want just those keywords, also synonmyms & related words etc...
reference has quit [Ping timeout: 252 seconds]
<cambridge> to start with, I want to order ... or filter sentences based on those key words specifically.
Morkel has quit [Ping timeout: 276 seconds]
Morkel_ has joined #ruby
kiri has joined #ruby
LekeFly has joined #ruby
<cambridge> sandbags: so if the code deciphers it has no relevance, dump it.. if it decides it has some relevance, I imagine I'd need to score it some how
<sandbags> well a usual starting point would be filter stop words, then count keyword occurrences
_tpavel has quit [Ping timeout: 240 seconds]
<sandbags> you may also want to consider occurrence order
User458764 is now known as User458764_NotHe
<cambridge> I'm looking into the standford nlp gem currently. just looking to see if anyone had advice.
Bira has joined #ruby
<workmad3> cambridge: you're probably going to want to google around the subject of semantic analysis a bit to get an idea of what you're wanting
<cambridge> ok yeah, makes sense. I'm parsing tweets so the text will be brief.
bluOxigen has joined #ruby
<cambridge> can you elaborate on occurrence order more?
<sandbags> cambridge: i mean whether keywords are independent, or more significant if they are together
<sandbags> for example "ruby" and "programming"
<cambridge> ok, thaknks
<sandbags> "I love programming, oh and I love the colour ruby red" vs "I love programming ruby"
<cambridge> workmad3: cheers, will do!
<cambridge> yeah right, makes sense.
sk87 has joined #ruby
<Macaveli> Is it possible to loop code x times but break if a function returns true?
havenwood has joined #ruby
<sandbags> can do anything from analysing ngrams rather than keywords through to LSA but, as workmad3 says, you probably want to read around the topic
<apeiros> cambridge: maybe you already know this, but you might want to look into stemming
<sandbags> it's a big topic though... if a naive solution gets you where you need to be, go with it
<cambridge> sandbags: I'm seeing that yeah, just trying to get something working .. I can elaborate on it later
sk87 has quit [Client Quit]
<cambridge> fun problem to solve
<cambridge> apeiros:
<cambridge> stemming, thanks
LadyRainicorn has quit [Read error: Connection reset by peer]
<csmrfx> impossible problem
angusiguess has joined #ruby
LadyRainicorn has joined #ruby
<sandbags> some of the first stuff i did in Ruby
<csmrfx> I don't think there is a reliable solution to machine-detecting context
<sandbags> good times
User458764_NotHe has quit [Ping timeout: 240 seconds]
<csmrfx> ie. language is ambiguous
<workmad3> csmrfx: there's not a perfect solution, no... but there are still useful things that can be done that are accurate a lot of the time
<workmad3> csmrfx: don't discount the 'good enough' just because it's not perfect ;)
<cambridge> csmrfx: I'm not looking for a be all and end all, i'm looking to naively decipher whether one sentence is more useful than another given a subject.
Takle has joined #ruby
<csmrfx> and that, impossible
<apeiros> cambridge: I'm curious how weighting words might work out. i.e. you rank the search words themselves already. a word which occurs more often in natural text has a lower rank, one which occurs less often has a higher rank.
<csmrfx> but sure, perhaps you can make something that works 90% of the time!
mercerist has joined #ruby
JoeGaudet has joined #ruby
<cambridge> apeiros: thats not a bad idea at all. thanks
<cambridge> i best get reading!
<cambridge> cheers guys
<workmad3> apeiros: a more sophistcated version of stopword removal :)
<workmad3> *sophisticated
<csmrfx> english is way easy for semantic analysis
havenwood has quit [Ping timeout: 272 seconds]
phoo1234567 has joined #ruby
<csmrfx> finnish, f.ex. has like 150 flexion forms for every noun, making machine reading things a hc problem
<apeiros> workmad3: correct
<apeiros> not sure it'd work out as well as I imagine it would, though :)
angusiguess has quit [Ping timeout: 276 seconds]
moritzs has quit [Ping timeout: 255 seconds]
mijicd has quit [Remote host closed the connection]
<workmad3> apeiros: I guess the better step would be to rank keywords depending on 'preciseness', which you could probably work out by examining synonyms... words with more non-transitive synonyms aren't as useful so are ranked lower
schaary is now known as schaary|afk
sheperson has quit [Ping timeout: 252 seconds]
noob101 has quit [Ping timeout: 240 seconds]
danielpclark has quit [Ping timeout: 265 seconds]
<apeiros> would be nice if wiktionary.com was easier to download…
JoeGaudet has quit [Ping timeout: 258 seconds]
<apeiros> could build up a nice base of information about languages
<workmad3> apeiros: which is probably then a natural step into examining the synonym graph of the entire set of keywords to try and find compatible meanings
<shevy> csmrfx but they got Eläkeläiset!
<csmrfx> can't you use a debian package for dictionaries?
<csmrfx> probably already a nice graphy tree of some kind
<apeiros> wiktionary has more than just a list of words
Gooder has joined #ruby
<csmrfx> well can it be used real time over http
<workmad3> csmrfx: I'm thinking more thesaurus than dictionary :)
<apeiros> if wiktionary was built more like freebase with its API friendly structure…
linuxnewb2 has quit [Ping timeout: 252 seconds]
<csmrfx> debian has 5 enlish thesauruses
JasmeetQA has quit [Read error: Connection reset by peer]
<csmrfx> *english
_tpavel has joined #ruby
nvrch has joined #ruby
<shevy> is that like a dinosaur in a suit
bmurt has joined #ruby
chrisseaton has joined #ruby
fresham has joined #ruby
nateberkopec has quit [Quit: Leaving...]
spastorino has joined #ruby
datafirm has joined #ruby
Advocation has joined #ruby
volk_ has joined #ruby
reference has joined #ruby
mengu has quit [Remote host closed the connection]
Advocation has quit [Client Quit]
<workmad3> shevy: it's a velociraptor teaching language at oxford
mr_snowf1ake has joined #ruby
sarno has joined #ruby
mengu has joined #ruby
fresham has left #ruby [#ruby]
datafirm has quit [Ping timeout: 240 seconds]
sk87 has joined #ruby
hamakn has quit [Ping timeout: 252 seconds]
<csmrfx> velociraptorsies teaching languagies at oxfordies
<csmrfx> "Oh, you used the stemming library? - How can you tell?"
<adac> What is the difference between "URI" class and "Addressable::URI "?
mostlybadfly has joined #ruby
<csmrfx> adac: different classes
danielpclark has joined #ruby
tjr9898_ has joined #ruby
<csmrfx> adac: try $ ri Addressable
<csmrfx> and $ ri URI
tesuji has joined #ruby
maximski has joined #ruby
sheperson_ has joined #ruby
andrewjanssen has joined #ruby
<csmrfx> (for me, ri Addressable says Nothing known)
jxport has joined #ruby
maximski has quit [Remote host closed the connection]
<adac> csmrfx, hmm I see. You know I updated the twitter gem to version 5 an now I get back an Addressable::URI instead of an URI
<adac> previosily I tested with this: response[:url]=~ URI::regexp("http")
maximski has joined #ruby
<adac> But I'm not sure how I can test a regex on an Addressable::URI now
<toretore> regexes test primarily against strings, so you need to make a string
<csmrfx> adac: well, open irb and make some addressable uris and see
<adac> csmrfx, I think I found somehting http://stackoverflow.com/a/11958835/2493198
<adac> toretore, Ok I see
sarno has quit [Remote host closed the connection]
iamcalledrob has joined #ruby
shvelo has joined #ruby
CorpusCallosum has quit [Ping timeout: 240 seconds]
<lxsameer> hey guys, I'm looking for a webserver like unicorn (for demo deployment) with minimum memory usage, any suggestion ?
b1205 has joined #ruby
<bmurt> nxginx?
<lxsameer> bmurt: no i mean something like unicorn or puma
<EatMulti> unicorn?
<bmurt> thin?
<bmurt> mongrel?
<EatMulti> rainbows?
<lxsameer> which one is the most lightweight one ?
<bmurt> rainbows
<mozzarella> I'd use thin
mark_locklear has joined #ruby
<bmurt> lxsameer: that's for you to figure out
<EatMulti> they each have their strong points...
<EatMulti> except maybe webrick
<bmurt> you said, "minimum memory usage"
noop has quit [Ping timeout: 252 seconds]
<mozzarella> it's shipped with ruby by default
<lxsameer> bmurt: yeah
<mozzarella> ;)))
<bmurt> that ain't a whole lot to go off of
iamcalledrob has quit [Ping timeout: 255 seconds]
<bmurt> i mean, you can run apache with minimum memory
<bmurt> just don't hit the server :)
zorak has joined #ruby
reference has quit [Remote host closed the connection]
sarno has joined #ruby
b1205 has quit [Ping timeout: 255 seconds]
kitak has quit [Remote host closed the connection]
kitak has joined #ruby
<bmurt> lxsameer: you got a few recommendations to review and hash out
<lxsameer> bmurt: i'm on it right now
dingus_khan has quit [Remote host closed the connection]
ldnunes has joined #ruby
moritzs has joined #ruby
6JTAAUE0A has quit [Ping timeout: 265 seconds]
j_mcnally has joined #ruby
64MAAUYFD has quit [Ping timeout: 264 seconds]
<EatMulti> lxsameer: digitalocean seem to have a nice rundown of ruby application servers https://www.digitalocean.com/community/articles/a-comparison-of-rack-web-servers-for-ruby-web-applications
<lxsameer> EatMulti: nice , thanks
oo__ has quit [Remote host closed the connection]
thomasxie has joined #ruby
gancl has quit [Ping timeout: 255 seconds]
kaspergr_ has joined #ruby
kaspergrubbe has quit [Read error: Connection reset by peer]
alexju has joined #ruby
volk_ has quit [Quit: volk_]
sarno has quit [Remote host closed the connection]
yfeldblum has joined #ruby
lkba has joined #ruby
zorak has quit [Ping timeout: 240 seconds]
<adac> toretore, Asking myself if this would be nonsense:, like converting an Addressable::URI into a string "response[:url].to_s =~ URI::regexp("http")"
alexju has quit [Ping timeout: 255 seconds]
thomasxie has quit [Remote host closed the connection]
ja_wa has joined #ruby
iasj has joined #ruby
tanmay_ has joined #ruby
tanmay__ has joined #ruby
yfeldblum has quit [Ping timeout: 265 seconds]
Deejay_ has quit [Quit: Computer has gone to sleep.]
hello_world101 has quit [Remote host closed the connection]
hello_world101 has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
chrisseaton has quit []
sarno has joined #ruby
Rollabunna has joined #ruby
hello_world101 has quit [Remote host closed the connection]
feature_creep has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GriffinH_ has joined #ruby
artm has quit [Ping timeout: 240 seconds]
phutchins has quit [Ping timeout: 258 seconds]
momomomomo has joined #ruby
phutchins has joined #ruby
reference has joined #ruby
iasj has quit [Ping timeout: 240 seconds]
robbyoconnor has quit [Ping timeout: 276 seconds]
Takle has quit [Remote host closed the connection]
Fractional has joined #ruby
brasten has joined #ruby
cambridge has quit [Ping timeout: 240 seconds]
Xiti has joined #ruby
<Fractional> Is there a way to pass a class 'type' into an method? For instance clean_array_from_instances_of_class(class) (clean array from instances of class)?
<apeiros> Fractional: classes are objects, you can pass them directly
<Fractional> So, it does not have to be an instance of a class?
<apeiros> >> def factory(klass); klass.new; end; factory(Array)
volk_ has joined #ruby
* apeiros kicks eval-in__
volk_ has quit [Client Quit]
<mozzarella> guys is that weird that I get an error when trying to install qtbindings? ¯\_(ツ)_/¯
tesuji has quit [Ping timeout: 258 seconds]
<apeiros> Fractional: maybe show what you're trying to do. gist.github.com - description, input, desired output
chrisseaton has joined #ruby
DaniG2k has quit [Quit: leaving]
jilk23 has joined #ruby
<Fractional> Sure, let me push my changes.
sdwrage has joined #ruby
sdwrage has quit [Client Quit]
Takle has joined #ruby
havenwood has joined #ruby
nateberkopec has joined #ruby
Matip has joined #ruby
<Fractional> apeiros: https://github.com/Freddan962/Spaceshooter/blob/master/src/AIfighter/AIFighter.rb - For every frame instances of AIFighter gets passed in an array with surrounding objects. I want to clean this array from non-hostile class instances. For instance, loot, background instances etc.
sinkensabe has quit [Remote host closed the connection]
<shevy> mozzarella it is probably unmaintained since a decade
sinkensabe has joined #ruby
<apeiros> Fractional: readability tip: `@objects.min {|a, b| (a.x - player.x).abs <=> (b.x - player.x).abs}` --> `@objects.min_by { |obj| (obj.x - player.x).abs }`
<Hanmac1> shevy & apeiros: you know this right?
<Hanmac1> >> (1..10).select(&:even?).map(&:to_s)
<eval-in__> Hanmac1 => ["2", "4", "6", "8", "10"] (https://eval.in/156792)
Takle_ has joined #ruby
<Hanmac1> but do you know this too?
<Hanmac1> >> (1..10).grep(:even?.to_proc,&:to_s)
<eval-in__> Hanmac1 => ["2", "4", "6", "8", "10"] (https://eval.in/156793)
Hanmac1 is now known as Hanmac
<DefV> OMG
<apeiros> Hanmac: yes. Proc#===
kaspergr_ has quit [Ping timeout: 252 seconds]
<apeiros> doesn't mean I'd ever use it
sinkensa_ has joined #ruby
GriffinH_ has quit [Remote host closed the connection]
<apeiros> Fractional: you're talking about the update method?
Sawbones has joined #ruby
kaspergrubbe has joined #ruby
<apeiros> ah, no, seems you talk about clean_from_class
Takle has quit [Ping timeout: 265 seconds]
jilk23 has quit [Ping timeout: 240 seconds]
havenwood has quit [Ping timeout: 272 seconds]
sinkensabe has quit [Read error: Connection reset by peer]
<Fractional> apeiros: Yeah
<shevy> Hanmac god
<apeiros> and you want to parametrize Projectile?
paulfm has joined #ruby
<Fractional> apeiros: I want to remove all objects which are not instances of Projectile from the array. I want Projectile to be passed in as a argument to the method.
<apeiros> yes, that's parametrize :-)
<Fractional> apeiros: Ok :D
iasj has joined #ruby
<apeiros> object.select { |obj| obj.is_a?(klass) }
phutchins has quit [Ping timeout: 245 seconds]
<apeiros> *objects
<Fractional> So then I can simply write pass in Projectile into the argument? Without having to have an instance of the class?
<apeiros> yes
fijimunkii has joined #ruby
kaspergrubbe has quit [Ping timeout: 265 seconds]
Sawbones has quit []
lw has joined #ruby
sheperson_ has quit [Quit: sheperson_]
paulfm has quit [Client Quit]
thoolihan has joined #ruby
kaspergrubbe has joined #ruby
GriffinHeart has joined #ruby
n_b has quit [Ping timeout: 276 seconds]
duggiefresh has joined #ruby
sinkensa_ has quit [Remote host closed the connection]
artm has joined #ruby
sinkensabe has joined #ruby
<Fractional> apeiros: Thanks! :)
mikemac has joined #ruby
sarno has quit [Remote host closed the connection]
qwyeth has joined #ruby
<apeiros> note, you could also use grep if you don't have additional conditions. but it seems from your code that you have more conditions than just class
<apeiros> >> ary = [1,2,"3","4",5]; klass = Integer; ary.grep(klass)
<eval-in__> apeiros => [1, 2, 5] (https://eval.in/156794)
<apeiros> >> ary = [1,2,"3","4",5]; klass = Integer; ary.select { |obj| obj.is_a?(klass) }
<eval-in__> apeiros => [1, 2, 5] (https://eval.in/156795)
Zai00 has quit [Quit: Zai00]
billy_ran_away has joined #ruby
hogihung has joined #ruby
<Hanmac> >> ["a","1","b","2","c","3","d"].grep(/\d/,&:to_i)
<eval-in__> Hanmac => [1, 2, 3] (https://eval.in/156796)
n_b has joined #ruby
akonny has joined #ruby
datafirm has joined #ruby
banister has joined #ruby
sinkensabe has quit [Ping timeout: 252 seconds]
chrisseaton has quit []
Shidash has joined #ruby
alexju has joined #ruby
orolo has joined #ruby
gancl has joined #ruby
akonny has quit [Ping timeout: 264 seconds]
danshultz has quit [Read error: Connection reset by peer]
datafirm has quit [Ping timeout: 255 seconds]
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
danshultz has joined #ruby
duggiefresh has quit [Remote host closed the connection]
n_b has quit [Ping timeout: 245 seconds]
duggiefresh has joined #ruby
vpretzel has quit [Remote host closed the connection]
krz has quit [Quit: WeeChat 0.4.3]
hmmm has quit [Quit: WeeChat 1.0-dev]
yakov has joined #ruby
<dopie> hey al
<dopie> hey all
<yakov> hey
<dopie> im needing some help here :)
duggiefresh has quit [Ping timeout: 252 seconds]
<yakov> anybody has iso standard? some draft is ok of course=)
<yakov> i'm not ready to burn $220 for the thing
paulfm has joined #ruby
hello_world101 has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
n_b has joined #ruby
sarno has joined #ruby
iamcalledrob has joined #ruby
Soda has quit [Ping timeout: 245 seconds]
shashin has quit [Quit: Linkinus - http://linkinus.com]
b1205 has joined #ruby
vpretzel has joined #ruby
Fractional has quit [Remote host closed the connection]
noocode_ has quit [Ping timeout: 240 seconds]
r3db4d has joined #ruby
Hanmac has joined #ruby
doodlehaus has joined #ruby
vpretzel_ has joined #ruby
vpretzel has quit [Disconnected by services]
iamcalledrob has quit [Ping timeout: 258 seconds]
vpretzel_ is now known as vpretzel
phoo1234567 has quit [Ping timeout: 240 seconds]
axsuul has joined #ruby
sarno has quit [Remote host closed the connection]
b1205 has quit [Ping timeout: 265 seconds]
yfeldblum has joined #ruby
dingus_khan has joined #ruby
<tobiasvl> yakov: iso standard for what
jmurray has joined #ruby
<tobiasvl> dopie: just ask your question and someone will help if they can
<yakov> tobiasvl, for ruby language
axsuul has quit [Ping timeout: 252 seconds]
noocode has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<tobiasvl> yakov: ah, well I dunno, sorry. are you writing a parser?
<yakov> i'm working on firewall
reference has quit [Remote host closed the connection]
<yakov> i was going to check iso if its worth reading
reference has joined #ruby
SBoolean has joined #ruby
lukec has joined #ruby
dingus_khan has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
mjsmith2 has joined #ruby
havenwood has joined #ruby
benzrf|offline is now known as benzrf
phoo1234567 has joined #ruby
sinkensabe has joined #ruby
sailias has joined #ruby
reference has quit [Ping timeout: 245 seconds]
GriffinHeart has quit [Remote host closed the connection]
iasj has quit [Ping timeout: 240 seconds]
kaspergr_ has joined #ruby
huoxito has joined #ruby
kaspergrubbe has quit [Read error: Connection reset by peer]
NukePuppy has joined #ruby
fresham has joined #ruby
GriffinH_ has joined #ruby
g0bl1n has joined #ruby
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Takle_ has quit [Remote host closed the connection]
LekeFly has joined #ruby
sk87 has joined #ruby
sarno has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
Takle has joined #ruby
tier has joined #ruby
kaspergr_ has quit []
tkuchiki has quit [Remote host closed the connection]
datafirm has joined #ruby
Shidash has quit [Read error: Connection reset by peer]
freggles has joined #ruby
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Shidash has joined #ruby
r3db4d has quit [Ping timeout: 252 seconds]
n1x has joined #ruby
kaneda^ has joined #ruby
r3db4d has joined #ruby
JokerDoomWork has joined #ruby
<kaneda^> hey guys, i'm trying to implement active model callbacks sans rails, and i'd like to mimic the "before_filter" that is invoked before each method of a class
GriffinH_ has quit [Remote host closed the connection]
<kaneda^> i want to do something like define_model_callbacks :exec, only: [:before], where before_exec :do_auth or something
<kaneda^> so that it executes checking auth before each method
sambao21 has joined #ruby
reference has joined #ruby
Darryl has quit [Quit: Connection closed for inactivity]
prathamesh has joined #ruby
ja_wa has quit [Quit: Leaving]
momomomomo has quit [Quit: momomomomo]
GriffinH_ has joined #ruby
<kaneda^> i'm really looking for a before_all
tobago has quit [Remote host closed the connection]
chrisseaton has joined #ruby
momomomomo has joined #ruby
robertodecurnex has joined #ruby
qetxew has joined #ruby
<banister> kaneda^ call backs are lame and almost completely unnecessary IMO
prathamesh has quit [Remote host closed the connection]
<Macaveli> this will never be an endless loop correct -> https://gist.github.com/YOUConsulting/64ebfb2c44e78de19929
<kaneda^> banister: i'm trying to figure out a better way to do the filter, but that seems to actually be the simplest way
<kaneda^> without repeating code all over the place, anyways
<kaneda^> since i know i'll want to execute it before all instance methods of multiple classes
prathamesh has joined #ruby
<apeiros> kaneda^: there are a couple of AOP gems for ruby I think
<apeiros> which try to solve such problems
<apeiros> other than that - you can either use metaprogramming where you wrap the method definition, or you can manually trigger the wrapping calls from within your method
Zenigor has joined #ruby
<kaneda^> apeiros: i was going that route at first, using metaprogramming to wrap the call to execute a filter beforehand
enebo has joined #ruby
krz has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Takle has quit [Remote host closed the connection]
Hanmac1 has joined #ruby
prathamesh has quit [Ping timeout: 252 seconds]
mehlah has quit [Ping timeout: 276 seconds]
richardlayte has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
<LadyRainicorn> Macaveli: def @user.update_profile(p) loop{} end
linuxnewb2 has joined #ruby
<Macaveli> LadyRainicorn, I don't understand that code
<Macaveli> where did the if go,
treehug88 has joined #ruby
GriffinH_ has quit [Remote host closed the connection]
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Rainicorn has joined #ruby
amargherio has joined #ruby
renklaf has quit []
Alina-malina has quit [Read error: Connection reset by peer]
LadyRainicorn has quit [Ping timeout: 252 seconds]
reference has quit [Ping timeout: 245 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
eka has joined #ruby
richardlayte has quit [Quit: richardlayte]
<Rainicorn> Macaveli: It is a joke.
sandbags has quit [Remote host closed the connection]
<Macaveli> not funny?
<Rainicorn> (That code being executed prior to your sample would cause it to go into an infinite loop.)
rghose1 has quit [Ping timeout: 255 seconds]
<Rainicorn> Well, jokes you don't get rarely are.
dingus_khan has joined #ruby
sandbags has joined #ruby
sandbags has quit [Changing host]
sandbags has joined #ruby
jilk23 has joined #ruby
GriffinHeart has joined #ruby
<Rainicorn> However, since this is #ruby, I found the probability of it being understood non-zero.
tkuchiki has joined #ruby
genta has quit [Quit: Quit]
cpuguy83_ has joined #ruby
DaniG2k has joined #ruby
mikesplain has joined #ruby
merceris_ has joined #ruby
spyderman4g63 has joined #ruby
phutchins has joined #ruby
cpuguy83_ is now known as cpuguy83
cpuguy83 is now known as Guest35026
Guest35026 has quit [Client Quit]
robbyoconnor has joined #ruby
<eam> apeiros: I remember where the double-exec of ruby came from - bundle exec :)
mr_snowf1ake has quit [Ping timeout: 245 seconds]
genta has joined #ruby
dingus_khan has quit [Ping timeout: 240 seconds]
<eam> are there any good "entire ruby script and all gems in one file" type of bundling tools?
mercerist has quit [Ping timeout: 276 seconds]
sandbags has quit [Ping timeout: 252 seconds]
merceris_ is now known as mercerist
sandbags has joined #ruby
baweaver has joined #ruby
Avahey_ has quit [Quit: Connection closed for inactivity]
obs has quit [Ping timeout: 258 seconds]
sarno has quit [Remote host closed the connection]
qetxew has quit [Read error: Connection reset by peer]
<havenwood> eam: cut a gem?
baweaver has quit [Read error: Connection reset by peer]
mehlah has joined #ruby
<havenwood> eam: `bundle package` and ship `./vendor/cache` with your app
<havenwood> i dunno
obs has joined #ruby
baweaver has joined #ruby
jamto11 has joined #ruby
<apeiros> eam: ah
<apeiros> eam: yeah, can imagine that.
snath has quit [Ping timeout: 255 seconds]
<apeiros> eam: is it still the case? and does it also apply to ./foo with foo doing Bundler.setup?
fabrice31 has quit [Remote host closed the connection]
jilk23 has quit [Ping timeout: 240 seconds]
doodleha_ has joined #ruby
iamcalledrob has joined #ruby
cpuguy83 has joined #ruby
jilk23 has joined #ruby
cpuguy83 is now known as Guest33779
sarno has joined #ruby
oo_ has joined #ruby
doodlehaus has quit [Ping timeout: 276 seconds]
Guest33779 has quit [Client Quit]
yfeldblum has joined #ruby
Takle has joined #ruby
Alina-malina has joined #ruby
lethjakman has joined #ruby
tylersmith has joined #ruby
mary5030 has joined #ruby
workmad3 has joined #ruby
JumpMast3r has joined #ruby
sk87 has joined #ruby
banister has quit [Read error: Connection reset by peer]
banister has joined #ruby
obs has quit [Remote host closed the connection]
mengu has quit []
iamcalledrob has quit [Ping timeout: 240 seconds]
datafirm has quit [Quit: Computer has gone to sleep.]
prathamesh has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
datafirm has joined #ruby
lobstah has joined #ruby
tagrudev has quit [Remote host closed the connection]
sinkensabe has quit [Remote host closed the connection]
sinkensabe has joined #ruby
dik_dak has joined #ruby
jprovazn has quit [Quit: Leaving]
vyoafo has joined #ruby
marr has quit [Ping timeout: 252 seconds]
sinkensa_ has joined #ruby
sinkensabe has quit [Read error: Connection reset by peer]
<shevy> hmm
<shevy> do you guys know if this would work in ruby?
<shevy> system './configure && make && make install'
coderhs has joined #ruby
coderhs has quit [Remote host closed the connection]
<shevy> specifically whether I could use && too there
<shevy> yeah
<shevy> seems to work
<crome> it should
<shevy> \o/
tanmay_ has quit [Ping timeout: 252 seconds]
mary5030 has quit [Ping timeout: 252 seconds]
ponga has joined #ruby
tanmay__ has quit [Ping timeout: 255 seconds]
<ponga> anyone familiar with Shoes?
sarno has quit [Remote host closed the connection]
vyoafo has quit [Remote host closed the connection]
datafirm has quit [Ping timeout: 276 seconds]
Takle has quit [Ping timeout: 252 seconds]
gwb3 has joined #ruby
<crome> I tried to compiler it once and failed
<crome> does it count?
<crome> -r
obs has joined #ruby
gwb3 has quit [Client Quit]
Takle has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
mary5030 has joined #ruby
Megtastique has joined #ruby
echevemaster has joined #ruby
dik_dak has quit [Ping timeout: 252 seconds]
tier has quit [Remote host closed the connection]
jespada has joined #ruby
Lucky_ has joined #ruby
<shevy> shoes is some java shit
<ponga> is gemset different term from gem?
mary5030 has quit [Remote host closed the connection]
<shevy> I would assume so
IceDragon has joined #ruby
<ponga> ok i was asking somewhat dumb quiestion sorry people
Robbo` has joined #ruby
subraminion has quit [Quit: Lingo - http://lingoirc.com]
<shevy> I found the questions easy to answer, not sure if the answers were helpful to you though :-)
gwb3 has joined #ruby
<shevy> Shoes changed when _why quit
gwb3 has quit [Client Quit]
<tobiasvl> rip why_
<tobiasvl> _why
<shevy> hehe
<tobiasvl> w_h_y
<baweaver> He's still alive you know...
<ponga> im on 10.9.3 mavericks what option do i have for gui support on ruby?
<ponga> shoes doesn seem to work on mavericsk
<tobiasvl> baweaver: the man is alive, but the _why persona is dead :'(
<baweaver> ah, fair point then
<baweaver> carry on
tanmay_ has joined #ruby
Eyes is now known as Eyess
<ponga> jruby's swing seems to be only option
s3ri0us has joined #ruby
baroquebobcat has joined #ruby
moritzs has quit [Ping timeout: 240 seconds]
<shevy> ponga have you tried ruby-gnome/ruby-gtk bindings?
<havenwood> ponga: it is currently only option for shoes --pre, but more bindings are planned to be added
<shevy> they work for me on linux and windows
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
gwb3 has joined #ruby
gwb3 has quit [Client Quit]
<shevy> I dont have osx to test
tjr9898_ has quit [Remote host closed the connection]
<ericwood> oh dang, someone sent me a pull request to my roomba gem
<ericwood> people are actually doing roomba hacking in ruby
Ankhers has joined #ruby
tier has joined #ruby
<ericwood> ...I'm so happy :')
sqwirl has joined #ruby
<havenwood> roomba swarm, advance!
sandbags has quit []
<ericwood> mine is a lightweight one, but that'd be super easy to pull off with Artoo :|
<crome> does it come with a kitten on top?
<crome> like in the videos
<ericwood> not yet, but I welcome pull requests
speakingcode has quit [Ping timeout: 240 seconds]
andrewjanssen has quit [Quit: Leaving...]
amargherio has quit [Remote host closed the connection]
troulouliou_dev has joined #ruby
gwb3 has joined #ruby
mary5030 has joined #ruby
dik_dak has joined #ruby
benzrf is now known as benzrf|offline
<ponga> shevy, gnome and gtk look good enough and sophisticated to me, thanks
<DouweM> ericwood: I was so happy when I got the first PR to my obscure gem
Macaveli has quit [Ping timeout: 252 seconds]
<ericwood> DouweM: I went all SQUEEEEEEEEEE
MackTrash has joined #ruby
<ericwood> this guy did a lot of the work I didn't want to
ari-_-e has quit [Quit: Leaving]
<DouweM> wow, pretty impressive PR indeed
<shevy> ponga yeah - you also ened to keep in mind that there are not that many options in ruby; ruby-gtk however is at least somewhat useful
<DouweM> mine was just reporting and fixing a tiny bug :')
<shevy> *need
vpretzel is now known as vpretzel|1636
<ericwood> granted, I need to do some work to make the gem not just a single 400+ line ruby file :P
MackTrash has quit [Client Quit]
<DouweM> hehe
<ericwood> most of it is just constants, though, since it's implementing a protocol
<ponga> perhaps i should need return to java and its good old io stream which *ucks my mind as pig
<DouweM> first lesson as a maintainer: let contributors do all the fixing upping
<eam> havenwood: I want exactly that, but all in one file
<ericwood> ponga: noooooo don't do it!
andrewjanssen has joined #ruby
tanmay_ has quit [Read error: Connection reset by peer]
mijicd has joined #ruby
banister has quit [Ping timeout: 276 seconds]
<ponga> ericwood, i really want my entire life to be with ruby but this gui matter is... (sob
<eam> havenwood: potentially with the ruby interpreter bundled as well
phansch has quit [Quit: WeeChat 0.4.3]
<ericwood> ponga: oh yeah ruby + guis isn't really a strong point
<eam> apeiros: not sure, I think I'm going to poke around in this
<ericwood> if you get desperate you can always use JRuby + java gui framework of your choice
<ponga> ericwood , can Jruby be a goodoption?
<ponga> yeah i thought of that and you answered my question even before i gave you the question
<ponga> what a wizard
<ericwood> ponga: if you want to use the Java stdlibs in ruby it's pretty awesome
<ericwood> I haven't really played with that, but iirc Shoes and whatnot do things like that for GUI stuffs
<ponga> the problem is JRuby seems real alien to me, is it pretty much equal to regular ruby with Java things available?
rizzatti has joined #ruby
<ericwood> we use JRuby for rails here and it's pretty baller
<ericwood> ponga: it's a 100% ruby implementation
baroquebobcat has quit [Quit: baroquebobcat]
andrewjanssen has quit [Client Quit]
<ericwood> so no extra learning other than how to do your java stuff
mistergibson has quit [Quit: Leaving]
<ponga> thanks ericwood you answer my question both before and after question was given, pretty impressive stuff chap
<ericwood> lol no problem :P
<ericwood> GUI stuff in ruby is...tough
<ponga> OK now i'm in Jruby website and i gotta give a go
<ponga> for using swing for gui on ruby
<eam> jruby is really slick, but there are some platform related gotchas in various corners
<ericwood> iirc there's some other Java UI libs that are waaaaay better than swing
<ericwood> but it's whatever you're most comfortable with!
<ericwood> I hated swing :P
<ponga> I hated it too ericwood, perhaps i gotta do some research then
<ponga> i am familiar with java style tho, so i would totally Jruby!
<havenwood> ponga: checkout the /samples in shoes4
renier_ has joined #ruby
Morkel_ has quit [Quit: Morkel_]
renier has quit [Ping timeout: 245 seconds]
<ericwood> ponga: shoes is great for simple stuff in Ruby
geggam has joined #ruby
VTLob has joined #ruby
<ericwood> I heard good things about JavaFX tho as a swing replacement
<ericwood> but I am so out of touch with the java world (intentionally)
<ponga> ericwood what i need is simple stuff , and i didn't know Shoes 4 existed
<ponga> holymoly
<ericwood> oh yeah go with shoes then!
<ponga> ok so shoes4 support 10.9 OSX ?
<havenwood> ponga: yes
<ponga> shoes 3 didn't work.. anyhow
<ponga> YAAAS
endash has joined #ruby
kevind has joined #ruby
amundj has quit [Ping timeout: 276 seconds]
<havenwood> ponga: on jruby: gem install shoes --pre
Fire-Dragon-DoL has joined #ruby
<ponga> i haven't installed jruby on my rvm yet! hold my cup for a sec sir
<ponga> need to install jruby first
datafirm has joined #ruby
<ponga> oh
<ponga> so shoes4 now works as a gem?
<havenwood> ponga: yup
moritzs has joined #ruby
<ericwood> it should
bal has quit [Quit: bal]
<ponga> gracias!
<havenwood> ponga: very recently cut --pre
<ponga> i'd do anything to stick with ruby
<ponga> its almost my hobby anyway, coding
<havenwood> ponga: `rake samples` from cloned shoes4 dir to run through the samples
arrubin has joined #ruby
mnencia has joined #ruby
robertodecurnex has quit [Ping timeout: 252 seconds]
lxsameer has quit [Quit: Leaving]
m_3 has joined #ruby
invisibleZero has joined #ruby
benzrf|offline is now known as benzrf
<ponga> i always wondered, so is gem like little add-on API library for ruby?
sdwrage has joined #ruby
invisibleZero has left #ruby [#ruby]
<ponga> so i could 'require' it
<ponga> oh damn it the website had it
datafirm has quit [Ping timeout: 252 seconds]
<ponga> wait on the bottom of page lol
<ponga> no wonder i failed find it
<ponga> thanks havenwood
predator217 has quit [Ping timeout: 240 seconds]
gheegh has joined #ruby
niharvey is now known as niharvey|brb
<havenwood> ponga: RubyGems is the package manager that ships with Ruby.
<havenwood> ponga: A gem is a RubyGems package.
Takle has quit [Remote host closed the connection]
<havenwood> ponga: A gem can ship with executables or just be a library.
<ponga> oh
yakov has quit [Quit: Leaving]
sinkensa_ has quit [Read error: Connection reset by peer]
<ponga> that answers my question perfectly
<ponga> thanks you
<ponga> lib and exes
<havenwood> no prob
sinkensabe has joined #ruby
<ponga> no wonder ruby coding was beautiful with those gems, what my friend said
invisibleZero has joined #ruby
<invisibleZero> can you guys tell me the official channel for rails on freenode ? :)
robertodecurnex has joined #ruby
datafirm has joined #ruby
<ericwood> #rubyonrails
gorpon has joined #ruby
<invisibleZero> thank you @ericwood
oo_ has quit [Remote host closed the connection]
tier has quit [Remote host closed the connection]
invisibleZero has left #ruby [#ruby]
<ericwood> no problemo
<ponga> it might seem stupid question but i need set my current&default ruby as Jruby to use Shoes4 don't i?
invisibleZero has joined #ruby
banister has joined #ruby
<ponga> it seems my rvm holds ruby 2.1.2 and jruby 1.7.12
banister has quit [Max SendQ exceeded]
momomomomo has quit [Quit: momomomomo]
<havenwood> ponga: rvm use jruby
<ponga> my 'rvm list' shows that jruby-1.7.12 is =>(current) and ruby-2.1.2 is * (default)
<havenwood> ponga: to list rubies including current and default `rvm list`, or to show current ruby and gemset `rvm current`
<ponga> my question was do i need to set Jruby as both current and default?
<ponga> *to use shoes
s2013 has joined #ruby
<s2013> anyone ever played rubygolf
<havenwood> just for shoes?
<ericwood> FORE!
danshult_ has joined #ruby
banister has joined #ruby
Zenigor has quit [Remote host closed the connection]
Freddan962 has joined #ruby
banister has quit [Max SendQ exceeded]
andrewjanssen has joined #ruby
dingus_khan has joined #ruby
<ponga> well I haven't downloaded any gem apart from shoes ..
lethe has quit [Remote host closed the connection]
banister has joined #ruby
fabrice31 has joined #ruby
duggiefresh has joined #ruby
<havenwood> ponga: `rvm use --default jruby` to set it as default period, for setting gem-specific maybe ask in #rvm
sinkensabe has quit [Ping timeout: 264 seconds]
<ericwood> you can add a .rvmrc file to the project dir so rvm knows to automatically switch over to jruby
lmickh has joined #ruby
<ericwood> I'd recommend not using jruby as your default ruby
datafirm has quit [Ping timeout: 255 seconds]
<havenwood> or .ruby-version
<ericwood> startup time is a little slower
<ericwood> havenwood: that too
bluOxigen has quit [Ping timeout: 240 seconds]
<ponga> ah hah, switch to jruby
aganov has quit [Remote host closed the connection]
troulouliou_dev has quit [Quit: Leaving]
<ponga> thanks ericwood, i kinda wanted to keep ruby 2.1.2 as default
knigitz has quit [Ping timeout: 276 seconds]
Zenigor has joined #ruby
<ponga> so i just need add .rvmrc file to project dir to tell it compile as jruby
danshultz has quit [Ping timeout: 252 seconds]
momomomomo has joined #ruby
<ponga> http://pastebin.com/raw.php?i=0K8e0my6 so this was what came out as rvm list
<havenwood> ponga: except do a .ruby-version file since it is the adopted community standard across other switches as well, doesn't require trusting, and is easier to use
<ponga> ah
fresham has quit [Ping timeout: 245 seconds]
hamakn has joined #ruby
<ponga> standard, ok
jxf has joined #ruby
kpshek has joined #ruby
dingus_khan has quit [Ping timeout: 245 seconds]
<havenwood> ponga: like i use chruby and also have a .ruby-version file or can use yours
gorpon has quit [Ping timeout: 258 seconds]
<havenwood> portability \o/
fabrice31 has quit [Remote host closed the connection]
invisibleZero has left #ruby [#ruby]
nemesit|znc has quit [Ping timeout: 252 seconds]
<ponga> thanks
danshult_ is now known as danshultz
kaneda^ has quit [Quit: Lost terminal]
linuxnewb2 has quit [Ping timeout: 252 seconds]
fresham has joined #ruby
mven_ has quit [Quit: Leaving]
tier has joined #ruby
banister has quit [Ping timeout: 252 seconds]
nemesit|znc has joined #ruby
b1205 has joined #ruby
<ponga> 'tis very late here
terrellt has quit [Ping timeout: 240 seconds]
<ponga> gotta sleep
<ponga> thanks for all the help havenwood , ericwood
<ericwood> no problem!
mikeg has quit [Remote host closed the connection]
<ericwood> best of luck
<havenwood> happy hacking
<ericwood> havenwood: chruby is awesome
<havenwood> ericwood: \o/
<ericwood> I'm liking ruby-build too
einarj has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<ericwood> but one gripe: rvm install jruby used the binaries and ruby-build does it from scratch
<ericwood> which sucked because it kept failing
<havenwood> ericwood: tried ruby-install?
<ericwood> so I manually downloaded the pre-build JRuby stuff and symlinked a few things so chruby would use it
tjr9898_ has joined #ruby
<ericwood> havenwood: oof no
<ericwood> I should have done that >:(
maximski has quit []
ffranz has joined #ruby
hamakn has quit [Remote host closed the connection]
spider-mario has joined #ruby
hamakn has joined #ruby
<ericwood> all the examples I saw used ruby-build
<ericwood> oh well, too late
<ericwood> :P
banister has joined #ruby
<ericwood> I'll use that going forward
s2013_ has joined #ruby
banister has quit [Max SendQ exceeded]
j_mcnally has joined #ruby
divbell has quit [Ping timeout: 252 seconds]
<havenwood> chruby pre-dated ruby-install, yeah
<havenwood> :)
<ericwood> but yeah chruby fixed some of the problems I was having with rvm
divbell has joined #ruby
MrHacks has joined #ruby
<krz> given def participants(page = 1). if i call this method with participants(nil) shouldnt page have the value of 1?
banister has joined #ruby
s2013 has quit [Ping timeout: 258 seconds]
mven has joined #ruby
<krz> why is page still nil inside the participants method
sinkensabe has joined #ruby
banister has quit [Max SendQ exceeded]
<MrHacks> Quick question since nobody is awake at #rvm: Was I wrong to install from source of some software (specificly sqlite3) before I installed RVM, Rails, and JRuby?
Asher has quit [Remote host closed the connection]
<ericwood> >> def foo(page=1); puts page; end; foo(nil)
<eval-in__> ericwood => ... (https://eval.in/156797)
<j_mcnally> MrHacks no should be fine
danijoo_ has joined #ruby
banister has joined #ruby
<ericwood> MrHacks: no, that should be fine
banister has quit [Max SendQ exceeded]
<j_mcnally> MrHacks depends where you set your prefix tho, as to whether or not gems will actually find it.
<MrHacks> I wanted to use a newer stable version of sqlite3 than what Raspbian/Ubuntu/Debian had. thx j_mcnally ericwood
<krz> ericwood: internal server error
<j_mcnally> MrHacks: most do a pretty good job tho
danijoo has quit [Ping timeout: 252 seconds]
yfeldblum has quit [Ping timeout: 258 seconds]
<ericwood> krz: lol
rippa has joined #ruby
<krz> ericwood: in your example. page returns nil for me. but shouldnt it be 1?
iamcalledrob has joined #ruby
<ericwood> krz: no, because you told it to be nil
banister has joined #ruby
<ericwood> krz: the page=1 part only applies if no args were passed
freezey has joined #ruby
predator117 has joined #ruby
<ericwood> why the hell does that code crash eval.in?!?!?!
sambao21 has joined #ruby
datafirm has joined #ruby
<MrHacks> One final question: where does RVM get software packages? From the R/U/D repo or from source?
<ericwood> MrHacks: prebuilt iirc
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hello_world101 has quit [Remote host closed the connection]
dustyquasar has joined #ruby
TwinkleHood has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<MrHacks> That's all i needed to know. thanks
MrHacks has left #ruby ["bye"]
<krz> ericwood: ah is ee
mary5030 has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
hello_world101 has joined #ruby
andrewjanssen has quit [Quit: Leaving...]
<ericwood> krz: you can always make the first line something like "page ||= 1"
iamcalledrob has quit [Ping timeout: 255 seconds]
axsuul has joined #ruby
<ericwood> >> def foo(page); page ||= 1; puts page; end; foo(nil)
<eval-in__> ericwood => 1 ... (https://eval.in/156798)
banister has quit [Ping timeout: 265 seconds]
sk87 has joined #ruby
<ponga> my god I had re-installed my mac and it did not have Java installed
<ponga> no wonder it didn't work!
<ponga> there goes my good night sleep
echevemaster has quit [Ping timeout: 255 seconds]
tier has quit [Remote host closed the connection]
r3db4d has quit [Quit: r3db4d]
amargherio has joined #ruby
heftig has quit [Quit: Quitting]
sambao21 has quit [Quit: Computer has gone to sleep.]
adac has quit [Ping timeout: 252 seconds]
axsuul has quit [Read error: Connection reset by peer]
hamakn_ has joined #ruby
hamakn has quit [Read error: No route to host]
Synthead has quit [Ping timeout: 255 seconds]
andrewjanssen has joined #ruby
sambao21 has joined #ruby
Takle has joined #ruby
s00pcan has joined #ruby
zz_karupa is now known as karupa
<ponga> ericwood, can i get your time sir
<ericwood> ponga: sure, what's up?
hogihung has quit []
<ericwood> I don't help with Java :P
terrellt has joined #ruby
sinkensabe has quit [Remote host closed the connection]
<ponga> oh wait a sec i should try one more time before annoying you people
sarno has joined #ruby
<ponga> let me try
sinkensabe has joined #ruby
<ericwood> haha okay
teddyp1cker has joined #ruby
<ponga> ok now a question
Macaveli has joined #ruby
<ericwood> fire away
ikaros has quit [Quit: Ex-Chat]
<ponga> i have Jruby installed, set it default&current(temporarily), installed Java and JDK, downloaded shoe master zip from git, and tried to run sample thru terminal
simono has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ponga> and this was the result http://pastebin.com/raw.php?i=MYtbTDBY , it seems it can't find shoes?
<ponga> and yes i have shoes 4 installed, i checked 'gem list'
<ericwood> ah okkay
<ponga> what possibly gone wrong i wonder
charliesome has joined #ruby
<ericwood> I'm not sure :\
GaryOak_ has joined #ruby
<ponga> ok sir lol
Takle has quit [Read error: Connection reset by peer]
<ponga> $ jruby path/to/file.rb is a way to go according to Git page for mac
<ericwood> sounds right to me
Takle has joined #ruby
<ponga> i also tried 'jruby downloads/shoes4-master/samples/good-clock.rb'
<ponga> with shoes4 and Jruby installed (as rvm says) and Java/JDK installed
<ponga> i don't see why im failing..
sinkensabe has quit [Ping timeout: 252 seconds]
phantasm66 has joined #ruby
<ericwood> I can't think of anything :(
mijicd has quit [Remote host closed the connection]
<ponga> and line 5 is Shoes.app height: 260, width: 250 do
<ponga> where the app starts
<ponga> 1~4 was comment
<ponga> me nither
<ponga> so it seems to me that it can't read Shoes4 at all to me
<ponga> as the first line fails
<ponga> hmm..
<ericwood> open up irb
<ericwood> and do require 'shoes'
teddyp1cker has quit [Remote host closed the connection]
Deejay_ has joined #ruby
<ericwood> or whatever the actual gem name is
robertodecurnex is now known as miracomocambioel
miracomocambioel is now known as robertodecurnex
echevemaster has joined #ruby
carraroj has joined #ruby
karupa is now known as zz_karupa
<ponga> ericwood: require 'shoe' gave me different result
linuxnewb2 has joined #ruby
snath has joined #ruby
<ericwood> is that the name you should be requiring though?
Atttwww has joined #ruby
<ponga> it is, as the git page says!
<ponga> http://pastebin.com/raw.php?i=ina81qMu i only know cocoa is some kind of ruby built thing for mac
<ponga> so the problem now is with coco?
moneydouble has joined #ruby
<ericwood> cocoa is the GUI stuff OS X uses
binaryhat has joined #ruby
robertodecurnex is now known as pman
jezi22 has joined #ruby
<ponga> it looks as it needs some parameters..?
pman is now known as p-man
Deejay_ has quit [Client Quit]
<jezi22> is there something wrong with Net::HTTP custom request headers? Because my SOAPAction header is being turned into Soapaction
tylersmith has quit [Remote host closed the connection]
<ericwood> sorry, I don't think I can help :\
<headius> ponga: try #jruby
p-man is now known as robertt
<headius> sounds like a minor env issue
<ponga> headius: thanks
JumpMast3r has quit [Quit: JumpMast3r]
BackEndCoder_ has quit [Quit: https://github.com/BackEndCoder]
baroquebobcat has joined #ruby
dumdedum has quit [Quit: foo]
<krz> page can be nil and can also be a number from 1-100
<ponga> ericwood, if it turns out Ugly, i will put my shoes back on shelfs and use Java GUI solutions
<ponga> :P
<krz> if page is nil i want foo to equal 1
<krz> but if page is a an actual number from 1-100 i want foo to equal page + 1
maletor has joined #ruby
<krz> how should i go about this?
carraroj has quit [Ping timeout: 252 seconds]
sarno has quit [Remote host closed the connection]
<krz> so lets say page is 4. foo should be be 5
<krz> page is nil, foo should be nil
<krz> err
<krz> foo should be 1
<krz> is there a better way than having to use a ternary oprator?
<krz> so far i have page.nil? ? 1 : page.to_i + 1
<krz> which seems to work
Azulinho has quit [Quit: WeeChat 0.4.3]
artm has quit [Ping timeout: 252 seconds]
prathamesh has quit [Remote host closed the connection]
toastynerd has joined #ruby
<DouweM> you don't need the nil check, nil.to_i is already 0
shvelo has quit [Ping timeout: 255 seconds]
prathamesh has joined #ruby
<mg^> jezi22: http headers are supposed to be processed in a case-insensitive manner anyway
bakflash has joined #ruby
kpshek has quit []
niharvey|brb is now known as niharvey
Lucky_ has joined #ruby
phansch has joined #ruby
SBoolean has quit [Ping timeout: 252 seconds]
aspires has joined #ruby
akemrir has quit [Quit: WeeChat 0.4.3]
mityaz has quit [Quit: See ya!]
prathamesh has quit [Ping timeout: 258 seconds]
andikr has quit [Remote host closed the connection]
phinfonet has joined #ruby
prathamesh has joined #ruby
tier has joined #ruby
jilk23 has quit [Ping timeout: 252 seconds]
lkba has quit [Ping timeout: 258 seconds]
sarno has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
artm has joined #ruby
<jezi22> mg^: but ruby capitalize it automatically
<mg^> it does
blackmesa has joined #ruby
felixjet has quit [Ping timeout: 258 seconds]
bluenemo has quit [Remote host closed the connection]
<mg^> You can make it not do that, but it's not going to be pretty. You can see where it uses downcase and capitalize here: http://rxr.whitequark.org/mri/source/lib/net/http/header.rb
tier has quit [Ping timeout: 252 seconds]
b00stfr3ak has joined #ruby
dustyquasar has quit [Remote host closed the connection]
<mg^> You could subclass String and override downcase and capitalize to not do anything, and then use that as your header name. That might break things.
<mg^> cool, someone else has had this problem too... googled it and found this: http://stackoverflow.com/questions/8864627/how-do-i-preserve-case-with-http-get
jilk23 has joined #ruby
<mg^> Of course, the other end that you're talking to is not supposed to care about case
DaniG2k has quit [Quit: leaving]
nemesit|znc has quit [Ping timeout: 276 seconds]
marr has joined #ruby
dingus_khan has joined #ruby
duggiefresh has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
nvrch has quit [Quit: nvrch]
duggiefresh has joined #ruby
<eam> it's almost as if an OO paradigm isn't appropriate for variations on string handling functions
babykosh has joined #ruby
<babykosh> Ruby gods. Are there other Data Structures in Ruby besides Array and Hash?
yfeldblum has joined #ruby
<canton7> struct? custom classes?
<havenwood> babykosh: lots
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
redondos has quit [Excess Flood]
<mg^> almost everyone who asks that question really wants to know about linked lists, I think
<havenwood> babykosh: Set, OpenStruct, Matrix, etc, etc
redondos has joined #ruby
redondos has joined #ruby
redondos has quit [Changing host]
simono has joined #ruby
dingus_khan has quit [Ping timeout: 258 seconds]
<babykosh> where can I go to look up a complete list of all data structures in ruby?
<xybre> classes are data structures too
timonv has quit [Ping timeout: 252 seconds]
<havenwood> babykosh: Queue, Class, Struct
nemesit|znc has joined #ruby
<xybre> Ruby isn't a "Data structure" language. It has lots of them, but thats not the right way to think about things. You'll get confused pretty quick.
duggiefresh has quit [Ping timeout: 240 seconds]
lkba has joined #ruby
niftylettuce_ has joined #ruby
<eam> xybre: why would you say that?
michael_lee has joined #ruby
<eam> ruby/perl/python are all generally characterized by having easy to use string/array/hash types
yfeldblum has quit [Ping timeout: 258 seconds]
<xybre> You're completely missing the point.
GriffinHeart has quit [Remote host closed the connection]
<xybre> I say that because I find it to be true.
<eam> xybre: maybe I'm adding another point :)
<shevy> babykosh String Hash and Array are the main ones
<babykosh> @xybre that link is too long, too much general info there…which is a data structure….which is not..etc….I’ve been trying to google “data structures in ruby” but having trouble finding somthing that just out right says…here’s all the data structures used in Ruby.
LACP has quit [Ping timeout: 240 seconds]
oso96_2000 has quit [Ping timeout: 255 seconds]
<shevy> babykosh of course you can not google because ruby does not define "data structures" as such; Ruby is not C; it is all about objects, and objects can always carry arbitrary internal data that is kept in @ivars
<havenwood> shevy: and Enumerator
<eam> babykosh: one can implement most any datastructure in most any language -- there won't ever be a complete list
<babykosh> @shevy is there somewhere that tells me what all the others in Ruby are (I know of hash and Array)
<xybre> babykosh: regardless of aem's opinion, Ruby isn't a data structure language. It's a "I need to DO something" language. And it does thigns with objects and methods.
<mg^> you have to define "data structure" because technically everything is a "data structure"
<shevy> havenwood how do you store state in them
* xybre stores state in shevy
<shevy> xybre ACCESS DENIED
<eam> shevy: C doesn't define data structures either
Guest4098 has joined #ruby
<xybre> :(
<shevy> xybre my data is PRIVATE
stnly has quit [Ping timeout: 252 seconds]
xcv_ has quit [Ping timeout: 276 seconds]
<shevy> eam C has structs
vali has quit [Ping timeout: 240 seconds]
<workmad3> shevy.send("state=", "stuff")
xcv has joined #ruby
* xybre shevy.send :store, xybre.state
sivoais has quit [Ping timeout: 240 seconds]
<eam> shevy: sure, and so does ruby -- but neither have a complete list of defined structures
<xybre> workmad3: :p
<workmad3> xybre: ;)
<arrubin> babykosh: Scroll down to Classes: http://www.ruby-doc.org/core-2.1.2/
<xybre> Ruby is extensible with C.. so anything C can do Ruby can do.. The built ins are all in the above link I posted.
<eam> most data structures in C are cobbled together with pointers and blobs of memory
feature_creep has quit [Quit: feature_creep]
<workmad3> eam: the same is true in ruby... we just hide it better :)
<shevy> eam a ruby struct is an array, look at the source: RARRAY_ASET(rest, i, ID2SYM(id));
sivoais has joined #ruby
<eam> sure thing
oso|away has joined #ruby
<eam> shevy: yeah, and that's true for C as well ...
oso|away is now known as oso96_2000
stnly has joined #ruby
<eam> a C struct is just some memory
<eam> everything is ;-)
LACP has joined #ruby
<shevy> can we manipulate memory in ruby
<havenwood> babykosh: start by looking at these i think: String, Array, Enumerator, Set, Hash, Struct, OpenStruct, Queue
<eam> shevy: heck yes
<workmad3> shevy: sure... 'a = Foo.new'
<eam> ruby ffi is amazing
<shevy> that is predefined
<Hanmac1> havenwood: DoctorWho?
<babykosh> @arrubin looking at classes
Hanmac1 is now known as Hanmac
tubuliferous has joined #ruby
sinkensabe has joined #ruby
<havenwood> Hanmac1: nothing to report
<havenwood> Hanmac: was crazy busy yesterday, i need some R&R
vali has joined #ruby
<workmad3> shevy: I think what you meant is 'can we do crazy, low-level memory management in ruby'
<havenwood> babykosh: I think the classes that include the Enumerable module will be of interest to you: http://www.gliffy.com/go/publish/5152080
mary5030 has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
<eam> workmad3: the answer to which is, yes
<shevy> we can not manipulate memory in ruby
<apeiros> dear… zurich has gotten expensive… even outside the center a 80m^2 apartment won't go under 3000.- CHF/month :-S
<xybre> Set isn't a primitive data strucutre, but since I don't think this person even know whats they're asking I don't know if it matters..
mary5030 has joined #ruby
<eam> shevy: sure you can: https://github.com/ffi/ffi/wiki/Pointers
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<eam> I use ffi all the time to rapidly prototype interfaces to C libraries
<eam> it's very convenient
<shevy> and this is like you use pointers in C?
hello_world101 has quit [Remote host closed the connection]
<eam> sure thing
amargherio_ has joined #ruby
<mg^> Ooh, does it do pointer arithmetic?
<eam> I mean, C didn't invent the pointer -- it's an assembly construct
<eam> mg^: yes, malloc() and the like
<eam> there are some really powerful classes to create C structs
amargherio_ is now known as MarioEIU
amargherio has quit [Disconnected by services]
MarioEIU is now known as amargherio
Xeago has quit [Remote host closed the connection]
<mg^> no, I mean... short *i = 0; i += (short *)1 // i now really = 2 :)
dawkirst has joined #ruby
Xeago has joined #ruby
wallerdev has joined #ruby
<workmad3> eam: even before assembly, a pointer is just a memory address... they've been around as long as there's been memory in computers :)
<Mon_Ouie> Are you aware that that adding two pointers makes no sense?
<eam> Mon_Ouie: depends on the architecture ...
<mg^> Mon_Ouie: yeah it's been a while, I see my error
<eam> *cough* x86 segmented memory
<mg^> remove the (short *) and that fixes it
<mg^> I haven't written anything in C for... probably 10 years
sputnik13 has joined #ruby
<mg^> Oddly enough it was a series of patches for the IRC client I am using now.
<workmad3> mg^: yeah, you were meaning 'pointer arithmetic' in the sense that you add '1' to a pointer and it gets interpreted as '1 * sizeof(pointer type)'
<mg^> workmad3: yeah
Deejay_ has joined #ruby
Es0teric has joined #ruby
<eam> anyway the answer is yes it's possible in ruby
anarang has quit [Quit: Leaving]
<babykosh> @xybre i’m going off this broad description for a data structure…”a particular way of storing and organizing data in a computer so that it can be used effeciently” …from this definition…an Array or a Hash “makes sense” to me as data structures..I’m simply asking if others exist, in this fashion, in this lanquage….is that explanation easier for you?
Spami has joined #ruby
babykosh has quit [Quit: babykosh]
obs has quit [Remote host closed the connection]
<xybre> babykosh: That description fits any class or object.
<workmad3> and he's quit
<Mon_Ouie> He left
<mg^> that was an awkward departure
the_f0ster has joined #ruby
<xybre> ah well
<eam> it's kind of interesting to see the effect of presuming C types in a language like ruby -- I mean, why would ruby necessarily need to understand the concept of (short *) ?
<xybre> I assume it was a school assignment anyway.
<havenwood> xybre: aha
timfoo has quit [Ping timeout: 255 seconds]
mikecmpbll has quit [Ping timeout: 265 seconds]
aspires has quit []
<xybre> You can talk about primitive Ruby types that ship with the language, but thats about as disingenuous as talkign about data structures in C since yo ucan create your own pretty easily and thats sorta the whole point.
jerikl has joined #ruby
<xybre> In Haskell or something, data structures might be a better fit sicne its mostly a series of functions that operates on a few built in data stuctures.
goleldar has joined #ruby
moritzs has quit [Ping timeout: 276 seconds]
<mg^> When I think data structures, I don't think primitives like C structs anyway. I think trees, priority queues, etc.
timfoo has joined #ruby
<Boohbah> hash table
binaryhat has quit [Quit: Leaving]
sambao21 has joined #ruby
jerikl has quit [Client Quit]
simono has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aspires has joined #ruby
enebo has quit [Quit: enebo]
<xybre> mg^: Yeah, and what languages have those built in?
<mg^> as a "native" type? Not many.
wallerdev has quit [Quit: wallerdev]
lethe has joined #ruby
<xybre> Yeah, that's my impression too.
Matip has quit [Ping timeout: 265 seconds]
jxf has quit [Ping timeout: 265 seconds]
<xybre> Whoever wrote that homework assignment was a jerk.
aspires has quit [Client Quit]
<havenwood> indeed
duggiefresh has joined #ruby
<mg^> I can't think of any languages I'm familiar with where those can't be implemented. Maybe ancient versions of BASIC make it hard. But any modern language should be suitable for just about anything you can think of.
tier has joined #ruby
sambao21 has quit [Client Quit]
IceDragon has quit [Ping timeout: 276 seconds]
IceDragon has joined #ruby
<shevy> when I do stat in bash on a file
<shevy> I get: Device: 801h/2049d
<mg^> This reminds me of the time I had a job interview at a place we'll call "Big Search & Advertising Co." I told them I was most familiar with Perl, and during the interview this guy comes in and hands me a printed sheet of some stereotypical write-once read-never Perl code.
tjr9898_ has quit [Remote host closed the connection]
<shevy> anyone knows how I can find this out in ruby? or rather, what that whole / thingy even means
aspires has joined #ruby
<mg^> He asked me what it does... and at that point in the interview process I'm already stressed enough.
<mg^> And I look at it and all I see is garbage.
lethe has quit [Ping timeout: 240 seconds]
prathamesh has quit [Remote host closed the connection]
<shevy> hehehe
saarinen has joined #ruby
User458764 has joined #ruby
<shevy> did you punch him in the face
prathamesh has joined #ruby
<mg^> I gave up when my built-in Perl interpreter failed. Turns out it was building a doubly-linked list in the most obfuscated manner I could think of.
alex88 has quit [Quit: Leaving...]
<mg^> shevy: I didn't at the time but by the time I was on the plane home and had time to think about it...
aspires has quit [Client Quit]
Kricir has joined #ruby
hhuiiu has joined #ruby
<crome> mg^: hehe
ss__ has joined #ruby
Deejay_ has quit [Quit: Computer has gone to sleep.]
duggiefr_ has joined #ruby
duggiefresh has quit [Ping timeout: 252 seconds]
aspires has joined #ruby
sarno has quit [Read error: Connection reset by peer]
simono has joined #ruby
<dva> hi guys
<dva> how can I create this object in ruby: https://gist.github.com/anonymous/4dbba15de9450d01036e
<dva> (line 17+)
duggiefresh has joined #ruby
duggiefr_ has quit [Read error: No route to host]
<mg^> shevy: I believe that's telling you the major/minor for the device containing the file in question
<shevy> dva hmm what is this doing?
prathamesh has quit [Ping timeout: 252 seconds]
s2013_ has quit [Ping timeout: 255 seconds]
<shevy> dva line 17 is a commented line no?
<shevy> that is probably using a function to construct an object
<dva> shevy I'm using https://github.com/requests/requests-oauthlib to create the oauth signature
datafirm has quit [Quit: Computer has gone to sleep.]
<shevy> I dont know where from (Client) comes
<dva> shevy the comment stuff is the dump from auth
datafirm has joined #ruby
timonv has joined #ruby
sarlalian has quit [Quit: WeeChat 0.4.0]
sarlalian has joined #ruby
IceDragon has quit [Ping timeout: 276 seconds]
<mg^> shevy: I think you just need File::Stat and want dev_major and dev_minor
Jrz- has quit [Quit: Computer has gone to sleep.]
hhuiiu has quit [Ping timeout: 276 seconds]
<kl0_> Is there any way to replace only full occurences of a string using gsub?
<kl0_> full words, I mean
chrisja has joined #ruby
Xeago has quit [Remote host closed the connection]
aspires has quit []
timonv_ has joined #ruby
<eam> mg^: I mean, I understand that perl is noisy, but I've never found perl I couldn't understand
freerobby has joined #ruby
<mg^> eam: couldn't understand in 5 minutes?
duggiefresh has quit [Ping timeout: 255 seconds]
<eam> sure
<mg^> Well, you're better than I
<eam> mg^: a page of code? 5 minutes. A sprawling framwork, maybe longer :)
i_s has joined #ruby
<mg^> a page of intentionally obfuscated code
<eam> I find abstraction obfuscation to be the most problematic kind, by fa=r
andrewjanssen has quit [Quit: Leaving...]
datafirm has quit [Ping timeout: 240 seconds]
<mg^> Say, the first place winner here: http://www.foo.be/docs/tpj/issues/vol4_3/tpj0403-0017.html
duggiefresh has joined #ruby
<eam> was the code really that bad? But ok time me let's give this a shot
<mg^> Well the clues are already on that page
<mg^> but yeah, it was bad
<eam> copied, pasted, not looking
robert___ has quit [Ping timeout: 265 seconds]
<mg^> I was under the stress of a 6-hour interview at the time, so that didn't help
timonv has quit [Ping timeout: 252 seconds]
robert_ has joined #ruby
webgen has joined #ruby
qhartman has joined #ruby
lukec has quit [Quit: lukec]
chabill has joined #ruby
brasten has quit [Ping timeout: 264 seconds]
momomomomo has quit [Quit: momomomomo]
charliesome has joined #ruby
aspires has joined #ruby
jottr_ has quit [Quit: WeeChat 0.4.2]
<eam> mg^: I got this far in, and realized there's perl code embedded inside a regex: https://gist.github.com/eam/66b64eabab728234a6db
sinkensabe has quit [Remote host closed the connection]
<mg^> I meant the overall first place winner anyway, not the first circle winner
freezey has quit [Remote host closed the connection]
terrell_t has joined #ruby
duggiefresh has quit [Ping timeout: 245 seconds]
jilk23 has quit [Ping timeout: 276 seconds]
<eam> ah
<mg^> but still, embedding perl code in regexes is a time-honored tradition :)
sinkensabe has joined #ruby
<mg^> the sub name in that first one gives it away
<eam> kinda, I mean, the difference between "omg a jumble of stuff" and "holy shit, this thing abuses quoting semantics" is pretty large
terrell_t has quit [Read error: Connection reset by peer]
jilk23 has joined #ruby
<mg^> I wish I was clever enough to write an OCR function for an obfuscated code contest
<mg^> clever enough to even think of it
prathamesh has joined #ruby
terrell_t has joined #ruby
linuxnewb2 has quit [Ping timeout: 265 seconds]
yfeldblum has quit [Ping timeout: 252 seconds]
dustyquasar has joined #ruby
<eam> it abuses some bugs in 5.8 and changes the value of "undef"
<mg^> "hey neat, an obfuscated code contest... I'll make an OCR function!"
sinkensabe has quit [Read error: No route to host]
sinkensabe has joined #ruby
wallerdev has joined #ruby
IceDragon has joined #ruby
terrellt has quit [Ping timeout: 265 seconds]
prathamesh has quit [Remote host closed the connection]
alem0lars has quit [Quit: Going AFK...]
klaut has quit [Remote host closed the connection]
prathamesh has joined #ruby
timonv_ has quit [Ping timeout: 276 seconds]
diegoviola has joined #ruby
<mg^> eam: that's just kind of evil
duggiefresh has joined #ruby
Macaveli has quit [Ping timeout: 252 seconds]
Takle has quit [Remote host closed the connection]
<eam> it's pretty low-grade
jilk23 has quit [Ping timeout: 264 seconds]
prathame_ has joined #ruby
Deejay has joined #ruby
jilk23 has joined #ruby
Deejay is now known as Guest43070
deric_skibotn has joined #ruby
prathamesh has quit [Read error: Connection reset by peer]
platzhirsch has left #ruby [#ruby]
Guest43070 has quit [Max SendQ exceeded]
treehug88 has quit [Ping timeout: 240 seconds]
Kricir has quit [Remote host closed the connection]
alem0lars has joined #ruby
feature_creep has joined #ruby
Deejay_ has joined #ruby
tkuchiki has quit [Remote host closed the connection]
sigurding has quit [Quit: sigurding]
dingus_khan has joined #ruby
treehug88 has joined #ruby
TwinkleHood has joined #ruby
tylersmith has joined #ruby
combusean has joined #ruby
alem0lars has quit [Client Quit]
timonv has joined #ruby
TeresaP_ has joined #ruby
skane has joined #ruby
sarno has joined #ruby
skane has quit [Client Quit]
mehlah has quit [Quit: Leaving...]
<TeresaP_> Hey everyone. Is there a reasonably quick way to do a case-insensitive lookup on a Module containing string vars (used as an enum, kindof)? I want to say: if there's a match between user inputted string and a value in the module, get the value from the module and pass that in to another function.
pragmatism has joined #ruby
Rollabunna has quit [Remote host closed the connection]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freezey has joined #ruby
dingus_khan has quit [Ping timeout: 258 seconds]
linuxnewb2 has joined #ruby
linuxnewb2 has quit [Changing host]
linuxnewb2 has joined #ruby
n1x has quit [Ping timeout: 255 seconds]
tjr9898_ has joined #ruby
mikesplain_ has joined #ruby
yokel has quit [Remote host closed the connection]
Vivekananda has quit [Quit: Ex-Chat]
<shevy> hmm
<shevy> TeresaP_ can you define "value in the module"?
qwyeth has quit [Ping timeout: 245 seconds]
<shevy> because I am not sure how you store those string vars in the first place...
yokel has joined #ruby
nateberkopec has quit [Quit: Leaving...]
thisirs has joined #ruby
maletor_ has joined #ruby
Gooder has quit [Ping timeout: 265 seconds]
goleldar has quit []
maletor has quit [Ping timeout: 245 seconds]
<shevy> if these are @ivars then it should work
nateberkopec has joined #ruby
<shevy> >> module Foo; @bla = '5'; def self.bla?; @bla; end; end; Foo::bla?
<eval-in__> shevy => "5" (https://eval.in/156799)
mikesplain has quit [Ping timeout: 252 seconds]
mikesplain_ is now known as mikesplain
<TeresaP_> sure
<TeresaP_> module Foo
<TeresaP_> OPTIONONE = 'Some Text'
<TeresaP_> end
<shevy> ok a constant
Deejay_ has quit [Quit: Computer has gone to sleep.]
<shevy> you can obtain constains like that in this way:
<shevy> >> module Foo; OPTIONS = 'bla'; end; Foo.constants
<eval-in__> shevy => [:OPTIONS] (https://eval.in/156800)
<shevy> given that this is an array, you can run .grep on it quickly to find whether it is included or not; and then either Foo::OPTIONS or Object.const_get() should also work
<shevy> >> Object.const_get "Math::Pi"
<eval-in__> shevy => uninitialized constant Math::Pi (NameError) ... (https://eval.in/156801)
<shevy> hmm
<shevy> >> require 'math'; Object.const_get "Math::Pi"
<eval-in__> shevy => (https://eval.in/156802)
<shevy> huh
<shevy> oh right
goleldar has joined #ruby
<Sigma00> just call include? on the array
sinkensabe has quit [Remote host closed the connection]
<Sigma00> er, nevermind, brainfart
<shevy> Math::PI
<shevy> >> Math::PI
<eval-in__> shevy => 3.141592653589793 (https://eval.in/156803)
<shevy> >> Object.const_get 'Math::PI'
<eval-in__> shevy => 3.141592653589793 (https://eval.in/156804)
kenneth has joined #ruby
<ericwood> >> Object.const_get 'Math::PIE'
<eval-in__> ericwood => uninitialized constant Math::PIE (NameError) ... (https://eval.in/156805)
<ericwood> BULLSHIT
Hobogrammer_ has joined #ruby
<pragmatism> lol
mehlah has joined #ruby
brandonshowers has joined #ruby
linuxnewb2 has quit [Ping timeout: 255 seconds]
prathame_ has quit [Remote host closed the connection]
mois3x has joined #ruby
prathamesh has joined #ruby
SegFaultAX has quit [Excess Flood]
<TeresaP_> aha, shevy thanks. const_get seems to be the ticket
orolo has quit [Quit: This computer has gone to sleep]
tjr9898_ has quit [Remote host closed the connection]
nanoyak has joined #ruby
tjr9898_ has joined #ruby
SegFaultAX has joined #ruby
LadyRainicorn has joined #ruby
_tpavel has quit [Quit: Leaving]
spider-mario has quit [Remote host closed the connection]
<shevy> \o/
teddyp1cker has joined #ruby
Xeago has joined #ruby
teddyp1cker has quit [Client Quit]
rippa has quit [Ping timeout: 240 seconds]
Rainicorn has quit [Ping timeout: 240 seconds]
s2013 has joined #ruby
aspires has quit []
p8952 has joined #ruby
p8952 has quit [Changing host]
p8952 has joined #ruby
prathamesh has quit [Ping timeout: 276 seconds]
<goleldar> kjjkkkjj
goleldar has quit []
niharvey is now known as niharvey|brb
bmurt has quit []
sinkensabe has joined #ruby
aspires has joined #ruby
ss__ has quit [Ping timeout: 264 seconds]
testcore has joined #ruby
timfoo has quit [Ping timeout: 255 seconds]
AlSquire has quit [Quit: This computer has gone to sleep]
timonv has quit [Remote host closed the connection]
Xeago has quit [Ping timeout: 258 seconds]
bmurt has joined #ruby
qwyeth has joined #ruby
timfoo has joined #ruby
maestrojed has joined #ruby
User458764 is now known as User458764_NotHe
linuxnewb2 has joined #ruby
linuxnewb2 has quit [Changing host]
linuxnewb2 has joined #ruby
RubyPanther has quit [Ping timeout: 265 seconds]
SBoolean has joined #ruby
rezzack has joined #ruby
hogihung has joined #ruby
Deejay_ has joined #ruby
User458764_NotHe has quit [Ping timeout: 240 seconds]
lukec has joined #ruby
JumpMast3r has joined #ruby
sunya7a has joined #ruby
User458764 has joined #ruby
ghr has quit [Ping timeout: 252 seconds]
terrell_t has quit [Remote host closed the connection]
aspires has quit []
ghr has joined #ruby
rizzatti has quit [Ping timeout: 276 seconds]
prathamesh has joined #ruby
orolo has joined #ruby
tjr9898_ has quit [Remote host closed the connection]
jheg_ has joined #ruby
alpha123 has quit [Quit: Be back shortly.]
noop has joined #ruby
axilla has quit [Ping timeout: 240 seconds]
sinkensabe has quit [Remote host closed the connection]
JumpMast3r has quit [Ping timeout: 255 seconds]
sinkensabe has joined #ruby
momomomomo has joined #ruby
axilla has joined #ruby
testcore has quit [Quit: [BX] This BitchX's for you]
sambao21 has joined #ruby
Valesk_ has joined #ruby
testcore has joined #ruby
yfeldblum has joined #ruby
kiri has quit [Quit: Leaving]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
sinkensabe has quit [Ping timeout: 252 seconds]
tvw has quit []
zorak has joined #ruby
RubyPanther has joined #ruby
mattmcclure has joined #ruby
slowcon has joined #ruby
kl0_ has quit [Ping timeout: 240 seconds]
fijimunkii has quit [Ping timeout: 252 seconds]
User458764 is now known as User458764_NotHe
VinDH has joined #ruby
momomomomo has quit [Quit: momomomomo]
terrellt has joined #ruby
jxf has joined #ruby
krz has quit [Quit: WeeChat 0.4.3]
tier has quit [Remote host closed the connection]
<Hanmac> havenwood: cyberman vs darlek: https://i.chzbgr.com/maxW500/8202712064/hC3EA79F1/
User458764_NotHe has quit [Ping timeout: 240 seconds]
Asher has joined #ruby
tjr9898_ has joined #ruby
tier has joined #ruby
klaut has joined #ruby
moneydouble has quit [Quit: Leaving.]
treehug8_ has joined #ruby
treehug88 has quit [Ping timeout: 240 seconds]
rippa has joined #ruby
sk87 has joined #ruby
Mattx has joined #ruby
Valesk_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rippa has quit [Client Quit]
tier has quit [Remote host closed the connection]
mnencia has quit [Quit: Ex-Chat]
kl0_ has joined #ruby
mikecmpbll has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
sk87 has quit [Client Quit]
<davidcelis> dalek
moritzs has joined #ruby
sambao21 has quit [Ping timeout: 240 seconds]
spyderman4g63 has joined #ruby
Deejay_ has quit [Quit: Textual IRC Client: www.textualapp.com]
n1x has joined #ruby
spyderma_ has joined #ruby
spyderman4g63 has quit [Read error: Connection reset by peer]
Robbo` has quit [Ping timeout: 240 seconds]
Valesk has quit [Ping timeout: 240 seconds]
tier has joined #ruby
Asher1 has joined #ruby
Asher has quit [Read error: No route to host]
<havenwood> #exterminate! (because #exterminate that doesn't modify the receiver is already taken)
spyderma_ has quit [Read error: Connection reset by peer]
Valesk has joined #ruby
sambao21 has joined #ruby
spyderman4g63 has joined #ruby
Asher1 is now known as Asher
sunya7a has quit [Ping timeout: 258 seconds]
<shevy> how do I convert hex into decimal ...
sdwrage has quit [Quit: This computer has gone to sleep]
sambao21 has quit [Client Quit]
kotk_ has joined #ruby
<workmad3> shevy: is it a hex string?
tjr9898_ has quit [Remote host closed the connection]
sambao21 has joined #ruby
<workmad3> shevy: if so, you can do .to_i(16)
kotk has quit [Ping timeout: 240 seconds]
<shevy> hmm
<shevy> >> '801'.to_i 16
<eval-in__> shevy => 2049 (https://eval.in/156806)
<shevy> cool
<shevy> that is the correct number
<workmad3> >> "0xdeadbeaf".to_i 16
<eval-in__> workmad3 => 3735928495 (https://eval.in/156807)
<shevy> \o/ workmad3
thesheff17 has quit [Ping timeout: 252 seconds]
<workmad3> >> "0xdeadbeef".to_i 16
<eval-in__> workmad3 => 3735928559 (https://eval.in/156808)
<davidcelis> cool hex string bro
sunya7a has joined #ruby
<workmad3> dunno what the hell is up with my spelling nowadays :(
sambao21 has quit [Client Quit]
<workmad3> davidcelis: I see 0xDEAD people!!!
the_f0ster has quit [Ping timeout: 240 seconds]
rippa has joined #ruby
agjacome has joined #ruby
moritzs has quit [Ping timeout: 255 seconds]
chubchubcharles has joined #ruby
sambao21 has joined #ruby
nicholas040 has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
AlexRussia has quit [Ping timeout: 258 seconds]
dingus_khan has joined #ruby
ylluminate has quit [Quit: Bye!]
Squarepy has joined #ruby
AlexRussia has joined #ruby
<shevy> lol
sarno has quit [Remote host closed the connection]
Mattx has quit [Ping timeout: 240 seconds]
chubchubcharles has left #ruby [#ruby]
jerrett has left #ruby [#ruby]
andrewjanssen has joined #ruby
sdwrage has joined #ruby
omosoj has joined #ruby
niharvey|brb is now known as niharvey
jaimef has quit [Excess Flood]
sdwrage has quit [Client Quit]
jheg_ is now known as jheg
alvaro_o has joined #ruby
Robbo` has joined #ruby
chubchubcharles has joined #ruby
dingus_khan has quit [Ping timeout: 265 seconds]
robertt is now known as Fernando
Fernando is now known as robertt
chrisseaton has quit []
wilsonfisk has joined #ruby
kirun has quit [Remote host closed the connection]
phantasm66 has quit [Quit: *poof*]
GriffinHeart has joined #ruby
ponga has quit []
<chubchubcharles> hello
strax has quit [Quit: Connection closed for inactivity]
kidoz has joined #ruby
<davidcelis> hi
kotk has joined #ruby
s3ri0us is now known as s3ri0us|away
diegoviola has quit [Quit: WeeChat 0.4.3]
s3ri0us|away is now known as s3ri0us
tier has quit [Remote host closed the connection]
zorak has quit [Ping timeout: 264 seconds]
jaimef has joined #ruby
bilbo_swaggins has joined #ruby
kotk_ has quit [Ping timeout: 258 seconds]
<bilbo_swaggins> benzrf: sup
tjr9898_ has joined #ruby
GriffinHeart has quit [Ping timeout: 252 seconds]
kenneth has joined #ruby
<havenwood> >> [41507, 38953, 853, 367, 19, 3, 3].inject(:*).to_s(16)
<eval-in__> havenwood => "1337decafc0ff33" (https://eval.in/156809)
<DouweM> nice
chubchubcharles has quit [Ping timeout: 240 seconds]
<bilbo_swaggins> I was going to ask the pattern behind those input numbers
<bilbo_swaggins> then I saw the output
<bilbo_swaggins> carry on
User458764 has joined #ruby
kirun has joined #ruby
sunya7a_ has joined #ruby
<bilbo_swaggins> is there an up-to-date, at least mostly-fleshed-out, English guide to MRI's internals?
<shevy> bilbo_swaggins don't think so, only a few scattered blog entries
<bilbo_swaggins> yeah all from like 1.8 too
<Mon_Ouie> It's easy, everything is in parse.y :p
<bilbo_swaggins> that's where to start?
<Mon_Ouie> I don't know what "where to start" would be, depends on what you're trying to understand
sunya7a_ has quit [Client Quit]
<bilbo_swaggins> I don't know what I don't know. I'm just curious.
<Mon_Ouie> (I just said that as a joke because parse.y contains a bunch of stuff that has nothing to do with parsing)
sunya7a_ has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<bilbo_swaggins> I feel I'd learn more about Ruby if I learned how it works under the hood. Maybe even practical things.
__main__ has quit [Read error: Connection reset by peer]
sunya7a has quit [Ping timeout: 276 seconds]
<bilbo_swaggins> I can already do neat things like introspection of class hierarchies with Ruby proper, but that only whetted my appetite.
_main_ has joined #ruby
jaimef has quit [Excess Flood]
sunya7a_ has quit [Client Quit]
<benzrf> who pingd me
matrixise has quit [Ping timeout: 276 seconds]
mikesplain_ has joined #ruby
sunya7a has joined #ruby
sunya7a has quit [Client Quit]
_main_ is now known as __main__
<bilbo_swaggins> how's your project going?
Gooder has joined #ruby
mikesplain has quit [Ping timeout: 245 seconds]
mikesplain_ is now known as mikesplain
n1x has quit [Ping timeout: 252 seconds]
sambao21 has joined #ruby
tier has joined #ruby
jaimef has joined #ruby
s3ri0us is now known as s3ri0us|away
psycho_one has joined #ruby
sunya7a has joined #ruby
sunya7a has quit [Client Quit]
tier has quit [Remote host closed the connection]
s3ri0us|away is now known as s3ri0us
sunya7a has joined #ruby
freezey has quit [Remote host closed the connection]
Gooder has quit [Ping timeout: 265 seconds]
ghr has quit [Ping timeout: 264 seconds]
subbyyy has joined #ruby
sunya7a has quit [Client Quit]
benlieb has joined #ruby
tier has joined #ruby
AlexRussia has quit [Ping timeout: 252 seconds]
tier has quit [Remote host closed the connection]
nanoyak has joined #ruby
freezey has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
inversesquarelaw has joined #ruby
<benlieb> what would be the proper way to escape the title variable in the following command, which using a system call (yes I understand the security implications of the system call): `writeit -metadata title="#{title}"`
Mattx has joined #ruby
pragmatism has left #ruby [#ruby]
<benlieb> is there are ruby method that escapes double quotes?
<benlieb> surprisingly hard to find this on the google
combusean has quit [Ping timeout: 252 seconds]
mame1 has joined #ruby
adthul has joined #ruby
<bilbo_swaggins> invert quotes and backticks
<eam> a system call is something different. You probably want Shellwords for escaping the arg
<bilbo_swaggins> eval "`writeit -foo bar=#{baz}`"
mame0 has quit [Ping timeout: 252 seconds]
nanoyak has quit [Read error: Connection reset by peer]
sunya7a has joined #ruby
jerius has joined #ruby
<eam> #{Shellwords.escape(baz)}
nanoyak has joined #ruby
<benlieb> bilbo_swaggins: Im not sure that this would do what I need.
<benlieb> eam: that sounds about right
dustyquasar has quit []
<benlieb> eam: that's a gem?
<eam> benlieb: it's also much safer to avoid a shell entirely
<benlieb> eam: please see my security caveat in orig question
<bilbo_swaggins> lex@luthor ~ $ irb
<bilbo_swaggins> 2.1.2 :001 > foo = "/home"
<bilbo_swaggins> 2.1.2 :002 > eval "`ls #{foo}`"
<bilbo_swaggins> => "lex\n"
<bilbo_swaggins> => "/home"
<bilbo_swaggins> 2.1.2 :003 >
saarinen has quit [Quit: saarinen]
<RubyPanther> eval + backticks == WTF ** 2
<eam> benlieb: avoiding a shell doesn't mean avoiding running external commands
<eam> you can do exactly what you're doing without running /bin/sh
<benlieb> eam: i get you
<eam> it's just a little bit convoluted in ruby because `` presumes /bin/sh -c arg
<benlieb> I misunderstood
<bilbo_swaggins> if you want to do it your way though, you *can* do what I was saying
artm has quit [Ping timeout: 252 seconds]
<bilbo_swaggins> now I want to know the better way, though
<RubyPanther> yeah the shell has nothing to do with the problems, the reasons for avoiding the shell are portability, and speed. The latter is rarely even measurable.
<eam> IO.popen is the easiest way to run a subprocess, gather the output, and avoid the shell entirely
<eam> you want the multi-arg form where the command is tokenized by you
AlexRussia has joined #ruby
<RubyPanther> and platforms with a shell are not common anymore. Even windoze is POSIX
artm has joined #ruby
<eam> RubyPanther: that is absolutely incorrect
<eam> avoiding the shell when spawning a subprocess is a huge security concern
<RubyPanther> "that" is always "that," so that's impossible
<eam> quoting and interpolating strings is an antipattern
<eam> for exactly the same reason you'd avoid it with a database
<bilbo_swaggins> meh
<bilbo_swaggins> IO.popen is neat though
<benlieb> eam: how would you transform my original command?
<RubyPanther> No, if you've got eval and interpolations inside of backticks, a shell is not even an issue, much less security concern that should distract you from removing the more pressing WTF
<bilbo_swaggins> read the docs yo
<bilbo_swaggins> RubyPanther: my point still stands: "meh"
enebo has joined #ruby
<eam> benlieb: IO.popen(%w{echo hello this is a command with no shell * ! ()}, "r") { |f| puts f.gets }
<bilbo_swaggins> he said he didn't care about the security risk. I obliged.
<RubyPanther> And if you think you can protect the system from the script in a way where the script has less permissions than the user it is run as, that fails in the end anyways. That security interest is mistaken at a basic level.
<RubyPanther> Whatever the shell exposes, that needs to be safe anyways.
<bilbo_swaggins> fair enough
<eam> RubyPanther: I think you're confused. We're discussing injection attacks
<RubyPanther> eam: Bait and switch, how can it be off topic to explain the part of the issue you yourself claimed I had wrong? ;)
<jheg> In ruby are functions called methods?
<eam> jheg: yeah
<RubyPanther> jheg:yes
<bilbo_swaggins> functions attached to a class are methods
spyderman4g63 has quit [Remote host closed the connection]
<bilbo_swaggins> all functions are part of a class
<jheg> thanks
<bilbo_swaggins> so yes
<RubyPanther> Well, we do have detached methods
<workmad3> bilbo_swaggins: functions attached to an object are methods <-- better phrasing? ;)
<eam> well, class methods
<benlieb> eam: can't convert Array into String
<bilbo_swaggins> I think that may be more accurate
<bilbo_swaggins> not sure
<RubyPanther> there are no functions, so those answers are mostly "wrong." Things called functions elsewhere are indeed called methods in Ruby, though.
<workmad3> eam: a class method is still attached to an object... the class :)
spyderma_ has joined #ruby
chrisseaton has joined #ruby
chipotle_ has joined #ruby
<eam> workmad3: :')
<benlieb> your command errors on that.
<bilbo_swaggins> read the docs
<eam> benlieb: oh, you're using an old ruby -- the syntax is going to be more convoluted in that case unfortunately. What ruby version?
<workmad3> RubyPanther: isn't an UnboundMethod object uncallable until you re-bind it to another object though?
<benlieb> but to calm any fears, this is just a rake task I'm writing for dev env
<eam> benlieb: if it's just rake, no sweat
<RubyPanther> a method "has" a class, I'm not convinced it is always "attached" though
<eam> but in production, you'd want to do some legwork and avoid a shell
<benlieb> 8.7
<RubyPanther> A detached method is explicitly detached, and yet it still has a class
chipotle has quit [Read error: Connection reset by peer]
<bilbo_swaggins> words
<RubyPanther> workmad3: Sure, I didn't claim there is a use case
g0bl1n has quit [Ping timeout: 255 seconds]
dun10 has joined #ruby
RandyT has quit [Quit: ZNC - http://znc.in]
<benlieb> but now that this has got me thinking about call external commands, I'm going to do this at the end of every rake task:
rizzatti has joined #ruby
<workmad3> RubyPanther: ah, yeah, I think that's why I suggested saying a method is 'attached' to an object rather than a class... an UnboundMethod object is a method that's unbound from an object, not from the class of that object
<benlieb> `say -v Vickie "The task is finished. Let's get drinks."`
<benlieb> I guess that's "Vicki", say -v Vicki "The task is finished. Let's get drinks."
linguini has joined #ruby
<benlieb> but back to my original question
bilbo_swaggins has quit [Quit: Leaving]
<benlieb> am I correct in assuming that I need an external gem to handle escaping for the shell?
<benlieb> not assuming, but *understanding*
GaryOak_ has quit [Remote host closed the connection]
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
nanoyak has quit [Quit: Computer has gone to sleep.]
blackmesa has quit [Ping timeout: 265 seconds]
baroquebobcat has quit [Ping timeout: 240 seconds]
kpshek has joined #ruby
tier has joined #ruby
<RubyPanther> benlieb: For some values of "escaping," yes.
RandyT has joined #ruby
<workmad3> benlieb: for most values though... no
<eam> benlieb: in 1.8.7 here's how you can do it: https://gist.github.com/eam/b70f2e5ae118808f157c
<eam> it's a bit of a pain in the ass
chabill has quit [Ping timeout: 240 seconds]
asteros has joined #ruby
<workmad3> benlieb: system("echo", "oh", "look", "this", "is", "escaped", "*")
<RubyPanther> For values where it would be "yes," the answer is actually, "don't do that it hurts"
<Mon_Ouie> As well as ShellWords.escape
diegoviola has joined #ruby
<eam> workmad3: but, capturing the output :D
Es0teric has joined #ruby
dun10 has left #ruby [#ruby]
<Mon_Ouie> You can pass an array to IO.popen
chipotle_ has quit [Quit: cya]
Zenigor has quit [Remote host closed the connection]
moneydouble has joined #ruby
<eam> Mon_Ouie: not in 1.8.7
<workmad3> eam: so use the multi-param version of popen3 ;)
<eam> see above =/
aspires has joined #ruby
chipotle has joined #ruby
zorak has joined #ruby
brandonshowers has quit [Quit: brandonshowers]
Sawbones has joined #ruby
<eam> ruby2 is way better at helping people do the secure thing when running programs
Zenigor has joined #ruby
BackEndCoder has joined #ruby
<benlieb> Shellwords isn't a gem it seems
zeqfreed has joined #ruby
<Mon_Ouie> It comes with Ruby
<Mon_Ouie> require 'shellwords'
eka_ has joined #ruby
eka has quit [Read error: Connection reset by peer]
maximski has joined #ruby
<RubyPanther> 1.9 came out over 6 years ago
alem0lars has joined #ruby
aspires has quit [Client Quit]
mark_locklear has quit [Ping timeout: 258 seconds]
<Mon_Ouie> eam: Open3.popen3 is defined in 1.8.7 and can take multiple argumenst
<eam> ah, great
<eam> that's even better :)
<Mon_Ouie> Although 1.9.0 was a development version, 1.9.2 was the "real" release of 1.9 for general use
<eam> the trouble is, of course, the system ruby on many major production distros is still 1.8.7
<eam> when RHEL7 comes out next year that should make a huge dent
<RubyPanther> How many years since yugui said that "Ruby 2 is coming and 1.8 is going away"
mark_locklear has joined #ruby
aspires has joined #ruby
<havenwood> there's shellwords in 1.8
<ericwood> yah
<Mon_Ouie> Ruby 1.8.7 end of life was june 2013
zeqfreed has quit [Remote host closed the connection]
<ericwood> shellwordz
dingus_khan has joined #ruby
<eam> havenwood: yeah shellwords was mentioned immediately, then we began to discuss how to avoid unnecessary shell interpolation entirely
<havenwood> avoiding 1.8 sounds like a good start
<RubyPanther> "Dear 1.8, Please listen to the release manager and go away. K Thanks"
<wilsonfisk> is eval.in down? i get a "Internal Server Error".
<Mon_Ouie> >> you there buddy?
<eval-in__> Mon_Ouie => undefined method `buddy?' for main:Object (NoMethodError) ... (https://eval.in/156810)
sinkensabe has joined #ruby
<wilsonfisk> page loads; but when i try to compile some ruby i get an error
<Mon_Ouie> Seems like the bot can get a result but you can't see the web page
<havenwood> 1.8 is dead, long live 2.1!
tier has quit [Remote host closed the connection]
<wilsonfisk> >> puts "test"
<eval-in__> wilsonfisk => test ... (https://eval.in/156811)
klaut has quit [Remote host closed the connection]
<wilsonfisk> hmmmm....cookie went through. page still won't load :/
Rollabunna has joined #ruby
dingus_khan has quit [Ping timeout: 240 seconds]
vpretzel_ has joined #ruby
linuxnewb2 has quit [Ping timeout: 255 seconds]
sunya7a_ has joined #ruby
vpretze__ has joined #ruby
michaelchum has joined #ruby
fijimunkii has joined #ruby
moneydouble has quit [Quit: Leaving.]
Rollabunna has quit [Ping timeout: 276 seconds]
vpretzel|1636 has quit [Ping timeout: 264 seconds]
Mattx has quit [Ping timeout: 276 seconds]
s3ri0us has quit [Quit: Leaving...]
fijimunkii has quit [Client Quit]
vpretzel_ has quit [Ping timeout: 255 seconds]
benzrf is now known as benzrf|offline
Shidash has quit [Ping timeout: 264 seconds]
b1205 has quit [Ping timeout: 252 seconds]
robbyoconnor has quit [Ping timeout: 252 seconds]
benlieb has quit [Quit: benlieb]
Bira has quit [Remote host closed the connection]
<Freddan962> Where would I start reading now that I want to get into client and server programming with Ruby?
echevemaster has quit [Remote host closed the connection]
sheperson has joined #ruby
tylersmith has quit [Read error: Connection reset by peer]
chrisseaton has quit []
tylersmith has joined #ruby
mr_snowf1ake has joined #ruby
sinkensabe has quit [Remote host closed the connection]
dawkirst has quit [Remote host closed the connection]
<xybre> Freddan962: Like TCP Sockets with Ruby?
<havenwood> Freddan962: Pick an HTTP client and a Rack framework to look at.
sinkensabe has joined #ruby
<Freddan962> xybre: Exactly, preferably no frameworks. Would like to gain a basic understanding.
<havenwood> good book
debajit has joined #ruby
<Freddan962> Is it a book I should pick up?
<xybre> Yes
<havenwood> yup
<xybre> I own it
<havenwood> me too
<xybre> It's great
xilefkfelix has joined #ruby
<Freddan962> I hope I can get it shipped before friday :D
<eam> Freddan962: Stevens TCP/IP Illustrated is what you should read regardless of the language
pipework is now known as Spaceghostc2c
<havenwood> Freddan962: ebook
sambao21 has quit [Quit: Computer has gone to sleep.]
<xybre> Freddan962: You can download the ebook :)
<Freddan962> Oh thats nice!
weems has joined #ruby
<eam> the basic functions of network programming are essentially identical across all languages
nanoyak has joined #ruby
<Spaceghostc2c> eam: Especially in brainfuck++
weems has quit [Changing host]
weems has joined #ruby
jezi22 has quit [Ping timeout: 240 seconds]
zeh_ has joined #ruby
sambao21 has joined #ruby
sinkensabe has quit [Ping timeout: 240 seconds]
combusean has joined #ruby
<xilefkfelix> i am getting an error every time i try to compile ruby: http://pastebin.felix-kraus.net/paste/12923020
<xilefkfelix> can anyone help me?
<eam> Spaceghostc2c: though some toy languages expose a very limited subset :D
sinkensabe has joined #ruby
sheperson has quit [Ping timeout: 258 seconds]
decoponio has quit [Quit: Leaving...]
<shevy> what means "grading" in the UK? they have numbers ... like 6 or 5 or 4...
zz_karupa is now known as karupa
<xybre> xilefkfelix: You're on OSX?
<xilefkfelix> xybre: no, on debian wheezy
rizzatti has quit [Ping timeout: 252 seconds]
dawkirst has joined #ruby
<xybre> xilefkfelix: Hmm. Well, it looks like ssl might be missing. Make sure your SSL development libs are installed, or use RVM to install them for you.
scepticulous has left #ruby ["Gone"]
phutchins has quit [Ping timeout: 245 seconds]
<xilefkfelix> ohm, i am new to ruby... what is missing?
sinkensabe has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
<havenwood> xilefkfelix: you need 1.9.3?
<xilefkfelix> yes
<havenwood> xilefkfelix: then 1.9.3-p547
<Freddan962> havenwood: Is there any benefits from learning how to use DRb over the methods in the e-book?
<xilefkfelix> i want to install redmine
<havenwood> Freddan962: Learn both. DRb is higher level.
Es0teric has quit [Quit: Computer has gone to sleep.]
<xybre> Drb is a totally different thing.
<xilefkfelix> havenwood: does also not work
<Freddan962> havenwood: Do you think the e-book will teach me enough to build a multiplayer game?
<xilefkfelix> same error
<xybre> xilefkfelix: https://rvm.io/rvm/install will isntall Ruby for you, generally including dependencies.
<havenwood> xilefkfelix: or ruby-install is very light and will fetch deps: https://github.com/postmodern/ruby-install#readme
<xybre> Freddan962: It will teach you enough to send information from multiple clients to a single server. If those componets are of a game you can build from there.
<xilefkfelix> xybre: okay, i will try that
Sawbones has quit []
<havenwood> xilefkfelix: can you not use the 1.9 apt package?
asteros has quit [Quit: asteros]
wallerdev has quit [Quit: wallerdev]
<havenwood> xilefkfelix: sudo apt-get install ruby1.9.1 ruby1.9.1-dev && update-alternatives --config ruby
<xilefkfelix> havenwood: it did not work with that. i got an error because of a gem that could not be downloaded
gwb3 has quit [Remote host closed the connection]
<xilefkfelix> havenwood: but i can try it again
simono has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest4098 has quit [Ping timeout: 265 seconds]
zeh_ has quit [Quit: Linkinus - http://linkinus.com]
<havenwood> xilefkfelix: if you want to build it yourself, these are the deps: sudo apt-get install -y build-essential libffi-dev libgdbm-dev libncurses5-dev libreadline-dev libssl-dev libyaml-dev zlib1g-dev
rizzatti has joined #ruby
vpretze__ has quit [Ping timeout: 240 seconds]
vpretzel|1636 has joined #ruby
<xilefkfelix> havenwood: okay, i will first try it again with the apt version
<Freddan962> xybre: This book covers it in Ruby, correct?
karupa is now known as zz_karupa
<xybre> Freddan962: yep
<xilefkfelix> havenwood: but how shall i pass this step? 'rbenv local 1.9.3-p194'
<havenwood> xilefkfelix: you didn't mention you were using rbenv
<Freddan962> xybre: Do you know if you buy a kindle edition from Amazon, do you get the e-book as well?
<xybre> It also explains how sockets work below Ruby so you ahve an idea of how it fits together.
sunya7a_ has quit [Ping timeout: 252 seconds]
<xilefkfelix> havenwood: did not know that this is important.
sunya7a has quit [Ping timeout: 240 seconds]
<xybre> Freddan962: I don't own the Kindle edition, but if its Kindle it should be instant.
<Freddan962> xybre: I do not have a kindle reader though.
<havenwood> xilefkfelix: do you want to ditch rbenv or keep it around?
<xybre> Freddan962: Then just buy it directly from Jesse's site
<Freddan962> xybre: Oh you could do that - cool!
saarinen has joined #ruby
<xilefkfelix> havenwood: i do not need it anymore once my redmine system is running
<havenwood> xilefkfelix: so remove any dotfiles you added and nuke ~/.rbenv
<havenwood> any additions to dotfiles*
skaflem has quit [Quit: Leaving]
omosoj has quit [Ping timeout: 276 seconds]
<xybre> Freddan962: Yep, jsut click the "buy now" button.
<xilefkfelix> havenwood: done
jerius has quit []
Levenstein has quit [Read error: Connection reset by peer]
benzrf|offline is now known as benzrf
dangerousdave has joined #ruby
xcesariox has joined #ruby
xcesariox has quit [Max SendQ exceeded]
jespada has quit [Quit: Leaving]
<havenwood> xilefkfelix: just check that update-alternatives is set properly for `ruby` and `gem`
<xilefkfelix> havenwood: both is set to 1.9.1
<xilefkfelix> havenwood: shall i now start the installation process?
<havenwood> xilefkfelix: then just use sudo for gems or set --user-install in your .gemrc
<xilefkfelix> okay
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<xilefkfelix> is it normal that the gems are located in '/usr/local/lib/ruby/gems/2.0.0'?
<havenwood> xilefkfelix: (which would be adding `gem: "--user-install"` to `~/.gemrc`
<havenwood> )
<havenwood> xilefkfelix: yeah, debian-based distros do a system install for gems, so sudo req
<xilefkfelix> kay
<havenwood> xilefkfelix: if you want to do a user install you can either `gem install xx --user-install` or modify a .gemrc file.
<xilefkfelix> havenwood: i will install them with sudo
mercwithamouth has quit [Ping timeout: 240 seconds]
Bira has joined #ruby
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<xilefkfelix> havenwood: it works! you are my hero for that afternoon :D
mois3x has quit [Quit: mois3x]
kevind_ has joined #ruby
chrisseaton has joined #ruby
<TeresaP_> Anyone good at regex?
Bira has quit [Ping timeout: 240 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
<TeresaP_> I am terrible at it and struggling with a particular case
<havenwood> TeresaP_: lots of people are
sdwrage has joined #ruby
<havenwood> TeresaP_: yeah, regex can be confusing
<havenwood> white noise!
<TeresaP_> haha
vpretzel|1636 is now known as vpretzel
baroquebobcat has joined #ruby
kevind has quit [Ping timeout: 255 seconds]
kevind_ is now known as kevind
<xybre> TeresaP_: I use these: http://www.regular-expressions.info and http://rubular.com
<TeresaP_> Alright, havenwood well let's say I have 2 email addresses. One is foo@gmail.com and the other is bar_123@gmail.com. I just want to capture foo and bar, and not the _123 or the @gmail.com part. Any suggestions for how I might go about that? I can capture the bar_123 but can't seem to strip off the _123 in one go.
<xybre> http://www.regexr.com is a nifty new tool also.
<TeresaP_> Thanks xybre, I hvae been using rubular to help construct it. I haven't seen the regular-expressions.info before, so thanks :)
<xybre> TeresaP_: /[A-z]+/ would jsut give you foo and bar.
<Freddan962> xybre: Bought the book - I hope it will be a good read!
<havenwood> TeresaP_: or: /[[:lower:]]+/
<TeresaP_> xybre dang I knew I should've used another example. Anything after an _ would be ignored.
kaspergrubbe has joined #ruby
<Freddan962> Another 2D zombie survival game developed by me in Ruby - https://www.youtube.com/watch?v=ofjTmPXZpU8 :D
<xybre> TeresaP_: Yes, it would only grab the first bit before an invalid character.
noop has quit [Ping timeout: 240 seconds]
<havenwood> >> 'bar_123@gmail.com'[/[[:lower:]]+/]
<eval-in__> havenwood => "bar" (https://eval.in/156812)
<havenwood> >> 'bar_123@gmail.com'[/[A-z]+/]
<eval-in__> havenwood => "bar_" (https://eval.in/156813)
User458764 has quit [Quit: Textual IRC Client: www.textualapp.com]
<TeresaP_> xybre Ah I see, because + defines only a single instance
<xybre> No + is "one or more"
<TeresaP_> See, I am terrible with regex
<xybre> havenwood: you're right, it includes the _
<xybre> I forgot that _ is between A and Z :D
Mattx has joined #ruby
GriffinHeart has joined #ruby
<TeresaP_> More complicated case: ThisIsMoreCompLeX3_Ignore1@gmail.com I want to capture ThisIsMoreCompleX3 and that's it
b1205 has joined #ruby
<havenwood> >> 'ThisIsMoreCompLeX3_Ignore1@gmail.com'[/[[:alnum:]]+/]
<eval-in__> havenwood => "ThisIsMoreCompLeX3" (https://eval.in/156814)
tier has joined #ruby
<TeresaP_> Thank you!!
wallerdev has joined #ruby
naterubin has joined #ruby
<havenwood> no prob
<xybre> You should probably jsut go through that regular-expressions.info tutorial
<TeresaP_> Yes, yes I should :-|
<TeresaP_> And I will
Parker0 has joined #ruby
<xybre> In our "modern" world pretty much you need to learn it. I avoided it for years.
<TeresaP_> Agreed. It is becoming more critical.
naterubin has quit [Quit: Leaving]
tier has quit [Remote host closed the connection]
<xybre> Hopefulyl we will grow beyond regex soon, but its pretty entrenched.
<havenwood> The docs for regexp actually has some good stuff: http://www.ruby-doc.org/core-2.1.2/Regexp.html
s2013 has quit [Ping timeout: 240 seconds]
GriffinHeart has quit [Ping timeout: 252 seconds]
dingus_khan has joined #ruby
<TeresaP_> Thanks for the references everyone.
weszlem has joined #ruby
tier has joined #ruby
claymore has quit [Quit: Leaving]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
psycho_one has quit [Remote host closed the connection]
rezzack has quit [Quit: Leaving.]
rezzack has joined #ruby
dseitz has joined #ruby
thesheff17 has joined #ruby
lethe has joined #ruby
Es0teric has joined #ruby
<havenwood> >> 'ThisIsMoreCompLeX3_Ignore1@gmail.com'.split('_').first
<eval-in__> havenwood => "ThisIsMoreCompLeX3" (https://eval.in/156815)
dingus_khan has quit [Ping timeout: 258 seconds]
Lucky_ has joined #ruby
Synthead has joined #ruby
linuxnewb2 has joined #ruby
<TeresaP_> I think it would have to be 'ThisIsMoreCompLeX3_Ignore1@gmail.com'.split('_').first.split('@').first
<havenwood> TeresaP_: good point, ha
paulfm has quit []
<TeresaP_> That was an avenue I totally should've seen though. Good call on the split option :)
lethe has quit [Ping timeout: 264 seconds]
klaut has joined #ruby
<havenwood> >> 'ThisIsMoreCompLeX3_Ignore1@gmail.com'.each_char.take_while { |char| !['_', '@'].include? char }.join
<eval-in__> havenwood => "ThisIsMoreCompLeX3" (https://eval.in/156816)
<Freddan962> Jessie Storimer, please send me your book sooner! :<
paulfm has joined #ruby
thesheff17_ has joined #ruby
bthesorceror has joined #ruby
thesheff17 has quit [Disconnected by services]
thesheff17_ is now known as thesheff17
<havenwood> TeresaP_: yeah, `split(/_|@/)` would work
shaileshg has quit [Quit: Connection closed for inactivity]
Toger has joined #ruby
jezen has joined #ruby
gorpon has joined #ruby
<TeresaP_> I didn't realize you could use multiple chars in there!
<RubyPanther> It is vitally important for all programmers to learn regex. Not only to write regex, but also to know when not to. Often I see people who aren't regex experts trying to use regex when they should have switched to a recursive descent parser
<havenwood> RubyPanther: it's also vitally important for people to know how to accomplish regexp tasks without regexp i think :)
Synthead has quit [Quit: p33 ba115]
codabrin_ has joined #ruby
<jezen> In JS, I can do something like `return false || false || true`. Is there an equivalent in Ruby? Can I chain a bunch of things and find the first non-falsey value?
<havenwood> RubyPanther: oh right, you said how not to ;)
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood> >> false || false || true
<eval-in__> havenwood => true (https://eval.in/156817)
vpretzel_ has joined #ruby
guilffer has joined #ruby
<havenwood> jezen: or for flow control only: false or false or true
paulfm has quit [Ping timeout: 258 seconds]
<jezen> craziest thing is, I tried it in irb and it didn’t work, then I tried it again, and it worked
asteros has joined #ruby
<RubyPanther> >> def omg ; return false || false || true end ; omg()
<eval-in__> RubyPanther => true (https://eval.in/156818)
asteros has quit [Client Quit]
paulfm has joined #ruby
maximski has quit []
codabri__ has joined #ruby
maximski has joined #ruby
<jezen> undefined local variable or method ` true' for main:Object
dawkirst has quit [Remote host closed the connection]
<jezen> that was interesting
paulfm has quit [Client Quit]
<jezen> well anyway, thank havenwood!
<jezen> s/thank/thanks/
codabrink has quit [Ping timeout: 265 seconds]
vpretzel has quit [Ping timeout: 258 seconds]
dawkirst has joined #ruby
charliesome has joined #ruby
dawkirst has quit [Remote host closed the connection]
codabrin_ has quit [Ping timeout: 276 seconds]
charliesome has quit [Client Quit]
wilsonfisk has quit [Quit: Leaving.]
webgen has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
carraroj has joined #ruby
brandonshowers has joined #ruby
jezen has quit []
vpretzel has joined #ruby
<Freddan962> xybre: How long do you think it took for you until you received the e-book?
maximski has quit [Ping timeout: 252 seconds]
vpretzel_ has quit [Ping timeout: 258 seconds]
ghr has joined #ruby
s2013 has joined #ruby
simono has joined #ruby
vpretzel_ has joined #ruby
jezen has joined #ruby
jezen has quit [Remote host closed the connection]
gr33n7007h has joined #ruby
wilsonfisk has joined #ruby
postmodern has joined #ruby
mary5030 has quit [Remote host closed the connection]
jheg has quit [Quit: jheg]
mary5030 has joined #ruby
vpretzel has quit [Ping timeout: 245 seconds]
gr33n7007h has quit [Client Quit]
vpretzel_ is now known as vpretzel
sigurding has joined #ruby
LiohAu has quit [Quit: LiohAu]
brandons_ has joined #ruby
brandonshowers has quit [Quit: brandonshowers]
sunya7a has joined #ruby
sunya7a_ has joined #ruby
asteros has joined #ruby
Atttwww has quit [Ping timeout: 258 seconds]
paulfm has joined #ruby
weems has quit [Ping timeout: 252 seconds]
Zenigor has quit [Remote host closed the connection]
armyriad has quit [Read error: Connection reset by peer]
simono has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
armyriad has joined #ruby
mijicd_ has joined #ruby
Lucky_ has quit [Read error: Connection reset by peer]
jheg has joined #ruby
jilk23 has quit [Ping timeout: 276 seconds]
alem0lars has quit [Quit: alem0lars]
mark_locklear has quit [Quit: Leaving]
paulfm has quit [Client Quit]
<shevy> hmm
<shevy> if I have an array, I can use .shuffle[0] to get a random element
<shevy> is this possible with a hash as well?
sunya7a has quit [Ping timeout: 252 seconds]
sunya7a_ has quit [Ping timeout: 258 seconds]
leslie has quit [Quit: Have you ever tried to eat a clock? It's very time consuming.]
dblessing has quit [Quit: dblessing]
sepp2k has joined #ruby
<wallerdev> you can use Array#sample
kaspergr_ has joined #ruby
bocaj has joined #ruby
<wallerdev> faster than shuffle
leslie has joined #ruby
<tobiasvl> for a hash you'd have to to_a it first
<wallerdev> id probably just to hash.keys.sample
<tobiasvl> ah ofc
danshultz has quit [Read error: Connection reset by peer]
danshultz has joined #ruby
hfp has quit [Quit: bye]
carraroj has quit [Quit: Konversation terminated!]
leslie has quit [Client Quit]
kaspergrubbe has quit [Ping timeout: 252 seconds]
tier_ has joined #ruby
tier has quit [Ping timeout: 252 seconds]
andrewjanssen has quit [Ping timeout: 255 seconds]
LiohAu has joined #ruby
duggiefresh has quit [Remote host closed the connection]
phansch has quit [Quit: WeeChat 0.4.3]
feature_creep has quit [Quit: feature_creep]
<Freddan962> Jessie send me your e-book already :3
bthesorceror has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 276 seconds]
SBoolean has quit [Remote host closed the connection]
brandons_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
robertt has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Leaving...]
alsu has joined #ruby
jheg has quit [Quit: jheg]
sunya7a has joined #ruby
JohnBat26 has quit [Ping timeout: 265 seconds]
<alsu> I have several functions I’d like to add a “rescue” to, which just logs the name of the function, the args, and the exception
<alsu> is there a simple way to do that? in python, I’d use a decorator
Zyprex has joined #ruby
LekeFly has joined #ruby
SegFaultAX has quit [Excess Flood]
omosoj has joined #ruby
<csmrfx> like event whenever a method is called?
akonny has joined #ruby
sinkensabe has joined #ruby
kenneth has joined #ruby
leslie has joined #ruby
SegFaultAX has joined #ruby
<csmrfx> functions are called methods in ruby
<csmrfx> kinda
<alsu> er, sorry. method
<tobiasvl> au contraire - ruby has no functions, only methods ;)
<csmrfx> anyway
<csmrfx> you could use rescue
<alsu> so by hand, I would do something like: def foo(a,b,c) … rescue => e; log(__method__, [a,b,c], e); end
<benzrf> alsu: let me explain
Bira has joined #ruby
sinkensabe has quit [Remote host closed the connection]
<benzrf> alsu: ruby does not directly have anything like decorators
danshult_ has joined #ruby
<alsu> but I’d like to make the [a,b,c] part less fragile, and reduce 3 lines to 1
<benzrf> alsu: you have 2 major options
sunya7a_ has joined #ruby
danshult_ is now known as danshultz_
<benzrf> alsu: 1 is to define a method on Class or something similar that wraps a method whose name you give
<benzrf> then you can write 'the_method :method_name'
sinkensabe has joined #ruby
gorpon has quit [Ping timeout: 252 seconds]
<benzrf> * the_method :method_to_wrap
prathamesh has quit [Remote host closed the connection]
<benzrf> alsu: the other option is to define a method on Class that takes a method name and a block, then defines a method of that name with the block as the body
<benzrf> but with wrapped rescue
prathamesh has joined #ruby
testcore has quit [Ping timeout: 272 seconds]
<csmrfx> how about a mix in instead
nateberkopec has joined #ruby
<benzrf> csmrfx: alsu is looking to find a generic way to autowrap existing methods with certain error handling
sinkensabe has quit [Remote host closed the connection]
<csmrfx> so, require a module and be done
banister has joined #ruby
sinkensabe has joined #ruby
<csmrfx> iow, mix-in
chrisseaton has quit [Ping timeout: 240 seconds]
<benzrf> csmrfx: in python, a 'decorator' is a syntactic trick to pass a function through another function before saving it to the namespace
banister has quit [Max SendQ exceeded]
kyb3r_ has joined #ruby
<benzrf> csmrfx: oh, you mean for the Class method?
<csmrfx> hmm
banister has joined #ruby
danshultz has quit [Ping timeout: 252 seconds]
banister has quit [Max SendQ exceeded]
<csmrfx> banister will explain what I meant
<csmrfx> oops, nope
<benzrf> in python functions are stored in the same namespace as vars, like in js
<benzrf> @foo
<benzrf> def bar():
<benzrf> ^this is equivalent to
hfp has joined #ruby
<benzrf> def bar():
<benzrf> and then
<benzrf> bar = foo(bar)
<benzrf> it's sugar for wrapping functions
<benzrf> handy for things like class methods
banister has joined #ruby
<benzrf> the closest ruby thing would probably be writing a method that takes a block intended to be a method body
Bira has quit [Ping timeout: 265 seconds]
<benzrf> ...mechanically, anyway
LadyRainicorn has quit [Quit: Bye]
banister has quit [Max SendQ exceeded]
<csmrfx> I dont know how he does that
yacks has quit [Ping timeout: 240 seconds]
spyderma_ has quit [Ping timeout: 276 seconds]
banister has joined #ruby
<alsu> benzrf: I found a thing called method_added
<csmrfx> banister, you can't just keep quittin'
prathamesh has quit [Ping timeout: 258 seconds]
nateberkopec has quit [Ping timeout: 240 seconds]
banister has quit [Max SendQ exceeded]
testcore has joined #ruby
<benzrf> alsu: you *could* use that, i suppose
asteros has quit [Quit: asteros]
<benzrf> =p
michael_lee has quit [Ping timeout: 265 seconds]
<benzrf> alsu: wait, do you want to do this to every method in a class or module?
mehlah has quit [Quit: Leaving...]
<alsu> benzrf: nope, just some
<benzrf> alsu: go with a class method that goes back and wraps
<benzrf> although if you want to use it like 'private' than i guess method_added is relevant
<csmrfx> cant you just use the rescue
pwh_ has quit []
linuxnewb2 has quit [Ping timeout: 252 seconds]
<csmrfx> I really didn't get when do you want the methods to be logged
<alsu> if an exception occurs
Rollabunna has joined #ruby
Zenigor has joined #ruby
adac has joined #ruby
<csmrfx> lol put a rescue statement in a module and require that
<alsu> not all methods, just some
rizzatti has quit [Ping timeout: 264 seconds]
frosgy has joined #ruby
ldnunes has quit [Quit: Leaving]
banister has joined #ruby
aspires has quit []
Rollabunna has quit [Ping timeout: 264 seconds]
aspires has joined #ruby
moritzs has joined #ruby
michaelchum has quit [Quit: Connection closed for inactivity]
klaut has quit [Remote host closed the connection]
frogssgy has quit [Ping timeout: 240 seconds]
s2013 has quit [Ping timeout: 252 seconds]
einarj has joined #ruby
zorak has quit [Ping timeout: 252 seconds]
JokerDoomWork has left #ruby ["Leaving"]
blackmesa has joined #ruby
nicholas040 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Solnse has joined #ruby
banister has quit [Ping timeout: 264 seconds]
amargherio has quit [Remote host closed the connection]
charliesome has joined #ruby
zorak has joined #ruby
tier_ has quit []
banister has joined #ruby
banister has quit [Max SendQ exceeded]
nicholas040 has joined #ruby
moneydouble has joined #ruby
s00pcan has quit [Ping timeout: 258 seconds]
sigurding has quit [Quit: sigurding]
bmurt has quit []
asteros has joined #ruby
andrewjanssen has joined #ruby
asteros has quit [Client Quit]
doodleha_ has quit [Remote host closed the connection]
banister_ has joined #ruby
banister_ has quit [Max SendQ exceeded]
Shidash has joined #ruby
doodlehaus has joined #ruby
Steve21 has joined #ruby
freerobby has quit [Quit: Leaving.]
Xeago has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bakflash has quit [Read error: Connection reset by peer]
brandonjmckay has joined #ruby
asteros has joined #ruby
<Steve21> how do you accept a encrypted password as a Sinatra parameter?
banister has joined #ruby
<Steve21> Need to accept a username and password as a paramter so it can be passed into another system
Zenigor has quit [Remote host closed the connection]
kl0_ has quit [Ping timeout: 240 seconds]
fresham has quit [Quit: fresham]
alexju has quit [Remote host closed the connection]
Zenigor has joined #ruby
pwh has joined #ruby
doodlehaus has quit [Ping timeout: 265 seconds]
Xeago has quit [Ping timeout: 276 seconds]
banister has quit [Ping timeout: 252 seconds]
nateberkopec has joined #ruby
banister_ has joined #ruby
ffranz has quit [Quit: Leaving]
Hanmac1 has joined #ruby
gorpon has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
nateberkopec has quit [Read error: No route to host]
aspires has quit []
nateberkopec has joined #ruby
brandonshowers has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
cpruitt has joined #ruby
kirun has quit [Quit: Client exiting]
mikesplain has quit [Ping timeout: 240 seconds]
angusiguess has joined #ruby
SHyx0rmZ has joined #ruby
EatMulti has quit [Quit: sleep]
banister_ has quit [Ping timeout: 252 seconds]
nateberkopec has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
onewheelskyward has left #ruby ["Textual IRC Client: www.textualapp.com"]
mengu__ has joined #ruby
aspires has joined #ruby
geggam has quit [Remote host closed the connection]
silky__ is now known as malcolmva
geggam has joined #ruby
Olipro has quit [Ping timeout: 246 seconds]
nateberkopec has joined #ruby
treehug8_ has quit []
linuxnewb2 has joined #ruby
linuxnewb2 has quit [Changing host]
linuxnewb2 has joined #ruby
wilsonfisk has left #ruby [#ruby]
mengu has quit [Ping timeout: 245 seconds]
kevind_ has joined #ruby
nemesit|znc has quit [Ping timeout: 252 seconds]
kevind_ has quit [Read error: Connection reset by peer]
kevind_ has joined #ruby
benlieb has joined #ruby
ItSANgo_ has joined #ruby
kevind has quit [Ping timeout: 258 seconds]
sambao21 has joined #ruby
kevind_ is now known as kevind
NukePuppy has quit [Ping timeout: 276 seconds]
linuxnewb2 has quit [Ping timeout: 258 seconds]
b1205 has quit [Ping timeout: 245 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lukec has quit [Quit: lukec]
mengu__ has quit [Remote host closed the connection]
<kenneth> hey
<wallerdev> hi
<kenneth> how can you let a class also be a method?
<manacit> you can call static methods on a class?
charliesome has joined #ruby
<wallerdev> name a method the same thing as your class
vpretzel_ has joined #ruby
<kenneth> i mean, for example with BSON::ObjectId, you can do id = BSON::ObjectId(blah), but ObjectId is also a class, where you can do BSON::ObjectId.new(blah)
<segfalt> you mean like Array()?
<segfalt> Array is a method in Kernel which is in the module path, as well as an Object(Class). It's weird.
<segfalt> In general, I'd say don't do it, it's confusing.
<segfalt> :)
<segfalt> URI and Nokogiri do the same thing, iirc.
<wallerdev> >> class Cool; end; def Cool(x); end; Cool.new == Cool(10)
<eval-in__> wallerdev => false (https://eval.in/156819)
<kenneth> ah, so this is valid: def SomeClass(x); SomeClass.new(x); end; class SomeClass; ...; end
<shevy> hmmm
<wallerdev> keep in mind you have to use parenthesis when calling your method if you name it uppercase though
<segfalt> kenneth: yep
<shevy> .tar.xz is much more efficient than .zip
<segfalt> shevy: oh yeah.
<segfalt> xz is pretty slick
<segfalt> high cpu though
mg^^ has joined #ruby
<shevy> hmm
<wallerdev> lzma is best compromise
<wallerdev> good compression, fast to uncompress
<segfalt> sometimes cpu use on compression is a concern
mjsmith2 has quit [Remote host closed the connection]
<segfalt> i.e. taking backups on a busy server
sinkensa_ has joined #ruby
adac has quit [Ping timeout: 264 seconds]
ItSANg___ has quit [Ping timeout: 264 seconds]
preller has quit [Ping timeout: 264 seconds]
devdazed has quit [Ping timeout: 264 seconds]
sinkensabe has quit [Remote host closed the connection]
vpretzel has quit [Ping timeout: 264 seconds]
linuxnewb2 has joined #ruby
linuxnewb2 has quit [Changing host]
linuxnewb2 has joined #ruby
Olipro has joined #ruby
slowcon has quit []
mg^ has quit [Ping timeout: 264 seconds]
dangerousdave has quit [Ping timeout: 245 seconds]
Zenigor has quit [Remote host closed the connection]
matcouto has joined #ruby
preller has joined #ruby
nemesit|znc has joined #ruby
andrewjanssen has quit [Quit: Leaving...]
orolo has quit [Quit: This computer has gone to sleep]
sinkensa_ has quit [Ping timeout: 255 seconds]
Leif has joined #ruby
bricker`work has quit [Ping timeout: 255 seconds]
dseitz has quit [Quit: dinner]
<shevy> lzma is better than .tar.xz?
vpretzel has joined #ruby
bricker`work has joined #ruby
baweaver has quit [Remote host closed the connection]
ifmw has joined #ruby
baweaver has joined #ruby
combusean has quit [Ping timeout: 258 seconds]
vpretze__ has joined #ruby
hogihung has quit []
<ifmw> Hey, i want to distribute a ruby script with all dependencies with a runtime into a nice neat package I can distribute to Windows users who don't have ruby. Any suggestions?
sambao21 has quit [Quit: Computer has gone to sleep.]
yfeldblu_ has joined #ruby
LiohAu has quit [Quit: LiohAu]
vpretzel_ has quit [Ping timeout: 258 seconds]
vpretzel_ has joined #ruby
jamto11 has quit [Remote host closed the connection]
vpretzel has quit [Ping timeout: 240 seconds]
<kenneth> segfalt wallerdev: sweet
<kenneth> i know it's usually a little confusing, but i have a valid reason to use this hack
<kenneth> here's what i just made with it, it'll save me time: https://github.com/kballenegger/block2method
baweaver has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
aspires has quit []
sambao21 has joined #ruby
vpretze__ has quit [Ping timeout: 265 seconds]
Steve21 has quit [Quit: Steve21]
nemesit|znc has quit [Ping timeout: 252 seconds]
jamto11 has joined #ruby
combusean has joined #ruby
<shevy> ifmw perhaps http://ocra.rubyforge.org/
Olipro has quit [Ping timeout: 246 seconds]
<ifmw> havenwood: but then I need to have java installed on that machine?
<benzrf> kenneth: why not just use lambda{}
<benzrf> or lambda do end
<kenneth> benzrf: you can't bind a lambda to an object
combusean has quit [Read error: Connection timed out]
<ifmw> shevy: oh that looks perfect. Will give it a go. Thanks
<benzrf> u sure
<havenwood> ifmw: true, maybe OCRA would be better
wldcordeiro_work has quit [Read error: Connection reset by peer]
<havenwood> ifmw: what shevy said
<benzrf> kenneth: theres always instance_eval/exec
vpretzel has joined #ruby
combusean has joined #ruby
aspires has joined #ruby
<kenneth> that's true
nemesit|znc has joined #ruby
asteros has quit [Quit: asteros]
<kenneth> i don't remember why i didn't use that originally… hmm
<havenwood> ifmw: or Releasy
<kenneth> 2 year old code doesn't play well with my shitty memory
<havenwood> ifmw: or cross compile mruby \o/
Shidash has quit [Quit: Leaving.]
<ifmw> Thanks for all the advice folks
freezey has quit []
yubrew has quit [Remote host closed the connection]
vpretzel_ has quit [Ping timeout: 240 seconds]
Olipro has joined #ruby
jamto11 has quit [Ping timeout: 258 seconds]
<kenneth> hmm, now it's bugging me, i don't know why i couldn't that… crap
matchaw has joined #ruby
shaunjohn has joined #ruby
<shevy> talk about Spooner
<shevy> haven't seen him in ages here
Eyess has quit [Ping timeout: 265 seconds]
shaunjohn has quit [Client Quit]
nateberkopec has quit [Quit: Leaving...]
shaunjohn has joined #ruby
mikemac has quit [Remote host closed the connection]
mikemac has joined #ruby
vpretzel has quit [Ping timeout: 264 seconds]
vpretzel_ has joined #ruby
Olipro has quit [Ping timeout: 246 seconds]
linuxnewb2 has quit [Ping timeout: 258 seconds]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
Robbo` has quit [Ping timeout: 252 seconds]
vpretzel has joined #ruby
<alsu> although it might be inadvisable, how do I extend all classes with a module?
<wallerdev> put your method inside Module
<alsu> yes, it is inside a module, but I would like to extend all classes
mary5030 has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
<alsu> instead of having to add “extend Foo” to each class definition
maletor_ has quit [Quit: Computer has gone to sleep.]
maletor has joined #ruby
vpretzel_ has quit [Ping timeout: 240 seconds]
Xeago has quit [Remote host closed the connection]
timfoo has quit [Ping timeout: 255 seconds]
yfeldblu_ has quit [Remote host closed the connection]
banister has joined #ruby
workmad3 has joined #ruby
geggam has quit [Ping timeout: 252 seconds]
qwyeth has quit [Quit: Leaving]
moneydouble has quit [Quit: Leaving.]
TwinkleHood has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<alsu> ah, “class Class; include Foo; end"
Zyprex has quit []
Es0teric has quit [Remote host closed the connection]
<wallerdev> >> module Foo; def hi; end end; class Class; include Foo; end; class Wow; end; Wow.new.hi
<eval-in__> wallerdev => undefined method `hi' for #<Wow:0x417ea0e0> (NoMethodError) ... (https://eval.in/156820)
<wallerdev> ?
<segfalt> alsu: So you could do some metaprogramming with Module#constants, but it would have to be sure to run after everything else is created.
<segfalt> There isn't a hook for 'some new class has been added to a namespace', as far as I'm aware.
<alsu> >> module Foo; def hi; end end; class Class; include Foo; end; class Wow; end; Wow.hi
<eval-in__> alsu => nil (https://eval.in/156821)
huoxito has quit [Quit: Leaving]
<wallerdev> you want a class method? lol
<alsu> remember I said extend Foo not include Foo for the “Wow” class
<wallerdev> maybe im missing the point of the exercise
<segfalt> alsu: That will modify all classes, ever.
<alsu> yup, I’m aware
<segfalt> I believe he wants to add a class method to all classes in a particular module.
<segfalt> Right?
Leif has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<segfalt> I think you'd have to iterate through Module#constants, and get that constant and do class_eval, or similar.
<segfalt> Can this problem be solved with inheritance?
<alsu> could, but typing!
<segfalt> lol
<segfalt> yeah, something with Module#constants and get_const... let me try
Retroid has quit [Ping timeout: 255 seconds]
robbyoconnor has joined #ruby
armyriad has quit [Ping timeout: 240 seconds]
Retroid has joined #ruby
sailias has quit [Quit: Leaving.]
<segfalt> Would not go into submodules, though, and probably needs a check for .is_a? Class now that I look at it.
Robbo` has joined #ruby
nateberkopec has joined #ruby
<segfalt> Then again, I think most things are classes, so maybe .class == Class
<segfalt> But that would be the idea
<banister> wallerdev Woo.hi
<banister> >> module Foo; def hi; end end; class Class; include Foo; end; class Wow; end; Wow.hi
<eval-in__> banister => nil (https://eval.in/156822)
kaspergrubbe has joined #ruby
oponder has joined #ruby
<wallerdev> lol
fluve has joined #ruby
s00pcan has joined #ruby
armyriad has joined #ruby
kaspergr_ has quit [Ping timeout: 252 seconds]
debajit has quit [Quit: Leaving...]
mijicd_ has quit [Quit: leaving]
dik_dak has quit [Quit: Leaving]
moritzs has quit [Ping timeout: 265 seconds]
yfeldblum has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
armyriad has quit [Ping timeout: 255 seconds]
enebo has quit [Quit: enebo]
armyriad has joined #ruby
baroquebobcat has joined #ruby
kpshek has quit []
mercerist has quit [Quit: Computer has gone to sleep.]
s00pcan has quit [Ping timeout: 245 seconds]
aspires has quit []
aspires has joined #ruby
Toger has quit [Read error: Connection reset by peer]
subbyyy has quit [Read error: Connection reset by peer]
Virtualize|away has quit [Quit: Leaving...]
subbyyy has joined #ruby
kbv has quit [Ping timeout: 276 seconds]
einarj has quit [Remote host closed the connection]
VinDH has quit [Remote host closed the connection]
kitak has quit [Remote host closed the connection]
cjbottaro has joined #ruby
kitak has joined #ruby
Hobogrammer has quit [Read error: Connection reset by peer]
VinDH has joined #ruby
bmurt has joined #ruby
sdwrage has joined #ruby
bmurt has quit [Client Quit]
kitak has quit [Ping timeout: 240 seconds]
Hobogrammer has joined #ruby
Xeago has joined #ruby
bmurt has joined #ruby
hermanmunster has quit [Remote host closed the connection]
hermanmunster has joined #ruby
banister has quit [Ping timeout: 240 seconds]
arrubin has quit [Quit: Keep firing, assholes!]
feature_creep has joined #ruby
debajit has joined #ruby
kitak has joined #ruby
Xeago has quit [Ping timeout: 252 seconds]
bthesorceror has joined #ruby
subbyyy_ has joined #ruby
hermanmunster has quit [Ping timeout: 258 seconds]
brasten has joined #ruby
spastorino has quit [Quit: Connection closed for inactivity]
subbyyy has quit [Ping timeout: 245 seconds]
andrewjanssen has joined #ruby
combusean has quit [Ping timeout: 255 seconds]
robbyoconnor has quit [Quit: Konversation terminated!]
bthesorceror has quit [Read error: Connection reset by peer]
ghr has quit [Ping timeout: 252 seconds]
tjr9898_ has quit [Remote host closed the connection]
gancl has quit [Ping timeout: 252 seconds]
andrewjanssen has quit [Quit: Leaving...]
saarinen has quit [Quit: saarinen]
Squarepy has quit [Quit: Leaving]
thisirs has quit [Read error: Connection reset by peer]
VTLob has quit [Quit: VTLob]
jgrevich_ has joined #ruby
Rollabunna has joined #ruby
xilefkfelix has quit [Remote host closed the connection]
echevemaster has joined #ruby
echevemaster has quit [Changing host]
echevemaster has joined #ruby
predator217 has joined #ruby
nateberkopec has quit [Quit: Leaving...]
lmickh has quit [Remote host closed the connection]
Rollabunna has quit [Ping timeout: 245 seconds]
mehlah has joined #ruby
predator117 has quit [Ping timeout: 245 seconds]
andrewjanssen has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
brasten has quit [Quit: brasten]
kitak has quit [Remote host closed the connection]
MrJoshua has joined #ruby
kitak has joined #ruby
matchaw has quit [Ping timeout: 258 seconds]
freerobby has joined #ruby
zorak has quit [Ping timeout: 245 seconds]
lagweezle has joined #ruby
andrewjanssen has quit [Client Quit]
<Freddan962> Has anyone here bought the "Working with TCP sockets" book from Jessie Stormer?
chrisja has quit [Quit: leaving]
diegoviola has quit [Remote host closed the connection]
cpruitt has quit [Quit: cpruitt]
benlieb has joined #ruby
brasten has joined #ruby
sailias has joined #ruby
nateberkopec has joined #ruby
akonny has quit [Quit: akonny]
simono has joined #ruby
nicholas040 has quit [Quit: Textual IRC Client: www.textualapp.com]
akonny has joined #ruby
<bmurt> hey all, how would you guys recommend handling a web scraper that has multiple xpath items to grab?
j_mcnally has quit [Ping timeout: 258 seconds]
lyuzashi has joined #ruby
andrewlio has quit [Remote host closed the connection]
omosoj has quit [Ping timeout: 252 seconds]
hermanmunster has joined #ruby
aspires has quit []
cashnguns has joined #ruby
testcore has quit [Quit: bong timeout]
<havenwood> bmurt: mechanize gem
nateberkopec has quit [Quit: Leaving...]
<bmurt> i have that
<apeiros> famous "hey guys, who'd you write a video game?" question
<bmurt> im not sure if i should just do multiple blah = html_doc.xpath("...")
<bmurt> for each entry then output
<bmurt> seems repetitive
<apeiros> for repetitive things, methods were invented with parameters for the variable parts
<wallerdev> and loops
aspires has joined #ruby
<bmurt> as a start, that was from an example now im trying to build off of that
brandonjmckay has quit [Quit: Leaving.]
<bmurt> hmm
<wallerdev> css selctors
<bmurt> why would you recommend using css selectors vs xpath?
brasten has quit [Quit: brasten]
kenneth has quit [Ping timeout: 265 seconds]
amclain has joined #ruby
yvemath has quit [Excess Flood]
mikecmpbll has quit [Quit: i've nodded off.]
GriffinHeart has joined #ruby
<wallerdev> because xpath is ugly
<wallerdev> and no one knows it
<wallerdev> css selectors are basically made for working with html
<bmurt> gotcha
<shevy> hmm
<shevy> "string".chop
<shevy> that works on right side, is there a method for left side as well?
kenneth has joined #ruby
kitak_ has joined #ruby
andrewjanssen has joined #ruby
akonny has quit [Quit: akonny]
snath has quit [Ping timeout: 276 seconds]
lethjakman has quit [Ping timeout: 255 seconds]
emphaticjester has joined #ruby
GriffinHeart has quit [Ping timeout: 264 seconds]
omosoj has joined #ruby
orolo has joined #ruby
eka_ has quit [Quit: My computer has gone to sleep. ZZZzzz…]
lethe has joined #ruby
JokerDoom has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
<apeiros> wallerdev: xpath are more powerful, though
chrisseaton has joined #ruby
gilest has joined #ruby
Trynemjoel has quit [Quit: Trynemjoel]
kevind has quit [Quit: kevind]
sunya7a has quit [Ping timeout: 240 seconds]
Bira has joined #ruby
IceDragon has quit [Ping timeout: 245 seconds]
einarj has joined #ruby
IceDragon has joined #ruby
sunya7a_ has quit [Ping timeout: 252 seconds]
lethe has quit [Ping timeout: 258 seconds]
sski has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
Gadgetoid has quit [Ping timeout: 252 seconds]
sunya7a has joined #ruby
<wallerdev> right tool for the job :p
<ashp> This is a pretty long shot but is anyone in here super experienced with vcr, for testing?
sunya7a_ has joined #ruby
simono has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
snath has joined #ruby
lw has quit [Quit: s]