« Back to channel list

#ruby - 09 September 2015

« Back 1 day Forward 1 day »
[00:00:30] baroquebobcat: has joined #ruby
[00:00:36] towski__: has joined #ruby
[00:00:46] Yzguy: has joined #ruby
[00:01:24] inteq: has joined #ruby
[00:01:24] fgo: has joined #ruby
[00:03:04] pecpec: has joined #ruby
[00:03:40] athinggoingon: has joined #ruby
[00:05:03] leat2: has joined #ruby
[00:05:44] Musashi007: has joined #ruby
[00:08:01] bmurt: has joined #ruby
[00:08:24] iateadonut: has joined #ruby
[00:10:03] JulioPapel: has joined #ruby
[00:11:00] morenoh149: has joined #ruby
[00:11:46] leat2: has joined #ruby
[00:13:22] AlexAltea: has joined #ruby
[00:14:58] ReK2: has joined #ruby
[00:16:39] CustosLimen: has joined #ruby
[00:17:31] ngscheurich: has joined #ruby
[00:17:53] CloCkWeRX: has joined #ruby
[00:18:09] ElSif: has joined #ruby
[00:19:24] dstarh: has joined #ruby
[00:20:27] an0ma1y: has joined #ruby
[00:20:41] Rakunh0: has joined #ruby
[00:20:57] nym: has joined #ruby
[00:21:12] weemsledeux: has joined #ruby
[00:21:15] Rollabunna: has joined #ruby
[00:26:56] nahtnam: has joined #ruby
[00:28:21] lkba_: has joined #ruby
[00:29:11] pocketprotector: has joined #ruby
[00:31:22] justin_pdx: has joined #ruby
[00:32:06] ladystarduust: has joined #ruby
[00:32:18] towski_: has joined #ruby
[00:33:56] samukasmk: has joined #ruby
[00:34:11] Igorshp: has joined #ruby
[00:34:40] morenoh149: has joined #ruby
[00:34:41] samukasmk_: has joined #ruby
[00:34:52] samukasmk__: has joined #ruby
[00:35:02] samuk540: has joined #ruby
[00:35:02] samuk899: has joined #ruby
[00:35:06] FernandoBasso: "You may isolate variables in a block from the outer scope by listing them following a ; in the block???s arguments. See the documentation for block local variables in the calling methods documentation for an example."
[00:35:09] FernandoBasso: Where is that found?
[00:35:35] weemsledeux: has joined #ruby
[00:35:40] Radar: FernandoBasso: Citation needed.
[00:35:49] ndrei: has joined #ruby
[00:35:56] FernandoBasso: I am reading this, by the way: http://ruby-doc.org/core-2.1.2/doc/syntax/assignment_rdoc.html
[00:36:31] morenoh149: so sinatra doesn't use rack?
[00:36:37] Radar: morenoh149: what makes you think that?
[00:36:51] morenoh149: https://github.com/sinatra/sinatra/blob/master/Gemfile
[00:36:53] Radar: https://rubygems.org/gems/sinatra
[00:36:55] morenoh149: I only see rack-test
[00:36:59] Radar: "runtime dependencies, rack"
[00:37:05] Radar: https://github.com/sinatra/sinatra/blob/master/Gemfile#L11
[00:37:09] Oog: has joined #ruby
[00:37:15] Radar: https://github.com/sinatra/sinatra/blob/master/sinatra.gemspec#L16-L18
[00:38:03] morenoh149: I guess rack-test in turn requires rack
[00:38:19] Radar: morenoh149: y u no read what I link you to?
[00:38:33] Radar: Gemfile specifically states it loads dependencies from the gemspec
[00:38:39] Radar: gemspec clearly defines a dependency on Rack
[00:39:11] morenoh149: I did read it. Wasn't sure what I was reading though
[00:39:21] pawnbox: has joined #ruby
[00:39:33] Radar: https://rubygems.org/gems/sinatra clearly shows that rack is a runtime dependency for the sinatra gem
[00:39:44] claw: has joined #ruby
[00:39:53] Radar: The Gemfile doesn't explicitly state the Rack dependency because that dependency is specified in the project's gemspec, which Bundler interprets because of the "gemspec" line in the Gemfile.
[00:40:20] Radar: FernandoBasso: Look in the sidebar. calling_methods.rdoc
[00:40:21] Radar: FernandoBasso: http://ruby-doc.org/core-2.1.2/doc/syntax/calling_methods_rdoc.html
[00:41:43] FernandoBasso: Ah, "in the calling methods documentation"...
[00:41:47] FernandoBasso: Radar: silly me.
[00:41:49] ladystarduust: has left #ruby: ("Leaving")
[00:42:54] Radar: FernandoBasso: np
[00:43:14] Musashi007: has joined #ruby
[00:44:04] Ox0dea: FernandoBasso: I'm not sure why that's in the 2.1 documentation; the semicolon hasn't been necessary since 1.9.
[00:44:22] Ketchy: has joined #ruby
[00:45:40] Oog: has joined #ruby
[00:45:45] Ox0dea: 18>> foo = 1; proc { |foo| foo = 2 }.call(0); foo
[00:45:46] ruboto: Ox0dea # => 2 (https://eval.in/430253)
[00:45:48] Ox0dea: 19>> foo = 1; proc { |foo| foo = 2 }.call(0); foo
[00:45:49] ruboto: Ox0dea # => 1 (https://eval.in/430254)
[00:45:59] morenoh149: has joined #ruby
[00:46:08] denisemc_: has joined #ruby
[00:46:31] Exponential: has joined #ruby
[00:46:32] FernandoBasso: I see. Thanks.
[00:46:45] ruurd_: has joined #ruby
[00:46:57] Ox0dea: In short, feel free to pretend you never knew you could stick simicolons in block argument lists. :P
[00:47:02] Ox0dea: *semicolons
[00:47:09] abbe: has joined #ruby
[00:47:46] devoldmx: has joined #ruby
[00:48:10] keen__________16: has joined #ruby
[00:49:13] haraoka: has joined #ruby
[00:49:33] ruurd: has joined #ruby
[00:49:41] kfpratt: has joined #ruby
[00:49:48] asi_: has joined #ruby
[00:49:51] autrilla: has joined #ruby
[00:49:59] jonr22: has joined #ruby
[00:50:10] wldcordeiro_: has joined #ruby
[00:50:14] Liam`: has joined #ruby
[00:50:20] hydrozen: has joined #ruby
[00:50:23] nym: has joined #ruby
[00:50:57] FernandoBasso: I misunderstood the docs.
[00:51:03] gs: has joined #ruby
[00:51:03] hostess: has joined #ruby
[00:51:24] FernandoBasso: I was thinking it would be possible to make the a variable (in the example) not to "leak" into the block.
[00:51:28] EasyCo: has joined #ruby
[00:52:02] FernandoBasso: What the call_method doc talks about is a way not to let outer variables interfere with block variables with the same name, it seems.
[00:52:18] yfeldblum: has joined #ruby
[00:52:21] hackerdude: has joined #ruby
[00:52:48] claw: has joined #ruby
[00:53:09] larissa: has joined #ruby
[00:53:25] Shidash: has joined #ruby
[00:53:25] george2: has joined #ruby
[00:53:31] FastJack: has joined #ruby
[00:53:39] lupine: has joined #ruby
[00:53:40] meatherly: has joined #ruby
[00:53:48] pyon: has joined #ruby
[00:53:49] epochwolf: has joined #ruby
[00:53:49] bf4: has joined #ruby
[00:53:53] DarkBushido: has joined #ruby
[00:53:53] waxjar: has joined #ruby
[00:53:54] arooni-mobile: has joined #ruby
[00:53:58] dymk: has joined #ruby
[00:54:08] ZeeNoodleyGamer: has joined #ruby
[00:54:08] wookiehangover: has joined #ruby
[00:54:17] aredridel: has joined #ruby
[00:54:20] SilentEcho: has joined #ruby
[00:54:23] flaf: has joined #ruby
[00:54:28] iooner: has joined #ruby
[00:54:31] Nightmare: has joined #ruby
[00:54:32] sfr^: has joined #ruby
[00:54:32] tno: has joined #ruby
[00:54:35] Seich: has joined #ruby
[00:54:35] duoi: has joined #ruby
[00:54:40] cschneid: has joined #ruby
[00:54:43] jaxxstorm: has joined #ruby
[00:54:57] s00pcan_: has joined #ruby
[00:54:58] jsrn: has joined #ruby
[00:54:59] Billias: has joined #ruby
[00:55:00] arooni-mobile: has joined #ruby
[00:55:01] teotwaki: has joined #ruby
[00:55:03] LBRapid: has joined #ruby
[00:55:03] jimeh: has joined #ruby
[00:55:21] segmond: has joined #ruby
[00:55:25] terrellt: has joined #ruby
[00:55:37] BackEndCoder: has joined #ruby
[00:55:58] arooni-mobile: has joined #ruby
[00:56:05] duoi: has joined #ruby
[00:56:07] skarn: has joined #ruby
[00:56:08] catbusters: has joined #ruby
[00:56:19] johnhamelink: has joined #ruby
[00:56:53] arooni-mobile: has joined #ruby
[00:57:45] arooni-mobile: has joined #ruby
[00:57:54] egtann: has joined #ruby
[00:58:22] egtann: has joined #ruby
[00:58:23] drbrain: Ox0dea: your example shows a different thing than what block local arguments does
[00:58:34] mordocai: has joined #ruby
[00:58:35] drbrain: >> foo = 1; proc { foo = 2 }.call; p foo
[00:58:36] ruboto: drbrain # => 2 ...check link for more (https://eval.in/430255)
[00:58:42] drbrain: >> foo = 1; proc { |;foo| foo = 2 }.call; p foo
[00:58:43] arooni-mobile: has joined #ruby
[00:58:43] ruboto: drbrain # => 1 ...check link for more (https://eval.in/430256)
[00:58:53] Ox0dea: Oh, right.
[00:59:25] drbrain: block local arguments allow you to make arbitrary variables behave like block arguments
[00:59:30] drbrain: FernandoBasso: ???
[00:59:35] arooni-mobile: has joined #ruby
[01:00:02] solocshaw: has joined #ruby
[01:00:31] Ketchy: has joined #ruby
[01:00:36] arooni-mobile: has joined #ruby
[01:00:38] Ox0dea: It puts me in mind of K&R-era function definition.
[01:00:43] Exponential: has joined #ruby
[01:01:46] arooni-mobile: has joined #ruby
[01:02:13] NeverDie: has joined #ruby
[01:02:18] arooni-mobile: has joined #ruby
[01:02:26] fgo: has joined #ruby
[01:02:34] dfockler: has joined #ruby
[01:02:48] arooni-mobile: has joined #ruby
[01:03:03] Rurik: has joined #ruby
[01:03:37] arooni-mobile: has joined #ruby
[01:04:21] arooni-mobile: has joined #ruby
[01:04:40] arooni: has joined #ruby
[01:05:07] arooni: has joined #ruby
[01:05:42] enebo: has joined #ruby
[01:05:43] moeabdol: has joined #ruby
[01:06:29] grenierm: has joined #ruby
[01:06:58] `mrspock: has joined #ruby
[01:07:08] denisemccoy: has joined #ruby
[01:08:04] duncannz: has joined #ruby
[01:10:01] Dwarf: has joined #ruby
[01:11:08] pecpec: has joined #ruby
[01:11:48] s00pcan_: has joined #ruby
[01:13:38] lucyinthesky: has joined #ruby
[01:14:03] infernix: has joined #ruby
[01:17:47] lucyinthesky: has left #ruby: ("Mensagem")
[01:18:17] OrbitalKitten: has joined #ruby
[01:19:30] claw: has joined #ruby
[01:19:52] chills42: has joined #ruby
[01:20:19] JulioPapel: has joined #ruby
[01:21:02] atomical: has joined #ruby
[01:23:15] opensource_ninja: has joined #ruby
[01:24:18] OrbitalKitten: has joined #ruby
[01:25:16] juanpablo____: has joined #ruby
[01:28:27] pyon: has joined #ruby
[01:28:35] pawnbox: has joined #ruby
[01:29:13] ScriptGeek: has joined #ruby
[01:30:16] rickmasta: has joined #ruby
[01:30:56] ScriptGeek: is there a way to make a string contain a variable reference in such a way that the string doesn't need to be reinterpolated when the value of the variable changes?
[01:31:29] weemsledeux: has joined #ruby
[01:33:53] northfurr: has joined #ruby
[01:35:02] dfockler: ScriptGeek: so you don't want "Ruby #{string_var}" ?
[01:36:38] ScriptGeek: well, I want to set a string with a variable inside it so that the string doesn't need to get reassigned
[01:37:03] ScriptGeek: something like this
[01:37:21] ScriptGeek: message = "You're already in #{location}"
[01:37:32] nofxx: has joined #ruby
[01:37:57] workmad3: has joined #ruby
[01:38:00] davedev24: has joined #ruby
[01:38:22] ScriptGeek: and then if the location variable changes the string gets updated automagically
[01:38:23] rbennacer: has joined #ruby
[01:38:25] dfockler: oh if that's the case no probably not
[01:38:50] ScriptGeek: ok, thanks for the help
[01:38:52] dfockler: Ruby sets the value of message after interpolating the string
[01:39:08] ScriptGeek: yeah, I thought it would
[01:39:10] dfockler: but you can have a function that does that
[01:39:26] dfockler: and just return the built string
[01:39:41] ScriptGeek: hmm... that might work
[01:40:27] vipaca: has joined #ruby
[01:41:04] pocketprotector: has joined #ruby
[01:42:02] charliesome: has joined #ruby
[01:43:12] claw: has joined #ruby
[01:44:16] iandeejay: has joined #ruby
[01:44:59] iandeejay: what is the best way to give restricted access to specific ruby classes/modules for a sandboxed environment?
[01:48:31] devoldmx: has joined #ruby
[01:49:16] Musashi007: has joined #ruby
[01:50:37] siemprefresco: has joined #ruby
[01:51:00] dfockler: iandeejay: only write the classes that you want the user to have access to
[01:51:37] dfockler: ruby's class model isn't setup in a way that allows for real restriction on access
[01:55:57] centrx: has joined #ruby
[01:57:03] buttholio2099: has joined #ruby
[01:57:13] devbug: has joined #ruby
[01:59:21] denisemccoy: has joined #ruby
[02:01:01] an0ma1y: has joined #ruby
[02:01:26] morenoh149: has joined #ruby
[02:01:48] iandeejay: dflocker: this is true. good point
[02:01:56] justin_pdx: has joined #ruby
[02:02:27] dawkirst: has joined #ruby
[02:03:52] fgo: has joined #ruby
[02:05:01] claw: has joined #ruby
[02:05:11] Maletor: has joined #ruby
[02:05:15] jonee: has joined #ruby
[02:06:23] tjbiddle: has joined #ruby
[02:10:23] iamvery: has joined #ruby
[02:10:31] denisemccoy: has joined #ruby
[02:11:31] denisemccoy: has joined #ruby
[02:12:15] pecpec: has joined #ruby
[02:13:26] dawkirst: has joined #ruby
[02:14:41] s00pcan_: has joined #ruby
[02:14:44] bmurt: has joined #ruby
[02:17:54] saddad: has joined #ruby
[02:19:07] ebbflowgo: has joined #ruby
[02:19:36] ebbflowgo: hi, I'm getting a type error and need help debugging it.. https://gist.github.com/ebbflowgo/f7eab9f24214b64b0059
[02:19:52] ebbflowgo: it breaks on the listener.sample
[02:21:19] [k-: has joined #ruby
[02:22:07] Rollabunna: has joined #ruby
[02:23:47] Lrrr_: has joined #ruby
[02:24:07] fgo: has joined #ruby
[02:25:38] centrx: ebbflowgo, Seems like some problem with the twitter gem?
[02:26:03] juanpablo____: has joined #ruby
[02:27:12] nofxx: ebbflowgo, give it a try w/o java? really need to run on jruby?
[02:27:29] nofxx: and file a bug on jruby tcpsocket
[02:28:15] ebbflowgo: centrx: not sure yet
[02:28:51] RobertBirnie: has joined #ruby
[02:28:52] theery: has joined #ruby
[02:28:59] ebbflowgo: nofxx: yeah this time going to use jruby and will do if I can't find a fix
[02:30:20] shevy: long live ruby \o/
[02:31:02] justin_pdx: has joined #ruby
[02:32:45] ruby-lang104: has joined #ruby
[02:34:42] Azure: has joined #ruby
[02:35:23] zenguy_pc: has joined #ruby
[02:37:17] iandeejay: has left #ruby: ()
[02:43:12] northfurr: has joined #ruby
[02:43:54] michael_mbp: has joined #ruby
[02:46:22] nofxx: has joined #ruby
[02:49:16] devoldmx: has joined #ruby
[02:50:15] darkf: has joined #ruby
[02:50:29] weemsledeux: has joined #ruby
[02:50:58] RobertBirnie: has joined #ruby
[02:51:39] xcesariox: has joined #ruby
[02:53:55] iamvery: has joined #ruby
[02:54:01] moeabdol: has joined #ruby
[02:56:34] weemsledeux: has joined #ruby
[02:56:50] oniMaker: has joined #ruby
[02:56:59] oniMaker: This isn't working as I expect:
[02:57:01] oniMaker: map_hosts = lambda { |(_name, site)| site['site_hosts'] }
[02:57:07] oniMaker: _x, *child_aliases = child_sites.flat_map &map_hosts
[02:57:26] sevenseacat: i hate when that happens.
[02:57:27] oniMaker: _x becomes the first entry in child_sites, instead of just the key, which I'd like
[02:57:40] oniMaker: i.e. child_aliases should contain every entry
[02:57:49] oniMaker: sevenseacat: what's the issue?
[02:58:04] theery: has joined #ruby
[02:58:29] oniMaker: ah right, those who speak don't know
[02:58:47] nofxx: has joined #ruby
[02:58:49] Rubie: has joined #ruby
[02:58:56] sevenseacat: you posted a bunch of code and said 'it doesnt do what i expect'. what else is anyone supposed to say?
[02:59:31] oniMaker: well, someone familiar with ruby should be able to spot the mistake
[02:59:45] sevenseacat: not when we didnt know what you expected it to do
[02:59:50] oniMaker: which I explained
[02:59:56] sevenseacat: after I said what I said
[03:00:01] oniMaker: I guess you are too impatient
[03:00:06] sevenseacat: I guess you're too slow :P
[03:00:24] oniMaker: you don't know the answer, so you're pretty slow too :P
[03:00:36] sevenseacat: ACTION raises eyebrow
[03:00:56] gener1c: has joined #ruby
[03:01:13] jonr2219: has joined #ruby
[03:02:58] shevy: a cat with eyebrows!
[03:03:42] claw: has joined #ruby
[03:06:14] ranchodev: has joined #ruby
[03:06:43] Aeyrix: Glad I reattached to this channel today.
[03:07:51] oniMaker: ok, fixed it
[03:07:55] oniMaker: looks like I'm not the slow one after all
[03:07:59] Aeyrix: Glad you're familiar with ruby.
[03:08:04] oniMaker: heh, now I am
[03:08:16] Aeyrix: Have you written a book yet?
[03:08:17] saddad: has joined #ruby
[03:08:18] duoi: has joined #ruby
[03:08:31] oniMaker: Is it any good?
[03:08:34] Aeyrix: Probably not.
[03:08:40] oniMaker: Don't give up.
[03:08:45] Aeyrix: Thanks fam.
[03:08:52] GPrime: has joined #ruby
[03:09:10] sevenseacat: everyone can put their claws away now.
[03:09:26] zenguy_pc: has joined #ruby
[03:09:48] duoi: has joined #ruby
[03:10:01] havenwood: has joined #ruby
[03:10:06] oniMaker: You first kitty.
[03:10:43] tjbiddle: has joined #ruby
[03:11:07] braincrash: has joined #ruby
[03:12:12] tkuchiki: has joined #ruby
[03:12:45] baweaver: has joined #ruby
[03:13:02] pecpec: has joined #ruby
[03:13:02] shevy: writing a book takes a lot of resources... especially if you have to gather preliminary data
[03:13:43] Aeyrix: Anyone familiar with book writing should be able to do that quickly
[03:14:08] Oog: has joined #ruby
[03:15:04] shevy: you wrote books?
[03:15:16] Aeyrix: I have written *a* book, yes.
[03:15:17] Aeyrix: Not on Ruby.
[03:15:56] Oog: has joined #ruby
[03:16:15] theery: has joined #ruby
[03:16:21] zlogan: has joined #ruby
[03:17:51] baweaver: ACTION raises eyebrow
[03:17:59] JamesDH: has joined #ruby
[03:18:14] havenwood: ACTION shaves eyebrows
[03:18:36] Aeyrix: ACTION leaves his eyebrows where they are.
[03:18:41] Aeyrix: I have nice eyebrows allegedly.
[03:18:47] havenwood: mm, now i regret that - see, don't shave your eyebrows
[03:18:49] baweaver: http://static.comicvine.com/uploads/original/11124/111243439/4722023-death-note-l-death-note-24603715-465-296.png
[03:19:45] krz: has joined #ruby
[03:20:21] mary5030: has joined #ruby
[03:20:31] j4cknewt: has joined #ruby
[03:20:41] shevy: man without eyebrows
[03:20:53] dopie: has joined #ruby
[03:21:21] havenwood: the walls have ears, and they've been telling me things
[03:23:03] [k-: my brain has neurons, they've been telling me things that are wrong
[03:23:10] havenwood: ACTION glares at those not being nice
[03:23:28] charliesome: has joined #ruby
[03:23:46] havenwood: [k-: Aye, mine are known to do that too. Hard to ignore it too, your own brain and all.
[03:24:15] shevy: it's a big nuisance
[03:24:37] [k-: ?rimshot
[03:24:37] ruboto: Badum-Tshh! https://www.youtube.com/watch?v=oShTJ90fC34
[03:26:12] fostertheweb: has joined #ruby
[03:26:22] dopieee: has joined #ruby
[03:26:41] baweaver: ACTION polishes hammer
[03:26:42] workmad3: has joined #ruby
[03:27:04] jonr2219: has joined #ruby
[03:27:20] djbkd: has joined #ruby
[03:27:51] krz: has joined #ruby
[03:28:57] shevy: there should be only one way in python: https://www.python.org/dev/peps/pep-0498/
[03:29:23] shevy: "Python supports multiple ways to format text strings. [...] This PEP proposed to add a new string formatting mechanism"
[03:29:27] Aeyrix: xkcd standards
[03:29:27] solocshaw: has joined #ruby
[03:29:28] shevy: it embraces ruby philosophy finally!
[03:29:33] havenwood: Eek, been a while apparently since I've looked at the bug tracker...
[03:29:34] havenwood: >> [20, 32, 32, 21, 30, 25, 29, 13, 14].min 2
[03:29:35] ruboto: havenwood # => [13, 20] (https://eval.in/430306)
[03:29:38] shevy: https://xkcd.com/927/
[03:29:54] oniMaker: having only one way to do something is the dumbest idea
[03:29:56] theery: has joined #ruby
[03:30:03] shevy: 15!!! ^^^
[03:30:04] havenwood: oniMaker: there is more than one way to do it
[03:30:14] krz: has joined #ruby
[03:30:20] havenwood: shevy: [13, 14]
[03:30:23] oniMaker: havenwood: not if you're a pythonista
[03:30:29] havenwood: oniMaker: I'm not.
[03:30:32] j4cknewt: has joined #ruby
[03:31:02] towski_: has joined #ruby
[03:31:39] havenwood: Though that's another way to do it.
[03:32:01] shevy: f'input={value:#0.6x}'
[03:32:15] shevy: it may be my untrained eye but I find python code sorta strange
[03:32:24] baweaver: depends on what you want to do oniMaker
[03:32:45] baweaver: when you want to wrangle a bunch of juniors with strong opinions, Python is worth a look.
[03:32:50] verdoc: has joined #ruby
[03:34:04] pawnbox: has joined #ruby
[03:34:25] havenwood: shevy: your and my 14 were apropos
[03:34:58] [k-: shevy: it's your untrained eye
[03:35:29] mjmac: has joined #ruby
[03:35:59] oniMaker: baweaver: I want to skin a cat. How many ways are there?
[03:36:19] baweaver: treading on awfully thin ice there.
[03:36:24] havenwood: oniMaker: Zero. We don't do that.
[03:36:41] Aeyrix: 1. Skin the cat.
[03:36:48] havenwood: oniMaker: What kind of monster are you?
[03:37:00] oniMaker: havenwood: do you eat meat?
[03:37:01] Igorshp: has joined #ruby
[03:37:04] baweaver: https://www.youtube.com/watch?v=be6I7_TVUgw
[03:37:07] baweaver: !mute oniMaker
[03:37:08] ruboto: +q oniMaker!*@*
[03:37:08] ruboto: -o ruboto
[03:37:10] Maletor: has joined #ruby
[03:37:14] ebbflowgo: has joined #ruby
[03:37:16] ebbflowgo: has left #ruby: ()
[03:38:38] zenguy_pc: has joined #ruby
[03:39:24] shevy: it's hammering time for beavers \o/
[03:39:26] [k-: appalling :(
[03:39:52] nullwarp: has joined #ruby
[03:41:05] Aeyrix: shevy: wew lad
[03:42:34] fedexo: has joined #ruby
[03:43:10] pawnbox: has joined #ruby
[03:43:44] sdothum: has joined #ruby
[03:43:49] oniMaker: has left #ruby: ()
[03:43:56] pontiki: has joined #ruby
[03:45:08] segmond: has joined #ruby
[03:45:50] duncannz: has joined #ruby
[03:49:15] zenguy_pc: has joined #ruby
[03:49:21] sfr^: has joined #ruby
[03:49:31] linc01n: has joined #ruby
[03:49:34] universa1: has joined #ruby
[03:50:53] gix: has joined #ruby
[03:53:47] banjara: has joined #ruby
[03:54:20] krz: has joined #ruby
[03:54:31] fgo: has joined #ruby
[03:54:32] havenwood: good way to start an article: http://www.tedunangst.com/flak/post/reproducible-builds-are-a-waste-of-time
[03:54:39] havenwood: "Sort of. Maybe. It depends."
[03:55:03] moeabdol: has joined #ruby
[03:55:10] havenwood: And it'd be a nice thing for Ruby precompiled binaries.
[03:55:25] opensource_ninja: has joined #ruby
[03:57:16] havenwood: Or a waste of time. Maybe we should focus on just getting the basics done properly.
[03:58:53] duoi: has joined #ruby
[03:59:30] pontiki: meanwhile, we dance
[03:59:58] shevy: havenwood sounds like an introduction to haskell
[04:00:26] buttholio2099: has left #ruby: ("Leaving")
[04:02:38] lokulin: has joined #ruby
[04:03:45] shevy: isn't the major point of reproducible builds that it'll be guaranteed to be the same all across the board, sort of what NixOS does with their hashed directories?
[04:03:52] havenwood: shevy: I promise not do anything untoward with binaries I compile. It wouldn't take all that much to make them reproducible.
[04:04:24] havenwood: If a dependency on say TravisCI was allowed as part of reproducibility. :P
[04:05:39] havenwood: Nice to be able to give reproduction steps with checksums to confirm. I like that.
[04:05:55] aaeron: has joined #ruby
[04:06:01] pawnbox: has joined #ruby
[04:06:35] Ox0dea: ScriptGeek: Still about?
[04:07:20] nahtnam: has joined #ruby
[04:08:18] ScriptGeek: Ox0dea: I think so, lemme check
[04:08:24] casadei_: has joined #ruby
[04:08:32] Ox0dea: ScriptGeek: Ha?
[04:08:32] ScriptGeek: oh, there I am. Yeah, I'm still here
[04:08:37] Ox0dea: Okay, good.
[04:09:12] Ox0dea: ScriptGeek: I think there might be some clever way to stick your String in a Proc in order to delay its evaluation and have these sorts of "magic strings" you're after.
[04:09:13] havenwood: shevy: Yeah, I guess that's a logical step.
[04:09:58] havenwood: Magical Strings? :O What'd I miss?
[04:10:08] ScriptGeek: Ox0dea: That would be cool, but I did find another solution for my predicament
[04:10:12] Ox0dea: havenwood: "the magic goes #{here}"
[04:10:18] Ox0dea: How to make `here` "dynamic"?
[04:10:25] Ox0dea: It's probably not feasible now that I actually think on it.
[04:10:42] ScriptGeek: #{string} didn't work
[04:10:50] Ox0dea: You could alias #to_s to #call or some such, but that'll still eagerly evaluate and "cement" the String.
[04:12:05] ScriptGeek: Another solution is to use a lambda that puts together the string on demand
[04:13:02] ScriptGeek: I need to pass the string in as a parameter, but the string has to be dynamic so it references live data
[04:13:50] Rubie: has joined #ruby
[04:13:50] pecpec: has joined #ruby
[04:13:56] Ox0dea: >> loc = 'foo'; s = "you are here: #{loc}"; loc.replace 'bar'; s # ScriptGeek
[04:13:57] ruboto: Ox0dea # => "you are here: foo" (https://eval.in/430307)
[04:14:02] Ox0dea: If that doesn't do it, nothing will. :/
[04:14:21] Ox0dea: And, yeah, the delayed evaluation approach is a no-go without crazy hackery.
[04:14:47] juanpablo____: has joined #ruby
[04:14:59] jenrzzz: has joined #ruby
[04:15:06] Eiam_: has joined #ruby
[04:16:30] Ox0dea: ScriptGeek: Are you doing lots of these magic strings?
[04:18:00] ScriptGeek: 36 of them, so yeah, I guess so
[04:18:14] Ox0dea: ScriptGeek: You might consider using a template engine?
[04:18:17] ScriptGeek: I think going to replace those strings with lambdas
[04:18:42] ScriptGeek: this is a menu system that I created
[04:18:53] bronson: has joined #ruby
[04:18:56] ScriptGeek: it's all test based
[04:19:27] tejasmanohar: has joined #ruby
[04:20:00] ScriptGeek: the situation in question is to modify the method that adds menu options which execute after a key press
[04:20:44] sevenseacat: has joined #ruby
[04:20:53] ScriptGeek: and before the option executes a custom validation check occurs to determine if the option should be executed
[04:21:14] ScriptGeek: that check is just a lambda that evaluates true or false
[04:21:27] khebbie: has joined #ruby
[04:21:49] ScriptGeek: if it evaluates false then it fails and should display a message, which is where my magic strings would be
[04:22:18] ScriptGeek: but I could just make it use lambdas instead of strings
[04:23:01] Rollabunna: has joined #ruby
[04:23:30] [k-: lambdas are more expensive than strings
[04:24:03] erts: has joined #ruby
[04:24:36] devoldmx: has joined #ruby
[04:25:00] ScriptGeek: it's all good, it's just a text based video game
[04:26:40] CloCkWeRX: has left #ruby: ()
[04:27:51] devoldmx_: has joined #ruby
[04:28:56] mary5030: has joined #ruby
[04:29:32] yfeldblum: has joined #ruby
[04:30:31] barhum2013: has joined #ruby
[04:30:49] cantaberry: has joined #ruby
[04:31:56] s00pcan_: has joined #ruby
[04:32:15] Oog: has joined #ruby
[04:32:24] michael_mbp: has joined #ruby
[04:33:41] nofxx: has joined #ruby
[04:33:45] nofxx: has joined #ruby
[04:34:42] barhum2013: has joined #ruby
[04:34:55] roxtrongo: has joined #ruby
[04:37:57] tjbiddle_: has joined #ruby
[04:37:58] fostertheweb: has joined #ruby
[04:38:01] Igorshp: has joined #ruby
[04:38:21] mary5030: has joined #ruby
[04:40:41] lokulin: has joined #ruby
[04:43:40] fedexo: has joined #ruby
[04:44:17] Eiam_: has joined #ruby
[04:49:25] Ox0dea: >> require 'objspace'; ['', ->{}].map(&ObjectSpace.method(:memsize_of))
[04:49:26] ruboto: Ox0dea # => [20, 52] (https://eval.in/430319)
[04:49:37] Ox0dea: I get 40/80 on x86_64.
[04:49:48] Ox0dea: Wonder what that's about.
[04:50:32] CloCkWeRX: has joined #ruby
[04:50:42] Ox0dea: ScriptGeek: So is it that you're worried about creating too many Strings? Why not just print the error message when and as appropriate?
[04:52:28] nhhagen: has joined #ruby
[04:52:33] fgo: has joined #ruby
[04:52:54] yfeldblum: has joined #ruby
[04:55:53] havenwood: => [40, 104]
[04:56:01] moeabdol: has joined #ruby
[04:56:19] Ox0dea: ScriptGeek: https://eval.in/430325
[04:56:30] Ox0dea: But don't actually do that, obviously.
[04:56:30] xcesariox: has joined #ruby
[04:56:33] havenwood: heh, on FreeBSD: => [0, 72]
[04:56:37] JohnBat26: has joined #ruby
[04:56:51] Ox0dea: havenwood: http://i.imgur.com/AYch4Io.gifv
[04:57:28] [k-: clearly this shows i am right
[04:57:41] swills: has joined #ruby
[04:58:33] Ox0dea: >> ObjectSpace.each_object(Class).select { |c| c.respond_to?(:new) }.max_by(&ObjectSpace.method(:memsize_of))
[04:58:34] ruboto: Ox0dea # => undefined method `memsize_of' for class `Module' (NameError) ...check link for more (https://eval.in/430328)
[04:58:37] Aeyrix: when :basement then 'on 4chan'
[04:58:43] Ox0dea: >> require 'objspace'; ObjectSpace.each_object(Class).select { |c| c.respond_to?(:new) }.max_by(&ObjectSpace.method(:memsize_of))
[04:58:44] ruboto: Ox0dea # => Gem::Specification (https://eval.in/430329)
[04:58:53] ScriptGeek: Ox0dea: that's funny hahaha
[05:00:32] acke: has joined #ruby
[05:02:13] wildlander: has joined #ruby
[05:02:27] j4cknewt: has joined #ruby
[05:03:13] banjara: has joined #ruby
[05:07:07] mary5030: has joined #ruby
[05:07:20] fxn: has joined #ruby
[05:08:06] zlogan: has joined #ruby
[05:08:13] veg: has joined #ruby
[05:08:26] ScriptGeek: well, it was tedious with that many changes, but it works now
[05:08:36] psye: has joined #ruby
[05:08:37] chipotle: has joined #ruby
[05:09:15] AustinMatherne: has joined #ruby
[05:10:27] aaeron: has joined #ruby
[05:12:55] pawnbox: has joined #ruby
[05:13:11] pyon: has joined #ruby
[05:14:14] mary5030: has joined #ruby
[05:14:32] riotjones: has joined #ruby
[05:14:36] pecpec: has joined #ruby
[05:15:26] workmad3: has joined #ruby
[05:15:49] s00pcan: has joined #ruby
[05:17:01] claw: has joined #ruby
[05:17:21] dhjondoh: has joined #ruby
[05:24:54] barhum2013: has joined #ruby
[05:24:55] jas02: has joined #ruby
[05:27:50] swgillespie: has joined #ruby
[05:28:34] acke: has joined #ruby
[05:29:11] shevy: code code code
[05:29:48] JohnBat26: has joined #ruby
[05:30:39] Rubie: has joined #ruby
[05:31:04] Oog: has joined #ruby
[05:31:30] mary5030: has joined #ruby
[05:31:36] warreng: has joined #ruby
[05:31:39] khebbie: has joined #ruby
[05:31:43] codecop: has joined #ruby
[05:31:48] headius: has joined #ruby
[05:32:04] tagrudev: has joined #ruby
[05:33:53] RobertBirnie: has joined #ruby
[05:33:58] codenapper: has joined #ruby
[05:34:46] DeweyD: has joined #ruby
[05:35:12] aganov: has joined #ruby
[05:35:19] swgillespie: has joined #ruby
[05:38:42] Igorshp: has joined #ruby
[05:38:48] jackjackdripper: has joined #ruby
[05:39:59] moeabdol: has joined #ruby
[05:40:19] dhjondoh: has joined #ruby
[05:44:02] wildlander: has joined #ruby
[05:44:39] Rutix: has joined #ruby
[05:44:39] Rutix: has joined #ruby
[05:46:08] shinnya: has joined #ruby
[05:47:00] astrobun_: has joined #ruby
[05:48:07] DeweyD: has joined #ruby
[05:49:20] swgillespie: has joined #ruby
[05:50:15] dhruvasagar: has joined #ruby
[05:53:35] nhhagen: has joined #ruby
[05:54:30] n008f4g_: has joined #ruby
[05:56:40] KensoDev: has joined #ruby
[05:57:19] TomyLobo: has joined #ruby
[05:57:41] zlogan: has joined #ruby
[06:00:50] jonr22: has joined #ruby
[06:01:01] oldbay: has joined #ruby
[06:02:43] ht__: has joined #ruby
[06:03:04] wildlander: has joined #ruby
[06:03:53] juanpablo____: has joined #ruby
[06:04:43] badfish129: has joined #ruby
[06:05:31] kiki_lamb: has joined #ruby
[06:05:32] eGGsha: has joined #ruby
[06:07:58] s00pcan: has joined #ruby
[06:08:00] Macaveli: has joined #ruby
[06:13:11] Oog: has joined #ruby
[06:15:22] pecpec: has joined #ruby
[06:15:24] niemcu: has joined #ruby
[06:15:36] Mon_Ouie: has joined #ruby
[06:16:52] skade: has joined #ruby
[06:17:24] riotjones: has joined #ruby
[06:19:32] ascarter: has joined #ruby
[06:20:51] bluOxigen: has joined #ruby
[06:20:58] eightfold: has joined #ruby
[06:21:33] riotjones: has joined #ruby
[06:23:53] Rollabunna: has joined #ruby
[06:24:49] andikr: has joined #ruby
[06:24:50] justin_pdx: has joined #ruby
[06:26:18] khebbie: has joined #ruby
[06:26:34] blueOxigen: has joined #ruby
[06:26:54] solars: has joined #ruby
[06:27:18] firstdayonthejob: has joined #ruby
[06:28:24] Oog: has joined #ruby
[06:29:23] moeabdol: has joined #ruby
[06:29:29] astrobun_: has joined #ruby
[06:29:48] acke: has joined #ruby
[06:31:46] mooe: has joined #ruby
[06:33:55] Ox0dea: Where else can you use :+ (without the ampersand) besides #reduce?
[06:36:44] majjoha: 0x0dea: You can also use it for #inject.
[06:37:02] ohaibbq: has joined #ruby
[06:37:31] Ox0dea: majjoha: I'm afraid I don't understand.
[06:37:44] apeiros: Ox0dea: afaik that's the only place
[06:37:54] sevenseacat: is inject not an alias of reduce?
[06:37:57] Ox0dea: apeiros: Any insight into why that should be?
[06:37:57] apeiros: majjoha: no surprise here, given that inject is an alias of reduce :)
[06:38:10] Mon_Ouie: I think #reduce does it mostly because it did that before Symbol#to_proc was defined.
[06:38:26] Ox0dea: Mon_Ouie: Did it, really?
[06:38:47] apeiros: Ox0dea: not really. I guess it was enough of a common case with inject/reduce to justify the optimization
[06:39:02] yardenbar: has joined #ruby
[06:39:02] apeiros: and everywhere else the core team thinks you should use the explicit block
[06:39:05] apeiros: just a guess
[06:39:31] last_staff: has joined #ruby
[06:39:36] Mon_Ouie: I believe so. If you can find some place to evaluate with Ruby 1.8.6 you could check.
[06:39:43] Igorshp: has joined #ruby
[06:40:02] CustosLimen: has joined #ruby
[06:40:06] baweaver: On todays 'What the Function!?'...
[06:40:06] Ox0dea: 18>> RUBY_VERSION
[06:40:07] ruboto: Ox0dea # => "1.8.7" (https://eval.in/430359)
[06:40:14] Ox0dea: 18>> [1,2,3].reduce(:+)
[06:40:15] ruboto: Ox0dea # => 6 (https://eval.in/430361)
[06:40:33] Mon_Ouie: Symbol#to_proc was added in 1.9 and backported to 1.8.7
[06:42:00] mary5030: has joined #ruby
[06:42:03] Ox0dea: apeiros: Aye, it's a very sensible optimization, so why not apply it wherever applicable?
[06:42:28] apeiros: as said, not really sure.
[06:43:19] Ox0dea: > insns.def (opt_send_simple): introduce new instruction used when no need to care about block and splat.
[06:43:30] Ox0dea: opt_send_simple has since become opt_send_without_block, but the point remains.
[06:43:54] baweaver: ACTION really needs to read through Ruby's C code some time.
[06:45:35] ruurd: has joined #ruby
[06:46:14] Balzrael: has joined #ruby
[06:46:57] arup_r: has joined #ruby
[06:46:59] leat2: has joined #ruby
[06:47:27] JamesDH: has joined #ruby
[06:48:25] dopamean1: has joined #ruby
[06:49:29] leat2: has joined #ruby
[06:51:28] nhhagen: has joined #ruby
[06:54:03] greenarrow: has joined #ruby
[06:54:13] UtkarshRay: has joined #ruby
[06:55:09] skade: has joined #ruby
[06:56:02] casadei_: has joined #ruby
[07:03:54] lsmola: has joined #ruby
[07:04:15] workmad3: has joined #ruby
[07:07:27] alphaatom: has joined #ruby
[07:08:24] Lrrr_: has joined #ruby
[07:08:46] ta: has joined #ruby
[07:09:00] yoloswag469: has left #ruby: ()
[07:09:42] pecpec: has joined #ruby
[07:10:15] braincrash: has joined #ruby
[07:17:04] dopamean_: has joined #ruby
[07:17:11] jonelf: has joined #ruby
[07:17:24] CustosLimen: has joined #ruby
[07:18:10] irk: has joined #ruby
[07:18:14] Iskarlar: has joined #ruby
[07:18:52] majjoha: apeiros: Oh, yes, you're completely right. I forgot. :-)
[07:19:35] lolmaus: has joined #ruby
[07:20:08] tjbiddle: has joined #ruby
[07:23:06] RTG`: has joined #ruby
[07:24:42] devoldmx: has joined #ruby
[07:26:53] tesuji: has joined #ruby
[07:28:39] haraoka: has joined #ruby
[07:30:07] moeabdol: has joined #ruby
[07:31:52] axisys: has joined #ruby
[07:31:55] ndrei: has joined #ruby
[07:32:06] konsolebox: has joined #ruby
[07:32:16] Spami: has joined #ruby
[07:32:20] ascarter: has joined #ruby
[07:32:23] leat3: has joined #ruby
[07:33:35] tesuji_: has joined #ruby
[07:33:46] tesuji_: has joined #ruby
[07:34:41] dreinull75: has joined #ruby
[07:35:21] pawnbox_: has joined #ruby
[07:35:32] moeabdol: has joined #ruby
[07:36:13] tkuchiki: has joined #ruby
[07:37:59] weemsledeux: has joined #ruby
[07:39:43] zlogan85: has joined #ruby
[07:40:14] DoubleMalt: has joined #ruby
[07:48:15] krz: has joined #ruby
[07:48:39] robbyoconnor: has joined #ruby
[07:48:47] robbyoconnor: has joined #ruby
[07:48:59] barhum2013: has joined #ruby
[07:50:13] anisha: has joined #ruby
[07:50:44] johnny5: has joined #ruby
[07:51:34] senayar: has joined #ruby
[07:52:17] juanpablo____: has joined #ruby
[07:53:08] lipoqil: has joined #ruby
[07:53:50] johnny86: has joined #ruby
[07:54:59] JohnnyTao: has joined #ruby
[07:57:38] nhhagen: has joined #ruby
[07:58:11] JohnnyTao: has joined #ruby
[07:59:39] freezevee: has joined #ruby
[07:59:58] CustosLimen: has joined #ruby
[08:00:32] marr: has joined #ruby
[08:01:44] jenrzzz: has joined #ruby
[08:02:02] rdark: has joined #ruby
[08:02:26] c0m0: has joined #ruby
[08:03:25] joonty: has joined #ruby
[08:05:28] krisquigley: has joined #ruby
[08:05:38] vdamewood: has joined #ruby
[08:05:50] mikecmpbll: has joined #ruby
[08:06:00] Iskarlar: has joined #ruby
[08:06:46] Radar: What's a good Ruby project to start newbies off on?
[08:06:56] Radar: Not the koans.
[08:07:21] moeabdol: has joined #ruby
[08:07:39] OrbitalKitten: has joined #ruby
[08:08:11] gagrio_: has joined #ruby
[08:08:29] TheHodge: has joined #ruby
[08:08:31] JohnnyTao: has joined #ruby
[08:10:04] skade: has joined #ruby
[08:10:42] naftilos76: has joined #ruby
[08:11:35] shevy: the classical one would be: "write an IRC bot in ruby"
[08:12:09] shevy: but I think any local project that can automate creation of directories, files, removal of either, showing help options for the script etc... would be a good start. and project organization
[08:12:58] nofxx: has joined #ruby
[08:14:18] meph: has joined #ruby
[08:14:55] michael_mbp: has joined #ruby
[08:17:18] pawnbox: has joined #ruby
[08:18:46] apeiros: write your own webframework is also popular I hear???
[08:19:56] tvw: has joined #ruby
[08:20:49] Zai00: has joined #ruby
[08:21:59] Hounddog: has joined #ruby
[08:23:28] leafybasil: has joined #ruby
[08:23:54] CustosL1men: has joined #ruby
[08:24:47] Rollabunna: has joined #ruby
[08:24:47] ascarter: has joined #ruby
[08:25:28] devoldmx: has joined #ruby
[08:26:06] shevy: apeiros had one written in php
[08:27:48] exadeci: has joined #ruby
[08:29:03] hal_9000__: has joined #ruby
[08:29:35] djbkd: has joined #ruby
[08:30:44] mrityunjay: has joined #ruby
[08:31:32] Steve_Jobs: has joined #ruby
[08:32:17] niemcu: has joined #ruby
[08:32:42] miguelff: has joined #ruby
[08:33:02] ascarter: has joined #ruby
[08:33:02] jgt1: has joined #ruby
[08:33:19] roxtrongo: has joined #ruby
[08:35:16] aswen: has joined #ruby
[08:35:23] Ox0dea: http://git.io/vZGzv
[08:35:31] Ox0dea: What all does instruction verification entail?
[08:35:45] ghr: has joined #ruby
[08:35:48] Ox0dea: It seems like all the necessary information is there in insns.def.
[08:40:59] shevy: you are in pursuit of ko1
[08:42:18] leafybasil: has joined #ruby
[08:44:38] Ox0dea: Or tenderlove: https://gist.github.com/tenderlove/3536045
[08:45:57] yorickpeterse: you must first become oneness with Ruby
[08:47:30] merlinp: has joined #ruby
[08:47:49] zeroDivisible: has joined #ruby
[08:48:40] mprelude: has joined #ruby
[08:49:13] j4cknewt: has joined #ruby
[08:50:25] charliesome: has joined #ruby
[08:50:30] irk: has joined #ruby
[08:51:22] yfeldblum: has joined #ruby
[08:52:46] Igorshp: has joined #ruby
[08:53:24] pontiki: has joined #ruby
[08:53:54] ascarter: has joined #ruby
[08:55:43] niemcu: has joined #ruby
[08:55:49] jgt1: has joined #ruby
[08:58:11] gagrio|mtg: has joined #ruby
[08:58:39] Zai00: has joined #ruby
[08:59:07] ascarter: has joined #ruby
[09:00:07] unsymbol: has joined #ruby
[09:00:52] skade: has joined #ruby
[09:01:08] jonr22: has joined #ruby
[09:01:50] platzhirsch: has joined #ruby
[09:02:04] dumdedum: has joined #ruby
[09:03:04] zeroDivisible: has joined #ruby
[09:03:54] ascarter: has joined #ruby
[09:04:50] arup_r: has joined #ruby
[09:06:00] Zai00: has joined #ruby
[09:07:05] SCHAAP137: has joined #ruby
[09:10:41] ascarter: has joined #ruby
[09:11:10] OrbitalKitten: has joined #ruby
[09:11:36] Gerak_: has joined #ruby
[09:11:48] vmatiyko: has joined #ruby
[09:11:53] Zai00: has joined #ruby
[09:20:20] workmad3: has joined #ruby
[09:22:07] failshell: has joined #ruby
[09:23:14] astrobun_: has joined #ruby
[09:25:07] lacrymology: has joined #ruby
[09:25:58] workmad3: has joined #ruby
[09:26:18] Gerak_: has left #ruby: ()
[09:26:50] charliesome: has joined #ruby
[09:29:56] yashinbasement: has joined #ruby
[09:31:23] ScriptGeek: has left #ruby: ()
[09:33:12] sagittarian: has joined #ruby
[09:33:50] astrobun_: has joined #ruby
[09:33:52] Zai00: has joined #ruby
[09:34:25] roxtrongo: has joined #ruby
[09:35:24] levifig: has joined #ruby
[09:37:44] unsymbol: has joined #ruby
[09:41:02] juanpablo____: has joined #ruby
[09:41:12] Zai00: has joined #ruby
[09:42:30] mercerist: has joined #ruby
[09:42:56] Macaveli: has joined #ruby
[09:42:59] mrityunjay: has joined #ruby
[09:43:09] barhum2013: has joined #ruby
[09:43:40] Macaveli: has joined #ruby
[09:44:05] bigkevmcd: has joined #ruby
[09:45:38] jenrzzz: has joined #ruby
[09:46:18] zlogan85: has joined #ruby
[09:46:21] Zai00: has joined #ruby
[09:52:27] Unopoo: has joined #ruby
[09:52:58] PierreRambaud: has joined #ruby
[09:58:19] charliesome: has joined #ruby
[10:01:44] bkxd: has joined #ruby
[10:01:58] CloCkWeRX: has left #ruby: ()
[10:02:48] Rurik: has joined #ruby
[10:04:16] doddok: has joined #ruby
[10:04:18] solocshaw1: has joined #ruby
[10:06:26] bronson: has joined #ruby
[10:09:11] dmolina: has joined #ruby
[10:09:16] j4cknewt: has joined #ruby
[10:12:44] Zai00: has joined #ruby
[10:13:45] Iskarlar: has joined #ruby
[10:14:48] gagrio|mtg: has joined #ruby
[10:16:22] xcesariox: has joined #ruby
[10:16:34] stamina: has joined #ruby
[10:16:54] bigkevmcd: has joined #ruby
[10:18:24] Iskarlar: has joined #ruby
[10:19:25] AlexRussia: has joined #ruby
[10:19:55] xylotism: has joined #ruby
[10:20:19] rickmasta: has joined #ruby
[10:22:09] apt-get: has joined #ruby
[10:22:29] xylotism: has joined #ruby
[10:22:36] Zai00: has joined #ruby
[10:22:56] lostinmalloc: has joined #ruby
[10:23:29] xylotism: has joined #ruby
[10:24:10] porfa: has joined #ruby
[10:25:40] Rollabunna: has joined #ruby
[10:26:12] devoldmx: has joined #ruby
[10:27:05] sagittarian: is there a set data structure built in in ruby?
[10:27:50] [k-: &ri Set
[10:27:50] `derpy: http://www.rubydoc.info/stdlib/set/Set
[10:30:20] David27: has joined #ruby
[10:32:27] Zai00: has joined #ruby
[10:32:42] Macaveli: has joined #ruby
[10:32:50] OrbitalKitten: has joined #ruby
[10:34:35] bkxd_: has joined #ruby
[10:34:54] yardenbar: has joined #ruby
[10:34:59] robh71: has joined #ruby
[10:36:03] shazaum_: has joined #ruby
[10:36:32] Lildirt: has joined #ruby
[10:37:58] Iskarlar: has joined #ruby
[10:39:15] Ox0dea: has joined #ruby
[10:40:02] Ox0dea: &ri BloomFilter
[10:40:02] `derpy: No results
[10:40:31] Zai00: has joined #ruby
[10:40:59] phutchins: has joined #ruby
[10:41:17] sagittarian: is there a nice way to get (and maybe delete) an arbitrary element from a set?
[10:41:56] sagittarian: and what would it be?
[10:42:42] Rollabunna: has joined #ruby
[10:43:13] Ox0dea: >> require 'set'; foo = Set.new([1,2,3]); foo -= [2]; foo
[10:43:14] ruboto: Ox0dea # => #<Set: {1, 3}> (https://eval.in/430496)
[10:43:45] sagittarian: that's if I have a specific element in mind
[10:43:51] astrobun_: has joined #ruby
[10:43:52] Ox0dea: Or just Set#delete to modify the Set in-place.
[10:43:54] sagittarian: I just want to get some element, don't care which
[10:44:02] sagittarian: like python's set.pop
[10:44:29] sagittarian: and I'd prefer to not convert it to an array, if possible
[10:44:34] sagittarian: seems a waste
[10:44:46] rodfersou: has joined #ruby
[10:44:47] mradmacher: has joined #ruby
[10:45:14] sagittarian: if the method were called pop it would work something like this:
[10:45:25] sagittarian: foo = Set.new([1,2,3])
[10:45:32] jhass: do you actually add duplicate elements to the set?
[10:45:32] sagittarian: foo.pop #=> 2
[10:45:57] sagittarian: I might, not sure
[10:46:11] jhass: might be easier to keep an array for now
[10:46:16] jhass: which is #pop and #sample
[10:46:30] jhass: (and #uniq)
[10:46:39] Ox0dea: >> foo = {1=>1, 2=>2, 3=>3}; [foo.delete(foo.keys.samepl), foo] # sagittarian
[10:46:40] ruboto: Ox0dea # => undefined method `samepl' for [1, 2, 3]:Array (NoMethodError) ...check link for more (https://eval.in/430497)
[10:46:41] sagittarian: I'm actually translating some python code to ruby and the python code uses a set, so I'd rather stick to the same algorithm
[10:46:47] Ox0dea: >> foo = {1=>1, 2=>2, 3=>3}; [foo.delete(foo.keys.sample), foo] # sagittarian
[10:46:48] ruboto: Ox0dea # => [2, {1=>1, 3=>3}] (https://eval.in/430498)
[10:46:55] Ox0dea: In the event you actually do want a "set".
[10:47:10] sagittarian: okay I could fake it with a hash
[10:47:13] Ox0dea: sagittarian: You should probably endeavor to understand the code before translating it.
[10:47:17] sagittarian: but i need the set difference operation :-(
[10:47:27] jhass: array provides most of them
[10:47:36] sagittarian: Ox0dea: i do endeavor to understand it
[10:47:45] bmurt: has joined #ruby
[10:47:53] Ox0dea: By translating it line-for-line?
[10:48:07] sagittarian: among other things, yes
[10:48:18] Rollabunna: has joined #ruby
[10:48:23] Ox0dea: Missed opportunity to use "inter alia".
[10:48:23] jhass: >> [[1, 2, 3] - [2, 3, 4], [1, 2, 3] ^ [2, 3, 4]]
[10:48:24] ruboto: jhass # => undefined method `^' for [1, 2, 3]:Array (NoMethodError) ...check link for more (https://eval.in/430499)
[10:48:30] sagittarian: i like english
[10:48:57] jhass: hrm, I always assume it has xor too :(
[10:49:10] Hrorek: has joined #ruby
[10:49:19] sagittarian: >> [1,2,3] - [2,3,4]
[10:49:20] ruboto: sagittarian # => [1] (https://eval.in/430502)
[10:49:24] Ox0dea: jhass: https://bugs.ruby-lang.org/issues/11315
[10:49:26] Ox0dea: Vote for me?
[10:49:28] sagittarian: nice, maybe that's good enough
[10:49:36] sagittarian: >> [1,2,2,3] - [2,3,4]
[10:49:37] ruboto: sagittarian # => [1] (https://eval.in/430503)
[10:50:50] Ox0dea: nobu pretty much rewrote (and, of course, improved) the whole thing, but that's just another reason for it to have gone in by now. :/
[10:53:17] allomov: has joined #ruby
[10:53:27] poli: has joined #ruby
[10:56:30] allomov: has joined #ruby
[11:00:22] leat3: has joined #ruby
[11:01:41] [k-: vote for me, vote for change!
[11:01:46] zlogan85: has joined #ruby
[11:01:48] [k-: empower your future!
[11:02:02] [k-: ACTION cues music
[11:03:55] sevenseacat: has joined #ruby
[11:04:59] greenarrow: has joined #ruby
[11:07:10] Rurik: has joined #ruby
[11:07:56] sdothum: has joined #ruby
[11:14:53] Iskarlar: has joined #ruby
[11:16:47] tvw: has joined #ruby
[11:17:48] dhjondoh: has joined #ruby
[11:17:54] fgo: has joined #ruby
[11:19:01] ponga: has joined #ruby
[11:19:38] allcentury: has joined #ruby
[11:20:15] greenarrow: has joined #ruby
[11:21:07] jgt1: has joined #ruby
[11:22:01] northfurr: has joined #ruby
[11:22:52] failshell: has joined #ruby
[11:24:34] syath: has joined #ruby
[11:26:15] athinggoingon: has joined #ruby
[11:26:39] platzhirsch: has joined #ruby
[11:27:45] d10n-work: has joined #ruby
[11:27:46] northfurr: has joined #ruby
[11:27:52] Macaveli: has joined #ruby
[11:28:05] northfurr_: has joined #ruby
[11:28:07] jonr22: has joined #ruby
[11:29:50] juanpablo____: has joined #ruby
[11:29:59] pepperbreath: has joined #ruby
[11:30:34] Ox0dea: has joined #ruby
[11:30:49] pokmo: has joined #ruby
[11:31:05] pokmo: i'm very new to ruby. i've cloned a project from github and now trying to run 'bundle install'
[11:31:29] pokmo: but i get an error saying rbenv: version `ruby-2.1.0' is not installed i have ruby 2.2.3 on my system though
[11:31:38] pokmo: does anyone know why this might be happening?
[11:31:47] ljarvis: i reckon ruby 2.1 isn't installed
[11:32:00] Ox0dea: pokmo: Do you mind naming the project?
[11:32:07] pokmo: ljarvis: but is 2.2.3 not backward compatible?
[11:32:20] pokmo: Ox0dea: thingspeak https://github.com/iobridge/thingspeak
[11:32:29] MeMeK: has joined #ruby
[11:32:39] Ox0dea: pokmo: You should just be able to remove that .ruby-version file.
[11:32:43] Ox0dea: Or else modify it accordingly.
[11:33:10] pokmo: i'll change it to 2.2.3?
[11:33:13] Ox0dea: Go for it.
[11:33:20] pokmo: looking good!
[11:33:26] Ox0dea: Excellent.
[11:33:32] Ox0dea: Sure thing.
[11:33:43] pokmo: i come from a python background. does ruby have something like python's virtualenv?
[11:34:06] Ox0dea: Gemsets, mostly.
[11:34:16] jenrzzz: has joined #ruby
[11:34:24] Ox0dea: And version managers, of course, if that's something virtualenv does.
[11:34:34] pokmo: does bundle install need to be run after each modification made to the source?
[11:35:02] pokmo: good. because it's taking a long time :)
[11:35:10] roxtrongo: has joined #ruby
[11:35:25] Ox0dea: Well, thingspeak has quite a lot of dependencies.
[11:35:26] northfurr_: has joined #ruby
[11:35:27] pontiki: has joined #ruby
[11:35:32] atmosx: I have this: a = 1.upto(4).to_a ... but then I want to prin tthis like 1 2 3 4 ... not 1, 2, 3... any ideas?
[11:35:57] pokmo: Ox0dea: indeed. but how do you tell?
[11:36:07] banister: has joined #ruby
[11:36:09] Ox0dea: pokmo: Look at its Gemfile.
[11:36:14] ljarvis: atmosx: .join
[11:36:20] atmosx: ljarvis: yeah ty
[11:36:55] but3k4: has joined #ruby
[11:37:49] ldnunes: has joined #ruby
[11:37:52] Asher: has joined #ruby
[11:38:34] pokmo: hmm when i run bundle install, it tries to install eventmachine 1.0.3, but it isn't specified in Gemfile
[11:38:39] platzhirsch: has joined #ruby
[11:38:51] pokmo: is there a way to find out what depends on it?
[11:38:56] atmosx: as always, the problem is more complex than it appears to be. Hm.
[11:39:01] Ox0dea: pokmo: That's a dependency specified by some other dependency.
[11:39:02] atzorvas: has joined #ruby
[11:39:07] DanielI: has joined #ruby
[11:39:09] pontiki: you can look in Gemfile.lock
[11:39:09] gagrio|mtg: has joined #ruby
[11:39:28] Ox0dea: atmosx: What's complex about #join?
[11:40:10] atmosx: Ox0dea: not about join, but about the my situation. I'm displaying some... you know what :-P I'd rather eat first and discuss it later. hehe brb.
[11:40:26] morenoh149: has joined #ruby
[11:41:54] dgutierrez1287: has joined #ruby
[11:43:21] Mon_Ouie: has joined #ruby
[11:43:35] pokmo: this is my Gemfile.lock does anyone know which package depends on eventmachine (1.0.3)?
[11:43:46] pokmo: because i'm on osx 10.10 and apparently i need 1.0.4 instead
[11:44:31] pokmo: 1.0.4 has 2.2 compatibility and 1.0.3 doesn't
[11:47:00] pontiki: when you say "this", i'm not sure what you mean, pokmo
[11:47:12] MeMeK: has left #ruby: ()
[11:47:24] pokmo: forgot to paste: http://pastebin.com/Z67uTuNj
[11:47:25] ruboto: pokmo, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/66aed2f83a9a896d8fe1
[11:47:25] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[11:48:25] pontiki: if you see the number of times eventmachine is listed under another package, you can tell which need it, and follow the chain back up to the top
[11:49:24] xylotism: has joined #ruby
[11:49:59] pontiki: so it looks like tweetstream
[11:50:02] pokmo: pontiki: so it's ZenTest 4.5. i wonder if there's a way to force it to take eventmachine 1.0.4?
[11:50:07] pokmo: oh is it?
[11:50:53] dionysus69: has joined #ruby
[11:51:01] pokmo: pontiki: eventmachine (1.0.3) is under ZenTest (~> 4.5) isn't it?
[11:51:28] pontiki: not that i'm seeing...
[11:51:44] zlogan85: has joined #ruby
[11:51:47] sepp2k: has joined #ruby
[11:51:48] pontiki: i don't see anything listed under ZenTest: https://gist.github.com/anonymous/66aed2f83a9a896d8fe1#file-ruby-rb-L36
[11:53:05] pokmo: pontiki: hmm i'm getting different indentation https://gist.github.com/anonymous/66aed2f83a9a896d8fe1#file-ruby-rb-L77
[11:53:15] Kallis: has joined #ruby
[11:53:31] pontiki: autotest-rails is dependent on ZenTest
[11:54:33] Kallis: has joined #ruby
[11:54:49] pokmo: pontiki: so eventmachine 1.0.3 is here https://gist.github.com/anonymous/66aed2f83a9a896d8fe1#file-ruby-rb-L133 how do you tell it's tweetstream that needs it?
[11:55:07] ayonkhan: has joined #ruby
[11:55:43] ruurd: has joined #ruby
[11:56:08] pontiki: so eventmachine as a dependency is listed on lines 122 for em-http-request, 125 for em-socksify, and 128 for em-twitter
[11:56:16] porfa: has joined #ruby
[11:56:28] pontiki: so you look at what uses em-http-request, em-socksify and em-twitter
[11:56:58] Ox0dea: pontiki: I think it's probably just ZenTest's capitalization that's got you confused here.
[11:57:03] Ox0dea: >> 'Z' < 'a'
[11:57:04] ruboto: Ox0dea # => true (https://eval.in/430550)
[11:57:14] Ox0dea: pontiki: Sorry; that was for pokmo.
[11:57:28] pontiki: em-socksify is used by em-http-request, so that's easy. em-http-request and em-twitter are used by tweetstream
[11:57:38] bmurt: has joined #ruby
[11:57:45] dhjondoh: has joined #ruby
[11:58:05] pokmo: pontiki: right. but it decides to pick 1.0.3 to be installed rather than another version like 1.0.4 because it's the minimal satisfiable version, due to em-http-request's dependency on >=1.0.3?
[11:58:30] tagrudev: has joined #ruby
[11:58:42] ruby[bot]: has joined #ruby
[11:58:54] pontiki: you can put eventmachine in your Gemfile with the dependency you require
[11:58:57] pokmo: Ox0dea: yeah, funny i see different indentation though
[11:59:22] pokmo: pontiki: right. i'll try that
[11:59:41] pokmo: i ran bundle update eventmachine
[11:59:47] pokmo: and that seem to have done the trick :\
[12:00:39] pokmo: but i'll add to Gemfile like you suggested
[12:00:45] pontiki: you something different from this? https://www.dropbox.com/s/e3d6mn4mcy0ks5d/gemfile-lock-indentation.jpg?dl=0
[12:02:02] leat3: has joined #ruby
[12:02:42] pokmo: pontiki: i saw 'specs:' and 'Zentest (~> 4.5)' being on the same level
[12:02:45] hays: if I want to create a scanner/parser (e.g. flex-bison) in ruby is there a gem I should be looking at?
[12:02:55] tomaz_b: has joined #ruby
[12:03:08] pontiki: this? https://www.dropbox.com/s/2udsml5z4pxv0ef/gemfile-lock-indentation-zentest.jpg?dl=0
[12:03:23] pokmo: which led me to believe 'eventmachine (1.0.3)' was under Zentest (~> 4.5)
[12:04:12] pokmo: i don't why it happened. probably the js mucked up
[12:04:49] pokmo: it's ok now though
[12:05:10] Unopoo1: has joined #ruby
[12:05:48] yqt: has joined #ruby
[12:06:11] zlogan85: has joined #ruby
[12:06:21] timonv: has joined #ruby
[12:06:36] rbennacer: has joined #ruby
[12:07:30] Macaveli: has joined #ruby
[12:07:38] Rurik: has joined #ruby
[12:08:09] pokmo: thanks. now i can get started :)
[12:09:01] dhjondoh: has joined #ruby
[12:09:42] freezevee: I am trying to create a script to ping sweep my subnet https://gist.github.com/chrisvel/a049139836d058a2314a and executing it with ruby 2.2 in OSX
[12:09:54] freezevee: although it runs, the output is strange
[12:11:55] fostertheweb: has joined #ruby
[12:11:57] devoldmx: has joined #ruby
[12:12:01] CloCkWeRX: has joined #ruby
[12:12:01] freezevee: I feel like osx opens too many connections and then fails
[12:12:16] freezevee: by "Too many open files"
[12:12:21] freezevee: can anyone please help ?
[12:13:43] [k-_: has joined #ruby
[12:14:05] yorickpeterse: open less files
[12:14:13] joonty: has joined #ruby
[12:14:18] yorickpeterse: You have 255 threads opening sockets
[12:14:33] yorickpeterse: So either use less threads, or increase the maximum amount of files you can open
[12:14:42] yorickpeterse: IIRC you can do that using uname, but I'm not 100% sure
[12:16:08] Iskarlar: has joined #ruby
[12:16:10] rickmasta: has joined #ruby
[12:17:24] pawnbox: has joined #ruby
[12:18:20] freezevee: yorickpeterse: how can I open less threads ?
[12:18:31] freezevee: loop then in chunks of 10 for example ?
[12:18:50] freezevee: I don't think it's a good idea to increase the amount of files I can open ?
[12:18:59] fgo: has joined #ruby
[12:19:07] yorickpeterse: Simply start less threads
[12:19:19] yorickpeterse: You can speed things up by not using ping but just by using Ruby's Socket library
[12:19:32] yorickpeterse: though you'd have to connect to a specific port
[12:20:46] code1o6: has joined #ruby
[12:20:48] Fire1o6: has joined #ruby
[12:22:26] atomical: has joined #ruby
[12:22:31] Oka: has joined #ruby
[12:23:36] failshell: has joined #ruby
[12:25:12] fostertheweb: has joined #ruby
[12:26:21] d0p: has joined #ruby
[12:26:25] d0p: guys how do i install gem
[12:26:29] d0p: command line
[12:26:41] zeroDivisible: has joined #ruby
[12:27:24] d0p: has left #ruby: ("WeeChat 1.3")
[12:27:52] ItSANgo: has joined #ruby
[12:28:21] greenarrow: sudo gem install foo?
[12:29:58] JulioPapel: has joined #ruby
[12:31:07] rushed: has joined #ruby
[12:32:30] dorei: has joined #ruby
[12:34:29] mikecmpbll: has joined #ruby
[12:35:00] fostertheweb: has joined #ruby
[12:35:03] ukd1: has joined #ruby
[12:35:32] Iskarlar: has joined #ruby
[12:36:11] jonr22: has joined #ruby
[12:36:27] decoponio: has joined #ruby
[12:37:24] jonr22: has joined #ruby
[12:37:46] fgo: has joined #ruby
[12:38:20] tkuchiki: has joined #ruby
[12:40:04] CloCkWeRX: has joined #ruby
[12:40:30] Bish: hi guys, can somebody help me with understand how celluloid is usually used?
[12:41:09] northfurr: has joined #ruby
[12:41:11] Bish: im trying to understand a gem for the sake of learning.. it has a server and a connection class ( which than handles the stuff ) i understand how it works, but i have no clue how i would write an adapter for that
[12:41:15] Oog: has joined #ruby
[12:41:35] apt-get: has joined #ruby
[12:42:04] Bish: https://github.com/abstractive/celluloid-smtp this is the gem im talking about
[12:42:32] Bish: issues says he has to add documentation for adding event functions :D
[12:43:22] atmosx: freezevee: https://gist.github.com/atmosx/93ac2f32587dfc8a115d I'm on OSX too. I had no problems at all.
[12:44:03] blackjid: has joined #ruby
[12:44:05] xylotism: has joined #ruby
[12:44:10] Gnomethrower: has joined #ruby
[12:45:53] hays: has joined #ruby
[12:47:31] apt-get: has joined #ruby
[12:47:43] niko: has joined #ruby
[12:47:52] enebo: has joined #ruby
[12:48:10] DanielI: has joined #ruby
[12:48:32] tkuchiki: has joined #ruby
[12:49:23] niko: has joined #ruby
[12:49:27] porfa: has joined #ruby
[12:49:32] otherj: has joined #ruby
[12:49:41] freezevee: atmosx: but you use NetPing
[12:49:50] victortyau: has joined #ruby
[12:49:51] freezevee: atmosx: thanks for the code
[12:50:13] freezevee: atmosx: I wanted to build something from scratch to see how command output works with ruby
[12:50:39] otherj: has joined #ruby
[12:51:21] lone_stranger: has joined #ruby
[12:51:23] i: has joined #ruby
[12:51:39] centrx: has joined #ruby
[12:51:46] otherj: has joined #ruby
[12:52:23] sankaber: has joined #ruby
[12:52:53] otherj: has joined #ruby
[12:53:28] Zai00: has joined #ruby
[12:53:30] davispuh: has joined #ruby
[12:53:43] otherj: has joined #ruby
[12:53:54] freezevee: however, not limiting threads doesn't seem right to me
[12:54:32] zlogan85: has joined #ruby
[12:54:50] otherj: has joined #ruby
[12:55:12] pawnbox: has joined #ruby
[12:55:55] otherj: has joined #ruby
[12:59:06] imperator: has joined #ruby
[12:59:20] JamesDH: has joined #ruby
[12:59:39] sgambino: has joined #ruby
[13:00:24] Gnomethrower: has joined #ruby
[13:00:43] charliesome: has joined #ruby
[13:03:13] Bish: fuck me, this is making me nuts
[13:03:33] awk: what fucking yourself?
[13:04:00] Bish: not literally, but yeah
[13:04:06] Bish: cannot be so hard to use this gem
[13:04:10] symbol: has joined #ruby
[13:05:16] davispuh: has joined #ruby
[13:06:19] Bish: if anyone could help me, i would be grateful
[13:06:49] apt-get: has joined #ruby
[13:07:36] dblessing: has joined #ruby
[13:08:58] JamesDH: has joined #ruby
[13:09:27] awk: help you with what
[13:10:06] newbie1: has joined #ruby
[13:10:08] charliesome: has joined #ruby
[13:10:10] Bish: telling me how this is supposed to be used: https://github.com/abstractive/celluloid-smtp
[13:10:17] griffindy: has joined #ruby
[13:10:23] Bish: there is no documentation / im not ultra-familiar with celluloid, but i think it's awesome
[13:10:31] Bish: i don't know how and where to overwrite those event functions
[13:10:36] shevy: that dude was too lazy to write docu
[13:11:03] awk: why do you want to use it
[13:11:14] Bish: well, obviously to receive mails
[13:11:20] Bish: or send, whatever
[13:11:45] awk: but why this one...
[13:11:58] Bish: it has celluloid, other stuff i use uses it, i like concurrency,rbx
[13:12:12] unsymbol: has joined #ruby
[13:12:33] Bish: it has been good so far, and i would love to learn usage of it, im also willing to contribute to this gem.. but i cannot find a start, this never happened to me when using a gem
[13:12:42] devoldmx: has joined #ruby
[13:12:50] Bish: i don't know if i have to create my own connection class, or server class or anything
[13:13:22] pawnbox_: has joined #ruby
[13:13:25] JamesDH: has joined #ruby
[13:13:27] fostertheweb: has joined #ruby
[13:14:19] [k-_: there are examples in the repo
[13:14:20] awk: I would never use that, but good luck.. i'd go with postfix and use net/smtp
[13:14:35] Bish: yeah the examples don't use the code
[13:14:46] Bish: awk doesn't help you if u want to receive mails
[13:14:55] whippythellama: has joined #ruby
[13:14:57] Bish: the examples don't use the code, OR are very basic
[13:15:13] kedibasi: has joined #ruby
[13:15:33] awk: Bish: hence I said postfix + net/smtp
[13:15:48] awk: I wouldn't trust that as a MTA... someone will exploit it
[13:17:43] kp666: has joined #ruby
[13:17:44] Bish: awk, you cannot receive emails with net/smtp, am i wrong about that?
[13:18:08] awk: Bish: "postfix" to recieve mails...
[13:18:16] awk: net/smtp to speak to the MTA
[13:18:27] awk: I wouldn't trust some dudes 'home made MTA'...
[13:18:50] Bish: well what's the worst that can happen:3 someone spams with your mailserver
[13:18:53] juanpablo____: has joined #ruby
[13:18:55] NeverDie: has joined #ruby
[13:19:11] Bish: end of list, and none will put effort into that, there are easier ways to spam, don't you think so
[13:19:51] JamesDH: has joined #ruby
[13:19:52] mradmacher: has left #ruby: ()
[13:20:23] JamesDH: has left #ruby: ()
[13:20:50] [k-_: https://github.com/abstractive/celluloid-smtp/blob/master/lib/celluloid/smtp/extensions.rb
[13:20:52] FernandoBasso: has joined #ruby
[13:20:57] [k-_: it's probably not finished
[13:21:09] FernandoBasso: http://sprunge.us/iaPd?ruby Shouldn't this produce an error?
[13:21:14] denisemccoy: has joined #ruby
[13:21:43] FernandoBasso: >> foo = 'try me'; def show_foo; puts foo; end
[13:21:44] ruboto: FernandoBasso # => :show_foo (https://eval.in/430594)
[13:21:51] Mon_Ouie: Well executing show_foo would
[13:22:04] FernandoBasso: I missed that.
[13:22:09] jonr2219: has joined #ruby
[13:23:31] Bish: [k-, why should this code tell me it's not finished, and i am willing to invest into it
[13:23:42] Bish: but maybe i will just use eventmachine, it has a smtp implementation afaik
[13:23:47] zeroDivisible: has joined #ruby
[13:23:49] FernandoBasso: Mon_Ouie: Thanks.
[13:23:52] unsymbol: has joined #ruby
[13:24:56] malconis: has joined #ruby
[13:25:25] redmaverick: has joined #ruby
[13:25:51] chipotle: has joined #ruby
[13:26:10] malconis: has joined #ruby
[13:26:15] Guest49: has joined #ruby
[13:26:29] dionysus69: has joined #ruby
[13:27:39] [k-_: Bish: Extensions basically does nothing except give you logging abilities and some constants
[13:27:54] charliesome: has joined #ruby
[13:28:13] Polysics: has joined #ruby
[13:28:54] roxtrongo: has joined #ruby
[13:30:18] rbennacer: has joined #ruby
[13:30:35] failshell: has joined #ruby
[13:30:54] theRoUS: has joined #ruby
[13:31:18] centrx: has joined #ruby
[13:31:49] Bish: awk, well i have to be able to receive all emails there are , how would you do that with not controlling 100% of your mta?
[13:32:09] rbennacer: has joined #ruby
[13:32:43] jespada: has joined #ruby
[13:32:45] Iskarlar: has joined #ruby
[13:32:47] joonty: has joined #ruby
[13:32:59] failshell: has joined #ruby
[13:34:24] absolutejam: has joined #ruby
[13:35:14] esauOp: has joined #ruby
[13:35:57] theery: has joined #ruby
[13:36:01] jobewan: has joined #ruby
[13:38:35] NeverDie: has joined #ruby
[13:39:43] iamvery: has joined #ruby
[13:41:12] morenoh149: has joined #ruby
[13:42:45] melter: has joined #ruby
[13:43:13] OrbitalKitten: has joined #ruby
[13:43:58] theery: has joined #ruby
[13:45:56] Alayde: has joined #ruby
[13:46:04] imperator: has left #ruby: ("Leaving")
[13:47:43] aaeron: has joined #ruby
[13:47:55] krz: has joined #ruby
[13:49:28] allcentury: has joined #ruby
[13:50:32] quazimodo: has joined #ruby
[13:50:44] quazimodo: any celluloid::io experienced people in here?
[13:50:49] quazimodo: ACTION is trying to learn
[13:51:19] DCameronMauch: has joined #ruby
[13:51:47] DCameronMauch: Does anyone know how to setup fiddle to call C function that takes an array of ints?
[13:51:54] shevy: quazimodo and Bish are on the celluloid run!
[13:52:01] DCameronMauch: the Google has failed me
[13:52:27] Bish: quazimodo, im experienced in not getting experience about celluloid
[13:52:31] husanu: has joined #ruby
[13:52:58] quazimodo: I'm curious how things work in reel if each actor lives in a native thread, and each websocket connection is handled by an actor
[13:53:13] quazimodo: it becomes nigh impossible to have lots of open sockets, no?
[13:54:55] mary5030: has joined #ruby
[13:55:19] zlogan85: has joined #ruby
[13:55:35] mary5030: has joined #ruby
[13:56:21] quazimodo: Bish: know what i'm saying?
[13:56:42] casadei_: has joined #ruby
[13:56:54] JamesDH: has joined #ruby
[13:58:42] livcd: hmm should i keep using join for readibility or is it common to just use * ?
[13:59:03] [k-_: use join.
[13:59:27] [k-_: curses. who taught you * anyway
[14:00:09] FernandoBasso: I read somewhere that Yukihiro hates Lisp. Can someone confirm that statement is true?
[14:00:10] blackjid: has joined #ruby
[14:00:25] quazimodo: livcd: * and join? can you paste that code line?
[14:00:44] shevy: FernandoBasso nope
[14:00:55] Bish: quazimodo, why would it? i don't get what you mean, that is also true for native programs, isn't it?
[14:00:59] shevy: wouldn't make sense for emacs users anyway
[14:01:10] livcd: quazimodo: h.map { |i| i * "=" } * "n"
[14:01:18] [k-_: >> [%w[a b c].join, %w[a b c] * ""]
[14:01:19] ruboto: [k-_ # => ["abc", "abc"] (https://eval.in/430613)
[14:02:04] pyoor: has joined #ruby
[14:02:24] xcesariox: has joined #ruby
[14:02:43] Dopagod: has joined #ruby
[14:02:43] Dopagod: has joined #ruby
[14:02:46] quazimodo: Bish: well as far as I can see, having more than 1 native thread per core is not so great
[14:02:46] [k-_: >> [1 * "=", "m" * "1", %w[1 1 1] * "="]
[14:02:47] ruboto: [k-_ # => String can't be coerced into Fixnum (TypeError) ...check link for more (https://eval.in/430614)
[14:02:48] leat3: has joined #ruby
[14:02:55] [k-_: >> ["m" * "1", %w[1 1 1] * "="]
[14:02:57] ruboto: [k-_ # => no implicit conversion of String into Integer (TypeError) ...check link for more (https://eval.in/430615)
[14:03:02] FernandoBasso: shevy: I even find lots of lisp ideas in ruby.
[14:03:08] Bish: quazimodo, you're ahving more than 1 native thread per core on the very machine you're sitting on, do you notice it?
[14:03:44] [k-_: well all three of them have *
[14:03:45] quazimodo: Bish: they are expensive and context switching happens at the kernel level... osx doesn't even let you have more that 2000 or so in a normal machine
[14:03:56] livcd: guys teach me some of your best tips/tricks in ruby :D
[14:03:59] shevy: the only language matz disliked was C++ and only because it was unproportionally more complex than the others; linus said something similar about C++ so perhaps it is true!
[14:04:15] Bish: quazimodo, i don't know about osx, but that would problably be a reason to ditch it
[14:04:25] [k-_: livcd: https://github.com/SkyBirdSoar/libobf
[14:04:29] Bish: but what you are describing is not a ruby question... since that is true for every native thread
[14:04:30] quazimodo: native threads kinda suck for concurrency
[14:04:31] [k-_: Ox0dea can teach you more
[14:04:53] quazimodo: i honestly thought celluloid actors would have lived on fibers
[14:05:02] Bish: well but threads imply concurrency
[14:05:08] yorickpeterse: "native threads kinda suck for concurrency" what?
[14:05:11] Bish: what you say is not entirely true
[14:05:19] livcd: [k-_: i hate you now :D
[14:05:34] shevy: poor [k-_
[14:05:39] MrFjords: has joined #ruby
[14:05:40] quazimodo: yorickpeterse: yeah they do
[14:05:44] hinbody: has joined #ruby
[14:06:08] Bish: let's say you have 80 threads.. each of these threads is a webserver, if one of those sends data it will be some milliseconds until the data is send / the answer arrives.. that is FUKIN YEAAAARS for a cpu
[14:06:08] yorickpeterse: Maybe if you spawn millions of them, but that's not what you should use threads for
[14:06:23] [k-_: ??\_(???)_/??
[14:06:24] rickmasta: has joined #ruby
[14:06:24] quazimodo: yeah, agreed
[14:06:27] shevy: 80 versus millions!
[14:06:38] Bish: so the thread just goes to sleep until the answer arrives, and another thread is able to process the next job, which is just the name
[14:06:48] quazimodo: so how does having 50000 open websockets work if each socket lives in an actor, which is backed by a native thread?
[14:06:50] joonty: has joined #ruby
[14:07:03] Igorshp: has joined #ruby
[14:07:05] yorickpeterse: You'd have to use a thread pool for it
[14:07:17] yorickpeterse: I highly doubt fibers would scale much better tbh
[14:07:27] moeabdol: has joined #ruby
[14:07:28] yorickpeterse: Ruby isn't Erlang in that regard, sadly
[14:07:32] Bish: that's how our cpus work nowadays, it's that simple
[14:07:46] Bish: yorickpeterse, what does erlang do?
[14:08:02] quazimodo: Bish: i highly recommend you watch this
[14:08:04] [k-_: you've never heard of erlang?
[14:08:10] [k-_: :OOOOOOO
[14:08:22] Bish: ofc i heard of erlang, but i never used it, never heard about how it handles lot of Shit
[14:08:33] quazimodo: http://highscalability.com/blog/2013/5/13/the-secret-to-10-million-concurrent-connections-the-kernel-i.html
[14:08:40] yorickpeterse: Erlang basically uses fibers
[14:08:41] iamvery: has joined #ruby
[14:08:46] yorickpeterse: but better implemented
[14:08:46] juanpablo____: has joined #ruby
[14:08:52] quazimodo: Bish: 1 native thread per core, and the program itself handles it's own soft threads
[14:08:56] yorickpeterse: Though I believe you can still use native threads if you need them
[14:09:04] shevy: whenever I read Erlang, I think of distributed immortal objects that keep on ressing
[14:09:07] quazimodo: 'soft threads' being like fibers
[14:09:09] Iskarlar: has joined #ruby
[14:09:30] denisemccoy: has joined #ruby
[14:09:33] terlar: has joined #ruby
[14:10:01] quazimodo: i think, going off this dude's analysis, even erlang wouldn't be able to easily do more than a few million open connections per machine
[14:10:07] theery: has joined #ruby
[14:10:08] Bish: quazimodo, that's cool and all in case of research but not common, doesn't help you, threads are great
[14:10:12] bigbadbear: has joined #ruby
[14:10:24] quazimodo: Bish: actually it's very practical
[14:10:28] Rubie: has joined #ruby
[14:10:35] Bish: quazimodo, if you know about it so well, why asks fukin questions
[14:10:48] yorickpeterse: Keep it nice people
[14:10:56] Bish: just confused about this guy.
[14:11:04] Bish: im nice, promised
[14:11:24] shevy: do you like cats
[14:11:44] quazimodo: because i'm in the process of exploring the space and learning, I came in asking why tony backed each celluloid actor onto a native thread when we know that they arent so fantastic when you use more than a handful
[14:11:52] quazimodo: and the thing is
[14:11:54] quazimodo: it's relevant
[14:12:12] quazimodo: rails team was discussing switching out event machine for celluloid/reel
[14:12:16] patrick_star: has joined #ruby
[14:12:19] shevy: is that good?
[14:12:27] quazimodo: well i can't understand how it works, Surely they know something i don't so i wanna learn
[14:12:29] otherj: has joined #ruby
[14:12:30] Outlastsheep: has joined #ruby
[14:12:41] theery: has joined #ruby
[14:12:41] shevy: I don't know either so I wanna learn too. Who here will teach us?
[14:12:42] quazimodo: you can't keep thousands and thousands of websockets open 1 per native thread
[14:12:46] yorickpeterse: IIRC the reason for Celluloid using 1 thread per actor is because they haven't had time to change it
[14:12:56] yorickpeterse: I recall reading up on them wanting to move to a thread pool based setup
[14:13:04] chihhsin: has joined #ruby
[14:13:14] quazimodo: yorickpeterse: so that makes a lot of sense
[14:13:30] quazimodo: our company builds a lot of start up company's platforms
[14:13:39] quazimodo: they don't need 5 million concurrent connections any time soon
[14:13:57] Bish: do you have aspergers? just curious.
[14:14:00] quazimodo: and if the do, VC funding'll come and hire the erlang/haskell/wizardry/voodoo programmers
[14:14:14] quazimodo: but... we may need 50000-100000 ?
[14:14:34] yorickpeterse: Bish: last warning, keep it nice
[14:14:36] DCameronMauch: Question: Does anyone know how to setup fiddle to call C function that takes an array of ints?
[14:14:39] quazimodo: Bish: nah you and I ar just diametrically opposed in how we learn maybe?
[14:14:41] yorickpeterse: No passive aggressive bullshit either
[14:14:49] Bish: yorickpeterse, insulting was not my intention there, just the way he writes
[14:15:23] quazimodo: Bish: why can't you be more tolerant of another persons communication style?
[14:15:29] Guest3285: has joined #ruby
[14:15:32] yorickpeterse: Bish: you might want to read up on aspergers
[14:15:38] Bish: im tolerant, i was just curious, sorry, didn't want to insult
[14:15:52] Bish: yorickpeterse, no worries, i did
[14:16:12] quazimodo: you didn't, but if i say what's actually on my mind they'll be on my case
[14:16:12] [k-_: please be mindful of how you phrase your sentences
[14:16:39] kent\n: has joined #ruby
[14:16:45] Ox0dea: has joined #ruby
[14:16:51] Bish: quazimodo, no really, sorry!
[14:17:01] livcd: i have adhd
[14:17:26] quazimodo: livcd: my housemate has that, 1 working eye which is color blind and the best abs you've ever seen
[14:17:58] Ox0dea: >> require 'fiddle'; Fiddle::TYPE_INTPTR_T # DCameronMauch
[14:17:59] ruboto: Ox0dea # => 4 (https://eval.in/430628)
[14:18:02] Ox0dea: That should do, no?
[14:18:17] [k-_: aha! we found Ox0dea!
[14:18:34] [k-_: livcd: Ox0dea: livcd: Ox0dea:
[14:18:35] quazimodo: yorickpeterse: ok i think this makes sense that they'd use a thread pool, i wonder when that's scheduled for. Surely it'll be in the works if rails moves to use reel for it's action cable socket controllers
[14:18:47] Ox0dea: [k-_: I didn't even realize I'd been lost.
[14:18:54] Ox0dea: Why am I being highlighted with livcd?
[14:19:13] [k-_: he has interests in Array#*
[14:19:18] [k-_: and wants to learn more secrets
[14:19:23] [k-_: ???(?????????)??? ??? ???(?????????)??? ??? ???(?????????)???
[14:19:34] [k-_: reveal them all!
[14:19:41] Ox0dea: ???( ??? )??? ???( ??? )??????( ??? )??? ???( ??? )???
[14:19:46] timonv: has joined #ruby
[14:20:00] adaedra: great, another yorickpeterse
[14:20:07] morenoh149: has joined #ruby
[14:20:21] Bish: quazimodo, i was really curious, but im sorry
[14:20:34] quazimodo: Bish: take it easy it's all good man
[14:20:57] Ox0dea: Bish: Are you projecting, mate?
[14:21:10] Bish: Ox0dea, pardon?
[14:21:19] Trynemjoel: has joined #ruby
[14:21:26] Ox0dea: With which word(s) did you have trouble?
[14:21:30] juanpablo____: has joined #ruby
[14:21:30] [k-_: paaaaaaarrrrrrrdooooooooooooon
[14:21:56] Bish: no words, just the way he acted, asking question about something he has already an opinion on
[14:22:26] livcd: Ox0dea: so what are the secrets
[14:22:27] [k-_: why can't he question something he has an opinion of?
[14:22:32] adaedra: ACTION mirrors Ox0dea 
[14:22:38] Ox0dea: ACTION mirrors adaedra
[14:22:49] adaedra: !!!!!ooooooon
[14:22:54] Bish: .. well if the questin is about something you can only have opinions about.. it's weird to ask "what's better"
[14:23:01] Ox0dea: Dammit. He broke the mirror.
[14:23:09] [k-_: ACTION mirrors #ruby srorrsim ybur#
[14:23:09] adaedra: ?!enod uoy evah tahw
[14:23:21] Ox0dea: adaedra: Your interrobang is backward.
[14:23:44] Ox0dea: Do excuse me if it turns out that's how the French do it. :P
[14:23:45] [k-_: it's a baterrogation
[14:24:04] Bish: i could go in here, ask why islam is better and then tell you why it is.. ( implying we're religious )
[14:24:07] livcd: i am getting confused
[14:24:22] [k-_: livcd: drink more water
[14:24:24] Soda: has joined #ruby
[14:24:31] shevy: Bish he just writes a lot, very quickly so - some people have quick fingers, look at [k-_ on the other hand, he can not type at all on his tiny smartphone ;-)
[14:24:34] Bish: anyways i g2g, this is getting to weird either way :D
[14:24:37] Ox0dea: livcd: Are you in search of "weird" Ruby?
[14:24:55] livcd: Ox0dea: i am in search of the ninja skills
[14:24:57] [k-_: Ox0dea: fizzbuzz!
[14:25:06] shevy: class Ninja; end
[14:25:07] Ox0dea: I was only going to post Idiosyncratic Ruby.
[14:25:13] Ox0dea: Ninja = Class.new
[14:25:20] DCameronMauch: Ox0dea, what does the call look like? can't find an example...
[14:25:22] [k-_: livcd: number&1 vs number.even? / number.odd?
[14:25:34] Ox0dea: DCameronMauch: You're invoking Fiddle::Function.new, yes?
[14:25:37] [k-_: ?: vs if then
[14:25:39] DCameronMauch: also how do you direct a comment at a specific user in IRC
[14:25:52] Ox0dea: &ri Fiddle::Function
[14:25:52] `derpy: http://www.rubydoc.info/stdlib/fiddle/Fiddle/Function
[14:25:53] [k-_: &: vs { |x| x. }
[14:25:56] quazimodo: Bish: to be fair you didn't appear aware that native threads are absolutely not the right solution for implementing concurrency at a medium to large scale, which is rookie stuff. Maybe you were aware, but it didn't appear so to me
[14:26:20] [k-_: Ox0dea: tell us more!
[14:26:38] DCameronMauch: I saw the general call for fiddle, but when I am passing a type INTPTR_T?
[14:26:48] [k-_: livcd: Ox0dea made lollipop, a superator library
[14:27:00] Ox0dea: DCameronMauch: In the Array of argument types.
[14:27:15] DCameronMauch: I'm not following
[14:27:28] pyoor: has left #ruby: ()
[14:27:36] DCameronMauch: compute = Fiddle::Function.new(golib['compute'], [Fiddle::TYPE_INTPTR_T], Fiddle::TYPE_INT)
[14:27:39] DanielI: has joined #ruby
[14:27:43] DCameronMauch: puts compute.call([1, 2, 3, 4, 5, 6])
[14:28:02] Ox0dea: Did you ensure you've got a proper handle in `golib`?
[14:28:07] quazimodo: I wonder if the linux kernel's thread scheduler has been fiddled with much since 2013 to make native threads more viable for more simple/naive concurrent servers
[14:28:13] centrx: has joined #ruby
[14:28:18] Ox0dea: It looks correct. :/
[14:28:31] DCameronMauch: blah.rb:6:in `call': no implicit conversion of Array into Integer (TypeError)
[14:28:53] dopamean_: has joined #ruby
[14:28:56] DCameronMauch: if I change the C call to take, say, 3 ints, and pass 3 ints, it works just fine
[14:29:09] aaeron: has joined #ruby
[14:29:13] DCameronMauch: but the array length will be unknown
[14:29:28] quazimodo: hrm they must have, having epoll
[14:29:49] moeabdol: has joined #ruby
[14:30:07] Ox0dea: DCameronMauch: What happens if you use TYPE_VOIDP?
[14:30:19] DCameronMauch: haven't tried that
[14:30:58] DCameronMauch: blah.rb:4:in `[]': unknown symbol "compute" (Fiddle::DLError)
[14:31:06] n008f4g_: has joined #ruby
[14:31:06] DCameronMauch: uh, not sure what happened there
[14:31:31] jgt1: has joined #ruby
[14:31:34] Ox0dea: Essentially, dlopen() couldn't find a matching function.
[14:31:38] livcd: [k-_: which one is lollipop ?
[14:31:47] DCameronMauch: because of the type mismatch I assume?
[14:31:58] DCameronMauch: this is the first time I have seen this message
[14:32:15] Ox0dea: Almost certainly.
[14:32:23] Ox0dea: It does seem Fiddle can't hand off pointers to int. :/
[14:32:41] Ox0dea: What made you switch from FFI, if you don't mind my prying?
[14:32:55] DCameronMauch: is there a way to say "pointer to this array" instead of the array itself?
[14:33:25] Ox0dea: Try Fiddle::Pointer.new(array.object_id * 2).
[14:33:37] leat3: has joined #ruby
[14:33:38] Ox0dea: (Don't ask. :P)
[14:33:45] [k-_: livcd: i have no idea where Ox0dea stowed it to
[14:33:56] Ox0dea: [k-_: The arbitrarily chained unary operators?
[14:34:03] DCameronMauch: got crap for using non-standard library gem
[14:34:19] [k-_: do you not call that lollipop?
[14:34:20] Ox0dea: Can't touch the filesystem, can't use third-party gems.
[14:34:29] DCameronMauch: yep, they are not making this easy
[14:34:33] Ox0dea: [k-_: Yes, I called it Lolliops.
[14:34:35] kent\n: has joined #ruby
[14:34:41] DCameronMauch: getting ready to abandon this line of thought
[14:34:46] Ox0dea: A contraction of "lol-inducing operators", more or less.
[14:34:56] Ox0dea: *Lollipops
[14:35:15] havenwood: has joined #ruby
[14:35:20] dopamean_: has joined #ruby
[14:36:02] [k-_: link it here!
[14:36:04] Ox0dea: [k-_: Tell me why you told livcd about Lollipops.
[14:36:35] chipotle: has joined #ruby
[14:36:36] Ox0dea: https://eval.in/430632
[14:36:51] Ox0dea: It's so ridiculous.
[14:36:59] juanpablo_____: has joined #ruby
[14:37:17] [k-_: imagine -+~object to get OpenSSL::X509::Someshit#some_really_long_method_name? You save a lot of time!
[14:37:21] apipkin: When having keys with a boolean value in a hash, what is the convention of naming the hash key and the look up? { is_active: true } and o[:is_active] ?
[14:37:27] rbennacer: has joined #ruby
[14:37:39] Ox0dea: apipkin: I'd nix the prefix.
[14:37:48] ujjain-: has joined #ruby
[14:37:57] Ox0dea: Same goes for method names in most cases.
[14:38:01] [k-_: (remove is_)
[14:38:13] apipkin: so { active: true} and o[:active] ?
[14:38:23] tomchapin: has joined #ruby
[14:39:36] Ox0dea: apipkin: Happy to help. You know you're allowed to end method names with '?', yes?
[14:39:40] DCameronMauch: Ox0dea, no luck, giving same message about unknown symbol
[14:40:15] apipkin: Ox0dea: I have read/heard that, but didn't know how a hash key would translate to a method
[14:40:16] jgpawletko: has joined #ruby
[14:40:25] apipkin: ACTION is a JavaScript developer generally
[14:40:39] UtkarshRay: has joined #ruby
[14:41:02] Ox0dea: apipkin: No, it won't, at least not without the proper plumbing. I was just going to mention that you should use it for methods that return simple booleans.
[14:41:02] foureight84: has joined #ruby
[14:41:39] johnny86: has joined #ruby
[14:42:43] apipkin: Ah okay! I'll keep that in mind :)
[14:43:42] bigkevmcd: has joined #ruby
[14:43:42] tomchapin: has joined #ruby
[14:44:45] hardtail: has joined #ruby
[14:46:21] larissa: has joined #ruby
[14:46:39] polishdub: has joined #ruby
[14:48:05] rippa: has joined #ruby
[14:48:45] sparr: has joined #ruby
[14:50:21] patrick_star: has joined #ruby
[14:51:22] larissa: has joined #ruby
[14:51:50] sparr: has joined #ruby
[14:53:44] allomov: has joined #ruby
[14:54:05] DCameronMauch: Ox0dea, any idea where I can find out more about how to use Fiddle?
[14:54:27] DCameronMauch: there seems to be almost nothing on the Googles
[14:55:58] [k-: there is nothing on the Googles
[14:56:04] [k-: i tried too :'(
[14:56:26] Ox0dea: DCameronMauch: Everything I know about it comes from random blog posts and personal tinkering.
[14:56:38] DmitryBochkarev: has joined #ruby
[14:57:08] Ox0dea: Sorry I couldn't be of more help in the matter. :/
[14:57:10] DCameronMauch: going to give this 1 more hour and give up
[14:57:17] DCameronMauch: no, thanks for help
[14:57:23] Ox0dea: Have you considered accepting a void * and a length and plucking the ints out that way?
[14:57:58] Ox0dea: It'd make the Go portion less pleasant, but at least you'd get the Fiddle interplay?
[14:58:26] nGx: has joined #ruby
[14:58:30] fostertheweb: has joined #ruby
[14:59:24] pawnbox: has joined #ruby
[15:00:27] DCameronMauch: I have no clue how to do that with Go, but I can look into it
[15:01:28] xylotism: has joined #ruby
[15:03:21] jonr2219: has joined #ruby
[15:03:23] deg__: has joined #ruby
[15:03:59] jonr2219: has joined #ruby
[15:05:47] Rubie: has joined #ruby
[15:06:15] dseitz: has joined #ruby
[15:06:52] barhum2013: has joined #ruby
[15:06:55] The_Phoenix: has joined #ruby
[15:07:01] jmarrec: has joined #ruby
[15:07:21] dman777_alter: has joined #ruby
[15:08:19] nGx: has joined #ruby
[15:09:08] dman777_alter: let(:api_template) { {'name' => 'My Template', 'content'=>'foobar'} } hi, how can extract this into a array ['My Template', 'foobar']?
[15:09:37] jmarrec: has joined #ruby
[15:10:03] Ox0dea: dman777_alter: Hash#values.
[15:10:22] dman777_alter: Ox0dea: thanks
[15:10:25] Ox0dea: Sure thing.
[15:10:46] karmatr0_: has joined #ruby
[15:10:49] [k-_: there is also Hash#keys to get just the keys
[15:10:58] jmarrec: has joined #ruby
[15:11:09] umgrosscol: has joined #ruby
[15:11:58] bruno-: has joined #ruby
[15:12:04] [k-_: quazimodo: your link is gold!
[15:12:09] [k-_: im definitely bookmarking
[15:12:20] jmarrec: has joined #ruby
[15:12:47] Zai00: has joined #ruby
[15:13:26] ndrei: has joined #ruby
[15:13:27] devoldmx: has joined #ruby
[15:14:05] RobertBirnie: has joined #ruby
[15:15:15] naftilos76: has joined #ruby
[15:15:33] quazimodo: [k-_: that lecture? it's amazing
[15:16:03] towski_: has joined #ruby
[15:16:17] Oog: has joined #ruby
[15:17:26] voker57: has joined #ruby
[15:18:13] karmatr0_: Hello guys, Is there any chance to read a part of a stream from a TCPSocket and then clear the remaining bytes in the stream?
[15:19:25] Ox0dea: karmatr0_: You can tell Socket#read how many bytes you want, and it'll read to the end if you don't specify.
[15:19:36] meatherly: has joined #ruby
[15:20:21] David27: has joined #ruby
[15:20:50] chipotle: has joined #ruby
[15:21:01] Ox0dea: logs $ ag 'quazimodo.*http' irc.freenode.#ruby.weechatlog
[15:21:53] [k-_: 22:08:32 quazimodo: http://highscalability.com/blog/2013/5/13/the-secret-to-10-million-concurrent-connections-the-kernel-i.html
[15:22:21] Papierkorb: Ox0dea: the bouncers only shows the last 50 or so lines said after I connect to it. It's gone. [k-_thanks
[15:22:26] symbol: has joined #ruby
[15:22:33] sargas: has joined #ruby
[15:22:44] Ox0dea: Relevant: https://blog.cloudflare.com/kernel-bypass/
[15:22:45] xylotism: has joined #ruby
[15:22:51] Papierkorb: [k-_: that's a 404
[15:22:56] karapetyan: has joined #ruby
[15:23:38] Ox0dea: Papierkorb: [k-_ managed to paste an 0x01 byte.
[15:24:00] Papierkorb: interesting, Konversation shows the junk byte, but FF does not
[15:24:56] karapetyan: res[:sum] += arg if arg > 0
[15:25:18] Ox0dea: karapetyan: Why bother with the conditional?
[15:25:31] Mon_Ouie: Because arg could be negative?
[15:25:37] Ox0dea: I bet it's not relevant here.
[15:25:39] freerobby: has joined #ruby
[15:25:53] Ox0dea: Eh, never mind. That was a baseless assumption.
[15:25:59] karapetyan: if res[:sum] == nil -- raise exception what the best way to avoid it ?
[15:26:10] Ox0dea: karapetyan: Hash.new(0), perhaps.
[15:26:13] michaeldeol: has joined #ruby
[15:26:19] Ox0dea: >> foo = Hash.new(0); foo[:bar] += 1; foo
[15:26:20] ruboto: Ox0dea # => {:bar=>1} (https://eval.in/430657)
[15:26:37] theRoUS: has joined #ruby
[15:26:37] theRoUS: has joined #ruby
[15:26:55] karapetyan: Mon_Ouie: yes, it could be negative
[15:27:09] karapetyan: give me a second
[15:27:47] karapetyan: so, how to define hash element if not defined and increment if it already exist? :)
[15:27:58] Ox0dea: karapetyan: ||=
[15:28:09] Ox0dea: res[:sum] ||= 0; res[:sum] += ....
[15:28:11] karapetyan: res[:sum] += arg if arg > 0
[15:28:23] karapetyan: i can't do ike this res[:sum] ||+= arg if arg > 0
[15:28:40] johnny86: has joined #ruby
[15:28:41] Ox0dea: That's an interesting idea, though. :P
[15:28:45] bluOxigen: has joined #ruby
[15:29:00] [Butch]: has joined #ruby
[15:29:09] jmarrec: has joined #ruby
[15:29:11] leat3: has joined #ruby
[15:29:18] ndrei: has joined #ruby
[15:29:28] shevy: karapetyan hah I knew a haik karapetyan once, he was from armenia
[15:29:37] dionysus69: has joined #ruby
[15:29:51] karapetyan: shevy: hah may be it was my Dad? :)))
[15:30:13] ta: has joined #ruby
[15:30:23] shevy: nah... he should be a bit older than 30 by now
[15:30:26] Ox0dea: Did someone say System of a Down are getting back together?
[15:30:59] karapetyan: shevy: than nope cause i am 27 now :)
[15:31:54] patrick_star: has joined #ruby
[15:32:32] shinnya: has joined #ruby
[15:34:30] mic_e: has joined #ruby
[15:35:21] badfish129: has joined #ruby
[15:36:16] hal_9000: For anyone interested - update on _Elixir for the Functional Rubyist_ - http://rubyhacker.com/hidden/excerpt-from-elixir4rubyists.html
[15:36:21] pietr0: has joined #ruby
[15:36:37] jenrzzz: has joined #ruby
[15:36:42] morenoh149: has joined #ruby
[15:38:18] tkuchiki: has joined #ruby
[15:38:54] freezevee: has joined #ruby
[15:39:06] Ox0dea: hal_9000: The Ruby AnagramFinder isn't particularly "functional"?
[15:39:43] Ox0dea: "Methodist" feels more appropriate. :P
[15:39:57] centrx: has joined #ruby
[15:40:16] mwlang: has joined #ruby
[15:41:09] freezevee: I am doing a ping sweep with threads, then save results to hash and finally to json in a file. Unfortunately they are not sorted by IP address. https://gist.github.com/chrisvel/8075acd0af1978da818c
[15:41:23] senayar: has joined #ruby
[15:42:14] freezevee: I tried to use "sorted_by" and I partially succeeded, they are saved but after 192.168.1.1 comes 192.168.1.10, then 192.168.1.101 etc.
[15:42:20] Ox0dea: freezeve_: You're sorting using lexicographical order.
[15:42:23] freezevee: any ideas how to sort them ?
[15:42:29] freezevee: Ox0dea: that's true
[15:42:31] pontiki: has joined #ruby
[15:42:38] Ox0dea: freezeve_: You just want to sort by the last quad, yes?
[15:42:52] freezevee: Ox0dea: should I add an id to the hash ?
[15:43:02] freezevee: Ox0dea: that's the only thing that crosses my mind
[15:43:15] freezevee: 1, 192.168.1.1, "up"
[15:43:25] Ox0dea: sort_by { |ip, _| ip[/\d+$/].to_i }
[15:43:44] havenwood: hal_9000: Just an aside, but File.open without a block isn't self-closing. Consider `File.read(filename).downcase.split` or `File.readlines(filename).map { |line| line.downcase.chomp }`.
[15:43:50] Ox0dea: freezeve_: That regular expression matches the last sequence of consecutive digits and converts it to an integer so that it gets sorted properly.
[15:43:50] Igorshp: has joined #ruby
[15:44:09] freezevee: Ox0dea: I hate it when I am thinking for hours and you reply in 5 seconds
[15:44:20] PaulCapestany: has joined #ruby
[15:44:23] freezevee: Ox0dea: I mean, when am I going to be like you ?
[15:44:27] Ox0dea: Tomorrow.
[15:44:29] freezevee: I am trying hard
[15:44:37] freezevee: I hope so but no
[15:44:42] Ox0dea: > Constant vigilance!
[15:44:56] Ox0dea: Really, though, just always be on the lookout for something new to learn, and then make sure you get it to stick.
[15:45:13] hal_9000: havenwood: Thanks, I will look. I do know better :)
[15:45:16] havenwood: hal_9000: You could set the default value for a Hash key to an empty Array: hash = Hash.new { |h, k| h[k] = [] }
[15:45:31] Sou|cutter: hal_9000: Not sure why you point out setting the Hash value to an array, but it's a common pattern to condense that by using the Hash initializer that takes a block - hash = Hash.new { |h, k| h[k] = [] } (then you don't need the ||= line)
[15:45:34] freezevee: Ox0dea: it worked
[15:45:42] Sou|cutter: havenwood: jinx
[15:45:42] havenwood: hal_9000: A nit, but `chars` is a bit nicer than `split("")`.
[15:46:00] freezevee: Ox0dea: why | ip, _
[15:46:08] Ox0dea: freezeve_: Because the status is irrelevant to the sort.
[15:46:10] freezevee: what is the role of underscore ?
[15:46:20] centrx: for great justice
[15:46:34] Ox0dea: freezeve_: It's meant to indicate that we need to consume a value, but we don't care what it is.
[15:46:41] Sou|cutter: underscore indicates an unused param
[15:46:44] hal_9000: Sou|cutter: havenwood yes, i do sometimes use the hash initialization
[15:46:45] jacksonmills: has joined #ruby
[15:46:49] Ox0dea: freezeve_: Without the _, `ip` would contain both the key and the value and that would muck things up.
[15:46:55] freezevee: Ox0dea: the regEx is \d for digits, then $ for the end of the string
[15:47:12] Ox0dea: Mind, it's \d+ for "repeated digits".
[15:47:14] havenwood: words.each_with_object(Hash.new { |h, k| h[k] = [] }) { |word, hash| hash[word.chars.sort.join] }
[15:47:34] freezevee: Ox0dea: so how "192.168.1.10" becomes an integer ?
[15:47:45] Sou|cutter: havenwood: missed the << word
[15:47:47] Ox0dea: >> '192.168.1.10'][/\d+$/].to_i # freezeve_
[15:47:48] ruboto: Ox0dea # => /tmp/execpad-49ecdf6fdf66/source-49ecdf6fdf66:2: syntax error, unexpected ']', expecting keyword_end ...check link for more (https://eval.in/430664)
[15:47:53] Ox0dea: >> '192.168.1.10'[/\d+$/].to_i # freezeve_
[15:47:54] ruboto: Ox0dea # => 10 (https://eval.in/430665)
[15:47:57] Ox0dea: Like that.
[15:47:59] havenwood: Sou|cutter: oops! i need coffee, it's getting bad - that's it, i'm getting out of bed
[15:48:00] hal_9000: havenwood: yes, but this isn???t golf ;)
[15:48:13] Ox0dea: freezeve_: The "problem" is that you're storing IP addresses as Strings.
[15:48:22] freezevee: Ox0dea: what do you suggest ?
[15:48:25] lacrymology: has left #ruby: ()
[15:48:34] Ox0dea: freezeve_: Well, there's a standard library?
[15:48:37] freezevee: 4 seperate qud
[15:48:43] mr_snowf1ake: has joined #ruby
[15:48:51] freezevee: standard library for ? sockets ?
[15:48:51] jacksonmills: I think there is even an IP address column type for Postgres. Not sure about other dbs.
[15:49:04] Ox0dea: freezeve_: No, for IP addresses.
[15:49:15] freezevee: as a variable ?
[15:49:25] rcvalle: has joined #ruby
[15:49:30] karapetyan: has joined #ruby
[15:49:32] denisemccoy: has joined #ruby
[15:49:41] Ox0dea: >> require 'ipaddr'; IPAddr.include? Comparable # freezeve_
[15:49:42] ruboto: Ox0dea # => true (https://eval.in/430666)
[15:49:51] suparel: has joined #ruby
[15:49:57] Ox0dea: If you were using that, you could compare IP addresses in earnest.
[15:50:00] havenwood: hal_9000: <3 Ruby, <3 Elixir, checks out!
[15:50:05] suparel: has left #ruby: ()
[15:50:09] rbennacer: has joined #ruby
[15:50:46] mr_snowf`: has joined #ruby
[15:50:49] freezevee: Ox0dea: unbelievable
[15:50:49] icewall: has joined #ruby
[15:50:54] freezevee: Ox0dea: I know, I must read more
[15:51:01] freezevee: I just loved ruby a bit more
[15:51:02] mr_snowf`: has left #ruby: ()
[15:51:15] lbwski: has joined #ruby
[15:51:16] Ox0dea: ACTION gots the warm fuzzies.
[15:51:20] mr_snowf1ake: has joined #ruby
[15:52:08] karapetyan: has joined #ruby
[15:52:21] freezevee: Ox0dea: what's the benefits of using ipaddr ?
[15:52:30] freezevee: an object instead of a string ?
[15:52:33] lbwski: has joined #ruby
[15:52:43] negev: has joined #ruby
[15:52:50] Ox0dea: Aye, that's a big part of it.
[15:53:13] bricker: has joined #ruby
[15:53:27] mr_snowf1ake: hey guys, i did a scan() on some string, and am doing some computation on that. the problem is I want to go back and modify the original string in place. what's the right way of doing that? i know about gsub, but i need to take the matched results and run it through first
[15:53:39] negev: hello, why is i always 1 in the child thread? https://gist.github.com/m4rkw/fd06bd16c584632cf943
[15:53:49] freezevee: Ox0dea: I suppose I save them as host_ip = IPAddr.new('192.168.1.' + host.to_s) ?
[15:54:04] troyready: has joined #ruby
[15:54:13] Ox0dea: freezeve_: Yep, that would do.
[15:54:16] mr_snowf1ake: oh, actually, can i just use gsub(pattern) { } ?
[15:54:17] patrick_star: has joined #ruby
[15:54:21] havenwood: hal_9000: Good luck with the book! I look forward to it.
[15:54:26] bronson: has joined #ruby
[15:54:37] mr_snowf1ake: s/gsub/gsub!/
[15:54:47] j4cknewt: has joined #ruby
[15:54:49] hal_9000: havenwood: thank you! drop me an email sometime
[15:54:51] Ox0dea: hal_9000: I think the dialogue is a nice touch; great for beginners.
[15:54:54] Musashi007: has joined #ruby
[15:55:02] Ox0dea: mr_snowf1ake: Could you perhaps clarify your intent?
[15:55:21] Ox0dea: freezeve_: And because IPAddr includes Comparable, you can just use #sort on an Array of instances.
[15:55:22] Sou|cutter: is the whole book written as a conversation?
[15:55:32] hal_9000: Ox0dea that was johnny???s idea, but I am on board with it now
[15:55:36] freezevee: Ox0dea: but they're a hash
[15:55:50] havenwood: hal_9000: Just have it in mind since it was randomly mentioned in #ruby-offtopic this morning, but I've implemented some of Elixir stdlib in Ruby hoping Rubyists would find it interesting: https://github.com/havenwood/elixir.rb#readme
[15:55:51] hal_9000: Sou|cutter: that is the plan, but if people hate that, it is not too late to change it
[15:55:51] Ox0dea: freezeve_: sort_by(&:first), then.
[15:56:28] hal_9000: that sounds very interesting, will read and bookmark
[15:56:53] mr_snowf1ake: Ox0dea: i'm trying to take a file with lines that start with '#', modify them, and store for later use
[15:57:04] Ox0dea: mr_snowf1ake: You want to store the old or the new?
[15:57:17] icewall: hi guys, looking for direct contact with somebody from dev team. Any active dev here ?
[15:57:30] Ox0dea: icewall: Try #ruby-core?
[15:58:23] Ox0dea: icewall: Godspeed. It's a graveyard, but many of the core devs are at least present. :/
[15:59:11] negev: can anyone tell me why variables changed outside of a Thread are then changed inside the thread? i thought fork() was supposed to take an entire clone of the current context
[15:59:13] Ox0dea: negev: You're seeing those results because for loops leak their variables.
[15:59:26] freezevee: Ox0dea: should I save a hash of object IPs or convert them back to_s ?
[15:59:36] negev: Ox0dea: leak their variables? what does that mean?
[15:59:41] towski_: has joined #ruby
[15:59:42] Ox0dea: >> for i in 1..10; end; i # negev
[15:59:43] ruboto: Ox0dea # => 10 (https://eval.in/430667)
[15:59:46] [k-_: mailing list
[15:59:51] [k-_: get into the mailing list
[15:59:58] amclain: has joined #ruby
[16:00:08] Ox0dea: negev: More accurately, they don't introduce a new scope.
[16:00:30] freezevee: Ox0dea: https://gist.github.com/chrisvel/8075acd0af1978da818c
[16:00:55] momomomomo: has joined #ruby
[16:01:00] negev: Ox0dea: "they"?
[16:01:06] Ox0dea: negev: For loops.
[16:01:21] negev: ok, i don't really understand
[16:01:22] Sou|cutter: hal_9000: I think that could be difficult to keep up for a whole book, my 2 cents. But I think the book idea's great
[16:01:26] SCHAAP137: has joined #ruby
[16:01:41] negev: does Thread.new not create a new context with a copy of the parent's context?
[16:01:52] xylotism: has joined #ruby
[16:01:54] Ox0dea: "Context" is a nebulous term here.
[16:01:59] yardenbar: has joined #ruby
[16:02:09] negev: ok well i = 1
[16:02:14] negev: Thread.new
[16:02:22] negev: is the i referenced in the thread block the same i as the parent block?
[16:02:42] djbkd: has joined #ruby
[16:02:56] xylotism: has joined #ruby
[16:03:20] negev: apparently so
[16:03:49] dfockler: has joined #ruby
[16:03:50] craysiii: has joined #ruby
[16:03:53] Ox0dea: negev: I was going to demonstrate here, but eval.in doesn't permit threading.
[16:03:58] negev: ok so i guess that changes my question then, if i want to create n threads and pass a 0-indexed thread_id to each thread, how can i do that?
[16:04:34] Ox0dea: 10.times.map { |i| Thread.new.tap { self[:id] = i }
[16:04:40] Ox0dea: And a closing brace.
[16:04:57] apeiros: Array.new(10) { |i| Thread.new { your code } }
[16:05:10] apeiros: how you want to assign i to thread??? no idea :)
[16:05:18] Ox0dea: apeiros: With Thread#[]=, of course.
[16:05:25] apeiros: Ox0dea: yours won't work
[16:05:29] Ox0dea: How come not?
[16:05:30] apeiros: self is not the new thread there
[16:05:33] newbie1: has joined #ruby
[16:05:40] apeiros: self is the same self as before the 10.times
[16:05:47] Ox0dea: Ah, derp.
[16:05:50] apeiros: Thread.current[:id] = i
[16:05:52] apeiros: that'd work
[16:05:57] Ox0dea: negev: 10.times.map { |i| Thread.new.tap { |t| t[:id] = i } }
[16:06:04] apeiros: could of course also add an attr_accessor to Thread
[16:06:08] freezevee: Ox0dea: https://gist.github.com/chrisvel/8075acd0af1978da818c can you please take a look ?
[16:06:24] Ox0dea: freezeve_: I looked, but I can't meaningfully run it to verify that it's doing what it should.
[16:06:39] Ox0dea: Gimme your scan results? :P
[16:08:02] Ox0dea: freezeve_: Sorry, I'm derp city right now.
[16:08:49] badfish129: has joined #ruby
[16:08:54] MichaelSmith: has joined #ruby
[16:09:20] negev: Ox0dea: that doesn't work, `initialize': must be called with a block (ThreadError)
[16:09:56] Musashi007: has joined #ruby
[16:10:16] Ox0dea: Hmm, three derps in as many minutes.
[16:10:20] Ox0dea: ACTION goes for a coffee.
[16:10:52] xylotism: has joined #ruby
[16:10:53] freezevee: Ox0dea: thanks!
[16:10:58] Ox0dea: negev: apeiros' Thread.current suggestion should do.
[16:11:04] freezevee: Ox0dea: all I get is things like {#<IPAddr: IPv4:192.168.1.1/255.255.255.255>=>"up"
[16:11:14] freezevee: they don't mean to sort as they're objects
[16:11:27] apeiros: Ox0dea: interesting metric, derps/min :D
[16:11:46] Ox0dea: freezeve_: How do you mean? IPAddr has its own implementation of #<=>, so it sorts correctly against other IPAddrs.
[16:12:09] xylotism: has joined #ruby
[16:12:41] freezevee: Ox0dea: How do you sort_by a hash of ipaddr objects ?
[16:12:56] freezevee: Ox0dea: like hosts_sorted = @hosts.sort_by before with regEx for strings ?
[16:12:57] krisquigley: has joined #ruby
[16:12:58] m8: has joined #ruby
[16:13:09] Ox0dea: freezeve_: sort_by(&:first) if the IPAddr is the key, which is the case here.
[16:13:19] xylotism: has joined #ruby
[16:13:37] denisemccoy: has anyone used the carrierwave-aws gem?
[16:13:37] ruurd: has joined #ruby
[16:13:45] freezevee: Ox0dea: this is what I did and they are not sorted
[16:13:48] freezevee: Ox0dea: {#<IPAddr: IPv4:192.168.1.1/255.255.255.255>=>"up", #<IPAddr: IPv4:192.168.1.5/255.255.255.255>=>"up",
[16:13:56] Ox0dea: freezeve_: Whoops. Better would be to use `@hosts.keys.sort`.
[16:14:04] riotjones: has joined #ruby
[16:14:04] apeiros: you can also just .sort - that is, if either no key is == another, or if the values are comparable
[16:14:13] Ox0dea: freezeve_: Are you not interested in writing the status out to the file, then?
[16:14:38] freezevee: Ox0dea: no just save them in order in .json file
[16:14:55] Ox0dea: Then, yeah, sorting the keys'll do.
[16:15:04] freezevee: Ox0dea: nope
[16:15:12] freezevee: 2 then 1 then 4
[16:15:19] freezevee: hosts_sorted = @hosts.keys.sort
[16:15:25] leat3: has joined #ruby
[16:15:36] bigredboots: has joined #ruby
[16:16:09] theery: has joined #ruby
[16:16:30] pecpec: has joined #ruby
[16:16:38] JohnnyTao: has joined #ruby
[16:16:43] Ox0dea: >> require 'ipaddr'; 5.times.map { IPAddr.new Array.new(4) { rand 256 } * ?. }.sort.map(&:to_s)
[16:16:44] ruboto: Ox0dea # => ["49.216.130.59", "97.229.113.235", "104.237.113.83", "109.231.92.174", "226.61.217.114"] (https://eval.in/430672)
[16:16:46] pecpec: has joined #ruby
[16:16:54] Ox0dea: freezeve_: That demonstrates that IPAddrs really are sortable.
[16:17:00] leat3: has joined #ruby
[16:17:08] afrianska: has joined #ruby
[16:17:36] gamename: has joined #ruby
[16:18:22] Ox0dea: You're not expecting the output from #ping_workstations to be sorted, right?
[16:18:26] freezevee: Ox0dea: https://gist.github.com/chrisvel/8075acd0af1978da818c
[16:18:30] freezevee: included the output
[16:18:55] mleung: has joined #ruby
[16:18:57] freezevee: I am sure it's something silly
[16:19:01] fostertheweb: has joined #ruby
[16:19:06] freezevee: the things that take the most time usually are :P
[16:19:15] [k-_: ?gist_usage
[16:19:15] ruboto: To properly use gist, please enable syntax highlighting, either by choosing the language manually or by entering a proper filename. If you post multiple things, separate them into multiple files. If you have a Github account, please update your gist with new information instead of posting a new one.
[16:19:40] youngbaks: has joined #ruby
[16:19:41] Ox0dea: freezeve_: That output simply doesn't match that program.
[16:20:17] Ox0dea: @hosts is a map from IPAddr to String; calling #keys on it will give you an Array of IPAddrs.
[16:21:45] freezevee: you are right
[16:21:53] freezevee: I am only getting an array
[16:21:59] freezevee: sorry about that
[16:22:02] Ox0dea: No worries.
[16:22:11] freezevee: the array is sorted but the values are missing
[16:22:19] arooni: has joined #ruby
[16:22:40] freezevee: also, did I ask about an array ? I am currently sorting a hash and then output to json, how did it convert to an array
[16:22:53] fantazo: has joined #ruby
[16:22:59] freezevee: I mean, how was it done automatically ?
[16:23:32] meatherly: has joined #ruby
[16:23:53] marr: has joined #ruby
[16:23:59] imperator: has joined #ruby
[16:24:10] siemprefresco: has joined #ruby
[16:24:14] freezevee: Ox0dea: changed to .sort, not .keys.sort and it appears like that [["192.168.1.1","up"],["192.168.1.2","up"]
[16:24:21] freezevee: what am i missing ?
[16:24:52] fantazo: has joined #ruby
[16:24:57] xcesariox: has joined #ruby
[16:25:07] gamename: Hi Guys, I'm new to Ruby and only use it in the context of Vagrantfiles. In one file, there is a hash which has lots of repetitive entries in it. Is there any way to specify the values in, say, 'role_consul_servers' one time only? Here is the sample:https://gist.github.com/gamename/6ee23582ade298a82a34
[16:25:19] Ox0dea: freezeve_: The observation that a Hash is just a collection of key-value pairs, essentially.
[16:25:31] JamesDH: has joined #ruby
[16:26:08] freezevee: Ox0dea: it is but why converting it .to_json didn't change the way it is stored ?
[16:26:35] centrx: gamename, (1..3).map { |i| "consul#{i}" }
[16:27:26] gamename: centrx: Given the example, does that mean I'll still need to do the mapping 3 times?
[16:27:58] Ox0dea: freezeve_: I've got to step out for a bit. Judging by the various outputs you've provided, I think you're inadvertently mixing "incompatible" approaches to this problem.
[16:28:01] centrx: gamename, oh you can assign a variable that represents the consuls array
[16:28:14] jobewan: has joined #ruby
[16:28:18] freezevee: Ox0dea: thanks, you helped a lot already
[16:28:26] Ox0dea: freezeve_: For starters, how come you're shelling out to `ping` and then not doing anything with the result?
[16:28:27] centrx: gamename, and then in places where there are additions to the array, you can do: consuls + ['es1', 'es2'] etc
[16:28:54] centrx: gamename, consuls + eses + logstashes
[16:28:55] freezevee: Ox0dea: what do you mean ? I just want to know If a host is up or down
[16:29:02] gamename: centrx: ah, ok. :) thanks!
[16:29:05] Eiam_: has joined #ruby
[16:29:09] Ox0dea: freezeve_: Aye, but you're not putting that information anywhere?
[16:29:09] freezevee: Ox0dea: or at least If it replies to the ping
[16:29:19] freezevee: Ox0dea: no, just a ping sweep
[16:29:33] Ox0dea: You don't want to remember what you learn?
[16:29:49] Ox0dea: That is, shouldn't the `ping` result go into scan_results.json?
[16:29:53] freezevee: Ox0dea: I might do this with net-ping gem later
[16:29:54] Ox0dea: (Back in ~15.)
[16:30:02] freezevee: I mean, I take one step at a time
[16:30:29] Dzejmskrokan: has joined #ruby
[16:30:32] badfish129: has left #ruby: ()
[16:30:44] blackmesa: has joined #ruby
[16:31:30] pawnbox: has joined #ruby
[16:32:14] Jardayn: has joined #ruby
[16:32:46] Eiam_: has joined #ruby
[16:33:17] Guest3285: has joined #ruby
[16:34:49] ckinniburgh: has joined #ruby
[16:36:10] mleung: has joined #ruby
[16:36:15] dgutierrez1287: has joined #ruby
[16:37:26] kobain: has joined #ruby
[16:37:31] ndrei: has joined #ruby
[16:38:50] rbennacer: has joined #ruby
[16:38:55] Eiam_: has joined #ruby
[16:39:38] tkuchiki: has joined #ruby
[16:39:55] imperator: is there anything better than the VCR gem out there?
[16:40:04] theery: has joined #ruby
[16:40:04] imperator: specifically, something that can deal with threaded methods?
[16:41:19] cornerma1: has joined #ruby
[16:41:24] leat3: has joined #ruby
[16:42:23] shadoi: has joined #ruby
[16:42:29] deol: has joined #ruby
[16:42:48] momomomomo: has joined #ruby
[16:43:21] ytti: [If you have a few minutes, please take our survey: "Who's Using Ruby (or Not), for What, and Why?" http://rubini.us7.list-manage.com/track/click?u=72ad4855b528b6af79bd06543&id=b4a1124956&e=1f2e1d517d
[16:43:39] ytti: (Signed up for rubinius X mailing list ages ago, first email today)
[16:43:51] ytti: but their quesionaire link is broken
[16:44:26] Eiam_: has joined #ruby
[16:45:15] naftilos76: has joined #ruby
[16:45:35] Ox0dea: freezeve_: Okay, so, what do you know about Enumerable?
[16:46:13] freezevee: Ox0dea: I believe I solved it https://gist.github.com/chrisvel/dcfdf4e62c9fdf36fada
[16:46:29] freezevee: Ox0dea: couldn't find something better than flatten
[16:46:36] freezevee: it does what it is intended to
[16:47:42] freezevee: Ox0dea: but thanks
[16:47:52] Ox0dea: Sure thing.
[16:48:06] Ox0dea: There's still more learnin's to do if you want 'em.
[16:48:23] Ox0dea: `hash.map {|key, value| [key, value]}` is just `hash.to_a`, for instance.
[16:48:30] Ox0dea: That's why I asked about Enumerable.
[16:48:51] gamename: centrx: followup - how would you assign (1..3).map { |i| "consul#{i}" } to a consuls var which would then be used for consuls + another_var + another_var? Or am I missing your intent?
[16:49:21] centrx: gamename, consuls = (1..3).map { |i| "consul#{i}" }
[16:49:26] Ox0dea: freezeve_: With the exceptions of #select and #reject, all of the methods provided to Hash by Enumerable simply convert it to an Array of key-value pairs before operating.
[16:49:27] xylotism: has joined #ruby
[16:49:35] gamename: centrx: ok. Got it.
[16:50:04] teclator: has joined #ruby
[16:50:25] romain_t: has joined #ruby
[16:50:57] Ox0dea: freezeve_: https://gist.github.com/0x0dea/ef95c6760d52cb909e1f
[16:51:01] Ox0dea: Those are equivalent. :P
[16:51:22] arup_r: has joined #ruby
[16:51:55] nhhagen: has joined #ruby
[16:52:00] Ox0dea: Could even just be `@hosts.sort.to_h` as apeiros advised a while back.
[16:52:38] UtkarshRay: has joined #ruby
[16:54:17] saddad: has joined #ruby
[16:54:45] atmosx: can I upload images as gists?
[16:54:59] atmosx: I knew it.
[16:55:00] nhhagen: has joined #ruby
[16:55:47] Mon_Ouie: You probably can, gists are just regular git repos that you can clone and push to
[16:56:07] bronson: has joined #ruby
[16:56:14] minotep: has joined #ruby
[16:56:15] [k-_: that'd be too much effort to consider as an option
[16:56:50] Ox0dea: atmosx: How about Base64?
[16:57:08] imperator: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/433878
[16:57:31] canton7: atmosx, https://gist.github.com/canton7/8204be5afe9d02eec1cf
[16:57:33] canton7: seems you can
[16:58:30] Ox0dea: And then git.io for shortlinks.
[16:58:32] Ox0dea: New image host.
[16:58:46] j4cknewt: has joined #ruby
[16:59:00] canton7: it serves the raw image with the right content-type, too
[16:59:02] apipkin: Is there a way to do lists with Ruby i18n? Like: 'Bob'; 'Bob and Sally'; 'Bob, Sally and Joe'.
[16:59:04] canton7: that's nice
[16:59:17] cajone1: has left #ruby: ()
[16:59:24] icarus: has joined #ruby
[16:59:24] gusrub: has joined #ruby
[16:59:38] dionysus69: has joined #ruby
[17:00:06] cajone: has joined #ruby
[17:00:09] terabytes: has joined #ruby
[17:00:10] postmodern: has joined #ruby
[17:00:11] Ox0dea: apipkin: Calling that i18n is confusing.
[17:00:47] gizmore: has joined #ruby
[17:01:22] AsFelix: has joined #ruby
[17:01:35] [k-_: that isn't i18n????
[17:02:13] apipkin: I thought that was internationalization as opposed to localization
[17:02:23] apipkin: or is that globalization o_O
[17:02:31] Ox0dea: It's just... properly formatting a list?
[17:02:46] Ox0dea: Is that done vastly differently across human languages?
[17:03:11] apipkin: From what I remember it is. But i'll look for that too!
[17:03:14] [k-_: a list, you mean list in english?
[17:03:16] firstdayonthejob: has joined #ruby
[17:03:18] shevy: yoda would pronounce this list differently
[17:03:55] finisherr: has joined #ruby
[17:04:22] shevy: imperator if only I would know something about threads!
[17:05:25] atmosx: I have this view: http://atmosx.clarify-it.com/d/hhlj2y (how it looks) and this code https://gist.github.com/atmosx/5b1612757fd0128fbd76 (controller, view, css) and I want to put a tooltip displaying the a number upon each position of line 1.
[17:05:32] apipkin: [k-_: yeah
[17:05:54] atmosx: Like I wanna have a 'dot' that I'll hove-over and display the number (position) in the line.
[17:06:08] ndrei: has joined #ruby
[17:06:53] atmosx: given the fact that these are strings: https://gist.github.com/atmosx/5b1612757fd0128fbd76#file-mafftseq_protein_results-haml-L4 I'm not even sure it's possible.
[17:07:22] momomomomo: has joined #ruby
[17:08:18] shinnya: has joined #ruby
[17:09:17] shadeslayer: has joined #ruby
[17:10:13] Ox0dea: apipkin: https://eval.in/430676
[17:10:26] xylotism: has joined #ruby
[17:10:47] apipkin: Ox0dea: Woah! What's this??
[17:11:03] Ox0dea: Sparkly i18n magicks.
[17:11:03] PaulePanter: Hi. Is there a shorter way to replace `-1` in an array by `nil`? `a.push(nil) if a.delete(-1)`?
[17:11:24] Ox0dea: PaulePanter: Are there several -1s?
[17:11:41] apipkin: Ox0dea: I think this is what I was thinking of http://apidock.com/rails/Array/to_sentence
[17:11:47] apipkin: Is this the same thing?
[17:12:29] Ox0dea: apipkin: More or less, but that one's actually i18n, since it properly localizes the joiners and whatnot.
[17:13:11] symbole: has joined #ruby
[17:14:15] devoldmx: has joined #ruby
[17:15:33] petricore: has joined #ruby
[17:16:02] ndrei: has joined #ruby
[17:16:12] Ox0dea: >> [-1, 4, 2, -1, 0, -1, 6].map { |n| n if n != -1 } # in case PaulePanter isn't dead
[17:16:13] ruboto: Ox0dea # => [nil, 4, 2, nil, 0, nil, 6] (https://eval.in/430677)
[17:16:36] karapetyan: has joined #ruby
[17:18:03] karapetyan: has joined #ruby
[17:19:01] patrick_star: has joined #ruby
[17:20:44] afrianska: has joined #ruby
[17:20:50] krisquigley: has joined #ruby
[17:20:57] pontiki: has joined #ruby
[17:21:29] podman: has joined #ruby
[17:21:40] Rurik: has joined #ruby
[17:23:16] otherj: has joined #ruby
[17:23:33] shevy: PaulePanter Paulchen Panther!
[17:23:37] krisquigley: has joined #ruby
[17:24:07] arian0n: has joined #ruby
[17:24:14] sargas: has joined #ruby
[17:24:21] nizmow: has joined #ruby
[17:24:43] Hanmac: has joined #ruby
[17:25:09] PaulePanter: Sorry to all.
[17:25:15] mordocai: has joined #ruby
[17:25:19] PaulePanter: There is just one `-1` in there.
[17:25:47] Ox0dea: PaulePanter: foo[foo.index -1] = nil
[17:26:20] PaulePanter: Ox0dea: Thank you!
[17:26:42] Ox0dea: PaulePanter: Happy to help.
[17:26:52] Ox0dea: Maybe reconsider why you're doing this, though. :)
[17:27:22] psy: has joined #ruby
[17:27:34] PaulePanter: Well, my colleague passes `-1` in the array to denote that objects with no relation to another object should be found.
[17:27:55] Ox0dea: Flog them.
[17:28:04] ht__: has joined #ruby
[17:28:06] tobiasvl: magic numbers
[17:28:19] psy: has joined #ruby
[17:29:53] nofxx: has joined #ruby
[17:31:08] xcesariox: has joined #ruby
[17:31:47] mikecmpbll: has joined #ruby
[17:31:48] PaulePanter: Ox0dea: One last thing. There is the possibility that the array does not contain `-1`.
[17:32:00] PaulePanter: a[a.index(-1)] = nil
[17:32:01] PaulePanter: TypeError: no implicit conversion from nil to integer
[17:32:36] C1V0: has joined #ruby
[17:33:31] Ox0dea: PaulePanter: You'll have to be verbose, then.
[17:34:01] Ox0dea: To catch up, there's only ever going to be at most one -1, but it could be anywhere?
[17:34:19] Ox0dea: How strange.
[17:34:35] aaeron: has joined #ruby
[17:34:37] PaulePanter: Ox0dea: Sorry, I misunderstood you. I thought I???d need to use the verbose solution.
[17:34:49] Dzejmskrokan: has joined #ruby
[17:35:42] platzhirsch: has left #ruby: ()
[17:35:54] HAL2328: has joined #ruby
[17:35:57] PaulePanter: [2, ???, -1, ???, 4] (exactly one -1) is valid, [145, 2, ???, 145808] (no -1) is valid, but [145, 2, -1, ???, -1, 14355] (more than one -1) is invalid.
[17:36:24] spider-mario: has joined #ruby
[17:36:26] Ox0dea: PaulePanter: Yes, you probably will, since you'll need to do a preliminary check. :/
[17:36:58] JimmyNeutron: has joined #ruby
[17:37:11] iamvery: has joined #ruby
[17:37:30] Ox0dea: There's probably some hackish slice you could use to make it a no-op if #index gives `nil`, but I can't condone such a thing.
[17:38:40] PaulePanter: Ox0dea: Understood. Thanks again!
[17:38:47] Ox0dea: Sure thing.
[17:42:12] casadei_: has joined #ruby
[17:42:15] xylotism: has joined #ruby
[17:43:25] baweaver: has joined #ruby
[17:43:52] Ox0dea: PaulePanter: Do you happen to have a variable that could be used as scratch in the vicinity of this `-1 => nil` code?
[17:43:57] havenwood: has joined #ruby
[17:43:58] gizmore: what could be wrong with this url? bad URI(is not URI?): http://highscalability.com/blog/2013/5/13/the-secret-to-10-million-concurrent-connections-the-kernel-i.html
[17:44:06] gizmore: ah... there seems to be some char at the end!
[17:44:16] Ox0dea: gizmore: It's "\x01".
[17:44:25] gizmore: thanksalotl!
[17:44:27] Ox0dea: [k-_ has not yet explained how it got there.
[17:45:01] Ox0dea: http://www.fromquarkstoquasars.com/wp-content/uploads/2014/10/axolotl.jpg
[17:45:33] alphaatom: has joined #ruby
[17:45:33] enebo: has joined #ruby
[17:46:36] [k-_: i can open it just fine?
[17:46:47] atmosx: Who is PaulePanter?
[17:46:55] [k-_: not you!
[17:47:03] towski_: has joined #ruby
[17:47:18] denisemccoy: has joined #ruby
[17:49:03] baweaver: has joined #ruby
[17:49:24] atmosx: she is kinda hot.
[17:49:29] towski__: has joined #ruby
[17:49:32] atmosx: or is it just me.
[17:49:37] shock_one: has joined #ruby
[17:50:08] Ox0dea: atmosx: That thanksalotl?
[17:50:14] weemsledeux: has joined #ruby
[17:50:34] swgillespie: has joined #ruby
[17:50:49] Rubie: has joined #ruby
[17:50:55] atmosx: Ox0dea: no, this https://twitter.com/MonicaBellucciC
[17:51:03] atmosx: it's a twitter profile
[17:51:56] Guest3285: has joined #ruby
[17:52:12] Ox0dea: !gis bellucci honey
[17:52:35] rbennacer: has joined #ruby
[17:54:20] [k-_: Ox0dea: your interrobang is backwards
[17:54:40] Ox0dea: [k-_: That is an exclamation point.
[17:55:54] eightfold: has joined #ruby
[17:56:00] afrianska: has joined #ruby
[17:56:11] ranchodev: has joined #ruby
[17:56:57] fostertheweb: has joined #ruby
[17:57:14] karapetyan: has joined #ruby
[17:58:28] rcoulman: has joined #ruby
[17:58:32] wldcordeiro_: has joined #ruby
[17:58:34] icarus: has joined #ruby
[17:58:48] [k-_: http://www.fromquarkstoquasars.com/wp-content/uploads/2014/10/axolotl.jpg looks like a neuro network somehow
[17:59:14] rcoulman: has left #ruby: ()
[17:59:28] dfockler: Let's just keep posting this frizzety frog
[17:59:36] shevy: an axolotl!
[18:00:00] banjara: has joined #ruby
[18:00:06] shevy: it can regrow limbs
[18:03:01] Ox0dea: Turritopsis dohrnii can regrow its childhood.
[18:03:24] dravine: has joined #ruby
[18:03:58] PaulePanter: Ox0dea: Sorry, I couldn???t understand your question.
[18:04:24] PaulePanter: Ox0dea: I could create a variable, but there is no scratch variable.
[18:04:33] Ox0dea: PaulePanter: Not worth it, then, in my opinion.
[18:04:47] Ox0dea: But if you had one around, you could say `a[i] = nil if i = a.index(-1)`.
[18:04:48] PaulePanter: Ox0dea: Understood.
[18:05:16] Ox0dea: You'll get a NameError if `i` doesn't already exist, though.
[18:05:39] PaulePanter: Ox0dea: Interesting. I learned a lot! Thanks!
[18:08:00] jas02: has joined #ruby
[18:09:06] CustosLimen: has joined #ruby
[18:09:23] leafybasil: has joined #ruby
[18:09:31] rickmasta: has joined #ruby
[18:09:43] RobertBirnie: has joined #ruby
[18:11:47] garethrees: has joined #ruby
[18:11:49] baweaver: has joined #ruby
[18:12:04] michael_mbp: has joined #ruby
[18:12:10] ramfjord: has joined #ruby
[18:12:26] jmignault: has joined #ruby
[18:13:55] j_suth: has joined #ruby
[18:14:05] hardtail: has joined #ruby
[18:14:19] platzhirsch: has joined #ruby
[18:14:52] baweaver: has joined #ruby
[18:15:29] lwu: has joined #ruby
[18:16:19] justin_pdx: has joined #ruby
[18:16:56] nanoz: has joined #ruby
[18:17:34] techminer: has joined #ruby
[18:18:20] techminer: I'm new to testing with rspec. ??I have a CSV file I'm going to eventually download and import, but first I want to verify the import directory exists. ??So far I'm having no luck just checking for the directory, here's my gist??? https://gist.github.com/MattMencel/6b75b93f125a96a26712
[18:18:41] techminer: I'm doing something wrong....
[18:18:54] eGGsha: has joined #ruby
[18:18:58] bb010g: has joined #ruby
[18:20:02] bender_unit: has joined #ruby
[18:21:04] yxhuvud: techminer: try subject.create_import_directory instead.
[18:21:24] yxhuvud: or be explicit and don't try to use implicit subjects until you understand what is going on
[18:22:54] techminer: subject refers to the Class in my describe block then?
[18:23:02] mleung: has joined #ruby
[18:23:33] yxhuvud: no, to an instance of it.
[18:27:07] oldbay: has joined #ruby
[18:27:33] jgt1: has joined #ruby
[18:27:39] AsFelix: has left #ruby: ()
[18:27:56] droidburgundy: has joined #ruby
[18:28:30] baweaver: has joined #ruby
[18:29:04] Dzejmskrokan: has joined #ruby
[18:29:25] xybre: has joined #ruby
[18:29:40] saddad: has joined #ruby
[18:29:41] ricer2: has joined #ruby
[18:30:00] bigredboots: has joined #ruby
[18:30:02] eosinx: has joined #ruby
[18:30:50] aaeron: has joined #ruby
[18:31:05] jackjackdripper: has joined #ruby
[18:31:09] baweaver: has joined #ruby
[18:31:35] howdoicomputer: has joined #ruby
[18:31:55] Hijiri: has joined #ruby
[18:31:57] rwyoung: has joined #ruby
[18:32:30] jackjackdripper1: has joined #ruby
[18:32:37] yqt: has joined #ruby
[18:32:42] bronson: has joined #ruby
[18:34:57] CustosLimen: has joined #ruby
[18:35:06] pocketprotector: has joined #ruby
[18:37:20] jackjackdripper: has joined #ruby
[18:37:41] Dzejmskrokan: has joined #ruby
[18:37:52] SCHAAP137: i'm writing a helper function for cinch (irc bot in Ruby), in which i'm calling a shell script with a user supplied parameter, sending output to a file, filtering that through sed, leaving me with a piece of text I'd like to reply into the channel
[18:37:56] finisherr: has joined #ruby
[18:38:31] SCHAAP137: however, i haven't found a good way yet to "slowly" make these lines appear, and the bot gets disconnected with a RecvQ exceeded server message
[18:38:55] _mak: has left #ruby: ("..")
[18:39:19] [k-_: how 'bout a collection of links
[18:39:43] jackjackdripper: has joined #ruby
[18:40:22] blackmesa: has joined #ruby
[18:40:36] ruurd: has joined #ruby
[18:41:20] snapcase: has joined #ruby
[18:41:46] `derpy: has joined #ruby
[18:42:17] alphaatom: has joined #ruby
[18:42:21] cescalante: has joined #ruby
[18:42:25] icedragon: has joined #ruby
[18:42:39] SCHAAP137: [k-_, this is the helper function: http://pastebin.com/VDuxCyEb
[18:42:40] Fraeon: has joined #ruby
[18:42:40] ruboto: SCHAAP137, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/e7d60c83c7336497a301
[18:42:40] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[18:42:54] SCHAAP137: ok, understood
[18:42:56] aep: has joined #ruby
[18:43:11] shellie__: has joined #ruby
[18:43:33] Kero: has joined #ruby
[18:43:36] Ivision: has joined #ruby
[18:44:04] SCHAAP137: so, i'm wondering if there is a method to output "#{text}" in a better way, one line every x seconds
[18:44:14] oldbay: has joined #ruby
[18:44:19] [k-_: or, you could create a link that shows the content
[18:44:26] j416: has joined #ruby
[18:44:41] Ox0dea: &ri sleep
[18:44:57] SCHAAP137: https://gist.github.com/e7d60c83c7336497a301 <<-- here it is [k-_
[18:45:15] Ox0dea: SCHAAP137: Did you think [k-_ couldn't see ruboto's link?
[18:45:32] alexUaN: has joined #ruby
[18:46:15] SCHAAP137: i could post the full .rb of the cinch bot, but it's irrelevant to the issue, Ox0dea, i thought the helper function itself would be sufficient
[18:46:32] [k-_: SCHAAP137: you misunderstand.
[18:46:40] Ox0dea: I suspect a language barrier.
[18:46:58] [k-_: I meant, instead of dumping so many lines in IRC, why not just have a link that shows everything?
[18:47:37] Ox0dea: >> puts [*1..100] # SCHAAP137
[18:47:38] ruboto: Ox0dea # => 1 ...check link for more (https://eval.in/430720)
[18:47:45] Ox0dea: See how ruboto doesn't spam the channel with 100 lines?
[18:48:26] lkba: has joined #ruby
[18:49:04] SCHAAP137: hmm, interesting, i need a moment to interpret what i'm seeing, i'm quite new to Ruby
[18:49:12] pecpec: has joined #ruby
[18:49:22] choke: has joined #ruby
[18:50:00] karapetyan: has joined #ruby
[18:50:39] gregf: has joined #ruby
[18:50:42] RobertBirnie: has joined #ruby
[18:52:08] minimalism: has joined #ruby
[18:52:54] [k-_: !haim ih
[18:52:55] momomomomo: has joined #ruby
[18:53:21] pecpec_: has joined #ruby
[18:54:34] NeverDie: has joined #ruby
[18:55:07] minimalism: has joined #ruby
[18:55:46] firstdayonthejob: has joined #ruby
[18:56:23] niemcu: has joined #ruby
[18:57:10] denisemccoy: has joined #ruby
[18:58:24] mprelude: has joined #ruby
[18:59:27] mprelude: has joined #ruby
[19:01:00] jsuth_: has joined #ruby
[19:03:45] kirun: has joined #ruby
[19:04:07] TomyLobo: has joined #ruby
[19:07:11] swgillespie: has joined #ruby
[19:07:32] ChanServ: -b Lovich!*@*
[19:10:06] blackmesa: has joined #ruby
[19:10:23] NeverDie: has joined #ruby
[19:12:47] Maletor: has joined #ruby
[19:12:51] bender_unit: has joined #ruby
[19:13:33] mustmodify: has joined #ruby
[19:14:49] icarus: has joined #ruby
[19:15:03] devoldmx: has joined #ruby
[19:15:24] mustmodify: IIRC, according to Tell Don't Ask, if I have a Message and it may be in one of two formats, and I want it parsed, I should tell some object to do that. But according to other philosophical bits whose names I've forgotten, you should have verb-objects, just noun-objects... though I never really understood that one. So should I create a MessageHandler object that determins the format of the message and delegates to the correct parser? OR is that too much bag
[19:16:09] ngscheurich: has joined #ruby
[19:16:19] alphaatom: has joined #ruby
[19:18:11] oldbay: has joined #ruby
[19:19:07] Alina-malina: has joined #ruby
[19:19:23] bigredboots: has joined #ruby
[19:19:40] HAL2328: i'm on a windows, using irb. when i run long commands (that exceeds one line) it just truncates it in the buffer. i'd like to view the full command of what i ran. any ideas?
[19:20:16] JamesDH: has joined #ruby
[19:21:48] Rollabunna: has joined #ruby
[19:22:59] esauOp: has joined #ruby
[19:24:08] banister: has joined #ruby
[19:24:37] krisquigley: has joined #ruby
[19:25:14] borodin: has joined #ruby
[19:25:56] imperator: HAL2328, up arrow to repeat last command, or type Readline::HISTORY.to_a
[19:26:23] mistym: has joined #ruby
[19:26:24] mistym: has joined #ruby
[19:27:09] pocketprotector: has joined #ruby
[19:28:46] ruurd: has joined #ruby
[19:29:15] sargas: has joined #ruby
[19:29:37] NeverDie: has joined #ruby
[19:29:48] HAL2328: imperator, thank you very much! the Readline::HISTORY.to_a did exactly what I wanted.
[19:30:36] yfeldblum: has joined #ruby
[19:30:48] HAL2328: imperator, is there a reason why irb decides not to report the full command on console? im taking notes as i'm learning on a separate doc, so i like to copy and paste commands
[19:31:07] Ox0dea: HAL2328: irb isn't to blame here.
[19:31:32] icarus: has joined #ruby
[19:31:36] jzigmund_: has joined #ruby
[19:31:41] NeverDie_: has joined #ruby
[19:31:43] HAL2328: although the up arrow look up method repeats the code, it doesn't allow me to select the entire command (cmd limitation maybe)
[19:31:47] vondruch_: has joined #ruby
[19:31:53] Ox0dea: Aye, that's the much more likely culprit.
[19:32:04] oldbay: has joined #ruby
[19:32:36] HAL2328: example: it should scroll to get the rest, but it just won't scroll so i get partial. but the READLINE is perfect solution! :)
[19:32:38] Zai00: has joined #ruby
[19:32:49] jenrzzz: has joined #ruby
[19:33:22] HAL2328: Ox0dea, good to know. i thought it was irb so i kept searching on google with no avail
[19:35:12] Ox0dea: HAL2328: I propose several solutions: use Alt+Enter to go into fullscreen, change your prompt to something much shorter (and maybe forget which directory you're in), upgrade your OS.
[19:35:51] imperator: HAL2328, get the same behavior in powershell?
[19:36:17] CustosLimen: has joined #ruby
[19:36:51] eightfold: has joined #ruby
[19:37:16] HAL2328: imperator, let me try. i've been using ConEmu which has been amazing, but it's not a cmd replacement, the core behavior is still there.
[19:38:31] NeverDie: has joined #ruby
[19:40:02] rbennacer: has joined #ruby
[19:40:14] denisemccoy: has joined #ruby
[19:40:44] Iskarlar: has joined #ruby
[19:40:56] jzigmund: has joined #ruby
[19:41:10] bender_unit: has joined #ruby
[19:41:22] FreeKevi_: has joined #ruby
[19:41:26] gamename: has joined #ruby
[19:41:44] HAL2328: imperator, powershell worked :) no truncation! thanks again!
[19:42:04] imperator: yeah, i pretty much only use powershell now
[19:42:14] enebo: has joined #ruby
[19:42:29] gamename: has joined #ruby
[19:42:43] HAL2328: Ox0dea, i tried alt+enter but you can't even fullscreen cmd/powershell, it so sad. i downloaded ubuntu, been proscratinating haven't installed it yet
[19:43:02] HAL2328: Ox0dea, windows is making me a more patience person everyday lol
[19:43:31] mustmodify: has left #ruby: ()
[19:43:44] Iskarlar: has joined #ruby
[19:43:44] HAL2328: imperator, yeah i think i will too.
[19:43:46] rakm: has joined #ruby
[19:43:51] Kallis: has joined #ruby
[19:44:21] imperator: can't fullscreen them? i mean, with the mouse you can
[19:44:26] imperator: never tried it via cmdline
[19:44:37] Soda: has joined #ruby
[19:45:48] allomov: has joined #ruby
[19:46:33] HAL2328: imperator, yeah the most mine will expand is 2/3 of a fullscreen width
[19:47:10] imperator: oh, you gotta mess with the properties
[19:47:14] jzigmund: has joined #ruby
[19:47:16] imperator: otherwise it won't go past the max
[19:47:20] imperator: if i remember right
[19:48:55] Soda: has joined #ruby
[19:49:03] xtsee: has joined #ruby
[19:50:08] vondruch_: has joined #ruby
[19:50:11] gix: has joined #ruby
[19:50:57] ruurd: has joined #ruby
[19:51:53] HAL2328: imperator, you're right, under layout i changed the width to 200 and it worked. really weird design, not very user friendly
[19:51:59] roxtrongo: has joined #ruby
[19:52:12] jzigmund: has joined #ruby
[19:52:28] Ox0dea: HAL2328: What's got you tethered to Windows?
[19:52:40] FernandoBasso: has joined #ruby
[19:53:00] athinggoingon: has joined #ruby
[19:53:05] Musashi007: has joined #ruby
[19:53:47] but3k4_: has joined #ruby
[19:54:50] droidburgundy: has joined #ruby
[19:55:01] Jackneill: has joined #ruby
[19:55:34] dgutierrez1287: has joined #ruby
[19:55:48] karapetyan: has joined #ruby
[19:56:04] workmad3: has joined #ruby
[19:58:30] VeryBewitching: has joined #ruby
[19:58:34] HAL2328: Ox0dea, just came with my computer lol... old habit are hard to kill i guess. I had a macbook, but it's broken now. i'm just bootstrapping using my old PC laptop
[19:59:13] nofxx: HAL2328, from mac to gnome is way more 'home' than mac to windows
[19:59:22] HAL2328: windows 7, can't complain when im not developing. it's a battle as soon as i do rails console
[20:00:27] tejasmanohar: has joined #ruby
[20:00:32] craysiii: dual boot master race /s
[20:00:35] atmosx: HAL2328: virtual machine + linux?
[20:00:57] dasher00: has joined #ruby
[20:01:28] nofxx: HAL2328, life's too short man, just use stuff as they should. windows for games, boot a good distro to work
[20:01:56] HAL2328: atmosx, that's the plan. someone here suggested i try ubuntu 14.04.3 LTS
[20:03:03] benlieb: has joined #ruby
[20:03:18] umgrosscol: has joined #ruby
[20:03:29] atmosx: HAL2328: are you familiar with command line? if yes I'd suggest debian.
[20:03:33] HAL2328: nofxx, I agree. Although I was able to solve a lot of the roadblocks thanks to the generous and knowledge folks here but it ate up a lot of time and energy.
[20:03:47] atmosx: HAL2328: really lightweight image... or even docker
[20:04:03] Coldblackice: has joined #ruby
[20:04:22] aibot: has joined #ruby
[20:04:32] leafybasil: has joined #ruby
[20:04:34] mleung: has joined #ruby
[20:04:56] HAL2328: atmosx, I've always heard great things about Debian. I did hear that ubuntu is a bit bloated. since my primary os for general stuff is win7, debian for dev might be a better fit.
[20:05:31] JamesDH: has joined #ruby
[20:05:32] atmosx: HAL2328: just install ruby manually system wide. Don't go with the distributino's version becuase it's old.
[20:05:46] Ox0dea: > distributino
[20:06:10] Ox0dea: Sabayon is apparently of Italian origin.
[20:06:49] momomomomo_: has joined #ruby
[20:06:55] rwyoung: has joined #ruby
[20:07:27] vondruch_: has joined #ruby
[20:07:44] sedevc: has joined #ruby
[20:08:03] imperator: HAL2328, or use something like rbenv or chruby
[20:08:12] dfockler: has joined #ruby
[20:08:27] karapetyan: has joined #ruby
[20:08:30] Ox0dea: >> :chruby or :rbenv
[20:08:31] ruboto: Ox0dea # => :chruby (https://eval.in/430737)
[20:08:48] sedevc: has left #ruby: ()
[20:10:56] Zai00: has joined #ruby
[20:11:35] HAL2328: thanks everyone. will try dual booting later tonight. i've had rbenv on OSX and it was beautiful. but i may try chruby to how that works. never heard of that
[20:11:45] icarus_: has joined #ruby
[20:13:23] krisquigley: has joined #ruby
[20:13:25] atmosx: Ox0dea: how can you tell? (that it's of italian origin)
[20:13:53] but3k4: has joined #ruby
[20:13:56] Ox0dea: It says it on the box.
[20:14:39] atmosx: what box?
[20:14:45] Ox0dea: *The* box, mate.
[20:14:46] atmosx: does sabayon come with a box now?!
[20:14:53] atmosx: 'mate' hahaha
[20:14:58] atmosx: cheer up lad
[20:15:02] FernandoBasso: http://ruby-doc.org/core-2.1.2/doc/syntax/assignment_rdoc.html#label-Local+Variables+and+Methods It seems that "problem" of having to use method() or self.method does not occur if the method uses arguments.
[20:15:32] FernandoBasso: When you do, for instance, sum = sum, you do have to use sum() or self.sum() from that point on, but not if sum method takes args.
[20:15:39] atmosx: Ox0dea: I think FernandoBasso is of Italian origin
[20:15:39] FernandoBasso: Did I miss something?
[20:16:01] atmosx: FernandoBasso: nope
[20:16:05] Ox0dea: atmosx: Is Google blocked where you are?
[20:16:17] atmosx: Ox0dea: yes :-(
[20:16:23] Ox0dea: My condolences.
[20:16:24] atmosx: Ox0dea: how did you knew?
[20:16:26] but3k4_: has joined #ruby
[20:16:44] imperator: because.....HE BLOCKED IT
[20:16:48] Ox0dea: In any case, "sabayon" is the anglicization of "zabaione", an Italian eggnog-based dessert.
[20:16:51] imperator: dun dun DUN!
[20:16:54] atmosx: imperator: oh, really?
[20:17:10] atmosx: Ox0dea: you Italian?
[20:17:16] Ox0dea: atmosx: No, lad.
[20:17:24] atmosx: Ox0dea: where you from mate?
[20:17:32] imperator: ACTION guess australia or nz
[20:17:36] Ox0dea: atmosx: Somewhere where keystrokes can be exchanged for goods and knowledge.
[20:17:46] atmosx: imperator: you must a psychic or something
[20:17:51] bronson: has joined #ruby
[20:17:54] Igorshp: has joined #ruby
[20:17:55] imperator: or something
[20:18:43] atmosx: >> def sum(int); int + 2 + 2;end; sum(5)
[20:18:44] ruboto: atmosx # => 9 (https://eval.in/430746)
[20:18:59] atmosx: >> def sum; 1 + 2 + 2;end; sum
[20:19:00] ruboto: atmosx # => 5 (https://eval.in/430747)
[20:19:04] atmosx: FernandoBasso: see?
[20:19:12] Ox0dea: FernandoBasso: It's refreshing to see a beginner taking the time to read /doc. :)
[20:19:13] jamesaxl: has joined #ruby
[20:19:44] j4cknewt: has joined #ruby
[20:19:49] FernandoBasso: atmosx: I think I see.
[20:19:51] atmosx: Ox0dea: he's a good lad.
[20:20:21] atmosx: FernandoBasso: You don't need () but it's a good programming style as it makes methods/functions easier to read.
[20:20:32] FernandoBasso: atmosx: Ruby and JS area easy, nobody needs to read docs.
[20:20:47] Ox0dea: atmosx: You need the parentheses if you intend to invoke a method which shares its name with a local variable.
[20:20:53] atmosx: FernandoBasso: are easy to pick up but hard to master
[20:21:04] FernandoBasso: atmosx: I was joking. :)
[20:21:35] atmosx: Ox0dea: if that's the case, then I'll say you're stupid and you have bigger problems lying somewhere than that :-P
[20:21:36] FernandoBasso: People assume these are toy langs, unlike the almighty java.
[20:21:45] atmosx: FernandoBasso: ah k
[20:21:55] last_staff: has joined #ruby
[20:21:56] i: has joined #ruby
[20:22:13] kadoppe: has joined #ruby
[20:22:19] atmosx: FernandoBasso: hm, people get paid to write JS and Ruby too. So there's hardly toy langs.
[20:22:38] Ox0dea: atmosx: What would you name a method that sums some numbers? What would you name a variable that contains some sum? Why is it hard to imagine the two existing in the same scope?
[20:22:53] atmosx: truth to be told js + rails makes a very good portfolio for landing jobs
[20:23:05] FernandoBasso: atmosx: I agree :)
[20:23:17] jackjackdripper: has joined #ruby
[20:23:47] atmosx: Ox0dea: because it's stupid and confusing. Use 'number_sums' if that's the case.
[20:23:57] FernandoBasso: I am passionate about programming langs, and I don't understand why people say "lisp is the only one", "java is the best", "pyhton blah", "js rocks and the others suck", etc. I like them all :)
[20:24:12] jamesaxl: has joined #ruby
[20:24:20] atmosx: FernandoBasso: good you're in the right place then :-)
[20:24:34] atmosx: FernandoBasso: Sei Italiano?
[20:24:52] finisherr: has joined #ruby
[20:24:53] atmosx: atmosx: good.
[20:26:03] imperator: atmosx, gotta stop talking to yourself, not healthy
[20:26:17] yashinbasement: has joined #ruby
[20:26:35] jackjackdripper: has joined #ruby
[20:26:38] jeaye: has joined #ruby
[20:27:35] mesamoo: has joined #ruby
[20:27:40] firstdayonthejob: has joined #ruby
[20:28:09] atmosx: FernandoBasso: gr-it
[20:28:19] howdoicomputer: has joined #ruby
[20:28:37] Rubie: has joined #ruby
[20:29:39] jenrzzz: has joined #ruby
[20:30:58] tvw: has joined #ruby
[20:31:53] nofxx: FernandoBasso, Brazil here too!
[20:32:43] FernandoBasso: nofxx: Long time rubist?
[20:34:21] nofxx: FernandoBasso, ~2008, you?
[20:35:06] tejasmanohar: has joined #ruby
[20:35:29] nofxx: FernandoBasso, ruby is great, you'll have fun
[20:36:30] choke: has joined #ruby
[20:36:36] nofxx: rubygems, github, stackoverflow, here... all you prob going to need. Started with chris pine learn to program?
[20:37:36] choke: has joined #ruby
[20:38:10] HAL2328: nofxx, i got to chapter 8 fine. after that chris killed my confidence
[20:38:19] FernandoBasso: I started in several different ways.
[20:38:24] nofxx: heh, why?
[20:39:08] nofxx: FernandoBasso, also nice is _why? poingnant guide... there's a pt-br version too https://github.com/carlosbrando/poignant-br
[20:39:23] havenwood: has joined #ruby
[20:39:25] rbennacer: has joined #ruby
[20:39:58] nofxx: but the best way to actually start, build or work on a gem
[20:40:05] Sou|cutter: In fairness, the practice of programming is humbling at any experience level
[20:40:14] nofxx: or an webapp
[20:40:21] imperator: ACTION figures out that pt-br must be portuguese-brazilian
[20:40:22] HAL2328: nofxx, i really liked his writing style and the flow. but chapter 9 got real complex for me. i used other sources to learn though. i should finish his book though
[20:41:40] HAL2328: nofxx, now im learning rails,trying to build a web app. been doing some michael hartl tutorial with other materials its been a joy so far
[20:41:52] tkuchiki: has joined #ruby
[20:41:58] nofxx: imperator, yeah... there's actually a new agreement and the hipster new way is to merge pt-pt and pt-br
[20:42:15] imperator: HAL2328, give it time, you'll become jaded and cynical like me
[20:42:19] shmilan: has joined #ruby
[20:42:35] Ox0dea: Sick motivational skills.
[20:43:03] Sou|cutter: imperator: eventually you'll come back out the other side and it will be a joy again
[20:43:11] HAL2328: imperator, that's like mic drop motivational
[20:43:18] acke: has joined #ruby
[20:43:21] Sou|cutter: see how I turned that around?
[20:43:27] imperator: Sou|cutter, haha, the other side is retirement at this point
[20:43:43] nofxx: HAL2328, I advice you to start with a ruby gem or a simpler ruby webapp framework... like sinatra
[20:43:45] Ox0dea: HAL2328: Do you remember where exactly you hit the wall in LtP 9?
[20:43:55] nofxx: or non dynamic stuff like middleman or nanoc HAL2328
[20:44:28] catbusters: has joined #ruby
[20:45:49] imperator: HAL2328, no problem, any time
[20:46:38] HAL2328: nofxx, note taken. if i get stuck like i did with LtP, i might take a break and attempt those. that is if don't get jaded by that time ;)
[20:47:22] thezanke: has joined #ruby
[20:47:24] alphaatom: has joined #ruby
[20:47:24] thezanke: has left #ruby: ("Leaving")
[20:48:02] HAL2328: Ox0dea, looking back at the table of contents, i think i actually made it to chapter 10. it might have been recursion. or maybe it seems so since i studied those from different sources.
[20:48:50] mib_mib: has joined #ruby
[20:48:53] benlieb: has joined #ruby
[20:48:58] workmad3: has joined #ruby
[20:49:19] HAL2328: Ox0dea, don't have the book with me at the moment to really see where but i think it's a book worth finishing
[20:49:46] Maletor: has joined #ruby
[20:49:57] mib_mib: hi - using ruby 2.1 - i have a csv file that has empty quoted fields, i.e. a field that is empty is just two quotes ("") instead of just blank - however, the default when reading the csv file seems to read this as two quotes instead of unquoting it - is there a csv option to optionally 'unquote' all fields?
[20:52:50] nofxx: mib_mib, I believe you're seeing the quotes but it's actually blank
[20:53:05] nofxx: puts "" vs p ""
[20:53:32] nofxx: otherwise it'll be "\"\""
[20:53:34] mib_mib: the field actually is two quotes
[20:53:53] mib_mib: maybe ur right....
[20:54:11] mib_mib: hmmmm i guess i was confused, thanks!
[20:56:37] HAL2328: mib_mib, great community here no? can learn a lot by just lounging here, not just by asking q's.
[20:57:45] HAL2328: that should be the benchmark for education, if you can learn when you are just lounging around, what an excellent education your getting.
[20:57:53] fxn: has joined #ruby
[20:58:10] firstdayonthejob: has joined #ruby
[20:58:35] Ox0dea: HAL2328: You're fooling yourself. http://i.imgur.com/Lk4iika.png
[20:59:03] pocketprotector: has joined #ruby
[20:59:49] OrbitalKitten: has joined #ruby
[21:00:23] NeverDie: has joined #ruby
[21:01:09] HAL2328: Ox0dea, that's very true. I meant the environment we have here in this channel. say im doing something else, e.g. not in the room. in a typical classroom i'd miss everything had i gone to the restroom.
[21:01:23] rakm: has joined #ruby
[21:01:35] Ox0dea: A classroom isn't inherently a place for active learning.
[21:01:41] nofxx: Ox0dea, who are 10% who can't learn anything by DOING a presentation? Hm, when come to think... that how stupid ppl get a job ... teatching
[21:01:48] havenn: has joined #ruby
[21:02:08] nofxx: teaching* ... bad teachers I mean. There are lots.
[21:02:14] imperator: wow, that was harsh
[21:02:28] HAL2328: but here i have context since i can just trace back. some questions i probably won't ask since i haven't ran into those problems
[21:02:37] alphaatom: has joined #ruby
[21:02:45] HAL2328: but like the p vs puts behavior
[21:03:22] casadei_: has joined #ruby
[21:03:24] phutchins: has joined #ruby
[21:03:30] HAL2328: i learned that thanks to a question someone else. in a classroom, i woulda missed out. that's all i meant.
[21:04:10] Ox0dea: HAL2328: Sure, passive learning is fine as a supplement.
[21:04:14] HAL2328: nofxx, i agree. i took c++ in high school and it was so bad i didn't pursue cs in college
[21:04:19] imperator: HAL2328, ... what's the "2328" ... just curious
[21:04:21] Ox0dea: Just mind that you don't become content with passive learning.
[21:04:22] HAL2328: i thought cs wasn't for me
[21:04:33] alphaatom: has joined #ruby
[21:04:53] imperator: i've tried and dropped c++ classses 3 times - the teachers were fucking horrid
[21:05:06] djbkd: has joined #ruby
[21:05:32] Ox0dea: > Your best teacher is your last mistake.
[21:05:46] Ox0dea: At least, you should strive to make it so.
[21:06:37] imperator: my favorite was the dude who required a book that was out of print, and would take cell phone calls from his wife in the middle of class
[21:07:23] HAL2328: imperator, lol my teacher would just make us do book problems and he just sat there with a book and half of the time he fell asleep
[21:07:27] zenguy_pc: has joined #ruby
[21:07:32] HAL2328: imperator, the entire class goofed around. we never worked
[21:08:03] HAL2328: imperator, my name is a reference to a movie character can you figure it out?
[21:08:09] shmilan: I cannot believe the horrible teachers you guys have had.
[21:08:33] Ox0dea: >> 9000 / 2328.0
[21:08:34] ruboto: Ox0dea # => 3.865979381443299 (https://eval.in/430775)
[21:08:40] Ox0dea: Would've been nice if that'd come out to pi.
[21:08:45] imperator: HAL2328, we already have hal_9000 ;)
[21:09:13] HAL2328: yep that's why i had to go with the hexadecimal value of hal9000 :)
[21:09:27] eightfold: has joined #ruby
[21:09:40] blackjid: has joined #ruby
[21:09:57] hal_9000: actually i have an underscore because a freenode guy aready had it without
[21:10:06] hal_9000: btw hi imperator :)
[21:10:12] imperator: i vote you change your name to "bowman" ;)
[21:10:27] HAL2328: so i guess im hal 9000 the third
[21:10:50] hal_9000: i knew a Frank Poole in real life in colege :)
[21:11:02] hal_9000: er, college even
[21:11:38] hal_9000: imperator: did you see my link earlier or no?
[21:11:46] imperator: which? don't think so
[21:11:58] alphaatom: has joined #ruby
[21:12:30] miah: nobody is ever SAL-9000
[21:12:35] Ox0dea: >> 'hal'.to_i(23).to_s(27)
[21:12:36] hal_9000: i think i tagged you on FB, not sure - link is http://rubyhacker.com/hidden/excerpt-from-elixir4rubyists
[21:12:36] ruboto: Ox0dea # => "cia" (https://eval.in/430779)
[21:12:39] Ox0dea: We've been infiltrated!
[21:13:07] hal_9000: miah: I don???t recognize SAL :) in the original book/movie, the whole series was named HAL
[21:13:15] HAL2328: Ox0dea, 9000 = 0x2328 yep! they know who we are now
[21:13:29] Ox0dea: HAL2328: Huh?
[21:13:40] blackjid: has joined #ruby
[21:13:50] Ox0dea: Bases 23 and 27 are not bases 10 and 16 where I'm from.
[21:13:51] miah: SAL-9000 is HAL's twin
[21:13:55] hal_9000: Ox0dea: if you read the book, every computer of that model was named HAL
[21:14:09] hal_9000: miah: yes, but that is not until 2010
[21:14:16] imperator: hal_9000, link no work
[21:14:18] postmodern: has joined #ruby
[21:14:22] hal_9000: i refer to the original book/movie 2001
[21:14:34] hal_9000: imperator: bah, add .html to it
[21:14:37] miah: ya, i just said that nobody ever picks SAL-9000, its always HAL-9000
[21:15:01] imperator: hal_9000, no joy
[21:15:11] hal_9000: miah: true story! i was just saying maybe there are a bunch of purists out there like me ;)
[21:15:14] HAL2328: i consided SAL. but i liked my 2328 idea better. it kept me low profile til imperator decided to invade myprivacy
[21:15:25] hal_9000: imperator: obviously i typo???d, let me see
[21:15:31] Ox0dea: >> 'sal'.to_i(36).to_s(35)
[21:15:32] ruboto: Ox0dea # => "two" (https://eval.in/430780)
[21:15:44] devoldmx: has joined #ruby
[21:15:58] hal_9000: some days i feel like HAL 3995, marked down from 9000, act now while supplies last!
[21:16:04] Rollabunna: has joined #ruby
[21:16:57] hal_9000: imperator: http://rubyhacker.com/hidden/excerpt-from-elixir4rubyists.html
[21:17:19] HAL2328: IBM = HAL + 1 to each character (H -> I, A -> B, L -> M)
[21:17:34] imperator: hal_9000, that worked, thanks
[21:17:40] hal_9000: Clarke denied that was the origin, though
[21:17:53] hal_9000: though one has to wonder
[21:18:00] howdoicomputer: has joined #ruby
[21:18:11] juanpablo_: has joined #ruby
[21:18:15] miah: interesting
[21:18:33] hal_9000: I actually exchamged emails with ACC once ??? he said, ???Intrigued to hear from Hal! :)???
[21:19:20] hal_9000: in the original book, HAL stood for ???Heuristically-programmed ALgoritrhms??? or something
[21:19:46] frem_: has joined #ruby
[21:20:08] hal_9000: on the hex topic, my fave hex number is 3735928559 decimal
[21:20:52] Ox0dea: >> 3735928559.to_s 16
[21:20:53] ruboto: Ox0dea # => "deadbeef" (https://eval.in/430783)
[21:20:59] ht__: has joined #ruby
[21:21:06] Ox0dea: >> 0xdeadbeefcafebabed00d
[21:21:07] ruboto: Ox0dea # => 1051570404360395033595917 (https://eval.in/430784)
[21:21:31] chouhoulis: has joined #ruby
[21:21:34] Ox0dea: It's not prime.
[21:21:58] ruby-lang260: has joined #ruby
[21:22:09] hal_9000: great, now i???m taking a ribbing
[21:22:18] banjara: has joined #ruby
[21:23:01] ruby-lang260: I inherited some code I cannot fully make out, can I get help here
[21:23:03] HAL2328: >> 9000.to_s(16)
[21:23:04] ruboto: HAL2328 # => "2328" (https://eval.in/430785)
[21:23:21] ruby-lang260: def optimize(hsh) hsh.reduce({}) do |new_hsh, (k,v)| new_hsh[k.to_sym] = v.kind_of?(Hash) ? optimize(v) : v new_hsh end end
[21:23:45] imperator: ruby-lang260, easier and better if you use a gist
[21:24:20] Ox0dea: ruby-lang260: The purpose of that method is to convert all the keys of a Hash to Symbols.
[21:24:51] Ox0dea: It is poorly named.
[21:25:14] bigredboots: has joined #ruby
[21:25:26] drbrain: it may not even be an optimization
[21:25:40] havenwood: 912559 is Prime, but there are other reasons to dislike it.
[21:25:50] Ox0dea: havenwood: It sums to 31, also prime.
[21:26:23] MasterPiece: has joined #ruby
[21:27:00] webopsx: has joined #ruby
[21:27:07] oldbay: has joined #ruby
[21:27:09] ruby-lang260: <Ox0dea> thank you
[21:27:13] Ox0dea: Sure thing.
[21:27:17] craysiii: prime numbers need to check their privilege.
[21:27:25] dgs_: has joined #ruby
[21:27:28] Ox0dea: craysiii: They are the minority!
[21:27:32] symbole: has joined #ruby
[21:27:38] craysiii: yes but they hold all the numerical power
[21:27:49] Ox0dea: >> require 'prime'; 10000.times.count(&:prime?)
[21:27:50] ruboto: Ox0dea # => 1229 (https://eval.in/430791)
[21:27:58] Ox0dea: We are the ~12.3%.
[21:28:38] allomov: has joined #ruby
[21:29:05] dgs_: is there anyway to have .irbrc's PROMPT setting reevaluated either periodically, or after a command has run? (I've got an app that can connect to many different databases - I'd like to have the name of the database in the irb prompt to stop me accidentally working in the wrong databsae)
[21:29:58] roolo: has joined #ruby
[21:30:08] finisherr: has joined #ruby
[21:30:08] eam: craysiii: primes have many powers, sure, but it's debatable whether they're number one
[21:31:51] dseitz: has joined #ruby
[21:31:55] craysiii: they can't be #1 since 1 isn't prime :)
[21:32:12] eam: I believe you'll find some debate upon that very issue ;-)
[21:32:27] casadei_: has joined #ruby
[21:33:17] craysiii: i don't want to open pandora's box
[21:33:44] eam: next up: whether 0.9999 repeating is equal to one
[21:34:15] Ox0dea: eam: That's really not up for debate. ;)
[21:34:35] tobiasvl: of course it's not! you can tell just by looking at the numbers!!!
[21:34:46] eam: that's the magical property of a debate: everything is as long as someone's willing to debate it
[21:35:07] eam: see also: everyone who prefers vi over emacs
[21:35:36] dgs_: eam: i think you have that the wrong way round
[21:35:42] tobiasvl: emacs is a perfectly fine OS. just too bad it ships with a mediocre text editor
[21:36:18] eam: it's true though, I like vi -- and my favorite implementation is emacs
[21:36:21] dgs_: emacs is okay - doesn't really deserve all the bashing it gets
[21:36:30] eam: I actually really do use viper-mode, not kidding
[21:36:39] dgs_: that's horrible =p
[21:36:44] bougyman: emacs is fine, so long as you have 64G of memory.
[21:36:51] rakm: has joined #ruby
[21:37:00] eam: it's fantastic, all the vi keybindings and an editor enginge with a reasonable language
[21:37:07] bruno-: has joined #ruby
[21:37:08] zenguy_pc: has joined #ruby
[21:37:13] eam: *cough* vimscript
[21:37:18] bougyman: elips being 'reasonable' ?
[21:37:23] eam: vs vimscript?
[21:37:32] Ox0dea: eam: You don't actually have trouble with .999... = 1, right?
[21:37:44] eam: Ox0dea: well that's an assignment to a literal so
[21:37:46] nofxx: bougyman, that's not true... days open now it's eating 90M of 16gb
[21:37:49] wasamasa: y'all should upgrade to evil
[21:38:15] eam: emacs uses less memory than vim in most common configurations
[21:38:22] nofxx: bougyman, 500m virt
[21:38:27] eam: both are kinda insignificant
[21:38:55] eam: eclipse on the other hand
[21:39:05] bougyman: bougyman 2519 0.6 0.0 52272 7928 pts/3 S+ 16:38 0:00 | \_ vim app.rb
[21:39:13] bougyman: that's with a TON of bundles loaded
[21:39:29] bougyman: show me your emacs.
[21:39:31] nofxx: and elasticsearch doing nothing: 800mb res / 7gb virt
[21:39:40] eam: starting up eclipse is its own agile task
[21:39:46] nofxx: actually if you filter my mem you'll only see java
[21:39:50] wldcordeiro: has joined #ruby
[21:40:04] nofxx: 100mb per chromium tab... that's huge
[21:40:18] wasamasa: 100mb per emacs instance here
[21:40:24] bougyman: you seem to have failed to see my query to show me your emacs.
[21:40:35] nofxx: wasamasa, use more than one?
[21:40:51] wasamasa: nofxx: I use two usually and sometimes spawn extra ones for testing with a clean slate
[21:40:53] nofxx: bougyman, a sec
[21:41:10] momomomomo_: has joined #ruby
[21:41:12] morenoh149: has joined #ruby
[21:41:15] nofxx: nofxx 11080 0.1 0.6 594176 97244 tty2 Sl+ Sep08 1:53 emacs
[21:41:23] Ox0dea: dgs_: Have you tried this approach? https://stackoverflow.com/a/6075985
[21:41:29] bougyman: that's only like 10x larger of a footpring.
[21:41:29] imperator: >> require 'prime'; "optimus".to_i(27).prime?
[21:41:30] ruboto: imperator # => true (https://eval.in/430792)
[21:41:36] bougyman: sure, you can 'equate' that.
[21:41:36] wasamasa: htop tells me it's 144M RES
[21:41:37] nofxx: wasamasa, cool, was going to suggest projectile/perspective ... using it for just some weeks now, very cool
[21:41:54] wasamasa: and 133M RES for the other one
[21:41:56] Ox0dea: >> require 'prime'; 27.prime? # imperator
[21:41:57] ruboto: Ox0dea # => false (https://eval.in/430793)
[21:42:07] dgs_: Ox0dea: no! i hadn't seen that - looks promising though
[21:42:12] dgs_: I'll give it a try - thanks =)
[21:42:12] wasamasa: as long as I don't use it to run a webserver, I don't really care about the memory usage
[21:42:17] Ox0dea: dgs_: It's wonky as hell, but it oughta do.
[21:42:25] Ox0dea: Godspeed.
[21:43:08] wasamasa: ACTION goes to bed
[21:43:37] zenguy_pc: has joined #ruby
[21:43:44] eam: memory is what, $5/gig?
[21:44:07] eam: I can afford at least $5 of computing equipment to run a text editor
[21:44:29] eam: hell, double that
[21:44:31] dseitz: has joined #ruby
[21:46:54] iamvery: has joined #ruby
[21:47:33] bruno-: has joined #ruby
[21:47:34] finisherr: has joined #ruby
[21:47:57] mary5030: has joined #ruby
[21:48:23] ytti: too bad it doesnt scale
[21:48:40] ytti: you can throw arbitrary amount of $5 and except to always get 1GB incremenet in memory
[21:51:34] rickmasta: has joined #ruby
[21:51:54] modern: has joined #ruby
[21:52:18] eam: ytti: density becomes an issue, sure, but it's still awfully cheap
[21:52:38] eam: my laptop has 16G and it's pretty old
[21:52:53] eam: two years old?
[21:52:57] bruno-: has joined #ruby
[21:52:57] petricore: has joined #ruby
[21:53:52] ytti: sure, but if you'd want that extra 1GB
[21:53:57] ytti: it wouldn't cost 5USD
[21:54:03] ytti: it would be like 3000USD
[21:54:20] bricker: has joined #ruby
[21:55:14] brandon: has joined #ruby
[21:57:50] bigredboots: has joined #ruby
[21:58:06] eam: ytti: about $300 actually, if I wanted to go to 32G
[21:58:10] tkuchiki: has joined #ruby
[21:58:27] jackjackdripper: has joined #ruby
[21:58:30] bruno-: has joined #ruby
[21:58:31] eam: but it turns out 16G is plenty to run several instances of both vi and emacs
[21:59:30] jgt1: has joined #ruby
[22:00:16] imperator: like 3 emacs
[22:00:19] eam: speaking of memory hogs, iTerm2 is using about 3x as much as any of my editors
[22:01:28] imperator: eam, now try eclipse
[22:01:55] eam: I'd rather not
[22:02:13] imperator: you'll try eclipse now, and you'll like it
[22:03:12] eam: ok I clicked the button. I'll check back in tomorrow when it's running
[22:03:16] imperator: i tried using it for a while, it had a neat plugin architecture, but it was just so damned heavy
[22:03:52] bruno-: has joined #ruby
[22:06:44] symbole: has joined #ruby
[22:07:56] Eiam_: has joined #ruby
[22:08:22] yfeldblum: has joined #ruby
[22:08:53] bruno-_: has joined #ruby
[22:09:42] blackmesa: has joined #ruby
[22:12:10] pandaant: has joined #ruby
[22:14:32] bruno-_: has joined #ruby
[22:15:34] zenguy_pc: has joined #ruby
[22:17:07] chouhoul_: has joined #ruby
[22:17:56] ellisTAA: has joined #ruby
[22:19:21] ellisTAA: when i run this method i get a collection of objects back, but i only want the first object, i tried putting the object in an array and calling .first but that didn???t work
[22:19:22] ellisTAA: https://gist.github.com/ellismarte/f7874bbb4b1334f8e5ef#file-binarytree-rb-L17-L20
[22:19:33] poli: has joined #ruby
[22:20:36] hessparker: has joined #ruby
[22:20:40] oldbay: has joined #ruby
[22:20:50] choke: has joined #ruby
[22:21:10] hessparker: hey, I was wondering if anyone knows of a good tool for profiling ruby tests
[22:21:21] havenwood: has joined #ruby
[22:21:43] hessparker: I am looking for something that can point me at the slowest test contexts. anyone know something like that?
[22:22:19] benlieb: has joined #ruby
[22:23:05] pyon: has joined #ruby
[22:23:13] dmolina: has joined #ruby
[22:23:21] Soda: has joined #ruby
[22:24:46] droidburgundy: has joined #ruby
[22:24:52] shmilan: has joined #ruby
[22:27:17] lkba_: has joined #ruby
[22:28:14] jenrzzz: has joined #ruby
[22:30:49] meph: has joined #ruby
[22:31:06] ytti: eam, where can you get laptop with 32GB of memory for 300USD?
[22:31:45] dopamean_: has joined #ruby
[22:34:26] jenrzzz: has joined #ruby
[22:38:13] HAL2328: has joined #ruby
[22:41:35] Sou|cutter: hessparker: like https://www.relishapp.com/rspec/rspec-core/docs/configuration/profile-examples ?
[22:41:57] j4cknewt: has joined #ruby
[22:43:37] weemsledeux: has joined #ruby
[22:44:11] gambl0re: has joined #ruby
[22:44:17] cgfbee: has joined #ruby
[22:45:33] dgs_: Ox0dea: that worked =)
[22:46:14] michaeldeol: has joined #ruby
[22:47:16] cfloare: has joined #ruby
[22:47:17] zlogan85: has joined #ruby
[22:47:19] karapetyan: has joined #ruby
[22:47:58] havenn: has joined #ruby
[22:48:19] tjohnson: has joined #ruby
[22:49:31] athinggoingon: has joined #ruby
[22:50:47] blackjid: has joined #ruby
[22:50:55] sevenseacat: has joined #ruby
[22:50:59] RandyT: has joined #ruby
[22:53:14] Tuxero: has joined #ruby
[22:54:12] dseitz: has joined #ruby
[22:54:19] weemsledeux: has joined #ruby
[22:54:26] PaulVern: has joined #ruby
[22:55:00] Ox0dea: dgs_: Wunderbar!
[22:55:23] PaulVern: When running a shell command from within ruby, is there a way I can send it to the background and have my script move on?
[22:55:24] jenrzzz: has joined #ruby
[22:55:40] PaulVern: eg: irb(main):002:0> `sleep 10 &`
[22:55:43] bigbadbear: has joined #ruby
[22:55:43] dgutierrez1287: has joined #ruby
[22:55:47] nahtnam: has joined #ruby
[22:56:11] PaulVern: I've also tried irb(main):002:0> `nohup sleep 10 &`
[22:57:46] hekin: has joined #ruby
[22:58:16] chills42: has joined #ruby
[22:59:34] michaeldeol: has joined #ruby
[22:59:35] aredridel: has joined #ruby
[22:59:51] EasyCo: has joined #ruby
[23:00:16] banister: has joined #ruby
[23:00:16] PaulVern: nvm, found it
[23:00:20] PaulVern: Process.fork
[23:00:28] Ox0dea: Also Process.detach.
[23:00:28] bruno-: has joined #ruby
[23:01:01] Ox0dea: PaulVern > denvercoder9.
[23:01:32] rwyoung: has joined #ruby
[23:02:54] eam: ytti: it's $300 to replace my current 16G with a new 32G
[23:03:19] eam: and that's on the expensive end as it's apple
[23:03:25] eam: memory is pretty cheap
[23:03:49] moss: has joined #ruby
[23:03:53] baweaver: has joined #ruby
[23:04:34] totimkopf: has joined #ruby
[23:04:51] michaeldeol: has joined #ruby
[23:05:22] ytti: two years old mbp eats 32GB?
[23:05:54] ytti: gonna call bs on that
[23:05:55] bruno-: has joined #ruby
[23:06:09] michaeldeol: has joined #ruby
[23:06:19] symbole: has joined #ruby
[23:07:06] dseitz: has joined #ruby
[23:07:21] bender_unit: has joined #ruby
[23:07:53] zenguy_pc: has joined #ruby
[23:07:59] alphaatom: has joined #ruby
[23:08:02] benlieb: has joined #ruby
[23:08:11] justin_pdx: has joined #ruby
[23:08:27] krz: has joined #ruby
[23:08:28] eam: ytti: http://www.crucial.com/usa/en/mac-pro-%28late-2013%29/CT5019230
[23:08:50] fierycatnet: has joined #ruby
[23:09:37] eam: I might even be running in 1x16G so it'd be cheaper (doubt it though)
[23:09:56] ytti: oh you have MP
[23:10:03] ytti: i thought MBP
[23:10:20] ytti: yeah adding 1GB to my laptop wouldn't cost 5USD
[23:10:21] eam: oh is that a mac pro? haha
[23:10:23] ytti: but more like 3000USD
[23:10:29] eam: ytti: I do have a mbp, I misread :)
[23:10:47] ytti: yeah i don't think any MBP officially eats 32GB
[23:10:52] ytti: the 'ECC' is kinda give away
[23:11:01] fierycatnet: has joined #ruby
[23:11:01] dgs_: ahhh. i have a mbp with only 8gig
[23:11:06] ytti: intel does not have laptop chipsets which support ECC memory
[23:11:09] ytti: which is damn shame
[23:11:09] zenguy_pc: has joined #ruby
[23:11:11] dgs_: would love to be able to upgrade it to 16G
[23:11:17] dgs_: stupid apple
[23:11:22] eam: ytti: that's surprising - I'd expect for them to have doubled since 2013
[23:11:40] eam: in any event, pretend I have the 8G config and I'm adding memory -still cheap :)
[23:11:57] eam: my bad for already having the max
[23:12:04] ytti: yeah i agree, if we pretend, it cost 5USD to add 1GB and it scales
[23:12:30] eam: nothing scales to infinity, but it's still cheap up to 16G modules
[23:12:56] eam: but yes, density is not infinite
[23:14:54] benlieb: has joined #ruby
[23:15:09] zenguy_pc: has joined #ruby
[23:15:56] baweaver: has joined #ruby
[23:16:28] devoldmx: has joined #ruby
[23:16:57] Rollabunna: has joined #ruby
[23:17:21] VeryBewitching: Having an SSD and 16GB on my workstation is happy, I'm glad technology has arrived here.
[23:17:26] j4cknewt: has joined #ruby
[23:17:57] NeverDie: has joined #ruby
[23:19:27] juanpablo_: has joined #ruby
[23:21:12] minimalism: has joined #ruby
[23:22:34] sp4rrow: has joined #ruby
[23:24:11] meatherly: has joined #ruby
[23:26:31] stardiviner: has joined #ruby
[23:27:46] j4cknewt: has joined #ruby
[23:28:05] charliesome: has joined #ruby
[23:29:20] jackjackdripper: has joined #ruby
[23:32:35] greister: has joined #ruby
[23:33:59] jefus: has joined #ruby
[23:35:57] YuhMon: has joined #ruby
[23:35:59] YuhMon: wah gwaan mi breddas???
[23:36:33] Radar: What language is that?
[23:37:08] YuhMon: english mon
[23:37:20] Yzguy: has joined #ruby
[23:37:22] YuhMon: yuh no speek english?
[23:38:00] j4cknewt: has joined #ruby
[23:39:26] quazimodo: has joined #ruby
[23:40:08] dgs_: hmmm. some sort of african phonetic pronouciation thing?
[23:40:50] YuhMon: no dont be racist mon
[23:41:02] YuhMon: out of many one people mi bredda
[23:41:34] dgs_: hmmm. how is that racist?
[23:42:17] WeZZard: has joined #ruby
[23:42:34] YuhMon: yuh a seh mi african wen i no gwaan lef a africa
[23:43:59] jefus: has left #ruby: ("Leaving")
[23:44:07] dgs_: right, well that's that conversation done
[23:45:36] j4cknewt: has joined #ruby
[23:46:05] YuhMon: i speek english and yu nuh nono cuz yu neva got da bes mark in english and fi no gud fi lief
[23:46:39] sevenseacat: has left #ruby: (".")
[23:46:56] ranchodev: has joined #ruby
[23:47:48] NeverDie: has joined #ruby
[23:47:58] shock_one: has joined #ruby
[23:48:53] karapetyan: has joined #ruby
[23:49:00] Eiam_: has joined #ruby
[23:49:31] WeZZard: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[23:49:35] WeZZard: has joined #ruby
[23:49:35] pyon: has joined #ruby
[23:49:45] WillAmes: has joined #ruby
[23:50:39] chills42: has joined #ruby
[23:50:40] Rubie: has joined #ruby
[23:50:52] tokik: has joined #ruby
[23:51:01] WeZZard: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[23:51:17] bricker: troll detected
[23:51:34] j4cknewt_: has joined #ruby
[23:51:44] baweaver: ACTION polishes hammer
[23:51:49] YuhMon: mi from da greatestcountry in da world jamaica
[23:52:01] YuhMon: mi ah king in mi yaad
[23:52:38] baweaver: !mute YuhMon no mahn, no
[23:52:39] ruboto: +q YuhMon!*@*
[23:52:39] ruboto: -o ruboto
[23:52:47] Azure|dc: has joined #ruby
[23:53:26] al2o3-cr: has joined #ruby
[23:57:53] nofxx: knew a guy from jamaica... my english is bad but, talked with lots of ppl US, UK but jamaica.. man can't understand shit.
[23:58:08] nofxx: and if you say "please talk slow" is worst
[23:58:55] craysiii: nofxx its hard to understand because not only the accent, they have a unique lexicon
[23:59:57] ellisTAA: has joined #ruby