« Back to channel list

#ruby - 17 March 2016

« Back 1 day Forward 1 day »
[00:01:44] woodruffw: has joined #ruby
[00:03:48] coyo: has joined #ruby
[00:05:23] rkazak: has joined #ruby
[00:06:05] al2o3-cr: has joined #ruby
[00:06:16] arlek: has joined #ruby
[00:06:50] pragmatism: has joined #ruby
[00:06:59] uglybandersnatch: has joined #ruby
[00:07:50] pragmatism: has joined #ruby
[00:08:01] drbrain: has joined #ruby
[00:08:14] twe4ked: has joined #ruby
[00:08:15] [afk]chocoelho: has joined #ruby
[00:08:33] DLSteve: has joined #ruby
[00:09:13] duoi: has joined #ruby
[00:09:20] SegFaultAX: has joined #ruby
[00:09:34] znz_jp: has joined #ruby
[00:09:48] baweaver: has joined #ruby
[00:09:54] crdpink2: has joined #ruby
[00:11:44] iWaffles: has joined #ruby
[00:13:07] Klumben: has joined #ruby
[00:13:40] bronson: has joined #ruby
[00:13:46] woodruffw: has joined #ruby
[00:14:53] tvon: has joined #ruby
[00:20:47] tubulife-: has joined #ruby
[00:21:37] jottr: has joined #ruby
[00:22:07] astrobun_: has joined #ruby
[00:23:07] DmitryBochkarev: has joined #ruby
[00:24:02] PaulCapestany: has joined #ruby
[00:24:09] al2o3-cr: has joined #ruby
[00:25:14] duoi: has joined #ruby
[00:25:24] Moosashi: has joined #ruby
[00:27:11] eggoez: has joined #ruby
[00:27:53] sp4rrow: has joined #ruby
[00:28:32] CloCkWeRX: has joined #ruby
[00:28:52] alem0lars: has joined #ruby
[00:29:32] ltp: has joined #ruby
[00:29:52] nano-: Ok.. so if I create a module, or even a submodule, rdoc can emit constants for rb_define_const in the html output. If I instead pass a class to rb_define_constant there will be no constant in the documentation.
[00:30:28] nano-: It should be in the class though, any suggestions on potential workarounds?
[00:30:35] nano-: Same thing seems to affect sdoc as well.
[00:31:38] nano-: weird though - as rdoc tests seems to be able to deal with class constants, https://github.com/rdoc/rdoc/blob/cfffed5fa84812ebcb2c6bd1b037c79412402f8b/test/test_rdoc_parser_c.rb#L396
[00:31:57] nano-: the classes there aren't under any module though - if that changes anything.
[00:32:20] crowell: has joined #ruby
[00:33:23] nano-: Yep, rdoc can extract constants from classes if the class is root level rather than within a module.
[00:33:45] uglybandersnatch: has joined #ruby
[00:36:15] 7GHAAJPIV: has joined #ruby
[00:36:31] ensyde: has joined #ruby
[00:37:01] baweaver: has joined #ruby
[00:37:42] arescorpio: has joined #ruby
[00:38:48] nano-: Not entirely true though, a minimal test case works. So maybe the parser that freaks out about something else.
[00:39:03] vikaton: has joined #ruby
[00:40:21] tubulife-: has joined #ruby
[00:41:10] freakcoder: has joined #ruby
[00:41:56] wreet: has joined #ruby
[00:42:32] drbrain: nano-: if RDoc can't trace a path up to object it'll ignore the constant
[00:43:11] Xiti: has joined #ruby
[00:43:18] drbrain: if you have MyModule::MyClass::MY_CONSTANT, but the C file defines MyClass and MY_CONSTANT without defining MyModule RDoc won't be able to see it unless you give it a hint
[00:45:05] lessless: has joined #ruby
[00:45:28] nano-: I have an #if 0 rb_define_module(..) to satisfy rdoc.
[00:45:54] drbrain: do you have an example that fails?
[00:46:47] nano-: No, I haven't been able to construct one yet.
[00:47:12] nano-: So the full code is here, except with the addition of rb_define_module to please rdoc, https://github.com/xmms2/xmms2-devel/blob/master/src/clients/lib/ruby/rb_collection.c#L537
[00:47:23] pawnbox: has joined #ruby
[00:48:01] tomatoes: has joined #ruby
[00:48:28] drbrain: lol: error: object f6afd43be60d7adcf4e034f8ffe429570e1b8857: badTimezone: invalid author/committer line - bad time zone
[00:48:29] nano-: And it also seems like I have to run the file through the c preprocessor before running rdoc later on, due to DEF_CONST used there, but that's trivial as long as this starts working.
[00:49:40] RTG`: has joined #ruby
[00:49:41] jsaak: has joined #ruby
[00:50:52] tubulife-: has joined #ruby
[00:51:43] jhack: has joined #ruby
[00:51:59] drbrain: nano-: https://gist.github.com/drbrain/4523f713086825ec33bd
[00:52:23] drbrain: with that patch I found 37 items
[00:52:23] sp4rrow: has joined #ruby
[00:52:54] drbrain: that looks pretty close
[00:52:56] nano-: drbrain: Yes, that's what I said.
[00:53:01] nano-: [01:47:11][nano-]: So the full code is here, except with the addition of rb_define_module to please rdoc,
[00:53:11] drbrain: … is 37 items correct?
[00:53:39] nano-: drbrain: Doesn't matter, as long as constants are shown in the docs I can get the rest working.
[00:54:14] lemur: has joined #ruby
[00:54:17] nano-: The constants are the only issue. I can push my local changes to a branch in a bit (i get 208 entries here)
[00:54:40] drbrain: to make https://github.com/xmms2/xmms2-devel/blob/master/src/clients/lib/ruby/rb_collection.c#L567 show up you can /* Document-const: TYPE_REFERENCE
[00:54:50] drbrain: and put the docs you want on the next line (if any)
[00:54:57] Suntzu: has joined #ruby
[00:55:21] drbrain: like this: https://github.com/ruby/curses/blob/master/ext/curses/curses.c#L2909-L2916
[00:55:36] nano-: drbrain: Tried that, didn't work. Can try again.
[00:56:21] drbrain: hrm, checking
[00:56:25] nano-: Well.. for that line it doesn't work as it uses a macro to create the const, but a bit further up for NS_ALL I'd expect something like that to work, but it doesn't.
[00:56:50] drbrain: hrm, maybe Document-const doesn't create one without an rb_define_const following
[00:57:28] Asher: has joined #ruby
[00:57:29] nano-: As I said, there are rb_define_const's a bit further up, and doesn't help there either.
[00:57:53] endash: has joined #ruby
[00:58:45] endash: has joined #ruby
[00:59:21] nano-: drbrain: https://github.com/dsvensson/xmms2-devel/commit/af9590feec76a963eda498949f1acda8abfe8b39
[00:59:21] woodruffw: has joined #ruby
[00:59:21] frustrum: has joined #ruby
[00:59:26] preyalone: has joined #ruby
[00:59:29] endash: has joined #ruby
[00:59:44] nano-: meh.. dot directory.. repushing.
[00:59:49] ianmethyst: has joined #ruby
[01:00:06] avahey: has joined #ruby
[01:00:12] endash: has joined #ruby
[01:00:14] bezhermoso: has joined #ruby
[01:01:05] endash: has joined #ruby
[01:01:13] drbrain: I can get NS_ALL to have documentation: https://gist.github.com/drbrain/4523f713086825ec33bd
[01:01:15] nano-: https://github.com/dsvensson/xmms2-devel/commit/08335bc6d0532768c5700525fcfae7b8fc8cf9d4
[01:01:48] SG045734: has joined #ruby
[01:01:52] endash: has joined #ruby
[01:02:32] nano-: drbrain: processing *.(c|h|rb) ?
[01:02:34] endash: has joined #ruby
[01:02:49] drbrain: http://take.ms/dWC21
[01:03:10] nano-: wtf.. that does *not* work here. what rdoc version?
[01:03:15] endash: has joined #ruby
[01:03:47] drbrain: to get TYPE_REFERENCE, etc. you'd need to remove or expand the macro 😢
[01:04:12] radgeRayden: has joined #ruby
[01:04:13] endash: has joined #ruby
[01:04:35] drbrain: running the C preprocessor is tears and sadness just as expanding it manually
[01:04:54] endash: has joined #ruby
[01:05:07] nano-: i guess sed will have to do.
[01:05:45] endash: has joined #ruby
[01:06:21] nano-: Updated to 4.2.2, still no go. http://618774854893b331.paste.se/
[01:06:32] endash: has joined #ruby
[01:07:17] diegoviola: has joined #ruby
[01:07:34] endash: has joined #ruby
[01:07:45] nano-: it's properly detected - as it has always been after the rb_define_module hack,
[01:07:45] nano-: Constants: 18 ( 17 undocumented)
[01:07:54] endash: has joined #ruby
[01:07:57] nano-: only one, the NS_ALL documented just now.
[01:08:31] nano-: But yeah.. not visible in the html output.
[01:08:37] kalopsian: has joined #ruby
[01:08:58] endash: has joined #ruby
[01:09:37] endash: has joined #ruby
[01:10:19] endash: has joined #ruby
[01:10:31] nano-: If I skip the .rb files, it works alright. That is rdoc *.c
[01:11:00] endash: has joined #ruby
[01:11:38] drbrain: there must be a bug merging the two together
[01:11:44] nano-: Then I get all constants - no matter if they're documented or not - which is what I want - except that I also want the stuff in the .rb files.
[01:11:48] Karix: has joined #ruby
[01:11:49] nano-: yeah.. but that works for you?
[01:12:01] drbrain: if I run with the .rb files it fails
[01:12:06] nano-: ah, great.
[01:12:29] nano-: Thing is, that's the case I've tried to setup a minimal test case for, but in my test case it works.
[01:13:10] postmodern: has joined #ruby
[01:13:11] nano-: http://0a9521cc2461b4a3.paste.se/
[01:13:42] drbrain: src/clients/lib/ruby/rb_collection.c src/clients/lib/ruby/async.rb is sufficient to reproduce
[01:14:03] drbrain: if you submit a bug pointing to those two files I could reduce it
[01:15:25] nano-: drbrain: Ah, didn't realize you're involved in the rdoc project. Cool.
[01:15:40] bezhermoso: has joined #ruby
[01:16:02] stannard: has joined #ruby
[01:16:09] drbrain: it's probably some weird edge case
[01:16:54] Moosashi: has joined #ruby
[01:17:13] pawnbox: has joined #ruby
[01:18:23] SirFunk: has joined #ruby
[01:18:44] Uo9er_: has joined #ruby
[01:20:07] uglybandersnatch: has joined #ruby
[01:20:13] nano-: drbrain: I'll file a ticket.
[01:20:34] siaW: has joined #ruby
[01:22:22] Uber|Dragon: has joined #ruby
[01:22:48] nerium: has joined #ruby
[01:22:56] bullets: has joined #ruby
[01:23:11] ceej: has joined #ruby
[01:24:31] jtdowney: has joined #ruby
[01:24:31] jtdowney: has joined #ruby
[01:24:51] bullets: I've been meaning to learn a scripting language mostly for web scripting
[01:25:13] bullets: (not rails though)
[01:25:42] bullets: no bash is too rigid
[01:25:50] bullets: that's why I might try ruby...
[01:25:59] bullets: I already tried perl tho, and didn't really like it
[01:26:08] bullets: didn't like python either
[01:26:16] gbgdev_: has joined #ruby
[01:26:38] Papierkorb: bullets: What's wrong with Rails? (There are plenty of other web frameworks available though, e.g. Sinatra)
[01:26:49] Eleeleth: has joined #ruby
[01:27:03] bullets: isn't rails about backend webdev or something?
[01:27:12] bullets: I want the opposite, like a wget on steroids
[01:27:29] Papierkorb: oh you want to consume web stuff, not build web stuff?
[01:27:36] woodruffw: has joined #ruby
[01:27:58] bullets: that's what I mean
[01:28:10] bullets: client-side stuff, like irc bots and data mineres
[01:28:22] Papierkorb: There are like a gazillion HTTP client libraries at your disposal
[01:28:29] Papierkorb: for IRC bots see "Cinch"
[01:28:54] bullets: nice, so ruby does have the tools?
[01:29:19] nano-: while true; do wget $URL & done :]
[01:29:31] Papierkorb: I think the issue is not that you don't have tools to do X, but rather to figure out which of the commonly used ones you want to use
[01:29:36] nano-: (please don't run that :)
[01:29:37] bullets: btw, ruby comes with a repl, right?
[01:29:47] Papierkorb: bullets: irb, yes. But forget about that.
[01:29:49] fullofca_: has joined #ruby
[01:29:53] Papierkorb: bullets: $ gem install pry pry-coolline
[01:29:57] Papierkorb: bullets: Much better REPL
[01:30:24] ur5us: has joined #ruby
[01:30:41] Papierkorb: can do stuff like rendering in-source documentation, display source, edit source (and reload it), etc.
[01:30:47] Papierkorb: And it can run ruby code too, like a REPL
[01:30:52] drbrain: nano-: https://gist.github.com/drbrain/b28ea46f263d065cc321 reproduces
[01:31:10] nano-: drbrain: \o/
[01:31:21] bullets: now for actually getting started with ruby
[01:31:26] bullets: why poignant's guide?
[01:31:28] drbrain: so now I have a good idea of why this is happening
[01:31:42] Papierkorb: bullets: what's that?
[01:31:44] bullets: or is there a good quickstart tutorial out there that you recommend?
[01:32:22] bullets: Papierkorb: uh... never heard of why poignant's guide to ruby?
[01:32:26] kies: has joined #ruby
[01:32:45] sneakerhax: has joined #ruby
[01:32:46] nano-: drbrain: Should I still file a bug?
[01:32:47] bullets: why's poignant*
[01:32:55] Papierkorb: bullets: Heh. Actually I just began building crappy tools, looked up in the standard library what I needed, googled a ton, rinse repeat
[01:33:04] Papierkorb: bullets: Never heard of that
[01:33:21] nano-: bullets: The language documentation that all other languages lack :(
[01:33:28] nano-: s/documentation/introduction/
[01:33:33] nano-: Papierkorb: Read now!
[01:33:43] bullets: almost all other languages, but yeah
[01:33:47] bullets: it looks pretty fun
[01:33:51] nano-: Papierkorb: http://poignant.guide/
[01:33:57] bullets: I'll give it a try
[01:34:00] nano-: It's a great ride :)
[01:34:06] bullets: all other scripting languages so far have bored me to death
[01:34:15] rbennacer: has joined #ruby
[01:34:58] arescorpio: has joined #ruby
[01:35:13] bullets: too idyosincratic
[01:35:19] bullets: look at perl for example
[01:35:29] bullets: gawd knows I tried
[01:35:30] x77686d: has joined #ruby
[01:35:45] Papierkorb: Oh well. Python wasn't for me either.
[01:36:44] Papierkorb: bullets: I hope you like OOP
[01:37:13] LoneHerm_: has joined #ruby
[01:37:19] Ox0dea: bullets: Interesting word choice.
[01:37:20] bullets: for some reason I do
[01:37:54] Papierkorb: bullets: Great. Strings are object. arrays and hashes too. oh, and numbers. in fact, everything is. Enjoy.
[01:38:15] tAn: has joined #ruby
[01:38:16] bullets: women are too?
[01:38:42] ianmethyst_: has joined #ruby
[01:41:55] bullets: well thanks for that guys
[01:42:11] bullets: Ima go read that book
[01:43:10] mistermocha: has joined #ruby
[01:44:16] mdih: has joined #ruby
[01:44:58] nano-: drbrain: btw, filed as #399
[01:45:05] drbrain: nano-: great
[01:45:53] bezhermoso: has joined #ruby
[01:47:04] tvon: has joined #ruby
[01:47:32] pawnbox: has joined #ruby
[01:49:46] y2mq37: has joined #ruby
[01:50:44] cdg: has joined #ruby
[01:51:02] bezhermo_: has joined #ruby
[01:51:41] Mattx: has joined #ruby
[01:52:38] Mattx: how do you install ruby >= with rvm? I installed ruby-head but it's 2.2.1
[01:56:21] uglybandersnatch: has joined #ruby
[01:57:21] eljimmy: has joined #ruby
[01:58:13] Xentil: has joined #ruby
[02:01:51] i8igmac: has joined #ruby
[02:02:38] bronson: has joined #ruby
[02:03:24] ledestin: has joined #ruby
[02:03:49] Tharbakim: has joined #ruby
[02:05:15] fullofcaffeine: has joined #ruby
[02:06:36] jyaworski: has joined #ruby
[02:07:38] rbennacer: has joined #ruby
[02:10:14] halfamind: has joined #ruby
[02:11:07] Stan: has joined #ruby
[02:14:36] tercenya: has joined #ruby
[02:16:36] faelkle: has joined #ruby
[02:17:11] pawnbox: has joined #ruby
[02:17:35] mistermocha: has joined #ruby
[02:17:53] ixti: has joined #ruby
[02:18:00] DmitryBochkarev: has joined #ruby
[02:18:07] stannard: has joined #ruby
[02:20:26] ghormoon: has joined #ruby
[02:20:55] treaki__: has joined #ruby
[02:21:47] gbgdev: has joined #ruby
[02:23:44] woodruffw: has joined #ruby
[02:23:45] woodruffw: has joined #ruby
[02:24:17] woodruffw: has joined #ruby
[02:24:17] woodruffw: has joined #ruby
[02:25:05] htmldrum: has joined #ruby
[02:25:12] woodruffw: has joined #ruby
[02:25:18] Tharbakim: has joined #ruby
[02:25:18] cdg: has joined #ruby
[02:25:19] Eleeleth: has joined #ruby
[02:25:19] PaulCapestany: has joined #ruby
[02:25:19] znz_jp: has joined #ruby
[02:25:19] drbrain: has joined #ruby
[02:25:19] PlasmaStar: has joined #ruby
[02:25:19] hplar_: has joined #ruby
[02:25:19] aspiers: has joined #ruby
[02:25:19] Spami_: has joined #ruby
[02:25:19] tristanp: has joined #ruby
[02:25:19] Didac: has joined #ruby
[02:25:19] j2k: has joined #ruby
[02:25:19] jaiks: has joined #ruby
[02:25:19] Cork: has joined #ruby
[02:25:19] bigkevmcd: has joined #ruby
[02:25:19] jinie: has joined #ruby
[02:25:19] melter: has joined #ruby
[02:25:19] quarcu_: has joined #ruby
[02:25:19] Puffball: has joined #ruby
[02:25:19] nibbo: has joined #ruby
[02:25:19] jpinnix_______: has joined #ruby
[02:25:20] bry4n: has joined #ruby
[02:25:20] ElderFain: has joined #ruby
[02:25:20] mando_: has joined #ruby
[02:25:20] BiHi: has joined #ruby
[02:25:20] cajone: has joined #ruby
[02:25:20] bove: has joined #ruby
[02:25:20] x0F: has joined #ruby
[02:25:20] ytti: has joined #ruby
[02:25:20] crankharder: has joined #ruby
[02:25:20] adambeynon: has joined #ruby
[02:25:20] cbetta: has joined #ruby
[02:25:20] podman: has joined #ruby
[02:25:58] Puffball: has joined #ruby
[02:26:00] quarcu: has joined #ruby
[02:26:01] PlasmaStar: has joined #ruby
[02:26:37] PaulCapestany: has joined #ruby
[02:26:51] bove: has joined #ruby
[02:27:00] chagel: has joined #ruby
[02:28:02] griffindy: has joined #ruby
[02:28:48] drbrain: nano-: fixed: https://github.com/rdoc/rdoc/commit/1b5e4544693a3dcc0fec692a661ecf73af20d4b8
[02:29:19] rose177: has joined #ruby
[02:29:48] rose177: has joined #ruby
[02:30:08] benlieb: has joined #ruby
[02:31:06] grill: has joined #ruby
[02:31:37] Mattx: what's the latest version of ruby on rvm? can anyone check what "rvm list known" says?
[02:32:09] drbrain: Mattx: sorry, I don't have rvm
[02:32:38] sesquipedalian: has joined #ruby
[02:32:48] BTRE: has joined #ruby
[02:32:57] rose177: has joined #ruby
[02:33:22] rose177: has joined #ruby
[02:33:42] Mattx: never mind, all I needed was "rvm get head" :)
[02:33:43] slakevc: has joined #ruby
[02:33:54] freakcoder: has joined #ruby
[02:34:13] slakevc: has joined #ruby
[02:35:25] slakevc: has joined #ruby
[02:35:34] rose177: has joined #ruby
[02:37:44] sucks: has joined #ruby
[02:37:51] rose177: has joined #ruby
[02:38:09] ElSif: has joined #ruby
[02:38:19] rose177: has joined #ruby
[02:39:12] crystal77: has joined #ruby
[02:39:44] slakevc: has joined #ruby
[02:40:14] slakevc: has joined #ruby
[02:40:52] nanoz: has joined #ruby
[02:40:53] Uber|Dragon: has joined #ruby
[02:43:58] diegoviola: has joined #ruby
[02:44:35] elifoster: has joined #ruby
[02:44:54] htmldrum: has joined #ruby
[02:45:03] tAn: has joined #ruby
[02:45:06] kies: has joined #ruby
[02:45:06] tomatoes: has joined #ruby
[02:45:34] tjbiddle: has joined #ruby
[02:47:08] marchelz1: has left #ruby: ("WeeChat 1.0.1")
[02:47:09] pawnbox: has joined #ruby
[02:47:23] skweek: has joined #ruby
[02:47:26] jenrzzz: has joined #ruby
[02:47:48] diegoviola: has joined #ruby
[02:51:15] jottr: Hi all. I'm confused by the following construct: hsh = Hash.new {hsh[[1,2]] = 4} hsh[[1,2]] => 4
[02:51:45] jottr: Does that use an array as a key for a hash?
[02:52:02] jottr: I.e. is [1,2] the key?
[02:52:02] linoj: has joined #ruby
[02:52:03] rmulligan: has joined #ruby
[02:52:07] rmulligan: has left #ruby: ()
[02:52:15] gbgdev_: has joined #ruby
[02:52:37] rmulligan: has joined #ruby
[02:52:44] Trynemjoel: has joined #ruby
[02:54:02] Ox0dea: I don't understand why it's in Hash.new's block, though.
[02:54:35] ruind: has joined #ruby
[02:55:16] baweaver: has joined #ruby
[02:55:20] jottr: Ox0dea: It's from https://stackoverflow.com/questions/1720932/create-two-dimensional-arrays-and-access-sub-arrays-in-ruby
[02:55:39] Ox0dea: jottr: Is not.
[02:56:09] blackmesa: has joined #ruby
[02:56:45] kalopsian: has joined #ruby
[02:57:06] bullets: has joined #ruby
[02:57:59] bullets: ACTION started reading why's poignant guide
[02:58:16] jottr: Ox0dea: What do you mean?
[02:58:38] baweaver: has joined #ruby
[02:58:39] Ox0dea: jottr: There's nothing in there that suggests using Hash.new so wrongly.
[02:59:59] [afk]chocoelho: has left #ruby: ()
[03:00:31] jottr: Ox0dea: Ok. Why not say that instead... How should I do it then? I.e. is there a short form of hsh = Hash.new, hsh[[1,2]] = 4
[03:01:38] Ox0dea: jottr: Is that the only key-value pair your Hash is going to contain?
[03:02:21] jottr: For the sake of this example, yes
[03:03:46] poerror: has joined #ruby
[03:03:51] radgeRayden: has left #ruby: ("Leaving")
[03:06:07] uglybandersnatch: has joined #ruby
[03:07:52] Moosashi: has joined #ruby
[03:08:24] skweek: has joined #ruby
[03:09:03] IrishGringo: has joined #ruby
[03:09:53] jenrzzz: has joined #ruby
[03:11:41] Spami: has joined #ruby
[03:12:13] Spami: has joined #ruby
[03:14:42] shpoont: has joined #ruby
[03:14:50] akkad: has joined #ruby
[03:15:05] Ox0dea: >> {[1,2] => 4} # jottr
[03:15:07] ruby[bot]: Ox0dea: # => {[1, 2]=>4} (https://eval.in/537816)
[03:16:01] jottr: Ox0dea: thx. And for multiple pairs?
[03:16:26] Ox0dea: jottr: Just separate the pairs with commas.
[03:16:40] jottr: Ox0dea: ok
[03:17:22] Ox0dea: That's called a Hash literal, incidentally, but you can add onto a Hash at any time with Hash#[]=, regardless of how it was instantiated.
[03:17:28] pawnbox: has joined #ruby
[03:17:51] zast: has joined #ruby
[03:18:22] blt: has joined #ruby
[03:18:28] CloCkWeRX: has left #ruby: ()
[03:18:54] U7se6: has joined #ruby
[03:19:11] Spami: has joined #ruby
[03:20:10] jyaworski: has joined #ruby
[03:25:48] pwn: has joined #ruby
[03:26:00] pwn: Hi, what does this code do: @sid = "#{@session[16..-1]}"
[03:26:01] chandlerbing: has joined #ruby
[03:27:49] Ox0dea: pwn: About which part are you most powerfully confused?
[03:28:22] pwn: the right hand side of the assignment
[03:29:35] Ox0dea: pwn: @session is a String, [16..-1] grabs the characters from index 16 all the way to the end (Ruby supports negative indexing), and then that result is being interpolated (unnecessarily, since it's already a String).
[03:30:13] pwn: will it work if session is a string like "99" ?
[03:30:20] pwn: or does it have to be at least 16 characters long?
[03:30:21] LoneHerm_: has joined #ruby
[03:30:28] ruby[bot]: Why don't you try it and see for yourself?
[03:30:43] pwn: Im editing a metasploit script.. kinda hard to figure out whats going on
[03:30:51] pwn: https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/http/zabbix_sqli.rb
[03:30:53] pwn: that one..
[03:31:01] pwn: anyways i'll play around with it
[03:31:05] Ox0dea: Sure thing.
[03:33:25] bronson: has joined #ruby
[03:34:17] uglybandersnatch: has joined #ruby
[03:36:22] baweaver: has joined #ruby
[03:37:15] crowell: has joined #ruby
[03:37:50] benlieb: has joined #ruby
[03:37:53] rrrepsaj: has joined #ruby
[03:41:49] duncannz: has joined #ruby
[03:43:19] woodruffw: has joined #ruby
[03:43:22] y2mq37: has joined #ruby
[03:43:24] linoj: has joined #ruby
[03:43:54] vash_: has joined #ruby
[03:44:25] aspiers: has joined #ruby
[03:45:08] Guest35290: alguien por ahi?
[03:46:37] vdamewood: has joined #ruby
[03:47:16] bezhermoso: has joined #ruby
[03:51:26] uglybandersnatch: has joined #ruby
[03:52:30] tercenya_: has joined #ruby
[03:53:45] rmulligan: has joined #ruby
[03:55:28] Vlat-: has joined #ruby
[03:55:37] wasane: has joined #ruby
[03:55:43] halfamind: has joined #ruby
[03:56:33] davedev24: has joined #ruby
[03:56:55] tercenya: has joined #ruby
[03:57:12] LastGabs: has joined #ruby
[03:57:29] pawnbox: has joined #ruby
[04:00:35] rrrepsaj: has joined #ruby
[04:00:47] Nick_ZWG: has joined #ruby
[04:03:10] Nick_ZWG: Hi. I want to check to see if two strings in an array, and if they are, order them in a specific order (A, B, rest of array untouched). I already have the code to add the items to the list if they aren't in it: https://gist.github.com/nmcspadden/1db5ab3dd4f71a9a7c02
[04:05:21] mozzarella: do you want to move them to the front of the array?
[04:05:44] Nick_ZWG: Yes, sorry. I read in the list of paths from /etc/paths, and I need to insert A and B in order to the front of the array.
[04:06:06] Nick_ZWG: Works fine so far with .unshift, but that code doesn't work if A and B are already in /etc/paths but out of order
[04:06:14] Nick_ZWG: i.e. /etc/paths should always end up being:
[04:06:20] Nick_ZWG: A, B, <whatever else>
[04:07:08] Nick_ZWG: I feel like I'm overcomplicating it, but is it better to try to compare two arrays? Or just check to see if the array includes A, and if it does, move it to the top, andthen do the same for B?
[04:07:29] Nick_ZWG: I feel a bit indecisive about the approach
[04:07:35] mozzarella: just tell me what you're trying to do
[04:07:46] mozzarella: what does your program do
[04:08:07] Nick_ZWG: Read in /etc/paths. If A and B are not in /etc/paths already, prepend them to the list of paths, and then write it back out so that it's A, B, <whatever>
[04:08:38] Nick_ZWG: End result is that /etc/paths should always be A, B, whatever
[04:08:48] Nick_ZWG: regardless of what it was when it was read in
[04:08:52] mozzarella: what if there's only A or only B?
[04:09:15] Nick_ZWG: If either or both are missing, they should be prepended in order
[04:10:48] mozzarella: so in all scenarios you end up with A and B at the beginning of the array?
[04:11:06] Nick_ZWG: That's the end goal for all scenarios, regardless of what goes in.
[04:12:21] mistermocha: has joined #ruby
[04:12:47] mozzarella: then I would just remove them and add them back
[04:12:51] braincrash: has joined #ruby
[04:14:52] Nick_ZWG: Wow. That's so obvious.
[04:15:00] Nick_ZWG: I totally overcomplicated it.
[04:15:36] pawnbox: has joined #ruby
[04:15:39] LastGabs: has joined #ruby
[04:16:10] Ox0dea: Nick_ZWG: How about `([A, B] + paths).uniq`?
[04:17:43] Nick_ZWG: That's also a great solution.
[04:17:55] Ox0dea: Sure thing.
[04:18:02] pawnbox: has joined #ruby
[04:18:12] Ox0dea: It's wasteful, but I imagine you don't have thousands of paths. :P
[04:18:17] tjbiddle: has joined #ruby
[04:18:26] bungoman: has joined #ruby
[04:19:30] Pisuke: has joined #ruby
[04:20:30] Nick_ZWG: Indeed, the default /etc/paths only has 5 entries and we're just adding 2
[04:24:15] terminal_: has joined #ruby
[04:24:18] frustrum: has joined #ruby
[04:25:10] DmitryBochkarev: has joined #ruby
[04:25:44] d5sx43: has joined #ruby
[04:25:54] sysodaff: has joined #ruby
[04:26:03] hxegon: has joined #ruby
[04:26:43] blackmesa: has joined #ruby
[04:26:51] tjbiddle: has joined #ruby
[04:28:45] kalopsian: has joined #ruby
[04:29:05] uglybandersnatch: has joined #ruby
[04:29:14] treaki_: has joined #ruby
[04:29:53] DmitryBochkarev: has joined #ruby
[04:30:49] Ox0dea: Nick_ZWG: Are you learning Ruby, or was this kind of a one-off thing?
[04:31:33] LoneHermit: has joined #ruby
[04:31:52] mistermocha: has joined #ruby
[04:34:46] bronson: has joined #ruby
[04:34:58] LoneHerm_: has joined #ruby
[04:35:17] IrishGringo: has joined #ruby
[04:42:11] krz: has joined #ruby
[04:42:58] akosednar: has joined #ruby
[04:44:45] chagel: has joined #ruby
[04:46:02] hk238: has joined #ruby
[04:46:17] pfg: has joined #ruby
[04:46:57] bricker: has joined #ruby
[04:47:09] fedexo: has joined #ruby
[04:49:09] aspiers: has joined #ruby
[04:49:46] chagel: has joined #ruby
[04:52:44] kirillzh: has joined #ruby
[04:54:41] aupadhye: has joined #ruby
[04:56:25] chagel: has joined #ruby
[04:56:27] gix: has joined #ruby
[04:57:23] davedev24: has joined #ruby
[04:57:33] Vlat-: has joined #ruby
[04:57:40] tercenya: has joined #ruby
[05:00:16] norc: has joined #ruby
[05:01:25] chagel: has joined #ruby
[05:01:54] poerror: has joined #ruby
[05:02:30] tAn: has joined #ruby
[05:06:48] halfamind: has joined #ruby
[05:08:04] chagel: has joined #ruby
[05:09:09] rmulligan: has joined #ruby
[05:10:43] ruind: has joined #ruby
[05:13:17] merida: has joined #ruby
[05:14:14] ruid: has joined #ruby
[05:17:27] A124: has joined #ruby
[05:18:24] marienz: has joined #ruby
[05:19:18] Uo9er_: has joined #ruby
[05:19:54] blt: has joined #ruby
[05:20:04] liquid-silence: has joined #ruby
[05:20:04] liquid-silence: has joined #ruby
[05:20:26] crystal77: has joined #ruby
[05:24:06] sauvin: has joined #ruby
[05:24:57] Norrin: has joined #ruby
[05:26:32] bluOxigen: has joined #ruby
[05:31:26] skade: has joined #ruby
[05:33:21] rmulligan: has joined #ruby
[05:34:56] tubulife-: has joined #ruby
[05:38:07] chagel: has joined #ruby
[05:38:53] Xentil: has joined #ruby
[05:38:57] skade: has joined #ruby
[05:41:18] ohaibbq: has joined #ruby
[05:43:06] chagel: has joined #ruby
[05:43:57] halfamind: has joined #ruby
[05:45:19] sp4rrow: has joined #ruby
[05:46:57] Nawn: has joined #ruby
[05:47:31] Sero_: has joined #ruby
[05:47:40] Sembei: has joined #ruby
[05:50:49] chagel: has joined #ruby
[05:51:44] siaW: has joined #ruby
[05:53:20] quazimodo: has joined #ruby
[05:54:00] quazimodo: is there a simple way to create a digested identifier for a hash or array with nested hashes/arrays
[05:54:27] quazimodo: should I just serialize the data and run something like md5 digest on that ?
[05:55:48] chagel: has joined #ruby
[05:56:15] pawnbox: has joined #ruby
[05:56:15] quazimodo: yeah i guess so
[05:57:11] blackmesa: has joined #ruby
[05:58:14] davedev24: has joined #ruby
[05:58:48] tvw: has joined #ruby
[06:00:07] havenwood: quazimodo: do you need it to be stable across invocations or implementations? if not you might consider Object#hash: http://ruby-doc.org/core/Object.html#method-i-hash
[06:05:55] astrobun_: has joined #ruby
[06:06:51] Nawn: Hey guys, I'm trying to practice my recursion on the initial Project Euler problems. I understand how recursion works, but I'm having troubles debugging my code. It's giving me a result of 10Mil, when it should be around 4.6Mil according to some internet searches. My code: https://gist.github.com/Nawn/a1dbf22df7dec7a748e2
[06:07:04] quazimodo: havenwood: i'll look into it
[06:07:12] quazimodo: yes stable across invocations
[06:07:18] halfamind: has joined #ruby
[06:07:44] quazimodo: i want to get users filter preferences from a web connection as a json object and store it in db, passing the digest back up
[06:07:53] dionysus69: has joined #ruby
[06:08:05] quazimodo: they hold onto the digest in the query string and can share the link with arbitrary filters applied
[06:08:35] quazimodo: if the server gets some filters passed to it, it'll first digest those and see if the record already exists, if not it creates it
[06:09:55] liquid-silence: has joined #ruby
[06:09:55] liquid-silence: has joined #ruby
[06:10:30] quazimodo: havenwood: seems like Object.hash isn't so stable
[06:10:42] quazimodo: I'll Marshal.dump into Digest
[06:11:49] Macaveli: has joined #ruby
[06:13:52] mozzarella: Nawn: which problem is it?
[06:14:36] Nawn: adding up the even numbers of the Fibanacci sequence up to 4,000,000
[06:16:41] chagel: has joined #ruby
[06:16:52] kalopsian: has joined #ruby
[06:16:53] siaW: has joined #ruby
[06:19:45] siaW: has joined #ruby
[06:20:54] havenwood: Nawn: you're very close
[06:21:00] Nawn: Okay, just updated the git
[06:21:16] Nawn: back to where it says the 10316619
[06:21:23] Nawn: it was giving me an error before :P hadn't realized
[06:21:43] Nawn: I'm not very familiar with recursion, so I don't know where to start debugging
[06:21:50] havenwood: Nawn: ponder the details of this line: https://gist.github.com/Nawn/a1dbf22df7dec7a748e2#file-even_fibs-rb-L27
[06:22:37] rmulligan: has joined #ruby
[06:23:43] Nawn: Yeah, I'd imagine if we continue to go up the fib sequence, we'll eventually hit a 4,000,000 mark, and that's where we stop creating stacks, right? and then go back, and add them up?
[06:23:44] ziyadb: has joined #ruby
[06:25:53] tAn: has joined #ruby
[06:26:21] ur5us: has joined #ruby
[06:28:17] danielwzd: has joined #ruby
[06:28:39] Nawn: I don't understand what the error is Dx
[06:29:18] vdamewood: has joined #ruby
[06:29:58] RegulationD: has joined #ruby
[06:30:01] chagel: has joined #ruby
[06:31:15] havenwood: Nawn: What if #even_fibs took a second argument that was `sum`?
[06:32:29] poerror: has joined #ruby
[06:34:43] havenwood: Nawn: And then `sum` instead of `fib_num` as the return value `if fib_num > 4_000_000`.
[06:35:03] chagel: has joined #ruby
[06:35:22] bronson: has joined #ruby
[06:36:03] Nawn: Okay, what I just updated to, worked
[06:36:10] Nawn: What caused that?
[06:36:19] Nawn: why was it giving me the wrong input? :o
[06:37:15] havenwood: Nawn: It was giving you the last fib_num (the largest fibonacci seq number under 4 mil) before.
[06:37:46] havenwood: Nawn: You've updated it to properly pass the sum along, and return the sum of all fib_nums instead of just the last one.
[06:39:48] havenwood: Nawn: A nit that happens to not matter, but "whose values do not exceed four million" would allow four million exactly so > rather than >=.
[06:40:11] chagel: has joined #ruby
[06:40:43] havenwood: Since that last one would still need to get added to the sum if it was a fib.
[06:41:19] Nawn: I think I understand.
[06:41:42] blt: has joined #ruby
[06:42:05] havenwood: Nawn: Get rid of all the returns other than the two early returns. :)
[06:42:54] havenwood: Nawn: Just lines 27 and 30 aren't already implicitly returned if you remove the explicit `return`.
[06:44:00] havenwood: Nawn: A shorthand nicety in Ruby for `fib_num % 2 == 0` is `fib_num.even?`.
[06:44:29] dog3521: has joined #ruby
[06:45:16] ur5us: has joined #ruby
[06:45:58] dog3521: has left #ruby: ()
[06:47:19] havenwood: Nawn: Another suggestion would be seeing what it would be like to not use `+=` with `sum` and instead pass a second `sum` argument everywhere you use #even_fibs.
[06:49:36] _wreet: has joined #ruby
[06:49:44] havenwood: Nawn: And if you have success then consider how you could do the same for `n` with no `+=`.
[06:51:29] ur5us: has joined #ruby
[06:52:13] frustrum: has joined #ruby
[06:52:24] Nawn: Something like that?
[06:52:42] rnda: has joined #ruby
[06:53:32] Uber|Dragon: has joined #ruby
[06:57:18] CloCkWeRX: has joined #ruby
[06:59:11] davedev24: has joined #ruby
[06:59:13] atmosx: has joined #ruby
[07:04:01] Rahul_Roy: has joined #ruby
[07:05:15] solars: has joined #ruby
[07:07:20] JohnBat26: has joined #ruby
[07:07:45] last_staff: has joined #ruby
[07:09:49] solars: can anyone tell me which IDEs support ruby refactoring?
[07:09:54] scepticulous: has joined #ruby
[07:10:35] havenwood: solars: JetBrains RubyMine is one.
[07:11:51] emilkarl: has joined #ruby
[07:11:58] nocontrol: has joined #ruby
[07:12:51] scepticulous: has joined #ruby
[07:13:23] moei: has joined #ruby
[07:13:26] rmulligan: has joined #ruby
[07:15:46] htmldrum: has joined #ruby
[07:16:01] moeabdol: has joined #ruby
[07:16:13] codecop: has joined #ruby
[07:16:14] codecop_: has joined #ruby
[07:16:22] solars: havenwood, I'll have a look, thanks
[07:17:38] kalopsian: has joined #ruby
[07:18:59] rigel_: has joined #ruby
[07:18:59] cibs: has joined #ruby
[07:19:29] rigel_: how can i use ri to look up documentation on ruby keywords?
[07:20:00] Asher: has joined #ruby
[07:21:01] ReK2: has joined #ruby
[07:21:02] ReK2: has joined #ruby
[07:21:13] U7se6: has joined #ruby
[07:21:55] tjbiddle: has joined #ruby
[07:23:56] Nuck: has joined #ruby
[07:24:59] jwang: has joined #ruby
[07:25:27] djbkd: has joined #ruby
[07:25:29] romain_t: has joined #ruby
[07:25:55] tubulife-: has joined #ruby
[07:26:15] bruce_lee: has joined #ruby
[07:26:43] apeiros: wow, a full 2min of patience.
[07:27:09] tAn: has joined #ruby
[07:27:47] blackmesa: has joined #ruby
[07:29:05] lxsameer: has joined #ruby
[07:29:06] lxsameer: has joined #ruby
[07:29:47] ferr: has joined #ruby
[07:29:53] norc: has joined #ruby
[07:30:48] RegulationD: has joined #ruby
[07:31:32] SG045734: has joined #ruby
[07:32:30] liquid-silence: has joined #ruby
[07:32:31] liquid-silence: has joined #ruby
[07:33:26] norc: Ox0dea: Can you explain to me the story behind VALUE?
[07:36:29] bronson: has joined #ruby
[07:36:45] shevy: once upon a time, the ruby devs sat together to create VALUE
[07:36:49] shevy: and there was much rejoicing!
[07:37:04] shevy: for six days they feasted upon the lambs... and the cows... and the
[07:37:11] hahuang61: has joined #ruby
[07:37:21] firstdayonthejob: has joined #ruby
[07:39:15] vdamewood: has joined #ruby
[07:41:41] rdark: has joined #ruby
[07:41:50] pawnbox: has joined #ruby
[07:42:13] jud: has joined #ruby
[07:42:18] troulouliou_div2: has joined #ruby
[07:43:15] Chagel_: has joined #ruby
[07:43:28] davee_: has joined #ruby
[07:43:34] nocontrol: when I select a web server, can I go with Puma alone ?
[07:43:47] astrobun_: has joined #ruby
[07:43:57] nocontrol: I mean that If you run Puma as a service, there is no need for nginx and complicated setups
[07:44:02] htmldrum: has joined #ruby
[07:44:14] davedev24: has joined #ruby
[07:44:20] nocontrol: why should you do so ? Why should you choose to setup nginx with puma together ?
[07:45:17] agit0: has joined #ruby
[07:46:24] norc: nocontrol: One reason might be TLS termination, or some form of load balancing through nginx.
[07:46:45] nocontrol: norc: but puma supports workers also
[07:46:51] nocontrol: isn't it the same thing ?
[07:47:19] norc: nocontrol: Well you might want to balance between multiple nodes across servers.
[07:47:24] nocontrol: and why do you need to use both ? Why do people use them both instead of just using nginx ?
[07:47:36] norc: There is so many reasons why you might want to have an nginx in front. What do you want yourself?
[07:47:53] norc: Are we talking about Rails?
[07:48:01] nocontrol: I used foreman to extract to systemd where I use my Procfile and puma
[07:48:25] nocontrol: so in every restart/reboot puma runs as a service
[07:48:51] nocontrol: and I don't see anything that is missing right now, meaning that the web page is served successfully and there are no problems
[07:48:58] skade: has joined #ruby
[07:49:20] nocontrol: this is a very low traffic website for internal use or local (vagrant) ones
[07:49:59] norc: nocontrol: In that case you still might want an nginx in front for TLS termination.
[07:50:23] norc: If you do not care about secure communication in the slightest you could ditch nginx entirely easing up deployment.
[07:50:37] pawnbox: has joined #ruby
[07:50:37] norc: This is what we do as well (we use unicorn though).
[07:52:13] nocontrol: norc: IF I understand well you're talking about SSL certificates and https ?
[07:52:22] norc: Well TLS, but yes.
[07:52:24] nocontrol: I guess puma doesn't support them
[07:52:33] nocontrol: haven't thought about that
[07:52:51] nocontrol: so nginx/apache need puma/passenger/unicorn to serve ruby files ?
[07:52:57] nocontrol: starting to make sense
[07:53:29] norc: nocontrol: Not sure about Puma honestly. We just use unicorn internally. :)
[07:53:34] theRealAlexz: has joined #ruby
[07:53:48] norc: And we have Apache2 TLS termination proxies for the applications for historic reasons.
[07:54:00] merida: has joined #ruby
[07:54:25] nocontrol: norc: thanks, it really makes sense
[07:56:04] norc: nocontrol: The moment that you have scalability concerns you do not get around a properly setup nginx+puma or nginx+passenger setup though, so keep that in mind.
[07:57:18] cibs: has joined #ruby
[07:57:23] bricker: has joined #ruby
[07:57:58] pawnbox: has joined #ruby
[08:02:38] Macaveli: has joined #ruby
[08:03:00] poerror: has joined #ruby
[08:03:22] astrobun_: has joined #ruby
[08:03:49] Macaveli: has joined #ruby
[08:04:41] kirillzh: has joined #ruby
[08:06:54] DoubleMalt: has joined #ruby
[08:08:52] htmldrum: has joined #ruby
[08:08:55] aufi: has joined #ruby
[08:08:56] rmulligan: has joined #ruby
[08:09:04] djbkd: has joined #ruby
[08:09:16] futilegames: has joined #ruby
[08:09:33] ur5us: has joined #ruby
[08:11:12] jenrzzz: has joined #ruby
[08:11:56] jaruga: has joined #ruby
[08:13:00] nocontrol: norc: got it
[08:13:20] TomyWork: has joined #ruby
[08:14:22] jas02: has joined #ruby
[08:17:13] moeabdol: has joined #ruby
[08:18:10] rkazak: has joined #ruby
[08:19:13] Axy: has joined #ruby
[08:19:16] aganov: has joined #ruby
[08:19:36] scepticulous: has joined #ruby
[08:22:34] quazimodo: has joined #ruby
[08:29:50] SCHAAP137: has joined #ruby
[08:32:45] mrgrieves: has joined #ruby
[08:33:12] terlar: has joined #ruby
[08:34:07] firstdayonthejob: has joined #ruby
[08:34:10] baweaver: has joined #ruby
[08:37:12] siaW: has joined #ruby
[08:38:40] jas02: has joined #ruby
[08:40:49] liquid-silence: has joined #ruby
[08:40:49] liquid-silence: has joined #ruby
[08:41:38] igam: has joined #ruby
[08:41:39] Uber|Dragon: has joined #ruby
[08:43:00] rkazak: has joined #ruby
[08:43:05] RickHull: has joined #ruby
[08:43:07] Gadgetoid: has joined #ruby
[08:43:09] duderonomy: has joined #ruby
[08:43:34] ReK2: has joined #ruby
[08:43:34] ReK2: has joined #ruby
[08:44:29] pawnbox: has joined #ruby
[08:45:22] romain_t: has joined #ruby
[08:47:24] bluOxigen: has joined #ruby
[08:47:28] jenrzzz: has joined #ruby
[08:50:07] platzhirsch: has joined #ruby
[08:51:41] mfaeh: has joined #ruby
[08:51:59] MyMind: has joined #ruby
[08:52:56] haraoka: has joined #ruby
[08:52:59] d0nn1e: has joined #ruby
[08:53:51] Couch: has joined #ruby
[08:54:26] marr: has joined #ruby
[08:54:43] biberu: has joined #ruby
[08:55:21] frustrum: has joined #ruby
[08:57:46] Cohedrin: has joined #ruby
[08:57:48] blackmesa: has joined #ruby
[08:59:01] gbgdev: has joined #ruby
[08:59:31] merida: has joined #ruby
[09:02:29] cpup: has joined #ruby
[09:02:50] ur5us: has joined #ruby
[09:03:07] rmulligan: has joined #ruby
[09:05:50] kalopsian: has joined #ruby
[09:10:31] tjbiddle: has joined #ruby
[09:10:55] tvw: has joined #ruby
[09:12:10] terlar: has joined #ruby
[09:12:13] roshanavand: has joined #ruby
[09:12:20] victor_: has joined #ruby
[09:12:36] quazimodo: has joined #ruby
[09:13:15] victor_: '我能输入中文'
[09:13:52] amincd: has joined #ruby
[09:13:53] bigmac_: has joined #ruby
[09:14:30] amincd: Could someone kindly explain the hash.each_key { |value| block } in number 13 in the Ruby reference: http://ruby-doc.org/core-2.2.0/Hash.html#method-i-each_key
[09:14:37] amincd: how do you pass the value?
[09:14:56] amincd: sorry, here: http://www.tutorialspoint.com/ruby/ruby_hashes.htm
[09:14:59] Ishido: has joined #ruby
[09:15:18] jas02: has left #ruby: ()
[09:15:29] amincd: I'm guessing that's an error, and they meant to write hash.each_value..?
[09:16:22] drptbl: has joined #ruby
[09:16:35] mrgrieve1: has joined #ruby
[09:17:03] apeiros: each_key yields the keys of course, not the values.
[09:17:11] apeiros: and as I told you before - use the official docs.
[09:17:22] victor_: value is the key
[09:17:25] roshanavand: has joined #ruby
[09:18:18] nofxx: has joined #ruby
[09:18:57] amincd: apeiros: ok, I'll switch to the official doc
[09:19:56] Uo9er_: has joined #ruby
[09:21:23] platzhirsch: has left #ruby: ()
[09:22:27] krz: has joined #ruby
[09:23:16] davee_: has joined #ruby
[09:27:16] gbgdev: has joined #ruby
[09:28:00] tao_: has joined #ruby
[09:31:56] RegulationD: has joined #ruby
[09:32:46] astrobun_: has joined #ruby
[09:33:02] tubulife-: has joined #ruby
[09:33:28] poerror: has joined #ruby
[09:35:50] hackeron_: has joined #ruby
[09:36:09] chagel: has joined #ruby
[09:37:42] GioVdK: has joined #ruby
[09:39:15] hahuang61: has joined #ruby
[09:39:15] bronson: has joined #ruby
[09:39:39] uglybandersnatch: has joined #ruby
[09:43:57] roshanavand: has joined #ruby
[09:45:01] quazimodo: has joined #ruby
[09:46:23] zapata: has joined #ruby
[09:47:19] charlemagne: has joined #ruby
[09:48:59] charlemagne: has joined #ruby
[09:49:14] hightower3: has joined #ruby
[09:49:22] amundj: has joined #ruby
[09:51:30] andrewvos: has joined #ruby
[09:51:40] lurch_: has joined #ruby
[09:52:30] lurch_: hi, is there a way to have .to_yaml not generate single quotes when the value in the hash is a string containing only numbers? eg: { "a" => "5" }.to_yaml
[09:52:42] platzhirsch: has joined #ruby
[09:52:50] lurch_: if i use a nun-numeric character it outputs the yaml without the quoting: { "a" => "5x" }.to_yaml
[09:53:39] apeiros: >> require 'yaml'; { "a" => 5}.to_yaml
[09:53:40] ruby[bot]: apeiros: # => "---\na: 5\n" (https://eval.in/537992)
[09:53:42] norc: lurch_: You could .map the Hash first to coerce such strings into numbers.
[09:53:50] apeiros: lurch_: no quotes means it's an integer, not a string. so no.
[09:53:50] norc: That is, fixnums.
[09:54:35] lurch_: apeiros, i'm talking about the resulting yaml.. in the first case -> a: '5' , in the second case -> a: 5x
[09:54:54] apeiros: lurch_: yes, and I'm telling you a: 5 and a: '5' in yaml has a different meaning
[09:55:18] TheHodge: has joined #ruby
[09:55:40] apeiros: without quotes it's not a string. so either you have to make up your mind whether your value is a string or an integer, or you'll have to accept that it needs quoting.
[09:56:47] triggerwarning: has joined #ruby
[09:57:31] arlek: has joined #ruby
[09:59:07] kron4eg: has joined #ruby
[09:59:10] bricker: has joined #ruby
[09:59:12] kron4eg: has left #ruby: ()
[09:59:49] rmulligan: has joined #ruby
[09:59:49] bqscott: has joined #ruby
[10:01:01] charlemagne: has joined #ruby
[10:04:09] triggerwarning: has left #ruby: ("probably kicked")
[10:06:42] krz: has joined #ruby
[10:07:51] jds: has joined #ruby
[10:09:19] s00pcan_: has joined #ruby
[10:10:38] roshanavand: has joined #ruby
[10:11:50] drptbl: has joined #ruby
[10:13:24] graffix: has joined #ruby
[10:19:40] jaiks: has joined #ruby
[10:20:55] Suntzu: has joined #ruby
[10:22:53] andrewvos: has joined #ruby
[10:24:38] norc: apeiros: Interesting. So I just learned that NTH_REF (i.e. $1, $2, ...) works only until INT_MAX>>2 to INT_MAX>>1 (depending on whether long is larger than int) ..
[10:25:05] norc: Which also explains why on some architectures my problem could not be reproduced.
[10:25:17] apeiros: ah, regex capture globals?
[10:25:30] apeiros: interesting inconsistency
[10:25:47] apeiros: ACTION meanwhile tries to beat oracle + oci8 into submission
[10:26:02] norc: No, they are not globals.
[10:26:05] adgtl: has joined #ruby
[10:26:18] apeiros: but they look like globals and are listed as such
[10:26:34] apeiros: actually… are they listed with global_variables?
[10:26:40] norc: apeiros: Hah, did you know the recent AR adapter introduced a bug that randomly causes connection losses?
[10:26:48] apeiros: >> "foo" =~ /(.)(.)(.)/; global_variables
[10:26:50] ruby[bot]: apeiros: # => [:$;, :$-F, :$@, :$!, :$SAFE, :$~, :$&, :$`, :$', :$+, :$=, :$KCODE, :$-K, :$,, :$/, :$-0, :$\, :$_, ...check link for more (https://eval.in/538013)
[10:26:54] norc: They should not because they are actually called SVARs
[10:26:59] apeiros: >> "foo" =~ /(.)(.)(.)/; global_variables.grep(/\d/)
[10:27:00] ruby[bot]: apeiros: # => [:$-0, :$0, :$1, :$2, :$3, :$4, :$5, :$6, :$7, :$8, :$9] (https://eval.in/538014)
[10:27:12] apeiros: looks like they are
[10:27:19] apeiros: maybe fake entries
[10:27:27] norc: "foo" =~ /(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)/; global_variables.grep(/\d/)
[10:27:30] norc: >> "foo" =~ /(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)/; global_variables.grep(/\d/)
[10:27:31] ruby[bot]: norc: # => [:$-0, :$0, :$1, :$2, :$3, :$4, :$5, :$6, :$7, :$8, :$9] (https://eval.in/538015)
[10:27:33] apeiros: norc: nope, didn't know
[10:27:35] norc: Looks like fake entries.
[10:28:04] norc: apeiros: Im close to switching over to jruby now, just have to test the activerecord jdbc adapter first. :)
[10:28:11] norc: Hopefully that will solve many headaches.
[10:28:30] apeiros: did you know that AR::Model.create > 1.4x plsql.table > 10x OCI8#parse + bind_params + exec_array?
[10:28:41] apeiros: and let me tell you that the last one is an effing pain to work with
[10:28:56] norc: Can you rephrase that statement?
[10:29:05] zarubin: has joined #ruby
[10:29:22] apeiros: I first had: MyModel.create!(columns.zip(values)), it took 700s for ~160k records
[10:29:45] apeiros: I then moved to: plsql.my_model_table.insert_values(columns, *records)), that took ~500s
[10:30:12] p1k: has joined #ruby
[10:30:19] chagel: has joined #ruby
[10:30:54] norc: That sounds awfully slow.
[10:31:00] workmad3: has joined #ruby
[10:31:08] apeiros: and now I use: insert = OCI8.parse("INSERT INTO …"); (1..cols).zip(types, records.transpose) do |pos, type, values| insert.bind_param_array(pos, values, type) end; insert.exec_array
[10:31:12] apeiros: and that takes ~50s
[10:31:12] zarubin: has joined #ruby
[10:31:19] apeiros: it is. horribly. slow.
[10:31:24] norc: I would expect this to complete in the ballbark of maybe 20 seconds.
[10:31:29] apeiros: I'm pretty sure pg's COPY would take <5s
[10:31:48] norc: You would have to have a really special database for that to work *that* fast.
[10:31:52] apeiros: at least iirc it took <1s for 10k records when I tested
[10:32:02] apeiros: COPY is crazy fast
[10:32:30] norc: Oh, wait you mean in a single transaction.
[10:32:34] norc: mm yeah.
[10:32:50] apeiros: it's a seeding operation. in total it's 1mio records I seed. ~300MB of data.
[10:32:54] apeiros: IMO should be IO bound.
[10:33:06] marr: has joined #ruby
[10:33:08] codecop: has joined #ruby
[10:33:12] codecop_: has joined #ruby
[10:33:13] apeiros: especially when doing it over the network.
[10:33:18] zarubin: has joined #ruby
[10:33:19] p1k: why is <array>.slice(<num>) a thing ? isn't it the same as <array>[idx] and surprising that .slice can return a non-array value ?
[10:33:46] tubulife-: has joined #ruby
[10:33:46] apeiros: p1k: for the same reason that ruby has tons of other aliases.
[10:34:04] apeiros: (I know, not really an answer)
[10:34:13] zarubin: has joined #ruby
[10:35:19] baweaver: has joined #ruby
[10:35:21] norc: p1k: Actually Array#[] is the more special thing because it does not follow the regular method syntax. ;-)
[10:36:01] crayfishx: So, I can use 'respond_to?' to see if an object contains a certain method - is there anyway to dig a little deeper to check how many arguments the method takes?
[10:36:13] norc: crayfishx: Yes.
[10:36:20] norc: &Method#arity
[10:36:22] norc: &ri Method#arity
[10:36:23] `derpy: http://ruby-doc.org/core-2.3.0/Method.html#method-i-arity
[10:36:40] norc: crayfishx: well respond_to does not check whether the *object* contains a method.
[10:36:45] norc: Modules and classes have methods.
[10:36:50] apeiros: crayfishx: note, it's not reliable
[10:36:54] norc: It tells you whether an object responds to that method.
[10:37:02] apeiros: plenty of methods will simply report -1, because they're implemented in C
[10:37:12] apeiros: (and didn't bother to properly declare how many args they take)
[10:37:16] norc: (Which means itself, its singleton class, or any other class or module in its inheritance chain has that method available)
[10:37:46] crayfishx: In my scenario I think its ok - I need to import dynamic code (plugins) and the host app needs to determine whether or not a certain method exists (respond_to?) and if so whether or not to pass an argument hash to it
[10:37:57] p1k: norc: that's not really correct :[] is a method
[10:38:10] apeiros: crayfishx: IMO introspection is a brittle way to do that.
[10:38:15] norc: p1k: It absolutely is.
[10:39:21] mikecmpbll: has joined #ruby
[10:39:33] p1k: I guess you could say it's an exact alias since [a..b] and [a]
[10:39:42] zarubin: has joined #ruby
[10:40:13] norc: p1k: I would not call it an alias, but 2 separate methods bound to the same underlying C function.
[10:42:04] norc: (Reason is Im really not sure how aliases work under the hood and what possible implications they have)
[10:42:09] gbgdev: has joined #ruby
[10:42:16] snowy: has joined #ruby
[10:43:30] FooMunki: has joined #ruby
[10:44:08] norc: p1k: My point was just that its a special production rule in the grammar that allows for AREF/ASET calls. Beyond that they are just regular methods, like you said. :)
[10:45:11] crayfishx: arity seems to be what I'm after - thanks
[10:46:00] norc: apeiros: But yeah, the activerecord oracle enhanced adapter is kind of meh.
[10:46:21] norc: Especially annoying are the tons of column conversions you have to do.
[10:46:52] norc: (Though I do not know how many of my problems are related to the fact that we are still running on 11gr2)
[10:47:04] slakevc: has joined #ruby
[10:47:31] slakevc: has joined #ruby
[10:47:52] liquid-silence: has joined #ruby
[10:47:52] liquid-silence: has joined #ruby
[10:50:54] s00pcan: has joined #ruby
[10:51:53] chagel: has joined #ruby
[10:52:01] tamole: has joined #ruby
[10:53:58] kalopsian: has joined #ruby
[10:54:31] rmulligan: has joined #ruby
[10:56:09] siaW: has joined #ruby
[10:56:54] frustrum: has joined #ruby
[10:57:12] last_staff: has joined #ruby
[10:58:05] andrewvos: has joined #ruby
[10:58:12] kam270: has joined #ruby
[10:58:15] pawnbox: has joined #ruby
[10:59:26] basic: has joined #ruby
[10:59:50] s00pcan: has joined #ruby
[11:00:39] tesuji: has joined #ruby
[11:02:01] vondruch__: has joined #ruby
[11:02:26] vondruch: has joined #ruby
[11:03:12] Xentil: has joined #ruby
[11:04:00] poerror: has joined #ruby
[11:04:30] rodfersou: has joined #ruby
[11:05:49] ziyadb: has joined #ruby
[11:06:46] snowy: has joined #ruby
[11:06:53] stannard: has joined #ruby
[11:08:49] sepp2k: has joined #ruby
[11:10:56] Macaveli: has joined #ruby
[11:12:08] Macaveli: has joined #ruby
[11:12:59] spiman: has joined #ruby
[11:16:37] A124: has joined #ruby
[11:19:36] BSaboia: has joined #ruby
[11:19:50] pawnbox: has joined #ruby
[11:19:57] U7se6: has joined #ruby
[11:22:21] withnale: has joined #ruby
[11:22:35] Suntzu: has joined #ruby
[11:24:19] n008f4g_: has joined #ruby
[11:24:56] catphish: has joined #ruby
[11:25:03] spiman_: has joined #ruby
[11:26:15] catphish: does ruby by any chance have a single operator that says "set variable to value if value is truthy", ie "variable = value if value" or "variable = value || variable"
[11:26:59] crdpink: has joined #ruby
[11:28:18] workmad3: catphish: it does not
[11:28:29] catphish: that's a shame, thanks :)
[11:30:27] rbennacer: has joined #ruby
[11:31:07] mwlang: has joined #ruby
[11:31:39] TvL: has joined #ruby
[11:32:46] trinaldi: has joined #ruby
[11:33:38] RegulationD: has joined #ruby
[11:35:33] deavid: has joined #ruby
[11:36:27] s00pcan_: has joined #ruby
[11:36:51] GioVdK: has joined #ruby
[11:36:54] ldnunes: has joined #ruby
[11:37:26] noway_: has joined #ruby
[11:39:06] sdothum: has joined #ruby
[11:39:26] Marsupermammal: has joined #ruby
[11:39:51] johnmilton: has joined #ruby
[11:41:13] bronson: has joined #ruby
[11:42:20] Stan: has joined #ruby
[11:44:59] Spami: has joined #ruby
[11:46:41] withnale: has joined #ruby
[11:48:01] stannard: has joined #ruby
[11:48:03] rmulligan: has joined #ruby
[11:48:44] silverdust: has joined #ruby
[11:49:12] silverdust: What does !~ mean? I saw this: foo !~ some_regex
[11:49:26] bougyman: regex negation
[11:49:34] bougyman: foo does_not_match <regex>
[11:49:43] silverdust: i.e must not match
[11:50:10] Xeago: has joined #ruby
[11:51:21] charlema_: has joined #ruby
[11:51:37] woodruffw: has joined #ruby
[11:52:05] hxegon: has joined #ruby
[11:52:47] poerror: has joined #ruby
[11:55:14] Shaboum: has joined #ruby
[11:56:32] stannard: has joined #ruby
[11:58:07] dondonai: has joined #ruby
[11:58:34] shevy: #ruby - where the experts sit!
[12:00:27] Snowy_: has joined #ruby
[12:02:12] bricker: has joined #ruby
[12:03:03] Abrin_AWAY: has joined #ruby
[12:03:08] skade: has joined #ruby
[12:04:05] kam270: has joined #ruby
[12:04:27] poerror: has joined #ruby
[12:04:46] bkxd: has joined #ruby
[12:04:47] tubulife-: has joined #ruby
[12:06:07] unshadow: has joined #ruby
[12:06:20] kam270: has joined #ruby
[12:06:53] duckpuppy: has joined #ruby
[12:08:36] kam270: has joined #ruby
[12:09:07] unshadow: Hi all, Does anyone has experience with ANN (Artifical Neural Networks) on Ruby ?
[12:09:43] victor_: has joined #ruby
[12:10:23] kam270: has joined #ruby
[12:11:02] synthroid: has joined #ruby
[12:11:10] guest805: has joined #ruby
[12:11:14] tobiasvl: unshadow: is this related to AlphaGo? :)
[12:12:13] kam270: has joined #ruby
[12:12:57] Xeago: has joined #ruby
[12:12:58] Vlat-: https://www.dropbox.com/s/nb2dmfeedaxj5n9/12814614_1141124669231381_7754070935785631503_n.jpg?dl=0
[12:12:59] unshadow: tobiasvl: Related in the sense that both are using some forms of Artificial Intelegence ;)
[12:13:09] reprazent: has joined #ruby
[12:13:21] tobiasvl: hehe, yeah, just wondering if that's what inspired you to check out ANNs
[12:13:27] tobiasvl: I have no experience with it unfortunately
[12:13:27] htmldrum_: has joined #ruby
[12:13:53] kam270: has joined #ruby
[12:13:53] andikr: has joined #ruby
[12:14:32] unshadow: Oh no, tobiasvl I'm working on an Opensource project that uses ANN to identify web based security attacks using pattern learning. just wondered if there is someone I can ask a few more indepth questions
[12:15:17] reprazent: has joined #ruby
[12:16:07] kam270: has joined #ruby
[12:19:10] ruid: has joined #ruby
[12:19:57] graffix: has joined #ruby
[12:20:36] shevy: unshadow I think you my be the first to bring up this topic here on #ruby in the last 3 years!
[12:21:33] unshadow: shevy: Really ? I thought this is kinda "hot tech" right now with all the new AI shananigns going on
[12:22:38] shevy: dunno... I use ruby mostly just for boring, simple tasks that can be automated. AI sounds pretty advanced
[12:22:43] halfamind: has joined #ruby
[12:22:49] godzillaenlacasa: has joined #ruby
[12:23:12] unshadow: shevy: You can check out the proj on Github, it's really is pretty cool I guess :) https://github.com/bararchy/ruby-ann-webattack-filtering
[12:24:01] dondonai: has left #ruby: ()
[12:25:03] resin: has joined #ruby
[12:26:08] jottr: has joined #ruby
[12:27:37] unshadow: shevy: But I see what you're getting at, it seems that Ruby has become the Go-to languge for scripts and web (ROR etc..) instead of a full featured multi purposed languge it is really.
[12:28:06] tomatoes: has joined #ruby
[12:28:57] shevy: well it depends on where or how you use it of course
[12:29:05] shevy: I would not know where to begin with AI, regardless of the language :)
[12:29:36] shevy: but you are right... I really could not tell you anyone who uses ruby and AI... perhaps some japanese devs who happily describe their projects in japanese only :D
[12:29:47] guest805: has joined #ruby
[12:31:55] guest8051: has joined #ruby
[12:32:05] sonOfRa: has joined #ruby
[12:32:54] vondruch_: has joined #ruby
[12:33:00] tubuliferous: has joined #ruby
[12:33:19] vondruch_: has joined #ruby
[12:33:22] guest8052: has joined #ruby
[12:33:27] tknz: has joined #ruby
[12:34:34] RegulationD: has joined #ruby
[12:36:11] baweaver: has joined #ruby
[12:37:09] poerror: has joined #ruby
[12:37:47] unshadow: Well, the company I work at is using Ruby in a lot of different ways, we have a Reverse Proxy built using Ruby, including SSL Stripping and URL Re-Write. we also have an automation server that accepts files, save them to a Linux container and scans them using multiple tools. all in pure Ruby.
[12:38:10] unshadow: So I guess it really dependes what your programmers like to use XD
[12:38:40] norc: unshadow: Ruby is a full featured multi purpose language.
[12:40:27] norc: unshadow: And Ruby 3.0 will hopefully remove some of the larger performance constraints making it more suitable to a wide variety of problems.
[12:41:23] unshadow: norc: I really do wish it too, really waiting for the JIT to be added
[12:42:08] kalopsian: has joined #ruby
[12:42:15] bronson: has joined #ruby
[12:42:20] rmulligan: has joined #ruby
[12:45:01] norc: unshadow: The thing about languages though is often libraries. When picking a language, often a deciding factor is availability of adequate libraries to speed up development. Ruby on Rails is the major reason why Ruby has this "web" feeling when browsing rubygems.
[12:46:17] norc: Simply because it attracted a lot of web developers to Ruby.
[12:46:20] guest805: has joined #ruby
[12:46:53] SG045734: has joined #ruby
[12:46:58] tjvc: has joined #ruby
[12:48:27] roobienoobie: has joined #ruby
[12:48:50] unshadow: norc: Makes sense, though there are lots of gems out there, I usually find everything i'm looking for as a gem, NTLM, SSH, ANN, SSL etc.. I really enjoy having lower level aspects of programming accecable even though I use "high" languge like Ruby
[12:50:17] charlemagne: has joined #ruby
[12:51:06] norc: unshadow: To me though the main aspect behind Ruby is the ease of writing with frameworks like rspec or any other that you might prefer.
[12:51:11] norc: writing *tests.
[12:51:42] norc: We have such extensive testing suites that you can do large aspects of Rails development without ever opening your browser for months.
[12:52:39] tamole: has joined #ruby
[12:53:17] norc: And its amazing how seamlessly and effortlessly things like vcr with webmock can help there.
[12:53:28] scepticulous: has joined #ruby
[12:53:42] GioVdK: has joined #ruby
[12:57:12] chagel: has joined #ruby
[12:57:14] zotherstupidguy: has joined #ruby
[12:57:32] terlar: has joined #ruby
[12:57:37] griffindy: has joined #ruby
[12:57:47] frustrum: has joined #ruby
[13:00:43] Sero: has joined #ruby
[13:01:37] Xeago: has joined #ruby
[13:02:25] howi: has joined #ruby
[13:02:37] vise890: has joined #ruby
[13:02:43] aegis3121: has joined #ruby
[13:02:56] howi: good day. does anyone know what happened to the 'ping' module that was in standard library back in 1.8.7?
[13:03:22] stannard: has joined #ruby
[13:06:21] FooMunki: has joined #ruby
[13:07:31] shevy: we lost ping?!
[13:07:40] shevy: who is the guilty party!
[13:08:00] shevy: here is the old one http://ruby-doc.org/stdlib-1.8.7/libdoc/ping/rdoc/Ping.html
[13:08:23] howi: i haven't found any information on why it is dropped
[13:08:29] howi: so wondering what happened
[13:08:43] shevy: no idea either but we will find out who is the killer of pinger!
[13:09:00] igam: Dolphins ate ping.
[13:09:28] Macaveli: has joined #ruby
[13:09:36] unshadow: https://rubygems.org/gems/net-ping/versions/1.7.8
[13:09:45] unshadow: The net-ping library provides a ping interface for Ruby. It includes separate TCP, HTTP, LDAP, ICMP, UDP, WMI (for Windows) and external ping classes.
[13:10:34] rickmasta: has joined #ruby
[13:10:44] andrewvos: has joined #ruby
[13:11:25] kalopsian: has joined #ruby
[13:11:42] Didac: has joined #ruby
[13:11:53] mfaeh: has joined #ruby
[13:12:27] pawnbox: has joined #ruby
[13:13:28] bruce_lee: has joined #ruby
[13:13:28] bruce_lee: has joined #ruby
[13:14:05] mistermocha: has joined #ruby
[13:14:31] aryaching: has joined #ruby
[13:18:16] howi: has left #ruby: ()
[13:19:53] Uo9er_: has joined #ruby
[13:19:57] tAn: has joined #ruby
[13:21:53] zotherstupidguy: thats from 2006? http://on-ruby.blogspot.com.br/2006/05/why-ping-is-not-acceptable-ping.html :)
[13:22:41] pawnbox: has joined #ruby
[13:23:06] quazimodo: has joined #ruby
[13:23:10] halfamind: has joined #ruby
[13:24:12] Guest34101: has joined #ruby
[13:25:13] adgtl: has joined #ruby
[13:25:14] adgtl: has joined #ruby
[13:25:28] joonty: has joined #ruby
[13:26:48] nocontrol: has joined #ruby
[13:27:39] crystal77: has joined #ruby
[13:28:49] withnale: has left #ruby: ("Be back later ...")
[13:30:53] MuffinPimp: has joined #ruby
[13:30:58] ChiefAlexander: has joined #ruby
[13:31:25] malconis: has joined #ruby
[13:33:33] guest8051: has joined #ruby
[13:33:46] tubuliferous: has joined #ruby
[13:33:54] hahuang65: has joined #ruby
[13:34:23] cpup: has joined #ruby
[13:35:34] decoponio: has joined #ruby
[13:35:58] tAn: has joined #ruby
[13:35:58] IrishGringo: has joined #ruby
[13:36:28] rmulligan: has joined #ruby
[13:36:58] tAn: has joined #ruby
[13:38:39] nocontrol: has joined #ruby
[13:39:38] steffkes: has joined #ruby
[13:41:31] nocontrol: has joined #ruby
[13:41:49] bkxd: has joined #ruby
[13:43:13] stannard: has joined #ruby
[13:43:41] roshanavand: has joined #ruby
[13:44:00] swills: has joined #ruby
[13:44:56] cpup: has joined #ruby
[13:45:05] n1colas: has joined #ruby
[13:45:17] tamole: has joined #ruby
[13:46:04] Meow-J: has joined #ruby
[13:48:57] n008f4g_: has joined #ruby
[13:50:06] zacts: has joined #ruby
[13:51:35] xaxisx: has joined #ruby
[13:52:54] dgncn: has joined #ruby
[13:53:37] shevy: zotherstupidguy the ancient days!
[13:53:44] shevy: when the dinosaur still ruled the planet
[13:53:50] shevy: they would have used ruby, I am sure of that
[13:54:06] griffindy: has joined #ruby
[13:54:35] krz: has joined #ruby
[13:56:12] grill: has joined #ruby
[13:56:44] techietrash: has joined #ruby
[13:57:16] techietrash_: has joined #ruby
[13:57:20] kalopsian: has joined #ruby
[13:57:39] quazimodo: has joined #ruby
[13:57:44] paultreny: has joined #ruby
[13:57:58] Xeago: has joined #ruby
[13:58:57] _stu_: has joined #ruby
[13:59:46] whippythellama: has joined #ruby
[14:00:27] nfk|laptop: has joined #ruby
[14:00:39] techietrash_: has left #ruby: ()
[14:00:51] andrewvos: has joined #ruby
[14:02:12] tamole: has joined #ruby
[14:02:17] IrishGringo: has joined #ruby
[14:02:27] graffix: has joined #ruby
[14:03:59] bricker: has joined #ruby
[14:05:20] idle_task: has joined #ruby
[14:06:48] shevy: http://stackoverflow.com/research/developer-survey-2016#star-wars-vs-star-trek
[14:06:57] shevy: the older ones prefer star trek :)
[14:08:09] Infra-Red: has joined #ruby
[14:08:16] cdg: has joined #ruby
[14:08:30] tjvc: has joined #ruby
[14:10:27] shevy: http://stackoverflow.com/research/developer-survey-2016#technology-development-environments - ultimate editor war
[14:10:38] shevy: ruby does not come out in this survey that well :(
[14:11:36] victor_: has joined #ruby
[14:12:01] axl_: has joined #ruby
[14:12:54] al2o3-cr: notepad++ at top, wtf
[14:13:22] oddmunds: shevy: i think it has a lot to do with stackoverflow
[14:13:30] oddmunds: it has never been a "ruby place"
[14:13:42] shevy: you are probably right
[14:14:19] oddmunds: it seems like it filled a void when it comes to .net tech
[14:14:52] oddmunds: while ruby has (at least since before stackoverflow) had an active community
[14:15:14] oddmunds: .net has been a "buy a course", "get a certificate", "buy support" kind of world
[14:15:33] tvw: has joined #ruby
[14:15:35] havenwood: why require_relative when you can require_relative_with_tco?!
[14:15:38] havenwood: https://gist.github.com/havenwood/3c5a5e1476c811460992
[14:16:23] p1k: has joined #ruby
[14:16:44] workmad3: havenwood: wouldn't that be relative to CWD rather than to the file `require_relative` is in?
[14:17:16] workmad3: havenwood: otherwise, fun stuff :)
[14:17:17] havenwood: workmad3: I may not have thought things through, was late last night ;)
[14:17:56] cpup: has joined #ruby
[14:18:04] havenwood: workmad3: mmm
[14:18:35] n008f4g_: has joined #ruby
[14:20:27] norc: havenwood: actual behaviour aside, I like the thought.
[14:23:11] workmad3: havenwood: it would be kinda fun if `require` and `require_relative` took a second argument of a hash of options to RubyVM for a require :)
[14:24:00] halfamind1: has joined #ruby
[14:24:05] havenwood: workmad3: and then more than one require per require! https://gist.github.com/havenwood/2339554
[14:24:10] frustrum: has joined #ruby
[14:25:33] daivyk: has joined #ruby
[14:27:24] Hanmac: havenwood: didnt shevy want to make a "everything" gem? so you can do: requires 'everything' XD
[14:28:02] berserk_ren: has joined #ruby
[14:28:16] havenwood: hanmac: and then an every_version_of_everything gem for when you're really bored
[14:28:49] havenwood: i guess one version per gem is traditional
[14:29:01] havenwood: random_version_of_each_gem then
[14:30:11] shevy: hanmac haha yeah ... but I am not sure how serious I was... I think I once tried to just re-package all gems into a standalone gem, or perhaps on a per-program thing so that everything is bundled into one and distributed as that. I remember that 2 years ago, it was kinda silly to have to do a batch "gem install name" when I could just put everything into a single .gem anyway
[14:30:28] xaxisx: has joined #ruby
[14:30:31] paultreny_: has joined #ruby
[14:30:37] rmulligan: has joined #ruby
[14:30:37] bricker: has joined #ruby
[14:30:56] adaedra: If only we had a way of installing all gem dependencies at once
[14:32:07] unshadow: TBH a require 'lib/*' will be awsome :)
[14:32:07] joast: has joined #ruby
[14:32:21] mallu: has joined #ruby
[14:32:22] Gasher: has joined #ruby
[14:32:38] halfamind: has joined #ruby
[14:33:28] BSaboia: has joined #ruby
[14:35:53] jgpawletko: has joined #ruby
[14:36:09] RegulationD: has joined #ruby
[14:36:10] uglybandersnatch: has joined #ruby
[14:36:45] y0da: has joined #ruby
[14:36:50] baweaver: has joined #ruby
[14:37:00] techietrash: has joined #ruby
[14:37:05] moeabdol: has joined #ruby
[14:39:40] paultreny_: has joined #ruby
[14:40:54] shpoont: has joined #ruby
[14:41:23] polishdub: has joined #ruby
[14:41:51] Sero: has joined #ruby
[14:42:20] crowell: has joined #ruby
[14:42:20] crowell: has joined #ruby
[14:42:28] dionysus69: has joined #ruby
[14:42:48] lxsameer: has joined #ruby
[14:42:57] bkxd: has joined #ruby
[14:43:34] shevy: I put the gems into a subdir and required them from there
[14:45:22] rippa: has joined #ruby
[14:47:15] deavid: has joined #ruby
[14:47:21] andrewvos: has joined #ruby
[14:49:46] weemsledeux: has joined #ruby
[14:50:28] bricker: has joined #ruby
[14:51:41] slawrence00: has joined #ruby
[14:51:58] catphish: has left #ruby: ("Leaving")
[14:52:20] xaxisx: has joined #ruby
[14:52:27] slackbotgz: has joined #ruby
[14:53:24] freakcoder: has joined #ruby
[14:55:17] mostlybadfly: has joined #ruby
[14:55:23] DmitryBochkarev: has joined #ruby
[14:56:14] charlemagne: has joined #ruby
[14:59:17] ChiefAlexander: has joined #ruby
[15:00:55] subosito: has joined #ruby
[15:01:27] ixti: has joined #ruby
[15:01:31] johnny56: has joined #ruby
[15:01:32] VeryBewitching: has joined #ruby
[15:01:46] aegis3121: has joined #ruby
[15:01:48] diegoviola: has joined #ruby
[15:03:24] dhollinger: has joined #ruby
[15:03:32] tAn: has joined #ruby
[15:03:49] Vlat-: has joined #ruby
[15:04:26] D9: has joined #ruby
[15:04:57] tubuliferous: has joined #ruby
[15:06:21] fostertheweb: has joined #ruby
[15:07:10] jyaworski: has joined #ruby
[15:07:28] jds: has joined #ruby
[15:07:55] crystal77: has joined #ruby
[15:10:31] rkazak: has joined #ruby
[15:10:43] Karix: has joined #ruby
[15:12:19] x77686d: has joined #ruby
[15:13:09] gbgdev: has joined #ruby
[15:17:24] techietrash: has joined #ruby
[15:17:49] whippythellama: has joined #ruby
[15:17:54] paultreny: has joined #ruby
[15:18:31] subosito: has joined #ruby
[15:18:46] but3k4: has joined #ruby
[15:18:51] subosito: has joined #ruby
[15:19:39] haylon: has joined #ruby
[15:21:01] y0da: has joined #ruby
[15:21:42] n008f4g_: has joined #ruby
[15:21:58] Guest42570: has joined #ruby
[15:22:02] techietrash: has joined #ruby
[15:23:01] krz: has joined #ruby
[15:23:32] davedev24: has joined #ruby
[15:23:53] nano-: drbrain: Can I generate a .gem from rdoc @ github? I'm a non native speaker when it comes to ruby and its echo system.
[15:24:03] nano-: s/echo/eco/
[15:24:04] pawnbox: has joined #ruby
[15:24:23] mistermocha: has joined #ruby
[15:24:29] bezhermoso: has joined #ruby
[15:24:35] rmulligan: has joined #ruby
[15:24:46] Papierkorb: I'm looking for web frameworks which I can use to *embed* a web interface into an existing ruby (cli) application. Currently looking at Sinatra, which after some fiddling plays nice, but are there other notable frameworks?
[15:24:57] Guest34101: has joined #ruby
[15:25:06] blandflakes: has joined #ruby
[15:25:23] Papierkorb: @Sinatra, I disliked how hard it was to mount a controller (Which itself is a Sinatra::Base sub-class) at a given path from another Base sub-class.
[15:25:25] VeryBewitching: Papierkorb: Afaik, Sinatra probably is best.
[15:26:14] VeryBewitching: You could just use Rack though, that's an option.
[15:26:22] adaedra: I was going to say that
[15:26:32] adaedra: But it requires more work
[15:26:43] shpoont: has joined #ruby
[15:27:58] TvL2386: has joined #ruby
[15:28:52] PedramT: has joined #ruby
[15:29:30] cdg: has joined #ruby
[15:31:08] mistermocha: has joined #ruby
[15:31:35] havenwood: Papierkorb: Give Roda a look!
[15:32:13] havenwood: Papierkorb: https://github.com/jeremyevans/roda
[15:32:33] Papierkorb: havenwood: will do, ty
[15:32:49] subosito: @Papierkorb while I recommend sinatra as well, but you can also take a look at Cuba http://cuba.is/
[15:33:30] ddv: comunist framework
[15:34:02] callen92: has joined #ruby
[15:34:06] havenwood: Roda started as a fork of Cuba and adds some Sinatra style niceties as well as a plugin system for composing your framework: https://github.com/jeremyevans/roda/tree/master/lib/roda/plugins
[15:35:25] havenwood: http://roda.jeremyevans.net/documentation.html
[15:35:46] havenwood: ^ plugins by category
[15:36:23] havenwood: Papierkorb: Then just pair it with Sequel (maintained by the Roda creator) and you're good to go! ;)
[15:36:30] nanoz: has joined #ruby
[15:36:36] Papierkorb: I love Sequel, so that's a plus!
[15:36:52] shevy: Roda ... Cuba ... Yoda!
[15:37:03] bronson: has joined #ruby
[15:37:14] havenwood: Jeremy Evans if often around in the #roda channel. Best. Maintainer. Ever.
[15:37:19] shredding: has joined #ruby
[15:37:20] subosito: ddv haha, sounds like a poor naming?
[15:37:40] ddv: he's a communist :P
[15:38:04] krz: has joined #ruby
[15:38:30] havenwood: Papierkorb: But other than the plugins, all of Roda lives in this one file. I think it and the plugins are worth a read and it's really been lovely to use.
[15:38:36] havenwood: https://github.com/jeremyevans/roda/blob/master/lib/roda.rb
[15:40:00] whippythellama: has joined #ruby
[15:40:02] pawnbox: has joined #ruby
[15:40:06] steffkes: has joined #ruby
[15:40:18] techietrash: has joined #ruby
[15:40:48] paultreny: has joined #ruby
[15:40:50] nando293921: has joined #ruby
[15:41:59] wreet: has joined #ruby
[15:41:59] wreet: has joined #ruby
[15:42:03] andrewvos: has joined #ruby
[15:43:52] bkxd: has joined #ruby
[15:45:49] D9: has joined #ruby
[15:46:17] shpoont: has joined #ruby
[15:47:21] spintronic: has joined #ruby
[15:47:26] Sot: has joined #ruby
[15:48:01] marxarelli: has joined #ruby
[15:48:14] Sot: How/where can I store an environment variable so that it's automatically loaded into a ruby script?
[15:48:50] Sot: I was thinking into bash_profile (on a mac osx)
[15:49:14] Sot: export API_KEY = "12345"
[15:49:35] Sot: then test.rb, puts ENV["API_KEY"] should load that..
[15:50:20] eurialo: has joined #ruby
[15:51:00] bluOxigen: has joined #ruby
[15:51:10] davedev24: has joined #ruby
[15:51:46] Guest11199: has joined #ruby
[15:52:22] jrafanie: has joined #ruby
[15:52:41] havenwood: Sot: Sounds good. Does that work for what you're doing?
[15:53:13] Papierkorb: Sot: you can also modify your ~/.bashrc
[15:53:26] Sot: havenwood: I got it like...
[15:53:27] Sot: require 'dotenv'
[15:53:27] Sot: Dotenv.load
[15:53:41] Sot: I have a .env in the same directory with the env vars
[15:53:42] baweaver: has joined #ruby
[15:53:46] Sot: its loads them all into ENV
[15:55:32] manveru: Sot: direnv
[15:55:56] JakFrist: has joined #ruby
[15:56:09] tvw: has joined #ruby
[15:57:03] gbgdev: has joined #ruby
[15:57:41] mistermocha: has joined #ruby
[15:58:30] mistermocha: has joined #ruby
[16:03:11] stunder001: has joined #ruby
[16:03:43] tamole: has joined #ruby
[16:03:50] djbkd: has joined #ruby
[16:05:15] sepp2k: has joined #ruby
[16:07:32] janzo: has joined #ruby
[16:07:36] urbanmonk: has joined #ruby
[16:08:11] seitensei: has joined #ruby
[16:09:02] LastGabs: has joined #ruby
[16:09:42] benlieb: has joined #ruby
[16:09:52] spintronic_: has joined #ruby
[16:10:16] amclain: has joined #ruby
[16:10:25] freakcoder: has joined #ruby
[16:12:27] pietr0: has joined #ruby
[16:13:02] victor_: has joined #ruby
[16:13:12] adgtl: has joined #ruby
[16:13:12] adgtl: has joined #ruby
[16:13:33] marr: has joined #ruby
[16:13:45] spintronic_: has joined #ruby
[16:14:46] subosito: has joined #ruby
[16:15:01] sucks: has joined #ruby
[16:18:17] [Butch]: has joined #ruby
[16:18:41] djbkd_: has joined #ruby
[16:18:44] rmulligan: has joined #ruby
[16:18:59] PedramT: has joined #ruby
[16:20:25] maner: has joined #ruby
[16:20:47] poerror: has joined #ruby
[16:20:49] PedramT: has joined #ruby
[16:21:57] havenwood: workmad3: Looking at this after having had coffee it seems it's already using relative path to the working directory via #absolute_path.
[16:22:09] tubuliferous: has joined #ruby
[16:22:46] havenwood: "Relative paths are referenced from the current working directory of the process unless dir_string is given, in which case it will be used as the starting point."
[16:23:21] havenwood: workmad3: Testing seems to confirm. Am I missing something?
[16:24:03] rapha: how do you make https://gist.github.com/sixtyfive/1fa72e586673b4532d3d work so that the file doesn't contain the character codes, but the characters themselves?
[16:25:10] apeiros: rapha: you use double quotes instead of single quotes.
[16:26:25] dopamean_: has joined #ruby
[16:26:55] tamole: has joined #ruby
[16:27:17] rapha: Thank you apeiros! :)
[16:28:36] apeiros: rapha: ruby 101, single quotes only escape \\ and \'
[16:28:59] apeiros: and don't do interpolation
[16:29:00] KensoDev: has joined #ruby
[16:30:04] RIK: I have a default install of Sequel ... and it's complaining that it can't find the sqlite3 adapter.
[16:30:10] RIK: i have no idea why
[16:30:28] Maletor: has joined #ruby
[16:30:40] zast: has joined #ruby
[16:31:20] hightower2: has joined #ruby
[16:31:27] rkazak: has joined #ruby
[16:31:33] mistermocha: has joined #ruby
[16:31:35] fostertheweb: has joined #ruby
[16:32:12] tomchapin: has joined #ruby
[16:32:14] rapha: apeiros: That's why I thought I'd have to use single quotes :8
[16:32:26] apeiros: that… makes no sense?
[16:32:33] rapha: yes i understand that now
[16:33:00] rapha: the \uXXX stuff confused me
[16:33:17] mleung: has joined #ruby
[16:34:13] Dreamer3: has joined #ruby
[16:34:19] apeiros: rapha: DIACRITICS.each {|d| f.write("#{d}\t\n") # do you want that trailing tab?
[16:34:59] pawnbox: has joined #ruby
[16:35:02] apeiros: oh… actually… you write every single character with a trailing tab on its own line
[16:35:42] Guest5: has joined #ruby
[16:35:42] apeiros: I somehow doubt that's what you intend to do. take a look at both IO#puts and Array#join
[16:36:13] zacts: hi rubyists
[16:36:18] Dreamer3: has joined #ruby
[16:37:14] RegulationD: has joined #ruby
[16:37:18] pawnbox: has joined #ruby
[16:38:00] shpoont: has joined #ruby
[16:38:40] mattwashere: has joined #ruby
[16:39:47] crystal77: has joined #ruby
[16:40:03] workmad3: havenwood: `require_relative` is relative to the file it's in, not the working directory
[16:40:13] manveru: rik: install the sqlite3 gem
[16:40:15] avenj: has joined #ruby
[16:40:23] bigkevmcd: has joined #ruby
[16:40:42] workmad3: havenwood: i.e. it's not the same as `require "./foobar"` which would be relative to CWD
[16:41:20] avenj: has joined #ruby
[16:41:37] manveru: ACTION should start the use-require-relative-everywhere initiative
[16:41:47] workmad3: manveru: please no :(
[16:41:49] wilbert: has joined #ruby
[16:42:04] WebDawg: has joined #ruby
[16:42:06] steffkes: has joined #ruby
[16:42:09] shinnya: has joined #ruby
[16:42:24] manveru: well, not everywhere, but at least within libraries
[16:42:30] workmad3: manveru: still, please no
[16:42:33] apeiros: would be an improvement over that fugly require + File.expand_path + __FILE__ shit I see sometimes
[16:42:39] apeiros: but still nope. nope. nope. nope.
[16:43:02] manveru: what's the reason to search 300 locations just to stumble over the file in the same directory...
[16:43:06] zacts: so with ruby is it better to use as many gems as possible to not duplicate work, or is it better to stay minimalist and only use what you need?
[16:43:22] agit0: has joined #ruby
[16:43:44] kriskropd: has joined #ruby
[16:43:45] apeiros: manveru: that ruby has to search at all is an optimization problem. where to look for files is a connaisance problem.
[16:43:50] roshanavand: has joined #ruby
[16:43:52] apeiros: and not the business of the file to know.
[16:43:55] shevy: zacts the fewer dependencies on gems the better, but some gems are more important than others, like either those that are very very basic or those that do a lot of useful things
[16:44:00] workmad3: manveru: `require` fixes the location of a single file (the file you're requiring). `require_relative` fixes the location of two files (the current file and the file you're requiring)
[16:44:46] d0nn1e: has joined #ruby
[16:44:49] manveru: require depends on the contents of your environment and the file you're requiring, require_relative only on the location of two files :P
[16:45:14] apeiros: require makes it a business of your app to know where stuff is.
[16:45:25] apeiros: require_relative makes it a business of the requiring file to know where stuff is.
[16:45:29] drbrain: nano-: rake package
[16:45:44] zacts: shevy: ah ok, cool thanks
[16:45:56] manveru: apeiros: i don't mean to require whole libraries with require_relative
[16:46:05] manveru: you just use require for the initial one
[16:46:06] apeiros: how does that matter?
[16:46:19] manveru: that way libraries are always self-contained
[16:46:19] synthroid: has joined #ruby
[16:47:19] manveru: going to the other extreme ends with rails... where nobody knows where a file was actually required
[16:48:14] manveru: if i try to strace a rails app, i have to wait 5 minutes until it finally is done looking for files :P
[16:49:07] rapha: apeiros: sorry, was already back at the code. yes, that trailing tab plus newline is exactly what i wanted. The file will become a replacement table, but I'll have to write the replacement characters manually behind the tabs. Just wanted to spare myself the work of having to press "tab" on each line.
[16:49:26] manveru: and startup would be significantly faster if requiring was O(1) instead of O($:.size)
[16:49:26] apeiros: rapha: ah, ok. carry on then ;-)
[16:49:31] Guest5: has joined #ruby
[16:49:47] apeiros: manveru: as said, that's an optimization problem. and yeah, that part is IMO regrettable about ruby.
[16:50:08] workmad3: manveru: require_relative is still O(n) btw... as it needs to check $LOADED_FEATURES still to ensure that the file hasn't been previously required
[16:50:20] manveru: workmad3: but without I/O
[16:50:23] apeiros: workmad3: that should be O(1) with a Set
[16:50:41] apeiros: (and back to optimization problems)
[16:50:49] manveru: and yeah, i think $" is already optimized quite a bit since 1.9 or so
[16:50:54] bronson: has joined #ruby
[16:50:57] manveru: used to be much worse
[16:50:59] apeiros: for every problem of slow code there's a fast solution which is wrong.
[16:51:24] manveru: you just have to choose which part of the solution you want right
[16:51:56] manveru: anyway, it's moot for me to talk about it, since nobody will ever listen anyway
[16:52:13] apeiros: and I'm moving to zeroload for my stuff anyway.
[16:52:23] apeiros: the private stuff, that is.
[16:52:25] manveru: what's a zeroload?
[16:52:46] apeiros: you call it in the root module, it autoloads the rest of your library.
[16:53:04] apeiros: and yes, that means it's somewhat similar to require_relative :)
[16:53:13] apeiros: ACTION doesn't see any irony there.
[16:53:27] bigkevmcd: has joined #ruby
[16:53:36] manveru: well, that sounds like a good compromise
[16:53:46] Macaveli: has joined #ruby
[16:53:46] apeiros: the hard part is that it breaks with all conventions
[16:53:54] apeiros: you do lib/Foo/BarBaz.rb for Foo::BarBaz
[16:54:08] apeiros: but IME it's totally worth it.
[16:54:13] manveru: so it does the module_missing shit?
[16:54:21] apeiros: it uses Kernel#autoload
[16:54:35] apeiros: which has the advantage that all code is fully explorable, unlike rails
[16:54:41] manveru: wasn't that supposed to be deprecated like a decade ago?
[16:54:43] apeiros: i.e. all constants will be there even if the file wasn't loaded.
[16:55:04] apeiros: yeah, that situation isn't fully cleared. but it's no longer thread-unsave.
[16:55:18] manveru: that's something :)
[16:55:22] apeiros: which was the reason to deprecate it. so I guess that's no longer the case. it just has never been said explicitly.
[16:55:33] workmad3: apeiros: nice, how did they solve that issue with it?
[16:56:16] roshanavand: has joined #ruby
[16:56:30] apeiros: workmad3: no idea. iirc when I tried to do that the main problem was toplevel code like "loop do … end"
[16:56:41] apeiros: without that, it'd be simple
[16:57:20] apeiros: I guess they made the loading two-step. thread-safely register that the file is being loaded.
[16:57:22] apeiros: rest doesn't matter much.
[16:57:42] Xeago: has joined #ruby
[16:58:25] rnda: has joined #ruby
[16:59:03] Marsupermammal: has joined #ruby
[16:59:29] manveru: well, zeroload sounds like fun, but how about they add a snake_case to CamelCase convention :)
[16:59:35] griffindy: has joined #ruby
[17:00:02] manveru: then it might actually catch on
[17:00:19] guest805: has joined #ruby
[17:00:29] manveru: though require_relative isn't used by autoload anyway, so it's a two-folded issue still
[17:00:32] agit0: has joined #ruby
[17:00:35] apeiros: I'll let perfect be the enemy of good here ;-)
[17:01:01] apeiros: well, zerload frees you from using require other than requiring your root file.
[17:01:43] wreet: has joined #ruby
[17:02:38] Xeago: has joined #ruby
[17:03:02] bronson: has joined #ruby
[17:03:17] workmad3: apeiros: just found the patch thread for it... it's interesting, basically they have to delay the replacement of an autoloaded constant with a module until after the autoload finishes (the old situation was that when you had `module Foobar; blah blah blah; end` and Foobar was autoloaded, the constant was replaced immediately upon seeing that first `module Foobar`)
[17:03:32] workmad3: s/module/value
[17:04:04] tubuliferous: has joined #ruby
[17:04:33] workmad3: so nowhere near as simple as just a mutex... nice that it got resolved, no idea how I missed it for 3 years :/
[17:04:34] baweaver: has joined #ruby
[17:04:53] symm-: has joined #ruby
[17:06:17] SenpaiSilver: has joined #ruby
[17:07:29] choke: has joined #ruby
[17:10:13] drbrain: it wasn't much announced
[17:12:51] rmulligan: has joined #ruby
[17:13:41] jaruga_: has joined #ruby
[17:14:02] shpoont: has joined #ruby
[17:14:19] jmarinelli: has joined #ruby
[17:16:50] RIK: manveru: thanks. i found that, a little while after i typed. i appreciate the confirmation that i didn't find the wrong solution.
[17:19:54] elcontrastador: has joined #ruby
[17:20:05] JakFrist: has joined #ruby
[17:20:29] adgtl: has joined #ruby
[17:23:01] davedev24: has joined #ruby
[17:27:21] Guest34101: has joined #ruby
[17:27:29] Xeago: has joined #ruby
[17:27:48] steffkes: has joined #ruby
[17:29:58] fostertheweb: has joined #ruby
[17:31:50] SCHAAP137: has joined #ruby
[17:32:23] siaW: has joined #ruby
[17:33:45] shpoont: has joined #ruby
[17:34:02] kirillzh: has joined #ruby
[17:34:34] benlieb: has joined #ruby
[17:35:03] nando293921: has joined #ruby
[17:35:20] choke: has joined #ruby
[17:35:47] PedramT: has joined #ruby
[17:37:37] Xeago: has joined #ruby
[17:38:19] tomatoes: has joined #ruby
[17:39:40] adgtl: has joined #ruby
[17:39:41] adgtl: has joined #ruby
[17:40:10] PedramT: has joined #ruby
[17:44:14] techietrash: has joined #ruby
[17:44:43] bkxd: has joined #ruby
[17:44:59] rnda: has joined #ruby
[17:45:24] Xeago: has joined #ruby
[17:45:43] poerror: has joined #ruby
[17:45:52] _djbkd: has joined #ruby
[17:45:55] moeabdol: has joined #ruby
[17:47:00] kirillzh: has joined #ruby
[17:47:42] ruby-lang567: has joined #ruby
[17:49:37] CasBaIT: has joined #ruby
[17:50:03] xdcdhl: has joined #ruby
[17:50:59] babblebre: has joined #ruby
[17:53:28] `tim`: has joined #ruby
[17:53:52] chouhoulis: has joined #ruby
[17:54:24] ascarter: has joined #ruby
[17:55:09] pragmatism: has joined #ruby
[17:57:31] rmulligan: has joined #ruby
[18:01:04] nofxx: has joined #ruby
[18:01:04] nofxx: has joined #ruby
[18:01:11] agit0: has joined #ruby
[18:02:00] joonty: has joined #ruby
[18:03:49] atmosx: has joined #ruby
[18:04:19] yqt: has joined #ruby
[18:04:31] bronson: has joined #ruby
[18:05:48] bricker: has joined #ruby
[18:06:44] fmcgeough: has joined #ruby
[18:06:48] davee_: has joined #ruby
[18:07:04] mikecmpbll: has joined #ruby
[18:07:35] jaruga: has joined #ruby
[18:08:13] jaruga: has joined #ruby
[18:08:17] roshanavand: has joined #ruby
[18:10:27] ChiefAlexander: has joined #ruby
[18:11:09] openstruct: has joined #ruby
[18:11:16] havenwood: workmad3: ah, right, thanks! i'll fix.
[18:11:45] tamole: has joined #ruby
[18:12:28] baweaver: has joined #ruby
[18:14:31] victor_: has joined #ruby
[18:14:42] nogic: has joined #ruby
[18:15:25] nogic: has joined #ruby
[18:16:36] iWaffles: has joined #ruby
[18:16:53] Guest4184______: has joined #ruby
[18:18:08] y2mq37: has joined #ruby
[18:18:51] intrigueD: has joined #ruby
[18:19:42] tubuliferous: has joined #ruby
[18:20:50] gizmore: has joined #ruby
[18:21:33] ascarter: has joined #ruby
[18:24:48] iwmrby: has joined #ruby
[18:24:49] jgt: has joined #ruby
[18:26:10] arlek: has joined #ruby
[18:27:29] pawnbox: has joined #ruby
[18:28:17] adgtl: has joined #ruby
[18:28:19] adgtl: has joined #ruby
[18:28:32] bronson: has joined #ruby
[18:29:00] baweaver: has joined #ruby
[18:29:43] aibot: has joined #ruby
[18:30:44] last_staff: has joined #ruby
[18:31:34] aibot: has joined #ruby
[18:34:00] pawnbox: has joined #ruby
[18:35:41] Guest34101: has joined #ruby
[18:35:48] platzhirsch: has left #ruby: ()
[18:37:25] darkf: has joined #ruby
[18:38:03] uglybandersnatch: has joined #ruby
[18:38:52] RegulationD: has joined #ruby
[18:39:24] tubuliferous: has joined #ruby
[18:40:27] freerobby: has joined #ruby
[18:40:36] AlexRussia: has joined #ruby
[18:40:41] strongcode: if I have a helper method `parse_html` that I want to use in both an instance method and a class method of the same class, what is the cleanest way to go about doing that?
[18:41:03] strongcode: make parse_html() an instance method and have both call it with Foo.parse_html() ?
[18:42:23] zarubin: has joined #ruby
[18:42:41] techietrash: has joined #ruby
[18:43:29] apeiros: &ri Module#module_function strongcode
[18:43:29] `derpy: strongcode: http://ruby-doc.org/core-2.3.0/Module.html#method-i-module_function
[18:43:57] aeterne: has joined #ruby
[18:45:08] strongcode: Excellent, thank you!
[18:45:22] aibot: has joined #ruby
[18:45:45] ghormoon: has joined #ruby
[18:46:04] halfamind: has joined #ruby
[18:46:26] tamole: has joined #ruby
[18:46:32] adaedra: ACTION pats the bot
[18:48:12] aibot: has joined #ruby
[18:48:47] firstdayonthejob: has joined #ruby
[18:50:03] zarubin: has joined #ruby
[18:50:11] treehug88: has joined #ruby
[18:50:46] washt: has joined #ruby
[18:52:13] fullofcaffeine: has joined #ruby
[18:56:13] _wreet: has joined #ruby
[18:56:56] baweaver: has joined #ruby
[18:56:59] aibot: has joined #ruby
[18:57:00] Abrin_AWAY2: has joined #ruby
[18:57:34] ixti: has joined #ruby
[18:58:57] Abrin_AWAY3: has joined #ruby
[18:59:58] sneakerhax: has joined #ruby
[19:00:30] wreet: has joined #ruby
[19:00:30] yqt: has joined #ruby
[19:02:33] intrigueD: has joined #ruby
[19:02:48] Blaguvest: has joined #ruby
[19:04:05] zarubin: has joined #ruby
[19:04:18] _whitelogger: has joined #ruby
[19:04:51] kirillzh: has joined #ruby
[19:08:39] tAn: has joined #ruby
[19:10:53] atmosx: has joined #ruby
[19:12:01] LastGabs: has joined #ruby
[19:13:11] LoneHerm_: has joined #ruby
[19:13:20] ruby-lang061: has joined #ruby
[19:14:44] Mon_Ouie: has joined #ruby
[19:15:19] ruby-lang061: anyone have a clue on how I can get from these \ud83d\ude03 javascript escape sequencese to the 😃 character in ruby?
[19:15:49] apeiros: >> "\ud83d\ude03" # @ ruby-lang061
[19:15:50] ruby[bot]: apeiros: I'm terribly sorry, I could not evaluate your code because of an error: Curl::Err::HostResolutionError:Couldn't resolve host name
[19:16:00] ruby[bot]: apeiros: I'm terribly sorry, I could not evaluate your code because of an error: Curl::Err::HostResolutionError:Couldn't resolve host name
[19:17:01] apeiros: well ruby-lang061, try it in pry/irb
[19:17:40] DexterLB: has joined #ruby
[19:18:54] ruby-lang061: apeiros: what exactly should I try? just doing "\ud83d\ude03" in irb returns "\xED\xA0\xBD\xED\xB8\x83"
[19:19:27] apeiros: ruby-lang061: then you either don't use a utf-8 terminal or your settings are wrong
[19:19:42] apeiros: the string's encoding should be 'utf-8'
[19:19:57] apeiros: what's the result of "".encoding ?
[19:20:30] ruby-lang061: apeiros: that returns #<Encoding:UTF-8>
[19:21:17] apeiros: ok, then it's probably your terminal or something else.
[19:22:26] ruby-lang061: apeiros: the hex values in that string are utf-16 code points and somehow they should be converted to the smiley
[19:22:38] ruby-lang061: see https://r12a.github.io/apps/conversion/
[19:22:58] freakcoder: has joined #ruby
[19:23:08] `tim`: has joined #ruby
[19:23:20] _djbkd: has joined #ruby
[19:23:46] adaedra: ruby-lang061: what does `echo ${TERM}, ${LANG}` outputs in your shell?
[19:23:49] skweek: has joined #ruby
[19:24:03] aswen: has joined #ruby
[19:24:52] Macaveli: has joined #ruby
[19:25:03] apeiros: ruby-lang061: the hex is the binary representation. is your terminal utf-8 capable? also what's $stdout.external_encoding ?
[19:25:20] ruby-lang061: adaedra: => "xterm-256color, en_US.UTF-8\n"
[19:25:39] adaedra: close enough
[19:25:47] ruby-lang061: using ruby 2.2.2
[19:25:47] apeiros: that part looks sane
[19:25:57] graffix: has joined #ruby
[19:26:35] baweaver: has joined #ruby
[19:26:39] ruby-lang061: apeiros: terminal is utf-8 capable I can even insert that smile in irb
[19:27:08] apeiros: and $stdout.external_encoding ?
[19:27:21] Dimik: has joined #ruby
[19:27:26] adaedra: apeiros: tbf, I have the same output.
[19:27:43] ruby-lang061: apeiros: => nil
[19:27:56] apeiros: are you sure the smiley is those two codepoints?
[19:27:59] joonty: has joined #ruby
[19:28:01] jottr_: has joined #ruby
[19:28:05] bronson: has joined #ruby
[19:28:53] freerobby: has joined #ruby
[19:29:19] al2o3-cr: ruby-lang061: [128515, 32].pack('U*') # this will get you a smiley
[19:29:48] lvn: has joined #ruby
[19:29:55] apeiros: maybe you wanted "\u{1F631}"
[19:30:07] ruby-lang061: apeiros: yep, sure that smiley is the to code points. see https://r12a.github.io/apps/conversion/
[19:30:13] poerror: has joined #ruby
[19:30:23] TheCubeLord: ACTION i tried /ame so it does this
[19:30:36] lvn: o thanks cubelord
[19:30:41] TheCubeLord: ACTION cool
[19:30:45] riceandbeans: what do you call ||=
[19:30:47] apeiros: ruby-lang061: I'm not sure what I should see there
[19:31:05] lvn: riceandbeans: or-assignment operator??
[19:31:23] lvn: i don't actually know
[19:31:35] ruby-lang061: apeiros: try putting \ud83d\ude03 in the javascript escapes textbox and press convert
[19:31:45] apeiros: ruby-lang061: I see. you want "\u{1F603}"
[19:31:46] mdw: has joined #ruby
[19:32:05] LoneHermit: has joined #ruby
[19:32:05] apeiros: see U+ notation
[19:32:13] adaedra: can confirm, this one works.
[19:33:19] ruby-lang061: apeiros: indeed that one works, I just need to figure out how to get from \ud83d\ude03 to \u{1F603}
[19:33:24] apeiros: not quite sure how the javascript one works. maybe js can't represent codepoints beyond 2**16
[19:36:22] halfamind: has joined #ruby
[19:37:23] jackjackdripper: has joined #ruby
[19:37:31] jackjackdripper: has joined #ruby
[19:39:52] RegulationD: has joined #ruby
[19:40:29] graffix: has joined #ruby
[19:40:41] SenpaiSilver: has joined #ruby
[19:41:22] blackmesa: has joined #ruby
[19:41:32] bricker: has joined #ruby
[19:41:52] JakFrist: has joined #ruby
[19:42:03] jackjackdripper: has joined #ruby
[19:42:28] baweaver: has joined #ruby
[19:43:15] graffix222: has joined #ruby
[19:43:25] jottr: has joined #ruby
[19:43:57] BTRE: has joined #ruby
[19:44:16] _djbkd: has joined #ruby
[19:45:02] ascarter: has joined #ruby
[19:45:29] bkxd: has joined #ruby
[19:46:13] _djbkd: has joined #ruby
[19:47:53] rattatmatt: has joined #ruby
[19:48:28] baweaver: has joined #ruby
[19:48:53] tvw: has joined #ruby
[19:49:11] norc: has joined #ruby
[19:51:16] PedramT: has joined #ruby
[19:52:19] TheCubeLord: has joined #ruby
[19:52:27] `derpy: adaedra: HEY! Be nice.
[19:52:35] adaedra: oops, wrong window.
[19:52:45] t-ask: has joined #ruby
[19:53:25] kt2: has joined #ruby
[19:53:32] arthurl: has joined #ruby
[19:53:42] tomatoes: has joined #ruby
[19:53:46] t-ask: Hi, I'm about to install ruby2.2 on a VPS. following the pkg dependencies it also installes libgl. but do I really need it on a server?
[19:53:49] arthurl: hi guys- how would i go about upgrading /usr/bin/ruby in this case? https://gist.githubusercontent.com/alyssenko/7cd0a92b76cfa2006939/raw/7f01833656d8897384b0ba7114a356a4702da2b3/gistfile1.txt
[19:54:02] arthurl: sorry /usr/bin/bundle rather
[19:55:01] adaedra: arthurl: what system are you on?
[19:55:14] adaedra: t-ask: does it really matter?
[19:55:24] arthurl: ubuntu 14.04
[19:55:57] adaedra: apt-get update/upgrade or whatever the keyword is?
[19:55:59] TomyLobo: has joined #ruby
[19:56:10] anjen: has joined #ruby
[19:56:24] t-ask: adaedra: well it asks me ti install nvidia or mesa driver versions and I don't know which one the VPS needs. And if Ruby actually doiesn't need it at all why install it :9
[19:56:51] siaW: has left #ruby: ()
[19:56:57] adaedra: It's a dependency, surely a linked library.
[19:57:01] adaedra: In doubt, mesa.
[19:57:14] roshanavand: has joined #ruby
[19:57:33] ChiefAlexander: has joined #ruby
[19:58:46] arthurl: adaedra I'm on ubuntu 14.04
[19:59:07] azmelanar: has joined #ruby
[19:59:10] TomyLobo: mesa also isa gl driva
[19:59:19] adaedra: arthurl: you already said that. Did you see my answer?
[19:59:20] jottr_: has joined #ruby
[19:59:37] shadoi: has joined #ruby
[19:59:54] arthurl: adaedra you mean the apt-get update answer?
[20:00:02] adaedra: arthurl: yes
[20:00:38] adaedra: t-ask: I've got mesa installed on my server too
[20:01:14] rmulligan: has joined #ruby
[20:02:04] t-ask: adaedra: I wonder if gl is needed for websites. I guess, I'm just confused, why I need to install any opengl lib for a website
[20:02:14] slakevc: has joined #ruby
[20:02:31] adaedra: t-ask: either a direct or indirect dependency
[20:03:02] adaedra: fedora's ruby does not seem to pull it tho
[20:05:21] arthurl: adaedra thank you- i didn't even think that was a system package that was installed using apt-get for some reason :)
[20:05:33] arthurl: simple enough - unfortunately it's areadly 'up to date' even though it's not
[20:05:49] adaedra: /usr/bin is usually package manager's territory for Linux
[20:06:13] t-ask: adaedra: thaks, then it is an indirect dep. and I can ask the website/project owner if I need libgl for this website
[20:06:30] arthurl: right- that makes sense
[20:06:35] n008f4g_: has joined #ruby
[20:06:38] adaedra: t-ask: if it's a /required/ dep, you will not get around
[20:06:41] samsee4: has joined #ruby
[20:07:20] adaedra: t-ask: but it's ubuntu; does yours by any chance pulls recommended and/or suggested packages by default?
[20:07:28] t-ask: adaedra: yes, that is what I try to figure out. its an AUR pkg. Sometimes they add deps which aren't needed.
[20:07:30] WebDawg: has joined #ruby
[20:07:49] graffix: has joined #ruby
[20:07:53] adaedra: oh wait, I missed you both
[20:07:54] t-ask: Arch linux USer package
[20:07:57] TheCubeLord: has joined #ruby
[20:08:03] adaedra: you're under Arch?
[20:08:13] t-ask: want to install Diaspora
[20:08:22] spider-mario: has joined #ruby
[20:08:25] adaedra: Will be a bit easier to look then
[20:08:41] cdg: has joined #ruby
[20:08:49] adaedra: Which AUR package, exactly?
[20:09:21] ghormoon: has joined #ruby
[20:09:39] snowy: has joined #ruby
[20:09:42] t-ask: I'm following this wiki https://wiki.archlinux.org/index.php/Diaspora (with Ruby2.2) https://aur.archlinux.org/packages/ruby2.2/ and https://aur.archlinux.org/packages/ruby2.2-bundler/
[20:09:43] samsee4: anyone had luck configuring action cable for rails 4?
[20:10:43] t-ask: adaedra: I used pacaur to install both ruby2.2 pkg
[20:10:46] hahuang65: has joined #ruby
[20:11:06] brendan-: has joined #ruby
[20:11:12] ruby[bot]: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[20:11:33] t-ask: adaedra: it asks me this: https://pastee.org/zj4y
[20:12:13] adaedra: t-ask: mesa would be my choice, no nvidia on a server.
[20:14:35] adaedra: mh, weird tho, mesa-libgl is not required for ruby at all here.
[20:14:40] machinewar: has joined #ruby
[20:14:59] tomchapin: has joined #ruby
[20:15:07] danielwzd: has joined #ruby
[20:15:12] adaedra: “Submitter: jhass” heh.
[20:15:15] machinewar: anyone have suggestions for parsing file with this encoding: ASCII text, with very long lines, with CRLF line terminators
[20:15:19] tubuliferous: has joined #ruby
[20:15:26] machinewar: that was from running file unix utility on it
[20:15:53] machinewar: 'having issue where the header row has more commas then the rest of the rows
[20:16:16] victor_: has joined #ruby
[20:16:43] t-ask: adaedra: yes, that is why I wonder. I a bit concerned that this pkg installs even more indirect deps I actually don't need for Diaspora
[20:17:26] adaedra: that's the thing with dependencies
[20:18:15] KensoDev: has joined #ruby
[20:19:03] adaedra: ruby requires graphviz to be built, which requires pango, which requires cairo, which requires mesa
[20:19:16] t-ask: yes, I might ask the ruby pkg maintainer why
[20:19:54] adaedra: He's in the channel
[20:20:01] slakevc: has joined #ruby
[20:20:05] adaedra: But I guess graphviz is required for some part of the documentation
[20:20:28] adaedra: Anyway, it's a make dependency; you could probably throw it away once done with building.
[20:20:40] danielwzd: has left #ruby: ("Leaving")
[20:20:48] adaedra: Or, if you want to be even cleaner, build the pkg on another machine, and then install only the built package
[20:21:29] pietr0: has joined #ruby
[20:22:00] t-ask: graphviz is an official package. You think that AUR pkg compiles it though
[20:22:26] t-ask: or maybe one of the indirect deps is
[20:22:29] adaedra: no, it requires it installed to be built
[20:22:54] adaedra: https://aur.archlinux.org/packages/ruby2.2/ -> graphviz (make)
[20:22:56] sucks: has joined #ruby
[20:23:26] ready: has joined #ruby
[20:23:33] adaedra: It means that, to build the ruby2.2 package, you need graphviz to be installed, but not to install the built package
[20:24:55] freakcoder1: has joined #ruby
[20:25:59] kith: has joined #ruby
[20:26:34] t-ask: ok then I build it on another machine and install the xz
[20:27:04] t-ask: but would graphviz run without libgl running on the server?
[20:27:55] dgncn: has joined #ruby
[20:28:09] adaedra: If you have a built package from another machine, you don't need graphviz on the server
[20:29:12] minimalism: has joined #ruby
[20:29:28] t-ask: ok, I do it that way. I just want to keep the server as clean as possible
[20:30:18] adaedra: understandable
[20:30:24] ziyadb: has joined #ruby
[20:31:00] adaedra: In that case, building your packages on a dev machine is a good idea; you won't even need base-devel on the server this way.
[20:31:28] pietr0: has joined #ruby
[20:31:41] blackgoat: has joined #ruby
[20:31:58] JakFrist: has joined #ruby
[20:32:18] t-ask: exactly. Better don't provide dev tools on a server .)
[20:32:48] BTRE: has joined #ruby
[20:35:58] yasha_: has joined #ruby
[20:36:05] kies: has joined #ruby
[20:36:15] havenwood: workmad3: finally got a sec to attempt an update: https://gist.github.com/havenwood/3c5a5e1476c811460992/revisions
[20:36:34] slakevc: has left #ruby: ("Leaving")
[20:36:57] sp4rrow: has joined #ruby
[20:38:23] LastGabs: has joined #ruby
[20:39:16] LoneHerm_: has joined #ruby
[20:39:22] blt: has joined #ruby
[20:40:34] diegoviola: has joined #ruby
[20:45:28] Cohedrin: has joined #ruby
[20:45:58] Ox0dea: havenwood: Why the reinclusion of Kernel into Object?
[20:46:57] wilbert: has joined #ruby
[20:47:00] c355E3B: has joined #ruby
[20:47:06] techietrash: has joined #ruby
[20:48:46] choke: has joined #ruby
[20:50:06] jenrzzz: has joined #ruby
[20:51:13] sdwrage: has joined #ruby
[20:53:17] riceandbeans: are the following two equivalent?
[20:53:28] LoneHerm_: has joined #ruby
[20:53:34] symm-: has joined #ruby
[20:53:35] _djbkd: has joined #ruby
[20:53:38] lurch_: has joined #ruby
[20:54:09] riceandbeans: if File.readlines(path).grep(/string/).size > 0
[20:54:42] riceandbeans: if ! File.readlines(path).grep(/string/).empty?
[20:55:13] tobiasvl: riceandbeans: yes
[20:55:38] Radar: no. One uses size > 0 and one uses .empty? with a negative condition
[20:55:43] Radar: </pedant>
[20:55:50] Ox0dea: Valid pedantry, I think.
[20:56:13] pawnbox: has joined #ruby
[20:56:18] steffkes: has joined #ruby
[20:56:21] tobiasvl: valid how? are they not equivalent?
[20:56:53] tobiasvl: !array.empty? == array.size > 0
[20:57:00] riceandbeans: rubocop says, rb:126:9: C: Style/ZeroLengthPredicate: Use !empty? instead of size > 0.
[20:57:31] riceandbeans: I just wanted to make sure if I'm following it's recommendation that it is legitimately the same
[20:58:00] Xeago: has joined #ruby
[20:58:31] Radar: tobiasvl: Depends on if you mean == equivalence or === equivalence or even the fabled ==== equivalence.
[20:58:53] Radar: riceandbeans: Yeah, it's typically better to use !empty?
[20:59:34] riceandbeans: Radar: for clarity, could I also say it this way?
[20:59:48] riceandbeans: if File.readlines(path).grep(/string/).!empty?
[21:00:00] Radar: riceandbeans: No, that won't work
[21:00:06] Radar: riceandbeans: The ! needs to be at the start of the condition
[21:00:14] riceandbeans: ok, just makingsure
[21:00:17] Don_John: has joined #ruby
[21:00:26] M-Technic: has joined #ruby
[21:00:39] tobiasvl: Radar: well, they both return true or false so they are both == and === equivalent actually...
[21:00:46] Ox0dea: Radar: Objection.
[21:01:05] Radar: tobiasvl: Are you trying to out-pedant a pedant-troll? Because it's working.
[21:01:17] sdwrage: has joined #ruby
[21:01:19] Ox0dea: >> [].empty?.!
[21:01:20] ruby[bot]: Ox0dea: # => false (https://eval.in/538332)
[21:01:31] Radar: Ox0dea: Of course you know some weird Ruby syntax to make it happen.
[21:01:39] swills: has joined #ruby
[21:01:43] Ox0dea: Well, it's just that #! is a method.
[21:01:45] tobiasvl: pedantry is fine, but when Ox0dea calls it "valid pedantry" I have to stop and scratch my head ;)
[21:02:19] _djbkd: has joined #ruby
[21:02:35] ur5us: has joined #ruby
[21:02:55] havenwood: Ox0dea: Ha, what was I trying to do? I... don't recall! Thanks, fixing.
[21:03:02] Ox0dea: riceandbeans: If you don't have an `else` clause there, you might consider using `unless` instead.
[21:03:35] Ox0dea: havenwood: I remember having to re-include Enumerable for something weird one time; thought maybe you'd run into some similar oddity.
[21:04:01] havenwood: Ox0dea: I think my hazy brain last night recalled something similar and did it without actually checking.
[21:04:21] freakcoder: has joined #ruby
[21:04:21] havenwood: hmm, what else did I miss... heh: https://gist.github.com/havenwood/3c5a5e1476c811460992
[21:05:18] IrishGringo: has joined #ruby
[21:05:26] riceandbeans: unless someone like you cares a whole awful lot, my code won't get better, it will not
[21:05:54] ghormoon: has joined #ruby
[21:06:12] infernix: has joined #ruby
[21:06:17] Ox0dea: riceandbeans: You can say `unless` instead of `if not`.
[21:06:32] Ox0dea: But don't do that if you have an `else` clause.
[21:06:49] riceandbeans: if not instead of if !
[21:07:04] riceandbeans: it's not actually an 'if' per se
[21:07:10] riceandbeans: I mean, it kinda is
[21:07:24] riceandbeans: it was in a not_if guard
[21:07:37] riceandbeans: to negate it though I moved it to only_if with the chang
[21:08:28] kirillzh: has joined #ruby
[21:08:55] Ox0dea: riceandbeans: Are you still trying to avoid using symbols, then? :P
[21:09:21] baweaver: has joined #ruby
[21:09:32] riceandbeans: I got yelled at for my hash sytax
[21:09:35] lemur: has joined #ruby
[21:09:48] riceandbeans: I used 1.9 style and was told to use 1.8 style
[21:10:00] Ox0dea: havenwood: I wonder if it should reload things it finds in $LOADED_FEATURES if they weren't TCO'd.
[21:10:05] adaedra: riceandbeans: that's bad.
[21:10:18] riceandbeans: I was told it would just confuse people
[21:10:19] havenwood: Ox0dea: hmmm
[21:10:59] Ox0dea: havenwood: It'd be convenient for benchmarking, and doubly so if loads could be scoped.
[21:12:21] PedramT: has joined #ruby
[21:13:22] Ox0dea: I guess the latter's only really applicable if this were #load_with_tco.
[21:13:54] SCHAPiE_: has joined #ruby
[21:14:06] graffix: has joined #ruby
[21:14:58] uglybandersnatch: has joined #ruby
[21:15:45] dnewkerk: has joined #ruby
[21:18:21] toretore: has joined #ruby
[21:19:43] Azure: has joined #ruby
[21:21:55] intrigueD: has joined #ruby
[21:23:47] agit0: has joined #ruby
[21:24:28] fullofcaffeine: has joined #ruby
[21:25:34] sp4rrow: has joined #ruby
[21:25:53] BTRE: has joined #ruby
[21:28:34] ensyde_: has joined #ruby
[21:29:36] ready: has joined #ruby
[21:30:32] joonty: has joined #ruby
[21:34:23] ruby[bot]: -b *!*@gateway/web/freenode/ip.2.28.88.157$#ruby-banned
[21:35:16] uglybandersnatch: has joined #ruby
[21:41:05] RegulationD: has joined #ruby
[21:42:39] mdw7: has joined #ruby
[21:44:41] tAn: has joined #ruby
[21:46:32] _stu_: has joined #ruby
[21:50:12] IrishGringo: has joined #ruby
[21:51:08] gizless: has joined #ruby
[21:52:31] kirillzh: has joined #ruby
[21:55:39] jyaworski: has joined #ruby
[21:57:18] ftj: has joined #ruby
[21:57:57] stannard: has joined #ruby
[21:58:06] pawnbox: has joined #ruby
[21:58:35] nibbo: has joined #ruby
[22:01:06] gatman: has joined #ruby
[22:01:19] mdw: has joined #ruby
[22:03:54] _djbkd: has joined #ruby
[22:04:51] SCHAAP137: has joined #ruby
[22:05:34] tomchapin: has joined #ruby
[22:05:51] Xiti: has joined #ruby
[22:07:19] rmulligan: has joined #ruby
[22:11:41] skade: has joined #ruby
[22:14:31] stannard: has joined #ruby
[22:14:44] roshanavand: has joined #ruby
[22:14:57] jpfuentes2: has joined #ruby
[22:15:22] baweaver: has joined #ruby
[22:15:22] yasha_: has joined #ruby
[22:15:57] jaequery: has joined #ruby
[22:16:41] Xeago: has joined #ruby
[22:17:35] victor_: has joined #ruby
[22:17:57] SirFunk: has joined #ruby
[22:18:15] huddy: has joined #ruby
[22:18:23] htmldrum: has joined #ruby
[22:18:58] davedev24: has joined #ruby
[22:19:08] gbgdev: has joined #ruby
[22:19:09] yasha_: has joined #ruby
[22:22:34] p0p0pr37: has joined #ruby
[22:28:39] ensyde_: has joined #ruby
[22:28:46] Ropeney: has joined #ruby
[22:28:55] fullofcaffeine: has joined #ruby
[22:29:13] lxsameer: has joined #ruby
[22:29:13] lxsameer: has joined #ruby
[22:29:36] BTRE: has joined #ruby
[22:29:52] _stu_: has joined #ruby
[22:31:20] roshanavand: has joined #ruby
[22:31:32] snowy: has joined #ruby
[22:34:08] hxegon: has joined #ruby
[22:34:17] ascarter: has joined #ruby
[22:34:27] jorrin: has joined #ruby
[22:35:55] jottr_: has joined #ruby
[22:36:07] fullofca_: has joined #ruby
[22:39:12] cpup: has joined #ruby
[22:39:13] Vingador: has joined #ruby
[22:40:12] zenlot: has joined #ruby
[22:40:20] tubuliferous: has joined #ruby
[22:42:47] gatman: has joined #ruby
[22:43:22] audiodude: has joined #ruby
[22:43:32] golgaroth: has joined #ruby
[22:44:21] rbennacer: has joined #ruby
[22:44:56] _djbkd: has joined #ruby
[22:45:16] _djbkd: has joined #ruby
[22:47:56] uglybandersnatch: has joined #ruby
[22:55:15] solocshaw: has joined #ruby
[22:55:45] cpup: has joined #ruby
[22:56:25] choke: has joined #ruby
[22:57:07] Linell: has joined #ruby
[23:01:03] az: has joined #ruby
[23:01:22] trosborn: has joined #ruby
[23:01:31] johnmilton: has joined #ruby
[23:02:15] mdw: has joined #ruby
[23:03:02] ruby-lang516: has joined #ruby
[23:03:42] RickHull: what seems to be the problem?
[23:04:02] ruby-lang516: has left #ruby: ()
[23:04:09] Canar: i need help too
[23:04:13] Canar: someone send a psychiatrist
[23:04:14] baweaver: RickHull: apparently IRC
[23:04:17] cpup: has joined #ruby
[23:04:19] RickHull: problem solved
[23:06:48] jackjackdripper1: has joined #ruby
[23:08:23] joonty: has joined #ruby
[23:10:27] jottr_: has joined #ruby
[23:10:31] tubuliferous: has joined #ruby
[23:11:01] mdw: has joined #ruby
[23:12:02] az: has left #ruby: ()
[23:12:02] jaruga: has joined #ruby
[23:12:13] Linell: I'm using rails as an API for a react front end, with Devise for authentication. How can I change the link for resetting the user passwords?
[23:12:31] BSaboia: has joined #ruby
[23:12:42] Linell: And then how should I format the request to actually set the passwords? It looks like a GET request, but I can't seem to figure ou the right params.
[23:12:47] RickHull: try #rubyonrails
[23:12:54] Linell: Awesome, thanks
[23:13:03] mdw: has joined #ruby
[23:13:33] deimos: has joined #ruby
[23:14:56] PedramT: has joined #ruby
[23:15:21] y2mq37: has joined #ruby
[23:15:22] kirillzh: has joined #ruby
[23:17:50] rickmasta: has joined #ruby
[23:20:54] jaruga: has joined #ruby
[23:21:15] Radar: ?rails Linell
[23:21:15] ruby[bot]: Linell: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[23:22:41] machinewar: has joined #ruby
[23:23:03] machinewar: has anyone had an issue when parsing CSV where column header row has more values then the following rows. They should be nil, but they're just left out of the arrays after the header
[23:23:05] BTRE: has joined #ruby
[23:26:04] kobain: has joined #ruby
[23:26:51] awasum: has joined #ruby
[23:27:02] LastGabs: has joined #ruby
[23:27:46] devbug: has joined #ruby
[23:28:28] RickHull: there's probably a flag for that behavior
[23:29:41] RickHull: also, [:foo, :bar, :baz] and [:foo, :bar, :baz, nil] both return nil when asking for the 4th item
[23:31:15] kobain: has joined #ruby
[23:32:14] kobain: has joined #ruby
[23:32:53] gregf: has joined #ruby
[23:39:16] Musashi007: has joined #ruby
[23:39:20] Radar: I would say that's invalid CSV... but I have a very strong opinion about what's valid / non-valid CSV
[23:39:28] Radar: braining is hard
[23:39:39] baweaver: has joined #ruby
[23:40:12] wreet: my thoughts are not very brainly :(
[23:40:44] audiodude: has joined #ruby
[23:41:23] Canar: i can't brain i have the dumb
[23:42:00] Ox0dea: Radar: The problem was just that they weren't passing `headers: true`.
[23:42:37] RegulationD: has joined #ruby
[23:42:46] fullofcaffeine: has joined #ruby
[23:44:01] fckyoufreenode: has joined #ruby
[23:44:10] cpup: has joined #ruby
[23:44:29] Ox0dea: Seems the most logical conclusion, anyway. https://eval.in/538360
[23:44:29] fullofca_: has joined #ruby
[23:44:56] fullofca_: has joined #ruby
[23:45:10] Ox0dea: I wouldn't expect CSV to stick those `nil`s in without being told that the data contains a header row.
[23:45:23] DLSteve: has joined #ruby
[23:45:42] duckpuppy: has joined #ruby
[23:46:08] speakingcode: has joined #ruby
[23:46:42] fullofca_: has joined #ruby
[23:47:38] fullofca_: has joined #ruby
[23:47:39] uglybandersnatch: has joined #ruby
[23:47:51] choke: has joined #ruby
[23:49:40] fullofcaffeine: has joined #ruby
[23:50:07] arlek: has joined #ruby
[23:50:11] kam270: has joined #ruby
[23:50:24] johnmilton: has joined #ruby
[23:50:29] fullofca_: has joined #ruby
[23:53:31] fedexo: has joined #ruby
[23:58:12] `tim`: has joined #ruby