« Back to channel list

#ruby - 14 March 2016

« Back 1 day Forward 1 day »
[00:01:41] Cyrus: has joined #ruby
[00:02:57] jenrzzz: has joined #ruby
[00:07:40] kfpratt: has joined #ruby
[00:08:23] LoneHermit: has joined #ruby
[00:10:03] stannard: has joined #ruby
[00:11:18] elifoster: has joined #ruby
[00:11:22] tomchapin: has joined #ruby
[00:11:22] hinbody: has joined #ruby
[00:12:54] adgtl: has joined #ruby
[00:12:54] adgtl: has joined #ruby
[00:13:49] junior2: has left #ruby: ()
[00:14:58] vdamewood: has joined #ruby
[00:17:14] tomchapin: has joined #ruby
[00:19:20] nettoweb: has joined #ruby
[00:19:22] fullofcaffeine: has joined #ruby
[00:20:36] CloCkWeRX: has joined #ruby
[00:23:55] tomchapin: has joined #ruby
[00:29:04] paradisaeidae_: has joined #ruby
[00:31:29] skade: has joined #ruby
[00:32:04] i8igmac: has joined #ruby
[00:36:58] achamian: has joined #ruby
[00:37:21] tvon: has joined #ruby
[00:38:20] tvon: has joined #ruby
[00:40:22] paradisaeidae_: has joined #ruby
[00:40:39] chipotle: has joined #ruby
[00:41:55] crowell: has joined #ruby
[00:42:45] RegulationD: has joined #ruby
[00:46:55] nettoweb: has joined #ruby
[00:50:24] N00B_S: has joined #ruby
[00:51:03] fragtastic: has joined #ruby
[00:54:43] war_pigs: has joined #ruby
[00:55:48] dikaio: has joined #ruby
[00:56:57] fragtastic: i'm having a spot of trouble with the pocketsphinx-ruby gem
[00:57:50] fragtastic: /var/lib/gems/2.1.0/gems/pocketsphinx-ruby-0.3.0/lib/pocketsphinx/api/call_helpers.rb:10:in `block in api_call': Decoder#unset_search failed with error code -1 (Pocketsphinx::API::Error)
[01:00:40] fragtastic: full error https://gist.github.com/fragtastic/63f3d8392eda41760fa8
[01:02:16] ascarter: has joined #ruby
[01:06:31] pawnbox: has joined #ruby
[01:07:17] ascarter_: has joined #ruby
[01:08:44] bry4n_: has joined #ruby
[01:12:07] LoneHermit: has joined #ruby
[01:12:38] mfb2: has joined #ruby
[01:13:28] norc_: has joined #ruby
[01:14:12] crowell: has joined #ruby
[01:14:12] crowell: has joined #ruby
[01:16:19] `tim`: has joined #ruby
[01:17:12] hxegon: has joined #ruby
[01:18:02] duckpuppy: has joined #ruby
[01:20:00] chipotle: has joined #ruby
[01:22:38] ascarter: has joined #ruby
[01:24:36] duckpuppy: has joined #ruby
[01:28:15] BtcBen: has joined #ruby
[01:29:50] cyrus_: has joined #ruby
[01:29:56] cyrus_: has left #ruby: ()
[01:30:57] fullofcaffeine: has joined #ruby
[01:31:31] baweaver: has joined #ruby
[01:32:18] smoose: has joined #ruby
[01:34:08] blackmesa: has joined #ruby
[01:36:38] pawnbox: has joined #ruby
[01:36:41] bjpenn: has joined #ruby
[01:38:22] tristanp: has joined #ruby
[01:39:37] auzty: has joined #ruby
[01:42:44] hahuang65: has joined #ruby
[01:43:06] mr_robot_: has joined #ruby
[01:43:27] tvon: has joined #ruby
[01:43:51] ericn81: has joined #ruby
[01:44:08] fullofca_: has joined #ruby
[01:45:45] TinkerTyper: has joined #ruby
[01:46:08] fragtastic: hmm, looks like the error occurs from creating a new LiveSpeechRecognizer with a configuration from a grammar file
[01:48:02] aclearman037: has joined #ruby
[01:51:49] frustrum: has joined #ruby
[01:52:40] aclearma_: has joined #ruby
[01:53:06] clorisu: has joined #ruby
[01:53:38] clorisu: hey, anyone know whats going on here? http://pastie.org/10758806
[01:54:16] marcdel: has joined #ruby
[01:54:57] fragtastic: clorisu, looks like you don't have autoconf installed
[01:55:06] babblebre: has joined #ruby
[01:55:35] fragtastic: probably safe to say it needs it. sudo apt install autoconf
[01:57:17] clorisu: fixed it fragtastic. thanks. for future reference: does 'command not found' basically translate to 'program not installed'?
[01:57:47] fragtastic: clorisu, basically :P
[01:58:52] nettoweb: has joined #ruby
[01:59:27] uglybandersnatch: has joined #ruby
[02:00:07] fragtastic: clorisu, if i'm doing any dev stuff i usually just `sudo apt install git build-essential autoconf libtool automake bison` since they're often required
[02:00:50] marcdel: has joined #ruby
[02:02:57] jenrzzz: has joined #ruby
[02:03:56] clorisu: fragtastic: http://pastie.org/10758817 any idea why its not updating?
[02:04:41] poerror: has joined #ruby
[02:06:06] fragtastic: clorisu, never used rbenv but if it's anything like python env then you need to activate it. see if there's an 'activate' file in your /home/adam/.benv/versions/2.0.0-dev folder
[02:06:17] fragtastic: otherwise you're just calling ruby from the system installation
[02:07:00] rrrepsaj: has joined #ruby
[02:07:00] clorisu: not that i can see
[02:07:06] fragtastic: clorisu, paste me your 'echo $PATH'
[02:07:16] clorisu: adam@mintpc ~ $ echo $PATH
[02:07:25] clorisu: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
[02:09:22] fragtastic: try 'export PATH=~/.rbenv/shims:$PATH'
[02:09:52] clorisu: adam@mintpc ~ $ export PATH=~/.rbenv/shims:$PATH
[02:09:52] clorisu: adam@mintpc ~ $
[02:09:58] houhoulis: has joined #ruby
[02:10:02] fragtastic: yeah, doesn't output anything
[02:10:18] clorisu: what am i trying if it fixes
[02:10:24] fragtastic: from what i can tell your path needs that shims added
[02:11:33] fragtastic: then try `rbenv local 2.0.0-dev -v` or without the -v, never used rbenv
[02:11:36] hxegon: has joined #ruby
[02:12:04] clorisu: what version manager do you use fragtastic
[02:12:28] fragtastic: never used ruby before today
[02:12:29] ivanskie: has joined #ruby
[02:12:51] Ox0dea: clorisu: Are you sure you need a Ruby environment manager?
[02:13:12] clorisu: im just trying to update ruby versions Ox0dea
[02:13:30] clorisu: apt didnt give me the latest vers and i ran into errors quickly
[02:13:36] Ox0dea: clorisu: Gotcha. Just a second.
[02:13:44] Ox0dea: https://www.brightbox.com/docs/ruby/ubuntu/
[02:14:14] fragtastic: i usually run debian testing, but i wouldn't exactly recommend doing that
[02:15:58] fullofcaffeine: has joined #ruby
[02:15:58] DmitryBochkarev: has joined #ruby
[02:16:22] nettoweb: has joined #ruby
[02:16:25] adgtl: has joined #ruby
[02:17:12] jackjackdripper: has joined #ruby
[02:17:48] clorisu: perfect Ox0dea
[02:17:53] Ox0dea: Happy to help. :)
[02:18:19] clorisu: i'm suprised this lynda tutorial i'm watching for rails only covers mac and windows installation
[02:18:45] finisherr: has joined #ruby
[02:18:59] edwinvdgraaf: has joined #ruby
[02:19:21] fragtastic: if anyone has experience with pocketsphinx-ruby https://gist.github.com/fragtastic/5ef35c131e240524b274
[02:19:32] uglybandersnatch: has joined #ruby
[02:19:50] fragtastic: fails on line 11
[02:21:50] gmas: has joined #ruby
[02:23:05] Rubie: has joined #ruby
[02:24:31] chagel: has joined #ruby
[02:25:07] tristanp: has joined #ruby
[02:25:33] arlek_: has joined #ruby
[02:26:14] dikaio: has joined #ruby
[02:28:03] dikaio: has joined #ruby
[02:28:09] stardiviner: has joined #ruby
[02:28:10] elifoster: has joined #ruby
[02:30:05] dikaio: has joined #ruby
[02:31:01] houhoulis: has joined #ruby
[02:31:40] johnmilton: has joined #ruby
[02:32:16] dikaio: has joined #ruby
[02:33:51] dikaio: has joined #ruby
[02:34:04] chipotle: has joined #ruby
[02:35:09] blackmesa: has joined #ruby
[02:35:57] dikaio: has joined #ruby
[02:37:31] norc-2: has joined #ruby
[02:37:41] achamian: has joined #ruby
[02:38:25] bjpenn: has joined #ruby
[02:39:12] moeabdol2: has joined #ruby
[02:41:43] houhoulis: has joined #ruby
[02:44:06] cpup: has joined #ruby
[02:44:52] hxegon: has joined #ruby
[02:45:07] arescorpio: has joined #ruby
[02:45:17] moos3: has joined #ruby
[02:47:21] aclearman037: has joined #ruby
[02:47:45] fullofcaffeine: has joined #ruby
[02:50:25] aclearman037: has joined #ruby
[02:52:35] aclearman037: has joined #ruby
[02:54:36] StephenOTT: has joined #ruby
[02:55:01] aclearman037: has joined #ruby
[02:55:04] freerobby: has joined #ruby
[02:55:45] bjpenn: has joined #ruby
[02:56:45] aclearman037: has joined #ruby
[03:00:37] fullofcaffeine: has joined #ruby
[03:01:06] anaeem1_: has joined #ruby
[03:01:41] fullofcaffeine: has joined #ruby
[03:05:03] Technodrome: has joined #ruby
[03:05:20] A124: has joined #ruby
[03:07:13] e: has joined #ruby
[03:09:21] chagel: has joined #ruby
[03:09:40] bry4n_: has joined #ruby
[03:10:35] mr_robot_: has joined #ruby
[03:19:13] Ropeney: has joined #ruby
[03:19:36] edwinvdgraaf: has joined #ruby
[03:20:01] adgtl: has joined #ruby
[03:20:38] Rubie: has joined #ruby
[03:21:33] smoose: has joined #ruby
[03:21:34] mallu: has joined #ruby
[03:24:00] chagel: has joined #ruby
[03:27:36] diegoviola: has joined #ruby
[03:29:03] clorisu: anybody know whats going on here? http://pastie.org/10758870
[03:29:37] _djbkd: has joined #ruby
[03:32:20] pizzaops: Welp, there's the obvious permissions errors.
[03:32:23] pizzaops: I'd start with those.
[03:32:44] clorisu: what line pizzaops
[03:32:45] Ox0dea: clorisu: You skipped a step.
[03:33:09] Ox0dea: > And you'll probably need the dev packages so you can build native extensions
[03:33:18] Ox0dea: From the Brightbox installation guide.
[03:33:44] pizzaops: clorisu: also if you literally just cmd/ctrl-f for "permission"
[03:33:46] clorisu: i installed rubydev2.2
[03:33:53] pizzaops: clorisu: not enough, it depends on libraries.
[03:33:58] User458764: has joined #ruby
[03:33:59] clorisu: pizzaops: I corrected 82 on line 83
[03:34:11] pizzaops: https://github.com/rbenv/ruby-build/wiki
[03:34:31] pizzaops: Even if you're not using ruby-build (rbenv), that should cover the dependencies for compiling most gems on most platforms.
[03:35:15] clorisu: kk let me give it a shot
[03:35:28] paradisaeidae_: has joined #ruby
[03:35:36] Abrin_AWAY: has joined #ruby
[03:36:25] pizzaops: But probably listen to Ox0dea since I don't know anything at all about Brightbox.
[03:36:35] clorisu: i did both :-)
[03:36:41] Ox0dea: I don't either, really; I've just seen it ease the pain for Ubuntu users.
[03:36:45] sucks: has joined #ruby
[03:36:54] blackmesa: has joined #ruby
[03:36:58] Ox0dea: That path to ruby_debug.h at the end there looks suspicious.
[03:37:48] sucks: has joined #ruby
[03:39:36] baweaver: has joined #ruby
[03:40:48] chagel: has joined #ruby
[03:42:07] clorisu: http://pastie.org/10758875
[03:42:09] clorisu: same problem?
[03:42:36] liquid-silence: has joined #ruby
[03:42:36] liquid-silence: has joined #ruby
[03:43:51] kknight: has joined #ruby
[03:44:10] Ox0dea: clorisu: I thought you just wanted a recent Ruby version? Why did you install so many?
[03:44:26] clorisu: Ox0dea: thats in the brightbox guide
[03:44:42] clorisu: that's why I said I only downloaded 2.2, but pizzaops said i needed the others libraries?
[03:45:02] pizzaops: I didn't say you needed the libraries from other rubies...
[03:45:07] pizzaops: I said you needed other libraries.
[03:45:24] pizzaops: And then I linked you to what I was talking about.
[03:45:40] clorisu: <clorisu> i installed rubydev2.2
[03:45:40] clorisu: <pizzaops> clorisu: not enough, it depends on libraries.
[03:45:45] clorisu: my mistake
[03:45:49] clorisu: should i remove them Ox0dea
[03:46:06] Ox0dea: clorisu: Seems to have gone all pear-shaped, mate. :/
[03:46:30] liquid-silence: has anyone here used the jwt-ruby library?
[03:46:33] clorisu: removed ruby1.8 and ruby1.8-dev
[03:46:42] liquid-silence: I cannot figure out wtf I am doing wrong with this token
[03:48:22] chagel: has joined #ruby
[03:48:41] clorisu: okay well heres my problem right now Ox0dea http://pastie.org/10758879
[03:48:41] liquid-silence: I can sign this token with whatever the hell I want
[03:48:56] clorisu: I'm only trying to install debugger because I'm running into an error while trying to start the rails server
[03:49:37] liquid-silence: JWT.encode payload, "dadas", 'HS512' , where "dads" should be the secret, if I use the secret supplied
[03:49:44] liquid-silence: it does the exact same thing
[03:50:08] liquid-silence: so which leaves me the secret should be parsed as something maybe?>
[03:51:56] Ox0dea: clorisu: Seems the debugger gem doesn't support anything beyond 2.1.1: https://github.com/cldwalker/debugger/tree/master/ext/ruby_debug
[03:53:13] clorisu: should i switch back
[03:53:20] Ox0dea: Not sure why those 2x directories are even there, actually; they stopped support at 1.9.
[03:53:58] Ox0dea: clorisu: https://github.com/deivid-rodriguez/byebug
[03:54:08] tristanp_: has joined #ruby
[03:54:19] Ox0dea: You should definitely not switch back to 1.9; it's dead, Jim.
[03:55:38] shevy: clorisu be brave, enter the future!
[03:56:59] chagel: has joined #ruby
[04:00:04] clorisu: shevy Ox0dea I installed the byebug gem. I'm still getting an error asking for debugger when I run `rails server`
[04:00:14] ohaibbq: has joined #ruby
[04:00:29] clorisu: http://pastie.org/10758886
[04:00:53] clorisu: `bundle install` sorry
[04:00:57] LoneHerm_: has joined #ruby
[04:01:19] Ox0dea: clorisu: Are you able to upgrade rails?
[04:01:31] Ox0dea: The default Gemfile has used byebug instead of debugger for some time now.
[04:01:33] clorisu: im using rails (4.2.6)
[04:01:46] clorisu: is that old?
[04:02:00] chagel: has joined #ruby
[04:02:25] clorisu: what version should I have
[04:02:35] clorisu: I found 4.2.6 on rubygems.org top result
[04:02:50] Ox0dea: Where did you get this Gemfile?
[04:03:31] clorisu: Ox0dea: I think it was generated when I did `rails new simple_cms`
[04:03:48] Ox0dea: clorisu: And you did that recently, on Rails 4.2.6?
[04:03:49] clorisu: I'll try it again, I mightve done it with my old ruby installed
[04:03:55] clorisu: could be the problem
[04:05:27] poerror: has joined #ruby
[04:05:50] clorisu: well the debugger error is gone :P
[04:05:58] clorisu: now im getting an sqlite one. lets see if it fixes quickly
[04:08:54] clorisu: yeek. basically same problem as debugger
[04:09:18] Ox0dea: Not really.
[04:09:31] clorisu: i mean the error message
[04:09:41] clorisu: http://pastie.org/10758889
[04:09:42] Ox0dea: $ sudo apt-get install sqlite3 libsqlite3-dev
[04:09:48] clorisu: this is after building the new simple_cms with new ruby
[04:10:46] Ox0dea: clorisu: Lines 90 and 91 in your paste.
[04:11:26] clorisu: http://pastie.org/10758890
[04:11:34] clorisu: this doesnt want work
[04:11:39] tjohnson: has joined #ruby
[04:12:05] safe: has joined #ruby
[04:12:11] Ox0dea: I have no idea what's going on there.
[04:12:16] Ox0dea: You'll need an Ubuntu expert.
[04:12:44] clorisu: seems its requesting gem1.8
[04:12:46] clorisu: ive got 1.9.1
[04:12:49] clorisu: should i downgrade gem
[04:13:17] jeer: has joined #ruby
[04:13:46] Ox0dea: ¯\_(ツ)_/¯
[04:14:18] braincrash: has joined #ruby
[04:15:40] whippythellama: has joined #ruby
[04:16:50] pawnbox: has joined #ruby
[04:17:04] freerobby: has joined #ruby
[04:18:25] chagel: has joined #ruby
[04:20:31] Ox0dea: clorisu: Your system still thinks you have Ruby 1.8 installed, but I don't know why or how to convince it otherwise. :/
[04:20:39] Ox0dea: Do you know how to start a fire?
[04:20:46] haxrbyte: has joined #ruby
[04:20:47] clorisu: i think it was a dpkg issue
[04:20:52] clorisu: i mightve sorted it out, one moment
[04:21:19] Ox0dea: Well, the problem is more likely in update-alternatives; I guess you confused it when you installed so many unnecessary Rubies. :P
[04:21:24] haxrbyte: has joined #ruby
[04:21:29] clorisu: im guessing so too :P
[04:21:47] clorisu: sqlite installed
[04:22:03] clorisu: lets run bundle install again..
[04:22:43] clorisu: rails server - success !
[04:23:23] clorisu: okay, so im guessing 80% of the problem was the fact i was trying to run the server on an old Gemfile installed with old ruby before I updated
[04:23:59] Ox0dea: Glad you got it sorted.
[04:24:14] Ox0dea: Sure thing. :)
[04:24:19] clorisu: hopefully i can get around to trying to learn rails soon~
[04:24:34] bougyman: hopefully not
[04:25:02] clorisu: why not bougyman ?
[04:25:27] rrrepsaj: has joined #ruby
[04:25:54] bougyman: because i've had to bail too many companies out of rails woes.
[04:27:10] pawnbox: has joined #ruby
[04:28:42] chagel: has joined #ruby
[04:30:36] clorisu: what sort?
[04:30:40] clorisu: the twitter sort ?
[04:31:15] _djbkd: has joined #ruby
[04:31:28] liquid-silence: has joined #ruby
[04:31:28] liquid-silence: has joined #ruby
[04:32:49] treaki__: has joined #ruby
[04:33:35] moos3: has joined #ruby
[04:33:42] chagel: has joined #ruby
[04:33:51] krz: has joined #ruby
[04:34:16] Asher: has joined #ruby
[04:35:39] Uber|Dragon: has joined #ruby
[04:43:59] RegulationD: has joined #ruby
[04:45:21] chagel: has joined #ruby
[04:47:36] achamian: has joined #ruby
[04:50:02] `tim`: has joined #ruby
[04:53:57] moei: has joined #ruby
[04:57:43] mr_robot_: has joined #ruby
[04:58:24] gix: has joined #ruby
[04:58:43] last_staff: has joined #ruby
[04:58:55] rvchangue: has joined #ruby
[05:02:38] jeer: has joined #ruby
[05:07:18] htmldrum: has joined #ruby
[05:07:37] edwinvdgraaf: has joined #ruby
[05:07:47] Asher: has joined #ruby
[05:09:03] Coldblackice: has joined #ruby
[05:10:48] chagel: has joined #ruby
[05:13:41] Asher: has joined #ruby
[05:13:48] bluntman: has left #ruby: ("WeeChat 1.2")
[05:15:21] Chagel_: has joined #ruby
[05:21:58] tvon: has joined #ruby
[05:24:07] hakunin_: has joined #ruby
[05:28:10] duncannz: has joined #ruby
[05:29:20] Asher: has joined #ruby
[05:31:29] hxegon: has joined #ruby
[05:32:56] adgtl: has joined #ruby
[05:34:07] astrobun_: has joined #ruby
[05:34:53] htmldrum: has joined #ruby
[05:36:06] aNoble: has joined #ruby
[05:37:18] hk238: has joined #ruby
[05:41:08] P1ro: has joined #ruby
[05:41:52] aNoble: has joined #ruby
[05:44:57] Technodrome: and a long monday
[05:45:36] Sammichmaker: has joined #ruby
[05:48:26] chagel: has joined #ruby
[05:49:13] htmldrum: has joined #ruby
[05:49:26] LoneHerm_: has joined #ruby
[05:50:12] rkazak: has joined #ruby
[05:51:05] uglybandersnatch: has joined #ruby
[05:51:49] stardiviner: has joined #ruby
[05:51:53] chipotle: has joined #ruby
[05:52:35] CloCkWeRX: has joined #ruby
[05:54:41] aNoble: has joined #ruby
[05:55:18] P1ro: hi, im tryong to compile ruby rvm on arch but im getting this error: http://dpaste.com/1E84FJG.txt
[05:57:04] Asher: has joined #ruby
[06:02:21] elifoster: has joined #ruby
[06:03:09] p1k: has joined #ruby
[06:03:30] p1k: how can I use extend the ClassMethods module of one module with another set of ClassMethods
[06:03:43] p1k: it seems to work immedietly in included, but it doesn't seem to stick :o
[06:04:22] aNoble: has joined #ruby
[06:05:08] aNoble: has left #ruby: ()
[06:05:33] govg: has joined #ruby
[06:09:41] Guest34101: has joined #ruby
[06:12:21] Prominent: has joined #ruby
[06:13:28] adgtl: has joined #ruby
[06:13:28] adgtl: has joined #ruby
[06:15:42] chagel: has joined #ruby
[06:16:16] User458764: has joined #ruby
[06:17:52] rkazak_: has joined #ruby
[06:21:48] moos3: has joined #ruby
[06:24:27] krz: has joined #ruby
[06:25:19] fullofcaffeine: has joined #ruby
[06:27:43] rkazak: has joined #ruby
[06:28:38] frustrum: has joined #ruby
[06:29:40] mr_robot_: has joined #ruby
[06:39:00] skade: has joined #ruby
[06:39:25] astrobun_: has joined #ruby
[06:41:44] djbkd_: has joined #ruby
[06:45:04] RegulationD: has joined #ruby
[06:45:05] LoneHermit: has joined #ruby
[06:46:31] rkazak_: has joined #ruby
[06:48:00] Rinalds: has joined #ruby
[06:50:45] mistermocha: has joined #ruby
[06:52:29] Xeago: has joined #ruby
[06:52:42] chagel: has joined #ruby
[06:55:07] yakbrown: has joined #ruby
[06:55:54] sandstrom: has joined #ruby
[06:56:02] intrigueD: has joined #ruby
[06:58:03] BtcBen_: has joined #ruby
[06:59:42] tomphp: has joined #ruby
[07:02:59] DoubleMalt: has joined #ruby
[07:05:12] solars: has joined #ruby
[07:05:15] bqscott_: has joined #ruby
[07:05:17] klaas_: has joined #ruby
[07:05:22] kenichi_: has joined #ruby
[07:05:24] rkazak_: has joined #ruby
[07:05:24] icedp: has joined #ruby
[07:05:28] pjaspers_: has joined #ruby
[07:05:31] mattpatt_: has joined #ruby
[07:05:36] shortdudey123_: has joined #ruby
[07:05:52] Junaos_: has joined #ruby
[07:06:18] jrod_: has joined #ruby
[07:06:24] Console: has joined #ruby
[07:07:17] raldu_: has joined #ruby
[07:07:19] peterhu_: has joined #ruby
[07:07:24] svkurowski_: has joined #ruby
[07:07:37] bogdanteleaga_: has joined #ruby
[07:07:38] sonOfRa_: has joined #ruby
[07:07:48] TakumoKatekari: has joined #ruby
[07:07:48] TakumoKatekari: has joined #ruby
[07:08:53] bahar_: has joined #ruby
[07:11:39] andikr: has joined #ruby
[07:12:34] FastJack_: has joined #ruby
[07:12:58] Eaven: has joined #ruby
[07:14:16] code_[BNC]: has joined #ruby
[07:14:26] quarcu_: has joined #ruby
[07:14:33] tomaw_: has joined #ruby
[07:14:34] df-: has joined #ruby
[07:14:40] julieeharshaw: has joined #ruby
[07:15:01] shevy: is there a release cycle or policy for new ruby versions? like every 2 months or something? I only know of mandatory xmas releases :P
[07:15:25] martinbjeldbak_: has joined #ruby
[07:15:35] davee__: has joined #ruby
[07:15:39] Icey: has joined #ruby
[07:15:46] Ox0dea_: has joined #ruby
[07:15:46] timonv1: has joined #ruby
[07:15:48] djellemah: has joined #ruby
[07:15:49] decaff: has joined #ruby
[07:16:06] AlexRussia: has joined #ruby
[07:16:11] guardian: has joined #ruby
[07:16:11] hinbody: has joined #ruby
[07:16:11] reaVer: has joined #ruby
[07:16:11] zeroXten: has joined #ruby
[07:16:11] kies: has joined #ruby
[07:16:11] wnd: has joined #ruby
[07:16:11] glcx: has joined #ruby
[07:16:11] forgot: has joined #ruby
[07:16:11] pbruna: has joined #ruby
[07:16:11] genpaku: has joined #ruby
[07:16:11] torarne: has joined #ruby
[07:16:11] callumacrae: has joined #ruby
[07:16:11] axisys: has joined #ruby
[07:16:11] hogetaro_: has joined #ruby
[07:16:11] RTG`: has joined #ruby
[07:16:11] aibot: has joined #ruby
[07:16:11] DrCode: has joined #ruby
[07:16:11] jzigmund: has joined #ruby
[07:16:11] spacemud: has joined #ruby
[07:16:11] jtoy_: has joined #ruby
[07:16:11] iko1: has joined #ruby
[07:16:11] ericwood_: has joined #ruby
[07:16:11] ahuman: has joined #ruby
[07:16:11] mhb: has joined #ruby
[07:16:11] xMopxShell: has joined #ruby
[07:16:11] eregon: has joined #ruby
[07:16:12] Guest96677: has joined #ruby
[07:16:12] icedragon: has joined #ruby
[07:16:12] varesa: has joined #ruby
[07:16:12] Ariadeno: has joined #ruby
[07:16:12] edulix_: has joined #ruby
[07:16:12] john2: has joined #ruby
[07:16:12] kallisti5: has joined #ruby
[07:16:12] lucas: has joined #ruby
[07:16:12] philtr_: has joined #ruby
[07:16:12] cscheib_: has joined #ruby
[07:16:12] Helheim: has joined #ruby
[07:16:12] chrisarcand: has joined #ruby
[07:16:12] jsaak: has joined #ruby
[07:16:12] ryotarai: has joined #ruby
[07:16:12] Raboo: has joined #ruby
[07:16:12] ltd_: has joined #ruby
[07:16:12] mame3: has joined #ruby
[07:16:12] KillerFox: has joined #ruby
[07:16:12] hypnosb: has joined #ruby
[07:16:13] inukshuk: has joined #ruby
[07:16:28] sauvin: has joined #ruby
[07:16:30] Rasi: has joined #ruby
[07:17:07] Ariadeno: has joined #ruby
[07:17:11] TheBrayn: has joined #ruby
[07:17:18] genpaku: has joined #ruby
[07:17:21] Cork: has joined #ruby
[07:17:29] sauvin: has joined #ruby
[07:17:30] Guest13710: has joined #ruby
[07:18:07] haxrbyte: has joined #ruby
[07:18:23] Helheim: has joined #ruby
[07:18:57] flopsec: has joined #ruby
[07:19:37] pawnbox: has joined #ruby
[07:20:09] haxrbyte: has joined #ruby
[07:20:43] darix: has joined #ruby
[07:22:11] callumacrae: has joined #ruby
[07:23:14] tvon: has joined #ruby
[07:26:41] phredus: has joined #ruby
[07:27:09] tristanp: has joined #ruby
[07:29:00] tristanp_: has joined #ruby
[07:31:26] chagel: has joined #ruby
[07:34:09] bmalum: has joined #ruby
[07:34:19] _djbkd: has joined #ruby
[07:36:49] firstdayonthejob: has joined #ruby
[07:39:13] tAn: has joined #ruby
[07:39:16] manveru: bougyman: right now i
[07:39:30] manveru: i'm having fun bailing them out of not-knowing-sql woes :P
[07:40:24] manveru: who would've known that replacing O(n5) queries with joins and such speeds your app up by a few factors
[07:42:05] SenpaiSilver: has joined #ruby
[07:42:14] Tempesta: has joined #ruby
[07:42:42] niksrc: has joined #ruby
[07:44:08] dionysus69: has joined #ruby
[07:47:10] chagel: has joined #ruby
[07:47:11] ziyadb: has joined #ruby
[07:47:16] sandstrom: has joined #ruby
[07:49:39] codecop: has joined #ruby
[07:51:45] pawnbox: has joined #ruby
[07:52:10] skade: has joined #ruby
[07:52:53] mhoungbo: has joined #ruby
[07:53:15] jas02: has joined #ruby
[07:53:27] pawnbox: has joined #ruby
[07:55:12] AlexJakeGreen: has joined #ruby
[07:55:49] moeabdol2: has joined #ruby
[07:57:24] lxsameer: has joined #ruby
[07:58:03] biberu: has joined #ruby
[08:01:44] bjpenn: has joined #ruby
[08:02:09] steffkes: has joined #ruby
[08:06:21] Abrin_AWAY: has joined #ruby
[08:08:01] sandstrom: has joined #ruby
[08:08:54] emesa: has joined #ruby
[08:09:58] moos3: has joined #ruby
[08:14:26] roshanavand: has joined #ruby
[08:16:04] gagrio: has joined #ruby
[08:16:08] chagel: has joined #ruby
[08:16:56] chandlerbing: has joined #ruby
[08:17:21] agit0: has joined #ruby
[08:21:28] pawnbox: has joined #ruby
[08:21:31] anisha: has joined #ruby
[08:21:58] aganov: has joined #ruby
[08:22:05] jaruga: has joined #ruby
[08:23:35] jaruga: has joined #ruby
[08:23:57] vondruch: has joined #ruby
[08:24:42] tvon: has joined #ruby
[08:25:58] roshanavand: has joined #ruby
[08:27:34] maner: has joined #ruby
[08:27:35] terlar: has joined #ruby
[08:29:23] frustrum: has joined #ruby
[08:29:53] aufi: has joined #ruby
[08:32:55] igam: has joined #ruby
[08:33:26] LoneHermit: has joined #ruby
[08:34:13] jaiks: has joined #ruby
[08:36:46] manveru: adaedra: welcome
[08:39:47] Ox0dea: Is there a workaround for `load '/dev/fd/0'` not doing The Right Thing?
[08:40:22] Ox0dea: It's true enough that it's technically not a file, but it still feels like that should be possible.
[08:40:24] skade: has joined #ruby
[08:40:57] Couch: has joined #ruby
[08:42:11] mark2: has joined #ruby
[08:43:29] anisha: has joined #ruby
[08:44:53] Mon_Ouie: Is eval a good enough work around?
[08:47:13] edwinvdgraaf: has joined #ruby
[08:48:17] futilegames: has joined #ruby
[08:48:21] Ox0dea: Ah, well, the only valid use case that comes to mind is demonstrating a #load patch on sites like eval.in, but that's precisely the situation in which I find myself.
[08:49:22] ur5us: has joined #ruby
[08:51:53] pawnbox: has joined #ruby
[08:52:18] mdw: has joined #ruby
[08:53:00] Spami: has joined #ruby
[08:55:32] tAn: has joined #ruby
[08:56:27] futilegames: has left #ruby: ()
[08:57:44] sarbs: has joined #ruby
[08:58:06] rdark: has joined #ruby
[09:00:27] jenrzzz: has joined #ruby
[09:01:16] poerror: has joined #ruby
[09:03:46] roshanavand: has joined #ruby
[09:08:09] roshanavand: has joined #ruby
[09:10:28] nerium: has joined #ruby
[09:12:09] bry4n_: has joined #ruby
[09:12:45] drptbl: has joined #ruby
[09:13:32] the_drow: has joined #ruby
[09:14:25] lxsameer: has joined #ruby
[09:15:38] sandstrom: has joined #ruby
[09:15:41] jhass: has joined #ruby
[09:16:37] blackmes1: has joined #ruby
[09:17:01] sonOfRa: has joined #ruby
[09:17:55] ferr: has joined #ruby
[09:18:47] gbgdev: has joined #ruby
[09:19:11] Hobbyboy: has joined #ruby
[09:19:34] bauruine: has joined #ruby
[09:21:54] anisha: has joined #ruby
[09:22:08] mlehrer: has joined #ruby
[09:22:36] clorisu: has joined #ruby
[09:22:39] Xeago: has joined #ruby
[09:23:49] mintux: has joined #ruby
[09:24:27] mintux: when i try to run ruby on my apache server it shows source instead of excute it http://iliketech.ir/1.rb
[09:24:55] roshanavand: has joined #ruby
[09:25:11] adgtl: has joined #ruby
[09:25:11] adgtl: has joined #ruby
[09:26:40] kp666: has joined #ruby
[09:28:12] SCHAAP137: has joined #ruby
[09:29:06] mrgrieves: has joined #ruby
[09:29:37] tomphp: has joined #ruby
[09:30:08] chagel: has joined #ruby
[09:30:41] marr: has joined #ruby
[09:30:56] baweaver: has joined #ruby
[09:30:56] ferr: has joined #ruby
[09:32:01] tAn: has joined #ruby
[09:32:51] bricker: has joined #ruby
[09:33:17] nettoweb: has joined #ruby
[09:33:38] mlehrer: has joined #ruby
[09:33:58] araujo: has joined #ruby
[09:35:06] roshanavand: has joined #ruby
[09:35:38] Ox0dea: mintux: You'll need to configure your server to interpret Ruby files as CGI scripts, but that's a really old-fashioned approach.
[09:36:19] _djbkd: has joined #ruby
[09:36:43] mintux: Ox0dea: it's my config in that virtualhost: http://codepad.org/Kyyvavyc
[09:37:38] koneko: has joined #ruby
[09:38:32] Ox0dea: mintux: I think you'll need something more like this: https://gist.github.com/jjulian/1860123
[09:38:38] Ox0dea: Do note the date on that.
[09:38:55] clorisu: has joined #ruby
[09:39:48] pawnbox: has joined #ruby
[09:39:57] User458764: has joined #ruby
[09:40:38] tulak: has joined #ruby
[09:41:13] tAn: has joined #ruby
[09:41:41] tAn: has joined #ruby
[09:47:59] b|ackwolf: what happens if a define a method that yields to nothing?
[09:48:24] b|ackwolf: def loop_; while true; yield; end; end
[09:48:30] adaedra: try and see?
[09:48:44] terlar: has joined #ruby
[09:49:13] b|ackwolf: I need to know what's the default yield argument.
[09:49:31] roshanavand: has joined #ruby
[09:49:58] Mon_Ouie: There's no such thing.
[09:50:07] Mon_Ouie: >> loop { |*a| break a.size }
[09:50:09] ruby[bot]: Mon_Ouie: # => 0 (https://eval.in/536080)
[09:50:14] Mon_Ouie: i.e. the block is called with 0 arguments
[09:50:49] tomphp: has joined #ruby
[09:51:46] b|ackwolf: Mon_Ouie, thanks. so it yields control to the code block, am I right?
[09:52:04] LoneHerm_: has joined #ruby
[09:57:44] roshanavand: has joined #ruby
[09:58:05] moos3: has joined #ruby
[10:00:34] tulak: has joined #ruby
[10:01:06] vdamewood: has joined #ruby
[10:01:28] andikr: has joined #ruby
[10:01:48] emilkarl: has joined #ruby
[10:03:06] lxsameer: has joined #ruby
[10:04:15] roshanavand: has joined #ruby
[10:04:16] poerror: has joined #ruby
[10:07:00] merida: has joined #ruby
[10:08:55] uglybandersnatch: has joined #ruby
[10:10:05] j2k: has joined #ruby
[10:10:18] workmad3: has joined #ruby
[10:10:31] dgncn: has joined #ruby
[10:10:34] blackgoat: has joined #ruby
[10:12:08] vikas027: has joined #ruby
[10:14:52] snowy: has joined #ruby
[10:14:59] BtcBen: has joined #ruby
[10:15:08] anisha: has joined #ruby
[10:17:02] n008f4g_: has joined #ruby
[10:17:13] jaiks: has joined #ruby
[10:18:27] MaienM: has joined #ruby
[10:20:06] tomphp: has joined #ruby
[10:21:34] drptbl: has joined #ruby
[10:22:17] manveru: damn, wrong tab
[10:22:17] platzhirsch: has joined #ruby
[10:24:31] mr_robot_: has joined #ruby
[10:25:04] pandaant: has joined #ruby
[10:25:07] binaryplease: has joined #ruby
[10:27:34] kent\n: has joined #ruby
[10:28:18] tvon: has joined #ruby
[10:28:53] jaiks: has joined #ruby
[10:30:46] ziyadb: has joined #ruby
[10:31:15] r0bby_: has joined #ruby
[10:31:36] frustrum: has joined #ruby
[10:33:12] last_staff: has joined #ruby
[10:36:57] gbgdev: has joined #ruby
[10:38:45] mr_robot_: has joined #ruby
[10:38:53] moeabdol2: has joined #ruby
[10:41:08] AlexJakeGreen: has joined #ruby
[10:42:00] blackmes1: has joined #ruby
[10:42:06] Ox0dea: https://eval.in/536120
[10:42:15] Ox0dea: What's that anonymous class that's being sent #method_added?
[10:42:20] Prominent: has joined #ruby
[10:43:14] Ox0dea: I expected it to be the singleton class of the anonymous Module being introduced by Kernel#load, but that's not the case.
[10:43:45] uglybandersnatch: has joined #ruby
[10:43:46] Mia: has joined #ruby
[10:43:46] Mia: has joined #ruby
[10:44:10] Azure: has joined #ruby
[10:45:12] tulak_: has joined #ruby
[10:46:00] shredding: has joined #ruby
[10:48:16] Hanmac: hey, for gem version depenency, how can i do it that both ~> 10.0 and ~> 11.0 does work?
[10:51:04] johnmilton: has joined #ruby
[10:52:35] mistermocha: has joined #ruby
[10:53:21] rodfersou: has joined #ruby
[10:53:35] pawnbox: has joined #ruby
[10:55:08] trosborn: has joined #ruby
[10:55:57] Xiti: has joined #ruby
[10:56:31] adaedra: hanmac: '>= 10.0, < 12.0' ?
[10:57:18] Hanmac: adaedra: hm that might work, or i just use ~>11.0 and force the others to update the gem ... (its only "rake" what can go wrong?) XD
[10:57:46] bollullera: has joined #ruby
[10:57:47] Ox0dea: adaedra, hanmac: That'd catch 11.1 and so forth.
[10:57:52] roshanavand: has joined #ruby
[10:58:04] htmldrum: has joined #ruby
[10:58:12] Ox0dea: (Ignore that.)
[10:58:24] adaedra: ACTION adds Ox0dea to ignore list
[10:58:33] Ox0dea: I still love you.
[10:58:50] tvw: has joined #ruby
[11:01:53] tesuji: has joined #ruby
[11:02:35] arlek_: has joined #ruby
[11:02:46] jenrzzz: has joined #ruby
[11:03:07] aclearman037: has joined #ruby
[11:03:32] mdih: has joined #ruby
[11:05:33] mujou: has joined #ruby
[11:06:08] pawnbox: has joined #ruby
[11:10:01] chagel: has joined #ruby
[11:12:01] tomphp: has joined #ruby
[11:13:10] bry4n_: has joined #ruby
[11:13:26] tlaxkit: has joined #ruby
[11:13:53] howdoi: has joined #ruby
[11:17:09] mr_robot_: has joined #ruby
[11:21:41] chagel: has joined #ruby
[11:22:02] _mak: has left #ruby: ("..")
[11:22:25] emilkarl: has joined #ruby
[11:23:44] mfaeh: has joined #ruby
[11:28:08] nfk|laptop: has joined #ruby
[11:29:17] DanyC: has joined #ruby
[11:29:25] whatever: has joined #ruby
[11:31:08] agit0: has joined #ruby
[11:31:46] DanyC: Hi all, i'm a newbie on Ruby hence please bear with me. Anyone has any ideas on how can i find from a given gem pkg all the dependencies it requires ? I'm not looking only after the dem dependencies but also from the rpm side. The use case is simple: i had on a CentOS to install a gem pkg which failed because there were some missing rpms/ libs hence i'd like to find out all the req before installing it
[11:32:01] baweaver: has joined #ruby
[11:32:20] frustrum: has joined #ruby
[11:32:40] aclearman037: has joined #ruby
[11:34:51] Ox0dea: DanyC: http://guides.rubygems.org/specification-reference/#requirements
[11:35:57] Ox0dea: Very few gems use that field, and even fewer fill it with machine-readable values.
[11:36:31] Ox0dea: I suppose you could delegate to Arch or Gentoo packages for external dependency lists, but that'd be rather brittle.
[11:36:58] trinaldi: has joined #ruby
[11:37:16] mikar: has joined #ruby
[11:37:21] ldnunes: has joined #ruby
[11:37:35] tomphp: has joined #ruby
[11:38:12] _djbkd: has joined #ruby
[11:39:25] ujjain-: return s['lifeCycleState']
[11:39:25] ujjain-: return s['state']
[11:39:32] ujjain-: how can I make this return as an array?
[11:40:07] LoneHerm_: has joined #ruby
[11:40:32] DanyC: Ox0dea: indeed very few use it ...hmmm, i guess there is no other option ?
[11:40:49] tomphp: has joined #ruby
[11:41:04] Phage: has joined #ruby
[11:41:20] Phage: has left #ruby: ("WeeChat 1.4")
[11:42:34] pawnbox: has joined #ruby
[11:42:45] Ox0dea: DanyC: I reckon it's on the CentOS crowd to ensure their dependency lists are correct. :/
[11:43:55] bricker: has joined #ruby
[11:44:59] DanyC: Ox0dea: well yes, but i was coming from a different angle. A dev says - i need to install gem x but when i do install i mis some CentOS libraries/ rpm hence me thinking how to know what to pull from CentOS w/o waiting to fail 1st
[11:45:47] Ox0dea: DanyC: We've established that there's simply no way to ensure that programmatically; you'll just have to do your research.
[11:45:58] rodfersou: has joined #ruby
[11:46:06] DanyC: Ox0dea: okay, thank you for your help
[11:46:10] Ox0dea: Sure thing.
[11:46:18] moos3: has joined #ruby
[11:48:55] pwnd_nsfw: has joined #ruby
[11:50:31] sdothum: has joined #ruby
[11:51:31] stannard: has joined #ruby
[11:53:39] ujjain: can somebody point me in the right direction with this? i'm trying to retunr an array based on 2 strings - http://pastebin.com/Z5UhaKpG
[11:53:40] ruby[bot]: ujjain: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/9770fea7a0f366d1b5b4
[11:53:41] ruby[bot]: ujjain: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[11:55:24] ljarvis_: ujjain: is there a problem with it?
[11:56:09] ujjain: ljarvis_, it looks so ugly.
[11:56:32] ljarvis_: ujjain: does it work as you want?
[11:57:01] ljames: has joined #ruby
[11:57:05] ujjain: I haven't been able to try, it's part of a function, not sure how to test it tbh. But I'll try to test it.
[11:57:34] ljarvis_: you should work on your variable naming
[11:58:12] theRealAlexz: has joined #ruby
[11:58:28] AlexJakeGreen: I think the "return" is not needed. Functions always return something, for example, the last evaluation
[11:58:52] Hanmac: ujjain: if s is a hash, why not use "values_at" ?
[11:59:53] PedramT: has joined #ruby
[12:00:37] sandstrom: has joined #ruby
[12:05:55] Shaboum: has joined #ruby
[12:07:11] adgtl: has joined #ruby
[12:07:12] but3k4: has joined #ruby
[12:07:27] poerror: has joined #ruby
[12:08:25] nixmaniack: has joined #ruby
[12:08:25] nixmaniack: has joined #ruby
[12:09:31] tomphp: has joined #ruby
[12:10:05] synthroid: has joined #ruby
[12:10:33] joonty: has joined #ruby
[12:12:02] quakephil: has joined #ruby
[12:12:49] moos3: has joined #ruby
[12:14:51] Eaven: has joined #ruby
[12:16:05] Tekneek: has joined #ruby
[12:16:19] evidex: has joined #ruby
[12:18:12] gagrio: has joined #ruby
[12:19:02] duckpuppy: has joined #ruby
[12:21:52] Didac: has joined #ruby
[12:22:26] stannard: has joined #ruby
[12:22:44] mfaeh: has joined #ruby
[12:26:28] skade: has joined #ruby
[12:27:17] sandstrom: has joined #ruby
[12:29:16] PedramT: has joined #ruby
[12:29:48] tvon: has joined #ruby
[12:37:32] nixmaniack: has joined #ruby
[12:37:47] poerror: has joined #ruby
[12:38:43] duckpuppy: has joined #ruby
[12:39:28] sepp2k: has joined #ruby
[12:40:20] sunslide: has joined #ruby
[12:43:46] freerobby: has joined #ruby
[12:43:46] sunslide: hi guys, this is a long shot but I'm trying to support TLS 1.2 on Ruby 1.9 where it is not supported (support for this was introduced on Ruby 2.0) *without* recompiling ruby (I have tons of workstations and most of them are Windows-based), ANY way I could do this?
[12:44:05] vikas027: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[12:44:48] Hanmac: sunslide: isnt ruby1.9 already dead and unsupported?
[12:46:02] bricker: has joined #ruby
[12:46:40] pawnbox: has joined #ruby
[12:46:45] sunslide: but the corporate life isn't always in sync with the real world
[12:47:20] RegulationD: has joined #ruby
[12:47:33] ruby-lang097: has joined #ruby
[12:49:00] Hanmac: are you guys still using stone cycles as calendar? ;P
[12:53:17] anagha_: has joined #ruby
[12:53:25] mistermocha: has joined #ruby
[12:53:45] ramortegui: has joined #ruby
[12:54:03] cpup: has joined #ruby
[12:58:53] sarlalian: has joined #ruby
[12:59:10] stannard: has joined #ruby
[13:00:28] shevy: he showed you his contempt by abandoning you hanmac!
[13:00:55] Hanmac: maybe its stone cycle did stop working?
[13:01:25] tacit7: has joined #ruby
[13:04:11] mfb2: has joined #ruby
[13:04:14] jenrzzz: has joined #ruby
[13:04:38] sandstrom: has joined #ruby
[13:04:39] joonty: has joined #ruby
[13:04:55] Takumo: has joined #ruby
[13:04:55] Takumo: has joined #ruby
[13:06:01] haylon: has joined #ruby
[13:06:46] nando293921: has joined #ruby
[13:07:40] B4daBing73: has joined #ruby
[13:10:21] cdg: has joined #ruby
[13:10:24] pawnbox: has joined #ruby
[13:10:38] shevy: no I think these are usually people who do not use ruby a lot
[13:10:41] cdg: has joined #ruby
[13:10:47] shevy: even I managed to upgrade!
[13:10:55] bkxd: has joined #ruby
[13:11:16] binaryplease: has joined #ruby
[13:12:41] mfaeh: has joined #ruby
[13:13:40] pawnbox: has joined #ruby
[13:13:56] bry4n_: has joined #ruby
[13:13:56] bjpenn: has joined #ruby
[13:14:10] djcp: has joined #ruby
[13:14:46] davedev24: has joined #ruby
[13:14:59] mistermocha: has joined #ruby
[13:15:40] terlar: has joined #ruby
[13:15:44] shevy: risk it with a biscuit
[13:15:45] aegis3121: has joined #ruby
[13:21:54] PedramT: has joined #ruby
[13:22:16] gagrio: has joined #ruby
[13:23:10] steffkes: has joined #ruby
[13:26:01] TomyLobo: has joined #ruby
[13:27:08] Eaven: has joined #ruby
[13:28:57] Guest34101: has joined #ruby
[13:30:36] ziyadb: has joined #ruby
[13:32:44] baweaver: has joined #ruby
[13:33:04] frustrum: has joined #ruby
[13:33:44] momomomomo: has joined #ruby
[13:34:54] bjpenn: has joined #ruby
[13:35:57] manveru: shevy: congrats
[13:36:00] shredding: has joined #ruby
[13:36:05] manveru: you are on 1.8.4 now?
[13:36:05] crystal77: has joined #ruby
[13:36:42] tacit7: has joined #ruby
[13:38:50] shevy: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]
[13:38:55] aclearman037: has joined #ruby
[13:39:53] adgtl: has joined #ruby
[13:39:53] adgtl: has joined #ruby
[13:41:41] Hanmac: >> require "date"; "%d days" % (Date.today - Date.parse(RUBY_RELEASE_DATE)) #=> returns 0 for me ;P
[13:41:43] ruby[bot]: hanmac: # => "80 days" (https://eval.in/536248)
[13:41:52] mfb2: has joined #ruby
[13:42:58] jottr_: has joined #ruby
[13:43:23] Shantell: has joined #ruby
[13:43:25] poerror: has joined #ruby
[13:43:34] Shantell: has left #ruby: ()
[13:44:09] mfaeh: has joined #ruby
[13:44:46] mintux: has left #ruby: ()
[13:45:41] sergey_makagon: has joined #ruby
[13:46:04] Shaboum: has joined #ruby
[13:46:47] `tim`: has joined #ruby
[13:46:49] govg: has joined #ruby
[13:47:01] jaiks: has joined #ruby
[13:47:23] bmalum_: has joined #ruby
[13:47:46] pawnbox: has joined #ruby
[13:48:01] tristanp: has joined #ruby
[13:48:38] zotherstupidguy: has joined #ruby
[13:49:53] nixmaniack: has joined #ruby
[13:52:53] baweaver: has joined #ruby
[13:53:12] mfb2: has joined #ruby
[13:56:18] clorisu: has joined #ruby
[13:56:29] Zackio: has joined #ruby
[13:56:38] tvon: has joined #ruby
[13:56:48] juanfra_: has joined #ruby
[13:56:53] clorisu: has joined #ruby
[13:57:13] nixmaniack: has joined #ruby
[13:57:14] nixmaniack: has joined #ruby
[13:57:41] clorisu: has joined #ruby
[13:57:51] PedramT: has joined #ruby
[13:58:17] clorisu: has joined #ruby
[13:58:23] bmalum: has joined #ruby
[13:58:25] codecop_: has joined #ruby
[13:59:39] freerobby: has joined #ruby
[13:59:43] clorisu: has joined #ruby
[14:00:08] clorisu: has joined #ruby
[14:00:09] tomphp: has joined #ruby
[14:00:14] griffindy: has joined #ruby
[14:00:40] malconis: has joined #ruby
[14:02:36] tulak: has joined #ruby
[14:03:53] mistermocha: has joined #ruby
[14:05:18] inukshuk_: has joined #ruby
[14:06:33] stannard: has joined #ruby
[14:07:18] idletask: has joined #ruby
[14:07:33] floatingpoint: has joined #ruby
[14:10:51] bjpenn: has joined #ruby
[14:14:08] xaxisx: has joined #ruby
[14:15:04] frustrum: has joined #ruby
[14:15:47] binaryplease: has joined #ruby
[14:17:09] poerror: has joined #ruby
[14:17:26] mary5030: has joined #ruby
[14:17:37] mark2: has left #ruby: ("PART #RubyOnRails :PART #jquery :PART #reactjs :PART ##javascript :PART #elixir-lang :PART #debian :PART #zsh :PART #nethunter :PONG :verne.freenode.net")
[14:17:58] failshell: has joined #ruby
[14:18:45] crime: has joined #ruby
[14:20:42] mary5030_: has joined #ruby
[14:21:46] vqrs: has joined #ruby
[14:21:50] shevy: hanmac python climbed higher than php! http://www.tiobe.com/tiobe_index
[14:21:59] tvon: has joined #ruby
[14:22:01] shevy: ruby still battles it out with perl
[14:22:09] troulouliou_div2: has joined #ruby
[14:22:22] Hanmac: normally i do not care about tiobe, but now i point and laugh at php ;P
[14:23:03] merida: has joined #ruby
[14:23:13] shevy: the only mildly depressing thing is that ruby isn't higher there
[14:23:42] bry4n_: has joined #ruby
[14:24:21] pawnbox: has joined #ruby
[14:25:28] merida: has joined #ruby
[14:25:53] tvon: has joined #ruby
[14:25:54] jyaworski: has joined #ruby
[14:26:02] aryaching: has joined #ruby
[14:26:03] crime: its just a measure of backlinks. it doesnt actually mean anything
[14:26:14] mallu: has joined #ruby
[14:26:19] bjpenn: has joined #ruby
[14:26:57] myntcake: has joined #ruby
[14:27:06] fullofcaffeine: has joined #ruby
[14:27:31] Linell: has joined #ruby
[14:28:12] krz: has joined #ruby
[14:28:49] Linell: I'm working on an image uploading web service. When I get the image file, it's a string. How can I check the file type from that? Like png vs jpeg?
[14:29:38] chouhoulis: has joined #ruby
[14:30:03] Prominent: has joined #ruby
[14:30:04] chouhoulis: has joined #ruby
[14:30:04] xaxisx: has joined #ruby
[14:30:07] mary5030_: has joined #ruby
[14:30:07] shevy: on linux I tend to just ask "file"
[14:30:19] shevy: if you want to have it even more primitive, you could use File.extname :D
[14:30:40] Linell: Well I've tried making the string into a file and it gives an error because of a null byte
[14:30:48] Linell: Doing something like File.new('test', file_string)
[14:31:52] mary5030: has joined #ruby
[14:32:07] momomomomo: has joined #ruby
[14:32:50] frustrum: has joined #ruby
[14:33:35] freakcoder: has joined #ruby
[14:33:58] xaxisx_: has joined #ruby
[14:35:31] nixmaniack: has joined #ruby
[14:35:51] pawnbox: has joined #ruby
[14:36:12] TomyLobo: I have an url and I want to retrieve whatever comes from that url and store it in a file on disk and write it as a response in a sinatra app. All of this without having the entire thing in memory at some point and without having the sinatra app's client time out while waiting for the download to finish.
[14:37:04] TomyLobo: also i dont want to write the copy loop myself. I found IO.copy_stream, now i probably need a stream multiplexer of some kind
[14:37:14] axl_: has joined #ruby
[14:37:26] tvon: has joined #ruby
[14:37:29] TomyLobo: i.e. an output stream that writes to two output streams when it's written to
[14:37:44] nettoweb: has joined #ruby
[14:37:48] aclearman037: has joined #ruby
[14:39:59] whippythellama: has joined #ruby
[14:40:14] Mon_Ouie: has joined #ruby
[14:41:00] _djbkd: has joined #ruby
[14:41:02] TomyLobo: is there such a thing?
[14:41:51] treehug88: has joined #ruby
[14:42:09] speakingcode: has joined #ruby
[14:43:08] xaxisx: has joined #ruby
[14:44:52] Yiota: has joined #ruby
[14:46:01] failshell: has joined #ruby
[14:46:49] djellemah: has joined #ruby
[14:46:49] trosborn: has joined #ruby
[14:46:55] bjpenn: has joined #ruby
[14:47:22] bricker: has joined #ruby
[14:48:08] frustrum: has joined #ruby
[14:48:31] frustrum: has joined #ruby
[14:48:36] mary5030_: has joined #ruby
[14:48:38] LoneHerm_: has joined #ruby
[14:48:38] RegulationD: has joined #ruby
[14:48:41] ariel_17: has joined #ruby
[14:50:12] boogibugs: has joined #ruby
[14:50:28] _joes__: has joined #ruby
[14:50:48] trosborn: has joined #ruby
[14:50:49] synthroid: has joined #ruby
[14:51:35] nofacade: has joined #ruby
[14:52:57] eurialo: has joined #ruby
[14:54:19] mistermocha: has joined #ruby
[14:54:31] steffkes: has joined #ruby
[14:54:31] steffkes: has joined #ruby
[14:55:07] pawnbox: has joined #ruby
[14:57:00] tvon: has joined #ruby
[14:57:09] tomphp: has joined #ruby
[14:58:23] avenj: has joined #ruby
[14:59:03] gbgdev: has joined #ruby
[14:59:04] Xeago: has joined #ruby
[14:59:30] momomomomo: has joined #ruby
[14:59:43] aegis3121: has joined #ruby
[14:59:47] bricker: has joined #ruby
[15:00:28] nanoz: has joined #ruby
[15:00:43] weemsledeux: has joined #ruby
[15:00:47] pzula: has joined #ruby
[15:00:59] rkazak: has joined #ruby
[15:01:03] krz: has joined #ruby
[15:01:14] mostlybadfly: has joined #ruby
[15:01:52] htmldrum: has joined #ruby
[15:02:58] uglybandersnatch: has joined #ruby
[15:04:41] maner: has joined #ruby
[15:06:17] jenrzzz: has joined #ruby
[15:06:17] crowell: has joined #ruby
[15:06:23] mfb2: has joined #ruby
[15:07:22] tAn: has joined #ruby
[15:08:03] pawnbox: has joined #ruby
[15:08:04] Rubie: has joined #ruby
[15:10:58] tvon: has joined #ruby
[15:11:10] merida: has joined #ruby
[15:11:48] mfb2: has joined #ruby
[15:12:13] zotherstupidguy: has joined #ruby
[15:12:16] pawnbox: has joined #ruby
[15:13:04] x77686d: has joined #ruby
[15:13:50] ItSANgo: has joined #ruby
[15:15:00] fostertheweb: has joined #ruby
[15:16:31] bricker: has joined #ruby
[15:17:08] DmitryBochkarev: has joined #ruby
[15:17:16] andrewvos: has joined #ruby
[15:17:55] dionysus69: has joined #ruby
[15:18:20] digitalcakes: has joined #ruby
[15:18:53] ujjain: hanmac , thanks, values_at is great, sorry, I'm still fairly new
[15:19:02] Linell: has left #ruby: ()
[15:21:02] momomomomo: has joined #ruby
[15:23:03] bleh: has joined #ruby
[15:23:17] bleh: Hey there, I'd like to download all the gems from Rubygems, any magic command ? Thanks
[15:23:59] slawrence00: has joined #ruby
[15:24:49] Xeago: has joined #ruby
[15:24:51] astrobun_: has joined #ruby
[15:26:07] polishdub: has joined #ruby
[15:27:44] Scriptonaut: has joined #ruby
[15:28:27] Scriptonaut: Hey guys, I'm sending a json object that contains a nested array to my rack server with ajax. I end up with a hash, that contains another hash with numbers as the keys (strings). How can I make it give me an actual array?
[15:29:10] Scriptonaut: so, for example, the object that I send is: { layout: my_array }, and on the server side I do: request.params["layout"], and then from there if I want the first row, I do: request.params["layout"]["1"]
[15:29:10] amundj: has joined #ruby
[15:29:19] Scriptonaut: how do I make that: request.params["layout"][0]
[15:29:21] shevy: bleh weird... I have an old snippet here: Gems.gem("") but this no longer seems to work.. or perhaps it never worked. If you can obtain a list of all gems, you can batch-install them
[15:29:54] mallu: has joined #ruby
[15:29:56] shevy: on the commandline it would be "gem list --remote"
[15:32:09] Jackneill: has joined #ruby
[15:32:17] bleh: shevy: I have their name using gem list --remote, how do I batch download them now ? (no need to install, just download)à
[15:32:31] naftilos76: has joined #ruby
[15:32:46] adaedra: why would you do that
[15:33:14] dhollinger: has joined #ruby
[15:33:29] shevy: bleh first you get the name, e. g. split on "\n", then split the array on ' '. now you have an array with names... the command to install a gem would be "gem install NAME_HERE"... not sure what the fetch-only option is hmm
[15:33:48] shevy: bleh ah it is "gem fetch"
[15:33:58] theunraveler: has joined #ruby
[15:34:53] shaman42: has joined #ruby
[15:36:17] n008f4g_: has joined #ruby
[15:36:26] the_drow: Hi, how do I get the value of the nth item in an array or nil instead of an exception?
[15:37:01] tobiasvl: >> a = []; a[0]
[15:37:02] ruby[bot]: tobiasvl: # => nil (https://eval.in/536321)
[15:37:08] b|ackwolf: is there any difference between self.var and @var in initialize method?
[15:37:11] tobiasvl: the_drow: was that what you wanted?
[15:37:54] the_drow: no exception on non-existent items?
[15:38:04] the_drow: That's dangerous.
[15:38:09] the_drow: Good to know. Thanks
[15:38:31] bleh: Thanks shevy ;)
[15:38:35] bleh: has left #ruby: ()
[15:39:02] frustrum: has joined #ruby
[15:39:28] B3rg3lm1r: has joined #ruby
[15:39:32] tobiasvl: the_drow: docs say you should use Array#fetch if you want an IndexError
[15:40:35] tvon_: has joined #ruby
[15:40:43] failshell: has joined #ruby
[15:41:55] the_drow: another reason why I prefer python...
[15:42:57] bricker: has joined #ruby
[15:43:15] adaedra: If you prefer python, go do python.
[15:43:27] the_drow: My day job is ruby currently
[15:43:40] mistermocha: has joined #ruby
[15:45:04] jyaworski_: has joined #ruby
[15:45:22] ivki: has joined #ruby
[15:46:34] shinnya: has joined #ruby
[15:47:19] ivki: Hello, I'm using rake for the installation of the puppetdashboard and I've an issue with a gem.
[15:47:22] blandflakes: has joined #ruby
[15:47:28] ivki: Can anyone help me?
[15:47:50] adaedra: If you tell us more, maybe
[15:48:00] Uber|Dragon: has joined #ruby
[15:48:40] ivki: I have this instruction
[15:48:45] ivki: bundle exec rake secret
[15:49:13] pawnbox: has joined #ruby
[15:49:22] ivki: while executing it, I've this error
[15:49:25] ivki: "rake aborted!
[15:49:25] ivki: There was an error while trying to load the gem 'uglifier'."
[15:49:47] adaedra: did you run `bundle install` before?
[15:49:57] ivki: and the gem 'uglifier' is well specified in the Gemfile
[15:49:59] liquid-silence: has joined #ruby
[15:49:59] liquid-silence: has joined #ruby
[15:50:01] ivki: yes, I did
[15:50:17] adaedra: without errors?
[15:50:59] ivki: the last message was "Bundle complete! 30 Gemfile dependencies, 66 gems now installed.
[15:50:59] ivki: Bundled gems are installed into ./vendor/bundle.
[15:51:23] adaedra: is that the whole error?
[15:51:33] adaedra: well, whole output
[15:51:48] ivki: The whole error is : "rake aborted!
[15:51:48] adaedra: (for secret)
[15:51:48] ivki: There was an error while trying to load the gem 'uglifier'.
[15:52:09] dikaio: has joined #ruby
[15:52:14] ivki: The whole error was:
[15:52:21] ivki: rake aborted!
[15:52:21] ivki: There was an error while trying to load the gem 'uglifier'.
[15:52:35] adaedra: And there's no other output?
[15:52:52] ivki: "/var/lib/gems/1.9.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:81:in `rescue in block (2 levels) in require'"
[15:53:02] ivki: "/var/lib/gems/1.9.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'"
[15:53:09] ivki: "/var/lib/gems/1.9.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'"
[15:53:16] ivki: "/var/lib/gems/1.9.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'"
[15:53:19] adaedra: err, don't paste evrything here
[15:53:51] adaedra: use gist.github.com with all output from the command
[15:53:57] Xeago: has joined #ruby
[15:55:19] ivki: Sorry, here it is https://gist.github.com/anonymous/2a318df6f6127b064178
[15:56:19] Blaguvest: has joined #ruby
[15:56:58] andrewvos: gem uninstall uglifier && bundle install
[15:57:01] bjpenn: has joined #ruby
[15:57:25] decoponio: has joined #ruby
[15:57:59] ivki: andrewvos: I've the same isssue :/
[15:58:26] dikaio: has joined #ruby
[15:58:42] [Butch]: has joined #ruby
[15:59:11] mistermocha: has joined #ruby
[16:00:28] icarus: has joined #ruby
[16:00:39] andrewvos: you sure that's the whole error you pasted?
[16:01:13] ivki: yes, the last line is just "(See full trace by running task with --trace)"
[16:01:20] aufi: has joined #ruby
[16:02:41] ivki: andrewvos: and when I use the option --trace I've this https://gist.github.com/anonymous/7653e3ddb2246e1c5fd0
[16:03:00] amclain: has joined #ruby
[16:04:28] andrewvos: oh so it's a rails app
[16:04:51] andrewvos: https://github.com/sodabrew/puppet-dashboard/blob/master/Gemfile#L27
[16:04:58] andrewvos: that gem is only available in the :assets group
[16:05:35] andrewvos: just run rake secret
[16:05:36] freakcoder: has joined #ruby
[16:05:36] hxegon: has joined #ruby
[16:05:39] andrewvos: should work
[16:07:58] andrewvos: or move uglifer to group :development in Gemfile and `bundle install`
[16:08:12] andrewvos: I think the latter might be the only option
[16:08:37] mary5030: has joined #ruby
[16:08:41] User458764: has joined #ruby
[16:08:47] ivki: runing rake secret is not working, I'm going to test your second idea
[16:09:48] andrewvos: or, and I'm spitballing here: `RAILS_ENV=assets bundle exec rake secret`
[16:09:52] shevy: rake the secret, rake the secret!
[16:10:03] shevy: my precious
[16:10:05] blandflakes: has joined #ruby
[16:10:12] andrewvos: precious install commands
[16:12:50] mistermocha: has joined #ruby
[16:13:12] marxarelli: has joined #ruby
[16:13:39] sepp2k: has joined #ruby
[16:13:59] ivki: tried both, and I've an new error
[16:14:34] tvon: has joined #ruby
[16:14:52] sergey_m_: has joined #ruby
[16:14:52] ivki: the same but with
[16:14:52] ivki: the same as the first one but with the gem execjs
[16:14:53] freakcoder: has joined #ruby
[16:15:00] Xeago: has joined #ruby
[16:15:04] andrewvos: did you try my RAILS_ENV thing above?
[16:15:31] andrewvos: move EVERY gem out of there
[16:15:41] andrewvos: get rid of everything resembling a group in that gemfile
[16:15:44] andrewvos: then bundle install
[16:17:03] andrewvos: oh wait http://stackoverflow.com/questions/7351607/how-is-the-assets-group-in-rails-3-1-handled-by-bundler
[16:17:25] andrewvos: https://github.com/sodabrew/puppet-dashboard/blob/master/config/application.rb#L7
[16:17:31] andrewvos: you shouldn't be seeing this issue
[16:17:37] andrewvos: something is wrong with your bundler
[16:17:59] andrewvos: you're probably using something evil like rvm. Maybe open a new terminal and try rake in there
[16:18:21] andrewvos: or jiggle your ruby version manager
[16:20:29] ivki: already tried
[16:20:34] _djbkd: has joined #ruby
[16:20:45] melter: has joined #ruby
[16:20:52] kies: has joined #ruby
[16:21:07] ivki: thanks for the help anyway
[16:22:29] pietr0: has joined #ruby
[16:25:23] mhoungbo: has joined #ruby
[16:25:34] sandstrom: has joined #ruby
[16:25:54] shevy: weaksauce lookie!!! ^^^ evil! bundler and debian I assume
[16:26:04] boogibugs: has joined #ruby
[16:26:34] adgtl: has joined #ruby
[16:26:34] adgtl: has joined #ruby
[16:28:36] P1ro: has left #ruby: ()
[16:29:20] rasalghul: has joined #ruby
[16:29:47] binaryplease: has joined #ruby
[16:30:04] LoneHerm_: has joined #ruby
[16:31:13] treehug88: has joined #ruby
[16:31:40] skade: has joined #ruby
[16:31:52] boogibugs: Hi, can someone help with a query about how ruby modules work. I dont use it a lot myself but I am using a vagrant repo from github and it keeps giving me 2 errors depending on what i comment out from the .rb file: unintilised Message: NameError: uninitialized constant VagrantPlugins::ProviderVirtualBox::Action::ShareFolders, NameError: uninitialized constant Vagrant::Action::Builtin::NFS. I have installed a vagrant plugin called bindfs which
[16:31:53] boogibugs: should deal with this part but it never works and if i comment out both then the second server doesn't run as it needs shared folders somehow. I have tried searching online and most of the results say install the bindfs plugin which I already had. I have tried asking over in vagrant channel, no answer there.
[16:32:34] stannard: has joined #ruby
[16:32:46] Xeago: has joined #ruby
[16:33:18] chouhoulis: has joined #ruby
[16:33:21] armyriad: has joined #ruby
[16:33:32] shevy: the constant names seem weird
[16:33:34] n008f4g_: has joined #ruby
[16:33:44] shevy: you have a base Vagrant, and a separate VagrantPlugins?
[16:34:36] boogibugs: shevy, thats the issue I am not sure what should or shouldnt work. I ca nfidn some of those mdules i nrb file i nthe repo and then some of them in the /usr/share/vagrant folder but not sur eof difference
[16:35:01] sesquipedalian: has joined #ruby
[16:35:01] sdothum: has joined #ruby
[16:35:31] boogibugs: basically if i comment out those 2 constants the fist machine will build but the second wont as it uses sharedfolders.
[16:35:45] shevy: is your keyboard also broken :P
[16:36:11] shevy: I don't know how vagrant is setup
[16:36:17] Xeago: has joined #ruby
[16:36:48] boogibugs: yeah sorry... dyslexic fingers... :P
[16:36:50] rkazak: has joined #ruby
[16:36:55] shevy: but the error just seems off; Vagrant should be the base namespace right? so it would make no sense to have a second namespace called VagrantPlugins
[16:37:02] shevy: more logical would be Vagrant::Plugins
[16:37:56] djbkd: has joined #ruby
[16:38:21] djbkd: has joined #ruby
[16:38:31] boogibugs: ok maybe i should change the code then...file is here: https://github.com/blueboxgroup/razor-vagrant-lab and the file I am talking about here: https://github.com/blueboxgroup/razor-vagrant-lab/blob/master/lib/lab/vagrant_middleware.rb
[16:39:29] boogibugs: Vagrant:: and VagrantPlugins:: arementioned
[16:40:07] tacit7: has joined #ruby
[16:40:24] shevy: wow that is pretty awful
[16:40:39] krz: has joined #ruby
[16:40:56] rkazak_: has joined #ruby
[16:41:16] Guest38: has joined #ruby
[16:41:48] shevy: the author is not using ruby a lot right?
[16:42:08] boogibugs: well you can tell me that I dont know ruby very well myself
[16:42:27] sneakerhax: has joined #ruby
[16:42:38] fryguy: has joined #ruby
[16:42:58] FooMunki: has joined #ruby
[16:43:05] boogibugs: basically i just want to see how razor works...this has been the best so far most of the repos on github fail to install or are all very old ones
[16:43:12] shevy: I dunno, it just seems so weird
[16:43:50] shevy: a toplevel array constant MIDDLEWARE that gathers some other constant names that are named inconsistently like Vagrant::Action::Builtin::SetHostname and then VagrantPlugins::ProviderVirtualBox::Action::CheckGuestAdditions
[16:44:01] crowell: has joined #ruby
[16:44:10] fryguy: I just upgraded to openssl 1.0.2g and now my ruby builds fail with ossl_ssl.c:137:27: error: ‘SSLv3_method’ undeclared here (not in a function). specifically 2.1.0, but other versions as well. Is there a known patch around for compiling against the latest openssl?
[16:44:54] ascarter: has joined #ruby
[16:45:19] boogibugs: shevy, so are those valid or not or just bad coding?
[16:45:33] shevy: the ultimate authority over the validity of code is the ruby parser
[16:45:54] Macaveli: has joined #ruby
[16:46:06] fmcgeough: has joined #ruby
[16:47:15] shevy: boogibugs from your error, let's ignore Vagrant for a moment, a given .rb file (if you can call/use it) should specify all its required dependencies, by pulling in the respective files at hand
[16:47:18] boogibugs: shevy, package name ruby-lint or something along those lies?
[16:47:33] symm-: has joined #ruby
[16:48:00] shevy: you can get an uninitialized constant error only if you did not define that constant before; in the context of vagrant, you must not have loaded/required the file where these constants are defined
[16:48:52] shevy: I don't know where these files are defined... does vagrant not tell you how to load addons? I could not imagine that you could get an error like you showed above if you would pull in the required files/constants in these files
[16:49:18] zworks: has joined #ruby
[16:49:37] tomchapin: has joined #ruby
[16:50:39] d0nn1e: has joined #ruby
[16:50:42] dionysus69: has joined #ruby
[16:50:58] boogibugs: shevy, I think its down to having vagrant plugins installed, all the ones mentioned in the git repo readme, i have installed
[16:51:06] zworks: I wrote a script in ruby with nokogiri to extract data from a website, but the process gets killed at the middle due to memory shortage
[16:51:50] emesa: has joined #ruby
[16:51:59] frustrum: has joined #ruby
[16:52:03] zworks: if i use functions to do the process , will the objects inside the functions will be freed at the end of the function ?
[16:52:10] shevy: zworks do you have the code?
[16:52:20] zworks: shevy: yep
[16:52:32] baweaver: has joined #ruby
[16:53:14] havenwood: fryguy: Always use the latest TEENY version of Ruby for whatever MAJOR.MINOR you're on.
[16:53:20] zworks: shevy: https://gist.github.com/haswow/088cc60294234c5eb07f
[16:53:47] boogibugs: all the vbox ruby files i can find are here: /usr/share/vagrant/plugins/providers/virtualbox/
[16:53:48] nettoweb: has joined #ruby
[16:53:52] havenwood: fryguy: So 2.1.8 in the case of Ruby 2.1.
[16:54:18] havenwood: fryguy: Any Ruby that came out after that OpenSSL will do, but use the latest anyways.
[16:54:20] djbkd: has joined #ruby
[16:54:54] shevy: boogibugs no real idea how vagrant loads up these files sorry
[16:55:34] frustrum: has joined #ruby
[16:55:59] shevy: zworks hmm something must hog up memory in your code
[16:56:01] jottr: has joined #ruby
[16:56:11] nettoweb: has joined #ruby
[16:57:27] chipotle: has joined #ruby
[16:58:01] helpa: has joined #ruby
[16:58:05] norc-2: has joined #ruby
[16:58:20] boogibugs: shevy, ok thanks for your time.
[16:58:33] havenwood: zworks: You can see how many times garbage has been collected with `GC.count` or trigger a collection yourself with `GC.start` to increment the count.
[16:58:52] frustrum: has joined #ruby
[16:59:06] kies: has joined #ruby
[16:59:10] mjuszczak: has joined #ruby
[16:59:11] Xeago: has joined #ruby
[16:59:14] havenwood: zworks: Or look at the count of objects and such with ObjectSpace.
[16:59:15] xaxisx: has joined #ruby
[16:59:43] mjuszczak: has joined #ruby
[17:00:05] boogibugs: how about a ruby parser tool i can use on this code to check sanity or it?
[17:00:06] zworks: havenwood: where i can put that code?
[17:00:26] gbgdev: has joined #ruby
[17:01:01] havenwood: zworks: In your REPL. Put `require 'pry'` in a file then at the part you're curious about put a `binding.pry`. It'll jump out to the REPL, where you can look at the GC and ObjectSpace.
[17:01:11] havenwood: ?pry zworks
[17:01:11] ruby[bot]: zworks: Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
[17:01:27] freakcoder: has joined #ruby
[17:02:20] havenwood: boogibugs: https://github.com/bbatsov/rubocop#readme
[17:02:26] htmldrum: has joined #ruby
[17:03:16] nando293921: has joined #ruby
[17:03:36] boogibugs: havenwood, ty
[17:03:40] treehug88: has joined #ruby
[17:04:02] juanca_: has joined #ruby
[17:04:26] tAn: has joined #ruby
[17:04:43] frustrum: has joined #ruby
[17:04:58] adgtl: has joined #ruby
[17:05:17] frustrum: has joined #ruby
[17:05:23] chipotle: has joined #ruby
[17:06:55] boogibugs: I guess this is not good: 8 files inspected, 191 offenses detected
[17:07:15] frustrum: has joined #ruby
[17:07:24] sandstrom: has joined #ruby
[17:08:17] frustrum: has joined #ruby
[17:08:20] diegoviola: has joined #ruby
[17:08:21] jenrzzz: has joined #ruby
[17:08:57] crime: has joined #ruby
[17:09:40] frustrum: has joined #ruby
[17:10:16] FooMunki: has joined #ruby
[17:11:03] mdw: has joined #ruby
[17:12:34] shevy: most of these offenses will be very minor and harmless
[17:13:11] shevy: you could copy the code to another directory, then run rubocop with the --autocorrect functionality
[17:13:25] shevy: sorry, --auto-correct
[17:13:28] Papierkorb: git add --patch ftw
[17:15:04] elico1: has joined #ruby
[17:15:22] mikar: has joined #ruby
[17:15:52] crime: has joined #ruby
[17:16:02] crime: `gem search ""`.split("\n").each {|line| `gem fetch #{line.split(' ')[0]}}
[17:16:06] baweaver: has joined #ruby
[17:16:06] crime: that should do it
[17:16:54] toretore: has joined #ruby
[17:16:56] baweaver: has joined #ruby
[17:16:58] dionysus69: has joined #ruby
[17:17:31] ascarter: has joined #ruby
[17:18:13] djbkd: has joined #ruby
[17:19:25] gbgdev: has joined #ruby
[17:23:30] nw: has joined #ruby
[17:23:40] zotherstupidguy: has joined #ruby
[17:24:42] nixmaniack: has joined #ruby
[17:27:46] SCHAAP137: has joined #ruby
[17:28:18] cuckingfunt: has joined #ruby
[17:28:32] trosborn: has joined #ruby
[17:28:49] platzhirsch: has left #ruby: ()
[17:28:58] User458764: has joined #ruby
[17:31:11] Macaveli: has joined #ruby
[17:31:23] failshell: has joined #ruby
[17:32:27] govg: has joined #ruby
[17:32:28] shaman42: has joined #ruby
[17:38:26] TvL2386: has joined #ruby
[17:38:38] nofxx: has joined #ruby
[17:38:38] nofxx: has joined #ruby
[17:38:49] baweaver: has joined #ruby
[17:40:15] drale2k: has joined #ruby
[17:40:32] davedev24: has joined #ruby
[17:41:05] systemsgotyou: has joined #ruby
[17:41:24] sandstrom: has joined #ruby
[17:41:50] chouhoulis: has joined #ruby
[17:42:42] babblebre: has joined #ruby
[17:42:49] ariel_17: has left #ruby: ("WeeChat 1.1.1")
[17:44:21] crime: has joined #ruby
[17:46:50] sucks: has joined #ruby
[17:50:10] RegulationD: has joined #ruby
[17:51:01] pawnbox: has joined #ruby
[17:53:12] aclearman037: has joined #ruby
[17:55:15] B3rg3lm1r: has joined #ruby
[17:55:23] adgtl: has joined #ruby
[17:56:14] pawnbox: has joined #ruby
[17:57:17] DmitryBochkarev: has joined #ruby
[17:57:37] but3k4: has joined #ruby
[17:57:54] silverdust: has joined #ruby
[17:58:46] frustrum: has joined #ruby
[17:59:21] trinaldi: has joined #ruby
[17:59:25] gmas: has joined #ruby
[18:02:50] jackjackdripper: has joined #ruby
[18:03:48] mclee: has joined #ruby
[18:04:06] akae: has joined #ruby
[18:04:17] freerobby: has joined #ruby
[18:05:36] j2k: has joined #ruby
[18:05:46] bjpenn: has joined #ruby
[18:06:26] jackjackdripper: has joined #ruby
[18:06:56] firstdayonthejob: has joined #ruby
[18:08:00] DoubleMalt: has joined #ruby
[18:08:12] mdw: has joined #ruby
[18:09:54] TvL2386: has joined #ruby
[18:10:06] _blizzy_: has joined #ruby
[18:10:13] joonty: has joined #ruby
[18:10:17] pawnbox: has joined #ruby
[18:10:23] fexilal: has joined #ruby
[18:11:01] baweaver: has joined #ruby
[18:12:09] ascarter: has joined #ruby
[18:13:46] rmulligan: has joined #ruby
[18:14:23] isene: has joined #ruby
[18:16:06] jinie: has joined #ruby
[18:17:47] darkf: has joined #ruby
[18:18:20] LoneHermit: has joined #ruby
[18:19:31] yosafbridge: has joined #ruby
[18:19:45] Ishido: has joined #ruby
[18:20:20] merida: has joined #ruby
[18:20:29] mdw7: has joined #ruby
[18:20:39] jrafanie: has joined #ruby
[18:21:06] postmodern: has joined #ruby
[18:22:06] B3rg3lm1r: has joined #ruby
[18:22:09] matp: has joined #ruby
[18:23:54] ascarter: has joined #ruby
[18:23:59] wldcordeiro: has joined #ruby
[18:24:26] tenlittleniggreb: has joined #ruby
[18:25:55] ascarter_: has joined #ruby
[18:25:58] arlek_: has joined #ruby
[18:26:38] momomomomo: has joined #ruby
[18:27:11] davedev24: has joined #ruby
[18:27:12] icarus: has joined #ruby
[18:28:33] elifoster: has joined #ruby
[18:32:57] avahey: has joined #ruby
[18:33:07] govg: has joined #ruby
[18:36:17] govg: has joined #ruby
[18:36:26] Shaboum: has joined #ruby
[18:36:36] gregf: has joined #ruby
[18:36:37] pawnbox: has joined #ruby
[18:38:10] last_staff: has joined #ruby
[18:38:20] pawnbox: has joined #ruby
[18:38:33] avenj: has joined #ruby
[18:39:31] Ishido: has joined #ruby
[18:40:39] B3rg3lm1r: has joined #ruby
[18:41:49] tacit7: has joined #ruby
[18:41:58] tvon: has joined #ruby
[18:43:47] poerror: has joined #ruby
[18:44:35] nofxx: has joined #ruby
[18:45:55] govg: has joined #ruby
[18:46:08] jottr_: has joined #ruby
[18:48:08] govg: has joined #ruby
[18:49:29] intrigueD: has joined #ruby
[18:51:36] Prominent: has joined #ruby
[18:52:19] arlek_: has joined #ruby
[18:53:07] shakes: has joined #ruby
[18:53:40] baweaver: has joined #ruby
[18:53:44] poerror: has joined #ruby
[18:54:13] govg: has joined #ruby
[18:54:37] jottr: has joined #ruby
[18:57:07] fryguy: has left #ruby: ()
[19:00:06] B3rg3lm1r: has joined #ruby
[19:02:34] evie_hammond: has joined #ruby
[19:04:50] uglybandersnatch: has joined #ruby
[19:05:25] edwinvdgraaf: has joined #ruby
[19:06:59] troulouliou_dev: has joined #ruby
[19:08:13] User458764: has joined #ruby
[19:08:33] alexherbo2: How capture stdout of system command?
[19:09:07] shevy: alexherbo2 popen
[19:09:07] alexherbo2: (I need a TTY to run my editor in the terminal)
[19:09:21] adaedra: multiple ways
[19:09:22] jenrzzz: has joined #ruby
[19:09:36] alexherbo2: shevy: I will look at thanks
[19:09:52] adaedra: You have popen, you have IO.open
[19:10:40] merqlove: has joined #ruby
[19:10:46] B3rg3lm1r: has joined #ruby
[19:10:46] shevy: also result = `ls` and result = `ls 2>&1`
[19:11:03] endash: has joined #ruby
[19:11:10] sepp2k: has joined #ruby
[19:11:30] ascarter: has joined #ruby
[19:11:43] alexherbo2: shevy: `` will no work I need stdout as a tty
[19:11:59] Felix444: has joined #ruby
[19:12:14] joonty: has joined #ruby
[19:12:17] adaedra: ah, this is completely different here
[19:12:45] adaedra: alexherbo2: what are your trying to do here?
[19:15:08] shevy: he is up to no good!
[19:15:15] Prominent: has joined #ruby
[19:15:23] alexherbo2: adaedra: a file editor which reads on stdin.
[19:15:49] adaedra: alexherbo2: but why do you need to capture the output? What will you do with this output?
[19:16:04] alexherbo2: find . | fe sed s/' '/_/g
[19:16:26] alexherbo2: rename all files with space by _
[19:17:06] alexherbo2: `fe` run sed which reads stdin, i need capture its output
[19:17:24] pawnbox: has joined #ruby
[19:17:29] alexherbo2: I would `fe` works interactively too
[19:17:33] alexherbo2: with my editor
[19:17:40] alexherbo2: find . | fe kak
[19:18:07] alexherbo2: Kakoune can read on stdin and output to stdout juste like sed
[19:18:26] tomphp: has joined #ruby
[19:18:40] adaedra: I don't see where the editor comes to play here
[19:18:54] alexherbo2: `kak` it the editor
[19:18:54] endash: Is there a way to skip ahead with a lazy enumerator? Lazy::Enumerator#drop still calculates the value before throwing it away, which is potentially very expensive
[19:19:09] KnownSyntax: has joined #ruby
[19:19:11] KnownSyntax: has joined #ruby
[19:19:25] adaedra: endash: that would go against Enumerator
[19:19:31] alexherbo2: it works with: system "kak"
[19:19:40] alexherbo2: but not with `kak`
[19:19:51] sesquipedalian: has joined #ruby
[19:20:01] adaedra: because in the first, you don't capture output, so it uses ruby's output, which is your current terminal
[19:20:34] alexherbo2: How deal with that?
[19:20:39] govg: has joined #ruby
[19:21:03] adaedra: I'm still not sure what you're trying to do, sorry
[19:21:26] adaedra: you have an editor which takes some input?
[19:21:58] adaedra: or are you trying to create a command which takes input and inject it into your editor?
[19:22:29] baweaver: has joined #ruby
[19:22:36] alexherbo2: not sure to understand xD
[19:22:46] alexherbo2: I want simply do
[19:23:01] Ishido: has joined #ruby
[19:23:02] alexherbo2: find . | fe kak
[19:23:07] alexherbo2: kak reads stdin
[19:23:25] alexherbo2: `fe` is the script I try to write
[19:23:56] adaedra: if kak reads stdin, why not just do `find . | kak` ?
[19:23:57] alexherbo2: kak reads stdin in a buffer
[19:24:04] alexherbo2: then when :write
[19:24:25] platzhirsch: has joined #ruby
[19:24:27] alexherbo2: I want capture kak output
[19:24:28] SenpaiSilver: has joined #ruby
[19:24:33] adaedra: all output?
[19:24:54] krz: has joined #ruby
[19:25:07] adaedra: to do what with it? You realize that output will be pretty messed up if your program is a full featured editor like vim is?
[19:25:07] finisherr: I have a method with a yield statement in the center. Serves as kind of a sandwich. Is there any way for me to get the variables in the method to get passed to the block scope of the yield?
[19:25:33] adaedra: finisherr: try self.instance_exec &block
[19:25:40] alexherbo2: adaedra: https://github.com/mawww/kakoune
[19:25:42] adaedra: (you'll have to name your proc parameter)
[19:26:05] finisherr: Thanks for the tip
[19:26:05] anisha: has joined #ruby
[19:26:15] reaVer: has joined #ruby
[19:26:16] alexherbo2: adaedra: I do not realise no :(
[19:26:16] tubbo: haha is that ascii clippy?
[19:26:21] tubbo: hilarious
[19:26:38] adaedra: alexherbo2: yep, output will be rather messed up and unusable directly, as it will contain terminal control sequences
[19:26:52] poerror: has joined #ruby
[19:26:57] intrigueD: has joined #ruby
[19:27:02] alexherbo2: I could use a tempfile but I want avoid :/
[19:27:23] tubbo: this dude made a whole new editor just so he could use clippy in vim?
[19:27:27] jrafanie: has joined #ruby
[19:27:41] adaedra: alexherbo2: just to see what you'll end with, run `script /tmp/out kak`, do some edits in your editor, quit it, and open /tmp/out.
[19:27:59] alexherbo2: tubbo: Kakoune is not a Vim clone
[19:29:17] tomphp: has joined #ruby
[19:29:31] adaedra: (yes, btw, the `script` command seems to be exactly what you're trying to achieve, if I understood correctly)
[19:29:33] Mon_Ouie: has joined #ruby
[19:29:46] alexherbo2: adaedra: yes
[19:30:04] adaedra: yes to what
[19:30:22] alexherbo2: `script` to capture its output
[19:30:38] adaedra: so what `script` does is what you're trying to do?
[19:30:38] alexherbo2: I would like kak could be used interactively :/
[19:31:41] adgtl_: has joined #ruby
[19:33:27] wzy: has joined #ruby
[19:35:53] alexherbo2: find . | fe kak
[19:35:56] adaedra: alexherbo2: otherwise, if your goal is just to create a buffer in your editor with stdin as source, you can (at least for vim) use - as filename, i.e. `ls | vim -`
[19:35:59] trosborn: has joined #ruby
[19:36:06] alexherbo2: start: https://gist.github.com/alexherbo2/2044e06aba2cb8b00c86
[19:36:16] alexherbo2: end: https://gist.github.com/alexherbo2/7d1ffacdcbfa06b109d2
[19:36:28] alexherbo2: runned commands: https://gist.github.com/alexherbo2/41e719835b79bd20b44b
[19:37:42] hxegon: has joined #ruby
[19:38:07] davedev24: has joined #ruby
[19:38:55] graffix: has joined #ruby
[19:39:01] adaedra: oooooooookay
[19:39:36] alexherbo2: I would like to use as well non interactive commands like sed as filter, than my favorite editor
[19:39:38] shevy: is this madness
[19:40:13] adaedra: alexherbo2: so your goal is to create a tool that runs commands on files given as stdin?
[19:40:32] spider-mario: has joined #ruby
[19:40:32] alexherbo2: give stdin to my command
[19:40:38] graffix: has left #ruby: ()
[19:40:42] alexherbo2: capure its output
[19:40:54] alexherbo2: then rename/delete/link files
[19:41:04] alexherbo2: by default it renames
[19:41:05] adaedra: so your editor is a step where you'll make edits in your file?
[19:41:14] alexherbo2: but you can add directives like [link]
[19:41:50] Hammy_Work: has joined #ruby
[19:42:00] adaedra: ah, I think I get it
[19:42:12] alexherbo2: like with git rebase --interactive there is drop, etc. directives
[19:42:37] ascarter: has joined #ruby
[19:42:57] adaedra: do like git, hg, sudo and other tools using $EDITOR do: save input to a tempfile, run the editor on this file, read tempfile
[19:43:00] alexherbo2: it would be so cool for mass renaming @_@
[19:43:19] reaVer: has joined #ruby
[19:43:25] jaruga: has joined #ruby
[19:43:28] alexherbo2: adaedra: impossible otherwise?
[19:43:29] juanfra: has joined #ruby
[19:43:53] adaedra: alexherbo2: did you try running your editor in `script` like I told you to see what "output" you'd have?
[19:44:22] adaedra: and is the output usable according to you?
[19:44:25] alexherbo2: > stdout is not a tty
[19:44:34] adaedra: what did you run?
[19:44:56] adaedra: run, in your terminal, the following command: script /tmp/out kak
[19:45:06] adaedra: then, in your terminal, write a small file, and quit it
[19:45:12] adaedra: then, open the /tmp/out file
[19:45:39] adaedra: > then, in your terminal, write a small file, and quit it – in your editor*
[19:45:45] adaedra: no output?
[19:45:58] alexherbo2: it’s empty
[19:46:12] adaedra: i'll do one myself
[19:48:42] adaedra: alexherbo2: here, I made a file like in your gist, opened it in vim, made the edits you described, closed it, and recorded all output through script, here is the result: https://gist.github.com/adaedra/194e1f0e7d95f004dd18
[19:49:18] Guest34101: has joined #ruby
[19:49:21] adaedra: (mh, gist removed the '\e's tho)
[19:50:48] adaedra: seriously, the tmpfile solution with a simple `system 'kak'` is the most sensible, easier, and widespread solution. Interpreting terminal output is pure madness, and there's already so many reasons why it would be wrong without looking for them
[19:50:58] ascarter: has joined #ruby
[19:51:09] adaedra: git does it, hg does it, sudo does it
[19:51:55] Silox|: has joined #ruby
[19:52:46] alexherbo2: I will do then
[19:52:55] alexherbo2: Thanks for all your help :)
[19:55:07] blandflakes: has joined #ruby
[19:57:12] codecop: has joined #ruby
[19:57:17] codecop_: has joined #ruby
[19:58:29] roshanavand: has joined #ruby
[19:58:54] d0nn1e: has joined #ruby
[19:59:13] cdg: has joined #ruby
[19:59:33] alexherbo2: Hey guys, how about this sprintf / _%_ builtin to handle alignment?
[19:59:36] alexherbo2: https://gist.github.com/alexherbo2/c246f85c633602a8436e
[20:00:08] kobain: has joined #ruby
[20:00:59] alexherbo2: Currently sprintf can take string or hash, I added Array support
[20:01:59] adaedra: don't reimplement stdlib methods
[20:02:12] adaedra: secondly, what do you mean by "adding array support"
[20:02:23] alexherbo2: print "# %{filename } |%{ line}│%{ column}| %{text}\n" % [{filename:"foo.txt", line:"91", column:"1", text:"foo"}, {filename:"foo-bar.txt", line:"1991", column:"1", text:"foo bar"}]
[20:02:36] alexherbo2: # foo.txt | 91│1| foo
[20:02:38] alexherbo2: # foo-bar.txt |1991│1| foo bar
[20:02:45] bjpenn: has joined #ruby
[20:03:26] sandstrom: has joined #ruby
[20:03:40] poerror: has joined #ruby
[20:03:47] adaedra: doing `.each { |e| print "..." % e }` was too mainstream, I guess
[20:03:55] fostertheweb: has joined #ruby
[20:03:58] norc-2: has joined #ruby
[20:03:58] Guest38: has joined #ruby
[20:05:10] alexherbo2: adaedra: does not handle alignment
[20:06:10] zeroDivisible: has joined #ruby
[20:06:23] LoneHerm_: has joined #ruby
[20:06:50] jenrzzz: has joined #ruby
[20:06:58] blandflakes: has joined #ruby
[20:07:29] alexherbo2: %{var} you can puts space for padding
[20:08:15] alexherbo2: I used it to build text interface
[20:08:29] alexherbo2: https://github.com/alexherbo2/dotfiles/blob/master/bin/interface
[20:08:36] ur5us: has joined #ruby
[20:08:38] adaedra: I'm sure there's a gem doing that already, but that's not really an argument
[20:08:43] alexherbo2: http://i.imgur.com/UN0c0I5.png
[20:08:49] adaedra: But yeah, don't reimplement stdlib/core methods
[20:09:23] adaedra: We already have enough of ActiveSupport messing with core classes
[20:09:57] alexherbo2: and for scan? to handle named captures?
[20:09:59] govg: has joined #ruby
[20:10:16] alexherbo2: also, tap method is not functional :/
[20:10:41] alexherbo2: string.scan → https://gist.github.com/alexherbo2/5f080fb4015289188464
[20:10:48] futilegames: has joined #ruby
[20:10:59] alexherbo2: enumerable.hash_map → https://gist.github.com/alexherbo2/c920e04277f6dd8d589a
[20:11:08] alexherbo2: object.as → https://gist.github.com/alexherbo2/5dbb6ddf624d2aa8698a
[20:11:13] davedev24: has joined #ruby
[20:11:16] alexherbo2: I would like them in core :(
[20:11:21] moeabdol: has joined #ruby
[20:11:41] Ishido: has joined #ruby
[20:12:53] hxegon: has joined #ruby
[20:13:12] poerror: has joined #ruby
[20:13:48] ascarter: has joined #ruby
[20:14:15] solocshaw: has joined #ruby
[20:14:21] shevy: nobody needs these :)
[20:14:43] shevy: but you can modify everything in ruby!
[20:16:30] tomphp: has joined #ruby
[20:16:52] devbug: has joined #ruby
[20:18:45] bjpenn: has joined #ruby
[20:22:26] SegFaultAX: alexherbo2: #to_h is already defined for Array
[20:22:50] dikaio: has joined #ruby
[20:22:53] nando293921: has joined #ruby
[20:23:47] alexherbo2: It is recent?
[20:24:06] Uber|Dragon: has joined #ruby
[20:24:27] yqt: has joined #ruby
[20:24:33] alexherbo2: Thanks for the tips :D
[20:25:04] wldcordeiro: has joined #ruby
[20:26:05] askhat: has joined #ruby
[20:26:26] tomphp: has joined #ruby
[20:26:38] jaiks: has joined #ruby
[20:26:49] SegFaultAX: Sure thing. I guess it's worth also noting that you can use this fact to make a hash meaningfully mappable: {a: 1, b: 2}.map { |k, v| [k.to_s, v] }.to_h
[20:26:59] SegFaultAX: There might even already be a nicer form for that.
[20:27:40] arlek: has joined #ruby
[20:28:02] alexherbo2: and for Object#tap?
[20:28:08] alexherbo2: is there a functional equivalent?
[20:28:25] binaryplease: has joined #ruby
[20:29:20] baweaver: has joined #ruby
[20:29:33] SegFaultAX: What do you mean?
[20:29:43] askhat: Hey crew. Lets say I have a hash `{foo: {bar: 'hello'}}` and a string var = 'bar', so is it possible somehow to make kinda interpolation like `foo.#{var}` to get the 'hello'?
[20:30:16] SegFaultAX: askhat: h[:foo][var]
[20:30:28] SegFaultAX: askhat: h[:foo][var.to_sym] I guess
[20:31:18] askhat: SegFaultAX much obliged, I'm obviously a newbie =)
[20:31:40] baweaver: http://ruby-doc.org/core-2.3.0_preview1/Hash.html#method-i-dig
[20:31:41] Hammy_Work: has joined #ruby
[20:31:57] adaedra: alexherbo2: #tap is totally functional
[20:32:04] baweaver: though the other one is equally valid
[20:32:28] baweaver: technically tap is the K-Combinator, so more of combinatorics but that's being pedantic.
[20:33:04] adaedra: baweaver: :p
[20:33:06] SegFaultAX: Except the part where #tap isn't a combinator, I agree.
[20:33:11] Hammy_Work: has joined #ruby
[20:33:21] PedramT: has joined #ruby
[20:33:40] tvon: has joined #ruby
[20:34:28] brg: has joined #ruby
[20:34:43] bjpenn: has joined #ruby
[20:36:47] Cohedrin: has joined #ruby
[20:37:09] hxegon: has joined #ruby
[20:37:59] Cohedrin: has joined #ruby
[20:38:19] Devalo: has joined #ruby
[20:39:35] jenrzzz: has joined #ruby
[20:40:31] tvon: has joined #ruby
[20:43:22] dopie: has joined #ruby
[20:43:57] mallu: has joined #ruby
[20:44:36] mistermo_: has joined #ruby
[20:45:03] dnewkerk: has joined #ruby
[20:46:41] momomomomo: has joined #ruby
[20:46:50] nettoweb: has joined #ruby
[20:47:23] tAn: has joined #ruby
[20:47:39] symm-: has joined #ruby
[20:49:41] platzhirsch: has left #ruby: ()
[20:49:55] Don_John: has joined #ruby
[20:50:42] bjpenn: has joined #ruby
[20:51:31] RegulationD: has joined #ruby
[20:51:35] rht: has joined #ruby
[20:54:28] lemur: has joined #ruby
[20:56:33] htmldrum: has joined #ruby
[20:56:49] mistermocha: has joined #ruby
[20:56:57] mistermo_: has joined #ruby
[20:58:03] Don_John: has joined #ruby
[20:58:28] jkahn: has joined #ruby
[20:58:32] rht: has joined #ruby
[20:58:33] joonty: has joined #ruby
[20:59:17] atmosx: has joined #ruby
[21:00:24] n008f4g_: has joined #ruby
[21:00:43] tAn: has joined #ruby
[21:02:16] rht: has joined #ruby
[21:03:13] Don_John: has joined #ruby
[21:03:16] blandflakes: has joined #ruby
[21:04:47] BtcBen: has joined #ruby
[21:06:15] skade: has joined #ruby
[21:06:47] bjpenn: has joined #ruby
[21:06:49] dikaio: has joined #ruby
[21:06:57] mistermocha: has joined #ruby
[21:12:05] RobertBirnie: has joined #ruby
[21:13:00] tAn: has joined #ruby
[21:13:36] ascarter: has joined #ruby
[21:14:34] Xeago: has joined #ruby
[21:15:45] bjpenn: has joined #ruby
[21:17:37] chipotle: has joined #ruby
[21:17:38] symm-: has joined #ruby
[21:18:34] arup_r: has joined #ruby
[21:19:38] naftilos76: has joined #ruby
[21:20:02] choke: has joined #ruby
[21:20:38] rcvalle: has joined #ruby
[21:21:03] FooMunki: has joined #ruby
[21:21:34] symm-: has joined #ruby
[21:23:00] gbgdev: has joined #ruby
[21:23:12] mistermocha: has joined #ruby
[21:23:39] rmulliga`: has joined #ruby
[21:24:28] tvon: has joined #ruby
[21:24:35] tvon: has joined #ruby
[21:25:33] blandflakes: has joined #ruby
[21:27:17] fostertheweb: has joined #ruby
[21:29:12] mhoungbo: has joined #ruby
[21:29:57] nettoweb: has joined #ruby
[21:31:11] baweaver: has joined #ruby
[21:32:44] scion: has joined #ruby
[21:32:46] scion: hi, quick question
[21:34:04] Guest54394: how come ruby is so shitty compared to javascript?
[21:34:09] Radar: !ban Guest54394
[21:34:09] ruby[bot]: +bb Guest54394!*@*$#ruby-banned *!*@gateway/web/freenode/ip.2.28.88.157$#ruby-banned
[21:34:09] ruby[bot]: ruby[bot] kicked Guest54394: offense, see http://ruby-community.com/pages/user_rules
[21:34:34] hxegon: has joined #ruby
[21:34:49] blandflakes: has joined #ruby
[21:35:45] Radar: TBH though I've asked the reverse of that question.
[21:35:47] bjpenn_: has joined #ruby
[21:36:18] pawnbox: has joined #ruby
[21:36:35] adaedra: how come trolls are so unoriginal?
[21:36:41] dikaio: has joined #ruby
[21:36:46] swills: has joined #ruby
[21:37:08] Radar: http://ryanbigg.com/the-chronicles-of-narley/ I miss Narley
[21:37:35] adaedra: “Still hasn’t”
[21:37:42] Radar: patches welcome
[21:39:13] adaedra: It's raining popcorn.
[21:40:00] mostlybadfly: has joined #ruby
[21:40:19] aegis3121: has joined #ruby
[21:40:23] uglybandersnatch: has joined #ruby
[21:41:21] aegis3121: So I've run into something that really breaks least surprise for me. Can anyone explain it?
[21:41:26] ruby[bot]: aegis3121: # => "ab" (https://eval.in/536428)
[21:41:44] aegis3121: I would expect that to give...some form of error or something, not concatenate them together.
[21:41:51] adaedra: C style strings.
[21:42:07] adaedra: so you can write your string on multiple lines, as one litteral.
[21:42:18] adaedra: a = 'my very' \
[21:42:21] adaedra: 'long string'
[21:42:33] freakcoder: has joined #ruby
[21:42:54] Coldblackice: has joined #ruby
[21:44:32] aegis3121: Was a bit unexpected, and also never realized that's why 'blah' / 'something else' worked.
[21:45:44] adaedra: If you don't know about it, you can't know about it.
[21:45:51] Azure: has joined #ruby
[21:46:58] boontdustie: has joined #ruby
[21:47:13] devbug: has joined #ruby
[21:47:15] aegis3121: Fair enough. I'd worked with C, but also never ran into that syntax.
[21:47:55] Mendenhall: has joined #ruby
[21:49:25] Mendenhall: ok, I have a question! https://gist.github.com/D-Vaillant/d2e5e496e142fa231750
[21:49:34] Mendenhall: Is there a better way of writing that piece of code?
[21:50:06] adaedra: giving it a .rb extension in gist to have syntax coloring, for starters.
[21:50:20] Mendenhall: oh my bad yeah
[21:50:33] Mendenhall: it's also out of context. that might be a pain
[21:50:51] drbrain: Mendenhall: save_hash = Hash.new { |h, order_number| h[order_number] = {} }
[21:51:06] drbrain: Mendenhall: then you don't need the if and can use only line 4
[21:51:23] adaedra: drbrain: given the fact the object responds to empty?, I suspect there's already a {} in h[...]
[21:51:29] aegis3121: Or I'd do save_hash[save_loc] ||= {}
[21:51:41] aegis3121: save_hash[save_loc][order['thing']] = hash_to_row
[21:51:55] aegis3121: Make sure you have an empty hash if it wasn't already there, then set your key equal to what you want inside of it.
[21:52:10] drbrain: adaedra: good point
[21:52:32] adaedra: Mendenhall: what are the possible values for `save_hash[save_loc]`?
[21:52:33] Mendenhall: yeah i was initializing save_hash as Hash.new({})
[21:52:45] drbrain: oh ↑ will not do what you think
[21:53:02] drbrain: you want my save_hash =
[21:53:12] nerium: has joined #ruby
[21:53:15] adaedra: Hash.new { |h, k| h[k] = {} } # may be what you want
[21:53:43] drbrain: >> h = Hash.new({}); h[1][2] = 3; h[2][3] = 4; h
[21:53:44] ruby[bot]: drbrain: # => {} (https://eval.in/536432)
[21:54:06] Mendenhall: im gonna have to look up what that translates into exactly but it makes sense. im not good with blocks atm
[21:54:17] adaedra: &ri Hash#initialize
[21:54:17] `derpy: No results
[21:54:32] drbrain: &ri Hash.new
[21:54:32] `derpy: http://ruby-doc.org/core-2.3.0/Hash.html#method-c-new
[21:54:44] LoneHermit: has joined #ruby
[21:54:49] Mendenhall: ok yeah that seems to be correct
[21:54:52] adaedra: thanks, drbrain.
[21:55:19] adaedra: The example of the doc is good to understand what's happening.
[21:55:32] Mendenhall: i think i get it
[21:55:56] Mendenhall: the block gives a "rule" for creating new key-value pairs right?
[21:56:07] `tim`: has joined #ruby
[21:56:17] Mendenhall: very cool, thanks
[21:56:19] chipotle: has joined #ruby
[21:56:47] drbrain: Hash.new({}) returns the same Hash every time, and doesn't assign it
[21:57:14] drbrain: >> h = Hash.new(""); h[1] << "a"; h[2] << "b"; h[3]
[21:57:15] ruby[bot]: drbrain: # => "ab" (https://eval.in/536433)
[21:57:29] moos3: has joined #ruby
[21:57:40] drbrain: since it's shared, you end up with everything in one Hash (or String, above ↑)
[21:57:59] dikaio: has joined #ruby
[21:58:03] moeabdol1: has joined #ruby
[21:58:05] preyalone: has joined #ruby
[21:58:10] Mendenhall: it's because the hash is initialized at the object's definition right?
[21:58:15] blackmesa: has joined #ruby
[21:58:21] Mendenhall: python has a similar thing with mutable keyword arguments
[21:58:32] Mendenhall: good to know, thanks drbrain
[21:58:56] drbrain: Hash.new with a default value is good for use with numbers or a symbol, not much else
[21:59:13] SegFaultAX: Immutable values.
[21:59:24] mistermocha: has joined #ruby
[22:00:13] mistermocha: has joined #ruby
[22:01:07] mdw: has joined #ruby
[22:01:29] poguez_: has joined #ruby
[22:01:40] graffix: has joined #ruby
[22:01:54] baweaver: has joined #ruby
[22:04:32] dukedave__: has joined #ruby
[22:05:27] DukeDave: has joined #ruby
[22:05:39] ni291187: has joined #ruby
[22:06:51] ni291187: has left #ruby: ()
[22:09:14] devbug: has joined #ruby
[22:09:58] dikaio: has joined #ruby
[22:11:57] tomphp: has joined #ruby
[22:16:16] pawnbox: has joined #ruby
[22:17:25] Mattx: has joined #ruby
[22:17:52] baweaver: has joined #ruby
[22:18:15] Mattx: How would you calculate the diff between two arrays, keeping an element if it's repeated? Example: ["a", "a", "b"] - ["a", "b", "c"] == ["a", "b"]
[22:20:22] havenwood: Mattx: You want the intersection of the two Arrays?
[22:20:28] havenwood: >> ["a", "a", "b"] & ["a", "b", "c"]
[22:20:29] ruby[bot]: havenwood: # => ["a", "b"] (https://eval.in/536436)
[22:20:55] Mattx: not the intersaction, the difference. I want to remove from the first array all elements of the second array, keeping elements if they're repeated
[22:21:41] Mattx: I'm looking for an efficient solution, please don't do it with .each, I already have that :P
[22:23:43] skade: has joined #ruby
[22:24:19] baweaver: that word, I do not think it means what you think it means
[22:24:39] Mattx: it does, why not?
[22:24:55] aegis3121: So you only want to delete once?
[22:24:57] Mattx: the only difference with the "-" operator is that I want to keep repeated elements
[22:25:02] Mattx: aegis3121, that's right
[22:25:28] aegis3121: what if second has it twice?
[22:25:34] Felix444: has joined #ruby
[22:25:39] aegis3121: [1, 1, 2] and [1, 1, 3] ?
[22:25:45] aegis3121: Delete twice or keep it still?
[22:25:51] skweek: has joined #ruby
[22:25:55] Mattx: remove twice
[22:26:03] juanca_: has joined #ruby
[22:26:07] dfockler: has joined #ruby
[22:26:58] aegis3121: first.delete_if { |item| second.delete(item) }
[22:27:26] aegis3121: (or #reject, if you aren't in the mood to mutate)
[22:27:46] intrigueD: has joined #ruby
[22:29:26] Mattx: first=[1,1,2,3]; second=[1,1,3]; first.delete_if { |item| second.delete(item) }
[22:29:26] Mattx: => [1, 2]
[22:29:28] Mattx: should be [2]
[22:29:59] djbkd: has joined #ruby
[22:31:24] workmad3: first.delete_if { |item| second.include?(item) ? second.delete_at(second.find_index(item)) : false } does it
[22:31:28] workmad3: but that's pretty ugly
[22:31:36] skade: has joined #ruby
[22:32:06] aegis3121: could use #index instead of #include?
[22:32:09] aegis3121: to find the index already
[22:32:24] aegis3121: Instead of having to potentially search a couple of times.
[22:32:33] Dimik: has joined #ruby
[22:32:39] workmad3: aegis3121: good point
[22:32:57] Mattx: what do you mean? index cache the results?
[22:33:06] aegis3121: no, you'd have to store it in a local
[22:33:08] aegis3121: but you'd have it
[22:33:32] aegis3121: index = second.index(item); index ? second.delete_at(index) : false
[22:33:43] workmad3: .delete_if { |item| (idx = second.index(item)) ? second.delete_at(idx) : false }
[22:34:49] workmad3: you may also want to do (second.delete_at(idx); true) instead of just second.delete_at(idx) to account for when you have an array of bools or nils and want to correctly deal with them too :)
[22:35:03] havenwood: second.each { |n| first.delete_at first.index n }; first
[22:36:13] workmad3: havenwood: delete_at borks if you pass it nil :)
[22:37:12] tvon: has joined #ruby
[22:37:44] havenwood: second.each { |n| index = first.index n; first.delete_at index if index }; first
[22:37:53] havenwood: workmad3: good point
[22:39:15] htmldrum: has joined #ruby
[22:40:10] zenlot: has joined #ruby
[22:41:56] tvon: has joined #ruby
[22:43:07] roshanavand: has joined #ruby
[22:45:20] Eaven: has joined #ruby
[22:46:19] pawnbox: has joined #ruby
[22:46:39] axl__: has joined #ruby
[22:46:43] digitalcakes: has joined #ruby
[22:46:51] wzy: has joined #ruby
[22:46:58] jottr: has joined #ruby
[22:47:27] poerror: has joined #ruby
[22:47:42] Mattx: Out of curiosity, how slow is using rescue in case of error?
[22:47:43] Mattx: first=[1,1,2,3]; second=[1,3]; first.delete_if { |item| second.delete_at(second.index item) rescue false }
[22:47:45] Mattx: for instance ^
[22:48:16] Mattx: vs this: first=[1,1,2,3]; second=[1,3]; first.delete_if { |item| second.include?(item) ? second.delete_at(second.index item) : false }
[22:52:04] eljimmy: has joined #ruby
[22:52:15] tacit7: has joined #ruby
[22:53:07] bjpenn: has joined #ruby
[22:54:11] queequeg1: has joined #ruby
[22:55:40] Mattx: (I bet using rescue is faster actually)
[22:55:48] axl__: has joined #ruby
[22:56:35] juanca_: has joined #ruby
[22:57:09] jottr_: has joined #ruby
[22:57:14] lemur: has joined #ruby
[22:57:27] workmad3: Mattx: don't count on it... exception handling is frequently quite a slow feature
[22:57:37] workmad3: Mattx: best thing to do would be to profile both options
[22:59:09] uglybandersnatch: has joined #ruby
[22:59:32] workmad3: Mattx: also you'll want to compare against a version of `delete_if` that doesn't find the item in `second` twice (such as doing `(idx = second.index(item)) ? second.delete_at(idx) : false`
[22:59:39] roshanavand: has joined #ruby
[22:59:46] mistermocha: has joined #ruby
[23:02:56] Musashi007: has joined #ruby
[23:03:50] devbug: has joined #ruby
[23:04:17] kies: has joined #ruby
[23:04:18] ur5us: has joined #ruby
[23:05:43] nfk|laptop: has joined #ruby
[23:07:48] failshell: has joined #ruby
[23:12:01] workmad3_: has joined #ruby
[23:16:12] pawnbox: has joined #ruby
[23:16:30] mdw: has joined #ruby
[23:17:29] moos3: has joined #ruby
[23:18:52] weemsledeux: has joined #ruby
[23:19:37] binaryplease1: has joined #ruby
[23:20:02] binaryplease1: has joined #ruby
[23:20:23] stannard: has joined #ruby
[23:20:49] binaryplease1: has joined #ruby
[23:20:54] nerium: has joined #ruby
[23:21:22] binaryplease1: has joined #ruby
[23:21:56] binaryplease1: has joined #ruby
[23:22:26] freerobby: has joined #ruby
[23:24:46] moos3: has joined #ruby
[23:24:56] binaryplease: has joined #ruby
[23:28:18] devbug: has joined #ruby
[23:29:37] TheMoonMaster: has joined #ruby
[23:29:55] toretore: has joined #ruby
[23:30:34] s2013: has joined #ruby
[23:31:40] statelesscode: has joined #ruby
[23:31:48] DLSteve: has joined #ruby
[23:31:58] bronson: has joined #ruby
[23:34:40] safe: has joined #ruby
[23:37:37] paperhouse: has joined #ruby
[23:38:57] binaryplease: has joined #ruby
[23:42:37] LoneHerm_: has joined #ruby
[23:43:19] crowell: has joined #ruby
[23:43:47] icarus: has joined #ruby
[23:43:50] cdg_: has joined #ruby
[23:43:56] chouhoulis: has joined #ruby
[23:44:46] juanfra: has joined #ruby
[23:45:20] chouhoulis: has joined #ruby
[23:45:29] Abrin_AWAY: has joined #ruby
[23:45:58] dikaio: has joined #ruby
[23:52:47] Ox0dea: workmad3: There's gotta be a better way to do it in O(n), right? https://eval.in/536444
[23:53:09] RegulationD: has joined #ruby
[23:53:54] ariedler: has joined #ruby
[23:54:33] workmad3: Ox0dea: I'm not sure there is when dealing with general arrays... probably the best you can manage is O(m*n)
[23:54:45] workmad3: Ox0dea: pretty sure you could achieve O(n) with sorted arrays though :)
[23:55:01] baweaver: has joined #ruby
[23:55:08] Ox0dea: workmad3: Right, mine's technically O(m*n), but that's still much better than exponential.
[23:55:32] a11: has joined #ruby
[23:55:41] workmad3: Ox0dea: ah, I thought you were asking if I knew an O(n) way :)
[23:55:46] bricker: has joined #ruby
[23:55:56] Ox0dea: Aye, I think that's probably infeasible without sorted inputs.
[23:56:12] ariedler: more of a general programming question but consider:
[23:56:12] ariedler: Foo.transaction do .... end; (and after the after_commit are ran)
[23:56:12] ariedler: Is there a name for this type of thing in a more general sense ? as a programming pattern?
[23:56:31] mary5030: has joined #ruby
[23:56:59] Radar: It's a block
[23:57:06] pawnbox: has joined #ruby
[23:57:14] siaW: has joined #ruby
[23:57:55] ariedler: Radar: a little more than that to it in this case; the pattern being that things inside the block add data to the yielder, and run the 'callbacks' at the end
[23:58:04] johnmilton: has joined #ruby
[23:59:02] a11: Would someone be so kind as to explain line 11 to me? Specifically the underscores? https://gist.github.com/anonymous/c486b7adfe57bfb573b9
[23:59:59] drbrain: a11: it's multiple assignment