« Back to channel list

#ruby - 14 January 2016

« Back 1 day Forward 1 day »
[00:00:07] ICantCook: has joined #ruby
[00:01:23] sankaber: has joined #ruby
[00:02:19] felixdd: has joined #ruby
[00:02:50] moei: has joined #ruby
[00:03:20] Radar: rvm? /me makes the sign of the cross
[00:03:51] volty: has joined #ruby
[00:05:17] volty: what do you guys use to interface with sqlite ?
[00:06:13] Radar: volty: ActiveRecord typically, but that's through the Rails apps. If it's not Rails then it'd be Sequel.
[00:07:47] kalopsian: has joined #ruby
[00:08:42] dcunit3d: has joined #ruby
[00:09:24] stannard: has joined #ruby
[00:09:29] dopie: has joined #ruby
[00:09:56] nerfando: has joined #ruby
[00:11:05] nerfando: has joined #ruby
[00:11:23] volty: Radar: thx, i am going to install it. Can you anyway suggest something very very simple? I am looking for a proof of concept on scanning tagged files, so I prefer just a db with one table, for now)
[00:12:10] Radar: volty: something very very simple for interacting with a DB? Sequel is simple.
[00:12:17] nerfando: has joined #ruby
[00:12:54] volty: ah, ok, I saw it's powerful, and was afraid would have to learn a lot, thx :)
[00:13:19] guacamole: has joined #ruby
[00:13:54] ico: has joined #ruby
[00:14:15] s00pcan: has joined #ruby
[00:14:51] jgt1: has joined #ruby
[00:19:52] vishwa: has left #ruby: ()
[00:20:37] Radar: na it's syntax is fairly easy
[00:22:51] hannelita: has joined #ruby
[00:25:56] Domaldel: has joined #ruby
[00:26:23] solocshaw: has joined #ruby
[00:28:04] FooMunki: has left #ruby: ()
[00:28:17] gigetoo: has joined #ruby
[00:29:44] guacamole: has joined #ruby
[00:30:08] chipotle: has joined #ruby
[00:33:27] DLSteve: has joined #ruby
[00:34:10] exceion: has joined #ruby
[00:36:15] Darmani: has joined #ruby
[00:36:23] Darmani: Hey kids ^^
[00:36:47] guacamole: has joined #ruby
[00:37:18] Axsuul: has joined #ruby
[00:37:34] Radar: yeah I agree that Darma... OH HEY
[00:37:39] defendguin: has joined #ruby
[00:38:18] Darmani: you agree that he is handsome, and charming and you wish you were just like him?
[00:38:25] Darmani: That's what you were going to say wasn't it?
[00:39:46] dopie: has joined #ruby
[00:41:05] jbrhbr1: has joined #ruby
[00:43:23] sankaber: has joined #ruby
[00:44:23] guacamole: has joined #ruby
[00:47:52] d0nn1e: has joined #ruby
[00:50:52] rkazak: has joined #ruby
[00:52:51] shevy: he loves you
[00:55:30] antgel: has joined #ruby
[00:55:52] cbyrda: has joined #ruby
[00:57:23] haraigo: has joined #ruby
[00:57:28] atomical: has joined #ruby
[00:57:46] crdpink: has joined #ruby
[00:58:11] zambini: has joined #ruby
[00:58:33] Limix: has joined #ruby
[01:00:28] haraigoshi: has joined #ruby
[01:01:18] Darmani: @shevy I love him
[01:01:21] Darmani: nothing could keep us apart
[01:01:38] Ox0dea: Darmani: Nothing could bring you together.
[01:02:00] Ox0dea: Nothing ever really touches: https://www.youtube.com/watch?v=yE8rkG9Dw4s
[01:02:44] Darmani: @Ox0dea - Lol that guy has never been laid.
[01:02:46] Darmani: Like ever.
[01:03:05] Ox0dea: I have proof to the contrary.
[01:03:17] kalopsian: has joined #ruby
[01:03:28] Darmani: Of course you do. Do you watch through his window with your binoculars?
[01:03:41] shevy: nerd video!!!
[01:03:45] Ox0dea: It's 2016.
[01:03:53] Ox0dea: s/binoculars/drone/
[01:04:40] shevy: Darmani you are right down at my level :)
[01:04:53] Darmani: @shevy - He asked me for my number the other day
[01:04:56] Darmani: fuckin creep
[01:05:00] Ox0dea: He gave it to me.
[01:05:05] zambini: has left #ruby: ()
[01:05:13] zambini: has joined #ruby
[01:05:13] shevy: do not trust people on the internets!
[01:05:55] Darmani: that's too funny..
[01:06:09] Darmani: All hail Ox0dea, the king of witty banter.
[01:06:09] harai: has joined #ruby
[01:06:27] bronson: has joined #ruby
[01:06:27] Darmani: or queen* I should say.
[01:07:42] Ox0dea: > mfw I haven't yet claimed my prize for fluffiest female beard
[01:07:59] Guest11: has joined #ruby
[01:08:00] Guest11_: has joined #ruby
[01:08:01] bronson: has joined #ruby
[01:08:08] binaryplease: Hi what library can I use to edit headers in emails saved as files (maildir, offlineimap)? I need to add a label to 'X-Keywords'
[01:08:33] Insti: has joined #ruby
[01:09:59] shevy: binaryplease I am not sure but I think the "mail" gem should in principle allow you to re-edit these components... I am not sure if it works offline but you can probably load up a local email too, then modify it before re-saving it https://rubygems.org/gems/mail/
[01:10:44] zast: has joined #ruby
[01:11:10] dstarh: has joined #ruby
[01:11:29] dcunit3d: has joined #ruby
[01:14:18] KnownSyntax: has joined #ruby
[01:14:20] KnownSyntax: has joined #ruby
[01:16:00] volty: i find sequel fantastic
[01:16:46] Ox0dea: It's a great library.
[01:17:19] symm-: has joined #ruby
[01:18:04] baweaver: has joined #ruby
[01:18:44] huluhuluhulu: has joined #ruby
[01:19:45] ph1nary: has joined #ruby
[01:21:47] volty: let's say I have BASE_DIR = '/home/volty/audio/rsc', is there a lib to strip it from a filename, or i have to subst it ?
[01:22:04] jamw: has joined #ruby
[01:23:37] mary5030: has joined #ruby
[01:23:50] binaryplease1: has joined #ruby
[01:24:53] astrobun_: has joined #ruby
[01:25:34] volty: nm, subst-ed it.
[01:26:28] mchu: has joined #ruby
[01:26:38] ReK2: has joined #ruby
[01:26:40] binaryplease1: shevy: yes I can add headers, but I can't figure out how to write the file?
[01:27:13] spstarr: has joined #ruby
[01:27:25] spstarr: Does File.basename work for directories?
[01:27:38] spstarr: if /foo/bar/baz/woot return 'woot' ?
[01:27:54] volty: yes, it operates on the string
[01:29:48] tvw: has joined #ruby
[01:30:56] guacamole: has joined #ruby
[01:32:27] karapetyan: has joined #ruby
[01:32:31] mistermocha: has joined #ruby
[01:34:37] guacamole: has joined #ruby
[01:34:44] Oog: has joined #ruby
[01:36:29] Oog: why is the match with '(123) 456-7890'.scan(/(\([0-9]{3}\) |[0-9]{3}-)[0-9]{3}-[0-9]{4}/) different than '(123) 456-7890'.match(/(\([0-9]{3}\) |[0-9]{3}-)[0-9]{3}-[0-9]{4}/)
[01:37:02] Oog: the first gives me "(123) " but the second gives me the whole number which is what i want... but as a scanner
[01:37:12] tvw: has joined #ruby
[01:38:03] apeiros: Oog: did you read the docs for the two?
[01:38:56] apeiros: do you know what a capturing group is?
[01:38:59] griffindy: has joined #ruby
[01:39:27] Oog: yes the ()
[01:39:53] apeiros: "If the pattern contains groups, each individual result is itself an array containing one entry per group."
[01:40:50] apeiros: that's part of the docs for String#scan. your regex has a capturing group (or "group" as it is called in the docs) which matches the "(123) ". and hence that's what you get.
[01:41:09] mistermocha: has joined #ruby
[01:41:10] apeiros: i.e., it matches the full string too, but scan won't return the full match.
[01:41:51] huluhuluhulu_: has joined #ruby
[01:42:02] jamw: has joined #ruby
[01:42:41] skade: has joined #ruby
[01:42:44] spstarr: ok im still stuck on something
[01:43:07] jamw: has joined #ruby
[01:43:13] spstarr: Dir.glob("/tmp/*").each { |path| File.basename(path) }
[01:43:29] spstarr: how do get it ti return it so it shows the path stripped?
[01:43:43] spstarr: puts File.basename(path) shows it stripped
[01:44:04] apeiros: that's three "it" with each probably referring to something else??? nice :-p
[01:44:30] apeiros: I'll venture a guess: you want .map instead of .each
[01:44:51] cbyrda: has joined #ruby
[01:44:53] spstarr: is it a map though? but an array?
[01:45:03] apeiros: map is a method, not a datastructure.
[01:45:09] apeiros: you map the array, which returns an array.
[01:46:43] Oog: apeiros interesting... so with scan i cant get the full matches?
[01:46:53] apeiros: you can. read the docs.
[01:47:00] apeiros: it's there. including examples.
[01:48:10] volty: my advice is to forget about scan except for very simple parsing - that is going to remain simple
[01:48:30] aaeron: has joined #ruby
[01:48:34] volty: s/parsing/matching/
[01:48:48] apeiros: scan is great
[01:49:07] apeiros: but it helps to understand why there's scan and match and the difference between the two.
[01:49:09] volty: yap, just for certain matches
[01:49:17] apeiros: same as .match
[01:50:00] dlitvak: has joined #ruby
[01:50:12] apeiros: I almost only ever use .match if I want to chain .captures on it.
[01:50:18] ss_much: has joined #ruby
[01:50:23] volty: as long as you do not groups & subgroups
[01:50:52] cbyrda: has joined #ruby
[01:51:21] apeiros: assuming subgroups = nested capturing groups - those are equivalently problematic in all matching methods in ruby (and honestly a bit of a sad story)
[01:51:24] gregf: has joined #ruby
[01:51:24] B1n4r10: has joined #ruby
[01:51:42] apeiros: oh, actually, revoke that. quantified capturing groups are what I thought of.
[01:51:47] apeiros: nested capturing groups are fine.
[01:52:31] volty: scan is very nice when what you have to match is straightforward, i remember the nightmares when parens appear, you can easily get lost & tired. these are for long-time experts, imho
[01:53:14] volty: when i am not in top form, and something not quite simple appears, i go with match, and later try the same with scan --- just for the beauty :)
[01:53:27] apeiros: you may want to use either composed regexen then or //x
[01:53:32] apeiros: so you don't get lost in your regex???
[01:53:35] bkxd: has joined #ruby
[01:53:37] myntcake: has joined #ruby
[01:53:48] volty: yes, that's a good advice :)
[01:53:50] flappynerd: has joined #ruby
[01:53:52] apeiros: you??? can't do the same with match as you do with scan
[01:54:16] apeiros: if what you do can be done with match you probably shouldn't change it to scan.
[01:54:56] volty: yes, but you get the whole picture, through iteration (of trial & pass) - on more complex stuff, of course
[01:55:20] volty: yes, but it's like a challenge :)
[01:55:40] jbrhbr: volty: the /x suggestion is good if you find yourself confused, or you could build them up part by part, or you could use more string methods so your regex aren't as complicated
[01:56:03] apeiros: for playing around, there's pry
[01:56:14] volty: i play by hand
[01:56:28] jbrhbr: and http://rubular.com/
[01:56:41] apeiros: and debuggex.com, and various others
[01:57:31] volty: ah, i have it implemented in qtruby (like rubular), though have to check it
[01:59:08] huluhuluhulu: has left #ruby: ()
[01:59:14] guacamole: has joined #ruby
[02:01:41] nerium: has left #ruby: ()
[02:01:47] volty: i see rubular got better, real time . i had the mine offer a choice of match | scan | split
[02:02:32] sankaber: has joined #ruby
[02:05:02] jud: has joined #ruby
[02:05:55] rkazak: has joined #ruby
[02:07:09] guacamole: has joined #ruby
[02:07:27] finisherr: has joined #ruby
[02:07:27] asmodlol: has joined #ruby
[02:07:58] LMity: has joined #ruby
[02:08:10] CloCkWeRX: has joined #ruby
[02:09:49] speakingcode: has joined #ruby
[02:10:38] pdoherty: has joined #ruby
[02:12:02] Guest27082: has joined #ruby
[02:12:08] bricker: has joined #ruby
[02:13:44] djbkd_: has joined #ruby
[02:16:38] roshanavand: has joined #ruby
[02:16:42] Puffball: has joined #ruby
[02:17:16] ebbflowgo: has joined #ruby
[02:19:29] crankharder: has joined #ruby
[02:19:53] rkazak: has joined #ruby
[02:20:06] dextertzu: has joined #ruby
[02:22:02] colegatron: has joined #ruby
[02:22:57] gizmore: has joined #ruby
[02:24:14] Rodya_: has joined #ruby
[02:25:04] gizmore|2: has joined #ruby
[02:27:01] mary5030_: has joined #ruby
[02:28:53] KayKayKay: has joined #ruby
[02:28:53] ChanServ: +b *!*@gateway/web/freenode/ip.24.6.45.239
[02:28:53] ChanServ: ChanServ kicked kaykaykay: goodbye
[02:28:54] TomPeed: has joined #ruby
[02:28:55] ruby[bot]: -b *!*@gateway/web/freenode/ip.24.6.45.239
[02:29:49] edwinvdgraaf: has joined #ruby
[02:33:19] lemur: has joined #ruby
[02:33:39] Bloomer: has joined #ruby
[02:33:55] karapetyan: has joined #ruby
[02:36:26] hannelita: has joined #ruby
[02:37:35] Limix: has joined #ruby
[02:37:35] RahulT: has joined #ruby
[02:38:33] DLSteve: has joined #ruby
[02:39:51] hahuang65: has joined #ruby
[02:40:58] hahuang65: has joined #ruby
[02:41:26] hahuang65: has joined #ruby
[02:42:09] aaeron: has joined #ruby
[02:43:41] gbgdev: has joined #ruby
[02:44:18] dlitvak: has joined #ruby
[02:46:02] tvw: has joined #ruby
[02:48:53] northfurr: has joined #ruby
[02:49:51] AnoHito_: has joined #ruby
[02:50:12] D9: has joined #ruby
[02:50:26] _djbkd: has joined #ruby
[02:50:32] resin_: has joined #ruby
[02:51:07] PaulCape_: has joined #ruby
[02:51:21] smactive_: has joined #ruby
[02:52:29] RazorX: has joined #ruby
[02:52:34] mayamai: has joined #ruby
[02:52:39] reaVer: has joined #ruby
[02:53:23] emhs: has joined #ruby
[02:53:23] mame2: has joined #ruby
[02:53:23] D9: has joined #ruby
[02:53:23] Raboo_: has joined #ruby
[02:53:23] emhs: has joined #ruby
[02:53:24] KillerFox: has joined #ruby
[02:53:24] Veejay: has joined #ruby
[02:53:24] awk: has joined #ruby
[02:53:24] lysw123: has joined #ruby
[02:53:24] abra0: has joined #ruby
[02:53:24] rns: has joined #ruby
[02:53:24] mc_fail: has joined #ruby
[02:53:26] cfloare: has joined #ruby
[02:53:28] shaman42: has joined #ruby
[02:53:28] atomical_: has joined #ruby
[02:53:38] tw1sted: has joined #ruby
[02:53:50] Dimik: has joined #ruby
[02:53:59] pragmatism: has joined #ruby
[02:54:02] TheBrayn: has joined #ruby
[02:54:03] hypnosb: has joined #ruby
[02:54:04] gnarld_: has joined #ruby
[02:54:13] kadoppe: has joined #ruby
[02:54:17] yfeldblum: has joined #ruby
[02:54:26] rmrrn: has joined #ruby
[02:54:27] rmrrn: has joined #ruby
[02:54:28] inkky: has joined #ruby
[02:54:36] sdothum: has joined #ruby
[02:55:30] tockitj: has joined #ruby
[02:56:51] bricker: has joined #ruby
[02:57:31] gizmore: has joined #ruby
[03:00:23] mostlybadfly: has joined #ruby
[03:01:09] rakm: has joined #ruby
[03:03:49] arescorpio: has joined #ruby
[03:04:46] pawnbox: has joined #ruby
[03:05:13] gizless: has joined #ruby
[03:06:02] gizmore|2: has joined #ruby
[03:06:33] grill: has joined #ruby
[03:09:19] bkxd: has joined #ruby
[03:09:21] Ebok: Alright there are two general commands I'm looking for. the first you call on an object to get a list of the instance variables, and the second is the method you call on an object to get a list fo the methods contains within.
[03:09:37] Ebok: Imma RubyDoc for this, but if someone replies here before I find them, sweet
[03:10:03] bronson: has joined #ruby
[03:10:38] tomchapin: has joined #ruby
[03:11:09] havenwood: Ebok: #instance_variables and #methods
[03:11:16] havenwood: Ebok: This isn't homework, is it? :P
[03:11:18] Ebok: thankyou. And lol
[03:11:41] Ebok: this is a Ox0dea puzzle, that I needed some clarification on some internals for
[03:12:20] Ebok: ( I wish it was homework, that would be fun class )
[03:12:51] rakm: has joined #ruby
[03:13:38] havenwood: >> methods.grep /instance/
[03:13:39] ruby[bot]: havenwood: # => [:instance_of?, :instance_variable_get, :instance_variable_set, :instance_variable_defined?, :remove ...check link for more (https://eval.in/501868)
[03:14:38] gizmore: has joined #ruby
[03:14:47] havenwood: Ebok: you can grep for methods too, that's fast ^
[03:15:03] cscheib: Ox0dea has puzzles? where would those be at?
[03:15:33] cscheib: currently going through the book "Exercises for Programmers."
[03:15:36] Ebok: they're probably not puzzels to the initiated. :P
[03:16:13] Ebok: Also, thankyou havenwood. I didnt even know what grep was until you used that
[03:16:19] ebbflowgo: has joined #ruby
[03:16:30] cscheib: wut, didn't know about grep?
[03:16:43] cscheib: need to look at learning the common CLI utils
[03:16:51] Ebok: I've got almost 65 days of programming knowhow.
[03:16:53] cscheib: super useful
[03:16:59] Ebok: I'll look into that.
[03:17:39] Ebok: Ah. Thats where that's from. Cool
[03:18:11] Ebok: I've seen grep used before, though I think it was when I was trying to debug errors I was getting when installing ruby into an ancient macbook.
[03:18:18] hahuang61: has joined #ruby
[03:18:19] Ebok: Been too long.
[03:19:34] jquerysucks: has joined #ruby
[03:19:34] ChanServ: +b *!*@gateway/web/freenode/ip.24.6.45.239
[03:19:34] ChanServ: ChanServ kicked jquerysucks: goodbye
[03:19:34] ruby[bot]: -b *!*@gateway/web/freenode/ip.24.6.45.239
[03:19:37] atomical: has joined #ruby
[03:19:56] cscheib: think a couple of the codeschool/codeacademy/etc... type sites have some free CLI interactive tutorials
[03:21:25] Ebok: I'll set aside some time to do that this weekend, thanks for the tip.
[03:22:44] cscheib: one of the few ways I can be helpful currently :P
[03:23:16] cscheib: I come from an ops background, with multiple attempts to learn a number of languages, never got much past the superficial stuff in anything but perl
[03:23:33] cscheib: and I've purged perl, mostly, heh
[03:28:39] Ebok: I had ten minutes of Java some nine years ago.
[03:28:51] Ebok: And about 30 minutes of combined learning for css and html
[03:29:01] Ebok: <_<; Otherwise, Its all about Ruby
[03:29:31] Ebok: Which is coming along, though I'm still slipping with some foundational logic.
[03:32:55] krz: has joined #ruby
[03:33:16] atomical_: has joined #ruby
[03:36:33] Rodya_: has joined #ruby
[03:37:00] hannelita: has joined #ruby
[03:38:18] welovfree: has joined #ruby
[03:38:26] welovfree: has left #ruby: ("Leaving")
[03:43:25] baweaver: has joined #ruby
[03:43:30] dangeranger: has joined #ruby
[03:44:22] cpup: has joined #ruby
[03:45:49] grill: has joined #ruby
[03:48:19] harly: has joined #ruby
[03:49:05] artX000: has joined #ruby
[03:54:23] dfinninger: has joined #ruby
[03:54:46] drocsid: has joined #ruby
[03:56:41] RobertBirnie: has joined #ruby
[03:58:42] atomical: has joined #ruby
[04:00:36] hannelita: has joined #ruby
[04:01:36] noodle: has joined #ruby
[04:02:30] iateadonut: has joined #ruby
[04:02:47] sdwrage: has joined #ruby
[04:04:26] PaulCapestany: has joined #ruby
[04:04:55] zacts: where may I find doc for the core ruby language itself, not of APIs, but things like Pragmas?
[04:05:02] zacts: (If this question even makes sense, I'm a newbie)
[04:06:07] cscheib: zacts: ruby-lang.org ?
[04:07:12] usershell: has joined #ruby
[04:08:31] vdamewood: has joined #ruby
[04:09:04] arup_r: has joined #ruby
[04:09:56] bluOxigen: has joined #ruby
[04:10:39] braincrash: has joined #ruby
[04:10:41] usershell: has joined #ruby
[04:11:13] crdpink: has joined #ruby
[04:11:14] stannard: has joined #ruby
[04:11:22] cscheib: zacts: or maybe http://ruby-doc.org/core-2.3.0/
[04:19:06] freerobby: has joined #ruby
[04:20:40] B1n4r10: has joined #ruby
[04:21:06] flappynerd: has left #ruby: ()
[04:30:41] terminalrecluse: has joined #ruby
[04:31:56] M-Technic: has joined #ruby
[04:32:22] lacuna: has joined #ruby
[04:33:07] kalopsian: has joined #ruby
[04:33:34] northfurr: has joined #ruby
[04:33:39] cornerma1: has joined #ruby
[04:34:29] pawnbox: has joined #ruby
[04:35:47] sgambino: has joined #ruby
[04:37:01] crdpink: has joined #ruby
[04:37:33] atomical_: has joined #ruby
[04:38:35] UtkarshRay: has joined #ruby
[04:38:48] kp666: has joined #ruby
[04:39:56] kp666: has joined #ruby
[04:40:20] ICantCook: has joined #ruby
[04:41:34] drocsid: has joined #ruby
[04:43:10] kp666: has joined #ruby
[04:44:19] ror15: has joined #ruby
[04:45:32] kp666: has joined #ruby
[04:46:13] northfurr: has joined #ruby
[04:47:55] kp666: has joined #ruby
[04:49:06] n00bDev: has joined #ruby
[04:50:09] kp666: has joined #ruby
[04:51:27] pawnbox: has joined #ruby
[04:52:10] baweaver: has joined #ruby
[04:56:09] calderonroberto: has joined #ruby
[04:56:14] zacts: cscheib: let me try ruby-doc.org/core-2.3.0
[04:56:27] zacts: cscheib: I guess there is this pragma just introduced in 2.3.0
[04:56:36] zacts: and I couldn't find good doc on it, or pragmas like it, in general
[04:56:58] zacts: namely: https://bugs.ruby-lang.org/issues/11473
[04:58:15] aaeron: has joined #ruby
[04:58:19] Yzguy: has joined #ruby
[04:59:00] zacts: the frozen string literal pragma
[04:59:30] Ox0dea: zacts: "Pragma" isn't being used canonically within the source tree.
[04:59:34] tmtwd: has joined #ruby
[04:59:35] Ox0dea: They're just called magic comments there.
[05:00:07] Ox0dea: zacts: https://github.com/ruby/ruby/blob/trunk/parse.y#L7151-L7159
[05:00:18] Ox0dea: There's the massive list of supported "pragmas". :P
[05:00:45] dlitvak: has joined #ruby
[05:01:43] gix: has joined #ruby
[05:02:30] mahk: has joined #ruby
[05:02:34] hannelita: has joined #ruby
[05:03:03] akem: has joined #ruby
[05:04:11] kt2: has joined #ruby
[05:05:53] northfurr: has joined #ruby
[05:10:05] bkxd: has joined #ruby
[05:10:18] bronson: has joined #ruby
[05:10:56] djbkd: has joined #ruby
[05:12:11] Rodya_: has joined #ruby
[05:12:45] kalopsian: has joined #ruby
[05:17:50] Guest58: has joined #ruby
[05:20:13] Guest58: has joined #ruby
[05:26:55] karapetyan: has joined #ruby
[05:26:56] akkad: has joined #ruby
[05:28:53] darkf_: has joined #ruby
[05:32:36] usershell: has joined #ruby
[05:33:20] jhack: has joined #ruby
[05:43:42] ascarter_: has joined #ruby
[05:43:47] Guest58: has joined #ruby
[05:46:10] asmodlol: has joined #ruby
[05:48:01] Azure|dc: has joined #ruby
[05:49:28] gambl0re: has joined #ruby
[05:53:40] Xeago: has joined #ruby
[05:53:50] aganov: has joined #ruby
[05:56:37] waheedi: has joined #ruby
[05:56:43] waheedi: whats that marshal data too short?
[05:57:03] waheedi: never seen it in my life :)
[05:57:22] aspire: has joined #ruby
[05:57:51] lxsameer: has joined #ruby
[05:58:13] nixawk: has joined #ruby
[05:58:32] waheedi: that happens when i do gem install builder -v 3.2.2
[05:58:41] arup_r: has joined #ruby
[06:00:40] nixawk: Can any one solve the problem ? http://stackoverflow.com/questions/34779988/ruby-how-to-get-ssh-prompt-from-remote-server-with-netssh
[06:01:51] nixawk: Python - paramiko can help us to get prompt_list in auth_interactive, and how to finish it with Ruby ?
[06:03:05] Ox0dea: Waheedi: Are you using an older version of Ruby?
[06:03:15] hannelita: has joined #ruby
[06:03:26] waheedi: yes, I think i got over the error now but was wondering what was it
[06:03:38] Ox0dea: An ABI incompatibility, likely as not.
[06:03:39] nixawk: ruby 2.1.7p400
[06:04:14] Limix: has joined #ruby
[06:04:39] nixawk: No prompt appers, only Net::SSH::AuthenticationFailed.
[06:05:10] Haris: has joined #ruby
[06:05:11] Haris: has joined #ruby
[06:05:15] dionysus69: has joined #ruby
[06:07:12] dfinninger: has joined #ruby
[06:08:58] northfurr: has joined #ruby
[06:09:09] nixawk: If the username and/or password given to start are incorrect, authentication will fail. If authentication fails, aNet::SSH::AuthenticationFailed exception will be raised.
[06:09:32] pawnbox: has joined #ruby
[06:10:08] nixawk: Is there a way to get server prompt string when authentication fails ?
[06:10:19] lacuna: has joined #ruby
[06:10:19] lacuna: has joined #ruby
[06:10:22] pawnbox: has joined #ruby
[06:10:26] kalopsian: has joined #ruby
[06:10:59] Haris: has left #ruby: ()
[06:13:21] moei: has joined #ruby
[06:13:23] Rodya_: has joined #ruby
[06:16:45] asmodlol: has joined #ruby
[06:17:04] sarkis: has joined #ruby
[06:24:13] dionysus69: has joined #ruby
[06:25:14] n00bDev: has joined #ruby
[06:25:27] ur5us: has joined #ruby
[06:25:38] Lightsword: has joined #ruby
[06:26:58] Lightsword: I???m trying to post a file to an embedded system that requires auth digest login, I have this so far but I get unauthorized for the post part(get???s seem to be ok) http://0bin.net/paste/r2UseeOWOjAU+0-g#aGDg5s8h3zZC1jQ+CJ9OcAtNmmDPnlcPfBV-M2J7Vp3 any idea what I???m doing wrong?
[06:27:11] sarkis: has joined #ruby
[06:27:21] sigurding: has joined #ruby
[06:31:48] m1dnight_: has joined #ruby
[06:34:35] nixawk: has joined #ruby
[06:34:58] B1n4r10: has joined #ruby
[06:36:30] usershell: has joined #ruby
[06:37:15] sarkis: has joined #ruby
[06:44:25] clauswitt: has joined #ruby
[06:47:19] mclong: has joined #ruby
[06:50:34] asmodlol: has joined #ruby
[06:51:31] Guest58: has joined #ruby
[06:53:43] pandaant: has joined #ruby
[06:54:09] hxegon: has joined #ruby
[06:55:16] Xeago: has joined #ruby
[06:55:29] ur5us: has joined #ruby
[06:58:04] Xeago: has joined #ruby
[06:58:35] nunchuck: has joined #ruby
[06:58:52] kerunaru: has joined #ruby
[07:02:11] hxegon: has joined #ruby
[07:02:30] RobertBirnie: has joined #ruby
[07:04:05] hannelita: has joined #ruby
[07:07:09] robbyoconnor: has joined #ruby
[07:08:52] dcbane: has joined #ruby
[07:09:02] dcbane: has left #ruby: ()
[07:09:34] Chewy11212: has joined #ruby
[07:09:51] howdoi: has joined #ruby
[07:09:53] Chewy11212: Can anyone help me with a simple problemo?
[07:10:46] bkxd: has joined #ruby
[07:10:53] yardenbar: has joined #ruby
[07:11:06] havenwood: Chewy11212: Say more about the problem?
[07:11:27] Chewy11212: First off here is the script I wrote so you can refernce
[07:11:28] Chewy11212: https://ghostbin.com/paste/n29n5
[07:11:44] jamw: has joined #ruby
[07:11:49] Chewy11212: I am trying to create a check for a log in system
[07:12:00] bronson: has joined #ruby
[07:12:22] Chewy11212: However, when you get the password incorrect (lets say 5 times) it prints 5 times the def you go to when you do get it correct
[07:12:25] asmodlol: has joined #ruby
[07:12:57] Chewy11212: If you do not understand still, take the code I posted and run it in a ruby inteprerter and get the password wrong at least once and then get is correct, you will see
[07:13:38] Radar: Your variables are named quite strangely.
[07:13:48] Radar: While they have meaning for you, they don't for me.
[07:14:08] Chewy11212: Why is it strange?
[07:14:22] Rodya_: has joined #ruby
[07:14:29] dpg1: has joined #ruby
[07:14:41] Chewy11212: the x,y was just a simple paramater
[07:14:48] Radar: Give them proper names and I can take a look. My brain is not good at this kinda thing 9 hours into my work day
[07:14:51] havenwood: Chewy11212: What are x and y?
[07:15:06] Chewy11212: in the accounts.each do |x,y|
[07:15:22] havenwood: Chewy11212: yup, in English what do you call those two things
[07:15:24] Radar: Yes, but what do they represent?
[07:15:34] shevy: "eks" and "why"!
[07:15:39] Chewy11212: the parameters?
[07:15:49] scepticulous: has joined #ruby
[07:15:52] Chewy11212: Well that is what they are
[07:15:57] n00bDev: has joined #ruby
[07:15:58] havenwood: Chewy11212: The values, they are ___.
[07:15:59] Chewy11212: They repersent the hash key and value
[07:16:14] Chewy11212: key = x while value = y
[07:16:26] Chewy11212: I don't get where you are going with this...
[07:17:14] Radar: Chewy11212: Your variable names offend me on a deep level and I would prefer it if you would change them before asking for help here.
[07:17:17] Radar: Chewy11212: Is that clearer?
[07:17:19] havenwood: Chewy11212: Just that if you use descriptive English for your variables it'll be better.
[07:17:34] Chewy11212: gotcha, let me re write it
[07:17:51] shevy: Chewy11212 it takes less brain processing power if you use no-think variables
[07:18:17] Radar: Thank you.
[07:18:21] shevy: you could also call the variables cats and dogs!
[07:18:34] eam: we believe in no-think lebowski
[07:18:40] Radar: I like naming my variables after greek gods or mountains
[07:18:47] Radar: sometimes a mix of the two
[07:18:51] Radar: zeus_kilamanjaro
[07:19:02] rahult_: has joined #ruby
[07:19:08] st1gma: hey guys question. Suppose I have an object instance, one of the methods takes a couple of parameters which I want to have "checked". I created another method to "sanitize" the params and I'm using .map!. All good there, the problem is that the original method that calls sanize does not see the modified object.
[07:19:18] Radar: You know that variable holds a lot of data because zeus is a big deal in Greek Mythology.
[07:19:20] eam: Radar: ah, a hybrid compound word
[07:19:26] eam: like television
[07:19:26] Radar: ?fake St1gma
[07:19:26] ruby[bot]: St1gma: Please show your real code to illustrate your problem. Using fake code often hides it or won't bring up the best possible solution.
[07:19:37] eam: roots in multiple languages
[07:19:45] Radar: eam: indeed
[07:20:11] eam: like using only $variables in ruby so your code is legal perl as well
[07:20:29] Radar: hahahahaha
[07:20:47] sandstrom: has joined #ruby
[07:20:50] Radar: installing nokogiri over a phone connection. wish me luck
[07:20:53] sdwrage: has joined #ruby
[07:21:00] Ox0dea: There's a story there.
[07:21:02] eam: hello? yes? Yes I'd like to install a gem
[07:21:06] hxegon: has joined #ruby
[07:21:07] shevy: may the XML be with you
[07:21:19] Radar: "Operator, gem install nokogiri"
[07:21:22] pontiki: can you parse me now?
[07:21:26] Radar: Operator: "0111001100"
[07:21:41] pontiki: (probably only recognisable by NA users)
[07:21:49] krz: has joined #ruby
[07:22:49] Chewy11212: https://ghostbin.com/paste/kwhmh
[07:22:52] Chewy11212: Updated verison
[07:23:24] Chewy11212: It begins with the method 'login1'
[07:23:30] Chewy11212: not the method 'b99'
[07:23:55] Radar: Thank you.
[07:24:16] Radar: https://ghostbin.com/paste/kwhmh#L18
[07:24:20] Radar: When will this ever be used?
[07:24:43] Chewy11212: That is a preventive mesure
[07:24:48] Chewy11212: Incase the program breaks
[07:25:15] Chewy11212: Nvm, I forgot to take that out
[07:25:37] shevy: looks like a copy paste of the line before
[07:25:42] shevy: just not inside of .each
[07:25:51] Chewy11212: Exactly what it is
[07:26:16] Chewy11212: I had it coded a diffrent way before to try and fix the problem, then I undid that but I forgot about that piece of code
[07:26:23] shevy: puts "" should be superfluous, you can just do a puts if you only want a newline anyway
[07:26:47] Ox0dea: Chewy11212: I don't get it. This validation method (`b99`, as you've very insightfully called it) should take a username and a password and return `@@accounts[username] == password`.
[07:26:57] Ox0dea: How does so much confusion arise organically?
[07:27:07] Chewy11212: organically?
[07:27:08] rkazak: has joined #ruby
[07:27:18] Ox0dea: Like, without being coerced at gunpoint or something.
[07:27:28] Ox0dea: Did somebody make you write it like this?
[07:27:34] Ox0dea: Show us on the keyboard.
[07:27:39] Chewy11212: No, I wrote it like this
[07:27:55] Chewy11212: The method b99 doesn't return anything
[07:28:12] Chewy11212: All it does is just check and proceed to the correct next method
[07:28:58] ohaibbq: has joined #ruby
[07:29:26] Chewy11212: Anyways, try running it and getting the password wrong a few times, then correctly. You will see the problemo
[07:30:08] solars: has joined #ruby
[07:30:11] lubekpl: has joined #ruby
[07:30:27] GriffinHeart: has joined #ruby
[07:30:33] Chewy11212: Any solutions?
[07:31:27] Chewy11212: I suspect it loops because the .each do method fucks it up like that everytime it is re-run. I dunno how to fix it though
[07:31:27] solars: has joined #ruby
[07:31:53] Chewy11212: Besides just checking if the @@accounts[@name] = @pass is nil
[07:32:03] Chewy11212: But I want a little more secure method
[07:32:03] mousier: has joined #ruby
[07:33:13] jas02: has joined #ruby
[07:34:28] arup_r: has joined #ruby
[07:34:41] peeja: has joined #ruby
[07:34:52] nixawk: has joined #ruby
[07:35:26] jordanm: has joined #ruby
[07:35:31] firstdayonthejob: has joined #ruby
[07:35:52] pawnbox: has joined #ruby
[07:36:10] Feyn: has joined #ruby
[07:36:22] JohnT: has joined #ruby
[07:36:53] harly: admin is x, and password is y. what is a better label for x?
[07:37:00] harly: oh wow. scroll buffer fail.
[07:37:16] harly: i'm confused at this paste. what is it meant to be doing? :)
[07:37:25] finisherr: has joined #ruby
[07:39:32] shevy: it is meant to show chaos-in-code
[07:40:51] ruby-lang934: has joined #ruby
[07:40:52] RobertBirnie: has joined #ruby
[07:41:30] usershell: has joined #ruby
[07:42:46] ascarter_: has joined #ruby
[07:47:16] astrobun_: has joined #ruby
[07:48:45] usershell: has joined #ruby
[07:49:15] Xeago: has joined #ruby
[07:52:38] gagrio: has joined #ruby
[07:53:19] pawnbox: has joined #ruby
[07:53:28] Ropeney: has joined #ruby
[07:54:47] speaking1ode: has joined #ruby
[07:55:50] Nanuq: has joined #ruby
[07:58:44] Guest58: has joined #ruby
[07:58:55] Ox0dea: Chewy11212: Still about?
[08:06:05] hannelita: has joined #ruby
[08:09:26] Ox0dea: Chewy11212: The problem is on Line 23.
[08:11:53] Ox0dea: You have a case of "accidental recursion".
[08:12:01] Ox0dea: Some say this is what happened to the universe.
[08:12:10] Ox0dea: Hydrogen was just minding its own business.
[08:12:24] Chewy11212: Can you exaplin to me more in depth?
[08:12:44] Ox0dea: In the case of an incorrect password, login1 calls b99 calls login1 calls b99 calls...
[08:12:55] TomyWork: has joined #ruby
[08:13:02] Ox0dea: Then when the right password is supplied, the call stack bubbles up and you invoke `cp` n times.
[08:14:03] Ox0dea: Changing Line 23 to `return login1` "solves" your problem.
[08:14:55] Ox0dea: I took some time to refactor your approach because sanity must prevail: https://eval.in/501915
[08:15:15] Rodya_: has joined #ruby
[08:17:17] edwinvdgraaf: has joined #ruby
[08:19:11] DoubleMalt: has joined #ruby
[08:20:02] GriffinHeart: has joined #ruby
[08:22:56] aufi: has joined #ruby
[08:23:40] sandstrom: has joined #ruby
[08:25:20] zapata: has joined #ruby
[08:25:40] LiquidInsect: has joined #ruby
[08:27:14] finisherr: has joined #ruby
[08:28:48] tulak: has joined #ruby
[08:29:02] kalopsian: has joined #ruby
[08:29:31] toretore: has joined #ruby
[08:32:07] Haris: has joined #ruby
[08:32:08] Haris: hello all
[08:32:09] roshanavand: has joined #ruby
[08:32:21] Haris: is ruby built on python or the like ? its syntax resembles python a lot
[08:32:40] Haris: that's not a useful Q though. ah well
[08:32:45] Ox0dea: Haris: Ruby is largely inspired by Perl, Smalltalk, and Lisp.
[08:32:49] Ox0dea: In that order.
[08:33:11] roshanavand: has joined #ruby
[08:33:12] kerunaru: Ruby is built on C, Haris
[08:33:36] Haris: Is ruby like .. an interpreter
[08:34:04] Haris: compile code before its used. everytime fresh compile, as python does
[08:34:07] spleeze: has joined #ruby
[08:34:18] roshanavand: has joined #ruby
[08:34:22] rocfig: has joined #ruby
[08:34:23] kerunaru: Ruby is a scripting language
[08:34:26] arup_r: has joined #ruby
[08:34:27] asmodlol: has joined #ruby
[08:34:41] Ox0dea: Haris: Both CPython and MRI are bytecode interpreters.
[08:35:00] Ox0dea: They "compile" your code to bytecode instructions and execute them on a virtual machine.
[08:35:08] nixawk: has joined #ruby
[08:35:27] codecop: has joined #ruby
[08:35:31] n00bDev: has joined #ruby
[08:36:32] ahaha: has joined #ruby
[08:37:09] kerunaru: Why those technical questions, Haris? :)
[08:37:24] Haris: I'm deploying a ruby based app catarse
[08:37:36] Ox0dea: > cat arse
[08:37:39] Haris: I was unable to handle its syntax or mods to its scripts, on first look
[08:38:02] adaedra: I think that's not the first time I hear of such project
[08:38:05] Haris: it resembled python, but catarse code seems awefully complex to me on first look
[08:38:14] shevy: wasn't the catarse problem a day ago here
[08:38:31] Haris: I needed to add translations to it, for the language I was enabling. couldn't understand how to, on first look
[08:38:43] Haris: even though I had the solution in an article
[08:38:44] shevy: Ox0dea lol
[08:39:02] arup_r: has joined #ruby
[08:39:04] Haris: I was talking about catarse here yesterday
[08:39:14] roshanav_: has joined #ruby
[08:39:14] Ox0dea: It was mentioned some time back as well.
[08:39:37] arup_r: has joined #ruby
[08:44:02] Haris: Your Ruby version is 2.2.4, but your Gemfile specified 2.1.0
[08:44:05] koneko: has joined #ruby
[08:44:43] Haris: and it saying ---> # bundle install
[08:44:43] Haris: Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine.
[08:44:43] Ox0dea: Silly Gemfile.
[08:44:58] shevy: Haris a dead end!
[08:45:22] Ox0dea: Haris: Press Ctrl-D in that terminal.
[08:45:33] Haris: I have work left yet
[08:45:33] jhass: the ruby version lock in Gemfile's is completely useless as it doesn't accept any version specifiers
[08:46:09] Haris: it'll work ? with 2.2.4 or 2.2.3 ? I have both installed .. somewhere
[08:46:13] Ox0dea: Haris: Why are you root?
[08:46:19] ruby[bot]: general advice in system administration: do not and that means never use sudo or root to "fix" things. Only use it if you exactly know why it would work and why it wouldn't work under any circumstances as normal user. Or if you're told to do it.
[08:46:21] Haris: I'm the sys admin deploying this app
[08:46:35] Ox0dea: I fail to see the relevance.
[08:46:36] Haris: I can create password for the account I'm setting it up under
[08:46:43] shredding: has joined #ruby
[08:46:49] shevy: Haris well if one version specifies 2.1.0 and your ruby version is not 2.1.0 then it should not work
[08:47:04] jhass: well, I would expect 2.1.8 to work as well too
[08:47:18] Haris: so, I should just run rvm install 2.1.0 ?
[08:47:30] jhass: and probably even 2.2 and 2.3 will work, but you only have upstream promise for 2.1
[08:47:36] Haris: as root. that would make it globally available
[08:47:42] havenwood: Haris: Edit your Gemfile and run your tests.
[08:48:02] Haris: ok. one thing. where are gem files installed ? I installed them as root. I could install them as a normal user
[08:48:22] Haris: right now, the path I know is under /usr/local/rvm ?
[08:48:45] Haris: ACTION creates password for normal user account
[08:48:52] kerunaru: It seems your are using rvm, so gems will be installed in ~/.rvm for each user
[08:49:04] kerunaru: I mean for the user installing a gem
[08:49:45] kerunaru: (If you are root -> /root/.rvm/ if you are foo -> /home/foo/.rvm
[08:50:15] Haris: relevant to this... will the web server be able to pick them up ?
[08:50:33] Haris: for e.g., I have 3 or 5 separate ruby based apps I need to serve through say apache or gunicorn or etc etc
[08:51:12] Haris: for that matter, I wonder if its the web server or the app that needs to be able to know where gems are installed
[08:51:14] tomaz_b: has joined #ruby
[08:51:20] arup_r: has joined #ruby
[08:51:22] shevy: you are like the man with a thousand tasks!
[08:51:35] Haris: not far from truth
[08:52:30] DoubleMalt: has joined #ruby
[08:53:22] kerunaru: Haris, is the app a Rails app?
[08:53:43] xet7: has joined #ruby
[08:54:00] Haris: https://github.com/danielweinmann/catarse
[08:54:18] Haris: git project has changed. app is the same. this one uses relatively older version of ruby
[08:54:29] Haris: the other one from yesteday wanted ruby 2.2.3. this one wants 2.1.0
[08:54:35] harly: "I'm the sys admin deploying this app" i think i see the problem :)
[08:54:51] kerunaru: Although I think most of people here know Rails, I think you should go #rubyonrails and ask there too :P
[08:55:00] Haris: its economics, or wants. people want things done. but don't want to pay for it
[08:55:11] Haris: thank you
[08:55:20] shevy: I don't know rails :(
[08:55:47] Haris: there's too many programming languages to learn
[08:56:00] Haris: your not done with one, and an app based on another is handed over to you
[08:56:01] shevy: specialize!
[08:56:14] shevy: ban some languages
[08:56:15] kerunaru: "I think MOST OF PEOPLE here know Rails"??? not all people, shevy :P
[08:56:47] bkxd: has joined #ruby
[08:56:52] sepp2k: has joined #ruby
[08:56:52] Hounddog: has joined #ruby
[08:57:21] shevy: it's on my todo list!
[08:57:27] kerunaru: Specialization is the key to progress in this job lol
[08:57:57] harly: haris: our admins only provide us iwth a deploy infrastructure. we deploy our own apps. why are you expected to know something you didn't write? :)
[08:58:20] Haris: money, economics, wants of human beings
[08:58:40] harly: it's most economical to allow devs to deploy and own their own stuff. they built it and know it best.
[08:58:46] shevy: pretty diamonds!
[08:58:51] Haris: or not enough sales, but need work done
[08:58:58] kalopsian: has joined #ruby
[08:59:13] Guest58: has joined #ruby
[08:59:25] harly: our admins would laugh all the way home if I told hem they had to own and deploy my app :)
[08:59:58] harly: now, if the db or file server goes down, then they're in the shit.
[09:00:00] Haris: yesterday, the app I was handed was from something like this ( https://marcclifton.wordpress.com/2013/07/26/getting-catarse-to-build-and-run/ ). taht didn't work, because it needed too many modifications after deployment to make it live. today I'v been handed this ( https://github.com/danielweinmann/catarse ) as a perhaps working copy of the same
[09:00:22] krz: has joined #ruby
[09:00:23] LMity: has joined #ruby
[09:00:26] Haris: that's because economics doesn't work there, as it does here :( .. and people accept that there
[09:01:16] Haris: money from our economy is legally, and illegally flowing there. I either have the option to move there, or work in the existing economics, ways of people .. here. and immigration takes a heck lot of time and doing to get through these days. lol
[09:01:29] Guest58: has joined #ruby
[09:01:52] Haris: people don't accept things here, as they do there. its different there
[09:02:11] kerunaru: But the quick installation section of the README.md it pretty straight forward??? What problems did you get following it?
[09:02:25] Haris: the old one, or the new one ?
[09:02:35] mark2: has joined #ruby
[09:02:44] kerunaru: The new one
[09:02:51] harly: the new one. config DB settings, bundle install, rake, then rails server
[09:02:55] Haris: I had trouble with parts after the rake db:seed part
[09:03:02] karapetyan: has joined #ruby
[09:03:10] Haris: yep, working on the new one. its installing gems yet
[09:03:38] Haris: ouch, no. I got error on running bundle install i.e., the error about being root and the version difference for ruby
[09:03:52] Haris: that's where I'm struggling yet
[09:04:27] dcunit3d: has joined #ruby
[09:04:42] kerunaru: I think you should not be doing this as root, but a regular user. That said, just install the require version of Ruby to run this app and see what happens
[09:04:53] ddv: Haris: create normal user, add a ruby version manager like chruby,rbenv etc.
[09:04:58] harly: well. it wants ruby 2.1.0. so have that installed. personally i use ruby-install (ruby-install ruby-2.1.0). then gem install bundler. then bundle install. as the user that will be executing rails server
[09:04:59] ddv: Haris: install a ruby
[09:05:07] harly: don't do any of that as root
[09:05:11] Haris: yep, making passwod for normal user, to work on its own shell
[09:05:33] last_staff: has joined #ruby
[09:05:45] harly: then ideally have an nginx sitting in front sending whatever externally into that unknown and untrusted catarse app
[09:05:52] SCHAAP137: has joined #ruby
[09:05:54] chussenot: has joined #ruby
[09:06:15] dlitvak: has joined #ruby
[09:06:39] kerunaru: You have to keep in mind that rvm get loaded at log in a shell and each user is going to have ONLY what they'd installed
[09:06:49] hannelita: has joined #ruby
[09:06:54] kerunaru: So what root installed is not going to be available for others users
[09:07:02] Haris2: has joined #ruby
[09:07:04] kerunaru: And viceversa
[09:07:26] Haris: has joined #ruby
[09:07:57] Haris: lost msgs after --> <Haris>yep, making passwod for normal user, to work on its own shell <-- got dc
[09:08:09] Ox0dea: http://irclog.whitequark.org/ruby
[09:09:01] blaxter: has joined #ruby
[09:10:33] harly: <harly> then ideally have an nginx sitting in front sending whatever externally into that unknown and untrusted catarse app
[09:10:39] harly: <kerunaru> You have to keep in mind that rvm get loaded at log in a shell and each user is going to have ONLY what they'd installed
[09:10:48] harly: <kerunaru> So what root installed is not going to be available for others users (and viceversa)
[09:11:16] Haris: another *ouch*
[09:13:00] Haris: installing ruby, bundle, etc etc under the normal user now
[09:13:35] nixawk: has left #ruby: ()
[09:14:00] drptbl: has joined #ruby
[09:15:04] SOLDIERz: has joined #ruby
[09:15:13] Haris: have to call ISP. can't connect to German mirror of ruby 2.1.0. no other mirrors seem to be available, as per rvm
[09:15:40] asmodlol: has joined #ruby
[09:15:55] joonty: has joined #ruby
[09:16:27] Rodya_: has joined #ruby
[09:17:04] Xeago: has joined #ruby
[09:19:07] pipework: has joined #ruby
[09:20:37] Liothen: has joined #ruby
[09:21:12] zacts: has joined #ruby
[09:21:27] harai: has joined #ruby
[09:21:43] sftrabbit: has joined #ruby
[09:21:45] SegFaultAX: has joined #ruby
[09:21:49] huyderman: has joined #ruby
[09:22:10] rcs: has joined #ruby
[09:23:03] rodfersou: has joined #ruby
[09:23:39] hayden_: has joined #ruby
[09:25:22] chussenot: has joined #ruby
[09:25:35] webus: has joined #ruby
[09:25:59] webus: has left #ruby: ()
[09:26:06] marr: has joined #ruby
[09:26:26] Xeago: has joined #ruby
[09:27:20] djbkd: has joined #ruby
[09:28:44] dwfait: has joined #ruby
[09:30:10] chussenot: has joined #ruby
[09:32:01] einarj: has joined #ruby
[09:32:16] harai54: has joined #ruby
[09:36:19] blackmesa: has joined #ruby
[09:36:35] kerunaru: has joined #ruby
[09:39:08] snowy: has joined #ruby
[09:40:30] DirtyFInn: has joined #ruby
[09:41:23] blackmesa: has joined #ruby
[09:44:05] platzhirsch: has joined #ruby
[09:47:03] mikecmpbll: has joined #ruby
[09:49:21] catbusters: has joined #ruby
[09:50:18] ledestin: has joined #ruby
[09:52:30] koneko: has joined #ruby
[09:52:46] Bloomer: has joined #ruby
[09:55:55] prestorium: has joined #ruby
[09:57:03] chussenot: has joined #ruby
[09:58:06] andikr: has joined #ruby
[09:58:40] tvw: has joined #ruby
[10:00:04] FernandoBasso: has joined #ruby
[10:01:09] sirfilip: has joined #ruby
[10:02:03] joonty: has joined #ruby
[10:03:00] lipoqil: has joined #ruby
[10:03:49] skullcrasher: has joined #ruby
[10:04:04] dlitvak: has joined #ruby
[10:05:13] shevy: yo sir filip
[10:05:38] dn`: has joined #ruby
[10:06:11] kalopsian: has joined #ruby
[10:06:20] futilegames: has joined #ruby
[10:06:30] Ox0dea: Maybe it's sirfi lip?
[10:07:52] hannelita: has joined #ruby
[10:08:15] TheHodge: has joined #ruby
[10:09:00] Ox0dea: "surfy": http://srfi.schemers.org/
[10:09:20] Ox0dea: shevy: Do you remember a while back talking about having a democratic standard library?
[10:09:49] arup_r: has joined #ruby
[10:10:10] shevy: popularity votes perhaps
[10:10:19] Ox0dea: Aye, that's democracy. :P
[10:10:23] shevy: some way to determine what is used by lots of people and what is not
[10:10:24] Tempesta: has joined #ruby
[10:10:35] xet7: has joined #ruby
[10:10:39] Ox0dea: That's basically what Scheme has with the SRFI model.
[10:10:42] shevy: like get_opt_long or what the name was
[10:10:44] skade: has joined #ruby
[10:11:00] shevy: why is it that when I read scheme, I think of chicken
[10:11:11] Ox0dea: There's an implementation called CHICKEN?
[10:11:15] Ox0dea: That'd probably do it.
[10:11:52] Ox0dea: All-caps is that community's preferred orthography, to clarify the yelling.
[10:12:35] skullcrasher: would you recommend using rvm?
[10:12:51] shevy: I don't think I am familiar with a SRFI model, how do they determine what will be included when they distribute standard scheme stuff?
[10:13:03] Xeago: has joined #ruby
[10:13:39] arup_r1: has joined #ruby
[10:14:12] Ox0dea: Well, it's up to implementations to decide which SRFIs to provide, but the proposals that've been accepted get their own number, which is effectively a form of standardization.
[10:14:36] Olipro: has joined #ruby
[10:14:50] hannelita: has joined #ruby
[10:15:44] shevy: skullcrasher I think havenwood here suggests something else these days... ruby-install I think or chruby... or something else haha, how many ruby versions do you have to manage?
[10:16:17] Ox0dea: skullcrasher: chruby + ruby-install = <3
[10:16:32] abochu: has joined #ruby
[10:17:31] abobastards: has joined #ruby
[10:17:51] silverdust: has joined #ruby
[10:19:09] karapetyan: has joined #ruby
[10:19:24] antgel: has joined #ruby
[10:20:18] silverdust: has joined #ruby
[10:20:23] catbusters: has joined #ruby
[10:20:24] abobastard: anyone from australia?
[10:21:40] adaedra: !kick ihatemiggers
[10:21:41] ruboto: ruboto kicked ihatemiggers:
[10:21:41] ruboto: -o ruboto
[10:21:47] IHATEMIGGERS: has joined #ruby
[10:21:47] ChanServ: +b *MIGGER*!*@*
[10:21:47] ChanServ: ChanServ kicked ihatemiggers: Unacceptable nick - http://ruby-community.com/pages/user_rules#rule_2_10
[10:21:49] ruby[bot]: -b *MIGGER*!*@*
[10:22:07] adaedra: apeiros: ^ ruby[bot] doesn't catch /nick ?
[10:24:42] jamw: has joined #ruby
[10:25:10] shevy: >> RUBY_VERSION
[10:25:42] adaedra: I think apeiros restricted that to registered people.
[10:26:05] bigkevmcd: has joined #ruby
[10:28:13] skullcrasher: shevy, actually 1 :D but I think I have problems because of a newer version and json 1.8.1 in my gemfile
[10:28:26] blt: has joined #ruby
[10:28:27] Synthead: has joined #ruby
[10:28:43] skullcrasher: so I thought I would install older ruby version for this probject, but for the others the latest
[10:28:48] bigkevmcd: has joined #ruby
[10:29:20] adaedra: +b *MIGGER*!*@*$#ruby-banned
[10:29:27] adaedra: -o adaedra
[10:29:33] duckson: has joined #ruby
[10:30:19] arup_r: has joined #ruby
[10:31:15] anisha: has joined #ruby
[10:34:50] troulouliou_div2: has joined #ruby
[10:34:50] d0nn1e: has joined #ruby
[10:35:40] clauswitt: has joined #ruby
[10:35:55] blackgoat: has joined #ruby
[10:35:56] chussenot: has joined #ruby
[10:36:42] ldnunes: has joined #ruby
[10:37:44] chipotle: has joined #ruby
[10:37:50] chusucksdick: has joined #ruby
[10:38:05] chusucksdick: is chu not on here?
[10:38:28] clauswitt: has joined #ruby
[10:39:25] adaedra: .ban chusucksdick !P Bad nick
[10:39:25] ruby[bot]: ruby[bot] kicked chusucksdick: nick
[10:39:35] dlitvak_: has joined #ruby
[10:40:05] ddv: adaedra is busy today
[10:40:20] adaedra: trolls are busy.
[10:41:20] ruby[bot]: +q ihatemiggers!*@*
[10:41:37] mondok: has joined #ruby
[10:42:15] bkxd: has joined #ruby
[10:42:30] skade: has joined #ruby
[10:42:43] usershell: has joined #ruby
[10:43:47] kalopsian: has joined #ruby
[10:45:55] gbgdev: has joined #ruby
[10:46:26] adaedra: -q ihatemiggers!*@*
[10:47:15] ascarter_: has joined #ruby
[10:47:20] adaedra: +b *!*@gateway/web/freenode/ip.95.141.47.72$#ruby-banned
[10:47:32] strain9: has joined #ruby
[10:50:43] InvGhost: has joined #ruby
[10:57:57] strain9: has joined #ruby
[10:58:40] mikecmpbll: I have some ruby script which on occasion seems to hang. is there any way of inspecting the process to see what's going on?
[10:58:45] mikecmpbll: (what code it's executing or whatever)
[10:59:04] binaryplease: has joined #ruby
[10:59:31] adaedra: you can strace it, you can put debug messages at key points
[11:00:18] Synthead: has joined #ruby
[11:01:38] adaedra: you can use tracer
[11:01:57] adaedra: &ri Tracer
[11:01:57] `derpy: http://ruby-doc.org/stdlib-2.3.0/libdoc/debug/rdoc/Tracer.html
[11:02:51] rdark: has joined #ruby
[11:04:26] f4cl3y: has joined #ruby
[11:06:07] akkmaxon: has joined #ruby
[11:09:03] Domaldel: has joined #ruby
[11:09:36] c0m0: has joined #ruby
[11:12:07] adaedra: right link: http://ruby-doc.org/stdlib-2.3.0/libdoc/tracer/rdoc/Tracer.html
[11:12:30] vikas027: has joined #ruby
[11:13:39] bronson: has joined #ruby
[11:14:27] joonty: has joined #ruby
[11:15:10] mark2: has left #ruby: ("PART #RubyOnRails :PART #jquery :PART #reactjs :PART ##javascript :PART #elixir-lang :PART #debian :PART #zsh :PONG :verne.freenode.net")
[11:15:12] mikecmpbll: @adaedra: thanks! checking out
[11:16:27] mikecmpbll: whoops, should have mentioned that i want to look at the already hanging process if possible
[11:16:33] mikecmpbll: but that's useful nonetheless
[11:16:48] adaedra: You can attach a process with strace.
[11:17:02] mikecmpbll: ah, cool, reading manpage now
[11:17:34] pawnbox: has joined #ruby
[11:17:54] Rodya_: has joined #ruby
[11:18:35] jgpawletko: has joined #ruby
[11:23:34] mikecmpbll: @adaedra: i wonder if you could help me interpret this strace output? https://gist.github.com/mikecmpbll/3bd1b77762ab5f314e0f
[11:23:43] mikecmpbll: it's just that repeating itself over and over
[11:24:47] adaedra: looks like it hangs on network reading
[11:26:02] jgt: has joined #ruby
[11:29:35] lucasb: has joined #ruby
[11:30:33] kerunaru: has joined #ruby
[11:31:55] FooMunki: has joined #ruby
[11:34:11] toretore: mikecmpbll, gist the code?
[11:37:40] mikecmpbll: toretore: sure: https://gist.github.com/mikecmpbll/526751902d1c5295ced9
[11:37:49] mikecmpbll: bit convoluted, mind
[11:38:25] mikecmpbll: i've spotted a couple of things since looking at it but not sure if they could be the cause. firstly i shouldn't be rescuing Exception ..
[11:39:09] pawnbox: has joined #ruby
[11:39:10] mikecmpbll: also i'm modifying @log_messages inside the thread without a mutex
[11:40:15] dlitvak: has joined #ruby
[11:42:35] bkxd: has joined #ruby
[11:42:44] dcunit3d: has joined #ruby
[11:45:48] pawnbox: has joined #ruby
[11:45:51] toretore: mikecmpbll, it doesn't look like you actually need a Queue, as each thread has its own `group`
[11:47:24] mikecmpbll: oh yeah .. that's true.
[11:47:32] mikecmpbll: refactoring now.
[11:47:45] Guest58: has joined #ruby
[11:48:03] kknight: has joined #ruby
[11:49:36] toretore: how far does it get before it hangs?
[11:49:45] UtkarshRay: has joined #ruby
[11:49:56] jas02: has joined #ruby
[11:50:31] toretore: i'd replace line 39 with a simple puts just to see if the problem is in this file or in one of the required ones
[11:51:02] stamina: has joined #ruby
[11:51:40] mikecmpbll: it _seems_ to finish doing all the processing
[11:52:00] mikecmpbll: that's all exact code copy/pasted but there is a bit more below the joining of the threads in the actual thing
[11:52:03] pawnbox: has joined #ruby
[11:52:05] mikecmpbll: which it doens't reach
[11:52:28] toretore: so one of the threads doesn't finish
[11:53:13] pawnbox: has joined #ruby
[11:53:37] adaedra: -o adaedra
[11:54:40] pawnbox: has joined #ruby
[11:56:35] toretore: consumers << Thread.new{ Thread.current[:school] = school_name; ... }; consumers.each{|c| puts c[:school]; c.join }
[11:56:45] toretore: then you'll see which one it is
[11:57:42] hannelita: has joined #ruby
[11:58:34] toretore: actually you can just look at the log to see which one doesn't finish
[12:02:30] kiidbrian: has joined #ruby
[12:03:55] skade: has joined #ruby
[12:04:19] bigkevmcd: has joined #ruby
[12:04:24] tesuji: has joined #ruby
[12:05:27] CloCkWeRX: has joined #ruby
[12:05:56] Bish: [1,2,3].each do { |x| << is there an implicit x?
[12:06:15] Bish: too bad.
[12:06:18] sdothum: has joined #ruby
[12:06:49] toretore: there are too many magic variables in ruby as it is
[12:07:03] Bish: i like magic variables
[12:07:32] toretore: magic always comes back to bite you in ome way or another
[12:08:09] tvw: has joined #ruby
[12:08:14] Bish: how is an implicit x is going to bite me
[12:08:25] Bish: it bites me already, because i always have to type it
[12:08:31] toretore: in ways that you can't foresee
[12:08:44] ziyadb: has joined #ruby
[12:09:05] Bish: well thats super specific :D
[12:09:18] toretore: take instance_eval: it's very convenient and it makes your code look "elegant"
[12:09:28] Bish: is it a magic variable?
[12:09:46] toretore: until you try to use ivars or methods that it seems you should be able to
[12:10:10] toretore: and it doesn't work; and it's not even your code that called instance_eval so you have no idea why your code doesn't work
[12:10:24] ruby[bot]: has joined #ruby
[12:10:25] ChanServ: +o ruby[bot]
[12:10:28] platzhirsch: has left #ruby: ()
[12:10:28] dlitvak_: has joined #ruby
[12:11:19] toretore: x = 5; [1,2,3].each{ puts x } #what should happen here?
[12:12:11] toretore: you get ambiguity, and ambiguity is a programmer's worst friend
[12:12:21] lacuna: has joined #ruby
[12:12:22] lacuna: has joined #ruby
[12:13:17] kiidbrian: you need a placeholder |x|
[12:14:14] adaedra: Bish: you can [1, 2, 3].each(&method(:puts))
[12:15:22] Bish: toretore: [1,2,3].each { p block_params.first } what will happen here?
[12:15:51] Bish: i didn't say it has to be "x"
[12:16:22] Bish: >> [1,2,3].each { p $_ }
[12:16:24] ruby[bot]: Bish: # => nil ...check link for more (https://eval.in/502101)
[12:16:33] lucasb: I was kidding!
[12:16:37] Bish: :3 i see
[12:17:56] shevy: your ambiguity sickens me!
[12:18:14] lucasb: Bish: but you can do 'while gets; print; end' <-- and that uses the implicit $_
[12:18:33] Bish: oh wow thats super dirty :D
[12:18:34] konsolebox: has joined #ruby
[12:19:00] Rodya_: has joined #ruby
[12:19:01] kiidbrian: i like dirty
[12:19:39] toretore: writing `while str = gets; print str; end` is such a big effort
[12:20:49] Bish: none said it was a good example for good use of magic variables
[12:21:33] konsolebox: has joined #ruby
[12:23:15] Jackneill: has joined #ruby
[12:25:44] jamw: has joined #ruby
[12:26:32] harly: *double checks i didn't step into #perl*
[12:27:38] Bish: *double checks if harly used i when he should've used he*
[12:27:58] toretore: ruby -e 'do_what_i_think()'
[12:28:13] bkxd: has joined #ruby
[12:28:20] harly: *double checks $_ didn't step into perl*
[12:28:35] toretore: --do-it-faster --dont-make-any-mistakes
[12:29:08] jackcom: has joined #ruby
[12:29:28] KrzaQ: Where is File.write and File.read documented? I looked them up in the File class docs, but there's no such method and IO.write takes 1 argument, not two
[12:31:27] toretore: http://www.rubydoc.info/stdlib/core/IO#write-class_method looks ok to me
[12:31:30] chussenot: has joined #ruby
[12:32:10] KrzaQ: I used ruby-doc.org (first result on google). Should I abandon it for the site you linked?
[12:32:24] shevy: spot the error!
[12:32:26] shevy: NAMESPACE = self.insect.to_s
[12:32:42] apeiros: shevy: you're writing biology stuff - is it really an error? :)
[12:33:09] apeiros: KrzaQ: what makes you think File#write took two args?
[12:33:13] adaedra: KrzaQ: use what fits you best. ruby-doc.org is official doc, rubydoc.info is maintained by yard team.
[12:33:15] alphaatom: has joined #ruby
[12:33:23] chrisarcand: has joined #ruby
[12:33:30] shevy: apeiros hehe
[12:33:41] KrzaQ: apeiros: previous usage. I just wanted to look up which one was content and which one was filename
[12:34:01] adaedra: KrzaQ: if you look for doc, you can also use the ri command.
[12:34:06] ruby[bot]: adaedra: I don't know anything about ri
[12:34:32] casadei: has joined #ruby
[12:34:32] ruby[bot]: you can use http://ruby-doc.org or the command line tool "ri" which should be installed along with your ruby to access documentation. Ri example: "ri Array#length"
[12:34:46] KrzaQ: ri File#write
[12:34:47] KrzaQ: Nothing known about File
[12:34:50] KrzaQ: not exactly what I wanted
[12:34:57] adaedra: Ah, you don't have docs installed then
[12:35:25] KrzaQ: you're right, fixing it
[12:36:12] KrzaQ: but it only shows me the one argument overload, even though File.write(name, data) clearly works
[12:36:48] apeiros: KrzaQ: how can previous usage make you think it took two args? it does not take two args. passing it two causes an exception.
[12:36:55] blackmesa: has joined #ruby
[12:37:07] apeiros: KrzaQ: are you really talking about File::write, not File#write?
[12:37:14] apeiros: (class method vs. instance method)
[12:37:24] KrzaQ: I have no idea, I provided the usage above
[12:37:38] apeiros: are you using it on File directly or on an instance
[12:37:40] KrzaQ: File.write(2 args)
[12:37:46] jmignault: has joined #ruby
[12:37:48] sftrabbit: has joined #ruby
[12:38:29] apeiros: I'll take that as a "I call it on File directly".
[12:38:41] apeiros: File::write is not coming from ruby.
[12:38:50] minver: has joined #ruby
[12:38:54] minver: I need to import Reviews to my App. And the API I'm using let med export the reviews as JSON or my app will get a POST callback when a review is created. What are the PROS and CONS with these two approaches? Export would be better in the beginning to populate the database.
[12:38:55] apeiros: File.method(:write).source_location will show you where it's coming from.
[12:39:08] pawnbox: has joined #ruby
[12:39:10] lucasb: apeiros: what do you mean it's not coming from ruby?
[12:39:11] jottr: has joined #ruby
[12:39:24] harly: >> p File.method(:write).source_location
[12:39:26] KrzaQ: it says nil :)
[12:39:26] ruby[bot]: harly: # => nil ...check link for more (https://eval.in/502117)
[12:39:29] apeiros: lucasb: I mean it's not part of ruby itself. it got added later.
[12:39:38] apeiros: oh wait???
[12:39:42] lucasb: I think it's ruby core
[12:39:42] apeiros: File.write actually got added
[12:39:51] apeiros: a while back even. memory playing tricks :D
[12:40:03] apeiros: ah right, File.append is still missing.
[12:40:22] KrzaQ: okay. Tbh I find the documentation pretty weak in this case
[12:40:36] apeiros: KrzaQ: anyway, the point is - you're confusing *instance method* and *class method*
[12:40:42] apeiros: those are not the same.
[12:41:05] KrzaQ: at this point, I searched anything with "write"
[12:41:06] dlitvak: has joined #ruby
[12:41:15] apeiros: KrzaQ: class method http://ruby-doc.org/core-2.3.0/IO.html#method-c-write
[12:41:24] apeiros: KrzaQ: instance method http://ruby-doc.org/core-2.3.0/IO.html#method-i-write
[12:41:38] inkky: has joined #ruby
[12:41:50] PedramT: has joined #ruby
[12:42:00] apeiros: KrzaQ: that's also what I was asking you about before. it is NOT the same whether you do File.write(???) or File.open(???).write(???)
[12:42:21] KrzaQ: Well, if you look at my first line here, you will see File.write
[12:42:41] KrzaQ: Anyway, thanks.
[12:42:47] sigurding: has joined #ruby
[12:42:58] jmignault: has joined #ruby
[12:43:09] harly: i tink i've relied more on google for how to use File than official doco
[12:43:13] apeiros: KrzaQ: in documentation, use :: to indicate class method
[12:43:19] KrzaQ: I now know that I can use ri, which I have completely forgotten about
[12:43:21] harly: there are some elements of the doco that confuse me still.
[12:43:50] KrzaQ: apeiros: sure, and # instance method, . is neither :P and I still think that write should be linked from File doc
[12:43:57] PedramT: has joined #ruby
[12:44:03] kalopsian: has joined #ruby
[12:44:14] apeiros: KrzaQ: no it should not. it's inherited.
[12:44:33] apeiros: KrzaQ: ri will search inheritance for you. but I'm happy that doc pages don't list all inherited methods on the same page.
[12:44:53] apeiros: methods from Kernel and Object alone would spam that quite a bit.
[12:45:49] KrzaQ: go the qt/doxygen way, then: show all inherited methods upon request
[12:45:56] JohnT: has joined #ruby
[12:47:38] apeiros: on request would be acceptable
[12:48:15] lkba: has joined #ruby
[12:49:43] myntcake: has joined #ruby
[12:50:22] nerium: has joined #ruby
[12:52:51] skade: has joined #ruby
[12:53:21] BTRE: has joined #ruby
[12:53:51] PedramT: has joined #ruby
[12:53:53] karapetyan: has joined #ruby
[12:55:04] snowy: has joined #ruby
[12:55:51] aupadhye: has joined #ruby
[12:56:17] peeja: has joined #ruby
[12:57:08] al2o3-cr: has joined #ruby
[12:58:40] usershell: has joined #ruby
[13:00:48] dcunit3d: has joined #ruby
[13:03:44] edwinvdgraaf: has joined #ruby
[13:03:55] kt2: has joined #ruby
[13:05:55] edwinvdg_: has joined #ruby
[13:06:40] blackwhitejewish: has joined #ruby
[13:06:40] ChanServ: +b blackwhitejewish!*@*
[13:06:40] ChanServ: ChanServ kicked blackwhitejewish: Good bye
[13:06:42] ruby[bot]: -b blackwhitejewish!*@*
[13:07:35] graffix222: has joined #ruby
[13:08:11] skade: has joined #ruby
[13:12:18] Bish: charlock holmes is a god sent!
[13:14:41] bronson: has joined #ruby
[13:15:33] synthroid: has joined #ruby
[13:18:28] sankaber: has joined #ruby
[13:19:49] Rodya_: has joined #ruby
[13:22:13] usershell: has joined #ruby
[13:23:11] joonty: has joined #ruby
[13:25:50] skade: has joined #ruby
[13:26:24] JohnT: has joined #ruby
[13:28:58] sdothum: has joined #ruby
[13:29:39] usershell: has joined #ruby
[13:32:05] Limix: has joined #ruby
[13:32:12] arup_r: I am not able to give proper name to my method. I am trying to stop user to send next invitation until he/she crossed 10 minutes from it's last invitation timestamp. My method logic is correct, but name is misleading. What should be the good name? https://gist.github.com/aruprakshit/9a778b36868a9891840c
[13:32:34] sardaukar42: has joined #ruby
[13:33:30] sardaukar42: has left #ruby: ()
[13:34:17] skade: has joined #ruby
[13:35:16] who42: has joined #ruby
[13:36:54] mrgrieves: has joined #ruby
[13:37:01] mfb2: has joined #ruby
[13:38:02] harly: can_send_another_invitation? maybe?
[13:38:19] harly: but then that's misleading ont he first call :)
[13:39:20] Limix: has joined #ruby
[13:39:44] PedramT: has joined #ruby
[13:40:40] duckpuppy: has joined #ruby
[13:41:39] mrgrieves: hi, for some reason on my mac the system's ruby is being picked up instead of the rbenv ruby. Any ideas what I might be doing wrong?
[13:41:40] arup_r: yes harly, I gave it can_not_send_invitation? for now, no good name is comming on top of my head
[13:43:39] shevy: def party_pooper
[13:44:31] harly: mrgrieves: what happens when you using rbenv to pick the ruby you want?
[13:45:28] dstarh: has joined #ruby
[13:47:57] Bish: invitationable?
[13:49:04] Bish: oh he sends the invitation, hmm.. geez
[13:49:48] Bish: *votes for party_pooper*
[13:50:30] skade: has joined #ruby
[13:50:39] ramortegui: has joined #ruby
[13:51:10] skade: has joined #ruby
[13:51:53] mrgrieves: harly: http://pastebin.com/cSquJ6Hz
[13:51:54] ruby[bot]: mrgrieves: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/0d938d841bb06bf10a4e
[13:51:54] ruby[bot]: mrgrieves: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[13:52:43] Melpaws: has joined #ruby
[13:52:43] bronson: has joined #ruby
[13:56:24] mfb2: has joined #ruby
[13:56:46] mfb2: has joined #ruby
[13:56:59] harly: mrgrieves: i use chruby not rbenv. but if rbenv thinks the right one is set, then it's could be an issue with your path?
[13:57:01] sgambino: has joined #ruby
[13:57:12] harly: try this: http://stackoverflow.com/questions/10940736/rbenv-not-changing-ruby-version
[13:57:25] dlitvak: has joined #ruby
[13:59:19] mfb2_: has joined #ruby
[14:02:27] tmtwd: has joined #ruby
[14:03:15] skullcrasher: shevy, ruby-install + chruby worked nicely, thx :)
[14:03:29] skullcrasher: only problem now is integration into rubymine ... nvm
[14:04:12] atomical: has joined #ruby
[14:04:32] harly: ruby-intstall+chruby is the shizzle
[14:04:32] blackmesa: has joined #ruby
[14:05:13] gbgdev: has joined #ruby
[14:07:22] astrobunny: ruby-install is pretty rad
[14:07:37] karapetyan: has joined #ruby
[14:07:43] puria: has joined #ruby
[14:09:24] edwinvdgraaf: has joined #ruby
[14:10:29] Ishido: has joined #ruby
[14:11:03] edwinvdg_: has joined #ruby
[14:12:29] dlitvak_: has joined #ruby
[14:13:18] djbkd: has joined #ruby
[14:13:32] dorei: has joined #ruby
[14:13:55] dhalsim: has joined #ruby
[14:14:52] dangerousdave: has joined #ruby
[14:16:16] aryaching: has joined #ruby
[14:16:24] jschmid: has joined #ruby
[14:17:04] lurch_: has joined #ruby
[14:17:10] allcentury: has joined #ruby
[14:19:28] shredding: has joined #ruby
[14:19:49] pwnd_nsfw: has joined #ruby
[14:19:57] skade: has joined #ruby
[14:20:36] Rodya_: has joined #ruby
[14:20:46] B1n4r10: has joined #ruby
[14:22:06] troulouliou_div2: has joined #ruby
[14:23:43] toretore: has joined #ruby
[14:24:03] duckpuppy: has joined #ruby
[14:24:41] hannelita: has joined #ruby
[14:25:45] sdwrage: has joined #ruby
[14:25:55] cdg: has joined #ruby
[14:26:08] TomPeed: has joined #ruby
[14:26:16] jamw: has joined #ruby
[14:27:03] chipotle: has joined #ruby
[14:27:20] binaryplease: has joined #ruby
[14:28:04] fumk: has joined #ruby
[14:28:34] grill: has joined #ruby
[14:28:43] spooq: has joined #ruby
[14:29:39] ajf-: has joined #ruby
[14:29:40] skullcrasher: hmm works well but no ide integration :/ don't know how to start debugging now -.-
[14:30:41] ljarvis: skullcrasher: debug by using debuggers (or simply puts statements to start). You don't need an ide
[14:31:47] dfinninger: has joined #ruby
[14:32:03] aegis3121: has joined #ruby
[14:32:03] GinoManWorks: has joined #ruby
[14:32:31] sinkensabe: has joined #ruby
[14:33:39] malconis: has joined #ruby
[14:34:29] malconis: has joined #ruby
[14:34:34] Guest58: has joined #ruby
[14:34:44] GriffinHeart: has joined #ruby
[14:35:58] jottr: has joined #ruby
[14:36:05] dfinninger: has joined #ruby
[14:36:30] bmalum: has joined #ruby
[14:38:17] aryaching: has joined #ruby
[14:38:44] s00pcan: has joined #ruby
[14:41:34] Guest58: has joined #ruby
[14:42:03] rodolfowtf: has joined #ruby
[14:42:11] nfk|laptop: has joined #ruby
[14:42:29] PedramT: has joined #ruby
[14:42:36] ror15: has joined #ruby
[14:42:48] mary5030: has joined #ruby
[14:43:54] dlitvak: has joined #ruby
[14:44:25] s00pcan: has joined #ruby
[14:47:13] atomical_: has joined #ruby
[14:48:18] pdoherty: has joined #ruby
[14:48:20] burbus: has joined #ruby
[14:48:33] Haris: has left #ruby: ()
[14:49:14] ta0: has joined #ruby
[14:51:17] platzhirsch: has joined #ruby
[14:51:19] _Tariq: has joined #ruby
[14:51:28] _Tariq: I am stuck with trying to name some variables
[14:51:41] dwfait: has joined #ruby
[14:52:15] Toledo|gone: has joined #ruby
[14:53:14] failshell: has joined #ruby
[14:54:44] _Tariq: Or rather, trying to name methods to make it clear what I'm doing
[14:55:47] pawnbox: has joined #ruby
[14:56:04] sarkis: has joined #ruby
[14:57:45] howdoi: has joined #ruby
[14:57:52] pawnbox: has joined #ruby
[14:57:55] sankaber: has joined #ruby
[14:58:40] rippa: has joined #ruby
[14:58:44] atomical: has joined #ruby
[15:00:36] alphaatom: has joined #ruby
[15:01:25] skade: has joined #ruby
[15:02:02] karapetyan: has joined #ruby
[15:02:55] aryaching: has joined #ruby
[15:04:23] mohamedAziz111: has joined #ruby
[15:04:31] zast: has joined #ruby
[15:04:34] bigkevmcd: has joined #ruby
[15:05:09] FernandoBasso: has joined #ruby
[15:05:41] LMity: has joined #ruby
[15:05:41] shevy: you must give fitting names
[15:05:58] shevy: ljarvis has yesterday or the day before determined that: def b99 is not a good name
[15:06:34] nerium: has joined #ruby
[15:06:49] atomical_: has joined #ruby
[15:06:50] blaxter: has joined #ruby
[15:07:09] benjohn: has joined #ruby
[15:07:33] polishdub: has joined #ruby
[15:08:26] nfk|laptop: has joined #ruby
[15:08:26] ilyasov: has joined #ruby
[15:09:18] ddv: _Tariq: show us some code
[15:09:32] _Tariq: https://gist.github.com/tra38/20bea744a037c6619f60
[15:09:32] pawnbox: has joined #ruby
[15:09:34] _Tariq: Here is the code
[15:10:24] shevy: now you only have to find better names!
[15:10:42] blackoperat: has joined #ruby
[15:11:57] aegis3121: _Tariq which ones aren't you sure of the name for?
[15:12:31] sankaber: has joined #ruby
[15:13:58] _Tariq: the method names in publish and insert_data
[15:14:03] _Tariq: and the method name "insert_data"
[15:14:38] Bloomer: has joined #ruby
[15:16:42] ttrevenen: has joined #ruby
[15:17:08] hxegon: has joined #ruby
[15:18:49] duckpuppy: has joined #ruby
[15:19:35] jgt: has joined #ruby
[15:20:32] akem: has joined #ruby
[15:21:21] stannard: has joined #ruby
[15:21:35] Rodya_: has joined #ruby
[15:22:12] B1n4r10: has joined #ruby
[15:22:19] Xeago: has joined #ruby
[15:23:30] lucasb: _Tariq: I have no idea what that code does, but what about names like get_result, generate_output...
[15:23:56] _Tariq: That could work, I should probably explain what it does
[15:23:59] mchu: has joined #ruby
[15:24:20] _Tariq: @narrative is an array of sentences. I join them together to make a string containing a narrative
[15:24:32] _Tariq: but this narrative has blanks where numbers can be inserted in
[15:24:50] _Tariq: so I then create an ERB file with that narrative string
[15:25:14] _Tariq: and then output the result of that erb file, using data
[15:26:14] momomomomo: has joined #ruby
[15:26:43] _Tariq: the binding method is used in erb to let erb use all the "data" fed into the class
[15:27:14] stannard: has joined #ruby
[15:28:03] dlitvak_: has joined #ruby
[15:28:36] decoponio: has joined #ruby
[15:28:47] _Tariq: lucasb: Does this makes a bit more sense? Should i show some automated tests?
[15:29:31] lucasb: ok, undertood. I just think that publish/insert_data sounds like you are pushing into something, while actually you are pulling out stuff from your object.
[15:30:28] lucasb: *understood
[15:30:40] _Tariq: What do you suggest would be a better name?
[15:31:22] JohnT: has joined #ruby
[15:32:15] flou: has joined #ruby
[15:32:27] mrtomme: has joined #ruby
[15:32:35] lucasb: like the ones I already said above: get_result, generate_output, etc. they sound like you getting stuff out of your object. but it's your choice :) btw, maybe you could join both publish and insert_data into a single method, I don't know.
[15:33:40] ljarvis: _Tariq: these methods are to be used in a template?
[15:34:25] _Tariq: ljarvis: Yeah, the user will be writing a "grammar" and then will use this class to turn their grammar into text
[15:34:45] _Tariq: the user will also pass in a Hash containing data that the class will place into the output
[15:34:48] ljarvis: i mean, publish should just be called "result" imo
[15:35:00] ljarvis: since it returns the result of the template after the erb binding
[15:35:01] _Tariq: Yeah, I think I'll just do that then
[15:35:24] asccigcc: has joined #ruby
[15:35:47] blaxter: has joined #ruby
[15:35:59] ljarvis: def result; ERB.new(@narrative.join(" ")).result(binding); end
[15:36:29] _Tariq: I am just afraid having so much code on one line may be too much
[15:36:48] ljarvis: ok, that's really not much code though. But you can obviously split it into 2 lines
[15:37:27] blackmesa: has joined #ruby
[15:37:30] _Tariq: Yeah I just checked. It's only 42 words.
[15:37:39] bahar: has joined #ruby
[15:37:40] _Tariq: So I'll just keep it as one line then.
[15:37:54] _Tariq: I guess it'll make it more clearer that I'm relying on ERB
[15:37:57] _Tariq: for this to work
[15:38:19] asccigcc: has joined #ruby
[15:38:36] andikr: has joined #ruby
[15:38:44] _Tariq: Thank you ljarvis, and lucasb
[15:39:15] Limix: has joined #ruby
[15:39:35] bronson: has joined #ruby
[15:40:36] edwinvdgraaf: has joined #ruby
[15:41:32] govg: has joined #ruby
[15:43:15] spiman: has joined #ruby
[15:44:36] slawrence00: has joined #ruby
[15:44:38] Jardayn: has joined #ruby
[15:44:47] cholq: has joined #ruby
[15:45:35] cholq: has left #ruby: ()
[15:45:36] Melpaws: has joined #ruby
[15:46:23] govg_: has joined #ruby
[15:46:54] edwinvdg_: has joined #ruby
[15:47:23] lacuna: has joined #ruby
[15:47:23] lacuna: has joined #ruby
[15:49:00] akemrir: has joined #ruby
[15:49:59] shevy: has joined #ruby
[15:50:41] Frem: has joined #ruby
[15:51:39] dlitvak: has joined #ruby
[15:51:40] dionysus69: has joined #ruby
[15:51:49] Melpaws: anyone familiar with viewpoint/ruby gem ? I need to only grab the first email in the folder but not sure of the syntax
[15:52:09] shevy: has joined #ruby
[15:52:45] PedramT: has joined #ruby
[15:53:28] jackcom: i want make graph by ruby. is it possible?
[15:55:11] hxegon_: has joined #ruby
[15:55:33] lacuna: has joined #ruby
[15:57:04] jackcom: No one is here?
[15:57:08] shevy: jackcom https://rubygems.org/gems/gruff
[15:57:18] TomPeed: yes its possible, and there are probably some good gems to help you
[15:57:26] KineticX: has joined #ruby
[15:57:38] jackcom: oh shevy and TomPeed thanks
[15:57:40] aryaching: has joined #ruby
[15:58:13] jackcom: lol what is it? web site is just white. shevy
[15:58:21] govg_: has joined #ruby
[15:58:29] shevy: don't be silly
[15:59:03] shevy: if you would not be so lazy you would have clicked on the right links until you reached https://github.com/topfunky/gruff
[15:59:55] jackcom: hey shevy i can see example of using Gruff?
[16:00:04] mrfilip: has joined #ruby
[16:00:22] ljarvis: jackcom: stop trolling
[16:00:25] TomPeed: http://lmgtfy.com/?q=ruby+gruff+example
[16:00:37] jackcom: ljarvis: i m serious now
[16:00:43] akem: has joined #ruby
[16:00:52] ljarvis: then click on the link, where you'll see there's an example right there
[16:00:59] jackcom: i must make GUI app using gruff ljarvis
[16:01:00] TomPeed: http://blog.nikosd.com/2008/10/beautiful-bar-charts-with-ruby-and.html
[16:01:33] aegis3121: has joined #ruby
[16:01:40] krz: has joined #ruby
[16:01:45] agentmeerkat: has joined #ruby
[16:01:49] jackcom: oh nice ljarvis thanks
[16:02:08] joonty: has joined #ruby
[16:02:23] duckpuppy: has joined #ruby
[16:02:29] arup_r: has joined #ruby
[16:02:29] KineticX: I have a string of text created from return data via an ajax call, example data = "<div> <p>hello world </p></div>" When i try to display it on the page it simply acts as raw text and is not rendered. How can i make the browser render my string as proper html
[16:02:50] ljarvis: KineticX: raw() or .html_safe if you're using rails
[16:02:56] jackcom: one more question, if i install ruby package, then how can i do? TomPeed
[16:03:28] kies^: has joined #ruby
[16:03:44] TomPeed: not sure what you're asking
[16:03:45] Affix: has joined #ruby
[16:04:10] kerunaru: has joined #ruby
[16:04:12] jackcom: package like ???rubygems???, 'gruff'
[16:04:24] TomPeed: ruby install gruff
[16:04:32] TomPeed: gem install gruff*
[16:04:33] ljarvis: gem install*
[16:04:47] KineticX: so now im getting just the raw html and its not getting rendered in the browser
[16:05:00] jackcom: python use pip, and ruby use gem?
[16:05:04] shevy: jackcom have you not like asked this 10 days ago or so?
[16:05:26] adaedra: jackcom: did you made your research before asking?
[16:05:40] jackcom: yes, adaedra many times
[16:06:04] InvGhost: has joined #ruby
[16:06:14] jackcom: if i use mac, then i can install it by brew?
[16:06:30] jackcom: if i use mac, then i can install ???gem???by brew?
[16:06:40] aegis3121: gem in included as part of a ruby package
[16:06:48] mjc_: has joined #ruby
[16:06:48] KineticX: brew install gem maybe
[16:06:55] bluOxigen: has joined #ruby
[16:07:00] jackcom: oh KineticX thanks :)
[16:07:03] KineticX: aegis3121: use google its your best friend.
[16:07:09] futilegames: has joined #ruby
[16:07:15] KineticX: installing ruby is pretty stragiht forward.
[16:07:17] jackcom: i think that ruby programmer is very kind :)
[16:07:20] nettoweb: has joined #ruby
[16:07:23] shevy: how many of them are trolls
[16:07:30] lannonbr: has joined #ruby
[16:07:53] KineticX: anyone know the answer to my question?
[16:07:57] havenwood: jackcom: RubyGems ships with Ruby. It's part of Ruby.
[16:08:08] kiidbrian: has joined #ruby
[16:08:15] jackcom: thanks havenwood
[16:08:18] aegis3121: KineticX if you're using Rails, I'd suggest using #RubyOnRails
[16:08:22] KineticX: @havenwood not on ubuntu its nto
[16:08:23] jackcom: gem --help
[16:08:24] jackcom: RubyGems is a sophisticated package manager for Ruby. This is a
[16:08:25] jackcom: basic help message containing pointers to more information.
[16:08:32] KineticX: hi isnt a rails question this is a ajax.
[16:08:40] Papierkorb: KineticX: Are you using rails?
[16:08:41] KineticX: in conjunction with ruby
[16:08:48] Papierkorb: KineticX: Or some other web framework?
[16:09:00] jackcom: i can use ruby that is installed on mac?
[16:09:08] KineticX: I am using rails but the question i have is about rendering html in the dom from a string.
[16:09:17] Papierkorb: KineticX: Then your question is rails specific.
[16:09:20] aegis3121: Which sounds like a Rails View question
[16:09:21] adaedra: This is totally #RubyOnRails domain.
[16:09:50] jackcom: strange. i install python with pip again to local folder. adaedra
[16:10:08] jackcom: i must install ruby to local folder?
[16:10:10] adaedra: We don't care about python.
[16:10:10] Papierkorb: is this jack thing a bot?
[16:10:12] havenwood: KineticX: Even on Ubuntu it's part of the Ruby package. (1.8 is dead.)
[16:10:23] chouhoulis: has joined #ruby
[16:10:31] KineticX: no its not havenwood
[16:10:37] havenwood: KineticX: It is.
[16:10:38] KineticX: you have to do apt-get install rubygems
[16:10:42] dfinninger: has joined #ruby
[16:10:44] havenwood: KineticX: Only with Ruby 1.8.
[16:10:49] jackcom: Papierkorb: i m serious. because i must make GUI app with ruby.
[16:10:55] KineticX: right but thats the default that comes with ubuntu
[16:11:06] havenwood: KineticX: No, no it isn't. Unless you live in the past.
[16:11:08] Papierkorb: jackcom: Then google a bit. It's not hard. "installing ruby on mac" is your search query.
[16:11:32] adaedra: There's ruby 2.0 pre-installed on recent OS X.
[16:11:36] jackcom: Papierkorb: ruby is installed to mac when it is made.
[16:11:46] Papierkorb: jackcom: We here can and will help, but we're entitled to expect that you show some effort first.
[16:11:51] scepticulous: has joined #ruby
[16:11:52] jottr: has joined #ruby
[16:12:48] jackcom: ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14] <?????? adaedra it is ok to use?
[16:12:59] adaedra: LAST TIME:
[16:13:15] jackcom: i will make it from now thanks
[16:13:29] arup_r: has joined #ruby
[16:14:19] adaedra: Seriously, next question we've already answered or which can be replied by a 15" google search and you're muted, jackcom.
[16:14:26] jackcom: which ruby
[16:15:17] toretore: my laptop is only 13" am i excepted from this rule?
[16:15:22] jackcom: which ruby
[16:15:23] jackcom: ???/usr/local/bin/ruby <??? it is installed to local folder
[16:15:28] jackcom: ok thanks adaedra :)
[16:15:29] ljarvis: 15 inch google search
[16:15:45] finisherr: has joined #ruby
[16:16:04] lucasb: jackcom: can i install rubi on windows too?
[16:16:25] ljarvis: lucasb: what are you doing?
[16:16:45] lucasb: ljarvis: sorry, I just got bored. :)
[16:16:59] jackcom: yeah, i don???t use windows for text problem. cp949???..3@#@#SEFSses%%#@ed: lucasb
[16:17:01] adaedra: no need to feed.
[16:17:19] sftrabbit: has joined #ruby
[16:17:19] jackcom: windows terminal is very strange
[16:17:20] rkazak: has joined #ruby
[16:18:29] jackcom: i think that few people use windows terminal.
[16:18:39] adaedra: i think this is not this channel topic.
[16:19:04] jackcom: lucasb ask me that now. adaedra
[16:19:42] failshell: has joined #ruby
[16:20:34] TheAnachron: has joined #ruby
[16:21:05] jackcom: gem install rake VS gem build package.gemspec <?????? i think that both is installing package.
[16:21:35] Ishido: has joined #ruby
[16:21:44] adaedra: no. If you're trying to install gems, stick to the first one.
[16:22:22] Rodya_: has joined #ruby
[16:23:34] moresilenter: has joined #ruby
[16:24:13] atomical: has joined #ruby
[16:24:31] moresilenter: anyone know how to get semantic completion going in vim? I've got YouCompleteMe going, and after reading about vim-ruby, I thought it'd work out of the box, but it doesn't seem to be
[16:24:53] jackcom: ???/usr/local/Cellar/ruby/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- gruff (LoadError) <?????? gem install gruff
[16:26:19] cschneid_: has joined #ruby
[16:27:03] jamw: has joined #ruby
[16:28:01] aryaching: has joined #ruby
[16:28:24] shevy: jackcom bad
[16:28:35] jackcom: lol then how can i do?
[16:28:54] lacuna: has joined #ruby
[16:29:07] shevy: you can't!
[16:29:27] jackcom: gem install gruff <?????? it isn???t?
[16:30:16] davedev24: has joined #ruby
[16:30:44] Bloomer: has joined #ruby
[16:30:55] jackcom: extconf failed, exit code 1
[16:31:01] jackcom: Provided configuration options:
[16:31:07] jackcom: i m failed
[16:31:59] jackcom: adaedra: you know it?
[16:31:59] Encapsulation: has joined #ruby
[16:32:29] jackcom: ERROR: Error installing gruff:
[16:32:29] jackcom: ERROR: Failed to build gem native extension.
[16:33:11] adaedra: That's not enough to see what's happening. You should have more output, including names to locations on your hard drive with useful information.
[16:33:29] jackcom: ok thanks :) adaedra
[16:33:42] TomPeed: if you're going to troll atleast make it funny
[16:33:50] TomPeed: this is just retarded
[16:34:02] shevy: that's where he excels at!
[16:34:05] resin: has joined #ruby
[16:34:17] adaedra: Still better than wording at it.
[16:34:24] adaedra: (I'm already out.)
[16:34:55] jackcom: http://paste.ofcode.org/33BYthVvYLZErqefDLy3QsH <?????? adaedra
[16:34:56] blackwhitejewish: has joined #ruby
[16:34:56] ChanServ: +b blackwhitejewish!*@*
[16:34:56] ChanServ: ChanServ kicked blackwhitejewish: Good bye
[16:34:58] ruby[bot]: -b blackwhitejewish!*@*
[16:35:12] rob_: has left #ruby: ()
[16:35:56] adaedra: apeiros: it still doesn't put the +b $#ruby-banned back
[16:36:55] joonty: has joined #ruby
[16:37:19] jackcom: installing gruff is difficult?
[16:37:34] adaedra: Took me 20 seconds to find the solution to your problem on google.
[16:37:47] adaedra: Go do your research.
[16:37:58] jackcom: ok you too adaedra
[16:38:16] kies^: has joined #ruby
[16:38:31] jackcom: searching same with me
[16:38:35] bweston92: has joined #ruby
[16:40:11] chussenot: has joined #ruby
[16:40:18] Macaveli: has joined #ruby
[16:40:56] jbrhbr: has joined #ruby
[16:41:22] arup_r: adaedra: use your +b power.. :p
[16:42:45] atomical: has joined #ruby
[16:43:29] dfinninger: has joined #ruby
[16:46:26] aegis3121: has joined #ruby
[16:47:33] failshell: has joined #ruby
[16:49:18] [Butch]: has joined #ruby
[16:50:52] platzhirsch: has left #ruby: ()
[16:52:16] aryaching_: has joined #ruby
[16:53:05] shinnya: has joined #ruby
[16:54:29] cpup: has joined #ruby
[16:54:29] speaking1ode: has joined #ruby
[16:55:08] babblebre: has joined #ruby
[16:55:54] jackcom: i fail installing gruff on ubuntu. anyway i m very too sleepy now thanks adaedra :)
[16:56:06] adaedra: yeah, stop trolling.
[16:56:10] chadhs: has joined #ruby
[16:57:51] jackcom: anyway i want make GUI app with ruby. but i failed installing ???gruff??? package. so i m very disappointed with that. :( it is not troll adaedra
[16:59:07] momomomomo: has joined #ruby
[16:59:33] speakingcode: has joined #ruby
[17:00:22] adaedra: I don't believe you.
[17:00:49] jackcom: lol http://paste.ofcode.org/33BYthVvYLZErqefDLy3QsH <?????? this is evidence
[17:00:54] psye: has joined #ruby
[17:01:30] amclain: has joined #ruby
[17:02:09] psye: has joined #ruby
[17:02:29] Carella: try brew install imagemagick
[17:02:38] jackcom: anyway i m too hard now, so i can???t sit on chair. i must lie immediately
[17:02:44] jackcom: carella: me?
[17:03:10] Carella: yes, if you're the one having issues with rmagick
[17:03:24] agentmeerkat: has joined #ruby
[17:04:05] jackcom: checking for Magick-config... no No package 'MagickCore' found carella
[17:04:20] Carella: have you installed imagemagick?
[17:04:33] mistermocha: has joined #ruby
[17:04:45] adaedra: that's what google would have told you to do if you'd have used it.
[17:04:54] jackcom: how can i know that imagemagick is installed already? carella
[17:05:01] volty: has joined #ruby
[17:05:05] atomical_: has joined #ruby
[17:05:53] volty: Benchmark prints labels before executing the code. Any way to instruct it to print them afterwards ?
[17:05:54] speaking1ode: has joined #ruby
[17:06:46] finisherr: has joined #ruby
[17:07:46] PedramT: has joined #ruby
[17:08:00] dfinninger: has joined #ruby
[17:08:02] akkmaxon: has joined #ruby
[17:10:29] scottschecter: has joined #ruby
[17:11:42] aryaching: has joined #ruby
[17:11:51] marr: has joined #ruby
[17:11:55] zambini: has joined #ruby
[17:13:32] mahlon: has joined #ruby
[17:14:51] pawnbox: has joined #ruby
[17:15:26] pawnbox: has joined #ruby
[17:17:52] mchu: has joined #ruby
[17:19:43] Limix: has joined #ruby
[17:21:32] troulouliou_div2: has joined #ruby
[17:21:52] graffix222: has joined #ruby
[17:22:36] mrfilip: has left #ruby: ()
[17:22:39] mclong: has joined #ruby
[17:23:03] dostoyevsky: Can one actually use dtrace to see ruby's stack traces? Does one need a driver of some kind? Or is that just: compile ruby with dtrace support?
[17:23:15] symm-: has joined #ruby
[17:23:25] Rodya_: has joined #ruby
[17:23:37] malconis: has joined #ruby
[17:24:01] The_Phoenix: has joined #ruby
[17:24:47] B1n4r10: has joined #ruby
[17:24:57] RobertBirnie: has joined #ruby
[17:25:34] waheedi: has joined #ruby
[17:26:22] atomical: has joined #ruby
[17:27:56] muxcmux: has joined #ruby
[17:28:06] bronson: has joined #ruby
[17:28:13] TomyLobo: has joined #ruby
[17:28:20] rehat: has joined #ruby
[17:28:36] dangerousdave: has joined #ruby
[17:29:28] bricker: has joined #ruby
[17:29:43] dlitvak_: has joined #ruby
[17:30:07] aryaching: has joined #ruby
[17:31:20] pdoherty: has joined #ruby
[17:33:22] Blaguvest: has joined #ruby
[17:33:37] cpup: has joined #ruby
[17:34:11] muxcmux: has joined #ruby
[17:36:07] douglass1: how can I decrement a unicode character in ruby? is there a method analogous to next?
[17:37:00] ljarvis: .ord - 1 ?
[17:37:01] toretore: that doesn't make any sense. how would you decrement ????
[17:37:26] douglass1: i want to get the previous codepoint
[17:38:01] douglass1: ah for some reason i thought .ord was ascii-only, sorry
[17:38:30] ljarvis: >> "???".ord - 1
[17:38:32] ruby[bot]: ljarvis: # => 9730 (https://eval.in/502221)
[17:39:25] douglass1: wait .chr is ascii-only though
[17:39:35] shadeslayer: has joined #ruby
[17:39:38] ljarvis: ya that wont work
[17:39:43] toretore: >> '???'.succ
[17:39:44] ruby[bot]: toretore: # => "???" (https://eval.in/502222)
[17:40:07] kt2: has joined #ruby
[17:40:17] ljarvis: yep, but you can't do (ord - 1).chr because it'll presumably be out of character range
[17:40:18] douglass1: .succ is the same as next, ie the opposite of what i want
[17:40:34] dpg1: has joined #ruby
[17:40:43] asmodlol: has joined #ruby
[17:41:06] toretore: i know, i'm just surprised it works, for some definition of "works"
[17:41:23] ericfreese: has joined #ruby
[17:41:30] ljarvis: >> ["???".ord - 1].pack("U*")
[17:41:32] ruby[bot]: ljarvis: # => "???" (https://eval.in/502227)
[17:41:36] ljarvis: douglass_: work?
[17:42:21] adaedra: Having fun?
[17:42:24] volty: what's the sequel way to insert if not present ? select....count > 0 ?
[17:42:25] mistermocha: has joined #ruby
[17:42:36] douglass1: ljarvis: yes thanks!
[17:42:39] ljarvis: >> ("???".ord - 1).chr("UTF-8")
[17:42:41] ruby[bot]: ljarvis: # => "???" (https://eval.in/502229)
[17:42:43] ljarvis: douglass_: or that ^
[17:42:49] ljarvis: forgot chr can take that argument
[17:43:07] ljarvis: volty: what database?
[17:43:15] ljarvis: or do you want it agnostic?
[17:43:18] douglass1: ljarvis: that works too
[17:43:28] ljarvis: volty: do a select and insert separate
[17:44:08] volty: agnostic's better, @ ljarvis, thx
[17:44:31] eam: >> [*????..????]
[17:44:32] ruby[bot]: eam: # => ["???", "???", "???", "???", "???", "???"] (https://eval.in/502230)
[17:45:29] ico: has joined #ruby
[17:46:25] edwinvdgraaf: has joined #ruby
[17:46:45] ericfreese: has joined #ruby
[17:46:50] zambini: >> [*????..????].shuffle[0]
[17:46:52] ruby[bot]: zambini: # => "???" (https://eval.in/502231)
[17:48:10] ericfreese: has joined #ruby
[17:48:26] zachk: has joined #ruby
[17:49:12] dlitvak: has joined #ruby
[17:49:46] momomomomo: has joined #ruby
[17:49:59] rakm: has joined #ruby
[17:51:39] jbrhbr: has joined #ruby
[17:52:12] mhib: has joined #ruby
[17:52:15] duckpuppy: has joined #ruby
[17:52:22] harai54: has joined #ruby
[17:52:55] zambini: has left #ruby: ()
[17:53:07] zambini: has joined #ruby
[17:53:27] _djbkd: has joined #ruby
[17:54:28] SCHAAP137: has joined #ruby
[17:54:48] lacuna: has joined #ruby
[17:54:49] nfk|laptop: has joined #ruby
[17:55:32] _djbkd: has joined #ruby
[17:55:52] mikecmpbll: has joined #ruby
[17:56:32] freerobby: has joined #ruby
[17:57:30] aegis3121: has joined #ruby
[17:58:02] failshell: has joined #ruby
[17:58:38] dhalsim: has joined #ruby
[18:00:17] lucasb: has joined #ruby
[18:03:50] millerti: has joined #ruby
[18:05:28] firstdayonthejob: has joined #ruby
[18:05:57] Anderson69s: has joined #ruby
[18:06:42] roshanavand: has joined #ruby
[18:08:29] skade: has joined #ruby
[18:09:14] kerunaru: has joined #ruby
[18:11:59] dfinninger: has joined #ruby
[18:13:46] nfk|laptop: has joined #ruby
[18:15:09] kt2: has joined #ruby
[18:16:31] northfurr: has joined #ruby
[18:17:27] bronson: has joined #ruby
[18:17:38] guacamole: has joined #ruby
[18:19:23] dfinninger: has joined #ruby
[18:20:26] davedev24: has joined #ruby
[18:20:42] bruce__lee: has joined #ruby
[18:20:49] Chewy11212: has joined #ruby
[18:21:47] dcunit3d: has joined #ruby
[18:24:05] freerobby: has joined #ruby
[18:24:11] Rodya_: has joined #ruby
[18:24:37] Bloodshot: has joined #ruby
[18:24:48] momomomomo: has joined #ruby
[18:25:50] bluOxigen_: has joined #ruby
[18:26:00] uris: has joined #ruby
[18:26:05] joonty: has joined #ruby
[18:26:10] aegis3121: has joined #ruby
[18:26:31] arthurix: has joined #ruby
[18:27:46] jamw: has joined #ruby
[18:29:55] jackjackdripper: has joined #ruby
[18:30:23] dlitvak_: has joined #ruby
[18:30:48] last_staff: has joined #ruby
[18:30:49] jhn: has joined #ruby
[18:32:05] skade: has joined #ruby
[18:34:24] edwinvdgraaf: has joined #ruby
[18:34:38] Xeago: has joined #ruby
[18:34:49] jottr: has joined #ruby
[18:35:14] ajf-: has joined #ruby
[18:35:57] sandstrom: has joined #ruby
[18:37:32] Toledo|gone: has left #ruby: ("http://quassel-irc.org - Chat comfortably. Anywhere.")
[18:39:58] uris: has joined #ruby
[18:40:17] caffeinic: has joined #ruby
[18:40:39] pulgolino: has joined #ruby
[18:40:56] davedev24: has joined #ruby
[18:43:35] B1n4r10: has joined #ruby
[18:44:24] fmcgeough: has joined #ruby
[18:46:24] [Butch]: has joined #ruby
[18:48:07] TomyLobo: has joined #ruby
[18:48:48] krobzaur: has joined #ruby
[18:49:07] kt2: has joined #ruby
[18:51:14] usershell: has joined #ruby
[18:51:24] davedev24: has joined #ruby
[18:51:52] adaedra: >> [*????..????].sample
[18:51:53] ruby[bot]: adaedra: # => "???" (https://eval.in/502275)
[18:51:56] adaedra: zambini: ^
[18:54:27] Martiini: has joined #ruby
[18:54:35] shadoi: has joined #ruby
[18:54:45] zambini: :) Ruby has everything
[18:55:11] uris: has joined #ruby
[18:58:53] baweaver: has joined #ruby
[18:59:05] Encapsulation: has joined #ruby
[18:59:42] blackmesa: has joined #ruby
[19:00:09] Psyq: has joined #ruby
[19:00:26] dorei: has joined #ruby
[19:00:48] uris: has joined #ruby
[19:01:12] mhib: has joined #ruby
[19:02:24] asmodlol: has joined #ruby
[19:03:03] bluOxigen: has joined #ruby
[19:04:11] wolffles: has joined #ruby
[19:04:39] JohnT: has joined #ruby
[19:04:57] ta: has joined #ruby
[19:06:31] wolffles: cant figure out how to update my version of ruby
[19:06:42] treehug88: has joined #ruby
[19:06:46] pipework: wolffles: how'd you install it?
[19:06:47] adaedra: how did you install ruby?
[19:06:57] adaedra: stop being so fast, pipework.
[19:07:10] wolffles: i think my mac came with it
[19:07:50] adaedra: it may get updated with next OS X release. You can install another one with brew or ruby-install.
[19:07:56] pipework: wolffles: that's a system ruby, you should leave that as is. Install another with chruby and ruby-install.
[19:08:08] pipework: I install ruby-install and chruby with homebrew, myself.
[19:08:30] aegis3121: I tend to use rbenv for mine.
[19:08:40] pipework: adaedra: shims :(
[19:08:43] adaedra: if you need only one ruby, chruby is not really needed.
[19:08:45] pipework: rehashing :(
[19:08:54] TomPeed: do people still use rvm?
[19:08:59] adaedra: pipework: I think you're mistaken on the person.
[19:09:08] pipework: aegis3121: shims :(
[19:09:13] pipework: adaedra: You are right!
[19:09:17] adaedra: TomPeed: some do. You can if you like the bloat.
[19:09:17] aegis3121: hah. It's true. it has its problems.
[19:09:37] pipework: TomPeed: I use RVM for head rubies and patches.
[19:09:43] aegis3121: But, that said, it feels fairly lightweight and easier to use, particularly coming from rvm.
[19:09:57] pipework: You can use it with chruby+ruby-install
[19:10:12] Carella: What's wrong with rvm?
[19:10:19] pipework: carella: Big and wieldy.
[19:10:20] zacts: has joined #ruby
[19:10:21] adaedra: A bit bloated.
[19:10:34] pipework: chruby and ruby-install can both be read in a single sitting.
[19:10:36] techietrash: has joined #ruby
[19:10:36] techietrash: has joined #ruby
[19:10:40] pdoherty: has joined #ruby
[19:10:51] Carella: Does not sound like constructive argument :)
[19:11:02] paultreny: has joined #ruby
[19:11:18] Limix: has joined #ruby
[19:11:24] pipework: carella: Less code, and simpler code isn't a great win when considering code you'll be depending on?
[19:11:32] ur5us: has joined #ruby
[19:11:33] voidDotClass: has joined #ruby
[19:11:51] voidDotClass: anyone know how to get rspec expects to work with boolean values? e.g i'm doing expect (! acct.valid?) but that seems to always work no matter what
[19:12:05] pipework: chruby and ruby-install each do a single thing well.
[19:12:07] adaedra: expect().to be_truthy
[19:12:10] adaedra: expect().to be_falsy
[19:12:17] aegis3121: or to be true, if you're looking for the actual thing
[19:12:23] aegis3121: expect().to be true/to be false
[19:12:32] pipework: aegis3121: Doesn't that raise warnings in rspec?
[19:12:42] aegis3121: Never has for me...
[19:12:44] pipework: complains about how you should use truthiness.
[19:13:18] pipework: I think you'd need expect(something).to eq(true) these days
[19:13:30] baweaver: has joined #ruby
[19:14:01] aegis3121: I dunno. We use Rspec 3.1.0 and have no complaints from RSpec about it.
[19:14:14] pipework: https://github.com/rspec/rspec-rails/issues/976
[19:14:27] pipework: `be true` works though.
[19:14:40] aegis3121: which is what we do, so.... safe lol
[19:15:32] symbole: has joined #ruby
[19:15:33] pipework: aegis3121: I was thinking be_true, which was deprecated and removed.
[19:15:45] aegis3121: No worries :) Didn't realize it had, so still good to know.
[19:15:59] northfurr: has joined #ruby
[19:16:11] voidDotClass: expect (acct.valid?).to eq false
[19:16:12] voidDotClass: NoMethodError:
[19:16:12] voidDotClass: undefined method `to' for false:FalseClass
[19:16:15] guacamole: has joined #ruby
[19:16:21] pipework: voidDotClass: Don't cross-post.
[19:16:27] pipework: One channel please.
[19:17:08] sarkis: has joined #ruby
[19:17:23] domgetter: has joined #ruby
[19:17:28] hannelita: has joined #ruby
[19:19:22] kadoppe: has joined #ruby
[19:24:41] jhn: has joined #ruby
[19:24:51] Rodya_: has joined #ruby
[19:25:22] guacamole: has joined #ruby
[19:25:23] dhollinger: has joined #ruby
[19:25:53] PedramT: has joined #ruby
[19:26:07] arup_r: has joined #ruby
[19:27:03] lacuna: has joined #ruby
[19:27:04] lacuna: has joined #ruby
[19:29:07] preyalone: has joined #ruby
[19:29:11] voidDotClass: Is there a recommended way of setting config to be shared between RSpec and Factorygirl? E.g a test password constant
[19:30:32] f0ster: voidDotClass: env var ?
[19:33:03] PedramT: has joined #ruby
[19:33:21] cdg: has joined #ruby
[19:33:33] baweaver: has joined #ruby
[19:33:49] ta: has joined #ruby
[19:34:12] dlitvak: has joined #ruby
[19:36:32] ericfreese: has joined #ruby
[19:37:11] m1dnight_: has joined #ruby
[19:37:40] bruce__lee: has joined #ruby
[19:38:12] PedramT: has joined #ruby
[19:38:17] wolffles: i cant seem to call this method correctly??? can someone show me what im doing wrong?
[19:38:18] wolffles: https://eval.in/502305
[19:38:49] symm-: has joined #ruby
[19:38:52] chadhs: has joined #ruby
[19:39:20] uris: has joined #ruby
[19:39:41] Xeago: has joined #ruby
[19:39:52] spider-mario: has joined #ruby
[19:39:59] norc: has joined #ruby
[19:40:26] who42: has joined #ruby
[19:40:37] norc: Ox0dea: #jruby is wonderful! Everybody there is just constantly talking about internals. :D
[19:41:09] curses: has joined #ruby
[19:41:45] dlitvak: has joined #ruby
[19:42:02] acidrainfall: has joined #ruby
[19:42:06] zeroDivisible: has joined #ruby
[19:42:41] dlitvak: has joined #ruby
[19:42:56] acidrainfall: hey guys - erb question. I am passing in a value that may be defined, or undef. It's undef by default. I was using this format: http://fpaste.org/310916/14527986/ which didn't work. I've also tried if scope['::var'].defined? and that didn't work either.
[19:43:05] toretore: wolffles, you're probably passing an array
[19:43:07] acidrainfall: oh right, != undef is invalid - !=nil still came in true
[19:43:07] aegis3121: wolffles: You'r etrying to call #keys on an Array
[19:43:56] toretore: wolffles, choose either 1) pass 1 array with no splat or 2) pass as list of arguments with splat
[19:44:07] malconis: has joined #ruby
[19:44:08] toretore: wolffles, hint: the correct way is #1
[19:44:27] aegis3121: If he's wanting a Hash, he just...shouldn't splat it, though.
[19:44:31] norc: acidrainfall: I think you may want to ask your question in a puppet related place.
[19:45:08] acidrainfall: the issue is in the .erb template
[19:45:11] wolffles: the thing is the code itself is from ruby monk, they way they test it??? the code executes jsut fine??? however when i try to call it myself it wont work
[19:45:12] acidrainfall: I figured ruby might be more helpful
[19:45:25] norc: acidrainfall: We could be
[19:45:36] dhollinger: has joined #ruby
[19:45:45] norc: acidrainfall: But undef is not a concept that Ruby has.
[19:45:58] edwinvdgraaf: has joined #ruby
[19:45:59] acidrainfall: https://docs.puppetlabs.com/puppet/latest/reference/lang_template_erb.html#puppet-data-types-in-ruby according to that, it gets transformed to nil
[19:46:04] acidrainfall: how would you test for nil in a .erb?
[19:46:15] wolffles: im not sure thats why im asking
[19:46:17] acidrainfall: don't tell me it's that easy
[19:46:22] norc: acidrainfall: It is that easy.
[19:46:24] toretore: wolffles, show more code
[19:46:41] wolffles: more code from what?
[19:46:43] aegis3121: wolffles: https://eval.in/502312
[19:46:47] norc: &ri NilClass#nil?
[19:46:48] `derpy: http://ruby-doc.org/core-2.3.0/NilClass.html#method-i-nil-3F
[19:46:53] acidrainfall: norc: well damn.
[19:47:03] djbkd: has joined #ruby
[19:47:11] norc: &ri Object#nil?
[19:47:12] `derpy: http://ruby-doc.org/core-2.3.0/Object.html#method-i-nil-3F
[19:47:18] toretore: wolffles, well, first of all, i can't see anywhere in the code you posted that you actually call the method
[19:47:21] norc: acidrainfall: These two methods allow for .nil? to work.
[19:47:25] norc: In all cases.
[19:47:29] eqdw: has joined #ruby
[19:47:29] norc: For any object.
[19:47:39] aegis3121: toretore the method #keys?
[19:47:41] eqdw: has left #ruby: ()
[19:47:45] eqdw: has joined #ruby
[19:47:47] aegis3121: Should be line 8.
[19:47:56] eqdw: hi #ruby. I???m trying to solve a mystery.
[19:48:07] acidrainfall: norc: and the "if not nil" would be !object.nil?
[19:48:07] toretore: it was the butler
[19:48:07] who42: has joined #ruby
[19:48:08] eqdw: work just suffered a severe P0 because we used ???!=~??? when we meant to use ???!~???
[19:48:12] acidrainfall: norc: is that correct?
[19:48:15] eqdw: these two things do not do the same thing
[19:48:17] nettoweb: has joined #ruby
[19:48:17] norc: acidrainfall: Or better use "unless" to negate.
[19:48:20] eqdw: ???!=~??? does not exist, as far as I can tell
[19:48:23] wolffles: toretore: i thought the mine.cost([{rice:2,noodles:2},{rice:1,noodles:1}])
[19:48:25] norc: acidrainfall: Yes it would.
[19:48:28] norc: eqdw: !~
[19:48:29] eqdw: and i???m trying to figure out, if it doesn???t exist, wtf does it do
[19:48:30] wolffles: was the calling
[19:48:32] acidrainfall: I could do unless.
[19:48:34] acidrainfall: Okay thanks a lot
[19:48:39] who42: has joined #ruby
[19:48:40] aegis3121: wolffles: If you're expecting an array of Hashes, I would call like so: cost({a: 2}, {b: 3}) The splat will create an Array, no need to pass it as one.
[19:48:41] norc: acidrainfall: Also just for competions sake
[19:48:43] m1dnight_: has joined #ruby
[19:48:45] eqdw: pry-doc shows me the C for =~ and !~ but says !=~ doesn???t exist
[19:48:47] toretore: wolffles, whoops, sorry, didn't see that
[19:48:53] eqdw: but ???123??? !=~ /1/ returns true
[19:48:56] norc: acidrainfall: obj == nil is also possible (but dont do that. just use .nil?)
[19:48:59] eqdw: !=~ is also ungooglable so
[19:49:00] aegis3121: Or, don't splat and just force it as an array cost[{a: 2}, {b: 3}]
[19:49:10] wolffles: ill try taht aegis3121:
[19:49:11] acidrainfall: norc: :) thank you
[19:49:14] who42: has joined #ruby
[19:49:24] eqdw: I???m going to dive through MRI source soon but was hoping y???all might have pointers ?
[19:49:27] toretore: wolffles, so which part of this is your code and which is not?
[19:49:30] domgetter: Is !=~ a method? I thought it was just !~
[19:49:31] norc: eqdw: I have plenty.
[19:49:33] norc: eqdw: What do you need?
[19:49:38] who42: has joined #ruby
[19:50:03] eqdw: domgetter: !=-~ is a method but it does not do what you think it does
[19:50:06] who42: has joined #ruby
[19:50:10] eqdw: norc: definition of String#!=~
[19:50:13] wolffles: toretore: anything with ???mine ??? ,in it pretty much the last 2 lines
[19:50:17] toretore: eqdw, !=~ doesn't make any sense, replace it with something else
[19:50:32] who42: has joined #ruby
[19:50:38] lucasb: maybe it's the the unary "~"
[19:50:38] eqdw: toretore: yes. We did that. But I???m trying to figure out why ???123??? !=~ /1/ returns true instead of nomethoderror
[19:50:42] eqdw: oh my god
[19:50:43] zambini: has left #ruby: ()
[19:50:43] zambini: has joined #ruby
[19:50:44] eqdw: OH MY GOD
[19:50:47] eqdw: lucasb: <3
[19:50:51] eqdw: I bet you???re right
[19:50:51] toretore: wolffles, ok so the Restaurant class is something you get from a lib?
[19:51:00] norc: eqdw: Do you want to be spoon fed or just pointers to help you get there by yourself?
[19:51:30] eqdw: norc: the latter
[19:51:35] eqdw: but I think lucas just solved it
[19:51:36] who42: has joined #ruby
[19:51:37] domgetter: There we go: https://gist.github.com/domgetter/600fb6a51b9891188a5d
[19:51:43] domgetter: !=~ is solved
[19:51:48] wolffles: toretore: i got it from rubymonk
[19:52:02] acidrainfall: norc: is $var = '' equal to $var = nil?
[19:52:03] norc: eqdw: https://github.com/ruby/ruby/blob/trunk/string.c
[19:52:07] who42: has joined #ruby
[19:52:10] norc: acidrainfall: Nope.
[19:52:15] norc: acidrainfall: You can test this fairly easily:
[19:52:18] toretore: wolffles, does that mean you can't change it?
[19:52:20] norc: >> ''.nil?
[19:52:22] ruby[bot]: norc: # => false (https://eval.in/502319)
[19:52:25] toretore: (i don't know what rubymonk is)
[19:52:46] norc: eqdw: In all implementions, the ruby methods get added at the very bottom.
[19:53:08] norc: eqdw: Look for your ruby method name there, and then follow the breadcrumbs.
[19:53:18] wolffles: toretore: thats there code im just figuring out why i cant call the method, but they can check the answer and say it works.
[19:53:28] wolffles: toretore: i just want to know how they called the method
[19:53:30] superscott: has joined #ruby
[19:53:35] who42: has joined #ruby
[19:54:00] toretore: wolffles, ok, so the reason you're having this problem is because you don't understand how splat (*args) works
[19:54:08] norc: acidrainfall: There is only one value in Ruby that is nil. nil itself.
[19:54:09] who42: has joined #ruby
[19:54:27] toretore: wolffles, a splat will take all arguments given to a method call and gather them in an array
[19:54:28] norc: acidrainfall: Also there are only 2 values in Ruby that evaluate to falsey: nil and false.
[19:54:47] domgetter: wolffles: If I have def add(*numbers)...end, then add(1, 2, 3) will work, but add( [1, 2, 3] ) will not work
[19:54:47] norc: acidrainfall: And that is probably all there is to say about nil.
[19:54:52] toretore: wolffles, you are giving it 1 argument, which then gets put into a single-element array
[19:55:02] superscott: odd question, but has anybody ever had Process.alive? give you the incorrect status of a process? I'm thinking this is more than likely a fault of the OS, but just wondering if anybody else has seen Ruby do anything weird in that area.
[19:55:06] who42: has joined #ruby
[19:55:09] toretore: wolffles, the only element in this array is another array, because that's what you're passing
[19:55:17] norc: superscott: Which ruby implementation are you on?
[19:55:34] joonty: has joined #ruby
[19:55:38] toretore: wolffles, thus, inside the method, orders == [[{rice:2,noodles:2},{rice:1,noodles:1}]]
[19:55:43] who42: has joined #ruby
[19:56:09] who42: has joined #ruby
[19:56:13] eqdw: thanks everyone
[19:56:18] eqdw: has left #ruby: ()
[19:56:33] norc: &ri Process#alive?
[19:56:33] `derpy: No results
[19:56:45] toretore: >> [[{rice:2,noodles:2},{rice:1,noodles:1}]].inject(0) do |total_cost, order| total_cost + order.keys.inject(0) {|cost, key| cost + @menu[key]*order[key] }; end # wolffles
[19:56:46] voidDotClass: hmm, i'm trying to use factorygirl with rspec, for some reason i keep getting nameError unitialized for :bob even though I'm defining :bob in my factory.rb
[19:56:46] ruby[bot]: toretore: # => undefined method `keys' for [{:rice=>2, :noodles=>2}, {:rice=>1, :noodles=>1}]:Array (NoMethodError) ...check link for more (https://eval.in/502320)
[19:56:47] who42: has joined #ruby
[19:56:54] toretore: >> [{rice:2,noodles:2},{rice:1,noodles:1}].inject(0) do |total_cost, order| total_cost + order.keys.inject(0) {|cost, key| cost + @menu[key]*order[key] }; end # wolffles
[19:56:55] ruby[bot]: toretore: # => undefined method `[]' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/502321)
[19:56:59] voidDotClass: it was working a couple mins ago, i've done something and now its not working
[19:57:03] norc: superscott: There is no such method.
[19:57:19] norc: superscott: Have you been naughty and monkey patched a core ruby class?
[19:57:30] norc: And then complain that it may not work?
[19:57:35] toretore: >> menu=[rice:3,noodles:2]; [{rice:2,noodles:2},{rice:1,noodles:1}].inject(0) do |total_cost, order| total_cost + order.keys.inject(0) {|cost, key| cost + menu[key]*order[key] }; end # wolffles
[19:57:36] who42: has joined #ruby
[19:57:37] ruby[bot]: toretore: # => no implicit conversion of Symbol into Integer (TypeError) ...check link for more (https://eval.in/502322)
[19:57:43] toretore: ok i stop now
[19:57:48] superscott: norc: oh sorry, i misspoke, Thread.alive? is what i was referring to
[19:57:51] norc: toretore: You can play with ruby[bot] in a query. :)
[19:58:01] who42: has joined #ruby
[19:58:07] wolffles: toretore: but you see what i mean now?
[19:58:20] toretore: wolffles, that doesn't have anything to do with the original problem
[19:58:31] toretore: wolffles, do you understand what i was saying about splat?
[19:58:32] karapetyan: has joined #ruby
[19:58:42] who42: has joined #ruby
[19:58:45] uris: has joined #ruby
[19:59:02] norc: superscott: Im looking at the implementation now. At first glance I cannot see how this method could possible be bugged.
[19:59:07] FernandoBasso: has joined #ruby
[19:59:10] norc: superscott: Do you have a test case?
[19:59:15] wolffles: toretore: yeah, but i didnt just do this call and give up, ive been trying to solve it through trial and error cuz it doesnt make sense anymore
[19:59:21] who42: has joined #ruby
[19:59:38] wolffles: ive done your method and it still doesnt return the ???cost??? its suppose to
[19:59:50] wolffles: im still missing something
[20:00:02] toretore: wolffles, yes, but it returns a different error
[20:00:07] norc: superscott: Or maybe your thread is stopped?
[20:00:08] superscott: norc: i don't think it's bugged in Ruby, because it normally works as expected. i think i'm hitting some weird OS issue
[20:00:16] toretore: so now you've solved one problem and can move on to the next
[20:00:33] norc: superscott: There is no interaction with the OS in this part that I can see.
[20:01:06] superscott: norc: do you have a link to the file you're looking at?
[20:01:16] SCHAAP137: has joined #ruby
[20:01:38] norc: superscott: It is just a wrapper for this: https://github.com/ruby/ruby/blob/trunk/thread.c#L2639
[20:01:40] wolffles: toretore: i see what your saying now the new error would be []': no implicit conversion of Symbol into Integer?
[20:02:00] norc: superscott: So the only possible way this method could return a faulty value is if the thread was not changed properly.
[20:02:39] toretore: wolffles, https://eval.in/502326
[20:02:43] sftrabbit: has joined #ruby
[20:02:56] superscott: norc: okay. i see what you're saying now.
[20:02:57] toretore: wolffles, [rice: 3, noodles: 2]
[20:03:11] mondok: has joined #ruby
[20:03:18] superscott: norc: can you think of a random example where that might be the case?
[20:03:39] dlitvak: has joined #ruby
[20:03:48] norc: superscott: Do you want just random examples from the top off my head, or something likely?
[20:03:55] shadoi: has joined #ruby
[20:04:05] firstdayonthejob: has joined #ruby
[20:04:14] superscott: norc: lol either is fine :D
[20:04:21] norc: superscott: Any number of buffer overflows in absolutely unrelated codes can do bizarre things. That is the completely random example
[20:04:35] wolffles: ??? :???[ so many hours wasted toretore all so it can be fixed by putting puts *i cri*
[20:04:35] djcp: has joined #ruby
[20:04:50] toretore: wolffles, no, that was not the problem
[20:05:01] toretore: read the code carefully
[20:05:01] norc: superscott: On a more realistic note... how is your thread stopped?
[20:05:25] gix: has joined #ruby
[20:05:33] resin: has left #ruby: ()
[20:05:34] roshanavand: has joined #ruby
[20:05:37] superscott: norc: the thread is being killed with: Process.kill(:SIGKILL, thread.pid)
[20:06:40] roshanavand: has joined #ruby
[20:06:46] toretore: superscott, maybe it's time to gist some code
[20:06:56] superscott: norc: yeah. =/ i kinda think that might be the wrong thing to be doing -- i'm working with some legacy code
[20:07:09] norc: superscott: Are you absolutely sure you want that code to execute?
[20:07:13] norc: Cuz Im just askin...
[20:07:34] uris: has joined #ruby
[20:07:38] superscott: norc: yeah we're keeping track of which pid is being killed, as far as i can tell
[20:08:14] norc: superscott: Can you tell me what "pid" stands for?
[20:08:22] superscott: norc: process id
[20:08:47] norc: superscott: Now do me a favour and read out the following aloud:
[20:08:51] norc: &ri Process#kill
[20:08:51] `derpy: No results
[20:09:00] norc: &ri Process::kill
[20:09:00] `derpy: http://ruby-doc.org/core-2.3.0/Process.html#method-c-kill
[20:09:27] superscott: norc: lol oh my. that might explain some things.
[20:09:27] norc: And tell me whether your code makes any sense to you still.
[20:10:19] norc: superscott: Once you have settled with your mistake, feel free to ask the real question you need the answer to. ;-)
[20:11:22] ixti: has joined #ruby
[20:11:30] rkazak: has joined #ruby
[20:11:42] superscott: norc: well, how we're using it is how it's shown in the docs? http://ruby-doc.org/core-2.2.2/Process.html#method-c-kill unless i'm misunderstanding what you're saying?
[20:11:53] norc: superscott: Threads are not Processes.
[20:11:57] norc: Repeat after me.
[20:12:30] lucasb: yeah, chapter 2 of tanenbaum OS book :)
[20:12:52] superscott: norc: right. okay. i'm with you now.
[20:13:21] norc: superscott: Process.kill ends is the same as int kill(pid_t pid, int sig); which works on processes.
[20:13:21] yardenbar: has joined #ruby
[20:14:16] norc: superscott: So are you now ready to ask the important question? ;-)
[20:14:49] superscott: norc: so do ruby threads have their own process id?
[20:14:58] norc: superscott: Do cats have their own dog name?
[20:15:20] cats: I swear half of my pings come from this channel
[20:15:26] agentmeerkat: has joined #ruby
[20:15:32] norc: cats: Be glad you dont hang around ##networking
[20:16:04] superscott: norc: but i thought a ruby thread was spun up as a child process of the main ruby process? or am i completely going off the rails here
[20:16:25] superscott: and going off the rails is probably a bad phrase to use in a ruby channel
[20:16:35] yqt: has joined #ruby
[20:16:41] yfeldblum: has joined #ruby
[20:16:54] domgetter: superscott: No, ruby Threads are what are known as "green threads". they are part of the parent process
[20:17:25] domgetter: they don't use their own cores, but they're good for asynchonous IO like grabbing a bunch of data from different places
[20:17:36] superscott: domgetter: okay cool. thank you. i think it's coming together now -- still trying to understand what we had was ever working.
[20:17:37] robbyoconnor: has joined #ruby
[20:18:02] robbyoconnor: has joined #ruby
[20:18:04] domgetter: It's possible that it was "working" just fine, just not as fast as you thought
[20:18:33] norc: superscott: Next I have a question.
[20:18:40] norc: &ri Thread#pid
[20:18:40] `derpy: No results
[20:18:42] norc: &ri Thread::pid
[20:18:43] `derpy: No results
[20:18:53] norc: superscott: Have you fucked with the Thread class by any chance=
[20:19:00] mchu: has joined #ruby
[20:19:25] aegis3121: has joined #ruby
[20:19:27] superscott: norc: yeah, i think the variables in the code are not actually what classes they are
[20:19:38] norc: superscott: Sharing completely wrong pseudo code is a good way of wasting our time.
[20:20:18] superscott: norc: it's not pseudo code, it's actually what i have in front of me. so i think this is partly why i'm confused right now
[20:20:40] norc: superscott: Alright I apologize then.
[20:20:41] superscott: because we're calling Processes threads, and Threads processes in our code
[20:21:07] norc: superscott: Are you guys working on VxWorks 653 by any chance?
[20:21:10] superscott: norc: no worries, it's all good. you're helping me figure it out, so i'm thankful :D
[20:21:16] norc: Because that is about the only context in the world this mixup I can understand this in.
[20:21:28] govg: has joined #ruby
[20:21:57] superscott: norc: no haha, i think somebody just threw up code and didn't realize the names were incorrect
[20:22:04] norc: superscott: I recommend you start by prying into the code.
[20:22:37] superscott: norc: yeah agreed. i think i know where i need to start digging now. thanks for you help good sir :D
[20:22:46] norc: superscott: And by prying I meant use the gem "pry"
[20:22:57] superscott: norc: yeah pry is life
[20:23:07] norc: &ri Thread#stop
[20:23:07] `derpy: No results
[20:23:08] kalopsian: has joined #ruby
[20:23:10] norc: &ri Thread#exit
[20:23:10] `derpy: http://ruby-doc.org/core-2.3.0/Thread.html#method-i-exit
[20:23:30] norc: superscott: Just for reference by the way.
[20:23:57] superscott: norc: thanks
[20:25:39] Rodya_: has joined #ruby
[20:26:18] freerobby: has joined #ruby
[20:26:33] dlitvak: has joined #ruby
[20:28:05] Xeago: has joined #ruby
[20:28:08] baweaver: has joined #ruby
[20:28:32] jamw: has joined #ruby
[20:31:05] Dimik: has joined #ruby
[20:31:06] roshanavand: has joined #ruby
[20:31:47] baweaver: has joined #ruby
[20:32:19] emilford: has joined #ruby
[20:32:39] voidDotClass: what's wrong with this: expect acct.password.to eq(TEST_PW)
[20:32:49] malconis: has joined #ruby
[20:32:49] dlitvak: has joined #ruby
[20:32:51] voidDotClass: gives: ArgumentError: bad value for range
[20:32:54] aspire: has joined #ruby
[20:33:20] norc: voidDotClass: a lot.
[20:33:23] snowy: has joined #ruby
[20:33:33] domgetter: expect(acct.password).to eq(something)
[20:33:48] domgetter: you have to call .to on what expect returns, not on the thing itself
[20:33:54] norc: voidDotClass: .to is what you call on whatever expect(...) returns.
[20:34:21] norc: expect(something).to be_something(else)
[20:34:28] norc: It always looks like that. :)
[20:35:12] sinkensabe: has joined #ruby
[20:37:42] jottr: has joined #ruby
[20:38:42] ico: has joined #ruby
[20:39:53] snockerton: has joined #ruby
[20:40:14] centrx: has joined #ruby
[20:40:55] dpg1: has joined #ruby
[20:41:13] blackgoat: has joined #ruby
[20:41:56] jackjackdripper: has joined #ruby
[20:42:57] ur5us: has joined #ruby
[20:43:23] kalzz: has joined #ruby
[20:43:27] mhib: has joined #ruby
[20:43:30] edwinvdgraaf: has joined #ruby
[20:43:57] centrx: has joined #ruby
[20:44:23] miah: has joined #ruby
[20:44:23] G: has joined #ruby
[20:44:44] RobertBirnie: has joined #ruby
[20:45:14] vF3hNGxc47h8: has joined #ruby
[20:46:52] pdoherty: has joined #ruby
[20:47:03] Snowy_: has joined #ruby
[20:47:08] kith: has joined #ruby
[20:47:44] Cohedrin: has joined #ruby
[20:47:52] kenichi: has joined #ruby
[20:47:57] phreakocious: has joined #ruby
[20:48:14] bmn: has joined #ruby
[20:48:16] pawnbox: has joined #ruby
[20:48:29] jottr: has joined #ruby
[20:49:44] voidDotClass: Is it possible to define a private helper method which only exists within a particular spec?
[20:50:53] kalz: has joined #ruby
[20:51:03] eam: has joined #ruby
[20:51:03] rcs: has joined #ruby
[20:51:27] ljarvis: voidDotClass: just define it within the context of that spec
[20:51:41] Ox0dea: Bish: Still about?
[20:51:56] jbrhbr: you can probably use let() with a lambda or something too
[20:52:04] Bloodshot: has joined #ruby
[20:52:17] mblagden: has joined #ruby
[20:52:35] ur5us: has joined #ruby
[20:53:07] al2o3-cr: has joined #ruby
[20:53:16] voidDotClass: ljarvis, if i describe it within the 'describe' block, is that the same as a private method?
[20:53:33] djbkd: has joined #ruby
[20:54:06] ljarvis: voidDotClass: I don't understand what you mean exactly, why do you specifically want it to be private? and private to what, exactly?
[20:54:08] anekos: has joined #ruby
[20:54:16] marienz: has joined #ruby
[20:54:21] ta: has joined #ruby
[20:54:22] hahuang65: has joined #ruby
[20:54:43] ljarvis: but yes if you define it within the describe block it will only be accessible within that describe block or a nested block
[20:54:54] ljarvis: (I believe, it should be easy to test, of course)
[20:56:01] voidDotClass: ljarvis, i mean if i have another method defined with the same name elsewhere, it shouldn't conflict
[20:56:12] ljarvis: voidDotClass: try it?
[20:56:13] papercode: has joined #ruby
[20:56:31] ljarvis: give it a shot
[20:56:45] dcunit3d: has joined #ruby
[20:57:03] Ox0dea: For science!
[20:57:53] dlitvak: has joined #ruby
[20:59:58] roshanavand: has joined #ruby
[21:00:28] agentmeerkat: has joined #ruby
[21:00:33] benlieb: has joined #ruby
[21:00:49] snockerton1: has joined #ruby
[21:02:11] snowy: has joined #ruby
[21:02:11] baweaver: has joined #ruby
[21:02:38] kalopsian: has joined #ruby
[21:02:52] sandstrom: has joined #ruby
[21:03:00] ducklobster: has joined #ruby
[21:03:01] imperator: has joined #ruby
[21:04:33] acidrainfall: norc: sorry, lunch. falsey?
[21:04:46] Ox0dea: acidrainfall: Not truthy.
[21:04:59] acidrainfall: obviously not truthy
[21:05:06] argentdrake: has joined #ruby
[21:05:12] _djbkd: has joined #ruby
[21:05:18] norc: acidrainfall: false != nil, but they both fail to satify for "if" for example.
[21:05:36] argentdrake: Hello fellow ruby smiths, I'm looking for help changing my rails version on a vagrant box running server ubuntu
[21:05:47] acidrainfall: The difference between nil and undef is that undef marks the variable as without definition, where nil is a value of nil?
[21:05:53] acidrainfall: so something *has* a value, a value of nil.
[21:05:58] argentdrake: I've tried several google results but none seem to work...any suggestions?
[21:05:59] norc: acidrainfall: undef is not a ruby keyword.
[21:06:00] havenwood: argentdrake: Tried updating your Gemfile, bundling and running tests? Problem?
[21:06:08] acidrainfall: norc: right but aren't they slightly different concepts?
[21:06:09] havenwood: argentdrake: What are you running into?
[21:06:28] norc: >> blablabla
[21:06:30] ruby[bot]: norc: # => undefined local variable or method `blablabla' for main:Object (NameError) ...check link for more (https://eval.in/502337)
[21:06:38] norc: acidrainfall: This is the only notion Ruby has of undefined things.
[21:06:38] argentdrake: havenwood: I'm using the agile rails dev book, it instructs me to input : gem install rails --version 3.2.0
[21:06:43] Ox0dea: >> [defined?(nil), defined?(blah)] # acidrainfall
[21:06:45] ruby[bot]: Ox0dea: # => ["nil", nil] (https://eval.in/502338)
[21:06:47] SuperTux88: has joined #ruby
[21:06:55] argentdrake: havenwood: I do so, and it spits out rails 4.2.5 for some reason
[21:07:19] acidrainfall: The more I get into it the more comfortable I get with it.
[21:07:19] norc: Ox0dea: Holy.
[21:07:24] argentdrake: havenwood: When I check installed gems, It lists it as installed "rails (4.2.5, 3.2.0)
[21:07:33] norc: Ox0dea: I was not aware of defined? in the slightest.
[21:07:46] norc: Yes really!
[21:07:50] Ox0dea: Fancy that.
[21:07:54] ljarvis: >> defined? gsub
[21:07:54] Ox0dea: It's a keyword.
[21:07:55] ruby[bot]: ljarvis: # => nil (https://eval.in/502339)
[21:08:10] ljarvis: >> defined? puts
[21:08:11] norc: Ox0dea: There is no way it couldn't.
[21:08:12] ruby[bot]: ljarvis: # => "method" (https://eval.in/502340)
[21:08:15] Ox0dea: norc: Just so.
[21:08:17] nfk|laptop: has joined #ruby
[21:09:47] Ox0dea: >> [method(:p), (undef p), (method(:p) rescue $!.class)] # acidrainfall
[21:09:48] ruby[bot]: Ox0dea: # => /tmp/execpad-1cc216244d2c/source-1cc216244d2c:1:in `<main>': undefined method `p' for main:Object (N ...check link for more (https://eval.in/502341)
[21:09:56] guacamole: has joined #ruby
[21:10:13] Ox0dea: Anyway, `undef` is a keyword.
[21:10:22] Ox0dea: But it's for undefining methods, not representing nonexistence.
[21:10:32] acidrainfall: so it's usedful for clearing definitions
[21:10:46] ljarvis: >> undef puts; puts
[21:10:48] ruby[bot]: ljarvis: # => /tmp/execpad-46277a325521/source-46277a325521:4:in `rescue in <main>': undefined method `puts' for m ...check link for more (https://eval.in/502342)
[21:10:49] acidrainfall: These things like defined? - they can be used as defined?(var) and var.defined? yeah?
[21:10:53] acidrainfall: they can be used both ways?
[21:10:55] Ox0dea: acidrainfall: Nah.
[21:10:55] norc: Ox0dea: I was not aware of that either. But then again I don't make it a habit to undef local methods...
[21:11:10] aegis3121: Ox0dea: When you say keyword, do you mean that's it's just a method defined on Object?
[21:11:12] Ox0dea: norc: Not a good habit, of course.
[21:11:17] LMity: has joined #ruby
[21:11:19] Ox0dea: aegis3121: No, I mean it's syntax.
[21:11:30] troulouliou_dev: has joined #ruby
[21:11:32] Ox0dea: #raise, for instance, is actually just a method on Kernel.
[21:11:44] norc: >> method(:raise)
[21:11:45] nfk|laptop: i'd like to read and write spreadsheets, nothing fancy just basic stuff, is there anything better than csv? ods sounds nice but i can't find a gem that didn't look like it was dead
[21:11:46] ruby[bot]: norc: # => #<Method: Object(Kernel)#raise> (https://eval.in/502343)
[21:11:48] norc: >> method(:undef)
[21:11:50] ruby[bot]: norc: # => undefined method `undef' for class `#<Class:#<Object:0x4180d34c>>' (NameError) ...check link for more (https://eval.in/502344)
[21:11:54] norc: aegis3121: There.
[21:11:56] norc: That is the difference.
[21:12:08] aegis3121: Weird... http://ruby-doc.org/docs/keywords/1.9/Object.html#method-i-undef
[21:12:18] ljarvis: nfk|laptop: "better than csv"? in what way?
[21:12:20] aegis3121: got it then
[21:12:39] norc: &ri Object#undef
[21:12:39] `derpy: No results
[21:12:44] norc: aegis3121: That is from Ruby 1.9
[21:12:52] aegis3121: right. it also defines them as keywords
[21:13:00] ljarvis: &ri undef_method
[21:13:00] `derpy: http://ruby-doc.org/core-2.3.0/Module.html#method-i-undef_method
[21:13:01] aegis3121: the docs just give no indiciations of that beyond the URL
[21:13:27] norc: aegis3121: https://github.com/ruby/ruby/blob/trunk/parse.y#L11203-L11250
[21:13:29] nfk|laptop: ljarvis, presumably by not requiring user to specify import parameters
[21:13:33] norc: This is the complete list of keywords.
[21:13:42] dfinninger: has joined #ruby
[21:13:45] roshanavand: has joined #ruby
[21:13:58] Ox0dea: 19>> Object.instance_method(:undef) rescue $! # aegis3121
[21:13:59] ruby[bot]: Ox0dea: # => #<NameError: undefined method `undef' for class `Object'> (https://eval.in/502347)
[21:14:02] norc: (The source code is unfortunately the only useful source for this)
[21:14:06] Ox0dea: As you can see, the documentation is wrong.
[21:14:07] aegis3121: norc thanks
[21:14:45] norc: Ox0dea: Guessing it might have been a random Japanese hack to document "undef" somehow
[21:14:48] Ox0dea: `undef` can't possibly be a method, since it takes an explicit method name as its argument.
[21:14:54] Ox0dea: norc: Sounds about right.
[21:15:32] aegis3121: http://ruby-doc.org/core-2.2.0/doc/keywords_rdoc.html so that's helpful
[21:16:12] aegis3121: not as comprehensive as source, but has a short definition attached.
[21:17:16] cdg: has joined #ruby
[21:17:19] yqt: has joined #ruby
[21:17:37] Ox0dea: >> require 'irb/completion'; IRB::InputCompletor::ReservedWords # norc aegis3121
[21:17:39] ruby[bot]: Ox0dea: # => (https://eval.in/502350)
[21:18:09] Ox0dea: Oh, it tries to load ncurses.
[21:18:18] Ox0dea: Anyway, that's a way to get the list of keywords, more or less.
[21:18:19] sinkensabe: has joined #ruby
[21:19:05] norc: I have learned not to trust Ruby.
[21:19:15] norc: nobu has a tendency to hide things from you.
[21:19:56] jackjackdripper: has joined #ruby
[21:20:21] yardenbar: has joined #ruby
[21:20:39] Ox0dea: Alan Rickman died. :(((
[21:20:45] ruby[bot]: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
[21:20:51] sinkensabe: has joined #ruby
[21:21:12] Ox0dea: adaedra: Please turn to page 394.
[21:21:32] adaedra: Ox0dea, our new... celebrity.
[21:22:13] tulak: has joined #ruby
[21:22:19] Ox0dea: That's missing some dashes for effect.
[21:23:28] norc: Ox0dea: Just realised why I did not know about defined? either.
[21:23:33] sinkensabe: has joined #ruby
[21:23:38] norc: &ri Module#method_defined?
[21:23:38] `derpy: http://ruby-doc.org/core-2.3.0/Module.html#method-i-method_defined-3F
[21:23:43] norc: Is so much more sensible.
[21:24:10] Ox0dea: norc: Sure, but `defined?` can tell you about any kind of value.
[21:24:17] Ox0dea: There's also #const_defined?.
[21:24:58] norc: Most of the time "any kind of value" may indicate of some bad code, especially if you don't even know whether it is a lvar or method.
[21:25:17] norc: I mean yeah its damn useful for ruboto (RIP)
[21:25:20] Ox0dea: That's true enough, but I'd certainly reach for `defined?` if I were doing something weird with gensyms.
[21:26:35] Rodya_: has joined #ruby
[21:26:53] Ox0dea: norc: And now I'm wondering about how to obtain an lvar's "age".
[21:27:13] norc: Ox0dea: That is easy.
[21:27:27] Ox0dea: From Ruby-land?
[21:27:29] norc: You just... uhm...
[21:27:38] arian0n-: has joined #ruby
[21:27:55] Ox0dea: Given `foo = magic_method`, it'd be nice to be able to replace `foo` with... whatever.
[21:28:12] Ox0dea: But that'd require `Binding#local_variables` be returned in age-order, which I suspect isn't guaranteed.
[21:28:19] norc: *magic_method_or_lvar_if_the_parser_pleases
[21:28:32] lucasb: IRB::InputCompletor::ReservedWords.grep(/def/) <-- lists "defined" without the question mark O.o
[21:28:46] Ox0dea: lucasb: That it does.
[21:28:48] Ox0dea: It's a bug. :P
[21:28:49] norc: Ox0dea: Actually I think *that* is guaranteed.
[21:29:11] kenichi: has joined #ruby
[21:29:12] crowell: has joined #ruby
[21:29:13] crowell: has joined #ruby
[21:29:58] phreakocious: has joined #ruby
[21:30:12] norc: Ox0dea: https://github.com/ruby/ruby/blob/trunk/parse.y#L190-L203
[21:30:25] norc: This is what Ruby uses when it learns about new lvars.
[21:30:34] asthasr: has joined #ruby
[21:30:41] nettoweb: has joined #ruby
[21:30:55] mblagden_: has joined #ruby
[21:31:09] G: has joined #ruby
[21:31:11] norc: I mean I would have to do some digging about Binding#local_variables, but I expect it to somehow use that data.
[21:31:32] norc: Wait. What I just said made no real sense.
[21:31:37] norc: Lets just assume Im still busy cooking.
[21:31:46] norc: The smell...
[21:31:49] Sembei: has joined #ruby
[21:31:56] Ox0dea: norc: It doesn't seem to, no.
[21:32:08] Ox0dea: It walks environment pointers.
[21:32:31] ccooke: has joined #ruby
[21:32:39] dpg1: has joined #ruby
[21:32:51] PERSIAN: has joined #ruby
[21:33:28] norc: Ox0dea: That makes sense.
[21:33:39] norc: Ox0dea: It would probably then just iterate over the lvars in order in each stack frame.
[21:33:55] lucasb: I just learned that empty parentheses "()" are synonym for nil. I didn't expect that to be valid syntax, but cool, just like Lisp :)
[21:34:11] norc: Ox0dea: And the order of lvars there would be at the complete mercy of the compiler.
[21:34:18] Ox0dea: norc: Right.
[21:34:19] B1n4r10: has joined #ruby
[21:34:24] Ox0dea: So how to stick ages on them?
[21:34:44] norc: Ox0dea: Well, Id still bet fair money that the order is still the same as the parser.
[21:34:45] Ox0dea: Or, well, I just need to know to whom we're being assigned, really.
[21:35:00] Ox0dea: And I'd rather not rely on line number.
[21:35:26] norc: lucasb: Please do not use that behaviour in production code.
[21:35:34] lucasb: >> ().nil?
[21:35:47] ruby[bot]: norc: # => /tmp/execpad-40645840e60a/source-40645840e60a:2: syntax error, unexpected '.' (https://eval.in/502364)
[21:35:52] ruby[bot]: norc: # => nil (https://eval.in/502365)
[21:35:58] norc: >> ().nil?
[21:36:00] ruby[bot]: norc: # => true (https://eval.in/502366)
[21:36:10] lucasb: I must have typed something wrong
[21:36:20] eam: has joined #ruby
[21:36:51] lucasb: norc: but yeah, () looks strange unless we are in lisp land
[21:37:16] domgetter: Even then you'd want '()
[21:37:22] ur5us: has joined #ruby
[21:37:22] Ox0dea: But we are in Lisp-land!
[21:37:29] Ox0dea: domgetter: Implementation detail.
[21:37:33] norc: (((shush)))
[21:37:43] ericfreese: has joined #ruby
[21:37:54] norc: >> require 'ripper'; Ripper.sexp('a = 1')
[21:37:55] ruby[bot]: norc: # => [:program, [[:assign, [:var_field, [:@ident, "a", [1, 0]]], [:@int, "1", [1, 4]]]]] (https://eval.in/502368)
[21:38:24] norc: Ox0dea: Oh I actually went into that region of the compiler the other day...
[21:38:30] norc: Ended up in a lot of wtf.
[21:38:50] norc: Then I stopped and cleaned the dishes.
[21:38:58] norc: Seemed like the more productive thing at the time.
[21:39:07] choke: has joined #ruby
[21:39:38] kenichi: has joined #ruby
[21:39:43] lucasb: can I /msg ruby[bot] privately?
[21:40:00] norc: lucasb: TIAS
[21:40:18] rrichardsr3: has joined #ruby
[21:40:52] rcs: has joined #ruby
[21:40:53] grill: what is the "unless" clause attached to in the following statement? ",\"chef_roles\": [" << @roles_hash[hostkey].each { |entry| p entry } << "]" unless @roles_hash.has_key?(hostkey)
[21:41:11] lucasb: ruby[bot] just doesn't answer me
[21:41:16] lucasb: >> 'oh hai'
[21:41:24] norc: Ox0dea: What am looking at suggests that you can indeed trust the order.
[21:41:42] adaedra: lucasb: are you registered on freenode?
[21:42:00] lucasb: adaedra: oh, it's because of that? I'm not.
[21:42:19] lucasb: interesting, I didn't know. thanks adaedra, norc
[21:42:24] Darmani: Hey kids<33
[21:42:31] Darmani: How is everyone today?
[21:42:42] adaedra: Do it. It's quick and easy, allows you to talk in #RubyOnRails and here when under moderation, lucasb.
[21:42:59] _djbkd: has joined #ruby
[21:43:09] adaedra: Darmani: how's your hangman?
[21:43:17] miah: has joined #ruby
[21:43:28] Darmani: @adaedra - Hangman? o.o
[21:43:37] adaedra: Er, tictactoe
[21:43:38] rrichardsr3: has joined #ruby
[21:43:57] adaedra: It was you, right?
[21:44:04] Darmani: That was me. And Lucas I believe lol
[21:44:21] lucasb: I have nothing to do with it
[21:44:28] imperator: has left #ruby: ("Leaving")
[21:44:29] adaedra: So, you did it Darmani?
[21:44:54] Darmani: Well I think so. I'll show you what I have.
[21:45:01] Ox0dea: norc: After some though, the order of #local_variables is immaterial.
[21:45:03] duckpuppy: has joined #ruby
[21:45:15] Glenny: has joined #ruby
[21:45:31] Ox0dea: `a = 1; b = 2; c = 3; b = the_magic` wouldn't be able to make use of the information.
[21:45:38] kiidbrian: has joined #ruby
[21:45:41] norc: Ox0dea: Lets figure this one out regardless
[21:46:10] Darmani: @adaedra - https://repl.it/BdyU
[21:46:59] grill: what is the "unless" clause attached to in the following statement? ",\"chef_roles\": [" << @roles_hash[hostkey].each { |entry| p entry } << "]" unless @roles_hash.has_key?(hostkey)
[21:47:17] adaedra: Darmani: that's WIP?
[21:47:23] adaedra: grill: unless = if not
[21:47:39] Darmani: @adaedra - wip?
[21:47:43] grill: yes. what does this statement say
[21:47:50] adaedra: Work in progress, Darmani
[21:48:11] grill: I am trying to get it to not print the statement unless the proper hash value exists
[21:48:16] Darmani: oh yushh. I don't think it works perfectly yet
[21:48:23] papercode: has joined #ruby
[21:48:32] RobertBirnie: has joined #ruby
[21:48:35] gigetoo: has joined #ruby
[21:48:39] marienz: has joined #ruby
[21:48:49] adaedra: Darmani: here's mine https://gist.github.com/adaedra/61be79cb0c52d2a9d711
[21:49:06] davedev24: has joined #ruby
[21:49:10] Anderson69s: has joined #ruby
[21:49:17] sepp2k: has joined #ruby
[21:49:34] lucasb: registered to freenode now, ruby[bot] still ignores me
[21:50:03] adaedra: What do you try?
[21:50:07] dlitvak: has joined #ruby
[21:50:09] Ox0dea: adaedra: all?(&:itself?) is the default behavior.
[21:50:09] grill: I am getting an "unexpected keyword_end, expecting ')'" error when i run the following. what gives? (",\"chef_roles\": [" << @roles_hash[hostkey].each { |entry| p entry } << "]") unless @roles_hash.has_key?(hostkey) end
[21:50:23] ruby[bot]: lucasb: # => 42 (https://eval.in/502374)
[21:50:31] adaedra: Ox0dea: duh.
[21:50:34] lucasb: damn, it worked now
[21:50:35] Darmani: @adaedra - There's at least 6 different techniques in there I've never seen before lol
[21:50:54] adaedra: Darmani: work on you own. There are so many ways of doing it.
[21:51:21] Xeago: has joined #ruby
[21:51:32] adaedra: Also not my best code :p
[21:51:33] Darmani: I'm burnt out on tic tac toe. I've been doing Codewars lately. It keeps things interesting at the very leasy.
[21:51:54] Darmani: @adaedra - And if I can't find at answer I can always see how other people solved the problem ^^
[21:51:59] adaedra: Well, tic-tac-toe is an easy exercise imo
[21:52:02] cpup: has joined #ruby
[21:52:10] lucasb: so, just reporting that here in the channel, ruby[bot] listens to me, but privately it doesn't.
[21:52:19] lucasb: I tried /query and /msg
[21:52:24] aegis3121: grill That might be easier to read if you did "\"chef_roles\": [#{@roles_hash[hostkey].join("\n")}]"
[21:52:37] adaedra: lucasb: what do you try privately?
[21:52:38] dlitvak: has joined #ruby
[21:52:45] aegis3121: Using the string interpolation, I think, would be helpful.
[21:52:49] lucasb: the same ">> 42"
[21:52:56] dtordable: has joined #ruby
[21:53:14] adaedra: lucasb: note that ruby[bot] is new and it may be just a bug. I'll see what's happening.
[21:53:18] aegis3121: grill: though I'm not sure why you have the `end` at the end.
[21:53:25] lucasb: adaedra: thanks
[21:53:52] adaedra: but it may also be that it stops responding to pms, but i don't remember it should. But that's me; don't take it for granted.
[21:53:56] rocfig: has joined #ruby
[21:54:24] nfk|laptop: it seems i have been out of the loop for a while, what is this darkfish stuff see in my gem update --user-install?
[21:54:44] ljarvis: nfk|laptop: an rdoc template
[21:54:52] aegis3121: grill: Why are you having it run this chunk of code, which relies on @roles_hash[hostkey] being an Array, yet NOT doing the chunk if the @roles_hash has that key in it?
[21:55:00] vifino: has joined #ruby
[21:55:09] nfk|laptop: ljarvis, and how do i reap its benefits?
[21:55:14] kith_: has joined #ruby
[21:55:31] adaedra: lucasb: apparently a bug.
[21:55:33] Ox0dea: lucasb: Can confirm that ruby[bot] doesn't respond to PMs.
[21:55:33] aegis3121: >> a = 5; b = 3 unless a == 5; puts b
[21:55:34] ruby[bot]: aegis3121: # => ...check link for more (https://eval.in/502379)
[21:55:43] norc: Ox0dea: Okay, my initial thought turns out to be correct after all.
[21:55:55] Ox0dea: norc: Environment-order?
[21:56:13] norc: Ox0dea: Environment-order is necessary, and parse order within each stack frame.
[21:56:27] norc: Ox0dea: Note that Im only talking LASGN
[21:56:28] waheedi: has left #ruby: ()
[21:56:34] Ox0dea: Sure, as was I.
[21:56:38] Ox0dea: Thanks for investigating.
[21:56:46] Ox0dea: Lasagna assignment.
[21:57:27] jokester: has joined #ruby
[21:57:28] lucasb: Ox0dea: I tried again. still nothing
[21:57:36] Ox0dea: lucasb: Samesies.
[21:57:53] joonty: has joined #ruby
[21:58:01] Ox0dea: lucasb: Oh, sorry, I meant that *I* can confirm.
[21:58:19] aegis3121: That pesky subject
[21:58:24] norc: Ox0dea: It should be the same for MASGN, DASGN and DASGN_CURR too, but Im too tired to verify these assumptions.
[21:59:03] alem0lars: has joined #ruby
[21:59:33] Klumben: has joined #ruby
[21:59:36] Ox0dea: norc: Thoughts on a method being able to decide which variable its return value is to be assigned to?
[21:59:43] dfinninger: has joined #ruby
[21:59:44] s00pcan: has joined #ruby
[21:59:44] Ox0dea: I've got binding_of_caller at the ready. :P
[22:00:24] kiidbrian: has joined #ruby
[22:00:29] norc: No way without an AST or direct access to the VM that I can see.
[22:00:55] tockitj: has joined #ruby
[22:01:06] norc: The information resides in the setlocal + idx/lvl instruction.
[22:01:24] norc: That is the only information Ruby has about this.
[22:01:49] dfinninger: has joined #ruby
[22:03:13] dlitvak: has joined #ruby
[22:03:22] finisherr_: has joined #ruby
[22:03:25] norc: Ox0dea: Not needing to know is what makes stack machines so damn useful. ;-)
[22:03:46] Voker57|2: has joined #ruby
[22:04:03] smactive: has joined #ruby
[22:04:12] Voker57|2: has joined #ruby
[22:04:20] Ox0dea: norc: You're not wrong, but my soul can't abide it.
[22:04:37] jbrhbr: has joined #ruby
[22:04:52] Ox0dea: binding_of_caller can't introduce locals, but I thought it might be finagled into repurposing old ones. :/
[22:05:06] voidDotClass: how can i get a hash's keys as a string array?
[22:05:17] norc: voidDotClass: .keys
[22:05:25] norc: And yes. Ruby can be that simple.
[22:05:36] voidDotClass: norc, when i do to_s to that, it shows [:key]
[22:05:42] edwinvdgraaf: has joined #ruby
[22:05:42] voidDotClass: i want it to just show 'key'
[22:05:43] aegis3121: sure, so you have symbol keys
[22:05:56] aegis3121: your hash's keys are symbols.
[22:05:58] s00pcan: has joined #ruby
[22:06:01] adaedra: voidDotClass: .map(&:to_s)
[22:06:06] aegis3121: If you WANT them to desperately be strings, hash.keys.map(&:to_s)
[22:06:28] Ox0dea: Alternatively, have them be Strings from the first.
[22:06:43] tomjoro: has joined #ruby
[22:07:04] aegis3121: I mean, sure, you -could- :P
[22:07:18] norc: By coercing them into strings, you kind of defeat the point of using symbols in the first place.
[22:07:35] norc: Symbols exist because strings are expensive to use. ;-)
[22:08:06] jbrhbr: mutable strings*
[22:08:18] ramfjord: has joined #ruby
[22:08:29] Ox0dea: >> h1 = {'a'=>1}; h2 = {'a'=>2}; h1.keys[0].__id__ == h2.keys[0].__id__
[22:08:30] ruby[bot]: Ox0dea: # => true (https://eval.in/502389)
[22:08:44] Ox0dea: String keys are automatically frozen (and thus essentially interned).
[22:08:49] chipotle: has joined #ruby
[22:08:53] norc: Things I learn... :S
[22:08:56] norc: I take it back.
[22:09:10] bnagy: I'm not surte strings have ever been expensive to _use_ anyway
[22:09:27] bnagy: they were a memory concern
[22:09:28] norc: Ox0dea: Good thing we can unfreeze objects!
[22:09:30] lucasb: >> str = 'foo'; str.frozen?
[22:09:31] ruby[bot]: lucasb: # => false (https://eval.in/502390)
[22:09:32] domgetter: has joined #ruby
[22:09:35] Ox0dea: norc: Yeah!
[22:09:36] norc: And yes Im ready for segfaults when doing this with strings.
[22:09:48] norc: I learned how to rescue from segfaults (:
[22:09:53] bmalum_: has joined #ruby
[22:10:02] bnagy: symbols used to be an awesome way to DOS webapps :\
[22:10:06] RahulT: has joined #ruby
[22:10:10] Ox0dea: >> {'a'=>1, 'b'=>2}.keys.map(&:frozen?) # lucasb
[22:10:11] ruby[bot]: Ox0dea: # => [true, true] (https://eval.in/502391)
[22:10:17] zambini: has joined #ruby
[22:10:30] jbrhbr: i wonder how many programs would break if strings and symbols became fully interchangeable
[22:10:33] edwinvdgraaf: has joined #ruby
[22:10:33] lucasb: Ox0dea: oh, just hash keys then?
[22:10:41] Ox0dea: lucasb: Yeah, since forever ago.
[22:10:49] lucasb: I didn't know. thanks
[22:11:05] Ox0dea: >> RubyVM::InstructionSequence.compile_options = {frozen_string_literal: true}; eval "'foo'.frozen?" # lucasb
[22:11:07] ruby[bot]: Ox0dea: # => undefined method `compile_options=' for RubyVM::InstructionSequence:Class ...check link for more (https://eval.in/502392)
[22:11:16] Ox0dea: >> RubyVM::InstructionSequence.compile_option = {frozen_string_literal: true}; eval "'foo'.frozen?" # lucasb
[22:11:17] ruby[bot]: Ox0dea: # => true (https://eval.in/502393)
[22:11:29] Ox0dea: Frozen string literals aren't on by default just yet.
[22:11:41] Ox0dea: You can turn them on three or four different ways.
[22:11:42] jbrhbr: 2.3 right?
[22:11:49] Ox0dea: This is 2.3.
[22:12:03] grill: how would I insert an array of strings into another string? the following code appears to insert the whole array... \"chef_roles\": #{@roles_hash[hostkey].each { |entry| p "\"lol #{entry}\"" }}"
[22:12:12] acidrainfall: norc: the reason the logic was failing turned out to be that the scope lookup value returns true, because it evaluates the statement not the value
[22:12:15] jbrhbr: maybe a month ago someone here referenced a post saying they'd be default in 2.3, but i didn't pay attention after that
[22:12:49] acidrainfall: norc: scope['var'].nil? was *always* false no matter what the value was
[22:12:51] Ox0dea: That was briefly considered, I guess, but 2.3 is here and Strings aren't frozen by default.
[22:13:03] norc: acidrainfall: I am sure there is some sense in that sentence, even though it escapes me. But Im glad you seem to have found your problem. :)
[22:13:10] jbrhbr: welcome to the unfrozen future then!
[22:13:17] acidrainfall: norc: that was the best way I could explain it
[22:13:28] acidrainfall: norc: is scope[''] a ruby principle, or something that puppet tacked on?
[22:13:50] norc: Ox0dea: Don't we have a flag to somehow enforce this on a file basis based on some thingie?
[22:13:53] norc: Since 2.3?
[22:14:38] Axsuul: has joined #ruby
[22:14:54] aegis3121: grill it really depends on how you want to separate them.
[22:15:12] grill: aegis3121 join works, although I need to surround all strings with quotes...
[22:16:15] edwinvdgraaf: has joined #ruby
[22:16:22] DoubleMalt: has joined #ruby
[22:16:28] bmalum: has joined #ruby
[22:16:39] aegis3121: Hmm... probably a better way but @roles_hash[hostkey].map { |r| "\"#{r}\"" }.join(', ')
[22:16:47] aegis3121: comes to mind right off the bat
[22:17:23] edwinvdgraaf: has joined #ruby
[22:17:46] rocfig: has joined #ruby
[22:18:44] dlitvak: has joined #ruby
[22:19:05] who42: has joined #ruby
[22:19:24] nfk|laptop: why must bundle be this ana... complicated?
[22:19:36] Ox0dea: nfk|laptop: Is it?
[22:19:51] Ox0dea: norc: https://eval.in/502394
[22:19:57] nfk|laptop: i just want it to install them locally and not invoke sudo or ask me for some god knows what path
[22:20:01] Ox0dea: There's also the `--enable-frozen-string-literal` interpreter flag.
[22:20:09] Ox0dea: Or just `--enable-f` if you're... golfing?
[22:20:11] jgpawletko: has joined #ruby
[22:20:15] nfk|laptop: gem is similar but at least it has --user-install and that's that
[22:20:19] Ox0dea: acidrainfall: Any object can define a custom #[] method.
[22:21:45] yardenbar: has joined #ruby
[22:22:06] [Butch]: has joined #ruby
[22:23:16] norc: Ox0dea: Alright. Well time to head to bed and prepare for the glorious day tomorrow.
[22:23:44] Ox0dea: norc: Good night and godspeed.
[22:23:54] yfeldblum: has joined #ruby
[22:23:57] norc: Have a pleasant night yourself.
[22:25:12] kalopsian: has joined #ruby
[22:26:38] karapetyan: has joined #ruby
[22:27:16] Rodya_: has joined #ruby
[22:28:04] drbrain: nfk|laptop: I think you want --path
[22:28:45] vikas027: has joined #ruby
[22:28:50] kerunaru: has joined #ruby
[22:29:23] jamw: has joined #ruby
[22:29:40] edwinvdgraaf: has joined #ruby
[22:29:52] hxegon: has joined #ruby
[22:30:40] _djbkd: has joined #ruby
[22:30:44] nfk|laptop: drbrain, --path to what?
[22:30:47] cpup: has joined #ruby
[22:31:04] nfk|laptop: that's my second complaint, my first is that it even asks me without a clear explanation
[22:31:07] Sembei: has joined #ruby
[22:31:10] drbrain: bundle install --path local_directory_where_I_want_bundler_to_put_files
[22:31:23] drbrain: see bundle help install
[22:32:46] akem: has joined #ruby
[22:36:11] _djbkd: has joined #ruby
[22:36:39] _djbkd: has joined #ruby
[22:36:56] Ox0dea: drbrain: Is ENV['RUBYLIBDIR'] the only recourse for determining to which version we're being upgraded in a post-install hook? https://git.io/vznF7
[22:37:41] drbrain: Ox0dea: more context please
[22:38:14] jgt: has joined #ruby
[22:38:15] Ox0dea: drbrain: I'm using `spec.extensions = ['Rakefile']` with a default task, which gets triggered during gem installation.
[22:38:17] drbrain: for that, it tells mkmf (via mkrf_conf) where ruby lives
[22:38:24] Ox0dea: It doesn't.
[22:38:25] dlitvak: has joined #ruby
[22:38:36] Ox0dea: It contains the directory to which the gem is being installed.
[22:38:57] Ox0dea: But I can't say how consistent that value is across systems.
[22:39:07] drbrain: you should be able to use __FILE__ to determine
[22:39:21] drbrain: since it'll be in the install directory (with version and all that)
[22:40:47] aef: has joined #ruby
[22:41:12] grill: any thoughts as to why rspec would not be running a function inside of an expect { } block
[22:41:26] guacamole: has joined #ruby
[22:41:43] radgeRayden: has joined #ruby
[22:42:16] northfurr: has joined #ruby
[22:42:21] Ox0dea: drbrain: That works just fine. Thanks! :)
[22:42:40] blackmesa: has joined #ruby
[22:42:49] aegis3121: grill: code helps
[22:43:44] roshanavand: has joined #ruby
[22:44:10] zenlot1: has joined #ruby
[22:44:57] grill: aegis3121 http://hastebin.com/neyoyivude.rb
[22:45:01] snowy: has joined #ruby
[22:45:36] aegis3121: what makes you say the code isn't running? Failing test? Error message?
[22:46:39] gbgdev: has joined #ruby
[22:47:20] grill: the function invoked (Transfer.files_changed?) is supposed to output logging info. it isn't
[22:47:41] freerobby: has joined #ruby
[22:48:01] aegis3121: and I take the it the logging is before the ArgumentError is raised.
[22:48:45] aegis3121: Are you attempting to test for the log messages, or just looking for them?
[22:48:59] TomPeed: has joined #ruby
[22:49:41] uris: has joined #ruby
[22:50:17] grill: if I run it as follows, the function runs, but the test comes back as "failed" expect(Transfer.files_changed?(nil, nil, @flags)).to(raise_error(ArgumentError)
[22:50:22] rubyfan: has joined #ruby
[22:50:36] grill: it's like it doesn't catch the ArgumentError
[22:51:07] lucasb: out of curiosity, among you all, there's 100% consensus on all items in the ruby-style-guide?
[22:51:47] Ox0dea: lucasb plz
[22:52:26] lucasb: ok, sorry :)
[22:52:34] rubyfanfr: I'm a beginner in Ruby. I would like to TRY various rails project on GitHub, but I can't find a generic process to use them after cloning them. Anyone could help me ? (I'm a PHP and Obj-C dev by the way).
[22:52:55] aegis3121: grill: But it doesn't say it failed because an ArgumentError was raised, it's just...a failed test?
[22:53:33] grill: ArgumentError
[22:53:40] grill: is why it failes
[22:54:16] emilford: has joined #ruby
[22:54:22] dlitvak: has joined #ruby
[22:55:30] aegis3121: The error message looks a bit off to me, but I'm not sure, honestly.
[22:56:05] linoespinoza: has joined #ruby
[22:56:11] RenatoSilva: has joined #ruby
[22:56:55] Xeago: has joined #ruby
[22:58:20] dfinninger: has joined #ruby
[22:59:16] sftrabbit: has joined #ruby
[22:59:33] aegis3121: has joined #ruby
[23:00:36] rubyfanfr: does the process differs from one rails project to another ?
[23:00:41] jgpawletko: has joined #ruby
[23:01:53] RenatoSilva: has left #ruby: ("http://pidgin.renatosilva.me - Pidgin++")
[23:02:32] usershell: has joined #ruby
[23:02:55] dcunit3d: has joined #ruby
[23:02:56] Blaguvest: has joined #ruby
[23:03:05] bronson: has joined #ruby
[23:03:11] ta: has joined #ruby
[23:03:37] baweaver: has joined #ruby
[23:03:59] usershell: has joined #ruby
[23:05:02] Liothen: has joined #ruby
[23:05:37] snowy: has joined #ruby
[23:06:25] RahulT: has joined #ruby
[23:08:49] dlitvak: has joined #ruby
[23:09:09] Oog: has joined #ruby
[23:09:30] northfurr: has joined #ruby
[23:11:53] Vitor: has joined #ruby
[23:15:06] sleepee: has joined #ruby
[23:16:45] kalopsian: has joined #ruby
[23:19:04] fsapo: has joined #ruby
[23:19:34] foobar121: has joined #ruby
[23:19:42] allcentury: has joined #ruby
[23:21:17] karapetyan: has joined #ruby
[23:21:46] uris: has joined #ruby
[23:21:51] scoot: has joined #ruby
[23:22:01] blackmesa: has joined #ruby
[23:22:57] skcin7: has joined #ruby
[23:23:06] CihanKaygusuz: has joined #ruby
[23:23:07] Cihan: has joined #ruby
[23:24:09] scoot: hi there!
[23:24:12] yardenbar: has joined #ruby
[23:24:25] scoot: is there a way to make a loop execute one more time after the conditions are met?
[23:24:27] karapetyan: has joined #ruby
[23:24:37] scoot: while node.next != nil
[23:24:37] scoot: # do something
[23:24:41] scoot: # do something else
[23:24:44] SHyx0rmZ: has joined #ruby
[23:24:48] foobar121: please don't paste code into the irc window
[23:24:49] bronson: has joined #ruby
[23:24:52] Nilium: Could just put the code in a function and call it again.
[23:24:53] scoot: oops sorry
[23:24:54] foobar121: use a gist or hastebin or something instead
[23:25:06] scoot: ok foobar121 I will do next time
[23:25:17] hxegon: scoot if you are more spcefic, we might be able to find a better solution
[23:25:28] kalopsian: has joined #ruby
[23:26:02] scoot: I would like the block to run for a last time when node.next == nil
[23:26:08] bnagy: do_something while condition; do_something # one more time
[23:26:29] janebootydoe: has joined #ruby
[23:27:24] foobar121: loop { return false unless condition; return true; break }
[23:28:04] Rodya_: has joined #ruby
[23:28:09] foobar121: i may be a little high so let me know if that doesn't make sense
[23:28:32] roshanavand: has joined #ruby
[23:28:40] shadoi: has joined #ruby
[23:28:42] scoot: haha i was trying to make sense of it
[23:29:18] mchu: has joined #ruby
[23:30:32] kalopsian: has joined #ruby
[23:30:54] roshanavand: has joined #ruby
[23:31:57] foobar121: bnagy's way is the right way
[23:32:26] gigetoo: has joined #ruby
[23:32:52] foobar121: ok so I have machines A and B
[23:33:00] foobar121: for clarity
[23:33:03] foobar121: machines J and K
[23:33:15] bnagy: one line while / until loops are often fiddly, though, so it might be a dumb approach if you need to also operate on the object that controls the loop
[23:33:15] dlitvak_: has joined #ruby
[23:33:30] bnagy: in which case just write more lines
[23:33:38] karapetyan: has joined #ruby
[23:33:41] scoot: i see. so bnagy, I would just execute the code once more after the block?
[23:33:48] uris: has joined #ruby
[23:33:53] foobar121: eh you can just pass in parameters, in the cases where that's an issue i find there's usually something else contributing to the problem
[23:34:01] ta: has joined #ruby
[23:34:37] bnagy: scoot: if that's what you want to do, yeah. Loops by their nature are only entered while their conditional is true
[23:35:08] scoot: I'm working through some algorithm exercises. Basically it's just iterating through a linkedlist and removing any repeats. But I'm not successfully removing the last node in the list
[23:35:14] foobar121: so i'm trying to send http requests by mechanize through a proxy. i have machines J and K, where J is local, dynamic IP, and behind a restrictive firewall; K is remote, static IP, with SSH and HTTP ports open to the world
[23:35:17] scoot: http://hastebin.com/xoficomamo.pl
[23:35:22] baweaver: has joined #ruby
[23:35:23] scoot: that's what I have right now
[23:35:35] ta: has joined #ruby
[23:36:05] foobar121: on the local machine J, i open a reverse ssh tunnel using `ssh -R 22101:localhost:22 $REMOTE_IP`
[23:36:32] foobar121: is it possible to use this tunnel as an http proxy?
[23:36:35] Azure: has joined #ruby
[23:36:35] foobar121: i'm getting lost in docs
[23:37:12] Ropeney: has joined #ruby
[23:37:45] snockerton: has joined #ruby
[23:38:03] bnagy: scoot: is this list sorted?
[23:38:22] scoot: it's a singly linkedlist
[23:38:33] scoot: sorry let me include that in the hastebin too
[23:38:38] lemur: has joined #ruby
[23:39:05] bnagy: I got that from the class name
[23:39:19] bnagy: btw use gist, ideally
[23:39:25] bnagy: then people can edit etc
[23:39:55] scoot: http://hastebin.com/oxonivunuy.rb
[23:40:16] scoot: ok I will use gist from now on :)
[23:41:20] bnagy: imho refactor unlink into a method, for a start
[23:41:28] bnagy: that will make your logic easier for you to understand
[23:41:50] kies^: has joined #ruby
[23:41:55] bnagy: if you're doing it for algorithms then the nodes of a linked list should probably be a class
[23:42:33] bnagy: (IRL I don't think I've ever seen someone use linked lists from a HLL, they're too slow)
[23:43:14] scoot: got it! thanks that's some really good feedback
[23:43:31] scoot: what is HLL?
[23:43:44] bnagy: high level language
[23:44:31] scoot: yea that totally makes sense. The book has it implemented using Java
[23:44:44] diegoviola: has joined #ruby
[23:44:46] scoot: I'm just trying to learn some CS stuff since I didn't go to school for it
[23:44:48] bnagy: you can model a single (or double) linked list by just implementing the node classes, tbf
[23:44:54] alphaatom: has joined #ruby
[23:45:01] bnagy: you don't need an overarching list class
[23:45:36] bnagy: prev next insert_before insert_after unlink
[23:45:40] bnagy: off top of head
[23:45:50] bnagy: sry scratch prev for single
[23:46:29] ramfjord_: has joined #ruby
[23:46:53] scoot: so I should just implement next, insert_before, insert_after, unlink within the node class itself?
[23:47:04] bnagy: not before, cause single
[23:47:33] scoot: got it but i should just implement those methods within the node class correct? just making sure I understand it corerectly
[23:47:36] huluhuluhulu: has joined #ruby
[23:47:38] bnagy: and you can't unlink the current node in a singly-linked list can you?
[23:47:42] bnagy: you have to unlink the next
[23:47:49] huluhuluhulu: has left #ruby: ()
[23:48:42] bnagy: but yeah that's my suggestion, just make one SLLNode class or whatever
[23:48:49] bnagy: others may have a different view *shrug*
[23:49:10] scoot: yea, I can only keep track of the previous node and use prevous.next = current.next to unlink the node
[23:49:14] foobar020: is there a more appropriate place to ask?
[23:49:34] scoot: got it thanks! I'm done now
[23:49:47] dirk_diiggler: has joined #ruby
[23:50:12] bnagy: foobar020: it's not a ruby question per se, but mainly people only answer questions they are awake for and interested in
[23:50:27] bnagy: so just hang around, I guess
[23:51:06] foobar020: yeah, the link to ruby is that i want to proxy mechanize requests through the reverse tunnel
[23:51:10] foobar020: which is admittedly tenuous
[23:51:24] peeja: has joined #ruby
[23:51:34] bnagy: my gut reaction is that ssh tunnels are pipes not proxies
[23:51:51] bnagy: a proxy works at a higher layer
[23:52:56] duckpuppy: has joined #ruby
[23:53:01] dirk_diiggler: has left #ruby: ("Leaving")
[23:53:23] Kryptonical: has joined #ruby
[23:54:24] fuzzyfuzz: An SSH tunnel *can* be a proxy.
[23:55:06] fuzzyfuzz: http://www.linuxjournal.com/content/use-ssh-create-http-proxy
[23:55:16] fuzzyfuzz: It will function as a SOCKS proxy.
[23:55:40] bnagy: that's just socks
[23:55:49] nfk|laptop: has joined #ruby
[23:55:51] bnagy: ie not an ssh tunnel
[23:57:05] bnagy: it might actually solve the problem though :P
[23:57:08] fuzzyfuzz: Maybe I'm wrong, but my understanding is that is generally considered to be an SSH tunnel.
[23:57:31] fuzzyfuzz: Are you trying to do remote code execution with Ruby?
[23:58:52] foobar020: Sorry for the delayed response, I had to let my dogs out
[23:58:58] joonty: has joined #ruby
[23:59:52] voidDotClass: if doing array.each to search for something, and finding it, how do you then exit the loop and not needlessly loop over the rest?