« Back to channel list

#ruby - 26 June 2015

« Back 1 day Forward 1 day »
[00:00:49] lolmaus_: has joined #ruby
[00:01:06] zenspider: drbrain: would you consider this !, +, or - ?
[00:01:20] zenspider: I'm still not entirely convinced this doesn't have some strange repercussions
[00:01:31] zenspider: but I don't use it anymore, so I don't have my head inside rake
[00:01:34] drbrain: I don't think it's exactly a bugfix
[00:01:41] drbrain: and I don't think it's exactly a breaking change
[00:01:53] drbrain: yeah, a +, reasonable users shouldn't be affected by this
[00:02:11] zenspider: just ones that are doing their own dynamic shit?
[00:02:24] snsei: has joined #ruby
[00:02:43] drbrain: depending on top-level global methods from within objects is bad
[00:02:47] RobertBirnie: has joined #ruby
[00:02:57] drbrain: (unless ruby put them on Kernel for you already)
[00:03:20] fgo: has joined #ruby
[00:03:36] shock_one: has joined #ruby
[00:04:11] tubuliferous_: has joined #ruby
[00:05:57] nb_bez___: has joined #ruby
[00:08:14] GitGud: has joined #ruby
[00:08:34] dgutierrez1287: has joined #ruby
[00:13:02] fabrice31: has joined #ruby
[00:13:41] DoubleMalt: has joined #ruby
[00:13:55] n008f4g_: has joined #ruby
[00:14:36] acke: has joined #ruby
[00:14:49] Grok: has joined #ruby
[00:16:12] wallerdev: has joined #ruby
[00:20:30] workmad3: has joined #ruby
[00:21:18] Al3ks: has joined #ruby
[00:21:35] robustus: has joined #ruby
[00:26:54] eggoez: has joined #ruby
[00:28:50] rickmasta: has joined #ruby
[00:29:32] danielpclark: has joined #ruby
[00:30:39] casadei: has joined #ruby
[00:30:46] gaucheph: has joined #ruby
[00:33:51] charliesome: has joined #ruby
[00:34:04] Shoutsid: has joined #ruby
[00:35:12] jonr22: has joined #ruby
[00:35:58] arturmartins: has joined #ruby
[00:36:45] sinkensabe: has joined #ruby
[00:38:43] Oog: has joined #ruby
[00:39:09] Oog: has joined #ruby
[00:39:18] arescorpio: has joined #ruby
[00:43:10] Atomic_Work: has joined #ruby
[00:44:29] sfarley: has joined #ruby
[00:48:50] jpfuentes2: has joined #ruby
[00:49:36] doctorly: has joined #ruby
[00:50:36] MatthewsFace: has joined #ruby
[00:50:42] blandflakes: has joined #ruby
[00:51:27] joneshf-laptop: has joined #ruby
[00:51:46] doctorly: I have been having a lot of problems trying to get things happening inside of specific slots while using Green Shoes. Has anyone had similar problems? Would it be worth switching over to standard shoes, or will I likely have the same problems?
[00:53:02] baweaver: has joined #ruby
[00:54:03] CloCkWeRX: has joined #ruby
[00:54:18] swills: has joined #ruby
[00:54:33] doctorly: Also, has anyone used standard shoes and not had similar issues?
[00:54:45] zenspider: I dunno if anyone here has an answer to that... good luck
[00:56:00] zenspider: If (and I don't know) there is a shoes channel, you'll prolly want to ask there
[00:56:11] zenspider: otherwise, I'd say file a bug so the maintainer can help directly
[00:56:28] doctorly: Has anyone used a gui toolkit that is easy?
[00:56:31] baweaver: _why is the maintainer, so that might be added fun.
[00:56:39] baweaver: not in ruby
[00:57:03] baweaver: do you _need_ a gui?
[00:57:03] doctorly: baweaver: _why maintained standard, but it was handed off
[00:57:23] doctorly: Haha literally nobody is on any of their irc chans
[00:57:56] doctorly: Thanks for the help though guys, I am going to have to do something else I think
[00:58:37] zenspider: Again, file a bug. you're likely not alone. if anything, it sounds like a doco issue
[00:59:18] AndroidLoverInSF: has joined #ruby
[01:00:35] freerobby: has joined #ruby
[01:01:25] jfarmer: has joined #ruby
[01:01:32] rbowlby_: has joined #ruby
[01:01:34] rickmasta: has joined #ruby
[01:01:50] Channel6: has joined #ruby
[01:02:00] husanu: has joined #ruby
[01:02:17] commondream: has joined #ruby
[01:05:38] fgo: has joined #ruby
[01:05:39] Alina-malina: has joined #ruby
[01:07:29] jpfuentes2: has joined #ruby
[01:09:11] dfockler: has joined #ruby
[01:10:03] jesterfraud_work: has joined #ruby
[01:10:10] lolmaus_: has joined #ruby
[01:10:21] jesterfraud_work: >> {'a': 'foo'}['a']
[01:10:22] ruboto: jesterfraud_work # => nil (https://eval.in/387881)
[01:10:45] symm-: has joined #ruby
[01:10:54] zenspider: what did you learn?
[01:11:32] jesterfraud_work: {'key': :value} gets converted to {key: :value}
[01:11:45] jesterfraud_work: instead of using a string for the key like I expected
[01:11:56] Xeago: has joined #ruby
[01:12:34] fgo: has joined #ruby
[01:14:25] havenwood: has joined #ruby
[01:15:55] revoohc: has joined #ruby
[01:16:05] sphex: jesterfraud_work: how about { 'key' => :value }?
[01:16:12] RegulationD: has joined #ruby
[01:16:34] shellie_: has joined #ruby
[01:17:01] nwhirschfeld: has joined #ruby
[01:17:12] inoic: has joined #ruby
[01:19:09] jesterfraud_work: sphex: works as expected
[01:19:15] jesterfraud_work: >> {'a' => 'foo'}['a']
[01:19:16] ruboto: jesterfraud_work # => "foo" (https://eval.in/387882)
[01:21:30] Ox0dea: has joined #ruby
[01:23:20] kies: has joined #ruby
[01:23:31] Ox0dea: >> {'this syntax enables non-"word" symbols': 1}
[01:23:32] ruboto: Ox0dea # => {:"this syntax enables non-\"word\" symbols"=>1} (https://eval.in/387883)
[01:23:53] Ox0dea: jesterfraud_work: It works as expected if you don't expect Ruby to be JavaScript.
[01:25:08] toretore: {'key': v} is analogous to :'symbol'
[01:25:16] Oog: has joined #ruby
[01:25:52] mcclurmc: has joined #ruby
[01:26:14] jesterfraud_work: as I just discovered
[01:26:33] nwhirschfeld: has joined #ruby
[01:27:34] tkuchiki: has joined #ruby
[01:29:40] Ox0dea: >> {?x => 1}
[01:29:41] ruboto: Ox0dea # => {"x"=>1} (https://eval.in/387884)
[01:29:44] Ox0dea: >> {?x: 1}
[01:29:45] ruboto: Ox0dea # => /tmp/execpad-5aea1969ef05/source-5aea1969ef05:2: syntax error, unexpected ':', expecting => ...check link for more (https://eval.in/387885)
[01:30:00] bronson: has joined #ruby
[01:30:06] Ox0dea: That seems like an oversight.
[01:30:26] nahtnam: has joined #ruby
[01:31:44] wallerdev: has joined #ruby
[01:31:48] Palmer11: has joined #ruby
[01:32:26] Aswebb_: has joined #ruby
[01:32:37] Palmer11: has joined #ruby
[01:32:49] nwhirschfeld: has joined #ruby
[01:36:57] renderful: has joined #ruby
[01:37:10] sinkensabe: has joined #ruby
[01:37:52] havenwood: >> {"#{?x}": :"#{?y}"}
[01:37:53] ruboto: havenwood # => {:x=>:y} (https://eval.in/387886)
[01:38:41] segfalt: has joined #ruby
[01:39:11] ruboto: havenwood # => /tmp/execpad-123d2405e085/source-123d2405e085:2: syntax error, unexpected tCHAR, expecting tSTRING_C ...check link for more (https://eval.in/387887)
[01:39:30] havenwood: Ox0dea: Just doesn't work at all with the character literal.
[01:40:06] sfarley: has joined #ruby
[01:42:55] nwhirschfeld: has joined #ruby
[01:43:11] mcclurmc: has joined #ruby
[01:45:31] tkuchiki_: has joined #ruby
[01:46:42] bruno-: has joined #ruby
[01:47:14] casadei: has joined #ruby
[01:48:51] bkxd: has joined #ruby
[01:49:01] choke: has joined #ruby
[01:49:02] nwhirschfeld: has joined #ruby
[01:50:27] danielpclark: has joined #ruby
[01:50:43] iamninja: has joined #ruby
[01:51:07] jenrzzz: has joined #ruby
[01:52:21] tubuliferous_: has joined #ruby
[01:53:50] doublemalt_: has joined #ruby
[01:54:02] Grok: has left #ruby: ()
[01:54:18] datanoise: has joined #ruby
[01:56:13] kies: has joined #ruby
[01:56:24] wallerdev: has joined #ruby
[01:56:45] rbowlby: has joined #ruby
[01:58:45] CloCkWeRX: has joined #ruby
[01:58:55] bradgrif1in: has joined #ruby
[01:58:58] husanu: has joined #ruby
[01:59:40] fabrice31: has joined #ruby
[02:01:47] bf4: has joined #ruby
[02:02:05] Oog: has joined #ruby
[02:02:41] havenwood: has joined #ruby
[02:05:43] danielpclark_: has joined #ruby
[02:06:17] danielpclark: has left #ruby: ("Leaving")
[02:06:46] danielpclark: has joined #ruby
[02:08:00] danielpclark: has joined #ruby
[02:09:11] workmad3: has joined #ruby
[02:10:03] michael_mbp: has joined #ruby
[02:10:48] eggoez: has joined #ruby
[02:10:53] aryaching: has joined #ruby
[02:10:55] sevenseacat: has joined #ruby
[02:12:58] konsolebox: has joined #ruby
[02:16:26] fgo: has joined #ruby
[02:16:53] RobertBirnie: has joined #ruby
[02:17:22] RegulationD: has joined #ruby
[02:17:29] choke: has joined #ruby
[02:21:24] pontiki: has joined #ruby
[02:21:46] mansel_: has joined #ruby
[02:22:19] mrsolow: has joined #ruby
[02:22:50] average: has joined #ruby
[02:22:52] average: does anyone have an invitation for https://lobste.rs ?
[02:24:44] c0ncealedx64: has joined #ruby
[02:24:48] shazaum_: has joined #ruby
[02:25:04] sevenseacat: that site still exists?
[02:25:24] average: sevenseacat: apparently so
[02:25:30] average: sevenseacat: you have an invitation ?
[02:25:38] sevenseacat: dunno, havent looked at it in years
[02:25:53] wallerdev: has joined #ruby
[02:26:10] bradgriffin: has joined #ruby
[02:27:08] blandflakes: has joined #ruby
[02:27:23] casadei: has joined #ruby
[02:27:33] fgo_: has joined #ruby
[02:28:00] hahuang65: has joined #ruby
[02:28:34] RobertBirnie: has joined #ruby
[02:28:50] Ox0dea: average: Have you tried asking in /r/lobsters?
[02:29:07] ledestin: has joined #ruby
[02:29:54] ruby-lang595: has joined #ruby
[02:30:27] average: Ox0dea: no but..
[02:30:31] average: Ox0dea: i dunno
[02:30:34] Ox0dea: Go for it.
[02:30:35] fgo: has joined #ruby
[02:30:35] scottstamp: has joined #ruby
[02:30:41] average: Ox0dea: i'd like an invitation though if you can give me one
[02:31:13] ruby-lang595: has anyone ever heard of alchemy cms
[02:31:19] pontiki: i'm afraid to ask...
[02:31:56] swgillespie: has joined #ruby
[02:33:18] jpfuentes2: has joined #ruby
[02:33:41] havenwood: ruby-lang595: Have questions about alchemy_cms?
[02:35:10] havenwood: ruby-lang595: Since it's a Rails app your question might be best in the #RubyOnRails channel.
[02:35:24] ruby-lang595: has left #ruby: ()
[02:36:21] average: has left #ruby: ()
[02:38:19] [k-: has joined #ruby
[02:40:53] duderonomy: has joined #ruby
[02:41:13] startupality: has joined #ruby
[02:42:18] bf4: has joined #ruby
[02:44:46] eggoez: has joined #ruby
[02:45:16] nwhirschfeld: has joined #ruby
[02:46:54] darkf: has joined #ruby
[02:47:12] rikai: has joined #ruby
[02:52:03] cmisenas: has joined #ruby
[02:54:13] havenn: has joined #ruby
[02:55:07] havenn: has joined #ruby
[02:57:21] ddarkpassenger: has joined #ruby
[02:58:09] Oog: has joined #ruby
[02:59:55] vikaton: has joined #ruby
[03:00:50] scx_: has joined #ruby
[03:02:28] ndrei: has joined #ruby
[03:02:34] michael_mbp: has joined #ruby
[03:03:50] c0ncealed: has joined #ruby
[03:04:16] baweaver: has joined #ruby
[03:06:52] ddarkpassenger: has joined #ruby
[03:08:43] Yiota: has joined #ruby
[03:09:22] chinmay_dd: has joined #ruby
[03:10:29] sfarley: has joined #ruby
[03:10:57] braincrash: has joined #ruby
[03:14:04] urbanmonk: has joined #ruby
[03:15:52] j4cknewt: has joined #ruby
[03:16:54] chris_8086: has joined #ruby
[03:17:03] Guest123_: has joined #ruby
[03:17:20] Guest123_: is this the proper place for a rails question?
[03:17:46] Ox0dea: ?rails guest123_
[03:17:46] ruboto: guest123_, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[03:18:10] arooni-mobile: has joined #ruby
[03:18:23] Guest123_: has left #ruby: ()
[03:21:09] Aswebb_: has joined #ruby
[03:25:33] speakingcode: has joined #ruby
[03:25:47] arutemu: has joined #ruby
[03:26:07] sargas: has joined #ruby
[03:27:14] Scripore: has joined #ruby
[03:30:17] t0rrieri: has joined #ruby
[03:30:19] crdpink: has joined #ruby
[03:30:23] danielpclark: has joined #ruby
[03:30:56] wldcordeiro: has joined #ruby
[03:31:21] auzty: has joined #ruby
[03:32:19] Oog: has joined #ruby
[03:36:02] gix: has joined #ruby
[03:38:19] sinkensabe: has joined #ruby
[03:39:23] psyprus: has joined #ruby
[03:40:30] tubuliferous_: has joined #ruby
[03:40:51] CloCkWeRX: has joined #ruby
[03:41:02] Scripore: has joined #ruby
[03:42:35] michael_mbp: has joined #ruby
[03:45:19] fabrice31: has joined #ruby
[03:48:50] revath: has joined #ruby
[03:49:02] gianlucadv: has joined #ruby
[03:49:54] Oog: has joined #ruby
[03:55:40] shevy: we can define methods like: class Foo; def self.bar and also module Foo; def self.bar <--- how do we call these methods in general? "class method" just does sound wrong for when it is a method on a module
[03:55:50] keen___________3: has joined #ruby
[03:56:30] [k-: module class methods? :>
[03:57:24] RobertBirnie: has joined #ruby
[03:57:33] Ox0dea: >> Module.instance_method(:module_function)
[03:57:34] ruboto: Ox0dea # => #<UnboundMethod: Module#module_function> (https://eval.in/387890)
[03:57:39] dgutierrez1287: has joined #ruby
[03:57:43] Ox0dea: Ruby calls them "module functions", so why not go with that?
[03:57:54] workmad3: has joined #ruby
[03:58:39] Ox0dea: If you're referring to defining a method directly on a given object, those are called singleton methods.
[03:59:39] Radar: module met... *has read the question again*
[03:59:40] baweaver: has joined #ruby
[04:00:44] revath: has joined #ruby
[04:01:50] shevy: a module function from a class
[04:02:59] Ox0dea: >> Module.class
[04:03:00] ruboto: Ox0dea # => Class (https://eval.in/387892)
[04:03:04] RobertBirnie: has joined #ruby
[04:03:04] Ox0dea: shevy: Why not?
[04:03:18] shevy: that sounds so wrong on every level
[04:03:26] Ox0dea: Then you don't understand Ruby's object model.
[04:03:42] Ox0dea: And yet you've published 137 gems.
[04:03:43] shevy: let's start: is a module the same as a class?
[04:03:59] baweaver_: has joined #ruby
[04:04:00] shevy: is a function the same as a method?
[04:04:02] [k-: a class is a module technically
[04:04:05] Ox0dea: Ruby does not have functions.
[04:04:12] shevy: so what is a module_function
[04:04:24] Ox0dea: A misnomer for a singleton method.
[04:05:21] sevenseacat: who's published 137 gems?
[04:05:45] Ox0dea: https://rubygems.org/profiles/shevy
[04:06:34] RegulationD: has joined #ruby
[04:07:11] shevy: so, anyone else other than Ox0dea have a suggestion how to call class methods on modules?
[04:07:33] [k-: class methods on modules
[04:08:02] shevy: yeah that's what I was coming up with as well :)
[04:08:12] urbanmonk: has left #ruby: ()
[04:08:31] shevy: but I wonder from where that term originated
[04:09:27] shevy: take the old "principle of least surprise" - I think that came heavily through the pickaxe rather than from matz http://www.artima.com/intv/rubyP.html
[04:09:36] shevy: Yukihiro Matsumoto: "Actually, I didn't make the claim that Ruby follows the principle of least surprise"
[04:10:12] shevy: or wording such as File.exists? versus File.exist?
[04:10:55] havenn: shevy: See the first paragraph in the module docs: http://ruby-doc.org/core/Module.html
[04:11:10] Ox0dea: >> ObjectSpace.each_object(Module).group_by(&:class).map { |c, a| [c, a.size] }
[04:11:11] ruboto: Ox0dea # => [[Class, 275], [Module, 22]] (https://eval.in/387894)
[04:11:29] krz: has joined #ruby
[04:11:41] Ox0dea: The most meaningful distinction between classes and modules is instantiation.
[04:11:42] shevy: so few modules :(
[04:11:48] choke: has joined #ruby
[04:11:54] [k-: Haskell has a nifty function called `words` which is the same as `string.split` in Ruby
[04:11:56] theery: has joined #ruby
[04:12:48] shevy: havenn hmm
[04:12:59] commondream: has joined #ruby
[04:13:25] shevy: I see one interesting definition at least; class_variable_get(:@@foo)
[04:13:27] [k-: module methods it is!
[04:13:41] shevy: [k- not sure, look:
[04:13:56] shevy: >> module Foo; @@foo = 99; end; Foo.class_variable_get(:@@foo)
[04:13:57] ruboto: shevy # => 99 (https://eval.in/387895)
[04:14:05] shevy: we just obtained a class variable!
[04:14:12] Ox0dea: >> Module.class
[04:14:12] shevy: from a module
[04:14:13] ruboto: Ox0dea # => Class (https://eval.in/387896)
[04:14:17] Ox0dea: You're not paying attention.
[04:14:26] shevy: yeah I read the word module
[04:14:32] shevy: and you tell me it is a class
[04:14:59] kies: has joined #ruby
[04:15:12] [k-: that's because Ruby hierarchy is complex
[04:15:31] havenn: shevy: https://www.gliffy.com/go/publish/5152080
[04:16:31] Ox0dea: >> Object.class.is_a?(Object)
[04:16:32] ruboto: Ox0dea # => true (https://eval.in/387897)
[04:16:41] Ox0dea: Object is a class, classes are objects.
[04:17:20] shevy: did you just do
[04:17:27] shevy: Foo.is_a? Foo
[04:17:30] [k-: wait, I thought that was new when I've seen it before
[04:17:52] Ox0dea: It all hangs together really nicely, but it does take some exposure to really grok the circular bedrock of Ruby's object model.
[04:19:28] eggoez: has joined #ruby
[04:19:57] havenn: >> [Class.is_a?(Module), Class.is_a?(Object), Module.is_a?(Class), Module.is_a?(Object), Object.is_a?(Class), Object.is_a?(Module)].all?
[04:19:58] ruboto: havenn # => true (https://eval.in/387901)
[04:21:41] Ox0dea: >> Module.new.ancestors
[04:21:42] ruboto: Ox0dea # => [#<Module:0x4176839c>] (https://eval.in/387903)
[04:21:45] Ox0dea: ^ Confusing.
[04:22:28] commondream: has joined #ruby
[04:23:18] shevy: we created a module object!
[04:23:34] Ox0dea: >> [Module.new.is_a?(Object), Module.new.ancestors.include?(Object)]
[04:23:35] ruboto: Ox0dea # => [true, false] (https://eval.in/387906)
[04:23:55] [k-: 122251 <[k-> >> class Class; self.ancestors; end
[04:23:55] [k-: 122253 <ruboto> [k- # => [Class, Module, Object, Kernel, BasicObject] (https://eval.in/387905)
[04:23:55] [k-: 122334 <[k-> >> class Class; class << self; self.ancestors; end; end
[04:23:55] [k-: 122336 <ruboto> [k- # => [#<Class:Class>, #<Class:Module>, #<Class:Object>, #<Class:BasicObject>, Class, Module, Object, Kern ...check link for more (https://eval.in/387907)
[04:24:07] Ox0dea: Very informative.
[04:24:43] Ox0dea: We have, for instance, learned that [k- doesn't like his timestamps to be legible.
[04:24:59] shevy: [k- I see that you logged your conversation with ruboto there :)
[04:25:33] [k-: my timestamp is enormous!
[04:25:39] [k-: it is 6 digits long!
[04:25:45] shevy: reaching back to the start of the universe
[04:25:45] Ox0dea: >> 122251.bit_length
[04:25:46] ruboto: Ox0dea # => 17 (https://eval.in/387908)
[04:26:13] choke: has joined #ruby
[04:26:50] [k-: oh, I did not set the client to display "long" timestamps
[04:27:16] [k-: it is set to short by default :>
[04:29:19] shevy: short is beautiful
[04:29:45] Oog: has joined #ruby
[04:29:56] nickfausnight: has joined #ruby
[04:30:25] Ox0dea: >> Time.now.to_i.to_s(36)
[04:30:26] ruboto: Ox0dea # => "nqjb6q" (https://eval.in/387912)
[04:31:12] bronson: has joined #ruby
[04:31:45] framling: has joined #ruby
[04:32:57] peter_paule: has joined #ruby
[04:33:32] Ox0dea: You could theoretically represent all 86_400 seconds of the day with a different Unicode character.
[04:34:08] [k-: >> Time.new("nqjb6q".to_i(36))
[04:34:09] ruboto: [k- # => 1435293026-01-01 00:00:00 +0000 (https://eval.in/387914)
[04:34:29] Ox0dea: Well, s/character/codepoint/, as only ~28k of them have been mapped to an actual character.
[04:35:30] jfarmer: has joined #ruby
[04:35:31] [k-: well that wner awfully wrong
[04:36:00] Ox0dea: >> Time.at "nqjb6q".to_i(36)
[04:36:01] ruboto: Ox0dea # => 2015-06-26 04:30:26 +0000 (https://eval.in/387916)
[04:36:44] astrobunny: has joined #ruby
[04:39:17] rickmasta: has joined #ruby
[04:39:29] sinkensabe: has joined #ruby
[04:43:17] arooni-mobile: has joined #ruby
[04:43:40] levifig: has joined #ruby
[04:43:48] shevy: what are you guys doing
[04:44:40] jfarmer: whoa, the cops, hide everything
[04:45:15] sinkensabe: has joined #ruby
[04:45:29] shevy: someone has experience how to proceed :)
[04:46:17] jfarmer: not me, I'm innocent
[04:46:20] jfarmer: blame Ox0dea
[04:47:56] shevy: he looks like a gangster already with that nick alone
[04:49:04] choke: has joined #ruby
[04:49:38] [k-: https://www.reddit.com/r/ProgrammerHumor/comments/3b2krf/i_asked_an_interview_candidate_to_give_an_example/
[04:49:49] Xeago: has joined #ruby
[04:52:08] jfarmer: I have 100% had to do that to fix a bug before.
[04:52:29] theery: has joined #ruby
[04:53:53] shevy: actually there could be worse bug finding ways than that
[04:53:59] arutemu: has joined #ruby
[04:54:48] t0rrieri: has joined #ruby
[04:57:58] Hanmac: has joined #ruby
[05:00:02] revath: has joined #ruby
[05:02:35] Pisuke: has joined #ruby
[05:06:14] jfarmer: In my case, the bug was a website of mine that was getting flagged as virus-ridden by Clam AV. There happened to be a particular byte sequence in the outputted HTML that matched some fingerprint.
[05:07:03] jfarmer: Found it exactly by deleting half the output, seeing if it still matched, etc.
[05:09:05] [k-: https://play.google.com/store/apps/developer?id=I%20like%20turtles%20and%20I%20think%20maybe%20Google%20Play%20shouldn%27t%20let%20me%20do%20this
[05:09:35] rht: has joined #ruby
[05:09:55] Aswebb_: has joined #ruby
[05:12:39] tkuchiki: has joined #ruby
[05:12:51] theery: has joined #ruby
[05:13:28] [k-: damn...should have shortened the URL
[05:15:12] renderful: has joined #ruby
[05:15:34] yfeldblum: has joined #ruby
[05:15:36] x44x45x41x4E: has joined #ruby
[05:20:07] choke: has joined #ruby
[05:24:10] tkuchiki: has joined #ruby
[05:24:31] bruno-: has joined #ruby
[05:25:35] s2013: has joined #ruby
[05:28:39] tubuliferous_: has joined #ruby
[05:29:46] yayfoxes: has joined #ruby
[05:30:02] fabrice31: has joined #ruby
[05:30:51] AndroidLoverInSF: has joined #ruby
[05:31:36] Helheim: has joined #ruby
[05:32:33] Yiota: has joined #ruby
[05:33:17] bronson: has joined #ruby
[05:34:50] Deele: has joined #ruby
[05:36:17] ruv: has joined #ruby
[05:36:28] danielpclark: has joined #ruby
[05:36:32] khebbie: has joined #ruby
[05:37:15] arutemu: has joined #ruby
[05:38:32] kp666: has joined #ruby
[05:39:12] kp666: has joined #ruby
[05:39:43] kp666: has joined #ruby
[05:39:58] jenrzzz: has joined #ruby
[05:41:34] [k-: morning
[05:41:38] kp666: has joined #ruby
[05:42:09] kp666: has joined #ruby
[05:42:33] kp666: has joined #ruby
[05:43:02] x44x45x41x4E: has joined #ruby
[05:43:17] chinmay_dd: has joined #ruby
[05:44:37] bkxd: has joined #ruby
[05:46:21] arutemu: has left #ruby: ()
[05:46:33] Ox0dea: Anyone for golf?
[05:46:43] workmad3: has joined #ruby
[05:46:50] flughafen: Ox0dea: is it par 1?
[05:47:18] ruboto: Ox0dea # => nil (https://eval.in/387923)
[05:47:20] chinmay_dd: has joined #ruby
[05:47:33] GPrime: has joined #ruby
[05:47:39] Ox0dea: There aren't too many terribly useful one-character Ruby programs.
[05:48:07] dreinull75: has joined #ruby
[05:48:28] ruboto: flughafen # => undefined local variable or method `o' for main:Object (NameError) ...check link for more (https://eval.in/387926)
[05:48:37] flughafen: Ox0dea: i beat you by 1 character ahead
[05:49:00] ruboto: Ox0dea # => nil (https://eval.in/387927)
[05:49:06] Ox0dea: >> ?;.ord - ?o.ord
[05:49:07] ruboto: Ox0dea # => -52 (https://eval.in/387928)
[05:49:13] Ox0dea: I beat you by 52. ^_^
[05:49:57] husanu: has joined #ruby
[05:50:17] Ox0dea: There's probably also a multiplier for being a valid program.
[05:50:18] baweaver: learned not to play you in golf anymore Ox0dea
[05:50:45] Ox0dea: Shucks. I suppose I did show my hand that one time.
[05:50:46] astrobunny: has joined #ruby
[05:51:09] baweaver: Eh, I'll humor you, go
[05:51:19] Ox0dea: Deck of cards?
[05:51:24] krz: has joined #ruby
[05:52:38] Ox0dea: >> "'23456789TJQKA'.chars.product(%w[S H C D]).map(&:join)".size
[05:52:39] ruboto: Ox0dea # => 54 (https://eval.in/387929)
[05:52:43] Ox0dea: 54 is the number to beat.
[05:53:03] transiency: has joined #ruby
[05:53:26] tagrudev: has joined #ruby
[05:54:18] Radar: >> "'23456789TJQKA'.chars.product([S,H,D,C]).map(&:join)".size
[05:54:19] ruboto: Radar # => 52 (https://eval.in/387931)
[05:54:20] Radar: Your move.
[05:54:20] aapole: has joined #ruby
[05:54:47] Ox0dea: Radar: Your program isn't valid Ruby?
[05:54:47] Radar: Oh, except those aren't strings.
[05:54:54] eGGsha: has joined #ruby
[05:54:56] Radar: Ox0dea: shhh it's late on a Friday afternoon :P
[05:55:06] flughafen: "'23456789TQKA'.chars.product([S,H,D,C]).map(&:join)".size
[05:55:27] RegulationD: has joined #ruby
[05:55:36] Radar: flughafen: same problem as what I had
[05:55:37] flughafen: >> "'23456789TQKA'.chars.product([S,H,D,C]).map(&:join)".size
[05:55:37] ruboto: flughafen # => 51 (https://eval.in/387932)
[05:55:40] shevy: flughafen!
[05:55:42] shevy: how is your status
[05:55:43] Radar: And you're missing J
[05:56:01] flughafen: >> "'23456789TQKA'.chars.product([S,H,D,C]).map(&:join)".size54
[05:56:02] ruboto: flughafen # => undefined method `size54' for "'23456789TQKA'.chars.product([S,H,D,C]).map(&:join)":String (NoMethod ...check link for more (https://eval.in/387933)
[05:56:10] shevy: it's too early in the morning to code flughafen
[05:56:15] baweaver: Well at least use symbols: '23456789TJQKA'.chars.product(%w[??? ??? ??? ???]).map(&:join)
[05:56:19] [k-: >> %("'23456789TJQKA'.chars.product([S,H,D,C]).map(&:join)").size
[05:56:23] baweaver: thinking on shortening
[05:56:41] shevy: ruboto is a strict bot, he hates leading ' '
[05:56:48] flughafen: Ox0dea: you're off. there are only 52 cards in a deck.
[05:56:53] rickmasta: has joined #ruby
[05:56:57] Ox0dea: flughafen: ...?
[05:56:58] Radar: flughafen: You're not reading it right.
[05:57:04] Radar: flughafen: .size is the length of the code
[05:57:06] Ox0dea: Saints preserve us.
[05:57:09] flughafen: this is logged
[05:57:13] Radar: flughafen: Yup
[05:57:18] Radar: In at least 2 places
[05:57:30] shevy: Radar it's already afternoon? you guys from down under are way too fast compared to the rest of us in europe!
[05:57:38] Radar: shevy: Almost beer o'clock
[05:57:47] notthatidiotflug: it's alomst beer 8am here
[05:58:01] Ox0dea: notthatidiotflug: My nick column was so nice and narrow too.
[05:58:07] shevy: yeah notthatidiotflug
[05:58:28] flughafen: i just mess everything up!
[05:59:01] [k-: >> %("'23456789TJQKA'.chars.product([S,H,D,C]).map(&:join)").size
[05:59:02] ruboto: [k- # => 54 (https://eval.in/387937)
[05:59:20] Ox0dea: [k-: You're referencing nonexistent constants, mate.
[05:59:26] Radar: this is great :D
[05:59:31] codecop: has joined #ruby
[05:59:41] baweaver: almost like that happened before
[05:59:41] [k-: I don't have any clue what the game is about
[05:59:52] Ox0dea: Your code should actually produce a deck of cards.
[05:59:56] Radar: [k-: Write the code to produce the same output but in fewer characters.
[05:59:59] Ox0dea: I was simply showing my first approach and its length.
[06:00:14] baweaver: yeah, I can't find anything that'll trump that
[06:00:16] Ox0dea: baweaver: I'm trying to do something very clever with #gsub and \B.
[06:00:22] baweaver: was thinking zip, but it ends up being permutations
[06:00:50] Ox0dea: I think there must be a sub-50 solution.
[06:01:13] Radar: Ox0dea: You'll find something obscure for this in about 3 days. It's just how you do things.
[06:01:29] Ox0dea: You're not likely to be wrong in that regard. :)
[06:01:41] acke: has joined #ruby
[06:01:48] endash: has joined #ruby
[06:02:39] [k-: '2'..'9'.to_a << 'T bleh
[06:02:52] [k-: too lazy, I'm on mobile :D
[06:03:48] flughafen: >> '2'..'9'.to_a << 'T'
[06:03:49] revath: has joined #ruby
[06:03:50] ruboto: flughafen # => undefined method `to_a' for "9":String (NoMethodError) ...check link for more (https://eval.in/387940)
[06:04:00] [k-: aww brackets
[06:04:11] Ox0dea: >> [*?2..?9]
[06:04:11] flughafen: i generated the most output from rubuto ;)
[06:04:12] ruboto: Ox0dea # => ["2", "3", "4", "5", "6", "7", "8", "9"] (https://eval.in/387941)
[06:04:37] [k-: shorter!
[06:05:04] revath: has left #ruby: ()
[06:06:11] baweaver: "'23456789TJQKA'.gsub(/./){|c|%w[??? ??? ??? ???].zip [c].cycle}".size
[06:06:16] baweaver: >> "'23456789TJQKA'.gsub(/./){|c|%w[??? ??? ??? ???].zip [c].cycle}".size
[06:06:17] ruboto: baweaver # => 55 (https://eval.in/387943)
[06:06:22] baweaver: almost but no
[06:08:28] baweaver: >> "'23456789TJQKA'.gsub(/./){|c|%w[??? ??? ??? ???].zip [c]*4}".size
[06:08:29] ruboto: baweaver # => 51 (https://eval.in/387945)
[06:08:42] baweaver: Ox0dea: Not quite :(
[06:08:54] flughafen: >> [*?2..?13].gsub(/./){|c|%w[??? ??? ??? ???].zip [c]*4}
[06:08:55] ruboto: flughafen # => /tmp/execpad-dd018d13af17/source-dd018d13af17:2: syntax error, unexpected '?' ...check link for more (https://eval.in/387947)
[06:09:20] _blizzy_: has joined #ruby
[06:10:45] SolarSailor: has joined #ruby
[06:10:48] Ox0dea: baweaver: The array should consist of elements like "2???", "A???", etc.
[06:11:13] flughafen: http://ak-hdl.buzzfed.com/static/2014-10/26/6/enhanced/webdr08/enhanced-14836-1414320930-8.jpg
[06:12:29] olistik: has joined #ruby
[06:13:14] [k-: >> "#{[2..9]}TJQKA"
[06:13:15] ruboto: [k- # => "[2..9]TJQKA" (https://eval.in/387949)
[06:14:53] flughafen: >> "'23456789TJQKA'.gsub".size
[06:14:54] ruboto: flughafen # => 20 (https://eval.in/387950)
[06:15:27] Ox0dea: >> %{'23456789TJQKA'.gsub(/./){"#$~???#$~???#$~???#$~???"}.scan(/../)"}.size
[06:15:28] ruboto: Ox0dea # => 45 (https://eval.in/387952)
[06:15:34] riotjones: has joined #ruby
[06:15:57] Ox0dea: I'm a dirty, rotten cheater.
[06:15:59] Versality: has joined #ruby
[06:16:18] flughafen: >> "x=[2..9];"#{x}TJQKA".gsub'.size
[06:16:19] ruboto: flughafen # => "x=[2..9];" (https://eval.in/387953)
[06:16:27] flughafen: >> 'x=[2..9];"#{x}TJQKA".gsub'.size
[06:16:28] ruboto: flughafen # => 25 (https://eval.in/387954)
[06:16:41] flughafen: maybe one of these days i'll learn ruby
[06:16:49] yayfoxes: can you guys teach me programming?
[06:16:55] Oog: has joined #ruby
[06:17:00] flughafen: yayfoxes: i can
[06:17:07] yayfoxes: I want to open a file and read every line of it
[06:17:14] yayfoxes: and if it's a binary file do nothing
[06:17:27] baweaver: yayfoxes: what have you tried?
[06:17:32] Ox0dea: yayfoxes: You'll have to define "binary file".
[06:17:39] yayfoxes: baweaver: did it in Java
[06:17:47] alphaatom: has joined #ruby
[06:17:55] baweaver: Ox0dea: best I can find is $& for a few more characters, but still no shorter
[06:18:02] baweaver: yayfoxes: Have you tried it in ruby?
[06:18:04] gauke: has joined #ruby
[06:18:10] yayfoxes: baweaver: not yet
[06:18:20] baweaver: might be a good first step in #ruby
[06:18:38] j4cknewt: has joined #ruby
[06:18:50] AndroidLoverInSF: has joined #ruby
[06:18:52] Ox0dea: baweaver: $~ and $& are equivalent for this particular case.
[06:19:03] yayfoxes: so, how do you open a file in Ruby? Thought it was simple
[06:19:07] _blizzy_: is getting on my nerves
[06:19:12] yayfoxes: is it File::open("/etc/fstab")?
[06:19:18] _blizzy_: File.open("file.txt","r")
[06:19:24] alem0lars: >> puts "Moin"
[06:19:25] ruboto: alem0lars # => Moin ...check link for more (https://eval.in/387956)
[06:19:26] _blizzy_: r means read.
[06:19:41] yayfoxes: ok, but then how do I um...work with that file after opening it?
[06:19:55] _blizzy_: data = File.open("file.txt","r"0
[06:20:01] _blizzy_: do something with data
[06:20:15] Radar: _blizzy_: which bug would that be/
[06:20:29] _blizzy_: Radar, the @team one, which I still haven't fixed.
[06:20:39] Ox0dea: >> File.read($0)
[06:20:40] ruboto: Ox0dea # => "p begin\n File.read($0)\nrescue Exception\n puts \"\#{$!} (\#{$!.class})\"\n $stdout.flush\n ra ...check link for more (https://eval.in/387957)
[06:20:43] Radar: _blizzy_: Do you have a way for me to reproduce the problem yet?
[06:20:47] yayfoxes: _blizzy_: blizzy: so I write this new text file concatenate.rb
[06:21:03] [k-: have you tried refactoring :p
[06:21:51] _blizzy_: I still am refactoring
[06:21:55] _blizzy_: Radar, not yet.
[06:22:01] _blizzy_: I think I found a fix however.
[06:22:20] yayfoxes: how do I read command line arguments in a manner akin to GNU getopt?
[06:23:07] yayfoxes: I want concatenate -s, concatenate -n, -E, -T, blah blah blah
[06:23:39] lemur: has joined #ruby
[06:23:41] flughafen: yayfoxes: http://lmgtfy.com/?q=ruby+open+and+read+file http://lmgtfy.com/?q=ruby+how+to+tell+if+file+is+binary
[06:23:48] shevy: yayfoxes get_opt_long perhaps
[06:24:01] Ox0dea: yayfoxes: require 'optparse'
[06:24:08] Ox0dea: Or handle ARGV manually.
[06:24:09] shevy: http://ruby-doc.org/stdlib-2.2.2/libdoc/getoptlong/rdoc/GetoptLong.html
[06:24:35] shevy: I like how you suggest the second way Ox0dea; I take it you are not perfectly happy with optparse :D
[06:24:49] Ox0dea: I use Thor.
[06:25:04] flughafen: i used to have a swedish gf, and her dad's name was thor
[06:25:29] shevy: a cool guy this Thor Wauki
[06:26:03] flughafen: ACTION hasn't played magic for .... 20 years?
[06:26:04] ndrei: has joined #ruby
[06:26:14] flughafen: 18-20 or so
[06:26:49] alicanyilmaz: has joined #ruby
[06:26:51] yayfoxes: is this how you print out a whole file? puts File.open("/etc/fstab","r")?
[06:26:56] apeiros: moin flughafen
[06:27:07] flughafen: hey apeiros
[06:27:07] _blizzy_: yayfoxes, try it out.
[06:27:09] apeiros: yayfoxes: puts File.read(path)
[06:28:18] apeiros: open only opens the file (hence it's called "open")
[06:28:30] yayfoxes: ok, another q, how do you do loops in ruby?
[06:28:47] flughafen: yayfoxes: http://learnxinyminutes.com/docs/ruby/
[06:28:49] apeiros: yayfoxes: I suggest you get a book. there's even some for free online.
[06:28:56] yayfoxes: I want to read a single character at a time
[06:29:13] yayfoxes: apeiros: Why's Poignant Guide to Ruby or what?
[06:29:25] apeiros: yes, that's one.
[06:29:32] apeiros: pickaxe is another one freely available
[06:29:33] _blizzy_: https://github.com/vhf/free-programming-books/blob/master/free-programming-books.md#ruby
[06:29:49] shevy: yayfoxes loop { puts 'hi yayfoxes'; sleep 2; break if rand(5) == 0 }
[06:30:00] solars: has joined #ruby
[06:31:05] Xeago: has joined #ruby
[06:31:15] shevy: single character: should be via getch / STDIN.getch / or possibly use io-console; you may have to require it first before .getch works or so, require 'io/console'
[06:31:28] shevy: This one is also cool: row, col = STDIN.winsize
[06:33:38] _blizzy_: Radar, it would be hard to recreate the error.
[06:33:56] _blizzy_: unless you actually ran the bot itself.
[06:34:09] sevenseacat: its now been a day and a half.
[06:34:14] sandstrom: has joined #ruby
[06:34:22] fantazo: has joined #ruby
[06:34:24] [k-: your code again, please?
[06:34:46] [k-: I shall try my best to be a compiler
[06:35:32] _blizzy_: sevenseacat, yep.
[06:35:38] _blizzy_: this is one hell of a bug.
[06:35:44] sevenseacat: its likely not.
[06:36:02] _blizzy_: then it must be something I'm overlooking.
[06:36:08] olistik: has joined #ruby
[06:36:08] [k-: sometimes, people get tired of looking for bugs
[06:36:16] [k-: they just do a full rewrite
[06:36:19] sevenseacat: have you considered testing your code?
[06:37:55] Oog: has joined #ruby
[06:38:14] pandaant: has joined #ruby
[06:38:31] jesterfraud_work: is there a way to mock an object with expectations, but provide equality logic?
[06:38:53] AndroidLoverInSF: has joined #ruby
[06:39:13] sevenseacat: see one of the problems with writing such a big slab of code like that is that it is indeed impossible to test anything
[06:39:15] jesterfraud_work: I'm trying to expect an action mailer (deliver later) action, but the reference I build the expectation with for the objects passed in doesn't match the reference that actually happens, despite them being the 'same object' in terms of ID
[06:39:23] apeiros: _blizzy_: weren't you the one who wondered why long methods are bad?
[06:39:33] _blizzy_: apeiros, yes.
[06:39:39] apeiros: _blizzy_: long methods being hard to debug would be one major reason
[06:39:45] _blizzy_: apeiros, oh.
[06:39:47] apeiros: and them being hard to test too
[06:39:58] lxsameer: has joined #ruby
[06:39:59] Ox0dea: _blizzy_: Doesn't that make sense?
[06:39:59] _blizzy_: sevenseacat, well I've been 'refactoring' for the past day.
[06:40:00] apeiros: smaller methods which focus on a single thing can relatively easy be tested
[06:40:06] sevenseacat: you cant test your code because it's so tied up to the web service
[06:40:17] sevenseacat: your idea of refactoring is very different than mine
[06:40:20] _blizzy_: Ox0dea, yes.
[06:40:33] Ox0dea: _blizzy_: Are you particularly attached to your code at this point?
[06:40:44] _blizzy_: Ox0dea, yes. :/
[06:41:00] micmus: has joined #ruby
[06:41:05] _blizzy_: because I've worked hard on it. It took me a week to get to this point.
[06:41:12] Ox0dea: Why does that give the code worth?
[06:41:20] _blizzy_: because time and effort.
[06:41:25] sevenseacat: sunk cost fallacy
[06:41:27] [k-: ACTION imagines _blizzy_ looking at his code in the future, not a tear dropped
[06:42:26] hectortrope: has joined #ruby
[06:42:44] [k-: morning
[06:43:08] iamdoo2: has joined #ruby
[06:43:22] Ox0dea: _blizzy_: Isn't it great that we can learn from the experiences of others?
[06:43:32] _blizzy_: Ox0dea, yeah.
[06:43:33] commondream: has joined #ruby
[06:43:43] sevenseacat: ACTION mumbles something about killing your darlings
[06:43:54] arturaz: has joined #ruby
[06:44:09] Ox0dea: Only that their siblings may be ever better.
[06:44:32] bayed: has joined #ruby
[06:44:55] [k-: everyone here agrees that your code needs 'serious' refactoring :/
[06:45:14] [k-: do you want/need help with that?
[06:45:26] _blizzy_: I've been refactoring for the past day though. :/
[06:45:27] Ox0dea: It should be junked and begun anew once the prorammer has better learnt his craft.
[06:45:42] _blizzy_: I'm not restarting this project.
[06:46:01] Ox0dea: You spell your doom.
[06:46:21] [k-: _blizzy_ you can by all means continue. when you complete the project, however, we wish you would try to rewrite it differently
[06:46:37] lemur: Y'know a lot of programmers want to burn some of their old creations with fire right?
[06:46:39] _blizzy_: [k-, I'm rewriting it atm.
[06:47:07] [k-: I wish I could burn some
[06:47:13] _blizzy_: but not from scratch. I'm changing things around, making it more 'ruby'
[06:47:15] [k-: so embarrassing >.<
[06:47:17] emhs: I'd rather say I've not yet met one that doesn't want to kill some of their own abominations eventually ;)
[06:47:27] emhs: esp. if they have to keep maintaining them.
[06:47:33] sevenseacat: _blizzy_: but you're not doing that
[06:47:42] _blizzy_: sevenseacat, I am.
[06:47:45] lemur: _mh_: mainly because they end up in production
[06:47:50] sevenseacat: Ruby is an object-oriented language - you are not making things more object oriented
[06:47:54] shevy: _blizzy_ what helped me is to try to have things as small and minimal as possible
[06:47:56] sevenseacat: you're pulling out helper methods that rely on global state
[06:48:13] [k-: I think you need one of Sandi Metz videos
[06:48:14] shevy: _blizzy_ like building with lego bricks
[06:48:14] lemur: sevenseacat: how far back was the link to it?
[06:48:24] sevenseacat: oh sometime yesterday
[06:48:29] lemur: ...dang nick
[06:48:31] emhs: lemur: best teacher to coding standards though... wondering half a day 'who wrote this **** piece of code' and then 'fuck, that's me'
[06:48:34] sevenseacat: _blizzy_: can you give us an updated link to your code?
[06:48:37] shevy: lemur I know you are a beaver in disguise!
[06:48:49] Ox0dea: Very sneaky.
[06:48:50] bigkevmcd: has joined #ruby
[06:48:56] [k-: (let me find the one that she did refactoring)
[06:49:10] baweaver: secondary nick
[06:49:18] baweaver: lemur was my original forum alias
[06:49:26] Ox0dea: _blizzy_: Sandi Metz is female.
[06:49:41] _blizzy_: Ox0dea, oh.
[06:49:42] shevy: _mh_ oh yeah that's how I end up with some comments... I need to explain to my future self why I went that specific way in code, so I can avoid a "wtf was I thinking back then" moment later in time
[06:50:07] _blizzy_: well, it's on github. https://github.com/NotBlizzard/blizzybotrb
[06:50:42] Ox0dea: > englishize
[06:51:07] _blizzy_: yeah IDK why I added that.
[06:51:08] fabrice31: has joined #ruby
[06:51:17] _blizzy_: I should remove it.
[06:51:18] que__: has joined #ruby
[06:51:38] emhs: shevy: I suppose that can help, but most of the time, in a few years, stuff you write today you'll consider 'bad' or 'outdated' or 'wth was I thinking'
[06:52:02] [k-: found it
[06:52:09] sevenseacat: the first thing I would do is move all of the websocket stuff out into its own class - nearly every single one of your methods deals with formatting data either received by or sent to a websocket
[06:52:12] [k-: _blizzy_ https://youtu.be/8bZh5LMaSmE
[06:52:26] baweaver: lib folders help too
[06:52:51] _blizzy_: sevenseacat, ok, that I can do.
[06:53:00] sevenseacat: that would be a real refactoring
[06:53:08] shevy: \o/ you are catifying the code now _blizzy_
[06:53:21] _blizzy_: shevy, is that good or bad.
[06:53:27] Xeago: has joined #ruby
[06:53:28] shevy: it's good. cats are good
[06:53:38] shevy: monkeys are bad, hence the term monkeypatching!
[06:53:50] emhs: patching monkeys should be illegal
[06:54:28] Ox0dea: String#flip should be in core, though. :)
[06:54:29] shevy: I remember matz showed a picture of a duck typing
[06:54:31] terlar: has joined #ruby
[06:54:46] baweaver: I might make a Pokemon system in Ruby later for jollies.
[06:54:48] sevenseacat: and then that makes your code easier to test, because in tests you can simply swap out the websocket class with a different class with stubbed implementations
[06:54:54] emhs: Ox0dea: agreed.
[06:55:04] Ox0dea: baweaver: I have considered it on several occasions.
[06:55:12] baweaver: I actually made the pokegem :D
[06:55:13] eGGsha: has joined #ruby
[06:55:17] Ox0dea: That you did.
[06:55:27] baweaver: https://github.com/baweaver/pokegem
[06:55:37] danielpclark: For those in the earlier convo...
[06:55:38] sevenseacat: none of this pokemon stuff. i want to build an app that plays triple triad
[06:55:39] danielpclark: '23456789TJQKA'.flat_map{|c|([c]*4).zip %w'??? ??? ??? ???'}.scan /../
[06:55:57] Stan: has joined #ruby
[06:56:00] Ox0dea: danielpclark: String#flat_map is not real.
[06:56:37] danielpclark: Hmm.. it's working for me... let me check source location
[06:56:45] baweaver: >> class String def flat_map() raise 'lol' end end; 'foo'.flat_map
[06:56:46] ruboto: baweaver # => /tmp/execpad-35403d3a57d3/source-35403d3a57d3:2: syntax error, unexpected keyword_def, expecting '<' ...check link for more (https://eval.in/387972)
[06:56:52] roolo: has joined #ruby
[06:56:54] baweaver: >> class String; def flat_map() raise 'lol' end end; 'foo'.flat_map
[06:56:55] _blizzy_: http://ruby-doc.org/core-2.1.0/Enumerable.html#method-i-flat_map
[06:56:55] ruboto: baweaver # => lol (RuntimeError) ...check link for more (https://eval.in/387973)
[06:57:01] baweaver: picky devil
[06:57:14] _blizzy_: flat_map is real. c:
[06:57:20] _blizzy_: but not for string.
[06:57:21] [k-: no its not
[06:57:25] sevenseacat: ACTION goes back to futzing with elasticsearch
[06:57:25] [k-: not for strings
[06:57:32] baweaver: ACTION submits to core
[06:57:43] danielpclark: Ah! I see it works from my gem MightyString
[06:57:48] [k-: >> "foo". flat_map
[06:57:49] ruboto: [k- # => undefined method `flat_map' for "foo":String (NoMethodError) ...check link for more (https://eval.in/387974)
[06:57:53] arturmartins: has joined #ruby
[06:57:54] dgutierrez1287: has joined #ruby
[06:58:04] danielpclark: it is a method on string for me. works quite well with the gem ^_^
[06:58:08] RazorX: has joined #ruby
[06:58:30] [k-: ah then you need to account for the length of the gem
[06:58:30] Xeago: has joined #ruby
[06:58:31] danielpclark: That's what I get for testing within my Rails project
[06:58:32] Ox0dea: danielpclark: ruboto does not let you reject its reality and substitute your own.
[06:58:46] shevy: lol... mighty string... what a name :)
[06:59:15] danielpclark: %'23456789TJQKA'.flat_map{|c|([c]*4).zip %w'??? ??? ??? ???'}.scan /../
[06:59:25] Ox0dea: baweaver: I've vaguely fantasized about programmatically turning Eevee's database into a complete system by the magic of metaprogramming.
[06:59:28] danielpclark: There, now it's an Array
[06:59:32] baweaver: that's bloody unintuitive
[06:59:47] Ox0dea: danielpclark: No, it's not.
[06:59:48] skade: has joined #ruby
[06:59:49] baweaver: Ox0dea: PM?
[06:59:59] [k-: >> %'a'
[07:00:00] ruboto: [k- # => "a" (https://eval.in/387975)
[07:00:06] danielpclark: %'23456789TJQKA' is an Array
[07:00:16] [k-: no its not!
[07:00:33] _blizzy_: so, if you was the owner of my project, what would you do next
[07:00:36] _blizzy_: other than rewriting it
[07:00:39] spider-mario: has joined #ruby
[07:00:42] danielpclark: grr, let me switch to IRB
[07:00:47] [k-: I would forget about it
[07:01:10] sevenseacat: you ripped out the websocket stuff already?
[07:01:18] [k-: this never happened before! :>
[07:01:24] [k-: ACTION goes on with my life
[07:01:29] User458764: has joined #ruby
[07:01:29] tvw: has joined #ruby
[07:01:32] _blizzy_: no. I should rip out the ws stuff? what do you mean by that?
[07:01:34] lavros: has joined #ruby
[07:01:41] Rubie: has joined #ruby
[07:02:01] emhs: _blizzy_: the change sevenseacat suggested about 15 mins ago?
[07:02:23] _blizzy_: _mh_, sorry then. may you reexplain it then please.
[07:02:40] sevenseacat: you said you could do it but now you have no idea what i meant?
[07:02:48] _blizzy_: I forget easily.
[07:02:55] sevenseacat: good. scroll up and re-read then.
[07:03:03] emhs: 06:52 < sevenseacat> the first thing I would do is move all of the websocket stuff out into its own class - nearly every single one of your methods deals with formatting data either received by or sent to a websocket
[07:03:05] Jackneill: has joined #ruby
[07:03:08] unshadow: has joined #ruby
[07:03:46] apeiros: _blizzy_: if you forget easily, then taken notes
[07:03:51] sevenseacat: once that's done, I think it would be easier to see what your app actually does, because atm I don't know what it does.
[07:03:55] _blizzy_: I'm making a class called Chat
[07:05:36] yayfoxes: ok can somebody please help me go through and rate books? Learn to Program, by Chris Pine isn't bad, so skip that book
[07:06:25] sevenseacat: if you name books that people here have read, I'm sure they can give you their opinions.
[07:06:28] yayfoxes: I love Ruby seems to be another good book, at first glance
[07:06:45] sevenseacat: read and/or write
[07:06:56] danielpclark: After looking at the source for the method I replicated the results. Here it is.
[07:06:58] husanu: has joined #ruby
[07:07:00] danielpclark: '23456789TJQKA'.chars.flat_map{|c|([c]*4).zip %w'??? ??? ??? ???'}.join.scan /../
[07:07:40] Ox0dea: danielpclark: And now it's massive.
[07:07:41] baweaver: well, bedtime for me. 'night all.
[07:07:49] danielpclark: map works just as well as flat_map in this case... flat_map is not needed
[07:07:50] [k-: >> %"'23456789TJQKA'.chars.flat_map{|c|([c]*4).zip %w'??? ??? ??? ???'}.join.scan /../".size
[07:07:51] ruboto: [k- # => 73 (https://eval.in/387978)
[07:07:56] lkba_: has joined #ruby
[07:08:24] yayfoxes: ok, got any good books I can read?
[07:08:37] yayfoxes: I'm reading I Love Ruby, my opinion is in a sec
[07:08:40] _blizzy_: I'm still confused. you say put websocket related stuff in there. so battle related websocket stuff? or just stuff in general.
[07:08:48] danielpclark: Thought the problem was not getting a count of 52 cards... guess I misunderstood
[07:08:48] _blizzy_: *websocket stuff in general.
[07:09:10] Ox0dea: danielpclark: Golf is about making as short a solution as possible.
[07:09:15] [k-: I'm going to cut my hair soon ;-;
[07:09:47] sevenseacat: _blizzy_: all of the code to deal with translating readable stuff into the format to be sent over the websocket, and anything to deal with interpreting what the websocket receives into meaningful data
[07:10:14] _blizzy_: sevenseacat, ok.
[07:10:31] danielpclark: Is an Array of results okay for the golf challenge?
[07:10:33] danielpclark: ('23456789TJQKA'*4).chars.zip %w'??? ??? ??? ???'*52
[07:10:34] Aswebb_: has joined #ruby
[07:10:54] Ox0dea: danielpclark: That's an array of arrays.
[07:10:58] sevenseacat: _blizzy_: https://github.com/NotBlizzard/blizzybotrb/blob/master/battle-helpers.rb#L286 almost this entire method deals with websocket junk, and there's even a nice typo bug hidden in there that I'm not sure affects anything
[07:11:02] danielpclark: That's why I asked
[07:11:15] Ox0dea: You'd need a map(&:join) to complete the task, but that's essentially the par I posted to kick things off.
[07:11:28] sevenseacat: _blizzy_: megaed vs magaed, whatever they mean
[07:11:42] _blizzy_: sevenseacat, megaed, thanks.
[07:12:13] yayfoxes: sevenseacat: I Love Ruby is a good book; it explains everything, but there's no exercises
[07:12:20] sevenseacat: i havent read that book
[07:12:43] sevenseacat: and yeah I think exercises in a language book are important, not so much in a framework book
[07:13:31] yayfoxes: so erm...what book has exercises and ideally explains everything?
[07:13:48] bruno-: has joined #ruby
[07:13:49] sevenseacat: I don't know. i didnt read any books specifically about teaching ruby
[07:13:56] Ox0dea: danielpclark: You'd only need to multiply the array of suits by 13, for what that's worth.
[07:14:06] yayfoxes: can you recommend any books in any other language?
[07:14:22] revath: has joined #ruby
[07:14:45] revath: has left #ruby: ()
[07:14:48] sevenseacat: even the well grounded rubyist doesnt appear to have exercises
[07:15:05] sevenseacat: i liked programming elixir, it had exercises.
[07:15:53] sevenseacat: is that relevant in a ruby channel?
[07:16:01] shevy: oh a drinking cat, with a powerful elixir
[07:16:43] yayfoxes: sevenseacat: Elixir seems boring, I wanna study Haskell
[07:16:47] tubuliferous_: has joined #ruby
[07:17:05] sevenseacat: go do that then
[07:17:09] yayfoxes: network oriented is not what I want, which is why it's boring to me
[07:17:27] sevenseacat: i liked learn you a haskell for great good. i dont remember if it had exercises or not.
[07:17:38] shevy: the schroedinger cat is a dead-or-alive monad-in-a-box. it follows the maybe-alive pattern
[07:17:44] Oog: has joined #ruby
[07:18:42] yayfoxes: sevenseacat: ok, bye ruby
[07:19:06] yayfoxes: has left #ruby: ("WeeChat 1.0.1")
[07:20:36] browsestoics: has joined #ruby
[07:20:54] krz: has joined #ruby
[07:20:55] Iskarlar: has joined #ruby
[07:21:00] lsmola: has joined #ruby
[07:21:14] dchoi: has joined #ruby
[07:22:28] towski_: has joined #ruby
[07:23:02] alex88: has joined #ruby
[07:23:27] alphaatom: has joined #ruby
[07:24:42] Bertg: has joined #ruby
[07:25:14] hotpancakes: has joined #ruby
[07:25:30] allomov: has joined #ruby
[07:25:48] _blizzy_: am I going in the right direction, sevenseacat? https://gist.github.com/NotBlizzard/7673e1cad47e85bf0813
[07:26:27] sevenseacat: uh.... I don't know what direction you're going in.
[07:26:40] _blizzy_: the right direction hopefully.
[07:26:50] _blizzy_: the direction you want me to go in.
[07:26:58] _blizzy_: about ripping out the ws stuff
[07:27:07] _blizzy_: and putting it into one class.
[07:27:37] sevenseacat: not quite what I meant
[07:27:45] _blizzy_: ._. I can't win
[07:27:53] sevenseacat: I meant building a websocket adapter for your code, not just moving all of your existing methods into a new class.
[07:27:57] Ox0dea: > using a compass to find enlightenment
[07:28:33] sevenseacat: _blizzy_: how hard with your code would it be to print output to a console, instead of sending it over a websocket?
[07:28:44] sevenseacat: printing nice output to a console
[07:28:59] sevenseacat: not the same text you're sending over the websocket
[07:29:09] _blizzy_: so a parser?
[07:29:23] Shoutsid: has joined #ruby
[07:30:03] dchoi: has joined #ruby
[07:30:37] sevenseacat: if the format of the input you were receiving from your websocket changed, how much of your code would you have to change?
[07:30:46] sevenseacat: likely a lot, right?
[07:30:56] _blizzy_: OK I get it now
[07:31:03] sevenseacat: if that was all encapsulated in one place, your adapter class, you'd only have to change it there.
[07:31:33] sevenseacat: or if you wanted to print nice messages to a console, you could swap the adapter for one that printed messages like "you did a mega attack on Foobar!" (i have no idea if thats an actual output)
[07:32:01] white_bear: has joined #ruby
[07:32:31] Ox0dea: _blizzy_: What do you have against Hoopa and Volcanion?
[07:32:45] _blizzy_: Ox0dea, um, nothing.
[07:32:52] Ox0dea: Then why aren't they in data/pokemon.txt?
[07:33:10] _blizzy_: I didn't add them yet. I used a generator to generate the pkmn list.
[07:33:27] _blizzy_: since typing out 721 names would take a while.
[07:33:27] arount: has joined #ruby
[07:33:46] Ox0dea: Have you thought about how you're going to handle Flab??b???
[07:33:47] arturmartins: has joined #ruby
[07:34:04] arount: has left #ruby: ()
[07:34:35] maloik: Ox0dea: made me lol :D
[07:34:40] sevenseacat: Ox0dea: you really are a font of obscure knowledge.
[07:34:56] ndrei: has joined #ruby
[07:35:18] _blizzy_: I knew someone in here understood what I was talking about.
[07:35:23] workmad3: has joined #ruby
[07:35:54] Iskarlar: has joined #ruby
[07:36:34] dchoi: has joined #ruby
[07:37:21] dchoi: has joined #ruby
[07:38:00] vondruch: has joined #ruby
[07:38:40] dchoi: has joined #ruby
[07:39:47] dchoi: has joined #ruby
[07:40:32] arup_r: has joined #ruby
[07:40:58] shock_one: has joined #ruby
[07:41:04] ruu: has joined #ruby
[07:41:29] Pumukel: has joined #ruby
[07:41:33] senayar: has joined #ruby
[07:41:33] senayar: has joined #ruby
[07:41:41] Iskarlar: has joined #ruby
[07:42:06] sandstrom: has joined #ruby
[07:42:45] arup_r1: has joined #ruby
[07:43:49] ryba: has joined #ruby
[07:44:18] ghostpl: has joined #ruby
[07:45:43] k3asd`: has joined #ruby
[07:46:20] User458764: has joined #ruby
[07:46:26] apeiros: `render text: "OK"` --> Completed 200 OK ??? (views 17ms) - where the hell does that spend 17ms? :D
[07:48:03] arup_r: has joined #ruby
[07:48:16] Silex: apeiros: production?
[07:48:39] ljarvis: apeiros: rails?
[07:49:05] Iskarlar: has joined #ruby
[07:49:33] anne-marie_: has joined #ruby
[07:50:51] shevy: apeiros: chocolate?
[07:51:05] TheHodge: has joined #ruby
[07:51:51] adaedra: apeiros: happiness?
[07:52:23] elia: has joined #ruby
[07:52:29] Helheim: has joined #ruby
[07:52:40] danielpclark: has joined #ruby
[07:52:43] [k-: apeiros: hell
[07:52:51] [k-: oh I forgot the ?
[07:53:04] [k-: s/ll/ll?
[07:53:12] adaedra: tsoin tsoin tsooooooin
[07:54:43] msgodf: has joined #ruby
[07:55:13] araujo: has joined #ruby
[07:55:51] bkxd: has joined #ruby
[07:57:38] nso95: has joined #ruby
[07:57:38] KillerFox: has joined #ruby
[07:58:13] avril14th: has joined #ruby
[07:58:49] towski_: has joined #ruby
[07:59:16] ruu: has joined #ruby
[07:59:31] rdark: has joined #ruby
[08:00:10] _blizzy_: ok, sevenseacat :) https://github.com/NotBlizzard/blizzybotrb
[08:00:37] mikecmpbll: has joined #ruby
[08:01:17] Juanchito: has joined #ruby
[08:01:24] djbkd: has joined #ruby
[08:01:37] sevenseacat: _blizzy_: another side effect of having such big slabs of code is that you run into indentation issues and dont even realize it
[08:01:53] _blizzy_: sevenseacat, oh.
[08:02:13] sevenseacat: make sure you use two spaces for indentation.
[08:02:41] mister_solo: has joined #ruby
[08:02:48] sevenseacat: like, whats happening here: https://github.com/NotBlizzard/blizzybotrb/blob/master/battle-parser.rb#L142-L145
[08:03:10] shredding: has joined #ruby
[08:03:47] sevenseacat: or here https://github.com/NotBlizzard/blizzybotrb/blob/master/battle-parser.rb#L102-L104 or here https://github.com/NotBlizzard/blizzybotrb/blob/master/battle-parser.rb#L61-L62
[08:04:46] sevenseacat: also, your rearrangements havent addressed any of the questions i posed earlier
[08:04:57] sevenseacat: because you're just moving code around, not refactoring it
[08:05:42] Scroff: has joined #ruby
[08:05:45] c0m0: has joined #ruby
[08:06:01] _blizzy_: I put all the websocket stuff in one class now
[08:06:09] _blizzy_: so I can easily change websocket modules if I have to.
[08:06:19] zeroDivisible: has joined #ruby
[08:07:10] doerteDev: has joined #ruby
[08:07:49] sevenseacat: I'm also fairly certain you're not actually running any of this code you're writing
[08:07:55] sevenseacat: because there are some huge glaring typos in it
[08:08:30] _blizzy_: I am running it
[08:08:38] _blizzy_: it connects to said websocket
[08:08:45] _blizzy_: I've fixed the typos.
[08:09:14] joonty: has joined #ruby
[08:09:16] _blizzy_: the ones you posted.
[08:09:34] bkxd: has joined #ruby
[08:09:49] sevenseacat: i posted indentation issues, not typos
[08:10:15] sevenseacat: you're not setting any of your instance variables anywhere.
[08:10:21] sevenseacat: hence, running the code will cause a lot of problems.
[08:10:32] _blizzy_: I've also fixed the indentation issues.
[08:10:50] olistik: has joined #ruby
[08:11:39] senayar: has joined #ruby
[08:11:39] senayar: has joined #ruby
[08:12:07] ndrei: has joined #ruby
[08:12:12] apeiros: Silex: na, dev
[08:12:15] ghostpl: has joined #ruby
[08:12:36] apeiros: [k-: probably :D
[08:12:49] apeiros: ljarvis: yes, rails
[08:13:16] sevenseacat: I keep finding more and more issues just with this BattleParser class
[08:13:16] ddfreyne: yorickpeterse: There's no point in adding gem checksums to the ruby-lint gem repository if you???re not signing your Git commits
[08:13:38] sevenseacat: there's no possible way it can work. for anything.
[08:13:44] ddfreyne: yorickpeterse: Anyone could commit in your name.
[08:14:02] _blizzy_: well, it runs.
[08:14:07] _blizzy_: it just crashes when a battle happens.
[08:14:14] [k-: that is why you should use nice variable names
[08:14:17] sevenseacat: if by run you mean it loads without error, then sure
[08:14:19] eGGsha: has joined #ruby
[08:14:20] sevenseacat: but it wont work. for anything.
[08:14:31] [k-: @variables default to nil
[08:14:37] _blizzy_: thanks for allt the help so far :)
[08:14:39] [k-: so it still runs
[08:14:40] sevenseacat: you're not setting any of the instance variables, for a start.
[08:14:50] sevenseacat: so all of the methods you're calling on them, will crash.
[08:15:04] _blizzy_: I'm not setting them in initialize?
[08:15:10] sevenseacat: you dont have an initialize method.
[08:15:22] _blizzy_: oh. I typoed
[08:15:23] sevenseacat: hence i said glaring typos.
[08:15:31] _blizzy_: you could of pointed them out. c:
[08:15:34] sevenseacat: so I think you're wasting my time now.
[08:15:37] sevenseacat: you said the code worked.
[08:15:39] _blizzy_: but I'm trying.
[08:15:42] rbowlby: has joined #ruby
[08:15:43] _blizzy_: yes, the code runs.
[08:15:48] _blizzy_: without errors.
[08:15:59] towski_: has joined #ruby
[08:16:04] _blizzy_: I'm trying my best to let you help me.
[08:16:06] sevenseacat: except for the part where it crashes
[08:16:09] lordkryss: has joined #ruby
[08:16:13] _blizzy_: ok but I'm trying.
[08:16:19] _blizzy_: everyone makes mistakes.
[08:16:25] [k-: that is not how you test if a program is correct...
[08:16:31] Ox0dea: Isn't it, though?
[08:16:44] towski_: has joined #ruby
[08:16:47] [k-: only syntactical wise
[08:17:00] [k-: maybe if it was Haskell, sure
[08:17:02] Bounga: has joined #ruby
[08:17:04] sevenseacat: yeah you're trying alright
[08:17:04] [k-: but not ruby
[08:17:21] Ox0dea: I thought trying duper hard made the code at least 2x gooder.
[08:17:59] Iskarlar_: has joined #ruby
[08:18:00] [k-: now you can start from scratch!
[08:18:03] rickmasta: has joined #ruby
[08:18:15] _blizzy_: I mean I give up with trying to get help from here.
[08:18:30] [k-: that's mean :(
[08:18:36] sevenseacat: so you really did just waste my time. thanks!
[08:18:49] _blizzy_: but I haven't so far even heard a "you're trying! good job" or "you're getting there"
[08:18:55] _blizzy_: all I hear is complaint after complaint.
[08:18:55] ljarvis: _blizzy_: you can't be angry with people in here, lots of people have tried very hard to help but it's been incredibly difficult
[08:18:55] sevenseacat: because you're not getting there
[08:19:04] sevenseacat: no you're not.
[08:19:05] _blizzy_: ljarvis, I am trying.
[08:19:06] [k-: ACTION pats sevenseacat
[08:19:14] Xeago: has joined #ruby
[08:19:32] [k-: then there is no use asking for help
[08:19:39] [k-: since you got where you want
[08:19:52] _blizzy_: I've made great progress. I've been 'refactoring', making my code more OOP.
[08:19:55] krz: has joined #ruby
[08:19:56] ljarvis: _blizzy_: You've been asked a few times to delete lots of code and create a very minimal example but i've seen no evidence that you've tried that
[08:19:58] sevenseacat: criticism of your code != complaint
[08:20:08] [k-: morning
[08:20:15] _blizzy_: ljarvis, because there are other ways of doing things.
[08:20:26] Silex: apeiros: well, give it a try with production
[08:20:29] [k-: _blizzy_ please
[08:20:35] ljarvis: well that's me out then
[08:20:50] Silex: apeiros: dev being slow is not really a surprise as it reloads almost everything all the time
[08:21:01] [k-: _blizzy_ I recommend you watch the video now
[08:21:02] apeiros: Silex: well, it says in *views* it takes 17ms
[08:21:04] sevenseacat: you're running out of people to help you because you insist, just like this, that you already know better
[08:21:08] apeiros: and that's just a plain render text
[08:21:11] apeiros: there's nothing to reload
[08:21:13] apeiros: nothing to process
[08:21:16] _blizzy_: I don't know better.
[08:21:20] Silex: apeiros: are you sure of that?
[08:21:30] apeiros: Silex: errr, yes?
[08:21:30] sevenseacat: then when people asked you to make a minimal example, why did you point blank refuse?
[08:21:35] apeiros: unless it lies about what it measures???
[08:21:36] towski_: has joined #ruby
[08:21:37] kalx: has joined #ruby
[08:21:38] Silex: I can imagines tons of things to load to render text
[08:21:40] _blizzy_: I don't point black refuse.
[08:21:41] sevenseacat: because 'there are other ways to do things'
[08:21:49] kalx: has left #ruby: ()
[08:21:55] apeiros: Silex: do tell?
[08:21:59] ljarvis: Silex: the metric is view loading...
[08:22:02] _blizzy_: because you really can't make a minimal example. the minimal example would be going to the website
[08:22:05] _blizzy_: making an account
[08:22:07] _blizzy_: connecting the bot
[08:22:10] _blizzy_: and then battling.
[08:22:12] sevenseacat: you really can. its called separation of concerns.
[08:22:14] ljarvis: that shouldn't differ with plain text rendering
[08:22:30] Silex: apeiros: e.g reload all the renderers, even to finally only use the one that renders text
[08:22:31] sevenseacat: you have no separation of concerns at the moment. everything is tied up together.
[08:22:31] Ox0dea: _blizzy_: That is, in fact, a maximal example.
[08:22:38] sevenseacat: hence we're trying to get you to split them out into minimal examples/.
[08:22:42] _blizzy_: sevenseacat, I'm splitting it
[08:22:43] apeiros: Silex: renderers are not part of the reload cycle in rails
[08:22:45] _blizzy_: just like you said to.
[08:22:53] Zai00: has joined #ruby
[08:22:53] _blizzy_: I'm splitting it into a seperate web socket class
[08:23:00] apeiros: haml, slim, erb are libs, they get loaded once
[08:23:03] _blizzy_: so if I change websocket modules, I easily can.
[08:23:19] Iskarlar: has joined #ruby
[08:23:22] Silex: apeiros: trace it then? see where it spends time
[08:23:24] workmad3: has joined #ruby
[08:23:30] apeiros: Silex: eh, not wasting time on this
[08:23:37] ljarvis: apeiros: it's 17ms just give up
[08:23:38] Silex: apeiros: well you already are atm :)
[08:23:38] apeiros: it just caught my eye
[08:23:50] Silex: apeiros: as I said, try in production
[08:23:55] Ox0dea: sevenseacat: Thank you for trying.
[08:24:04] _blizzy_: yeah, thanks for all the help, sevenseacat
[08:24:15] _blizzy_: you really got me far. :) really, thanks.
[08:24:19] _blizzy_: no sarcasm.
[08:24:41] apeiros: Silex: not running this locally in production. far too much config to change.
[08:24:46] marr: has joined #ruby
[08:24:53] apeiros: and I'm not sure I'll remember to check the logs once it runs on production :)
[08:25:10] _blizzy_: well, time to continue this project.
[08:25:51] Silex: apeiros: what? what kind of setup do you have where switching to production takes more than 15 seconds?
[08:25:53] nutha: has joined #ruby
[08:26:00] ljarvis: apeiros: obs you should be using node
[08:26:11] serivich: has joined #ruby
[08:26:24] sulky: has joined #ruby
[08:27:16] fabrice31: has joined #ruby
[08:27:19] lessless: has joined #ruby
[08:27:28] _blizzy_: node isn't that bad
[08:27:37] _blizzy_: Silex, did you know that there's a php framework named after you? :)
[08:27:39] datanoise: has joined #ruby
[08:28:05] MatthewsFace: has joined #ruby
[08:28:08] adaedra: <_blizzy_> node isn't that bad
[08:28:11] lavros: has joined #ruby
[08:28:15] _blizzy_: well it's not.
[08:28:20] adaedra: different people, different tastes :??
[08:28:20] _blizzy_: imo it's not.
[08:28:43] _blizzy_: what's funny. c:
[08:28:49] adaedra: "imo", we're getting there.
[08:30:47] lkba: has joined #ruby
[08:30:58] lva: has joined #ruby
[08:31:34] ljarvis: god dammit
[08:31:34] maloik: bbbbbbbbbb
[08:31:38] ljarvis: maloik: nou
[08:31:39] maloik: oh, not that game :(
[08:31:43] Silex: _blizzy_: yes
[08:31:53] adaedra: Who give the d?
[08:32:24] Silex: _blizzy_: all of a sudden I was ungooglable
[08:32:40] adaedra: ljarvis: what happen?
[08:32:42] _blizzy_: you're still googlable.
[08:33:01] ljarvis: adaedra: terminal crapped itself
[08:33:15] adaedra: the command is reset, not aaaaaaa
[08:34:17] withnale_: has joined #ruby
[08:35:08] jhass: would be a good alias though
[08:35:49] adaedra: alias merde=reset
[08:35:56] [k-: I think every programmer should learn java
[08:36:06] adaedra: I think not
[08:36:08] [k-: then they will know why everyone loves ruby
[08:36:17] _blizzy_: I find Java ok.
[08:36:21] Silex: apeiros: Rendered text template (0.0ms)
[08:36:24] Silex: in development
[08:36:30] sevenseacat: you find everything okay
[08:36:37] [k-: there is a saying that you can't find happiness if you don't experience hardships
[08:36:38] _blizzy_: no I like ruby.
[08:36:47] adaedra: you find it ok?
[08:36:54] ljarvis: java is awesome. haters
[08:36:57] _blizzy_: it's my favorite language.
[08:37:09] [k-: ljarvis: nou
[08:37:12] Silex: all languages sucks for one reason or another
[08:37:28] sevenseacat: except php. *runs like hell*
[08:37:32] ljarvis: except my pet language
[08:37:37] _blizzy_: I'm ok with PHP.
[08:37:39] [k-: ACTION shoots sevenseacat
[08:37:41] adaedra: sevenseacat: indeed. it sucks for all the reasons.
[08:37:42] jenrzzz: has joined #ruby
[08:37:44] _blizzy_: it's also one of my favorite languages.
[08:37:47] sevenseacat: adaedra: precisely :P
[08:38:09] sevenseacat: ACTION resists the urge to recommend _blizzy_ write the bot in one of those other languages
[08:38:14] emhs: ACTION goes back to hiding in a corner somewhere till php passes.
[08:38:24] adaedra: _blizzy_: I liked PHP, until I had to work with it.
[08:38:25] _blizzy_: sevenseacat, I already have
[08:38:38] _blizzy_: in every other language I know.
[08:38:49] sevenseacat: none of them were OO languages?
[08:38:50] ljarvis: _blizzy_: what languages?
[08:38:51] [k-: obviously you did not grasp oop
[08:39:08] _blizzy_: Scala, Java, C#, Go, Ruby, Python, Node
[08:39:17] [k-: sevenseacat: you're too fast :(
[08:39:28] apeiros: Silex: an app which connects to a couple of services in production
[08:39:30] ndrei: has joined #ruby
[08:39:42] adaedra: [k-: that's what she said
[08:39:45] towski_: has joined #ruby
[08:39:47] apeiros: Silex: so you'd have to go through all config files and ensure it doesn't do that when you only want to run it locally in prod
[08:39:48] [k-: but... they are all oo!
[08:39:48] sevenseacat: [k-: yeah I hear that a lot ;_;
[08:39:55] [k-: except scala
[08:40:06] [k-: but Scala is functional
[08:40:15] ljarvis: scala is hybrid really
[08:40:17] ljarvis: it has oop
[08:40:29] [k-: but I like to think it is functional
[08:40:31] _blizzy_: which one you want first
[08:40:35] Ox0dea: _blizzy_: Scala.
[08:40:40] _blizzy_: https://github.com/NotBlizzard/blizzybotscala
[08:40:42] [k-: I think I do not want to see them
[08:41:01] jhass: apeiros: check rake middleware for odd things?
[08:41:05] [k-: I'm clicking anyway
[08:41:12] Igorshp: has joined #ruby
[08:41:16] sevenseacat: that doesnt do the same things
[08:41:25] _blizzy_: yeah, but they're both bots.
[08:41:36] _blizzy_: one is just more functional than the other.
[08:41:37] [k-: oh. my. god.
[08:41:50] Ox0dea: He's, like, accidentally trolling.
[08:41:58] sevenseacat: thats like saying i made two web apps, one is a hello world, the other is facebook
[08:42:04] sevenseacat: but theyre both web apps, right
[08:42:11] _blizzy_: but they are both bots.
[08:42:15] apeiros: jhass: naaa, as said, not going to waste time on this
[08:42:16] _blizzy_: they bot can run and do commands.
[08:42:16] [k-: MY EYES ARE CRYIG
[08:42:19] ljarvis: hello mrs zuckerburg
[08:42:24] shevy: cryig eyes
[08:42:28] adaedra: ACTION gives [k- acid
[08:42:30] Silex: apeiros: oh, you have configs that are "production ready" in your repo
[08:42:33] Silex: that sounds dangerous
[08:42:34] adaedra: this should help your eyes, [k-
[08:42:34] apeiros: while 17ms is crazy for what it does, it's not warranting any time spent on it.
[08:42:42] Silex: apeiros: as I showed you, it takes 0ms by me
[08:42:50] Silex: so probably something with your config/version/whatever
[08:42:52] apeiros: Silex: yepp, and that's what I'd expect
[08:43:16] jhass: oh anyway
[08:43:18] ljarvis: _blizzy_: what about the c# one
[08:43:19] jhass: ?rails apeiros
[08:43:19] ruboto: apeiros, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[08:43:32] _blizzy_: https://github.com/NotBlizzard/blizzybotcsharp
[08:43:36] ljarvis: shots fired
[08:43:41] ruboto: jhass, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[08:43:58] ljarvis: lots of friendly fire going on
[08:44:03] [k-: this actually looks readable
[08:44:13] [k-: well done, c#!
[08:44:13] _blizzy_: because it's C#
[08:44:28] _blizzy_: the scala one is readable also
[08:44:29] adaedra: so you see sharp?
[08:44:33] _blizzy_: I wear glasses
[08:44:34] adaedra: ACTION runs
[08:44:42] sandstrom: has joined #ruby
[08:44:48] [k-: the Scala one is not readable
[08:45:03] _blizzy_: how is it not?
[08:45:05] serivich: has joined #ruby
[08:45:09] shevy: it's ugly
[08:45:09] _blizzy_: I bet if I post it in the scala channel
[08:45:13] _blizzy_: people will say it is
[08:45:17] shevy: they are ugly too
[08:45:26] _blizzy_: ok this shows the ruby community
[08:45:28] _blizzy_: in a nutshell.
[08:45:33] [k-: shevy, tsk tsk
[08:45:53] sevenseacat: again with the community accusations
[08:46:06] arturmartins: has joined #ruby
[08:46:14] Ox0dea: Gotta offload that incompetence somewhere.
[08:46:27] apeiros: _blizzy_: what I see is a community which shows tremendous patience with you
[08:46:50] apeiros: _blizzy_: and you're paying that patience back by accusing them. how rude.
[08:47:09] _blizzy_: I never said anything bad
[08:47:11] Oog: has joined #ruby
[08:47:14] _blizzy_: I said this shows the ruby community
[08:47:18] _blizzy_: you can take that as good or bad
[08:47:47] apeiros: _blizzy_: oh stop bullshitting us.
[08:47:53] apeiros: that's insulting.
[08:47:55] _blizzy_: but is it true?
[08:48:18] shevy: it is true that the ruby community is awesome
[08:48:21] sevenseacat: apeiros is the most levelheaded person here. this is interesting.
[08:48:26] apeiros: if you can't support what you just said, you apologize. you don't weasel out.
[08:48:38] _blizzy_: I'm not weaseling out
[08:48:40] ljarvis: right, enough of this shit. If you want to discuss Ruby or have a question to follow up on your code then go ahead, otherwise go to #ruby-offtopic
[08:48:43] _blizzy_: I never said the community is bad.
[08:48:46] Ox0dea: On the Internet, nobody knows you're a weasel.
[08:48:50] [k-: _blizzy_: you are making everyone unhappy :(
[08:49:00] shevy: I am not unhappy!
[08:49:04] _blizzy_: ok well this is off topic so I'll go back to talking ruby
[08:49:06] sevenseacat: see ya, have fun in #ruby-offtopic
[08:49:07] ndrei: has joined #ruby
[08:49:11] [k-: ?unhappy shevy
[08:49:12] ruboto: shevy, I don't know anything about unhappy
[08:49:21] apeiros: _blizzy_: agreed regarding OT
[08:49:21] [k-: ?happy shevy
[08:49:22] ruboto: shevy, I don't know anything about happy
[08:49:30] [k-: no happiness here
[08:49:32] shevy: the bot still confuses me
[08:49:32] apeiros: sevenseacat: thx @ levelheaded :D
[08:49:36] sevenseacat: ruboto has no emotionals
[08:49:45] Ox0dea: >> @emotion
[08:49:47] ruboto: Ox0dea # => nil (https://eval.in/388009)
[08:49:52] shevy: good point
[08:49:59] _blizzy_: >> @emotion = 'happy'; @emotion
[08:50:00] ruboto: _blizzy_ # => "happy" (https://eval.in/388010)
[08:50:12] Ox0dea: _blizzy_: Please don't declare instance variables at the top level.
[08:50:17] Ox0dea: It's not good encapsulation.
[08:50:25] ljarvis: Ox0dea: please dont
[08:50:25] _blizzy_: sure thing, Ox0dea
[08:50:25] shevy: people are never happy with poor _blizzy_ :(
[08:50:26] sevenseacat: I genuinely bust out laughing then
[08:50:33] adaedra: what is happening here
[08:50:41] adaedra: did someone set us up the bomb?
[08:50:42] _blizzy_: >> emotion = "happy"; happy
[08:50:43] ruboto: _blizzy_ # => undefined local variable or method `happy' for main:Object (NameError) ...check link for more (https://eval.in/388011)
[08:50:43] shevy: adaedra we are talking about ruby :>
[08:50:55] _blizzy_: oh well, lol.
[08:51:02] [k-: >> -> (h) { p h }.('happy')
[08:51:03] ruboto: [k- # => "happy" ...check link for more (https://eval.in/388012)
[08:51:12] shevy: that feels so wrong
[08:51:37] shevy: actually now that we have ->, can we also have <- ?
[08:51:40] sevenseacat: your f..... wait I'm being nice arent I
[08:51:43] commondream: has joined #ruby
[08:51:47] sevenseacat: ACTION puts on good-girl hat
[08:51:56] shevy: no, wear the cat hat
[08:52:04] sevenseacat: shevy: the good-girl hat has cat ears on it
[08:52:04] Ox0dea: sevenseacat: You've really demonstrated remarkable patience during this episode.
[08:52:14] shevy: yah but girls are evil, cats are not!
[08:52:19] sevenseacat: Ox0dea: i am not known for being a patient person, so thank you.
[08:52:34] _blizzy_: sorry, sevenseacat.
[08:52:45] sevenseacat: girls arent evil ;_;
[08:52:47] Ox0dea: shevy: What should <- do?
[08:52:48] _blizzy_: sorry to everyone else also.
[08:52:49] renderful: has joined #ruby
[08:52:51] sevenseacat: boys have cooties! so there
[08:53:02] shevy: Ox0dea good question... it should somehow relate to ->
[08:53:12] Ox0dea: Well, what is the opposite of a lambda?
[08:53:16] sevenseacat: makes output variables?
[08:53:26] sevenseacat: -> (in) { out = stuff; } (out) <-
[08:53:29] anne-marie_: hello there ! i need some help with active record on a sinatra web app. Any one here familiar with this gem ?
[08:53:47] Ox0dea: sevenseacat: The < part would need a receiver, and the argument would have to have a unary minus method.
[08:54:00] jhass: ?anyone anne-marie_
[08:54:01] ruboto: anne-marie_, Just ask your question, if anyone has or can, they will respond.
[08:54:09] ruboto: sevenseacat # => false (https://eval.in/388014)
[08:54:09] ljarvis: ?ask anne-marie_
[08:54:10] ruboto: anne-marie_, Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
[08:54:50] shevy: jhass type faster!
[08:55:31] Ox0dea: >> class Hash; alias < merge; alias -@ invert end; {a: 1} <- {b: 2}
[08:55:32] ruboto: Ox0dea # => {:a=>1, 2=>:b} (https://eval.in/388015)
[08:55:51] annette: has joined #ruby
[08:56:07] ljarvis: my brain seriously messed up parsing `alias < merge` on the first pass for some reason
[08:56:26] anne-marie_: well, my problem is that when i run the task $rake db:create the .env is not loaded. I've created my own rake tasks and don't have problems. I don't have problems too with the pg gem.
[08:56:44] ljarvis: anne-marie_: .env is a file?
[08:57:01] anne-marie_: the $rake db:create create a database with the wrong owner.
[08:57:19] anne-marie_: yes .env is a file and i use the 'dotenv' gem
[08:57:37] ljarvis: anne-marie_: and you load dotenv in your rakefile?
[08:58:37] _blizzy_: to everyone, sorry about saying "this shows the ruby community"
[08:58:55] Oog: has joined #ruby
[08:59:03] annette: has left #ruby: ()
[08:59:15] anne-marie_: my Rakefile looks like this https://gist.github.com/annemarie35/6d1badc2b3dd42685490
[08:59:51] codecop: has joined #ruby
[08:59:58] einarj: has joined #ruby
[09:00:01] n008f4g_: has joined #ruby
[09:00:36] _blizzy_: dear #ruby: SOrry that we all got off on the wrong foot. I dearly am sorry for what I said. I hope we can start off on the right foot, or, if you like, the left foot.
[09:00:36] ljarvis: anne-marie_: so, what env variable is not being set? the database name?
[09:01:34] sandstrom: has joined #ruby
[09:02:50] eGGsha: has joined #ruby
[09:03:30] apeiros: _blizzy_: appreciated
[09:04:04] anne-marie_: ljarvis> ENV['DATABASE_USER_NAME'] & ENV['DATABASE_PASSWORD'] the database name is written in the database.yml
[09:04:12] towski_: has joined #ruby
[09:04:58] tubuliferous_: has joined #ruby
[09:05:26] _blizzy_: apeiros, ok, thanks. :)
[09:05:29] _blizzy_: again sorry everyone.
[09:05:43] ljarvis: anne-marie_: but, your database setup is reading from database.yml which isn't being written to with the new env variables
[09:06:22] krz: has joined #ruby
[09:08:01] OrbitalKitten: has joined #ruby
[09:08:07] senayar: has joined #ruby
[09:08:07] senayar: has joined #ruby
[09:08:52] Scrofff: has joined #ruby
[09:09:15] Igorshp: has joined #ruby
[09:09:34] husanu4: has joined #ruby
[09:10:05] User458764: has joined #ruby
[09:10:09] AlexRussia: has joined #ruby
[09:10:25] sulky: has joined #ruby
[09:10:32] anne-marie_: ljarvis: that's the point... Maybe i just will write the username in the database.yml ^^ like in this example https://github.com/simplonco/simplonline/blob/dev/config/database.yml i don't if it's a good practice
[09:13:04] roolo: has joined #ruby
[09:14:12] Igorshp: has joined #ruby
[09:14:24] aapole: has joined #ruby
[09:14:37] ljarvis: anne-marie_: The username is fine, the password you don't really want to check into version control unless it's private (and even then you need to be careful)
[09:17:01] arutemu: has joined #ruby
[09:17:03] Dopagod: has joined #ruby
[09:18:11] Zai00: has joined #ruby
[09:18:29] tvw: has joined #ruby
[09:18:40] khebbie: has joined #ruby
[09:19:10] sdothum: has joined #ruby
[09:19:17] anne-marie_: ljarvis: ok, thanks ! i have in mind since 4 days that the username must to be hidden for security reason (i'm a ruby newbie) ^^
[09:19:53] allomov: has joined #ruby
[09:20:32] towski_: has joined #ruby
[09:20:35] allomov: has joined #ruby
[09:23:18] husanu3: has joined #ruby
[09:24:12] sandstrom: has joined #ruby
[09:25:04] giuseppesolinas: has joined #ruby
[09:25:05] iateadonut: has joined #ruby
[09:25:14] dgutierrez1287: has joined #ruby
[09:26:18] Ox0dea: jhass: Have you defined lots of aliases?
[09:26:52] langlands: has joined #ruby
[09:27:26] jhass: maybe 5 I frequently use
[09:27:38] Ox0dea: $ shuf -n1 <(alias)
[09:27:41] ghostpl: has joined #ruby
[09:28:07] jhass: just 14 in my .zshrc with a couple being nocorrect/noglob stuff
[09:28:12] multi_io: has joined #ruby
[09:28:34] iateadonut: how can i use an iteration of a loop as a key name in a hash?
[09:28:36] iateadonut: file.split.uniq.each { |word| words = {:word=>1} }
[09:29:02] iateadonut: i want to use the output |word| as :word
[09:29:43] User458764: has joined #ruby
[09:29:50] Ox0dea: iateadonut: You probably don't. Do you know that Hashes can have default values?
[09:30:30] Ox0dea: >> foo = Hash.new(1); foo[:a] += 1; [foo[:a], foo[:b]]
[09:30:31] ruboto: Ox0dea # => [2, 1] (https://eval.in/388042)
[09:31:38] iateadonut: i'm trying to break down a paragraph and count the number of occurrences of each word.
[09:32:02] agent_white: has joined #ruby
[09:32:15] iateadonut: so i was going to have a hash like this: words = { :word1=>1 , :word2=>3, ... }
[09:32:31] jhass: iateadonut: don't use symbol keys there, simply use the word as key (as string)
[09:32:36] agent_white: Good moreve folks!
[09:32:38] jhass: and Hash.new(0)
[09:32:59] [k-: you probably do not want symbols here...
[09:33:05] iateadonut: ok. thanks for your patience.
[09:33:06] jhass: counts = Hash.new(0); file.split.uniq.each {|word| counts[word] += 1 }
[09:33:12] RegulationD: has joined #ruby
[09:33:27] ljarvis: .uniq + counting
[09:33:31] ljarvis: isn't going to work out so well
[09:33:40] jhass: right, mindlessly copied their example, my bad
[09:33:42] iateadonut: yes, you're right.
[09:33:43] [k-: I missed that :p
[09:33:57] Ox0dea: >> 'this test is a test'.split.reduce(Hash.new(0)) { |h, w| h[w] += 1; h }
[09:33:59] ruboto: Ox0dea # => {"this"=>1, "test"=>2, "is"=>1, "a"=>1} (https://eval.in/388047)
[09:34:07] ljarvis: Ox0dea: each_with_object
[09:34:14] ljarvis: reduce with ; is smell for me
[09:34:17] Ox0dea: So wordy, though.
[09:34:49] [k-: I like reduce <3
[09:35:04] Ox0dea: I just wish it were called #fold.
[09:35:30] [k-: there is inject...
[09:35:32] mikecmpbll: was minitest taken out of the stdlib in ruby 2.2?
[09:35:37] ljarvis: mikecmpbll: no
[09:35:47] mikecmpbll: ack, i thought not. i can't find it in the docs
[09:36:00] mikecmpbll: http://ruby-doc.org/stdlib-2.2.2/
[09:36:32] [k-: submit a alias request!
[09:36:51] iateadonut: what is that extra h at the end?
[09:37:06] iateadonut: h[w] += 1; h } - what does that last h do?
[09:37:09] invite: has joined #ruby
[09:37:19] [k-: that is the accumulator
[09:37:24] User458764: has joined #ruby
[09:37:28] ljarvis: iateadonut: reduce/inject expect the accumulator to be returned by the block
[09:37:31] [k-: reduce will use the return value of the block
[09:37:47] ljarvis: iateadonut: each_with_object(Hash.new(0)) { |i, h| h[i] += 1 } might make more sense
[09:38:27] [k-: reduce returns the final object, each does not!
[09:38:41] ljarvis: it's a style choice, really. Imo enforcing the return value to the non-expression in a reduce is a code smell and why each_with_object was created
[09:38:49] mikecmpbll: i think it was taken out of stdlib and just bundled with ruby as a gem
[09:39:00] Ox0dea: mikecmpbll: Yes, that's correct.
[09:39:02] ljarvis: mikecmpbll: right, that'd make sense
[09:39:15] mikecmpbll: Ox0dea: ok sweet, cheers.
[09:39:38] avril14th: has joined #ruby
[09:42:14] lolmaus: has joined #ruby
[09:42:39] shevy: one day the whole of ruby shall become gemified
[09:42:41] c-c: has left #ruby: ("ta!")
[09:42:56] shevy: just like debian does
[09:43:00] shevy: by removing mkmf by default :D
[09:43:03] [k-: hash.update({ "#{word}", 1 }) { |k, oldv, newv| oldv+newv }
[09:43:31] Ox0dea: [k-: Interpolation for giggles?
[09:43:32] iateadonut: how can i destroy a hash that is already there?
[09:43:43] Ox0dea: iateadonut: Define "destroy".
[09:43:45] ljarvis: iateadonut: destroy in what sense?
[09:43:54] shevy: iateadonut hash = Hash.new; hash = nil
[09:43:58] ringarin: has joined #ruby
[09:44:00] shevy: annihilate!
[09:44:16] [k-: hash.update({ "#{word}" => 1 }) { |k, oldv, newv| oldv+newv }
[09:44:17] apeiros: `kill -9 #$$`
[09:44:25] [k-: eliminate
[09:44:32] apeiros: hash will be gone with that. absolutely certain.
[09:44:35] iateadonut: apeiros, that's one way
[09:44:54] Ox0dea: ObjectSpace.each_object(Hash) { |h| h.replace({}) }
[09:44:54] iateadonut: a bit excessive IMHO
[09:44:59] apeiros: hash.clear # empty the array
[09:45:06] shevy: lol that comment is awesome
[09:45:06] dionysus69: has joined #ruby
[09:45:09] shevy: you did this on purpose!
[09:45:11] chris2: since when does #@ and #$ work?!?!
[09:45:21] apeiros: chris2: before you and I started ruby ;-)
[09:45:31] Ox0dea: chris2: Instance, class, and global variables can be interpolated without brackets.
[09:45:31] shevy: chris2 started when he was 8
[09:45:34] apeiros: s/array/hash/ (though, works for array too)
[09:45:40] ruboto: Ox0dea # => "22310" (https://eval.in/388051)
[09:45:50] ruboto: shevy # => "22315" (https://eval.in/388052)
[09:45:51] apeiros: hash = nil # reassign the variable - will not modify the hash, if you have it referenced elsewhere, it'll still be there
[09:45:53] iateadonut: i'm coming here from php. this is really different.
[09:46:10] shevy: iateadonut I see
[09:46:12] apeiros: iateadonut: I don't think it's different, no
[09:46:27] iateadonut: well, how can i do this with an existing hash?
[09:46:36] Ox0dea: Do hwhat?
[09:46:37] apeiros: except for that one case where in php I think you can pass in references to the variable itself
[09:46:48] shevy: iateadonut there are methods such as .update() but you don't really need to worry about terminating any object really
[09:46:58] iateadonut: yeah, i realized what i was doing wrong.
[09:47:00] doublemalt_: has joined #ruby
[09:47:06] iateadonut: as far as terminating the object.
[09:47:08] apeiros: iateadonut: how about you show us what you want to do? you know, like with code. because we answered your question and you seem to be still unclear???
[09:47:28] apeiros: oh??? destroy in the GC sense
[09:47:34] Ox0dea: mikecmpbll: Is there such a thing?
[09:47:35] shevy: you can have fun with the garbage collector like GC.enable or GC.start to some degree, but I have not really had a use case for it myself
[09:47:35] mikecmpbll: ACTION just guessing
[09:47:43] tkuchiki: has joined #ruby
[09:47:44] iateadonut: this works: file.split.each_with_object(Hash.new(0)) { |word, words| words[word] += 1; word }
[09:47:46] mikecmpbll: Ox0dea: no clue, i would guess it's possible? my ruby-fu is weak
[09:47:53] apeiros: but that's indeed the same as in php
[09:47:56] shevy: iateadonut \o/
[09:48:04] shevy: but shorter!
[09:48:13] apeiros: iateadonut: php too will GC when nothing references the object anymore. ruby does the same.
[09:48:14] iateadonut: but what if i already have the hash 'words' and i want to run the script to update that hash?
[09:48:14] Ox0dea: mikecmpbll: I was only poking fun; manually collecting garbage tends to be called memory management.
[09:48:22] [k-: 'this test is a test'.split.reduce(Hash.new(0)) { |hash,word| hash.update({ "#{word}" => 1 }) { |k, oldv, newv| oldv+newv }
[09:48:29] shevy: iateadonut well .update?
[09:48:32] [k-: did I do it?
[09:48:37] apeiros: ACTION lunch time, cya folks
[09:48:47] shevy: may be easiest to try it in irb first
[09:48:56] iateadonut: i'm working in irb
[09:49:18] chris2: apeiros: its in 1.0 even. wow.
[09:49:24] jhass: iateadonut: then you pass the existing hash to each_with_object
[09:50:00] iateadonut: jhass, this does not seem to work: file.split.each_with_object( words ) { |word, words| words[word] += 1; word }
[09:50:10] iateadonut: words being the hash that already exists
[09:50:11] choke: has joined #ruby
[09:50:22] Oog: has joined #ruby
[09:51:16] Karpah: has joined #ruby
[09:51:23] Iskarlar: has joined #ruby
[09:51:26] jhass: iateadonut: "doesn't work" is an empty statement. Detail your expectations and the actual result
[09:51:54] tkuchiki: has joined #ruby
[09:52:03] iateadonut: i would think that words would be passed into the loop the same as before. instead i get an error: undefined method `[]' for nil:NilClass
[09:52:27] [k-: http://carc.in/#/r/5a4
[09:52:27] iateadonut: irb(main):072:0> words
[09:52:44] [k-: turrdurrr no code smell
[09:53:02] ljarvis: please do not use the code [k- just pasted
[09:53:16] jhass: iateadonut: words is not an existing hash, it's nil
[09:53:22] mandarinkin: has joined #ruby
[09:53:25] Ox0dea: [k-: You should learn about Object#tap, mate. :)
[09:53:44] [k-: ACTION tries it right away
[09:54:12] Ox0dea: >> 'this test is a test'.split.reduce(Hash.new(0)) { |h, w| h.tap { |h| h[w] += 1 } }
[09:54:13] ruboto: Ox0dea # => {"this"=>1, "test"=>2, "is"=>1, "a"=>1} (https://eval.in/388086)
[09:54:37] Ox0dea: It's really no better than explicitly returning the accumulator, but it satisfies Rubocop.
[09:55:00] ljarvis: and each_with_object was wordy
[09:55:51] Oog: has joined #ruby
[09:57:33] shock_one: has joined #ruby
[09:58:17] [k-: http://carc.in/#/r/5a6
[09:58:29] [k-: oh you did it
[09:58:38] [k-: it was a pain to do it in mobile
[09:58:50] Muhannad: has joined #ruby
[09:59:53] Ox0dea: I would imagine so.
[10:00:07] Ox0dea: Which keyboard do you use that makes that even remotely tolerable?
[10:00:29] soulcake: has joined #ruby
[10:00:52] [k-: Google keyboard
[10:00:59] [k-: it's good for general typing
[10:01:03] [k-: but not programming
[10:01:12] Muhannad: has joined #ruby
[10:01:20] OrbitalKitten: has joined #ruby
[10:01:32] adaedra: who programs on mobile
[10:01:34] Darkwater: Ox0dea, [k-: hacker's keyboard
[10:01:50] Darkwater: similar to stock (ics) keyboard, but for hackers :v
[10:01:50] [k-: elitists
[10:01:50] shevy: adaedra rockstar programmers!
[10:02:05] Darkwater: I at least use ssh on my phone
[10:02:17] Darkwater: and sometimes I want to show off, or do a little bit of zsh on the go
[10:02:20] shevy: I sing into my phone and have it produce code
[10:02:22] shevy: out came php
[10:02:38] Darkwater: you must be a terrible singer
[10:02:58] troulouliou_dev: has joined #ruby
[10:03:02] [k-: hahahah
[10:03:33] [k-: I can't have 5 rows!
[10:03:33] Muhannad: has joined #ruby
[10:03:35] Psy-Q: has joined #ruby
[10:04:07] Ox0dea: He was referring to Hacker's Keyboard.
[10:04:10] [k-: I can't have > 4
[10:04:27] Darkwater: then set it to 4
[10:04:46] endash: has joined #ruby
[10:06:09] jhass: or use minuum which has a single :P
[10:06:34] Muhannad: has joined #ruby
[10:08:13] msgodf: has joined #ruby
[10:08:40] chinmay_dd: has joined #ruby
[10:08:54] phutchins: has joined #ruby
[10:09:04] Muhannad: has joined #ruby
[10:09:29] konsolebox: has joined #ruby
[10:09:51] CloCkWeRX: has joined #ruby
[10:11:28] OrbitalKitten: has joined #ruby
[10:11:38] Muhannad: has joined #ruby
[10:11:39] [k-: phone.dying.good.bye
[10:12:50] startupality: has joined #ruby
[10:12:58] Al3ks: has joined #ruby
[10:13:00] Oog: has joined #ruby
[10:13:20] stamina: has joined #ruby
[10:13:21] konsolebox: i haven't noticed this much, but if i cast a return on a File.open block, would the opened file be closed or not?
[10:13:53] negev: has joined #ruby
[10:14:03] Muhannad: has joined #ruby
[10:14:11] fabrice31: has joined #ruby
[10:15:15] negev: hi, i've built a small rack application and for some reason all POST requests get redirected to GET. this is what i'm doing to run rackup: http://pastebin.com/Jjgu9XZ3 WebApp.call() is never called with a POST request, it's always redirected first.
[10:15:15] ruboto: negev, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/3eb6ed55afb6e0bf90f3
[10:15:16] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[10:16:30] Ox0dea: konsolebox: "Cast a return"?
[10:16:43] Muhannad: has joined #ruby
[10:17:01] konsolebox: Ox0dea: if i "execute" a "return" e.g. "return false" inside the block
[10:17:45] denver: has joined #ruby
[10:17:56] negev: nm fixed it
[10:18:20] jhass: konsolebox: yes
[10:18:25] Ox0dea: >> def foo; begin; return false; ensure; @ret = :ok; end end; foo; @ret
[10:18:26] ruboto: Ox0dea # => :ok (https://eval.in/388098)
[10:18:31] Ox0dea: konsolebox: ^
[10:18:33] commondream: has joined #ruby
[10:18:44] Ox0dea: Yes, ensure clauses are executed "no matter what".
[10:18:56] konsolebox: so "ensure" blocks return calls as well? i was thinking it's only for exceptions
[10:19:27] iateadonut: any o'reilly books you'd recommend i read to get started?
[10:19:46] Muhannad: has joined #ruby
[10:19:46] konsolebox: Ox0dea: if that's the case thank you,. that's what i needed to know
[10:19:50] iateadonut: i'm trying 'crash course' right now, but the exercise they gave me at the end of chapter 1 i couldn't figure out with just the book.
[10:20:00] iateadonut: and i still don't understand the solution y'all gave.
[10:20:15] astrobun_: has joined #ruby
[10:20:16] eGGsha: has joined #ruby
[10:20:27] rickmasta: has joined #ruby
[10:20:59] shevy: just take baby steps in ruby
[10:21:02] Shoutsid: has joined #ruby
[10:21:15] shevy: eventually it'll go "click" in the brain and it all falls together in a consistent and logical manner
[10:21:24] Ox0dea: For the most part. :)
[10:21:25] olistik: has joined #ruby
[10:22:06] chinmay_dd: has joined #ruby
[10:22:26] Muhannad: has joined #ruby
[10:23:41] chinmay_dd: has joined #ruby
[10:24:56] patrickanth0ny: has joined #ruby
[10:25:16] GPrime: has joined #ruby
[10:25:27] mdw: has joined #ruby
[10:25:35] Muhannad: has joined #ruby
[10:25:48] Iskarlar: has joined #ruby
[10:27:05] Shoutsid: has joined #ruby
[10:27:45] chinmay_dd: has joined #ruby
[10:28:42] Muhannad: has joined #ruby
[10:29:45] agent_white: http://www.twitch.tv/lw9k
[10:29:56] iateadonut: fair enough. upward and onward then.
[10:30:11] agent_white: Buddy o' mine from #learnprogramming is writing a gameboy emulator... in haskell. I have no idea wuts goin on.
[10:30:21] iateadonut: (i'll get the ruby cookbook after i'm finished with the rails crash course)
[10:30:39] agent_white: Let me know if you are interested in joining the mumble chat. I'd rather hear from experienced dewds than folks like mahself.
[10:31:15] atomical: has joined #ruby
[10:31:23] khebbie: has joined #ruby
[10:32:03] Muhannad: has joined #ruby
[10:32:30] shevy: iateadonut it's just like riding on a bicycle, the more code you write, the easier it'll all become; I also came from PHP btw, I even liked PHP more than perl strangely enough
[10:33:31] Iskarlar: has joined #ruby
[10:34:49] Darkwater: you saying that broke my brain
[10:35:08] lkba_: has joined #ruby
[10:35:09] gix: has joined #ruby
[10:35:15] Muhannad: has joined #ruby
[10:35:21] bruno-: has joined #ruby
[10:36:51] iateadonut: shevy, i've really liked laravel, and have found out that it borrowed most it's functionality from rails
[10:37:04] iateadonut: so i'm learning ruby - making myself more well-rounded
[10:37:50] agent_white: Well-chiseled"
[10:38:04] agent_white: Rubies are not round, but... ya know...
[10:38:23] Muhannad: has joined #ruby
[10:39:04] shevy: well rails is a bit different from ruby, in that you may see patterns used that may not be that common outside of rails
[10:39:23] shevy: I don't remember making use of things like :has_many and similar things much at all
[10:39:31] [k-: no one ever said ew perl
[10:39:44] [k-: all they said was ewwwwww java
[10:39:54] iateadonut: the model relationships were all borrowed in laravel eloquent
[10:39:56] Rubie: has joined #ruby
[10:39:56] [k-: and phone
[10:40:53] senayar: has joined #ruby
[10:41:01] _blizzy_: has joined #ruby
[10:41:33] iateadonut: there are basically no competing frameworks in ruby, right? everyone uses rails?
[10:41:42] tkuchiki: has joined #ruby
[10:42:37] jhass: sinatra is quite popular for smaller stuff
[10:42:42] jhass: and many new entries
[10:43:17] Scripore: has joined #ruby
[10:43:17] jhass: https://www.ruby-toolbox.com/categories/web_app_frameworks
[10:44:27] Oog: has joined #ruby
[10:44:58] bruno-: has joined #ruby
[10:45:00] Darkwater: for big mvc stuff there's rails, for smaller stuff there's sinatra
[10:45:04] Darkwater: I use both appropiately
[10:45:45] sevenseacat: then theres other newer options like lotus
[10:45:55] sevenseacat: but rails and sinatra are the big two
[10:46:24] ruu: has joined #ruby
[10:47:01] ljarvis: lotus is awesome
[10:47:38] sevenseacat: so I've heard
[10:48:36] rodferso1: has joined #ruby
[10:49:15] iateadonut: "Just like Jedi Knights build their own lightsabers, I think web developers should build their own personal websites" - "Rails Crash Course"
[10:49:26] Oog: has joined #ruby
[10:49:42] OrbitalKitten: has joined #ruby
[10:50:25] adaedra: lotus looks interesting
[10:51:03] ReD-BoY_: has joined #ruby
[10:51:33] moeSeth: has joined #ruby
[10:53:08] tubuliferous_: has joined #ruby
[10:56:09] sandstrom: has joined #ruby
[10:58:03] wildroman2: has joined #ruby
[10:58:12] mikecmpbll: it doesn't look much different to rails
[10:59:18] Hiall: has joined #ruby
[10:59:47] bertro: has joined #ruby
[11:01:23] mikecmpbll: i like that though, not trying to be different for the sake of it.
[11:02:35] apeiros: chris2: I think that's one of the things it copied from perl
[11:02:48] apeiros: at least I seem to remember that interpolation there worked somewhat similar
[11:03:00] apeiros: damn, almost 20y since I did perl :-S
[11:03:34] adaedra: ahah, you're old
[11:03:59] apeiros: I existed before time, not sure "old" applies :-p
[11:04:25] bertro: ruby is written in c/perl/ruby for the most part right?
[11:04:30] apeiros: sadly, that's not a property of the apeiron :(
[11:04:35] kies: has joined #ruby
[11:04:46] apeiros: bertro: MRI is implemented in C
[11:05:03] skade: has joined #ruby
[11:05:07] apeiros: and the core libs for MRI are implemented in C too. the stdlib is written in ruby & C
[11:06:09] bertro: and perl serves the purpose of gluing some bits together?
[11:06:36] apeiros: if there's any perl in ruby's source, then I'd assume in build scripts
[11:07:04] michael_mbp: has joined #ruby
[11:07:42] Xzanron: has joined #ruby
[11:08:35] mikecmpbll: i don't see any perl ..
[11:08:45] apeiros: I see some perl
[11:08:48] apeiros: in benchmark and sample
[11:08:50] bertro: i had some pass me by
[11:09:04] apeiros: so no, no perl used in building ruby either.
[11:09:58] mikecmpbll: ah, just wasn't in top 10
[11:10:34] bertro: could we generalize that besides c and ruby other languages if used aren't used with some serious purpose in mind (the modules could be written in whatever else)
[11:11:35] apeiros: bertro: we can simply say that MRI is written in C.
[11:11:56] apeiros: and if you consider stdlib, then there's also ruby.
[11:14:11] DaniG2k: has joined #ruby
[11:14:52] Bertg: has joined #ruby
[11:15:56] nfk: has joined #ruby
[11:17:39] diegoviola: has joined #ruby
[11:19:55] ndrei: has joined #ruby
[11:20:31] CloCkWeRX: has left #ruby: ()
[11:22:07] RegulationD: has joined #ruby
[11:23:26] hoov: has joined #ruby
[11:24:23] sgambino: has joined #ruby
[11:26:07] astrobunny: has joined #ruby
[11:26:37] phutchins: has joined #ruby
[11:28:09] shevy: huh weird... I thought there exists a File.empty? method ...
[11:28:47] shevy: apparently it is File.zero? hmmm
[11:30:08] shevy: apeiros are you familiar with all html5 tags btw? :)
[11:30:52] shevy: first time I am seeing <figure> and <figcaption>, wondering whether ruby-cgi should support these too
[11:31:02] apeiros: no, I only know a couple of them yet
[11:37:41] ndrei: has joined #ruby
[11:38:47] Iskarlar: has joined #ruby
[11:40:47] senayar: has joined #ruby
[11:40:47] senayar: has joined #ruby
[11:44:17] jenrzzz: has joined #ruby
[11:44:49] otisZart: has joined #ruby
[11:44:59] bertro: what motivated the creation of ruby?
[11:45:42] sevenseacat: matz wanted something that made programmers happy.
[11:46:05] flughafen: lsd make programmers happy
[11:46:09] ldnunes: has joined #ruby
[11:46:25] adaedra: Lucy in the sky with diamonds ???
[11:46:33] Versality: has joined #ruby
[11:46:55] djellemah: bertro: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/382
[11:47:50] bertro: maybe to move the main criterion to ~programmer eficacy~
[11:48:11] bertro: as a philosophical shift of paradigm
[11:48:38] chris2: apeiros: perl didnt need # at all, tho :)
[11:48:51] bronson: has joined #ruby
[11:49:36] apeiros: chris2: I know. but didn't it have another sigil?
[11:49:43] shevy: bertro there is a great talk from matz about it
[11:49:49] shevy: but it's in japanese english
[11:49:51] chris2: no, just "$foo @bar"
[11:49:53] annette: has joined #ruby
[11:50:16] [k-: Programmer efficiency? Java is at the bottom of that
[11:50:26] apeiros: chris2: damn, I really don't remember.
[11:50:33] charliesome: has joined #ruby
[11:50:43] ruu: has joined #ruby
[11:50:49] bertro: [k-: java is aimed for manager efficacy lol :D
[11:51:09] shevy: bertro it is a 1 hour video, but only the first ~45 minutes are about the past when matz started out; you will also see pics from when he was younger, he looked like a mini-samurai when he was young: https://www.youtube.com/watch?v=bqWBB8-iEac
[11:51:24] bertro: thank you
[11:51:30] bertro: i'll check it out
[11:51:45] shevy: he explained that "programmer happiness" was not initially an integral part of ruby, as a term, when he started it
[11:52:35] terlar: has joined #ruby
[11:53:19] shevy: the first design happened on paper :)
[11:55:17] Xeago: has joined #ruby
[11:56:19] shock_one: has joined #ruby
[11:58:38] OrbitalKitten: has joined #ruby
[11:58:59] bradgriffin: has joined #ruby
[12:00:36] sulky: has joined #ruby
[12:03:39] mikecmpbll: everytime i have to do something with minitest that i think is going to be difficult, it's pathetically easy <3
[12:03:46] sinkensabe: has joined #ruby
[12:03:50] roolo_: has joined #ruby
[12:03:51] jas02: has joined #ruby
[12:04:50] shevy: try to cook chicken with minitest
[12:05:07] mikecmpbll: shevy: hmm, i'm sure it's possible :D
[12:05:16] shevy: minichicken
[12:05:33] krz: has joined #ruby
[12:08:23] arup_r: has joined #ruby
[12:08:56] sankaber: has joined #ruby
[12:10:17] nateberkopec: has joined #ruby
[12:11:57] chussenot: has joined #ruby
[12:12:45] aapole: has joined #ruby
[12:14:30] kstuart: has joined #ruby
[12:14:35] jschoolcraft: has joined #ruby
[12:14:56] rodferso1: has joined #ruby
[12:15:49] eGGsha: has joined #ruby
[12:16:13] jenrzzz: has joined #ruby
[12:17:13] maasha: has joined #ruby
[12:17:49] ytti: can someone recommend invoicing website for small business?
[12:20:21] maasha: Anyone have experience executing a ruby script through qsub from within the ruby script?
[12:20:52] Papierkorb: has joined #ruby
[12:21:30] jhass: Qsub submits batch jobs to the Sun Grid Engine queuing system.
[12:22:07] Zai00: has joined #ruby
[12:22:30] maasha: jhass: yup, but qsub is ugly. I want it abstracted away to you call a ruby script with a few arguments and behind the scene this ruby script is run through qsub.
[12:23:06] [k-: Get a shell script then...
[12:23:26] maasha: And I dont want to maintain multiple scripts to run a command.
[12:24:23] jhass: well I guess you could check ARGV and submit and call exit in one case and don't in the other
[12:24:30] shevy: maasha the way I solve such usually; I have one main .rb file, with methods, which will call different classes that do the specific job at hand. that way I can avoid having to use shell scripts, every action is registered somewhere (usually through said method call, towards a class)
[12:25:00] aspiers: has joined #ruby
[12:25:01] maasha: shevy: can you show a demo?
[12:25:12] shevy: maasha hmm let me think of a good example... a moment
[12:27:14] maloik: Does anyone here run an app that uses elasticsearch with the possibility to search across different models? I'm wondering if you could explain briefly how it's all set up (different indexes? nested objects? elasticsearch-ruby and custom code or another gem?), and if you have any tips on where to get started other than ES docs and the gem's docs
[12:28:16] shevy: maasha ok this is contrived, and not an ideal example but you get the general idea http://pastie.org/10260134 - that method just merges together different exam-results, into a new .pdf file; from the commandline I would invoke it via "prepare_exams"
[12:28:54] shevy: (there was only one .pdf file in the respective directory at hand, hence the .first)
[12:29:15] Al3ks: has joined #ruby
[12:29:24] shevy: that's by the way one reason why I end up with so many aliases, every task gets registered :)
[12:29:37] MaciejCzyzewski: has joined #ruby
[12:29:43] [k-: you have a typo
[12:30:07] sinkensabe: has joined #ruby
[12:30:07] adaedra: yaeh, you haev a tyop
[12:30:21] [k-: also, .store_at store_here isn't idiomatic
[12:30:24] maasha: shevy: and how does the .run method work?
[12:30:33] MaciejCzyzewski: what's new? folks ;)
[12:30:39] [k-: should be store_at this_dir instead
[12:30:46] shevy: that is also a reason why I don't seem to need rake at all, I just call the respective actions from the commandline
[12:31:00] jhass: maciejczyzewski: you
[12:31:34] shevy: maasha ah that is just my general way to invoke my classes, it's nothing special. you could do things differently, the main point is that I don't necessarily need to have individual shell files (or .rb files), I just re-use general classes in ruby; in this case, it's really nothing more than using ghostscript
[12:31:47] shevy: though I'd love to know how to do this in prawn, haven't tried yet
[12:31:51] [k-: you should get auto aliasing like what gems with cli do
[12:31:57] MaciejCzyzewski: jhass: aaawwww... in ruby world
[12:31:59] shevy: auto aliasing?
[12:32:01] [k-: or not auto aliasing
[12:32:17] jhass: maciejczyzewski: I guess the answer stays the same ;P
[12:32:22] shevy: what happens when conflict-names exist?
[12:32:23] [k-: their executables are linked and searched for!
[12:32:34] Xeago: has joined #ruby
[12:32:54] maasha: shevy: right, thanks
[12:32:55] shevy: ah, I don't have that many bin/name.rb or bin/name specific files for ruby projects, usually only one central main bin/ file to use a given project
[12:33:06] astrobunny: has joined #ruby
[12:34:16] shevy: maasha anyway, you wrote "dont want to maintain multiple scripts to run a command" and that was the reason I suggested the above; you can register methods in a .rb file, and just call that; the method delegates to any class or other .rb file at hand, which then goes to solve the problem at hand that you may have
[12:34:58] shevy: you can call a specific method in a .rb file via "-e"; I use a general method call for that, "rinvoke"
[12:35:36] shevy: which is essentially just a ruby -r blablabla.rb -e NAME_OF_METHOD_HERE (the last part I can type on bash, or use that specific alias at hand)
[12:36:02] chouhoulis: has joined #ruby
[12:36:25] agent_white: That's pinky-up fancy.
[12:37:54] [k-: you can also get a list of commands using `self.class.instance_methods - Object.instance_methods`!
[12:38:05] griffindy: has joined #ruby
[12:38:46] [k-: "commands" as in methods :/
[12:38:47] sulky: has joined #ruby
[12:38:56] meph: has joined #ruby
[12:39:13] Scripore: has joined #ruby
[12:39:14] Ox0dea: has joined #ruby
[12:39:23] Xeago: has joined #ruby
[12:39:33] shevy: cool I just checked if prawn can merge .pdf files
[12:39:41] TheHodge: has joined #ruby
[12:39:56] Ox0dea: Heh: http://ideone.com/pRj2Pc
[12:40:08] shevy: I found a clumsy old script from 2012; not sure if it works but it might work https://gist.github.com/shevegen/3afb736add4e1148d41a
[12:40:20] Ox0dea: I genuinely believe Float#times should exist, irrespective of its non-deterministicism.
[12:40:50] agent_white: Commands as in spoken by Thor garnished in white robes contruing plants to abolish the Kraken.
[12:41:14] eGGsha: has joined #ruby
[12:41:15] tubuliferous_: has joined #ruby
[12:41:25] agent_white: s/plants/plans/ ... though my bonzai tree could be a worthy opponent.
[12:41:45] agent_white: ACTION checks watch, falls asleep standing
[12:41:45] Ox0dea: agent_white: And "contruing"?
[12:41:45] Xzanron: has joined #ruby
[12:42:11] agent_white: Ox0dea: Exactly!
[12:42:27] agent_white: Ox0dea: ... my fingers are not working at this hour, apparently. :(
[12:42:47] agent_white: Rather my mind.
[12:42:56] chussenot: has joined #ruby
[12:44:16] senayar: has joined #ruby
[12:44:16] senayar: has joined #ruby
[12:44:59] sinkensabe: has joined #ruby
[12:46:13] Beoran__: has joined #ruby
[12:46:19] [k-: construing?
[12:46:29] swills: has joined #ruby
[12:47:04] shevy: agent_white dudes in white robes construct plants? is that why you are an agent... of botany?
[12:47:08] sinkensabe: has joined #ruby
[12:47:19] [k-: dun dun duuuuuuun
[12:47:24] atom3: has joined #ruby
[12:47:30] commondream: has joined #ruby
[12:47:41] [k-: identity exposed!
[12:48:28] soulcake: has joined #ruby
[12:48:54] agent_white: shevy: I wish. I think I killed my bonzai tree :(
[12:50:07] diegoviola: curl: (51) SSL: no alternative certificate subject name matches target host name 'demo360.neoassist.com'
[12:50:12] T3: has joined #ruby
[12:50:17] diegoviola: I'm getting this when I'm trying to curl some json file
[12:50:27] diegoviola: I get this from ruby too
[12:50:31] havenwood: has joined #ruby
[12:50:56] DaniG2k: has joined #ruby
[12:51:02] yorickpeterse: looks like a broken SSL certificate
[12:51:28] diegoviola: yorickpeterse: I don't get that when trying to access the file from firefox
[12:51:33] ruu: has joined #ruby
[12:52:19] theery: has joined #ruby
[12:52:22] Iskarlar: has joined #ruby
[12:52:44] Scripore: has joined #ruby
[12:53:00] RegulationD: has joined #ruby
[12:53:02] tlarevo: has joined #ruby
[12:53:05] jhass: diegoviola: maybe your FF uses a proxy that changes how the host reacts or is resolved?
[12:53:22] jhass: anyway, unreachable from here so can't debug
[12:53:48] diegoviola: jhass: I'm not using any proxy on firefox
[12:53:52] invite: has joined #ruby
[12:54:06] Ox0dea: has left #ruby: ("WeeChat 1.3-dev")
[12:54:22] yorickpeterse: diegoviola: different browsers can use different certificate chains
[12:54:38] jhass: it's not a signature validation error
[12:54:40] yorickpeterse: of which some might consider this certificate valid while others might not
[12:54:43] jhass: it's a subject mismatch
[12:55:25] jhass: diegoviola: maybe your curl (or rather your openssl) is ancient and doesn't do SNI?
[12:55:46] thelastinuit: has joined #ruby
[12:56:14] diegoviola: http://sprunge.us/dXQA
[12:56:32] x44x45x41x4E: has joined #ruby
[12:56:54] jhass: that it responds at all to a TLS session on port 80 is...
[12:57:15] diegoviola: jhass: I doubt that's the case, the ancient comment
[12:57:29] diegoviola: this was working yesterday, they messed something up
[12:57:35] jhass: you're the only one who can verify
[12:57:45] jhass: but wth port 80?
[12:57:56] diegoviola: I have no idea about that
[12:58:52] diegoviola: it's a web server that responds with json data, normally that would be on port 80, no? or what are you referring to?
[12:59:01] jhass: no it wouldn't
[12:59:04] jhass: http default port is 80
[12:59:10] jhass: https default port is 443
[12:59:53] diegoviola: you're right
[13:00:56] diegoviola: I get the same cert error when I hit it with :443
[13:01:11] diegoviola: I'll bother my coworkers about it
[13:01:11] Hiall: has joined #ruby
[13:01:25] NeverDie: has joined #ruby
[13:02:47] revoohc: has joined #ruby
[13:02:59] riotjones: has joined #ruby
[13:04:37] B1n4r10: has joined #ruby
[13:04:41] xKraty: has joined #ruby
[13:04:42] Xiti`: has joined #ruby
[13:04:57] Soda: has joined #ruby
[13:09:20] tubuliferous_: has joined #ruby
[13:10:01] Santana: has joined #ruby
[13:10:19] Iskarlar: has joined #ruby
[13:10:21] startupality: has joined #ruby
[13:11:18] sphex: has joined #ruby
[13:11:18] chinmay_dd: has joined #ruby
[13:12:46] solars: has joined #ruby
[13:14:53] jlast: has joined #ruby
[13:16:32] Oldenborg: has joined #ruby
[13:16:34] cpruitt: has joined #ruby
[13:16:57] jenrzzz: has joined #ruby
[13:19:04] michael_mbp: has joined #ruby
[13:19:09] fabrice31: has joined #ruby
[13:19:17] wildroman2: has joined #ruby
[13:20:43] Miphix: has joined #ruby
[13:22:12] towski_: has joined #ruby
[13:23:01] malconis: has joined #ruby
[13:23:28] fabrice31: has joined #ruby
[13:23:45] malconis: has joined #ruby
[13:24:43] centrx: has joined #ruby
[13:25:03] voker57: has joined #ruby
[13:26:09] ohgm: has joined #ruby
[13:26:45] ledestin_: has joined #ruby
[13:27:49] gagrio_: has joined #ruby
[13:28:00] jzigmund: has joined #ruby
[13:29:09] Rubie: has joined #ruby
[13:29:18] msnyon: has joined #ruby
[13:29:42] sandstrom: has joined #ruby
[13:31:24] Xeago: has joined #ruby
[13:33:02] hectorsq: has joined #ruby
[13:33:51] jerius: has joined #ruby
[13:34:14] jzigmund: has joined #ruby
[13:34:24] flughafen: ACTION is leaving, havve a good one
[13:35:17] acke: has joined #ruby
[13:35:17] shevy: flughafen stay in Berlin man, it needs you!
[13:35:34] flughafen: scotland needs planes too
[13:35:45] rickmasta: has joined #ruby
[13:35:48] agent_white: And whoever was in Greece shevy spoke of... bring us falafels.
[13:35:57] [k-: but your a airport
[13:35:59] dblessing: has joined #ruby
[13:36:26] t0rrieri: has joined #ruby
[13:36:31] blue_deref: has joined #ruby
[13:37:33] Tau: has joined #ruby
[13:37:33] djellemah_: has joined #ruby
[13:38:49] lolmaus: has joined #ruby
[13:39:27] vondruch: has joined #ruby
[13:39:45] shevy: flughafen scotland needs more ruby
[13:39:49] shevy: I never saw a ruby coding scot
[13:41:55] serivich: has joined #ruby
[13:42:07] Tau: how many ' ' spaces should i use in ruby programs?
[13:42:18] ItSANgo: has joined #ruby
[13:42:19] Tau: i have been using four spaces as i usually use with python.
[13:42:20] endash: has joined #ruby
[13:42:32] agent_white: Tau: 2 space indentation is the coding standard for Ruby.
[13:42:35] hinbody: has joined #ruby
[13:42:47] Tau: i honestly prefer four..
[13:42:56] Tau: it lets the code look better.
[13:43:04] ljarvis: Tau: then use 4
[13:43:05] agent_white: Well... as long as you don't use tabs we can be friends.
[13:43:06] commondream: has joined #ruby
[13:43:14] Tau: agent_white heh. okay.
[13:43:27] devdazed: has joined #ruby
[13:44:08] mary5030: has joined #ruby
[13:45:20] gagrio_: has joined #ruby
[13:45:23] mary5030: has joined #ruby
[13:45:40] senayar: has joined #ruby
[13:45:40] senayar: has joined #ruby
[13:47:54] [k-: shevy, adaedra requests for your presence in #ruby-offtopic
[13:48:07] adaedra: no I didn't
[13:48:11] startupality: has joined #ruby
[13:48:26] shevy: do we have to get married if I go there
[13:48:44] [k-: if you want
[13:48:48] shevy: also they play unicode hangman there and I can not read it :(
[13:48:54] andywojo: has joined #ruby
[13:49:03] [k-: <adaedra> [k-: shevy, I know it's you
[13:49:06] agent_white: shevy: BATCH dun yew play run-round wif me.
[13:49:15] agent_white: ACTION snaps fingers, wobbles head
[13:49:24] [k-: he can't see the blanks :(
[13:49:26] shevy: [k- has become a brother to me, despite the weird nick
[13:49:31] bronson: has joined #ruby
[13:49:46] agent_white: [k-: EY GURRRL
[13:50:04] datanoise: has joined #ruby
[13:50:13] shevy: I am stuck in reviewing some code.. my own ruby code... old code ... which is boring. someone cheer me up
[13:50:25] skyrocker: has joined #ruby
[13:50:28] [k-: shevy, switch to DejaVu!
[13:50:29] andywojo: Anyone know what the right approach would be to write a method that creates a key=>val pair out of commands that have close (enough) collumns like df -m
[13:50:31] voker57: has joined #ruby
[13:50:35] havenwood: shevy: It's Friday!
[13:50:51] skyrocker: has left #ruby: ()
[13:50:56] Xeago: has joined #ruby
[13:51:08] stanc: has joined #ruby
[13:51:13] andywojo: I could split by white space, and then loop through the array to determine where the header is placed, and then figure out where the value is
[13:51:23] dfockler: has joined #ruby
[13:51:41] agent_white: havenwood: Is it 5 o'clock yet?!
[13:51:53] dviola: It's funny and weird at the same time how my boss screams "HE USES LINUX!" to the other developers
[13:52:03] dviola: referring to me
[13:52:09] havenwood: agent_white: Soon enough I can taste it, but yeah closer to the AM 5 here.
[13:52:18] ruu: has joined #ruby
[13:52:35] [k-: it's GNU/Linux and not Linux!
[13:52:46] adaedra: andywojo: like that? ["/dev/disk0s2", "190683", "42317", "148116", "23%", "10897194", "37917756", "22%", "/"]
[13:52:47] agent_white: havenwood: nearly 8am here. Did I break the rules? /me burps and stumbles
[13:53:05] adaedra: ah wait, this is single line
[13:53:09] iateadonut: shevy, see how much you've grown since you wrote that pile of crap!
[13:53:09] havenwood: agent_white: It's 5 o'clock somewhere!
[13:53:27] andywojo: but with the headers. Basically I'm writing a script a script to parse df -m from both AIX and Linux.. the free column is in $3 on AIX and $4 on Linux
[13:53:28] [k-: it's 10pm here!
[13:53:48] [k-: it's GNU/Linux and not Linux!
[13:53:54] andywojo: but they are both the free space, if I just had a bobo method to parse any header => value from a string that'd be awesome
[13:54:02] RegulationD: has joined #ruby
[13:54:10] iateadonut: yeah. he should say, "His set of POSIX-compliant tools use the linux kernel!"
[13:54:11] [k-: they wrote a bot on reddit
[13:54:15] [k-: but it got banned
[13:54:19] adaedra: andywojo: better? {"Filesystem"=>"/dev/disk0s2", "1M-blocks"=>"190683", "Used"=>"42317", "Available"=>"148116", "Capacity"=>"23%", "iused"=>"10897193", "ifree"=>"37917757", "%iused"=>"22%", "Mounted"=>"/", "on"=>nil}
[13:54:22] axl_: has joined #ruby
[13:54:26] [k-: hehehe, it corrected Linux
[13:54:27] andywojo: that's perfect!
[13:54:32] adaedra: meh, mounted on got split
[13:54:34] agent_white: havenwood: Amen! /me adds whiskey to his coffee
[13:54:55] adaedra: andywojo: hope you don't get columns with space in their name
[13:55:04] andywojo: Nah that's fine, I can handle that
[13:55:12] andywojo: Just kinda wasn't sure what direction to go on doing it
[13:55:17] khebbie: has joined #ruby
[13:55:40] adaedra: andywojo: read the first line, split in pieces to get an array of column. Then, for each line, do the same, use Array#zip and Array#to_h to get the Hash
[13:56:00] iateadonut: singapore! that's a great city-state!
[13:56:20] andywojo: Learn something new every day, never used .zip before.
[13:56:35] poguez_: has joined #ruby
[13:56:40] iateadonut: I'd say it's the best in the world, but I can't think of anything to compare it to
[13:56:46] adaedra: andywojo: :)
[13:56:51] [k-: I think Ruby inherited zip from functional languages
[13:56:55] iateadonut: Jane Jacobs compared it to Seoul and Taipei, though.
[13:58:59] Iskarlar: has joined #ruby
[13:59:27] coderhs: has joined #ruby
[14:00:01] mistnim: has joined #ruby
[14:00:36] pengin: has joined #ruby
[14:00:40] mistnim: can I somehow use python libraries in ruby?
[14:02:07] apeiros: mistnim: short answer: no
[14:02:33] adaedra: long answer: nooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
[14:02:34] jhass: mistnim: long answer: you can shell out to python. But don't, seek native alternatives
[14:03:01] rbowlby: has joined #ruby
[14:03:01] apeiros: well, my long answer would be: isn't there a ruby implementation in python? and/or other way round?
[14:03:13] andywojo: I used a native alternative it was a gem that allowed you to use python code .. it was horrible
[14:03:20] apeiros: also python on jvm - if it exists - might be a way to get there
[14:04:05] apeiros: iow, there might be ways. but it's almost certainly pain.
[14:04:16] apeiros: hence - short answer: no.
[14:04:45] havenwood: Topaz in RPython
[14:05:01] shock_one: has joined #ruby
[14:05:03] Xeago: has joined #ruby
[14:05:24] havenwood: I've ported a little bit of Python to Ruby but never run any in Ruby.
[14:05:26] [k-: RuPy hasnt come up with a solution yet? :>
[14:05:32] ducklobster: has joined #ruby
[14:05:39] havenwood: Didn't _why have something fun along those lines?
[14:05:42] rocknrollMarc: has joined #ruby
[14:06:06] bougyman: it's pretty easy to plug ipython in to ruby
[14:06:13] bougyman: ipython is what I'd recommend, for this.
[14:06:35] bougyman: saw a great talk at rubyconf from a guy who used ipython to get numpy/scipy functionality in ruby
[14:06:36] agent_white: havenwood: Unholy?
[14:06:41] agent_white: https://github.com/devyn/unholy
[14:06:42] havenwood: agent_white: aye, that's it!
[14:07:19] havenwood: bougyman: nice
[14:07:46] gwendall: has joined #ruby
[14:09:54] rbennacer: has joined #ruby
[14:10:13] rbennacer: has joined #ruby
[14:10:35] malconis: has joined #ruby
[14:10:41] freerobby: has joined #ruby
[14:11:54] findaway: has joined #ruby
[14:11:56] Iskarlar: has joined #ruby
[14:11:57] Yiota: has joined #ruby
[14:12:08] _blizzy_: has joined #ruby
[14:12:21] rocknrol_: has joined #ruby
[14:13:05] rjno: has joined #ruby
[14:14:14] dopie: has joined #ruby
[14:14:50] dviola: why some people still insist we format our code in 80x24?
[14:15:16] ixti: has joined #ruby
[14:15:22] [k-: you mean 80cols?
[14:15:35] [k-: so it is easy to read at a glance ^^
[14:15:45] Channel6: has joined #ruby
[14:15:48] [k-: I don't follow that tho
[14:15:59] mozzarella: 120 columns is better
[14:16:08] adaedra: I prefer navigating in a code file up to bottom only, not having to add left to right
[14:16:19] dviola: most terminal emulators default to this size
[14:16:36] dviola: if you echo $COLUMNS and $LINES you can see it
[14:16:38] jhass: I'm in the 120 camp too
[14:16:46] mozzarella: you can fit two of them on a 1920x* display and one of them on a 1024x* display
[14:16:57] jpfuentes2: has joined #ruby
[14:16:58] adaedra: mozzarella: depends on the font size :p
[14:17:03] mozzarella: 80 was good for old terminals
[14:17:04] jhass: although that's pretty much my hard break, my ruby stays below 70 for a long time
[14:17:10] mozzarella: but now it's just too small
[14:17:22] dviola: mozzarella: termite defaults to 80, and termite is new
[14:17:33] mozzarella: I mean physical terminals, machines
[14:17:40] mozzarella: not emulators
[14:17:48] [k-: they don't want to piss off people!
[14:17:55] dviola: I don't think I ever used a real terminal then
[14:18:03] dviola: physical terminals
[14:18:21] dviola: what were they like?
[14:18:39] mozzarella: dviola: https://upload.wikimedia.org/wikipedia/commons/9/99/DEC_VT100_terminal.jpg
[14:19:14] dviola: no, I never used anything like this
[14:19:25] [k-: I need to comb my hair more often
[14:19:57] dviola: mozzarella: that terminal uses 80 columns?
[14:20:40] adaedra: http://www.secretgeometry.com/apps/cathode/
[14:20:44] [k-: is that sexy or what
[14:21:02] vipaca: has joined #ruby
[14:21:40] adaedra: no, but Stallman is http://rms.sexy
[14:22:29] juanpaucar: has joined #ruby
[14:22:31] konsolebox: has joined #ruby
[14:25:18] mfranzwa: has joined #ruby
[14:25:39] agent_white: Poor RMS, unaware velcro is not open-source.
[14:25:48] theery: has joined #ruby
[14:26:23] senayar: has joined #ruby
[14:26:40] _blizzy_: has joined #ruby
[14:27:15] mozzarella: I wouldn't be able to concentrate, using my computer everywhere like he does
[14:27:20] mozzarella: I need to be in my own room
[14:29:46] allomov: has joined #ruby
[14:29:59] Iskarlar: has joined #ruby
[14:30:14] dviola: adaedra: that looks like cool-retro-term
[14:30:15] wnd: I know this comes a bit late, but I prefer 80 columns because imo short lines make code easier to read - and to a degree help to keep the code easy to read
[14:30:47] [k-: that much is true
[14:30:55] fmcgeough: has joined #ruby
[14:30:57] [k-: but nothing is ever late in irc!
[14:31:00] OrbitalKitten: has joined #ruby
[14:31:04] adaedra: dviola: oooh
[14:31:19] downwithbender: has joined #ruby
[14:31:51] bf4: has joined #ruby
[14:32:13] sandstrom: has joined #ruby
[14:33:52] bf4: has joined #ruby
[14:33:57] decoponio: has joined #ruby
[14:34:25] wnd: 80 cols didn't bother me (much) even with 8 col tabulators and c code
[14:34:57] dviola: wnd: it doesn't bother me at all also
[14:35:03] [k-: eww tabs
[14:35:08] datanoise: has joined #ruby
[14:35:21] serivich: has joined #ruby
[14:36:09] peter_paule: has joined #ruby
[14:36:19] dviola: I wonder how to break down long strings and make it fit into 80 columns
[14:36:44] dviola: sorry this might be offtopic now
[14:36:47] wnd: I still get shivers when I think of that production java code from ten years back. it was badly indented with two spaces, and much of the time nested more than ten levels deep. supposedly complex logic behind the if caluses and other structured, but really, it was just horrible code.
[14:36:48] Bertg: has joined #ruby
[14:36:51] d10n-work: has joined #ruby
[14:36:55] adaedra: ?ot dviola
[14:36:55] ruboto: dviola, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[14:37:13] nonparfumee: has joined #ruby
[14:39:48] micmus: has joined #ruby
[14:40:26] t0rrieri: has joined #ruby
[14:40:53] phat4life: has joined #ruby
[14:41:28] nickfausnight: has joined #ruby
[14:42:58] [k-: divola, Ruby has \
[14:43:36] centrx: dviola, Use jQuery
[14:43:52] dviola: centrx: I already use that
[14:43:54] andywojo: has joined #ruby
[14:44:02] centrx: But do you use it to the Extreme?
[14:44:11] enebo: has joined #ruby
[14:44:16] crazydiamond: has joined #ruby
[14:44:20] dviola: what does that even means?
[14:44:25] centrx: Do you use it, To the Max?
[14:44:40] dviola: I don't know what you are talking about
[14:45:09] dviola: what about it?
[14:45:52] centrx: How do you use it?
[14:45:54] casadei: has joined #ruby
[14:46:41] [k-: do you use it concisely and idiomatically?
[14:46:43] gambl0re: has joined #ruby
[14:47:14] dviola: I don't know what you mean
[14:47:22] schy: has joined #ruby
[14:47:22] dviola: I'm not a big JS person
[14:47:37] chussenot: has joined #ruby
[14:47:41] dviola: I wish we had another way to manipulate the DOM other than with JS
[14:48:04] [k-: you can do it with dart
[14:48:08] dudedudeman: has joined #ruby
[14:48:13] bougyman: this is still offtopic
[14:48:20] [k-: or c++, when webassembly arrives
[14:48:26] [k-: oh don't be so strict
[14:48:46] dudedudeman: has joined #ruby
[14:49:18] dviola: sorry about offtopic
[14:49:26] [k-: you can write in Ruby(?) too using opal
[14:49:41] _joliv: has joined #ruby
[14:49:46] andywojo: has joined #ruby
[14:49:53] shock_one: has joined #ruby
[14:51:17] kies: has joined #ruby
[14:52:40] shevy: iateadonut it's actually not a total pile of crap, it has solid elements; it just is that it has not been thoroughly tested. I really need to test a lot more than I used to
[14:52:53] shevy: it's like half-crap
[14:53:04] ruu: has joined #ruby
[14:53:10] Indian: has joined #ruby
[14:53:27] Indian: what is the difference between self and @
[14:54:02] jhass: Indian: self returns the object, @ is the prefix for instance variables, it's still part of their name though
[14:54:05] adaedra: @ is a prefix for instance variable, alone it does nothing
[14:54:30] startupality: has joined #ruby
[14:54:39] Indian: I see sometimes self.x and @x
[14:54:41] n008f4g_: has joined #ruby
[14:54:49] Indian: both refering to instance variables
[14:55:06] sevenseacat: the former does not refer to an instance variable
[14:55:07] jhass: self.x calls the method x which is in your case probably defined as def x; @x; end;
[14:55:33] [k-: or attr_reader :x or attr_accessor :x
[14:55:39] havenwood: Indian: `@x` avoids the method call and makes it clear that nothing beyond getting the instance variable is going on.
[14:55:45] RegulationD: has joined #ruby
[14:55:53] [k-: we prefer @x
[14:56:17] Indian: ok thanks
[14:56:20] _joliv: Hey, can anyone point me to good resources for debugging a segfault in Ruby? We've been having them in a couple of projects for a while and I'm still trying to find the cause
[14:56:20] jhass: [k-: attr_reader does pretty much exactly generate that code
[14:56:43] sevenseacat: we dont prefer @x over using the attr methods, no
[14:56:46] troulouliou_dev: has joined #ruby
[14:56:50] [k-: no, it is optimised jhass
[14:56:55] chouhoulis: has joined #ruby
[14:57:29] OrbitalKitten: has joined #ruby
[14:57:42] centrx: It's not that big of a deal
[14:57:56] centrx: However, a grudge match can be scheduled
[14:57:58] terlar: has joined #ruby
[14:58:17] [k-: sevenseacat what do you mean?
[14:58:27] Scripore: has joined #ruby
[14:58:29] sevenseacat: [k-: its called information encapsulation
[14:59:01] [k-: you mean private self.x?
[14:59:09] adaedra: is Encapsulation in this channel just so we can tab-complete this complex word?
[14:59:14] Encapsulation: they talk about encapsulation so mch
[14:59:41] davedev24_: has joined #ruby
[14:59:46] sevenseacat: i love when textual randomly highlights words that match people's names
[15:00:02] jhass: hey Encapsulation how are your friends super and forgot doing?
[15:00:09] Yiota: has joined #ruby
[15:00:13] sevenseacat: g gets highlighted a lot
[15:00:38] adaedra: The g spot, everyone aims for it
[15:00:45] B1n4r10: has joined #ruby
[15:00:50] [k-: I still don't get what do you mean tho
[15:00:55] sevenseacat: and y'all miss it D:
[15:01:21] Jiks: has joined #ruby
[15:01:39] Jiks: Just trying out irssi!
[15:01:58] adaedra: It doesn't work
[15:02:00] volty: has joined #ruby
[15:02:05] Jiks: IRC is such a great tool right!
[15:02:07] rbennacer: has joined #ruby
[15:02:09] Jiks: Why not?
[15:02:14] adaedra: We can't see what you're writing!
[15:02:29] adaedra: See, I can't read "IRC is such a great tool right!"
[15:02:30] Jiks: I wish to be in commandline if I can.
[15:02:42] Jiks: Oh really? :(
[15:02:45] wasamasa: much oldschool
[15:02:59] jhass: adaedra: you're such a welcoming part of the community
[15:03:12] jhass: Jiks: think about it, how did adaedra copy paste that
[15:03:30] Jiks: jhass: I was simply pulling her leg ;)
[15:03:32] Indian: has joined #ruby
[15:03:45] Indian: has joined #ruby
[15:03:46] Jiks: Anyways, thanks for the support :)
[15:03:56] Rubie: has joined #ruby
[15:04:11] adaedra: ???her??? :|
[15:04:18] Jiks: Anyone here tried mruby?
[15:04:25] Jiks: adaedra: ;)
[15:04:42] sevenseacat: presumptions of gender are always fun
[15:05:21] shevy: cats are neutral gender
[15:05:28] Jiks: I heard of a project in a newsletter; its related to Postgres: https://github.com/franckverrot/holycorn
[15:05:28] pithagora: has joined #ruby
[15:05:56] shevy: Jiks there are some C-gurus here who used it; IceDragon for instance
[15:05:59] Jiks: Can anyone tell me what its supposed to do?
[15:06:02] shevy: and I think a few more, don't remember their nicks right now
[15:06:05] shevy: I mean mruby
[15:06:07] pithagora: hi all. how can i get the maximum IP from such an array https://gist.github.com/vbrinza/d8b4a20cd65d516d4bdc ?
[15:06:28] shevy: no idea about "holycorn" (what name is that ... is that the offspring of "holycown"... if cows eat corn that is...)
[15:06:32] jhass: pithagora: map to IPAddr and .max I guess
[15:06:47] [k-: there's such a thing as max for ips?
[15:06:51] Jiks: Anyone using irssi here?
[15:06:52] shevy: I wanted to write 'cow' :(
[15:07:23] shevy: adaedra yeah thank you for the acustic help :)
[15:07:26] [k-: ?ot everyone
[15:07:26] ruboto: everyone, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[15:07:27] pithagora: i need to increment by 1 the last ip and use it
[15:07:30] jhass: ips.map {|ip| IPAddr.new(ip) }.max #=> #<IPAddr: IPv4:>
[15:08:00] shevy: [k- holycorn is totally ruby, haven't you guessed from the name alone?
[15:08:11] ytti: IPAddr is hella expensive :(
[15:08:20] shevy: we also have uni-corn... the single corn gem
[15:08:21] OrbitalKitten: has joined #ruby
[15:08:50] [k-: unicorn!
[15:08:54] havenwood: Jiks: The name seems derived from multicorn in python.
[15:09:01] jahrichie: has joined #ruby
[15:09:08] shevy: what... there really exists a project called "multicorn"??
[15:09:18] [k-: if ipaddr is expensive, you could add all the numbers together to derive a max
[15:09:28] shevy: ohhh... postgre http://multicorn.org/
[15:09:32] havenwood: Jiks: So like Postgres has a JSON foreign data wrapper now, etc, this lets you add Ruby Objects.
[15:09:39] shevy: python, not ruby :(
[15:09:55] bougyman: multicorn is pretty popular.
[15:09:57] Jiks: havenwood: But can you explain what is a FDW?
[15:10:08] shevy: [k- btw look at the logo on that site :D
[15:10:10] [k-: isn't that forward?
[15:10:21] bougyman: in PG a foreign data wrapper allows you to access different data sources.
[15:10:22] [k-: which site? I haven't been clicking
[15:10:30] bougyman: imap, ldap, other postgres, mysql, hadoop, anything.
[15:10:33] shevy: http://multicorn.org/ it's a mutant unicorn
[15:10:39] Jiks: Is it like a conceptual table, that is linked with a Ruby script? So that upon executing queries it computes the value.
[15:10:39] havenwood: Jiks: a standard way that pg handles remote access to data - like file wrappers, db wrappers, etc
[15:10:46] bougyman: it's a way to use postgres as a federated database.
[15:10:55] [k-: multihorn*
[15:11:19] Jiks: Okay, I think I got excited for the wrong reason seeing the project ;)
[15:11:23] havenwood: Jiks: search for PostgreSQL Foreign Data Wrappers
[15:11:23] Jiks: Thanks guys!
[15:11:24] bougyman: havenwood: JSON is not a foreign data wrapper.
[15:11:28] bougyman: it's a first class type in postgres.
[15:11:34] bougyman: as is jsonb
[15:11:39] bougyman: (in newer postgres)
[15:11:39] havenwood: right, that added it
[15:11:41] Jiks: I tried, but didn't quite get what they said.
[15:11:58] havenwood: bougyman: Just thought it was a nice example because JavaScript Object Notation.
[15:12:00] Jiks: It seems it has to do with abstracting federated DBs, right?
[15:12:14] bougyman: it is postgres' method of federation.
[15:12:19] senayar: has joined #ruby
[15:12:19] senayar: has joined #ruby
[15:12:22] Jiks: Yup! Thanks!
[15:12:33] Jiks: Hey, anyone here tried Crystal?
[15:12:46] ruboto: I don't know anything about crystal
[15:12:48] ruboto: Just ask your question, if anyone has or can, they will respond.
[15:13:11] havenwood: Jiks: There are several crystalline entities here.
[15:13:12] Jiks: havenwood: what do you feel?
[15:13:21] havenwood: (Is that what you call a crystal programmer?)
[15:13:25] Jiks: ruboto: Well, thats my question.
[15:14:03] jhass: havenwood: I think haven't decided yet :P
[15:14:11] Jiks: havenwood: how stable do you think it is now?
[15:14:13] jhass: I like the sound of crystalist though :P
[15:14:27] Jiks: Is it anywhere near to 1.0?
[15:14:28] MaciejCzyzewski: has joined #ruby
[15:14:39] [k-: someone called it crystallite
[15:14:50] pithagora: @jhass thanks it works
[15:14:52] havenwood: Jiks: It's quite natural syntax for a Rubyist. The standard library is modern and useful. It's fast and easy to deploy.
[15:14:53] [k-: chrysalis...
[15:15:01] OrbitalKitten: has joined #ruby
[15:15:03] jhass: Jiks: personal hobby project stable, ymmv on internal tool stable, I wouldn't call it consumer product stable
[15:15:06] renderful: has joined #ruby
[15:15:09] havenwood: jhass: I like: crystalline entity :P
[15:15:30] Jiks: I think they named the packing format something else?
[15:15:53] havenwood: jhass: crystalist is pretty good
[15:15:54] Jiks: Think calling them crystals would have been cute ;)
[15:16:06] jhass: Jiks: we'll probably call the manager shards and the libraries shard
[15:16:24] Jiks: What does it mean?
[15:16:25] havenwood: shards will install the crack shard
[15:16:31] havenwood: for example
[15:16:42] jhass: *cough* cake
[15:16:44] jhass: you meant cake
[15:16:48] sargas: has joined #ruby
[15:16:51] havenwood: ah, cake, yes
[15:16:51] segfalt: has joined #ruby
[15:16:58] gambl0re: has joined #ruby
[15:17:09] havenwood: shards will install the cake shard
[15:17:19] Jiks: Something silly; but I just discovered a way to run in my old shared server.
[15:17:20] s2013: has joined #ruby
[15:17:21] shevy: [k- hey is crystal offtopic here?
[15:17:33] Jiks: Which practically only supported PHP.
[15:17:39] kloeri: has joined #ruby
[15:17:42] [k-: ACTION takes a moment to consider
[15:17:44] shevy: Jiks noooo come to ruby man :(
[15:17:53] shevy: don't let the snakes take over the world
[15:17:54] [k-: well if jhass permits it...
[15:17:56] Jiks: I just did a exec call in PHP page and called a Ruby script. It worked well :)
[15:17:56] havenwood: shevy: #crystal-lang
[15:18:07] shevy: are you kidding... do they have a -lang really?
[15:18:11] havenwood: shevy: Compiler originally written in Ruby.
[15:18:11] shevy: even #ruby got rid of it!
[15:18:11] volty_: has joined #ruby
[15:18:14] jhass: [k-: granted I'm biased
[15:18:23] shevy: lemme join
[15:18:34] shevy: omg you are right
[15:18:37] shevy: nobody on #crystal
[15:18:39] Jiks: shevy: I hate PHP; just wanted some way to run Ruby there.
[15:18:58] havenwood: shevy: squatters
[15:19:16] shevy: Jiks I still use a variant of ruby .cgi :)))
[15:19:28] centrx: shevy, Yeah #crystal is about meth
[15:19:39] Jiks: shevy: I am curious; how does CGI thingy work?
[15:19:42] havenwood: shevy: I think Ruby-inspired languages with shared syntax and docs are fairly relevant.
[15:19:46] Jiks: Like PHP they are separate files?
[15:20:08] Jiks: havenwood: Elixir seems to show real progress
[15:20:15] rcvalle: has joined #ruby
[15:20:23] shevy: Jiks yeah; there exists some cgi-error thing to display the line of error, similar to how php files work
[15:20:32] shevy: rather than the generic "Internal Server Error"
[15:20:54] shevy: ah yes that was it https://rubygems.org/gems/cgi-exception/versions/0.3.0
[15:21:02] shevy: from the kuwatalabs japanese dude
[15:21:03] eggoez: has joined #ruby
[15:21:21] shevy: I adapted it to show the error in bright red :P
[15:21:35] JoshL: has joined #ruby
[15:21:41] havenwood: Jiks: Aye, lovely to have Rubyists creating languages! <3
[15:22:07] shevy: the default ruby-cgi still lacks actionable things like URL mappers, like in sinatra: create/book/cthulhu
[15:22:18] Jiks: havenwood: yay!
[15:22:26] chouhoulis: has joined #ruby
[15:22:36] platzhirsch: has joined #ruby
[15:22:40] Jiks: I am looking at Opal, Crystal, mRuby and Elixir for future
[15:22:56] renderful: has joined #ruby
[15:23:06] shevy: matz is working on mruby so it has to become the future one day anyway :)
[15:23:11] davedev24: has joined #ruby
[15:23:20] Jiks: Just wish Rubymotion was open source
[15:23:21] shevy: until then we can scan at https://github.com/ruby/ruby/blob/trunk/ChangeLog for new stuff
[15:23:33] jhass: matz wants to replace lua though, not ruby
[15:23:49] shevy: whoa... 90 contributors
[15:23:53] lessless: has joined #ruby
[15:23:57] shevy: well, lua is damn tiny
[15:24:26] Jiks: jhass: Yes. Each of the those projects are to replace particular verticals.
[15:24:31] shevy: hmm lemme check mruby size
[15:24:45] Jiks: Elixir: Clojure/Scala
[15:24:50] Jiks: Opal: JS
[15:24:54] Jiks: Crystal: C
[15:25:13] Jiks: RubyMotion: ObjectiveC/Java
[15:25:19] shevy: I removed doc/ then repackaged -> mruby-master.tar.xz 274K
[15:25:22] Jiks: mRuby: lua
[15:25:30] nertzy: has joined #ruby
[15:25:31] shevy: lua-5.3.1.tar.xz is at 221K
[15:25:33] Jiks: ScriRuby: Python
[15:25:34] shevy: so that's very similar actually
[15:25:42] rbennacer: has joined #ruby
[15:25:44] chinmay_dd: has joined #ruby
[15:25:54] adaedra: shevy: the xz'd source code means no-thing
[15:26:01] Jiks: Each of this project is brilliantly positioned to power the weakness of the language.
[15:26:06] snockerton: has joined #ruby
[15:26:23] shevy: adaedra what does this mean
[15:27:05] bruno-: has joined #ruby
[15:27:16] sandstrom: has joined #ruby
[15:27:34] shevy: bin/mirb is 1.4 MB in size... can that be?
[15:27:39] volty__: has joined #ruby
[15:27:50] havenwood: On the TechEmpower benchmarks ngx_mruby makes the strongest showing of the bunch. Good stuff: https://github.com/matsumoto-r/ngx_mruby#readme
[15:27:52] jhass: I think crystal will probably steal more marketshare from Go than from C though
[15:28:10] havenwood: https://www.techempower.com/benchmarks/#section=data-r10&hw=peak&test=json
[15:28:44] shevy: why will it steal more from Go?
[15:29:01] Respek: has joined #ruby
[15:29:09] jhass: similar usecases
[15:29:26] hotpancakes: has joined #ruby
[15:30:02] Jiks: jhass: Na! Go's popularity is in concurrency
[15:30:20] Jiks: Elixir is the right counter for Go
[15:30:24] jhass: and currently Crystal's basically copying Go's concurrency ;)
[15:30:27] havenwood: Jiks: See Crystal's channels.
[15:31:30] Jiks: jhass: wow, then I didn't know!
[15:31:50] Jiks: I was feeling jealous of Go's light weight channels.
[15:31:51] shevy: hmm I thought Google wants Go to succeed
[15:31:53] havenwood: Jiks: Nobody is going to argue against Erlang/OTP for concurrency and distributed programming. But Crystal mirrors Go.
[15:32:12] havenwood: At least I think nobody. >.> Probably somebody!
[15:32:40] shevy: there is always somebody using something
[15:32:43] Jiks: havenwood: Can only say, I can't wait for Crystal to be a strong contender.
[15:33:01] jhass: Jiks: well, time to build up the ecosystem so it can happen ;)
[15:33:12] Jiks: I think I am in so love with the syntax and language semantics that I can't think of switching to another language.
[15:33:47] Jiks: jhass: What about a simple API framework? Like Grape?
[15:33:55] rbennacer: has joined #ruby
[15:33:56] Iskarlar: has joined #ruby
[15:34:35] jhass: whatever drives you really, though webframeworks is probably what we have the most of :P
[15:34:47] OrbitalKitten: has joined #ruby
[15:35:43] jhass: just saying it's still easy to become a Crystal hero ;P
[15:37:40] msnyon_: has joined #ruby
[15:37:56] shevy: you people are so junkies
[15:38:10] shevy: LSD, meth, crystal - nothing is sacred
[15:38:15] shevy: until you start to smoke cats
[15:38:43] Jiks: jhass I know, I understood ;) .. But not that knowlegible :(
[15:38:57] adaedra: shevy: stop arguing and give me a coke.
[15:39:16] jhass: Jiks: BS, I learned crystal by writing Ruby and working through the compiler errors ;P
[15:39:23] dfockler: has joined #ruby
[15:39:52] Jiks: jhass: thats probably because you know your way around
[15:41:01] leafybasil: has joined #ruby
[15:41:48] havenwood: jhass: It seems the most likely explanation is... you used magic.
[15:42:01] [k-: dundundun!
[15:42:19] jhass: DeBot is full of magic, yes!
[15:42:31] ruboto: I'm the channel bot, linker of the rules, adept of the facts, wielder of the banhammer.
[15:42:42] umgrosscol: has joined #ruby
[15:42:44] platzhirsch: has joined #ruby
[15:42:48] [k-: ?ot ruboto
[15:42:49] ruboto: ruboto, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[15:42:49] jhass: Jiks: https://github.com/manastech/crystal/blob/master/samples/2048.cr my first crystal program
[15:43:01] shevy: ruboto is off-topic - who would have known
[15:43:22] msnyon: has joined #ruby
[15:43:26] [k-: that's basically Ruby...
[15:43:56] atom3: has joined #ruby
[15:44:02] chussenot: has joined #ruby
[15:44:25] centrx: Yeah what is the difference
[15:44:31] centrx: Why don't they just make a compiler for Ruby
[15:45:03] icebourg: has joined #ruby
[15:45:16] shevy: in javascript?
[15:45:19] [k-: infraruby vs crystal, go!
[15:46:00] StanAlanMcM: has joined #ruby
[15:46:26] jhass: centrx: crystal actually started that way but you can't achieve all of Ruby's features without embedding a runtime, which they decided against and instead continued to make their own language
[15:46:33] yorickpeterse: people actually use infraruby?
[15:46:38] yorickpeterse: plus crystal is FOSS, done
[15:46:42] yorickpeterse: no further argument needed
[15:47:46] griffindy: has joined #ruby
[15:47:50] negev: has joined #ruby
[15:48:03] Rollabunna: has joined #ruby
[15:48:30] sphex: hey, does ruby have a "strict" UTF-8 mode? that is, can it throw exceptions when attempting to decode/encode invalid UTF-8?
[15:48:45] jhass: doesn't it already?
[15:48:51] acke: has joined #ruby
[15:50:01] [k-: that's weird, what is {:sym, :sym}? a tuple?
[15:50:06] StanAlanMcM: Hello! I am in a class to learn Ruby. We have been going over minitest this week. Many of us are having a hard time understanding mock. We've googled for "ruby minitest mock examples/tutorials" and haven't found anything we understand. I am looking for a tutorial that has an example class and walks us through using mock to do various tests. If anyone has a suggestion I much appreciate it. :) Thank you.
[15:50:59] slash_nick: StanAlanMcM: https://github.com/rthbound/konamio/blob/master/test/konamio/sequence/requisition_test.rb
[15:51:28] Yiota: has joined #ruby
[15:52:01] sphex: jhass: I thought it didn't. maybe I should check better. it does just pass through the surrogate pair codepoints though. and codepoints > 0x10FFFF are encoded oddly and decoded as separate multiple characters somehow.
[15:52:14] ruboto: We can't help you without your code, please post it to https://gist.github.com
[15:52:15] enebo: has joined #ruby
[15:52:23] sphex: jhass: maybe the low-level UTF-8 encoding errors trigger exceptions though
[15:52:30] rockngo: has joined #ruby
[15:52:46] jhass: [k-: maybe we should head to #crystal-lang for that level of talk, but yes ;)
[15:53:04] [k-: so you did learn crystal...
[15:53:14] StanAlanMcM: slash_nick: Thank you!
[15:53:23] [k-: now the code cannot be run under mri
[15:53:31] slash_nick: StanAlanMcM: no problem... have fun!
[15:53:32] jhass: sphex: well yes, you'll need to do operations that actually depend on the encoding
[15:53:50] ruu: has joined #ruby
[15:53:53] charliesome: has joined #ruby
[15:54:26] jhass: sphex: note that \x only reads the next two digits
[15:54:36] jhass: \x10\xFF\xFF
[15:54:58] rocknrollMarc: has joined #ruby
[15:54:59] jhass: >> "\x10\xFF\xFF"
[15:55:00] ruboto: jhass # => "\u0010\xFF\xFF" (https://eval.in/388184)
[15:55:03] jhass: >> "\x10\xFF\xFF".match /foo/
[15:55:04] ruboto: jhass # => invalid byte sequence in UTF-8 (ArgumentError) ...check link for more (https://eval.in/388185)
[15:55:40] sphex: jhass: yeah, I'm testing with e.g. [0x110000].pack 'U'
[15:55:51] symbol: has joined #ruby
[15:56:16] sphex: jhass: ah ok.. interesting.
[15:56:25] griffindy: has joined #ruby
[15:56:37] Iskarlar: has joined #ruby
[15:56:48] davedev24_: has joined #ruby
[15:56:50] shock_one: has joined #ruby
[15:57:08] psye: has joined #ruby
[15:57:18] senayar: has joined #ruby
[15:57:19] jhass: you can also ask ruby
[15:57:21] jhass: >> [0x110000].pack("U").valid_encoding?
[15:57:22] ruboto: jhass # => false (https://eval.in/388186)
[15:57:27] sphex: jhass: the thing I want to avoid is that invalid UTF-8 read from whatever source get concatenated with other strings and end up in a file, and make the whole file invalid.
[15:58:07] psye: has joined #ruby
[15:58:12] sphex: jhass: ah ok. so I guess I should do that as soon as possible (ideally right after reading) to avoid contaminating other strings.
[15:58:30] zenguy_pc: has joined #ruby
[15:59:15] dorei: has joined #ruby
[15:59:30] havenwood: StanAlanMcM: Mmm, that's a good question. I'm on a call but if you hang around a bit I'll gist some examples if someone doesn't beat me to it.
[15:59:48] aapole: has joined #ruby
[16:00:50] acke: has joined #ruby
[16:01:51] OrbitalKitten: has joined #ruby
[16:02:00] [k-: jhass: does crystal have then like in Ruby?
[16:02:48] [k-: why ever not
[16:03:27] ljarvis: [k-: if you want to discuss crystal please go to #crystal-lang
[16:03:55] towski_: has joined #ruby
[16:03:58] rbennacer: has joined #ruby
[16:05:04] StanAlanMcM: havenwood: Thank you. I'm in class for the rest of the day. "lab time" I'll be patiently waiting! :D
[16:07:42] slash_nick: havenwood: i sent him to https://github.com/rthbound/konamio/blob/master/test/konamio/sequence/requisition_test.rb ; but i'm sure he'd be interested in more examples (hell i wouldn't mind checking out your examples myself)
[16:08:02] rbennacer: has joined #ruby
[16:10:24] dopie: has joined #ruby
[16:11:52] zendrix: has joined #ruby
[16:13:08] theery: has joined #ruby
[16:13:28] k3asd`: has joined #ruby
[16:13:31] zendrix: has joined #ruby
[16:14:22] shock_one: has joined #ruby
[16:15:11] Zai00: has joined #ruby
[16:15:24] Agoldfish: has joined #ruby
[16:15:38] StanAlanMcM: This is the code we are learning to test against. https://github.com/mcmillanator/1.4-ATM-Classes/tree/dev
[16:16:08] phutchins: has joined #ruby
[16:16:47] psye: has joined #ruby
[16:16:49] cmisenas: has joined #ruby
[16:16:57] andywojo: has joined #ruby
[16:17:03] RobertBirnie: has joined #ruby
[16:17:38] rocknrollMarc: has joined #ruby
[16:17:52] rbennacer: has joined #ruby
[16:18:11] commondr_: has joined #ruby
[16:18:18] momomomomo: has joined #ruby
[16:19:04] StanAlanMcM: argh. My instructor is requiring me to take a 20 minute break. lolz. I'll be afk, but computer on and will read any input from you. :) Thank you very much for the help.
[16:19:09] ibash: has joined #ruby
[16:19:13] pdoherty: has joined #ruby
[16:19:47] ibash: has joined #ruby
[16:20:24] ibash: I think I found an inconsistency between my gemfile and gemfile.lock (that is, there's a gem listed in gemfile.lock that is not in the gemfile). Are there any tools to verify this?
[16:20:36] ibash: if not can someone point me to a spec of the gemfile.lock format
[16:21:26] segfalt: has joined #ruby
[16:23:18] centrx: ibash, The Gemfile.lock is generated from the Gemfile. And the Gemfile can be changed without generating the Gemfile.lock
[16:23:19] jhass: ibash: the lock lists all dependencies, though the part below DEPENDENCIES should only list what's in the Gemfile
[16:23:44] ibash: centrx: yep
[16:24:00] RobertBirnie: has joined #ruby
[16:24:01] sfarley: has joined #ruby
[16:24:05] ibash: jhass: Okay -- I think a dependency was installed an added to gemfile.lock without adding it to gemfile
[16:24:19] ibash: any easy ways to check that particular case for all dependencies?
[16:24:33] jhass: ibash: likely just a dependency of one that's listed
[16:24:43] jhass: "that particular case"?
[16:24:53] serivich: has joined #ruby
[16:25:00] [H]unt3r: has joined #ruby
[16:25:03] ibash: so if I go to an app and manually do `gem install "foo"`
[16:25:07] jhass: bundle outdated lists the restrictions from the Gemfile in recent versions
[16:25:20] ibash: when the gemfile.lock is generate, would it have foo?
[16:25:23] OrbitalKitten: has joined #ruby
[16:25:24] ibash: even if it's not in the Gemfile?
[16:25:40] jhass: and bundle exec whatever would not be able to load foo
[16:25:53] jhass: unless it also happens to be a dependency of a dependency listed in the Gemfile
[16:27:16] ibash: what's throwing me off is that it looks like this is a top-level dependency in the gemfile.lock, but it's not in the list of dependencies
[16:27:21] ibash: nor is it in the gemfile
[16:27:22] baweaver: has joined #ruby
[16:27:25] ibash: how could that happen?
[16:27:39] sfarley_: has joined #ruby
[16:27:43] bronson: has joined #ruby
[16:27:50] jhass: I said it three times already
[16:27:52] finisherr: has joined #ruby
[16:27:58] jhass: it's likely just a dependency of a dependency
[16:28:03] atom3: has joined #ruby
[16:28:14] jhass: if you want a concrete explanation post your Gemfile & lock to gist
[16:29:17] ibash: okay, thanks!
[16:30:16] nobitanobi: has joined #ruby
[16:30:35] havenwood: StanAlanMcM: https://gist.github.com/havenwood/84207afa092ce5d5a680
[16:30:40] ndrei: has joined #ruby
[16:31:22] benlieb_: has joined #ruby
[16:32:27] havenwood: slash_nick: Ah, yeah your link has great examples! :)
[16:34:06] Senjai: Good morning ruby
[16:34:12] havenwood: Senjai: g'mornin
[16:34:59] Senjai: I've never used minitest that lightly
[16:35:01] Senjai: pretty neat
[16:35:59] BTRE: has joined #ruby
[16:36:18] momomomomo: has joined #ruby
[16:37:20] Xeago: has joined #ruby
[16:37:21] nfk: has joined #ruby
[16:37:22] atom3: has joined #ruby
[16:38:53] bricker: has joined #ruby
[16:40:03] pengin: has joined #ruby
[16:40:17] konsolebox: has joined #ruby
[16:42:09] startupality: has joined #ruby
[16:42:14] volty: has joined #ruby
[16:42:32] bnizzle: has joined #ruby
[16:42:55] havenwood: Senjai: It's not hard to make assertions available from main as well: https://gist.github.com/havenwood/23f8dab52adbe7ea3060
[16:43:50] slash_nick: thanks Senjai havenwood
[16:44:10] slash_nick: oh... Senjai was talkin to havenwood :)
[16:44:12] mfranzwa: has joined #ruby
[16:44:45] Senjai: havenwood: That is actually awesome
[16:44:49] Senjai: not even joking
[16:44:51] Senjai: For one off scripts
[16:44:54] Senjai: that's super helpful
[16:45:04] Senjai: Not having to write a class etc
[16:45:05] Bertg: has joined #ruby
[16:45:24] havenwood: Senjai: I have it in my .pryrc file. :)
[16:46:06] Xzanron: has joined #ruby
[16:46:20] Senjai: havenwood: Can I steal your pryrc
[16:47:24] havenwood: Senjai: Hem, I also use a simple prompt and disable paging. Not much else enabled at the moment. Trying out the did_you_mean gem.
[16:47:28] shevy: first the pryrc, then the babies
[16:47:30] havenwood: Pry.config.prompt = Pry::SIMPLE_PROMPT
[16:47:35] havenwood: Pry.pager = false
[16:47:54] havenwood: Senjai: ^ and the top part of that Gist.
[16:48:16] Senjai: No paging hey?
[16:48:17] havenwood: Senjai: If you want to use the local variable `cat` from the top level >.> then: Pry.commands.rename_command '%cat', 'cat'
[16:48:38] ta: has joined #ruby
[16:48:39] havenwood: Senjai: I like to do data munging in Pry and I don't like waiting minutes for the screen to fly by.
[16:49:01] nonparfumee: has joined #ruby
[16:51:47] luckyno7: has joined #ruby
[16:52:18] zenguy_pc: has joined #ruby
[16:52:24] borodin: has joined #ruby
[16:53:48] JoshL_: has joined #ruby
[16:53:54] Indian: has joined #ruby
[16:54:04] michael_mbp: has joined #ruby
[16:54:22] icarus: has joined #ruby
[16:54:33] ruu: has joined #ruby
[16:54:57] jenrzzz: has joined #ruby
[16:55:48] j4cknewt: has joined #ruby
[16:57:40] enebo: has joined #ruby
[16:57:42] podman: has joined #ruby
[16:58:14] iateadonut: has left #ruby: ()
[16:59:03] baweaver: has joined #ruby
[16:59:54] konsolebox: has joined #ruby
[17:01:16] dudedudeman: hey guys, minitest question. Can I pull off string interpolation on an assertion?
[17:01:35] dudedudeman: assert last_response.body.include?('todos'), but instead pass in a #{@todos} or something like that
[17:02:13] snockerton: has joined #ruby
[17:02:31] nathanstitt: has joined #ruby
[17:02:40] jhass: dudedudeman: no need for interpolation, just .include?(@todos)
[17:03:00] jhass: dudedudeman: forget the assert, think you're writing an if
[17:03:39] Senjai: I love right now
[17:04:34] dudedudeman: why do we love now? lol
[17:04:51] Xeago: has joined #ruby
[17:04:52] dudedudeman: and jhass, thank you. as per usual, i was over complicating this
[17:05:12] finisherr: has joined #ruby
[17:05:14] shevy: dudedudeman!
[17:05:25] shevy: you don't over-complicate - you just try to bring it down to the level of the dude
[17:05:37] jhass: dudedudeman: because supreme court perhaps?
[17:05:57] timonv: has joined #ruby
[17:05:59] dudedudeman: jhass: i wondered teh same, but didn't know Senjai's country of origin
[17:06:02] Senjai: It's like
[17:06:15] Senjai: the downtime, between epics
[17:06:34] nateberkopec: has joined #ruby
[17:07:34] dudedudeman: this is a fun error: TypeError: no implicit conversion of Todo::ActiveRecord_Relation
[17:08:10] Hiall: has joined #ruby
[17:08:16] jhass: make it explicit, .to_s or whatever is appropriate
[17:09:20] mikecmpbll: has joined #ruby
[17:09:32] dudedudeman: this is the test i'm throwing at my view: https://gist.github.com/anonymous/b05c6e09ea582068dfb2
[17:11:02] silas: has joined #ruby
[17:11:21] _joliv: `Todo::ActiveRecord_Relation` is a class specific to the relation that Rails creates for you afaik
[17:11:43] schy: has left #ruby: ("WeeChat 1.2")
[17:12:16] Guest69221: has left #ruby: ()
[17:12:40] zipace: has joined #ruby
[17:12:58] nobitanobi: has joined #ruby
[17:13:02] dseitz: has joined #ruby
[17:13:12] symm-: has joined #ruby
[17:14:15] rippa: has joined #ruby
[17:14:28] dudedudeman: sinatra, baby
[17:15:25] danman: has joined #ruby
[17:16:44] blaines: has joined #ruby
[17:17:16] j4cknewt: has joined #ruby
[17:18:11] mfranzwa: has joined #ruby
[17:18:43] bubbys: has joined #ruby
[17:18:52] startupality: has joined #ruby
[17:19:11] jhass: dudedudeman: well, your view transforms it to a string, the items in @todos are gone in the response
[17:19:15] dblessing: has joined #ruby
[17:19:33] jhass: you can expect a body of a todo or a title to be in it
[17:19:49] User458764: has joined #ruby
[17:20:20] [k-: erb looks disgusting
[17:20:23] [k-: haish..
[17:20:25] konsolebox: has joined #ruby
[17:20:29] [k-: have you seen voltz?
[17:20:38] dudedudeman: erb is beautiful
[17:20:43] dudedudeman: and volt is sweet
[17:21:32] [k-: erb has horrible syntax
[17:21:34] snockerton: has joined #ruby
[17:21:54] rbowlby: has joined #ruby
[17:21:58] dfockler: erb is like php templating
[17:22:21] aphprentice: has joined #ruby
[17:22:27] [k-: it looks worse than php even tho its Ruby...
[17:22:43] dfockler: something like haml encourages better logic separation
[17:22:47] [k-: I'm just kidding
[17:22:56] [k-: php is worser than anything
[17:24:04] bakednotfried: php is the best language for the web
[17:24:26] GitGud: has joined #ruby
[17:25:42] [k-: whatever you like, whatever you like...
[17:28:24] platzhirsch: has left #ruby: ()
[17:30:12] Senjai: [k-: erb's syntax is just fine. Using it with html can get messy. But ERB in regular text files is a-ok
[17:30:24] Senjai: I dont know how you improve on <% %>
[17:30:27] Rodya_: has joined #ruby
[17:30:36] nobitanobi: has joined #ruby
[17:31:03] [k-: I judge based on what I see :(
[17:31:30] Senjai: Anyone can write crappy code.
[17:31:36] Senjai: Doesnt mean its impossible to write good code
[17:31:58] dfockler: let's all use << >> pointy handlebars
[17:32:02] Iskarlar: has joined #ruby
[17:32:20] Senjai: dfockler: http://junk.pics/whatno.gif
[17:33:22] shevy: I also think that erb is ugly
[17:33:26] StanAlanMcM: havenwood, that's hilarious! Thank you.
[17:33:41] Senjai: I dont think it is. Again, I think you guys are talking about html.erb
[17:33:50] dfockler: although I like @ compared to php's $ everywhere
[17:34:03] dfockler: those are some expensive variables
[17:34:13] havenwood: StanAlanMcM: You're welcome.
[17:34:37] RegulationD: has joined #ruby
[17:34:39] ght: Question: How do you convert a standard MySql updated_at or create_at timestamp into a Ruby Date or DateTime object?
[17:34:44] ght: created*
[17:35:02] Chemist: has joined #ruby
[17:35:10] horsecowdog: has joined #ruby
[17:35:11] [k-: how does it look like :o
[17:35:22] [k-: the time stamp I mean
[17:35:35] Senjai: >> "2015-06-03 15:20:59 UTC".to_date
[17:35:36] ruboto: Senjai # => undefined method `to_date' for "2015-06-03 15:20:59 UTC":String (NoMethodError) ...check link for more (https://eval.in/388217)
[17:35:46] Senjai: >> Date.new "2015-06-03 15:20:59 UTC"
[17:35:48] ruboto: Senjai # => uninitialized constant Date (NameError) ...check link for more (https://eval.in/388219)
[17:35:57] Senjai: Too much time in active support land
[17:36:08] TinkerTyper: has joined #ruby
[17:36:13] Senjai: >> require 'date';Date.new "2015-06-03 15:20:59 UTC"
[17:36:15] ruboto: Senjai # => comparison of String with 0 failed (ArgumentError) ...check link for more (https://eval.in/388221)
[17:36:19] charliesome: has joined #ruby
[17:36:51] ruu: has joined #ruby
[17:36:57] Senjai: >> require 'date';Date.parse "2015-06-03 15:20:59 UTC"
[17:36:58] ruboto: Senjai # => #<Date: 2015-06-03 ((2457177j,0s,0n),+0s,2299161j)> (https://eval.in/388223)
[17:37:12] Senjai: I did it*
[17:37:13] coderhs: has joined #ruby
[17:37:28] sarkyniin: has joined #ruby
[17:39:27] Frem: has joined #ruby
[17:39:42] RegulationD: has joined #ruby
[17:43:16] roger_rabbit: has joined #ruby
[17:43:21] Jackneill: has joined #ruby
[17:43:48] dviola: I'm trying to hit some json api with Net::HTTP but it claims the SSL is invalid but it works when I curl -k or --insecure, is there such a parameter for Net::HTTP?
[17:44:01] Iskarlar: has joined #ruby
[17:44:58] n008f4g_: has joined #ruby
[17:45:22] Senjai: dviola: Is it using sslv3?
[17:45:23] jhass: dviola: improper solution
[17:45:29] Senjai: You generally never want to --insecure anything
[17:46:12] Senjai: dviola: what's the api?
[17:46:53] dviola: Senjai: I know but I asked the manager here and they say that "You're using Linux, you're going to have to use Windows, the admin won't fix your issue because you're getting this problem yourself"
[17:47:01] agent_white: has joined #ruby
[17:47:22] dviola: Senjai: so he's a f*cking moron, and he thinks the problem is on my end, and it's not
[17:48:00] Senjai: dviola: I can't say its not on your end
[17:48:10] Senjai: dviola: And we talked about the complaining ;)
[17:48:12] cmisenas: has joined #ruby
[17:48:16] Zenon: has joined #ruby
[17:48:16] dviola: Senjai: sorry
[17:48:23] Senjai: dviola: force tlsv1 and tlsv2 and try
[17:48:37] Senjai: I also dont know what API you're using, so I cant run ssl tests on it
[17:49:05] whippythellama: has joined #ruby
[17:49:26] zendrix: has joined #ruby
[17:49:29] Tau: has joined #ruby
[17:50:10] dviola: I forced -1 -2 and -3
[17:50:13] dviola: no workie
[17:50:25] ta: has joined #ruby
[17:50:26] dviola: works with -k and --insecure
[17:50:44] mfranzwa: has joined #ruby
[17:50:46] Senjai: dviola: openssl s_client -connect google.ca:443
[17:51:00] Senjai: where the servername and port are the creds for your api
[17:52:00] sphex: dviola: not sure I understood your issue, but maybe Net::HTTP#verify_mode ?
[17:52:01] rbennacer: has joined #ruby
[17:52:10] Jarboe: has joined #ruby
[17:52:30] Senjai: sphex: No
[17:52:34] dviola: Senjai: what will this do?
[17:52:35] lokulin: has joined #ruby
[17:52:37] Senjai: sphex: Using NO_VERIFY_PEER is terrible
[17:52:37] dviola: the s_client thing
[17:52:48] Senjai: dviola: I thought you've been using linux for over half your life :P
[17:52:58] momomomomo: has joined #ruby
[17:52:59] eam: dviola: it'll show you the certificate chain
[17:53:05] Senjai: dviola: It will attempt a handshake with the server and show you the certificate chain
[17:53:06] sphex: Senjai: but if their certificate is invalid, what else are you gonna do?
[17:53:13] eam: sphex: it's likely not invalid
[17:53:20] Senjai: if it succeeds, then the problem is with you
[17:53:36] dviola: Senjai: they're using no verify in other code
[17:53:37] eam: it sounds like the trust store on this org's windows systems differs from dviola's config on linux
[17:53:44] chussenot: has joined #ruby
[17:53:45] wldcordeiro: has joined #ruby
[17:53:48] eam: dviola: oh are they? then you need to, too
[17:53:57] Senjai: eam: Yeah, but I want to see his output for this
[17:54:10] rbennacer: has joined #ruby
[17:54:30] yfeldblum: has joined #ruby
[17:54:43] sphex: I guess if it were valid, then you'd have to get some root certificates into the global openssl configs and ruby would pick it up?
[17:55:05] postmodern: has joined #ruby
[17:55:52] symm-: has joined #ruby
[17:56:00] axl_: has joined #ruby
[17:57:00] dopie: has joined #ruby
[17:57:37] gwendall: has joined #ruby
[17:57:58] postmodern: how hard is it to add custom resource types to Resolv? or should i just use net-dns?
[18:00:19] khebbie: has joined #ruby
[18:00:57] sfarley: has joined #ruby
[18:01:12] sphex: hey, is it worth it attempting to make code work with ruby's $SAFE/tainting features, or will that cause too many problems with common libraries, etc? do the modern web frameworks support it?
[18:01:35] ruu: has joined #ruby
[18:01:43] kirun: has joined #ruby
[18:01:57] vickleton: has joined #ruby
[18:02:41] dviola: Senjai: lol
[18:02:53] dviola: Senjai: using linux for half my life doesn't mean I know everything about it
[18:02:58] vickleton: has joined #ruby
[18:03:29] zendrix: has joined #ruby
[18:04:40] dviola: and I don't think you can know everything about anything, things are always changing
[18:04:47] dviola: even when it comes to ruby, etc
[18:04:53] voker57: has joined #ruby
[18:05:27] bosma: has joined #ruby
[18:05:29] dviola: thanks for the help anyway
[18:05:29] snockerton: has joined #ruby
[18:05:37] dviola: sorry about complaining ;)
[18:05:48] toretore: has joined #ruby
[18:06:55] sfarley: has joined #ruby
[18:07:44] zenguy_pc: has joined #ruby
[18:08:24] centrx: sphex, I don't think it's used much nowadays
[18:08:26] DLSteve: has joined #ruby
[18:09:59] s2013: has joined #ruby
[18:10:26] sphex: centrx: ok. that's a shame, it always looked like a good idea. perl's tainting features never saw a lot of use either. :/
[18:11:00] centrx: sphex, https://bugs.ruby-lang.org/issues/8468
[18:11:01] jenrzzz: has joined #ruby
[18:11:14] major_majors: has joined #ruby
[18:11:20] postmodern: has joined #ruby
[18:11:56] dviola: Senjai: why is NO_VERIFY_PEER that terrible?
[18:12:47] jhass: dviola: because encryption with automatic key negotiation without authentication is completely pointless
[18:12:49] T3: has joined #ruby
[18:13:17] jhass: that is unless you think earth is too cold and want to heat it up
[18:13:35] eam: it's not completely pointless
[18:13:51] sphex: jhass: "opportunistic encryption" is.. still that.
[18:14:09] eam: it's not opportunistic either, it's encrypted. period.
[18:14:33] sphex: most of the SMTP traffic ends up being protected with just opportunistic encryption too
[18:14:37] dviola: jhass: is NO_VERIFY_PEER the same as -k or --insecure in curl?
[18:14:40] eam: dviola: peer verification protects against attackers who might impersonate the peer you're talking to -- who would have to be able to inject traffic
[18:14:52] bartender: has joined #ruby
[18:14:56] eam: without it, you're only protected against people who can read, but not write to your connection channel
[18:15:01] eam: it's still valuable, but not as valuable
[18:15:24] dopie: has joined #ruby
[18:15:35] eam: (and let's be honest, the barrier to procuring a cert signed by a trusted authority is not that high)
[18:16:22] soulcake: has joined #ruby
[18:16:22] jhass: or to either side of the connection, like if someone hacked your host and replaced the cert you probably wouldn't notice with disabled verification
[18:16:25] dviola: I doubt anyone would want to attack me when I connect to this api, it's some company's internal thingy
[18:16:43] shadoi: has joined #ruby
[18:16:47] eam: jhass: yes, the entire channel. Though if they compromise the host they wouldn't need to replace the cert
[18:16:54] eam: they'd just use the signed cert they find
[18:17:06] eam: root on either end is automatic game over anyway
[18:18:41] eam: (eve and alice become the same person)
[18:18:44] Alayde_: Has the ruby community settled on a ruby version/gem manager yet? It seems rvm is somewhat frowned upon, but fortunately for me that's the only thing I'm used to.
[18:18:46] jhass: either I still think it's pointless, false sense of security even. you can't guarantee the channel will never be exposed and likely forget about the issue since "you already setup encryption"
[18:18:51] Alayde_: Or is it kind of like, 'use whatever makes you happy'?
[18:19:04] jhass: Alayde_: if it makes you happy it's fine
[18:19:08] jhass: ignore what comes now
[18:19:18] Alayde_: Lol! Fair enough
[18:19:25] eam: jhass: no doubt, if your channel goes over the internet it can be compromised
[18:19:33] sarkyniin: has joined #ruby
[18:20:08] jhass: dviola: good read https://blog.cloudflare.com/how-to-build-your-own-public-key-infrastructure/
[18:21:37] egrm: has joined #ruby
[18:21:55] egrm: hi everybody
[18:21:58] Rodya_: has joined #ruby
[18:22:42] jhass: 12 seconds, had it worse
[18:24:55] egrm: has joined #ruby
[18:25:03] egrm: hi everybody
[18:26:12] jpfuentes2: has joined #ruby
[18:26:42] egrm: what's up?
[18:27:04] Rodya_: has joined #ruby
[18:27:11] havenwood: egrm: The Ruby sky.
[18:27:39] havenwood: egrm: Friday!
[18:28:36] jhass: java hangman in #ruby-offtopic ><
[18:29:00] baweaver: has joined #ruby
[18:29:49] micmus: has joined #ruby
[18:29:53] noodles_: has joined #ruby
[18:30:28] rubyguy: has joined #ruby
[18:30:38] dviola: I wonder why I don't see that friday bot anymore
[18:31:25] dviola: maybe because I'm not in #jruby
[18:31:35] rocknrollMarc: has joined #ruby
[18:31:45] havenwood: dviola: Yup, you missed the very colorful Friday!!! from a minute ago.
[18:32:44] dviola: I used to join like 40 channels when I had my weechat to auto join for me but I'm too lazy to configure that again
[18:32:51] havenwood: dviola: Less colorful recreation of what you missed: http://irclog.whitequark.org/jruby/2015-06-26#;tarcieri
[18:32:52] dviola: now I join 4 channels or so
[18:33:10] Encapsulation: has joined #ruby
[18:33:10] Shoutsid: has joined #ruby
[18:33:26] dviola: havenwood: cool
[18:34:04] Obfuscate: dviola: That's pretty lazy, since all you have to type is /autojoin --run
[18:34:16] dviola: if I could only find a way to backup my weechat config in my dotfiles repo that would be good, the thing is that I keep my password there too, so I don't know how to handle this
[18:34:22] baweaver: has joined #ruby
[18:35:10] dviola: Obfuscate: there's no /autojoin command in weechat?
[18:36:55] Muhannad: has joined #ruby
[18:39:05] Voker57|2: has joined #ruby
[18:39:08] khebbie_: has joined #ruby
[18:39:35] dviola: meh I'll configure that later
[18:39:47] rbowlby: has joined #ruby
[18:39:55] JoshL: has joined #ruby
[18:41:28] sphex: hey.. what would be the most straightforward way to do something like python's decorators (on a method-by-method basis)? I know ruby has its own metaprogramming stuff, but they're too advanced for me for now..
[18:41:31] findaway: has joined #ruby
[18:41:53] zendrix: has joined #ruby
[18:41:55] multi_io: has joined #ruby
[18:42:08] shadoi: sphex: maybe give an example of what you want
[18:42:09] momomomomo: has joined #ruby
[18:42:15] 7JTAAEQTT: has joined #ruby
[18:42:20] OrbitalKitten: has joined #ruby
[18:42:35] StanAlanMcM: has joined #ruby
[18:42:45] towski_: has joined #ruby
[18:43:59] charliesome: has joined #ruby
[18:45:27] spider-mario: has joined #ruby
[18:45:29] peter_paule: has joined #ruby
[18:46:00] Al3ks: has joined #ruby
[18:46:07] Rarikon: has joined #ruby
[18:46:08] Xoro: has joined #ruby
[18:46:52] sphex: shadoi: "wrap" a class method with a lambda. that is, have a function that gets passed the original method, and returns a lambda that replaces it (and it is then free to call the original method internally). the idea is that this can be done separately for each method (unlike subclassing). I guess if I knew the right way to inject an arbitrary lambda into a class definition, that could do it too.
[18:48:45] B1n4r10: has joined #ruby
[18:49:06] shadoi: sphex: This will get you mostly there, you can also use the new lambda syntax http://mudge.name/2011/01/26/passing-blocks-in-ruby-without-block.html
[18:49:37] Rodya_: has joined #ruby
[18:50:23] mary5030: has joined #ruby
[18:51:05] bf4: has joined #ruby
[18:51:05] peter_paule: has joined #ruby
[18:51:13] shadoi: this may help also: http://stackoverflow.com/questions/1891429/decorators-in-ruby-migrating-from-python
[18:51:18] ta: has joined #ruby
[18:51:51] Palmer11_: has joined #ruby
[18:52:30] shadoi: probably even better: http://yehudakatz.com/2009/07/11/python-decorators-in-ruby/
[18:52:35] dviola: Senjai: I've just entered the command you've suggested, openssl s_client -connect...
[18:52:41] dviola: Senjai: should I paste the output here?
[18:52:45] B1n4r10: has joined #ruby
[18:52:45] j416: has joined #ruby
[18:53:07] bricker: has joined #ruby
[18:53:15] Palmer11_: has joined #ruby
[18:53:18] vasilakisFiL: has joined #ruby
[18:54:39] _blizzy_: has joined #ruby
[18:55:17] dviola: http://sprunge.us/hdLX
[18:55:21] dviola: anyway, here it is ^
[18:55:30] sphex: shadoi: dammit.. it's complicated. :/ thanks for the links. I got the lambda/blocks bits mostly figured out. everything that has to do with modifiying classes really confuses.
[18:55:41] Rodya_: has joined #ruby
[18:56:09] shadoi: sphex: it's not a language primitive feature because it's always been possible with Ruby
[18:57:39] shadoi: IMO you don't need to do it with Ruby because blocks are able to do anything the language can do, rather than in python lambdas are only capable of a subset.
[18:57:49] sphex: yeah, I don't need anything exactly like decorators, but I just hoped for something simple that was decorator-ish. maybe I should just look into using "define_method" directly (some of the decorator implementation seem to use that).
[18:58:04] voker57: has joined #ruby
[18:58:08] shadoi: yeah it's pretty straightforward on the surface ;)
[18:58:17] shadoi: Just keep it simple
[18:58:21] al2o3-cr: has joined #ruby
[18:58:45] jhass: sphex: if you throw away all that useless abstraction and ways to solve it in your question and describe what you're actually doing, I'm sure we find an idiomatic solution
[18:59:04] baweaver: has joined #ruby
[19:01:07] sphex: jhass: oh TBH I'm not solving much of anything quite yet. I'm slowly porting some perl and python code and trying to figure out the best way to do it.
[19:01:40] sphex: and this channel is being *really* helpful, so thanks again
[19:02:18] toretore: the concept of decorators isn't really used in ruby - the problems they solve are solved differently
[19:02:41] toretore: or not at all
[19:02:43] CorrosiveOne: has joined #ruby
[19:02:52] charliesome: has joined #ruby
[19:02:59] kt2: has joined #ruby
[19:03:01] gwendall: has joined #ruby
[19:03:59] nwmcsween: has joined #ruby
[19:04:02] sphex: toretore: alright
[19:04:36] michael_mbp: has joined #ruby
[19:06:41] toretore: >> class Foo; def logger(m); alias_method "#{m}_undecorated", m; define_method m, *a; puts "Calling #{m} with args: #{a.inspect}"; send("#{m}_undecorated"); end; end; def bar(*a); puts "Hello from bar"; end; logger :bar; end; Foo.new.bar
[19:06:42] ruboto: toretore # => /tmp/execpad-0ea459e9131d/source-0ea459e9131d:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/388244)
[19:06:50] Rodya_: has joined #ruby
[19:07:14] GnuYawk: has joined #ruby
[19:07:14] GnuYawk: has joined #ruby
[19:07:57] toretore: >> class Foo; def logger(m); alias_method "#{m}_undecorated", m; define_method m, *a { puts "Calling #{m} with args: #{a.inspect}"; send("#{m}_undecorated"); }; end; def bar(*a); puts "Hello from bar"; end; logger :bar; end; Foo.new.bar
[19:07:58] ruboto: toretore # => undefined method `logger' for Foo:Class (NoMethodError) ...check link for more (https://eval.in/388246)
[19:08:17] toretore: >> class Foo; def self.logger(m); alias_method "#{m}_undecorated", m; define_method m, *a { puts "Calling #{m} with args: #{a.inspect}"; send("#{m}_undecorated"); }; end; def bar(*a); puts "Hello from bar"; end; logger :bar; end; Foo.new.bar
[19:08:18] ruboto: toretore # => undefined method `a' for Foo:Class (NoMethodError) ...check link for more (https://eval.in/388247)
[19:08:30] toretore: you get the idea
[19:09:55] toretore: >> class Foo; def self.logger(m); alias_method "#{m}_undecorated", m; define_method(m){|*a| puts "Calling #{m} with args: #{a.inspect}"; send("#{m}_undecorated", *a); }; end; def bar(*a); puts "Hello from bar"; end; logger :bar; end; Foo.new.bar
[19:09:56] ruboto: toretore # => Calling bar with args: [] ...check link for more (https://eval.in/388248)
[19:10:09] toretore: there we go
[19:10:41] toretore: need more coffee
[19:11:03] Papierkorb: has joined #ruby
[19:12:43] jhass: seriously
[19:12:52] startupality: has joined #ruby
[19:13:21] mfranzwa: has joined #ruby
[19:14:08] sphex: oh yeah... ok thanks for that. I guess I sorta see how decorating helpers could be moved to another module and run in the context of another class to decorate other methods (wrong terminology I'm sure). I'm prolly not going to end up doing that if it's not idiomatic with ruby, but it helps me to understand seeing how to do something like it.
[19:14:42] jhass: sphex: more common is to build methods that define other methods with the boilerplate
[19:15:10] nickfausnight: has joined #ruby
[19:17:30] shevy: jhass we seem to be steady at or over 1050 here now on #ruby
[19:17:48] jhass: on weekdays, yeah
[19:18:02] sphex: jhass: and possible have the "user class" pass it a block that they can then call internally when invoked?
[19:18:11] jhass: sphex: for example, yeah
[19:19:00] jhass: sphex: or you simply make it a runtime decorator with e.g. SimpleDelegator
[19:19:38] chussenot: has joined #ruby
[19:19:53] sphex: I sure missed them (multi-line) lambdas with some other language. I guess I gotta relearn how to use them.
[19:20:32] gregf: has joined #ruby
[19:20:47] Pwnna: has left #ruby: ("Leaving")
[19:21:17] Yiota: has joined #ruby
[19:21:22] sphex: jhass: ok, lemme ri(1) that. thanks for the infos.
[19:21:36] charliesome: has joined #ruby
[19:23:20] Xeago: has joined #ruby
[19:25:05] serivich: has joined #ruby
[19:25:40] soxet: has joined #ruby
[19:26:55] jackjackdripper: has joined #ruby
[19:28:01] Shoutsid: has joined #ruby
[19:28:15] soxet: has joined #ruby
[19:29:04] Musashi007: has joined #ruby
[19:29:58] zotherstupidguy: has joined #ruby
[19:30:45] shadoi: has joined #ruby
[19:31:56] soxet: has left #ruby: ()
[19:34:23] MatthewsFace: has joined #ruby
[19:34:42] ruby-lang194: has joined #ruby
[19:35:31] soxet: has joined #ruby
[19:35:35] workmad3: has joined #ruby
[19:35:47] j4cknewt: has joined #ruby
[19:36:40] momomomomo_: has joined #ruby
[19:36:45] bricker: has joined #ruby
[19:36:48] ruby-lang452: has joined #ruby
[19:38:32] soxet: has joined #ruby
[19:40:20] Xiti: has joined #ruby
[19:41:41] mikecmpbll: has joined #ruby
[19:42:19] Xeago: has joined #ruby
[19:43:02] bnobu: has joined #ruby
[19:43:17] choke: has joined #ruby
[19:44:46] segfalt: has joined #ruby
[19:45:28] MatthewsFace: has joined #ruby
[19:46:50] eggoez: has joined #ruby
[19:46:57] momomomomo: has joined #ruby
[19:47:21] bruno-: has joined #ruby
[19:47:37] dopie: has joined #ruby
[19:49:53] cvtsx1: has joined #ruby
[19:50:30] chouhoulis: has joined #ruby
[19:51:34] simplyianm: has joined #ruby
[19:53:43] MaciejCzyzewski: has joined #ruby
[19:54:48] x1337807x: has joined #ruby
[19:55:00] djbkd: has joined #ruby
[19:55:52] chouhoulis: has joined #ruby
[19:56:29] MaciejCzyzewski: has left #ruby: ()
[19:56:35] Xeago: has joined #ruby
[19:56:40] Alayde: has joined #ruby
[19:59:54] t0rrieri: has joined #ruby
[20:01:00] Zai00: has joined #ruby
[20:03:13] nofxx: has joined #ruby
[20:03:15] nofxx: has joined #ruby
[20:04:08] gwendall: has joined #ruby
[20:04:14] _ixti_: has joined #ruby
[20:04:46] zendrix: has joined #ruby
[20:04:53] yqt: has joined #ruby
[20:06:01] workmad3: has joined #ruby
[20:06:14] charliesome: has joined #ruby
[20:07:19] kadoppe: has joined #ruby
[20:07:23] airy: has joined #ruby
[20:09:32] airy: how's ruby helpful in havking
[20:09:53] swgillespie: has joined #ruby
[20:10:45] choke: has joined #ruby
[20:11:19] MaciejCzyzewski: has joined #ruby
[20:11:37] Xeago: has joined #ruby
[20:12:01] zeroDivisible: has joined #ruby
[20:12:10] miah: you can hack anything at ruby-lang.com
[20:12:42] Pumukel: has joined #ruby
[20:13:12] miah: anything at all. the only limit is yourself.
[20:13:33] stryek: has joined #ruby
[20:13:52] dfockler: in case of a monarchy, rubies can help you have kings
[20:14:43] k3asd`: has joined #ruby
[20:15:32] victortyau: has joined #ruby
[20:16:01] airy: m saying regarding making of virus, pen testing
[20:16:21] miah: try #metasploit
[20:17:03] benlieb_: has joined #ruby
[20:17:04] Xeago: has joined #ruby
[20:17:11] airy: dlocker ??
[20:18:43] tsvenson: has joined #ruby
[20:19:50] RickHull: has joined #ruby
[20:20:39] vdamewood: has joined #ruby
[20:21:46] zotherstupidguy: has joined #ruby
[20:23:08] bronson: has joined #ruby
[20:23:13] allomov: has joined #ruby
[20:23:42] tsvenson: has joined #ruby
[20:24:02] s2013: has joined #ruby
[20:24:18] hinbody: has joined #ruby
[20:25:21] jfarmer: has joined #ruby
[20:25:36] charliesome: has joined #ruby
[20:26:00] workmad3: has joined #ruby
[20:26:28] finisherr: has joined #ruby
[20:26:45] platzhirsch: has joined #ruby
[20:27:06] Xeago: has joined #ruby
[20:28:05] marr: has joined #ruby
[20:28:28] giuseppesolinas: has joined #ruby
[20:28:39] Rodya_: has joined #ruby
[20:28:41] momomomomo: has joined #ruby
[20:29:02] Pentan_p: has joined #ruby
[20:29:55] nobitanobi: has joined #ruby
[20:30:53] peter_paule: has joined #ruby
[20:31:47] musty: metasploit, for virii?
[20:32:02] _blizzy_: I like what github did for their logo.
[20:33:15] lxsameer: has joined #ruby
[20:33:16] lxsameer: has joined #ruby
[20:33:27] fantazo: has joined #ruby
[20:33:43] shevy: that rainbow thing?
[20:33:46] symm-: has joined #ruby
[20:34:18] _blizzy_: shows that github is supporting lgbt.
[20:34:31] Yiota: has joined #ruby
[20:35:12] khebbie: has joined #ruby
[20:35:18] blue_deref: has joined #ruby
[20:36:28] MatthewsFace: has joined #ruby
[20:36:39] miah: considering their HQ is in San Francisco, it would be really dumb of them not to.
[20:37:15] miah: but honestly, the startup space tends to be horrible for LGBT people.
[20:37:16] ytti: it's non-optional opinion to have
[20:37:21] momomomomo: has joined #ruby
[20:37:28] ytti: to have survivable product
[20:37:28] eam: miah: relative to other industries?
[20:37:38] miah: eam: eh, somewhat.
[20:37:42] ytti: (personally, i'm pro lbgt)
[20:37:49] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[20:37:54] jhass: nonetheless ;)
[20:37:54] miah: i am the T in LGBT so.. ya.
[20:37:55] ytti: but i'm somewhat annoyed how technology and politics are being mixed
[20:37:58] miah: agree =)
[20:38:10] miah: agree with offtopic
[20:38:18] jhass: politics go over there please :)
[20:38:37] commondream: has joined #ruby
[20:38:38] chussenot: has joined #ruby
[20:40:37] vasilakisFiL: has joined #ruby
[20:42:45] allomov: has joined #ruby
[20:43:04] _blizzy_: I'm the G in LGBT.
[20:43:13] _blizzy_: but that's another topic. when does ruby 2.2.3 come out.
[20:43:28] _blizzy_: what version are we at anyway.
[20:43:44] _blizzy_: oh, thanks.
[20:43:45] kdfjioe22: has joined #ruby
[20:43:48] mozzarella: I'm the V in LGBTV
[20:43:53] _blizzy_: sorry about yesterday also, jhass
[20:43:57] jhass: not sure 2.2.3 will happen, 2.3 is scheduled in december iirc
[20:43:59] sphex: he came out, why can't 2.2.3?
[20:44:04] _blizzy_: I hope we can start off on the right foot.
[20:44:25] adaedra: But what if...
[20:44:25] kdfjioe22: has left #ruby: ()
[20:44:39] miah: why do we need 2.2.3?
[20:44:49] miah: i dont want more CVE :(
[20:44:53] adaedra: we need 3.1.4
[20:44:59] adaedra: then,
[20:45:02] adaedra: then,*
[20:45:09] adaedra: skipped a number there
[20:45:12] _blizzy_: then
[20:45:18] _blizzy_: keep going with the versions.
[20:45:56] sphex: just like TeX
[20:46:05] havenwood: I await the celebration when JRuby achieves *over* 9000.
[20:46:16] _blizzy_: never really played with JRuby
[20:46:21] _blizzy_: I'll stick to Java and Scala
[20:46:31] adaedra: XeTeX 3.14159265-2.6-0.99991 (TeX Live 2014)
[20:46:37] havenwood: _blizzy_: Try a little Ruby in your Scala. ;)
[20:46:43] _blizzy_: havenwood, what.
[20:46:48] havenwood: _blizzy_: RedBridge
[20:47:42] jderose: has joined #ruby
[20:47:59] millerti: has joined #ruby
[20:48:08] _blizzy_: I should touch up on my php, go, and java.
[20:48:32] _blizzy_: no ruby project ideas tho c:
[20:48:50] adaedra: Take over the world.
[20:48:55] adaedra: Sounds like a good ruby project.
[20:49:12] _blizzy_: require 'world'; world.takeover
[20:50:24] yfeldblum: has joined #ruby
[20:50:32] bartender: has joined #ruby
[20:51:42] zenguy_pc: has joined #ruby
[20:51:56] hck89: has joined #ruby
[20:52:43] nobitanobi: has joined #ruby
[20:53:57] pengin: has joined #ruby
[20:54:02] momomomomo: looool touch up on java
[20:54:11] momomomomo: I treat that as a JIT skill
[20:54:28] momomomomo: Fuck, need to write a ton of java this month? Quick, read Core Java
[20:54:50] momomomomo: takes like 3 days if you do it straight, doing ~25-50% of exercises
[20:54:59] _blizzy_: well, java has jobs. plus I'm ok with java.
[20:55:03] __butch__: has joined #ruby
[20:55:08] _blizzy_: which is why I said php also, and go just for fun.
[20:55:25] momomomomo: Ruby has jobs :P
[20:55:26] jenrzzz: has joined #ruby
[20:55:36] _blizzy_: yeah but ruby is my strongest language atm imo
[20:55:37] momomomomo: any language has jobs, just depends on what you want to do
[20:55:50] _blizzy_: I'd rather touch up on languages I'm not as strong with.
[20:56:17] eam: _blizzy_: write a ruby extension in another language
[20:56:20] MaciejCzyzewski: something really bad... 0.1 + 0.2 == 0.3 ruby says false???
[20:56:37] ljarvis: maciejczyzewski: that's intentional
[20:56:41] eam: maciejczyzewski: they are in fact different
[20:56:43] ljarvis: don't compare floats
[20:56:46] momomomomo: maciejczyzewski: http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
[20:56:48] jhass: maciejczyzewski: welcome to the joys of floating point arithmetic
[20:57:17] momomomomo: if you want to compare decimals, use BigDecimal
[20:57:21] doodleha_: has joined #ruby
[20:57:25] blackmesa: has joined #ruby
[20:57:26] momomomomo: http://ruby-doc.org/stdlib-2.1.1/libdoc/bigdecimal/rdoc/BigDecimal.html
[20:57:53] MaciejCzyzewski: i will read, thx
[20:57:57] eam: maciejczyzewski: computers use base 2, and while numbers like .1 are terminating decimals in base 10 they are not necessarily in base 2
[20:58:11] eam: changing the number base changes which fractional values can be represented with precision
[20:58:46] MaciejCzyzewski: in other langs it works correct ;)
[20:58:49] luckyno7: has joined #ruby
[20:58:56] eam: maciejczyzewski: that's probably untrue
[20:59:02] MaciejCzyzewski: pffuu... python...
[20:59:10] eam: it's IEEE floats in all cases
[20:59:13] Aria: very few do this.
[20:59:31] MaciejCzyzewski: node/javascript works ok
[21:00:05] ljarvis: "javascript works ok"
[21:00:08] ljarvis: said noone ever
[21:00:30] benlieb_: has joined #ruby
[21:00:31] Versality: has joined #ruby
[21:00:36] endash: has joined #ruby
[21:00:44] GPrime: has joined #ruby
[21:00:45] eam: maciejczyzewski: you are wrong btw, it is false in python
[21:00:47] rocknrollMarc: has joined #ruby
[21:00:48] Aria: > 0.2 + 0.1 == 0.3
[21:00:50] Aria: (also node)
[21:00:59] momomomomo: most sane languages will provide false
[21:01:00] Aria: Javascript works okay.
[21:01:03] _blizzy_: javascript works ok
[21:01:03] eam: it will be false in any language which implements IEEE floating point, including perl, python, ruby, C, C++
[21:01:06] Aria: (there, now someone's said it)
[21:01:12] eam: javascript doesn't have proper numerics
[21:01:21] momomomomo: are you shitting me?
[21:01:22] eam: it's actually broken in that it works
[21:01:23] Aria: Well, depending on how you define proper.
[21:01:28] Scripore: has joined #ruby
[21:01:31] eam: Aria: defined by the IEEE flaoting point specification
[21:01:36] bf4: has joined #ruby
[21:01:46] shum: has joined #ruby
[21:01:48] eam: we have standards for that and it's built into our CPU :)
[21:01:49] Aria: Javascript has only one number type! \o/ ... it's IEEE double .... /m\
[21:02:11] _blizzy_: what about in php
[21:02:13] momomomomo: http://adripofjavascript.com/blog/drips/avoiding-problems-with-decimal-math-in-javascript.html
[21:02:24] havenwood: maciejczyzewski: Try with Rationals instead of Floats: 0.2r + 0.1r == 0.3r
[21:02:43] eam: _blizzy_: php is just like everyone else (returns false)
[21:03:07] towski_: has joined #ruby
[21:03:30] miah: http://www.decontextualize.com/wp-content/uploads/2010/01/php-loose-comparisons.png
[21:03:33] _blizzy_: eam, oh ok. thxs.
[21:03:34] havenwood: maciejczyzewski: If you want to compare Floats you'll want to check that they're within delta of each other or have a relative error less than epsilon.
[21:03:51] MaciejCzyzewski: havenwood: yeap
[21:04:11] havenwood: maciejczyzewski: And if you use Floats with money please tell me where so I can get rich.
[21:04:38] havenwood: Those pennies add up!
[21:04:43] adaedra: Money money money ???
[21:05:19] jderose: Hey all, I'm having an odd issue trying to require aws-sdk --> https://gist.github.com/jcderose/f79c532ba5e12d96f52e
[21:05:40] _blizzy_: I'm trying to give atom a chance
[21:05:44] chrisseaton: maciejczyzewski: another way to think about it is that there are an uncountable number of real numbers, so of course your computer isn't going to be able to represent them all as it only has finite RAM
[21:05:57] phutchins: has joined #ruby
[21:08:41] bartender: has joined #ruby
[21:08:44] zendrix: has joined #ruby
[21:10:12] findaway: has joined #ruby
[21:10:22] Al3ks: has joined #ruby
[21:10:44] ndrei: has joined #ruby
[21:12:15] charliesome: has joined #ruby
[21:15:09] _blizzy_: I think I'll add a plugin system to my bot
[21:15:16] _blizzy_: once I get battles working with ruby.
[21:16:34] simplyianm: has joined #ruby
[21:16:54] peter_paule: has joined #ruby
[21:17:22] jfarmer: jderose I assume you've run `bundle install`?
[21:17:29] sp4rrow_: has joined #ruby
[21:17:46] Yiota: has joined #ruby
[21:19:30] findaway: has joined #ruby
[21:21:05] Yiota: has joined #ruby
[21:22:26] yardenbar: has joined #ruby
[21:22:49] x1337807x: has joined #ruby
[21:24:01] jderose: jfarmer yes and that didn't work. I should also mention I'm running this via test kitchen for a VM. I found an article that mentioned the Chef built-in ruby might have a different gem path than the VM's Ruby installation.
[21:24:17] jfarmer: jderose How are you running Chef?
[21:24:31] jfarmer: jderose Also, you can print out the library path
[21:24:49] jfarmer: http://stackoverflow.com/questions/9474299/what-are-the-paths-that-require-looks-up-by-default
[21:24:59] simplyianm: has joined #ruby
[21:25:16] jfarmer: It's the $LOAD_PATH variable, so you can actually check if it differs between Chef and (say) irb.
[21:25:56] roolo: has joined #ruby
[21:26:48] jackjackdripper: has joined #ruby
[21:26:57] failshell: has joined #ruby
[21:27:59] jderose: jfarmer shouldn't my Gemfile tell the recipe to look for the aws-sdk gem at rubygems.org?
[21:28:19] finisherr: has joined #ruby
[21:28:43] Yiota: has joined #ruby
[21:30:06] baweaver: has joined #ruby
[21:30:21] zotherstupidguy: has joined #ruby
[21:31:10] miah: if you're using chef omnibus, its all in /opt/chef/embedded
[21:31:14] sinkensabe: has joined #ruby
[21:31:24] sdwrage2: has joined #ruby
[21:31:28] jderose: miah, I'm using chef omnibus
[21:31:37] simplyianm: has joined #ruby
[21:31:44] ndrei: has joined #ruby
[21:32:09] jfarmer: jderose That's not how Gemfiles work.
[21:32:20] jfarmer: jderose The "source" line only tells bundler where to download the gems from.
[21:33:00] jackjackdripper1: has joined #ruby
[21:33:31] jderose: Also, to answer your other question: I'm running Chef via test kitchen (which loads the Chef omnibus)
[21:33:34] miah: so, chef is getting installed automatically by test-kitchen in the environment being tested (a vm)
[21:33:39] miah: bundler doesnt really come into play
[21:33:47] miah: unless you are using a custom deployment (and not chef omnibus)
[21:33:55] gambl0re: has joined #ruby
[21:34:02] ledestin: has joined #ruby
[21:34:08] wildroman2: has joined #ruby
[21:34:09] miah: now, bundler may come into play _locally_ with your cookbook and test-kitchen. but probably not.
[21:34:18] Scripore: has joined #ruby
[21:34:35] jfarmer: miah My first guess was that whatever was running the code wasn't using "bundle exec ..."
[21:34:41] miah: but honestly, the best place for chef questions is #chef
[21:34:46] sinkensabe: has joined #ruby
[21:35:00] baweaver: has joined #ruby
[21:35:01] Sdwrage_: has joined #ruby
[21:35:08] miah: there is no bundle exec with chef
[21:35:09] jderose: I'll check out #chef
[21:35:18] jfarmer: miah Fair enough.
[21:35:19] miah: unless you are running from a Gemfile, which _nobody_ does
[21:35:25] miah: (apart from me)
[21:35:51] s2013: has joined #ruby
[21:36:25] mfranzwa: has joined #ruby
[21:36:46] Pwnna: has joined #ruby
[21:37:34] jderose: has left #ruby: ()
[21:37:47] Pwnna: has left #ruby: ("Leaving")
[21:37:49] miah: try /part or /quit ;)
[21:38:17] jderose: has joined #ruby
[21:38:33] jderose: has left #ruby: ()
[21:39:21] raelon: has joined #ruby
[21:39:41] craysiii: has joined #ruby
[21:40:02] choke: has joined #ruby
[21:41:40] A205B064: has joined #ruby
[21:42:44] chipotle: has joined #ruby
[21:43:03] vasilakisFiL: has joined #ruby
[21:43:16] mfranzwa: has joined #ruby
[21:43:34] dgutierrez1287: has joined #ruby
[21:43:38] allomov: has joined #ruby
[21:44:16] eggoez: has joined #ruby
[21:44:28] revoohc: has joined #ruby
[21:44:34] wildroman2: has joined #ruby
[21:45:01] FernandoBasso: has joined #ruby
[21:45:10] simplyianm: has joined #ruby
[21:45:17] jackjackdripper: has joined #ruby
[21:45:37] zendrix: has joined #ruby
[21:47:09] failshell: has joined #ruby
[21:49:51] gwendall: has joined #ruby
[21:52:38] failshell: has joined #ruby
[21:53:13] zendrix: has joined #ruby
[21:53:34] Zamyatin: has joined #ruby
[21:54:09] renderful: has joined #ruby
[21:56:03] aryaching: has joined #ruby
[21:56:18] dopie: has joined #ruby
[21:56:33] craysiii: has joined #ruby
[21:56:56] Sdwrage_: has left #ruby: ("Leaving")
[21:57:14] robustus: has joined #ruby
[21:59:24] lordkryss: has joined #ruby
[21:59:47] chipotle: has joined #ruby
[22:00:59] failshell: has joined #ruby
[22:00:59] choke: has joined #ruby
[22:01:20] decoponio: has joined #ruby
[22:02:21] bf4: has joined #ruby
[22:02:38] wallerdev2: has joined #ruby
[22:03:00] sinkensabe: has joined #ruby
[22:03:45] simplyianm: has joined #ruby
[22:03:53] Azure: has joined #ruby
[22:05:06] Santana: has joined #ruby
[22:05:26] choke: has joined #ruby
[22:06:14] senayar: has joined #ruby
[22:08:14] failshell: has joined #ruby
[22:09:24] kobain: has joined #ruby
[22:11:09] wildroman2: has joined #ruby
[22:12:16] simplyianm: has joined #ruby
[22:13:45] zotherstupidguy: has joined #ruby
[22:14:20] havenwood: >> 6.upto(9).map { |n| n.to_s(8).to_i }
[22:14:21] ruboto: havenwood # => [6, 7, 10, 11] (https://eval.in/388281)
[22:14:48] havenwood: Squarefree numbers congruent to 2 or 3 mod 4. ;)
[22:15:08] havenwood: Hem, what's that in Ruby..
[22:16:26] jhass: http://oeis.org/A014689 a(n) = prime(n)-n, the number of nonprimes less than prime(n).
[22:16:56] riotjones: has joined #ruby
[22:17:04] axl_: has joined #ruby
[22:17:12] jhass: Senjai broke it though
[22:17:47] jhass: "Numbers which cannot be written as a sum of squares > 1" too
[22:18:45] jhass: hrm, there are quite a few with 6,7,10,11,14
[22:18:55] jhass: but not a single one that has 2015 next
[22:19:01] finisherr: has joined #ruby
[22:20:08] failshell: has joined #ruby
[22:20:18] sphex: classic Senjai
[22:20:25] aryaching: has joined #ruby
[22:20:47] sp4rrow_: has joined #ruby
[22:20:55] jhass: there's one with 6,7,10,11,14,15,20
[22:21:09] jhass: Numbers n such that S(n) is a palindromic prime, where S(n) is the Kempner function A002034
[22:22:02] Rubie: has joined #ruby
[22:22:29] adaedra: Stop breaking fun, Senjai!
[22:23:08] sphex: so I just noticed that ruby seems to have built-in bignum support. that's nice.
[22:23:41] uber: has joined #ruby
[22:24:18] sphex: not sure what I'm gonna do with them since I'm not numerate :/
[22:25:22] adaedra: >> 123456789123456789123456789.class
[22:25:23] ruboto: adaedra # => Bignum (https://eval.in/388288)
[22:25:35] adaedra: It's automatic and transparent, iirc
[22:25:55] B1n4r10: has joined #ruby
[22:26:59] failshell: has joined #ruby
[22:28:07] sphex: adaedra: oh yeah.. I see them turning from Fixnum to Bignum starting from 2**30.
[22:28:24] zenspider: 2 bits used to encode types into the pointers
[22:28:26] sphex: I guess ruby must be using Lisp-like tagged pointers.
[22:29:42] Ox0dea: has joined #ruby
[22:30:08] Ox0dea: >> (0..10).map { |id| ObjectSpace._id2ref(id) rescue :unused }
[22:30:09] ruboto: Ox0dea # => [false, 0, true, 1, nil, 2, :unused, 3, :unused, 4, :unused] (https://eval.in/388289)
[22:30:14] havenwood: >> require 'prime'; 6.upto(Float::INFINITY).lazy.select { |n| (n ** 3 - n + 1).prime? }.first 6
[22:30:15] ruboto: havenwood # => [6, 7, 10, 11, 14, 15] (https://eval.in/388290)
[22:30:40] Ox0dea: Huh, those are very different results than I see on my 64-bit machine.
[22:31:00] havenwood: Ox0dea: => [false, 0, 2.0, 1, :unused, 2, -2.0, 3, nil, 4, 2.0000000000000004]
[22:31:03] musty: has joined #ruby
[22:31:06] Ox0dea: Yep, those're mine.
[22:31:37] al2o3-cr1: has joined #ruby
[22:31:50] blackmesa: has joined #ruby
[22:32:25] pengin: has joined #ruby
[22:33:51] axl_: has joined #ruby
[22:33:54] sphex: oh great.. I see ruby has a Rational class too. Too bad integer division doesn't yield a rational by default, then it would have been just like Scheme's numeric tower.
[22:34:04] zenspider: require "mathm"
[22:34:26] zenspider: oops. mathn
[22:34:31] havenwood: >> require 'mathn'; 1.0 + 2.0 == 3.0
[22:34:32] ruboto: havenwood # => true (https://eval.in/388291)
[22:34:53] zenspider: and latest versions of ruby have an "r" suffix
[22:34:54] swgillespie: has joined #ruby
[22:35:11] ruboto: zenspider # => (2/3) (https://eval.in/388292)
[22:35:12] sphex: is this a global effect though? could be a bit dangerous for other code...
[22:35:27] zenspider: >> require "mathn"; 2/3
[22:35:28] ruboto: zenspider # => (2/3) (https://eval.in/388293)
[22:35:43] jenrzzz: has joined #ruby
[22:35:49] zenspider: 2/3r is a better route to go
[22:36:01] Ox0dea: >> [2 / 3, require('mathn'), 2 / 3]
[22:36:02] ruboto: Ox0dea # => [0, true, (2/3)] (https://eval.in/388294)
[22:36:07] Ox0dea: So not quite "global".
[22:36:30] zenspider: well, yes it is. as soon as your require it all math uses rationals
[22:36:40] zenspider: but even with "r" you're still potentially sending a rational down a code pipeline that doesn't expect it.
[22:38:02] hal_9000: i don???t think i even covered ???r??? in the book :-/
[22:38:03] sphex: ah right, an it'll stay a rational and "propagate" even if it represents an integer?
[22:38:32] wildroman2: has joined #ruby
[22:38:39] qhartman: has joined #ruby
[22:39:06] zenspider: hal_9000: it's very new, no?
[22:39:10] zenspider: I thought 2.2+
[22:39:27] hal_9000: i think so yes
[22:39:28] sphex: works on 2.1.6 here
[22:39:45] zenspider: sphex: mmm... no, I think it _should_ downcast itself. oops. no, it doesn't.
[22:39:51] zenspider: >> 2/3r * 3/2r
[22:39:52] ruboto: zenspider # => (1/1) (https://eval.in/388295)
[22:39:52] hal_9000: anyway, it *could* have got into 3rd ed and maybe should have
[22:40:36] sphex: zenspider: without "mathn", I guess it shouldn't downcast since calculations could "derationalize" themselves in the middle of it.
[22:40:39] adaedra: >> 1/2r * 3
[22:40:40] ruboto: adaedra # => (3/2) (https://eval.in/388296)
[22:40:44] ruboto: Ox0dea # => (1/1) (https://eval.in/388297)
[22:40:52] Ox0dea: 21>> RUBY_VERSION
[22:40:53] ruboto: Ox0dea # => "2.1.3" (https://eval.in/388298)
[22:40:54] adaedra: it may be fine to have a rationnal leak
[22:41:30] zenspider: sphex: good point
[22:41:54] hal_9000: sphex: are you feeling waspish?
[22:41:57] ruboto: Ox0dea # => (0+(1/1)*i) (https://eval.in/388299)
[22:42:06] Ox0dea: Does any other language support multiple numeric suffixes?
[22:42:11] zenspider: ruby_parser still doesn't handle these. :(
[22:42:27] charliesome: has joined #ruby
[22:43:31] failshell: has joined #ruby
[22:44:54] sphex: zenspider: thanks for the infos
[22:45:08] Sin90: has joined #ruby
[22:45:15] zenspider: no prob! that's what I'm here for
[22:45:16] wildroman2: has joined #ruby
[22:46:23] failshell: has joined #ruby
[22:46:27] sphex: hal_9000: yeah... picked my nick from GEB
[22:46:50] hal_9000: a classic book, i need to reread it
[22:46:57] dfockler: elixir is kind of weird
[22:47:16] failshell: has joined #ruby
[22:47:39] hal_9000: dfockler - probably :) in what way?
[22:47:58] dfockler: it's like functional ruby
[22:48:01] neanderslob: has joined #ruby
[22:48:29] hal_9000: sort of. i???m liking it, but the learning curve is a bit steep for me
[22:48:38] havenwood: Ox0dea: Try in Clojure: 36rOMGWTFBBQ #=> 69467462247446
[22:48:51] dfockler: I'm going through the ??tudes book
[22:49:31] zenspider: havenwood: you can do that in smalltalk too
[22:49:33] balazs: has joined #ruby
[22:49:50] zenspider: >> "OMGWTFBBQ".to_i 36
[22:49:51] ruboto: zenspider # => 69467462247446 (https://eval.in/388306)
[22:49:56] bf4: has joined #ruby
[22:50:03] zenspider: not quite the same ring to it
[22:50:35] dfockler: ringy enough for me
[22:50:39] failshell: has joined #ruby
[22:50:41] havenwood: >> Integer("OMGWTFBBQ", 36)
[22:50:42] ruboto: havenwood # => 69467462247446 (https://eval.in/388307)
[22:50:51] simplyianm: has joined #ruby
[22:51:29] swgillespie: has joined #ruby
[22:51:52] hal_9000: i like eating 3735928559.to_s(16)
[22:52:09] havenwood: zenspider: (string->number "OMGWTFBBQ" 36)
[22:52:57] Rubie: has joined #ruby
[22:55:07] _blizzy_: https://stackoverflow.com/ look at the logo
[22:55:17] bruno-: has joined #ruby
[22:55:24] craysiii: colors are gud
[22:55:53] MaciejCzyzewski: new? like github... but only for today
[22:56:24] MaciejCzyzewski: http://edition.cnn.com/2015/06/26/politics/supreme-court-same-sex-marriage-ruling/
[22:56:50] adaedra: yeah, lot of sites have a rainbow logo
[22:56:56] _blizzy_: this makes me like Github and SO more.
[22:57:06] adaedra: I saw one on reddit
[22:57:20] arescorpio: has joined #ruby
[22:57:39] _blizzy_: yeah, makes me like Reddit more too. :) I'm gay, so this is a great day.
[22:58:03] adaedra: I hope it angers the anti- crowd.
[22:58:38] _blizzy_: feed me your tears.
[22:58:50] craysiii: like OMG im so bad
[22:58:55] craysiii: how can we treat people as PEOPLE
[22:59:52] zenspider: remember to use minitest/pride folks
[23:00:10] MaciejCzyzewski: zenspider: why?
[23:00:14] adaedra: https://twitter.com/Cel_ina/status/614510013298700288
[23:00:20] simplyianm: has joined #ruby
[23:01:20] balazs: has joined #ruby
[23:01:21] adaedra: DeviantArt, too, and Twitter adds rainbow hearts next to #LoveWins
[23:01:45] Ox0dea: maciejczyzewski: Because fabulous runs?
[23:02:10] adaedra: Comments are so annoying tho -_-
[23:02:51] blackmes1: has joined #ruby
[23:02:52] sfarley: has joined #ruby
[23:03:15] x1337807x: has joined #ruby
[23:03:54] zenspider: maciejczyzewski: http://www.zenspider.com/~ryan/minitest_pride.mov
[23:04:01] zenspider: view that first
[23:04:08] MaciejCzyzewski: poland is going to sleep...
[23:04:16] MaciejCzyzewski: zenspider: ok, one minute
[23:05:39] dented42: has joined #ruby
[23:05:40] gwendall: has joined #ruby
[23:06:09] jlast: has joined #ruby
[23:06:20] MaciejCzyzewski: zenspider: ooowwww... fancy
[23:06:44] dfockler: if you're using rspec you can use the nyan cat formatter
[23:06:56] MaciejCzyzewski: zenspider: like your blog too ;)
[23:07:12] adaedra: maciejczyzewski: you go into space?
[23:07:26] jlast: has joined #ruby
[23:08:13] MaciejCzyzewski: adaedra: using my magic spacecraft...
[23:08:17] MaciejCzyzewski: has left #ruby: ()
[23:08:19] dented42: has joined #ruby
[23:08:22] zenspider: I think someone did nyan for minitest too
[23:10:27] Scripore: has joined #ruby
[23:13:45] zenspider: drbrain: ping
[23:15:55] zenspider: hey. just commented on that ticket
[23:16:02] zenspider: wrt security... that is
[23:16:28] zenspider: 1) do you have any idea what's wrong with my old cert? It just says "invalid".
[23:16:46] zenspider: 2) is there a way to update the old cert such that ALL of my gems aren't invalidated?
[23:17:11] zenspider: 3) if no and no, is there a way to generate a cert that either works with ssh-agent or is passphraseless so it doesn't bug me when I package and release?
[23:18:15] MatthewsFace: has joined #ruby
[23:18:47] Schmidt: has joined #ruby
[23:19:10] baweaver: has joined #ruby
[23:20:29] zenspider: anyone else who understands rubygems + security is welcome to jump in too.
[23:22:14] iamninja: has joined #ruby
[23:24:02] zendrix: has joined #ruby
[23:24:34] drbrain: the old cert probably expired
[23:24:37] noobeh: has joined #ruby
[23:24:40] drbrain: openssl x509 -noout -text -in old_cert will say
[23:24:46] drbrain: (check dates)
[23:25:13] drbrain: you can strip the passphrase from the cert and RubyGems won't care
[23:25:28] zenspider: hrm. no, still valid
[23:25:33] zenspider: Not Before: Sep 17 23:07:07 2014 GMT Not After : Sep 17 23:07:07 2015 GMT
[23:25:46] zenspider: tho the file format is slightly different
[23:26:08] zenspider: the new one has Proc-Type and DEC-Info
[23:26:29] drbrain: I think those two entries are for the password on the .pem
[23:26:29] zenspider: clue on how to strip passphrase?
[23:26:45] balazs: has joined #ruby
[23:26:51] zenspider: ahhh... so if I nuke those lines it'll be clear of it?
[23:26:52] nobitanobi: has joined #ruby
[23:27:06] zenspider: that can't be right
[23:27:09] drbrain: try: openssl rsa -in privateKey.pem -out newPrivateKey.pem
[23:28:14] charliesome: has joined #ruby
[23:28:36] drbrain: the stupid thing about this security method is that you can't install from expired certs because there's no way to verify a certificate was properly signed way back when without a trusted third party
[23:29:03] zenspider: that stripped the passphrase
[23:29:12] zenspider: I can build and install with HighSecurity
[23:29:35] drbrain: so I think the other person in the ticket needs to trust your certificate
[23:29:49] finisherr: I???m getting a notification that I can???t re-push the same version and to try gem yank but I already yanked
[23:29:57] Muhannad: has joined #ruby
[23:30:01] finisherr: is it cached or something?
[23:30:04] drbrain: finisherr: you need to push a new version
[23:30:17] drbrain: if 1.2.3 was bad, yank, then push 1.2.4
[23:30:18] finisherr: Ok, thats fine
[23:30:29] drbrain: otherwise people don't know if they have the good one or the bad one
[23:30:34] bricker: yank is for removing bad versions, but you can't ever push the same version twice
[23:30:36] finisherr: yeah, good call
[23:30:42] finisherr: this will be 0.0.2
[23:31:17] noob: has joined #ruby
[23:31:23] GitGud: has joined #ruby
[23:31:27] zenspider: drbrain: so, suggestions on what to do about publishing w/ a new cert? as soon as I sync that up it means all my gems are invalid
[23:31:41] dgutierrez1287: has joined #ruby
[23:31:44] PaulCapestany: has joined #ruby
[23:32:28] zenspider: I guess my cert is "invalid" (still not sure why?), but an install of the published minitest under Medium w/ the new certs out there flat out blow up. makes the gem look compromised
[23:32:39] finisherr: nice, my vagrant plugin works!
[23:33:06] phutchins: has joined #ruby
[23:33:19] drbrain: zenspider: since we don't have a central certificate registry or signing service you'll need to pre-distribute the new cert
[23:33:23] drbrain: or sign the new cert with the old one
[23:33:48] zenspider: mmmm. what does that mean? that the new one will refer to the old one too?
[23:34:32] drbrain: it will be "issued by" the old one, but when the old one eventually expires it can invalidate the new one too
[23:34:51] zenspider: that sounds like a screw
[23:34:52] simplyianm: has joined #ruby
[23:35:20] drbrain: yeah, to be effective all the certificates should be signed by a CA somewhere
[23:35:26] drbrain: the same way website certificates work
[23:35:37] drbrain: but I sure don't have the security chops to write such a thing
[23:36:00] shinnya: has joined #ruby
[23:36:17] zenspider: % rm -rf xxx; gem i -i xxx -P MediumSecurity minitest -N
[23:36:17] zenspider: trusted root certificate /CN=ryand-ruby/DC=zenspider/DC=com checksum does not match signing root certificate checksum
[23:36:36] zenspider: that's with the new one trusted
[23:37:09] zenspider: oh! wait. I must have been tired last night
[23:37:29] zenspider: if I --add the old cert, everything Just Works???.
[23:37:40] zenspider: (actually, drunk)
[23:37:58] zenspider: it's the --add part that I think nobody understands
[23:38:08] drbrain: so much manual labor ????
[23:39:10] zenspider: mmmm... `curl ... | gem cert --add -` doesn't work
[23:40:06] serivich: has joined #ruby
[23:40:42] swgillespie: has joined #ruby
[23:41:31] drbrain: lib/rubygems/commands/cert_command.rb line 18 uses File.read which doesn't treat '-' specially
[23:41:53] finisherr: has joined #ruby
[23:42:13] al2o3-cr2: has joined #ruby
[23:42:29] sankaber: has joined #ruby
[23:42:41] zenspider: so, other than having cacert.org as my SSL cert for my https not be in ppl's root chain, my shit is actually working
[23:42:56] zenspider: I'm not sure how to tell curl that cacert.org is OK for https
[23:43:49] chipotle: has joined #ruby
[23:43:54] finisherr: has joined #ruby
[23:44:37] drbrain: I think you add it to Keychain
[23:45:26] zenspider: curl doesn't use that, unfortunately
[23:47:19] pl1ght: has joined #ruby
[23:48:52] Casey: has joined #ruby
[23:50:34] miah: you can use curl --capath <CA certificate directory>
[23:50:40] bf4: has joined #ruby
[23:51:53] zenspider: I just tried --cacert w/ the rootfile.... but I get curl: (51) SSL: certificate verification failed (result: 5)
[23:52:07] finisherr: has joined #ruby
[23:52:10] craysiii: http://stackoverflow.com/questions/27611193/curl-ssl-with-self-signed-certificate?rq=1
[23:52:13] zenspider: man I hate security. terribly obfuscated. terribly documented. ugh ugh ugh
[23:52:13] bronson: has joined #ruby
[23:52:24] miah: if you want to just kick it.. use -k =)
[23:52:30] dented42: has joined #ruby
[23:52:53] miah: -k == --insecure. it will use ssl. but it wont verify
[23:53:08] drbrain: /usr/bin/curl says it uses SecureTransport, which I would think meant Keychain but obviously doesn't work o_O
[23:53:16] zenspider: I'm trying to come up with a sequence that the security wonks will use w/o jumping down my throat
[23:53:35] bronson: has joined #ruby
[23:53:44] miah: odd that --cacert is giving you an error
[23:53:58] zenspider: drbrain: yeah. I found some stuff on SO that says the github blowup last year was digicert having a revoked cert in keychain. the fix was to remove it and then curl worked again.
[23:54:07] zenspider: miah: not sure I'm doing it right
[23:54:15] zenspider: I'm the whitest hat ever
[23:54:26] miah: what is the full command you're trying?
[23:54:35] zenspider: curl -o cacert.root.crt https://www.cacert.org/certs/root.crt; curl --cacert cacert.root.crt https://www.zenspider.com/~ryan/gem-public_cert.pem
[23:55:11] zenspider: I definitely have cacert's root cert in my keychain and approved
[23:55:38] zenspider: and just verified that my curl is /usr/bin/curl, so it _should_ use keychain
[23:56:05] charliesome: has joined #ruby
[23:56:36] miah: so its failing on downloading the cert from cacert.org over https
[23:56:37] drbrain: hrm: http://curl.haxx.se/mail/archive-2013-10/0036.html
[23:56:46] miah: kind of a chicken -> egg problem
[23:57:04] drbrain: 2. says --cacert doesn't work with Apple curl
[23:58:38] zenspider: miah: haha. *sigh*
[23:59:16] zenspider: I just tried that `openssl s_client` thing against my server and it does say:
[23:59:18] zenspider: depth=1 /O=Root CA/OU=http://www.cacert.org/CN=CA Cert Signing Authority/emailAddress=support@cacert.org
[23:59:18] zenspider: verify error:num=19:self signed certificate in certificate chain
[23:59:23] zenspider: so, I guess that's probably the same thing
[23:59:43] miah: you basically have to -k the initial download of cacerts ca.crt; then you can use that on your next requrest