« Back to channel list

#ruby - 20 August 2015

« Back 1 day Forward 1 day »
[00:00:13] baweaver: >> '.filename' =~ /\..+/
[00:00:14] ruboto: baweaver # => 0 (https://eval.in/419284)
[00:00:22] baweaver: >> '.filename' =~ /^\..+/
[00:00:23] ruboto: baweaver # => 0 (https://eval.in/419285)
[00:00:28] baweaver: >> 'filename' =~ /^\..+/
[00:00:29] ruboto: baweaver # => nil (https://eval.in/419286)
[00:00:40] terrellt: http://rubular.com/
[00:00:50] baweaver: either that or
[00:00:52] baweaver: well they left
[00:01:09] baweaver: terrellt: referring to me or...
[00:01:56] baweaver: because I do know of rubular, but demonstrating on here is more useful to people asking questions.
[00:02:03] zenspider: sounds like you just want to use Dir.glob and let it do its job
[00:02:32] zenspider: >> Dir["*"]
[00:02:33] ruboto: zenspider # => ["input-f4859c18ed7a", "source-f4859c18ed7a", "output-f4859c18ed7a"] (https://eval.in/419287)
[00:02:47] baweaver: surprised that one worked
[00:02:49] zenspider: hee. haxored all the things
[00:03:02] zenspider: I'm such a black hat. or... something.
[00:03:03] volk: That's hacking right.
[00:03:05] baweaver: ACTION is not thinking clearly today
[00:03:10] nolbuk: has joined #ruby
[00:03:15] volk: zenspider, what is a blackhat?
[00:03:26] pabs: that's no bueno
[00:03:26] pabs: >> Dir['/etc/*']
[00:03:27] ruboto: pabs # => ["/etc/dpkg", "/etc/mtab", "/etc/inputrc", "/etc/fstab", "/etc/rc.local.orig", "/etc/magic.mime", "/ ...check link for more (https://eval.in/419288)
[00:03:29] volk: mruby-cli doesn't cut it ;)
[00:03:33] zenspider: its like a different distribution of linux
[00:03:48] blackmesa: has joined #ruby
[00:03:58] baweaver: http://bfy.tw/1Nx3
[00:04:08] volk: I think you'd actually be pretty good with security related affairs.
[00:04:08] baweaver: that's what a black hat hacker is
[00:04:11] blue_deref: has joined #ruby
[00:04:39] volk: You're just much too interested in ruby and its scene; you'd otherwise notice all the null pointer dereferences and off-by-one errors in the source.
[00:05:16] baweaver: slightly presumptuous talk there
[00:05:23] volk: baweaver, how so?
[00:05:28] barhum2013: has joined #ruby
[00:05:28] benlovell: has joined #ruby
[00:05:45] barhum2013: Hello, I am using time-warp in our tests. We have some raw SQL using ActiveRecord::Base.connection.execute in our rails app. That SQL query contains date_format(now(), '%Y-%m-01 04:00') is time-warp mocking the time here too?
[00:05:50] pabs: i wonder...
[00:05:51] barhum2013: has left #ruby: ()
[00:05:54] zenspider: I can't even tell if that was sarcastic. I think Poe's law has fucked me for all online interactions
[00:06:08] volk: zenspider, not at all.
[00:06:09] barhum2013: has joined #ruby
[00:06:10] pabs: >> File.read('/dev/zero')
[00:06:11] ruboto: pabs # => failed to allocate memory (NoMemoryError) ...check link for more (https://eval.in/419289)
[00:06:13] zenspider: barhum2013: highly doubt it
[00:06:14] Aria: zenspider: spread the FUD sauce on toast and eat it like the deliciousness it is.
[00:06:18] baweaver: zenspider: and if he hasn't, Murphy certainly has
[00:06:25] Aria: That is to say, specifics or it didn't happen
[00:06:42] zenspider: barhum2013: that now() is sql... so it'll execute on the db server side
[00:06:45] unholycrab: has joined #ruby
[00:07:01] mary5030: has joined #ruby
[00:07:23] barhum2013: zenspider: I thought so, anyway to mock time for sql?
[00:07:46] pabs: barhum2013: what database are you using? most time functions are database-specific
[00:07:55] unholycrab: i have ruby 2.0.0 installed via homebrew, and 2.2.0 installed via rbenv. when i type ruby -v, i get 2.2.0 (the rbenv ruby). but when i type bundle install, i see "Your Ruby version is 2.0.0, but your Gemfile specified 2.2.0"
[00:07:59] unholycrab: what am i missing?
[00:08:12] barhum2013: Did the rails channel move?
[00:08:14] zenspider: barhum2013: dunno. you'd prolly have to ask in #whateverdatabase. You can certainly do Time.now and pass that as a query parameter instead
[00:08:26] JFlash: has joined #ruby
[00:08:44] zenspider: unholycrab: head -1 $(which bundle)
[00:08:53] JFlash: hi, what's the channel for rails?
[00:09:00] CloCkWeRX: has joined #ruby
[00:09:02] zenspider: prolly installed via 2.0.0 so it is using your base ruby
[00:09:07] ruboto: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[00:09:08] baweaver: RubyOnRails
[00:09:08] zenspider: JFlash: nope. #rubyonrails
[00:09:20] JFlash: has left #ruby: ()
[00:09:23] noname: has joined #ruby
[00:09:27] barhum2013: zenspider: Thanks for the clarification!
[00:09:36] pabs: barhum2013: strings 'YYYY-MM-DD HH:MM:SS' format are implicitly coerced to timestamps in mysql
[00:09:36] unholycrab: zenspider: /usr/bin/bundle
[00:09:41] CloCkWeRX: has joined #ruby
[00:09:46] zenspider: good luck. I'd pass it
[00:09:54] zenspider: unholycrab: mmm... no. see my cmd again
[00:09:59] rakm: has joined #ruby
[00:10:10] unholycrab: ah yeah i see
[00:10:11] unholycrab: #!/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
[00:10:38] zenspider: so, activate 2.2.0, gem install bundler (or gem pristine if it is already)
[00:10:42] baweaver: bundler isn't installed for that version
[00:10:59] pontiki: most likely need a rbenv rehash
[00:12:08] zenspider: or switch around PATH so rbenv's bin dir is before /usr/bin ?
[00:12:14] zenspider: whatever... you're on the right track now
[00:12:15] bricker: Anybody know what the "idn" module is? https://github.com/xmpp4r/xmpp4r/blob/master/lib/xmpp4r/jid.rb#L17
[00:12:34] bricker: Oh this maybe? https://rubygems.org/gems/idn
[00:12:49] zenspider: bricker: it is an undeclared dependency... so walk away
[00:13:05] bricker: zenspider: I need the JIDs not to be downcased :(
[00:13:08] shevy: bricker hmm 10 years time span there
[00:13:12] zenspider: what a terrible project. :/
[00:13:18] bricker: you're telling me!
[00:13:30] zenspider: they don't declare a thing.
[00:13:57] zenspider: issues open back to 2013
[00:13:59] unholycrab: zenspider: bundle install doens't change it. maybe i need to uninstall the ruby 2.0.0 bundle
[00:14:12] shevy: bricker look how many deps it has https://github.com/xmpp4r/xmpp4r/blob/master/xmpp4r.gemspec ... 0!
[00:14:21] zenspider: unholycrab: GEM install bundler
[00:14:26] IceyEC: has joined #ruby
[00:14:32] unholycrab: sorry thats what i meant
[00:14:49] zenspider: then it is a pathing issue. start with pontiki's suggestion to `rbenv rehash`
[00:15:00] shevy: when I read idn, I thought libidn was meant http://ftp.gnu.org/gnu/libidn/libidn-1.30.tar.gz
[00:15:01] zenspider: then look at your PATH
[00:15:02] barhum2013: pabs: thanks!
[00:15:10] bricker: zenspider: I'm sure the gemspec was retroactively added on, this library was made in 2005
[00:15:28] unholycrab: ah. very nice!
[00:15:35] zenspider: bricker: iirc drbrain did some xmpp stuff
[00:15:37] unholycrab: thanks you zenspider and pontiki
[00:15:38] shevy: there were so many awful projects back then
[00:15:59] baweaver: there are always awful projects.
[00:16:01] zenspider: shevy: not MINE. obvs. :P
[00:16:03] pen: has joined #ruby
[00:16:12] shevy: zenspider well you were active
[00:16:29] shevy: but I mean projects like that one: http://www.erikveen.dds.nl/rubywebdialogs/
[00:16:31] bricker: The worst part is that I'm not even doing anything interesting with it... I need to login, send one dumb message, and then logout, so one of the clients gets a notification pop-up
[00:16:33] shevy: the idea is awesome
[00:16:39] baweaver: ACTION senses a get off my lawn moment coming.
[00:16:39] drbrain: I think I tried poked xmpp with a sharp stick once
[00:16:40] shevy: but the code is not so awesome :(
[00:17:03] shevy: haha a sharp stick
[00:17:03] zenspider: ooooh. shit. I'm getting acronyms mixed up. I was thinking of that ... ps3 streaming thingy.
[00:17:20] bmurt: has joined #ruby
[00:17:24] pabs: i used some ruby xmpp library forever ago, i can't remember the name though
[00:17:31] baweaver: should buy a PS4 </shameless-plug>
[00:17:32] iloverubynoob: has joined #ruby
[00:17:34] pabs: let me see if i can dig it up
[00:17:58] zenspider: tenderlove gave me his ps3 when he upgraded... before there were any games for ps4. THE FOOL!
[00:18:47] icharlie: has joined #ruby
[00:19:05] zenspider: um... meh. I highly doubt I'm ever spending $400-$600 (again) for some cheap brainless entertainment. I rarely, if ever, get my money's worth out of it
[00:19:07] pabs: guess it was xmpp4r
[00:19:23] baweaver: zenspider: $399
[00:19:26] radgeRayden: has joined #ruby
[00:20:02] zenspider: UPnP used soap4r + builder. all the other gems used UPnP + others
[00:20:21] zenspider: baweaver: I save a buck! what a deal!
[00:20:49] zenspider: diablo was a very very good buy, but even it wouldn't give me a time return worth the console
[00:20:58] shevy: zenspider I tried to find an inactive project of yours
[00:21:03] shevy: 2009 ... found https://rubygems.org/gems/enterprise ...
[00:21:19] bricker: sigh... /me installs libidn
[00:21:27] BraddPitt: how much time did you sink into it zenspider ?
[00:21:30] zenspider: (which is to say, I expect ~2 hours of entertainment for every $10-15 I spend)
[00:21:33] shevy: bricker really? it was libidn?
[00:21:52] bricker: shevy: yeah
[00:21:55] Aeyrix: i've spend maybe a couple hundred on TF2
[00:22:02] Aeyrix: sunk over 600hrs in so far
[00:22:05] zenspider: I call it "movie money" and its a great metric to see if you're being entertained properly or wasting time/money
[00:22:11] Aeyrix: plus another account which i bought tf2 for $20 and sunk a further 500hrs in
[00:22:21] bricker: Aeyrix: me too! but ... 6 years ago :)
[00:22:23] BraddPitt: I use the same metric zenspider
[00:22:38] BraddPitt: I just got an xbox one and Destiny should arrive tonight
[00:22:41] BraddPitt: I'll play a bit of that
[00:22:57] Aeyrix: bricker: I still play it to this day. :D
[00:23:04] zenspider: BraddPitt: I'm not sure... not THAT much
[00:23:18] baweaver: zenspider: Minecraft, kill the curve
[00:23:19] pontiki: i've never been interested in video games
[00:23:28] pontiki: but it's probably generational
[00:23:34] zenspider: baweaver: not for me
[00:23:41] Aeyrix: Video games are the only way I can unwind while still being awake to be honest.
[00:23:42] shevy: pontiki not even 25 years ago?
[00:23:51] Aeyrix: They allow me to temporarily put aside whatever I have to handle IRL
[00:23:57] Aeyrix: and just focus on getting a team to shoot another tema
[00:23:58] zenspider: boy did I derail this channel. :P
[00:24:05] Aeyrix: ACTION is team captain :^).
[00:24:05] BraddPitt: pontiki mind if I ask how old you are?
[00:24:09] pontiki: i liked a few arcade games
[00:24:17] BraddPitt: oh yeah, could be then
[00:24:19] zenspider: should I be worried that blackmesa just signed off?
[00:24:22] pontiki: i liked tempest
[00:24:27] shevy: pontiki lemmings 1 !
[00:24:31] baweaver: zenspider: but we're not on rails :P
[00:24:33] BraddPitt: Aeyrix what are you playing nowadays?
[00:24:37] bronson: has joined #ruby
[00:24:38] bubbys: has joined #ruby
[00:24:42] pontiki: not after one night of play, shevy, then i was just done with it
[00:24:45] Aeyrix: BraddPitt: TF2, Diablo 3, WoW.
[00:24:51] Aeyrix: Diablo 3 is on standby until the new season.
[00:24:52] BraddPitt: retail WoW?
[00:25:02] pontiki: in uni, i played a bit of adventure
[00:25:04] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[00:25:12] zenspider: ?ot zenspider
[00:25:12] ruboto: zenspider, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[00:25:18] pontiki: my first real program was a lunar lander game
[00:25:26] Aeyrix: >doesn't play video games
[00:25:27] Aeyrix: >writes them
[00:25:31] pontiki: are we holding up questions?
[00:25:43] zenspider: pontiki: oooh. I should write that up in my new graphics framework
[00:25:58] bongespob: has joined #ruby
[00:26:00] zenspider: pontiki: unless you're interested in taking a whack at it?
[00:26:01] jbw: has joined #ruby
[00:26:13] pontiki: zenspider: lunar lander?
[00:26:18] zenspider: yeah! that'd be fun
[00:26:21] zenspider: pontiki: https://github.com/zenspider/graphics
[00:26:31] pontiki: my game was written on a tty 33 in basic
[00:26:48] Aeyrix: * Right hand rule: 0 degrees is east, 90 is north, etc.
[00:26:49] pontiki: no graphics at all
[00:26:52] zenspider: it is ostensibly a "simulation framework" ... but that's all games are
[00:26:53] Aeyrix: absolutelyharam.mov
[00:27:05] volk: Aeyrix, is that ISIS porno?
[00:27:38] baweaver: ACTION readies ops signal
[00:27:49] roolo: has joined #ruby
[00:27:52] volk: baweaver, you're quite the whiner it would seem.
[00:27:55] Ropeney: has joined #ruby
[00:28:07] Aeyrix: memes detected
[00:28:09] pontiki: i may have other uses for that, zenspider. these days, visualizing data is more interesting to me than games
[00:28:31] volk: Is this because I asked zenspider to become the next Project-Zero? He has the dedication for research/discovery.
[00:28:34] zenspider: pontiki: I've done a fair amount of both in it.
[00:29:03] pontiki: it'd probably be nice to have something beside gnuplot
[00:29:34] pontiki: zenspider: https://www.youtube.com/watch?v=AzFYL7g_K7M
[00:30:12] bricker: Has Rubyforge been down for a while? http://rubyforge.org/ Or am I just having bad luck?
[00:30:21] zenspider: pontiki: I haven't worked out too much on the mathy graphics side of things yet
[00:30:26] baweaver: fairly sure they killed it a while back
[00:30:31] zenspider: my cafe network is too slow to watch that right now
[00:30:43] keen________: has joined #ruby
[00:30:48] baweaver: ACTION contemplates Seattle joke
[00:31:04] shevy: bricker yeah it died a while ago already
[00:31:10] hotpancakes: has joined #ruby
[00:31:16] bricker: was there any sort of archive effort?
[00:31:25] baweaver: internet archive probably has it.
[00:31:27] shevy: dunno... the active projects probably survived
[00:31:31] baweaver: most stuff just went to git
[00:31:33] nb_bez___: has joined #ruby
[00:31:34] pontiki: zenspider: nice review of a lunar lander program. sweet graphics.
[00:32:11] zenspider: I still need to port rtanque and asteroids over to my graphics lib
[00:32:43] pontiki: i did like asteroids
[00:32:58] pontiki: but even at that, my interest in playing goes away in about 3 minutes
[00:33:22] zenspider: its much more fun to code than play :)
[00:33:32] pontiki: more interesting puzzles to solve
[00:33:48] pontiki: and there's something to show at the end of the day
[00:33:56] zenspider: I implemented it when we did nand2tetris so my game was running in my language on my compiler on my chips
[00:34:01] zenspider: (simulated)
[00:34:05] devoldmx: has joined #ruby
[00:34:06] zenspider: it was sooo awesome
[00:34:15] baweaver: zenspider: FF I :D
[00:34:26] baweaver: If you really want a challenge
[00:34:57] zenspider: final fantasty? I always found those boring as fuck. had a roomie who played it for months on end.
[00:35:07] zenspider: worst feature for a game like that: cumulative timer
[00:35:16] baweaver: not everyone's cup of tea
[00:35:43] baweaver: Lights out / bomberman are fairly straightforward.
[00:35:58] lmoura: has joined #ruby
[00:36:18] zenspider: graphics isn't up to rubygame levels yet... but I hope to get it there w/o all the dead weight
[00:36:30] shevy: rubygame was abandoned :(
[00:36:32] zenspider: it's pretty caught up with gosu tho
[00:36:45] RobertBirnie: has joined #ruby
[00:36:54] zenspider: I would love more PRs and issues filed to point out where it is lacking
[00:37:03] zenspider: pong would be totally doable
[00:37:42] shevy: well it's fairly new at least as gem release, I don't think many people know about it yet
[00:37:57] zenspider: yup yup. still in beta technically
[00:38:12] zenspider: needs a couple more revs before I'm willing to cut a 1.0 final
[00:38:19] sevenseacat: has joined #ruby
[00:38:29] Oog: has joined #ruby
[00:38:32] northfurr: has joined #ruby
[00:38:41] zenspider: close tho! there's a beer && code tonight (wherein I drink whisky && code) so maybe even sooner!
[00:38:47] zenspider: ok. I need a big hunk of meat to eat.
[00:39:08] baweaver: zenspider: http://www.snorgtees.com/step-aside-coffee-this-is-a-job-for-alcohol
[00:43:52] noname: has joined #ruby
[00:46:57] iamninja: has joined #ruby
[00:47:42] paulcsmith: has joined #ruby
[00:48:47] chouhoul_: has joined #ruby
[00:49:33] charliesome: has joined #ruby
[00:50:39] hmsimha_: has joined #ruby
[00:51:55] akurilin: has joined #ruby
[00:52:50] Vile`: has joined #ruby
[00:53:25] jenrzzz: has joined #ruby
[00:54:14] techsethi: has joined #ruby
[00:57:49] jeadr: has joined #ruby
[01:00:19] decaff: has joined #ruby
[01:00:54] dimasg: has joined #ruby
[01:01:34] mistermocha: has joined #ruby
[01:02:09] Limix: has joined #ruby
[01:02:14] northfurr: has joined #ruby
[01:02:35] lannonbr: has joined #ruby
[01:06:04] veduardo: has joined #ruby
[01:06:06] charliesome: has joined #ruby
[01:09:00] davedev24: has joined #ruby
[01:11:13] atomical: has joined #ruby
[01:11:26] jbw: has joined #ruby
[01:11:59] neilnorthrop: has joined #ruby
[01:12:30] havenwood: has joined #ruby
[01:14:39] casadei_: has joined #ruby
[01:14:43] tkuchiki: has joined #ruby
[01:16:56] Rubie: has joined #ruby
[01:17:38] mary5030: has joined #ruby
[01:18:18] iloverubynoob: has joined #ruby
[01:20:11] hotpancakes: has joined #ruby
[01:20:20] slucx: has joined #ruby
[01:20:37] slucx: has left #ruby: ()
[01:20:52] blackmesa: has joined #ruby
[01:21:14] workmad3: has joined #ruby
[01:22:42] hydrozen: has joined #ruby
[01:23:19] rideh: has joined #ruby
[01:25:03] Azure: has joined #ruby
[01:25:32] bronson: has joined #ruby
[01:25:53] EminenceHC: has joined #ruby
[01:26:40] nitenq: has joined #ruby
[01:28:00] nitenq: Hi I am trying to run this ruby script : https://github.com/sensu/sensu-community-plugins/blob/master/plugins/windows/ram-usage-windows.rb who should work fine. But I have this error : undefined method `length' for nil:NilClass is it because of my ruby version ?
[01:29:45] bougyman: put a binding.pry on line 47
[01:30:22] AlexAltea: has joined #ruby
[01:30:23] bougyman: and see what temp_arr_1 (hate that name) looks like
[01:31:31] Ox0dea: nitenq: http://ss64.com/nt/syntax-performance-counters.html
[01:31:40] Ox0dea: That page indicates that you should be saying "MBytes", not "bytes", no?
[01:32:18] nitenq: Hum I have no idea I didn???t code it, let me try
[01:32:49] renderful: has joined #ruby
[01:33:36] nitenq: Ox0dea: doesn???t change anything. I am trying to use binding.pry
[01:33:53] ledestin: has joined #ruby
[01:34:49] devoldmx: has joined #ruby
[01:35:13] linuxboytoo: has joined #ruby
[01:35:34] Ox0dea: nitenq: You should run that `typeperf` command and ensure it's the second field of the third line that you actually want.
[01:35:40] bmurt: has joined #ruby
[01:36:04] Ox0dea: Your error indicates that such a value doesn't actually exist.
[01:36:41] icarus: has joined #ruby
[01:36:54] nux443: has joined #ruby
[01:37:05] Ludo-: has joined #ruby
[01:37:38] northfurr: has joined #ruby
[01:37:56] nitenq: Ox0dea: that???s very strange I have the exact same error on this one : https://github.com/sensu/sensu-community-plugins/blob/master/plugins/windows/windows-cpu-load-metrics.rb but they have all been tested
[01:40:23] hahuang61: has joined #ruby
[01:40:50] ivanskie: has joined #ruby
[01:41:06] bruno-: has joined #ruby
[01:41:45] dorei: has joined #ruby
[01:42:19] northfurr: has joined #ruby
[01:42:37] tkuchiki: has joined #ruby
[01:43:23] nitenq: Ox0dea: it gaves me no valid counters
[01:43:59] techsethi: has joined #ruby
[01:45:15] icharlie: has joined #ruby
[01:46:18] nitenq: Ox0dea: is it possible that it???s because my windows is not in english ?
[01:47:17] bb010g: has joined #ruby
[01:47:29] Ox0dea: nitenq: Yeah, I suppose that could be it.
[01:48:29] Ox0dea: When you run that `typeperf` command, do you not see the data in which you're interested?
[01:49:25] nitenq: Ox0dea: it always give me ???no valid counters"
[01:49:52] UtkarshRay: has joined #ruby
[01:51:33] shevy: hmm I see this:
[01:51:43] shevy: what is when there is no "case xyz"?
[01:51:45] hahuang61: has joined #ruby
[01:53:43] ybian: has joined #ruby
[01:53:47] nitenq: has left #ruby: ()
[01:54:27] nscheurich: has joined #ruby
[01:55:11] matugm: has joined #ruby
[01:55:11] matugm: has joined #ruby
[01:55:39] bricker: has joined #ruby
[01:55:44] vdamewood: has joined #ruby
[01:57:06] Ox0dea: shevy: Some consider it a slightly cleaner way to do if-else chains.
[01:57:48] Ox0dea: `case; when a == b; c; when d == e; f; end` == `if a == b; c; elsif d == e; f; end`
[01:58:32] dimasg: has joined #ruby
[01:58:38] MAQ: has joined #ruby
[01:58:48] sevenseacat: i got told off for doing that once
[01:59:03] sevenseacat: told it was too much inspired by php (was soon after i switched to ruby)
[01:59:43] devbug: has joined #ruby
[02:01:21] RegulationD: has joined #ruby
[02:01:32] shevy: code written by someone else here :(
[02:01:40] freerobby: has joined #ruby
[02:02:23] amclain: has joined #ruby
[02:03:38] bricker: I prefer it aesthetically but I don't think I'd do it a real app
[02:04:36] IceyEC: has joined #ruby
[02:05:53] lancetw: has joined #ruby
[02:06:04] mistermocha: has joined #ruby
[02:09:40] darwingr: has joined #ruby
[02:09:40] linuxboytoo: has joined #ruby
[02:10:31] nolbuk: has joined #ruby
[02:10:41] tmtwd: has joined #ruby
[02:11:27] mistermocha: has joined #ruby
[02:12:00] uxp: has joined #ruby
[02:12:42] imperator: has joined #ruby
[02:14:38] imperator: OT question, why is grep -rls giving me two result sets, one like foo/bar/baz and ./foo/bar/baz ?
[02:15:59] roolo: has joined #ruby
[02:16:52] pontiki: what are you giving for the file list?
[02:17:30] rideh: has joined #ruby
[02:18:13] NeverDie: has joined #ruby
[02:19:00] pontiki: i'm not seeing it here on OS/X
[02:19:01] imperator: oh, i think i see what i did
[02:19:03] iloverubynoob: has joined #ruby
[02:19:39] Ox0dea: What'd ya do?
[02:20:06] imperator: i put a '.' at the end
[02:20:06] pontiki: i only get the ./... type when i use .
[02:20:20] tkuchiki: has joined #ruby
[02:21:18] _blizzy_: has joined #ruby
[02:21:19] rideh: has joined #ruby
[02:21:31] milesforrest: has joined #ruby
[02:23:04] blackmesa: has joined #ruby
[02:24:38] barhum2013: has joined #ruby
[02:24:39] jbw: has joined #ruby
[02:27:49] icharlie: has joined #ruby
[02:29:29] _blizzy_: has joined #ruby
[02:29:39] lkba_: has joined #ruby
[02:31:14] bap1313: has joined #ruby
[02:34:47] shmilan: has joined #ruby
[02:34:57] jenrzzz: has joined #ruby
[02:37:55] charliesome: has joined #ruby
[02:39:23] chouhoulis: has joined #ruby
[02:40:17] chouhoulis: has joined #ruby
[02:41:24] bronson: has joined #ruby
[02:42:23] chohe: has joined #ruby
[02:42:24] nahtnam: has joined #ruby
[02:42:30] darkf: has joined #ruby
[02:43:28] choke: has joined #ruby
[02:44:27] baweaver: has joined #ruby
[02:47:48] iamninja: has joined #ruby
[02:48:16] Oog: has joined #ruby
[02:51:17] choke: has joined #ruby
[02:51:18] bongespob: has joined #ruby
[02:52:55] silkfox: has joined #ruby
[02:55:52] ivanskie: anyone know if ebook version is included when buying paperback "The Ruby way" from amazon?
[02:56:55] ChasedSpade: has joined #ruby
[02:59:33] paulcsmith: has joined #ruby
[02:59:48] sevenseacat: very unlikely, unless the publisher offers it with physical books like manning does.
[03:00:10] michael_mbp: has joined #ruby
[03:03:00] msnyon: has joined #ruby
[03:03:09] einarj: has joined #ruby
[03:03:39] bongespob: has joined #ruby
[03:08:19] cscheib: ivanskie: it's possible they offer a discounted ebook "upgrade", but probably not, as it's addison wesley
[03:09:34] Ox0dea: ivanskie: Why "The Ruby Way"?
[03:09:49] ivanskie: well i have the elequant rubyist..
[03:10:00] workmad3: has joined #ruby
[03:10:04] ivanskie: but i think I'd like to have this cook book almost like book
[03:10:17] ivanskie: with how to's to different things in ruby..
[03:10:24] braincrash: has joined #ruby
[03:10:33] ivanskie: why, would you recommend a different book instead?
[03:11:05] EminenceHC: has joined #ruby
[03:11:35] ChasedSpade: has joined #ruby
[03:11:45] Ox0dea: Eloquent Ruby and TWGR are both pretty great, but I was just curious.
[03:11:47] ivanskie: wait wtf am i talking about
[03:11:57] cscheib: the well grounded rubyist seems quite good, although a bit out of order... dives a bit too deep into how everything's an object before it teaches you flow control
[03:12:01] ivanskie: i dont have Eloquent Ruby.. i have TWGR
[03:12:28] ivanskie: i havent read it yet. I'm just a few dozen pages in or less.
[03:12:36] cscheib: TWGR is manning
[03:12:38] cscheib: so free ebook
[03:12:48] cscheib: there should be a piece of paper in the front
[03:12:56] ivanskie: it was nice. too bad had to wait for book to arrive before getting the pdf
[03:13:12] cscheib: if you purchased on their site, you didn't have to wait
[03:13:21] sevenseacat: well you didnt buy the ebook/pbook combo so :P
[03:13:26] ivanskie: didnt want to buy from their site.
[03:13:32] sevenseacat: then you have to wait
[03:13:34] hphan: has joined #ruby
[03:13:45] ivanskie: considering how many issues radar had with them..
[03:13:51] ivanskie: not that buying from amazon didn't end up paying them
[03:13:52] sevenseacat: whats that got to do with anything?
[03:14:18] cscheib: what issues do you have with manning?
[03:14:20] sevenseacat: you think you're punishing them by not buying from them directly or something?
[03:14:23] tmtwd: has joined #ruby
[03:14:40] Ox0dea: cscheib: The Patriots should've had a perfect season.
[03:14:41] RobertBirnie: has joined #ruby
[03:15:11] mecchio: has joined #ruby
[03:15:33] ivanskie: actually i just don't like buying from places where shipping is kinda iffy. yah all use same couriers but. still
[03:15:46] zenspider: rawr! meat was had. moving on to booze
[03:15:52] cscheib: I just bought TWGR from them a couple weeks ago, and the delivery was like 2 days later
[03:15:53] zenspider: who wants to help me write simulations and/or games ?
[03:16:03] cscheib: but it didn't really matter, since I got the ebook copy immediately...
[03:16:05] devoldmx: has joined #ruby
[03:16:10] ivanskie: I'm like deep in BC, canada. so Amazon's prime shipping from Richmond (lower mainland).. is pretty much overnight (almost)
[03:16:13] Coraline: zenspider: tempting
[03:16:15] cscheib: (which is the point of buying from their site in the first place)
[03:16:18] Ox0dea: :: > synchronizing Ballmer peaks...
[03:16:23] Coraline: But I'm due for bed fairly soon.
[03:16:31] pontiki: zenspider: sounds like a fun night: meat, booze, graphical simulations hacking :D
[03:16:33] zenspider: ivanskie: you're practically in seattle! you should come by on a tuesday
[03:16:41] ivanskie: whats on tuesday?
[03:16:47] mistermocha: has joined #ruby
[03:16:48] Limix: has joined #ruby
[03:16:50] pontiki: Ox0dea: ROFL!!
[03:16:51] zenspider: Coraline: bed schmed ... grab some whisky and hack
[03:17:18] sevenseacat: i havent bought any pbooks from manning, but plenty of ebooks.
[03:17:22] zenspider: scotch whisky in my case. you're welcome to some
[03:17:30] Coraline: Driving out to Madison Ruby tomorrow!
[03:17:38] sevenseacat: though now i get some for free, being a manning writer.
[03:17:42] zenspider: ivanskie: seattle.rb weekly meetings!
[03:17:43] Coraline: zenspider: what's your poison? I like Lagavulin quite a bit myself.
[03:17:43] ivanskie: zenspider i'm close to the oroville border than vancouver one..
[03:18:05] zenspider: Coraline: currently drinking balvanie 14y Caribbean cask
[03:18:15] Coraline: I've never tried that.
[03:18:18] ivanskie: oh damn. we don't have meetups here :( they have in vancouver and stuff.. but out here in okanagan.. bah. its quiet.
[03:18:41] ivanskie: actually there's a group of people in Vernon, but that's two hour drive one way.
[03:18:54] Coraline: There's a great place in Portland if you ever make it out there, called the Whisky Library. Floor-to-ceiling shelves of bottles, brass wheeled ladders for the servers to scurry up and down. Great selection.
[03:18:57] zenspider: ivanskie: we had a semiregular from chiliwack... can't be that much worse :)
[03:19:06] sevenseacat: actually i have a copy of TWGR on my shelf. i must have at some point.
[03:19:17] zenspider: tho, to be fair... THEY have a meeting now, so you should just go there
[03:19:21] ivanskie: how long would it take from Oroville washington?
[03:19:30] ivanskie: why am i asking.. holdon gonna google
[03:19:34] jph98: has joined #ruby
[03:19:40] zenspider: .... what's it called... frasier valley ruby brigade
[03:19:50] iloverubynoob: has joined #ruby
[03:20:11] ivanskie: zenspider to get to you, its a cool 5.5 hour drive on way.
[03:20:41] zenspider: seems worth it to me ;)
[03:20:57] pontiki: or start one where you are
[03:21:08] ivanskie: I moved up here a couple years ago from Vancouver (BC).. of course I went serious into ruby./rails only end of last year..
[03:21:16] bronson: has joined #ruby
[03:21:19] zenspider: frasier valley only looks about 2 hours away
[03:21:22] ivanskie: pontiki, i think i'll only be me.
[03:21:38] pontiki: teach others
[03:22:08] pontiki: become a power elite group of rubyists
[03:22:08] ivanskie: I googled, there were a couple kids a few years back who were doing rails programming here.. all that remains is their first project a site for career postings..
[03:22:20] pontiki: start the silicon rain forest
[03:22:31] ivanskie: yeah noob in this irc.. become a power elite rubyist in the small town here lolz
[03:22:47] pontiki: see one, do one, TEACH ONE
[03:22:49] pontiki: it is the only way
[03:22:52] sevenseacat: one day I'll do that. start a meetup group, and be all like 'im going to sit in this cafe working on this date, anyone is welcome to come join me'. see who does.
[03:22:53] CloCkWeRX: has joined #ruby
[03:23:21] ivanskie: my ultimate wishful thinking was that my wife would be even slightly interested in computers, nevermind programming...
[03:23:21] pontiki: you might be surprised
[03:23:25] zenspider: ivanskie: you learn ruby one line at a time
[03:23:53] pontiki: couple months ago, our monthly rails hack night was cancelled; i sent out a note "i'll be here" and a bunch of people showed up
[03:23:54] zenspider: sevenseacat: that's exactly what the frasier valley group did
[03:24:03] zenspider: as long as you meet regularly, they come
[03:24:17] zenspider: pontiki: where are you?
[03:24:21] ivanskie: my wife rants about vbacs, womens rights, well equal rights, and anything else she can rant about (short + red head + half irish half german)
[03:24:28] pontiki: presently in MSP
[03:24:36] pontiki: missing my beloved SF terribly, tho
[03:24:50] sevenseacat: now I just have to drum up the enthusiasm to have a regular working time at some place other than my house
[03:24:59] pontiki: funny thing is that there's a bigger ruby pile around here than out there
[03:25:01] zenspider: MSP? michigan state penitentiary?
[03:25:06] ivanskie: zenspider i guess i'll have to try.
[03:25:17] pontiki: minneapolis - st. paul
[03:25:31] zenspider: I like my version better.
[03:25:37] pontiki: i might, too
[03:25:38] zenspider: I'd love it if they had a ruby group
[03:25:52] zenspider: I haven't been to st paul, so I can't judge
[03:26:11] ivanskie: there should be a google hangout (or what have you tech) ruby meetup..
[03:26:14] pontiki: well, there are a lot of lovely people here; it's not all bad.
[03:26:39] ivanskie: i mean the only difference is drinking a drink, sitting in a nice environment thats not home, and enjoying a physical company lol
[03:26:40] pontiki: i hate winter
[03:26:47] ivanskie: dont go there yet.
[03:26:47] pontiki: and summers here can be awful
[03:26:51] ivanskie: i dont want winter yet
[03:27:03] pontiki: i p.much only like the end of sept/beginning of oct
[03:27:09] ivanskie: "say no to winter" sign
[03:27:12] sevenseacat: winter nearly finished here, yay
[03:27:27] keyvan: has joined #ruby
[03:27:35] sevenseacat: soon we'll back to our regularly scheduled 35C days from like oct-april
[03:27:45] ivanskie: sevenseacat you guys even get snow there, ever?
[03:28:00] pontiki: everyone here is already anticipating pumpkin everything, and looking forward to cooler weather
[03:28:03] ivanskie: like in your freezer maybe?
[03:28:09] pontiki: the problem with this place is it is too damn *wet*
[03:28:15] sevenseacat: ivanskie: not in my state.
[03:28:22] sevenseacat: (and its a very big state.)
[03:28:28] pontiki: and not like PNW wet, either
[03:28:34] pontiki: this is *icky* wet
[03:28:48] zenspider: "PNW... wet, but not *icky* wet"
[03:29:08] zenspider: sevenseacat: where are you?
[03:29:09] ivanskie: is there snow anywhere in australia at all? I want to say no, but i don't want to be ignorant at the same time..
[03:29:21] pontiki: crivens, i love walking through a summer rain storm in PDX or Seattle
[03:29:21] sevenseacat: zenspider: perth, australia
[03:29:38] zenspider: we don't have rain "storms"
[03:29:50] zenspider: hardly ever have anything the east coast calls "rain"
[03:30:01] zenspider: drizzle... sprinkle... mist... but rain? psh
[03:30:02] riskish: has joined #ruby
[03:30:13] No1Phan: has joined #ruby
[03:30:25] zenspider: I'm getting toasty, but not writing code yet
[03:30:26] pontiki: i do love the massive thunder and lightening storms we get here rolling in off the prairies
[03:30:56] pontiki: but i'm so in love with low humidity climates
[03:31:12] MAQ: has joined #ruby
[03:31:53] pen: has joined #ruby
[03:31:56] Radar: cscheib: re: issues with Manning: http://ryanbigg.com/2015/08/my-self-publishing-success-story/
[03:32:46] ivanskie: just found this: but apparently it never did anything http://www.meetup.com/HackerNestYLW/
[03:32:50] ivanskie: hour away from me
[03:33:11] pen: has joined #ruby
[03:33:18] ivanskie: but too mix mached
[03:33:45] ivanskie: not about ruby
[03:33:55] pontiki: i wouldn't call any Silicon Valley tech crowd very supportive
[03:34:27] pontiki: is there a different silicon valley?
[03:34:35] sevenseacat: Radar: you can update part of that when r4ia finally goes to press
[03:34:37] jacaballero: has joined #ruby
[03:34:43] Radar: sevenseacat: which part?
[03:34:46] pontiki: fricken LA had a more supportive tech community
[03:34:47] sevenseacat: which was supposed to be earlier this week.
[03:34:59] sevenseacat: " It's currently going through proofing through Manning's processes. And by "currently" I mean it's been in there since April. 3 months to proof and print a book seems a bit long in my opinion, but what can you do about it?"
[03:35:19] Radar: oh right.
[03:35:21] ivanskie: i have an awesome meetup name if i were to start one here.. soruby
[03:35:26] ivanskie: South Okanagan Ruby
[03:35:40] pontiki: "That's So Ruby!"
[03:36:14] framling: has joined #ruby
[03:36:16] sevenseacat: the leanpub integration with github and dropbox is pretty sweet.
[03:37:56] sevenseacat: it'd be even more freaking awesome if I could like just touch a build.txt or something and then it auto-build a new version of the book
[03:38:15] ivanskie: stupid facebook, it says "Please choose friends to add to your group" when trying to create a new group. i dont have any local friends who know any ruby at all, or care to know it...
[03:38:49] havenwood: has joined #ruby
[03:38:59] pontiki: can't you skip that?
[03:39:48] pontiki: man, failbook
[03:40:16] dimasg: has joined #ruby
[03:40:52] ivanskie: http://imgur.com/SKePP2V
[03:41:06] zenspider: Coraline: I _think_ one of our speaker dinners was there. I don't remember exactly... I got a bit toasted
[03:41:22] j_mcnally: has joined #ruby
[03:43:23] Oog: has joined #ruby
[03:44:09] zenspider: mmmm... I just took some canadian pain killers (w/ opiates--like god intended) with my booze... I suspect I weigh enough that it doesn't matter, but who knows?
[03:44:29] Coraline: zenspider: if you die I get your Scotch
[03:45:18] zenspider: theres about 6 hospitals w/in a mile. I think I'm good :)
[03:45:27] zenspider: mmm... 2 miles
[03:45:36] zenspider: man... rubysdl is really dragging me down
[03:45:47] zenspider: but FUCK I do NOT want to do a rewrite
[03:47:03] charliesome: has joined #ruby
[03:50:22] imperator: Coraline, where's it being held?
[03:52:14] Limix: has joined #ruby
[03:54:00] silkfox: has joined #ruby
[03:54:01] JamesDH: has joined #ruby
[03:54:08] hmsimha_: has joined #ruby
[03:54:59] gix: has joined #ruby
[03:56:47] akkad: has joined #ruby
[03:57:20] mistermocha: has joined #ruby
[03:58:23] Oog: has joined #ruby
[03:59:15] baweaver: zenspider: Scotch of choice?
[03:59:25] gokulnath: has joined #ruby
[04:00:21] jtdoncas: has joined #ruby
[04:01:51] zenspider: baweaver: mmm... dunno if I'm settled on one. I like the balvanie family. ummmm... oban... uh. other stuff. I'm a bit drunk
[04:02:10] zenspider: best thing about my diet... I'm a super CHEAP date
[04:02:26] vdamewood: has joined #ruby
[04:02:30] baweaver: Balvanie 14 Caribbean for me personally.
[04:02:35] arooni-mobile: has joined #ruby
[04:04:06] roolo: has joined #ruby
[04:04:12] bongespob: has joined #ruby
[04:07:04] zenspider: that's what I'm currently drinking
[04:07:23] zenspider: OK. what elseshould I implement?
[04:07:32] zenspider: I've got a half done version of karel the robot
[04:07:37] zenspider: and a half done version of logo
[04:07:41] zenspider: including repl!
[04:07:56] zenspider: but ... I dunno. I think I need more mathy/sciencey stuff
[04:08:12] jeanlinux: has joined #ruby
[04:08:42] icharlie: has joined #ruby
[04:09:39] zenspider: anyone want to convert my rubysdl_setup.sh script to work on various linuxum?
[04:10:17] zenspider: this: https://github.com/zenspider/graphics/blob/master/rubysdl_setup.sh
[04:10:29] zenspider: prolly need a windoze version too... but I just can't muster a fuck
[04:11:11] ahmetkapikiran: has joined #ruby
[04:13:08] nanoz: has joined #ruby
[04:13:22] hmsimha_: has joined #ruby
[04:16:08] ramfjord: has joined #ruby
[04:16:30] Maletor: has joined #ruby
[04:17:02] choke: has joined #ruby
[04:18:01] snockerton: has joined #ruby
[04:20:34] iloverubynoob: has joined #ruby
[04:20:49] charliesome: has joined #ruby
[04:20:51] bongespob: has joined #ruby
[04:22:07] bronson: has joined #ruby
[04:23:04] jeanlinux: has joined #ruby
[04:27:09] zenspider: you guys all suck
[04:27:18] happydad: has joined #ruby
[04:28:14] Oog: has joined #ruby
[04:29:17] Musashi007: has joined #ruby
[04:29:33] shevy: what kind of nick is that
[04:30:26] hydrozen: has joined #ruby
[04:30:57] zenspider: opiates + alcohol + keto == fucking awesome
[04:34:34] saddad: happydad: lol
[04:35:40] Oog: has joined #ruby
[04:36:39] zenspider: https://github.com/zenspider/graphics what else?
[04:37:05] Ox0dea: > mfw no mandelbrot demo
[04:37:23] zenspider: oooh. do that!
[04:37:37] zenspider: there's even mouse events so you could easily zoom in
[04:37:49] Ox0dea: Scroll wheel handling?
[04:38:06] zenspider: mmmm... maybe?
[04:38:13] zenspider: that's prolly just considered a button
[04:39:10] zenspider: there's SDL::Event::MouseButtonDown#button
[04:39:24] zenspider: I need to abstract everything starting with SDL away
[04:40:59] dimasg: has joined #ruby
[04:43:41] kies: has joined #ruby
[04:47:41] michael_mbp: has joined #ruby
[04:48:00] lxsameer: has joined #ruby
[04:48:55] iamninja: has joined #ruby
[04:49:51] qiukun: has joined #ruby
[04:52:14] zenspider: and the bozo bit is flipped...
[04:53:01] zenspider: Ox0dea: I would really like a PR w/ mandlebrot. If that type of math is your bag, are you willing to do it?
[04:53:40] zenspider: it _should_ be pretty clean/easy in this system. You can set pixels directly and I think I have an example of that somewhere...
[04:53:58] Ox0dea: zenspider: The math isn't particularly tricky, but I'd have to dig to make it purdy.
[04:54:20] zenspider: examples/vants.rb reads and writes pixels directly, tho it should probably be more abstracted
[04:54:54] zenspider: purdy is less my concern at this point, or... at least, I can clean it up later when it becomes a priority
[04:55:09] zenspider: more is to test its capabilities and prove that it can, or find where it can't and patch it up
[04:55:32] zenspider: tho, examples/math.rb, tho basic, should prove that you can do fairly arbitrary math visualization
[04:55:42] zenspider: it does need more elegant scaling
[04:55:51] astrobun_: has joined #ruby
[04:56:02] prateekp: has joined #ruby
[04:56:05] pawnbox: has joined #ruby
[04:58:13] Ox0dea: zenspider: https://en.wikipedia.org/wiki/Langton%27s_ant#Extension_to_multiple_colors
[04:58:28] Ox0dea: I didn't even realize I should've added dynamic scaling to my Langton's ant simulation until just now.
[04:58:33] Ox0dea: Will port to graphics.
[04:58:45] workmad3: has joined #ruby
[04:58:55] RobertBirnie: has joined #ruby
[04:59:19] zenspider: I dunno if vants.rb is _technically_ langston's ants or not
[04:59:23] zenspider: close at the very least
[04:59:43] zenspider: I stole the algorithm from netlogo, and probably didn't trace the attributions far enough
[04:59:56] j_mcnally: has joined #ruby
[04:59:59] Ox0dea: Langton's only got the one ant.
[05:00:07] zenspider: there's a LOT of neat shit in netlogo
[05:00:27] zenspider: eh. the fact that I did multiple ants is kinda tangental
[05:00:56] zenspider: it'd be neat to do a zoomed in version like the wikipedia demo
[05:00:59] Ox0dea: Langton's ant isn't random, though.
[05:02:44] zenspider: oooh. or turmites
[05:03:39] zenspider: ok... scotch && code is ending... need to pack up
[05:05:51] Jackneill: has joined #ruby
[05:07:44] freerobby: has joined #ruby
[05:08:11] AccordLTN: has joined #ruby
[05:08:56] pawnbox: has joined #ruby
[05:09:10] nanoz]: has joined #ruby
[05:09:21] jeanlinux: has joined #ruby
[05:12:56] Rinzlit: has joined #ruby
[05:13:57] pgatt: has joined #ruby
[05:14:15] charliesome: has joined #ruby
[05:15:02] User458764: has joined #ruby
[05:16:01] techsethi: has joined #ruby
[05:16:05] riotjones: has joined #ruby
[05:17:15] Musashi007: has joined #ruby
[05:21:20] iloverubynoob: has joined #ruby
[05:21:31] dling: has joined #ruby
[05:21:51] AlexRussia_: has joined #ruby
[05:21:57] jud: has joined #ruby
[05:23:31] RobertBirnie: has joined #ruby
[05:23:41] araujo: has joined #ruby
[05:24:08] EminenceHC: has joined #ruby
[05:25:34] rakm: has joined #ruby
[05:27:26] j_mcnally: has joined #ruby
[05:29:12] bluOxigen: has joined #ruby
[05:30:28] iateadonut: has joined #ruby
[05:30:46] nisstyre: has joined #ruby
[05:31:10] tkuchiki: has joined #ruby
[05:31:18] nisstyre: has joined #ruby
[05:34:58] ivanskie: so with that suggestion to start a ruby meetup around town... and coming up with name.. looks like I went a bit crazy with photoshop... http://imgur.com/I2L9pO4
[05:35:34] ivanskie: all that for a very likely possibility that no one else in two will ever show up
[05:36:01] ferhaty: has joined #ruby
[05:36:32] Musashi007: has joined #ruby
[05:36:59] r0x0rZ: has joined #ruby
[05:38:56] tagrudev: has joined #ruby
[05:40:08] tommnk: has joined #ruby
[05:40:15] kity: has joined #ruby
[05:41:18] tommnk: has left #ruby: ()
[05:41:41] kity: How to get output with : seperated in ruby? eg: dev:vet:tech then it should give output as dev vet tech
[05:42:21] sevenseacat: String#split will do what you want
[05:44:27] kity: sevenseacat:thanks ...Suppose I want dev:vet:tech then it should give output as dev:vet:tech
[05:45:20] kity: @sevenseacat:thanks ...Suppose I have dev:vet:tech then it should give output as it is dev:vet:tech
[05:45:31] sevenseacat: so whats the difference?
[05:45:41] riotjones: has joined #ruby
[05:46:41] aganov: has joined #ruby
[05:47:06] kity: @sevenseacat I want output as it is dev:vet:tech what should be code to print it as it is without colon seperated?
[05:47:42] crazydiamond: has joined #ruby
[05:47:44] volk: zenspider: How do you code with scotch? You probably wake up feeling like death.
[05:47:54] volk: Disgusting man.
[05:49:10] volk: sevenseacat, not you.
[05:49:22] sevenseacat: volk: doesn't mean you can just go insulting people.
[05:49:35] qiukun: has joined #ruby
[05:50:47] tkuchiki_: has joined #ruby
[05:51:09] Rubie: has joined #ruby
[05:51:19] ahmetkapikiran: has joined #ruby
[05:52:13] roolo: has joined #ruby
[05:53:08] jeadre: has joined #ruby
[05:53:32] Pupp3tm4st3r: has joined #ruby
[05:54:16] baweaver: ACTION codes with Scotch
[05:54:29] baweaver: ACTION is coding with scotch right now
[05:54:35] astrobun_: has joined #ruby
[05:55:33] tomnke: has joined #ruby
[05:56:03] silkfox: has joined #ruby
[05:57:17] yeticry: has joined #ruby
[05:57:42] chinmay_dd: has joined #ruby
[05:58:47] DifferentLambda: has joined #ruby
[05:58:56] tomnke: has left #ruby: ()
[05:59:04] dhjondoh: has joined #ruby
[06:01:18] mabjpj: has joined #ruby
[06:01:30] djbkd: has joined #ruby
[06:02:25] mabjpj: has left #ruby: ()
[06:02:30] cgfbr: has joined #ruby
[06:04:16] towski_: has joined #ruby
[06:05:57] certainty: sevenseacat: o/
[06:06:54] cornerma1: has joined #ruby
[06:09:20] JoshGlzBrk: has joined #ruby
[06:09:27] astrobun_: has joined #ruby
[06:13:39] Pupp3tm4st3r: has joined #ruby
[06:14:36] skade: has joined #ruby
[06:15:01] Musashi007: has joined #ruby
[06:15:41] DifferentLambda: has joined #ruby
[06:17:52] cgfbee: has joined #ruby
[06:17:55] jgt1: has joined #ruby
[06:20:02] yardenbar: has joined #ruby
[06:22:01] darkf_: has joined #ruby
[06:22:14] eGGsha: has joined #ruby
[06:22:52] hs366: has joined #ruby
[06:23:05] bronson: has joined #ruby
[06:23:36] skade: has joined #ruby
[06:23:59] CloCkWeRX: has joined #ruby
[06:25:04] amystephen: has joined #ruby
[06:25:34] Oog: has joined #ruby
[06:27:02] aderium: has joined #ruby
[06:27:52] roolo: has joined #ruby
[06:28:18] howdoi: has joined #ruby
[06:28:34] Oog: has joined #ruby
[06:31:43] episage: has joined #ruby
[06:33:52] last_staff: has joined #ruby
[06:33:57] arup_r: has joined #ruby
[06:35:42] michael_mbp: has joined #ruby
[06:36:12] cgfbee: has joined #ruby
[06:36:40] flegercovateam: has joined #ruby
[06:37:12] silkfox: has joined #ruby
[06:39:16] Macaveli: has joined #ruby
[06:41:00] flegercovateam: has left #ruby: ()
[06:41:20] flegercovateam: has joined #ruby
[06:41:50] choke: has joined #ruby
[06:44:30] Oog: has joined #ruby
[06:46:38] AlexAltea: has joined #ruby
[06:47:30] pawnbox: has joined #ruby
[06:47:33] workmad3: has joined #ruby
[06:47:53] ICantCook: Hello all. I need to serve a json string like this: http://paste.ofcode.org/SRVec8833zfP5N4KkTFWXR which I'm generating using ruby. Can anyone suggest a web server to host this on port 80?
[06:47:56] choke: has joined #ruby
[06:49:34] iamninja: has joined #ruby
[06:49:38] Macaveli: has joined #ruby
[06:49:38] stanc: has joined #ruby
[06:50:24] Iskarlar: has joined #ruby
[06:50:33] ahmetkapikiran: has joined #ruby
[06:50:48] SebastianThorn: ICantCook: sinatra
[06:51:06] ICantCook: SebastianThorn: Thanks :)
[06:53:33] Timba-as: has joined #ruby
[06:53:36] ICantCook: Perfect, taht solved it
[06:54:02] SebastianThorn: ICantCook: no problem :)
[06:54:04] tkuchiki: has joined #ruby
[06:54:23] JoshGlzBrk: has joined #ruby
[06:55:37] ta: has joined #ruby
[06:55:59] Aeyrix: University tbh
[06:56:03] atmosx: I want to issue a command into every directory of this tree: /media/es/data/doublemaplogs/nodes/0/indices/#{d}/#{s}/index/ where variable {d} is every directory there and {s} is dirs 0/ 1/ 2/ 3/ 4/
[06:56:22] atmosx: is there any easy way of achieving this, because I'm messing with Dir.ch and Dir.pwd and still not working properly.
[06:56:33] pawnbox: has joined #ruby
[07:00:31] juanpaucar: has joined #ruby
[07:01:04] greenride: has joined #ruby
[07:02:39] juanpaucar: has joined #ruby
[07:02:58] go|dfish: atmosx: Dir.glob('/media/es/data/doublemaplogs/nodes/0/indices/*/[0-4]/index/')
[07:03:18] araujo_: has joined #ruby
[07:04:35] atmosx: go|dfish: this will list the files... right?
[07:04:39] renanoronfle: has joined #ruby
[07:04:46] sinkensabe: has joined #ruby
[07:04:54] juanpauc_: has joined #ruby
[07:05:00] sinkensabe: has joined #ruby
[07:05:17] atmosx: I want to enter and execute a command, or at least make a list with all the full paths in order to be able to execute the cmd.
[07:05:18] araujo_: has joined #ruby
[07:06:11] go|dfish: atmosx: it will give you the paths to the directories you mentioned
[07:06:32] iloverubynoob: has joined #ruby
[07:06:33] Oog: has joined #ruby
[07:07:14] juanpaucar: has joined #ruby
[07:08:45] CloCkWeRX: has joined #ruby
[07:08:51] atmosx: go|dfish: wow, that was about to take me 20 lines of code :-P
[07:09:05] blackmesa: has joined #ruby
[07:09:27] CloCkWeRX: has joined #ruby
[07:09:30] juanpaucar: has joined #ruby
[07:09:42] Pupp3tm4st3r: has joined #ruby
[07:11:36] juanpaucar: has joined #ruby
[07:12:11] Meow-J: has joined #ruby
[07:12:55] Pupp3tm4st3r: has joined #ruby
[07:13:48] juanpauc_: has joined #ruby
[07:15:03] Oog: has joined #ruby
[07:15:16] pawnbox: has joined #ruby
[07:15:36] jeadre: has joined #ruby
[07:15:43] duncannz: has joined #ruby
[07:16:05] juanpauc_: has joined #ruby
[07:16:44] ndrei: has joined #ruby
[07:17:18] xhosae: has joined #ruby
[07:17:54] jph98: has joined #ruby
[07:18:10] skade: has joined #ruby
[07:18:15] jph98: has left #ruby: ()
[07:18:19] krz: has joined #ruby
[07:18:22] juanpaucar: has joined #ruby
[07:18:53] iloverubynoob: has joined #ruby
[07:19:43] CloCkWeRX: has joined #ruby
[07:20:38] juanpauc_: has joined #ruby
[07:21:52] devoldmx: has joined #ruby
[07:21:57] CloCkWeRX: has joined #ruby
[07:22:34] blackmesa: has joined #ruby
[07:22:53] juanpaucar: has joined #ruby
[07:23:34] jimms: has joined #ruby
[07:23:52] jgt1: has joined #ruby
[07:25:12] juanpauc_: has joined #ruby
[07:27:27] juanpauc_: has joined #ruby
[07:27:35] mutuma: has joined #ruby
[07:28:52] nanoz: has joined #ruby
[07:31:28] rdark: has joined #ruby
[07:32:07] marr: has joined #ruby
[07:32:44] zenspider: volk: keep your judgements to yourself. you're disgusting.
[07:33:10] sevenseacat: zenspider: thats one all, and enough :)
[07:33:52] Iskarlar: has joined #ruby
[07:34:16] zenspider: atmosx: `ri Dir.glob` it can do lots of neato things
[07:34:37] zenspider: I prefer Dir[] myself...
[07:35:16] zenspider: couple that with .each or .map and you're done
[07:35:19] apeiros: I like Dir.glob when I need a block
[07:35:30] apeiros: since Dir[] can't take a block directly itself
[07:36:16] zenspider: huh. I always thought they were aliases of each other...
[07:36:24] d0lph1n98: has joined #ruby
[07:36:27] zenspider: I still think I prefer each... but I'll think about it
[07:36:29] apeiros: but [] syntax can't take a block
[07:36:40] Cust0sLim3n: has joined #ruby
[07:36:50] zenspider: they have different doco. apparently [] implies 0 flags
[07:37:03] zenspider: tho I think I've used flags exactly once
[07:37:13] Motoservo: has joined #ruby
[07:37:14] zenspider: prolly for DOTMATCH
[07:37:50] zenspider: also [] can take an array??? wtf? who adds this stuff?
[07:38:20] silkfox: has joined #ruby
[07:38:51] yorickpeterse: morning children
[07:39:07] zenspider: who are you calling children? I'm older than you
[07:39:29] yorickpeterse: deep down in our hearts we're all 12
[07:39:46] iamninja: has joined #ruby
[07:39:56] juanpaucar: has joined #ruby
[07:40:08] livathinos: has joined #ruby
[07:40:08] rht: has joined #ruby
[07:40:26] sevenseacat: I dunno, I'm starting to get to the point where I'm older than I think I should be, so
[07:40:33] Oog: has joined #ruby
[07:41:20] jgt1: has joined #ruby
[07:41:21] zenspider: that's rough... how are your knees?
[07:41:45] sevenseacat: absolutely stuffed.
[07:42:16] juanpaucar: has joined #ruby
[07:42:19] pawnbox: has joined #ruby
[07:42:41] Oog: has joined #ruby
[07:43:27] iloverubynoob: has joined #ruby
[07:43:31] tkuchiki: has joined #ruby
[07:44:36] juanpauc_: has joined #ruby
[07:46:45] jeanlinux: has joined #ruby
[07:46:46] zenspider: sevenseacat: fix the knees... the rest will follow
[07:46:48] pawnbox: has joined #ruby
[07:46:50] juanpaucar: has joined #ruby
[07:47:15] eGGsha: has joined #ruby
[07:47:52] _Cronon_: has joined #ruby
[07:48:15] zenspider: !ban juanpaucar !T 1h please fix your connection
[07:48:16] ChanServ: +b juanpaucar!*@*
[07:48:17] ChanServ: ChanServ kicked juanpaucar: please fix your connection
[07:48:21] ohaibbq: has joined #ruby
[07:48:50] Motoservo: has joined #ruby
[07:49:05] juanpauc_: has joined #ruby
[07:49:05] ChanServ: +b *!*@181.39.194.178
[07:49:05] ChanServ: ChanServ kicked juanpauc_: please fix your connection
[07:50:08] Oog: has joined #ruby
[07:51:08] volk: Did someone call?
[07:51:27] volk: zenspider, why are you hurting my feelings?
[07:51:28] devbug: has joined #ruby
[07:52:27] zenspider: just for the record... between your wierd PMs and your crap in here... you're rubbing me wrong today.
[07:52:52] volk: zenspider, you have a history of being rubbed the wrong way Ryan.
[07:52:57] paradoja: has joined #ruby
[07:53:05] wasamasa: ACTION grabs popcorn
[07:53:16] zenspider: don't bother with popcorn... this won't last long
[07:53:34] volk: If you don't want me here, I'm fine with leaving.
[07:53:50] JimmyNeutron: has joined #ruby
[07:54:08] tobiasvl: /lastlog volk was a pretty weird read, and somehow I don't think it would be better with context
[07:54:37] skade: has joined #ruby
[07:54:51] zenspider: you're welcome here, either as a productive member or a silent one... but you're walking the fine line between normal and trolling
[07:55:05] volk: I haven't trolled you once, and you know that.
[07:55:22] demonlove: has joined #ruby
[07:55:26] sevenseacat: !mute volk that's quite enough.
[07:55:27] ruboto: +q volk!*@*
[07:55:27] ruboto: -o ruboto
[07:55:29] wasamasa: this did almost look like an episode of nerd dating
[07:55:37] zenspider: apparently I don't...
[07:55:50] zenspider: nerd dating... THAT makes me laugh
[07:55:50] wasamasa: "You know the rules and so do I!"
[07:56:09] volk: has left #ruby: ()
[07:56:19] wasamasa: except when it took a turn into the stalking direction
[07:56:37] zenspider: I've deleted the PMs... but they were creepy
[07:56:41] anisha: has joined #ruby
[07:57:17] devbug_: has joined #ruby
[07:57:22] zenspider: for the record:
[07:57:25] zenspider: <volk> Clap, nicely done. [00:56]
[07:57:25] zenspider: <zenspider> keep it up and it'll go from a mute to a ban
[07:57:26] zenspider: <volk> Nah, I think I'll just leave. I didn't troll anyone.
[07:57:28] zenspider: <volk> Because I said it was disgusting to drink and code.
[07:57:30] zenspider: <volk> You just want to pick at something really. [00:57]
[07:57:32] zenspider: <volk> No wonder why _why hates the society.
[07:57:41] zenspider: and now the /ignore
[07:57:50] tobiasvl: weird stuff
[07:57:54] darkf: has joined #ruby
[07:57:57] ruby-lang850: has joined #ruby
[07:58:01] sevenseacat: they're muted for now. let's just leave it at that.
[07:58:08] zenspider: someone decided they were a little tooooo familiar with me
[07:58:57] mikecmpbll: has joined #ruby
[07:59:37] tesuji: has joined #ruby
[08:00:07] krisquigley: has joined #ruby
[08:01:07] zenspider: man... I need to figure out how to test a graphics library... stupid off-by-one errors
[08:03:02] sevenseacat: I think my next personal ruby project will be built in lotusrb. its coming a long way from its initial release, when I couldn't make heads or tails of how to put anything together
[08:03:19] jenrzzz: has joined #ruby
[08:03:26] sevenseacat: http://lotusrb.org/
[08:03:57] joonty: has joined #ruby
[08:04:17] arup_r: has joined #ruby
[08:04:37] zenspider: don't think I've seen this before...
[08:04:41] ljarvis: I've been using it a bit too
[08:04:43] ljarvis: it's awesome
[08:05:38] zenspider: hrm... I wish it didn't use sequel... I run with -w and sequel is not warning free
[08:05:47] sevenseacat: I don't think I've run anything with -w ever lol
[08:06:00] zenspider: that makes you a BAD BAD PERSON. :P
[08:06:20] Thermatix: has joined #ruby
[08:06:21] ljarvis: you can swap out the ORM. But yeah it's easier to use sequel
[08:06:22] sevenseacat: it would actually be good if -w was on by default, I think
[08:06:32] zenspider: what's the migrations model?
[08:06:46] _blizzy_: has joined #ruby
[08:07:38] sevenseacat: not sure what you mean by that but they're similar to rails migrations i think
[08:07:40] bumbar_: has joined #ruby
[08:08:12] chouhoulis: has joined #ruby
[08:08:24] nuttermb: has joined #ruby
[08:10:15] Oog: has joined #ruby
[08:11:40] zenspider: this looks promising
[08:12:03] zenspider: it's a bit more datamappy than I prefer... but clean
[08:12:05] isxek: has joined #ruby
[08:12:23] zenspider: and not mentabatory in the direction that ... whatever datamapper is called these days went
[08:12:24] Iskarlar: has joined #ruby
[08:13:29] zenspider: these guys should talk to tenderlove about what he's planning w/ rack
[08:14:38] zenspider: s/guys/devs/
[08:15:00] _blizzy_: has joined #ruby
[08:15:13] _rgn: has joined #ruby
[08:15:50] _rgn: how do I open $EDITOR (vim) from a ruby script and grab the contents for the rest of the script?
[08:16:02] zenspider: "grab the contents" ?
[08:16:09] _rgn: whatever i wrote in the editor
[08:16:10] zenspider: meaning you want whatever they save?
[08:16:21] _rgn: yeah, that works
[08:16:31] zenspider: look at `ri Tempfile`
[08:16:39] kwd: has joined #ruby
[08:17:16] _rgn: surely there is a gem that does this?
[08:17:27] zenspider: it's... 4-6 lines long?
[08:17:56] zenspider: you're welcome to write said 4-6 lines and gem it up
[08:18:32] jiada: has joined #ruby
[08:18:52] zenspider: To be specific, use Tempfile.open w/ block form to get the 4-6 lines.
[08:19:48] _rgn: https://github.com/jpablobr/mp/blob/08adf436994c267d8dc4959181a25dc1734f5fd8/dotfiles/.irbrc.d/aorta.rb
[08:19:56] _rgn: looks like this is pretty close
[08:20:06] jeanlinux: has joined #ruby
[08:21:19] tkuchiki: has joined #ruby
[08:21:47] haxrbyte_: has joined #ruby
[08:22:00] _rgn: but Tempfile.open is probably better
[08:22:02] roolo: has joined #ruby
[08:22:08] zenspider: 9 lines... 2.25x what I said :P
[08:22:24] ishahnaz: has joined #ruby
[08:22:26] zenspider: _rgn: https://gist.github.com/0aa772280264b02c6470
[08:22:26] happydad: has joined #ruby
[08:23:16] zenspider: man... I never ever blow red unless I've been drinking. :(
[08:23:25] tkuchiki: has joined #ruby
[08:23:30] terlar: has joined #ruby
[08:23:42] maloik: We've got code on a model that has a rescue and ensure part, with ensure only containing self. This code is ran, but the `self` doesn't appear to be a return value, is that normal at all? I've changed it to `return self` and this actually works... https://gist.github.com/hannesfostie/09323efb6cc5d99bd24b
[08:23:53] jeanlinux: has joined #ruby
[08:23:54] dionysus69: has joined #ruby
[08:23:59] ljarvis: maloik: yes that's normal
[08:24:01] bronson: has joined #ruby
[08:24:13] yorickpeterse: IIRC you can't return from an ensure
[08:24:19] yorickpeterse: I could be wrong though
[08:24:20] zenspider: no, I don't think that's normal... ljarvis why do you?
[08:24:26] yorickpeterse: I _did_ just read "Catnip all" instead of "Catchup all"
[08:24:27] maloik: yorickpeterse: the return works
[08:24:48] zenspider: don't see why you can't return... but ANY expression in there should be the result of the method
[08:24:56] yorickpeterse: maloik: so then what's the problem?
[08:24:56] ljarvis: zenspider: because I know it doesn't work unless the return is explicit
[08:25:12] michael_mbp: has joined #ruby
[08:25:12] terlar: has joined #ruby
[08:25:17] ljarvis: only from experience
[08:25:19] maloik: yorickpeterse: no problem, other than that I don't think it's logical
[08:25:42] yorickpeterse: >> def foo; 10; ensure; 20; end; foo
[08:25:42] ruboto: yorickpeterse # => 10 (https://eval.in/419470)
[08:25:46] yorickpeterse: >> def foo; 10; ensure; return 20; end; foo
[08:25:47] ruboto: yorickpeterse # => 20 (https://eval.in/419471)
[08:25:52] maloik: weird, right?
[08:26:02] yorickpeterse: No that difference makes sense
[08:26:03] Rinzlit1: has joined #ruby
[08:26:15] maloik: well I guess in a way it does, it's just really not what I expected
[08:26:22] jiada: has joined #ruby
[08:26:27] maloik: we may as well remove the ensure and use tap in both parts of the method
[08:26:33] zenspider: huh. that's news to me
[08:26:36] yorickpeterse: ensure is always executed (given it's defined), but it doesn't automatically overwrite any return values
[08:26:52] zenspider: and I apparently thought it did
[08:26:54] zenspider: interesting
[08:27:04] maloik: yep... TIL :-)
[08:27:08] yorickpeterse: it's one of the trickier bits of Ruby
[08:27:13] ljarvis: decent reading http://blog.leshill.org/blog/2009/11/17/ensure-with-explicit-return.html
[08:27:33] zenspider: ok. yeah. I guess that makes sense now
[08:27:34] _rgn: system ENV["EDITOR"], '/path' does not do anything
[08:27:41] zenspider: not that I write code like this. :)
[08:27:49] zenspider: _rgn: wrong. it definitely does _something_
[08:27:56] Hounddog: has joined #ruby
[08:28:07] _rgn: returns nil
[08:28:35] zenspider: "Returns nil if command execution fails"
[08:28:40] zenspider: ri Kernel.system
[08:28:47] yorickpeterse: make sure EDITOR is actually set too
[08:28:52] zenspider: it both did something AND returned something
[08:29:08] _rgn: yorickpeterse: it is
[08:29:30] yorickpeterse: _rgn: https://gist.github.com/YorickPeterse/9119747666ca7f8c0535#file-update_userdata-rb-L29-L31
[08:29:35] yorickpeterse: that's how you can use it
[08:29:40] zenspider: it's because ruby objects to your arbitrary mix of single and double quotes
[08:30:08] _rgn: yorickpeterse: that should spawn editor?
[08:30:09] zenspider: don't do that... use the multi arg version of system
[08:30:23] _rgn: well that's my issue, it doesn't
[08:30:24] zenspider: that version isn't whitespace safe
[08:30:28] Oog: has joined #ruby
[08:30:33] r0x0rZ: how can i create alphabet by using range if I want to include last letter as well? what i did is `range = "a"..."z"` but when i iterate over it the last letter I get is y
[08:30:35] yorickpeterse: zenspider: true, but I don't have spaces in any of my paths
[08:30:38] maloik: would you say that this reads better? or should I just add a begin block and put `self` as the very last line of that method? https://gist.github.com/hannesfostie/09323efb6cc5d99bd24b
[08:30:44] yorickpeterse: but definitely adjust it to what you need
[08:30:58] yorickpeterse: r0x0rZ: use 2 dots vs 3
[08:31:02] zenspider: r0x0rZ: ... means exclusive
[08:31:03] yorickpeterse: r0x0rZ: so 'a'..'z'
[08:31:08] zenspider: r0x0rZ: .. means inclusive
[08:31:09] r0x0rZ: yorickpeterse: thanks
[08:31:40] zenspider: maloik: no tap
[08:31:43] zenspider: return is explict and clean
[08:31:46] zenspider: and cost free
[08:32:30] _rgn: problem seems to be the Tempfile.open...
[08:32:46] zenspider: mmm... no, my code works great
[08:32:58] maloik: yea but that blog post argues that it's a smell... I've just added a third version: https://gist.github.com/hannesfostie/09323efb6cc5d99bd24b
[08:33:11] ljarvis: third version is what I'd do
[08:33:28] _rgn: nope, it's the way path is passed to system
[08:33:34] ljarvis: (unless you dont want to return self if there's an error of course)
[08:33:34] zenspider: maloik: mmm... I'd still do the first version... but I'm prolly biased towards rescue/ensure at the def / end level
[08:33:59] ljarvis: right you do, so yeah I'd do the last
[08:34:04] _rgn: system "mvim -v #{f.path}" works
[08:34:05] ljarvis: yay for lots of opinions
[08:34:19] maloik: thanks everyone
[08:34:51] zenspider: I think I cringe everytime I see begin and it isn't exactly 5 lines long :)
[08:35:22] astrobun_: has joined #ruby
[08:35:47] zenspider: otherwise, refactor and move to method-level rescue/ensure
[08:36:17] workmad3: has joined #ruby
[08:37:10] blackmesa: has joined #ruby
[08:38:27] d2dchat: has joined #ruby
[08:38:35] fatsum: has joined #ruby
[08:38:38] zenspider: wait... why did they name that function aorta ???
[08:38:55] zenspider: and why didn't they use Tempfile and made their own instead?
[08:38:59] zenspider: so. many. questions.
[08:39:19] silkfox: has joined #ruby
[08:40:38] Ox0dea: zenspider: That method was written by _why.
[08:40:55] Ox0dea: > this little snippy marries a few of my true loves together
[08:40:58] ljarvis: then im confused why it's coherant
[08:41:02] Ox0dea: Love -> heart -> aorta.
[08:41:13] fatsum: (what does it mean when people on irc start sentences with '>' exactly?)
[08:41:22] Ox0dea: fatsum: First day on the Internet?
[08:41:46] ljarvis: fatsum: a quote, probably
[08:42:22] ljarvis: i say probably because lets be honest, there is no universal irc language
[08:42:27] fatsum: 3562: not really, i just don't hang around much on rizon and efnet.
[08:42:43] Ox0dea: Clever girl.
[08:43:04] fatsum: ljarvis, ah.
[08:43:11] arup_r: has joined #ruby
[08:43:20] Ox0dea: fatsum: It's not really an IRC-ism.
[08:43:31] zenspider: Ox0dea: all the more reason NOT to use it. _why wrote bad code on purpose
[08:43:37] Ox0dea: Fora, comment threads, even emails often use > to indicate quotation.
[08:44:00] fatsum: why would someone write bad code on purpose? (not a _why pun)
[08:44:09] jeadre: has joined #ruby
[08:44:25] Ox0dea: zenspider: Please clarify?
[08:44:28] fatsum: 3562: ah i see, i just didn't make sense of it in the context where you used it
[08:44:37] mutuma: has joined #ruby
[08:44:43] Ox0dea: fatsum: Yes, I suppose I should've posted my research.
[08:44:49] zenspider: fatsum: in _why's case, partially as an artistic statement. I also think it was because he didn't give a fuck (possibly also as an artistic statement)
[08:45:14] fatsum: 3562: sounds like a nontrivial issue.
[08:45:32] zeroDivisible: has joined #ruby
[08:45:45] abdoudjanifresh: has joined #ruby
[08:45:50] fatsum: zenspider: there isn't much artistry in bad code imo.
[08:45:52] ndrei: has joined #ruby
[08:45:55] zenspider: Ox0dea: I did? or elsewhere?
[08:46:11] zenspider: fatsum: that's debatable... and not one I'm going to engage in
[08:46:26] Ox0dea: fatsum: Please kindly provide your definition of art.
[08:46:28] zenspider: _why wrote code for a lot of different reasons... not all of them rational
[08:46:31] Diabolik: o/ zenspider
[08:46:40] [k-: has joined #ruby
[08:46:42] fatsum: 3562: no.
[08:46:56] Ox0dea: Is it that you lack one?
[08:47:07] [k-: Ox0dea!
[08:47:15] fatsum: 3562: not at all, i could; but it would end up being spammy and off topic
[08:47:47] Ox0dea: But what if I think Ruby itself constitutes art? Will that help us remain OT?
[08:47:56] Diabolik: can anyone recommend an easy way of creating an alias for the operators
[08:48:02] fatsum: 3562: if you don't know what art is when you see an exquisite solution to a problem written with elegance, then that's not my fault, but yours.
[08:48:02] Diabolik: MathExpression.calculate("2 PLUS 3")
[08:48:15] Ox0dea: Diabolik: #gsub?
[08:48:15] ChanServ: -bb juanpaucar!*@* *!*@181.39.194.178
[08:48:41] Ox0dea: fatsum: I suspect you know the constitution of the man you've presented.
[08:48:49] Diabolik: Ox0dea I thought about that but was wondering if there was an easier way of doing it
[08:48:58] fatsum: 3562: which man would that be?
[08:49:02] Ox0dea: Diabolik: Probably not. You want to make some global substitutions, no?
[08:49:05] [k-: Reverse polish notation
[08:49:10] Ox0dea: fatsum: The one of straw, of course.
[08:49:21] fatsum: begun to bore me.
[08:49:21] Ox0dea: "Obvious" art is obvious, duh.
[08:49:32] c0m0: has joined #ruby
[08:49:35] anker: has joined #ruby
[08:49:58] juanpaucar: has joined #ruby
[08:50:08] zenspider: what happens when said solution is INELEGANT in order to make a point?
[08:50:13] zenspider: is it still art?
[08:50:41] maloik: what is art? *scratches chin, looks into the void*
[08:50:52] fatsum: zenspider: that's debatable... and not one I'm going to engage in.
[08:50:59] zenspider: not all art is pretty. not all art is elegant.
[08:51:43] Ox0dea: Defending one's beliefs is hard. Let's go shopping.
[08:52:10] juanpauc_: has joined #ruby
[08:54:26] zenspider: Diabolik: do you want to write a parser + interpreter? or?
[08:54:30] juanpaucar: has joined #ruby
[08:56:02] mikecmpbll: has joined #ruby
[08:56:49] juanpauc_: has joined #ruby
[08:56:53] zenspider: I've certainly written bad code, on purpose, for the sake of art.
[08:56:54] Diabolik: zenspider I want to be able to do MathExpression.calculate("4 PLUS 7 MINUS 1 PLUS 4") from the cl
[08:57:04] zenspider: a url for one of them is above :)
[08:57:14] fatsum: zenspider: link?
[08:57:19] bright_day: has joined #ruby
[08:57:24] zenspider: https://rubygems.org/gems/enterprise
[08:57:45] zenspider: Diabolik: and you want it to return 14? or what?
[08:57:59] Diabolik: yes zenspider basically a calculator that accepts words as the operators
[08:58:06] _rgn: ruby's so weird, var/identifier case has impact on its visibility
[08:58:06] [k-: no MULTIPLY or anything else?
[08:58:17] [k-: Left to Right?
[08:58:17] Diabolik: [k- im going to add that in due course
[08:58:43] [k-: i was going to suggest tokens :/
[08:58:46] zenspider: then you can watch my talk "Let's write an interpreter!" plus michael jackson's (really) parser talk from mwrc . I reference it from my interpreter talk
[08:58:52] jimms: has joined #ruby
[08:58:58] juanpaucar: has joined #ruby
[08:59:19] Ox0dea: Michael and Jackson are both extremely common names.
[08:59:43] zenspider: it's a really good talk, even if I don't like PEGs
[09:00:16] zenspider: _rgn: not visibility, type
[09:00:24] Ox0dea: zenspider: But the puns! http://piumarta.com/software/peg/
[09:01:12] juanpaucar: has joined #ruby
[09:01:17] jeanlinux: has joined #ruby
[09:01:25] zenspider: I've not had reason to use Ian's peg library yet... other than to reverse engineer out his parser from cola
[09:01:39] mkarnebeek: has joined #ruby
[09:02:22] jeanlinux: has joined #ruby
[09:02:36] Ox0dea: Diabolik: As [k- suggested, you might consider starting by writing an RPN calculator.
[09:02:46] aiesec: has joined #ruby
[09:02:51] _rgn: i'm just writing a plain script, and noticed that simple `foo` won't be visible in functions, but FOO_BAR will, and also @foo but that has something to do with main fn implicitly being class
[09:02:59] Ox0dea: It'll be a gentler introduction to simpler parsing and interpretation.
[09:03:24] mkarnebeek: has left #ruby: ()
[09:03:25] Diabolik: even for something this simple?
[09:03:26] juanpauc_: has joined #ruby
[09:03:26] zenspider: _rgn: foo is a local variable. FOO_BAR is a constant. it's not the visibilty, it's the type.
[09:03:27] KnownSyntax: has joined #ruby
[09:03:40] Ox0dea: Diabolik: Well, do you intend to use eval or something?
[09:03:46] KnownSyntax: has joined #ruby
[09:03:50] zenspider: def, class, and module are all opaque scopes. locals don't penetrate them
[09:04:05] skade: has joined #ruby
[09:04:27] zenspider: "something this simple"?
[09:04:33] [k-: 52 TIMES OPEN 5 PLUS 50 CLOSE
[09:04:36] zenspider: how simple do you think it is?
[09:04:42] michael_mbp: has joined #ruby
[09:04:52] Diabolik: im just aliasing the operators no?
[09:04:58] pawnbox_: has joined #ruby
[09:05:01] zenspider: I dunno... ARE you?
[09:05:02] [k-: you have to deal with precedence and all that
[09:05:04] Diabolik: unless i have underestimated the problems
[09:05:07] Diabolik: yes zenspider
[09:05:10] Ox0dea: It seems you have.
[09:05:16] [k-: do not use eval!
[09:05:24] zenspider: you want to name a method "calculate" but not have it calculate?
[09:05:37] zenspider: fuck it! use eval!
[09:05:44] zenspider: gsub + eval... what can go wrong?
[09:05:45] juanpauc_: has joined #ruby
[09:05:53] [k-: your life
[09:05:55] yorickpeterse: eval has its use cases
[09:06:22] terlar: has joined #ruby
[09:07:33] blackmesa: has joined #ruby
[09:07:55] [k-: ruby's metaprogramming facilities almost obliterated eval
[09:07:59] _blizzy_: has joined #ruby
[09:08:01] juanpaucar: has joined #ruby
[09:08:11] michael_mbp: has joined #ruby
[09:08:45] chouhoulis: has joined #ruby
[09:09:08] dumdedum: has joined #ruby
[09:09:36] einarj: has joined #ruby
[09:10:18] juanpauc_: has joined #ruby
[09:10:41] ljarvis: pipe down heathen, eval ftw!
[09:11:07] ljarvis: in ur evals, defining ur methods
[09:11:44] ReK2: has joined #ruby
[09:11:45] ReK2: has joined #ruby
[09:11:57] Ox0dea: The standard library does it everywhere.
[09:12:31] juanpaucar: has joined #ruby
[09:13:10] Oog: has joined #ruby
[09:13:52] devoldmx: has joined #ruby
[09:14:18] ljarvis: stdlib is like my goto references for how not to write Ruby, ironic, really
[09:14:41] juanpaucar: has joined #ruby
[09:14:43] zenspider: or... how to write ruby 15+ years ago
[09:16:02] qiukun: has joined #ruby
[09:16:13] _blizzy_: has joined #ruby
[09:16:19] zenspider: MathExpression.calculate("4 TIMES OPEN 1 DIVIDE 1 MINUS 1 DIVIDE 3 PLUS 1 DIVIDE 5 MINUS 1 DIVIDE 7 ... CLOSE")
[09:16:30] ljarvis: good point
[09:17:00] ljarvis: zenspider: I hope you don't have an early start
[09:17:02] juanpauc_: has joined #ruby
[09:17:09] Violentr: has joined #ruby
[09:17:21] zenspider: eh. it's only 2 here :)
[09:18:46] kr3ssh: has joined #ruby
[09:19:22] juanpauc_: has joined #ruby
[09:19:48] Pupp3tm4st3r: has joined #ruby
[09:20:23] Kedare: has joined #ruby
[09:21:35] juanpaucar: has joined #ruby
[09:22:09] Oog: has joined #ruby
[09:23:12] Iskarlar: has joined #ruby
[09:23:13] happydad: has joined #ruby
[09:23:49] juanpauc_: has joined #ruby
[09:25:12] sameerynho: has joined #ruby
[09:26:04] charliesome: has joined #ruby
[09:26:06] juanpauc_: has joined #ruby
[09:26:28] mathie: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[09:28:17] juanpaucar: has joined #ruby
[09:30:37] juanpauc_: has joined #ruby
[09:30:56] skade: has joined #ruby
[09:34:24] mutuma: has joined #ruby
[09:35:45] Karpah: has joined #ruby
[09:36:57] blackmesa: has joined #ruby
[09:37:23] absolutejam: has joined #ruby
[09:40:18] silkfox: has joined #ruby
[09:40:45] sevenseacat: has joined #ruby
[09:40:51] DLSteve: has joined #ruby
[09:42:56] anandubajith: has joined #ruby
[09:43:07] Soda: has joined #ruby
[09:43:27] happydad: has joined #ruby
[09:44:16] sideshowcoder: has joined #ruby
[09:45:33] workmad3: has joined #ruby
[09:47:07] tkuchiki: has joined #ruby
[09:47:08] joonty: has joined #ruby
[09:47:19] araujo: has joined #ruby
[09:48:30] gregf_: Diabolik: class String; OPS = { "PLUS" => "+", "MINUS" => "-", "MUL" => "*", "DIV" => "/" }; def translate; op = OPS.keys.grep(/#{self}/i); return op.size>0 ? OPS[op[0]] : self; end; end
[09:48:38] gregf_: p ["4 PLUS 7 MINUS 1 PLUS 4", "1 MINUS 6", "2 MUL 3 DIV 3"].map{ |str| eval (str.scan(/(\w+)/).flatten.map(&:translate).join() ) } <== like that :/
[09:48:51] gregf_: oops. * scrolls to the bottom *
[09:49:19] _rgn: has left #ruby: ("WeeChat 0.4.2")
[09:49:36] araujo: has joined #ruby
[09:50:31] Asher: has joined #ruby
[09:51:35] tkuchiki: has joined #ruby
[09:55:52] _blizzy_: has joined #ruby
[09:56:03] mhib: has joined #ruby
[09:56:19] k3asd`: has joined #ruby
[09:56:28] manila90: has joined #ruby
[10:03:59] _blizzy_: has joined #ruby
[10:05:58] Oog: has joined #ruby
[10:08:41] nanoz]: has joined #ruby
[10:09:28] chouhoulis: has joined #ruby
[10:10:14] roolo: has joined #ruby
[10:12:38] EminenceHC: has joined #ruby
[10:13:10] nfk: has joined #ruby
[10:14:59] gregf_: >> String.class_eval "4 PLUS 7 MINUS 1 PLUS 4".gsub(/PLUS/ix,"+").gsub(/MINUS/ix,"-").gsub(/MUL/ix,"*").gsub(/DIV/ix,"/") *runs*
[10:15:00] ruboto: gregf_ # => /tmp/execpad-0e1b25d2e383/source-0e1b25d2e383:3: syntax error, unexpected keyword_rescue ...check link for more (https://eval.in/419525)
[10:15:47] yorickpeterse: what the heck are you kids on about?
[10:16:13] gregf_: >>RUBY_VERSION
[10:16:14] ruboto: gregf_ # => "2.2.0" (https://eval.in/419526)
[10:17:13] qiukun: has joined #ruby
[10:19:31] iamninja: has joined #ruby
[10:20:40] charliesome: has joined #ruby
[10:21:00] ferhaty: has joined #ruby
[10:21:53] yorickpeterse: check this out
[10:21:59] yorickpeterse: >> "4 PLUS 7 MINUS 1 PLUS 4".gsub(/PLUS|MINUS/, 'PLUS' => '+', 'MINUS' => '-').split(/\s+/).reduce { |left, right| left.is_a?(Array) ? left[0].to_i.send(left[1], right.to_i) : [left, right] }
[10:22:00] ruboto: yorickpeterse # => 14 (https://eval.in/419527)
[10:22:05] yorickpeterse: who's your daddy now?
[10:22:19] yorickpeterse: ACTION prepares the pyre
[10:22:51] devoldmx: has joined #ruby
[10:24:31] jenrzzz: has joined #ruby
[10:24:36] skade: has joined #ruby
[10:24:55] bronson: has joined #ruby
[10:25:37] j_mcnally: has joined #ruby
[10:25:49] leafybas_: has joined #ruby
[10:26:00] gregf_: yorickpeterse: haha, you;re doing too much there :/
[10:26:02] gregf_: >>eval "4 PLUS 7 MINUS 1 PLUS 4".gsub(/PLUS|MINUS/, "PLUS" => "+", "MINUS" => "-")
[10:26:03] ruboto: gregf_ # => 14 (https://eval.in/419529)
[10:26:20] skade: has joined #ruby
[10:26:28] ledestin: has joined #ruby
[10:30:12] iamninja: has joined #ruby
[10:31:09] yorickpeterse: gregf_: my solution is more webscale
[10:31:57] ljarvis: lies, your solution is in Ruby
[10:32:17] yorickpeterse: https://gist.github.com/YorickPeterse/c8533d9acedb3de4ceb2 proof
[10:32:26] yorickpeterse: I benchmarked it, so it's legit
[10:32:36] sdothum: has joined #ruby
[10:39:21] ljarvis: you should have written it in C
[10:39:29] ljarvis: or node if you really want speed
[10:39:40] Pupp3tm4st3r: has joined #ruby
[10:39:50] gregf_: yorickpeterse: theres a gazillion ways to do it, but what if you add a div to yours? does it handle op precedence?
[10:40:00] IceyEC: has joined #ruby
[10:40:13] stamina: has joined #ruby
[10:41:20] silkfox: has joined #ruby
[10:42:04] qiukun: has joined #ruby
[10:46:53] Iskarlar: has joined #ruby
[10:48:54] charliesome: has joined #ruby
[10:50:33] paradoja: has joined #ruby
[10:51:11] kristofferR: has joined #ruby
[10:51:34] atomical: has joined #ruby
[10:55:15] freerobby: has joined #ruby
[10:55:54] jimms: has joined #ruby
[10:56:51] rodfersou: has joined #ruby
[10:56:52] jeanlinux: has joined #ruby
[11:05:55] gusto: has joined #ruby
[11:08:02] arup_r: has joined #ruby
[11:09:31] c0x: has joined #ruby
[11:11:05] chouhoulis: has joined #ruby
[11:11:25] charliesome: has joined #ruby
[11:13:47] tkuchiki: has joined #ruby
[11:16:10] msnyon: has joined #ruby
[11:17:08] jgt1: has joined #ruby
[11:17:57] User458764: has joined #ruby
[11:18:48] curses: has joined #ruby
[11:21:25] phpjunkie: has joined #ruby
[11:21:33] phpjunkie: pngout worker: `pngout` not found; please provide proper binary or disable this worker (--no-pngout argument or `:pngout => false` through options)
[11:21:41] phpjunkie: please does anyone have a solution?
[11:21:47] phpjunkie: new to ruby on rails
[11:21:58] ljarvis: ?rails phpjunkie
[11:21:58] ruboto: phpjunkie, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[11:22:33] drunkwife: has joined #ruby
[11:22:34] ljarvis: the solution would presumably be to install pngout
[11:22:51] ljarvis: the error message sort of gives it away really
[11:23:03] ljarvis: voiding potential detective work. Pesky error message
[11:23:31] apeiros: support & consulting job destroyer! evil!
[11:24:42] m8: has joined #ruby
[11:25:52] bronson: has joined #ruby
[11:26:02] Pupp3tm4st3r: has joined #ruby
[11:26:30] livcd: what does inject do exactly ? why this prints 19 ? (1..10).inject { |sum,n| sum + 1 }
[11:27:12] maloik: it's supposed to print 10
[11:27:17] Iskarlar: has joined #ruby
[11:27:25] IceyEC: has joined #ruby
[11:27:25] ljarvis: it does print 10
[11:27:48] maloik: http://blog.jayfields.com/2008/03/ruby-inject.html
[11:27:59] Pupp3tm4st3r: has joined #ruby
[11:28:00] maloik: first result in google from a rather well known smart person, I'm sure that will explain it :-)
[11:28:16] ytti: i think livcd probably gets it, if it prints 10
[11:28:26] ytti: i'd be confused as well, if it prints 19 :)
[11:28:27] jenrzzz: has joined #ruby
[11:28:41] ljarvis: if it prints 19, then that's not the code
[11:28:42] livcd: oops right...i meant (1..10).inject { |sum,n| sum + 2 }
[11:28:43] ytti: so maybe some typo somewhere which lead him astray
[11:28:45] ljarvis: because we all know it's 10
[11:28:59] ytti: ljarvis, you run the block every time, changing n
[11:29:04] ytti: s/ljarvis/livcd/
[11:29:05] certainty: i accept the possibility that it printed 19
[11:29:14] ytti: livcd, and store result of preious run of block in sum
[11:29:19] Violentr: has joined #ruby
[11:29:23] ytti: livcd, another name for that method is #reduce
[11:29:25] livcd: oh so like memoization ?
[11:29:32] ytti: livcd, you reduce enumeration of values into single value
[11:29:46] livcd: oh i think i get it now!
[11:29:51] certainty: no not like memoization
[11:29:55] Pupp3tm4st3r: has joined #ruby
[11:30:08] ljarvis: reduce is a better name, pesky aliases
[11:30:16] ytti: reduce gives some idea what is going on
[11:30:19] ytti: inject is like, wtf
[11:30:30] apeiros: inject gives an idea too
[11:30:31] nettoweb: has joined #ruby
[11:30:36] apeiros: you inject an operator into a series of values
[11:30:52] apeiros: [a,b,c].inject(:+) --> a <inject +> b <inject +> c
[11:30:59] ljarvis: yeah I guess, prefer reduce myself
[11:31:02] ytti: i would want ruby to have less values and more opinionated about correct style
[11:31:09] ytti: one of the few things i prefer in python
[11:31:10] but3k4: has joined #ruby
[11:31:13] ljarvis: although I usually write inject, so i'm just a hypocrit
[11:31:15] ytti: s/values/aliases/
[11:31:23] ytti: ljarvis, HAH, exactly the same :)
[11:31:25] apeiros: but - I'd prefer to have no aliases and standardize on one name
[11:31:33] ytti: because i learned the alias #reduce later
[11:31:46] ytti: and #inject was already forced into my thinking
[11:31:48] apeiros: except for semantical aliases (e.g. alias eql? and ==, as they are used for different purposes, but might share the implementation)
[11:31:49] Pupp3tm4st3r: has joined #ruby
[11:32:01] apeiros: reduce was added later
[11:32:07] apeiros: iirc 1.9 added that alias.
[11:32:10] ljarvis: yeah they should be used sparingly, at least moreso
[11:33:03] y0da: has joined #ruby
[11:33:46] Pupp3tm4st3r: has joined #ruby
[11:33:51] maloik: hehe, inkjet...
[11:33:56] sdothum: has joined #ruby
[11:34:34] shevy: this amuses certainty
[11:34:56] certainty: shevy: of course it does
[11:35:06] certainty: shevy: admit it, you smiled too
[11:36:32] Pupp3tm4st3r: has joined #ruby
[11:38:41] skade: has joined #ruby
[11:41:48] elepedus: has joined #ruby
[11:42:24] Synthead: has joined #ruby
[11:42:31] silkfox: has joined #ruby
[11:42:39] ldnunes: has joined #ruby
[11:46:39] lxsameer_: has joined #ruby
[11:48:29] ljarvis: maloik: nou
[11:49:44] zhengxx: has joined #ruby
[11:49:57] IceyEC: has joined #ruby
[11:50:09] shevy: certainty dunno I banned the word #reduce from my brain
[11:50:23] whiteline: has joined #ruby
[11:52:06] ndrei: has joined #ruby
[11:53:28] symm-: has joined #ruby
[11:54:56] ishahnaz: has joined #ruby
[11:54:58] seggy: has joined #ruby
[11:54:59] segmond: has joined #ruby
[11:57:51] yorickpeterse: gregf_: mine is always left recursive
[11:58:19] roolo: has joined #ruby
[11:58:23] yorickpeterse: left associative
[11:58:25] yorickpeterse: or just use https://github.com/YorickPeterse/ruby-ll/blob/master/examples/math.rll
[11:59:51] dimasg: has joined #ruby
[11:59:51] bruno-: has joined #ruby
[12:00:29] dgutierrez1287: has joined #ruby
[12:00:37] Pupp3tm4st3r: has joined #ruby
[12:01:02] Motoservo: has joined #ruby
[12:04:05] inverseteetotale: has joined #ruby
[12:04:13] jenrzzz: has joined #ruby
[12:04:19] inverseteetotale: hey guys, I have a quick Ruby question if that's alright
[12:05:03] RegulationD: has joined #ruby
[12:05:07] ytti: that's literally the reason why this channel exists, shoot no safety needed
[12:05:25] inverseteetotale: haha yeah ive learned to be cautious and polite on irc's :)
[12:05:54] inverseteetotale: So I'm parsing an RSS feed with feed = RSS::Parser.parse(rss)
[12:06:22] inverseteetotale: and i iterate through feed.items to get the titles and whatnot
[12:06:52] inverseteetotale: however I can't figure out how to parse this part of the XML:
[12:06:56] inverseteetotale: <source url="http://www.heraldsun.com.au/technology/the-ashley-madison-hack-will-have-a-mixed-result-for-those-involved/story-fnjwnqya-1227491936806?from=herald+sun_rss">MATTHEW DUNN</source> <enclosure type="image/jpeg" length="2619" url="http://resources3.news.com.au/images/2015/08/20/1227491/949219-9becb926-46dd-11e5-ac0e-632009ba126e.jpg"/>
[12:07:24] inverseteetotale: both the source (namely the "Matthew Dunn" part) and the enclosure image uri
[12:07:52] inverseteetotale: Any thoughts on how to go about parsing this?
[12:08:16] rbennacer: has joined #ruby
[12:11:45] inverseteetotale: could really use a hand with this :/
[12:11:50] chouhoulis: has joined #ruby
[12:12:05] MasterPiece: has joined #ruby
[12:12:15] phutchins: has joined #ruby
[12:13:41] Synthead: has joined #ruby
[12:13:47] diegoaguilar: has joined #ruby
[12:13:54] jimms: has joined #ruby
[12:14:04] freerobby: has joined #ruby
[12:14:05] terlar: has joined #ruby
[12:14:25] inverseteetotale: could any of you guys give me a hand with an XML parsing problem?
[12:17:26] blackmesa: has joined #ruby
[12:18:38] jeanlinux: has joined #ruby
[12:20:39] [k-: did you encounter an error? what is it? could the front part be causing any problems?
[12:20:47] [k-: ?answer
[12:20:48] ruboto: I don't know anything about answer
[12:20:53] [k-: ?answers
[12:20:53] ruboto: How to ask the right questions to get you the right answer: https://www.mikeash.com/getting_answers.html
[12:21:05] Pupp3tm4st3r: has joined #ruby
[12:21:45] brunoro: has joined #ruby
[12:22:02] gregf_: yorickpeterse: https://gist.github.com/anonymous/34e3b117edde8f2a1814 <= is ruby doing this wrong then without explicitly using parens?
[12:22:30] gregf_: >> [ (1 + 2) - (1 + 4 /4); 1 + 2 - 1 + 4 /4 ]
[12:22:31] ruboto: gregf_ # => /tmp/execpad-7fc81bfcfbcd/source-7fc81bfcfbcd:2: syntax error, unexpected ';', expecting ']' ...check link for more (https://eval.in/419631)
[12:22:44] gregf_: >> (1 + 2) - (1 + 4 /4); 1 + 2 - 1 + 4 /4
[12:22:44] brunoro: has joined #ruby
[12:22:45] ruboto: gregf_ # => 3 (https://eval.in/419633)
[12:22:52] brunoro: has left #ruby: ()
[12:22:58] yorickpeterse: IIRC / is right-associative
[12:23:06] yorickpeterse: but I could be dumb, let me check
[12:23:17] gregf_: ah - nevrmind. i like your solution tho'. its the right end result. it should be '1' :)
[12:23:20] inverseteetotale: i have a question as well if anyone here feels like helping me out :)
[12:23:46] yorickpeterse: gregf_: https://gist.github.com/YorickPeterse/c835d414ab4bbd9334dd this is how it's parsed
[12:23:47] devoldmx: has joined #ruby
[12:24:26] Polysics: has joined #ruby
[12:24:44] blueOxigen: has joined #ruby
[12:25:04] yorickpeterse: and it should be 3
[12:25:08] yorickpeterse: per the usual operator precedence
[12:25:37] inverseteetotale: @yorickpeterse could you give me a hand with an xml parsing problem im facing?
[12:25:47] gregf_: yorickpeterse: thanks. you sure it should be 3 based on BODMAS i guess the evaluation is done?
[12:26:19] gregf_: inverseteetotale: you can take a look at nokogiri?
[12:26:46] inverseteetotale: for a school project, we're discouraged from using nokogiri
[12:27:02] gregf_: yorickpeterse: Thanks anyways, thats some stuff you;ve written :)
[12:27:05] iamninja: has joined #ruby
[12:27:17] northfurr: has joined #ruby
[12:27:54] inverseteetotale: I'm parsing an RSS feed with feed = RSS::Parser.parse(rss) and i iterate through feed.items to get the titles and whatnot however I can't figure out how to parse this part of the XML:
[12:28:03] inverseteetotale: <source url="http://www.heraldsun.com.au/technology/the-ashley-madison-hack-will-have-a-mixed-result-for-those-involved/story-fnjwnqya-1227491936806?from=herald+sun_rss">MATTHEW DUNN</source> <enclosure type="image/jpeg" length="2619" url="http://resources3.news.com.au/images/2015/08/20/1227491/949219-9becb926-46dd-11e5-ac0e-632009ba126e.jpg"/>
[12:28:03] bluOxigen: has joined #ruby
[12:28:09] inverseteetotale: both the source (namely the "Matthew Dunn" part) and the enclosure image uri
[12:28:13] unver: has joined #ruby
[12:28:26] pawnbox: has joined #ruby
[12:28:39] inverseteetotale: any thoughts :gref_ or yorickpeterse or anyone else?
[12:29:06] gregf_: inverseteetotale: so manually parse an xml string... i.e like your teacher telling you, 'hey inverseteetotale, here\'s my gun. i've kept it loaded for yer. now go ahead and shoot yourself' :/
[12:29:34] JoshL: has joined #ruby
[12:29:40] inverseteetotale: i just need to get the f'ing info from the enclosure, but i cant find anything on it
[12:30:19] yorickpeterse: gregf_: I based it on the output of `bc`
[12:30:40] gregf_: yorickpeterse++
[12:31:02] yorickpeterse: inverseteetotale: can you put together a simple gist (gist.github.com) that shows what you're trying to do?
[12:32:10] inverseteetotale: https://gist.github.com/BrennonTWilliams/3aa70023759f404fc87a
[12:32:37] inverseteetotale: yorickpeterse: I really appreciate the help, this is driving me nuts
[12:32:42] amystephen: has joined #ruby
[12:33:32] gregf_: >> "<foo>Matt Dunne</foo><sal>100</sal>".scan(/>([^<]+)/)
[12:33:33] ruboto: gregf_ # => [["Matt Dunne"], ["100"]] (https://eval.in/419638)
[12:33:40] gregf_: inverseteetotale: ^^
[12:33:57] apeiros: ACTION smacks gregf_
[12:34:19] [k-: have you checked if it allows attributes?
[12:34:25] adaedra: apeiros: cute
[12:34:38] yorickpeterse: gregf_: Don't ever use regex for XML
[12:34:38] skade: has joined #ruby
[12:34:40] yorickpeterse: ACTION slaps gregf_ around with a crushing student debt
[12:34:42] gregf_: heh. inverseteetotale wants to shoot (him|her)self in the foot *ducks... and runs*
[12:34:42] yorickpeterse: ACTION slaps gregf_ a few times
[12:34:44] yorickpeterse: ACTION slaps gregf_ around with a crushing student debt
[12:34:46] yorickpeterse: ACTION slaps gregf_ with a copy of "Pratical Trout Oriented Design in Ruby"
[12:34:55] Guest50: has joined #ruby
[12:35:23] inverseteetotale: I'm supposed to use RSS::Parser
[12:35:27] gregf_: yorickpeterse: apeiros i knoe i know. inverseteetotale says he|she wants to parse without a parser :/
[12:35:37] yorickpeterse: inverseteetotale: is this a Gem or something?
[12:35:38] inverseteetotale: so the answer would be something like item.enclosure
[12:35:46] inverseteetotale: built in I think
[12:35:50] sevenseacat: has joined #ruby
[12:35:54] yorickpeterse: Also, can't you just do RSS::Parser.parse('<source .....')?
[12:36:07] apeiros: gregf_: well, if you want to participate in insanity???
[12:36:11] yorickpeterse: That is, what happens if you try to parse the snippet of XML that way?
[12:36:27] but3k4: has joined #ruby
[12:36:30] yorickpeterse: Technically the snippet itself isn't valid XML as XML needs a single root element
[12:36:36] yorickpeterse: not sure if RSS::Parser likes that
[12:36:50] blackmesa: has joined #ruby
[12:36:51] apeiros: inverseteetotale: mandatory read: http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454
[12:36:59] inverseteetotale: yorickpeterse: that's what I did. item.title gives title, etc but not sure how to do it with enclosure
[12:37:21] apeiros: bottom line: forget your desire to "parse it without a parser". use a parser.
[12:37:54] adaedra: Regexp? With my XML?
[12:38:03] dstarh: has joined #ruby
[12:38:04] inverseteetotale: apeiros: I'm using Ruby's RSS::Parser
[12:38:08] inverseteetotale: and not because i want to
[12:38:15] adaedra: this exists?
[12:38:29] adaedra: or it's a gem?
[12:38:30] inverseteetotale: apparently. there's like no help for it
[12:38:37] inverseteetotale: built-in I'm told
[12:38:42] `derpy: http://www.rubydoc.info/stdlib/rss/RSS
[12:38:45] pontiki: stdlib rss has been around for a while
[12:39:00] yorickpeterse: inverseteetotale: hrm, not sure, not really familiar with RSS::Parser
[12:39:35] inverseteetotale: agh ive been at this for a couple hours and just can't figure out how to get into the fking enclosure
[12:43:27] _blizzy_: has joined #ruby
[12:43:27] inverseteetotale: if <title> can be gotten with only item.title, how would I get the image url from <enclosure type="image/jpeg" length="2619" url="http://resources3.news.com......png"
[12:43:29] silkfox: has joined #ruby
[12:43:57] unver: Here are some samples in the ruby repo https://github.com/ruby/ruby/tree/ruby_2_2/sample/rss
[12:44:11] unver: and the rss code https://github.com/ruby/ruby/tree/ruby_2_2/lib/rss
[12:44:26] unver: it's all you could ever want to know about the parser https://github.com/ruby/ruby/blob/ruby_2_2/lib/rss/parser.rb
[12:44:32] andywojo: has joined #ruby
[12:45:13] centrx: has joined #ruby
[12:46:22] decoponio: has joined #ruby
[12:46:30] inverseteetotale: still not seeing anything on dealing with enclosures...
[12:47:21] [k-: apparently on the rss object returned, call .each
[12:47:40] [k-: if it has each it should have []
[12:48:08] paradoja: has joined #ruby
[12:48:10] [k-: so try calling rss["enclosure"]
[12:48:40] abdoudjanifresh: has joined #ruby
[12:48:43] aiesec: has joined #ruby
[12:49:13] arup_r: has joined #ruby
[12:49:17] inverseteetotale: yup I'm iterating, check out the gist: https://gist.github.com/BrennonTWilliams/3aa70023759f404fc87a
[12:49:45] inverseteetotale: tried item.enclosure, item['enclosure'] and a handful of other variations
[12:50:04] paulcsmith: has joined #ruby
[12:50:43] [k-: it would help if you provide us with what you tried to do
[12:50:48] TPBallbag: has joined #ruby
[12:50:53] [k-: because the documentation for this library is horrible
[12:51:16] _blizzy_: has joined #ruby
[12:51:17] UtkarshRay: has joined #ruby
[12:52:07] victortyau: has joined #ruby
[12:52:41] rideh: has joined #ruby
[12:52:42] jenrzzz: has joined #ruby
[12:52:46] inverseteetotale: new gist with full code: https://gist.github.com/BrennonTWilliams/378ad4d0bab56ba753fb
[12:52:57] m1lt0n: has joined #ruby
[12:53:11] inverseteetotale: and i agree, this library is horrible
[12:54:16] victortyau: has joined #ruby
[12:54:45] joonty: has joined #ruby
[12:55:03] Diabolik: [k- what was your suggestion for the "MathExpression.calculate("2 PLUS 3")" problem earlier?
[12:55:05] [k-: try removing the counter
[12:55:22] [k-: Diabolik Reverse Polish Notation
[12:55:23] nertzy: has joined #ruby
[12:55:55] Diabolik: what is the easiest way of writing my own parser to convert the string into a calculable operation?
[12:56:26] yorickpeterse: Diabolik: https://github.com/yorickpeterse/ruby-calculator https://github.com/yorickpeterse/ruby-ll
[12:56:27] sgambino: has joined #ruby
[12:56:55] [k-: not caring about precedence, and doing it left to right is the easiest way
[12:57:03] [k-_: has joined #ruby
[12:57:09] inverseteetotale: k->: tried removing the counter, I just added it to keep the number of items at a minimum so i wouldn't puts a mile of text
[12:57:26] inverseteetotale: also updated the gist with the rss' xml in question: https://gist.github.com/BrennonTWilliams/378ad4d0bab56ba753fb
[12:58:32] [k-: try checking if the feed has the name "enclosure"
[12:59:14] [k-: or i suggest finding a different library if possible
[12:59:26] failshell: has joined #ruby
[12:59:42] [k-: the RSS library just looks like a wrapper around some parsers
[12:59:49] inverseteetotale: k->: item.enclosure returns an empty string. and I'm stuck with this library, its the fucking worst. wouldve never used it to begin with if i had a choice
[12:59:53] banister: has joined #ruby
[13:00:11] jgt1: has joined #ruby
[13:01:00] [k-: http://ruby-doc.org/stdlib-2.2.0/libdoc/rexml/rdoc/REXML/XPath.html
[13:01:18] [k-: i think this should work, since it is the underlying parser
[13:01:27] Pupp3tm4st3r: has joined #ruby
[13:01:35] hinbody: has joined #ruby
[13:01:49] jenrzzz: has joined #ruby
[13:01:55] atomical: has joined #ruby
[13:02:41] skade: has joined #ruby
[13:02:42] inverseteetotale: k->: im not following, this doesn't look like there's any clear solution to the enclosure problem with REXML
[13:03:15] Diabolik: yorickpeterse pm?
[13:03:16] unver: Try a different library, see if it parses the enclosure as you'd expect
[13:04:04] unver: nokogiri is popular
[13:04:05] inverseteetotale: unver: with nokogiri its just item.at('enclosure')['url'], but i cant use nokogiri
[13:04:13] binaryplease: has joined #ruby
[13:04:51] casadei_: has joined #ruby
[13:05:22] Guest50: has joined #ruby
[13:05:29] havenwood: has joined #ruby
[13:06:11] unver: dang, so the feed seems okay if nokogiri can parse it
[13:06:34] yorickpeterse: Valid XML doesn't make it valid RSS
[13:06:34] troulouliou_div2: has joined #ruby
[13:06:41] yorickpeterse: nor does it mean RSS::Parser might even support it
[13:07:00] inverseteetotale: unver: yup, i just need to find a way to get the contents of enclosure from item
[13:07:01] RTG`: has joined #ruby
[13:07:09] unver: well does it meet the spec? http://cyber.law.harvard.edu/rss/rss.html it has an enclosure tag that isn't picking up
[13:07:33] unver: is there an rss.valid? in the rss library
[13:08:02] [k-_: Ok, so the underlying class for feed is RSS::Rss
[13:08:36] inverseteetotale: unver: feed.valid? returns true
[13:08:45] timanema: has joined #ruby
[13:08:47] [k-_: feed.items.class is an array
[13:09:05] [k-_: it contains RSS::Rss::Channel
[13:09:23] [k-_: it contains RSS::Rss::Channel::Item* objects
[13:10:40] livathinos: has joined #ruby
[13:11:23] cajone: has joined #ruby
[13:12:13] [k-_: anddd, there is no documentation provided for that class
[13:14:06] unver: Can you find a feed that is known to be valid and have an enclosure parse properly?
[13:14:57] inverseteetotale: that's the feed we were recommended to use, its from a mass-market news site (ABC news)
[13:15:31] chouhoulis: has joined #ruby
[13:15:56] unver: not valid https://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Ffeeds.abcnews.com%2Fabcnews%2Ftopstories
[13:17:31] unver: it probably wouldn't effect this though, I don't see any enclosures in that feed
[13:17:48] failshell: has joined #ruby
[13:18:08] failshell: has joined #ruby
[13:18:58] hahuang61: has joined #ruby
[13:19:33] [k-_: this is how far i got: https://gist.github.com/SkyBirdSoar/832d30b8ecb400598f84
[13:19:45] sarkyniin: has joined #ruby
[13:19:46] aganov: has joined #ruby
[13:19:48] [k-_: apparently they are just a array of top level things
[13:19:57] [k-_: with no "tags"
[13:21:01] dopamean_: has joined #ruby
[13:21:26] [k-_: there is no "source" in the xml
[13:21:35] umgrosscol: has joined #ruby
[13:21:44] [k-_: where does your xml come from?
[13:21:51] [k-_: it isnt part of the feed
[13:22:55] inverseteetotale: http://feeds.abcnews.com/abcnews/topstories
[13:23:41] [k-_: the problem is, "<source "blah">blah..." is nowhere in the feed
[13:23:56] [k-_: ACTION catches his breath
[13:26:28] [k-_: you can see for yourself if you have chrome - view-source:http://feeds.abcnews.com/abcnews/topstories
[13:26:47] bronson: has joined #ruby
[13:27:02] [k-_: im no xml expert, but the format is entirely different from what you described
[13:28:28] inverseteetotale: fuuuck its a different ABC news, apparently http://www.abc.net.au/news/feed/45910/rss.xml
[13:28:40] haylon: has joined #ruby
[13:28:46] tkuchiki: has joined #ruby
[13:29:27] inverseteetotale: this is bullshit. im sorry for wasting your time guys. i dont think this is solveable. im going to drop out and become amish and live off the land, or go talk to the TA tomorrow morning
[13:29:29] nettoweb: has joined #ruby
[13:30:08] inverseteetotale: thanks so much for helping me out, i really appreciate it
[13:30:18] blueOxigen: has joined #ruby
[13:30:27] malconis: has joined #ruby
[13:30:37] inverseteetotale: i give up at this point. ive been at it for hours and have gotten nowhere
[13:30:40] [k-_: ACTION sighs, "source" is also not present in the new feed
[13:31:20] malconis: has joined #ruby
[13:31:42] radgeRayden: has joined #ruby
[13:31:45] inverseteetotale: k: im lost at this point. sorry for wasting your time
[13:32:45] [k-_: do you have the problem statement? are you vastly misinterpreting it?
[13:34:07] inverseteetotale: the specs are 10 pages long and suck. im done with this crap. sorry again
[13:34:10] blackmesa: has joined #ruby
[13:34:24] chouhoulis: has joined #ruby
[13:34:34] [k-_: it's okay.
[13:34:58] dimasg: has joined #ruby
[13:36:17] guardian: has joined #ruby
[13:36:53] platzhirsch: has joined #ruby
[13:37:46] renderful: has joined #ruby
[13:37:59] lostcuaz: has joined #ruby
[13:38:53] aiesec: has joined #ruby
[13:39:33] RobertBirnie: has joined #ruby
[13:39:51] jerius: has joined #ruby
[13:40:00] Alayde: has joined #ruby
[13:40:11] ekleog: Hi there! Do you know how well (or not) MiniTest's assert_output manages multiple threads writing? I can ensure the write is entirely made while execution is inside assert_output
[13:42:27] leat: has joined #ruby
[13:43:11] khebbie: has joined #ruby
[13:43:25] juanpaucar: has joined #ruby
[13:43:41] Oog: has joined #ruby
[13:43:42] whippythellama: has joined #ruby
[13:44:10] devdazed: has joined #ruby
[13:44:57] NeverDie: has joined #ruby
[13:45:22] northfurr: has joined #ruby
[13:46:14] tercenya: has joined #ruby
[13:46:30] roolo: has joined #ruby
[13:46:48] Oog_: has joined #ruby
[13:47:24] davedev24: has joined #ruby
[13:48:25] matthewburton: has joined #ruby
[13:48:43] matthewburton: can someone explain this to me? http://pastie.org/private/ckhoo3rcaecujpluephhfg
[13:48:53] ivanskie: has joined #ruby
[13:49:08] sevenseacat: matthewburton: you need to run `bundle install` to install all the dependencies.
[13:49:09] opalraava: has left #ruby: ()
[13:49:27] krisquigley: has joined #ruby
[13:49:40] matthewburton: does it matter what directory i run that in? any other parameters i need to give it?
[13:49:52] sevenseacat: run it in the application directory.
[13:49:56] sevenseacat: no other parameters.
[13:50:38] icharlie: has joined #ruby
[13:51:37] ckinniburgh: has joined #ruby
[13:51:52] isxek: has joined #ruby
[13:52:08] yorickpeterse: matthewburton: http://www.redmine.org/projects/redmine/wiki/redmineinstall
[13:53:21] unver: at least I got to learn a bit about ruby's RSS parser
[13:53:23] jas02: has joined #ruby
[13:53:53] northfurr: has joined #ruby
[13:54:24] matthewburton: http://pastie.org/private/wpd5lhle5fv6cii8hu8lag
[13:55:12] matthewburton: so, i have some gem that requires a rails upgrade?
[13:55:46] tkuchiki: has joined #ruby
[13:56:19] Pupp3tm4st3r: has joined #ruby
[13:56:48] ips|malc: has joined #ruby
[13:57:51] ekleog: nvm, it appears to do it cleanly, another mistake made me think it was it :)
[13:58:04] drewvanstone: has joined #ruby
[14:00:28] matthewburton: is that saying rails needs to be updated to be compatible with the gem, or vice versa?
[14:01:47] dorei: has joined #ruby
[14:02:24] andywojo: has joined #ruby
[14:04:32] Pupp3tm4st3r: has joined #ruby
[14:05:50] dawkirst: has joined #ruby
[14:08:19] bruno-: has joined #ruby
[14:09:31] jhass: ?redmine matthewburton
[14:09:32] ruboto: matthewburton, Please join #redmine for help with it.
[14:09:42] jhass: my guess is that you didn't follow the installation instructions
[14:09:55] binaryplease: has joined #ruby
[14:10:10] matthewburton: i???m in there. it???s empty.
[14:10:18] jas02: has joined #ruby
[14:10:19] drewvanstone: has joined #ruby
[14:10:36] jhack: has joined #ruby
[14:10:37] drewvanstone: has joined #ruby
[14:10:41] jhass: it's a 100 user channel, response can take 2-4 hours in such
[14:10:45] Guest50: has joined #ruby
[14:10:59] rbennacer: has joined #ruby
[14:11:00] saddad: has joined #ruby
[14:11:55] momomomomo: has joined #ruby
[14:13:29] atomical: I'm getting an error when I set the primary key as another column, but continue to use the id column. Is that not supported in ActiveRecord?
[14:14:11] Cust0sLim3n: has joined #ruby
[14:14:32] jhass: ?crosspost atomical
[14:14:32] ruboto: atomical, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
[14:17:15] d10n-work: has joined #ruby
[14:18:07] blue_deref: has joined #ruby
[14:19:17] msnyon: has joined #ruby
[14:19:23] duggiefresh: has joined #ruby
[14:19:42] krz: has joined #ruby
[14:20:09] gamename: has joined #ruby
[14:20:21] dopie: has joined #ruby
[14:20:31] leat: has joined #ruby
[14:20:47] negev: has joined #ruby
[14:24:13] The_Phoenix: has joined #ruby
[14:24:25] jimms: has joined #ruby
[14:24:31] devoldmx: has joined #ruby
[14:25:37] dopamean_: has joined #ruby
[14:26:22] silkfox: has joined #ruby
[14:27:38] The_Phoenix: has joined #ruby
[14:28:43] jtdoncas: has joined #ruby
[14:29:43] Torrieri: has joined #ruby
[14:31:45] EagleDelta: has joined #ruby
[14:34:25] dgarstang: has joined #ruby
[14:34:36] dgarstang: Where can I find an example of how to set credentials for the aws sdk v2?
[14:34:52] kies: has joined #ruby
[14:35:34] apeiros: dgarstang: presumably in aws sdk documentation
[14:35:47] dgarstang: apeiros: like here?
[14:35:57] dgarstang: apeiros: here? http://docs.aws.amazon.com/sdkforruby/api/index.html
[14:36:26] dgarstang: "ec2 = Aws::EC2::Resource.new(region:'us-west-2', credentials: credentials)" ... it doesn't say anywhere how to set the variable credentials
[14:36:50] apeiros: I see credentials: Aws::Credentials.new('akid', 'secret'),
[14:36:54] AugustoC: has joined #ruby
[14:36:56] dgarstang: I assumed it was hash... doesn't work, and if it IS a hash, what are the exact names of the keys supposed to be?
[14:37:11] apeiros: I also see "The SDK searches the following locations for credentials" with a couple of info
[14:37:13] xfbs: has joined #ruby
[14:37:23] jbw: has joined #ruby
[14:37:24] dgarstang: apeiros: I prefer the ""ec2 = Aws::EC2::Resource.new(region:'us-west-2', credentials: credentials)" version
[14:37:42] dgarstang: So, again, in the use case of '"ec2 = Aws::EC2::Resource.new(region:'us-west-2', credentials: credentials)', how does one set credentials?
[14:37:57] apeiros: 16:36 apeiros: I see credentials: Aws::Credentials.new('akid', 'secret'),
[14:38:11] dgarstang: apeiros: I prefer the alternatively documented version
[14:38:21] apeiros: ACTION rolls eyes
[14:38:31] apeiros: ACTION slowly backs off
[14:38:41] [k-_: he means to set the variable credentials as Aws::Credentials.new(blah)
[14:38:44] dgarstang: apeiros: the one your pasing is from Aws.config.update
[14:38:56] [k-_: dgarstang: they both expect the same object
[14:39:10] apeiros: dgarstang: it's documented on that site. yes. just read it. it's all there.
[14:39:13] dgarstang: [k-_ how do you know this?
[14:39:15] apeiros: ACTION afk
[14:39:23] jenrzzz: has joined #ruby
[14:39:31] [k-_: dgarstang: how do you not know this
[14:39:45] dgarstang: [k-_: Because it doesn't specifically say it anywhere
[14:39:46] [k-_: do you want me to dig out the documentation for you?
[14:40:03] apeiros: [k-_: it's right there where they found their example code.
[14:40:35] jhack: has joined #ruby
[14:40:35] dgarstang: The docs says I can either use Aws.config.update , or I can pass them to Aws::EC2::Resource.new(). In the case of passing to Aws::EC2::Resource.new(), it does not say how credentials was defined
[14:40:46] apeiros: yes. just read that file.
[14:41:07] jhass: ACTION gets popcorn
[14:41:34] dgarstang: I'll give it a try. I have no idea how your supposed to connect these two dots. If someone could point out exactly where it says this, it might be useful.
[14:41:41] Rutix: has joined #ruby
[14:41:41] Rutix: has joined #ruby
[14:41:45] dgarstang: Like, as in, some text to search
[14:41:58] apeiros: *right above your friggn code*
[14:42:01] apeiros: "credentials - An instance of one of the following classes:"
[14:42:05] Oog: has joined #ruby
[14:42:12] apeiros: also "These options take precedence over the environment and Aws.config defaults"
[14:42:21] apeiros: from which follows that what works for config will also work there.
[14:42:38] fullofcaffeine: has joined #ruby
[14:42:54] dgarstang: apeiros: Isn't that text related to Aws.config.update above only?
[14:43:14] dgarstang: "You may also pass configuration options" implies, ok... next option... something different
[14:43:16] dgarstang: Anyway, thanks
[14:44:09] dgarstang: hey hang on.... how am I supposed to set credentials tho. This still doesn't make any sense. If I don't use Aws.config.update()...,. then credentials = what?
[14:44:11] paradoja: has joined #ruby
[14:44:12] [k-_: readdoc --strict --no-be-very-very-strict --treat-things-as-separate --do-not-link-them-together
[14:44:26] apeiros: ACTION off for real now
[14:44:31] jhass: ?pry dgarstang
[14:44:32] ruboto: dgarstang, 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` directly in your source code. Visit https://pryrepl.org/ or get it now with: gem install pry pry-doc
[14:44:35] jhass: get that and play
[14:44:47] umgrosscol: has joined #ruby
[14:45:00] jhass: you're a programmer, for translating some code into other code we write tools
[14:45:02] RegulationD: has joined #ruby
[14:45:08] dgarstang: jhass: i don't even know how to set the object
[14:45:15] dimasg: has joined #ruby
[14:45:15] dgarstang: jhass: i'm not a ruby programmer
[14:45:19] jhass: dgarstang: because you didn't try a single line of code
[14:45:28] dgarstang: jhass: how do you know this?
[14:45:30] jhass: that's just a very lame excuse
[14:45:37] dgarstang: jhass: i've spent the last hour mucking with it
[14:45:54] jhass: I have to assume it by the kind of questions you ask
[14:46:02] Iskarlar: has joined #ruby
[14:46:21] jhass: you didn't include any assumptions you made and falsified
[14:46:29] jhass: so I have to assume you never made a single one
[14:46:31] dgarstang: jhass: Ruby might as well be greek to me. I don't take to it naturally so every inch of ruby is like walking a mile
[14:46:45] rippa: has joined #ruby
[14:46:55] dgarstang: but, that page as far as I can see, doesn't set credentials anywhere
[14:47:31] jhass: maybe you should hire somebody for this
[14:47:47] dgarstang: I suppose I could read between the lines and extract credentials: Aws::Credentials.new('akid', 'secret') from Aws.config.update() and do creds = Aws::Credentials.new('akid', 'secret') ?
[14:48:09] jhass: I guess? I thought you tried all these variants in the past hour
[14:48:23] [k-: you need an introduction to programming
[14:48:28] dgarstang: jhass: I've been in the biz for 16 years and I am quite capable with python and other languages. ruby is perl all over again and it's ... well not fun
[14:48:52] dgarstang: jhass: I had not tried that variant yet because reading between the lines normally isn't what you first do
[14:49:02] camm: has joined #ruby
[14:49:19] jhass: dgarstang: uh, your workday must be painful then
[14:49:32] mikalauskas: has joined #ruby
[14:49:46] dgarstang: jhass: very
[14:49:53] negev: can anyone tell me why Rack::File hangs for several seconds before serving a large-ish file?
[14:49:57] jhass: reading between the lines is all a programmer does, if you could literally translate them into code you could've written the code in the first place
[14:50:24] jhass: negev: guess it doesn't do a streaming API so it has to read it into memory first
[14:51:00] dgarstang: jeez who'd want to be a programmer all day
[14:51:22] mary5030: has joined #ruby
[14:51:45] jhass: you apparently don't, as said hire somebody else
[14:52:00] mary5030: has joined #ruby
[14:52:11] nscheurich: has joined #ruby
[14:53:23] skade: has joined #ruby
[14:53:24] tonios57: has joined #ruby
[14:54:02] dgarstang: Examples of the aws sdk are hard to come by
[14:54:27] jhass: so you're approach is to whine until somebody does it for you for free?
[14:54:51] drewvanstone: has joined #ruby
[14:54:56] dgarstang: jhass: let me rephrase. if someone has some links to some web pages with useful examples, that would be very much appreciated
[14:55:01] khebbie: has joined #ruby
[14:55:09] jhass: http://docs.aws.amazon.com/sdkforruby/api/index.html
[14:55:14] jhass: they're useful
[14:55:27] dgarstang: jhass: Thanks!!!! However, API docs are not examples
[14:55:41] jhass: it links to the README
[14:56:30] lannonbr: has joined #ruby
[14:56:45] r0x0rZ: has joined #ruby
[14:57:45] dblessing: has joined #ruby
[14:58:07] allcentury: has joined #ruby
[14:58:09] dgarstang: jhass: That doesn't assist. Thanks for your help. However, I'll have to keep googling because that page you referred me to does not seem to have any information about how to list and filter instances
[14:58:51] jhass: yeah, I think you didn't try anything
[14:59:00] jhass: what error do you get from your guess?
[14:59:01] dgarstang: jhass: How can I try what I don't know?
[14:59:08] ljarvis: well, they're not a programmer. Not even sure why they're doing this
[14:59:32] ljarvis: ACTION tries to build a car
[15:00:16] araujo: has joined #ruby
[15:02:19] apeiros: they said they are a programmer, just not ruby.
[15:02:29] apeiros: maybe learning ruby would be a sensible first step.
[15:02:42] apeiros: docs are generally not geared towards beginners.
[15:02:46] ljarvis: ah I read it wrong. Yes I concur, learning Ruby in order to write Ruby is probably a good idea
[15:02:52] neilnorthrop: has joined #ruby
[15:03:01] jgt1: has joined #ruby
[15:03:21] drewvanstone: has joined #ruby
[15:03:38] apeiros: it'd also of course be sensible to disclose that early when asking a question, so the answer has the right level
[15:03:40] anker: who are they and why are they a programmer
[15:03:54] apeiros: anker: dgarstang
[15:04:03] machinewar: has joined #ruby
[15:04:03] dgarstang: So now, I'm getting this... https://gist.github.com/dgarstang/74ca0c12fe25262db851
[15:04:14] sepp2k: has joined #ruby
[15:06:09] grios: has joined #ruby
[15:06:41] momomomomo: has joined #ruby
[15:08:30] gregf_: dgarstang: the docs should be quite clear :/
[15:09:25] ljarvis: dgarstang: https://gist.github.com/leejarvis/8bf25d335e0e83e12c8b
[15:10:19] dgarstang: ljarvis: Thanks. No idea how you arrived at that from the docs
[15:11:13] [k-_: it's in the Aws::EC2::Resource documentation?
[15:12:16] User4587_: has joined #ruby
[15:13:23] dgarstang: [k-_: I don't see anything about it saying you had to create credentials first, then a client from that, and finally a resource from that. In any case, I'm still getting the sme result with ljarvis's example https://gist.github.com/dgarstang/5c84af0bf7e90c8ac39c
[15:14:23] [k-_: are you using a legacy browser
[15:14:31] [k-_: that cant display colours
[15:14:54] Rubie: has joined #ruby
[15:15:24] AlexAltea: has joined #ruby
[15:15:33] khebbie: has joined #ruby
[15:15:40] [k-_: ljarvis: puts has side effects, which convention are you following?! it isnt on one line as well!
[15:15:44] jacaballero: has joined #ruby
[15:15:59] ljarvis: yeah the documentation is really shit quite honestly, I remember someone asking about this a couple of months ago in here and it took a while to come up with a solution
[15:16:39] skade: has joined #ruby
[15:16:59] dgarstang: ljarvis: No go... https://gist.github.com/dgarstang/5c84af0bf7e90c8ac39c
[15:17:23] Guest50: has joined #ruby
[15:18:10] Iskarlar: has joined #ruby
[15:18:23] dagda1_: has joined #ruby
[15:18:58] ljarvis: dgarstang: did you try the Aws.config.update option too?
[15:19:07] iamninja: has joined #ruby
[15:19:08] dgarstang: ljarvis: not yet
[15:19:56] riotjones: has joined #ruby
[15:20:02] RobertBirnie: has joined #ruby
[15:20:33] dgarstang: ljarvis: if I do that, I wont have a client object...
[15:20:38] alem0lars: has joined #ruby
[15:20:41] ljarvis: dgarstang: that's ok you dont need one
[15:20:53] ljarvis: a resource will use a default client if you dont provide a custom one
[15:20:56] centrx: has joined #ruby
[15:21:02] ljarvis: so you're setting credentials on a more global scale
[15:21:12] ljarvis: (i.e every default client will use them)
[15:21:25] dgarstang: ljarvis: ok, that worked. Do we have a doc bug then?
[15:21:26] CorySimmons: has joined #ruby
[15:21:55] [Butch]: has joined #ruby
[15:21:56] but3k4: has joined #ruby
[15:22:02] ljarvis: dgarstang: maybe. Honestly I don't have the patience with this gem or their docs. Feel free to report it if you want
[15:22:09] rbennacer: has joined #ruby
[15:22:21] dgarstang: ljarvis: Thanks for your help
[15:22:46] dgarstang: It seems I'm not the only one who has issue with the aws sdk docs
[15:23:10] gregf_: dgarstang: https://gist.github.com/anonymous/e65b221ca96bd6ab25d1 <= i just tried this(first time using ruby) and it works
[15:23:29] ljarvis: that's not even close to the same thing gregf_
[15:23:44] ljarvis: well, close, perhaps
[15:23:49] ljarvis: but a completely different service
[15:24:11] gregf_: replce S3 for EC2
[15:24:12] chohe: has joined #ruby
[15:24:14] dgarstang: That's pretty much what I tried with ec2
[15:24:21] dgarstang: sure, I'll try again
[15:24:25] gregf_: s/for/with/
[15:25:01] gregf_: dgarstang: you can also pick the accesskey/secret key from the environment :)
[15:25:34] dgarstang: gregf_: this will be a chef helper, so env isn't an option
[15:25:48] tkuchiki: has joined #ruby
[15:27:05] dgarstang: gregf_: your earlier pastie works. Well I dont bloody know now.
[15:27:10] terlar: has joined #ruby
[15:27:26] dgarstang: gregf_: yours is more succinct, so I'll start with that.
[15:27:44] bronson: has joined #ruby
[15:28:08] jhass: ACTION guesses a case of editing the wrong file
[15:28:58] dgutierrez1287: has joined #ruby
[15:29:03] rodfersou: has joined #ruby
[15:29:36] ljarvis: you should start with what works
[15:30:11] jpfuentes2: has joined #ruby
[15:30:14] j_mcnally: has joined #ruby
[15:30:15] dgarstang: ljarvis: yep
[15:30:21] pawnbox: has joined #ruby
[15:30:44] skade: has joined #ruby
[15:30:57] rbennacer: has joined #ruby
[15:31:09] m1lt0n: has joined #ruby
[15:31:35] aderium: has joined #ruby
[15:33:00] khebbie: has joined #ruby
[15:33:11] momomomomo: has joined #ruby
[15:34:24] hobodave: has joined #ruby
[15:34:40] roolo: has joined #ruby
[15:34:41] gregf_: dgarstang: sorry forgot to mention. i'd tried what ljarvis's pasted and it'd worked :/
[15:36:56] hooper: has joined #ruby
[15:37:01] skade: has joined #ruby
[15:37:54] pawnbox: has joined #ruby
[15:40:20] Maletor: has joined #ruby
[15:40:24] jimms: has joined #ruby
[15:42:01] tkuchiki: has joined #ruby
[15:43:58] dagda1: has joined #ruby
[15:45:45] northfurr: has joined #ruby
[15:46:34] Iskarlar: has joined #ruby
[15:47:03] EminenceHC: has joined #ruby
[15:47:21] chohe: has joined #ruby
[15:47:41] bruno-: has joined #ruby
[15:49:41] kith: has joined #ruby
[15:50:10] rehat: has joined #ruby
[15:50:46] dfockler: has joined #ruby
[15:51:46] camm: has left #ruby: ()
[15:52:29] Papierkorb: has joined #ruby
[15:52:49] pdoherty: has joined #ruby
[15:53:40] Papierkorb: Hi. I think I found a bug with Opal (A transpiler for Ruby -> Javascript). The snippet http://pastebin.com/Q8xX0SmZ gives the output "Foobar: foo" with MRI, but with Opal it returns the @cache hash instead. Question, is this a Opal bug, or am I triggering weird behaviour?
[15:53:41] ruboto: Papierkorb, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/333ec65f37a3e3ec0a87
[15:53:41] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[15:53:45] Papierkorb: ah forgot about that
[15:54:09] NeverDie: has joined #ruby
[15:54:35] Papierkorb: https://gist.github.com/Papierkorb/ede1c553c73c191063f8 here you go
[15:55:40] haxrbyte: has joined #ruby
[15:56:40] rbennacer: has joined #ruby
[15:56:44] towski_: has joined #ruby
[15:58:31] jenrzzz: has joined #ruby
[15:58:44] banister: has joined #ruby
[15:59:10] jackjackdripper: has joined #ruby
[15:59:14] podman: has joined #ruby
[16:00:16] [k-_: @cache hash? you mean {} and not nil even?
[16:01:39] Papierkorb: [k-_: The code outputs "{}" when run in Opal, but returns "Foobar" when run with MRI. You can try it here http://opalrb.org/try/
[16:02:10] Silox|: has joined #ruby
[16:02:20] Papierkorb: [k-_: Opal does the same what MRI does when adding parantheses to the expensive call line, MRI behaves the same regardless of them
[16:02:22] neilnort_: has joined #ruby
[16:02:35] NeverDie: has joined #ruby
[16:04:29] hobodave: has joined #ruby
[16:04:50] skade: has joined #ruby
[16:04:56] [k-_: seems like a bug to me, but im no expert
[16:05:59] [k-_: (now reading the javascript)
[16:06:37] Papierkorb: Yeah, when you look at the generated JS with and without the (), you see that without them the code after the ||= is gone completely
[16:06:40] UtkarshRay: has joined #ruby
[16:07:30] amclain: has joined #ruby
[16:07:47] dfockler: has joined #ruby
[16:08:19] NeverDie: has joined #ruby
[16:09:11] baweaver: has joined #ruby
[16:10:25] mleung: has joined #ruby
[16:11:37] diegoaguilar: has left #ruby: ("Leaving")
[16:11:38] baroquebobcat: has joined #ruby
[16:11:45] pawnbox: has joined #ruby
[16:12:55] yqt: has joined #ruby
[16:13:51] rcvalle: has joined #ruby
[16:13:59] momomomomo_: has joined #ruby
[16:15:19] RobertBirnie: has joined #ruby
[16:17:11] RobertBi_: has joined #ruby
[16:18:42] khebbie: has joined #ruby
[16:20:16] dgutierrez1287: has joined #ruby
[16:20:28] decaff: has joined #ruby
[16:21:38] jgt1: has joined #ruby
[16:21:50] pawnbox: has joined #ruby
[16:22:05] Hanmac: has joined #ruby
[16:22:53] Maletor: has joined #ruby
[16:25:19] devoldmx: has joined #ruby
[16:26:49] rbennacer: has joined #ruby
[16:28:04] j416: I want to undo this monkeypatching, how can I? https://github.com/padrino/padrino-framework/blob/master/padrino-core/lib/padrino-core/logger.rb#L503-L510
[16:28:30] j416: been trying remove_method and whatnot but it doesn't work D:
[16:28:36] bronson: has joined #ruby
[16:29:00] pietr0: has joined #ruby
[16:29:01] [k-_: class Kernel; undef logger; end
[16:29:42] mleung: has joined #ruby
[16:30:15] rehat: this might be a silly question but can we write ruby chrome apps? I only see Java, Python, and PHP on google's sample page
[16:31:22] dfockler: has joined #ruby
[16:31:25] apeiros: ugh, non-module_function-Kernel-method
[16:31:27] [k-_: transpiling to javascript maybe
[16:31:52] mikalauskas: has left #ruby: ()
[16:32:05] Papierkorb: [k-_: talking about Opal, haha
[16:32:13] n008f4g_: has joined #ruby
[16:32:38] [k-_: ??\_(???)_/??
[16:32:55] lele: has joined #ruby
[16:33:53] soahccc: I have a problem finding information about this: I use net-ssh and net-sftp in a threaded environment. Are these libs thread safe? When I execute a command via ssh and try to lstat the resulting file via sftp (2nd ssh connection) I get status exception "no such file" (which is possible) but then my script just freezes and on the remote auth.log I can find a "Bad packet length" error. Graceful shutdown is able to close the sftp but not the ssh connecti
[16:35:37] j416: [k-_: thanks! remove_method actually seemed to work, I overlooked somethign
[16:35:54] soahccc: Since sftp has it's own connection I don't know why using the sftp connection while a ssh channel is active results in this behaviour
[16:36:06] benlieb: has joined #ruby
[16:36:11] j416: [k-_: should I use undef logger or remove_method :logger ? why would I use one over the other?
[16:36:54] j416: (we had both a module method and instance method on Kernel with teh same name, causing headache :P)
[16:36:56] nettoweb: has joined #ruby
[16:37:08] mleung: has joined #ruby
[16:37:12] soahccc: Since sftp has it's own connection I don't know why using the sftp connection while a ssh channel is active results in this behaviour
[16:37:12] bricker: has joined #ruby
[16:37:37] fantazo: has joined #ruby
[16:37:46] jpfuentes2: has joined #ruby
[16:37:50] [k-_: j416: this is the same reason why people choose alias or alias_method
[16:38:02] [k-_: one is a keyword another isnt
[16:38:29] [k-_: if you use alias, use undef for style consistency
[16:38:54] hobodave_: has joined #ruby
[16:39:15] chinmay_dd: has joined #ruby
[16:39:48] apeiros: [k-_: remove_method and undef_method do different things
[16:39:51] jenrzzz: has joined #ruby
[16:39:58] apeiros: not sure which of the two the undef keyword does, though
[16:40:15] blackmesa: has joined #ruby
[16:40:24] j416: apeiros: I was asking about undef not undef_method, though
[16:40:36] j416: seems undef_method does it iteratively up the hierarchy
[16:40:54] Musashi007: has joined #ruby
[16:40:56] [k-_: undef_method prevents the class from calling it
[16:41:00] apeiros: j416: so? still applies, depending on which behavior undef has.
[16:41:09] [k-_: "fake remove"
[16:41:12] [k-_: http://stackoverflow.com/questions/11894308/when-to-use-undef-method-and-when-to-use-remove-method
[16:42:05] kies: has joined #ruby
[16:43:02] j416: nice, thanks!
[16:43:29] [k-_: http://ruby-doc.org/docs/keywords/1.9/Object.html#method-i-undef
[16:44:03] pawnbox: has joined #ruby
[16:46:20] skade: has joined #ruby
[16:46:55] nofxx: has joined #ruby
[16:46:55] nofxx: has joined #ruby
[16:46:56] j_mcnally: has joined #ruby
[16:47:31] EminenceHC: has joined #ruby
[16:47:37] RegulationD: has joined #ruby
[16:47:47] shevy: the [k-_ bot is better than the ruboto bot
[16:47:55] shevy: [k-_ automagically inserts helpful links
[16:48:59] apeiros: oy??? https://twitter.com/yukihiro_matz/status/634386185507311616
[16:49:09] apeiros: string literals frozen by default in ruby 3.0
[16:49:11] anaeem1: has joined #ruby
[16:49:12] [k-_: shevy: i need to charge you for the service
[16:49:32] d2dchat: has joined #ruby
[16:50:01] dfockler: Are we getting some immutable data types up in here!!!
[16:50:06] leafybasil: has joined #ruby
[16:50:44] suchness: has joined #ruby
[16:52:01] [k-_: NameError#name?
[16:52:13] shevy: ruby 3.0 exists?
[16:52:15] apeiros: google doc not loading for me :(
[16:52:41] shevy: "Yuki still does not know what it is"
[16:52:47] [k-_: seems like a more succinct error message would be "[NameError] Foo#method does not exist"
[16:52:54] j_mcnally: has joined #ruby
[16:52:55] iamninja: has joined #ruby
[16:53:02] [k-_: well, it could be a variable too
[16:53:07] shevy: so what advantage will it have when string literals are frozen?
[16:53:20] [k-_: your face wouldn't blow up
[16:54:16] shevy: there must be a real reason [k-_
[16:54:21] dfockler: string literals could live on the stack, and would be faster, I'm guessing from my Rust experience
[16:54:40] Junaos: has joined #ruby
[16:54:51] [k-_: seems like a more succinct error message would be "[NameError] Foo#variable does not exist" or "[NameError] Foo#method does not have <variable> in scope"
[16:55:15] shevy: "GitHub: Term of service; GitHub Issues are not portable"
[16:55:22] shevy: I don't get this
[16:55:43] dfockler: those are probably two separate things
[16:56:07] shadoi: has joined #ruby
[16:56:29] dgarstang: What's the ruby way to pass an optional hash to a function and check it's existence in the function?
[16:56:31] shevy: what do the mean with "not portable"?
[16:56:42] shevy: can't you just export the github issues into another tracker?
[16:57:00] shevy: dgarstang usually it comes as the last argument
[16:57:05] [k-_: "it has been rejected before 2.2 and early 2.3 development by matz
[16:57:05] [k-_: amatsuda: recently many pull requests are sent which appeanls adding ???..???.freeze"
[16:57:08] _blizzy_: has joined #ruby
[16:57:14] dgarstang: shevy: foo = {} or foo = nil ?
[16:57:16] shevy: dgarstang and you can always check for whether something is nil or non-nil
[16:57:25] rakm: has joined #ruby
[16:57:25] shevy: yeah if foo is nil then it can not be a hash :)
[16:57:27] troyready: has joined #ruby
[16:57:32] shevy: foo.is_a? Hash # to check if it is a hash
[16:57:41] dgarstang: shevy: lets say it was never defined in the first place
[16:57:46] leat: has joined #ruby
[16:57:51] shevy: never defined? then it does not exist right
[16:58:05] apeiros: dgarstang: a variable always references an object
[16:58:07] dgarstang: but if it does exist, it will be a hash
[16:58:15] apeiros: there's no such thing as undefined in ruby
[16:58:18] shevy: that depends on whether you pass the hash there
[16:58:23] shevy: you could pass an Array too
[16:58:31] Polysics: has joined #ruby
[16:58:32] [k-_: apeiros: there is, it has object_id of 6
[16:58:39] [k-_: *spooky*
[16:58:42] apeiros: [k-_: that's in the C API only
[16:58:44] [k-_: you cant obtain it though
[16:58:50] apeiros: Qundef you mean, right?
[16:58:53] BTRE: has joined #ruby
[16:58:59] [k-_: *spoooooky*
[16:59:00] dgarstang: shevy: if condition, set hash. func(hash)
[16:59:12] shevy: if it is a hash
[16:59:17] shevy: we could do:
[16:59:19] shevy: hash = ''
[16:59:19] dgarstang: hash may or may not be defined. ugh, that makes no sense
[16:59:31] Torrieri: has joined #ruby
[16:59:31] Torrieri: has joined #ruby
[16:59:43] shevy: if you want to confuse people you could give wrong variable names to things
[16:59:49] shevy: array_dataset = {}
[16:59:49] dgarstang: one day companies will realise open plan offices make for stupid employees
[17:00:41] doublemalt_: has joined #ruby
[17:00:43] klaas: has joined #ruby
[17:00:49] shevy: where do these core dev meetings happen? Osaka?
[17:00:57] havenwood: shevy: Tokyo
[17:01:01] [k-_: i think mutable_string_literal: true should be declared, mutable_string_literal: false is by default would be betteerrr
[17:01:12] dgarstang: let me try this... can I have optional argumements in ruby?
[17:01:19] havenwood: dgarstang: optionally
[17:01:28] dgarstang: so I can do foo(arg) or also foo() ?
[17:01:33] shevy: dgarstang yes, assign a default
[17:01:36] shevy: def foo(arg = '')
[17:01:40] shevy: def foo(arg = {})
[17:01:49] djbkd: has joined #ruby
[17:02:05] shevy: if you wish to gather stuff into a hash, the most common name is "options" options = }{
[17:02:11] [k-_: using the var_name = default_object syntax
[17:02:42] shevy: dgarstang I think that is very similar to python too
[17:03:55] dorei: let's say I have a hash with a set of keys (let's call it A) and I want to change them into a set of keys B, is there some gem that will give me some magic/abstraction over this kind of transformation?
[17:04:26] alem0lars: has joined #ruby
[17:04:42] centrx: dorei, ActiveSupport has transforms_keys ?
[17:04:48] Papierkorb: dgarstang: In fact, a trailing options hash is so common in Ruby, that it got its special syntax: def foo(a, b, something: true, asd:) <- a, b are unnamed mandatory arguments, something is an optional named argument, asd: is a mandatory named argument. Call could look like this: foo(123, 456, asd: 789)
[17:04:52] [k-: you want to migrate the values?
[17:05:13] dorei: centrx: no idea, i'm almost clueless about rails gems, but i'll give it a look :)
[17:05:21] Cust0sLim3n: has joined #ruby
[17:05:38] _blizzy_: has joined #ruby
[17:05:55] centrx: dorei, ActiveSupport is a utility gem that has a lot of useful extensions
[17:06:02] [k-: there is also **args for hash splattery goodness
[17:06:09] dfockler: dorei: you can also just iterate over the hash values and create a new hash with the new keys
[17:06:14] polpak: has joined #ruby
[17:06:16] rideh: has joined #ruby
[17:06:18] [k-: s/goodness/badness/
[17:06:55] Papierkorb: [k-: *args.flatten could be more efficient, as the splat operator expands the stuff on stack
[17:07:00] livathinos: has joined #ruby
[17:07:07] arooni-mobile: has joined #ruby
[17:07:07] [k-: dorei, not directed to you :p
[17:07:30] [k-: ACTION nods
[17:07:32] dorei: lol, okie :)
[17:07:55] Rubie: has joined #ruby
[17:07:58] havenwood: >> hash = {a: :key_lime, b: :chocolate_lava, c: :berry_cobbler}; keys = [:x, :y, :z]; hash.zip(keys).map { |(old_key, value), new_key| [new_key, value] }.to_h
[17:07:59] ruboto: havenwood # => {:x=>:key_lime, :y=>:chocolate_lava, :z=>:berry_cobbler} (https://eval.in/419820)
[17:08:01] leat: has joined #ruby
[17:08:09] apeiros: *args.flatten sounds like doing something terribly wrong.
[17:08:26] towski_: has joined #ruby
[17:08:28] Norrin: has left #ruby: ("Dueces")
[17:08:31] Rubie: has joined #ruby
[17:08:37] havenwood: dorei: ^ would just mapping work?
[17:08:37] Papierkorb: same for ** ;)
[17:09:45] dorei: havenwood: doesnt this depend upon the ordering of the keys?
[17:10:07] havenwood: dorei: Yes. How do you actually map them? Have a key to key conversion?
[17:10:35] havenwood: dorei: Like?: {a: :x, b: :y}
[17:10:48] dorei: havenwood: yeap, and i have some keys i want to discard, but i think i'll tackle that later
[17:11:00] Polysics: has joined #ruby
[17:11:41] banister: yorickpeterse what does "klaar" mean in english?
[17:12:11] apeiros: map_keys(mapping); mapped = {}; mapping.each do |from, to| mapped[to] = self[from] end; end
[17:12:23] apeiros: and map_keys! just has replace(map_keys(mapping))
[17:12:35] havenwood: >> hash = {a: :key_lime, b: :chocolate_lava, c: :berry_cobbler}; conversion = {a: :x, b: :y, c: :z}; conversion.map { |old, new| [new, hash[old]] }.to_h
[17:12:36] ruboto: havenwood # => {:x=>:key_lime, :y=>:chocolate_lava, :z=>:berry_cobbler} (https://eval.in/419822)
[17:12:36] apeiros: IMO too trivial to make a gem for something like that
[17:12:44] krisquigley: has joined #ruby
[17:12:57] TomyLobo: has joined #ruby
[17:13:13] bap1313: has joined #ruby
[17:13:19] jamesaxl: has joined #ruby
[17:13:31] Papierkorb: havenwood: what about Hash#update ?
[17:14:26] dorei: havenwood: thanx :)
[17:14:28] casadei_: has joined #ruby
[17:14:28] Papierkorb: >> {a: :key_lime, b: :chocolate_lava, c: :berry_cobbler}.update({a: :x, b: :y, c: :z})
[17:14:29] ruboto: Papierkorb # => {:a=>:x, :b=>:y, :c=>:z} (https://eval.in/419823)
[17:14:46] unver: has joined #ruby
[17:14:54] dorei: Papierkorb: i want only to change the keys, not the values
[17:15:07] elepedus: has joined #ruby
[17:15:39] centrx: hash.transform_keys { |k| MAPPING[k] }
[17:16:02] dorei: centrx: yeah, that seems to be the most terse of all :)
[17:16:11] havenwood: dorei: Rails?
[17:16:25] fantazo: has joined #ruby
[17:16:31] dorei: havenwood: only activesupport :p
[17:17:06] havenwood: dorei: aha!
[17:17:09] havenwood: require 'active_support/core_ext/hash/keys'
[17:17:18] prestorium: has joined #ruby
[17:17:21] havenwood: dorei: then yeah, you get the fancy
[17:17:46] decaff: has joined #ruby
[17:18:12] platzhirsch: has left #ruby: ()
[17:18:57] havenwood: >> [:x, :y, :z].sample
[17:18:58] ruboto: havenwood # => :y (https://eval.in/419826)
[17:19:10] havenwood: chocolate lava it is!
[17:19:21] havenwood: i can accept that
[17:19:33] havenwood: should go well with coffee
[17:20:11] chichouw: has joined #ruby
[17:20:53] shmilan: has joined #ruby
[17:21:44] jacaballero: has joined #ruby
[17:22:45] roolo: has joined #ruby
[17:24:44] duggiefresh: has joined #ruby
[17:24:47] kingman: has joined #ruby
[17:25:22] havenwood: shevy: You were asking about 2.3.0 schedule at some point if I recall?: https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/ReleaseEngineering23
[17:25:58] symm-: has joined #ruby
[17:26:34] Torrieri: has joined #ruby
[17:26:38] jenrzzz: has joined #ruby
[17:28:16] leat: has joined #ruby
[17:28:45] khebbie: has joined #ruby
[17:29:03] barhum2013: has joined #ruby
[17:29:22] hobodave: has joined #ruby
[17:30:05] bluOxigen: has joined #ruby
[17:31:01] chouhoulis: has joined #ruby
[17:31:46] havenwood: shevy: :O --enable-frozen-string-literal
[17:34:10] j_mcnally: has joined #ruby
[17:36:24] BTRE: has joined #ruby
[17:36:47] benlieb: has joined #ruby
[17:37:33] DelDotB: has joined #ruby
[17:37:52] mikecmpbll: has joined #ruby
[17:38:22] bootstrappm: has joined #ruby
[17:38:30] leat: has joined #ruby
[17:39:05] No1Phan: has joined #ruby
[17:39:36] benlieb: has joined #ruby
[17:39:49] arooni-mobile: has left #ruby: ("Leaving")
[17:39:58] chouhoulis: has joined #ruby
[17:40:03] djbkd_: has joined #ruby
[17:40:30] wprice: has joined #ruby
[17:41:22] dopie: has joined #ruby
[17:44:09] kies: has joined #ruby
[17:44:26] yorickpeterse: banister: "done"
[17:45:36] benlieb: has joined #ruby
[17:46:07] clickedlabs: has joined #ruby
[17:46:22] clickedlabs: Anyone here know nginx
[17:46:48] clickedlabs: need help with my setup. Can't seem to get it right
[17:46:56] Polysics: has joined #ruby
[17:47:08] baweaver: has joined #ruby
[17:47:27] polpak: clickedlabs: just as your question, don't ask to ask
[17:47:34] polpak: clickedlabs: if someone can help they will
[17:47:44] clickedlabs: Sorry new to this
[17:47:51] polpak: clickedlabs: no worries.
[17:47:59] paulcsmith: has joined #ruby
[17:48:03] tesaf: has joined #ruby
[17:48:19] clickedlabs: OK so I'm trying to setup nginx php-fpm, but nginx gives me a white screen on my configuration.
[17:48:45] leat: has joined #ruby
[17:48:54] tesaf: @hostname.split("-")[2].split(/(\d+)/)[1] -- getting this error "Detail: undefined method `split' for nil:NilClass"
[17:48:58] clickedlabs: NGINX user/group is internet:internet .. PHP FPM user/group is also internet:internet .. using /var/run/php-fpm.sock
[17:49:12] tesaf: does new ruby not support the nested splits?
[17:49:37] shmilan: has joined #ruby
[17:49:38] polpak: tesaf: @hostname.split("-")[2] is nil
[17:49:51] polpak: tesaf: so maybe your hostname isn't what you think it is
[17:50:10] tesaf: okay, thanks for the hint :) not ultra fam with ruby
[17:50:28] polpak: > 'localhost'.split('-')[2]
[17:50:36] polpak: >> 'localhost'.split('-')[2]
[17:50:37] ruboto: polpak # => nil (https://eval.in/419842)
[17:52:58] polpak: clickedlabs: what is php-fpm?
[17:53:50] clickedlabs: is a PHP server for nginx
[17:54:08] clickedlabs: nginx parses .php files with it
[17:54:25] ishahnaz: has joined #ruby
[17:54:54] Coraline: clickedlabs: you might have more luck on a PHP channel for this?
[17:55:06] clickedlabs: Probably but it's invite only
[17:55:14] Coraline: It doesn't sound like an nginx problem to me
[17:55:24] clickedlabs: I figured since ruby / rails people have nginx experience
[17:55:27] havenwood: clickedlabs: Is it invite only or do you just have to register to speak?
[17:55:35] havenwood: clickedlabs: Or register to join?
[17:55:39] clickedlabs: says invite only for me
[17:55:40] rideh: has joined #ruby
[17:55:52] Coraline: Two octothorps
[17:55:57] cFouts: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[17:55:58] clickedlabs: #php Cannot join channel (+i) - you must be invited
[17:56:02] lannonbr: has joined #ruby
[17:56:04] clickedlabs: let me try that
[17:56:31] jimms: has joined #ruby
[17:57:11] decaff: has joined #ruby
[17:57:24] choke: has joined #ruby
[17:57:25] bengan: has joined #ruby
[17:58:54] ta: has joined #ruby
[17:59:07] tvw: has joined #ruby
[17:59:50] codecop: has joined #ruby
[17:59:52] krisquigley: has joined #ruby
[18:01:08] Guest50: has joined #ruby
[18:02:35] infernix: has joined #ruby
[18:02:38] rfmind: has joined #ruby
[18:02:38] dfockler: Is there some drawback to OpenStruct or do people just not use it a lot?
[18:02:48] diegoviola: has joined #ruby
[18:02:56] dfockler: or struct in general for that matter
[18:03:57] jhass: dfockler: OpenStruct is quite slow
[18:04:00] jhass: Struct is fine
[18:04:08] yasha0x80: has joined #ruby
[18:04:19] diegoviola: please help me refactor my vending machine code: https://gist.github.com/2f81626aa7f8aa4da58c
[18:04:31] pipework: diegoviola: Thought you didn't need help with coding it. :p
[18:04:55] pipework: diegoviola: Why are you calling get_balance(items) in the initialize method?
[18:05:23] jhass: diegoviola: make items an @instance_variable, initialize it from a constant @items = ITEMS
[18:05:40] diegoviola: pipework: I was wrong I guess
[18:05:54] pipework: >> Class.new { def initialize Object.new; end }.new
[18:05:55] ruboto: pipework # => /tmp/execpad-9371a65beae9/source-9371a65beae9:2: formal argument cannot be a constant ...check link for more (https://eval.in/419880)
[18:06:01] skade: has joined #ruby
[18:06:03] jhass: don't use get_, set_, is_ prefixes, find a different verb or omit them
[18:06:03] pipework: >> Class.new { def initialize; Object.new; end }.new
[18:06:04] ruboto: pipework # => #<#<Class:0x40b3609c>:0x40b372bc> (https://eval.in/419881)
[18:06:23] pipework: Note how an instance of Class was returned, not an instance of Object.
[18:06:49] pipework: Just seems odd to use #initialize like that.
[18:06:53] jhass: pipework: I think that's meant to be print_balance
[18:06:57] diegoviola: pipework: I'm passing items to the menu method
[18:08:24] ekleog: Is there a way to emulate sending two blocks as arguments to one function? I thought of making a function that takes a block and returns a partial function that takes the other block, but that would require the user to add a .call
[18:08:51] pipework: ekleog: Send one as a lambda/proc
[18:09:08] shevy: aawww that was apeiros old idea... to be able to have more than one block
[18:09:34] pipework: Or just call the first method with one block and then have the returning object respond to a method that takes another block before doing whatever you needed with both blocks.
[18:09:54] khebbie: has joined #ruby
[18:10:01] pipework: shevy: I wouldn't say it was 'his', but he might have championed it at some point.
[18:10:14] ekleog: That's what I tried to avoid for the end-user, to be able to write something like not_really_if { |c| condition } { |c| code_block }
[18:10:26] jhass: ekleog: then the answer is no
[18:10:27] pipework: ekleog: Return a proc from the first that takes the second block.
[18:11:08] pipework: ekleog: not_really_if -> {|c| condition}, -> {|c| code_block}
[18:11:41] apeiros: shevy: we always were able to send multiple blocks, using proc{}/lambda{} (and since 1.9 also ->{})
[18:11:52] pipework: One of those could be a block, but it seems like mental masturbation
[18:12:10] sepp2k: has joined #ruby
[18:12:29] apeiros: shevy: what I wanted was having the same syntax for multiple blocks
[18:13:09] barhum2013: has joined #ruby
[18:13:23] shevy: omg the ->
[18:13:30] jenrzzz: has joined #ruby
[18:13:59] pipework: The dashrocket!
[18:14:04] ekleog: Oh right, the arrow syntax, thanks!
[18:14:09] ta: has joined #ruby
[18:14:20] shevy: if we'd also have a <- operator
[18:15:05] Cache_Money: has joined #ruby
[18:15:29] yfeldblum: has joined #ruby
[18:16:24] Norrin: has joined #ruby
[18:17:41] chinmay_dd: has joined #ruby
[18:17:41] tmillc: has joined #ruby
[18:18:17] baweaver: has joined #ruby
[18:19:35] tmillc: I'm not sure what I did wrong here, https://gist.github.com/anonymous/51601d143d8f3fa5dffc
[18:20:02] Cache_Money: has left #ruby: ()
[18:21:00] diegoviola: jhass: https://gist.github.com/diegoviola/2f81626aa7f8aa4da58c
[18:21:12] diegoviola: jhass: so like this?
[18:21:15] stef204: has joined #ruby
[18:21:26] havenwood: tmillc: Try having `arr` be the last expression in the method, so it's implicitly returned.
[18:22:01] havenwood: >> arr.reverse! if false
[18:22:02] ruboto: havenwood # => nil (https://eval.in/419899)
[18:22:29] havenwood: tmillc: ^ if your if statement has a falsey value it'll return `nil` from your method
[18:22:47] havenwood: tmillc: since it's the last expression evaluated
[18:22:55] tmillc: havenwood: so another solution could be adding an explicit return?
[18:22:56] shevy: tmillc always return something
[18:23:00] alphaatom: has joined #ruby
[18:23:31] tmillc: thanks, that did it
[18:23:39] kidoz: has joined #ruby
[18:24:05] northfurr: has joined #ruby
[18:24:08] dstarh: has joined #ruby
[18:24:35] jhass: diegoviola: I wouldn't move initializing @items to balance, but that's the gist. Now if you want to make it good code you need to make it two classes, one that has the state and the logic of the VendingMachine and one that uses that class and does the IO/user interface
[18:24:52] jhass: diegoviola: also the point of using @items is that you don't have to pass it around
[18:25:08] Averna: has joined #ruby
[18:25:10] andybernard: has joined #ruby
[18:25:22] al2o3-cr: has joined #ruby
[18:25:35] jhass: diegoviola: and actually on a second look you don't even modify it, so you might as well consider directly using the constant everywhere
[18:26:04] devoldmx: has joined #ruby
[18:26:06] jenrzzz: has joined #ruby
[18:26:15] jhass: but @balance is another good candidate for an instance variable
[18:26:59] rbennacer: has joined #ruby
[18:27:20] lannonbr: has joined #ruby
[18:27:43] icarus: has joined #ruby
[18:28:14] SenpaiSilver: has joined #ruby
[18:28:27] ekleog: Mmhmmm... Any idea why this is syntax error?
[18:28:27] ekleog: >> def foo(l, &b); end; foo -> { |a| 0 } { |b| 0 }
[18:28:28] ruboto: ekleog # => /tmp/execpad-fb47f4f1bc8a/source-fb47f4f1bc8a:2: syntax error, unexpected '|' ...check link for more (https://eval.in/419924)
[18:28:29] nzst: has joined #ruby
[18:28:52] diegoviola: jhass: thanks
[18:29:36] bronson: has joined #ruby
[18:29:42] jhass: ekleog: ->(takes_params, here) { ... }
[18:29:54] ekleog: Oh right.
[18:29:57] ekleog: ACTION feels stupid
[18:31:20] ruby-lang237: has joined #ruby
[18:32:15] cornerma1: has joined #ruby
[18:32:34] ruby-lang237: Hello. Any ideas how to install ray on this *ubuntu? https://gist.github.com/anonymous/ab4a6ac1595f6ca5267c
[18:32:35] diegoviola: jhass: https://gist.github.com/diegoviola/2f81626aa7f8aa4da58c
[18:32:42] dede: has joined #ruby
[18:32:54] diegoviola: jhass: I will try splitting in two classes now
[18:33:24] davedev24: has joined #ruby
[18:33:43] jhass: ruby-lang237: extconf.rb:6:in ``': No such file or directory - freetype-config (Errno::ENOENT) that's the significant part
[18:33:58] jhass: install whatever makes that command available
[18:34:29] ruby-lang237: jhass: OK, thank you.
[18:36:34] Omni_: has joined #ruby
[18:37:43] jgpawletko: has joined #ruby
[18:37:59] skade: has joined #ruby
[18:38:04] Omni_: has joined #ruby
[18:38:58] Rinzlit2: has joined #ruby
[18:39:55] MAQ: has joined #ruby
[18:40:10] jbw: has joined #ruby
[18:40:13] toretore: has joined #ruby
[18:40:25] sfr^: has joined #ruby
[18:40:35] rfmind_: has joined #ruby
[18:41:24] universa1: has joined #ruby
[18:41:36] diegoaguilar: has joined #ruby
[18:44:00] luckyme: has joined #ruby
[18:45:36] Thermatix: has joined #ruby
[18:45:46] gavit: if I have several csv files and I want to search for a unique value in a column, what would be the best way to go about it? convert csv to sqlite?
[18:45:50] Rubie: has joined #ruby
[18:45:56] jenrzzz: has joined #ruby
[18:48:15] nuttermb: has joined #ruby
[18:50:16] blackmesa: has joined #ruby
[18:50:33] jhass: gavit: depends on a bunch of factors, like how often do you need to do it, how fast does it really need to be, how often does the data change
[18:52:13] chichou: has joined #ruby
[18:52:26] sfr^: has joined #ruby
[18:52:41] gavit: jhass: a phone directory and a reverse geolocation are what I have in mind right now
[18:52:55] gavit: oow, sorry wrong answer to correct question
[18:53:03] gavit: jhass: just once :)
[18:53:21] jhass: then I'd just sequentially iterate over all CSVs using stdlib until you found it
[18:53:45] icarus: has joined #ruby
[18:53:48] juanpaucar: has joined #ruby
[18:54:12] juanpaucar: has joined #ruby
[18:54:44] jhass: LIST_OF_CSVS.each do |csv| CSV.foreach(csv) do |row| if row[COLUMN] == SPECIAL_VALUE; puts "found"; exit; end; end; puts "not found"
[18:55:12] Silox|: has joined #ruby
[18:56:07] tesaf: has left #ruby: ("WeeChat 0.4.2")
[18:56:20] Frem: has joined #ruby
[18:59:08] icarus: has joined #ruby
[18:59:09] gavit: jhass: I want a unique list of column2 :P
[18:59:12] pabs: i prefer this: def search_csvs(csvs, col, val, &block); csvs.each { |csv| csv.each { |row| block.call(csv, row) if row[col] =~ val } }; end
[18:59:16] gavit: but I get your point
[18:59:56] universa1: has joined #ruby
[19:00:26] jhass: gavit: well yeah, then just push them all into a Set
[19:00:27] sfr^: has joined #ruby
[19:00:33] shadoi: has joined #ruby
[19:00:52] jhass: and write that out to a file or whatever
[19:01:17] pabs: you want a unique list of a second column, where another column matches some value?
[19:01:26] shinnya: has joined #ruby
[19:01:32] momomomomo: has joined #ruby
[19:01:42] guest56: has joined #ruby
[19:02:08] jenrzzz: has joined #ruby
[19:05:29] scottschecter: has joined #ruby
[19:05:52] freezevee: has joined #ruby
[19:06:01] freezevee: how could I read serial data with ruby ?
[19:06:08] Musashi007: has joined #ruby
[19:06:21] freezevee: parse a console command e.g. screen or minicom or use a gem ?
[19:06:38] kr3ssh: has joined #ruby
[19:07:31] greenride: has joined #ruby
[19:07:36] jhass: there's a couple gems that provide some abstractions for it iirc
[19:07:45] jhass: serialport, ruby-serial, something like that?
[19:07:58] jhass: search for serial on rubygems.org
[19:08:01] NightMonkey: has joined #ruby
[19:08:04] sfr^: has joined #ruby
[19:08:42] yardenbar: has joined #ruby
[19:08:47] freezevee: I saw serialport but has to be updated some months
[19:08:52] freezevee: I'll check it that way
[19:09:17] jenrzzz: has joined #ruby
[19:09:22] kirun: has joined #ruby
[19:09:37] jackjackdripper: has joined #ruby
[19:09:38] diegoaguilar: has joined #ruby
[19:10:04] khebbie: has joined #ruby
[19:10:13] dudo: has joined #ruby
[19:10:16] ivanskie: has joined #ruby
[19:10:55] roolo: has joined #ruby
[19:11:16] BTRE: has joined #ruby
[19:12:12] pawnbox: has joined #ruby
[19:14:00] avahey: has joined #ruby
[19:14:11] iamninja: has joined #ruby
[19:15:31] petricore: has joined #ruby
[19:15:33] blackmesa: has joined #ruby
[19:16:51] jgt: has joined #ruby
[19:19:25] nahtnam: has joined #ruby
[19:19:30] apt-get_: has joined #ruby
[19:20:11] kadoppe: has joined #ruby
[19:22:06] lucyinthesky: has joined #ruby
[19:22:54] rfmind_: has joined #ruby
[19:23:25] User4587_: has joined #ruby
[19:23:41] lkba: has joined #ruby
[19:25:05] diegoviola: jhass: sorry to bother again, but is this similar to what you had in mind? https://gist.github.com/diegoviola/f08331ddadac415f561e
[19:25:09] diegoviola: not sure what else I can move to the controller
[19:25:27] northfurr: has joined #ruby
[19:25:57] failshell: has joined #ruby
[19:25:58] baweaver: has joined #ruby
[19:26:10] elepedus: has joined #ruby
[19:26:10] jhass: diegoviola: no, I had in mind to decouple the business logic from the presentation logic
[19:26:55] jhass: diegoviola: if we're thinking rails, VendingMachine currently is both, your model and your view
[19:27:16] joaomdmoura_: has joined #ruby
[19:27:17] alxndr_: has joined #ruby
[19:27:17] jenrzzz: has joined #ruby
[19:27:42] hahuang61: has joined #ruby
[19:27:59] Zarthus_: has joined #ruby
[19:28:01] nertzy: has joined #ruby
[19:28:20] diegoviola: jhass: so you mean moving main to the controller, etc?
[19:28:49] jhass: I wouldn't strictly do MVC in this case, that was just an analogy
[19:28:59] jordanm: has joined #ruby
[19:29:34] crdpink2: has joined #ruby
[19:29:35] jhass: I would do one class that drives the program, most of what your current VendingMachine does, user input, display menus, decide what to do on which input
[19:30:08] yfeldblum: has joined #ruby
[19:30:17] jhass: and one that never prints but just handles the state and operations on it, like charge balance, buy something, get a list of available items and prices
[19:30:26] jhass: think a rails model
[19:30:46] TvL: has joined #ruby
[19:30:47] v4n: has joined #ruby
[19:31:13] icarus: has joined #ruby
[19:31:28] bryancp: has joined #ruby
[19:31:32] frode15243: has joined #ruby
[19:31:35] mjc_: has joined #ruby
[19:31:38] diegoviola: makes sense, thanks
[19:31:48] blackmesa: has joined #ruby
[19:32:01] hostess: has joined #ruby
[19:32:03] zipkid: has joined #ruby
[19:32:03] Silox|: has joined #ruby
[19:32:16] pizzaops: has joined #ruby
[19:32:18] autrilla: has joined #ruby
[19:32:35] manveru: has joined #ruby
[19:32:53] anandubajith: has joined #ruby
[19:33:25] casadei_: has joined #ruby
[19:33:45] melter: has joined #ruby
[19:33:52] hollywood: has joined #ruby
[19:33:53] leslie: has joined #ruby
[19:33:53] leslie: has joined #ruby
[19:34:06] colstrom: has joined #ruby
[19:34:07] B5X: has joined #ruby
[19:34:09] PhilK: has joined #ruby
[19:34:41] Seich: has joined #ruby
[19:34:52] jimeh: has joined #ruby
[19:35:13] Zarthus_: has joined #ruby
[19:35:43] cbednarski: has joined #ruby
[19:35:47] glowcoil: has joined #ruby
[19:36:03] sfr^: has joined #ruby
[19:36:34] ZeeNoodleyGamer: has joined #ruby
[19:36:40] SuperTux88: has joined #ruby
[19:36:46] baweaver: has joined #ruby
[19:36:51] nullwarp: has joined #ruby
[19:37:05] Silox|: has joined #ruby
[19:37:08] alxndr: has joined #ruby
[19:37:17] dgutierrez1287: has joined #ruby
[19:37:39] prosodyContext: has joined #ruby
[19:37:52] blackjid: has joined #ruby
[19:38:43] Liam`: has joined #ruby
[19:39:29] mjmac: has joined #ruby
[19:39:31] Heero: has joined #ruby
[19:40:01] sfr^: has joined #ruby
[19:41:03] choke: has joined #ruby
[19:41:18] seggy: has joined #ruby
[19:41:23] segmond: has joined #ruby
[19:41:27] ddfreyne_: has joined #ruby
[19:41:42] jenrzzz: has joined #ruby
[19:41:51] [spoiler]: has joined #ruby
[19:42:04] bascht: has joined #ruby
[19:42:07] jaxxstorm: has joined #ruby
[19:42:12] pen: has joined #ruby
[19:42:25] momomomomo: has joined #ruby
[19:42:27] george2: has joined #ruby
[19:43:05] jeregrine: has joined #ruby
[19:43:09] roolo: has joined #ruby
[19:43:58] Pumukel: has joined #ruby
[19:44:48] ivanskie: has joined #ruby
[19:45:21] khebbie: has joined #ruby
[19:45:24] cball: has joined #ruby
[19:46:34] wldcordeiro: has joined #ruby
[19:47:13] havenwood: diegoviola: I'm curious but missed your gists. Still have anything up?
[19:47:46] sgambino: has joined #ruby
[19:47:46] alekst_: has joined #ruby
[19:48:27] diegoviola: havenwood: sure, just trying to think how to split this into two classes https://gist.github.com/diegoviola/b9b37e9edde3483428be
[19:49:45] al2o3-cr: why would you set a constant to an ivar?
[19:49:55] rfmind_: has joined #ruby
[19:49:58] catbusters: has joined #ruby
[19:49:58] al2o3-cr: ignore that
[19:50:13] diegoviola: al2o3-cr: so just call the constant directly?
[19:50:18] yqt: has joined #ruby
[19:50:18] shevy: hey bootstrappster
[19:50:19] bootstrappm: what do you all think of this? https://github.com/frankpinto/cp-db
[19:50:23] diegoviola: al2o3-cr: ignore what?
[19:50:34] Mia: has joined #ruby
[19:50:34] Mia: has joined #ruby
[19:50:42] al2o3-cr: diegoviola: me today!
[19:50:49] shevy: bootstrappm needs larger readme!
[19:50:59] shevy: in particular "what happens after 'rake down'"
[19:51:10] bootstrappm: I still have to code up the loading portion of it and add some more dbs (mongo for the team)
[19:51:16] al2o3-cr: diegoviola: what is balance is init
[19:51:18] bootstrappm: but yes! you're right
[19:51:26] shevy: I am doing a large INSERT INTO statement into postgresql right now
[19:51:32] drbrain: has joined #ruby
[19:51:36] shevy: at work on clusters, that took 20 minutes, at home, it's already +2 hours now :(
[19:51:41] Dwarf: has joined #ruby
[19:51:46] diegoviola: al2o3-cr: better? https://gist.github.com/diegoviola/b9b37e9edde3483428be
[19:51:54] opensource_ninja: has joined #ruby
[19:52:00] bootstrappm: uff that's rough! I always tell the guys over here to run it from one of the AWS servers next to our product
[19:52:11] bootstrappm: so that they don't have to deal w/ the latency
[19:52:16] shevy: bootstrappm I usually just look at the initial readmes first anyway, it's my main entry point into another project
[19:52:30] sgambino_: has joined #ruby
[19:52:49] Mia: has joined #ruby
[19:52:49] Mia: has joined #ruby
[19:52:59] bootstrappm: by the initial readmes you mean what I sent or just like the first paragraph or something?
[19:53:12] al2o3-cr: diegoviola: i'm only a noob
[19:53:40] diegoviola: al2o3-cr: ok
[19:54:10] Motoservo: has joined #ruby
[19:54:13] shmilan: has joined #ruby
[19:55:07] teotwaki: has joined #ruby
[19:55:56] rbennacer: has joined #ruby
[19:56:04] prestorium: has joined #ruby
[19:56:14] Mia: has joined #ruby
[19:56:15] Mia: has joined #ruby
[19:56:32] Polysics: has joined #ruby
[19:57:11] drbrain: has joined #ruby
[19:58:21] andywojo: has joined #ruby
[19:59:25] al2o3-cr: why is chocolate so expensive :P
[19:59:47] diegoviola: al2o3-cr: I've just made that up
[20:00:46] krisquigley: has joined #ruby
[20:00:56] mandarinkin: has joined #ruby
[20:01:01] khebbie: has joined #ruby
[20:01:03] Mia: has joined #ruby
[20:01:03] Mia: has joined #ruby
[20:01:47] but3k4: has joined #ruby
[20:02:31] alphaatom: has joined #ruby
[20:04:26] platzhirsch: has joined #ruby
[20:05:31] Mia: has joined #ruby
[20:05:31] Mia: has joined #ruby
[20:06:56] TheNet: has joined #ruby
[20:07:32] melter: has joined #ruby
[20:08:11] khebbie: has joined #ruby
[20:08:17] bruno-: has joined #ruby
[20:09:49] Mia: has joined #ruby
[20:09:49] Mia: has joined #ruby
[20:09:58] snockerton: has joined #ruby
[20:12:51] blackmesa: has joined #ruby
[20:14:52] fullofcaffeine: has joined #ruby
[20:15:14] Musashi007: has joined #ruby
[20:15:42] Alayde: has joined #ruby
[20:15:49] luksaur: has joined #ruby
[20:15:57] Alayde: has joined #ruby
[20:16:12] northfurr: has joined #ruby
[20:16:58] alphaatom: has joined #ruby
[20:17:27] yfeldblum: has joined #ruby
[20:18:26] allcentu1: has joined #ruby
[20:19:23] Mia: has joined #ruby
[20:19:23] Mia: has joined #ruby
[20:19:37] frozen3: has joined #ruby
[20:20:07] lannonbr: has joined #ruby
[20:21:18] chichou: has joined #ruby
[20:21:56] momomomomo: has joined #ruby
[20:21:57] sdwrage: has joined #ruby
[20:22:18] arup_r: has joined #ruby
[20:22:35] Nightmare: has joined #ruby
[20:22:54] andywojo: has joined #ruby
[20:24:01] benlieb: has joined #ruby
[20:25:34] shevy: bootstrappm nono the full thing anyway, the initial "entry-page"; I think it's usually a README.md
[20:25:43] paulcsmith: has joined #ruby
[20:25:48] bootstrappm: ah, yes. okay
[20:26:49] devoldmx: has joined #ruby
[20:28:13] alphaatom: has joined #ruby
[20:28:49] anisha: has joined #ruby
[20:30:12] jenrzzz: has joined #ruby
[20:30:32] bronson: has joined #ruby
[20:30:33] Coldblackice: has joined #ruby
[20:30:33] Mia: has joined #ruby
[20:30:33] Mia: has joined #ruby
[20:30:41] mleung: has joined #ruby
[20:30:46] shmilan: has joined #ruby
[20:32:50] dfockler: has joined #ruby
[20:34:16] mwlang: has joined #ruby
[20:34:47] rbennacer: has joined #ruby
[20:34:57] robh71: has joined #ruby
[20:36:06] but3k4: has joined #ruby
[20:37:04] jimms: has joined #ruby
[20:37:32] jenrzzz: has joined #ruby
[20:38:47] ellisTAA: has joined #ruby
[20:40:50] skade: has joined #ruby
[20:43:06] paulcsmith: has joined #ruby
[20:48:11] shevy: I am trying to integrate an old project into an existing one
[20:48:26] shevy: now that I am almost halfway done... I should probably just have kept them separate :(
[20:49:13] dfockler: shevy: keep trudging
[20:49:52] krisquigley: has joined #ruby
[20:49:54] jenrzzz: has joined #ruby
[20:52:05] nettoweb: has joined #ruby
[20:52:14] kappy: has joined #ruby
[20:52:19] djbkd: has joined #ruby
[20:52:31] eightyeight: has joined #ruby
[20:52:38] ellisTAA: has joined #ruby
[20:53:00] eightyeight: getting the following error with a weechat ruby script: "NameError, uninitialized constant Encoding::ASCII_8BIT"
[20:53:23] eightyeight: ruby script here: https://weechat.org/scripts/source/zmq_notify.rb.html/
[20:53:47] user1138: has joined #ruby
[20:53:51] eightyeight: how can i fix the error, so the plugin will execute?
[20:56:35] dfockler: shevy: I had to decide if we wanted to rewrite an app that was in ruby but was awful, or try to fix it, we decided to rewrite it
[20:58:26] absolutejam: Is there a difference between `var1 = var2` and `var2 < var1` ?
[20:58:59] Anon_: has joined #ruby
[20:59:15] andywojo: has joined #ruby
[20:59:47] absolutejam: Oh crap, does that mean less than?
[20:59:58] al2o3-cr: absolutejam: var1 = var2 is assignment var1 < var2 well i don't think anyone knows that one
[21:00:12] al2o3-cr: absolutejam: yeap :)
[21:00:23] absolutejam: Didn't think about that. I'll show you what I meant...
[21:00:40] absolutejam: https://i.imgur.com/zpySzkw.png
[21:01:00] shevy: dfockler yeah, I did rewrite a few projects... about 3 of them are still not finished
[21:01:02] absolutejam: I meant the `<<` which is 'append to', right
[21:01:05] al2o3-cr: << is appending
[21:01:06] machinewar: has joined #ruby
[21:01:27] absolutejam: But is there a different between var += var2
[21:01:28] al2o3-cr: >> "foo" << " bar"
[21:01:29] ruboto: al2o3-cr # => "foo bar" (https://eval.in/419950)
[21:01:31] absolutejam: Or whatever the syntax would be
[21:01:58] ngscheurich: has joined #ruby
[21:02:06] al2o3-cr: absolutejam: yeah different object
[21:02:27] absolutejam: Hm, what do you mean sorry?
[21:02:35] al2o3-cr: shit i can't explain shit good
[21:02:49] absolutejam: hard to explain things to people with lower understanding sometimes
[21:03:03] jhass: absolutejam: yes, var << b is calling the method << on the object in var with the argument b, eg String#<<, var += b is short for var = var + b, that is calling the + method on var with the argument b, eg. String#+ and assigning the result back to var
[21:03:05] lagweezle: IIRC << is sometimes called the 'shovel operator' which... oh. It isn't an alias in the String class, but appears to be the same as concat
[21:04:13] Rubie: hi all: if i created a branch and checked it out in GIT and made changes, all without commiting and I want to disregard all of those changes and revert to how master was before, what command would i be looking for?
[21:04:15] absolutejam: Is there a difference in those methods though?
[21:04:23] jhass: rubie: #git
[21:04:26] absolutejam: String#<< and String#+
[21:04:36] jhass: &ri String#<< String#+
[21:04:36] `derpy: http://www.rubydoc.info/stdlib/core/String#%3C%3C-instance_method, http://www.rubydoc.info/stdlib/core/String#%2B-instance_method
[21:04:47] al2o3-cr: absolutejam: have you installed pry?
[21:04:51] rakm_: has joined #ruby
[21:05:01] absolutejam: No idea what that is al2o3-cr, so nope :P
[21:05:06] jhass: absolutejam: try to read the docs ^ and tell me ;)
[21:05:09] symm-: has joined #ruby
[21:05:15] al2o3-cr: ?pry absolutejam
[21:05:15] ruboto: absolutejam, 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` directly in your source code. Visit https://pryrepl.org/ or get it now with: gem install pry pry-doc
[21:05:58] al2o3-cr: <<(append) +(concatanation)
[21:06:13] yeticry: has joined #ruby
[21:06:23] jhass: eh, both is concatenation, the difference is on what they concatenate ;)
[21:06:24] al2o3-cr: and i can't even spell :p
[21:06:41] al2o3-cr: jhass: true
[21:07:04] al2o3-cr: like i say can't explain (the who)
[21:07:20] absolutejam: thanks al2o3-cr, I'll take a look
[21:07:28] absolutejam: I'm going through a book, but it's from 2009
[21:07:41] absolutejam: I assume the large portion of info will still be relevant though
[21:07:41] al2o3-cr: absolutejam: windows/linux/other?
[21:08:00] al2o3-cr: gem install pry pry-doc
[21:08:08] al2o3-cr: ^ absolutejam
[21:08:34] al2o3-cr: current ripping to bits pry
[21:09:02] chohe: has joined #ruby
[21:09:10] al2o3-cr: so many procs....
[21:09:14] dfockler: byebug is pretty nice too!
[21:09:20] lannonbr: has joined #ruby
[21:09:24] mandarinkin: has joined #ruby
[21:09:33] khebbie: has joined #ruby
[21:10:04] al2o3-cr: bye bye bugs (squash)
[21:11:56] shevy: you are a bug
[21:12:33] al2o3-cr: i though i was a gem
[21:12:37] banister: al2o3-cr why are you ripping to bits pry?
[21:12:58] al2o3-cr: to see how it works
[21:13:09] banister: found anything interesting?
[21:13:29] banister: al2o3-cr you can show-source on the commands too btw
[21:13:33] banister: so you can go: show-source ls
[21:13:39] banister: or even, show-source show-source
[21:15:44] al2o3-cr: banister: why the name?
[21:15:55] banister: al2o3-cr why what name
[21:16:06] banister: pry is an english word
[21:16:15] DelDotB: has joined #ruby
[21:16:30] banister: well, the word captures the nature of the program :)
[21:16:38] banister: to look inquisitively into something
[21:16:49] banister: i like the name actually
[21:17:10] al2o3-cr: just making sure, as you do
[21:17:47] tobyx: has joined #ruby
[21:18:06] al2o3-cr: banister: your decision?
[21:18:07] _whitelogger: has joined #ruby
[21:18:44] al2o3-cr: I like, it's simple and inquisitive
[21:19:24] al2o3-cr: i would of called it 'beast'
[21:19:27] elektronaut: has joined #ruby
[21:19:37] ekleog: I'm in the prrocess of documenting my gem, and if eg. I link using {Logger#debug} it does not create a link in the yard server. Should I assume proper linking will be made on rubygems.org?
[21:21:01] mwlang: ekleog: I???d look at another gem???s documentation and source to confirm that.
[21:21:25] Limix: has joined #ruby
[21:23:11] Rubie: has joined #ruby
[21:23:32] FernandoBasso: has joined #ruby
[21:24:34] ellisTAA: has joined #ruby
[21:24:39] Pupp3tm4st3r: has joined #ruby
[21:25:13] Azulinho: has joined #ruby
[21:25:34] Cronon: has joined #ruby
[21:27:40] DoubleMalt: has joined #ruby
[21:28:08] guilffer: has joined #ruby
[21:28:14] dopie: has joined #ruby
[21:28:43] ivanskie: has joined #ruby
[21:30:26] EminenceHC: has joined #ruby
[21:31:30] baweaver_: has joined #ruby
[21:31:51] ta: has joined #ruby
[21:32:02] Limix: Hi, is it possible to use factory girl to create seed data? Does it make sense to?
[21:32:10] pipework: You can, and sure.
[21:32:18] banister: al2o3-cr beast? why? :P
[21:32:49] al2o3-cr: banister: because pry is a beast :D
[21:33:05] bmurt: has joined #ruby
[21:33:51] ekleog: Can't seem to find any gem that links to anything outside it :/ Would it be possible to update the gem without bumping the version on rubygems, just to update the documentation?
[21:34:35] hahuang65: has joined #ruby
[21:34:43] BraddPitt: I love this: https://www.reddit.com/r/ruby/comments/3hnlxu/can_someone_do_a_fake_interview_with_me/cu93nqu
[21:35:06] jhass: ekleog: rubydoc.info can pull from github too, rubydoc.info/github/user/repo
[21:35:23] banister: al2o3-cr what features do u use
[21:35:53] al2o3-cr: banister: wtf
[21:37:02] j_mcnally: has joined #ruby
[21:37:06] al2o3-cr: but a serious note, pry is hmm... (fucking awesome)
[21:37:10] ekleog: jhass: Great, thanks!
[21:37:22] binaryplease: has joined #ruby
[21:38:02] ramfjord: has joined #ruby
[21:39:07] Limix: pipework, thanks, could you explain how this is done? I see that the factories with in the spec folder, how would I access them in the seed.rb? Is that the right place to access them any way?
[21:39:15] pipework: Limix: What have you tried?
[21:39:51] Limix: Nothing yet, just searching for docs on it still
[21:39:52] pipework: All you need to do is make sure that factory_girl is loaded and that your factories are registered.
[21:40:05] Limix: ok thank you
[21:40:08] pipework: Limix: Give it a go, and then come back if you need help with it.
[21:40:18] Limix: thanks will do
[21:40:22] ndrei: has joined #ruby
[21:41:12] renderful: has joined #ruby
[21:41:18] bubbys: has joined #ruby
[21:43:53] robh71: has joined #ruby
[21:45:32] eightyeight: getting the following error with a weechat ruby script: "NameError, uninitialized constant Encoding::ASCII_8BIT"
[21:45:43] eightyeight: ruby script here: https://weechat.org/scripts/source/zmq_notify.rb.html/
[21:45:51] eightyeight: how can i fix the error, so the plugin will execute?
[21:47:04] al2o3-cr: eightyeight: i don't trust that plugin (tabs)
[21:47:30] bmurt: has joined #ruby
[21:48:02] BraddPitt: #map creates a new object containing the results of the transformed data, right?
[21:48:09] BraddPitt: like it doesn't do in-place transformations for the #map call?
[21:48:09] eightyeight: al2o3-cr: why?
[21:48:51] al2o3-cr: why? two fat ladies
[21:49:49] blackmesa: has joined #ruby
[21:50:18] rbowlby: has joined #ruby
[21:51:50] blue_deref: has joined #ruby
[21:53:20] crdpink: has joined #ruby
[21:53:33] allcentu1: has joined #ruby
[21:54:15] rakm: has joined #ruby
[21:55:07] Esya: has joined #ruby
[21:56:37] shevy: BraddPitt yeah, I think you can find out by yourself too if you call .object_id
[21:56:46] jhn: has joined #ruby
[21:57:10] shevy: for in-place transformation the ! is usually used, such as via a .map! call
[21:57:25] shevy: one exception to this "rule" is class String, which has replace()
[21:57:29] al2o3-cr: BraddPitt: read the docs, all will avail
[21:58:28] BraddPitt: just did, thanks
[21:58:35] BraddPitt: never knew that `private` was a method call
[21:58:39] BraddPitt: guess I should have known better
[21:58:46] BraddPitt: fucking Eigenclasses man
[21:58:47] crdpink: has joined #ruby
[21:58:56] jhass: *singleton classes
[21:59:06] jhass: btw include and extend are method calls too
[21:59:07] diegoviola: has joined #ruby
[21:59:09] al2o3-cr: *ghost classes
[21:59:10] shevy: jhass you don't like the word eigenclass?
[21:59:12] dfockler: Eigenvectors man
[21:59:16] wheresmyjetpack: has joined #ruby
[21:59:27] bruno-: has joined #ruby
[21:59:33] dfockler: worst superhero ever
[21:59:35] shevy: Eigenklass would be even cooler
[21:59:54] jhass: >> Object.singleton_class
[21:59:55] ruboto: jhass # => #<Class:Object> (https://eval.in/419968)
[22:00:04] jhass: Ruby has decided on a name
[22:00:15] dfockler: >> Class.singleton_class
[22:00:16] ruboto: dfockler # => #<Class:Class> (https://eval.in/419969)
[22:00:23] dfockler: that's one classy class
[22:00:42] BraddPitt: jhass isn't a singleton class technically an eigenclass?
[22:00:55] wheresmyjetpack: can anyone reccomend a resource for learning common OOP design patterns in ruby?
[22:00:59] dfockler: is there a "thing" in ruby that can't have a super class?
[22:01:01] jhass: BraddPitt: somebody made the term eigenclass up some time ago
[22:01:20] jhass: it means the same thing as singleton class
[22:01:20] BraddPitt: wheresmyjetpack Practical Object Oriented Design In Ruby
[22:01:28] BraddPitt: wheresmyjetpack http://www.poodr.com/
[22:01:53] BraddPitt: I thought an eigenclass was a "mock" class inserted into the inheritance chain to avoid fucking things up
[22:02:06] wheresmyjetpack: BraddPitt: thanks. that looks perfect
[22:02:11] postmodern: has joined #ruby
[22:02:12] decoponio: has joined #ruby
[22:02:18] Limix: pipework works like a charm!
[22:02:24] jbw: has joined #ruby
[22:03:38] jobewan: has joined #ruby
[22:04:05] darwingr: +1 for POODR
[22:04:47] skade: has joined #ruby
[22:06:46] prestorium: has joined #ruby
[22:07:22] s00pcan: has joined #ruby
[22:07:34] skade: has joined #ruby
[22:07:44] barhum2013: has joined #ruby
[22:09:14] leat: has joined #ruby
[22:09:26] ddv: has joined #ruby
[22:09:31] nobitanobi: has joined #ruby
[22:09:53] emptyflask: has joined #ruby
[22:10:54] skade: has joined #ruby
[22:11:08] sepp2k: has joined #ruby
[22:11:13] al2o3-cr: shevy: what type of poodle you have?
[22:11:36] ekleog: Yet another question wrt yard: Is there a way to link to a method group?
[22:12:11] jenrzzz: has joined #ruby
[22:13:26] shevy: al2o3-cr I can not accept poodles
[22:14:05] skade: has joined #ruby
[22:15:19] al2o3-cr: shevy: why?
[22:16:06] Thermatix: has joined #ruby
[22:16:25] s00pcan: has joined #ruby
[22:16:27] baweaver: has joined #ruby
[22:17:03] riotjones: has joined #ruby
[22:18:12] ivanskie: my attempt at starting a meetup, so far, is a case of total sadness.
[22:19:26] chickyshack: has joined #ruby
[22:19:59] icarus: has joined #ruby
[22:20:34] robh71: has joined #ruby
[22:22:42] shevy: al2o3-cr a look alone suffices
[22:22:51] gamename: has joined #ruby
[22:22:54] shevy: ivanskie did you advertize via free beer?
[22:22:57] dfockler: ivanskie: I know that feeling
[22:23:07] shevy: people are lazy, you have to overcame the laziness barrier
[22:23:13] shevy: *overcome
[22:23:53] darwingr: has joined #ruby
[22:23:59] ivanskie: i just came up with an idea, find all local web design ppl and contact them. its a very very remote possibility any of them do anything other than wordpress theme, and html/css stuff.. but better chances than doing nothing.
[22:24:08] baweaver: has joined #ruby
[22:24:14] shevy: they use wordpress because they are lazy
[22:24:52] ivanskie: im pretty sure these are all ppl my age, who jumped on the "web design" band wagon from high school html/css class.
[22:25:06] ivanskie: nothing wrong with that of course.
[22:25:15] noname: has joined #ruby
[22:25:36] doublemalt_: has joined #ruby
[22:26:14] baweaver: where's local?
[22:27:34] devoldmx: has joined #ruby
[22:28:05] RegulationD: if you just needed a CMS though, why wouldn't you use wordpress?
[22:28:17] elepedus: has joined #ruby
[22:29:13] RegulationD: well aside from that... :)
[22:30:22] shevy: I am not sure what kind of people ivanskie knows
[22:30:51] blackmesa: has joined #ruby
[22:30:55] shevy: the people around me are extremely non-techie, save for one guy who is a certified microsoft teacher holding biweekly courses and getting overpaid
[22:30:56] ivanskie: php is the best answer to all those questions.. and shevy, i don't know many web developers.
[22:31:10] ivanskie: sounds like im in the same boat ll
[22:31:26] bronson: has joined #ruby
[22:32:05] ivanskie: looks like all the cool people (around here) moved to Vernon (2 hours away).
[22:32:26] ivanskie: so many little web design, web dev, shops. (ok so many as in, more than what we have around penticton, and more serious)
[22:32:55] blackmesa: has joined #ruby
[22:33:04] shevy: ok so you live as a hermit
[22:33:10] shevy: MOVE TO THE ACTION CENTERS OF THE WORLD
[22:33:14] havenwood: has joined #ruby
[22:33:28] einarj: has joined #ruby
[22:34:17] aredridel: has joined #ruby
[22:34:18] baweaver: Bay Area ftw.
[22:35:16] lagweezle: ACTION strongly dislikes going to San Francisco, but so many places there are hiring. >.<
[22:35:51] NeverDie: has joined #ruby
[22:36:01] shevy: the only reason I would go to San Francisco is to do a car chase scene live
[22:36:37] baweaver: ACTION lives in East Bay
[22:37:26] dgutierrez1287: has joined #ruby
[22:39:31] RandyT_: has joined #ruby
[22:40:12] Limix: has joined #ruby
[22:41:54] vdamewood: has joined #ruby
[22:42:15] jgt: has joined #ruby
[22:42:53] yfeldblum: has joined #ruby
[22:43:03] shevy: Hamsterdam!
[22:43:15] shevy: you are a beaver, not a hamster :(
[22:44:37] Torrieri: has joined #ruby
[22:45:30] aredridel: has joined #ruby
[22:45:33] baweaver: shevy: http://www.gagbay.com/images/2012/10/i_think_youve_confused_me_with_someone_who_builds_a_dam-166293.jpg
[22:45:47] diego2: has joined #ruby
[22:46:03] phutchins: has joined #ruby
[22:46:34] lagweezle: baweaver: bravo!
[22:46:40] ivanskie: baweaver lol
[22:47:13] diego2: has joined #ruby
[22:48:10] jpfuentes2: has joined #ruby
[22:49:42] leat: has joined #ruby
[22:50:14] jbw: has joined #ruby
[22:52:29] ivanskie: ooh looks like my "social marketing" on twitter is picking up steam. (mettup thing)
[22:53:17] ivanskie: if only, these guys were local :)
[22:53:57] shevy: move away from your 20 citizens village man
[22:54:02] shevy: go to New York
[22:55:12] choke: has joined #ruby
[22:55:14] jenrzzz: has joined #ruby
[22:56:42] neilnorthrop: has joined #ruby
[22:56:50] northfurr: has joined #ruby
[22:59:21] ivanskie: i like my village
[22:59:50] devdazed: has joined #ruby
[22:59:58] leat: has joined #ruby
[23:00:02] ivanskie: moved away from Vancouver. seriously don't miss the traffic.
[23:00:14] jhack: I'm a little confused as to what divmod does, can someone explain?
[23:00:39] jhack: oh wait nvm
[23:00:41] jhack: it just hit me
[23:00:46] radgeRayden: has joined #ruby
[23:02:25] jobewan: has joined #ruby
[23:02:47] shevy: jhack just the remainder of a division
[23:02:55] shevy: hmm does this word even exist...
[23:02:56] ligature: has left #ruby: ()
[23:03:05] Soviet_Jesus_: has joined #ruby
[23:04:00] shadoi: has joined #ruby
[23:04:04] robh71: has joined #ruby
[23:05:48] noethics: has joined #ruby
[23:05:49] jhack: shevy: so it outputs 2 nuumbers right?
[23:05:57] jhack: the remainder and another number
[23:06:25] bootstrappm: has left #ruby: ()
[23:10:41] shevy: 6.divmod 2 # => [3, 0]
[23:10:47] shevy: 6 / 2 -> 3, remainder 0
[23:10:51] dfockler: has joined #ruby
[23:10:54] jhass: shevy: remainder does exist, but it's not the same as modulo
[23:11:01] jhass: similar, but not the same
[23:11:25] shevy: your two nicks are so similar
[23:11:34] RandyT_: has joined #ruby
[23:11:39] Limix: has joined #ruby
[23:11:41] jhass: jhack: it's short for division, modulo = a / b, a % b
[23:13:08] noname1: has joined #ruby
[23:13:52] charliesome: has joined #ruby
[23:15:49] Musashi007: has joined #ruby
[23:16:56] diegoaguilar: has joined #ruby
[23:17:14] WhereIsMySpoon_: has joined #ruby
[23:17:38] WhereIsMySpoon_: I just read that if-end and similar blocks dont introduce a new variable scope whereas block s scopes using {} do..is this true?
[23:18:01] WhereIsMySpoon_: if so, why? that seems very strange to me
[23:18:26] allcentu1: has joined #ruby
[23:18:49] Ox0dea: has joined #ruby
[23:18:52] hahuang65: has joined #ruby
[23:18:54] blue_deref: WhereIsMySpoon_: If I had to guess, for convenience
[23:19:22] jhass: yes, it's true. And convenient
[23:19:22] blue_deref: WhereIsMySpoon_: just so you can initialize a variable for the outer block based on a condition
[23:19:58] WhereIsMySpoon_: if you want that then declare it outside and change it inside, it seems very counter to every other language's architecture to have this
[23:20:04] Ox0dea: WhereIsMySpoon_: Would you *want* block locals to leak into the outer scope?
[23:20:08] jhass: if it becomes any kind of issue it's a sign that you should split into smaller methods anyway
[23:20:12] robh71: has joined #ruby
[23:20:15] WhereIsMySpoon_: thats why im asking
[23:20:36] WhereIsMySpoon_: Ox0dea: im weirded out by the fact that if-end and similar blocks leak
[23:20:49] Ox0dea: But it's no different from virtually any other language?
[23:21:15] jhats: Ox0dea: if-else not creating a new scope is not very common
[23:21:22] WhereIsMySpoon_: every other language's block structures initialize a new variable scope
[23:21:59] Ox0dea: Hm, yes, I was thinking in the context of modifying variables from outer scopes.
[23:22:23] al2o3-cr: wait, there's jhass, jhack and jhats no wounder i'm confused
[23:22:43] ivanskie: is there a jass ?
[23:23:54] WhereIsMySpoon_: jhass/jhats so whats the reason why ruby decided it was special and would allow this
[23:24:05] jhats: I told you
[23:24:08] jhats: convenience
[23:24:30] jhats: though I don't find it convenient, myself
[23:24:35] jhats: jhass finds it convenient
[23:24:40] WhereIsMySpoon_: i can make all my member variables public and my database accessible from anywhere
[23:24:43] WhereIsMySpoon_: that may be convenient
[23:24:44] Ox0dea: Then again, if you rely on a conditional to initiaize a variable, you might be doing something wrong.
[23:24:52] Ox0dea: *initialize
[23:25:06] jhats: WhereIsMySpoon_: As I tried to imply, you're talking to the wrong people. E-mail Matz.
[23:25:16] jhats: He'll change it.
[23:26:00] Ox0dea: WhereIsMySpoon_: Would you mind posting the code where this semantics proved problematic for you?
[23:26:18] jhass: it's really a non-issue in practice
[23:26:33] jhass: if it becomes an issue your code is very likely horrible for other reasons
[23:26:38] WhereIsMySpoon_: it isnt an issue for me
[23:26:41] WhereIsMySpoon_: i just saw it in a forum discussion
[23:26:44] WhereIsMySpoon_: and thought it was very strange
[23:26:50] WhereIsMySpoon_: i didnt know about it till nw
[23:26:53] Ox0dea: WhereIsMySpoon_: WPM?
[23:27:26] WhereIsMySpoon_: i can acronym too? what is wpm
[23:27:32] jhats: jhass: be polite, come on
[23:27:37] Ox0dea: WhereIsMySpoon_: "WPM" is an initialism.
[23:28:10] WhereIsMySpoon_: i ask again, what is WPM
[23:28:29] Ox0dea: I don't know that I've ever met a "tech" person that was unfamiliar with it.
[23:28:34] WhereIsMySpoon_: words per minute?
[23:28:52] barhum2013: has joined #ruby
[23:28:52] WhereIsMySpoon_: ok i thought that but then though it was irrelevant to the conversation
[23:28:52] Ox0dea: You types mighty fast-like is all.
[23:28:57] WhereIsMySpoon_: so i thought it couldnt be that
[23:29:01] kies: has joined #ruby
[23:29:05] sargas: has joined #ruby
[23:29:13] Ox0dea: Duly noted. /ban random compliments
[23:29:13] jhats: Ox0dea: I didn't recognize the term in the context you used it...
[23:29:17] WhereIsMySpoon_: i dunno like 120+
[23:29:29] WhereIsMySpoon_: Ox0dea: sorry man
[23:29:34] binaryplease1: has joined #ruby
[23:29:38] WhereIsMySpoon_: didnt mean it that way
[23:29:50] WhereIsMySpoon_: we were just talking about scopes then suddenly you ask about words per minute
[23:29:55] WhereIsMySpoon_: confused me thats all
[23:31:19] xwct: has joined #ruby
[23:32:08] System42: has joined #ruby
[23:32:59] Ox0dea: WhereIsMySpoon_: In any case, your Return key does not appreciate the abuse.
[23:33:14] WhereIsMySpoon_: yea i do that a lot sorry
[23:33:33] Ox0dea: My theory is that some people do that to advertise their typing speed.
[23:33:50] WhereIsMySpoon_: uh..i couldnt give 2 shits about my typing speed
[23:34:08] Ox0dea: But could you give one?
[23:34:09] WhereIsMySpoon_: i just think in small chunks and type as I think and it results in many lines
[23:35:11] WhereIsMySpoon_: i try to pare it down in irc cause i know it isnt nice to fill up half a screen with 5 word lines but sometimes my brain gets the better of me
[23:35:47] Ox0dea: No worries. Still, we should race. :P
[23:35:58] shevy: you people talk a lot about words per minute!
[23:36:11] Ox0dea: > you people
[23:36:21] Aeyrix: >you people
[23:36:25] northfurr: has joined #ruby
[23:36:32] Ox0dea: shevy: Perturbations?
[23:38:06] choke: has joined #ruby
[23:38:52] Ox0dea: Aeyrix: I can't find that imgur album. :(
[23:39:32] jenrzzz: has joined #ruby
[23:39:53] ekleog: A (hopefully) last question about yard: is there a way to force it to output methods in some order? I've designed methods that naturally flow in one way in the class prototype, but yard insists on sorting them alphabetically :/
[23:40:15] veduardo: has joined #ruby
[23:41:30] Aeyrix: Ox0dea: http://imgur.com/a/Mqaf6 ?
[23:41:38] Ox0dea: ekleog: http://git.io/vs4Tk
[23:42:01] Ox0dea: Aeyrix are based meme speshulist.
[23:42:12] Ox0dea: I recall it being titled "last night" or some such, but this is clearly it.
[23:42:33] Ox0dea: Hm, no, many are missing. :/
[23:42:40] dorei: >> !!"something"[/some/i]
[23:42:41] ruboto: dorei # => true (https://eval.in/419986)
[23:42:42] NightMonkey: has joined #ruby
[23:42:50] dorei: is there something more beautiful than this ^^ ?
[23:43:08] skade: has joined #ruby
[23:43:25] Ox0dea: dorei: Euler's identity?
[23:43:27] noname1: has joined #ruby
[23:43:40] crdpink2: has joined #ruby
[23:43:41] ekleog: Ox0dea: :/ thanks anyway!
[23:43:53] Ox0dea: ekleog: You're free to redefine it?
[23:43:59] Aeyrix: >>"something"[/some/i]
[23:44:00] ruboto: Aeyrix # => "some" (https://eval.in/419987)
[23:44:03] Aeyrix: oh that's why
[23:44:08] dorei: i want true/false
[23:44:14] Ox0dea: dorei: How come?
[23:44:18] dorei: is there some method to give me true/false ?
[23:44:26] dorei: it'll endup in a db
[23:44:37] Ox0dea: Needs more implicit conversion.
[23:44:39] ekleog: Ox0dea: Wait, I'm allowed to redefine a function and rubygems will allow me to run arbitrary code?
[23:44:47] Ox0dea: ekleog: Well, yes.
[23:44:53] Motoservo: has joined #ruby
[23:44:58] Ox0dea: s/function/method/, though.
[23:44:58] diegoaguilar: has joined #ruby
[23:45:11] jenrzzz: has joined #ruby
[23:45:13] ekleog: Mmhm, guess I'll go back to studying yard
[23:45:17] Aeyrix: s/method/pedantry
[23:45:20] ekleog: (and one point on the bingo)
[23:45:22] Ox0dea: Nothing is truly off-limits in Ruby.
[23:45:25] Aeyrix: ekleog: :D
[23:45:30] Aeyrix: DID SOMEONE SAY
[23:45:30] Ox0dea: Well, precious few things, anyhow.
[23:45:36] Aeyrix: w e w l a d
[23:45:41] nfk: has joined #ruby
[23:45:43] dorei: >> /some/i === 'Something'
[23:45:44] ruboto: dorei # => true (https://eval.in/419988)
[23:46:04] Ox0dea: Case equality is best equality.
[23:46:07] dorei: i think it's more ugly than the !! version :(
[23:46:09] charliesome: has joined #ruby
[23:46:37] Ox0dea: dorei: !! is fine, really.
[23:46:53] dorei: i'll take your word for it :)
[23:46:59] jhass: I somehow prefer !x.nil?
[23:47:05] Ox0dea: jhass: I almost suggested it.
[23:47:06] icharlie: has joined #ruby
[23:47:11] sarkyniin: has joined #ruby
[23:47:30] Ox0dea: dorei: You could always grep your gem directory?
[23:48:07] Ox0dea: Huh, the style guide agrees with jhass.
[23:48:28] jhass: it's more explicit about the values you expect
[23:49:18] Limix: has joined #ruby
[23:49:44] skade: has joined #ruby
[23:49:53] dfockler: I wish there was a .not_nil?
[23:50:02] northfurr: has joined #ruby
[23:50:11] jhass: mmh, but yeah we got casecmp but nothing for case insensitive include?, it's kinda missing
[23:50:18] shadoi: has joined #ruby
[23:50:26] shevy: dfockler good point
[23:50:32] Ropeney: has joined #ruby
[23:50:40] Torrieri: has joined #ruby
[23:51:08] dfockler: include? doesn't allow for case insensitivity?
[23:51:31] Ox0dea: dfockler: Of course not?
[23:51:55] dfockler: not even with a flag or something
[23:52:39] skade: has joined #ruby
[23:53:05] Ox0dea: dfockler: There's #grep + /regex/i.
[23:53:37] Ox0dea: Case-insensitive #include? would be crazy.
[23:53:50] baweaver: has joined #ruby
[23:53:59] dfockler: I wouldn't expect it to be by default
[23:54:34] dfockler: I guess you can do any? on an enum
[23:55:34] skade: has joined #ruby
[23:55:50] saddad: has joined #ruby
[23:57:07] veduardo: has joined #ruby
[23:57:26] stardiviner: has joined #ruby
[23:58:44] Ox0dea: Aeyrix: https://imgur.com/a/DFLP4/
[23:59:14] Aeyrix: >Big Meaty Dicks
[23:59:19] casadei_: has joined #ruby