havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.2, 2.3.5 & 2.2.8: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby || Books: https://goo.gl/wpGhoQ
<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
<havenwood> !spam PaulWasher
PaulWasher was kicked from #ruby by ruby[bot] [spamming is a bannable offense, see http://ruby-community.com/pages/user_rules]
Azure has joined #ruby
safetypin has joined #ruby
<nymous> so, idk, should i really implement some renderers or just let user decide
<RickHull> when the script calls render, perhaps it supplies a list of groups and a max_depth
<RickHull> if you have some tree-like structure with a root, then the user should not have to write the tree-walking code
<RickHull> the user should just declare what should be rendered and how
cdg has joined #ruby
<nymous> what if I want to render an erb using collected data?
<RickHull> the lib should provide render_erb with the same API
<RickHull> i.e. accept a list of groups or whatever
<RickHull> maybe an erb template string
<nymous> you could really write something root["cpu"]["usage"].value
<nymous> i mean now
the_f0ster has joined #ruby
wolfshappen has quit [Quit: Waffs have technical problems too]
<nymous> *smthg like
<zanoni> there an easy way to turn off hidden directories and files using Find.find?
<RickHull> you mean those starting with '.' ?
<zanoni> well here's the deal, with glob hidden directories don't show up, dots do, but with Find.find, hidden files and dirs show, like .git
moei has joined #ruby
<zanoni> with glob /**/* doesn't return ignore or hidden, Find seems to
<RickHull> I haven't used it before, but something like: Find.find('~') { |entry| next if entry.starts_with?('.'); ... }
moei has quit [Remote host closed the connection]
<zanoni> yeah, okay...cool, i though there might be some secret method, the docs at ruby-doc are a bit lacking on it
tvw has quit [Ping timeout: 240 seconds]
<nymous> isn't example is what you want?
<havenwood> &ri Find
wolfshappen has joined #ruby
<zanoni> oh so that is what prune is for
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
moei has joined #ruby
John___ has quit [Read error: Connection reset by peer]
<zanoni> yeah, okay sorry, i think something wasn't registering with me ;) going to try the actual example LOL
<nymous> RickHull: btw, my current test code (besides of rspec) is really like that :) https://gist.github.com/divanikus/3497ae867bbea0cf878506a199b17870
<RickHull> yeah, that's easier to grok :)
s3nd1v0g1us has joined #ruby
s3nd1v0g1us has quit [Max SendQ exceeded]
s3nd1v0g1us has joined #ruby
<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.
alnewkirk has quit [Ping timeout: 260 seconds]
nolakat has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
AndBobsYourUncle has joined #ruby
chimpanze has joined #ruby
alnewkirk has joined #ruby
chimpanze has quit []
mim1k has joined #ruby
cagomez has quit [Ping timeout: 268 seconds]
cschneid_ has joined #ruby
vee__ has joined #ruby
shinnya has quit [Ping timeout: 268 seconds]
<Sparky> RickHull: I did that think that I was trying to do earlier!! I'm so excited!! https://gist.github.com/Dasms/0ad50f7cc1735c1ec9b43c369ccfa37c#file-test-rs
JsilverT has joined #ruby
mim1k has quit [Ping timeout: 248 seconds]
<RickHull> i think you do want to store your prices in a Hash, keyed by the item name
<RickHull> for a toy example like this, it doesn't much matter
<RickHull> but as an exercise, a good next step would be to incorporate the Hash and get the same output
cschneid_ has quit [Ping timeout: 250 seconds]
<RickHull> congrats, regardless :)
<Sparky> I tried hash! But it wasn't working for me :(
marxarelli is now known as marxarelli|afk
fishcooker has quit [Ping timeout: 240 seconds]
marr has quit [Ping timeout: 268 seconds]
zanoni has quit [Remote host closed the connection]
xall has joined #ruby
exhiled has quit [Quit: Textual IRC Client: www.textualapp.com]
<Sparky> RickHull: You put the balance -= price.. that subtracts the balance from the price, correct? Why didn't I think of that?!
xall has quit [Client Quit]
<Sparky> Because I didn't yet know it was a function of ruby, that's why- but now I do
<RickHull> it subtracts the price from the balance
cschneid_ has joined #ruby
<RickHull> it is a shorthand; it expands to: balance = balance - price
jphase has quit [Remote host closed the connection]
lagweezle is now known as lagweezle_away
bmurt has joined #ruby
<RickHull> that shorthand comes from the C language
<RickHull> and maybe Algol or something before it
<RickHull> something very similar you see often in ruby code is: var ||= 'some value'
<RickHull> it expands to: var = var || 'some value'
<Sparky> I'm having so much fun with this, you have no idea
<RickHull> which means: assign 'some value' to var, only if var has a falsey value
<RickHull> (typically nil)
alnewkirk has quit [Ping timeout: 268 seconds]
<RickHull> >> var = nil; var ||= 'some_value'; [var, var ||= 'other value']
<ruby[bot]> RickHull: # => ["some_value", "some_value"] (https://eval.in/895848)
<RickHull> first var is assigned nil; then var is assigned 'some value'; var is not assigned 'other value' because it has a truthy value already
SeepingN has quit [Quit: The system is going down for reboot NOW!]
jphase has joined #ruby
<RickHull> note that my formulation is a little odd, with an array as the final expression -- this is just to get the bot to give me multiple outputs
cschneid_ has quit [Ping timeout: 250 seconds]
<Sparky> So the prices = {} is a hash?
<RickHull> yes
<RickHull> >> {}.class
<Sparky> what is a .key?
<ruby[bot]> RickHull: # => Hash (https://eval.in/895849)
<RickHull> >> { 'foo' => 'bar' }.keys
<ruby[bot]> RickHull: # => ["foo"] (https://eval.in/895850)
jphase_ has joined #ruby
<RickHull> >> { 'foo' => 'bar' }.values
<ruby[bot]> RickHull: # => ["bar"] (https://eval.in/895851)
<RickHull> >> { 'foo' => 'bar' }.key? 'bar'
ap4y has quit [Quit: WeeChat 1.9.1]
<RickHull> # => false
ap4y has joined #ruby
alnewkirk has joined #ruby
<RickHull> { 'foo' => 'bar' }.key? 'foo' #=> true
jphase__ has joined #ruby
<RickHull> often you will see a test for key existence like: hsh = { 'foo' => 'bar' }; hsh['foo'] # => 'bar'
milardovich has joined #ruby
jphase has quit [Ping timeout: 246 seconds]
<RickHull> and 'bar' is truthy, so you can assume 'foo' is a key
AnoHito has quit [Ping timeout: 258 seconds]
<RickHull> but with: hsh = { 'foo' => nil }; hsh['foo'] #=> nil
the_f0ster has joined #ruby
<RickHull> it looks like 'foo' is not a key, but it really is
galtgendo has left #ruby [#ruby]
jphase_ has quit [Ping timeout: 250 seconds]
AnoHito has joined #ruby
jphase__ has quit [Ping timeout: 258 seconds]
<RickHull> Sparky: have you used irb?
<Sparky> Yes
the_f0ster has quit [Ping timeout: 250 seconds]
<RickHull> that is the best place to learn about this stuff. you can try stuff and get instant feedback
<RickHull> though it will not play nicely with gets (IIRC)
<RickHull> what tutorials have you gone through?
<RickHull> any books?
<RickHull> this is an oldie but a goodie https://pine.fm/LearnToProgram
enterprisey has quit [Quit: Leaving]
<RickHull> last I checked, anyway :)
alnewkirk has quit [Ping timeout: 260 seconds]
<Sparky> RickHull: THis is what I'm working from: https://learnrubythehardway.org/book
<RickHull> ok, that's a good one too AFAIK
fishcooker has joined #ruby
<Sparky> RickHull: I have a friend who actually OWNS a software company that works in ruby, he told me to do that one
sucks has quit [Ping timeout: 260 seconds]
guardianx has joined #ruby
<RickHull> how far along are you?
<Sparky> I'm on exercise 13, but uhmm.. the last script I wasn't working on wasn't in the book, I just wanted to do it myself
<Sparky> I was working on*
<RickHull> that's a good attitude -- I wasn't sure if the Hash suggestion was taking you off track :)
<RickHull> does the Hash stuff make sense?
<Sparky> A little bit, but its not like something that I'll be picking up eventually any ways
<Sparky> YES! It does make sense, in a very abstract way right now, but I'm sure the more I work with it the more I will understand it- just like math
alnewkirk has joined #ruby
safetypin has quit [Quit: ZZZzzz…]
<RickHull> yes, it takes a great deal of "acquiring context" before things start to make intuitive sense
<RickHull> speaking of abstract -- can you see how putting the prices in the hash makes it trivial to add a new item?
<RickHull> take my gist, and add a 4th item
<RickHull> and the program still works
<Sparky> RickHull: I uhmm
<RickHull> ha, awesome!
sucks_ has joined #ruby
<RickHull> google: IEEE float
<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
<RickHull> >> 0.1 + 0.2
<ruby[bot]> RickHull: # => 0.30000000000000004 (https://eval.in/895853)
alnewkirk has quit [Ping timeout: 240 seconds]
<RickHull> >> r = Rational(123, 100); [r, r.to_f]
<ruby[bot]> RickHull: # => [(123/100), 1.23] (https://eval.in/895854)
cdg has quit [Remote host closed the connection]
jphase has quit [Ping timeout: 252 seconds]
exhiled has joined #ruby
alnewkirk has joined #ruby
sucks_ has quit [Quit: Leaving]
sucks has joined #ruby
sucks has quit [Remote host closed the connection]
sucks has joined #ruby
<RickHull> ?float
<ruby[bot]> Your numbers don't add up? You get "weird" results? read http://floating-point-gui.de/
<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
<apeiros> yeah, looks better than in_delta, but I wonder how robust that is
<elomatreb> semi-related: The method definition style without the parentheses around the arguments looks really weird to me
<apeiros> the main reason I never finished mine was that I wasn't sure how to test, or even less prove, how robust it'd be :-/
exhiled has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> my idea was to not use the difference but the quotient
<apeiros> and to calculate it, I wanted to "dissect" the float
c0ncealed has quit [Remote host closed the connection]
<apeiros> f.ex., 1.001 vs 1.002 and 0.001 vs 0.002 have the same difference, but the quotient varies wildly. that was the basis.
<apeiros> oh, right, zero values was another issue :D
<RickHull> yeah
c0ncealed has joined #ruby
<RickHull> those are good test cases ;)
<RickHull> this sort of thing lends itself to TDD I think
<apeiros> iirc I wanted to treat subnormals specially anyway
<apeiros> after all, they work differently
jrafanie has joined #ruby
<RickHull> speaking of that kind of uncertainty, I have found some problems with using r2 in minitest/benchmark
<RickHull> where a test on the r2 for a fit doesn't yield the distinction we want
jrafanie has quit [Client Quit]
<apeiros> r2 is a testdouble lib?
<RickHull> e.g. f(x) = x**3 gives r^2 > 0.99 for a linear fit
exhiled has joined #ruby
<RickHull> sorry, it's the coefficient of determination
<RickHull> like doing a least squares regression
exhiled has quit [Client Quit]
<RickHull> in minitest/benchmark, one wants to assert_linear_performance 0.99
<RickHull> but if performance is actually x**3 and not x
<RickHull> you can still get a r^2 > 0.99
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
* apeiros had to read up on least squares
<apeiros> I barely remember :(
<RickHull> i had to do a ton of reading when I was working my way through this
exhiled has joined #ruby
<apeiros> I think I remember, you asked in the channel?
<RickHull> i extracted the minitest fit stuff to https://github.com/rickhull/compsci/blob/master/lib/compsci/fit.rb to play with it
<RickHull> yup
exhiled has quit [Client Quit]
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]
yasu has joined #ruby
iNs has joined #ruby
d^sh has joined #ruby
shoogz has joined #ruby
xMopxShell has joined #ruby
matthewd has joined #ruby
<RickHull> next, try: ruby -I lib spec/models/search_result_spec.rb
govg has joined #ruby
<RickHull> that should work
tris has joined #ruby
ujjain has joined #ruby
ujjain has quit [Changing host]
ujjain has joined #ruby
<RickHull> if you are executing your tests via `spec` or `rake` then it is likely they are doing the load path manipulation for you
<RickHull> adding the local lib to LOAD_PATH
TheRealMattM has joined #ruby
jamesaxl has joined #ruby
edwardly has joined #ruby
edwardly has joined #ruby
bmn has joined #ruby
rcs has joined #ruby
<RickHull> make sense?
<kishmesh> in the second case it complains that it can't find RSpec
kitallis has joined #ruby
konsolebox has joined #ruby
<RickHull> ok, you can add require 'rspec' to your search_result_spec.rb
Elysia has joined #ruby
kloeri has quit [Ping timeout: 620 seconds]
<kishmesh> RickHull: it does make sense. though where is default LOAD_PATH set?
<RickHull> (I would)
CustosLimen has joined #ruby
<kishmesh> yes now it works
quiller has joined #ruby
lagweezle_away is now known as lagweezle
<RickHull> hm, not sure off the top of my head. it interfaces with rubygems
Muz has joined #ruby
<RickHull> it's $LOAD_PATH
<RickHull> or I think $:
<RickHull> try it in irb or rails console
alnewkirk has quit [Read error: Connection reset by peer]
thejoecarroll has joined #ruby
<RickHull> in my opinion, it is best to not manipulate $LOAD_PATH with ruby code -- do it from outside via e.g. `ruby -I $path`
<kishmesh> RickHull: ok thank you very much
balo has joined #ruby
<kishmesh> RickHull: well, when I use rspec I don't need to manipulate LOAD_PATH
<Sparky> Why do I need to $stdin ?
<kishmesh> so I guess it's doing it internally
<RickHull> kishmesh: that's right -- the `rspec` runner handles it
<kishmesh> and I just wanted to understand what is going on under the hood
<RickHull> Sparky: in what situation?
<Sparky> is $stdin literally a standard stream, is that what it is?
<RickHull> $stdin is a global variable that refers to STDIN, which is a constant, that refers to the IO object representing the unix STDIN
<Sparky> a variable.. $stdin.gets.chomp
<RickHull> Sparky: are you familiar with STDIN, STDOUT, STDERR in general, in the unix sense?
<Sparky> Nope
<RickHull> ok, now you have something to go research :)
ltd has joined #ruby
<RickHull> what it comes down to is, you have a shell, like DOS or bash
<RickHull> yup
Cyrus has joined #ruby
<RickHull> and one of the primary things that makes a shell a shell, is that it has standard ways to get data in and out of a process
Cyrus is now known as Guest77633
<RickHull> standard in, standard out
<RickHull> and also a third thingie, standard error, which is very similar to standard out
gizmore has joined #ruby
octomancer has joined #ruby
GodFather has quit [Ping timeout: 252 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
<RickHull> with these standard ways of getting data in and out, programs or processes can talk to each other
Roa has joined #ruby
hurricanehrndz has joined #ruby
frojnd has joined #ruby
nekomune has joined #ruby
kryptoz has joined #ruby
evie_hammond has joined #ruby
<RickHull> that's why #gets is used to get input from the user. it technically comes from STDIN
<RickHull> and $stdin.gets is a more explicit way of doing naked gets
KeyJoo has joined #ruby
<Sparky> Naked gets?
linduxed has joined #ruby
<RickHull> as opposed to $stdin.gets.chomp
<RickHull> they have the exact same effect under normal circumstances
<RickHull> it says: get a string from $stdin
<RickHull> and if $stdin doesn't have a string available, the program will wait for it
<RickHull> this is commonly known as "blocking"
<RickHull> or "blocked on input"
<RickHull> that is, the program execution is blocked from proceeding
<Sparky> I'm learning all sorts of stuff today
<RickHull> because you asked for a string, and it needs a string in order to proceed
<Sparky> RickHull: The script I was writing is asking questions and prompting for answers.. maybe that's why?
darkmorph has quit [Ping timeout: 246 seconds]
evie_hammond has quit [Ping timeout: 246 seconds]
jsrtr has joined #ruby
live__ has joined #ruby
cseder_ has joined #ruby
<RickHull> um, why what?
creat has quit [Ping timeout: 250 seconds]
pwillard has quit [Ping timeout: 250 seconds]
swgillespie has quit [Ping timeout: 250 seconds]
Sina has quit [Ping timeout: 250 seconds]
cseder has quit [Ping timeout: 250 seconds]
machty has quit [Ping timeout: 250 seconds]
Iacobus has quit [Ping timeout: 250 seconds]
micalexander has quit [Ping timeout: 250 seconds]
zipkid has quit [Ping timeout: 250 seconds]
<Sparky> Why I needed to use the $stdin
yo61 has quit [Ping timeout: 250 seconds]
<RickHull> oh
<RickHull> generally naked gets will ask $stdin
StarSeed0000 has quit [Ping timeout: 250 seconds]
kua[m] has quit [Ping timeout: 250 seconds]
Giphy[m] has quit [Ping timeout: 250 seconds]
<RickHull> $stdin.gets and gets generally do the same thing
oleo has quit [Ping timeout: 250 seconds]
teej has quit [Ping timeout: 250 seconds]
hanmac has quit [Ping timeout: 250 seconds]
davic has quit [Ping timeout: 250 seconds]
stan has quit [Ping timeout: 250 seconds]
wogi has quit [Ping timeout: 250 seconds]
<RickHull> i think gets will read from a file, ARGF style, in some cases
Bilge has quit [Ping timeout: 250 seconds]
<RickHull> um, so -- i'm not sure why you need $stdin
itmerc[m] has quit [Ping timeout: 246 seconds]
<RickHull> *do* you need $stdin ?
aagdbl[m] has quit [Ping timeout: 252 seconds]
torarne has quit [Ping timeout: 240 seconds]
Sina has joined #ruby
Iacobus has joined #ruby
Tagami[m] has quit [Ping timeout: 240 seconds]
micalexander has joined #ruby
pwillard has joined #ruby
stan has joined #ruby
Matt[m]2 has quit [Ping timeout: 240 seconds]
jonjits[m] has quit [Ping timeout: 240 seconds]
aviraldg has quit [Ping timeout: 240 seconds]
zalipuha[m] has quit [Ping timeout: 252 seconds]
Hanma[m] has quit [Ping timeout: 246 seconds]
velu_aon[m] has quit [Ping timeout: 255 seconds]
<RickHull> because gets doesn't always read from STDIN, it can be better style to be more explicit and use `$stdin.gets` when that's what you want
dman[m] has quit [Ping timeout: 255 seconds]
gokul_mr[m] has quit [Ping timeout: 255 seconds]
astronavt[m] has quit [Ping timeout: 255 seconds]
turt2live has quit [Ping timeout: 264 seconds]
M107262[m] has quit [Ping timeout: 264 seconds]
dtcristo has quit [Ping timeout: 276 seconds]
lasenna[m] has quit [Ping timeout: 276 seconds]
KevinMGranger has quit [Ping timeout: 276 seconds]
machty has joined #ruby
watzon has quit [Ping timeout: 248 seconds]
yana[m] has quit [Ping timeout: 255 seconds]
haylon has quit [Ping timeout: 276 seconds]
<RickHull> that said, outside of toy programs, I hardly use gets -- it can be tricky to use correctly
ujjain has quit [Ping timeout: 260 seconds]
tekk has quit [Ping timeout: 260 seconds]
<RickHull> it's generally only useful for interactive command line programs, which are mostly a relic of another era
yo61 has joined #ruby
<RickHull> i write a lot command line programs, but all of their user input is specified at invocation, by arguments to the command
bokayio has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
guacamole has joined #ruby
bokayio has joined #ruby
ujjain has joined #ruby
JsilverT has quit [Ping timeout: 240 seconds]
<RickHull> $stdin.gets can be often used in modern programs to read many lines, typically from the output of some other program
davic has joined #ruby
Bilge has joined #ruby
wogi has joined #ruby
creat has joined #ruby
<RickHull> e.g. find . | grep txt
tekk has joined #ruby
ujjain has quit [Changing host]
ujjain has joined #ruby
kloeri has joined #ruby
<RickHull> that file is executable command line program
<RickHull> (it's in the bin/ dir)
<RickHull> it calls into files in lib/
<RickHull> evdump does not call gets, nor does it call stuff in lib/ that calls gets
<RickHull> but evdump does deal with $stdin
<RickHull> and it makes a lower level (more primitive) call to $stdin
<RickHull> $stdin.read(num_bytes)
<RickHull> gets wouldn't work for this program because gets looks for a newline as the end of message
<RickHull> this program doesn't expect newlines -- it makes a read of a certain length rather than read-until-char
<RickHull> the actual reading happens inside lib/ here https://github.com/rickhull/device_input/blob/master/lib/device_input.rb#L95
<RickHull> this method is called by bin/evdump here: https://github.com/rickhull/device_input/blob/master/bin/evdump#L47
mson has quit [Quit: Connection closed for inactivity]
uneeb has joined #ruby
priodev has joined #ruby
<Sparky> My friend who does IT says ruby will be extinct in a year or 2, is this true?
<RickHull> your friend is more likely to be extinct ;)
JsilverT has joined #ruby
swgillespie has joined #ruby
<RickHull> what language do they suggest you learn?
<Sparky> Java
<Sparky> or Python
teej has joined #ruby
<RickHull> have you heard of jruby?
hanmac has joined #ruby
rkoller has quit [Quit: Textual IRC Client: www.textualapp.com]
uneeb has quit [Read error: Connection reset by peer]
<RickHull> ruby is much friendlier than java, and you can use jruby to bridge to the java ecosystem if that's what you prefer
ramfjord has joined #ruby
<RickHull> ruby and python are quite similar, and either one is a good first, second, third, etc language
<Sparky> He said Java is ubiquitous
imode has quit [Ping timeout: 268 seconds]
uZiel has joined #ruby
<RickHull> there are lots of places using Java, but they are not always the best places to work
AndBobsYourUncle has joined #ruby
<RickHull> there are lots of wonderful places using Java, and many other languages in the JVM ecosystem
<RickHull> personally, I would go with ruby for a first language. it doesn't have to be your "pro" language
<RickHull> and BTW ruby is not my favorite language. maybe #3
<RickHull> maybe #5, even. but it's a fantastic first language. tip top #1 spot, no doubt
ramfjord has quit [Ping timeout: 252 seconds]
the_f0ster has joined #ruby
mjolnird has quit [Quit: Leaving]
evie_hammond has joined #ruby
Rythen has quit [Ping timeout: 260 seconds]
eclm has joined #ruby
ramfjord has joined #ruby
duracrisis has quit [Max SendQ exceeded]
the_f0ster has quit [Ping timeout: 264 seconds]
AndBobsYourUncle has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
konsolebox has quit [Ping timeout: 246 seconds]
creeg has quit [Quit: No Ping reply in 180 seconds.]
duracrisis has joined #ruby
[spoiler] has quit [Ping timeout: 240 seconds]
creeg has joined #ruby
[spoiler] has joined #ruby
eclm has quit [Ping timeout: 276 seconds]
lagweezle has quit [Ping timeout: 240 seconds]
lucas has quit [Ping timeout: 240 seconds]
lucas has joined #ruby
creeg has quit [Client Quit]
eclm has joined #ruby
lagweezle has joined #ruby
xsdg has quit [Ping timeout: 240 seconds]
kishmesh has quit [Ping timeout: 248 seconds]
nahra has quit [Remote host closed the connection]
creeg has joined #ruby
nahra has joined #ruby
xsdg has joined #ruby
lemur has joined #ruby
lemur has joined #ruby
tw1sted_ has joined #ruby
eclm has quit [Client Quit]
[spoiler] has quit [Ping timeout: 276 seconds]
majoh_ has quit [Ping timeout: 264 seconds]
majoh_ has joined #ruby
tw1sted has quit [Quit: No Ping reply in 180 seconds.]
baweaver has quit [Max SendQ exceeded]
brixen has quit [Ping timeout: 240 seconds]
nertzy has joined #ruby
[spoiler] has joined #ruby
kishmesh has joined #ruby
bokayio has quit [Ping timeout: 240 seconds]
brixen_ has joined #ruby
bokayio has joined #ruby
lemur is now known as baweaver
ledestin has joined #ruby
Sparky has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
d^sh has quit [Ping timeout: 240 seconds]
d^sh has joined #ruby
kishmesh has quit [Quit: WeeChat 1.6]
alfiemax_ has joined #ruby
ramfjord has quit [Ping timeout: 250 seconds]
alfiemax has quit [Ping timeout: 264 seconds]
fishcooker has quit [Ping timeout: 268 seconds]
steph__ has joined #ruby
marxarelli|afk is now known as marxarelli
<steph__> has anyone used flash instances with roda? trying to figure out if roda's flash plugin can be used for flash notices
<steph__> or if i should just use a gem like this one: https://github.com/nakajima/rack-flash
guacamole has quit [Quit: My face has gone to sleep. ZZZzzz…]
<RickHull> roda appears to be under active development, so I would lean that way
<RickHull> last commit to rack-flash was in 2013
sucks_ has joined #ruby
<RickHull> that flash method appears to be what you want
sucks_ has quit [Read error: Connection reset by peer]
bkxd has joined #ruby
<RickHull> which is -- of course -- not the Adobe Flash plugin but instead a way to show a notice to a web user
guacamole has joined #ruby
dviola has quit [Quit: WeeChat 1.9.1]
eckhardt has joined #ruby
sucks has quit [Ping timeout: 264 seconds]
alfiemax_ has quit [Ping timeout: 250 seconds]
alfiemax has joined #ruby
cdg has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 264 seconds]
cdg has joined #ruby
steph__ has quit [Remote host closed the connection]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
the_f0ster has joined #ruby
fishcooker has joined #ruby
steph__ has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
apeiros has quit [Remote host closed the connection]
cdg has quit [Ping timeout: 240 seconds]
gix has quit [Ping timeout: 268 seconds]
steph__ has quit [Ping timeout: 268 seconds]
lagweezle is now known as lagweezle_away
gix has joined #ruby
ledestin has quit [Ping timeout: 250 seconds]
ramfjord has joined #ruby
kculpis has quit [Ping timeout: 264 seconds]
the_f0ster has quit [Ping timeout: 252 seconds]
cam27 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
the_f0ster has joined #ruby
guacamole has quit [Quit: My face has gone to sleep. ZZZzzz…]
imode has joined #ruby
KeyJoo has quit [Ping timeout: 260 seconds]
guacamole has joined #ruby
guacamole has quit [Client Quit]
ramfjord has quit [Ping timeout: 252 seconds]
troys_ is now known as troys
KeyJoo has joined #ruby
apeiros has joined #ruby
guacamole has joined #ruby
AndBobsYourUncle has joined #ruby
apeiros has quit [Ping timeout: 252 seconds]
AndBobsYourUncle has left #ruby [#ruby]
guacamole has quit [Ping timeout: 250 seconds]
nerium has joined #ruby
zipkid has joined #ruby
swills has quit [Ping timeout: 240 seconds]
sagax has joined #ruby
marxarelli is now known as marxarelli|afk
cschneid_ has joined #ruby
the_f0ster has quit [Ping timeout: 264 seconds]
cdg has joined #ruby
alfiemax has quit [Read error: Connection reset by peer]
cschneid_ has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
s3nd1v0g1us has quit [Quit: tempusfugit]
troys is now known as troys_
exhiled has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
k3rn31 has joined #ruby
guardianx has quit []
ahrs has quit [Remote host closed the connection]
ahrs has joined #ruby
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
exhiled has joined #ruby
Tagami[m] has joined #ruby
troys_ is now known as troys
apeiros has joined #ruby
exhiled has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ap4y has quit [Quit: WeeChat 1.9.1]
exhiled has joined #ruby
apeiros has quit [Ping timeout: 276 seconds]
dionysus69 has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
exhiled has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guardianx has joined #ruby
Hexafox[I] has quit [Ping timeout: 250 seconds]
guardianx has quit [Remote host closed the connection]
dinfuehr has quit [Ping timeout: 240 seconds]
dinfuehr has joined #ruby
Hanma[m] has joined #ruby
aviraldg has joined #ruby
torarne has joined #ruby
lasenna[m] has joined #ruby
dtcristo has joined #ruby
yana[m] has joined #ruby
jonjits[m] has joined #ruby
M107262[m] has joined #ruby
astronavt[m] has joined #ruby
Giphy[m] has joined #ruby
velu_aon[m] has joined #ruby
watzon has joined #ruby
dman[m] has joined #ruby
haylon has joined #ruby
turt2live has joined #ruby
KevinMGranger has joined #ruby
aagdbl[m] has joined #ruby
itmerc[m] has joined #ruby
zalipuha[m] has joined #ruby
gokul_mr[m] has joined #ruby
Matt[m]2 has joined #ruby
kua[m] has joined #ruby
apeiros has joined #ruby
garyserj has joined #ruby
anisha has joined #ruby
<garyserj> Is there a shorter way of writing this? xmlanchorlist = doc.css("table[class='abc']")[0].css("tr>td>a")
nickjj_ has joined #ruby
<garyserj> like do i really need to do .css twice?
jenrzzz has quit [Ping timeout: 268 seconds]
mim1k has joined #ruby
ged_ has joined #ruby
jenrzzz has joined #ruby
mahlon__ has joined #ruby
shaman42_ has joined #ruby
segy has quit [Ping timeout: 260 seconds]
flori_ has joined #ruby
irick_ has joined #ruby
c-c_ has joined #ruby
miah_ has joined #ruby
leonthemisfit_ has joined #ruby
Kilobyte22 has joined #ruby
mistym- has joined #ruby
alfiemax_ has joined #ruby
nahra` has joined #ruby
coderphive has quit [Ping timeout: 248 seconds]
Guest57943 has quit [Ping timeout: 248 seconds]
cajone has quit [Ping timeout: 248 seconds]
cosimo_ has quit [Ping timeout: 248 seconds]
irick has quit [Ping timeout: 248 seconds]
Guest31297 has quit [Ping timeout: 248 seconds]
nickjj has quit [Ping timeout: 248 seconds]
flori has quit [Ping timeout: 248 seconds]
iszak has quit [Ping timeout: 248 seconds]
Kilo`byte has quit [Ping timeout: 248 seconds]
fuzzyhorns has quit [Ping timeout: 248 seconds]
c-c has quit [Ping timeout: 248 seconds]
mahlon_ has quit [Ping timeout: 248 seconds]
leonthemisfit has quit [Ping timeout: 248 seconds]
kenichi has quit [Ping timeout: 248 seconds]
Fridtjof has quit [Ping timeout: 248 seconds]
epochwolf has quit [Ping timeout: 248 seconds]
miah has quit [Ping timeout: 248 seconds]
mistym has quit [Ping timeout: 248 seconds]
bhaak has quit [Ping timeout: 248 seconds]
ged has quit [Ping timeout: 248 seconds]
shaman42 has quit [Ping timeout: 248 seconds]
coderphive has joined #ruby
epochwolf has joined #ruby
maxmanders has joined #ruby
cosimo_ has joined #ruby
maxmanders is now known as Guest83160
mim1k has quit [Ping timeout: 250 seconds]
ged__ has joined #ruby
kenichi has joined #ruby
sjums_ has joined #ruby
mbr has quit [Ping timeout: 240 seconds]
swgillespie_ has joined #ruby
nertzy has quit [Ping timeout: 240 seconds]
Fridtjof has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
cajone has joined #ruby
eregon has quit [Ping timeout: 246 seconds]
reber has joined #ruby
nicoulaj has quit [Ping timeout: 240 seconds]
fuzzyhorns has joined #ruby
ur5us has quit [Remote host closed the connection]
apeiros has quit [Ping timeout: 240 seconds]
halt has joined #ruby
emeric has quit [Ping timeout: 255 seconds]
halt is now known as Guest77116
ged__ is now known as ged
guardianx has joined #ruby
k3rn31 has quit [Read error: Connection reset by peer]
Hexafox[I] has joined #ruby
k3rn31 has joined #ruby
iszak has joined #ruby
iszak has joined #ruby
bhaak has joined #ruby
dinfuehr_ has joined #ruby
swills has joined #ruby
swills has quit [Changing host]
swills has joined #ruby
dionysus69 has quit [Ping timeout: 250 seconds]
vifino has quit [Ping timeout: 240 seconds]
ged_ has quit [*.net *.split]
dinfuehr has quit [*.net *.split]
dtcristo has quit [*.net *.split]
torarne has quit [*.net *.split]
zipkid has quit [*.net *.split]
sagax has quit [*.net *.split]
KeyJoo has quit [*.net *.split]
imode has quit [*.net *.split]
fishcooker has quit [*.net *.split]
[spoiler] has quit [*.net *.split]
brixen_ has quit [*.net *.split]
nahra has quit [*.net *.split]
hanmac has quit [*.net *.split]
swgillespie has quit [*.net *.split]
sjums has quit [*.net *.split]
swgillespie_ is now known as swgillespie
brixen has joined #ruby
frojnd has quit [Ping timeout: 268 seconds]
[spoiler] has joined #ruby
nahra` has quit [Remote host closed the connection]
bokayio has quit [Ping timeout: 240 seconds]
nahra` has joined #ruby
Guest77116 has quit [Ping timeout: 240 seconds]
tekk has quit [Ping timeout: 240 seconds]
segy has joined #ruby
dinfuehr_ has quit [Ping timeout: 260 seconds]
alfiemax has joined #ruby
live__ has quit [Quit: Leaving]
bokayio has joined #ruby
dinfuehr has joined #ruby
halt- has joined #ruby
alfiemax_ has quit [Ping timeout: 260 seconds]
rabajaj has joined #ruby
imode has joined #ruby
KeyJoo has joined #ruby
tekk has joined #ruby
qba73 has joined #ruby
guardianx has quit [Remote host closed the connection]
hanmac has joined #ruby
howdoi has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
dtcristo has joined #ruby
torarne has joined #ruby
fishcooker has joined #ruby
fishcooker has quit [Max SendQ exceeded]
fishcooker has joined #ruby
duderonomy has joined #ruby
apeiros has joined #ruby
guardianx has joined #ruby
biberu has joined #ruby
qba73 has quit []
AnoHito_ has joined #ruby
apeiros has quit [Ping timeout: 268 seconds]
guardianx has quit [Remote host closed the connection]
AnoHito has quit [Ping timeout: 240 seconds]
guardianx has joined #ruby
AnoHito_ has quit [Ping timeout: 252 seconds]
AnoHito has joined #ruby
guacamole has joined #ruby
_whitelogger has joined #ruby
apeiros has joined #ruby
mjolnird has joined #ruby
apeiros has quit [Ping timeout: 260 seconds]
weaksauce has quit [Quit: Textual IRC Client: www.textualapp.com]
michael1 has joined #ruby
alfiemax has quit [Remote host closed the connection]
DoubleMalt has joined #ruby
apeiros has joined #ruby
k3rn31 has quit [Read error: Connection reset by peer]
r3QuiEm_cL has joined #ruby
k3rn31 has joined #ruby
ta has quit [Read error: Connection reset by peer]
ta has joined #ruby
spk has quit [Ping timeout: 264 seconds]
noizex has quit [Ping timeout: 252 seconds]
nerium has quit [Quit: nerium]
thejoecarroll has quit [Ping timeout: 246 seconds]
sjums_ has quit [Ping timeout: 268 seconds]
Bilge has quit [Ping timeout: 252 seconds]
diegok has quit [Ping timeout: 255 seconds]
rlex has quit [Ping timeout: 240 seconds]
tabakhase has quit [Ping timeout: 268 seconds]
doublemalt_ has joined #ruby
oz has quit [Ping timeout: 255 seconds]
bier has quit [Ping timeout: 252 seconds]
nausea has quit [Ping timeout: 258 seconds]
CustosLimen has quit [Ping timeout: 264 seconds]
alfiemax has joined #ruby
eckhardt has joined #ruby
r3QuiEm_cL has quit [Ping timeout: 240 seconds]
DoubleMalt has quit [Ping timeout: 240 seconds]
apeiros has quit [Ping timeout: 260 seconds]
alfiemax has quit [Ping timeout: 250 seconds]
dinfuehr has quit [Ping timeout: 252 seconds]
dinfuehr has joined #ruby
alex`` has joined #ruby
ana_ has joined #ruby
guacamole has quit [Quit: My face has gone to sleep. ZZZzzz…]
troys has quit [Quit: Bye]
nofxx_ has quit [Remote host closed the connection]
Technodrome has joined #ruby
apeiros has joined #ruby
apeiros has quit [Ping timeout: 240 seconds]
guille-moe has joined #ruby
conta has joined #ruby
guardianx has quit [Remote host closed the connection]
apeiros has joined #ruby
guardianx has joined #ruby
fusta has joined #ruby
<al2o3-cr> morning world its a brand new day!
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apeiros has quit [Ping timeout: 268 seconds]
Technodrome has joined #ruby
imode has quit [Ping timeout: 252 seconds]
m27frogy has quit [Ping timeout: 240 seconds]
andikr has joined #ruby
m27frogy has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
olblak has joined #ruby
Guest3 has joined #ruby
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
Guest3 has quit [Client Quit]
Yxhvd has quit [Ping timeout: 240 seconds]
michael1 has quit [Ping timeout: 240 seconds]
swat2 has quit [Ping timeout: 258 seconds]
ramfjord has joined #ruby
aufi has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
lexruee has quit [Ping timeout: 264 seconds]
lexruee has joined #ruby
guardianx has quit []
vondruch has quit [Client Quit]
vondruch has joined #ruby
zautomata has joined #ruby
teefbur has joined #ruby
fishcooker has quit [Quit: Leaving.]
cam27 has quit [Quit: cam27]
dionysus69 has joined #ruby
<teefbur> HI
swat2 has joined #ruby
zipkid has joined #ruby
ur5us has joined #ruby
Silthias1 has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
Silthias has quit [Ping timeout: 240 seconds]
claudiuinberlin has joined #ruby
ur5us has quit [Ping timeout: 246 seconds]
mark_66 has joined #ruby
ta has quit [Remote host closed the connection]
amosbird has joined #ruby
<amosbird> hello, why do I get this error https://la.wentropy.com/8Cvz
<teefbur> I just started learning ruby few weeks ago i'm not that fluent on what each error means can you a link to the code ?
<amosbird> um, i don't find the source files. it's a package called fpm I installed in archlinx
jamesaxl has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
fusta has quit [Read error: Connection reset by peer]
fusta has joined #ruby
iamarun has joined #ruby
nertzy has joined #ruby
|ifei5good has joined #ruby
|ifei5good has quit [Read error: Connection reset by peer]
|ifei5g00d has quit [Read error: Connection reset by peer]
|ifei5good has joined #ruby
jamesaxl has joined #ruby
kies has quit [Read error: Connection reset by peer]
kies has joined #ruby
fishcooker has joined #ruby
drcode has joined #ruby
apeiros has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #ruby
konsolebox has joined #ruby
apeiros has quit [Ping timeout: 268 seconds]
Silthias has joined #ruby
jaruga has joined #ruby
mim1k has joined #ruby
Silthias2 has joined #ruby
Silthias1 has quit [Ping timeout: 268 seconds]
Burgestrand has joined #ruby
tomphp has joined #ruby
Silthias has quit [Ping timeout: 258 seconds]
tomphp has quit [Client Quit]
ferr has joined #ruby
apeiros has joined #ruby
Yxhuvud has joined #ruby
MrBusiness3 has quit [Ping timeout: 252 seconds]
faces has joined #ruby
apeiros has quit [Ping timeout: 240 seconds]
jamesaxl has quit [Ping timeout: 260 seconds]
fishcooker has quit [Ping timeout: 240 seconds]
jamesaxl has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
coffeecupp has joined #ruby
InfinityFye has joined #ruby
KeyJoo has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
Dimik has quit [Ping timeout: 260 seconds]
fusta has quit [Ping timeout: 240 seconds]
apeiros has joined #ruby
dn`_ has joined #ruby
Silthias has joined #ruby
ta has joined #ruby
Archrover has quit [Ping timeout: 240 seconds]
vondruch has quit [Read error: Connection reset by peer]
dn` has quit [Read error: Connection reset by peer]
dn`_ is now known as dn`
jaruga has quit [Quit: jaruga]
chamunks has quit [Ping timeout: 252 seconds]
Bilge has joined #ruby
bier has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
kyle__ has quit [Ping timeout: 264 seconds]
morfin has joined #ruby
<morfin> hello
kyle__ has joined #ruby
<morfin> where would you require 'database_cleaner' if have standalone non-rails app?
<morfin> i use it only in tests so in spec_helper?
vdl has quit [Ping timeout: 264 seconds]
Silthias2 has quit [Ping timeout: 268 seconds]
banisterfiend has quit [Ping timeout: 268 seconds]
thejoecarroll has joined #ruby
jamesaxl has joined #ruby
chamunks has joined #ruby
apeiros has quit [Ping timeout: 252 seconds]
oz has joined #ruby
vdl has joined #ruby
RickHull has quit [Ping timeout: 260 seconds]
spk has joined #ruby
diegok has joined #ruby
bmn has quit [Ping timeout: 250 seconds]
fishcooker has joined #ruby
apeiros has joined #ruby
bweston92 has joined #ruby
sjums has joined #ruby
lex has joined #ruby
lex is now known as Guest46016
hs366 has quit [Quit: Leaving]
Archrover has joined #ruby
cvander has quit [Ping timeout: 240 seconds]
bmn has joined #ruby
tabakhase__ has joined #ruby
<morfin> nvm, i required it in spec/support/database_cleaner.rb
nausea has joined #ruby
nausea has quit [Changing host]
nausea has joined #ruby
apeiros has quit [Ping timeout: 240 seconds]
cvander has joined #ruby
guille-moe has quit [Ping timeout: 258 seconds]
CustosLimen has joined #ruby
tabakhase__ has quit [Changing host]
tabakhase__ has joined #ruby
coffeecupp has quit [Quit: ZNC 1.6.5 - http://znc.in]
tabakhase__ is now known as tabakhase
vondruch has joined #ruby
<_aeris_> hi here ! i post a question here yesterday, but no answer or i don't see it, so i repost here :)
apeiros has joined #ruby
<_aeris_> with debian packaged ruby, ruby looks for gem under /vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0
<_aeris_> but with rbenv ruby, in /vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0*-static*
Silthias1 has joined #ruby
<_aeris_> why this difference ? packaged app with debian ruby doesn't work with rbenv ruby :'(
Silthias has quit [Ping timeout: 246 seconds]
vondruch has quit [Read error: Connection reset by peer]
vondruch has joined #ruby
Freshnuts has quit [Quit: Leaving]
apeiros has quit [Ping timeout: 260 seconds]
heftig has quit [Ping timeout: 255 seconds]
d_kam_ has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
Ltem has joined #ruby
__main__ has quit [Read error: Connection reset by peer]
mikecmpbll has quit [Quit: inabit. zz.]
bsartek has joined #ruby
Beams has joined #ruby
__main__ has joined #ruby
mikecmpbll has joined #ruby
apeiros has joined #ruby
ferr has left #ruby ["WeeChat 1.9.1"]
Serpent7776 has joined #ruby
alfiemax has joined #ruby
apeiros has quit [Ping timeout: 240 seconds]
raynold has quit [Quit: Connection closed for inactivity]
ur5us has quit [Remote host closed the connection]
guille-moe has joined #ruby
fishcooker has quit [Quit: Leaving.]
quobo has joined #ruby
zautomata has quit [Ping timeout: 268 seconds]
ur5us has joined #ruby
jaruga has joined #ruby
<Bish> there is no ruby equivalent to: https://github.com/LuminosoInsight/python-ftfy
<Bish> right?
zautomata has joined #ruby
<Bish> what do you guys do with broken encoding?
ur5us has quit [Ping timeout: 246 seconds]
heftig has joined #ruby
apeiros has joined #ruby
<d_kam_> Take a guess at the incorrect encoding and convert it to UTF8
nofxx has joined #ruby
<Bish> d_kam_: yeah, thats what the libary does, but im afraid there are too many cases
vifino has joined #ruby
workmad3 has joined #ruby
nofxx_ has joined #ruby
nofxx has quit [Ping timeout: 240 seconds]
<Bish> also: is there some sort of signaling library or rather: what should i do if one thread signaling the main thread about something
<Bish> doing a queue for that sounds like a hack
marr has joined #ruby
ana_ has quit [Ping timeout: 250 seconds]
claudiuinberlin has quit [Read error: Connection reset by peer]
ldnunes has joined #ruby
bigkevmcd has joined #ruby
ur5us has joined #ruby
stoffus has quit [Read error: Connection reset by peer]
ana_ has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
kryptoz has quit [Remote host closed the connection]
c0ncealed has quit [Remote host closed the connection]
c0ncealed has joined #ruby
charliesome has joined #ruby
ledestin has joined #ruby
JsilverT has quit [Ping timeout: 264 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mniip has joined #ruby
ur5us has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
mikecmpbll has joined #ruby
guille-moe has quit [Ping timeout: 240 seconds]
ur5us has quit [Ping timeout: 240 seconds]
<matthewd> Didn't read enough to judge whether they actually do the same thing, but they seem to be in vaguely the same problem-space at least
guille-moe has joined #ruby
blackbaba has joined #ruby
GodFather has joined #ruby
Hexafox[I] has quit [Ping timeout: 240 seconds]
rgr has joined #ruby
ur5us has joined #ruby
blackbaba has left #ruby ["Closing Window"]
ur5us has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 264 seconds]
nofxx_ has quit [Remote host closed the connection]
doublemalt_ has quit [Ping timeout: 240 seconds]
mikecmpb_ has joined #ruby
ur5us has joined #ruby
mikecmpbll has quit [Ping timeout: 260 seconds]
ur5us has quit [Ping timeout: 248 seconds]
ta has quit [Read error: Connection reset by peer]
iamarun has quit [Quit: Leaving]
ta has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
d_kam__ has joined #ruby
sepp2k has joined #ruby
cdg has quit [Ping timeout: 240 seconds]
d_kam_ has quit [Ping timeout: 240 seconds]
d_kam___ has joined #ruby
Sammichmaker has joined #ruby
anisha has quit [Ping timeout: 268 seconds]
d_kam__ has quit [Ping timeout: 240 seconds]
eregon has joined #ruby
rgr has quit [Quit: rgr]
ur5us has joined #ruby
hs366 has joined #ruby
ams__ has joined #ruby
ur5us has quit [Ping timeout: 248 seconds]
<Bish> matthewd: charlock holmes is great, it does detect encoding and transform corresponding CORRECT encoding to another CORRECT encoding
<Bish> but it doesnt fix broken encoding
<Bish> a.e. ISO-8859-1 which is set to utf-8
teefbur has quit [Quit: Leaving]
<Bish> using charlock holmes already so i for myself dont get such mistakes in my code
<matthewd> Bish: Ah, okay. A quick Google finds https://github.com/dekellum/mojibake, but it doesn't exactly sound new and shiny.
<Bish> that looks more like it
<Bish> thanks
<Bish> well broken encoding is no new issue, it might just be me being unable to google
<Bish> and they write rubinius 2.0 as a possible interpreter, so can't be that old
<Bish> oh shit that was 2015
<matthewd> I just googled 'ruby fix mojibake' -- it didn't hurt that that's what the library's named :)
<Bish> how did u know to google for mojibake
<Bish> is rubinius actually any good by now?
<Bish> should test it some time again
<matthewd> That's the term for encoding-mangled strings
<Bish> really? i didn't know that
<Bish> where does it origin from?
<Bish> emoji?
<Bish> :D
<Bish> okay, i gonna stop talking or i look more stupid
Jidoor has joined #ruby
<matthewd> https://en.wikipedia.org/wiki/Mojibake -- it's a Japanese term, so yes same root as emoji
Jidoor has quit [Changing host]
Jidoor has joined #ruby
Jidoor has joined #ruby
bsartek has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
<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?
alex`` has quit [Quit: WeeChat 1.9.1]
truenito has joined #ruby
apparition has joined #ruby
alex`` has joined #ruby
hightower2 has joined #ruby
ur5us has joined #ruby
<Bish> Jidoor: you can check it for arity
<Bish> >> def coolMeth(&b);p b.arity;end; coolMeth { |i,want,four,parameters| }
<ruby[bot]> Bish: # => 4 ...check link for more (https://eval.in/896265)
<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: we in #ruby do not like irccloud.com, I reposted your paste to gist for you: https://gist.github.com/4797a2430b92870007156747805e0571
<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
ur5us has joined #ruby
<Cork> client.operation(:method).build(message: data).to_s
cdg has quit [Ping timeout: 248 seconds]
d_kam_______ has quit [Client Quit]
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`
troys has joined #ruby
<havenwood> &ri String#include?
<havenwood> &ri String#[]
<havenwood> jeffreylevesque: You can get at that env var from Ruby with: ENV['PATH']
thinkpad has quit [Ping timeout: 268 seconds]
ur5us has quit [Ping timeout: 248 seconds]
truenito has quit [Ping timeout: 248 seconds]
<havenwood> jeffreylevesque: You might consider splitting on the delimiter so you don't have to anchor.
vondruch has quit [Ping timeout: 264 seconds]
the_f0ster has quit [Ping timeout: 248 seconds]
ramfjord has joined #ruby
<havenwood> jeffreylevesque: ENV['PATH'].split(':').include? 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.
<havenwood> aScottishBoat: here's a reference to the discussion in the perl channel: https://irclog.whitequark.org/ruby/2013-02-02#2877629;
<aScottishBoat> Brilliant, checking
<havenwood> aScottishBoat: It's a meta-discussion that references the real discussion in another channel >.>
milardovich has quit [Ping timeout: 240 seconds]
weaksauce has quit [Read error: Connection reset by peer]
<havenwood> I can't seem to dig up what randal schwartz said in he other channel now though
<aScottishBoat> Yeah, I gave it a try at finding.
Ltem has quit [Quit: Leaving]
gremax has quit [Ping timeout: 264 seconds]
crayfishx has quit [Ping timeout: 264 seconds]
ur5us has joined #ruby
jeffreylevesque_ has joined #ruby
hays_ has joined #ruby
hays_ has quit [Changing host]
hays_ has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
iamarun has quit [Remote host closed the connection]
mjolnird has quit [Quit: Leaving]
quobo has quit [Quit: Connection closed for inactivity]
truenito has joined #ruby
dviola has joined #ruby
exhiled has joined #ruby
truenito has quit [Ping timeout: 268 seconds]
raatiniemi has quit [Remote host closed the connection]
raatiniemi has joined #ruby
<Sparky> Any one home?
<havenwood> Sparky: hi
<aScottishBoat> Sparky, hello there.
<exhiled> GOOD DAY!
<havenwood> Sparky: Lots of folk here. If you have a question, ask away!
<Sparky> Could you help me understand what a specific thing in a code does?
<havenwood> Sparky: You'd have to say more.
<havenwood> ?gist Sparky
<ruby[bot]> Sparky: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<Sparky> target = open(filename, 'w')
<Sparky> uhmm
ur5us has joined #ruby
<Sparky> what does the 'w' do?
conta2 has joined #ruby
<havenwood> Sparky: open the file in writable mode
<Sparky> OH!
<Sparky> would it default open in read-only?
<havenwood> Sparky: mode="r" is default
<havenwood> &ri IO::open
reber has quit [Quit: Leaving]
cagomez has quit [Remote host closed the connection]
<havenwood> &ri Kernel::open
<mnemon> Sparky: also, before you truncate all the files, "a" is append "w" will truncate the file before writing.
tcpdump has joined #ruby
<tcpdump> Hello everyone
ur5us has quit [Ping timeout: 240 seconds]
<tcpdump> Anyone have any idea what type of a performance hit checking CSRF authenticity (:verify_authenticity_token) would have on a busy API server?
jeffreylevesque_ has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
cagomez has joined #ruby
<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
<ruby[bot]> aScottishBoat: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/6e44bce8e39b0d41e9757440d3f53756
<ruby[bot]> aScottishBoat: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
RickHull has joined #ruby
<Sparky> RickHull: My favorite Rick Hull!!
<RickHull> how's it going?
<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
<Sparky> RickHull: Doing my lessons
<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
<greensleeves> Okay
Beams has quit [Quit: .]
<greensleeves> Thanks
<RickHull> here is one reference for those horrible $_ global vars http://xahlee.info/ruby/ruby_predefined_vars.html
orbyt_ has joined #ruby
<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]
cagomez has joined #ruby
<Sparky> What did I do wrong, and how do I read the error message? https://gist.github.com/Dasms/fcadf20a636d20f39b732355c8991adc
cagomez_ has joined #ruby
<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?
<RickHull> >> foo = 'a string'; def bar; 'another string'; end; [foo, bar]
<ruby[bot]> RickHull: # => ["a string", "another string"] (https://eval.in/896478)
stoopidmunkey has joined #ruby
ur5us has quit [Ping timeout: 268 seconds]
<Sparky> What is "def"
<Sparky> OH!
<Sparky> def is what I use for .. woah
orbyt_ has joined #ruby
troys is now known as troys_
<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)
troys_ is now known as troys
Puffball has joined #ruby
jrp93 has joined #ruby
steph_ has joined #ruby
<RickHull> looks good
kryptoz has joined #ruby
cschneid_ has joined #ruby
exhiled has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<RickHull> one thing -- your last line of the method -- instead of `puts "..."` -- you can just return the string instead of printing it
steph_ has quit [Remote host closed the connection]
<RickHull> as your programs get more sophisticated, you will learn that functions should return strings rather than print them
<RickHull> and the *caller* of the function should make the choice whether to print the string that is returned
jrp93 has left #ruby ["Leaving"]
<RickHull> however, if the book says to print them, then proceed as such -- i'm just giving some larger perspective :)
steph_ has joined #ruby
<aScottishBoat> RickHull, why return as opposed to printing? I know I should return them (as per community standards), but any reason why?
<RickHull> all that said, if your function is named "print_blah" then yeah, it's fine to print
<aScottishBoat> I mean, it requires one less readable word
<RickHull> aScottishBoat: it's kind of subtle, but I'll take a stab
<RickHull> 1. printing is a side-effect
stoopidmunkey has quit [Remote host closed the connection]
<RickHull> 2. functions ideally minimize side-effects
stoopidmunkey has joined #ruby
kryptoz has quit [Ping timeout: 240 seconds]
<RickHull> if you are reusing some code, where someone else has written an awesome function that does X Y and Z for you
cschneid_ has quit [Ping timeout: 250 seconds]
sucks has joined #ruby
<RickHull> many times, you want the result, and maybe you want to manipulate it slightly before printing it
<RickHull> or maybe you don't want to print it at all, but shove it in a database
<RickHull> but if the function writer decided that the last line will print the result, and return nil, then the caller of the function is stuck
<RickHull> it's much more flexible to take input as args and return output, and let the caller decide on what gets printed
eckhardt has joined #ruby
exhiled has joined #ruby
truenito has joined #ruby
jrafanie has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
exhiled has quit [Client Quit]
orbyt_ has joined #ruby
Sembei has joined #ruby
bweston92 has quit [Quit: Connection closed for inactivity]
Pisuke has quit [Ping timeout: 240 seconds]
steph_ has quit [Remote host closed the connection]
quobo has joined #ruby
tens0r has joined #ruby
_sfiguser has joined #ruby
tens0r has quit [Client Quit]
<Sparky> RickHull: You were saying that I don't have to "puts" in the function?
<RickHull> >> def handle_args(*args); arg1, arg2 = args; "arg1: #{arg1}, arg2: #{arg2}"; end; handle_args("Idaho", "Potato")
<ruby[bot]> RickHull: # => "arg1: Idaho, arg2: Potato" (https://eval.in/896493)
claudiuinberlin has quit [Ping timeout: 248 seconds]
<baweaver> Sparky: also, what does puts return?
<Sparky> Got ya
<RickHull> nothing will be printed in that case. if you want to print, you could: puts handle_args("Idaho", "Potato")
<Sparky> baweaver: puts returns the args
<baweaver> does it?
<baweaver> >> puts [1,2,3]
<ruby[bot]> baweaver: # => 1 ...check link for more (https://eval.in/896494)
marxarelli has quit [Quit: Textual IRC Client: www.textualapp.com]
<baweaver> check the actual return on the eval.in :)
<baweaver> It's sneaky
<baweaver> >> puts([1,2,3]).nil?
ShekharReddy has quit [Quit: Connection closed for inactivity]
<ruby[bot]> baweaver: # => 1 ...check link for more (https://eval.in/896495)
<Sparky> So if I got rid of puts "arg1: #{arg1}, arg2: #{arg2}" .......
<Sparky> It just doesn't print it
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Xiti` has quit [Quit: Xiti`]
Xiti has joined #ruby
eckhardt has joined #ruby
stoopidmunkey has quit [Quit: Leaving...]
stoopidmunkey has joined #ruby
<RickHull> notice in my example, a string is returned
<RickHull> I did not omit the entire line
<RickHull> also, I used ruby's implicit return. you could swap your `puts` for `return`
krawchyk has joined #ruby
adlerdias has quit [Quit: adlerdias]
eckhardt has quit [Client Quit]
<Sparky> RickHull: So in RUby there is usually more than 1 way to do the same thing, right?
eckhardt has joined #ruby
<RickHull> yes, from ruby's perl heritage: https://en.wiktionary.org/wiki/TMTOWTDI#English
<RickHull> in contrast, python prefers a single obvious way to do it
ur5us has joined #ruby
<Sparky> RickHull: So instead of doing handle_args(args*) ....... You could have done: handle_args(arg1, arg2) , right?
<RickHull> ruby is somewhat in the middle. there is usually a preferred way to do it :)
<RickHull> yes -- though your splat is in the wrong place
<Sparky> Is my splat showing?
<Sparky> Oops
<Sparky> (*args)
<RickHull> *args is more flexible -- it means the function will accept any number of args
workmad3 has quit [Ping timeout: 240 seconds]
<RickHull> whereas the 2nd version will reject a call with 1 arg or 3 args
<Sparky> could you not do: handle_args(arg1, arg2, arg3) ?
conta3 has joined #ruby
<RickHull> yes, though now you don't have the 2 arg function anymore
cschneid_ has joined #ruby
<RickHull> er -- if you mean to def handle_args(arg1, arg2, arg3) it will overwrite the previous definition
<Sparky> Are you sure it will reject it? in the example I did, I used: https://gist.github.com/Dasms/fb348d10f9fabb064b567f0a4edaaeaf
<RickHull> if you mean to call: handle_args(arg1, arg2, arg3) -- that call will be rejected
<RickHull> i think there is some confusion over the definition of the function vs calling it
<RickHull> which handle_args definition are you asking about? def handle_args(*args) ?
<RickHull> in that definition, you may call it with any number of args
ur5us has quit [Ping timeout: 268 seconds]
<RickHull> if instead: def handle_args(arg1, arg2) then a call with 3 args will be rejected
cdg has joined #ruby
<Sparky> OH! Because it only defines 2
<Sparky> Is that right?
<RickHull> pretty much
jrp932 has joined #ruby
conta3 has quit [Ping timeout: 268 seconds]
FrostCandy has joined #ruby
cdg_ has quit [Ping timeout: 240 seconds]
Dimik has joined #ruby
cdg has quit [Ping timeout: 240 seconds]
cdg has joined #ruby
jrp932 is now known as jrp93
cschnei__ has joined #ruby
jenrzzz has joined #ruby
ramfjord has joined #ruby
cdg has quit [Ping timeout: 260 seconds]
cschneid_ has quit [Ping timeout: 250 seconds]
steph_ has joined #ruby
Sparky has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
troulouliou_dev has joined #ruby
netherwolfe has quit [Quit: Leaving]
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
<dminuoso> jhass :o
<jhass> you're looking for system or backticks
<impermanence> jhass: huh. so subshell then?
<impermanence> oh, yeah
mson has joined #ruby
<jhass> or maybe spawn
<dminuoso> impermanence: https://i.stack.imgur.com/1Vuvp.png
<impermanence> dminuoso: yeesh, well, that answers what would've been my next question. Thanks!
michael1 has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<impermanence> it's working :) yay.
jenrzzz has joined #ruby
growp has joined #ruby
<growp> I️ want to make a mastermind game in ruby
<growp> How can I️ make it so it will display colored pegs in the command line?
<jhass> google for ansi escape codes
growp has quit [Client Quit]
ta has joined #ruby
paul_ has joined #ruby
tomphp has quit [Read error: Connection reset by peer]
tomphp has joined #ruby
<baweaver> or use the Ruby Rainbow gem (which uses them)
zipace has quit [Ping timeout: 258 seconds]
workmad3 has joined #ruby
jrafanie has joined #ruby
cdg has joined #ruby
ur5us has joined #ruby
cdg has quit [Read error: Connection reset by peer]
cdg_ has joined #ruby
growp has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
dionysus69 has quit [Ping timeout: 268 seconds]
cdg_ has quit [Read error: Connection reset by peer]
cagomez has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
cdg has joined #ruby
xco has joined #ruby
growp has quit [Remote host closed the connection]
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
alfiemax has quit [Remote host closed the connection]
cdg has quit [Ping timeout: 240 seconds]
cdg has joined #ruby
uZiel has quit [Ping timeout: 260 seconds]
cdg_ has joined #ruby
ta has quit [Remote host closed the connection]
fishcooker has joined #ruby
duckpuppy has quit [Ping timeout: 258 seconds]
selim has quit [Ping timeout: 250 seconds]
nolakat has joined #ruby
cdg has quit [Ping timeout: 248 seconds]
nolakat has quit [Client Quit]
xco has quit [Read error: Connection reset by peer]
selim has joined #ruby
sepp2k has quit [Quit: Leaving.]
orbyt_ has joined #ruby
alfiemax has joined #ruby
jeffreylevesque has quit [Remote host closed the connection]
nolakat has joined #ruby
Psybur has quit [Ping timeout: 240 seconds]
alex`` has joined #ruby
nolakat has quit [Client Quit]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mostlybadfly has quit [Quit: Connection closed for inactivity]
camilasan has joined #ruby
mostlybadfly has joined #ruby
coffeecupp has quit [Ping timeout: 240 seconds]
hopsoft has quit [Read error: No route to host]
nolakat has joined #ruby
troys_ is now known as troys
kies has quit [Ping timeout: 240 seconds]
waveprop has joined #ruby
vipaca has joined #ruby
ap4y has joined #ruby
KeyJoo has quit [Ping timeout: 248 seconds]
Coldbla1 has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
stoopidmunkey has quit [Read error: Connection reset by peer]
Coldblackice has quit [Ping timeout: 250 seconds]
alfiemax has quit [Remote host closed the connection]
Emmanuel_Chanel has joined #ruby
steph_ has quit [Remote host closed the connection]
milardovich has joined #ruby
steph_ has joined #ruby
apeiros_ has joined #ruby
synthroid has quit []
coffeecupp has joined #ruby
paul_ has quit [Remote host closed the connection]
paul_ has joined #ruby
SeepingN_ has joined #ruby
SeepingN has quit [Disconnected by services]
David_H__ has joined #ruby
milardovich has quit [Remote host closed the connection]
VeryBewitching has quit [Quit: Konversation terminated!]
charliesome has joined #ruby
milardovich has joined #ruby
ta has joined #ruby
David_H_Smith has quit [Ping timeout: 240 seconds]
shinnya has joined #ruby
paul_ has quit [Ping timeout: 248 seconds]
ramfjord has joined #ruby
hahuang65 has quit [Quit: WeeChat 1.9.1]
hahuang65 has joined #ruby
enterprisey has joined #ruby
milardovich has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 248 seconds]
ramfjord has joined #ruby
selim has quit [Ping timeout: 240 seconds]
ap4y has quit [Quit: WeeChat 1.9.1]
ap4y has joined #ruby
ap4y1 has joined #ruby
<waveprop> can i ask another Rack question in here
paul_ has joined #ruby
<RickHull> ?ask
<ruby[bot]> Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
<waveprop> thx RickHull
<RickHull> ?botsnack
<ruby[bot]> nomnomnomnom
<waveprop> lol
milardovich has joined #ruby
ap4y has quit [Ping timeout: 240 seconds]
Technodrome has joined #ruby
sonOfRa has quit [Remote host closed the connection]
sepp2k has joined #ruby
paul_ has quit [Ping timeout: 268 seconds]
Psybur has joined #ruby
enterprisey has quit [Remote host closed the connection]
jrafanie has joined #ruby
sonOfRa has joined #ruby
milardovich has quit [Remote host closed the connection]
alfiemax has joined #ruby
biberu has quit []
milardovich has joined #ruby
<waveprop> i have one middleware setting some headers, status, and body like in the last part of the call method here, and it works fine ====>>>> https://gist.github.com/anonymous/e3b079deeec02933b6555a6d20e93231
jrp93 has left #ruby ["Leaving"]
michael1 has quit [Ping timeout: 248 seconds]
ta__ has joined #ruby
<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…]
tvw has joined #ruby
<waveprop> so i searched the fine web, and found this fine document ====>>>> https://rubyplus.com/articles/2121-Web-Development-in-Ruby-Middleware-in-Rack-Apps
lytol has joined #ruby
kies has joined #ruby
<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
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
coffeecupp has quit [Ping timeout: 248 seconds]
<RickHull> what is that app doing?
<waveprop> it's just a simple database auth server which returns false or a hash of user data
imode has quit [Ping timeout: 250 seconds]
<waveprop> which speaks json and i want to add yaml and xml
<RickHull> ok, probably you should stick to a single format for the return value
<RickHull> or else make sure you are checking for that false
kryptoz has quit [Ping timeout: 240 seconds]
krawchyk has quit [Quit: Textual IRC Client: www.textualapp.com]
milardovich has quit [Remote host closed the connection]
<RickHull> it can be kind of tricky to decide on the right error handling strategy or what qualifies as an error
<waveprop> good idea. i'll just nest the user data hash
<RickHull> but if you intend to send the failed auth thingie back to the json client, then probably send a hash.to_json
<waveprop> yeah that's my intent
<RickHull> btw, if you want a fun json client: https://github.com/rickhull/mudbug/
<RickHull> also has provisional support for yaml
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]
ta has joined #ruby
aScottishBoat has joined #ruby
jottr has quit [Ping timeout: 248 seconds]
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
jottr has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
selim has joined #ruby
milardovich has joined #ruby
Psybur has quit [Ping timeout: 240 seconds]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
coffeecupp has joined #ruby
Technodrome has joined #ruby
vipaca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Psybur has joined #ruby
^mtkd has quit [Ping timeout: 268 seconds]
FrostCandy has quit []
mtkd has joined #ruby
jphase has quit [Remote host closed the connection]
jphase has joined #ruby
jrafanie has joined #ruby
milardovich has quit [Ping timeout: 268 seconds]
vipaca has joined #ruby
thinkpad has joined #ruby
charliesome has joined #ruby
[Butch] has quit [Quit: Textual IRC Client: www.textualapp.com]
jphase has quit [Ping timeout: 260 seconds]
coffeecupp has quit [Quit: ZNC 1.6.5 - http://znc.in]
mson has quit [Quit: Connection closed for inactivity]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ltem has quit [Quit: Leaving]
bmurt has joined #ruby
jottr has quit [Quit: WeeChat 1.9.1]
jphase has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jphase_ has joined #ruby
jphase has quit [Ping timeout: 240 seconds]
<aScottishBoat> I just want to say that I love Ruby, and I am very fond of our community. Thanks for being great y'all
steph_ has quit []
Psybur has quit [Ping timeout: 248 seconds]
<RickHull> I blame tenderlove <3
SeepingN_ has quit [Ping timeout: 240 seconds]
jphase_ has quit [Ping timeout: 240 seconds]
moei has quit [Quit: Leaving...]
_sfiguser has quit [Quit: Leaving]
impermanence has quit [Ping timeout: 248 seconds]
jphase has joined #ruby
Psybur has joined #ruby
jackjackdripper has joined #ruby
SeepingN has joined #ruby
jphase has quit [Ping timeout: 240 seconds]
John___ has quit [Read error: Connection reset by peer]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
naprimer2 has joined #ruby
coffeecupp has joined #ruby
jphase has joined #ruby
Azure has quit [Quit: Oops.]
naprimer has quit [Ping timeout: 258 seconds]
jrafanie has quit [Ping timeout: 268 seconds]
jphase_ has joined #ruby
wolfshappen has quit [Ping timeout: 268 seconds]
jphase has quit [Ping timeout: 240 seconds]
jphase_ has quit [Ping timeout: 250 seconds]
jenrzzz has quit [Ping timeout: 248 seconds]
apeiros_ is now known as apeiros
ramfjord has quit [Ping timeout: 248 seconds]
vipaca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mostlybadfly has quit [Quit: Connection closed for inactivity]
greensleeves has quit [Ping timeout: 260 seconds]
wolfshappen has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
tomphp has joined #ruby
<baweaver> I blame _why
ramfjord has quit [Ping timeout: 248 seconds]
orbyt_ has joined #ruby
Psybur has quit [Ping timeout: 268 seconds]
tomphp has quit [Client Quit]
tvw has quit [Remote host closed the connection]
ramfjord has joined #ruby