« Back to channel list

#ruby - 07 May 2016

« Back 1 day Forward 1 day »
[00:00:06] nullFxn: has joined #ruby
[00:00:46] ravishankarjha: has joined #ruby
[00:01:22] sp4rrow: has joined #ruby
[00:04:03] skolman_: has joined #ruby
[00:07:11] cpup: has joined #ruby
[00:08:06] greves: has joined #ruby
[00:09:16] chouhoul_: has joined #ruby
[00:12:29] xlegoman: has joined #ruby
[00:13:37] zacstewart: has joined #ruby
[00:20:01] rbennacer: has joined #ruby
[00:20:49] domgetter: has joined #ruby
[00:20:55] domgetter: >> "JARJAR".gsub(/(JAR)*/, "j")
[00:20:56] ruby[bot]: domgetter: # => "jj" (https://eval.in/566772)
[00:21:01] domgetter: why is that not being greedy?
[00:21:11] Mariano: has joined #ruby
[00:22:05] FooMunki: has joined #ruby
[00:23:43] htmldrum: has joined #ruby
[00:24:11] bazz_: if you include a module that has only self methods .. is that include effective in any way?
[00:24:43] bazz_: ...only regular self methods - no included magic or anything like that ...
[00:26:12] Mariano: you mean def.self methods?
[00:26:19] Mariano: def self.something
[00:26:26] crdpink: has joined #ruby
[00:26:50] Mariano: as far as i know, include will only mix-in methods that were defined on the module
[00:27:21] kobain: has joined #ruby
[00:27:25] Ox0dea: domgetter: Weird.
[00:27:27] jenrzzz: has joined #ruby
[00:27:27] jenrzzz: has joined #ruby
[00:27:44] grenierm: has joined #ruby
[00:27:46] Mariano: check this out
[00:27:49] Mariano: http://commandercoriander.net/blog/2012/11/08/include-require-and-modules/
[00:28:15] kobain: has joined #ruby
[00:28:27] Ox0dea: bazz_: If "effective" means the introduction of any new methods onto the includee, no.
[00:28:49] Ox0dea: It still has the "effect" of polluting the ancestor chain.
[00:28:57] Mariano: was that of help?
[00:31:59] bazz_: Ox0dea, OK, so no new methods into the includee. Got it, that's what I expected .. But what exactly is polluting the ancestor chain
[00:32:54] Ox0dea: >> C = Class.new; M = Module.new; C.include M; C.ancestors # bazz_
[00:32:55] ruby[bot]: Ox0dea: # => [C, M, Object, Kernel, BasicObject] (https://eval.in/566773)
[00:33:15] Ox0dea: M is going to participate in method resolution for C.
[00:33:29] bazz_: OK.. thanks for that last sentence in particular
[00:33:46] bazz_: That was helpful, thank you!
[00:33:58] Ox0dea: Glad that was the case. :)
[00:34:29] pawnbox: has joined #ruby
[00:35:05] domgetter: >> "JARJAR".sub(/(JAR)*/, "j")
[00:35:06] ruby[bot]: domgetter: # => "j" (https://eval.in/566774)
[00:35:12] domgetter: >> "AJARJAR".sub(/(JAR)*/, "j")
[00:35:13] ruby[bot]: domgetter: # => "jAJARJAR" (https://eval.in/566775)
[00:35:55] Ox0dea: Well, I understand the #gsub weirdness now, but this last one is still confusing.
[00:35:57] domgetter: oh right it will match the nothing at the beginning. but sub is correctly greedy, and gsub is never greedy?
[00:36:18] sp4rrow: has joined #ruby
[00:36:27] Ox0dea: >> "JARJARJAR".gsub(/(JAR)+/, "j")
[00:36:28] chouhoulis: has joined #ruby
[00:36:28] apeiros: both are greedy
[00:36:28] ruby[bot]: Ox0dea: # => "j" (https://eval.in/566776)
[00:36:32] apeiros: but first match matters, not longest
[00:36:55] Ox0dea: Then what happened just now?
[00:37:01] apeiros: i.e. greedy != "go search for the longest match"
[00:37:24] domgetter: ah so in my first example, it was greedily matching nothing
[00:37:33] apeiros: the match at position 0 satisfied the condition, and it was able to match it from start to end
[00:37:46] apeiros: domgetter: correct
[00:38:06] northrup: has joined #ruby
[00:38:34] twe4ked: has joined #ruby
[00:39:40] rkazak: has joined #ruby
[00:40:43] dikaio: has joined #ruby
[00:44:09] bazz_: it's not really a Ruby question, but is there a term for "/foo" of a URL portion?
[00:44:23] bazz_: relative URL?
[00:44:35] davedev24: has joined #ruby
[00:45:18] apeiros: the path iirc
[00:45:25] blur3d: has joined #ruby
[00:45:26] apeiros: but the http spec should have it
[00:45:30] bazz_: ah yes relative URL is applicable.. path is good too
[00:45:54] havenwood: bazz_: just path
[00:46:04] apeiros: http rfc status codes
[00:46:12] apeiros: damn safari
[00:46:19] apeiros: https://tools.ietf.org/html/rfc7230#section-2.7.1
[00:46:37] apeiros: I really hate its copy & paste behavior
[00:47:54] SCHAAP137: has joined #ruby
[00:48:14] gomix: has joined #ruby
[00:50:22] Elvin: has joined #ruby
[00:51:22] northrup: has joined #ruby
[00:53:01] RegulationD: has joined #ruby
[00:55:10] pawnbox: has joined #ruby
[00:55:17] stardiviner: has joined #ruby
[00:58:56] thesheff17: has joined #ruby
[00:59:03] ftj: has joined #ruby
[00:59:41] devbug: has joined #ruby
[00:59:49] rehat: has joined #ruby
[01:01:15] shevy: come to linux!
[01:02:08] kies: has joined #ruby
[01:02:45] moeabdol: has joined #ruby
[01:04:27] hahuang65: has joined #ruby
[01:09:47] dikaio: has joined #ruby
[01:12:40] swills: has joined #ruby
[01:13:44] shevy: hmm... if we have a string "abcdefghiabcaa" is there a simple way to obtain all positions of "a"? e. g. in an array.. [0,8,11,12] or whatever there
[01:14:06] Mariano: has joined #ruby
[01:14:27] GriffinHeart: has joined #ruby
[01:16:54] Mariano: hi dudes. I'm implementing a gem to parse proxy servers from many listing websites, and i'm having a hard time when trying to dynamically load classes. If anyone can give me some directions, please message me. Thank you all
[01:22:26] Mariano: I already iterated over all files in the folder, requiring them. But the classes those modules contain can't be reached.
[01:22:42] Ox0dea: mariano: How do you mean?
[01:23:10] Ox0dea: If they're namespaced within a module, you'll have to access them with the fully qualified name: `YourModule::YourClass`
[01:24:14] htmldrum: has joined #ruby
[01:24:59] Mariano: well, i have this folder with several .rb files. Each one of them contains a class. When i open a pry session , I try to access those classes with a fully qualified name, but the most inner namespace (the one that contains the classes) can't be reached
[01:25:46] Ox0dea: Then it must be the case that you've not loaded the file which introduces that name.
[01:26:45] Mariano: i can send you the code to clarify. The module that introduces the classes is named SpecificParsers
[01:27:34] Ox0dea: Post as much of the code as you figure is relevant to https://gist.github.com/ and share the link here.
[01:27:43] Ox0dea: You won't be able to recreate your directory structure, though. :/
[01:28:40] Mariano: yes.. would it help more if i share the link to the repo?
[01:28:55] Mariano: or would it bee TMI?
[01:29:28] Ox0dea: That's entirely your prerogative, I suppose.
[01:30:40] ravishankarjha: has joined #ruby
[01:30:51] bruce_lee: has joined #ruby
[01:30:52] pawnbox: has joined #ruby
[01:30:57] domgetter: has joined #ruby
[01:31:31] justin_pdx: has joined #ruby
[01:33:48] ramfjord: has joined #ruby
[01:42:15] ravishan_: has joined #ruby
[01:43:11] senayar: has joined #ruby
[01:43:11] senayar: has joined #ruby
[01:46:25] GinoMan2440: has joined #ruby
[01:51:26] krobzaur: has joined #ruby
[01:56:54] ftj: has joined #ruby
[02:01:49] jenrzzz: has joined #ruby
[02:01:49] jenrzzz: has joined #ruby
[02:06:53] pawnbox: has joined #ruby
[02:09:51] northrup: has joined #ruby
[02:11:10] htmldrum: has joined #ruby
[02:13:33] minimalism: has joined #ruby
[02:16:26] ravishankarjha: has joined #ruby
[02:17:00] dopamean_: has joined #ruby
[02:20:34] dopamean_: has joined #ruby
[02:24:01] dopamean_: has joined #ruby
[02:26:20] dopamean_: has joined #ruby
[02:27:17] swills: has joined #ruby
[02:29:44] drewo: has joined #ruby
[02:30:10] jenrzzz: has joined #ruby
[02:30:16] CloCkWeRX: has joined #ruby
[02:30:47] bazz_: if I have a module providing library functions (they are all `def self.` methods) .. and calling them in absolute scope is painful for every invocation .. is there a simple way of reducing the "scope-overhead" ? I'd rather not simply include the parent module out of concern of possible including non-class functions that *could* be there (although it is likely not a possibility)
[02:31:30] MrSamuel: has joined #ruby
[02:31:31] SenpaiSilver: has joined #ruby
[02:33:05] bazz_: Is my library design alright? I like doing "Library.func" .. but with scoping this can sometimes be "Library::Feature::func" or more
[02:33:30] bazz_: !s/Feature::/Feature\./
[02:33:30] Kuukunen: < bazz_> Is my library design alright? I like doing "Library.func" .. but with scoping this can sometimes be "Library::Feature::func" or more
[02:34:01] bazz_: !s/Feature\:\:/Feature\./
[02:34:01] Kuukunen: < bazz_> ..
[02:36:02] swills: has joined #ruby
[02:37:13] ramfjord: has joined #ruby
[02:37:44] ledestin: has joined #ruby
[02:42:28] postmodern: for CI solutions besides Travis, what do people recommend? CircleCI? Semaphore?
[02:42:52] pawnbox: has joined #ruby
[02:43:39] SenpaiSilver: has joined #ruby
[02:46:45] SenpaiSilver: has joined #ruby
[02:50:49] moeabdol: has joined #ruby
[02:51:45] weemsledeux: has joined #ruby
[02:54:29] RegulationD: has joined #ruby
[02:54:34] stardiviner: has joined #ruby
[02:55:03] pipework: postmodern Do you mean CI-as-a-service solutions or just any CI?
[02:55:13] pipework: Public and open source friendly CI services only?
[02:56:27] devbug: has joined #ruby
[02:58:05] lxsameer: has joined #ruby
[02:58:28] SenpaiSilver: has joined #ruby
[02:59:44] postmodern: pipework, hosted, and for private repos
[03:01:38] pipework: postmodern: cloudbees, bamboo, maybe shippable?
[03:01:49] justin_pdx: has joined #ruby
[03:02:23] pipework: postmodern Also, I might have a couple PR's inc to chruby and ruby-install. I'm using them in an env where it's not just user install, the user has no access to sudo but has brew.
[03:02:51] postmodern: pipework, ah weird
[03:03:21] pipework: postmodern: basically, my user is not an admin on this machine (I have the admin user password, but these should work without sudo)
[03:05:08] pipework: my brew is also installed under these conditions. I've been fixing stuff all day!
[03:05:10] hahuang65: has joined #ruby
[03:06:49] tildes_: has joined #ruby
[03:10:38] xcesariox: has joined #ruby
[03:13:04] cdg: has joined #ruby
[03:17:20] braincrash: has joined #ruby
[03:18:55] pawnbox: has joined #ruby
[03:20:14] twe4ked: has joined #ruby
[03:22:17] SilverKey: has joined #ruby
[03:25:45] gix: has joined #ruby
[03:26:44] krobzaur: has joined #ruby
[03:31:12] devbug: has joined #ruby
[03:36:02] xxneolithicxx: has joined #ruby
[03:40:46] ule: shevy: are u there?
[03:41:22] ule: shevy: I'm trying to understand the reason for that ? on the method definition
[03:41:35] ule: since ? on the end of methods returns booleans
[03:43:08] baweaver: ule: it has no real significance as a language feature, only as a pattern most people follow
[03:43:27] baweaver: >> def see?; 1 end; see?
[03:43:28] ruby[bot]: baweaver: # => 1 (https://eval.in/566785)
[03:44:01] scottschecter: has joined #ruby
[03:44:03] baweaver: the same as bang is an agreed upon standard for mutation or potentially dangerous behaviors
[03:45:39] dikaio: has joined #ruby
[03:45:59] ule: baweaver: I'll show you what happened with me today
[03:46:27] ule: this was my problem this afternooon
[03:46:31] ule: http://codepad.org/QGJepSv0
[03:46:53] ule: so.. I posted a question here and shevy solved my problem with this code:
[03:47:12] ule: https://gist.github.com/shevegen/f88e2602582e55e169ddb8d77ce3e1f9
[03:47:33] ule: so.. I'm now trying to understand better what shevy did on this code
[03:47:45] ule: why he defined that method as ?
[03:50:11] htmldrum: has joined #ruby
[03:50:55] baweaver: no reason it seems
[03:51:57] nanoz: has joined #ruby
[03:52:08] baweaver: ? has no actual significance to the parser, only the user/programmer
[03:52:19] baweaver: *in the case of methods
[03:53:01] benlieb: has joined #ruby
[03:53:15] ule: I'll try to replicate the same code without ?
[03:53:18] ule: let's see what happens
[03:55:08] ule: baweaver: you're right
[03:55:12] ule: the code works without ?
[03:55:34] ule: shevy: why did u do that though?
[03:59:24] sneakerhax: has joined #ruby
[04:01:05] hahuang65: has joined #ruby
[04:03:48] rkazak: has joined #ruby
[04:06:24] tax: has joined #ruby
[04:08:18] lkba: has joined #ruby
[04:14:29] pawnbox: has joined #ruby
[04:15:09] zacstewart: has joined #ruby
[04:16:10] dh64: has joined #ruby
[04:18:22] rickmasta: has joined #ruby
[04:22:15] grenierm: has joined #ruby
[04:23:16] Channel6: has joined #ruby
[04:23:22] darix: has joined #ruby
[04:26:48] slackbotgz: has joined #ruby
[04:26:57] hahuang65: has joined #ruby
[04:28:58] Caerus: hello #ruby
[04:29:29] The_Phoenix: has joined #ruby
[04:32:32] dopie: has joined #ruby
[04:32:34] tmtwd: has joined #ruby
[04:33:12] i: has joined #ruby
[04:37:17] cd83x: has joined #ruby
[04:39:07] moeabdol: has joined #ruby
[04:43:22] greves: has joined #ruby
[04:51:34] hahuang65: has joined #ruby
[04:53:33] rkazak: has joined #ruby
[04:54:39] UserInneed: has joined #ruby
[04:57:24] djbkd: has joined #ruby
[04:58:50] johnmilton: has joined #ruby
[05:00:54] rickmasta: has joined #ruby
[05:03:35] Guest43764: has left #ruby: ("Leaving")
[05:06:47] Rubie: has joined #ruby
[05:06:59] Devalo: has joined #ruby
[05:10:22] ramfjord: has joined #ruby
[05:12:21] hk238: has joined #ruby
[05:17:23] Anderson69s: has joined #ruby
[05:19:28] bazz_: are there any good learning resources for building an API in Ruby? Google shows a lot of results for "Web APIs / API wrappers / Rails API" but I just mean .. it more simply.. how to best use the Ruby language when creating my own API abstractions
[05:20:51] kareeoleez: has joined #ruby
[05:21:14] bluOxigen_: has joined #ruby
[05:21:46] ravishankarjha: has joined #ruby
[05:22:27] eljimmy: has joined #ruby
[05:24:22] Anderson69s: has joined #ruby
[05:25:37] pawnbox: has joined #ruby
[05:27:26] Anderson69s: has joined #ruby
[05:29:31] greves: has joined #ruby
[05:29:35] Anderson69s: has joined #ruby
[05:31:40] bronson: has joined #ruby
[05:32:49] cdg_: has joined #ruby
[05:33:17] sauvin: has joined #ruby
[05:33:51] tknz: has joined #ruby
[05:34:14] nofxx: bazz_, get a ORM/ODM for your db of choice, add a serializer thing and just use rack..
[05:34:42] nofxx: padrino/sinatra... there's a new one only for this kind of stuff iirc
[05:37:07] rkazak: has joined #ruby
[05:37:58] bazz_: nofxx, I don't why you would assume I need a DB ... writing API abstractions is much broader a topic .. and I'm more focused on the language charactertics .. for example a proper strategy to create API functions and override them in Ruby .. I already do it successfully but I feel my method is a little dirty
[05:38:51] bazz_: so in my world I'm talking about a set of general functions ... with other classes/modules that "override" those general API funcs with implementation details
[05:39:24] nofxx: well, ruby does that, don't need a fw
[05:39:33] bazz_: but I'm having trouble properly organizing the material for some reason, hence I'm interested in learning material
[05:39:42] bazz_: don't need a 'fw' ?
[05:39:52] nofxx: framework
[05:40:07] davedev24: has joined #ruby
[05:40:31] bazz_: Well I already expressed I'm interested in how to best use the Ruby language to write clean APIs ...
[05:40:49] bazz_: someone please :3 ^
[05:41:28] azor: has joined #ruby
[05:44:25] tildes_: has joined #ruby
[05:44:36] ravishankarjha: has joined #ruby
[05:45:06] dikaio: has joined #ruby
[05:45:36] azor: How is everyone doing?
[05:47:47] bazz_: I'm wondering how to write clean interfaces (API) .. in general and in Ruby language
[05:48:25] bazz_: clean Library interfaces - if that narrowing helps
[05:52:08] hahuang65: has joined #ruby
[05:54:45] baweaver: https://www.udacity.com/course/software-architecture-design--ud821
[05:54:58] baweaver: not something that's within the scope of IRC by a long shot
[05:56:56] Devalo: has joined #ruby
[05:56:56] moeabdol: has joined #ruby
[05:57:34] bazz_: baweaver, instead I'm reading this : http://landawn.com/How%20to%20Design%20a%20Good%20API%20and%20Why%20it%20Matters.pdf
[06:00:32] baweaver: Essentially distilled Software Architecture practices
[06:00:47] idefine: has joined #ruby
[06:00:59] cdg: has joined #ruby
[06:01:08] baweaver: problem with distilled information is that it's meant to be brief, not an in detail guide.
[06:01:35] bazz_: Yeah but this is activating the right parts of my brain
[06:02:50] baweaver: Also, as with alcohol, the lighter weight you are the harder distilled information is going to hit you
[06:03:17] baweaver: focus on one thing at a time
[06:07:22] bazz_: I do agree with you -- multi-pass over my API with this document is better than a single-digest and attempt
[06:08:25] ur5us: has joined #ruby
[06:09:01] droptone: has joined #ruby
[06:09:44] tmtwd: has joined #ruby
[06:09:50] droptone: Question: What's a better way to write if !(provider == "service1" || provider == "test2" || provider == "internal3" )
[06:10:00] droptone: Isn't there a way to leverage .include?
[06:10:29] droptone: like if !provider.includes?("service1", "test2", "internal3")
[06:11:33] droptone: The thing is, I want it to match, not just see if the string exists within provider
[06:11:43] Yeomra: has joined #ruby
[06:12:31] bruno-: has joined #ruby
[06:13:22] droptone: If I write ["service1", "test2", "internal3"].any? { |name| provider.include? name } that matches even if part of the string is present in provider
[06:13:52] droptone: Disregard, I got it by switching .include? with ==
[06:13:59] bazz_: >> ["service1", "service2", "service3"].include? "service3"
[06:14:00] ruby[bot]: bazz_: # => true (https://eval.in/566790)
[06:19:05] LoneHerm_: has joined #ruby
[06:22:08] sami: has joined #ruby
[06:28:50] lukeholder: has joined #ruby
[06:34:36] duderonomy: has joined #ruby
[06:36:23] pawnbox: has joined #ruby
[06:44:35] Pupp3tm4st3r: has joined #ruby
[06:46:33] Moosashi: has joined #ruby
[06:46:46] dikaio: has joined #ruby
[06:47:56] rippa: has joined #ruby
[06:48:05] ur5us: has joined #ruby
[06:55:55] RegulationD: has joined #ruby
[06:57:44] moeabdol: has joined #ruby
[06:57:51] benlieb: has joined #ruby
[07:02:14] dionysus69: has joined #ruby
[07:03:25] rkazak: has joined #ruby
[07:14:25] bruno-: has joined #ruby
[07:14:48] nando293921: has joined #ruby
[07:15:15] Dimik: has joined #ruby
[07:17:58] yfeldblum: has joined #ruby
[07:20:44] Bmw-01: has joined #ruby
[07:21:12] tAn: has joined #ruby
[07:21:56] akem2: has joined #ruby
[07:23:06] astrobunny: has joined #ruby
[07:26:51] astrobunny: has joined #ruby
[07:27:55] greves: has joined #ruby
[07:32:07] bronson: has joined #ruby
[07:35:35] toretore: has joined #ruby
[07:36:31] dn`: has joined #ruby
[07:40:05] vdamewood: has joined #ruby
[07:43:36] neanderslob: has joined #ruby
[07:45:34] moeabdol: has joined #ruby
[07:50:00] pawnbox: has joined #ruby
[07:53:38] Devalo: has joined #ruby
[07:54:30] greves: has joined #ruby
[07:57:52] Jackneill: has joined #ruby
[07:57:59] ctp: has joined #ruby
[07:58:50] firstdayonthejob: has joined #ruby
[08:00:39] Chunlea: has joined #ruby
[08:07:39] firstdayonthejob: has joined #ruby
[08:11:02] ur5us: has joined #ruby
[08:12:20] Moosashi: has joined #ruby
[08:14:44] bruno-: has joined #ruby
[08:16:04] Es0teric: has joined #ruby
[08:16:32] _orangejuice: has joined #ruby
[08:16:46] zacstewart: has joined #ruby
[08:17:21] ctp: has joined #ruby
[08:22:09] wldcordeiro: has joined #ruby
[08:23:56] Moosashi: has joined #ruby
[08:25:41] dreinull: has left #ruby: ("undefined")
[08:26:47] tens0r: has joined #ruby
[08:28:55] CloCkWeRX: has joined #ruby
[08:29:56] lomex: has joined #ruby
[08:31:20] hahuang65: has joined #ruby
[08:33:18] moeabdol: has joined #ruby
[08:35:08] Moosashi: has joined #ruby
[08:35:12] al2o3-cr: >> "abcdefghiabcaa".enum_for(:scan, /a/).map { $~.begin(0) } # shevy
[08:35:13] ruby[bot]: al2o3-cr: # => [0, 9, 12, 13] (https://eval.in/566828)
[08:36:08] tAn: has joined #ruby
[08:36:18] neanderslob_: has joined #ruby
[08:37:30] d0nn1e: has joined #ruby
[08:44:04] kareeoleez: has joined #ruby
[08:50:39] PaulCape_: has joined #ruby
[08:50:44] ravishankarjha: has joined #ruby
[08:58:27] DevastatingDave: has joined #ruby
[08:58:46] lxsameer: has joined #ruby
[09:05:34] tens0r: has joined #ruby
[09:07:51] blackmes1: has joined #ruby
[09:09:57] kareeole_: has joined #ruby
[09:13:45] PaulCapestany: has joined #ruby
[09:13:52] gchaos: has joined #ruby
[09:17:18] htmldrum: has joined #ruby
[09:18:25] ixti: has joined #ruby
[09:19:20] senayar: has joined #ruby
[09:19:29] PaulCapestany: has joined #ruby
[09:20:03] codecop: has joined #ruby
[09:25:37] LoneHerm_: has joined #ruby
[09:25:49] drewo: has joined #ruby
[09:26:34] blackmes1: has joined #ruby
[09:29:19] kareeoleez: has joined #ruby
[09:29:21] TomyLobo: has joined #ruby
[09:31:52] hahuang65: has joined #ruby
[09:32:48] pandaant: has joined #ruby
[09:33:14] madgen: has joined #ruby
[09:34:00] bronson: has joined #ruby
[09:36:00] kareeoleez: has joined #ruby
[09:40:38] Moosashi: has joined #ruby
[09:44:38] Anderson69s: has joined #ruby
[09:46:30] akem: has joined #ruby
[09:51:19] Tempesta: has joined #ruby
[10:02:21] twe4ked: has joined #ruby
[10:04:03] SCHAAP137: has joined #ruby
[10:04:23] Musashi007: has joined #ruby
[10:06:48] Mia: has joined #ruby
[10:06:48] Mia: has joined #ruby
[10:08:56] QORRiE: has joined #ruby
[10:10:32] dionysus69: has joined #ruby
[10:14:23] last_staff: has joined #ruby
[10:16:53] drptbl: has joined #ruby
[10:17:23] zacstewart: has joined #ruby
[10:18:37] spider-mario: has joined #ruby
[10:19:48] senayar: has joined #ruby
[10:19:53] drewo: has joined #ruby
[10:23:42] SCHAAP137: has joined #ruby
[10:23:53] SCHAAP137: has joined #ruby
[10:26:24] naftilos76: has joined #ruby
[10:29:12] tildes: has joined #ruby
[10:30:04] dantevergil: has joined #ruby
[10:30:22] dionysus69: has joined #ruby
[10:31:19] dantevergil: has joined #ruby
[10:31:39] dantevergil: has joined #ruby
[10:32:49] dantevergil: has joined #ruby
[10:33:09] dantevergil: has joined #ruby
[10:34:24] GBrawl: has joined #ruby
[10:35:18] flashpoint9: has joined #ruby
[10:36:20] ruid: has joined #ruby
[10:36:25] CloCkWeRX: has joined #ruby
[10:36:39] spk: has joined #ruby
[10:38:18] twe4ked: has joined #ruby
[10:39:33] spk: has joined #ruby
[10:51:49] chipotle: has joined #ruby
[10:52:24] banister: has joined #ruby
[10:57:23] CloCkWeRX: has left #ruby: ()
[11:02:51] PedramT: has joined #ruby
[11:05:04] rafadc: has joined #ruby
[11:07:49] SCHAAP137: has joined #ruby
[11:09:57] rafadc: has joined #ruby
[11:10:46] skade: has joined #ruby
[11:11:17] ctp: has joined #ruby
[11:11:31] millerti: has joined #ruby
[11:13:59] drewo: has joined #ruby
[11:14:14] LoneHerm_: has joined #ruby
[11:20:41] senayar: has joined #ruby
[11:21:30] sdothum: has joined #ruby
[11:21:44] steve: has joined #ruby
[11:24:31] blackmes1: has joined #ruby
[11:25:04] Gasher: has joined #ruby
[11:31:29] biberu: has joined #ruby
[11:32:37] hahuang65: has joined #ruby
[11:34:43] CausaMortis: has joined #ruby
[11:35:19] bronson: has joined #ruby
[11:36:00] twintail: has joined #ruby
[11:37:51] peterc_: has joined #ruby
[11:38:35] Bilge: has joined #ruby
[11:38:42] symm-: has joined #ruby
[11:42:27] kristofferR: has joined #ruby
[11:42:34] hosttor: has joined #ruby
[11:47:56] nadir: has joined #ruby
[11:51:52] stannard: has joined #ruby
[11:53:24] hosttor`: has joined #ruby
[11:53:27] |2701: has joined #ruby
[11:55:33] CloCkWeRX: has joined #ruby
[11:56:28] yaw: has joined #ruby
[11:56:42] futilegames: has joined #ruby
[11:57:33] stardiviner: has joined #ruby
[11:58:10] nisstyre: has joined #ruby
[11:59:33] yaw: has joined #ruby
[12:01:11] sepp2k: has joined #ruby
[12:01:22] mdw: has joined #ruby
[12:04:07] zapata: has joined #ruby
[12:05:22] Hanmac: has joined #ruby
[12:08:06] drewo: has joined #ruby
[12:10:30] stardiviner: has joined #ruby
[12:14:08] rafadc: has joined #ruby
[12:18:33] ur5us: has joined #ruby
[12:19:44] chipotle: has joined #ruby
[12:21:18] lkba: has joined #ruby
[12:21:35] senayar: has joined #ruby
[12:24:36] bruno-: has joined #ruby
[12:25:24] araujo: has joined #ruby
[12:25:25] araujo: has joined #ruby
[12:25:45] banister: has joined #ruby
[12:26:04] zotherstupidguy: has joined #ruby
[12:26:23] symm-: has joined #ruby
[12:26:48] araujo: has joined #ruby
[12:29:22] mikecmpbll: has joined #ruby
[12:34:00] karapetyan: has joined #ruby
[12:34:36] auxbuss: has joined #ruby
[12:36:53] bronson: has joined #ruby
[12:37:36] flashpoint9: has joined #ruby
[12:39:11] nando293921: has joined #ruby
[12:40:45] yos7ph: has joined #ruby
[12:46:06] flashpoint9: has joined #ruby
[12:54:14] _orangejuice: has joined #ruby
[12:54:21] karapetyan: has joined #ruby
[12:54:43] Emmanuel_Chanel: has joined #ruby
[12:55:16] _orangejuice: Hi! New here. Why does `price = (10055/100).to_f` return differently than `price = 10055/100.to_f`?
[12:56:01] davedev24: has joined #ruby
[12:56:01] Ox0dea: _orangejuice: Because explicit method calls bind more tightly than the division "operator".
[12:56:42] _orangejuice: Ox0dea: Sorry simpler for non-programmer?
[12:56:52] blackmes1: has joined #ruby
[12:57:00] Ox0dea: _orangejuice: The latter does The Right Thing because it's `10055 / (100.to_f)`, but the parentheses are superfluous.
[12:57:15] Ox0dea: Ruby does integral division by default.
[12:57:18] ruby[bot]: Ox0dea: # => 2 (https://eval.in/566869)
[12:58:06] _orangejuice: ahh. so I could do 10055/100.00
[12:58:17] _orangejuice: if i want a float output
[12:58:23] _orangejuice: thanks Ox0dea
[12:58:30] Ox0dea: And `10055/100r` if you want a Rational result.
[12:58:33] Ox0dea: _orangejuice: Sure thing.
[12:58:36] Caerus: se yaa later #ruby :)
[12:58:47] Devalo: has joined #ruby
[12:58:56] weemsledeux: has joined #ruby
[13:02:13] drewo: has joined #ruby
[13:05:16] skweek: has joined #ruby
[13:07:22] auxbuss: has joined #ruby
[13:07:35] karapetyan: has joined #ruby
[13:08:10] stannard: has joined #ruby
[13:12:37] karapetyan: has joined #ruby
[13:12:37] GodFather: has joined #ruby
[13:13:24] karapetyan: has joined #ruby
[13:16:09] symm-: has joined #ruby
[13:22:17] senayar: has joined #ruby
[13:25:59] ramfjord: has joined #ruby
[13:26:44] dionysus69: has joined #ruby
[13:27:07] blackgoat: has joined #ruby
[13:33:16] ur5us: has joined #ruby
[13:33:20] hahuang65: has joined #ruby
[13:33:52] rbennacer: has joined #ruby
[13:33:55] last_staff: has joined #ruby
[13:35:35] karapetyan: has joined #ruby
[13:37:36] banister: has joined #ruby
[13:37:50] bronson: has joined #ruby
[13:38:37] mdw: has joined #ruby
[13:39:23] bluOxigen: has joined #ruby
[13:40:35] dantevergil: has joined #ruby
[13:41:10] bluOxigen_: has joined #ruby
[13:43:15] blaxter: has joined #ruby
[13:46:44] pawnbox: has joined #ruby
[13:47:13] ftj: has joined #ruby
[13:47:31] cdg: has joined #ruby
[13:50:10] pawnbox: has joined #ruby
[13:51:13] Emmanuel_Chanel: has joined #ruby
[13:52:32] stannard: has joined #ruby
[13:53:07] adgtl: has joined #ruby
[13:56:19] drewo: has joined #ruby
[13:59:53] blackmes1: has joined #ruby
[14:03:46] karapetyan: has joined #ruby
[14:05:00] Gasher: has joined #ruby
[14:07:39] d0lph1n98: has joined #ruby
[14:08:11] LoneHermit: has joined #ruby
[14:12:05] stannard: has joined #ruby
[14:13:46] moeabdol: has joined #ruby
[14:16:39] karapetyan: has joined #ruby
[14:17:42] greg: has joined #ruby
[14:18:46] skade: has joined #ruby
[14:18:58] zacstewart: has joined #ruby
[14:23:00] senayar: has joined #ruby
[14:23:24] rodfersou: has joined #ruby
[14:27:28] yaw: has joined #ruby
[14:28:21] mostlybadfly: has joined #ruby
[14:28:29] htmldrum: has joined #ruby
[14:31:40] CloCkWeRX: has joined #ruby
[14:32:24] User458764: has joined #ruby
[14:33:18] User458764: Hi, in foo[5].bar, how do you prevent a NoMethodError for nil Object?
[14:34:29] User458764: I know I can do a unless div[5] end but is it exists a one line code which return ""
[14:34:33] pawnbox: has joined #ruby
[14:34:43] auxbuss: has joined #ruby
[14:34:50] akem: has joined #ruby
[14:39:01] DoubleMalt: has joined #ruby
[14:40:36] LoneHerm_: has joined #ruby
[14:41:44] wof: has joined #ruby
[14:43:30] shevy: User458764 perhaps via .try or the lonely operator &. - I would however had check first whether I would have a nil object there, nil objects do not respond to [] method
[14:44:20] User458764: shevy thanks I didn't .try method I solved my problem with a ternary operator but I will also check your solution
[14:45:51] shevy: here is one stackoverflow discussion about the lonely operator http://stackoverflow.com/questions/34583168/safe-navigation-operator-for-nil
[14:50:25] drewo: has joined #ruby
[14:51:01] Ispira: has joined #ruby
[14:52:17] TheBigNorwegian: has joined #ruby
[14:53:18] bluOxigen: has joined #ruby
[14:56:03] nanoz: has joined #ruby
[14:56:11] tmtwd: has joined #ruby
[14:56:50] davedev24: has joined #ruby
[14:58:05] bluOxigen_: has joined #ruby
[14:58:23] ftj: has joined #ruby
[14:59:14] Pupeno: has joined #ruby
[15:02:56] blackmes1: has joined #ruby
[15:03:22] Rubie: has joined #ruby
[15:04:43] Emmanuel_Chanel_: has joined #ruby
[15:09:35] charliesome: has joined #ruby
[15:10:53] naftilos76: has joined #ruby
[15:11:45] Chachi: has joined #ruby
[15:16:45] yos7ph: has joined #ruby
[15:17:22] stannard: has joined #ruby
[15:19:09] davedev24: has joined #ruby
[15:20:33] flashpoint9: has joined #ruby
[15:22:02] stannard: has joined #ruby
[15:23:03] auxbuss: has joined #ruby
[15:23:14] idefine: has joined #ruby
[15:23:35] blackmes1: has joined #ruby
[15:23:53] senayar: has joined #ruby
[15:23:59] jhack: has joined #ruby
[15:24:01] crameth: has joined #ruby
[15:24:02] nicoulaj: has joined #ruby
[15:24:53] banister: has joined #ruby
[15:27:10] zacstewart: has joined #ruby
[15:28:12] _orangejuice: I have a Customer class with :name, etc. instance variables and a Order class with :id, :customer_name. How do I let the new_order = Order.new grab the customer from the Customer class?
[15:28:43] _orangejuice: Usually this is done with foreign keys in a DB. I'm trying to learn by building a standalone ruby program.
[15:31:07] dmr8: has joined #ruby
[15:31:10] apeiros: _orangejuice: :foo is a symbol, not an instance variable. @foo is an instance variable.
[15:31:34] _orangejuice: I meant attr_accessor :name, :email
[15:31:45] apeiros: "the customer from the Customer class" makes no sense to me. did you mean the name?
[15:32:00] apeiros: otherwise: Customer.new gives you a customer instance.
[15:32:37] _orangejuice: Yes a reference of the who the customer is for that order.
[15:32:46] apeiros: not sure where the db comes in either - unless you leave out massive amounts of context…
[15:33:12] apeiros: well, you'd probably either pass it in in the constructor, or you'd have an accessor
[15:33:29] yos7ph: has joined #ruby
[15:33:43] apeiros: class Order; def initialize(customer); @customer = customer; end; end; order = Order.new(Customer.new)
[15:34:07] hahuang65: has joined #ruby
[15:34:42] _orangejuice: Thats what I was trying to understand.
[15:35:59] _orangejuice: That makes sense. For Order.new can I already access instance variables for an existing Customer instance?
[15:36:19] _orangejuice: *from an existing customer instance
[15:36:33] _orangejuice: Sorry If I'm not articulating correctly.
[15:37:01] apeiros: you can access their accessors (methods)
[15:37:24] apeiros: you can't access ivars from "outside" in ruby (which is why you have to define accessors, or write that kind of methods yourself)
[15:37:55] apeiros: nb, `attr_accessor :foo` is equivalent to `def foo; return @foo; end; def foo=(value); @foo = value; end`
[15:38:09] apeiros: i.e., it just defines two methods for you.
[15:38:29] rodferso1: has joined #ruby
[15:39:25] codecop: has joined #ruby
[15:39:35] bronson: has joined #ruby
[15:40:37] Mariano: has joined #ruby
[15:40:45] _orangejuice: Ok. I misunderstood them as variables. That makes sense. So how does one create a bunch of customers (objects). Then later if one wants to create an order from the existing customers.
[15:41:33] firstdayonthejob: has joined #ruby
[15:41:54] apeiros: customer = Customer.new; order = Order.new(customer)
[15:42:01] _orangejuice: I understand attr_accessor :name, :email are getter and setter methods
[15:42:36] apeiros: yes, defines #name(), #name=(value), #email and #email=(value) methods which set and read @name and @email
[15:43:10] _orangejuice: That seems straightforward. What memory is that customer stored it? Thats why I bought up databases.
[15:43:55] _orangejuice: Thank you apeiros. I appreciate you mapping your answer to my problem.
[15:44:11] apeiros: variables are ram
[15:44:38] drewo: has joined #ruby
[15:45:06] apeiros: if you want to persist the data, you need some kind of serialization in order to store your objects to a file or a db (which in the end will be a file / files too)
[15:48:39] bruno-: has joined #ruby
[15:49:23] _orangejuice: I see. Very cool. This makes a lot of sense. So in a typical web form, I'll collect/parse customer data, store it in a local variable, then database. For a order, grab customer data stuff from the database, since my local variables are clueless?
[15:51:01] apeiros: yes, in a typical web-app you'll use a db for persistency and populate your variables from that and/or from the form input
[15:51:13] _orangejuice: :) Thank you apeiros
[15:51:38] duderonomy: has joined #ruby
[15:51:43] hck89: has joined #ruby
[15:51:44] Mariano: hi all. I'm having an odd problem with pry and requiring many files by iterating them. When I start pry and run the require line manually, the require is made correctly. But if i comment out the pry call and just run the code, the require doesn't seem to work. If anyone can give me a hand, i will provide a gist. Thank you all in advance.
[15:51:51] senayar: has joined #ruby
[15:52:51] karapetyan: has joined #ruby
[15:54:53] lomex: has joined #ruby
[15:54:57] Mariano: is it possible that pry is making the require statement work when it normally would not?
[15:55:34] tax: has joined #ruby
[15:55:41] Mariano: https://gist.github.com/mgiagante/83d090454baf7068a8a51e8dbcdb1f7a
[15:55:43] User458764: has joined #ruby
[15:55:54] Yiota_: has joined #ruby
[15:58:31] GodFather: has joined #ruby
[16:00:05] sarbs_: has joined #ruby
[16:01:28] kareeoleez: has joined #ruby
[16:01:43] rafadc: has joined #ruby
[16:02:20] kareeoleez: has joined #ruby
[16:02:39] Yiota_: has joined #ruby
[16:03:15] LoneHermit: has joined #ruby
[16:07:25] htmldrum: has joined #ruby
[16:07:53] karapetyan: has joined #ruby
[16:09:40] rafadc: has joined #ruby
[16:10:13] karapetyan: has joined #ruby
[16:10:49] karapetyan: has joined #ruby
[16:13:30] yaw: has joined #ruby
[16:14:36] JoshGlzBrk: has joined #ruby
[16:18:20] Yiota_: has joined #ruby
[16:18:49] fedexo: has joined #ruby
[16:19:49] Caerus|Away: has joined #ruby
[16:19:51] GodFather: has joined #ruby
[16:20:18] the_drow: has joined #ruby
[16:20:25] felltir: has joined #ruby
[16:20:29] elifoster: has joined #ruby
[16:22:34] lukeholder: has joined #ruby
[16:22:40] wldcordeiro: has joined #ruby
[16:24:29] KrzaQ: Is there a way to use the return value of a block in string.scan?
[16:24:54] Ishido: has joined #ruby
[16:24:56] KrzaQ: 'cruel world 123'.scan(/[a-z]+/){|w| w.reverse }.join(' ') <-- I'd like it to become 'leurc dlrow'
[16:25:14] yaw: has joined #ruby
[16:25:51] the_drow: has joined #ruby
[16:26:51] the_drow: has joined #ruby
[16:27:04] sepp2k1: has joined #ruby
[16:30:03] tAn: has joined #ruby
[16:30:28] shevy: was that not the use case of itself or tap or something along those lines?
[16:30:41] Yiota_: has joined #ruby
[16:30:41] drewo: has joined #ruby
[16:31:30] krobzaur: has joined #ruby
[16:33:50] KrzaQ: I don't understand
[16:33:52] lxsameer: has joined #ruby
[16:34:01] KrzaQ: the docs only show examples with printing
[16:34:20] haxrbyte: has joined #ruby
[16:35:35] LoneHerm_: has joined #ruby
[16:35:45] KrzaQ: I have another question, hopefully not stupid: I have a list of filenames, I want only those that exist. I can use the clunky block version, but I'd much rather use .select(&:File.exists?) <-- is there a way to make it work?
[16:36:24] P4Titan: has joined #ruby
[16:36:40] shevy: not with the & when you require arguments
[16:36:47] stannard: has joined #ruby
[16:37:24] Ox0dea: KrzaQ: select(&File.method(:exists?))
[16:37:58] LoneHerm_: has joined #ruby
[16:38:04] SilverKey: has joined #ruby
[16:38:08] Ox0dea: Sure thing.
[16:38:10] nerium: has joined #ruby
[16:38:11] Rodya_: has joined #ruby
[16:38:17] Ox0dea: We might have sugar for that some day: https://bugs.ruby-lang.org/issues/12125
[16:38:54] stannard: has joined #ruby
[16:38:57] KrzaQ: it's already okay :)
[16:39:00] null__: has joined #ruby
[16:39:29] KrzaQ: the one thing I find annoying about ruby is |, because editors rarely know to autocomplete it and it's out of the way on the keyboard
[16:40:33] Ox0dea: UltiSnips has a few block snippets; I don't explicitly type | very often.
[16:41:06] marsjaninzmarsa: has joined #ruby
[16:41:10] bronson: has joined #ruby
[16:41:11] Kim^J: has joined #ruby
[16:41:20] KrzaQ: ACTION is not a vim user, usually
[16:41:31] Ox0dea: I don't understand.
[16:41:34] KrzaQ: but it lokos nice
[16:41:56] KrzaQ: ACTION comes from the forbidden windows land, where ST is often used
[16:42:34] the_drow: has joined #ruby
[16:42:38] weemsledeux: has joined #ruby
[16:42:46] GodFather: has joined #ruby
[16:44:00] BTRE: has joined #ruby
[16:46:52] rkazak: has joined #ruby
[16:47:35] Ocratech: has joined #ruby
[16:49:27] mdw7: has joined #ruby
[16:50:57] edwinvdgraaf: has joined #ruby
[16:52:26] swills_: has joined #ruby
[16:52:30] P4Titan: Hello all. Is there a way of printing an instance class's ID or hash within its code ... for debuging purposes.
[16:52:54] SenpaiSilver: has joined #ruby
[16:53:02] zacts: hi rubyists
[16:53:24] Ox0dea: &ri object_id P4Titan
[16:53:25] `derpy: P4Titan: http://ruby-doc.org/core-2.3.0/Object.html#method-i-object_id
[16:54:10] P4Titan: ay, thanks
[16:59:12] the_drow: has joined #ruby
[16:59:31] Cohedrin: has joined #ruby
[17:00:29] lomex: has joined #ruby
[17:02:21] dikaio: has joined #ruby
[17:03:43] nadav: has joined #ruby
[17:03:55] bruno-: has joined #ruby
[17:04:04] shevy: $cover.file=$smallcover.file=$covername=nil
[17:04:21] shevy: http://www.kesiev.com/kesievchiefs/sources-0.4/kesievchiefs-0.4.rb
[17:04:31] shevy: I can't decide whether that is deliberate obfuscation or just a weird writing style
[17:05:07] johnny56_: has joined #ruby
[17:06:04] nanoyak: has joined #ruby
[17:07:24] Vingador: has joined #ruby
[17:07:29] benlieb: has joined #ruby
[17:07:46] ffgghhj: has joined #ruby
[17:08:05] krobzaur: has joined #ruby
[17:08:10] pawnbox: has joined #ruby
[17:08:13] krobzaur: has left #ruby: ()
[17:09:02] nando293921: has joined #ruby
[17:10:47] Trynemjoel: has joined #ruby
[17:15:24] drewo: has joined #ruby
[17:16:23] sdothum: has joined #ruby
[17:16:40] Mariano: hi people. I have this Dir[File.dirname(__FILE__) + '/lib/proxy_finder/specific_parsers/*.rb'].each { |file| require file }
[17:16:53] Mariano: is it possible that it only works if i call it from pry?
[17:17:11] Mariano: when i run the code without pry, the require isn't made
[17:17:43] araujo: has joined #ruby
[17:19:01] araujo: has joined #ruby
[17:19:34] RegulationD: has joined #ruby
[17:20:01] pabs: has joined #ruby
[17:20:22] rbennacer: has joined #ruby
[17:21:47] _orangejuice: Syntax help needed initially a class with a hash http://pastie.org/10828232
[17:22:20] idletask: has joined #ruby
[17:22:37] Ox0dea: _orangejuice: You have to make them keyword arguments.
[17:22:48] the_drow: has joined #ruby
[17:22:50] P4Titan: has left #ruby: ("party")
[17:25:50] minimalism: has joined #ruby
[17:27:24] _orangejuice: Ox0dea: I tried initialize (args), each block, instance_variable_set k, v.
[17:27:48] zacstewart: has joined #ruby
[17:27:48] Ox0dea: _orangejuice: Now you should try making `name` and `email` keyword arguments.
[17:27:54] drewo: has joined #ruby
[17:28:15] rafadc: has joined #ruby
[17:28:21] Ocratech: has joined #ruby
[17:31:47] symm-: has joined #ruby
[17:32:30] felltir: has joined #ruby
[17:32:52] Rodya_: has joined #ruby
[17:33:17] shevy: mariano one simple explanation can be that Dir[] there returns an empty array
[17:34:12] Nanuq: has joined #ruby
[17:34:18] cdg: has joined #ruby
[17:34:39] Mariano: oh yes, but strangely, it doesn't when i run it from the pry session
[17:34:51] hahuang65: has joined #ruby
[17:34:59] lukeholder: has joined #ruby
[17:35:15] Mariano: if i copy/paste the line while in the pry session, it returns a list of required files
[17:35:46] Mariano: but when i run the whole .rb file it doesn not get executed.
[17:35:56] Mariano: really odd
[17:36:16] rafadc: has joined #ruby
[17:36:17] yude_: has joined #ruby
[17:37:17] the_drow: has joined #ruby
[17:37:54] shevy: probably because you rely on __FILE__ there
[17:37:59] Azure: has joined #ruby
[17:38:16] the_drow: has joined #ruby
[17:40:53] shevy: if you have it installed and lay out as a gem-structured project, what I often do is to just ask the project where it is like... if your project is called foobar ... Dir[Foobar.base_dir?+'specific_parsers/*.rb'].each or something like that (when I have such a method
[17:40:58] Mariano: great , then here it is https://gist.github.com/mgiagante/83d090454baf7068a8a51e8dbcdb1f7a
[17:41:37] Mariano: oh then maybe when im on pry the base dir changes, so that makes it work!
[17:41:53] _orangejuice: Ox0dea: Tried. I think it works on a regular method not initialize :( http://pastie.org/10828260
[17:42:02] shevy: yeah... I am not sure what path is passed there exactly, but if you supply the proper path it will work
[17:42:49] Mariano: is it Foobar.base_dir? or Foobar.base_dir
[17:43:08] Mariano: i mean, should it return a path name ?
[17:43:51] Mariano: i do have a gem structure
[17:44:18] shevy: well that is just a method that I tend to have for my larger gems
[17:44:27] shevy: you can skip it and just supply the right path :D
[17:44:50] Mariano: i'll take a look at the gemfile
[17:45:28] Mariano: and make sure that's evaluating to the right path. Now that you say it, it looks like the current dir must change when on pry
[17:46:39] Ox0dea: _orangejuice: You misspelled `initialize` there.
[17:47:23] mdw: has joined #ruby
[17:47:37] _orangejuice: Wow! Thats 2 hours of my life that won't come back. Thanks Ox0dea
[17:47:43] Ox0dea: mariano: Be advised that on 2.0+, you can use Kernel#__dir__ as an easy way to get hold of the directory in which the currently executing file lives.
[17:48:00] Ox0dea: _orangejuice: Use pain as a teacher.
[17:48:43] Ox0dea: Sorry about missing that in your first paste. :/
[17:49:07] _orangejuice: I've been at it for a while. Thanks :((
[17:49:13] _orangejuice: Much before that
[17:49:19] _orangejuice: Thanks for noticing.
[17:50:14] rafadc: has joined #ruby
[17:50:37] shevy: hah I can relate to it
[17:50:43] shevy: my typo was "def intialize"
[17:51:06] dikaio: has joined #ruby
[17:51:18] shevy: _orangejuice also have a look at https://github.com/yuki24/did_you_mean#displaying-a-warning-when-initialize-is-incorrectly-typed
[17:51:33] tax: has joined #ruby
[17:53:33] _orangejuice: :) thanks shevy!
[17:55:06] Mariano: thanks Ox0dea!
[17:55:24] Ox0dea: All this gratitude is making me feel tingly.
[17:56:52] rashmirathi: has joined #ruby
[17:58:17] ddv: has joined #ruby
[17:58:22] the_drow: has joined #ruby
[17:58:45] Es0teric: has joined #ruby
[17:59:10] the_drow: has joined #ruby
[18:00:16] scepticulous: has joined #ruby
[18:00:26] ftj: has joined #ruby
[18:00:37] Mia: has joined #ruby
[18:04:20] Caerus|Away: has joined #ruby
[18:06:02] bronson: has joined #ruby
[18:06:23] arlek: has joined #ruby
[18:06:23] Dimik: has joined #ruby
[18:06:45] spider-mario: has joined #ruby
[18:07:48] bruno-: has joined #ruby
[18:10:16] PaulePanter: Hi. wher can I find http://ruby-doc.org/docs/keywords/1.9/Object.html#method-i-rescue for current Ruby versions?
[18:10:34] PaulePanter: I am especially interested in the definition of `rescue`.
[18:10:43] LoneHerm_: has joined #ruby
[18:11:46] drewo: has joined #ruby
[18:12:47] nando293921: has joined #ruby
[18:13:29] nofxx: has joined #ruby
[18:13:36] araujo: has joined #ruby
[18:14:07] Ox0dea: PaulePanter: http://ruby-doc.org/core-2.3.1/doc/keywords_rdoc.html
[18:14:22] Ox0dea: `rescue` is a keyword, so it doesn't have a "definition" in the sense you're thinking.
[18:15:49] araujo: has joined #ruby
[18:16:13] rafadc: has joined #ruby
[18:16:16] Ox0dea: Here's where the magic happens in the bytecode compiler: https://git.io/vwh0A
[18:16:59] cdg: has joined #ruby
[18:17:12] Yiota_: has joined #ruby
[18:19:08] houhoulis: has joined #ruby
[18:19:36] the_drow: has joined #ruby
[18:20:32] the_drow: has joined #ruby
[18:22:52] htmldrum: has joined #ruby
[18:26:00] codelurker: has joined #ruby
[18:28:06] PaulePanter: Ox0dea: Thank you.
[18:28:27] Ox0dea: PaulePanter: Sure thing. I suspect I ended up answering a different question than the one you asked, though.
[18:28:40] Ox0dea: This is probably the document you seek: http://ruby-doc.org/core-2.3.1/doc/syntax/exceptions_rdoc.html
[18:28:49] PaulePanter: Ox0dea: http://ruby-doc.org/core-2.1.9/doc/keywords_rdoc.html
[18:28:57] PaulePanter: … why can’t I find it for Ruby 2.1?
[18:29:08] the_drow: has joined #ruby
[18:29:15] Ox0dea: ¯\_(ツ)_/¯
[18:29:16] yfeldblum: has joined #ruby
[18:29:46] GodFather: has joined #ruby
[18:30:09] the_drow: has joined #ruby
[18:30:21] PaulePanter: Ox0dea: But nice to be pointed to C code. Very interesting.
[18:33:40] Rodya_: has joined #ruby
[18:34:30] Caerus|Away: has joined #ruby
[18:38:23] SilverKey: has joined #ruby
[18:40:09] j2k: has joined #ruby
[18:41:25] flashpoint9: has joined #ruby
[18:41:36] dumdedum: has joined #ruby
[18:43:20] the_drow: has joined #ruby
[18:44:08] the_drow: has joined #ruby
[18:44:49] the_drow: has joined #ruby
[18:45:27] Ocratech: has joined #ruby
[18:46:41] diegoaguilar: has joined #ruby
[18:49:45] lomex: has joined #ruby
[18:52:16] stannard: has joined #ruby
[18:52:37] hack_fish: has joined #ruby
[18:52:59] drewo: has joined #ruby
[18:54:39] Gasher: has joined #ruby
[18:55:00] Coldblackice: has joined #ruby
[18:55:57] northrup: has joined #ruby
[18:56:56] ctp: has joined #ruby
[18:59:24] rkazak: has joined #ruby
[19:01:25] jud: has joined #ruby
[19:01:25] jud: has joined #ruby
[19:04:19] justin_pdx: has joined #ruby
[19:05:30] Coldblackice: has joined #ruby
[19:09:16] zero7: has joined #ruby
[19:09:52] idefine: has joined #ruby
[19:14:06] idletask: has joined #ruby
[19:14:07] nisstyre: has joined #ruby
[19:15:26] htmldrum: has joined #ruby
[19:15:28] dumdedum: has joined #ruby
[19:24:53] matp: has joined #ruby
[19:25:41] arlek: has joined #ruby
[19:26:28] zacts: (oops... typo)
[19:26:33] zacts: anyway, hello #ruby
[19:26:49] zacts: I'm reading this Head First Ruby book, it's actually not too bad for me
[19:27:03] zacts: I needed to review some basic OOP concepts before the Well Grounded Rubyist
[19:27:07] zacts: I've been out of the loop a bit
[19:27:07] SenpaiSilver: has joined #ruby
[19:28:33] zacstewart: has joined #ruby
[19:28:50] Rubie: has joined #ruby
[19:29:37] Yiota_: has joined #ruby
[19:29:50] LoneHerm_: has joined #ruby
[19:30:01] Cohedrin_: has joined #ruby
[19:31:00] shevy: are you sure you haven't yet half-mastered ruby yet with all those books
[19:31:13] skade: has joined #ruby
[19:32:16] drewo: has joined #ruby
[19:35:41] Rodya_: has joined #ruby
[19:35:41] hahuang65: has joined #ruby
[19:36:43] goodroot: has joined #ruby
[19:38:47] idefine: has joined #ruby
[19:39:43] ctp: has joined #ruby
[19:42:13] dikaio: has joined #ruby
[19:43:04] Phagus: has joined #ruby
[19:43:37] yfeldblum: has joined #ruby
[19:46:11] Kus: has joined #ruby
[19:46:32] justin_pdx: has joined #ruby
[19:49:08] nando293921: has joined #ruby
[19:50:10] Cohedrin: has joined #ruby
[19:50:38] SilverKey: has joined #ruby
[19:50:45] htmldrum: has joined #ruby
[19:55:52] bronson: has joined #ruby
[19:56:14] early90spants: has joined #ruby
[19:56:58] the_drow: has joined #ruby
[19:57:41] rafadc: has joined #ruby
[19:59:01] bruno-: has joined #ruby
[19:59:26] shevy: you have all waited for it! :)
[19:59:28] shevy: http://www.tiobe.com/tiobe_index
[19:59:55] Ox0dea: Knew that was coming.
[20:00:15] shevy: <3 reactions
[20:00:16] htmldrum: has joined #ruby
[20:01:26] CausaMortis: has joined #ruby
[20:03:01] tAn: has joined #ruby
[20:03:38] yqt: has joined #ruby
[20:03:44] Es0teric: has joined #ruby
[20:03:53] idefine: has joined #ruby
[20:04:13] Devalo: has joined #ruby
[20:06:33] millerti: has joined #ruby
[20:11:36] justin_pdx: has joined #ruby
[20:12:33] Regulati_: has joined #ruby
[20:12:39] Gasher: has joined #ruby
[20:13:01] azor: has joined #ruby
[20:15:20] skweek: has joined #ruby
[20:17:02] shevy: for a (ruby) commandline script, how many help options would you say should be mentioned at maximum when one invokes it via a --help switch?
[20:27:12] haxrbyte: has joined #ruby
[20:27:14] lomex: has joined #ruby
[20:29:15] pawnbox: has joined #ruby
[20:29:17] zacstewart: has joined #ruby
[20:31:11] blackmes1: has joined #ruby
[20:31:26] azor: has joined #ruby
[20:32:49] aeterne: has joined #ruby
[20:32:55] finisherr: has joined #ruby
[20:34:40] htmldrum: has joined #ruby
[20:36:28] Rodya_: has joined #ruby
[20:36:51] idefine: has joined #ruby
[20:39:39] the_drow: has joined #ruby
[20:40:37] bruce_lee: has joined #ruby
[20:40:37] bruce_lee: has joined #ruby
[20:41:41] SilverKey: has joined #ruby
[20:43:57] Caerus|Away: has joined #ruby
[20:50:29] idefine: has joined #ruby
[20:50:40] theery: has joined #ruby
[20:53:43] dikaio: has joined #ruby
[20:55:10] iamvery: has joined #ruby
[20:59:18] rafadc: has joined #ruby
[20:59:50] idefine: has joined #ruby
[21:01:48] senayar: has joined #ruby
[21:01:48] senayar: has joined #ruby
[21:04:18] ramfjord: has joined #ruby
[21:05:00] the_drow: has joined #ruby
[21:05:29] zacts: shevy: exactly 314159 options
[21:05:35] zacts: anyway, back to #ruby
[21:05:46] zacts: I'm like totally learning ruby man, totally
[21:06:16] zacts: I'll have pastebins in a week or so, and git pushes. I know it
[21:07:50] shevy: ya well one project has 87 options... another one has 63 ... and even I forget what some of the options do
[21:08:10] shevy: you learn ruby AND git at the same time?
[21:08:21] zacts: indeed shevy
[21:08:45] zacts: Ry's git tutorial and Pro Git
[21:08:50] zacts: are great ebooks
[21:09:00] zacts: I'm pretty snazzy shevy
[21:10:08] millerti: has joined #ruby
[21:10:22] bobbycvi: has joined #ruby
[21:11:33] shevy: I don't know these
[21:12:05] chouhoulis: has joined #ruby
[21:14:33] LoneHermit: has joined #ruby
[21:16:41] GinoMan2440: has joined #ruby
[21:17:03] Sammichmaker: has joined #ruby
[21:18:47] kirun: has joined #ruby
[21:18:59] zacts: shevy: Pro Git is the 'official' community git book linked from the official git homepage
[21:19:12] zacts: Ry's git tutorial is just a really good tutorial I found for git
[21:20:22] kareeoleez: has joined #ruby
[21:21:22] scepticulous: has joined #ruby
[21:25:58] dumdedum: has joined #ruby
[21:27:38] terminalrecluse: has joined #ruby
[21:30:02] the_drow: has joined #ruby
[21:30:03] zacstewart: has joined #ruby
[21:31:00] the_drow: has joined #ruby
[21:32:45] Azure|dc: has joined #ruby
[21:32:54] Devalo: has joined #ruby
[21:33:00] JoshGlzBrk: has joined #ruby
[21:35:30] weemsledeux: has joined #ruby
[21:36:21] hahuang65: has joined #ruby
[21:37:09] Rodya_: has joined #ruby
[21:38:47] JoshGlzBrk: has joined #ruby
[21:39:12] northrup: has joined #ruby
[21:39:14] millerti: has joined #ruby
[21:42:25] djbkd: has joined #ruby
[21:42:46] sp4rrow: has joined #ruby
[21:46:28] griffindy: has joined #ruby
[21:46:56] brent__: has joined #ruby
[21:47:00] gooodroot: has joined #ruby
[21:47:23] the_drow: has joined #ruby
[21:48:23] millerti: has joined #ruby
[21:49:11] SilverKey: has joined #ruby
[21:49:37] brent__: hello, was given this codwars challenge and pretty lost
[21:50:37] brent__: https://gist.github.com/brentluna/10568af4933102e794d41ff7249304ef
[21:51:03] brent__: it's the instructions and the 2 lines of code they give you to start
[21:52:17] gix: has joined #ruby
[21:52:44] blackmes1: has joined #ruby
[21:55:11] sp4rrow: has joined #ruby
[21:56:19] bronson: has joined #ruby
[21:57:16] millerti: has joined #ruby
[21:57:19] d0nn1e: has joined #ruby
[21:59:17] nofxx: has joined #ruby
[21:59:17] nofxx: has joined #ruby
[21:59:42] drewo: has joined #ruby
[22:00:06] sepp2k: has joined #ruby
[22:00:11] rafadc: has joined #ruby
[22:00:44] Es0teric: has joined #ruby
[22:02:56] senayar: has joined #ruby
[22:03:02] idefine: has joined #ruby
[22:03:50] ddffg: has joined #ruby
[22:04:32] spastorino: has joined #ruby
[22:04:34] imanc: has joined #ruby
[22:04:44] cbetta_: has joined #ruby
[22:04:48] prab97: has joined #ruby
[22:05:09] iamdevnul: has joined #ruby
[22:05:10] cbetta: has joined #ruby
[22:05:10] cbetta: has joined #ruby
[22:05:25] angiebadillo: has joined #ruby
[22:05:34] jmhmccr: has joined #ruby
[22:05:40] daxroc: has joined #ruby
[22:06:37] theery: Why is this drawing the text at the bottom of the page? https://gist.githubusercontent.com/macmartine/c1b32dff820ae84ce74114c64f137e2f/raw/33a0347f54ed0e07fc68bfc204fb842cf39a99c1/gistfile1.txt
[22:06:52] theery: 0, 0 should be at the top left, not the bottom left
[22:07:22] drptbl: has joined #ruby
[22:08:05] Ox0dea: &ri global_variables brent__
[22:08:05] `derpy: brent__: http://ruby-doc.org/core-2.3.0/Kernel.html#method-i-global_variables
[22:09:33] C0deMaver1ck: has joined #ruby
[22:11:18] brent__: Ox0dea: any chance you could explain how that works?, the doc is pretty minimal
[22:11:38] Ox0dea: brent__: It gives you back an Array of Symbols representing all of the global variables in the system.
[22:11:48] Ox0dea: The one you need to solve the kata is hiding in there somewhere.
[22:12:31] sp4rrow_: has joined #ruby
[22:13:07] ctp: has joined #ruby
[22:13:33] brent__: global_variables.grep /wireCode/
[22:14:09] the_drow: has joined #ruby
[22:14:39] Ox0dea: Not quite.
[22:14:48] Ox0dea: Debug-print the result and scan around a bit.
[22:15:32] kareeoleez: has joined #ruby
[22:15:50] millerti: has joined #ruby
[22:17:44] brent__: i'm seeing $boom2 and $wireCode that stand out
[22:18:08] Ox0dea: $wireCode is just the one they pre-declared for whatever reason.
[22:18:23] Ox0dea: You don't need it, and it certainly didn't need to be a global.
[22:18:27] tAn: has joined #ruby
[22:21:14] brent__: right, looking at the $vars it gives, wondering which one is needed
[22:28:11] prab97: has left #ruby: ("WeeChat 1.5")
[22:28:51] n_blownapart: has joined #ruby
[22:29:07] yude: has joined #ruby
[22:29:21] brent__: Ox0dea: https://gist.github.com/brentluna/10568af4933102e794d41ff7249304ef here's what global variables gives me
[22:29:38] Ox0dea: brent__: It used to be $boom2; now it's $boom6.
[22:29:48] Ox0dea: Mystery solved.
[22:29:48] brent__: when i use $SAFE, it passes the first test and fails
[22:30:03] Ox0dea: brent__: Maybe step away from the keyboard a bit.
[22:30:06] Ox0dea: Clear your head.
[22:30:11] johnny56: has joined #ruby
[22:30:34] Pupeno: has joined #ruby
[22:30:43] finisherr: has left #ruby: ()
[22:31:26] Ox0dea: I realize that $SAFE is a vaguely relevant identifier here, but it's pretty obvious that $boom<x> is the one you're after.
[22:31:38] brent__: yeah that was my initial though
[22:31:43] brent__: since it's changing
[22:31:58] brent__: however it failed all the tests
[22:32:11] Ox0dea: You have to extract the value stored in the global.
[22:32:23] Ox0dea: The answer won't be 2; it'll be whatever's in $boom2.
[22:32:30] brent__: i understand that
[22:34:04] moeabdol: has joined #ruby
[22:35:24] brent__: had to learn eval
[22:35:29] chouhoulis: has joined #ruby
[22:36:19] zenlot: has joined #ruby
[22:36:32] brent__: i was using global_variables.grep/boom/ to find it and then pass it, but didn't realize i was passing it as a symbol the firs ttime
[22:36:41] Ox0dea: Ah, right.
[22:36:51] Ox0dea: There really ought to be Kernel#global_variable_get.
[22:37:03] ur5us: has joined #ruby
[22:37:56] Rodya_: has joined #ruby
[22:38:28] Pupeno: has joined #ruby
[22:39:12] brent__: is there another way to have turned that symbol into a it's var name, or extract the value from ti?
[22:39:55] brent__: x = global_variables.grep /boom/ $wireCode = eval(x.first.to_s) is what i did
[22:40:30] idefine: has joined #ruby
[22:40:38] CloCkWeRX: has joined #ruby
[22:40:55] ddffg: has joined #ruby
[22:41:44] Devalo: has joined #ruby
[22:41:58] Ox0dea: None of which I'm aware. I suspect you could use Fiddle to get a pointer into the global variable table and seek around for the matching VALUE, but that's overkill.
[22:43:07] skweek: has joined #ruby
[22:45:30] Rubie: has joined #ruby
[22:45:50] SilverKey: has joined #ruby
[22:46:01] choke: has joined #ruby
[22:46:01] johnny56: has joined #ruby
[22:46:08] Rodya_: has joined #ruby
[22:46:15] bruno-: has joined #ruby
[22:56:13] brent__: well thanks for your help Ox0dea, must of thought iw as crazy not trying boom
[22:56:32] Ox0dea: brent__: Only for a second or two. :P
[22:56:57] Ox0dea: (Okay, ten-ish.)
[22:59:57] Rodya_: has joined #ruby
[23:00:05] blackmes1: has joined #ruby
[23:00:46] rafadc: has joined #ruby
[23:02:56] Ox0dea: At any rate, treat that kata as having taught you some things to never do. :P
[23:04:06] brent__: uggh, been struggling w/ some of the 3/4 kyu katas
[23:05:15] senayar: has joined #ruby
[23:05:25] nando293921: has joined #ruby
[23:05:44] brent__: Ox0dea: what is your favorite place for practice problems?
[23:06:32] Ox0dea: brent__: I enjoyed Ruby Quiz when it was a thing.
[23:07:05] hahuang65: has joined #ruby
[23:08:37] duncannz: has joined #ruby
[23:12:16] houhoulis: has joined #ruby
[23:12:55] houhoulis: has joined #ruby
[23:14:55] rafadc: has joined #ruby
[23:14:59] houhoulis: has joined #ruby
[23:15:22] brent__: what about now?
[23:16:24] millerti: has joined #ruby
[23:18:04] houhoulis: has joined #ruby
[23:18:12] _blizzy_: has joined #ruby
[23:18:31] Ox0dea: I had ~120 Project Euler solutions, but then they went down for a while and I forgot my credentials.
[23:18:35] flashpoint9: has joined #ruby
[23:18:53] brent__: can you see other peoples solutions on project eueler?
[23:19:04] Ox0dea: If they post them in the forum, sure.
[23:20:31] charliesome: has joined #ruby
[23:33:33] prab97: has joined #ruby
[23:34:16] gchaos: has joined #ruby
[23:34:34] stardiviner: has joined #ruby
[23:35:16] ledestin: has joined #ruby
[23:39:32] sp4rrow: has joined #ruby
[23:40:11] solocshaw: has joined #ruby
[23:44:27] flashpoint9: has joined #ruby
[23:47:48] millerti: has joined #ruby
[23:48:21] rbennacer: has joined #ruby
[23:48:36] yude: has joined #ruby
[23:49:49] SilverKey: has joined #ruby
[23:50:44] dsuper7: has joined #ruby
[23:51:33] Ebok: has joined #ruby
[23:55:05] kam270: has joined #ruby
[23:56:49] cdg_: has joined #ruby
[23:57:18] Serp3nt: has joined #ruby
[23:57:58] stannard: has joined #ruby