« Back to channel list

#ruby - 24 January 2016

« Back 1 day Forward 1 day »
[00:01:15] benderb: has left #ruby: ()
[00:01:16] lucasb: Darmani: are you sure the result array is sorted?
[00:01:41] Darmani: lmao... It's not.
[00:01:43] Darmani: I thought it was.
[00:01:47] Darmani: Back to the drawing board xD
[00:02:08] Cohedrin: has joined #ruby
[00:02:10] mostlybadfly: has joined #ruby
[00:02:49] maneco: has joined #ruby
[00:02:53] frog0909: has joined #ruby
[00:04:49] diegoviola: has joined #ruby
[00:06:16] ddv: has joined #ruby
[00:07:32] stuxnet: has joined #ruby
[00:09:04] JCOE: has joined #ruby
[00:10:12] sandstrom: has joined #ruby
[00:10:28] lucasb: I just noticed RubyInline was linked in the previous conversation, but I don't think it's for inlining ruby methods. It's more like for inserting plain C code in the middle of ruby code.
[00:11:44] lucasb: well, a related concept, but not the original issue
[00:12:02] volty: lucasb: yap, I knew that and that there is such a thing. Though not yet tried.
[00:12:51] x77686d: has joined #ruby
[00:12:56] bb010g: has joined #ruby
[00:13:58] ellisTAA: can someone say how this could be solved in a faster way? according to leet code my solution is only faster than 8% of other ruby submissions https://gist.github.com/ellismarte/f2047504489ca2d943e0
[00:14:31] h99h9h88: has joined #ruby
[00:14:42] karmatr0n: has joined #ruby
[00:15:05] Rodya_: has joined #ruby
[00:15:22] dextertzu: has joined #ruby
[00:16:39] jbrhbr: has joined #ruby
[00:17:20] CloCkWeRX: has joined #ruby
[00:19:05] volty: ho ho, bulls and cows, one of my first programs, in machine lang. you need sets + probability calculus to generate the optimal guesses. How many passes (more or less)?
[00:19:46] weemsledeux: has joined #ruby
[00:20:20] volty: the first versions was in basic, taking ~ 15 minutes :)
[00:20:40] ellisTAA: `oh in this question im not guessing but writing a method that tells them how many bulls and how many cows
[00:20:55] jamw: has joined #ruby
[00:21:34] volty: yap, I was wondering what's the magic my tired brain cannot capture, ah ah ah
[00:22:38] decaff: has joined #ruby
[00:23:24] cicloid: has joined #ruby
[00:23:26] s2013: has joined #ruby
[00:25:47] shanemcd: has joined #ruby
[00:27:14] sandstrom: has joined #ruby
[00:27:56] mdw: has joined #ruby
[00:28:46] devbug: has joined #ruby
[00:29:08] zast: has joined #ruby
[00:29:42] gizless: has joined #ruby
[00:29:48] nopolitica: has joined #ruby
[00:30:31] gizmore|2: has joined #ruby
[00:32:12] jarray52: has joined #ruby
[00:32:17] Rodya_: has joined #ruby
[00:32:32] gizmore|3: has joined #ruby
[00:32:44] jarray52: Anyone else experiencing crashes with the Ruby interpreter on Ruby version 2.2.3?
[00:33:12] eam: jarray52: what does the crash look like?
[00:33:12] Radar: jarray52: no
[00:33:26] Radar: isn't everyone now using 2.3.0?
[00:33:31] eam: I've experienced crashes on *most* ruby versions soooooo
[00:34:56] xet7: has joined #ruby
[00:35:10] jarray52: https://dpaste.de/duxY
[00:36:04] jarray52: It primarily happens when using byebug with Rails and rspec.
[00:36:28] jarray52: I'm getting about 10 such crashes an hour.
[00:36:41] jarray52: However, it isn't predictable.
[00:36:46] tinnvec: has joined #ruby
[00:37:04] rgtk: has joined #ruby
[00:39:24] persistence: can't code my way out of this US northeast snow storm :'(
[00:40:05] IronD: has joined #ruby
[00:42:21] eam: jarray52: can you capture a corefile, or backtrace?
[00:42:38] northfurr: has joined #ruby
[00:43:30] jarray52: eam: Sure. Where do you want me to place it?
[00:43:57] eam: well, you may not want to send me the corefile, it may have things in it you don't want to share. But if you can use gdb and run "bt" and pastebin that, it might be useful
[00:44:29] krainboltgreene: has left #ruby: ()
[00:44:37] sandstrom: has joined #ruby
[00:44:43] uberjar: has joined #ruby
[00:47:56] s2013: has joined #ruby
[00:55:46] Darmani: has joined #ruby
[00:57:29] ur5us: has joined #ruby
[01:01:39] sandstrom: has joined #ruby
[01:05:59] s2013: has joined #ruby
[01:06:06] sine`: has left #ruby: ()
[01:07:01] jottr_: has joined #ruby
[01:07:51] northfurr: has joined #ruby
[01:10:44] K1MOS: has joined #ruby
[01:12:30] arescorpio: has joined #ruby
[01:14:41] karmatr0n: has joined #ruby
[01:14:48] ellisTAA: has joined #ruby
[01:15:47] TomPeed: has joined #ruby
[01:17:31] emilford: has joined #ruby
[01:18:52] sandstrom: has joined #ruby
[01:21:31] ruby-lang790: has joined #ruby
[01:22:00] benderb: has joined #ruby
[01:22:03] Rodya_: has joined #ruby
[01:28:17] underplank: has joined #ruby
[01:29:18] hiyosi: has joined #ruby
[01:30:44] gambl0re: has joined #ruby
[01:31:09] vvalien: has joined #ruby
[01:31:41] Scripore: has joined #ruby
[01:32:29] paradisaeidae: has joined #ruby
[01:33:55] ruby-lang790: Ruby beginner here, having some trouble with a really short method I'm trying to write called show_obj.
[01:34:03] ruby-lang790: Goal is to add the method to my .irbrc so that I can quickly see which objects and variables are related to a particular class.
[01:34:18] ruby-lang790: Here's my code:
[01:34:20] Ox0dea: ruby-lang790: Sounds like you really want Pry and `ls`. :)
[01:34:27] Ox0dea: ?gist ruby-lang790
[01:34:27] ruby[bot]: ruby-lang790: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[01:34:56] ruby-lang790: new to irc too
[01:35:11] Ox0dea: No worries.
[01:35:38] hightower3: What tool would you suggest to use to document a Ruby program that has both guides and API reference? Something that would be like yard for API ref, and railsguides for guides, but with a unified styling
[01:36:03] sandstrom: has joined #ruby
[01:36:05] ruby-lang790: Here's my code: https://gist.github.com/anonymous/932d4c5d72af5b153045
[01:37:23] du5tball_: has joined #ruby
[01:37:32] Ox0dea: ruby-lang790: `select { |x| x }` is just `to_a`.
[01:37:46] Ox0dea: The #local_variables method is going to give you the local variables of your method.
[01:38:14] Papierkorb: Ox0dea: isn't it more like a .to_a.compact ?
[01:38:24] Ox0dea: Papierkorb: Fair enough.
[01:38:53] Ox0dea: Then again, ObjectSpace.each_object isn't gonna be giving you back very many `false` or `nil`. :)
[01:39:05] ruby-lang790: well I'm with you mostly
[01:39:26] ruby-lang790: but I think where I'm getting tripped up is
[01:39:37] ruby-lang790: local_variables.delete_if {|y| eval(y.to_s).class != class_param}
[01:39:47] ruby-lang790: when I have "class_param" there
[01:40:09] ruby-lang790: I feel like the method's argument should get passed in
[01:40:12] ruby-lang790: but I don't think that's what's happening
[01:40:17] mistermocha: has joined #ruby
[01:40:42] Ox0dea: ruby-lang790: To clarify, whose local variables are you hoping to get hold of there?
[01:40:43] ruby-lang790: I'll update my other code per your recommendations though definitely
[01:41:07] ruby-lang790: oh this is just for an off-the-cuff irb session
[01:41:17] ruby-lang790: so I'm playing around with making classes and defining variables
[01:41:38] h99h9h88: has joined #ruby
[01:41:39] ruby-lang790: and the "local_variables" method just outputs an array of everything I set in the current session
[01:41:46] ruby-lang790: if that makes sense
[01:42:07] h99h9h88_: has joined #ruby
[01:42:13] ruby-lang790: so then I'm filtering that by the particular class I care about
[01:42:14] Ox0dea: That's what you *want* it to do, but that's not what it does.
[01:42:40] Ox0dea: #local_variables is going to give you the locals of your #show_obj method.
[01:43:26] ruby-lang790: I didn't realize
[01:43:30] ruby-lang790: testing real quick
[01:45:03] Ox0dea: You'll either have to make #show_obj a Proc instead of a method so that it doesn't introduce a new scope, or else use something crazy like the binding_of_caller gem to climb back up the call stack to get at the Binding you really want.
[01:46:16] ruby-lang790: Roger that...looks like I need to do some more research
[01:46:21] ruby-lang790: thanks for your help!
[01:46:32] Ox0dea: ruby-lang790: https://eval.in/507052
[01:46:43] Ox0dea: That'll suffice if you only want to inspect the locals at the top level.
[01:48:16] ruby-lang790: Awesome! I'll give it a shot
[01:48:37] bronson: has joined #ruby
[01:48:48] ruby-lang790: (Now I have a better understanding of Top Level Binding too)
[01:48:53] bklane: has joined #ruby
[01:49:05] gizmore: has joined #ruby
[01:53:15] sandstrom: has joined #ruby
[01:53:26] Kryptonic: has joined #ruby
[01:55:17] dh64: has joined #ruby
[01:59:10] scottschecter: has joined #ruby
[02:01:23] Limix: has joined #ruby
[02:02:08] h99h9h88: has joined #ruby
[02:03:37] s2013: has joined #ruby
[02:05:25] devbug_: has joined #ruby
[02:06:28] emilford: has joined #ruby
[02:10:05] bklane: has joined #ruby
[02:10:28] sandstrom: has joined #ruby
[02:10:42] mprelude: has joined #ruby
[02:11:26] wilbert: has joined #ruby
[02:13:08] DiCablo: has joined #ruby
[02:13:47] a1fa: has left #ruby: ()
[02:14:22] speaking1ode: has joined #ruby
[02:14:42] karmatr0n: has joined #ruby
[02:15:15] stuxnet: has joined #ruby
[02:17:03] jarray52: has left #ruby: ()
[02:17:09] Musashi007: has joined #ruby
[02:18:01] llua: ?tutorial
[02:18:02] ruby[bot]: llua: I don't know anything about tutorial
[02:18:43] shanemcd: has joined #ruby
[02:20:03] baweaver: look up tryruby
[02:20:10] baweaver: or tell us what you're looking to learn
[02:20:56] psye: has joined #ruby
[02:21:40] h99h9h88_: has joined #ruby
[02:21:40] jamw: has joined #ruby
[02:24:00] asccigcc: has joined #ruby
[02:26:53] ohaibbq: has joined #ruby
[02:27:11] sandstrom: has joined #ruby
[02:28:33] s2013: has joined #ruby
[02:28:39] Rodya_: has joined #ruby
[02:29:16] dopie2: has joined #ruby
[02:30:03] northfurr: has joined #ruby
[02:30:10] dopie: has joined #ruby
[02:37:19] djbkd: has joined #ruby
[02:37:56] rgtk: has joined #ruby
[02:40:04] doodlehaus: has joined #ruby
[02:40:05] ruby[bot]: +b doodlehaus!*@*$#ruby-banned
[02:40:05] ruby[bot]: ruby[bot] kicked doodlehaus: banned before
[02:40:07] bklane: has joined #ruby
[02:40:12] jbrhbr: has joined #ruby
[02:41:35] mfb2: has joined #ruby
[02:43:29] kriskropd: has joined #ruby
[02:44:06] iateadonut: has joined #ruby
[02:44:24] sandstrom: has joined #ruby
[02:45:52] bklane_: has joined #ruby
[02:48:49] northfurr: has joined #ruby
[02:49:32] krobzaur: has joined #ruby
[02:49:54] bronson: has joined #ruby
[02:51:38] kalopsian: has joined #ruby
[02:52:33] kriskropd: has joined #ruby
[02:53:48] bklane: has joined #ruby
[02:54:08] bonhoeffer: has joined #ruby
[02:54:31] bonhoeffer: has left #ruby: ()
[02:54:32] framling: has joined #ruby
[02:56:48] toretore: has joined #ruby
[02:58:16] chipotle: has joined #ruby
[02:58:41] Musashi007: has joined #ruby
[03:00:42] Ebok: has joined #ruby
[03:01:14] s2013: has joined #ruby
[03:01:36] sandstrom: has joined #ruby
[03:05:30] gizless: has joined #ruby
[03:06:44] s2013: has joined #ruby
[03:07:53] Musashi007: has joined #ruby
[03:08:21] senayar^: has joined #ruby
[03:08:47] psf: has left #ruby: (" ")
[03:09:49] scottschecter: has joined #ruby
[03:10:23] senayar^: has joined #ruby
[03:10:38] casadei: has joined #ruby
[03:13:15] ta: has joined #ruby
[03:13:18] altair118: has joined #ruby
[03:14:43] karmatr0n: has joined #ruby
[03:16:46] araujo: has joined #ruby
[03:16:56] araujo: has joined #ruby
[03:18:48] sandstrom: has joined #ruby
[03:20:04] levifig: has joined #ruby
[03:21:29] kkeuning: has joined #ruby
[03:22:44] kkeuning: has joined #ruby
[03:23:45] agit0: has joined #ruby
[03:24:02] kkeuning: has joined #ruby
[03:25:44] kkeuning: has joined #ruby
[03:26:16] wsewolod: has joined #ruby
[03:27:30] kkeuning: has joined #ruby
[03:27:47] dlitvak: has joined #ruby
[03:28:49] araujo_: has joined #ruby
[03:31:14] c0ncealed: has joined #ruby
[03:31:18] araujo_: has joined #ruby
[03:31:19] djbkd: has joined #ruby
[03:36:00] sandstrom: has joined #ruby
[03:37:47] bklane: has joined #ruby
[03:38:39] nietzschette: has joined #ruby
[03:38:57] nietzschette: has left #ruby: ()
[03:42:49] h99h9h88: has joined #ruby
[03:43:33] Limix: has joined #ruby
[03:46:56] wonk: has joined #ruby
[03:48:18] howdoi: has joined #ruby
[03:53:13] sandstrom: has joined #ruby
[03:53:27] h99h9h88: has joined #ruby
[03:54:58] bsharitt: has joined #ruby
[04:00:40] rtail_: has joined #ruby
[04:07:25] Mia: has joined #ruby
[04:07:25] Mia: has joined #ruby
[04:08:47] duncannz: has joined #ruby
[04:08:50] fsapo: has joined #ruby
[04:11:29] altair118: has joined #ruby
[04:12:17] matju: has joined #ruby
[04:13:13] altair118: has joined #ruby
[04:13:32] matju: 978 total users??! Geez. When I first came to this channel, there were less than 20 people, I think.
[04:14:22] treaki__: has joined #ruby
[04:15:17] braincrash: has joined #ruby
[04:15:34] govg: has joined #ruby
[04:16:10] Ox0dea: matju: How long ago was that?
[04:20:13] matju: Ox0dea: not sure, I have logs dating back to f??v.2001, but i wasn't auto-recording logs back then.
[04:22:24] jamw: has joined #ruby
[04:26:50] jhn: has joined #ruby
[04:30:46] User458764: has joined #ruby
[04:32:50] araujo__: has joined #ruby
[04:34:53] araujo__: has joined #ruby
[04:38:48] rgtk: has joined #ruby
[04:40:34] dlitvak: has joined #ruby
[04:42:41] govg: has joined #ruby
[04:43:55] gizmore: has joined #ruby
[04:46:12] devbug: has joined #ruby
[04:49:43] sandstrom: has joined #ruby
[04:50:35] gix: has joined #ruby
[04:50:37] baweaver: has joined #ruby
[04:52:06] bronson: has joined #ruby
[04:53:41] devbug_: has joined #ruby
[04:53:56] ziyadb: has joined #ruby
[05:06:23] northfurr: has joined #ruby
[05:06:55] sandstrom: has joined #ruby
[05:13:15] baweaver: has joined #ruby
[05:13:55] lemur: has joined #ruby
[05:14:23] karmatr0n: has joined #ruby
[05:15:21] hahuang65: has joined #ruby
[05:15:28] devbug: has joined #ruby
[05:24:05] nahtnam: has joined #ruby
[05:24:13] sandstrom: has joined #ruby
[05:25:20] nahtnam: Hey! Im having a weird issue with jekyll. If you go to https://nahtnam.com/ and scroll to the bottom and click the visit project link, you get taken to nahtnam.com/projects/name, but in the source code, I have a completely different url: https://github.com/nahtnam/nahtnam.github.io/blob/master/_includes/project.html#L16
[05:25:52] nahtnam: The URL is set to {{project.url}} and when you go to https://github.com/nahtnam/nahtnam.github.io/blob/master/_projects/ludicrous.md, you can see that the url is a normal url
[05:29:36] hiyosi: has joined #ruby
[05:31:02] dlitvak: has joined #ruby
[05:31:40] jcdesimp: has joined #ruby
[05:33:07] dexter-tzu: has joined #ruby
[05:41:26] sandstrom: has joined #ruby
[05:45:53] theRealAlexz: has joined #ruby
[05:47:29] ruby-lang028: has joined #ruby
[05:47:40] ruby-lang028: hello is anyone here?
[05:49:32] yashinbasement: has joined #ruby
[05:53:08] Limix: has joined #ruby
[05:54:05] Limix: has joined #ruby
[05:55:24] Ox0dea: You'll have to define "here".
[05:56:28] altair118: has joined #ruby
[05:57:27] sigurding: has joined #ruby
[05:58:18] sandstrom: has joined #ruby
[05:58:30] djbkd: has joined #ruby
[05:59:04] northfurr: has joined #ruby
[06:03:21] darkf: has joined #ruby
[06:03:22] northfurr: has joined #ruby
[06:10:22] northfurr: has joined #ruby
[06:12:01] lxsameer: has joined #ruby
[06:13:24] mfb2: has joined #ruby
[06:14:43] karmatr0n: has joined #ruby
[06:14:50] wldcordeiro: has joined #ruby
[06:15:31] sandstrom: has joined #ruby
[06:16:20] s2013: has joined #ruby
[06:17:18] dlitvak: has joined #ruby
[06:17:51] h99h9h88: has joined #ruby
[06:23:12] jamw: has joined #ruby
[06:25:47] rtail_: has joined #ruby
[06:26:00] griffindy: has joined #ruby
[06:32:13] sandstrom: has joined #ruby
[06:37:15] arup_r: has joined #ruby
[06:39:37] rgtk: has joined #ruby
[06:43:49] arup_r: something is burning here https://bugs.ruby-lang.org/issues/12004 :/
[06:47:08] Canar: SJW bikeshedding, though that's merely my unsolicited opinion. Feminists love the CoC.
[06:49:09] h99h9h88: has joined #ruby
[06:49:26] sandstrom: has joined #ruby
[06:52:24] baweaver: arup_r: Canar: Well now is the time to bring things up, though preferably on that ticket or in #ruby-community as I feel that's where meta discussion on the community should go.
[06:52:47] rippa: has joined #ruby
[06:52:51] baweaver: just keep it civil, as I don't want to see this turn into some huge fight.
[06:53:21] arup_r: baweaver: ok, I agree with you.
[06:53:21] Canar: baweaver: Meh, looks like Matz has his head screwed on precisely straight so I'm not too concerned.
[06:53:51] baweaver: I'm of the opinion that Matz knows best, and whatever he decides I'll abide by.
[06:54:24] baweaver: but anyways, #ruby-community for further talk. Encourage others that want to chat on it to go thataway
[06:54:29] casadei: has joined #ruby
[06:54:34] claw: has joined #ruby
[06:54:52] Canar: Bingo. The language barrier appears to be working in the favour of sanity. That's my only concern and I'll end my contribution on that note, as you've requested further chat move elsewhere.
[06:55:37] baweaver: ./join #ruby-community
[06:55:50] baweaver: if you'd like
[06:59:48] puria: has joined #ruby
[07:03:23] Ox0dea: // to escape the / in future.
[07:06:38] sandstrom: has joined #ruby
[07:09:07] arlek_: has joined #ruby
[07:10:08] krz: has joined #ruby
[07:10:48] iateadonut: has left #ruby: ()
[07:14:43] karmatr0n: has joined #ruby
[07:15:11] yardenbar: has joined #ruby
[07:16:41] cpup: has joined #ruby
[07:24:13] sandstrom: has joined #ruby
[07:26:27] Dragooon: has joined #ruby
[07:27:06] juddey: has joined #ruby
[07:27:49] blur3d: has joined #ruby
[07:28:54] h99h9h88: has joined #ruby
[07:30:57] craigp: has joined #ruby
[07:41:26] sandstrom: has joined #ruby
[07:46:36] fantazo: has joined #ruby
[07:53:07] dcunit3d: has joined #ruby
[07:54:55] bronson: has joined #ruby
[07:56:53] dlitvak: has joined #ruby
[07:58:37] mdw: has joined #ruby
[07:58:37] ledestin: has joined #ruby
[07:58:38] sandstrom: has joined #ruby
[08:00:38] baweaver: has joined #ruby
[08:00:43] karmatr0n: has joined #ruby
[08:05:12] karapetyan: has joined #ruby
[08:07:35] PedramT: has joined #ruby
[08:08:12] usershell: has joined #ruby
[08:13:14] Limix: has joined #ruby
[08:13:43] User458764: has joined #ruby
[08:14:41] karmatr0n: has joined #ruby
[08:15:52] sandstrom: has joined #ruby
[08:16:11] jcdesimp: has joined #ruby
[08:18:44] duderono_: has joined #ruby
[08:19:00] bbuurt: has joined #ruby
[08:19:05] usershell: has joined #ruby
[08:23:55] jamw: has joined #ruby
[08:26:44] antgel: has joined #ruby
[08:28:41] puria: has joined #ruby
[08:30:15] vF3hNGxc47h8: has joined #ruby
[08:30:41] h99h9h88: has joined #ruby
[08:32:03] craigp: has joined #ruby
[08:33:12] sandstrom: has joined #ruby
[08:37:31] tomphp: has joined #ruby
[08:39:01] nik0: has joined #ruby
[08:40:03] yfeldblum: has joined #ruby
[08:40:31] rgtk: has joined #ruby
[08:44:06] chancy: has joined #ruby
[08:44:52] Musashi007: has joined #ruby
[08:47:09] disconnekted: has joined #ruby
[08:50:19] sandstrom: has joined #ruby
[08:54:35] JohnT: has joined #ruby
[08:56:08] bronson: has joined #ruby
[08:56:37] Xeago: has joined #ruby
[08:57:21] Rodya_: has joined #ruby
[08:58:23] ympeg: has joined #ruby
[08:58:24] ympeg_: has joined #ruby
[09:04:47] Rodya_: has joined #ruby
[09:04:50] sigurding: has joined #ruby
[09:04:59] usershell: has joined #ruby
[09:06:08] Asher1: has joined #ruby
[09:06:53] FernandoBasso: has joined #ruby
[09:07:27] Limix: has joined #ruby
[09:07:33] Ebok: has joined #ruby
[09:10:55] Rodya_: has joined #ruby
[09:12:27] Xeago: has joined #ruby
[09:14:24] Anderson69s: has joined #ruby
[09:14:39] karmatr0n: has joined #ruby
[09:18:15] Anderson69s: has joined #ruby
[09:19:21] Ox0dea: has left #ruby: ("WeeChat 1.5-dev")
[09:20:16] DoubleMalt: has joined #ruby
[09:20:40] Meow-J: has joined #ruby
[09:22:45] mdw: has joined #ruby
[09:23:10] Napear: has joined #ruby
[09:25:14] rht: has joined #ruby
[09:32:48] craigp: has joined #ruby
[09:34:07] codecop: has joined #ruby
[09:37:43] oivoodoo: has joined #ruby
[09:38:53] shanemcd: has joined #ruby
[09:40:36] tomphp: has joined #ruby
[09:41:06] marr: has joined #ruby
[09:46:42] Xeago: has joined #ruby
[09:50:36] mondok: has joined #ruby
[09:52:00] MGDev: has joined #ruby
[09:56:00] asteros: has joined #ruby
[10:00:56] PedramT_: has joined #ruby
[10:02:09] Limix: has joined #ruby
[10:03:41] ledestin: has joined #ruby
[10:04:40] b3nt_pin: has joined #ruby
[10:08:37] dlitvak: has joined #ruby
[10:09:02] sandstrom: has joined #ruby
[10:10:51] arup_r: has joined #ruby
[10:12:02] SCHAAP137: has joined #ruby
[10:12:41] skcin7: has joined #ruby
[10:15:29] mfb2: has joined #ruby
[10:16:27] mondok: hi, i use chruby, but sublime cannot find ruby command, how can i fix that?
[10:16:54] mondok: i tun sublime from xfce4 panel
[10:17:03] jcdesimp: has joined #ruby
[10:18:18] dEPy: has joined #ruby
[10:19:12] tomphp: has joined #ruby
[10:19:30] karapetyan: has joined #ruby
[10:20:38] dEPy: Anyone mind to take a look at my code for gilded rose (https://github.com/jimweirich/gilded_rose_kata) and tell me how it looks and what can I improve? https://gist.github.com/depy/9062161a450abde52d32
[10:23:03] shevy: dEPy you don't like comments :(
[10:23:18] zotherstupidguy: has joined #ruby
[10:23:29] dEPy: shevy: I know. I should get used to commenting code more. My big flaw... :(
[10:23:44] dEPy: I thought the kata itslef is well known enough :/
[10:23:48] shevy: I am not sure how much you can improve, 60% of this seems to be just math-juggling
[10:24:00] shevy: although you seem to repeat the same thing in each class
[10:24:11] shevy: with different - and + of course
[10:24:15] Napear: dEPy: It looks like you have a lot of duplicate code in there, I would suggest create a parent class for *Aging and use inharatance to pass the functionality around
[10:24:44] shevy: oh indeed
[10:24:44] jamw: has joined #ruby
[10:24:48] shevy: item.sell_in -= 1 is the same in every class
[10:24:48] dEPy: Napear: tnx, I was thinking of that yea. But the NoAging class eliminitates sell_in modification
[10:25:22] dEPy: Well I could override it I guess?
[10:25:45] dEPy: I don't know. I feel like both ways have tradeoffs
[10:25:59] shevy: item.quality = 50 if item.quality > 50 is also the same
[10:26:13] sandstrom: has joined #ruby
[10:26:15] shevy: one trade off is that if you subclass, you will need more code :)
[10:26:28] dEPy: Yea, and also "Sulfuras" item has quality 80
[10:26:39] dEPy: It's not visible cause I didn't attach tests I guess
[10:27:03] shevy: but you have 4 classes already, and 2 lines in each method there that are exactly the same, so that is 8 lines of code already... I think at that point, subclassing is better
[10:27:19] shevy: you can possibly also handle the logic differently in a common parent method
[10:27:30] shevy: because you essentially seem to do the same
[10:27:37] shevy: either add 1 2 or 3, or deduct 1 2 or 3
[10:27:56] shevy: so that can surely become part of the same parent method, with a second parameter to state whether you want to subtract or add
[10:28:36] shevy: item.quality = 0 if item.quality < 0 also seems to be a duplicate
[10:28:49] shevy: one class is a bit different and has a: item.quality = 0 if item.sell_in <= 0 || item.quality < 0
[10:29:06] dEPy: But then I have to override the method for NoAging and ManaCakeAging is 2 and 4 for quality aging
[10:29:30] shevy: yah well subclassing is best for common methods/patterns
[10:29:38] shevy: in your more specialized class, well, you specialize more
[10:29:47] TheRokh: has joined #ruby
[10:29:58] shevy: in my larger projects, I tend to subclass from a class called Base
[10:30:08] shevy: which then usually have things such as "use colours or don't use colours"
[10:30:12] dEPy: Ok. I guess this would be fine for now. But in case I add more items and see more common behaviour, making a parent class would be much more helpful?
[10:30:14] shevy: (for colourized output)
[10:30:26] TheRokh: has joined #ruby
[10:30:29] shevy: you could also use a module
[10:30:45] dEPy: ok cool :) tnx for the input
[10:31:19] devbug: has joined #ruby
[10:31:22] TheRokh: has joined #ruby
[10:32:27] TheRokh: has joined #ruby
[10:33:06] BSaboia: has joined #ruby
[10:33:31] craigp: has joined #ruby
[10:33:39] TheRokh: has joined #ruby
[10:33:50] Jackneill: has joined #ruby
[10:34:53] TheRokh: has joined #ruby
[10:36:52] devbug: has joined #ruby
[10:36:55] hk238: has joined #ruby
[10:38:24] ljames: has joined #ruby
[10:41:23] rgtk: has joined #ruby
[10:42:30] dlitvak: has joined #ruby
[10:42:38] User458764: has joined #ruby
[10:43:26] sandstrom: has joined #ruby
[10:45:48] Ebok: has joined #ruby
[10:47:36] mrtomme: has joined #ruby
[10:48:43] XenuLives: has joined #ruby
[10:49:00] XenuLives: You guys aren't seriously going to incorporate the Contributor Covenant right?
[10:52:17] oivoodoo: has joined #ruby
[10:54:39] Hanmac: has joined #ruby
[10:55:25] PedramT: has joined #ruby
[10:56:06] Limix: has joined #ruby
[10:56:44] skcin7: has joined #ruby
[10:57:52] bronson: has joined #ruby
[10:58:05] mondok: has joined #ruby
[10:58:52] PedramT_: has joined #ruby
[11:00:03] usershell: has joined #ruby
[11:00:25] jbrhbr: has joined #ruby
[11:00:28] arup_r: XenuLives: #ruby-community is the place to discuss this.. not here, we discussed it today there.. please move there if you want.. thanks
[11:01:09] lenwood: has joined #ruby
[11:01:11] oivoodoo: has joined #ruby
[11:01:45] waka: has joined #ruby
[11:01:56] waka: has joined #ruby
[11:05:24] Xeago: has joined #ruby
[11:05:39] xaotuk: has left #ruby: ()
[11:07:03] Xeago: has joined #ruby
[11:10:21] astrofog: has joined #ruby
[11:12:29] BSaboia: has joined #ruby
[11:13:38] skcin7: has joined #ruby
[11:14:40] karmatr0n: has joined #ruby
[11:18:27] dlitvak: has joined #ruby
[11:19:42] rgtk: has joined #ruby
[11:23:29] oivoodoo: has joined #ruby
[11:25:00] Jet4Fire: has joined #ruby
[11:26:10] sandstrom: has joined #ruby
[11:27:34] aef: has joined #ruby
[11:30:43] dlitvak: has joined #ruby
[11:35:05] craigp: has joined #ruby
[11:37:04] benderb: has joined #ruby
[11:37:50] PedramT: has joined #ruby
[11:40:35] Ox0dea: has joined #ruby
[11:40:55] einarj: has joined #ruby
[11:41:04] Musashi007: has joined #ruby
[11:42:11] jas02: has joined #ruby
[11:44:04] cactuzzz: has joined #ruby
[11:50:24] Limix: has joined #ruby
[11:51:11] last_staff: has joined #ruby
[11:51:44] lenwood: has joined #ruby
[11:53:34] stamina: has joined #ruby
[11:55:39] hannelita: has joined #ruby
[11:55:46] akem: has joined #ruby
[11:56:29] Pupp3tm4st3r: has joined #ruby
[11:58:40] futilegames: has joined #ruby
[11:59:43] Cohedrin: has joined #ruby
[12:01:35] User458764: has joined #ruby
[12:03:31] yorickpeterse: yeah imagine all the bad things that would happen if somebody were to adopt a CoC
[12:03:38] yorickpeterse: so many people will suffer
[12:04:50] sftrabbit: has joined #ruby
[12:05:19] chancy: yorickpeterse: assume good faith
[12:05:56] yorickpeterse: assuming good faith on the internet is a free ticket to a terrible time
[12:06:01] slackbotgz: has joined #ruby
[12:06:10] apeiros: chancy: and when assumption fails, hope it doesn't repeat?
[12:06:29] chancy: watch out that you don't create a self-fulfilling prophecy ;-)
[12:06:44] apeiros: I don't do prophecy
[12:06:47] yorickpeterse: No I'm basing that on experience
[12:06:57] yorickpeterse: and probably so are millions of others
[12:07:13] yorickpeterse: It is indeed sad we need these guidelines because in an ideal world it's not needed
[12:07:28] jas02: has joined #ruby
[12:07:30] yorickpeterse: But alas the ideal world doesn't involve many problems we have today, making it a very unrealistic world
[12:07:49] yorickpeterse: and in an ideal world I'd be king and you'd all be my peasants
[12:08:05] shevy: that was along the lines of what I was about to write just now too
[12:08:17] shevy: along the lines of "in an ideal world, everyone would worship me!"
[12:08:22] yorickpeterse: king Yorick demands a tribute, but first he's doing to take a shower
[12:08:28] shevy: yorickpeterse was faster than me though
[12:08:40] shevy: nothing wrong with taking a shower
[12:08:42] nerium: has joined #ruby
[12:08:45] yorickpeterse: I've been told before I was faster
[12:08:48] jottr: has joined #ruby
[12:08:55] dionysus69: has joined #ruby
[12:09:17] Mon_Ouie: has joined #ruby
[12:09:34] hanneli: has joined #ruby
[12:10:29] volty: has joined #ruby
[12:10:59] The_Phoenix: has joined #ruby
[12:11:24] arup_r: has joined #ruby
[12:12:39] skade: has joined #ruby
[12:13:36] Trynemjoel: has joined #ruby
[12:14:30] govg: has joined #ruby
[12:14:38] karmatr0n: has joined #ruby
[12:15:01] mdw: has joined #ruby
[12:15:12] symm-: has joined #ruby
[12:16:11] blackgoat: has joined #ruby
[12:16:29] usershell: has joined #ruby
[12:17:42] jcdesimp: has joined #ruby
[12:18:55] FooMunki: has joined #ruby
[12:19:36] hk238: has left #ruby: ("-")
[12:23:53] arup_r: has joined #ruby
[12:25:12] dlitvak: has joined #ruby
[12:25:21] sandstrom: has joined #ruby
[12:25:31] jamw: has joined #ruby
[12:26:39] gigetoo: has joined #ruby
[12:28:22] dlitvak: has joined #ruby
[12:30:27] sdothum: has joined #ruby
[12:30:44] baweaver: has joined #ruby
[12:30:51] tomphp: has joined #ruby
[12:31:20] lemur: has joined #ruby
[12:39:23] slackbotgz: has joined #ruby
[12:41:51] doodleha_: has joined #ruby
[12:42:59] karapetyan: has joined #ruby
[12:44:27] Limix: has joined #ruby
[12:46:00] drptbl: has joined #ruby
[12:46:31] PedramT: has joined #ruby
[12:47:11] bonhoeffer_: has joined #ruby
[12:50:04] jas02: has joined #ruby
[12:51:11] spider-mario: has joined #ruby
[12:53:38] DrCode: has joined #ruby
[12:53:53] goodroot: has joined #ruby
[12:55:04] zotherstupidguy: has joined #ruby
[12:57:41] beneills: has joined #ruby
[12:58:55] usershell: has joined #ruby
[12:59:44] axisys: has joined #ruby
[13:00:03] Musashi007: has joined #ruby
[13:00:14] bronson: has joined #ruby
[13:01:49] JohnT: has joined #ruby
[13:02:47] rdark: has joined #ruby
[13:04:51] tomphp: has joined #ruby
[13:06:58] karapetyan: has joined #ruby
[13:08:05] aef: can anyone help me with the following question: https://stackoverflow.com/questions/34976139/is-there-a-way-to-force-the-use-of-the-debian-system-ruby-bundler-in-rvm
[13:09:18] Ox0dea: aef: Why do you want to let APT manage your gems?
[13:13:03] aef: Ox0dea: first of all, I like the fact that some additional people that I have quite a bit of trust in have a chance to have a look at the code that ends up being used in my applications. secondly, I find the security infrastructure of Rubygems questionable, and almost nothing changed since the big hack some years ago, afaik. third point would be, that I don't like the fact that things that are already present on my system are downloaded and stored again.
[13:13:55] apeiros: that seems to contradict the use of rvm?
[13:14:04] karapetyan: has joined #ruby
[13:14:09] aef: how so?
[13:14:19] apeiros: it's not part of APT
[13:14:35] aef: how is that contradicting my point?
[13:14:38] bonhoeffer: has joined #ruby
[13:14:40] karmatr0n: has joined #ruby
[13:14:42] atmosx: has joined #ruby
[13:14:45] krz: has joined #ruby
[13:14:47] aef: not every gem I use is packaged in Debian either
[13:14:54] apeiros: your ruby is insecure code but your gems must not be?
[13:14:57] mdw7: has joined #ruby
[13:15:04] shanemcd: has joined #ruby
[13:15:34] usershell: has joined #ruby
[13:16:55] mfb2: has joined #ruby
[13:16:59] apeiros: anyway, if you want the liberties of installing/switching ruby outside of APT but use gems from APT, you're probably better of using ruby-install and one of the solutions working with that instead of rvm.
[13:16:59] aef: both the installation of RVM and the code installed through RVM are verified through OpenPGP signatures made by Michal Papis. I think that is a far better system than the purely transport TLS authenticated Rubygems system and so far I have no reason to believe that Michal is trying to hurt me.
[13:18:08] apeiros: you probably can coerce rvm to do what you want (all it does iirc is achieved by setting env variables). but I wouldn't be surprised if it'd come with quite a bag of hurt on every corner.
[13:18:16] aef: though, when the packaged Ruby on the Debian repositories is enough for what I want to do, I tend to prefer that instead of installing additional stuff through RVM
[13:18:31] domgetter: has joined #ruby
[13:19:05] du5tball: has left #ruby: ("NEEP NEEP")
[13:19:10] Ox0dea: Still seems vaguely masochistic. Why deliberately visit the pain of fragmentation upon oneself?
[13:20:05] aef: Ox0dea: because Rubygems doens't improve and it is a security risk that needs all the mitigation one can come up with.
[13:20:28] Ox0dea: I'm calling the hyperbolice.
[13:22:22] apeiros: ACTION ain't in infosec
[13:22:33] apeiros: so I'll refrain from assessing the merits of that
[13:22:34] shevy: why does this keep on coming from the debian community but not from arch or gentoo or slackware
[13:22:56] hannelita: has joined #ruby
[13:22:58] apeiros: aef: given that nobody in here seems to have an answer, I suggest you try #rvm
[13:23:13] aef: apeiros: already posted it there, thanks
[13:23:20] apeiros: aef: um, in that case:
[13:23:23] apeiros: ?crosspost aef
[13:23:23] ruby[bot]: aef: Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
[13:23:34] dlitvak: has joined #ruby
[13:24:05] aef: apeiros: i will update my findings on my stackoverflow question.
[13:25:16] jottr: has joined #ruby
[13:26:07] Ox0dea: shevy: Venture a guess. :P
[13:26:13] aef: shevy: it seems that a lot of people are not very aware of the risks of using all kinds of unchecked code from sources where sometimes it is not even verifyable that the expected source is even the acutal source. In the Debian community there seems to be a lot more awareness about this than in the rest of the world that i have seen.
[13:27:04] Ox0dea: aef: Do you use coreboot?
[13:28:26] shevy: aef I think you were the first to have made this reference to security. I distinctly remember a few others, the usual complaint was along the lines of "rubygems does not play nicely with debian's policy of packaging up stuff", e. g. why debian has different defaults for rubygems like /var/lib or something like that
[13:28:49] aef: Ox0dea: I intend to.
[13:29:49] Ox0dea: RubyGems supports signing; nobody* uses it.
[13:29:52] oivoodoo: has joined #ruby
[13:30:34] konsolebox: has joined #ruby
[13:30:38] aef: Ox0dea: i used it for all my gem releases
[13:31:05] aef: Ox0dea: then i realized that it is broken and I don't see a way to repair it to make it actually work when using X.509
[13:31:55] aef: Ox0dea: because X.509, the certificate system behind TLS is conceptually very centralistic
[13:32:07] minimalism: has joined #ruby
[13:32:28] aef: Ox0dea: and the Ruby community, or FLOSS software communities in general is not
[13:32:37] aef: s/is/are
[13:32:45] vdamewood: has joined #ruby
[13:33:21] Ox0dea: aef: The very notion of a CA is centralized. You have to trust somebody.
[13:33:23] aef: Ox0dea: also, the devs of net-ssh is using it
[13:33:32] diegoviola: has joined #ruby
[13:33:57] aef: Ox0dea: right, that's why in OpenPGP, a CA is not a core concept
[13:34:34] arup_r1: has joined #ruby
[13:35:03] aef: Ox0dea: OpenPGP would be a good fit for RubyGems. but drbrain doesn't feel the same way.
[13:35:29] oivoodoo: has joined #ruby
[13:36:31] aef: Ox0dea: Grant Olson even built OpenPGP support for Rubygems. but it didn't catch fire. The Ruby community doesn't seem to be interested so much in security, or they are just not informed about the risky state Rubygems is in.
[13:37:07] Ox0dea: aef: Well, kudos to you for not laughing all the way to the bank.
[13:37:14] apeiros: aef: I think it's a lack of risk awareness + effort required
[13:37:59] aef: Ox0dea: when I started with Ruby, i think about 8 years ago, I was confused about Debian's manipulations of Rubygems as well
[13:38:22] aef: Ox0dea: but later I realized that there is a big mentality difference between Rubygems and APT
[13:38:52] shevy: does APT accept anything non-apt
[13:38:54] Limix: has joined #ruby
[13:39:23] aef: Ox0dea: well, yes, they distribute Rubygems, as I said
[13:39:24] Ox0dea: You can pretty much stick anything in a .deb archive.
[13:39:47] aef: Ox0dea: sorry, wrong ping
[13:39:51] Ox0dea: No worries.
[13:40:24] shevy: I don't know if they repackage perl cpan or python ... whatever python uses... eggs was it? or something like that...
[13:40:54] aef: shevy: i think they do
[13:41:40] zotherstupidguy: i think they do
[13:41:46] Ox0dea: I think they do as well.
[13:41:54] shevy: that strange distribution... nixos or so... I think they have repackaged all of haskell packages or something, like 9000 entries or something crazy like that
[13:43:07] zotherstupidguy: shevy what distro you use?
[13:43:09] shevy: wonder why they did so for haskell but not for ruby
[13:43:30] shevy: zotherstupidguy hmm currently slackware but there is not much of slackware left
[13:43:40] shevy: I mean on the system here
[13:44:36] zotherstupidguy: shevy you only use one distro?
[13:44:46] Ox0dea: $ pacman -Ql ruby | wc -l
[13:44:54] Ox0dea: Nice and round.
[13:45:04] oivoodoo: has joined #ruby
[13:45:29] shevy: zotherstupidguy yeah mostly. the days of experimenting are over, I joined the old-people crew
[13:46:27] Ox0dea: zotherstupidguy: WeeChat 1.3? Must be an Ubuntu user. :P
[13:46:39] puria: has joined #ruby
[13:47:05] shevy: debian again!
[13:47:27] Ox0dea: It's everywhere!
[13:48:15] shevy: yeah probably the biggest chunk
[13:48:25] zotherstupidguy: i got a ubntu server + openbox; its convenient and i never buy a laptop higher than 2RAM :)
[13:48:53] zotherstupidguy: but yeah, next machine i buy arch is going on it
[13:48:59] shevy: I settled for 8RAM, compiling is so much smoother
[13:49:22] shevy: we forgot something there
[13:49:42] shevy: MemTotal: 7893124 kB ... here we go
[13:50:27] rodfersou: has joined #ruby
[13:51:10] shevy: Ox0dea the latest coreutils and change to "ls" default, made me use "--quoting-style=literal" now.. I could not bear the strange quotes any longer
[13:51:31] Ox0dea: shevy: Same. I changed my aliases as soon as I figured out what had gone wrong.
[13:51:36] shevy: I have one ruby project that sorta tries to simulate what "ls" does and all the options... I am undecided whether to include that weird... quote thingy
[13:51:57] diego2: has joined #ruby
[13:52:04] diego2: has joined #ruby
[13:52:23] Ox0dea: Well, --quoting-style has been in since the beginning; making shell-escape the default after all these years was a bad move.
[13:53:00] sigurding: has joined #ruby
[13:56:34] lucasb: has joined #ruby
[14:00:37] Scripore: has joined #ruby
[14:03:48] usershell: has joined #ruby
[14:04:25] Pupp3tm4st3r: has joined #ruby
[14:05:17] victortyau: has joined #ruby
[14:05:42] howdoi: has joined #ruby
[14:06:48] benanne: has joined #ruby
[14:10:20] govg: has joined #ruby
[14:12:42] rippa: has joined #ruby
[14:14:38] karmatr0n: has joined #ruby
[14:15:20] shinnya: has joined #ruby
[14:15:30] hfp_: has joined #ruby
[14:16:00] hfp_work: has joined #ruby
[14:17:35] northfurr: has joined #ruby
[14:18:05] mdw: has joined #ruby
[14:18:27] DoubleMalt: has joined #ruby
[14:18:27] jcdesimp: has joined #ruby
[14:18:37] PedramT: has joined #ruby
[14:21:28] gruz0: has joined #ruby
[14:22:47] PedramT: has joined #ruby
[14:23:48] iateadonut: has joined #ruby
[14:24:24] karapetyan: has joined #ruby
[14:24:28] s2013: has joined #ruby
[14:26:00] PedramT_: has joined #ruby
[14:26:03] Scripore: has joined #ruby
[14:26:15] jamw: has joined #ruby
[14:26:38] snowy: has joined #ruby
[14:29:25] futilegames: has joined #ruby
[14:32:58] Limix: has joined #ruby
[14:33:09] mfb2: has joined #ruby
[14:34:55] PedramT: has joined #ruby
[14:35:02] snowy: has joined #ruby
[14:37:21] s2013: has joined #ruby
[14:37:24] krz: has joined #ruby
[14:38:35] PedramT_: has joined #ruby
[14:41:15] symm-_: has joined #ruby
[14:41:41] snowy: has joined #ruby
[14:42:23] Puffball_: has joined #ruby
[14:42:58] oivoodoo: has joined #ruby
[14:47:29] lenwood: has joined #ruby
[14:54:13] Rasi: has joined #ruby
[14:55:26] kalopsian: has joined #ruby
[14:55:49] psf: has joined #ruby
[14:56:27] hanneli: has joined #ruby
[15:02:29] bronson: has joined #ruby
[15:02:43] noodle: has joined #ruby
[15:03:22] arup_r: has joined #ruby
[15:03:28] tomphp: has joined #ruby
[15:06:16] Bloomer: has joined #ruby
[15:07:18] sucks: has joined #ruby
[15:08:14] pdoherty: has joined #ruby
[15:09:01] volty: has joined #ruby
[15:09:15] eladmeidar: has joined #ruby
[15:09:36] eladmeidar: has left #ruby: ()
[15:10:26] arup_r: has joined #ruby
[15:13:00] \pub\bash0r: has joined #ruby
[15:14:09] \pub\bash0r: hi and sorry in advance for probably a lot of missing knowledge
[15:14:20] solocshaw: has joined #ruby
[15:14:21] \pub\bash0r: I'm trying to get a rails application running which uses bundler to setup dependencies
[15:14:39] \pub\bash0r: I installed rvm and setup ruby 2.2(.4), added my own gemset and installed bundler
[15:14:41] karmatr0n: has joined #ruby
[15:14:59] \pub\bash0r: so far, so good ... a call to "ruby" shows the correct version, bundler is found, and I have some basic gems in ~/.rvm/ ...
[15:15:15] \pub\bash0r: now I run "bundler install" in the project directory, it starts downloading a lot of dependencies
[15:15:21] \pub\bash0r: BUT all of them are installed in ~/.gem
[15:15:29] \pub\bash0r: instead of inside ~/.rvm/...
[15:15:48] \pub\bash0r: I'm going crazy here because I cannot figure out where the hell it takes this path from, since GEM_HOME is set correctly
[15:16:04] \pub\bash0r: (~/.bundle doesn't exist, so apparently bundler doesn't override the config)
[15:16:28] Alostar: has joined #ruby
[15:16:42] matp: has joined #ruby
[15:17:04] \pub\bash0r: so in short: anyone any ideas what I can do to fix this?
[15:17:56] kalopsian: has joined #ruby
[15:20:11] mikecmpbll: has joined #ruby
[15:20:46] Alostar: has left #ruby: ()
[15:20:55] tomchapin: has joined #ruby
[15:22:06] Cork: has joined #ruby
[15:22:34] \pub\bash0r: damn, I should have asked earlier, then I may have stumbled accross the answer already .... there was also a .bundle directory inside the project -.-
[15:22:42] \pub\bash0r: after removing that as well it uses the proper GEM_HOME now
[15:26:24] tomphp: has joined #ruby
[15:26:47] Limix: has joined #ruby
[15:30:41] davedev24: has joined #ruby
[15:32:32] pld: has joined #ruby
[15:33:37] pld: hey, on which linux distributions is ruby installed by default?
[15:33:45] matp: has joined #ruby
[15:33:56] usershell: has joined #ruby
[15:35:21] sepp2k: has joined #ruby
[15:36:26] Ox0dea: "Speak only that you would improve the silence."
[15:36:43] Pande: has joined #ruby
[15:37:59] persistence: "Jesus Christ, the goddamn snow came back... I'm moving to Florida!"
[15:38:30] arup_r: I love snow, because I never saw it :(
[15:38:56] PedramT: has joined #ruby
[15:39:38] persistence: As long as you don't have to shovel or drive, you'll love yourself a winter wonderland every year
[15:40:29] arup_r: here only dust and dust... :/
[15:44:51] Limix: has joined #ruby
[15:45:16] karapetyan: has joined #ruby
[15:45:57] rgtk: has joined #ruby
[15:48:38] ponga: has joined #ruby
[15:49:12] ponga: can I achieve ' attr_accessor :name ' and then '@name = 10' in a single line?
[15:49:47] Ox0dea: ponga plz
[15:49:55] apeiros: ponga: you can write your whole ruby app in a single line
[15:49:59] apeiros: but what's the point?
[15:50:13] lucasb: just separate the staments with semicolons
[15:50:15] ponga: no im asking like those more fancy way of declaring hash in ruby
[15:50:22] ponga: is their fancier way of doing it
[15:50:44] apeiros: you can use gems like fattr (I hope I remember the name correctly)
[15:50:48] apeiros: but in plain ruby, no.
[15:51:08] ponga: thank you for answering all of you
[15:51:19] dlitvak: has joined #ruby
[15:51:39] Ox0dea: It's a shame #attr_accessor doesn't return anything utile, though. :/
[15:52:06] ponga: should I instead @var = 10 under def initialize() instead?
[15:52:07] s2013: has joined #ruby
[15:53:22] ponga: apeiros: if using def inialize() instead, should i manually write 'def var=(value)' too?
[15:53:49] Ox0dea: Of course not.
[15:54:24] ponga: So i can def initialize() and I can change the values too?
[15:54:43] psf: has joined #ruby
[15:55:25] ponga: damn it Im settling with attr_accessor anyway :( this is too much for me
[15:55:27] user: has joined #ruby
[15:56:15] dtzitz: has joined #ruby
[15:57:45] kcubrats: has joined #ruby
[16:03:59] unshadow: has joined #ruby
[16:04:58] Ox0dea: ponga: #attr_{reader,writer,accessor} are for "outsiders"; it's fine to refer to instance variables directly if you want to get/set them on `self`.
[16:05:19] ponga: Ox0dea: thank you I was actually testing that myself with irb
[16:05:22] ponga: i mean pry
[16:07:21] asccigcc: has joined #ruby
[16:07:26] Abrin: has joined #ruby
[16:07:28] weemsledeux: has joined #ruby
[16:10:11] shevy: ponga well it's not a huuuuuge change now is it, it's just one more line for initializing the default value :D
[16:10:33] shevy: you can probably write an attr_* variant that also does the initializing for you
[16:10:39] Ox0dea: shevy: I still tried to figure out how to do it. :P
[16:10:41] shevy: like attr_powersnack :name, 10
[16:10:56] shevy: don't use that name though
[16:11:02] ponga: shevy: i settled with attr_accessor, then a.var= outside of it
[16:11:06] ponga: it works safer for me
[16:11:38] Ox0dea: `a.var=`? What's `a` there?
[16:11:44] usershell: has joined #ruby
[16:11:52] ponga: shevy: you can do 'attr_accessor :var, 10'
[16:11:53] ponga: like hash?
[16:12:29] Ox0dea: >> :powersnack == :accessor
[16:12:30] ruby[bot]: Ox0dea: # => false (https://eval.in/507180)
[16:12:32] ponga: damn it , it didn't work
[16:12:34] s2013: has joined #ruby
[16:13:33] shevy: ponga well not with the default attr*s I think
[16:13:42] shevy: I always wanted an attr that gives me foo? -> @foo
[16:14:03] shevy: but I also realized that the attr*s make me lazier :\
[16:14:21] shevy: if I write: def foo; @foo
[16:14:22] ponga: shevy: isn't being lazier the ruby motto according to matz
[16:14:27] x77686d: has joined #ruby
[16:14:39] karmatr0n: has joined #ruby
[16:14:44] shevy: it is more likely that I may write documentation... but if I write attr_reader :foo it is less likely that I will write documentation (not that I'd need much documentation in this case anyway, but still)
[16:14:49] shevy: ponga yeah
[16:14:54] shevy: but I think it refers mostly to code
[16:15:23] Ox0dea: http://threevirtues.com/
[16:16:38] aryaching: has joined #ruby
[16:16:44] ponga: shevy: can I assign value to @var inside class after I did 'attr_accessor :var' ?, altho it seems to ruin the whole point of if
[16:16:50] ponga: just askign
[16:17:29] Ox0dea: I guess you have me muted.
[16:17:31] lucasb: no, it doesn't ruin the whole point of it
[16:17:44] ponga: Ox0dea: not im just dumb
[16:17:56] Ox0dea: ponga: #attr_{reader,writer,accessor} are for "outsiders"; it's fine to refer to instance variables directly if you want to get/set them on `self`.
[16:18:12] Ox0dea: You have to define an accessor for *other* things to be able to access your thing's instance variables.
[16:18:24] Ox0dea: But of course your thing can get and set its own.
[16:18:41] ponga: Ox0dea: yes I read that 'self.var' = 5 nor 'self::var =5' seems to work
[16:18:53] Ox0dea: ponga: That should be `@var = 5`.
[16:19:25] jcdesimp: has joined #ruby
[16:19:57] ponga: Ox0dea: and its lost from 'outsider' right?
[16:20:43] Ox0dea: ponga: It's "invisible" to the outside, yeah.
[16:20:52] ponga: https://gist.github.com/ponga1/ee0f9656f3d7f4675697
[16:20:58] ponga: Ox0dea: k thank you I tested myself too
[16:21:04] Ox0dea: But you can use #attr_reader to make it readable, #attr_writer to make it writeable, and #attr_accessor for both.
[16:21:40] Ox0dea: ponga: https://eval.in/507181
[16:23:35] ponga: it gives an error..?
[16:23:41] TomPeed: has joined #ruby
[16:23:42] Ox0dea: Yeah, something's missing.
[16:25:04] yardenbar: has joined #ruby
[16:25:55] jottr: has joined #ruby
[16:26:58] jamw: has joined #ruby
[16:27:37] araujo: has joined #ruby
[16:27:37] araujo: has joined #ruby
[16:28:24] lucas: has left #ruby: ()
[16:28:32] lacuna: has joined #ruby
[16:28:33] lacuna: has joined #ruby
[16:29:07] krobzaur: has joined #ruby
[16:29:41] sucks: has joined #ruby
[16:29:42] lipoqil: has joined #ruby
[16:30:04] konsolebox: ponga: you might find this helpful: https://bpaste.net/show/43fcefdee656
[16:30:09] lipoqil: Is there some nice gem to work with GPIO on raspberry pi?
[16:30:21] konsolebox: ponga: i don't actually used it myself yet
[16:31:02] lipoqil: I just tried rpi_gpio and pi_piper and it somehow does not work
[16:31:17] Musashi007: has joined #ruby
[16:31:45] ponga: konsolebox: thank you
[16:31:51] ponga: I will try this and see if it fits me
[16:32:41] lucasb: @var outside methods is not instance variables
[16:33:56] Ox0dea: @var is always an instance variable.
[16:34:06] sucks: has joined #ruby
[16:34:41] lucasb: ok, @var in class scope is the class's object instance variable
[16:35:30] System42: has joined #ruby
[16:35:32] konsolebox: ahh.. it's actually an old code i tried to modified
[16:35:41] konsolebox: ponga: nah it doesn't assign instance variables
[16:36:10] Ox0dea: You'd have to resort to #instance_variable_{get/set}, but why?
[16:36:25] Ox0dea: ponga: Could you please say what you think is missing from the Person demo?
[16:36:27] casadei: has joined #ruby
[16:36:50] futilegames: has joined #ruby
[16:37:57] TomPeed: has joined #ruby
[16:41:55] futilegames: has joined #ruby
[16:42:36] nathan123: has joined #ruby
[16:42:51] nathan123: any devs here looking for work
[16:43:24] mfb2: has joined #ruby
[16:43:37] Abrin: has joined #ruby
[16:44:11] krobzaur_: has joined #ruby
[16:44:46] dtzitz: ACTION gets some popcorn
[16:44:51] JCOE: has joined #ruby
[16:46:30] havenwood: nathan123: are you looking for Ruby devs?
[16:47:22] spooq: has joined #ruby
[16:48:40] shredding: has joined #ruby
[16:50:05] jcdesimp: has joined #ruby
[16:53:16] havenwood: nathan123: doing what with Ruby? for who? remote? (I'm not looking but I'm sure someone knows someone who is.)
[16:53:23] hlegius: has joined #ruby
[16:56:48] cicloid: has joined #ruby
[16:58:09] dcunit3d: has joined #ruby
[16:59:15] nathan123: loking to create a vod and iptv middleware and server software
[17:03:09] symm-: has joined #ruby
[17:03:55] symm-: has joined #ruby
[17:04:36] bronson: has joined #ruby
[17:08:46] gbgdev: has joined #ruby
[17:08:46] s2013: has joined #ruby
[17:11:03] spider-mario: has joined #ruby
[17:11:22] karapetyan: has joined #ruby
[17:11:44] fantazo: has joined #ruby
[17:12:18] dtzitz: has left #ruby: ("Leaving")
[17:12:57] nathan123: has left #ruby: ()
[17:14:09] awar: has joined #ruby
[17:15:27] PedramT: has joined #ruby
[17:16:12] crowell: has joined #ruby
[17:16:12] crowell: has joined #ruby
[17:16:23] lDoran: has joined #ruby
[17:17:02] Rodya_: has joined #ruby
[17:18:39] Macaveli: has joined #ruby
[17:19:45] PedramT_: has joined #ruby
[17:20:48] PedramT: has joined #ruby
[17:20:53] arup_r: has joined #ruby
[17:23:45] spider-mario: has joined #ruby
[17:23:59] puria: has joined #ruby
[17:24:05] jas02: has joined #ruby
[17:25:53] themsay: has joined #ruby
[17:26:48] Ilyes512: has joined #ruby
[17:27:05] konsolebox: ponga: turns out you can only define a singleton method in the context of an instance and not a class if you want to use a custom attr function that also defines values. in other words, you can only use it inside initialize(), with the expense of having a singleton method instance on every instance. it's actually only good for defining singleton methods in modules. https://bpaste.net/show/97cdcd44fb34
[17:27:58] Bloomer: has joined #ruby
[17:29:00] ellisTAA: has joined #ruby
[17:29:06] ponga: konsolebox: thank you very much
[17:30:13] volty: you can (re)define initializing accessors at your will
[17:30:32] volty: but it's tricky and not for novices
[17:30:59] konsolebox: volty: not a good idea at all actually
[17:31:23] ramfjord: has joined #ruby
[17:32:28] volty: konsolebox: it all depends on one's needs
[17:32:36] karapetyan: has joined #ruby
[17:32:59] dantevergil: has joined #ruby
[17:35:03] centrx: has joined #ruby
[17:35:11] tomphp: has joined #ruby
[17:35:13] volty: the prob. is that it all segfaults on min. errors when you redefine Class.new (at least 2.3.0)
[17:38:03] ponga: how can I replace nil element in an Array? * a = Array.new(3) , then fill with "John" "Smith" "Bob" to be a = ["John", "Smith", "bob"]
[17:38:15] ponga: is there a method for this or should I create a loop for this
[17:39:02] rtail_: has joined #ruby
[17:39:08] centrx: Just do a = ["John", "Smith", "Bob"] in the first place
[17:39:29] ponga: centrx: I will be getting user input for the name
[17:39:38] ponga: and array has to be size of 3
[17:40:03] dantevergil: has joined #ruby
[17:40:14] centrx: not really sure what you mean
[17:40:15] asteros: has joined #ruby
[17:40:23] dantevergil: has joined #ruby
[17:40:28] h99h9h88: has joined #ruby
[17:40:29] centrx: often use a while loop for user input
[17:40:45] volty: a = Array.new(3) ( gets }
[17:41:03] dantevergil: has joined #ruby
[17:41:49] dantevergil: has joined #ruby
[17:41:52] volty: .map(&:strip)
[17:42:14] dantevergil: has joined #ruby
[17:42:52] tomphp: has joined #ruby
[17:42:55] dantevergil: has joined #ruby
[17:43:26] dantevergil: has joined #ruby
[17:43:44] Ox0dea: konsolebox: Don't try this at home: https://eval.in/507201
[17:43:46] dantevergil: has joined #ruby
[17:44:12] Ox0dea: Y'all need to up your metaprogramming. ^_^
[17:44:14] ruby-lang057: has joined #ruby
[17:45:09] Rodya_: has joined #ruby
[17:45:18] volty: Ox0dea: what about inheritance? Does it work for class D < C; ...defaults baz: 3 ?
[17:45:32] Ox0dea: volty: Slow down, Satan.
[17:46:29] Ox0dea: It totally does, though. :)
[17:48:08] ruby-lang057: hello everybody
[17:48:51] ruby-lang057: I am trying to load (require) the httparty gem into a Ruby file but keep getting an error and am unsuccessful. Below is the error copied: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- httparty (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
[17:49:36] Biopandemic2: has joined #ruby
[17:50:06] volty: Ox0dea: nice code :)
[17:50:47] Kruppe: has joined #ruby
[17:50:57] einarj: has joined #ruby
[17:51:19] maia: has joined #ruby
[17:52:10] futilegames: has joined #ruby
[17:52:28] maia: hello. does anyone happen to have a refactoring suggestion for chains of flat_map that split elements based on a regex?
[17:52:43] maia: Here???s the basic variant (imagine multiple chains of flat_map behind)
[17:52:50] maia: %w(a b-b c-c d).flat_map {|x| x =~ /-/ ? x.gsub(/-/, ' ').split : x }
[17:53:32] Senecea: has joined #ruby
[17:54:35] Ox0dea: >> 'a b-b c-c d'.split /\W/ # maia
[17:54:37] ruby[bot]: Ox0dea: # => ["a", "b", "b", "c", "c", "d"] (https://eval.in/507217)
[17:54:53] Ox0dea: I realize that's not a solution to your actual problem, but you've not given that yet. :P
[17:55:55] hlegius: has joined #ruby
[17:56:35] maia: Ox0dea: hmm, there must be a cleaner version to array.flat_map {|x| something(x) }.flat_map {|x| something_else(x).flat_map {|x| blah(x) }???
[17:56:52] Ox0dea: maia: Well, you could stick those blocks in Procs and #reduce over them.
[17:57:16] maia: Ox0dea: sounds intriguing, could you give me an example?
[17:57:18] Ox0dea: `procs.reduce(array, :flat_map)` or the like.
[17:58:02] puria: has joined #ruby
[17:58:48] diegoviola: has joined #ruby
[17:58:52] Senecea: has joined #ruby
[17:59:03] maia: Ox0dea: I???m still a bit clueless. Guess I???ve never used procs. I???m know blocks, but reducing over procs is new to me.
[18:02:04] Biopandemic2: has joined #ruby
[18:02:32] Biopandemic2: has joined #ruby
[18:02:41] flaguy48: has joined #ruby
[18:02:56] craigp: has joined #ruby
[18:03:53] Ox0dea: maia: https://eval.in/507231
[18:04:17] Ox0dea: It's not quite as clean as #reduce with a Symbol (since the Procs have to be stored as Procs but used as blocks :/), but it's still kinda nice.
[18:04:37] codecop: has joined #ruby
[18:04:53] Ox0dea: Ignore that `5r` debris.
[18:05:50] kalopsian: has joined #ruby
[18:06:15] maia: I thought I???m familiar with ruby, but this is like a new world. I will need some time to understand your example. thanks, I hope I can convert it to what I need (and hope that it???ll cause less GC than chaining flat_map)
[18:06:45] Ox0dea: Ruby is secretly Lisp.
[18:07:21] Ox0dea: But, well, do you see what's happening in the demo?
[18:07:25] shevy: yeah, Ox0dea's code is often in a different world :)
[18:07:39] tjohnson: has joined #ruby
[18:07:53] Ox0dea: I won't apologize.
[18:08:55] shevy: there is more than one way to do it!
[18:09:24] shevy: I think I need to find some more memes of this dude with the beard
[18:09:56] Ox0dea: Which dude?
[18:10:20] shevy: that wagging finger dude
[18:10:28] moeabdol: has joined #ruby
[18:10:36] shevy: he has a beard, it's all I know
[18:10:45] Scripore: has joined #ruby
[18:11:22] ruby-lang057: can anyone help me with a load error?
[18:11:30] konsolebox: Ox0dea: yeah, not bad using prepend
[18:11:34] maia: Ox0dea: here???s what I???m at: https://eval.in/507237 , now I wonder if I could clean up the procs
[18:11:35] amclain: has joined #ruby
[18:11:36] Ox0dea: > not bad
[18:11:37] konsolebox: didn't thought about that
[18:12:06] shevy: ruby-lang057 show the error?
[18:12:37] Ox0dea: maia: Are you sure this is what you need to do?
[18:12:41] BTRE: has joined #ruby
[18:12:49] Ox0dea: I feel like a little more regex-fu could clean things up considerably.
[18:12:56] symm-: has joined #ruby
[18:12:56] nahtnam: has joined #ruby
[18:13:13] pdoherty: has joined #ruby
[18:13:27] s2013: has joined #ruby
[18:13:47] Ebok: has joined #ruby
[18:14:19] Ox0dea: I mean, since you're already flat-mapping, there's no need to bother about checking whether or not you should actually split.
[18:14:19] camillo: has joined #ruby
[18:14:31] ponga: ACTION is having happy time coding in ruby
[18:14:53] maia: Ox0dea: I???m trying to refactor this here (I???m using this gem in my app, and I???d prefer if gems stay maintainable, and this code is hard to grasp): https://github.com/diasks2/pragmatic_tokenizer/blob/master/lib/pragmatic_tokenizer/post_processor.rb
[18:15:18] shevy: what are you writing ponga?
[18:15:39] shevy: maia wow that code is scary!
[18:15:49] Ox0dea: maia: Saints preserve us!
[18:15:50] ponga: shevy: I'm writing a card game bot with cinch , where bot serves a role of a game dealer
[18:15:59] ponga: a card game I created
[18:16:03] ponga: to play with ma friends
[18:16:04] shevy: I have never seen so many .flat_maps grouped together before
[18:16:24] shevy: AND combined with the ternary operator
[18:16:47] shevy: ponga I see, so IRC gaming!
[18:16:50] maia: *indeed. I???ve split it into ~20 methods so far, but I???m not happy with chaining these flat_maps, and also I dislike the duplication of checking a regex and then gsubbing it (plus splitting)
[18:17:00] ponga: shevy: I love IRC gaming
[18:17:03] anothermoron: has joined #ruby
[18:17:16] ponga: I've been doing it for years, and I'm finally making one of my own
[18:17:26] Ox0dea: maia: \1 and \2 are empty there, mind.
[18:17:29] s2013: has joined #ruby
[18:17:37] Ox0dea: Those refer back to capture groups, and you're not capturing anything.
[18:17:54] Ox0dea: You're replacing '.' with '. ', and #split with no argument splits on whitespace.
[18:18:03] ponga: shevy: fact that cinch can run on plugins and does the loop-checkmsg for me fits really well for bot gaming
[18:18:06] diego2: has joined #ruby
[18:18:22] ruby-lang057: here is the error /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- httparty (LoadError)
[18:18:24] ponga: What I oonly need to do is write classes and add as plugins
[18:18:40] maia: Ox0dea: yes, sorry, my bad. I just made up a quick example. But you???ve seen the code that???s run in all the flat_maps
[18:18:54] Ox0dea: maia: And I couldn't close the tab fast enough.
[18:19:15] maia: well, that???s why I???m refactoring it. I want to learn something on the way.
[18:19:27] volty: ary.to_enum.with_object(/-|,|(?<=\.)/).map(&:split).flatten
[18:19:36] griffindy: has joined #ruby
[18:19:36] craigp: has joined #ruby
[18:19:46] diego2: has joined #ruby
[18:20:07] volty: regex-fu ?
[18:20:09] Ox0dea: volty: Why #to_enum and not #each_with_object?
[18:20:16] Ox0dea: Solid regex-fu, though. :)
[18:20:20] shevy: ruby-lang057 yeah, did you try a "gem install httparty" already? It looks like a mac system, I am on linux, not sure if this works for you but for me, it works
[18:20:26] volty: no idea, was concentrating on other stuff
[18:20:40] gbgdev_: has joined #ruby
[18:20:49] Ox0dea: Install harder.
[18:21:03] havenwood: ruby-lang057: Are you trying to use system Ruby? You installed the gem with sudo?
[18:21:16] ruby-lang057: yes i downloaded with sudo
[18:21:34] maia: Ox0dea: would you still suggest to convert the code you???ve briefly glanced at (and shuddered) to procs being reduced over?
[18:21:36] FernandoBasso: has joined #ruby
[18:21:57] ruby-lang057: the sudo thing worked
[18:22:21] ruby-lang057: thank you shevy and havenwood!
[18:22:26] havenwood: ruby-lang057: you're welcome
[18:22:30] Ox0dea: maia: #flat_map always feels like I'm cheating, like I haven't taken the time to properly understand and organize my data. If it turns out that what you really need is a #flat_map chain, #reduce is certainly the right tool.
[18:22:33] shevy: havenwood has almost mind-reading capabilities
[18:22:45] maia: Ox0dea: okay, thanks a lot.
[18:22:48] volty: ["this", "some-one", "does,it,work", "yes.ok"].each_with_object(/-|,|(?<=\.)/).map(&:split).flatten
[18:22:51] volty: >> ["this", "some-one", "does,it,work", "yes.ok"].each_with_object(/-|,|(?<=\.)/).map(&:split).flatten
[18:22:51] Ox0dea: maia: Sure thing.
[18:22:53] ruby[bot]: volty: # => ["this", "some", "one", "does", "it", "work", "yes.", "ok"] (https://eval.in/507245)
[18:23:05] volty: yap, right, thx Ox0dea
[18:23:07] shevy: I like this stuttered sentence
[18:23:32] maia: volty: thanks, but I???m not planning to merge ~20 regex :)
[18:23:44] Ox0dea: maia: Regexp.union. :)
[18:24:13] volty: maia: Ox0dea's right. Go with United Regepxs :)
[18:24:28] sftrabbit: has joined #ruby
[18:24:37] Scripore: has joined #ruby
[18:25:01] niceperl: has joined #ruby
[18:25:12] maia: I???ll take a look at it. :)
[18:25:52] volty: absolutely, it's mandatory. Separate them. They add clearness (out of synthesis).
[18:27:38] gruz0: has joined #ruby
[18:27:47] jamw: has joined #ruby
[18:27:50] ur5us: has joined #ruby
[18:27:59] jottr: has joined #ruby
[18:28:15] sunya7a: Could someone have a look at this test on line 81 and tell me why it is failing. The error states that @wheel is nil. I don't understand what it's not seeing the instance variable that was created in the setup https://gist.github.com/anonymous/9435393b5b2e214d000c
[18:28:28] sunya7a: s/what/why
[18:29:00] s2013: has joined #ruby
[18:29:04] arthropododo: has joined #ruby
[18:29:18] craigp: has joined #ruby
[18:30:34] ponga: how can i tell method to run in 60seconds later
[18:30:37] einarj: has joined #ruby
[18:31:07] TomPeed: has joined #ruby
[18:31:09] volty: sleep(1) [in another thread]
[18:31:27] ponga: will it stop all other processes while sleeping?
[18:31:35] ponga: ok another thread
[18:32:16] ramfjord: has joined #ruby
[18:32:26] tinnvec: has joined #ruby
[18:33:48] s2013: has joined #ruby
[18:34:02] who42: has joined #ruby
[18:35:49] puria: has joined #ruby
[18:36:13] DexterLB: has joined #ruby
[18:36:54] sigurding: has joined #ruby
[18:40:50] diego2: has joined #ruby
[18:42:27] drptbl: has joined #ruby
[18:42:38] mondok: has joined #ruby
[18:43:40] diego2: has joined #ruby
[18:43:55] ebbflowgo: has joined #ruby
[18:44:49] h99h9h88: has joined #ruby
[18:46:11] s2013: has joined #ruby
[18:47:11] ur5us_: has joined #ruby
[18:47:57] jbrhbr: has joined #ruby
[18:48:42] gruz0: has joined #ruby
[18:49:50] ellisTAA: has joined #ruby
[18:51:53] moeabdol: has joined #ruby
[18:52:04] usershell: has joined #ruby
[18:52:45] havenwood: ponga: Or there are gems for such things: https://github.com/celluloid/timers#readme
[18:54:13] ponga: havenwood: thank you but somehow magically it did multithreading for me thus not stopping other methods
[18:54:17] ponga: I think its Cinch thing
[18:54:30] nanoz: has joined #ruby
[18:54:32] ponga: so sleep(x) did the trick for me
[18:54:34] havenwood: ponga: slept threads don't block
[18:54:35] krobzaur_: has joined #ruby
[18:54:45] ponga: so its ruby thing, thanks
[18:55:04] s2013: has joined #ruby
[18:55:57] duderono_: has joined #ruby
[18:56:52] moeabdol: has joined #ruby
[18:58:59] Xeago: has joined #ruby
[19:04:33] nerium: has joined #ruby
[19:06:01] kalopsian: has joined #ruby
[19:06:33] zapata: has joined #ruby
[19:06:38] bronson: has joined #ruby
[19:07:03] dionysus69: has joined #ruby
[19:07:39] oivoodoo: has joined #ruby
[19:11:38] Scripore: has joined #ruby
[19:13:40] victortyau: has joined #ruby
[19:14:20] dlitvak: has joined #ruby
[19:14:47] tomphp: has joined #ruby
[19:14:47] ellisTAA: has joined #ruby
[19:15:27] bmalum: has joined #ruby
[19:19:23] last_staff: has joined #ruby
[19:20:40] bklane: has joined #ruby
[19:22:28] h99h9h88: has joined #ruby
[19:24:16] dseitz: has joined #ruby
[19:26:06] yardenbar: has joined #ruby
[19:29:09] blarghlarghl: Anyone have any idea how to get Open4.popen4() to get a full environment for when it executes?
[19:29:34] einarj: has joined #ruby
[19:30:03] mfb2: has joined #ruby
[19:30:28] IronD: has joined #ruby
[19:31:16] adgtl: has joined #ruby
[19:32:47] bklane: has joined #ruby
[19:33:21] jbrhbr: has joined #ruby
[19:37:13] araujo_: has joined #ruby
[19:38:04] jottr: has joined #ruby
[19:38:46] snowy: has joined #ruby
[19:38:59] malice: has joined #ruby
[19:39:19] malice: How can I allow nil in .each method, so I can do nil.each ... and expect it to do nothing?
[19:39:20] araujo__: has joined #ruby
[19:39:33] victortyau: has joined #ruby
[19:40:02] dudedudeman: has joined #ruby
[19:40:06] Ox0dea: malice plz
[19:40:21] malice: Ox0dea:Yes?
[19:40:34] lucasb: blarghlarghl: Open4.popen4({'foo'=>'42'}, 'command') # <-- maybe this work?
[19:40:39] Ox0dea: malice: There's gotta be a better way.
[19:41:11] malice: Ox0dea: I come from Lisp background. Nil represents there both "false" and empty list, and it is only natural in there; This makes many things convinitent and easy.
[19:41:26] Ox0dea: >> () # malice
[19:41:27] ruby[bot]: Ox0dea: # => nil (https://eval.in/507251)
[19:41:31] Ox0dea: >> nil&.each { this is ignored } # malice
[19:41:33] ruby[bot]: Ox0dea: # => nil (https://eval.in/507252)
[19:41:39] malice: There *might* be some better way, but it would mean changing much of the code I just wrote.
[19:41:50] Ox0dea: See above for your options.
[19:42:30] yfeldblum: has joined #ruby
[19:43:06] lucasb: to silence the error you could do '(array || []).each {...}'
[19:43:13] tomphp: has joined #ruby
[19:43:31] Papierkorb: or this: Array(the_array_or_nil).each{..}
[19:43:48] Ox0dea: Or `def nil.each; []; end`, but please don't.
[19:44:14] lucasb: or even nil.to_a.each {...}
[19:44:17] malice: nil& works only in 2.3, I'm afraid.
[19:44:28] dlitvak_: has joined #ruby
[19:45:20] malice: I think I'll go with to_a. Thanks!
[19:45:40] lucasb: or maybe 'ary and ary.each {...}'
[19:47:07] araujo_: has joined #ruby
[19:48:40] donttrustem: has joined #ruby
[19:48:54] ixti: has joined #ruby
[19:49:25] kspencer: I know this is qt, and they have their own channel, but theres 3 people in there then me.. so i'm going to post this error here
[19:49:31] kspencer: /usr/lib/ruby/vendor_ruby/1.9.1/Qt/qtruby4.rb:469: stack level too deep (SystemStackError)
[19:49:32] donttrustem: Hi, I new to ruby and using openproject and trying to run the command bundle install but I get file not found?
[19:49:59] Ox0dea: donttrustem: Whom shouldn't we trust?
[19:50:31] juddey: has joined #ruby
[19:50:47] donttrustem: Ox0dea: can you help?
[19:51:13] who42: has joined #ruby
[19:51:51] duderono_: has joined #ruby
[19:52:09] Ox0dea: donttrustem: That error message seems to indicate that a file couldn't be found. I bet it's hiding somewhere.
[19:52:16] Ox0dea: Did you check behind the couch?
[19:52:40] donttrustem: LOL I ran locate but it returned loads of dir???s
[19:52:52] donttrustem: does bundle hve an extention
[19:52:56] araujo__: has joined #ruby
[19:54:01] DrCode: has joined #ruby
[19:54:20] rgtk: has joined #ruby
[19:54:33] donttrustem: I tried bundle.rb but nada
[19:55:13] Ox0dea: Well, does `locate` look behind the couch?
[19:55:34] Ox0dea: I can't say as I've ever played hide-and-seek with a file, but that's the first place I'd look.
[19:55:35] donttrustem: Not that I know of :)
[19:55:39] bklane: has joined #ruby
[19:56:08] donttrustem: cmon ???.. :(
[19:56:41] Ox0dea: donttrustem: Did you install Bundler?
[19:56:58] rgtk: has joined #ruby
[19:57:36] kspencer: ACTION fixed his problem
[19:57:51] dwfait: has joined #ruby
[19:57:53] donttrustem: Well I used the Debian package for openproject so I am not sure if it installed bundler? but there is a dir /opt/openproject/vendor/bundle/ruby/2.1.0/gems/
[19:58:10] duderonomy: has joined #ruby
[19:58:20] donttrustem: The package is possibly not installed
[20:02:05] shanemcd: has joined #ruby
[20:02:14] donttrustem: Ox0dea: I am following this https://community.openproject.org/topics/731?r=2771#message-2771
[20:03:13] araujo_: has joined #ruby
[20:04:16] kalopsian: has joined #ruby
[20:04:26] Ox0dea: donttrustem: What even is this?
[20:04:39] Ox0dea: > mfw invalid SSL cert in 2016
[20:05:26] araujo_: has joined #ruby
[20:07:38] s2013: has joined #ruby
[20:07:41] donttrustem: Ox0dea: I found bundle
[20:07:45] drptbl: has joined #ruby
[20:07:47] oivoodoo: has joined #ruby
[20:09:31] donttrustem: hmm! openproject@li1373-212:/opt/openproject/bin$ ./bundle install /usr/bin/env: ruby: No such file or directory
[20:09:44] doublemalt_: has joined #ruby
[20:10:03] lucasb: there's a manual installation guide on their site. did you tried following that?
[20:10:16] ruby[bot]: Ubuntu installation guide for Ruby + Rails: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you/
[20:10:22] marr: has joined #ruby
[20:11:07] TomPeed: has joined #ruby
[20:13:28] krobzaur_: has joined #ruby
[20:13:55] donttrustem: lucasb: I have installed openproject with the package and it is running OK ??? if I use the manual install I think it will break the package install
[20:15:47] donttrustem: I have found bundle but cannot seem to get it to run
[20:16:58] s2013: has joined #ruby
[20:17:25] mikson: has joined #ruby
[20:17:36] donttrustem: looks like ruby is not installed or not in the path ruby --version
[20:17:37] donttrustem: -bash: ruby: command not found
[20:19:35] user: has joined #ruby
[20:21:14] ruby-lang960: has joined #ruby
[20:24:26] h99h9h88: has joined #ruby
[20:24:45] donttrustem: LOL I ound out how to run it
[20:24:55] donttrustem: sudo openproject run bundle install
[20:25:07] donttrustem: wtf ??? the docs are wrong
[20:27:00] sandstrom: has joined #ruby
[20:27:00] lucasb: donttrustdocs
[20:27:26] Biopandemic2: has joined #ruby
[20:28:01] bklane: has joined #ruby
[20:28:02] lacuna: has joined #ruby
[20:28:08] Dimik: has joined #ruby
[20:28:29] jamw: has joined #ruby
[20:29:02] shevy: donttrustem donttrustem
[20:29:31] dome22xl: has joined #ruby
[20:30:35] cactuzzz: has joined #ruby
[20:30:38] wilbert: has joined #ruby
[20:30:56] snowy: has joined #ruby
[20:30:59] apeiros: donttrustem docs?
[20:31:11] Jardayn_two: has joined #ruby
[20:32:21] nahtnam: has joined #ruby
[20:32:42] nahtnam: has left #ruby: ()
[20:33:45] ur5us: has joined #ruby
[20:35:45] freerobby: has joined #ruby
[20:36:59] misguided923: has joined #ruby
[20:40:20] snowy: has joined #ruby
[20:40:24] niceperl: has joined #ruby
[20:42:04] bklane: has joined #ruby
[20:43:39] mfb2: has joined #ruby
[20:44:00] karapetyan: has joined #ruby
[20:44:05] bklane_: has joined #ruby
[20:47:49] ellisTAA: has joined #ruby
[20:48:40] underplank: has joined #ruby
[20:50:47] victortyau: has joined #ruby
[20:50:57] donttrustem: hmm! bundle it is not being added :S
[20:52:44] bklane: has joined #ruby
[20:53:04] skade: has joined #ruby
[20:55:38] ur5us: has joined #ruby
[20:55:52] shevy: bundle bundles the pain
[20:56:41] user: has joined #ruby
[20:58:21] dopie: has joined #ruby
[20:58:59] ellisTAA: has joined #ruby
[20:59:48] Senecea: has joined #ruby
[21:01:41] solocshaw: has joined #ruby
[21:02:33] devbug: has joined #ruby
[21:07:36] kkeuning: has joined #ruby
[21:08:12] who42: has joined #ruby
[21:08:44] bronson: has joined #ruby
[21:09:17] ohaibbq: has joined #ruby
[21:09:54] kkeuning: has joined #ruby
[21:10:51] diegoviola: has joined #ruby
[21:11:15] user: has joined #ruby
[21:11:42] kkeuning: has joined #ruby
[21:11:49] underplank: has joined #ruby
[21:11:54] Protti: has joined #ruby
[21:11:56] Protti: http://www.dailymotion.com/video/x3n23o1_very-sweet-dog-puppy-video_animals
[21:13:01] newbie22: has joined #ruby
[21:13:52] apeiros: .spam Protti
[21:13:54] who42: has joined #ruby
[21:13:56] apeiros: !spam Protti
[21:13:56] ruby[bot]: +bb Protti!*@*$#ruby-banned *!*@2.237.171.7$#ruby-banned
[21:13:57] ruby[bot]: ruby[bot] kicked Protti: is a bannable offense, see http://ruby-community.com/pages/user_rules
[21:14:12] adgtl: has joined #ruby
[21:14:33] kristian_on_linu: has joined #ruby
[21:15:06] Senecea: has joined #ruby
[21:16:12] kristian_on_linu: I'm having some crazy problem, I *think* they have to do with ruby
[21:16:13] Trynemjoel: has joined #ruby
[21:16:31] Radar: We specialise in crazy.
[21:16:38] kristian_on_linu: https://www.reddit.com/r/Jekyll/comments/42g5go/pages_wont_build_after_update_malformed_xml/
[21:16:40] Radar: See, even the spelling of specialise is a bit weird.
[21:17:25] Radar: kristian_on_linu: Is there a way we could try to reproduce this on our machines?
[21:17:42] kristian_on_linu: with jekyll, I guess
[21:18:05] kristian_on_linu: but I think it's smarter if I try getting a proper install first
[21:18:56] who42: has joined #ruby
[21:19:26] Radar: Where is the code so that we can try it?
[21:20:17] stjames: has joined #ruby
[21:20:25] kristian_on_linu: I don't have a public repo
[21:21:03] Radar: I don't think I can help without seeing it happening for myself and tinkering around with it
[21:21:08] kristian_on_linu: but, do you have jekyll and jekyll-scholar
[21:21:11] karapetyan: has joined #ruby
[21:21:18] Radar: I can get jekyll-scholar.
[21:21:35] havenwood: kristian_on_linu: So closed source code is producing malformed XML?
[21:21:49] kristian_on_linu: havenwood: could be
[21:22:15] kristian_on_linu: it's not me being closed source as much as it is me going bunkers when I try to host on Github
[21:22:55] djbkd: has joined #ruby
[21:23:29] kristian_on_linu: I have zipped the dir if you want it?
[21:23:38] Radar: that'll do
[21:24:42] kristian_on_linu: https://www.dropbox.com/s/zoujgnowup65qfj/rk2.zip?dl=0
[21:24:49] Trynemjoel: has joined #ruby
[21:24:51] kristian_on_linu: then just unzip and run jekyll s
[21:25:16] kristian_on_linu: and thanks for wanting to help
[21:25:28] kristian_on_linu: I installed ruby anew three times this evening
[21:25:40] Radar: What makes you think it is Ruby?
[21:25:55] Radar: Or Ruby's fault, to be more precise.
[21:27:54] Radar: Liquid Exception: root node not CSL::Style: #<CSL::Node children=[0]> in /Users/ryanbigg/Downloads/rk2/_posts/2016-01-01-bibliografi.md
[21:27:58] Radar: I get a different error.
[21:28:43] anothermoron: has joined #ruby
[21:28:51] Radar: I don't know where bibliography is supposed to be defined.
[21:28:59] skcin7: has joined #ruby
[21:29:22] Radar: Removing {% bibliography %} from that file makes it work.
[21:30:13] tomphp: has joined #ruby
[21:30:15] Radar: So I think the issue is that bibliography isn't defined for Liquid anywhere.
[21:30:18] kristian_on_linu: but that's the only thing I need :(
[21:31:02] newbie22: Hey guys, I am learning ruby and I have a question... can I get someone to help me ?
[21:31:17] kristian_on_linu: Radar: what can I do about that?
[21:31:25] bklane: has joined #ruby
[21:31:27] havenwood: newbie22: Ask away!
[21:31:34] Radar: kristian_on_linu: I don't know. I haven't used liquid in Jekyll in a long time.
[21:32:04] newbie22: The book I am reading say that I can turn the following two lines into one. what is the one line of code.
[21:32:13] newbie22: in_file = open(from_file)
[21:32:21] newbie22: indata = in_file.read
[21:32:39] txrx: has joined #ruby
[21:32:42] bithon: has joined #ruby
[21:32:47] kristian_on_linu: Radar: what kind of issue is this? jekyll? Liquid? Something else?
[21:32:47] Radar: newbie22: File.read(from_file)
[21:32:55] havenwood: newbie22: It will do even more since it closes the file as well: indata = File.read from_file
[21:33:03] duncannz: has joined #ruby
[21:33:07] Radar: kristian_on_linu: Who / whatever told you to put {% bibliography %} and expect it work.
[21:33:14] Radar: newbie22: which book?
[21:33:41] havenwood: newbie22: In your example you'd need to next: in_file.close
[21:33:45] kristian_on_linu: that would be jekyll scholar
[21:33:45] newbie22: ok "indata = File.read from_file"
[21:33:53] newbie22: Learn Ruby the Hard way
[21:34:02] ebbflowgo: has joined #ruby
[21:34:05] Radar: kristian_on_linu: then file a big there.
[21:34:47] dmr8: has joined #ruby
[21:34:50] lucasb: software is full of bigs
[21:35:09] Radar: lucasb: ironic
[21:37:00] drptbl: has joined #ruby
[21:37:12] kristian_on_linu: my pastebin is the only google hit
[21:37:22] kristian_on_linu: I have a feeling it's something else ...
[21:37:36] kristian_on_linu: what ruby are you people on?
[21:37:46] h99h9h88_: has joined #ruby
[21:37:57] kristian_on_linu: I get ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]
[21:38:15] Radar: Ruby 2.3.0
[21:38:30] skade: has joined #ruby
[21:38:35] JoyfulStudent: has joined #ruby
[21:39:35] kristian_on_linu: that would be development?
[21:39:44] Xeago: has joined #ruby
[21:39:45] Trynemjoel: has joined #ruby
[21:39:45] zhkirill: has joined #ruby
[21:40:25] Senecea: has joined #ruby
[21:41:12] lucasb: stable, as of last xmas
[21:41:49] lacuna: has joined #ruby
[21:42:23] firstdayonthejob: has joined #ruby
[21:42:58] newbie22: how can you check if file does not exists, the opposite of this "File::exist?( path)"
[21:43:28] lucasb: add a "!" before the expression?
[21:44:00] floatingpoint: has joined #ruby
[21:44:25] kristian_on_linu: I got mine via rvm.io
[21:44:41] kristian_on_linu: I wonder why we got different errors, Radar
[21:44:55] Radar: kristian_on_linu: One of the great mysteries.
[21:45:09] Radar: Ruby is more scared of me because I've been doing it longer?
[21:45:50] kristian_on_linu: I have used ruby for this jekyll stuff for ... a couple of years
[21:45:55] havenwood: kristian_on_linu: Different versions of different gems act differently!
[21:46:02] kristian_on_linu: and 95% of the time, it's flawless
[21:46:08] dwfait: has joined #ruby
[21:46:24] kristian_on_linu: but when it fails, it's extremely hard to figure out what's wrong ... at least for me
[21:46:54] JoyfulStudent: has joined #ruby
[21:47:13] havenwood: kristian_on_linu: Most Ruby apps these days have a Gemfile, which a Gemfile.lock is created from that contains the locked in versions of the gems the app is developed with.
[21:47:14] guzzlefry: has joined #ruby
[21:47:32] guzzlefry: Is upgrading from 2.0 to 2.3 likely to break things?
[21:47:53] Radar: guzzlefry: no
[21:48:21] s2013: has joined #ruby
[21:48:36] havenwood: kristian_on_linu: http://bundler.io/rationale.html
[21:49:42] baweaver: has joined #ruby
[21:49:46] Trynemjoel: has joined #ruby
[21:51:01] Senecea: has joined #ruby
[21:53:12] Senecea: has joined #ruby
[21:53:52] bklane: has joined #ruby
[21:54:43] kristian_on_linu: I tried something ... making a new site with jekyll new, then add the bibliography stuff there ... it WORKS!
[21:55:20] Senecea: has joined #ruby
[21:55:22] kristian_on_linu: so the problem is somewhere in my old code
[21:56:23] ruby-lang344: has joined #ruby
[21:56:51] havenwood: kristian_on_linu: so if you had a Gemfile.lock that contained the versions of the gems the app was previously known to work with you could probably get it running with the old code
[21:57:57] kristian_on_linu: I manically deleted everything
[22:01:12] bklane: has joined #ruby
[22:01:45] psf: has left #ruby: (" ")
[22:03:14] havenwood: kristian_on_linu: So now create a Gemfile! Then in the future you'll be able to run your app: https://gist.github.com/havenwood/e673689a3c8f5d910e02
[22:03:17] Ox0dea: TIL _why was (and may well still be) a determinist: http://favstar.fm/users/_why______/status/1523770379
[22:03:38] skade: has joined #ruby
[22:04:21] havenwood: kristian_on_linu: Once you've created your Gemfile, install bundler `gem install bundler` and create a Gemfile.lock with `bundle`.
[22:04:38] havenwood: kristian_on_linu: Now you have it for posterity!
[22:04:52] nfk: has joined #ruby
[22:05:53] havenwood: kristian_on_linu: You can run your app with the exact gems from the Gemfile.lock with: bundle exec jekyll s
[22:06:18] kkeuning: has joined #ruby
[22:06:33] ur5us: has joined #ruby
[22:07:04] kaleido: has joined #ruby
[22:07:31] havenwood: kristian_on_linu: And install those gems on any system with just: bundle
[22:07:32] kristian_on_linu: havenwood: seems very much like overkill
[22:07:43] kaleido: ive got a small sinatra app where im submitting values that will eventually be executed via net-ssh gem, but i need to schedule when it is executed
[22:07:54] kaleido: is there a scheduling gem or something built-in im not aware of?
[22:08:03] Ox0dea: kaleido: Sidekiq.
[22:08:03] kkeuning: has joined #ruby
[22:08:48] Ox0dea: Do be careful about sanitizing your inputs to such a thing.
[22:09:09] kaleido: sidekiq by mperham on github?
[22:09:19] Radar: kaleido: that's the one
[22:09:51] kkeuning: has joined #ruby
[22:10:34] havenwood: kristian_on_linu: Sure, maybe it's overkill if you just want to run it this once and won't need to be again in the future. I just thought that might not be the case since you're running it again now and it's not working.
[22:11:44] kkeuning: has joined #ruby
[22:12:20] stevemackinnon: has joined #ruby
[22:13:07] krobzaur_: has joined #ruby
[22:13:10] Senecea: has joined #ruby
[22:13:29] kkeuning: has joined #ruby
[22:15:19] kkeuning: has joined #ruby
[22:16:08] skade: has joined #ruby
[22:16:12] Ropeney: has joined #ruby
[22:17:14] kkeuning: has joined #ruby
[22:17:49] nertzy2: has joined #ruby
[22:18:29] bklane: has joined #ruby
[22:18:56] toretore: has joined #ruby
[22:20:24] Axy: has joined #ruby
[22:20:24] Axy: has joined #ruby
[22:21:01] Senecea: has joined #ruby
[22:22:54] stamina: has joined #ruby
[22:23:02] einarj: has joined #ruby
[22:24:12] kristian_on_linu: anyway, thanks for the help, all
[22:25:41] djbkd: has joined #ruby
[22:28:54] ascarter: has joined #ruby
[22:29:05] minimalism: has joined #ruby
[22:29:14] jamw: has joined #ruby
[22:31:32] bklane_: has joined #ruby
[22:32:07] oivoodoo: has joined #ruby
[22:32:50] ajf-: has joined #ruby
[22:34:35] bklane: has joined #ruby
[22:36:04] Limix: has joined #ruby
[22:36:27] kristian_on_linu: bibtex_skip_fields: [:abstract]
[22:36:46] jnj: has joined #ruby
[22:37:08] FernandoBasso: has joined #ruby
[22:37:30] Ox0dea: It's syntactically valid.
[22:38:06] floatingpoint: has joined #ruby
[22:38:29] jnj: I'm having an issue comparing strings. I currently have a script that goes through a text file where each line is a word. I then iterate through the text file line by line using f.each_line do |line|, and then I have an if statement that says if line == "XXXXXX" do this, but the if statement is not being triggered.
[22:38:55] lucasb: maybe line.chomp!
[22:39:06] CloCkWeRX: has joined #ruby
[22:39:44] lucasb: or line.strip! is there's leading and trailing whitespace you don't want to consider
[22:39:52] lucasb: *if there's ...
[22:39:53] Radar: ?gist jnj
[22:39:54] ruby[bot]: jnj: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[22:40:10] Ox0dea: Radar: jnj just needs #chomp!.
[22:40:14] Rasi: has joined #ruby
[22:41:27] volty: has joined #ruby
[22:41:31] spooq: has joined #ruby
[22:41:54] arlek: has joined #ruby
[22:42:03] h99h9h88: has joined #ruby
[22:42:20] floatingpoint: has joined #ruby
[22:42:40] jnj: Ah, so I would just do line.chomp then to get rid of /n>
[22:42:45] skade: has joined #ruby
[22:42:49] ruby[bot]: Why don't you try it and see for yourself?
[22:42:58] blur3d: has joined #ruby
[22:43:00] zenlot2: has joined #ruby
[22:44:18] symm-: has joined #ruby
[22:45:17] tildes: has joined #ruby
[22:45:30] volty: chat.reject(&:rhetoric)
[22:46:45] Ox0dea: jnj: If you've got exactly one word per line and your file's not crazy-big, you might prefer `File.read('foo').split.each { ... }`.
[22:47:20] Trynemjoel: has joined #ruby
[22:48:14] jnj: 0x0dea: Thanks, I'll try that out
[22:48:27] Mia: has joined #ruby
[22:48:27] Mia: has joined #ruby
[22:49:07] kalopsian: has joined #ruby
[22:49:09] Yzguy: has joined #ruby
[22:49:11] hannelita: has joined #ruby
[22:49:26] ziyadb: has joined #ruby
[22:50:37] baweaver: has joined #ruby
[22:51:59] znz_jp: has joined #ruby
[22:52:21] Trynemjoel: has joined #ruby
[22:52:35] diegoviola: has joined #ruby
[22:55:41] zeroDivisible: has joined #ruby
[22:56:51] n7fal: has joined #ruby
[22:57:14] n7fal: has left #ruby: ()
[22:57:43] Cohedrin: has joined #ruby
[22:58:04] penne12: has joined #ruby
[23:00:14] lucasb: From an array, I wanted all elements except the index N. I arrived at the following: 'ary.dup.tap {|x| x.delete_at(1) }'. I wonder if there's a better way?
[23:00:17] Senecea: has joined #ruby
[23:03:38] kalopsian: has joined #ruby
[23:05:59] volty: values_at(0..n-1, n+1..-1)
[23:06:32] tobiasvl: ary - ary[1]
[23:06:37] Ox0dea: tobiasvl: Nope.
[23:06:54] aspiers: has joined #ruby
[23:07:28] dexter-tzu: has joined #ruby
[23:07:32] lucasb: volty: yeah, I considered that. But you would have to change -1 there to the actual last index
[23:07:42] Ox0dea: tobiasvl: Not even `ary - [ary[1]]`, I mean.
[23:07:50] amoeba: lucasb: -1 means "last" in this case
[23:07:52] volty: lucasb: why change -1 ?
[23:08:07] lucasb: 10..-1 is a range without elements, right?
[23:08:29] volty: it's a specific array's range
[23:09:08] lucasb: ahh, it works, sorry :)
[23:09:15] asccigcc: has joined #ruby
[23:11:22] bronson: has joined #ruby
[23:13:07] ellisTAA: has joined #ruby
[23:13:29] diego2: has joined #ruby
[23:13:29] DoubleMalt: has joined #ruby
[23:14:21] volty: ops, not specific, it just gets adapted -normal range, adapted / transformed, for the array. Moved by size (added) to the right, then modulo size. Probably, imho
[23:14:21] Ox0dea: lucasb: Be brave: https://eval.in/507312
[23:15:59] ascarter: has joined #ruby
[23:16:21] adgtl: has joined #ruby
[23:16:29] mg^^: has joined #ruby
[23:16:44] aryaching: has joined #ruby
[23:18:20] lucasb: Ox0dea: the _.method(args) is just a way to closure over the args? in the curry/partial application sense?
[23:18:27] jespada: has joined #ruby
[23:18:32] asccigcc: has joined #ruby
[23:18:48] ruby-lang665: has joined #ruby
[23:19:24] Ox0dea: lucasb: Well, it's just gotta build up a chain of calls; the #reduce there is just a glorified loop over said chain.
[23:19:25] lucasb: thanks everybody for the suggestions. the #values_at is a viable option, but for now I'll stick with #delete_at
[23:19:39] ruby-lang665: I've got a quick question if it's not too busy.
[23:19:50] Ox0dea: It's super-busy, but we're quite accommodating.
[23:19:51] havenwood: ruby-lang665: ask away
[23:19:57] bklane_: has joined #ruby
[23:20:22] lucasb: and btw, I wish Array#delete and #delete_at could accept more than one argument. I would be useful.
[23:20:29] ruby-lang665: Is there a date picker specifically for Ruby or only in rails?
[23:21:09] Ox0dea: A data picker for a webpage?
[23:21:48] ruby-lang665: a script. trying to calculate per diem from a certain date to another given date.
[23:21:52] skade: has joined #ruby
[23:22:21] ruby-lang665: Just working on a terminal app
[23:22:47] Ox0dea: And you don't trust your users to understand MMDD? :P
[23:22:48] KrzaQ: ['10', '10', '10'].map(:to_i) <-- why is this inocrrect? I'm pretty sure I had this syntax working before
[23:22:59] Ox0dea: KrzaQ: Gotta be &:to_i.
[23:23:02] havenwood: KrzaQ: &:to_i
[23:23:09] Ox0dea: The bare Symbol only works for #reduce.
[23:23:10] ruby-lang665: Sure. just for practice.
[23:23:26] jcdesimp: has joined #ruby
[23:23:37] Ox0dea: ruby-lang665: Well, terminals can indeed respond to mouse events, but it's not very pretty.
[23:23:51] Ox0dea: Are you wanting it to be clicky-clicky or keyboard-driven?
[23:23:59] DanielI: has joined #ruby
[23:24:00] ruby-lang665: keyboard driven is just fine.
[23:24:13] Ox0dea: So, like... arrowing around on a calendar?
[23:25:08] ruby-lang665: Yeah, assigning for instance Nov 15 is what day of the year, and then calculate the number of days from then until Now.
[23:25:24] havenwood: ruby-lang665: maybe you'd like the Chronic gem: https://github.com/mojombo/chronic#readme
[23:26:30] djbkd: has joined #ruby
[23:26:35] s2013: has joined #ruby
[23:26:42] ruby-lang665: I am only really familiar with gems in hacking a rails app, do they work the same in plain ruby? I am assuming there is a readme?
[23:27:28] diego2: has joined #ruby
[23:28:07] malice: Hello! Is there some way to add item to Hash I'm iterating over?
[23:28:40] havenwood: ruby-lang665: Gems work great, but yyyy-mm-dd or such sure is simple if you can do a standard format for input.
[23:29:01] themsay2: has joined #ruby
[23:29:12] veduardo: has joined #ruby
[23:29:35] Ox0dea: malice plz
[23:29:42] malice: Ox0dea: :)
[23:29:55] devbug_: has joined #ruby
[23:30:13] dcunit3d: has joined #ruby
[23:30:16] ruby-lang665: Yeah, that's not an issue. At least I hope not.
[23:30:33] malice: Ox0dea:I'm rewriting the Earley Parser algorithm from Python to Ruby, and Earley wants you to iterate over container that expands during iteration. I thought that because hashes in Ruby are ordered, this would not be a problem.
[23:30:35] davedev24: has joined #ruby
[23:30:44] malice: Looks like I was mistaken, and I want to bypass this limitation.
[23:31:11] blarghlarghl: lucasb: ah thanks. i ended up solving it a different way, but thank you for the help!
[23:31:27] diego2: has joined #ruby
[23:31:28] Ox0dea: malice: You'll have to get your hands dirty.
[23:31:37] diego2: has joined #ruby
[23:32:35] DanielI: has joined #ruby
[23:34:19] malice: Ox0dea:meaning? Implementing one on my own?
[23:36:11] bklane: has joined #ruby
[23:36:14] beagle: has joined #ruby
[23:36:27] Ox0dea: malice: Hmm... what kinda keys?
[23:36:31] pragmatism: has joined #ruby
[23:37:18] malice: Ox0dea:Keys are arrays
[23:37:26] Ox0dea: Those're mutable! :)
[23:37:43] malice: Meaning? I'm not too god in Ruby.
[23:37:47] malice: too good*
[23:37:59] havenwood: >> original = {[:aim] => true, [:forgotten] => false}; original.merge original.map { |k, v| [[v], [k, :stuff]] }.to_h
[23:38:01] ruby[bot]: havenwood: # => {[:aim]=>true, [:forgotten]=>false, [true]=>[[:aim], :stuff], [false]=>[[:forgotten], :stuff]} (https://eval.in/507313)
[23:38:10] havenwood: malice: There ^ Array keys, now you've done it!
[23:38:18] themsay: has joined #ruby
[23:38:54] s2013: has joined #ruby
[23:39:03] Ox0dea: havenwood: Needs to happen during iteration.
[23:39:09] Ox0dea: MRI raises a RuntimeError.
[23:39:18] Ox0dea: It won't be doable by way of Hash#[]=.
[23:39:22] havenwood: yeah, that's not allowed!
[23:39:31] Ox0dea: We can do it! We have the Fiddle.
[23:39:45] havenwood: egads, what have i walked into!?
[23:40:14] malice: Glad to bring you joy guys! But unforutnately I still feel quite lost!
[23:40:48] Ox0dea: malice: You know not the tribulations involved in bending the language to this particular whim of yours.
[23:40:53] malice: I might look retarded, but it's that I just don't know Ruby to well. What does it mean that they're mutable? Are you suggesting that I should use Arrays instead of hashes, or what?
[23:41:03] havenwood: malice: What are you trying to achieve? What do you have as input value and what do you want as output value?
[23:41:15] malice: Ox0dea: I know how it works in lisp, and it's wonderful in there.
[23:42:03] malice: havenwood: I want to implement Earley parser. I have an example in Python, I tried rewritting it in Ruby.
[23:42:33] havenwood: malice: hmm, i don't know early parser
[23:42:39] ellisTAA: has joined #ruby
[23:43:02] malice: havenwood: But generally I am iterating over a hash that can grow over a time. I have a starting rule, and I expand it into other rules - and I add these rules into the hash I'm iterating over, so I can continue my job.
[23:43:08] malice: Kind of works this way.
[23:43:13] havenwood: http://kschiess.github.io/parslet/
[23:43:31] bklane_: has joined #ruby
[23:43:55] havenwood: or https://github.com/jmettraux/neg#readme
[23:44:00] Xeago: has joined #ruby
[23:44:05] havenwood: malice: hmm
[23:44:41] malice: havenwood: I actually need to implement this parser, I'm helping my friend with her uni stuff. Plus, it'll help me(and her) understand the algorithm.
[23:45:33] malice: havenwood: If I needed a parser, the first thing I'd do is look for libs :)
[23:46:23] M-mistake: has joined #ruby
[23:46:38] havenwood: malice: neg is small enough it might be interesting as a reference regarding code, dunno
[23:46:47] havenwood: malice: yeah, parslet's more for using ;)
[23:47:06] h99h9h88: has joined #ruby
[23:47:38] BTRE: has joined #ruby
[23:48:36] bklane: has joined #ruby
[23:49:04] malice: Well, looks like I'll have to use arrays somehow.
[23:49:17] malice: I actually have an idea. Too bad Ruby doesn't allow this kind of thing.
[23:51:07] Ox0dea: malice: I mean, it really doesn't like it: https://eval.in/507315
[23:51:13] victortyau: has joined #ruby
[23:51:24] jespada: has joined #ruby
[23:51:24] baweaver: has joined #ruby
[23:51:25] Ox0dea: Even trying to do it by poking around in raw memory doesn't fly.
[23:52:50] bklane: has joined #ruby
[23:53:00] Couch: has joined #ruby
[23:54:08] jamw: has joined #ruby
[23:55:22] tomchapin: has joined #ruby
[23:55:58] themsay: has joined #ruby
[23:56:04] malice: Ox0dea: I guess I'll just do it like they did in Python then.
[23:56:27] ebbflowgo: has joined #ruby
[23:56:29] Ox0dea: Do they mutate a dictionary during iteration?
[23:56:42] malice: Ox0dea: make separate class to keep hash and array, add to both, iterate only over array. Something like that
[23:56:54] malice: Although I'm not sure now if it'll work.
[23:57:01] ur5us: has joined #ruby
[23:57:03] malice: idk, I'm not really fond of Python
[23:58:23] domgetter: has joined #ruby
[23:58:43] zenlot2: has joined #ruby