« Back to channel list

#ruby - 13 December 2015

« Back 1 day Forward 1 day »
[00:00:43] trwyth: has joined #ruby
[00:00:51] rgrmatt: has joined #ruby
[00:01:19] grayjedi: has joined #ruby
[00:02:13] Ox0dea: underplank: $ echo exit | dtruss irb 2>&1 | grep irbrc
[00:02:17] Ox0dea: Something like that.
[00:03:45] shock_one: has joined #ruby
[00:04:21] Hazel: has joined #ruby
[00:07:07] nertzy: has joined #ruby
[00:07:44] ruid: has joined #ruby
[00:07:45] ruid: has joined #ruby
[00:08:27] shevy: .irbrc in my home works on linux
[00:09:34] cassioscabral: has joined #ruby
[00:11:04] havenwood: underplank: shevy: https://github.com/ruby/ruby/blob/832c74f428db6c5bd6e575e1f6ea7fe0891c84d2/lib/irb/init.rb#L262-L274
[00:11:24] _main_: has joined #ruby
[00:12:31] shanemcd: has joined #ruby
[00:13:23] shevy: if irbrc = ENV["IRBRC"]
[00:13:28] reaVer: has joined #ruby
[00:13:29] shevy: I read this as comparison!
[00:13:33] dlitvak: has joined #ruby
[00:14:28] Ox0dea: That's why it warns. :P
[00:15:46] underplank: has joined #ruby
[00:16:05] shevy: for m in @CONF[:LOAD_MODULES]
[00:18:08] akem: has joined #ruby
[00:18:42] TheBloke: has joined #ruby
[00:21:30] metredigm: i can't find anything on other people having linking errors with the http_parser.rb package.. would a 32 bit word size cause problems?
[00:22:03] phantummm: has joined #ruby
[00:22:43] bronson: has joined #ruby
[00:25:42] duckpuppy: has joined #ruby
[00:26:01] DLSteve: has joined #ruby
[00:32:23] cdg: has joined #ruby
[00:43:30] zarubin: has joined #ruby
[00:45:14] DavidDudson: has joined #ruby
[00:45:35] thejamespinto: has joined #ruby
[00:47:48] n_blownapart: has joined #ruby
[00:54:24] rgrmatt: has joined #ruby
[00:55:29] akem: has joined #ruby
[00:57:02] Azure: has joined #ruby
[00:57:08] ta: has joined #ruby
[00:59:44] tenderlove: has joined #ruby
[00:59:54] _stu_: has joined #ruby
[00:59:58] Azure: has joined #ruby
[01:00:55] ornerymoose: has joined #ruby
[01:00:58] thejamespinto: has joined #ruby
[01:02:16] solocshaw: has joined #ruby
[01:03:56] weemsledeux: has joined #ruby
[01:06:43] DavidDudson: has joined #ruby
[01:07:08] nateberkopec: has joined #ruby
[01:09:24] romain_t: has joined #ruby
[01:18:04] TheHodge: has joined #ruby
[01:18:21] dlitvak: has joined #ruby
[01:19:25] charliesome: has joined #ruby
[01:20:30] duderonomy: has joined #ruby
[01:21:01] TheBloke: has joined #ruby
[01:21:36] hackeron: has joined #ruby
[01:24:22] n_blownapart: has joined #ruby
[01:30:26] nateberkopec: has joined #ruby
[01:30:52] greg: has joined #ruby
[01:31:39] atumzin: has joined #ruby
[01:31:52] atumzin: has joined #ruby
[01:31:59] jdm: has joined #ruby
[01:33:00] ta: has joined #ruby
[01:33:27] greg: hello i have a doubt while going through ruby tut. i found in ruby everything is an object but how keywords can be called as object?
[01:34:15] jhass: well an object or syntax
[01:34:21] jhass: keywords are syntax
[01:34:41] jhass: I was correcting what you read
[01:34:55] greg: but it can be called as object or not?
[01:35:17] jhass: with "everything" we mean "every thing", that is all values are
[01:35:27] greg: then we cant say everything is an object
[01:35:46] pwnd_nsfw: has joined #ruby
[01:35:47] shevy: who says so
[01:35:59] greg: https://rubymonk.com/learning/books/1-ruby-primer/chapters/6-objects/lessons/35-introduction-to-objects
[01:36:19] shevy: now you know which book not to learn from
[01:36:47] bean: has joined #ruby
[01:36:50] havenwood: greg: If it's not returned it's not a thing.
[01:37:17] havenwood: greg: It's no-thing.
[01:37:37] shevy: greg look at that:
[01:37:46] shevy: >> x = 5; def x.hi; puts "hi"; end
[01:37:47] ruboto: shevy # => can't define singleton (TypeError) ...check link for more (https://eval.in/484243)
[01:37:52] ChanServ: -b gwaanbatimon!*@*
[01:38:43] greg: shevy: then which book to follow?
[01:39:30] DavidDudson: has joined #ruby
[01:39:39] havenwood: greg: Return value are Objects. Move forward with learning!
[01:40:11] shevy: greg depends, I started with the pickaxe book myself which was ok, at the least the one for the 1.8.x era
[01:40:14] bronson: has joined #ruby
[01:40:31] havenwood: >> BasicObject.is_a? Object
[01:40:32] ruboto: havenwood # => true (https://eval.in/484244)
[01:40:43] Ox0dea: >> Object === BasicObject.new
[01:40:45] ruboto: Ox0dea # => false (https://eval.in/484245)
[01:40:56] Ox0dea: havenwood: Don't go misleadin' folks now.
[01:41:10] jhass: both is just confusing atm
[01:41:16] shevy: greg https://pine.fm/LearnToProgram/chap_01.html is quite ok, if we could all contribute to it and extend it then it would be even cooler
[01:42:43] greg: shevy: gone through it. it neeed many upgradation
[01:42:47] havenwood: Ox0dea: Just don't instantiate it!
[01:43:16] dlitvak: has joined #ruby
[01:43:23] bubbys: has joined #ruby
[01:43:25] Ox0dea: greg: Which is your favorite Ruby keyword?
[01:43:51] govg: has joined #ruby
[01:44:13] jhass: >> class If; def initialize(&condition); @condition = condition; end; def then(&body); @condition.call && body.call; end; end; If.new { 1 == 1 }.then { puts "1 is 1" }
[01:44:14] ruboto: jhass # => 1 is 1 ...check link for more (https://eval.in/484246)
[01:44:33] jhass: can we do with only method calls?
[01:45:11] Ox0dea: Proc is Turing-complete. :P
[01:45:43] bronson: has joined #ruby
[01:47:21] havenwood: greg: (In Ruby 1.9 Object got a parent called BasicObject, if you want to be pedantic about all return values.)
[01:47:59] havenwood: greg: It's doesn't matter.
[01:49:13] greg: i can say the word which return something can be called as object?
[01:49:27] havenwood: greg: Statements return objects.
[01:49:55] greg: <havenwood> greg: Return value are Objects. Move forward with learning
[01:50:13] jhass: greg: "All values are objects" better? Move on.
[01:51:14] blub: ruby is great..
[01:51:27] Ox0dea: >> def if; 42; end
[01:51:29] ruboto: Ox0dea # => :if (https://eval.in/484247)
[01:51:53] shock_one: has joined #ruby
[01:52:34] Ox0dea: "After all, He Who Must Not Be Named did great things--terrible, yes, but great."
[01:52:41] Ox0dea: I've said it before: Ruby is Voldemort.
[01:53:52] Ox0dea: Er, no, it seems it was ObjectSpace last time.
[01:54:24] havenwood: greg: If you wonder if something is an Object, ask it! (If it's not a value there's nothing to ask so the question ends there.)
[01:55:19] Ox0dea: >> defined? defined?
[01:55:21] ruboto: Ox0dea # => /tmp/execpad-04e0c75cd9af/source-04e0c75cd9af:3: syntax error, unexpected keyword_rescue ...check link for more (https://eval.in/484248)
[01:55:23] Ox0dea: havenwood: That went well.
[01:55:25] A5101: has joined #ruby
[01:56:17] havenwood: Ox0dea: Just need parens for a better error.
[01:56:37] Ox0dea: Aye, and that the one I was hoping for.
[01:57:01] havenwood: Should change when to use parens from "when it breaks the interpreter" to "when it breaks the interpreter or produces gibberish errors."
[01:58:06] Ox0dea: >> BasicObject.new.respond_to? :is_a?
[01:58:07] ruboto: Ox0dea # => undefined method `respond_to?' for #<BasicObject:0x40a64344> (NoMethodError) ...check link for more (https://eval.in/484249)
[01:58:21] Ox0dea: Methinks maybe BasicObjects are a little too basic.
[01:59:32] greg: what is the current stable version of ruby
[01:59:40] havenwood: greg: 2.2.3
[02:00:01] greg: my system says ruby 2.2.1p85 (2015-02-26 revision 49769) [i686-linux]
[02:00:11] greg: how to upgrade
[02:00:18] havenwood: greg: How'd you install 2.2.1?
[02:00:33] greg: sudo aptget ruby
[02:01:23] havenwood: greg: Ubuntu or something else?
[02:02:19] havenwood: greg: You might just use your Ubuntu's latest stable unless you have a reason to do otherwise. One otherwise option is to use Brightbox's up-to-date Ruby packages for Ubuntu: https://www.brightbox.com/docs/ruby/ubuntu/
[02:02:55] greg: my ubuntu is lts 14
[02:03:10] zamerick_: has joined #ruby
[02:03:13] weemsledeux: has joined #ruby
[02:03:14] reaVer: has joined #ruby
[02:06:12] shanemcd: has joined #ruby
[02:09:32] beast: has joined #ruby
[02:10:48] Azure: has joined #ruby
[02:13:33] Azure: has joined #ruby
[02:15:30] yilmaz_alican: has joined #ruby
[02:17:35] chouhoulis: has joined #ruby
[02:19:04] tenderlove: has joined #ruby
[02:19:32] tenderlove: has joined #ruby
[02:19:39] yilmaz_alican: has left #ruby: ()
[02:19:46] blackgoat: has joined #ruby
[02:21:21] jhass: oh, new bundler
[02:21:31] agent_white: has joined #ruby
[02:23:02] enlycanm3nt: has joined #ruby
[02:23:29] A5101: has joined #ruby
[02:26:31] tenderlove: has joined #ruby
[02:26:47] casadei: has joined #ruby
[02:28:54] dlitvak: has joined #ruby
[02:30:50] rickmasta: has joined #ruby
[02:32:23] juddey: has joined #ruby
[02:33:02] ruby-lang518: has joined #ruby
[02:33:54] BTRE: has joined #ruby
[02:35:20] Ox0dea: Oh, new Linux.
[02:35:23] iamcz: has joined #ruby
[02:38:05] duckpuppy: has joined #ruby
[02:39:06] segmond: has joined #ruby
[02:44:49] duckpuppy: has joined #ruby
[02:44:51] yfeldblum: has joined #ruby
[02:47:32] bronson: has joined #ruby
[02:47:53] chipotle: has joined #ruby
[02:51:26] calderonroberto: has joined #ruby
[02:54:50] JDiPierro: has joined #ruby
[02:59:37] dlitvak: has joined #ruby
[03:01:34] shiru: has joined #ruby
[03:01:40] tenderlove: has joined #ruby
[03:02:04] cassioscabral: has joined #ruby
[03:03:48] User458764: has joined #ruby
[03:03:58] mooe: has joined #ruby
[03:05:55] 14WAAEQEK: has joined #ruby
[03:06:07] djbkd: has joined #ruby
[03:10:31] cassioscabral: has joined #ruby
[03:11:55] ponga: has joined #ruby
[03:13:43] kkeuning: has joined #ruby
[03:15:11] DavidDudson: has joined #ruby
[03:15:37] kkeuning: has joined #ruby
[03:15:50] 14WAAEQEK: has left #ruby: ()
[03:18:29] chouhoulis: has joined #ruby
[03:20:00] bubbys: has joined #ruby
[03:20:25] chipotle: has joined #ruby
[03:23:04] Nanuq: has joined #ruby
[03:23:32] krobzaur: has joined #ruby
[03:26:44] djbkd: has joined #ruby
[03:28:05] JDiPierro: has joined #ruby
[03:28:49] atomical: has joined #ruby
[03:29:17] nibbo: has joined #ruby
[03:32:32] DeXterbed: has joined #ruby
[03:35:23] kalopsian: has joined #ruby
[03:35:47] dlitvak: has joined #ruby
[03:36:52] ReK2: has joined #ruby
[03:36:53] ReK2: has joined #ruby
[03:39:14] shanemcd: has joined #ruby
[03:39:46] The_Phoenix: has joined #ruby
[03:40:53] shock_one: has joined #ruby
[03:44:04] lessless: has joined #ruby
[03:44:07] Coldblackice: has joined #ruby
[03:44:23] brt: has joined #ruby
[03:47:01] rkazak: has joined #ruby
[03:47:03] calderonroberto: has joined #ruby
[03:57:58] sucks: has joined #ruby
[03:58:05] cassioscabral: has joined #ruby
[04:00:55] qiukun: has joined #ruby
[04:02:20] gaiada: has joined #ruby
[04:04:40] blackgoat: has joined #ruby
[04:06:11] Bellthoven: has joined #ruby
[04:06:15] yeticry: has joined #ruby
[04:11:02] crowell: has joined #ruby
[04:11:03] crowell: has joined #ruby
[04:11:35] n_blownapart: has joined #ruby
[04:11:43] yeticry: has joined #ruby
[04:11:46] grayjedi: has joined #ruby
[04:11:59] grayjedi: has left #ruby: ()
[04:14:53] braincrash: has joined #ruby
[04:16:04] ss_much: has joined #ruby
[04:18:55] nertzy: has joined #ruby
[04:19:14] chouhoulis: has joined #ruby
[04:27:54] gix: has joined #ruby
[04:30:51] chipotle: has joined #ruby
[04:32:27] nocd: has joined #ruby
[04:35:38] devoldmx: has joined #ruby
[04:45:16] psye: has joined #ruby
[04:47:34] atumzin: has joined #ruby
[04:47:35] shanemcd: has joined #ruby
[04:54:46] duckpuppy: has joined #ruby
[05:03:44] phantummm: has joined #ruby
[05:05:57] darkxploit: has joined #ruby
[05:06:00] kiez0rd: has joined #ruby
[05:06:35] darkxploit: has joined #ruby
[05:08:41] agent_white: has joined #ruby
[05:09:45] qiukun: has joined #ruby
[05:11:27] iamvery: has joined #ruby
[05:15:33] calderonroberto: has joined #ruby
[05:20:30] chouhoulis: has joined #ruby
[05:25:22] qiukun: has joined #ruby
[05:25:53] skweek: has joined #ruby
[05:28:01] rickmasta: has joined #ruby
[05:28:55] skweek: has joined #ruby
[05:33:10] dviola: has joined #ruby
[05:35:08] colegatron: has joined #ruby
[05:36:32] blackgoat: has joined #ruby
[05:39:23] qiukun: has joined #ruby
[05:45:36] jessemcgilallen: has joined #ruby
[05:48:58] bronson: has joined #ruby
[05:55:29] duckpuppy: has joined #ruby
[05:55:46] darkf: has joined #ruby
[05:58:37] govg: has joined #ruby
[06:03:06] tenderlove: has joined #ruby
[06:03:22] dviola: has joined #ruby
[06:03:28] dlitvak: has joined #ruby
[06:05:18] gaiada: has joined #ruby
[06:05:26] s00pcan_: has joined #ruby
[06:05:59] BTRE: has joined #ruby
[06:06:11] s00pcan_: has joined #ruby
[06:06:40] s00pcan_: has joined #ruby
[06:09:37] gaiada: has joined #ruby
[06:11:40] shanemcd: has joined #ruby
[06:11:51] djbkd: has joined #ruby
[06:12:01] rdavila: has joined #ruby
[06:12:28] user083_: has joined #ruby
[06:13:59] dlitvak: has joined #ruby
[06:14:23] houhoulis: has joined #ruby
[06:14:37] tenderlove: has joined #ruby
[06:18:12] yfeldblum: has joined #ruby
[06:19:45] tpendragon: has joined #ruby
[06:20:37] TomPeed: has joined #ruby
[06:21:14] chouhoulis: has joined #ruby
[06:25:38] bean: has joined #ruby
[06:26:58] bubbys: has joined #ruby
[06:27:24] gaiada: has joined #ruby
[06:29:00] ruby-lang097: has joined #ruby
[06:29:50] framling: has joined #ruby
[06:30:45] ruby-lang097: Hey guys I'm having a simple problem. My program is supposed to read an integer value from a file (and save the data in runtill variable) and if the data is : not integer, empty, nil etc the program would just assign its own value to runtill variable but it's not quite working
[06:30:46] ruby-lang097: http://pastebin.com/6zxFW0FZ
[06:30:47] ruboto: ruby-lang097, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/4dcba93d89705cae1b11
[06:30:47] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[06:32:34] ruby-lang097: The if statement at the bottom is supposed to be ran when data read from the file is anything other than an integer value
[06:34:32] Liam`: has joined #ruby
[06:35:29] bean: ruby-lang097, so what does it do now?
[06:35:57] bean: ruby-lang097, any errors? or it just says it was edited?
[06:38:34] bean: ruby-lang097, also, you might want to use AND, not OR
[06:38:44] ruby-lang097: I don't get any error, but if i create variables to track what's not working, it seems that 0 gets assigned to runtill and i wonder why
[06:39:21] bean: and invert your syntax, potentially
[06:39:28] bean: one moment, i'll pull up my ruby box
[06:41:13] tenderlove: has joined #ruby
[06:42:28] ruby-lang097: I tried using "and" and now I'm getting "class or module required (Typeerror)" D:
[06:43:16] bean: gist.github.com/daniellockard/e8b73fa4cd49ec473ae0
[06:43:26] bean: that totally works for me
[06:43:32] bean: and doesn't set it to "thing"
[06:43:43] bean: if testfile just contains '1'
[06:45:01] bean: ruby-lang097, ^
[06:46:01] ruby-lang097: i do not understand
[06:46:37] bean: I guess i'm not sure what you're confused on
[06:47:30] bean: that code reads the contents of testfile, makes it into an int.
[06:47:35] Liam`: has joined #ruby
[06:47:59] bean: and then checks it
[06:48:28] bean: oh, ruby-lang097. check this
[06:48:32] bean: >> puts "".to_i
[06:48:34] ruboto: bean # => 0 ...check link for more (https://eval.in/484288)
[06:49:46] bean: " If there is not a valid number at the start of str, 0 is returned. This method never raises an exception when base is valid."
[06:50:34] akem: has joined #ruby
[06:50:36] ruby-lang097: ohhh, so we get 0 if there is no data at all?
[06:51:33] gaiada: has joined #ruby
[06:51:53] ruby-lang097: I will see if this problem has been fixed
[06:53:06] bean: ruby-lang097, its not a 'problem'. it's a design choice.
[06:53:16] ruby-lang097: Will it be okay to use if contents == 0 on line 12 https://gist.github.com/daniellockard/e8b73fa4cd49ec473ae0
[06:53:42] Ox0dea: has joined #ruby
[06:54:16] Ox0dea: ruby-lang097: In this case, you're actually seeing the results of converting `nil` to an integer, not an empty string.
[06:54:19] Ox0dea: >> nil.to_i
[06:54:20] ruboto: Ox0dea # => 0 (https://eval.in/484291)
[06:54:31] Ox0dea: >> ''.lines
[06:54:32] ruboto: Ox0dea # => [] (https://eval.in/484293)
[06:54:52] bean: i mean, yeah, you could also check to see if its 0, ruby-lang097
[06:55:16] Ox0dea: There is a difference between nonexistence (`nil`) and nothing (0).
[06:55:18] bean: it'll just also not work if you have "0" in the file.
[06:55:39] bean: I'm aware, Ox0dea, but nil.to_i == 0.
[06:55:39] Ox0dea: bean: If you were aware of the incorrectness of your proposal, why propose it?
[06:56:10] bean: because in this case nil casted to an int is, infact, 0.
[06:56:10] Ox0dea: bean: Why are you telling me something which I just plainly demonstrated my awareness of?
[06:56:20] Guest55126: has joined #ruby
[06:56:25] bean: wow, hostile.
[06:56:49] Ox0dea: It was an honest question in whose answer I am genuinely interested.
[06:56:50] bean: I'm just telling him he could do that, as long as he understands the implications.
[06:57:05] Ox0dea: You addressed me specifically.
[06:57:31] duckpuppy: has joined #ruby
[06:57:50] bean: *sigh* calm down, you replied to something I was already talking to ruby-lang097 about.
[06:58:17] Ox0dea: "Speak only that you would improve the silence", in my opinion.
[06:59:00] Ox0dea: Telling newbies to treat 0 and `nil` equivalently is scarcely worthy of being called advice.
[06:59:28] bean: http://ruby-doc.org/core-2.2.0/String.html#method-i-to_i it literally says "If there is not a valid number at the start of str, 0 is returned. This method never raises an exception when base is valid."
[06:59:35] bean: I never said to treat nil and 0 the same.
[07:00:22] M-prosodyContext: has joined #ruby
[07:00:22] M-mistake: has joined #ruby
[07:01:00] ruby-lang097: I don't get any of what you guys are saying.
[07:01:01] shanemcd: has joined #ruby
[07:01:18] Ox0dea: http://i.imgur.com/Ufbr5ej.gif
[07:01:22] ruby-lang097: Learnning on our own sucks v_v
[07:01:46] bean: Don't worry about it ruby-lang097. You can learn pretty easily. Lots of good ruby tutorials and exercises online.
[07:02:04] Ox0dea: I think there's an IRC channel too.
[07:02:45] bean: I think you're correct, not sure what it is, though.
[07:03:06] ruby-lang097: The main problem is my english u know, most of the time i cant learn because i do not understand the words
[07:03:13] baweaver: ACTION raises eyebrow
[07:03:18] ruby-lang097: but yeah thanks for the help
[07:03:34] Ox0dea: It wasn't help if nothing stuck. :<
[07:04:36] ruby-lang097: huh? Thats because im very newbie man..?
[07:04:50] shock_one: has joined #ruby
[07:05:20] ruby-lang097: but yeah i now know 0 != nil but i did know it before huehuehue just dont know the key difference between them
[07:05:45] Ox0dea: They're just... completely different things.
[07:06:21] Ox0dea: It's probably for the worse that `nil.to_i` is 0, but that's well past renegotiation.
[07:07:04] ruby-lang097: why would you get nil by reading a file?
[07:07:19] baweaver: nothing in it, doesn't exist, something like that
[07:07:36] bean: if the file was empty you might, depending on the implementation, or the file being unable to open or something.
[07:07:44] Ox0dea: ruby-lang097: IO.readlines on an empty file returns an empty array, of which the 0th element is `nil`.
[07:07:52] baweaver: read nothing get nothing
[07:08:03] Ox0dea: Simple as that, really.
[07:08:11] ruby-lang097: Thanks Ox0dea
[07:08:13] jdelaney: has joined #ruby
[07:08:14] Ox0dea: Happy to help.
[07:08:28] ruby-lang097: Lmao i dnt even know what im coding sucks
[07:08:55] baweaver: everyone says that about code they wrote last week, welcome to programming
[07:09:01] baweaver: if they don't there's another issue.
[07:09:31] M-Kodo: has joined #ruby
[07:10:13] ruby-lang097: i will fix this bug right away then
[07:10:35] jdelaney: I'm moving to a job soon where I'll be using Ruby for the first time. Any book recommendations that are targeted towards people experienced with programming?
[07:11:13] Ox0dea: jdelaney: https://learnxinyminutes.com/docs/ruby/
[07:11:27] Ox0dea: Not a book, but a solid quickstart.
[07:11:31] jdelaney: Ox0dea: Thanks! I'll check that out
[07:11:40] Ox0dea: Sure thing.
[07:13:19] yardenbar: has joined #ruby
[07:13:50] M-shine: has joined #ruby
[07:14:59] lessless: has joined #ruby
[07:14:59] crystalmaiden: has joined #ruby
[07:17:00] baweaver: jdelaney: Eloquent Ruby if you want a full book.
[07:17:09] baweaver: and just ruby or rails as well?
[07:18:04] jdelaney: baweaver: I'll check that book out. Thanks as well!
[07:18:06] norc: Ox0dea: Luckily nil equals nil. In SQL null == null equals null, because there "NULL" means unknown. :-)
[07:18:09] AmericanRedneck: has joined #ruby
[07:18:36] AmericanRedneck: what is a good $100,000+ job where people love free speech and expression ("hate" and "racist" speech must be not discriminated against and only encouraged) and that has great benefits too?
[07:18:58] jdelaney: baweaver: Just ruby. I believe I'll be using Sinatra
[07:19:03] bean: AmericanRedneck, .... trolling?
[07:19:06] baweaver: Might read into that as well
[07:19:09] shock_one: has joined #ruby
[07:19:14] ruboto: +q AmericanRedneck!*@*
[07:19:15] ruboto: -o ruboto
[07:19:35] baweaver: and that's all we'll say about that.
[07:20:08] blub: hi baweaver
[07:20:18] dionysus69: has joined #ruby
[07:22:00] chouhoulis: has joined #ruby
[07:22:54] tildes: has joined #ruby
[07:23:09] Ox0dea: norc: http://stackoverflow.com/q/4456438
[07:24:18] lxsameer: has joined #ruby
[07:24:50] norc: The referenced xkcd is really fitting: http://xkcd.com/327/
[07:26:01] baweaver: little bobby tables was it?
[07:26:15] Ox0dea: I'm surprised there isn't yet an xkcd about there being an xkcd for every occasion.
[07:26:34] baweaver: put it by Randall then
[07:26:47] Ox0dea: That might be too meta even for his tastes.
[07:27:01] Ox0dea: https://xkcd.com/917/
[07:27:16] baweaver: https://xkcd.com/917/
[07:27:27] Ox0dea: So, it has come to this.
[07:27:52] baweaver: https://xkcd.com/225/
[07:28:50] Ox0dea: I had https://xkcd.com/1022/ in mind.
[07:30:30] gaiada: has joined #ruby
[07:32:43] rippa: has joined #ruby
[07:35:25] gaiada: has joined #ruby
[07:35:40] devoldmx: has joined #ruby
[07:37:24] DavidDudson: has joined #ruby
[07:38:31] User458764: has joined #ruby
[07:40:15] blackgoat: has joined #ruby
[07:41:17] Cohedrin: has joined #ruby
[07:42:58] claw: has joined #ruby
[07:43:27] zarubin: has joined #ruby
[07:45:06] slackbotgz: has joined #ruby
[07:47:26] vikas027: has joined #ruby
[07:49:44] DeXterbed: has joined #ruby
[07:51:13] bronson: has joined #ruby
[07:53:45] iateadonut: has joined #ruby
[07:54:20] AmericanCowboy: has joined #ruby
[07:55:13] ibouvousaime: has joined #ruby
[07:58:15] duckpuppy: has joined #ruby
[08:02:09] Guest32: has joined #ruby
[08:02:34] ZeeNoodleyGamer: has joined #ruby
[08:05:59] Guest32: has joined #ruby
[08:08:52] User458764: has joined #ruby
[08:10:42] jdm_: has joined #ruby
[08:11:30] thejamespinto: has joined #ruby
[08:12:45] TheBloke-: has joined #ruby
[08:14:01] djbkd: has joined #ruby
[08:14:31] gaiada: has joined #ruby
[08:14:42] lessless: has joined #ruby
[08:16:49] solars: has joined #ruby
[08:18:01] slackbotgz: has joined #ruby
[08:18:11] gaiada: has joined #ruby
[08:22:49] chouhoulis: has joined #ruby
[08:23:51] gaiada: has joined #ruby
[08:25:03] _hs2000_: has joined #ruby
[08:26:34] ibouvousaime: has joined #ruby
[08:28:30] gaiada: has joined #ruby
[08:28:42] brt: has joined #ruby
[08:39:38] brt_: has joined #ruby
[08:45:31] Arnvald: has joined #ruby
[08:50:36] devoldmx: has joined #ruby
[08:52:15] _hs2000_: has left #ruby: ("Leaving")
[08:53:10] zamerick_: has joined #ruby
[08:54:02] spider-mario: has joined #ruby
[08:54:19] Jackneill: has joined #ruby
[08:54:25] Ishido: has joined #ruby
[08:55:09] firstdayonthejob: has joined #ruby
[08:57:34] agit0: has joined #ruby
[08:59:01] duckpuppy: has joined #ruby
[09:03:16] shanemcd: has joined #ruby
[09:03:26] Arnvald: has joined #ruby
[09:03:48] devoldmx: has joined #ruby
[09:08:58] blackgoat: has joined #ruby
[09:10:58] jdm: has joined #ruby
[09:12:07] BaroMeter: has joined #ruby
[09:18:21] gaiada: has joined #ruby
[09:19:22] Arnvald_: has joined #ruby
[09:23:11] gaiada: has joined #ruby
[09:23:31] chouhoulis: has joined #ruby
[09:23:52] devoldmx: has joined #ruby
[09:27:31] SOLDIERz: has joined #ruby
[09:33:10] Arnvald: has joined #ruby
[09:41:49] charles81: has joined #ruby
[09:43:29] zarubin: has joined #ruby
[09:48:19] Arnvald_: has joined #ruby
[09:50:58] favadi: has joined #ruby
[09:51:32] baweaver: has joined #ruby
[09:52:15] kp666: has joined #ruby
[09:57:01] bmalum: has joined #ruby
[09:57:16] berserk_ren: has joined #ruby
[09:59:48] duckpuppy: has joined #ruby
[10:02:14] shock_one: has joined #ruby
[10:03:30] Mr_Pancake: has joined #ruby
[10:05:58] cornerma1: has joined #ruby
[10:08:26] Arnvald: has joined #ruby
[10:11:05] jdm_: has joined #ruby
[10:11:24] dopie: has joined #ruby
[10:11:42] neanderslob: has joined #ruby
[10:12:33] Hounddog: has joined #ruby
[10:13:34] timonv: has joined #ruby
[10:14:52] favadi: has joined #ruby
[10:15:31] InvGhost: has joined #ruby
[10:17:02] charliesome: has joined #ruby
[10:17:48] HANJIN: has joined #ruby
[10:19:06] bjmllr_: has joined #ruby
[10:19:12] troter______: has joined #ruby
[10:20:00] lancetw: has joined #ruby
[10:21:09] TheBloke: has joined #ruby
[10:21:41] The_Phoenix: has joined #ruby
[10:24:22] chouhoulis: has joined #ruby
[10:24:49] charliesome: has joined #ruby
[10:25:18] spt0: has joined #ruby
[10:28:04] Heero: has joined #ruby
[10:28:16] ornerymoose: has joined #ruby
[10:29:59] apipkin: has joined #ruby
[10:30:05] mostlybadfly: has joined #ruby
[10:31:31] countryHick: has joined #ruby
[10:31:35] jlyndon: has joined #ruby
[10:33:32] rideh: has joined #ruby
[10:34:05] Arnvald_: has joined #ruby
[10:34:09] cwong_on_irc: has joined #ruby
[10:34:20] n008f4g_: has joined #ruby
[10:34:21] SCHAAP137: has joined #ruby
[10:35:15] manveru: has joined #ruby
[10:36:06] AlexRussia: has joined #ruby
[10:37:20] avdi: has joined #ruby
[10:38:05] zeljkof: has joined #ruby
[10:38:10] pandaant: has joined #ruby
[10:40:50] n008f4g_: has joined #ruby
[10:41:04] jord: has joined #ruby
[10:42:54] deimos: has joined #ruby
[10:42:59] Guest69624: has joined #ruby
[10:43:09] Guest4184___: has joined #ruby
[10:43:10] jxf: has joined #ruby
[10:43:15] MiracleBlue_: has joined #ruby
[10:43:19] ELCALOR: has joined #ruby
[10:43:24] zzak_: has joined #ruby
[10:43:30] colstrom: has joined #ruby
[10:43:39] pmarreck: has joined #ruby
[10:43:41] angiebadillo: has joined #ruby
[10:43:57] DoYouKnow: has joined #ruby
[10:44:07] zipkid: has joined #ruby
[10:44:07] lancetw: has joined #ruby
[10:44:17] jeregrine: has joined #ruby
[10:44:17] halfdan: has joined #ruby
[10:44:26] vikaton: has joined #ruby
[10:44:26] daxroc: has joined #ruby
[10:44:36] mjc_: has joined #ruby
[10:44:42] schaary: has joined #ruby
[10:44:43] aphprentice: has joined #ruby
[10:44:46] bryancp: has joined #ruby
[10:44:55] HashNuke: has joined #ruby
[10:45:00] akitada: has joined #ruby
[10:45:05] PhilK: has joined #ruby
[10:45:08] alxndr: has joined #ruby
[10:45:22] mrsolo: has joined #ruby
[10:45:25] twodayslate: has joined #ruby
[10:45:34] bjmllr_: has joined #ruby
[10:45:37] zrl: has joined #ruby
[10:45:54] Eleeleth: has joined #ruby
[10:45:57] kellabyte: has joined #ruby
[10:46:05] _joes___: has joined #ruby
[10:46:13] adambeynon: has joined #ruby
[10:46:14] bestie: has joined #ruby
[10:46:19] pizzaops: has joined #ruby
[10:46:21] thesheff17: has joined #ruby
[10:46:31] jmccartie: has joined #ruby
[10:46:33] sideshowcoder: has joined #ruby
[10:46:38] amitchellbullard: has joined #ruby
[10:46:40] shelling__: has joined #ruby
[10:46:50] Lloyd: has joined #ruby
[10:47:05] cbetta: has joined #ruby
[10:47:06] cstrahan: has joined #ruby
[10:47:22] djbender: has joined #ruby
[10:47:34] bove: has joined #ruby
[10:47:37] bcavileer_: has joined #ruby
[10:47:39] zemmihates: has joined #ruby
[10:47:41] tonini: has joined #ruby
[10:47:41] Guest85414______: has joined #ruby
[10:47:44] iamdevnul__: has joined #ruby
[10:47:57] huddy: has joined #ruby
[10:48:08] ramblinpeck: has joined #ruby
[10:48:13] n1ftyn8_: has joined #ruby
[10:48:25] Heero: has joined #ruby
[10:48:27] Arnvald: has joined #ruby
[10:48:28] frankS2: has joined #ruby
[10:48:45] The_Phoenix: has joined #ruby
[10:48:48] pfg: has joined #ruby
[10:49:06] mikolalysenko: has joined #ruby
[10:49:28] mooe: has joined #ruby
[10:49:31] prosody: has joined #ruby
[10:49:35] AdamMeghji: has joined #ruby
[10:49:47] skmp: has joined #ruby
[10:49:52] bttf: has joined #ruby
[10:49:57] countryHick: has joined #ruby
[10:50:11] avdi: has joined #ruby
[10:50:18] golgaroth: has joined #ruby
[10:50:33] apipkin: has joined #ruby
[10:50:48] rfv: has joined #ruby
[10:50:48] troter______: has joined #ruby
[10:50:53] bjeanes: has joined #ruby
[10:50:57] jevs: has joined #ruby
[10:51:04] frode15243: has joined #ruby
[10:51:05] joaomdmoura__: has joined #ruby
[10:51:09] lacrosse: has joined #ruby
[10:51:37] cbednarski: has joined #ruby
[10:51:48] chrisseaton: has joined #ruby
[10:51:54] yo61: has joined #ruby
[10:51:57] spastorino: has joined #ruby
[10:52:02] jlyndon: has joined #ruby
[10:52:15] benlakey: has joined #ruby
[10:52:56] faisal_: has joined #ruby
[10:53:00] charles81: has joined #ruby
[10:53:16] zeljkof: has joined #ruby
[10:53:18] im0b: has joined #ruby
[10:53:47] machty: has joined #ruby
[10:56:21] err_ok: has joined #ruby
[10:57:07] ggherdov: has joined #ruby
[10:58:22] m8: has joined #ruby
[10:59:08] zarubin: has joined #ruby
[11:00:37] duckpuppy: has joined #ruby
[11:04:27] CloCkWeRX: has joined #ruby
[11:05:06] Arnvald: has joined #ruby
[11:05:08] DeXterbed: has joined #ruby
[11:05:37] shanemcd: has joined #ruby
[11:06:56] Hanmac: has joined #ruby
[11:07:56] tomphp: has joined #ruby
[11:08:41] yfeldblum: has joined #ruby
[11:11:14] jdm__: has joined #ruby
[11:11:36] lurch_: has joined #ruby
[11:12:57] toretore: has joined #ruby
[11:15:18] howdoi: has joined #ruby
[11:19:52] tomphp: has joined #ruby
[11:22:16] kirun: has joined #ruby
[11:24:16] lkba: has joined #ruby
[11:24:24] qiukun: has joined #ruby
[11:25:07] chouhoulis: has joined #ruby
[11:26:41] tomphp: has joined #ruby
[11:27:09] jbrhbr: has joined #ruby
[11:30:40] qiukun: has joined #ruby
[11:31:11] tomphp: has joined #ruby
[11:31:58] Mon_Ouie: has joined #ruby
[11:34:25] colegatron: has joined #ruby
[11:34:53] tomphp: has joined #ruby
[11:35:06] blackgoat: has joined #ruby
[11:35:49] Diabolik: is anyone here on codewars
[11:37:45] DeXterbed: has joined #ruby
[11:38:29] bronson: has joined #ruby
[11:39:34] qiukun: has joined #ruby
[11:40:46] Guest66119: has joined #ruby
[11:42:15] TomyLobo: has joined #ruby
[11:42:24] shock_one: has joined #ruby
[11:42:43] vdamewood: has joined #ruby
[11:44:49] solocshaw: has joined #ruby
[11:44:51] ruboto: Just ask your question, if anyone has or can, they will respond.
[11:45:42] agit0: has joined #ruby
[11:45:47] blub: hi j hass
[11:50:11] qiukun: has joined #ruby
[11:52:45] baweaver: has joined #ruby
[11:55:51] qiukun: has joined #ruby
[11:57:29] codecop: has joined #ruby
[11:57:52] bmalum: has joined #ruby
[11:59:49] Diabolik: jhass struggling with this
[11:59:50] Diabolik: https://www.dropbox.com/s/kg252ocxn0o7uz0/Screenshot%202015-12-13%2011.51.42.png?dl=0
[11:59:56] Arnvald: has joined #ruby
[12:01:01] Arnvald: has joined #ruby
[12:01:19] duckpuppy: has joined #ruby
[12:01:33] Diabolik: just want to count how many items in a string are duplicated, but not how many times they have been duplicated
[12:01:55] cornerman: has joined #ruby
[12:04:09] shazaum_: has joined #ruby
[12:05:40] c355E3B: has joined #ruby
[12:07:18] shevy: when you write items in a string
[12:07:21] shevy: what do you mean with items
[12:07:58] diego1: has joined #ruby
[12:08:04] diego1: has joined #ruby
[12:09:32] jhass: Diabolik: well, count all occurrences and then count which have a count > 1
[12:09:52] jhass: &ri String#chars
[12:09:53] `derpy: method `String#chars`: Returns an array of characters in str. This is a shorthand for str.each_char.to_??? ??? http://rubydoc.info/stdlib/core/String#chars-instance_method
[12:11:19] jdm_: has joined #ruby
[12:12:40] charliesome: has joined #ruby
[12:13:46] qiukun: has joined #ruby
[12:16:44] skade: has joined #ruby
[12:17:06] InvGhost: has joined #ruby
[12:17:13] tomphp: has joined #ruby
[12:18:28] nfk|laptop: has joined #ruby
[12:19:23] Diabolik: .chars.count then pass a block in
[12:20:26] diego1: has joined #ruby
[12:20:29] qiukun: has joined #ruby
[12:20:33] diego1: has joined #ruby
[12:21:40] CloCkWeRX: has joined #ruby
[12:22:16] Diabolik: shevy i meant characters
[12:22:19] Diabolik: sorry for confusion
[12:22:47] jhass: Diabolik: if you can't solve it then you can't solve it
[12:22:56] zarubin: has joined #ruby
[12:22:59] jhass: the point of these is not to find somebody that solves them for you
[12:23:33] Diabolik: i was just looking for advice..
[12:23:45] jhass: I'll happily discuss prettier solutions once you've shown yours
[12:24:10] shevy: Diabolik ok so substring searching
[12:24:14] jhass: I think I've given you a quite huge advice already by giving you the base algorithm
[12:24:49] shevy: quite huge hmmm
[12:25:51] chouhoulis: has joined #ruby
[12:25:58] soahccc^: I try to write a little tool which can accept a file via argument or piped input. ARGF.each_line does the trick except for when there is neither an argument nor input stream it waits forever for input :( How do I prevent this?
[12:26:42] blackjid: has joined #ruby
[12:27:36] blub: it reads standard input and waits for an end of file, c-d on unix
[12:27:40] blub: that's the correct behaviour
[12:27:52] toretore: soahccc_, does the program work without the input?
[12:27:58] blub: if it didn't do that, piping wouldn't work anyway
[12:28:29] shevy: soahccc_ simply pipe it through a method that can handle the input-versus-no-input situation
[12:28:53] soahccc^: toretore: well not really but it should just exit (maybe show help). I just don't know how to check if there is something
[12:29:21] diego1: has joined #ruby
[12:29:24] toretore: what you could do is check if stdin is attached to a terminal
[12:29:29] diego1: has joined #ruby
[12:29:47] toretore: but that's not really something you should do
[12:30:06] toretore: if a program takes input on stdin it is correct behavior to block
[12:30:47] soahccc^: hmm cat without anything blocks as well. Maybe I should just leave it then :)
[12:31:24] blub: that's how unix programs work, its why ruby makes it easy to write programs that work like that :)
[12:31:30] toretore: some programs make you explicitly set "-" as the filename to indicate it should use stdin
[12:32:04] f00bar-32: has joined #ruby
[12:32:18] toretore: but i don't really like that
[12:32:34] toretore: if it makes sense, it should just default to stdin
[12:33:14] soahccc^: I thought maybe it's as simple as either there is $pipein but apparently it's all stdin :)
[12:33:16] skade: has joined #ruby
[12:34:24] Diabolik: i got a solution
[12:34:27] Diabolik: but its case sensitive
[12:34:42] jhass: &ri String#downcase String#upcase String#casecmp
[12:34:44] `derpy: http://rubydoc.info/stdlib/core/String#downcase-instance_method, http://rubydoc.info/stdlib/core/String#upcase-instance_method, http://rubydoc.info/stdlib/core/String#casecmp-instance_method
[12:35:03] danneu: has joined #ruby
[12:35:26] Diabolik: is there a prettier solution than this?
[12:35:26] Diabolik: def duplicate_count(text)
[12:35:27] Diabolik: array = text.downcase.chars
[12:35:27] Diabolik: array.select { |item| array.count(item) > 1 }.uniq.count
[12:35:59] Diabolik: apparently the best way is ('a'..'z').count { |c| text.downcase.count(c) > 1 }
[12:36:31] jhass: the uniq passed the tests?
[12:37:05] apeiros: It's probably quite a bit slower than using a counting hash
[12:37:09] jhass: for the latter I don't like that it downcases on each iteration
[12:37:18] apeiros: since you iterate over the string once for every character
[12:37:32] apeiros: i.e., if your string has 200 chars, you go over each character 200*200 times.
[12:37:56] sdothum: has joined #ruby
[12:38:13] tomphp: has joined #ruby
[12:38:29] jhass: text = text.downcase; text.chars.uniq.count {|char| text.count(char) > 1 }
[12:38:31] apeiros: what exactly should your result tell you? it seems to me that your first and second code example don't do the same
[12:38:53] jhass: apeiros: "aAbcc" #=> 2
[12:38:56] Diabolik: the first solution was mine
[12:38:58] apeiros: you want to know how many character occur more than once?
[12:39:01] Diabolik: the second was the highest voted one
[12:40:47] matp: has joined #ruby
[12:41:16] apeiros: text.downcase.chars.each_with_object(Hash.new(0)) { |char, counter| counter[char] += 1 }.select { |char, count| count > 1 }.values.inject(:+) # longer, but only iterates the string once
[12:41:32] apeiros: might want .inject(0, :+)
[12:41:44] apeiros: otherwise text="abc" would result in nil instead of 0
[12:41:49] jhass: huh, that's wrong apeiros :P
[12:42:03] jhass: not sum, just occurrences
[12:42:05] thejamespinto: has joined #ruby
[12:42:08] apeiros: text.downcase.chars.each_with_object(Hash.new(0)) { |char, counter| counter[char] += 1 }.select { |char, count| count > 1 }.size
[12:42:17] apeiros: or actually???
[12:42:17] jhass: apeiros: count takes a block :D
[12:42:24] apeiros: text.downcase.chars.each_with_object(Hash.new(0)) { |char, counter| counter[char] += 1 }.count { |char, count| count > 1 }
[12:42:39] jhass: apeiros: now each_char.with_object ;P
[12:42:51] apeiros: I bet with you that's slower :)
[12:43:05] jhass: for small inputs maybe
[12:43:24] apeiros: even for large, unless you start hitting memory limits
[12:44:07] apeiros: but since your text consumes O(n) memory already, this solution doesn't increase memory complexity (it takes "only" a factor more memory)
[12:44:32] jhass: hence relative measures aren't always the best
[12:44:41] jhass: 1G vs 2G makes a differences
[12:44:45] jhass: *difference
[12:45:05] apeiros: test it with a 1G string then ;-p
[12:45:20] jhass: can't be bothered :P
[12:46:09] apeiros: but yeah, if you work with *very* large strings, each_chars may be a consideration. but then you might even consider not having the full text in memory in the first place -> hence vape
[12:53:18] akem: has joined #ruby
[12:54:36] FernandoBasso: has joined #ruby
[12:54:52] tknz: has joined #ruby
[12:56:08] davedev24: has joined #ruby
[12:59:31] bmalum: has joined #ruby
[13:03:53] FooMunki: has joined #ruby
[13:04:43] spt0: has joined #ruby
[13:05:22] dlitvak: has joined #ruby
[13:07:20] shanemcd: has joined #ruby
[13:07:47] symm-: has joined #ruby
[13:08:26] akem: has joined #ruby
[13:08:26] rippa: has joined #ruby
[13:09:56] inukshuk_: has joined #ruby
[13:10:28] zamerick_: has joined #ruby
[13:11:29] jdm__: has joined #ruby
[13:13:58] weihan: has joined #ruby
[13:17:24] droidburgundy: has joined #ruby
[13:18:24] bmalum: has joined #ruby
[13:20:10] User458764: has joined #ruby
[13:21:09] shanemcd: has joined #ruby
[13:22:03] akem: has joined #ruby
[13:24:01] tomphp: has joined #ruby
[13:24:33] shock_one: has joined #ruby
[13:25:44] blackgoat: has joined #ruby
[13:26:16] iateadonut: has joined #ruby
[13:26:38] chouhoulis: has joined #ruby
[13:27:10] pawnbox: has joined #ruby
[13:28:40] favadi: has joined #ruby
[13:29:13] skcin7: has joined #ruby
[13:31:05] igor: has joined #ruby
[13:33:46] nocd: has joined #ruby
[13:35:44] charliesome: has joined #ruby
[13:40:10] charliesome: has joined #ruby
[13:41:10] bronson: has joined #ruby
[13:43:52] charliesome: has joined #ruby
[13:46:06] ruid: has joined #ruby
[13:46:06] ruid: has joined #ruby
[13:47:33] igor: has joined #ruby
[13:48:54] firstdayonthejob: has joined #ruby
[13:49:31] lessless: has joined #ruby
[13:49:32] loren: has joined #ruby
[13:50:12] loren: has left #ruby: ()
[13:52:07] arup_r: has joined #ruby
[13:53:27] baweaver: has joined #ruby
[13:53:44] radgeRayden_: has joined #ruby
[13:54:09] Visitante: has joined #ruby
[13:55:26] shevy: xmas is happening soon
[13:55:52] arup_r: shevy: any new ruby ? :)
[13:55:59] blub: whats that shev
[14:01:42] synthroid: has joined #ruby
[14:02:21] tlaxkit: has joined #ruby
[14:02:26] Bloomer: has joined #ruby
[14:02:47] charliesome: has joined #ruby
[14:02:50] duckpuppy: has joined #ruby
[14:04:24] skade: has joined #ruby
[14:05:23] solocshaw1: has joined #ruby
[14:05:43] platzhirsch: has joined #ruby
[14:06:23] wmdrossard: has joined #ruby
[14:06:42] govg: has joined #ruby
[14:07:11] shevy: arup_r yeah in 11 days or so
[14:07:42] akem: has joined #ruby
[14:09:30] dfinninger: has joined #ruby
[14:11:32] jdm_: has joined #ruby
[14:12:27] shazaum_: has joined #ruby
[14:15:14] jpank: has joined #ruby
[14:16:21] tildes: has joined #ruby
[14:17:59] DeXterbed: has joined #ruby
[14:18:47] favadi: has joined #ruby
[14:20:15] favadi: has left #ruby: ()
[14:20:27] aryaching: has joined #ruby
[14:27:22] chouhoulis: has joined #ruby
[14:28:30] dionysus69: has joined #ruby
[14:28:31] workmad3: has joined #ruby
[14:30:18] thejamespinto: has joined #ruby
[14:32:02] stannard: has joined #ruby
[14:35:19] TheBloke: has joined #ruby
[14:41:12] darkxploit: has joined #ruby
[14:42:53] zarubin: has joined #ruby
[14:43:16] shock_one: has joined #ruby
[14:45:05] tomphp: has joined #ruby
[14:46:31] f00bar-32: has joined #ruby
[14:47:04] govg: has joined #ruby
[14:47:42] dorei: has joined #ruby
[14:48:58] platzhirsch: has joined #ruby
[14:49:07] Xentil: has joined #ruby
[14:50:28] devoldmx: has joined #ruby
[14:52:27] shock_one: has joined #ruby
[14:53:15] loren: has joined #ruby
[14:53:33] loren321: has joined #ruby
[14:54:30] Diabolik: jhass what is wrong with my solution?
[14:54:31] Diabolik: https://www.dropbox.com/s/nynn506fr7ke0o5/Screenshot%202015-12-13%2014.54.14.png?dl=0
[14:55:11] ibouvousaime: has joined #ruby
[14:56:00] kobain: has joined #ruby
[14:56:26] jhass: it's slow?
[14:56:43] jhass: idk, it doesn't show the failing test cases in your screenshot
[14:57:09] platzhirsch: has joined #ruby
[14:57:48] ddv: how can I parse a date but prevent things like 'Mar' from parsing to March, but allow things like '20-10-2016' to parse correctly?
[14:58:04] adaedra: And you don't need to convert to a string for that, a modulo is enough.
[14:58:32] adaedra: ddv: Using strptime with predefined patter
[14:58:43] Diabolik: i can't even see the tests that are failing
[14:58:44] Diabolik: https://www.dropbox.com/s/nhr1dk4zgpghylk/Screenshot%202015-12-13%2014.58.34.png?dl=0
[14:58:45] ddv: Cool will check that one
[14:58:48] Diabolik: what would be more optimal jsaak
[14:59:58] TheBloke: has joined #ruby
[15:00:08] bmalum: has joined #ruby
[15:00:12] Azure: has joined #ruby
[15:00:46] jhass: looks like you ran out of available digits
[15:00:54] sigurding: has joined #ruby
[15:01:09] jhass: Diabolik: to_i returns 0 if it can't convert it to a number
[15:01:17] jhass: look at what you got instead
[15:01:17] havenwood: >> [1, 31, 33, 328, 324, 3247].map { |n| n % 10 }
[15:01:18] ruboto: havenwood # => [1, 1, 3, 8, 4, 7] (https://eval.in/484363)
[15:01:22] ElSif: has joined #ruby
[15:03:11] Diabolik: but the problem is im arriving at Infinity
[15:03:25] Diabolik: [10] pry(main)> (2**200)**(2**300)
[15:03:25] Diabolik: (pry):10: warning: in a**b, b may be too big
[15:03:25] Diabolik: => Infinity
[15:03:37] duckpuppy: has joined #ruby
[15:04:06] jhass: looks like we need some maths here ;)
[15:04:27] Diabolik: i can guarantee that 39 * 54
[15:04:47] Diabolik: the last number will be 6
[15:05:08] Diabolik: so i just need to multiply the last 2 digits of a and b?
[15:05:22] shanemcd: has joined #ruby
[15:05:58] zarubin: has joined #ruby
[15:07:24] aryaching_: has joined #ruby
[15:08:12] havenwood: Diabolik: What's 9 times 4?
[15:08:54] havenwood: Diabolik: Note last digit.
[15:09:38] havenwood: Diabolik: http://ruby-doc.org/core/Numeric.html#method-i-modulo
[15:09:44] Diabolik: yeah im modulo-ing
[15:09:47] Diabolik: so so far i have
[15:09:53] Diabolik: ((n1 % 10) ** n2) % 10
[15:09:57] Diabolik: which is getting me further
[15:10:01] Diabolik: but im still hitting infinity
[15:10:41] havenwood: Diabolik: Could you make anything else ^ there smaller?
[15:10:52] Diabolik: but im trying to figure out how
[15:11:48] jdm: has joined #ruby
[15:12:17] zast: has joined #ruby
[15:14:08] jhass: http://stackoverflow.com/a/7214528/2199687
[15:20:13] shanemcd: has joined #ruby
[15:20:18] dfinninger: has joined #ruby
[15:20:44] Diabolik: is this meant to be hard?
[15:21:51] shevy: PROGRAMMING IS HARD
[15:24:48] thejamespinto: has joined #ruby
[15:28:08] chouhoulis: has joined #ruby
[15:28:55] rikai: has joined #ruby
[15:31:55] Diabolik: havenwood any ideas on how to get n2 smaller?
[15:32:14] adaedra: how did you do with n1?
[15:32:26] Diabolik: moduloing it by 10 which doesn't work with n2
[15:32:52] devoldmx: has joined #ruby
[15:33:03] Diabolik: https://www.dropbox.com/s/sbm0xn7ygjqmnnl/Screenshot%202015-12-13%2015.33.00.png?dl=0
[15:33:05] Diabolik: more test failures
[15:33:56] adaedra: It would be cool to have the inputs on these tests tho.
[15:34:07] shock_one: has joined #ruby
[15:34:18] Diabolik: hang on il get them
[15:34:22] Ox0dea: They don't matter.
[15:35:14] _stu_: has joined #ruby
[15:35:17] workmad3: has joined #ruby
[15:35:18] Diabolik: https://gist.github.com/askl56/1e56dc7d73312b70a96b
[15:35:24] Mon_Ouie: a**b % 10 == (a**(b/2) % 10) * (a**(b/2) % 10) --- you can use this to implement modular exponentiation
[15:35:29] Ox0dea: >> (1..100).all? { |n| 3 ** n % 10 == 123 ** n % 10 } # Diabolik
[15:35:30] ruboto: Ox0dea # => true (https://eval.in/484374)
[15:35:33] havenwood: Diabolik: https://en.wikipedia.org/wiki/Modular_exponentiation
[15:35:46] DiCablo: has joined #ruby
[15:36:25] Ox0dea: The trick is to avoid doing the massive exponentiation at all.
[15:37:24] devoldmx: has joined #ruby
[15:37:58] stannard: has joined #ruby
[15:37:58] Diabolik: if you do a hmmm
[15:39:04] Diabolik: so how does that help you get the last digit Ox0dea
[15:39:26] gvaughn: has joined #ruby
[15:40:02] Ox0dea: Diabolik: As jhass' SO link plainly demonstrated, the unit digit cycles.
[15:40:32] Ox0dea: As my snippet demostrated, the unit digits for the exponentiation of some x are the same as those for x % 10.
[15:40:34] loren321: has left #ruby: ("Leaving")
[15:40:47] Ox0dea: The combination of these insights really ought to be enough to get there.
[15:40:54] Ox0dea: *demonstrated
[15:41:21] psye: has joined #ruby
[15:42:47] Arnvald: has joined #ruby
[15:42:47] goodcodeguy: has joined #ruby
[15:43:22] Bloomer: has joined #ruby
[15:43:31] ibouvousaime: has joined #ruby
[15:44:12] marr: has joined #ruby
[15:46:07] shock_one: has joined #ruby
[15:46:14] rikai: has joined #ruby
[15:47:33] shevy: *emostrated
[15:48:13] Ox0dea: Is that the process of having one's emotions surgically removed?
[15:49:25] ja: sounds unpleasant
[15:50:45] shevy: emocakes cry when you slice them
[15:51:35] Ox0dea: What is an emocake?
[15:52:50] sdothum: has joined #ruby
[15:53:03] shevy: I was thinking the same about emostration!
[15:53:18] Arnvald_: has joined #ruby
[15:53:24] Ox0dea: Diabolik: Status?
[15:53:40] Ox0dea: shevy: But you just invented emostration?
[15:54:10] baweaver: has joined #ruby
[15:55:16] shevy: well we had demostrated before
[15:55:43] Diabolik: https://gist.github.com/askl56/a3ba4a573bc176fcb42a
[15:55:46] Diabolik: i got some help from SO
[15:55:54] Diabolik: or rather reading stuff in python
[15:56:02] Diabolik: but it works
[15:56:04] Diabolik: ACTION shrugs
[15:57:01] Ox0dea: Diabolik: And so nothing was learned. :<
[15:57:10] Diabolik: im pissed with myself
[15:57:16] Ox0dea: http://i.imgur.com/Ufbr5ej.gif
[15:57:37] Ox0dea: But you won!
[15:57:38] n008f4g_: has joined #ruby
[15:57:47] Diabolik: LEARNING IS WINNING
[15:57:55] Diabolik: my blood pressure won i think
[15:57:58] Ox0dea: Fuck that noise. The tests passed, right?
[15:58:06] Ox0dea: That means you won. Well done.
[15:58:31] Diabolik: well i guess i learnt how to translate from python
[15:58:35] Diabolik: which is something
[15:59:05] Diabolik: i did the next one without any help based on reading
[15:59:12] Diabolik: i had done previously
[15:59:43] Diabolik: this isn't how i pictured spending my birthday weekend but
[16:00:00] Ox0dea: /part #therapy
[16:00:04] ja: naww, happy birthday weekend, Diabolik!
[16:00:49] hxegon: has joined #ruby
[16:02:47] Diabolik: lol thanks Ox0dea
[16:04:23] duckpuppy: has joined #ruby
[16:08:47] jgt1: has joined #ruby
[16:09:08] StevenXL: has joined #ruby
[16:10:39] nfk|laptop: has joined #ruby
[16:11:52] jdm_: has joined #ruby
[16:12:42] govg: has joined #ruby
[16:13:49] Cohedrin: has joined #ruby
[16:14:18] jordanm: has joined #ruby
[16:16:10] bronson: has joined #ruby
[16:18:08] BrunoIpexy: has joined #ruby
[16:18:21] BrunoIpexy: im from brazil
[16:18:36] BrunoIpexy: i need help some question
[16:18:43] thejamespinto: has joined #ruby
[16:18:56] hxegon: BrunoIpexy: Hello! Just ask you question and anyone capable may chime in.
[16:19:05] BrunoIpexy: bom dia? brasileiro?
[16:19:24] StevenXL: that didn't work
[16:19:26] Ox0dea: Stay a while.
[16:19:33] shevy: don't get distracted BrunoIpexy :D
[16:20:07] StevenXL: haha - OK Ox0dea.
[16:20:12] sepp2k: has joined #ruby
[16:21:44] BrunoIpexy: The ruby rails have some gem of automatic form as the zendform the Zend?
[16:21:52] Ox0dea: ?rails BrunoIpexy
[16:21:52] ruboto: BrunoIpexy, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[16:22:18] Ox0dea: Diabolik: You got pretty close with `((n1 % 10) ** n2) % 10` and then settled for cribbing some massively over-engineered Python solution. :'
[16:22:50] Ox0dea: I have no mouth and I must scream.
[16:23:42] skade: has joined #ruby
[16:25:43] BTRE: has joined #ruby
[16:26:07] BrunoIpexy: tanu, i'm now registred
[16:26:13] BrunoIpexy: tank, i'm now registred
[16:26:44] BrunoIpexy: ruboto, taks
[16:26:48] aspire: has joined #ruby
[16:27:23] jhass: ?justabot
[16:27:24] ruboto: I'm just a bot. You don't need to address me.
[16:27:27] lkba: has joined #ruby
[16:27:41] hxegon: bots need love too
[16:27:44] Diabolik: Ox0dea what's the best ruby way of doing it?
[16:27:59] adaedra: by not switching to python.
[16:28:31] fantazo: has joined #ruby
[16:28:54] chouhoulis: has joined #ruby
[16:29:24] aryaching: has joined #ruby
[16:30:09] Diabolik: sure but there was no way i could do it with my previous solution without hitting infinity
[16:31:54] pdoherty: has joined #ruby
[16:32:32] shevy: bots need more tanks apparently
[16:33:40] `derpy: /_oo_oo_\--
[16:33:51] shevy: that must have been you adaedra
[16:34:41] adaedra: I don't ascii so well.
[16:34:50] yilmaz_alican: has joined #ruby
[16:35:03] nocd: has joined #ruby
[16:36:51] jdelaney: has joined #ruby
[16:38:55] Ox0dea: Diabolik: https://eval.in/484386
[16:39:24] Diabolik: why do the 4s come in?
[16:39:36] Ox0dea: Diabolik: Do you have jhass on ignore?
[16:39:44] StevenXL: has joined #ruby
[16:39:48] Diabolik: the SO link?
[16:40:42] Ox0dea: The length of the units digit cycle is always 1, 2, or 4.
[16:41:34] Ox0dea: You *could* bother with finding the length of the cycle for a given n, but that's silly and unnecessary for this problem.
[16:43:28] freerobby: has joined #ruby
[16:43:33] ibouvousaime: has joined #ruby
[16:46:19] sucks: has joined #ruby
[16:48:07] wsewolod: has joined #ruby
[16:48:08] YankNYC: has joined #ruby
[16:48:40] dlitvak: has joined #ruby
[16:49:24] Arnvald: has joined #ruby
[16:49:59] devoldmx: has joined #ruby
[16:50:32] agit0: has joined #ruby
[16:51:05] platzhirsch: has joined #ruby
[16:51:05] Hates_: has joined #ruby
[16:52:36] FCser: has joined #ruby
[16:54:01] Ox0dea: "tanu", "tank", "taks", and "tanks"; you'd figure he'd've gotten it at least once.
[16:56:31] apeiros: Ox0dea: h stands for hard
[16:58:40] shevy: h stands for hopping!
[16:58:40] zarubin: has joined #ruby
[16:59:34] WizJin: has joined #ruby
[17:01:05] jhass: h stands for correct
[17:01:33] hxegon: horrect sounds like an urban dictionary word
[17:02:30] dravine_: has joined #ruby
[17:04:39] rgrmatt_: has joined #ruby
[17:05:09] duckpuppy: has joined #ruby
[17:06:55] Tessier-Ashpool: has joined #ruby
[17:07:18] hxegon: ACTION looks up
[17:07:37] apeiros: shevy: hexaflexagon! (search that on youtube ;-D)
[17:07:48] hxegon: apeiros: I don't need to, vi hart is amazing
[17:07:58] apeiros: yupp, she totally is.
[17:08:09] Hates_: has left #ruby: ()
[17:09:13] ePascoal: has joined #ruby
[17:10:23] ePascoal: Hi guys, im learning ruby on rails... I made a mistake generating a model using rails g model ...
[17:10:31] apeiros: ?rails ePascoal
[17:10:32] ruboto: ePascoal, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[17:10:49] ePascoal: how can i re generate again?
[17:10:53] imperator: has joined #ruby
[17:10:57] imperator: good morning
[17:11:02] apeiros: moin imperator
[17:11:06] hxegon: morning imperator
[17:11:19] imperator: just looking at timeout stuff
[17:11:47] hxegon: ePascoal: look at apeiros's message
[17:11:57] jdm__: has joined #ruby
[17:12:01] ruboto: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[17:12:23] imperator: wondering what the best way is to timeout an arbitrary block of code without using the timeout module
[17:12:32] hxegon: ePascoal: no problem, happens all the time :D
[17:12:47] adaedra: hxegon: users tend not to see that it's a bot replying and don't really see the link between the ?message and the reply.
[17:12:55] thejamespinto: has joined #ruby
[17:13:52] apeiros: imperator: arbitrary: no silver bullets besides Timeout
[17:13:58] imperator: ACTION looked at safe_timeout
[17:14:00] apeiros: note that there's now better tools to deal with timeouts downsides
[17:14:38] hxegon: adaedra: noted
[17:19:37] f00bar-32: has joined #ruby
[17:23:30] kaka__: has joined #ruby
[17:23:42] Tahada_Puto: has joined #ruby
[17:23:43] agit0: has joined #ruby
[17:23:53] Tahada_Puto: Hello everyone!
[17:24:26] Tahada_Puto: how to make a bot for dice site?
[17:24:48] jhass: with programming!
[17:25:11] jhass: well, first thing to check is whether you're allowed to
[17:25:36] agit0: has joined #ruby
[17:25:56] Tahada_Puto: jhass: they provide api for bots
[17:26:02] Ishido: has joined #ruby
[17:26:10] dlitvak: has joined #ruby
[17:26:28] bean: jhass, then it sounds like it should be easy!
[17:26:30] bean: err Tahada_Puto
[17:26:57] jhass: step 2: check on rubygems.org if somebody already wrote you a wrapper around their API
[17:27:22] StevenXL: has joined #ruby
[17:27:47] Tahada_Puto: jhass: no result
[17:28:35] jhass: step 3: decide on an HTTP client: net/http or https://www.ruby-toolbox.com/categories/http_clients
[17:29:22] Tahada_Puto: jhass: which is the most widely use?
[17:29:43] chouhoulis: has joined #ruby
[17:29:46] jhass: popularity shouldn't be your primary measure
[17:29:51] A5101: has joined #ruby
[17:30:46] kalopsian: has joined #ruby
[17:31:22] Tahada_Puto: jhass: which is the natural and easy to use?
[17:31:33] jhass: that's rather subjective
[17:31:41] edwinvdgraaf: has joined #ruby
[17:32:19] govg: has joined #ruby
[17:32:21] Tahada_Puto: jhass: I'm beginner. I need to know -_-
[17:32:43] jhass: Look at the docs/readmes for a couple and make up your own mind
[17:33:27] nocd: has left #ruby: ()
[17:35:14] colegatron: has joined #ruby
[17:36:49] tvw: has joined #ruby
[17:39:39] Bellthoven: has joined #ruby
[17:39:47] freerobby: has joined #ruby
[17:39:52] skade: has joined #ruby
[17:41:02] TheBloke: has joined #ruby
[17:41:52] tomphp: has joined #ruby
[17:42:22] skade: has joined #ruby
[17:43:49] Phage: has left #ruby: ()
[17:43:58] Arnvald: has joined #ruby
[17:46:26] SCHAAP137: has joined #ruby
[17:47:14] kalopsian: has joined #ruby
[17:47:25] aryaching: has joined #ruby
[17:50:43] devoldmx: has joined #ruby
[17:52:43] rgrmatt: has joined #ruby
[17:53:46] jbrhbr: has joined #ruby
[17:54:34] kalopsian: has joined #ruby
[17:54:45] blackjid: has joined #ruby
[17:57:23] kaka__: has joined #ruby
[18:01:06] solocshaw: has joined #ruby
[18:02:56] rickmasta: has joined #ruby
[18:04:49] tAn: has joined #ruby
[18:04:55] InvGhostt: has joined #ruby
[18:05:56] duckpuppy: has joined #ruby
[18:07:04] thejamespinto: has joined #ruby
[18:07:06] LoganG_: has joined #ruby
[18:07:37] artmann: has joined #ruby
[18:07:43] julian-delphiki: has joined #ruby
[18:08:08] arian0n-: has joined #ruby
[18:08:13] _whitelogger_: has joined #ruby
[18:08:16] pawnbox_: has joined #ruby
[18:08:28] vinleod: has joined #ruby
[18:08:37] edwinvdg_: has joined #ruby
[18:09:00] deimos: has joined #ruby
[18:09:00] mroth_: has joined #ruby
[18:09:00] ohcibi: has joined #ruby
[18:09:04] devoldmx: has joined #ruby
[18:09:05] c355E3B_: has joined #ruby
[18:09:06] heftig: has joined #ruby
[18:09:07] Lloyd: has joined #ruby
[18:09:12] jxf: has joined #ruby
[18:09:12] MiracleBlue_: has joined #ruby
[18:09:13] moloch: has joined #ruby
[18:09:14] thesheff17_: has joined #ruby
[18:09:20] contradictioned: has joined #ruby
[18:09:22] tejasmanohar_: has joined #ruby
[18:09:22] yaewa: has joined #ruby
[18:09:35] iamdevnul__: has joined #ruby
[18:09:41] zemmihates_: has joined #ruby
[18:09:45] johnpank: has joined #ruby
[18:09:50] jbrhbr1: has joined #ruby
[18:10:05] kmckelvin: has joined #ruby
[18:10:05] zrl: has joined #ruby
[18:10:09] Eleeleth_: has joined #ruby
[18:10:12] Bloomer_: has joined #ruby
[18:10:29] ramblinpeck_: has joined #ruby
[18:10:33] cstrahan_: has joined #ruby
[18:11:14] PlasmaStar: has joined #ruby
[18:11:18] zeljkof_: has joined #ruby
[18:11:20] camilasan: has joined #ruby
[18:11:30] benlakey_: has joined #ruby
[18:11:31] DroidBur_: has joined #ruby
[18:11:50] sideshowcoder_: has joined #ruby
[18:12:03] jdm_: has joined #ruby
[18:12:08] Downtime: has joined #ruby
[18:12:34] Jackneill_: has joined #ruby
[18:12:36] chandlerbing: has joined #ruby
[18:12:37] pandaant_: has joined #ruby
[18:12:37] tessier-1shpool: has joined #ruby
[18:12:39] x0F_: has joined #ruby
[18:12:42] sumark_: has joined #ruby
[18:12:45] AdamMeghji_: has joined #ruby
[18:12:48] spidermario: has joined #ruby
[18:12:52] kadoppe_: has joined #ruby
[18:13:01] hackeron_: has joined #ruby
[18:13:58] kirun: has joined #ruby
[18:14:20] Guest85414______: has joined #ruby
[18:14:20] Mr_Pancake: has joined #ruby
[18:14:24] atomical: has joined #ruby
[18:14:50] BLuEGoD: has joined #ruby
[18:15:02] machty_: has joined #ruby
[18:15:51] M-Kodo: has joined #ruby
[18:16:52] gix: has joined #ruby
[18:17:20] braincrash: has joined #ruby
[18:17:31] juddey: has joined #ruby
[18:17:46] shock_one: has joined #ruby
[18:18:26] tomaw_: has joined #ruby
[18:18:29] bronson: has joined #ruby
[18:20:05] colegatron: has joined #ruby
[18:20:20] kirun_: has joined #ruby
[18:20:26] marienz_: has joined #ruby
[18:20:34] tlaxkit: has joined #ruby
[18:20:35] kobain: has joined #ruby
[18:20:37] kobain: has joined #ruby
[18:20:38] bestie: has joined #ruby
[18:21:07] firstdayonthejob: has joined #ruby
[18:21:38] danneu: has joined #ruby
[18:21:50] blackjid: has joined #ruby
[18:22:19] Superman_: has joined #ruby
[18:22:27] adambeynon: has joined #ruby
[18:22:31] adambeynon: has joined #ruby
[18:24:31] Fridtjof: has joined #ruby
[18:25:12] boxofrox: has joined #ruby
[18:26:40] darkxploit: has joined #ruby
[18:26:45] djbkd: has joined #ruby
[18:26:52] n008f4g_: has joined #ruby
[18:27:34] sdothum: has joined #ruby
[18:27:52] kobain: has joined #ruby
[18:27:52] tlaxkit: has joined #ruby
[18:28:04] WizJin: has joined #ruby
[18:28:13] bmalum: has joined #ruby
[18:29:50] Blaguvest: has joined #ruby
[18:30:10] StevenXL: Ox0dea: I gotta move from this cafe. Getting dirty looks.
[18:30:17] StevenXL: Just letting you know so you won't get worried.
[18:30:27] chouhoulis: has joined #ruby
[18:30:34] Ox0dea: stevenxl: Alas. Well, thanks for hangin' out.
[18:32:34] govg: has joined #ruby
[18:33:13] rgrmatt: has joined #ruby
[18:35:20] bauruine: has joined #ruby
[18:36:17] yardenbar: has joined #ruby
[18:37:23] tomphp: has joined #ruby
[18:38:28] aptrcki: has joined #ruby
[18:38:34] epitron: has joined #ruby
[18:38:54] dellavg: has joined #ruby
[18:39:52] chouhoulis: has joined #ruby
[18:40:10] aptrcki: anyone mind me picking there brain for a minute?
[18:41:24] baweaver: has joined #ruby
[18:42:25] ruboto: Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
[18:42:27] kiez0rd: has joined #ruby
[18:42:59] zerowaitstate: has joined #ruby
[18:44:42] aptrcki: gotcha. so I'd like to know if it's possible to make an object that can hold a block that can be executed on demand, similar to the call method
[18:45:25] crayfishx: has joined #ruby
[18:46:25] StevenXL: has joined #ruby
[18:47:31] wsewolod: has joined #ruby
[18:48:27] ruid: has joined #ruby
[18:48:28] ruid: has joined #ruby
[18:49:07] krobzaur: has joined #ruby
[18:49:47] pawnbox: has joined #ruby
[18:50:46] lxsameer: has joined #ruby
[18:50:47] lxsameer: has joined #ruby
[18:51:20] Ox0dea: aptrcki: Maybe you just want a Proc?
[18:51:46] Ox0dea: >> p = proc { 1 }; [p.call, p.call, p.call]
[18:51:47] ruboto: Ox0dea # => [1, 1, 1] (https://eval.in/484483)
[18:52:40] havenwood: >> stabby = ->{ 1 }; [stabby.call, stabby.call, stabby.call]
[18:52:41] ruboto: havenwood # => [1, 1, 1] (https://eval.in/484484)
[18:52:54] aptrcki: I considered that, but doesn't a proc end the process as soon as the block is finished executing?
[18:53:21] Ox0dea: A Proc is essentially just a block in value form.
[18:53:55] last_staff: has joined #ruby
[18:54:13] havenwood: aptrcki: Try it in IRB or Pry.
[18:54:30] Ox0dea: aptrcki: You might be conflating processes and termination with methods and return semantics?
[18:54:32] aptrcki: Will do, thanks haven and Ox0dea :)
[18:54:56] aptrcki: Probably, because I was told the proc doesn't return control
[18:55:20] Ox0dea: `return` in a Proc does return control, but to the caller, not the OS.
[18:55:50] Ox0dea: That's usually not what you want, and why `lambda` has different semantics on that count.
[18:56:36] aptrcki: Hah. That sounds like its exactly what Im looking for
[18:56:55] gremax: has joined #ruby
[18:57:19] shevy: anyone playing around with frozen strings yet?
[18:57:44] adaedra: Frozen strings have existed for some time now.
[18:58:13] Ox0dea: >> {'a' => 1}.keys[0].frozen?
[18:58:14] ruboto: Ox0dea # => true (https://eval.in/484486)
[18:58:17] kalopsian: has joined #ruby
[18:58:28] JuckFews: has joined #ruby
[18:58:40] FooMunki: has joined #ruby
[18:58:40] Ox0dea: Meant to prefix that with "19".
[18:59:15] JuckFews: what is "19"?
[18:59:35] adaedra: !ban JuckFews !P Unacceptable nick
[18:59:39] ChanServ: +b JuckFews!*@*
[18:59:39] ChanServ: ChanServ kicked JuckFews: Unacceptable nick
[18:59:51] tildes: has joined #ruby
[19:01:01] thejamespinto: has joined #ruby
[19:02:06] codecop: has joined #ruby
[19:05:06] stannard: has joined #ruby
[19:05:24] tomphp: has joined #ruby
[19:06:27] kalopsian: has joined #ruby
[19:06:41] duckpuppy: has joined #ruby
[19:06:56] thejamespinto: has joined #ruby
[19:09:38] woiers: has joined #ruby
[19:10:25] woiers: has left #ruby: ()
[19:12:25] jdm: has joined #ruby
[19:12:33] SCHAAP137: has joined #ruby
[19:12:54] yardenbar: has joined #ruby
[19:13:04] aptrcki: has left #ruby: ()
[19:16:00] jessemcgilallen: has joined #ruby
[19:16:45] chouhoulis: has joined #ruby
[19:23:54] minimalism: has joined #ruby
[19:24:03] dfinninger: has joined #ruby
[19:24:04] cjk101010: has joined #ruby
[19:24:08] soahccc: has joined #ruby
[19:24:24] drPoggs: has joined #ruby
[19:24:30] Trieste: has joined #ruby
[19:24:41] julian-delphiki: has joined #ruby
[19:25:16] Hobbyboy: has joined #ruby
[19:25:35] SuperTux88: has joined #ruby
[19:27:31] symm-: has joined #ruby
[19:28:13] Shy: has joined #ruby
[19:32:08] blub: hi shevy
[19:32:31] blub: hi ox0dea
[19:32:54] zapata: has joined #ruby
[19:35:56] existensil: has joined #ruby
[19:35:59] tomaw: has joined #ruby
[19:35:59] spt0: has joined #ruby
[19:35:59] riceandbeans: has joined #ruby
[19:35:59] jtperreault: has joined #ruby
[19:35:59] DexterLB: has joined #ruby
[19:35:59] sjohnsen: has joined #ruby
[19:35:59] skakri: has joined #ruby
[19:35:59] torpig: has joined #ruby
[19:35:59] flughafen: has joined #ruby
[19:35:59] Insti: has joined #ruby
[19:35:59] agentmeerkat: has joined #ruby
[19:35:59] DEac-: has joined #ruby
[19:35:59] sparr: has joined #ruby
[19:35:59] gf3: has joined #ruby
[19:35:59] monoprotic: has joined #ruby
[19:35:59] kalleth: has joined #ruby
[19:35:59] bier: has joined #ruby
[19:35:59] funnel: has joined #ruby
[19:35:59] Sp4rKy: has joined #ruby
[19:36:00] rcs_: has joined #ruby
[19:36:00] mhenrixon_: has joined #ruby
[19:36:00] heinrich5991: has joined #ruby
[19:36:00] justinmcp_: has joined #ruby
[19:36:00] digneety: has joined #ruby
[19:36:00] AustinMatherne: has joined #ruby
[19:36:00] vandemar: has joined #ruby
[19:36:00] nlsun: has joined #ruby
[19:36:00] kloeri: has joined #ruby
[19:36:00] xxneolithicxx: has joined #ruby
[19:36:00] SirCmpwn: has joined #ruby
[19:36:00] Muz: has joined #ruby
[19:36:00] absolutejam: has joined #ruby
[19:36:00] ereslibre: has joined #ruby
[19:36:00] moua: has joined #ruby
[19:36:00] MissionCritical: has joined #ruby
[19:36:00] freeze: has joined #ruby
[19:36:00] Keltia: has joined #ruby
[19:36:00] ltp: has joined #ruby
[19:36:00] elliottcable: has joined #ruby
[19:36:00] philtr: has joined #ruby
[19:36:00] Bish: has joined #ruby
[19:36:00] matti: has joined #ruby
[19:36:00] chris2: has joined #ruby
[19:36:00] Freeaqingme: has joined #ruby
[19:36:00] ruboto: has joined #ruby
[19:36:00] segy: has joined #ruby
[19:36:01] thomas: has joined #ruby
[19:36:01] BaNzounet: has joined #ruby
[19:36:01] moredhel: has joined #ruby
[19:36:01] nitrix: has joined #ruby
[19:36:01] ex0ns: has joined #ruby
[19:36:01] z4ph0d: has joined #ruby
[19:36:01] DylanJ: has joined #ruby
[19:36:01] slash_nick: has joined #ruby
[19:36:01] sung: has joined #ruby
[19:36:01] peterhu: has joined #ruby
[19:36:01] iDavid: has joined #ruby
[19:36:01] exceion_: has joined #ruby
[19:36:01] low-profile: has joined #ruby
[19:36:01] jidar: has joined #ruby
[19:36:01] ccooke: has joined #ruby
[19:36:01] OmegaA_: has joined #ruby
[19:36:01] kiki_lamb: has joined #ruby
[19:36:01] M-Technic: has joined #ruby
[19:36:01] mduca_: has joined #ruby
[19:36:01] sunya7a_: has joined #ruby
[19:36:01] Gnubie_: has joined #ruby
[19:36:01] fold3: has joined #ruby
[19:36:01] izzol: has joined #ruby
[19:36:01] ericwood_: has joined #ruby
[19:36:01] Antiarc: has joined #ruby
[19:36:01] wlanboy_: has joined #ruby
[19:36:01] Ssssss: has joined #ruby
[19:36:02] rfi_: has joined #ruby
[19:36:02] tokik: has joined #ruby
[19:36:02] Eising: has joined #ruby
[19:36:02] janelleb: has joined #ruby
[19:36:02] DefV_: has joined #ruby
[19:36:02] uxp: has joined #ruby
[19:36:02] \13k_: has joined #ruby
[19:36:02] veloutin: has joined #ruby
[19:36:02] dualbus: has joined #ruby
[19:36:02] ekem: has joined #ruby
[19:36:02] Radar: has joined #ruby
[19:36:02] Utkarsh_: has joined #ruby
[19:36:02] bhaak: has joined #ruby
[19:36:02] sts23: has joined #ruby
[19:36:02] beagles: has joined #ruby
[19:36:02] KramerC: has joined #ruby
[19:36:02] xybre: has joined #ruby
[19:36:02] genpaku: has joined #ruby
[19:36:02] groundnuty: has joined #ruby
[19:36:02] ja: has joined #ruby
[19:36:02] lnx: has joined #ruby
[19:36:02] noodle: has joined #ruby
[19:36:02] lianj: has joined #ruby
[19:36:02] saltsa: has joined #ruby
[19:36:02] rdema: has joined #ruby
[19:36:02] queequeg1: has joined #ruby
[19:36:02] j2k: has joined #ruby
[19:36:02] yasu: has joined #ruby
[19:36:03] rubber: has joined #ruby
[19:36:03] Helheim: has joined #ruby
[19:36:03] braidn: has joined #ruby
[19:36:03] connor_goodwolf: has joined #ruby
[19:36:03] rclements: has joined #ruby
[19:36:03] sarlalian: has joined #ruby
[19:36:03] jokester: has joined #ruby
[19:36:03] Scroff: has joined #ruby
[19:36:03] BraddPitt: has joined #ruby
[19:36:03] oddalot: has joined #ruby
[19:36:03] danoo_: has joined #ruby
[19:36:03] majjoha_: has joined #ruby
[19:36:03] kramsee: has joined #ruby
[19:36:03] xnr: has joined #ruby
[19:36:03] PaulePanter: has joined #ruby
[19:36:03] gilesww: has joined #ruby
[19:36:03] bytecrawler: has joined #ruby
[19:36:03] bascht: has joined #ruby
[19:36:03] kent\n: has joined #ruby
[19:36:03] alol: has joined #ruby
[19:36:03] yeltzooo: has joined #ruby
[19:36:03] xsdg: has joined #ruby
[19:36:03] mosez: has joined #ruby
[19:36:03] gamache: has joined #ruby
[19:36:03] jericon: has joined #ruby
[19:36:03] pl1ght: has joined #ruby
[19:36:04] certainty: has joined #ruby
[19:36:04] conrfrmn: has joined #ruby
[19:36:04] suffice: has joined #ruby
[19:36:04] rmrrn: has joined #ruby
[19:36:04] sugardrunk: has joined #ruby
[19:36:04] coffeejunk: has joined #ruby
[19:36:04] TTilus: has joined #ruby
[19:36:04] Guest50975: has joined #ruby
[19:36:04] ZYPP: has joined #ruby
[19:36:04] stephenh: has joined #ruby
[19:36:04] ironcamel: has joined #ruby
[19:36:04] rethi: has joined #ruby
[19:36:04] Vile`: has joined #ruby
[19:36:04] flori: has joined #ruby
[19:36:04] VladGh: has joined #ruby
[19:36:04] Ray`: has joined #ruby
[19:36:04] Drakevr: has joined #ruby
[19:36:04] ozzloy: has joined #ruby
[19:36:04] euoia: has joined #ruby
[19:36:04] boshhead: has joined #ruby
[19:36:04] hightower4: has joined #ruby
[19:36:04] Skelz0r: has joined #ruby
[19:36:04] [ace]: has joined #ruby
[19:36:04] Koshian: has joined #ruby
[19:36:04] fluchtreflex: has joined #ruby
[19:36:04] tildes: has joined #ruby
[19:36:30] doodleha_: has joined #ruby
[19:37:21] symbol: has joined #ruby
[19:37:22] aclearman037: has joined #ruby
[19:37:23] moeabdol: has joined #ruby
[19:37:23] Helheim: has joined #ruby
[19:37:25] phrozen77: has joined #ruby
[19:37:25] tokik: has joined #ruby
[19:37:25] DeXterbed: has joined #ruby
[19:37:26] genpaku: has joined #ruby
[19:37:28] yasu: has joined #ruby
[19:38:00] ruboto_: has joined #ruby
[19:38:12] solocshaw: has joined #ruby
[19:38:19] Vile`: has joined #ruby
[19:38:52] joaomdmoura__: has joined #ruby
[19:39:23] heinrich5991: has joined #ruby
[19:39:38] gigetoo: has joined #ruby
[19:39:52] sami: has joined #ruby
[19:39:58] cyb3rspy: has joined #ruby
[19:39:59] ajb: has joined #ruby
[19:40:14] Xentil: has joined #ruby
[19:40:32] RTG`: has joined #ruby
[19:40:35] ebertx: has joined #ruby
[19:41:22] wjimenez5271: has joined #ruby
[19:42:39] weemsledeux: has joined #ruby
[19:43:24] gbailey: has joined #ruby
[19:44:23] hxegon: adaedra: you should have banned him for the question
[19:45:36] sjohnsen: has joined #ruby
[19:46:21] wsewolod: has joined #ruby
[19:47:08] DavidDudson: has joined #ruby
[19:47:32] MissionCritical: has joined #ruby
[19:49:14] ap4y: has joined #ruby
[19:50:39] atomical: has joined #ruby
[19:51:41] iamvery: has joined #ruby
[19:52:06] sucks: has joined #ruby
[19:52:47] nateberkopec: has joined #ruby
[19:54:36] devbug: has joined #ruby
[19:55:10] drptbl: has joined #ruby
[19:58:12] TheBloke: has joined #ruby
[19:58:30] jhass: poll: Do you think the acme-client gem violates namespace conventions by also using the Acme namespace for other constants besides Acme::Client, for example Acme::Certificate?
[19:59:02] tomdp: has left #ruby: ("Leaving")
[19:59:47] tomdp: has joined #ruby
[20:00:48] pontiki: i think so
[20:00:48] underplank: has joined #ruby
[20:00:54] ornerymoose: has joined #ruby
[20:03:10] pontiki: are there any other gems staking a claim in the Acme namespace?
[20:04:19] howdoico1: has joined #ruby
[20:04:35] jhass: not yet, at least nothing serious (and iirc the other acme* gems use ACME), but I can easily picture that will change given ACME is the protocol used by Let's encrypt
[20:05:36] jhass: ah well, https://github.com/smathy/acme is lowercase too
[20:06:07] heyimwill: has joined #ruby
[20:06:34] pontiki: seems like they're poaching the space
[20:07:12] Ishido: has joined #ruby
[20:07:25] duckpuppy: has joined #ruby
[20:08:02] yardenbar: has joined #ruby
[20:11:34] Jardayn: has joined #ruby
[20:11:58] trwyth: has joined #ruby
[20:12:39] jdm_: has joined #ruby
[20:14:00] ohaibbq: has joined #ruby
[20:15:25] Scripore: has joined #ruby
[20:15:33] djbkd: has joined #ruby
[20:16:37] krasnus: has joined #ruby
[20:16:54] FussyPuck: has joined #ruby
[20:16:54] ChanServ: +b *!*@gateway/web/freenode/ip.50.31.252.86
[20:16:54] ChanServ: ChanServ kicked FussyPuck: Unacceptable nick
[20:20:25] shevy: ruby simply needs more sophisticated ways to handle projects that use the same namespace
[20:21:00] reaVer: has joined #ruby
[20:21:11] bronson: has joined #ruby
[20:21:22] ruid: has joined #ruby
[20:21:45] Bugboy1028: has joined #ruby
[20:26:55] pontiki: jhass: still looking at the acme-client, this is egregious poaching: https://github.com/unixcharles/acme-client/blob/master/lib/acme/error.rb
[20:27:33] jhass: yeah, I'm going to open an issue to discuss it I think
[20:27:53] chouhoulis: has joined #ruby
[20:29:19] StevenXL: has joined #ruby
[20:29:55] leedleLoo: has joined #ruby
[20:30:59] StevenXL: has left #ruby: ()
[20:31:09] leedleLoo: I'm trying to write a ruby extension, but can't find the official documentation for the ruby C api. Does anyone know where it is?
[20:31:35] jhass: is there anything beyond README.ext by now?
[20:31:36] zarubin: has joined #ruby
[20:32:43] jhass: https://github.com/ruby/ruby/blob/trunk/doc/extension.rdoc
[20:33:19] leedleLoo: Wonderful, thank you
[20:33:40] rgrmatt: has joined #ruby
[20:36:48] tomphp: has joined #ruby
[20:38:49] kalopsian: has joined #ruby
[20:40:06] DexterLB: has joined #ruby
[20:40:13] leedleLoo: has left #ruby: ()
[20:40:35] apeiros: !fact add extensions for native extensions, read https://github.com/ruby/ruby/blob/trunk/doc/extension.rdoc and http://ruby-doc.com/docs/ProgrammingRuby/html/ext_ruby.html (the latter is slightly out of date, but much still applies)
[20:40:37] ruboto_: apeiros, I will remember that extensions is for native extensions, read https://github.com/ruby/ruby/blob/trunk/doc/extension.rdoc and http://ruby-doc.com/docs/ProgrammingRuby/html/ext_ruby.html (the latter is slightly out of date, but much still applies)
[20:40:42] nfk|laptop: has joined #ruby
[20:41:31] shevy: one day ruboto_ will have all our knowledge
[20:41:52] dh64: has joined #ruby
[20:42:11] apeiros: that's when he'll start taking over the world
[20:42:42] Ishido: has joined #ruby
[20:42:53] apeiros: related: http://www.smbc-comics.com/?id=2928
[20:43:58] jessemcgilallen: has joined #ruby
[20:45:36] akem: has joined #ruby
[20:46:43] Azure: has joined #ruby
[20:47:06] Scripore: has joined #ruby
[20:47:31] DoYouKnow: has joined #ruby
[20:47:31] DoYouKnow: has joined #ruby
[20:47:42] shevy: skynet - led by ruboto_ swarm
[20:48:49] atumzin: has joined #ruby
[20:48:49] atumzin: has joined #ruby
[20:49:05] shock_one: has joined #ruby
[20:50:34] otherj: has joined #ruby
[20:54:05] f00bar-32: has joined #ruby
[20:54:53] framling: has joined #ruby
[20:58:19] atumzin: has joined #ruby
[20:58:20] atumzin: has joined #ruby
[20:59:57] hxegon: has joined #ruby
[21:00:42] adaedra: ruboto_: you're all dressed up with this underscore (cc apeiros)
[21:02:38] ruid: has joined #ruby
[21:02:38] ruid: has joined #ruby
[21:02:42] rgrmatt: has joined #ruby
[21:04:29] atomical: has joined #ruby
[21:04:33] Coraline: has joined #ruby
[21:06:41] rgrmatt: has joined #ruby
[21:07:23] vF3hNGxc47h8: has joined #ruby
[21:08:10] duckpuppy: has joined #ruby
[21:09:55] Sirecote: has joined #ruby
[21:09:59] alexblom: has joined #ruby
[21:10:02] maxmanders: has joined #ruby
[21:10:04] blowmage: has joined #ruby
[21:11:46] jgt1: has joined #ruby
[21:17:07] clamstar: has joined #ruby
[21:18:35] atomical: has joined #ruby
[21:19:27] blowmage: has joined #ruby
[21:19:57] rgrmatt: has joined #ruby
[21:20:21] Arnvald: has joined #ruby
[21:20:34] DeXterbed: has joined #ruby
[21:21:30] zarubin: has joined #ruby
[21:22:30] wsewolod: has joined #ruby
[21:24:39] bbert: has joined #ruby
[21:24:48] rgrmatt: has joined #ruby
[21:25:44] zacts: are there any good Ruby music synth gems?
[21:25:45] dfinninger: has joined #ruby
[21:25:53] zacts: for live musical programming
[21:26:04] dopie: has joined #ruby
[21:26:44] adaedra: Running gems installed for 2.2 with ruby 2.0? Great idea you have here, RubyMine.
[21:26:46] rgrmatt: has joined #ruby
[21:27:30] bbert: Hi. C++ programmer here trying to get comfortable in Ruby. About programming with OO paradigms in Ruby, I keep seeing in the docs things like globally scoped variables. For example, the mutex defined on this page's example: http://ruby-doc.org/core-2.2.0/Mutex.html . Is this for brevity, or is it more idiomatic to actually do it this way in Ruby?
[21:27:48] BTRRY: has joined #ruby
[21:27:57] adaedra: For sample.
[21:28:37] adaedra: But note that you'll have to do some things at the top level, as there is no main function ??? the code at top-level is the one that runs at startup.
[21:29:39] devbug_: has joined #ruby
[21:30:52] blowmage: has joined #ruby
[21:32:51] atomical: has joined #ruby
[21:32:54] JDiPierro: has joined #ruby
[21:33:12] devbug: has joined #ruby
[21:34:24] jhass: bbert: it's mainly brevity, yes
[21:34:32] rgrmatt: has joined #ruby
[21:35:59] weemsledeux: has joined #ruby
[21:38:27] chouhoulis: has joined #ruby
[21:39:25] al2o3-cr: has joined #ruby
[21:40:29] stannard: has joined #ruby
[21:42:03] JDiPierro: has joined #ruby
[21:43:36] workmad3: has joined #ruby
[21:46:26] JDiPierro: has joined #ruby
[21:47:14] jud: has joined #ruby
[21:47:14] jud: has joined #ruby
[21:47:25] adaedra: mh, test failing because of rspec mocking getting in the way.
[21:47:48] bbert: jhass and adaedra: thanks. I thought as much. I suppose that it does make it more accessible at a glance, but I started to worry about the quality (from an OO perspective) of the code I'd run into.
[21:47:53] rgrmatt: has joined #ruby
[21:48:20] tomphp: has joined #ruby
[21:48:27] adaedra: bbert: usually, for short and quick code, you'll stay in the global scope. For larger project, you'll try to stuff things in classes/modules, and keep little in the top-level.
[21:48:58] rgrmatt: has joined #ruby
[21:51:08] roshanavand: has joined #ruby
[21:51:19] bbert: adaedra: that's similar to breaking components out into their own header and object files in C++. Keeps things logically separated and makes it easier to program to an interface/abstraction.
[21:51:34] adaedra: that's different.
[21:51:50] devbug_: has joined #ruby
[21:52:02] yfeldblum: has joined #ruby
[21:52:30] adaedra: in C++, you'll keep declaration and implementation separate (the header and source). In Ruby, you cannot, as you cannot just declare something.
[21:55:52] ChameleonSix: has joined #ruby
[21:55:52] bbert: adaedra: no, I get that. I'm just saying that by logically separating things, for instance in a module (that may live in another file), you steer yourself in the direction of interacting with that code through some designed manner, not simply changing it to suit your current needs
[21:56:01] ChameleonSix: Can anyone help me
[21:56:07] adaedra: ?ask ChameleonSix
[21:56:07] ruboto_: ChameleonSix, Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
[21:56:20] ChameleonSix: i got a bet with a friend
[21:56:36] ChameleonSix: i need to bypass admin.php login somehow
[21:56:45] ChameleonSix: https://www.exploit-db.com/exploits/2588/
[21:56:52] adaedra: You're trying to hack websites?
[21:56:54] ChameleonSix: the problem is no one wants to help me
[21:57:04] TTilus: surprise!
[21:57:04] havenwood: ChameleonSix: PHP? Wrong channel.
[21:57:05] ChameleonSix: this is for educational purpose only
[21:57:08] ChameleonSix: i got permission to do it
[21:57:12] ChameleonSix: people on php are jerks
[21:57:21] TTilus: ChameleonSix: that's what they always say...
[21:57:22] adaedra: And we won't help you on PHP.
[21:57:31] adaedra: On hacking either, mind.
[21:57:48] TTilus: hacking, yes, cracking into systems, no
[21:58:17] ChameleonSix: this isnt illegal
[21:58:20] havenwood: !kick ChameleonSix Ruby is the topic here.
[21:58:22] ruboto_: ruboto_ kicked ChameleonSix: is the topic here.
[21:58:22] ruboto_: -o ruboto_
[21:58:25] TTilus: ChameleonSix: there's a reaso why this is a _ruby_ channel (implies not a php channe)
[21:58:39] houhoulis: has joined #ruby
[21:58:48] marienz: has joined #ruby
[21:58:54] bbert: thank you ruboto_
[21:59:18] TTilus: ...and havenwood for pulling the strings
[21:59:23] davedev24: has joined #ruby
[21:59:24] adaedra: ?justabot bbert
[21:59:24] ruboto_: bbert, I'm just a bot. You don't need to address me.
[21:59:40] bbert: thank you anyway
[22:00:29] rodfersou: has joined #ruby
[22:01:23] adaedra: TTilus: it looks like your keyboard ate some of your keystrokes.
[22:02:34] htmldrum: has joined #ruby
[22:02:35] waka: has joined #ruby
[22:03:00] TTilus: adaedra: only one, that s/channe)/channel)/
[22:03:11] adaedra: TTilus: and reaso(n).
[22:03:25] TTilus: adaedra: ah
[22:03:36] ChameleonSix: has joined #ruby
[22:03:43] ChameleonSix: ruby is the topic
[22:03:49] ChameleonSix: we can talk about metasploit
[22:03:52] ChameleonSix: written in ruby/
[22:03:59] adaedra: No, they have their own channel.
[22:04:24] jhass: ?metasploit ChameleonSix
[22:04:25] ruboto_: ChameleonSix, Please join #metasploit for help with it.
[22:04:25] havenwood: ChameleonSix: /join #metasploit
[22:04:46] InvGhostt: has joined #ruby
[22:04:50] ChameleonSix: Im banned and i didnt even join
[22:05:22] jhass: it probably bans unregistered users
[22:05:27] roshanavand: has joined #ruby
[22:05:31] jhass: /msg NickServ help
[22:05:40] Shidash: has joined #ruby
[22:05:54] jhass: you're not identified
[22:06:02] jhass: oh you are
[22:06:21] ChameleonSix: what is the problem
[22:06:34] jhass: ChameleonSix!*@* banned by wvu (~wvu@metasploit/wvu) on Fri, 11 Dec 2015 18:48:53
[22:06:55] jhass: stop telling bullshit
[22:08:55] duckpuppy: has joined #ruby
[22:08:59] TTilus: ChameleonSix: you need to sort out your stuff with #metasploit ops
[22:08:59] ChameleonSix: has left #ruby: ()
[22:09:22] TTilus: we can't help you with that
[22:10:22] SCHAAP137: has joined #ruby
[22:12:42] davedev24: has joined #ruby
[22:14:58] Arnvald: has joined #ruby
[22:16:42] rgrmatt: has joined #ruby
[22:17:18] bklane: has joined #ruby
[22:19:44] Rodya_: has joined #ruby
[22:21:47] yqt: has joined #ruby
[22:22:26] BTRE: has joined #ruby
[22:22:56] ChameleonSix: has joined #ruby
[22:23:09] ChameleonSix: im very confused
[22:23:16] ChameleonSix: you offer ruby help?
[22:24:00] jhass: Yes we answer your questions with the Ruby programming language's syntax and standard library
[22:24:16] Asher: has joined #ruby
[22:24:23] zeroDivisible: has joined #ruby
[22:24:27] Ikri: has joined #ruby
[22:25:03] ChameleonSix: how do i use I/O in ruby
[22:25:12] ChameleonSix: and i cant make .exe from .rb
[22:25:27] adaedra: This was already discussed with you.
[22:25:39] jhass: I should clarify, we answer your questions after you've shown you've done basic research on them on your own
[22:25:48] bronson: has joined #ruby
[22:26:06] ChameleonSix: but how do you know
[22:26:11] jhass: that's is we provide clarifications upon other material you're using
[22:26:18] ChameleonSix: anyway seriously I/O i cant understand
[22:26:25] jhass: read a tutorial
[22:26:35] ChameleonSix: can you link me a good example
[22:27:12] dfinninger: has joined #ruby
[22:27:15] jhass: I don't have any at hand
[22:27:27] ChameleonSix: I got a few more questions
[22:27:34] ChameleonSix: How do i use ruby with html9
[22:27:57] jhass: Please ask less general and basic questions
[22:28:00] ChameleonSix: for example i want to make an online calculator in ruby
[22:28:12] jhass: what did you try so far?
[22:28:13] myztic: has left #ruby: ()
[22:28:35] ChameleonSix: i used <script> for javascript
[22:28:53] ChameleonSix: hmm ruby on rails?
[22:28:53] dlitvak: has joined #ruby
[22:29:00] User458764: has joined #ruby
[22:29:07] jhass: doesn't sound like you tried to use Ruby for this yet or made any research on the topic
[22:29:10] Ilyes512: has joined #ruby
[22:29:20] shevy: jhass are you still using sublime as your main editor?
[22:29:37] shock_one: has joined #ruby
[22:29:44] solocshaw: has joined #ruby
[22:30:14] ChameleonSix: i made a tons of programs
[22:30:19] purplexed-: has joined #ruby
[22:30:19] purplexed-: has joined #ruby
[22:30:24] ChameleonSix: but idk how to use them or put them into my html
[22:31:42] ChameleonSix: you said you can help me with ruby
[22:31:47] Dimik: has joined #ruby
[22:31:52] shevy: ChameleonSix you need a hug
[22:32:06] adaedra: With precise questions, once you shown you did your research already, yes.
[22:32:09] tenderlove: has joined #ruby
[22:32:14] wildlander: has joined #ruby
[22:32:25] adaedra: I suggest you use this little website, it's all new and all good: http://www.google.com
[22:32:37] ChameleonSix: google is shit
[22:33:37] adaedra: Though, well used, it yields amazing results.
[22:33:42] platzhirsch: has joined #ruby
[22:34:18] ChameleonSix: i still dont know how to use ruby with html
[22:34:30] jhass: show your attempt
[22:34:32] ruboto_: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[22:35:02] ChameleonSix: ruboto you are smart
[22:35:09] bklane: has joined #ruby
[22:35:53] shevy: now you made it ChameleonSix .... jhass does not believe that you have tried anything at all so far :(
[22:36:21] adaedra: shevy: funny, you're usually the first one to call fake.
[22:36:57] ChameleonSix: you want me to make a program in ruby
[22:36:58] shevy: adaedra I am sure ChameleonSix will soon show some code
[22:37:11] ChameleonSix: ah that is the problem
[22:37:12] shevy: after all he said he tried it
[22:37:21] ChameleonSix: what code do you want
[22:37:30] shevy: I want ALL THE CODE
[22:37:39] jhass: ChameleonSix: the one you want to ask a question about
[22:38:19] ChameleonSix: can i type it here
[22:38:30] Liam`: has joined #ruby
[22:38:59] shevy: ChameleonSix http://cdn.memegenerator.net/instances/400x/33145530.jpg
[22:40:44] ChameleonSix: gist:ded60ddf941f16ddcc23
[22:40:55] ChameleonSix: i am on a phone
[22:41:00] jhass: please post the link in your address bar
[22:41:00] ChameleonSix: and i need to code
[22:41:19] ChameleonSix: https://gist.github.com/anonymous/ded60ddf941f16ddcc23
[22:41:30] jhass: ChameleonSix: last warning, the next single line lol gets you kicked, the one after that muted for an hour
[22:42:00] ChameleonSix: i didnt see any warnings
[22:42:01] adaedra: And what is the problem with this code?
[22:42:03] jhass: ChameleonSix: and what's your question now?
[22:42:09] ChameleonSix: there is no problem
[22:42:14] ChameleonSix: i want to use it with html
[22:42:28] adaedra: ChameleonSix: you've been kicked from this place before for "lol" already.
[22:42:38] ChameleonSix: sorry for that
[22:42:42] shevy: you wrote a loop there
[22:42:43] ChameleonSix: i got a habbit
[22:42:45] jhass: ChameleonSix: also please write entire sentences on a single line, don't use enter three times in a row
[22:43:01] jhass: because it's annoying
[22:43:13] hxegon: ChameleonSix: it floods the page and makes the irc history hard to read
[22:43:31] havenwood: ChameleonSix: Try: https://github.com/migrs/rack-server-pages
[22:43:34] havenwood: ChameleonSix: Or: https://jekyllrb.com
[22:43:48] rickmasta: has joined #ruby
[22:44:21] ChameleonSix: you dont understand me
[22:44:30] ChameleonSix: i want to make a website that uses that ruby code
[22:44:37] ChameleonSix: how do i link them together
[22:44:44] shevy: ChameleonSix you can use .cgi
[22:44:59] Cohedrin: has joined #ruby
[22:45:04] ChameleonSix: like script source?
[22:45:04] Ebok: has joined #ruby
[22:45:16] shevy: what is script source
[22:45:19] havenwood: ChameleonSix: Look at my first link. Read!
[22:45:25] jhass: ChameleonSix: I don't believe you that you fully evaluated havenwood's suggestion in less than a minute, especially given that you're on a phone
[22:45:34] julian-delphiki: I think he means he wants to use ruby like you can use javascript.
[22:45:38] jhass: ChameleonSix: please stop wasting our time
[22:45:58] jhass: julian-delphiki: I think they don't know what they want because they didn't do any research yet
[22:46:09] shevy: julian-delphiki huh how weird
[22:46:34] shevy: but if he wants to do away with javascript in favour of ruby, I am all for it!
[22:46:47] ChameleonSix: it is easier with js
[22:47:00] shevy: the-browser-as-programming-environment
[22:47:17] bklane: has joined #ruby
[22:47:57] steffkes: has joined #ruby
[22:47:57] steffkes: has joined #ruby
[22:48:11] dlitvak: has joined #ruby
[22:48:13] ChameleonSix: i same things with ruby as with python
[22:48:16] Freeaqingme: has joined #ruby
[22:48:20] bb010g: has joined #ruby
[22:48:57] julian-delphiki: ChameleonSix, again, one line at a time please.
[22:49:05] shevy: on a phone
[22:49:08] shevy: you type like
[22:49:13] adaedra: shevy: don't.
[22:49:51] adaedra: If the phone medium is not good enough to use IRC correctly, then wait to be in a better environment.
[22:50:17] jhass: in other words I don't care where your bad habit comes from, it doesn't excuse it
[22:50:38] Scripore: has joined #ruby
[22:52:03] crack__david: has joined #ruby
[22:53:29] jhass: that should give us another week or three
[22:54:22] shevy: I think it'll give us perhaps two hours at best
[22:54:23] shevy: he will be back!
[22:54:45] crack__david: hey, when i set rbenv global 2.1.4 should ruby -v show 2.1.4?
[22:54:49] arooni: has joined #ruby
[22:54:57] crack__david: because it shows me 1.9.3 :/
[22:55:40] hxegon: <ChameleonSix> HEY CAN YOU\nTEACH ME\n RUB\nY ON\nRAILS\n???
[22:55:50] agent_white: has joined #ruby
[22:55:59] jhass: crack__david: mmh, how strongly are you attached to rbenv? :P
[22:56:28] beast: has joined #ruby
[22:56:41] hxegon: crack__david: what does rbenv versions show
[22:57:13] crack__david: im not really sure. i just started today learning ruby and im setting up my development environment on ubuntu
[22:57:25] Cohedrin: has joined #ruby
[22:57:34] crack__david: rbenv versions shows 2.1.4
[22:57:34] tenderlove: has joined #ruby
[22:57:42] hxegon: crack__david: did you install that ruby version through rbenv?
[22:58:16] tenderlove: has joined #ruby
[22:58:27] BTRE: has joined #ruby
[22:58:29] jhass: who told you to go with rbenv?
[22:58:44] crack__david: a tutorial that i followed
[22:58:48] crack__david: http://www.rubytreesoftware.com/resources/setup-a-rails-41-development-environment-on-ubuntu-1404
[22:59:02] StevenXL: has joined #ruby
[22:59:02] jhass: damn bloggers
[22:59:02] hxegon: crack__david: have you tried 'rbenv rehash'?
[22:59:07] crack__david: im on elementaryos which is based on ubuntu
[22:59:11] hxegon: what's wrong with rbenv?
[22:59:20] juddey: has joined #ruby
[22:59:26] crack__david: yes i did rehash
[22:59:43] monoprotic: has joined #ruby
[22:59:44] monoprotic: has joined #ruby
[23:00:28] crack__david: so any idea how i can fix that?:P
[23:00:34] jhass: hxegon: what's right?
[23:00:41] hxegon: jhass: not overwriting cd.
[23:00:54] jhass: hxegon: chruby only does so optionally
[23:00:57] dlitvak_: has joined #ruby
[23:01:08] hxegon: crack__david: did you add the rbenv stuff to your .bash_profile or .zshrc?
[23:01:10] crack__david: when i try to do bin/rake db:create db:migrate i get an error that i should update from 1.9.3 :/
[23:01:22] crack__david: no i think i didnt
[23:01:33] jhass: crack__david: can you run eval "$(rbenv init -)" and see if it works afterwards?
[23:02:11] bklane: has joined #ruby
[23:02:33] crack__david: eval "$(rbenv init -)" doesnt give me any output
[23:02:39] jhass: that's okay
[23:02:45] jhass: but did it affect ruby -v ?
[23:02:47] hxegon: jhass, crack__david, you might have to export the .rbenv folder to your path too
[23:03:12] crack__david: now it shows 2.1.4
[23:03:32] crack__david: lets see if bin/rake db:create db:migrate works now
[23:03:40] jhass: crack__david: then you missed out the step of adding that line to your .${SHELL}_profile or .${SHELL}rc
[23:03:42] hxegon: so to make those changes permanent, follow the top answer here https://stackoverflow.com/questions/24736204/rbenv-cant-change-global-ruby-version
[23:03:51] hxegon: crack__david: what jhass said
[23:04:04] crack__david: wasnt in the tutorial :(
[23:04:12] jhass: I repeat myself
[23:04:17] jhass: damn bloggers
[23:04:44] hxegon: LURN RAILS IN 3O SECUNDS
[23:05:49] crack__david: i want to do the lynda course but ive to setup a development environment which is kinda difficult for me
[23:05:56] bklane_: has joined #ruby
[23:06:07] shevy: what is the indent to use in a ruby-c file? I am looking at ruby-gnome, it uses 4 spaces as indent
[23:06:45] hxegon: crack__david: learning about the dev env is kind of a right of passage. It's all stuff you need to learn anyway, and knowing that stuff makes trouble shooting easier.
[23:06:47] jhass: shevy: I doubt there's a community convention for that
[23:07:08] crack__david: i c, makes sense
[23:07:11] jhass: but good C code should also be good ruby extension C code
[23:07:19] rgrmatt: has joined #ruby
[23:07:45] jhass: crack__david: also note that there's a separate room for rails questions, #RubyOnRails
[23:07:51] crack__david: hxegon: any idea where to start?
[23:07:59] crack__david: didnt knew that
[23:08:41] Arnvald: has joined #ruby
[23:09:41] duckpuppy: has joined #ruby
[23:10:36] hxegon: crack__david: not really, I just learned by dealing with problems that came up naturally.
[23:20:50] jgt1: has joined #ruby
[23:21:03] JammyHammy: has joined #ruby
[23:21:08] StevenXL: has joined #ruby
[23:21:10] StevenXL: has joined #ruby
[23:22:51] PaulCapestany: has joined #ruby
[23:23:11] bklane: has joined #ruby
[23:23:29] ChameleonSix: has joined #ruby
[23:23:40] bronson: has joined #ruby
[23:24:23] wolffles: has joined #ruby
[23:24:30] ChameleonSix: has left #ruby: ()
[23:24:41] _stu_: has joined #ruby
[23:26:03] wolffles: has joined #ruby
[23:28:03] dfinninger: has joined #ruby
[23:29:08] shevy: he was back!
[23:30:17] rgrmatt: has joined #ruby
[23:30:31] bklane: has joined #ruby
[23:31:43] shock_one: has joined #ruby
[23:33:17] StevenXL: has joined #ruby
[23:33:17] StevenXL: has joined #ruby
[23:35:37] agent_white: has joined #ruby
[23:37:44] duncannz: has joined #ruby
[23:41:40] jessemcgilallen: has joined #ruby
[23:44:53] TomPeed: has joined #ruby
[23:46:40] moei: has joined #ruby
[23:47:23] kent\n: has joined #ruby
[23:49:27] bklane_: has joined #ruby
[23:49:51] Guest44668: has joined #ruby
[23:49:56] Phage: has joined #ruby
[23:50:42] djbkd: has joined #ruby
[23:51:26] Stalkr_: has joined #ruby
[23:52:27] StevenXL: has joined #ruby
[23:52:27] StevenXL: has joined #ruby
[23:52:50] Stalkr_: Hi, I am using Grape to define my API. I want to accept an array for parameter, but both ?a[]=x&a[]=y and ?a[0]=x&a[1]=y should be legal, anyone knows how to do that? I only have success for a[]=x&a[]=y requests
[23:52:56] platzhirsch: has left #ruby: ()
[23:53:32] CloCkWeRX: has joined #ruby
[23:54:42] darix: Stalkr_: the a[] syntax without index makes more sense imho. with the 2nd syntax it is really easy to remove a field and then forgetting to reindex everything.
[23:54:51] kalopsian: has joined #ruby
[23:55:31] Stalkr_: darix: Problem is I can only figure out how to send the [0] syntax from the client, but the backend only accepts []
[23:55:44] wolffles: has joined #ruby
[23:56:05] akem: has joined #ruby
[23:56:07] charliesome: has joined #ruby
[23:56:51] wolffles: has left #ruby: ()
[23:57:14] wolffles: has joined #ruby
[23:57:33] dlitvak: has joined #ruby
[23:57:57] InvGhosttt: has joined #ruby