« Back to channel list

#ruby - 23 June 2015

« Back 1 day Forward 1 day »
[00:00:06] havenwood: _blizzy_: What are you trying to do?
[00:00:14] havenwood: _blizzy_: Err, what's the context rather?
[00:00:35] _blizzy_: I'm listening to a websocket, so I was using EventMachine so it could loop.
[00:01:16] toretore: _blizzy_: gist some code, it's much easier to give advice that way
[00:01:26] radens: baweaver: havenwood I installed xcode, I think the command line tools are installed too
[00:02:09] havenwood: radens: Open up XCode once if you haven't already.
[00:02:26] havenwood: radens: Double check: xcode-select --install
[00:02:43] havenwood: radens: Confirm already installed ^
[00:02:53] vikaton: has joined #ruby
[00:03:00] radens: code-select: error: command line tools are already installed,
[00:03:17] Radar: http://ryanbigg.com/2015/06/mac-os-x-ruby-ruby-install-chruby-and-you/
[00:03:32] Radar: ACTION is shocked, SHOCKED, that the blog post hasn't been linked yet
[00:03:35] f0ster: has joined #ruby
[00:03:45] jasonw22: I'm trying to 'gem install ffi' on yosemite, failing with a 'install development tools first' error even though development tools are installed via 'xcode-select --install'. gem_make.out is here: https://gist.github.com/jasonw22/20204fd1762de35f6e44 and mkmf.log is here: https://gist.github.com/jasonw22/55f310a0c6176221e419 any ideas?
[00:04:06] Radar: jasonw22: Gists can contain multiple files FYI
[00:04:13] Radar: Oh I see the problem, ".rvm"
[00:04:39] havenwood: jasonw22: Install XCode.
[00:04:49] jasonw22: Radar: is that a problem?
[00:04:54] Radar: jasonw22: imo, yes
[00:04:55] jasonw22: havenwood: XCode is installed
[00:04:57] Aeyrix: Radar: We can never remember which order those words go in so
[00:05:05] havenwood: jasonw22: xcode-select --version
[00:05:09] Aeyrix: You could add it as a bot command?
[00:05:12] havenwood: jasonw22: xcode-select --install
[00:05:31] jasonw22: havenwood xcode-select version 2339
[00:05:38] havenwood: jasonw22: Good, that's latest.
[00:05:45] havenwood: jasonw22: And tools already installed?
[00:05:51] jasonw22: yes (as noted above)
[00:06:02] jasonw22: havenwood: yes
[00:06:23] havenwood: jasonw22: Is there an "Install XCode" in your Applications folder?
[00:06:31] jaycee: has joined #ruby
[00:06:48] Radar: jasonw22: Do you mind going through http://ryanbigg.com/2015/06/mac-os-x-ruby-ruby-install-chruby-and-you/ and letting me know if that fixes the issue for you? Implode your RVM install first (rvm implode)
[00:06:48] havenwood: jasonw22: (I expect this will all check out, just confirming.)
[00:06:49] jasonw22: havenwood: no. xcode is installed. used it this morning
[00:07:07] havenwood: jasonw22: Reinstall the Ruby with RVM or as Radar suggests.
[00:08:08] radens: havenwood: I have xcode, I installed ruby with rbenv, I still can't get the ruby devel headers
[00:08:30] Radar: radens: Can you go through the guide I linked to as well? Remove your .rbenv install.
[00:08:35] Radar: Remove your .rbenv install first*
[00:08:49] ledestin: has joined #ruby
[00:08:58] Vile`: has joined #ruby
[00:09:00] havenwood: radens: Just curious, but confirm?: xcode-select --print-path
[00:09:04] nettoweb: has joined #ruby
[00:09:21] radens: havenwood: /Applications/Xcode.app/Contents/Developer
[00:09:31] havenwood: radens: All good.
[00:10:51] fabrice31: has joined #ruby
[00:11:45] CloCkWeRX: has joined #ruby
[00:13:33] Azure: has joined #ruby
[00:15:16] mizaki: hello :) Could anyone help me out with something regarding heroku and puma installation?
[00:16:00] havenwood: mizaki: Ask away.
[00:16:11] nettoweb: has joined #ruby
[00:16:48] rht: has joined #ruby
[00:17:35] jasonw22: Radar, havenwood: same issue using system ruby: https://gist.github.com/jasonw22/20204fd1762de35f6e44
[00:17:37] gccostabr: has joined #ruby
[00:17:45] _blizzy_: please ignore the messy code. it's not on github yet for a reason. :P anyway, https://gist.github.com/NotBlizzard/1bd57d2f533cf574b0d3, I'm trying to run multiple instances of Battle (line 116 has 1) without them blocking each other. like in go, go has 'go function()'
[00:17:49] Radar: jasonw22: Ok, can you please try the blog post that I linked to?
[00:17:51] _blizzy_: ho would I achieve this in ruby.
[00:17:59] bkxd: has joined #ruby
[00:18:14] jasonw22: Radar: sure, sorry, I didn't see the link?
[00:18:26] jasonw22: Radar: sure, sorry, I didn't see the link?
[00:18:26] Radar: [10:06:53] <Radar> jasonw22: Do you mind going through http://ryanbigg.com/2015/06/mac-os-x-ruby-ruby-install-chruby-and-you/ and letting me know if that fixes the issue for you? Implode your RVM install first (rvm implode)
[00:19:09] jasonw22: ah, just now seeing the link, sorry i missed that
[00:20:06] sevenseacat: has joined #ruby
[00:21:00] Radar: no worries
[00:21:56] dgutierrez1287: has joined #ruby
[00:23:05] _blizzy_: I'm curious to how I would achieve concurrency in ruby 2.2
[00:23:14] _blizzy_: without blocking.
[00:23:15] mizaki: When I try to install puma it gives me a message that says that it couldn't create makefile because of some issue with headers
[00:23:27] _blizzy_: mizaki, puma won't install friendly on windows.
[00:23:32] _blizzy_: that's if you're running windows.
[00:24:04] mizaki: well what do I do in order to work with heroku since it's default is puma
[00:24:08] psyprus: has joined #ruby
[00:25:11] bkxd: has joined #ruby
[00:25:57] jasonw22: hmm, ruby-install is failing with 'clang version 3.0 or later is required'
[00:26:48] tcrypt: has joined #ruby
[00:27:19] havenwood: jasonw22: Open XCode and check the selection under XCode < Preferences < Locations < Command Line Tools.
[00:27:29] robustus: has joined #ruby
[00:28:23] jasonw22: havenwood: Xcode 6.3.2 (6D2015)
[00:28:42] jasonw22: havenwood: Xcode 6.3.2 (6D21015)
[00:28:48] jasonw22: havenwood Xcode 6.3.2 (6D21015)
[00:28:49] slawrence00: has joined #ruby
[00:28:49] havenwood: Yeah, that's latest stable.
[00:29:12] olso: has joined #ruby
[00:29:16] havenwood: jasonw22: gcc --version
[00:29:46] jasonw22: Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
[00:30:02] jasonw22: weird, also got a traceback from that
[00:30:10] havenwood: jasonw22: Next line?
[00:30:14] olso: if 1 is Fixnum, and 1.0 is Float; why is 1.0 == 1 true? (same with ===)
[00:30:20] renier: has joined #ruby
[00:30:44] jasonw22: havenwood https://gist.github.com/jasonw22/424c95917d474b9d7b37
[00:30:49] pengin: has joined #ruby
[00:31:21] kobain: has joined #ruby
[00:31:57] jack_rabbit_: has joined #ruby
[00:32:23] olso: are Fixnums just aliased Floats?
[00:32:35] freerobby: has joined #ruby
[00:32:53] jasonw22: and clang --version only returns the traceback (same traceback)
[00:33:53] havenwood: jasonw22: And `which -a gcc` and `which -a clang` just show the /usr/bin locations?
[00:34:08] kahunaio: has joined #ruby
[00:34:10] havenwood: [Errno 35] Resource temporarily unavailable
[00:34:27] jasonw22: havenwood: i also have /usr/local/bin/gcc
[00:34:41] Rubie: has joined #ruby
[00:34:46] jasonw22: but that's symlinked to /usr/bin/gcc
[00:34:57] havenwood: jasonw22: brew unlink gcc
[00:35:10] jasonw22: no such keg
[00:35:16] olso: is_a? says the right thing
[00:35:18] havenwood: hrm, where'd that gcc come from?
[00:35:33] Rollabunna: has joined #ruby
[00:35:38] havenwood: olso: Fixnum and Floats are both Numeric.
[00:35:38] jasonw22: shrug. it's kind of a meaningless symlink, i'd think
[00:35:56] havenwood: jasonw22: I just wonder where that gcc even came from if not Homebrew?
[00:36:21] havenwood: jasonw22: ohh, gotcha - i thought you meant symlinked the other direction
[00:36:35] _blizzy_: ugh, my script keeps blocking
[00:36:39] jasonw22: $ ls -la /usr/local/bin/gcc
[00:36:39] jasonw22: lrwxr-xr-x 1 root 12 Jun 22 11:08 /usr/local/bin/gcc -> /usr/bin/gcc
[00:36:48] Oog: has joined #ruby
[00:36:52] havenwood: jasonw22: It's acting like you're exceeding maximum number of open file descriptors or something.
[00:37:05] bronson: has joined #ruby
[00:37:10] havenwood: jasonw22: remove that symlink
[00:37:19] jasonw22: havenwood: ya. which is odd because resources usage is low. but i should probably reboot, perhaps
[00:37:41] havenwood: jasonw22: It seems turning it off and back on again is a deep magic.
[00:37:51] havenwood: Usually works. ;)
[00:37:51] Oog: has joined #ruby
[00:38:02] jasonw22: definitely can be magical for releasing borked resources
[00:38:13] jpfuentes2: has joined #ruby
[00:38:30] jasonw22: but i'm gonna try ruby-install again now that i've removed the symlink, and if that fails, reboot (and fix my IRC client while I'm at it)
[00:38:36] ruboto: olso, Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting ???binding.pry??? directy in your source code. Visit https://pryrepl.org/ or get it now with gem install pry pry-doc
[00:39:13] jokester: has joined #ruby
[00:39:36] havenwood: olso: Compare `ls 1` and `ls 1.0`. Also take a peek at `1.ancestors` and `1.0.ancestors`.
[00:40:09] havenwood: Oops, I mean `1.class.ancestors` and `1.0.class.ancestors`. **
[00:41:18] havenwood: olso, ah, left before I could explain Comparable: http://ruby-doc.org/core/Comparable.html
[00:42:14] havenwood: mizaki: You can just use WEBrick in development, yeah?
[00:43:08] sdwrage: has joined #ruby
[00:43:22] passbe1: has joined #ruby
[00:43:27] commondream: has joined #ruby
[00:43:30] havenwood: mizaki: It's an alternative to Puma that ships with Ruby.
[00:43:33] mizaki: I'm just setting my stuff up for my class next semester and this is what it's telling me to do and I can't
[00:44:20] passbe1: im in irb, ruby 2.2.1. have a method which is calling exec() and after this method runs irb drops me to my shell prompt, not back to the irb shell. the method should return true, ideas ?
[00:44:23] mizaki: Will WEBrick work with heroku?
[00:44:36] mizaki: or should I just go ahead and get unbuntu
[00:46:17] jasonw22: has joined #ruby
[00:46:30] havenwood: mizaki: Yeah, WEBrick works fine with Heroku though it's performance isn't great. You can also use a different webserver in development than you do in production. Unfortunately Ubuntu doesn't ship with latest stable Ruby but Brightbox does maintain packages for Ubuntu.
[00:47:05] havenwood: mizaki: Are you familiar with any particular GNU/LInux distro?
[00:47:48] havenwood: mizaki: If you're comfortable with Ubuntu I'd vote Brightbox package ruby2.2.
[00:47:58] baroquebobcat: has joined #ruby
[00:48:08] mizaki: not at all
[00:48:23] mizaki: I'm new to the world of programming...
[00:49:26] havenwood: mizaki: Fedora, ArchLinux and other distros ship with a nice latest stable Ruby available via the package manager.
[00:49:51] jasonw22: has joined #ruby
[00:49:58] devdazed: has joined #ruby
[00:50:31] ruv: has joined #ruby
[00:50:35] havenwood: mizaki: Vagrant can be a quick way to get going: https://www.vagrantup.com/
[00:51:20] havenwood: mizaki: If you want to just explore, I think you'll be fine using WEBrick on Windows. For the long run switching to a BSD or GNU/LInux box will probably be an easier and more fruitful path.
[00:51:45] jasonw22: havenwood: same Errno 35 after reboot :-(
[00:52:35] havenwood: passbe1: exec replaces the process, so there's no old process to go back to
[00:52:41] havenwood: jasonw22: eek
[00:53:05] havenwood: passbe1: http://ruby-doc.org/core/Kernel.html#method-i-exec
[00:53:51] passbe1: havenwood: ahh ok, so inside my method should i use the backticks method or something else ?
[00:53:53] tlarevo: has joined #ruby
[00:54:49] havenwood: passbe1: Yeah, if you just need stdout Kernel#` sounds good.
[00:56:01] passbe1: havenwood: ok cheers, will give that a whilr
[00:56:37] havenwood: passbe1: If you want stdin and stdout there's IO::popen or for more options see Open3.
[00:56:46] quazimodo: if I have class Foo < Hash
[00:57:05] quazimodo: how do I prepopulate it with data in def initialize
[00:57:32] quazimodo: def initialize; self[:zed] = "zed", self[:bar] = "bar"; end
[00:57:33] havenwood: passbe1: Open3 lets you do stdout and stderr separately or merged. Lots of options.
[00:57:39] quazimodo: or do we have some sort of @object
[00:57:41] effeeee: has joined #ruby
[00:58:19] gkra_: has joined #ruby
[00:58:32] effeeee: how bad of an idea would it be to pass along state in an exception? for example have an exception, that holds a list with all errors, that occured during a computation
[00:59:07] addisonh: has joined #ruby
[00:59:14] rickmasta: has joined #ruby
[00:59:20] passbe1: havenwood: i really just want to know if it fails or not which is why i was chasing the boolean return type of exec
[00:59:27] dgutierrez1287: has joined #ruby
[00:59:36] havenwood: passbe1: Kernel#system
[00:59:44] addisonh: has left #ruby: ()
[00:59:59] Scripore: has joined #ruby
[01:00:01] havenwood: passbe1: http://ruby-doc.org/core/Kernel.html#method-i-system
[01:00:15] passbe1: ah thats what i want! cheers havenwood
[01:03:28] dgutierrez1287: has joined #ruby
[01:05:06] zenguy_pc: has joined #ruby
[01:05:47] yoongkang: has joined #ruby
[01:06:21] havenwood: _blizzy_: So is the Faraday requests you want to make in parallel?
[01:06:51] _blizzy_: havenwood, actually, I figured it out. :P thanks for the earlier help.
[01:07:01] _blizzy_: it was something completely different to my question.
[01:07:08] havenwood: _blizzy_: Ah, what was it?
[01:07:19] Soda: has joined #ruby
[01:07:22] _blizzy_: havenwood, well, I figured out I didn't need to use threads or fibers.
[01:07:28] _blizzy_: when I could just store things in a hash.
[01:07:36] djellemah_: has joined #ruby
[01:07:57] havenwood: _blizzy_: Typhoeus is great if you haven't checked it out. It's one of the adapters Faraday supports: https://github.com/lostisland/faraday/wiki/Parallel-requests
[01:08:10] _blizzy_: havenwood, thxs for the link.
[01:08:41] amclain: has joined #ruby
[01:10:23] havenwood: _blizzy_: Yeah, a Hash is threadsafe in CRuby because of the GVL but for non-GVL implementations you'll want to synchronize Hash read and write access with a Mutex lock.
[01:10:49] havenwood: Or use a Queue.
[01:10:52] _blizzy_: havenwood, oh ok. thxs. :)
[01:12:52] choke: has joined #ruby
[01:13:40] havenwood: _blizzy_: You're welcome. I keep forgetting you're using websockets... Interesting idea! Just use Faraday and drop RestClient.
[01:13:58] _blizzy_: havenwood, ok.
[01:14:02] baroquebobcat: has joined #ruby
[01:14:50] workmad3: has joined #ruby
[01:15:23] Yiota: has joined #ruby
[01:16:22] havenwood: _blizzy_: If you want an adventure, implement the same with DRb and Rinda::TupleSpace from Ruby's stdlib.
[01:16:22] choke: has joined #ruby
[01:16:34] _blizzy_: havenwood, hmm.
[01:16:55] havenwood: http://ruby-doc.org/stdlib/libdoc/drb/rdoc/DRb.html
[01:17:07] havenwood: http://ruby-doc.org/stdlib/libdoc/rinda/rdoc/Rinda/TupleSpace.html
[01:18:50] bb010g: has joined #ruby
[01:18:55] Rubie: has joined #ruby
[01:19:30] havenwood: _blizzy_: https://www.youtube.com/watch?v=IlGD8lAUMoA
[01:19:42] _blizzy_: thxs for the links, havenwood.
[01:19:47] havenwood: _blizzy_: de nada
[01:20:15] jasonw22: has joined #ruby
[01:22:52] nahtnam: has joined #ruby
[01:22:56] dstarh: has joined #ruby
[01:23:41] arup_r: has joined #ruby
[01:27:17] xcesariox: has joined #ruby
[01:28:20] weaksauce: has joined #ruby
[01:29:53] datanoise: has joined #ruby
[01:30:02] Rollabunna: has joined #ruby
[01:31:35] tkuchiki: has joined #ruby
[01:32:54] thiesen: has joined #ruby
[01:33:23] weaksauce: has joined #ruby
[01:37:16] jasonw22: havenwood: I've managed to narrow my problem down to this traceback: https://gist.github.com/jasonw22/192cd980c2a0addbf08a
[01:37:33] jasonw22: basically 'clang --version' starts up hundreds of Python processes until it can't fork any more and fails
[01:37:41] jasonw22: any use of clang does the same thing
[01:40:28] havenwood: Python zombie processes?
[01:40:41] Ropeney: has joined #ruby
[01:41:02] jasonw22: Python processes. dunno why clang is forking them. they die when the traceback happens
[01:42:21] eam: jasonw22: what does "file" tell you about the clang binary?
[01:43:04] jasonw22: eam: file /usr/bin/clang
[01:43:21] jasonw22: . /usr/bin/clang: Mach-O 64-bit executable x86_64
[01:43:26] drewo: has joined #ruby
[01:44:23] eam: what about /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
[01:44:52] freerobby: has joined #ruby
[01:45:00] jasonw22: it says: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang: a python script text executable
[01:45:08] eam: so there's your problem
[01:45:10] eam: what's in it?
[01:45:24] eam: that *should* be a Mach-O 64-bit executable
[01:45:53] havenwood: jasonw22: Where clang once was a snake now resides.
[01:45:57] jasonw22: first three lines of the python script are
[01:45:59] jasonw22: #!/usr/bin/env python
[01:45:59] jasonw22: # This is just clang proxy. Actual clang is in clang.backup
[01:46:00] jasonw22: # == CLANG_PROXY ==
[01:46:14] eam: so you've got something funny installed - probably reinstall xcode
[01:46:38] eam: figure out why something installed a clang proxy on you (which doesn't work)
[01:47:05] havenwood: Zombie snakes!
[01:47:10] jasonw22: how irritating
[01:47:19] jasonw22: but thank you eam, much appreciated
[01:47:21] NeverDie: has joined #ruby
[01:47:21] eam: the tipoff is that the python error mentioned line 92 of bin/clang
[01:47:49] eam: which means the python interpreter thought it was actually running on that file (and it probably knows what it's talking about)
[01:48:34] Rubie: has joined #ruby
[01:49:22] dopie: has joined #ruby
[01:50:04] avahey: has joined #ruby
[01:50:30] minmax: has joined #ruby
[01:50:58] mark[oz]: has joined #ruby
[01:51:44] havenwood: quazimodo: class HashIsh < Hash; def initialize; self.merge!({zed: 'zed', foo: 'bar'}); super end end; HashIsh.new
[01:52:52] havenwood: >> class HashIsh < Hash; def initialize; merge!({zed: 'zed', foo: 'bar'}); super end end; HashIsh.new
[01:52:53] ruboto: havenwood # => {:zed=>"zed", :foo=>"bar"} (https://eval.in/385874)
[01:53:03] jasonw22: eam: that script turns out to be dyci-clang.py which comes with XCode Dynamic Code Injection plugin, which i ended up installing as a result of playing with http://audiokit.io/playgrounds/
[01:53:08] jasonw22: mystery solved
[01:54:23] Yiota: has joined #ruby
[01:54:34] bruno-: has joined #ruby
[01:54:45] havenwood: quazimodo: You might also want to allow an #initialize default argument we well. Without parens the arg and any block will be passed to super.
[01:55:09] baweaver: has joined #ruby
[01:55:14] havenwood: Was up one row and to the right one column on my keyboard. >.>
[01:55:31] havenwood: Back in line fingers!
[01:58:23] Derasi: I'm looking for help with Devise. Should the Devise user model handle profile pages for each user, or should a separate model be created for handling profile pages?
[01:58:38] pontiki: has joined #ruby
[01:58:49] fabrice31: has joined #ruby
[01:59:03] ellisTAA: has joined #ruby
[01:59:03] zacts: has joined #ruby
[01:59:09] zacts: ruby my dear
[01:59:28] tlarevo: has joined #ruby
[02:02:07] Xiti: has joined #ruby
[02:02:56] freedrull: rack 1.6.3 and 1.6.4 were both released on june 18th? there's nothing in the HISTORY.md about it https://github.com/rack/rack/blob/master/HISTORY.md
[02:03:51] bronson: has joined #ruby
[02:03:52] havenwood: quazimodo: class HashIsh < Hash; def initialize object = nil, &block; merge!({zed: 'zed', foo: 'bar'}); object ? super : super(&block) end end
[02:04:28] datanoise: has joined #ruby
[02:07:07] freedrull: maybe this i guess https://github.com/rack/rack/commit/02e2f0f5924d676ad964a66537017c5ab59bed68
[02:09:03] transiency: has joined #ruby
[02:09:08] havenwood: freedrull: https://gist.github.com/havenwood/5585a6ddc40de7ba8a67
[02:09:47] zenguy_pc: has joined #ruby
[02:09:54] Channel6: has joined #ruby
[02:11:05] havenwood: ?rails Derasi
[02:11:05] ruboto: Derasi, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[02:11:41] freedrull: havenwood: oh thanks i see it now....
[02:13:34] serivich: has joined #ruby
[02:20:23] Roa: has joined #ruby
[02:24:17] hahuang65: has joined #ruby
[02:24:18] Rollabunna: has joined #ruby
[02:24:19] tenseiten: has joined #ruby
[02:24:19] tenseiten: has joined #ruby
[02:24:35] TheNet: has joined #ruby
[02:25:35] cpruitt: has joined #ruby
[02:26:58] eggoez: has joined #ruby
[02:29:15] zenguy_pc: has joined #ruby
[02:29:52] metallicrwr: has joined #ruby
[02:30:51] konsolebox: has joined #ruby
[02:34:25] charliesome: has joined #ruby
[02:34:42] bronson: has joined #ruby
[02:35:24] freerobby: has joined #ruby
[02:36:09] crdpink: has joined #ruby
[02:36:39] sgambino: has joined #ruby
[02:37:38] hahuang65: has joined #ruby
[02:37:46] pdoherty: has joined #ruby
[02:40:22] yayfoxes3: has joined #ruby
[02:40:35] gambl0re: has joined #ruby
[02:40:44] spider-mario: has joined #ruby
[02:44:11] drewo: has joined #ruby
[02:47:58] mois3x: has joined #ruby
[02:49:45] pontiki: has joined #ruby
[02:49:46] hubcaps: has joined #ruby
[02:49:46] hubcaps: has joined #ruby
[02:51:28] yoongkang: has joined #ruby
[02:55:16] bruno-: has joined #ruby
[02:56:08] Yzguy: has joined #ruby
[02:57:57] RegulationD: has joined #ruby
[03:00:44] tkuchiki_: has joined #ruby
[03:02:15] KrzaQ: has joined #ruby
[03:02:40] towski_: has joined #ruby
[03:03:09] theery: has joined #ruby
[03:03:35] workmad3: has joined #ruby
[03:03:38] brandon: has joined #ruby
[03:05:52] blue_deref: has joined #ruby
[03:06:02] ellisTAA: has joined #ruby
[03:07:29] NightMonkey: has joined #ruby
[03:09:29] braincrash: has joined #ruby
[03:11:07] Yiota: has joined #ruby
[03:11:16] scx: has joined #ruby
[03:14:01] droidburgundy: has joined #ruby
[03:14:47] dopie: has joined #ruby
[03:18:19] Rollabunna: has joined #ruby
[03:18:41] mark[oz]: has joined #ruby
[03:20:26] bronson: has joined #ruby
[03:20:51] darkf: has joined #ruby
[03:21:59] laurentide: has joined #ruby
[03:23:30] mark[oz]: has joined #ruby
[03:23:36] yoongkang: has joined #ruby
[03:26:15] duderonomy: has joined #ruby
[03:31:33] framlinqp: has joined #ruby
[03:32:13] fedexo: has joined #ruby
[03:32:31] wildroman2: has joined #ruby
[03:32:43] lavros: has joined #ruby
[03:36:47] wmoxam: has joined #ruby
[03:38:42] Mia: has joined #ruby
[03:38:42] Mia: has joined #ruby
[03:38:47] shafox: has left #ruby: ()
[03:39:43] tlarevo: has joined #ruby
[03:39:44] gix: has joined #ruby
[03:40:26] sdwrage: has joined #ruby
[03:40:37] lavros_: has joined #ruby
[03:41:03] djbkd: has joined #ruby
[03:41:55] jpfuentes2: has joined #ruby
[03:42:26] mark[oz]: has joined #ruby
[03:47:13] commondream: has joined #ruby
[03:47:33] fabrice31: has joined #ruby
[03:49:41] keen___________0: has joined #ruby
[03:51:01] nettoweb: has joined #ruby
[03:51:34] passbe1: has left #ruby: ("WeeChat 1.2")
[03:54:21] ivanskie: has joined #ruby
[04:01:05] lavros: has joined #ruby
[04:01:08] towski_: has joined #ruby
[04:01:49] Lucky_: has joined #ruby
[04:02:31] markalanevans: has joined #ruby
[04:02:39] krz: has joined #ruby
[04:02:42] gianlucadv: has joined #ruby
[04:02:59] icebourg: has joined #ruby
[04:05:17] tlarevo: has joined #ruby
[04:05:57] CloCkWeRX: has joined #ruby
[04:06:10] SOLDIERz: has joined #ruby
[04:07:19] dgutierrez1287: has joined #ruby
[04:08:31] nobitanobi: has joined #ruby
[04:10:10] wildroman2: has joined #ruby
[04:10:18] cabreraM516: has joined #ruby
[04:12:14] tkuchiki: has joined #ruby
[04:12:48] Rollabunna: has joined #ruby
[04:14:50] eggoez: has joined #ruby
[04:16:30] postmodern: anyone familiar with ruby's debug?
[04:18:37] stardiviner: has joined #ruby
[04:18:44] stardiviner: has joined #ruby
[04:18:44] tubuliferous_: has joined #ruby
[04:19:13] sarmiena_: has joined #ruby
[04:31:31] toretore: has joined #ruby
[04:31:44] jacor: has joined #ruby
[04:32:06] peter_paule: has joined #ruby
[04:32:21] [k-: has joined #ruby
[04:32:42] arooni-mobile: has joined #ruby
[04:35:53] mark[oz]: postmodern: I've used it
[04:36:02] mark[oz]: best to ask a specific question
[04:36:30] postmodern: mark[oz], why don't my break points break on methods i directly invoke
[04:36:46] claw: has joined #ruby
[04:36:50] postmodern: mark[oz], while within the debug console
[04:36:59] mark[oz]: yeah, not sure.
[04:37:18] postmodern: not the specific answer i was hoping for :(
[04:39:09] yeticry: has joined #ruby
[04:39:58] husanu: has joined #ruby
[04:42:50] sfarley: has joined #ruby
[04:43:22] yoongkang: has joined #ruby
[04:44:50] bruno-: has joined #ruby
[04:44:57] GitGud: has joined #ruby
[04:44:58] Oog: has joined #ruby
[04:46:45] RegulationD: has joined #ruby
[04:49:08] skade: has joined #ruby
[04:50:57] husanu: has joined #ruby
[04:52:14] workmad3: has joined #ruby
[04:52:46] langlands: has joined #ruby
[04:53:48] langlands: has joined #ruby
[04:54:06] theery: has joined #ruby
[04:54:24] djbkd: has joined #ruby
[04:55:52] havenwood: has joined #ruby
[04:57:18] Hanmac: has joined #ruby
[04:57:19] andymememe: has joined #ruby
[04:59:32] haraoka: has joined #ruby
[05:01:58] husanu: has joined #ruby
[05:03:50] datanoise: has joined #ruby
[05:03:54] tercenya_: has joined #ruby
[05:06:54] Rollabunna: has joined #ruby
[05:07:19] zacts: has joined #ruby
[05:09:49] Contigi: has joined #ruby
[05:10:23] acke: has joined #ruby
[05:15:12] kohgpat_: has joined #ruby
[05:18:51] wildroman2: has joined #ruby
[05:19:55] n008f4g_: has joined #ruby
[05:20:55] ChoiKyuSang: has joined #ruby
[05:21:28] baweaver: has joined #ruby
[05:21:50] Oog: has joined #ruby
[05:25:13] stardiviner: has joined #ruby
[05:26:11] langlands: has joined #ruby
[05:27:27] langlands: has joined #ruby
[05:31:25] yh: has joined #ruby
[05:31:42] [k-: that's a really bad way to abbrev...
[05:32:01] rickmasta: has joined #ruby
[05:33:17] lxsameer: has joined #ruby
[05:33:28] aganov: has joined #ruby
[05:34:08] otherj: has joined #ruby
[05:34:13] x1337807x: has joined #ruby
[05:36:21] fabrice31: has joined #ruby
[05:36:38] krz: has joined #ruby
[05:37:10] Radar: not really
[05:37:35] [k-: for this case, that is
[05:37:51] yardenbar: has joined #ruby
[05:37:55] kies: has joined #ruby
[05:38:07] Radar: It really isn't.
[05:38:18] Radar: isn't it french for morning or have I got my wires crossed again?
[05:38:44] [k-: but I'm not french!
[05:42:17] BTRE: has joined #ruby
[05:44:15] TTilus: has joined #ruby
[05:45:23] tractatus: has joined #ruby
[05:45:43] tractatus: has left #ruby: ()
[05:48:17] Aeyrix: flughafen: moin
[05:48:45] psye: has joined #ruby
[05:49:09] dg-ratio1: has joined #ruby
[05:49:09] krowv: Anyone have a good recommendation for a site to get freely available icons for a ruby gtk application?
[05:49:54] tlarevo_: has joined #ruby
[05:50:46] commondream: has joined #ruby
[05:51:02] techsethi: has joined #ruby
[05:52:30] Lytol: has joined #ruby
[05:53:07] ndrei: has joined #ruby
[05:54:15] slumos: has joined #ruby
[05:55:12] sandstrom: has joined #ruby
[05:56:42] railsraider: has joined #ruby
[05:56:58] Radar: krowv: Could you pick out the icons from font-awesome?
[05:56:58] husanu: has joined #ruby
[05:57:11] Aeyrix: http://fontello.com/
[05:57:24] khebbie: has joined #ruby
[05:57:55] krowv: Radar, checking that sight out
[05:58:03] krowv: Aeyrix, I'll check that as well
[05:58:11] krowv: I'm looking to make big buttons. like 90x90
[06:01:11] Rollabunna: has joined #ruby
[06:04:21] kp666: has joined #ruby
[06:06:55] tubuliferous_: has joined #ruby
[06:08:05] fsvehla: has joined #ruby
[06:08:44] bluOxigen: has joined #ruby
[06:09:49] revath: has joined #ruby
[06:12:47] narcan: has joined #ruby
[06:15:08] sypheren: Attention everyone
[06:15:14] sypheren: This is all
[06:15:33] sevenseacat: ACTION just lost the game
[06:15:53] sypheren: sevenseacat, you hang out on #ruby too?
[06:16:04] krz: has joined #ruby
[06:16:12] [k-: ACTION loses too...
[06:16:23] [k-: I wish I didn't know the game
[06:16:31] alphaatom: has joined #ruby
[06:16:33] sevenseacat: I was winning for a long long time
[06:17:13] sypheren: One does not win the game
[06:17:17] sypheren: One only postpones losing
[06:17:24] sypheren: Only those who never heard of it can truly win
[06:17:55] [k-: https://en.m.wikipedia.org/wiki/The_Game_(mind_game)
[06:18:56] otherj: has joined #ruby
[06:18:59] [k-: you must announce your loss each time you think of The Game
[06:19:05] [k-: and I just lost again
[06:19:44] arup_r: has joined #ruby
[06:19:49] sypheren: At some conventions this becomes a problem
[06:19:52] sypheren: People screaming it
[06:20:38] ndrei: has joined #ruby
[06:21:32] sfarley: has joined #ruby
[06:21:47] olistik: has joined #ruby
[06:22:09] Oog: has joined #ruby
[06:23:43] Iskarlar: has joined #ruby
[06:23:54] atom3: has joined #ruby
[06:24:19] gagrio: has joined #ruby
[06:24:46] [k-: The Game is up
[06:24:49] NightMonkey: has joined #ruby
[06:25:23] arup_r: has joined #ruby
[06:26:11] charliesome: has joined #ruby
[06:30:06] revath: has joined #ruby
[06:30:22] Dopagod: has joined #ruby
[06:31:03] Scroff: has joined #ruby
[06:36:24] roolo: has joined #ruby
[06:37:07] yh: has joined #ruby
[06:37:37] User458764: has joined #ruby
[06:38:19] chinmay_dd: has joined #ruby
[06:39:16] tlarevo: has joined #ruby
[06:39:34] nimf: has joined #ruby
[06:39:53] andikr: has joined #ruby
[06:40:34] atom3: has joined #ruby
[06:40:47] Oog: has joined #ruby
[06:41:03] workmad3: has joined #ruby
[06:42:14] tkrajcar: has joined #ruby
[06:42:26] acke: has joined #ruby
[06:43:57] ndrei: has joined #ruby
[06:46:23] troulouliou_dev: has joined #ruby
[06:46:44] fabrice31: has joined #ruby
[06:47:10] tercenya: has joined #ruby
[06:48:27] Axy: has joined #ruby
[06:48:44] Axy: has joined #ruby
[06:49:58] hubcaps: has joined #ruby
[06:49:58] hubcaps: has joined #ruby
[06:49:58] ndrei: has joined #ruby
[06:50:09] allenn: has joined #ruby
[06:50:09] allenn: has joined #ruby
[06:50:51] User458764: has joined #ruby
[06:51:25] dgutierrez1287: has joined #ruby
[06:55:29] Rollabunna: has joined #ruby
[06:57:31] fabrice31: has joined #ruby
[06:57:42] alphaatom: has joined #ruby
[06:58:19] krz: has joined #ruby
[07:00:25] fantazo: has joined #ruby
[07:00:56] alphaatom: has joined #ruby
[07:02:19] revath: has joined #ruby
[07:02:29] pyon: has joined #ruby
[07:05:39] workmad3: has joined #ruby
[07:06:20] skade: has joined #ruby
[07:09:48] arup_r: has joined #ruby
[07:10:38] yh: has joined #ruby
[07:11:29] ddv: [k-: seriously that was funny in 1999 not in 2015 anymore
[07:12:36] gagrio: has joined #ruby
[07:12:50] Xeago: has joined #ruby
[07:14:04] ecksit: has joined #ruby
[07:15:13] k3asd`: has joined #ruby
[07:16:10] tercenya_: has joined #ruby
[07:17:02] alex88: has joined #ruby
[07:17:09] baweaver: has joined #ruby
[07:18:12] towski_: has joined #ruby
[07:18:48] sinkensabe: has joined #ruby
[07:20:19] dumdedum: has joined #ruby
[07:21:29] codex: has joined #ruby
[07:22:01] Cust0sLim3n: has joined #ruby
[07:25:01] olistik: has joined #ruby
[07:25:27] yh: has joined #ruby
[07:26:00] arup_r: has joined #ruby
[07:26:53] sandstrom: has joined #ruby
[07:28:35] tercenya: has joined #ruby
[07:29:11] danielpclark: has joined #ruby
[07:30:13] User458764: has joined #ruby
[07:30:26] sameerynho: has joined #ruby
[07:32:00] hal_9000: has joined #ruby
[07:32:50] senayar: has joined #ruby
[07:32:50] senayar: has joined #ruby
[07:35:38] icarus: has joined #ruby
[07:35:47] rdark: has joined #ruby
[07:36:20] pwnz0r: has joined #ruby
[07:37:16] antgel: has joined #ruby
[07:38:11] vasilakisfil__: has joined #ruby
[07:38:15] icarus__: has joined #ruby
[07:39:02] Iskarlar: has joined #ruby
[07:39:04] techsethi: has joined #ruby
[07:39:13] abyss: [k-: on ruby 2.2 works excellent. Thank you.
[07:39:14] bayed: has joined #ruby
[07:39:14] bayed: has joined #ruby
[07:39:49] soulcake: has joined #ruby
[07:40:06] denver: has joined #ruby
[07:40:39] [k-: okiedokie
[07:42:17] terlar: has joined #ruby
[07:42:32] tercenya_: has joined #ruby
[07:42:50] withnale_: has joined #ruby
[07:43:07] Pathfinder: has joined #ruby
[07:43:58] msgodf: has joined #ruby
[07:44:25] nhhagen: has joined #ruby
[07:44:37] tercenya: has joined #ruby
[07:45:02] denver: has joined #ruby
[07:45:34] krz: has joined #ruby
[07:45:51] dcarmich: has joined #ruby
[07:46:20] white_bear: has joined #ruby
[07:46:33] Scroff: has joined #ruby
[07:48:50] bruno-: has joined #ruby
[07:49:17] livathinos: has joined #ruby
[07:49:59] atom3: has joined #ruby
[07:50:51] baweaver_: has joined #ruby
[07:52:43] Xeago: has joined #ruby
[07:53:11] commondream: has joined #ruby
[07:55:05] tubuliferous_: has joined #ruby
[07:55:18] Hounddog: has joined #ruby
[07:56:03] atom3: has joined #ruby
[07:56:24] spider-mario: has joined #ruby
[07:56:41] arturaz: has joined #ruby
[07:56:47] Ikares: has joined #ruby
[07:57:04] arturaz: Hey there. I'm encountering this weird bundler error where the versions are the same. Anyone has encountered it? https://gist.github.com/anonymous/8a5e618c874d461c2d80
[07:57:33] TheHodge: has joined #ruby
[07:57:36] revath: has joined #ruby
[07:58:30] tesuji: has joined #ruby
[07:58:31] tesuji: has joined #ruby
[07:58:55] arturaz: nevermind, solved, it was that I was using ruby bundler, not jruby bundler
[07:59:26] mikecmpbll: has joined #ruby
[08:00:11] c0m0: has joined #ruby
[08:00:20] Hounddog: has joined #ruby
[08:03:08] tAn: has joined #ruby
[08:04:38] spider-mario: has joined #ruby
[08:05:46] flughafen: moin ljarvis
[08:06:33] ponga: has joined #ruby
[08:06:34] Xeago: has joined #ruby
[08:06:40] khebbie: has joined #ruby
[08:07:46] Pathfinder: has joined #ruby
[08:08:47] ttilley: has joined #ruby
[08:10:37] adaedra: moin ljarvis und flughafen
[08:10:54] ljarvis: i need new speakers
[08:12:06] tvw: has joined #ruby
[08:13:40] Xeago: has joined #ruby
[08:13:42] wildroman2: has joined #ruby
[08:15:36] anisha: has joined #ruby
[08:16:28] tesuji_: has joined #ruby
[08:16:30] micmus: has joined #ruby
[08:17:40] timonv_: has joined #ruby
[08:17:41] Aswebb_: has joined #ruby
[08:18:21] fabrice31_: has joined #ruby
[08:19:25] zeroDivisible: has joined #ruby
[08:20:10] pwnz0r: has joined #ruby
[08:20:29] timonv^: has joined #ruby
[08:20:40] yfeldblum: has joined #ruby
[08:21:40] flughafen: ljarvis: what kind of speakers
[08:22:19] DLSteve: has joined #ruby
[08:23:02] Jackneill: has joined #ruby
[08:23:15] zenspider: arturaz: that's a _confusing_ error message. Ugh.
[08:23:21] zenspider: bundler has been my enemy all day
[08:23:43] arturaz: yeah, ruby isn't my favorite these days
[08:23:46] fabrice31: has joined #ruby
[08:23:50] CustosLimen: has joined #ruby
[08:23:57] senayar: has joined #ruby
[08:23:57] senayar: has joined #ruby
[08:24:21] RegulationD: has joined #ruby
[08:24:45] flughafen: arturaz: you take that back!
[08:25:54] Jackneill: has joined #ruby
[08:26:22] zenspider: bundler != ruby
[08:26:34] zenspider: ruby isn't the problem, bundler is
[08:26:45] Scroff: has joined #ruby
[08:29:46] Zai00: has joined #ruby
[08:34:17] dg-ratio1: has joined #ruby
[08:34:42] langlands: has joined #ruby
[08:36:19] marr: has joined #ruby
[08:37:44] Xeago: has joined #ruby
[08:39:19] timonv_: has joined #ruby
[08:39:40] ahmetkapikiran: has joined #ruby
[08:39:41] jacor: has joined #ruby
[08:40:22] Igorshp: has joined #ruby
[08:40:39] unshadow: has joined #ruby
[08:41:26] MyMind: has joined #ruby
[08:41:38] jokke: has joined #ruby
[08:41:43] Ikares: Hey, I was wondering, does @ mean a local variable and does $ mean a global variable? I'm used to TorqueScript
[08:42:39] heftig: Ikares: $ are globals, @ are instance variables (associated with the current self)
[08:42:46] heftig: Ikares: locals have no sigil
[08:43:10] Ikares: Ah, thanks
[08:44:14] Rollabunna: has joined #ruby
[08:44:25] x44x45x41x4E: has joined #ruby
[08:44:44] heftig: Ikares: identifiers starting with [a-z_] are locals or method calls; they're locals as soon as the parser encounters them on the left side of an assignment
[08:45:34] jhass: there are also @@class_vars though their usecases are rare
[08:46:03] heftig: they're terrible
[08:46:34] jhass: finally Constants are starting with [A-Z]
[08:47:45] platzhirsch: has joined #ruby
[08:50:49] codecop: has joined #ruby
[08:54:08] chthon: has joined #ruby
[08:54:29] workmad3: has joined #ruby
[08:54:45] ahmetkapikiran: has joined #ruby
[08:57:16] techsethi: has joined #ruby
[08:59:27] DLSteve: has joined #ruby
[09:00:06] contradictioned: has joined #ruby
[09:00:15] platzhirsch: has joined #ruby
[09:02:23] jesterfraud: jhass, don't class level hooks etc. use @@vars?
[09:02:45] jhass: what do you mean?
[09:03:25] soulcake: has joined #ruby
[09:04:04] quimrstorres: has joined #ruby
[09:04:52] joonty: has joined #ruby
[09:06:39] quimrstorres: has joined #ruby
[09:07:11] gagrio|MRG: has joined #ruby
[09:07:16] jesterfraud: like before_action :blah
[09:07:21] jesterfraud: has to store those somewhere, right?
[09:07:27] jesterfraud: (Rails example)
[09:07:50] yh: has joined #ruby
[09:08:39] apeiros: doesn't need to be @@cvars
[09:08:45] jhass: yes, typically you'd use class level @ivars
[09:09:16] jesterfraud: and they'd carry over to each instance of that class?
[09:09:46] jesterfraud: if so, what IS the legitimate use of @@cvars?
[09:09:51] unsymbol: has joined #ruby
[09:10:13] ljarvis: they're accessed outside of any instance of the class. You refer to them directly on the class itself (which, is an instance of Class)
[09:10:29] jesterfraud: I obviously need to read up a bit more
[09:11:25] CustosLimen: has joined #ruby
[09:12:42] spacemud: has joined #ruby
[09:13:50] workmad3: has joined #ruby
[09:13:52] bkxd: has joined #ruby
[09:17:13] panga: has joined #ruby
[09:17:19] djellemah: has joined #ruby
[09:18:06] yorickpeterse: welp, TIL I still have 3 weeks of holiday time left unclaimed
[09:18:33] yorickpeterse: <bosswoman> so Yorick I've checked your contract stuff for the renewal next month, you still have 3 weeks of unclaimed holidays
[09:18:46] yorickpeterse: guess that will be 3 weeks of FOSS at home :D
[09:19:14] yorickpeterse: or taking off Friday for the next 15 weeks
[09:19:20] yorickpeterse: the possibilities are endless
[09:19:38] yorickpeterse: well, I still have like 7 days for this year
[09:19:47] revath: has joined #ruby
[09:20:14] timonv: has joined #ruby
[09:20:44] tbuehlmann: yorickpeterse, I'm gone for 3 weeks in august, you could have my flat :p
[09:22:41] yorickpeterse: why would I have yours? I have my own
[09:22:47] yorickpeterse: mine even comes with a cat
[09:23:21] luzidco: has joined #ruby
[09:23:30] Scrofff: has joined #ruby
[09:23:35] wildroman2: has joined #ruby
[09:23:59] tbuehlmann: well, I could ask, why would you go to south korea? going places
[09:25:26] yorickpeterse: yeah but you don't live in South Korea do you?
[09:25:46] tbuehlmann: right, it's just germany
[09:25:56] yorickpeterse: meh, Netherlands > Germany
[09:26:08] tbuehlmann: and SK > Netherlands? :D
[09:26:15] ghostpl: has joined #ruby
[09:26:18] AlexRussia: has joined #ruby
[09:26:34] yorickpeterse: Cuisine wise, yes
[09:27:39] User458764: has joined #ruby
[09:27:44] multi_io: has joined #ruby
[09:28:57] yorickpeterse: Also the women are better, but that might just be my hormones talking
[09:30:59] techsethi_: has joined #ruby
[09:32:19] avat: has joined #ruby
[09:33:46] ruurd: has joined #ruby
[09:33:58] Polysics: has joined #ruby
[09:34:48] RandyT_: has joined #ruby
[09:35:52] Oog: has joined #ruby
[09:35:58] avat: What is the best tool to schedule a job 10 days later? I'm looking for simplest tool which won't loose scheduled jobs on restart
[09:36:14] Pumukel: has joined #ruby
[09:36:21] AlexAltea: has joined #ruby
[09:37:34] railsraider: has joined #ruby
[09:38:23] avat: But I have to store this particular job details somewhere for 10 days. Should I use Redis?
[09:38:24] Rollabunna: has joined #ruby
[09:38:37] lokulin_: has joined #ruby
[09:38:39] chris2: in the command line you pass to at :P
[09:39:08] DLSteve: has joined #ruby
[09:39:52] alex88_: has joined #ruby
[09:40:27] datanoise: has joined #ruby
[09:40:28] arup_r: has joined #ruby
[09:40:46] jhass: if you like redis and already have something like resque or sidekiq running, there are plugins for them that do that
[09:41:08] avat: Any tutorial how to use at with Sinatra?
[09:41:20] chris2: if you have a certain frequency of jobs, probably use some "real" queue
[09:41:29] chris2: but you asked for the simplest tool :P
[09:41:44] avat: OK I guess I will need something more then :)
[09:42:01] nini1294: has joined #ruby
[09:42:02] fabrice31_: has joined #ruby
[09:42:11] jhass: maybe describe your actual usecase
[09:42:12] avat: Currently I'm using rufus-scheduler, but I will loose all jobs on update (beacuse I need to restart sinatra server)
[09:43:15] tubuliferous_: has joined #ruby
[09:43:47] avat: Or when admins do some maintenance and they will restart a machine. So I guess I need something which stores queue and after restart picks it again and runs a job when time comes
[09:44:00] Oog: has joined #ruby
[09:44:27] alex88: has joined #ruby
[09:44:39] avat: Resque then?
[09:45:35] jhass: you didn't give your usecase, we can't make clear recommendations
[09:47:06] terlar: has joined #ruby
[09:47:47] techsethi: has joined #ruby
[09:49:00] langlands: has joined #ruby
[09:49:02] Rubie: has joined #ruby
[09:49:23] avat: Here is my current code snippet: https://gist.github.com/ZyzioZiom/e2630bf20a031dbe593e
[09:49:57] Pupeno: has joined #ruby
[09:50:33] al2o3-cr: has joined #ruby
[09:51:20] jhass: do you need it that precise?
[09:51:51] valkyrka: has joined #ruby
[09:52:13] jhass: I'd setup an hourly job that goes over the Trials, filters them by created_at <= now-10d and does the check
[09:52:39] jhass: that way you'll never loose jobs and never overrun any queue
[09:52:59] unsymbol_: has joined #ruby
[09:54:07] unsymbol: has joined #ruby
[09:55:22] commondream: has joined #ruby
[09:55:23] avat: It doesnt need to be very precise. Thanks jhass, maybe I'll try this way
[09:55:31] workmad3: jhass: I'd be tempted to do it daily personally... so Trials are activated at, say, 7a.m EST 10 days from then
[09:55:52] keen___________0: has joined #ruby
[09:56:26] revath: has joined #ruby
[09:56:54] workmad3: but yeah, cron jobs or clockwork is a good way to handle timing-insensitive jobs like that, without the mechanics of a queue providing more points of failure
[09:56:57] michael_mbp: has joined #ruby
[09:57:12] effeeee: how bad of an idea would it be to pass along state in an exception? for example have an exception, that holds a list with all errors, that occured during a computation
[09:57:32] ttilley: has joined #ruby
[09:57:50] jhass: always has the sound of doing flow control with them to me
[09:58:20] x0F: has joined #ruby
[09:59:48] Fluent_: https://gist.github.com/TurnAway/29f70d600c6656d51341
[09:59:48] Fluent_: Recommendations on what to change?
[10:00:00] krz: has joined #ruby
[10:00:23] ytti: has joined #ruby
[10:00:34] two-gun: has joined #ruby
[10:00:43] Fluent_: Seen here: http://repl.it/tlc/2
[10:00:46] adaedra: variable names should not begin by a capitalized letter
[10:01:12] Fluent_: That's a constant
[10:01:29] ndrei: has joined #ruby
[10:01:40] Fluent_: It doesn't change
[10:02:08] workmad3: Fluent_: what exactly are you asking?
[10:02:18] adaedra: Cards change at l3 and l57
[10:02:22] lordkryss: has joined #ruby
[10:02:24] revath: has left #ruby: ()
[10:02:26] adaedra: and 53 too
[10:03:49] ttilley: has joined #ruby
[10:04:08] Fluent_: That doesn't change it
[10:04:16] ttilley: has joined #ruby
[10:04:27] Fluent_: workmad3, I was just looking for constructive criticism is all
[10:04:36] adaedra: That changes the content
[10:05:02] adaedra: also, l57, you use map without getting the content back, I think each would be more appropriate
[10:05:06] Fluent_: line 57 is a method call, it doesn't change any value
[10:05:10] workmad3: Fluent_: not sure I can provide constructive criticim on it :P
[10:05:34] Fluent_: Well it does, but it doesn't change any of the constants
[10:05:35] Fluent_: It changes a global variable
[10:05:44] adaedra: meh, lines are not numbered the same way in your second link
[10:05:47] tercenya: has joined #ruby
[10:06:05] Fluent_: Yeah, I'm on the github
[10:06:11] Fluent_: line 57 changeCard
[10:06:16] Fluent_: Doesn't change a constant's value
[10:06:27] adaedra: so 4, 58 and 54
[10:06:28] lkba: has joined #ruby
[10:07:00] ghostpl: has joined #ruby
[10:07:02] Fluent_: That's a hash
[10:07:13] Fluent_: and it changes the key value pair
[10:07:29] Fluent_: I think I could define it different
[10:07:41] Fluent_: Just make the hash global
[10:07:41] Fluent_: not a constant :D
[10:07:44] workmad3: Fluent_: it's all pretty poorly structured, your code is shouting out for a class to handle things, it's very 'scripty', makes odd use of top-level ivars...
[10:07:46] Fluent_: Good point
[10:08:05] Fluent_: Hmmm, what are ivars?
[10:08:08] adaedra: IMO a constant could be frozen at its declaration ??? constant
[10:08:13] fabrice31: has joined #ruby
[10:08:21] Fluent_: I should wrap it up in a class
[10:08:39] charliesome: has joined #ruby
[10:08:46] Fluent_: Oh, globals?
[10:08:54] workmad3: Fluent_: no, an ivar is not a global
[10:09:00] adaedra: and a x? method should return true or false, not do something on its own and return something ??? even if I see what you do
[10:09:00] Fluent_: I just call those things global variables
[10:09:00] workmad3: Fluent_: a global is $global
[10:09:08] two-gun_: has joined #ruby
[10:09:08] Fluent_: @var = 'foo'
[10:09:09] workmad3: Fluent_: you're wrong in your terminology then :P
[10:09:35] adaedra: (Yeah, that's nitpicking, I know)
[10:09:36] [k-: changeCard is camel case
[10:09:48] Fluent_: I think I recall that $global now
[10:10:08] Fluent_: That it is
[10:10:08] khebbie: has joined #ruby
[10:10:16] Fluent_: I ride le camel
[10:10:37] Fluent_: You suggest _'s, right?
[10:10:38] adaedra: Same way, you use #select at l41 but don't use its return, you want #each
[10:10:53] workmad3: Fluent_: if I was writing a quick, write-only script to handle a specific class, it might look like your code... but I'm guessing you're not looking to have quick & dirty code to handle simple automation tasks, you're wanting to write good, well structured ruby code, yeah?
[10:11:15] BrianBoyko1: has joined #ruby
[10:11:50] workmad3: Fluent_: snake_case is idiomatic ruby for methods and variables, CamelCase is reserved for class names and sometimes constants, and sometimes constants are written as SCREAMING_SNAKE_CASE
[10:12:05] Fluent_: Well, I just threw this together. I have no need to write well structured code, but I was more curious of what the transition process would be like from a scripted piece of code to something professional in nature
[10:12:58] adaedra: mmmh, \r\n
[10:13:08] Fluent_: https://github.com/ninjex/confabulation This is probably the most 'professional' code I have wrote lol
[10:13:08] Fluent_: and it's still meh
[10:13:18] workmad3: Fluent_: well, to answer your original question then - what I'd change to write it as a cleanly structured piece of ruby code is "everything" ;)
[10:13:25] RegulationD: has joined #ruby
[10:13:46] workmad3: adaedra: yeah, good point... no need to do \r\n in ruby
[10:13:49] adaedra: If i read changeCard correctly, you treat o as no and s as yes, right?
[10:14:08] Fluent_: Yep, that would do it
[10:14:33] Fluent_: Not a perfect solution, but I did that quickly to accept any input from that is inside 'yes'
[10:14:42] Fluent_: so if the user types: 'y' or 'yes' it works
[10:14:55] adaedra: That disturbs me for two reasons: you ask explicitely for y/n, and in my mind, o is yes
[10:15:05] adaedra: but I see your point
[10:15:15] Fluent_: o is not yes o would be no
[10:15:29] adaedra: maybe use start_with?, which would accept y, ye and yes, and n and no
[10:15:29] workmad3: Fluent_: o as in 'ok'
[10:15:31] Fluent_: Oh, in your mind
[10:15:35] adaedra: o as in oui :p
[10:15:40] Fluent_: o is yes, I read that wrong
[10:15:41] OrbitalKitten: has joined #ruby
[10:15:53] workmad3: adaedra: ah yeah, weird foreign languages too :P
[10:15:59] Fluent_: There is a start_with method, I didn't know that
[10:16:28] Fluent_: I'm definitely going to be using that
[10:17:06] adaedra: workmad3: that's what I'm used too ([o/n]), but ok works too, didn't think of that.
[10:17:42] workmad3: adaedra: [o/c] would be more typical when using ok (as in ok, cancel)
[10:18:05] adaedra: you have an extra set of parenthesis on line 5
[10:18:08] Fluent_: Thanks for the tips guize
[10:18:09] yorickpeterse: usually CLIs use [y/n]
[10:18:20] Fluent_: You are my new best acquaintances
[10:18:38] workmad3: yorickpeterse: I want to write one that using '[cancel/continue]' now, just to break a `starts_with?` call :D
[10:18:58] adaedra: Abort, Retry, Ignore?
[10:19:37] Fluent_: I don't know if it's just me, adaedra but I like to wrap my mathematical operations in parenthesis like that
[10:19:39] CustosLimen: has joined #ruby
[10:19:43] workmad3: "This will make your computer explode. [C]ancel or [C]ontinue?"
[10:19:46] adaedra: Also Fluent_
[10:19:50] Paradox: has joined #ruby
[10:19:58] adaedra: If I enter nothing at your prompt, it asks me again, right?
[10:20:05] adaedra: (still changeCard)
[10:20:07] [k-: the difference between good code and bad code was demonstrated yesterday... 160min reduced to 5 seconds
[10:20:14] Fluent_: I could do: rand(0..hash.size) -1 I just think: (rand(0..hash.size) -1) looks neater
[10:20:26] rickmasta: has joined #ruby
[10:20:41] adaedra: I'd remove the external parenthesis and put a space before the 1
[10:20:47] Fluent_: If you input nothing, it will not
[10:21:02] Fluent_: It will go with 'no' basically
[10:21:16] workmad3: Fluent_: hash.keys.sample would be nicer still
[10:21:36] adaedra: Yet the y is capitalized in your prompt, which leads me to thing yes is the default option
[10:22:14] [k-: you can show the default option using "(N) >"
[10:22:28] workmad3: Fluent_: e.g. WinningCard = Cards.keys.sample <-- no need for WinningCardIndex anymore
[10:22:43] Fluent_: workmad3, nice :D
[10:22:49] Fluent_: Thanks for the tip
[10:23:31] Fluent_: Which eliminates more code
[10:23:44] rafaelsa_: has joined #ruby
[10:24:07] workmad3: Cards = %w(K Q A).shuffle.zip(['n'] * 3).to_h <-- that also eliminates some code
[10:24:30] Synthead: has joined #ruby
[10:24:31] Fluent_: That will make my brain hurt
[10:24:34] Fluent_: Time to see what that does
[10:24:51] rritoch: has joined #ruby
[10:24:57] gloscombe: has joined #ruby
[10:25:03] Fluent_: #=> {"Q"=>"n", "A"=>"n", "K"=>"n"}
[10:26:47] chinmay_dd: has joined #ruby
[10:27:05] Fluent_: Should I use the .between? method too?
[10:27:17] Fluent_: for if @userIndex < 1 || @userIndex > 3
[10:27:34] workmad3: Fluent_: you could also probably make your code much simpler if you did `Cards = %w(K Q A); WinningCard = Cards.sample` and had users choose K, Q or A, rather than a 'face down' card with 1, 2 and 3
[10:27:47] phutchins: has joined #ruby
[10:28:22] ahmetkapikiran: has joined #ruby
[10:28:27] cir0x: has joined #ruby
[10:28:42] Fluent_: Then the user will know the card they are choosing, workmad3...
[10:28:51] Fluent_: If I choose A, I know I get A, I don't want that
[10:28:52] workmad3: Fluent_: yes, but they don't know which card is the winner
[10:29:14] workmad3: Fluent_: seeing as you randomly choose a card to 'win', knowing the card isn't actually any detriment
[10:29:27] serivich: has joined #ruby
[10:30:25] workmad3: Fluent_: at the moment, you're basically doing "Pick a number, 1 2 or 3, one of which is randomly the 'winner'" but pushing it through a mapping of 1,2,3 => 0,1,2 => random_order(Q, K, A)
[10:30:29] chinmay_dd: has joined #ruby
[10:31:28] olistik: has joined #ruby
[10:31:30] workmad3: Fluent_: so you're basically doing 2 levels of indirection to map a random 'winning' number onto a random 'winning' card, which makes your code correspondingly more complicated for no actual gain
[10:32:15] lele: has joined #ruby
[10:32:37] Rollabunna: has joined #ruby
[10:32:46] JamesBrink: has joined #ruby
[10:33:44] two-gun: has joined #ruby
[10:34:33] arup_r1: has joined #ruby
[10:36:00] Fluent_: You guys are awesome
[10:36:08] Fluent_: Time for some coffee
[10:37:06] joonty: has joined #ruby
[10:37:20] baxx: has joined #ruby
[10:37:47] dented42: has joined #ruby
[10:38:47] two-gun: has joined #ruby
[10:39:05] ponga: has joined #ruby
[10:40:24] quimrstorres: has joined #ruby
[10:41:37] chinmay_dd: has joined #ruby
[10:43:00] lva: has joined #ruby
[10:45:06] datanoise: has joined #ruby
[10:45:10] bronson: has joined #ruby
[10:46:57] techsethi: has joined #ruby
[10:51:55] rodfersou: has joined #ruby
[10:52:00] dgutierrez1287: has joined #ruby
[10:52:24] x0F: has joined #ruby
[10:53:03] flughafen: ACTION fetches tea
[10:53:13] sdothum: has joined #ruby
[10:53:21] bruno-: has joined #ruby
[10:53:24] adaedra: ACTION throws tea in the harbour
[10:53:48] [k-: ah, the sea is so refreshing today!
[10:53:56] workmad3: adaedra: VIVA LA REVOLUTION!
[10:54:33] workmad3: heh, close enough... it's not like anyone cares if I spell french words correctly anyway ;)
[10:54:41] adaedra: https://i.imgur.com/WLRV4HT.gif
[10:55:02] ttilley: my irc client displays that animated gif inline in chat
[10:55:04] ttilley: it's glorious
[10:55:09] workmad3: adaedra: drats, I was also hoping I'd used the wrong gender pronoun for revolution :(
[10:55:56] [k-: wait a minute, what is bonjour
[10:56:05] workmad3: VIVA LE R??VOLUTION!
[10:56:19] ZOMGITSABEAR1: has left #ruby: ()
[10:56:23] adaedra: You can replace T by SS to be even more wrong
[10:57:25] workmad3: [k-: the french word, or the apple network discovery protocol?
[10:57:30] [k-: anyone actually uses try_convert as suggested in rdocs?
[10:57:39] [k-: the french word, hello
[10:58:32] flughafen: ACTION throws adaedra into harbour to fetch tea.
[10:58:39] bruno-: has joined #ruby
[10:58:50] effeeee: how bad of an idea would it be to pass along state in an exception? for example have an exception, that holds a list with all errors, that occured during a computation
[10:58:57] Emeric: has joined #ruby
[10:59:10] flughafen: or maybe i should demand adaedra boil the ocean to make me a big tea.
[10:59:43] workmad3: flughafen: it'll be an interesting cuppa... are you normally fond of whale poop in your tea?
[10:59:53] [k-: you'd kill the corals!
[10:59:54] commondream: has joined #ruby
[11:00:24] flughafen: workmad3: loaded with antioxidants
[11:00:26] jhass: flughafen: workmad3 #ruby-offtopic misses you ;)
[11:00:31] [k-: think of the shark fins!
[11:00:41] shevy: think of the children
[11:00:57] [k-: there are aquariums for those type of people
[11:01:10] ndrei: has joined #ruby
[11:01:11] shevy: freedom for fish! humans into the aquariums
[11:01:33] c355E3B: has joined #ruby
[11:01:35] workmad3: shevy: screw that, the fish already have 2/3s of the earths surface for their playpen
[11:01:51] shevy: we are at war with them
[11:01:53] workmad3: jhass: I can't think why... anyone would think that discussions of whale-poop tea aren't relevant to ruby...
[11:02:09] jhass: right... my bad I guess
[11:02:18] shevy: fish would code in ruby, if they'd have an underwater computer
[11:02:30] shevy: it also probably has to be a touchscreen rather than a keyboard interface
[11:02:34] [k-: no they won't, they need java first
[11:02:37] shevy: no please
[11:02:42] [k-: EnterpriseShit first
[11:02:42] shevy: no fish would want to code in java
[11:02:53] shevy: perhaps EnterpriseFish like that puff fish
[11:02:54] [k-: then the fishes won't advance
[11:03:06] shevy: that's why we declared war on them
[11:03:11] shevy: they just don't wanna evolve
[11:03:33] shevy: we know of duck typing but have you ever heard of fish typing?
[11:03:49] workmad3: shevy: I have... it's when duck typing is particularly smelly
[11:03:52] yorickpeterse: I'm more a fan of cat typing
[11:03:54] [k-: ducks are fish!
[11:04:06] flughafen: [k-: is that because they float like wood?
[11:04:11] shevy: [k- ducks eat fish!
[11:04:13] doerteDev: has joined #ruby
[11:04:20] yorickpeterse: if the fish quacks like a duck and walks like a duck it probably is a duck
[11:04:21] workmad3: witches weigh as much as a fish!
[11:04:21] shevy: and bread
[11:04:24] [k-: fish eat fish!
[11:04:36] shevy: I always wondered why ducks eat bread... it's not a natural food for them now is it?
[11:04:47] shevy: but people through bread pieces to them in a pond
[11:04:58] workmad3: shevy: it's not like it's a natural food for us either :P
[11:05:02] yorickpeterse: shevy: Yeah it's not
[11:05:05] shevy: workmad3 true
[11:05:06] yorickpeterse: They can't digest it properly either
[11:05:06] workmad3: shevy: and yet sandwiches are delicious!
[11:05:13] yorickpeterse: so feeding them too much can actually cause health problems
[11:05:24] shevy: our natural food would be fruit... and fish :)
[11:05:40] yorickpeterse: take that vegans
[11:05:45] shevy: we use their energy so that we can code more ruby
[11:05:56] yorickpeterse: cows go in, code comes out
[11:05:59] workmad3: and root veg... and insects... and whatever else we could get our grubby little hunter-gatherer hands on!
[11:06:09] shevy: cows go in... code comes out... life of a programmer
[11:06:49] wildroman2: has joined #ruby
[11:06:50] flughafen: shevy brings fish to the ducks
[11:07:10] [k-: code go in... more code comes out
[11:07:22] workmad3: shevy: I'm personally very happy we're not stuck with 'natural' food... duck in hoi-sin sauce is too delicious to give up!
[11:07:28] micmus: has joined #ruby
[11:07:30] wildroman2: has joined #ruby
[11:07:32] adaedra: I'm sure ducks prefer zsh
[11:07:37] malinki: has joined #ruby
[11:07:44] workmad3: [k-: Programmer - A machine for turning caffeine into bugs
[11:09:00] yorickpeterse: adaedra: not Fish shell?
[11:09:14] adaedra: that's the joke
[11:09:23] Ropeney: has joined #ruby
[11:09:28] AlexAltea: has joined #ruby
[11:09:44] workmad3: adaedra: how is it funny to state the simple truth that Zsh > *?
[11:09:49] Rollabunna: has joined #ruby
[11:09:58] malinki: has left #ruby: ()
[11:09:58] adaedra: Come discuss that in offtopic :>
[11:10:07] yorickpeterse: workmad3: that's what separates humans from the beasts: we have fine cuisine, they don't
[11:10:25] shevy: some animals eat one thing, then something else
[11:10:27] yorickpeterse: I also have yet to find an actual use case for zsh
[11:10:30] shevy: like meat first, then vegetables
[11:10:33] yorickpeterse: or any shell that's not Bash
[11:10:38] shevy: or if they are sick due to foot, eat some plants that may help there
[11:10:59] shevy: the fish shell is quite interesting, at least it tries to do things differently. like those fancy colours
[11:11:03] shevy: as you type :)
[11:11:14] shevy: zsh has RPROMPT so that makes it superior to bash alone
[11:11:20] shevy: but bash is simpler!
[11:11:29] flughafen: shevy: are you using zsh?
[11:11:36] shevy: nope, bash still
[11:11:44] workmad3: kill ruby<tab> | menu of all ruby pids to tab through and select
[11:11:50] workmad3: ^^ there we go, why I use zsh
[11:11:55] shevy: due to laziness; I acknowledge that zsh is the better shell, but I am the lazier person
[11:11:57] flughafen: i tried zsh for a little while, but i don't remember why i went back to bash
[11:12:05] izzol: https://gist.github.com/wolfedale/55d44396e1010aba4669 - anyone know what is wrong ? I'm trying to use rspec-dns but probbaly I'm doing something wrong :(
[11:12:08] shevy: yeah somewhat similar to my case flughafen :)
[11:12:17] shevy: I think it had to do with the fact that I use ruby to generate my aliases
[11:12:33] shevy: it became unwieldy, and for some reason, the syntax for bash is not 100% identical to zsh; I get some strange errors, and I was too lazy to fix them
[11:12:35] flughafen: shevy: what are you using/
[11:12:41] shevy: aliases_rc:2246: bad option: -l
[11:12:51] shevy: aliases_rc:4133: no matches found: 256_colours=find /lib/terminfo /usr/share/terminfo -name *256*
[11:12:53] shevy: things like that
[11:12:57] jhass: ?ot shevy flughafen
[11:12:57] ruboto: shevy, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[11:13:00] ndrei: has joined #ruby
[11:13:10] yorickpeterse: shit the police is here
[11:13:15] shevy: how do I invoke ruby
[11:13:17] shevy: I use bash
[11:13:19] flughafen: quick hide the weed
[11:14:45] vasilakisFiL: has joined #ruby
[11:14:52] Xeago_: has joined #ruby
[11:15:29] doublemalt_: has joined #ruby
[11:15:48] timonv: has joined #ruby
[11:16:05] chris2: lol shevy. still have your 5kloc aliases file?
[11:16:17] izzol: ok, nevermind, I found the problem.
[11:16:55] flughafen: see jhass izzol figuure it out on his own. it's good that we burried his question
[11:16:59] txdv: has joined #ruby
[11:17:12] ahmetkapikiran: has joined #ruby
[11:17:31] izzol: flughafen: ;-)
[11:17:35] txdv: shevy: can you upload your alias file? :D
[11:17:45] jhass: izzol: share the solution though!
[11:18:06] izzol: jhass: I just deleted '.' on the end ;-)
[11:18:27] jhass: bug IMO :P
[11:18:42] flughafen: izzol: make a pr for your gist, and then we'll review it
[11:18:51] jhass: the . is valid part of the name, most software just supports omitting it
[11:19:39] dg-ratio1: has joined #ruby
[11:19:49] izzol: jhass: that's correct, but somehow rspec-dns is not supporting it
[11:20:01] jhass: izzol: I'd open an issue ;)
[11:20:09] jhass: or even look into fixing it
[11:20:39] izzol: jhass: yes, good idea
[11:21:53] krz: has joined #ruby
[11:23:27] Scripore: has joined #ruby
[11:23:32] x0F: has joined #ruby
[11:25:17] Xeago: has joined #ruby
[11:27:58] shevy: chris2 I am approaching 40.000 aliases!
[11:28:18] chris2: i'll buy you a sixpack of beer if you show me that file :P
[11:29:05] techsethi: has joined #ruby
[11:30:42] DaniG2k: has joined #ruby
[11:31:24] tubuliferous_: has joined #ruby
[11:33:09] two-gun: has joined #ruby
[11:33:10] Papierkorb: has joined #ruby
[11:33:50] Xeago: has joined #ruby
[11:35:14] flughafen: shevy: huh?
[11:35:16] flughafen: is it in your github?
[11:35:24] shevy: if it were made available
[11:35:28] shevy: you'd just laugh
[11:35:41] shevy: I can already see your curious grin
[11:36:05] Xeago: has joined #ruby
[11:36:54] jhass: isn't it beautiful if people laugh?
[11:37:14] ta: has joined #ruby
[11:37:54] flughafen: shevy: has your alias taken off yet? nope?
[11:38:11] shevy: flughafen hmm
[11:38:59] shevy: flughafen that's a good question actually... if it's an alias I use a lot, there is a "return of investment"; but if I barely use an alias, then the time it takes to define it, like let's say 8 seconds or so, wouldn't be worth the investment
[11:39:21] flughafen: i make aliases or scripts for a lot of things.
[11:39:27] txdv: shevy: how can you have so many aliases
[11:39:35] txdv: how do they look like?
[11:39:38] flughafen: even ssh'ing to a machine
[11:39:38] Synthead: has joined #ruby
[11:39:42] shevy: txdv they are just aliases
[11:39:58] txdv: do you have aliases for "iwantapizzawithsalamiat5oclock"
[11:40:14] shevy: txdv hmm nah, that would usually happen through a ruby script then
[11:40:14] Vardan: has joined #ruby
[11:40:29] shevy: like I have a clock/alarm bell in ruby
[11:40:38] Vardan: people is it possible to run code on class load?
[11:40:54] yorickpeterse: I once wrote a script that would start VLC at 08:00 to play music because I was having problems with my phone's alarm
[11:41:07] jhass: Vardan: well, you can always reopen a class at any point, when would you consider a class "loaded"?
[11:41:10] shevy: Vardan well you tend to load a .rb file; but you can put code into the file; and methods into your class which you can call
[11:41:26] shevy: yorickpeterse I tend to use mplayer
[11:41:47] jhass: mmh, I once had a cronjob doing the same via mpd
[11:42:04] shevy: to start my alarm, I do like: "at 07:33:24" and it'll start then to play loud music
[11:42:06] adaedra: yorickpeterse: I had a script which put the computer to sleep, then, on time, woke it up and ran mpc play
[11:42:28] shevy: I once had my computer crash due to an unrelated problem, and did not wake up and missed an early schedule, which sucked :(
[11:42:39] Vardan: ok, I want this, I have class A and class B, class B extends class A now I want that on class B load it do some code which in real written in class A :)
[11:42:40] fabrice31: has joined #ruby
[11:43:07] jhass: Vardan: "load", you need to elaborate on what you mean by that
[11:43:11] shevy: Vardan yes put the code in that second file
[11:43:39] jhass: Vardan: do you want to run code when A is subclassed perhaps?
[11:43:46] shevy: you can check for direct-call, like through the commandline, via something like: if __FILE__ == $PROGRAM_NAME; or you could make it integrated into the behaviour of the second class, like a class method, and invoke that
[11:43:56] Vardan: in real I don't know what I mean by load :) be cause it is class in Rails app/models folder and I don't know how Rails load them
[11:43:57] michael_mbp: has joined #ruby
[11:44:28] jhass: Vardan: then remove the abstractions
[11:44:42] jhass: Vardan: explain what you want to do, with your real classes and why
[11:44:55] diegoviola: has joined #ruby
[11:44:58] Vardan: I think you know how rails generate class and instance method from DB table, now I want to have the same but own :)
[11:45:01] jhass: ideally illustrate with some code on gist.github.com
[11:45:11] Vardan: don't have any code yet :)
[11:45:14] Xeago: has joined #ruby
[11:45:28] shevy: matz is such a funny guy, look at the after-talk discussion near the end of the talk :) https://www.youtube.com/watch?v=bqWBB8-iEac
[11:46:13] jhass: Vardan: I think you want the inherited hook (in case of a parent class) or the included hook (in case of a included module). Also take a look at ActiveSupport::Concern
[11:46:44] jhass: shevy: btw all your friends are in #ruby-offtopic now ;)
[11:47:13] [k-_: has joined #ruby
[11:47:21] esplainisix: has joined #ruby
[11:47:48] senayar: has joined #ruby
[11:47:48] senayar: has joined #ruby
[11:52:04] lavros: has joined #ruby
[11:52:06] unshadow: has joined #ruby
[11:52:14] zack6849: has joined #ruby
[11:52:14] zack6849: has joined #ruby
[11:53:12] adr3ana: has joined #ruby
[11:53:57] droidburgundy: has joined #ruby
[11:56:23] shevy: they play unicode hangman :(
[11:56:47] djbkd: has joined #ruby
[11:56:50] shevy: though it's interesting to see that the hangman games have not stopped
[11:56:53] shevy: they just moved to another place :D
[11:56:58] husanu: has joined #ruby
[11:57:14] dg-ratio1: has joined #ruby
[11:57:54] quazimodo: has joined #ruby
[11:59:25] fabrice31_: has joined #ruby
[11:59:30] [k-_: we will do this until there is something to do
[12:00:53] ponga: has joined #ruby
[12:02:21] RegulationD: has joined #ruby
[12:03:50] dg-ratio1: has joined #ruby
[12:04:59] hudsama: has joined #ruby
[12:06:50] ndrei: has joined #ruby
[12:09:30] DroidBur_: has joined #ruby
[12:10:29] _blizzy_: has joined #ruby
[12:12:11] CustosLimen: has joined #ruby
[12:12:20] ddarkpassenger: has joined #ruby
[12:15:30] joonty: has joined #ruby
[12:16:52] livcd: anybody has good Ruby/Rails rss feeds to share with me ?
[12:17:08] ponga: livcd: there is a seperate channel for rails
[12:17:16] ponga: i guess you'd get better answers from there
[12:17:53] c355E3B: livcd: rubyflow is ok
[12:19:24] polyrob: has joined #ruby
[12:19:39] livcd: ponga: well i have asked about Ruby as well
[12:20:09] dg-ratio1: has joined #ruby
[12:21:06] Muhannad: has joined #ruby
[12:21:36] sdwrage: has joined #ruby
[12:22:25] Iskarlar: has joined #ruby
[12:22:37] abyss: I have a file, there is a pattern like: patternline1\n patternline2. I'd like to check each line and if line == patternline2 then check previous line and if previous line == patternline1 then delete patternline1. How I can achieve that? Any help?
[12:22:51] abyss: The example of file: https://gist.github.com/anonymous/7b8abe1e8a8cf163da7c
[12:23:00] abyss: I'd like to remove each line before update if that line (before) contain set insert_id
[12:23:06] [k-_: abyss: that looks like a nonsensical request
[12:23:16] camonz: has joined #ruby
[12:23:36] [k-_: abyss: i recommend a parser instead of regexp in this case
[12:23:45] charliesome: has joined #ruby
[12:24:02] Soda: has joined #ruby
[12:24:28] icedragon: abyss: Iterate the stream using String#each_line and store the previous line
[12:25:07] ericpet: has joined #ruby
[12:25:13] abyss: IceDragon: yeah, but I have to back to last line somehow to delete it, yes?
[12:25:13] icedragon: abyss: previous_line = nil; "patternline1\npatternline2".each_line { |s| check_line_for_match(s); previous_line = s; }
[12:25:43] icedragon: oh in that case just use a result list, in which you push each line unto the list and pop it to remove the line
[12:25:50] [k-_: .each_line.each_with_index
[12:26:04] [k-_: oh, poping works too
[12:26:11] [k-_: much more elegant than [-1]
[12:27:25] [k-_: /^(?<prev>)blahblahblah$/ would also work
[12:27:31] dg-ratio1: has joined #ruby
[12:27:52] jhass: if you read the entire file into memory
[12:27:58] [k-_: actually it wouldn't
[12:28:20] [k-_: /\A(?<prev><newline>)blahblahblah\Z/m would also work
[12:29:21] icedragon: jhass: I guess you could stream it, I usually just read whole files into memory and be done with it, never messed with IO too much :(
[12:29:22] Rubie: has joined #ruby
[12:29:45] [k-_: does .each_line stream it?
[12:30:06] jhass: IO#each_line should
[12:30:29] ericwood: has joined #ruby
[12:30:30] khebbie: has joined #ruby
[12:30:35] Xeago: has joined #ruby
[12:30:44] [k-_: then it does
[12:31:20] konsolebox: has joined #ruby
[12:32:25] dfockler: has joined #ruby
[12:33:09] ddarkpassenger: has joined #ruby
[12:33:32] NeverDie: has joined #ruby
[12:33:58] konsolebox: has joined #ruby
[12:34:40] abyss: IceDragon: you mean that I should put whole file to array? And check if then line[-1].pop?
[12:37:36] [k-_: abyss: you dont pop a string
[12:38:16] hoov: has joined #ruby
[12:39:21] ldnunes: has joined #ruby
[12:39:51] abyss: [k-_: yeah, I mean I should put whole file to array and iterate that array and if find my example then array[-1].pop?
[12:40:23] [k-_: read the code again
[12:40:27] icedragon: abyss: lemme gist an example; https://gist.github.com/IceDragon200/17999d51f1b34294846e
[12:40:29] [k-_: reason about what it does
[12:40:34] elia: has joined #ruby
[12:40:48] icedragon: [k-_: What did I miss, disconnected there a bit
[12:41:00] [k-_: array[-1].pop
[12:41:06] CloCkWeRX: has joined #ruby
[12:41:07] Guest54: has joined #ruby
[12:41:12] [k-_: ^ the code he thinks he should write
[12:41:55] [k-_: IceDragon: unused last_line
[12:42:10] icedragon: I forgot to use it
[12:42:19] [k-_: u have to!
[12:42:27] joast: has joined #ruby
[12:42:28] shevy: to have u!
[12:42:28] [k-_: you must check if it matches pattern 1
[12:43:22] icedragon: [k-_: I did it now
[12:43:25] icedragon: Do I get a cookie?
[12:43:34] abyss: [k-_: exactly is that I said, the whole file to array, yes?
[12:43:35] [k-_: I think someone should have an interactive session with him
[12:44:01] [k-_: abyss: evaluate array[1]
[12:44:05] icedragon: [k-_: touche`
[12:44:10] [k-_: what does it return
[12:44:11] Muhannad_: has joined #ruby
[12:44:12] icedragon: I saw what you did there
[12:44:38] [k-_: what did i do?
[12:44:44] dstarh: has joined #ruby
[12:44:59] [k-_: turdurrrr https://codebunny.io/
[12:45:10] x44x45x41x4E: has joined #ruby
[12:45:31] [k-_: now someone should start a session and guide him along :D
[12:45:54] icedragon: [k-_: Ah, I took it as an http joke off my cookie statement
[12:46:01] icedragon: ACTION read too far into the conversation
[12:46:23] [k-_: you read very far
[12:46:29] abyss: [k-_: nevermind I did it in awk;p But I was just curious :)
[12:46:42] [k-_: dont you have some ruby to learn
[12:47:24] davedev24_: has joined #ruby
[12:47:53] abyss: btw [k-_ I've learnt ruby an half an year ago but because I didn't have any chalanges or whatsover I forgot a lot. Do you have an advice how to practise? Where or something - I'm not a programmer, I'm just an admin
[12:47:54] yayfoxes3: has joined #ruby
[12:47:55] jacor: has joined #ruby
[12:48:08] abyss: ok "a lot" I forgot almost all;)
[12:48:15] thelastinuit: has joined #ruby
[12:49:14] aryaching: has joined #ruby
[12:50:00] icedragon: abyss: I write ruby everyday, for everything, downloading cat pictures, randomly regenerating text documents, moving my audio samples around, deploying code, everything and anything, also games, which was my main motivation to use ruby
[12:50:21] [k-_: http://ruby-community.com/pages/links
[12:50:25] workmad3: abyss: you could use ruby and chef to automate your sysadmin stuff ;)
[12:50:53] rritoch: has joined #ruby
[12:51:08] rickmasta: has joined #ruby
[12:51:16] nfk: has joined #ruby
[12:51:22] icedragon: I should shoot myself for using ansible...
[12:51:25] lolmaus: has joined #ruby
[12:51:51] abyss: workmad3: I'm using puppet:)
[12:51:54] ljarvis: IceDragon: building games was your main motivation for using Ruby?
[12:52:07] icedragon: Yah, I started out with RPG Maker VX
[12:52:29] icedragon: And got hooked on ruby immediately, but my thirst for pretty gems didn't stop ;-; I WANTED MORE
[12:52:48] workmad3: abyss: also uses ruby under the hood ;) write more modules (or whatever they're called) for puppet without using their DSL :P
[12:52:51] icedragon: So I switched to linux to get more out of ruby
[12:52:53] e1nh4nd3r: has joined #ruby
[12:52:56] icedragon: and here I am today ;3
[12:53:14] [k-_: you ruby too much
[12:53:14] abyss: IceDragon: :)
[12:53:19] [k-_: time to learn something new!
[12:53:26] workmad3: IceDragon: start learning elixir!
[12:53:38] [k-_: yay functional!
[12:53:41] icedragon: [k-_: I do C and C++, also Go, I have clojure on my list of things to learn also uggh JS..
[12:53:42] ljarvis: workmad3: everything should be done without their DSL. Puppet makes me want to tear my face off
[12:53:45] abyss: start learning assembler;p
[12:54:11] skade: has joined #ruby
[12:54:14] [k-_: ?how2describeproblem
[12:54:14] ruboto: I don't know anything about how2describeproblem
[12:54:32] workmad3: ljarvis: my experience with puppet is limited to an attempt to set it up with VMs about 6 years ago that failed
[12:54:37] icedragon: I do! describe it in code!
[12:54:52] [k-_: but abyss fails at that :@
[12:54:55] flughafen: workmad3: salt!
[12:55:03] icedragon: workmad3: Try again?
[12:55:04] [k-_: so is anyone guiding him through his problem?
[12:55:07] abyss: [k-_: fails with what?
[12:55:15] workmad3: IceDragon: I switched to chef and never worried about it again :P
[12:55:25] ljarvis: workmad3: +1
[12:55:44] abyss: [k-_: yeah, IceDragon described both my problems;)
[12:55:51] atomical: has joined #ruby
[12:55:53] workmad3: and I don't need to touch any sysadmin stuff in my new job
[12:56:53] icedragon: sysamdin is evil :x
[12:57:21] icedragon: And no one ask why, I have nothing to backup my statement
[12:57:22] [k-_: so no one uses codebunny.io? ;-;
[12:57:49] workmad3: IceDragon: when in doubt, point to Sendmail and rest your case ;)
[12:58:07] havenwood: has joined #ruby
[12:58:08] icedragon: [k-_: Um, nope, I learn code by looking at other people's code, reading api docs and banging my head against the desk all alone in a corner
[12:58:21] icedragon: especially banging my head against the desk
[12:58:43] icedragon: workmad3: I'll keep that in mind 3;
[12:59:40] maasha: has joined #ruby
[13:00:01] abyss: IceDragon: any books?
[13:00:27] abyss: I've read one but I forgot almost everything;)
[13:00:28] maasha: So hash keys are default in the input order. Can you insert a new key/value pair after a particular key?
[13:01:36] sgambino: has joined #ruby
[13:01:40] icedragon: abyss: The pickaxe that used to ship with ruby back in 1.8
[13:02:08] soulcake: has joined #ruby
[13:02:40] icedragon: maasha: Splice the hash together, split it after a certain key, merge the key/value pair you want and then merge the other half back unto it
[13:02:56] ahmetkapikiran: has joined #ruby
[13:03:13] jespada: has joined #ruby
[13:04:11] ljarvis: maasha: hashes are not supposed to be ordered
[13:05:09] msnyon: has joined #ruby
[13:06:05] icedragon: ljarvis: in 1.9+ they are 3:
[13:06:18] [k-_: that was a mistake
[13:06:18] ljarvis: that doesn't change my statement
[13:06:21] senayar: has joined #ruby
[13:06:37] [k-_: many people raged because they didnt like the behaviour
[13:06:41] [k-_: look at the forums!
[13:06:48] workmad3: IceDragon: implementation wise, they have a deterministic order to keys now, but that doesn't make it right to then rely on a specific order as hashes are semantically unordered
[13:06:57] yh: has joined #ruby
[13:07:27] icedragon: [k-_: ;-; I'm terrified of forums, people say mean things!
[13:08:07] icedragon: workmad3: ah! point taken
[13:08:23] [k-_: look no speak
[13:08:32] [k-_: IceDragon: https://www.youtube.com/watch?v=5hfYJsQAhl0 :3
[13:08:53] griffindy: has joined #ruby
[13:09:01] RegulationD: has joined #ruby
[13:09:24] [k-_: i think thats where the line comes from
[13:09:26] vasilakisFiL: has joined #ruby
[13:09:49] icedragon: [k-_: dayum, ;x
[13:09:50] endash: has joined #ruby
[13:10:21] [k-_: i dont even forum
[13:10:34] [k-_: i look through some sometimes
[13:10:38] [k-_: but never write
[13:10:57] icedragon: [k-_: forums eat up time ;-;
[13:11:03] icedragon: time we don't have
[13:11:32] [k-_: "time we don't have"
[13:11:37] adaedra: Is there a simple way to get a random date between two?
[13:12:05] [k-_: a... random date?
[13:12:09] icedragon: adaedra: Grab 2 points in time, use the difference as the variance and add it back to the first date?
[13:12:12] decoponio: has joined #ruby
[13:12:12] [k-_: get a random day
[13:12:22] [k-_: random month
[13:12:24] adaedra: IceDragon: good point
[13:12:28] [k-_: random year
[13:12:47] [k-_: if not in between, reject
[13:12:51] workmad3: adaedra: date1 + rand(date2 - date1)
[13:13:09] [k-_: o that works too!
[13:13:14] icedragon: [k-_: you are wasting precious cpu time! /performance critical
[13:13:26] adaedra: yeah, [k-_ solution is inelegant
[13:13:27] Scroff: has joined #ruby
[13:13:33] adaedra: sorry [k-_ :(
[13:13:36] [k-_: i tried my best!
[13:14:01] [k-_: (date1..date2).sample
[13:14:13] [k-_: (date1..date2).to_a.sample
[13:14:20] adaedra: Did you try it, [k-_ ?
[13:14:31] [k-_: convert to epoch?
[13:14:46] [k-_: wait is that what i mean?
[13:14:58] workmad3: [k-_: probably not... that's times, not dates
[13:15:15] adaedra: and if I have to choose in a 10y timespan, it means allocating 3650+ elements
[13:15:35] [k-_: (date1..date2).to_a.lazy.sample
[13:15:56] icedragon: [k-_: Still nope, to_a makes an array, regardless
[13:15:56] malconis: has joined #ruby
[13:15:59] workmad3: [k-_: the .to_a will create the entire array
[13:16:20] [k-_: 12102014..30122999
[13:16:22] ljarvis: adaedra: i'd use rand with upper/lower bounds yyyymmdd
[13:16:32] [k-_: (date1..date2).lazy.to_a.lazy.sample
[13:16:41] [k-_: does this work T^T
[13:16:45] adaedra: ljarvis: as string? it may give you 20109876
[13:16:46] malconis: has joined #ruby
[13:16:52] workmad3: [k-_: you have an IRB console, right?
[13:16:57] icedragon: [k-_: I believe that would be even slower...
[13:17:03] adaedra: [k-_: you can't .to_a a date range, anyway
[13:17:09] workmad3: adaedra: yeah you can
[13:17:12] ljarvis: adaedra: what why?
[13:17:19] icedragon: Anything Enumerable can be #to_a-ed
[13:17:23] adaedra: oh, it's time I have here
[13:17:56] ljarvis: that's even easier
[13:18:03] Igorshp: has joined #ruby
[13:18:13] workmad3: adaedra: so, the question is - what bits of information do you have? start date + end date? start date + interval range?
[13:18:23] adaedra: start date, today
[13:18:51] datanoise: has joined #ruby
[13:18:53] ljarvis: >> require 'date'; Time.at(Date.new(2015, 1, 15).to_f - Date.new(2015, 2, 15).to_f * rand + Date.new(2015, 2, 15))
[13:18:54] ruboto: ljarvis # => undefined method `to_f' for #<Date: 2015-01-15 ((2457038j,0s,0n),+0s,2299161j)> (NoMethodError) ...check link for more (https://eval.in/386243)
[13:18:54] workmad3: adaedra: and do you need a random date or a random datetime?
[13:19:16] icedragon: Time.at(start_date + rand(today - start_date))
[13:19:17] [k-_: cant iterate time ;-;
[13:19:17] adaedra: workmad3: and I want a random date between the two
[13:19:33] tubuliferous_: has joined #ruby
[13:19:36] mary5030: has joined #ruby
[13:19:37] icedragon: [k-_: You'd need intervals or steps
[13:19:54] adaedra: I tried with Time the first time, it may have been my error :x
[13:19:58] [k-_: does ruby even support steps
[13:20:19] wildroman2: has joined #ruby
[13:20:24] mary5030: has joined #ruby
[13:20:44] ljarvis: adaedra: do you have times or dates? :|
[13:21:03] ljarvis: convert them to times
[13:21:11] icedragon: [k-_: Integer#step
[13:21:15] ljarvis: Time.at(from + rand * (to.to_f - from.to_s))
[13:21:20] [k-_: pls, using range here
[13:21:27] icedragon: >> enum = 1.step(10); [enum.next, enum.next, enum.next]
[13:21:28] ruboto: IceDragon # => [1, 2, 3] (https://eval.in/386246)
[13:21:38] workmad3: adaedra: also, is start_date in the future or the past?
[13:21:38] adaedra: ljarvis: ok
[13:21:43] adaedra: workmad3: past
[13:21:48] icedragon: I think step has a second argument...
[13:21:54] ljarvis: shouldn't matter
[13:22:11] workmad3: adaedra: ok, so start_date + rand(Date.today - start_date) will give you a random date in between the two
[13:22:12] icedragon: >> enum = 1.step(10, 3); [enum.next, enum.next, enum.next]
[13:22:13] ruboto: IceDragon # => [1, 4, 7] (https://eval.in/386249)
[13:22:33] workmad3: adaedra: but yeah, as ljarvis said, it shouldn't matter tbh, rand will produce negatives as happily as positives
[13:22:51] icedragon: >> rand(-10)
[13:22:52] ruboto: IceDragon # => 6 (https://eval.in/386251)
[13:22:53] icedragon: >> rand(-10)
[13:22:54] ruboto: IceDragon # => 3 (https://eval.in/386252)
[13:22:55] icedragon: >> rand(-10)
[13:22:56] ruboto: IceDragon # => 0 (https://eval.in/386253)
[13:22:58] icedragon: >> rand(-10)
[13:22:59] ruboto: IceDragon # => 3 (https://eval.in/386254)
[13:23:07] icedragon: Gentlemen, we've hit a road block on that
[13:23:10] ljarvis: IceDragon: you have an irb console too ;)
[13:23:28] [k-_: ACTION deletes ruby
[13:23:33] [k-_: now i dont!
[13:23:59] ljarvis: ?experiment
[13:23:59] ruboto: Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
[13:24:26] icedragon: ACTION crawls back to his cave and tinkers with his local irb
[13:24:56] icedragon: rand y u no gib negatives ;-;
[13:25:23] ljarvis: IceDragon: -rand
[13:25:30] adaedra: yay it works
[13:25:36] adaedra: thanks kind strangers *_*
[13:26:21] [k-_: https://www.youtube.com/watch?v=G7RgN9ijwE4
[13:26:38] dblessing: has joined #ruby
[13:26:44] theery: has joined #ruby
[13:27:11] jhass: [k-_: wrong channel ;)
[13:27:11] CloCkWeRX: has left #ruby: ()
[13:27:14] charliesome: has joined #ruby
[13:27:23] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[13:27:54] icedragon: ljarvis: dats cheating ;x
[13:28:28] commondream: has joined #ruby
[13:28:35] ljarvis: IceDragon: psh, is it though
[13:28:39] icedragon: ljarvis: I guess you could make a different rand method, one that handles negatives
[13:28:40] [k-_: def negativerand(*args); -rand(*args);end
[13:28:41] nateberkopec: has joined #ruby
[13:29:07] whippythellama: has joined #ruby
[13:29:28] icedragon: def rand_of_awesome(n); rand(n) * (n <=> 0); end
[13:30:02] ljarvis: >> a = -10; a--------------------------a
[13:30:03] ruboto: ljarvis # => -20 (https://eval.in/386262)
[13:30:17] JoshL: has joined #ruby
[13:30:30] adaedra: def real_random; 4; end # Chosen by fair dice roll. Guaranteed to be random
[13:30:42] [k-_: def negativerand(*args); a=rand(*args); a % 2 == 0 ? a : -a ;end
[13:30:56] ljarvis: I've seen that in the wild adaedra :(
[13:31:11] adaedra: That's an xkcd, iirc
[13:31:12] nini1294: has joined #ruby
[13:31:19] icedragon: adaedra: shiiiiet, I can't argue with the dice roll...
[13:31:27] nettoweb: has joined #ruby
[13:31:35] [k-_: but it's used in the wild?
[13:31:37] ljarvis: I worked on some code which had a method like "next_number" and it returned a static number
[13:32:04] ljarvis: the tests failed when they changed it so they left it
[13:32:25] icedragon: ljarvis: makes sense in the case of tests I guess
[13:32:41] icedragon: ljarvis: That or they shoudl have used; random = Random.new(seed)
[13:32:45] ziprar: has joined #ruby
[13:33:29] jespada: has joined #ruby
[13:34:09] Scrofff: has joined #ruby
[13:34:42] tkuchiki: has joined #ruby
[13:34:53] emhs: I wonder, can a regular expression be modified after it's been created?
[13:35:20] rbennacer: has joined #ruby
[13:35:49] decoponio: has joined #ruby
[13:36:18] emhs: [k-_: how would one go about this? Particular use case is having to prepend \A to a precompiled regex
[13:36:35] icedragon: _mh_: /\A#{regex.source}/
[13:36:36] Scrofff: has joined #ruby
[13:36:46] devdazed: has joined #ruby
[13:36:47] senayar: has joined #ruby
[13:36:47] senayar: has joined #ruby
[13:36:50] emhs: aaah! Well, should've guessed that.
[13:37:23] krz: has joined #ruby
[13:37:30] phat4life: has joined #ruby
[13:37:31] emhs: Thank you :)
[13:37:47] cubicool: has joined #ruby
[13:39:42] ndrei: has joined #ruby
[13:41:58] strixd: has joined #ruby
[13:42:43] cubicool: I feel dirty.
[13:42:55] strixd: has joined #ruby
[13:43:55] cubicool: I've been using Python for years professionally. I paid off all my debt in life with Python gigs. I have tons of Python side work in queue...
[13:44:08] cubicool: ...and lately all I do play around with ruby.
[13:44:25] [k-_: ruby is not dirty
[13:44:43] serivich: has joined #ruby
[13:45:03] cubicool: I certainly USED to think so.
[13:45:23] emhs: There's language choices based on preference and language choices based on need. Also language choices based on 'better suited for the job'. I don't see many languages I'd call dirty or bad, but many that are not well suited for the job.
[13:45:37] icedragon: cubicool: YES, YES, WE NEED MORE LIKE YOU
[13:45:56] icedragon: python converts!
[13:46:00] icedragon: MUHAHAHAHAHAHA
[13:46:01] canton7: ACTION thinks java is dirty and bad :P
[13:46:24] lucianosousa: has joined #ruby
[13:46:25] emhs: canton7: The army of java programmers out there likely agree with you, yet they still make a lot of money with it ;)
[13:46:34] canton7: your argument is sound, but there are still languages that are fundamentally flawed imo :P
[13:46:35] bronson: has joined #ruby
[13:46:40] canton7: heh, I never said you couldn't make money from them
[13:46:44] canton7: ACTION is one of those java programmers
[13:46:52] emhs: heck... PHP... yes, I didn't say there aren't ones that are really bad.
[13:46:53] icedragon: money trumps happiness?
[13:47:00] CloCkWeRX: has joined #ruby
[13:47:09] canton7: I'm a consultant, so what the client wants trumps everything
[13:47:20] Rapier-: has joined #ruby
[13:47:23] emhs: IceDragon: Well, for the general programming community, apparently... otherwise I can't explain those gazillions of people doing java.
[13:47:28] canton7: luckily java only needs to be rolled out of storage occasionally
[13:47:36] icedragon: Or is it a case where Happiness === money but money != Happiness
[13:47:45] canton7: the langauge choice isn't typically made by the programmer :P
[13:48:04] ndrei: has joined #ruby
[13:48:42] emhs: of course not, but I've met more people that _willingly_ submit to the pain of java for the money, so...
[13:49:01] emhs: (or PHP for that matter)
[13:49:05] momomomomo: has joined #ruby
[13:49:14] canton7: sometimes they do actually like it
[13:49:18] icedragon: _mh_: Because there is so many libraries that do the job already, you just need to piece em together
[13:49:18] canton7: I've got one of those in my office
[13:49:32] JoshL_: has joined #ruby
[13:49:33] icedragon: in a huge unreabable mess...
[13:49:46] icedragon: /experience with java
[13:50:09] emhs: IceDragon: yes, that's the common argument :). Just glue them together, it's _easy_.
[13:50:13] umgrosscol: has joined #ruby
[13:50:22] canton7: not when your dependency management tools suck ass ;0
[13:50:36] emhs: Enter SomeObscureLibraryInflectorInterfaceFactoryInstance
[13:50:44] canton7: even C# how has something bundler-esque (with recursive dependency resolution, a lockfile, etc)
[13:50:52] icedragon: _mh_ You forgot teh name spaces!
[13:51:08] icedragon: canton7: C# is Java done better
[13:51:17] icedragon: __common_argument__
[13:51:28] canton7: now I think enterprise architecture is something different. people who go around bashing the *concept* of things like factories typically haven't had to maintain buge codebases
[13:51:45] canton7: not that java culture doesn't tend to overdo those sorts of things....
[13:52:02] emhs: to be fair, the idea of having a language that can run on any platform is a good one and the JVM has some pretty powerful stuff to offer, the language just fails to use it
[13:52:10] icedragon: Cookie cookie = CookieFactory.Make();
[13:52:12] icedragon: ACTION eats the cookie
[13:52:23] icedragon: x_x taste like java...
[13:52:58] icedragon: _mh_: Its a case of the language sucks but the vm rocks
[13:52:58] canton7: nah, you need to use the factory to create a builder, and use that builder to build a cookie
[13:53:12] emhs: canton7: I don't have a problem with the concepts, the java community just often goes overboard with them.
[13:53:15] icedragon: canton7: Dahell, I just want a COOKIE!
[13:53:21] canton7: agreed on that, _mh_ :P
[13:53:24] icedragon: Cookie cookie = new Cookie();
[13:53:27] chinmay_dd: has joined #ruby
[13:53:34] podman: has joined #ruby
[13:53:34] canton7: yeah, but what if you want a fake cookie for testing?
[13:53:42] icedragon: better yet, C++ cookies
[13:53:46] icedragon: Cookie cookie();
[13:53:47] jerius: has joined #ruby
[13:54:02] icedragon: Cookie cookie(REAL_COOKIE);
[13:54:15] icedragon: ACTION eats the cookie
[13:54:26] icedragon: x_x taste like templates...
[13:55:06] coderhs: has joined #ruby
[13:56:06] sevenseacat: has joined #ruby
[13:56:16] icedragon: canton7: Use inheritance, or composition for the cookie I suppose? new ExperimentalCookie() or cookie = new Cookie(); cookie.properties.push(new ExperimentalTrait());
[13:56:37] emhs: In the end of the day, it more matters on the skill of the person writing the code what you get in the end... some communities just don't seem to care about the results of their overengineering of things.
[13:56:52] JoshL: has joined #ruby
[13:57:03] emhs: And you sadly can overengineer in just about any high level language.
[13:57:04] havenwood: Less code the better.
[13:57:13] Scripore: has joined #ruby
[13:58:06] workmad3: havenwood: there's a limit to that... see perl :P
[13:58:14] emhs: exactly.
[13:58:29] bohallor: has joined #ruby
[13:58:38] havenwood: Factory smactory!
[13:58:42] emhs: And sometimes the little longer, but more readable code helps more (esp. in a multi programmer environment)
[13:58:53] canton7: IceDragon, well you'd typically use DI - so either inject the cookie, or inject a factory that can create cookies on demand
[13:59:10] workmad3: canton7: can I get a cookie injection plz
[13:59:19] canton7: ACTION injects cookies into workmad3's bloodstream
[13:59:22] workmad3: canton7: double-choc-chip by preference
[13:59:55] Fluent: has joined #ruby
[14:00:29] emhs: canton7: wouldn't you need an AbstractCookie first, just in case someone wants to make their own cookies?
[14:00:39] treehug88: has joined #ruby
[14:01:12] yh: has joined #ruby
[14:01:22] icedragon: _mh_: See, this is why we use composition!
[14:01:31] icedragon: Just create CookieProperties
[14:01:44] icedragon: 1 cookie with hundreds of flavours
[14:02:29] danman: has joined #ruby
[14:02:31] n008f4g_: has joined #ruby
[14:02:52] lloyd_: has joined #ruby
[14:02:54] lloyd_: join #jruby
[14:03:00] lloyd_: er forgot /; sorry.
[14:03:14] havenwood: lloyd_: Success! You're here.
[14:03:28] lloyd_: thanks! :)
[14:04:06] aryaching: has joined #ruby
[14:04:40] charliesome: has joined #ruby
[14:04:53] flughafen_: has joined #ruby
[14:05:30] athos_diddy: has joined #ruby
[14:05:34] yayfoxes3: has joined #ruby
[14:05:47] jpfuentes2: has joined #ruby
[14:06:44] havenwood: ?rails athos_diddy
[14:06:44] ruboto: athos_diddy, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[14:08:14] quimrstorres: has joined #ruby
[14:08:30] yh: has joined #ruby
[14:08:31] nonparfumee: has joined #ruby
[14:08:32] Kricir: has joined #ruby
[14:08:38] CustosLimen: has joined #ruby
[14:09:21] al2o3-cr: has joined #ruby
[14:09:26] CloCkWeRX: has left #ruby: ()
[14:09:44] emhs: IceDragon: memories... bad ones. Nightmares... the pain!
[14:09:54] yqt: has joined #ruby
[14:09:56] vasilakisfil_: has joined #ruby
[14:10:11] lloyd_: has left #ruby: ("*poof*")
[14:10:12] canton7: _mh_, nah, you typically wouldn't expose a base class to the consumer
[14:10:27] canton7: Cookie would be an interface, which could either be a CookieImpl (for production) or MockCookie (for testing)
[14:10:54] canton7: now you could have ChocChipCookie and PlainCookie, which share a common AbstractCookie base class
[14:10:54] drewvanstone: has joined #ruby
[14:10:59] canton7: but that's implementation, and not exposed to the consumer
[14:11:06] ndrei: has joined #ruby
[14:11:16] [k-_: or ICookie
[14:11:28] [k-_: CookieFlavourFactory
[14:11:41] sdothum: has joined #ruby
[14:11:45] [k-_: and you need an Ingredient
[14:11:49] [k-_: a Recipe
[14:12:03] canton7: ICookie is a C# convention, not a java one
[14:12:09] [k-_: so if you want a choco chip
[14:12:18] athos_diddy: canton is that subtype polymorphism
[14:12:31] canton7: which bit?
[14:12:49] [k-_: i dont know how
[14:12:53] athos_diddy: Cookie being interface then sharing it with your productiong and testing Cookies
[14:13:08] [k-_: why do you need a cookie interface
[14:13:11] [k-_: silly people
[14:13:20] [k-_: a cookie is already an object
[14:13:28] [k-_: it does not need silly interfaces
[14:13:29] athos_diddy: so you can have different cookies with different return values
[14:13:40] pdoherty: has joined #ruby
[14:13:44] failshell: has joined #ruby
[14:13:47] athos_diddy: but the same functions but can return different values
[14:13:50] canton7: [k-_, we're talking in the abstract :P cookies don't do anything, but imagine they did
[14:14:02] kaleido: has joined #ruby
[14:14:19] fabrice31: has joined #ruby
[14:14:23] canton7: athos_diddy, yeah, although subtyping is a term generally applied to inheritance rather than interface implementation
[14:14:29] quimrstorres: has joined #ruby
[14:14:33] __butch__: has joined #ruby
[14:14:39] [k-_: but interfaces needs higher abstraction than just a cookie
[14:14:59] [k-_: you cant really use Food as an interface too
[14:15:05] [k-_: maybe Edible
[14:15:14] [k-_: but not cookie or food
[14:15:26] athos_diddy: what do you mean higher abstraction? you mean extend a native class?
[14:15:39] canton7: read back to the beginning of the conversation :P it sorta built out and out from cookies
[14:15:43] canton7: none of it was supposed to make sense :P
[14:15:46] gambl0re: has joined #ruby
[14:15:49] [k-_: why would i read up
[14:16:01] rjno: has joined #ruby
[14:16:09] athos_diddy: i want to read the whole thing but i just logged on. ugh i hear people are using cloud based irc clients specifically for this purpose
[14:16:24] sdwrage: has joined #ruby
[14:16:33] canton7: as in... bouncers? heh, would call that a "cloud-based IRC client" :P
[14:16:39] [k-_: public abstract AbstractFood implements Edible { blah blah }
[14:17:06] [k-_: public abstract AbstractCookie extends AbstractFood implements Edible {}
[14:17:49] yorickpeterse: the 2nd implements wouldn't be needed as AbstractFood already implements it
[14:18:01] [k-_: ??\_(???)_/??
[14:18:17] [k-_: s/Edible/Flavorable
[14:18:22] ta: has joined #ruby
[14:18:28] [k-_: now we can have different flavours!
[14:19:25] aryaching: has joined #ruby
[14:20:23] Muhannad_: has joined #ruby
[14:21:51] freerobby: has joined #ruby
[14:22:01] last_staff: has joined #ruby
[14:22:17] drewvanstone: has joined #ruby
[14:22:49] commondream: has joined #ruby
[14:24:13] dseitz: has joined #ruby
[14:24:25] emhs: nice creation.
[14:25:20] emhs: you theoretically would also need to specify ingridients...
[14:25:46] drewvanstone: has joined #ruby
[14:25:48] [k-_: No, its not a cookie: https://www.youtube.com/watch?v=PkOcm_XaWrw
[14:25:51] dudedudeman: this is a shot in the dark question, but does anyone know of any examples of a to-do app written in ruby using TDD as the backbone?
[14:26:27] maloik: that should be an easy google
[14:26:41] maloik: if you want something a little more specific, look up the "stringer" app on github
[14:26:56] dudedudeman: swanson/stringer?
[14:26:58] maloik: it's an RSS reader type app in Sinatra, and it's pretty well written last time I checked
[14:27:01] maloik: yes I believe so
[14:27:25] dented42: has joined #ruby
[14:27:51] jrl: has joined #ruby
[14:28:22] GitGud: has joined #ruby
[14:28:23] dudedudeman: maloik: i'm just struggling to get a solid grasp on testing, so i'm looking to maybe peep some code that is testing within the same context as what i'm working on
[14:28:28] drewvanstone: has joined #ruby
[14:28:40] baroquebobcat: has joined #ruby
[14:28:41] elia: has joined #ruby
[14:28:43] jrl: hi. if I use #{s.split[3]} to get the 4th word in a string, how to i get 4th to last word?
[14:29:06] maloik: jrl: use [3..-1]
[14:29:17] workmad3: jrl: s.split(4).last
[14:29:21] maloik: oh... well depends on how you understand the question :-)
[14:29:33] workmad3: or s.split(4)[3]
[14:29:51] [k-_: wat does the question even mean
[14:29:52] jrl: "I went to ruby channel on freenode" I want to get -> "ruby channel on freenode"
[14:29:52] dopie: has joined #ruby
[14:30:08] maloik: split(" ")[3..-1]
[14:30:14] [k-_: str.split will do
[14:30:23] [k-_: ^ maloik
[14:30:49] freerobby: has joined #ruby
[14:30:50] [k-_: i wished we could do [third..last]
[14:31:03] thalassa: has joined #ruby
[14:31:05] [k-_: that'll be maximum expressiveness!
[14:31:10] havenwood: >> "I went to ruby channel on freenode".partition(' ').last
[14:31:11] ruboto: havenwood # => "went to ruby channel on freenode" (https://eval.in/386276)
[14:31:32] workmad3: [k-_: def third; 3; end; def last; -1; end
[14:31:36] workmad3: [k-_: there you go :P
[14:32:49] havenwood: jrl: I vote partition.
[14:33:45] drewvanstone: has joined #ruby
[14:33:54] jrl: maloik: s.split[3..-1] => ["ruby", "channel", "on", "freenode"]
[14:34:20] jrl: can i get just "ruby channel on freenode"?
[14:34:29] havenwood: jrl: Look at my example above.
[14:34:36] kies: has joined #ruby
[14:36:12] workmad3: >> "I went to ruby channel on freenode".split(" ", 4)[3..-1]
[14:36:13] ruboto: workmad3 # => ["ruby channel on freenode"] (https://eval.in/386281)
[14:36:17] railsraider: has joined #ruby
[14:36:19] jrl: havenwood: I just want from X to last, yours somehow has 'went to' in?
[14:36:32] workmad3: >> "I went to ruby channel on freenode".split(" ", 4)[3] # better
[14:36:33] ruboto: workmad3 # => "ruby channel on freenode" (https://eval.in/386282)
[14:36:37] havenwood: jrl: Ah, I haven't had coffee and totally missed the X part. >.>
[14:36:43] jrl: and this is the simplest way to just get X to last? ;o
[14:37:19] charliesome: has joined #ruby
[14:38:02] maloik: workmad3: I don't like that last version, it's less obvious to me
[14:38:21] maloik: although if you do go that way, .last would be even better
[14:38:36] workmad3: maloik: .last will give you stuff even if there's less than 4 words in the string
[14:38:46] maloik: hmm, good point
[14:39:13] workmad3: maloik: and [3..-1] gives back an array that you then need to access or .join to get the string again
[14:39:41] icebourg: has joined #ruby
[14:40:03] rippa: has joined #ruby
[14:40:17] maloik: yea in the end it all depends on what you need, I didn't think of it as a sentence per se
[14:40:34] fabrice31: has joined #ruby
[14:40:38] Olipro_: has joined #ruby
[14:40:43] [k-_: lol workmad3
[14:41:24] [k-_: in haskell, this might look better
[14:42:03] lkba: has joined #ruby
[14:43:38] ta: has joined #ruby
[14:44:19] unshadow: has joined #ruby
[14:44:44] soulcake: has joined #ruby
[14:45:44] dg-ratio1: has joined #ruby
[14:46:02] ghostpl: has joined #ruby
[14:46:08] sandstrom: has joined #ruby
[14:47:42] russt: has joined #ruby
[14:48:02] fabrice31_: has joined #ruby
[14:49:22] califerno: has joined #ruby
[14:51:36] slawrence00: has joined #ruby
[14:52:30] slawrence: has joined #ruby
[14:53:12] russt: has joined #ruby
[14:53:54] freerobby: has joined #ruby
[14:55:05] dg-ratio1: has joined #ruby
[14:55:59] unshadow: has joined #ruby
[14:56:22] diegoviola: has joined #ruby
[14:56:33] russt: has joined #ruby
[14:56:34] unshadow: Does Ruby's OpenSSL lib uses an imbeded openssl librery or the systems librery ?
[14:56:52] jhass: it should link to the system one afaik
[14:57:27] casadei: has joined #ruby
[15:00:08] mary5030_: has joined #ruby
[15:01:05] centrx: has joined #ruby
[15:01:31] strixd: has joined #ruby
[15:01:32] soulcake: has joined #ruby
[15:01:41] JoshL_: has joined #ruby
[15:02:19] markov_twain: has joined #ruby
[15:02:57] lotherk: has joined #ruby
[15:03:06] elia_: has joined #ruby
[15:04:04] diegoviola: has joined #ruby
[15:04:06] Hijiri: has joined #ruby
[15:04:35] mary5030: has joined #ruby
[15:04:54] kaleido: has joined #ruby
[15:05:11] quimrstorres: has joined #ruby
[15:06:52] CustosLimen: has joined #ruby
[15:07:01] shadoi: has joined #ruby
[15:07:06] brotspinne: has joined #ruby
[15:07:16] momomomomo_: has joined #ruby
[15:07:42] tubuliferous_: has joined #ruby
[15:08:16] fabrice31: has joined #ruby
[15:08:42] brotspinne: hello. is there a better way of writing this? https://gist.github.com/anonymous/c089ef0de05ef3634b7d
[15:09:46] centrx: brotspinne, I like that style
[15:09:59] brotspinne: really? I mean that = is ambigous
[15:10:08] bentanweihao: has joined #ruby
[15:10:08] [k-_: you can add more code and we will suggest!
[15:10:13] [k-_: brotspinne: it's fine
[15:10:13] centrx: brotspinne, It is possible to use an inline/postfix if for if-assignments, but that can be confusing/misleading
[15:10:15] ericmeds: has joined #ruby
[15:10:22] Scripore: has joined #ruby
[15:10:29] centrx: brotspinne, You can put the assignment on a separate line
[15:10:38] centrx: new_variable = compute_some_value('foobar')
[15:10:42] centrx: puts 'hi' unless new_variable.nil?
[15:10:52] Pwnna: when you send a sigterm to a ruby process that has a trap, does it send some signals to any child processes that it has spawned?
[15:11:09] ghostpl: has joined #ruby
[15:11:15] zeroDivisible: has joined #ruby
[15:11:16] [k-_: the dreaded *unless* is back
[15:11:21] brotspinne: yeah the obvious alternative is https://gist.github.com/anonymous/00a97114d54c87561e32 but it just looks verbose
[15:11:27] Pwnna: i have a tar operation running via popen3 and I want to gracefully abort when encountering a SIGTERM (that is, it will finish the tar operation before exitting)
[15:11:44] Pwnna: but it seems like when I send a sigterm and trap it, the tar operation pauses or something like that
[15:11:53] jhass: brotspinne: some style guides suggest to disambiguate with if foo == bar and if (foo = bar), but I hate that style
[15:11:57] brotspinne: centrx: there will be more than more statement if new_variable is not nil
[15:11:58] tkuchiki: has joined #ruby
[15:12:03] brotspinne: more than one
[15:12:37] centrx: brotspinne, Using a single = in if-statements just requires developers with attention to detail
[15:12:37] jhass: I tend to do your second variant
[15:12:44] [k-_: if compute_some_value returns false, it wont run tho
[15:12:45] techsethi: has joined #ruby
[15:12:48] charliesome: has joined #ruby
[15:12:49] centrx: brotspinne, It's less problematic than a == turning into a =
[15:12:50] rbennacer: has joined #ruby
[15:12:51] creakybones: has joined #ruby
[15:13:18] [k-_: jhass: while line = socket.gets is what everyone does!
[15:13:41] kobain: has joined #ruby
[15:13:46] brotspinne: jhass: yes I agree that adding parenthesis is not solving it
[15:13:57] jhass: I'm only dogmatic about where to put spaces
[15:14:00] Xeago: has joined #ruby
[15:14:00] elia: has joined #ruby
[15:14:26] [k-_: sometimes i wish ruby was more expressive
[15:14:46] jhass: I see you didn't try many languages yet
[15:14:47] [k-_: however, it is already reaching its limits
[15:14:47] platzhirsch: has joined #ruby
[15:15:10] brotspinne: ok here is the question: is there another way than "foo = 42" to create a local variable?
[15:15:21] [k-_: i only have a little java, ruby, and a little haskell
[15:15:22] Rubie: has joined #ruby
[15:15:27] nettoweb: has joined #ruby
[15:15:34] cir0x: has joined #ruby
[15:15:38] [k-_: brotspinne: no afaik
[15:15:51] [k-_: eval("foo = 42)
[15:16:07] shadoi: that's not a different operation
[15:16:21] [k-_: ??\_(???)_/??
[15:16:24] jhass: brotspinne: none you want to know :P
[15:16:39] brotspinne: this would be nice actually https://gist.github.com/anonymous/3c5d071fb0aa69d7a94f
[15:16:47] brotspinne: (no real code though)
[15:17:05] [k-_: rspec uses let
[15:17:10] dgutierrez1287: has joined #ruby
[15:17:36] shadoi: Feel free to define let so you can write that, but please don't make anyone else maintain it. :)
[15:17:41] [k-_: let should take an arg, which could be a block as well
[15:17:54] [k-_: the block can also take an arg
[15:17:55] brotspinne: shadoi: no I'm not going to do that :)
[15:18:03] [k-_: which is the name of a variable
[15:18:14] jhass: >> if /(?<foo>bar)/ =~ "bar"; foo.upcase; end; # only other besides = I know
[15:18:15] ruboto: jhass # => "BAR" (https://eval.in/386292)
[15:18:29] [k-_: but you must go deep into the internals to modify scope outside
[15:18:32] platzhirsch1: has joined #ruby
[15:18:53] [k-_: ruby does that now?
[15:19:03] sinkensabe: has joined #ruby
[15:19:07] marciotex: has joined #ruby
[15:20:01] unshadow: How can I tell ruby to use an OpenSSL lib from a specific location ? (ie . require './locallib/opensll.h)
[15:20:16] [k-_: require_relative?
[15:20:27] [k-_: thats not what you mean
[15:20:33] havenwood: >> this = binding; this.local_variable_set 'foo', 42; this.local_variable_get 'foo'
[15:20:34] ruboto: havenwood # => 42 (https://eval.in/386294)
[15:20:37] apeiros: require accepts absolute paths. but that won't work for .h files
[15:20:44] apeiros: @ unshadow
[15:20:48] [k-_: unshadow: you have to set it at compile time
[15:21:04] baryha: has joined #ruby
[15:21:09] [k-_: >> binding
[15:21:10] ruboto: [k-_ # => #<Binding:0x415a0348> (https://eval.in/386295)
[15:21:13] unshadow: [k-_: I see... good thing I have rvm :)
[15:21:22] peter_paule: has joined #ruby
[15:21:28] bentanweihao: has left #ruby: ()
[15:21:29] [k-_: >> binding.pry
[15:21:29] apeiros: important re lvar_set:
[15:21:30] ruboto: [k-_ # => undefined method `pry' for #<Binding:0x41bac32c> (NoMethodError) ...check link for more (https://eval.in/386296)
[15:21:33] apeiros: >> this = binding; this.local_variable_set 'foo', 42; foo
[15:21:34] ruboto: apeiros # => undefined local variable or method `foo' for main:Object (NameError) ...check link for more (https://eval.in/386297)
[15:21:48] havenwood: apeiros: shh, i'm cheating! ;)
[15:21:57] baryha: ! Raa Lynx games, and you know its football game. Lowers ram against each other, the Super Bowl, everything but thing but this stupid football. After they go boyer!
[15:21:59] baryha: Stop lawyyer moyer royer coyer moyer! Brucesht, boyer and that's a fuckers, Cornhuskers, Cornhuskers, Cornbuck fuck cornhusk. Fuck fuckers, Cornfuck buck cornhuskers, Cornhusk. Husk Husk, cornbuck.
[15:22:01] baryha: Juni Jonn Joans Football game it's a soccer game, it's a fucker game, it's a football makes me, it's a soccer game it's a fuck a duck. Fuck fuckers, Cowboys, Ravens, Cornbuck a duck.
[15:22:03] baryha: Juni Jonn Joans Football or long Saturday after the football makes me say oh my eye queue one notch, and than football game. It is the worse this garbage here. Lowers my eyes it more teams like they show its football. Afternoons. No!
[15:22:04] havenwood: !mute baryha
[15:22:04] ruboto: +q baryha!*@*
[15:22:04] ruboto: -o ruboto
[15:22:16] apeiros: what a lame spammer
[15:22:34] [k-_: many fucks were given
[15:22:36] baryha: has left #ruby: ()
[15:22:43] bayfet: has joined #ruby
[15:23:03] bayfet: ! Raa Lynx games, and you know its football game. Lowers ram against each other, the Super Bowl, everything but thing but this stupid football. After they go boyer!
[15:23:04] bayfet: Stop lawyyer moyer royer coyer moyer! Brucesht, boyer and that's a fuckers, Cornhuskers, Cornhuskers, Cornbuck fuck cornhusk. Fuck fuckers, Cornfuck buck cornhuskers, Cornhusk. Husk Husk, cornbuck.
[15:23:05] bayfet: Juni Jonn Joans Football game it's a soccer game, it's a fucker game, it's a football makes me, it's a soccer game it's a fuck a duck. Fuck fuckers, Cowboys, Ravens, Cornbuck a duck.
[15:23:07] bayfet: Juni Jonn Joans Football or long Saturday after the football makes me say oh my eye queue one notch, and than football game. It is the worse this garbage here. Lowers my eyes it more teams like they show its football. Afternoons. No!
[15:23:07] havenwood: !mute bayfet
[15:23:07] ruboto: +q bayfet!*@*
[15:23:07] ruboto: -o ruboto
[15:23:10] yorickpeterse: that worked really well
[15:23:11] bayfet: has left #ruby: ()
[15:23:17] bubafett: has joined #ruby
[15:23:22] dented42: has joined #ruby
[15:23:24] bubafett: ! Raa Lynx games, and you know its football game. Lowers ram against each other, the Super Bowl, everything but thing but this stupid football. After they go boyer!
[15:23:25] bubafett: Stop lawyyer moyer royer coyer moyer! Brucesht, boyer and that's a fuckers, Cornhuskers, Cornhuskers, Cornbuck fuck cornhusk. Fuck fuckers, Cornfuck buck cornhuskers, Cornhusk. Husk Husk, cornbuck.
[15:23:26] bubafett: Juni Jonn Joans Football game it's a soccer game, it's a fucker game, it's a football makes me, it's a soccer game it's a fuck a duck. Fuck fuckers, Cowboys, Ravens, Cornbuck a duck.
[15:23:28] bubafett: Juni Jonn Joans Football or long Saturday after the football makes me say oh my eye queue one notch, and than football game. It is the worse this garbage here. Lowers my eyes it more teams like they show its football. Afternoons. No!
[15:23:29] bubafett: The worst sport everything on during. Most people are runna ma naes.
[15:23:29] yorickpeterse: you might just want to ban the hostname
[15:23:29] bubafett: It's a fucker game. It's no lie it's about football.
[15:23:30] bubafett: Nothing but football is the worst sport everything on television. Nothing on television is college football or long Saturday afternoons. Nothing worst sport ever my eyes it more teams like this stupid football! Brucest boyer coyer! Boyer! Brucesht, boyer! Brucesht! The worst sport ever. nothing paint dry. Lynx game, it's a soccer game, so they show it sucks ten rears. Rum-dum-dum-foot ball.
[15:23:32] bubafett: The worst sport ever moyer! Brucest boyer my lord, what is college football. Nothing but this stupid foot ball is good. Except when I can't watching prime but the worst sport everything but the Jaguars, so bored, makes me say oh my eyes it sucks ten rears. Nothing prime time time but football game. Lowers ram against each other, the Jaguars, Cornhuskers, so bored, makes me say oh my lord, what
[15:23:32] jhass: !kick bubafett Please use https://gist.github.com
[15:23:32] helpa: jhass: No.
[15:23:33] ruboto: ruboto kicked bubafett: use https://gist.github.com
[15:23:33] ruboto: -o ruboto
[15:23:35] brotspinne: what do you think about this? https://gist.github.com/anonymous/b653b12a8f2b9ed346da
[15:23:35] bubafett: has joined #ruby
[15:23:35] bubafett: Nothing prime time time but the Nebraska Cornhuskers, Cornbuckers, so boyer football is they show its football game, so the Nebraska Cornhuskers, so the Jaguars, College football game it's a soccer game. When he football makes me, it's a soccer game, so they go brucesht boyer royer royer! Brucesht, boyer coyer! Brucesht! They show it more. Nothing but football. Nothing on during but as watching
[15:23:37] bubafett: but thing but football. Nothing worst sport everything on television is good. Except when he football game. I'm swearing on during. Most people are runna ma naes. It's a soccer game. It's a lynx game! Raa Lynx game. Lowers my eyes it more teams like than football. No!
[15:23:38] jhass: !mute bubafett
[15:23:39] ruboto: +q bubafett!*@*
[15:23:39] ruboto: -o ruboto
[15:23:46] apeiros: +q *!*@*.business.telecomitalia.it
[15:24:15] centrx: So...how bout that local sports team
[15:24:20] apeiros: somebody with two arms make that mute a bit better please
[15:24:21] yorickpeterse: which one, Cornbuckers?
[15:24:39] apeiros: I still wonder how mushy your brain has to be to spam like that
[15:24:46] havenwood: suuuper mushy
[15:24:52] apeiros: IMO IQ < 40
[15:25:02] apeiros: probably needs a reminder to breathe
[15:25:54] [k-_: lol please use gist
[15:26:04] Aria: It's really not about intelligence. Just entitlement and indifference to other people.
[15:26:11] sfarley: has joined #ruby
[15:26:33] apeiros: sh, I'm insulting the spammer
[15:26:43] jhass: somebody catched if they use the same gecos?
[15:26:43] hahuang65: has joined #ruby
[15:26:54] brotspinne: so in general you guys say assignment in if condition is fine?
[15:27:01] senayar: has joined #ruby
[15:27:01] senayar: has joined #ruby
[15:27:06] apeiros: brotspinne: I avoid it
[15:27:36] brotspinne: it might make clear that == is not intended
[15:27:46] brotspinne: just an idea
[15:28:00] [k-_: stick with =
[15:28:52] jhass: -qq+q bubafett!*@* *!*@*.business.telecomitalia.it *!~baryad@*.business.telecomitalia.it
[15:29:27] Yiota: has joined #ruby
[15:29:30] [k-_: is that why #rubyonrails require registration?
[15:30:21] havenwood: [k-_: Please discuss channel policy in #ruby-community.
[15:30:29] yorickpeterse: I wonder how effective spamassassin would be in an IRC bot
[15:30:45] jhass: -qq bayfet!*@* baryha!*@*
[15:30:59] jhass: -oo apeiros jhass
[15:31:25] olistik: has joined #ruby
[15:31:30] sanjivupadhyaya: has joined #ruby
[15:32:01] apeiros: yorickpeterse: the problem lies with being only able to act after the fact
[15:32:11] apeiros: but I'd guess it could be quite effective aside from that
[15:32:53] apeiros: and it's something I'd love to experiment with
[15:32:56] [k-_: ACTION does not want to discuss policies
[15:33:02] theery: has joined #ruby
[15:33:04] apeiros: training can be done using logs
[15:33:28] [k-_: i know it's your favourite thing
[15:33:32] apeiros: [k-_: that was the answer to your question ;-)
[15:33:59] lotherk: has joined #ruby
[15:34:02] Flcn: has joined #ruby
[15:35:04] dudedudeman: require './app' works fine in irb. change a migration, and now the require does not work
[15:35:08] dudedudeman: what did i break
[15:35:36] jhass: using relative requires
[15:35:52] apeiros: and that my friend, is why using relative requires is a bad idea
[15:35:52] jhass: if you can't be bothered to fix up $LOAD_PATH instead, use require_relative
[15:36:07] apeiros: . is working directory
[15:36:11] [k-_: require ./app?
[15:36:14] B1n4r10: has joined #ruby
[15:36:18] [k-_: cant u just require app
[15:36:23] df: has joined #ruby
[15:36:43] dudedudeman: [k-_ that's what i was doing, and now it no longer works
[15:37:07] [k-_: whatever a migration is, it is not safe!
[15:37:21] dudedudeman: activerecord. i can assure you they are safe
[15:37:22] all_for_tos: has left #ruby: ("Leaving")
[15:37:34] [k-_: -> rails
[15:37:55] dudedudeman: just using it for my ORM
[15:38:01] [k-_: but you did a migration and it broke stuff!
[15:38:15] dudedudeman: clearly the migration didn't break anything, i broke something
[15:38:24] dudedudeman: or, rather, i did not set myself up for success
[15:39:07] [k-_: so you phrased the question improperly
[15:39:31] ahmetkapikiran: has joined #ruby
[15:39:33] Carbonado: has joined #ruby
[15:39:37] gagrio|MRG: has joined #ruby
[15:40:17] Senjai: Good morning ruby
[15:42:34] langlands: has joined #ruby
[15:43:03] snockerton: has joined #ruby
[15:44:36] dudedudeman: because i'm an idiot, irb wasn't taking my require because i wasn't in my root dir.
[15:44:52] dudedudeman: i have my ROOT_PATH and $LOAD_PATH set up in my rakefile... am I doing that wrong?
[15:45:08] iamninja: has joined #ruby
[15:45:10] [k-_: but you are requiring "./app"
[15:45:39] konsolebox: has joined #ruby
[15:46:28] pietr0: has joined #ruby
[15:47:17] railsraider: has joined #ruby
[15:47:26] platzhirsch1: has left #ruby: ()
[15:48:52] skade: has joined #ruby
[15:49:48] yardenbar: has joined #ruby
[15:50:03] ljarvis: dudedudeman: I don't see how setting them up in your rakefile make any different to irb?
[15:50:16] [k-_: i cant help you with this :/
[15:51:45] dudedudeman: ljarvis: it probably doesn't. i was just attempting to load my app from my /db directory, and not root
[15:52:14] dudedudeman: which i think is what jhass and apeiros were alluding to earlier
[15:52:39] jhass: yes that's why require "./foo" is bad
[15:53:12] dudedudeman: where should my load path be setup, jhass? directly in my app.rb file?
[15:53:42] jhass: at the entry point of your application or even on invocation
[15:53:49] jhass: ruby -Ilib, irb -Ilib
[15:54:07] sinkensabe: has joined #ruby
[15:54:58] dudedudeman: ah. thanks dude
[15:56:32] cir0x: has joined #ruby
[15:56:39] Xeago: has joined #ruby
[15:56:44] drewvanstone: has joined #ruby
[15:56:45] markovtwain: has joined #ruby
[15:57:13] vasilakisfil_: has joined #ruby
[15:58:15] arooni-mobile: has joined #ruby
[16:00:18] charliesome: has joined #ruby
[16:00:19] xcesariox: has joined #ruby
[16:00:48] towski_: has joined #ruby
[16:01:30] droidburgundy: has joined #ruby
[16:02:09] langlands: has joined #ruby
[16:02:41] uber: has joined #ruby
[16:04:08] ghostpl: has joined #ruby
[16:06:02] yardenbar: has joined #ruby
[16:06:32] pengin: has joined #ruby
[16:06:44] c0m0: has joined #ruby
[16:07:05] CorySimmons: has joined #ruby
[16:07:07] soulcake: has joined #ruby
[16:07:22] tubuliferous_: has joined #ruby
[16:07:39] theery_: has joined #ruby
[16:07:50] droidburgundy: has joined #ruby
[16:10:08] baweaver: has joined #ruby
[16:10:31] drewo: has joined #ruby
[16:13:50] sarkyniin: has joined #ruby
[16:13:54] cndiv: has joined #ruby
[16:13:54] cndiv: has joined #ruby
[16:16:46] spider-mario: has joined #ruby
[16:17:21] dfockler: has joined #ruby
[16:17:31] pengin: has joined #ruby
[16:17:57] ndrei: has joined #ruby
[16:18:44] shinnya: has joined #ruby
[16:20:04] ivorpad: has joined #ruby
[16:20:24] grzywacz: has joined #ruby
[16:20:25] grzywacz: has joined #ruby
[16:20:57] arup_r: has joined #ruby
[16:21:26] jackjackdripper: has joined #ruby
[16:22:12] Senjai: Is anyone doing anything cool at the moment
[16:22:16] Senjai: I'm doing tediousness atm
[16:22:47] dfockler: Senjai: same here
[16:23:13] uptownhr: has joined #ruby
[16:23:13] shevy: Senjai not really... I am trying to find out why mplayer does not want to play audio files
[16:24:39] Senjai: shevy: Ah, I've been meaning to get that setup with tmux
[16:24:46] Senjai: Get a nice status line thing setup for it
[16:24:55] shevy: I don't have too many cool things going in ruby either
[16:24:57] blue_deref: has joined #ruby
[16:25:01] shevy: I am stuck in maintenance, or rewriting mostly
[16:25:02] sandstrom: has joined #ruby
[16:25:13] Senjai: I'm adding a feature that's.. crappy
[16:25:23] NeverDie: has joined #ruby
[16:25:41] Senjai: s/crappy/involved
[16:26:10] dfockler: I'm thinking of doing a gem a week blog, where I go over a gem and explain architecture, tricks, or other unique parts of the gem
[16:26:28] Senjai: dfockler: Good luck finding a well written gem after a month or so ;)
[16:26:34] last_staff: has joined #ruby
[16:26:41] Senjai: Celluloid isn't the best for that, but its stil worth talking about IMO
[16:26:59] Senjai: Also the rails rendering stack.
[16:27:01] dfockler: I'm also playing with the Frappuccino gem
[16:27:05] [k-_: yes do speak about celluloid
[16:27:21] ursooperduper: has joined #ruby
[16:27:26] Senjai: Celluloid is a great example of how to manage complexity, not saying the code is perfect though
[16:27:26] dfockler: I like Celluloid, I've been reading through the DCell source
[16:27:36] M-Technic: has joined #ruby
[16:27:46] shevy: dfockler pick a gem that has potential
[16:27:51] shevy: not an established gem such as prawn
[16:28:02] Senjai: Also going through a thing that wraps an external program, like resque with redis
[16:28:05] Senjai: might also be interesting
[16:28:08] dfockler: Yeah the Celluloid code is kind of tricky
[16:28:17] Senjai: dfockler: It is suuper tricky
[16:28:40] Senjai: [k-_: Just because I have a quota for making happy people meh, I'm going to mention EventMachine for you.
[16:28:43] Torrieri: has joined #ruby
[16:28:43] Senjai: K I'm done
[16:29:05] dfockler: It's very indirect and uses the weird parts of ruby that most people don't know about
[16:29:24] B1n4r10: has joined #ruby
[16:29:54] William|i7: has joined #ruby
[16:30:37] William|i7: looking for some help with a belongs to many datamapper, cant seem to fetch all posts attached to categorys, https://raw.githubusercontent.com/Askedio/Simple_Ruby_Boostrapped_Blog/Decent_Blog/models/post.rb
[16:30:59] Senjai: dfockler: I would approach it from the "Implimenting erlang in ruby" approach ;)
[16:31:10] [k-_: (pinging [k- is fine)
[16:31:12] dfockler: Senjai: what do you mean?
[16:31:25] dfockler: To read celluloid code?
[16:32:02] Senjai: It impliments many of erlangs concepts
[16:32:07] Senjai: that's where supervisors and stuff come from
[16:32:21] Senjai: Also http://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=11A3EACE78AAFF6D6D62A64118AFCA7C?doi=10.1.1.47.5074&rep=rep1&type=pdf
[16:32:40] puppeh_: has joined #ruby
[16:33:10] platzhirsch: has joined #ruby
[16:34:25] phat4life: how about a gem that generate its self
[16:34:40] dfockler: Senjai: ahh ok
[16:34:43] phat4life: a quine gem
[16:35:45] jhass: boring, go through at least 5 languages/package managers
[16:36:03] Igorshp: has joined #ruby
[16:36:15] sinkensabe: has joined #ruby
[16:36:19] blandflakes: has joined #ruby
[16:37:00] jhass: gem -> cpan -> npm -> pear -> cargo -> gem
[16:37:20] Senjai: Eh, that'd be nice
[16:37:23] Senjai: gem that is
[16:37:28] Senjai: stay away from that npm shite
[16:37:32] vasilakisfil_: has joined #ruby
[16:37:45] Aria: Hey now.
[16:37:53] Senjai: A wild Aria appears
[16:38:35] Aria: Just because node modules form a tidy little DAG...
[16:38:45] havenn: has joined #ruby
[16:38:48] phat4life: write a gem that is a wrapper around webpack
[16:38:57] Senjai: Aria: Mostly that its javascript
[16:39:09] phat4life: (we use webpack for our react front end, which is react, and its less than ideal)
[16:39:22] adaedra: <jhass> gem -> cpan -> npm -> pear -> cargo -> gem
[16:39:26] adaedra: this lacks some pip
[16:39:33] jhass: "at least"
[16:39:35] adaedra: some bower
[16:39:48] jhass: and some shards
[16:39:49] Senjai: phat4life: We went with browserify
[16:39:49] failshell: has joined #ruby
[16:39:53] A124: has joined #ruby
[16:40:08] Senjai: adaedra: Isn't bower just like curl asset_file_here > to this file
[16:40:09] phat4life: do any of you use slanger or pusher?
[16:40:11] BrianBoyko: has joined #ruby
[16:40:19] Scripore: has joined #ruby
[16:40:19] Senjai: phat4life: I've used pusher
[16:40:23] phat4life: slanger just straight up stopped working
[16:40:27] adaedra: Senjai: more like git clone, iirc
[16:40:28] Aria: ACTION does her part to put out the fires of language bigotry.
[16:40:35] nobitanobi: has joined #ruby
[16:40:44] Senjai: phat4life: we haven't had an issue with pusher
[16:40:51] phat4life: er, slanger works in dev, not in prod
[16:40:53] Senjai: phat4life: I found that it causes people to be lazy though.
[16:40:58] Senjai: phat4life: go ask support
[16:40:59] phat4life: Senjai: pusher?
[16:41:05] Flcn: has joined #ruby
[16:41:07] William|i7: has left #ruby: ()
[16:41:10] phat4life: how does pusher/slanger make people lazy
[16:41:49] havenn: hex and nimble
[16:41:49] Senjai: phat4life: Instead of making actual endpoints, or doing certain things properly with websockets or polling, they will opt for pusher.
[16:41:50] chinmay_dd: has joined #ruby
[16:41:54] Senjai: phat4life: Slanger is a standalone server ruby implementation of the Pusher protocol. It is not designed to run inside a Rails or sinatra app, but it can be easily installed as a gem. <<
[16:42:08] charliesome: has joined #ruby
[16:42:11] Senjai: Honestly, go with elixir, or even node for something like that :P
[16:42:11] puppeh_: any1 using requirejs-rails gem?
[16:42:18] wallerdev: has joined #ruby
[16:42:20] Senjai: puppeh_: #RubyOnRails
[16:42:28] mordocai: has joined #ruby
[16:42:44] phat4life: have any of you used sails?
[16:42:49] ruboto: Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
[16:42:56] platzhirsch: has joined #ruby
[16:42:59] cpruitt: has joined #ruby
[16:42:59] phat4life: aka sails, the rails of node
[16:43:18] Senjai: If I used node, I wouldn't use it to solve the same problems as rails. I'd use rails
[16:43:35] endash: has joined #ruby
[16:43:41] olistik: has joined #ruby
[16:43:53] phat4life: the problem is websockets with rails, i am not sure how to do it properly
[16:44:04] Senjai: phat4life: You dont. You use a language meant for it
[16:44:14] Senjai: phat4life: Elixir, Go, or even Node
[16:44:19] atom3: has joined #ruby
[16:44:24] Senjai: phat4life: #besttoolforthejob
[16:44:40] deric_skibotn: has joined #ruby
[16:44:41] Senjai: Elixir/erlang is probably the best solution out there
[16:44:49] Senjai: Due to the BEAM vm
[16:45:03] phat4life: sails is interesting though, as its a node mvc framework, farily similar to rails in concept
[16:45:06] Xeago: has joined #ruby
[16:45:15] shevy: who picks such a name
[16:45:21] phat4life: its meant to be like rails
[16:45:27] Senjai: shevy: Javascript developers :P
[16:45:32] shevy: I'm gonna create a gem called sailormoon and then I will make my new framework
[16:45:35] shevy: sails on sailormoon!
[16:45:50] phat4life: http://sailsjs.org/#!/
[16:45:52] shevy: ruby on rails
[16:45:54] shevy: php on poop
[16:46:04] Senjai: https://theintelligentfan.files.wordpress.com/2013/05/swing-and-a-miss-edited.png
[16:46:09] [k-_: java on walking sticks
[16:46:11] shadoi: has joined #ruby
[16:46:23] DroidBur_: has joined #ruby
[16:46:40] pengin: has joined #ruby
[16:46:50] phat4life: i think i am going to take a break from ruby for a while
[16:46:57] Senjai: phat4life: :(
[16:47:04] phat4life: i miss c++ :(
[16:47:15] phat4life: i know right
[16:47:29] Senjai: ACTION is going back to work now :P
[16:47:43] arooni-mobile: has joined #ruby
[16:47:52] |work: shevy: D on D
[16:48:07] freerobby: has joined #ruby
[16:48:24] griffindy: has joined #ruby
[16:48:52] RobertBirnie: has joined #ruby
[16:48:56] theery: has joined #ruby
[16:49:06] shevy: [k-_ java on jeroids
[16:49:17] shevy: python on ShshShshSzhshshsh
[16:49:26] [k-_: ruby on track
[16:49:27] theery: has joined #ruby
[16:49:30] olistik: has joined #ruby
[16:49:33] [k-_: pun intended
[16:49:43] tkrajcar: has left #ruby: ()
[16:49:46] djbkd: has joined #ruby
[16:49:47] phat4life: i have to learn java, any the lack of duck types, how do i adapt blah
[16:50:01] [k-_: interfaces
[16:50:04] shevy: you just lower your head, accept your fate shamefully, and learn it phat4life
[16:50:18] shevy: or perhaps you can get a good book that is fun to read
[16:50:22] nunayerBeezwax: has joined #ruby
[16:50:28] phat4life: i have ruby design pattern books
[16:50:29] [k-_: > you cast to a interface
[16:51:03] arcanez: has joined #ruby
[16:51:22] SOLDIERz: has joined #ruby
[16:52:34] arcanez: is there a difference in performance/gc for "foo = 'bar' << baz << 'quux'" vs "foo = 'bar' + baz + 'quux'" vs "foo = "bar#{baz}quux"" (where bar & quux are strings and baz is a variable that has a string)
[16:52:48] nateberkopec: has joined #ruby
[16:53:27] arcanez: I know there is for += vs << vs #{}, but not sure about just +
[16:53:42] bronson: has joined #ruby
[16:54:03] shevy: arcanez + will create a new object, << will not
[16:54:11] [k-_: if you already have strings, u can use << or #{}
[16:54:18] [k-_: but if you dont, use #{}
[16:54:39] shevy: + occurs in both situations btw, += just is a shortcut for: bla += 'hi' bla = bla + 'hi'
[16:54:46] [k-_: is #{} a method call?
[16:54:52] avelldiroll: has joined #ruby
[16:54:58] shevy: don't think so; but it will call .to_s
[16:55:13] Senjai: It will call to_s on the result between the braces if it is not a string
[16:55:17] Senjai: same goes for normal concatenation
[16:55:22] Senjai: Actually, I'm pretty sure it uses coerce
[16:55:31] arcanez: + will create new objects based on the number of +s right?
[16:55:47] shevy: number of what?
[16:55:56] shevy: what means +s
[16:56:07] arcanez: foo+bar+baz+quux+this+that
[16:56:09] GarethAdams: a + b + c will perform two #+ method calls, yes
[16:56:14] arcanez: creates more objects vs foo+bar+baz
[16:56:23] [k-_: youshouldbefunctionalanddonotembracesideeffects
[16:56:33] perrier: has joined #ruby
[16:56:43] mikecmpbll: has joined #ruby
[16:56:49] shadoi: don't embrace them, just give them a little side-hug
[16:56:54] platzhirsch: has joined #ruby
[16:57:00] chinmay_dd: has joined #ruby
[16:57:07] jacor: has joined #ruby
[16:57:14] [k-_: if you have variables, use #{}
[16:57:35] [k-_: if you just want to add hard coded strings, use ""
[16:57:52] [k-_: if you want formatting, use %
[16:57:53] duderonomy: has joined #ruby
[16:57:55] fabrice31: has joined #ruby
[16:58:04] [k-_: if you want to modify, use <<
[16:58:14] [k-_: no need for +
[16:58:21] shevy: arcanez oh yeah, because more calls to the .+ method
[16:58:52] [k-_: "a"+"b" -> use "ab"
[16:59:43] droidburgundy: has joined #ruby
[17:00:49] psye: has joined #ruby
[17:01:01] Scroff: has joined #ruby
[17:01:27] shevy: great hint!
[17:01:40] shevy: >> "a""b"
[17:01:41] ruboto: shevy # => "ab" (https://eval.in/386323)
[17:01:47] shevy: ruby stole two '"'
[17:02:02] A124: has joined #ruby
[17:02:04] Senjai: is performing set intersections notably faster than with arrays?
[17:02:15] Senjai: E.g. is it worth converting an array to a set to run an intersection
[17:03:22] [k-_: if your array is not uniq, no
[17:03:41] [k-_: it doesnt matter
[17:03:47] soulcake: has joined #ruby
[17:03:49] [k-_: for the uniqueness, that is
[17:03:51] peter_paule: has joined #ruby
[17:03:59] BrianBoyko: Howdy again. I'm ... kinda up poop creek. How do I make a ruby app that I can call from the command line?
[17:04:04] [k-_: i think so
[17:04:07] husanu: has joined #ruby
[17:04:11] brotspinne: has joined #ruby
[17:04:18] platzhirsch1: has joined #ruby
[17:04:23] [k-_: BrianBoyko: use the #!
[17:04:27] anisha: has joined #ruby
[17:04:53] [k-_: #!/usr/local/bin/ruby
[17:05:18] [k-_: then you can just type the file name without having to type ruby <file name>
[17:05:44] Xeago: has joined #ruby
[17:05:59] [k-_: Senjal, i think it would be worth it
[17:06:31] [k-_: you could do a benchmark, it would benefit the community :D
[17:06:50] Senjai: aye will do in a bit :)
[17:07:27] soxet: has joined #ruby
[17:08:06] arup_r: has joined #ruby
[17:08:40] shevy: BrianBoyko you just have the .rb file in question ok? that file can either have all the code, or call to the code that you wish to invoke
[17:08:53] shevy: if you have a proper #shebang line, you can omit the leading "ruby" invocation component
[17:09:12] [k-_: you can also use a shell script
[17:09:26] vasilakisfil_: has joined #ruby
[17:09:28] shevy: you can alias make an alias, like "alarm" as alias to "/tmp/alarm.rb", then youc an invoke via alarm; or you structure it like a gem, then you can put a bin/ file that will invoke it
[17:09:31] BrianBoyko: That's right. I am running bash
[17:09:33] shevy: that is how e. g. "rackup" works
[17:09:48] shevy: I can not type well today
[17:09:54] shevy: my left pinkie is injured :(
[17:11:00] Lucky_: has joined #ruby
[17:11:22] msnyon: has joined #ruby
[17:11:48] platzhirsch: has joined #ruby
[17:12:04] A124: has joined #ruby
[17:12:37] atom3: has joined #ruby
[17:14:30] rbennacer: has joined #ruby
[17:14:38] User458764: has joined #ruby
[17:15:01] volty: has joined #ruby
[17:15:19] hahuang65: has joined #ruby
[17:17:59] dfockler: 09:45 shevy: ruby on rails
[17:17:59] dfockler: 09:45 shevy: php on poop
[17:18:05] dfockler: lol I just read these
[17:18:49] shevy: it's harder to come up with frameworks for other languages
[17:18:57] shevy: nim? lua?
[17:19:02] dorei: has joined #ruby
[17:19:11] weaksauce: has joined #ruby
[17:20:06] djbkd_: has joined #ruby
[17:20:16] x1337807x: has joined #ruby
[17:20:23] dfockler: Erlang on Monads
[17:20:28] towski_: has joined #ruby
[17:20:51] dfockler: Nim on Omin
[17:21:06] crdpink2: has joined #ruby
[17:21:25] _blizzy_: has joined #ruby
[17:21:32] dfockler: Lua on the Moon
[17:21:38] BrianBoyko: Hmm... I think I might be screwing this up. I'm trying to write a program that, when executed, will write a CSV file from the database. But the error I'm getting is that my method isn't defined. https://gist.github.com/brianboyko/25736f9efde4de320b57
[17:21:49] [k-_: Elixir on drugs
[17:21:57] Senjai: BrianBoyko: Databases typically can dump CSV's by themselves
[17:22:00] Senjai: have you considered that?
[17:22:10] dfockler: BrianBoyko: usually through an export function
[17:22:23] Senjai: [k-_: Honestly, heisenburg would be a great library name for an elixir library
[17:22:23] BrianBoyko: Senjai - yes, but in order to do that I'd need to log into the database and export it from there.
[17:22:25] _main_: has joined #ruby
[17:22:39] BrianBoyko: What I want to do is create a publically accessible CSV file.
[17:23:07] BrianBoyko: and run it every 10 minutes or so.
[17:23:15] shevy: dfockler I like the latter two
[17:23:20] [k-_: Elixir's heisenburg
[17:23:22] shevy: Erlang on Monads, isn't that haskell?
[17:23:36] [k-_: errr exposed!
[17:23:49] dfockler: BrianBoyko: you can just have your ruby db handler do postgres' COPY function
[17:23:51] marciotex: has joined #ruby
[17:24:16] BrianBoyko: conn.exec("COPY donors to 'output.csv' header") - like that?
[17:24:58] dfockler: BrianBoyko: http://deveiate.org/code/pg/PG/Connection.html#method-i-copy_data
[17:25:02] dfockler: yeah basically
[17:25:55] msnyon: has joined #ruby
[17:28:21] yqt: has joined #ruby
[17:29:01] duoi: has joined #ruby
[17:29:05] vasilakisfil_: has joined #ruby
[17:30:06] Muhannad_: has joined #ruby
[17:30:18] s2013: has joined #ruby
[17:31:33] rbennacer: has joined #ruby
[17:32:19] gambl0re: has joined #ruby
[17:32:57] drewo: has joined #ruby
[17:34:08] platzhirsch: has joined #ruby
[17:34:17] ursooperduper: has joined #ruby
[17:37:02] wallerdev2: has joined #ruby
[17:37:10] drewvanstone: has joined #ruby
[17:37:41] sanjivupadhyaya: has joined #ruby
[17:38:47] gianlucadv: has joined #ruby
[17:39:08] [k-_: good morning how are you on this fine day
[17:39:08] xxneolithicxx: anyone know of any good open APIs I can use to do practice dev
[17:39:29] xxneolithicxx: im quite grand
[17:39:59] skade: has joined #ruby
[17:40:09] xxneolithicxx: dont really care what the data it returns is, just looking for something thats well documented and free
[17:42:21] freerobby: has joined #ruby
[17:42:37] ndrei_: has joined #ruby
[17:42:40] blaines: has joined #ruby
[17:42:44] shevy: xxneolithicxx work on some json data perhaps?
[17:43:26] BrianBoyko: ugh, I'm completely stuck
[17:43:54] Xeago: has joined #ruby
[17:44:05] ghostpl: has joined #ruby
[17:44:37] [k-_: did you know, defining #call will automatically allow you to use instance.(args) syntactic sugar?
[17:44:39] nobitanobi: has joined #ruby
[17:45:17] shevy: BrianBoyko always try to bring down things to a simpler level
[17:45:42] [k-_: we should have a ?tip
[17:45:49] [k-_: and we spread little ruby tidbits
[17:45:56] Scroff: has joined #ruby
[17:46:03] BrianBoyko: Okay. basically this: How do you build a progress bar app?
[17:46:08] atomical: has joined #ruby
[17:46:24] [k-_: ideally, cli gems will have you covered
[17:46:33] kaleido: very carefully and with well thought out plans
[17:46:34] lkba_: has joined #ruby
[17:46:46] [k-_: or you can use jruby and use the awful swing progress bar with a gui
[17:47:08] BrianBoyko: I can build the bar, I just need the number.
[17:47:42] BrianBoyko: How do I have my website (running Jekyll on Github Pages) grab info from the Postgres database on heroku?
[17:47:43] Aria: Progress of what?
[17:47:51] BrianBoyko: I'm trying to build a crowdfunding app.
[17:48:18] [k-_: won't that be your source of numbers
[17:48:18] jhass: write a small API that your JS can query
[17:48:31] DroidBur_: has joined #ruby
[17:48:41] jhass: or setup a cronjob to regenerate it
[17:48:45] pengin: has joined #ruby
[17:48:51] danman: has joined #ruby
[17:49:05] BrianBoyko: Unfortunately, I can't run psql locally on the heroku machine.
[17:49:19] BrianBoyko: so I can't so things like output to CSV
[17:49:41] jhass: wat, heroku?
[17:49:48] sarmiena_: has joined #ruby
[17:49:51] jhass: ah, right, that's you
[17:50:03] jhass: go with the API
[17:50:04] BrianBoyko: : on my face: https://gist.github.com/brianboyko/25736f9efde4de320b57
[17:50:23] jhass: add a route that returns json with the current amounts
[17:50:29] zeroDivisible: has joined #ruby
[17:50:45] jhass: http://www.sinatrarb.com/
[17:51:08] jhass: http://www.rubydoc.info/gems/pg
[17:51:20] OrbitalKitten: has joined #ruby
[17:51:36] glyph_machinery: has joined #ruby
[17:51:52] vasilakisfil_: has joined #ruby
[17:53:45] Igorshp: has joined #ruby
[17:54:06] casadei: has joined #ruby
[17:55:13] endash: has joined #ruby
[17:55:57] NeverDie_: has joined #ruby
[17:56:38] freerobby: has joined #ruby
[17:57:27] drewvanstone: has joined #ruby
[17:57:50] baweaver: has joined #ruby
[17:59:29] pengin: has joined #ruby
[17:59:32] BrianBoyko: Is this *something* like what I'm looking for? https://gist.github.com/brianboyko/103bf136b75532c8eb24
[18:00:07] jhass: I don#t see how that could work
[18:00:10] flughafe1: has joined #ruby
[18:00:30] chinmay_dd: has joined #ruby
[18:00:40] jhass: you're completely mixing the DSL of sinatra with the pg gem here
[18:00:47] jhass: http://tryruby.org
[18:01:30] tuelz: has joined #ruby
[18:01:42] Torrieri: has joined #ruby
[18:02:46] NeverDie: has joined #ruby
[18:03:49] mary5030_: has joined #ruby
[18:04:04] fmcgeough: has joined #ruby
[18:04:07] doublemalt_: has joined #ruby
[18:06:40] baweaver: has joined #ruby
[18:06:41] jmignault: has joined #ruby
[18:06:47] StephenOTT: has joined #ruby
[18:06:55] t0rrieri: has joined #ruby
[18:07:02] jackjackdripper: has joined #ruby
[18:07:42] atom3: has joined #ruby
[18:09:49] chinmay_dd: has joined #ruby
[18:10:01] sinkensabe: has joined #ruby
[18:10:22] djbkd: has joined #ruby
[18:12:09] t0rrieri: has joined #ruby
[18:12:29] lucianosousa: has joined #ruby
[18:12:41] ramfjord: has joined #ruby
[18:12:57] bluOxigen: has joined #ruby
[18:13:10] ramfjord: has left #ruby: ()
[18:13:17] ramfjord: has joined #ruby
[18:14:15] poncha: has joined #ruby
[18:14:29] mary5030: has joined #ruby
[18:15:20] yardenbar: has joined #ruby
[18:15:45] Scroff: has joined #ruby
[18:15:57] jenrzzz: has joined #ruby
[18:16:02] hahuang65: has joined #ruby
[18:16:06] BrianBoyko: jhass - I just can't wrap my head around this right now. I'm going to crash, I'll be back in a bit.
[18:16:20] bhorn1: has joined #ruby
[18:17:03] Rollabunna: has joined #ruby
[18:17:05] ghostpl: has joined #ruby
[18:17:12] chinmay_dd: has joined #ruby
[18:17:23] dgutierrez1287: has joined #ruby
[18:17:36] alphaatom: has joined #ruby
[18:18:01] olistik: has joined #ruby
[18:18:08] Zai00: has joined #ruby
[18:18:38] snockerton: has joined #ruby
[18:19:40] ruv: has joined #ruby
[18:19:41] workmad3: has joined #ruby
[18:20:17] droidburgundy: has joined #ruby
[18:20:58] mary5030_: has joined #ruby
[18:21:04] JoshL: has joined #ruby
[18:21:55] mary5030_: has joined #ruby
[18:23:42] tractatus: has joined #ruby
[18:23:44] bronson: has joined #ruby
[18:24:48] Flcn: has joined #ruby
[18:25:15] droidburgundy: has joined #ruby
[18:25:32] yayfoxes3: has joined #ruby
[18:25:34] baweaver: has joined #ruby
[18:25:40] workmad3: has joined #ruby
[18:26:17] nickfausnight: has joined #ruby
[18:27:10] kirun: has joined #ruby
[18:27:12] i: has joined #ruby
[18:27:13] i: has left #ruby: ()
[18:27:33] dopie: has joined #ruby
[18:27:38] B1n4r10: has joined #ruby
[18:28:16] jpfuentes2: has joined #ruby
[18:33:56] ta: has joined #ruby
[18:35:18] olas: has joined #ruby
[18:35:38] kahuna_: has joined #ruby
[18:35:49] chinmay_dd: has joined #ruby
[18:35:53] rdark: has joined #ruby
[18:36:19] olas: is there a way to query how many bytes are in a c type on your system? (for example: how many bytes in a uint64_t on centos7)
[18:36:30] olas: with ruby
[18:38:01] jhass: mmh, maybe ffi has something
[18:38:03] adaedra: a uint64_t is always 64 bits
[18:38:25] jhass: http://devdocs.io/ruby/fiddle/importer#method-i-sizeof
[18:39:59] chinmay__: has joined #ruby
[18:40:12] _solomon: has joined #ruby
[18:41:15] lkba: has joined #ruby
[18:41:45] sarkyniin: has joined #ruby
[18:42:48] dfinninger: has joined #ruby
[18:43:04] netmask: has joined #ruby
[18:44:20] speakingcode: has joined #ruby
[18:44:45] acovrig: has joined #ruby
[18:44:54] shevy: hmm I have some scripts that generate some files
[18:44:57] shevy: ruby scripts
[18:45:04] shevy: it takes a bit too long for my taste though
[18:45:10] shevy: 4 seconds in total perhaps
[18:45:28] acovrig: Is there a way to append an item to an array in a hash on the fly (so I don???t have to have a var_name[:hash_item] = Array.new just before the loop)?
[18:45:37] shevy: how should one go about trying to optimize it for speed?
[18:45:44] nhhagen: has joined #ruby
[18:45:47] ItSANgo__: has joined #ruby
[18:45:58] fabrice31: has joined #ruby
[18:46:19] apeiros: acovrig: hash = {key: []} before the loop is the best choice IMO
[18:46:23] s2013: has joined #ruby
[18:46:39] apeiros: but you can do `hash[:key] ||= []; hash[:key] << item`
[18:47:18] apeiros: or `hash = Hash.new { |h,k| h[k] = [] }; ???your loop??? hash[:key] << item`. note that this variant creates a new array on *lookup* already.
[18:48:52] tractatus: has left #ruby: ()
[18:49:50] casadei: has joined #ruby
[18:50:12] ebernhardson: has joined #ruby
[18:50:23] infinitone: has joined #ruby
[18:50:43] charliesome: has joined #ruby
[18:51:01] wildroman2: has joined #ruby
[18:53:01] ivorpad: has joined #ruby
[18:53:32] eggoez: has joined #ruby
[18:55:14] jenrzzz: has joined #ruby
[18:55:16] netmask: has joined #ruby
[18:55:23] alphaatom: has joined #ruby
[18:55:25] dented42: has joined #ruby
[18:55:38] mary5030: has joined #ruby
[18:55:51] workmad3: has joined #ruby
[18:57:13] DroidBur_: has joined #ruby
[18:58:08] yfeldblum: has joined #ruby
[18:58:18] shinnya: has joined #ruby
[18:58:55] acke: has joined #ruby
[18:59:23] Polysics: has joined #ruby
[18:59:45] ttilley: has joined #ruby
[19:00:06] Xeago: has joined #ruby
[19:00:07] Tai15: has joined #ruby
[19:01:36] acovrig: apeiros: thanks, I???m new to ruby (coming from PHP); I???m guessing I would need to use a class to be able to do something like dev.size (https://gist.github.com/acovrig/82aed87de4f563aea484)?
[19:02:03] apeiros: acovrig: generic tips:
[19:02:04] Guest57: has joined #ruby
[19:02:11] skade: has joined #ruby
[19:02:12] apeiros: a) snake_case method names: get_devs
[19:02:13] gregf: has joined #ruby
[19:02:31] apeiros: b) no get_foo, set_foo, or is_foo. we use foo, foo=, foo? instead
[19:02:42] apeiros: c) use {} instead of Hash.new, use [] instead of Array.new
[19:03:05] Igorshp: has joined #ruby
[19:03:43] apeiros: re your question - you mean e.g. at line 17? `devs.size1.push(dev)` instead of `devs[:size1].push(dev)`?
[19:03:58] shevy: does this give me new devs?
[19:05:05] B1n4r10: has joined #ruby
[19:06:33] gambl0re: has joined #ruby
[19:06:49] ebernhardson: has left #ruby: ()
[19:06:52] atmosx: 5 USD/hr each
[19:06:55] atmosx: for ruby/ror
[19:08:14] marciotex: has joined #ruby
[19:08:44] centrx: shevy'll do it for $4.99!
[19:09:29] CustosLimen: has joined #ruby
[19:09:53] chinmay_dd: has joined #ruby
[19:09:55] phutchins: has joined #ruby
[19:10:31] apeiros: I doubt shevy would ever do rails
[19:10:37] duderonomy: has joined #ruby
[19:10:39] acovrig: apeiros: not exactly, but it makes me think differently; with either method, wouldn???t I end up with devs = {:size1=>[dev], :size2=>[]} if there isn???t any of size2, and if so how would I remove the empty array if it is empty?
[19:11:02] apeiros: acovrig: I don't follow.
[19:11:56] atmosx: apeiros: why not?
[19:12:00] rdark: has joined #ruby
[19:12:10] drewvanstone: has joined #ruby
[19:12:23] atmosx: shevy: why no rails?
[19:12:27] apeiros: atmosx: regarding shevy?
[19:12:30] atmosx: apeiros: yes
[19:12:40] apeiros: just ask them about their opinion on rails ;-)
[19:13:19] acovrig: apeiros: just understood the ||= message above, it seems to work well
[19:13:34] atmosx: shevy: What do you think of the highly acclaimed ruby-based programming framework called rails? lol
[19:14:03] dfockler: I don't understand why it's called rails
[19:14:18] dfockler: or Ruby on Rails for that matter
[19:14:18] apeiros: dfockler: because there isn't a lot for you to decide on
[19:14:25] |work: dfockler: Because extending the metaphor.
[19:14:31] dfockler: Ruby Train!
[19:14:33] djbkd: has joined #ruby
[19:15:20] apeiros: I'm not kidding btw., afaik that's the reason. rails is (or was) opinionated. so it took many decisions away from you. i.e. you were "on rails".
[19:15:36] apeiros: (and hence could focus on your "real" tasks)
[19:15:40] atmosx: Guys, is there any website listing ip and domain names of all the sites that someone would wanna "block" (porn, torrents, etc.?). I've seen only phishing websites listed.
[19:15:42] dfockler: Ruby in Handcuffs
[19:15:57] |work: Ruby ala DHH.
[19:16:27] dfockler: atmosx: might check out some antivirus sites???, or just ask the UK gov't
[19:18:01] atmosx: dfockler: I've got the UK's "official" list from wikipedia. Well probably the 'public' one... I'm not sure how does one feel living in the UK, privacy-wise. Today I've read that 'Ghost' blogging platform is migrating it's infrastructure to the Netherlands, due to privacy concerns.
[19:18:32] atmosx: There other UK online services moving abroad too. I'm afraid that in a decade you won't be able to purchase online services from foreign countries
[19:18:38] Asher: has joined #ruby
[19:18:40] dfockler: atmosx: yeah I just read about that stuff
[19:18:46] pontiki: has joined #ruby
[19:19:09] zer0ne: has joined #ruby
[19:19:50] atmosx: dfockler: govs and marketers are killing the internet as we know it. My twitter timeline is full of 'promotion' messages and my 'friend requests' are mostly by bots.
[19:20:59] centrx: Twitter? What's that?
[19:21:15] dfockler: I read twitter on the cli, so I don't see anything but words
[19:21:31] atmosx: dfockler: what client?
[19:21:38] dfockler: rainbowstream
[19:21:39] atmosx: and why do you do that btw?
[19:21:53] lolmaus: has joined #ruby
[19:21:54] dfockler: so it doesn't look like I'm browsing twitter at work
[19:22:09] yqt: has joined #ruby
[19:22:22] shevy: atmosx no I meant because apeiros was calling a get_devs method ... <apeiros> a) snake_case method names: get_devs
[19:22:26] atmosx: it kills the experience but whatever...
[19:23:03] dfockler: atmosx: It's like 70% of the experience, and without ads
[19:23:12] slash_nick: shevy: that only returns your current devs... to get new devs i think it's get_devs!... or you can just disable dev caching
[19:23:29] shevy: dev caching... do I store them in the cellar or what
[19:24:09] slash_nick: cellar is okay... not your wine cellar though, you know devs
[19:24:09] Aria: Prune your twitter lists. Block followers who are spammy or who don't interact like human beings. Block the jerks. Follow people unlike you but who can see nuance. Block people who won't see nuance.
[19:24:14] Aria: You'll have a very different experience.
[19:24:24] yh: has joined #ruby
[19:24:25] atmosx: dfockler: you writ eon terminal at work, emacs/vim?
[19:24:59] atmosx: dfockler: well the without 'ads' is a good one. Don't spread the word around because twitter will find the way to inject adds on clients too in the long run.
[19:25:10] baweaver: has joined #ruby
[19:25:19] dfockler: slowly adopting vim, although it's a little 'much' for doing CSS/HTML
[19:25:59] atmosx: Aria: hm, a reason I don't miss my FB account is that I "had" to follow many peoplw I didn't care... It was depressing.
[19:26:11] shevy: dfockler don't let it play with your brain!
[19:26:22] atmosx: dfockler: hm, well if you use a shortcut to load the browser on the fly, it's okay.
[19:26:24] Aria: Indeed. Private lists that are your 'real' attention are even better.
[19:26:27] sandstrom: has joined #ruby
[19:26:34] Aria: That way you can 'follow' for social lubrication but not actually pay attention
[19:26:36] Aria: likewise muting
[19:26:58] husanu: has joined #ruby
[19:27:04] atmosx: dfockler: I use vim and espresso for my CSS. But I'm an amateur.
[19:27:32] atmosx: Aria: I muted only 2 people.
[19:28:00] atmosx: Aria: also,I'd like my timeline to be less about politics and more about programming but even that apparently, it's hard to achieve. Anyway, twitter is not a real 'problem'.
[19:28:58] sdwrage: has joined #ruby
[19:30:04] baweaver: has joined #ruby
[19:30:10] shevy: social lubrication
[19:30:16] atmosx: jhass: you were right, adding bs=1m and usind /dev/rdisk improved my r/w speeds considerably, I just copied 8 GB really fast.
[19:30:18] shevy: interesting word combinations are created here!
[19:30:28] slash_nick: dfockler: if you become proficient with vim, i doubt you'll keep that feeling that it's too much (even for html/css)
[19:31:06] dfockler: slash_nick: probably, I like it, I just don't yet have all the skills that I do in sublime
[19:31:12] Aria: Heh. If only we could separate the politics from programming, but it turns out our actions as programmers have social consequences. And hence we can't ignore politics.
[19:31:23] atmosx: slash_nick: I hate the copy/paste I mean yank/paste even registers are kinda tricky, too long combinations.
[19:31:43] dfockler: Aria: politics is a part of humanity, like it or not
[19:31:50] atmosx: I need to optimize that... I mean registers are awesome but having a 'combo' instead of a quick shortcut is a pain
[19:31:51] kadoppe: has joined #ruby
[19:32:09] slumos: has left #ruby: ()
[19:32:31] Aria: Indeed. Politics is literally what happens when humans interact in groups.
[19:32:49] Aria: (I don't actually want to separate them. I've got more specific goals.)
[19:32:49] Soda: has joined #ruby
[19:32:51] atmosx: Aria: I would like to be more patient and state my opinion in less aggressive ways (especially when I strongly disagree).
[19:33:04] Aria: Indeed. It takes practice to do so.
[19:33:12] Aria: (And is worth every moment of that practice)
[19:33:18] atmosx: I'm reading a sort of thesis about why people seem so unreasonable when talking about politics/social topics. It's kinda interesting although not very convincing (so far)
[19:34:07] atmosx: Aria: well, I need to try harder apparently heh.
[19:34:11] Casty: has joined #ruby
[19:34:26] RegulationD: has joined #ruby
[19:35:43] nofxxxx: has joined #ruby
[19:35:54] cir0x: has joined #ruby
[19:37:01] sarkyniin: has joined #ruby
[19:41:02] workmad3: has joined #ruby
[19:42:22] droidburgundy: has joined #ruby
[19:42:42] Frem: has joined #ruby
[19:42:46] tuelz: has joined #ruby
[19:44:03] yalue: has joined #ruby
[19:44:30] quimrstorres: has joined #ruby
[19:44:52] k3asd`: has joined #ruby
[19:46:39] sarkyniin: has joined #ruby
[19:48:10] olistik: has joined #ruby
[19:48:38] yayfoxes3: has joined #ruby
[19:48:40] marr: has joined #ruby
[19:48:41] Bertg: has joined #ruby
[19:48:52] DLSteve: has joined #ruby
[19:49:01] hahuang65: has joined #ruby
[19:50:16] Asher-: has joined #ruby
[19:50:26] khebbie: has joined #ruby
[19:50:35] User458764: has joined #ruby
[19:51:18] elia: has joined #ruby
[19:52:13] langlands: has joined #ruby
[19:53:42] baweaver: has joined #ruby
[19:54:49] NeverDie_: has joined #ruby
[19:56:08] adamjleonard: has joined #ruby
[19:57:39] drewvanstone: has joined #ruby
[20:00:06] gccostabr: has joined #ruby
[20:00:23] benolee: has joined #ruby
[20:00:29] skade: has joined #ruby
[20:01:17] markov_twain: has joined #ruby
[20:01:59] pengin: has joined #ruby
[20:02:56] zotherstupidguy: has joined #ruby
[20:03:51] wallerdev2: has joined #ruby
[20:04:41] Or1on: has joined #ruby
[20:07:23] atmosx: cool, the new RPi seems to be way faster then the old one.
[20:07:58] adaedra: or there another new one?
[20:08:03] yfeldblum: has joined #ruby
[20:08:24] yayfoxes3: has joined #ruby
[20:08:59] skade: has joined #ruby
[20:09:06] tvw: has joined #ruby
[20:10:08] Azure: has joined #ruby
[20:10:34] skade: has joined #ruby
[20:11:42] eggoez: has joined #ruby
[20:13:04] dfockler: what's the best way in ruby to standardize various date formats?
[20:13:35] apeiros: dfockler: too vague
[20:13:39] apeiros: string input?
[20:13:41] havenn: dfockler: What do you have and what do you want to end up with?
[20:14:08] dfockler: yeah I have a date strings in various formats, and need them in a single format
[20:14:19] apeiros: strptime IMO
[20:14:19] workmad3: has joined #ruby
[20:14:34] apeiros: but depends on the (undisclosed) details
[20:15:03] Or1on: I'm thinking of working a sort of capslock manager on ruby as a learning project. I'd like to use caps+w to popup a list of opened windows that I can switch to by typing the name. I also want to use caps+hjkl as arrows keys, sort of like a vim mode. Which libraries could help me with this?
[20:16:03] sdwrage: has joined #ruby
[20:16:13] xelkarin: has joined #ruby
[20:16:28] Or1on: I think there is a way to use autohotkey with ruby... maybe I could use gtk or qt for the window list... I'm not sure how I can get a list of opened windows from a linux windows manager or OSX/ windows from ruby
[20:17:38] CustosLimen: has joined #ruby
[20:18:17] blackmes1: has joined #ruby
[20:18:34] centrx: has joined #ruby
[20:18:57] atmosx: adaedra: CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d ... well no idea I think it's widely known as RPi v2
[20:19:08] atmosx: adaedra: 1G RAM, armv7
[20:19:15] adaedra: yeah should be that
[20:19:24] adaedra: I'm pondering about getting one
[20:19:25] slackbotgz: has joined #ruby
[20:19:39] jschoolcraft: has joined #ruby
[20:21:29] atmosx: well it's fast.
[20:22:02] atmosx: the only complain I've found around is the micro-sd ... everyone would like a faster throughput there
[20:22:12] atmosx: but it's ok, generally speaking
[20:23:06] peter_paule: has joined #ruby
[20:27:02] skade: has joined #ruby
[20:30:40] KnownSyntax: has joined #ruby
[20:33:55] Scripore: has joined #ruby
[20:34:51] fabrice31: has joined #ruby
[20:34:59] NeverDie: has joined #ruby
[20:35:43] k25611: has joined #ruby
[20:35:51] k25611: has left #ruby: ()
[20:36:09] bosma: has joined #ruby
[20:37:34] Alayde: has joined #ruby
[20:38:32] NeverDie_: has joined #ruby
[20:38:41] drewvanstone: has joined #ruby
[20:39:33] iWaffles: has joined #ruby
[20:39:37] blandflakes: has joined #ruby
[20:40:09] Hobogrammer: has joined #ruby
[20:43:28] nonparfumee: has joined #ruby
[20:43:41] crazydiamond: has joined #ruby
[20:44:16] chris2: has joined #ruby
[20:44:38] dgutierrez1287: has joined #ruby
[20:45:20] x1337807x: has joined #ruby
[20:45:33] Narzew: has joined #ruby
[20:45:44] skade: has joined #ruby
[20:46:05] drewvanstone: has joined #ruby
[20:46:41] spider-mario: has joined #ruby
[20:46:52] kahunaio: has joined #ruby
[20:48:40] ttilley: has joined #ruby
[20:48:55] momomomomo: has joined #ruby
[20:51:07] otisZart: has joined #ruby
[20:51:25] symm-: has joined #ruby
[20:54:02] patrick_star: has joined #ruby
[20:55:53] SansSerif: has joined #ruby
[20:56:14] blackmes1: has joined #ruby
[20:56:59] SansSerif: has joined #ruby
[20:58:22] micmus: has joined #ruby
[20:58:41] Alayde_: has joined #ruby
[20:59:16] pehlert: has joined #ruby
[20:59:32] dopie: has joined #ruby
[21:00:03] CustosLimen: has joined #ruby
[21:01:30] pehlert: Hey all! Maybe someone can explain this to me.. I have a rake task which spawns a couple of threads to fetch data via net/http. The remote ends are extremely slow, so most of the time should be IO wait. However, I don't have the impression that the threads really execute in parallel (e.g. netstat shows only one connection at a time).. I know there is the GIL, but shouldn't a thread still yield back when ther
[21:01:36] pehlert: e is IO wait?
[21:04:21] FernandoBasso: has joined #ruby
[21:04:22] BTRE: has joined #ruby
[21:04:24] jhass: yes it should, thus
[21:04:25] ruboto: We can't help you without your code, please post it to https://gist.github.com
[21:04:45] B1n4r10: has joined #ruby
[21:04:57] nateberkopec: has joined #ruby
[21:05:23] jacor: has joined #ruby
[21:05:46] idafyaid: has joined #ruby
[21:07:35] sarkyniin: has joined #ruby
[21:07:39] yh: has joined #ruby
[21:07:58] mordocai: has left #ruby: ("ERC Version 5.3 (IRC client for Emacs)")
[21:08:13] pehlert: jhass: http://pastie.org/10255445 - sorry, took a sec to preparte
[21:09:05] pehlert: The code is too complex to post it all, but this should be the gist of it
[21:09:31] zeroNones: has joined #ruby
[21:10:20] jhass: well, nothing obviously wrong about it, maybe there's a hidden lock somewhere?
[21:10:35] prinsen: has joined #ruby
[21:11:24] jmoles: has joined #ruby
[21:11:38] pehlert: jhass: Possibly, but I really have not idea where..
[21:12:06] pehlert: jhass: Are there any othzer ways to lock than Mutex.new.synchronize?
[21:12:24] Palmer11: has joined #ruby
[21:12:27] jhass: no, but it can be hidden in Monitor/MonitorMixin
[21:12:42] prinsen: I have a .so dynamic module that I have generated with Swig. Is there any way to generate documentation for it, or download a IDE with autocompletion features?
[21:12:43] sarkyniin: has joined #ruby
[21:12:46] jmoles: Hello Rubyists!!! I have, in some code of mine, a Symbol instance I recieved by enumerated the methods of a class instance with grep() and picking the one I want. I can easily call this method now with .call[:sym], but I'd like to do this same thing INSIDE a class.
[21:12:50] jmoles: It is proving... harder.
[21:13:15] jmoles: Whoops, I mean .send(:sym).
[21:14:08] Senjai: ?code jmoles
[21:14:08] ruboto: jmoles, We can't help you without your code, please post it to https://gist.github.com
[21:14:15] jmoles: I will, one sec.
[21:14:17] jhass: pehlert: one thing you could try (and be it to find out), to spawn a new thread for each request and delaying that until after you have fetched all data, so Thread.new do http.request(request); end; essentially
[21:15:17] arooni-mobile: has joined #ruby
[21:15:27] lucianosousa: has joined #ruby
[21:16:32] jhass: pehlert: the other approach would be to leave the concurrency out of the ruby part and just push requests to typhoeus hydra
[21:16:34] pehlert: jhass: Hum, that might be an idea. A quick grep through my gem dependencies has not shown any uses of Mutex :(
[21:17:26] dx7: has joined #ruby
[21:17:42] pehlert: jhass: That would be extremely difficult to refactor, though :-/
[21:18:29] jhass: huh? shouldn't be harder than pushing the Thread.new down, probably even easier
[21:19:19] pehlert: true, neither will be very easy
[21:19:41] atom3: has joined #ruby
[21:20:03] Igorshp: has joined #ruby
[21:20:43] jhass: well, that statement does make me wonder how much your example does relate to your real code tbh ;)
[21:21:46] jhass: other hidden locks could be contentions on a queue or a connection pool btw
[21:22:10] pehlert: jhass: There're really just a few wrapper classes and the actual worker does 3 not 1 http request. But for the requests, they are all similar to this, so nothing special is happening which is not visible in the pastie
[21:22:23] scx_: has joined #ruby
[21:22:28] addisonhuddy: has joined #ruby
[21:22:32] arescorpio: has joined #ruby
[21:22:32] jmoles: Senjai: ruboto: damnit, now it's not happening anymore. :)
[21:22:45] jtbnyc69: has joined #ruby
[21:23:01] ruboto: I'm the channel bot, linker of the rules, adept of the facts, wielder of the banhammer.
[21:23:04] pehlert: jhass: I thought about ActiveRecord's connection pool being an issue here, but there are only 5 customers and 10 connections in the pool, so that shouldn't be an issue either
[21:23:30] jtbnyc69: hello everyone, can anyone recommend the preferred debugger for ruby these days? ruby 2.x and not rails, just straight ruby?
[21:23:33] pehlert: What a sentence.. Sorry, getting tired
[21:23:35] ttilley: has joined #ruby
[21:23:43] jhass: ?rails jtbnyc69
[21:23:44] ruboto: jtbnyc69, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[21:23:52] jhass: blerg, wrong one, sorry
[21:23:56] jhass: ?pry jtbnyc69
[21:23:57] ruboto: jtbnyc69, Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting ???binding.pry??? directy in your source code. Visit https://pryrepl.org/ or get it now with gem install pry pry-doc
[21:24:09] jhass: bad muscle memory :/
[21:24:26] jtbnyc69: ruboto: anything supported under emacs?
[21:24:36] bronson: has joined #ruby
[21:24:48] jhass: jtbnyc69: anyway pry ^ + pry-byebug, pry-stack_explorer + pry-rescue and possibly pry-remote
[21:25:10] nemesit|znc: has joined #ruby
[21:25:15] jhass: maybe there's a byebug plugin for emacs, who knows
[21:25:27] eggoez: has joined #ruby
[21:25:32] jhass: but I'd just go with a second shell, pry is nothing you want to miss out
[21:26:02] sarkyniin: has joined #ruby
[21:26:16] jhass: pehlert: me too apparently ;)
[21:26:36] jtbnyc69: thank you so jhass and ruboto
[21:27:09] shevy: ruboto is just a spam-bot jtbnyc69
[21:27:25] scx: has joined #ruby
[21:27:45] jhass: I see, once it tracks karma it also needs to track its own
[21:27:47] jtbnyc69: oh, ruboto is quite good. 8)
[21:27:57] shevy: jtbnyc69 it can actually be useful
[21:28:03] shevy: you can use it to eval ruby code live here
[21:28:19] shevy: >> puts 'jhass is helpful ' * 2
[21:28:21] ruboto: shevy # => jhass is helpful jhass is helpful ...check link for more (https://eval.in/386460)
[21:28:41] Narzew: has joined #ruby
[21:29:08] shevy: though the formatting is a bit confusing... I liked the old eval-in output more, to denote the "string" part, and then just provide a link; perhaps putting the "check link" into the () part
[21:29:23] choke: has joined #ruby
[21:29:56] NeverDie: has joined #ruby
[21:30:09] choke: has joined #ruby
[21:30:12] Senjai: >> (1..500).inject(:*)
[21:30:13] ruboto: Senjai # => 1220136825991110068701238785423046926253574342803192842192413588385845373153881997605496447502203281 ...check link for more (https://eval.in/386461)
[21:31:37] chinmay_dd: has joined #ruby
[21:33:56] ttilley: has joined #ruby
[21:34:05] ttilley: has joined #ruby
[21:34:33] droidburgundy: has joined #ruby
[21:34:37] atmosx: >> (1..500).inject(:+)
[21:34:38] ruboto: atmosx # => 125250 (https://eval.in/386462)
[21:34:59] atmosx: night all
[21:35:26] momomomomo: has joined #ruby
[21:35:51] doublemalt__: has joined #ruby
[21:36:32] Jarboe: has joined #ruby
[21:38:30] iamninja: has joined #ruby
[21:40:11] langlands: has joined #ruby
[21:42:10] x1337807x: has joined #ruby
[21:43:07] DoubleMalt: has joined #ruby
[21:43:56] minibar: has left #ruby: ("minibar is closed")
[21:44:24] mices: has joined #ruby
[21:44:48] mices: what does @ mean in ruby
[21:45:13] drewvanstone: has joined #ruby
[21:46:31] Ox0dea: has joined #ruby
[21:46:33] NeverDie_: has joined #ruby
[21:46:34] danman: has joined #ruby
[21:46:43] mices: it means an "object" ?
[21:47:04] mices: as in referencing a row in a table
[21:47:11] Ox0dea: mices: @foo is an instance variable, and @@bar is a class variable.
[21:47:33] mices: what's the rails channel?
[21:47:38] Ox0dea: Have a guess.
[21:47:44] B1n4r10: has joined #ruby
[21:47:55] mices: redirects to ##namespace##
[21:48:05] ruboto: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[21:48:58] Ox0dea: Pop quiz! Where else is '@' syntactically meaningful in Ruby?
[21:49:19] olistik: has joined #ruby
[21:51:52] momomomomo: has joined #ruby
[21:51:57] qhartman: has joined #ruby
[21:55:38] finisherr: has joined #ruby
[21:56:05] ItSANgo_: has joined #ruby
[21:57:31] dcarmich: has joined #ruby
[21:57:38] soulcake: has joined #ruby
[21:57:56] choke: has joined #ruby
[21:58:17] vasilakisfil_: has joined #ruby
[21:58:53] finisherr: Does anyone have any examples of how to use aruba w/ rspec tests?
[21:59:19] avahey: has joined #ruby
[21:59:59] Pupeno_: has joined #ruby
[22:00:35] NeverDie: has joined #ruby
[22:01:12] finisherr: I???m looking here: https://github.com/cucumber/aruba
[22:01:27] decoponyo: has joined #ruby
[22:01:42] vasilakisfil__: has joined #ruby
[22:01:44] finisherr: everything up to step 4 seems fine but there are no examples of some of any added features like expectation methods and such
[22:02:20] lele: has joined #ruby
[22:03:34] BrianBoyko: has joined #ruby
[22:03:48] BrianBoyko: The answer came to me in a dream!
[22:03:58] arooni-mobile: has joined #ruby
[22:04:06] pontiki: has joined #ruby
[22:04:12] AlexRussia: has joined #ruby
[22:04:13] prinsen: How would you generate documentation for a .so extension?
[22:04:40] baweaver: has joined #ruby
[22:05:39] nfk: has joined #ruby
[22:06:38] netmask: has joined #ruby
[22:07:07] apeiros: prinsen: either have the source (rdoc can handle C, maybe also C++, not sure)
[22:07:36] apeiros: prinsen: or fake it (write a .rb with just the class- & method-names + docs, no actual implementation)
[22:07:51] momomomomo: has joined #ruby
[22:07:54] chris2: has joined #ruby
[22:08:33] Azure: has joined #ruby
[22:09:29] soxet: has joined #ruby
[22:09:30] jfarmer: has joined #ruby
[22:09:38] momomomomo_: has joined #ruby
[22:10:01] umgrosscol: has joined #ruby
[22:10:39] prinsen: apeiros: its generated by swig, so i have the .cpp source
[22:10:53] NeverDie: has joined #ruby
[22:11:31] Senjai: finisherr: I wouldn't use aruba
[22:11:35] Senjai: it's too invasive
[22:11:50] Senjai: I woiuld seperate the logic from the CLI and other classes and test those classes individually
[22:11:54] prinsen: apeiros: but the .cpp source is 3.7 Mb and takes forever, ill let it run over night and then try c
[22:11:59] Senjai: I would test the CLI interface with a shell script probably
[22:12:00] finisherr: I want to learn how to do integration tests on CLI apps
[22:12:19] finisherr: instead of just testing invididual method functionality
[22:12:22] Senjai: finisherr: Just use a shell script, or execute the binary in ruby
[22:12:28] Senjai: finisherr: Not instead of, with
[22:12:33] Senjai: finisherr: You should have both
[22:12:33] finisherr: i want to say, when i run this, exec tthis
[22:12:38] finisherr: oh yeah for sure
[22:13:09] finisherr: yeah, i mean, i guess i could just use rspec for that
[22:13:39] Senjai: But dont bring aruba in
[22:14:04] Senjai: You can do ... interesting things with assigning stdin and stdout to other variables for the context
[22:14:17] Senjai: But it adds a decent amount of complexity that I don't think is worth it
[22:15:20] spider-mario: has joined #ruby
[22:15:32] Rapier-: has left #ruby: ("(null)")
[22:15:45] finisherr: I???m going to give this a shot
[22:16:21] thalassa: has joined #ruby
[22:16:49] cytoskeletor: has joined #ruby
[22:18:19] malconis_: has joined #ruby
[22:19:00] danman: has joined #ruby
[22:19:24] dudedudeman: shevy: where my boo at
[22:20:34] Papierkorb_: has joined #ruby
[22:20:57] husanu: has joined #ruby
[22:21:33] Senjai: finisherr: With aruba?
[22:21:37] Chrislivecodingt: has joined #ruby
[22:21:50] finisherr: with rspec natively
[22:22:01] Senjai: just by running the command from rspec?
[22:22:09] Senjai: dont use rake, just use bin/whatever
[22:22:17] finisherr: I was going to use Mixlib::ShellOut
[22:22:25] finisherr: to run the commands
[22:22:32] Senjai: `./bin/myfile`
[22:22:32] mandarinkin: has joined #ruby
[22:22:35] Senjai: fixed forever
[22:22:38] dopie: has joined #ruby
[22:22:41] Senjai: `./bin/myfile myargs`
[22:23:10] finisherr: yeah, i guess that simplifies things
[22:23:33] Senjai: It does, but mixlib doesnt seem too terrible.
[22:23:37] fabrice31: has joined #ruby
[22:23:38] Senjai: I just think it might be more than required
[22:24:06] Senjai: Eh, depends
[22:24:14] Senjai: I wouldn't -1 mixlib
[22:25:23] Chrislivecodingt: Hey guys, am Chris from Livecoding.tv if you have questions on watching shows on Livecoding.tv let me know. There is an aesome show tonight on Livecoding.tv:
[22:25:23] Chrislivecodingt: TODAY: Founder of Wolfram Alpha on Livecoding.tv, 10pm NY time: "Wolfram Language". Follow him: https://www.livecoding.tv/stephen_wolfram/
[22:25:47] t0rrieri: has joined #ruby
[22:26:13] finisherr: i kinda like mixlib
[22:26:13] rbennacer: has joined #ruby
[22:26:26] finisherr: sorta used to usin it
[22:26:43] Senjai: Chrislivecodingt: Don't advertise man, not cool. Against freenode TOS
[22:27:24] shevy: dudedudeman I am very sleepy right now
[22:27:30] marciotex: has joined #ruby
[22:27:35] Senjai: Chrislivecodingt: http://freenode.net/policy.shtml#advertising
[22:27:37] bronson: has joined #ruby
[22:27:40] dudedudeman: shevy: sleeeeeep. i'm leaving work. haven't holldered in a few days. hollaaaaaaa
[22:27:40] Yiota: has joined #ruby
[22:27:45] shevy: I also have not written anything big in ruby the last some days :(
[22:28:57] mattbillock: has joined #ruby
[22:28:58] Respek: has joined #ruby
[22:29:20] ghostpl: has joined #ruby
[22:29:46] netmask: has joined #ruby
[22:29:46] dudedudeman: shevy: you're fired!
[22:29:53] dudedudeman: off with your head
[22:30:28] coderhs: has joined #ruby
[22:31:25] djbkd: has joined #ruby
[22:32:28] slackbotgz: has joined #ruby
[22:34:08] chris2: has joined #ruby
[22:34:48] netmask: has joined #ruby
[22:36:44] Senjai: https://twitter.com/iamdevloper/status/612042483086704640
[22:37:27] eam: shevy: if you're bored (or if anyone else is) you could give me feedback on how this module should look before I release it https://github.com/eam/ruby-mdbm
[22:38:56] bb010g: has joined #ruby
[22:39:37] uninitialized: has joined #ruby
[22:39:38] Scripore: has joined #ruby
[22:40:19] baweaver: has joined #ruby
[22:41:13] msnyon: has joined #ruby
[22:42:32] apeiros: eam: misses a license! :-O
[22:42:54] apeiros: ACTION suggests BSD (because I like it and because mdbm is also under BSD)
[22:43:12] A205B064: has joined #ruby
[22:43:19] eggoez: has joined #ruby
[22:43:47] bosma_: has joined #ruby
[22:44:07] eam: good catch
[22:44:14] t0rrieri: has joined #ruby
[22:44:31] apeiros: I think an up-to-date rubygems warns you when you run `gem build`
[22:45:15] eam: in terms of structure / idioms, did I do anything dumb?
[22:45:37] apeiros: still looking. I'm a bit slow right now (still single handed)
[22:46:11] djbkd_: has joined #ruby
[22:46:56] Senjai: eam: https://github.com/eam/ruby-mdbm/blob/master/ext/mdbm/extconf.rb#L13
[22:46:59] Senjai: Whe if then ?
[22:47:08] apeiros: eam: oh, does RSTRING_PTR do arg error on its own?
[22:47:46] eam: Senjai: no clue, cargo culted
[22:48:00] eam: I am eager to learn the ways of mkmf.rb
[22:48:03] bronson: has joined #ruby
[22:48:11] apeiros: extconf is that thing which is just endlessly being copied over
[22:48:29] eam: apeiros: I think so? Let me check
[22:48:45] eam: actually, I think it may not - I had to StringValue() elsewhere
[22:48:52] Senjai: eam: I am also -1 on t for a test directory, but that isn't reall important.
[22:48:53] apeiros: eam: it's quite possible. I last wrote a c ext before that one existed :-S
[22:49:05] Senjai: C wise I dont see any glaring issues, but I dont extension often, or at all in ruby
[22:49:25] eam: how about in terms of the ruby interface
[22:49:45] eam: are these the right methods for a k/v store?
[22:49:54] apeiros: eam: btw., why don't you wrap the struct in self?
[22:50:05] Senjai: eam: I would check out the redis gem
[22:50:11] eam: apeiros: howso?
[22:50:18] apeiros: would also probably get rid of that performance issue I seem to remember
[22:50:27] eam: ooh, you mean I don't need to put it into its own ivar?
[22:50:31] apeiros: eam: iirc README.EXT or pickaxe has an example
[22:50:40] eam: oh that would be fantastic
[22:50:41] Yiota: has joined #ruby
[22:50:41] skade: has joined #ruby
[22:50:46] eam: and yeah, that'd 2x the speed :)
[22:50:52] mary5030: has joined #ruby
[22:51:30] eam: license'd
[22:51:55] apeiros: eam: I think it's more common to call the test dir "test" instead of "t" :D
[22:52:08] Senjai: I mentioned that
[22:52:10] Senjai: t is just weird
[22:52:11] eam: will do
[22:52:13] phutchins: has joined #ruby
[22:52:14] Senjai: but again, not really a biggie
[22:52:26] apeiros: test/unit is deprecated :(
[22:52:31] apeiros: minitest is the way to go afaik
[22:52:44] eam: similar structure?
[22:52:45] Senjai: Minitest is backwards compatable to iirc
[22:52:47] apeiros: your tests will probably work 1:1
[22:52:56] Senjai: eam: It supports TestUnit by default iirc
[22:52:57] eam: as long as it's not rspec ;)
[22:53:05] apeiros: same feeling :o)
[22:53:19] eam: I just want the same structure across languages
[22:53:30] apeiros: some synopsis in the readme would be nice
[22:53:30] Senjai: rspec is a language
[22:53:37] apeiros: (tiny example like open, store, retrieve, close)
[22:54:18] apeiros: eam: how portable is this? and does this support concurrent access from different processes?
[22:54:51] havenwood: eam: In your ruby-mdbm.gemspec might add an: s.license = "Apache-2.0"
[22:54:59] eam: havenwood: willdo
[22:55:27] eam: apeiros: libmdbm works great on freebsd/linux and I ported it to osx recently and it seems to do ok in ad-hoc use there
[22:55:34] eam: I've only installed this gem on osx/linux
[22:55:39] eam: but it oughta work elsewhere
[22:56:05] Senjai: What are you using mdbm for ?
[22:56:17] atom3: has joined #ruby
[22:56:22] Senjai: eam: I'd only run it on your os, if people want to run it on theirs, they can file an issue or submit a PR :P
[22:56:31] Senjai: my philosophy on supporting multiple systems 101
[22:56:35] spidermario: has joined #ruby
[22:56:48] eam: if travis had freebsd I'd happily test on it :)
[22:56:49] Senjai: But everything should stay as decoupled as possible still, no need to make it harder
[22:56:58] Senjai: You're a freebsd'er?
[22:57:01] Senjai: I've heard of you people
[22:57:03] hsps_: has joined #ruby
[22:57:05] Senjai: I have one sitting beside me
[22:57:13] Senjai: Yall like unicorns
[22:57:16] |work: Did your mommy tell you about them?
[22:57:40] Senjai: It's actually a really good system from what I hear
[22:57:48] Senjai: But I'd still stick with linux i think
[22:57:56] eam: Senjai: I'm using it to cache some k/v lookups that were in sqlite, but sqlite is three orders of magnitude slower (even after tuning)
[22:58:01] shadoi: has joined #ruby
[22:58:05] Senjai: eam: uhm.. sec
[22:58:19] Senjai: eam: https://github.com/jhawthorn/fast_sqlite ?
[22:58:20] eam: no I'm a linux'er but I've worked at big freebsd shops before
[22:58:25] _djbkd: has joined #ruby
[22:58:33] eam: yeah, went through all that
[22:58:57] eam: way slower :)
[22:58:58] Senjai: I guess redis isn't guarenteed to be in memory
[22:59:02] Senjai: and over a connectioin
[22:59:06] eam: well, and there's a data copy
[22:59:17] eam: mdbm is super fast, you can't really take advantage of it in ruby but it can be zerocopy
[22:59:27] Senjai: I dont know what that means
[22:59:31] Senjai: Just references the data?
[22:59:40] eam: just a hash, find pointer, here you go
[22:59:43] Senjai: which is why you're not using ruby hashes right?
[22:59:53] Senjai: arent rubies hash values stored as references?
[23:00:18] eam: well, my runtime is in C -- I'm using this gem to basically build caches offline where speed doesn't matter
[23:00:22] havenwood: eam: hmm: mdbm.c:2:10: fatal error: 'mdbm.h' file not found
[23:00:40] eam: havenwood: if you're on osx: https://github.com/eam/homebrew-mdbm
[23:00:47] havenwood: eam: FreeBSD
[23:01:05] eam: aha uh, you'll have to build https://github.com/yahoo/mdbm
[23:01:14] eam: I don't know if they have a port for it
[23:01:17] havenwood: eam: I have the mdbm pkg installed.
[23:01:27] eam: aha. Hrm, do you know where it put mdbm.h?
[23:01:37] havenwood: sec, checking
[23:02:21] eam: hm I don't see mdbm in ports search
[23:02:31] Senjai: May need to modify flags for osx
[23:02:47] Senjai: eam: What do you do on the day to day?
[23:02:52] Senjai: if you dont mind my asking
[23:03:09] eam: I'm on a tiger team, I mostly get called in to figure out why stuff's broken
[23:03:10] havenwood: eam: oh, i... don't have it installed - dunno what I was thinking!
[23:03:18] havenwood: eam: nvm me :O
[23:03:19] eam: havenwood: I can lean on someone to get it into ports
[23:03:36] eam: yahoo still has a few core folks I believe
[23:03:38] Senjai: Tiger team?
[23:03:54] eam: https://en.wikipedia.org/wiki/Tiger_team
[23:04:37] Senjai: Now I'm even more curious :P
[23:04:37] WeiJunLi: has joined #ruby
[23:05:14] eam: Senjai: pretty boring, glorified sysadmin and neckbeard
[23:05:16] eggoez: has joined #ruby
[23:05:22] choke: has joined #ruby
[23:05:34] apeiros: eam: oh, and after all the rest: looks nice :)
[23:06:37] eam: thx :) I'll ship it out then
[23:06:44] pengin: has joined #ruby
[23:07:16] ecksit: has joined #ruby
[23:08:04] spider-mario: has joined #ruby
[23:08:15] dfockler: Goose Team: We make problems for the tiger team to solve
[23:08:33] apeiros: hunter team: fires goose and tiger team :o)
[23:08:58] apeiros: (aka silly short sighted managers)
[23:09:13] Senjai: eam: Can't always be a backlog though. Gotta have some free time I'd imagine
[23:09:35] eam: Senjai: ah yeah, I do assorted projects. Whatever falls between the org cracks
[23:09:45] dseitz: has joined #ruby
[23:09:46] workmad3: has joined #ruby
[23:09:50] lalalaaa: has joined #ruby
[23:09:50] Ox0dea: >> 255.inspect(16)
[23:09:51] ruboto: Ox0dea # => "ff" (https://eval.in/386490)
[23:09:57] eam: right now I'm working on a centos6 -> 7 update path
[23:10:06] apeiros: Ox0dea: probably aliased to to_s
[23:10:11] ecksit: has joined #ruby
[23:10:29] CloCkWeRX: has joined #ruby
[23:10:45] Ox0dea: I submit that perhaps it oughtn't be.
[23:10:54] momomomomo_: has joined #ruby
[23:10:56] YamakasY: is ruby sexy ?
[23:11:34] lalalaaa: Hi! Trying to update my Forem topics count: `@forum.published_topics_count => 0`
[23:11:34] lalalaaa: But when I do `@forum.published_topics_count.increment!` I get: `NoMethodError: undefined method `increment!' for 0:Fixnum`
[23:11:52] apeiros: ?rails lalalaaa
[23:11:53] ruboto: lalalaaa, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[23:12:02] apeiros: YamakasY: yupp
[23:12:06] danman: has joined #ruby
[23:12:17] Senjai: Ox0dea: I dont think it matters imo.
[23:12:33] YamakasY: apeiros: so I can be sexy in here ? :D
[23:12:33] havenwood: eam: Gem installs for me on OS X with your tap.
[23:12:40] apeiros: YamakasY: nope
[23:12:53] Senjai: YamakasY: Definitely not
[23:13:07] YamakasY: now I must go bashing myself
[23:13:29] bentanweihao: has joined #ruby
[23:13:38] Ox0dea: Senjai: It's pretty much the only case wherein #inspect accepts an argument.
[23:13:47] zenspider: lalalaaa: why would you persist a count when the db can just count them for you?
[23:14:07] spider-mario: has joined #ruby
[23:14:09] eam: havenwood: great :)
[23:14:15] ecksit: has joined #ruby
[23:14:16] Senjai: Ox0dea: But when do you use inspect for business logic? And without an argument it still behaves the same.
[23:14:35] Senjai: Ox0dea: I won't say you're wrong, just that I think its trivial enough to not care :P
[23:14:37] apeiros: zenspider: common case is performance. count can be slow.
[23:14:41] eam: havenwood: made https://github.com/yahoo/mdbm/issues/48 until I get my hands on a freebsd machine again
[23:14:48] lalalaaa: zenspider: dunno.. i've added a bunch of topics manually via my seeds.rb but their count all show up 0
[23:15:12] Hobogrammer: has joined #ruby
[23:15:36] Senjai: zenspider: It's called counter caching
[23:15:42] Senjai: ?rails lalalaaa
[23:15:42] ruboto: lalalaaa, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[23:15:53] jhass: zenspider: it's a really common case for count to be slow, rails added counter caches as a library feature not without reason
[23:15:56] apeiros: Senjai: yer late mate :-p
[23:16:11] Senjai: apeiros: Y u gotta do this to me man
[23:16:41] rickmasta: has joined #ruby
[23:16:59] lalalaaa: Senjai: i know i was just trying to answer zenspider
[23:17:36] ecksit: has joined #ruby
[23:17:53] Ox0dea: >> x = 1; [x.inspect(2), x += 0.1, (x.inspect(2) rescue 'LSP sadface')]
[23:17:54] ruboto: Ox0dea # => ["1", 1.1, "LSP sadface"] (https://eval.in/386491)
[23:17:55] Ox0dea: Senjai: ^
[23:18:45] Senjai: Ox0dea: I wouldn't -1 a pull request because its obviously invalid behavior.
[23:19:05] Senjai: I just meant that inspect is a method I would never call. Only in pry really
[23:19:44] Senjai: I dont even want to know how you found this
[23:19:56] Senjai: As a segway, I dont like how rails impliments counter caches
[23:20:13] Senjai: The fact each row has the value is totally bleh. Denormalize that stuff man
[23:20:14] Senjai: Or use redis
[23:20:33] spider-mario: has joined #ruby
[23:21:01] freerobby: has joined #ruby
[23:21:46] t0rrieri: has joined #ruby
[23:22:18] droidburgundy: has joined #ruby
[23:22:22] Ox0dea: >> ['1'.hex, '1'.oct, ('1'.bin rescue 'wat')]
[23:22:23] ruboto: Ox0dea # => [1, 1, "wat"] (https://eval.in/386492)
[23:22:55] Ox0dea: String#bin really ought to exist, and I feel like Numeric should have matching methods which perform the reverse operations.
[23:23:16] lalalaaa: zenspider: Got it, just had to do `@forum.increment(:published_topics_count)` instead of `@forum.published_topics_count.increment!`
[23:23:19] Senjai: I would agree
[23:23:35] Ox0dea: Then we could try to find xs where x.hex.oct.bin.oct.hex.oct.hex.bin isn't 0.
[23:24:06] Senjai: lalalaaa: You should checkout redis for countercaching or https://github.com/wanelo/counter-cache
[23:24:28] momomomomo: or just add one in postgres
[23:24:31] Senjai: Ox0dea: I would +1 your bug
[23:24:54] Senjai: momomomomo: I prefer counter caches to be in memory if possible. But thats just me
[23:25:31] Senjai: But should definitely not be on every row
[23:25:36] momomomomo: I'd wonder what the difference is between a countercache in postgres and one in redis is
[23:25:44] momomomomo: performance wise
[23:26:02] lalalaaa: thanks Senjai looks pretty cool
[23:26:05] Senjai: momomomomo: Isn't postgres's stored in the database too?
[23:26:34] zenspider: lalalaaa: or: @forum.count(:published) then you don't have to persist something that is inherently redundant
[23:26:40] momomomomo: Senjai: if the counter is used often, it will remain in memory
[23:26:53] ttilley: has joined #ruby
[23:26:58] Senjai: zenspider: There are usecases for counter caching. count is a slow query.
[23:27:05] Senjai: momomomomo: But its still "persisted" though right?
[23:27:09] Senjai: Like on the row?
[23:27:15] Asher: has joined #ruby
[23:27:17] momomomomo: on a separate table's row typically
[23:27:24] Senjai: like a postgres table?
[23:27:25] momomomomo: why would you add a count for each row?
[23:27:27] Senjai: In that case, thats fine
[23:27:30] Senjai: momomomomo: Rails does
[23:27:30] zenspider: Senjai: meh. without objective measurement I call bullshit.
[23:27:38] Senjai: momomomomo: That's denormalizing, and I'm pro that
[23:27:45] tuelz: has joined #ruby
[23:27:46] momomomomo: that's not denormalizing
[23:27:55] momomomomo: published topic count table
[23:28:01] momomomomo: which maps to published topics, and holds a count
[23:28:12] apeiros: zenspider: https://wiki.postgresql.org/wiki/Slow_Counting
[23:28:14] Senjai: Correct, and published_topics doesnt have a count on every row
[23:28:23] momomomomo: why would it?
[23:28:42] marciotex: has joined #ruby
[23:28:45] Senjai: Because rails does that.
[23:28:50] Senjai: That's how rails counter caches
[23:28:53] apeiros: but I agree to an extent. I've rarely used counter caching.
[23:28:54] Senjai: by default
[23:28:57] tvw: has joined #ruby
[23:29:13] momomomomo: Senjai: no, that would be if it was "User has many published topics; and I want to count each user's published topics"
[23:29:14] apeiros: momomomomo: it counts the number of associated records
[23:29:17] momomomomo: then yes, it would be on the association
[23:29:40] momomomomo: or, if you want, a join table
[23:29:47] momomomomo: i.e. user_published_topic_counts
[23:29:49] Senjai: You rarely need to counter cache. Only for like stats and dynamic pages/rankings etc.
[23:30:17] ghostpl: has joined #ruby
[23:30:27] apeiros: Senjai: or when you have index views where every record has a counter
[23:30:27] Senjai: Counter caching is rarely ever done in scope
[23:30:33] momomomomo: and postgres is pretty good about keeping what needs to be in memory, in memory
[23:30:34] zenspider: apeiros: sure. and without objective profiling that's meaningless
[23:30:38] apeiros: 5ms counts add up if you have 100 records
[23:30:39] momomomomo: then use a join table?
[23:30:46] Senjai: zenspider: You want it, go do it :P
[23:30:53] momomomomo: apeiros: postgres will keep it in memory if it's hot in the LRU
[23:30:55] zenspider: only optimize if something proves it needs it
[23:31:05] Senjai: zenspider: Correct, and MANY sites need it
[23:31:16] apeiros: Senjai: so first user is the sucker who has 3s page load time? :)
[23:31:16] eam: heck, the system's kernel will keep it in memory
[23:31:29] Senjai: apeiros: No, you can populate counter caches on startup, and maintain them from thre
[23:31:31] zenspider: Senjai: many less than actually have it
[23:31:35] apeiros: Senjai: also if different users see different records, it'll probably never be hot
[23:31:35] Senjai: If you use a redis based approach
[23:31:46] Senjai: apeiros: I think that was meant for not me
[23:31:53] momomomomo: apeiros: I'm the one arguing for postgres
[23:32:09] apeiros: Senjai: oh dear, true. that was for momomomomo
[23:32:10] momomomomo: also, in what world do you have 3s load times from a counter cache?
[23:32:16] apeiros: momomomomo: anyway, at work, we're stuck with oracle :(
[23:32:20] eam: we're talking about maintaining a cache of count(*) right?
[23:32:24] momomomomo: you should spend more time reading how to tweak the database if that's the case
[23:32:25] zenspider: ACTION hugs apeiros 
[23:32:41] apeiros: momomomomo: not from a counter cache. from not using a counter cache and instead having a count subquery for every record
[23:32:49] momomomomo: no, that's just stupid
[23:32:58] arooni-mobile: has joined #ruby
[23:33:08] apeiros: counter cache is what removes that
[23:33:16] momomomomo: yes, which is what I'm arguing for...
[23:33:25] momomomomo: but I'm in the 'keep it in postgres' camp
[23:33:34] apeiros: hard without pg
[23:33:46] momomomomo: stop using oracle then, you commie
[23:33:57] apeiros: don't tell me!
[23:34:05] eam: I'd put it in mdbm
[23:34:06] apeiros: I'm pushing to change to pg for years
[23:34:11] vikaton: has joined #ruby
[23:34:18] zenspider: good luck with that
[23:34:24] momomomomo: apeiros: one of my buddies company's is making the switch; I'm sure they already have
[23:34:26] momomomomo: there's hope
[23:34:30] zenspider: I don't think I've ever seen a shop move off of oracle...
[23:34:34] apeiros: but they prefer wasting tons of money on oracle for no good reason
[23:34:41] zenspider: I've seen a few move off of mysql to good effect... but never oracle
[23:34:43] momomomomo: apeiros: well oracle does give you clustering etc
[23:34:45] apeiros: momomomomo: the way I'd do it we wouldn't switch
[23:34:48] Nilium: If people want to waste money, they should give it to me.
[23:34:52] apeiros: we'd just put all the new stuff on pg
[23:34:53] zenspider: "sure would be a shame if something happened to your data..."
[23:34:59] eam: pg's replication strategy has been really bad until recently
[23:35:01] apeiros: and reduce the legacy apps to tiny ora boxes
[23:35:08] zenspider: the database mafia strikes again
[23:35:08] serivichi: has joined #ruby
[23:35:12] aphprentice: has joined #ruby
[23:35:13] apeiros: as those legacy apps are only used by ~10 people
[23:35:21] momomomomo: I'd love to sit and bash oracle, but my comp is dying :(
[23:35:24] apeiros: and ora is priced by the box size
[23:35:33] eam: zenspider: I oversaw (part of) a move off one of the world's largest oracle installations
[23:35:43] apeiros: cya momomomomo
[23:35:53] eam: it was successful -- but we wrote our own database
[23:36:09] zenspider: "successful" --- but now we have 2 problems :P
[23:36:15] ttilley: has joined #ruby
[23:36:20] zenspider: eam: where was this, if you can say?
[23:36:21] apeiros: we don't use any of oracles features anyway. except for psql.
[23:36:34] apeiros: hell, our load could probably be handled by sqlite
[23:36:46] Senjai: apeiros: Orcale, Feature, lol
[23:36:49] apeiros: except maybe for the part where we actually have concurrency
[23:37:02] eam: zenspider: it was at a large advertising company who couldn't scale out oracle any more at any price
[23:37:33] eam: replaced it with what now would be called a nosql db (before most of those existed)
[23:37:37] Senjai: Very very rarely do closed source solutions beat open source ones for infrastructure
[23:37:48] Senjai: except microsoft for their... uh.. whatever its called. Intranet stuff
[23:38:07] apeiros: eam: that sounds like fun and adventure :D
[23:38:18] Senjai: Nosql scares me
[23:38:23] Senjai: ACID compliance ftw
[23:38:24] eam: worldwide replication
[23:38:46] eam: you can do a lot when you look at exactly what guarantees you need, and implement only those. System was rock solid
[23:38:52] eam: basically a huge exercise in caching
[23:39:01] eam: (as are most hard problems of scale)
[23:39:09] akkad: has joined #ruby
[23:39:15] Senjai: Computer science only has two problems man
[23:39:21] Senjai: Caching and naming things
[23:39:28] apeiros: and off by one errors
[23:39:36] Senjai: Eh, kinda
[23:39:57] Senjai: I find those go away with good tests, for the most part
[23:40:01] apeiros: you ruined the joke!
[23:40:11] nickfausnight: has joined #ruby
[23:40:20] jmoles: has left #ruby: ()
[23:40:20] zenspider: and proving P=NP... and and and
[23:40:49] apeiros: zenspider: nah, that's not a problem. because that's not needed to animate a text on a website like marquee did.
[23:41:10] zenspider: or kittens... they display fine w/o
[23:41:34] apeiros: btw., did you hug me? :D
[23:41:55] apeiros: gotta screenshot that, print it, frame it and hang it up :-p
[23:44:03] baweaver: sounds like a job for the web king
[23:44:15] baweaver: http://www.webkinglasvegas.com/
[23:44:48] dfockler: one time I saw zenspider in seattle, and I was like 'hey that's zenspider', and I kept walking down the street
[23:44:54] NeverDie_: has joined #ruby
[23:45:26] baweaver: I'll actually be in Seattle from the 24th to the 30th of July
[23:45:37] apeiros: darn, almost 0200. when did that happen? nap time. n8 folks!
[23:46:01] baweaver: ACTION goes back to kicking spark clusters
[23:46:13] Hobogrammer: has joined #ruby
[23:48:27] tvw: has joined #ruby
[23:48:54] baweaver: Who all is in Seattle anyways? I know tenderlove and zenspider at least are out that way.
[23:49:12] zenspider: baweaver: come to seattle.rb on the 28th!
[23:49:22] baweaver: I'll have to do that.
[23:49:56] zenspider: baweaver: lots and lots?
[23:50:05] baweaver: Vacationing off with the family for a week up there, Dad grew up in Centralia.
[23:50:11] zenspider: drbrain, topfunky, tenderlove, phiggins, thagomizer, ... I just had a workout and my brain isn't working too well.
[23:50:21] drewvanstone: has joined #ruby
[23:50:38] zenspider: technomancy, tho he doesn't do ruby anymore. moved on to clojure. also recently moved to africa
[23:50:56] zenspider: fishnchips. sentientmonkey... mmmmm... others
[23:51:24] baweaver: I might be moving to Scala / Spark while keeping Ruby on the side.
[23:51:38] dfockler: zenspider: haha I read that as you all had a workout together
[23:53:15] dfockler: I'd like to do something with functional languages, just gotta do it I suppose
[23:53:23] Agoldfish: has joined #ruby
[23:54:09] baweaver: http://baweaver.com/blog/categories/spark/ - Just keep an eye on that for more tutorials later.
[23:54:42] bronson: has joined #ruby
[23:55:25] quazimodo: has joined #ruby
[23:55:45] dfockler: baweaver: what is spark?
[23:56:09] baweaver: https://spark.apache.org/
[23:56:35] baweaver: Murders hadoop in terms of speed and DSL
[23:56:59] dfockler: both owned by apache haha
[23:57:45] dfockler: ahh it runs on hadoop, but has a much nicer language
[23:58:09] dfockler: and apparently is a lot faster