havenn_ has quit [Remote host closed the connection]
codemonkey010101 has joined #ruby
iMadper has joined #ruby
mootpointer has joined #ruby
<mustermark>
Can you not reference local variables as defaults in constructors?
<mustermark>
it's ruby 1.8 fwiw
bean has joined #ruby
igaiga has joined #ruby
Banistergalaxy has quit [Ping timeout: 256 seconds]
zac_o_0 has quit [Quit: Lost terminal]
codemonkey010101 has quit [Remote host closed the connection]
dankest has joined #ruby
zeeraw has quit [Quit: Computer has gone to sleep.]
robert_ has joined #ruby
robert_ has quit [Changing host]
robert_ has joined #ruby
miskander has quit [Quit: miskander]
Astral__ has joined #ruby
<rcsheets>
i am trying to get started with zeromq on ruby using the examples at https://github.com/andrewvc/learn-ruby-zeromq but i can't seem to get the library to load. ruby says "Unable to load this gem. The libzmq library exists, but cannot be loaded." and then offers some helpful suggestions for Windows. I'm on Linux.
<mustermark>
i can't even do something like defaulting the argument to nil and build||=default_build'ing int
w|t has joined #ruby
w|t has quit [Changing host]
w|t has joined #ruby
rickruby has quit [Remote host closed the connection]
crocket has joined #ruby
codemonkey010101 has joined #ruby
<crocket>
rcsheets, Did you get an answer?
Astral_ has quit [Ping timeout: 256 seconds]
jbueza has left #ruby [#ruby]
havenwood has joined #ruby
sleetdrop has joined #ruby
hiyakashi has quit [Quit: お前は知りすぎた]
Lubinski has quit [Read error: Connection reset by peer]
r0bby has quit [Ping timeout: 256 seconds]
pevjan has quit [Remote host closed the connection]
Michael_ has quit [Remote host closed the connection]
<rcsheets>
crocket: not so far.
Michael_ has joined #ruby
jeebster1 has joined #ruby
havenwood has quit [Remote host closed the connection]
bradhe has joined #ruby
ixti has quit [Quit: WeeChat 0.4.0]
Nisstyre-laptop has quit [Quit: Leaving]
wallerdev has joined #ruby
codemonkey010101 has quit [Remote host closed the connection]
Michael_ has quit [Remote host closed the connection]
Michael_ has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
robustus has quit [Ping timeout: 248 seconds]
Michael_ has quit [Remote host closed the connection]
banister`tv is now known as banisterfiend
jimg has quit [Remote host closed the connection]
Michael_ has joined #ruby
<rcsheets>
seriously, $" is a thing? what is this, perl? ;-)
Alysum has left #ruby [#ruby]
robustus has joined #ruby
zac_o_0 has joined #ruby
Davey has quit [Ping timeout: 264 seconds]
guns has joined #ruby
timkohrumel has quit [Remote host closed the connection]
bigkm has quit [Quit: Computer has gone to sleep.]
Michael_ has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
io_syl has joined #ruby
Michael_ has joined #ruby
io_syl has joined #ruby
io_syl has quit [Changing host]
<rcsheets>
so i kinda get the impression from looking at the source (libzmq.rb) that ffi_lib is what's throwing LoadError
arya has quit [Ping timeout: 248 seconds]
eka has quit [Quit: Computer has gone to sleep.]
zeade has quit [Quit: Leaving.]
<rcsheets>
i'm not clear on how ffi_lib can fail though, or how to learn more about how it is failing
milestone_ has joined #ruby
<crocket>
rcsheets, What is ffi_lib?
ttt has joined #ruby
havenwood has quit [Remote host closed the connection]
freerobby has joined #ruby
milestone has quit [Ping timeout: 264 seconds]
milestone_ is now known as milestone
arya has joined #ruby
<rcsheets>
crocket: it seems to be the function that's being called that's supposed to be loading the shared object so something can make calls? i think?
<rcsheets>
before i added the right lib path to my $PATH, it said it couldn't find the library at all. now it says it can, but that it "cannot be loaded", a message that's being printed inside the LoadError rescue
mmitchell has quit [Remote host closed the connection]
d11wtq has joined #ruby
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
nettoweb_ has joined #ruby
pevjan has joined #ruby
<crocket>
meh
chrisja has quit [Quit: leaving]
t6d_ has joined #ruby
<rcsheets>
crocket: do you think i should be looking at a require and not at this ffi_lib thing? i could be wrong. i really don't know what i'm doing :-\
t6d has quit [Ping timeout: 264 seconds]
t6d_ is now known as t6d
nettoweb_ has quit [Client Quit]
nettoweb has joined #ruby
igaiga has quit [Remote host closed the connection]
<bnagy>
rcsheets: yay that's my error
<bnagy>
guess I should have made it clearer :(
<bnagy>
basically it sounds like you haven't installed libzmq
<bnagy>
like you need to install the C lib before the FFI stuff will work
Michael_ has quit [Remote host closed the connection]
<rcsheets>
i think that i have though
<bnagy>
maybe it's not in path?
<rcsheets>
when its lib directory wasn't in my path, i got a slightly different error
<rcsheets>
now that i've added it to my path, i get the "The libzmq library exists, but cannot be loaded." one
<bnagy>
OK, maybe some weird version thing? Wrong arch?
love_color_text has quit [Remote host closed the connection]
Michael_ has joined #ruby
<rcsheets>
ldd seems pretty happy with the so file
<bnagy>
that error is from me on Windows when I copied a 32 bit dll by accident on a 64 bit system and it was saying library not found
sailias has joined #ruby
<rcsheets>
oh, i wonder if this is some redhat-ism and it wants the lib dir to be called lib64? i guess i could try that.
Davey has joined #ruby
<rcsheets>
nope, that didn't help
botorosa has joined #ruby
botorosa has quit [Quit: ChatZilla 0.9.90 [Firefox 20.0/20130329030848]]
<bnagy>
weird
<bnagy>
how did you install libzmq?
akashj87_ has joined #ruby
bigkm has joined #ruby
<rcsheets>
downloaded zeromq-3.2.3.tar.gz, untarred it, ran configure with --prefix=/local/zeromq-3.2.3, make, make install
<bnagy>
is only using ZMQ_LIB_PATHS and inside_gem
akashj87 has quit [Client Quit]
<rcsheets>
yeah, local_path doesn't show up after that does it?
lathiat has joined #ruby
<rcsheets>
the rescue looks at it
<rcsheets>
but the ffi_lib call doesn't
<bnagy>
basically that error message is really just for windows... I think it needs to be rewritten
<bnagy>
my bad :(
<lathiat>
Hi Folks.. I was wondering if anyone knew of a guide for writing Gems.. trying to write an API for a third party site.. trying to copy things like a global config block but was wondering if there was a nice reference somewhere to a 'good' way to do it.
<rcsheets>
i was thinking it might make sense to wrap the error message in an if FFI::Platform::IS_WINDOWS
<rcsheets>
bnagy: no worries :)
<bnagy>
on windows it will find the lib by magic if it is in your path
<bnagy>
anyway, try the ext directory
<rcsheets>
ok
Kabaka has joined #ruby
mockra has joined #ruby
<rcsheets>
that would be the ext directory under my ruby's site_ruby/1.9.1/rubygems, or..?
<bnagy>
yeah where the gem is installed
Dummies_freelanc has joined #ruby
nhhagen has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
moos3 has quit [Quit: Computer has gone to sleep.]
ariedler has quit [Remote host closed the connection]
bubblehead has quit [Remote host closed the connection]
wroathe has joined #ruby
Mon_Ouie has quit [Ping timeout: 252 seconds]
bubblehead has joined #ruby
jeebster1 has quit [Read error: Operation timed out]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
<rcsheets>
k
timkohrumel has joined #ruby
jeebster has joined #ruby
<rcsheets>
bnagy: that worked! thank you!
mustermark has quit [Ping timeout: 252 seconds]
<bnagy>
no probs. That LoadError needs patching. Again. :(
Dummies_freelanc has quit [Quit: Leaving.]
miskander has joined #ruby
rakl has quit [Quit: sleeping]
krz has joined #ruby
brunoro has joined #ruby
wroathe has quit [Ping timeout: 256 seconds]
<bnagy>
rcsheets: just by the way, why are you working with zmq?
robottinosino has quit [Ping timeout: 256 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
chrishough has quit [Quit: chrishough]
mockra has quit [Remote host closed the connection]
havenwood has joined #ruby
fitsos has joined #ruby
fitsos has left #ruby [#ruby]
Sicilians has joined #ruby
<Sicilians>
Heyo, does anyone have any resources about getting started with writing good business rules/logic that they could point me to? I guess resources about writing good technical requirements couldn't hurt to buff up on either.
arthurstomp has quit [Ping timeout: 256 seconds]
mikepack has joined #ruby
timkohrumel has quit [Remote host closed the connection]
<rcsheets>
bnagy: I was looking for a way for a web application to talk to another not-yet-written process that might be local or across a WAN, and i was going to try zmq to see if it's suitable
brunoro has quit [Read error: Connection reset by peer]
<bnagy>
ok. I liked it, but it's a bit of a pig to work with from Ruby, and I think the main devs have left, again
<bnagy>
really nice patterns though
<rcsheets>
oh :-\
splittingred has joined #ruby
<bnagy>
I think crossroads.io is his new thing
benlieb has quit [Quit: benlieb]
Ortuna has quit [Quit: Computer has gone to sleep.]
evanlivi1gston has joined #ruby
Nisstyre-laptop has joined #ruby
chrishough has joined #ruby
chrishough has quit [Client Quit]
<rcsheets>
well i'm not really looking for something new and shiny. i just want it to work. is there something i should look at rather than zeromq? i would kinda just like something that lets me ignore some details of socket programming, mostly.
nettoweb has quit [Quit: nettoweb]
vlad_starkov has joined #ruby
<bnagy>
broad topic :/
<bnagy>
AMQP? A work queue? ( beanstalkd, resque, sidekiq ... )
<rcsheets>
certainly
<bnagy>
I am happy with AMQP, but for 1:1 stuff I'd use a Queue abstraction
r0bby has joined #ruby
<rcsheets>
it needs to move a lot of data around, and i'd prefer fewer moving parts. i would rather not have a central broker.
<bnagy>
depends on what behaviour you're modelling
<rcsheets>
i am, however, not all that familiar with all that's out there
vlad_starkov has quit [Ping timeout: 246 seconds]
<Quadlex>
rcsheets: How important is being lossless?
jeebster has quit [Ping timeout: 248 seconds]
<rcsheets>
i can retry sends if i know they've failed, but it absolutely can't ever silently lose data
<Quadlex>
I personally feel that central brokers are better for that
saarinen has joined #ruby
<Quadlex>
Yes, there's another moving part, but it's a part whose sole responsibility is to safely move data
r0bby_ has joined #ruby
<bnagy>
I'd go work-queue
<rcsheets>
the thing about that is that my use case is very distributed
jeebster has joined #ruby
<rcsheets>
someone in europe might need data from europe, or they might need data from east asia, or either coast of the US. where would i put a central broker if all the data has to flow through it?
rickruby has joined #ruby
<bnagy>
ok sounds too complex to talk about without all the details
Leighton has joined #ruby
<bnagy>
I would read the 0mq guide ( which is excellent ) and make sure you see a pattern there that makes sense for you, before you start
<rcsheets>
yeah, probably. so what i really want to know is whether i should avoid checking out zeromq because, as you've mentioned, the developers may have left?
Beoran__ has quit [Ping timeout: 252 seconds]
<bnagy>
afaik it's still 'live'
<rcsheets>
yeah i was trying to try it before committing, but then i couldn't load the module. so that's why i'm here.
<bnagy>
there's a pretty helpful channel as long as you don't ask stupid questions and you read the guide first
r0bby has quit [Ping timeout: 256 seconds]
mockra has joined #ruby
<Quadlex>
I like amqp because it can be very flexible
<Quadlex>
I think you can distribute
<rcsheets>
sure. i don't think my question was stupid...
<Quadlex>
not sure
<bnagy>
I tarcieri is still using it for dcell
<bnagy>
rcsheets: didn't say it was
<crocket>
rcsheets, Did you solve the problem?
<rcsheets>
crocket: yes, now it loads.
<crocket>
rcsheets, How did you solve it?
<rcsheets>
crocket: by symlinking the library into the ext directory of the installed gem.
<crocket>
rcsheets, Is it the only way?
<crocket>
bnagy, What is the appropriate way?
<rcsheets>
crocket: it's the only way I solved it. :)
pcarrier_ has quit [Ping timeout: 256 seconds]
jeebster has quit [Read error: Connection reset by peer]
jeebster has joined #ruby
fschuindt has joined #ruby
undersc0re97 has quit [Quit: WeeChat 0.4.0]
<bnagy>
appropriate way to what?
<rcsheets>
bnagy suggested copying the library. i didn't want to copy it if i could symlink instead.
<crocket>
bnagy, load libzmq
<rcsheets>
so i tried symlinking and it worked
<bnagy>
oh, it was just not in one of the 'approved' paths
<bnagy>
I have no opinion regarding copying vs symlinking
jeebster has quit [Read error: Connection reset by peer]
<bnagy>
the ext dir is there so you can test different libzmq versions without upgrading / downgrading system versions
<rcsheets>
to me, the symlink has the advantage of avoiding the later question "where did this library come from?"
cpruitt has quit [Quit: cpruitt]
havenwood has quit [Remote host closed the connection]
superscott[8] has joined #ruby
<crocket>
bnagy, What are approved paths?
jeebster1 has joined #ruby
pcarrier_ has joined #ruby
<bnagy>
the ones in the source :) standardish unix lib paths
rickruby has quit [Ping timeout: 248 seconds]
<crocket>
the ones in the source?
<crocket>
ext isn't standard.
graydot has joined #ruby
mikepack has quit [Remote host closed the connection]
<rcsheets>
i don't know if that's the canonical repository, but the list matches the list in the gem i'm using
mockra has quit [Remote host closed the connection]
<SirFunk_>
oh boy.. I have to pair program with someone running windows tomorrow who is new to ruby
<SirFunk_>
this is going to be a mess
zac_o_0 has quit [Quit: Lost terminal]
<crocket>
SirFunk_, What's wrong?
<SirFunk_>
crocket: well. I don't know what to use to pair. I doubt he's got tmux installed
<crocket>
SirFunk_, What does tmux have to do with ruby?
<SirFunk_>
pair programming
<SirFunk_>
remote pair programming
<crocket>
SirFunk_, ok
<crocket>
SirFunk_, He should use your tmux.
<crocket>
SirFunk_, Why don't you install an IDE instead?
undersc0re97 has joined #ruby
<SirFunk_>
crocket: oh yeah, i suppose that'll work
mmitchell has joined #ruby
<SirFunk_>
crocket: do you know any good ide's for pairing?
<crocket>
SirFunk_, Any IDE is better than tmux for paring.
<crocket>
You need a good IDE for ruby.
<bnagy>
wtf
<SirFunk_>
i never use an IDE for ruby
<bnagy>
virtually nobody uses an IDE for ruby
<SirFunk_>
haha
MrPoT4tO has joined #ruby
<breakingthings>
who even ide
chimkan has joined #ruby
<bnagy>
SirFunk_: just have them ssh from windows into some box and share screen or tmux or whatever
a_a_g has quit [Quit: Leaving.]
<SirFunk_>
bnagy: yeah, i'll do that. I need to find a good way to screen share too though. I want to set them up with a vagrant setup so they can develop on their windows machine too
mmitchell has quit [Ping timeout: 256 seconds]
<bnagy>
imvho screen -x > tmux because you can each be in different screens
<bnagy>
getting git working on windows is a PITA :(
<SirFunk_>
yeah well they can git from the VM
<bnagy>
happily, ST2 looks the same on win / osx / linux
<bnagy>
assuming that they're not up to vim
<crocket>
SirFunk_, What about eclipse ruby plugin?
generalissimo has joined #ruby
brandon_ has quit [Ping timeout: 264 seconds]
<bnagy>
XD
<SirFunk_>
crocket: *barf*
<crocket>
bnagy, getting git working on windows is not difficult.
cofin has joined #ruby
<bnagy>
crocket: maybe not for an obvious hotshot like you
<bnagy>
you're clearly on top of this whole ruby game
Opettaja has joined #ruby
<crocket>
bnagy, What's your issue with git on windows?
<crocket>
unicode?
Opettaja has quit [Client Quit]
wroathe has joined #ruby
<bnagy>
ssh
seoaqua has joined #ruby
r0bby_ has quit [Excess Flood]
Opettaja has joined #ruby
r0bby_ has joined #ruby
pppaul has quit [Quit: Computer has gone to sleep.]
Michael_ has joined #ruby
dustmason has quit [Ping timeout: 252 seconds]
waxjar has quit [Ping timeout: 260 seconds]
mockra has joined #ruby
darkapex has quit [Ping timeout: 245 seconds]
undersc0re97 has quit [Quit: WeeChat 0.4.0]
guns has quit [Ping timeout: 252 seconds]
Nisstyre-laptop has quit [Ping timeout: 256 seconds]
neataroni has joined #ruby
jeebster1 has quit [Ping timeout: 246 seconds]
pppaul has joined #ruby
ukd1 has joined #ruby
Michael_ has quit [Ping timeout: 256 seconds]
cofin has quit [Quit: cofin]
agjacome has quit [Quit: leaving]
darkapex has joined #ruby
undersc0re97 has joined #ruby
jamesfung14 has quit [Ping timeout: 252 seconds]
waxjar has joined #ruby
mklappstuhl has joined #ruby
sambao21 has joined #ruby
echevemaster has joined #ruby
echevemaster has quit [Changing host]
echevemaster has joined #ruby
jeebster has joined #ruby
johnnyfuchs has quit [Remote host closed the connection]
apeiros has quit [Read error: Connection reset by peer]
<superscott[8]>
more or less
apeiros has joined #ruby
allure has quit [Quit: Saindo]
arya has quit [Ping timeout: 248 seconds]
undersc0re97 has joined #ruby
breakingthings has quit [Quit: breakingthings]
sayan has quit [Ping timeout: 252 seconds]
rippa has joined #ruby
tagrudev has joined #ruby
w|t has quit [Quit: Computer has gone to sleep.]
lyanchih has joined #ruby
compgeek812 has joined #ruby
AlHafoudh has quit [Quit: Computer has gone to sleep.]
ananthakumaran has quit [Quit: Leaving.]
aganov has joined #ruby
timonv has quit [Remote host closed the connection]
pevjan has quit [Remote host closed the connection]
r0bby_ has quit [Max SendQ exceeded]
r0bby_ has joined #ruby
travisjeffery has quit [Ping timeout: 248 seconds]
DanKnox_away is now known as DanKnox
rakl has quit [Quit: sleeping]
apeiros has quit [Remote host closed the connection]
cantonic_ has joined #ruby
cantonic_ has quit [Remote host closed the connection]
<_erroric>
If I plan to use ruby for mostly sysadminy scripts, would I need to go about figuring RVM? I know RVM is environment control, would that be necessary for just scripts?
w|t has joined #ruby
cantonic has quit [Ping timeout: 256 seconds]
fschuindt has joined #ruby
Es0teric has quit [Ping timeout: 256 seconds]
solrize has quit [Ping timeout: 276 seconds]
tylersmith has quit [Remote host closed the connection]
<superscott[8]>
_erroric: necessary? not really. highly advisable? yes.
<superscott[8]>
there's not much to figure out honestly.
banisterfiend has quit [Remote host closed the connection]
<_erroric>
yeah, i read the perks of using it with rails
newUser1234 has quit [Remote host closed the connection]
timonv has joined #ruby
rakl has joined #ruby
<superscott[8]>
but like lets say if you wrote all your scripts in 1.9.3, then something really cool came out in 2.0 that you wanted to use.
<superscott[8]>
then you could script out which version of ruby you're using inside each one of your scripts, and then not have to worry about re-writing everything
robscomputer has quit [Remote host closed the connection]
ehaliewicz has quit [Ping timeout: 256 seconds]
robscomputer has joined #ruby
<_erroric>
touche
<_erroric>
thanks superscott[8] !
<superscott[8]>
four shizzle my nizzle
bradhe has joined #ruby
superscott[8] has quit [Quit: superscott[8]]
marcdel has quit [Ping timeout: 276 seconds]
pevjan has joined #ruby
marcdel has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
evanlivi1gston has quit [Quit: Lost terminal]
rakl has quit [Quit: sleeping]
apes has quit [Ping timeout: 245 seconds]
marcdel_ has joined #ruby
salmonax has quit []
jarray52 has left #ruby [#ruby]
threesome has joined #ruby
w|t has quit [Quit: Computer has gone to sleep.]
grobb has joined #ruby
mattbl has joined #ruby
davetherat has quit [Read error: Connection reset by peer]
davetherat has joined #ruby
marcdel has quit [Ping timeout: 256 seconds]
mockra has quit [Remote host closed the connection]
andikr has joined #ruby
johnrlive has joined #ruby
ananthakumaran has joined #ruby
lyanchih has quit [Ping timeout: 260 seconds]
lyanchih has joined #ruby
DanKnox is now known as DanKnox_away
allure has joined #ruby
allure has quit [Changing host]
allure has joined #ruby
ayaz has joined #ruby
salmonax has joined #ruby
Elhu has joined #ruby
saarinen has quit [Quit: saarinen]
tjbiddle_ has joined #ruby
johnrlive has quit [Ping timeout: 252 seconds]
DanKnox_away is now known as DanKnox
arturaz has joined #ruby
Animawish has quit [Quit: Animawish]
Opettaja has quit [Quit: WeeChat 0.4.0]
wroathe has joined #ruby
robottinosino has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
tjbiddle has quit [Ping timeout: 256 seconds]
tjbiddle_ is now known as tjbiddle
saarinen has joined #ruby
persand has joined #ruby
apeiros has joined #ruby
pen has joined #ruby
wroathe has quit [Ping timeout: 256 seconds]
ananthakumaran has quit [Quit: Leaving.]
ananthakumaran has joined #ruby
dormiens has quit [Ping timeout: 245 seconds]
Hanmac has quit [Quit: Leaving.]
mafolz has joined #ruby
dormiens has joined #ruby
gstamp has quit [Quit: Computer has gone to sleep.]
tonini has quit [Ping timeout: 248 seconds]
w|t has joined #ruby
w|t has quit [Client Quit]
kil0byte has joined #ruby
bricker`LA has joined #ruby
tonini has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
lyanchih has quit [Quit: lyanchih]
casheew has quit [Read error: Connection reset by peer]
lyanchih has joined #ruby
bigkm has quit [Remote host closed the connection]
ebouchut has quit [Quit: This computer has gone to sleep]
Randomage2 has quit [Ping timeout: 245 seconds]
casheew has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
rippa has quit [Ping timeout: 240 seconds]
blacktulip has joined #ruby
salmonax has left #ruby [#ruby]
slash_nick has quit [Ping timeout: 252 seconds]
jprovazn has joined #ruby
threesome has quit [Ping timeout: 248 seconds]
stoic_squirrel has joined #ruby
Randomage has joined #ruby
BSaboia has joined #ruby
TheSpectre has joined #ruby
pduin has joined #ruby
compgeek812 has quit [Ping timeout: 264 seconds]
mercwithamouth has quit [Ping timeout: 246 seconds]
Hanmac has joined #ruby
compgeek812 has joined #ruby
dmiller has quit [Remote host closed the connection]
TheSpectre has quit [Quit: leaving]
Nuck has quit [Quit: Nuck Off]
w|t has joined #ruby
bradhe has quit [Remote host closed the connection]
Bracki has quit [Remote host closed the connection]
TheSpectre has joined #ruby
JohnBat26 has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
DanKnox is now known as DanKnox_away
pevjan has quit [Remote host closed the connection]
compgeek812 has quit [Ping timeout: 256 seconds]
dhruvasagar has joined #ruby
fivetwentysix has joined #ruby
haxrbyte has joined #ruby
solrize has joined #ruby
atzkey has joined #ruby
ct_ has joined #ruby
w|t has quit [Quit: Computer has gone to sleep.]
tylersmith has joined #ruby
gstamp has joined #ruby
teclator has quit [Ping timeout: 248 seconds]
Nuck has joined #ruby
greenarrow has quit [Read error: Connection reset by peer]
ct_ has quit [Quit: ct_]
greenarrow has joined #ruby
schaerli has joined #ruby
rudi has quit [Ping timeout: 256 seconds]
ct_ has joined #ruby
ct_ has quit [Client Quit]
altamic has joined #ruby
altamic has quit [Changing host]
altamic has joined #ruby
ct_ has joined #ruby
marcdel_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tylersmith has quit [Ping timeout: 248 seconds]
ct_ has quit [Client Quit]
nomenkun has quit [Remote host closed the connection]
nomenkun has joined #ruby
nomenkun has quit [Remote host closed the connection]
haxrbyte has quit [Remote host closed the connection]
t6d has quit [Quit: t6d]
haxrbyte has joined #ruby
johnrlive has joined #ruby
hidalgo has joined #ruby
w|t has joined #ruby
codesoda has quit [Remote host closed the connection]
tonini has quit [Ping timeout: 248 seconds]
jbpros has joined #ruby
johnrlive has quit [Ping timeout: 252 seconds]
wroathe has joined #ruby
w|t has quit [Client Quit]
veer has quit [Read error: Connection reset by peer]
arya has joined #ruby
persand has quit [Quit: persand]
Al_ has joined #ruby
bricker`LA has quit [Read error: Connection reset by peer]
h8R has joined #ruby
wroathe has quit [Ping timeout: 276 seconds]
bradhe has joined #ruby
shevy has left #ruby [#ruby]
weems has quit [Ping timeout: 256 seconds]
threesome has joined #ruby
cj3kim has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 248 seconds]
cj3kim has joined #ruby
bricker`LA has joined #ruby
w|t has joined #ruby
rton has joined #ruby
compgeek812 has joined #ruby
tonini has joined #ruby
arya has quit [Ping timeout: 248 seconds]
mklappstuhl has joined #ruby
t6d has joined #ruby
jimg has quit [Remote host closed the connection]
jimg has joined #ruby
arya has joined #ruby
hamed_r has joined #ruby
persand has joined #ruby
teclator has joined #ruby
hidalgo has quit [Quit: Leaving]
rakl has joined #ruby
hamed_r has quit [Remote host closed the connection]
jimg has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
Kar- has joined #ruby
tonini has quit [Quit: Lost terminal]
danslo has joined #ruby
tonini has joined #ruby
adambeynon has joined #ruby
grn has joined #ruby
BSaboia has quit [Ping timeout: 256 seconds]
pi3r has joined #ruby
Coffers has joined #ruby
mad_hatter_ has joined #ruby
arya has quit [Ping timeout: 248 seconds]
rdark has joined #ruby
novato has joined #ruby
senayar has joined #ruby
novato has left #ruby [#ruby]
bricker`1A has joined #ruby
Morrolan has quit [Ping timeout: 264 seconds]
cj3kim has quit [Remote host closed the connection]
arya has joined #ruby
cj3kim has joined #ruby
nomenkun has joined #ruby
Elhu has joined #ruby
bricker`LA has quit [Ping timeout: 256 seconds]
dawkirst has quit [Ping timeout: 248 seconds]
compgeek812 has quit [Read error: Connection reset by peer]
DonVitoC- has quit [Ping timeout: 256 seconds]
cj3kim has quit [Ping timeout: 256 seconds]
the_hack has joined #ruby
mad_hatter_ has quit [Ping timeout: 276 seconds]
ephemerian has joined #ruby
swex has quit [Ping timeout: 256 seconds]
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
elaptics`away is now known as elaptics
zeel has joined #ruby
monkegjinni has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
blueOxigen has quit [Ping timeout: 245 seconds]
DonVitoCorleone has joined #ruby
troessner_ has joined #ruby
joast has quit [Ping timeout: 264 seconds]
johnrlive has joined #ruby
umren has joined #ruby
lkba has quit [Ping timeout: 252 seconds]
lupine has quit [Read error: Connection reset by peer]
dawkirst has joined #ruby
zeel has quit [Client Quit]
niceguyjames has joined #ruby
zeel has joined #ruby
_bart has quit [Quit: _bart]
_cheney2 has quit [Read error: Connection reset by peer]
solrize has quit [Ping timeout: 264 seconds]
johnrlive has quit [Ping timeout: 252 seconds]
b0oh has joined #ruby
slainer68 has joined #ruby
wroathe has joined #ruby
saarinen has quit [Quit: saarinen]
hamed_r has joined #ruby
mad_hatter_ has joined #ruby
fschuindt has quit [Quit: Computer has gone to sleep.]
Morrolan has joined #ruby
mootpointer has quit [Quit: Computer has gone to sleep.]
wroathe has quit [Ping timeout: 256 seconds]
hamed_r has quit [Ping timeout: 256 seconds]
hamed_r has joined #ruby
d11wtq has quit [Ping timeout: 252 seconds]
bradhe has joined #ruby
BSaboia has joined #ruby
mklappstuhl has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
companion has quit [Read error: Operation timed out]
monkegjinni has joined #ruby
cj3kim has joined #ruby
hamed_r has quit [Ping timeout: 256 seconds]
marr has joined #ruby
gommo has joined #ruby
bradhe has quit [Ping timeout: 256 seconds]
rickruby has quit [Remote host closed the connection]
camilasan has joined #ruby
r0bglees0n has joined #ruby
lupine has joined #ruby
noop_ has quit [Ping timeout: 264 seconds]
companion has joined #ruby
Macaveli has joined #ruby
timmow has joined #ruby
timmow has quit [Read error: Connection reset by peer]
timmow has joined #ruby
noname001 has joined #ruby
browndawg has joined #ruby
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
jgrevich has quit [Remote host closed the connection]
<Macaveli>
Anyone familiar with Net::HTTP ?
cj3kim has quit [Ping timeout: 256 seconds]
niceguyjames has quit [Quit: Computer has gone to sleep.]
arya has quit [Ping timeout: 248 seconds]
TJNII has quit [Read error: Connection reset by peer]
TJNII has joined #ruby
yugui_ is now known as yugui_zzz
emergion has joined #ruby
snuglepuss has quit [Remote host closed the connection]
emergion has quit [Quit: Computer has gone to sleep.]
<lolmaus>
I would like to get my hands into someone's gem code. I clone it from GitHub and require from my app like this: `require '../github/lib/github_api'`. But the gem itself requires its files like this `require 'github_api/version'` which fails. How do i do it right?
BizarreCake has quit [Quit: Leaving]
persand has quit [Quit: persand]
<lolmaus>
I tried modifying `require 'github_api/version'` into `require './github_api/version'` but it still fails (no such file)
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
<waxjar>
either run ruby with the -I flag, put the folder the gem is in in the load path or use require_relative
tk_ has joined #ruby
the_hack has quit [Quit: Computer has gone to sleep.]
peta_ has joined #ruby
ilpuccio has quit [Ping timeout: 276 seconds]
the_hack has joined #ruby
ilpuccio has joined #ruby
sayan has joined #ruby
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
<lolmaus>
waxjar, -I is awesome!
r0bglees0n has quit [Ping timeout: 260 seconds]
Domon has quit [Remote host closed the connection]
evenix has joined #ruby
<waxjar>
it is :D
nettoweb has joined #ruby
sleetdrop has joined #ruby
_bart has joined #ruby
guiocava_ has joined #ruby
guiocavalcanti has quit [Read error: Connection reset by peer]
monkegji_ has joined #ruby
monkegjinni has quit [Read error: No route to host]
pskosinski has joined #ruby
coderhut has joined #ruby
Mattix has quit [Read error: Connection reset by peer]
mixel has joined #ruby
yshh has quit [Remote host closed the connection]
mixel has quit [Client Quit]
Mattix has joined #ruby
LennyLinux has quit [Remote host closed the connection]
curtis has joined #ruby
the_hack has quit [Quit: Computer has gone to sleep.]
sleetdrop has quit [Ping timeout: 245 seconds]
jonathanwallace has quit [Ping timeout: 246 seconds]
Xeago has joined #ruby
sail has joined #ruby
blacktul_ has joined #ruby
guiocava_ has quit [Read error: Connection reset by peer]
the_hack has joined #ruby
monkegji_ has quit [Remote host closed the connection]
krz has quit [Quit: krz]
guiocavalcanti has joined #ruby
monkegjinni has joined #ruby
skattyadz has joined #ruby
blacktulip has quit [Ping timeout: 256 seconds]
lyanchih has joined #ruby
postmodern has quit [Quit: Leaving]
eykosioux has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
r0bby_ has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Ping timeout: 248 seconds]
guiocava_ has joined #ruby
guiocavalcanti has quit [Read error: No route to host]
johnrlive has joined #ruby
monkegjinni has joined #ruby
arya has quit [Ping timeout: 248 seconds]
dhruvasagar has joined #ruby
workmad3 has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
b0oh has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
johnrlive has quit [Ping timeout: 252 seconds]
nettoweb has quit [Quit: nettoweb]
arya has joined #ruby
mmitchell has joined #ruby
monkegjinni has joined #ruby
jbpros has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
ossareh has quit [Ping timeout: 264 seconds]
guiocava_ has quit [Read error: Connection reset by peer]
jbpros has quit [Client Quit]
guiocavalcanti has joined #ruby
dustint has joined #ruby
SAUCYSALAMANDER has joined #ruby
bradhe has joined #ruby
ttt has quit [Remote host closed the connection]
b0oh has quit [Ping timeout: 264 seconds]
sail has quit [Remote host closed the connection]
dustint has quit [Client Quit]
monkegjinni has quit [Read error: Connection reset by peer]
dustint has joined #ruby
LennyLinux has joined #ruby
monkegjinni has joined #ruby
the_hack has quit [Quit: Computer has gone to sleep.]
dustint has quit [Client Quit]
dustint has joined #ruby
eka has joined #ruby
DonRichie has joined #ruby
bradhe has quit [Ping timeout: 256 seconds]
kofno has joined #ruby
b0oh has joined #ruby
b0oh has left #ruby [#ruby]
blaxter_ is now known as blaxter
BizarreCake has joined #ruby
the_hack has joined #ruby
guiocava_ has joined #ruby
jonathanwallace has joined #ruby
guiocavalcanti has quit [Read error: No route to host]
cj3kim has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegji_ has joined #ruby
coderhut has quit [Ping timeout: 250 seconds]
guiocavalcanti has joined #ruby
guiocava_ has quit [Read error: Connection reset by peer]
rudi1 has quit [Ping timeout: 260 seconds]
guiocavalcanti has quit [Read error: Connection reset by peer]
guiocavalcanti has joined #ruby
cj3kim has quit [Ping timeout: 256 seconds]
eykosioux has quit [Remote host closed the connection]
_bart has quit [Quit: _bart]
guiocava_ has joined #ruby
guiocavalcanti has quit [Read error: Connection reset by peer]
Ortuna has joined #ruby
a_a_g has joined #ruby
SAUCYSALAMANDER has quit [Ping timeout: 246 seconds]
Macaveli has joined #ruby
RonScagz has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
jnoob22 has joined #ruby
trixlex has joined #ruby
atzkey has quit [Ping timeout: 264 seconds]
machuga is now known as machuga|away
reset has quit [Ping timeout: 248 seconds]
atzkey has joined #ruby
machuga|away is now known as machuga
the_hack has quit [Quit: Computer has gone to sleep.]
s1n4 has joined #ruby
s1n4 has joined #ruby
s1n4 has quit [Changing host]
thebastl has joined #ruby
a_a_g2 has joined #ruby
ramblex has joined #ruby
Azulinho has joined #ruby
eykosioux has joined #ruby
rgrinberg has joined #ruby
a_a_g2 has quit [Client Quit]
kil0byte has joined #ruby
a_a_g has quit [Ping timeout: 248 seconds]
jcromartie has quit [Quit: Computer has gone to sleep.]
<cr3>
is there any preference between using .to_s or .join('') on an array?
daniel_- has quit [Ping timeout: 264 seconds]
DaniG2k has joined #ruby
GeissT has quit [Ping timeout: 252 seconds]
passcod has quit [Ping timeout: 256 seconds]
<hoelzro>
I think .join('') is more explicit
guiocavalcanti has quit [Ping timeout: 256 seconds]
<hoelzro>
to me, it says "show me the elements of this array with no spaces in between"
dustint has quit [Remote host closed the connection]
<hoelzro>
.to_s says "show me a string representation of this object, whatever that is"
Lubinski has joined #ruby
dustint has joined #ruby
passcod has joined #ruby
Heero has joined #ruby
Heero has joined #ruby
Heero has quit [Changing host]
Elhu has joined #ruby
ryannielson has joined #ruby
<cr3>
hoelzro: agreed, I like that way of looking at it. thanks!
<hoelzro>
np =
<hoelzro>
=)
chandankumar has joined #ruby
axl_ has joined #ruby
banisterfiend has joined #ruby
yalue has joined #ruby
ezotrank-- is now known as ezotrank
corehook has joined #ruby
jnoob22_ has joined #ruby
InFlames has quit [Quit: This computer has gone to sleep]
emergion has joined #ruby
splittingred has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
mark_locklear has quit [Remote host closed the connection]
breakingthings has joined #ruby
jnoob22 has quit [Ping timeout: 245 seconds]
joast has joined #ruby
guiocavalcanti has joined #ruby
Ortuna has quit [Quit: Computer has gone to sleep.]
a_a_g has quit [Quit: Leaving.]
lsmola has joined #ruby
clocKwize_ has quit [Quit: clocKwize_]
guiocava_ has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 256 seconds]
<maddog_>
How can I convert a valid array to a Matrix?
<alex88>
hi guys, someone ever used "serve"? you know if there is a way to compile files with yum compressor or such on export?
jamesaxl has quit [Ping timeout: 264 seconds]
the_hack has quit [Quit: Computer has gone to sleep.]
jamesaxl has joined #ruby
schaerli has quit [Remote host closed the connection]
sayan has quit [Read error: Connection reset by peer]
invisime has joined #ruby
passcod has quit [Read error: Operation timed out]
tomzx_mac has joined #ruby
failshell has joined #ruby
jkamenik has joined #ruby
jkamenik has left #ruby [#ruby]
passcod has joined #ruby
girija has quit [Ping timeout: 276 seconds]
joonty has joined #ruby
pyr0commie has joined #ruby
hiyakashi has quit [Quit: お前は知りすぎた]
sleetdrop has joined #ruby
tomzx_mac has quit [Remote host closed the connection]
GeissT_ has quit [Ping timeout: 256 seconds]
clocKwize has joined #ruby
wmoxam has joined #ruby
GeissT has joined #ruby
tomzx_mac has joined #ruby
miskander has joined #ruby
tvw has quit []
freerobby has joined #ruby
pcarrier_ has quit [Ping timeout: 248 seconds]
cmarques has joined #ruby
<pyr0commie>
Hi... does anyone know how I can download the SuperKaramba bindings for ruby? I'm using Fedora 18 and I installed the superkaramba and kross-interpreters packages, but when I require 'karamba' there is no module. I can't use python either. Is there another library I need?
lsmola has quit [Remote host closed the connection]
ezotrank- has joined #ruby
D4T has joined #ruby
johnrlive has joined #ruby
ezotrank has quit [Read error: Connection reset by peer]
nezumi has quit [Ping timeout: 256 seconds]
arya has quit [Ping timeout: 248 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
jerius has joined #ruby
hems has joined #ruby
johnmilton has joined #ruby
miskander has quit [Quit: miskander]
codecop has quit [Remote host closed the connection]
<hems>
I just ruined into problems escaping “ and ” ( weird quotes ) for javascript, any suggestion on how to solve that?
peta_ has quit [Quit: peta_]
<ericwood>
weird quotes should just work
<ericwood>
but your question is vague
akhet has joined #ruby
akhet has joined #ruby
akhet has quit [Changing host]
codemonkey010101 has joined #ruby
tommyvyo has joined #ruby
johnrlive has quit [Ping timeout: 252 seconds]
Mattix has quit [Quit: Leaving]
Mattix has joined #ruby
chandankumar has quit [Quit: Leaving]
arya has joined #ruby
monkegji_ has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
mastr has joined #ruby
LennyLinux has joined #ruby
the_hack has joined #ruby
atno has joined #ruby
guiocavalcanti has quit [Read error: Connection reset by peer]
generalissimo has joined #ruby
guiocavalcanti has joined #ruby
lsmola has joined #ruby
mmitchell has joined #ruby
memborsky has joined #ruby
bradhe has joined #ruby
schaerli has joined #ruby
kpshek has joined #ruby
kevinfagan has quit [Max SendQ exceeded]
alanp has joined #ruby
skattyadz has quit [Quit: skattyadz]
kevinfagan has joined #ruby
sailias has joined #ruby
Astralum has joined #ruby
osvico has quit [Ping timeout: 264 seconds]
jcromartie has joined #ruby
schaerli has quit [Remote host closed the connection]
icecandy has quit [Remote host closed the connection]
philcrissman has quit [Remote host closed the connection]
generalissimo has quit [Read error: Connection reset by peer]
lolmaus has quit []
generalissimo has joined #ruby
tealmage has joined #ruby
<whowantstolivefo>
guys im working coding at codecademy.com but i got stuck at this question and i have no idea how to fix it , anyone around to explain and teach me how to pass this code ?
ezotrank- has quit [Read error: Connection reset by peer]
DaniG2k has quit [Quit: Leaving]
v0n has joined #ruby
muz0xd has joined #ruby
passcod has quit [Ping timeout: 256 seconds]
mklappstuhl has joined #ruby
danslo has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
tealmage has quit [Remote host closed the connection]
Davey has joined #ruby
adambeynon has joined #ruby
guiocavalcanti has quit [Read error: Connection reset by peer]
AlHafoudh has joined #ruby
guiocavalcanti has joined #ruby
Zakaria has joined #ruby
chandankumar has joined #ruby
krombr has joined #ruby
the_hack has quit [Quit: Computer has gone to sleep.]
Macaveli has quit [Read error: Connection reset by peer]
jnoob22 has joined #ruby
akells` has joined #ruby
jnoob22_ has quit [Read error: Connection reset by peer]
Dummies_freelanc has quit [Read error: Connection reset by peer]
skattyadz has joined #ruby
passcod has joined #ruby
crazymykl has joined #ruby
monkegji_ has joined #ruby
Psy-Q has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
gommo_ has joined #ruby
<Psy-Q>
what is the strategy for Ruby 2.x on Debian, does anyone know? right now there are 1.9.3 packages included with wheezy, but i'm wondering if and when newer versions might be available, and if they will be parallel to the existing ones like 1.8.7 is now
akells` has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
akells` has joined #ruby
the_hack has joined #ruby
andikr has quit [Read error: Connection reset by peer]
d2dchat has joined #ruby
sailias has joined #ruby
D4T has quit [Ping timeout: 256 seconds]
acrussell has joined #ruby
passcod has quit [Ping timeout: 245 seconds]
pitzips has joined #ruby
philcrissman has joined #ruby
<Zakaria>
Psy-Q: maybe need a little bit to include 2.0.0
<Zakaria>
but in general RVM is better
interactionjaxsn has joined #ruby
GeissT has quit [Quit: MillBroChat AdIRC User]
corehook has quit [Ping timeout: 256 seconds]
yshh has joined #ruby
hiyakashi has joined #ruby
<Psy-Q>
Zakaria: hmm! thanks
<Psy-Q>
too bad, having packages might make our install guides half their current length :(
D4T has joined #ruby
<Psy-Q>
i wonder how the python people do it
<Zakaria>
Psy-Q: welcome!, as you know, Debian try to do much test to include a ruby , also this is important
Proshot has quit [Quit: Leaving]
<Zakaria>
i don't use Debian for that, ArchLInux is better for me
<Zakaria>
also if you see kde 4.8 and gnome! much crazy strategy!
Havvy has joined #ruby
philcrissman has quit [Remote host closed the connection]
<Havvy>
What are the recommended books for learning Ruby?
<Psy-Q>
but i'm getting worried with how many small ecosystems use their own version management scheme outside of packages (e.g. ruby, python, node/npm...)
gaahrdner has joined #ruby
kobain has joined #ruby
<Psy-Q>
in the end you install a language or runtime or whatever and a package management system along with it, six times, on every server :(
<Zakaria>
yes , right
<Havvy>
Psy-Q: Those are still packages.
<ghr>
+1 for packages. Makes ops life much easier
<joonty>
Psqy-Q: many python users use virtualenv
<Havvy>
Just ones not controlled by the OS.
<Psy-Q>
Havvy: yeah, that's the issue there
<Psy-Q>
you almost have to compile node from source, you almost have to use a ruby version manager to manage that stuff, with one set of gems per ruby version, etc.
<Havvy>
Zakaria: Looking for a book. They usually go more into depth than codecademy.
jtharris has joined #ruby
jrabbit has quit [Ping timeout: 252 seconds]
<jaybe>
Psy-Q, nod; annoying; reality. check out rbenv. also, some have suggested that chruby is very simple, clean, and unobtrusive.
Leighton has quit [Quit: Leaving]
<Psy-Q>
rbenv is fine for single-user systems
ezotrank-- has quit [Ping timeout: 252 seconds]
tomzx_mac has quit [Ping timeout: 256 seconds]
<Zakaria>
Havvy: look at: itebooks
<jaybe>
Psy-Q, if you want 'modern' on debian, you'll have to backport, compile yourself, and or look at unstable/experimental branches to build packages from.
<Psy-Q>
but if you want to e.g. have one system user per rails app and host it all on apache through passenger, rbenv can't do it
muz0xd has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
<Psy-Q>
jaybe: yeah, that's what i've done so far. i was asking if perhaps there is already a strategy in place that 2.0.0 will be distributed through backports
tomzx_mac has joined #ruby
<Psy-Q>
then i would've told the ops to upgrade our rails servers to wheezy, use the system-packaged 1.9.3
<Havvy>
Zakaria: Ooh. I did not know of this.
<Psy-Q>
then they could remove rvm from the equation
<Havvy>
Thanks!
<Psy-Q>
and they wouldn't have to compile rubies, etc.
<joonty>
you often don't need to compile rubies with rvm
<Zakaria>
welcome! ;)
<Psy-Q>
oh, haven't checked much recently, locally i'm on rbenv
<joonty>
$ rvm install --binary
<joonty>
or --binaries
<joonty>
can't remember
clocKwize has quit [Quit: clocKwize]
dhruvasagar has quit [Ping timeout: 252 seconds]
<joonty>
but that's made it a *lot* quicker
<jaybe>
Psy-Q, i'd use rbenv over rvm. and check out chruby. also, you can configure bundle and or gems to live in a relatively 'shared' location.
huoxito has joined #ruby
<Psy-Q>
yeah, okay. but still, rvm rapes the shell a bit, it would be nice not having to have it on all the servers
<joonty>
Psy-Q: true, it does
<Psy-Q>
jaybe: would that allow one system user per rails app if i'd stick it behind phusion passenger, do you know? that's the only thing tying us to rvm for now
nari has joined #ruby
<joonty>
it's a tradeoff in the end, it gives you a lot for free but also interferes heavily
<Psy-Q>
e.g. we might have /home/rails/foo.example.com, /home/rails/bar.example.com and bar and foo are two distinct system users
carloslopes has quit [Remote host closed the connection]
<jaybe>
Psy-Q, why is that an issue?
<PigDude>
does it matter if i build a gem in ruby 2 or 1.9.3?
<Zakaria>
Havvy: -> there is also a cute ebook site called; wowebook: amazing too!
<PigDude>
will a gem build in ruby 2 that uses syntax that is backwards compatible (not that there are huge differences) work in 1.9.3, install properly and such?
<Psy-Q>
jaybe: rvm has a "system-wide install" mode where it drops a binary wrapper into /usr/local/rvm/bin and then each of those users can use the rubies that you've installed as root
nettoweb_ has joined #ruby
<Zakaria>
PigDude: most people use 1.9.3, need time to move to 2
<Psy-Q>
jaybe: i'm not sure if rbenv can also be made to do that, so that? would i just prepend its path to all users' PATHs?
<PigDude>
Zakaria, yes, but does it matter which version i use to build the gem?
CaptainKnots has quit [Changing host]
CaptainKnots has joined #ruby
io_syl has quit [Quit: Computer has gone to sleep.]
<PigDude>
Zakaria, i am just adding a :o => v type option, so it is very backwards compatible
<PigDude>
Zakaria, it is actually to satisfy a Rails 4 requirement
monkegji_ has quit [Ping timeout: 256 seconds]
tomzx_mac has quit [Ping timeout: 252 seconds]
theRoUS has joined #ruby
theRoUS has joined #ruby
<PigDude>
Zakaria, the gemspec used to build the old version worked to generate one with ruby 2
<jaybe>
Psy-Q, rbenv can/does do the same thing with shims. i believe all that's required is the rbenv call in user profiles. and you could declare that all gems for ruby version x.x live in /static/location/x.x .. shrug
<PigDude>
Zakaria, and it installed as expected, etc.
generalissimo has quit [Remote host closed the connection]
<Psy-Q>
jaybe: ah! i could try that, then
<jaybe>
Psy-Q, do check out chruby
mikepack has joined #ruby
monkegjinni has joined #ruby
<Zakaria>
PigDude: Thanks! I'm using it too
krombr has quit [Remote host closed the connection]
<jaybe>
Psy-Q, if you *wanted* each app/user to be able to install/updates gems (bleh) you could make the gems home group owned and writable by the group and have the apps/users be a part of the group, etc.
<Psy-Q>
jaybe: hey, chruby looks nice
atno has quit [Remote host closed the connection]
jbpros has joined #ruby
trixlex has quit [Ping timeout: 252 seconds]
<jaybe>
Psy-Q, yah, it's unobtrusive
Animawish has joined #ruby
<Psy-Q>
jaybe: the users would just have to be able to select one of the rubies installed by root. the gems are installed with bundle install --deployment anyway
<Psy-Q>
through capistrano
grobb has quit [Quit: grobb]
<Psy-Q>
since we host legacy 1.8.7 and current 1.9.3 apps on the same server (don't ask...)
nfisher has joined #ruby
ged has joined #ruby
sayan has joined #ruby
tomzx_mac has joined #ruby
<PigDude>
Zakaria, ?
<Zakaria>
PigDude: yes
<PigDude>
so does anybody know about portability of rubygems built with rubygems 2.0.3?
jbpros has quit [Client Quit]
<PigDude>
assuming syntax, etc. is portable
bcuz has joined #ruby
<Psy-Q>
jaybe: i'll test the rbenv + global $PATH idea from before now. then i'll try chruby for the same idea
<jaybe>
Psy-Q, cool; mind sharing your experiences?
<Zakaria>
I didn't try it
alexmreis has joined #ruby
krombr has joined #ruby
MrZYX|off is now known as MrZYX
alexmreis has left #ruby [#ruby]
workmad3 has joined #ruby
<jaybe>
Psy-Q, note bundle can also be configured to save/store/reference gems via it's .config
nettoweb_ has quit [Read error: Connection reset by peer]
guiocavalcanti has quit [Read error: Connection timed out]
mercwithamouth has joined #ruby
tealmage has joined #ruby
guiocavalcanti has joined #ruby
alanp has quit []
nettoweb_ has joined #ruby
_nitti has joined #ruby
alanp has joined #ruby
hogehone has joined #ruby
hogehone has left #ruby [#ruby]
hogehone has joined #ruby
m8 has quit [Ping timeout: 246 seconds]
mumblerit has quit [Remote host closed the connection]
yshh has quit [Remote host closed the connection]
hogehone has left #ruby [#ruby]
pitzips has quit [Ping timeout: 245 seconds]
awarner has joined #ruby
mmitchell has quit [Remote host closed the connection]
tagrudev has quit [Remote host closed the connection]
mumblerit has joined #ruby
mumblerit is now known as Guest70958
Guest70958 has quit [Read error: Connection reset by peer]
teclator has quit [Ping timeout: 264 seconds]
Guest70958 has joined #ruby
mmitchell has joined #ruby
mmitchell has quit [Remote host closed the connection]
haylon has joined #ruby
cheeseballs has joined #ruby
cheeseballs is now known as mumblerit2
mmitchell has joined #ruby
tealmage has quit [Ping timeout: 256 seconds]
<haylon>
when placing a '\' in between some " ", do I still need to do a '\\' or do i have to do something else?
<Psy-Q>
jaybe: hm, initializing rbenv if rbenv lives in a different location than ~/.rbenv does work, but things break afterwards. it seems rbenv in its shims exports some environment variables pointing explicitly to the home dir it was installed in (?)
headius has joined #ruby
<Psy-Q>
i might just try chruby, it's easier for me to grasp what that does exactly
awarner has quit [Remote host closed the connection]
monkegjinni has quit [Ping timeout: 276 seconds]
trixlex has joined #ruby
awarner has joined #ruby
aganov has quit [Remote host closed the connection]
bradhe has joined #ruby
monkegjinni has joined #ruby
haylon has quit [Quit: Page closed]
nettoweb_ has quit [Read error: Connection reset by peer]
mikepack has quit [Remote host closed the connection]
mumblerit has quit []
mumblet is now known as mumblerit
hems has quit [Quit: Leaving]
jolleyjo1 has joined #ruby
filipe has quit [Ping timeout: 260 seconds]
nettoweb__ has joined #ruby
AxonetBE has quit [Quit: Leaving.]
bradhe has quit [Ping timeout: 248 seconds]
ner0x has joined #ruby
jolleyjoe has quit [Ping timeout: 264 seconds]
gazarsgo has quit [Quit: gazarsgo]
cbreeze has quit [Quit: cbreeze]
curtis has quit [Remote host closed the connection]
Alamo777_ has joined #ruby
passcod has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
bcuz has quit [Ping timeout: 250 seconds]
mark_locklear has joined #ruby
suporte85 has quit [Ping timeout: 256 seconds]
ggordan has quit [Read error: No route to host]
thoraxe has quit [Ping timeout: 245 seconds]
the_hack has quit [Quit: Computer has gone to sleep.]
thebastl has quit [Ping timeout: 248 seconds]
thoraxe has joined #ruby
zigomir has joined #ruby
whowantstolivefo has quit [Quit: who wants to live forever ?]
s1n4 has quit [Quit: peace out]
ffranz has joined #ruby
nwertman has joined #ruby
pothibo has joined #ruby
<Psy-Q>
jaybe: it works fine with chruby
<jaybe>
Psy-Q, sweet :)
blacktul_ has quit [Remote host closed the connection]
<jaybe>
Psy-Q, i appreciate chruby's simplicity and unobtrusiveness
<Psy-Q>
jaybe: each user can pick preinstalled rubies, and the gems install with bundle install --deployment will also work fine provided they were installed with the right version in the first place (1.8.7 and not 1.9.3 for the legacy projects)
<Psy-Q>
jaybe: yes, this makes sense
stunthamster has joined #ruby
<Psy-Q>
it's also easier to sell to the ops
<Psy-Q>
since rvm is black magic and rbenv is slight voodoo
monkegjinni has quit [Ping timeout: 240 seconds]
<Psy-Q>
i even managed to install rails locally to a specific user, and it seemed to work transparently with the ruby chosen via chruby :)
nettoweb___ has joined #ruby
threesome has quit [Read error: Operation timed out]
ayaz has quit [Quit: Bye!]
<Todd->
Anyone know of an irc channel for webmock specific questions?
<Psy-Q>
hell, i think i'll switch from rbenv to chruby locally too :)
ephemerian has quit [Quit: Leaving.]
jezi22 has joined #ruby
chandankumar has quit [Remote host closed the connection]
<jezi22>
guys how can i install 'net/install' in ruby 1.9.x?
hems has joined #ruby
<breakingthings>
Is the major difference between rbenv and chruby the voodoo it does/doesn't do behind the scenes, or is there actually a difference in functionality?
<waxjar>
there's a nice list in chruby's README
tk_ has quit [Quit: ばいばい]
alex__c2022 has joined #ruby
suporte85 has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
<breakingthings>
Yeah, it just seems like it's all internal things that is different.
apeiros has quit [Remote host closed the connection]
xardas has quit [Changing host]
xardas has joined #ruby
yashshah has quit [Read error: Connection reset by peer]
codesoda has quit [Remote host closed the connection]
marcdel_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<aedorn>
We could just do away with time zones completely, and make everyone adjust to 24 hour clocks. Global UTC use sure would uncomplicate things (after the initial hysteria anyway)
nwertman has joined #ruby
yshh has joined #ruby
Gue______ has joined #ruby
Gue______ has quit [Max SendQ exceeded]
skattyadz has quit [Ping timeout: 252 seconds]
gazarsgo has joined #ruby
kil0byte has joined #ruby
Eldariof-ru has joined #ruby
djwonk has quit [Quit: djwonk]
ghr has quit [Quit: Computer has gone to sleep.]
vlad_sta_ has quit [Remote host closed the connection]
daniel_- has joined #ruby
<_br_>
aedorn: Absolutely, seconded. I'm so tired of this nonsense as well.
browndawg has quit [Ping timeout: 245 seconds]
kil0byte_ has quit [Ping timeout: 248 seconds]
stonevil has joined #ruby
yshh has quit [Ping timeout: 245 seconds]
<jezi22>
im new in ruby. what really is the difference with '.' and'::' in accessing methods
BizarreCake has quit [Ping timeout: 252 seconds]
<MrZYX>
'.' looks better
timkohrumel has joined #ruby
_nitti has quit [Remote host closed the connection]
senayar_ has quit [Read error: Operation timed out]
jezi22 has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
pothibo has quit [Quit: pothibo]
neataroni has quit [Ping timeout: 252 seconds]
sindork has joined #ruby
nga4 has joined #ruby
skattyadz has joined #ruby
yann_ck has quit [Quit: Computer has gone to sleep.]
buibex has quit [Remote host closed the connection]
adambeynon has quit [Quit: Computer has gone to sleep.]
browndawg has joined #ruby
robscomputer has joined #ruby
dpatel has joined #ruby
headius has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
cj3kim has quit [Remote host closed the connection]
rakl has quit [Quit: sleeping]
jbueza has joined #ruby
ExxKA has quit [Quit: This computer has gone to sleep]
eykosioux has quit [Remote host closed the connection]
csaunders has joined #ruby
eykosioux has joined #ruby
LaPetiteFromage has joined #ruby
eykosiou_ has joined #ruby
eykosioux has quit [Read error: Connection reset by peer]
teclator has joined #ruby
slainer68 has quit [Ping timeout: 256 seconds]
the_hack has quit [Ping timeout: 246 seconds]
fermion has joined #ruby
eykosiou_ has quit [Remote host closed the connection]
a_a_g has joined #ruby
eykosioux has joined #ruby
bluOxigen has quit [Ping timeout: 264 seconds]
waxjar has quit [Remote host closed the connection]
tylersmith has joined #ruby
the_hack has joined #ruby
gaahrdner has quit [Ping timeout: 245 seconds]
mklappstuhl has joined #ruby
pi3r has quit [Remote host closed the connection]
schaerli has quit [Remote host closed the connection]
waxjar has joined #ruby
codesoda has joined #ruby
interactionjaxsn has joined #ruby
rupee has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
wroathe has joined #ruby
Gnubie has joined #ruby
robscomputer has quit [Remote host closed the connection]
Heero` has quit [Ping timeout: 248 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
robscomputer has joined #ruby
the_hack has quit [Quit: Leaving...]
freerobby has joined #ruby
the_hack has joined #ruby
robbyoconnor has joined #ruby
mumblerit has quit [Ping timeout: 256 seconds]
the_hack has quit [Client Quit]
bricker`1A has quit [Ping timeout: 256 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
dhruvasagar has quit [Read error: Operation timed out]
brianpWins has joined #ruby
mumblerit has joined #ruby
unholycrab has quit [Read error: Connection reset by peer]
stkowski has joined #ruby
sambao21 has joined #ruby
mercwithamouth has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
marcdel_ has joined #ruby
mockra has joined #ruby
workmad3 has joined #ruby
apok has joined #ruby
robbyoconnor has quit [Ping timeout: 245 seconds]
dallasm has joined #ruby
c0rn has joined #ruby
ephemerian has joined #ruby
unholycrab has joined #ruby
_Amaan has joined #ruby
jonathanwallace has quit [Quit: WeeChat 0.4.0]
ebouchut has joined #ruby
timonv has joined #ruby
atmosx has quit [Quit: And so the story goes…]
DarthGandalf has quit [Ping timeout: 264 seconds]
joshu has joined #ruby
mark_locklear has quit [Ping timeout: 245 seconds]
teclator has quit [Ping timeout: 260 seconds]
krombr has quit [Quit: krombr]
unholycrab has quit [Remote host closed the connection]
al3xnull2 is now known as alexnull
robscomputer has quit [Remote host closed the connection]
alexnull is now known as al3xnull
rton has left #ruby [#ruby]
mwillhite has quit [Ping timeout: 276 seconds]
solidoodlesuppor has joined #ruby
mrsolo has joined #ruby
rgrinberg has quit [Ping timeout: 245 seconds]
hukl has joined #ruby
k610 has quit [Ping timeout: 245 seconds]
<joshu>
I need some advise on how to structure a ruby script I'm about to write. The script will process incoming email stripping information and then using that info to create new email messages. basically there are 4 different types of incoming emails and 4 new emails created respectively. I don't know when to have one ruby script that does the initial checking to see which type of email it is and then calling the respective ruby script to handle
<joshu>
that email. Or have everything in one file with say 4 if statements…I'm quite new at this so any advice is appreciated
<joshu>
I'll be using the mail gem for inbound parsing and outbound email creation
blacktulip has joined #ruby
DanKnox_away is now known as DanKnox
_nitti has joined #ruby
sayan has joined #ruby
Heero has joined #ruby
marcdel_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kristofers has joined #ruby
jonathanwallace has joined #ruby
<waxjar>
joshu, will you just be processing an email occasionally or will you process a lot?
sayan has quit [Max SendQ exceeded]
apeiros has joined #ruby
<joshu>
waxjar somewhere in between basically my ruby script is serving as a convenience cleanup thingy for inbound/ outbound faxing via a fax cloud provider who's emails contain lots of marketing shit etc which my script will remove prior to deliver to local users. to give you a roughy number maybe total inbound/outbound mails this ruby script will have to deal with is 20-30 per month if that helps
dallasm has quit [Read error: Connection reset by peer]
dallasm_ has joined #ruby
sayan has joined #ruby
_nitti has quit [Ping timeout: 276 seconds]
<waxjar>
joshu, i would just keep it simple then and go with 4 if statements
elaptics is now known as elaptics`away
<joshu>
and all the logic in one ruby file?
stkowski has quit [Ping timeout: 256 seconds]
<joshu>
something like when a particular if statement is true call a method defined in the same file?
marcdel_ has joined #ruby
stkowski has joined #ruby
dhruvasagar has joined #ruby
Scriptonaut has joined #ruby
neataroni has joined #ruby
swex_ has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
cj3kim has joined #ruby
wild-oat26 has quit [Ping timeout: 252 seconds]
interactionjaxsn has joined #ruby
swex has quit [Ping timeout: 276 seconds]
kiri has quit [Ping timeout: 248 seconds]
GeorgesLeYeti has joined #ruby
<GeorgesLeYeti>
Hi
kiri has joined #ruby
<otters>
hello GeorgesLeYeti
<RiftyMcF3arless>
quick question... in a `for in in 1..some_var` loop, is some_var evaluated every loop or only the first time? anybody know?
<otters>
ok
<joshu>
waxjar is that how you would do it have 4 if statements and each statement if true calls a specific method defined in the same file?
<GeorgesLeYeti>
otters: :D
jgrevich has joined #ruby
<otters>
GeorgesLeYeti: "%06.3f" % 3.01254
<waxjar>
joshu: roughly, yeah
<GeorgesLeYeti>
otters: ok
<waxjar>
RiftyMcF3arless: you shouldn't really use for loops in Ruby :P
<GeorgesLeYeti>
otters: ty
<MrZYX>
RiftyMcF3arless: one time, but we prefer to do (1..some_var).each do |i| or if some_var is a number some_var.times do |i|
radic has quit [Quit: Verlassend]
<RiftyMcF3arless>
ok, wow, why does everybody avoid doing it this way if i may ask?
interactionjaxsn has quit [Ping timeout: 248 seconds]
radic has joined #ruby
<RiftyMcF3arless>
i've always been a fan of the for i in syntax
jamesaxl_ has quit [Read error: Connection reset by peer]
<lupine>
there's no reason to avoid for
<joshu>
waxjar how does it work if say 3-4 emails are piped to the ruby script within the same timeframe? will the ruby script handle processing each one simultaneously or how does it work?
<r0bglees0n>
RiftyMcF3arless: in ruby we use enumerable methods to iterate a collection, for is fine but not an idiom.
<lupine>
just as there's no reason to avoid CamelCase variable names ^^
<banisterfiend>
lupine: it has weird scoping rules
jgrevich has quit [Client Quit]
<MrZYX>
lupine: I hope you mean camlCase variables, CamlCase would be a constant
<banisterfiend>
lupine: basically for loop variables dont shadow
wroathe has quit [Ping timeout: 256 seconds]
jamesaxl has joined #ruby
<r0bglees0n>
MrZYX: I think it is pastelCase when it is written like that?
<MrZYX>
I don't know the names
agjacome has joined #ruby
<MrZYX>
I think there are three or four different ones
<r0bglees0n>
i never remember but yeah there is a specific name for it
rgrinberg has joined #ruby
jgrevich has joined #ruby
benlieb has joined #ruby
<waxjar>
joshu, depends a bit on how you're calling it and how you structure your program. generally ruby only doesn one thing at a time
Heero has quit [Read error: Connection timed out]
<RiftyMcF3arless>
banisterfiend: can you give a quick rundown on what shadowing is?
<joshu>
waxjar the ruby script would be called via a postfix pipe
Spami has quit [Quit: This computer has gone to sleep]
<rippa>
camelCase (camel case) is a term which refers to the practice of writing compound words where the first letter of an identifier is lowercase and the first letter of each subsequent concatenated word is capitalized.
<RiftyMcF3arless>
the way the for works is strange. don't understand why it clobbers it like that
<RiftyMcF3arless>
seems like it should work just like .each
<Scriptonaut>
hmm. Well I need to write a socket server/client system for a basic card game. I was gonna write it in python and then use pygame (which I know), but have been thinking of doing it in ruby, and was wondering how different the graphics libraries are
<rippa>
it's a punishment
<rippa>
for using unholy statement
jlast_ has joined #ruby
<banisterfiend>
RiftyMcF3arless: no one uses 'for' anyway
famulus has joined #ruby
jlast has quit [Ping timeout: 248 seconds]
<canton7>
RiftyMcF3arless, for changes the value of the i object on each loop. #each creates a new i object
DarthGandalf has joined #ruby
<MrZYX>
lets call it i variable please :P
monkegji_ has quit [Ping timeout: 252 seconds]
Tobarja has joined #ruby
wroathe has joined #ruby
monkegjinni has joined #ruby
<rippa>
'for' works like 'while'
guiocavalcanti has quit [Ping timeout: 245 seconds]
<rippa>
it doesn't create a new scope
BonSequitur has joined #ruby
<rippa>
so it's quite logical
jamesaxl has quit [Remote host closed the connection]
<rippa>
if you want a new scope, use iterator
<joshu>
waxjar would a new ruby process for the ruby script be created for each piped email?
<waxjar>
i don't know joshu, i'm no UNIX wizard :p
teddyp1cker has quit [Remote host closed the connection]
<joshu>
waxjar ok no worries
jamesaxl has joined #ruby
Heero has joined #ruby
Heero has joined #ruby
Heero has quit [Changing host]
huoxito has joined #ruby
headius has quit [Ping timeout: 252 seconds]
carlyle has quit [Remote host closed the connection]
travisjeffery has joined #ruby
sayan has quit [Ping timeout: 276 seconds]
alvaro_o has joined #ruby
cj3kim has quit [Remote host closed the connection]
alvaro_o has quit [Read error: Connection reset by peer]
sambao21 has quit [Quit: Computer has gone to sleep.]
JimmyNeutron has joined #ruby
ipalaus has quit [Quit: Computer has gone to sleep.]
choobie has joined #ruby
choobie has quit [Changing host]
choobie has joined #ruby
_nitti has joined #ruby
vlad_starkov has joined #ruby
DanKnox_away is now known as DanKnox
mark_locklear has quit [Ping timeout: 245 seconds]
banisterfiend is now known as banister`shop
rdark has quit [Quit: leaving]
vlad_starkov has quit [Remote host closed the connection]
guiocavalcanti has joined #ruby
interactionjaxsn has joined #ruby
katsrc has quit [Read error: Connection reset by peer]
classix has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
ebouchut has quit [Quit: This computer has gone to sleep]
headius has joined #ruby
sambao21 has joined #ruby
jonathanwallace has quit [Ping timeout: 248 seconds]
dallasm_ has quit [Remote host closed the connection]
_br_ has quit [Quit: leaving]
cj3kim has joined #ruby
gr4yscale has joined #ruby
cj3kim has quit [Remote host closed the connection]
krombr has joined #ruby
browndawg has quit [Ping timeout: 245 seconds]
timkohrumel has quit [Remote host closed the connection]
dallasm has joined #ruby
vlad_starkov has joined #ruby
saarinen has joined #ruby
GeorgesLeYeti has quit [Quit: Quitte]
whitedawg has joined #ruby
<RiftyMcF3arless>
i remember seeing some code once where somebody had specified a lot of exceptions in an array, i think one prefixed by * (like *EXCEPTIONS), and then rescued them... is this as simple as defining an array 'EXCEPTIONS' with each exception in it (i.e. EXCEPTIONS = [Errono::ENOENT, Errno::ECONNREFUSED]?
djwonk has joined #ruby
cj3kim has joined #ruby
troessner_ has quit [Quit: Leaving]
<apeiros>
RiftyMcF3arless: yes
<MrZYX>
you can just do rescue Errono::ENOENT, Errno::ECONNREFUSED though
timkohrumel has joined #ruby
<apeiros>
rescue A, B, C --> exceptions = [A, B, C]; … rescue *exceptions
eykosioux has quit [Remote host closed the connection]
stonevil has quit [Quit: stonevil]
mattbl has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
eykosioux has joined #ruby
<MrZYX>
hm, I'm curious, when would you want to do that?
<Morrolan>
If you catch the same exceptions in a few locations.
troessner has joined #ruby
mark_locklear has joined #ruby
<RiftyMcF3arless>
yeah, because im using rescues to return false in some methods, and typing it over and over sucks, and it also looks ugly
<RiftyMcF3arless>
apeiros: thanks
stoic_squirrel has joined #ruby
<MrZYX>
I guess I'd just wrap the method that's raising them, but okay
Scriptonaut has left #ruby [#ruby]
hiyakashi has quit [Quit: お前は知りすぎた]
machuga|away is now known as machuga
whowantstolivefo has joined #ruby
Elhu has joined #ruby
eykosioux has quit [Ping timeout: 245 seconds]
awc737 has joined #ruby
<awc737>
is it alright to assign a variable to a ternary if statement?
_bart has joined #ruby
Cork has quit [Excess Flood]
<awc737>
var = (var == "" ? “it was empty″ : “it was NOT empty″)
<havenwood>
Mmm, smart quotes are the devil. Text editor ftw.
<awc737>
smart quotes?
<Morrolan>
The quotes around "it was empty" and "it was not empty" aren't regular quotes but, uh, fancy ones.
<awc737>
why thank you
<Morrolan>
The kind of quotes which a word processor à la Office inserts.
<awc737>
i'm a fancy guy
bradhe_ has joined #ruby
cj3kim has quit [Remote host closed the connection]
curtis has quit [Remote host closed the connection]
McYanni is now known as YanniHoza
grobb has joined #ruby
bradhe has quit [Ping timeout: 245 seconds]
BizarreCake has quit [Ping timeout: 248 seconds]
cj3kim has joined #ruby
andikr has joined #ruby
monkegjinni has quit [Ping timeout: 246 seconds]
stresler has joined #ruby
carlyle has quit [Remote host closed the connection]
guiocavalcanti has quit [Read error: Connection reset by peer]
guiocavalcanti has joined #ruby
carlyle has joined #ruby
<stresler>
Hi, I'm a non-ruby dev that has been charged with fixing a simple dependency issue in a ruby api. I've made the change in one of the classes, and it isn't 'taking'. I think this must be some sort of code reuse issue or model cache, but don't know how ruby clears that type of thing. (i.e. I can remove the file throwing the error altogether and the logs still show ti throwing it). Is there some linux command line command to reset this?
sgkim1264 has quit [Ping timeout: 245 seconds]
<stresler>
(been googling for an hour)
sambao21 has quit [Quit: Computer has gone to sleep.]
<pitzips>
I'm running into a stupidly simple problem. How do I convert 40 out of 82 to a number out of 100?
<havenwood>
stresler: What is the error? Gem dependency issue?
_nitti has quit [Remote host closed the connection]
<stresler>
in `require': no such file to load -- json/add/rails (LoadError)
<stresler>
Outside of classes changing to :
<stresler>
require 'json'
<stresler>
works
sailias has quit [Quit: Leaving.]
<stresler>
but in the class it pretends I never changed the line.
sailias has joined #ruby
<havenwood>
stresler: Using Bundler? Does the project have a Gemfile?
<stresler>
I don't know what bundler is. We're using the debian Squeeze package ruby-json
<havenwood>
pitzips: Something like: "#{(40.fdiv(82) * 100).round} out of 100"
MattyMcB has joined #ruby
<havenwood>
#=> "49 out of 100"
evenix has quit [Read error: Connection reset by peer]
tealmage has joined #ruby
evenix has joined #ruby
_nitti has joined #ruby
<stresler>
I'm mostly confused why it continues to throw the error listing the line number of a specific file even after I've gone so far as to remove the file altogether.
dhruvasagar has joined #ruby
<pitzips>
havenwood: that's awesome. Thank you so much
tealmage has quit [Remote host closed the connection]
<stresler>
specifically: "[Wed May 15 14:48:47 2013] [error] mod_ruby: /var/www/proj_api/control/proj_file.class.rb:12:in `require': no such file to load -- json/add/rails (LoadError)" continues to be thrown, even after I've moved proj_file.class
<stresler>
I figure there must be some utility ro re-read class files somewhere?
lolmaus has joined #ruby
sterNiX has joined #ruby
sterNiX has joined #ruby
k610 has joined #ruby
roadt has quit [Ping timeout: 256 seconds]
awarner has quit [Read error: Connection reset by peer]
<MrZYX>
stresler: first of all rails issue, ruby is not rails (-> #RubyOnRails). But I guess you fail to restart your appserver after doing the changes and are in production mode so you have no automatic reloading
awarner has joined #ruby
<lolmaus>
I would like to POST files to Gist.GitHub.com. At first i thought that it is impossible due to Same Domain Policy. But then i found this example: http://jsfiddle.net/vXpCV/ Surprisingly, it works: running that snippet creates a new Gist, as seen in FireBug 'All' console.
_nitti has quit [Read error: Connection reset by peer]
_nitti has joined #ruby
<lolmaus>
Questions: 1) Why does that work? 2) Why does it not work when i copy it into my project? :(
<stresler>
ah... ok, sorry bout that. LIke I said, I'm a dev but have never touched ruby. Will restart the service, though. Thanks.
<stresler>
(I had no idea this was a rails environment.
ozzloy has quit [Quit: leaving]
stkowski has quit [Quit: stkowski]
<MrZYX>
your error even had "rails" in it...
<havenwood>
stresler: Looks like json/add/rails is deprecated now as well, but if your Gem versions are fixed in your Gemfile, sokay I guess?
<lolmaus>
Oh, wrong channel
<stresler>
Welp! It's working now! Thanks.
<stresler>
Would never have thought to restart apache
<havenwood>
lolmaus: Was gunna say, something funny about your Ruby there. :P
Heero` has joined #ruby
brianpWins has quit [Quit: brianpWins]
<lolmaus>
havenwood, Ruby is my backend and i'm currently working with GitHub API serverside. But it's limited to 5000 requests per hour, and Ruby's github_api library does not support conditional requests which could work this limitation around. So i'm investigating the possibility of working with GitHub API clientside. GitHub API officially supports GET requests from JavaScript via JSONP, but i also need
<lolmaus>
POST requests.
mattbl is now known as MattRB
<havenwood>
lolmaus: Ahh, interesting.
Heero has quit [Ping timeout: 248 seconds]
<lolmaus>
havenwood, okay, guys at #jquery pointed my nose into the solution: CORS. It's covered by GitHub API docs.
sterNiX has quit [Quit: Lagging Off]
sambao21 has joined #ruby
pinpin404 has quit [Remote host closed the connection]
cj3kim has quit [Remote host closed the connection]
Nisstyre-laptop has quit [Quit: Leaving]
reset has quit [Read error: Operation timed out]
mklappstuhl has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 248 seconds]
MariBr has left #ruby [#ruby]
mklappstuhl has joined #ruby
ebouchut has joined #ruby
megha has joined #ruby
tealmage has joined #ruby
grobb has quit [Quit: grobb]
<stresler>
Thanks again havenwood
stresler has left #ruby ["Leaving"]
brianpWins has joined #ruby
enebo has quit [Quit: enebo]
Collin- has quit [Ping timeout: 260 seconds]
evenix has quit [Remote host closed the connection]
cj3kim has joined #ruby
travisjeffery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
evenix has joined #ruby
jerius has quit []
emmanuelux has joined #ruby
carlyle has quit [Remote host closed the connection]
dhruvasa1ar has joined #ruby
whitedawg has quit [Quit: Leaving.]
dhruvasagar has quit [Ping timeout: 256 seconds]
kil0byte_ has joined #ruby
dhruvasa1ar is now known as dhruvasagar
chase-work has joined #ruby
moofy has joined #ruby
MattyMcB has quit [Ping timeout: 256 seconds]
chase-work has quit [Client Quit]
kil0byte has quit [Ping timeout: 256 seconds]
<moofy>
Could somebody explain to me what attr_reader/writer does to me by any chance? I'm trying to go through a ruby tutorial that's talking about them but i totally don't get what black magic it is they're doing.
helllen_ has joined #ruby
headius has joined #ruby
<waxjar>
moofy: they define getter and setter methods for an instance variable
Zolo has joined #ruby
fasta has quit [Remote host closed the connection]
robottinosino has quit [Quit: WeeChat 0.4.0]
<moofy>
Huh?
skattyadz has quit [Quit: skattyadz]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
<yxhuvud>
moofy: attr_reader :foo is roughly equivalent to as def foo; @foo; end, and attr_writer :foo is roughly equivalent to def foo= val; @foo = val; end
<waxjar>
instance variables are the variables prefixed with an @. they're not accessible from outside the instance, so you define a method to return its value or change its value. attr_reader/writer/accessor is just a sort of shortcut to do that
<yxhuvud>
(or rather the result of calling attr_reader is roughly the same as that method)
DanKnox is now known as DanKnox_away
<moofy>
so it gives you a way to get at the return value of a method in a class?
<waxjar>
no. do you know what instance variables are?
<moofy>
yes
tealmage has quit [Remote host closed the connection]
marcdel_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lurch_ has joined #ruby
<havenwood>
moofy: Here is an example of doing it with plain-ole-methods, with attr_reader/attr_writer, and with attr_accessor: https://gist.github.com/havenwood/5586625
<moofy>
but why is it a symbol, rather than an instance variable
<moofy>
not attr_reader @thing
<waxjar>
attr_reader :ivar defines a method on your class called "ivar" that returns the value of the instance variable @ivar
<havenwood>
moofy: The symbol is the name of the method you will be creating to expose the ivar of the same name.
<havenwood>
moofy: Methods are stored as symbols internally on structs.
<moofy>
so it's like an implicit method kindof?
<yxhuvud>
moofy: because if you do attr_reader @thing, then attr_reader will use the value of @thing
<havenwood>
moofy: It is syntactic sugar that makes the code shorter and more readable.
<moofy>
Okay.
<moofy>
This always seems to be where i stumble
<havenwood>
moofy: Only of use if you want a getter/setter of the same name as an existing ivar.
<moofy>
where it's not really obvious that something is a shortcut for something else
sgkim126l has joined #ruby
<moofy>
keep finding things that say 'do this' without saying why :/
<havenwood>
moofy: attrs seem hardly intuitive to me, but once you get used to attr_reader and attr_accessor they make understanding code quicker and are a helpful idiom
brtdv has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<waxjar>
attr_reader and friends are a lot faster than defining the methods yourself.
<moofy>
it's just the symbol threw me
nettoweb has quit [Read error: Connection reset by peer]
<waxjar>
plus it keeps your code shorter and cleaner
<moofy>
the two just seemed unrelated
<moofy>
it's like, for ages i couldn't work out that things in |value| could be whatever
<moofy>
i thought they had to be some reference to what you were doing
Nisstyre-laptop has joined #ruby
<havenwood>
moofy: Yeah, the symbol refers to the method you are creating. You'll often see methods referred to as symbols, since they are under the hood. E.g.: send :puts, 'hi'
kpshek has quit []
MattyMcB has joined #ruby
<yxhuvud>
moofy: symbols are identifiers, that is - name of things.
<moofy>
where as @thing stands for any number of possible things?
travisjeffery has joined #ruby
<yxhuvud>
well, it stands for whatever is stored in the variable
_nitti has quit [Read error: Connection reset by peer]
<moofy>
but i mean it could stand for whatever is stored for each time you called that method
_nitti has joined #ruby
<yxhuvud>
yes
<moofy>
okay.
<moofy>
the gist was great.
<waxjar>
yeah, @thing is just a variable, accessible to the instance of a class
<Hanmac>
>> i = Symbol.all_symbols.size; def abc;end; Symbol.all_symbols.size - i
<MisterPostIT>
hi all. i have little question. i was wondering weather a colon serves the same purpose as quotes when assigning a value to an array. i.e. - is my_array[:value] = true equal to my_array['value'] = true
<MisterPostIT>
okay, thanks… are they different keys only for assertion purposes, or does the colon actually 'do' anything is what i am getting at.
LennyLinux has joined #ruby
timonv has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby
paul has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
wmoxam has quit [Ping timeout: 248 seconds]
wroathe has left #ruby [#ruby]
monkegjinni has quit [Read error: Connection reset by peer]
<chiel>
so in a ruby project.. say i want to keep source directories for my sass and javascript stuff, so that i can build it etc into the /public directory... where would you most commonly put the source files for the css and js in a ruby project?
Al_ has joined #ruby
<chiel>
(using sinatra)
<MisterPostIT>
i mean i realise that :value and 'value' are not the same, but what i am trying to find out is if the colon is just the preference or convention a certain programmer might use over the quote, or wether there are other reasons or advantages behind using a colon instead...
<chiel>
is there any kinda convention with that?
<apeiros>
MisterPostIT: the colon doesn't "do" anything
monkegjinni has joined #ruby
<apeiros>
MisterPostIT: just as the quotes for a string don't "do" anything
<apeiros>
the colon is part of the Symbol literal
<apeiros>
just as quotes are part of a String literal
<chiel>
MisterPostIT: the colon makes it a symbol, which is cheaper than a string to use
<apeiros>
and digits are part of Integer literals
timonv has joined #ruby
<chiel>
symbols can also look :'like this'
timonv has quit [Remote host closed the connection]
<MisterPostIT>
okay, got it. thanks very much for your help guys!!!
<C0deMaver1ck>
symbols were one of the harder things to wrap my head around when I first learned Ruby
sambao21 has joined #ruby
jamesfung14 has joined #ruby
<apeiros>
I don't get why people have such an issue with symbols
slyv has joined #ruby
<apeiros>
they're not that different from strings or integers
slyv has quit [Max SendQ exceeded]
<C0deMaver1ck>
well I mean it seems so simple to me now
nomenkun has quit [Ping timeout: 276 seconds]
<C0deMaver1ck>
I just didn't get why they existed back then
ariedler has quit [Remote host closed the connection]
<apeiros>
they exist because of internals, and they're exposed because of optimization
<C0deMaver1ck>
until I realized Ruby makes new objects for every string, whereas :symbols are created once
robbyoconnor has quit [Max SendQ exceeded]
wedgex_ has quit [Ping timeout: 245 seconds]
<Havvy>
C0deMaver1ck: Look as Erlang too.
<Havvy>
If you want another language with symbols.
umren has quit [Read error: Connection reset by peer]
<banister`shop>
Luyt: that's an extremely old interview :)
robbyoconnor has joined #ruby
graydot has joined #ruby
<Luyt>
banister`shop: From 2009, yes
<Luyt>
But the views are still fresh
<Havvy>
C0deMaver1ck: Personally, as a non-Rubyist (I'm only looking at Ruby to see it's metaprogramming), I find symbols are useful because it doesn't make sense to slice a symbol.
<Luyt>
Java is *still* too verbose, and Ruby is *still* cool.
jamesaxl_ has joined #ruby
<banister`shop>
Luyt: anyway, nice work :)
jlast has joined #ruby
<banister`shop>
Luyt: did you manually type it out?
<Havvy>
A symbol is a unit, and units are indivisible. Strings are a collection (either of numbers or of characters), and thus are divisible.
<Luyt>
banister`shop: It was indeed a hell of a job. All done manually, indeed.
anothervenue has left #ruby ["WeeChat 0.3.9.2"]
<banister`shop>
Luyt: i was kind of unimpressed at his distain towards C
rgrinberg has quit [Read error: Operation timed out]
AxonetBE has joined #ruby
monkegjinni has quit [Remote host closed the connection]
<Luyt>
banister`shop: DHH doesn't like to 'dick around' with pointers.
<Luyt>
Well, as a developer, you can choose for that.
<Havvy>
Does anybody like to 'dick around' with pointers?
jamesaxl has quit [Ping timeout: 248 seconds]
<banister`shop>
Luyt: if you dont know C you're always reliant on someone else to fix a bug in a C extension/C library..ruby has a large enough C-extension ecosystem that it's a real issue
<Luyt>
I programmed C and C++ for years, and I don't have an aversion to pointers, TBH.
Z_Mass has quit [Quit: Leaving]
<banister`shop>
Luyt: AKA "i dont understand pointers!" :)
v0n has quit [Ping timeout: 245 seconds]
<Luyt>
banister`shop: I think he pretty well knows what pointers are, but pointers are not something that he needs to satisfy his business goals.
_nitti has quit [Remote host closed the connection]
<banister`shop>
sure, invest a couple of days properly trying to grok them and there's very little "dicking around" you ever have to do
lewis_ is now known as lewix
lewix has quit [Changing host]
lewix has joined #ruby
<Luyt>
Actually, I come from a C/C++ background and I also enjoy modern languages where you don't have to worry about pointers and references anymore, but can just get the thing done.
<Havvy>
banister`shop: Pointers aren't a hard thing to grasp. They are a hard thing to use because they always get in the way.
esmith_ has quit [Remote host closed the connection]
<Luyt>
I be damned if it takes 1 minute or 20 minutes to run the program, what counts is the time I need to code it up.
danslo has joined #ruby
wedge_ has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
<Luyt>
With modern dynamic languages I arrive at a satisfactionary solution much quicker than I did in the past with C or C++
c0rn has joined #ruby
<banister`shop>
Havvy: i've honestly never found that, and i assume u're not talking about pointers per se you're talking about manual memory management?
whowantstolivefo has quit [Quit: quit]
<banister`shop>
Luyt: i'm talking about the situation where you cannot use Ruby
<Havvy>
Probably both.
<Luyt>
There's something as the 'Blub paradox'. If you know Blub, then any language lower than Blub looks weaker to you
<Havvy>
C is both weaker and stronger than most languages out there.
<banister`shop>
Luyt: the rationale i gave for learning C is being able to debug and fix problems in 3rd party libraries without having to wait for someone else to do it for you
<Luyt>
where any language more powerful than Blub looks like some magic language which you cannot understand
<banister`shop>
and ruby relies heavily on 3rd party C extensions
mneorr has quit [Remote host closed the connection]
<Havvy>
This is why you should learn more languages than just Blub. ;)
monkegjinni has joined #ruby
<banister`shop>
when they break, and they often do, all you can do (if u dont know C) is winge and complain until someone else fixes it for you
johnmilton has quit [Remote host closed the connection]
<Luyt>
"The safest kind were the ones that wanted Oracle experience. You never had to worry about those."
Spooner has joined #ruby
<banister`shop>
Luyt: also, if you want do any *nix systems programming, at least knowing C (being able to read it) means you have a tonne of documentation at your disposal
<Luyt>
banister`shop: I agree with you, C knowledge is a pillar, esr recommends it also
_nitti has joined #ruby
bklane has joined #ruby
_nitti has quit [Remote host closed the connection]
DanKnox_away is now known as DanKnox
<banister`shop>
Luyt: what is esr?
_nitti has joined #ruby
nightfly__ has joined #ruby
<nightfly__>
Can you check if a module exists before requiring it?
<Spooner>
Use interpolation rather than addition of strings.
<heath>
thanks Spooner
fermion has quit [Ping timeout: 252 seconds]
<heath>
i'm in the process of translating that from python
samuel02 has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
cj3kim has joined #ruby
<Spooner>
I use python too and use classes there ;)
daniel_- has quit [Ping timeout: 245 seconds]
<heath>
hah :)
cj3kim has quit [Remote host closed the connection]
araujo has joined #ruby
araujo has joined #ruby
fermion has joined #ruby
<Luyt>
I'm logging, have to rise early tomorrow, cya laters.
<heath>
i'll convert it to a class for ya
cj3kim has joined #ruby
robbyoconnor has quit [Ping timeout: 245 seconds]
Asher has quit [Read error: Connection reset by peer]
cj3kim has quit [Remote host closed the connection]
bklane has quit [Remote host closed the connection]
monkegji_ has joined #ruby
Asher has joined #ruby
lewix has quit [Remote host closed the connection]
daniel_- has joined #ruby
monkegjinni has quit [Ping timeout: 252 seconds]
<Spooner>
heath, Interpolation also has an implicit #to_s, so saves you doing that yourself.
<Spooner>
nightfly__, Well, Ruby comes with JSON, so it isn't a good example.
<heath>
for?.. sorry, i'm not following
<heath>
not seeing a to_s
jonathanwallace has joined #ruby
<heath>
instead of splatting a dollar symbol before each method, i can splat the @ symbol can keep the scope within the class, huh?
devtro_ has joined #ruby
AxonetBE has quit [Quit: Leaving.]
<Spooner>
heath, If you continued to do "str" + num you need to do "str" + num.to_s (like "str" + str(num) in Python), but you can just do "str #{num}"
<nightfly__>
Spooner: working with old solaris with old ruby. Found LoadError though, kinda gross but is good enough for I need.
<Spooner>
nightfly__, Applications should be using bundler anyway...
<Spooner>
heath, Yeah, effectively the same (@ivar in a class compared to $global outside)
<nightfly__>
Spooner: this is for a facter fact for puppet
rudi has joined #ruby
<Spooner>
Oh right, that isn't proper Ruby. Anyway, yes, catching LoadError is probably your best bet then.
<heath>
#{$count_of_all_attempts} if i'm using globals?
blacktulip has quit [Remote host closed the connection]
<Spooner>
heath, Yeah. You can use #{@ivar} or #@ivar though.
<heath>
converted to string interpolation for the puts statements
<Spooner>
Right.
<heath>
oh, i was saying, i did that :)
rudi is now known as rgrinberg
<heath>
didn't know you could do #@ivar instead of #{@ivar}
<Spooner>
And yeah, ruby puts is like python print. Our print doesn't add a newline.
<heath>
\n added
<Spooner>
I generally use #{} anyway, so I don't have to remember that very specific case :0
<heath>
i'm assuming if the attributes were moved into a class, i'd just be replacing all the $ symbols with "@"
* heath
realizes new Time.new is invalid also :)
passcod has joined #ruby
* heath
is accustomed to new Date() in js :)
lurch_ has quit [Quit: lurch_]
<apeiros>
Time.now
helllen_ has quit [Quit: helllen_]
<apeiros>
Time.new is valid
mmitchell has quit [Remote host closed the connection]
hidalgo has joined #ruby
<apeiros>
ah, new before Time.new. syntactically valid actually :-p
bubblehead has quit [Remote host closed the connection]
LennyLinux has quit [Remote host closed the connection]
tonini has quit [Ping timeout: 248 seconds]
mhd has joined #ruby
Heero` has quit [Ping timeout: 264 seconds]
jamesfung14 has quit [Ping timeout: 245 seconds]
anothervenue has joined #ruby
<mhd>
Classes have their name automagically assigned from the constant they are assigned to. How do I get that feature in my own data type?
benlieb has joined #ruby
daniel_- has quit [Ping timeout: 248 seconds]
<waxjar>
I think you'll have to fork Ruby and write that feature yourself :(
<apeiros>
mhd: I don't think you can
<mhd>
darn
<mhd>
that would be hella neat
jlast has quit [Remote host closed the connection]
superscott[8] has quit [Quit: superscott[8]]
Animawish has joined #ruby
m8 has quit [Quit: Sto andando via]
dustint has quit [Ping timeout: 248 seconds]
wedge_ has quit [Remote host closed the connection]
tealmage has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
anothervenue has quit [Quit: WeeChat 0.3.9.2]
anothervenue has joined #ruby
anothervenue has quit [Client Quit]
digital-ghost has joined #ruby
<digital-ghost>
Has anyone used the gem 'jira-ruby' to get Jira and a Rails app to communicate? I can't find any functional examples of how to use this gem.
<heath>
python stops because it has a restriction set for maximum depth of a call stack
<heath>
but ruby? surewry ruby doesn't have this
<waxjar>
the if clause doesn't match?
<waxjar>
wait that was stupid i need some sleep. lol
interactionjaxsn has quit [Remote host closed the connection]
nwertman has quit [Ping timeout: 256 seconds]
<heath>
appreciated nevertheless :)
jlast has quit [Remote host closed the connection]
gaahrdner has quit [Remote host closed the connection]
pskosinski_ has joined #ruby
pskosinski has quit [Remote host closed the connection]
jlast has joined #ruby
pskosinski_ is now known as pskosinski
gaahrdner has joined #ruby
tealmage has joined #ruby
wedge_ has joined #ruby
breakingthings has quit [Quit: breakingthings]
prk has joined #ruby
wedge_ has quit [Remote host closed the connection]
<apeiros>
heath: go_monkey_go() goes into go_monkey_go, matches if $generated_text != $desired_text, doesn't match if $attempts.length > 100 && …expr…, exits
<apeiros>
that's why I'd say
<apeiros>
I'd assume that && in line 24 is a bug, and I'd add an `else` there to verify.
<apeiros>
and I'd assume on line 25 you wanted $attempts instead of attempts.
nomenkun has joined #ruby
DanKnox is now known as DanKnox_away
<heath>
the && wasn't intended to be there, nice catch
solidoodlesuppor has quit [Remote host closed the connection]
<Havvy>
So, Metaprogramming Ruby is probably the most fun programming book I've read.
zigomir has quit [Ping timeout: 276 seconds]
gaahrdner has quit [Ping timeout: 245 seconds]
akhet has quit [Remote host closed the connection]
jamesfung14 has joined #ruby
jlast has quit [Ping timeout: 276 seconds]
enebo has quit [Quit: enebo]
<Havvy>
(The cool thing is, is that this is the first day I've actually looked at Ruby, and yet I understand and can anticipate the factual knowledge he's spewing just from the little synax I've seen)
<apeiros>
Havvy: nice!
nwertman has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
nomenkun has quit [Ping timeout: 252 seconds]
cj3kim has joined #ruby
cj3kim has quit [Remote host closed the connection]
Markvilla has joined #ruby
Xeago has joined #ruby
<Havvy>
You can completely redefine String?
SAUCYSALAMANDER has joined #ruby
<apeiros>
theoretically, yes
<apeiros>
practically there are limits
generalissimo has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
guiocavalcanti has quit [Ping timeout: 252 seconds]
gstamp has joined #ruby
<Havvy>
So I should wrap top level defs with class Object then?
<Havvy>
Instead of the entire file.
<banister`shop>
Havvy: first of all, it's highly discouraged to define methods on Object
monkegji_ has quit [Remote host closed the connection]
<Havvy>
I can imagine.
<Raydiation>
so this isnt the same as python functions?
<banister`shop>
Havvy: secondly, there's a slight difference to defining a method at top-level vs just opening Object and defining a method there -- methods defined at top-level are private by default
emergion has joined #ruby
<banister`shop>
Raydiation: it's not the same, it's the opposite actually
mattbl has joined #ruby
<banister`shop>
in python everything is a function that are just bound to objects (and it even has an explicit 'self' indicating to waht it's bound)
mattbl has quit [Client Quit]
nighthwk1 has joined #ruby
axl_ has quit [Quit: axl_]
<banister`shop>
in ruby, it's exactl the opposite, everthing is a *method*
<Raydiation>
Go does this similarly i think
nighthwk1 has quit [Remote host closed the connection]
kpshek has quit []
<banister`shop>
you can sometimes treat them as if they're functions, but they're not really the same
<Raydiation>
i see so you wont write it them as some kind of utility function
<banister`shop>
when i sahy 'everything' im just referring to methods/functions sry :)
headius has quit [Quit: headius]
<Raydiation>
would you use them for things that need only to be done in that file?
<banister`shop>
Raydiation: if you want to do that, you put them in a module
<banister`shop>
a module is a bag of methods
monkegjinni has joined #ruby
<Raydiation>
i see
<Raydiation>
do you use this for classes too?
csaunders has joined #ruby
<Raydiation>
as some kind of namespace maybe
mattbl has joined #ruby
theRoUS has quit [Ping timeout: 248 seconds]
geggam_wk has quit [Remote host closed the connection]
breakingthings has joined #ruby
cj3kim has quit [Remote host closed the connection]
nomenkun has joined #ruby
<Raydiation>
is it also possible to do anon objects btw?
<banister`shop>
Havvy: coffeescript does get rid of var
<Raydiation>
every block should create a new scope
locriani has joined #ruby
<Raydiation>
also lambdas in ruby should look like: x -> x + 1
<waxjar>
->(x) { x + 1 } is what they look like i think
<banister`shop>
they look like this: -> x { x + 1 }
<banister`shop>
:)
<Raydiation>
is this new?
<waxjar>
new-ish
<r0bglees0n>
as new as 1.9
<Raydiation>
only found stuff with lambda keyword + return
<waxjar>
i prefer that one actually
<Raydiation>
why? its more to write ;D
<Raydiation>
also i think its pretty clear
<waxjar>
can't get any clearer than "lambda" for a lambda :P
eykosioux has quit [Remote host closed the connection]
huoxito has joined #ruby
eykosioux has joined #ruby
<Raydiation>
well you dont write function but def
<Raydiation>
no need to be over verbose
<waxjar>
you use def to define a method
csaunders has quit [Quit: Computer has gone to sleep.]
<Raydiation>
ok, method :)
<Raydiation>
also ruby tends to overly shorten stuff
<Raydiation>
like to_s or gsub
<Havvy>
gsub is global substitute?
rafacv has joined #ruby
<Raydiation>
iir its the same as js .replace()
mstksg has joined #ruby
invisime has quit [Quit: Leaving.]
<otters>
it's js replace(/.../g)
<mstksg>
i remember all those years ago when ruby seemed to foreign and bizarre to me, but now when i'm learning new languages and technologies, returning to ruby feels like returning home. in fact it's the only language that gives me that feleing of home.
<Raydiation>
haskell especially
<Raydiation>
they took every operator and changed it
pevjan has quit [Read error: Connection reset by peer]
F1skr has quit [Quit: WeeChat 0.4.0]
roadt has joined #ruby
<Raydiation>
mstksg: you should try python :)
<Raydiation>
less weird than ruby
pevjan has joined #ruby
<havenwood>
Crush the snake.
<mstksg>
raydiation: python is obscene to me now
<mstksg>
raydiation: :| everything is so weird
<Xeago>
python doesn't pull me as much
MattyMcB has joined #ruby
<Xeago>
I keep returning to ruby
<Raydiation>
i think its more conservative
<Xeago>
python feels weird!
Nisstyre-laptop has quit [Ping timeout: 245 seconds]
<mstksg>
i was exposed to python before ruby but never really got inot it
ephemerian has quit [Quit: Leaving.]
<Havvy>
Python has a nice iteration syntax for the year 2000-2009.
<banister`shop>
Raydiation: i dunno, every other language has descent anonymous functions now, python is being left far behind
<Havvy>
But this is 2013.
<Xeago>
python has a reasonable lambda?
<banister`shop>
Raydiation: even java, C#, and go have good anonymous function syntax
<Xeago>
better than js..
nezumi has joined #ruby
<banister`shop>
python's anon functions are a joke
<banister`shop>
decent*
<Xeago>
wouldn't know, only wrote 109 lines of python
Nisstyre-laptop has joined #ruby
<Xeago>
syntax was better than js
<Xeago>
for sure
<banister`shop>
Xeago: i dont think so..js ones are at least multiline :)
<Xeago>
gotcha :P
<banister`shop>
python should just steal coffeescript's anon functions
<Raydiation>
+1
eykosioux has quit [Remote host closed the connection]
<Havvy>
Python's lambdas can only be a single expression, right?
<Raydiation>
think so
eykosioux has joined #ruby
<banister`shop>
Xeago: yeah but python lambdas can only contain expressions, not statements, as a result they can only be very simple things
<Raydiation>
funtools are also a bit weird
idkazuma has joined #ruby
<Raydiation>
functools*
d11wtq has quit [Ping timeout: 264 seconds]
toddWork__ has quit [Quit: toddWork__]
MattyMcB has quit [Ping timeout: 256 seconds]
ereslibre_laptop is now known as ereslibre
ereslibre has quit [Changing host]
ereslibre has joined #ruby
jimg_ has joined #ruby
sambao21 has joined #ruby
saarinen has quit [Quit: saarinen]
slainer68 has quit [Remote host closed the connection]
<Raydiation>
"Guido, at least back when he was in charge, said that there will never be multi-line lambdas; it's impractical given Python's whitespace-based code blocks to implement them in a way that's readable and unambiguous."
Dejazmach_Yahuud has quit [Ping timeout: 252 seconds]
jokke has quit [Ping timeout: 264 seconds]
eykosioux has quit [Ping timeout: 256 seconds]
baroquebobcat has quit [Ping timeout: 252 seconds]
<banister`shop>
Raydiation: CS ftw :)
<Raydiation>
yeah cs does some really nice things :)
lkba has joined #ruby
hiyakashi has joined #ruby
jokke has joined #ruby
zeade has quit [Quit: Leaving.]
sambao21 has quit [Client Quit]
nwertman has quit [Ping timeout: 264 seconds]
flam__ has quit [Ping timeout: 256 seconds]
bubblehead has joined #ruby
flam_ has joined #ruby
jamesaxl_ has quit [Ping timeout: 256 seconds]
<mstksg>
raydiation python just isn't meant for functional programming
jamesaxl has joined #ruby
<mstksg>
not a fault, of course
sean_s has quit [Quit: sean_s]
tommyvyo has quit [Quit:]
mattbl has quit [Quit: This computer has gone to sleep]
tvw has quit []
bubblehead has quit [Ping timeout: 264 seconds]
benlieb has quit [Quit: benlieb]
kofno has quit [Remote host closed the connection]
lushious has joined #ruby
gommo has joined #ruby
predator217 has joined #ruby
khismetix has joined #ruby
kil0byte_ has quit [Ping timeout: 246 seconds]
P1RATEZ has joined #ruby
predator117 has quit [Ping timeout: 245 seconds]
d2dchat has quit [Remote host closed the connection]
gadgetoid has joined #ruby
huoxito has quit [Quit: Leaving]
lewix has joined #ruby
cwd1 has quit [Remote host closed the connection]
pipework has joined #ruby
robbyoconnor has joined #ruby
cofin has quit [Quit: cofin]
johnrliv_ has quit [Remote host closed the connection]
justsee has joined #ruby
justsee has joined #ruby
DanKnox is now known as DanKnox_away
jamie_ca_ has quit [Quit: Computer has gone to sleep.]
eykosioux has joined #ruby
mattbl has joined #ruby
Mattix has joined #ruby
eykosioux has quit [Remote host closed the connection]