<nymous>
but i mostly dislike russian communities for such things
orbyt_ has joined #ruby
<KeyJoo>
I saw your github-profile, and why you have zero friends???
<nymous>
i am a sysadmin, not a dev, mostly patching things
jphase has joined #ruby
cdg has joined #ruby
<KeyJoo>
nymous: well, then understand the interest in different programming languages and to that project (dsl) as the idea of solving a narrowly focused problem
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jphase has quit [Ping timeout: 250 seconds]
<RickHull>
my advice would be to nail down the lib side first -- have you coded all the functionality you need? for example the different types of rendering (?)
cdg has quit [Ping timeout: 268 seconds]
<RickHull>
then make sure you can write reasonable scripts against the lib -- don't get too crazy with UX stuff like runners and DSLs necessarily
<nymous>
actually no, because i don't know which types would be
<RickHull>
and then finally polish with runners and DSLs if everything is happy
<nymous>
i just pull collected data to routines supplied by user
<nymous>
besides that, i think i have implemented enough for using this lib myself
cschneid_ has quit [Remote host closed the connection]
<nymous>
in kind of production environment
<RickHull>
what's an example of the rendering problem for the different backends (?) like zabbix etc
cschneid_ has joined #ruby
<nymous>
you might want to render collected data with something top-like
<nymous>
i mean draw tables, refresh them etc
<RickHull>
would you call graphite, zabbix, collectd "back ends" ?
<nymous>
or you might just puts them out
<RickHull>
or subscribers?
<nymous>
you know, most of them are just "form a proper string and send me"
<nymous>
with exception to zabbix though
<RickHull>
I would start with the most universal, common representation, nailed down in the lib
Coldblackice has joined #ruby
<nymous>
it has complex stages like discover metrics, then get metrics one by one
<RickHull>
and have system-specific stuff in the lib where appropriate
<RickHull>
where a system is (collectd, zabbix, etc)
jphase has joined #ruby
<nymous>
have you seen my gist?
<RickHull>
and allow the script to override the representation if need be
<nymous>
check the render bit
<RickHull>
yes, that does not look user friendly
<nymous>
it is mostly enough for everything, just add some network code to pull to graphite
<RickHull>
i can't imagine a new user writing that
<RickHull>
i don't know what root, k, g, m, v are
<nymous>
collectd doesn't need even network code
cschneid_ has quit [Ping timeout: 240 seconds]
<nymous>
well, my bad
Coldblackice has quit [Remote host closed the connection]
<RickHull>
i mean, it's shorthand with short variables, fair enough
<nymous>
metrics are combined into groups
Coldblackice has joined #ruby
<nymous>
groups can be nested
<nymous>
root is a root of the group tree
<RickHull>
probably you want to have that loop / structure inside the lib -- it looks like a universal and common procedure
Coldbla9 has quit [Ping timeout: 240 seconds]
sucks has joined #ruby
<RickHull>
and allow the script to override if needed
<nymous>
i was thinking about that, but it doesn't go deep into the tree and also it won't be good for top-like renderer, if anyone would want to write one
<RickHull>
you could have top_render inside the lib
<RickHull>
and just call it from the script
PaulWasher has joined #ruby
steph_ has quit []
Freshnuts has joined #ruby
<nymous>
currently i just yield that block :)
<RickHull>
if the metrics infinitely nest, then you would want the universal procedure to recurse
<PaulWasher>
Jesus Christ came into the world to save sinners and you have know idea what that means. It's not just that you've sinned. You've never done anything but sin.
<RickHull>
possibly with some stop condition or sanity check like levels=10
the_f0ster has quit [Ping timeout: 248 seconds]
Technodrome has joined #ruby
<nymous>
it's up to user, they can be nested, or be just top-level groups like in my example
<nymous>
you see the end of it - load_state, tick, save_state - that part i want to put into a runner
<nymous>
because forcing users to write things like that is not good
RickHull has left #ruby [#ruby]
RickHull has joined #ruby
guacamole has joined #ruby
RickHull has quit [Changing host]
RickHull has joined #ruby
tcopeland has joined #ruby
<nymous>
well, idk, maybe i have to make some infrastructure for an agent, i mean convention for dir/file naming for code blocks
<nymous>
or just don't mind user to require whatever he wants
the_f0ster has quit [Ping timeout: 250 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guacamole has quit [Ping timeout: 240 seconds]
cseder has joined #ruby
jameser has joined #ruby
quobo has joined #ruby
alveric2 has joined #ruby
cagomez has joined #ruby
<nymous>
btw, where's the proper place to put an executable into a gem? bin or exe dir?
<nymous>
i've seen both
<RickHull>
bin
<Radar>
exe
<Radar>
fight me :D
<RickHull>
make sure you list them in your gemspec
<Radar>
`bundle gem` proposes using `exe`
eclm has joined #ruby
<RickHull>
exe really is the better term
<Radar>
`bundle gem` uses `bin` for dev CLI tools, like `bin/console` / `bin/setup`
<RickHull>
but muh unix culture
* apeiros
concurs that exe is the better term, but bin has all the conventions and history
waveprop has quit [Ping timeout: 268 seconds]
<havenwood>
I prefer bin.
<Radar>
nymous: spec.bindir = "nymous" go on you know you want to
<havenwood>
RubyGems > Bundler ;-)
<nymous>
i also prefer bin, but have looked at rake's code and it uses exe
alveric1 has quit [Ping timeout: 268 seconds]
<Radar>
railties uses exe too
<Radar>
silly me for suggesting that Rails follows sane conventions...
ogres has quit [Quit: Connection closed for inactivity]
<nymous>
i had written a dozen or so utils in ruby already, but never ever used rails lol
<Radar>
probably for the best
<havenwood>
I think Bundler made a mistake to suggest or assume that adding "./bin" to PATH is sane or okay at all.
<nymous>
some people tends to think they are indistinguishable
<Radar>
havenwood: where does Bundler do that?
<Radar>
havenwood: I thought that was a gem's gemspec that did that.
<havenwood>
well, they don't *do it* but I've heard team members encourage that.
<Radar>
ah ok
<havenwood>
Radar: The only reason they defied RubyGems' convention of bin for gem executables afaik is that they wanted to add "./bin" to path to get at the setup stuff. Maybe they literally type bin/ but Andre at least has suggested it as a pattern.
<havenwood>
I argued after the talk that it was an anti-pattern. It just seems like a can of worms to me.
<Radar>
yeah "gem install blah" <- overrides `<important bash command here>` what could go wrong
fishcooker has joined #ruby
<RickHull>
i can see where ./bin in PATH would be handy -- but not sure why bundler cares. and what if it were added to the end of PATH so as not to override?
<RickHull>
not sure how it would interact with a bash built-in
vee__ has quit [Ping timeout: 258 seconds]
cagomez has quit []
<havenwood>
RickHull: I'll just add the sl command and hope you don't have sl installed for ls typos ;-)
<havenwood>
choo choo!
<havenwood>
RickHull: yeah, end of path is not nearly as tragic, no doubt
exhiled has joined #ruby
<nymous>
ok, thanks for your advices, i have to go off to bed, 4 am here
cagomez has joined #ruby
alnewkirk has joined #ruby
nymous has quit [Quit: RAGING AXE! RAGING AXE!]
<exhiled>
Is there a general ruby help channel?
<exhiled>
or just programming in general?
<RickHull>
this is it, for ruby
<exhiled>
Is there a general chat channel?
<RickHull>
most channels have a specific technical focus
<havenwood>
exhiled: As far as Ruby-land, there's a #ruby-offtopic channel for non-Ruby discussion.
<exhiled>
oh cool, thank you havenwood
<havenwood>
exhiled: There's a #friendly-coders channel that's entirely general.
<RickHull>
i mentioned earlier that floats make for poor representation of monetary amounts
jphase has joined #ruby
eclm has quit [Ping timeout: 268 seconds]
<RickHull>
the long and short of it is: a float is a data type for representing non-integers (like 1.23). due to the way computers work, it cannot represent such numbers perfectly. it has other good tradeoffs that make up for this inability
<RickHull>
there are other ways to represent non integers that can store the value 1.23 exactly
<Sparky>
RickHull: puts "Your new balance is #{balance.round(2)}"
<RickHull>
nice
<RickHull>
also: puts format("Your new balance is %0.2f", balance)
<RickHull>
the % means: stick a variable here
<RickHull>
%i is integer, %s is string, %f is float
<RickHull>
but you can modify %f to say, give me only 2 decimal places: %0.2f
alnewkirk has quit [Ping timeout: 260 seconds]
<Sparky>
So float is more accurate and intiger makes it so people can read it more easily
<RickHull>
not exactly
troys is now known as troys_
<RickHull>
basically, since computers are binary, meaning they deal in powers of 2
<RickHull>
whereas decimal values are powers of 10
<apeiros>
rare known fact: ieee754 includes specs for a decimal float. just that no popular hardware implements it.
<RickHull>
there are some values that are cleanly expressed in powers of 10, that can't be expressed cleanly in powers of 2
<RickHull>
and yeah, it's about what is fast and efficient for hardware to execute
<elomatreb>
In the CPU architecture class in my first semester of CS they made us calculate IEEE floats by hand, and while it was the most annoying shit at the time, it helped so much in understanding them in hindsight
<RickHull>
early computers didn't have floating point processors
<apeiros>
elomatreb: yeah, had to help wifey with that this year
mtkd has quit [Ping timeout: 240 seconds]
<RickHull>
but scientific computing demanded floating points to accurately represent rockets and asteroids and stuff
<elomatreb>
You can do floating point stuff on CPUs without hardware support for them, it's just a lot slower
<RickHull>
BCD 4 LYFE
mtkd has joined #ruby
<elomatreb>
And the early computers sometimes did have support for floating point-like operations, as it was the time of highly complex instruction sets offering special instructs for everything
<Sparky>
How early? 50s early?
<RickHull>
the "floating point" part means it can efficiently represent tiny values as well as massive values
<elomatreb>
60s early, IIRC
<RickHull>
like 0.3e23 or 0.3e-23
milardov_ has joined #ruby
<elomatreb>
For perspective: These IEEE floats were only standardized in 85
<RickHull>
but it sacrifices a very tiny slice of absolute precision relative to a clean decimal value
<RickHull>
for certain decimal values
milardov_ has quit [Remote host closed the connection]
milardov_ has joined #ruby
<elomatreb>
The further you get from 0 (the closer you get towards the maximum/minimum values) the larger the inaccuracy gets, btw
<apeiros>
only in absolute terms. in relation to the magnitude, the inaccuracy stays mostly constant
<RickHull>
the alternatives to floating point, as I understand, can reclaim decimal precision, but they sacrifice in terms of the range of values they express, the memory required, and the speed of processing
Rythen has joined #ruby
milardovich has quit [Ping timeout: 250 seconds]
<apeiros>
reminds me that I wanted to implement a delta comparison based on that :-/
<RickHull>
have you looked at minitest's delta and epsilon comparisons?
<apeiros>
does use absolute deltas iirc
<apeiros>
or did the implementation change?
<RickHull>
there is also an epsilon comparison, which I'm not quite sure exactly what it does
<RickHull>
but it must be a relative magnitude thing
AndBobsYourUncle has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<RickHull>
as I understand the issue, the linear r^2 encodes the linear error divided by the constant error
jphase has joined #ruby
<RickHull>
it's typically used for a blob of data points, like a scatter plot
imode has joined #ruby
<RickHull>
and the default assumption is no relationship between x and y
<RickHull>
and thus the y_bar or mean is the default predictor
<RickHull>
so we can calculate the "constant" error, which is deviations from y_bar or the mean
<RickHull>
then we can calculate the linear error, for e.g. y = mx + b predictor
jphase_ has joined #ruby
* apeiros
still reads a bit the WP article
<RickHull>
for f(x) = x**3, the constant error is huge
<apeiros>
but I think it's the wrong topic at 0335 XD
<RickHull>
and it swamps the linear error
<RickHull>
so the linear r^2 looks good
chaos95_ is now known as chaos95
<RickHull>
x**3 is really not a blob of scattered points
<RickHull>
it's a very steep slope
<RickHull>
the linear r^2 doesn't tell us whether it's x**2 or x**3 or just x. it just says, it's not a uniform blob
<RickHull>
anyways... :)
<apeiros>
yeah, quite woosh atm, sorry :D
jphase has quit [Ping timeout: 250 seconds]
<apeiros>
and pillow time for over 3h now :-S
<RickHull>
'night :)
conta has quit [Remote host closed the connection]
<apeiros>
n8
jphase_ has quit [Ping timeout: 258 seconds]
<Sparky>
Sweet! One of my study drills for this lesson is to play Zork, I don't know what it has to do with coding, but let;s go
cdg has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
kishmesh has joined #ruby
<kishmesh>
hi. anybody using rspec for testing? how do I get my specs to see my "models" without having to "manually require" them in the spec file?
<RickHull>
what's the problem with require ?
<RickHull>
one thing that I suspect is underappreciated is manipulating the LOAD_PATH with `ruby -I lib`
Technodrome has joined #ruby
<RickHull>
for my rspec tests, I don't use the `spec` runner -- I just `ruby -I lib test/my_file.rb`
<RickHull>
from the project root
bob_f has quit [Ping timeout: 248 seconds]
bob_f has joined #ruby
<RickHull>
and these days, Rake::TestTask will make sure your project lib is in the LOAD_PATH
<RickHull>
all that said, what is the problem with require ?
Xiti` has joined #ruby
nofxx_ has joined #ruby
cdg has quit [Ping timeout: 252 seconds]
MrBusiness3 has joined #ruby
p0p0pr37_ has joined #ruby
p0p0pr37_ has joined #ruby
p0p0pr37_ has quit [Changing host]
drcode has quit [Ping timeout: 248 seconds]
xMopxShell has quit [Ping timeout: 248 seconds]
edwardly has quit [Ping timeout: 248 seconds]
rcs has quit [Ping timeout: 248 seconds]
soahccc has quit [Ping timeout: 248 seconds]
bmn has quit [Ping timeout: 248 seconds]
priodev has quit [Ping timeout: 248 seconds]
matthewd has quit [Ping timeout: 248 seconds]
akhkharu has quit [Ping timeout: 248 seconds]
<kishmesh>
RickHull: the problem with require ... just trying to save that extra work that is necessary to insert the relevant relative path (e.g. of a model)
axsuul has quit [Ping timeout: 248 seconds]
quiller has quit [Ping timeout: 248 seconds]
ujjain has quit [Ping timeout: 248 seconds]
nekomune has quit [Ping timeout: 248 seconds]
<RickHull>
you shouldn't need require_relative for files that are in your project lib/
<RickHull>
or any strange paths to pass to require
alnewkirk has joined #ruby
milardov_ has quit []
JsilverT has quit [Ping timeout: 248 seconds]
kitallis has quit [Ping timeout: 248 seconds]
chihhsin_ has quit [Ping timeout: 248 seconds]
jsrtr_ has quit [Ping timeout: 248 seconds]
ineb has quit [Ping timeout: 248 seconds]
matti has quit [Ping timeout: 248 seconds]
yasu has quit [Ping timeout: 248 seconds]
cdg has joined #ruby
nowhere_man has joined #ruby
quobo has quit [Quit: Connection closed for inactivity]
ledestin has quit [Ping timeout: 248 seconds]
nofxx has quit [Ping timeout: 248 seconds]
hurricanehrndz has quit [Ping timeout: 248 seconds]
shoogz has quit [Ping timeout: 248 seconds]
iNs has quit [Ping timeout: 248 seconds]
Elysia has quit [Ping timeout: 248 seconds]
hxegon has quit [Ping timeout: 248 seconds]
evie_hammond has quit [Ping timeout: 248 seconds]
tris has quit [Ping timeout: 248 seconds]
Cyrus has quit [Ping timeout: 248 seconds]
ErhardtMundt has quit [Ping timeout: 248 seconds]
Muz has quit [Ping timeout: 248 seconds]
octomancer has quit [Ping timeout: 248 seconds]
ltd has quit [Ping timeout: 248 seconds]
PaulePanter has quit [Ping timeout: 248 seconds]
thejoecarroll has quit [Ping timeout: 248 seconds]
lucas has quit [Ping timeout: 248 seconds]
<RickHull>
the only time I use require_relative is for stuff I need to require outside of lib/ like a test/spec_helper.rb
<RickHull>
in general, I suspect the "extra work" you are doing is unnecessary
gizmore has quit [Ping timeout: 248 seconds]
nowhereman has quit [Ping timeout: 248 seconds]
jamesaxl has quit [Ping timeout: 248 seconds]
CrazyEddy has quit [Ping timeout: 248 seconds]
Xiti has quit [Ping timeout: 248 seconds]
rileyy_ has quit [Ping timeout: 248 seconds]
MrBismuth has quit [Ping timeout: 248 seconds]
p0p0pr37 has quit [Ping timeout: 248 seconds]
linduxed has quit [Ping timeout: 248 seconds]
reaVer has quit [Ping timeout: 248 seconds]
CustosLimen has quit [Ping timeout: 248 seconds]
frojnd has quit [Ping timeout: 248 seconds]
balo has quit [Ping timeout: 248 seconds]
Roa has quit [Ping timeout: 248 seconds]
badeball has quit [Ping timeout: 248 seconds]
<RickHull>
can you show me an example?
p0p0pr37_ is now known as p0p0pr37
mmasaki has quit [Ping timeout: 240 seconds]
<RickHull>
do you have a git repo with this extra work?
ErhardtMundt has joined #ruby
<RickHull>
er, github, or similar
bokayio has quit [Ping timeout: 240 seconds]
matti has joined #ruby
matti has joined #ruby
chihhsin has joined #ruby
zenspider has quit [Ping timeout: 260 seconds]
PaulePanter has joined #ruby
tekk has quit [Ping timeout: 240 seconds]
hxegon has joined #ruby
lucas has joined #ruby
<kishmesh>
i have a file "lib/models/search_result.rb" .. and a test in "spec/models/search_result_spec.rb" when I try to run the spec with "rspec" from root path I get "uninitialized constant SearchResult"
reaVer has joined #ruby
badeball has joined #ruby
Archrover has quit [Ping timeout: 240 seconds]
konsolebox has quit [Ping timeout: 240 seconds]
<RickHull>
ok, at the top of search_result_spec.rb, you should have: require 'models/search_result'
axsuul has joined #ruby
<RickHull>
is that so?
ineb has joined #ruby
JsilverT has joined #ruby
dinfuehr has quit [Ping timeout: 260 seconds]
d^sh has quit [Ping timeout: 260 seconds]
jnollette has quit [Ping timeout: 260 seconds]
exhiled has joined #ruby
dinfuehr has joined #ruby
zenspider has joined #ruby
bokayio has joined #ruby
<RickHull>
it should not be a require_relative, nor should it have a complicated path argument
jnollette has joined #ruby
<kishmesh>
RickHull: nope that was missing.
<kishmesh>
RickHull: it works now
<RickHull>
alright!
<kishmesh>
RickHull: is there a way to "autorequire"?
mmasaki has joined #ruby
<RickHull>
that is the proper way
<kishmesh>
ok
<RickHull>
any .rb file should declare what it needs, via require
<RickHull>
or require_relative if need be
<kishmesh>
RickHull: ok I agree
friday has quit [Changing host]
friday has joined #ruby
CrazyEddy has joined #ruby
<kishmesh>
so where is defined that "require" looks in lib by default?
<RickHull>
good question -- that is the LOAD_PATH manipulation I referred to
KeyJoo has quit [Ping timeout: 240 seconds]
<RickHull>
try this:
<RickHull>
ruby spec/models/search_result_spec.rb
tekk has joined #ruby
<RickHull>
I expect it will fail
<RickHull>
it won't know where to find models/search_result
Archrover has joined #ruby
soahccc has joined #ruby
brainslug has joined #ruby
rileyy has joined #ruby
TheRealMattM has quit [Read error: Connection reset by peer]
<matthewd>
tbh if it hadn't scrolled past while I glanced at the ftfy readme, it probably wouldn't have come to mind when I then went to search
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shinnya has joined #ruby
mostlybadfly has joined #ruby
guille-moe has quit [Ping timeout: 248 seconds]
John___ has joined #ruby
guille-moe has joined #ruby
ur5us has joined #ruby
hightower2 has joined #ruby
<chrisseaton>
Bish: Rubinius removed their JIT, and despite planning to write a new one in a couple of weeks, we still don't have one about a year and a half later
<chrisseaton>
Bish: until they put the JIT back in, it's slower than MRI
<Bish>
? wasn't that the cool feature that made it better?
<chrisseaton>
Yep
<matthewd>
Last I checked you also had to look very hard to find a mention of Ruby
<chrisseaton>
Personally I think removing it without a replacement was a mistake, and it was never going to be possible to implement a new JIT in a couple of weeks, but then I don't have to maintain it. I think that was their complaint - they found it too hard to work on the JIT.
* matthewd
is pretty sure that Evan was actually the cool feature
<chrisseaton>
I think there are still people trying - doesn't GitLab have Yorick Peterse working one day a week on it? And there's now a company behind it as well.
<chrisseaton>
It's still useful if you are doing things that don't need high performance.
milardovich has joined #ruby
<Bish>
matthewd: whats special about evan?
Jidoor has quit [Ping timeout: 260 seconds]
tvw has joined #ruby
ur5us has quit [Ping timeout: 248 seconds]
<Bish>
chrisseaton: well rubinius was good at maxing all my cpus
<Bish>
but was slower in progress
<matthewd>
Bish: I just think that the project effectively stalled when he moved on to other things.. it carried on forward for a little while, but lost momentum with [IMO, outside observer, etc] shifting priorities
<Bish>
i might be super naive thinking a faster interpreter can't be that hard of a task
<Bish>
i feel like it shouldn't be
<matthewd>
And IME the person/people at the centre of a project are a major factor in its prospects for the future
<Bish>
why is having jit in mri so hard?
<chrisseaton>
Bish: a faster interpreter is possible - there is a lot of research into how to do this - but Rubinius is written in Ruby so it needs to be not just a bit faster but a lot faster
<matthewd>
Bish: With or without maintaining compatibility with existing behaviour?
<Bish>
chrisseaton: well, if you how does the fact that it is written in ruby change anything about speed?
<Bish>
about compile-time, sure it does.
<Bish>
but the result(byte-code) should be as fast, no matter in what language the compiler is written in
<chrisseaton>
Bish: MRI doesn't just need a JIT, it needs an extremely good JIT to optimise Ruby. That's the issue - it's not a linear return on investment, it's a huge cost with no benefit until you have a really sophisticated JIT. I gave a lecture on why this is https://www.youtube.com/watch?v=b1NTaVQPt1E.
<matthewd>
Bish: You can't compile ruby.
<Bish>
sure i can
<Bish>
asm>> puts "hello"
<matthewd>
chrisseaton: Yes I know that's a massive oversimplification ;)
<ruby[bot]>
Bish: I have disassembled your code, the result is at https://eval.in/896260
<chrisseaton>
Bish: but the core library is written in Ruby in Rubinius, so operations that were native C code and now running in the interpreter as well - the interpreter has to do more, so even if it was faster it needs to be a lot faster
hightower2 has quit [Ping timeout: 240 seconds]
<Bish>
chrisseaton: okay, you're right
* Bish
googles crystallang after years
<chrisseaton>
I canonical example I give is `[a, b, c].sort[1]` - a normal JIT doesn't help you make that kind of code fast, because it's just calls to other methods. You need. JIT that is powerful enough to see into and through all those method calls, eliminate all those objects, and so on, to do well on Ruby.
raatiniemi has quit [Ping timeout: 268 seconds]
<chrisseaton>
A JIT that does the usual things like making local variables fast and calls fast isn't good enough for Ruby.
<Bish>
wow, crystal looks cool by now
<Bish>
do they have threads yet?
<matthewd>
Bish: The short answer is that a much faster ruby would be very popular with some very large / deep-pocketed companies. If it's "not that hard of a task", you should do it, and then sell the result.
<Bish>
matthewd: well you forgot the part where i said " i might be super naive"
raatiniemi has joined #ruby
uZiel has quit [Ping timeout: 240 seconds]
Jidoor has joined #ruby
<Jidoor>
If i create a function that takes a lambda as parameter, can I define what parameters the lambda takes in the function definition?
<Bish>
so you could add a check to what you refer to as "function"
ur5us has quit [Ping timeout: 248 seconds]
<Bish>
raise ArgumentError.new "Say whattt?" if b.arity != 4
ana_ has quit [Quit: Leaving]
Jidoor has quit [Ping timeout: 260 seconds]
minimalism has quit [Quit: minimalism]
nadir has joined #ruby
synthroid has joined #ruby
<Cork>
anyone have a recommended for a soap lib that is maintained?
apparition has quit [Ping timeout: 240 seconds]
drcode has quit [Ping timeout: 240 seconds]
ana_ has joined #ruby
kryptoz has joined #ruby
rabajaj has quit [Quit: Leaving]
<Bish>
Cork: no, soap sucks
<Cork>
i know
<Cork>
don't have a choice though :/
<Cork>
well except do the api calls manually
milardov_ has joined #ruby
<Bish>
after 283182381238 tries
<Bish>
i sticked with savon
<Bish>
can't tell you why, though
<Bish>
but i thought about it ALOT
<Cork>
haven't used soap in ruby since... 1.7?
<Cork>
so i'm a bit out of touch with what works :)
<Cork>
thx will have a look at savon
ur5us has joined #ruby
<Cork>
(ah right, i remember this one... SOAP::WSDLDriverFactory ) yup it is what i used...
<Cork>
log gone and dead though thanks for that! >_>
<Cork>
Bish: ya, savon looks usable thx!
milardovich has quit [Ping timeout: 240 seconds]
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #ruby
d_kam___ has quit [Quit: Be back later ...]
ur5us has quit [Ping timeout: 248 seconds]
milardov_ has quit [Remote host closed the connection]
d_kam___ has joined #ruby
milardovich has joined #ruby
sagax has joined #ruby
guille-moe has quit [Ping timeout: 240 seconds]
d_kam____ has joined #ruby
milardovich has quit [Ping timeout: 240 seconds]
bmurt has joined #ruby
d_kam___ has quit [Ping timeout: 248 seconds]
jphase has joined #ruby
zipace has joined #ruby
GodFather has quit [Ping timeout: 252 seconds]
d_kam____ has quit [Read error: Connection reset by peer]
jphase has quit [Ping timeout: 240 seconds]
d_kam____ has joined #ruby
ramfjord has joined #ruby
ur5us has joined #ruby
d_kam____ has quit [Read error: Connection reset by peer]
d_kam____ has joined #ruby
alfiemax has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 248 seconds]
d_kam____ has quit [Client Quit]
<Bish>
Cork: i think i remember different implementations making things impossible to use without metaprogramming
<Bish>
savon never traps you
<Bish>
soap is still a pain in the ass, but you can do ALL THE THINGS
<Cork>
ya
uZiel has joined #ruby
<Cork>
am i reading the documentation correctly and you just give it a hash to message and that's it?
d_kam____ has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
<Bish>
yeah but there are some things.. like..
<Bish>
ambiguity of tagnames and attributes (it's really old memory, so dont quote me)
<Bish>
and even those you can circumvent when thinking a bit
<Cork>
ya, i've seen that in one of the examples
<Cork>
thx for the tip though, this is A LOT better then what i expected
<Bish>
long story short, you can create any soap request
<Bish>
Cork: what are you talking with?
<Bish>
via soap
<Cork>
certificate orders
<Bish>
like, ssl?
<Cork>
and code signing and things like that ya
<Cork>
the order api is in soap
<Cork>
and all the documentation is for java and c# so *yay*
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jphase has joined #ruby
<Bish>
fuck c# and java gus
<Cork>
:)
Ltem has quit [Quit: Leaving]
<Cork>
i was trying to get around it with just net/http and builder
Ltem has joined #ruby
<Cork>
but it keeps complaining about extra tags around the messages and... ** this
<Bish>
been there, done htat
<Bish>
went back to savon
<Cork>
:D
<Bish>
but either way, my suggestion is to skip soap completely
<Cork>
by doing?
<Bish>
nuking companies that use it?
<Cork>
lol agreed
d_kam_____ has joined #ruby
raatiniemi has quit [Ping timeout: 240 seconds]
<Bish>
i mean soap would be great, if everyone agreed to some thing
truenito has quit [Ping timeout: 248 seconds]
<Cork>
i don't think soap will ever bee grate
<Bish>
nope, everyone bulding their own definition of arrays
<Bish>
or.. integers..
<Bish>
or floats..
<Cork>
it is too over complicated
<Bish>
or anything
<Bish>
no it's super great, if it was standardized how to send data
raatiniemi has joined #ruby
<Bish>
json is simpler without attributes etc, thats why people tend to not go crazy when using it
cvander has quit [Ping timeout: 252 seconds]
<Cork>
ya
d_kam____ has quit [Ping timeout: 248 seconds]
<Cork>
i prefer when my data structures don't have a forth dimension :D
<Bish>
only when working with 3d shadows im happy
<Cork>
true
uZiel has quit [Ping timeout: 240 seconds]
Psybur has joined #ruby
<Bish>
Cork: last time i used soap, i couldn't get it to work, no matter how many docs i read how soap is supposed to look
<Bish>
strace'd the shit out of php (because i had php code, doing the same thing)
<Bish>
and it did totally different things, than the ones i read about
<Cork>
oh, lovely
cvander has joined #ruby
<Bish>
then used savon to emulate the behaviour shitty php soapclient does
<Bish>
which everyone seems to support, because fuck logic
uZiel has joined #ruby
<Cork>
fuck standards you mean :)
synthroid has quit [Remote host closed the connection]
JJonah__ has joined #ruby
milardovich has joined #ruby
JJonah__ has quit []
JJonah has joined #ruby
ur5us has joined #ruby
milardovich has quit [Ping timeout: 240 seconds]
darkmorph has joined #ruby
<JJonah>
My application has custom errors that look the following, and I'm wondering if there is a good way that I can make a factory (perhaps with Class.new) to generate them in fewer lines, and if so what is the best way to do that:
<Cork>
Bish: is there a way to get what xml it generates?
<ruby[bot]>
JJonah: irccloud.com has no syntax highlighting, distracting formatting and loads slowly for most.
ur5us has quit [Ping timeout: 268 seconds]
<JJonah>
To clarify my question, I'd prefer to write something like `DomainError = CustomError("Some domain specific thing just went wrong")` to create that class.
<matthewd>
JJonah: You certainly could do that
<matthewd>
JJonah: I wouldn't, personally -- seems not enough gain vs the indirection, breaking default rdoc/yard parsing, etc.
<JJonah>
matthewd: Those are good points, but if I have 20 domain errors it's 100 lines of code vs 20 which isn't trivial.
cvander has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Cork>
Bish: ah, found it
<matthewd>
JJonah: def CustomError(msg); Class.new(RuntimeError) { const_set :Message, msg; def initialize; super(self.class::Message); end }; end
<matthewd>
Something like that ¯\_(ツ)_/¯
guille-moe has joined #ruby
milardovich has joined #ruby
andikr has quit [Remote host closed the connection]
<matthewd>
(note I switched from to_s to passing it as the message parameter in the initializer -- if you really want to_s, you can do that too, but the above feels less like it's fighting the superclass)
d_kam______ has joined #ruby
cvander has joined #ruby
cdg has joined #ruby
<JJonah>
matthewd: Ah, ok, thanks. So when you pass it as the message parameter it is automatically used in `to_s`?
d_kam_____ has quit [Read error: Connection reset by peer]
milardovich has quit [Ping timeout: 248 seconds]
drcode has joined #ruby
cdg_ has joined #ruby
synthroid has joined #ruby
Ltem has quit [Quit: Leaving]
d_kam_______ has joined #ruby
d_kam______ has quit [Read error: Connection reset by peer]
<Bish>
Cork: was it that builder stuff? really odd
cvander has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
d_kam_______ has joined #ruby
<guardian>
hello, is there a quick way given a string to only keep numbers / digits in it?
the_f0ster has joined #ruby
ur5us has quit [Ping timeout: 248 seconds]
gnufied has joined #ruby
<tobiasvl>
guardian: 'abc123hehe'.gsub(/\D/, '')
<tobiasvl>
for example? probably better ways without regex
DLSteve has joined #ruby
ana_ has quit [Quit: Leaving]
vifino has quit [Quit: Who turned this off?! D:<]
gnufied has quit [Client Quit]
anisha has joined #ruby
gnufied has joined #ruby
anisha has quit [Client Quit]
anisha has joined #ruby
oleo has joined #ruby
dionysus69 has quit [Ping timeout: 246 seconds]
apeiros has quit [Remote host closed the connection]
d_kam_______ has quit [Read error: Connection reset by peer]
d_kam_______ has joined #ruby
apeiros has joined #ruby
Sparky has joined #ruby
hopsoft has quit [Read error: No route to host]
<Sparky>
Hello!
apeiros has quit [Ping timeout: 260 seconds]
shinnya has quit [Ping timeout: 248 seconds]
cvander has joined #ruby
ur5us has joined #ruby
ldnunes has quit [Read error: Connection reset by peer]
sucks has joined #ruby
apeiros has joined #ruby
ldnunes has joined #ruby
cvander has quit [Client Quit]
cvander has joined #ruby
apeiros has quit [Client Quit]
d_kam_______ has quit [Read error: Connection reset by peer]
d_kam________ has joined #ruby
ur5us has quit [Ping timeout: 248 seconds]
profetes has joined #ruby
hopsoft has joined #ruby
truenito has joined #ruby
<mnemon>
guardian: "asd123".delete('^0-9')
d_kam________ has quit [Read error: Connection reset by peer]
d_kam________ has joined #ruby
jrafanie has joined #ruby
milardovich has joined #ruby
guille-moe has quit [Ping timeout: 240 seconds]
guille-moe has joined #ruby
jottr has joined #ruby
milardov_ has joined #ruby
polishdub has joined #ruby
the_f0ster has quit [Ping timeout: 268 seconds]
rippa has joined #ruby
Ltem has joined #ruby
milardovich has quit [Ping timeout: 240 seconds]
guille-moe has quit [Ping timeout: 248 seconds]
ur5us has joined #ruby
truenito has quit [Ping timeout: 240 seconds]
ur5us has quit [Ping timeout: 240 seconds]
d_kam________ has quit [Quit: Be back later ...]
d_kam________ has joined #ruby
Rapture has joined #ruby
Technodrome has joined #ruby
bkxd has joined #ruby
mtkd has quit [Ping timeout: 268 seconds]
mtkd has joined #ruby
d_kam_________ has joined #ruby
d_kam________ has quit [Read error: Connection reset by peer]
InfinityFye has quit [Ping timeout: 264 seconds]
doublemalt_ has joined #ruby
bkxd has quit [Ping timeout: 248 seconds]
guille-moe has joined #ruby
the_f0ster has joined #ruby
d_kam_________ has quit [Client Quit]
knight33 has joined #ruby
dionysus69 has joined #ruby
ur5us has joined #ruby
bronson has joined #ruby
bmurt has quit [Ping timeout: 240 seconds]
ur5us has quit [Ping timeout: 240 seconds]
jrafanie_ has joined #ruby
ta__ has joined #ruby
ta has quit [Read error: Connection reset by peer]
jrafanie has quit [Ping timeout: 240 seconds]
cschneid_ has joined #ruby
knight33 has quit [Ping timeout: 248 seconds]
netherwolfe has joined #ruby
milardovich has joined #ruby
iamarun has joined #ruby
raynold has joined #ruby
rajno has joined #ruby
rippa has quit [Ping timeout: 268 seconds]
milardov_ has quit [Ping timeout: 240 seconds]
ta__ has quit [Remote host closed the connection]
ta has joined #ruby
ur5us has joined #ruby
ta has quit [Ping timeout: 248 seconds]
doublemalt_ has quit [Ping timeout: 240 seconds]
alex`` has quit [Quit: WeeChat 1.9.1]
ur5us has quit [Ping timeout: 268 seconds]
truenito has joined #ruby
<guardian>
tobiasvl: thank you!
VeryBewitching has joined #ruby
aScottishBoat has joined #ruby
truenito has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
<aScottishBoat>
Any former Perl hackers? What makes you like Ruby but not quite miss Perl?
hs366 has quit [Quit: Leaving]
mikecmpbll has joined #ruby
orbyt_ has joined #ruby
<Nilium>
Mmm, I mostly just learned Ruby to do fox toolkit stuff and ended up writing most of my other stuff in it and forgot Perl after a not using it for long enough.
aufi has quit [Quit: Leaving]
mikecmpb_ has quit [Ping timeout: 240 seconds]
the_f0ster has quit [Ping timeout: 240 seconds]
A124 has quit [Ping timeout: 240 seconds]
<aScottishBoat>
Fair, I guess it was good for you then.
<octomancer>
Ruby is prettier to look at. Actual objects, rather than a lexical hack, so you chain methods. Did I mention that it's prettier? ;-)
darkmorph has quit [Ping timeout: 240 seconds]
kculpis has joined #ruby
ur5us has joined #ruby
milardovich has quit [Remote host closed the connection]
A124 has joined #ruby
<aScottishBoat>
+1
<aScottishBoat>
Working on any projects you guys?
<octomancer>
I use chef at work so ...
Burgestrand has quit [Quit: Closing time!]
the_f0ster has joined #ruby
cagomez has joined #ruby
ur5us has quit [Ping timeout: 248 seconds]
<raynold>
Ahh it's a wonderful day
conta has quit [Ping timeout: 240 seconds]
morfin has quit []
synthroid has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: inabit. zz.]
mikecmpbll has joined #ruby
synthroid has joined #ruby
hightower2 has quit [Ping timeout: 240 seconds]
<havenwood>
aScottishBoat: Had any fun with Perl 6? It certainly took some inspiration from Ruby.
MrSparkle has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
exhiled has joined #ruby
<Nilium>
Only Ruby project I have right now is a little cron job to clean up old disk images out in Google Compute Engine.
<aScottishBoat>
havenwood: Not yet. I want to, but I'm being lazy about giving it a go.
truenito has joined #ruby
<aScottishBoat>
havenwood, what's inspired from Ruby?
<aScottishBoat>
Nilium, I'm not working on any Ruby projects atm, but I'm reverse engineering parts of ManageIQ.
<Nilium>
Not sure what that is. My current project is Erlang.
<havenwood>
aScottishBoat: I'd have to find the quote where they discuss the Ruby influence. It's only fitting since Ruby borrowed from Perl before Perl 6 borrowed from Ruby.
<aScottishBoat>
Ooo. Cool. ManageIQ is a cloud management tool; it has the service layer and then the UI layer. Both are rails apps.
<aScottishBoat>
havenwood, if you can find it please share. I'd love to read it.
ur5us has joined #ruby
mark_66 has quit [Quit: Leaving.]
milardovich has quit [Ping timeout: 248 seconds]
<havenwood>
aScottishBoat: I think one of the best discussions I heard about it was actually in the #perl6 channel. Let me try to find it because it was interesting!
anisha has quit [Quit: This computer has gone to sleep]
MrSparkle has joined #ruby
weaksauce has joined #ruby
jeffreylevesque has joined #ruby
<jeffreylevesque>
is there a built in function where i can check if a string contains a path as a substring?
<aScottishBoat>
jeffreylevesque, not sure but that sounds like a pretty handy function.
<jeffreylevesque>
the string should be a result of the linux `echo $PATH`
<havenwood>
(So you don't match a partial path, unless you want that.)
exhiled has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kinlo has joined #ruby
milardovich has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<aScottishBoat>
havenwood, interesting name. How'd you choose it?
<kinlo>
does ruby convert strings to symbols when they are used as an index in a hash? I am under the impression that ruby is converting stuff and I don't fully understand the logic behind it...
cschneid_ has quit [Remote host closed the connection]
the_f0ster has joined #ruby
kryptoz has quit [Remote host closed the connection]
<havenwood>
aScottishBoat: It was a gaming name from when I was a kid. I liked the outdoors. My real name (Shannon) wasn't available on the Githubs. I wasn't quite early enough.
ramfjord has quit [Ping timeout: 260 seconds]
<havenwood>
aScottishBoat: And how did you become a Scottish boat? :-)
alan_w has joined #ruby
alan_w has left #ruby [#ruby]
[Butch] has joined #ruby
<aScottishBoat>
Hah. Well, I want a boat. And I wish to be back in Scotland. Just came to mind.
<mnemon>
tcpdump: probably pretty minimal unless you end up with a performance problem on the DB side, not doing it is usually bad idea unless you really understand the implications.
adlerdias has joined #ruby
nofxx has joined #ruby
<tcpdump>
mnemon: Thansk its managing to hit my app server logs 530 times a min.
<tcpdump>
And I was just trying to determine if evaluating ever single api call for CSRF is causing a perfomance hits.
greensleeves has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
marxarelli|afk is now known as marxarelli
sucks has quit [Remote host closed the connection]
impermanence has joined #ruby
<Sparky>
YO! I'm suprised how well I'm learning this stuff- no small thanks to my ability to google things though :P
imode has joined #ruby
kies has quit [Ping timeout: 240 seconds]
Serpent7776 has quit [Quit: Leaving]
cam27 has joined #ruby
tens0r has joined #ruby
SeepingN has joined #ruby
hays_ has quit [Ping timeout: 268 seconds]
ur5us has joined #ruby
dionysus69 has joined #ruby
nofxx_ has joined #ruby
<jeffreylevesque>
`ENV['PATH'].split(':').include? path` will return a boolean?
jrafanie_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<elomatreb>
#include? does, yes
<jeffreylevesque>
thank you!
ur5us has quit [Ping timeout: 240 seconds]
nofxx has quit [Ping timeout: 248 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
<Sparky>
The more I do coding, the better I will get at coding- that's how this works right?
Ltem has joined #ruby
mson has joined #ruby
weaksauce has joined #ruby
cagomez has quit [Remote host closed the connection]
<aScottishBoat>
Anyone with Rails experience? I've an issue that ManageIQ and Rails IRC rooms aren't addressing. Feeling a bit bummed ugh lol
<greensleeves>
Hi all, new to Ruby. I was hoping if I could get some help with this GitHub project. It's about fetching a man page and using a script to generate bash completion files automatically
<greensleeves>
trouble is I am unable to get the correct result i.e. only getting partial list of options from man pages, can someone please help me?
<Sparky>
RickHull: I just did a script that opens a text file, turncates it, and re-writes it!! exciting stuff
<greensleeves>
the project uses Ruby
<RickHull>
greensleeves: it looks like it's written mostly in bash/sh, with a call to ruby. for debugging, I would try to extract the ruby bits to an .rb file
<RickHull>
the regular expressions at the top look gnarly and are probably a source of the misbehavior
mim1k has quit [Ping timeout: 246 seconds]
<RickHull>
one thing that helps for debugging regular expressions is to use the //x modifier, and put every "term" on its own line, with comments
ruskie has joined #ruby
[Butch] has quit [Ping timeout: 248 seconds]
cagomez has joined #ruby
cam27 has quit [Quit: cam27]
<RickHull>
oh, it does use the //x modifier
<RickHull>
but probably not to its full advantage
tens0r has quit [Quit: tens0r]
[Butch] has joined #ruby
<greensleeves>
Thanks Rick. Can you help me with the debugging? I am not good at programming and haven't used regex before. Do I need to copy the regex to a file that ends with .rb? Pardon my ignorance
<RickHull>
sorry, this looks like a much deeper pit than I am personally willing to wade into
<RickHull>
it's calling ruby -ne 'stuff'
<RickHull>
so copy out the 'stuff' to an .rb file and try to see what it's doing
<greensleeves>
Ah, okay. Let me try that
<RickHull>
if you are new to programming, then this will likely be a fruitless exercise, but maybe worthwhile just to try to understand it
claudiuinberlin has joined #ruby
<RickHull>
Sparky: opening an input file and rewriting the file or to a different output file -- this is a common pattern and very useful :)
<greensleeves>
Could you point me to a link that will help me understand the Ruby part of the shell script?
mikecmpbll has joined #ruby
<greensleeves>
I am familiar with regex in Perl, but a bit rusty
<RickHull>
you should look up what $_ is, and then what String#scan does
<Sparky>
RickHull: My current lesson: https://learnrubythehardway.org/book/ex17.html Apparently its copying the contents of one file into another file OOO! I can see many implications for this, maybe adding things to a file- I could seek(new line) and then copy, right? Does it work like that?
exhiled has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has joined #ruby
orbyt_ has quit [Client Quit]
bmurt has joined #ruby
<RickHull>
it could, sure. the `evdump` script I posted earlier is kind of similar. it can read a /dev/input/X file (binary data) and spit out human-readable text
guille-moe has quit [Ping timeout: 240 seconds]
<RickHull>
there is somewhat of an equivalency between: read from STDIN, or read a file. and write to STDOUT, or write to a file
<RickHull>
often, writing to STDOUT is all you need, because it's very easy to redirect that output to a file using shell redirection
<RickHull>
e.g. echo "here is the contents" > my_file.txt
exhiled has joined #ruby
ur5us has quit [Ping timeout: 248 seconds]
cagomez has quit [Remote host closed the connection]
<jhass>
it tells you it wanted to open the file "test1.txt,test2.txt" but it didn't exist
<jhass>
I'd guess you failed to put some " or ' into the right places or to .split something
darkmorph has joined #ruby
orbyt_ has joined #ruby
cagomez has quit [Ping timeout: 240 seconds]
guille-moe has joined #ruby
miah_ is now known as miah
kies has joined #ruby
miah has quit [Changing host]
miah has joined #ruby
nickjj_ is now known as nickjj
<Sparky>
I didn't input the ARGV correct
ur5us has joined #ruby
ruskie has left #ruby ["..."]
ur5us has quit [Ping timeout: 240 seconds]
<Sparky>
I have a philosophical question....
<jhass>
the answer is maybe :P
<Sparky>
If you separate a very large script with ; on one line... is it still just one line of code?
<RickHull>
only in a trivial sense, not meaningfully
ur5us has joined #ruby
<RickHull>
it should only be used when dealing with chatbots to keep input and output on a single line of chat
<jhass>
mh, I guess everything between \n or ; we call a statement?
guille-moe has quit [Ping timeout: 248 seconds]
<jhass>
and usually you would have one statement per line, ; just allows to have more than one
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Sparky>
I'm about to learn functions, brb
<RickHull>
philosophical question: does ruby have functions?
<Sparky>
WOAH!
<jhass>
some argue lambda procs are functions
<RickHull>
ruby certainly has methods, which are nearly equivalent to functions, and can be made to act and look exactly like functions
<Sparky>
Hey so uhmm.. functions, they name code.. like I do with the variables? So I may be getting ahead of myself, but can I assign code to a function like I assign strings to a variable and call them?
<jhass>
you probably already used a lot of "functions" (we prefer to call them methods in ruby) already, like gets, puts and so on. ruby just also allows you to define your own
<RickHull>
Sparky: for now, it's fine to refer to ruby methods as functions -- there is a subtle distinction that doesn't matter right now
<RickHull>
so `def` is used to define a function (aka method)
cschnei__ has quit [Read error: Connection reset by peer]
cschneid_ has joined #ruby
cdg_ has joined #ruby
LocaMocha has quit [Ping timeout: 260 seconds]
cdg has joined #ruby
tvw has quit [Remote host closed the connection]
troulouliou_dev has quit [Quit: Leaving]
ramfjord has quit [Ping timeout: 240 seconds]
cdg_ has quit [Ping timeout: 248 seconds]
cdg has quit [Ping timeout: 248 seconds]
tomphp has joined #ruby
ramfjord has joined #ruby
hays_ has joined #ruby
steph_ has quit [Remote host closed the connection]
lagweezle_away is now known as lagweezle
steph_ has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sucks has quit [Ping timeout: 240 seconds]
troulouliou_dev has joined #ruby
KeyJoo has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duckpuppy has joined #ruby
jaruga has quit [Quit: jaruga]
tomphp has joined #ruby
pche has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
stoopidmunkey has quit [Read error: Connection reset by peer]
stoopidmunkey has joined #ruby
truenito has quit [Ping timeout: 240 seconds]
cagomez_ has quit [Remote host closed the connection]
cagomez has joined #ruby
ams__ has quit [Quit: Connection closed for inactivity]
troys is now known as troys_
stoopidmunkey has quit [Remote host closed the connection]
stoopidmunkey has joined #ruby
cagomez has quit [Ping timeout: 248 seconds]
troulouliou_dev has quit [Quit: Leaving]
troulouliou_div2 has joined #ruby
troulouliou_div2 has quit [Client Quit]
coffeecupp has joined #ruby
<tcpdump>
Anyone know if theres a rails app to show connections, threads, etc in real time
<tcpdump>
?
jenrzzz has joined #ruby
coffeecupp has quit [Client Quit]
coffeecupp has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ule>
Like NewRelic does?
jenrzzz has quit [Ping timeout: 248 seconds]
ldnunes has quit [Quit: Leaving]
<RickHull>
I would expect there is lots of stuff in the metrics/stats space
minimalism has joined #ruby
mtkd has quit [Read error: Connection reset by peer]
^mtkd has joined #ruby
aScottishBoat has quit [Ping timeout: 250 seconds]
<RickHull>
as for real time, what kind of latency is acceptable? the lower the latency, the more impact the monitoring itself has, generally
<RickHull>
are you ok with stats that refresh on a page load? or do you need constantly updating javascript stuff?
jrafanie has joined #ruby
<RickHull>
probably you want your production rails machine fairly clean and serving your production app. and something like collectd or statsd gathering metrics and making them available to your monitoring app on another machine
dkotlica has joined #ruby
<RickHull>
though this implies some amount of latency and batching -- but minimizes impact on the production machine
nofxx__ has joined #ruby
nofxx_ has quit [Remote host closed the connection]
<impermanence>
arr = [ "string1", ... , "stringN" ] ; def installer mod ... exec "command #{mod}" end ; arr.each { |e| installer e }
<impermanence>
exec only runs once. why?
dkotlica has left #ruby ["Leaving"]
<impermanence>
I can post a gist but I figure this is stupidly obvious on my end or something
mson has quit [Quit: Connection closed for inactivity]
JBbanks has joined #ruby
<jhass>
impermanence: exec replaces the current process
<waveprop>
but when i do it again in an other middleware, the application just returns an object called Rack::BodyProxy. here's the offending middleware, with the problematic part commented out ====>>>> https://gist.github.com/anonymous/4c927c789208149f05388140f76fb147
ta has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<waveprop>
which says that @response.body is an instance of the Response object
<waveprop>
but in the second gist, for encode.rb, with the currently not-commented code, i am able to push strings onto response
<waveprop>
why cant i encode(response)
jottr has quit [Ping timeout: 240 seconds]
<RickHull>
what does @response.finish return?
mikecmpbll has quit [Quit: inabit.]
<waveprop>
it returns the rack triplet, [200, {header, another_header}, [<i'm_the_body />]]
<RickHull>
ok -- I haven't messed with rack in a while
<waveprop>
np
<waveprop>
it's pretty cool
<RickHull>
encode(response) would call response.to_json right?
<waveprop>
yeah that's right
<RickHull>
so is that a problem, or ?
steph__ has joined #ruby
<waveprop>
sorry, so it's working as is. but in encode.rb, i need to also set a header, for Content-Type, with the string containing "application/" and "json" in this case
<waveprop>
which is why i have to use the @response.set_header method
<waveprop>
and when you use that one, you have to also call @response.finish
<waveprop>
and that handles sending the triplete, so i'll have to comment out the lines which currently manually return the triplet
<RickHull>
is that a problem? why are you bypassing the @response thing?
steph__ has quit [Remote host closed the connection]
steph_ has quit [Ping timeout: 248 seconds]
steph_ has joined #ruby
<waveprop>
becaus when i bypass @response, it works. that's one way to do it with rack, you can just manually return the triplet. The problem is that in encode.rb, the app returns an object called Rack::BodyProxy when i _dont_ bypass the @response way. make sense?
aScottishBoat has joined #ruby
eregon has quit [Remote host closed the connection]
<RickHull>
hmm
<waveprop>
and this is confusing because the exact same @resposne code works in the other middleware
<RickHull>
so your first gist works fine by returning @response.finish
<waveprop>
so it seems like i cant encode response because it is some sort of object?
<RickHull>
but your second gist behaves differently when @response is used similarly?
<waveprop>
thats correct
<RickHull>
ok L14
<RickHull>
what is `response` (not `@response`)
<waveprop>
ok
<RickHull>
oh i see
<waveprop>
kk
<RickHull>
return value from @app.call
xco has joined #ruby
<waveprop>
yes
<RickHull>
is it a string?
<waveprop>
i think its an array, let me inspect
<RickHull>
a Response object?
<waveprop>
could be a Response object, i suspect if it is then thas the prob?
<waveprop>
one sec
kryptoz has joined #ruby
steph_ has quit [Read error: Connection reset by peer]
steph_ has joined #ruby
<waveprop>
ok geez
mim1k has joined #ruby
<waveprop>
its a hash, or a string, depending what the app at the bottom of the middleware stack does
<RickHull>
the most common thing to call .to_json on is a Hash
polishdub has quit [Quit: leaving]
<RickHull>
rarely does it make sense to call it on a string, and sometimes an array
jottr has joined #ruby
fishcooker has quit [Quit: Leaving.]
<waveprop>
okay. i could have the app at the bottom of the stack just always return a hash
<RickHull>
well... i don't quite know what all of this is doing
David_H__ has quit [Remote host closed the connection]
ledestin has joined #ruby
aScottishBoat has quit [Ping timeout: 240 seconds]
David_H_Smith has joined #ruby
<waveprop>
thanks RickHull. i'll see if always returning a hash helps. i still need to read up on BodyProxy. i'm confused about why it's being mentioned, i thought you had to manually use that method...
mim1k has quit [Ping timeout: 240 seconds]
mkroman has quit [Ping timeout: 240 seconds]
<waveprop>
very cool, i'll look at your client! thanks
<waveprop>
:)
<RickHull>
oops, no provisional yaml support
<RickHull>
wrong project :)
mkroman has joined #ruby
<waveprop>
ha np man
mkroman has quit [Changing host]
mkroman has joined #ruby
ta__ has quit [Read error: Connection reset by peer]