baweaver changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
quazimodo has joined #ruby
<Ox0dea> Have you not completely ruled out the possibility that demons got into your machine and removed the first's log, then?
jedney has joined #ruby
naftilos76 has quit [Ping timeout: 240 seconds]
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
<sevenseacat> i hate when that happens.
casadei_ has joined #ruby
juanpablo_ has joined #ruby
<postmodern> also double check that reality is not a simulation, and the laws of the universe are starting to glitch
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
shock_one has joined #ruby
cschneid_ has quit [Remote host closed the connection]
<dfockler> another gap in my sys admin knowledge is log files
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jedney has quit [Ping timeout: 244 seconds]
<dfockler> although I'm not a sys admin so...
juanpablo_ has quit [Ping timeout: 246 seconds]
chills42 has joined #ruby
gambl0re has quit []
demiurgen has quit [Quit: Leaving.]
Mives has quit [Ping timeout: 250 seconds]
<dfockler> and server supervisors
shock_one has quit [Ping timeout: 256 seconds]
<shevy> just ask systemd
linuxboy_ has quit [Remote host closed the connection]
ranchodev has joined #ruby
mleung has quit [Quit: mleung]
linuxboytoo has joined #ruby
<dfockler> systemd help
<shevy> :D
diegoviola has joined #ruby
<dfockler> When would I use a lambda for something anyways?
finisherr has quit [Quit: finisherr]
<dfockler> I've only ever needed them for callbacks in JS
ordepdev has quit [Remote host closed the connection]
casadei_ has quit [Remote host closed the connection]
clarkenciel has quit [Quit: Leaving]
* dfockler runs off to write a monad with a lambda, knowing little about monads or lambdas
jedney has joined #ruby
linuxboytoo has quit [Ping timeout: 240 seconds]
<shevy> dfockler I always wondered about that as well
Guest89952 has quit [Quit: leaving]
Ariadeno has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
<Ox0dea> dfockler: You use blocks all the time, no?
<dfockler> Yep
<Ox0dea> They're essentially lambdae.
<Ox0dea> If Ruby didn't give us explicit syntax for them, somebody would've made it a library. :P
RegulationD has quit [Remote host closed the connection]
David27 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
casadei_ has joined #ruby
<Ox0dea> It's illustrative to think of lambdae as "dynamic blocks"; sometimes you're not sure which block you want to execute.
<dfockler> Ahhh
<dfockler> ok
hays_ has joined #ruby
Ketchy has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
Ariadeno has quit [Client Quit]
hays has quit [Ping timeout: 244 seconds]
rbennacer has quit [Remote host closed the connection]
<Ox0dea> It's true that they're not strictly necessary, but following that logic all the way down gets us back to the bad old days of `goto` and nothing but.
<arcanez> Ox0dea: I'm trying to figure out why I'd have .2015-07-31 and .2015-08-02. I want to rule out Lumberjack messing up
morenoh149 has joined #ruby
<bootstrappm> posted this in #ror but got no response so I'm trying here: how do you stub Devise's authenticate_user! in controller tests?
<Ox0dea> arcanez: Consider whether you'd be more or less alarmed if the file existed and were empty.
<bougyman> doesn't Devise have a mock mode for that?
HAL2328 has joined #ruby
<bootstrappm> no RSpec, just Minitest
<sevenseacat> i'm sure that would be in the devise wiki
<bootstrappm> does it? I'll google
<bootstrappm> I looked in the wiki and it gives two options. One with RSpec, one for Rails 3
pixelhan_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<arcanez> Ox0dea: given that Lumberjack doesn't sit around waiting for the day to change and rotate, but rather checks on flushes.. I think my issue is I didn't log for a while
devoldmx has quit [Ping timeout: 265 seconds]
<bootstrappm> actually both are w/ RSpec and the one you linked sevenseacat just tells you to simulate signing in
quazimodo has quit [Ping timeout: 244 seconds]
<sevenseacat> bootstrappm: which is exactly what you want to do isnt it?
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Ariadeno has joined #ruby
rafaelcout has joined #ruby
<bootstrappm> well no, that requires signing in in the setup, I want the method Devise uses internally when checking for a valid auth to just return true
platzhirsch has quit [Quit: Leaving.]
<bootstrappm> so I can do as many controller tests as I like
karapetyan has joined #ruby
<bootstrappm> and don't have to signin in the setup of each
<sevenseacat> you shouldnt share state between tests
<sevenseacat> you shouldnt be mucking with devise internals either
<sevenseacat> you should use the tools the gem provides
<bootstrappm> but I should be logging in in tests that are not trying to test login?
<sevenseacat> yes, if they require a logged in user to run
<bootstrappm> the point is to test the logic of the actions
<bootstrappm> that sounds more like an integration test to me, not really a functional test of the logic of controller action
<bootstrappm> I'll write that one later
<sevenseacat> all rails tests are integration tests.
<sevenseacat> especially controller tests
charliesome has joined #ruby
<bootstrappm> I disagree
<bootstrappm> but thanks
<sevenseacat> you're welcome to disagree, but it doesnt change the facts :P
n008f4g_ has quit [Ping timeout: 260 seconds]
<dfockler> Is this a monad in ruby? https://gist.github.com/dfockler/d9e00153ba76736cc79c
gambl0re has joined #ruby
tejasmanohar has quit [Quit: tejasmanohar]
Kallis has quit [Read error: Connection reset by peer]
karapetyan has quit [Ping timeout: 268 seconds]
FernandoBasso has quit [Quit: WeeChat 1.3]
dopie has quit [Quit: This computer has gone to sleep]
<zenspider> yay minitest! what'd I miss?
marr has quit [Ping timeout: 244 seconds]
dfockler has quit [Remote host closed the connection]
s00pcan has quit [Ping timeout: 265 seconds]
<bootstrappm> sevenseacat: you can't just take your opinion and call it a fact :P. I'm basing my opinion on the fact that the Rails documentation has separate sections for function controller tests and integration tests (http://guides.rubyonrails.org/testing.html#integration-testing) which describe their purpose very differently. Also on the fact that the wiki for integration testing describes it as tests that are " constructed to test whether all the components within
<bootstrappm> assemblages interact correctly" ... that's not what I'm trying to test at all. The innards of Rails after the request leaves the controller action have been tested, as are the availability of request params in the action. I'm literally just testing the logic on one function where all the other stuff has been tested. Doesn't sound like an integration test to me
shmilan has quit [Ping timeout: 244 seconds]
<bootstrappm> Even aside from that a model test where you stub out the db isn't an integration test either
<bootstrappm> you're just unit testing a class at that point
s00pcan has joined #ruby
<bootstrappm> a method of a class*
<bootstrappm> so saying all rails tests are integration tests is well .... wrong
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sevenseacat> bootstrappm: are you stubbing out the request, response, the model layer, the view layer, and every other type of object that your controller touches?
bricker has quit [Ping timeout: 250 seconds]
<sevenseacat> if not, then it's an integration test.
<sevenseacat> because it tests how your controller integrates with all of those things.
Yzguy has joined #ruby
northfurr has quit [Quit: northfurr]
rbennacer has joined #ruby
quazimodo has joined #ruby
<sevenseacat> an error in any one of those things will cause your controller test to fail.
<bootstrappm> cool, I buy that a controller test can be considered an integration test
<bootstrappm> but a model test w/ the db stubbed out?
<sevenseacat> which is exactly what I said
<sevenseacat> thanks.
<bootstrappm> pretty sure you said "all rails tests are integrations tests." ....?
<bootstrappm> like, verbatim
rbennacer has quit [Remote host closed the connection]
<sevenseacat> they are. you're not stubbing out all of activerecord internals when you write unit tests
<sevenseacat> and activerecord touches a loooot of other things
<sevenseacat> not just the db
<bootstrappm> okay, cool. I'll just agree to disagree, thanks
<bootstrappm> anyways zenspider, just figuring out how to stub out some Devise stuff
<sevenseacat> cool :)
<bootstrappm> there are some guides but they use rspec or do it a slower way than I'd like
oo_ has joined #ruby
<bootstrappm> gonna just mess around until I figure it out
rbennacer has joined #ruby
casadei_ has quit [Remote host closed the connection]
Mives has joined #ruby
jonr22 has joined #ruby
roxtrongo has joined #ruby
<drbrain> if rails says "we support testing of type X and Y" saying "no, actually they only have Z" it's really hard to communicate when someone only wants to X if you make them say "Z" instead
<sevenseacat> I think that was directed at me
jonr22 has quit [Remote host closed the connection]
<drbrain> there was a lot of back-and-forth
vipaca has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zenspider> bootstrappm: why stub it at all?
<zenspider> is it going out to an external service?
<sevenseacat> I mean if you want to stub authenticate_user! then just stub it, thats fine. but don't muck around with devise internals, and don't pretend you're unit testing when you're not
freerobby has quit [Read error: Connection reset by peer]
Mives has left #ruby ["WeeChat 1.3"]
<sevenseacat> why else would you want to 'stub authenticate_user!' if not to 'simulate signing in' ?
ramfjord has quit [Ping timeout: 260 seconds]
freerobby has joined #ruby
<bootstrappm> never said unit testing but how do you say that when you're trying to do the exact same thing pretending everything is an integration test? That sounds like saying "oh well actually the test that you wrote to test that arithmetic function is an integration test because it touches a lot of other things, like Math.add". The whole point of getting tested packaged software is that you're not testing that when you write stuff on top of it
keen__________17 has joined #ruby
<bootstrappm> but it doesn't matter really, doesn't solve the problem
maletor has quit []
<zenspider> really seems like you two are talking past each other for the sake of talking past each other
<sevenseacat> well my first response was the docs that explained how to handle authentication in controller tests
<bootstrappm> zenspider: I want to stub it because I don't want to login in my test, basically. I'll test being logged in somewhere else but I just want to test the logic of the action in this test
xcesariox has joined #ruby
* sevenseacat shrugs
jenrzzz has quit [Ping timeout: 264 seconds]
keen__________16 has quit [Ping timeout: 246 seconds]
<bootstrappm> so I'd rather just have the auth stuff return true (a stub) so it looks like I'm logged in without having to worry about having a user in the db, the time it takes for it ACTUALLY check, etc. Just trying to get quick digestible tests
<zenspider> bootstrappm: login... for a model's unit test? either you're not communicating something or ... I doubt there's an or
finisherr has joined #ruby
opensource_ninja has joined #ruby
<bootstrappm> hah no, its a controller action. Simulating a request to soft delete something
<zenspider> and you said the db was stubbed out already...
agent_white has quit [Remote host closed the connection]
<bootstrappm> no, that was more of a hypothetical unit test in rails
tcopeland has joined #ruby
<bootstrappm> I could stub it out though
dgutierrez1287 has joined #ruby
<zenspider> bootstrappm: you realize you're being a pain in the ass, right?
<bootstrappm> its on my todo list as those tests take 1.5 each
<bootstrappm> I don't actually :/ sorry zenspider
<zenspider> say what you mean. describe your actual problem at hand. stop obfuscating issues in order to argue
<eam> how do I test rand()
<bootstrappm> I tried! I just said agree to disagree and then was told disagreeing doesn't change the facts >:|
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bootstrappm> but okay, got it
<zenspider> what's wrong with: <blah>.current_user = user1 ? no stubbing. no nothing. (for some value of <blah>... wherever you hang that)
<bootstrappm> hm, let me try
<drbrain> eam: I would override it with a method that records the arguments and returns 4
<drbrain> then verify the arguments separately
chouhoulis has joined #ruby
<eam> it's as good of a random number as any other I suppose
<drbrain> since it is Kernel#rand you can often override it directly on the instance you're testing
<zenspider> 4?!? no way! 42!!
<drbrain> def subject.rand(*a) … record arguments …; 4; end
[k- has quit [Ping timeout: 244 seconds]
<eam> I need an integration test though, how do I know the results are really random
<zenspider> the alternative answer is: don't test rand
<drbrain> eam: hire a cryptologist
<zenspider> srand w/ a static seed and use rand normally
<zenspider> your job is not to test ruby
<sevenseacat> +1
<sevenseacat> rubyhas its own tests
<eam> for rand? (and you realize it's a jackass question of course)
dgutierrez1287 has quit [Ping timeout: 250 seconds]
vipaca has joined #ruby
<drbrain> eam: (I did)
dopamean_ has joined #ruby
<eam> sho' 'nuff test_securerandom.rb
mary5030 has joined #ruby
iateadonut has joined #ruby
jeadre has quit [Remote host closed the connection]
tejasmanohar has joined #ruby
<zenspider> eam: you know sarcasm doesn't convey over plain text, right?
<eam> zenspider: no, it never does. It can't, even. Impossible.
CloCkWeRX has joined #ruby
Rollabunna has joined #ruby
vipaca has quit [Client Quit]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vdamewood has joined #ruby
CloCkWeRX has left #ruby [#ruby]
bruno- has quit [Ping timeout: 246 seconds]
havenwood has joined #ruby
Rollabunna has quit [Ping timeout: 255 seconds]
finisherr has left #ruby [#ruby]
finisherr has joined #ruby
bender_unit has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
stardiviner has joined #ruby
nettoweb has joined #ruby
finisherr has quit [Client Quit]
baweaver has quit [Remote host closed the connection]
dfockler has joined #ruby
blt has joined #ruby
howdoicomputer has quit [Ping timeout: 240 seconds]
swgillespie has joined #ruby
choke has joined #ruby
Akagi201_ has joined #ruby
RudestBuddhist has joined #ruby
Akagi201_ has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
HAL2328 has quit [Quit: Leaving]
<RudestBuddhist> Hey guys, I’m making my first jump into playing with JSON files. I’ve got a file that I want to find the difference between two timestamps but when I try to manipulate the keys I get a ‘no implicit conversion of String into Integer (TypeError)’. I’ve tried converting and cleaning up the file but no avail. Can someone point me in the right direction for a tutorial or something for manipulating JSON in ruby?
jeadre has joined #ruby
Akagi201 has quit [Ping timeout: 252 seconds]
toertore has joined #ruby
swgillespie has quit [Client Quit]
<dfockler> RudestBuddhist: Make sure you aren't trying to access an array as a hash
RegulationD has joined #ruby
<havenwood> >> []['']
<ruboto> havenwood # => no implicit conversion of String into Integer (TypeError) ...check link for more (https://eval.in/431472)
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<RudestBuddhist> dfockler: I thought array’s were hashes in ruby?
<RudestBuddhist> dfockler: It’s similar to a dictionary?
r_baron has joined #ruby
<havenwood> RudestBuddhist: Check: JSON.parse(your_json).class
sepp2k has quit [Read error: Connection reset by peer]
mary5030 has quit [Remote host closed the connection]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devoldmx has joined #ruby
mary5030 has joined #ruby
<havenwood> RudestBuddhist: http://ruby-doc.org/core/Array.html
<havenwood> RudestBuddhist: http://ruby-doc.org/core/Hash.html
<RudestBuddhist> havenwood: I’m going json = File.read(‘scans.json’); json_hash = JSON.parse(json)
toretore has quit [Ping timeout: 255 seconds]
<RudestBuddhist> reading...
<RudestBuddhist> thanks :)
j4cknewt has quit [Remote host closed the connection]
<RudestBuddhist> so am I accidently parsing that json_hash into a array?
kshah has joined #ruby
<RudestBuddhist> it would appear so…
Jardayn has quit [Quit: Leaving]
j4cknewt has joined #ruby
<havenwood> RudestBuddhist: Show us the Array? Are you wanting a Hash? Key/value pairs?
<kshah> I’m running into a bizarre problem using ActiveRecord (not Rails) where my very simple loop-over-an-array-of-hashes script is causing dozens of threads to appear
petricore has quit [Quit: Textual IRC Client: www.textualapp.com]
j4cknewt has quit [Remote host closed the connection]
<kshah> any help appreciated, I can’t tell what the cause is
<RudestBuddhist> havenwood: key/value pairs would be ideal
mary5030 has quit [Read error: Connection reset by peer]
RegulationD has quit [Ping timeout: 246 seconds]
mary5030 has joined #ruby
<RudestBuddhist> havenwood: I thought that’s how I could access it but for some reason if I call json_hash[1] for example, I get the entire thing back, instead of just one key which I would expect
howdoicomputer has joined #ruby
<havenwood> RudestBuddhist: Show us the return value and someone can explain it to you.
<RudestBuddhist> sure one sec, I’ll create a gist
devoldmx has quit [Ping timeout: 268 seconds]
yfeldblum has joined #ruby
<RudestBuddhist> so I have a ton of those responses from a JSON I’ve grabbed. I’d like key value pairs for each so I could compare all of the start times, and all of the end times
<havenwood> kshah: Even if it's not a Rails app the #RubyOnRails channel is the most familiar with ActiveRecord. You might ask there as well, just mention you're cross-posting.
<kshah> havenwood: I already have, no responses. I don’t think they can help anyway
<havenwood> kshah: It looks like "The default ConnectionPool maximum size is 5."
<havenwood> kshah: You're creating a connection pool for each product.
<havenwood> kshah: 5 * x
r_baron has quit [Quit: leaving]
towski_ has quit [Remote host closed the connection]
<kshah> havenwood: “with_connection” just checks a connection out of the pool and yields it to a block
mkosaki has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
quazimodo has quit [Remote host closed the connection]
<havenwood> kshah: You're not just calling #with_connection on an existing pool.
mkosaki has joined #ruby
sankaber has joined #ruby
<kshah> havenwood: and ActiveRecord::Base.connection_pool according to L108 of connection_handling.rb just retrieves the connection pool itself
<havenwood> kshah: I was wondering if it did after saying that. I know Ruby but not Rails.
r_baron has joined #ruby
<RudestBuddhist> havenwood: looks like symbolize names is what I want
NightMonkey has quit [Ping timeout: 252 seconds]
<havenwood> kshah: I'm actually I've just started learning Rails in earnest.
<havenwood> And I waffle on how to say things and then say them badly.
darwingr has quit [Ping timeout: 250 seconds]
<kshah> my recent experiences with Rails after being a very solid user (since 1.2.0) have been.. abysmal to say the least
<kshah> things which were once straightforward to script up are now overly complicated and slow
<kshah> Sequel looks to be a fine alternative as an ORM
<havenwood> kshah: I really have been enjoying Roda lately. It's by the maintainer of Sequel.
<havenwood> kshah: http://roda.jeremyevans.net
<havenwood> kshah: I'd highly recommend.
<kshah> havenwood: looks good!
<sevenseacat> Rails is awesome.
<havenwood> sevenseacat: I've been enjoying it so far.
<sevenseacat> :)
dorei has quit []
<havenwood> sevenseacat: Bought my copy of R4IA! Need to start going through that.
<sevenseacat> yaaaaaay I was going to ask if you were reading it, but didn't want to be all plug plug plug
shmilan has joined #ruby
<sevenseacat> I feel a bit awkward self-promoting it lol
NightMonkey has joined #ruby
<havenwood> I've fell asleep last night on like the fourth page. Been so busy lately!
linuxboytoo has joined #ruby
<sevenseacat> can understand that
<havenwood> Again with the changing sentence mid-sentence. I need to put a mutex around it.
<RudestBuddhist> havenwood: figured it out! thanks for the help!
<RudestBuddhist> havenwood: this rules :)
gambl0re has quit [Ping timeout: 240 seconds]
<havenwood> RudestBuddhist: Nice.
khebbie has joined #ruby
khebbie has quit [Remote host closed the connection]
cajone has quit [Ping timeout: 255 seconds]
David27 has joined #ruby
morenoh149 has quit [Ping timeout: 272 seconds]
rbowlby has joined #ruby
Brando753 has quit [Read error: Connection reset by peer]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JamesDH has joined #ruby
Brando753 has joined #ruby
kshah has quit [Read error: Connection reset by peer]
centrx has joined #ruby
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
kshah has joined #ruby
<kshah> and boom my computer crashed from running that script… good lord… adding 900 rows a database was never so hard
pietr0 has quit [Quit: pietr0]
<sevenseacat> what did you put in that script o.O
<sevenseacat> I generally use sequel whenever I want to do big database migrations
deg_ has quit [Ping timeout: 244 seconds]
<sevenseacat> well, 'big' meaning ~100,000 rows
bffff_ has quit [Quit: Connection closed for inactivity]
<kshah> sevenseacat: https://gist.github.com/whistlerbrk/a8766e0199333aed1075/ the hash is a bit more complicated, but it’s data from Redis, so I had to paraphrase code so to speak
<kshah> sevenseacat: and I also tried not using the connection pool block as well, same problem
<sevenseacat> kshah: is that opening a new connection for every product? >_>
juanpablo_ has joined #ruby
<kshah> sevenseacat: that is what rhizome implied however the documentation does not state this at all, with_connection should only be checking a connection out of the pool
<kshah> sevenseacat: regardless, when I don’t use the connection pool I have literally the same exact problem
<sevenseacat> why not just use one single connection
<sevenseacat> open it, use it, close it at the end
<kshah> sevenseacat: at the start of the loop establish, at the end disconnect?
<sevenseacat> yeah
roxtrongo has quit [Remote host closed the connection]
<kshah> sevenseacat: Ill give that a go, I’ve done that before, not for a week though so I’ll try it again
Yzguy has quit [Quit: Zzz...]
solocshaw has quit [Ping timeout: 264 seconds]
theery has joined #ruby
rbennacer has quit [Remote host closed the connection]
crankharder has quit [Ping timeout: 240 seconds]
oo_ has quit [Remote host closed the connection]
A124 has quit [Read error: Connection reset by peer]
juanpablo_ has quit [Ping timeout: 250 seconds]
crankharder has joined #ruby
freerobby has quit [Quit: Leaving.]
<kshah> sevenseacat: when I did that last time the startup time between the conection/disconnection was immense
<sevenseacat> what startup time? of loading activerecord before the connection?
bender_unit has joined #ruby
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<kshah> sevenseacat: establishing the connection
<sevenseacat> i dont see how it would make a difference, whether you establish it inside the loop or outside
xylotism has joined #ruby
oo_ has joined #ruby
<kshah> sevenseacat: we’re talking about reusing a connection or establishing it for every iteration of the loop and then closing it at the end of the loop though
bmurt has joined #ruby
cajone has joined #ruby
<kshah> vs.
tenderlove has joined #ruby
<sevenseacat> err... huh
<sevenseacat> now I'm very confused as to what you're doing - I'm telling you to do the former
<sevenseacat> use one connection for the entire import script
A124 has joined #ruby
<sevenseacat> which should definitely be faster than establishing it n times
<kshah> sevenseacat: that’s what I’ve been doing....
<xylotism> Hi guys... I have a potentially complex question -- how does a GUI library like Shoes, Visualruby, FXRuby hold up vs. coding in another language, like Java or Python?
rafaelcout has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<sevenseacat> doesn't look that way to me
<kshah> sevenseacat: I’m not using the with_connection block anymore, I got rid of that
pontiki has joined #ruby
<sevenseacat> so what code do you have now?
ekain has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mase-chatter has quit [Quit: Leaving]
<xylotism> Context: I've so far been using Ruby very effectively as a scripting tool, but I recently wanted to add more user interaction than just command line input, without developing a full web app. Something I can package and deliver to Windows/potentially Mac clients.
<kshah> sevenseacat: well, I tried the same exact code w/those two lines (the with_connection and it’s end) commented out
<kshah> sevenseacat: that didn’t work, went out of control again
<kshah> sevenseacat:
tjohnson has quit [Quit: Connection closed for inactivity]
rafaelcout has joined #ruby
diegoviola has quit [Quit: WeeChat 1.3]
<kshah> sevenseacat: so now I’m running it with establish_connection and connection.disconnect! at the top and ends of the loop respectively (inside it of course)
<sevenseacat> lol
<pontiki> hi
<kshah> sevenseacat: yes, I’m aware it’s ridiculous to be establishing and disconnecting an AR connection for every single iteration of the loop
<kshah> sevenseacat: it’s also the *ONLY* way this script is able to run somehow
<RudestBuddhist> hey guys I have a two strings "22:49:02.871" and ”22:57:02.913”. I’d like to find the difference between those two times but .to_f and .to_i are not giving me the correct numbers. What could I convert them to so I can manipulate them with the ruby math library?
Unopoo has left #ruby ["Leaving(what's the difference between this and quitting?)"]
chills42 has quit [Remote host closed the connection]
<sevenseacat> they look like times, not integers or floats
chills42 has joined #ruby
AndChat|159600 has joined #ruby
<RudestBuddhist> they are times, but it didn’t look like Date would get me what I want
<RudestBuddhist> actually it looks like the Time gem might be what I want...
<sevenseacat> no, but Time might
<kshah> RudestBuddhist: Time.parse
BraddPitt has quit [Quit: Lost terminal]
<RudestBuddhist> awesome, thanks for helping the newbie :)
<sevenseacat> RudestBuddhist: we're not all guys here also, just so you know :)
<RudestBuddhist> hehe sorry
* sevenseacat tries to not be passive-aggressive about it
gambl0re has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
samukasmk has joined #ruby
chills42 has quit [Ping timeout: 272 seconds]
* RudestBuddhist appreciates it
nym has quit [Quit: Connection closed for inactivity]
David27 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
mary5030 has quit [Remote host closed the connection]
Xiti has quit [Quit: Xiti]
arescorpio has joined #ruby
jackjackdripper has joined #ruby
hfp_work has quit [Quit: bye]
hfp has quit [Quit: bye]
mary5030 has joined #ruby
mary5030 has quit [Read error: Connection reset by peer]
Swappticon has joined #ruby
AndChat|159600 has quit [Ping timeout: 244 seconds]
mary5030 has joined #ruby
EasyCo has joined #ruby
hfp has joined #ruby
hfp_work has joined #ruby
choke has joined #ruby
mary5030 has quit [Ping timeout: 246 seconds]
freerobby has joined #ruby
pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
freerobby1 has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
<bootstrappm> thanks for the suggestion to look up the test helpers
<bootstrappm> part of it was actually in the wiki, was just searching wrong
<bootstrappm> (dance) thanks y'all
choke has quit [Read error: Connection reset by peer]
freerobby1 has quit [Client Quit]
j4cknewt has joined #ruby
mordocai has joined #ruby
freerobby has joined #ruby
theery has quit [Remote host closed the connection]
jonr22 has joined #ruby
Xiti has joined #ruby
freerobby has quit [Client Quit]
djbkd has joined #ruby
Yzguy has joined #ruby
jonr22 has quit [Ping timeout: 244 seconds]
<bootstrappm> timing comparison for that is 8.07s for test suite w/ sign_in, 4.75s w/ stubbing
arup_r has joined #ruby
howdoicomputer has quit [Ping timeout: 250 seconds]
djbkd has quit [Ping timeout: 244 seconds]
fostertheweb has joined #ruby
iamvery has joined #ruby
kjones_ has joined #ruby
Ox0dea has quit [Quit: WeeChat 1.3]
davedev24 has joined #ruby
kjones_ has quit [Max SendQ exceeded]
dopie has joined #ruby
j4cknewt has quit [Read error: Connection reset by peer]
khebbie has joined #ruby
bootstrappm has left #ruby [#ruby]
iamvery has quit [Client Quit]
ramfjord has joined #ruby
khebbie has quit [Remote host closed the connection]
kshah has left #ruby [#ruby]
dopieee has joined #ruby
dopie has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
oo_ has quit [Remote host closed the connection]
howdoicomputer has joined #ruby
ponga has quit [Quit: Connection closed for inactivity]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karapetyan has joined #ruby
oo_ has joined #ruby
shmilan has quit [Ping timeout: 246 seconds]
tenseiten is now known as seitensei
baweaver has joined #ruby
kjones_ has joined #ruby
karapetyan has quit [Ping timeout: 252 seconds]
shmilan has joined #ruby
arescorpio has quit [Read error: Connection reset by peer]
Fraeon has quit [Ping timeout: 264 seconds]
arooni has quit [Ping timeout: 246 seconds]
gener1c_ has joined #ruby
freerobby has joined #ruby
devbug has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
freerobby1 has joined #ruby
gener1c has quit [Ping timeout: 244 seconds]
freerobby1 has quit [Client Quit]
Rollabunna has joined #ruby
j4cknewt has joined #ruby
RudestBuddhist has quit [Quit: RudestBuddhist]
shmilan has quit [Ping timeout: 246 seconds]
braincrash has quit [Quit: bye bye]
freerobby has joined #ruby
freerobby has quit [Client Quit]
Musashi007 has joined #ruby
ruby-lang811 has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rollabunna has quit [Ping timeout: 260 seconds]
jas02 has joined #ruby
ruby-lang811 has quit [Ping timeout: 246 seconds]
braincrash has joined #ruby
arooni has joined #ruby
dfockler has quit [Ping timeout: 244 seconds]
jas02 has quit [Ping timeout: 250 seconds]
MichaelSmith has quit [Quit: Connection closed for inactivity]
bmurt has quit []
linuxboytoo has quit [Remote host closed the connection]
davedev24 has quit [Ping timeout: 246 seconds]
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
voltalio has joined #ruby
oo_ has quit [Remote host closed the connection]
psy has joined #ruby
davedev24 has joined #ruby
RegulationD has joined #ruby
oo_ has joined #ruby
devoldmx has joined #ruby
arup_r has quit [Ping timeout: 272 seconds]
jackjackdripper has quit [Quit: Leaving.]
fostertheweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
oo_ has quit [Remote host closed the connection]
cajone has left #ruby [#ruby]
oo_ has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
oo_ has quit [Remote host closed the connection]
arooni_______ has joined #ruby
arooni_______ has quit [Max SendQ exceeded]
fostertheweb has joined #ruby
arooni_______ has joined #ruby
devoldmx has quit [Ping timeout: 264 seconds]
roxtrongo has joined #ruby
rafaelcout has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
TDJACR has quit [Ping timeout: 250 seconds]
poguez_ has quit [Read error: Connection reset by peer]
autrilla has quit [Ping timeout: 246 seconds]
sfr^ has quit [Ping timeout: 246 seconds]
poguez_ has joined #ruby
cajone has joined #ruby
linc01n has quit [Ping timeout: 244 seconds]
casadei_ has joined #ruby
crdpink2 has quit [Ping timeout: 246 seconds]
lokulin has quit [Ping timeout: 246 seconds]
segmond has quit [Ping timeout: 246 seconds]
autrilla has joined #ruby
pharaoh2 has joined #ruby
universa1 has quit [Ping timeout: 246 seconds]
crdpink2 has joined #ruby
sevenseacat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oo_ has joined #ruby
bmn has quit [Quit: obai]
linc01n has joined #ruby
casadei_ has quit [Ping timeout: 268 seconds]
sfr^ has joined #ruby
segmond has joined #ruby
davedev24 has quit []
universa1 has joined #ruby
theery has joined #ruby
bootstrappm has joined #ruby
lokulin has joined #ruby
JamesDH has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ledestin has joined #ruby
grenierm has quit [Quit: grenierm]
gix has quit [Ping timeout: 240 seconds]
j4cknewt has quit [Read error: Connection reset by peer]
juanpablo_ has joined #ruby
theery has quit []
danpatey has joined #ruby
j4cknewt has joined #ruby
<Yzguy> hello
astrobunny has joined #ruby
gix has joined #ruby
<Yzguy> why wouldn't I be able to access the db object?: http://pastebin.com/xUWauPXN
<ruboto> Yzguy, as I told you already, please use https://gist.github.com
juanpablo_ has quit [Ping timeout: 256 seconds]
Rickmasta has joined #ruby
<Yzguy> I get: NameError - undefined local variable or method `db' for #<Sinatra::Application:0x007f95f505dab0>:
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Yzguy has quit [Quit: Zzz...]
dgs_ has joined #ruby
howdoicomputer has quit [Ping timeout: 244 seconds]
dgs has quit [Ping timeout: 250 seconds]
dgs_ is now known as dgs
JamesDH has joined #ruby
JamesDH has quit [Client Quit]
bmn has joined #ruby
bootstrappm has quit [Quit: Leaving.]
danpatey has quit [Quit: danpatey]
bootstrappm has joined #ruby
TDJACR has joined #ruby
ebbflowgo has joined #ruby
bootstrappm has quit [Client Quit]
bootstrappm has joined #ruby
Azure|dc has joined #ruby
<bootstrappm> Yzguy I got disconnected there for a bit, did you get an answer to that?
havenwood has joined #ruby
Azure has quit [Ping timeout: 244 seconds]
elton has quit []
j4cknewt has quit [Read error: Connection reset by peer]
<monoprotic> no one replied
postmodern has quit [Quit: Leaving]
tenderlove has quit [Remote host closed the connection]
<bootstrappm> cool, looks like they left anyway
astrobunny has quit [Remote host closed the connection]
jackjackdripper has joined #ruby
ebbflowgo has quit [Quit: ebbflowgo]
astrobunny has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rakm has joined #ruby
elton has joined #ruby
morenoh149 has joined #ruby
shock_one has joined #ruby
NeverDie has quit [Quit: http://radiux.io/]
Musashi007 has quit [Quit: Musashi007]
Ropeney has joined #ruby
krz has joined #ruby
Guest5 has joined #ruby
shock_one has quit [Ping timeout: 250 seconds]
Swappticon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davedev24 has joined #ruby
sevenseacat has joined #ruby
tkuchiki has quit [Remote host closed the connection]
Musashi007 has joined #ruby
Fraeon has joined #ruby
anisha has joined #ruby
dopieee is now known as dopie
Oka has quit [Quit: o/]
rubie has joined #ruby
mozzarella has quit [Quit: WeeChat 1.2]
darkf has joined #ruby
ht__ has joined #ruby
pontiki has quit [Ping timeout: 244 seconds]
xcesariox has joined #ruby
Stalkr_ has joined #ruby
Stalkr^ has joined #ruby
arescorpio has joined #ruby
mary5030 has joined #ruby
Swappticon has joined #ruby
casadei_ has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Stalkr_ has quit [Ping timeout: 264 seconds]
astrobunny has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
Gnomethrower has joined #ruby
Gnomethrower has quit [Changing host]
Gnomethrower has joined #ruby
ramfjord has quit [Ping timeout: 256 seconds]
craysiii has joined #ruby
khebbie has joined #ruby
centrx has quit [Quit: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."]
khebbie has quit [Remote host closed the connection]
rehat_ has joined #ruby
jgt has joined #ruby
Jerro has joined #ruby
r_baron has quit [Ping timeout: 265 seconds]
bronson has joined #ruby
mozzarella has joined #ruby
minimalism has quit [Quit: leaving]
astrobunny has joined #ruby
bronson has quit [Ping timeout: 255 seconds]
siempref_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Swappticon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
opensource_ninja has quit [Quit: opensource_ninja]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
bricker has joined #ruby
rubie has quit [Remote host closed the connection]
Rollabunna has joined #ruby
mozzarella has quit [Quit: WeeChat 1.2]
rubie_ has joined #ruby
rubie_ has quit [Remote host closed the connection]
Rollabunna has quit [Ping timeout: 250 seconds]
fella5s has joined #ruby
dhjondoh has joined #ruby
pawnbox has joined #ruby
fostertheweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jgt has quit [Ping timeout: 240 seconds]
ruby-lang751 has joined #ruby
ruby154 has joined #ruby
oldbay has joined #ruby
ruby-lang751 has quit [Client Quit]
ruby154 has quit [Client Quit]
samukasmk has quit [Remote host closed the connection]
bootstrappm has quit [Quit: Leaving.]
pawnbox has quit [Remote host closed the connection]
tkuchiki has joined #ruby
karapetyan has joined #ruby
bootstrappm has joined #ruby
tkuchiki has quit [Remote host closed the connection]
postmodern has joined #ruby
tkuchiki has joined #ruby
devoldmx has joined #ruby
RegulationD has joined #ruby
riotjones has joined #ruby
Musashi007 has quit [Quit: Musashi007]
karapetyan has quit [Ping timeout: 260 seconds]
rubie has joined #ruby
arescorpio has quit [Ping timeout: 244 seconds]
devoldmx has quit [Ping timeout: 260 seconds]
riotjones has quit [Ping timeout: 240 seconds]
khebbie has joined #ruby
RegulationD has quit [Ping timeout: 260 seconds]
khebbie has quit [Remote host closed the connection]
mozzarella has joined #ruby
pawnbox has joined #ruby
psy has quit [Ping timeout: 246 seconds]
[k- has joined #ruby
aganov has joined #ruby
swgillespie has joined #ruby
juanpablo_ has joined #ruby
bender_unit has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
leat2 has joined #ruby
pawnbox has quit [Ping timeout: 244 seconds]
Stalkr^ has quit [Quit: Leaving...]
juanpablo_ has quit [Ping timeout: 246 seconds]
codenapper has quit []
claw has quit [Ping timeout: 240 seconds]
codenapper has joined #ruby
codenapper has quit [Client Quit]
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
codenapper has joined #ruby
senayar has joined #ruby
claw has joined #ruby
Mia has joined #ruby
arup_r has joined #ruby
tagrudev has joined #ruby
dgs has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
Musashi007 has joined #ruby
ruurd has joined #ruby
segmond has quit [Ping timeout: 244 seconds]
jackjackdripper has quit [Quit: Leaving.]
naftilos76 has joined #ruby
dgs has joined #ruby
dhjondoh has quit [Ping timeout: 252 seconds]
fedexo has joined #ruby
blt has quit [Ping timeout: 252 seconds]
krz has quit [Ping timeout: 250 seconds]
arooni_______ has quit [Ping timeout: 244 seconds]
arooni has quit [Ping timeout: 244 seconds]
andikr has joined #ruby
jonr22 has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
amclain has quit [Quit: Leaving]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
acke has joined #ruby
segmond has joined #ruby
sevenseacat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
riotjones has joined #ruby
sevenseacat has joined #ruby
jonr22 has quit [Ping timeout: 264 seconds]
bender_unit has joined #ruby
jas02 has joined #ruby
armyriad has quit [Quit: Leaving]
armyriad has joined #ruby
dhjondoh has joined #ruby
ayonkhan has joined #ruby
senayar has quit []
ilken has joined #ruby
riotjones has quit [Read error: No route to host]
ilken has quit [Changing host]
ilken has joined #ruby
claw has quit [Ping timeout: 255 seconds]
swgillespie has joined #ruby
shock_one has joined #ruby
swgillespie has quit [Client Quit]
ICantCook has joined #ruby
<ICantCook> j #python
mary5030 has quit [Remote host closed the connection]
rehat_ has quit []
mary5030 has joined #ruby
<baweaver> it's /join python
<baweaver> ICantCook: ^
Axy has joined #ruby
claw has joined #ruby
nofxx has quit [Ping timeout: 260 seconds]
fostertheweb has joined #ruby
shock_one has quit [Ping timeout: 244 seconds]
nofxx has joined #ruby
Jerro has quit []
Mia has quit [Ping timeout: 244 seconds]
<ICantCook> baweaver: Sorry, hexchat got me. I did "/join #ruby" while in another channel, and then started typing "/j #python". It ended up putting the '/' in the text field of the previous channel before Hexchat responded and moved me to this window, which got the 'join #python"
<baweaver> heh, not a problem.
mary5030 has quit [Ping timeout: 250 seconds]
jonr22 has joined #ruby
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox_ has joined #ruby
last_staff has joined #ruby
tvw has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
timonv has joined #ruby
solars has joined #ruby
jonr22 has quit [Ping timeout: 264 seconds]
Macaveli has joined #ruby
fedexo has quit [Ping timeout: 246 seconds]
dhjondoh has quit [Quit: dhjondoh]
bootstrappm has quit [Quit: Leaving.]
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
leat2 has quit [Remote host closed the connection]
bootstrappm has joined #ruby
leat2 has joined #ruby
krz has joined #ruby
bootstrappm has quit [Client Quit]
bootstrappm has joined #ruby
tenderlove has joined #ruby
MichaelSmith has joined #ruby
shock_one has joined #ruby
pontiki has joined #ruby
lxsameer has joined #ruby
mordocai has quit [Remote host closed the connection]
firstdayonthejob has joined #ruby
fostertheweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skade has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
oldbay has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
leat2 has quit [Remote host closed the connection]
pontiki has quit [Ping timeout: 246 seconds]
leat2 has joined #ruby
karapetyan has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Client Quit]
nhhagen has joined #ruby
jenrzzz has joined #ruby
bayed has joined #ruby
charliesome has joined #ruby
[1]kk has joined #ruby
Macaveli has quit [Remote host closed the connection]
shock_one has quit [Remote host closed the connection]
DoubleMalt has joined #ruby
karapetyan has quit [Remote host closed the connection]
howdoi has joined #ruby
karapetyan has joined #ruby
AlphaAtom has joined #ruby
kjones_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dgs has quit [Ping timeout: 260 seconds]
xcesariox has joined #ruby
RudestBuddhist has joined #ruby
karapetyan has quit [Ping timeout: 256 seconds]
beast has joined #ruby
GeissT has quit [Remote host closed the connection]
<RudestBuddhist> Hey Everybody, I’m trying to nest some conditionals inside of a while loop. I believe I can use a while but using do … end while <some condition> correct? For some reason I can’t reach my end code. Not sure if it’s the while that is causing me issues or my if conditions. Could someone point me in the right direction?
<RudestBuddhist> here’s my source: https://gist.github.com/DanPatey/8242c5b971429a37cab2
ICantCook has quit [Quit: Leaving]
<flughafen> RudestBuddhist: perhaps the conditionals are not in the loop, but inside you. have you tried cultivating them?
<baweaver> enough of that
<sevenseacat> RudestBuddhist: learn about methods like min, max, etc.
<flughafen> ooook
<RudestBuddhist> haha
<RudestBuddhist> I see, so I can just call the methods inside the while loop
skade has quit [Quit: Computer has gone to sleep.]
<baweaver> you won't need a while loop
shock_one has joined #ruby
bronson has joined #ruby
<sevenseacat> theres indeed no need for while loop
stan_ has joined #ruby
<sevenseacat> look into things like each as well
<RudestBuddhist> ah, I can just use those to get to the same result
<baweaver> Use map
skullcrasher has joined #ruby
<baweaver> have a sample of the json?
<RudestBuddhist> baweaver: here’s a snippet of the JSON: https://gist.github.com/DanPatey/273566c6e44f9579b613
<baweaver> going through this, first you don't need rubygems required
<baweaver> unless you're using 1.8.x for some odd reason
<baweaver> you shouldn't
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ruurd has joined #ruby
xcesariox has joined #ruby
Balzrael has joined #ruby
<RudestBuddhist> I’m using 2.0something
<RudestBuddhist> 2.0.0p481
<RudestBuddhist> I’m not using pp anymore, so I’ve removed that
jmarrec has joined #ruby
karapetyan has joined #ruby
Spami has joined #ruby
greenarrow has joined #ruby
bronson has quit [Remote host closed the connection]
n008f4g_ has joined #ruby
tejasmanohar has quit [Quit: tejasmanohar]
Rollabunna has joined #ruby
leat2 has quit [Ping timeout: 264 seconds]
<baweaver> though really you only need current time
<baweaver> so...
yfeldblum has quit [Ping timeout: 240 seconds]
<baweaver> cleaning that up a bit more
dhjondoh has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<baweaver> there we go
<RudestBuddhist> thanks
<RudestBuddhist> I have some stupid questions :)
<baweaver> you should really use Spark for this
<RudestBuddhist> er, crap I can’t see that old change
<RudestBuddhist> I was looking at mongo or kafka
<RudestBuddhist> because I think this JSON file may grow
<RudestBuddhist> but stupid question #1 in that first iteration you set @variable = variable in accessor
Rollabunna has quit [Ping timeout: 264 seconds]
<baweaver> Kafka streams data
<baweaver> Mongo is a DB
<baweaver> Spark is used to rip that data
<RudestBuddhist> ahhh I see
<RudestBuddhist> spark uses workers to split the data up?
<baweaver> yep
<baweaver> pay close attention to that JSON section
havenwood has quit [Ping timeout: 252 seconds]
zeroDivisible has quit [Ping timeout: 244 seconds]
<baweaver> Ruby will not play nicely with 100M+ log files like you're wanting.
<baweaver> You'd probably want something to rip the logs into a database as a stream whenever they come in
<baweaver> or act as a batch processing engine whenever new ones show up
<baweaver> I like Ruby, but definitely not a use case for it.
<RudestBuddhist> gotcha, I’m kind of using this project as an excuse to learn ruby
<RudestBuddhist> but maybe not the best use case for the project itself
Musashi007 has quit [Quit: Musashi007]
<baweaver> look into log parsing and searching
<baweaver> it's a broad field, and at the level of data you have, not a very friendly niche for ruby
oo_ has quit [Remote host closed the connection]
<RudestBuddhist> cool, thanks for all the help
khebbie has joined #ruby
zlogan has joined #ruby
oo_ has joined #ruby
leat2 has joined #ruby
ndrei has quit [Ping timeout: 244 seconds]
nhhagen has quit [Remote host closed the connection]
nhhagen has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
juanpablo_ has joined #ruby
vdamewood has quit [Quit: Life beckons.]
firstdayonthejob has quit [Ping timeout: 260 seconds]
Balzrael has quit [Quit: Leaving]
tenderlove has quit [Remote host closed the connection]
devoldmx has joined #ruby
<shevy> beaver blogs - progress of dam building ever since
RegulationD has joined #ruby
mike___1234 has joined #ruby
tenderlove has joined #ruby
juanpablo_ has quit [Ping timeout: 260 seconds]
timonv has quit [Ping timeout: 272 seconds]
tkuchiki has joined #ruby
lsmola has joined #ruby
casadei_ has quit [Remote host closed the connection]
lsmola has quit [Read error: Connection reset by peer]
niemcu has joined #ruby
devoldmx has quit [Ping timeout: 265 seconds]
bender_unit has quit [Quit: Textual IRC Client: www.textualapp.com]
RegulationD has quit [Ping timeout: 264 seconds]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
tenderlove has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
sevenseacat has quit [Quit: .]
felixr has joined #ruby
FalseDeal has joined #ruby
RudestBuddhist has quit [Quit: RudestBuddhist]
felixrsmith has joined #ruby
davedev24 has quit [Remote host closed the connection]
swgillespie has joined #ruby
swgillespie has quit [Client Quit]
felixr has quit [Ping timeout: 250 seconds]
<yorickpeterse> morning
<beast> mmm...it's tasty...oh it must be Ruby
howdoicomputer has joined #ruby
charliesome has joined #ruby
terlar has joined #ruby
rdark has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
FalseDeal has quit [Ping timeout: 256 seconds]
Hounddog has joined #ruby
felixrsmith has quit [Ping timeout: 250 seconds]
xnr has quit [Quit: ರ_ರ]
xnr has joined #ruby
senayar has joined #ruby
senayar has joined #ruby
lsmola has joined #ruby
Hounddog has quit [Ping timeout: 256 seconds]
tvw has quit []
larshaugseth is now known as lhz
Hounddog has joined #ruby
toertore has quit [Quit: This computer has gone to sleep]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Spami has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
felixrsmith has joined #ruby
HayesHimself has joined #ruby
dhjondoh has joined #ruby
fostertheweb has joined #ruby
dhjondoh has quit [Client Quit]
[1]kk has quit [Ping timeout: 264 seconds]
Ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
GeissT has joined #ruby
pawnbox has joined #ruby
tenderlove has joined #ruby
mikecmpbll has joined #ruby
fostertheweb has quit [Ping timeout: 264 seconds]
Ropeney has joined #ruby
felixrsmith has quit [Ping timeout: 240 seconds]
futilegames has joined #ruby
tenderlove has quit [Remote host closed the connection]
ilken has quit [Quit: YOLO]
bronson has joined #ruby
tenderlove has joined #ruby
dionysus69 has joined #ruby
alexherbo2 has quit [Ping timeout: 240 seconds]
felixrsmith has joined #ruby
bronson has quit [Ping timeout: 244 seconds]
tenderlove has quit [Ping timeout: 264 seconds]
charliesome has joined #ruby
charliesome has quit [Client Quit]
ndrei has joined #ruby
JohnBat26 has joined #ruby
tenderlove has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Zai00 has joined #ruby
k3asd` has joined #ruby
baweaver has quit [Remote host closed the connection]
<shevy> hmm
nhhagen has quit [Remote host closed the connection]
<shevy> if we have: def foo(*i)
<shevy> inside of that method, will i be always an Array?
nhhagen has joined #ruby
Kjarva has joined #ruby
naftilos76 has quit [Remote host closed the connection]
nhhagen has quit [Remote host closed the connection]
<[k-> >> def foo *i; i.class end; [foo, foo(1), foo(1,2,3)]
<ruboto> [k- # => [Array, Array, Array] (https://eval.in/431592)
ndrei has quit [Ping timeout: 260 seconds]
<zenspider> shevy: i will always be an array at the start of the method...
<zenspider> not necessarily by the end of it
<shevy> okies
bricker has quit [Ping timeout: 244 seconds]
pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
felixrsmith has quit [Ping timeout: 240 seconds]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
garethrees has joined #ruby
UtkarshRay has joined #ruby
c1v0 has joined #ruby
ndrei has joined #ruby
michael_mbp has quit [Excess Flood]
davidhq has joined #ruby
postmodern has quit [Quit: Leaving]
davidhq has quit [Read error: Connection reset by peer]
khebbie has quit [Remote host closed the connection]
davidhq has joined #ruby
pontiki has joined #ruby
michael_mbp has joined #ruby
ramfjord has quit [Ping timeout: 265 seconds]
jgt has joined #ruby
skade has joined #ruby
khebbie has joined #ruby
leafybasil has quit [Remote host closed the connection]
chthon has joined #ruby
pontiki has quit [Ping timeout: 268 seconds]
jgt has quit [Ping timeout: 240 seconds]
CustosL1men has joined #ruby
morenoh149 has quit [Ping timeout: 250 seconds]
c0m0 has joined #ruby
shock_one has quit []
bazbing80 has joined #ruby
jonr22 has joined #ruby
PINGwin4IK has joined #ruby
futilegames has quit [Quit: futilegames]
dmolina has joined #ruby
<bazbing80> hey all. If a create a class that has a | attr_reader :name | I can both read and write name to an instance of the class. same with attr_writer. I can both read and write an attribute created with attr_writer. So what's the point of attr_accessor if both attr_reader and attr_writer can both individually read and write? I mean maybe I'm wrong, this is just based in irb experimentation
nhhagen has joined #ruby
r0uder has joined #ruby
fidalgo has joined #ruby
<bazbing80> yeah I think I was mistaken, scratch that :P
r0uder has quit [Client Quit]
r0uder has joined #ruby
jonr22 has quit [Ping timeout: 246 seconds]
<bazbing80> class Gary
<bazbing80> 2.2.1 :029?> attr_reader :number
<bazbing80> 2.2.1 :030?> end
PINGwin4IK has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
nhhagen has quit [Read error: Connection reset by peer]
<bazbing80> okay, how can the number attribute be set if it can only be read? Is an internal method the only way? if I do | g = Gary.new | what are all the possible ways I can make g.number equal something other than nil?
nhhagen has joined #ruby
felixrsmith has joined #ruby
wpp has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
jas02 has quit [Ping timeout: 264 seconds]
marr has joined #ruby
leafybasil has joined #ruby
devbug has quit [Read error: Connection reset by peer]
<[k-> i count 3
VeryBewitching has quit [Quit: Konversation terminated!]
<jhass> bazbing80: if you truly never defined a writer and also didn't define an initializer that takes an argument and sets it to that: instance_variable_set(:@number, x), but that way is a hack and not what the author of the class intended
jas02 has joined #ruby
<[k-> there is also instance_eval
<[k-> and def instance.number
jas02 has quit [Read error: Connection reset by peer]
cisco has joined #ruby
felixrsmith has quit [Ping timeout: 246 seconds]
<jhass> all hacks though
nhhagen has quit [Ping timeout: 260 seconds]
cisco has quit [Max SendQ exceeded]
<[k-> and reopening the class explicitly
jgt has joined #ruby
cisco has joined #ruby
cisco has quit [Max SendQ exceeded]
cisco has joined #ruby
tenderlove has quit [Remote host closed the connection]
cisco has quit [Max SendQ exceeded]
jenrzzz has quit [Ping timeout: 244 seconds]
<bazbing80> jhass so attr_reader's only purpose is to expose the result of a class' method of the same name?
dgs has joined #ruby
jas02 has joined #ruby
dhjondoh has joined #ruby
yfeldblum has joined #ruby
<jhass> attr_reader :foo is a shortcut to defining the method def foo; @foo; end;
<jhass> @foo is called an instance variable
ruurd has quit [Quit: ZZZzzz…]
astrobunny has quit [Remote host closed the connection]
<bazbing80> jhass: ahh, now that is interesting. thanks
nhhagen has joined #ruby
astrobunny has joined #ruby
Rollabunna has joined #ruby
<[k-> it is also optimised by the interpreter and a common ruby idiom
nhhagen has quit [Remote host closed the connection]
Voker57 has joined #ruby
astrobunny has quit [Remote host closed the connection]
<bazbing80> [k-: it's more efficient than writing def foo; @foo; end ?
tenderlove has joined #ruby
suchness has joined #ruby
tenderlove has quit [Remote host closed the connection]
emilkarl has joined #ruby
tvw has joined #ruby
<jhass> probably slightly, but your motivation for using it should be having to write less code ;)
juanpablo_ has joined #ruby
<bazbing80> jhass: indeed. a balance between readability and less code anyway :P I didn't know attr_reader returned the result of an instance var i.e. the result of the attribute can be set anyway within the class (and maybe more places in hacky code)
Rollabunna has quit [Ping timeout: 265 seconds]
<[k-> yes, it is more efficient \o/
nhhagen has joined #ruby
<[k-> it's so common that it is definitely optimised for performance
<shevy> hmm
Igorshp has joined #ruby
chthon has quit [Ping timeout: 244 seconds]
ruurd has joined #ruby
<atmosx> I have to write another 10 pages
sevenseacat has joined #ruby
<atmosx> fuck
<atmosx> ops sorry
<atmosx> I'll write in the afernoon probably.
skade has joined #ruby
juanpablo_ has quit [Ping timeout: 264 seconds]
<bazbing80> atmosx I fear a mute is coming
* atmosx ducks
arup_r has quit [Remote host closed the connection]
<shevy> the word rhymes with duck
<shevy> such as luck
pawnbox_ has joined #ruby
rbowlby has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
allomov has joined #ruby
poguez_ has quit [Quit: Connection closed for inactivity]
pawnbox has quit [Ping timeout: 260 seconds]
oo_ has joined #ruby
Hounddog has quit [Remote host closed the connection]
devoldmx has joined #ruby
<emilkarl> Hi, is there a nice way to group and count a hash based on a value, like this… http://pastie.org/10411938
dumdedum has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
RegulationD has joined #ruby
ayonkhan has quit []
<[k-> >> {a: 1, b: 1, c: 2}.values.group(&:itself)
<ruboto> [k- # => undefined method `group' for [1, 1, 2]:Array (NoMethodError) ...check link for more (https://eval.in/431667)
<[k-> :(
<emilkarl> :)
<sevenseacat> did you mean group_by ?
<[k-> indeed
<emilkarl> group by the value
<sevenseacat> :)
<emilkarl> ah
vondruch has joined #ruby
Ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
<[k-> >> {a: 1, b: 1, c: 2}.values.group_by(&:itself)
<ruboto> [k- # => {1=>[1, 1], 2=>[2]} (https://eval.in/431668)
<[k-> well that looks weird, but it is somewhat correct
<emilkarl> hmm
<emilkarl> undefined method `itself' for 3:Fixnum
chthon has joined #ruby
<[k-> your ruby version is too old
<[k-> class Object; def itself; self; end end
devoldmx has quit [Ping timeout: 250 seconds]
casadei_ has joined #ruby
<jhass> >> {147=>3, 148=>3, 163=>6}.group_by(&:last).map {|k, v| [k, v.size] }.to_h
<ruboto> jhass # => {3=>2, 6=>1} (https://eval.in/431673)
<emilkarl> > > [3, 3, 6].group_by(&:itself)
<emilkarl> >> [3, 3, 6].group_by(&:itself)
<ruboto> emilkarl # => {3=>[3, 3], 6=>[6]} (https://eval.in/431674)
<emilkarl> hmm what ruby version comes itself?
<sevenseacat> a pretty recent one i think
<[k-> don't know, but you can implement it yourself
<emilkarl> fails locally.
RegulationD has quit [Ping timeout: 246 seconds]
oo_ has quit [Remote host closed the connection]
<[k-> open class Object, define itself
<sevenseacat> or just do what jhass said
Siyfion has joined #ruby
<jhass> I think itself is 2.1
<jhass> 21>> 1.itself
<ruboto> jhass # => undefined method `itself' for 1:Fixnum (NoMethodError) ...check link for more (https://eval.in/431680)
<jhass> mh, so 2.2 even
<emilkarl> yeah i have 2.1 localy
<jhass> but see above, you don't need it
oo_ has joined #ruby
<emilkarl> yes
<emilkarl> jhass: it works thanks
<emilkarl> not as nice looking
casadei_ has quit [Ping timeout: 268 seconds]
flaf has left #ruby ["WeeChat 1.0.1"]
zlogan has quit [Remote host closed the connection]
<[k-> monkey patch hash to hide it then (or not)
<jhass> how's .group_by(&:last) worse than .values.group_by(&:itself) ?
thinkswan has joined #ruby
thinkswan has quit [Client Quit]
<jhass> I mean it's even an array allocation less
AndChat|159600 has joined #ruby
<jhass> okay maybe not if you count the inner arrays but meh
<[k-> no, it's not!
allomov has quit [Remote host closed the connection]
zeroDivisible has joined #ruby
oo__ has joined #ruby
oo_ has quit [Read error: Connection reset by peer]
platzhirsch has joined #ruby
oo__ has quit [Read error: Connection reset by peer]
oo_ has joined #ruby
<bazbing80> exit
<bazbing80> epix failus
* jhass hands bazbing80 a /
Macaveli has joined #ruby
<bazbing80> jhass: thankyou kind sir xP
bazbing80 has quit [Quit: leaving]
k3asd` has quit [Ping timeout: 244 seconds]
tercenya has quit [Ping timeout: 250 seconds]
Macaveli has quit [Client Quit]
ndrei has quit [Ping timeout: 264 seconds]
arup_r has joined #ruby
ahuman_ has quit [Quit: No Ping reply in 180 seconds.]
pegasuspect has joined #ruby
ahuman has joined #ruby
<AndChat|159600> Hey guys, what options do I have for making a standalone GUI app?
erichmenge has quit [Ping timeout: 264 seconds]
herrphon has joined #ruby
herrphon has left #ruby [#ruby]
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
erichmenge has joined #ruby
khebbie has quit [Remote host closed the connection]
<nofxx> AndChat|159600, shoes, electron, qt, gtk... which OS?
<AndChat|159600> Windows, primarily
<[k-> rubytk
<[k-> wxruby
khebbie has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
<nofxx> AndChat|159600, the new kid on the block is electron, but all we said can do too.
shredding has joined #ruby
pawnbox has joined #ruby
djbkd has joined #ruby
<AndChat|159600> I'll check them out, thanks
<nofxx> AndChat|159600, except it's JS heheh... wasnt electron ruby in the beginning ? when it was only the editor? Guess I'm confusing...
<[k-> write a blog post afterwards!
<nofxx> but.. there's opal for that =D
khebbie has quit [Remote host closed the connection]
jedney has quit [Ping timeout: 240 seconds]
<nofxx> AndChat|159600, truth is, ppl use ruby for terminal and webapps... gui's are just not much used, so the libraries dont evolve
<nofxx> as web and cli ones
<AndChat|159600> That's a bummer... I love the ruby language, but sometimes one needs to build something outside the console/web scope.
<nofxx> bottomline I think is ruby is one the the most unix ratio in all langs. I mean, java, javascript 90% devs use winshit, ruby is 90% unix
djbkd has quit [Ping timeout: 255 seconds]
maciom has joined #ruby
<nofxx> by unix I'm merging linux and osx
<maciom> hi, how can I achieve sth like doube splat in ruby<2.0
<maciom> in method invocation: method(**opts)
Kallis has joined #ruby
Kallis has quit [Max SendQ exceeded]
<nofxx> maciom, opts = {} guess is the closest
khebbie has joined #ruby
ndrei has joined #ruby
chthon has quit [Ping timeout: 244 seconds]
athinggoingon has quit [Ping timeout: 246 seconds]
khebbie has quit [Remote host closed the connection]
<maciom> nofxx: in method definition?
oo_ has quit [Remote host closed the connection]
f4cl3y has quit [Remote host closed the connection]
oo_ has joined #ruby
felixrsmith has joined #ruby
<nofxx> maciom, yeah, def meth(opts = {})
roxtrongo has quit [Remote host closed the connection]
Vile` has quit [Ping timeout: 272 seconds]
<workmad3> meth(type: :blue_sky)
bootstrappm has quit [Quit: Leaving.]
dhjondoh has quit [Quit: dhjondoh]
allomov has joined #ruby
Vile` has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
chthon has joined #ruby
MichaelSmith has quit [Quit: Connection closed for inactivity]
leat2 has quit [Remote host closed the connection]
leat2 has joined #ruby
bkxd has joined #ruby
drbrain has quit [Ping timeout: 244 seconds]
garethrees has quit []
<shevy> is it LSD time again?
drbrain has joined #ruby
<Ray`> it's always LSD time
dhjondoh has joined #ruby
blt has joined #ruby
shredding has quit [Ping timeout: 240 seconds]
dhjondoh has quit [Client Quit]
Balzrael has joined #ruby
felixrsmith has quit [Ping timeout: 240 seconds]
arup_r has quit [Remote host closed the connection]
<[k-> LSD?
ponga has joined #ruby
khebbie has joined #ruby
dhjondoh has joined #ruby
DoubleMalt has joined #ruby
arup_r has joined #ruby
tercenya has joined #ruby
sdothum has joined #ruby
ndrei has joined #ruby
phutchins has joined #ruby
morenoh149 has joined #ruby
mprelude has joined #ruby
startupality has joined #ruby
devoldmx has joined #ruby
Zai00 has quit [Quit: Zai00]
dhjondoh has quit [Read error: Connection reset by peer]
dhjondoh has joined #ruby
nofxx has quit [Read error: Connection timed out]
morenoh149 has quit [Ping timeout: 244 seconds]
howdoicomputer has quit [Ping timeout: 250 seconds]
r0t13 has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
jgt has quit [Ping timeout: 268 seconds]
nofxx has joined #ruby
khebbie has quit [Remote host closed the connection]
Rollabunna has joined #ruby
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dhjondoh has quit [Quit: dhjondoh]
khebbie has joined #ruby
jedney has joined #ruby
khebbie has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
khebbie has joined #ruby
khebbie has quit [Remote host closed the connection]
shazaum_ has joined #ruby
khebbie has joined #ruby
khebbie has quit [Remote host closed the connection]
khebbie has joined #ruby
blt has quit [Quit: WeeChat 1.3]
codenapper has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<karapetyan> guys, how to understand for loop?
tcopeland has quit [Quit: Leaving.]
startupality has quit [Quit: startupality]
<sevenseacat> they must be pretty complicated if only guys can understand them.
startupality has joined #ruby
<suchness> This again?
rodfersou has joined #ruby
felixrsmith has joined #ruby
Kjarva has quit [Quit: Leaving]
eGGsha has joined #ruby
<shevy> karapetyan in ruby it may be easier to use .each, and loop {}
juanpablo_ has joined #ruby
eosinx has joined #ruby
<sevenseacat> suchness: i know, people still keep using 'guys' to refer to mixed-gendered groups :(
<shevy> I am all for calling people cats
tkuchiki has quit [Remote host closed the connection]
Rutix has joined #ruby
Rutix has quit [Changing host]
Rutix has joined #ruby
wildlander has joined #ruby
<shevy> karapetyan that one has nicer colours :) -> http://graysoftinc.com/early-steps/the-evils-of-the-for-loop
<[k-> cat: hi
<karapetyan> ah, thanks you... but now i try to describe task that i can't understand
davidhq has joined #ruby
<karapetyan> i even can imagine algorithm
<karapetyan> i spent about 4 hours and have no any results
<shevy> feels like me when writing code
<shevy> yeah, I end up watching youtube videos :(
<[k-> cat: :(
<shevy> there be no cats in singapore
juanpablo_ has quit [Ping timeout: 250 seconds]
<suchness> karapetyan: "For each item in a set of items, do this thing to that item."
<[k-> there are cats in Singapore D:<
<karapetyan> :)
krz has quit [Quit: WeeChat 1.2]
<suchness> sevenseacat: And what would you prefer?
<sevenseacat> ?guys
<ruboto> Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<suchness> Well, I don't relate to being included in y'all or everyone.
jgt has joined #ruby
<suchness> And certainly not folks.
bronson has joined #ruby
<suchness> I'll soapbox about it.
<karapetyan> sevenseacat: sorry)
<sevenseacat> suchness: ok, what would you recommend. we can update it
<sevenseacat> though I won't remove 'everyone'
jedney has quit [Quit: Leaving]
<karapetyan> do you have any ideas and can anyone help me how to solve this type of tasks?
ranchodev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> a rabbit problem
<suchness> sevenseacat: I recommend relaxing and not making a point every time someone says guys to hop on your soapbox. It's pointless and never related to the issue at hand. It's also discouraging for a person to come into IRC and instantly be called out for yet another thing.
eosinx has quit [Ping timeout: 268 seconds]
al2o3-cr has quit [Ping timeout: 268 seconds]
<sevenseacat> ok, if you don't have any constructive suggestions, not a lot I can do
<jhass> karapetyan: I have troubles relating the example to the problem, that seems to be x = 6 & n = 3?
<shevy> haha
<suchness> sevenseacat: You aren't going to change the world in an IRC chat, take your war somewhere it actually matters.
<shevy> I also have problems to relate to rabbits
bronson has quit [Ping timeout: 246 seconds]
<apeiros> suchness: why don't you take your own advice? to me it seems like you're just throwing a tantrum.
<karapetyan> shevy: what exactly? :)
<shevy> karapetyan I don't quite understand it yet but it seems as if .step could be used? if you need the rabbit to hop
<jhass> karapetyan: ah, just weirdly formatted
<suchness> apeiros: I was asked my opinion.
<shevy> the format are rabbit tracks
<shevy> *is
nhhagen has quit [Remote host closed the connection]
<apeiros> suchness: yes, after you threw a tantrum
<apeiros> which IMO just goes to show that sevenseacat is much more mindful of others than you manage to be.
<suchness> apeiros: I hardly think saying "This again?" qualifies as a tantrum.
nhhagen has joined #ruby
<karapetyan> shevy: jhass i need to know count of every possible unique rabbits routes going to top
<jhass> karapetyan: so to rephrase the problem a bit more formal: in how many ways do to the numbers from 1 to n add up to x.
felixrsmith has quit [Ping timeout: 240 seconds]
<apeiros> suchness: I do. and even more so in the collective.
<shevy> this is why nobody likes rabbits
<karapetyan> jhass: seems i have bad explanation :(
<karapetyan> give me a second
<[k-> ?ot suchness apeiros
<ruboto> suchness, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
<shevy> what determines "N - number of steps that rabbit can jump at one time"?
<shevy> ah
<shevy> you want it to be 1, then 2, then 3 etc... ?
Spami has joined #ruby
<karapetyan> yes. all possible options
<karapetyan> 1 + 1
<karapetyan> 1 + 2
<karapetyan> 2 + 1
<karapetyan> 1 + 1 + 1 + 1
<shevy> yeah so you have to find the algorithm that will scale towards all steps
<karapetyan> 1 + 1 + 1 + 2; 1 + 1 + 2 + 1; 1 + 2 + 1 + 1; 2 + 1 + 1 + 1 +
nofxx has quit [Ping timeout: 244 seconds]
<shevy> that actually is not that trivial is it?
stamina has joined #ruby
<[k-> O(e^n) :O
<karapetyan> shevy: yes, i fell that i am dumb.
<[k-> (im kidding)
<karapetyan> i dan't want get some code from you
<karapetyan> shevy: ^^
<shevy> it seems as if the problem would start from the maximum amount of steps, down to 1
<shevy> 1 + 2 is the same solution as 2 + 1, just the position is different
casadei_ has joined #ruby
<karapetyan> shevy: yes, i can. But what difference? )
chills42 has joined #ruby
<jhass> karapetyan: for x = 6, n = 3, isn't 1 + 1 + 2 + 2 a valid route too?
pegasuspect has quit [Quit: pegasuspect]
<jhass> and its permutations
<karapetyan> jhass: yes, it valid too
<jhass> so your example is missing a couple of routes and it's more than 14, no?
<karapetyan> jhass: yes, sorry
casadei_ has quit [Ping timeout: 244 seconds]
<karapetyan> jhass: could you recommend what should i do to be able solve tasks like this?
felixrsmith has joined #ruby
<karapetyan> jhass: cause now i feel that i cant even understand how to build algorithm for this task
<jhass> so a naive approach could be to list all repeated permutations of the numbers in [1, n], then filter out those that don't add up to x
<jhass> check Array, it has a couple of helpers to get combinations and permutations
<[k-> so what would be the non naive approach?
<jhass> math :P
doddok has joined #ruby
bluOxigen has joined #ruby
<[k-> i thought you would have something D:
<jhass> no, I suck at math
blueOxigen has quit [Ping timeout: 265 seconds]
<jhass> I say naive because it blows up at x = 17, n = 5 already
FernandoBasso has joined #ruby
tsou has quit [Quit: off]
<[k-> hehe now my getNextFreeSquare algorithm works correctly as it brute forces, and cannot handle outputs > 50
<karapetyan> jhass: can i be RoR developer don't knowing math at level that requires this task?
<[k-> inputs*
<karapetyan> jhass: cause i suck at math much more than you
<jhass> karapetyan: probably, depends a bit on the kind of tasks you'll need to tackle
<jhass> some statistics knowledge is certainly useful for a lot of backend work
pqowiu has joined #ruby
pqowiu has quit [Client Quit]
<karapetyan> yep feel that to be software developer you should be a great in math
<jhass> that's not true
RegulationD has joined #ruby
<jhass> there's lots of work that doesn't require it at all
syath has joined #ruby
<zenspider> not in the slightest.
<zenspider> mathematical thinking is helpful, but not math
bruno- has joined #ruby
emilkarl has quit [Quit: emilkarl]
<zenspider> symbolic manipulation and algebraic refactorings
atomical has joined #ruby
atomical has quit [Read error: Connection reset by peer]
<karapetyan> you know that fucking power of programming know how many routes rabbit have. Cause it's too hard to count in mind
<[k-> referential transparency!
rubie has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 244 seconds]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
<shevy> [k- doesn't haskell have a trivial way to solve the rabbit problem?
bruno- has quit [Ping timeout: 246 seconds]
<jhass> karapetyan: the rabbit is just a way to phrase the problem. If you google for a more abstract definition... ;)
ldnunes has joined #ruby
but3k4 has joined #ruby
<[k-> i have no idea what the problem is about
<[k-> and i definitely don't know how to solve it
y0da has joined #ruby
dgs has quit [Quit: dgs]
but3k4 has quit [Read error: Connection reset by peer]
zenguy_pc has quit [Read error: Connection reset by peer]
Zai00 has joined #ruby
leat2 has quit [Remote host closed the connection]
GeissT has quit [Quit: Bye!]
leat2 has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
emilkarl has joined #ruby
Spami_ has joined #ruby
jonr22 has joined #ruby
atomical has joined #ruby
Spami has quit [Ping timeout: 250 seconds]
<shevy> kill that rabbit
howdoicomputer has joined #ruby
<shevy> karapetyan can you solve it when the rabbit can do only 2 or 1 jumps?
bruno- has joined #ruby
<karapetyan> shevy: in mind? or in ruby ?
<karapetyan> shevy: if there only 1 jump then nothing to solve
<shevy> yeah for 2, in ruby
<karapetyan> shevy: it always be 1 + 1 (n times)
<karapetyan> shevy: give me a second)
startupality has quit [Quit: startupality]
pegasuspect has joined #ruby
Spami_ has quit [Ping timeout: 244 seconds]
jonr22 has quit [Ping timeout: 246 seconds]
dgutierrez1287 has joined #ruby
<[k-> karapetyan has been closing a lot of things
bruno- has quit [Ping timeout: 246 seconds]
Spami has joined #ruby
bruno- has joined #ruby
felixrsmith has quit [Ping timeout: 240 seconds]
wpp has quit []
<[k-> )))))))))))))))))))(
greenarrow has quit [Quit: 500]
wpp has joined #ruby
raypulver has left #ruby [#ruby]
zenguy_pc has joined #ruby
yfeldblum has quit [Ping timeout: 244 seconds]
<karapetyan> [k-: ?
<karapetyan> shevy: thank you! it's a good question and i glad to work on it!)))
startupality has joined #ruby
bruno- has quit [Ping timeout: 265 seconds]
startupality has quit [Client Quit]
<[k-> he closed more yet again :o
bruno- has joined #ruby
dmolina has quit [Quit: Leaving.]
<shevy> what's with the lisp here
<[k-> {[(‹«<≤≥>»›)]}
big|bad|wolf has joined #ruby
Macaveli has joined #ruby
futilegames has joined #ruby
<shevy> on windows
sankaber has joined #ruby
<[k-> \open\door
bruno- has quit [Ping timeout: 244 seconds]
krisquigley has quit [Remote host closed the connection]
<shevy> lol
krisquigley has joined #ruby
jenrzzz has joined #ruby
banister has quit [Ping timeout: 240 seconds]
maciom has quit [Quit: Page closed]
chills42 has quit [Remote host closed the connection]
futilegames has quit [Quit: futilegames]
chills42 has joined #ruby
greenarrow has joined #ruby
morenoh149 has joined #ruby
jcoe has joined #ruby
krisquigley has quit [Ping timeout: 246 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
startupality has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
rbennacer has joined #ruby
shazaum_ has quit [Quit: This computer has gone to sleep]
Quandl has joined #ruby
<shevy> aha! unicode!
<shevy> How many character positions should each Unicode character occupy in a monospace font?
morenoh149 has quit [Ping timeout: 255 seconds]
<karapetyan> shevy: yes i can! :))
<karapetyan> shevy: almost done)
Soda has joined #ruby
<shevy> you do indeed used a lot of )
<shevy> so [k- was actually right
<shevy> do you use some cyrilic keyboard or something?
startupality has quit [Client Quit]
startupality has joined #ruby
devoldmx has joined #ruby
Quandl has quit [Client Quit]
Spami has quit [Quit: This computer has gone to sleep]
meatherly has joined #ruby
<[k-> .
Spami has joined #ruby
<[k-> > [k- was actually...
<[k-> :(
Spami has quit [Remote host closed the connection]
felixrsmith has joined #ruby
TvL2386 has joined #ruby
linuxboytoo has joined #ruby
Guest40644 has joined #ruby
felixrsmith has quit [Client Quit]
devoldmx has quit [Ping timeout: 264 seconds]
<shevy> I seem to remember having had seen that before by some russian programmer here on #ruby... AlexRussia or so
Coldblackice has quit [Ping timeout: 265 seconds]
robbyoconnor has quit [Ping timeout: 256 seconds]
djbkd has joined #ruby
big|bad|wolf has quit [Ping timeout: 246 seconds]
garethrees has joined #ruby
khebbie has quit [Remote host closed the connection]
bmurt has joined #ruby
Guest40644 has quit [Quit: Linkinus - http://linkinus.com]
garethrees has quit [Client Quit]
djbkd has quit [Ping timeout: 244 seconds]
leat2 has quit [Remote host closed the connection]
bmurt has quit [Ping timeout: 246 seconds]
khebbie has joined #ruby
<bhaak> shevy: that depends on the unicode character in question :)
ishahnaz has joined #ruby
<karapetyan> if i have recursive function how to define variable to store results?
aaronmcadam has joined #ruby
<karapetyan> should it be class variable / global / or instacne ?
y0da has quit [Ping timeout: 264 seconds]
<shevy> karapetyan several ways, you can use @ivar
<shevy> well, if you already use a class, then an @ivar would make most sense
<karapetyan> shevy: in this case i have error..
<suchness> karapetyan: It depends, oftentimes it's the argument to the function
<shevy> then you are doing something wrong :)
<shevy> but you could also show the error
ndrei has quit [Ping timeout: 255 seconds]
Alina-malina has quit [Quit: Leaving]
ndrei has joined #ruby
<karapetyan> home_work:35:in `block in options': undefined method `+' for nil:NilClass (NoMethodError)
<[k-> class ivars are different from instance ivars
centrx has joined #ruby
tcopeland has joined #ruby
<[k-> yorickpeterse and apeiros would be keen to tell you more, unlike me
<karapetyan> k
<karapetyan> ok sorry
MatthewRock has joined #ruby
Soda has quit [Remote host closed the connection]
but3k4 has joined #ruby
<[k-> do you know how to solve the error now?
<MatthewRock> Hey Ruby guys. I want to call grep from Ruby. I'm doing so using backticks: `echo #{string} | grep -P regex`. However, I get some errors, depending on regex, which aren't showing up in grep called from command line.
<MatthewRock> I've asked the question on StackExchange, so detailed problem explanation would be here: http://stackoverflow.com/questions/32521718/grep-in-ruby-recursive-call-could-loop-indefinitely
<MatthewRock> I guess that's Ruby's thing, since command line works fine. How can I fix it?
<MatthewRock> Example error: "grep: unmatched parentheses"
* yorickpeterse slaps [k- a few times
<karapetyan> ok, seems it works now
<karapetyan> shevy: could you check it?
<[k-> do you need to absolutely use grep?
c1v0 has quit []
<shevy> karapetyan youc an save on gist with a .rb file end
<shevy> then you get colour highlighting for free
<[k-> class vars arent the same as class ivars or ivars
<shevy> btw karapetyan
<shevy> didn't we talk about this yesterday
<shevy> again you don't use "def initialize"
cball has quit [Quit: Leaving]
jgpawletko has joined #ruby
<[k-> cvars != civars != ivars
Trieste has quit [Ping timeout: 264 seconds]
<shevy> so today's lesson is - use def initialize! most classes will make good use of that method
<karapetyan> shevy: yes, we did, but i trying to focus on things that i can't understand.
krisquigley has joined #ruby
<karapetyan> i fix it today :) sorry
<shevy> yeah but you keep on dragging old stuff with ya :)
<shevy> see that again: check = Rabbit.new; check.read
ndrei has quit [Ping timeout: 244 seconds]
<shevy> check.read is unnecessary
<shevy> in some months you won't be able to remember which method to use
<shevy> but .new will work on your classes
<[k-> :/
<karapetyan> shevy: understand. thats easy. i can clean up this all. This is important but not critical. Critical is to be a dumb in algorithms
meatherly has quit []
<karapetyan> that i trying to fix, not so successful, as i understand )
ndrei has joined #ruby
elperdut has joined #ruby
<shevy> nah
<shevy> fix the small things
pegasuspect has quit [Quit: pegasuspect]
<shevy> else you repeat them
<[k-> do not use cvarsssss
meatherly has joined #ruby
nhhagen has quit [Remote host closed the connection]
<[k-> you shouldn't need to save outputs of recursion to a variable at an intermediate step
<karapetyan> shevy: ok
<[k-> only when it's done
cball has joined #ruby
<karapetyan> [k-: me?
leat2 has joined #ruby
juanpablo_ has joined #ruby
<[k-> yes
<[k-> because your result will definitely screw up if you call the method several times
meatherly has quit [Client Quit]
s00pcan has quit [Ping timeout: 240 seconds]
allomov has quit [Remote host closed the connection]
<[k-> use an accumulating argument
<[k-> def options(max_jump, previous_result)
<[k-> then when you call options again in options: options(max_jump, previous_result + 1)
s00pcan has joined #ruby
<[k-> if jump != 2, return previous_result
tk__ has joined #ruby
juanpablo_ has quit [Ping timeout: 256 seconds]
davedev24 has joined #ruby
karapetyan has quit [Remote host closed the connection]
<[k-> do you understand?
last_staff has quit [Quit: last_staff]
meatherly has joined #ruby
<shevy> now he is gone
devoldmx has joined #ruby
anisha has quit [Quit: Leaving]
victortyau has joined #ruby
MatthewRock has quit [Quit: Page closed]
<[k-> :(
Hobbyboy has quit [Ping timeout: 250 seconds]
<n1lo> What class Module end does ?
leat2 has quit [Ping timeout: 264 seconds]
<n1lo> I mean, creating a class to subscribe Module.
<shevy> nah
<shevy> >> class Module; end
<ruboto> shevy # => nil (https://eval.in/431808)
<shevy> ah
workmad3 has joined #ruby
<shevy> you can extend it n1lo
arup_r has quit [Remote host closed the connection]
emilkarl has quit [Quit: emilkarl]
St1gma has joined #ruby
<[k-> Module is already a class used by Ruby
<[k-> you shouldnt name your class Module
iateadonut has left #ruby [#ruby]
rbennacer has quit [Remote host closed the connection]
hashrocket has quit [Quit: Connection closed for inactivity]
pegasuspect has joined #ruby
allomov has joined #ruby
Igorshp has quit [Remote host closed the connection]
sevenseacat has quit [Quit: .]
mary5030 has joined #ruby
usse has joined #ruby
<[k-> does it run?
<shevy> n1lo that will add the method f() to class Module - it already exists by default
devoldmx has quit [Ping timeout: 246 seconds]
dgutierrez1287 has quit [Remote host closed the connection]
usse has quit [Client Quit]
lkba_ has quit [Ping timeout: 250 seconds]
Igorshp has joined #ruby
<n1lo> [k-, yes.
<shevy> \o/
casadei_ has joined #ruby
lxsameer has quit [Quit: Leaving]
rbennacer has joined #ruby
Hobbyboy has joined #ruby
<[k-> ok, what it will do is create 2 methods
<n1lo> [k-, hm
<[k-> one is just an alias of another
<[k-> _method and method
<tbuehlmann> when having a convenience class method that prepares/parses input before calling the constructor, which one would you prefer? 1: Something.from(json_string) or 2: Something.from_json(json_string)
<[k-> upon calling the method, it will create a cache and store the result of the method being called with its arguments
AndChat|159600 has quit [Quit: Bye]
<[k-> this is called a lookup table i presume
<[k-> it caches the results of an expensive method so that it does not need to reperform the method many times
casadei_ has quit [Ping timeout: 265 seconds]
sgambino has joined #ruby
<[k-> hence, it is an optimisation technique to make things run faster
prambaud_ has joined #ruby
<shevy> tbuehlmann second would be more explicit
Igorshp has quit [Remote host closed the connection]
<shevy> first one would be shorter
charliesome has joined #ruby
<shevy> :)
mary5030 has quit [Remote host closed the connection]
<[k-> the second one is better, probably
mary5030 has joined #ruby
<[k-> n1lo, sorry it doesnt create two methods
<tbuehlmann> let's say there's no chance of adding another method like from_xml
<shevy> yeah
<shevy> second variant
<[k-> n1lo it takes an existing method and "makes a backup for it"
<shevy> how often do you have to type it?
<tbuehlmann> saying the method "from" makes no sense on its own, I'd argue that knowing about the method name alone doesn't happen. params are part of the signature, so you have to know them as well
<[k-> n1lo: then it redefines the existing method to become a cache/a pure function
<[k-> so, if you have a method foo, it creates _foo, which does the same as foo
CustosLimen has quit [Ping timeout: 244 seconds]
<tbuehlmann> shevy, mh, it's not about writing but reading. how would you read "Something.from(json_string)" and how would you read "Something.from_json(json_string)"?
<[k-> n1lo: and then it redefines foo as a cache
rdark has quit [Remote host closed the connection]
bruno- has joined #ruby
<n1lo> [k-, hm
<[k-> Something.from(some_string_that_can_take_any_name_the_dev_wants)
Freijo has joined #ruby
nhhagen has joined #ruby
<tbuehlmann> [k-, yeah, that's a good point
<shevy> well I would not use a variable called json_string probably
<niemcu> consider reading someone else's code, I would prefer to see from_json cause it doesnt make me think what would be in that parameter
<jhass> tbuehlmann: your variables shouldn't describe your data type but what the data represents, so I'd argue specifying the data type in the method name makes sense. Something.from_json(serialized_something)
<shevy> niemcu yeah
mary5030 has quit [Ping timeout: 244 seconds]
<[k-> n1lo: when you call foo(a,b,c), if you did not call it before, it will call _foo(a,b,c) and store the result
tkuchiki has joined #ruby
<[k-> n1lo: afterwards, when you call foo(a,b,c) again, it does not need to call _foo, it just takes it from the hash, which is a zillion times faster
<tbuehlmann> all very good arguments
<jhass> tbuehlmann: though following that line of thought one could also argue that if there's only one serialization format for Something, Something.deserialize(json) could make sense too
<tbuehlmann> I like the signature argument, too, but I think this is something for a perfect world
<shevy> :D
<shevy> we did progress a lot in this discussion
<[k-> n1lo: of course, if you call it with foo(a,b,d) it will have to call _foo(a,b,d) again and the process repeats for all different kinds of arguments
<shevy> by showing that both options are good!
rdark has joined #ruby
<tbuehlmann> jhass, yeah, that's the from_xml thing I mentioned. let's say it's just this one method
aaronmcadam has quit [Quit: Leaving...]
<n1lo> [k-, How I call foo(a,b,c) using it ?
bruno- has quit [Ping timeout: 240 seconds]
<jhass> I guess what I'd miss with just "from" is that the method does something but from doesn't describe (accurately enough) what it does
<[k-> n1lo, when you call f(:foo), you must already have a method called foo
<[k-> so, you can just call foo
gambl0re has quit [Ping timeout: 264 seconds]
jonr22 has joined #ruby
jonr22 has quit [Remote host closed the connection]
<jhass> another argument I could come up with is that the json stdlib adds to_json, so from_json gives nice symmetry
jonr22 has joined #ruby
<tbuehlmann> yup
<tbuehlmann> being explicit here makes sense, will go with that
tkuchiki has quit [Remote host closed the connection]
<[k-> CSV.from(xml)
<sonOfRa> In the C Extension API, I can use Check_Type to raise an exception if the type doesn't match. Is there also a version that just returns false if the type doesn't match?
jonr22 has quit [Client Quit]
khebbie_ has joined #ruby
dblessing has joined #ruby
<jhass> http://rxr.whitequark.org/mri/source/error.c#442 so TYPE(x) == type I guess?
<sonOfRa> ah, the TYPE macro
<sonOfRa> just found it at the same time \o/
hoov has joined #ruby
<shevy> lots of C hackers active lately \o/
g3funk is now known as braidn
khebbie has quit [Ping timeout: 268 seconds]
CustosLimen has joined #ruby
nettoweb has joined #ruby
RegulationD has joined #ruby
khebbie_ has quit [Ping timeout: 268 seconds]
<sonOfRa> need to add some functionality to the rkerberos gem, or invoke the kerberos shell utilities
voltalio has joined #ruby
<sonOfRa> I don't like invoking shell utilities in web applications.
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
Zai00 has quit [Ping timeout: 246 seconds]
sharkman has joined #ruby
<sharkman> will the regex (.*) match breaklines?
workmad3 has quit [Ping timeout: 244 seconds]
RegulationD has quit [Ping timeout: 246 seconds]
malconis has joined #ruby
<apeiros> sharkman: only with the m flag
malconis has quit [Remote host closed the connection]
<apeiros> also \n is "newline", not breakline ;-)
<sharkman> :)
<sharkman> what is \r ?
<apeiros> carriage return
<sharkman> whats the difference between \r and \n
fxn has quit [Quit: bye]
malconis has joined #ruby
hinbody has joined #ruby
<apeiros> the same as the difference between "a" and "b" - they're different characters.
Zai00 has joined #ruby
<sharkman> but arent they HTML code that both start a new line?
Igorshp has joined #ruby
dopie has quit [Ping timeout: 268 seconds]
<apeiros> o0
<[k-> no
nettoweb has quit [Ping timeout: 265 seconds]
<apeiros> they both are whitespace. whitespace does not matter in html
<[k-> that is <br>
<[k-> apeiros did you go for tea?
TvL2386 has quit [Remote host closed the connection]
<apeiros> no. why?
chouhoulis has quit [Remote host closed the connection]
ruby-lang788 has joined #ruby
<sharkman> ohh, i see, you mean both \r and \n are used for formatting the code, but it wont affect the output on browsers?
ruby-lang788 has quit [Client Quit]
<shevy> hmmm... 2 hours in the rewrite... I suddenly realize that the error I had was due to the main regex not handling one corner case properly...
<apeiros> sharkman: yes. both affect the output the same as an ordinary space does.
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
ericfournier2 has joined #ruby
jmarrec has quit [Quit: Leaving]
leat2 has joined #ruby
<apeiros> sharkman: of course, assuming you don't have white-space: pre
<ericfournier2> Hi! Ruby is baffling me this morning. I'm trying to get the minimum of two numbers, but I'm getting a "comparison of Fixnum with nil failed". I've simplified my statement to:"run_length = ((1 > 12) ? 1 : 12)", and I'm still getting that error. I have no idea what is "nil" in that statement.
dumdedum has quit [Quit: foo]
<apeiros> >> run_length = ((1 > 12) ? 1 : 12)
<ruboto> apeiros # => 12 (https://eval.in/431828)
<apeiros> ericfournier2: runs fine. are you sure that's the code where you can still reproduce the problem?
NeverDie has joined #ruby
<shevy> hehe
jcoe has joined #ruby
<shevy> double baffle!
wpp has quit [Quit: ZZZzzz…]
<ericfournier2> Well, it's the statement returning the error. It's inside an action controller object, but I don't think that should have an impact.
<jhass> it might very well be the wrong line you're looking at
havenwood has joined #ruby
<jhass> "controller object" sounds like rails, are you looking at the full trace?
ishahnaz has quit [Read error: Connection reset by peer]
renanoronfle has quit [Ping timeout: 272 seconds]
whippythellama has joined #ruby
<ericfournier2> Yeah, itS' rails. I'm looking at the trace, and it's throwing at the "each" in "min", which I removed from the code 20 minutes ago. Seems like I have some sort of caching problem after all.
<[k-> apeiros: you were gone for so looooong
<apeiros> [k-: that happens sometimes
<ericfournier2> Ah, if I remove the line entirely, it still crash and burn.
freezevee has joined #ruby
Igorshp has quit [Remote host closed the connection]
dc has joined #ruby
<freezevee> How can I reverse the order of a hash @hash = {0=>"a", 2=>"b", 3=>"c", 4=>"d", 5=>"e"} to become {0=>"e", 2=>"d".... etc ?
<freezevee> the order of values of a hash
<apeiros> freezevee: hash.to_a.reverse.to_h
<jhass> freezevee: looks like you actually want an array with nil elements
<apeiros> oh, the values. well, sort_by(&:last) instead of .sort then.
<freezevee> apeiros: so you first convert it to an array
<freezevee> let me try it
arup_r has joined #ruby
Igorshp has joined #ruby
lavros has joined #ruby
<freezevee> apeiros: it becomes {5=>"e", 4=>"d", 3=>"c", 2=>"b", 0=>"a"}
<apeiros> if it's reversing, yes. if it's sorting, then you don't need to.
<freezevee> I don't know how to describe it
<freezevee> swapping ?
<jhass> ?xy freezevee
<ruboto> freezevee, it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
<jhass> big one, I bet
dc has quit [Client Quit]
<apeiros> freezevee: oh, I should have read your example. your example does not really match your question.
arup_r has quit [Remote host closed the connection]
juanpablo_ has joined #ruby
dumdedum has joined #ruby
<apeiros> (actually there's now 3 contradicting descriptions of your problem)
<[k-> &ri Hash#invert
<freezevee> apeiros: {0=>"a", 2=>"b", 3=>"c", 4=>"d", 5=>"e"} to {0=>"e", 2=>"d", 3=>"c", 4=>"b", 5=>"a"}
<jhass> [k- read it neither
<apeiros> freezevee: why do you use a hash?
<freezevee> why not ?
<apeiros> freezevee: this looks like a hash used as an array
bigbadbear has joined #ruby
<jhass> freezevee: but why the hell would you need that?
<freezevee> no idea
<freezevee> experimenting
<freezevee> should I use an array ?
<jhass> yes, like I said initially
<freezevee> .invert will work like that then ?
<jhass> what? no
<[k-> no
<jhass> [k- just understood your problem even less
<yxhuvud> for arrays, then #reverse would be the method to use.
<[k-> indeed
<freezevee> let's say you have a = [1,2,3,4,5]
<freezevee> a[0] = 1
<suchness> ==
<freezevee> reverse will reverse the array to [5,4,3,2,1]
<[k-> that's a wasted computation
<freezevee> so a[0] = 5
<freezevee> it makes sense
<suchness> ==
tjohnson has joined #ruby
<freezevee> I am such an idiot
<freezevee> thanks guys
Gnomethrower has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> suchness: you should look away
<apeiros> ?guys freezevee
<ruboto> freezevee, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<freezevee> haha
<freezevee> thanks friends !
<apeiros> you're welcome :)
<apeiros> even if I still don't know what you're actually trying to solve ;-)
arup_r has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Gnomethrower has joined #ruby
<freezevee> apeiros: an array of arrays
juanpablo_ has quit [Ping timeout: 244 seconds]
<[k-> a table?
<freezevee> yes
pegasuspect has quit [Quit: pegasuspect]
<[k-> an associative array?
dopamean_ has quit [Ping timeout: 252 seconds]
<jhass> freezevee: that's still implementation/solution, not a problem description ;)
karapetyan has joined #ruby
<freezevee> to be honest I don't want the solution
<freezevee> I want to find it myself :P
Gnomethrower has quit [Read error: Connection reset by peer]
<freezevee> I know you always help but... I am denying it this time
leat2 has quit [Ping timeout: 272 seconds]
<[k-> > jhass always help
<freezevee> I am trying to use a hash as an array with no reason, that's a great help
<[k-> hehehehehehehe
<freezevee> :)
rippa has joined #ruby
<adaedra> jhass, channel's most valuable
jas02 has quit [Quit: jas02]
<[k-> indeed, a hash is not suitable for a table
<apeiros> depends.
bmurt has joined #ruby
tagrudev has quit [Remote host closed the connection]
<adaedra> > use a hash as an array
<adaedra> I smell PHP
casadei_ has joined #ruby
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k-> adaedra: that's a set!
karapetyan has quit [Ping timeout: 265 seconds]
<adaedra> game, set, match
<[k-> no, set really does this
hoylemd has joined #ruby
<shevy> good old php
<adaedra> we have to go higher
<adaedra> and be upset
* adaedra leaves
<sharkman> is anyone else cold
<adaedra> COLD!?
<[k-> the world is on fire
soc42 has joined #ruby
gamename has joined #ruby
<hoylemd> Best practices question: what's the accepted way to encode large-ish(> 10 lines, nicely formatted) data structures into a method? Rubocop likes to complain if any method is larger than 10 lines.
<jhass> >> require "set"; Set.new([1, 2, 3])[0] # not sure I'd call this array still if that property is lost [k-
<ruboto> jhass # => undefined method `[]' for #<Set: {1, 2, 3}> (NoMethodError) ...check link for more (https://eval.in/431833)
<sharkman> im in starbucks i am in patns and a sweatshirt and im about to get hypothermia
<suchness> hoylemd: Aside from refactoring into smaller methods? Or perhaps implementing a class?
renanoronfle has joined #ruby
<apeiros> hoylemd: no silver bullets. hence there's no answer to that generic question.
solocshaw has joined #ruby
<adaedra> I had to get outside, oh god
<[k-> why is a datastructure a method
Gnomethrower has joined #ruby
solocshaw has quit [Remote host closed the connection]
pegasuspect has joined #ruby
<[k-> a bird pooped on adaedra's windoe
solocshaw has joined #ruby
<hoylemd> suchness: The smallest method I could refactor into would still just return the entire data structure though, so if I have a data structure that has > 10 members, there'll be no way to create it in a method without ging over that limit.
pegasuspect has quit [Client Quit]
<adaedra> [k-: did you mean: window
<[k-> Y
<suchness> hoylemd: May I look at your method, on pastie.org perhaps?
<hoylemd> A class might work, but The data structures are created as dictionaries so they can be easily json-ified
<[k-> now what will you do adaedra?
<adaedra> And no, windows are clean
<adaedra> I'm eating ice cream
<[k-> why did you go outside then?
<hoylemd> suchness: I can't show you the one I'm working on verbatim, but I'll whip up an anaolgous example (if I can do that before a meeting :/)
<[k-> to get icecream?
<shevy> he was in need of a baguette
soc42 has quit [Remote host closed the connection]
<suchness> hoylemd: That's fine, just replace anything sensitive, I'll still understand it.
<hoylemd> aw damn. Meeting is now. I'll ask again later
<[k-> abyss went for a meeting and never came back
<adaedra> [k-: got things to do
benaiah has quit [Ping timeout: 252 seconds]
<[k-> why do programmers have so many meetings @.@
chills42 has quit [Remote host closed the connection]
mary5030 has joined #ruby
<shevy> because they receive their instructions that way
<adaedra> Emulation of social activities.
<shevy> and to give fancy presentations
benaiah has joined #ruby
<shevy> [k- you will have to do this as well eventually
<shevy> hah
<shevy> eat donuts
<[k-> ?donut
<ruboto> I don't know anything about donut
<[k-> :(
<[k-> ?doughnut
<ruboto> I don't know anything about doughnut
<[k-> i'll just settle for a cake then
<[k-> ?cake
<ruboto> here's your cake:
Swappticon has joined #ruby
Eddieh_ has joined #ruby
livathinos has joined #ruby
<shevy> we need to add more food factoids to ruboto
juanpablo_ has joined #ruby
Swappticon has quit [Client Quit]
casadei_ has quit [Remote host closed the connection]
Swappticon has joined #ruby
freezevee has quit [Remote host closed the connection]
pegasuspect has joined #ruby
pegasuspect has quit [Client Quit]
jamo_ has joined #ruby
Kricir has joined #ruby
bruno- has joined #ruby
tomchapin has joined #ruby
<adaedra> I think apeiros has to deploy the dynamic list also
dionysus69 has quit [Quit: dionysus69]
<[k-> we should create a list of things
bruno- has quit [Ping timeout: 240 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
umgrosscol has joined #ruby
Soda has joined #ruby
bruno- has joined #ruby
banister has joined #ruby
* adaedra puts [k- on the list
tk__ has quit [Quit: ばいばい]
mary5030 has quit [Remote host closed the connection]
solocshaw1 has joined #ruby
<shevy> trapping [k-
mary5030 has joined #ruby
solocshaw has quit [Ping timeout: 244 seconds]
solocshaw1 is now known as solocshaw
n008f4g_ has quit [Ping timeout: 240 seconds]
dopamean_ has joined #ruby
wpp has joined #ruby
mercerist has joined #ruby
dmolina has joined #ruby
bruno- has quit [Ping timeout: 265 seconds]
Evan_ has quit [Ping timeout: 264 seconds]
bruno- has joined #ruby
Guest68297 is now known as `derpy
tkuchiki has joined #ruby
Evan_ has joined #ruby
wpp has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby
bruno- has quit [Ping timeout: 255 seconds]
momomomomo has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
tkuchiki has quit [Ping timeout: 240 seconds]
dumdedum has quit [Quit: foo]
khebbie has joined #ruby
pawnbox has quit [Remote host closed the connection]
mercerist has quit [Quit: Computer has gone to sleep.]
hanmac has quit [Ping timeout: 246 seconds]
arup_r has quit []
ckinniburgh has joined #ruby
I has joined #ruby
I is now known as Guest33856
bruno- has joined #ruby
r0t13 has left #ruby ["Leaving"]
bruno- is now known as Guest33412
nettsundere has joined #ruby
khebbie has quit [Ping timeout: 268 seconds]
jcoe has joined #ruby
Guest33412 has quit [Ping timeout: 250 seconds]
Mives has joined #ruby
bigbadbear has quit [Ping timeout: 256 seconds]
linuxboytoo has quit [Remote host closed the connection]
chills42 has joined #ruby
<sharkman> i have a question if someone could help me on about scraping. i need to scrape play by play data for football games from espn
linuxboytoo has joined #ruby
<sharkman> when a game is done, my browser has all the play details in html code. http://espn.go.com/college-football/playbyplay?gameId=400763599
<sharkman> but when a game is in progress, espn puts all the play by play info in a JSON variable, espn.gamepackage.data
<sharkman> im wondering if there is a way to retrieve this JSON variable even when a game ends? to put a request through and force them to give it to me?
nhhagen_ has joined #ruby
<n1lo> How can I get the string value inside String class ?
Oka has joined #ruby
RegulationD has joined #ruby
<[k-> the string value inside the string class is a string
<centrx> n1lo, self ?
hanmac has joined #ruby
niemcu has quit [Ping timeout: 268 seconds]
dfockler has joined #ruby
<suchness> sharkman: Seems like a question better suited to espn.
<n1lo> centrx, yeah. +_+
<sharkman> yes it is. but you guys are what im left with
<suchness> sharkman: Alright, let me just quickly reference my espn manual.
jxv has joined #ruby
nhhagen has quit [Ping timeout: 252 seconds]
khebbie has joined #ruby
<suchness> sharkman: Nothing, drat.
<sharkman> lol youre funny suchness
<suchness> sharkman: What kind of answer did you expect?
beast has quit [Quit: Leaving]
oldbay has joined #ruby
<sharkman> maybe the variable is accessible through some javascript magic
<suchness> sharkman: Maybe, but you've offered absolutely no resources, no examples, nothing. No one here is going to charge out and figure out a niche question better suited to ESPN.
beast has joined #ruby
dgutierrez1287 has joined #ruby
<sharkman> you are answering for other people
<[k-> ?ot sharkman
<ruboto> sharkman, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
<apeiros> I don't think sharkman's question was offtopic
<apeiros> but I also think suchness' assessment is right on
dfockler has quit [Ping timeout: 265 seconds]
<adaedra> much topic
<adaedra> such ness
<adaedra> wow
<apeiros> lol
<apeiros> dogedra
<[k-> very wow*
adaedra is now known as dogedra
ndrei has quit [Ping timeout: 244 seconds]
<[k-> do you have the k factor?
<dogedra> this is my life now
<dogedra> many woof
bigbadbear has joined #ruby
polishdub has joined #ruby
<[k-> RFC444 defines many as more than or equal to 4
nhhagen_ has quit [Ping timeout: 268 seconds]
aganov has quit [Remote host closed the connection]
Mives has quit [Ping timeout: 246 seconds]
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
bootstrappm has joined #ruby
podman has joined #ruby
pegasuspect has joined #ruby
dfockler has joined #ruby
bootstrappm has quit [Client Quit]
khebbie has quit [Remote host closed the connection]
Igorshp has quit [Remote host closed the connection]
charliesome has joined #ruby
Chau has joined #ruby
tvw has quit [Remote host closed the connection]
pegasuspect has quit [Ping timeout: 250 seconds]
dionysus69 has joined #ruby
shmilan has joined #ruby
rubie has joined #ruby
momomomomo has quit [Ping timeout: 272 seconds]
acke has quit [Remote host closed the connection]
momomomomo has joined #ruby
bruno-_ has joined #ruby
Mives has joined #ruby
camm1 has joined #ruby
prefixed has joined #ruby
Guest33856 has quit [Quit: Leaving]
soc42 has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
dopie has joined #ruby
skullcrasher has quit [Remote host closed the connection]
dmolina has quit [Quit: Leaving.]
slawrence00 has joined #ruby
<camm1> Hello everyone, do you know how to doc a @param with yardoc when is a "list" of Objects?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bruno-_ has quit [Ping timeout: 240 seconds]
<dogedra> a list how?
<dogedra> vararg, or array of Object?
TPBallbag has joined #ruby
dionysus69 has quit [Ping timeout: 246 seconds]
momomomomo has quit [Quit: momomomomo]
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bayed has quit [Quit: Connection closed for inactivity]
<camm1> array of Object
<dogedra> Any kind of object, or is there a limit?
linuxboy_ has joined #ruby
<[k-> Array<Object> iirc
Igorshp has joined #ruby
pegasuspect has joined #ruby
<[k-> And Array<String, Fixnum, Hash> iirc
<dogedra> Object is very generic, if you want a limit, you have to indicate it
athinggoingon has joined #ruby
<apeiros> IMO Array<Object> is redundant. Array is sufficient.
<camm1> Thank you
Swappticon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dfockler> Yeah it's like @param [Array<Object>]
Mives has quit [Ping timeout: 268 seconds]
<camm1> Thanks a lot.
pawnbox has joined #ruby
alexUaN has quit [Quit: alexUaN]
bluOxigen has quit [Ping timeout: 264 seconds]
<dfockler> I guess in Ruby you shouldn't expect the array to contain a specific type, because it can contain any number of types
<dogedra> Just use Array if it's *any* object, otherwise Array<T> it is (i.e. Array<String>, Array<#poke>)
linuxboytoo has quit [Ping timeout: 256 seconds]
<dogedra> dfockler: that's for documentation tho
<dfockler> yeah
bruno-_ has joined #ruby
<[k-> ... Array<T>
<[k-> ...if you pass in any other objects, the behaviour is undefined
Igorshp has quit [Remote host closed the connection]
<dfockler> well it's docs not code, the docs don't care what type you pass in
<dogedra> that's a hint for users!
<dogedra> such hint
<dogedra> much dynamic types
<dfockler> I document for the Users!
<[k-> lusers
nhhagen has joined #ruby
rwyoung has joined #ruby
<dfockler> trousers
<[k-> :o
Igorshp has joined #ruby
<[k-> dirty dirty
bruno-_ has quit [Ping timeout: 250 seconds]
<sharkman> do you guys agree that users in the linux irc channel are smarter than people here?
<dfockler> definitely
<sharkman> 20+ iq points smarter?
<[k-> ?guys
<ruboto> Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<suchness> I would say 15, 20 is pushing it
<dogedra> sharkman: why do you want to compare?
<dogedra> Also, what does "being smarter" means? How do you measure it? Just by IQ points?
<sharkman> maybe they are immorallar than us
fostertheweb has joined #ruby
<sharkman> yeah using like IQ points
codecop has joined #ruby
<sharkman> yeah using like IQ points
<dogedra> I don't know my IQ score. What do we do?
<sharkman> you can guess
bigbadbear has quit [Ping timeout: 240 seconds]
<suchness> I guess dogedra is at least 210 iq.
Igorshp has quit [Ping timeout: 240 seconds]
apt-get has joined #ruby
<dogedra> many iq
<suchness> Which makes the linux people around 225.
eGGsha has quit [Quit: Textual IRC Client: www.textualapp.com]
<[k-> the only way to know if someone is smart if they know if they are stupid
<sharkman> why does "aaa" =~ /a/ return 0?
<sharkman> why wouldnt it return "a", or true
<[k-> s/are/feel/
abg has joined #ruby
<[k-> it returns the index where the regex first matches
abg has left #ruby [#ruby]
imperator has joined #ruby
<suchness> sharkman: I think that's where it matched.
<[k-> it provides alternate behavior to .match
<sharkman> oh thanks i see
<[k-> because people actually do need it
<dogedra> &ri String#=~ explains it
<`derpy> http://www.rubydoc.info/stdlib/core/String#%3D%7E-instance_method
<[k-> people always ignore me :(
<dogedra> did someone talk?
shinnya has joined #ruby
FernandoBasso has quit [Quit: Leaving]
ramfjord has joined #ruby
<dfockler> lololol
ndrei has joined #ruby
araujo has quit [Quit: Leaving]
elperdut has joined #ruby
bweston92 has quit [Quit: Leaving]
bruno- has joined #ruby
psy has joined #ruby
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 264 seconds]
ruurd_ has joined #ruby
sepp2k has joined #ruby
dionysus69 has joined #ruby
HayesHimself has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ndrei has quit [Ping timeout: 272 seconds]
shmilan has quit [Ping timeout: 246 seconds]
MichaelSmith has joined #ruby
chouhoulis has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
bruno- has quit [Ping timeout: 240 seconds]
ruurd has joined #ruby
ndrei has joined #ruby
bahar has joined #ruby
shmilan has joined #ruby
psy has quit [Ping timeout: 255 seconds]
<shevy> dogedra I prefer your old nick
<dogedra> me too
ruurd_ has quit [Ping timeout: 244 seconds]
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
elperdut has quit [Ping timeout: 240 seconds]
rubie has quit [Remote host closed the connection]
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
michaeldeol has joined #ruby
bigbadbear has joined #ruby
davidhq has joined #ruby
platzhirsch has quit [Remote host closed the connection]
RegulationD has quit [Remote host closed the connection]
howdoi has quit [Quit: Connection closed for inactivity]
The_Phoenix has joined #ruby
jcoe has joined #ruby
karapetyan has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
sshuff|gone is now known as sshuff
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
karapetyan has quit [Ping timeout: 250 seconds]
zeroDivisible has quit [Quit: WeeChat 1.3]
dgutierrez1287 has quit [Remote host closed the connection]
bigbadbear has quit [Ping timeout: 244 seconds]
fostertheweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<slash_nick> shevy: what was it?
bb010g has joined #ruby
ruurd has joined #ruby
rubie has joined #ruby
Lucky__ has joined #ruby
platzhirsch has joined #ruby
paulcsmith has joined #ruby
morenoh149 has joined #ruby
Motoservo has quit [Read error: Connection reset by peer]
pegasuspect has quit [Quit: pegasuspect]
meatherly has quit []
Motoservo has joined #ruby
bigbadbear has joined #ruby
darkf has quit [Quit: Leaving]
khebbie has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
chihhsin has quit [Remote host closed the connection]
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
khebbie has quit [Remote host closed the connection]
Swappticon has joined #ruby
ndrei has quit [Ping timeout: 255 seconds]
Fraeon has quit [Ping timeout: 264 seconds]
towski_ has joined #ruby
petricore has joined #ruby
greenarrow has quit [Quit: 500]
Siyfion has quit [Quit: Textual IRC Client: www.textualapp.com]
ndrei has joined #ruby
jenrzzz has joined #ruby
dgutierrez1287 has joined #ruby
nettsundere has quit [Quit: nettsundere]
mahlon_ is now known as mahlon
dgutierrez1287 has quit [Remote host closed the connection]
mprelude has quit [Quit: WeeChat 1.3]
ruurd has joined #ruby
yfeldblum has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
ndrei has quit [Ping timeout: 268 seconds]
momomomomo has joined #ruby
r_baron has joined #ruby
bruno- has joined #ruby
krisquigley has quit [Remote host closed the connection]
senayar has quit []
amclain has joined #ruby
chihhsin has joined #ruby
agent_white has joined #ruby
bootstrappm has joined #ruby
mikecmpbll has quit [Ping timeout: 265 seconds]
bruno- has quit [Ping timeout: 240 seconds]
r_baron has quit [Ping timeout: 268 seconds]
bubbys has quit [Ping timeout: 264 seconds]
bubbys has joined #ruby
bricker has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
hyperdrive has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
camm2 has joined #ruby
bruno- has joined #ruby
mleung has joined #ruby
Jackneill has joined #ruby
craigp has joined #ruby
oldbay has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
camm1 has quit [Ping timeout: 246 seconds]
djbkd has joined #ruby
craigp_ has joined #ruby
minotep has joined #ruby
krz has joined #ruby
mroark has joined #ruby
mhib has joined #ruby
ruurd has joined #ruby
<shevy> slash_nick adaedra
<[k-> good one
User458764 has joined #ruby
<slash_nick> lol
bruno- has quit [Ping timeout: 255 seconds]
fostertheweb has joined #ruby
tkuchiki has joined #ruby
armyriad has quit [Quit: Leaving]
craigp has quit [Ping timeout: 268 seconds]
momomomomo has quit [Quit: momomomomo]
djbkd has quit [Ping timeout: 265 seconds]
armyriad has joined #ruby
craigp_ has quit [Ping timeout: 268 seconds]
marr has quit [Ping timeout: 264 seconds]
linuxboy_ has quit [Remote host closed the connection]
linuxboytoo has joined #ruby
TPBallbag has quit [Remote host closed the connection]
slawrence00 has quit [Ping timeout: 246 seconds]
marr has joined #ruby
armyriad has quit [Max SendQ exceeded]
tkuchiki has quit [Ping timeout: 246 seconds]
armyriad has joined #ruby
armyriad has quit [Max SendQ exceeded]
jgt has quit [Ping timeout: 272 seconds]
tercenya has quit [Remote host closed the connection]
minimalism has joined #ruby
hyperdrive has quit [Ping timeout: 250 seconds]
EllisTAA has joined #ruby
camm2 has quit [Quit: Leaving.]
camm1 has joined #ruby
<hoylemd> Repeating earlier question: What's the best practices way to keep a method to less than 10 lines (as Rubocop wants) when the method needs to define a large-ish data structure? example: http://pastie.org/10412720
tercenya has joined #ruby
tomchapin has quit [Read error: Connection reset by peer]
skullcrasher has joined #ruby
tomchapi_ has joined #ruby
dorei has joined #ruby
Lycanii has joined #ruby
<bootstrappm> I wouldn't worry too much about that guideline hoylemd. For example, if you put your whole data structure on one line you'd have a 4-line method … does that mean its a better method? No, I'd say its worse because its less readable
<bootstrappm> just keep it short and to the point
mleung has quit [Quit: mleung]
al2o3-cr has joined #ruby
<bootstrappm> if you're gonna share that data structure across methods put it somewhere else, sure, but don't do it for the sake of saving a few lines
hyperdrive has joined #ruby
ekain has joined #ruby
ndrei has joined #ruby
roxtrongo has joined #ruby
bootstrappm has quit [Quit: Leaving.]
ruurd has quit [Ping timeout: 272 seconds]
mleung has joined #ruby
terlar has quit [Ping timeout: 240 seconds]
shadoi has joined #ruby
psy_ has joined #ruby
ruurd has joined #ruby
psy_ has quit [Max SendQ exceeded]
skade has quit [Quit: Computer has gone to sleep.]
fostertheweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
roxtrong_ has joined #ruby
Trieste has joined #ruby
psy_ has joined #ruby
shadoi1 has joined #ruby
siemprefresco has joined #ruby
fostertheweb has joined #ruby
bootstrappm has joined #ruby
arup_r has joined #ruby
RegulationD has joined #ruby
j_suth has quit [Read error: Connection reset by peer]
roxtrongo has quit [Ping timeout: 246 seconds]
maletor has joined #ruby
skade has joined #ruby
lsmola has quit [Ping timeout: 260 seconds]
NeverDie has quit [Quit: http://radiux.io/]
justin_pdx has joined #ruby
bootstrappm has quit [Client Quit]
shadoi has quit [Ping timeout: 268 seconds]
apt-get has quit [Ping timeout: 268 seconds]
<Sou|cutter> hoylemd: Disable the cop on that method is what I'd do
fantazo has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
bootstrappm has joined #ruby
ngscheurich has joined #ruby
FernandoBasso has joined #ruby
RandyT has joined #ruby
RegulationD has quit [Ping timeout: 265 seconds]
symm- has joined #ruby
apt-get has joined #ruby
fostertheweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bootstrappm has quit [Client Quit]
howdoicomputer has quit [Ping timeout: 246 seconds]
riskish has joined #ruby
ndrei has joined #ruby
frozen3 has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
tejasmanohar has joined #ruby
apt-get has quit [Ping timeout: 268 seconds]
ruurd has joined #ruby
voltalio has joined #ruby
voltalio has quit [Client Quit]
<shevy> hehe
nanoz has joined #ruby
CustosL1men has quit [Ping timeout: 240 seconds]
n008f4g_ has joined #ruby
sampai has joined #ruby
User458764 has joined #ruby
<certainty> actually i'd considere breaking up the construction of the datastructure
<certainty> consider, even
artmost has joined #ruby
apt-get has joined #ruby
khebbie has joined #ruby
renanoronfle has quit [Remote host closed the connection]
ruurd has quit [Read error: Connection reset by peer]
Zai00 has quit [Quit: Zai00]
<centrx> hoylemd, Why is the data structure being defined in the method?
RandyT_ has joined #ruby
RandyT_ has quit [Client Quit]
khebbie has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
RandyT_ has joined #ruby
voltalio has joined #ruby
bootstrappm has joined #ruby
sshuff is now known as sshuff|gone
artmost has quit [Client Quit]
fostertheweb has joined #ruby
shmilan has quit [Ping timeout: 244 seconds]
RegulationD has joined #ruby
ramfjord has joined #ruby
skinkitten has joined #ruby
kirun has joined #ruby
Kricir has quit []
sampai has quit [Quit: leaving]
banister has quit [Read error: Connection reset by peer]
<shevy> hoylemd you could trick it by defining a constant for the part that remains static; the part that then gets changed of that hash could be used or become assigned to another variable e. g. @instance_variable
<shevy> the main reason why smaller methods are preferred is because they are often much easier to work with or refactor than those 500 lines of code methods
wldcordeiro has joined #ruby
cornerma1 has joined #ruby
skinkitten has quit [Quit: Leaving]
ruurd has joined #ruby
phutchins has quit [Ping timeout: 240 seconds]
<tubbo> hoylemd: you make a MethodLength exception for that file
<tubbo> that's what i do anyway
<shadoi1> always follow the rules unless they are stupid.
shadoi1 is now known as shadoi
camm1 has quit [Ping timeout: 240 seconds]
bootstrappm has quit [Quit: Leaving.]
hanmac has quit [Ping timeout: 244 seconds]
jgt has joined #ruby
cornerman has quit [Ping timeout: 252 seconds]
cornerma1 is now known as cornerman
NeverDie has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
anaeem1_ has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
AlphaAtom has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
bootstrappm has joined #ruby
sampai has joined #ruby
poli has joined #ruby
RandyT has quit [Quit: ZNC - http://znc.in]
RandyT_ is now known as RandyT
bootstrappm has quit [Client Quit]
lavros has quit [Quit: leaving]
leafybasil has quit [Remote host closed the connection]
<certainty> obviously the values there aren't produced out out thin air. I mean the parts of the datastructure. There probably is business logic hidden there. If it is it should be expressed elsewhere.
leafybasil has joined #ruby
bruno- has joined #ruby
<certainty> make these pieces composable
soulcake has quit [Quit: Quack.]
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chthon has quit [Ping timeout: 244 seconds]
shmilan has joined #ruby
bootstrappm has joined #ruby
voltalio has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
fantazo has quit [Ping timeout: 265 seconds]
ruurd has quit [Read error: Connection reset by peer]
leafybasil has quit [Ping timeout: 246 seconds]
wldcordeiro has quit [Ping timeout: 246 seconds]
bruno- has quit [Ping timeout: 265 seconds]
wldcordeiro has joined #ruby
BraddPitt has joined #ruby
krisquigley has joined #ruby
bruno- has joined #ruby
syath has quit [Quit: WeeChat 1.2]
User458764 has quit [Quit: Textual IRC Client: www.textualapp.com]
sampai` has joined #ruby
<shevy> there is logic hidden there!
<shevy> certainty analyzes it deep
hanmac has joined #ruby
ruurd has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sampai` has quit [Remote host closed the connection]
bootstrappm1 has joined #ruby
bootstrappm1 has quit [Client Quit]
krisquigley has quit [Ping timeout: 246 seconds]
bruno- has quit [Ping timeout: 265 seconds]
tomchapi_ has quit [Quit: Textual IRC Client: www.textualapp.com]
renderful has joined #ruby
allomov has quit [Remote host closed the connection]
postmodern has joined #ruby
cantaberry has joined #ruby
ndrei has quit [Ping timeout: 240 seconds]
pegasuspect has joined #ruby
pegasuspect has left #ruby [#ruby]
k3asd` has joined #ruby
rdark has quit [Quit: leaving]
rdark has joined #ruby
pragmatism has joined #ruby
davidhq has quit [Quit: Textual IRC Client: www.textualapp.com]
tomchapin has joined #ruby
Chau has quit [Quit: Leaving]
bruno- has joined #ruby
renderfu_ has quit [Ping timeout: 264 seconds]
tomchapin has quit [Read error: No route to host]
rbowlby has joined #ruby
tomchapin has joined #ruby
dionysus69 has joined #ruby
Jardayn has joined #ruby
tomchapin has quit [Read error: No route to host]
bruno- has quit [Ping timeout: 255 seconds]
ruurd has quit [Read error: Connection reset by peer]
Jardayn has quit [Read error: Connection reset by peer]
Jardayn has joined #ruby
NeverDie_ has joined #ruby
tomchapin has joined #ruby
bruno- has joined #ruby
krisquigley has joined #ruby
rubie has quit []
ruurd has joined #ruby
NeverDie has quit [Ping timeout: 246 seconds]
HayesHimself has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 246 seconds]
eGGsha has joined #ruby
bruno- has joined #ruby
krisquigley has quit [Ping timeout: 265 seconds]
iateadonut has joined #ruby
mprelude has joined #ruby
AlphaAtom has quit [Read error: Connection reset by peer]
AlphaAtom has joined #ruby
bruno- has quit [Ping timeout: 246 seconds]
VeryBewitching has joined #ruby
dionysus69 has quit [Ping timeout: 255 seconds]
k3asd` has quit [Ping timeout: 246 seconds]
bruno- has joined #ruby
leafybasil has joined #ruby
bruno- is now known as Guest9290
baweaver has joined #ruby
sufyan``` has quit [Remote host closed the connection]
suchness has quit [Remote host closed the connection]
Stalkr_ has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
<chrisseaton> In MRI what is T_DATA?
craigp has joined #ruby
mroark has quit [Remote host closed the connection]
senayar has joined #ruby
senayar has joined #ruby
vondruch has quit [Ping timeout: 246 seconds]
milanpaperclip has joined #ruby
* baweaver is / was a SysAdmin
roxtrong_ has quit [Remote host closed the connection]
<baweaver> ah, old messages
bb010g has quit [Quit: Connection closed for inactivity]
<baweaver> every time.
Alayde has quit [Read error: Connection reset by peer]
<baweaver> ignore me
Guest9290 has quit [Ping timeout: 272 seconds]
<dfockler> chrisseaton: Apparently it's a type
NeverDie_ is now known as Neverdie
<dogedra> systemctl disable baweaver
bruno-_ has joined #ruby
<centrx> chrisseaton, speculating it's related to DATA
<shevy> lol
<chrisseaton> I get all of that - but what goes into T_DATA as opposed to any of the more clearly named symbols?
[k- has quit [Read error: No route to host]
[k- has joined #ruby
yfeldblum has joined #ruby
ruurd has joined #ruby
<hanmac> chrisseaton: T_DATA is used for bindings and stuff, T_DATA is the representation for a C pointer bound to an ruby object (PS: but i dont know why the DATA class exist in ruby visible)
dionysus69 has joined #ruby
<chrisseaton> Ah so it's a generic opaque handle into a VM object I guess
Alina-malina has joined #ruby
pandaant has joined #ruby
krz has quit [Ping timeout: 240 seconds]
<dogedra> no it is patrick
bruno-_ has quit [Ping timeout: 244 seconds]
<chrisseaton> huh?
baweaver has quit [Remote host closed the connection]
CustosL1men has joined #ruby
bruno-_ has joined #ruby
platzhirsch has left #ruby [#ruby]
Pupeno has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
exadeci has quit [Quit: Connection closed for inactivity]
nhhagen has quit [Remote host closed the connection]
khebbie has joined #ruby
luksaur has quit [Ping timeout: 265 seconds]
khebbie has quit [Remote host closed the connection]
<shevy> hmm
<shevy> what does the leading T_ denote there?
fostertheweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<centrx> turd
bruno-_ has quit [Ping timeout: 255 seconds]
harumph has joined #ruby
<chrisseaton> shevy: type
timonv has joined #ruby
jenrzzz has joined #ruby
Rurik has joined #ruby
stan_ has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
bronson has joined #ruby
mikecmpbll has joined #ruby
ramfjord has joined #ruby
howdoicomputer has joined #ruby
casadei_ has joined #ruby
bronson has quit [Client Quit]
ruurd has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
<shevy> centrx lol
jenrzzz has quit [Ping timeout: 246 seconds]
<[k-> a small t is token!
<[k-> see, i know some Ruby c
bb010g has joined #ruby
Alayde has joined #ruby
banjara has joined #ruby
casadei_ has quit [Ping timeout: 265 seconds]
ruurd has joined #ruby
dgutierrez1287 has joined #ruby
baweaver has joined #ruby
<harumph> Querying postgres through a ActiveRecord raw connection with the pg adapter, seems to return wonky datatypes. Anyone find that?
<slash_nick> harumph: def wonky? i haven't noticed anything
<harumph> ActiveRecord::Base.connection.execute("SELECT col_that_is_def_an_integer FROM stuff")
<harumph> col_that_is_def_an_integer returns as a string
<dfockler> are you sure it's def_an_integer?
<dfockler> in the database
<harumph> yea, it's an integer type in the db.
jgt has quit [Ping timeout: 246 seconds]
<dfockler> Is it defined as an int in the AR code?
casadei_ has joined #ruby
rdark has quit [Quit: leaving]
hoov has quit [Quit: Leaving]
ndrei has joined #ruby
<harumph> Hmm, its type is unspecified in the code. Shouldn't the result be taken from the db data type when using a raw connection?
nettsundere has joined #ruby
<harumph> I'm moving an app from MySQL to Postgres and it seemed to work as expected with MySQL.
failshell has joined #ruby
Rurik has quit [Read error: Connection reset by peer]
Rurik has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
El-skra7 has joined #ruby
El-skra7 has left #ruby ["Leaving"]
<bricker> harumph: show your schema, the code you're running, what it's returning, what you expect it to return, etc.
mike___1234 has quit [Ping timeout: 260 seconds]
ruurd has joined #ruby
tarun has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
tarun has quit [Client Quit]
Swappticon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tkuchiki has joined #ruby
DLSteve has joined #ruby
frozen3 has quit []
michael_mbp has quit [Excess Flood]
craigp has quit []
atomical has joined #ruby
michael_mbp has joined #ruby
bruno-_ has joined #ruby
al2o3-cr has quit [Ping timeout: 264 seconds]
_yolgs_ has joined #ruby
tkuchiki has quit [Ping timeout: 246 seconds]
<ruboto> harumph, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/491db275bb625e27b967
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<harumph> true enough
<harumph> ActiveRecord::Base.connection.execute("SELECT * from variance_report_caches").to_a[0][:size]
<harumph> will be "2"
<harumph> not 2
<slash_nick> cool feature mr. ruboto
mike___1234 has joined #ruby
bruno-_ has quit [Ping timeout: 244 seconds]
<harumph> bricker: ^
ckinniburgh has quit [Ping timeout: 246 seconds]
konsolebox has joined #ruby
CustosL1men has quit [Ping timeout: 264 seconds]
bruno-_ has joined #ruby
iateadonut has quit [Quit: Leaving.]
baweaver has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
_yolgs_ has quit [Quit: Konversation terminated!]
freerobby has joined #ruby
pharaoh2 has joined #ruby
momomomomo has joined #ruby
Alina-malina has quit [Quit: Leaving]
bruno-_ has quit [Ping timeout: 256 seconds]
soc42 has quit [Remote host closed the connection]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rwyoung has quit [Quit: Page closed]
allomov has joined #ruby
AustinMatherne has quit [Remote host closed the connection]
yqt has joined #ruby
atomical has joined #ruby
AustinMatherne has joined #ruby
yqt has quit [Read error: Connection reset by peer]
nettsundere has quit [Quit: nettsundere]
karapetyan has joined #ruby
yqt has joined #ruby
dfockler has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
blackmesa has joined #ruby
araujo has joined #ruby
araujo has joined #ruby
jhooker has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
atomical has quit [Client Quit]
yqt has quit [Client Quit]
allomov has quit [Remote host closed the connection]
Martxel has joined #ruby
atomical has joined #ruby
fostertheweb has joined #ruby
riskish has quit [Quit: Textual IRC Client: www.textualapp.com]
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
danieli has joined #ruby
sn0wb1rd has joined #ruby
fostertheweb has quit [Client Quit]
ruurd has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Swappticon has joined #ruby
mhib has quit [Remote host closed the connection]
HayesHimself has quit [Quit: Textual IRC Client: www.textualapp.com]
pulgolino has joined #ruby
bruno- has joined #ruby
otacon- has joined #ruby
shmilan has quit [Ping timeout: 244 seconds]
sshuff|gone is now known as sshuff
timonv has quit [Ping timeout: 256 seconds]
dgutierrez1287 has quit [Remote host closed the connection]
shadoi has quit [Quit: Leaving.]
davedev24 has quit [Ping timeout: 240 seconds]
j_suth has joined #ruby
shmilan has joined #ruby
momomomomo has quit [Quit: momomomomo]
casadei_ has quit [Remote host closed the connection]
davedev24 has joined #ruby
elperdut has joined #ruby
bruno- has quit [Ping timeout: 272 seconds]
bruno- has joined #ruby
yqt has joined #ruby
sonne has joined #ruby
nofxx has joined #ruby
codecop has quit [Remote host closed the connection]
toertore has joined #ruby
<shevy> hmm
camm1 has joined #ruby
khebbie has joined #ruby
Coldblackice has joined #ruby
<nofxx> need a better name for this model, the 'economic activity' of a company.... Trade ? It's a ruby model , befreo someone ot me =D
khebbie has quit [Remote host closed the connection]
jenrzzz has joined #ruby
justin_pdx has quit [Quit: justin_pdx]
bruno- has quit [Ping timeout: 264 seconds]
dfockler has joined #ruby
<centrx> nofxx, What are the records of 'economic activity'?
maletor has quit []
morenoh149 has quit [Ping timeout: 256 seconds]
bruno- has joined #ruby
Neverdie has quit [Quit: http://radiux.io/]
<nofxx> centrx, "sells computer" , "sells pizzas", "makes service x"
pikajude has joined #ruby
umgrosscol has quit [Remote host closed the connection]
<pikajude> while trying to build ruby 2.2.2, i get to "generating transdb.h" and then my computer hangs and i have to reboot. this is on OSX 10.10
<pikajude> any idea why?
<centrx> nofxx, Transaction? Action? SalesEvent?
jzigmund_ has joined #ruby
<nofxx> uses a government list with 2500 economic activities. You got 2500 ways to make money now days
nettsundere has joined #ruby
ramfjord has quit [Ping timeout: 252 seconds]
<nofxx> centrx, how it goes again? naming things and expiring caches... heh
jenrzzz has quit [Ping timeout: 240 seconds]
milesmatthias has joined #ruby
<nofxx> Industry / Bussiness .... think gonna settle with one of those
jzigmund has quit [Ping timeout: 240 seconds]
nettsundere has quit [Client Quit]
<jhass> nofxx: that list surely has a title, what is it?
bruno- has quit [Ping timeout: 264 seconds]
A_ron has joined #ruby
bruno- has joined #ruby
<nofxx> jhass, 'Atividades Econômicas' , can yr anglo-saxon get my latin? ;)
<nofxx> adjetives to later in latin... ball red, not red ball
shadoi has joined #ruby
<jhass> BusinessActivity ?
shinnya has quit [Ping timeout: 255 seconds]
<jhass> assuming the models purpose is to store the items of that list, not events associated to an instance of an item of the list
harumph has left #ruby ["ERC (IRC client for Emacs 25.0.50.1)"]
<toertore> nofxx: is it a single "transaction" or is it a description of what they do?
casadei_ has joined #ruby
<nofxx> jhass, ty toertore descriptions
ruurd has quit [Quit: ZZZzzz…]
Swappticon has quit [Quit: Textual IRC Client: www.textualapp.com]
morenoh149 has joined #ruby
ramfjord has joined #ruby
Neverdie has joined #ruby
bruno- has quit [Ping timeout: 265 seconds]
bahar has quit [Changing host]
bahar has joined #ruby
sharkman has quit [Ping timeout: 255 seconds]
bruno- has joined #ruby
jhooker has quit [Read error: Connection timed out]
tomchapin has quit [Quit: Textual IRC Client: www.textualapp.com]
bruno- has quit [Ping timeout: 240 seconds]
milesmatthias has quit []
tomchapin has joined #ruby
djbkd has joined #ruby
sshuff is now known as sshuff|gone
Neverdie has quit [Quit: http://radiux.io/]
tejasmanohar has quit [Quit: tejasmanohar]
dotix has joined #ruby
urbanmonk has joined #ruby
Neverdie has joined #ruby
stamina has quit [Ping timeout: 244 seconds]
andikr has quit [Remote host closed the connection]
spacemud has quit [Ping timeout: 252 seconds]
shadoi has quit [Quit: Leaving.]
djbkd has quit [Ping timeout: 246 seconds]
shadoi has joined #ruby
A_ron has quit [Read error: Connection reset by peer]
jhooker has joined #ruby
blackmesa has quit [Quit: WeeChat 1.3]
vickleton has joined #ruby
jzigmund_ has quit [Ping timeout: 246 seconds]
jzigmund has joined #ruby
apt-get has quit [Ping timeout: 240 seconds]
baweaver has joined #ruby
bruno- has joined #ruby
urbanmonk has quit [Quit: urbanmonk]
distif has joined #ruby
acke has joined #ruby
jzigmund_ has joined #ruby
ruurd has joined #ruby
j_suth has quit [Ping timeout: 244 seconds]
Neverdie has quit [Quit: http://radiux.io/]
lxsameer has joined #ruby
karapetyan has quit [Remote host closed the connection]
krisquigley has joined #ruby
jzigmund has quit [Ping timeout: 272 seconds]
baweaver has quit [Ping timeout: 246 seconds]
j_suth has joined #ruby
bruno- has quit [Ping timeout: 252 seconds]
Neverdie has joined #ruby
BTRE has joined #ruby
xylotism has quit [Quit: Page closed]
maletor has joined #ruby
bruno- has joined #ruby
Neverdie has quit [Client Quit]
j2p2 has joined #ruby
alexblom has quit [Ping timeout: 246 seconds]
krisquigley has quit [Ping timeout: 240 seconds]
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
konopka has joined #ruby
j2p2 has left #ruby [#ruby]
bruno- has quit [Ping timeout: 246 seconds]
skullcrasher has quit [Quit: Leaving]
bruno- has joined #ruby
pharaoh2 has quit [Quit: Textual IRC Client: www.textualapp.com]
apt-get has joined #ruby
spacemud has joined #ruby
RegulationD has quit []
apt-get has quit [Client Quit]
apt-get has joined #ruby
jackjackdripper has joined #ruby
blackjid has quit [Max SendQ exceeded]
blackjid has joined #ruby
meatherly has joined #ruby
mroark has joined #ruby
bruno- has quit [Ping timeout: 255 seconds]
alexblom has joined #ruby
rbennacer has quit [Remote host closed the connection]
bruno- has joined #ruby
roxtrongo has joined #ruby
Xiti has quit [Read error: Connection reset by peer]
amclain has quit [Read error: Connection reset by peer]
Xiti has joined #ruby
gamename has quit [Read error: Connection reset by peer]
amclain has joined #ruby
jtdowney has quit [Read error: Connection reset by peer]
jtdowney has joined #ruby
jtdowney has quit [Changing host]
jtdowney has joined #ruby
gamename has joined #ruby
zz_barkerd427 has quit [Ping timeout: 240 seconds]
ruby-lang487 has joined #ruby
zz_barkerd427 has joined #ruby
Asher has quit [Read error: Connection reset by peer]
Asher has joined #ruby
solocshaw has quit [Remote host closed the connection]
arooni has joined #ruby
arooni_______ has joined #ruby
solocshaw has joined #ruby
meatherly has quit [Read error: Connection reset by peer]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
platosha__ has joined #ruby
baweaver has joined #ruby
bruno- has quit [Ping timeout: 246 seconds]
urbanmonk has joined #ruby
platosha_ has quit [Ping timeout: 260 seconds]
roxtrongo has quit [Ping timeout: 256 seconds]
jgpawletko has quit [Quit: jgpawletko]
ruby-lang487 has quit [Ping timeout: 246 seconds]
shinnya has joined #ruby
voltalio has joined #ruby
sharkman has joined #ruby
arooni has quit [Quit: Leaving]
rakm has joined #ruby
rbennacer has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
CustosL1men has joined #ruby
bubbys has quit [Ping timeout: 264 seconds]
bruno- has joined #ruby
khebbie has joined #ruby
Neverdie has joined #ruby
khebbie has quit [Remote host closed the connection]
chills42 has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
brandon has joined #ruby
UtkarshRay has quit [Quit: Leaving]
nhhagen has joined #ruby
krisquigley has joined #ruby
Stalkr_ has left #ruby ["Linkinus - http://linkinus.com"]
yalue has quit [Quit: return 0;]
krisquigley has quit [Ping timeout: 256 seconds]
jamesaxl has joined #ruby
pietr0 has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
SCHAAP137 has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gamename has quit [Quit: Textual IRC Client: www.textualapp.com]
bubbys has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
allomov has joined #ruby
dionysus69 has quit [Ping timeout: 246 seconds]
ericfournier2 has quit [Quit: Page closed]
pandaant has quit [Remote host closed the connection]
FernandoBasso has quit [Quit: Leaving]
urbanmonk has quit [Quit: urbanmonk]
bruno- has joined #ruby
tkuchiki has joined #ruby
dgs has joined #ruby
allomov has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 255 seconds]
EllisTAA has quit [Quit: EllisTAA]
tkuchiki has quit [Ping timeout: 246 seconds]
dfockler has quit [Remote host closed the connection]
havenwood has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
jeffw_ has joined #ruby
<jeffw_> gem install mysql2 fails
<shevy> good
<jhass> jeffw_: thanks for the information I guess
<jeffw_> is there a proper way to get mysql support now
<shevy> jeffw_ gateway IRC
dfockler has joined #ruby
<jeffw_> that was a question not really a statement
<jhass> many people use it, you can probably fix it by installing something
<eam> or by sharing the error, like is it "-bash: gem: command not found" ? or something else?
<jhass> jeffw_: oh is this the game where you guess the error message? does it contain an e?
roxtrongo has joined #ruby
r0uder has quit [Read error: Connection reset by peer]
<jeffw_> "/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)"
<jhass> jeffw_: install the ruby-dev package
<jhass> also consider upgrading to a supported ruby version, https://www.brightbox.com/docs/ruby/ubuntu/
atomical has joined #ruby
<jhass> 1.9 is EOL, 2.0 will EOL in february
jzigmund_ has quit [Ping timeout: 268 seconds]
<jeffw_> ubuntu LTS 14.04 only comes with 1.9.1
<eam> the ruby eol schedules are never realistic
<jhass> eam: I think they held the announcement for 1.9
<jhass> jeffw_: I believe there's a ruby2.0 package but the ones I linked are better
jzigmund has joined #ruby
<jeffw_> ya I am not gonna install ruby from a 3rd party ppa
<jhass> because $reasons
Martxel has left #ruby ["Leaving"]
<jeffw_> if I really get desperate I might just use the latest ubuntu in a virtual machine
Pupeno has quit [Remote host closed the connection]
freerobby has joined #ruby
<havenwood> jeffw_: The Brightbox packages are a pretty common turn-to to deal with lack of up-to-date Ubuntu Ruby packages.
bruno- has joined #ruby
acke has quit [Remote host closed the connection]
nettoweb has joined #ruby
A124 has quit [Read error: Connection reset by peer]
A124 has joined #ruby
platzhirsch has joined #ruby
<havenwood> Wily for 2.2 :P
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> And don't forget to install: ruby2.2-dev
<shevy> he is in a prison
firstdayonthejob has joined #ruby
elperdut has quit [Ping timeout: 240 seconds]
<havenwood> At least Vivid has 2.1.
mblagden_ has quit [Ping timeout: 272 seconds]
<havenwood> A supported Ruby!
paulcsmith has quit [Quit: Be back later ...]
<shevy> hmmm
<shevy> let me ask a noob question
<shevy> big arrays will slow my ruby programs down?
<apeiros> shevy: define "big"
<havenwood> shevy: If the Array is infinite you'll never get to the end. Not ever.
<shevy> yeah that is one problem
<apeiros> and no, a big array per se will not slow down your program
paulcsmith has joined #ruby
senayar has quit [Remote host closed the connection]
<shevy> I was having fun with Readline and setting a completion proc
<apeiros> a big array which has to be swapped out due to its size but you access swapped out parts frequently - yes, that will slow down your app. a lot.
<hoylemd> To all the folks who chimed in re: my data structure method length issue: Thanks for the input! My team is a little averse to disabling cops willy-nilly, but there has been talk of loosening the method length metric to 20 lines. Another option to consider would be having a fixture generator module that has module-specific rubocop exceptions.
bruno- has quit [Ping timeout: 265 seconds]
<shevy> the array that I was using had less than 20.000 entries, but they actually were calculated/done anew whenever someone presses enter
kgirthofer has quit [Ping timeout: 264 seconds]
<apeiros> but that's not really a problem of array. it's more a problem of not having enough ram or not organizing your data well enough to fit into available ram
<eam> bigger datasets generally means slower programs
pagios has joined #ruby
<pagios> when should i use ruby on rails and when should i use sinatra? thanks
<eam> whether due to lack of memory, or just doing more work when traversing it
bruno- has joined #ruby
<mwlang> What exactly is a “Backend” on I18n?
<havenwood> pagios: Use Rails when it's a Basecamp clone and use Sinatra when it's Hello, World!
<pagios> cool :)
<apeiros> mwlang: the thing which retrieves a value for a key
<mwlang> For example: “I18n.backend = I18n::Backend::Chain.new(I18n::Backend::ActiveRecord.new, I18n.backend)”
<shevy> havenwood is in a good mood again :)
<pagios> havenwood: sql goes well with rails?
<BraddPitt> yes, very pagios
<apeiros> mwlang: standard would be the yaml based backend
<jeffw_> if you really want a laugh on CentOS 6.6 Final I have
<jeffw_> ruby 1.8.7 (2013-06-27 patchlevel 374) [x86_64-linux]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jeffw_> because CentOS likes to "backport"
<havenwood> pagios: SQL goes with SQL databases. Rails and Sinatra are both most often used with SQL of one sort or another.
<apeiros> pagios: rails is over in #rubyonrails
<mwlang> So, if I wanted to add a new lookup mechanism to Rails, I’d just chain up a new backend?
<apeiros> mwlang: that too sounds like #rubyonrails
<havenwood> pagios: Sinatra, unlike Rails, doesn't have a SQL toolkit baked in. Popular choices are to use ActiveRecord from Rails or the very nice Sequel gem.
<ytti> [ytti@ytti.fi ~]% time ruby -e 'Array.new 200_000_000'
<ytti> ruby -e 'Array.new 200_000_000' 0.21s user 1.55s system 55% cpu 3.176 total
<ytti> [ytti@ytti.fi ~]% time ruby -e 'Array.new 100_000_000'
<ytti> ruby -e 'Array.new 100_000_000' 0.13s user 0.24s system 95% cpu 0.383 total
<ytti> [ytti@ytti.fi ~]% time ruby -e 'Array.new 1_000_000'
<ytti> ruby -e 'Array.new 1_000_000' 0.03s user 0.00s system 96% cpu 0.037 total
<havenwood> ytti: Mah eyes!
* apeiros hands havenwood some bleach
<ytti> i have cheap bleach for sale
<mwlang> apeiros: heh…it feels more directly ruby to me…not exactly trying to tie into Rails so much as the I18n framework.
AlphaAtom has joined #ruby
<apeiros> mwlang: i18n is part of rails
beast has left #ruby ["Leaving"]
<apeiros> at least the one you're discussing
<pagios> so a typical platform would contain js/ajax/htmlcss talking to a website which has a backend gateway being rails and rails talking to sql, is this the correct way to start building a platform? like fb twitter etc?
dman777_alter has joined #ruby
<dman777_alter> what is the best way to say details = "#{response['name']}:\n#{response['content']}" if "#{response['key']}:\n#{response['value']}" does not exist??
<mwlang> apeiros: had no idea i18n belonged to the Rails effort!
<pagios> flexible enough and scalable enough
shevy has quit [Read error: Connection reset by peer]
<baweaver> don't cross post dman777_alter
<havenwood> pagios: The maintainer of Sequel also created a very fine Rack adapter that would be an alternative to Sinatra: http://roda.jeremyevans.net
urbanmonk has joined #ruby
shmilan has quit [Ping timeout: 244 seconds]
<havenwood> pagios: I'd recommend creating a very simple, vanilla Rack app. Then port it to Roda and try some Roda plugins. Then try a Rails app.
<eam> ytti: time ruby -e'([1] * 1_000_000).reject! {true}' # great example of simple things getting slow with size
bruno- has quit [Ping timeout: 244 seconds]
<pagios> havenwood: but is my logic correct?
banjara has quit [Quit: Leaving.]
<pagios> is thera anything in between these entities for improving performance etc?
<eam> reject! is O(n^2) on most rubies :(
bruno- has joined #ruby
<havenwood> pagios: Yeah, Twitter's frontend is still Rails. Rails comes with conventions for all of the above and security measures in place, etc. Roda on the other hand starts with just a router and you add plugins to build the framework you need for the given task.
<apeiros> eam: what?
<eam> apeiros: sup
<apeiros> 22:52 eam: reject! is O(n^2) on most rubies :(
<apeiros> that… sounds wrong?
<eam> it's because it shifts the entire array every rejection (as opposed to reject which is O(n))
senayar has joined #ruby
senayar has joined #ruby
<apeiros> at least for both Array and Hash I don't see why it would have to be
<pagios> do you guys recommend any book for startups? i need to know how startups are building their infrastructures nowadays
<eam> I think it's getting changed (in which case it would be O(n) but potentially invalid during iteration)
northfurr has joined #ruby
<apeiros> eam: code says it creates a new array
<apeiros> oh, wait
<eam> apeiros: reject does, reject! doesn't
<apeiros> looked at reject, not reject!
<eam> yeah
<eam> 2x memory or O(n^2) pick your poison
<apeiros> 2x memory is usually the better pick
<eam> agreed
Pupeno has joined #ruby
<eam> (and I think reject! may be changing to simply leave self in an invalid state during iteration, so it'll be fast/small but not "correct")
<apeiros> and even without 2x memory you can do it in O(n)
bmurt has quit []
<apeiros> you keep a shift-count and move every item. you can optimize to use memcpy by figuring slices.
<eam> right - but then accesses to the object during the iteration will see ... stuff
<apeiros> true
<eam> which is an ok concession probably
new_user has joined #ruby
<apeiros> again, choose your poison
EllisTAA has joined #ruby
<eam> yeah, right answer imo
<apeiros> either "see stuff" or "be locked out"
karapetyan has joined #ruby
<havenwood> pagios: Microservices. Monolith. No, Microservices.
<apeiros> personally I prefer "locked out"
bruno- has quit [Ping timeout: 244 seconds]
<baweaver> If you get to a point where that's _actually_ an issue, ruby might not be the best idea.
<apeiros> "see stuff" is IMO never a good choice :-/
arooni_______ has left #ruby ["Leaving"]
<pagios> havenwood: what do you mean
<havenwood> pagios: Here's a Ruby Rogues episode on Roda: https://devchat.tv/ruby-rogues/210-rr-roda-and-routing-trees-with-jeremy-evans
<havenwood> pagios: And here's a Ruby Rogues episode on Rails: https://devchat.tv/ruby-rogues/222-rr-rails-5-with-sean-griffin
bruno- has joined #ruby
<baweaver> havenwood: are the rogues still at it? (suppose I could ping avdi as well here)
<new_user> Ugh. when you have array's within array's, a matrix, and you need to call on array[index[index2]] is there a command for that? Because that isnt working as is.
freerobby has quit [Quit: Leaving.]
<havenwood> baweaver: Sure are, lots of episodes lately but fewer hosts per episode.
paulcsmith has quit [Quit: Be back later ...]
<apeiros> eam: I wonder whether they could use their existing COW infrastructure to only update the "visible" array upon actual access
Pupeno has quit [Remote host closed the connection]
<baweaver> >> [[1]][0][0] # new_user
<ruboto> baweaver # => 1 (https://eval.in/431995)
nanoz has quit [Read error: Connection reset by peer]
<new_user> Looking now
<havenwood> pagios: I'd suggest listening to those for some context. Then create a plain, simple Rack app. Port it to Roda. Look at Roda plugins. Then go through a Rails book like R4IA.
mleung has quit [Quit: mleung]
paulcsmith has joined #ruby
* havenwood is going through R4IA
djcp has quit [Ping timeout: 246 seconds]
<baweaver> new_user: your above code tries to run an index on a number
<new_user> baweaver seems I'm still not far enough along in this code to understand what's even happening there.
umgrosscol has joined #ruby
Hrorek has joined #ruby
<baweaver> >> [[1,2,3,4], [5,6,7,8]][0]
<ruboto> baweaver # => [1, 2, 3, 4] (https://eval.in/431997)
Rurik has quit [Read error: Connection reset by peer]
<baweaver> that gets the first position of a matrix, as it were
<baweaver> which returns a row, which is another array
<havenwood> pagios: Here are an assortment of Hello, World!s in various Rack adapters. Take a look at the Rack, Sinatra and Roda ones: https://github.com/luislavena/bench-micro/tree/master/apps
<baweaver> to get an element of that array you need to pull another index.
<havenwood> pagios: Good, those are good things to think about.
<new_user> Hrm.
shmilan has joined #ruby
tejasmanohar has joined #ruby
bruno- has quit [Ping timeout: 255 seconds]
<mwlang> heh…insteresting seeing that rails.ru rackup.
<bricker> Is there any language where you can say "return this at the end of the method: { ... }", and then do other stuff? I know Go has "defer" but it's not quite what I mean.
<pagios> havenwood: whats an example of Monolith vs microservices?
urbanmonk has quit [Quit: urbanmonk]
<baweaver> bricker: tap or returning?
<new_user> basically, the only way for me to do it without the $ rescue /raise because I'm trying to build on the code that I know already--before finding shortcuts. I'll have to go... row1 = array[index] and then row1[index2]
<baweaver> Normally known as a K Combinator
soulcake has joined #ruby
baweaver has quit [Remote host closed the connection]
soulcake has quit [Max SendQ exceeded]
iceyec has quit [Quit: iceyec]
<bricker> baweaver: I mean in the context of a function, like this: https://gist.github.com/bricker/199d627b91501c23c773 so you don't have to set a variable
<mwlang> pagios: monolith just means a framework that provides everything you could possibly think you might need. microservices are the opposite extremes…just enough is provided to get you working efficiently.
soulcake has joined #ruby
oetjenj has joined #ruby
<pagios> mwlang: yea but like concrete examples
<platzhirsch> bricker: like a callback?
<bricker> platzhirsch: no, just a compiler feature I guess
<mwlang> rails is monolith. rack is micro. rails is actually built on top of rack if that means anything to you.
<platzhirsch> bricker: or maybe something like the guarantee block in a try catch
vF3hNGxc47h8 has joined #ruby
<platzhirsch> ensure in ruby
<bricker> nah that's not what I mean
<bricker> doesn't matter, just curious really
<nofxx> there was a nice pastie thing which runs the code, anyone knows?
AntKnee has joined #ruby
<havenwood> pagios: Since I'm pointing you at Ruby Rogues, here's an episode where that is discussed: https://devchat.tv/ruby-rogues/170-rr-padrino-with-dario-cravero-nathan-esquenazi-arthur-chiu
<havenwood> pagios: You're also on the right track with Martin Fowler related discussions. Read on.
<nofxx> jsfiddle for ruby*
<eam> apeiros: doubt it, since reject! is the W in COW :)
<jeffw_> is there a good gui to manage + install + uninstall ruby gems?
chouhoulis has quit [Read error: Connection reset by peer]
<apeiros> eam: not meant like that
<new_user> Alright, I have another question. But first I need to know how you guys hosted those post on repl.it
chouhoulis has joined #ruby
<platzhirsch> Padrino..
<platzhirsch> is that Sinatra gone mad?
<new_user> Anyone give me a quick walkthrough how to make and get the url form this site?
bruno- has joined #ruby
<apeiros> eam: the idea is basically: other parties accessing during reject! would see stuff, but when they perform a lookup, it is blocked, the array is updated, and after that, it can access it
<new_user> nevermind
<toertore> pagios, mwlang monolith usually refers to how an application is architectured; a monolith is a single app that does everything and everything is very coupled together; "microservices" is an alternative approach where you have several apps that do one or a few things each
<apeiros> and the COW infrastructure afaik already deals with different parties accessing an array/hash
<toertore> you can make small rails apps
shevy has joined #ruby
<eam> yeah, I think you'd need a copy of the array (or some other similarly invasive approach in terms of size/speed)
<pagios> microservices communicate via what protocols usually?
<mwlang> for me, when I build a complex website, I’ll build with Rails because I often hire other developers to work on it…Rails is well known, well documented, and follows a set convention for the most part, so it’s easy to find developers that can help. But dirt simple websites, I’ll build with Sinatra or something else because they’re small, efficient, and have enough meat to build something rapidly.
dgutierrez1287 has joined #ruby
<toertore> pagios: doesn't matter, could be http
Pupeno has joined #ruby
FernandoBasso has joined #ruby
<mwlang> toertore: I knew I was missing something there…I was transliterating microframework with microservices. *doh*
<shevy> ytti hmmm... why take the smaller arrays more cpu time than the larger 200 milion variant?
rodfersou has quit [Quit: leaving]
camm1 has left #ruby [#ruby]
urbanmonk has joined #ruby
senayar has quit [Remote host closed the connection]
<pagios> can rails replace apache btw?
kirun has quit [Quit: Client exiting]
baweaver has joined #ruby
<eam> pagios: rails is an application framework, you could run it using apache
<pagios> cool
<new_user> Figured that out. The QUESTION#2 https://eval.in/432008 <-- can anyone tell me why the array in this is being destroyed by the method?
bruno- has quit [Ping timeout: 240 seconds]
firstdayonthejob has quit [Read error: Connection reset by peer]
Pupeno has quit [Remote host closed the connection]
<pagios> eam: so users would go to apache and then apache would direct traffic to rails
dgutierrez1287 has quit [Ping timeout: 240 seconds]
<apeiros> new_user: stack = arr # this does not copy the array
<apeiros> new_user: stack will refer to the *same* array object as arr
<new_user> Hm
n008f4g_ has quit [Ping timeout: 256 seconds]
oetjenj has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> you want `stack = arr.dup`, which actually copies the array (and only the array, it's not a deep copy)
<new_user> Okay that makes sense
Vile` has quit [Read error: Connection reset by peer]
<new_user> a deep copy?
ray_ has joined #ruby
n20420 has joined #ruby
<eam> nested arrays
<apeiros> >> ary = ["some string"]; other = ary.dup; other[0].upcase!; arr
<ruboto> apeiros # => undefined local variable or method `arr' for main:Object (NameError) ...check link for more (https://eval.in/432011)
<apeiros> whoops
<apeiros> >> ary = ["some string"]; other = ary.dup; other[0].upcase!; ary
<n20420> hello everyone
<ruboto> apeiros # => ["SOME STRING"] (https://eval.in/432012)
<apeiros> new_user: ^
<apeiros> "some string" in both `other` and `ary` are the same object
ldnunes has quit [Quit: Leaving]
<apeiros> it was not copied.
<eam> "copy this" vs "copy this and everything under this"
<new_user> Ah, okay
Pupeno has joined #ruby
n20420 has left #ruby [#ruby]
urbanmonk has quit [Quit: urbanmonk]
imperator has quit [Quit: Leaving]
dgs has quit [Quit: dgs]
<apeiros> >> ary = ["some string"]; other = ary.dup; other[0].upcase!; other.pop; ary # maybe even better example - shows that the array was copied (ary still contains the string)
<ruboto> apeiros # => ["SOME STRING"] (https://eval.in/432014)
<shevy> eam does perl6 entice you?
dotix has quit [Ping timeout: 272 seconds]
mwlang has quit [Quit: mwlang]
<new_user> thankyou
shmilan has quit [Ping timeout: 246 seconds]
bruno- has joined #ruby
karapetyan has quit [Remote host closed the connection]
bruno- is now known as Guest57885
failshell has quit [Remote host closed the connection]
mwlang has joined #ruby
karapetyan has joined #ruby
doddok has quit [Quit: Leaving]
Coldblackice has quit [Ping timeout: 246 seconds]
ray_ has quit []
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
konsolebox has quit [Quit: Leaving]
Guest57885 has quit [Ping timeout: 264 seconds]
firstdayonthejob has joined #ruby
bruno-_ has joined #ruby
Hrorek has quit [Ping timeout: 250 seconds]
<eam> shevy: nope
<ytti> shevy, just over time
<ytti> shevy, the small don't have to wait for IO
Hrorek has joined #ruby
<ytti> shevy, so CPU gets to work lot
Pupeno has quit [Remote host closed the connection]
Neverdie has quit [Quit: http://radiux.io/]
<ytti> shevy, the larger ones get some downtime due to I/O wait and average CPU use goes down
danman has joined #ruby
danman has quit [Client Quit]
yfeldblum has joined #ruby
Synthead has joined #ruby
Hrorek has quit [Read error: Connection reset by peer]
vickleton has quit [Remote host closed the connection]
Rurik has joined #ruby
mleung has joined #ruby
bruno-_ has quit [Ping timeout: 240 seconds]
tcopeland has quit [Ping timeout: 240 seconds]
Musashi007 has joined #ruby
bruno-_ has joined #ruby
finisherr has joined #ruby
Neverdie has joined #ruby
dogedra is now known as adaedra
Rurik has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
bruno-_ has quit [Ping timeout: 260 seconds]
dopamean_ has quit [Ping timeout: 255 seconds]
<shevy> adaedra! you are back!
<adaedra> I was never far away
c0m0 has quit [Ping timeout: 246 seconds]
<adaedra> If you're talking about my temporary nick, blame apeiros
<apeiros> I didn't not do nothing!
<platzhirsch> We thought you were dead
leafybasil has quit [Remote host closed the connection]
juanpablo_ has quit [Read error: Connection reset by peer]
<eam> I'm still not sure you're not dead
dblessing has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<eam> are ... are you a ghost?
Jackneill has quit [Ping timeout: 265 seconds]
<apeiros> they're a daedra. nuff said.
<shevy> he was undead
<platzhirsch> Fear the Walking Dead
<platzhirsch> that's what I have to say about that
<shevy> fear the roaming platzhirsch!
<eam> "undead" is weird because everyone agrees undead are actually dead
<platzhirsch> indeed
* platzhirsch bells
<platzhirsch> :|
<baweaver> We have ways of dealin' with zombies
* baweaver shines hammer
charliesome has joined #ruby
<shevy> they will hide in threads
<platzhirsch> Where's yorickpeterse
<shevy> a zombie
kadoppe has quit [Ping timeout: 260 seconds]
charliesome has quit [Client Quit]
timonv has joined #ruby
<platzhirsch> Dude, we need your holy XML parser Oga to defeat the zombies
DmitryBochkarev has joined #ruby
<ytti> exec summary, how is it better tha nokogiri, not challenging, just curious
Pupeno has joined #ruby
<adaedra> apeiros: you're the one who give the name!
<adaedra> gave?
<eam> well for one it's newer
<platzhirsch> better than nokogiri? There's something better than nokogiri?
<adaedra> ugh, english,
<apeiros> adaedra: what? I didn't name you adaedra!
<apeiros> or did I?
<adaedra> eam: I'm dead on the inside
<adaedra> apeiros: no, dogedra
kadoppe has joined #ruby
<apeiros> aha
sharkman has quit [Quit: Leaving]
ruurd has quit [Quit: ZZZzzz…]
Pupeno has quit [Remote host closed the connection]
terabytes has quit []
toertore has quit [Read error: No route to host]
bootstrappm has quit [Quit: bootstrappm]
bootstrappm has joined #ruby
northfurr has quit [Quit: northfurr]
<mwlang> what’s the most efficient way to remove “.foo” from this string (“foo” can be any valid model name): “activerecord.attributes.foo.login" => “activerecord.attributes.login”
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adaedra> ['.foo'] = ''
<eam> unless there's another element called .foobar.
arup_r has quit [Quit: Leaving]
<baweaver> string.sub(/\.#{ActiveRecord::Base.descendants.map(&:class_name).join('|')}/,'')
<baweaver> I think it was class_name
<baweaver> Ah, parens around it, sloppy me
xblade has joined #ruby
rbennacer has quit [Remote host closed the connection]
<mwlang> baweaver: so basically depend on all the model names and construct a regexp from them?
<adaedra> yuck
<baweaver> as far as a fast solution
Neverdie has quit [Read error: Connection reset by peer]
<baweaver> either that or look for things that'll be constant for a regex
ekain has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mwlang> I was thinking split on dot, delete 3rd element, rejoin with dot.
<adaedra> ['.foo.'] = '.'
Neverdie has joined #ruby
<adaedra> :p
timonv has quit [Ping timeout: 256 seconds]
bruno-_ has joined #ruby
dman777_alter has quit [Quit: Lost terminal]
<baweaver> just make sure to use non-greedy if you go regex
<baweaver> otherwise extra fun
nettoweb has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ytti> fun fact, non-greedy regex is stricly speaking not regular expression
<ytti> same as positive/negative look ahead/behind
Eddieh_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<ytti> proper regular expression scales extremely well
<mwlang> actually, since I know the “prefix” I want to operate will always be “activerecord.attributes”, perhaps: "activerecord.attributes.#{a.split('.').last}" (where a = "activerecord.attributes.foo.login"
juanpablo_ has joined #ruby
malconis has joined #ruby
<ytti> but these enchanced engines which support uhh, unregular expressions, can scale terribly
<adaedra> ah, I think I see
malconis has quit [Client Quit]
<ytti> (good url, i think i posted it earlier - https://swtch.com/~rsc/regexp/regexp1.html)
mooe has joined #ruby
northfurr has joined #ruby
<ytti> i had used regexps for > decade before reading that few years ago
<ytti> and it was eye opening
<mwlang> hasn’t Ruby replaced it’s RegExp algo with the faster approach by now?
bruno-_ has quit [Ping timeout: 265 seconds]
<adaedra> >> "activerecord.attributes.foo.login".gsub(/\A(activerecord\.attributes)\.(?:[.]+\.)([^.]+)\z/, '\1.\2')
<ruboto> adaedra # => "activerecord.attributes.foo.login" (https://eval.in/432020)
<adaedra> !flip_taple
<adaedra> UGH
<adaedra> wait, what did I even wrote
solars has quit [Ping timeout: 265 seconds]
cek has joined #ruby
<cek> How do you invoke a byebug debugger from withing ruby program?
<cek> "debugger" doesn't work
dgs has joined #ruby
<jhass> cek: I just use pry + pry-byebug
<adaedra> ^
<mwlang> adaedra: is regexp even going to be faster than: "activerecord.attributes.#{a.split('.').last}" if a =~ /^activerecord.attributes/
<jhass> and then require "pry"; binding.pry
<adaedra> a.start_with?
leafybasil has joined #ruby
<ytti> mwlang, the point is, the features ruby offers make regular expression non regular
<ytti> mwlang, academically speaking
apt-get has quit [Ping timeout: 252 seconds]
<ytti> mwlang, which are /impossible/ to scale to same performance as proper regular expression
workmad3 has joined #ruby
<cek> ouch, actually, it worked. It just doesn't stop on debugger but the line after that, so if debugger is the last line, nowhere to stop
<ytti> mwlang, however, this will mostly be academic issue, as the poor scalability will only occur in somewhat constructed examples
<adaedra> mwlang: but otherwise, your solution should be ok
jxv has quit [Remote host closed the connection]
<mwlang> ytti: Ah
<ytti> mwlang, read the article when you have time, it's quite interesting
<mwlang> adaedra: I forgot about start_with? nice change there: "activerecord.attributes.#{a.split('.').last}" if a.start_with? "activerecord.attributes"
nhhagen has quit [Remote host closed the connection]
yqt has quit [Ping timeout: 246 seconds]
<karapetyan> shevy: dat fucking rabbits killing me)
* mwlang almost flunked finite automata class. :-o
mblagden_ has joined #ruby
jamesaxl|2 has joined #ruby
bruno- has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
victortyau has quit [Remote host closed the connection]
<ytti> mwlang, pfft, i'm completely uneducated, that article does not require science background
Voker57 has quit [Read error: Connection reset by peer]
<ytti> i applaud to the author, i know i'm not able to explain complex issues in that clarity
<ytti> to someone who has no clue of the subject, i'm useless
xcesariox has joined #ruby
prefixed has quit [Quit: ( www.nnscript.com :: NoNameScript 4.22 :: www.esnation.com )]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jamesaxl has quit [Ping timeout: 246 seconds]
workmad3 has quit [Ping timeout: 272 seconds]
finisherr has quit [Quit: finisherr]
ordepdev has joined #ruby
xcesariox has quit [Client Quit]
<zenspider> more rabbits? did I miss something?
TheHodge has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
<mwlang> ytti: I am still reading it…roughly halfway through. Well written, but definitely brings back memories, too.
bruno- has quit [Ping timeout: 255 seconds]
ngscheurich has quit [Ping timeout: 264 seconds]
Azure|dc has quit [Quit: Oops.]
cek has left #ruby [#ruby]
mroark has left #ruby [#ruby]
Vile` has joined #ruby
jxv has joined #ruby
khebbie has joined #ruby
firstdayonthejob has quit [Read error: Connection reset by peer]
Musashi007 has quit [Quit: Musashi007]
polishdub has quit [Quit: Leaving]
khebbie has quit [Remote host closed the connection]
Musashi007 has joined #ruby
mleung has quit [Quit: mleung]
deject3d has joined #ruby
bruno- has joined #ruby
Balzrael has quit [Quit: Leaving]
mleung has joined #ruby
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dotix has joined #ruby
dotix has joined #ruby
baweaver has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 244 seconds]
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has joined #ruby
DmitryBochkarev has joined #ruby
bruno- has quit [Ping timeout: 246 seconds]
r_baron has joined #ruby
charliesome has joined #ruby
pikajude has left #ruby ["bye"]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Musashi007 has quit [Quit: Musashi007]
dotix has quit [Ping timeout: 244 seconds]
sufyan has joined #ruby
failshell has joined #ruby
firstdayonthejob has joined #ruby
bruno- has joined #ruby
morenoh149 has quit [Ping timeout: 244 seconds]
andyduf has joined #ruby
xblade has quit []
failshell has quit [Ping timeout: 240 seconds]
<andyduf> Hi
shellie_ has quit [Remote host closed the connection]
shellie__ has quit [Remote host closed the connection]
<andyduf> I am facing an issue with rvm. A gem that I installed in global gemset is not available in other gemsets.
<andyduf> I have posted in detail at stackoverflow http://stackoverflow.com/q/32529350/177116
<andyduf> Any idea what's causing this issue?
bruno- has quit [Ping timeout: 265 seconds]
Prawnzy has joined #ruby
jdawgaz has joined #ruby
finisherr has joined #ruby
elperdut has joined #ruby
firstdayonthejob has quit [Read error: Connection reset by peer]
gamename has joined #ruby
Neverdie has quit [Quit: http://radiux.io/]
jamesaxl|2 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
s00pcan has quit [Ping timeout: 244 seconds]
gamename has quit [Client Quit]
mary5030_ has joined #ruby
Neverdie has joined #ruby
<zenspider> bropages? *sigh*
workmad3 has joined #ruby
bruno- has joined #ruby
s00pcan has joined #ruby
moredhel has quit [Quit: byee]
roxtrongo has quit [Ping timeout: 246 seconds]
mary5030 has quit [Ping timeout: 244 seconds]
karapetyan has quit [Remote host closed the connection]
bmurt has joined #ruby
roxtrongo has joined #ruby
michael_mbp has quit [Excess Flood]
andyduf has quit [Ping timeout: 246 seconds]
bigbadbear has quit [Ping timeout: 265 seconds]
firstdayonthejob has joined #ruby
workmad3_ has joined #ruby
workmad3 has quit [Ping timeout: 268 seconds]
umgrosscol has quit [Remote host closed the connection]
andyduf has joined #ruby
michael_mbp has joined #ruby
<andyduf> zenspider anything wrong with bropages? Care to elaborate?
finisherr has quit [Quit: finisherr]
moredhel has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
senayar has joined #ruby
ngscheurich has joined #ruby
[k- has quit [Ping timeout: 250 seconds]
dopie has quit [Quit: This computer has gone to sleep]
dfockler has quit [Remote host closed the connection]
rbennacer has joined #ruby
<centrx> guys bropages zenspider andyduf
mary5030_ has quit [Remote host closed the connection]
mary5030 has joined #ruby
rbennacer has quit [Ping timeout: 250 seconds]
_aeris_ has quit [Ping timeout: 260 seconds]
juanpablo_ has quit [Quit: (null)]
juanpablo_ has joined #ruby
Axy has quit [Read error: Connection reset by peer]
jhooker has quit [Read error: Connection timed out]
mary5030 has quit [Ping timeout: 244 seconds]
dgs has quit [Ping timeout: 264 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Azure has joined #ruby
_aeris_ has joined #ruby
andyduf has left #ruby [#ruby]
juanpablo_ has quit [Ping timeout: 264 seconds]
jenrzzz_ has joined #ruby
zipace has joined #ruby
tejasmanohar has quit [Quit: tejasmanohar]
symm- has quit [Read error: Connection reset by peer]
zenguy_pc has joined #ruby
levifig has quit [Ping timeout: 252 seconds]
dbussink has quit [Ping timeout: 252 seconds]
culturelabs has quit [Ping timeout: 252 seconds]
lxsameer has quit [Remote host closed the connection]
jeregrine has quit [Ping timeout: 252 seconds]
neektza has quit [Ping timeout: 252 seconds]
im0b has quit [Ping timeout: 252 seconds]
danieli has quit [Read error: Connection reset by peer]
Freeaqingme has quit [Read error: Connection reset by peer]
lipoqil has quit [Ping timeout: 252 seconds]
AdamMeghji has quit [Ping timeout: 252 seconds]
lacrosse has quit [Ping timeout: 252 seconds]
ekain has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
[spoiler] has quit [Ping timeout: 252 seconds]
jxf has quit [Ping timeout: 252 seconds]
HashNuke has quit [Ping timeout: 252 seconds]
symm- has joined #ruby
sdothum has quit [Ping timeout: 252 seconds]
Liam` has quit [Ping timeout: 252 seconds]
twistedpixels has quit [Ping timeout: 252 seconds]
borodin has quit [Ping timeout: 252 seconds]
Liam- has joined #ruby
[spoiler] has joined #ruby
paulcsmith has joined #ruby
banjara has joined #ruby
sdothum has joined #ruby
northfurr_ has joined #ruby
lipoqil has joined #ruby
twistedpixels has joined #ruby
dbussink has joined #ruby
Freeaqingme has joined #ruby
levifig has joined #ruby
chouhoulis has quit [Ping timeout: 244 seconds]
jeregrine has joined #ruby
northfurr_ has quit [Client Quit]
Liam- is now known as Liam`
tcopeland has joined #ruby
charliesome has joined #ruby
HashNuke has joined #ruby
AdamMeghji has joined #ruby
minotep has quit [Ping timeout: 255 seconds]
jxf has joined #ruby
culturelabs has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
ngscheurich has quit [Ping timeout: 268 seconds]
Yzguy has joined #ruby
lacrosse has joined #ruby
neektza has joined #ruby
im0b has joined #ruby
vF3hNGxc47h8 has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
firstdayonthejob has quit [Ping timeout: 264 seconds]
ordepdev has quit [Remote host closed the connection]
bmurt has quit []
zenguy_pc has joined #ruby
failshell has joined #ruby
<BraddPitt> when writing a no-arg method, do you include parens?
<BraddPitt> Also same question for calling a no-method arg
fidalgo has quit [Quit: Konversation terminated!]
mprelude has quit [Ping timeout: 264 seconds]
<mooe> is this the best channel to ask for feedback on first gem?
<BraddPitt> sure mooe
zenguy_pc has quit [Read error: Connection reset by peer]
paulcsmith has quit [Ping timeout: 244 seconds]
ordepdev has joined #ruby
Coldblackice has joined #ruby
bmurt has joined #ruby
atomical has joined #ruby
zenguy_pc has joined #ruby
ordepdev has quit [Remote host closed the connection]
<yorickpeterse> platzhirsch: hat?
<yorickpeterse> * what
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> BraddPitt nah, in this case paren would be superfluous
otacon- has quit [Ping timeout: 244 seconds]
<shevy> tis not be python!
<BraddPitt> mooe is that an ssh public key as the seed?
Zai00 has joined #ruby
<BraddPitt> thanks shevy just didn't know protocol
laphlaw has joined #ruby
workmad3_ has quit [Read error: Connection reset by peer]
<mooe> It's a key that used to be used by 4chan, not sure how it was created originally
bahar has quit [Ping timeout: 265 seconds]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<platzhirsch> yorickpeterse: too late
<platzhirsch> your Oga hammer was required
whippythellama has quit [Quit: WeeChat 1.3]
jeffw_ has quit [Quit: Page closed]
roxtrongo has quit [Remote host closed the connection]
Zai00 has quit [Read error: Connection reset by peer]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Zai00 has joined #ruby
<BraddPitt> are you looking for any particular feedback, mooe ?
<shevy> Yoga hammer?
ht__ has quit [Quit: Konversation terminated!]
dopamean_ has joined #ruby
<shevy> hammer people into being able to do overstretched splits!
<mooe> BraddPitt, I was going to ask f there's a better way to store the seed, and any other general feedback
<laphlaw> Can someone help me out with parsing a string in JSON.. its not making sense to me!
paulcsmith has joined #ruby
<mooe> braddpitt: its also my first time really using tests
solocshaw1 has joined #ruby
solocshaw has quit [Ping timeout: 246 seconds]
solocshaw1 is now known as solocshaw
<shevy> are you sure this is valid laphlaw
elperdut has joined #ruby
failshel_ has joined #ruby
hinbody has quit [Quit: leaving]
failshe__ has joined #ruby
bmurt has quit []
failshell has quit [Ping timeout: 244 seconds]
davedev24 has quit []
kies^ has quit [Read error: Connection reset by peer]
<yorickpeterse> platzhirsch: eh?
<platzhirsch> go back to sleep
<yorickpeterse> oh right
<yorickpeterse> zombies
<platzhirsch> :D
<yorickpeterse> I don't think XML parsers will help with that
kies^ has joined #ruby
failshel_ has quit [Ping timeout: 264 seconds]
<platzhirsch> yes, it's a Viking tool
<yorickpeterse> I think RVM will be more useful in getting rid of the zombies ᕕ(ᐛ)ᕗ
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sepp2k has quit [Quit: Leaving.]
Rutix has quit []
St1gma has quit [Remote host closed the connection]
failshe__ has quit [Ping timeout: 264 seconds]
David27 has joined #ruby
toretore has joined #ruby
failshell has joined #ruby
platzhirsch has quit [Ping timeout: 246 seconds]
Pupeno has joined #ruby
weemsledeux has joined #ruby
dgs has joined #ruby
bdfhjv has joined #ruby
failshell has quit [Ping timeout: 246 seconds]
Pupeno has quit [Ping timeout: 265 seconds]
roxtrongo has joined #ruby
n_blownapart has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
Neverdie has quit [Quit: http://radiux.io/]
Yzguy has quit [Quit: Zzz...]
Yzguy has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bb010g has joined #ruby
Neverdie has joined #ruby
shmilan has joined #ruby
juanpablo_ has joined #ruby
sepp2k has joined #ruby
baweaver has quit [Remote host closed the connection]
tjohnson has quit [Quit: Connection closed for inactivity]
craysiii has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: i've nodded off.]
FernandoBasso has quit [Quit: WeeChat 1.3]