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?
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
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]
<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}" }
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]
<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
<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]
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
<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 @?
<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
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
<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)
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?
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.
<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)
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]
<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
<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
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]
<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¤t(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…]
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.
<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
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]
<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...
<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
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
<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.
<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.
<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?
<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
<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.
<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…]
<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.
<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