« Back to channel list

#ruby - 04 November 2015

« Back 1 day Forward 1 day »
[00:00:08] linduxed: has joined #ruby
[00:00:42] A124: has joined #ruby
[00:03:19] ruby-lang358: ok ok thanks for the article, it clarifies a little bit the syntax; so how do you add an instance method to an already existing class, such as Object?
[00:03:50] ruby-lang358: i know you can reopen the class def with class Object; def foo(); ... end; end; but this syntax does not seem allowed inside a method
[00:04:00] EminenceHC: has joined #ruby
[00:04:42] ruby-lang358: my aim is to add an instance method to all objects :)
[00:04:53] momomomomo: has joined #ruby
[00:04:55] devoldmx: has joined #ruby
[00:05:05] symm-: has joined #ruby
[00:06:14] hotpancakes: has joined #ruby
[00:06:15] ruby-lang358: while with the syntax class << Object then it would add a static method
[00:06:57] havenwood: >> module Kernel; def example; :example end end; Object.instance_methods.grep /example/
[00:06:58] ruboto: havenwood # => [:example] (https://eval.in/462606)
[00:07:31] havenwood: ruby-lang358: I don't really understand the question. Maybe try rephrasing it or show a gist of the code you're looking to modify?
[00:09:36] eam: I think he's after:
[00:10:33] eam: >> Object.instance_eval { define_method :everywhere, lambda { "yup" } }; [[].everywhere, {}.everywhere]
[00:10:34] ruboto: eam # => ["yup", "yup"] (https://eval.in/462607)
[00:10:39] ruby-lang358: https://gist.github.com/anonymous/874ec48b723e17104ab2
[00:10:55] ruby-lang358: ouch I've to try this one eam
[00:10:56] Musashi007: has joined #ruby
[00:11:07] eam: question which I don't know: is define_method necessary there?
[00:11:53] rbennacer: has joined #ruby
[00:14:00] hotpancakes: has joined #ruby
[00:15:10] swgillespie: has joined #ruby
[00:15:44] raposa: has left #ruby: ()
[00:17:50] ruby-lang358: @eam that's what I was looking for. Many thanks!
[00:18:00] riotjones: has joined #ruby
[00:19:09] Musashi007: has joined #ruby
[00:22:52] momomomomo: has joined #ruby
[00:23:11] jgt1: has joined #ruby
[00:23:28] jpfuentes2: has joined #ruby
[00:23:30] pipework: Coraline: May I query you with some ideas regarding the contributor covenant?
[00:25:52] Coraline: I'm cooking dinner so I will be stepping away from time to time
[00:28:27] tmtwd: has joined #ruby
[00:28:51] idosedthekoolaid: has joined #ruby
[00:31:14] tkuchiki: has joined #ruby
[00:31:14] infamos: has joined #ruby
[00:31:31] momomomomo: contributor covenant pipework ?
[00:31:34] shevy: you can program while cooking!
[00:34:02] guardian: has joined #ruby
[00:34:02] platzhirsch: has joined #ruby
[00:34:27] platzhirsch: How do you use erb on the command line? I am running into simple errors like constant Date is not defined
[00:34:53] lagweezle: Oooh I know this! >.<
[00:35:10] simplyianm: has joined #ruby
[00:35:27] lagweezle: AH! You have to get the binding. Been a while.
[00:36:00] lagweezle: At least I think that is it...
[00:36:57] lagweezle: platzhirsch: http://stackoverflow.com/questions/8954706/render-an-erb-template-with-values-from-a-hash has good reading.
[00:37:35] platzhirsch: this uses a Ruby script anyway, that should work out of the box
[00:37:54] platzhirsch: instance eval binding
[00:38:24] lagweezle: http://ruby-doc.org/core-2.2.3/Binding.html beasty IIRC is the one that does the heavy lifting.
[00:39:22] tkuchiki: has joined #ruby
[00:40:30] veduardo: has joined #ruby
[00:41:05] platzhirsch: well, using Time instead of Date works
[00:41:10] lagweezle: platzhirsch: IIRC you can set up the variables in local scope, then ERB.new(<template>).result(binding()) but again, my memory is VERY foggy on this.
[00:41:32] platzhirsch: lagweezle: I am not using a Ruby script to do the ERB rendering, but the erb command line tool
[00:41:44] Xiti: has joined #ruby
[00:42:16] lagweezle: platzhirsch: OH! I have no idea, then, as I was unaware there was such a thing...
[00:42:56] platzhirsch: no worries :)
[00:45:19] riceandbeans: I have a loop on a variable.each_value that is getting skipped on a certain run, would that mean it's an empty array? if so, is there a good way to check if it's an empty array beforehand?
[00:46:13] mary5030: has joined #ruby
[00:46:32] momomomomo_: has joined #ruby
[00:50:59] wnd: has joined #ruby
[00:51:07] ellisTAA: i might have a contract position, and the guy wants me to create an api for his app. the app is an ios app, so am i correct to assume that if i build a rails api all incoming requests will be taken and forwarded to the ios??? server?
[00:51:37] TheNet: has joined #ruby
[00:52:15] Rollabunna: has joined #ruby
[00:52:54] riceandbeans: if you're writing an api why do you care if it's ios or droid or anything
[00:53:18] riceandbeans: do the api in whatever you want, rails, sinatra, whatever, long as you can handle rest I'm sure you'll be fine
[00:53:34] TheNet: Is there a way to have an array of objects without preventing those objects from being garbage collected?
[00:53:43] baweaver: has joined #ruby
[00:53:55] Axsuul: has joined #ruby
[00:53:59] mozzarella: has joined #ruby
[00:54:02] bruno-: has joined #ruby
[00:54:39] Axsuul: has joined #ruby
[00:56:56] shevy: you don't get a lot of control through the GC
[00:56:58] Axsuul: has joined #ruby
[00:57:07] shevy: you have GC.enable, GC.disable and GC.start
[00:58:52] kstuart: has joined #ruby
[00:59:28] shevy: >> GC.count
[00:59:30] ruboto: shevy # => 4 (https://eval.in/462626)
[01:00:44] rgtk: has joined #ruby
[01:01:32] mary5030: has joined #ruby
[01:01:46] ixti: has joined #ruby
[01:02:16] platzhirsch: has left #ruby: ()
[01:02:25] InternetFriend: has joined #ruby
[01:02:48] rgtk: has joined #ruby
[01:03:18] mary5030: has joined #ruby
[01:03:32] davedev24: has joined #ruby
[01:04:43] rgtk: has joined #ruby
[01:06:37] rgtk: has joined #ruby
[01:07:01] mattwildig: has joined #ruby
[01:07:48] ellisTAA: riceandbeans: thanks for the response. i am right though when i assume the user will hit the rails api i build and when that api gets hit it will then hit the app???s (ios or droid) backend right?
[01:08:06] Saloaty: has joined #ruby
[01:08:13] Saloaty: has left #ruby: ()
[01:08:30] rgtk: has joined #ruby
[01:09:32] Saloaty: has joined #ruby
[01:09:48] Saloaty: can someone please tell me why when in the rails console or irb, i add 3.48 + 0.01 and get 3.4899999999999998
[01:10:25] rgtk: has joined #ruby
[01:11:09] stannard: has joined #ruby
[01:11:43] vigintas: has joined #ruby
[01:12:04] d34th4ck3r: has joined #ruby
[01:12:16] rgtk: has joined #ruby
[01:13:14] roxtrongo: has joined #ruby
[01:14:10] rgtk: has joined #ruby
[01:14:55] Axsuul: has joined #ruby
[01:15:27] JammyHammy: has joined #ruby
[01:16:08] symbole: has joined #ruby
[01:16:51] beast: has joined #ruby
[01:17:18] ebbflowgo: has joined #ruby
[01:17:37] rgtk_: has joined #ruby
[01:17:58] Joufflu: has joined #ruby
[01:18:54] stannard: has joined #ruby
[01:19:31] rgtk: has joined #ruby
[01:20:21] chibs: has joined #ruby
[01:21:27] Axsuul: has joined #ruby
[01:21:43] rgtk: has joined #ruby
[01:22:49] chibs: has joined #ruby
[01:23:07] InternetFriend: has joined #ruby
[01:23:36] rgtk: has joined #ruby
[01:25:31] rgtk: has joined #ruby
[01:26:11] BraddPit1: has joined #ruby
[01:26:14] BraddPit1: has left #ruby: ()
[01:26:48] bb010g: has joined #ruby
[01:27:12] rgtk: has joined #ruby
[01:27:25] TheNet: has joined #ruby
[01:28:08] skcin7: has joined #ruby
[01:28:40] mdst: has joined #ruby
[01:29:16] rgtk: has joined #ruby
[01:29:20] weaksauce: saloaty look up floating point precision
[01:30:18] ellisTAA: has joined #ruby
[01:31:12] rgtk: has joined #ruby
[01:32:41] blackmes1: has joined #ruby
[01:32:42] rgtk: has joined #ruby
[01:34:12] trosborn: has joined #ruby
[01:34:38] rgtk: has joined #ruby
[01:35:02] matp: has joined #ruby
[01:35:52] juanpablo__: has joined #ruby
[01:35:53] tkuchiki: has joined #ruby
[01:37:45] jud^: has joined #ruby
[01:37:58] BTRE: has joined #ruby
[01:38:05] rgtk: has joined #ruby
[01:39:16] to_json: has joined #ruby
[01:39:16] to_json: has joined #ruby
[01:39:35] mistermo_: has joined #ruby
[01:39:36] willardg: has joined #ruby
[01:39:37] KensoDev: has joined #ruby
[01:39:40] ellisTAA: has joined #ruby
[01:40:16] rgtk: has joined #ruby
[01:41:52] jackjackdripper1: has joined #ruby
[01:41:59] rgtk: has joined #ruby
[01:43:23] borodin: has joined #ruby
[01:43:53] RobertBirnie: has joined #ruby
[01:44:04] rgtk: has joined #ruby
[01:44:06] Musashi007: has joined #ruby
[01:45:47] rgtk: has joined #ruby
[01:47:30] Bloomer: has joined #ruby
[01:47:47] houhoulis: has joined #ruby
[01:47:57] dfockler: has joined #ruby
[01:48:22] stannard: has joined #ruby
[01:48:34] idefine: has joined #ruby
[01:49:26] rgtk__: has joined #ruby
[01:51:39] rgtk: has joined #ruby
[01:51:44] safe: has joined #ruby
[01:52:14] idefine: has joined #ruby
[01:52:22] Saloaty: has left #ruby: ()
[01:53:18] ponga: has joined #ruby
[01:53:28] balazs: has joined #ruby
[01:53:33] rgtk: has joined #ruby
[01:53:35] zenguy_pc: has joined #ruby
[01:54:31] tjbiddle: has joined #ruby
[01:55:17] d34th4ck3r: has joined #ruby
[01:55:25] rgtk: has joined #ruby
[01:55:36] acke: has joined #ruby
[01:56:27] bruno-: has joined #ruby
[01:57:02] leafybas_: has joined #ruby
[01:57:20] rgtk: has joined #ruby
[01:59:12] rgtk: has joined #ruby
[01:59:19] mozzarella: has joined #ruby
[02:00:53] mistermocha: has joined #ruby
[02:00:57] rgtk: has joined #ruby
[02:01:05] idefine: has joined #ruby
[02:02:47] rgtk: has joined #ruby
[02:04:39] cjbischof_: has joined #ruby
[02:04:53] rgtk: has joined #ruby
[02:05:42] devoldmx: has joined #ruby
[02:06:12] gregf: has joined #ruby
[02:06:27] tigarcia: has joined #ruby
[02:06:47] rgtk: has joined #ruby
[02:07:04] hackeron: has joined #ruby
[02:07:04] DLSteve: has joined #ruby
[02:08:57] swgillespie: has joined #ruby
[02:09:28] HoloIRCUser: has joined #ruby
[02:10:12] rgtk: has joined #ruby
[02:11:32] BigDiesel007: has joined #ruby
[02:12:19] jaequery: has joined #ruby
[02:12:28] rgtk: has joined #ruby
[02:14:20] rgtk: has joined #ruby
[02:14:24] bit_owl: Is it considered bad to write ruby in functional approach?
[02:15:04] CVTJNII: has joined #ruby
[02:17:05] to_json: has joined #ruby
[02:17:05] to_json: has joined #ruby
[02:17:12] cjbischof_: has joined #ruby
[02:17:44] mdih: has joined #ruby
[02:17:49] rgtk_: has joined #ruby
[02:18:35] Renich: has joined #ruby
[02:18:48] riotjones: has joined #ruby
[02:18:55] mdih: has joined #ruby
[02:19:38] riotjones: has joined #ruby
[02:20:03] ledestin: has joined #ruby
[02:20:50] htmldrum: has joined #ruby
[02:21:14] Trynemjoel: has joined #ruby
[02:21:35] rgtk: has joined #ruby
[02:21:39] Radar: bit_owl: example?
[02:22:14] benlieb: has joined #ruby
[02:22:19] d34th4ck3r: has joined #ruby
[02:22:27] RobertBirnie: has joined #ruby
[02:22:30] stannard: has joined #ruby
[02:23:21] weaksauce: bit_owl why would you say it would be bad?
[02:24:30] weaksauce: select map and inject are all functional programming concepts really
[02:24:53] weaksauce: and those are so common that it's hard to say that it's bad
[02:25:10] PaulCape_: has joined #ruby
[02:25:14] bit_owl: I read from some blog about writing ruby in functional approach. They advice the reader not to use the approach in production code
[02:25:25] rgtk: has joined #ruby
[02:25:38] weaksauce: were they doing monads or something?
[02:25:49] jaequery: has joined #ruby
[02:25:50] bit_owl: Like using curry, immutable, and so
[02:26:11] bruce_lee2: has joined #ruby
[02:26:15] blubjr: those are good things
[02:26:28] mistermocha: has joined #ruby
[02:26:30] bruce_lee2: has joined #ruby
[02:26:36] EasyCo: Functional <3
[02:27:23] rgtk: has joined #ruby
[02:27:52] bit_owl: This is the link to the blog
[02:27:52] bit_owl: http://www.sitepoint.com/functional-programming-techniques-with-ruby-part-i/
[02:28:31] bit_owl: I'm still learning about functional, and I think i fall in love with the concepts
[02:28:44] skweek: has joined #ruby
[02:29:31] rgtk: has joined #ruby
[02:29:37] weaksauce: unless you are on the bleeding edge of performance and the GC pauses are relevant... functional programming is a good thing. but prematurely optimizing things because they might be a problem is not a good way to code
[02:30:54] EasyCo: What weaksauce said.
[02:31:09] EasyCo: Also worth checking: https://github.com/tcrayford/Values
[02:31:26] rgtk: has joined #ruby
[02:31:35] hxegon: has joined #ruby
[02:31:44] favadi: has joined #ruby
[02:32:12] weaksauce: EasyCo I was actually just talking about this over in swift... they decided to make all collection types value types
[02:32:21] roxtrongo: has joined #ruby
[02:32:55] weaksauce: and prefer structs(lightweight classes with pass by value and copy on write semantics) over classes
[02:33:06] idefine: has joined #ruby
[02:33:17] rgtk: has joined #ruby
[02:33:57] simplyianm: has joined #ruby
[02:34:05] bit_owl: I also start to use struct instead of hash on some kind of data set
[02:34:20] EasyCo: It's such a simple concept. It's beauty is in its simplicity.
[02:34:57] weaksauce: indeed. I think it's a good push
[02:35:05] jgt1: has joined #ruby
[02:35:11] rgtk: has joined #ruby
[02:35:49] bit_owl: Did you guys heard about ROM
[02:35:52] blackmes1: has joined #ruby
[02:36:10] DLSteve: has joined #ruby
[02:36:16] mdih: has joined #ruby
[02:36:22] EasyCo: Read only memory?
[02:36:40] EasyCo: Risk of mutiny?
[02:36:47] mozzarella: has joined #ruby
[02:36:55] bit_owl: Ruby Object Mapper
[02:37:05] rgtk: has joined #ruby
[02:37:17] mistermocha: has joined #ruby
[02:37:17] EasyCo: Damn, that's less exciting than risk of mutiny.
[02:38:08] gnarf: has joined #ruby
[02:38:48] TheNet: has joined #ruby
[02:38:55] freerobby: has joined #ruby
[02:39:01] rgtk: has joined #ruby
[02:40:37] kstuart: has joined #ruby
[02:40:53] rgtk: has joined #ruby
[02:41:55] bit_owl: lol. You don't like the idea?
[02:42:48] rgtk: has joined #ruby
[02:43:06] inteq: has joined #ruby
[02:44:32] rgtk: has joined #ruby
[02:45:45] Bloomer: has joined #ruby
[02:46:08] colegatron: has joined #ruby
[02:46:18] stannard: has joined #ruby
[02:46:36] rgtk: has joined #ruby
[02:47:20] lkba_: has joined #ruby
[02:47:38] idefine: has joined #ruby
[02:48:03] Limix: has joined #ruby
[02:50:05] rgtk_: has joined #ruby
[02:50:44] beauby: has joined #ruby
[02:52:02] Limix: has joined #ruby
[02:52:17] rgtk: has joined #ruby
[02:53:05] Rollabunna: has joined #ruby
[02:53:50] rgtk: has joined #ruby
[02:56:06] rgtk: has joined #ruby
[02:57:30] bruno-: has joined #ruby
[02:57:32] leafybas_: has joined #ruby
[02:57:51] acke: has joined #ruby
[02:58:00] rgtk: has joined #ruby
[02:59:28] ChargedLight: has joined #ruby
[02:59:53] rgtk: has joined #ruby
[03:01:36] mloy_: has joined #ruby
[03:01:44] rgtk: has joined #ruby
[03:01:52] roxtrongo: has joined #ruby
[03:03:34] rgtk: has joined #ruby
[03:05:30] rgtk: has joined #ruby
[03:05:37] Ray`: has joined #ruby
[03:06:01] wilsonc91: has joined #ruby
[03:06:04] JammyHammy: has joined #ruby
[03:06:05] JStoker: has joined #ruby
[03:06:36] Takumo: has joined #ruby
[03:06:37] Takumo: has joined #ruby
[03:06:46] [spoiler]: has joined #ruby
[03:07:20] gusTester: has joined #ruby
[03:07:20] lnx: has joined #ruby
[03:07:24] rgtk: has joined #ruby
[03:07:27] willardg: has joined #ruby
[03:07:31] oddmunds: has joined #ruby
[03:07:47] darkf: has joined #ruby
[03:08:13] swgillespie: has joined #ruby
[03:08:23] balazs: has joined #ruby
[03:08:55] idefine: has joined #ruby
[03:09:19] rgtk: has joined #ruby
[03:09:30] elektronaut: has joined #ruby
[03:09:35] Morrolan: has joined #ruby
[03:09:36] JStoker: has joined #ruby
[03:09:52] Limix: has joined #ruby
[03:10:05] balazs: has joined #ruby
[03:10:14] Bloomer: has joined #ruby
[03:10:59] jaequery: has joined #ruby
[03:11:11] rgtk: has joined #ruby
[03:12:30] TheNet: What's the name for the method that creates a class with the given instance variables?
[03:12:36] diegoaguilar: has joined #ruby
[03:13:38] favadi: has joined #ruby
[03:14:38] TheNet: kind of like a hash
[03:14:41] rgtk: has joined #ruby
[03:15:29] idefine: has joined #ruby
[03:16:54] rgtk: has joined #ruby
[03:18:47] rgtk: has joined #ruby
[03:18:48] TheNet: never mind, found it
[03:18:53] ebbflowgo: has joined #ruby
[03:18:54] TheNet: (it's Struct)
[03:19:05] rbennacer: has joined #ruby
[03:19:45] wilsonc91: has joined #ruby
[03:19:46] VladGh: has joined #ruby
[03:21:38] ebbflowgo: has left #ruby: ()
[03:21:56] ledestin: has joined #ruby
[03:22:14] rgtk: has joined #ruby
[03:24:29] rgtk: has joined #ruby
[03:24:36] juanpablo__: has joined #ruby
[03:26:00] rgtk: has joined #ruby
[03:28:03] rgtk: has joined #ruby
[03:28:12] p0wn3d__: has joined #ruby
[03:30:07] rgtk: has joined #ruby
[03:30:19] babblebre: has joined #ruby
[03:33:58] Coldblackice: has joined #ruby
[03:34:20] baweaver: has joined #ruby
[03:34:23] BigDiesel007: has joined #ruby
[03:34:34] idefine: has joined #ruby
[03:35:07] cmoney: has joined #ruby
[03:35:56] jgt1: has joined #ruby
[03:37:44] kaneis: has joined #ruby
[03:37:55] Axsuul: has joined #ruby
[03:38:19] EminenceHC: has joined #ruby
[03:39:07] Axsuul: has joined #ruby
[03:39:45] to_json: has joined #ruby
[03:39:45] to_json: has joined #ruby
[03:43:22] ESpiney: has joined #ruby
[03:44:30] d34th4ck3r: has joined #ruby
[03:46:00] arooni: has joined #ruby
[03:46:08] joneshf-laptop: has joined #ruby
[03:49:24] rbennacer: has joined #ruby
[03:49:58] Eiam_: has joined #ruby
[03:50:17] hotpancakes: has joined #ruby
[03:51:04] hectorsq: has joined #ruby
[03:53:48] Bloomer: has joined #ruby
[03:54:53] zenguy_pc: has joined #ruby
[03:56:26] blt: has joined #ruby
[03:56:54] duncannz: has joined #ruby
[03:56:59] finisherr: has joined #ruby
[03:57:11] Motoservo: has joined #ruby
[03:57:30] finisherr: Has anyone had trouble uploading a cookbook because one of it???s dependencies is deteremined to be missing by chef?
[03:57:45] finisherr: I see the dependency declared in the Berksfile and the metadata.rb
[03:57:55] finisherr: and i also see the cookbook in ~/.berkshelf/cookbooks
[03:58:30] acke: has joined #ruby
[03:58:31] bruno-: has joined #ruby
[03:58:34] leafybas_: has joined #ruby
[03:59:17] finisherr: wrong channel
[03:59:23] tjbiddle: has joined #ruby
[04:02:54] chibs: has joined #ruby
[04:05:21] swgillespie: has joined #ruby
[04:05:58] Aasha: has joined #ruby
[04:06:19] cjbischof_: has joined #ruby
[04:06:27] devoldmx: has joined #ruby
[04:06:31] renderful: has joined #ruby
[04:07:04] TheNet_: has joined #ruby
[04:07:15] blubjr`: has joined #ruby
[04:07:16] davedev24: has joined #ruby
[04:07:27] atmosx_: has joined #ruby
[04:07:37] darkf_: has joined #ruby
[04:07:38] cjbischof_: has joined #ruby
[04:08:01] Oatmeal: has joined #ruby
[04:08:28] AdamMeghji_: has joined #ruby
[04:08:35] bcavileer_: has joined #ruby
[04:08:37] iamdevnul_: has joined #ruby
[04:08:46] jeregrine_: has joined #ruby
[04:09:10] akahn_: has joined #ruby
[04:09:10] jxf_: has joined #ruby
[04:09:16] mwlang_: has joined #ruby
[04:09:19] benlakey_: has joined #ruby
[04:09:26] thesheff17_: has joined #ruby
[04:09:28] tjohnson_: has joined #ruby
[04:09:52] cstrahan_: has joined #ruby
[04:09:54] lacrosse_: has joined #ruby
[04:10:01] jlyndon_: has joined #ruby
[04:10:03] crdpink: has joined #ruby
[04:10:07] bove_: has joined #ruby
[04:10:07] [BNC]BLuEGoD: has joined #ruby
[04:10:17] alexblom_: has joined #ruby
[04:10:26] IcyDragon: has joined #ruby
[04:10:45] RobertBi_: has joined #ruby
[04:10:45] AckZ_: has joined #ruby
[04:10:54] kaspergr1bbe: has joined #ruby
[04:10:58] blackmes1: has joined #ruby
[04:11:27] haraoka: has joined #ruby
[04:11:31] ghr: has joined #ruby
[04:11:31] romero: has joined #ruby
[04:11:41] wldcordeiro: has joined #ruby
[04:11:45] Senjai: has joined #ruby
[04:12:17] amitchellbullard: has joined #ruby
[04:12:24] abbe: has joined #ruby
[04:12:45] j416: has joined #ruby
[04:13:12] greenbigfrog: has joined #ruby
[04:13:23] xxneolithicxx: has joined #ruby
[04:14:12] C0deMaver1ck: has joined #ruby
[04:14:13] xxneolithicxx: has joined #ruby
[04:14:24] jaxxstorm: has joined #ruby
[04:14:25] jsrn: has joined #ruby
[04:14:26] Laaw: has joined #ruby
[04:14:31] tris: has joined #ruby
[04:14:44] Meow-J: has joined #ruby
[04:14:53] SegFaultAX: has joined #ruby
[04:15:17] braincrash: has joined #ruby
[04:15:29] sfr^: has joined #ruby
[04:15:39] PlasmaStar: has joined #ruby
[04:15:57] znz_jp: has joined #ruby
[04:16:26] blackjid: has joined #ruby
[04:16:29] skarn: has joined #ruby
[04:16:30] mary5030: has joined #ruby
[04:16:31] universa1: has joined #ruby
[04:17:33] duoi: has joined #ruby
[04:17:42] patdohere: has joined #ruby
[04:19:54] gix: has joined #ruby
[04:20:26] riotjones: has joined #ruby
[04:20:56] tigarcia: has joined #ruby
[04:21:10] holsee_: has joined #ruby
[04:22:14] astrobun_: has joined #ruby
[04:23:12] _djbkd: has joined #ruby
[04:23:52] Musashi007: has joined #ruby
[04:25:47] Aasha: has joined #ruby
[04:27:21] pwnd_nsfw: has joined #ruby
[04:30:06] mistermocha: has joined #ruby
[04:32:04] hotpancakes: has joined #ruby
[04:32:42] idefine: has joined #ruby
[04:35:47] Ebok: has joined #ruby
[04:35:59] mary5030: has joined #ruby
[04:36:38] jgt1: has joined #ruby
[04:37:47] AlexRussia: has joined #ruby
[04:38:13] agent_white: has joined #ruby
[04:38:43] agent_white: Mmm sup dudes.
[04:41:25] sdfgsdfg: has joined #ruby
[04:44:56] CanTonic: has joined #ruby
[04:44:58] Bloomer: has joined #ruby
[04:45:50] idefine: has joined #ruby
[04:48:07] johnhamelink: has joined #ruby
[04:52:03] cwong_on_irc: has joined #ruby
[04:53:15] cwong_on_irc: has joined #ruby
[04:53:25] fedexo: has joined #ruby
[04:54:00] Rollabunna: has joined #ruby
[04:56:39] nertzy: has joined #ruby
[04:59:16] acke: has joined #ruby
[04:59:42] yfeldblum: has joined #ruby
[05:00:36] leafybas_: has joined #ruby
[05:02:45] BTRE: has joined #ruby
[05:02:56] sgambino: has joined #ruby
[05:03:33] nabinno: has joined #ruby
[05:05:48] SleepySensei: has joined #ruby
[05:06:17] CloCkWeRX: has joined #ruby
[05:06:44] devoldmx: has joined #ruby
[05:07:16] to_json: has joined #ruby
[05:07:16] to_json: has joined #ruby
[05:07:35] shevy: has joined #ruby
[05:11:31] Feyn: has joined #ruby
[05:13:01] diegoaguilar: has joined #ruby
[05:13:07] solenoids: has joined #ruby
[05:13:22] juanpablo__: has joined #ruby
[05:13:25] subscope: has joined #ruby
[05:15:49] safe: has joined #ruby
[05:16:46] subscope: has joined #ruby
[05:18:00] Emmanuel_Chanel: has joined #ruby
[05:18:47] shinenelson: has joined #ruby
[05:19:00] hotpancakes: has joined #ruby
[05:20:48] krz: has joined #ruby
[05:21:23] skcin7: has joined #ruby
[05:24:33] mrd_: has joined #ruby
[05:30:12] devbug: has joined #ruby
[05:30:28] charliesome: has joined #ruby
[05:31:06] kaneis: has joined #ruby
[05:31:18] aredridel: has joined #ruby
[05:31:35] rakm: has joined #ruby
[05:31:38] aps: has joined #ruby
[05:31:57] hotpancakes: has joined #ruby
[05:32:16] aps: Hi all. Where can I see the changelog from 2.2.2 -> 2.2.3?
[05:32:50] s00pcan: has joined #ruby
[05:33:36] aps: never mind, got it
[05:35:16] infamos: has joined #ruby
[05:35:41] exadeci: has joined #ruby
[05:37:23] jgt1: has joined #ruby
[05:37:31] kfpratt: has joined #ruby
[05:38:40] hotpancakes: has joined #ruby
[05:38:58] rabbithole: has joined #ruby
[05:41:06] jud: has joined #ruby
[05:41:13] dh64: has joined #ruby
[05:44:56] idefine: has joined #ruby
[05:45:13] idefine: has joined #ruby
[05:45:39] derailed: has joined #ruby
[05:45:59] baweaver: has joined #ruby
[05:49:36] Klumben: has joined #ruby
[05:51:10] astrobun_: has joined #ruby
[05:51:21] d34th4ck3r: has joined #ruby
[05:52:43] idefine: has joined #ruby
[05:52:59] idefine: has joined #ruby
[05:56:16] elton: has joined #ruby
[05:56:36] Limix: has joined #ruby
[05:57:09] favadi: has joined #ruby
[05:58:23] kies^: has joined #ruby
[05:58:56] lxsameer: has joined #ruby
[05:58:56] lxsameer: has joined #ruby
[06:00:33] hotpancakes: has joined #ruby
[06:01:24] Emmanuel_Chanel: has joined #ruby
[06:01:27] elton: has joined #ruby
[06:01:36] speaking1ode: has joined #ruby
[06:01:56] charliesome: has joined #ruby
[06:02:18] CanTonic: has joined #ruby
[06:02:21] webdeveloper: has joined #ruby
[06:02:25] webdeveloper: may i ask a question?
[06:02:40] Radar: webdeveloper: yes
[06:02:51] Radar: You could even ask more than one question.
[06:02:54] webdeveloper: you're so nice :)
[06:03:10] webdeveloper: why are names like speakingchode allowed on here?
[06:03:18] chibs: has joined #ruby
[06:03:19] webdeveloper: don't you have children and morals in this channel?
[06:03:43] Radar: Do you have a question about Ruby?
[06:07:27] sross_work|2: has joined #ruby
[06:08:40] Ropeney: webdeveloper: whats wrong with that name?
[06:09:09] webdeveloper: chode is a short and fat penis
[06:09:13] webdeveloper: it's very offensive
[06:09:32] webdeveloper: it's also slang for impotence and incompetence
[06:09:34] Ropeney: or code was taken
[06:09:43] Radar: webdeveloper: Why did you go through the nick list just to find an abusive nice?
[06:09:52] Radar: Did you really seriously read through all 972 nicks?
[06:09:57] speakingchode: has joined #ruby
[06:10:01] Radar: Or are you logging on two accounts and then trying to cause a scene?
[06:10:04] webdeveloper: ??? speaking1ode is now known as speakingchode
[06:10:16] webdeveloper: i was just about to ask my question until i saw that
[06:10:21] mndoci: has joined #ruby
[06:10:38] Radar: Nothing will be done about that user. Please ask your question.
[06:10:54] Radar: The user is not be abusive (other than the nick, which tbh I had to look up) and so let's leave it at that.
[06:11:56] dionysus69: has joined #ruby
[06:11:59] blackmes1: has joined #ruby
[06:12:01] webdeveloper: so if a user had a nick ihatefags he wouldn't be kicked if he isn't abusive?
[06:12:16] Radar: !kick webdeveloper I asked you to drop it.
[06:12:17] ruboto: ruboto kicked webdeveloper: asked you to drop it.
[06:12:17] ruboto: -o ruboto
[06:12:28] webdeveloper: has joined #ruby
[06:12:34] webdeveloper: you kicked the wrong person
[06:12:42] Radar: Sure I did.
[06:12:52] webdeveloper: you're really stupid
[06:12:54] Radar: is that you, govt?
[06:13:03] ruboto: +q webdeveloper!*@*
[06:13:03] ruboto: -o ruboto
[06:13:06] Radar: Thanks for the confirmation. I always suspected.
[06:13:11] baweaver: ACTION is impatient
[06:13:11] webdeveloper: has left #ruby: ()
[06:13:19] Radar: ACTION awaits the PM spam
[06:13:24] Radar: Obvious troll is obvious, yet again.
[06:13:27] ruboto: +q speakingchode!*@*
[06:13:27] ruboto: -o ruboto
[06:13:37] TheNet_: you just wasted all my popcorn :(
[06:13:41] eam: baweaver: impatiens are lovely
[06:13:50] Radar: What a waste of everyone's time. Gives me a nice little chuckle though every time they attempt to do... whatever it is they're doing.
[06:13:51] baweaver: !.mute TheNet_
[06:13:57] baweaver: too ban happy
[06:14:02] Radar: baweaver: drop the weapon, sir.
[06:14:10] baweaver: ACTION sprints off
[06:14:36] eam: I came up with a ruby joke
[06:14:52] baweaver: is it Net::LDAP?
[06:14:53] eam: what's Steve Irwin's least favorite Ruby class?
[06:15:02] eam: baweaver: there's nothing funny about Net::LDAP
[06:15:14] Radar: eam: StringRay?
[06:15:19] eam: Array, yeah
[06:15:27] Radar: crikey that was bad
[06:15:37] eam: yeah it is
[06:16:59] kp666: has joined #ruby
[06:17:21] baweaver: YOU'LL NEVER TAKE ME ALIVE CONNER
[06:17:32] baweaver: has left #ruby: ()
[06:17:43] baweaver: has joined #ruby
[06:18:39] Axsuul: has joined #ruby
[06:18:41] d34th4ck3r: has joined #ruby
[06:18:49] OS-18454: has joined #ruby
[06:20:33] chrissonar: has joined #ruby
[06:21:11] riotjones: has joined #ruby
[06:22:44] kp666: has joined #ruby
[06:23:58] Musashi007: has joined #ruby
[06:25:05] hotpancakes: has joined #ruby
[06:25:56] kp666: has joined #ruby
[06:26:57] CloCkWeRX: has left #ruby: ()
[06:31:22] blt: has joined #ruby
[06:32:09] dionysus69: has joined #ruby
[06:33:01] simplyianm: has joined #ruby
[06:33:32] bapa: has joined #ruby
[06:34:13] hakunin_: has joined #ruby
[06:35:49] kp666: has joined #ruby
[06:35:52] neanderslob_: has joined #ruby
[06:36:03] jessemcgilallen: has joined #ruby
[06:37:21] dikaio: has joined #ruby
[06:38:06] jgt1: has joined #ruby
[06:40:23] aganov: has joined #ruby
[06:40:57] diegoviola: has joined #ruby
[06:41:22] startupality: has joined #ruby
[06:41:43] timonv: has joined #ruby
[06:41:48] elton: has joined #ruby
[06:42:11] jeremy: has joined #ruby
[06:42:28] aufi: has joined #ruby
[06:43:38] claw: has joined #ruby
[06:44:31] rippa: has joined #ruby
[06:45:03] tagrudev: has joined #ruby
[06:46:13] kp666: has joined #ruby
[06:46:18] Guest24850: I have done a service which need to read some properties from a class. Whats the ruby way to force the class to have these properties (kind of interface)?
[06:47:49] hxegon: has joined #ruby
[06:48:05] diegoaguilar: has joined #ruby
[06:48:55] arup_r: has joined #ruby
[06:49:34] devbug_: has joined #ruby
[06:51:47] bruno-: has joined #ruby
[06:53:05] atmosx_: Guest24850: by 'force' you mean create them on the fly?
[06:53:47] atmosx_: Guest24850: or you might be referring to duck-typing, which is usually done in ruby, check if the class supports the message type before using it?!
[06:54:51] Rollabunna: has joined #ruby
[06:55:10] TTilus: Guest24850: you are being way too vague to get any meaningfull answers
[06:56:02] TTilus: Guest24850: try showing some code and describing your usecase (in non-techical terms)
[06:56:12] Guest24850: ok I will show you :)
[06:56:21] Guest24850: https://github.com/jeremymarc/active_payment/blob/master/lib/active_payment/models/sale.rb
[06:57:34] Guest24850: I need to read some attributes like amount/description on the payable object.
[06:57:55] TTilus: apparently
[06:57:58] Guest24850: I have done a Payable concerns
[06:58:13] Guest24850: the object should extends...https://github.com/jeremymarc/active_payment/blob/master/lib/active_payment/models/concerns/payable.rb but its kind of useless
[06:58:26] Guest24850: im wondering whats the best way to handle this kind of situation
[06:58:50] TTilus: useless? how?
[06:59:35] astrobun_: has joined #ruby
[06:59:35] Guest24850: I mean the concerns is expecting the object to have the attributes... if you want to use others attributes you will have to override the methods
[07:01:05] Guest24850: any suggestions to make that better?
[07:01:40] TTilus: so you have class MyPayableThingy; extends ActivePayment::Models::Payable; ...; end
[07:01:57] Guest24850: https://github.com/jeremymarc/active_payment
[07:01:59] hotpancakes: has joined #ruby
[07:02:02] Guest24850: check the readme i have done here
[07:02:07] juanpablo__: has joined #ruby
[07:02:21] TTilus: but your MyPayableThingy has different names for the shipping, tax, amount, whatnot
[07:02:49] riffraff: has joined #ruby
[07:02:54] aryaching: has joined #ruby
[07:03:07] lsmola: has joined #ruby
[07:03:14] rabbithole: has joined #ruby
[07:03:15] TTilus: ah, include instead of extends, but...
[07:04:27] Guest24850: what do you mean?
[07:04:42] TTilus: then you simply need to modify MyPayableThingy to meet the expectations of https://github.com/jeremymarc/active_payment/blob/master/lib/active_payment/models/sale.rb
[07:04:58] tmtwd: has joined #ruby
[07:05:06] TTilus: there's no magic in include ActivePayment::Models::Payable
[07:05:13] Guest24850: yes no magic :/
[07:05:29] Guest24850: its more like a default behavior
[07:05:41] foooobear: has joined #ruby
[07:05:46] tvw: has joined #ruby
[07:06:36] TTilus: if you need custom implementations of most of the stuff in there, you may very well skip include ActivePayment::Models::Payable and just use it as an example and implement the payable interface yourself
[07:06:44] idefine: has joined #ruby
[07:07:04] Guest24850: so just adding what is required in the readme?
[07:07:36] tkuchiki: has joined #ruby
[07:08:13] scottstamp: has joined #ruby
[07:08:15] TTilus: although having the include has the documentational side of it, it is an explicit statement that you inted this class to be "a payable"
[07:08:46] Guest24850: so what I did is ok
[07:08:52] TTilus: you need to add to your MyPayableThingy what https://github.com/jeremymarc/active_payment/blob/master/lib/active_payment/models/concerns/payable.rb would add
[07:09:42] Guest24850: what about using something like act_as_payable amount: self.price, description: self.description etc. in the class?
[07:10:02] Guest24850: is it possible? is it more the ruby way?
[07:10:08] Zai00: has joined #ruby
[07:10:18] TTilus: what's act_as_payable?
[07:10:50] tlarevo: has joined #ruby
[07:10:50] Guest24850: it could be a magic method which define automatically the methods needs with what you are passing as parameters
[07:11:22] _aeris_: has joined #ruby
[07:11:30] raenk: has joined #ruby
[07:11:33] TTilus: are you writing an app or a library?
[07:12:08] jericon: has joined #ruby
[07:12:50] blackmes1: has joined #ruby
[07:13:05] TTilus: always start with the simplest thing that works for the main usecase
[07:13:24] Guest24850: I mean the library is working now
[07:13:34] Guest24850: just trying to see if I should/can improve this part
[07:13:50] TTilus: are we talking about https://github.com/jeremymarc/active_payment/ ?
[07:14:10] TTilus: ActivePayment::Models::Payable looks perfectly legit
[07:14:19] TTilus: where's the problem you are trying to solve?
[07:14:42] Guest24850: first, I got a problem with one app because description was already a method used in my object :)
[07:15:03] Guest24850: so I need to changes method names to make sure they are avail.
[07:16:05] Guest24850: after, I was not sure it was the "ruby way" of doing that
[07:16:21] Guest24850: but looks like :)
[07:16:22] startupality: has joined #ruby
[07:16:22] TTilus: there's really no "ruby way"
[07:16:37] dhjondoh: has joined #ruby
[07:16:46] Guest24850: https://github.com/jackdempsey/acts_as_commentable
[07:17:02] TTilus: that's a possibility
[07:17:06] Guest24850: (in this lib you add acts_as_commentable in your models)
[07:17:49] Guest24850: but the things is for me, I need to read attributes from the model so adding a magic class method will not help i think
[07:18:19] tris: has joined #ruby
[07:19:34] TTilus: one way is to require your lib user to implement as_payable accessor to return poro-style payable object that ActivePayment::Models::Sale can consume
[07:20:31] Guest24850: something like def as_payable; {amount: price....} end;
[07:20:49] Marsjan: has joined #ruby
[07:20:54] TTilus: then of course you could have a sample/default implementation that could just be included in user's model if he makes assumptions match
[07:20:56] ElSif: this seems really fun :)
[07:20:57] ElSif: https://github.com/dariusk/NaNoGenMo-2015
[07:21:22] lorn: has joined #ruby
[07:21:39] lorn: has joined #ruby
[07:21:43] TTilus: Guest24850: pretty much, yes, or def as_payable; ::ActivePayment::Models::Payable.new(attr); end
[07:21:45] devoldmx: has joined #ruby
[07:21:56] skcin7: has joined #ruby
[07:22:18] Guest24850: what's attr?
[07:22:25] bulletproof_: has joined #ruby
[07:22:46] Guest24850: do you think that would be better than the current impl?
[07:23:06] TTilus: Guest24850: that's what your lib user is supposed to whip up based on what you document ::ActivePayment::Models::Payable.new nees and what his FinePayableItem class has available
[07:23:08] Guest24850: at least, I will not have any name collisions
[07:23:24] bulletproof_: has left #ruby: ()
[07:23:25] TTilus: ...unless somebody has as_payable :D
[07:23:43] krzkrz: has joined #ruby
[07:24:00] TTilus: in that case your default implementation concern could have name collision check, just to be sure
[07:24:17] alecs: has joined #ruby
[07:25:00] Guest24850: what it should do if there is a collision?
[07:25:16] lubarch: has joined #ruby
[07:25:29] TTilus: crash, burn and make a really loud noise
[07:25:42] TTilus: no, really
[07:26:08] bodie__: has joined #ruby
[07:26:30] TTilus: you want that kind of stuff to really be all over the face of your library user with explanation of whats wrong and how to work around it
[07:26:48] hotpancakes: has joined #ruby
[07:27:10] erichmenge: has joined #ruby
[07:27:21] SleepySensei: has joined #ruby
[07:27:25] CloCkWeRX: has joined #ruby
[07:27:35] relix: has joined #ruby
[07:27:39] TTilus: if you really expect as_payable (or actually to_payable might be more like it) to collide, you need to make that method name configurable
[07:28:10] Guest24850: whats the advantage of returning ::ActivePayment::Models::Payable.new instead of an hash?
[07:28:19] Guest24850: yes that would be the next step
[07:28:25] jas02: has joined #ruby
[07:28:28] Guest24850: for now, I would pretend I havent read that
[07:28:31] TTilus: but i wouldn't bother before there's at least three separate cases of actual collisions happened
[07:28:39] idefine: has joined #ruby
[07:30:02] firstdayonthejob: has joined #ruby
[07:30:12] Kruppe: has joined #ruby
[07:30:23] TTilus: Guest24850: andvantage is to have encapsulation and separation of concerns, you don't end up implementing stuff that belongs to payable's responsibility in any place else, say Sale, where payable is used
[07:31:05] acke: has joined #ruby
[07:31:39] moeabdol: has joined #ruby
[07:31:57] tmtwd: has joined #ruby
[07:32:29] Moblin: has joined #ruby
[07:32:34] ohaibbq: has joined #ruby
[07:34:05] Guest24850: so I need to create a new class called Salable
[07:37:10] lukaszes: has joined #ruby
[07:37:26] tlarevo: has joined #ruby
[07:37:29] haxrbyte: has joined #ruby
[07:38:00] haxrbyte_: has joined #ruby
[07:38:16] Guest24850: thank you for your recommendations
[07:38:35] TTilus: aww, i was just refering to the possibility that if to_payable returns a hash (with no methods) and you end up actually needing processing that would be payable's responsibility, then you are tempted to implement that processing someplace where payable is used, like ActivePayment::Models::Sale
[07:38:54] jgt1: has joined #ruby
[07:38:57] TTilus: i wasn't suggesting any new classes
[07:39:10] bmalum: has joined #ruby
[07:39:33] atmosx: >> require 'tzinfo'; a = TZInfo::Timezone.get('Europe/Athens'); a.now
[07:39:34] ruboto: atmosx # => cannot load such file -- tzinfo (LoadError) ...check link for more (https://eval.in/462737)
[07:40:21] TTilus: Guest24850: and if you some day judge, you'll need the kinda klass Salable would be, you might want to reconsider the name ;)
[07:40:29] TTilus: Guest24850: np
[07:40:55] terminalrecluse: has joined #ruby
[07:41:13] rgtk: has joined #ruby
[07:41:29] Zai00: has joined #ruby
[07:41:31] seitensei: has joined #ruby
[07:41:36] Guest24850: what do you mean?
[07:41:46] emilkarl: has joined #ruby
[07:41:51] codecop: has joined #ruby
[07:41:53] Guest24850: salable instead of payable?
[07:42:05] TTilus: Guest24850: no = no problem (in response to your thanks)
[07:42:25] Guest24850: I got that part lol
[07:42:26] TTilus: Guest24850: and i did NOT recommend any new classes
[07:42:47] Guest24850: u said ::ActivePayment::Models::Payable.new
[07:43:01] Guest24850: so it was a suggestion
[07:43:33] TTilus: Guest24850: technically you already have ::ActivePayment::Models::Payable :)
[07:44:27] baweaver: has joined #ruby
[07:44:32] TTilus: just need to make it instantiable
[07:45:09] Guest24850: ah my concern
[07:45:19] Guest24850: yes good idea ;-)
[07:45:40] TTilus: ...which of course makes it a class, so in that sense, a new class, u got me, i _did_ suggest a new class :D
[07:46:12] Stan: has joined #ruby
[07:46:52] kstuart: has joined #ruby
[07:47:10] gambl0re: has joined #ruby
[07:47:35] TheNet: has joined #ruby
[07:47:56] Spami_: has joined #ruby
[07:48:12] sdwrage: has joined #ruby
[07:48:40] rgtk: has joined #ruby
[07:49:50] htmldrum: has joined #ruby
[07:50:44] blackmes1: has joined #ruby
[07:51:41] hotpancakes: has joined #ruby
[07:52:33] bruno-: has joined #ruby
[07:54:20] karapetyan: has joined #ruby
[07:55:13] kies: has joined #ruby
[07:58:52] AlexRussia: has joined #ruby
[07:59:59] moeabdol: has joined #ruby
[08:04:13] terlar: has joined #ruby
[08:05:07] DoubleMalt: has joined #ruby
[08:05:38] aps: How do I install a particular version (2.2.2) for system ruby?
[08:05:56] voker57: has joined #ruby
[08:06:16] aps: it's an amazon linux machine. And yum install ruby22 installs 2.2.3
[08:06:59] Coldblackice: has joined #ruby
[08:07:07] hxegon_: has joined #ruby
[08:07:22] ddv: aps: by using a version manager
[08:07:30] ddv: aps: rvm/rbenv/chruby etc
[08:08:13] ddv: aps: also there is no reason not to use 2.2.3
[08:08:24] blaxter: has joined #ruby
[08:08:48] leyluj: has joined #ruby
[08:09:22] leyluj: Rubist???
[08:09:31] leyluj: Anyone in here
[08:09:35] tkuchiki: has joined #ruby
[08:09:50] jgt1: has joined #ruby
[08:12:53] kimegede: has joined #ruby
[08:12:58] TomyWork: has joined #ruby
[08:13:43] djbkd_: has joined #ruby
[08:14:00] solars: has joined #ruby
[08:14:13] lele: has joined #ruby
[08:16:17] troulouliou_div2: has joined #ruby
[08:17:18] tubuliferous_: has joined #ruby
[08:18:12] kalusn: has joined #ruby
[08:18:21] Limix: has joined #ruby
[08:20:14] atomical: has joined #ruby
[08:21:17] swgillespie: has joined #ruby
[08:21:58] riotjones: has joined #ruby
[08:22:33] devoldmx: has joined #ruby
[08:22:51] astrobun_: has joined #ruby
[08:24:03] SCHAAP137: has joined #ruby
[08:25:21] skade: has joined #ruby
[08:25:55] subscope: has joined #ruby
[08:29:28] roshanavand: has joined #ruby
[08:30:04] ESpiney: has joined #ruby
[08:30:31] idefine: has joined #ruby
[08:30:32] hotpancakes: has joined #ruby
[08:30:54] tulak: has joined #ruby
[08:31:25] Rollabunna: has joined #ruby
[08:31:46] al2o3-cr: has joined #ruby
[08:33:02] unshadow: has joined #ruby
[08:33:28] unshadow: has joined #ruby
[08:33:29] haxrbyte: has joined #ruby
[08:34:55] lukaszes: has joined #ruby
[08:37:34] mndoci: has joined #ruby
[08:38:16] mistermocha: has joined #ruby
[08:40:00] TheHodge: has joined #ruby
[08:40:43] Asher: has joined #ruby
[08:41:00] Mon_Ouie: has joined #ruby
[08:43:03] d34th4ck3r: has joined #ruby
[08:43:39] adac: has joined #ruby
[08:44:53] skade: has joined #ruby
[08:45:04] rakm: has joined #ruby
[08:45:39] lipoqil: has joined #ruby
[08:45:50] colegatron: has joined #ruby
[08:45:54] rakm: has joined #ruby
[08:46:47] rakm: has joined #ruby
[08:47:19] lukaszes: has joined #ruby
[08:50:52] juanpablo__: has joined #ruby
[08:51:04] marr: has joined #ruby
[08:51:11] nfk|laptop: has joined #ruby
[08:52:37] RegulationD: has joined #ruby
[08:53:35] bruno-: has joined #ruby
[08:55:43] nettoweb: has joined #ruby
[08:55:57] dh64: has joined #ruby
[09:01:02] norc: has joined #ruby
[09:01:19] blackmes1: has joined #ruby
[09:01:51] Feyn: has joined #ruby
[09:05:08] Pupeno: has joined #ruby
[09:05:08] Pupeno: has joined #ruby
[09:05:37] atmosx: has joined #ruby
[09:07:53] joonty: has joined #ruby
[09:09:09] hotpancakes: has joined #ruby
[09:10:16] monthy: has joined #ruby
[09:12:11] chthon: has joined #ruby
[09:13:26] d34th4ck3r: has joined #ruby
[09:14:02] lukaszes: has joined #ruby
[09:14:29] jordanloky: has joined #ruby
[09:14:48] last_staff: has joined #ruby
[09:14:57] solars: has joined #ruby
[09:15:54] TheNet: has joined #ruby
[09:16:30] leafybas_: has joined #ruby
[09:16:45] dopie: has joined #ruby
[09:17:03] kramsee: has joined #ruby
[09:17:09] tjbiddle: has joined #ruby
[09:18:53] sebstrax: has joined #ruby
[09:19:29] Bish: hi folkies, can i somehow make not(~) act like a number is unsigned?
[09:19:44] Bish: >> ~(2**32-1)
[09:19:45] ruboto: Bish # => -4294967296 (https://eval.in/462788)
[09:20:40] haxrbyte: has joined #ruby
[09:22:46] RegulationD: has joined #ruby
[09:22:59] kp666_: has joined #ruby
[09:23:18] arup_r: has joined #ruby
[09:24:04] Polysics: has joined #ruby
[09:25:10] callumacrae: has joined #ruby
[09:25:14] tjbiddle: has joined #ruby
[09:26:03] Balllkenende: has joined #ruby
[09:27:30] Bish: yorickpeterse: good morning!
[09:28:44] VladGh: has joined #ruby
[09:28:55] Axsuul: has joined #ruby
[09:29:11] axisys: has joined #ruby
[09:30:40] erbesharat: has joined #ruby
[09:31:55] chibs: has joined #ruby
[09:32:00] Peg-leg: has joined #ruby
[09:32:01] rodfersou: has joined #ruby
[09:32:29] Archyme: has joined #ruby
[09:32:55] d34th4ck3r: has joined #ruby
[09:33:39] hotpancakes: has joined #ruby
[09:33:45] beauby: has joined #ruby
[09:34:10] mdih: has joined #ruby
[09:34:50] elton: has joined #ruby
[09:35:10] Zai00: has joined #ruby
[09:37:10] DEA7TH: has joined #ruby
[09:38:45] beauby_: has joined #ruby
[09:38:51] Xeago: has joined #ruby
[09:38:59] mndoci: has joined #ruby
[09:39:57] tjbiddle: has joined #ruby
[09:40:01] DaniG2k: has joined #ruby
[09:43:15] vigintas: has joined #ruby
[09:43:21] wpp: has joined #ruby
[09:44:01] karapetyan: has joined #ruby
[09:44:57] darkf_: has joined #ruby
[09:45:18] kramsee: has joined #ruby
[09:45:58] ibouvousaime: has joined #ruby
[09:46:03] tlarevo_: has joined #ruby
[09:46:41] kramsee: has joined #ruby
[09:46:53] kramsee: has joined #ruby
[09:47:55] baweaver: has joined #ruby
[09:48:30] kramsee: has joined #ruby
[09:48:52] senayar: has joined #ruby
[09:48:52] senayar: has joined #ruby
[09:49:54] moeabdol: has joined #ruby
[09:50:55] Iouns: has left #ruby: ("byebye")
[09:51:03] Ox0dea: has joined #ruby
[09:51:33] Ox0dea: Bish: Ruby's integers are of arbitrary width, so you'll have to explicitly mask.
[09:51:37] hotpancakes: has joined #ruby
[09:52:59] chrislotix: has joined #ruby
[09:54:18] bruno-: has joined #ruby
[09:55:22] Pupp3tm4st3r: has joined #ruby
[09:58:41] sdwrage: has joined #ruby
[09:58:59] _lazarevsky_: has joined #ruby
[09:59:02] _lazarevsky_: I have a string
[09:59:18] _lazarevsky_: "<span style="visibility:hidden">test-value</span>"
[09:59:30] _lazarevsky_: how can I get the value "test-value" returned?
[09:59:34] _lazarevsky_: what would the XPATH be?
[10:00:13] d34th4ck3r: has joined #ruby
[10:00:35] platzhirsch: has joined #ruby
[10:01:25] leafybas_: has joined #ruby
[10:01:56] _lazarevsky_: or even easier
[10:02:12] _lazarevsky_: "<span style="visibility:hidden">test-value</span>" is just a substring or a biugger string
[10:02:18] _lazarevsky_: how can I return the "<span style="visibility:hidden">test-value</span>" substring?
[10:02:42] leafybas_: has joined #ruby
[10:03:41] moeabdol: has joined #ruby
[10:03:54] Ox0dea: _lazarevsky_: Are you using a library?
[10:04:12] yorickpeterse: _lazarevsky_: span/text()
[10:05:25] krz: has joined #ruby
[10:06:07] petricore: has joined #ruby
[10:06:43] _lazarevsky_: Ox0dea: im not
[10:06:53] _lazarevsky_: Ox0dea: i was gonna use nokogiri but then the string is not a valid html
[10:07:00] _lazarevsky_: yorickpeterse: care to elaborate?
[10:07:04] Ox0dea: _lazarevsky_: It doesn't have to be valid HTML.
[10:07:13] Ox0dea: It sounds like you're trying to parse HTML with regular expressions. :P
[10:07:19] _lazarevsky_: Ox0dea: well not quite
[10:07:25] _lazarevsky_: the HTML is not a valid html thus I can't parse it
[10:07:28] _lazarevsky_: I was gonna use nokogiri
[10:07:41] _lazarevsky_: but since nokogiri can't parse this thing I thought of using regex
[10:07:55] Ox0dea: _lazarevsky_: Find some way to do penance.
[10:08:06] canton7: are you sure you're telling nokogiri to parse it as html, and not xml?
[10:08:06] Ox0dea: And then see if yorickpeterse's Oga can handle your crazy HTML.
[10:08:18] yorickpeterse: _lazarevsky_: that's the XPath you'd need to use to get "test-value"
[10:08:45] _lazarevsky_: yorickpeterse: is it
[10:08:46] _lazarevsky_: lemme try that
[10:09:24] yorickpeterse: http://www.w3.org/TR/xpath/#location-paths -> "child::text() selects all text node children of the context node"
[10:09:29] _lazarevsky_: yorickpeterse: the online ruby parser ( http://rubular.com/) says invalid option
[10:09:37] yorickpeterse: that's not an xpath parser
[10:09:41] yorickpeterse: that's for regular expressions
[10:09:47] _lazarevsky_: oh crap.. of course it is
[10:10:50] _lazarevsky_: brb, lemme try something first
[10:10:53] bonemind: has joined #ruby
[10:10:55] _lazarevsky_: I'llget back to you guys shortly
[10:13:22] Ox0dea: _lazarevsky_: When you get a second: http://stackoverflow.com/a/1732454
[10:14:10] solars: hi, can anyone tell me how to resolve this error installing the debugger gem? https://gist.github.com/solars/a26061e7da730ebc3464 can't find out what's wrong
[10:15:54] merlinp: has joined #ruby
[10:16:23] _lazarevsky_: Ox0dea: so I'm using the Mail gem
[10:16:27] _lazarevsky_: which converts an email header
[10:16:31] _lazarevsky_: into a Mail Object
[10:17:18] _lazarevsky_: mail.body outputs a string which is not a completely valid html
[10:17:26] dionysus69: has joined #ruby
[10:17:41] Ox0dea: solars: This doesn't bode well: https://www.google.com/search?q="223%2Fruby_debug.h"
[10:17:58] Ox0dea: _lazarevsky_: How is it invalid?
[10:18:06] solars: found it, debugger doesn't work in ruby 2
[10:18:23] Ox0dea: solars: Consider pry + byebug.
[10:19:43] solars: Ox0dea, yep that's what I did, thanks
[10:20:07] bluOxigen: has joined #ruby
[10:20:42] yardenbar: has joined #ruby
[10:22:01] Bish: is there a cool way to do data[x...y].unpack("V").first without using first?
[10:22:15] dionysus69: has joined #ruby
[10:22:47] riotjones: has joined #ruby
[10:23:19] devoldmx: has joined #ruby
[10:24:07] Ox0dea: Bish: No, that's just how #unpack works, and it makes sense.
[10:24:27] _lazarevsky_: Ox0dea: it's invalid in that it first shows a textual representation of the html, and only then shows the HTML itself
[10:24:30] sameerynho: has joined #ruby
[10:24:48] Ox0dea: Unpacking a single value is a pretty common case, granted, but you really want a generalized interface for things like that.
[10:25:09] Ox0dea: _lazarevsky_: That's... not invalid.
[10:25:47] Ox0dea: At least, it's not likely to trip up any decent parser.
[10:26:06] xwalk: has joined #ruby
[10:26:21] norc: A method that return either an array or elements or an element depending on the length of a parameter would feel quite eradic imo.
[10:27:10] Ox0dea: Well, for #unpack, it'd be to do with the template string, not its length, but yeah.
[10:27:32] _lazarevsky_: Ox0dea: ok lemme gist what the Nokogiri::HTML object looks like after I've loaded the email body
[10:28:03] xwalk: I'm working on an application that's going to be used to manage training for new hires. It'll need user authentication, training document management, and the ability to track stats like courses currently being taken/completed, login times, etc. I'm considering Rails with Refinery to do this. Does this seem feasible with those two?
[10:28:10] _lazarevsky_: Ox0dea: https://gist.github.com/anonymous/b1eab9b787b4a0d1a286
[10:29:01] _lazarevsky_: Ox0dea: what am I missing here?
[10:29:15] Ox0dea: _lazarevsky_: It looks like it skipped right over the non-HTML, no?
[10:29:29] idefine: has joined #ruby
[10:29:35] _lazarevsky_: ya but how do I get access to the html bit?
[10:29:36] lubarch: has joined #ruby
[10:30:04] _lazarevsky_: I've tried doc.xpath
[10:30:10] _lazarevsky_: it returns empty arrays
[10:30:26] _lazarevsky_: doc is obciously the Nokogiri object with the body loaded
[10:30:28] but3k4: has joined #ruby
[10:30:50] CloCkWeRX: has joined #ruby
[10:30:57] Ox0dea: Nokogiri is extensively documented.
[10:32:43] chibs: has joined #ruby
[10:32:56] _lazarevsky_: Ox0dea: dude I've been reading the docs.. something else is the problem
[10:33:01] _lazarevsky_: obviously nokogiri did not load the document properly
[10:33:13] _lazarevsky_: but, how did you infer that nokogiri skipped the non-html part of the message.body ?
[10:33:37] _lazarevsky_: did you get that by looking at the gist I posted?
[10:33:59] shredding: has joined #ruby
[10:34:14] rdark: has joined #ruby
[10:34:14] rdark: has joined #ruby
[10:34:41] Ox0dea: _lazarevsky_: Well, yes; the outermost element is "document", whereas it would be "text" if the textual fragment had been included in the parse.
[10:35:04] sgambino: has joined #ruby
[10:35:11] _lazarevsky_: ya but then the ONLY element within the document > html > body is <p>
[10:36:01] elton: has joined #ruby
[10:37:22] Ox0dea: Oh, I see.
[10:37:45] FernandoBasso: has joined #ruby
[10:38:09] Ox0dea: _lazarevsky_: That <span> you were looking for earlier is the start of the body's HTML content, then?
[10:38:54] _lazarevsky_: Ox0dea: no it's not the start of it
[10:39:02] _lazarevsky_: on the contrary, it's at the very end of it
[10:39:33] Ox0dea: _lazarevsky_: With what level of certainty can you say that the textual part will not contain '<'?
[10:39:36] juanpablo__: has joined #ruby
[10:39:58] _lazarevsky_: I can say with 100% certainty that it will contain <
[10:40:51] Ox0dea: _lazarevsky_: I see. Is it also likely that it will contain "<html>", then?
[10:41:20] _lazarevsky_: not really, no
[10:41:21] mistermocha: has joined #ruby
[10:42:04] _lazarevsky_: Ox0dea: only the second part contains <htmL>
[10:42:59] Ox0dea: >> s = 'foo bar baz <html> ... </html>'; s.slice!(0, s.index('<html')); s # _lazarevsky_
[10:43:00] _lazarevsky_: Ox0dea: and btw this is why I wanted to use xpath to get the value I wanted.. I kenw it would be such a mission to parse this thing
[10:43:00] ruboto: Ox0dea # => "<html> ... </html>" (https://eval.in/462821)
[10:43:36] Ox0dea: _lazarevsky_: What're you using that lets you use XPath to search a raw string?
[10:43:50] _lazarevsky_: I meant Regex
[10:43:55] _lazarevsky_: I meant good ol' regex
[10:43:58] Ulfalizer: is there some way to run some code (or just set a variable in this case) before running a script? more specifically, i want to run ext/nokogiri/extconf.rb but set DESTDIR before it is run. (DESTDIR in turn is used in rbconfig.rb, which is included by mkmf.rb to get build information.)
[10:44:03] Ox0dea: _lazarevsky_: I don't sell that particular brand of footgun.
[10:44:07] nfk|laptop: has joined #ruby
[10:44:13] _lazarevsky_: haaaaahahahha
[10:44:21] ldnunes: has joined #ruby
[10:44:25] Ox0dea: _lazarevsky_: Got all kinds, mind, just not that'n.
[10:44:45] Ulfalizer: it's for messy cross-compilation reasons
[10:46:00] TheNet: has joined #ruby
[10:46:06] hotpancakes: has joined #ruby
[10:47:05] sepp2k: has joined #ruby
[10:47:22] _lazarevsky_: Ox0dea: aghh.. it's not the only span I got in my strig
[10:47:27] _lazarevsky_: but it's a good start
[10:47:30] _lazarevsky_: thanks a milliion mate!
[10:47:34] _lazarevsky_: you totally solved my problem
[10:48:19] gagrio_: has joined #ruby
[10:48:24] tulak_: has joined #ruby
[10:48:59] baweaver: has joined #ruby
[10:49:21] mikecmpbll: has joined #ruby
[10:49:24] CloCkWeRX: has joined #ruby
[10:50:00] tulak: has joined #ruby
[10:50:34] Xeago: has joined #ruby
[10:51:30] Ox0dea: ??? We do what we can because we must. ???
[10:51:33] Ox0dea: _lazarevsky_: Happy to have helped.
[10:54:43] _lazarevsky_: Ox0dea: I was thinking I could set the text of the span to
[10:54:56] xwalk: has left #ruby: ()
[10:55:16] _lazarevsky_: so I'll search for ##
[10:55:21] _lazarevsky_: return that and then delimit on |
[10:55:27] _lazarevsky_: and get the second element of the resulting array
[10:55:30] _lazarevsky_: that should do the trick
[10:55:50] Ox0dea: It's bodgy, but it should work.
[10:56:57] alexherbo2: has joined #ruby
[10:57:33] lukaszes: has joined #ruby
[10:59:34] dEPy: has joined #ruby
[11:00:50] dEPy: How do I select only IDs in a table when I have array of array of other fields (like name, surname, ...)
[11:02:07] dEPy: But the whole set of fields must match, for example has to have name 'John', surname 'Doe', age: 10, ...
[11:02:33] Ox0dea: dEPy: Are you writing raw SQL?
[11:03:08] dEPy: Ox0dea: well, no. I can programatically replace field values
[11:03:44] suchness: has joined #ruby
[11:03:47] suchness: I have been using datamapper for the last... 6 years. I am used to being able to do something like User.all.comments to get all the comments of all the users. I am moving to ActiveRecord now, and don't see how to accomplish the same thing. It seems like I can only chain comments after one instance of User, like User.first.comments. Anyone know how I should be doing the ActiveRecord equivilent to User.all.comments?
[11:04:08] Ox0dea: dEPy: Well, if you've got an array of arrays, I assume you don't have keys, in which case you'll have to map by index.
[11:05:11] dEPy: Ox0dea: I have the data in this format: [ [name: 'John', surname: 'Doe', age: 15]. [...], [...], ... ]
[11:05:26] dEPy: so for each array ofr fields in my main array I need to get id back for that record
[11:05:29] gagrio_: has joined #ruby
[11:05:48] dEPy: I just realized it's an array of hashes actually :D
[11:06:10] Ox0dea: dEPy: map { |record| record[:id] }, then.
[11:06:27] dEPy: I don't have IDs :D
[11:06:31] dEPy: I have everything else :)
[11:06:36] Ox0dea: I don't follow.
[11:07:12] dEPy: I have all the data that I mass insert, but now I need to know for each row inserted which ID it was given
[11:07:29] DEA7TH: has joined #ruby
[11:07:46] Ox0dea: dEPy: Then you'll have to query the table...
[11:08:30] dEPy: Yes, but I don't know how to do that except doing a SELECT for each set of fields. Is there no better way?
[11:08:47] bruno-: has joined #ruby
[11:09:13] Regulati_: has joined #ruby
[11:09:32] xwalk: has joined #ruby
[11:10:00] Ox0dea: dEPy: There's likely some way to ask an auto-incrementing column which value it would use next, and then you'd just do some addition, but that's brittle.
[11:12:42] timonv: has joined #ruby
[11:16:40] stamina: has joined #ruby
[11:17:53] dEPy: Ox0dea: I would preferrably like something like SELECT id FROM table WHERE [name,surname,age] IN [ {...}, {...}, {...} ]
[11:18:56] Ox0dea: dEPy: There's no guarantee that would map 1-to-1 with the data you've got on hand, though?
[11:19:11] dEPy: It is in my case
[11:19:26] Ox0dea: Famous last words.
[11:19:53] htmldrum: has joined #ruby
[11:20:22] hotpancakes: has joined #ruby
[11:20:44] symbole: has joined #ruby
[11:21:11] Luna_Moonfang: has joined #ruby
[11:21:11] Luna_Moonfang: has joined #ruby
[11:21:12] idefine: has joined #ruby
[11:21:25] dEPy: I have this activities table where each row is unique.
[11:21:50] dEPy: It's basically like a log of events for each user. And each event can only happen once.
[11:22:20] porfa: has joined #ruby
[11:22:24] porfa: hello dear friends
[11:22:25] Ox0dea: dEPy: Right, but what guarantees you don't have two James Smiths aged 23?
[11:22:37] matp: has joined #ruby
[11:22:41] dEPy: Ox0dea: just belive me it's unique.
[11:22:44] Guest95113: has joined #ruby
[11:23:14] xwalk: #join refinery
[11:23:21] porfa: life taught me nothing is unique. but i guess digital isn't life, so you are right. i just wanted to say something.
[11:23:57] dEPy: one row is mostly made out IDs so no clashing there
[11:24:54] Ox0dea: Porfa: Isn't the Antikythera Mechanism unique?
[11:24:54] blueOxigen: has joined #ruby
[11:25:01] purplexed-: What is a normal way of installing a ruby application on windows ? ... I'm trying to avoid using an installer like MSInstall.. so I'm wondering if Chocolatey is a good choice, since it can also install Ruby, if a machine doesn't have it
[11:25:26] dEPy: So is there anything or will I really have to do a select for each field set?
[11:27:08] krz: has joined #ruby
[11:27:46] zylogz80: has joined #ruby
[11:28:11] Spami: has joined #ruby
[11:28:26] lxsameer_: has joined #ruby
[11:31:46] prestorium: has joined #ruby
[11:31:55] zenguy_pc: has joined #ruby
[11:31:56] sameerynho: has joined #ruby
[11:32:15] blueOxigen: has left #ruby: ()
[11:34:54] abucha: has joined #ruby
[11:36:45] elton: has joined #ruby
[11:39:45] sonOfRa: has joined #ruby
[11:40:21] juanpablo__: has joined #ruby
[11:40:48] sonOfRa: has joined #ruby
[11:41:30] dnomyar: has joined #ruby
[11:42:02] idefine: has joined #ruby
[11:44:36] kimegede: has joined #ruby
[11:46:19] mndoci: has joined #ruby
[11:46:20] pandaant: has joined #ruby
[11:46:40] zotherstupidguy: has joined #ruby
[11:46:57] Jardayn: has joined #ruby
[11:47:12] blackmes1: has joined #ruby
[11:47:59] skade: has joined #ruby
[11:48:10] hxegon: has joined #ruby
[11:48:44] subscope: has joined #ruby
[11:49:48] baweaver: has joined #ruby
[11:50:24] Ropeney: has joined #ruby
[11:50:28] Xeago: has joined #ruby
[11:51:52] asmodlol: has joined #ruby
[11:52:56] krz: has joined #ruby
[11:55:27] djellemah: has joined #ruby
[11:56:07] Gooddaytoyousir: has joined #ruby
[12:02:51] porfa: hey folks, anyone uses OCI8 with ruby? ???. why the hell does it spits everything in scientific notation by default???? for instead of "89" i get "0.89E2"
[12:03:04] porfa: instead of "29" i get "0.29E2" ...
[12:04:10] adac: has joined #ruby
[12:04:25] Ox0dea: Porfa: That's probably configurable?
[12:04:33] syath: has joined #ruby
[12:04:58] porfa: yeah, but it's just weird because i just followed a tutorial, and by default it's giving me this data, no mention on how to change it.
[12:05:02] antgel: has joined #ruby
[12:05:08] Ox0dea: >> '0.89E2'.to_f # Porfa
[12:05:09] ruboto: Ox0dea # => 89.0 (https://eval.in/462910)
[12:06:15] adac: Installing ruby via source. I'm wondering which paths I do have to set so that the gems and the bundles do go into an users home directory? BUNDLE_PATH, GEM_PATH, anything else?
[12:06:41] porfa: Ox0dea: yeah, i'll use that as a wrokaround
[12:06:45] porfa: thank you =)
[12:06:48] Ox0dea: Sure thing.
[12:07:50] Zai00: has joined #ruby
[12:08:40] chrislotix: has joined #ruby
[12:08:59] Mon_Ouie: has joined #ruby
[12:14:02] sepp2k: has joined #ruby
[12:14:09] solocshaw: has joined #ruby
[12:14:40] gregf: has joined #ruby
[12:14:47] ebbflowgo: has joined #ruby
[12:16:24] ebbflowgo: has joined #ruby
[12:16:54] xfbs: has joined #ruby
[12:18:02] idefine: has joined #ruby
[12:18:41] xfbs: has joined #ruby
[12:20:04] BLuEGoD: has joined #ruby
[12:20:07] tkuchiki: has joined #ruby
[12:22:03] ebbflowgo: has joined #ruby
[12:22:17] pontiki: has joined #ruby
[12:22:28] hotpancakes: has joined #ruby
[12:22:50] pontiki: has joined #ruby
[12:23:04] pontiki: has joined #ruby
[12:23:20] charliesome: has joined #ruby
[12:23:33] riotjones: has joined #ruby
[12:24:03] devoldmx: has joined #ruby
[12:25:12] roshanavand: has joined #ruby
[12:25:24] karapetyan: has joined #ruby
[12:26:52] bonemind: has joined #ruby
[12:27:05] sami: has joined #ruby
[12:28:37] houhoulis: has joined #ruby
[12:29:00] charliesome_: has joined #ruby
[12:29:31] Xeago: has joined #ruby
[12:30:25] merlinp: has joined #ruby
[12:32:18] roshanavand: has joined #ruby
[12:33:28] chibs: has joined #ruby
[12:35:06] chriscoffee: has joined #ruby
[12:36:16] nhhagen: has joined #ruby
[12:36:50] bruno-: has joined #ruby
[12:37:03] DEA7TH: has joined #ruby
[12:37:26] elton: has joined #ruby
[12:37:38] arup_r: has joined #ruby
[12:39:08] sdothum: has joined #ruby
[12:39:47] Spami: has joined #ruby
[12:40:44] tkuchiki: has joined #ruby
[12:42:38] hotpancakes: has joined #ruby
[12:42:54] mistermocha: has joined #ruby
[12:44:00] norc: Ox0dea: You mentioned that post on SO yesterday about some seemingly bizarre String#[] behaviour right?
[12:44:44] Ox0dea: norc: Yeah, why?
[12:45:52] diegoaguilar: has joined #ruby
[12:46:05] houhoulis: has joined #ruby
[12:46:45] norc: Would you happen to be able to link it again?
[12:49:02] senayar: has joined #ruby
[12:49:13] Ox0dea: norc: https://stackoverflow.com/a/3568281
[12:49:25] norc: Ox0dea: Beautiful thanks.
[12:49:29] Ox0dea: Sure thing.
[12:49:54] norc: I was particularly interested in this linked post: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/380637
[12:50:14] Xeago: has joined #ruby
[12:50:29] senayar: has joined #ruby
[12:50:36] baweaver: has joined #ruby
[12:50:58] DoubleMalt: has joined #ruby
[12:52:31] Ox0dea: Yep, that shows pretty concisely why it's the right for slicing to work.
[12:52:36] Ox0dea: *right way
[12:54:05] idefine: has joined #ruby
[12:56:32] symbole: has joined #ruby
[12:56:39] AlexRussia: has joined #ruby
[13:02:52] joonty: has joined #ruby
[13:05:03] synthroid: has joined #ruby
[13:08:01] beauby: has joined #ruby
[13:17:16] rbennacer: has joined #ruby
[13:18:27] _stu_: has joined #ruby
[13:18:44] tkuchiki: has joined #ruby
[13:19:20] joonty: has joined #ruby
[13:19:56] blackmes1: has joined #ruby
[13:22:59] skade: has joined #ruby
[13:23:56] pathrocle: has joined #ruby
[13:24:29] _blizzy_: has joined #ruby
[13:24:51] krz: has joined #ruby
[13:25:51] sdwrage: has joined #ruby
[13:26:02] tkuchiki: has joined #ruby
[13:26:46] ledestin: has joined #ruby
[13:26:51] xfbs: has joined #ruby
[13:27:54] blue_deref: has joined #ruby
[13:29:05] KensoDev: has joined #ruby
[13:29:07] atomical: has joined #ruby
[13:29:08] juanpablo__: has joined #ruby
[13:29:16] duckpuppy: has joined #ruby
[13:30:52] infamos: has joined #ruby
[13:30:59] nertzy: has joined #ruby
[13:31:39] xfbs: has joined #ruby
[13:32:46] xfbs: has joined #ruby
[13:33:04] idefine: has joined #ruby
[13:33:35] xfbs: has joined #ruby
[13:36:17] User458764: has joined #ruby
[13:36:17] ponga: has joined #ruby
[13:36:43] DexterLB: has joined #ruby
[13:36:48] Rollabunna: has joined #ruby
[13:37:23] lukaszes: has joined #ruby
[13:38:09] hotpancakes: has joined #ruby
[13:38:44] jas02: has joined #ruby
[13:39:00] nopolitica: has joined #ruby
[13:43:07] devoldmx: has joined #ruby
[13:44:01] Aasha: has joined #ruby
[13:45:45] govg: has joined #ruby
[13:48:35] hotpancakes: has joined #ruby
[13:48:43] ESpiney: has joined #ruby
[13:49:05] zenguy_pc: has joined #ruby
[13:49:56] mndoci: has joined #ruby
[13:50:30] dhjondoh: has joined #ruby
[13:51:19] sandals: has joined #ruby
[13:52:20] tmtwd: has joined #ruby
[13:52:46] rgtk: has joined #ruby
[13:53:05] rgtk: has joined #ruby
[13:53:44] blackmes1: has joined #ruby
[13:54:32] absolutejam: has joined #ruby
[13:56:15] dstarh: has joined #ruby
[13:58:02] seitensei: has joined #ruby
[13:59:13] JDiPierro: has joined #ruby
[14:00:06] whitesn: has joined #ruby
[14:00:12] mrchris: has joined #ruby
[14:00:17] sepp2k: has joined #ruby
[14:01:03] dionysus69: has joined #ruby
[14:01:06] rgtk: has joined #ruby
[14:01:07] sdothum: has joined #ruby
[14:01:25] tkuchiki: has joined #ruby
[14:02:32] ekleog: has joined #ruby
[14:03:35] mrchris: has joined #ruby
[14:05:18] juanpablo__: has joined #ruby
[14:07:40] CloCkWeRX: has joined #ruby
[14:08:00] karapetyan: has joined #ruby
[14:08:23] mag42c: has joined #ruby
[14:08:23] InternetFriend: has joined #ruby
[14:10:01] InternetFriend: has joined #ruby
[14:10:04] Skelz0r: has joined #ruby
[14:10:47] InternetFriend: has joined #ruby
[14:11:03] YaknotiS: has joined #ruby
[14:11:24] nateberkopec: has joined #ruby
[14:14:49] radgeRayden_: has joined #ruby
[14:15:07] tmtwd: has joined #ruby
[14:15:42] htmldrum: has joined #ruby
[14:17:05] sankaber: has joined #ruby
[14:18:22] tigarcia: has joined #ruby
[14:18:40] freerobby: has joined #ruby
[14:19:05] centrx: has joined #ruby
[14:19:06] chibs: has joined #ruby
[14:19:12] chriscoffee: has joined #ruby
[14:19:22] The_Phoenix: has joined #ruby
[14:20:32] malconis: has joined #ruby
[14:20:43] babblebre: has joined #ruby
[14:20:57] dravine: has joined #ruby
[14:21:13] The_Phoenix: has joined #ruby
[14:21:16] kobain: has joined #ruby
[14:22:11] mrchris: has joined #ruby
[14:22:17] decoponio: has joined #ruby
[14:23:39] malconis: has joined #ruby
[14:24:21] riotjones: has joined #ruby
[14:25:20] Guest53: has joined #ruby
[14:25:26] gusTester: has left #ruby: ()
[14:25:51] darkf: has joined #ruby
[14:26:54] hotpancakes: has joined #ruby
[14:28:00] sankaber: has joined #ruby
[14:28:15] whippythellama: has joined #ruby
[14:29:53] cdg: has joined #ruby
[14:31:51] infamos: has joined #ruby
[14:31:57] xet7: has joined #ruby
[14:32:05] shredding: has joined #ruby
[14:32:50] damireh: has joined #ruby
[14:34:17] umgrosscol: has joined #ruby
[14:35:12] build22: has joined #ruby
[14:35:37] kaneis: has joined #ruby
[14:36:10] dionysus69: has joined #ruby
[14:36:13] maikowblue: has joined #ruby
[14:38:06] roshanavand: has joined #ruby
[14:38:10] bruno-: has joined #ruby
[14:38:38] Skelz0r: has joined #ruby
[14:38:53] adac: Do I have to set a flag for to complie ruby with readline support freinds?
[14:38:57] adac: *friends
[14:39:28] rbennacer: has joined #ruby
[14:39:43] rbennacer: has joined #ruby
[14:40:00] elton: has joined #ruby
[14:40:10] soahccc: adac: http://stackoverflow.com/questions/1781518/how-do-i-compile-readline-support-into-ruby
[14:40:30] soahccc: adac: linux, osx or windows?
[14:40:44] JDiPierro: has joined #ruby
[14:40:54] adac: soahccc, ubuntu linux
[14:40:58] hotpancakes: has joined #ruby
[14:41:32] soahccc: then the link is fine :)
[14:41:56] adac: soahccc, wondering where to link to do I rally have to link to the binary?
[14:42:03] adac: tehre is this lib: libreadline6-dev
[14:42:07] adac: which should suffince
[14:42:18] adac: but I'm not sure which path then I have to pass
[14:42:34] adac: --with-readline-dir
[14:43:23] bruno-_: has joined #ruby
[14:43:48] sgambino: has joined #ruby
[14:44:10] davedev24: has joined #ruby
[14:44:19] Ox0dea: adac: $ ldconfig -p | grep readline
[14:44:31] mistermocha: has joined #ruby
[14:45:14] tjohnson: has joined #ruby
[14:45:26] adac: Ox0dea, this gives me: https://gist.github.com/anonymous/9cf0e71575544e83e80d
[14:45:33] soahccc: How do you test for readline support? :) iirc configure did it for me on ubuntu automatically
[14:45:47] atomical_: has joined #ruby
[14:46:08] adac: soahccc, maybe if the lib is installed then it does it automagically?
[14:46:12] Ox0dea: Aye, it should've found it there.
[14:46:16] colegatron: has joined #ruby
[14:46:17] adac: not tested this yet
[14:46:37] adac: this were the paths on my local machine you know
[14:46:44] adac: the other stuff happend on docker
[14:47:00] adac: where this readline lib has not been installed
[14:47:05] Ox0dea: adac: So you've not actually tried to compile it yet?
[14:47:30] dhollinger: has joined #ruby
[14:47:33] adac: Ox0dea, sure, but without this lib installed with apt-get
[14:47:36] porfa: has joined #ruby
[14:47:58] _stu_: has joined #ruby
[14:47:59] adac: now installing th lib and try to recompile ruby
[14:48:06] Ox0dea: Should go swimmingly.
[14:48:16] Ox0dea: Ruby's build system goes well out of its way to locate libraries automatically.
[14:48:23] adac: :-) Looking forward to it!
[14:48:29] Ox0dea: It checks, like, twenty different places for Tk.
[14:48:37] bruno-_: has joined #ruby
[14:48:42] adac: takes some time docker must rebuild a lot
[14:48:55] nhhagen: has joined #ruby
[14:49:07] Ox0dea: Consider looking into ccache.
[14:49:20] Ox0dea: Although that's not terribly relevant if you won't be compiling many things.
[14:50:02] NeverTired: has joined #ruby
[14:50:17] adac: Ox0dea, kk thanks!
[14:50:48] mdih: has joined #ruby
[14:51:41] Ox0dea: adac: Sure thing.
[14:52:16] arthurix: has joined #ruby
[14:54:05] seitensei: has joined #ruby
[14:54:05] seitensei: has joined #ruby
[14:54:06] tulak: has joined #ruby
[14:54:09] ahegyi: has joined #ruby
[14:54:15] roshanavand: has joined #ruby
[14:54:44] dtordable: has joined #ruby
[14:54:54] inteq: has joined #ruby
[14:55:02] dtordable: hello, anyone
[14:55:20] Icey: has joined #ruby
[14:55:22] havenwood: dtordable: hi
[14:55:36] Icey: has joined #ruby
[14:55:43] platzhirsch: has joined #ruby
[14:56:11] Bish: since im always asking stupid questions here: i want to throw an exception if only one of 2 variables is >0, so basicially an xor, they can be both zero or both nonzero, how can i do that in a cool way
[14:56:42] Bish: >> "".nil? ^ "".nil?
[14:56:43] blackmes1: has joined #ruby
[14:56:43] ruboto: Bish # => false (https://eval.in/463067)
[14:57:02] Bish: im annoying, eh?
[14:57:06] Ox0dea: Why not just `[a, b].one? { |x| x > 0 }`?
[14:57:27] havenwood: In 2.3: [a, b].one? &:positive
[14:57:29] Bish: hm, that didn't come to my mind, i tried .select but failed horribly
[14:57:43] Bish: thank you, .one? is cool.
[14:58:08] platzhirsch: has joined #ruby
[14:58:10] Ox0dea: Bish: There's #all?, #any?, #one?, and #none?, for future reference.
[14:58:13] Bish: what does positive?* do.
[14:58:20] stannard: has joined #ruby
[14:58:24] havenwood: 0.positive? #=> false
[14:58:30] havenwood: 1.positive? #=> true
[14:58:33] polishdub: has joined #ruby
[14:58:54] Bish: >> [a, b].one? &:positive?
[14:58:55] ruboto: Bish # => undefined local variable or method `a' for main:Object (NameError) ...check link for more (https://eval.in/463068)
[14:59:01] havenwood: Bish: Ruby 2.3.
[14:59:16] havenwood: Bish: Also, `a` and `b`.
[14:59:25] Bish: havenwood: what is & like implicit |x| ?
[14:59:43] Bish: Ox0dea: im really sorry.
[14:59:48] idefine: has joined #ruby
[14:59:58] havenwood: Bish: Yup, along those lines.
[15:00:01] Ox0dea: Bish: I just don't understand what you expected that to do.
[15:00:15] Bish: magicially work!
[15:00:36] Ox0dea: What did you think `a` and `b` would magically become
[15:01:08] stannard: has joined #ruby
[15:01:36] dtordable: got a question for my beloved hacker
[15:01:45] bmalum: has joined #ruby
[15:02:06] Bish: Ox0dea: do you live here? you're always here to help <3
[15:02:08] musou: has joined #ruby
[15:02:42] dtordable: who said to me in a past of months "learn ruby, man"
[15:02:51] Bish: wise words.
[15:03:13] pathOs: has joined #ruby
[15:03:40] wsewolod: has joined #ruby
[15:03:44] Ox0dea: Bish: You're not even counting the times I'm here to hurt.
[15:04:00] Bish: Ox0dea: so you're karma itself?
[15:04:04] TheNet: has joined #ruby
[15:04:11] Bish: dtordable: ask the question, i can't contain it
[15:04:42] dionysus69: has joined #ruby
[15:05:26] Xeago: has joined #ruby
[15:06:43] pathOs: has joined #ruby
[15:06:47] catbusters: has joined #ruby
[15:06:58] The_Phoenix: has joined #ruby
[15:07:03] monthy: has joined #ruby
[15:08:02] hotpancakes: has joined #ruby
[15:08:22] Ox0dea: Bish: Looks like your detector needs recalibrated.
[15:08:51] Bish: i tried to recalibrate myself in holidays, but i got worse :(
[15:08:58] The_Phoenix: has joined #ruby
[15:09:27] ddv: Bish: drugs
[15:09:45] dhollinger: has joined #ruby
[15:09:54] Bish: wish i could've taken drugs, but didn't want to go to jail (been to japan, they're strict :o)
[15:10:15] voker57: has joined #ruby
[15:10:35] Icey: has joined #ruby
[15:10:36] Icey: has joined #ruby
[15:11:15] soahccc: Bish: you know amsterdam is a nice town too ;)
[15:11:35] DiCablo: has joined #ruby
[15:11:47] ddv: yeah I live there
[15:11:49] Bish: been to nl too this year, but im not hard enough
[15:12:01] rbennacer: has joined #ruby
[15:12:11] Bish: i tried "isolator" and it... isolated me.
[15:12:18] The_Phoenix: has joined #ruby
[15:12:58] arup_r: has joined #ruby
[15:13:24] govg: has joined #ruby
[15:13:56] arthurix_: has joined #ruby
[15:14:15] uris: has joined #ruby
[15:14:24] sankaber: has joined #ruby
[15:14:24] hashpuppy: has joined #ruby
[15:16:12] Ox0dea: And they say there's no truth in advertising.
[15:16:22] hashpuppy: is there a better way to write this, where I'm summing multiple json fields: http://pastie.org/pastes/10529131/text?key=uqrqrkcm6chzf6kzgnw1w
[15:16:28] hashpuppy: hash fields
[15:17:22] dionysus69: has joined #ruby
[15:17:47] Bish: Ox0dea: hyuk hyuk!
[15:18:10] luriv: has joined #ruby
[15:18:22] The_Phoenix: has joined #ruby
[15:18:42] Ox0dea: hashpuppy: Are you wanting all of the numeric values, or specifically the ones at those two keys?
[15:18:49] hashpuppy: those two keys
[15:19:58] hotpancakes: has joined #ruby
[15:20:47] idefine: has joined #ruby
[15:21:02] roshanavand: has joined #ruby
[15:21:32] elton: has joined #ruby
[15:23:34] platzhirsch: has joined #ruby
[15:23:35] sandals: has joined #ruby
[15:24:00] yaoista: has joined #ruby
[15:24:03] zotherstupidguy: has joined #ruby
[15:24:23] Ox0dea: hashpuppy: How do you feel about this? https://eval.in/463082
[15:24:25] dnomyar: has joined #ruby
[15:24:27] Balllkenende: has joined #ruby
[15:24:38] yaoista: como estan jente of word
[15:24:47] hashpuppy: i'm not familiar w/ transpose. let me check that out
[15:24:48] zotherstupidguy: english channel buddy :)
[15:24:59] Ox0dea: hashpuppy: It's matrix transposition.
[15:25:10] zotherstupidguy: is mocking a database connection a good idea?
[15:25:29] Ox0dea: >> [[:a, 1], [:b, 2]].transpose # hashpuppy
[15:25:30] ruboto: Ox0dea # => [[:a, :b], [1, 2]] (https://eval.in/463083)
[15:25:36] yaoista: auch yo no speack englis
[15:25:36] yaoista: is good idea??
[15:25:45] hashpuppy: Ox0dea: thanks
[15:25:48] Ox0dea: hashpuppy: Sure thing.
[15:25:55] karapetyan: has joined #ruby
[15:26:02] yaoista: has left #ruby: ("Saliendo")
[15:26:39] uris: has joined #ruby
[15:26:44] kfpratt: has joined #ruby
[15:27:05] mordocai: has joined #ruby
[15:27:44] dhollinger: has joined #ruby
[15:28:08] trabulmonkee: has joined #ruby
[15:28:10] hashpuppy: that's actually really ncie
[15:28:32] tkuchiki: has joined #ruby
[15:28:34] dopamean_: has joined #ruby
[15:28:35] diegoaguilar: has joined #ruby
[15:29:08] dhollinger: has joined #ruby
[15:29:44] Limix: has joined #ruby
[15:30:06] bruno-: has joined #ruby
[15:30:25] mary5030: has joined #ruby
[15:30:52] NeverTired: has joined #ruby
[15:31:00] tigarcia: has joined #ruby
[15:31:10] mary5030: has joined #ruby
[15:31:48] zz_barkerd427: has joined #ruby
[15:31:49] axl_: has joined #ruby
[15:32:32] govg: has joined #ruby
[15:32:47] kp666_: has joined #ruby
[15:33:47] Xeago: has joined #ruby
[15:35:52] antgel: has joined #ruby
[15:36:24] treehug88: has joined #ruby
[15:37:10] Ox0dea: hashpuppy: Aye, it's pretty nifty, particularly for things like rotating a grid: https://eval.in/463095
[15:37:23] p0wn3d__: has joined #ruby
[15:37:25] iceden: has joined #ruby
[15:37:42] pwnd_nsfw: has joined #ruby
[15:37:56] havenwood: hashpuppy: Just an aside, but if you have the Hashes narrowed down to just those whose values you want added you can: inject { |memo, h| memo.merge(h) { |_, v_old, v_new| v_old + v_new } }
[15:38:07] kies^: has joined #ruby
[15:38:16] djcp: has joined #ruby
[15:38:30] JoshL: are Ruby case statements constant-time dispatch?
[15:38:35] Ox0dea: JoshL: No.
[15:38:38] mary5030: has joined #ruby
[15:38:57] JoshL: Ox0dea: thanks!
[15:39:01] dtordable: has joined #ruby
[15:40:15] havenwood: >> [{"col1"=>1, "col3"=>7}, {"col1"=>1, "col3"=>2}, {"col1"=>1, "col3"=>1}].inject { |memo, h| memo.merge(h) { |_, v_old, v_new| v_old + v_new } }
[15:40:16] ruboto: havenwood # => {"col1"=>3, "col3"=>10} (https://eval.in/463097)
[15:41:10] Ox0dea: hashpuppy: To add to havenwood's (really good) suggestion, Hash#reject won't convert the Hash to key-value pairs like most of the other Enumerable methods.
[15:41:46] gilesw: has joined #ruby
[15:42:10] skade: has joined #ruby
[15:42:19] TvL: has joined #ruby
[15:42:34] brt: has joined #ruby
[15:43:26] hashpuppy: havenwood: thanks for the tip
[15:43:35] elperdut_: has joined #ruby
[15:43:49] Ox0dea: JoshL: I may've jumped the gun in answering your question, but it is the case that Ruby's `checkmatch` bytecode instruction doesn't go out of its way to optimize anything.
[15:43:52] devoldmx: has joined #ruby
[15:44:18] zotherstupidguy: has joined #ruby
[15:44:30] Ox0dea: The VM emits a `setinlinecache` instruction just before entering a case statement, for what that's worth.
[15:45:04] umgrosscol: has joined #ruby
[15:45:06] sye: has joined #ruby
[15:45:15] Xeago: has joined #ruby
[15:46:01] subscope: has joined #ruby
[15:46:11] tenderlove: has joined #ruby
[15:47:04] Ox0dea: JoshL: https://eval.in/463105
[15:47:07] m3_del: has joined #ruby
[15:47:40] platzhirsch: has joined #ruby
[15:48:25] hxegon: has joined #ruby
[15:48:51] slawrence00: has joined #ruby
[15:49:34] User458764: has joined #ruby
[15:49:45] JoshL: Ox0dea: Hm. All the documentation equates case statements to a more idiomatic form of multiple if/elsif with ===. Is it actually more performant than a big elsif block or is this just sugar?
[15:49:59] zenguy_pc: has joined #ruby
[15:50:22] govg: has joined #ruby
[15:50:32] Ox0dea: JoshL: https://github.com/ruby/ruby/blob/trunk/insns.def#L741-L746
[15:50:45] Ox0dea: It's probably slightly more performant by dint of cache locality.
[15:51:12] uris: has joined #ruby
[15:51:20] mary5030: has joined #ruby
[15:51:21] Ox0dea: All of the #=== invocations are done in that loop, but it's the same amount of branching you'd get with a chain of conditionals.
[15:53:37] JoshL: Ox0dea: Thanks, that's what I was looking for! :)
[15:55:04] Jackneill: has joined #ruby
[15:55:57] Guest95113: has joined #ruby
[15:56:24] Ox0dea: JoshL: Well, shucks. I'm seeing 7% performance decrease with `case`. :<
[15:56:57] govg: has joined #ruby
[15:57:53] Bish: >> 5.nonzero?
[15:57:54] ruboto: Bish # => 5 (https://eval.in/463115)
[15:58:02] Bish: is there 5.nonzero?! ?
[15:58:34] wilsonc91: has joined #ruby
[15:58:57] Ox0dea: JoshL: https://eval.in/463116
[15:59:04] havenwood: Bish: Yup, it returned: 5
[15:59:21] Bish: no i mean 5.nonzero?! like x = x.nonzero?
[15:59:35] Ox0dea: Bish: Integers are immutable.
[15:59:57] Ox0dea: It's what you want.
[16:00:18] beauby: has joined #ruby
[16:00:28] soahccc: Ox0dea: it's because === is more expensive than regular == but at the end I would still call that micro-optimization... http://www.daniellesucher.com/2013/07/ruby-case-versus-if/
[16:00:41] Bloomer: has joined #ruby
[16:00:59] Ox0dea: soahccc: #=== and #== can be defined arbitrarily.
[16:01:13] Bish: is there also a deep logic reason why 0.nonzero? is nil and not false?
[16:01:14] tubuliferous_: has joined #ruby
[16:02:09] apeiros: Ox0dea: case/when also is O(1) for a subset of operations. check tenderlove's tweets. /me afk :)
[16:02:15] imperator: has joined #ruby
[16:02:33] darthdeus: has joined #ruby
[16:03:00] simplyianm: has joined #ruby
[16:04:00] Ox0dea: Bish: Enjoy: https://bugs.ruby-lang.org/issues/9123
[16:04:05] roxtrongo: has joined #ruby
[16:04:13] simplyianm: has joined #ruby
[16:04:44] qwertme: has joined #ruby
[16:05:42] wldcordeiro: has joined #ruby
[16:05:58] roxtrongo: has joined #ruby
[16:09:04] mistermocha: has joined #ruby
[16:10:22] arthurix: has joined #ruby
[16:12:51] SleepySensei: has joined #ruby
[16:12:58] uris: has joined #ruby
[16:13:41] hxegon: has joined #ruby
[16:14:22] chriscoffee: has joined #ruby
[16:14:49] idefine: has joined #ruby
[16:16:14] snockerton: has joined #ruby
[16:17:07] yqt: has joined #ruby
[16:18:47] hotpancakes: has joined #ruby
[16:19:32] symm-: has joined #ruby
[16:19:54] chibs: has joined #ruby
[16:20:12] dionysus69: has joined #ruby
[16:23:29] Dreamer3: has joined #ruby
[16:24:00] xfbs: has joined #ruby
[16:24:17] Balllkenende: has joined #ruby
[16:25:13] riotjones: has joined #ruby
[16:25:44] RobertBirnie: has joined #ruby
[16:27:00] SleepySensei: has joined #ruby
[16:29:23] symm-_: has joined #ruby
[16:29:44] Xeago: has joined #ruby
[16:30:34] Dreamer3: has joined #ruby
[16:32:43] minimalism: has joined #ruby
[16:32:46] skade: has joined #ruby
[16:35:21] baroquebobcat: has joined #ruby
[16:35:43] asianMike: has joined #ruby
[16:38:12] roshanavand: has joined #ruby
[16:39:07] imperator: alright you http experts, just hit an obscure issue and wanted your opinion
[16:39:20] imperator: was using RestClient.put, but was failing, while curl was working
[16:39:30] to_json: has joined #ruby
[16:39:31] to_json: has joined #ruby
[16:39:53] imperator: turns out it was bombing because of "Content-Type: application/x-www-form-urlencoded"
[16:40:02] imperator: once i set it to an empty string, it worked
[16:40:18] jhass: you send "Content-Type: "?
[16:40:28] imperator: just wondering if it makes sense to use that default on a PUT request
[16:40:32] imperator: jhass, not me, restclient
[16:40:39] jhass: I would expect most sane server implementations to 400 that
[16:40:47] apeiros: jhass: put request
[16:41:11] jhass: don't send the header if you have no value for it
[16:41:35] apeiros: ah, you don't have a problem with the header, but with the header being empty
[16:41:41] jhass: I don't think empty header values are valid anywhere?
[16:42:51] imperator: well, i have to override restclient, only way i know how to prevent restclient from sending that
[16:43:15] imperator: hm, i suppose i could build the request, delete the header, then execute
[16:43:31] Xeago: has joined #ruby
[16:44:11] purplexed-: has joined #ruby
[16:44:38] devoldmx: has joined #ruby
[16:45:34] epochwolf: has joined #ruby
[16:45:45] willardg: has joined #ruby
[16:46:04] imperator: jhass, oh, sorry, misunderstood your question
[16:46:11] Ox0dea: jhass: RFC 7230 says it's okay?
[16:46:12] Ox0dea: header-field = field-name ":" OWS field-value OWS
[16:46:15] Ox0dea: field-value = *( field-content / obs-fold )
[16:46:21] jhass: that's why I don't really like rest client, it often seems not well thought through
[16:46:21] Ox0dea: At least, as long as *() means "0 or more", which I imagine it does.
[16:47:02] mistermo_: has joined #ruby
[16:47:39] acke: has joined #ruby
[16:48:06] Ox0dea: Yeah, 7230 uses 1*() to mean "1 or more".
[16:48:19] brendan-: has joined #ruby
[16:48:20] diegoaguilar: has joined #ruby
[16:49:06] renier: has joined #ruby
[16:49:06] havenwood: jhass: I haven't tried reproducing these results but RestClient sure was slower than the pack by a large margin with excon's benchmarks: https://github.com/httprb/http#another-ruby-http-library-why-should-i-care
[16:49:51] adac: has joined #ruby
[16:49:54] Xeago: has joined #ruby
[16:50:03] diesel: has joined #ruby
[16:50:07] imperator: we chose....poorly
[16:51:19] Musashi007: has joined #ruby
[16:51:30] hotpanca_: has joined #ruby
[16:51:30] Limix: has joined #ruby
[16:51:45] EminenceHC: has joined #ruby
[16:52:04] idefine: has joined #ruby
[16:53:24] Zarthus: has joined #ruby
[16:55:10] AustinMatherne: has joined #ruby
[16:55:45] hotpancakes: has joined #ruby
[16:56:19] constantinexvi: has joined #ruby
[16:58:48] hxegon: has joined #ruby
[16:59:24] Rollabunna: has joined #ruby
[16:59:56] ledestin: has joined #ruby
[17:00:02] Balllkenende: has joined #ruby
[17:00:30] towski_: has joined #ruby
[17:01:15] elperdut: has joined #ruby
[17:02:20] constantinexvi: has joined #ruby
[17:02:39] dtordable: has joined #ruby
[17:03:51] cornerma1: has joined #ruby
[17:04:33] JayNeely: has joined #ruby
[17:05:04] philip7899: has joined #ruby
[17:05:19] troyready: has joined #ruby
[17:06:11] User458764: has joined #ruby
[17:06:46] philip7899: Hey, anyone have any ideas about this omniauth-facebook and rails issue? I keep getting an error from facebook regarding my redirect-uri, but what's even stranger is that none of my puts are actually going to the terminal, with the exception of the before_action. any ideas? http://stackoverflow.com/questions/33523735/facebook-omniauth-login-with-rails-devise-not-working-because-of-error-validatin
[17:06:49] synthroid: has joined #ruby
[17:09:15] mleung: has joined #ruby
[17:09:47] SCHAAP137: has joined #ruby
[17:10:46] dorei: has joined #ruby
[17:11:12] bmalum: has joined #ruby
[17:11:57] momomomomo: has joined #ruby
[17:12:10] antgel: has joined #ruby
[17:13:19] lacrymology: has joined #ruby
[17:14:35] karapetyan: has joined #ruby
[17:14:45] kashyap: has joined #ruby
[17:14:45] lacrymology: is it possible to somehow override a method to get if foo resolve to false for certain values of foo (without having to add syntax)
[17:15:53] hxegon: has joined #ruby
[17:16:29] kashyap: has left #ruby: ()
[17:16:31] Ox0dea: lacrymology: Absolutely.
[17:16:44] Ox0dea: Also, you're not allowed to syntax at all. :P
[17:16:48] Ox0dea: *add syntax
[17:17:03] idefine: has joined #ruby
[17:18:07] elton: has joined #ruby
[17:18:43] armyriad: has joined #ruby
[17:19:33] shevy: no, don't correct it
[17:19:40] shevy: it reads much better without correction
[17:19:46] shevy: you are not allowed to syntax. period.
[17:19:55] Ox0dea: No syntax for you.
[17:20:19] Ox0dea: shevy: https://bugs.ruby-lang.org/issues/11655
[17:20:32] shevy: I actually don't even understand lacrymology's question
[17:20:39] Ox0dea: I feel like maybe nobu just doesn't want to bother fixing something so complicated for so little gain. :<
[17:20:48] shevy: what does he mean "without having to add syntax" ... does he mean without having to add code?
[17:20:58] Ox0dea: No idea, but I know what they wanna do.
[17:21:14] shevy: Ox0dea nobu is busy adding foo.?bla thingies
[17:21:22] Ox0dea: Dat .?[] doe.
[17:21:22] shevy: and frozen strings
[17:21:28] shevy: we don't have time for other stuff!
[17:21:57] shevy: also, refinements are way too limited
[17:22:10] shevy: there should be a tabula rasa state of default ruby
[17:22:12] dtordable: has joined #ruby
[17:22:36] Ox0dea: lacrymology: Still about?
[17:22:41] shevy: so that projects can refer to this initial state, rather than any randomly derived modification; the whole refinement implementation so far does not include that at all
[17:22:52] shevy: we totally lost lacrymology
[17:23:03] shevy: he is on his way to idle away :(
[17:23:12] Ox0dea: In case they're not dead: https://eval.in/463150
[17:23:23] shevy: Ox0dea perhaps nobu thinks you are joking :)
[17:23:33] hotpancakes: has joined #ruby
[17:23:34] Ox0dea: No, I suspect that's not it.
[17:23:36] shevy: you need to try it like hanmac
[17:23:43] shevy: he gets his ideas into core
[17:24:06] Ox0dea: What's his secret?
[17:24:15] shevy: I think the slightly broken english style appeals to japanese hackers so perhaps you should try that too, in your next suggestion
[17:24:28] bricker: has joined #ruby
[17:24:28] Ox0dea: That's maybe a little racist.
[17:24:41] shevy: no, that's german english!
[17:25:03] Ox0dea: I said "Is it a bug?" instead of "Is this a bug?".
[17:25:06] shevy: although in fairness, hanmac knows a LOT
[17:25:31] Ox0dea: I know an alot.
[17:25:38] Ox0dea: I suppose it's not the same. :<
[17:25:58] riotjones: has joined #ruby
[17:26:47] sebstrax: has joined #ruby
[17:27:02] shevy: alots are cuter
[17:27:07] Ilyes512: has joined #ruby
[17:27:13] shevy: http://3.bp.blogspot.com/_D_Z-D2tzi14/S8TTPQCPA6I/AAAAAAAACwA/ZHZH-Bi8OmI/s400/ALOT2.png
[17:27:13] Fire-Dragon-DoL: has joined #ruby
[17:27:53] yardenbar: has joined #ruby
[17:28:18] lacrymology: Ox0dea, shevy: sorry, both about the vague question and leaving
[17:28:26] Ox0dea: lacrymology: You monster.
[17:29:04] Aswebb_: has joined #ruby
[17:29:54] lacrymology: the question was: is it possible to have `if foo 'true' else 'false' end` resolve to 'false' for a non-nil/non-false object foo, by defining some method on foo. In python I'd override foo.__bool__ (py3) or foo.__nonzero__ (py2)
[17:30:35] lacrymology: Right now I've defined foo.to_bool and I'm doing `if foo.to_bool`, I was wondering if it was possible to avoid that
[17:30:51] lacrymology: just as a bit of sugar
[17:31:22] shevy: I think objects in ruby do not have a boolean method/value per se
[17:31:47] Ox0dea: lacrymology: Whale, you could define a custom #! method, or you could define #coerce, but then you'd have to explicitly compare to `true` or `false`, and that's lame. :<
[17:31:55] shevy: at the last I never saw something like __bool__ in ruby... perhaps this is where python outperforms ruby :)
[17:32:13] Ilyes512_: has joined #ruby
[17:32:16] nertzy: has joined #ruby
[17:32:23] Ox0dea: For a very loose definition of "outperforms", mind.
[17:32:33] govg: has joined #ruby
[17:32:39] lacrymology: I'm not going to enter this argument
[17:32:56] Balllkenende: has joined #ruby
[17:33:04] SeeThruHead: has joined #ruby
[17:33:05] freerobby: has joined #ruby
[17:33:19] lacrymology: I'm just going to say "namespaces"
[17:33:44] SeeThruHead: anyone using fish shell with rvm? having trouble getting the default to actually be in use on a new shell
[17:33:57] shevy: well he could get behaviour in python that he could not get at ruby, at the same level (if/else checks)
[17:33:59] Ox0dea: lacrymology: Those're one honking great idea.
[17:34:11] izzol: I guess Rails is the best Ruby framework for the web apps? I will need to create one project ;-)
[17:34:16] Ox0dea: shevy: Well, sure, but pursuant to circumventing a perfectly logical notion of truthiness.
[17:34:24] Musashi007: has joined #ruby
[17:34:33] shevy: hey wait a moment
[17:34:40] shevy: "perfectly logical" ... what's with your _____ code!!!
[17:34:50] Ox0dea: Sometimes I'm serious.
[17:35:22] Ox0dea: lacrymology: Really, you should just be a little more explicit in your comparison. :P
[17:35:27] shevy: the fish shell is cool
[17:35:34] shevy: unfortunately I am still with bash
[17:35:38] Ox0dea: Xiki is cooler.
[17:36:07] Ox0dea: http://xiki.org/
[17:36:29] Ox0dea: Their mascot is missing a few limbs.
[17:36:32] lacrymology: Ox0dea: to_bool is good for me. Honestly, it's for something I wish rails would handle (converting 't', 'true', '1', 'on' to true, etc)
[17:36:42] Ilyes512: has joined #ruby
[17:36:47] shevy: lacrymology hahaha I use that too
[17:37:01] shevy: for yaml files where I am too lazy to write true or false; i just write t and f
[17:37:05] chibs: has joined #ruby
[17:37:29] lacrymology: maybe it's possible to write some kind of middleware on rails that handles the parameters, I've been using it for exactly 15 hours so far
[17:37:29] zylogz80: has joined #ruby
[17:37:35] Pupeno: has joined #ruby
[17:37:40] shevy: middleware middleware middleware ... rack!
[17:37:50] shevy: you can get an awesome ascii lobster
[17:38:21] kaneis: has joined #ruby
[17:38:22] lacrymology: but really.. I'm totally disgusted by ruby's global classes. Most of the rest I can live with but.. what the hell?
[17:39:03] _djbkd: has joined #ruby
[17:39:08] benlieb: has joined #ruby
[17:39:53] Sou|cutter: huh? global classes?
[17:39:55] shevy: you mean things like class Object?
[17:41:22] Ox0dea: I think they just don't realize that modules can and should be used as namespaces.
[17:41:43] hotpancakes: has joined #ruby
[17:42:06] shevy: you can also use a class as namespace
[17:42:07] purplexed-: has joined #ruby
[17:42:08] purplexed-: has joined #ruby
[17:42:21] jpfuentes2: has joined #ruby
[17:42:38] Ilyes512: has joined #ruby
[17:43:31] shinnya: has joined #ruby
[17:43:49] RobertBirnie: has joined #ruby
[17:43:50] Croves: has joined #ruby
[17:44:00] hashpuppy: has joined #ruby
[17:44:30] Croves: So, I'm doing the Ruby course path in CodeAcademy.com and... why everytime at the end of my code, the interpretor returns a 'nill' string?
[17:44:50] Xeago: has joined #ruby
[17:44:53] shadoi: has joined #ruby
[17:44:54] shevy: a nill string?
[17:45:04] Zarthus: can you paste your code?
[17:45:23] Ox0dea: Croves: Your code is being evaluated in a REPL, whose P stands for "print"; it displays the value of the last expression.
[17:45:49] Ox0dea: Croves: The `puts` method displays some output and then returns `nil`.
[17:45:58] shevy: but he has a nill!
[17:46:00] fedexo: has joined #ruby
[17:46:07] Ox0dea: No, I'm sure they've got a regular-ol' `nil`.
[17:46:16] Croves: That's my code http://pastie.org/10529410
[17:46:25] tvw: has joined #ruby
[17:46:27] Zarthus: Still sounds like an UI bug if it's outside of the scope of what he's written
[17:46:58] babblebre: has joined #ruby
[17:47:04] skweek: has joined #ruby
[17:47:19] Croves: And here's a screen shot of my result http://imgur.com/ex5Ypsd
[17:47:21] baweaver: has joined #ruby
[17:47:26] TheNet: has joined #ruby
[17:47:29] Ox0dea: Croves: Did you read what I said?
[17:47:41] shevy: >> print 'hi Croves'
[17:47:42] ruboto: shevy # => hi Crovesnil (https://eval.in/463177)
[17:47:47] shevy: see - a nil is there
[17:47:47] Ox0dea: irb(main):001:0> puts 'foo'
[17:47:49] Zarthus: Croves: report it to codeacedemy to let them get it fixed I suppose
[17:47:56] Ox0dea: Zarthus: It's not a bug...
[17:48:11] Zarthus: Ox0dea: this is not what the user should be seeing
[17:48:19] Zarthus: Ox0dea: it will confuse new programmers especially
[17:48:44] shevy: I have faith in Croves
[17:48:47] Ox0dea: Zarthus: Good; confusion begets learning.
[17:48:49] jeradW: has joined #ruby
[17:48:50] Croves: Ox0dea Yes, I read
[17:48:57] Ox0dea: Croves: Do you understand what is happening?
[17:48:58] Croves: Thank you, shevy
[17:49:09] Croves: Kind of...
[17:49:37] Croves: The `nill` it's just the return of that method... maybe?!
[17:49:44] hmsimha_: has joined #ruby
[17:49:45] Ox0dea: Croves: Why are you saying "nill"?
[17:49:51] zenguy_pc: has joined #ruby
[17:50:08] Croves: Ox0dea Oh, it's NIL
[17:50:11] Croves: With only one L
[17:50:16] Croves: Didn't realized that...
[17:50:27] Ox0dea: > For all its power, the computer is a harsh taskmaster. Its programs must be correct, and what we wish to say must be said accurately in every detail.
[17:50:37] Ox0dea: Attention to detail is of paramount importance.
[17:50:39] shevy: it's downcased nil :D
[17:50:45] ruboto: shevy # => nil (https://eval.in/463178)
[17:50:52] Ox0dea: The capitalization was for emphasis, shevy.
[17:50:53] Limix: has joined #ruby
[17:51:08] tubuliferous_: has joined #ruby
[17:51:08] shevy: DO NOT CODE IN CAPS, WE KNOW WHICH PROGRAMMING LANGUAGE REQUIRED THAT
[17:51:23] Ox0dea: (Not really; only the keywords.)
[17:51:26] bougyman: LISP ALLOWS IT, TOO
[17:51:34] Ilyes512: has joined #ruby
[17:51:36] bougyman: it actually upcases every function name
[17:51:41] bougyman: and symbol, iirc
[17:51:47] Ox0dea: Only certain dialects.
[17:51:47] shevy: well, as you get older and your eyes become worse, upcasing really helps!
[17:52:11] bougyman: Ox0dea: when I say LISP i mean COMMON-LISP
[17:52:23] Ox0dea: bougyman: Yes, that's certainly one that does.
[17:52:31] Ox0dea: (It's slightly infuriating.)
[17:52:53] Ilyes512: has joined #ruby
[17:52:55] mrtomme: has joined #ruby
[17:52:56] momomomomo_: has joined #ruby
[17:53:15] Ox0dea: Croves: `4 + 2` *returns* 6, but it doesn't *do* anything else; the `print` method, on the other hand, *does* something, in that it outputs what you told it to, but it *returns* `nil`.
[17:54:32] Croves: Ox0dea Well, I imagine that in the Ruby core there's something like function print(args) output args return nil
[17:54:43] Ox0dea: Croves: That's right.
[17:54:49] rob_: has joined #ruby
[17:54:51] Croves: LOL please don't spank me
[17:54:57] vdamewood: has joined #ruby
[17:54:58] Croves: Oh, really...
[17:55:16] Croves: Nice to know... I tough that you guys would make fun of me because of my example
[17:55:21] lemur: has joined #ruby
[17:55:29] rob_: hi, has anyone run webrick in docker and noticed that it doesnt bind to it's usual default port, but instead a random one? is this configurable by an environment variable?
[17:55:50] Croves: For a beginner, should I use print or puts?
[17:55:54] Guest53: has joined #ruby
[17:56:04] rob_: Croves: puts is most common
[17:56:09] Croves: That `nil` in the end is start to bother me.. at least with puts it goes to the other line
[17:56:32] pontiki: Croves: it depends on whether you want a line-feed added to the end of the output
[17:56:35] rob_: print doesn't append a new line to the string it prints
[17:56:36] Ox0dea: Croves: You should use whichever is more appropriate; sometimes you don't want the newline.
[17:56:55] Ox0dea: Croves: For displaying things intended for *you* and not your user (debugging), you should use `p`.
[17:56:58] swgillespie: has joined #ruby
[17:57:21] freerobby: has joined #ruby
[17:57:55] Croves: Thanks guys
[17:58:12] Icey: has joined #ruby
[17:58:12] Icey: has joined #ruby
[17:58:46] rob_: 'p' is equivalent to puts object.inspect. if you install the 'awesome_print' gem and 'require' it then you'll get even nicer output when inspecting data
[17:59:21] Guest97: has joined #ruby
[18:02:23] mozzarella: has joined #ruby
[18:03:22] dionysus69: has joined #ruby
[18:03:35] tubuliferous_: has joined #ruby
[18:03:50] kashyap: has joined #ruby
[18:04:04] mikecmpbll: has joined #ruby
[18:04:31] Balllkenende: has joined #ruby
[18:04:35] dionysus69: has joined #ruby
[18:04:37] rakm: has joined #ruby
[18:05:03] codecop: has joined #ruby
[18:06:12] tomphp: has joined #ruby
[18:06:59] Guest53: has joined #ruby
[18:09:33] jeradW: has left #ruby: ()
[18:09:33] DrCode: has joined #ruby
[18:10:37] PlasmaStar: has joined #ruby
[18:10:48] imperator: has left #ruby: ("Leaving")
[18:10:59] Croves: Nice thing the use of `..` and `...` to indicate closed and open intervals
[18:12:34] Balllkenende: has joined #ruby
[18:12:34] Ox0dea: Croves: Ruby wants you to be happy.
[18:12:35] baweaver: has joined #ruby
[18:12:45] Croves: I'm already in love with it, Ox0dea
[18:12:51] Ox0dea: Excellent! <3
[18:12:55] Croves: God, why did I waste so many time of my life with PHP?
[18:13:21] Croves: So much time*
[18:13:33] shadeslayer: Should introduce to some of the PHP people I know then xD
[18:13:50] Ox0dea: Croves: It might help to look at that mistake as a sort of reverse-learning: you know so many things not to do. :P
[18:14:05] kashyap: Hi, any hints as to how I can resolve this? Mostly dep issue I guess:
[18:14:06] kashyap: /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- v8 (LoadError)
[18:14:19] Croves: For sure, Ox0dea :)
[18:14:39] skcin7: has joined #ruby
[18:14:41] kashyap: I did a `gem install require`, but I doubt that's what it is complaining aobut.
[18:14:47] kashyap: s/aobut/about/
[18:15:42] Ox0dea: kashyap: You want `gem i therubyracer`.
[18:16:50] kashyap: Ox0dea: Ah-ha, thank you, let me try.
[18:17:02] Ox0dea: kashyap: Sure thing.
[18:19:13] hotpancakes: has joined #ruby
[18:20:06] melter: has joined #ruby
[18:20:06] s2013: has joined #ruby
[18:20:13] Uranio: has joined #ruby
[18:20:15] JDiPierro: has joined #ruby
[18:20:18] kashyap: Oh, that fails spectacularly
[18:21:20] dragonkh: has joined #ruby
[18:21:41] BigDiesel007: has joined #ruby
[18:21:49] Ox0dea: kashyap: You're likely missing some dependencies.
[18:22:02] kashyap: Yeah, getting them. . .
[18:22:08] hectorsq: has joined #ruby
[18:22:12] hypnosb: has joined #ruby
[18:22:17] dravine: has joined #ruby
[18:22:23] lubarch: has joined #ruby
[18:23:08] dragonkh: hi - I'm trying to follow a simple C extension tutorial - I made the C extension and the extconf.rb and ran it and it produced a Makefile - which I ran successfully which it produced an .o file and a myext.bundle - the instructions say I can now fire up irb and require 'myext' however it does not find it
[18:23:37] Ox0dea: dragonkh: How about `irb -r ./myext`?
[18:23:50] kashyap: Ox0dea: How on earth did you figure that dep. (Asking this as someone who only occasionally use Jekyll, maybe you memorized most stuff).
[18:23:56] mag42c: has joined #ruby
[18:24:08] raz: has joined #ruby
[18:24:12] Ox0dea: kashyap: therubyracer is the most popular gem for providing a JS runtime.
[18:24:16] dragonkh: Ox0dea, what should it be loading? the myext.bundle or the .o file ?
[18:24:19] Ox0dea: And V8 is the most popular of those.
[18:25:02] Ox0dea: dragonkh: I'm not sure why you're getting a .bundle and not a .dylib, to be honest.
[18:25:12] mistermocha: has joined #ruby
[18:25:17] dragonkh: ok well your suggestion worked
[18:25:27] dragonkh: if that helps
[18:25:47] hotpancakes: has joined #ruby
[18:25:51] dragonkh: im following this: http://www.rubyinside.com/how-to-create-a-ruby-extension-in-c-in-under-5-minutes-100.html
[18:25:59] dragonkh: its pretty old - but it does seem to work
[18:26:05] skade: has joined #ruby
[18:26:18] Ox0dea: dragonkh: Yeah, your error was only because `require` couldn't find your thing in $LOAD_PATH.
[18:26:36] kashyap: Ox0dea: Ah, I see.
[18:26:47] riotjones: has joined #ruby
[18:27:10] raz: has left #ruby: ("Leaving")
[18:27:13] Ox0dea: dragonkh: When your extension is installed normally (as part of a gem), it'll be discoverable by the RubyGems system (and thus `require`).
[18:27:23] haxrbyte: has joined #ruby
[18:27:52] Ox0dea: You circumvented that by telling `irb` to look in the current directory, which you could also have done with `irb -I . -r myext`.
[18:29:49] symm-: has joined #ruby
[18:29:58] dragonkh: Ox0dea, I found the issue: ruby -e "require 'rbconfig'; puts RbConfig::CONFIG['DLEXT'];" produces bundle not so
[18:30:05] mistermocha: has joined #ruby
[18:30:57] Ox0dea: dragonkh: Nah, that's not an "issue", per se; dynamic libraries usually have a .dylib extension on OS X, but .bundle is apparently kosher too.
[18:31:14] dtordable: where a guide to learn Ruby as a PDF format is?
[18:31:37] Ox0dea: dtordable: Should I phone the authorities?
[18:31:44] dragonkh: Ox0dea, well apparently you can set the value of DLEXT to .dylib or .so instead and its something to do with the LLVM gcc or rvm
[18:32:21] dtordable: Ox0dea: why?
[18:32:47] Ox0dea: dtordable: Well, did or did you not just ask >1k people to aid and abet you in the infringement of copyright?
[18:32:59] aef: has joined #ruby
[18:33:23] eam: Ox0dea: he may not live somewhere that criminalizes the sharing of information
[18:33:56] Croves: What's the convetion behind using { } or `do...end` ?
[18:33:58] karapetyan: has joined #ruby
[18:34:15] dtordable: Ox0dea: but for learn I need to read!
[18:34:22] Ox0dea: dragonkh: It's to do with the C compiler, yeah. That'd be Clang, in your case, but it still seems a little weird that it spit out a .bundle.
[18:34:32] Ox0dea: Croves: Use Weirich's rule.
[18:35:02] DrCode: has joined #ruby
[18:35:12] mag42c: has left #ruby: ()
[18:35:31] Croves: Ox0dea Thanks!
[18:35:39] Ox0dea: Croves: Sure thing. Ya gonna adopt it?
[18:35:49] Balllkenende: has joined #ruby
[18:35:52] Croves: Ox0dea You mean this? The style guide suggests using {...} for single line and do/end for multiple line blocks.
[18:36:00] Ox0dea: https://github.com/bbatsov/ruby-style-guide/issues/162
[18:36:30] houhoulis: has joined #ruby
[18:36:34] lkr: has joined #ruby
[18:36:35] banister: has joined #ruby
[18:36:55] roshanavand: has joined #ruby
[18:37:09] Croves: Well, probably I'll adopt it then... if it's what the community uses most
[18:37:34] postmodern: has joined #ruby
[18:38:12] ht__: has joined #ruby
[18:38:29] bmalum: has joined #ruby
[18:38:57] Xeago: has joined #ruby
[18:39:16] dtordable: Ox0dea: so there's no pdf about?
[18:40:31] hmsimha_: has joined #ruby
[18:40:47] Trynemjoel: has joined #ruby
[18:40:54] hxegon: dtordable: pdf of what? that rubyinside page?
[18:41:06] Eiam_: has joined #ruby
[18:41:44] kalusn: has joined #ruby
[18:41:57] dtordable: hxegon: learn Ruby...
[18:42:06] Ox0dea: Croves: I guess I should clarify that I'm proselytizing a bit; it's not what the community uses most, but I think it should. :P
[18:42:17] kashyap: Ox0dea: Sorry to bother again, so I installed that and several other deps, now I'm stuck at "/home/kashyapc/.gem/ruby/gems/jekyll-lunr-js-search-0.3.0/lib/jekyll_lunr_js_search/search_entry.rb:8:in `create': cannot load such file -- jekyll/post (LoadError)"
[18:42:22] blackmes1: has joined #ruby
[18:42:29] Croves: Ox0dea But anyway, it makes sense what he's said
[18:42:33] Ox0dea: If Weirich's rule doesn't "fit" a particular chunk of code, there's probably some room for refactoring.
[18:42:35] kashyap: `gem i create` didn't fix that
[18:42:38] hxegon: dtordable: https://thepiratebay.gd/search/learn%20ruby/0/99/0 ???
[18:42:58] mary5030_: has joined #ruby
[18:43:06] Ox0dea: kashyap: `create` is the method that failed, not the file that couldn't be loaded; that'd be "jekyll/post".
[18:43:19] Ox0dea: hxegon: Why?
[18:43:36] kashyap: Duh, dense me
[18:43:37] hxegon: Ox0dea: I have no idea.
[18:43:53] al2o3-cr: has joined #ruby
[18:44:00] idefine: has joined #ruby
[18:44:12] diegoviola: has joined #ruby
[18:44:29] rbennacer: has joined #ruby
[18:45:20] momomomomo: has joined #ruby
[18:45:34] devoldmx: has joined #ruby
[18:46:09] Pupp3tm4st3r: has joined #ruby
[18:47:27] purplexed-: has joined #ruby
[18:47:28] kalusn: has joined #ruby
[18:47:41] BigDiesel007: has joined #ruby
[18:47:59] User458764: has joined #ruby
[18:48:37] Trynemjoel: has joined #ruby
[18:49:20] finisherr: has joined #ruby
[18:50:51] kashyap: Hmm, there's no such valid gem as jekyll-post. Not sure if I can resolve these deps by hand (already installed a ton of them)
[18:51:22] kashyap: I see an issue reported in jekyll github: The "jekyll serve" command reports error "cannot load such file -- jekyll/post (LoadError)". . .
[18:51:29] dikaio: has joined #ruby
[18:51:40] kashyap: Just that it's buried somewhere deep in https://github.com/jekyll/jekyll/issues
[18:51:43] C0r3: has joined #ruby
[18:52:03] C0r3: Which is the best hosting service for a portal built in Ruby on Rails?
[18:52:16] thesheff17: has joined #ruby
[18:52:29] mistermocha: has joined #ruby
[18:52:35] lkr_: has joined #ruby
[18:52:44] daivyk: has joined #ruby
[18:53:56] Ox0dea: kashyap: The gem is just "jekyll".
[18:54:09] centrx: C0r3, That's a pretty general question
[18:54:15] kashyap: I swear I already installed it, /me retries.
[18:54:25] skweek: has joined #ruby
[18:54:31] yfeldblum: has joined #ruby
[18:55:28] kashyap: No dice, still complains: `create': cannot load such file -- jekyll/post
[18:56:00] Ox0dea: kashyap: Hm, this is kinda weird.
[18:56:07] C0r3: centrx: But is there any suggestions... Like, if you were to host it then where would you host it?
[18:56:22] kashyap: Just wanted to submit a drive-by patch to another website, and here I'm shaving yak after yak
[18:56:30] mistermocha: has joined #ruby
[18:56:32] lemur: has joined #ruby
[18:56:40] centrx: C0r3, Digital Ocean or AWS - that's if I wanted an instance with a real machine (IaaS)
[18:56:43] spider-mario: has joined #ruby
[18:56:50] Ox0dea: kashyap: Jekyll's main file contains `autoload :Page, 'jekyll/page'`, but there is indeed no such file.
[18:57:19] centrx: C0r3, You can also use a service like Heroku or Engine Yard, which offer a Rails platform (PaaS)
[18:57:40] C0r3: centrx: Thank you!! I was looking at Heroku.
[18:57:43] mary5030_: hope someone can help me out here, how do i turn this object to hash? #<struct IpAllocation ip_address="1", dedicated_service_net_vlan_number="2", interface_updates=[], new_vlan=false>
[18:58:10] centrx: mary5030_, http://ruby-doc.org/core-2.2.1/Struct.html#method-i-to_h
[18:58:51] siemprefresco: has joined #ruby
[18:58:52] diegoaguilar: has joined #ruby
[18:58:52] hmsimha_: has joined #ruby
[18:58:58] ibouvousaime: has joined #ruby
[18:58:58] C0r3: centrx: I'm really new to Ruby... I used to work on Laravel built in PHP. Now I want to build web apps in Ruby. I've heard of Rails but never used it. Did you ever use Laravel or any similar Framework??
[18:59:10] idefine: has joined #ruby
[18:59:23] centrx: C0r3, I've used CakePHP. Rails is much nicer
[18:59:51] centrx: C0r3, also FYI #RubyOnRails is the Rails channel
[19:00:02] mary5030_: centrx: i get undefined method to_h' for #<IpAllocation:0x101012d48>
[19:00:10] mary5030_: it is for a newer ruby version?
[19:00:11] Rollabunna: has joined #ruby
[19:00:15] C0r3: centrx: Thank you...
[19:00:18] beauby: has joined #ruby
[19:00:20] TheNet: has joined #ruby
[19:00:35] centrx: mary5030_, Looks like it was introduced in Ruby 2.0
[19:00:57] mary5030_: i am using 1.8.7
[19:00:57] centrx: mary5030_, Also it's for the class Struct, is this "struct IpAllocation" a custom class?
[19:01:14] centrx: mary5030_, Yeah highly recommended you upgrade to 2.0 or higher. 1.8 is EOL
[19:01:17] mary5030_: IpAllocation = Struct.new(:ip_address, :dedicated_service_net_vlan_number, :interface_updates , :new_vlan)
[19:01:22] idefine: has joined #ruby
[19:02:25] mary5030_: any other solution to this anyone?
[19:02:36] mary5030_: how do i turn this object to hash? #<struct IpAllocation ip_address="1", dedicated_service_net_vlan_number="2", interface_updates=[], new_vlan=false>
[19:02:38] centrx: mary5030_, You can do: my_struct.each_pair.map.to_h
[19:02:51] centrx: or actually in 1.8 would have to be
[19:03:11] centrx: Hash[*my_struct.each_pair.map.to_a]
[19:03:13] centrx: something like that
[19:03:26] Ox0dea: 18>> foo = Struct.new(:a, :b).new(1, 2); p Hash[foo.each_pair.to_a] # mary5030_
[19:03:27] ruboto: Ox0dea # => {:b=>2, :a=>1} ...check link for more (https://eval.in/463214)
[19:03:45] Ox0dea: Oh, hey, I forgot 1.8 didn't maintain insertion order on hashes.
[19:04:03] _blizzy_: has joined #ruby
[19:04:56] mary5030_: thank you all so much
[19:05:01] mary5030_: i will check these out
[19:05:07] Ox0dea: mary5030_: But really, upgrade. :P
[19:05:21] mary5030_: lol not up to me this one
[19:05:26] mary5030_: i would if it was though
[19:05:30] centrx: mary5030_, put it on the list, 1.8.7 was released May 2008 and retired June 2013
[19:05:38] DEA7TH: has joined #ruby
[19:05:59] C0r3: has left #ruby: ()
[19:07:15] skade: has joined #ruby
[19:07:25] dtordable: has joined #ruby
[19:07:26] dtordable: has joined #ruby
[19:07:52] |RicharD|: has joined #ruby
[19:08:04] |RicharD|: I've a command line program done in ruby
[19:08:19] |RicharD|: and from ARGV i get the command with all parameters
[19:08:26] |RicharD|: like --remote=something
[19:08:30] dnomyar: has joined #ruby
[19:08:35] bougyman: i'm smelling some OptionParser needed, here.
[19:08:38] |RicharD|: how can I catch this --remote=something easily ?
[19:08:44] kashyap: Ox0dea: Yeah, I'm going to bail out for the night, and ask the relevant folks to take a look at it.
[19:08:51] bougyman: require 'optparse' then use OptionParser
[19:09:10] VeryBewitching: has joined #ruby
[19:09:23] havenwood: |RicharD|: Or use an option parsing gem like Slop: https://github.com/leejarvis/slop#readme
[19:09:45] bougyman: http://ruby-doc.org/stdlib-2.2.3/libdoc/optparse/rdoc/OptionParser.html
[19:09:46] al2o3-cr: Yeah, slop is a nice gem :)
[19:09:52] TheNet: has joined #ruby
[19:10:09] bougyman: i have nothing against slop, but if you can avoid gems, do so.
[19:10:11] baweaver: has joined #ruby
[19:10:15] baroquebobcat: has joined #ruby
[19:10:24] ht__: has joined #ruby
[19:11:48] firstdayonthejob: has joined #ruby
[19:12:17] lbwski: has joined #ruby
[19:14:28] Pupeno: has joined #ruby
[19:14:47] Xeago: has joined #ruby
[19:14:55] platzhirsch: has left #ruby: ()
[19:15:17] antgel: has joined #ruby
[19:15:29] nettoweb: has joined #ruby
[19:17:04] tercenya: has joined #ruby
[19:17:58] opensource_ninja: has joined #ruby
[19:18:03] xfbs: has joined #ruby
[19:18:08] _djbkd: has joined #ruby
[19:18:16] hotpancakes: has joined #ruby
[19:18:30] hotpancakes: has joined #ruby
[19:19:26] last_staff: has joined #ruby
[19:19:42] chrisja: has joined #ruby
[19:19:51] shmilan: has joined #ruby
[19:20:55] lukaszes: has joined #ruby
[19:20:56] bruno-: has joined #ruby
[19:21:13] chrisja: has joined #ruby
[19:21:22] newmanships: has joined #ruby
[19:21:51] atomical: has joined #ruby
[19:22:10] purplexed-: has joined #ruby
[19:22:16] chrisja: has joined #ruby
[19:23:26] acke: has joined #ruby
[19:23:26] nopolitica: has joined #ruby
[19:23:58] tubuliferous_: has joined #ruby
[19:24:50] BSaboia: has joined #ruby
[19:27:04] User458764: has joined #ruby
[19:27:36] riotjones: has joined #ruby
[19:28:22] yqt: has joined #ruby
[19:29:00] atomical_: has joined #ruby
[19:29:32] Guest53: has joined #ruby
[19:29:47] _djbkd: has joined #ruby
[19:32:24] ht__: has joined #ruby
[19:33:41] mary5030: has joined #ruby
[19:33:57] cpup: has joined #ruby
[19:34:27] banister: has joined #ruby
[19:34:59] synthroid: has joined #ruby
[19:38:05] coderabbit: has joined #ruby
[19:38:06] RegulationD: has joined #ruby
[19:38:15] vigintas: has joined #ruby
[19:38:58] simplyia_: has joined #ruby
[19:39:17] Xeago: has joined #ruby
[19:39:41] kirun: has joined #ruby
[19:39:50] Maletor: has joined #ruby
[19:40:06] simplyianm: has joined #ruby
[19:40:33] Guest53: has joined #ruby
[19:40:56] ellisTAA: has joined #ruby
[19:41:24] dikaio: has joined #ruby
[19:42:22] ht__: has joined #ruby
[19:42:48] Xeago: has joined #ruby
[19:44:30] Trynemjoel: has joined #ruby
[19:45:25] jessemcgilallen: has joined #ruby
[19:46:12] roshanavand: has joined #ruby
[19:46:20] pwnd_nsfw: has joined #ruby
[19:46:44] Motoservo: has joined #ruby
[19:47:14] infamos: has joined #ruby
[19:47:14] baweaver: has joined #ruby
[19:47:51] ibouvousaime_: has joined #ruby
[19:47:53] BrunoSaboia: has joined #ruby
[19:48:58] Axsuul: has joined #ruby
[19:49:17] kaneis: has joined #ruby
[19:49:18] jackjackdripper: has joined #ruby
[19:49:57] bryanray: has joined #ruby
[19:50:20] jessemcgilallen: has joined #ruby
[19:50:32] elton: has joined #ruby
[19:50:40] Motoservo: has left #ruby: ()
[19:50:58] aibot: has joined #ruby
[19:50:59] zenguy_pc: has joined #ruby
[19:51:31] mistermocha: has joined #ruby
[19:53:08] freerobby1: has joined #ruby
[19:53:35] mistermocha: has joined #ruby
[19:53:57] to_json1: has joined #ruby
[19:54:25] jackjackdripper: has joined #ruby
[19:55:14] graffix: has left #ruby: ()
[19:55:22] OS-18454: has joined #ruby
[19:55:51] OS-18454: has joined #ruby
[19:57:13] lemur: has joined #ruby
[19:57:24] arooni: has joined #ruby
[19:57:43] ruurd: has joined #ruby
[20:00:09] Croves: has joined #ruby
[20:01:20] Motoservo: has joined #ruby
[20:02:41] Motoservo: has left #ruby: ()
[20:04:20] Eiam_: has joined #ruby
[20:05:36] agent_white: has joined #ruby
[20:05:47] Dange: has joined #ruby
[20:06:01] elperdut_: has joined #ruby
[20:06:17] idefine: has joined #ruby
[20:07:12] elperdut_: has joined #ruby
[20:07:42] skcin7: has joined #ruby
[20:08:08] bb010g: has joined #ruby
[20:08:14] blackmes1: has joined #ruby
[20:08:18] RegulationD: has joined #ruby
[20:08:35] RegulationD: has joined #ruby
[20:08:48] nopolitica: has joined #ruby
[20:09:04] adac: has joined #ruby
[20:10:32] lukaszes: has joined #ruby
[20:10:41] elton_: has joined #ruby
[20:12:41] elton_: has joined #ruby
[20:12:57] but3k4: has joined #ruby
[20:13:33] dhollinger: has joined #ruby
[20:14:24] ht__: has joined #ruby
[20:20:28] hectorsq: has joined #ruby
[20:20:36] gusTester: has joined #ruby
[20:20:39] roshanavand: has joined #ruby
[20:21:00] leafybas_: has joined #ruby
[20:21:09] bryanray: has joined #ruby
[20:21:18] gusTester: has left #ruby: ()
[20:22:48] mistermocha: has joined #ruby
[20:22:55] Coldblackice: has joined #ruby
[20:27:11] mattwashere: has joined #ruby
[20:28:25] riotjones: has joined #ruby
[20:29:46] chibs: has joined #ruby
[20:30:35] roshanavand: has joined #ruby
[20:32:40] hectorsq: has joined #ruby
[20:33:10] porfa: has joined #ruby
[20:33:45] DiCablo: has joined #ruby
[20:34:19] al2o3-cr: has joined #ruby
[20:36:58] lukaszes: has joined #ruby
[20:37:50] nhhagen: has joined #ruby
[20:38:22] ht__: has joined #ruby
[20:38:26] edmundspenser: has joined #ruby
[20:39:29] skade: has joined #ruby
[20:39:31] m3_del: has joined #ruby
[20:39:45] purplexed-: has joined #ruby
[20:40:40] Guest11942: has joined #ruby
[20:40:59] tubuliferous: has joined #ruby
[20:42:18] stamina: has joined #ruby
[20:42:37] baweaver: has joined #ruby
[20:43:25] akem: has joined #ruby
[20:43:27] yfeldblum: has joined #ruby
[20:44:37] JammyHammy: has joined #ruby
[20:45:13] imperator: has joined #ruby
[20:45:32] willardg: has joined #ruby
[20:45:56] colegatron: has joined #ruby
[20:46:08] devoldmx: has joined #ruby
[20:50:37] freerobby: has joined #ruby
[20:51:14] pwnd_nsfw: has joined #ruby
[20:52:54] karapetyan: has joined #ruby
[20:53:16] neanderslob: has joined #ruby
[20:53:26] jessemcgilallen: has joined #ruby
[20:53:44] mistermo_: has joined #ruby
[20:53:49] newdan: has joined #ruby
[20:53:50] kobain: has joined #ruby
[20:54:19] benlieb: has joined #ruby
[20:54:33] vdamewood: has joined #ruby
[20:56:37] j4d: has joined #ruby
[20:56:52] purplexed-: I'm having trouble creating a new rails application with "rails new <name>". I've found several places that says delete the Gem lock file - but I can't find out where that file is. Where do I look (linux)
[20:57:10] al2o3-cr: ?rails purplexed-
[20:57:10] ruboto: purplexed-, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[20:57:21] centrx: purplexed-, Gemfile.lock
[20:58:02] lemur: has joined #ruby
[20:58:23] tubuliferous_: has joined #ruby
[20:58:29] leafybas_: has joined #ruby
[20:58:34] jpfuentes2: has joined #ruby
[20:58:44] _tpavel: has joined #ruby
[21:00:23] rickmasta: has joined #ruby
[21:00:39] hashpuppy: has joined #ruby
[21:01:05] Rollabunna: has joined #ruby
[21:01:32] Guest53: has joined #ruby
[21:01:46] TheNet: has joined #ruby
[21:02:02] m3_del: has joined #ruby
[21:02:39] jgt1: has joined #ruby
[21:02:58] acke: has joined #ruby
[21:03:17] govg: has joined #ruby
[21:04:26] User458764: has joined #ruby
[21:04:34] radgeRayden__: has joined #ruby
[21:04:59] DiCablo: has joined #ruby
[21:05:24] willardg: has joined #ruby
[21:05:39] banister: has joined #ruby
[21:06:23] TheNet: has joined #ruby
[21:09:13] TheNet: has joined #ruby
[21:11:10] lkba: has joined #ruby
[21:14:01] acke: has joined #ruby
[21:14:39] nettoweb: has joined #ruby
[21:14:51] griffindy: has joined #ruby
[21:15:11] kies^: has joined #ruby
[21:15:21] Calyd0n: has joined #ruby
[21:16:30] havenwood: Calyd0n: hi
[21:17:15] lukaszes: has joined #ruby
[21:17:43] cdg: has joined #ruby
[21:18:18] BigDiesel007: has joined #ruby
[21:18:36] arthurix_: has joined #ruby
[21:19:55] ekinmur: has joined #ruby
[21:22:39] Calyd0n: Any body know if their is a way to convert ruby to exe on linux ? I already tried RubyScript2EXE and Ocra but it failed.
[21:23:21] TheNet: has joined #ruby
[21:25:02] havenwood: Calyd0n: You can chmod +x and use a shebang on your first line to just run a Ruby script as an executable. Or do you want it to run when Ruby isn't installed?
[21:25:29] Calyd0n: I want to run it on windows machin without ruby installed
[21:25:40] purplexed-: has joined #ruby
[21:25:40] purplexed-: has joined #ruby
[21:25:53] havenwood: Calyd0n: I'd suggest giving Traveling Ruby a look: http://phusion.github.io/traveling-ruby/
[21:26:06] FernandoBasso: has joined #ruby
[21:26:11] havenwood: Calyd0n: Or Releasy: https://github.com/Spooner/releasy#readme
[21:26:30] Calyd0n: ok thanks i look that
[21:26:53] KKK: has joined #ruby
[21:27:44] Musashi007: has joined #ruby
[21:28:10] |KKK|: what is the most important Ruby concept to know?
[21:28:27] porfa: has joined #ruby
[21:29:10] shevy: be nice to cats
[21:29:11] Axsuul: has joined #ruby
[21:29:13] riotjones: has joined #ruby
[21:30:02] ruboto: +q |KKK|!*@*
[21:30:02] ruboto: -o ruboto
[21:30:31] _djbkd: has joined #ruby
[21:31:51] hmsimha_: has joined #ruby
[21:32:00] juanpablo__: has joined #ruby
[21:32:48] djcp: has joined #ruby
[21:33:24] elperdut: has joined #ruby
[21:33:30] Guest53: has joined #ruby
[21:35:17] idefine: has joined #ruby
[21:35:18] ruurd_: has joined #ruby
[21:35:27] rgtk: has joined #ruby
[21:35:48] EminenceHC: has joined #ruby
[21:36:46] Icey: has joined #ruby
[21:36:47] Icey: has joined #ruby
[21:37:03] Calyd0n: has joined #ruby
[21:37:21] BigDiesel007: has joined #ruby
[21:37:43] ericwood: |KKK|: blocks
[21:37:44] dtordable: has joined #ruby
[21:37:44] dtordable: has joined #ruby
[21:38:03] drbrain: ericwood: nice pun?
[21:38:29] ericwood: yes I did that intentionally
[21:38:36] dtordable: hello, anyone!
[21:39:14] Eminence_: has joined #ruby
[21:39:19] tomphp: has joined #ruby
[21:39:27] radgeRayden: has joined #ruby
[21:39:45] finisherr: has left #ruby: ()
[21:41:06] sandals: has joined #ruby
[21:41:26] idefine: has joined #ruby
[21:41:27] Psyq: has joined #ruby
[21:41:45] newdan: dtordable: Did you have a question? Or just saying hi?
[21:42:57] arthurix: has joined #ruby
[21:42:57] elton: has joined #ruby
[21:42:58] timonv: has joined #ruby
[21:44:00] uber: has joined #ruby
[21:46:35] willardg: has joined #ruby
[21:47:23] ss_much: has joined #ruby
[21:49:16] tomphp: has joined #ruby
[21:51:32] zenguy_pc: has joined #ruby
[21:51:57] elton: has joined #ruby
[21:52:05] _stu_: has joined #ruby
[21:52:30] Musashi007: has joined #ruby
[21:53:41] ixti: has joined #ruby
[21:55:05] Radar: looks like just saying hi :P
[21:55:16] hmsimha_: has joined #ruby
[21:55:23] wldcordeiro: has joined #ruby
[21:55:33] havenwood: Everyone in my office is discussing star wars "Recommended minimum episode viewing order" now after I chuckled out loud from the nice Figure 1.1. on page 33.
[21:55:46] banister: has joined #ruby
[21:56:54] EminenceHC: has joined #ruby
[21:57:41] ellisTAA: has joined #ruby
[21:57:44] haxrbyte: has joined #ruby
[21:58:45] baweaver: has joined #ruby
[21:58:48] Ropeney: has joined #ruby
[21:59:17] imperator: viewing order? ep 4 followed by ep 5. the end.
[21:59:31] shevy: here seems to have been a first attempt to starwars all the things https://s-media-cache-ak0.pinimg.com/736x/4c/6f/4f/4c6f4f9dedbfeba22175d9ba28bf035c.jpg
[21:59:53] shevy: if I would have any artistic skills myself, I'd draw a real starwars reference
[22:00:41] willardg: has joined #ruby
[22:00:45] idefine: has joined #ruby
[22:01:08] idefine: has joined #ruby
[22:01:15] solocshaw: has joined #ruby
[22:02:00] elton: has joined #ruby
[22:02:03] stannard_: has joined #ruby
[22:03:24] uber: has joined #ruby
[22:03:44] havenwood: imperator: :D
[22:04:19] shinnya: has joined #ruby
[22:04:21] j4d: has joined #ruby
[22:06:50] AnoHito_: has joined #ruby
[22:08:05] Seich: has joined #ruby
[22:09:11] mistermo_: has joined #ruby
[22:09:58] EminenceHC: has joined #ruby
[22:11:07] bruno-: has joined #ruby
[22:12:00] elton: has joined #ruby
[22:12:05] haxrbyte: has joined #ruby
[22:12:08] mistermo_: has joined #ruby
[22:12:35] bmalum: has joined #ruby
[22:13:02] OS-18454: has joined #ruby
[22:13:09] neanderslob: has joined #ruby
[22:13:14] hectorsq: has joined #ruby
[22:14:46] OmegaA: has joined #ruby
[22:16:02] OmegaA: Hello :) Not sure if this is a Rails issue or Ruby, but I have a class in a module and when I try to reference it I get a NameError exception. Not really sure what's causing this, but it's ptting a thorn in my side!
[22:17:52] GeissT: has joined #ruby
[22:18:03] SCHAAP137: has joined #ruby
[22:18:05] Guest53: has joined #ruby
[22:18:19] OS-18454: has joined #ruby
[22:18:43] Croves: has joined #ruby
[22:21:46] craysiii: has joined #ruby
[22:22:00] elton: has joined #ruby
[22:22:31] skcin7: has joined #ruby
[22:22:44] BigDiesel007: has joined #ruby
[22:23:30] shmilan: OmegaA: post your code via gist and I'm sure someone will help
[22:24:06] roshanavand: has joined #ruby
[22:24:15] firstdayonthejob: has joined #ruby
[22:24:32] momomomomo: has joined #ruby
[22:24:45] OmegaA: https://github.com/jrobertsgb/infinitymud/blob/master/app/channels/application_cable/connecton.rb
[22:24:53] OmegaA: Not gist, but it works ;)
[22:25:37] imperator: has left #ruby: ("Leaving")
[22:26:12] mattwildig: has joined #ruby
[22:26:14] bruno-_: has joined #ruby
[22:26:19] patrick: has joined #ruby
[22:27:01] haxrbyte: has joined #ruby
[22:27:10] svkurowski: How can I change which language Ruby uses for Month and Weekday names in DateTime::strftime
[22:27:34] OmegaA: ...to add insult to injury, ApplicationCable::Channel TOTALLY EXISTS
[22:27:47] OmegaA: Ruby is starting to stretch my willpower :D
[22:28:00] havenwood: OmegaA: s/Ruby/Rails
[22:28:31] OmegaA: ACTION assumed they were syntactically and behaviourly identical. >.>
[22:28:36] havenwood: OmegaA: Whatcha using channels for? Or just exploring?
[22:28:46] OmegaA: Mostly exploring atm.
[22:29:02] OmegaA: Potentially using AC for a pet project, but just trying to work out how they work right now.
[22:29:05] Guest53: has joined #ruby
[22:29:58] Sembei: has joined #ruby
[22:30:01] riotjones: has joined #ruby
[22:30:07] Eiam_: has joined #ruby
[22:30:27] havenwood: OmegaA: What's the error?
[22:30:27] al2o3-cr: svkurowski: %^B %^b %^A %^a ?
[22:30:47] havenwood: OmegaA: I'd suspect a fix along the lines of: class Connection < ::ActionCable::Connection::Base
[22:30:53] al2o3-cr: svkurowski: ignore that
[22:31:05] MEATCHICKEN: has joined #ruby
[22:31:12] OmegaA: Would the fact that ApplicationCable::Connection isn't referenced by any other part of my app make a difference? I notice I have a class (in app/channels/message_channel.rb) that inherits from AC::Channel
[22:31:29] MEATCHICKEN: if I have an array of hashes - [{name:"apple"},{name:"orange"}]
[22:31:37] MEATCHICKEN: how do I collect all the unique names?
[22:31:58] elton: has joined #ruby
[22:32:05] al2o3-cr: meatchicken: array.map { |hsh| h[k] }
[22:32:07] OmegaA: https://gist.github.com/jrobertsgb/578885020491f8481ebc
[22:33:09] havenwood: meatchicken: You want to show the matching Hashes as the result or just the unique values?
[22:33:11] haxrbyte_: has joined #ruby
[22:33:24] MEATCHICKEN: havenwood, unique values
[22:33:27] MEATCHICKEN: I think I got it though
[22:33:33] MEATCHICKEN: what al2o3-cr showed
[22:33:37] MEATCHICKEN: and just .uniq at the end
[22:33:44] havenwood: meatchicken: Ayup.
[22:34:29] al2o3-cr: meatchicken: array.map(&:values).uniq
[22:34:44] haxrbyte: has joined #ruby
[22:34:46] htmldrum: has joined #ruby
[22:35:11] al2o3-cr: flat_map ^ meatchicken
[22:35:19] OmegaA: I don't quite understand how Rails is choosing to load files. >.>
[22:35:59] lukaszes: has joined #ruby
[22:36:22] haxrbyte_: has joined #ruby
[22:36:26] havenwood: meatchicken: ::Connection
[22:36:30] Guest53: has joined #ruby
[22:37:10] havenwood: meatchicken: Oops misstell. Sorry about that.
[22:37:50] OmegaA: The class is named ::Connection, I just misspelt the .rb file >.>
[22:37:53] OmegaA: Is that significant?
[22:37:53] havenwood: OmegaA: If you're interested in Channels you might like: http://www.phoenixframework.org/docs/channels
[22:37:56] BigDiesel007: has joined #ruby
[22:38:08] OmegaA: If it is, someone is getting stabbed.
[22:38:41] patrick2: has joined #ruby
[22:38:45] OmegaA: <insert angry, yet thankful curse words here>
[22:39:42] OmegaA: And then I realise I forgot to configure redis! :D
[22:39:52] OmegaA: At least AC is working now :)
[22:39:54] hmsimha_: has joined #ruby
[22:40:04] OmegaA: Thanks, anyway
[22:40:10] idefine: has joined #ruby
[22:41:09] bruno-_: has joined #ruby
[22:42:21] elton: has joined #ruby
[22:42:48] infamos: has joined #ruby
[22:44:46] solars: has joined #ruby
[22:45:12] acke: has joined #ruby
[22:46:14] Guest53: has joined #ruby
[22:46:22] bmalum: has joined #ruby
[22:46:45] cirenyc: has joined #ruby
[22:46:54] devoldmx: has joined #ruby
[22:47:14] harly: has joined #ruby
[22:47:52] baweaver: has joined #ruby
[22:48:03] willardg: has joined #ruby
[22:48:28] harly: question: i'm using validates_numericality_of on a field called age. which works if age is set to say 5, or string "5". but when accessing in both those cases it returns what is passed, being the Integer or String. Is there a convenient wayt o make it return always an int, without overriding the accessor to do age.to_i ?
[22:48:44] rickmasta: has joined #ruby
[22:49:49] idefine: has joined #ruby
[22:49:51] darix: harly: it is a validator
[22:49:55] darix: not a cast
[22:50:15] harly: sure. i don't expect the vaidator to do what i'm asking. but is there something else?
[22:50:19] eam: to_i is how you do to_i
[22:50:24] eam: can you not just call that?
[22:50:41] arthurix_: has joined #ruby
[22:50:52] harly: well i'm using attr_accessor's atm. so there's no method for each of the attributes. so i want to avoid creating them.
[22:50:59] harly: or should I just let it be whatever it is, and only cast when I care?
[22:51:35] SCHAAP137: has joined #ruby
[22:52:06] harly: if someone else were to do person.age they might get a string. that seems poor. is my only choice to implement def age do age.to_i end ?
[22:52:51] elton: has joined #ruby
[22:53:03] sidearmsplit: has joined #ruby
[22:53:12] Guest53: has joined #ruby
[22:55:23] idefine_: has joined #ruby
[22:56:09] bruno-: has joined #ruby
[22:56:27] jessemcgilallen: has joined #ruby
[22:56:34] mistermocha: has joined #ruby
[22:56:36] elton: has joined #ruby
[22:59:31] skweek: has joined #ruby
[22:59:37] baweaver: has joined #ruby
[23:00:23] centrx: harly, Is this a database field or something?
[23:00:38] tomphp: has joined #ruby
[23:00:54] harly: no. I'm experimenting with using ActiveModel::Validations in ruby, iwthout rails.
[23:01:55] harly: really just trying to find a laconic way to define a simple model using attr_accessors and validators (and maybe cast...ors?) and have it be a little flexible on what those fields are set as. without having to implement each one.
[23:01:58] Rollabunna: has joined #ruby
[23:02:49] hashpuppy: has joined #ruby
[23:03:16] bnagy: harly: did you look at Struct?
[23:03:21] shevy: attr* only do the simple things
[23:03:40] shevy: attr_reader :foo is: def foo; @foo; end, no other modifications
[23:03:48] momomomomo: has joined #ruby
[23:03:54] Guest53: has joined #ruby
[23:04:49] shevy: you could go the activerecord/rails route and also extend with custom methods, like attr_integer :foo or something
[23:05:24] netule: has joined #ruby
[23:06:25] al2o3-cr: is it true rails is slowing dying?
[23:06:30] crdpink2: has joined #ruby
[23:06:51] shevy: it slowed down its dying?
[23:07:02] centrx: al2o3-cr, Rails is just not in super-fad mode
[23:07:05] shevy: javascript kills everything
[23:07:19] centrx: al2o3-cr, It's still the best non-bleeding-edge framework available
[23:07:33] al2o3-cr: centrx: without a doubt
[23:07:35] harly: oh hey, irc isn't vim :)
[23:07:44] shevy: vim fiddles with the brain :>
[23:08:15] al2o3-cr: can't wait for ruby 3 (seriously gonna piss myself)
[23:08:18] harly: pointer-focus strikes again
[23:08:45] al2o3-cr: i got a feeling it's going to be awesome
[23:08:57] shevy: what awesomeness will ruby 3 include?
[23:09:21] al2o3-cr: well looking at streem the concurrent model
[23:09:35] al2o3-cr: *concurreny
[23:10:02] shevy: well streem is not ruby
[23:10:16] al2o3-cr: he ain't prototyping streem for no reason shevy :p
[23:10:40] shevy: he very well could :)
[23:10:48] shevy: I think mruby has a much higher priority
[23:11:13] bruno-_: has joined #ruby
[23:11:32] al2o3-cr: when i see mruby i think lua
[23:12:53] shevy: lua is so small
[23:12:58] shevy: let me see at mruby size...
[23:13:17] treaki: has joined #ruby
[23:13:29] al2o3-cr: shevy: about ~100kb
[23:13:44] shevy: how do you get this
[23:13:51] shevy: mruby-05.11.2015.tar.xz 297K
[23:14:05] shevy: lua-5.3.1.tar.xz 221K
[23:14:05] al2o3-cr: shevy: Lua is smalllll :P
[23:14:12] harly: bnagy: i hadn't. but it doesn't look like it does anything about forcing types. i guess i'm just thinking about it the wrong way. spoilt by perl's context flexibility.
[23:14:14] shevy: bit smaller yeah
[23:14:31] al2o3-cr: shevy: i might be going of 5.2
[23:14:38] shevy: ruby has really gotten quite big
[23:14:43] shevy: ruby-2.2.3.tar.xz 10M
[23:15:00] exadeci: has joined #ruby
[23:15:04] harly: ACTION sighs.
[23:15:09] shevy: lol harly
[23:15:26] skade: has joined #ruby
[23:15:28] shevy: don't let the emacs users see this, they may be tempted to make a joke
[23:15:29] idefine: has joined #ruby
[23:15:43] juanpablo__: has joined #ruby
[23:15:43] harly: never tried that operating system. :)
[23:16:36] shevy: emacs is really huge ... emacs-24.5.tar.xz 38M
[23:17:07] havenwood: shevy: The "can an editor open its own source code" challenge.
[23:18:17] sidearmsplit: I???m trying to generate several gigabytes of data (preferably in JSON), anyone have any ruby libraries to recommend?
[23:19:09] ibouvousaime: has joined #ruby
[23:19:55] sidearmsplit: I like faker for generating the data in the documents, but simply calling it and pushing it to my DB with a times interation is very slow
[23:20:59] finisherr: has joined #ruby
[23:21:25] al2o3-cr: shevy: what OS you on?
[23:22:10] asianMike: has joined #ruby
[23:22:10] shevy: al2o3-cr linux
[23:22:25] al2o3-cr: shevy: flavor?
[23:22:42] shevy: al2o3-cr it was slackware but all but glibc was compiled anew from source
[23:23:15] al2o3-cr: shevy: so what you using now?
[23:24:02] al2o3-cr: shevy: you're a secret MS user ain't you...
[23:24:49] bluOxigen: has joined #ruby
[23:24:49] baweaver: has joined #ruby
[23:25:25] shevy: al2o3-cr as said, it was slackware some months ago; it's some custom LFS right now mostly. for the most part I just try to have everything available even if I don't use it (e. g. the whole stack of gnome and kde)
[23:25:31] blackmes1: has joined #ruby
[23:25:43] shevy: slackware mostly because it gives very little headache to start with
[23:25:48] sandals: has joined #ruby
[23:26:16] shevy: if gobolinux would not have died then I'd use it, there never was a better thing of beauty :(
[23:26:21] bruno-_: has joined #ruby
[23:26:34] al2o3-cr: shevy: i should read the full sentence
[23:27:18] shevy: al2o3-cr are you writing for any ruby projects as of late?
[23:27:32] jabreity: has joined #ruby
[23:27:32] jabreity: has joined #ruby
[23:27:45] stannard: has joined #ruby
[23:28:03] al2o3-cr: shevy: No, i only code for fun :p
[23:28:27] Xeago: has joined #ruby
[23:28:59] al2o3-cr: I'm a kitchen fitter by trade lol
[23:29:31] blueOxigen: has joined #ruby
[23:29:59] porfa: has joined #ruby
[23:30:16] shevy: ruby is programming for the masses
[23:30:47] riotjones: has joined #ruby
[23:31:21] swgillespie: has joined #ruby
[23:31:28] hmsimha_: has joined #ruby
[23:31:43] al2o3-cr: shevy: so is python, perl (used to be), php (your friend) and assembly (jk) :P
[23:31:57] snockerton: ruby is programming for non-ass-holes
[23:32:06] elton: has joined #ruby
[23:32:19] harly: i dunno. i've seen some judging stares behind hipster beards. j/k :)
[23:32:34] snockerton: this is one of the friendliest channels on freenode
[23:32:54] shevy: al2o3-cr python yeah, not sure about perl in 2015 really
[23:33:30] pwnd_nsfw: has joined #ruby
[23:33:31] snockerton: #perl is full of pricks anyways
[23:33:45] harly: perl died in 2005. 10y on there's the occasional "perl 6 will fix everything" crazy person, and then a lot of ops scripts lying aorund.
[23:34:07] shevy: al2o3-cr although the graph is not quite accurate, I think the overall trend is ok: http://goo.gl/6SnpLK
[23:34:13] al2o3-cr: shevy: perl6, though never really tried it
[23:34:18] Spami: has joined #ruby
[23:34:19] shevy: python gaining quite a bit, php losing a tiny bit, ruby gaining a tiny bit, perl dropping a tiny bit
[23:34:22] shevy: harly yeah sorta
[23:34:35] blubjr: perl 6 has a lot of nice metaprogramming stuff i head
[23:35:02] shevy: al2o3-cr yeah I think perl 6 will stop the decline but I am not sure if a huge surge of interest will happen again, the landscape is different, a lot more competition
[23:35:35] al2o3-cr: shevy: i don't doubt it will, but don't tell perl that :)
[23:35:51] al2o3-cr: they will go ape shit
[23:35:52] shevy: snockerton what annoys me in #perl is that announce-bot ... I guess I could block it in xchat but I am so lazy that I never bother
[23:36:22] al2o3-cr: shevy: its a weird eval bot too :p
[23:36:26] harly: http://redmonk.com/dberkholz/2014/05/02/github-language-trends-and-the-fragmenting-landscape/ is pretty interesting.
[23:36:53] shevy: "cake-hacker version 1.25 released!"
[23:36:57] shevy: "pidgeon-chainsaw-massacre version 2.5 released!"
[23:37:16] shevy: yeah, perhaps I should open a PR for ruboto to also spam announcements :)
[23:37:43] al2o3-cr: shevy: you've not a writ a plugin yet?
[23:37:59] harly: #perl has a bot that announces perl module updates? :)
[23:38:16] al2o3-cr: harly: also #perl6 :)
[23:38:36] idefine: has joined #ruby
[23:38:38] harly: wow. that's like. the selfie crazy person who actually has no life.
[23:38:51] al2o3-cr: best bot on irc is phrik <3
[23:39:05] Azure: has joined #ruby
[23:39:54] al2o3-cr: although using supybot/limnoria
[23:40:52] charliesome: has joined #ruby
[23:41:04] shevy: al2o3-cr I have not written a plugin yet no, I usually just write things that are of imminent importance to local (nearby) problems
[23:41:12] elton: has joined #ruby
[23:41:17] bruno-: has joined #ruby
[23:41:53] jessemcgilallen: has joined #ruby
[23:42:25] al2o3-cr: shevy: delve deeper :)
[23:43:06] blackmesa: has joined #ruby
[23:43:39] shevy: I don't have the time! time disappears way too quickly
[23:43:42] AccordLTN: has joined #ruby
[23:44:31] shevy: al2o3-cr I'd like to have some thousand code monkeys to implement all my ideas
[23:44:35] eam: >> Time.new.freeze
[23:44:36] ruboto: eam # => 2015-11-04 23:44:35 +0000 (https://eval.in/463256)
[23:44:53] havenwood: Nooo, now that time is frozen I'll *never* get off work.
[23:45:10] havenwood: Could we please unfreeze time for another hour?
[23:45:10] karapetyan: has joined #ruby
[23:45:41] al2o3-cr: shevy: what does grep NR_write /usr/include/asm/unistd_64.h say on your box
[23:45:51] al2o3-cr: change to 32 if 32
[23:46:04] to_json: has joined #ruby
[23:46:04] to_json: has joined #ruby
[23:46:10] havenwood: RubyGems 2.5.0 Public Service Announcement: gem update --system
[23:46:24] havenwood: https://github.com/rubygems/rubygems/blob/master/History.txt#L3-L132
[23:46:45] havenwood: gem -v #=> 2.5.0
[23:47:30] shevy: al2o3-cr http://pastie.org/pastes/10530609/text
[23:47:33] havenwood: Gem::Licenses::IDENTIFIERS.size #=> 301
[23:47:40] eam: gem -v #=> 1.6.2 # hmmmm
[23:47:41] shevy: oh cool a new rubygems?
[23:47:45] shevy: eam you damn fossil!
[23:47:47] purplexed-: has joined #ruby
[23:48:02] shevy: https://rubygems.org/pages/download
[23:48:05] eam: don't blame me blame the distro
[23:48:11] shevy: get it while it's hot
[23:48:33] eam: that's rhel's 1.8.7 which isn't used for anything other than confusing the unwary
[23:48:56] CalydOn: has joined #ruby
[23:49:44] skade: has joined #ruby
[23:50:38] al2o3-cr: ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]
[23:51:12] TheNet: has joined #ruby
[23:51:24] nettoweb: has joined #ruby
[23:51:38] shevy: I updated as well
[23:51:49] shevy: now we only have to wait for xmas for a new ruby
[23:51:54] vdamewood: has joined #ruby
[23:52:10] al2o3-cr: well you can get the -dev
[23:52:25] zenguy_pc: has joined #ruby
[23:52:52] al2o3-cr: Lua 5.3.1 Copyright (C) 1994-2015 Lua.org, PUC-Rio
[23:55:05] al2o3-cr: Lua is nothing but tables and the other 7 datatypes :)
[23:55:51] ankhers: has joined #ruby
[23:55:56] BigDiesel007: has joined #ruby
[23:56:48] shevy: Let's shorten that
[23:56:49] shevy: Lua is nothing
[23:57:08] al2o3-cr: shevy: come on you can't say that :p
[23:57:37] xet7: has joined #ruby
[23:58:31] shevy: I just shortened your sentence
[23:58:35] nettoweb: has joined #ruby
[23:59:00] shevy: al2o3-cr the creator of gobolinux is one of the core maintainers of luarocks
[23:59:08] zylogz80: has joined #ruby
[23:59:33] shevy: they also have graphs that I did not see on rubygems.org yet https://luarocks.org/