<pontiki>
do you know what the word means generall, Lewix ?
<bnagy>
lame output trimming
KobraKao has quit [Ping timeout: 245 seconds]
Stalkr_ has quit [Quit: Leaving...]
freezey has quit [Remote host closed the connection]
Jdubs has joined #ruby
BraddPitt has joined #ruby
|jemc| has joined #ruby
KobraKao has joined #ruby
Monie has joined #ruby
Guest32443 has quit [Quit: leaving]
tylersmith has quit [Ping timeout: 252 seconds]
sailias has joined #ruby
Monie has quit [Client Quit]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Lewix>
pontiki: that's why im asking
<pontiki>
"propogate", a verb, means to spread, disseminate, pass along
<pontiki>
if you need more words, consult a dictionary
devoldmx has quit [Ping timeout: 248 seconds]
jefflyne1 has joined #ruby
mercwithamouth has joined #ruby
jb41 has quit [Quit: Lost terminal]
gwb3 has joined #ruby
tabolario has joined #ruby
fridim__ has joined #ruby
jefflyne has quit [Ping timeout: 246 seconds]
i8igmac has quit [Remote host closed the connection]
okinomo has joined #ruby
tgraham has joined #ruby
superscott[8] has quit [Quit: superscott[8]]
justsee has joined #ruby
gwb3 has quit [Ping timeout: 245 seconds]
KobraKao has quit [Quit: Saindo]
ehc has quit [Quit: ehc]
i8igmac has joined #ruby
m00nlight has joined #ruby
bobdobbs has joined #ruby
jbrechtel has quit [Remote host closed the connection]
<bobdobbs>
hey guys. I'm trying to get compass to work. I'm getting an error that I think comes from ruby. I'm not sure what to make of it: http://hastebin.com/soxowugawo.vbs
cj3kim has quit [Remote host closed the connection]
mklappstuhl has quit [Remote host closed the connection]
pwh has quit [Quit: pwh]
lukec has quit [Quit: lukec]
<|jemc|>
it looks like it can't find the sass gem
<IceDragon>
are you sure sass is installed?
<bobdobbs>
absolutely
cj3kim has joined #ruby
<IceDragon>
re-install it
<bobdobbs>
ok
Popple has joined #ruby
<|jemc|>
are you sure that compass is running with a version of ruby that has your sass gem installed?
<bobdobbs>
oh wait... I just re-installed sass last night
quoin has joined #ruby
<|jemc|>
I see you're using rbenv
<IceDragon>
gem which sass
<bobdobbs>
/home/mantis/.rbenv/shims/sass
bradhe has quit [Remote host closed the connection]
<IceDragon>
I think we found our problem then
<bobdobbs>
yeah?
cody-- has joined #ruby
<IceDragon>
load up the irb and try require 'sass'
<bobdobbs>
ok
maletor has quit [Quit: Computer has gone to sleep.]
enebo has quit [Quit: enebo]
cfi30 has joined #ruby
rgbdev has joined #ruby
KobraKao has joined #ruby
<bobdobbs>
'require "sass"' returns 'true
<IceDragon>
:D well that works
* bobdobbs
breaths sigh of relief
mansi has joined #ruby
<|jemc|>
so, you're running compass as a binary as well?
devoldmx has quit [Read error: Connection reset by peer]
anonymus_ has quit [Ping timeout: 256 seconds]
<bobdobbs>
hmmm
<|jemc|>
bobdobbs: your error there is not the same
<bobdobbs>
ah, ok
<|jemc|>
it wants you to have topelevel sass first
danman has quit [Quit: danman]
<|jemc|>
but what is the output of the ls command I posted?
petey has joined #ruby
<bobdobbs>
zsh: no matches found: /home/mantis/.rbenv/versions/1.9.2-p327/lib/ruby/gems/1.9.1/gems/**/lib/sass/script/node.rb
<|jemc|>
I may have typed it wrong...
<|jemc|>
oh, zsh may not glob in the same way as bash?
<IceDragon>
;-;
<|jemc|>
anyway, I'd recommend uninstalling the sass gems you aren't using
<bobdobbs>
ok
<|jemc|>
so uninstall compass, uninstall all versions of sass, then reinstall compass
Guest69114 is now known as daveops
ehaliewicz has quit [Remote host closed the connection]
<|jemc|>
using gem install and gem uninstall
<bobdobbs>
brb, phone
ehaliewicz has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
Aryasam has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
<IceDragon>
>,> well I just installed compass (I have no idea how to use these things..)
quoin has quit [Ping timeout: 248 seconds]
<pontiki>
bash doesn't do ** like Dir does...
Flashmasterson has joined #ruby
<IceDragon>
web dev confuses the hell out of me..
mansi has quit [Ping timeout: 240 seconds]
<bnagy>
if in doubt, try rbenv rehash
<Flashmasterson>
what is the command to update ruby?
<IceDragon>
am I the only man on earth that doesn't understand JS and HTML!!!
<bnagy>
and then walk around your desk anticlockwise
<pontiki>
hardly, IceDragon
matiasevqz has quit [Read error: No route to host]
<IceDragon>
Flashmasterson, depends on your system, you might just have to do it manually..
<bobdobbs>
back
<Flashmasterson>
IceDragon: maybe, it's mac 10.8
<bnagy>
bobdobbs: rbenv rehash
<bobdobbs>
IceDragon: I do webdev, and I find compass as confusing as fk
rupee has joined #ruby
<bobdobbs>
bnagy: done
jonathanwallace has quit [Quit: WeeChat 0.4.1]
<bnagy>
also I dunno where |jemc| is going with the ls thing, but find ~/.rbenv/versions/1.9.2-p327/lib/ruby/gems/1.9.1/gems/ -name node.rb
<xybre>
Compass is a bit excessive imho, but its kind of neat.
<bnagy>
should work on all sane *nix
ColKurtz has joined #ruby
<bobdobbs>
IceDragon: one of the biggest problems with webdev at the moment is that package developers assume that you MUST be using ruby/compass
<IceDragon>
;(
saarinen has quit [Quit: saarinen]
<bobdobbs>
inknowrite?!
<IceDragon>
So now you have to learn html, css, js, ruby and sass. haml and few other languages
tgraham|away is now known as tgraham
<IceDragon>
probably python and php...
<IceDragon>
;_;
<IceDragon>
And here I though that developing for desktop was hard
<bobdobbs>
Its kinda lame, cos there are all these cool packages that have compass as a dep. And they don't really need to depend on compass in the first place.
ixti has joined #ruby
m8 has quit [Quit: Sto andando via]
<bobdobbs>
... and you often don't find out until you are half-way through installing.
cj3kim has quit [Remote host closed the connection]
<bobdobbs>
often the dep is undocumented.
<bobdobbs>
IceDragon: webdev isn't much harder then other kinds. It's just that setting up environment has become needlessly complicated
<Flashmasterson>
so what is the command for mac os 10.8 to update ruby to 2.0?
<bobdobbs>
"Just attackclone the grit repo pushmerge, then rubygem the lymphnode js shawarma module – and presto!"
<IceDragon>
You'll need to download and compile it yourself Flashmaterson
<IceDragon>
*Flashmasterson
<pontiki>
Flashmasterson: there are several ways to approach it
<IceDragon>
O_O bobdobbs, that sounds terrifying
<pontiki>
sadly, there is no one single way that workd for everyone
cj3kim has joined #ruby
<IceDragon>
more terrifying than staring at a gcc compile line..
<pontiki>
well okay, stupid question time: is the version of compass you have compatible with the version of ruby?
<IceDragon>
The gem may still be looking for the system sass..
bartocc has quit [Quit: bartocc]
* IceDragon
runs 2.0.0
<bobdobbs>
pontiki: good question. How do I find out?
<IceDragon>
all praise Arch Linux
<IceDragon>
try running "compass" without args
<MrHacks>
meh
<Flashmasterson>
i'm looking through hartle's rails tutorial to install ruby 2.0 but am having some trouble. will installing the latest version of rvm install ruby 2.0?
<bobdobbs>
IceDragon: that returns the same error: cannot load such file -- sass/script/node
* IceDragon
punches a hole in bobdobbs ruby
mansi has joined #ruby
* bobdobbs
kicks bobdobbs ruby while it's down on the ground
ewnd9 has joined #ruby
<tgraham>
Flashmasterson: rvm is a ruby version manager, once it is installed you can then use it to install ruby 2.0
<bobdobbs>
I don't know ruby well enough to know whats going on. But it looks like compass can't find sass
narcan has joined #ruby
bartocc has joined #ruby
<bobdobbs>
It's like living the java nightmare all over again
* bobdobbs
shudders
<bnagy>
did you paste the full error somewhere?
dodosan has quit [Read error: Connection reset by peer]
bartocc has quit [Client Quit]
<bnagy>
like there should be a script / line number that raises that error
<IceDragon>
bobdobbs: rbenv compass
sevenseacat has joined #ruby
<Flashmasterson>
tgraham: ok
saarinen has joined #ruby
ewnd9 has quit [Remote host closed the connection]
<BraddPitt>
what is the convention for multiple-word variable names?
dodosan has joined #ruby
<BraddPitt>
fooBar
<BraddPitt>
or foo_bar
<BraddPitt>
?
ewnd9 has joined #ruby
<bnagy>
foo_bar
<bobdobbs>
IceDragon: rbenv: no such command `compass'
<BraddPitt>
ty
randomautomator has joined #ruby
fgo has joined #ruby
ner0x has quit [Quit: Leaving]
<IceDragon>
;-; I dunno anymore bobdobbs
<bobdobbs>
hmmm.
<bobdobbs>
me neither
<IceDragon>
try installing sass on the system and rbenv
* bobdobbs
watches burning, shreiking fireball run around house. grabs waterbucket
<bobdobbs>
what does it mean?
<bnagy>
wtf
<IceDragon>
the sass executable is broken
<bobdobbs>
OH HEY!
tomsthumb has quit []
<bobdobbs>
I'm getting a return from compass --version now!
<IceDragon>
:)
hogeo has joined #ruby
* IceDragon
wins!
<bobdobbs>
ogm omg omg
kizzx2 has joined #ruby
* IceDragon
now wants cookies
* bobdobbs
buys IceDragon new cat, cookies
<bnagy>
mmm cat cookies
<IceDragon>
O:
* IceDragon
looks at the cat shaped cookies
* IceDragon
noms one
<IceDragon>
>.> seems legit
<bobdobbs>
just... don't ask about the ingredients
<IceDragon>
you pass
<tgraham>
w00t
<bobdobbs>
\o/
* IceDragon
takes bag and scurries off to dragon cave
<bobdobbs>
ok... what exactly did I do to fix things?
pwh has joined #ruby
* bobdobbs
looks at command history
okinomo has quit [Ping timeout: 245 seconds]
threesome has joined #ruby
<tgraham>
Removed the latest version of sass that's busted, installed a compatible version that's not busted.
<bobdobbs>
hmmmm
<tgraham>
And I really think the cat sacrifice was the key.
<bnagy>
you installed a version that still had a file that compass was looking for
benzocoumaran35 has joined #ruby
Bira has joined #ruby
danman_ has joined #ruby
lukec has quit [Quit: lukec]
<IceDragon>
bottom line: compass now works!
danman_ has quit [Client Quit]
<IceDragon>
but the sass executable is probably borked!
<bobdobbs>
IceDragon: I think it's good. I'll test...
* bobdobbs
crosses fingers, looks for another neighbours cat...
danman has quit [Ping timeout: 240 seconds]
<bobdobbs>
hey sass is fine!
Voodoofish430 has quit [Quit: Leaving.]
<IceDragon>
>_> well mine is borked
<bobdobbs>
I think the neighbours cat is broken though
<IceDragon>
AND IT WORKED FINE A FEW MINUTES AGO!
<IceDragon>
;_____;
<bricker`LA>
Oh damn... `private def foo` ... that syntax is cool.
Davey has joined #ruby
<bobdobbs>
IceDragon: welcome to the wonderful world of webdev!
<IceDragon>
and now reinstalling sass..
<IceDragon>
>,>
<IceDragon>
why me..
<bobdobbs>
well, hey, you have a head start over me...
<bobdobbs>
you actually know something about ruby!
mikee_ has quit [Disconnected by services]
<IceDragon>
Sometimes I really wonder.. (maybe I do have quite a bit of talen under my belt)
<MrHacks>
Outside of using %{#{Q{cat #{file} | sed -r -n '#{sed_command}'}}} where sed_command="30,40p" what else can I use to select certain lines from a file as if it were sed?
lfox has quit [Quit: ZZZzzz…]
quoin has joined #ruby
Xeago has joined #ruby
phantasm66 has joined #ruby
phantasm66 has quit [Client Quit]
<tgraham>
Do you know the line numbers you want or are you looking for specific words?
c0rn has quit [Quit: Computer has gone to sleep.]
quoin has quit [Ping timeout: 246 seconds]
kvirani has joined #ruby
crazymykl has quit [Read error: Connection reset by peer]
mikemac has joined #ruby
cfi30 has quit [Quit: WeeChat 0.4.1]
fgo has quit [Remote host closed the connection]
<bobdobbs>
guys, thank you very much for the help. I don't have a clue about ruby, and you guys saved me much hair.
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
alekst has quit [Quit: Leaving...]
iliketurtles has quit [Quit: zzzzz…..]
JesseH has joined #ruby
dayepa has joined #ruby
JumpMast3r has joined #ruby
kvirani has quit [Remote host closed the connection]
kvirani has joined #ruby
taternuts has joined #ruby
cyberarm has quit [Quit: Bye]
amacgregor_ has joined #ruby
sectionme has joined #ruby
mansi has joined #ruby
aef has joined #ruby
amacgregor__ has joined #ruby
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
kvirani has quit [Ping timeout: 248 seconds]
<|jemc|>
banisterfiend, hanmac: ignore my earlier question, I've got it working correctly now
KobraKao has quit [Read error: Operation timed out]
baroquebobcat has joined #ruby
leehambley has quit [Ping timeout: 245 seconds]
sailias has quit [Ping timeout: 252 seconds]
noop has joined #ruby
Ox6abe_ has quit [Ping timeout: 240 seconds]
leehambley has joined #ruby
Michael_ has joined #ruby
enebo has quit [Quit: enebo]
cj3kim has quit [Remote host closed the connection]
ItSANgo has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Remote host closed the connection]
toah_ has quit [Quit: 전 이만 갑니다.]
toah_ has joined #ruby
dhruvasagar has joined #ruby
Michael_ has quit [Ping timeout: 260 seconds]
saarinen has quit [Quit: saarinen]
rezzack has quit [Quit: Leaving.]
NealJ has quit [Quit: :c]
toah_ is now known as toah
quoin has quit [Ping timeout: 268 seconds]
zz_tsykoduk has joined #ruby
lyanchih has quit [Quit: lyanchih]
brum has joined #ruby
mikemac has quit [Ping timeout: 264 seconds]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
soba has joined #ruby
dweeb has joined #ruby
Ox6abe has joined #ruby
mikemac has joined #ruby
m00nlight has quit [Remote host closed the connection]
polaco is now known as polaco_zZz
petey has quit [Remote host closed the connection]
narcan has joined #ruby
dweeb has quit [Quit: Computer has gone to sleep.]
ananthakumaran has joined #ruby
mansi has joined #ruby
mayorga_ has quit [Ping timeout: 256 seconds]
gwb3 has joined #ruby
sayan has quit [Ping timeout: 246 seconds]
dweeb has joined #ruby
m00nlight has joined #ruby
mansi has quit [Ping timeout: 252 seconds]
iravan has joined #ruby
zeade has joined #ruby
ehaliewicz has joined #ruby
lukec has joined #ruby
idiocrash has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
matled- has joined #ruby
i_s has quit [Remote host closed the connection]
i_s has joined #ruby
apeiros has quit [Remote host closed the connection]
roflmaus has joined #ruby
havenwood has joined #ruby
ner0x has quit [Quit: Leaving]
apeiros has joined #ruby
graydot has joined #ruby
Boohbah has quit [Ping timeout: 240 seconds]
matled has quit [Ping timeout: 264 seconds]
matled- is now known as matled
lolmaus has quit [Ping timeout: 246 seconds]
wallerdev has quit [Read error: Connection reset by peer]
taternuts has quit []
james_woods has quit [Ping timeout: 264 seconds]
wallerdev has joined #ruby
Muz has quit [Ping timeout: 264 seconds]
ukd1 has quit [Remote host closed the connection]
nyuszika7h has quit [Ping timeout: 264 seconds]
Muz has joined #ruby
Sou|cutter has quit [Ping timeout: 264 seconds]
cj3kim has joined #ruby
i_s has quit [Ping timeout: 240 seconds]
T_T has quit [Remote host closed the connection]
splittingred has quit [Quit: splittingred]
Boohbah has joined #ruby
nyuszika7h has joined #ruby
hamakn_ has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
brum has quit [Remote host closed the connection]
graydot has quit [Quit: graydot]
chairabanta has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
james_woods has joined #ruby
fuhgeddaboudit has quit [Ping timeout: 252 seconds]
yekta has joined #ruby
x1337807x has joined #ruby
snovak has joined #ruby
forced_request has quit [Read error: Connection reset by peer]
forced_request has joined #ruby
Sou|cutter has joined #ruby
thomasxie has quit [Read error: Connection reset by peer]
neo_ has joined #ruby
neo_ has quit [Remote host closed the connection]
snovak has quit [Ping timeout: 245 seconds]
Davey has joined #ruby
noop has quit [Ping timeout: 245 seconds]
havenwood has quit [Remote host closed the connection]
Xeago has joined #ruby
jonahR has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
BizarreCake has joined #ruby
jaybe has joined #ruby
tgraham has joined #ruby
fridim__ has quit [Read error: Operation timed out]
<jaybe>
hello. vexed here. i have what i believe to be an empty but set variable. i'm trying to test to see if it's empty to skip acting upon it. is there a way to print the raw contents of the variable similar to printf or the likes to see what's actually in it? further, i tried testing with a silly value and it still proceeds; e.g. if var.empty? || var.nil
antulik-afk is now known as antulik
chairabanta has quit [Quit: Leaving...]
<IceDragon>
p
<IceDragon>
or just call inspect on it
<IceDragon>
anyway, gn folks
IceDragon has quit [Quit: Space~~~]
schaerli has joined #ruby
tgraham has quit [Ping timeout: 256 seconds]
Tearan has quit [Quit: Sleepy Badger....]
i_s has joined #ruby
stkowski has quit [Quit: stkowski]
lukec has quit [Quit: lukec]
mary5030 has quit [Remote host closed the connection]
amacgregor__ has quit [Read error: Connection reset by peer]
apeiros has quit [Remote host closed the connection]
maletor has joined #ruby
Xeago has joined #ruby
graydot has joined #ruby
leehambley has quit [Ping timeout: 245 seconds]
existensil has joined #ruby
brianpWins has joined #ruby
okinomo has quit [Ping timeout: 240 seconds]
VictorSK has joined #ruby
VictorSK_ has joined #ruby
leehambley has joined #ruby
i_s has quit [Ping timeout: 245 seconds]
cads has joined #ruby
sayan has joined #ruby
DanKnox_away is now known as DanKnox
idiocrash has quit [Remote host closed the connection]
schaerli has quit [Remote host closed the connection]
VictorSK has quit [Client Quit]
aagdbl has joined #ruby
timonv has joined #ruby
mrsolo has joined #ruby
brum has joined #ruby
lyanchih has joined #ruby
VictorSK_ has quit [Remote host closed the connection]
browndawg has joined #ruby
kizzx2 has quit [Quit: Leaving.]
c0rn has joined #ruby
brum has quit [Ping timeout: 245 seconds]
<pontiki>
jaybe: i did this thing... i made a debug filter, that basically calls up pry
codecop has joined #ruby
mansi has joined #ruby
_Minos_ has joined #ruby
<_Minos_>
good evening people
dodosan has joined #ruby
c0rn has quit [Ping timeout: 248 seconds]
mercwithamouth has quit [Ping timeout: 240 seconds]
Kricir has quit [Remote host closed the connection]
mansi has quit [Ping timeout: 260 seconds]
ananthakumaran has quit [Quit: Leaving.]
randomautomator has joined #ruby
Boohbah has quit [Ping timeout: 240 seconds]
Es0teric has joined #ruby
Boohbah has joined #ruby
vim_shim has quit [Ping timeout: 260 seconds]
tylersmith has quit [Remote host closed the connection]
tylersmith has joined #ruby
iliketurtles has joined #ruby
antulik is now known as antulik-afk
BillCriswell has quit [Remote host closed the connection]
sectionme has joined #ruby
kizzx2 has joined #ruby
<zeade>
if anyone is familiar with virtus, do you have a good example of using a custom class as an attribute that also uses coercion?
kizzx2 has quit [Max SendQ exceeded]
kizzx2 has joined #ruby
<zeade>
specifically i'm trying to use Money (https://github.com/RubyMoney/money) and allow strings, floats, etc to coerce themselves into a properly instantiated attribute
hamakn has quit [Read error: Connection reset by peer]
ukd1 has joined #ruby
tylersmith has quit [Ping timeout: 260 seconds]
darrik has quit [Read error: Operation timed out]
hamakn has joined #ruby
mercwithamouth has joined #ruby
<zeade>
so far, not much luck
parzo has quit [Ping timeout: 256 seconds]
Spami has joined #ruby
sectionme has quit [Ping timeout: 240 seconds]
hamakn has quit [Read error: Connection reset by peer]
macmartine has quit [Read error: Connection reset by peer]
<bnagy>
sorry, you're using words I have seen before but not in a way that appears to make sense for ruby
hamakn has joined #ruby
<bnagy>
try without the jargon?
<sevenseacat>
lol
macmartine has joined #ruby
apeiros has joined #ruby
yekta has quit [Quit: yekta]
toah has quit [Ping timeout: 256 seconds]
dweeb has quit [Quit: Computer has gone to sleep.]
<bnagy>
or just show us the final code you wish you could write
gwb3 has quit [Remote host closed the connection]
framling has joined #ruby
robbyoconnor has joined #ruby
blarghmatey_ has quit [Read error: Operation timed out]
macmartine has quit [Remote host closed the connection]
Ox6abe has quit [Remote host closed the connection]
<bnagy>
ohh I see virtus is some crazy thing and all the jargon comes from that
<zeade>
bnagy: super great awesome rockstar ninja wizard. make more sense now?
maletor has quit [Quit: Computer has gone to sleep.]
dodosan has quit [Remote host closed the connection]
hamakn has quit [Read error: Connection reset by peer]
tagrudev has joined #ruby
i_s has joined #ruby
hamakn has joined #ruby
dodosan has joined #ruby
aagdbl has quit [Quit: Leaving.]
chairabanta has joined #ruby
pootler has quit [Ping timeout: 245 seconds]
snovak has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
ananthakumaran has joined #ruby
ananthakumaran1 has joined #ruby
zerun0 has quit [Ping timeout: 264 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
dodosan has quit [Ping timeout: 245 seconds]
zerun0 has joined #ruby
ukd1 has quit [Ping timeout: 245 seconds]
snovak has quit [Ping timeout: 240 seconds]
darrik has joined #ruby
Jdubs_ has joined #ruby
BraddBitt has joined #ruby
bradhe has joined #ruby
ananthakumaran has quit [Ping timeout: 252 seconds]
bradhe has quit [Remote host closed the connection]
tgraham has quit [Ping timeout: 268 seconds]
iliketurtles has joined #ruby
iliketurtles has quit [Remote host closed the connection]
Kricir has quit [Ping timeout: 240 seconds]
pwh has quit [Quit: pwh]
timonv has quit [Remote host closed the connection]
gcds has quit [Ping timeout: 256 seconds]
brianpWins has joined #ruby
postmodern has quit [Quit: Leaving]
quoin has joined #ruby
parzo has joined #ruby
dodosan has joined #ruby
<_Minos_>
Question for the IRC: What's the best beginning Ruby book out there?
kobain has quit []
<kizzx2>
_Minos_: my personal fav was Agile Web Development with Rails
mva3212 has quit [Ping timeout: 260 seconds]
toah has joined #ruby
<_Minos_>
kizzx2: I'll have to check that out
jbpros has joined #ruby
quoin has quit [Ping timeout: 245 seconds]
<jrobeson>
_Minos_, but do you want to learn ruby itself? then that is likely not the best resource
<jrobeson>
something non rails specific would be better
<_Minos_>
jrobeson: yeah I'm trying to learn Ruby
brennanMKE has quit [Remote host closed the connection]
larissa has quit [Quit: Leaving]
<jrobeson>
don't buy a rails book then
dodosan has quit [Remote host closed the connection]
<jrobeson>
kizzx2, don't recommend a rails book to somebody trying to learn ruby
<_Minos_>
I want to eventually learn Rails too
<kizzx2>
jrobeson: Rails is a large(st?) practical application of Ruby
<jrobeson>
not that i have any recommendations.. i didn't use a book
jbpros has quit [Client Quit]
<jrobeson>
kizzx2, so? it also promotes bad development practices
<_Minos_>
what did you use jrobeson?
<kizzx2>
a rails book recommendation is better than none
<jrobeson>
didn't use a book
<jrobeson>
no it isn't
<jrobeson>
there's books that are actually about programming ruby
<jrobeson>
like the pickaxe book, but that might be not as useful for learning..
<kizzx2>
jrobeson: no need to direct at me, nobody has absolute truth man take it easy
<jrobeson>
nobody has absolute truth, but that doesn't make your recommdenation a good one
<kizzx2>
whatever
<jrobeson>
rails would do better if people learned ruby first
<kizzx2>
_Minos_: i find learning it while doing actual Rails example from the book quite useful
<kizzx2>
typical PHP style rant
<jrobeson>
does the book actually teach you to use service objects? or just the rails/active record callbacks?
<_Minos_>
i didnt mean to start a flame war :(
<jrobeson>
there are actually good ways to write programs.. and that is the truth
<kizzx2>
_Minos_: not your fault, really didnt see that coming either
aryaching has quit []
<jrobeson>
wtf is a php style rant? that makes no sense considering php's bad reputation
<kizzx2>
ok
aagdbl has joined #ruby
<jrobeson>
if you want to learn rails later.. i would recommend rails 4 in action
<_Minos_>
right now I'm using codeacademy and Eloquent Ruby, using the latter as a way to properly write Ruby
<jrobeson>
and it is written by the people who actually write rails
<jrobeson>
some of them i mean
<sevenseacat>
AWDWR was a terrible, terrible book
<kizzx2>
sevenseacat: why?
brum has joined #ruby
dzhulk has joined #ruby
<sevenseacat>
because half of it flat out didnt work and it encouraged a lot of bad practices
okinomo has joined #ruby
<kizzx2>
sebastianb: specifics?
<jrobeson>
sevenseacat, do you have a good ruby book recomendations?
JumpMast3r has joined #ruby
<sevenseacat>
for learning ruby? The Well-Grounded Rubyist is getting a 2.0 reboot
<kizzx2>
its' a pretty _beginning_ good book IMO in that you create an actual app throughout the book instead of reading like a reference
<jrobeson>
kizzx2, that doesn't make it a good book.. if it teaches you to write code badly
DaZ has quit [Ping timeout: 245 seconds]
<kizzx2>
for example Well-Grounded Rubyist is not intended for beginners in think it mentioned in the preface
<jrobeson>
like overusing rails callbacks and whatnot
ukd1 has joined #ruby
* sevenseacat
gets copy of book out
<jrobeson>
or writing models that are too fat
wallerdev has quit [Quit: wallerdev]
Aryasam has joined #ruby
r0bglees0n has joined #ruby
mva3212 has joined #ruby
<sevenseacat>
'optimized for a reader whos done some programming and maybe some ruby, and wants to learn about the ruby language'
Davey has joined #ruby
<kizzx2>
*checks that i'm not in a C++ channel*
<sevenseacat>
'if this is your first foray into programming, be prepared to do a little extra homework'
brum has quit [Ping timeout: 264 seconds]
mercwithamouth has quit [Ping timeout: 268 seconds]
<kizzx2>
really, reading a book like WGR as a beginner would be really boring for action oriented people
<jrobeson>
_Minos_, have you coded before?
ayaz has joined #ruby
mansi has joined #ruby
<kizzx2>
it's much better to do it after having some some real world app maybe Rails and then discover "oh so this can be done more correctly" to be able to actually absorb it
jojosiao has quit [Quit: Page closed]
<sevenseacat>
so you want someone who has never seen ruby before to just start blindly coping and pasting rails code from a tutorial?
<sevenseacat>
*copying
<_Minos_>
jrobeson: yeah I've done a bit of Python and I'm currently learning C. I'm pretty proficient at bash and awk scripting
<kizzx2>
how do you call this type of argument fallacy?
<jrobeson>
kizzx2, you already used a fallacy on me.. with that php style rant crap
<jrobeson>
you don't even know me
Kneferilis has quit [Quit: Leaving]
<kizzx2>
gosh
<sevenseacat>
if you want to learn rails and you have some background knowledge on ruby, we can recommend decent rails tutorial books
Kneferilis has joined #ruby
<sevenseacat>
however, that wasnt the question asked
DaZ has joined #ruby
Kneferilis2 has joined #ruby
<jrobeson>
guilt by assocation .. i think they call that..
<kizzx2>
why get so worked up
<_Minos_>
well, this simple question turned into a clusterfuck lol
<jrobeson>
because you implied that a) that i code in a language lots of people find crappy b) and that php developers rant a lot
<kizzx2>
well said
<sevenseacat>
if you want a straight ruby book, i recommend TWGR. If you want a rails book, i recommend something like Rails 4 in Action
<sevenseacat>
if you read AWDWR, don't come crying to us when things dont workj
niteowl has quit [Quit: Konversation terminated!]
<jrobeson>
i just read the intro to well grounded rubyist.. sounds like it'd work well
<jrobeson>
perhaps i should get a copy
<sevenseacat>
jrobeson: grab the MEAP thats out with ruby 2
<sevenseacat>
*ruby 2 compatibility
<_Minos_>
What's TWGR?
<jrobeson>
ah another MEAP
<jrobeson>
the well grounded rubyist
<_Minos_>
gotcha
<_Minos_>
ordering on Amazon now lol
mansi has quit [Ping timeout: 245 seconds]
<jrobeson>
_Minos_, see what sevenseacat just said
<_Minos_>
that's what I'm reading now while going through Code Academy
Kricir has joined #ruby
<_Minos_>
I'm gonna pick up POODR too
<jrobeson>
then if you're looking for another companion.. i'd say the MEAP versino would actually be quite fitting
tonni has quit [Remote host closed the connection]
<jrobeson>
of twgr
Macaveli has joined #ruby
<jrobeson>
_Minos_, sorry i didn't have a recommendation straight up.. i don't think i've bought a technical book since apache 2.0 internals book :)
<jrobeson>
pretty well learned everything else onlin
Roa has quit [Ping timeout: 256 seconds]
Roa has joined #ruby
Roa has joined #ruby
Roa has quit [Changing host]
<_Minos_>
I like books for being able to read them while on the train and while in the bathroom
pranny has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
<jrobeson>
tech books get out of date to ofast for me to get a print copy
<jrobeson>
i needa buy an ereader for that kinda thing
xjiujiu has joined #ruby
* sevenseacat
hugs Kindle
zoee has joined #ruby
Kricir has quit [Ping timeout: 256 seconds]
persand has joined #ruby
tobago has joined #ruby
ukd1 has quit [Ping timeout: 245 seconds]
funburn has quit [Quit: funburn]
<_Minos_>
eh, I have a Nexus 7, I just cant really get into the ereaders
<_Minos_>
maybe I need a paperwhite
bricker`LA has quit [Remote host closed the connection]
<Buuyo>
the old paperwhite was really good. contrast was a little weak. they've apparently fixed that. kinda jealous of the new one :p
<diegoviola>
how do you folks handle pushy clients? the type of clients that ask the same questions over and over again, like "how's it going?" type of questions, i'm all for being transparent and being productive as much as i can, but those pushy questions can also become stressful when being asked every day/hour, so how do you handle it?
<jrobeson>
yeah _Minos_ i wouldn't call a nexus 7 an ereader. you can barely use such a thing outside in any reasonable light
<diegoviola>
sorry to ask that
<sevenseacat>
considering upgrading my old kindle touch to one of the new paperwhites
<sevenseacat>
diegoviola: already answered it.
<jrobeson>
diegoviola, give them a deadline.. say you'll be done with X by friday
<Buuyo>
bite-sized milestones :p
<jrobeson>
or whatever day..
<diegoviola>
ok sorry
<diegoviola>
thanks
<jrobeson>
oh.. also
<jrobeson>
setup a trello or some sort of tracker
<jrobeson>
with the milestones there
<jrobeson>
then just point them there everytime :)
<sevenseacat>
we use pivotal tracker for that purpose
<jrobeson>
eventually they'll stop asking
i_s has quit [Remote host closed the connection]
<jrobeson>
you would now wouldn't you sevenseacat ...
<Buuyo>
it's troublesome that some clients won't look at the pm software even if you link it and will still pick up the phone every day. :(
tylersmith has joined #ruby
<jrobeson>
ah i wouldn't answer the phone
ukd1 has joined #ruby
mm__ has joined #ruby
Xeago has quit [Remote host closed the connection]
<sevenseacat>
clients dont get my phone number, they can call the office line which i have no connection to
<diegoviola>
thanks, i'll look into a tracker i can use
mmm has quit [Ping timeout: 248 seconds]
<jrobeson>
unless the server is down .. there is no phone answering
<jrobeson>
or some emergency
Xeago has joined #ruby
<jrobeson>
i call them, they don't call me :)
<Buuyo>
that's a nice luxury. xD
<Buuyo>
i can't complain too much tho. i dont touch clients often outside of developing user stories once or twice a week. :p
T_T has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
tylersmith has quit [Ping timeout: 260 seconds]
dodosan has joined #ruby
Xeago_ has joined #ruby
brum has joined #ruby
tonni has joined #ruby
Xeago has quit [Ping timeout: 264 seconds]
snovak has joined #ruby
parzo has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
<jrobeson>
ah.. nice info on the google context panel.. much better to describe the well grounded rubyist..
<jrobeson>
The Well-Grounded Rubyist takes you from interested novice to proficient practitioner.
<jrobeson>
quite concise :)
Aryasam has quit [Quit: Bye]
tatsuya_o has joined #ruby
robert__ has joined #ruby
robert__ has joined #ruby
Akuma has quit [Ping timeout: 245 seconds]
brum has quit [Ping timeout: 246 seconds]
Dreamer3 has quit [Ping timeout: 245 seconds]
snovak has quit [Ping timeout: 246 seconds]
gwb3 has joined #ruby
<Buuyo>
how is trello compared to confluence btw?
<_Minos_>
we use attask for internal PM management
robert_ has quit [Ping timeout: 245 seconds]
<_Minos_>
at-task, sorry
<jrobeson>
Buuyo, i have no idea, but confuence is likely far more complex
<jrobeson>
trell is quite simple.. make a card, give it a label.. drag and drop between columns
<_Minos_>
its decent, for what it does. Keeps the higher ups off my ass about how far along I am with developing the internal wiki and security stuff
<jrobeson>
cards can have comments
tonni has quit [Ping timeout: 240 seconds]
<jrobeson>
and checklists
<_Minos_>
Trello is what I use at home to keep track of the myriad things I'm learning/doing
<Buuyo>
cards like the parts of xp cubes right?
<jrobeson>
i have no idea
<_Minos_>
I put the internal IPs and stuff in it, all that
<jrobeson>
i've never worked with a team of programmers before
<jrobeson>
i mean except on open source projects
<jrobeson>
i meant like professionally.. where one has certain deadlines one has to hit .. and a bigger organizational overhead
dodosan has quit [Ping timeout: 245 seconds]
<jrobeson>
i generally only deal with bug trackers with milestons and priorities.. that's about the extent of it
<Buuyo>
sometimes it feels like a lot of it is training wheels. all those CRC cards & cubes and what not. :( would like to take the training wheels off some time.
<jrobeson>
it's said that that's the only tracker they use for making trello
noop has joined #ruby
<jrobeson>
althoguh they likely have a private board (or more) for other stuff
<sevenseacat>
trello is also awesome on mobile devices
<Buuyo>
sometimes heh. the price is right too
<Buuyo>
s/sometimes heh. //. remnants from other channels. :(
tgraham has joined #ruby
sectionme has joined #ruby
<jrobeson>
i need trello with web notifications :(
<jrobeson>
hmm.. need a web based email client with them too.. evolution is suck :(
<Buuyo>
oh dear. :p
<jrobeson>
too bad it has such great integration with gnome :(
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
<Buuyo>
my phone makes a special dingle when I get an email from my notifier addresses. they're mostly SNS stuff.
<jrobeson>
i'm just talking about desktop notifications
<jrobeson>
the stuff on my android phone does notificadtions well enough
<jrobeson>
for trell, mail, and most other things
tgraham has quit [Ping timeout: 245 seconds]
Macaveli has quit [Quit: Computer has gone to sleep.]
toah has quit [Ping timeout: 245 seconds]
jbpros has joined #ruby
tonni has joined #ruby
<Buuyo>
I just don't distinguish my notifications any more. if my phone is shouting hey listen, I look down and see the notification, whether it's pm software, email, or the app server pool going haywire. :p
quoin has joined #ruby
|jemc| has quit [Ping timeout: 246 seconds]
marcgg_ has quit [Ping timeout: 240 seconds]
ukd1_ has joined #ruby
haxrbyte has joined #ruby
freerobby has quit [Quit: Leaving.]
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
mzdravkov has joined #ruby
T_T has quit [Remote host closed the connection]
abk has joined #ruby
quoin has quit [Ping timeout: 256 seconds]
ukd1 has quit [Ping timeout: 240 seconds]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
coderhs has joined #ruby
marcgg has joined #ruby
bradhe has joined #ruby
jbpros has quit [Quit: jbpros]
sayan has quit [Ping timeout: 256 seconds]
ukd1_ has quit [Remote host closed the connection]
T_T has joined #ruby
freakazoid0223 has quit [Read error: Operation timed out]
bradhe has quit [Ping timeout: 268 seconds]
mrsolo has joined #ruby
jprovazn has joined #ruby
parzo has quit [Ping timeout: 268 seconds]
tonni has quit [Read error: Connection reset by peer]
polysics has joined #ruby
<polysics>
hello
alup has joined #ruby
<polysics>
anyone has ever needed to test Net::SSH under Rspec?
<mzdravkov>
I am wondering... do ruby have something like method apply, that get block and evaluate all the expressions from the block on self. For example
<mzdravkov>
a = 41
<mzdravkov>
+1
<mzdravkov>
a.apply do
<mzdravkov>
end
<mzdravkov>
puts a # => 42
<mzdravkov>
Ok, sorry for that...
<polysics>
there at least 4 ways I can think of to do that :D
<polysics>
1) call methods on the boject
<polysics>
2) instance_eval
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
<mzdravkov>
I am trying to implement it with class eval over Object
<polysics>
3) yield self to a block
<polysics>
4) reopen class (BAD)
xjiujiu has joined #ruby
cj3kim has quit [Remote host closed the connection]
mansi has joined #ruby
cj3kim has joined #ruby
<mzdravkov>
when I yield self to block, then the block will have to do something like a.apply {|self| self.method1; self.method2}
diegoviola has quit [Quit: WeeChat 0.4.1]
<polysics>
if you use instance_eval, the self inside the scope is set to the receiver
<polysics>
also, shameless plug for our telephony framework :P
<sevenseacat>
git st
<sevenseacat>
wrooong window
T_T has quit [Remote host closed the connection]
<polysics>
you ain't stashing us!
sayan has joined #ruby
<sevenseacat>
its my shortcut for status, not stash :P
<polysics>
so, no one ever had to test Net::SSH using RSpec?
mansi has quit [Ping timeout: 245 seconds]
<polysics>
I am fine then, thanks for asking
Hanmac has joined #ruby
<sevenseacat>
:P
<polysics>
:)
tonni has joined #ruby
<polysics>
I wonder why people don't write test framework agnostic spec helpers
aganov has joined #ruby
_Minos_ has quit [Ping timeout: 245 seconds]
braincra- has joined #ruby
ahawkins has joined #ruby
Kricir has joined #ruby
timonv has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
braincrash has quit [Ping timeout: 264 seconds]
senayar has joined #ruby
callenb has joined #ruby
softgr has joined #ruby
<softgr>
ciao
<softgr>
!list
mercwithamouth has joined #ruby
softgr has left #ruby [#ruby]
Kricir has quit [Ping timeout: 245 seconds]
<sevenseacat>
this is so weird, i have two projects, one is stuck on ree, the other just got given the go-ahead to use ruby 2.1
softgr has joined #ruby
* sevenseacat
jumps back and forth
claymore has joined #ruby
<softgr>
ciao
<softgr>
!list
jbpros has joined #ruby
<sevenseacat>
buon pomeriggio (sp?)
tonni has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
marius has quit [Quit: x]
<softgr>
!list
softgr has quit [Client Quit]
jbrechtel has quit [Quit: Lost terminal]
ephemerian has joined #ruby
i_s has joined #ruby
paolooo has joined #ruby
okinomo has quit [Ping timeout: 268 seconds]
scottstamp is now known as zz_scottstamp
jbpros has quit [Ping timeout: 245 seconds]
<polysics>
ciao :)
<polysics>
that's spelled correcty
tatsuya_o has quit [Remote host closed the connection]
toah has joined #ruby
einarj has joined #ruby
Bry8Star{T2 has quit [Remote host closed the connection]
einarj has quit [Remote host closed the connection]
<sevenseacat>
\o/
<sevenseacat>
i remember something from six years of elementary school italian
<polysics>
so, just loading that Net::SSH::Test helper borks everything
i_s has quit [Ping timeout: 240 seconds]
ewnd9 has quit [Ping timeout: 256 seconds]
<polysics>
my daughters are learning english in preparation for a possible move to the US :)
jbpros has joined #ruby
<polysics>
question: how does everybody test Net::SSH? Just mock the shit out of it?
<sevenseacat>
i havent tested it before >_>
<polysics>
I would love to get more meaningful tests, by itself the "all mocks" approach does not test much
Bry8Star{T2 has joined #ruby
<polysics>
I might even jsut not test it
brum has joined #ruby
<polysics>
as I obviously know mocking everything out works :)
obs has joined #ruby
snovak has joined #ruby
tatsuya_o has joined #ruby
aagdbl has quit [Quit: Leaving.]
Bry8Star{T2 has quit [Client Quit]
axsuul has joined #ruby
tonni has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
brum has quit [Read error: Operation timed out]
andikr has joined #ruby
colonolGron has joined #ruby
snovak has quit [Ping timeout: 252 seconds]
camilasan has joined #ruby
Bry8Star{T2 has joined #ruby
lurch_ has joined #ruby
nbrosnahan has joined #ruby
aagdbl has joined #ruby
blaxter_ has joined #ruby
threesome has joined #ruby
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
Coffers has joined #ruby
ewnd9 has joined #ruby
pootler has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
tgraham has joined #ruby
xjiujiu has joined #ruby
DanKnox is now known as DanKnox_away
aagdbl has quit [Quit: Leaving.]
snyp has joined #ruby
zeade has quit [Quit: Leaving.]
browndawg has quit [Quit: Leaving.]
okinomo has joined #ruby
vlad_starkov has joined #ruby
tesuji has joined #ruby
tgraham has quit [Ping timeout: 256 seconds]
tonni has quit [Remote host closed the connection]
quoin has joined #ruby
Macaveli has quit [Quit: Computer has gone to sleep.]
lurch_ has left #ruby [#ruby]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
lurch_ has joined #ruby
xjiujiu has joined #ruby
Macaveli has joined #ruby
|jemc| has joined #ruby
toah has quit [Ping timeout: 246 seconds]
platzhirsch has left #ruby [#ruby]
bartocc has joined #ruby
quoin has quit [Ping timeout: 268 seconds]
maroloccio has joined #ruby
fgo has quit [Remote host closed the connection]
troessner has joined #ruby
adambeynon has joined #ruby
strk has joined #ruby
YaNakilon has quit [Ping timeout: 264 seconds]
kaspergrubbe has joined #ruby
<strk>
I get this error: [ undefined method `username=' ] when doing: [ user = User.new; user.username = 'something' ]
gianlucadv has quit [Ping timeout: 260 seconds]
dawkirst has joined #ruby
<strk>
but the _same_ syntax works in another file, does it sound like a missing include or similar ?
<sevenseacat>
strk: your User has no username setter
dodosan has joined #ruby
<sevenseacat>
where are you defining it?
kil0byte_ has joined #ruby
brum has joined #ruby
<strk>
sevenseacat: it does, and it works in another place. It's defined in app/models/user.rb, works when used by lib/tasks/setup.rake, doesn't when used by spec/support/factories/users.rb
YaNakilon has joined #ruby
<sevenseacat>
ah, rails
<strk>
neither of the two have something that looks like an include
<strk>
should I ask in #rails ?
<sevenseacat>
so, show the definition
clocKwize has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
<canton7>
strk, make sure the 'username' field exists in the table
<strk>
oh, it could be that I'm using two different databases
dodosan has quit [Ping timeout: 240 seconds]
<strk>
that'd explain
<canton7>
sequel models dynamically get attributes depending on the table they represent
<strk>
carto_db_development indeed has the users table with its username field, while carto_db_test is empty
<canton7>
that'll be it
* strk
checks db logs
brum has quit [Ping timeout: 240 seconds]
<polysics>
my money is on "your test db is not up to date"
<polysics>
always bites me too
<strk>
polysics: none of my db are ever up to date, indeed :>
<strk>
so the rake db:migrate thing doesn't do that for all envs does it ?
* strk
confirms the db in use is the empty one
<polysics>
rake db:test:prepare
mansi has joined #ruby
Behi has quit [Ping timeout: 240 seconds]
threesome has quit [Ping timeout: 245 seconds]
<polysics>
don't you LOVE a CI build passing message? :)
iravan has quit [Quit: Leaving.]
<sevenseacat>
yes :D
seanmccann has joined #ruby
<polysics>
it does not count if you commented out failing tests, though - happened once :)
Markvilla has joined #ruby
RDash[AW] is now known as RDash
mansi has quit [Ping timeout: 264 seconds]
svector has joined #ruby
Markvilla has quit [Client Quit]
<sevenseacat>
i have known people to pend failing tests to make builds pass, and then never come back to them
Markvilla has joined #ruby
browndawg has joined #ruby
<strk>
polysics: db:test:prepare did it, thank you !
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kricir has joined #ruby
<polysics>
always gets me too :)
tonni has joined #ruby
<strk>
I'll write a Makefile as soon as I figure how you're supposed to run test :>
Jdubs_ has quit [Remote host closed the connection]
Jdubs has joined #ruby
xjiujiu has quit [Read error: Connection reset by peer]
beilabs_ has quit [Ping timeout: 264 seconds]
mzdravkov has left #ruby [#ruby]
xjiujiu has joined #ruby
<strk>
it looks like simply running "rspec" does run lots of tests, maybe I finally figured how's done :>
funburn has joined #ruby
<polysics>
are they all green? :)
Kricir has quit [Ping timeout: 240 seconds]
<strk>
no way
<strk>
speaking of which... is passing args to rspec the only way to limit the tests being run ?
pygospa has quit [Disconnected by services]
* strk
always comes back to disable tests, soon or late :)
TheRealPygo has joined #ruby
<polysics>
you can use focus: true, or flag tests in groups
<polysics>
but really
<polysics>
use guard
<polysics>
and always run all tests
<polysics>
your teammates will thank you
<strk>
what's guard ?
Jdubs has quit [Ping timeout: 245 seconds]
jlebrech has joined #ruby
timonv has quit [Remote host closed the connection]
funburn has quit [Client Quit]
elaptics`away is now known as elaptics
jonathanwallace has joined #ruby
OdNairy has joined #ruby
enriclluelles has joined #ruby
mikecmpbll has joined #ruby
noname001 has joined #ruby
fgo has joined #ruby
dawkirst has quit [Ping timeout: 248 seconds]
vlad_sta_ has joined #ruby
beilabs_ has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
<polysics>
guard continuosly runs your tests
<sevenseacat>
when it feels like it
<polysics>
when you save a file, it will run the tests for that file only
* sevenseacat
not a fan of guard atm
julweber has joined #ruby
<polysics>
it's not perfect, but what is?
<sevenseacat>
this is a fair point.
<polysics>
I like the fact that it cuts some startup time at best
<strk>
polysics: gotcha, a bit soon for that. First must pass, then must be _quick_, then we'll see. We do have a buildbot running on push.
<polysics>
you can configure it to behave a few different way
_maes_ has joined #ruby
kil0byte has joined #ruby
<polysics>
my favorite is: run all tests on startup, run changed file only test on save. if a file that was red goes green, run the whole suite again.
allsystemsarego has joined #ruby
<polysics>
buildbot adds time to your work as you have to actually wait for it and check for input
julweber has quit [Remote host closed the connection]
<polysics>
guard, when it works, becomes almost subliminal
snovak has joined #ruby
Kar- has joined #ruby
<polysics>
sevenseacat: what's wrong with guard anyway? it does run tests depending on weather or what you ate on occasion but other than that it's fine :)
kil0byte_ has quit [Ping timeout: 248 seconds]
<sevenseacat>
its developed a nasty habit of a) only watching some of the files i tell it to, and b) hanging when i save unwatched files
_maes_ has quit [Ping timeout: 245 seconds]
hogeo has quit [Remote host closed the connection]
hogeo has joined #ruby
<strk>
I think developers should have an active role in testing their changes. Surely must be simple, but subliminal doesn't help growing them :)
fgo has quit [Ping timeout: 248 seconds]
okinomo has quit [Ping timeout: 260 seconds]
snovak has quit [Ping timeout: 246 seconds]
crunch-choco has joined #ruby
predator117 has joined #ruby
<polysics>
we just corner people that don't write specs and threaten them with knives
<polysics>
"SPECS OR I SHANK YOU" works well
kil0byte_ has joined #ruby
<polysics>
we are past the "good habit" point, not testing is unacceptable.
<strk>
yes, that's the right way to do things :)
shaunbaker has joined #ruby
predator217 has quit [Ping timeout: 245 seconds]
kil0byte has quit [Ping timeout: 240 seconds]
dawkirst has joined #ruby
ananthakumaran has joined #ruby
shaunbak_ has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
Bry8Star{T2 has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
cj3kim has quit [Remote host closed the connection]
freakazoid0223 has joined #ruby
cj3kim has joined #ruby
ananthakumaran1 has quit [Ping timeout: 252 seconds]
tgraham has joined #ruby
soc42 has quit [Remote host closed the connection]
tonni has quit [Remote host closed the connection]
krandi has quit [Remote host closed the connection]
andikr has quit [Ping timeout: 240 seconds]
aagdbl has quit [Disconnected by services]
visof has quit [Client Quit]
aagdbl1 is now known as aagdbl
sevenseacat has quit [Quit: Leaving.]
brum has quit [Ping timeout: 248 seconds]
mansi has joined #ruby
dangerousdave has joined #ruby
Hanmac has joined #ruby
mansi has quit [Ping timeout: 248 seconds]
staafl has joined #ruby
abk has joined #ruby
nari has quit [Ping timeout: 264 seconds]
Kricir has joined #ruby
mklappstuhl has joined #ruby
maasha has joined #ruby
toah has joined #ruby
<maasha>
Hi
dhruvasagar has quit [Ping timeout: 240 seconds]
<maasha>
Me got problem: bzip2-ruby gem fails to compile on Ruby version 2. There is a bugfix on github, but it was never pushed to the gem repository. What can I do?
<snyp>
If classes are objects of type Class, and Class is a subclass of Module and Module that of Object, is Object the only "class type" that has is itself not an object? Otherwise if Object were of type Class, it would be a circular recursion...
<g0th>
that should give me the divisors of n
einarj has joined #ruby
<maasha>
hoelzro: ok, so something is now different. Regular 'gem install bzip2-ruby' fails. Adding the fix from the issue tracker and rerunning 'gem install bzip2-ruby' fails with the same error
<hoelzro>
well
<hoelzro>
gem install bzip2-ruby will just fetch it from the repository
<hoelzro>
it won't install what you've just built
<g0th>
lets make it simpler
<hoelzro>
you probably have to do something like gem install ./bzip2-ruby.*.gem
<hoelzro>
g0th: please do =)
<g0th>
how do I get the biggest key of a hash?
mengu has joined #ruby
<g0th>
(and the smallest)
mengu has quit [Changing host]
mengu has joined #ruby
<hoelzro>
iterate over the keys and keep track of the min/max
<g0th>
can you give a nice line?
<g0th>
I can somehow manage
<g0th>
I am trying to improve my style
<hoelzro>
I understand that you want to get all factors of a number
<hoelzro>
my style isn't very good =/
<maasha>
hoelzro: and where would that *.gem file be located?
<hoelzro>
maasha: didn't you just build it?
<hoelzro>
via gem build?
<g0th>
hoelzro: I want to find "candidate" ks
Elhu has joined #ruby
<canton7>
g0th, my_hash.keys.min and .max
<g0th>
thanks!
<hoelzro>
canton7 to the rescue!
<snyp>
anyone?
<maasha>
hoelzro: hm, I need to research gem
LMolr has quit [Ping timeout: 252 seconds]
<michael_mbp>
anyone ?
<hoelzro>
snyp: so what you're asking is if Object.class is a class?
<hoelzro>
michael_mbp: no idea, sorry
Domon has joined #ruby
<michael_mbp>
thoughts on const_missing(name); super # => nil; end ?
<snyp>
yeah , but that's a cicular reference thingy..
<michael_mbp>
hoelzro: np...
<snyp>
so how does it even work?
Nenor has quit [Quit: Nenor]
nari has joined #ruby
soba has quit [Ping timeout: 252 seconds]
* hoelzro
shrugs
<hoelzro>
the parent directory of / is /
tgraham has joined #ruby
<hoelzro>
that seems to work =)
<g0th>
hmm
<hoelzro>
I think Ruby understands where to stop at some level
<hoelzro>
I confess, I haven't dug into that part much
<g0th>
the maximum of the absolute values of the keys of two hashes
<snyp>
I will read some articles and try understanding it.
snyp has quit [Quit: leaving]
<hoelzro>
the Ruby source would probably be useful too!
svector has quit [Read error: Connection timed out]
<g0th>
nice
<g0th>
the "+" concatenates the arrays?
svector has joined #ruby
<hoelzro>
mhmm
tgraham has quit [Ping timeout: 256 seconds]
thisirs has joined #ruby
cj3kim has quit [Remote host closed the connection]
jbpros has quit [Quit: jbpros]
quoin has joined #ruby
Nenor has joined #ruby
swordsmanz has joined #ruby
LMolr has joined #ruby
quoin has quit [Ping timeout: 260 seconds]
filipe__ has quit [Ping timeout: 245 seconds]
<atmosx>
I'm trying to write some basic rspec for helpers (sinatra) and I'm getting a an error... related to a module method. https://gist.github.com/atmosx/6697597 any ideas on why the method is not recognized?
filipe__ has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
<atmosx>
Okay, I figure it out, removing the class the calling directly the module did the trick
pootler_ has joined #ruby
pootler has quit [Read error: Connection reset by peer]
clocKwize has quit [Quit: Cya]
vlad_starkov has joined #ruby
<atmosx>
Bdexit
mengu has quit [Quit: This computer has gone to sleep]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
brum has joined #ruby
xjiujiu has joined #ruby
Xeago_ has quit [Remote host closed the connection]
Xeago has joined #ruby
abk has quit [Ping timeout: 240 seconds]
soba has joined #ruby
mansi has joined #ruby
nfk has quit [Read error: Connection reset by peer]
brum has quit [Ping timeout: 248 seconds]
Michae___ has joined #ruby
Xeago has quit [Ping timeout: 264 seconds]
lyanchih has quit [Quit: lyanchih]
zeel has joined #ruby
vlad_starkov has quit [Ping timeout: 246 seconds]
abk has joined #ruby
xk_id has quit [Quit:
chairabanta has joined #ruby
mansi has quit [Ping timeout: 245 seconds]
<coderhs>
hey what does *rights variable mean in ruby
<jlebrech>
if i wanted to do filepath.split(slash)[-1] to find a filename is there a ruby method to output a "/" or "\" or should i just use File.basename?
bartocc has joined #ruby
chairabanta has joined #ruby
vince_prignano has joined #ruby
tvw has joined #ruby
amacgregor has joined #ruby
krz has quit [Quit: krz]
ehaliewicz has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
snovak has joined #ruby
toah has quit [Ping timeout: 256 seconds]
dodosan has joined #ruby
brum has joined #ruby
camilasa_ has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
m00nlight has quit [Remote host closed the connection]
Hanmac has quit [Quit: Leaving.]
quoin has joined #ruby
lyanchih has joined #ruby
dodosan has quit [Ping timeout: 246 seconds]
snovak has quit [Ping timeout: 245 seconds]
intuxicated has joined #ruby
brum has quit [Ping timeout: 256 seconds]
<joonty>
jlebrech: are you looking for File::SEPARATOR?
<arussel`>
Hi, I'm a not a ruby but I need to debug some ruby app. Where can I find a tutorial on setting up good dev env ideally usign intellij ? (I want to know how to start a program, put the lib where needs to be, debug ...)
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
Xanderby has joined #ruby
threesome has quit [Ping timeout: 256 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
Afal has joined #ruby
Afal has left #ruby [#ruby]
mansi has quit [Ping timeout: 256 seconds]
Hanmac has quit [Read error: Operation timed out]
g0bl1n has joined #ruby
nanashiRei has joined #ruby
Stalkr^ has joined #ruby
Nenor has quit [Quit: Nenor]
aagdbl has joined #ruby
Banistergalaxy has quit [Ping timeout: 240 seconds]
Lauritz_ has joined #ruby
Stalkr^ has quit [Read error: Connection reset by peer]
pootler has joined #ruby
Xeago has joined #ruby
fgo has joined #ruby
Kricir has joined #ruby
mmozuras has joined #ruby
sailias has joined #ruby
Hanmac has joined #ruby
pootler_ has joined #ruby
nisstyre has quit [Quit: Leaving]
<nanashiRei>
Hi, i've no idea about ruby but i get one, i guess rather small error in chef from a recipie, i fail to see what's wrong. http://pastie.org/8354164
pootler has quit [Read error: Connection reset by peer]
<nanashiRei>
if someone could help me
aagdbl1 has quit [Ping timeout: 240 seconds]
KobraKao has quit [Ping timeout: 246 seconds]
Xeago has quit [Ping timeout: 245 seconds]
jbpros has joined #ruby
evelyette_ has joined #ruby
<evelyette_>
hi
polysics has left #ruby [#ruby]
sailias has quit [Ping timeout: 268 seconds]
Kricir has quit [Ping timeout: 268 seconds]
justsee has quit [Ping timeout: 248 seconds]
<evelyette_>
I'm getting the following error when trying to run an application: "undefined method `source_index' for Gem:Module", I'm guessing it's because the application is picking up ruby 1.9.1, which is installed in the system, but I'm using ruby 1.9.3 installed by RVM. I'm not sure how to resolve that; any ideas?
atno__ is now known as atno
pushpak has joined #ruby
arkiver has joined #ruby
ananthakumaran has joined #ruby
Domon has quit [Remote host closed the connection]
aagdbl1 has joined #ruby
Domon has joined #ruby
jbpros has quit [Client Quit]
shevy has quit [Ping timeout: 260 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
fmcgeough has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
abk has quit [Ping timeout: 252 seconds]
svector has quit [Read error: Connection timed out]
ananthakumaran1 has quit [Ping timeout: 268 seconds]
jost has joined #ruby
aagdbl has quit [Ping timeout: 245 seconds]
ananthakumaran has quit [Read error: Connection reset by peer]
Domon has quit [Ping timeout: 246 seconds]
svector has joined #ruby
Ox6abe has joined #ruby
dhruvasagar has joined #ruby
<jost>
Hi! I'm trying to install some gems using the bundler, but it freezes at the "Fetching source index from https://rubygems.org/" step. The freeze seems not to be due to a long downloading time, as network utilization stays down. What could be the reason, how to solve that? Bundler version is 1.3.5, and I'm trying to fetch a single gem for a redmine plugin.
<coderhs>
is it a bug or is it suppose to work like that
dodosan has quit [Ping timeout: 240 seconds]
gwb3 has joined #ruby
brum has quit [Ping timeout: 245 seconds]
ananthakumaran has quit [Read error: Connection reset by peer]
<coderhs>
i tried it in ruby 2.0.0p0
pushpak has quit [Read error: Connection reset by peer]
tgraham has joined #ruby
pootler has quit [Read error: Connection reset by peer]
tkuchiki has quit [Remote host closed the connection]
siwica has joined #ruby
aagdbl1 has quit [Ping timeout: 240 seconds]
pootler has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
tesuji has quit [Read error: Connection reset by peer]
abk has joined #ruby
KobraKao has joined #ruby
Xeago has joined #ruby
Seb has left #ruby [#ruby]
xjiujiu has joined #ruby
svector has quit [Ping timeout: 245 seconds]
mayday_jay has quit [Quit: c ya!]
<xybre>
Its supposed to work like that. What else would you expect it to do?
Popple has quit [Quit: Computer has gone to sleep.]
Bofu2U has joined #ruby
angoragoats has joined #ruby
<Dwarf>
Anyone got any experience with datamapper? In some cases it fails to generate a record
Banistergalaxy has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
svector has joined #ruby
failshell has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
<jost>
sorry to nag you... but do you have any hints about a slow bundle install, hanging at the "Fetching source index from https://rubygems.org/" step? It takes about 500M or memory when it hangs, and it does not seem use any network
ananthakumaran has joined #ruby
failshell has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
pranny1 has joined #ruby
pranny has quit [Read error: Connection reset by peer]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
tgraham has quit [Quit: Leaving...]
tagrudev has quit [Remote host closed the connection]
krawchyk_ has joined #ruby
siwica has quit [Ping timeout: 252 seconds]
Es0teric has joined #ruby
axsuul has quit [Ping timeout: 268 seconds]
colonolGron has quit [Ping timeout: 248 seconds]
<coderhs>
xybre: well return the value even if i do not assign it to a variable
krawchyk_ has quit [Remote host closed the connection]
krawchyk has joined #ruby
graydot has quit [Quit: graydot]
lkba has quit [Ping timeout: 260 seconds]
brum has joined #ruby
lyanchih has quit [Ping timeout: 264 seconds]
enriclluelles has quit [Remote host closed the connection]
<gcds>
C freezes in while until I kill ruby script
_Minos_ has quit [Ping timeout: 245 seconds]
phantasm66 has joined #ruby
<gcds>
stuck maybe not freezes*
devoldmx has joined #ruby
dhruvasagar has quit [Ping timeout: 256 seconds]
JPascal has joined #ruby
JPascal has quit [Max SendQ exceeded]
Kricir has joined #ruby
Behi has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JPascal has joined #ruby
JPascal has quit [Max SendQ exceeded]
<g0th>
hi
axl_ has joined #ruby
JPascal has joined #ruby
julweber_ has joined #ruby
intuxicated has joined #ruby
Monie has joined #ruby
mlpinit has quit [Remote host closed the connection]
mlpinit has joined #ruby
julweber has quit [Ping timeout: 240 seconds]
<g0th>
lets say I have a class Foo and for Foo objects I would like to access foo.var, what should happen if I do that is: if "var" isn't set yet it should be calculated according to a function, if it is set just return the calculated value
<lupine>
attr_accessor :var ; def var ; super || ... ; end
<lupine>
sort of, is
<g0th>
ok
<lupine>
...h
lfox has joined #ruby
<g0th>
so I have attr_accessor :var
<g0th>
but I define a var function
Kricir has quit [Ping timeout: 246 seconds]
<lupine>
rather than super, i'd probably actually go for @var ||= (calculate-value-here)
<lupine>
aye, and the latter overrides the former
<lupine>
if you're not calling super, you can just have attr_writer :var
<g0th>
nice
v0n has joined #ruby
<g0th>
hmm
strk has left #ruby [#ruby]
<g0th>
I can't do: def var; @var || ... ?
<g0th>
hmm or I guess that's what you wrote roughly?
<lupine>
you could - that will recalculate the value every time
Anticom has joined #ruby
<g0th>
a||b just returns a if that is set?
<g0th>
so why would it recalculate?
<lupine>
yes, b will never be evaluated if a is anything other than false or nil
<lupine>
because a will never be set, in that fragment
bobinator60_ has joined #ruby
<g0th>
aaarg
<lupine>
if someone called your var = "my new value", b would stop being evaluate
<g0th>
right
<lupine>
...d
siwica has joined #ruby
<g0th>
thanks
<lupine>
a ||= b will set a if it's not already set
<lupine>
so b will only be evaluated once, until something else unsets a
<g0th>
so I have to do @var ||= as you suggested
vince_prignano has quit [Ping timeout: 252 seconds]
<lupine>
if the calculation is complicated, it may be worth it
jprovazn has joined #ruby
angusiguess has joined #ruby
snyp has joined #ruby
<lupine>
the other thing to be aware of is that if someone does foo.var = false - they'll never see it. they'll get whatever b evaluates to instead
<lupine>
to fix that, you'd need a guard variable that states whether var= has been called or not, rather than just relying on the value of var
burlyscudd has joined #ruby
vince_prignano has joined #ruby
<g0th>
if someone does foo.var he gets the method or the @var?
<g0th>
foo.var() method, foo.var var?
<g0th>
hmm
colonolGron has quit [Ping timeout: 245 seconds]
<g0th>
sorry for asking such basic questions
<lupine>
there's no difference between foo.var, or foo.var() - they both return the value the def foo ... end method returns
Emmanuel_Chanel has quit [Ping timeout: 245 seconds]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
<lupine>
the attr_writer :var call creates a method like def foo=(new_val) ; @var = new_val ; end
Xeago has joined #ruby
xjiujiu has joined #ruby
<lupine>
(and attr_reader does something similar, a method that just returns the value of @var )
xjiujiu has quit [Max SendQ exceeded]
snovak has joined #ruby
<g0th>
ah silly me
<g0th>
the outside will never get @var
<g0th>
it will always get the method
<g0th>
that's what the attr_... is for
xjiujiu has joined #ruby
<lupine>
it could call foo.instance_variable_get("@var") - but that is evil
<g0th>
now if the method gives the internal @var, fine
peregrine81 has joined #ruby
<g0th>
ok thanks
cj3kim has joined #ruby
sayan has quit [Ping timeout: 246 seconds]
NinjaPenguin has joined #ruby
aagdbl has quit [Quit: Leaving.]
KobraKao has quit [Ping timeout: 252 seconds]
sambao21 has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
ananthakumaran has quit [Quit: Leaving.]
KobraKao has joined #ruby
devoldmx has joined #ruby
snyp has quit [Quit: leaving]
xjiujiu has quit [Client Quit]
tatsuya_o has joined #ruby
joofsh has joined #ruby
xjiujiu has joined #ruby
nhhagen has joined #ruby
weirdpercent has joined #ruby
deception has joined #ruby
interactionjaxsn has joined #ruby
<weirdpercent>
I have a unique challenge: in DOM traversal with Nokogiri, I need to select next_sibling x times, but my result is just returning the first sibling three for example
bean__ has joined #ruby
vlad_sta_ has joined #ruby
vlad_starkov has quit [Read error: No route to host]
Aryasam has joined #ruby
v0n has quit [Ping timeout: 264 seconds]
pwh has joined #ruby
codecop has quit [Remote host closed the connection]
prismate has joined #ruby
v0n has joined #ruby
Naoe-Kanno has joined #ruby
blaxter_ has quit [Quit: foo]
devoldmx3 has joined #ruby
SHyx0rmZ has quit [Ping timeout: 246 seconds]
iamjarvo has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
beilabs_ has quit [Ping timeout: 240 seconds]
pwh has quit [Client Quit]
freerobby has joined #ruby
iamjarvo has quit [Remote host closed the connection]
iamjarvo has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
evenix has joined #ruby
devoldmx has joined #ruby
xk_id has joined #ruby
h_kon has quit [Remote host closed the connection]
gwb3 has quit [Remote host closed the connection]
mansi has joined #ruby
Michae___ has quit [Remote host closed the connection]
devoldmx3 has quit [Ping timeout: 264 seconds]
burlyscudd has joined #ruby
mansi has quit [Read error: Connection reset by peer]
larissa has joined #ruby
mercwithamouth has quit [Ping timeout: 256 seconds]
tabolario has joined #ruby
mansi has joined #ruby
aryaching has joined #ruby
lkba has joined #ruby
anonymuse has joined #ruby
<weirdpercent>
how can I get "next" sibling x number of times using Nokogiri DOM traversal?
jlast has joined #ruby
Monie has quit [Read error: Connection reset by peer]
<Hanmac>
weirdpercent: call #next_sibilng in a #inject loop
johnjohnson has joined #ruby
BillCriswell has joined #ruby
anonymuse has quit [Remote host closed the connection]
beilabs_ has joined #ruby
<Hanmac>
weirdpercent: there is also an #css method with this you can use the css selectors to get the siblings
senayar has quit [Ping timeout: 252 seconds]
<weirdpercent>
hanman: I will try an inject loop, I am using a css selector, but rather than writing next.next.next, I want something like 3.times do .next
<weirdpercent>
hanmac:
Soda has quit [Ping timeout: 264 seconds]
<Hanmac>
thats why inject
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
elaptics is now known as elaptics`away
xjiujiu has joined #ruby
leehambley has quit [Ping timeout: 264 seconds]
Monie has joined #ruby
senayar_ has quit [Remote host closed the connection]
<st0ne2th1dge>
tgraham: I am creating it myself, with the purpose of not being able to create it in the future lets say
gazarsgo has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
<tgraham>
st0ne2th1dge: if you're creating it yourself then you'll want to use the correct yaml syntax to actually set the key/value pair. Unless I'm misunderstanding.
devoldmx has joined #ruby
mlpinit has quit [Ping timeout: 240 seconds]
bobinator60_ has joined #ruby
<bean__>
yeah, proper yaml would help
colonolGron has quit [Ping timeout: 245 seconds]
MrThePlague has joined #ruby
platzhirsch has joined #ruby
<g0th>
can I do: (foo) ? bar
<g0th>
or do I have to do something like: (foo) ? bar : donothing()
<g0th>
nil
<bean__>
that seems overly complicated
coderhs has quit [Quit: Leaving]
<st0ne2th1dge>
tgraham: The reason i created the one with the faulty syntax was so i could create a check that detects faulty syntax
fourq has joined #ruby
mlpinit has joined #ruby
<st0ne2th1dge>
so I can use it in a CI
nfk has quit [Read error: Connection reset by peer]
<tgraham>
Ok, so you just want to validate the yaml?
dexi has joined #ruby
<tgraham>
Try something like kwalify.
kevind has joined #ruby
DanKnox_away is now known as DanKnox
* bean__
is not a big fan of testing negatives
maletor has joined #ruby
khushildep has quit [Read error: Connection reset by peer]
khushildep has joined #ruby
dexi has left #ruby ["Leaving"]
toddWork_ has joined #ruby
<platzhirsch>
bean__: then why not drop testing completely
<platzhirsch>
err... I meant, how come?
<bean__>
because, why not just test that your test /does something correctly/
cads has quit [Ping timeout: 264 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bean__>
seems like overtesting to me if one of your tests is to make sure that your yaml parses correctly. Why not just test what you're going to use that yaml for
<bean__>
heh
kil0byte has quit [Remote host closed the connection]
<cout>
I prefer to test that my code doesn't not do something unincorrectly
<st0ne2th1dge>
tgraham: yessir!
mary5030 has joined #ruby
braoru has quit [Remote host closed the connection]
nfk has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
burlyscudd has quit [Quit: Leaving.]
petey has joined #ruby
aryaching_ has joined #ruby
nikeita has quit [Quit: sleep]
burlyscudd has joined #ruby
freezey has quit [Remote host closed the connection]
gyzmodo has joined #ruby
jerius has quit [Ping timeout: 245 seconds]
Xiti has quit [Read error: Connection reset by peer]
maasha has quit [Ping timeout: 250 seconds]
nikeita has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
Xiti has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
aryaching has quit [Ping timeout: 256 seconds]
devoldmx has joined #ruby
jlast_ has joined #ruby
brum has quit [Remote host closed the connection]
jlast_ has quit [Remote host closed the connection]
brupeb has quit [Remote host closed the connection]
jerius has joined #ruby
senayar_ has joined #ruby
rhys has joined #ruby
Aryasam has quit [Ping timeout: 268 seconds]
Banistergalaxy has joined #ruby
dhruvasagar has quit [Ping timeout: 245 seconds]
Aryasam has joined #ruby
jlast_ has joined #ruby
d2dchat has joined #ruby
GeissT has quit [Read error: Connection reset by peer]
mlpinit has quit [Read error: Connection reset by peer]
<dr_mittens>
bean__: yeah - the server is the same for both the ruby client and the scala client so if TCP_NODELAY isn't set on the server, than I would think that would affect both clients equally
Spami has quit [Quit: This computer has gone to sleep]
senayar_ has joined #ruby
<cout>
yeah I don't think nagle is the issue here
<dr_mittens>
bean__: but I can see in the server code that TCP_NODELAY is set on it (server is written in scala)
havenwood has joined #ruby
<bean__>
I guess I can't help without seeing code. heh
* bean__
knows scala to be fast.
<dr_mittens>
bean__: totally understand about seeing the code
Macaveli has quit [Quit: Computer has gone to sleep.]
_maes_ has joined #ruby
mengu has quit [Remote host closed the connection]
senayar_ has quit [Remote host closed the connection]
seggioo has joined #ruby
cody-- has joined #ruby
senayar_ has joined #ruby
Kricir has quit [Read error: Connection reset by peer]
Kricir_ has joined #ruby
dhruvasagar has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
<cout>
dr_mittens: well I can't reproduce your result on localhost
brum has joined #ruby
zz_michael_mbp is now known as michael_mbp
senayar has quit [Ping timeout: 260 seconds]
monkegjinni has joined #ruby
<cout>
dr_mittens: is it possible that the read on scala is returning less than 100MB?
<dr_mittens>
cout: yeah - neither can I - on localhost all is great - that's what has me pulling my hair out - thanks for taking the time to try to reproduce it though
browndawg has quit [Ping timeout: 248 seconds]
codelette has joined #ruby
<dr_mittens>
cout: no - we piped the output to a file and, sure enough, it was 100MB
Monie has quit [Client Quit]
anderSon has joined #ruby
sectionme has quit [Ping timeout: 260 seconds]
<cout>
dr_mittens: try running strace on the ruby process and the scala process to see if there is a difference
<dr_mittens>
cout: k
b00stfr3ak has joined #ruby
b00stfr3ak has joined #ruby
b00stfr3ak has quit [Changing host]
einarj has quit [Ping timeout: 256 seconds]
<cout>
strace -T preferably
gwb3 has quit [Remote host closed the connection]
nfk has quit [Ping timeout: 264 seconds]
maoko has joined #ruby
OdNairy has quit [Ping timeout: 240 seconds]
bobinator60_ has quit [Quit: bobinator60_]
paolooo has quit [Ping timeout: 250 seconds]
whunt has joined #ruby
brum has quit [Ping timeout: 245 seconds]
nfk has joined #ruby
<rien>
how do I write a function that creates a local variable in the caller's site?
brupeb has joined #ruby
tgraham has quit [Quit: Leaving...]
monkegjinni has quit [Remote host closed the connection]
geggam_ has joined #ruby
deception has quit [Ping timeout: 256 seconds]
mrsolo has joined #ruby
prism has joined #ruby
prism is now known as pantaloon
freezey has joined #ruby
billiam has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
<jacobat>
rien: I don't think you can. You can assign the return value from the method call.
<cout>
(which banister should be telling you not to actually do in real code)
<banister>
rien but even then, you're not creating a local variable
<banister>
rien you can only modify ones that already exist
xiphias has joined #ruby
jacktrick has joined #ruby
<rien>
banister: yeah apparently I just found a thread explaining that even with eval("x = 1", call_site) that the rest of the code in call_site won't see x... https://www.ruby-forum.com/topic/4415408
<cout>
banister: surely you can use that to create dynvars, right?
<_mikeg>
need a temporary directory. was going to use mktmpdir but would like to specify where the temp dir is created. anyone know a way of doing that. seems it currently uses the system temp dir path by default
<jacobat>
"Do not use this in production apps" :)
<banister>
cout not in my experience
maletor has quit [Quit: Computer has gone to sleep.]
<rien>
that's a real shame that local variables can't be created in macros
<cout>
banister: could be that behavior changed then, or I might be remembering wrong
GoldenGiant has quit [Ping timeout: 240 seconds]
<banister>
rien just use an ivar :)
momomomomo has joined #ruby
prismate has quit [Ping timeout: 256 seconds]
brianpWins has quit [Quit: brianpWins]
<cout>
rien: ruby doesn't have macros :)
<Dwarf>
Anyone got any experience with datamapper? In some cases it fails to generate a record for me, oddly
devoldmx3 has joined #ruby
Monie has joined #ruby
<rien>
banister: I don't want to be forced to use objects right now in this particular place in my code
<banister>
rien 'ivars' are not objects
<banister>
they're just scoped differently to locals
<rien>
banister: ivar == instance_var right?
<banister>
rien yes, so they're a variable that has scope throughout the whole object, they're not objects themselves
<rien>
I've never done "@x = 0" inside a function (not in a class ) to see how it behaves
jprovazn is now known as jprovazn_afk
<rien>
banister: right, but there's no object here, so what happens?
Emmanuel_Chanel_ has joined #ruby
alup has quit [Quit: Leaving]
<banister>
rien i think you're pretty confused...
GoldenGiant has joined #ruby
<banister>
rien there's always an object
<rien>
banister: my file.rb has 5 def my_method... not inside a class. I want to create vars/ivars inside each def... metaprogrammatically. I'm not confused.
<banister>
rien but i think i have an idea what you're trying to do, but still you should probably state exactly the problem you're trying to solve
<_mikeg>
figured it out
<banister>
rien then it's inside the 'main' object
Emmanuel_Chanel_ has quit [Max SendQ exceeded]
Bira has joined #ruby
katsrc has joined #ruby
<rien>
banister: then that's a problem because I want the scope of those vars restricted to inside each def.... is that impossible?
Emmanuel_Chanel_ has joined #ruby
browndawg has joined #ruby
devoldmx27 has joined #ruby
<banister>
rien if those are top-level defs, and you're invoking them only at top-level, then the @ivar will be stored on main, and accessed on main
<shevy>
rien the only way how this could work, if you do not use @ivars, would be by mhaving the method pass in those variables
<rien>
I'm not trying to do anything crazy here. this is basic stuff in other languages that allow metaprogramming
browndawg has quit [Max SendQ exceeded]
<shevy>
another way could be to instead use vendor_id as a method call that will return the value
hashpuppy has joined #ruby
intuxicated has quit [Remote host closed the connection]
<shevy>
see, get() is a method call
<rien>
shevy: I'm not opposed to any alternative solution, but whatever I create inside the scope where params was called has to remain there and should not be shared beyond that scope
<shevy>
do/end is almost the same as {}
noop has joined #ruby
maletor has joined #ruby
<banister>
rien it's not possible to do it
siwica has quit [Ping timeout: 252 seconds]
aryaching_ has quit [Ping timeout: 245 seconds]
Bira has quit [Ping timeout: 246 seconds]
browndawg has joined #ruby
maveonair has joined #ruby
<rien>
shevy: I understand how sinatra works and ruby's OO. my questions here are purely about its metaprogramming capabilities.
<shevy>
btw rien
<rien>
banister: any way around it while still keeping the created vars/ivars inside that scope only?
<shevy>
so in save_statement() you initialize vendor_id?
dzhulk has quit [Quit: Leaving.]
<rien>
I don't mind using ivars or methods or whatever, I just can't have the things I'm created be visible beyond the scope they were created in
<rien>
shevy: give me a minute to answer that with more comments :)
proxie has quit []
<shevy>
well the thing is
<shevy>
I am not sure I understand the intent of your code, even if it is pseudo-code
<platzhirsch>
Sometimes I am doubting myself... I used pry-debugging so vividly, but for out of the stand Ruby testing I fired up irb and not pry...
<cout>
rien: you could do this if ruby had macros, but it doesn't. some people have tried to add them (e.g. see rubymacros), but they're not much more than an experiment afaik
<shevy>
then you suddenly have a hardcoded name:
<shevy>
check :vendor_id
nikeita has quit [Quit: sleep]
plotter has quit [Read error: Connection reset by peer]
geekbri has quit [Remote host closed the connection]
<waxjar>
banister: literally it means gone = gone, they're selling all they've got in stock, (usually) at a discount
<rien>
shevy: hopefully that'll make my intent clearer
<banister>
rien you could just set them as methods
<rien>
banister: can you show me?
<shevy>
ok so you basically want to pull out a value from a hash and set corresponding local variables from that
<rien>
yes!
geekbri has joined #ruby
geekbri has quit [Remote host closed the connection]
proxie has joined #ruby
moli has quit [Read error: Connection reset by peer]
<shevy>
if it would be an instance variable, it would be so much easier... with .instance_variable_get :P
moli has joined #ruby
<shevy>
I think that is also the first time I heard someone want to do that
GoldenGiant has quit [Quit: Computer has gone to sleep.]
<banister>
rien sure, just set them as attr_accessors on the singleton class of main, and just assign to them
<rien>
shevy: then you'd have to show me how to make one ad hoc throw-away class each time paramaterize is called... because instance variables are visible through all methods in an object and I want to restrict the scope to the call site
<banister>
rien self.vendor_id = 123456
<jacobat>
Why are you trying to make life so difficult?
<rien>
banister: but then in my other `get '/something_else'` route if it also takes vendor_id then I'm screwed?
T_T has joined #ruby
<shevy>
I think there is no programmatic way to create local variables in ruby
<shevy>
perhaps through some way to eval() perhaps
<banister>
rien no it'll just overwrite it, you only want to use the value for the lifetime of a method right? so it's no issue if it gets overwritten in another method, unless you have multiple threads
<GregLLL>
cout: You suggest that dr_mittens do a strace -T, what values would you look for in there to tell you what may be going on?
robert__ is now known as robert_
__username__ has joined #ruby
GoldenGiant has joined #ruby
<cout>
GregLLL: a large number of read() syscalls maybe
sambao21 has quit [Quit: Computer has gone to sleep.]
<banister>
rien and even if you do have multiple threads, you could just use thread local storage
<rien>
banister: yes only the lifetime of the method. ok I can go with that. I need a bit more help on how to do it but let me phrase my next question...
alekst has quit [Quit: Leaving...]
<banister>
rien so the 'params' method is setting the methods?
<|jemc|>
speaking of thread locals, does anyone know if there are thread-local equivalents for the post-Regexp-match global variables for captures like $1, $2, etc?
duggiefresh has quit [Remote host closed the connection]
<rien>
shevy: you mean the second answer with 6 votes right?
<shevy>
yeah
<shevy>
but that sucks still
<shevy>
he uses eval() twice ...
<cout>
banister: oh interesting, dynvars are set by index now instead of by nae
mlpinit has quit [Ping timeout: 256 seconds]
<cout>
name
<rien>
shevy: just because he wants to, no? couldn't I concat them all in one call?
maveonair has quit [Ping timeout: 256 seconds]
<shevy>
you mean two statements in one eval() ?
kil0byte has quit [Remote host closed the connection]
julweber_ has quit [Remote host closed the connection]
<banister>
shevy rien that code won't work outside of irb
<GregLLL>
cout: I'm new to strace, is it normal for a lot of time spent in "futex"?
<shevy>
rien but that still sucks really ...
<shevy>
looking at that makes me angry
<cout>
GregLLL: depends on what you mean by "a lot"
ravster has left #ruby [#ruby]
sambao21 has joined #ruby
<cout>
GregLLL: that might be the GVL or it might be something else
geekbri has joined #ruby
<mzdravkov>
hey guys, I was thinking it would be nice to have such method in Object: https://gist.github.com/mzdravkov/6701867 Is there something like that already done, that I can't find? Do you like it? I think it is more pleasant that long method call chains, what do you think?
maoko has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<cout>
banister: one _could_ free the DFP and create a new one with all the dynvars plus the one you want to add :)
<GregLLL>
cout: This was what I got: % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 94.34 9.269501 3048 3041 48 futex
<shevy>
rien seems it does not work in real ruby code at all :(
pellenation has joined #ruby
<cout>
GregLLL: yeah that sounds like a lot
jprovazn_afk has quit [Ping timeout: 245 seconds]
<rien>
shevy: aww...
maveonair has joined #ruby
<rien>
shevy: I'm going to try and do it the way banister recommended
toastynerd has joined #ruby
<cout>
GregLLL: do you know if the code is using threads?
bartocc has quit [Quit: bartocc]
burlyscudd has joined #ruby
<GregLLL>
cout: No its single threaded
IceDragon has joined #ruby
toastynerd has quit [Client Quit]
devoldmx27 has quit [Read error: Connection reset by peer]
<IceDragon>
morning!
devoldmx has joined #ruby
toastynerd has joined #ruby
<shevy>
fire on the IceDragon, hurry!
<IceDragon>
D:
<IceDragon>
Y
<cout>
GregLLL: well that futex is almost certainly the problem and it's almost certainly a bug. are you using the latest ruby and a recent kernel?
jacktrick has quit []
Lewix has joined #ruby
<IceDragon>
I just realized, my little cpu won't be very useful... 64kb of ram is not much to work with..
chrisja has joined #ruby
theRoUS has joined #ruby
<cout>
64 kilobits should be enough for anybody
lukec has quit [Quit: lukec]
katsrc has quit [Ping timeout: 252 seconds]
<IceDragon>
I was thinking of strapping an 8 bit display to it.
<IceDragon>
240x120 pixels
<GregLLL>
cout: No Im on ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-linux]
<GregLLL>
cout: and RHEL 6.4 2.6.32-358.11.1.el6.x86_64
<shevy>
IceDragon is that pixel potato?
kil0byte has joined #ruby
<cout>
GregLLL: should be recent enough but I would try the latest just to see if anything changes
<IceDragon>
I have no idea
<GregLLL>
cout: So would you suggest I try ruby 2.0 then?
joeyzou has quit [Remote host closed the connection]
GoldenGiant has quit [Quit: Computer has gone to sleep.]
<IceDragon>
After I got the Parser/Lexer working I was thinking of extensively testing my lil processor
<cout>
GregLLL: no, the latest 1.9.3
digital-ghost has joined #ruby
pleal has joined #ruby
maveonair has quit [Ping timeout: 268 seconds]
pellenation has quit [Quit: Leaving.]
Dave has joined #ruby
<cout>
p448
dangerousdave has quit [Read error: Connection reset by peer]
whunt has quit [Quit: Computer has gone to sleep.]
<cout>
GregLLL: also if you can come up with a small test case, you can submit a bug report
aganov has quit [Remote host closed the connection]
amsi has joined #ruby
sepp2k has joined #ruby
billiam has quit [Changing host]
billiam has joined #ruby
<GregLLL>
cout: Cool, I will do some more investigation and see if that high % of futex happens consistently
<GregLLL>
cout: I'll also update to 448
adkron has joined #ruby
Spami has joined #ruby
<shevy>
rien I think sometimes ruby can be a bit limited. what you could always do is, though, create and remove methods on the fly. so, vendor_id could be a method call, that looks like an instance variable, and exists only as long as def foo (its parent method) is called, then it is removed
GoldenGiant has quit [Ping timeout: 245 seconds]
vince_prignano has quit [Ping timeout: 245 seconds]
schaerli has quit [Remote host closed the connection]
zeade has joined #ruby
huoxito_ has joined #ruby
vince_prignano has joined #ruby
maveonair has joined #ruby
nomenkun_ has joined #ruby
iamjarvo has joined #ruby
nomenkun_ has quit [Remote host closed the connection]
nomenkun has quit [Read error: Connection reset by peer]
blaxter_ has joined #ruby
nomenkun has joined #ruby
<cout>
shevy: I like that idea
katsrc has joined #ruby
Nogbit has joined #ruby
<rien>
shevy: I'm interested in that. I don't know how to do that last part "then it is removed"
huoxito has quit [Read error: Operation timed out]
<rien>
shevy: because now that I think about it, I want to avoid banister's ivar suggestion because it could introduce subtle bugs by making variables available that shouldn't be
<shevy>
I am not sure myself hehehe, I never had a need to have volatile, short-lived methods...
Rix has quit [Ping timeout: 264 seconds]
<shevy>
but there is remove_method
iamjarvo_ has quit [Ping timeout: 248 seconds]
<rien>
shevy: well I'm sure that should be possible to do, I'll just have to look at my metaprogramming book I just bought (Perrotta's)
chairabanta has joined #ruby
<banister>
rien what kind of bugs?
<rien>
shevy: but what I mean is, that's a good idea, and thanks for it :)
kaspergrubbe has quit [Remote host closed the connection]
<rien>
banister: in some other method, if I don't do paramaterize :vendor_id, I could still have a vendor_id ivar that was set from some other method that was called first
jinie has quit [Ping timeout: 260 seconds]
ghr has quit [Quit: Computer has gone to sleep.]
<banister>
rien but that method would have cleared out that ivar before it's used/re-set
<banister>
rien in order for that method to use that ivar, then it has to run a method which updates it, and in the process of updating it, if no new value is available, it can just clear it out
burlyscudd has quit [Quit: Leaving.]
lfox has quit [Quit: ZZZzzz…]
<rien>
banister: only if I do parameterize :vendor_id, right? but if I don't call parameterize then won't I still have a vendor_id ivar? if not, then I'd need to see an example because I'm missing something
pel_daniel has joined #ruby
<banister>
that way you avoid old data
<rien>
banister: right tight, what I mean is if I don't call that method
rbento has quit [Quit: ZZZzzz…]
Falcore has joined #ruby
<banister>
rien then that's a bug in that method itself, it shouldn't be trying to access vendor_id until it's called params, surely?
nomenkun has quit [Ping timeout: 240 seconds]
dzhulk has joined #ruby
<rien>
banister: yes it would be a bug in that method itself, however it would be a very hard bug to track
jlast_ has quit [Remote host closed the connection]
<banister>
rien not that hard, certainly not hard enough to cause you avoid using this approach IMO
<banister>
rien also you could metaprogram those methods so that they *always* do a 'params'
camilasan has quit [Remote host closed the connection]
<banister>
like a before_filter in rails
bradhe has joined #ruby
mikecmpbll has quit [Client Quit]
apeiros has quit [Remote host closed the connection]
iamjarvo has quit [Remote host closed the connection]
<banister>
rien btw you could avoid all this trouble by just going: vendor_id, invoice_date = parameterize :vendor_id, :invoice_date
<banister>
rien but you don't like that API or sth?
Elhu has quit [Quit: Computer has gone to sleep.]
Nogbit has joined #ruby
iamjarvo has joined #ruby
ujjain has quit [Ping timeout: 264 seconds]
<banister>
rien since you're doing it inside the 'get' you would have to use whatever sinatra api offers you in terms of a before_filter, i don't use sinatra that much so i don't know what it would be :)
brum has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
Bira has joined #ruby
<banister>
rien or you could even do: parameterize :vendor_id, :invoice_date do |vendor_id, invoice_date| … end
tewmten has quit [Ping timeout: 245 seconds]
<rien>
banister: true, that's a nice suggestion. I don't dislike that api, I dislike the repetition it forces me to write. (don't worry about sinatra's before, I was only asking for a sketch of how to write `parameterize` to instantiate the ivars)
<GregLLL>
cout: While I'm compiling the newest ruby, do you have any ideas what else could be causing the "slowness" in this situation?
mengu has joined #ruby
jlast has quit [Remote host closed the connection]
<GregLLL>
cout: or any other tricks to try to identify where the bottleneck/problem may be
<banister>
rien is that block form ok?
<dr_mittens>
cout: GregLLL has taken up the charge for me while I eat my soup
<banister>
rien that would expose vendor_id etc as locals to the block
jlast has joined #ruby
sailias has quit [Ping timeout: 248 seconds]
<rien>
banister: I know how to make that block form work, I was trying to not say the variable names twice, but I guess I'll have to take that hit because eliminating that repetition looks too daunting... plus there wouldn't be too many params per request anyway
<havenwood>
GregLLL: What is slow on 2.0.0p247 in particular? Can you show the code?
joofsh has quit [Ping timeout: 245 seconds]
<banister>
rien yeah, we also have this repetition in ruby a lot, which is similar: def initialize(x, y); @x = x; @y =y ; end
zeel has quit [Quit: loren_the_dude]
germanstudent has joined #ruby
<banister>
rien we just put up with that repetition :)
fmcgeough has joined #ruby
<GregLLL>
havenwood: Oh sorry we aren't on 2, we are testing socket receive on 1.9.3p429
kpshek has quit []
<havenwood>
GregLLL: Latest stable Ruby is 2.0.0. Latest Ruby is 2.1.0-preview1. :P
julweber has joined #ruby
<rien>
banister: ok, I'll put up with it :)
Rix has joined #ruby
Nisstyre-laptop has joined #ruby
<GregLLL>
havenwood: cout suggested updating to p448 so that is what I am doing now
dhruvasagar has quit [Ping timeout: 246 seconds]
<jokke>
hey i want to do something weird with a raketask
kpshek has joined #ruby
<rien>
banister: do I have to use your binding_of_caller to access the params variable from within the parameterize function so that I can access its keys?
pleal has quit [Remote host closed the connection]
<havenwood>
GregLLL: Sockets are slow on 1.9 for you? Is there a little snippet of code that recreates issue or more intertwined?
brum has quit [Ping timeout: 240 seconds]
<banister>
rien alternatively you could pass in a hash that you mutate to store those values
<jokke>
i have a task that has another task as a dependency and always passes the same parameter to the dependent task how should i do this?
<hpekdemir>
ruby 1.9.3p0, Rails 3.2.13, Bundler version 1.3.5, gem1.8.11 here.
<banister>
rien so when you go: parameterise :vendor_id, :blah it'll automatically update a params hash that stores those values. You can get sinatra to clear it out at the start of every request
<jokke>
i can call optimizer:optimize[store] from the commmand line though
TheRealPygo is now known as pygospa
<banister>
rien i would be surprised if sinatra doesn't have something like that already
paolooo has joined #ruby
chairabanta has quit [Quit: Leaving...]
<havenwood>
GregLLL: Reading 4 bytes at a time? That seems tiny to me, but i haven't had coffee and just glanced at the code.
quoin has quit [Ping timeout: 252 seconds]
chairabanta has joined #ruby
Kricir_ has quit [Remote host closed the connection]
<jokke>
anyone?
<havenwood>
GregLLL: Is this fast in other languages or just done in shell? :O
Speed has quit [Ping timeout: 260 seconds]
<dr_mittens>
havenwood: the first 4 bytes is an int32 that represents the total length of the message
devoldmx has quit [Read error: Connection reset by peer]
<rien>
banister: I like that semiglobal idea, let me work on it a bit and then I'll show you, thanks so much
devoldmx has joined #ruby
<havenwood>
dr_mittens: oh, gotcha - then len is read
<dr_mittens>
havenwood: right
<dr_mittens>
havenwood: and the scala client is plenty fast
<banister>
rien rails has a bunch of those hashes that have different levels of scope/extent. params is cleared out at the end of every request, session is cleared out at the end of every session, etc
troessner has quit [Quit: Leaving]
<dr_mittens>
havenwood: but we've got to integrate this gem with existing Ruby code
freezey has quit [Remote host closed the connection]
<rien>
banister: I didn't know that, TIL :)
<rien>
banister: sinatra's before filter is just called before ;)
<banister>
rien cool
<havenwood>
dr_mittens: the scala version reads in a chunk of the whole file size as well?
Kricir has joined #ruby
iamjarvo has quit [Remote host closed the connection]
julweber has quit [Ping timeout: 245 seconds]
sarlalian has quit [Quit: WeeChat 0.4.1]
sarlalian has joined #ruby
<dr_mittens>
havenwood: I believe so ... I'd have to check again, but we've tried it both ways - one read(len) vs looping through and read(chunk_size) until done - neither way was appreciably faster than the other
<havenwood>
dr_mittens: hrm
xk_id has quit [Quit:
gwb3 has joined #ruby
cody-- has quit [Quit: derp]
browndawg has joined #ruby
jefflyne1 has joined #ruby
dodosan has joined #ruby
whunt has joined #ruby
gcds has joined #ruby
VTLob has joined #ruby
freezey has joined #ruby
axl_ has joined #ruby
zmike123 has quit [Quit: ~]
gwb3 has quit [Ping timeout: 245 seconds]
lukec has joined #ruby
vince_prignano has quit [Remote host closed the connection]
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
callenb has left #ruby [#ruby]
jerius has quit [Ping timeout: 245 seconds]
iliketurtles has joined #ruby
_maes_ has joined #ruby
gcds has quit [Ping timeout: 268 seconds]
Faris has joined #ruby
gcds has joined #ruby
carraroj has joined #ruby
Faris has quit [Quit: Changing server]
senayar_ has quit [Read error: Operation timed out]
gwb3 has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pushpak has quit [Read error: Connection reset by peer]
nikeita has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yxhuvud has joined #ruby
pootler has joined #ruby
malkomalko has joined #ruby
T_T has quit [Read error: Connection reset by peer]
stkowski has joined #ruby
Monie has joined #ruby
geekbri has quit [Remote host closed the connection]
kpshek has joined #ruby
ssvo_ is now known as ssvo
nomenkun has joined #ruby
codelette has quit [Remote host closed the connection]
kaldrenon has joined #ruby
mlpinit has joined #ruby
lessless has joined #ruby
bradhe_ has joined #ruby
huoxito__ has quit [Quit: Leaving]
iliketurtles has quit [Quit: zzzzz…..]
elaptics is now known as elaptics`away
bradhe has quit [Read error: Connection reset by peer]
T__T has joined #ruby
enriclluelles has joined #ruby
BlakeRG has joined #ruby
<BlakeRG>
hey everyone, odd question but i am forming an LLC and i need a name, i figured i'd just throw together a couple of programming terms and call it a day, suggestions?. Figure i'll just compile a list of words and mix 'em up
OdNairy has joined #ruby
<apeiros>
BlakeRG: there are bullshit bingo generators out there
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
pootler has quit [Ping timeout: 256 seconds]
malkomalko has quit [Remote host closed the connection]
<apeiros>
also: Compu-Global-Hyper-Mega-Net
paolooo has quit [Quit: Page closed]
burlyscudd has joined #ruby
<GregLLL>
BlakeRG: method madness
<BlakeRG>
nice one GregLLL
interactionjaxsn has quit [Remote host closed the connection]
khushildep has quit [Ping timeout: 245 seconds]
GoldenGiant has joined #ruby
interactionjaxsn has joined #ruby
Elfix has joined #ruby
gwb3 has joined #ruby
zeade has quit [Ping timeout: 256 seconds]
<havenwood>
BlakeRG: Trailing Whitespace, LLC
zeade has joined #ruby
Uranio has quit [Read error: Connection reset by peer]
<BlakeRG>
havenwood: lmao
<BlakeRG>
im seriously putting these on my list too
felixjet has joined #ruby
burlyscudd has quit [Ping timeout: 246 seconds]
<havenwood>
TwoSpaceSoftTab, LLC
jerius has quit [Ping timeout: 264 seconds]
felixjet__ has quit [Ping timeout: 248 seconds]
<dr_mittens>
BlakeRG: why not combine random words from astronomy and physics?
momomomomo has quit [Quit: momomomomo]
<BlakeRG>
dr_mittens: that would work too
<dr_mittens>
BlakeRG: First choice: Uranus Hertz
vince_prignano has quit [Remote host closed the connection]
brum has joined #ruby
<GregLLL>
hahaha
kil0byte has quit [Remote host closed the connection]
c0rn has joined #ruby
abk has joined #ruby
* BlakeRG
writes down "Uranus Hertz"
<havenwood>
Freedom Patch, LLC
abk has quit [Read error: Connection reset by peer]
interactionjaxsn has quit [Ping timeout: 268 seconds]
bklane has joined #ruby
RDash is now known as RDash[AW]
<dr_mittens>
method missing :name on "LLC"
fgo has quit [Remote host closed the connection]
<havenwood>
hah
browndawg has quit [Ping timeout: 246 seconds]
quoin has joined #ruby
<BlakeRG>
havenwood: this is good
adkron has quit [Ping timeout: 260 seconds]
iliketurtles has joined #ruby
hpekdemir has left #ruby [#ruby]
adkron has joined #ruby
brum has quit [Ping timeout: 260 seconds]
tatsuya_o has quit [Remote host closed the connection]
deception has quit [Ping timeout: 245 seconds]
<havenwood>
Robert'); DROP TABLE Companies;--, LLC
<atmosx>
b00stfr3ak: puts then printf if I need %0.2f/etc.
<Eiam>
b00stfr3ak: logger.send =)
<apeiros>
b00stfr3ak: generally puts. rarely printf.
<dr_mittens>
atmosx: if a line will only ever have one value, then you can use the case statement I posted earlier
<yxhuvud>
I never use printf, but the other is useful. as is %.
<YaNakilon>
armies of monkeys, that doesn't care about learning to program - they think that existance of millions of bugs is ok in software, and that it's not their problem
pwh has joined #ruby
<atmosx>
dr_mittens: I'll check both your and apeiros solutions thanls :-)
<YaNakilon>
every hour spent on thinking up testcases could be spent on learning and getting skill
<YaNakilon>
but no, brain work is too hard for them
<Eiam>
what are you on about, seriously?
<YaNakilon>
that's why apeiros would never grow up
<Eiam>
I have never met an engineer that wasn't appreciative of QA
<platzhirsch>
very entertaining... not
devoldmx has quit [Read error: Connection reset by peer]
GoldenGiant has quit [Ping timeout: 245 seconds]
<apeiros>
YaNakilon: dangerous grounds. cut back the insults or you're gone. that's the only warning.
<Eiam>
for engineers that don't have the luxury of QA, tests help provide confidence when making major refactors that things still work
<dr_mittens>
atmosx: you'll have to add the when "server", when "cipher", etc statements
devoldmx has joined #ruby
<YaNakilon>
"stop butthurt me, that's a warning"
<apeiros>
atmosx: fix my typo then. I wrote sever instead of server.
gwb3 has joined #ruby
<atmosx>
dr_mittens: yeah I can do that.
Kricir has joined #ruby
nemesit|znc has joined #ruby
<yxhuvud>
eiam: I see them as complementary - tests are still needed even if you have QA.
<Eiam>
apeiros: regex at the start of the string, look for any of these values... then hell if i know
<YaNakilon>
Eiam why to do the refacting, in which you are not confident?
<Eiam>
YaNakilon: bye
mogpt has joined #ruby
lfox has joined #ruby
zeade has quit [Quit: Leaving.]
<Eiam>
yxhuvud: sure... it seems to vary by organization.. some teams are pretty strict about tests, some teams choose to spend their time on other things and let QA sort out the changes
benzocoumaran35 has quit [Ping timeout: 252 seconds]
dzhulk has quit [Quit: Leaving.]
<Eiam>
I've seen plenty of things make it by tests, but its always nice to have an engineer not send you something thats blatantly and obviously broken if they'd only looked (or had tests)
<apeiros>
Eiam: sorry, missed that you were looking for an explanation. trolls are annoyingly distracting :)
<apeiros>
scan with captures will return an array of arrays, the inner arrays being the captures
<Eiam>
I'm reading on tubular but I don't get how (.$) works.. capture everything that matches from the end of the line?
<b00stfr3ak>
cool, Yeah I was looking for a way to format output to the screen or a file dynamically. I tried to use \t but that didn't work very well.
benzocoumaran35 has joined #ruby
<apeiros>
and Hash[ary_of_ary] creates a hash from key/value tuples
<Eiam>
rubula
<Eiam>
apeiros: I meant the regex ;)
<apeiros>
oh
dbjeepn has joined #ruby
dbjeepn has left #ruby [#ruby]
<apeiros>
match any of those words, then match a space, then any amount of any character (except newline) and then end of line
petey has quit [Remote host closed the connection]
nbouscal has joined #ruby
alex__c2022 has joined #ruby
gwb3 has quit [Read error: Connection reset by peer]
gwb3 has joined #ruby
soheil has quit [Read error: Connection timed out]
ner0x has joined #ruby
duggiefresh has quit [Ping timeout: 268 seconds]
maveonair has quit [Ping timeout: 240 seconds]
soheil has joined #ruby
<Eiam>
ahhh
OneMT has joined #ruby
<Eiam>
yes yes
newUser1234 has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
chairabanta has quit [Quit: Leaving...]
<Eiam>
heh that guy started priv messaging me =(
Hanmac has quit [Quit: Leaving.]
<Eiam>
trying to offer me advice about programming
<Eiam>
apeiros: thanks
<apeiros>
yw
<apeiros>
YaNakilon?
<apeiros>
I'm somewhat surprised he didn't start spamming my pm…
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
evelyette_ has quit [Read error: Connection reset by peer]
<OneMT>
I'm expect my rescue on JSON::ParserError to move the => e to a error_dir. But I'm getting a TypeError, https://gist.github.com/OneMT/61f1d0062d44fcde16f5. I have a pathname set for error_dir.
evelyette_ has joined #ruby
<apeiros>
OneMT: uh, no, that's not how that works
petey has joined #ruby
<apeiros>
FileUtils.mv is to move a file/directory in your filesystem. your `e` is not a string referring to a file/directory. it's an exception.
<OneMT>
So I should say FileUtils.mv (file), error_dir?
<OneMT>
do *
devoldmx has quit [Read error: Connection reset by peer]
<OneMT>
s/say/do
<apeiros>
do you have a file? I don't think you do…
devoldmx has joined #ruby
<banisterfiend>
apeiros what's up now stefan
<apeiros>
you could write the exception out into a file, but you'd still need a filename. Example: File.write("exceptionfilename.txt", "#{e.class}: #{e.message}\n#{e.backtrace.join("\n")}")
bean__ has quit [Quit: Computer has gone to sleep.]
GoldenGiant has joined #ruby
<Eiam>
yeah that guy, yanakilon
<apeiros>
banisterfiend: trolls no longer loose. you can get out of cover.
KobraKao has joined #ruby
pushpak has quit [Read error: Connection reset by peer]
Guest96589 has quit [Remote host closed the connection]
<apeiros>
banisterfiend: what's up in your galaxy?
obs has quit [Read error: Connection reset by peer]
obs has joined #ruby
schaerli has quit [Remote host closed the connection]
zeade has joined #ruby
gcds has quit [Read error: Connection reset by peer]
<OneMT>
apeiros, Can I move the file that fires the rescue? Or will that just begin to move all my files after the rescue fures?
<apeiros>
o0
<apeiros>
OneMT: what the heck are you trying to achieve by that?
cburyta has quit [Remote host closed the connection]
gwb3 has quit [Remote host closed the connection]
breakingthings has quit []
cburyta has joined #ruby
cj3kim has joined #ruby
<banisterfiend>
apeiros learning rails and drinking beer
<apeiros>
or maybe: what do you consider "the file that fires the rescue"? the ruby script? or are you parsing a json file and you mean that?
pushpak has joined #ruby
gcds has joined #ruby
iliketurtles has joined #ruby
freezey has quit [Remote host closed the connection]
<OneMT>
I want to move the parsing json file that fires the rescue.
freezey has joined #ruby
<OneMT>
I'm parsing several json files I want to move one if it fires the rescue.
jerius has joined #ruby
<apeiros>
ok. the `=> e` means ruby will write the raised exception into the local variable `e`. that has nothing to do with the json file you're reading.
carraroj has joined #ruby
breakingthings has joined #ruby
<apeiros>
so yes, you'll have to pass the path to the json file you're reading to FileUtils.mv
<OneMT>
Certainly you explained that very well.
Nogbit has quit [Quit: Leaving.]
greenride has joined #ruby
<OneMT>
Ok, thank you apeiros.
Kricir has quit [Remote host closed the connection]
bean__ has joined #ruby
<apeiros>
yw
Nogbit has joined #ruby
dr_mittens has quit [Ping timeout: 250 seconds]
schaerli has joined #ruby
einarj has joined #ruby
siwica has quit [Quit: siwica]
platzhirsch has left #ruby [#ruby]
x1337807x has joined #ruby
robert_ has quit [Read error: Connection reset by peer]
blaxter_ has quit [Quit: foo]
browndawg has quit [Quit: Leaving.]
quoin has joined #ruby
GoldenGiant has quit [Quit: Computer has gone to sleep.]
platzhirsch has joined #ruby
GoldenGiant has joined #ruby
<platzhirsch>
How cool is that.. %i{black coffee} => [:black, :coffee] ?
evelyette_ has quit [Read error: Connection reset by peer]
Hanmac has joined #ruby
evelyette_ has joined #ruby
<apeiros>
I love it
<apeiros>
and I hate it, everytime I have to use 1.9, that is
<Eiam>
platzhirsch: about as cool as %w{a b c}
whowantstolivefo has joined #ruby
<platzhirsch>
I will switch to literal notation to generate symbols if they contain a dot
dbjeepn has joined #ruby
<platzhirsch>
because I think :"record.groups" is awful
tkuchiki has quit [Remote host closed the connection]
evelyette_ has quit [Read error: Connection reset by peer]
evelyette_ has joined #ruby
dzhulk has joined #ruby
WillAmes has joined #ruby
mansi has quit [Read error: Connection reset by peer]
soheil has quit [Read error: Connection timed out]
mansi has joined #ruby
NinjaPenguin has quit [Ping timeout: 245 seconds]
rupee has quit [Quit: Leaving]
soheil has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
fcahoon has joined #ruby
fcahoon has quit [Client Quit]
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
GoldenGiant_ has joined #ruby
gener1c has joined #ruby
gener1c has quit [Changing host]
gener1c has joined #ruby
petey_ has joined #ruby
GoldenGiant has quit [Ping timeout: 240 seconds]
noop has quit [Ping timeout: 252 seconds]
RichardBaker has quit [Quit: RichardBaker]
brum has joined #ruby
rupee has joined #ruby
rupee has quit [Client Quit]
<gener1c>
if i would like to make a p2p program , how could i split the file in to chunks and combine the chunks back again to reform the file ?
blaxter_ has joined #ruby
petey has quit [Ping timeout: 240 seconds]
Nogbit has quit [Quit: Leaving.]
<gener1c>
simply read(chunk_size) write(chunk_size) ? and if so how can i keep track of which chunk is which?
GoldenGiant_ has quit [Client Quit]
<apeiros>
why do you have to keep track?
GoldenGiant_ has joined #ruby
<gener1c>
because i am going to get different chunks from different peers
<gener1c>
like bittorrent
dankest has quit [Quit: dankest]
interactionjaxsn has joined #ruby
<apeiros>
ok, in that case: why do you reinvent the wheel?
<gener1c>
humz... to learn i guess
dankest has joined #ruby
_Minos_ has joined #ruby
<apeiros>
and how to identify it: send the index of the chunk
<gener1c>
oh
<onewheelskyward>
and a checksum.
<gener1c>
so its like in c , there is an index
<onewheelskyward>
file checksum and chunk checksum.
DanKnox_away is now known as DanKnox
<gener1c>
crc checksum
<gener1c>
to check its not corrupt
pellenation has joined #ruby
brum has quit [Ping timeout: 248 seconds]
<apeiros>
I'd assume malicious modifications, and then crc is not a good fit.
<gener1c>
md5?
rgbdev has joined #ruby
<apeiros>
broken, outdated.
<apeiros>
sha1 at least
<gener1c>
k
Nogbit has joined #ruby
GoldenGiant_ has quit [Read error: Connection reset by peer]
GoldenGiant__ has joined #ruby
cj3kim has quit [Ping timeout: 245 seconds]
snyp has quit [Quit: "bbl"]
BizarreCake has quit [Ping timeout: 245 seconds]
v0n has joined #ruby
jerius has quit [Ping timeout: 252 seconds]
freezey has quit [Remote host closed the connection]
mayorga has joined #ruby
cj3kim has joined #ruby
petey has joined #ruby
_bart has quit [Remote host closed the connection]
devoldmx3 has joined #ruby
i_s has quit [Remote host closed the connection]
gwb3 has joined #ruby
jerius has joined #ruby
Nogbit has quit [Quit: Leaving.]
pootler has joined #ruby
rgbdev has quit [Ping timeout: 264 seconds]
mayorga has quit [Max SendQ exceeded]
codezombie has joined #ruby
intuxicated has joined #ruby
deception has joined #ruby
d45h has quit [Ping timeout: 240 seconds]
iliketurtles has quit [Quit: zzzzz…..]
devoldmx has quit [Ping timeout: 256 seconds]
pootler has quit [Read error: Connection reset by peer]
pootler_ has joined #ruby
petey_ has quit [Ping timeout: 256 seconds]
sayan has quit [Ping timeout: 256 seconds]
ewnd9 has quit [Ping timeout: 245 seconds]
prism has joined #ruby
prism is now known as pantaloon
theRoUS has quit [Ping timeout: 252 seconds]
gwb3 has quit [Remote host closed the connection]
cj3kim has quit [Remote host closed the connection]
rafaelcgo has joined #ruby
Jdubs has joined #ruby
evelyette_ has quit [Read error: Connection reset by peer]
gwb3 has joined #ruby
<rafaelcgo>
guys, im developing a gem that has another gem dependencies.. whenever I try to install it with the local file, in a empty gemset, I get Unable to resolve dependencies:, Gem::DependencyError … how can I make the gem install the dependencies first, just like any other gem ?
Macaveli has quit [Quit: Computer has gone to sleep.]
prismate has quit [Ping timeout: 240 seconds]
blaxter_ has quit [Quit: foo]
evelyette_ has joined #ruby
randomnick_ has joined #ruby
Nenor has joined #ruby
pootler_ has quit [Read error: Connection reset by peer]
dsferreira has joined #ruby
pootler has joined #ruby
jbrechtel has quit [Ping timeout: 256 seconds]
<dsferreira>
join /#ruby-on-rails
<rafaelcgo>
It isnt a Rails issue..
<dsferreira>
sorry
petey has quit [Read error: Connection reset by peer]
<dsferreira>
just trying to connect to rails irc
<rafaelcgo>
let me try #rubygems :)
alex__c2022 has quit [Quit: alex__c2022]
<Morrolan>
The / belongs at the very beginning, dsferreira. ;)
<Morrolan>
And I *think* the channel is #rubyonrails, no dashes.
<dsferreira>
yeah
petey has joined #ruby
marius has quit [Quit: oh nooo]
alex__c2022 has joined #ruby
Advocation has joined #ruby
justsee has joined #ruby
<rafaelcgo>
Morrolan: yeap, no dashes
soheil has quit [Read error: Connection timed out]
<atmosx>
rafaelcgo: can you show your gemspec?
decoponio has quit [Quit: Leaving...]
<rafaelcgo>
atmosx: sure, lemme gist it
<atmosx>
rafaelcgo: actually how are you trying to create the gem? There are some programs which give you the skeleton, or a DSL to create teh gem.
quique has joined #ruby
<quique>
I have this template: http://pastebin.com/i1JwcPkH which gives me each member on it's own line. Is there a way to change the delimiter so it's a space instead of a new line?
dash_ has joined #ruby
<atmosx>
I wrote a gem some time back in order to distribute a script I wrote actually.. more easily and I don't recall having any sort of issues with dependencies
axl_ has quit [Quit: axl_]
soheil has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
axl_ has joined #ruby
Kricir has joined #ruby
pootler has quit [Read error: Connection reset by peer]
<Morrolan>
Well, in PHP they're actually associative arrays, no hash under the hood.
<Morrolan>
And I guess that's his background.
stkowski_ has joined #ruby
rupee has quit [Client Quit]
moli has quit [Read error: Connection reset by peer]
mark_locklear has joined #ruby
madhatter has quit [Ping timeout: 268 seconds]
rickmasta has joined #ruby
stkowski has quit [Ping timeout: 248 seconds]
stkowski_ is now known as stkowski
<apeiros>
there are Array#assoc and #rassoc, though
madhatter has joined #ruby
postmodern has joined #ruby
jbrechtel has joined #ruby
pootler has quit [Read error: Connection reset by peer]
pootler has joined #ruby
graft has quit [Read error: No route to host]
<gf3>
apeiros: Indeed, I've never seen it used in practice though
<shevy>
in php you can do function foo() and which is the same as function FOO()
<apeiros>
me neither
<shevy>
it really simplified things, did it not? :)
<gf3>
Let's just not talk about PHP
<apeiros>
seconded
diegoviola has quit [Ping timeout: 268 seconds]
aliesky has joined #ruby
benzocoumaran35 has quit [Ping timeout: 264 seconds]
<Morrolan>
Heh.
<aliesky>
hello everybody
madhatter has quit [Read error: Operation timed out]
<gf3>
Hello… Dr. Nick?
<aliesky>
how I can run a php script from ruby and store the result in an array?
sambao21 has quit [Quit: Computer has gone to sleep.]
<Morrolan>
Speaking of the devil.
<Morrolan>
Run it through the PHP interpreter, capture stdout (or wherever the results go to), and convert into an array in a sensible way?
<aliesky>
syntax please?
mercwithamouth has joined #ruby
madhatter has joined #ruby
bean__ has quit [Quit: Computer has gone to sleep.]
<apeiros>
output = `php your.php`
<aliesky>
so simple?
<sniffingcats>
dunno why I like %x{} more :>
<aliesky>
now, the php script return an array, it will stored as array as well?
<Morrolan>
That's the first two steps. How simple or complex the 'converting to array' is will depend on the PHP script.
<Morrolan>
No.
pootler has quit [Read error: Connection reset by peer]
Ripp__ has joined #ruby
<apeiros>
aliesky: a shell script *can't* return
<apeiros>
so it can't return an array either
<apeiros>
all it can do is *output* (aka: print)
<Morrolan>
The PHP script will have to print to stdout, write to a file, or something similar.
<apeiros>
and that's always a string
<apeiros>
you can make your php output something which can be parsed as an array.
<apeiros>
e.g. JSON
<apeiros>
or YAML
cburyta has quit [Remote host closed the connection]
<apeiros>
or any other sensible serialization format.
<aliesky>
ah I see, let me try
dallasm_ has joined #ruby
<shevy>
could be worse
pootler has joined #ruby
ColKurtz has joined #ruby
<shevy>
he could want to call a ruby script from a php script :-)
lurch_ has quit [Ping timeout: 245 seconds]
Hanmac has quit [Quit: Leaving.]
newUser1234 has quit [Ping timeout: 245 seconds]
Galgorth has quit [Ping timeout: 264 seconds]
newUser1234 has joined #ruby
Falcore has joined #ruby
momomomomo has quit [Quit: momomomomo]
nisstyre has quit [Quit: Leaving]
brum has joined #ruby
sambao21 has joined #ruby
julweber has joined #ruby
jonathanwallace has quit [Ping timeout: 245 seconds]
<atmosx>
d
pootler has quit [Read error: Connection reset by peer]
pootler has joined #ruby
<shevy>
e
<Morrolan>
g
St_Marx has joined #ruby
mlpinit has quit [Ping timeout: 245 seconds]
pootler has quit [Client Quit]
timonv has quit [Remote host closed the connection]
Galgorth has joined #ruby
brum has quit [Ping timeout: 246 seconds]
julweber has quit [Ping timeout: 245 seconds]
<shevy>
Morrolan you are out!
<onewheelskyward>
php.rb
<Morrolan>
Dang. Was never too good at this. :/
epta has quit [Ping timeout: 240 seconds]
<atmosx>
onewheelskyward: that's a disgrace
bean__ has joined #ruby
theRoUS has joined #ruby
<Morrolan>
rb.php?
mac___ has joined #ruby
<Morrolan>
pry.php. :D
* Morrolan
ducks
epta has joined #ruby
<atmosx>
Okay, I think I'll stop now, since I've reach the point where I need to implement CSS3, I can move on to the next project.
<atmosx>
lol
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rgbdev has joined #ruby
<shevy>
ack
KobraKao has joined #ruby
Nogbit has joined #ruby
apeiros has quit [Remote host closed the connection]
momomomomo has joined #ruby
prism has joined #ruby
apeiros has joined #ruby
prism is now known as Guest69754
<aliesky>
no luck :-(
tonni has joined #ruby
<Morrolan>
'No luck' is horribly indescriptive.
<Morrolan>
How are you attempting to share information, currently?
<aliesky>
no output stored in the var :-(
zacts has joined #ruby
<Morrolan>
If you do output = `some shell command`, then output will contain whatever went to stdout.
sailias has joined #ruby
<Morrolan>
And stderr too, probably. In the case of your PHP script this'll be whatever you printed.
<aliesky>
the php script is printing something like this 'dir1,dir2,dir3' but i can't store it in a var from ruby, i think it's not exeuting the script, but no errors either
kyllesdk has joined #ruby
kyllesdk has quit [Client Quit]
rbennacer has joined #ruby
<rbennacer>
hey guys
<rbennacer>
how is this possible
<rbennacer>
1.9.3p448 :016 > url
<rbennacer>
=> "localhost:3000"
<rbennacer>
1.9.3p448 :017 > url =~ /localhost/i
<rbennacer>
=> 0
atmosx has quit [Ping timeout: 240 seconds]
pantaloon has quit [Ping timeout: 245 seconds]
<Morrolan>
0 is truth-y.
<Morrolan>
(And indicates the index of the first match)
<rbennacer>
?
<Morrolan>
0, in this case, means "match found at index 0"
nisstyre has joined #ruby
<Morrolan>
If it doesn't match, it'll probably return 'nil'.
<Morrolan>
Keep in mind that, in Ruby, everything except 'nil' and 'false' are truth-ish values.
<rbennacer>
i tend to forget this very often
<rbennacer>
:)
prism1 has joined #ruby
atmosx has joined #ruby
<aliesky>
Morrolan: I got it, the problem was with php-cgi, for some reason it works from command line but no from ruby
<aliesky>
I did it only with php
<Morrolan>
I see. :)
Advocation has quit [Quit: Advocation]
mlpinit has joined #ruby
Guest69754 has quit [Ping timeout: 240 seconds]
failshell has joined #ruby
randomnick_ has joined #ruby
JesseH has quit [Ping timeout: 240 seconds]
anonymuse has joined #ruby
cody-- has quit [Quit: derp]
brennanM_ has quit [Remote host closed the connection]
platzhirsch has left #ruby [#ruby]
mlpinit has quit [Ping timeout: 245 seconds]
jonahR has joined #ruby
kaspergrubbe has joined #ruby
havenwood has quit [Remote host closed the connection]
epta has quit [Ping timeout: 240 seconds]
tvw has joined #ruby
robert_ has joined #ruby
robert_ has quit [Changing host]
robert_ has joined #ruby
havenwood has joined #ruby
epta has joined #ruby
JesseH has joined #ruby
momomomomo has quit [Quit: momomomomo]
havenwood has quit [Read error: Connection reset by peer]
<aliesky>
it's weird but it works
Kricir has joined #ruby
nomenkun has joined #ruby
sectionme has joined #ruby
heidi has quit [Quit: Leaving.]
Monie has joined #ruby
heidi has joined #ruby
nfk has joined #ruby
momomomomo has joined #ruby
sailias has quit [Ping timeout: 246 seconds]
sectionme has quit [Read error: Operation timed out]
funburn has joined #ruby
GoldenGiant__ has quit [Quit: Computer has gone to sleep.]
GoldenGiant__ has joined #ruby
Kricir has quit [Ping timeout: 264 seconds]
pleal has joined #ruby
JesseH has quit [Ping timeout: 240 seconds]
GoldenGiant__ has quit [Read error: Connection reset by peer]
GoldenGiant__ has joined #ruby
dbjeepn has joined #ruby
nemesit|znc has quit [Ping timeout: 240 seconds]
brum has joined #ruby
T_T has quit [Remote host closed the connection]
epta has quit [Ping timeout: 240 seconds]
tatsuya_o has quit [Ping timeout: 246 seconds]
whowantstolivefo has quit [Ping timeout: 248 seconds]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tatsuya_o has joined #ruby
jonathanwallace has joined #ruby
epta has joined #ruby
<rafaelcgo>
is there a problem to require same gem 2 times on different files? (I know it isnt a good pratice, but I just want to know if this will cause some crash or bug)
dkamioka has quit [Remote host closed the connection]
felipec has joined #ruby
pellenation has quit [Quit: Leaving.]
dbjeepn has quit [Client Quit]
Jdubs has quit [Remote host closed the connection]
fmcgeough has quit [Quit: fmcgeough]
<felipec>
why isn't it possible to redirect stdout to a process?
Jdubs has quit [Remote host closed the connection]
krawchyk has quit [Remote host closed the connection]
devoldmx has quit [Read error: Connection reset by peer]
dallasm_ has quit [Remote host closed the connection]
<shevy>
oh true, I forgot there is STDOUT as well
<shevy>
felipec there you go!
devoldmx has joined #ruby
mlpinit has joined #ruby
T_T has joined #ruby
tjbiddle has joined #ruby
<felipec>
shevy: what? that has nothing to do with my problem?
huoxito_ has quit [Ping timeout: 260 seconds]
<a1ph4g33k>
shevy, I I don't believe that's what the user wants.
funburn has quit [Quit: funburn]
huoxito_ has joined #ruby
<tjbiddle>
Does anyone know where I can find out what would be the total size of all gems hosted on rubygems.org? I want to mirror it but want to ensure I have enough space
jerius has joined #ruby
Kar- has quit [Ping timeout: 264 seconds]
<a1ph4g33k>
felipec, you want both of the scripts to be defined in the same file ???? Or does that part matter ?
<felipec>
a1ph4g33k: I actually want "ruby script | less", basically
huoxito__ has quit [Ping timeout: 256 seconds]
tsykoduk has joined #ruby
<Stalkr_>
I am done reading 'Learning to Program', do you think I have enough knowledge to start with Sinatra/Padrino or should I read some more before playing with frameworks?
<felipec>
but I'm starting the absolute simplest case, if that script doesn't work, there's no way popen or anything fancier would
tgraham is now known as tgraham|away
adambeynon has joined #ruby
<havenwood>
Stalkr_: A good followup book would be The Ruby Programming Language but no harm done in poking around with Sinatra.
huoxito has quit [Ping timeout: 245 seconds]
adkron has quit [Ping timeout: 245 seconds]
<Stalkr_>
havenwood: Yeah, I spoke with you about what to do after :-) I have it on my list to read
freezey has quit [Remote host closed the connection]
axl_ has quit [Quit: axl_]
vim_shim has quit [Ping timeout: 256 seconds]
Michae___ has joined #ruby
<tastycode>
I'm only doing this because of Module#prepend, I need to intercept all calls to rails url_helpers in the context of Rabl::Engine ... is there some way of emulating this in ruby193 ? e.g. overriding send?
kirun has quit [Quit: Client exiting]
Kricir has quit [Ping timeout: 246 seconds]
vim_shim_ has quit [Ping timeout: 268 seconds]
mmitchell has quit [Remote host closed the connection]
codezombie has quit [Ping timeout: 256 seconds]
mrsolo has joined #ruby
Guest4603 has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
gwb3 has quit [Ping timeout: 245 seconds]
tgraham|away is now known as tgraham
<Guest4603>
ho
Guest4603 has quit [Client Quit]
<felipec>
I don't understand how IO.popen("-") works
brum has joined #ruby
<canton7>
felipec, hmm it seems to work if you assign e.g. $stdin = r, but not if you use #reopen
dodosan_ has joined #ruby
<tastycode>
i'm an idiot
<tastycode>
nevermind... it was zeus's fault
czhang is now known as czhang_______
<felipec>
canton7: indeed, but that only works inside the ruby script
pantaloon is now known as prismate
<felipec>
canton7: if I do system('echo foo'), that wouldn't be redirected
bean__ has joined #ruby
<canton7>
yeah, makes sense
justsee has joined #ruby
maroloccio has joined #ruby
<a1ph4g33k>
felipec, provide more detail of what you want ... it's great that you said "I want basically script.rb | less" ... are you trying to provide the less side, or the script side, or both within a single program ?
dodosan has quit [Ping timeout: 260 seconds]
julweber has joined #ruby
<a1ph4g33k>
( asking if you are trying to emulate the pipe ... the less ... or something else... ? )
brum has quit [Ping timeout: 248 seconds]
adkron has joined #ruby
shaunbaker has quit [Remote host closed the connection]
pwh has joined #ruby
<felipec>
a1ph4g33k: I don't understand how it's not clear, the only thing less does is receive a stream from stdin, I want to redirect stdout to less's stdin
<felipec>
a1ph4g33k: script | less
shaunbaker has joined #ruby
zastern has joined #ruby
hakunin has quit [Remote host closed the connection]
<a1ph4g33k>
felipec, the part that isn't clear if you mean from a console, where you can just type exactly that "script | less" ... or from within a script (lets call it outer)... where you are trying to run a script (inner) ... through less, and then have IO with outer then be sent along to less ... ???
<felipec>
a1ph4g33k: obviously from the script, that's why I'm writing the script
<a1ph4g33k>
as in, would something like "tie" or "cat" or any other command that is just going to do consume data through the pipe until it hits end-of-file ... ?
burlyscudd has quit [Quit: Leaving.]
aryaching has joined #ruby
<felipec>
a1ph4g33k: that's what less does, yes
RichardBaker has quit [Quit: RichardBaker]
<havenwood>
felipec: it is redirecting text to less, what different than that do you want?
platzhirsch has left #ruby [#ruby]
artofraw has joined #ruby
RichardBaker has joined #ruby
<felipec>
havenwood: it's not redirecting stdout to less's stdin
<a1ph4g33k>
no that isn't what less does.
<artofraw>
would it be possible to make functions first class citizens in MRI?
<havenwood>
felipec: oh, you want to just continue to redirect output?
<artofraw>
so you could pass the actual methods as arguments to other methods, etc.
<a1ph4g33k>
less consumes data from the pipe, but then provides for you to be able to hit keys and move around within the data ... search, scrollback, etc ...
iliketurtles has quit [Quit: zzzzz…..]
quoin has quit [Ping timeout: 260 seconds]
parus has joined #ruby
<a1ph4g33k>
that's why I was asking about "grep" or "tie" or "cat" or "echo" ... or anything else that only handles stdin and when it reaches the end, it's done.
<bnagy>
artofraw: you can do it with procs etc
iliketurtles has joined #ruby
<waxjar>
artofraw, not really. Procs/lambdas are the next best thing
<shevy>
I dont think he will ever be clear on what he wants, it seems to be a moving target
<artofraw>
yeah I know, but I mean why you can't do it? is it just a design decision that's now hard to change?
s0ber has quit [Ping timeout: 260 seconds]
<artofraw>
or it depends on something internal to the language
s0ber_ is now known as s0ber
<bnagy>
well you can, it's just fiddly
<bnagy>
methods _are_ objects
cj3kim_ has joined #ruby
<bnagy>
but every actual use case I've ever seen you want to be working with procs or lambdas instead
devoldmx has quit [Read error: Connection reset by peer]
devoldmx27 has joined #ruby
<bnagy>
cause methods are bound to objects
kpshek has quit []
<felipec>
a1ph4g33k: less doesn't end until it reaches the EOF of thes stream, for all practical purposes in this code it's the same as cat, except that it takes longer for the process to finish, specifically, until the user says so
<shevy>
not with UnboundMethod !
<artofraw>
i see
bobinator60_ has quit [Quit: bobinator60_]
<artofraw>
thx
<shevy>
damn... how can I get an UnboundMethod?
<waxjar>
Method#unbind or something like that
<a1ph4g33k>
felipec, less doesn't end until you get a ctrl-c or a q from the keyboard ... and that's my point.
<shevy>
ah... also found another example ... x = Array.instance_method("pop")
nisstyre has quit [Quit: Leaving]
<felipec>
a1ph4g33k: and how does that affect this script?
hashpuppy has quit [Quit: Computer has gone to sleep.]
<a1ph4g33k>
... on the bright side, I do like my with_paged_output function so ... regardless ... I got something out of it.
prism1 has joined #ruby
<shevy>
a1ph4g33k it doesn't work
<a1ph4g33k>
mine does ... for all cases I would use it on...
prism1 is now known as pantaloon
<a1ph4g33k>
I don't expect to have a copy of system output ...
<a1ph4g33k>
if I want a copy of system command output I use `` or popen .
<shevy>
perhaps he wants a new OS in ruby
<shevy>
long live ``
<shevy>
anything more complicated just does not work
rafaelcgo has quit [Quit: Leaving.]
__userna1 has quit [Ping timeout: 256 seconds]
michael_mbp is now known as zz_michael_mbp
super_man has left #ruby [#ruby]
Guest64532 has quit [Ping timeout: 245 seconds]
<bnagy>
ruby is obviously weird this morning, guess I'll write go today instead :P
|jemc| has quit [Quit: WeeChat 0.4.1]
<a1ph4g33k>
bnagy, ?
__userna1 has joined #ruby
<rien>
IRB question: after `irb -r ./file.rb` and having made changes to a file that file.rb requires/loads, how to I force IRB to reload the whole thing?
jbrechtel has quit [Quit: leaving]
<volty>
load ?
<rien>
yes, requires
<tgraham>
reload
<rien>
I want to reload it all, yes
<volty>
load './file.rb' ?
momomomomo has quit [Quit: momomomomo]
<rien>
nope, doesn't work
<rien>
oh hold on
<a1ph4g33k>
rien, the problem is if file.rb does requires, then the requires cache is already loaded.
kaspergrubbe has joined #ruby
momomomomo has joined #ruby
<a1ph4g33k>
... if file.rb uses load ... the load './file.rb' will cause ::load calls for all of the other files.
momomomomo has quit [Client Quit]
burlyscudd has quit [Quit: Leaving.]
<shevy>
always load() it again
<rien>
I'm just looking for a way that I can change code and try it immediately in irb
<tgraham>
You want a REPL/
<rien>
I'm working on a project where files require other files in the project etc
<tgraham>
?
<rien>
tgraham: a repl that always runs the latest code from the files
Popple has joined #ruby
<shevy>
just define a method that calls/loads your files anew
<rien>
tgraham: I don't like to write code in the repl, I write it in the file, then play with it in the repl
<workmad3>
rien: ctrl-d then type 'irb -r "myfile.rb" '
<a1ph4g33k>
rien, use Pry and edit_method
end_guy has joined #ruby
snovak has quit [Remote host closed the connection]
<a1ph4g33k>
er ... method_source
anonymuse has quit [Remote host closed the connection]
<a1ph4g33k>
pry & method_source
<atmosx>
`/away afk
casheew_ has quit [Read error: Connection reset by peer]
<rien>
a1ph4g33k: I alredy have a workflow with emacs and my command line that I'm unwilling to break, but thanks :)
qubit has joined #ruby
casheew has joined #ruby
<volty>
what's wrong with :in => :out ?
GoldenGiant__ has quit [Quit: Computer has gone to sleep.]
<workmad3>
rien: you know what pry is?
<rien>
shevy: how woud you code such "reload" method?
SkuliOskarsson has joined #ruby
<rien>
workmad3: yep I use it with pry-byebug to debug my code
<bnagy>
load works mostly
<bnagy>
you get redefined constant warnings, but I still use it a lot
GoldenGiant__ has joined #ruby
|jemc| has joined #ruby
<rien>
bnagy: I think you're right, it just so happens I have an error in my requires that was causing an error and I wrongly assumed load was broken...
<bnagy>
gotta load the full filename blah.rb not blah
katsrc has joined #ruby
<bnagy>
some stuff you definitely can't load twice though
felixjet_ has joined #ruby
<qubit>
what's the accepted practice for deploying apps that use bundler? Meaning should it be left up to the system's package manager to install `bundler`, or do we somehow include bundler in the app? If it's left up to the system/user to install bundler, are all versions of bundler ensured to be compatable with each other?
nomenkun has quit [Remote host closed the connection]
kaspergrubbe has quit [Ping timeout: 246 seconds]
jbrechtel has joined #ruby
felixjet has quit [Read error: Connection reset by peer]
GoldenGiant__ has quit [Read error: Connection reset by peer]
GoldenGiant___ has joined #ruby
gr33n7007h has quit [Read error: Connection timed out]
anonymuse has joined #ruby
<bnagy>
I hate bundler so much :<
<tgraham>
rien: you could create an .irbrc file that requires a file where you define a reload method that re loads the files you've changed, then that relaod method be in every irb session you start.
gr33n7007h has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
<rien>
+1 for hating bundler
<shevy>
qubit I once tried to install rails through bundler, from a tutorial. it failed. that was ~3 years ago or so, I just gave up using it
devoldmx has joined #ruby
<rien>
tgraham: that's a nice tip, thanks
<tgraham>
Doesn't rubygems install some version of blunder by default?
<shevy>
"gem install rails" ~7 days ago worked fine for me btw, and since I dont need bundler, I dont use it
<volty>
rien: i would go with a bash script "while true \n do \n irb ./file.rb \n done
gr33n7007h has quit [Max SendQ exceeded]
<shevy>
tgraham no, only "gem"
<shevy>
hmm
gr33n7007h has joined #ruby
<rien>
volty: I'm embarrassed but I don't understand how that helps me
<qubit>
well without bundler, how do you handle gem installation and version incompatability?
<shevy>
I have bundler-1.3.5.gem .... strangely enough, I dont remember having installed it
<shevy>
perhaps rails sneakily installed it for me :\
gr33n7007h has quit [Max SendQ exceeded]
<workmad3>
rien: it automatically re-runs irb and loads your file again when you ctrl-d
<shevy>
qubit I trust that people who write gems are clever
<qubit>
shevy: theyre not
<a1ph4g33k>
rien, all i was stating is that instead of irb, you can use pry ... set up Pry.editor = "emacsclient" and then you can run code ... and do "edit Class#method" ... and never have to leave pry ... ... and auto reloads whatever you modify.
<volty>
you exit irb and reload all of it -- sure that you don't have hanging arround
gr33n7007h has joined #ruby
kx has joined #ruby
<a1ph4g33k>
rien, won't say any more.
amnay has quit [Ping timeout: 245 seconds]
gr33n7007h has quit [Max SendQ exceeded]
<rien>
a1ph4g33k: I'll check it out, thanks
<rien>
workmad3: and I'd quit it for good with C-c ?
burlyscudd has joined #ruby
<workmad3>
rien: pass? :)
<workmad3>
rien: that would be a q for volty
c0rn has quit [Ping timeout: 248 seconds]
<tgraham>
qubit: I would think that if your setting up an environment that can even use gems, you'd have ruby/rubygems installed, so within that configuration management I would think getting bundler installed would happen.
<shevy>
!
SHyx0rmZ has joined #ruby
<shevy>
a virus!
<volty>
is pry guaranteed (or does it have a command) to clean all the hanging data arround ?
mac_ has joined #ruby
<qubit>
tgraham: and that might be the proper way, but would it be possible for a version of bundler to be installed that isn't compatabible with the Gemfile in the project?
<volty>
workmad3: no C-c - working on file.rb for life :)
<havenwood>
volty: reset
<havenwood>
volty: or restart it
joofsh has quit [Remote host closed the connection]
headius has joined #ruby
phantasm66 has joined #ruby
c0rn has joined #ruby
newUser1_ has quit [Remote host closed the connection]
<volty>
yap , thanks havenwood --- i know everything about restarting :)
<volty>
reset is very very nice
joofsh has joined #ruby
joofsh has quit [Remote host closed the connection]
sepp2k1 has joined #ruby
<rien>
workmad3: your suggestion is fantastic! so convenient to just press C-d to reload... thanks lots
sepp2k has quit [Ping timeout: 245 seconds]
<workmad3>
rien: credit where it's due... it was volty's suggestion
<a1ph4g33k>
pry doesn't touch any data, it just reloads the methods.
<workmad3>
rien: I merely stated what it does ;)
<rien>
sorry, thanks volty!
<rien>
volty: to exit I do: type exit, then while it's hanging I do C-c
headius has quit [Client Quit]
<volty>
ask the experts -- if irb can exit with a return code -- then you can check against it
Trazira has joined #ruby
<volty>
(if you want to interrupt without trying to get it idle -- i don't know how fast you are :) )
soheil has quit [Read error: Connection timed out]
quoin has joined #ruby
devoldmx has quit [Read error: No route to host]
pel_daniel has left #ruby [#ruby]
<a1ph4g33k>
ah ... my bad ... hadn't used the reset command in pry before ...
soheil has joined #ruby
devoldmx has joined #ruby
aryaching has quit [Ping timeout: 240 seconds]
Galgorth has quit [Ping timeout: 256 seconds]
angoragoats has quit [Quit: angoragoats]
GoldenGiant___ has quit [Quit: Computer has gone to sleep.]
St_Marx is now known as [St_Marx]
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GoldenGiant___ has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
iliketurtles has quit [Quit: zzzzz…..]
evelyette_ has quit [Remote host closed the connection]
amacgregor has joined #ruby
<rien>
volty: for now this does it :)
iliketurtles has joined #ruby
evelyette_ has joined #ruby
bobinator60_ has quit [Quit: bobinator60_]
burlyscudd has quit [Quit: Leaving.]
einarj has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
einarj has joined #ruby
Kricir has joined #ruby
mneorr has joined #ruby
k610 has quit [Ping timeout: 264 seconds]
devoldmx has quit [Read error: Connection reset by peer]
SiliconDon has joined #ruby
mneorr has quit [Remote host closed the connection]
devoldmx has joined #ruby
geggam_ has quit [Remote host closed the connection]
VTLob has quit [Quit: VTLob]
__userna1 has quit [Ping timeout: 240 seconds]
GoldenGiant___ has quit [Ping timeout: 260 seconds]
sailias has quit [Ping timeout: 245 seconds]
Kelet has quit [Read error: Connection reset by peer]
<volty>
rien: i'll post ...
<rien>
volty: only problem is I lose my bash history and my C-y after reloading with C-c
Kelet has joined #ruby
gyzmodo has quit []
<volty>
?
<rien>
so I can't go arrow-up to get the last history item
ephemerian has quit [Quit: Leaving.]
<volty>
wait a min for a clean way
randomnick_ has quit [Quit: Leaving]
Popple has quit [Quit: Computer has gone to sleep.]
zodiak has joined #ruby
<rien>
awesome, go ahead and test if with your way you can arrow-up and get the command you executed before C-d
<rien>
a1ph4g33k: I might try that in the future but I knew I could get it working without it, plus C-d is really handy for reloading... now it works :)
<volty>
good to know
iliketurtles has quit [Quit: zzzzz…..]
evelyette_ has quit [Read error: Connection reset by peer]
soheil has quit [Read error: Connection timed out]
evelyette_ has joined #ruby
predator117 has quit [Remote host closed the connection]
devoldmx has quit [Read error: Connection reset by peer]
<a1ph4g33k>
rien, that is completely fine ... was just trying to make sure that the merits of my suggestion were understood ... and not interpretted as "my way is better".
<volty>
(btw i use irb only as a calculator hihi )
evelyette_ has quit [Read error: Connection reset by peer]
predator117 has joined #ruby
<rien>
a1ph4g33k: definitely understood here :) pry is amazing but it's a world on its own and I'm always afraid of it becoming my second emacs that I'm always tweaking :)
yekta has joined #ruby
w3pm has joined #ruby
evelyette_ has joined #ruby
<a1ph4g33k>
rien, it could.
Popple has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
<a1ph4g33k>
but ... it is a chainsaw and a half ... ri, editting, getting to see the source of any method ... ability to cd between object bindings...
<a1ph4g33k>
really cool stuff.
<a1ph4g33k>
even lets you edit the source of a function you typed into the repl ... ( and autoreloads it )
<a1ph4g33k>
anyways ... I'm glad you have a solution.
dmerrick has joined #ruby
prism1 has joined #ruby
<a1ph4g33k>
g'afternoon to you folks.
a1ph4g33k has quit [Quit: Leaving]
<lewellyn>
or not.
devoldmx3 has joined #ruby
prism1 is now known as prismate
toastynerd has quit [Ping timeout: 245 seconds]
devoldmx27 has joined #ruby
ru has quit [Ping timeout: 260 seconds]
mansi has joined #ruby
pantaloon has quit [Ping timeout: 248 seconds]
DrCode has quit [Ping timeout: 240 seconds]
ru has joined #ruby
Michae___ has quit [Remote host closed the connection]
Kricir has joined #ruby
Michae___ has joined #ruby
Michae___ has quit [Remote host closed the connection]
DrCode has joined #ruby
devoldmx3 has quit [Read error: Connection reset by peer]
aryaching has quit [Read error: Connection reset by peer]
devoldmx has quit [Ping timeout: 260 seconds]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
SHyx0rmZ has joined #ruby
devoldmx27 has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
pwh has joined #ruby
tvw has quit [Read error: Connection reset by peer]
tvw has joined #ruby
mansi has quit [Ping timeout: 260 seconds]
soheil has quit [Read error: Operation timed out]
lnormous has quit [Quit: Leaving]
<g0th>
hi
ismlages has quit [Read error: Connection reset by peer]
<bnagy>
just make sure the last thing evaluated is your list
<volty>
i got it
<g0th>
ah ok
<volty>
maybe
<AdmiraI>
I'm having issues with spawning processes in ruby. I'm trying to run a (somewhat long-running) external command and kill it after a certain period.
<g0th>
so I put a ";"
<g0th>
and then what I want
<czhang_______>
make it a block
katsrc has quit [Read error: Connection reset by peer]
<czhang_______>
.inject(x) do |a, b|
<czhang_______>
p whatever
<pontiki>
it already is a block
proxie has joined #ruby
<czhang_______>
no i mean a multiline one
<czhang_______>
don't use semicolons
benzocoumaran35 has quit [Ping timeout: 246 seconds]
<g0th>
got it thanks
<g0th>
I think I found the error
snovak has joined #ruby
<g0th>
in the examples I used the list is rather small and actually is already size 1 after the first step
__userna1 has joined #ruby
<g0th>
so I think my functions don't behave as I expected for list size 1
<volty>
ah !
lfox has joined #ruby
<g0th>
(in this specific example)
<volty>
newval = modifiers.inject(oldval) { |val, obj| r = obj.fun(val); puts r; r }
<volty>
next time
<g0th>
yes, thanks
lfox has quit [Client Quit]
<g0th>
they use shift
<g0th>
damn
benzocoumaran35 has joined #ruby
<g0th>
shift returns nil if empty
mac_ has quit [Remote host closed the connection]
<g0th>
I have to catch that
<bnagy>
but shift never returns an array
<volty>
unless the element is an array
<bnagy>
zing!
<bnagy>
:)
<volty>
:)
petey has joined #ruby
<bnagy>
you can use drop(1) if you want the array not the element