« Back to channel list

#ruby - 05 September 2015

« Back 1 day Forward 1 day »
[00:00:56] juanpablo____: has joined #ruby
[00:01:19] veg_: has joined #ruby
[00:01:38] firegaze: has joined #ruby
[00:03:06] sdfgsdfg: has joined #ruby
[00:05:07] Mendenhall: has joined #ruby
[00:05:43] devoldmx: has joined #ruby
[00:06:20] firegaze: has joined #ruby
[00:11:25] j_suth: has joined #ruby
[00:12:21] davidw: has joined #ruby
[00:14:43] workmad3: has joined #ruby
[00:15:27] Motoservo: has joined #ruby
[00:16:24] freerobby: has joined #ruby
[00:18:39] chills42: has joined #ruby
[00:22:01] northfurr: has joined #ruby
[00:24:09] leat: has joined #ruby
[00:27:07] northfurr: has joined #ruby
[00:30:05] renodice: has joined #ruby
[00:32:33] ndrei: has joined #ruby
[00:36:34] majjoha: has joined #ruby
[00:38:14] centrx: has joined #ruby
[00:39:27] northfurr: has joined #ruby
[00:40:51] Kallis: has joined #ruby
[00:41:56] keen__________14: has joined #ruby
[00:45:36] jonnie: has joined #ruby
[00:46:48] tkuchiki: has joined #ruby
[00:47:28] shmilan: has joined #ruby
[00:48:23] fgo: has joined #ruby
[00:48:52] enebo: has joined #ruby
[00:49:37] freerobby: has joined #ruby
[00:52:43] musl: has joined #ruby
[00:52:58] rbennacer: has joined #ruby
[00:54:17] platzhirsch: has left #ruby: ()
[00:55:13] charliesome: has joined #ruby
[00:57:15] tkuchiki: has joined #ruby
[00:58:03] havenwood: has joined #ruby
[01:00:18] Oog: has joined #ruby
[01:00:45] Oog: has joined #ruby
[01:03:12] shevy: writing apps with eclipse
[01:03:16] shevy: they'll become MONSTER apps
[01:06:16] shevy: hi Ox0dea
[01:06:17] dgutierrez1287: has joined #ruby
[01:06:24] Ox0dea: Hey, guy.
[01:06:29] devoldmx: has joined #ruby
[01:06:34] havenn: has joined #ruby
[01:07:08] rbennacer: has joined #ruby
[01:07:40] rocknrollMarc: has joined #ruby
[01:09:36] pontiki: do you have build-essential?
[01:11:52] above: has joined #ruby
[01:12:24] failshell: has joined #ruby
[01:13:07] bottom: has joined #ruby
[01:14:02] havenn: shevy: ag
[01:14:26] ahmetkapikiran: has joined #ruby
[01:14:45] shevy: ok it's coffee time for you again
[01:14:53] havenn: awk nouveau
[01:15:03] martin_work_: has joined #ruby
[01:15:09] Ox0dea: havenn: ack != awk
[01:15:20] Rubie: has joined #ruby
[01:15:22] [k-: has joined #ruby
[01:15:24] havenn: shevy: I've had so much coffee today I've become immune.
[01:15:35] havenn: Ox0dea: So it is. So it is.
[01:15:39] havenn: ACTION blames Friday
[01:15:57] snath: has joined #ruby
[01:17:11] davedev24: has joined #ruby
[01:17:38] havenn: Starts with "a" ends with "k", checks out?
[01:17:44] havenn: Three letters. I was so close.
[01:18:16] coffeecupp: has joined #ruby
[01:19:06] snath: has left #ruby: ()
[01:19:43] based_: has joined #ruby
[01:20:53] davedev24: has joined #ruby
[01:21:48] s2013: has joined #ruby
[01:23:08] Ox0dea: ~ $ pkgfile -rv /a.k$ | grep -o a.k | sort -u | paste -sd ' '
[01:23:10] Ox0dea: ack ark ask awk
[01:23:27] havenn: ACTION sees awk awk awk awk
[01:24:50] Ox0dea: "aik", "alk", and "auk" are words according to SCOWL.
[01:26:07] rbennacer: has joined #ruby
[01:27:32] GarethAdams: has joined #ruby
[01:30:12] sdwrage: has joined #ruby
[01:31:28] houhoulis: has joined #ruby
[01:34:09] mahmoudmahfouz: has joined #ruby
[01:37:25] paulcsmith: has joined #ruby
[01:38:59] fgo: has joined #ruby
[01:41:00] stardiviner: has joined #ruby
[01:42:20] firegaze: has joined #ruby
[01:42:45] tmtwd: has joined #ruby
[01:44:21] grotewold: has joined #ruby
[01:45:36] sdwrage: has joined #ruby
[01:45:52] iateadonut: has joined #ruby
[01:46:06] baweaver: has joined #ruby
[01:47:10] JDiPierro: has joined #ruby
[01:48:21] quazimodo: has joined #ruby
[01:49:30] tejasmanohar: has joined #ruby
[01:49:43] juanpablo____: has joined #ruby
[01:50:00] symbol: has joined #ruby
[01:50:22] bigredboots: has joined #ruby
[01:51:25] ddarkpassenger: has joined #ruby
[01:53:25] mprelude: has joined #ruby
[01:59:16] UtkarshRay: has joined #ruby
[01:59:24] Adran: has joined #ruby
[02:02:14] hawkface: has joined #ruby
[02:03:36] workmad3: has joined #ruby
[02:07:33] moeabdol: has joined #ruby
[02:08:16] shevy: is there a way to find out these two following conditions in some simple manner: (1) abandoned/inactive gems that (2) seemed to be useful to lots of people (e. g. let's say some downloads like +50.000 downloads from rubygems.org)
[02:11:15] failshell: has joined #ruby
[02:13:21] cindy: has joined #ruby
[02:14:39] Deep: has joined #ruby
[02:14:54] jaredrhine: has joined #ruby
[02:16:12] Ox0dea: shevy: `gem search --no-vers` + `gem spec -r foo date` might be a start.
[02:17:03] Ox0dea: You'll have to query the rubygems.org API individually to get download counts. :/
[02:18:09] Ox0dea: Eh, you don't need to use `gem spec` to get the date; the rubygems.org API returns a "built_at" datum.
[02:18:40] shevy: cool thanks
[02:18:54] aaeron: has joined #ruby
[02:20:38] aaeron1: has joined #ruby
[02:20:58] bronson: has joined #ruby
[02:22:11] bkxd: has joined #ruby
[02:22:19] baweaver: Github stars
[02:22:31] sevenseacat: has joined #ruby
[02:23:05] Mendenhall: has joined #ruby
[02:23:15] yeticry: has joined #ruby
[02:24:57] Coraline: shevy: you can request a data dump from the folks on #rubygems
[02:27:27] jaequery: has joined #ruby
[02:29:46] freerobby: has joined #ruby
[02:31:34] Ox0dea: Coraline: Is that a done thing? Just hand them a query to run?
[02:31:49] Coraline: No, but they may provide a data dump.
[02:31:58] Coraline: ...that you could load into a db
[02:32:39] startupality: has joined #ruby
[02:32:55] Ox0dea: "May" is quite operative there; I suspect ~150GB would be the largest DCC transfer in IRC history.
[02:33:30] Coraline: Not over IRC!
[02:33:39] Coraline: You can ask there is what I meant.
[02:35:21] yfeldblum: has joined #ruby
[02:35:55] Ox0dea: "Have you ever had a dream that you, um, you had, your, you, you could, you???ll do, you, you wants, you, you could do so, you, you???ll do, you could, you, you want, you want them to do you so much you could do anything?"
[02:36:02] bmurt: has joined #ruby
[02:37:21] majjoha: has joined #ruby
[02:38:18] Swappticon: has joined #ruby
[02:41:42] paulcsmith: has joined #ruby
[02:42:24] n_blownapart: has joined #ruby
[02:42:39] jdawgaz: has joined #ruby
[02:43:44] martin_work: has joined #ruby
[02:44:19] arup_r: has joined #ruby
[02:45:14] martin_work: has left #ruby: ()
[02:50:29] juanpablo____: has joined #ruby
[02:50:35] freerobby: has joined #ruby
[02:50:49] mahmoudmahfouz: has joined #ruby
[02:52:03] Mendenhall: has joined #ruby
[02:52:37] casadei_: has joined #ruby
[02:55:50] zenguy_pc: has joined #ruby
[02:59:05] aaeron: has joined #ruby
[03:01:10] gener1c_: has joined #ruby
[03:01:24] martin_work_: has joined #ruby
[03:02:51] djbkd: has joined #ruby
[03:03:01] wildlander: has joined #ruby
[03:06:48] McFly_: has joined #ruby
[03:06:54] Rubie: has joined #ruby
[03:07:33] McFly_: anyone out there?
[03:07:35] arup_r: has joined #ruby
[03:07:36] sdwrage: has joined #ruby
[03:07:36] darkf: has joined #ruby
[03:07:54] govt: has joined #ruby
[03:08:38] McFly_: hello word
[03:09:50] MrFjords: has joined #ruby
[03:10:49] KnownSyntax_: has joined #ruby
[03:11:05] braincrash: has joined #ruby
[03:12:19] failshell: has joined #ruby
[03:13:55] fgo: has joined #ruby
[03:13:59] Ox0dea: Goodbye, sentence.
[03:14:45] govt: I dont wanna open a can of worms, but I've been watching a lot of Johnathan Worthington and Perl 6 stuff, and it seems like they are able to organize the perl community so effortlessly
[03:15:07] govt: and i wonder if its in part to the fact that CPAN is a unified effort and RubyGems is much less so
[03:15:41] shevy: perl 6 is their last hope
[03:16:29] MrFjords: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[03:16:40] govt: are you kidding? perl 5 isnt by any means dead
[03:16:44] Guest84: has joined #ruby
[03:17:02] govt: dont let the hivemind delude you, I just turned down a job offer to go write perl
[03:17:31] Mendenhall: has joined #ruby
[03:17:43] govt: but im saying that when anybody goes looking for a ruby library, they end up with some weirdly named gem
[03:18:01] govt: as opposed to Net::WebSocket
[03:18:28] baweaver: I turned down a job for RPG and one for COBOL
[03:18:38] baweaver: jobs do not mean a language is doing well
[03:18:48] baweaver: though that does not mean Perl is nearly as heinous as those two....
[03:18:54] diegoaguilar: has joined #ruby
[03:19:16] govt: im trying not to talk about perl, but rather the concept of CPAN
[03:19:44] baweaver: and there have been those before to make that type of point
[03:19:55] sevenseacat: not taking the bait
[03:20:06] baweaver: honestly I don't know what the hype is around it though, BUT that's mainly from not using Perl heavily
[03:20:13] baweaver: well, I used it, but badly
[03:20:16] govt: perl has nothing to do with it
[03:20:19] govt: like i said
[03:20:29] govt: rubygems has no organization whatsoever
[03:20:32] shevy: perl is indeed unrelated to CPAN
[03:20:34] govt: thats what im getting at
[03:20:42] baweaver: so how would you suggest improving it then
[03:21:09] centrx: What is this "organization" in CPAN that rubygems doesn't have?
[03:21:16] govt: the same way the perl community solved this exact issue, with namespaces
[03:21:35] baweaver: Net::SSH, Net::HTTP, etc do exist
[03:21:36] shevy: I think that was suggested a while ago for rubygems
[03:21:47] Ox0dea: ~ $ gem search ^net-http | wc -l
[03:21:51] baweaver: that'd definitely take some effort though
[03:21:54] govt: has left #ruby: ()
[03:21:59] govt: has joined #ruby
[03:22:09] govt: well yeah, but wouldnt it be worth it?
[03:22:12] shevy: usual problem is to find that programmer to do the work
[03:22:25] Ox0dea: govt: Do you want to be the guy who moderates the names given to new gems?
[03:22:43] baweaver: they are govt after all ;)
[03:22:53] baweaver: gem search ^net- | wc -l
[03:23:05] govt: no i dont want ANYBODY to control the names of gems, i want people to make the call for themselves that a 'cool' name is less useful than a distinct one
[03:23:15] Ox0dea: Wrong community. :)
[03:23:32] shevy: you could rename a gem
[03:23:33] baweaver: inclined to agree admittedly
[03:23:35] Ox0dea: govt: Out of curiosity, what would you have named Rails?
[03:23:52] sevenseacat: gems have distinct names - they just might not indicate what the gem does
[03:23:57] govt: big projects get their own namespace
[03:23:59] govt: like Mojo
[03:24:08] govt: but thats truly large scale projects
[03:24:14] chipotle: has joined #ruby
[03:24:16] baweaver: like I tend to name things pry-macro or pry-session
[03:24:32] baweaver: only works if people agree to namespace as a collective
[03:24:36] baweaver: which is its own can of worms
[03:24:56] baweaver: ever tried to get a group of unrelated OSS devs on different projects to work together? Pulling teeth in some cases.
[03:25:14] baweaver: avdi: you about?
[03:25:26] baweaver: seems like your line of discussion, curious as to what you think
[03:25:42] govt: which is understandable, to a certain degree
[03:25:43] Joufflu_: has joined #ruby
[03:25:45] baweaver: TL;DR: CPAN does a better job of namespacing and we like cool names for gems too much in ruby
[03:25:59] baweaver: avdi wrote a quip on this not too long ago
[03:26:08] baweaver: though is probably either getting ready for bed or in bed
[03:26:09] govt: i just see ruby devs so excited and working so hard on ruby features and implementation
[03:26:16] baweaver: east coast would be midnight-ish iirc
[03:26:26] govt: and rather than structure the gems, they just throw them in a pile
[03:26:49] dopamean_: has joined #ruby
[03:26:55] govt: outsiders to perl dont really know it, but theres a LOT of perl just laying around in a repo somewhere
[03:26:59] Joufflu__: has joined #ruby
[03:27:09] govt: but it doesnt stop people from using CPAN the right way
[03:27:48] Ox0dea: govt: https://www.ruby-toolbox.com/
[03:27:57] govt: ive seen it
[03:28:05] Ox0dea: And you don't feel any better?
[03:28:07] govt: theres also a repo on GH called awesome_ruby
[03:28:09] govt: or something like that
[03:28:17] govt: yeah those are excellent
[03:28:32] baweaver: awesome_* is becoming a trend it seems
[03:28:45] govt: like a showcase
[03:28:47] toretore: gem install awesome_gems
[03:28:53] toretore: all the cool gems you need
[03:29:02] govt: can u gem install awesome_* ?
[03:29:02] fedexo: has joined #ruby
[03:30:28] baweaver: really now? I just did shevy
[03:30:33] baweaver: gem install awesome_gems
[03:30:59] yfeldblum: has joined #ruby
[03:31:09] shevy: I tried "gem install awesome_*"
[03:31:14] govt: gem install awesome_*
[03:31:22] govt: gets string'd and theres no gem by that name
[03:31:42] govt: though we could make it and just require every gem that starts with awesome
[03:31:47] drbrain: has joined #ruby
[03:31:56] Ox0dea: ~ $ gem search ^awesome | wc -l
[03:31:57] larissa: has joined #ruby
[03:32:07] universa1: has joined #ruby
[03:32:09] Ox0dea: govt: baweaver is going to make the awesome_gems gem awesome.
[03:32:14] Shidash: has joined #ruby
[03:32:15] shevy: well you got alternatives listed
[03:32:17] shevy: ERROR: Possible alternatives: awesome, awesomer, awsome, awesm, awesome-cli
[03:32:28] linc01n: has joined #ruby
[03:32:29] baweaver: gem search awesome_gems | wc -l
[03:32:47] baweaver: ACTION blows smoke off zsh
[03:32:50] shevy: are the alternatives wrong?
[03:32:53] shevy: since a _ was used
[03:33:23] sfr^: has joined #ruby
[03:37:39] MrFjords: has joined #ruby
[03:38:07] majjoha: has joined #ruby
[03:40:05] devoldmx: has joined #ruby
[03:41:55] psye: has joined #ruby
[03:43:13] psye: has joined #ruby
[03:46:18] Mendenhall: has joined #ruby
[03:50:20] theery: has joined #ruby
[03:51:24] crowell: has joined #ruby
[03:51:38] Rubie: has joined #ruby
[03:52:09] ellisTAA: has joined #ruby
[03:52:16] workmad3: has joined #ruby
[03:52:50] arescorpio: has joined #ruby
[04:01:40] minimuffins: has joined #ruby
[04:01:52] avdi: baweaver: I did?
[04:02:11] baweaver: I seem to recall you said something on CPAN a while back
[04:02:47] baweaver: http://devblog.avdi.org/2015/08/07/were-still-catching-up-to-perl/
[04:03:03] Rollabunna: has joined #ruby
[04:03:18] avdi: I'm a fan of cpan
[04:03:41] avdi: The organization/naming factor is overrated though
[04:04:34] avdi: In perl if I wanted an xml parser I had to pick between xmlparser and libxml and parsexmlparseparser
[04:04:48] Rollabun_: has joined #ruby
[04:04:57] avdi: And parselibxmlparser and we'll you get the idea
[04:05:55] avdi: They all sounded official and correct and I couldn't keep them straight
[04:06:08] gix: has joined #ruby
[04:06:41] avdi: I don't know what the fuck a Nokogiri is but if someone tells me that's the one I need to use, there's no way I'm going to forget it
[04:07:07] baweaver: Japanese serrating knife according to tenderlove
[04:07:29] avdi: I've used cpan and RubyGems extensively and in the end I decided the naming issue was a wash. Problems on both sides.
[04:07:32] baweaver: (who can correct me for probably butchering that )
[04:08:05] avdi: And don't get me started on the disaster that some voluntary tagging or categorizing would become
[04:08:30] baweaver: https://xkcd.com/927/ ?
[04:08:56] baweaver: I'll be happy as long as we don't end up in Java land
[04:09:04] eam: the nice thing about Perl modules is they actually describe what they do
[04:09:04] baweaver: so many nested folders....
[04:09:15] eam: ruby stuff -- you have NO idea what the function of a gem is given the name
[04:09:52] baweaver: more dependent on the author really than the language.
[04:10:02] eam: note: all those XML module you listed had "xml" in the name
[04:10:23] eam: baweaver: it's totally a cultural thing
[04:10:23] Synthmead: has joined #ruby
[04:10:29] avdi: Anyway fun gem names are fun. I get a kick out of them.
[04:10:33] eam: (perhaps generational as well)
[04:11:02] baweaver: oh, and I now own awesome_gems
[04:11:12] baweaver: and rapture too, still need something cool for that one
[04:11:24] baweaver: Radar mentioned the name once and was shocked it wasn't taken
[04:11:47] toretore: how do you own a name that was taken?
[04:11:53] avdi: I also like that funky gem names mean less godawful acronyms
[04:12:04] baweaver: probably use it for some type of database adapter or extension, already have enough AR black magic in a box I should put together
[04:12:20] baweaver: do not understand that question toretore
[04:12:26] baweaver: I publish a placeholder gem
[04:12:58] toretore: baweaver: awesome_gems was already a gem, is there a procedure for transferring ownership for gems that are deemed "not in use"?
[04:13:27] cubicool: has joined #ruby
[04:13:34] baweaver: though I give them up within 3-4 months if I can't think of anything
[04:13:34] baweaver: so not completely evil :D
[04:13:45] baweaver: apparently not
[04:13:54] baweaver: it's a list and a github repo
[04:13:58] baweaver: but not an actual gem
[04:14:01] baweaver: well, wasn't
[04:14:37] toretore: oh right, you already had it registered when i was looking i guess
[04:14:59] fgo: has joined #ruby
[04:15:03] cubicool: If I have a method: foo(a, b, c), is it possible to create a kind of alias/forward/delegate that can act as syntactic shorthand for calling with foo with 2 preset arguments and only accepting the 3rd? i.e., foo0 = foo(1, 2, ...), foo1 = foo1(3, ...), etc.
[04:15:14] baweaver: I'll probably take it down tomorrow as I don't intend to do anything there
[04:15:37] toretore: cubicool: def bar(3); foo(1,2,3); end
[04:15:51] baweaver: def foo2(c); foo(1,2,c) end
[04:16:16] baweaver: also look into currying if you're especially bold
[04:16:16] baweaver: but that's not really ruby per-se
[04:16:28] toretore: cubicool: what you're describing is called currying, you can probably find some fun gem that does it for you
[04:17:52] CHVNX: has joined #ruby
[04:17:58] toretore: there's probably a gem names tikka or korma or something else vaguely relevant
[04:18:27] baweaver: currying is where you can pass n number of arguments to a method and it returns a function that takes the remaining arguments, only fully running when it has all of them
[04:18:51] [k-: partial application*
[04:18:52] baweaver: so given: foo = fn(a,b,c); foo(1,2) returns a function which wants a c
[04:18:56] Rollabunna: has joined #ruby
[04:19:12] bottom: has joined #ruby
[04:19:19] [k-: (s)he is trying to partially apply 1 and 2
[04:19:20] djbkd: has joined #ruby
[04:19:50] baweaver: http://www.2ality.com/2011/09/currying-vs-part-eval.html
[04:20:40] EXID123: has joined #ruby
[04:21:07] Ox0dea: [k-: Currying : partial application :: literally : figuratively.
[04:21:33] Ox0dea: You just have to accept that enough people have used the wrong term long enough for the meaning to have changed. :(
[04:21:38] [k-: they aren't the sameeeeee
[04:21:46] mrityunjay: has joined #ruby
[04:22:04] Ox0dea: [k-: How do you feel about "substring" vs. "subsequence"?
[04:22:39] [k-: i do not come across them in my daily life
[04:22:48] shevy: hmm weird typo of today ... rather than "exams_per_month", I have "exams_per_moth"
[04:22:51] [k-: I have not generated an opinion
[04:23:00] Ox0dea: opinion.generate!
[04:23:05] [k-: i also do not know what's the difference
[04:23:17] Ox0dea: "fb" is technically a substring of "foobar".
[04:24:06] baweaver: fine fine I'll read into it more later.
[04:27:11] yfeldblum: has joined #ruby
[04:29:57] monoprotic: has joined #ruby
[04:30:49] aaeron: has joined #ruby
[04:30:58] Ox0dea: toretore: A gem for currying?
[04:31:25] Ox0dea: >> ObjectSpace.each_object(Class).select { |c| c.instance_methods.include? :curry }
[04:31:26] ruboto: Ox0dea # => [Method, Proc] (https://eval.in/428346)
[04:31:50] Ox0dea: >> foo = proc { |a, b, c| a + b + c }; foo.call(1).call(2).call(3)
[04:31:51] ruboto: Ox0dea # => nil can't be coerced into Fixnum (TypeError) ...check link for more (https://eval.in/428347)
[04:32:02] Ox0dea: >> foo = proc { |a, b, c| a + b + c }.curry; foo.call(1).call(2).call(3)
[04:32:03] ruboto: Ox0dea # => 6 (https://eval.in/428348)
[04:33:08] Ox0dea: cubicool: https://eval.in/428349
[04:34:34] nofxx: Any of you guys are into bikes? As in the >1 HP ones. Sorry the OT but curiosity with fellow programmers. cars or bikes.
[04:35:10] Rollabunna: has joined #ruby
[04:35:29] linuxboytoo: has joined #ruby
[04:35:33] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[04:35:50] baweaver: also not all people on the channel are guys, do remember
[04:36:10] nofxx: It's saturday... can't we talk bikes, drugs and rock n roll? This channel used to be more fun =P
[04:36:38] nofxx: baweaver, hehe... 99.8?
[04:36:41] baweaver: >> class Bike; end; Bike.new
[04:36:42] ruboto: baweaver # => #<Bike:0x40f12080> (https://eval.in/428350)
[04:37:16] jdawgaz: has joined #ruby
[04:37:21] Averna: has joined #ruby
[04:38:43] baweaver: rather presumptuous
[04:38:44] bnagy: Ox0dea: are you sure that fb is not a subsequence of foobar but not a substring?
[04:38:52] majjoha: has joined #ruby
[04:39:10] Ox0dea: bnagy: "fb" is a substring of "foobar", but not a subsequence.
[04:39:15] juanpablo____: has joined #ruby
[04:39:21] bnagy: I think you have it the wrong way around
[04:39:33] d2dchat: has joined #ruby
[04:39:34] bnagy: I think substring has a prefix substring suffix property
[04:40:52] Ox0dea: > mfw sequence doesn't mean continuous series
[04:41:29] Ox0dea: This is sufficiently mortifying.
[04:41:32] Ox0dea: /part #ruby
[04:42:40] based_: has joined #ruby
[04:42:45] craysiii: has joined #ruby
[04:43:10] bnagy: I only remember because I got screwed by LCS meaning apparently both depending on who's saying it
[04:43:16] framling: has joined #ruby
[04:43:19] bnagy: which is annoying
[04:43:32] bnagy: well.. either
[04:43:58] alem0lars: has joined #ruby
[04:44:56] Ox0dea: Aye, the terminology really isn't so great, and I still think "sequence" implies continuity better than "string".
[04:45:08] Ox0dea: I appreciate the edification, in any case.
[04:46:36] jalcine: has joined #ruby
[04:47:09] moeabdol: has joined #ruby
[04:47:44] casadei_: has joined #ruby
[04:50:37] The_Phoenix: has joined #ruby
[04:50:58] wldcordeiro: has joined #ruby
[04:52:54] based_: has joined #ruby
[04:54:04] johnhamelink: has joined #ruby
[04:54:28] rickmasta: has joined #ruby
[04:57:01] Klumben: has joined #ruby
[04:58:28] wldcordeiro: has joined #ruby
[05:02:04] hydrozen: has joined #ruby
[05:06:26] khebbie: has joined #ruby
[05:07:31] [k-: opinion.destroy!
[05:12:05] jackjackdripper: has joined #ruby
[05:13:11] failshell: has joined #ruby
[05:13:13] based_: has joined #ruby
[05:15:38] rippa: has joined #ruby
[05:16:04] fgo: has joined #ruby
[05:16:56] havenwood: has joined #ruby
[05:18:04] riotjones: has joined #ruby
[05:19:44] nsuke: has joined #ruby
[05:23:44] dionysus69: has joined #ruby
[05:26:33] The_Phoenix: has joined #ruby
[05:32:37] theery: has joined #ruby
[05:34:10] based_: has joined #ruby
[05:36:08] bigredbo_: has joined #ruby
[05:39:23] yfeldblum: has joined #ruby
[05:40:59] workmad3: has joined #ruby
[05:42:18] bronson: has joined #ruby
[05:49:29] noethics: has joined #ruby
[05:54:36] majjoha: has joined #ruby
[05:57:07] sagittarian: has joined #ruby
[05:59:46] darkxploit: has joined #ruby
[06:00:57] psye: has joined #ruby
[06:03:10] pranny: has joined #ruby
[06:05:36] leat: has joined #ruby
[06:06:40] yardenbar: has joined #ruby
[06:09:16] shevy: hmmm old code syndrom again
[06:09:25] shevy: is File.open(location).read equivalent to File.read(location) ?
[06:12:34] Ox0dea: shevy: No, you'll leave a file descriptor open in the case of the former.
[06:13:56] tvw: has joined #ruby
[06:15:11] Ox0dea: Bad form more than anything.
[06:15:34] solars: has joined #ruby
[06:17:31] fgo: has joined #ruby
[06:19:06] claw: has joined #ruby
[06:19:07] chipotle: has joined #ruby
[06:21:37] Mendenhall: has joined #ruby
[06:22:31] [k-: has joined #ruby
[06:22:41] qwertme: has joined #ruby
[06:23:23] quazimodo: has joined #ruby
[06:28:00] juanpablo____: has joined #ruby
[06:28:31] ap4y: has joined #ruby
[06:38:51] leafybasil: has joined #ruby
[06:41:53] blue_deref: has joined #ruby
[06:43:26] weemsledeux: has joined #ruby
[06:43:57] leafybasil: has joined #ruby
[06:45:39] leafybas_: has joined #ruby
[06:46:43] Oog: has joined #ruby
[06:48:03] _blizzy_: has joined #ruby
[06:50:38] darkxploit: has joined #ruby
[06:55:04] bigredboots: has joined #ruby
[06:55:21] majjoha: has joined #ruby
[06:56:17] jonnie: has joined #ruby
[06:57:37] _blizzy_: has joined #ruby
[06:59:31] moeabdol: has joined #ruby
[06:59:57] arup_r: has joined #ruby
[07:01:37] Asher: has joined #ruby
[07:01:47] Asher: has joined #ruby
[07:02:52] gizmore: has joined #ruby
[07:03:03] UtkarshRay: has joined #ruby
[07:05:29] jhass: has joined #ruby
[07:05:49] tubuliferous_: has joined #ruby
[07:05:53] ohaibbq: has joined #ruby
[07:07:58] majjoha: has joined #ruby
[07:12:51] lxsameer: has joined #ruby
[07:13:18] greenbigfrog: good morning everybody
[07:13:18] greenbigfrog: What game engines for ruby are still actively maintained/developed?
[07:13:46] failshell: has joined #ruby
[07:14:15] bazbing80: has joined #ruby
[07:18:33] Gnomethrower: has joined #ruby
[07:18:40] tkuchiki: has joined #ruby
[07:18:51] fgo: has joined #ruby
[07:21:06] djbkd: has joined #ruby
[07:24:10] greenbigfrog: My installation of ruby 1.9 just failed: http://hastebin.com/mifavizuqa.rb How do I ahve to fix it?
[07:26:33] Gnomethrower: has joined #ruby
[07:26:55] khebbie: has joined #ruby
[07:29:47] workmad3: has joined #ruby
[07:32:18] AlexAltea: has joined #ruby
[07:36:12] bkxd: has joined #ruby
[07:37:38] jimms: has joined #ruby
[07:43:05] Mendenhall: has joined #ruby
[07:43:38] sevenseacat: ruby 1.9 is past end of life
[07:47:00] ndrei: has joined #ruby
[07:49:22] iamninja: has joined #ruby
[07:50:04] firstdayonthejob: has joined #ruby
[07:58:13] codecop: has joined #ruby
[07:59:05] khebbie: has joined #ruby
[07:59:07] gix: has joined #ruby
[07:59:53] AlexAltea: has joined #ruby
[08:11:19] ndrei: has joined #ruby
[08:11:25] bruno-: has joined #ruby
[08:16:45] juanpablo____: has joined #ruby
[08:17:50] nsuke: has joined #ruby
[08:19:44] fgo: has joined #ruby
[08:20:43] michael_mbp: has joined #ruby
[08:21:39] yardenbar: has joined #ruby
[08:22:02] moeabdol: has joined #ruby
[08:22:03] TomyLobo: has joined #ruby
[08:22:48] markb_: has joined #ruby
[08:24:02] markb_: has joined #ruby
[08:24:47] zacts: has joined #ruby
[08:24:57] jenrzzz: has joined #ruby
[08:27:45] face: has joined #ruby
[08:29:07] Mendenhall: has joined #ruby
[08:29:59] Jackneill: has joined #ruby
[08:30:12] bluOxigen: has joined #ruby
[08:30:47] bkxd: has joined #ruby
[08:32:25] claw: has joined #ruby
[08:32:56] duoi: has joined #ruby
[08:33:53] djbkd: has joined #ruby
[08:34:48] khebbie: has joined #ruby
[08:37:08] marsjaninzmarsa: has joined #ruby
[08:38:17] gguggi: has joined #ruby
[08:38:27] praveen__: has joined #ruby
[08:40:14] mikecmpbll: has joined #ruby
[08:46:06] khebbie: has joined #ruby
[08:47:35] ordepdev: has joined #ruby
[08:48:28] khebbie: has joined #ruby
[08:50:07] workmad3: has joined #ruby
[08:51:17] Spami_: has joined #ruby
[08:54:22] jgt: has joined #ruby
[08:57:45] moeabdol: has joined #ruby
[08:58:17] nanoz: has joined #ruby
[08:59:28] ponga: has joined #ruby
[08:59:58] tejasmanohar: has joined #ruby
[09:00:13] tejasmanohar: what's the difference between POST JSON or "form POST" https://github.com/httprb/http#post-requests ?
[09:00:41] gizmore: content-type is probably different
[09:01:21] Pupeno: has joined #ruby
[09:01:43] spider-mario: has joined #ruby
[09:01:50] tejasmanohar: oh hmm looking
[09:02:04] tejasmanohar: gizmore: what content-type do you expect it to be w/ "form"?
[09:03:06] gizmore: application/x-www-form-urlencoded i think
[09:04:23] Ox0dea: Also "multipart/form-data" for file uploads.
[09:04:47] bubbys: has joined #ruby
[09:05:44] pontiki: i'd imaging POST JSON content type would be 'application/json'
[09:06:45] firstdayonthejob: has joined #ruby
[09:07:43] Ox0dea: Well, that would be the response type.
[09:08:44] Ox0dea: tejasmanohar was asking about POSTing JSON, unless I'm mistaken.
[09:08:55] tejasmanohar: was asking about POSTing forms, sorry
[09:09:02] tejasmanohar: but yeah, just the difference in general
[09:09:58] tejasmanohar: really just trying to find out whats different b/w my node and ruby code https://gist.github.com/tejasmanohar/e0e27b999fa8cf07931e
[09:10:28] pontiki: Ox0dea: request content-type as well
[09:11:31] praveen__: has joined #ruby
[09:11:55] pontiki: you can have a JSON request body, does not have to be just form encoded
[09:12:05] pontiki: not for file uploads, obv.
[09:12:15] jhass: that's valid JS? {a, b, c: d} ?
[09:13:06] Ox0dea: jhass: It's equivalent to {a: a, b: b, c: d}.
[09:13:18] jhass: TIL, how annoying
[09:13:29] Ox0dea: It's a relatively new thing.
[09:13:38] DanielI: has joined #ruby
[09:13:40] Ox0dea: Probably doesn't even work on the engine your browser is using.
[09:13:50] pontiki: ES6 short forms
[09:13:55] _joes__: has joined #ruby
[09:14:27] jhass: because your variable name should totally magically turn into a value
[09:14:36] [k-: has joined #ruby
[09:14:48] jhass: did they get that idea from PHP or something?
[09:14:51] Ox0dea: jhass: `@foo = foo; @bar = bar` is boilerplate.
[09:15:12] jhass: Ox0dea: yes, and crystal found a nice way to solve it, def initialize(@foo, @bar)
[09:15:32] _joes__: has joined #ruby
[09:15:33] Ox0dea: Do let the W3C know.
[09:15:49] jhass: I try to stay away from it
[09:15:57] jhass: could've been in some SocialWG, but meh
[09:16:26] apeiros: IMO the problem would be less if there was some distinctive syntax about it
[09:16:30] pontiki: now is the time on sprockets when we bash other languages
[09:16:44] jhass: with now you mean all the time, right?
[09:17:16] stoodfarback: has joined #ruby
[09:17:26] pontiki: well, there's times when Ox0dea has to show some more arcane code
[09:18:48] apeiros: damit, meme-generator broke :(
[09:19:27] jhass: apeiros: gotta integrate https://github.com/paradox460/memebot into the new bot
[09:19:56] apeiros: Caveats: This bot was written in a single nights bathtub coding session
[09:20:14] pontiki: you write code in the bathtub??
[09:20:25] apeiros: I don't. paradox460 seems to :)
[09:20:32] apeiros: ACTION doesn't even use the bathtub
[09:20:47] pontiki: my BFF reads old paperbacks in her bathtub soaks
[09:20:50] fgo: has joined #ruby
[09:21:30] tejasmanohar: any other differences between form and regular json post?
[09:21:57] tejasmanohar: anyone know what the curl equivalent would be?
[09:22:04] pontiki: i do know someone who brings her laptop into the tub when she soaks, too; she has something that lays over the tub walls.
[09:22:38] tejasmanohar: https://gist.github.com/tejasmanohar/891f647437b9e22ab19c
[09:23:14] rushed: has joined #ruby
[09:23:16] tejasmanohar: that works but i'm having trouble figuring out _what_ it's actually doing with `form` option
[09:23:33] tejasmanohar: or replicating in curl
[09:24:09] pontiki: tejasmanohar: when i use curl to test json posts, i use something like: curl -i -X POST -H 'Content-Type: application/json' ...
[09:25:01] pontiki: if you want to see what that's actually sending, send it to a local netcat listener
[09:25:14] pontiki: it will dump headers and content
[09:25:54] jhass: mitmproxy.org
[09:26:00] jhass: nice interface for that approach
[09:26:46] pontiki: that does look nice. good resource!
[09:29:39] ap4y: has joined #ruby
[09:36:14] bubbys: has joined #ruby
[09:37:07] voker57: has joined #ruby
[09:41:13] Oog: has joined #ruby
[09:43:35] TomyLobo: with (?<name>myregex), i can make a named capture. are there also named backrefs?
[09:44:24] jhass: \<name>? I don't remember, Regexp docs should mention them
[09:45:05] TomyLobo: i'll try that, thanks
[09:45:41] jhass: \\k<name>
[09:45:49] jhass: gsub docs explains it actually
[09:46:02] apeiros: just one \, no?
[09:46:33] jhass: depends on your context :P devdocs.io renders two in the docs for some reason so I mindlessly copied^^
[09:48:10] shevy: copy paste is the root of all evil
[09:48:34] daemonism: has joined #ruby
[09:48:47] gizmore: probably "\\" vs /\/
[09:49:53] Ox0dea: >> Regexp.escape '\k'
[09:49:54] ruboto: Ox0dea # => "\\\\k" (https://eval.in/428383)
[09:50:00] TomyLobo: Regexp docs say \k<name>
[09:50:55] bonhoeffer: has joined #ruby
[09:51:10] TomyLobo: >> /foo(?<name>bar)baz\k<name>/.match('foobarbazbar')
[09:51:11] ruboto: TomyLobo # => #<MatchData "foobarbazbar" name:"bar"> (https://eval.in/428384)
[09:53:15] astrobunny: has joined #ruby
[09:53:34] bkxd: has joined #ruby
[09:54:23] ruboto: tejasmanohar # => wrong number of arguments (0 for 2..3) (ArgumentError) ...check link for more (https://eval.in/428386)
[09:54:31] tejasmanohar: where's the code for `ruboto`?
[09:54:42] sevenseacat: it's closed-source afaik.
[09:55:55] apeiros: even if it wasn't
[09:56:00] apeiros: eval.in's source is closed anyway
[09:56:06] apeiros: (which is what ruboto uses to evaluate code)
[09:56:30] apeiros: and the method which raises there is "test", which is Kernel#test
[09:56:30] tejasmanohar: but open-source applications can interact w/ it
[10:00:56] Ox0dea: http://i.imgur.com/etbbwoO.jpg
[10:04:50] ap4y: has joined #ruby
[10:05:29] juanpablo____: has joined #ruby
[10:07:06] devoldmx: has joined #ruby
[10:08:31] shevy: are you gangsta coding again Ox0dea
[10:08:42] Rutix: has joined #ruby
[10:08:43] Rutix: has joined #ruby
[10:09:23] ych: has joined #ruby
[10:09:36] Ox0dea: I knew of Kernel#test's existence, but it's such a Bash-ism as to feel out of place. Still, it reminded me that there are interesting methods available from everywhere, and I was hoping somebody had another one on hand.
[10:09:52] Ox0dea: What even is "gangsta coding", while we're here?
[10:10:10] Guest72420: anybody familiar with a gem that allows u to create server instances via code?
[10:10:12] shevy: the act of using rogue methods and renegade classes
[10:10:36] Guest72420: create servers in rackspace/aws/etc
[10:10:54] Guest72420: create instances
[10:11:33] Ox0dea: Guest72420: There's the tugboat gem for DigitalOcean.
[10:12:09] Guest72420: do you have expereince with this gem in production environment? create instances for customers automatically?
[10:12:48] Ox0dea: I don't, but that's certainly one of its features.
[10:13:12] TomyLobo: is /\/(?<#{sym}>#{constraint})/ equivalent to /\/(?<#{sym.to_s}>#{constraint})/?
[10:13:33] Ox0dea: >> "#{:foo}" # TomyLobo
[10:13:34] ruboto: Ox0dea # => "foo" (https://eval.in/428391)
[10:13:45] TomyLobo: yeah but that's a string, not a regex
[10:13:53] Ox0dea: >> /#{:foo}/ # Better?
[10:13:54] ruboto: Ox0dea # => /foo/ (https://eval.in/428392)
[10:14:06] TomyLobo: so there's no magic behind the curtains?
[10:14:26] Ox0dea: Interpolation calls #to_s on non-String constituents.
[10:14:53] TomyLobo: i'm asking because there was some example code that seemed to imply that the match names are strings, but i can access them as match[sym] just as well
[10:15:15] Ox0dea: The match names are Symbols.
[10:17:12] Ox0dea: TomyLobo: Sorry, they are in fact Strings, but you can access them either way.
[10:17:16] Ox0dea: Ruby magic is magic.
[10:17:32] darkxploit: has joined #ruby
[10:18:34] Ox0dea: Pretty much every other kind of "identifier" is passed around as a Symbol; that capture names are Strings is an anomaly.
[10:19:12] tejasmanohar: https://github.com/tejasmanohar/pasterunner/blob/master/app.rb - https://gist.github.com/tejasmanohar/776894a117426e42a5bf
[10:19:27] tejasmanohar: anyone know what this error's about? it's only happening on the last post /run route, not the others O.o
[10:19:32] tejasmanohar: i don't really follow.
[10:19:33] darkxploit: has joined #ruby
[10:19:34] TomyLobo: https://github.com/TomyLobo/jirafuse/commit/7c7fb1d90ea3ba5e65f545f864d0d30ce3e09d69 regardless, named captures make for much simpler code :)
[10:19:35] yfeldblum: has joined #ruby
[10:19:45] djbkd: has joined #ruby
[10:20:27] TomyLobo: tejasmanohar, i guess "location" isnt what you think it is
[10:20:39] eightfold: has joined #ruby
[10:20:49] TomyLobo: try result[:location]
[10:21:14] tejasmanohar: its so puzzling to me how this doesnt fail in the post '/exec' route
[10:21:17] tejasmanohar: i jus tdon't get it.
[10:21:35] darkxploit: has joined #ruby
[10:21:57] tejasmanohar: TomyLobo: trying
[10:21:59] fgo: has joined #ruby
[10:22:17] TomyLobo: get '/' do ... end <-- what library does this?
[10:23:25] jhass: tejasmanohar: not linking back to the service doing the hard work? very uncool
[10:23:46] tejasmanohar: good point, will add that now
[10:24:14] darkxploit: has joined #ruby
[10:25:07] apeiros: tejasmanohar: https://github.com/tejasmanohar/pasterunner the reason why you asked about ruboto's code?
[10:25:30] rushed: has joined #ruby
[10:25:43] tejasmanohar: apeiros: yeah, i wanted to see if thats the same way
[10:25:48] TomyLobo: tejasmanohar, i guess sinatra's routing cant be used without an http server behind it either?
[10:26:02] apeiros: tejasmanohar: search for cinch eval-in plugin. it's basically the same code.
[10:26:13] TomyLobo: i'm asking because i wrote my own routing library so i can use it with FUSE
[10:26:26] tejasmanohar: ohh ok i think thats the one i saw earlier, apeiros
[10:26:33] apeiros: https://github.com/sparkhom/cinch-evalso
[10:26:41] tejasmanohar: was that a substitute for ruboto in the channel for some time?
[10:26:45] tejasmanohar: when it was gone
[10:26:51] tejasmanohar: if so... yeah
[10:27:09] tejasmanohar: mixed up another thing
[10:27:15] apeiros: before ruboto was eval-in by charliesome. he gave me eval-in's code (the bot, not the service). that's what I use in ruboto.
[10:27:40] apeiros: and it's somewhat similar to the evalso cinch plugin
[10:28:09] tejasmanohar: ... eval.so :)
[10:28:18] tejasmanohar: so i dont have to mess w/ eval.in like this
[10:30:24] stardiviner: has joined #ruby
[10:30:43] Ox0dea: apeiros: How come you don't use eval.so for ruboto?
[10:31:28] Ox0dea: It supports Befunge!
[10:32:11] apeiros: Ox0dea: right now: because I learned about eval.so after having gotten the code from charliesome
[10:32:19] apeiros: Ox0dea: in the future: because ruboto will no longer be a cinch bot
[10:32:38] FalseDeal: has joined #ruby
[10:32:42] apeiros: and wrt befunge: fine. I don't think I want befunge code eval in #ruby :-p
[10:33:06] apeiros: I might add the functionality to select an arbitrary language supported be eval.in for #ruby-offtopic
[10:33:08] Ox0dea: The syntax is 2-dimensional, so I'm not sure how that'd even work.
[10:33:44] apeiros: unless it has a syntax construct for linefolding, it won't work at all :-D
[10:33:53] apeiros: but now I remember which language befunge was
[10:34:16] Ox0dea: Well, there are some very clever programs which use reflection to bounce between the walls to perform some "useful" computation on one line, but there aren't many of those.
[10:34:49] Ox0dea: I need to ask #esoteric whether single-line Befunge is Turing-complete.
[10:37:33] arup_r: has joined #ruby
[10:38:55] workmad3: has joined #ruby
[10:40:35] shevy: apeiros no longer be a cinch bot? will you do the unspeakable... and update butler? :D
[10:40:43] ruboto: banister # => 3 (https://eval.in/428398)
[10:41:37] moahny: has joined #ruby
[10:42:17] [k-: 3 = 3 * 1
[10:42:21] [k-: 1 = yes
[10:42:33] [k-: therefore i conclude yes
[10:43:03] apeiros: shevy: already done
[10:43:21] apeiros: it's not a complete update. only the parts essential to have ruboto running
[10:43:27] bruno-: has joined #ruby
[10:43:33] jhass: will go public soon???
[10:43:40] [k-: none of anything == one of everything
[10:43:44] shevy: the only bot with class
[10:43:47] apeiros: will go github for select audience soon
[10:43:55] apeiros: will go public until latest end of this year
[10:43:59] jhass: you forgot the ???
[10:43:59] [k-: for selected audience???
[10:44:06] apeiros: ????????????, take some
[10:44:21] [k-: classier: ??
[10:44:23] ht__: has joined #ruby
[10:44:27] khebbie: has joined #ruby
[10:44:38] apeiros: it's dangerous to go alone! take this. ???
[10:44:58] apeiros: hm, should be all caps too
[10:45:24] demonlove: has joined #ruby
[10:45:28] Azure|dc: has joined #ruby
[10:46:10] demonlove: m starting the documnetation of ruby but got confused about it
[10:46:26] demonlove: it seems to be an virtuoso task
[10:47:08] apeiros: demonlove: by "starting the documentation", you mean "reading the documentation"?
[10:47:29] jhass: let's back up a level
[10:47:33] jhass: is there a question?
[10:48:08] FalseDeal: has left #ruby: ("WeeChat 1.3")
[10:48:29] demonlove: m starting from scratch
[10:48:29] demonlove: ya reading the fooloeing link eg. https://github.com/documenting-ruby/ruby/blob/trunk/object.c#L2624-2675
[10:49:17] demonlove: how do a beginner would dive in such a complex thing, cant u have an easy step for noobs
[10:49:49] apeiros: that's not the documentation of ruby, demonlove
[10:49:52] apeiros: that's the source :D
[10:50:18] FalseDeal: has joined #ruby
[10:50:33] demonlove: i mean aexample of well documnetation
[10:52:16] jgpawletko: has joined #ruby
[10:52:20] apeiros: demonlove: if your target is to read ruby core's documentation, then that's indeed quite daunting.
[10:52:23] demonlove: if i want to do documentation in Classes/Modules which lack documentation Profile, Profiler , then how do i get started
[10:52:33] apeiros: you can find it on http://ruby-doc.org/core-2.2.3/
[10:52:46] apeiros: you want to write documentation?
[10:52:55] jhass: http://documenting-ruby.org/ has some guides
[10:53:23] shevy: demonlove I think drbrain also has a documentation-movement going
[10:53:30] jhass: I think I just linked it
[10:53:44] demonlove: yeah i want to write docu aperios
[10:54:22] bkxd: has joined #ruby
[10:55:10] Ox0dea: demonlove: Writing good documentation requires a certain attention to detail.
[10:56:19] demonlove: shevy who is drbrain?
[10:56:25] jhass: fine, ignore me
[10:56:30] Ox0dea: /ignore add jhass
[10:56:34] UtkarshRay: has joined #ruby
[10:56:59] shevy: demonlove he is here on IRC
[10:57:07] demonlove: Ox0dea: certain attention to detail like?
[10:57:33] shevy: an ancient ruby hacker
[10:58:23] Ox0dea: demonlove: I trust you realize you'll need to understand the code before you endeavor to document it?
[10:58:36] KINGSABRI: has joined #ruby
[10:59:06] demonlove: means i have to read whole bunch of things from http://ruby-doc.org/core-2.2.3/
[10:59:16] demonlove: including sublinks too
[11:01:13] devoldmx: has joined #ruby
[11:01:21] sdothum: has joined #ruby
[11:03:09] isxek: has joined #ruby
[11:04:25] Scripore: has joined #ruby
[11:07:04] Ox0dea: demonlove: Well, take Profiler, for instance. Do you know enough about how it works that you could accurately document it?
[11:07:58] demonlove: no but where do i get its litreture part
[11:08:31] jhass: it's what?
[11:09:09] Ox0dea: demonlove: Anyway, Profiler isn't completely barren, documentation-wise. Start with Yielder. :P
[11:09:10] Ox0dea: http://ruby-doc.org/core-2.2.3/Enumerator/Yielder.html
[11:09:32] sevenseacat: I'm kind of enjoying this conversation.
[11:09:39] p7r: "I do no understand Ruby source or the existing documentation, so I'm going to write some documentation" <- can't fail as a plan :)
[11:09:46] Ox0dea: It's genius!
[11:09:51] Ox0dea: Meritocracy be damned.
[11:09:52] jhass: sevenseacat: just got new popcorn reserves, eh?
[11:10:27] isxek: Is there a built-in unit testing module in Ruby v2.2's standard library?
[11:10:46] Ox0dea: >> require 'minitest' # isxek
[11:10:46] isxek: Need to test a small script
[11:10:47] ruboto: Ox0dea # => (https://eval.in/428406)
[11:11:06] Ox0dea: Well, that didn't go as planned.
[11:11:34] isxek: 0x0dea: that's the same as this one (https://rubygems.org/gems/minitest/), right?
[11:11:36] jhass: yeah, dunno why charlie whitelists stdlib requires
[11:11:41] Ox0dea: isxek: Oui.
[11:11:51] isxek: 0x0dea: thanks!
[11:11:55] Ox0dea: Happy to help.
[11:12:17] atom3: has joined #ruby
[11:12:23] demonlove: Ox0dea: need more guide on your sent link
[11:12:32] Ox0dea: isxek: Run `gem list` to see what other goodies come standard.
[11:12:55] jhass: demonlove: how did you end up on this endeavor?
[11:12:56] demonlove: nothing has been writteen there except about mailing list
[11:13:09] isxek: 0x0dea: ah, there it is
[11:13:19] psye: has joined #ruby
[11:13:49] Ox0dea: demonlove: Yes, isn't that what you mean to fix?
[11:14:10] jhass: I think I really am on their ignore list :D
[11:14:41] Ox0dea: demonlove: https://github.com/ruby/ruby/blob/trunk/enumerator.c
[11:14:48] Ox0dea: There are no :nodoc:s in there; have fun?
[11:14:50] demonlove: I am not seeing any code and its working there how to get it
[11:14:53] Ox0dea: *nine :nodoc:s
[11:15:02] stamina: has joined #ruby
[11:15:29] failshell: has joined #ruby
[11:16:45] Ox0dea: demonlove: You're not seeing any code because Yielder's implementation methods have explicit :nodoc: tags. Find them and replace them with thorough explanations of what they do, and don't forget to include examples.
[11:17:26] dionysus69: has joined #ruby
[11:18:04] demonlove: how do you find no doc tag, is it on git?
[11:18:30] jhass: Ox0dea: I think you're being trolled
[11:18:41] jhass: maybe not intentionally, but still...
[11:18:59] Ox0dea: jhass: Hanlon's razor feels right on this one. :/
[11:19:43] jonnie: has joined #ruby
[11:19:45] quazimodo: has joined #ruby
[11:23:04] fgo: has joined #ruby
[11:23:15] demonlove: https://github.com/ruby/ruby/blob/trunk/enumerator.c means i have to understand the functionality of code written on this page then make litrature on that
[11:23:27] Ox0dea: That's right.
[11:23:56] Ox0dea: demonlove: That is, if you intend to contribute documentation where none previously existed.
[11:24:09] Ox0dea: You might consider biting off something a little smaller and attempt to improve existing documentation?
[11:25:26] demonlove: can u give an example
[11:26:10] Ox0dea: Of bad documentation in Ruby core?
[11:27:20] demonlove: biting off something means going through whole code right?
[11:28:00] demonlove: also give an exmple of bad documentation in ruby?
[11:29:01] The_Phoenix: has joined #ruby
[11:29:04] sarkyniin: has joined #ruby
[11:29:05] howdoi: has joined #ruby
[11:29:27] gizmore: demonlove: that??s easy... but can you give an example of good documentation? (troll kiddings)
[11:29:59] gizmore: (i am currently upset of my own bad code) *sorry
[11:32:09] bruno-: has joined #ruby
[11:33:02] symm-: has joined #ruby
[11:33:07] moeabdol: has joined #ruby
[11:35:25] Ox0dea: >> Enumerable.instance_methods.include? :uniq
[11:35:26] ruboto: Ox0dea # => false (https://eval.in/428408)
[11:36:23] rickmasta: has joined #ruby
[11:38:08] shapeshifter: has joined #ruby
[11:39:21] shapeshifter: Question about capistrano: When using 2 stages (staging, production), can I put common settings in config/deploy.rb and stage-specific settings in config/deploy/{staging.rb,production.rb} ? Like, say, set :unicorn_env, "staging" would go in config/deploy/staging.rb ?
[11:40:25] ghr: has joined #ruby
[11:40:58] shapeshifter: And to follow up, is this generally the case with any config? I.e. can I put common unicorn stuff in config/unicorn.rb and stage-specific stuff in config/unicorn/{staging.rb,production.rb} ? For example, I need a stage-specific app_path for unicorn, so can I put it in config/unicorn/staging.rb ? The app_path variable is used in config/unicorn.rb as well. So I'm not sure which is read first
[11:41:25] jhass: mmh, there's a #capistrano
[11:41:50] shapeshifter: Thanks, I'll try ask over there.
[11:48:23] shmilan: has joined #ruby
[11:50:12] FalseDeal: has joined #ruby
[11:50:26] symbol: has joined #ruby
[11:52:56] m8: has joined #ruby
[11:53:58] solocshaw: has joined #ruby
[11:54:15] juanpablo____: has joined #ruby
[11:55:02] alqahtani: has joined #ruby
[11:59:57] last_staff: has joined #ruby
[12:01:10] astrobun_: has joined #ruby
[12:03:10] greenbigfrog: has left #ruby: ()
[12:03:54] khebbie: has joined #ruby
[12:04:33] iateadonut: has joined #ruby
[12:07:57] segmond: has joined #ruby
[12:13:13] tknz: has joined #ruby
[12:13:36] shevy: gizmore you must write beautiful code!
[12:14:08] emba: has joined #ruby
[12:14:27] gizmore: i am oscillating between hurting myself and starting over with the project
[12:14:31] emba: morning everyone? any expert in Ruby to explain me a bit of code?
[12:14:35] gizmore: yeah, here!
[12:14:47] emba: http://www.michaelharrison.ws/weblog/?p=163
[12:14:55] gizmore: its rubbish
[12:14:56] emba: natural_numbers = Enumerator.new do |yielder| ...
[12:15:34] emba: natural_numbers = Enumerator.new do |yielder|
[12:15:35] emba: number = 1
[12:15:36] emba: yielder.yield number
[12:15:38] emba: number += 1
[12:15:45] ghr: has joined #ruby
[12:15:51] havenwood: has joined #ruby
[12:16:06] emba: what does yielder.yield number do exactly
[12:16:07] alqahtani_: has joined #ruby
[12:16:12] failshell: has joined #ruby
[12:16:34] apeiros: ?gist emba
[12:16:34] ruboto: emba, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[12:16:44] apeiros: don't paste long code in here. see topic.
[12:16:56] emba: sorry guy, never again
[12:17:20] shevy: well, .yield calls the method yield
[12:17:39] shevy: number is the argument passed to yield()
[12:17:56] shevy: that looks pretty convoluted to me
[12:18:23] gizmore: the yielder is the argument given to the block?
[12:19:36] shevy: the name of the block variable
[12:19:47] shevy: I dunno why the person who wrote this called it yielder
[12:19:59] emba: https://gist.github.com/embasbm/3424693ce4ae5d38d8bd#file-lazy_iterator-rb
[12:20:06] jhass: shevy: because it's an Enumerator::Yielder
[12:20:32] emba: what makes enumerator yielder has special?
[12:20:37] shevy: awesome docu http://ruby-doc.org/core-2.2.0/Enumerator/Yielder.html
[12:20:40] firstdayonthejob: has joined #ruby
[12:20:46] jhass: shevy: Enumerator covers it though
[12:21:03] jhass: emba: nothing, it's just an abstraction upon fibers
[12:21:06] shevy: yeah, and people are able to search until they find it...
[12:21:12] emba: shevy that website is empty
[12:21:17] shevy: emba indeed!
[12:22:00] shevy: emba jhass wrote that it's in Enumerator, let's see
[12:22:14] shevy: http://ruby-doc.org/core-2.2.0/Enumerator.html
[12:22:32] shevy: it's at: "new(size = nil) { |yielder| ... }"
[12:22:38] shevy: almost the very same example
[12:22:49] shevy: without .yield
[12:22:53] jenrzzz: has joined #ruby
[12:23:03] jhass: #yield and #<< are aliases
[12:23:49] shevy: so y << a should be y.yield a, and if y is called yielder, then it should be yielder.yield a
[12:24:09] fgo: has joined #ruby
[12:24:17] emba: it would be really nice if http://ruby-doc.org/core-2.2.0/Enumerator/Yielder.html had something
[12:24:30] shevy: yeah, at least a link to the other page
[12:25:07] emba: 13:23 shevy: so y << a should be y.yield a, and if y is called yielder, then it should be yielder.yield a -- I like this
[12:26:00] shevy: well how do you invoke your code there?
[12:26:25] shevy: ah you can
[12:26:26] shevy: via .take
[12:26:42] shevy: natural_numbers.take 10 # => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
[12:27:15] shevy: so that code will happily count from 1 up to whatever number you provide. pure awesomeness :P
[12:27:37] bnagy: we can make computers count now?
[12:27:40] workmad3: has joined #ruby
[12:27:42] bnagy: what a time to be alive!
[12:28:15] shevy: even lazy counting
[12:28:41] emba: lazy counting research brought me to that code
[12:28:54] platzhirsch: has joined #ruby
[12:30:06] shevy: ok now what can you do with this
[12:31:32] emba: I'm testing y << a ~ y.yield a
[12:33:19] minotep: has joined #ruby
[12:34:22] emba: shevy +1
[12:34:46] shevy: I think it requires some kind of mental pattern to employ
[12:35:33] Rollabunna: has joined #ruby
[12:35:57] greenbigfrog: has joined #ruby
[12:36:13] greenbigfrog: has left #ruby: ()
[12:37:10] Kallis: has joined #ruby
[12:37:34] moeabdol: hi, I'm using RSpec 3 to try and test if an object recieves a call
[12:37:57] moeabdol: I'm using this syntax expect(my_object).to receive(:method)
[12:38:23] moeabdol: i'm getting 0 times received, although am sure i do receive the call
[12:38:42] moeabdol: can someone help me please and tell me wither the syntax is correct.
[12:39:07] moeabdol: I get confused looking it up as the documentation mostly shows doubles rather than real objects.
[12:39:12] Spami: has joined #ruby
[12:41:32] darkf_: has joined #ruby
[12:41:40] Papierkorb: moeabdol: that's the correct syntax, make sure that it's actually my_object which method is called on
[12:41:52] ebbflowgo: has joined #ruby
[12:42:11] moeabdol: will do Papierkorb ...thanks for the confirmation
[12:42:31] Papierkorb: moeabdol: as hack, just call the method after the expect.
[12:42:39] Papierkorb: moeabdol: then it shouldn't fail
[12:42:43] ebbflowgo: hi, is it possible to combine a jruby and ruby file in one runtime? i have a java file that is run via jruby and a ruby file that i would like to call
[12:42:48] closer: has joined #ruby
[12:43:06] Papierkorb: ebbflowgo: just use jruby for everything in that case?
[12:43:24] havenwood: ebbflowgo: JRuby is already the Ruby programming language on the JVM.
[12:43:26] bkxd: has joined #ruby
[12:43:47] moeabdol: Papierkorb: yes it did work when calling it after the expect...weird!
[12:43:59] Papierkorb: moeabdol: then the test is wrong, or the tested code :)
[12:44:25] moeabdol: Papierkorb: I see....I'll check it out again
[12:44:33] moeabdol: Papierkorb: thanks
[12:44:39] ebbflowgo: havenwood: at this point some of the other libraries I'm using are mri
[12:44:48] havenwood: ebbflowgo: Which libs?
[12:45:17] ebbflowgo: tweetstream
[12:45:18] ebbflowgo: https://github.com/tweetstream/tweetstream
[12:46:12] havenwood: ebbflowgo: JRuby works well with the vast majority of gems. I don't see any C extensions in tweetstream. Have you had trouble?
[12:46:19] Kallis: has joined #ruby
[12:49:38] ledestin: has joined #ruby
[12:51:10] havenwood: ebbflowgo: Seems to work to me. Try a `gem install tweetstream` with JRuby.
[12:51:25] moeabdol: Papierkorb: I tried using expect(obj).to have_received(:call) but then it complains that my object is not a double or a mock
[12:51:28] ebbflowgo: havenwood: possible i wrote too soon, looking into it
[12:51:44] Oog: has joined #ruby
[12:51:47] Papierkorb: moeabdol: now you're using have_received? Why?
[12:52:00] Papierkorb: moeabdol: and, well, "follow screen instructions" if you want to use that version
[12:52:32] CloCkWeRX: has joined #ruby
[12:52:48] shevy: ACTION throws some Papier into Papierkorb 
[12:52:57] moeabdol: Papierkorb: I'm thinking that to receive sounds more like a arrangment rather than an assertion
[12:53:06] platzhirsch: hah shevy, don't abuse it
[12:54:00] Papierkorb: moeabdol: then, "follow screen instructions". If you don't want that, then use the expect() version.
[12:55:20] praveen: has joined #ruby
[12:55:30] jenrzzz: has joined #ruby
[12:55:40] shevy: platzhirsch lol... so many german nicks here ... flughafen too... in the past there also was brotspinne
[12:55:44] CloCkWeRX1: has joined #ruby
[12:56:12] platzhirsch: It's a big pain for my co-workers to pronounce platzhirsch
[12:56:20] moeabdol: Papierkorb: it does work when following screen instructions. Uncle bob would go crazy on this
[12:56:41] ndrei: has joined #ruby
[12:56:44] Soda: has joined #ruby
[12:56:47] ebbflowgo: has left #ruby: ()
[12:58:03] AlexRussia: has joined #ruby
[12:58:42] apt-get_: has joined #ruby
[13:00:04] Spami: has joined #ruby
[13:00:40] AlexRussia: has joined #ruby
[13:02:25] shevy: one day computers will write the software
[13:03:24] yeticry: has joined #ruby
[13:04:03] Salehi: has joined #ruby
[13:04:39] khebbie: has joined #ruby
[13:05:33] symbol: has joined #ruby
[13:05:36] platzhirsch: Nooo *scream*
[13:05:56] praveen: has joined #ruby
[13:06:11] jso: has joined #ruby
[13:06:38] bonhoeffer_: has joined #ruby
[13:07:32] rushed: has joined #ruby
[13:08:23] Guest1603: has joined #ruby
[13:09:30] devoldmx: has joined #ruby
[13:11:48] yeticry: has joined #ruby
[13:12:35] arup_r: has joined #ruby
[13:13:45] davedev24: has joined #ruby
[13:17:04] dionysus69: has joined #ruby
[13:18:53] riotjones: has joined #ruby
[13:19:35] Guest1603: has joined #ruby
[13:19:54] nfk: has joined #ruby
[13:20:47] Rollabunna: has joined #ruby
[13:21:34] roshanavand: has joined #ruby
[13:22:17] victortyau: has joined #ruby
[13:22:57] mprelude: has joined #ruby
[13:23:49] skade: has joined #ruby
[13:25:15] Rurik: has joined #ruby
[13:25:19] fgo: has joined #ruby
[13:25:37] mahmoudmahfouz: has joined #ruby
[13:28:05] Spami: has joined #ruby
[13:28:08] sepp2k: has joined #ruby
[13:32:58] einarj: has joined #ruby
[13:34:03] Contigi: has joined #ruby
[13:34:59] [k-: has joined #ruby
[13:36:37] kirun: has joined #ruby
[13:39:00] zenguy_pc: has joined #ruby
[13:39:06] sundhell: has joined #ruby
[13:41:36] TestIrchatNICK: has joined #ruby
[13:43:02] juanpablo____: has joined #ruby
[13:44:15] rbennacer: has joined #ruby
[13:44:16] apeiros: !kick TestIrchatNICK this channel does not exist for your testing purposes
[13:44:18] ruboto: ruboto kicked TestIrchatNICK: channel does not exist for your testing purposes
[13:44:19] ruboto: -o ruboto
[13:44:50] ndrei: has joined #ruby
[13:45:13] khebbie: has joined #ruby
[13:46:06] diegoaguilar: has joined #ruby
[13:46:15] bronson: has joined #ruby
[13:47:37] minotep: has joined #ruby
[13:54:12] IrishGringo: has joined #ruby
[13:54:20] Spami_: has joined #ruby
[13:55:25] atomical: has joined #ruby
[13:56:10] Trynemjoel: has joined #ruby
[14:01:14] ahmetkapikiran: has joined #ruby
[14:03:53] rushed: has joined #ruby
[14:04:43] darkxploit: has joined #ruby
[14:07:07] claptor: has joined #ruby
[14:10:38] slucx: has joined #ruby
[14:10:51] Pupeno: has joined #ruby
[14:14:59] A124: has joined #ruby
[14:15:54] bruno-: has joined #ruby
[14:16:24] workmad3: has joined #ruby
[14:16:46] failshell: has joined #ruby
[14:19:14] tno: has joined #ruby
[14:20:37] minotep: has joined #ruby
[14:20:58] charliesome: has joined #ruby
[14:22:43] jenrzzz: has joined #ruby
[14:24:24] khebbie: has joined #ruby
[14:24:59] failshell: has joined #ruby
[14:26:22] fgo: has joined #ruby
[14:28:39] platzhirsch: has left #ruby: ()
[14:31:13] shevy: I see a lot of gem stubs like this http://www.rubydoc.info/gems/calendar/0.0.1
[14:31:18] shevy: these are skeletons provided by bundler?
[14:31:32] decoponio: has joined #ruby
[14:31:52] Rurik: what is a good resource to learn ruby for someone who has a bit of programming experience
[14:31:56] Rurik: but not much
[14:32:36] ruboto: You can find a list of recommended books at http://ruby-community.com/pages/links
[14:32:43] Cust0sLim3n: has joined #ruby
[14:33:30] shevy: Rurik https://pine.fm/LearnToProgram/chap_01.html it should be very easy, after you read it you can explain what a block is and how it is used, for instance
[14:34:03] Pupeno: has joined #ruby
[14:37:23] modern: has joined #ruby
[14:37:23] modern: has joined #ruby
[14:38:35] Xiti: has joined #ruby
[14:40:09] khebbie: has joined #ruby
[14:41:56] sdwrage: has joined #ruby
[14:41:58] charliesome: has joined #ruby
[14:43:03] ahmetkapikiran: has joined #ruby
[14:45:40] Gribo: has joined #ruby
[14:47:26] rbennacer: has joined #ruby
[14:47:36] komanda3: has joined #ruby
[14:47:44] komanda: ./System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': /Library/Ruby/Gems/2.0.0/gems/ditz-0.5/lib/model.rb:214: multiple assignment in conditional (SyntaxError)
[14:48:53] canton7: you've got a syntax error in your model.rb
[14:49:12] komanda: i'm just tyring to install this
[14:49:13] komanda: https://github.com/jashmenn/ditz
[14:49:37] komanda: sudo gem install ditz
[14:49:41] apeiros: Komanda: seems that gem is broken and you should file a bug
[14:49:54] komanda: i'm not used to ruby
[14:50:10] canton7: this isn't about ruby: this is about the gem author writing a gem which contains a syntax error
[14:50:31] apeiros: and about you going to that github project's issue tracker and open a new ticket
[14:51:40] startupality: has joined #ruby
[14:51:45] komanda: project seems to be updates last 7 years ago
[14:52:02] jhass: better look for an alternative then
[14:52:10] apeiros: ACTION wonders
[14:52:13] apeiros: 19>> if (a, b = *x) then puts "yes" end
[14:52:14] ruboto: apeiros # => /tmp/execpad-7c96216a291a/source-7c96216a291a:2: multiple assignment in conditional (https://eval.in/428429)
[14:52:20] apeiros: 18>> if (a, b = *x) then puts "yes" end
[14:52:20] ruboto: apeiros # => /tmp/execpad-e0e40ee063f2/source-e0e40ee063f2:2: multiple assignment in conditional (https://eval.in/428430)
[14:52:29] komanda: jhass: is there no way to make this project work?
[14:52:41] jhass: 10>> if (a, b = *x) then puts "yes" end
[14:52:42] ruboto: jhass # => /tmp/execpad-aea4c6019214/source-aea4c6019214:4: TypeError: can't modify frozen string (https://eval.in/428431)
[14:52:59] apeiros: Komanda: yes, there is
[14:53:07] apeiros: Komanda: learn ruby, fork the gem, fix the bug
[14:53:14] apeiros: do you want to do that?
[14:54:11] komanda: i'm talking about the ruby ecosystem
[14:54:19] komanda: are there older verisons of the gem that i can try
[14:54:38] ruby-lang852: has joined #ruby
[14:54:44] apeiros: gem search -a gemname
[14:54:49] apeiros: that shows you all versions of the gem
[14:54:59] havenwood: Komanda: What does the gem do?
[14:55:07] apeiros: and gem install -v VERSION gemname installs a specific version
[14:55:19] rushed: has joined #ruby
[14:55:47] apeiros: but I've got my doubts this is wisely spent time. I estimate the chances of success to be rather low.
[14:56:07] cornerma1: has joined #ruby
[14:56:39] komanda: also when i do regular gem install i get
[14:56:43] komanda: ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
[14:56:51] komanda: so i overwrite it with sudo gem install
[14:57:00] komanda: could that have been the cause of the problem?
[14:58:25] komanda: seems like the gem is incompateble with ruby version
[14:58:30] komanda: i have already found this
[14:58:30] komanda: https://github.com/chriskempson/Ditz-for-Ruby-1.9.2
[14:58:57] jenrzzz: has joined #ruby
[14:59:16] based_: has joined #ruby
[15:01:28] havenwood: https://gitlab.com/gitlab-org/gitlab-ce/tree/master#README
[15:01:29] shinnya: has joined #ruby
[15:01:38] failshell: has joined #ruby
[15:02:21] slucx: has left #ruby: ("ERC (IRC client for Emacs 24.5.1)")
[15:04:10] ikbenhet: has joined #ruby
[15:04:39] hydrozen: has joined #ruby
[15:04:42] shevy: Komanda it's usually a bad sign when an author has not updated a project in e. g. 4 years
[15:04:45] pontiki: rehi folks
[15:04:57] shevy: hey tonpikis
[15:04:58] komanda: shevy: hre is some more recent modifications: https://github.com/chriskempson/Ditz-for-Ruby-1.9.2
[15:04:59] shadeslayer: has joined #ruby
[15:05:04] komanda: i'm using ruby 2.0
[15:05:14] komanda: would it work with code written for 1.9.2?
[15:05:20] shevy: Komanda recent? where do you see recent?
[15:05:22] komanda: or do i have to intall older ruby veersion
[15:05:40] komanda: shevy: oh the newer one is also pretty old
[15:05:52] shevy: "Ditz stopped working when I upgraded to Ruby 1.9.2"
[15:05:58] shevy: I guess it never worked on 1.9.2
[15:06:03] shevy: probably comes from the 1.8.x era
[15:06:12] shevy: you could try 1.8.x :)
[15:06:34] pontiki: what is ditz?
[15:06:53] komanda: tiny issue tracker that works nicely with darcs
[15:07:32] alphaatom: has joined #ruby
[15:07:59] [k-: you're a haskeller?
[15:08:08] komanda: not really
[15:08:14] shevy: [k- is a haskeller
[15:08:16] komanda: just prefer the syntax & philosophy
[15:08:48] youngbaks: has joined #ruby
[15:08:52] NeverDie: has joined #ruby
[15:09:46] darkxploit: has joined #ruby
[15:09:49] pontiki: man, now i have ask what darcs is
[15:10:20] jenrzzz: has joined #ruby
[15:10:26] moahny: has joined #ruby
[15:10:32] shevy: it's the monad version control system
[15:10:44] komanda: pontiki: darcs is a distrubited version control system like git
[15:10:50] komanda: but it works with patches
[15:11:10] komanda: patches are the real unit of work & make cherry picking is cheap & reversible
[15:11:22] komanda: wich makes it really nifty
[15:11:39] platzhirsch: has joined #ruby
[15:12:21] Queeniebee: has joined #ruby
[15:12:47] komanda: in my opinion change-centric version control > history-centric version contorl
[15:12:51] komanda: https://www.youtube.com/watch?v=iOGmwA5yBn0
[15:12:55] moeabdol: has joined #ruby
[15:14:17] firstdayonthejob: has joined #ruby
[15:14:30] IrishGringo: has joined #ruby
[15:15:05] mary5030: has joined #ruby
[15:15:48] pontiki: don't care much
[15:16:18] pontiki: vcs my projects/teams use > any other theoretical concern
[15:18:08] ndrei: has joined #ruby
[15:18:51] komanda: what is the best method for a ruby noob to run multiple versions asynchrously?
[15:19:03] komanda: asynchronously*
[15:19:29] n0xff: has joined #ruby
[15:19:30] komanda: can't i just do "brw install ruby -v 1.8" or something?
[15:19:57] FastJack: has joined #ruby
[15:20:15] howdoi: has joined #ruby
[15:20:23] pontiki: rvm/rbenv/chruby are the popular tools to run multiple versions
[15:21:03] yardenbar: has joined #ruby
[15:21:10] komanda: i have rbenv installed now
[15:21:41] j416: Komanda: interesting info, thanks
[15:21:46] dgutierrez1287: has joined #ruby
[15:22:17] komanda: j416: you should play wit darcs for a while, it's really cool :]
[15:22:31] komanda: http://darcs.net
[15:22:55] j416: Komanda: are camp and darcs very conceptually similar?
[15:23:08] codecop: has joined #ruby
[15:23:19] arup_r: has joined #ruby
[15:23:48] havenwood: Komanda: you can `brew tap homebrew/versions` and then `brew install ruby20` or `brew install ruby187`, but keep in mind that 2.0 is in maintenance mode and anything prior is past end-of-life
[15:24:07] komanda: j416: yes similair concepts , darcs is more populair * maintained
[15:24:32] rbennacer: has joined #ruby
[15:24:58] komanda: best tutorial i have found to get started with darcs was this one https://blog.interlinked.org/tutorials/darcs.html
[15:25:01] j416: as for multiple ruby versions on osx, I prefer chruby with ruby-install; it's very simple and it installs everything into $HOME/ so no surprises, if something goes wrong you can just start over
[15:25:03] komanda: havenwood: thanks <#
[15:25:32] emba: has joined #ruby
[15:25:58] havenwood: +1 chruby and ruby-install
[15:26:03] j416: bah so much to learn .. I think I will postpone it indefinitely. thanks :P
[15:26:41] j416: both chruby and ruby-install are in homebrew also
[15:27:00] Mon_Ouie: has joined #ruby
[15:27:26] fgo: has joined #ruby
[15:30:19] komanda: j416: darcs is way easier then git though, all commands you ever need are in this image :] https://blog.interlinked.org/static/images/DarcsCommands.png
[15:30:34] j416: Komanda: that is subjective
[15:31:47] juanpablo____: has joined #ruby
[15:32:04] Mon_Ouie: has joined #ruby
[15:32:10] ruby[bot]: has joined #ruby
[15:33:07] komanda: Pretty sure anyone that has used darcs has to admit that it's cli is simpler & more interactive then any other version control system
[15:33:13] michael_mbp: has joined #ruby
[15:33:18] komanda: but anyways i got ditz working
[15:33:22] komanda: thnaks guys
[15:33:26] komanda: has left #ruby: ("Bye!")
[15:34:31] riotjones: has joined #ruby
[15:34:59] s00pcan: has joined #ruby
[15:36:30] theery: has joined #ruby
[15:39:33] havenn: has joined #ruby
[15:41:11] grotewold: has joined #ruby
[15:41:43] gambl0re: has joined #ruby
[15:43:06] k3asd`: has joined #ruby
[15:43:28] lignux: has joined #ruby
[15:44:47] Deckweiss: has joined #ruby
[15:46:58] alphaatom: has joined #ruby
[15:49:36] hellerbarde2: has joined #ruby
[15:51:11] hydrozen: has joined #ruby
[15:51:19] sumark: has joined #ruby
[15:52:46] dgutierrez1287: has joined #ruby
[15:54:34] tmtwd: has joined #ruby
[15:55:20] bootstrappm: has joined #ruby
[15:55:20] ahmetkapikiran: has joined #ruby
[15:55:44] havenn: good mornin'
[15:55:47] bootstrappm: did you know there's a stackoverflow ruby chat also?
[15:55:52] s1|verfox: has joined #ruby
[15:55:54] bootstrappm: http://chat.stackoverflow.com/rooms/44914/ruby-sometimes-on-rails crazy!
[15:56:13] bootstrappm: havenn: name change?
[15:56:32] Igorshp: has joined #ruby
[15:56:38] theery: has joined #ruby
[15:58:10] Deckweiss: Hey, I have a problem with my ruby code. I get the eval: "(SyntaxError) eval:13: syntax error, unexpected kWHEN when [1,nil]
[15:58:15] Deckweiss: here is the code: http://pastebin.com/s1q8uK6K
[15:58:16] ruboto: Deckweiss, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/d5466bec84e01c761c4d
[15:58:16] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[15:58:36] pranny: has joined #ruby
[15:58:47] apeiros: Deckweiss: case, not switch
[15:59:12] Deckweiss: Oh my bad, I am new to ruby, thanks!
[16:00:14] based_: has joined #ruby
[16:00:33] fgo: has joined #ruby
[16:04:00] darkxploit: has joined #ruby
[16:05:13] workmad3: has joined #ruby
[16:05:41] rushed: has joined #ruby
[16:07:03] jgt: has joined #ruby
[16:07:23] rushed: has joined #ruby
[16:07:23] Kallis: has joined #ruby
[16:07:24] claw: has joined #ruby
[16:08:08] veg: has joined #ruby
[16:09:43] mary5030: has joined #ruby
[16:11:19] arup_r: has joined #ruby
[16:11:31] dgutierrez1287: has joined #ruby
[16:11:33] The_Phoenix: has joined #ruby
[16:12:27] ruby[bot]: has joined #ruby
[16:12:39] claw: has joined #ruby
[16:12:54] based_: has joined #ruby
[16:13:11] krz: has joined #ruby
[16:17:12] jher: has joined #ruby
[16:17:29] emba: has joined #ruby
[16:17:49] northfurr: has joined #ruby
[16:18:19] ruby[bot]: has joined #ruby
[16:18:52] spider-mario: has joined #ruby
[16:19:02] firstdayonthejob: has joined #ruby
[16:20:14] ruby[bot]: has joined #ruby
[16:21:25] esauOp: has joined #ruby
[16:23:56] JDiPierro: has joined #ruby
[16:25:45] ndrei: has joined #ruby
[16:25:56] failshell: has joined #ruby
[16:30:15] Spami: has joined #ruby
[16:32:09] xet7: has joined #ruby
[16:33:06] tmtwd_: has joined #ruby
[16:34:57] Spami_: has joined #ruby
[16:35:59] firstdayonthejob: has joined #ruby
[16:37:50] pranny: has joined #ruby
[16:37:55] linuxboytoo: has joined #ruby
[16:39:53] clarkenciel: has joined #ruby
[16:40:41] nofxx: has joined #ruby
[16:40:41] nofxx: has joined #ruby
[16:42:03] khebbie: has joined #ruby
[16:43:20] theery: has joined #ruby
[16:44:35] Spami: has joined #ruby
[16:45:58] Hrorek: has joined #ruby
[16:46:52] nofxx: has joined #ruby
[16:46:52] nofxx: has joined #ruby
[16:47:08] pranny: has joined #ruby
[16:47:32] juanpablo____: has joined #ruby
[16:49:26] aaeron: has joined #ruby
[16:51:42] Spami: has joined #ruby
[16:54:39] yosafbridge: has joined #ruby
[16:55:15] tmtwd_: has joined #ruby
[16:55:17] tmtwd: has joined #ruby
[16:56:21] tjohnson: has joined #ruby
[16:56:29] gguggi: has joined #ruby
[16:56:37] alphaatom: has joined #ruby
[16:58:23] davispuh: has joined #ruby
[16:59:30] jher: has joined #ruby
[17:00:38] diegoaguilar: has joined #ruby
[17:01:41] fgo: has joined #ruby
[17:01:46] bubbys: has joined #ruby
[17:02:16] based_: has joined #ruby
[17:02:46] Spami_: has joined #ruby
[17:07:06] hydrozen: has joined #ruby
[17:07:50] Igorshp: has joined #ruby
[17:10:42] houhoulis: has joined #ruby
[17:11:54] psye: has joined #ruby
[17:11:59] David27: has joined #ruby
[17:13:01] psye: has joined #ruby
[17:13:05] Azure: has joined #ruby
[17:13:07] nanoz: has joined #ruby
[17:13:49] IrishGringo: has joined #ruby
[17:15:57] based_: has joined #ruby
[17:17:20] jenrzzz: has joined #ruby
[17:18:06] roxtrongo: has joined #ruby
[17:18:18] n008f4g_: has joined #ruby
[17:18:26] Rurik: has joined #ruby
[17:18:45] apt-get_: has joined #ruby
[17:18:58] Yzguy: has joined #ruby
[17:19:18] firstdayonthejob: has joined #ruby
[17:19:21] rushed: has joined #ruby
[17:19:30] stuartb: has joined #ruby
[17:20:38] Contigi: has joined #ruby
[17:23:02] baweaver: has joined #ruby
[17:23:47] swgillespie: has joined #ruby
[17:25:27] xet7: has joined #ruby
[17:25:33] mary5030: has joined #ruby
[17:27:31] Swappticon: has joined #ruby
[17:29:20] millerti: has joined #ruby
[17:30:55] djbkd: has joined #ruby
[17:31:16] theery: has joined #ruby
[17:32:32] rodfersou: has joined #ruby
[17:33:23] bronson: has joined #ruby
[17:33:57] jher: has joined #ruby
[17:39:12] failshell: has joined #ruby
[17:39:14] shapeshifter: This is killing me.
[17:40:03] fedexo: has joined #ruby
[17:42:24] shapeshifter: I've set up a rails application for a staging/production deployment with capistrano 3. Problem is, the javascripts and stylesheets assets are not being served. In fact, I don't think they're being generated either. I'm using capistrano/rails to build the assets. I can also see in the capistrano output that *some* assets are built, but not css/js.
[17:42:33] shapeshifter: Gemfile http://ix.io/kDL Capfile http://ix.io/kDM capistrano output when building assets http://lpaste.net/687490209570357248 and for example, all.css isn't getting served/built. If I look for it in current, this is all I find: http://lpaste.net/2083613541528502272
[17:42:38] ndrei: has joined #ruby
[17:42:52] shapeshifter: I don't get it. Nothing makes sense anymore.
[17:45:09] moeabdol: has joined #ruby
[17:45:18] Scripore: has joined #ruby
[17:46:21] rehat: has joined #ruby
[17:47:21] yardenbar: has joined #ruby
[17:47:31] dorei: has joined #ruby
[17:48:54] Rurik: has joined #ruby
[17:51:00] vmatiyko: has joined #ruby
[17:52:39] jhass: ?crosspost shapeshifter
[17:52:39] ruboto: shapeshifter, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
[17:53:13] bootstrappm: shapeshifter: I haven't used Capistrano for a whiiile but I'd double check to make sure you have node installed and that the capistrano recipe does in fact do `bin/rake assets:precompile`
[17:53:17] jhass: (re. crosspost to #RubyOnRails)
[17:53:45] alphaatom: has joined #ruby
[17:53:58] workmad3: has joined #ruby
[17:54:56] Exuma: has joined #ruby
[17:55:09] Narzew: has joined #ruby
[17:55:25] alphaatom: has joined #ruby
[17:55:33] jher: has joined #ruby
[17:57:45] symm-: has joined #ruby
[17:58:30] swgillespie: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[17:58:57] JBrickley: has joined #ruby
[17:59:49] Spami: has joined #ruby
[18:01:22] shapeshifter: jhass: thanks for the hint, I'll report if I get advice in other channels.
[18:02:02] theery: has joined #ruby
[18:02:21] shapeshifter: bootstrappm: node is installed and I'm sure capistrano does rake assets:precompile because I see some assets are compiled. The same ones which are compiled when I run the command manually on the server.
[18:02:49] fgo: has joined #ruby
[18:03:08] arup_r: has joined #ruby
[18:03:20] hydrozen: has joined #ruby
[18:03:45] xxneolithicxx: has joined #ruby
[18:04:01] JBrickley: has joined #ruby
[18:05:48] diegoaguilar: has joined #ruby
[18:07:22] Mon_Ouie: has joined #ruby
[18:08:01] esauOp: has joined #ruby
[18:08:09] jenrzzz: has joined #ruby
[18:08:34] roxtrongo: has joined #ruby
[18:09:08] diegoaguilar: has joined #ruby
[18:09:21] Azure: has joined #ruby
[18:10:50] northfurr: has joined #ruby
[18:15:19] jenrzzz: has joined #ruby
[18:15:56] fernandezpablo: has joined #ruby
[18:16:15] fernandezpablo: has left #ruby: ()
[18:16:47] yasha0x80: has joined #ruby
[18:17:55] yourname1: has joined #ruby
[18:18:32] devbug: has joined #ruby
[18:18:50] tejasmanohar: has joined #ruby
[18:19:22] tejasmanohar: how do i source a file (like shell `source .env`) in ruby
[18:19:30] tejasmanohar: `source .env` seems to not be working as expected O.o
[18:20:45] apeiros: you can't change the env of a parent process
[18:20:54] apeiros: no matter which language
[18:20:57] balazs: has joined #ruby
[18:21:29] baweaver: why would you want to?
[18:21:44] tejasmanohar: doing something similar to ruby's dotenv... except in a code sandbox
[18:21:58] tejasmanohar: want to read some text from a file into a variable
[18:22:15] tejasmanohar: i have control of what the text file can say... dynamically
[18:23:07] tejasmanohar: know how i can read something like "var=5" into a variable `var` set to `5`?
[18:23:33] tejasmanohar: (read something as in from a file... or just a string, i know how to get string of file etc)
[18:23:44] vmatiyko: has joined #ruby
[18:24:06] mprelude: has joined #ruby
[18:24:54] ponga: has joined #ruby
[18:26:30] gambl0re: anybody here use haml?
[18:26:40] northfurr: has joined #ruby
[18:26:48] apeiros: tejasmanohar: sounds like you want YAML
[18:27:13] apeiros: ?anyone gambl0re
[18:27:13] ruboto: gambl0re, Just ask your question, if anyone has or can, they will respond.
[18:28:26] Blaguvest: has joined #ruby
[18:30:28] an0ma1y: has joined #ruby
[18:30:34] segfalt: has joined #ruby
[18:31:54] ellisTAA: has joined #ruby
[18:32:02] emba: has joined #ruby
[18:32:15] roxtrongo: has joined #ruby
[18:32:25] based_: has joined #ruby
[18:33:30] ellisTAA: i???m trying to put an instance of a elevatorbank class into my @banks array, it says @banks is nil, i???m guessing bc of attr_accessor it is a method ??? but even when i get rid of the banks attr_accessor it still gives me the same error ??? https://gist.github.com/ellismarte/9c622dafc1cd0f747c7c#file-elevator-rb-L47
[18:33:35] jenrzzz: has joined #ruby
[18:34:03] NeverDie_: has joined #ruby
[18:34:53] fairyeye: has joined #ruby
[18:35:06] ellisTAA: anyone know why
[18:35:14] minimuffins: has joined #ruby
[18:35:53] apeiros: EllisTAA: the problem is not in your gisted code
[18:35:58] maokomioko: has joined #ruby
[18:36:01] apeiros: I assume you set it to nil somewhere outside
[18:36:18] juanpablo____: has joined #ruby
[18:36:46] ellisTAA: apeiros: i included everything in that file. i am using coderpad which in my experience kinda sucks
[18:37:15] apeiros: you initialize @banks *after* callink bank()
[18:37:42] ellisTAA: oh god damnit
[18:38:08] ellisTAA: apeiros: could you comment on my oo design?
[18:38:24] apeiros: EllisTAA: not really in the mood, sorry. not related to you.
[18:38:39] ellisTAA: no worries, thanks for your help though :) feel better
[18:39:06] Mendenhall: has joined #ruby
[18:40:13] gambl0re: how do i write <div class="alert alert-<%=k%>"><%=v%></div> in haml?
[18:41:14] fairyeye: excuse me, how can i get the ruby 2.2.3, i used 'rvm list known' ,just see 2.2[.1]
[18:41:45] gambl0re: yes i got it!!!
[18:42:44] krz: has joined #ruby
[18:42:45] IrishGringo: has joined #ruby
[18:44:20] khebbie: has joined #ruby
[18:44:24] ruboto: Just ask your question, if anyone has or can, they will respond.
[18:44:51] gambl0re: i'll do it for you n****s & do it for myself...
[18:45:34] apeiros: gambl0re: if that's supposed to be funny - it's not. and it's not welcome here.
[18:45:49] Caius: has joined #ruby
[18:45:57] ehth77: has joined #ruby
[18:46:07] nofxx: gambl0re, .alert{ class: "alert-#{k}" }
[18:46:28] apeiros: fairyeye: you can just `rvm install 2.2.3`, even if it's not in the list
[18:47:26] gambl0re: .alert{:class => "alert-#{k}"}= v
[18:47:28] gambl0re: that worked for me
[18:50:43] segfalt_: has joined #ruby
[18:55:04] fairyeye: apeiros: it's ok. thx.
[18:55:59] LostandConfused0: has joined #ruby
[18:56:48] LostandConfused0: I'm teaching myself some Ruby, and I have some questions regarding the behavior of arrays. Anyone willing to sit down and exchange a few pms with me?
[18:58:25] apeiros: LostandConfused0: if nobody volunteers (which isn't too unlikely) - just ask in the channel
[18:58:50] stamina: has joined #ruby
[19:01:38] LostandConfused0: Honestly its extremely basic. I have about 3 hours of coding experience with Ruby, so my access to functions is limited. I have discovered that I can call on a specific letter in a string, just as if the string was an array. word=Moron puts(word[0]) prints M. However, this doesn't appear to work when the call is a variable puts(word[x])
[19:01:51] FalseDeal: has joined #ruby
[19:01:54] diegoaguilar: has joined #ruby
[19:02:09] LostandConfused0: Im curious as to why.
[19:02:47] blue_deref: has joined #ruby
[19:02:48] apeiros: it does work. so if it doesn't work, something about your code differs from what you think it is
[19:03:03] apeiros: >> word = "beginner"; index = 0; puts word[index]
[19:03:04] ruboto: apeiros # => b ...check link for more (https://eval.in/428538)
[19:03:17] pontiki: skip the 'puts', apeiros
[19:03:53] fgo: has joined #ruby
[19:03:56] apeiros: pontiki: I'm sticking to their code (tho, should have used x instead of index)
[19:04:36] apeiros: but yeah, I want to improve the eval plugin to ignore return value if it's nil and there's stdout.
[19:05:00] phatypus: has joined #ruby
[19:05:09] apeiros: also some other scenarios. but not yet sure how to do it properly and got other more pressing things to do :)
[19:06:03] ZeeNoodleyGamer: has joined #ruby
[19:06:18] LostandConfused0: I havent been exposed to variable checking, either for nil, or string, or int. I assume there is a call function to ask what type of variable is being stored in a given variable
[19:07:42] apeiros: `p variable` will print the content of variable in an inspectable format
[19:08:04] apeiros: `p variable.class` will tell you the class of the object referenced by variable (and a variable always references an object in ruby)
[19:08:12] tmtwd_: has joined #ruby
[19:09:20] dfinninger: has joined #ruby
[19:09:29] tmtwd: has joined #ruby
[19:09:33] majjoha: has joined #ruby
[19:09:41] cajone: has joined #ruby
[19:10:06] emba: has joined #ruby
[19:10:15] clarkenciel: has joined #ruby
[19:14:08] fairyeye: which one do you like better in mac, launched or foreman?
[19:15:28] northfurr: has joined #ruby
[19:16:10] Swappticon: has joined #ruby
[19:17:56] Scripore: has joined #ruby
[19:19:38] Scripore: has joined #ruby
[19:22:46] Rurik: has joined #ruby
[19:23:04] northfurr: has joined #ruby
[19:24:03] omninonsense: has joined #ruby
[19:25:29] rickmasta: has joined #ruby
[19:25:31] failshell: has joined #ruby
[19:25:43] dotix: has joined #ruby
[19:28:19] dotix: has joined #ruby
[19:29:45] Rodya_: has joined #ruby
[19:29:59] hydrozen: has joined #ruby
[19:31:21] LostandConfused0: I've been using puts("") as a line break in the code's export. Is there a better way to accomplish this?
[19:31:44] yasha0x80: has joined #ruby
[19:31:53] Cust0sLim3n: has joined #ruby
[19:32:20] theery_: has joined #ruby
[19:32:32] LostandConfused0: export shouldve been "output" <_>
[19:33:46] toretore: just `puts` without any arguments will print a newline
[19:35:16] ehth77: has joined #ruby
[19:36:00] LostandConfused0: Cool. One more while I'm at it. can I print the variables of an array without forcing linebreaks?
[19:36:29] shevy: your question gave the answer, it's print
[19:37:04] shevy: if you are very lazy, you can alias puts and print; alias e puts; alias ee print; now you can use e and ee instead
[19:38:17] meatherly: has joined #ruby
[19:39:18] bruno-: has joined #ruby
[19:39:19] dseitz: has joined #ruby
[19:39:37] fxn: has joined #ruby
[19:40:03] LostandConfused0: I know the notations are ##, but I recall there being a multiline notation as well. I was going to use google but someone here might be faster
[19:40:47] Mon_Ouie: =begin and =end
[19:40:57] pranny: has joined #ruby
[19:41:05] shevy: but people like #
[19:41:32] Mon_Ouie: Also =begin and =end have to be at the beginning of the line (there can be no whitespace before them)
[19:41:35] shevy: if you need to temporarily disable a chunk of code for a while, you could add a "if false", and indent it to the most left, so that it can stand out
[19:41:38] ohaibbq: has joined #ruby
[19:41:52] LostandConfused0: Basically, yeah. that is what Im doing
[19:42:25] shevy: I think you will find # not so bad, on average you should not need more than e. g. ~12 lines with '#' as a typical comment
[19:42:26] LostandConfused0: disabling code while I attempt different things.
[19:42:35] shevy: yeah as you break things
[19:42:45] workmad3: has joined #ruby
[19:42:54] bronson: has joined #ruby
[19:43:09] LostandConfused0: I've been having some serious issues with arrays. So I'm step by step figuring out what works and what doesnt
[19:44:22] shevy: you should not have
[19:44:46] shevy: there are three main things - you add data to an array, you remove data to an array, you query data from an array
[19:45:10] arup_r: that's it
[19:45:17] arup_r: Array is easy
[19:45:29] shevy: listen to the one-million-karma man!
[19:45:35] MrFjords: has joined #ruby
[19:45:41] i: has joined #ruby
[19:45:49] meatherly: has joined #ruby
[19:46:18] arup_r: ACTION hides
[19:47:49] Rurik: has joined #ruby
[19:49:29] jamesaxl: has joined #ruby
[19:49:55] LostandConfused0: My arrays keep giving me code errors. Its because Im attempting to use them in ways they want to be used.
[19:50:02] bruno-: has joined #ruby
[19:50:19] yfeldblum: has joined #ruby
[19:50:35] zenguy_pc: has joined #ruby
[19:50:46] Queeniebee: has joined #ruby
[19:50:52] LostandConfused0: Essentially, I was avoiding string.reverse, and attempting to call on each letter of the string, store them in an array, and then print the array.
[19:50:54] Rurik: has joined #ruby
[19:50:57] diegoaguilar: has joined #ruby
[19:51:07] LostandConfused0: that way I could manipulate the string
[19:52:08] arup_r: do you know ?
[19:52:18] arup_r: >> p "hello".chars
[19:52:18] ruboto: arup_r # => ["h", "e", "l", "l", "o"] ...check link for more (https://eval.in/428549)
[19:53:14] arup_r: >> p "hello".chars.reverse_each.to_a
[19:53:15] ruboto: arup_r # => ["o", "l", "l", "e", "h"] ...check link for more (https://eval.in/428550)
[19:53:25] arup_r: Any thing more LostandConfused0
[19:53:57] LostandConfused0: Yeah. If I wanted to print that array without the array's ["","",""] how would I do that?
[19:54:27] LostandConfused0: So if it was ["Good","bad","Worse"] and I wanted it to print as Goodbadworse
[19:54:43] LostandConfused0: or rather output to screen as:
[19:54:47] arup_r: >> ["Good","bad","Worse"].join
[19:54:47] jhass: .join.capitalize
[19:54:48] ruboto: arup_r # => "GoodbadWorse" (https://eval.in/428551)
[19:54:50] shevy: LostandConfused0 in ruby you can combine small methods together
[19:55:03] LostandConfused0: Where can I get a list of those small methods?
[19:55:11] shevy: there are many of them!
[19:55:21] jhass: &ri Array Enumerable String
[19:55:22] `derpy: http://www.rubydoc.info/stdlib/core/Array, http://www.rubydoc.info/stdlib/core/Enumerable, http://www.rubydoc.info/stdlib/core/String
[19:55:22] shevy: you don't want to memorize all of them in one day
[19:55:22] LostandConfused0: I only knew about capitalize, downcase, upcase, length and reverse
[19:55:23] arup_r: :p this is not for me
[19:55:24] jhass: and so on
[19:55:24] roxtrongo: has joined #ruby
[19:55:28] zenguy_pc: has joined #ruby
[19:55:29] monsieurp: LostandConfused0: give pry a go
[19:55:33] monsieurp: LostandConfused0: gem install pry
[19:55:53] omninonsense: has joined #ruby
[19:55:58] ruboto: Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting `binding.pry` directly in your source code. Visit https://pryrepl.org/ or get it now with: gem install pry pry-doc
[19:56:07] shevy: LostandConfused0 you can also alias them if you want to, just as the above example alias e puts, it works for all the other methods too
[19:56:09] arup_r: ?string ruby
[19:56:09] ruboto: ruby, I don't know anything about string
[19:56:17] LostandConfused0: I've been using cloud9 for coding
[19:56:18] arup_r: ok leave it then
[19:56:23] shevy: ruby uses aliases in core too, see .collect being equivalent to .map
[19:56:35] pranny: has joined #ruby
[19:57:14] LostandConfused0: Just curious. is " .+() " using the alias " + " or is that something else?
[19:57:45] shevy: well you actually gave the answer again in the question haha
[19:57:50] LostandConfused0: I'll look into that tonight ruboto, thanks
[19:57:58] shevy: at least, from your method signature, that should be a method invocation
[19:58:03] jhass: 1 + 2 is syntax sugar for 1.+(2) that is invoking the method + on the object 1 passing it the object 2
[19:58:11] jhass: ?justabot
[19:58:11] ruboto: I'm just a bot. You don't need to address me.
[19:58:17] shevy: there you see - jhass gave it: 1.+(2)
[19:58:57] LostandConfused0: I'm very new to this. But it's a lot of fun
[19:59:33] shevy: ruby is so much fun that one can ignore bad docu too!
[20:00:14] LostandConfused0: lol, another word I've never heard
[20:00:17] shevy: well, some part of the official documentation are missing or not of awesome quality; the core things such as String or Array are fine though
[20:00:26] LostandConfused0: Oh documentation
[20:01:05] bluOxigen: has joined #ruby
[20:01:09] slash_nick: shevy was expressing the idea that the documentation was incomplete :P
[20:01:18] LostandConfused0: Yeah, I got that now xD
[20:01:23] LostandConfused0: I also didnt know that
[20:01:29] LostandConfused0: Did they ... lose it?
[20:01:41] shevy: in most cases it was never written in the first place
[20:01:45] jgt: has joined #ruby
[20:01:53] arup_r: humm true
[20:01:57] LostandConfused0: Like somsone just added in some function and decided not to tell anyone?
[20:02:04] shevy: remember you write some C code... then you are tired and don't want to write documentation for 2000 lines of C code
[20:02:16] shevy: LostandConfused0 yeah
[20:02:17] meatherly: has joined #ruby
[20:02:50] symm-: has joined #ruby
[20:03:05] LostandConfused0: That's horrible. xD Its like wasting your time almost, epseically if you forget part, or need somsone elses half/bad answer
[20:03:15] arup_r: How then Python documented each n every thing ?
[20:03:28] slash_nick: >> "#{("docu".length.to_f / "documentation".length)*100}% Complete"
[20:03:29] ruboto: slash_nick # => "30.76923076923077% Complete" (https://eval.in/428552)
[20:03:53] bronson: has joined #ruby
[20:03:55] bubbys: has joined #ruby
[20:04:09] kobain: has joined #ruby
[20:04:17] arup_r: LostandConfused0: You mean Ruby don't have people or people in Ruby are lazy ?
[20:04:31] shevy: LostandConfused0 well, the ruby core stuff is documented decently; also, check out blogs related to ruby, there is a LOT of knowledge stored in these blogs
[20:04:33] LostandConfused0: That's what I'm being told
[20:04:49] LostandConfused0: I'll probably be here alot
[20:04:54] rushed: has joined #ruby
[20:04:57] LostandConfused0: I should make up a usable nickname
[20:04:58] fgo: has joined #ruby
[20:05:26] dotix: command not found: ack
[20:06:07] Ebokian: Are there any blogs that I should just keep up on? idle reading time etc
[20:06:16] shevy: arup_r I dunno... but I think the python guys thought differently about documentation, such as those weird """doc strings""" thingies
[20:06:16] aaeron: has joined #ruby
[20:06:34] northfurr: has joined #ruby
[20:07:34] shevy: one can get documentation in ruby too, like through those show-doc/method-location stuff but it was more an afterthought... .source_location was not in ruby 1.8.x if I remember correctly
[20:09:31] mary5030: has joined #ruby
[20:12:15] yqt: has joined #ruby
[20:13:17] mandarinkin: has joined #ruby
[20:16:48] sivsushruth: has joined #ruby
[20:17:54] omninonsense: has joined #ruby
[20:20:39] esauOp: has joined #ruby
[20:20:49] bronson: has joined #ruby
[20:21:24] pranny: has joined #ruby
[20:21:29] Jardayn: has joined #ruby
[20:21:50] omninonsense: has joined #ruby
[20:22:45] fxn: has joined #ruby
[20:23:06] zenguy_pc: has joined #ruby
[20:25:03] juanpablo____: has joined #ruby
[20:25:52] towski_: has joined #ruby
[20:26:18] stuartb: has joined #ruby
[20:26:22] claptor: has joined #ruby
[20:26:50] firstdayonthejob: has joined #ruby
[20:29:10] zenguy_pc: has joined #ruby
[20:29:58] stuartb: has joined #ruby
[20:30:14] theery: has joined #ruby
[20:31:09] mrtomme_: has joined #ruby
[20:31:17] jimms: has joined #ruby
[20:31:19] Ebokian: What does str mean? I assume Strength, but it is referenced a lot in these string.methods
[20:31:39] Ebokian: ex chomp! "Modifies str in place as described for String#chomp, returning str, or nil if no modifications were made."
[20:32:16] Ebokian: So that command lets me amend a variable with the users entry?
[20:32:21] Scripore: has joined #ruby
[20:32:31] zenguy_pc: has joined #ruby
[20:32:40] toretore: `str` is just the name of a variable, which points to an object of type String
[20:33:37] Ebokian: So its essentially the same thing, but if they fail to enter, instead of returning a "/n" it returns "nil"?
[20:34:15] roxtrongo: has joined #ruby
[20:34:17] Ebokian: chomp and chomp!
[20:34:50] Ebokian: Oh, I guess I'm assuming this in in the context of a gets.chomp
[20:34:56] Ebokian: Which doesnt have to be the case at all.
[20:35:12] toretore: >> "hello\n".chomp
[20:35:13] ruboto: toretore # => "hello" (https://eval.in/428553)
[20:35:48] Gribo: has left #ruby: ("Leaving")
[20:35:49] zenguy_pc: has joined #ruby
[20:35:53] toretore: >> "hello".chomp
[20:35:54] ruboto: toretore # => "hello" (https://eval.in/428554)
[20:38:15] northfurr: has joined #ruby
[20:39:01] segfalt: has joined #ruby
[20:39:04] moeabdol: has joined #ruby
[20:39:32] roshanavand: has joined #ruby
[20:41:25] roxtrongo: has joined #ruby
[20:41:49] shinnya: has joined #ruby
[20:42:19] roshanavand: has joined #ruby
[20:42:22] Mendenhall: whoa that's a cool ruby bot
[20:42:55] Mendenhall: >> "where's the closing tag?
[20:42:56] ruboto: Mendenhall # => /tmp/execpad-c1db724c5b46/source-c1db724c5b46:6:in `raise': exception object expected (TypeError) ...check link for more (https://eval.in/428555)
[20:43:11] jhass: ?experiment Mendenhall ;)
[20:43:11] ruboto: Mendenhall, Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
[20:43:46] n_blownapart: has joined #ruby
[20:43:47] Mendenhall: my bad, I just had to do that at least once
[20:43:52] ruboto: Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting `binding.pry` directly in your source code. Visit https://pryrepl.org/ or get it now with: gem install pry pry-doc
[20:44:04] Mendenhall: oh excellent that's exactly what I needed
[20:44:47] based_: has joined #ruby
[20:46:30] slash_nick: I didn't know most of that
[20:48:04] slash_nick: show-source, exit, and exit-program represents the extent of my knowledge of pry
[20:48:30] Mendenhall: all i care about is tab-completion at this point
[20:51:24] Rurik: I have a question for someone who knows both python and ruby
[20:52:12] Rurik: in python if you do 5 * 'foo' it gives you the intended result
[20:52:30] toretore: >> 'foo' * 5
[20:52:31] Rurik: but if you do the same in ruby it throws an error
[20:52:31] ruboto: toretore # => "foofoofoofoofoo" (https://eval.in/428556)
[20:52:51] Rurik: toretore, the other way
[20:53:03] Rurik: >> 5 * 'foo'
[20:53:04] ruboto: Rurik # => String can't be coerced into Fixnum (TypeError) ...check link for more (https://eval.in/428557)
[20:53:04] toretore: "intended result" is subjective
[20:53:27] Scripore: has joined #ruby
[20:53:43] Stalkr_: has joined #ruby
[20:54:16] shevy: Rurik these are method calls
[20:54:36] Stalkr_: Anyone using Grape? How would you do array params, is the easiest just ?group[]=example&group[]=another
[20:56:10] alphaatom: has joined #ruby
[20:56:50] Rurik: shevy, something like .*(int)
[20:56:51] jhass: Rurik: That's because String#* can take a Fixnum but Fixnum#* cannot
[20:57:00] jhass: take a String
[20:57:07] havenwood: has joined #ruby
[20:57:14] jhass: &ri String#* Fixnum#*
[20:57:14] `derpy: http://www.rubydoc.info/stdlib/core/String#%2A-instance_method, http://www.rubydoc.info/stdlib/core/Fixnum#%2A-instance_method
[20:57:15] Mendenhall: that's interesting behavior
[20:57:24] jhass: valid syntax even
[20:57:24] Rurik: >> 5.*(5)
[20:57:25] ruboto: Rurik # => 25 (https://eval.in/428560)
[20:57:38] roshanavand: has joined #ruby
[20:58:19] Rurik: i gotta find out what python does differently that both 5 * 'foo' and 'foo' * 5 work
[21:00:09] toretore: >> class Fixnum; def @*(s); if s.is_a?(String); s * self; else; super; end;end; end; 5 * 'foo'
[21:00:10] ruboto: toretore # => /tmp/execpad-d02f840849e9/source-d02f840849e9:2: `@*' is not allowed as an instance variable name ...check link for more (https://eval.in/428561)
[21:00:14] jhass: Probably Integer.__multi__ or whatever it is handles strings
[21:00:26] jhass: toretore: no @
[21:00:27] toretore: >> class Fixnum; def *@(s); if s.is_a?(String); s * self; else; super; end;end; end; 5 * 'foo'
[21:00:28] ruboto: toretore # => /tmp/execpad-04f0724508ed/source-04f0724508ed:2: `@(' is not allowed as an instance variable name ...check link for more (https://eval.in/428562)
[21:00:36] Renich: has joined #ruby
[21:00:39] toretore: >> class Fixnum; def *(s); if s.is_a?(String); s * self; else; super; end;end; end; 5 * 'foo'
[21:00:40] ruboto: toretore # => "foofoofoofoofoo" (https://eval.in/428563)
[21:01:11] toretore: what it does differently is to not give you an error when you give it a string
[21:01:27] Renich: has joined #ruby
[21:02:19] Kallis: has joined #ruby
[21:02:25] jgt: has joined #ruby
[21:02:27] Mendenhall: so really it boils down to language design differences
[21:03:08] Mendenhall: i wonder if there was arguments about whether or not ruby's string*integer method should be commutative
[21:04:16] toretore: then you'd have people getting user input as "5" and doing `5 * "5"` getting "55555"
[21:04:48] toretore: then someone says "well, then it should guess if it's a number or not and cast it in that case"
[21:06:04] fgo: has joined #ruby
[21:06:23] jher: has joined #ruby
[21:06:57] shevy: would "5" * 5 yielding "55555" really make a lot of sense?
[21:07:10] nofxx: I always write `5 * "5"` to receive a error and reverse it. In my brain "five times '1' is '11111'" is it because english ain't my mother tongue?
[21:07:35] nofxx: I mean, don't you? five times 5 or 5 five times
[21:07:44] toretore: you have to remember which is the receiver
[21:08:01] toretore: the operation is being done to the receiver, i.e. the left side
[21:08:19] dcas: has joined #ruby
[21:08:25] toretore: so you're asking a string to "multiply yourself 5 times"
[21:08:27] nofxx: toretore, good mnemonic to use
[21:08:39] snath: has joined #ruby
[21:08:42] nofxx: or rationale
[21:08:49] toretore: asking an integer to "multiply yourself "5" times" doesn't really make sense
[21:09:02] toretore: and it is most likely to be done in error
[21:09:15] toretore: i.e. user input
[21:10:42] JDiPierro: has joined #ruby
[21:10:46] majjoha: has joined #ruby
[21:11:06] dcas: has joined #ruby
[21:11:37] nofxx: Anyone using ruby & ruby-electric and emacs is lately completing 'do' with 'DOC' ? Before it opened a line and appended 'end'.
[21:14:59] shevy: come to notepad man
[21:17:12] ndrei: has joined #ruby
[21:18:22] towski_: has joined #ruby
[21:18:30] diprotic: has joined #ruby
[21:18:47] diprotic: has joined #ruby
[21:20:23] nofxx: shevy, running on wine?
[21:20:33] ndrei: has joined #ruby
[21:20:35] shevy: it is possible!
[21:22:36] pranny: has joined #ruby
[21:22:38] kobain: has joined #ruby
[21:22:58] ghr: has joined #ruby
[21:23:06] houhoulis: has joined #ruby
[21:23:29] kobain: has joined #ruby
[21:24:26] kobain: has joined #ruby
[21:25:49] juanpablo____: has joined #ruby
[21:26:14] failshell: has joined #ruby
[21:26:27] GnuYawk: has joined #ruby
[21:29:14] emba: has joined #ruby
[21:30:31] phutchins: has joined #ruby
[21:30:46] cajone: has joined #ruby
[21:31:26] workmad3: has joined #ruby
[21:31:26] yashinbasement: has joined #ruby
[21:34:01] B5X: has joined #ruby
[21:35:40] FalseDeal: has left #ruby: ("WeeChat 1.3")
[21:36:23] jenrzzz: has joined #ruby
[21:38:56] rushed: has joined #ruby
[21:42:41] tubuliferous_: has joined #ruby
[21:43:09] leafybasil: has joined #ruby
[21:43:40] Scripore: has joined #ruby
[21:44:02] quimrsto_: has joined #ruby
[21:45:01] moeabdol: has joined #ruby
[21:45:45] leafybas_: has joined #ruby
[21:46:25] Rurik: has joined #ruby
[21:46:53] snath: has left #ruby: ("Leaving")
[21:47:37] roxtrongo: has joined #ruby
[21:47:39] jenrzzz: has joined #ruby
[21:47:42] apt-get: has joined #ruby
[21:50:29] quimrsto_: has joined #ruby
[21:51:13] bronson: has joined #ruby
[21:51:59] DeweyD: has joined #ruby
[21:52:02] nahtnam: has joined #ruby
[21:53:13] DeweyD: has left #ruby: ()
[21:53:57] eightfold: has joined #ruby
[21:54:43] Scripore: has joined #ruby
[21:55:09] pontiki: nofxx: i use yasnippet, so haven't noticed that
[21:57:04] tmtwd_: has joined #ruby
[21:57:52] rickmasta: has joined #ruby
[21:59:34] Scripore: has joined #ruby
[21:59:50] jamesaxl|2: has joined #ruby
[22:02:00] decoponio: has joined #ruby
[22:02:40] JDiPierro: has joined #ruby
[22:03:13] jgt: has joined #ruby
[22:03:49] dc_: has joined #ruby
[22:06:42] Scripore: has joined #ruby
[22:07:17] fgo: has joined #ruby
[22:12:09] ellisTAA: has joined #ruby
[22:14:39] dc_: has joined #ruby
[22:15:53] yashinbasement: has joined #ruby
[22:16:34] jenrzzz: has joined #ruby
[22:19:55] barhum2013: has joined #ruby
[22:22:46] Rodya_: has joined #ruby
[22:25:24] AlexAltea: has joined #ruby
[22:27:14] failshell: has joined #ruby
[22:27:15] Rollabunna: has joined #ruby
[22:27:32] tejasmanohar: has joined #ruby
[22:28:48] doublemalt__: has joined #ruby
[22:29:41] s00pcan: has joined #ruby
[22:30:43] mary5030: has joined #ruby
[22:31:23] s00pcan: has joined #ruby
[22:31:34] shevy: we use magic here
[22:31:47] s00pcan: has joined #ruby
[22:32:53] WillAmes: has joined #ruby
[22:34:27] wookiehangover: has joined #ruby
[22:34:36] pontiki: SHEVY'S A WITCH!!
[22:37:09] diegoaguilar: has joined #ruby
[22:38:59] phatypus: has joined #ruby
[22:39:47] majjoha: has joined #ruby
[22:40:25] devbug_: has joined #ruby
[22:42:46] apt-get_: has joined #ruby
[22:46:37] moeabdol: has joined #ruby
[22:46:39] vF3hNGxc47h8: has joined #ruby
[22:46:48] vF3hNGxc47h8: has joined #ruby
[22:48:08] northfurr: has joined #ruby
[22:48:33] jher: has joined #ruby
[22:52:50] ellisTAA: i???m trying to build an elevator, and i need to give my shafts access to my elevator bank, ??? i???m trying to improve my oo design, can anyone offer a way to give my shaft access it needs? https://gist.github.com/ellismarte/9c622dafc1cd0f747c7c#file-elevator-rb-L96
[22:53:37] craysiii: ACTION points out its queue, not que ;)
[22:54:30] michaeldeol: has joined #ruby
[22:55:08] tejasmanohar: has joined #ruby
[22:56:37] craysiii: so I want to point something out
[22:56:46] ellisTAA: the onlyy thing i can think of is passing in the elevator queue as an argument
[22:56:47] zenguy_pc: has joined #ruby
[22:57:33] shevy: sure you can pass it into the elevator class
[22:58:10] ellisTAA: craysiii: i was going to pass the master queue into the shaft.grab_job
[22:58:33] craysiii: i think its a good attempt, but i think it could be refactored a bit. for example, elevator has .shafts, but a single elevator can only have 1 shaft
[22:58:49] ellisTAA: craysii: can???t an elevator have 3 shafts?
[22:59:16] ellisTAA: http://thumbs.dreamstime.com/z/3-elevator-office-building-21615802.jpg
[22:59:32] craysiii: those are 3 elevators though, in 3 shafts
[22:59:40] Scripore: has joined #ruby
[22:59:44] craysiii: each elevator belongs to a shaft
[22:59:50] craysiii: and now that word looks mispelled :P
[23:00:40] shevy: it is very good to use reallife pictures to model code after!
[23:00:57] craysiii: I would have ElevatorBank be the top class. It has .shafts, and each shaft has an elevator.
[23:01:00] FernandoBasso: has joined #ruby
[23:01:09] shevy: that way you can avoid having a labyrinth of shafts in horizontal position for an elevator that becomes a space ship fighter
[23:01:19] craysiii: shevy don't kill the dream :P
[23:01:30] shevy: and don't forget that one can open and close an elevator too
[23:01:34] ellisTAA: craysiii: that???s a good idea
[23:01:35] northfurr: has joined #ruby
[23:01:56] ellisTAA: craysiii: that???s essentially what i wrote, i just used switched elevator and elevator bank
[23:01:58] shevy: craysiii if construction hasn't been finished then the shaft may not yet contain an elevator
[23:02:05] ellisTAA: every elevator has a bank & shafts
[23:02:13] shevy: and a door!
[23:02:20] ricer: has joined #ruby
[23:02:42] craysiii: each elevator bank consists of an array of tuples (elevator, shaft)
[23:02:53] craysiii: though yes a shaft might not have an elevator
[23:03:01] craysiii: and each shaft may have access to different floors
[23:03:14] yasha0x80: has joined #ruby
[23:03:40] shevy: we have reached a higher level of understanding now
[23:03:43] craysiii: the ElevatorBank should be where the logic goes when someone requests an elevator, which can do some logic to determine which elevator is closest to the request and take into consideration previous requests etc,
[23:04:30] bronson: has joined #ruby
[23:05:10] ellisTAA: yeah i???m working on that atm
[23:05:24] ellisTAA: i think i figured out the logic which awesome
[23:05:38] craysiii: elevator logic is pretty complex
[23:05:48] craysiii: at least for newer systems
[23:08:20] fgo: has joined #ruby
[23:08:41] euoia: has joined #ruby
[23:09:07] roxtrongo: has joined #ruby
[23:10:10] jgt: has joined #ruby
[23:10:55] craysiii: not trying to discourage you though
[23:11:25] ellisTAA: it might not be perfect but i???m satisfied with my design
[23:11:35] duncannz: has joined #ruby
[23:11:45] ellisTAA: it uses a master queue and then 2 ques one for each direction
[23:13:32] FernandoBasso: If I do @name = 'default' inside a class, is it a private property?
[23:14:07] FernandoBasso: Can I do class Person\n @name = 'foo' end and then p = Person.new and finally puts p.name ?
[23:14:20] craysiii: its not private i mean.
[23:14:21] FernandoBasso: I get an error saying there is no method called `name`.
[23:14:34] juanpablo____: has joined #ruby
[23:15:01] craysiii: that doesn't work because you're declaring and assigning an instance variable inside a class definition
[23:15:30] FernandoBasso: That is why I did p = Person.new before doing puts p.name
[23:15:30] craysiii: you could do class Person; def name; "something"; end; Person.new.name
[23:15:39] swgillespie: has joined #ruby
[23:16:19] FernandoBasso: If @name = 'default' is an -instance- variable, why doesn't p = Person.new; puts p.name ?
[23:16:29] FernandoBasso: Isn't p an instance of Person?
[23:17:13] FernandoBasso: You mean I should define a method called `name`?
[23:17:31] craysiii: yeah or an attr_accessor
[23:17:49] craysiii: im not an expert though, and i'd like one to chime in.
[23:17:59] phatypus: has joined #ruby
[23:18:12] towski_: has joined #ruby
[23:18:13] FernandoBasso: I tried finding some documentation on this subject, but I failed to find something that would be really clear about this.
[23:18:42] FernandoBasso: It is like -all- C books I read so far (even K&R). They say "the name of an array is a pointer to its first element".
[23:19:50] FernandoBasso: That is not 100% true. They neglect to explain that it is a -constant- pointer, because you can't do my_array+ for instance.
[23:20:04] jher: FernandoBasso: on the `Foo.new.some_instance_var` that doesn't work because it needs a getter method
[23:20:06] aaeron: has joined #ruby
[23:20:10] workmad3: has joined #ruby
[23:20:19] FernandoBasso: I am kind of seeing similar problem with ruby docs and tutorials about classes, properties and methods.
[23:20:28] FernandoBasso: jher: So, one cannot access a property directly?
[23:20:41] craysiii: hm youre right jher
[23:20:55] jher: You need to make a getter either by hand or by `attr_reader`
[23:20:56] craysiii: i was wrong
[23:21:18] FernandoBasso: jher: What does @name = 'default' really do? Does it create a public property?
[23:22:02] jher: FernandoBasso: could you give me some more context? I kind of just jumped in here
[23:22:15] craysiii: he's talking about declaring instance variable inside a class definition
[23:23:33] FernandoBasso: jher, craysiii: http://sprunge.us/jEMg?ruby
[23:24:11] FernandoBasso: Ah, sprunge.us "ate" the first line that was empty.
[23:24:17] FernandoBasso: So, the error is on line 9.
[23:24:24] sense8: has joined #ruby
[23:24:43] MrFjords: has joined #ruby
[23:24:57] jher: There's a bot in here that can execute code, right?
[23:25:04] jher: > puts "Hello"
[23:25:21] bkxd: has joined #ruby
[23:25:43] craysiii: >> class Person; @name = "default"; def name; @name; end; end; puts Person.new.name
[23:25:43] FernandoBasso: # puts 'hello'
[23:25:44] ruboto: craysiii # => ...check link for more (https://eval.in/428595)
[23:26:07] sense8: has joined #ruby
[23:26:08] jher: So you can do something like this:
[23:26:28] hmsimha_: has joined #ruby
[23:27:33] jher: >> class Foo; attr_accessor :bar; def putbar; p @bar; end; end; @f = Foo.new; @f.bar = "Me"; @f.putbar
[23:27:34] ruboto: jher # => "Me" ...check link for more (https://eval.in/428596)
[23:27:38] craysiii: https://gist.github.com/craysiii/399895296e6582e313a3
[23:27:48] failshell: has joined #ruby
[23:27:54] jher: That might seem a little convoluted on one line, but that's how you do it.
[23:28:34] ghr: has joined #ruby
[23:29:19] FernandoBasso: Thank you both for your help, but I still failed to understand. 1) Does declaring @name = 'default' create a public property? 2) If so, can't it be accessed directly?
[23:30:14] jher: FernandoBasso: @name = 'default' is just an instance variable, but you're able to access it outside of the class when you use attr_accessor :name
[23:30:53] jher: It's a weird Ruby thing, but when you do attr_accessor :foo, then `@foo = self.foo`
[23:31:01] FernandoBasso: An instance variable, but it is neither public nor private (or something), it seems.
[23:32:03] jher: It's not public, it's just accessible
[23:32:04] Mon_Ouie: Instance variables are always private. You can define methods that return an instance variable's value or set it.
[23:32:44] FernandoBasso: But methods are public by default, right?
[23:32:45] garethrees: has joined #ruby
[23:32:55] Mon_Ouie: attr_accessor :foo is a shortcut to write `def foo; @foo; end; def foo=(new_value); @foo = new_value; end'
[23:33:13] FernandoBasso: Well, thank the three of you.
[23:33:28] FernandoBasso: It was incredible difficult to find precise information on this subject.
[23:34:38] FernandoBasso: Perhaps not precise, but understandable.
[23:35:00] jher: This seems to sum it up: https://stackoverflow.com/questions/4370960/what-is-attr-accessor-in-ruby
[23:35:03] FernandoBasso: People neglect to write about some of the details.
[23:35:12] tmtwd: has joined #ruby
[23:35:14] Rodya_: has joined #ruby
[23:36:02] FernandoBasso: jher: You see, "Obviously we never defined method name. Let's do that." When/where the guy makes it clear that ruby will interpret that as a method?
[23:36:52] cengizIO: has joined #ruby
[23:36:53] FernandoBasso: His answer is cool, though.
[23:38:10] weemsledeux: has joined #ruby
[23:38:20] FernandoBasso: And in his example, he didn't define an instance variable like I did, therefore, in his example it is more foreseeable that something will not work.
[23:38:44] FernandoBasso: Also, I was mislead because of the most unclear tutorial about this I could find.
[23:38:54] FernandoBasso: It got me thinking all wrongly about this.
[23:39:08] FernandoBasso: Anyway, I'll keep studying and than you all once more for the help. I really appreciate it.
[23:39:18] grenierm: has joined #ruby
[23:39:22] jher: FernandoBasso: yeah, it always seems ambiguous how attr_accessor relates directly to instance variables
[23:39:30] Mon_Ouie: You can't re-explain the entirety of the language every time you answer a question, you always assume the people you're speaking have *some* level of knowledge
[23:39:48] FernandoBasso: jher: That is true.
[23:39:55] FernandoBasso: Mon_Ouie: That is also true.
[23:40:32] FernandoBasso: Mon_Ouie: But a tutorial explaining something should be more "encompassing".
[23:40:59] FernandoBasso: If you read a tutorial about classes, properties and method, it should be more enlightening, I think.
[23:41:18] FernandoBasso: Still, it could be just me.
[23:41:30] FernandoBasso: Other people could have understood something better than I did.
[23:48:54] bonhoeffer_: has joined #ruby
[23:49:19] shevy: There are not many great tutorials available for ruby
[23:50:06] shevy: FernandoBasso you can sometimes find good information spread out over in several blogs
[23:50:46] cengizIO: Hello there Rubyists. Please accept my warmest greetings from Istanbul, Turkey.
[23:50:52] FernandoBasso: shevy: That is what I have been trying to do. I search for specific things I want/need to learn (and make anki cards out of the stuff I feel I need to memorize)
[23:51:30] shevy: I survived by storing documentation locally
[23:52:30] tmtwd_: has joined #ruby
[23:52:57] FernandoBasso: shevy: I see. I still like trying to memorize some of the stuff.
[23:53:21] shevy: this will become easier the more code you write
[23:53:37] shevy: then it will often just be the chaining together of methods to do what you need
[23:53:52] FernandoBasso: I see now that even if I use attr_accessor or explicit getters/setters, an instance variable cannot be initialized just with @name = 'foo'
[23:53:52] shevy: the various attr* methods just make life simpler but you can do the very same thing via "def" too
[23:54:20] jher: FernandoBasso: I suggest just building an application and learning by example
[23:55:22] FernandoBasso: jher: I learn by example and try to build things. But I hate when I try to use simple methods or do simple things that should be on the tip of my fingers and I can't remember and have to spend time looking it up somewhere.
[23:55:57] jher: FernandoBasso: sometimes that repetition is what it takes
[23:56:13] FernandoBasso: jher: For instance, in JavaScript, str = 'foo'; then str[5] gives `undefined` whereas str.charAt(5) producess '' (an empty string). I like to remember those things from memory.
[23:56:31] shevy: this makes me sad
[23:56:39] FernandoBasso: And somethings I use once while building something, and takes too long until I need it again, which makes me forget it.
[23:56:41] jher: shevy: how so?
[23:56:44] FernandoBasso: Thus, I try to use anki.
[23:56:53] shevy: >> str = 'foo'; str[5]
[23:56:54] ruboto: shevy # => nil (https://eval.in/428600)
[23:57:06] Mon_Ouie: FernandoBasso: @foo = some_value sets the instance variable called @foo of the object currently referenced to by self to some_value
[23:57:14] shevy: it reminds me of the lightning talk about javascript
[23:57:30] Mon_Ouie: From one of your previous examples I??think you may simply be using the instance variables of two different objects
[23:57:46] shevy: https://www.destroyallsoftware.com/talks/wat
[23:59:13] Mon_Ouie: i.e. when you write class Person; @name = "John"; end, you are creating an instance variable for the class itself (which is just a special kind of Ruby object). Instances of that classes that will be created later will not have an instance variable called @name as a result of this.
[23:59:22] FernandoBasso: Mon_Ouie: This just prints an empty line: http://sprunge.us/UOSA?ruby
[23:59:50] Mon_Ouie: >> class Foo; self; end
[23:59:51] ruboto: Mon_Ouie # => Foo (https://eval.in/428601)