<kke>
because i can't add it to gemfile, as it conflicts with actionwebservice and there's a custom soap4r based piece of turd service that needs to run too
<kke>
argh still no SOAP::RPC::Router::SOAPEnvelope
<apeiros_>
soap is only good for dirty things
<yorickpeterse>
I see what you did there
krisvage has quit [Ping timeout: 245 seconds]
* manveru
likes handsoap
<manveru>
as much as i can like anything related to soap :P
<kke>
which has funnily been placed in soap4r-1.5.8/lib/soap/element.rb:class SOAPEnvelope
krz has joined #ruby-lang
<ddv>
anything but simple or object orientated
<yorickpeterse>
apparently savon is popular in here
<kke>
savon seems to work ok but every version breaks compatibility with old code
<kke>
but it's only a client
<kke>
wash_out is some sort of rails3 soap endpoint that should be nicer than action web service, good for those lucky folks that managed to upgrade.. just upgraded from 2.0.2 to 2.3.17, took quite an effort
yalue has joined #ruby-lang
ikst has joined #ruby-lang
dzhulk has quit [Quit: Leaving.]
carloslopes has joined #ruby-lang
dzhulk has joined #ruby-lang
TaQ has joined #ruby-lang
banister`sleep has quit [Remote host closed the connection]
jxie has quit [Quit: leaving]
kgrz has quit [Quit: Computer has gone to sleep.]
rue has joined #ruby-lang
mister_zombie has joined #ruby-lang
<mister_zombie>
Hello! I have a quick question. What would be a good way in Ruby to implement a multi-process fifo kind of thing, kind of like Go's channels?
<mister_zombie>
While my question is quick, I understand the answer may be much, much longer. :P
sush24 has quit [Read error: Connection reset by peer]
pcboy_ has joined #ruby-lang
<manveru>
mister_zombie: the hard part is the "in ruby" :)
<mister_zombie>
I figured out that if I'm working in a Linux environment, FIFO's are probably what I'm looking for.
<mister_zombie>
That and forking like a dirty hooker.
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
<manveru>
well, i'd recommend beanstalkd :)
<cored>
hello all
<cored>
I have a doubt regarding a refactoring
<cored>
the person who review my code just decide to not merge the code to master
<cored>
this was his answer:
<cored>
Not merging this refactor. It adds needless overhead on what should be simple methods.
<cored>
and here is the code before
<mister_zombie>
manveru: Will read about that. Thanks! Will still look into system FIFO's
mytrile has quit [Remote host closed the connection]
davidbalbert is now known as davidbalber|away
r0bgleeson has joined #ruby-lang
<cored>
yorickpeterse: but what do you think of moving the logic out of the model?
<cored>
yorickpeterse: I think that's causing a project of testing in isolation that particular logic, I can't wait 1:30 minutes for the 230 examples to run, that's too much
<yorickpeterse>
I'm not familiar with what it eventually does but it seems to be a good thing to do that
<yorickpeterse>
Since it's a mix of tasks, projects, etc
<cored>
exactly my point
yfeldblum has quit [Ping timeout: 245 seconds]
carloslopes has quit [Remote host closed the connection]
noop has quit [Remote host closed the connection]
banister`sleep has joined #ruby-lang
wmoxam has joined #ruby-lang
<andrewvos>
Which one of you is @hipsterhacker?
jxpx777 has joined #ruby-lang
<cored>
hm
<yorickpeterse>
andrewvos: ...that's not a rubyist
<banisterfiend>
apeiros_: or this: Pry.commands.delete("history")
<banisterfiend>
since 'hist' is another alias anyway
gnufied has quit [Quit: Leaving.]
<apeiros_>
yeah, into which I ran right after history :D
<apeiros_>
ok, command_prefix it is
<apeiros_>
% seems sane
<apeiros_>
thx
<sailias>
see dopie, there is always another way. I even wrote the (&:odd?) in console first, but for simplicity i used the full select {|i|} but you can count on banister to give you a sweet one liner :)
<dopie>
I haven't learned upto or .odd yet as you can tell with my pastie :)
enebo has joined #ruby-lang
cmckni3 has joined #ruby-lang
<zzak>
.select(&:odd?) is the same as: (0..20).select { |num| num.odd? }
robbyoconnor has quit [Max SendQ exceeded]
fn_ has quit [Remote host closed the connection]
robbyoconnor has joined #ruby-lang
<dopie>
sailias: where did you get to learn those in tuts???
<dopie>
or you just basically read a book on it
__Big0__ has joined #ruby-lang
forrest has joined #ruby-lang
<sailias>
dopie: just takes time, you can read up on ruby arrays
<banisterfiend>
i wish ruby enumerables accepted plain: (0..20).select(:odd?) syntax
jxpx777 has joined #ruby-lang
Sarcophabus has quit [Read error: Connection reset by peer]
<judofyr>
banisterfiend: yeah, it'd odd that it only works with .reduce
Sarcophabus has joined #ruby-lang
<banisterfiend>
yeah
gnufied has joined #ruby-lang
<zzak>
judofyr++
<judofyr>
judofyr # => 1
jxpx777 has quit [Ping timeout: 248 seconds]
<realDAB>
banisterfiend: that would run aground on (possible edge) cases where they could take a symbol argument that wasn't meant to be a method name
<realDAB>
e.g., each_with_object(:x)
solars has quit [Ping timeout: 244 seconds]
<realDAB>
(like i said, an edge case :-)
sailias1 has joined #ruby-lang
<crankharder>
if I Kernel.system("cd ~/path_with_rvm_rc_in_it && bundle install") I get all kinds of fun failures becuase, I believe, the command isn't run in a login shell. Ideas on how to fix that?
<crankharder>
basically rvm doesn't load properly when trying to do that
jonahR has joined #ruby-lang
enebo has quit [*.net *.split]
outoftime has quit [*.net *.split]
slyphon has quit [*.net *.split]
djinni` has quit [*.net *.split]
Caius has quit [*.net *.split]
bcol has quit [*.net *.split]
asio has quit [*.net *.split]
zanea has quit [*.net *.split]
ggreer has quit [*.net *.split]
dustint has quit [*.net *.split]
sailias has quit [*.net *.split]
ruskie has quit [*.net *.split]
amateurhuman has quit [*.net *.split]
snk has quit [Quit: going down with ship.]
dustint has joined #ruby-lang
amateurhuman has joined #ruby-lang
ruskie has joined #ruby-lang
enebo has joined #ruby-lang
Caius has joined #ruby-lang
bcol has joined #ruby-lang
djinni` has joined #ruby-lang
slyphon has joined #ruby-lang
asio has joined #ruby-lang
ggreer has joined #ruby-lang
zanea has joined #ruby-lang
outoftime has joined #ruby-lang
sailias1 is now known as sailias
snk has joined #ruby-lang
postmodern has quit [Quit: Leaving]
gnufied has quit [Quit: Leaving.]
poga has joined #ruby-lang
ged has quit [Quit: WeeChat 0.4.0]
tomzx_mac has quit [Ping timeout: 255 seconds]
mistym has quit [Ping timeout: 255 seconds]
Mon_Ouie has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
fire has quit [Quit: WeeChat 0.4.0]
bzalasky has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
kristofferrr has quit [Quit: ❤]
bzalasky has joined #ruby-lang
davidbalber|away is now known as davidbalbert
robbyoconnor has quit [Ping timeout: 256 seconds]
jondot has quit [Ping timeout: 276 seconds]
judofyr has quit [Remote host closed the connection]
<larrybolt>
Oh! That probably is where it is going wrong! I was amazed by the beautify of the reference docs but was a bit frustrated when a quick search for ::foreach didn't returned any results.
<larrybolt>
I have a php background btw
<larrybolt>
Would it be a good idea to just jump into rails or better leave that for a bit until I have a better understanding of ruby?
<larrybolt>
I'm guessing the latter :P
<RickHull>
i think that's a better long term plan
<RickHull>
if you need to crank something out in the short term you could skip some things
fn_ has quit [Remote host closed the connection]
<larrybolt>
Thanks for the link RickHull! tryruby.org skips quite some stuff and I start wondering why exactly something works
<larrybolt>
Well everything I experienced today (just started with ruby and rails) is stunning and b-e-a-utiful!
marr has quit [Ping timeout: 245 seconds]
<larrybolt>
I just fear for how easy it will be to find a job as a ruby/rails developer here in Belgium as PHP is pretty common
zorbyte has quit [Quit: leaving]
<larrybolt>
And I must say the admin-feature of django and web2py almost made me reconsider my choice when comparing ruby and python as next step.
<crankharder>
it appears that cmd line args and gets do not play very nicely together... if I run a script like this: ruby my_fun_script foo_arg -- and that script has a 'gets' command, I get this error: `gets': No such file or directory - foo_arg (Errno::ENOENT)
<crankharder>
can i have my cake and eat it too?
<RickHull>
paste your script
mbull9 has quit [Remote host closed the connection]
<RickHull>
the answer to your question is yes
torrieri has joined #ruby-lang
<drbrain>
crankharder: Kernel#gets is ARGF.gets not $stdin.gets
davidbalber|away is now known as davidbalbert
<RickHull>
and ARGF is a perlism right?
<RickHull>
takes a little bit of explanation IIRC
<crankharder>
drbrain: ty
<drbrain>
RickHull: I think perl has a similar feature, yes
<RickHull>
ARGF definitely tries to have its cake and eat it too, representing the "input file" IIRC. either piped in or named in a command line arg
breakingthings has joined #ruby-lang
<drbrain>
yeah, I've bit myself a couple times recently with Kernel#gets
pr0ton has joined #ruby-lang
swav has quit [Remote host closed the connection]
swav has joined #ruby-lang
jonahR has quit [Quit: jonahR]
blacktul_ has quit [Remote host closed the connection]
<RickHull>
crankharder: "The arguments passed to your script are stored in the ARGV Array, one argument per element. ARGFassumes that any arguments that aren't filenames have been removed fromARGV."
<RickHull>
so you can use naked/ARGF gets, just make sure to consume ARGV first
<crankharder>
I used $stdin.gets
swav has quit [Ping timeout: 272 seconds]
<crankharder>
works like gravey
mrsolo has joined #ruby-lang
KA_ has quit [Quit: KA_]
nyuszika7h has quit [Ping timeout: 246 seconds]
nyuszika7h has joined #ruby-lang
methods has joined #ruby-lang
Nisstyre has quit [Quit: Leaving]
kevinfagan has joined #ruby-lang
MaddinXx_ has quit [Remote host closed the connection]
methods has left #ruby-lang [#ruby-lang]
jonahR has joined #ruby-lang
krz has quit [Quit: krz]
ruby-lang680 has joined #ruby-lang
ruby-lang680 has left #ruby-lang [#ruby-lang]
larrybolt has quit [Remote host closed the connection]
snarfmason has joined #ruby-lang
__Big0__ has quit [Read error: Connection reset by peer]
jastix has joined #ruby-lang
__Big0__ has joined #ruby-lang
datanoise has quit [Ping timeout: 255 seconds]
KA_ has joined #ruby-lang
My_Hearing has joined #ruby-lang
Qwak has quit []
tdy_ has joined #ruby-lang
havenwood has joined #ruby-lang
<crankharder>
can I run a get a system command and get both the output and the exit code returned somehow?
<drbrain>
crankharder: Process.spawn
<drbrain>
+ Process.wait
<drbrain>
you can do it with popen also
<crankharder>
smells like newfangled 1.9 hotness
timur has quit [Quit: Lost terminal]
<crankharder>
but ty, will look at both
<drbrain>
you can get the last exit status with $?, but I'm always worried I'll get the wrong status code (due to racing) when using just system or `` with multiple processes
<crankharder>
Process.spawn seems to be dumping the cmd's STDOUT, but not returning it to a variable
<crankharder>
er, yea, just returning it
<drbrain>
crankharder: you can redirect IO
<crankharder>
ah, ok fair
<drbrain>
crankharder: check the documentation
<crankharder>
yep
<drbrain>
I use it with Tempfile or IO.pipe
fn__ has joined #ruby-lang
marr has joined #ruby-lang
bluepojo has joined #ruby-lang
marr123 has joined #ruby-lang
marr123 has quit [Client Quit]
__Big0__ has quit [Remote host closed the connection]
larrybolt has joined #ruby-lang
intellitech has quit [Ping timeout: 264 seconds]
robbyoconnor has joined #ruby-lang
trappist has joined #ruby-lang
marr has quit [Ping timeout: 252 seconds]
<trappist>
this is driving me nuts, why would a rescue not rescue? I'm rescuing Koala::Facebook::APIError in my method, but it still raises a Koala::Facebook::APIError and blows up
<RickHull>
paste it
pkrnj has joined #ruby-lang
datanoise has joined #ruby-lang
My_Hearing is now known as Mon_Ouie
pr0ton has quit [Quit: pr0ton]
<trappist>
k one sec
marr has joined #ruby-lang
<yxhuvud>
trappist: how do the ancestor chain of Koala::Facebook::APIError look like? Is it a descendant of StandardError?
<yxhuvud>
shouldn't matter if you explicitly check for *that* exception, but if you hadn't, then it would have expressed itself in that way.
sebastiansier has quit [Remote host closed the connection]
<yxhuvud>
trappist: try rescuing Exception => e and print whatever exception you get at that point.
<trappist>
yxhuvud: yeah it inherits directly from StandardError
urbanmonk has quit [Ping timeout: 272 seconds]
<RickHull>
are you sure fail_auth! isn't raising another excp?
<yxhuvud>
(or well, not being a descendant of standarderror would express itself in that way)
<trappist>
no change if I rescue Exception
<yxhuvud>
looking at that stacktrace, OAuthException looks like a candidate
<trappist>
oh... it's in fail_auth!... if I comment that out it behaves as expected
<RickHull>
\o/
<trappist>
yxhuvud: tried that too, but debugged e.class and it was Koala::Facebook::APIError
fn__ has quit [Remote host closed the connection]
kurko_ has quit [Quit: Computer has gone to sleep.]
<trappist>
still very confused though, there's no way for fail_auth! to raise a Koala::Facebook::APIError
swav has joined #ruby-lang
<yxhuvud>
of course it is, since you pass the exception to it
<trappist>
oh, right
<trappist>
but, that's nowhere in the backtrace
mbull9 has joined #ruby-lang
intellitech has joined #ruby-lang
intellitech has quit [Client Quit]
<trappist>
well, I just reproduced what fail_auth! does in my method and it's ok... still very confused though
swav has quit [Ping timeout: 248 seconds]
<RickHull>
try outside of irb
<RickHull>
extract to a file and run with ruby
punchfacechampio has quit []
punchfacechamp has joined #ruby-lang
fire has joined #ruby-lang
beiter has quit [Quit: beiter]
intellitech has joined #ruby-lang
mehwork has quit [Quit: leaving]
kurko_ has joined #ruby-lang
snarfmason has quit [Quit: Computer has gone to sleep.]
snarfmason has joined #ruby-lang
rsl has quit [Quit: Computer has gone to sleep.]
k4k1-c0der has joined #ruby-lang
ddd has quit [Read error: Connection reset by peer]
io_syl has quit [Ping timeout: 264 seconds]
io_syl has joined #ruby-lang
KA_ has quit [Quit: KA_]
KA_ has joined #ruby-lang
KA_ has quit [Client Quit]
fire has quit [Quit: WeeChat 0.4.0]
robbyoconnor has quit [Ping timeout: 248 seconds]
hahuang65 has joined #ruby-lang
jastix has quit [Remote host closed the connection]
glebm has quit [Quit: Computer has gone to sleep.]
carloslopes has quit [Remote host closed the connection]
glebm has joined #ruby-lang
Artheist has joined #ruby-lang
mehwork has joined #ruby-lang
ottbot has quit [Ping timeout: 240 seconds]
intellitech has quit [Quit: intellitech]
snarfmason has quit [Quit: Computer has gone to sleep.]
s0ber has quit [Read error: Connection reset by peer]
sebastiansier has joined #ruby-lang
sebastiansier has quit [Remote host closed the connection]
s0ber has joined #ruby-lang
jondot has quit [Ping timeout: 272 seconds]
jondot has joined #ruby-lang
dblack__ has quit [Quit: dblack__]
dblack_ has quit [Quit: dblack_]
sockmonk has quit [Ping timeout: 256 seconds]
sn0wb1rd_ has joined #ruby-lang
intellitech has joined #ruby-lang
sn0wb1rd has quit [Ping timeout: 272 seconds]
sn0wb1rd_ is now known as sn0wb1rd
yalue has quit [Quit: Leaving]
lcdhoffman has joined #ruby-lang
lcdhoffman has quit [Client Quit]
yfeldblum has quit [Ping timeout: 245 seconds]
hahuang65 has quit [Quit: Computer has gone to sleep.]
hahuang65 has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
snarfmason has joined #ruby-lang
<hahuang65>
anyone know how to profile what is in the realtime section of Benchmark results?
<drbrain>
hahuang65: "profile"?
<hahuang65>
yeah, just trying to figure out which component is taking up the most time
<hahuang65>
and why
<drbrain>
hahuang65: you can use -rprofile or other profilers, but Benchmark.measure (and friends) are like a stopwatch
sailias has quit [Ping timeout: 245 seconds]
<outoftime>
hahuang65: I have had tremendously good luck with perftools.rb
<larrybolt>
Just out of being curious
wmoxam has quit [Ping timeout: 246 seconds]
<larrybolt>
Topaz is a high performance implementation of the Ruby programming language, written in Python on top of RPython (the toolchain that powers PyPy).
<larrybolt>
So that means writing Ruby but having just a different compiler/interpreter?
<drbrain>
larrybolt: yes
<hahuang65>
perftools.rb? thanks
<hahuang65>
i'll check those out
<hahuang65>
thank you
<drbrain>
similar to JRuby
<outoftime>
hahuang65: no problem. i have a script that will convert pprof --raw output into a full call tree (for some reason perftools doesn't have this built in, even though the data generated by perftools makes it entirely possible)
<larrybolt>
Why are there so many different ways to run Ruby?
<outoftime>
hahuang65: it's very messy, but it works -- i'd be happy to gist it for you
<RickHull>
larrybolt: why not?
<RickHull>
there is one official way, from the guy who created it
<hahuang65>
outoftime: that'd be fantastic. Thank you.
<drbrain>
larrybolt: because it's fun to do
<drbrain>
larrybolt: why are there so many different ways to compile C?
<larrybolt>
Good point, as long as any code your write works across all platforms, I guess it's not bad.
<RickHull>
also different platforms and implementations can optimize for different things
<larrybolt>
I haven't though about it that way, just realising that now, thank you
<outoftime>
hahuang65: no problem, let me know if it's useful. someday I'll clean it up and release it in a more formal way
<outoftime>
hahuang65: the really cool thing about perftools is that its impact on performance is low enough that you can reasonably run it on live production code
<outoftime>
unlike, say, ruby-prof
snarfmason has quit [Quit: Computer has gone to sleep.]
fn__ has joined #ruby-lang
intellitech has quit [Quit: intellitech]
mercwithamouth has quit [Ping timeout: 248 seconds]
r0bgleeson has quit [Quit: WeeChat 0.3.8]
pr0ton has joined #ruby-lang
fn__ has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 245 seconds]
fn__ has joined #ruby-lang
mercwithamouth has joined #ruby-lang
earthquake has quit [Quit: earthquake]
fn__ has quit [Remote host closed the connection]
poga_ has joined #ruby-lang
fn_ has joined #ruby-lang
poga has quit [Ping timeout: 244 seconds]
sailias has joined #ruby-lang
intellitech has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
ryanf has quit [Quit: leaving]
ryanf has joined #ruby-lang
klebervirgilio has quit [Remote host closed the connection]
earthquake has joined #ruby-lang
klebervirgilio has joined #ruby-lang
beho has quit [Remote host closed the connection]
<hahuang65>
where do I get pprof?
<hahuang65>
I have perftools via gem install... but I dunno where pprof is
<hahuang65>
I just gotta download the zip and it'll be a ruby script in there?
<hahuang65>
yeah found it.
jonahR has quit [Quit: jonahR]
fn_ has quit [Remote host closed the connection]
klebervirgilio has quit [Ping timeout: 248 seconds]
anonymuse has quit [Quit: Leaving...]
glebm has quit [Quit: Computer has gone to sleep.]
glebm has joined #ruby-lang
forrest has quit [Quit: Leaving]
davidbalber|away is now known as davidbalbert
earthquake has quit [Quit: earthquake]
k4k1-c0der has quit [Quit: Ex-Chat]
snarfmason has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 248 seconds]
<outoftime>
hahuang65: the gem should provide a pprof.rb executable
breakingthings has quit []
<outoftime>
hahuang65: i believe you'll have a much easier time using that
<hahuang65>
yup, i just didn't notice it :)
yfeldblum has joined #ruby-lang
poga_ has quit [Remote host closed the connection]
poga has joined #ruby-lang
sailias has quit [Quit: Leaving.]
wmoxam has joined #ruby-lang
ottbot has quit [Ping timeout: 248 seconds]
snarfmason has quit [Quit: Computer has gone to sleep.]
dustint has quit [Read error: Operation timed out]