« Back to channel list

#ruby - 11 June 2015

« Back 1 day Forward 1 day »
[00:00:04] omgs: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
[00:00:52] mistermocha: has joined #ruby
[00:01:24] diegoviola: has joined #ruby
[00:01:30] diegoviola: what editor do you guys use?
[00:01:42] Hunter1: so what exactly how does an object differ from a function?
[00:01:43] bruno-: has joined #ruby
[00:01:56] baweaver: zenspider: Looks fine to me, though why not just call it from ruby as a constant?
[00:02:05] bootstrappm: has joined #ruby
[00:02:42] balazs: has joined #ruby
[00:02:51] volty: I use my own editor, written in ruby (#qtruby)
[00:03:01] baweaver: ala Rack::RELEASE
[00:03:14] zenspider: baweaver: as in load the file and refer to the constant?
[00:03:21] zenspider: really there shouldn't be ANY dynamic code in a gemspec
[00:03:33] zenspider: but in this case? meh. it's easy enough to grab
[00:03:49] baweaver: As opposed to regex / grokking ruby as plaintext? Pick your poison I guess.
[00:03:56] bgmarx_: has joined #ruby
[00:03:58] joelataylor: has joined #ruby
[00:04:03] omgs: Aeyrix: OK, there were a lot of custom gems in order to try to maintain compatibility
[00:04:10] Aeyrix: Ah I see.
[00:04:23] omgs: I've renamed the tree so the system libraries load
[00:04:31] zenspider: baweaver: *nod* honestly, I'd rather not have a gemspec checked in at all... but this isn't my project
[00:04:35] baweaver: Or just straight hardcode the thing in there unless something actually depends on RELEASE
[00:05:17] baweaver: Once for startup
[00:06:32] baweaver: https://github.com/rack/rack/blob/99293fa13d86cd48021630fcc4bd5acc9de5bdc3/lib/rack/server.rb#L90
[00:06:34] ruv: has joined #ruby
[00:06:36] baweaver: well, -v flag
[00:07:03] zenspider: ACTION shrugs
[00:07:05] uninitialized: has joined #ruby
[00:07:09] zenspider: eh. it's in my PR
[00:07:13] zenspider: they can do with it as they please
[00:08:00] zenspider: I love getting paid to run very slooooow tests
[00:09:30] baweaver: zenspider: We had 4000 tests at my last job
[00:09:36] baweaver: was running in 10:30 or longer
[00:09:37] sevenseacat: has joined #ruby
[00:09:39] Yiota: has joined #ruby
[00:09:45] baweaver: Got annoyed
[00:09:58] baweaver: last I knew it was running in 1:25 unless they screwed it up again
[00:10:03] beat: has joined #ruby
[00:10:24] baweaver: does wonders for deployment times at least.
[00:10:36] fabrice31: has joined #ruby
[00:10:47] baweaver: though everyone on the floor hated me for a while for depriving them of ruby's equivalent of compile time
[00:10:53] zenspider: number of tests don't matter... it's how slow they average that does. :P
[00:11:30] beat: hello! is there anyone I could chat with on here concerning some problem I'm having with my program?
[00:11:46] zenspider: Finished in 1.999151s, 1818.7721 runs/s, 8929.7907 assertions/s.
[00:11:48] zenspider: 3636 runs, 17852 assertions, 0 failures, 0 errors, 19 skips
[00:11:58] baweaver: ACTION whistles
[00:12:01] zenspider: Bea_: don't ask for permission to ask. just ask.
[00:13:23] hedgecore: has joined #ruby
[00:13:26] shevy: damn... the beaver is ninja trained
[00:13:41] beat: Cool, thanks! I've never done this before, so I apologize! So I'm modding a code given to us to try and create a game. Any game we want. I've modded it so that it displays a nice big screen, and creates a character, and moves that character left and right. But I'm not sure how to move it "down" and "up". I'll post the link to the code in a second.
[00:13:44] shevy: should have written "dam" perhaps again, I forgot :P
[00:15:05] beat: Ah, nuts. I need to grab a couple snippets. Just a moment.
[00:15:12] Aeyrix: baweaver: You should have that as a macro now. ;)
[00:15:48] baweaver: Never macro a problem
[00:15:54] baweaver: I just need to be faster
[00:16:13] baweaver: Lest I bring further dishonor to my name
[00:16:40] drocsid: I'm looking for pointers on writing better and or cleaner code: http://pastie.org/10234673
[00:16:53] Aeyrix: drocsid: tbh that's pretty clean
[00:17:11] Aeyrix: My only suggestion would be newlines above the comments, for easier reading.
[00:17:17] Aeyrix: No comment on functionality, I'm only looking at form.
[00:17:19] beat: Here we are.
[00:17:20] baweaver: Aeyrix: Same reason I twitch when someone says Java isn't bad because the editor hides complexity or writes it for you
[00:17:20] beat: https://gist.github.com/anonymous/ea7259d11c36e9107aa1
[00:17:30] michael_mbp: has joined #ruby
[00:17:35] Aeyrix: baweaver: I won't lie to you, I used to write Java in Sublime Text.
[00:17:47] baweaver: I wrote it in Vim
[00:17:56] Aeyrix: Vim doesn't write anything for ya.
[00:18:04] omgs: I get this error: https://gist.github.com/anonymous/adbbb5d3e6de164dca32
[00:18:16] jesterfraud: has joined #ruby
[00:18:31] baweaver: Aeyrix: Most of the point I use it for languages I'm not familiar with
[00:18:39] baweaver: Forces me to actually learn / memorize it
[00:18:44] Aeyrix: Very good idea.
[00:18:47] baweaver: great if you're going to be whiteboard coding
[00:18:47] beat: Ah. For me? Ok. Let me fix it.
[00:18:52] bb010g: has joined #ruby
[00:19:04] drocsid: Aeyrix: thanks, I'm looking for issues in my logic. Maybe advice about my exception handling. Trying to get pointers to write "better" code.
[00:19:27] jhooker: has joined #ruby
[00:19:34] Aeyrix: drocsid: One final thing on form then, and then I'll be quiet: Space out your assignments.
[00:19:57] Aeyrix: "fail_flag=false" -- "fail_flag = false" is significantly easier to read in the longer term.
[00:20:01] baweaver: Bea_: http://www.dreamincode.net/forums/topic/372710-working-with-2d-arrays-and-trying-to-change-touching-indexes/page__view__findpost__p__2134986
[00:20:05] baweaver: See some of the bounds code
[00:20:12] baweaver: some of that could be used to work with what you have
[00:21:07] drocsid: Aeyrix: Ok, I can do that to make the code more legible. But still looking for issues with my logic, or ways to become a better programmer other than just appearance.
[00:21:19] Aeyrix: Yeah, I know. That's why I said I'll be quiet after that one. :P
[00:21:28] beat: https://gist.github.com/anonymous/c6985292f2349e0272a4 Ok! so please run the bottom file first, and then the dodgeGame.
[00:21:34] dgutierrez1287: has joined #ruby
[00:21:50] beat: game = DodgeGame.new
[00:21:55] swgillespie: has joined #ruby
[00:22:06] beat: game.gameLoop
[00:22:12] baweaver: Bea_: Don't really have time past a glance for now
[00:22:34] jcaho: has joined #ruby
[00:22:35] baweaver: If you post on DreamInCode I can take a look later tonight if you're not having any luck here.
[00:23:14] baweaver: ACTION wanders off
[00:23:45] astrobunny: has joined #ruby
[00:23:45] _ixti_: has joined #ruby
[00:24:06] ruv_: has joined #ruby
[00:24:38] ruv: has joined #ruby
[00:25:36] zenspider: drocsid: your space bar is broken
[00:25:57] ferfoster: has joined #ruby
[00:28:20] zenspider: drocsid: you might want to make messages an array that you push onto and join on message send. it'll make newline handling more consistent
[00:28:45] zenspider: don't rescue Exception unless you REALLY mean it
[00:28:48] zenspider: and in this case, you don't
[00:29:49] uninitialized: has joined #ruby
[00:30:52] RickHull: has joined #ruby
[00:31:10] RickHull: is it normal for `require 'fog'` to take 30 seconds? how can I troubleshoot?
[00:31:16] RickHull: https://gist.github.com/rickhull/c1d9a8205060020d011b
[00:31:43] keen___: has joined #ruby
[00:32:08] millerti: has joined #ruby
[00:32:56] zenspider: haha. that's a big difference
[00:33:36] mike___1234: has joined #ruby
[00:33:43] zenspider: I'm assuming all the fog-* gems are plugins that are manually specified, not dependencies?
[00:34:00] RickHull: i'm not too sure
[00:34:18] zenspider: mmmm... try `gem i -i xxx fog; GEM_HOME=xxx time ruby -rfog -e "puts 'hi'"`
[00:34:18] RickHull: i came into this project, and my comfort level with fog goes about as far as the API it exposes
[00:34:33] zenspider: fog is an amazingly complex project iirc
[00:34:43] zenspider: but that much time is fishy.
[00:34:58] drocsid: zenspider: it's been my experience that rescuing Exception finds subtle bugs that you won't catch otherwise.
[00:34:59] zenspider: rm -rf xxx when you're done
[00:35:03] krisquigley: has joined #ruby
[00:35:09] zenspider: drocsid: impossible
[00:35:15] drocsid: zenspider: I've read the warnings
[00:35:23] zenspider: if you don't rescue them, they bubble up as uncaught exceptions
[00:35:42] zenspider: if you do rescue them, you cause other problems.
[00:35:43] revoohc: has joined #ruby
[00:35:49] zenspider: you're rescueing Interrupt, for example
[00:36:11] zenspider: you're recusing NoMemoryError
[00:36:19] zenspider: all sorts of stuff you shouldn't be
[00:36:20] RickHull: zenspider: all those fog-* are deps, looks like
[00:36:29] zenspider: RickHull: shit. then my test is sorta bogus
[00:36:31] RickHull: still installing... on a 8-core xeon
[00:36:42] zenspider: tho... it might be proportional to the rest of the gems you have installed
[00:36:43] robustus|Off: has joined #ruby
[00:36:51] RickHull: i'm interested to see the result
[00:36:54] zenspider: could just be shitty hard drive seek times for all I know
[00:37:05] drocsid: ok, point taken about the exception. Still looking for flaws in my logic, like problems with the way I use blocks, etc.
[00:37:08] zenspider: tell me you're not loading off of tape :P
[00:37:48] zenspider: the code is ugly. the logic seems fine
[00:37:54] RickHull: i've got an array of monkeys moving checkers around a big checkerboard
[00:38:08] Aeyrix: Try more monkeys.
[00:38:13] Aeyrix: Or a smaller checkerboard.
[00:38:28] zenspider: RickHull: that's bad. I've heard logic goes bad when they get hungry
[00:38:31] drocsid: zenspider: Please suggest how to make it less ugly
[00:38:41] zenspider: drocsid: use your space bar more and more consistently
[00:39:38] zenspider: I would also recommend a few more blank lines to break up paragraphs
[00:40:32] soasme: has joined #ruby
[00:42:00] RickHull: zenspider: prepending GEM_HOME=xxx fucks up `time`'s output for whatever reason
[00:42:08] RickHull: but it actually takes longer
[00:42:18] zenspider: drocsid: you're also inconsistent about your indentation. 2 spaces per indent
[00:42:32] baweaver: has joined #ruby
[00:42:46] zenspider: RickHull: it makes time output a 1-liner, which I actually like better
[00:42:50] zenspider: I frequently do X=1 time blahblah
[00:43:12] RickHull: huh, it's rather incomprehensible to me
[00:43:15] zenspider: RickHull: do it again to ensure everything is hot
[00:43:16] RickHull: updating gist...
[00:43:48] RickHull: https://gist.github.com/rickhull/c1d9a8205060020d011b
[00:43:53] drocsid: yeah I prefer 2 spaces per indentation, but lazy to figure out how to set it permanently in vim
[00:44:08] CloCkWeRX: has joined #ruby
[00:44:14] Radar: That's a fun Gist.
[00:44:40] drocsid: is there a nice code formatter for ruby, something to auto-reformat it from the command line
[00:45:01] Radar: drocsid: Format it according to who's standard? :)
[00:45:45] RickHull: drocsid: generally handled by your editor
[00:45:54] Aeyrix: drocsid: sed 's/\t/ /g'
[00:46:01] phutchins: has joined #ruby
[00:46:09] uninitialized: has joined #ruby
[00:46:21] wallerdev: has joined #ruby
[00:46:50] drocsid: Aeyrix: gonna tab it out?
[00:47:00] Aeyrix: Doesn't vim use tabs by default?
[00:47:04] Aeyrix: I genuinely forget.
[00:47:06] miah: rubocop -a
[00:47:09] Aeyrix: Four spaces?
[00:47:59] zenspider: RickHull: holy shit. what did you do?!?
[00:48:13] RickHull: it's all in the gist
[00:48:17] zenspider: RickHull: mmm... just in case, tack on GEM_PATH= on the front
[00:48:33] zenspider: idgi... how does it get slower?
[00:48:45] RickHull: maybe newer versions?
[00:48:51] Radar: RickHull: I'd love to see what GEM_PATH is really
[00:48:55] Radar: "xxx" isn't useful :)
[00:49:14] zenspider: xxx is useful. it's a private repo with nothing else in it
[00:49:19] zenspider: literal "xxx"
[00:49:27] RickHull: do you want GEM_PATH=xxx ?
[00:49:51] zenspider: `GEM_HOME=xxx GEM_PATH= time blahblah` should be as clean as you can get
[00:50:01] drocsid: miah: thanks, I will try that.
[00:50:34] zenspider: drocsid: I don't know vim. plenty here do. I know it isn't hard to set up for ruby tho and get it to indent everything
[00:50:38] RickHull: zenspider: heh, that did it
[00:50:58] RickHull: updated https://gist.github.com/rickhull/c1d9a8205060020d011b
[00:51:04] zenspider: ok. so it got slower because an existing GEM_PATH made everything concatenate
[00:51:13] RickHull: it looks like my GEM_PATH is problematic
[00:51:35] zenspider: `gem list | wc -l ; GEM_HOME=xxx GEM_PATH=xxx gem list | wc -l`
[00:52:02] RickHull: i was running chruby with user installed rubies and gems
[00:52:09] RickHull: and then switched to system rubies and gems
[00:52:56] uninitialized: has joined #ruby
[00:55:08] commondream: has joined #ruby
[00:56:04] sharpmachine: has joined #ruby
[00:56:35] _seanc_: has joined #ruby
[00:56:50] drocsid: Avoid using {...} for multi-line blocks.
[00:56:57] drocsid: what should I use then?
[00:57:08] Yzguy: has joined #ruby
[00:57:28] Peleus: has joined #ruby
[00:57:34] rickmasta: has joined #ruby
[00:57:45] drocsid: RickHull: thanks
[00:57:45] drewo: has joined #ruby
[00:57:46] Peleus: Hey folks, wondering how I can avoid specific ruby gems being exported into my path
[00:57:52] Peleus: (with rvm)
[00:57:54] vdamewood: has joined #ruby
[00:58:03] RickHull: Peleus: you can also try #rvm
[00:58:45] cmisenas: has joined #ruby
[00:59:23] jgt3: has joined #ruby
[01:01:27] hdev1: has joined #ruby
[01:01:51] psmolen: has joined #ruby
[01:01:52] zenspider: drocsid: depends on your viewpoint. I prefer the Weirich Method, which says use {} when you are using a block functionally (ie, you care about the result--like map) and do/end when you're using it procedurally (ie, you don't care about the block result--like each)
[01:02:01] yaw: has joined #ruby
[01:02:10] bruno-: has joined #ruby
[01:02:13] zenspider: that way you can look at a block and immediately know how it is being used and whether you should pay attention to how it evaluates
[01:02:32] yaw: has left #ruby: ()
[01:02:35] zenspider: Peleus: exported into your path?
[01:03:15] dopie: has joined #ruby
[01:06:03] Peleus: zenspider: It appears to be exported in, but checking out bash_profile it's not explictly stated in there, so I'm not sure how rvm usually does it
[01:06:06] war_pigs: has joined #ruby
[01:06:07] zenguy_pc: has joined #ruby
[01:06:30] zenspider: I don't understand your words/problem. sorry.
[01:07:22] fujimura: has joined #ruby
[01:08:59] havenwood: has joined #ruby
[01:09:04] jhooker: has joined #ruby
[01:10:06] RickHull: i believe he wants specific gem executables to not show up in his PATH
[01:11:17] RickHull: zenspider: any thoughts on what my 30-45second problem is, how to fix?
[01:12:06] RickHull: i think my GEM_PATH is ok; it allows my user to install gems to homedir but also require system-installed gems
[01:12:18] RickHull: (if i understand correctly)
[01:12:38] RickHull: 142 gems installed doesn't ~seem~ problematic
[01:12:41] hedgecore: has joined #ruby
[01:12:44] pengin: has joined #ruby
[01:12:54] pkrnj: has joined #ruby
[01:12:59] idafyaid: has joined #ruby
[01:13:33] sevenseacat: seems like a normal rails app.
[01:13:36] sevenseacat: ACTION ducks
[01:14:07] RickHull: no rails here, sorry
[01:14:21] sevenseacat: just saying, its not problematic, itsn ormal.
[01:14:57] sevenseacat: my current rails app: "Bundle complete! 90 Gemfile dependencies, 223 gems now installed."
[01:15:03] Cyberheb: has joined #ruby
[01:15:36] joaomdmoura: has joined #ruby
[01:15:41] Cyberheb: has joined #ruby
[01:16:06] zenspider: RickHull: what version of ruby and rubygems?
[01:16:15] zenspider: and please do that gem list | wc -l thing I gave above
[01:16:17] Cyberheb: has joined #ruby
[01:16:24] RickHull: I did, it was 142 versus 33
[01:16:36] RickHull: er, 133 vs 42
[01:16:46] _seanc_: has joined #ruby
[01:16:47] RickHull: ruby 2.1.5, gem 2.2.2
[01:16:56] Cyberheb: has joined #ruby
[01:17:16] RickHull: i think this could be a chruby problem relating to GEM_HOME and GEM_PATH
[01:17:16] zenspider: that's not too bad... hrm
[01:17:33] RickHull: logged in as root, using the same ruby
[01:17:36] Cyberheb: has joined #ruby
[01:17:40] RickHull: GEM_HOME and GEM_PATH are empty
[01:17:51] RickHull: fog loads in 0.4s real
[01:17:59] zenspider: time ruby -rubygems -e 'p Gem.find_files("**/*.rb").size'
[01:18:10] Diabolik: zenspider im nearly done :D
[01:18:11] zenspider: both without GEM_PATH/HOME and with
[01:18:12] Diabolik: https://github.com/askl56/Checkout
[01:18:12] Cyberheb: has joined #ruby
[01:18:23] Diabolik: can you give me a pointer with the total method in checkout.rb
[01:18:37] bgmarx: has joined #ruby
[01:18:48] Radar: Diabolik: inject
[01:18:52] Cyberheb: has joined #ruby
[01:19:02] zenspider: that really looks like homework / interview test
[01:19:08] sevenseacat: it is an interview test
[01:19:20] sevenseacat: just like the last one :P
[01:19:29] Diabolik: sevenseacat i got a job with the last one
[01:19:32] Cyberheb: has joined #ruby
[01:19:32] Diabolik: but it starts in august
[01:19:47] sevenseacat: wheres our commission? :P
[01:19:51] joelataylor: has joined #ruby
[01:19:54] RickHull: zenspider: updated at the bottom https://gist.github.com/rickhull/c1d9a8205060020d011b (root user, no GEM_PATH or GEM_HOME)
[01:19:56] Diabolik: pm me your paypal
[01:20:06] RickHull: running same thing now as normal user
[01:20:12] Cyberheb: has joined #ruby
[01:20:35] zenspider: well shit. that's fast enough
[01:20:45] RickHull: yeah, that fast as my normal user
[01:20:52] Cyberheb: has joined #ruby
[01:20:57] RickHull: with non-empty GP and GH
[01:21:28] zenspider: so that's not the problem... I dunno what is. how stranger
[01:21:28] Cyberheb: has joined #ruby
[01:21:41] RickHull: updated with numbers from normal user
[01:21:49] Peleus: has left #ruby: ()
[01:21:55] zenspider: damn... the old russian woman was right.
[01:21:59] bkxd: has joined #ruby
[01:22:07] Cyberheb: has joined #ruby
[01:22:34] Diabolik: sevenseacat Radar just picked up the commission for #ruby
[01:22:37] Diabolik: go speak to him
[01:22:44] Cyberheb: has joined #ruby
[01:22:45] zenspider: the secret is the pyickle in the gouyash
[01:22:50] penzur: has joined #ruby
[01:22:59] yaw: has joined #ruby
[01:23:21] sevenseacat: ACTION will mug Radar for his $5 tomorrow
[01:23:24] Cyberheb: has joined #ruby
[01:23:39] zenspider: goulyash... sorry. I hope I didn't offend anyone. :P
[01:23:56] sevenseacat: if someone's making goulash, I'm there.
[01:24:39] centrx: has joined #ruby
[01:24:40] dgutierrez1287: has joined #ruby
[01:24:55] goodcodeguy: has joined #ruby
[01:25:53] Yiota: has joined #ruby
[01:26:00] tkuchiki: has joined #ruby
[01:26:23] nofxx: has joined #ruby
[01:26:34] axl_: has joined #ruby
[01:27:17] RickHull: zenspider: running ruby-prof using my user versus root; i think my setup is making rubygems do something pathological
[01:27:55] zenspider: omnomnom all gone
[01:28:07] zenspider: RickHull: I'd love to know what it is once you figure it out.
[01:29:02] RickHull: wow, it's interesting
[01:29:05] RickHull: posting a new gist
[01:29:11] RickHull: not sure what is going on
[01:29:15] noethics: has joined #ruby
[01:30:41] Radar: sevenseacat: I will spend the money on cider for tomorrow. Do you drink that?
[01:30:45] RickHull: https://gist.github.com/rickhull/11a16be0dc1ceb4da886
[01:30:56] sevenseacat: haha, no, but thats cool :)
[01:31:03] surrounder: has joined #ruby
[01:31:07] RickHull: keep in mind, root and normal user are using the ruby and same gem; root user performs normally; normal user performs pitifully
[01:31:09] Radar: sevenseacat: Iced coffee instead? :P
[01:31:12] claw: has joined #ruby
[01:31:30] sevenseacat: now you're speaking my language. buy me an iced coffee in brooklyn or something.
[01:31:39] LicHacker: has joined #ruby
[01:31:43] Aeyrix: I don't think $5 will get Radar to Brooklyn and back.
[01:31:58] Radar: Aeyrix: You'll be surprised.
[01:32:02] bronson_: has joined #ruby
[01:32:02] nofxx: iced coffee? get me a double ristretto please
[01:32:19] Aeyrix: ... Wait, you don't mean the Brooklyn in the USA, right.
[01:33:09] bootstrappm: has left #ruby: ()
[01:33:46] zenspider: RickHull: can you gist your installed gems?
[01:33:51] ImperialWizard: has joined #ruby
[01:33:52] zenspider: the pathological case list
[01:34:00] ImperialWizard: hello fellow white brothers and sisters
[01:34:06] havenwood: !mute ImperialWizard
[01:34:07] ruboto: +q ImperialWizard!*@*
[01:34:07] ruboto: -o ruboto
[01:34:32] Radar: gg havenwood
[01:34:46] ImperialWizard: has left #ruby: ()
[01:35:10] zenspider: aren't you supposed to direct them to ruby-banned? :P
[01:35:21] zenspider: ruboto prolly should in a PM
[01:35:48] zenspider: I need to remember that I coded it to /stfu
[01:37:07] RickHull: zenspider: updated https://gist.github.com/rickhull/11a16be0dc1ceb4da886
[01:37:21] NeverDie: has joined #ruby
[01:37:39] houhoulis: has joined #ruby
[01:38:51] RickHull: I think Gem::Specification#conflicts is important
[01:39:10] zenspider: RickHull: man... ever thought about doing a gem clean?
[01:39:18] RickHull: hasn't crossed my mind
[01:39:38] dfockler: has joined #ruby
[01:39:51] zenspider: I'd be curious ... do a `gem clean gitdis` and see if that affects your times
[01:39:55] zenspider: I'm thinking wide vs tall
[01:40:17] caseypatrickdris: has joined #ruby
[01:40:35] RickHull: did `gem clean`
[01:40:37] RickHull: and now things are normal
[01:40:50] RickHull: i'd suggest this is still maybe a useful bug / test case
[01:41:58] zenspider: you can always reinstall that list :P
[01:41:59] RickHull: added gem clean output
[01:42:06] RickHull: to the gist
[01:42:43] ledestin: has joined #ruby
[01:43:08] jesterfraud: gem clean should be gem polish
[01:43:22] baweaver: has joined #ruby
[01:43:39] zenspider: jesterfraud: hah. send in a PR
[01:44:13] Forgetful_Lion: has joined #ruby
[01:44:23] centrx: has joined #ruby
[01:45:27] hedgecore: has joined #ruby
[01:48:13] jesterfraud: zenspider: but they we might have to be multicultural, and gem egyptian just doesn't have the same ring to it
[01:49:03] juanpaucar: has joined #ruby
[01:50:13] Frem: has joined #ruby
[01:50:46] xxneolithicxx: has joined #ruby
[01:51:02] balazs: has joined #ruby
[01:51:15] vdamewood: has joined #ruby
[01:52:34] bosma_: has joined #ruby
[01:52:47] deric_skibotn: has joined #ruby
[01:52:51] Oog: has joined #ruby
[01:54:52] casadei: has joined #ruby
[01:56:47] sharpmachine: has joined #ruby
[01:56:58] bmurt: has joined #ruby
[01:59:24] fabrice31: has joined #ruby
[01:59:35] mwlang: has joined #ruby
[01:59:52] e1nh4nd3r: has joined #ruby
[02:00:01] mwlang: Instead of chaining a bunch of gsubs like this: ???.gsub(/&lt;/,'<').gsub(/&gt;/, '>').gsub(/&amp;/, ???&???)??? Is there a cleaner way to accomplish the same?
[02:00:15] e1nh4nd3r: has joined #ruby
[02:00:47] e1nh4nd3r: has joined #ruby
[02:00:49] mwlang: I???d love to do this: .gsub(/&lt;|&gt;|&amp;/, /<|>|&/)
[02:02:39] eam: mwlang: I like to build a hash of str => str and just do it that way
[02:02:42] dopie: has joined #ruby
[02:02:52] soasme: has joined #ruby
[02:03:04] mwlang: eam: yeah, I???ve done that in the past.
[02:03:08] eam: .gsub kv.keys.join "|", { |m| kv[m] }
[02:03:49] endorphine: has joined #ruby
[02:03:50] bkxd: has joined #ruby
[02:03:52] sivoais: has joined #ruby
[02:04:47] mwlang: eam: ah. haven???t used the block signature in a few years???.plain forgot about that approach.
[02:05:03] freerobby: has joined #ruby
[02:05:13] zenspider: mwlang: I hope that's just for example and you're not actually doing that
[02:05:26] zenspider: otherwise, your NIH is strong
[02:05:33] DynamicMetaFlow: has joined #ruby
[02:05:37] mwlang: zenspider: no, it???s real code. I???m refactoring it.
[02:05:43] sevenseacat: the NIH is strong with this one
[02:06:05] Diabolik: sevenseacat
[02:06:06] mwlang: it stinks to high heaven and back.
[02:06:07] Diabolik: i have problems
[02:06:15] sevenseacat: Diabolik: so do i.
[02:06:21] sevenseacat: "not invented here"
[02:06:24] Diabolik: sevenseacat can i fix yours
[02:06:27] sevenseacat: aka reinventing wheel
[02:06:39] sevenseacat: Diabolik: i dont know, are you a psychologist?
[02:06:39] zenspider: >> "a b c d".gsub(/[abcd]/, "a" => 1, "b" => 2, "c" => 3, "d" => 4)
[02:06:40] ruboto: zenspider # => "1 2 3 4" (https://eval.in/379386)
[02:06:46] Diabolik: sevenseacat somewhat
[02:06:49] Diabolik: i did a year of it at uni
[02:06:55] mwlang: heh???literally???it wasn???t ???invented here??? I inherit a lot of junk. ;-)
[02:07:08] mwlang: but sometimes the junk baffles me as to best way to refactor, so I ask.
[02:07:30] zenspider: mwlang: in this case you should be using nokogiri or something else to do escaping/unescaping
[02:07:46] zenspider: but, a kludge for now would be the snippet above
[02:08:53] mwlang: zenspider: I actually think I can delete the entire line as the end goal. :-)
[02:09:32] mwlang: it???s mainly being used to insert a ???pre-processed payload??? into a log table in the dbms???but, uhm, well, they???re preprocessing it.
[02:09:57] mwlang: so once I get Nokogiri behind the driver seat, I???ll just post to the dbms with doc.to_xml or some such.
[02:10:03] hahuang65: has joined #ruby
[02:10:38] mwlang: heh???I should say behind the wheel as behind the driver???s seat is my position right now???.backseat driver. :-p
[02:12:52] duderonomy: has joined #ruby
[02:13:47] mwlang: but if you really want something to chortle over ??? refactor this line: if http://check.type.to _s == "TrueClass"
[02:14:24] sevenseacat: ive seen things like that in tests before.
[02:14:49] balazs: has joined #ruby
[02:14:52] znz_jp: has joined #ruby
[02:15:20] mwlang: sevenseacat: I feel your pain.
[02:15:53] goodcodeguy: has joined #ruby
[02:16:05] mwlang: heh???that didn???t paste right???. if check.type.to _s == "TrueClass"
[02:16:19] zenspider: I got the point of it
[02:16:44] mwlang: anyway, that was awfully darn creative checking the class name instead of just checking truthness of the value
[02:17:01] bnagy: can you explain it again?
[02:17:04] bnagy: not sure I follow
[02:17:18] zenspider: if true.class.name == "TrueClass" then ... end
[02:17:38] zenspider: if true then ... end
[02:17:47] mwlang: basically turn an object???s class name into a string and see if it matches
[02:18:18] bnagy: . o O (sarcasm detectors are offline, captain)
[02:18:22] pkrnj: has joined #ruby
[02:18:44] zenspider: bnagy: bah you
[02:19:01] ponga: has joined #ruby
[02:21:18] RegulationD: has joined #ruby
[02:22:12] mwlang: what a timely post: ???they aren???t my problems; they were just dumped in my lap, along with a canvas sack with a dollar sign on it.??? http://eev.ee/blog/2015/06/09/i-quit-the-tech-industry/
[02:23:34] sevenseacat: i wish i had that luxury.
[02:23:50] krisquigley: has joined #ruby
[02:23:59] sevenseacat: 'yeah I dont want to work anymore, so I quit my job and paid off my mortgage with the proceeds'
[02:24:41] sevenseacat: but in all honesty, the first part of that post strikes me as completely normal, well, normal for me anyway
[02:24:53] BTRE: has joined #ruby
[02:24:54] jenrzzz: has joined #ruby
[02:25:19] mwlang: I thought he made some good points about how everybody constantly recreates the wheel.
[02:26:05] mary5030: has joined #ruby
[02:26:10] chipotle: has joined #ruby
[02:26:34] arescorpio: has joined #ruby
[02:27:02] hubcaps: has joined #ruby
[02:27:17] mwlang: although I???m encountering a lotta of crap nowadays working contracts, at least I get paid to do it and there???s no politics involved. If they???re happy with my fixes, they give me more work, if they???re not, well, another client comes along to please even more. Life is happy.
[02:27:48] mwlang: my problem is I haven???t lost any clients and they keep coming back for more. :-o
[02:28:30] michael_mbp: has joined #ruby
[02:31:49] jsrn: has joined #ruby
[02:33:53] sevenseacat: also, he isnt 'leaving the tech industry' if hes still going to be programming his own things
[02:34:31] CyborgCygnus: has joined #ruby
[02:34:58] sevenseacat: so many of the comments are like 'well duh yeah I worked for three years, saved up 30 years worth of living expenses, and now am living my dream, why arent you'
[02:35:07] sevenseacat: I want to smack these people
[02:35:25] joelataylor: has joined #ruby
[02:35:37] mwlang: heh???I was wondering about that, too.
[02:36:02] mwlang: I think he???s leaving his boss and he thinks he???s leaving ???stupidity of the industry??? behind.
[02:36:09] sevenseacat: yeah good luck with that
[02:36:53] sevenseacat: dont get me wrong, i admire what he's doing, but its just worded really oddly
[02:36:55] mwlang: I still see stupidity, and at a more rapid rate (more project churn), but the difference is, I ain???t caught in the quagmire.
[02:37:15] sevenseacat: if i could quit my job tomorrow and they would pay off my mortgage, i would
[02:38:08] attlasbot: has joined #ruby
[02:38:56] mrsolo: has joined #ruby
[02:39:06] sevenseacat: also, 'I???ve worked remotely my whole career, from states with no income tax too.' wat? no income tax?
[02:39:36] sevenseacat: that must be how the 'i saved up 100 years of living expenses' thing works
[02:39:43] bogdanteleaga: has joined #ruby
[02:39:56] sevenseacat: i could save a lot of money too if i didnt fork 40% of my paycheck to the government
[02:40:11] bnagy: that is a lot of tax
[02:40:17] amclain: has joined #ruby
[02:40:48] mwlang: sevenseacat: same here.
[02:41:32] Spami: has joined #ruby
[02:41:41] Obfuscate: sevenseacat: http://taxfoundation.org/blog/top-state-income-tax-rates-2014
[02:42:25] Obfuscate: Note that they would still have to pay federal taxes, and usually those states have higher taxes for other things.
[02:42:46] sevenseacat: well thats confusing
[02:42:49] mwlang: Move to Puerto Rico and Act 20/22 status. :-)
[02:42:52] sevenseacat: state *and* federal taxes?
[02:43:18] willharrison: has joined #ruby
[02:43:37] Obfuscate: I guess if you moved to Texas and lived in a small apartment, your taxes would be as about as low as the federal goverment would allow.
[02:44:16] Yzguy: has joined #ruby
[02:44:22] Yiota: has joined #ruby
[02:44:35] Yiota: how similar are ruby and python?
[02:45:12] justintv90: has joined #ruby
[02:45:52] mwlang: Yiota: not very. one is spatially oriented, the other just rocks. :-)
[02:46:00] justintv90: has joined #ruby
[02:46:07] bnagy: Yiota: why do you ask?
[02:46:20] nofxx: Yiota, whoever say they are sisters are lying. python's OO is childsh
[02:46:53] Yiota: I have an interview tomorrow, they want expertise in Ruby, HOWEVER I told them that given the similarity of both languages, I would be able to pick it up easily. They said that SQL and Python proficiency would be a nice to have.
[02:46:58] jenrzzz: has joined #ruby
[02:47:04] justintv90: has joined #ruby
[02:47:11] bkxd: has joined #ruby
[02:47:27] nofxx: Yiota, ah, it's the easy path then... ruby to any other is way harder than any other to ruby ;)
[02:47:31] Yiota: I really hope I get it because it would put me on the right track to do data science
[02:47:57] zenguy_pc: has joined #ruby
[02:48:03] nofxx: Yiota, to the free courses, codeschool or codeacademy
[02:48:04] justintv90: has joined #ruby
[02:48:10] havenwood: has joined #ruby
[02:48:13] nofxx: you'll be coding in no time
[02:48:17] Yiota: I think their website is built on ruby on rails, and that's why they want it
[02:48:17] bnagy: well you don't really have any huge concepts to relearn going python -> ruby ( or ruby -> python )
[02:48:17] balazs: has joined #ruby
[02:48:21] bnagy: so seems legit
[02:48:29] bnagy: ohhh Rails is a whole nother kettle of fish
[02:48:39] Yiota: Yeah, it's not website dev though
[02:48:55] Yiota: their website is built on rails, so I think they want an understanding of Ruby so that you can interact with the server
[02:49:01] justintv90: has joined #ruby
[02:49:13] Yiota: most of it will be parsing, cleaning and wrangling data and then uploading it to the server.
[02:49:15] nofxx: Yiota, yeah.. don't go there just yet, give just ruby some days, write some code.
[02:49:29] Dreamer3_: has joined #ruby
[02:49:44] justintv90: has joined #ruby
[02:50:31] Yiota: also, offtopic. Tie or no tie for tomorrow's interview?
[02:50:46] Yiota: granted it's humid and hot
[02:51:07] bruno-: has joined #ruby
[02:51:28] Vile`: has joined #ruby
[02:52:27] jwaldrip_: has joined #ruby
[02:52:42] bnagy: wear what they'll be wearing
[02:53:30] Dingus: has joined #ruby
[02:57:38] sharpmachine: has joined #ruby
[02:58:32] fujimura: has joined #ruby
[03:04:38] Trynemjoel: has joined #ruby
[03:05:37] balazs: has joined #ruby
[03:06:00] baweaver: has joined #ruby
[03:07:01] dfinninger: has joined #ruby
[03:08:10] mdz_: has joined #ruby
[03:10:13] pontiki: has joined #ruby
[03:13:26] astrobun_: has joined #ruby
[03:15:18] braincrash: has joined #ruby
[03:20:15] jpfuentes2: has joined #ruby
[03:23:04] Exponential: has joined #ruby
[03:24:10] darkf: has joined #ruby
[03:25:57] mrsolo: has joined #ruby
[03:26:19] swgillespie: has joined #ruby
[03:26:37] dfinninger: has joined #ruby
[03:28:07] yfeldblum: has joined #ruby
[03:28:27] CalvinnHobbes: has joined #ruby
[03:28:43] EasyCo: has joined #ruby
[03:33:00] dfinninger: has joined #ruby
[03:33:02] jwaldrip_: has joined #ruby
[03:33:06] djdarkbeat: has joined #ruby
[03:33:08] aaeron: has joined #ruby
[03:34:00] vitorino: has joined #ruby
[03:34:08] yfeldblum: has joined #ruby
[03:34:38] jesterfraud: Yiota: I'd recommend wearing clothes
[03:34:54] jesterfraud: tie never hurts though, unless they're an incredibly casual place
[03:35:28] Yiota: has joined #ruby
[03:36:34] dfinninger: has joined #ruby
[03:36:40] aaeron_: has joined #ruby
[03:37:15] pontiki: live dangerously: wear a cravat
[03:37:46] juanpaucar: has joined #ruby
[03:38:43] sevenseacat: clothes are a definite good idea.
[03:41:06] dfinninger: has joined #ruby
[03:43:08] jesterfraud: pontiki: TIL I live dangerously at weddings
[03:43:24] jesterfraud: maybe I should wear a cravat daily
[03:43:50] pontiki: you should. it's a better fashion statement than even a bow-tie
[03:44:01] revath: has joined #ruby
[03:44:20] pontiki: one doesn't just accidentally wake up and put on a cravat
[03:44:31] jesterfraud: depends how drunk you are?
[03:44:54] pontiki: well, doesn't everything?
[03:45:25] mike___1234: has joined #ruby
[03:45:34] Axsuul: has joined #ruby
[03:45:49] sharpmachine: has joined #ruby
[03:45:49] ttilley: has joined #ruby
[03:45:55] jesterfraud: there's a stage of drunk at which using regex to parse HTML seems reasonable
[03:45:56] ttilley: has joined #ruby
[03:46:16] pontiki: it's right next to the balmer peak, innit?
[03:46:33] CyborgCygnus: has joined #ruby
[03:46:43] pontiki: when you not only think it's a good idea, but you implement it and it turns into something great
[03:46:55] mcclurmc_: has joined #ruby
[03:47:02] bronson_: has joined #ruby
[03:47:08] pontiki: the rest of us are just doing Windows ME over and over again
[03:48:12] xxneolithicxx: so says microsoft bob and clippy
[03:48:19] fabrice31: has joined #ruby
[03:48:50] dfinninger: has joined #ruby
[03:50:50] goodcodeguy: has joined #ruby
[03:51:23] dfinninger: has joined #ruby
[03:51:32] jamto11: has joined #ruby
[03:51:43] gianlucadv: has joined #ruby
[03:51:43] pontiki: has joined #ruby
[03:52:17] pontiki: dammit. cmd-Q is NOT cmd-Tab
[03:52:31] rkazak: has joined #ruby
[03:53:04] gix: has joined #ruby
[03:53:36] jamto11_: has joined #ruby
[03:54:25] Aeyrix: pontiki: I make that mistake so many times a day.
[03:56:00] Oog: has joined #ruby
[03:56:03] aaeron: has joined #ruby
[03:56:47] spider-mario: has joined #ruby
[03:57:13] jesterfraud: remap q to tab, it's not like you need to use q that often
[03:57:37] aphprentice: has joined #ruby
[03:57:40] pontiki: that'd be hard. i use tab a *LOT*
[03:57:41] Palmer11: has joined #ruby
[03:57:45] jesterfraud: it's quite rare to use, a little quaint key in the corner
[03:58:10] jesterfraud: cmd q is a terrible shortcut, imo
[03:58:13] nertzy: has joined #ruby
[03:58:36] pontiki: i wonder if you can remap the mac like that, actually
[03:58:51] pontiki: i could change it opt-cmd-F4
[03:59:15] jesterfraud: sorta, I would imagine
[03:59:21] jesterfraud: some programs would hardcode it
[04:00:14] jesterfraud: although you'd probably be able to intercept that keypress and turn it into something else, using some kind of utility
[04:03:51] skade: has joined #ruby
[04:04:13] mrsolo: has joined #ruby
[04:04:29] Axsuul: has joined #ruby
[04:04:34] iamninja: has joined #ruby
[04:07:19] commondream: has joined #ruby
[04:07:53] shevy: hey you can also make your point without clothes
[04:07:53] balazs: has joined #ruby
[04:08:09] shevy: see the movie Catch-22, with captain youssarian who no longer wants to fly on missions
[04:11:01] RegulationD: has joined #ruby
[04:11:21] soasme: has joined #ruby
[04:12:39] morissette: has joined #ruby
[04:12:45] morissette: Anyone ever have to synchronize Outlook Web App 2013 into a JS Calendar?
[04:12:58] krisquigley: has joined #ruby
[04:13:27] ttilley: morissette: jesus christ on a stick, that sounds painful. whatever you end up doing, i'm sorry and you have my sympathy
[04:14:06] morissette: That is about the same answer I have gotten everywhere.... why can't microsoft just implement restful api's with everything....
[04:14:24] pontiki: and make an open system that anyone can write to??
[04:14:44] pontiki: write to/read from
[04:14:45] morissette: I'm open to any solution even if I have to cry myself all the way to C# if anyone has anything
[04:14:59] morissette: outside of mechanize web scraping hackery
[04:15:03] pontiki: strange you asking in ruby tho
[04:15:06] ttilley: pontiki: don't laugh, they just wrote an open source visual studio alike with a supported linux port and everything. who the fuck knows what'll come out of microsoft these days
[04:15:22] morissette: I asked in every lang I know lol
[04:15:30] morissette: hoping for someone that has experience
[04:15:38] morissette: I'm writing the app in Angular/PHP back
[04:15:48] pontiki: ttilley: i said many years ago they should stop writing operating systems and build their desktop on linux.
[04:16:22] jamto11: has joined #ruby
[04:17:04] pontiki: ttilley: but then it was pointed out to me that then they couldn't control everything
[04:17:05] Evidlo: Is `bundle install` supposed to install a ruby binary in addition to all the other packages?
[04:17:07] ttilley: morissette: unless i'm confused, outlook still supports IMAP. you'll have to do batch jobs out-of-band probably, but why can't you connect to it via a supported protocol? is IMAP disabled? (note that asking these questions is about as much effort as i'm willing to put into that problem, no offense)
[04:17:09] morissette: pontiki: in a perfect world where users knew how to troubleshoot things
[04:17:13] pdoherty: pontiki: that'd be something! `sudo apt-get install windows-desktop`
[04:17:33] morissette: ttilley: is the calendar over IMAP?
[04:17:33] ttilley: Evidlo: no
[04:17:46] ttilley: Evidlo: it's not like virtualenv for python
[04:18:15] ttilley: morissette: i assumed it would be metadata in a subdirectory, but now that you mention it i could very well be wrong about that.
[04:18:34] pontiki: bundle's main feature that i can see is that it installs and maintains versions of the app's gems, so you don't have to do it all yourself
[04:18:36] morissette: It just seems to me calendar data going over a mail protocol
[04:18:48] ttilley: morissette: i mean, a lot of other protocols (like gmails tags, and a bunch of other stuff) have been implemented as metadata over virtual directories in IMAP so i dunno
[04:19:18] pontiki: morissette: like in ubuntu where all the maintenance is done with specialized apps and users never have to look at config files?
[04:19:38] Evidlo: Hmm. So passenger keeps telling me that it can't find rake-10.4.2
[04:19:41] penzur: has joined #ruby
[04:19:47] morissette: Maybe I'll explore that option and see what IMAP provides
[04:20:02] charliesome: has joined #ruby
[04:20:02] luckyme: has joined #ruby
[04:20:04] hahuang65: has joined #ruby
[04:20:17] Evidlo: http://www.rafb.me/results/PuSGzx74.html
[04:20:22] ttilley: morissette: i hope outlook exports the calendar as, like, pcf files in a directory structure or some shit that's easy to parse... for your sake
[04:20:54] morissette: I'm originally a Perl dev parsing data no problem for me :)
[04:20:59] morissette: Thanks for the concern though
[04:21:01] ttilley: ics files? i dunno
[04:21:16] ttilley: fuck all whatever MS uses for metadata
[04:21:39] ttilley: perl? you've officially dated yourself as being at least over 40
[04:21:58] ellisTAA: has joined #ruby
[04:21:58] morissette: SysMin background
[04:22:06] morissette: where perl is all the hype still
[04:22:15] ellisTAA: does anyone know why shoulda matchers are called shoulda matchers? what does it mean
[04:22:15] ttilley: jesus, why the fuck are you using perl? nobody in modern times should be using perl
[04:22:25] dgutierrez1287: has joined #ruby
[04:22:35] shevy: EllisTAA isn't shoulda a testing framework?
[04:22:39] pontiki: "you shoulda done dat"
[04:22:44] morissette: Why b/c I work for a Perl/Java shop and despise Java
[04:22:51] ttilley: everything sysadmin nowadays is python (though why, i have no idea... all of openstack is python)
[04:22:53] pontiki: "he shouldna done dat"
[04:23:04] pontiki: "it just shoulda worked"
[04:23:06] morissette: But I know python, ruby, php and bash plus all those useless frontend langs
[04:23:10] ellisTAA: shevy: my understanding is they are just one liners .. does that mean they???re a framework?
[04:23:16] shevy: "he just shoulda have used ruby already"
[04:23:35] pontiki: EllisTAA: i'm not going to ask you if that makes sense, but that' basically why it's called that
[04:23:35] bronson_: has joined #ruby
[04:23:38] shevy: EllisTAA are they? I have no idea, I assume there is some library component
[04:23:54] shevy: https://github.com/thoughtbot/shoulda
[04:23:55] morissette: but @ttilley ruby > python any day god damn space nazis
[04:24:03] ttilley: and even though most sysadmin stuff is python... it's all still fucking python 2.7. all of it. nobody uses python 3. NOBODY. -_-
[04:24:04] morissette: and non ending blocks don't get me started
[04:24:05] sevenseacat: they provide custom matchers for testing. thats all.
[04:24:06] shevy: describe Post do; it { should belong_to(:user) }
[04:24:10] joelataylor: has joined #ruby
[04:24:12] ttilley: morissette: true that
[04:24:32] morissette: god forbid I use a tab vs a space one time
[04:24:33] shevy: EllisTAA well the examples seem to be longer
[04:24:40] morissette: python interpreter: AHHHHHHHHHHHHHHHHHH!
[04:25:06] ttilley: morissette: actually, the whitespace stuff is one thing about python i love. i enjoy it just as much in coffeescript. VERY clean. very nice.
[04:25:15] Ox0dea: has joined #ruby
[04:25:49] WildBamboo-Josh: has joined #ruby
[04:25:55] ellisTAA: when i search ???wiki matchers??? nothing comes up.
[04:26:08] gorums: has joined #ruby
[04:26:10] sevenseacat: EllisTAA: what problem are you trying to solve here
[04:26:48] ellisTAA: trying to learn about shoulda matchers - what are they and why do they exist
[04:26:59] shevy: hehe... why does the universe exist
[04:27:03] jenrzzz: has joined #ruby
[04:27:06] sevenseacat: they add matchers for you to use in specs, like the one shevy posted above, the belong_to matcher
[04:27:19] sevenseacat: if you dont know why you would want to use them, then you don't want to use them.
[04:27:36] shevy: ttilley I think that a language that refuses to run based on mandatory whitespace, is primitive
[04:27:55] slawrence00: has joined #ruby
[04:28:16] ttilley: yeah... i have other reasons to dislike python and prefer other languages over it, but the whitespace thing isn't one of them
[04:28:46] ttilley: as i said, i also love that about coffeescript. and the original sass. and haml.
[04:28:49] Ox0dea: It is impossible to automatically indent Python code.
[04:28:52] ellisTAA: how can i find out what a matcher is? there doesnt seem to be a wikipage on it
[04:29:10] sevenseacat: EllisTAA: google rspec matchers.
[04:29:18] Aeyrix: shevy: I totally agree.
[04:29:18] sevenseacat: and learn how to use google.
[04:29:19] ttilley: is he even using rspec?
[04:29:23] pontiki: or just go to rspec.info/documentation
[04:29:55] sevenseacat: honestly, i dont know what more information you need than https://github.com/thoughtbot/shoulda
[04:29:59] sevenseacat: it tells you exactly what it does
[04:30:10] ttilley: EllisTAA: do you know what testing framework you're using? rspec? shoulda? minitest? something else?
[04:30:22] Aeyrix: lol testing
[04:30:27] ellisTAA: sevenseacat: none of those sites define what a matcher is
[04:30:40] shevy: I want a testing framework that is fun to use
[04:30:45] sevenseacat: [12:29:10] sevenseacat: EllisTAA: google rspec matchers.
[04:30:48] Aeyrix: EllisTAA: http://rspec.rubyforge.org/rspec/1.1.11/classes/Spec/Matchers.html
[04:30:53] ttilley: i want a blowjob and a steak, we can't all get what we want
[04:30:56] Aeyrix: "An Expression Matcher is any object that responds to the following methods: ..."
[04:30:57] sevenseacat: Aeyrix: thats a stupidly old version of rspec
[04:31:07] Aeyrix: sevenseacat: But it explains what a matcher is. :)
[04:31:15] jcaho: has joined #ruby
[04:31:15] ellisTAA: aeyrix: thanks!!!!!!!!
[04:31:35] ttilley: Aeyrix: you should have used a "let me google that for you" link
[04:31:35] Aeyrix: EllisTAA: As sevenseacat said, this is an old version of RSpec. Don't use it as a definitive reference.
[04:31:36] sevenseacat: sure, but none of the examples will work.
[04:31:39] Aeyrix: But at least you can get an idea.
[04:31:57] ellisTAA: yeah all i needed to know is what a matcher is
[04:32:04] Ox0dea: EllisTAA: So what is a matcher?
[04:32:07] Aeyrix: ttilley: Eh. It was an innocent question.
[04:32:22] sevenseacat: the first fucking google result on "rspec matchers" defines them
[04:32:26] sevenseacat: EllisTAA: learn to google.
[04:32:45] Aeyrix: The first result for me is GitHub.
[04:32:50] Aeyrix: Is that what you're referring to?
[04:32:59] jack_rabbit: has joined #ruby
[04:33:03] ellisTAA: this is the first result: it does not define them https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
[04:33:26] sevenseacat: EllisTAA: do you know *anything* about testing?
[04:33:56] pontiki: simply put, a matcher is an expression that compares the actual value of something to the expected value of something in a test
[04:34:11] sevenseacat: serious question. because if you cant read the first two examples on that page and not know what a matcher is
[04:35:22] sevenseacat: and if you *dont* know anything about testing, why on earth are you looking at shoulda?
[04:35:32] ellisTAA: yeah but even if i arrived at my own conclusion it would be best to read a definition
[04:35:40] stoogenmeyer_: has joined #ruby
[04:35:46] ellisTAA: pontiki: thanks
[04:35:51] pontiki: buy the rspec book
[04:35:53] joaomdmoura: has joined #ruby
[04:36:02] pontiki: there may even be an online free copy
[04:36:03] shevy: eat frog legs
[04:36:11] ttilley: EllisTAA: we're really not trying to be mean. (well, at least i'm not). but you might have some more foundational material to absorb first. it may be better to start off with the traditional non-spec-style of testing. it's more procedural and an easier foundation to base other stuff on. the rspec and cucumber books are also great places to go
[04:36:33] sevenseacat: I'm not trying to be mean, I'm just tired of these kinds of questions from them
[04:36:41] ellisTAA: ttilleyy: thanks i???ve been meaning to get the rspec book
[04:36:49] ttilley: EllisTAA: of course, the important thing is to be doing testing, so you're already going in the right direction ;)
[04:36:51] sevenseacat: from the same person who said they were going to be the best ruby programmer ever
[04:36:55] sevenseacat: a long time ago
[04:37:08] ellisTAA: hey that was only 5 months ago!
[04:37:22] shevy: I am impressed that sevenseacat can remember things 5 months ago related to IRC
[04:37:37] ttilley: yeah, cats don't usually have that kind of long term memory
[04:37:38] shevy: I can't remember having seen EllisTAA before :)
[04:37:40] ellisTAA: sevenseacat loves me
[04:37:52] sevenseacat: I remember stupid things, what can I say.
[04:38:25] ellisTAA: gotta aim high
[04:39:07] Ox0dea: "Shoot for the moon. Even if you miss, you were only pretending to be retarded."
[04:39:09] pontiki: my goal in life is two-fold: 1) never stop learning 2) always have fun
[04:39:14] Aeyrix: Ox0dea: lmao
[04:39:43] Aeyrix: pontiki: 1> Keep reminding people that they're breaking the channel rules; 2> Play lots of blackjack.
[04:40:38] ellisTAA: ox0dea: that???s not how it goes
[04:41:14] Aeyrix: jokes on them i was only pretending
[04:41:20] mrsolo: has joined #ruby
[04:42:39] yfeldblum: has joined #ruby
[04:42:49] soasme: has joined #ruby
[04:51:19] Musashi007: has joined #ruby
[04:52:28] mary5030: has joined #ruby
[04:52:52] baweaver: has joined #ruby
[04:54:54] lxsameer: has joined #ruby
[04:57:53] mleung: has joined #ruby
[04:59:04] lessless: has joined #ruby
[05:00:24] shevy: more ruby code people!
[05:00:38] shevy: python isn't going to bow down without a fight
[05:00:48] morissette: more rails generate model things and stuff
[05:01:17] sevenseacat: rails g facebook
[05:02:07] sharpmachine: has joined #ruby
[05:02:21] Ox0dea: morissette: What does "SysMin" mean?
[05:03:21] morissette: Ox0dea: System Administration
[05:03:31] Ox0dea: I've never seen it abbreviated that way.
[05:03:34] ttilley: why should python bow down?
[05:03:35] morissette: I have 10 years of Linux System Administration
[05:03:45] ttilley: i never got the whole language is better than yours pissing contest
[05:03:53] morissette: Where eventually I wanted to move more toward automation
[05:03:59] morissette: Which led me to development
[05:04:07] ttilley: there's a lot of good python code out there, why not use it when it's the best tool for the job?
[05:04:09] mrsolo: has joined #ruby
[05:04:16] morissette: But now I am in operations and don't do "real" work lol
[05:04:20] ttilley: i prefer ruby, obviously, but i have to be pragmatic
[05:04:38] morissette: Use the best language for the job
[05:04:39] ta: has joined #ruby
[05:04:56] morissette: Although I do talk a shit load about python lol
[05:05:07] morissette: And how ruby would be a better option
[05:05:08] ttilley: i mean... fuck, i HATE C. but you gotta do what you gotta do sometimes and i've written more C than i'm really happy with
[05:05:18] ta: has joined #ruby
[05:05:22] Aeyrix: C++ master race.
[05:05:23] morissette: ugh 15 lines to open a file handle
[05:05:27] shevy: avoiding python is easy, avoiding C is hard
[05:05:39] ttilley: my most popular open source code is entirely in C and it's a ruby extension
[05:05:53] morissette: well can't beat the speed
[05:05:53] ttilley: rb-fsevent (file system event handling on macos)
[05:06:09] morissette: lord though writing so much code for millisenconds
[05:06:16] morissette: seconds even
[05:06:53] baweaver: except there are very few things Python does that Ruby cannot
[05:06:57] ttilley: Aeyrix: C++ is like javascript. you can write good code in it... as long as you only use 10% of the language features available to you. anything else and you fuck yourself
[05:07:00] Axsuul: has joined #ruby
[05:07:02] Ox0dea: baweaver: Are there any such things?
[05:07:07] baweaver: They're pretty well interchangeable.
[05:07:21] morissette: just remove : and add end
[05:07:28] baweaver: Ox0dea: Mostly statistical packages and data science applications
[05:07:37] baweaver: the support is a lot stronger on that side of the fence
[05:07:41] baweaver: CAN ruby do it? Yes
[05:07:48] morissette: but you should use R
[05:07:52] baweaver: does it have that level of tooling quite yet? Not really
[05:07:55] shevy: R is so ugly :(
[05:07:56] ttilley: baweaver: in an abstract sense, sure. in a practical sense, there's a fuckton of science code written in python that you can build on top of. same for systems administration work. you'd have to not only do it in ruby, but port a fuckton of code to ruby.
[05:08:05] ttilley: ACTION shrugs
[05:08:11] ttilley: i like doing less work
[05:08:15] baweaver: ttilley: about that
[05:08:26] baweaver: Chef and a lot of other systems tools are Ruby
[05:08:29] morissette: ttilley: were devs lazy comes with the job
[05:08:40] morissette: and ummmm....
[05:09:04] balazs: has joined #ruby
[05:09:08] ttilley: baweaver: yeah, but in research scipy and numpy and etc etc etc are standard tools that everyone uses and is encouraged to know.
[05:09:09] Ox0dea: >> 4r * 2i # We science yet?
[05:09:11] ruboto: Ox0dea # => ((0/1)+(8/1)*i) (https://eval.in/379409)
[05:09:18] morissette: was close been a while since had to do security stuff
[05:09:22] hagabaka: has joined #ruby
[05:09:26] baweaver: ttilley: You'll notice I said that above
[05:09:46] shevy: lol at the comment Ox0dea
[05:09:46] baweaver: But in terms of System Administration? It's because Google uses it and now everyone else should too
[05:09:58] morissette: We talking Go now lol?
[05:10:00] charliesome: has joined #ruby
[05:10:09] shevy: Go Google
[05:10:11] baweaver: Same argument applies there
[05:10:25] morissette: Anyone in Austin want to catch drinks and debate languages lol?
[05:10:27] baweaver: Hadoop was another result of that type of idiocy
[05:10:43] shevy: I think the dudedudeman is in Texas
[05:10:55] baweaver: Bay area here
[05:11:18] ttilley: ...go is definitely the new "thing" in systems level stuff. stackato took cloud foundry, ported a shitload of ruby code to go and node.js for performance reasons, and ended up at a more stable product (though, to be fair, a lot of the cloud foundry stuff uses eventmachine and FUCK eventmachine HARD)
[05:11:25] Ox0dea: `go get fucked`
[05:11:28] morissette: Wifey is anti cali or else I'd likely be there mobile gambling start up wanted me bad
[05:12:20] ttilley: i feel sorry for anyone that has to work with or debug eventmachine
[05:12:23] ttilley: i really do
[05:12:29] morissette: but DevOps not a dev role
[05:12:56] RegulationD: has joined #ruby
[05:13:04] baweaver: I'm becoming increasingly hesitant to touch DevOps.
[05:13:08] morissette: just like you feel bad with me hacking away at outlook integration into webapps cause efficiency
[05:13:22] morissette: I mean I'd prefer to write code vs recipes and manifests
[05:13:25] hahuang65: has joined #ruby
[05:13:40] _seanc_1: has joined #ruby
[05:13:54] lessless: has joined #ruby
[05:14:57] revath: has joined #ruby
[05:15:20] morissette: I like this room so much more than #perl....
[05:15:22] IanV0rn: has joined #ruby
[05:15:26] shevy: if anyone of you ever needs all ruby keywords
[05:15:31] shevy: irb has it included :P
[05:15:33] shevy: >> IRB::InputCompletor::ReservedWords.size
[05:15:34] ruboto: shevy # => uninitialized constant IRB (NameError) ...check link for more (https://eval.in/379410)
[05:15:39] morissette: sadly thinking i'm becoming a hipster with less ipa and flannel
[05:15:39] ttilley: dev is dev. i mean, how many jobs have you had where you worked on what you loved doing? i've only had a few.
[05:15:50] ttilley: i do work that i love at home, in my free time, for me
[05:16:04] ttilley: work... is work. you do whatever is available
[05:16:04] jesterfraud: ttilley: I don't have the energy to do that right now
[05:16:12] ttilley: fair enough
[05:16:24] revath: has left #ruby: ()
[05:16:38] morissette: I mean I am in Operations now but for the most part I have free range to work on what I want which I love
[05:16:47] ttilley: i fucking hate operations
[05:16:50] morissette: So having the freedom to create and improve
[05:16:59] jesterfraud: I don't like go, and I don't like node for web dev, so hence why I'm in this room :)
[05:16:59] ttilley: i started off doing sysadmin/sysops
[05:17:01] morissette: Yes well I am technical ops
[05:17:11] morissette: vs people ops
[05:17:19] jamto11: has joined #ruby
[05:17:27] morissette: creating now a platform to bring us from 1999 to 2015
[05:17:41] jesterfraud: creating 'now', a platform, or now creating a platform?
[05:17:58] morissette: 4th drink in lol
[05:18:06] jesterfraud: English is... interesting
[05:18:25] ttilley: morissette: it was me and one other person responsible for all of this company's servers and hosting platforms, across linux and windows. there were multiple hosting systems (ensim, sphera, h-sphere, etc) across multiple operating systems (various versions of centos and windows server) with 4 fucking billing systems.
[05:18:49] ttilley: morissette: i cut the call center's time down by an average of 10 minutes by just writing some software to find out WHICH billing system someone was in
[05:18:50] krz: has joined #ruby
[05:18:50] morissette: 4 billing systems jesus
[05:18:52] ttilley: it was horrible
[05:18:52] ylla: has joined #ruby
[05:18:55] ttilley: absolute shite
[05:19:11] ttilley: but.... but i had fun writing that software and seeing the immediate impact it had on customer service and sales
[05:19:17] ttilley: so now i write software for a living
[05:19:22] morissette: yeah well I mean our frontend product minus well be frames but IBM pay for it
[05:19:29] morissette: b/c our backend is cool
[05:19:36] Axsuul: has joined #ruby
[05:19:46] arooni-mobile: has joined #ruby
[05:20:42] idafyaid: has joined #ruby
[05:21:45] konsolebox: has joined #ruby
[05:22:13] morissette: .....digressing..... corporate america more dots ........ technology....... 1999
[05:22:16] ellisTAA: has joined #ruby
[05:22:21] Aeyrix: MORE DOTS
[05:22:49] ohaibbq: has joined #ruby
[05:23:05] konsolebox: has joined #ruby
[05:25:00] hdev1: has joined #ruby
[05:25:07] commondream: has joined #ruby
[05:26:35] juanpaucar: has joined #ruby
[05:27:40] rbowlby: has joined #ruby
[05:28:51] Ox0dea: >> RubyVM::INSTRUCTION_NAMES.size
[05:28:52] ruboto: Ox0dea # => 88 (https://eval.in/379411)
[05:29:32] dmmoody: has joined #ruby
[05:29:42] bnagy: sweet you could write ruby with a piano
[05:29:53] rht: has joined #ruby
[05:30:02] Ox0dea: It's 89 in trunk. :/
[05:30:06] baweaver: bnagy: don't tempt me
[05:30:28] baweaver: midi-to-usb could totally do it and map as a keyboard if done right
[05:31:08] bnagy: kind of hard to get, like, arguments I guess
[05:31:22] baweaver: emacs can chords, so can we :D
[05:31:57] Aeyrix: >> p RubyVM::INSTRUCTION_NAMES
[05:31:58] ruboto: Aeyrix # => ["nop", "getlocal", "setlocal", "getspecial", "setspecial", "getinstancevariable", "setinstancevaria ...check link for more (https://eval.in/379412)
[05:33:10] bronson_: has joined #ruby
[05:33:19] Ox0dea: Huh, the new instruction in 2.3 is "reverse".
[05:33:23] khebbie: has joined #ruby
[05:33:52] fujimura: has joined #ruby
[05:34:19] ht: has joined #ruby
[05:35:12] tagrudev: has joined #ruby
[05:35:24] Ox0dea: https://github.com/ruby/ruby/commit/5ac58b272d65cc9921048c076e35df1f42979725
[05:35:32] byprdct: has joined #ruby
[05:36:03] shevy: write ruby with a piano
[05:36:31] shevy: I think we have a midi expert here... ericwood I think it was, he played something with a keyboard using ruby code
[05:36:34] Aeyrix: https://github.com/ruby/ruby/search?utf8=%E2%9C%93&q=TODO
[05:37:00] skade: has joined #ruby
[05:37:03] fabrice31: has joined #ruby
[05:38:24] Channel6: has joined #ruby
[05:38:54] byprdct: has joined #ruby
[05:38:55] shevy: Aeyrix code is alive!
[05:40:01] BTRE: has joined #ruby
[05:40:05] futilegames: has joined #ruby
[05:40:14] Aeyrix: static int invoking; /* TODO: should not be global variable */
[05:40:48] byprdct: has joined #ruby
[05:41:31] shevy: Anyone knows for how long permalinks at rubular.com remain?
[05:42:08] byprdct: has joined #ruby
[05:42:50] sevenseacat: perma would imply... permanently
[05:42:57] vdamewood: has joined #ruby
[05:44:36] mrsolo: has joined #ruby
[05:44:41] Ox0dea: "And with strange aeons even death may die."
[05:45:14] shevy: you are a very wise cat
[05:46:22] towski_: has joined #ruby
[05:46:29] sevenseacat: Ox0dea: nice.
[05:48:39] fujimura: has joined #ruby
[05:49:41] mrsolo: has joined #ruby
[05:51:19] Macaveli: has joined #ruby
[05:54:48] CondomsOptional: has joined #ruby
[05:55:17] morissette: hello queerbag
[05:55:33] yfeldblum: has joined #ruby
[05:55:58] CondomsOptional: wanna bareback?
[05:56:02] ag4ve_: has joined #ruby
[05:56:30] morissette: i mean you only live once
[05:56:40] morissette: fuck me hard though
[05:57:01] CondomsOptional: I'll cum deep in your ass
[05:57:08] lsmola: has joined #ruby
[05:57:12] morissette: is this #porn
[05:57:15] CondomsOptional: your ass will be gushing out my cum for weeks
[05:57:48] stoogenmeyer: has joined #ruby
[05:58:00] ruboto: fflush, apeiros, seanstickle, banisterfiend, zzak, workmad3, jhass, Coraline, Havenn, drbrain, sevenseacat, Radar, Mon_Ouie, rubyhacker1, miah, slyphon, zenspider, Aria, ljarvis
[05:58:17] sevenseacat: !ban CondomsOptional !T 1d
[05:58:18] ChanServ: +b CondomsOptional!*@*
[05:58:18] ChanServ: ChanServ kicked CondomsOptional: is banned from this channel
[05:58:23] revath: has joined #ruby
[05:58:37] sevenseacat: baweaver: :thumbsup:
[05:58:47] baweaver: ACTION high fives
[05:59:08] morissette: ACTION high fives
[05:59:17] morissette: god damn teenagers
[05:59:44] Ox0dea: Okay, I think I know how to add %d to Ruby.
[05:59:58] baweaver: ACTION is a teenager ;-;
[06:00:09] morissette: ACTION feels old at 28
[06:00:17] zipace: has joined #ruby
[06:00:17] zipace: has joined #ruby
[06:00:40] baweaver: 24, but poking fun
[06:01:21] morissette: yeah but still not a different generation but minus well be
[06:01:35] Ox0dea: > minus well be
[06:01:35] hahuang65: has joined #ruby
[06:01:49] Ox0dea: >> 10_000.spoons.ironic?
[06:01:50] ruboto: Ox0dea # => undefined method `spoons' for 10000:Fixnum (NoMethodError) ...check link for more (https://eval.in/379429)
[06:02:03] krisquigley: has joined #ruby
[06:02:27] hahuang65: has joined #ruby
[06:02:28] baweaver: Ox0dea: Still trying to dissect that BF interpreter....
[06:02:43] shevy: another one fell to sevenseacat's deadly claws
[06:03:15] sharpmachine: has joined #ruby
[06:03:51] rht: has joined #ruby
[06:04:24] Ox0dea: baweaver: It's... pretty cryptic.
[06:04:44] baweaver: that's the fun of it
[06:04:49] baweaver: it's perl all over again
[06:04:56] baweaver: that was more legible
[06:05:12] mrsolow: has joined #ruby
[06:05:21] Ox0dea: I bet it's actually cleaner than how you'd have to do it in Perl.
[06:05:41] Ox0dea: Stabby lambdas kept it pretty trim, I think.
[06:05:58] aspiers: has joined #ruby
[06:06:08] baweaver: Read through Understanding Computation some time
[06:06:15] Ox0dea: Aye, I've done so.
[06:06:21] Ox0dea: Tom Stuart is sort of my hero.
[06:06:24] baweaver: it has 3-4 pages of unfolding making fizzbuzz with church numerals and the like
[06:06:35] plashchynski: has joined #ruby
[06:06:36] baweaver: fun read for sure
[06:06:46] Ox0dea: A pleasant watch too.
[06:06:47] baweaver: Raganwald is another of a kindred spirit
[06:07:20] baweaver: Kestrels, Quirky Birds, and Hopeless Egocentricy is still one of my favorite ruby books.
[06:07:25] rbowlby: has joined #ruby
[06:07:37] baweaver: https://leanpub.com/combinators
[06:07:43] Eising: has joined #ruby
[06:07:45] Macaveli: has joined #ruby
[06:07:50] baweaver: (free to read online, but well worth the price)
[06:07:55] Ox0dea: You've reminded me that I still haven't written an Unlambda program.
[06:08:25] baweaver: If I weren't doing a Hackathon for the next day and a half I'd consider trying some of it myself for jollies.
[06:10:29] yardenbar: has joined #ruby
[06:10:53] chinmay_dd: has joined #ruby
[06:11:06] Polysics: has joined #ruby
[06:13:00] joelataylor: has joined #ruby
[06:13:48] _seanc_: has joined #ruby
[06:13:59] stnly_: has joined #ruby
[06:14:06] timonv: has joined #ruby
[06:14:35] RegulationD: has joined #ruby
[06:16:35] lkba: has joined #ruby
[06:19:33] solars: has joined #ruby
[06:23:11] Aeyrix: baweaver: wait
[06:23:21] joonty: has joined #ruby
[06:23:22] Aeyrix: baweaver is a teenager ;-;
[06:23:28] codecop: has joined #ruby
[06:23:34] bmalum: has joined #ruby
[06:23:41] baweaver: is actually 24 and was screwing with people
[06:23:44] CyborgCygnus: has joined #ruby
[06:23:52] baweaver: 25 in a few weeks
[06:24:02] baweaver: yay, lower insurance and no more getting robbed on rental cars
[06:24:03] ttilley: i assume anyone on the internet is either a grumpy preteen, an old man, or an FBI agent
[06:24:13] Aeyrix: Months until I'm even legal to drink in the USA>
[06:25:25] CyborgCygnus: has joined #ruby
[06:25:25] ttilley: speaking of which. has anyone been watching the WWDC sessions? there have been actual women presenting... doing real tech and kicking real ass up there on stage
[06:25:29] ttilley: quite a few actually
[06:25:35] ttilley: it's pretty awesome to see
[06:25:53] jgt3: has joined #ruby
[06:26:07] sinkensabe: has joined #ruby
[06:26:26] sevenseacat: sounds better than fake women kicking imaginary ass
[06:26:48] ttilley: i'm guessing one was even post-op transgender but that's not the kind of assumption one wants to be wrong about. might be insulting. ^^;
[06:27:01] morissette: i mean women are cool and stuff im married to one but in tech i haven't seen an "amazing" pushing limits one yet
[06:27:26] Ox0dea: morissette: Grace Hopper wrote the first compiler.
[06:27:45] ttilley: there are lots of amazing women in the history of tech that people always forget about
[06:27:47] morissette: okay and next?
[06:27:49] shevy: WHERE WERE YOU THEN morissette!
[06:27:57] sevenseacat: "computer" used to be a job description solely for women
[06:28:18] morissette: indeed; thanks i know the history
[06:28:43] sevenseacat: women dont have to be amazing in tech, just like men dont have to be
[06:28:59] shevy: morissette margaret dayhoff wrote the first protein database back then called "Atlas of Protein Sequence and Structure" http://en.wikipedia.org/wiki/Margaret_Oakley_Dayhoff
[06:29:00] morissette: as my 2yr old wakes up and I literally have to just sit in front of his toddler bed and type
[06:29:01] ttilley: morissette: "Ada Lovelace is Lord Byron's child, and her mother, Lady Byron, did not want her to turn out to be like her father, a romantic poet," says Isaacson. So Lady Byron "had her tutored almost exclusively in mathematics as if that were an antidote to being poetic."
[06:29:23] morissette: fair nuff @all
[06:29:42] ttilley: ENIAC was created by six women
[06:30:04] ttilley: fuckton of history that gets shoved under the carpet because the movers and shakers were *gasp* women
[06:30:13] morissette: germans dont count lol :P
[06:30:13] morissette: for testing sake this is vpn'd off: http://global.m0ri.org/calendar
[06:30:28] sevenseacat: morissette: I'd watch yourself if I were you.
[06:30:34] morissette: god damn old white men
[06:30:38] sevenseacat: sexism and racism at the same time? check
[06:30:43] morissette: sevenseacat: in regards to?
[06:31:07] shevy: lol Aeyrix
[06:31:08] morissette: sevenseacat: I am a married with children ex drag queen feminist
[06:31:16] sevenseacat: morissette: so?
[06:31:22] Ox0dea: And a "SysMin" to boot!
[06:31:27] morissette: what shall I watch?
[06:32:05] sevenseacat: morissette: the racist jokes and the sexism.
[06:32:05] jesterfraud: somedays I wonder if we'd just be better off banning gender terms, it'd be a nuisance, but would successfully confuse everyone enough to stop arguments, I think
[06:32:08] morissette: more or less monty python?
[06:32:09] sevenseacat: we dont approve of them.
[06:32:15] Xeago: has joined #ruby
[06:32:23] morissette: which racist / sexist jokes have i said?
[06:32:31] shevy: no good ones so far
[06:32:55] morissette: scrolls up to review
[06:33:18] morissette: "(01:27:01 AM) morissette: i mean women are cool and stuff im married to one but in tech i haven't seen an "amazing" pushing limits one yet" is surely not sexist
[06:33:35] morissette: its just stating I haven't seen one yet
[06:33:51] morissette: outside of that comment I see no racist / sexist comments
[06:34:15] morissette: minus: "(01:30:34 AM) morissette: god damn old white men"
[06:34:18] joonty: has joined #ruby
[06:34:25] morissette: but can you really be racist against white people lol?
[06:34:34] Aeyrix: jesus christ
[06:34:42] sevenseacat: let's drop it and move on.
[06:34:44] Cyberheb: has joined #ruby
[06:34:44] chinmay_dd: has joined #ruby
[06:34:54] morissette: Im cool with that
[06:34:59] djbkd: has joined #ruby
[06:35:16] morissette: Again 6th drink in.... maybe I only told #php so don't block for more than 1d lol
[06:35:20] Cyberheb: has joined #ruby
[06:35:27] balazs: has joined #ruby
[06:35:28] roolo: has joined #ruby
[06:35:37] shevy: go make sexist jokes on #php!
[06:35:53] baweaver: ACTION stares blankly
[06:35:56] Aeyrix: I'm sure there's a reddit joke here somewhere.
[06:35:57] Cyberheb: has joined #ruby
[06:35:58] baweaver: ACTION looks down at glass
[06:36:06] Aeyrix: ACTION looks down at where glass should be.
[06:36:07] morissette: good one shevy seeing as im preety much trans and don't believe in gender
[06:36:09] Aeyrix: No drink. :(
[06:36:28] morissette: can only be overly racist
[06:36:33] Cyberheb: has joined #ruby
[06:36:33] jesterfraud: why do people ever think any kind of sexism/racism is okay, even if they're talking about a 'majority'?
[06:36:34] morissette: like a bloody american
[06:36:38] shevy: there is genetic gender
[06:36:57] morissette: well genetically we're all born women
[06:36:57] yfeldblum: has joined #ruby
[06:36:58] astrobun_: has joined #ruby
[06:36:59] Aeyrix: more mods
[06:37:01] baweaver: ACTION also may be one of the few americans still up
[06:37:06] shevy: it's the default
[06:37:20] mister_solo: has joined #ruby
[06:37:27] morissette: so are you on the fetus == life side else fetus == not a being
[06:37:44] Aeyrix: you should put your keyboard down
[06:38:00] Ox0dea: https://en.wikipedia.org/wiki/Deuterostome
[06:38:01] shevy: cells are living aren't they?
[06:38:04] Ox0dea: We're all born assholes.
[06:38:04] morissette: if fetus > third_trimester
[06:38:22] baweaver: we're really covering the bases here aren't we?
[06:38:22] morissette: seems like ruby
[06:38:22] shevy: that sounds like a legal term definition
[06:38:27] ponga: has joined #ruby
[06:38:33] bmalum: has joined #ruby
[06:38:42] shevy: baweaver a good dam needs a strong base
[06:38:51] Aeyrix: I'm glad I saved some of my popcorn from /r/subredditdrama for #ruby.
[06:39:16] shevy: Aeyrix aren't you also bringing in drama yourself every now and then :)
[06:39:18] baweaver: Tipsy me tends to go on a code rampage for a few hours
[06:39:26] Aeyrix: shevy: generally no
[06:39:30] morissette: i started there baweaver
[06:39:33] Aeyrix: i just suggest that less snark should be used
[06:39:36] shevy: I still fondly remember your argument with jhass
[06:39:40] baweaver: Sober me curses aforementioned me for leaving no comments and seeing how often I can make things into monads
[06:39:41] DEA7TH: has joined #ruby
[06:39:49] morissette: now drunk off dealing with syncing outlook idgafuuck
[06:40:08] ylla: has joined #ruby
[06:40:10] shevy: yesterday someone explained to me what monads are
[06:40:10] morissette: cause microsoft.... sigh
[06:40:16] shevy: right here in #ruby
[06:40:21] auzty: has joined #ruby
[06:40:22] Ox0dea: baweaver: Is Enumerable a monad?
[06:40:30] Ox0dea: *Enumerator
[06:40:55] morissette: s/enumerator/enum/ig
[06:41:05] morissette: yay drunken regex
[06:41:06] baweaver: By gracious typecasting maybe, but doesn't really get all the laws in there
[06:41:06] shevy: two similar names ripe to cause confusion
[06:41:09] djbkd: has joined #ruby
[06:41:21] baweaver: A monad is just a monoid in the category of endofunctors
[06:41:28] Ox0dea: What's the problem?
[06:41:37] shevy: to me it was explained that a monad is a wrapper over return values
[06:41:40] CyborgCygnus: has joined #ruby
[06:42:09] shevy: I have no idea what this means but it sounds simpler than the endofunctor monoid
[06:42:11] baweaver: that's about as straightforward as you can get on it honestly.
[06:42:11] baweaver: but still, some pedant somewhere will go over the gamut on it.
[06:42:11] morissette: oh god were geeking out again
[06:42:16] stoogenmeyer_: has joined #ruby
[06:42:30] baweaver: functors in ruby are actually kinda handy
[06:42:45] Aeyrix: shevy: that was probably about snark at new users
[06:42:55] morissette: my apologies folks my dealing w/ microsoft drives me to drink + alcoholism
[06:43:44] Ox0dea: >> [1].cycle.size
[06:43:45] ruboto: Ox0dea # => Infinity (https://eval.in/379447)
[06:43:50] morissette: slash join #drunk and hopes for best
[06:43:53] Ox0dea: Is Infinity a monad?
[06:44:38] morissette: i think its a sideways 8 :{
[06:44:43] certainty: >> Infinity.respond_to?(:join)
[06:44:44] ruboto: certainty # => uninitialized constant Infinity (NameError) ...check link for more (https://eval.in/379449)
[06:44:57] baweaver: They still confuse me honestly
[06:45:23] Ox0dea: Tom's video is pretty clarifying.
[06:45:45] kerunaru: has joined #ruby
[06:45:58] ttilley: morissette: you write PHP. if i were you, i'd never be sober.
[06:46:02] shevy: I am sure there are monads in Infinity Ox0dea
[06:46:04] Ox0dea: Monads are much harder in theory than in practice.
[06:46:08] mister_solo: has joined #ruby
[06:46:25] ttilley: morissette: possibly suicidal even
[06:46:31] ndrei: has joined #ruby
[06:46:42] morissette: haha ttilley ive slowed down quite a bit since i had kids but i also write python, rails and node
[06:46:43] certainty: beware the monad tutorial fallacy
[06:46:49] jesterfraud: can we possibly avoid talking about every kind of controversial topic in less than an hour?
[06:46:51] ttilley: ACTION would rather write C than PHP
[06:47:12] morissette: ttilley: im not like its 6am time to drink anymore lol
[06:47:42] Jackneill: has joined #ruby
[06:47:53] morissette: ACTION realizes hes the only one laughing at what is probably a serious problem
[06:48:14] ttilley: i like node. it's absolutely beautiful for IO bound tasks
[06:48:20] morissette: /me seeks help gains addicition to zoloft
[06:48:25] ttilley: though i'm a hipster using iojs instead of nodejs lately
[06:48:27] morissette: and extra space ftw
[06:48:33] baweaver: >> class Functor; def initialize(&fn)@fn=fn end; def method_missing(op, *a, &b) @fn[op, *a, &b] end;module Enumerable;def every;Functor.new do |o,*a| map{|x|x.send(o,*a) } end end end; [1,2,3].every + 3
[06:48:34] ruboto: baweaver # => /tmp/execpad-8f67898e4bbf/source-8f67898e4bbf:7: syntax error, unexpected end-of-input, expecting ke ...check link for more (https://eval.in/379456)
[06:48:39] morissette: im 28 too old to be a hipster
[06:48:58] fabrice31: has joined #ruby
[06:49:08] morissette: my beard thinks differently though
[06:49:31] ttilley: i'm 31. it was sarcasm. iojs has actually gained significant community support. it's still a fork of nodejs though
[06:49:50] baweaver: >> class Functor; def initialize(&fn)@fn=fn end; def method_missing(op, *a, &b) @fn[op, *a, &b] end;end;module Enumerable;def every;Functor.new do |o,*a| map{|x|x.send(o,*a) } end end end; [1,2,3].every + 3
[06:49:51] ruboto: baweaver # => [4, 5, 6] (https://eval.in/379458)
[06:50:00] baweaver: there it is
[06:50:03] baweaver: missed one end
[06:50:33] baweaver: Functors :D
[06:50:53] morissette: ttilley: got kids? know how to make a 22 mo old go to bed after changing diaper and sitting with him after 30 mins? ..... furberize
[06:51:20] morissette: outside of not having bright shiny laptop in front of them lol
[06:51:45] ttilley: morissette: i've watched a million DVDs on comforting children. in the end i've just spent a lot of money and learned nothing useful.
[06:51:52] Ox0dea: /query ttilley It's very likely the channel would benefit from morissette's absence. Please refrain from engaging him in further conversation.
[06:51:57] ttilley: my son LOVES gangnam style though
[06:52:08] bnagy: Ox0dea: HAHAHAHAH
[06:52:10] morissette: thanks Ox0dea
[06:52:11] ttilley: even if he's crying like crazy, i put that shit on my iphone and he stops and laughs
[06:52:11] jesterfraud: iojs and node are merging again
[06:52:24] morissette: so umm why no colon after def?
[06:52:31] morissette: better @Ox0dea?
[06:52:47] morissette: what are gems?
[06:52:56] Ox0dea: /query ttilley I told you so.
[06:53:06] Aeyrix: Good work pal.
[06:53:10] morissette: internally how does the interpreter handle lamdas?
[06:53:18] jesterfraud: Ox0dea: /msg I approve
[06:53:19] jenrzzz: has joined #ruby
[06:53:31] Stan: has joined #ruby
[06:53:36] ttilley: lamdas are a special case of blocks. fucking noob.
[06:54:07] morissette: lol trying to stay on topic so people don't yell @ me at 2am
[06:54:37] ttilley: omg, who remembers lambdas and procs in 1.8? serious headaches, am i right? the same syntax meant something completely different in 1.9 and forward
[06:54:55] hemanth: has joined #ruby
[06:55:03] ttilley: and special casing of return within a lambda in 1.8
[06:55:10] ttilley: just slit my wrists already
[06:55:20] morissette: and the emo comes out
[06:55:32] morissette: ohio is for lovers... amirite?
[06:55:34] ur5us: has joined #ruby
[06:55:49] ttilley: i mean, who thought it was a good idea for a return within a lambda to return from the calling context in 1.8?
[06:56:56] aganov: has joined #ruby
[06:57:52] Oog: has joined #ruby
[06:58:10] ttilley: god this channel is boring at 3am :p
[06:58:54] jesterfraud: I think you mean 5pm
[06:58:54] sevenseacat: it's not 3am everywhere, remember that.
[06:59:04] fujimura: has joined #ruby
[06:59:09] shevy: this is the wisest cat ever
[06:59:24] morissette: ttilley: before my time.... 1997 => perl, 1999 => php, 2009 => ruby, 2010 => python, 2012 => node
[06:59:30] CyborgCygnus: has joined #ruby
[06:59:33] ttilley: ddv: dont pretend like you don't remember ruby 1.8. i love ruby but there's so much about 1.8 that was just BAD. so bad.
[06:59:35] shevy: this timeline makes me sad
[06:59:49] jesterfraud: I only ever played with 1.9, basically :3
[07:00:02] ttilley: shevy: me too
[07:00:03] morissette: 3am boring yes because of moderators who think im racist / sexist @ sevenseacat
[07:00:15] Caius: has joined #ruby
[07:00:25] jesterfraud: ACTION makes popcorn
[07:00:30] Aeyrix: Have some of mine.
[07:00:32] shevy: ACTION steals popcorn
[07:00:47] jesterfraud: Aeyrix: how's the fight for ADSL going?
[07:00:55] Aeyrix: jesterfraud: Same old. :(
[07:01:02] morissette: im white who grew up in southie (the ghetto) who moves between genders at will; your turn
[07:01:03] Aeyrix: Got 2mo free 4G though.
[07:01:11] dumdedum: has joined #ruby
[07:01:25] Aeyrix: Dodo, reselling Telstra.
[07:01:31] Aeyrix: Dodo support > Telstra support
[07:01:32] Aeyrix: despite being 1/4 of the price.
[07:01:34] Aeyrix: I can't fault them.
[07:01:43] ttilley: jesterfraud: you're lucky. the only crime against humanity you have to deal with is refinements
[07:01:57] ttilley: and before anyone else says another word, FUCK refinements
[07:02:13] jesterfraud: no idea what they are?
[07:02:14] morissette: should have put my word a second earlier... dang
[07:02:43] morissette: i think its those nasty smelling tall stacks near ports @ jesterfraud
[07:02:59] shevy: I could not study refinements because the syntax conflicts with the rest of my ruby code
[07:03:02] ttilley: jesterfraud: GOOD. they make arbitrary modifications of code in arbitrary scopes possible, thus making optimization difficult if not impossible in non-MRI implementations of ruby (so they're not supported by jruby or rubinius)
[07:03:32] Filete: has joined #ruby
[07:03:36] morissette: ewww did i hear java briefly mentioned through jruby?
[07:03:46] ttilley: jruby is pretty awesome
[07:03:49] shevy: he likes java
[07:03:59] Aeyrix: Paging baweaver.
[07:04:03] morissette: I work for a Java/Perl shop....
[07:04:03] Aeyrix: Oh, not in here.
[07:04:06] ttilley: i hate java, but not the JVM. lots of interesting things run on the JVM.
[07:04:19] shevy: morissette what are you doing on #ruby!
[07:04:20] morissette: ttilley: ill give you that one
[07:04:21] sharpmachine: has joined #ruby
[07:04:30] jgt3: hate is a strong word to use for a programming language
[07:04:32] shevy: you are all in the wrong movie
[07:04:43] morissette: shevy: on my freetime im working on a startup in ROR
[07:04:49] shevy: what freetime
[07:04:53] jgt3: that said, I hate JS
[07:04:54] shevy: you have a kid!
[07:05:00] morissette: and prefer ruby selenium to anything else
[07:05:18] Macaveli: has joined #ruby
[07:05:19] morissette: sleep is for the old
[07:05:22] ur5us: has joined #ruby
[07:05:23] strixd: has joined #ruby
[07:05:28] morissette: once I hit 30 sure i'll give up
[07:05:30] ttilley: jgt3: true. i had a job where writing java was my primary goal in life. i lasted 3 months. it was not the worst 3 months of my life, but it wasn't my happiest either.
[07:05:30] shevy: you are old when you hit 30 :-)
[07:05:57] ttilley: i'm 31 ;_;
[07:06:02] morissette: I personally feel if I'm not making millions by 30 im fucked as we move to the leisure age
[07:06:10] morissette: when everything is automated
[07:06:44] morissette: Radar: perhaps you don't understand the fute
[07:06:46] ttilley: jgt3: and i actually left that job because they moved me to writing C# for a legacy app and THAT is what killed it for me
[07:06:54] morissette: fute = future
[07:06:59] Radar: morissette: Sorry, my crystal ball is broken right now
[07:07:07] jgt3: ttilley: where did you work? Some kind of torture chamber?
[07:07:09] Radar: morissette: They predicted the future you are talking about already, back in the 60s.
[07:07:12] Aeyrix: Radar: Where are your tarot cards?
[07:07:20] Radar: We have no gotten that "leisure age"
[07:07:24] bnagy: this is mind numbing
[07:07:26] lessless: has joined #ruby
[07:07:28] morissette: by 2020 truck drivers and cabs/uber/lyft will be automated
[07:07:31] ttilley: jgt3: hubspot, a marketing company in cambridge
[07:07:34] Radar: in fact, America (in particular) has less leisure time NOW than they did back then.
[07:07:36] bnagy: is there not #boring_assholes_whining or something?
[07:07:47] Radar: because everyone is working on The American Dream
[07:08:04] Radar: Student loans for the young ones, mortgages for the oldies, and part-time jobs for all
[07:08:07] Radar: That's the true America
[07:08:09] morissette: Unfortunately due to technology the american dream barely exists
[07:08:19] Radar: bnagy: Careful.
[07:08:25] ruby-lang405: has joined #ruby
[07:08:32] flughafen: package still wont be delivered today, holy cow.
[07:08:45] morissette: me, a non college loan debt student makes 6 figures through studying free knowledge
[07:08:47] ttilley: in georgia there's a woman on trial for murder for taking plan B. america is in collapse.
[07:08:48] bnagy: Radar: no? It's been like a solid hour of offtopic drivel
[07:08:56] morissette: while i know mbas driving uber
[07:08:56] bnagy: I think a little frustration is only reasonable
[07:08:57] certainty: flughafen: die post?
[07:09:05] Radar: bnagy: wtg on the personal attacks, please do keep it up. That won't result in a +q _at all_
[07:09:09] k3asd`: has joined #ruby
[07:09:23] Radar: morissette: p.s. #ruby-offtopic
[07:09:24] dented42: has joined #ruby
[07:09:41] morissette: hey i tried on topic
[07:09:51] certainty: didn't work out?
[07:09:56] morissette: you drove it this way
[07:10:00] flughafen: certainty: dhl
[07:10:04] Radar: Everyone who wants to talk about offtopic should go there because bnagy has an important discussion about Ruby he wants to have.
[07:10:08] flughafen: beide streikt jetzt
[07:10:09] morissette: conversation is good for the soul
[07:10:11] certainty: flughafen: same shit, no?
[07:10:15] morissette: especially at this time
[07:10:16] Radar: And we all need to pay attention to bnagy because he is important.
[07:10:23] morissette: when most devs arent on
[07:10:24] certainty: flughafen: what are you waiting for?
[07:10:30] felixjet: has joined #ruby
[07:10:47] flughafen: certainty: a chalk bag for climbingb, it's not a big deal, i have one already, but it's stupid
[07:11:05] Radar: bnagy: I scrolled up and I definitely see your point btw.
[07:11:17] morissette: and @ certainty you have a ruby question im willing to answer or research for you
[07:11:23] ttilley: if someone asks a ruby question i'll switch topic. until then i'm entertaining myself and the conversation here is currently interesting to me. so t(-_-t)
[07:11:28] morissette: which is what this channel is for
[07:11:48] shevy: certainty the flughafen in Berlin is still not finished. he is waiting for it still
[07:11:49] morissette: @ ttilley on the same wave length
[07:12:03] Radar: morissette + ttilley we have a whole channel for off-topic discussion. Please take it there.
[07:12:04] certainty: shevy: no way. then he'll never receive it
[07:12:16] CyborgCygnus: has joined #ruby
[07:12:41] ttilley: jeez. the ruby channels were a lot more fun when there was a split between #ruby and #ruby-lang. what happened?
[07:12:47] certainty: morissette: currently not. I'll get back to you
[07:12:51] shevy: jhass destroyed #ruby-lang
[07:12:56] ttilley: all the killjoys in one place now?
[07:12:57] morissette: Radar: thats cute and all but people are here and i have good convs w/ ttilley
[07:13:11] Radar: +q morissette!*@*
[07:13:13] Radar: Who's next?
[07:13:16] sevenseacat: morissette: we can enforce this.
[07:13:23] Radar: I asked you twice to take it to #ruby-offtopic and you disobeyed.
[07:13:55] Radar: Don't PM.
[07:14:17] sevenseacat: morissette: you were asked not to PM.
[07:14:40] dhjondoh: has joined #ruby
[07:14:42] Radar: 15 minute time out.
[07:14:45] bartj3: has joined #ruby
[07:14:50] perry: has joined #ruby
[07:15:34] juanpaucar: has joined #ruby
[07:15:37] ta: has joined #ruby
[07:15:45] hdev1: has joined #ruby
[07:15:57] sevenseacat: do we need a naughty corner or something?
[07:16:02] Radar: sevenseacat: That's what +q is for.
[07:16:09] certainty: yeah a naughty stairway
[07:16:16] RegulationD: has joined #ruby
[07:16:16] sevenseacat: moral of the story: don't drink and IRC.
[07:16:45] Aeyrix: bnagy: I should be opped in that channel.
[07:17:23] Radar: bnagy: I apologise. I thought that he had only been going for a short time and not an entire hour.
[07:17:39] Ox0dea: >> class Fixnum; alias +@ succ end; ++++0
[07:17:40] ruboto: Ox0dea # => 3 (https://eval.in/379482)
[07:17:42] rdark: has joined #ruby
[07:17:42] Ox0dea: Is this a bug?
[07:17:45] bnagy: Radar: it's fine. "asshole" is too strong.
[07:17:54] Radar: Ox0dea: feature
[07:18:02] rdark: has joined #ruby
[07:18:08] Radar: Ox0dea: +0 is a positive number, which you're adding 3 to
[07:18:26] Radar: (I wish I was joking)
[07:18:52] Ox0dea: When has anybody ever needed to explicitly mark their numeric literals as positive?
[07:19:01] bkxd_: has joined #ruby
[07:19:29] bnagy: probably more like 'it would be confusing if the parser didn't grok +1'
[07:19:29] Radar: For absolute positivity that it's a positive number.
[07:20:09] Ox0dea: But it makes Numeric#+@ break LSP!
[07:20:44] stnly: has joined #ruby
[07:20:57] krz: has joined #ruby
[07:21:03] Ox0dea: There appears to be no adjectival form of "travesty", but it would apply here.
[07:21:29] Xeago: has joined #ruby
[07:21:34] sdwrage: has joined #ruby
[07:22:32] bnagy: o_0 cause it's a nouned adjective and nobody ever re-adjectived it
[07:23:06] maloik: Radar: now that I catch you online, if you have a few minutes could you take another look at https://github.com/radar/paranoia/pull/239 ? If there's no update that's fine, but if there is or you think it's worth investigating your previous idea, I'd love to know... might have some time today and tomorrow for that
[07:23:35] charturbater: has joined #ruby
[07:23:41] charturbater: who wants to play chess with me?
[07:23:41] charturbater: http://lichess.org/BNXfolu7
[07:23:47] Radar: maloik: You only just caught me :)
[07:24:23] Radar: maloik: I will post to the issue
[07:24:34] maloik: perfect, thank you :)
[07:25:47] benlieb: has joined #ruby
[07:27:17] maloik: my mistake for not making it an actual issue btw... should've known I'd discover things I'd need added, such as the #without_deleted scope
[07:27:35] Hanmac: has joined #ruby
[07:27:41] Radar: -q morissette!*@*
[07:27:44] Radar: !ban morissette 1D
[07:27:53] Radar: until the alcohol wears off
[07:27:58] Aeyrix: only takes hours
[07:28:02] allomov: has joined #ruby
[07:28:25] RickHull: has joined #ruby
[07:29:43] Radar: maloik: done
[07:30:06] maloik: Cool, will have a look and report my findings
[07:31:13] Radar: Home time. Have a good night everyone.
[07:31:28] sevenseacat: Radar: see ya tomorrow.
[07:31:32] Radar: sevenseacat: indeed :)
[07:32:28] platosha__: has joined #ruby
[07:33:08] vdamewood: has joined #ruby
[07:33:55] andikr: has joined #ruby
[07:33:57] yeticry: has joined #ruby
[07:34:12] chinmay_dd: has joined #ruby
[07:36:52] TinkerTyper: has joined #ruby
[07:40:21] dEPy: has joined #ruby
[07:40:28] ahmetkapikiran: has joined #ruby
[07:41:07] morissette: sevenseacat: : cs what ever plz cal 512-599-3556 to help find mobile
[07:41:27] bayed: has joined #ruby
[07:41:41] COON_CHEESE: http://lichess.org/uowW2z3E
[07:41:41] ljarvis: !ban morissette !T 1d
[07:41:42] ChanServ: +b morissette!*@*
[07:41:42] ChanServ: ChanServ kicked morissette: is banned from this channel
[07:41:47] COON_CHEESE: if you want to play chess :)
[07:41:49] sevenseacat: stop drinking, go to bed.
[07:41:56] ljarvis: COON_CHEESE: enough
[07:42:21] ljarvis: !ban COON_CHEESE !T 1d
[07:42:21] ChanServ: +b COON_CHEESE!*@*
[07:42:21] ChanServ: ChanServ kicked COON_CHEESE: is banned from this channel
[07:42:34] sevenseacat: the banhammer is swift and unmerciful.
[07:42:40] astrobun_: has joined #ruby
[07:43:01] bnagy: ALL PRAISE THE HAMMER
[07:43:07] sevenseacat: why does everyone PM *me* after they get banned, even when I didnt do it?
[07:43:09] autrilla_: has joined #ruby
[07:43:20] iamninja: has joined #ruby
[07:43:31] anisha: has joined #ruby
[07:44:25] Musashi007: has joined #ruby
[07:46:06] bkxd: has joined #ruby
[07:46:10] shevy: they act on your behalf!
[07:47:07] Ox0dea: What're the arguments against %d(1 2 3) == [1, 2, 3]?
[07:47:33] ndrei: has joined #ruby
[07:48:08] ljarvis: Ox0dea: is there an argument against it?
[07:48:18] ljarvis: the fact it isn't implemented doesnt count
[07:48:32] Ox0dea: Right, I figured there must be some if it hasn't made its way in yet.
[07:48:46] ljarvis: no, %i() is only recent
[07:48:51] ponga: has joined #ruby
[07:48:52] CyborgCygnus: has joined #ruby
[07:49:20] ljarvis: but, since it saves even less characters i'm not sure how useful it'd be
[07:49:21] shevy: perhaps %d has some other meaning
[07:49:23] bnagy: all the rest kind of save typing
[07:49:45] bnagy: %d would actually be longer, right?
[07:49:49] maloik: you type too quick, I was going to make an equally clever remark
[07:49:53] ljarvis: -b COON_CHEESE!*@*
[07:49:58] ponga: this cute ruboto in this channel, can i have my own irc ruboto?
[07:50:03] ljarvis: -o ljarvis
[07:50:04] ponga: is there source out there?
[07:50:07] maloik: not longer, the more elements the more typing you save (a comma each element)
[07:50:09] ljarvis: ponga: no it's private
[07:50:12] ponga: >> puts "im cute"
[07:50:13] gkra: has joined #ruby
[07:50:13] ruboto: ponga # => im cute ...check link for more (https://eval.in/379507)
[07:50:22] bnagy: maloik: touche
[07:50:58] shevy: Ox0dea have you found a suggestion for it yet? Ox0dea
[07:50:59] Ox0dea: I don't understand how any of you looked at it and thought the %d form was longer...
[07:51:06] krisquigley: has joined #ruby
[07:51:09] shevy: I meant to paste this: https://bugs.ruby-lang.org/projects/ruby-trunk
[07:51:11] ponga: shevy: please make alternative ruboto
[07:51:13] jph98: has joined #ruby
[07:51:15] ponga: i beg you
[07:51:16] maloik: and to say I fell over because sleepdrunk just an hour ago
[07:51:20] shevy: ponga but I am so lazy :(
[07:51:47] aytch: has joined #ruby
[07:52:10] ljarvis: Ox0dea: nobody said it was longer
[07:52:32] ljarvis: maloik: wow.. wednesday is party night huh?
[07:52:33] aapole: has joined #ruby
[07:52:39] allenn: has joined #ruby
[07:52:50] maloik: lol, not quite :)
[07:53:05] maloik: I don't party during the week, got too old for that
[07:53:11] Hounddog: has joined #ruby
[07:53:31] maloik: hell it's been like 6 weeks since I've had more than one drink in an evening
[07:53:47] ljarvis: that is the harsh truth
[07:53:49] ljarvis: I'm the same
[07:53:55] ljarvis: but it's been about 3 months
[07:54:16] sevenseacat: ACTION trying to remember the last alcoholic beverage
[07:54:24] maloik: any particular reason for it?
[07:54:26] sevenseacat: probably new years eve.
[07:54:39] maloik: people always ask me and are then surprised I do it just for climbing :D
[07:54:53] ljarvis: I struggle with time. Need to outsource my drinking
[07:54:58] coderhs: has joined #ruby
[07:56:00] mikecmpbll: has joined #ruby
[07:56:12] shevy: this is one sober cat
[07:56:22] aytch: has joined #ruby
[07:56:41] Oog: has joined #ruby
[07:56:49] shevy: ljarvis you could wear those hats with the beer connected
[07:57:40] ljarvis: hah. Yeah I guess time shouldn't really matter. I just replace water/tea I drink at work with beer instead. Seems like the theory might have some holes in it though
[07:58:07] maloik: you'd get funny looks
[07:58:16] ponga: shevy: do you know what's behind interpreter for the code 10.times.to_a
[07:58:17] maloik: better off adding whiskey to your tea, or replacing water with vodka
[07:58:19] maloik: no smell!
[07:58:22] symm-: has joined #ruby
[07:58:24] ponga: i always thought times is just for loop in simple
[07:58:29] ponga: >> 10.times.to_a
[07:58:30] ruboto: ponga # => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] (https://eval.in/379509)
[07:58:44] krz: has joined #ruby
[07:58:49] ljarvis: maloik: good shout
[07:59:27] maloik: ACTION takes a sip of a clear, smell-less beverage
[07:59:33] shevy: ponga no idea... I am studying the IRB source code, and it already is very confusing
[07:59:38] maloik: that's the one I was after
[07:59:46] shevy: CompletionProc = proc { |input|; bind = IRB.conf[:MAIN_CONTEXT].workspace.binding
[07:59:49] Ox0dea: ponga: #times returns an Enumerator.
[07:59:58] Ox0dea: >> x = 10.times; [x.next, x.next]
[07:59:59] ruboto: Ox0dea # => [0, 1] (https://eval.in/379510)
[08:00:09] apofis: has joined #ruby
[08:00:10] ponga: Ox0dea: so they are adding every x to the empty array then?
[08:00:19] Ox0dea: No, not quite.
[08:00:37] shevy: ponga but it is funny because you learn a lot when you read code like that
[08:00:39] shevy: for instance:
[08:00:43] ljarvis: it's not an array until you turn it into one with .to_a
[08:00:44] shevy: # Set of available operators in Ruby
[08:00:46] shevy: Operators = %w[% & * ** + - / < << <= <=> == === =~ > >= >> [] []= ^ ! != !~]
[08:01:00] Ox0dea: shevy: I see some are missing.
[08:01:12] shevy: which one is missing
[08:01:15] msgodf: has joined #ruby
[08:01:21] Ox0dea: All of the compound assignment operators.
[08:01:26] ponga: flughafen: i actually prefer ponga => pinga
[08:01:32] ponga: next time make it better
[08:01:45] joelataylor: has joined #ruby
[08:01:59] flughafen: ponga ponga
[08:02:05] flughafen: i'll work on it next time
[08:02:07] ponga: anyway hi flughafen
[08:02:07] flughafen: sup adaedra
[08:02:19] flughafen: that's what I like to hear!
[08:02:46] ponga: flughafen: IIRC its from an old tradition that when you check your ping you type in ping? and response is pong!
[08:02:47] shevy: skyadaedra
[08:02:57] flughafen: pinga ponga
[08:03:10] flughafen: terrible latency
[08:03:21] shevy: well it goes slow over to korea
[08:03:30] shevy: because it is far far away :)
[08:03:30] ponga: im reposing from another country sir
[08:03:42] shevy: where are you located right now?
[08:03:43] ponga: *responsing
[08:03:46] marr: has joined #ruby
[08:03:47] ponga: sth korea
[08:03:50] ponga: nz next month
[08:03:51] granthatcher: has joined #ruby
[08:03:58] ponga: still far away from major western nations
[08:03:59] shevy: aha you travel around the world man
[08:04:12] shevy: are you in nz for work?
[08:04:14] ponga: yeah i will move to japan next
[08:04:25] flughafen: ACTION would love to live in japan for a little while
[08:04:37] ponga: casual work at pubs and catching up my good old friends
[08:05:08] sharpmachine: has joined #ruby
[08:06:35] Xeago: has joined #ruby
[08:07:24] pyon: has joined #ruby
[08:07:50] ki0: has joined #ruby
[08:08:12] ponga: shevy: so basically im having holiday
[08:08:44] Aeyrix: I need one of those.
[08:08:52] Aeyrix: Thinking of taking a trip to Tokyo.
[08:09:03] flughafen: i mightg go to the tokyo auto salon in january
[08:09:06] maasha: has joined #ruby
[08:09:18] maasha: what is the latest active shoes project?
[08:09:28] balazs: has joined #ruby
[08:09:38] aytch: has joined #ruby
[08:10:05] maasha: greenshoes?
[08:10:11] ponga: i tried shoes the other day, couldn't figure it out so i had to use java swing
[08:10:24] krisquigley: has joined #ruby
[08:10:35] shevy: ponga I see
[08:10:36] ponga: next time i will learn python if i needed gui
[08:10:51] maasha: shoes4 requires jruby :o(
[08:11:07] Bosnia: Maybe someone could give me a hand. I'm on Win64, 2.2.2p95 x64 and using rufus-scheduler. getting: ArgumentError: not a valid cronline : '52 0 * * *'
[08:11:10] ponga: are you in germany shevo
[08:11:12] Bosnia: it worked before I reinstalled
[08:11:27] maasha: ponga: if you fail with shoes it is pretty bad :o)
[08:11:52] Bosnia: checking source code the error comes up when the '52 0 * * *'.split.length isn't 5
[08:11:57] ahmetkapikiran: has joined #ruby
[08:11:57] shevy: ponga nope, a bit south; Austria, Vienna
[08:12:04] ponga: maasha: i found java swing easier than shoes , i know you guys will call me nuts for this
[08:12:17] maasha: .oO(nuts)
[08:12:18] ponga: wow you live in an awesome place shevy
[08:13:04] yaw: has joined #ruby
[08:13:11] edwinvdgraaf: has joined #ruby
[08:13:20] n008f4g_: has joined #ruby
[08:13:28] shevy: ponga many years ago, my family travelled through some far away countries; I remember when we were in Seoul, it was extremely cold; the bulgogi they served there was great though. What I liked most was dolsot bibimbap actually
[08:14:01] ponga: shevy: so you basically had " you can't seriously fail this" food
[08:14:04] Bosnia: bibimbap for breakfast every day when I went to Seoul
[08:14:10] Bosnia: Seoul was wonderful
[08:14:23] Aeyrix: I want to trek around sk
[08:14:32] hubcaps: has joined #ruby
[08:14:49] shevy: bosnia why were you in Seoul?
[08:14:59] Bosnia: went around Asia 1 month
[08:15:03] ponga: shevy: you had to try living dancing baby octopus chopped up in front of you
[08:15:16] Bosnia: was a peaceful place compared to Hong Kong and mainland China major cities
[08:15:30] ponga: korea more peaceful than hong kong?
[08:15:33] ponga: interesting
[08:15:37] Bosnia: ha is that a joke
[08:15:55] jesterfraud: assuming you mean South Korea?
[08:16:06] jesterfraud: (Seoul, of course South)
[08:16:09] ponga: i didn't mention which korea it is !
[08:16:22] Bosnia: yeah vacationed in work camp in north korea
[08:16:40] ponga: i still remember the aussie telegraph mentioning olympic scores with "good korea" and "bad korea"
[08:16:51] ponga: looks like it were easier to grasp than regional difference to aussies
[08:16:59] Aeyrix: Can confirm.
[08:17:11] mandarinkin: has joined #ruby
[08:17:54] RegulationD: has joined #ruby
[08:18:15] chthon: has joined #ruby
[08:18:40] shevy: ponga oh yeah, you guys have to unify korea, the germans managed to do so as well :)
[08:18:44] ponga: whenever i escort a western dude in seoul i feed him exotic food once and laugh at him
[08:18:52] ponga: *mean korean
[08:18:54] Bosnia: oh you live there ponga ?
[08:19:01] ponga: I AM KOREAN
[08:19:21] shevy: exotic food
[08:19:21] Bosnia: I liked how easy it was to learn to read the language
[08:19:35] Bosnia: I did it on the plane ride from Shanghai
[08:19:40] shevy: we somehow ended up in Beijing, in some less frequented area; they did not speak much english, so we ordered something
[08:19:43] tvw: has joined #ruby
[08:19:52] ndrei: has joined #ruby
[08:19:56] ponga: bosnia: a king in 17 century thought chinese characters was fucked up and created the whole system on his own
[08:19:56] shevy: ended up serving us a crab that was still sort of alive, uncooked
[08:20:02] Bosnia: yeah it's cool the history
[08:20:06] Bosnia: Japan needs to get its shit together
[08:20:12] ponga: then he built a department solely on keeping its version updated
[08:20:13] shevy: I think they were pulling a prank on us
[08:20:28] ponga: so it's a written system artificially created and managed, just like programming
[08:20:32] Bosnia: useful to match like train stations or food recognition
[08:20:34] Bosnia: instead of pointing
[08:20:36] n3vtelen: has joined #ruby
[08:20:40] shevy: well it's better than those chinese letters
[08:20:41] Ox0dea: ponga: Just like all language!
[08:21:16] ponga: Ox0dea: no you guys failed at finding out that small l big I look same
[08:21:31] Abhijit: has joined #ruby
[08:21:32] ponga: we did it better
[08:21:33] Ox0dea: bosnia: The kana aren't particularly hard to learn, and you could theoretically get by with them.
[08:21:37] wald0: has joined #ruby
[08:21:46] Abhijit: has left #ruby: ()
[08:21:51] axl_: has joined #ruby
[08:21:51] axl__: has joined #ruby
[08:21:59] Bosnia: yeah right did japn 101
[08:22:08] Bosnia: wasn't /that/ hard but does require a lot more focus
[08:22:13] Bosnia: isn't trivial to learn like korean
[08:22:19] ponga: bosnia: so you learnt how to read korean letter and used it in vacation?
[08:22:34] Bosnia: I actually had learnt them before when watching brood war streams back in the day
[08:22:38] Bosnia: to recognize player names
[08:22:46] ponga: haha who's your favourite
[08:23:04] Bosnia: Jung Myung Hoon fighting~~
[08:23:06] n3vtelen: in this program my else doesn't work: https://gist.github.com/anonymous/071a6217f03ff7f4a463
[08:23:23] Bosnia: I came around when Fantasy was trashing everyone
[08:23:29] ponga: cool cos everyone's like "OH Flash is god" and so , mine is Nal_ra
[08:24:03] shevy: n3vtelen, and what is phons_array
[08:24:09] shevy: we can not reproduce your code because you do not tell us what is phons_array
[08:24:46] ponga: i think when japanese abandons kanji and adopt spacing, it'd be much easier
[08:25:03] shevy: do you think this will ever happen
[08:25:06] n3vtelen: that is not my code
[08:25:16] n3vtelen: it's for my friend
[08:25:19] shevy: <n3vtelen> in this program my else doesn't work:
[08:25:27] shevy: "my else"
[08:25:45] shevy: ruby is logical
[08:25:48] n3vtelen: I should told "a friend of mine"
[08:25:53] shevy: if the else-clause is not triggered
[08:25:58] shevy: then the if-clause must evaluate to true
[08:26:10] adaedra: Yeah, don't stole someone else else, it's mean
[08:26:18] shevy: so, the part "if emeleytor[0] == user_select_name && emeleytor[1] == user_select_lastname" must be true
[08:26:18] Bosnia: SWIM wrote this program...
[08:26:38] Bosnia: ruby isn't illegal not yet
[08:26:45] shevy: alternativey, phons_array is an empty Array
[08:26:49] shevy: *alternatively
[08:27:00] shevy: so check on these two possibilities
[08:27:10] pikos: has joined #ruby
[08:27:13] mister_s_: has joined #ruby
[08:27:20] shevy: puts 'Empty array!' if phons_array.empty?
[08:27:48] edwinvdgraaf: has joined #ruby
[08:28:51] n3vtelen: https://gist.github.com/anonymous/357d94dc5ec0119264a5
[08:28:56] n3vtelen: that's the code
[08:29:16] commondream: has joined #ruby
[08:29:29] intinig: has joined #ruby
[08:29:38] shevy: and what does not work
[08:29:42] shevy: you iterate over all elements
[08:29:48] shevy: first run, it outputs the if-clause
[08:29:53] shevy: second run, it outputs the else-clause
[08:30:21] Bosnia: ran it can confirm
[08:30:29] terlar: has joined #ruby
[08:30:42] Oog: has joined #ruby
[08:31:05] glcx: has joined #ruby
[08:31:49] edwinvdg_: has joined #ruby
[08:32:24] n3vtelen: ok, I'm confused
[08:32:26] Zai00: has joined #ruby
[08:34:10] Bosnia: What was the specific error or problem that prompted the question?
[08:35:20] lessless: has joined #ruby
[08:35:22] mrsolow: has joined #ruby
[08:36:37] bruno-: has joined #ruby
[08:37:37] n3vtelen: that only prints `your user not exist`
[08:37:44] n3vtelen: but ok with first one
[08:37:52] n3vtelen: `tavakkoli 09213380329`
[08:38:45] DoubleMalt: has joined #ruby
[08:39:00] charliesome: has joined #ruby
[08:39:31] mrsolow: has joined #ruby
[08:40:54] xehbit: has joined #ruby
[08:41:02] bin_005: has joined #ruby
[08:41:40] bruno-: has joined #ruby
[08:42:02] parduse: has joined #ruby
[08:42:23] mrsolow: has joined #ruby
[08:43:23] xehbit: has joined #ruby
[08:44:56] maxshelley: has joined #ruby
[08:45:33] noethics: has joined #ruby
[08:46:59] intinig: has joined #ruby
[08:47:15] lkba: has joined #ruby
[08:47:21] conta: has joined #ruby
[08:47:31] timonv: has joined #ruby
[08:48:33] maloik: We're looking to output the string version of a regexp into a configuration file using Chef, but escaping slashes is a bit funny... anyone have an idea on how to do that? We basically want to turn "/foo/index.html" into "\/foo\/index\.html", but the input string is dynamic so we were using gsub
[08:48:43] maloik: >> Regexp.new("/\/foo/").to_s
[08:48:43] ruboto: maloik # => "(?-mix:\\/\\/foo\\/)" (https://eval.in/379526)
[08:48:49] maloik: that is also not quite what I was expecting
[08:49:03] maloik: particularly the ?-mix: part
[08:49:26] benlovell: has joined #ruby
[08:51:17] ljarvis: >> Regexp.escape "/foo/index.html"
[08:51:18] ruboto: ljarvis # => "/foo/index\\.html" (https://eval.in/379534)
[08:52:00] ljarvis: >> Regexp.new(Regexp.escape("/foo/index.html"))
[08:52:01] ruboto: ljarvis # => /\/foo\/index\.html/ (https://eval.in/379536)
[08:52:45] dmolina: has joined #ruby
[08:52:45] Mon_Ouie: has joined #ruby
[08:52:49] apeiros: maloik: .inspect
[08:53:08] apeiros: maloik: also the to_s variant is a valid regexp, just interpolate it into //
[08:53:14] ljarvis: ah you wanted a string
[08:53:31] maloik: yea we need a string :/
[08:53:32] ljarvis: >> Regexp.new(Regexp.escape("/foo/index.html")).inspect
[08:53:33] ruboto: ljarvis # => "/\\/foo\\/index\\.html/" (https://eval.in/379542)
[08:53:46] apeiros: i.e., /#{/foo/.to_s}/ is equivalent to /foo/
[08:53:50] apeiros: even if it looks fancy
[08:54:02] msgodf: has joined #ruby
[08:54:02] ljarvis: but yeah as apeiros says, the (?-mix) stuff is fine
[08:54:17] apeiros: the -mix is carrying all the flags of the regex
[08:54:43] apeiros: (basically says -m, -i, -x, i.e. without m flag, without i flag, without x flag)
[08:54:52] dfockler: has joined #ruby
[08:54:58] maloik: let's see if this helps
[08:55:23] apeiros: the reason it looks like that is that this allows a regex to be interpolated into another regex
[08:55:33] apeiros: couldn't do it if it looked like /foo/
[08:55:48] maloik: I think I didn't explain the requirements correctly though but let me just play around real quick
[08:56:47] allomov: has joined #ruby
[08:56:47] _blizzy_: has joined #ruby
[08:56:55] Macaveli: has joined #ruby
[08:56:58] intinig: has joined #ruby
[08:57:00] CustosLimen: has joined #ruby
[08:58:10] bruno-: has joined #ruby
[08:58:45] _blizzy_: has joined #ruby
[08:58:48] shredding: has joined #ruby
[08:59:03] solars: has joined #ruby
[08:59:56] platzhirsch: has joined #ruby
[09:00:30] Oog: has joined #ruby
[09:01:33] n3vtelen: I need to loop over a array
[09:01:36] zenguy_pc: has joined #ruby
[09:01:54] shredding: has joined #ruby
[09:02:11] Scroff: has joined #ruby
[09:02:16] ESpiney_: has joined #ruby
[09:02:37] Ox0dea: maloik: Does foo.gsub('/', '\\/') not do what you need?
[09:02:38] ndrei: has joined #ruby
[09:02:53] ponga: is that regex in gsub() bracket
[09:03:03] n3vtelen: then If the contact found loop breaks else prints "contact doesn't exist"
[09:03:05] bruno-: has joined #ruby
[09:03:18] apeiros: n3vtelen: Array#find
[09:03:23] maloik: Ox0dea: results in too many slashes
[09:03:31] Ox0dea: maloik: Are you sure?
[09:03:34] Ox0dea: >> '\\'.size
[09:03:35] ruboto: Ox0dea # => 1 (https://eval.in/379554)
[09:04:18] juanpaucar: has joined #ruby
[09:04:32] pikos: has joined #ruby
[09:04:51] n3vtelen: apeiros: I wrote this: https://gist.github.com/anonymous/af362ec2bce2338cbea6
[09:04:53] zenguy_pc: has joined #ruby
[09:05:13] Silent__: has joined #ruby
[09:05:29] zenspider_: has joined #ruby
[09:05:37] apeiros: n3vtelen: that will print "doesn't exist" on every iteration.
[09:05:42] lessless: has joined #ruby
[09:05:43] plashchynski: has joined #ruby
[09:05:44] apeiros: n3vtelen: as I said, take a look at Array#find
[09:05:52] sharpmachine: has joined #ruby
[09:05:55] shamangeorge: has joined #ruby
[09:06:08] maloik: colleague is testing the ?-mix solution, but is afraid it won't work because it's a varnish config using the regexp
[09:06:21] n3vtelen: apeiros: http://ruby-doc.org/core-2.2.0/Array.html ?
[09:07:20] apeiros: n3vtelen: sorry, I thought Array had its own copy. it inherits it from Enumerable: http://ruby-doc.org/core-2.2.0/Enumerable.html#method-i-find
[09:07:33] astrobun_: has joined #ruby
[09:07:53] iamninja: has joined #ruby
[09:08:06] Polysics: has joined #ruby
[09:08:09] jph98: has left #ruby: ()
[09:08:43] Musashi007: has joined #ruby
[09:09:27] Ox0dea: has left #ruby: ("WeeChat 1.3-dev")
[09:10:09] CyborgCygnus: has joined #ruby
[09:10:32] _blizzy_: has joined #ruby
[09:11:49] balazs: has joined #ruby
[09:11:56] PierreRambaud: has joined #ruby
[09:12:32] Miphix: has joined #ruby
[09:12:51] bruno-: has joined #ruby
[09:13:15] senayar: has joined #ruby
[09:13:15] senayar: has joined #ruby
[09:13:16] Scroff: has joined #ruby
[09:13:29] n3vtelen: apeiros: `contacts.find { |i| i[0] == 'shahryar' and i[1] == 'tavakkoli' }`
[09:13:59] apeiros: n3vtelen: yupp, like that
[09:14:01] ledestin: has joined #ruby
[09:14:31] n3vtelen: but it doesn't return anything
[09:14:43] canton7: use '&&', not 'and'
[09:14:59] canton7: (it likely won't matter here, but it will bite you at some point)
[09:15:05] maloik: ljarvis: are you doing arrrrcamp this year?
[09:15:10] starfox_sf: has joined #ruby
[09:15:52] maloik: (you should, and you should get a ticket quick before early birds are gone :P)
[09:15:58] tvw: has joined #ruby
[09:17:49] bruno-: has joined #ruby
[09:17:52] yoongkang: has joined #ruby
[09:18:12] arup_r: has joined #ruby
[09:19:17] RegulationD: has joined #ruby
[09:20:10] n3vtelen: apeiros: http://paste.ofcode.org/erj2Cz4uXjvKkSCsYwUtpW ?
[09:20:39] apeiros: n3vtelen: you should test whether find returned a contact or nil
[09:20:54] apeiros: if included then ???your puts??? else puts "not found" end
[09:21:50] senayar: has joined #ruby
[09:21:51] chthon: has joined #ruby
[09:21:54] fusillicode1: has joined #ruby
[09:22:00] fusillicode1: has left #ruby: ()
[09:23:08] n3vtelen: apeiros: http://paste.ofcode.org/34s78NcGtWWsiMnyypHPqZE
[09:23:12] fusillicode: has joined #ruby
[09:23:24] fusillicode: has left #ruby: ()
[09:23:26] lessless: has joined #ruby
[09:23:27] bruno-: has joined #ruby
[09:23:27] apeiros: looks good
[09:23:37] n3vtelen: does ruby have a standard way to write codes?
[09:24:04] n3vtelen: like find enumerator
[09:25:04] PierreRambaud: n3vtelen, some coders like use rubocop, others have their own way to develop :)
[09:25:30] fabrice31_: has joined #ruby
[09:25:36] n3vtelen: n3vtelen: thanks
[09:25:46] multi_io: has joined #ruby
[09:25:46] adaedra: community guidelines say 2 spaces
[09:26:40] alex88: has joined #ruby
[09:27:10] arup_r: Suppose I have a string likes `'first_name ASC'` .. how can I add one string like `'COUNT(votes.id)'` and get this `'first_name COUNT(votes.id) ASC'` finally ?
[09:27:16] n3vtelen: adaedra: look at this: http://paste.ofcode.org/vYLjsRGPZ5HxAk24iM5TdL
[09:27:43] adaedra: remove the `then`
[09:28:00] n3vtelen: adaedra: after `contacts.find`
[09:28:11] adaedra: anyway, what am I supposed to look at ?
[09:28:26] bruno-: has joined #ruby
[09:28:59] hectortrope: has joined #ruby
[09:29:05] stoogenmeyer_: has joined #ruby
[09:29:07] n3vtelen: adaedra: how much spaces is needed after that
[09:29:14] n3vtelen: adaedra: I mean `contacts.find`
[09:29:35] adaedra: looks good like it is
[09:31:12] soasme: has joined #ruby
[09:31:59] arup_r: thanks.. I did it other way
[09:33:33] soasme: has joined #ruby
[09:34:18] pikos: has joined #ruby
[09:34:31] fabrice31: has joined #ruby
[09:34:50] OrbitalKitten: has joined #ruby
[09:36:07] bruno-: has joined #ruby
[09:37:34] fujimura: has joined #ruby
[09:38:32] alem0lars: I'm trying to execute "bundle install --deployment" in the following project: https://github.com/alem0lars/fizzy
[09:39:21] alem0lars: However I get the following error: https://gist.github.com/alem0lars/5a59eb4337ef3881efe7
[09:39:39] alem0lars: But I can't figure out what I'm doing wrong
[09:39:48] alem0lars: Just running "bundle install" everything works fine
[09:40:59] adaedra: prefix your command with bundle exec
[09:41:15] alem0lars: bundle exec bundle install --deployment ?
[09:41:31] adaedra: it's bundle install which throws this error?
[09:41:31] alem0lars: adaedra: I get the same error
[09:42:17] j4cknewt: has joined #ruby
[09:43:53] alem0lars: The strange thing is that after running "bundle install --deployment" I always get that error (even if I run "bundle install" or anything). When I remove .bundle directory I don't get that error anymore, but when I retry to run "bundle install --deployment" I start getting that error again
[09:44:07] adaedra: what commands give this error
[09:44:15] alem0lars: bundle install --deployment
[09:44:18] mister_solo: has joined #ruby
[09:45:40] bruno-: has joined #ruby
[09:45:55] kraljev11: has joined #ruby
[09:46:09] AndyM: has joined #ruby
[09:46:38] dionysus69: has joined #ruby
[09:48:22] AndyM: Hello? I have a quick question about class instance variables and concurrency. Is anyone here that could help?
[09:48:29] ruboto: Just ask your question, if anyone has or can, they will respond.
[09:48:50] stamina: has joined #ruby
[09:48:59] maloik: bad timing for me as I have to run out for food, but there's plenty of helpful people
[09:50:10] AndyM: So I'm doing Rails but the question is not specific to it: I read upon thread-safe practices and everywhere people wrote to watch out for class instance variables since they can make your code thread unsafe.
[09:50:32] AndyM: Still I couldn't really figure out why because the short explanations didnt make much sense to me.
[09:50:45] bruno-: has joined #ruby
[09:50:48] ndrei: has joined #ruby
[09:50:51] apeiros: AndyM: the location or scope of a variable doesn't matter
[09:50:59] apeiros: AndyM: what matters is whether it is shared across threads
[09:51:08] ccooke: AndyM: The main thing is that they can be changed by one instance of a class in one thread, and affect the instance you're working on.
[09:51:08] apeiros: class ivars are just very likely to be shared
[09:51:40] ccooke: Aye. Any variable that could be updated in multiple places is a potential issue.
[09:51:44] mister_solo: has joined #ruby
[09:51:48] AndyM: you mean for example if i intialize an object and use it in different threads?
[09:52:10] yfeldblum: has joined #ruby
[09:52:22] ccooke: AndyM: no. Class ivars are visible to *every* object made from the class
[09:52:55] ccooke: AndyM: so you can make one object in thread 1, another in thread 2. If the object in thread 2 does something to change a class ivar, the change will affect thread 1.
[09:52:56] apeiros: ccooke: um, not correct. ivars are never visible outside the object they belong to (I know what you mean, but that's not "visible")
[09:53:21] AndyM: exactly apeiros
[09:53:22] ccooke: apeiros: "likely to affect the behaviour of". Better?
[09:53:51] AndyM: Class instance variables belong to the instance of the object. I'm not talking about class variables
[09:53:54] apeiros: not sure. struggling myself to find proper wording. might be the headache, though.
[09:54:09] apeiros: AndyM: your class is probably assigned to a constant, right?
[09:54:16] adaedra: apeiros: still ill?
[09:54:22] bnagy: AndyM: no, they don't
[09:54:27] apeiros: AndyM: and that constant is probably not used by just single thread
[09:54:31] bnagy: class instance variables belong to the class
[09:54:32] ccooke: AndyM: In Ruby, there are Class variables and Class instance variables.
[09:54:38] bnagy: the instance has its own ivars
[09:54:42] ccooke: AndyM: both of these are associated with the class.
[09:54:47] apeiros: AndyM: which means you're sharing mutable state across threads.
[09:54:54] bnagy: nobody has talked about classvars yet, so best not to start
[09:54:58] ccooke: AndyM: maybe the issue here is terminology?
[09:55:23] ccooke: bnagy: no, it is useful. I think we have a terminology disconnect here.
[09:55:24] apeiros: and as said before - with threads, that's the issue: sharing mutable state.
[09:55:46] AndyM: you're right, the class itself can have class instance variables
[09:55:47] bnagy: ccooke: not realy, the issue is between class @ivars and "normal" @ivars
[09:55:47] troulouliou_dev: has joined #ruby
[09:55:51] apeiros: where that state is stored, or how it is accessed doesn't matter.
[09:56:03] bnagy: @@classvars is just going to make it even more confusing imho :)
[09:56:03] AndyM: and objects that are created from it have their own instance variables
[09:56:16] apeiros: adaedra: not ill, no. I just have frequently headaches. it's annoying, but it passes.
[09:56:57] ccooke: bnagy: Yes. But AndyM is talking about class ivars as if they are instance ivars.
[09:57:11] apeiros: class ivars are instance ivars
[09:57:17] bnagy: AndyM: very strictly speaking there's nothing that makes class ivars a threadsafety issue
[09:57:21] apeiros: there's not really a point in making a distinction
[09:57:24] AndyM: yes, i think i mixed those up
[09:58:00] ccooke: AndyM: The point that thread safety depends on sharing more than anything else still stands, though
[09:58:06] bnagy: any shared access to objects across threads can cause trouble, basically
[09:58:13] tvw: has joined #ruby
[09:58:23] AndyM: yes i know.
[09:58:25] hdev1: has joined #ruby
[09:58:27] ccooke: AndyM: class ivars are more likely to be shared, and if you want thread safety you should protect all writes to them with locking
[09:58:28] bnagy: your're safe enough if it's readonly though
[09:58:33] mrsolow: has joined #ruby
[09:58:35] apeiros: AndyM: so what part are you having issues with?
[09:58:41] bnagy: if it's not readonly you probably have a design problem
[09:58:49] bnagy: but you're using Rails, so I guess that's a given
[09:58:54] aapole: has joined #ruby
[09:59:41] AndyM: wait, i have to form a proper question :D
[10:00:35] AndyM: ok i'll just repeat what i understand:
[10:01:17] AndyM: Classes have instance variables and objects instanciated from those classes also have instance variables.
[10:01:44] chussenot: has joined #ruby
[10:01:57] bnagy: you can reduce that to "objects have instance variables"
[10:02:00] AndyM: So if you use an object only in one thread and you dont share it the instance variables in it are safe
[10:02:08] sharpmachine: has joined #ruby
[10:02:09] bnagy: some objects happen to be classes
[10:02:20] AndyM: bnagy dont confuse me :D
[10:02:28] apeiros: AndyM: so far correct
[10:02:33] AndyM: i know, in ruby everything is an object
[10:02:47] apeiros: that, otoh, is not correct ;-)
[10:02:56] bnagy: ACTION glares
[10:03:24] AndyM: but in rails for example every request makes rails instanciate an object from my controller class
[10:03:45] AndyM: in a multithreded environment every thread deals with one request a time
[10:03:55] apeiros: not necessarily
[10:03:55] dhjondoh: has joined #ruby
[10:04:03] AndyM: that means every thread makes an instance of the class
[10:04:25] apeiros: but yes, rails will use a single thread to process a single request
[10:04:26] AndyM: so i dont have to care about the instance variables of that object
[10:04:53] bnagy: pretty much ok so far, carry on
[10:04:59] ccooke: AndyM: of that object, no.
[10:05:03] matcouto: has joined #ruby
[10:05:23] AndyM: all i have to care about are the instance variables of the controller class itself
[10:05:39] bnagy: well you can't "accidentally" access those from an instance
[10:05:45] ccooke: if your assumptions are correct, then yes
[10:05:55] Xeago: has joined #ruby
[10:06:21] bnagy: you'd have to do something like self.class.instance_variable_get or something
[10:06:35] bnagy: so you'd have to explicitly code for it
[10:06:36] AndyM: i also have a lot of models
[10:06:40] AndyM: that i'm messing with
[10:06:49] AndyM: my model classes have class instance variables
[10:06:52] bnagy: this is getting railsy, I'm scared :<
[10:06:54] ccooke: bnagy: or call a method on the class that alters a class instance variable.
[10:06:57] AndyM: that i'm accessing in my controllers
[10:07:03] AndyM: sorryyy :D
[10:07:27] AndyM: ccooke but that method would need to be a class method, right?
[10:07:38] edwinvdgraaf: has joined #ruby
[10:07:43] bnagy: uhhhh... kiiinda...
[10:07:56] ccooke: AndyM: to access a class instance variable, you will have to call at least one method from the class object, yes
[10:08:02] bnagy: you have to do _something_ to get visibility of them
[10:08:05] AndyM: yes, unless you call these weird class_instance_variable_get methods
[10:08:27] ccooke: AndyM: that accesses the class, it just (at most) hides it from you
[10:08:33] lkba_: has joined #ruby
[10:09:27] AndyM: if my class would be called MyClass
[10:09:41] AndyM: and it has an instance variable called @var
[10:10:18] AndyM: i could get this variable by calling MyClass.var in the MyClass code
[10:10:22] jmhmccr: has joined #ruby
[10:10:24] AndyM: (although that's terrible)
[10:10:32] bnagy: not without other scaffolding
[10:10:34] apeiros: > AndyM: yes, unless you call these weird class_instance_variable_get methods
[10:10:36] AndyM: ok maybe i need an accessor
[10:10:39] apeiros: that's calling a method too ;-)
[10:10:44] ccooke: AndyM: you would only be able to do that if a var method had been defined on MyClass to return it
[10:11:01] AndyM: oouukaaay
[10:11:08] AndyM: now i see
[10:11:17] AndyM: it was just mixed up terminology
[10:12:10] AndyM: you dont' have to care about instance vars of objects if you dont share the object itself between multiple threads
[10:12:15] bruno-: has joined #ruby
[10:12:17] ccooke: If you *are* using something like MyClass.var to get some data, then that *is* calling the class and *might* be accessing a class instance variable that *definitely could* be a thread safety risk
[10:12:20] edwinvdg_: has joined #ruby
[10:12:41] bnagy: you don't have to care about concurrent access to anything unless the thing is shared between threads
[10:12:54] ccooke: AndyM: that is true. Just remember that the class is also an object and definitely *is* shared across threads.
[10:12:59] AndyM: but you should care about the instance variables of the class because they are definitly shared everywhere you want (at least in Rails)
[10:13:15] balazs: has joined #ruby
[10:13:17] ccooke: In any mulitthreaded code
[10:13:35] AndyM: that actually makes sense :D
[10:13:42] ccooke: Leave Rails out of it, it seems to make bnagy and apeiros twitch. And we should be kind to apeiros at least, since they have a headache ;-)
[10:13:56] apeiros: it doesn't make me twitch, no
[10:14:07] bnagy: I just don't think it's a good pattern to use your class as a storage closet
[10:14:08] apeiros: but rails is irrelevant to the issue
[10:14:17] ccooke: It is, yes
[10:14:18] bnagy: except they built a whole framework around doing that
[10:14:22] AndyM: yes it is
[10:14:46] ccooke: bnagy: the behaviour we're talking about is not bad behaviour, whether it's in rails or not.
[10:14:59] bronson_: has joined #ruby
[10:15:05] bnagy: that's a whole different debate
[10:15:14] ccooke: Classes are objects. Classes get shared across threads. Making objects from those classes means having to think about thread safety.
[10:15:21] bnagy: I disagree, but I don't really want to fight about it
[10:15:24] ccooke: (but hey, using threads means having to think about thread safety)
[10:15:27] plashchynski: has joined #ruby
[10:16:09] AndyM: thank you guys
[10:16:13] AndyM: my laundry is ready
[10:16:16] bnagy: if you keep state in state-storing-things then it's much more obvious that you need threadsafe access to them
[10:16:33] bnagy: AndyM: re HOW, ccooke already mentioned Mutex, there's also Queue
[10:16:47] apeiros: and Monitor
[10:16:53] bnagy: imho those two can manage 99% of concurrency problems
[10:16:59] ccooke: Queues make things so much simpler
[10:17:04] bnagy: there are more esoteric ones :/
[10:17:47] bnagy: AndyM: Mutex has a nice method synchronize, so like @mut.synchronize { #shared access to something }
[10:17:59] AndyM: yes i also read about that
[10:18:07] AndyM: but mutexes reduce concurrency
[10:18:14] bnagy: I prefer to write with Queues, but I don't have a religious viewpoint about whether it's better
[10:18:21] chinmay_dd: has joined #ruby
[10:18:30] AndyM: and i dont need to use queues either
[10:18:32] bnagy: they don't reduce it, they just enforce serial access to shared stuff
[10:18:47] AndyM: the best approach in my situation is simply improving code
[10:19:00] apeiros: AndyM: during a synchronized code block, other threads can still execute
[10:19:03] bnagy: avoiding the problem in the first place is definitely the winner
[10:19:07] apeiros: they just can't enter the same mutex
[10:19:18] davidhq: has joined #ruby
[10:19:20] AndyM: bnagy but that most likely inhibits parallel execution, right?
[10:19:27] apeiros: AndyM: no, see ^
[10:19:27] bnagy: it miiiight
[10:19:36] bnagy: if you have crazy lock contention, but you hopefully don't
[10:19:56] apeiros: it only inhibits concurrent execution if ALL your code wants to execute the same synchronized block
[10:20:05] thebastl: has joined #ruby
[10:20:06] AndyM: yes i know that unaffected threads are not concerned
[10:20:18] bnagy: if you get to that point then you redesign anyway
[10:20:27] apeiros: and yes, that means you should make your syncs narrow
[10:20:49] ccooke: If you need exclusive action, use Thread.exclusive {}. For anything else, assume that other threads *might* take action.
[10:20:51] rickmasta: has joined #ruby
[10:20:57] RegulationD: has joined #ruby
[10:21:04] apeiros: ccooke: Thread.exclusive is a no-no
[10:21:07] apeiros: don't use it
[10:21:33] AndyM: but especially in my "situation" the chance is very high that it eventually affects concurrency
[10:21:39] AndyM: if you simply use mutexes
[10:21:44] apeiros: you only use it if you're building threading primitives. i.e. if you write a class like Mutex itself.
[10:21:54] ccooke: apeiros: I use it for one thing only (which is code that needs to redefine and reload an entire system). There it's essential. Nowhere else.
[10:21:59] sarkyniin: has joined #ruby
[10:22:06] AndyM: say if you have 10 000 requests and all objects need to access the same shared variable
[10:22:31] bnagy: if they need RW access to it then you're kind of boned
[10:22:43] bnagy: most people use copies or sharding or whatever then
[10:22:45] AndyM: reading only is no problem
[10:22:56] bnagy: but it becomes fiddly
[10:22:58] AndyM: but then you can use constants
[10:23:00] ccooke: apeiros: Mostly in a bit of code that checks and reloads all the .rb files that have been modified. You definitely don't want any other code executing during that :-)
[10:23:15] bnagy: imho push it out to a system that's built for that ( like a cache / db / whatever )
[10:24:25] bnagy: ok I have to do important things concerning beer
[10:24:42] AndyM: and i have to pick up my laundry
[10:24:48] AndyM: thanx again guys
[10:25:13] AndyM: also this made me hungry
[10:27:10] ndrei: has joined #ruby
[10:30:50] EasyCo: If I'm working on a gem and want to require it for testing purposes without actually building and installing the gem, what are my options?
[10:31:36] adaedra: bundler can load gems from a path
[10:31:47] serivich: has joined #ruby
[10:32:09] ahmetkapikiran: has joined #ruby
[10:33:40] benlovell: has joined #ruby
[10:34:34] rikkipitt: has joined #ruby
[10:36:44] zenspider: EasyCo: set your load path correctly and it'll Just Work
[10:36:50] zenspider: ruby -I..path/to/lib test/some_test.rb
[10:37:32] zenspider: bundler gets in the way and musses it up
[10:38:02] Spami: has joined #ruby
[10:38:03] krz: has joined #ruby
[10:38:15] EasyCo: Yah, exactly, bundler keeps fucking with my juju
[10:39:21] zenspider: if you can remove it from the equation, do so
[10:39:35] zenspider: if you can't, then you're gonna have to declare the local path in the Gemfile
[10:39:38] zenspider: drives me up the wall
[10:39:39] Polysics: has joined #ruby
[10:40:04] EasyCo: pry -I ./lib -rgemname
[10:40:09] EasyCo: Beautiful, thanks zenspider
[10:40:19] zenspider: awesome. good luck. bedtime for me
[10:40:21] troulouliou_dev: has joined #ruby
[10:40:35] EasyCo: Good to go to bed on a small win.
[10:41:48] Scroff: has joined #ruby
[10:43:02] matcouto: has joined #ruby
[10:43:21] startupality: has joined #ruby
[10:45:29] sdothum: has joined #ruby
[10:46:22] Scroff: has joined #ruby
[10:46:40] phutchins: has joined #ruby
[10:47:53] rikkipitt: has joined #ruby
[10:48:50] tedstriker: has joined #ruby
[10:50:11] millerti: has joined #ruby
[10:51:27] alphaatom: has joined #ruby
[10:52:44] alphaatom: has joined #ruby
[10:52:49] fabrice31: has joined #ruby
[10:53:19] juanpaucar: has joined #ruby
[10:53:30] joelataylor_: has joined #ruby
[10:53:56] alphaatom: has joined #ruby
[10:55:02] khebbie: has joined #ruby
[10:55:56] Travis-42: has joined #ruby
[10:59:10] bkxd: has joined #ruby
[10:59:14] pyon: has joined #ruby
[11:01:38] mathie: has joined #ruby
[11:02:07] rodfersou: has joined #ruby
[11:03:00] sharpmachine: has joined #ruby
[11:03:59] starfox_sf: has joined #ruby
[11:04:23] goodcodeguy: has joined #ruby
[11:10:05] Xeago: has joined #ruby
[11:10:20] centrx: has joined #ruby
[11:11:13] Soda: has joined #ruby
[11:14:27] hoov: has joined #ruby
[11:14:44] ur5us: has joined #ruby
[11:15:52] Papierkorb: has joined #ruby
[11:16:31] bmurt: has joined #ruby
[11:17:54] pepperbreath: has joined #ruby
[11:18:47] ndrei: has joined #ruby
[11:19:56] pepperbreath: has joined #ruby
[11:20:04] yaw: has joined #ruby
[11:21:07] bkxd: has joined #ruby
[11:22:36] RegulationD: has joined #ruby
[11:22:59] Abhijit: has joined #ruby
[11:23:06] Abhijit: has left #ruby: ()
[11:24:26] krisquigley: has joined #ruby
[11:25:45] chinmay__: has joined #ruby
[11:26:21] Scroff: has joined #ruby
[11:28:50] centrx: has joined #ruby
[11:29:04] gisli: has joined #ruby
[11:30:41] gisli: hiya, so I have this loop in my script "(00...100).each{|n| STDOUT.write(gen_redis_proto("RPUSH","testlist","#{n}"))". How would I go about padding the numbers?
[11:31:12] ldnunes: has joined #ruby
[11:31:21] centrx: gisli, Use rjust/ljust or sprintf?
[11:31:34] commondream: has joined #ruby
[11:32:35] davidhq: has joined #ruby
[11:34:10] Oog: has joined #ruby
[11:34:54] allcentury: has joined #ruby
[11:35:35] c355E3B: has joined #ruby
[11:36:02] charliesome: has joined #ruby
[11:37:58] dgutierrez1287: has joined #ruby
[11:38:27] chussenot: has joined #ruby
[11:40:17] Polysics: has joined #ruby
[11:40:25] ur5us: has joined #ruby
[11:40:34] cajone: has joined #ruby
[11:41:40] casadei: has joined #ruby
[11:42:22] Scroff: has joined #ruby
[11:42:40] user121212: has joined #ruby
[11:42:42] fabrice31: has joined #ruby
[11:42:51] mike___1234: has joined #ruby
[11:42:57] Polysics: has joined #ruby
[11:43:05] TinkerTyper: has joined #ruby
[11:43:11] SolarSailor: has joined #ruby
[11:43:29] senayar: has joined #ruby
[11:44:00] OrbitalKitten: has joined #ruby
[11:44:12] downwithbender: has joined #ruby
[11:44:44] Polysics_: has joined #ruby
[11:45:09] Oxelist: has joined #ruby
[11:45:35] symbol: has joined #ruby
[11:46:33] Polysics: has joined #ruby
[11:47:08] ldnunes_: has joined #ruby
[11:48:23] Polysics: has joined #ruby
[11:48:26] sung_: has joined #ruby
[11:48:59] OrbitalKitten: has joined #ruby
[11:49:40] rushed: has joined #ruby
[11:50:12] Polysics_: has joined #ruby
[11:50:32] user121212: I'm trying to scrap something using nokogiri, I want to find the value inside javascript array, like the value of 'b' in this code https://eval.in/private/d4d128835699e0, I got the script bllock by using doc.search("script")[24], How can I get the value of 'b' here?
[11:51:17] qwertme: has joined #ruby
[11:51:17] chinmay_dd: has joined #ruby
[11:51:24] tokik_: has joined #ruby
[11:51:37] tvw: has joined #ruby
[11:51:58] Polysics: has joined #ruby
[11:52:04] antgel: has joined #ruby
[11:52:08] ferfoster: has joined #ruby
[11:53:00] thebastl: has joined #ruby
[11:53:11] canton7: user121212, you write something that can parse javascript ;)
[11:53:13] djellemah: has joined #ruby
[11:53:25] yaw: has joined #ruby
[11:53:45] Polysics_: has joined #ruby
[11:54:23] Darkwater: fork a javascript interpreter
[11:54:25] gisli: centrx: cheers, will check that out :)
[11:54:26] Darkwater: and edit it
[11:54:30] Darkwater: is gud idea I swer
[11:55:28] yaw: has joined #ruby
[11:55:35] Polysics: has joined #ruby
[11:55:58] user121212: cantor7: nokogiri object is xml, right?
[11:57:03] canton7: nokogiri is an xml/html parser
[11:57:30] Polysics: has joined #ruby
[11:57:53] ndrei: has joined #ruby
[11:58:12] sandelius: has joined #ruby
[11:58:15] chinmay_dd: has joined #ruby
[11:58:37] serivich: has joined #ruby
[11:59:09] Polysics: has joined #ruby
[11:59:47] AugustoCesar: has joined #ruby
[12:01:54] ljarvis: maloik: I'm not :(
[12:02:40] davidhq: has joined #ruby
[12:03:09] AugustoCesar: has left #ruby: ()
[12:03:52] krz: has joined #ruby
[12:03:57] sharpmachine: has joined #ruby
[12:05:12] SOLDIERz: has joined #ruby
[12:06:03] cajone: has left #ruby: ()
[12:09:18] CustosLimen: has joined #ruby
[12:09:35] kraljev11: has joined #ruby
[12:10:48] allomov: has joined #ruby
[12:10:56] goodcodeguy: has joined #ruby
[12:11:31] terlar: has joined #ruby
[12:11:43] dzejrou: has joined #ruby
[12:12:35] skyrocker: has joined #ruby
[12:12:40] skyrocker: has left #ruby: ()
[12:14:01] chipotle: has joined #ruby
[12:14:40] balazs: has joined #ruby
[12:14:56] banister: has joined #ruby
[12:16:03] but3k4: has joined #ruby
[12:16:40] chipotle: has joined #ruby
[12:17:54] krisquigley: has joined #ruby
[12:18:11] rikkipitt: has joined #ruby
[12:18:40] davedev24_: has joined #ruby
[12:21:01] davidhq: has joined #ruby
[12:21:29] n008f4g_: has joined #ruby
[12:22:08] dstarh: has joined #ruby
[12:22:14] Oxelist_: has joined #ruby
[12:22:28] senayar: has joined #ruby
[12:22:41] k3asd`: has joined #ruby
[12:23:16] msnyon: has joined #ruby
[12:24:16] RegulationD: has joined #ruby
[12:25:20] Apomelasma: has joined #ruby
[12:26:15] Oxelist: has joined #ruby
[12:26:27] DynamicMetaFlow: has joined #ruby
[12:27:05] endorphine_: has joined #ruby
[12:27:57] rikkipitt: has joined #ruby
[12:29:10] jwaldrip_: has joined #ruby
[12:29:41] camonz: has joined #ruby
[12:29:41] iamninja: has joined #ruby
[12:30:02] michael_mbp: has joined #ruby
[12:30:18] JoshL: has joined #ruby
[12:30:27] bkxd: has joined #ruby
[12:30:38] bahamas: has joined #ruby
[12:30:38] spyderman4g63: has joined #ruby
[12:31:01] maasha: Can you include instance methods to a class from outside the class? https://gist.github.com/maasha/57826c5e54b6b8852c1b
[12:31:12] OrbitalKitten: has joined #ruby
[12:31:18] ljarvis: include Foo into MyClass
[12:31:35] Scroff: has joined #ruby
[12:31:45] ljarvis: MyClass.send(:include, Foo)
[12:31:46] maasha: _from outside_ ?
[12:32:04] ljarvis: why from outside though? you can re-open classes
[12:32:35] maasha: ljarvis: this works. thanks
[12:32:55] djellemah: has joined #ruby
[12:33:52] jhooker: has joined #ruby
[12:34:40] bahamas: why doesn't this loop end when I enter '1' or '2'?
[12:34:46] bahamas: https://bpaste.net/show/a324ebd8b2d1
[12:35:33] chipotle: has joined #ruby
[12:35:50] bruno-: has joined #ruby
[12:36:11] OrbitalKitten: has joined #ruby
[12:36:33] ljarvis: because you're using or when you want and
[12:36:42] ljarvis: cave != '1' && cave != '2'
[12:37:24] ljarvis: otherwise it's "whilst cave is not 1 or cave is not 2" which means when it's 1, it isn't 2, so it's cancelled out
[12:37:26] bahamas: damn my logic
[12:37:52] djellemah: bahamas: http://en.wikipedia.org/wiki/De_Morgan%27s_laws if you want the theory
[12:37:55] Scroff: has joined #ruby
[12:38:00] ljarvis: until %w(1 2).include?(cave) ...
[12:38:07] tsvenson: has joined #ruby
[12:38:42] bahamas: ljarvis: that's what I finally used, except with the array syntax
[12:38:45] Dingus: has joined #ruby
[12:38:51] bahamas: but I was confused why the initial version wasn't working
[12:39:00] premera: has joined #ruby
[12:39:27] decoponio: has joined #ruby
[12:39:27] bahamas: ah, there's 'until'
[12:39:34] bahamas: too many options :)
[12:39:58] ljarvis: yeah I rarely use it, but I don't always like "while not"
[12:40:13] ljarvis: really just use whatever your brain figures out the quickest
[12:40:33] fgo: has joined #ruby
[12:41:07] user121212: has joined #ruby
[12:41:14] mahmoudmahfouz: has joined #ruby
[12:41:20] bahamas: yeah, I tend to prefer checking for an element in an array. all the logic checks are confusing
[12:41:25] bahamas: thanks, guys!
[12:42:00] sgambino: has joined #ruby
[12:42:13] juanpaucar: has joined #ruby
[12:42:31] Ropeney: has joined #ruby
[12:42:50] Peteykun: has joined #ruby
[12:43:19] bruno-_: has joined #ruby
[12:44:29] lessless: has joined #ruby
[12:45:08] bmurt: has joined #ruby
[12:46:25] jcaho: has joined #ruby
[12:48:20] lolmaus: has joined #ruby
[12:48:34] Lord_xeo: has joined #ruby
[12:48:58] segfalt: has joined #ruby
[12:49:54] gisli: has left #ruby: ("WeeChat 1.0.1")
[12:50:21] ndrei: has joined #ruby
[12:51:36] hoov: has joined #ruby
[12:52:44] starfox_sf: has joined #ruby
[12:52:54] michaeldeol: has joined #ruby
[12:53:46] atomical: has joined #ruby
[12:54:09] caseypatrickdris: has joined #ruby
[12:54:15] vbatts|w1: has joined #ruby
[12:54:19] pyon: has joined #ruby
[12:55:05] timonv: has joined #ruby
[12:55:35] lxsameer: has joined #ruby
[12:56:54] stoogenmeyer__: has joined #ruby
[12:57:32] Xeago: has joined #ruby
[12:57:58] krz: has joined #ruby
[12:59:09] enebo: has joined #ruby
[12:59:16] Polysics: has joined #ruby
[12:59:37] arup_r: has joined #ruby
[13:00:47] surs: has joined #ruby
[13:01:03] ringarin: has joined #ruby
[13:01:39] dblessing: has joined #ruby
[13:02:21] thelastinuit: has joined #ruby
[13:04:32] ndrei: has joined #ruby
[13:04:49] sharpmachine: has joined #ruby
[13:10:07] anisha: has joined #ruby
[13:11:26] pikos: has joined #ruby
[13:13:25] Scroff: has joined #ruby
[13:14:26] ndrei: has joined #ruby
[13:14:52] allcentury: has joined #ruby
[13:14:59] JDiPierro: has joined #ruby
[13:15:21] langlands: has joined #ruby
[13:15:43] dseitz: has joined #ruby
[13:18:34] hinbody: has joined #ruby
[13:18:42] symbol: has joined #ruby
[13:18:44] symbol: has joined #ruby
[13:19:39] nertzy: has joined #ruby
[13:20:30] ESpiney: has joined #ruby
[13:20:35] st0mar: has joined #ruby
[13:21:18] mary5030: has joined #ruby
[13:22:09] withnale_: has joined #ruby
[13:23:23] Oxelist: has joined #ruby
[13:23:44] jwaldrip_: has joined #ruby
[13:24:22] Oxelist: has joined #ruby
[13:24:32] benlovell: has joined #ruby
[13:25:32] Xeago: has joined #ruby
[13:25:54] RegulationD: has joined #ruby
[13:26:26] davidhq: has joined #ruby
[13:26:54] depesz: has joined #ruby
[13:26:55] melter: has joined #ruby
[13:27:31] depesz: how can I get full hostname, with domain, of current host? something like "hostname -f", but without requiring executing external programs
[13:27:53] gambl0re: has joined #ruby
[13:28:38] JoshL: depesz: http://ruby-doc.org/stdlib-2.0.0/libdoc/socket/rdoc/Socket.html#method-c-gethostname
[13:28:53] ruv_: has joined #ruby
[13:28:57] JoshL: depesz: and the following methods
[13:29:12] maxshelley: has joined #ruby
[13:29:23] ruv: has joined #ruby
[13:29:28] depesz: gethostname returns just first part of fqdn :(. docs mention NI_* options, but I don't see any list of these options
[13:31:51] ziprar: has joined #ruby
[13:31:51] ziprar: has joined #ruby
[13:31:56] griffindy: has joined #ruby
[13:33:46] senayar: has joined #ruby
[13:33:46] senayar: has joined #ruby
[13:34:55] ndrei: has joined #ruby
[13:34:56] ledestin: has joined #ruby
[13:35:34] JoshL: depesz: Maybe something like looping through Socket.ip_address_list and passing it to Socket.gethostbyaddr?
[13:35:58] fabrice31_: has joined #ruby
[13:36:05] arup_r: has joined #ruby
[13:36:20] lavros: has joined #ruby
[13:37:11] sinkensabe: has joined #ruby
[13:38:33] malconis: has joined #ruby
[13:42:42] ferr: has joined #ruby
[13:42:56] duggiefresh: has joined #ruby
[13:43:01] ruv: has joined #ruby
[13:43:55] ndrei: has joined #ruby
[13:43:58] qwertme: has joined #ruby
[13:44:49] krz: has joined #ruby
[13:45:05] obscured: has joined #ruby
[13:45:57] TheHodge: has joined #ruby
[13:46:23] xxneolithicxx: has joined #ruby
[13:46:50] dhjondoh: has joined #ruby
[13:48:51] depesz: found this, looks like working, Socket.gethostbyname(Socket.gethostname).first
[13:49:31] failshell: has joined #ruby
[13:50:45] k3asd`: has joined #ruby
[13:51:22] alphaatom: has joined #ruby
[13:52:01] mrmargolis: has joined #ruby
[13:52:46] alphaatom: has joined #ruby
[13:53:12] dopie: has joined #ruby
[13:53:26] failshell: i want to merge 2 files. both share a common part, and have differences as well. how would you go about doing that? both are text files.
[13:53:49] centrx: has joined #ruby
[13:53:52] edwinvdgraaf: has joined #ruby
[13:54:05] failshell: what i did was read the files and slice them, add those parts to arrays, merged the arrays and .uniq them. that works. but im curious to see if there's a better way to do it
[13:54:15] lessless: is it possible to get value of local variable named `foo_rate` with the 'foo' string in the hands?
[13:54:40] alphaatom: has joined #ruby
[13:54:53] lessless: like ['foo', 'bar', 'baz']. each { |n| local_variable_get "#{n}_rate" }
[13:55:13] CloCkWeRX: has joined #ruby
[13:55:33] kobain: has joined #ruby
[13:55:44] ljarvis: lessless: eval
[13:56:13] ljarvis: just beware of bindings
[13:56:41] lessless: what do you mean?
[13:56:44] lessless: what bindings?
[13:56:57] khebbie: has joined #ruby
[13:57:21] edwinvdg_: has joined #ruby
[13:57:32] ljarvis: lessless: basically it depends on the scope of the assignment, but eval is what you want
[13:57:43] micmus: has joined #ruby
[13:57:47] ljarvis: >> foo_rate = "omg"; eval("foo_rate") if local_variables.include?(:foo_rate) # to ensure some sanity
[13:57:48] ruboto: ljarvis # => "omg" (https://eval.in/379794)
[13:57:58] st0mar: has joined #ruby
[13:58:11] lessless: eval looks scare
[13:58:17] lessless: thank you for the tip!
[13:58:26] ljarvis: eval is scare myself. eval is scare
[13:58:28] sepp2k: has joined #ruby
[13:58:49] ljarvis: but yeah, doing local_variables.include? will ensure it exists as a local variable, so you can ensure some kind of sanity
[13:58:53] paulcsmith: has joined #ruby
[13:58:55] caseypatrickdris: has joined #ruby
[13:58:55] ljarvis: scare my friend*
[13:58:59] ljarvis: i dont scare myself
[13:59:03] ljarvis: time to stop typing
[13:59:12] jwaldrip_: has joined #ruby
[13:59:20] soc42: has joined #ruby
[13:59:54] havenwood: has joined #ruby
[14:00:09] ferr: Hey guys, I would like to use ruby as a backend of web application, which would only serve API, any suggestions what to use in this case?
[14:00:13] rippa: has joined #ruby
[14:01:00] Vile`: has joined #ruby
[14:01:05] Scroff: has joined #ruby
[14:01:35] ljarvis: I've had much success with grape (which is based on Sinatra iirc)
[14:03:15] justintv90: has joined #ruby
[14:03:30] depesz: has left #ruby: ("WeeChat 1.2-dev")
[14:04:04] tannerj: has joined #ruby
[14:04:09] NeverDie: has joined #ruby
[14:04:11] justintv90: has joined #ruby
[14:04:13] jespada: has joined #ruby
[14:04:26] rickmasta: has joined #ruby
[14:05:07] justintv90: has joined #ruby
[14:05:42] sharpmachine: has joined #ruby
[14:05:48] tannerj: has left #ruby: ()
[14:05:52] justintv90: has joined #ruby
[14:06:42] justintv90: has joined #ruby
[14:08:15] Soda: has joined #ruby
[14:09:00] jwaldrip_: has joined #ruby
[14:09:09] cmisenas: has joined #ruby
[14:11:58] gamename: has joined #ruby
[14:12:44] psye: has joined #ruby
[14:13:29] ruby-lang025: has joined #ruby
[14:13:45] ruby-lang025: has left #ruby: ()
[14:13:57] ttilley: has joined #ruby
[14:14:37] ttilley: has joined #ruby
[14:15:33] centrx: has joined #ruby
[14:15:48] gamename: has joined #ruby
[14:16:00] balazs: has joined #ruby
[14:16:09] fgo: has joined #ruby
[14:16:52] bronson_: has joined #ruby
[14:18:35] adaedra: ACTION would do a bad pun, but already did yesterday
[14:18:58] Scroff: has joined #ruby
[14:19:12] jwaldrip_: has joined #ruby
[14:19:26] someword: has joined #ruby
[14:19:38] davidhq: has joined #ruby
[14:20:03] pdoherty: has joined #ruby
[14:20:31] bdnelson: has joined #ruby
[14:20:38] fabrice31: has joined #ruby
[14:21:11] dfockler: has joined #ruby
[14:21:17] Scrofff: has joined #ruby
[14:21:52] dudedudeman: i hate being away when people holler my name
[14:21:57] dudedudeman: ACTION hollers at himself
[14:22:22] RegulationD: has joined #ruby
[14:22:28] commondream: has joined #ruby
[14:22:31] adaedra: dudedudeman!
[14:22:43] failshell: dudedudeman: dude!
[14:22:57] GarethAdams: has joined #ruby
[14:23:01] gamename: has joined #ruby
[14:23:17] symm-: has joined #ruby
[14:24:26] troulouliou_dev: has joined #ruby
[14:24:38] failshell: is there a way to merge arrays and keep as much as possible the old index positions of each element in the newly merged array?
[14:24:53] [H]unt3r: has joined #ruby
[14:25:09] justintv90: has joined #ruby
[14:25:16] shevy: array.contat ?
[14:25:18] jwilson: has joined #ruby
[14:25:46] shevy: a = [1,2,3] # => [1, 2, 3]; b = [4,5,6] # => [4, 5, 6]; a.concat b # => [1, 2, 3, 4, 5, 6]
[14:25:58] justintv90: has joined #ruby
[14:26:20] platzhirsch: has left #ruby: ()
[14:26:47] justintv90: has joined #ruby
[14:26:52] ndrei: has joined #ruby
[14:27:32] failshell: shevy: https://gist.github.com/failshell/fcda156a72c587255838 i would like to end up with ['foo', 'foobar', 'bar']
[14:27:38] justintv90: has joined #ruby
[14:28:03] shevy: and what logic does this follow
[14:28:19] justintv90: has joined #ruby
[14:28:25] failshell: i dont think there's one :)
[14:28:44] shevy: well, the moment you have the logic is the moment you have the ruby code
[14:29:02] shevy: what you show here is actually the second array
[14:29:09] justintv90: has joined #ruby
[14:29:09] shevy: so you could just use that without any merging right? :>
[14:29:36] livathinos: has joined #ruby
[14:29:49] failshell: shevy: that's the lack of coffee ;p i updated the gist
[14:30:00] justintv90: has joined #ruby
[14:30:05] failshell: id like to end up with ['foo', 'foobar', 'bar', 'potato']
[14:30:09] dudedudeman: adaedra: adaedra!
[14:30:16] dudedudeman: failshell: failshell!
[14:30:21] dudedudeman: shevy: shevy!
[14:30:22] adaedra: that double hl
[14:30:30] j4cknewt: has joined #ruby
[14:30:34] failshell: shevy: actually, that doesn't even make sense.
[14:30:34] shevy: so you sort of want to check on the prior and succeeding element
[14:30:46] justintv90: has joined #ruby
[14:30:53] failshell: shevy: id like to keep the old index positions as much as possible in the new array
[14:30:57] shevy: well, it looks like a .cycle() call
[14:31:00] juanpaucar: has joined #ruby
[14:31:01] vishalk: has joined #ruby
[14:31:09] shevy: I don't really understand you
[14:31:16] shevy: isn't what you are describing essentially a Hash then?
[14:31:17] pdoherty_: has joined #ruby
[14:31:19] tenderlove: has joined #ruby
[14:31:31] intinig: has joined #ruby
[14:31:38] justintv90: has joined #ruby
[14:31:52] shevy: why don't you merge on an element by element basis
[14:32:10] failshell: shevy: what i want to achieve is this. i have 2 configuration files (text) that share a common base, but have differences as well. im trying to merge those 2 files into one. that keeps the common parts. and the differences as well
[14:32:11] shevy: that way your old array is retained as it is, and you only have to add new elements to it
[14:32:14] Xeago: has joined #ruby
[14:32:28] failshell: so what i did was open the files, slice through them, added those slices into an array and merged the arrays
[14:32:31] justintv90: has joined #ruby
[14:32:43] mcclurmc: has joined #ruby
[14:32:46] failshell: it works, but it messes up the order of where things where initially
[14:32:58] failshell: not a deal breaker. but not great either
[14:33:08] The_Phoenix: has joined #ruby
[14:33:21] justintv90: has joined #ruby
[14:33:50] segfalt_: has joined #ruby
[14:33:57] failshell: shevy: https://gist.github.com/failshell/92593fd622c94d595fd0 the actual code
[14:34:10] justintv90: has joined #ruby
[14:34:13] rob_: has left #ruby: ()
[14:34:18] SebastianThorn: what line first?: "#! /usr/bin/env ruby" or "# -*- coding: utf-8 -*-"
[14:34:25] The_Phoenix: has joined #ruby
[14:34:28] apeiros: SebastianThorn: #!
[14:34:31] danzilio: has joined #ruby
[14:34:41] Spami: has joined #ruby
[14:34:42] Agoldfish: has joined #ruby
[14:35:05] SebastianThorn: apeiros: ty, been doing different in different file i just realized
[14:35:15] justintv90: has joined #ruby
[14:35:21] edwinvdgraaf: has joined #ruby
[14:35:30] The_Phoenix: has joined #ruby
[14:35:43] Parker0: has joined #ruby
[14:35:55] mrmargolis: has joined #ruby
[14:36:09] justintv90: has joined #ruby
[14:36:15] edwinvdg_: has joined #ruby
[14:36:47] justintv90: has joined #ruby
[14:37:00] ESpiney_: has joined #ruby
[14:37:09] wnd: failshell, (Set.new(f1) + Set.new(f2)).to_a ? (or the other way if that's what you wanted)
[14:37:44] justintv90: has joined #ruby
[14:38:42] zekriad: has joined #ruby
[14:38:56] wnd: >> require 'set'; f1 = %w{foo bar potato}; f2 = %w{foo foobar bar}; puts (Set.new(f1) + Set.new(f2)).to_a.inspect + " / " + (Set.new(f2) + Set.new(f1)).to_a.inspect
[14:38:57] ruboto: wnd # => ["foo", "bar", "potato", "foobar"] / ["foo", "foobar", "bar", "potato"] ...check link for more (https://eval.in/379846)
[14:39:12] dhjondoh: has joined #ruby
[14:39:53] endorphine_: has joined #ruby
[14:39:56] Scroff: has joined #ruby
[14:40:08] anisha: has joined #ruby
[14:40:10] khebbie: has joined #ruby
[14:41:06] dopie: has joined #ruby
[14:41:07] failshell: wnd: interesting, will play with Set
[14:41:28] starfox_sf: has joined #ruby
[14:42:12] apeiros: failshell, wnd: if f1 & f2 are array, you can just use `f1 | f2` instead
[14:42:16] mrmargol_: has joined #ruby
[14:42:58] apeiros: >> f1 = %w[foo bar potato]; f2 = %w[foo foobar bar]; p [f1 | f2, f2 | f1]
[14:43:00] ruboto: apeiros # => [["foo", "bar", "potato", "foobar"], ["foo", "foobar", "bar", "potato"]] ...check link for more (https://eval.in/379851)
[14:44:48] commondream: has joined #ruby
[14:45:10] balazs: has joined #ruby
[14:45:44] justintv90: has joined #ruby
[14:45:56] jpfuentes2: has joined #ruby
[14:46:05] balazs: has joined #ruby
[14:46:12] yardenbar: has joined #ruby
[14:46:59] justintv90: has joined #ruby
[14:47:19] avril14th: has joined #ruby
[14:47:49] mkewasz: has joined #ruby
[14:48:09] sharpmachine: has joined #ruby
[14:48:52] justintv90: has joined #ruby
[14:48:52] avril14th: Hello, what's the difference between, given a class A and a module B, A.include B and class A; extend B; end; ?
[14:49:02] dzejrou: has joined #ruby
[14:49:17] atomx: has joined #ruby
[14:49:19] apeiros: avril14th: include adds the module's methods as instance methods. extend as class methods.
[14:49:33] railsraider: has joined #ruby
[14:49:37] justintv90: has joined #ruby
[14:49:48] francoi__: has joined #ruby
[14:50:32] justintv90: has joined #ruby
[14:50:43] wnd: apeiros, obvious solution is obvious. thanks. it's not like I haven't done that before...
[14:51:22] atomx: is installing ruboto on windows is painfull like rails?
[14:51:42] chouhoulis: has joined #ruby
[14:51:49] riton: has joined #ruby
[14:52:09] avril14th: apeiros: sorry I meant the difference between A.class.include B and class A; extend B; end;
[14:52:15] avril14th: ACTION is getting tired
[14:52:25] avril14th: so including in the class versus extending the class
[14:52:34] apeiros: avril14th: you realize that A.class.include is Class.include?
[14:52:37] Macaveli: has joined #ruby
[14:52:45] apeiros: avril14th: i.e., your correction makes no sense
[14:52:53] dgutierrez1287: has joined #ruby
[14:53:02] atomx: is installing ruboto on windows is painfull like rails?
[14:53:06] apeiros: avril14th: and it doesn't match your description either. your first question matches your description
[14:53:15] apeiros: avril14th: and to that I gave you the answer
[14:53:28] apeiros: so including in the class -> add instance methods
[14:53:31] baweaver: has joined #ruby
[14:53:37] apeiros: extending the class -> add class methods
[14:53:56] blandflakes_: has joined #ruby
[14:53:58] ogpastaling: has joined #ruby
[14:54:22] riton: hi guys, I'm wondering what's the easies way to build a RPM package to distribute my ruby libraries ? I've seen that https://github.com/fedora-ruby/gem2rpm exists, as anyone aleady used it ? Is this the recommended way (create a GEM and then create a SPEC file from it) ? Thanks
[14:54:43] avril14th: apeiros: thanks
[14:54:56] apeiros: avril14th: note that the *source* is always the instance methods of the module.
[14:54:57] nonparfumee: has joined #ruby
[14:55:02] shevy: riton most likely I think you are the first person here on #ruby who wanted to do so :)
[14:55:12] avril14th: apeiros: yes, the code stays there :)
[14:55:23] shevy: most of the time when you have a .gem file, you already won't need any other distribution's specific manager
[14:55:30] ogpastaling: has joined #ruby
[14:56:27] riton: shevy: to create a RPM package ? :-D
[14:57:18] shevy: you have "gem"
[14:57:48] shevy: you could put it into a .rpm as an additional repository
[14:57:50] riton: because it requires "an other" way to distribute software , new repositories and so
[14:58:08] larissa: has joined #ruby
[14:58:34] riton: shevy: can you explain what you means by "you could put it into a .rpm as an additional repository" ?
[14:58:51] shevy: well that is the only use case I see for that
[14:59:04] shevy: you want to create a .rpm only from one specific .gem file right
[14:59:05] intinig: has joined #ruby
[14:59:29] shevy: so you have to satisfy whatever the standard for rpm demands for a ruby-addon package; I am sure it's essentially the same as the perl or python addons
[15:00:02] shevy: the guy at https://github.com/fedora-ruby/gem2rpm seems to have done so already
[15:00:37] riton: yes. I just wanted to know if this was "the recommanded way" or just "a lonely guy project" ;-)
[15:01:14] but3k4_: has joined #ruby
[15:01:19] juanpaucar: has joined #ruby
[15:01:19] shevy: I think you are the first rpm-ruby guy here on #ruby
[15:01:24] paulcsmith: has joined #ruby
[15:01:37] riton: ok, thanks shevy
[15:01:38] shevy: let's ask the channel riton
[15:01:43] shevy: Anyone here use fedora!
[15:01:55] rickmasta: has joined #ruby
[15:01:59] shevy: ACTION drops a needle ... .. .
[15:02:11] shevy: riton nope sorry I guess there is none :(
[15:02:15] msgodf: has joined #ruby
[15:02:24] shevy: probably lots of osx people here
[15:02:26] endash: has joined #ruby
[15:03:04] riton: well, I'll give you a feedback after I've put it in production ;-)
[15:03:30] vyorkin: has joined #ruby
[15:03:36] pepperbreath: has joined #ruby
[15:04:11] joaomdmoura: has joined #ruby
[15:04:32] gustavn: has joined #ruby
[15:04:33] s2013: has joined #ruby
[15:04:34] lkba: has joined #ruby
[15:04:38] railsraider: has joined #ruby
[15:05:01] atomx: is installing ruboto on windows is painfull like rails?
[15:05:06] mwlang: has joined #ruby
[15:05:17] war_pigs: has joined #ruby
[15:05:45] sarkyniin: has joined #ruby
[15:05:46] mwlang: I really should read other people???s code more often. This is a nicely written set of test specs: https://github.com/rack/rack/blob/master/test/spec_request.rb
[15:05:52] gustavn: has left #ruby: ()
[15:07:24] foucist: has joined #ruby
[15:07:33] tjbiddle: has joined #ruby
[15:07:42] mwlang: contains some nice use of lambdas (which I???m still getting comfortable with) as well as doing a great job of keeping the ???data??? close to the tests so you get the full picture of what???s being tested and how.
[15:07:57] foucist: zomg.. the great channel merge of 2015
[15:08:45] madarcode: has joined #ruby
[15:09:02] madarcode: i have a general question, how do frontend developers and backend developers make an API? Do they have a meeting and decide what function names to give to an API before they start coding?
[15:10:05] sung_: what's a good book for ruby oo design pattern
[15:10:12] SebastianThorn: madarcode: i dont think there is a "defacto" way to that
[15:10:33] ndrei: has joined #ruby
[15:10:38] madarcode: okay but what's a good way to do it?
[15:10:51] mwlang: madarcode: create the user stories, write the test specs to look like you want the API to look. Let the backenders begin building, then frontenders start building as the API???s are implemented.
[15:11:08] slawrence: has joined #ruby
[15:11:19] intinig: has joined #ruby
[15:11:39] mwlang: the test specs can be written together by both backenders and frontenders
[15:12:28] madarcode: test specs means tests like unit testing right?
[15:12:38] mwlang: you???ll find that you???ll quickly go through a bunch of naming schemes before settling on the final and all without having to write the actual implementation. the user stories crystalize what???s needed and what???s YAGNI
[15:12:50] mwlang: madarcode: yes
[15:13:09] madarcode: okay do you know a tutorial where I can look this up?
[15:13:25] tomphp: has joined #ruby
[15:14:17] mwlang: madarcode: unfortunately, no. just experience from doing apis previously. If you have a team of developers, get ???em in a room together and iron out the strategy
[15:14:23] tomphp: has joined #ruby
[15:14:23] freerobby: has joined #ruby
[15:14:53] madarcode: okay I see.... Thank you. The thing is we're students so it's tough to get experience hah.
[15:15:16] intinig: has joined #ruby
[15:15:37] mwlang: madarcode: but you???re still smart people. (hopefully!) ??? the user stories, if written well will guide the design.
[15:16:18] mwlang: madarcode: Google each of the above???for example: https://www.google.com/search?q=how+to+write+good+user+stories&ie=utf-8&oe=utf-8
[15:16:38] bantic: has joined #ruby
[15:16:45] madarcode: damn that's golden
[15:16:48] mwlang: madarcode: or even https://www.google.com/search?q=how+to+write+good+user+stories&ie=utf-8&oe=utf-8#q=how+to+write+good+user+stories+for+api
[15:17:01] mwlang: I see some good potentials on that 2nd one.
[15:18:08] millerti: has joined #ruby
[15:18:16] Koveno: has joined #ruby
[15:18:21] RegulationD: has joined #ruby
[15:19:29] ddarkpassenger: has joined #ruby
[15:19:38] aryaching: has joined #ruby
[15:20:07] apofis: has joined #ruby
[15:20:22] _seanc_: has joined #ruby
[15:21:32] senayar: has joined #ruby
[15:22:24] intinig: has joined #ruby
[15:23:01] _ixti_: has joined #ruby
[15:23:42] ebbflowgo: has joined #ruby
[15:24:28] luckyno7: has joined #ruby
[15:24:59] RegulationD: has joined #ruby
[15:25:31] Xeago: has joined #ruby
[15:25:49] tomphp: has joined #ruby
[15:27:09] rcvalle: has joined #ruby
[15:27:54] dseitz: has joined #ruby
[15:28:47] s2013: has joined #ruby
[15:28:48] mwlang: So I have a Rack middleware app that does some processing on the incoming request and sets some hash values on the env???how do I access the rack app???s env from a test spec?
[15:29:34] Scroff: has joined #ruby
[15:30:32] finisherr: has joined #ruby
[15:30:50] atomical: has joined #ruby
[15:31:22] whoami: has joined #ruby
[15:32:02] dfinninger: has joined #ruby
[15:32:33] whoami_: has joined #ruby
[15:33:16] djbkd: has joined #ruby
[15:33:18] ych_: has joined #ruby
[15:33:50] redlegion: has joined #ruby
[15:37:13] hubcaps_: has joined #ruby
[15:37:29] Guest31215: has joined #ruby
[15:37:35] wald0: has joined #ruby
[15:37:35] fedexo: has joined #ruby
[15:37:43] Guest31215: anyone here form New York?
[15:38:08] yoongkang: has joined #ruby
[15:38:13] kitallis: has anyone tried using prawn and fitting images of various sizes into an appropriate page format (a4/a5), scale the images to best fit the page, if they are too small, ignore etc.?
[15:39:07] umgrosscol: has joined #ruby
[15:39:17] Guest31215: i would like someone else help possibly over google chat
[15:40:37] mrmargolis: has joined #ruby
[15:42:48] axl__: has left #ruby: ("Leaving")
[15:42:58] mrmargolis: has joined #ruby
[15:44:11] caseypatrickdris: has joined #ruby
[15:44:46] ferfoster2: has joined #ruby
[15:45:55] slackbotgz: has joined #ruby
[15:48:18] dmr8: has joined #ruby
[15:48:53] edwinvdgraaf: has joined #ruby
[15:48:56] intinig: has joined #ruby
[15:49:13] ylla: has joined #ruby
[15:49:16] yardenbar: has joined #ruby
[15:49:37] d10n-work: has joined #ruby
[15:51:49] ixti: has joined #ruby
[15:51:55] Scroff: has joined #ruby
[15:52:06] edwinvdg_: has joined #ruby
[15:53:09] mleung: has joined #ruby
[15:55:00] commondream: has joined #ruby
[15:55:05] allomov: has joined #ruby
[15:56:05] aphprentice_: has joined #ruby
[15:56:27] cmisenas: has joined #ruby
[15:57:07] Rubie: has joined #ruby
[15:57:53] sharpmachine: has joined #ruby
[15:58:27] Scroff: has joined #ruby
[15:58:34] towski_: has joined #ruby
[15:58:46] Senjai: Guest31215: lol, no.
[15:59:02] Senjai: Guest31215: We prefer to have people ask questions in chat, so others can benefit from the answers
[15:59:15] dudedudeman: help one person, help all persons
[15:59:16] Senjai: Guest31215: If you need private mentoring, go hire someone off of codementor or something.
[16:00:07] Senjai: kitallis: We had that issue with label printing. We had two adapters that would print two different labels depending on the request.
[16:00:14] s2013: has joined #ruby
[16:00:48] dudedudeman: codementor is great... but some of these rates are insane lol
[16:01:12] Senjai: They're actually extremely low for the industry :P
[16:01:23] dudedudeman: $280 an hour!!?
[16:01:29] Senjai: For some people, totally reasonable
[16:01:49] foucist: filter out everyone in SF
[16:02:09] dudedudeman: i'd love to make $280 an hour
[16:02:23] s2013: has joined #ruby
[16:02:27] Senjai: dudedudeman: Get to working. I know a consultant that bills for $600 an hour :)
[16:02:47] dudedudeman: one $600, please
[16:04:42] dudedudeman: i currently don't make that in a week at my m-f job.
[16:04:53] cmisenas: has joined #ruby
[16:05:08] ogpastaling: has joined #ruby
[16:05:34] mleung: has joined #ruby
[16:06:32] _seanc_: has joined #ruby
[16:07:08] mrmargol_: has joined #ruby
[16:07:26] francoi__: has joined #ruby
[16:07:37] moted: has joined #ruby
[16:07:44] but3k4: has joined #ruby
[16:07:49] seph429: has joined #ruby
[16:08:13] _seanc_1: has joined #ruby
[16:10:43] starfox_sf: has joined #ruby
[16:10:51] Maletor: has joined #ruby
[16:11:09] havenwood: Guest31215: Are you looking for free or paid help? You can get help here for free! For paid help, +1 codementor.io based on folks on there though I haven't used it. That'd be fun.
[16:11:27] Oka: has joined #ruby
[16:12:08] davedev24_: has joined #ruby
[16:12:49] arup_r: has joined #ruby
[16:13:07] havenwood: I need to charge more for consulting so I can hire consultants for fun.
[16:13:18] spider-mario: has joined #ruby
[16:13:29] dudedudeman: there are definitely some folks on their with reasonable rates if you need
[16:13:49] rgs: has joined #ruby
[16:14:19] bgmarx: has joined #ruby
[16:14:36] sharpmachine: has joined #ruby
[16:14:37] cndiv: has joined #ruby
[16:14:37] jespada: has joined #ruby
[16:14:43] dudedudeman: or reddit. there's a lot of people willing ot help on reddit as well
[16:16:35] g0bl1n: has joined #ruby
[16:17:35] zendrix: has joined #ruby
[16:18:19] banister: has joined #ruby
[16:18:47] platosha__: has joined #ruby
[16:19:25] sharpmachine: has joined #ruby
[16:20:45] s2013: has joined #ruby
[16:21:05] bantic: has joined #ruby
[16:21:13] jayeola: has joined #ruby
[16:21:16] mistermocha: has joined #ruby
[16:22:15] djdarkbeat: has joined #ruby
[16:22:59] riffraff: has joined #ruby
[16:23:30] tennis: has joined #ruby
[16:23:32] __butch__: has joined #ruby
[16:23:46] _seanc_: has joined #ruby
[16:24:06] riton: has left #ruby: ()
[16:24:08] davedev24_: has joined #ruby
[16:24:26] Scrofff: has joined #ruby
[16:25:33] mrsolo: has joined #ruby
[16:25:52] benlovell: has joined #ruby
[16:26:25] danzilio: has joined #ruby
[16:26:41] datanoise: has joined #ruby
[16:27:36] ni291187: has joined #ruby
[16:28:10] danzilio: has joined #ruby
[16:28:14] AvoidTheGroid: my favorite place in America
[16:28:25] AvoidTheGroid: is the ruby come
[16:28:45] havenwood: AvoidTheGroid: San Antonio? Or wherever it happens to be? :)
[16:28:58] mrsolo: has joined #ruby
[16:29:03] endorphine_: has joined #ruby
[16:29:19] dudedudeman: so close to home. i'm excited about going this year
[16:29:40] havenwood: See you there.
[16:29:53] bricker: has joined #ruby
[16:29:54] whiskystig: has joined #ruby
[16:30:28] wildroman2: has joined #ruby
[16:31:24] dudedudeman: it'll be my first tech conf in this sector, so i'm excited about it
[16:31:59] Scroff: has joined #ruby
[16:32:54] paulcsmith: has joined #ruby
[16:32:55] pengin: has joined #ruby
[16:36:03] vyorkin: has joined #ruby
[16:36:09] skade: has joined #ruby
[16:36:20] blandflakes: has joined #ruby
[16:36:25] dumdedum: has joined #ruby
[16:38:51] jackjackdripper: has joined #ruby
[16:39:49] Polysics: has joined #ruby
[16:40:27] francoi__: has joined #ruby
[16:42:37] djbkd: has joined #ruby
[16:42:49] edwinvdgraaf: has joined #ruby
[16:43:46] dfockler: has joined #ruby
[16:44:14] jackjackdripper1: has joined #ruby
[16:44:19] mistermo_: has joined #ruby
[16:45:10] edwinvdg_: has joined #ruby
[16:45:25] qwertme: has joined #ruby
[16:45:27] timonv: has joined #ruby
[16:45:50] mistermocha: has joined #ruby
[16:46:31] wpp: has joined #ruby
[16:46:37] mrsolo: has joined #ruby
[16:47:00] rockymadden: has joined #ruby
[16:47:10] alphaatom: has joined #ruby
[16:47:18] deric_skibotn: has joined #ruby
[16:47:22] edwinvdg_: has joined #ruby
[16:49:24] n008f4g_: has joined #ruby
[16:49:24] bronson_: has joined #ruby
[16:49:47] jackjackdripper: has joined #ruby
[16:50:36] finisherr: has joined #ruby
[16:51:15] ogpastaling: has joined #ruby
[16:51:55] pietr0: has joined #ruby
[16:52:41] caseypat_: has joined #ruby
[16:52:46] araujo: has joined #ruby
[16:52:46] intinig: has joined #ruby
[16:52:58] Scroff: has joined #ruby
[16:54:03] rbowlby: has joined #ruby
[16:54:55] segfalt: has joined #ruby
[16:55:32] jmignault: has joined #ruby
[16:55:56] MatthewsFace: has joined #ruby
[16:57:22] Matthews_: has joined #ruby
[16:57:36] charliesome: has joined #ruby
[16:58:01] baweaver: has joined #ruby
[16:58:54] cyborg: has joined #ruby
[16:59:27] MatthewsFace: has joined #ruby
[16:59:30] zcreative: has joined #ruby
[17:00:17] baweaver: has joined #ruby
[17:00:27] havenwood: dudedudeman: It's a good one!
[17:01:26] SirCmpwn: has joined #ruby
[17:01:49] dumdedum: has joined #ruby
[17:01:50] nonparfumee: has joined #ruby
[17:03:52] wallerdev: has joined #ruby
[17:03:57] khebbie: has joined #ruby
[17:04:16] revath: has joined #ruby
[17:04:24] RobertBirnie: has joined #ruby
[17:04:35] Matthews_: has joined #ruby
[17:05:21] michaeldeol: has joined #ruby
[17:05:38] Senjai: I may also be going
[17:06:01] havenwood: Senjai: Nice
[17:06:22] Senjai: I haven't yet decided fully. It's a ways away
[17:06:38] postmodern: has joined #ruby
[17:06:51] drew0: has joined #ruby
[17:08:20] qwertme: has joined #ruby
[17:08:28] Scrofff: has joined #ruby
[17:08:40] drew0: has joined #ruby
[17:09:00] Filete: has joined #ruby
[17:09:29] drew0: has joined #ruby
[17:10:03] drew0: has joined #ruby
[17:10:12] Soda: has joined #ruby
[17:10:28] mandarinkin: has joined #ruby
[17:10:34] dudedudeman: i think that's helpful for me, as it's just a few hours from home
[17:10:36] MatthewsFace: has joined #ruby
[17:11:10] zendrix: has joined #ruby
[17:11:18] allomov: has joined #ruby
[17:11:37] keernel: has joined #ruby
[17:13:16] ur5us: has joined #ruby
[17:13:21] joelataylor_: has joined #ruby
[17:13:43] joaomdmoura: has joined #ruby
[17:14:18] mandarinkin: has joined #ruby
[17:14:44] bantic: has joined #ruby
[17:15:40] x1337807x: has joined #ruby
[17:15:58] evanjs: has joined #ruby
[17:16:40] drew0: has joined #ruby
[17:16:51] x1337807x: has joined #ruby
[17:17:39] x1337807x: has joined #ruby
[17:18:32] x1337807x: has joined #ruby
[17:18:46] keernel: #joaomdmoura
[17:19:04] keernel: your app looks pretty neat, good idea
[17:19:09] ogpastaling: has joined #ruby
[17:19:16] joaomdmoura: what app exactly? hahah
[17:19:22] mc_fail: has joined #ruby
[17:19:27] keernel: haha sorry, gioco
[17:19:40] keernel: for how long it is running?
[17:20:20] joaomdmoura: uhmm, it started as an opensrouce project 2 years ago probably, unfortunately it isn't compatible with rails 4 yet haha
[17:20:36] joaomdmoura: but the SaaS itself started some months ago
[17:21:31] joaomdmoura: You should give it a try :P Don't worry about the free trial, I can extend it in case you want to test it :X
[17:21:39] keernel: oh, cool, it was an open source. Yea, but you should def. continue with SaaS, =) keep it up
[17:22:01] keernel: i'll probably try it, i'm starting to work on a project, www.mybrainstorm.com
[17:22:15] keernel: and it has a bad gamefication system already implemented.
[17:22:44] keernel: it's a brazilian project
[17:22:55] joaomdmoura: Cool! are you Brazilian?
[17:23:20] keernel: yea, lol, you too?
[17:25:05] krisquigley: has joined #ruby
[17:25:26] shadoi: has joined #ruby
[17:26:30] Spami: has joined #ruby
[17:26:51] vyorkin: has joined #ruby
[17:26:52] pipework: joaomdmoura: What was your app?
[17:27:26] Aces1up: has joined #ruby
[17:27:34] keernel: this mybrainstorm project is a service to connect students with enterprises
[17:27:46] Aces1up: anyone here have experience doing bitcoin transaction with bitcoin-ruby gem?
[17:27:55] keernel: enterprises can post a challenge, and ask students to help them with it
[17:28:19] Aces1up: trying to understand, if I generate a bitcoin address, how can I load test funds to it with the bitcoin test net
[17:28:27] Spami: has joined #ruby
[17:29:14] tomphp: has joined #ruby
[17:29:44] joaomdmoura: pipework: it's a gamification SaaS we are also a Heroku addOn :) there is JS"SDK" and a rubygem to make the integration easier :P
[17:30:31] someword: has joined #ruby
[17:31:47] mdz_: has joined #ruby
[17:34:29] revath: has joined #ruby
[17:37:08] ki0_: has joined #ruby
[17:38:19] balazs: has joined #ruby
[17:38:27] symm-: has joined #ruby
[17:38:27] metalic: has joined #ruby
[17:38:35] _seanc_: has joined #ruby
[17:39:25] balazs: has joined #ruby
[17:39:37] ndrei_: has joined #ruby
[17:39:48] meph: has joined #ruby
[17:40:08] Channel6: has joined #ruby
[17:40:13] lkba_: has joined #ruby
[17:41:21] delsol_: has joined #ruby
[17:41:29] segfalt: has joined #ruby
[17:41:47] kraljev11: has joined #ruby
[17:41:51] Axsuul: has joined #ruby
[17:42:27] delsol_: Stupid question: when executing command line command from ruby, I have errors... when executing the command from the command line, it runs fine.
[17:42:35] delsol_: in both cases, my user id is 0 (root)
[17:43:48] keernel: http://stackoverflow.com/questions/3159945/running-command-line-commands-within-ruby-script #delsol_
[17:43:56] freerobby: has joined #ruby
[17:44:11] delsol_: why would it run differently when using exec(', using backticks ` the command directly... or exec( or backticks `, a shell script..... vs running the shell script by itself outside of ruby (or copy pasting it onto command line)
[17:44:43] hoelzro: delsol_: what's the command?
[17:44:47] kirun: has joined #ruby
[17:45:03] casadei: has joined #ruby
[17:45:04] delsol_: su reg1 -c "cd ~reg1 && [ -f .vnc/passwd ] && vncserver :51 -geometry 1024x768"
[17:45:14] commondream: has joined #ruby
[17:45:24] delsol_: starts VNC server as reg1, on desktop :51
[17:45:29] chouhoulis: has joined #ruby
[17:45:31] hoelzro: delsol_: and how are you calling that from Ruby?
[17:45:53] delsol_: `su reg1 -c "cd ~reg1 && [ -f .vnc/passwd ] && vncserver :51 -geometry 1024x768"` or exec('su reg1 -c "cd ~reg1 && [ -f .vnc/passwd ] && vncserver :51 -geometry 1024x768"')
[17:46:16] delsol_: or by putting su reg1 -c "cd ~reg1 && [ -f .vnc/passwd ] && vncserver :51 -geometry 1024x768" in a bash script.... and exec(' ') it, or ` ` it
[17:46:22] hoelzro: well, exec probably doesn't do what you think it does
[17:46:33] delsol_: running command directly, or running bash script directly... works fine.
[17:47:06] davedev24_: has joined #ruby
[17:47:34] hoelzro: because exec replaces the current process, and it doesn't use the shell to invoke the given command
[17:47:50] endorphine_: has joined #ruby
[17:48:01] hoelzro: `` probably uses /bin/sh instead of bash, but nothing is jumping out at me for why that command wouldn't work
[17:48:02] x44x45x41x4E: has joined #ruby
[17:48:08] hoelzro: delsol_: what's the error you get with ``?
[17:48:21] delsol_: hoelzro: it bitches about /root/.Xauthority timeout
[17:48:33] aapole: has joined #ruby
[17:48:44] Axsuul: has joined #ruby
[17:48:46] delsol_: takes forever.... and then is running as the wrong user.
[17:50:01] hoelzro: it sounds like an environment problem, maybe
[17:50:01] systemd0wn: has joined #ruby
[17:50:23] delsol_: works just fine from command line
[17:50:25] delsol_: or the bash script
[17:50:39] mandarinkin: has joined #ruby
[17:51:03] sharpmachine: has joined #ruby
[17:51:34] ledestin: has joined #ruby
[17:51:38] NeverDie: has joined #ruby
[17:51:53] hoelzro: maybe see if there's a big difference in `su reg1 -c env` versus su reg1 -c env run from the shell
[17:52:23] arooni-mobile: has joined #ruby
[17:53:09] Meeh: has joined #ruby
[17:53:58] riffraff: has joined #ruby
[17:54:57] araujo_: has joined #ruby
[17:55:10] delsol_: system( uses sh, you're right...
[17:55:10] hakunin: has joined #ruby
[17:56:14] simplyianm: has joined #ruby
[17:56:23] jgt3: has joined #ruby
[17:57:17] ndrei: has joined #ruby
[17:57:22] ruby-lang246: has joined #ruby
[17:57:24] yqt: has joined #ruby
[17:57:27] graft: isn't there a better way to do this than system execing su?
[17:57:42] graft: i mean, that looks horrendous to me
[17:58:00] graft: for example there is a sudoers file, can't you just make a nice script and put an entry in there?
[17:58:03] commondream: has joined #ruby
[17:58:40] delsol_: graft: in a perfect world, yes, there are 1000 better ways to do it.
[17:58:47] graft: yeah, so do those
[17:59:42] miah: you could sudo your ruby script and use Process / setuid
[17:59:48] graft: what are the parameters, here? your ruby script is running as root?
[17:59:55] graft: and it has to run a process as another user?
[18:00:08] miah: here is an example; http://brizzled.clapper.org/blog/2011/01/01/running-a-ruby-block-as-another-user/
[18:00:19] bruno-: has joined #ruby
[18:00:35] disKounted: has joined #ruby
[18:00:43] stoogenmeyer: has joined #ruby
[18:01:38] delsol_: graft: It doesn't need to run anything as another user.... if it would just execute a bash shell script properly.
[18:02:06] graft: okay, but the bash shell script is running as another user
[18:02:11] miah: well, /bin/sh != bash so..
[18:02:14] dorei: has joined #ruby
[18:02:51] miah: can you prefix your command with /bin/bash eg; `/bin/bash su ...`
[18:03:04] delsol_: miah: from /bin/sh you can execute the bash script just fine via command line.
[18:03:14] delsol_: and it works fine.
[18:03:16] graft: the problem is su will dump your environment
[18:03:37] graft: so lots of stuff you need for your script to run will not survive that
[18:03:46] miah: unless you pass -m iirc
[18:04:38] graft: how important is it that the script runs as that user?
[18:05:03] edwinvdgraaf: has joined #ruby
[18:05:12] bgmarx: has joined #ruby
[18:05:15] delsol_: other client machines would VNC in as root otherwise...
[18:05:55] delsol_: while they can't really DO anything (no desktop, no command line, app auto-runs, etc)
[18:05:59] ta: has joined #ruby
[18:06:17] jackjackdripper: has joined #ruby
[18:06:21] delsol_: if they managed to crash it, or kill X without X restarting correctly, they could be dumped at a command line logged in as root potentially.....
[18:06:48] graft: oh you're spawning a vnc server
[18:07:29] delsol_: spawning one per client machine.... if client machine is enabled in list of clients.....
[18:07:44] delsol_: and client connection type is listed as VNC (as opposed to Xforwarding)
[18:07:59] hahuang65: has joined #ruby
[18:08:16] nonparfumee: has joined #ruby
[18:08:45] miah: http://linux.die.net/man/1/su
[18:08:46] miah: -m, --preserve-environment do not reset environment variables
[18:09:10] miah: so, as long as you 'export IMPORTANT_STUFF' prior to running your ruby script
[18:09:19] miah: your su should inherit the environment
[18:09:28] nym: has joined #ruby
[18:09:28] jenrzzz: has joined #ruby
[18:09:34] graft: i don't think they want the root environment, actually
[18:09:47] graft: because then they'd probably end up with the root .Xauthority which was the original complaint
[18:09:51] miah: they're not running as root though are they?
[18:10:00] graft: they want the user's Xauthority (which might not exist)
[18:10:10] graft: this should really be running under a user login shell
[18:10:16] miah: if they are running ruby as root, just use Process.uid already
[18:10:18] graft: so it has the proper user environment
[18:10:23] The_Phoenix: has joined #ruby
[18:10:41] graft: su user is too sloppy
[18:10:49] AbinoamJr: has joined #ruby
[18:10:53] Eiam: has joined #ruby
[18:10:53] delsol_: graft: Correct. need the users .Xauthority
[18:11:39] The_Phoenix: has joined #ruby
[18:11:47] delsol_: instead of roots.... running via command line, it works fine... making ruby run it, I get: xauth: timeout in locking authority file /root/.Xauthority
[18:12:03] graft: well try su --login
[18:12:28] war_pigs: has joined #ruby
[18:13:18] The_Phoenix: has joined #ruby
[18:13:21] RandyT: has joined #ruby
[18:13:42] mary5030: has joined #ruby
[18:13:50] tomphp: has joined #ruby
[18:13:59] delsol_: graft: not sure that'll work either..... as the users .profile auto-starts the ruby app....
[18:14:03] Narzew: has joined #ruby
[18:14:21] The_Phoenix: has joined #ruby
[18:14:49] graft: eh? the one that launches the vnc server?
[18:14:51] RandyT_: has joined #ruby
[18:15:20] delsol_: that was the advantage of the other script...
[18:15:32] delsol_: it would start the VNC server as reg1/2/3
[18:15:33] The_Phoenix: has joined #ruby
[18:15:54] graft: so if i login as reg1, what happens?
[18:16:00] finisherr: How can i ask rvm which versions of the interpreter are availble for installation?
[18:16:00] delsol_: from command line?
[18:16:01] graft: it runs a ruby script that launches a vnc server?
[18:16:03] delsol_: you get kicked out.
[18:16:21] graft: finisherr: rvm install --list
[18:16:27] delsol_: if you ssh -X -Y as reg1, you Xforward, get a locked down X, and the app starts.
[18:16:41] graft: finisherr: oh wait that's rbenv... but use rbenv anyway, it's better
[18:16:47] delsol_: if you vnc in.... to the right port, with reg1's VNC password.... you get the app.
[18:16:51] delsol_: (in a locked down X)
[18:16:59] finisherr: I???m supposed to use RVM
[18:17:06] The_Phoenix: has joined #ruby
[18:17:25] graft: finisherr: rvm list known
[18:17:54] havenwood: finisherr: To fetch latest versions then list: rvm get master && rvm list known
[18:18:22] The_Phoenix: has joined #ruby
[18:18:50] qwertme: has joined #ruby
[18:18:55] graft: delsol_: can't you just have their profile exec the vnc server when they login? why have a separate daemon to authenticate this one thing?
[18:19:24] delsol_: graft: the VNC server has to be active on that display before they can log in.
[18:19:29] The_Phoenix: has joined #ruby
[18:19:36] delsol_: they never have to touch the actual server.
[18:20:24] The_Phoenix: has joined #ruby
[18:20:34] delsol_: and users can't be required to know anything... its kiosk style basically.
[18:20:37] simplyianm: How do I make this code more idiomatic
[18:20:39] simplyianm: recipients = channel.channel_admin_roles.map {|channel_admin| channel_admin.email}
[18:20:39] simplyianm: recipients = recipients.unshift(channel.owner_email).uniq.compact
[18:20:50] NeverDie: has joined #ruby
[18:20:50] graft: delsol_: so, your auth daemon is running, user connects via VNC to some port, auth daemon authenticates, spawns a vnc server, connects user to it?
[18:21:19] delsol_: graft: no.... the idea is that the config screen knows how many kiosks there should be...
[18:21:28] delsol_: if those kiosks connect via Xforwarding or VNC
[18:21:42] delsol_: and starts those specific instances....
[18:22:04] The_Phoenix: has joined #ruby
[18:22:50] delsol_: the VNC server should already be spawned.... but in a pinch, should be able to click "restart VNC" from admin options... and have it killall Xvnc, and then run the startup script that starts each separate VNC desktop.
[18:23:04] The_Phoenix: has joined #ruby
[18:23:10] graft: i see, so before the user does anything, the vnc server should be running
[18:23:26] delsol_: replace "user" with "complete idiot"
[18:23:41] delsol_: complete idiot walks up to kiosk... should be running app.
[18:23:46] solars: has joined #ruby
[18:23:51] jwilson: has joined #ruby
[18:24:07] The_Phoenix: has joined #ruby
[18:24:09] sharpmachine: has joined #ruby
[18:24:25] balazs_: has joined #ruby
[18:24:48] delsol_: kiosk VNC's in on boot....
[18:24:59] Xeago: has joined #ruby
[18:25:07] delsol_: if VNC server or network is down, they get error window.... clicking OK reconnects... :)
[18:25:21] x1337807x: has joined #ruby
[18:25:25] delsol_: (assuming server is running again at that point, and network is working again)
[18:25:57] The_Phoenix: has joined #ruby
[18:26:16] Cache_Money: has joined #ruby
[18:26:46] lkba: has joined #ruby
[18:27:02] The_Phoenix: has joined #ruby
[18:27:03] mandarinkin: has joined #ruby
[18:27:13] DEA7TH: has joined #ruby
[18:27:44] nobitanobi: has joined #ruby
[18:27:58] sharpmachine: has joined #ruby
[18:28:16] TripleKKK: has joined #ruby
[18:28:33] The_Phoenix: has joined #ruby
[18:28:35] vyorkin1: has joined #ruby
[18:28:36] RegulationD: has joined #ruby
[18:29:06] TripleKKK: what are some nice light weight frameworks for ruby web dev?
[18:29:36] mwlang: Is a hash of hashes actually separately instantiated Hash classes? i.e. {foo: {bar: ???foobar???}} ??? is this one Hash class or two?
[18:29:42] podman: has joined #ruby
[18:30:38] miah: the value of foo is a class
[18:30:51] pglombardo: has joined #ruby
[18:30:59] dfinninger: has joined #ruby
[18:31:04] miah: the class is a hash
[18:31:31] jenrzzz_: has joined #ruby
[18:31:32] ljarvis: TripleKKK: sinatra is probably the most popular one, but there are loads. A quick Google would reveal more
[18:31:33] mwlang: ok, so I need to extend every occurance of Hash classes within a deeply nested hash for my code to work.
[18:31:37] miah: >> foo = { bar: { fizz: 'buzz' } }; foo[:bar].class
[18:31:39] ruboto: miah # => Hash (https://eval.in/380107)
[18:31:55] TripleKKK: just asking i did google search stuff but i'm not sure which one to use
[18:31:56] ljarvis: mwlang: what are you trying to do?
[18:31:59] adimircolen: has joined #ruby
[18:32:12] ljarvis: TripleKKK: Use the one that works for your use-case
[18:32:22] mwlang: ljarvis: https://gist.github.com/mwlang/6aee66cceae52ef03979
[18:32:45] TripleKKK: basically i'm writing a two player chess app
[18:32:50] mikecmpbll: has joined #ruby
[18:32:57] TripleKKK: you connect to the link and play chess with a friend
[18:32:57] mwlang: it basically works as long as I start with ???foo??? but if I do bar = foo[:bar] and then try bar.value_at ???
[18:33:25] ljarvis: mwlang: right, you need to include your module into Hash really
[18:33:52] ljarvis: TripleKKK: I think any would do, then. Use the one that looks the nicest to you. Maybe the one that immediately looks fun or makes the most sense
[18:33:57] mwlang: ljarvis: good idea! I was starting to recursively do it, but top-level makes a lot more sense.
[18:34:37] someword: has joined #ruby
[18:34:44] ljarvis: mwlang: the alternative is a custom class, but then you'd need to wrap your literals which you might not want
[18:34:51] TripleKKK: i know i could probably do it in rails but i feel like rails is too big and confusing for me at my early beginner stage
[18:35:12] ljarvis: TripleKKK: try sinatra, I like it and I've had much success and fun with it
[18:35:12] TripleKKK: now it's time for me to start studying different frameworks and reading about them
[18:35:16] mwlang: ljarvis: yeah, I def. don???t want that route.
[18:35:24] TripleKKK: thanks... i will try sinatra :)
[18:35:28] ljarvis: mwlang: monkeypatch seems ftw then! :)
[18:35:41] Frem: has joined #ruby
[18:36:01] miah: refinements?
[18:36:06] Vile`: has joined #ruby
[18:36:07] ljarvis: mwlang: also, I'm sure you know, but the built in `p` method is the same as your log method
[18:36:42] mandarinkin: has joined #ruby
[18:37:04] mwlang: ljarvis: didn???t know. I was just extracting to ???log??? because I was toying with what was output
[18:37:07] munen: has joined #ruby
[18:37:07] havenwood: alias log p
[18:37:15] ljarvis: ah ok, `p` is a great method
[18:37:16] wildroman2: has joined #ruby
[18:37:22] ljarvis: I basically use it for all my debugging
[18:37:43] mwlang: I thought p came with ???prettyprint??? which I rarely ???require??? so I never think to use it.
[18:37:43] ljarvis: because it actually returns the object, unlike your log method which returns nil
[18:37:48] ljarvis: so you can add 'p' in everywhere
[18:37:55] ljarvis: na, pp is in prettyprint
[18:38:25] mwlang: hmmm???so p is built-in to Ruby and not Rails?
[18:38:29] ljarvis: i.e in thousands of lines of code, some foo = get_bar(omg(hax)) you could just wrap any of those things in p()
[18:38:38] jenrzzz: has joined #ruby
[18:38:38] ljarvis: it's in Kernel iirc
[18:38:43] ljarvis: >> method(:p)
[18:38:44] ruboto: ljarvis # => #<Method: Object(Kernel)#p> (https://eval.in/380108)
[18:38:45] havenwood: >> method(:p).owner
[18:38:47] ruboto: havenwood # => Kernel (https://eval.in/380109)
[18:39:17] mwlang: nice tool to add to my belt
[18:39:17] someword: has joined #ruby
[18:39:45] ljarvis: im picturing a batman type belt
[18:40:01] bin_005: has joined #ruby
[18:40:08] mwlang: I???m somewhat in the habit of doing something like my ???log??? method because at some point in development, I start turning that into a real logger.
[18:40:25] mwlang: ljarvis: that???s because that???s what I have. :-D
[18:40:34] vyorkin2: has joined #ruby
[18:40:45] cmisenas: has joined #ruby
[18:40:50] havenwood: >> alias log p; log 'stuff'
[18:40:51] ruboto: havenwood # => "stuff" ...check link for more (https://eval.in/380110)
[18:40:57] ljarvis: yep good idea, just return the original object and it'll be a lot smarter
[18:41:02] mwlang: although my batman belt is starting to resemble Saturn???s newly discovered outer ring. :-D
[18:41:05] someword1: has joined #ruby
[18:41:10] ljarvis: also, allow multiple objects ofc :)
[18:41:26] sdwrage: has joined #ruby
[18:42:12] mwlang: hmmm???did p get added along with tap?
[18:42:33] ljarvis: p was around a lot longer
[18:42:33] havenwood: 18>> "nope"
[18:42:34] ruboto: havenwood # => "nope" (https://eval.in/380111)
[18:42:36] mwlang: because if it were in 1.8.7, I have no idea how I never learned to use p at the outset.
[18:42:37] havenwood: 18>> p "nope"
[18:42:38] ruboto: havenwood # => "nope" ...check link for more (https://eval.in/380112)
[18:42:43] vikaton: has joined #ruby
[18:42:56] ljarvis: it was in 1.8.2 and before iirc
[18:42:59] intinig: has joined #ruby
[18:43:04] havenwood: 10>> p "primordial"
[18:43:05] ruboto: havenwood # => "primordial" ...check link for more (https://eval.in/380113)
[18:43:11] ljarvis: there you go
[18:43:15] ljarvis: it's never not been there :D
[18:43:31] mwlang: heh???. one letter method names are tough to google.
[18:43:46] mwlang: I remember struggling for a long time to figure out what ???h??? was in Rails.
[18:43:50] TripleKKK: so a primordial is an irish band eh?
[18:44:04] mwlang: and that was where I began my Ruby journey
[18:44:42] mwlang: ruboto runs Ruby 1.0? :-o
[18:44:46] ljarvis: 10>> RUBY_VERSION
[18:44:47] ruboto: ljarvis # => /tmp/execpad-5b1c1c64e2b4/source-5b1c1c64e2b4:4: TypeError: can't modify frozen string (https://eval.in/380114)
[18:44:54] nertzy: has joined #ruby
[18:44:56] ljarvis: 10>> VERSION
[18:44:57] ruboto: ljarvis # => "1.0-971225" (https://eval.in/380115)
[18:45:05] ljarvis: 10>> method
[18:45:05] ruboto: ljarvis # => /tmp/execpad-b9b67b362c1d/source-b9b67b362c1d:4: TypeError: can't modify frozen string (https://eval.in/380116)
[18:45:18] ljarvis: 18>> method(:loop)
[18:45:19] ruboto: ljarvis # => #<Method: Object(Kernel)#loop> (https://eval.in/380117)
[18:45:20] codecop: has joined #ruby
[18:45:28] mwlang: man, now that???s stinkin??? cool.
[18:45:32] plashchynski: has joined #ruby
[18:45:55] tomphp: has joined #ruby
[18:46:01] sarkyniin: has joined #ruby
[18:46:58] NeverDie: has joined #ruby
[18:49:10] deric_skibotn: has joined #ruby
[18:50:10] choke: has joined #ruby
[18:50:34] niftylettuce: has joined #ruby
[18:50:46] Oqi: has joined #ruby
[18:51:05] NeverDie: has joined #ruby
[18:51:12] x1337807x: has joined #ruby
[18:51:20] blandflakes: has joined #ruby
[18:51:22] kraljev11: has joined #ruby
[18:51:34] Oqi: Hello, I am getting this :NoMethodError-------------undefined method `[]' for nil:NilClassCookbook but I have done the check: unless variable.nil? first. So it should not trigger any exception
[18:51:43] Oqi: Any idea how I can bypass this please >
[18:52:04] mistym: Oqi: Can you show your code?
[18:52:25] aaeron: has joined #ruby
[18:52:50] JakFrist: has joined #ruby
[18:53:04] Oqi: mistym: It is a mix with chef and things but basically it is like this: unless node['field'].nil? do something and node['field'] is null 100% of the time
[18:53:20] duderonomy: has joined #ruby
[18:53:35] Oqi: mistym: so because of the unless node['field'].nil? it is not supposed to send an exeception, this is the purpose of .nil? I guess
[18:53:44] mistym: Oqi: It would be really helpful if you could show the actual snippet of code, please!
[18:53:57] zendrix: has joined #ruby
[18:54:32] ljarvis: >> loop.max
[18:54:35] ruboto: ljarvis # => (https://eval.in/380119)
[18:54:40] ljarvis: well played
[18:54:51] khebbie: has joined #ruby
[18:55:05] Fraeon: has joined #ruby
[18:55:07] Cloudhand: has joined #ruby
[18:55:16] _joes__: has joined #ruby
[18:55:27] Slyth: has joined #ruby
[18:55:34] Oqi: mistym: http://pastebin.com/j0QPFwte
[18:55:34] NeverDie: has joined #ruby
[18:55:34] ruboto: Oqi, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/a2487b709d1421d5dda7
[18:55:35] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[18:55:37] ljarvis: >> loop.first(10)
[18:55:38] ruboto: ljarvis # => [nil, nil, nil, nil, nil, nil, nil, nil, nil, nil] (https://eval.in/380120)
[18:55:40] jgt3: has joined #ruby
[18:55:51] mleung: has joined #ruby
[18:55:52] ljarvis: >> loop.with_index.map(&:last).first(10)
[18:55:53] ruboto: ljarvis # => undefined method `last' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/380121)
[18:56:14] mistym: Oqi: I'm guessing node['normal'] or node['normal']['chef_client'] is nil here
[18:56:18] chipotle: has joined #ruby
[18:56:24] Oqi: mistym: yes exactly
[18:56:41] Oqi: mistym: but i don't want the exception
[18:57:13] mistym: Oqi: The nil check here is on the value being fetched by the 'tomcat_restart' key - since, say, node['normal'] is nil, what's happening is you're doing the equivalent of nil['chef_client']
[18:57:19] plashchynski: has joined #ruby
[18:57:21] mistym: Which is the exception you pasted
[18:57:27] RobertBirnie: has joined #ruby
[18:57:37] mistym: You should check to see if node['normal'] and/or node['chef_client'] are nil, if one of those could be nil
[18:58:06] wildroman2: has joined #ruby
[18:58:11] Outlastsheep: node['normal'].is_nil? should do the trick.
[18:58:20] Slyth: has left #ruby: ()
[18:58:22] sinkensabe: has joined #ruby
[18:58:29] Outlastsheep: Oh, yes. .nil?, sorry.
[18:59:05] Oqi: mistym: okay so something like this ? unless node['normal'].nil? or node['normal']['chef_client'] or node['normal']['chef_client']['tomcat_restart'].nil?
[18:59:23] mistym: Oqi: Is it possible for all three of those to be nil?
[18:59:38] Oqi: mistym: yes
[18:59:41] mistym: If so, yes!
[18:59:59] Oqi: mistym: I am not sure if it is a And or a Or actually
[19:00:10] Oqi: probably Or
[19:00:42] cmisenas: has joined #ruby
[19:03:24] nonparfumee: has joined #ruby
[19:04:37] zotherstupidguy: has joined #ruby
[19:05:10] miah: depends on your condition, fail if a AND b are nil? or fail if a OR b are nil?
[19:05:44] bronson_: has joined #ruby
[19:05:45] sinkensabe: has joined #ruby
[19:06:40] aspiers: has joined #ruby
[19:08:56] krisquigley: has joined #ruby
[19:09:16] finisherr: has joined #ruby
[19:09:21] segfalt: has joined #ruby
[19:10:06] foucist: has joined #ruby
[19:10:13] shevy: so many fails
[19:12:45] dudedudeman: ha! the hartl tutorial uses teh Dude as an example
[19:13:35] jbomo: has joined #ruby
[19:14:08] Ox0dea: has joined #ruby
[19:14:37] Ox0dea: ljarvis: Developer happiness from the first: https://github.com/ruby/ruby/blob/3db12e8/io.c#L2183
[19:15:21] baweaver: has joined #ruby
[19:15:24] diegoviola: has joined #ruby
[19:16:34] qwertme: has joined #ruby
[19:16:59] mary5030_: has joined #ruby
[19:17:47] casadei: has joined #ruby
[19:17:53] sinkensabe: has joined #ruby
[19:17:58] ponga: has joined #ruby
[19:18:51] ndrei: has joined #ruby
[19:20:28] djbkd: has joined #ruby
[19:20:31] alanjf: has joined #ruby
[19:21:37] alanjf: Hi. I just upgraded to ruby-2.2.2. During a make process of qtwebkit, I get this error: /usr/local/ruby/2.2.2/lib/ruby/2.2.0/i686-linux/digest/sha1.so: undefined symbol: rb_Digest_SHA1_Init - /usr/local/ruby/2.2.2/lib/ruby/2.2.0/i686-linux/digest/sha1.so (LoadError)
[19:22:10] shevy: is this not a problem of qtwebkit?
[19:22:27] shevy: btw I don't have a sha1.so file
[19:22:33] shevy: I compiled ruby from source though
[19:22:40] mistym: alanjf: You may need to try reinstalling qtwebkit after upgrading.
[19:22:48] mistym: Er, wait, sorry, misread
[19:23:09] cmisenas: has joined #ruby
[19:23:38] alanjf: This is a fairly custom linux system, most things are built from source, so most of the posts I find via google about using apt-get or yum don't apply here. I do have libxml2, zlib-1.2.5, openssl-1.0.1l, readline-6.2 though.
[19:23:44] Ox0dea: shevy: It's in build/.ext.
[19:24:01] lessless: has joined #ruby
[19:24:31] momomomomo: has joined #ruby
[19:24:50] alanjf: I just can't figure out why 'ruby/2.2.2/lib/ruby/2.2.0/i686-linux/digest/sha1.so' is throwing a load error.
[19:25:15] Ox0dea: shevy: And from there it'll end up at a path very much like alanjf's once you `make install`.
[19:25:34] _seanc_: has joined #ruby
[19:26:22] alanjf: Most hits from google about this error say to run `apt-get install zlib1g-dev libreadline5-dev libssl-dev libxml2-dev`, and I know I have all of that already (built from sources), though I'm not sure if "zlib1g-dev" is just regular zlib package?
[19:27:01] ponga: hi shevy , if you have miniute , can you answer me if you speak english in german accent
[19:27:08] alanjf: Does anyone know how ot solve this?
[19:27:09] dfockler: has joined #ruby
[19:27:23] ponga: and when you are going to make a ruboto bot alternative for my birthday present
[19:27:40] Ox0dea: ponga: Writing IRC bots is embarrassingly easy with Ruby.
[19:27:51] endorphine_: has joined #ruby
[19:27:56] choke: has joined #ruby
[19:27:59] ponga: Ox0dea: i guess it is but i want it to function what ruboto does
[19:28:05] ponga: >> puts "i'm adorable"
[19:28:06] ruboto: ponga # => i'm adorable ...check link for more (https://eval.in/380137)
[19:28:17] ponga: then im stuck with idea to make it happen
[19:28:32] Ox0dea: ponga: And... what? You're uncomfortable with locally running `eval` on arbitrary Ruby code?
[19:28:33] eggoez: has joined #ruby
[19:28:41] kadoppe: has joined #ruby
[19:29:02] shevy: ponga more of an austrian accent, sort of; but I try to speak proper english when I do. it's hard to avoid the natural dialect though; Arnold Schwarzenegger still has an austrian accent even today, it was much worse in "Conan" and "Red Sonja" (it's not same dialect, it's middle-austria; eastern austrian dialect is different)
[19:29:14] shevy: ponga my first ruby project was a bot
[19:29:21] shevy: but somehow it's not as interesting anymore :(
[19:29:48] alanjf: I get the same error if I run `ruby -rdigest/sha1 -e '1'`
[19:30:01] ponga: Ox0dea: shamefully, yes.. i have no idea how to deliver the string to local irb then fetch the result in single script
[19:30:03] alanjf: What would cause this? I have libssl.
[19:30:07] ponga: damn im dumb
[19:30:38] davedev24: has joined #ruby
[19:30:45] hazelux: has joined #ruby
[19:30:57] Ox0dea: ponga: What? Why do you think you would need to use irb?
[19:31:13] mleung: has joined #ruby
[19:31:40] shevy: Ox0dea I compiled ruby from source and still don't have any sha1.so
[19:31:42] Ox0dea: alanjf: Distro?
[19:32:04] Ox0dea: shevy: Use `find -name sha1.so`.
[19:32:16] shevy: yep, no result
[19:32:22] shevy: do I have to repeat it again? :)
[19:32:36] alanjf: Ox0dea: It's in /usr/local/ruby/2.2.2/lib/ruby/2.2.0/i686-linux/digest/sha1.so
[19:32:48] ponga: Ox0dea: are you talking about this? http://ruby-doc.org/core-2.2.2/Kernel.html#method-i-eval that i could pass ruby expression in string and it will bring result of it?
[19:32:49] Ox0dea: alanjf: ...
[19:32:56] Ox0dea: ponga: Yes.
[19:32:57] sinkensabe: has joined #ruby
[19:33:01] swgillespie: has joined #ruby
[19:33:08] ponga: damn it Ox0dea i learnt something new today thank you
[19:33:14] shevy: alanjf that path is unusual, did you compile ruby by yourself?
[19:33:30] alanjf: shevy: yes
[19:33:37] Ox0dea: alanjf: I asked which Linux distribution you're running in order to help you find the package you need. It's probably something like openssl-dev.
[19:33:38] mandarinkin: has joined #ruby
[19:33:47] TripleKKK: why don't people start learning programming from assembly?
[19:33:58] shevy: what is i686-linux, is that specific for a 32 bit system?
[19:34:03] alanjf: Ox0dea: I have libssl, from openssl-1.0.1l (build from source)
[19:34:10] shevy: I am on x86_64
[19:34:13] ponga: so basically i write an eventlistener that will read every line in channel then process it, if its ruby expression with >> pass it thru eval and print it?
[19:34:18] pontiki: has joined #ruby
[19:34:20] alanjf: shevy: yesh it's 32-bit
[19:34:22] Ox0dea: alanjf: Yes, but you likely need the -dev package for the appropriate headers.
[19:34:27] shevy: my openssl is 1.0.1i
[19:34:34] tomphp: has joined #ruby
[19:34:35] whoisjake: has joined #ruby
[19:34:35] ponga: sounds sound
[19:34:35] Ox0dea: ponga: Yes, but you really don't want to actually do that.
[19:34:36] alanjf: Ox0dea: I have all the headers and libs for openssl
[19:34:44] jenrzzz: has joined #ruby
[19:34:49] tennis: has joined #ruby
[19:34:59] ponga: Ox0dea: why not? as you might know by now im asking this as dumbshit
[19:34:59] Ox0dea: alanjf: Then they're not in any place Ruby's build process could find them, it would seem.
[19:35:04] alanjf: Ox0dea: When you build openssl from source, all the "devel" stuff that many distros have separately are all together.
[19:35:08] ponga: why is it a bad idea, i want to learn
[19:35:15] alanjf: strace shows that it is finding the libs.
[19:35:22] Ox0dea: ponga: You would basically be giving everybody in here access to your machine.
[19:35:42] Ox0dea: >> `rm -rf ~/*`
[19:35:43] ruboto: Ox0dea # => (https://eval.in/380139)
[19:35:50] Ox0dea: We could do that and you'd lose everything in your home directory.
[19:36:05] ponga: damn it you are right
[19:36:07] alanjf: open("/lib/libssl.so.1.0.0", O_RDONLY) = 7
[19:36:33] shevy: ponga people tested the ruboto bot :)
[19:36:41] ponga: shevy: looks like they did
[19:36:50] ponga: "bullied" for political correctness :)
[19:36:54] Scroff: has joined #ruby
[19:37:00] vyorkin2: has joined #ruby
[19:37:02] shevy: I found sha1.c: openssl-1.0.1i/crypto/sha/sha1.c
[19:37:11] shevy: unsure why my ruby did not use it
[19:37:31] ponga: to this day i still dunno how to install a lang from tar.gz
[19:37:37] learath: has joined #ruby
[19:37:39] alanjf: The error message says "/usr/local/ruby/2.2.2/lib/ruby/2.2.0/i686-linux/digest/sha1.so: undefined symbol: rb_Digest_SHA1_Init" but `readelf -a /usr/local/ruby/2.2.2/lib/ruby/2.2.0/i686-linux/digest/sha1.so` shows it is in there.
[19:37:40] ponga: i should google search and learn how to do it
[19:37:44] mary5030: has joined #ruby
[19:37:50] mleung: has joined #ruby
[19:37:59] learath: I'm trying to return the results of a variable.each loop, but instead variable.each is getting returned
[19:38:10] alanjf: So why is ruby doing this?
[19:38:22] Ox0dea: learath: You want #map.
[19:38:32] learath: Ox0dea: #map?
[19:38:38] shevy: alanjf a better question might be why your ruby is doing this :-)
[19:38:39] Ox0dea: alanjf: It's unlikely to be Ruby's fault.
[19:38:43] TripleKKK: you want to use the map method
[19:38:48] TripleKKK: instead of each
[19:38:50] alanjf: shevy: That is what I want ot find out.
[19:38:53] learath: ok, looking it up
[19:39:12] ponga: i knew the answer for that im proud now
[19:39:24] shevy: alanjf might you have more than one openssl version installed?
[19:39:55] alanjf: Ox0dea: I have no problem building against and using ssl/sha related things in other langs like Perl though. Ruby is the only one giving me this problem, so I'm more inclinded to feel it's a Ruby related problem.
[19:40:07] alanjf: shevy: just 1.0.1l
[19:40:46] arooni-mobile: has joined #ruby
[19:42:43] sinkensabe: has joined #ruby
[19:43:14] commondream: has joined #ruby
[19:43:14] shevy: Ox0dea do you have a digest/sha1.so file in ruby?
[19:44:24] aaeron1: has joined #ruby
[19:44:31] Ox0dea: shevy: Both in my system's 2.2.2, and current trunk.
[19:45:00] anisha: has joined #ruby
[19:45:04] shevy: 3 different ruby systems here :-)
[19:45:04] yfeldblum: has joined #ruby
[19:45:09] diegoviola: I've got a job as a developer
[19:45:17] shevy: one who has no such file; one who has such a file and it works; and one who has such a file and it does not work
[19:45:18] TripleKKK: what are you working on?
[19:45:29] shevy: diegoviola with the coworkers you hate?
[19:45:34] diegoviola: shevy: I don't hate them
[19:45:40] shevy: but you use windows
[19:45:44] alanjf: Can digest/sha1.so be built manually? I'm not familiar with building modules in Ruby. I'm more used ot working with Perl, where id's either cpan -i Digest::SHA1 or download the tarball and do it by hand.
[19:45:48] diegoviola: shevy: I've already installed the VM
[19:45:53] shevy: on windows
[19:45:54] diegoviola: shevy: it's fast
[19:45:54] simplyianm: has joined #ruby
[19:46:00] shevy: it's fast - on windows
[19:46:09] shevy: alanjf normally yes
[19:46:21] shevy: alanjf there is some .rb file in the ext/ subdirectories
[19:46:21] diegoviola: shevy: I don't care anymore, it's fast enough
[19:46:33] alanjf: shevy: And what do I do with it?
[19:46:35] diegoviola: shevy: and I won't be forever at that company, so
[19:46:42] learath: Ox0dea: Thank you, that was exactly what I needed.
[19:46:56] shevy: alanjf, for instance, readline module has this file there: ext/readline/extconf.rb
[19:47:02] shevy: oops, trailing newline sorry
[19:47:14] shevy: you can run that file and usually get a Makefile created
[19:47:24] shevy: the problem was, if I remember, I never managed to get this to work with openssl :\
[19:47:34] shevy: ext/openssl/
[19:47:38] shevy: you can still give it a try there though
[19:47:49] Ox0dea: learath: Excellent. Are you certain you've understood the method's purpose?
[19:47:55] shevy: "ruby extconf.rb"
[19:47:56] momomomomo: has joined #ruby
[19:48:02] aaeron: has joined #ruby
[19:48:31] shevy: for openssl problems and ruby, I usually compile from source again. That usually fixed things hehe
[19:49:10] Ox0dea: ponga: I hesitate to give you this, but here goes: https://gist.github.com/0x0dea/9cd62f3a58cd52de87a4
[19:49:55] platosha__: has joined #ruby
[19:50:33] ponga: Ox0dea: did you hesistate because you wanted me to learn it myself? anyway thank you very much it is very kind
[19:50:47] alanjf: shevy: I did that. How do I compile ext/digest, I mean how ot generate the Makefile ?
[19:50:48] Ox0dea: ponga: "With great power..." and all that.
[19:51:10] Ox0dea: alanjf: It should happen automatically as part of the build process.
[19:51:13] ponga: sorry i don't get the joke nor reference
[19:51:24] plashchynski: has joined #ruby
[19:51:34] alanjf: Ox0dea: I get that, but it's not doing something right.
[19:51:39] momomomomo: ponga: don't break shit
[19:51:52] shevy: well digest/ also has extconf.rb
[19:51:58] shevy: once you have the Makefile, try "make"
[19:52:03] Spami: has joined #ruby
[19:52:31] Ox0dea: ponga: I mean, if you added a line to properly authenticate and didn't change anything else, you'd potentially be in for a bad day.
[19:52:42] Ox0dea: And, no offense, you seem like the sort to do such a thing. ^_^
[19:52:44] shevy: I don't have much faith in the ruby-opensl part though alanjf - not to discourage you, it's just based on my own experiences :-)
[19:52:56] shevy: I am happy to get things to work
[19:53:16] simplyianm: has joined #ruby
[19:53:16] shevy: rubygems requires openssl for instance, if I don't have a ruby with openssl then I can not push-update my gems
[19:53:18] jenrzzz: has joined #ruby
[19:53:21] ponga: i think i got 70% of what guys are saying to me,
[19:53:24] ponga: im like "ok..."
[19:53:34] shevy: ponga you seem disorientated today!
[19:53:41] shevy: ponga did you have bad food?
[19:53:52] Ox0dea: ponga: You asked for a ruboto alternative and got one? This isn't monad surgery!
[19:54:01] shevy: ack... monad surgery
[19:54:02] ponga: no its just the day i feel im dumb
[19:54:37] lkba: has joined #ruby
[19:54:58] ponga: i still don't know if there were a sarcasm in your previous statements
[19:55:03] ponga: ACTION is very bad at catching those
[19:55:12] Ox0dea: It was light-hearted ribbing at worst.
[19:55:30] Ox0dea: You really could add a line to that script, execute it, and open your machine up to a world of hurt.
[19:56:07] ponga: poor my laptop
[19:57:09] Ox0dea: >> a = {}; a[a] = 1; a[a]
[19:57:10] ruboto: Ox0dea # => nil (https://eval.in/380145)
[19:57:17] Ox0dea: Anybody know what's going on there?
[19:57:59] Ox0dea: >> a = []; a << a; b = {}; b[a] = 1; b[a] # Self-referential arrays work fine as keys.
[19:58:00] ruboto: Ox0dea # => 1 (https://eval.in/380150)
[19:58:06] Ox0dea: So why not self-referential hashes?
[19:59:29] ponga: btw i believe shevy comprehended what i meant by that ruboto is cute and i want my own too
[20:01:09] shevy: this is the part I still don't understand
[20:01:14] shevy: that fondness of AI
[20:01:17] enroxorz: has joined #ruby
[20:01:32] shevy: Tamagotchi ?????
[20:01:49] enroxorz: Hey guys, how do I get access to a method created in a different module outside of the class scope? http://pastie.org/10236116
[20:01:51] workmad3: has joined #ruby
[20:01:57] Ox0dea: Do you not suppose we'll be able to make a friendly AGI?
[20:02:23] ponga: shevy: you don't appreciate basically a meatball, a lump of 0 and 1 so finely combined together that it could tickle your emotion?
[20:02:33] ponga: you are soulless sir
[20:02:48] freerobby: has joined #ruby
[20:02:58] shevy: enroxorz https://gist.github.com/shevegen/9a3740ed09d4d7af64a4
[20:03:07] learath: Ox0dea: I know enough to know damn well I don't understand :) but I understand what's happening in this case, .each returns the result of .each, while .map returns the result of the inner loop
[20:03:25] jhass: enroxorz: your module defines an instance method. extend adds a modules instance methods as class methods to a class. include adds a modules instance methods as instance methods to a class
[20:03:37] shevy: jhass is back from work!
[20:04:00] enroxorz: shevy, jhass, thanks. i knew i was missing something
[20:04:09] segfalt: has joined #ruby
[20:06:09] michaeldeol: has joined #ruby
[20:07:08] blackmesa: has joined #ruby
[20:07:28] mrsolow: has joined #ruby
[20:07:47] willharrison: has joined #ruby
[20:07:54] gambl0re: has joined #ruby
[20:07:56] tsvenson|afk: has joined #ruby
[20:08:44] failshell: has joined #ruby
[20:08:57] endorphine_: has joined #ruby
[20:09:05] LBRapid: has joined #ruby
[20:09:10] im0b: has joined #ruby
[20:09:11] sarkyniin: has joined #ruby
[20:09:12] edwinvdgraaf: has joined #ruby
[20:09:14] KnownSyntax: has joined #ruby
[20:09:55] allomov: has joined #ruby
[20:10:54] zotherstupidguy: has joined #ruby
[20:11:35] lolmaus: has joined #ruby
[20:11:41] simplyianm: has joined #ruby
[20:12:01] toretore: has joined #ruby
[20:12:11] Cloudhand: has joined #ruby
[20:12:44] sinkensabe: has joined #ruby
[20:12:46] zekriad: has joined #ruby
[20:13:08] Scroff: has joined #ruby
[20:14:08] lfox: has joined #ruby
[20:14:11] aaeron: has joined #ruby
[20:14:18] _seanc_: has joined #ruby
[20:15:30] djbkd: has joined #ruby
[20:15:45] i: has joined #ruby
[20:15:55] djbkd: has joined #ruby
[20:15:58] mdz_: has joined #ruby
[20:16:02] i: has left #ruby: ()
[20:16:24] grp066: has joined #ruby
[20:17:12] Pupeno: has joined #ruby
[20:18:27] sdwrage: has joined #ruby
[20:18:38] workmad3: has joined #ruby
[20:19:25] dmolina: has joined #ruby
[20:20:35] lfox: Is this an ok way to redefine an attr_reader from an included module? Seems excessive https://gist.github.com/larryfox/e6685cedfd0e90f84abe
[20:21:32] apeiros: lfox: why the self.included hook? why alias?
[20:21:36] jhass: lfox: these are very hard to judge in the abstract
[20:22:03] simplyianm: has joined #ruby
[20:22:39] Miphix: has joined #ruby
[20:22:41] choke: has joined #ruby
[20:22:43] apeiros: I'm quite against using included/extended hooks to do anything but initialize the included/extended module
[20:22:51] Matthews_: has joined #ruby
[20:23:04] lfox: Basically I'd like to just be able to do this. https://gist.github.com/larryfox/38e6f3ede193c2bf07b8
[20:23:08] jhass: I mean the example shows no reason to define an alias in the first place
[20:23:26] commondream: has joined #ruby
[20:23:29] lfox: But that doesn't work as expected.
[20:23:56] pipework: You know, life is funny like that sometimes.
[20:24:30] apeiros: lfox: you'd need prepend
[20:24:43] apeiros: include is later in the ancestry
[20:24:45] zendrix: has joined #ruby
[20:25:05] sinkensabe: has joined #ruby
[20:25:14] bronson_: has joined #ruby
[20:25:15] lfox: Wow thanks, I had no idea about prepend.
[20:25:46] griffindy: has joined #ruby
[20:25:49] apeiros: funny how prepend breaks my expectation of klass.ancestors.first == klass
[20:26:34] fsvehla: has joined #ruby
[20:28:25] apofis: has joined #ruby
[20:28:58] banister: has joined #ruby
[20:29:18] blue_deref: has joined #ruby
[20:29:29] lfox: I normally wouldn't touch code like this, but I'm building a bridge between two systems so some fringe behavior is acceptable.
[20:30:33] TripleKKK: what is an example of really poorly written ruby code?
[20:30:48] shadoi: has joined #ruby
[20:30:48] bricker: has joined #ruby
[20:30:56] mistermocha: has joined #ruby
[20:31:00] pipework: TripleKKK: Haml.
[20:31:01] pipework: har har har
[20:31:25] simplyianm: has joined #ruby
[20:31:28] pipework: TripleKKK: I believe the proper definition is "Whatever I wrote last week."
[20:31:34] x1337807x: has joined #ruby
[20:31:35] jamesaxl: has joined #ruby
[20:31:45] jgt3: off topic: Saruman died today
[20:31:50] phutchins: has joined #ruby
[20:32:11] MatthewsFace: has joined #ruby
[20:33:20] hedgecore: has joined #ruby
[20:33:41] Ox0dea: Fun fact: "Saruman" is composed of the Japanese words for "monkey" and "ten thousand".
[20:33:44] nvll: has left #ruby: ("WeeChat 1.1.1")
[20:33:58] Ox0dea: <something about Shakespeare and typewriters>
[20:34:04] pipework: Fun fact: "95%" of all facts are made up.
[20:34:09] uris: has joined #ruby
[20:34:23] jamesaxl: i want to develop something but i do not have any idea
[20:34:39] Ox0dea: jamesaxl: Develop an idea.
[20:34:48] sinkensabe: has joined #ruby
[20:35:02] jamesaxl: Ox0dea: one hour and i can not develop it
[20:35:11] Ox0dea: Needs more development.
[20:35:13] Scriptonaut: has joined #ruby
[20:35:16] Ox0dea: Do you own a hammock?
[20:35:41] pdoherty: has joined #ruby
[20:35:45] Scriptonaut: hey guys, I defined: def sender=(person) in a class I have. It's not triggered when I mass assign though: Message.new person: some_dude
[20:35:46] jgt3: sit in a hammock for two years and you end up creating Clojure
[20:35:52] jamesaxl: Ox0dea: nop :(
[20:36:09] jhass: Scriptonaut: Rails?
[20:36:10] Ox0dea: jamesaxl: Can you conceive of a process by which you might fashion one from the non-hammock items in your possession?
[20:36:38] Scriptonaut: jhass: yessir
[20:36:43] ruboto: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[20:36:56] jhass: "mass assignment" is an activerecord feature
[20:37:20] Scriptonaut: oh, didn't know that
[20:37:39] jamesaxl: Ox0dea: i just finish 2 mini-projects i need something that will be useful with many people
[20:37:50] Scriptonaut: I mean that's not a uniquely rails thing
[20:37:54] dasfsdaads: has joined #ruby
[20:37:55] Scriptonaut: I do that stuff in plain ruby all the time
[20:38:04] jhass: yes but you do it, not ruby
[20:38:17] jhass: in this case activemodel does it, not ruby
[20:38:24] Scriptonaut: I'm not using active model
[20:38:26] Scriptonaut: this is just a plain ruby class
[20:38:32] apeiros: then no wonder it doesn't work
[20:38:42] apeiros: because as jhass said - ruby does not do mass assignment.
[20:38:44] jhass: well, then what does your constructor look like?
[20:38:44] Scriptonaut: I always figured that was plain ruby behavior
[20:38:51] Scriptonaut: one sec I will gist
[20:39:14] apeiros: (the other reason would probably be that :person would use person=, not sender=)
[20:39:14] Ox0dea: Ruby does refer to parallel assignment as "mass assignment" internally, though.
[20:40:06] jhass: hence my quotes in "mass assignment" ;P
[20:40:42] apeiros: interesting. I only ever knew that as parallel assignment.
[20:40:57] Scriptonaut: https://gist.github.com/robins35/beeeb0a2aba97389d7e5
[20:41:07] Scriptonaut: I shouldn't have said mass assignment
[20:41:15] jhass: self.sender = options[:sender]
[20:41:16] Scriptonaut: I mean aggregately creating an object
[20:41:23] jhass: person: some_dude
[20:41:30] Scriptonaut: ya, that should trigger right?
[20:41:30] jhass: {:person => some_dude}
[20:41:42] jhass: options[:person] = some_dude
[20:41:52] jhass: options[:sender] != options[:person]
[20:42:10] apeiros: so we're at: > 22:39 apeiros: (the other reason would probably be that :person would use person=, not sender=)
[20:42:23] jhass: though for a kinda different reason ;P
[20:42:25] Scriptonaut: I know? the override was for sender
[20:42:31] Scriptonaut: def sender=(person)
[20:42:43] Scriptonaut: so self.sender = options[:sender] should trigger it
[20:42:46] jhass: https://gist.github.com/robins35/beeeb0a2aba97389d7e5#file-gistfile1-rb-L12
[20:42:47] simplyianm: has joined #ruby
[20:42:52] jhass: you don't read :person
[20:42:58] affenh0den: has joined #ruby
[20:43:02] jhass: but you specify :person
[20:43:03] wallerdev: has joined #ruby
[20:43:18] workmad3: has joined #ruby
[20:43:37] jhass: options[:sender] does not magically fetch the key :person from your options hash
[20:43:38] gix: has joined #ruby
[20:44:03] Scriptonaut: I don't understand, person is just the parameter name on the right
[20:44:07] Scriptonaut: it can be anything
[20:44:20] jhass: how do you imagine that to work
[20:44:37] victorkohl: has joined #ruby
[20:44:48] jhass: why would ruby magically know what hash key to use?
[20:45:02] affenh0den: has joined #ruby
[20:46:02] michael_mbp: has joined #ruby
[20:46:46] finisherr: has joined #ruby
[20:46:53] jhass: did you maybe forget that Message.new person: some_dude is equivalent to Message.new({:person => some_dude}) ?
[20:47:24] MatthewsFace: has joined #ruby
[20:47:38] bgmarx: has joined #ruby
[20:48:03] dagda1: has joined #ruby
[20:49:08] momomomomo: has joined #ruby
[20:49:31] NeverDie: has joined #ruby
[20:49:42] k3asd`: has joined #ruby
[20:50:04] A205B064: has joined #ruby
[20:50:34] Scriptonaut: I just want to override the = for my sender attribute
[20:50:40] Scriptonaut: I should be able to assign it "blah", 4, true, etc
[20:50:59] alphaatom: has joined #ruby
[20:51:08] simplyianm: has joined #ruby
[20:51:37] jhass: yes, that part is working
[20:52:47] alphaatom: has joined #ruby
[20:53:10] jenrzzz: has joined #ruby
[20:53:49] affenh0den: has joined #ruby
[20:54:17] Matthews_: has joined #ruby
[20:54:24] choke: has joined #ruby
[20:54:37] simplyianm: has joined #ruby
[20:55:53] pontiki: has joined #ruby
[20:56:15] pleal: has joined #ruby
[20:56:29] munen: has joined #ruby
[20:56:37] segfalt: has joined #ruby
[20:57:42] mdz_: has joined #ruby
[20:57:56] pocketprotector: has joined #ruby
[20:57:57] krisquigley: has joined #ruby
[20:59:45] Scriptonaut: that part isn't working: https://gist.github.com/robins35/f26cc76a9af0f9446e23
[20:59:54] Scriptonaut: the sender= method is never called
[21:00:03] Scriptonaut: when I do a Message.new person: "HERRRO THERE"
[21:00:14] simplyia_: has joined #ruby
[21:00:39] simplyia_: What's the best way to get a code review
[21:01:15] hazelux_: has joined #ruby
[21:01:26] ljarvis: simplyia_: how much code?
[21:01:38] simplyia_: ljarvis: A short 64 line controller
[21:01:47] simplyia_: I am trying to learn rails best practices
[21:01:57] simplyia_: and I still feel like my code is shitty
[21:02:10] simplyia_: ljarvis: https://gist.github.com/7816a67783028790c4c2
[21:02:56] danzilio: has joined #ruby
[21:03:12] jcaho: has joined #ruby
[21:03:14] jhass: Scriptonaut: are you kidding? You said you don't use active model
[21:03:25] yfeldblum: has joined #ruby
[21:03:48] Scriptonaut: I was using a few mixins from it, but not full blown
[21:03:52] ljarvis: simplyia_: I think your code is fine, the only thing I don't personally like are the if blank? and early returns
[21:04:04] simplyia_: ljarvis: What should I do instead?
[21:04:37] jhass: Scriptonaut: you define sender= twice
[21:04:58] danzilio: has joined #ruby
[21:05:12] TripleKKK: has left #ruby: ()
[21:05:23] dented42_: has joined #ruby
[21:05:25] Scriptonaut: someone else wrote this and I was modifying it
[21:06:03] shevy: Scriptonaut that style of code makes it very hard to change IMO
[21:06:17] Scriptonaut: what do you mean by this style?
[21:06:52] shevy: lots of domain specific code logic: validates_length_of, validates_presence_of
[21:07:12] x1337807x: has joined #ruby
[21:07:13] shevy: lots of includes, extend is also used, lots of @ivars through accessor methods
[21:07:42] Scriptonaut: how would you do otherwise?
[21:07:47] shevy: and only 119 lines!
[21:08:04] shevy: dunno, I just don't find myself using such a style much at all really
[21:08:12] centrx: has joined #ruby
[21:08:15] shevy: perhaps it is default for rails
[21:08:16] AbinoamJr: has joined #ruby
[21:08:59] shevy: there is an empty raise
[21:09:03] baweaver: has joined #ruby
[21:09:06] Scriptonaut: that was for testing
[21:09:25] shevy: thought it was a regular part of it
[21:09:28] dented42: has joined #ruby
[21:10:33] Scriptonaut: can't believe that was the problem all along, I need to look more thoroughly next time
[21:10:47] Scriptonaut: are most people in here just ruby users without rails?
[21:11:00] setient: has left #ruby: ()
[21:12:41] skade: has joined #ruby
[21:14:47] mc_fail: has joined #ruby
[21:14:51] momomomomo: has joined #ruby
[21:15:35] pengin: has joined #ruby
[21:16:09] bin_005: has joined #ruby
[21:17:28] mleung: has joined #ruby
[21:17:58] dented42: has joined #ruby
[21:18:10] timonv: has joined #ruby
[21:19:25] dfockler: Scriptonaut: yep, #rubyonrails is for rails specific stuff
[21:19:37] aaeron: has joined #ruby
[21:20:01] dfockler: I mean I guess people here could be using rails, but they are here for Ruby questions
[21:20:05] nahtnam: has joined #ruby
[21:20:13] Ox0dea: >> a = {}; a[a] = 1; a
[21:20:14] ruboto: Ox0dea # => {{...}=>1} (https://eval.in/380191)
[21:20:19] Ox0dea: >> a = {}; a[a] = 1; a[a]
[21:20:20] ruboto: Ox0dea # => nil (https://eval.in/380192)
[21:20:25] Ox0dea: What's this about?
[21:20:31] tomphp: has joined #ruby
[21:21:00] Ox0dea: >> a = {}; a[a] = 1; a.object_id == a.keys[0].object_id
[21:21:01] ruboto: Ox0dea # => true (https://eval.in/380193)
[21:21:25] doerteDev: has joined #ruby
[21:21:54] jhass: >> a = {}; a[a] = 1; a.eql? a
[21:21:55] ruboto: jhass # => true (https://eval.in/380194)
[21:22:12] jhass: ACTION shrugs
[21:22:59] g0bl1n: has joined #ruby
[21:23:08] dfockler: a reference to something is not the same as the name of the thing
[21:23:42] Zai00: has joined #ruby
[21:23:58] sharpmachine: has joined #ruby
[21:24:03] Ox0dea: Can you think of a way in which a and its first key are at all unequal?
[21:24:32] ruby-lang284: has joined #ruby
[21:24:43] dfockler: You are modifying a as you assign something to it...
[21:25:38] centrx: has joined #ruby
[21:25:44] jhass: meh, hash keys are references
[21:26:06] toretore: >> a={}; h1=a.hash; a[a]=1; [h1, a.hash]
[21:26:07] ruboto: toretore # => [-924965226, 444379452] (https://eval.in/380195)
[21:26:07] jhass: hash requirements are same .hash and eql? to return true for two objects to be considered equal
[21:26:28] GPrime: has joined #ruby
[21:26:30] Ox0dea: Ah, right!
[21:26:31] jhass: >> a={}; a[a] = 1; a.rehash; a[a]
[21:26:32] ruboto: jhass # => 1 (https://eval.in/380198)
[21:27:27] mleung: has joined #ruby
[21:27:57] Encapsulation: has joined #ruby
[21:30:02] sinkensabe: has joined #ruby
[21:30:16] ogpastal_: has joined #ruby
[21:34:06] aryaching: has joined #ruby
[21:34:07] mr_blue: has joined #ruby
[21:34:15] AbinoamJr: has joined #ruby
[21:34:27] mwlang: has joined #ruby
[21:34:51] mwlang: what was that mentor???s website that came up in this morning???s (UGT) discussion?
[21:35:05] sinkensa_: has joined #ruby
[21:35:07] hahuang61: has joined #ruby
[21:35:12] jhass: codementor.io I think?
[21:35:27] mwlang: jhass: that???s it. thanks!
[21:35:37] centrx: has joined #ruby
[21:36:40] qwertme: has joined #ruby
[21:36:54] veinofstars: has joined #ruby
[21:37:22] mr_blue: How to get the output "b cannot be nil" from this expression ? : a, b, c = [1, nil, 2]; [a, b, c].each do |p| raise Exception.new("#{p} cannot be nil") if p.nil? end
[21:37:39] veinofstars: i have a variable, which can be either nil or a hash. Is there a cleaner way to fetch a key than (foo[???bar???] rescue nil) ?
[21:37:50] veinofstars: i???d prefer to do something like foo.try(:get, ???bar???)
[21:38:04] veinofstars: but i need to somehow access [] as a method
[21:38:29] veinofstars: oh wait, i can do foo.try(:[], ???bar')
[21:38:54] Ox0dea: mr_blue: So you don't actually want to raise an exception, right?
[21:39:37] Ox0dea: veinofstars: Hash#fetch would be better.
[21:39:44] toretore: mr_blue: it's not possible
[21:39:48] Ox0dea: Oh, never mind.
[21:40:00] Ox0dea: veinofstars: Forgot the nil part.
[21:40:08] baweaver: has joined #ruby
[21:41:04] Ox0dea: toretore: I think hacking about with local_variables would "work".
[21:41:54] nonparfumee: has joined #ruby
[21:41:55] mr_blue: toretore: really ? It's the first time I read 'it's not possible in ruby'
[21:42:16] nfk: has joined #ruby
[21:42:20] toretore: mr_blue: explain what you're trying to achieve instead
[21:42:25] mistermocha: has joined #ruby
[21:42:37] bgmarx: has joined #ruby
[21:42:51] jackjackdripper: has joined #ruby
[21:42:59] ramfjord: has joined #ruby
[21:43:21] zenspider: mr_blue: it's possible, but stupid and probably the wrong way to go about it
[21:44:23] mr_blue: toretore: I want to raise an exception in a constructor when trying to create the instance with nil params
[21:44:24] mleung: has joined #ruby
[21:44:59] emilkarl: has joined #ruby
[21:45:05] nobitanobi: has joined #ruby
[21:45:31] Ox0dea: mr_blue: raise unless params.all?
[21:45:38] hal_9000_: reflection doesn???t know about parameter names
[21:46:02] hal_9000_: Ox0dea: i think he wants to use the parameter name in the message
[21:46:07] Ox0dea: hal_9000_: RubyVM::InstructionSequence.of makes it possible, but it's really hairy.
[21:46:17] mr_blue: hal_9000_: exacly
[21:46:37] mc_fail: has joined #ruby
[21:46:51] hal_9000_: the easiest way to do that would be to manually map parameters to their names, perhaps with an array
[21:46:52] dfinninger: has joined #ruby
[21:47:05] Ox0dea: Or just use keyword arguments?
[21:47:15] zenspider: >> def f a, b, c; p local_variables; end; f nil, nil, nil
[21:47:17] ruboto: zenspider # => [:a, :b, :c] ...check link for more (https://eval.in/380203)
[21:47:30] zenspider: again... this is _DUMB_ and the wrong way to go about this
[21:47:53] toretore: mr_blue: do you have some code to paste?
[21:48:25] zenspider: argument checks are usually a design smell to begin with. but when they're necessary, it is best to just spell it out
[21:48:46] zenspider: raise ArgumentError "required_param may not be nil" if required_param.nil?
[21:48:50] zenspider: oops, comma
[21:48:51] centrx: has joined #ruby
[21:49:00] zenspider: there's nothing wrong with that code.
[21:49:04] toretore: mr_blue: the way you're describing the problem, in terms of what you think should be the solution instead of what the actual problem is, make me want to know more before i can give any advice
[21:49:06] pipework: zenspider: Do you prefer docs for that?
[21:49:06] zenspider: (other than a missing comma)
[21:49:29] hal_9000_: zenspider speaks truth
[21:49:43] zenspider: pipework: if you mean javadoc style doco, no. I prefer simple doco, simple code, and GIGO to rule
[21:50:11] pipework: zenspider: I like making nice things along the way though.
[21:50:16] mr_blue: toretore: my looks like something like that: def class A; def initialize(a, b, c); raise "#{the param} cannot be nil" if one of the params is nil; end; end
[21:50:18] diegoviola: why would ever anyone have to parse ls for a git commit / push?
[21:50:32] zenspider: >> required_param = nil; required_param.do_something_important
[21:50:33] toretore: mr_blue: real code, on gist.github.com, please
[21:50:33] ruboto: zenspider # => undefined method `do_something_important' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/380204)
[21:50:41] zenspider: hey look. totally obvious what went wrong...
[21:50:42] nizmow: has joined #ruby
[21:50:49] Ox0dea: mr_blue: What are a, b, and c?
[21:51:02] Ox0dea: Could you give them names that better express their purpose?
[21:51:27] zenspider: you've spent more time discussing a crappy solution instead of writing 3 straight-forward lines that say exactly what's going on.
[21:51:44] zenspider: you could have shipped by now
[21:52:23] mr_blue: Ox0dea: a is repo object, b is a listener object, and c is a config object
[21:53:20] Ox0dea: >> def foo(a, b, c) "#{local_variables.find { |v| eval(v.to_s).nil? }} cannot be nil!" end; foo(1, nil, 2)
[21:53:21] ruboto: Ox0dea # => "b cannot be nil!" (https://eval.in/380205)
[21:53:26] Ox0dea: Well, there's your foot gun; be careful.
[21:54:18] blackmesa: has joined #ruby
[21:55:19] mr_blue: ruboto: thanks for your solution. But what that firt 'p' in 'p begin' ?
[21:55:43] jhass: isn't there local_variable_get ?
[21:55:45] Pupeno_: has joined #ruby
[21:56:33] jhass: mh, actually probably for good
[21:56:44] iamninja: has joined #ruby
[21:57:02] jhass: so s/be careful/be sane and never touch it/
[21:57:07] dagda1: has joined #ruby
[21:57:13] FernandoBasso: has joined #ruby
[21:57:15] apofis: has joined #ruby
[21:57:24] drocsid: has joined #ruby
[21:57:32] aaeron: has joined #ruby
[21:57:45] drocsid: can I get the stdout from a program when using system ?
[21:58:02] jhass: drocsid: yes, but why not use ` then?
[21:58:04] bin_005_q: has joined #ruby
[21:58:25] havenwood: drocsid: Do you want stdout separate from stderr, or what do you mean?
[21:58:27] baweaver: has joined #ruby
[21:58:30] Ox0dea: jhass: Fiddle wouldn't be part of the standard library if Ruby weren't a programming language for consenting adults.
[21:58:34] wallerdev: has joined #ruby
[21:58:40] zenspider: I can't say enough how dumb/bad that is.... but it is obvious that mr_blue isn't interested in reason, so I'm done
[21:58:52] damir_: has joined #ruby
[21:59:15] drocsid: just the std out is fine, but I will take both if that's all I can get.
[21:59:28] zenspider: fiddle? consent? huh?
[21:59:34] Ox0dea: drocsid: foo = `ls` or %x(ls)
[21:59:50] Ox0dea: zenspider: I was being almost entirely facetious.
[21:59:52] havenwood: drocsid: Take a look at Open3 for a variety of options with stdout and stderr separate or merged: http://ruby-doc.org/stdlib/libdoc/open3/rdoc/Open3.html
[22:00:17] zenspider: or open4 if you need it
[22:00:19] zenspider: that's a gem tho
[22:00:41] Ox0dea: Fiddle does let you unfreeze an object by flipping a single bit, though.
[22:00:45] drocsid: Ok, just wondering what system itself supported. Guess I could look this up also.
[22:01:03] pothibo: has joined #ruby
[22:01:08] Ox0dea: drocsid: Why the artificial limitation on which features of the language to use?
[22:02:23] nobitanobi: has joined #ruby
[22:02:44] Scroff: has joined #ruby
[22:02:48] zotherstupidguy: has joined #ruby
[22:04:06] x1337807x: has joined #ruby
[22:06:10] mary5030_: has joined #ruby
[22:06:10] momomomomo_: has joined #ruby
[22:06:14] bgmarx: has joined #ruby
[22:06:28] zenguy_pc: has joined #ruby
[22:06:32] mleung: has joined #ruby
[22:07:22] edwinvdg_: has joined #ruby
[22:08:40] MatthewsFace: has joined #ruby
[22:08:54] Pupeno: has joined #ruby
[22:09:12] mleung: has joined #ruby
[22:10:10] Matthews_: has joined #ruby
[22:10:17] mdavid613: has joined #ruby
[22:10:56] yqt: has joined #ruby
[22:11:22] mdavid613: has left #ruby: ()
[22:11:46] bronson: has joined #ruby
[22:11:55] duderonomy: hey ya'll!! When using Ruby, what are my options for executing commands on a Linux console. When I access these little CPUs as a User, I use telnet to get shell access. Thx in advance.
[22:12:45] wallerdev: did you ssh into the machine and are running ruby on that machine?
[22:13:00] ponga: if that's solved, "ruby mycode.rb"
[22:13:00] wallerdev: or are you running ruby on your local machine and want to ssh from within ruby to the other box
[22:13:53] ponga: i think he's asking for the former case
[22:14:00] ponga: duderonomy: hello
[22:14:16] duderonomy: Actually, I am running Ruby on a usual host like Ubuntu/RH/Gentoo. I'd like to automate what I do as a User. Which is: telnet into IP of little board running Linux and then execute commands on the shell
[22:14:49] dfockler: duderonomy: you can use backticks like `subcommand`, or exec, or popen
[22:14:56] dfockler: they all do a little bit different things
[22:14:59] duderonomy: I had a friend suggest I use the automation features in minicom
[22:15:03] freerobby: has joined #ruby
[22:15:32] baweaver: Net::Telnet and Net::SSH
[22:15:43] duderonomy: Well, ruby is not running on the little Linux host (low ARM based CPU)
[22:15:58] duderonomy: thanks baweaver. nice to talk again
[22:16:16] mc_fail: has joined #ruby
[22:16:19] zacstewart: has joined #ruby
[22:16:20] baweaver: Those two run on your local machine
[22:16:33] baweaver: and execute commands on the remote
[22:17:10] baweaver: source: I used to use both to automate a few thousand wireless antennas running embedded linux
[22:17:11] keernel: has joined #ruby
[22:17:17] jenrzzz: has joined #ruby
[22:17:24] yfeldblum: has joined #ruby
[22:17:36] duderonomy: yes... baweaver my response was out of order and going to dfockler. I gotta get better at irc
[22:17:42] Axy: has joined #ruby
[22:17:42] Axy: has joined #ruby
[22:18:00] duderonomy: Perfect. I will put my time into those libs!
[22:18:06] symbol: has joined #ruby
[22:18:53] JoshL: has joined #ruby
[22:18:54] dfockler: yeah never use Net::Telnet but if you are just telnetting that should work
[22:19:07] baweaver: ACTION shrugs
[22:19:12] baweaver: It scratched an itch
[22:19:12] dfockler: sorry I've never used Net::Telnet
[22:20:45] mleung: has joined #ruby
[22:20:54] Ox0dea: ponga: Where's rubonga?
[22:21:21] ponga: Ox0dea: actually i ran the code without eval part but just ping
[22:21:28] ponga: but bot is not coming
[22:21:36] ponga: he's missing
[22:21:43] Ox0dea: How do you mean?
[22:21:51] MatthewsFace: has joined #ruby
[22:22:01] ponga: um i ran the code, but bot didn't appear
[22:22:13] duderonomy: baweaver: If you recall any helpful blog pages or tuts that were aligned with those goals (nearly like mine) then I'd be grateful to get a link (if u happen to recall it)
[22:23:12] ogpastaling: has joined #ruby
[22:23:25] pinga: has joined #ruby
[22:23:28] al2o3-cr: has joined #ruby
[22:23:36] baweaver: https://github.com/baweaver/ubiquiti - old code
[22:23:44] nofxx: has joined #ruby
[22:23:46] baweaver: duderonomy: but should provide some insight
[22:23:47] ponga: damn it he's mute
[22:23:50] ponga: Ox0dea: can you fix him
[22:24:26] pinga: has joined #ruby
[22:24:36] Ox0dea: ponga: Did you have to authenticate with NickServ to join this channel?
[22:24:45] ponga: damn it he's stupid like me
[22:25:09] ponga: Ox0dea: http://pastie.org/10236341
[22:25:20] ponga: please look at the code and fix the poor mute lad
[22:25:23] gamename: has joined #ruby
[22:25:28] bkxd: has joined #ruby
[22:25:47] Ox0dea: This code is atrocious.
[22:25:57] ponga: please i have no knowledge
[22:26:03] apofis: has joined #ruby
[22:26:13] pothibo: has joined #ruby
[22:26:22] ponga: i just blindly edited your code with like 3 sec effot
[22:26:55] jhass: Ox0dea: have fun explaining the IRC protocol :P
[22:27:23] ponga: cool i always wanted to learn IRC protocol!
[22:27:41] rubonga: has joined #ruby
[22:27:57] ponga: hi rubonga
[22:28:08] Ox0dea: All I did was change the nick...
[22:28:17] _blizzy_: has joined #ruby
[22:28:24] ponga: damn it he's bad as pinga then
[22:28:32] Ox0dea: I used my original code, though: https://gist.github.com/0x0dea/9cd62f3a58cd52de87a4
[22:28:34] yfeldblum: has joined #ruby
[22:28:48] Ox0dea: The PING/PONG clause isn't arbitrary.
[22:28:55] ponga: isn't it too dangerous
[22:28:59] ruboto: jhass # => exit (SystemExit) (https://eval.in/380228)
[22:29:06] mdz_: has joined #ruby
[22:29:06] Ox0dea: Very dangerous.
[22:29:09] Ox0dea: jhass was kind.
[22:29:16] ponga: look jhass killed him for you
[22:29:40] cj: how do I dump to STDOUT the contents of an associative array node ?
[22:30:13] Ox0dea: cj: Looking to ditch PHP, eh?
[22:30:20] ponga: i see that people here expectations... DO NOT have expectations from me
[22:30:26] ponga: but i will learn what i need
[22:30:30] jhass: cj: p hash["foo"]
[22:30:39] yfeldblum: has joined #ruby
[22:31:04] cj: Ox0dea: no, this is how I talk to PHP people. are you telling me ruby is not php?
[22:31:06] cj: ACTION ducks
[22:31:26] ponga: even i know he needed to duck
[22:31:27] commondream: has joined #ruby
[22:31:30] armyriad: has joined #ruby
[22:31:37] Ox0dea: cj: Several of your choices of word belie a familiarity with PHP is all.
[22:31:58] jhass: cj: we're working on it https://github.com/tenderlove/phuby
[22:32:01] cj: I'm a bit of a know-it-all
[22:32:07] endorphine_: has joined #ruby
[22:32:14] apofis_: has joined #ruby
[22:32:21] ponga: jhass: omg the name is too cute
[22:32:40] cj: jhass: that's nice, but I would go with ironruby and IronPHP if I were going to try to get the two to play nice together.
[22:32:50] mc_fail: has joined #ruby
[22:33:24] jaycee: has joined #ruby
[22:34:00] jhass: and I'd go to seek to do something else no matter the costs
[22:34:09] cj: Ox0dea: but to tell the truth, associative arry is a data structure familiar to all programming environments. it's just called things like "hash" in perl or "object" in javascript so that they don't have to use so many sylables :-)
[22:34:32] mleung: has joined #ruby
[22:34:44] jhass: ACTION still prefers map as the general tem
[22:34:46] cj: but anyway, I was asking for something more akin to perl's Data::Dumper module. Is there a way to convert a ruby hash object to JSON for instance?
[22:35:10] jhass: sure, just call to_json on it
[22:35:20] ponga: jhass: can you at least explain if / / in /PING (\S+)/ are part of irc protocol or is it ruby operator
[22:35:30] DynamicMetaFlow: has joined #ruby
[22:35:43] Ox0dea: ponga: /regular expression goes here/
[22:35:52] jhass: ponga: /foo/ is a regex literal, the / delimit it like " and ' delimit strings
[22:36:17] wildroman2: has joined #ruby
[22:36:23] arescorpio: has joined #ruby
[22:36:27] ponga: ACTION is on his way to find some irc protocol documents
[22:36:51] jhass: come back when you lost your sanity over trying to parse MODE
[22:37:18] momomomomo: has joined #ruby
[22:37:36] jhass: ponga: why don't you just use cinch?
[22:37:50] ponga: i want to learn
[22:38:01] Ox0dea: Also, TCPSocket == high performance.
[22:38:07] cj: jhass: yes. I do too ;-)
[22:38:26] cj: do I need a module installed to have access to the to_json method?
[22:38:33] ponga: shevy recommended me to read some irb sourcecode too but it was like asking a 4 yr baby to jump off the roof and fly
[22:38:41] jhass: ponga: write a bot in cinch first, then reimplement the underlying stuff. divide & conquer
[22:39:21] ponga: so my first goal is to make a bot named pinga and when he's been called he says ponga
[22:39:27] Xoro: has joined #ruby
[22:39:28] ponga: which then conviniently calls me too
[22:39:30] jhass: cj: ships in stdlib, just require "json"
[22:39:35] ponga: how convinient
[22:39:45] jhass: sounds good
[22:40:02] pyrex: has joined #ruby
[22:40:18] cj: and what's the string concat operator ? + ?
[22:40:32] Ox0dea: cj: It's circumstantial.
[22:40:41] jhass: cj: yes, but we prefer "string #{interpolation}" over "string" + concatenation
[22:40:53] Ox0dea: And sometimes shoveling.
[22:40:59] cj: Chef::Log.info("node: " + to_json( node ))
[22:41:02] jhass: interpolation can be almost any valid ruby expression
[22:41:16] cj: okay, so #{to_json(node)} ?
[22:41:28] jhass: "node: #{node.to_json}"
[22:41:31] Ox0dea: What kind of expression can't be interpolated?
[22:41:39] jhass: there was one but I forgot :P
[22:41:41] pengin: has joined #ruby
[22:41:51] cj: no semi-colons to end lines, no way to put multiple statements on the same line?
[22:42:23] jhass: cj: you can actually use semicolons, but don't, we only do in IRC for space efficiency
[22:42:28] jhass: just not worth it in real code
[22:43:03] jesterfraud_: has joined #ruby
[22:43:05] qwertme: has joined #ruby
[22:43:17] Ox0dea: >> "#{module WTF; class Wtf; def wtf; end end end}"
[22:43:18] ruboto: Ox0dea # => "wtf" (https://eval.in/380230)
[22:43:32] pothibo: has joined #ruby
[22:43:45] cj: okay, thanks. It looks like I can continue on my chef cookbook / recipe debugging now.
[22:43:54] jesterfraud_: Ox0dea: that's weird and awesome at the same time
[22:44:04] Ox0dea: I would really like to learn the identity of this non-interpolable fellow.
[22:44:46] GnuYawk: has joined #ruby
[22:44:59] jhass: >> def foo; end; "#{alias bar foo}"
[22:45:00] ruboto: jhass # => "" (https://eval.in/380231)
[22:45:07] jhass: mh, nope that wasn't it :P
[22:45:27] Dreamer3: has joined #ruby
[22:46:11] nikhgupta: has joined #ruby
[22:46:44] michaeldeol: has joined #ruby
[22:46:56] Ox0dea: Hm, I'm gonna try to interpolate Rails.
[22:46:57] krisquigley: has joined #ruby
[22:48:03] fgo: has joined #ruby
[22:48:41] miah: node.to_json (prepare for mega scroll)
[22:49:13] miah: simply running ohai locally i get 3400 lines of output =)
[22:49:19] ruboto: cj, Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting ???binding.pry??? directy in your source code. Visit https://pryrepl.org/ or get it now with gem install pry pry-doc
[22:49:23] miah: we did this the other day during some chef debugging as well
[22:49:27] bmurt: has joined #ruby
[22:49:30] jhass: cj: good for debugging
[22:49:53] ruboto: jesterfraud_ # => "(?-mix:ab)" (https://eval.in/380232)
[22:50:08] hakunin: has joined #ruby
[22:50:09] jesterfraud_: that's... useful?
[22:50:26] jhass: wrong question :P
[22:50:27] nikhgupta: has joined #ruby
[22:50:56] jesterfraud_: but it DOES blend^H^H^H^H^H interpolate
[22:51:00] jhass: I mean you saw a module definition interpolated and wonder that regexp works?
[22:51:12] mwlang: phuby!? what is the use case for that?
[22:51:21] jesterfraud_: you make a good point
[22:51:38] jesterfraud_: mwlang: didn't you ever see that tool that compiles ruby code to python scripts?
[22:51:39] mwlang: does this mean I can run WordPress with Ruby now?
[22:51:41] jhass: mwlang: not all things need one
[22:51:49] starfox_sf: has joined #ruby
[22:52:05] miah: i think if you feed ruby php a singularity would be created and we'd all die
[22:52:11] mwlang: jesterfraud_: nope, didn???t see that.
[22:52:14] dented42: has joined #ruby
[22:52:35] miah: like feeding a gremlin after midnight
[22:52:36] mwlang: miah: I???ll do it very, very far away.
[22:52:42] vyorkin2: has joined #ruby
[22:53:08] pipework: miah: Mogwai, you can't feed mogwai after midnight.
[22:53:14] jesterfraud_: mwlang: https://github.com/whymirror/unholy
[22:53:22] jesterfraud_: why_the_lucky_stiff wrote it, IIRC
[22:53:24] pipework: After they're gremlins, it doesn't really matter.
[22:53:43] idafyaid: has joined #ruby
[22:54:05] mwlang: maybe time to rename ???ruby??? to ???rosetta"
[22:54:21] mc_fail: has joined #ruby
[22:54:37] Ox0dea: mwlang: Universality is easy. Let's go coding!
[22:54:40] Ropeney: has joined #ruby
[22:54:46] miah: pipework: got me
[22:55:03] diegoviola: has joined #ruby
[22:56:30] mwlang: I don???t suppose there???s a peruby for Perl, eh?
[22:56:55] bkxd: has joined #ruby
[22:56:59] Ox0dea: Close enough? https://eval.in/private/d29c19795708bb
[22:57:07] mwlang: and let???s not forget Tcl while we???re at it.
[22:57:29] miah: lol. well. ruby has lots of perlisms
[22:57:43] miah: some amount of it probably works out of the box
[22:58:50] mwlang: miah: indeed???all those whacky variables and consts we pretty much ignore??? :-)
[22:58:51] jesterfraud_: If I were a perl purist, I'd make some comments about throwing "Perls before the swine"
[22:59:05] wildroman3: has joined #ruby
[22:59:08] Ox0dea: jesterfraud_: Keep it in /r/fatpeoplehate, if you'd be so kind.
[22:59:16] Radar: Paragraph by paragraph
[22:59:26] Radar: ARgh I had scrolled up :(
[23:00:03] jesterfraud_: Ox0dea: I get that reference
[23:02:48] nonparfumee: has joined #ruby
[23:03:27] Scroff: has joined #ruby
[23:07:18] JoshL: has joined #ruby
[23:08:42] phutchins: has joined #ruby
[23:08:49] Pumukel: has joined #ruby
[23:10:10] bricker1: has joined #ruby
[23:11:53] pepperbreath1: has joined #ruby
[23:12:47] willharrison: has joined #ruby
[23:14:41] porglezomp: has joined #ruby
[23:15:55] choke: has joined #ruby
[23:17:31] jenrzzz: has joined #ruby
[23:18:51] momomomomo: has joined #ruby
[23:19:04] choke: has joined #ruby
[23:19:55] someword: has joined #ruby
[23:20:49] Scriptonaut: has left #ruby: ()
[23:25:02] choke: has joined #ruby
[23:26:05] sung_: date_summary[get_date_from_ts_file(filename).match(/(\d{4})(\d{2})(\d{2})$/)[1..3].join('-')] = count_subs(filename)
[23:26:11] sung_: i know that ruby should never look like that
[23:26:14] sung_: so how should it look? :D
[23:26:31] hahuang65: has joined #ruby
[23:27:47] justintv90: has joined #ruby
[23:29:41] eam: sung_: use temporary variables, key = get_date_from_ts_file(filename).match(/(\d{4})(\d{2})(\d{2})$/)[1..3].join('-')
[23:29:57] eam: date_summary[key] = count_subs(filename)
[23:30:13] eam: repeat this process until it looks like the right amount of complexity per line
[23:32:22] freerobby: has joined #ruby
[23:32:30] segfalt: has joined #ruby
[23:33:45] nobitanobi: has joined #ruby
[23:34:53] nobitanobi: has joined #ruby
[23:35:55] Xiti: has joined #ruby
[23:37:07] white_magic: has joined #ruby
[23:38:00] white_magic: I just installed Ruby 2.2 on my windows machine and I'm trying to install Rails from commandline (ruby.exe).. but whatever I enter in the Ruby prompt, it just keeps asking for more input. How can I get it to evaluate the input for once?
[23:38:41] havenwood: white_magic: For an interactive REPL, try `irb` or to run a script inline: ruby -e "puts 'an example'"
[23:38:45] x1337807x: has joined #ruby
[23:39:26] x1337807x: has joined #ruby
[23:39:35] havenwood: white_magic: For a list of the ruby switches like -e see `ruby -h` or `man ruby` for more detail.
[23:39:48] havenwood: ?pry white_magic
[23:39:48] ruboto: white_magic, Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting ???binding.pry??? directy in your source code. Visit https://pryrepl.org/ or get it now with gem install pry pry-doc
[23:40:25] havenwood: white_magic: Instead of `irb`, which ships with Ruby you can use `pry`, which is a gem that can be installed with: gem install pry pry-doc
[23:41:03] Ox0dea: white_magic: Heed havenwood's advice, but the answer to your question is that the prompt is waiting for you to signal "end of file", which is Ctrl-Z in Windows.
[23:41:21] x1337807x: has joined #ruby
[23:41:23] white_magic: i'll first try with ctrl-z....
[23:41:29] LicHacker: has joined #ruby
[23:41:47] chipotle: has joined #ruby
[23:42:05] blue_deref: has joined #ruby
[23:42:39] luckyme: has joined #ruby
[23:43:19] enebo: has joined #ruby
[23:43:19] zotherstupidguy: has joined #ruby
[23:44:01] white_magic: ok, so i'm using IRB and I entered 'gem install rails' in the interactive prompt, and it doesn't know what 'rails' means
[23:45:31] fgo: has joined #ruby
[23:47:25] jpfuentes2: has joined #ruby
[23:47:39] white_magic: ok i'm stupid.. i'm supposed to run "gem(.EXE) install rails"
[23:48:17] workmad3: has joined #ruby
[23:48:37] havenwood: white_magic: Or from Pry to install and then require the gem you can: gem-install rails
[23:49:10] havenwood: white_magic: Pry is a gem like Rails is a gem.
[23:49:43] white_magic: im sure i'll get to know pry intimately but for now im keeping it most simple..
[23:50:36] chipotle: has joined #ruby
[23:51:23] zenguy_pc: has joined #ruby
[23:52:45] choke: has joined #ruby
[23:54:02] commondream: has joined #ruby
[23:55:04] dstarh: has joined #ruby
[23:55:16] nobitanobi: has joined #ruby
[23:56:35] bkxd: has joined #ruby
[23:59:23] sivoais: has joined #ruby