« Back to channel list

#ruby - 02 August 2015

« Back 1 day Forward 1 day »
[00:00:13] tejasmanohar: nice work ! :P
[00:01:24] tejasmanohar: got sidetracked looking at airfarewatchdog stuff :P - was writing a scraper to go get all the IATA codes they support for arrival/departure flights
[00:01:58] HoppingMadMan: has joined #ruby
[00:04:31] shevy: Ox0dea I don't even have any Rakefile
[00:04:41] Ox0dea: shevy: Huh?
[00:05:47] HoppingMadMan: has joined #ruby
[00:06:10] Ox0dea: shevy: You could change example.com to a server whose logs you have access to in order to (roughly) determine how many gem installs are automated.
[00:06:30] shevy: I have no server :(
[00:09:23] crdpink2: has joined #ruby
[00:12:52] shevy: Anything faster than Dir.entries ?
[00:14:32] Ox0dea: shevy: readdir(3)
[00:17:15] hahuang61: has joined #ruby
[00:19:16] scrudrv: has joined #ruby
[00:21:33] hashrocket: has joined #ruby
[00:24:22] hahuang61: has joined #ruby
[00:25:12] zacstewart: has joined #ruby
[00:25:36] eggoez: has joined #ruby
[00:25:37] CloCkWeRX: has joined #ruby
[00:25:38] Casty: has joined #ruby
[00:25:44] CloCkWeRX: has left #ruby: ()
[00:27:03] simplyianm: has joined #ruby
[00:30:24] jtdoncas: where's a fun place to work? I'm thinking vancouver... any thoughts?
[00:31:03] monoprotic: has joined #ruby
[00:32:57] tubuliferous: has joined #ruby
[00:33:17] jbw: has joined #ruby
[00:33:25] diegoviola: has joined #ruby
[00:33:30] christiandsg: has joined #ruby
[00:36:02] dogeuira: has joined #ruby
[00:36:54] dorei: has joined #ruby
[00:38:06] funfunctor: has joined #ruby
[00:40:44] cntrx: has joined #ruby
[00:42:29] texasmade: has joined #ruby
[00:45:13] hahuang61: has joined #ruby
[00:46:52] Limix: has joined #ruby
[00:52:59] keen__________34: has joined #ruby
[00:54:00] RegulationD: has joined #ruby
[00:58:39] irctc944: has joined #ruby
[00:59:02] irctc944: hello im having some issues with my code, can anyone help?
[00:59:10] Ox0dea: ?anyone irctc944
[00:59:10] ruboto: irctc944, Just ask your question, if anyone has or can, they will respond.
[00:59:44] irctc944: okay is it okay if its a stackoverflow link? i posted it earlier. just dont wanna type out the whole thing again.
[01:00:14] irctc944: http://stackoverflow.com/questions/31766477/trying-to-do-a-query-session-for-parse/
[01:00:23] casadei_: has joined #ruby
[01:01:54] rickmasta: has joined #ruby
[01:02:14] erichodges: has joined #ruby
[01:02:43] Guest71046: has joined #ruby
[01:02:59] Thomas-0725: has joined #ruby
[01:03:24] dfockler: has joined #ruby
[01:05:19] hahuang61: has joined #ruby
[01:06:58] shevy: looks like rails, the rails guys are on #rubyonrails
[01:10:25] Limix: has joined #ruby
[01:11:29] djbkd: has joined #ruby
[01:11:54] erichodges: getting a syntax error when using this ruby program from Chris Pine:
[01:11:56] erichodges: https://gist.github.com/6a6979380f47a6c8c7fa.git
[01:13:10] Ox0dea: erichodges: There is no syntax error in that program. Are you sure you're running it correctly?
[01:13:33] allcentury: has joined #ruby
[01:13:34] erichodges: I think so, but maybe not
[01:13:50] Ox0dea: erichodges: Well, how are you running it?
[01:13:59] erichodges: I tried locally and via a online ruby
[01:14:06] erichodges: and got the same error
[01:14:30] erichodges: test.rb:1: syntax error, unexpected tIDENTIFIER, expecting end-of-input
[01:14:30] erichodges: if name == 'Chr...pr name:'
[01:14:36] Ox0dea: erichodges: https://eval.in/private/8bb247e4e15dbb
[01:14:41] null_ref: has joined #ruby
[01:15:15] al2o3-cr: erichodges: what does ruby -c test.rb say?
[01:15:41] erichodges: I???ll check thx
[01:16:10] erichodges: it gives the same error
[01:16:29] arooni: has joined #ruby
[01:16:44] Ox0dea: erichodges: Are you on Windows?
[01:17:37] erichodges: running ruby 2.0
[01:19:03] Ox0dea: ~ $ curl -Ls http://git.io/vOGSz | ruby -c
[01:19:05] Ox0dea: Syntax OK
[01:19:12] Ox0dea: erichodges: You've got to be doing something strange. :/
[01:19:41] erichodges: I???m totally new
[01:20:23] hahuang61: has joined #ruby
[01:20:26] erichodges: on my local ruby anything more than a basic puts seems not to work
[01:20:49] jbw: has joined #ruby
[01:21:00] Ox0dea: That's very strange.
[01:21:09] irctc944: i went on #rubyonrails, no one is answering me anyone here can help?
[01:21:13] lwu_: has joined #ruby
[01:21:34] ribbons: irctc944, what's your question?
[01:21:49] erichodges: I noticed on eval.in if I set it for ruby 2.0 it still works
[01:22:19] Ox0dea: erichodges: It's probably valid Ruby all the way back to the very beginning.
[01:22:30] erichodges: It should be
[01:23:02] erichodges: so something weird with my install?
[01:23:09] Ox0dea: Could be.
[01:23:40] erichodges: ruby -v yields: ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]
[01:23:42] decaff: has joined #ruby
[01:23:58] Ox0dea: erichodges: Do you have curl installed?
[01:23:58] irctc944: i posted my issue earlier on stack, thought it be easier than to explain the whole thing on here, http://stackoverflow.com/questions/31766477/trying-to-do-a-query-session-for-parse/
[01:24:06] erichodges: I don???t know
[01:24:32] erichodges: should I check somehow?
[01:24:42] Ox0dea: Run `which curl` and see if it says anything.
[01:26:21] erichodges: ???/usr/bin/curl???
[01:26:35] Ox0dea: erichodges: Okay, that means you've got it installed.
[01:26:48] Ox0dea: erichodges: How about `curl -Ls git.io/vOGSz | ruby -c`?
[01:27:33] Ox0dea: erichodges: Then you're either not executing the code correctly, or else you're not actually executing the code that was in your Gist.
[01:27:36] bruno-: has joined #ruby
[01:27:49] Ox0dea: That git.io is just a shortlink to the raw text of the Gist you posted.
[01:28:02] erichodges: code was coppied direct from file
[01:28:14] Ox0dea: It must have been copied incorrectly.
[01:28:44] erichodges: I???ll try with a different editor
[01:29:28] Ox0dea: I thought it might be that you've got mixed line endings in the code, but Ruby handles those just fine.
[01:31:13] hahuang61: has joined #ruby
[01:31:18] erichodges: I???m using Atom
[01:31:27] irctc944: i posted my issue earlier on stack, thought it be easier than to explain the whole thing on here, http://stackoverflow.com/questions/31766477/trying-to-do-a-query-session-for-parse/
[01:32:42] erichodges: I???ll try a different editor and check in later. I have to make some food. Thank you for your help it???s much appreciated!
[01:32:50] Ox0dea: Sure thing. Good luck.
[01:33:09] erichodges: do you have a preferred editor for mac?
[01:34:00] Guest71046: has joined #ruby
[01:34:12] DJSpies: has joined #ruby
[01:34:40] dc: has joined #ruby
[01:35:37] erichodges: I???ll check around, no problem??? starving
[01:35:45] irctc944: can anoyone take a look at my link please?
[01:35:59] christiandsg: has joined #ruby
[01:36:49] craysiii: has joined #ruby
[01:37:03] hahuang61: has joined #ruby
[01:37:11] craysiii: good day everyone :)
[01:39:09] lannonbr: has joined #ruby
[01:40:17] blue_deref: has joined #ruby
[01:40:52] NeverDie: has joined #ruby
[01:41:56] Thomas-0725: has joined #ruby
[01:42:27] gambl0re: has joined #ruby
[01:43:10] juanpablo_______: has joined #ruby
[01:43:12] ivanf: has joined #ruby
[01:45:38] lwu_: has joined #ruby
[01:47:04] arooni: has joined #ruby
[01:47:42] j_mcnally: has joined #ruby
[01:48:35] Rinzlit: What can you guys code in Ruby to impress females?
[01:50:29] hahuang61: has joined #ruby
[01:51:49] HoppingMadMan: has joined #ruby
[01:52:16] Guest21448: has joined #ruby
[01:57:01] tenderlove: has joined #ruby
[01:58:56] houhoulis: has joined #ruby
[01:59:54] ribbons: let's start
[02:00:02] ribbons: class SexRobot end
[02:01:08] Eiam_: has joined #ruby
[02:03:58] Ox0dea: SexRobot.define_method(:initialize) { |opts| @kinkiness = opts.fetch(:kinkiness, 5) }
[02:05:33] Guest71046: has joined #ruby
[02:06:01] hahuang61: has joined #ruby
[02:06:48] _set: has joined #ruby
[02:06:54] dimasg: has joined #ruby
[02:08:23] cntrx: has joined #ruby
[02:09:13] cntrx: has left #ruby: ()
[02:09:13] Contigi: has joined #ruby
[02:15:30] thesquidbits[SF]: has joined #ruby
[02:17:05] tkuchiki: has joined #ruby
[02:17:16] hahuang61: has joined #ruby
[02:18:52] theery: has joined #ruby
[02:20:37] tkuchiki: has joined #ruby
[02:21:06] tubuliferous: has joined #ruby
[02:21:44] bustrarm: has joined #ruby
[02:22:06] tkuchiki: has joined #ruby
[02:22:43] simplyianm: has joined #ruby
[02:24:28] s2013: has joined #ruby
[02:26:00] j4cknewt: has joined #ruby
[02:27:02] zenguy_pc: has joined #ruby
[02:27:21] Lewix: has joined #ruby
[02:27:24] Lewix: hello people
[02:27:42] hahuang61: has joined #ruby
[02:27:56] Coraline: Only Ferengi call women "females"
[02:28:12] Guest71046: has joined #ruby
[02:28:51] Ox0dea: Coraline: Should we always use "women"?
[02:29:13] Ox0dea: Coraline: Isn't that potentially age-ist?
[02:29:31] Ox0dea: Coraline: How do you know Rinzlit isn't trying to impress his fourteen-year-old girlfriend?
[02:29:52] Coraline: He would have said "girls" or "young women"
[02:30:39] zenguy_pc: has joined #ruby
[02:30:54] Ox0dea: Coraline: Why isn't "females" a conveniently inclusive term for all of the above?
[02:31:03] Coraline: It's clinical
[02:31:24] mozzarella: what if he wants to impress girls *and* women?
[02:31:36] texasmade: i came in here at the right time
[02:31:48] lwu: has joined #ruby
[02:33:10] tkuchiki: has joined #ruby
[02:33:38] tkuchiki: has joined #ruby
[02:33:50] NoidedSuper: Oh boy, an argument about if "Women" is dehumanizing or not on a completely unrelated programming form
[02:34:01] blaines: has joined #ruby
[02:34:25] Ox0dea: NoidedSuper: You've misinterpreted, I'm afraid.
[02:34:28] Scripore: has joined #ruby
[02:34:38] NoidedSuper: Or, uh, "females"
[02:34:38] pontiki: and another example of someone completely not bothering to listen.
[02:35:06] texasmade: listening to plain text is rather hard unless you have everything set up for that.
[02:35:15] pontiki: oh shut up
[02:35:33] Ox0dea: Do consider taking her advice, though.
[02:36:08] NoidedSuper: Wait, was this not an instance where somebody used the term "Females" and somebody else said to use "Women" instead?
[02:36:12] prestorium: has joined #ruby
[02:36:19] NoidedSuper: I mean, for the record, I do think "women" is a better term in 99% of cases
[02:36:36] gwendall: has joined #ruby
[02:36:42] christiandsg: has joined #ruby
[02:37:04] Ox0dea: I vote for "people".
[02:37:14] Rinzlit: Ox0dea actually I was just bored trying to see if I could stir up a conversation of Ruby applications that can be used to impress people who don't know much about coding
[02:37:58] Rinzlit: Ox0dea, You make it sound like I was trying to troll lol
[02:38:11] Rinzlit: Ox0dea, I was hoping someone might have something impressive
[02:38:12] pontiki: that *is* a troll
[02:38:15] Rinzlit: And they'd want to show off
[02:40:56] drewo: has joined #ruby
[02:41:36] tabakhase: hm, i think ive got a understanding issue how ruby threats globals and cross-class comms...
[02:42:37] NoidedSuper: What's the issue?
[02:42:48] simplyianm: has joined #ruby
[02:42:52] serivich: has joined #ruby
[02:44:21] arooni-mobile: has joined #ruby
[02:44:24] hahuang61: has joined #ruby
[02:45:03] tabakhase: not yet formed to an actuall issue or question :D
[02:45:14] tabakhase: still poking-around stage..
[02:48:10] phutchins: has joined #ruby
[02:49:16] casadei_: has joined #ruby
[02:51:49] tabakhase: var, :var, @var, $var... awww so much doku to read
[02:53:15] Ox0dea: tabakhase: You missed @@var. :P
[02:53:36] tabakhase: ty for the motivation :P
[02:53:59] Ox0dea: Local, symbol, instance, global, and class.
[02:54:10] Ox0dea: Five "kinds" of identifier really isn't so bad.
[02:55:32] tabakhase: im not getting the symbol use yet, and im unsure "how global global is" - and if class is @@ i wonder whats diffrent to @
[02:55:54] craysiii: how could it be? it's explicit and each kind can be justified IMO
[02:56:42] craysiii: sidenote- i just got your name. it took that long.
[02:56:51] Ox0dea: tabakhase: Symbols are essentially immutable strings; global variables are *really* global, insofar as they can be accessed from anywhere; and class varaibles are accessible from every instance of the class
[02:57:03] Ox0dea: *variables
[02:57:24] Azure: has joined #ruby
[02:57:50] NoidedSuper: has left #ruby: ()
[02:58:18] tabakhase: dont even bother explaining just now, ill do my homework with the docs first^^
[02:58:29] tabakhase: but when i get back from that and still have a "?" ill appreciate it =)
[02:59:06] al2o3-cr: and constants :p
[02:59:13] Ox0dea: Ah, constants too.
[02:59:35] Ox0dea: Also, "hidden" globals and instance variables.
[03:00:13] hahuang61: has joined #ruby
[03:00:32] pl1ght: has joined #ruby
[03:00:34] shevy: Ox0dea loves globals
[03:00:36] shevy: especially $11
[03:01:02] Ox0dea: >> [Complex.constants(false), (Complex.const_get(:compatible) rescue $!)]
[03:01:03] ruboto: Ox0dea # => [[:compatible, :I], #<NameError: wrong constant name compatible>] (https://eval.in/410308)
[03:01:12] shevy: >> $11235235235 = 5
[03:01:13] ruboto: shevy # => /tmp/execpad-df676bf4d7a8/source-df676bf4d7a8:2: Can't set variable $2147483647 (https://eval.in/410309)
[03:01:20] shevy: so bogus!
[03:01:24] tabakhase: my current bummer more seems to be the general class concept anyway, too spoiled by years of php, trying to correctly wrap down to an interface kindish layer as im used to
[03:01:40] Ox0dea: tabakhase: PHP has classes...
[03:01:56] tabakhase: "concept" *shrug*
[03:02:21] Ox0dea: I take it you didn't use classes in your PHP code, then?
[03:02:22] craysiii: tabakhase are you taking any sort of class or just trying to learn on your own? codecademy?
[03:02:23] dwithers: has joined #ruby
[03:02:53] s2013: has joined #ruby
[03:03:05] Scripore: has joined #ruby
[03:03:42] eam: Ox0dea: to be fair ruby is a much classier language than php
[03:03:52] Ox0dea: The classiest!
[03:04:01] craysiii: in both ways ;P
[03:04:25] tabakhase: craysiii just a deep dive :D just wanne build a small tool with a few gems only ruby has, and "how hard" can another lang bee :P
[03:04:41] freerobby: has joined #ruby
[03:05:14] craysiii: i really recommend codecademy. it can be finished in a day or so and you will get a good beginner understanding of ruby and OOP
[03:05:40] Ox0dea: Ruby Koans > Codecadamy as an introduction to the language, in my opinion.
[03:05:49] tabakhase: but ive wrote some code before (php, c#, some java) so its mostly the "understanding how ruby wants it" and not so much the "how to code" :D
[03:05:53] craysiii: never heard of it.
[03:06:03] shevy: ruby wants it in a simple way
[03:06:08] tabakhase: some aka making my money with it for +6 years :F
[03:06:17] shevy: hence why everything is public, you need to make an effort to become private
[03:06:42] craysiii: i mean, ive used a multitude of languages as well, but i still did it.
[03:06:43] shevy: and .send happily ignores private \o/
[03:06:44] senayar: has joined #ruby
[03:06:44] senayar: has joined #ruby
[03:08:22] sevenseacat: has joined #ruby
[03:08:26] craysiii: even though you're versed in other languages, you're still a ruby beginner :)
[03:08:41] shevy: if he knows php then he will pick up ruby in no time
[03:08:52] Ox0dea: I've not heard many good things about Codecademy; people tend to come away from it having learned how to type Ruby.
[03:08:53] cornerma1: has joined #ruby
[03:09:00] shevy: let's test his knowledge
[03:09:22] shevy: tabakhase how do you specify, in ruby, a class Cat
[03:09:57] Ox0dea: shevy: There are several ways to do so.
[03:10:14] zacstewart: has joined #ruby
[03:10:23] funfunctor: has joined #ruby
[03:10:30] al2o3-cr: Cat = Class.new
[03:10:42] shevy: see this is why online classes don't work!
[03:11:09] shevy: I also felt bad that my question contained the answer already :(
[03:11:12] Ox0dea: Object.const_set :Cat, Class.new
[03:11:18] tmtwd: has joined #ruby
[03:11:25] ten27pm: has joined #ruby
[03:11:57] Ox0dea: >> foo = Class.new; [foo.name, Foo = foo, foo.name] # Ruby is weird.
[03:11:58] ruboto: Ox0dea # => [nil, Foo, "Foo"] (https://eval.in/410311)
[03:12:19] postmodern: has joined #ruby
[03:12:40] craysiii: >> # lets see if ruboto is smart
[03:12:41] ruboto: craysiii # => nil (https://eval.in/410312)
[03:12:50] braincrash: has joined #ruby
[03:12:54] craysiii: lol why even respond!
[03:13:15] Ox0dea: Check the link?
[03:13:23] shevy: ruboto is triggerhappy when you feed it >>
[03:14:13] Ox0dea: >???> Not always.
[03:14:20] Eiam_: has joined #ruby
[03:15:21] djbkd: has joined #ruby
[03:19:51] shevy: illegal unicode
[03:20:18] darkf: has joined #ruby
[03:21:23] serivich: has joined #ruby
[03:25:22] rickmasta: has joined #ruby
[03:25:28] MAQ: has joined #ruby
[03:26:47] gwendall: has joined #ruby
[03:28:33] [k-: has joined #ruby
[03:28:36] MAQ: has joined #ruby
[03:29:27] texasmade: has joined #ruby
[03:30:58] roo7: has joined #ruby
[03:31:17] ribbons: Is anyone familiar with haversine formula?
[03:31:24] ribbons: I'm having trouble determining what units it returns
[03:32:03] juanpablo_______: has joined #ruby
[03:32:20] eggoez: has joined #ruby
[03:32:37] ivanskie: has joined #ruby
[03:34:03] charliesome: has joined #ruby
[03:36:10] tabakhase: craysiii hehe the "done others" is more about the "i understood how computers work and can thinkery "things" into codeflow in my brains" + controllFlow :D
[03:37:36] gix: has joined #ruby
[03:37:40] craysiii: yes but from your own admission it sounds like you need a formal introduction to OOP and classes.
[03:37:59] gambl0re: has joined #ruby
[03:38:51] craysiii: in ruby at least i mean
[03:41:31] null_ref: has joined #ruby
[03:42:26] tkuchiki: has joined #ruby
[03:43:16] poguez_: has joined #ruby
[03:43:57] tkuchiki: has joined #ruby
[03:44:49] Ox0dea: tabakhase: Feigning ignorance is, in very rare circumstances, the right thing to do, but never the opposite.
[03:45:13] Ox0dea: I ask out of genuine curiosity and not as an accusation: what good can ever come from pretending to know what one does not?
[03:45:48] sevenseacat: Ox0dea: you can get a job and or a pay rise. ;)
[03:46:04] tabakhase: this usually backfires^^
[03:46:06] Ox0dea: sevenseacat: That is, in most cases, a temporary benefit.
[03:46:15] sevenseacat: true, but I couldnt resist saying it.
[03:46:20] Ox0dea: Fair enough.
[03:46:36] Ox0dea: tabakhase: How do computers work? :D
[03:46:55] [k-: they don't
[03:47:08] Ox0dea: tabakhase: Have you completed NAND to Tetris?
[03:47:16] [k-: Ox0dea!
[03:47:51] tabakhase: Similar to how babys are formed i guess
[03:47:59] tabakhase: and never heard of that Ox0dea
[03:48:33] Ox0dea: tabakhase: It wasn't always the case that computers begat computers; how were computers conceived before the advent of computers?
[03:48:37] [k-: taken out of context, you never heard of Ox0dea?!
[03:48:55] craysiii: Ox we know that's a chicken and egg problem
[03:49:07] Ox0dea: He's never heard of *this* Ox0dea; I'm sure he's encountered the number 3562 elsewhere.
[03:49:57] nofxx: ribbons, haversine give meters
[03:50:48] nofxx: anyone know a GUI file viewer that can handle huge files? need to peek 300mb..1gb files, really boring
[03:51:57] Ox0dea: nofxx: Why use a GUI for that?
[03:53:06] ribbons: nofxx, could you link a source please?
[03:53:09] ribbons: I want to make sure
[03:53:15] ribbons: I've googled multiple times!
[03:53:23] nofxx: Ox0dea, trying to find a github, was a 'how computer works' from the button press to the electron...hehe
[03:53:36] nofxx: Ox0dea, well, because I don't know how to cat with some skip... now I see
[03:53:56] Ox0dea: nofxx: `head -c` should do.
[03:53:59] nofxx: ribbons, calculate 1 degree, it should be around 110km on the equador
[03:54:12] nofxx: Ox0dea, now I know, ty
[03:54:13] Ox0dea: nofxx: https://github.com/alex/what-happens-when
[03:54:43] Ox0dea: I suppose that might not be the one you had in mind.
[03:54:52] Guest71046: has joined #ruby
[03:54:52] nofxx: ribbons, it's pretty easy for the function to divide by 1000 to give you km float or else, better to test if you can't see the code
[03:55:16] Guest71046: has joined #ruby
[03:55:32] nofxx: Ox0dea, yeah, I think that's the one
[03:56:21] nofxx: ribbons, https://github.com/nofxx/georuby/blob/master/lib/geo_ruby/simple_features/point.rb#L61
[03:56:43] ivanskie: has joined #ruby
[03:56:55] Ox0dea: Sine and cosine don't really have "units", per se, so why should Haversine?
[03:57:13] nofxx: Ox0dea, heheh, iirc it's a guy name
[03:57:14] roo7: hi guys. i'm new to ruby and i'm trying to learn by porting a small program from python. i'm wondering if anyone can help by telling me what i'm doing wrong. The problem i'm encountering is being able to share an argument from a method within a class to another in a different class
[03:57:43] roo7: http://codeshare.io/l5bTz if you would kindly :)
[03:57:50] nofxx: Ox0dea, he simplified the ellipsoidal distance, check #82 on that file
[03:57:55] nofxx: crazy 200 lines def
[03:57:59] skade: has joined #ruby
[03:58:04] Ox0dea: nofxx: "Haversine" is derived from "versine".
[03:58:21] Ox0dea: They're all functions of angles; they don't really have units.
[03:58:49] nofxx: Ox0dea, thanks again, didn't knew
[03:58:59] [k-: sin(??) = [m/m]!
[03:59:10] [k-: the unit cancels
[03:59:41] Ox0dea: roo7: You should start by fixing the ASCII art. :P
[03:59:52] roo7: all in due time
[03:59:54] tkuchiki: has joined #ruby
[03:59:58] Ox0dea: "spotipy.rb" is high treason.
[04:00:23] ndrei: has joined #ruby
[04:00:42] Ox0dea: roo7: If you need two classes to share data, you're almost certainly doing it wrong.
[04:00:42] [k-: you have indentation problems >:/
[04:01:29] roo7: it looks like it didn't paste from sublime correctly
[04:01:41] craysiii: to the plank with you
[04:01:54] [k-: you do not need to explicitly use return in get_input
[04:02:16] [k-: you can drop off some of the ()
[04:02:16] Jester13: has joined #ruby
[04:02:31] [k-: (i hope you do)
[04:02:39] roo7: haha will do
[04:02:42] nofxx: roo7, all that [k- is saying is: use rubocop
[04:02:58] nofxx: so you won't hurt our eyes ;)
[04:03:01] roo7: yeah, more importantly i want to get it to work before i make it look nice
[04:03:42] [k-: you want to make it look nice as you work, so that you dont run into technical debt
[04:04:29] nofxx: roo7, small code, just make 1 class out of it
[04:05:12] roo7: cool. thanks for the help guys! back to the grindstone
[04:05:58] lwu: has joined #ruby
[04:06:27] [k-: have you heard of instance variables?
[04:08:19] monoprotic: has joined #ruby
[04:08:48] [k-: (your code looks wrong to me, frankly)
[04:09:01] [k-: my inner rubyist is tingling!
[04:09:18] tubuliferous: has joined #ruby
[04:09:30] ribbons: nofxx, thanks for looking more into it
[04:09:36] ribbons: Ox0dea, same with you
[04:09:53] ribbons: What was the final verdict though?
[04:10:07] nofxx: Ox0dea, remember now why I was looking for some GUI thing... big files are .csv and .xml, csv ok but xml is really annoying to look at
[04:10:12] nofxx: (without some formating)
[04:10:27] nofxx: ribbons, test yours
[04:10:30] [k-: instead with the load of variable instantiation, maybe use a hash? those are configurable options, yes?
[04:10:38] nofxx: ribbons, 1 degree =~ 110km
[04:10:55] [k-: you can easily get it from a .yml, .json later
[04:13:02] [k-: .clear() and .refresh() seems to be used a lot, abstract it!
[04:13:06] Ox0dea: nofxx: Could you not pipe head -c into tidy?
[04:14:11] Ox0dea: Also, grep's got -B(efore) and -A(fter) flags for when you know roughly what you're looking for.
[04:14:53] [k-: refresh = -> window, &block { window.clear, block[window], window.refresh }
[04:15:12] [k-: readable code \o/
[04:18:09] nofxx: Ox0dea, hehe: 5556798 warnings, 2247054 errors were found! Not all warnings/errors were shown.
[04:18:26] nofxx: 2M errors on a 22Mb file, each char is wrong
[04:20:05] theery: has joined #ruby
[04:20:15] Vile`: has joined #ruby
[04:21:05] [k-: i bet they all stem from one error!
[04:22:01] ayonkhan: has joined #ruby
[04:22:54] Ox0dea: > In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move.
[04:23:34] nofxx: Ox0dea, hehe, sounds douglas adams
[04:23:41] [k-: > People didnt exist then, what can they be angry about
[04:24:31] tmillc: has joined #ruby
[04:24:36] zacstewart: has joined #ruby
[04:27:11] tmillc: https://gist.github.com/anonymous/065e15ea05f094624bee -- why does this print 123456 if break is before the incrementor
[04:27:26] tmillc: (apologies if there's a #learnruby or something)
[04:27:54] nofxx: tmillc, is 5 > 5 ?
[04:27:56] tmillc: also I left off i=0 before all that
[04:28:09] tmillc: ACTION smacks forehead
[04:28:15] Channel6: has joined #ruby
[04:28:17] htmldrum: has joined #ruby
[04:28:21] [k-: you add after checking
[04:28:29] tmillc: nofxx: :P thanks
[04:28:40] [k-: nooo i was too slow
[04:29:17] [k-: if you are doing a for loop, i recommend 5.times { }
[04:29:44] nofxx: tmillc, yes, if you need to use loop in ruby you're doing it wrong
[04:30:04] jonee: has joined #ruby
[04:30:08] tmillc: nofxx: well I'm just doing what codecademy tells me to do :)
[04:31:01] tmillc: "loop" does strike me as a pretty weird method, but ok
[04:31:04] nofxx: tmillc, well, I think a good ruby tutorial should teach you ruby way, that is #times, and add a sidenote: ruby also supports loop and while
[04:31:53] Ox0dea: tmillc: Could you defend that last one?
[04:32:07] Ox0dea: Why on earth wouldn't you consider "loop" to be the perfect name for a method that loops?
[04:32:21] tmillc: Ox0dea: it seems to me that a loop should be a structure that occurs due to a grammar
[04:32:43] tmillc: right I mean, it's fine and descriptive of what it does
[04:33:12] Ox0dea: Loops aren't data structures.
[04:33:30] Ox0dea: And "occurs due to a grammar" is arguably meaningless.
[04:33:34] tmillc: ok, algorithmic structures? mathematical structures?
[04:33:47] nofxx: tmillc, read your code, than read this (out and loud): 5.times { |n| puts n if n > 5 }
[04:34:15] Ox0dea: nofxx: Your example doesn't print anything.
[04:34:17] seitensei: has joined #ruby
[04:34:28] nofxx: Ox0dea, haha, sorry <
[04:34:43] nofxx: Ox0dea, but just to exemplify the ruby idea of 'english code'
[04:34:46] tmillc: nofxx: yeah I'm more into haskell but ruby is for a job, and was my first exposure for programming <3
[04:36:43] nofxx: tmillc, but more importantly: you don't need to control anything with vars or breaks
[04:36:54] nofxx: my code should read actually 5.times { |n| puts n }
[04:36:57] tmillc: but it was a very simple <, <= oversight.
[04:37:28] yfeldblum: has joined #ruby
[04:37:36] tmillc: nofxx: right, I wondered if it was something to do with the loop method but I'm just a fool and 5 < 5 was the problem.
[04:37:54] tmillc: hence the forehead smacking
[04:38:06] casadei_: has joined #ruby
[04:38:22] j4cknewt: has joined #ruby
[04:39:19] Ox0dea: nofxx: 5.times &method(:puts)
[04:39:55] lwu: has joined #ruby
[04:40:03] nofxx: Ox0dea, had to irb it. method !??! damn.. that's new
[04:40:06] yfeldblum: has joined #ruby
[04:40:11] al2o3-cr: that'll start from 0 though?
[04:40:15] Ox0dea: Yes, it will.
[04:40:26] Ox0dea: map(&:succ) to the rescue.
[04:41:08] charliesome: has joined #ruby
[04:41:26] lwu_: has joined #ruby
[04:41:57] leat2: has joined #ruby
[04:42:18] [k-: more obscure ways?
[04:42:19] konsolebox: has joined #ruby
[04:42:21] Ox0dea: I once used `i.succ` instead of `i + 1` to avoid the need for parentheses. Very humbling.
[04:43:26] nofxx: Ox0dea, haha, hard to forgive. Hey, would be nice to have some kind of `itself` to blocks... 5.times { puts thething }
[04:43:39] nofxx: thething would be one argument only
[04:43:52] [k-: &:itself exists
[04:43:59] Ox0dea: nofxx: That's essentially what &method(foo) does.
[04:44:05] Tempesta: has joined #ruby
[04:44:15] Ox0dea: s/essential/exact/, really.
[04:44:37] [k-: abstract all away the thinking about incrementation, use .succ!
[04:46:15] Ox0dea: >> %w[1 2 3].map &Kernel.method(:Integer) # nofxx
[04:46:16] ruboto: Ox0dea # => [1, 2, 3] (https://eval.in/410342)
[04:46:25] ivanskie: has joined #ruby
[04:47:19] Ox0dea: nofxx: map(&:to_i) == map { |x| x.to_i } and map(&method(:foo) == map { |x| foo(x) }
[04:47:24] nofxx: Ox0dea, yeah... but my way would be less cryptic... but more magical I admit
[04:47:35] Ox0dea: I'm not sure I follow.
[04:47:47] nofxx: [k-, I mean for the puts thing.. call a method that's not from/on itself
[04:48:06] Ox0dea: See above?
[04:48:29] arup_r: has joined #ruby
[04:48:46] nofxx: 5.times &method(:puts) vs 5.times { puts itself } , supposing the latter works
[04:48:57] bronson: has joined #ruby
[04:48:57] nofxx: less cryptic, more magical
[04:49:17] Ox0dea: I can't find the page you're on. :/
[04:49:45] [k-: lower bar for reading?
[04:49:59] [k-: magical, yes, it's less imperative
[04:50:00] Ox0dea: You simply must supply the block with an argument if you intend for it to have access to the elements being yielded.
[04:50:14] jhubert: has joined #ruby
[04:50:45] nofxx: Ox0dea, I know man, was just trippin' in that idea, gave emphasis on the 'supposing it works'
[04:50:52] izabera: has joined #ruby
[04:51:04] Ox0dea: nofxx: To clarify, map(&method(:puts)) doesn't call #puts on the elements, it calls Kernel.puts *with* the elements.
[04:51:05] arooni-mobile: has joined #ruby
[04:51:18] Ox0dea: Just as in your `puts itself` example.
[04:51:23] nofxx: Ox0dea, yup, exactly
[04:52:05] [k-: a = [1]; a.reduce(0) { |acc, i| p (a << acc+i) }
[04:52:12] leat2: has joined #ruby
[04:52:20] izabera: hi, ruby newbie here. i found that performing math operations with numbers > 2^60 is rather slow, even if they're < 2^63
[04:52:34] izabera: does ruby use a bignum representation "too soon"?
[04:53:25] Ox0dea: >> [2**62, 2**62-1].map(&:class) # izabera
[04:53:26] ruboto: Ox0dea # => [Bignum, Bignum] (https://eval.in/410347)
[04:53:47] Ox0dea: Dammit. eval.in is a 32-bit environment, but hopefully you get my intention.
[04:53:47] nofxx: izabera, curious, compared to what?
[04:53:57] izabera: compared to < 2^60
[04:54:13] nofxx: no I mean... C lib/matlab?
[04:54:19] nofxx: the slow part
[04:54:21] Ox0dea: izabera: Could you provide demonstration code?
[04:55:29] RegulationD: has joined #ruby
[04:56:08] Ox0dea: Ruby switches to Bignum at 2**62 in 64-bit environments; I can't think how to convince it to do so prematurely, but perhaps you've hit a weird edge case.
[04:57:02] theery: has joined #ruby
[04:57:12] izabera: no it's ok, i just expected it to go up to something like 2^63-1
[04:57:29] izabera: >> var=100000000000000000; for i in 1..1000000; x = var * 9; end; puts(x)
[04:57:30] ruboto: izabera # => 900000000000000000 ...check link for more (https://eval.in/410348)
[04:57:54] izabera: ^ takes .17s
[04:57:57] izabera: >> var=1000000000000000000; for i in 1..1000000; x = var * 9; end; puts(x)
[04:57:58] ruboto: izabera # => 9000000000000000000 ...check link for more (https://eval.in/410349)
[04:58:03] izabera: ^ takes .35s
[04:58:13] izabera: on my system, i mean
[04:59:03] izabera: anyway, it's not really a problem, i was just curious
[05:00:02] Ox0dea: izabera: Well, yeah, you're getting Bignums at var * 5+ in the second case.
[05:01:01] al2o3-cr: >> define_method(:foo) { |a, b=1, *c, d:, e: 1, &f| }; method(:foo).parameters.to_h
[05:01:02] ruboto: al2o3-cr # => {:req=>:a, :opt=>:b, :rest=>:c, :keyreq=>:d, :key=>:e, :block=>:f} (https://eval.in/410350)
[05:01:06] al2o3-cr: did i miss any?
[05:01:14] jaimessi: has joined #ruby
[05:02:27] leat2: has joined #ruby
[05:04:05] Ox0dea: >> define_method(:foo) { |**kwargs| }; method(:foo).parameters # al2o3-cr
[05:04:06] ruboto: Ox0dea # => [[:keyrest, :kwargs]] (https://eval.in/410351)
[05:04:58] al2o3-cr: damn, i knew i'd missed one, cheers :)
[05:05:39] riotjones: has joined #ruby
[05:05:42] funfunctor: has joined #ruby
[05:05:57] niiamon: has joined #ruby
[05:08:38] senayar: has joined #ruby
[05:10:48] [k-: class Symbol; def -@; &method self; end end
[05:13:33] diegoviola: has joined #ruby
[05:15:20] [k-: maybe we should have a &&
[05:15:27] [k-: oh, thats an operator
[05:15:47] [k-: what is it called again? superoperators?
[05:16:29] Ox0dea: [k-: https://github.com/jicksta/superators
[05:17:03] serivich: has joined #ruby
[05:19:17] jimms: has joined #ruby
[05:19:53] Ox0dea: [k-: There's also Lollipops: https://gist.github.com/0x0dea/d58f4f276a4ffb317d46
[05:19:56] djbkd: has joined #ruby
[05:20:02] Ox0dea: Which I've just discovered segfaults on HEAD.
[05:20:06] [k-: ACTION runs back to haskell
[05:20:34] speakingcode: has joined #ruby
[05:20:43] juanpablo_______: has joined #ruby
[05:20:49] Fevrale: has joined #ruby
[05:21:39] [k-: this is presumably gold
[05:23:14] Ox0dea: Wow, &:upcase causes a segfault whereas { |x| x.upcase } works fine.
[05:23:19] Ox0dea: This should be interesting.
[05:23:21] [k-: i should start working on this sort of stuff for libobf!
[05:23:37] Ox0dea: Did you run the Lollipops example?
[05:24:24] [k-: no, im on my phone
[05:24:41] Ox0dea: It's cute.
[05:28:50] jonee: has joined #ruby
[05:31:06] [k-: https://eval.in/410364
[05:31:28] [k-: it returns -3!
[05:32:24] lxsameer: has joined #ruby
[05:32:33] [k-: hmm ~@ doesnt seem to work
[05:32:34] Ox0dea: [k-: Unary ~ must be defined without the asperand.
[05:32:43] Ox0dea: +@, -@, ~, and !.
[05:32:48] [k-: https://eval.in/410366
[05:32:48] Ox0dea: How do people even learn this language?
[05:33:43] Ox0dea: https://eval.in/410367
[05:33:44] Scripore: has joined #ruby
[05:34:08] Ox0dea: >> instance_eval(&:to_s) # This segfaults on 2.3. :/
[05:34:09] ruboto: Ox0dea # => "main" (https://eval.in/410368)
[05:35:17] [k-: weird much
[05:35:29] rickmasta: has joined #ruby
[05:36:26] jhubert_: has joined #ruby
[05:36:40] jhubert: has left #ruby: ()
[05:36:48] _ixti_: has joined #ruby
[05:37:33] jhubert: has joined #ruby
[05:37:38] weemsledeux: has joined #ruby
[05:38:10] yardenbar: has joined #ruby
[05:40:21] fedexo: has joined #ruby
[05:40:57] Phrogz2: has joined #ruby
[05:41:20] Phrogz2: http://stackoverflow.com/questions/31768908/determine-arity-of-method-with-keyword-arguments <-- help requested
[05:41:59] Phrogz2: I suppose the old 1.9 style of opts={} works better here.
[05:43:41] rickmasta: has joined #ruby
[05:44:11] akkad: has joined #ruby
[05:47:21] ThatsNotJack: has joined #ruby
[05:48:52] skade: has joined #ruby
[05:50:28] theery: has joined #ruby
[05:51:08] Scripore: has joined #ruby
[05:51:18] Musashi007: has joined #ruby
[05:51:26] djstorm: has joined #ruby
[05:51:41] j4cknewt_: has joined #ruby
[05:52:03] diego1: has joined #ruby
[05:52:09] diego1: has joined #ruby
[05:53:26] volsus: has joined #ruby
[05:55:29] jhubert: has joined #ruby
[05:57:27] tubuliferous: has joined #ruby
[05:57:30] j4cknewt: has joined #ruby
[05:59:09] tkuchiki: has joined #ruby
[06:00:55] j4cknewt: has joined #ruby
[06:03:59] AlexRussia: has joined #ruby
[06:04:57] lwu: has joined #ruby
[06:05:18] j4cknewt_: has joined #ruby
[06:06:24] riotjones: has joined #ruby
[06:08:58] radgeRayden_: has joined #ruby
[06:09:44] senayar: has joined #ruby
[06:10:13] diego1: has joined #ruby
[06:10:27] izabera: has left #ruby: ("WeeChat 1.2")
[06:10:32] diego1: has joined #ruby
[06:10:49] Oog_: has joined #ruby
[06:13:35] michael_mbp: has joined #ruby
[06:13:54] lwu: has joined #ruby
[06:15:33] jonee: has joined #ruby
[06:17:49] jakesyl: has joined #ruby
[06:18:02] jakesyl: Hello! how do I use this in a ruby file: https://github.com/mrsimo/torrentz ?
[06:18:42] theobrowne: has joined #ruby
[06:19:02] jakesyl: I tried require "Torrentz"
[06:19:50] Ox0dea: jakesyl: Did you install it?
[06:20:04] Mia: has joined #ruby
[06:20:04] Mia: has joined #ruby
[06:20:08] Ox0dea: Try not capitalizing it.
[06:20:19] jakesyl: sudo gem install torrentz
[06:20:36] jakesyl: /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- torrentz (LoadError)
[06:22:00] Ox0dea: has joined #ruby
[06:22:02] jtdoncas: has joined #ruby
[06:23:09] Ox0dea: jakesyl: Are you able to require other gems you've installed, or is this the first you've tried?
[06:23:21] jakesyl: this is the first i've tried!
[06:23:38] skade: has joined #ruby
[06:23:39] Ox0dea: jakesyl: You're sure the `gem install` succeeded?
[06:23:59] ruboto: general advice in system administration: do not and that means never use sudo or root to "fix" things. Only use it if you exactly know why it would work and why it wouldn't work under any circumstances as normal user. Or if you're told to do it.
[06:26:02] jakesyl: https://gist.github.com/jakesyl/2b7ece9a51295047a762
[06:26:32] Ox0dea: jakesyl: Are you on Windows?
[06:26:41] jakesyl: ubuntu 14.04
[06:26:59] casadei_: has joined #ruby
[06:27:15] jakesyl: first time with ruby, I'm a hadoop/emr guy
[06:27:19] sevenseacat: you're missing the development headers for ruby
[06:27:53] sevenseacat: sudo apt-get install build-essential and reinstall ruby
[06:28:01] sevenseacat: and dont use apt rubies :(
[06:28:14] Ox0dea: sevenseacat: mkmf doesn't go into the standard library regardless?
[06:29:12] sevenseacat: or just the -dev package of whatever ruby you installed from the apt repos, apparently
[06:33:56] anthony__: has joined #ruby
[06:34:29] psye: has joined #ruby
[06:34:57] __Aleserche__: has joined #ruby
[06:35:39] psye: has joined #ruby
[06:36:24] sdwrage: has joined #ruby
[06:36:29] juanpablo_______: has joined #ruby
[06:37:16] djbkd: has joined #ruby
[06:39:06] phutchins: has joined #ruby
[06:41:15] radgeRayden_: has joined #ruby
[06:42:54] j4cknewt: has joined #ruby
[06:43:54] radgeRayden__: has joined #ruby
[06:49:01] monoprotic: has joined #ruby
[06:49:08] dvb_ua: has joined #ruby
[06:54:35] diego1: has joined #ruby
[06:55:11] diego1: has joined #ruby
[06:55:59] skade: has joined #ruby
[06:56:44] rippa: has joined #ruby
[06:57:12] volsus: has joined #ruby
[06:58:27] jakesyl: ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
[06:58:34] jakesyl: has left #ruby: ()
[06:58:38] jakesyl: has joined #ruby
[06:59:53] tkuchiki: has joined #ruby
[07:01:08] Echohn: has joined #ruby
[07:03:10] akkad: has joined #ruby
[07:03:43] zz_Outlastsheep: has joined #ruby
[07:04:04] lemur: has joined #ruby
[07:06:34] chinmay_dd: has joined #ruby
[07:08:05] diego1: has joined #ruby
[07:08:11] diego1: has joined #ruby
[07:08:32] skade: has joined #ruby
[07:09:18] GarethAdams: has joined #ruby
[07:10:34] senayar: has joined #ruby
[07:13:11] jakesyl: hey i'm new to ruby and am trying to install this dependency:
[07:13:12] jakesyl: https://github.com/mrsimo/torrentz
[07:13:29] Musashi007: has joined #ruby
[07:15:24] niiamon: has joined #ruby
[07:16:20] user1138: has joined #ruby
[07:18:54] jakesyl: so my first question is should I be using rvm for this?
[07:19:22] ruboto: Ubuntu installation guide for Ruby + Rails: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you/
[07:19:34] Echohn_: has joined #ruby
[07:20:32] sevenseacat: see the link.
[07:20:33] monoprotic: has joined #ruby
[07:21:08] diego1: has joined #ruby
[07:21:24] diego1: has joined #ruby
[07:23:23] jakesyl: yeah I'm following the link, but why shouldn't I use rvm instead
[07:23:33] theobrow1e: has joined #ruby
[07:24:10] sevenseacat: check the postscript in the link.
[07:27:29] zacstewart: has joined #ruby
[07:27:35] TomyLobo: has joined #ruby
[07:28:01] jakesyl: alright have it installed, should I try to install my gem now?
[07:28:11] sevenseacat: sure, why not
[07:29:30] bruno-: has joined #ruby
[07:29:56] hakunin_: has joined #ruby
[07:34:10] jakesyl: okay, so I have it installed succesfully: https://github.com/mrsimo/torrentz do I have to require it in the file before I use it?
[07:36:39] jakesyl: require "Torrentz"
[07:37:02] j4cknewt: has joined #ruby
[07:37:02] TomyLobo: no need to torrent. ruby is free software
[07:37:35] jakesyl: funny! but torrents aren't used exclusively for piracy it's very useful in distributing opensource software
[07:37:41] jakesyl: seriously though, how do I require this dependency?
[07:37:56] jakesyl: ACTION is looking for the equivelant of import in python or java
[07:38:04] TomyLobo: i havent used ruby very much, but all the "require"s so far were lowercase
[07:38:27] [k-: >> require 'set'
[07:38:28] ruboto: [k- # => true (https://eval.in/410378)
[07:38:40] TomyLobo: >> require 'torrentz'
[07:38:41] ruboto: TomyLobo # => cannot load such file -- torrentz (LoadError) ...check link for more (https://eval.in/410379)
[07:38:53] sevenseacat: the filename is 'torrentz'
[07:39:17] TomyLobo: sevenseacat, is that really a filename? i thought it was a module name
[07:39:30] TomyLobo: i.e. part of the name of the according gem directory
[07:39:34] [k-: require loads the filename
[07:40:37] TomyLobo: ok so if i make a gem named foo containing a file named bar.rb, that gets loaded with require 'bar'?
[07:40:56] sevenseacat: if the gem defines that 'bar' is the entry point, yeah
[07:41:21] TomyLobo: good, i hoped there was some kind of filter
[07:44:06] Trynemjoel: has joined #ruby
[07:44:17] j4cknewt: has joined #ruby
[07:45:36] tubuliferous: has joined #ruby
[07:46:15] j4cknewt_: has joined #ruby
[07:51:26] bmcginty: has joined #ruby
[07:51:30] lemur: has joined #ruby
[07:52:06] monoprotic: has joined #ruby
[07:53:51] djbkd: has joined #ruby
[07:54:57] jtdoncas: has joined #ruby
[07:56:12] ndrei: has joined #ruby
[07:56:22] modern: has joined #ruby
[07:56:22] modern: has joined #ruby
[07:58:37] Trynemjoel: has joined #ruby
[07:59:12] lwu_: has joined #ruby
[07:59:17] TomyLobo: if i use #{} in a regex, does that automatically escape the string for me?
[08:00:03] [k-: #{Regex.escape string} perhaps
[08:00:38] [k-: Regexp*
[08:00:49] [k-: &ri Regexp.escape
[08:00:49] `derpy: http://www.rubydoc.info/stdlib/core/Regexp#escape-class_method
[08:01:41] jimms: has joined #ruby
[08:05:38] quimrstorres: has joined #ruby
[08:06:04] TomyLobo: i'm writing a rfusefs driver, so essentially i have '/'-delimited paths and i want to route them to certain handlers
[08:06:22] TomyLobo: this sounds terribly like web stuff, is there some routing mechanism i can abuse?
[08:07:01] TomyLobo: including stuf like /issues/:issue_id/comments/:comment_id
[08:07:51] lwu: has joined #ruby
[08:08:52] j4cknewt: has joined #ruby
[08:11:30] senayar: has joined #ruby
[08:15:32] TomyLobo: i should ask in #rails i guess :)
[08:15:48] TomyLobo: or ##rails...
[08:15:51] casadei_: has joined #ruby
[08:15:55] Gadgetoid: has joined #ruby
[08:16:30] TomyLobo: ah, it's #rubyonrails :)
[08:16:37] [k-: yes, you got it!
[08:18:57] quimrstorres: has joined #ruby
[08:20:40] Dopagod: has joined #ruby
[08:20:55] khebbie: has joined #ruby
[08:23:10] monoprotic: has joined #ruby
[08:24:33] hmnhf: has joined #ruby
[08:25:15] juanpablo_______: has joined #ruby
[08:26:43] konsolebox: has joined #ruby
[08:27:53] quimrstorres: has joined #ruby
[08:28:32] j4cknewt: has joined #ruby
[08:29:02] OrbitalKitten: has joined #ruby
[08:29:09] Trynemjoel: has joined #ruby
[08:30:11] olistik: has joined #ruby
[08:33:05] jimms: has joined #ruby
[08:33:12] skade: has joined #ruby
[08:35:27] quimrstorres: has joined #ruby
[08:36:37] ruurd: has joined #ruby
[08:37:20] space_milk: has joined #ruby
[08:37:22] space_milk: has left #ruby: ()
[08:40:56] quimrstorres: has joined #ruby
[08:42:51] sameerynho: has joined #ruby
[08:43:55] rht: has joined #ruby
[08:44:10] Ox0dea: has joined #ruby
[08:44:15] Ox0dea: [k-: I tracked it down! https://bugs.ruby-lang.org/issues/11409
[08:44:40] Ox0dea: God bless ccache.
[08:44:41] Trynemjoel: has joined #ruby
[08:44:49] quimrstorres: has joined #ruby
[08:46:13] [k-: you were dead a few minutes ago
[08:46:50] lxsameer_: has joined #ruby
[08:49:18] [k-: such Ruby internal jargon, me no understand
[08:49:18] Mendenhall: has joined #ruby
[08:49:33] lxsameer: has joined #ruby
[08:49:48] hectortrope: has joined #ruby
[08:50:24] bronson: has joined #ruby
[08:51:46] quimrstorres: has joined #ruby
[08:52:42] Trynemjoel: has joined #ruby
[08:52:50] Ox0dea: [k-: And all because you wondered aloud about superators.
[08:52:58] Ox0dea: You are to blame for these tribulations!
[08:53:05] Ox0dea: As well as the inevitable triumph, of course.
[08:53:18] gwendall: has joined #ruby
[08:53:57] lemur: has joined #ruby
[08:54:01] layke_: has joined #ruby
[08:54:12] [k-: i helped you find a bug, where you will be throned as a contributor!
[08:54:39] Ox0dea: Nah, I can't find where to fix the damned thing. :/
[08:55:06] monoprotic: has joined #ruby
[08:55:08] layke_: Hey. I installed ruby. (ubuntu 14.04). apt-get install ruby-full, then I tried to install rubygems.. (I'm trying to get jekyll installed). When I try and use jekyll, I notice that my gems are isntalled in /var/lib/gems/1.9.1/ .. however, ruby -v shows me as ruby 1.9.3p484
[08:55:15] [k-: dont worry, it will come to you in a prediction ;)
[08:55:19] layke_: Is this a problem? Because I get errors when I trya nd run jekyll build...
[08:55:25] j4cknewt_: has joined #ruby
[08:55:38] Ox0dea: layke_: No, it shouldn't be a problem. Would you mind posting the exact error(s) you're receiving?
[08:55:58] quimrstorres: has joined #ruby
[08:56:01] doublemalt_: has joined #ruby
[08:56:27] layke_: https://gist.github.com/Kalyse/7f4dbe549dda53e413e1
[08:56:54] Ox0dea: layke_: Install haml.
[08:57:16] Violentr: has joined #ruby
[08:57:40] whiteline: has joined #ruby
[08:57:57] layke_: Okay. Done. Next error.. presumably.. I install japr now.
[08:57:58] layke_: /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- japr
[08:58:42] Trynemjoel: has joined #ruby
[08:58:52] layke_: I don't know ruby.gems, but I thought that the Gemfile automatically installs the dependencies?
[08:59:21] Ox0dea: layke_: It does, but neither haml nor japr is a jekyll dependency.
[08:59:45] yxhuvud: it doesn't install dependencies of host system packages
[09:00:06] drewo: has joined #ruby
[09:01:53] jschmid: has joined #ruby
[09:01:57] layke_: Ox0dea, I see.Okay. Thanks
[09:02:16] zacts: has joined #ruby
[09:02:51] [k-: Ox0dea, are you ruminating?
[09:02:55] Kalov: Ox0dea you are true hero
[09:03:22] Ox0dea: Kalov: What'd I do?
[09:03:22] j4cknewt: has joined #ruby
[09:03:27] Ox0dea: [k-: Yes, I'm poking.
[09:03:36] Ox0dea: Might need some hammock time.
[09:03:38] Kalov: you always solve problems and help everyone <3
[09:03:42] quimrstorres: has joined #ruby
[09:03:47] Kalov: i just come to this channel and there you are :)
[09:04:11] [k-: he is solving a bug in Ruby 2.3!
[09:05:13] Trynemjoel: has joined #ruby
[09:05:39] htmldrum: has joined #ruby
[09:07:00] theobrowne: has joined #ruby
[09:07:13] khebbie: has joined #ruby
[09:08:25] layke_: Ox0dea, New error,
[09:08:28] layke_: /var/www/rentivo.com/docs/plugins/pygments_code.rb:1:in `require': cannot load such file -- pygments
[09:08:29] quimrstorres: has joined #ruby
[09:08:37] layke_: Attempted to load by.. gem instlal pygments
[09:08:40] layke_: But says none found.
[09:09:09] Ox0dea: layke_: gem install pygments.rb
[09:09:10] [k-: pygmemts is py?
[09:09:24] Ox0dea: [k-: It was originally developed in Python, yes.
[09:10:08] RobertBirnie: has joined #ruby
[09:10:44] layke_: I'm sure all the previous times I've installed jeyll, it's been a two step process.
[09:11:12] layke_: Ox0dea, gem install pygments.rb worked, but running jekyll build, still gives that same error.
[09:12:07] senayar: has joined #ruby
[09:14:01] OrbitalKitten: has joined #ruby
[09:15:13] Trynemjoel: has joined #ruby
[09:15:41] j4cknewt: has joined #ruby
[09:19:56] CloCkWeRX: has joined #ruby
[09:24:45] Trynemjoel: has joined #ruby
[09:25:25] sameerynho: has joined #ruby
[09:26:30] monoprotic: has joined #ruby
[09:26:41] senayar: has joined #ruby
[09:26:42] senayar: has joined #ruby
[09:26:47] Silox|: has joined #ruby
[09:29:39] zacstewart: has joined #ruby
[09:29:45] krz: has joined #ruby
[09:32:05] Vile`: has joined #ruby
[09:32:18] olistik: has joined #ruby
[09:33:43] tubuliferous: has joined #ruby
[09:37:32] lxsameer_: has joined #ruby
[09:37:46] Trynemjoel: has joined #ruby
[09:43:16] sdwrage: has joined #ruby
[09:43:30] marr: has joined #ruby
[09:43:58] stamina: has joined #ruby
[09:44:06] skade: has joined #ruby
[09:44:57] sameerynho: has joined #ruby
[09:46:47] Trynemjoel: has joined #ruby
[09:47:54] khebbie: has joined #ruby
[09:50:33] layke_: Does this error make sense? Who sould I report it to?
[09:50:34] layke_: https://gist.github.com/Kalyse/29f4f3f97d0a5b82c3cc
[09:51:16] Hounddog: has joined #ruby
[09:51:56] max: has joined #ruby
[09:52:17] Trynemjoel: has joined #ruby
[09:53:10] einarj: has joined #ruby
[09:55:51] Vile`: has joined #ruby
[09:56:15] Hounddog: has joined #ruby
[09:58:04] monoprotic: has joined #ruby
[10:01:00] Ox0dea: layke_: RDoc is being told to parse this file: http://git.io/vOZxs
[10:01:05] Ox0dea: Apparently, it's not handling it very well.
[10:01:18] rakm: has joined #ruby
[10:01:37] ndrei: has joined #ruby
[10:01:56] yfeldblum: has joined #ruby
[10:03:44] A124: has joined #ruby
[10:03:44] A124: has joined #ruby
[10:04:10] layke_: Really struggling with this pygments install
[10:04:18] Trynemjoel: has joined #ruby
[10:04:40] casadei_: has joined #ruby
[10:05:00] layke_: I'm heading out now.. private message if anyone has any ideas :)
[10:07:24] dfockler: has joined #ruby
[10:07:36] niiamon: has joined #ruby
[10:10:45] phutchins: has joined #ruby
[10:11:54] ragingcake: has joined #ruby
[10:12:57] ruurd: has joined #ruby
[10:13:59] juanpablo_______: has joined #ruby
[10:16:51] djbkd: has joined #ruby
[10:19:20] Trynemjoel: has joined #ruby
[10:19:36] j4cknewt: has joined #ruby
[10:22:37] ruurd: has joined #ruby
[10:24:49] lxsameer_: has joined #ruby
[10:25:57] j4cknewt: has joined #ruby
[10:27:08] sepp2k: has joined #ruby
[10:27:20] Trynemjoel: has joined #ruby
[10:28:17] spider-mario: has joined #ruby
[10:28:27] sameerynho: has joined #ruby
[10:29:32] monoprotic: has joined #ruby
[10:31:06] zacstewart: has joined #ruby
[10:31:13] jakesyl: has joined #ruby
[10:37:21] Trynemjoel: has joined #ruby
[10:38:51] OrbitalKitten: has joined #ruby
[10:40:02] quimrstorres: has joined #ruby
[10:43:27] bruno-: has joined #ruby
[10:43:53] matp: has joined #ruby
[10:45:39] sevenseacat: lacrosse: well you're using an EOL version of ruby, for starters
[10:45:46] sevenseacat: bah sorry lacrosse
[10:47:07] FernandoBasso: has joined #ruby
[10:48:17] liiight2: has joined #ruby
[10:48:24] j4cknewt: has joined #ruby
[10:48:52] Trynemjoel: has joined #ruby
[10:48:55] Omni-: has joined #ruby
[10:49:14] khebbie: has joined #ruby
[10:56:23] Trynemjoel: has joined #ruby
[10:57:03] jschmid: has joined #ruby
[10:57:12] CloCkWeRX: has joined #ruby
[10:57:34] bodgix: has joined #ruby
[10:57:45] AlexRussia: has joined #ruby
[10:58:11] RegulationD: has joined #ruby
[11:01:00] sross_work|2: has joined #ruby
[11:01:00] monoprotic: has joined #ruby
[11:01:01] monoprotic: has joined #ruby
[11:02:38] sepp2k: has joined #ruby
[11:05:05] BTRE: has joined #ruby
[11:05:24] Trynemjoel: has joined #ruby
[11:08:43] bruno-: has joined #ruby
[11:10:26] banister: has joined #ruby
[11:10:42] j4cknewt: has joined #ruby
[11:11:58] aiesec: has joined #ruby
[11:12:41] sarkyniin: has joined #ruby
[11:14:00] bruno-: has joined #ruby
[11:15:01] charliesome: has joined #ruby
[11:15:35] skade: has joined #ruby
[11:16:18] nofxx: has joined #ruby
[11:17:37] djbkd: has joined #ruby
[11:18:55] The_Phoenix: has joined #ruby
[11:20:51] ruurd: has joined #ruby
[11:21:55] tubuliferous: has joined #ruby
[11:23:54] j4cknewt: has joined #ruby
[11:25:50] pengin: has joined #ruby
[11:27:46] dorei: has joined #ruby
[11:28:52] banister: has joined #ruby
[11:30:18] DexterLB: has joined #ruby
[11:32:25] zacstewart: has joined #ruby
[11:32:29] monoprotic: has joined #ruby
[11:33:26] Trynemjoel: has joined #ruby
[11:34:10] banister: has joined #ruby
[11:36:30] banister: has joined #ruby
[11:38:41] lxsameer_: has joined #ruby
[11:40:16] Muhannad: has joined #ruby
[11:43:26] charliesome: has joined #ruby
[11:43:27] Trynemjoel: has joined #ruby
[11:44:10] bruno-: has joined #ruby
[11:45:17] banister: has joined #ruby
[11:48:53] dimasg: has joined #ruby
[11:49:00] abara: has joined #ruby
[11:50:11] aiesec: has joined #ruby
[11:50:16] gwendall: has joined #ruby
[11:52:18] banister: has joined #ruby
[11:53:28] casadei_: has joined #ruby
[11:58:28] Trynemjoel: has joined #ruby
[12:00:49] otisZart: has joined #ruby
[12:01:20] bodgix: has joined #ruby
[12:02:33] noeden: has joined #ruby
[12:02:53] allcentury: has joined #ruby
[12:03:04] juanpablo_______: has joined #ruby
[12:03:55] monoprotic: has joined #ruby
[12:04:07] jtdowney: has joined #ruby
[12:04:10] noeden: Hi there. I am new to ruby development and I am trying to develop a command line application with gli. I have to execute it with bundler exec bin/application. How can I install the application to ommit this?
[12:07:28] Pupeno: has joined #ruby
[12:07:49] shevy: no idea about bundler, but in a normal gem structured direction, you just put the file into bin/name_here
[12:08:16] shevy: then when you install that .gem file, it'll be available on the commandline
[12:08:44] shevy: in the .gemspec file, it will be an entry such as ".executables ="
[12:08:54] bruno-: has joined #ruby
[12:09:05] serivich: has joined #ruby
[12:09:07] shevy: http://guides.rubygems.org/specification-reference/#executables
[12:09:29] Trynemjoel: has joined #ruby
[12:10:23] noeden: ah thanks. I have to pack it into a gem file ;)
[12:11:56] shevy: that is the traditional way, to write a .gemspec
[12:12:09] shevy: bundler can use Gemfile, I don't really know the format though
[12:12:25] shevy: there is also #bundler btw in the case nobody else can help
[12:12:50] noeden: I think you gave me enough hints to figure it out myself, thanks a lot
[12:13:52] bruno-: has joined #ruby
[12:15:30] liiight2: has left #ruby: ()
[12:15:32] ishahnaz: has joined #ruby
[12:17:35] jonee: has joined #ruby
[12:18:24] djbkd: has joined #ruby
[12:19:54] araujo_: has joined #ruby
[12:20:29] Trynemjoel: has joined #ruby
[12:21:52] dseitz: has joined #ruby
[12:22:26] calleerlandsson: has joined #ruby
[12:27:57] spidermario: has joined #ruby
[12:28:23] khebbie: has joined #ruby
[12:28:42] [k-_: has joined #ruby
[12:29:22] alveric: has joined #ruby
[12:29:34] senayar: has joined #ruby
[12:32:08] quimrstorres: has joined #ruby
[12:32:48] einarj: has joined #ruby
[12:34:42] ndrei: has joined #ruby
[12:35:06] michael_mbp: has joined #ruby
[12:35:07] monoprotic: has joined #ruby
[12:37:08] last_staff: has joined #ruby
[12:38:31] jbw: has joined #ruby
[12:38:53] alveric: has joined #ruby
[12:39:09] davedev24: has joined #ruby
[12:39:33] schaerli: has joined #ruby
[12:41:16] GriffinHeart: has joined #ruby
[12:42:40] bruno-_: has joined #ruby
[12:43:41] lapide_viridi: has joined #ruby
[12:43:58] phutchins: has joined #ruby
[12:44:53] alveric: has joined #ruby
[12:45:31] duoi: has joined #ruby
[12:53:52] aiesec: has joined #ruby
[12:53:53] Iskarlar: has joined #ruby
[12:55:12] gwendall: has joined #ruby
[12:57:45] alveric: has joined #ruby
[12:58:54] RegulationD: has joined #ruby
[12:59:08] asjidfagruin: has joined #ruby
[13:00:47] wald0: has joined #ruby
[13:01:22] twistedpixels: has joined #ruby
[13:03:08] rubytor: has joined #ruby
[13:03:20] tenderlove: has joined #ruby
[13:06:52] monoprotic: has joined #ruby
[13:06:52] monoprotic: has joined #ruby
[13:08:19] Soda: has joined #ruby
[13:09:46] j3r0: has joined #ruby
[13:10:04] tubuliferous: has joined #ruby
[13:10:20] jonee: has joined #ruby
[13:10:21] atomical: has joined #ruby
[13:12:33] Trynemjoel: has joined #ruby
[13:14:04] lordkryss: has joined #ruby
[13:15:17] D-unit: has joined #ruby
[13:16:05] epistrephein: has joined #ruby
[13:16:52] symm-: has joined #ruby
[13:18:51] bruno-: has joined #ruby
[13:19:08] djbkd: has joined #ruby
[13:21:04] Thomas-0725: has joined #ruby
[13:22:31] ragingcake: has joined #ruby
[13:22:53] Xaitec: has joined #ruby
[13:23:01] ynroot: has joined #ruby
[13:24:36] bnizzle: has joined #ruby
[13:27:20] meshugga1: has left #ruby: ()
[13:30:26] jonee: has joined #ruby
[13:31:43] thiagolc: has joined #ruby
[13:32:31] thiagolc: has left #ruby: ()
[13:32:51] gard: has joined #ruby
[13:33:05] bruno-: has joined #ruby
[13:33:36] einarj: has joined #ruby
[13:33:51] juanpablo_______: has joined #ruby
[13:34:07] zacstewart: has joined #ruby
[13:35:39] bnizzle: i need a hand trying to send a HTTP POST request
[13:35:44] mjs2600_: has joined #ruby
[13:36:00] bnizzle: im trying to auth to Eve's Crest system https://developers.eveonline.com/resource/single-sign-on
[13:36:04] Trynemjoel: has joined #ruby
[13:36:09] bnizzle: i can get the first code via the redirect
[13:36:33] bnizzle: then when i go to authenticate it i keep getting an invlaid header error
[13:36:49] bnizzle: if im using httparty this should be correct?
[13:36:49] bnizzle: @verify = HTTParty.post('https://login.eveonline.com/oauth/token',
[13:36:50] bnizzle: :body => { "grant_type" => "authorization_code&code=#{params[:code]}"},
[13:36:50] bnizzle: :headers => { "Authorization" => "Basic #{ basic_code }"})
[13:37:07] bnizzle: or have i screwed up somewhere?
[13:37:39] [k-_: has joined #ruby
[13:37:43] ishahnaz: has joined #ruby
[13:37:52] tenderlove: has joined #ruby
[13:38:03] mjs2600: has joined #ruby
[13:38:12] monoprotic: has joined #ruby
[13:38:12] monoprotic: has joined #ruby
[13:39:43] The_Phoenix: has joined #ruby
[13:41:19] skade: has joined #ruby
[13:42:19] casadei_: has joined #ruby
[13:45:42] aryaching: has joined #ruby
[13:46:19] tkuchiki: has joined #ruby
[13:46:28] dimasg: has joined #ruby
[13:48:04] ivanskie: has joined #ruby
[13:49:05] Trynemjoel: has joined #ruby
[13:49:48] ukfagsmoker: y'all ever programmed stuff in ruby that makes fun games and such?
[13:50:35] dgutierrez1287: has joined #ruby
[13:50:56] khebbie: has joined #ruby
[13:52:12] niiamon: has joined #ruby
[13:52:33] Scripore: has joined #ruby
[13:52:49] jonee: has joined #ruby
[13:54:36] havenwood: has joined #ruby
[13:54:36] Trynemjoel: has joined #ruby
[13:56:57] alveric: has joined #ruby
[13:57:22] shevy: UKFAGSMOKER I found that games are a lot of work
[13:58:58] Billias: has joined #ruby
[14:00:07] Trynemjoel: has joined #ruby
[14:00:18] RandyT: has joined #ruby
[14:01:14] Phrogz2: has joined #ruby
[14:02:47] dseitz: has joined #ruby
[14:03:00] [k-_: just popped this off of the gist feed: https://gist.github.com/ledestin/5400193fc0ba616c2585
[14:04:05] [k-_: there is very little ruby
[14:04:21] [k-_: c#, java, js, md is frequent
[14:05:46] [k-_: im 11 pages in and only one ruby
[14:07:18] monoprotic: has joined #ruby
[14:07:38] Jackneill: has joined #ruby
[14:08:11] GriffinHeart: has joined #ruby
[14:08:35] ruurd: has joined #ruby
[14:08:37] Trynemjoel: has joined #ruby
[14:09:01] shevy: ruby has a lot of competition
[14:09:12] [k-_: http://www.freecodecamp.com/
[14:09:38] shevy: if only they could use ruby rather than javascript
[14:09:42] [k-_: too bad it's not for ruby though
[14:09:48] [k-_: yeah, javascript zzz
[14:10:44] lkba: has joined #ruby
[14:11:37] alveric: has joined #ruby
[14:12:34] ponga: has joined #ruby
[14:13:31] Scripore: has joined #ruby
[14:13:40] Jarboe: has joined #ruby
[14:13:57] unshadow: has joined #ruby
[14:14:30] unshadow: >> a = "Testing: bar"; a.match(/Testing:(.*?)/).to_a
[14:14:31] ruboto: unshadow # => ["Testing:", ""] (https://eval.in/410495)
[14:14:31] leafybasil: has joined #ruby
[14:14:54] unshadow: Why would'nt it return 0=testing 1=bar ?
[14:18:59] davedev24: has joined #ruby
[14:19:46] [k-_: im not sure why, (not a regexp expert), but the non-greedy .*? did not match bar
[14:19:53] djbkd: has joined #ruby
[14:19:57] [k-_: if you remove the ?, it would work
[14:20:16] [k-_: non-greedy became lazy, i guess
[14:20:38] Trynemjoel: has joined #ruby
[14:20:40] unshadow: Oh... damn... thats a breaking change for me Oo, are you sure ?
[14:20:42] shevy: greedy but lazy - what a combination
[14:20:43] serivich: has joined #ruby
[14:20:50] [k-_: >> "Testing: bar".match(/Testing:(.*)/).to_a
[14:20:52] ruboto: [k-_ # => ["Testing: bar", " bar"] (https://eval.in/410496)
[14:21:02] [k-_: no, non-greedy ??? lazy
[14:21:18] rdark: has joined #ruby
[14:21:29] ragingcake_: has joined #ruby
[14:22:36] [k-_: "Testing: bar x".match /Testing:(.*?)x/ works though
[14:22:53] pontiki: fascinating
[14:22:59] pontiki: i would think it should match
[14:23:22] [k-_: You can try your regexps out on http://rubular.com/
[14:23:29] bronson: has joined #ruby
[14:23:48] shevy: or you can ask [k-_ to try it for you!
[14:23:59] [k-_: i already did
[14:24:02] unshadow: When did the change occured ? can you remmber a version number ? (I need to change some 100+\- places in my program now)
[14:24:10] sdothum: has joined #ruby
[14:24:28] shevy: 1.9>> a = "Testing: bar"; a.match(/Testing:(.*?)/).to_a
[14:24:31] [k-_: there wasn't a change, i think
[14:24:38] shevy: what is the syntax to invoke a special version again?
[14:24:50] [k-_: the parser was just being lazy as there isnt a need to evaluate the rest
[14:25:01] [k-_: 19>> a = "Testing: bar"; a.match(/Testing:(.*?)/).to_a
[14:25:02] ruboto: [k-_ # => ["Testing:", ""] (https://eval.in/410497)
[14:25:08] unshadow: [k-_: it was working till latly
[14:25:08] [k-_: 18>> a = "Testing: bar"; a.match(/Testing:(.*?)/).to_a
[14:25:09] ruboto: [k-_ # => ["Testing:", ""] (https://eval.in/410498)
[14:25:11] theery: has joined #ruby
[14:25:17] [k-_: it never worked!
[14:25:27] [k-_: you need to match something else at the end of the string
[14:25:29] unshadow: ok... this is wierd
[14:25:30] Billias: has joined #ruby
[14:25:36] [k-_: 22:22:35 ([k-_) "Testing: bar x".match /Testing:(.*?)x/ works though
[14:26:07] shevy: it never worked?
[14:26:12] [k-_: i think it was doing right, being a lazy programmer
[14:26:13] Neon: has joined #ruby
[14:26:14] shevy: but he has +100 places where it did work :\
[14:26:27] Azure: has joined #ruby
[14:26:30] [k-_: as i said
[14:26:32] [k-_: 22:22:35 ([k-_) "Testing: bar x".match /Testing:(.*?)x/ works though
[14:26:46] [k-_: you have to match something else behind the non-greedy operator
[14:26:50] pontiki: it works the same in perl
[14:26:55] pontiki: apparently so
[14:27:01] [k-_: as shown by experimental results
[14:27:12] unshadow: shevy: looking at what [k-_ said... this indeed seems to be the cse, I usually do (.*?)\n or something, so there is a \n in the end
[14:27:20] [k-_: if perl says so, it must be true!
[14:27:25] erichodges: has joined #ruby
[14:27:33] shevy: so a trailing \n is the evildoer
[14:27:37] stamina: has joined #ruby
[14:27:42] pontiki: try appending a $
[14:28:17] [k-_: unshadow: so you didnt do it for this case?
[14:29:26] GriffinHeart: has joined #ruby
[14:29:31] Neon: Hello, I'm trying to send some bytes to a server using TCPSocket and there's a 30 second delay until the data is sent. I open the socket, call write twice with strings made with Array#pack, call read and output the result. When I execute that code it takes 30 seconds until the response is output. With a similar script in Python I get an immediate response so it's rather not a server/application issue.
[14:29:35] unshadow: [k-_: yeha, this specific try I didn't do a \n in the end and I didn't notice... I feel stupid , sorry
[14:29:54] unshadow: Neon: socket.flush
[14:29:56] pontiki: >> "Testing: bar".match(/Testing:(.*?)$/)
[14:29:57] ruboto: pontiki # => #<MatchData "Testing: bar" 1:" bar"> (https://eval.in/410499)
[14:30:11] unshadow: pontiki: what does $ means ?
[14:30:14] Neon: unshadow, already tested that, but I'll try it again.
[14:30:17] pontiki: end of line
[14:30:27] [k-_: (before a newline, that is)
[14:30:41] GriffinHeart: has joined #ruby
[14:30:48] pontiki: >> "Testing: bar\nought else".match(/Testing:(.*?)$/)
[14:30:49] ruboto: pontiki # => #<MatchData "Testing: bar" 1:" bar"> (https://eval.in/410500)
[14:30:50] [k-_: it forces the non-greedy operator to look at the rest of the string
[14:30:57] pontiki: >> "Testing: bar\nought else".match(/Testing:(.*?)\z/)
[14:30:58] ruboto: pontiki # => nil (https://eval.in/410501)
[14:31:00] Neon: unshadow, doesn't work unfortunately :(
[14:31:19] unshadow: Neon: when building the socket you can try using the nodelay flag
[14:31:19] [k-_: Neon: have you waited 30s yet :3
[14:32:00] Thomas-0725: is it ok/reliable to use something like this_statement_is_true || perform action ? e.g. 1 == var || var = 3 (as in, assign 3 to var unless var already equals 1)
[14:32:13] haroldwu: has joined #ruby
[14:32:23] Neon: unshadow, where do I pass that? I'm using http://ruby-doc.org/stdlib-2.2.0/libdoc/socket/rdoc/TCPSocket.html
[14:33:35] pontiki: Thomas-0725: it seems a bit more obscure than doing: var = 3 if 1 == var
[14:33:39] [k-_: Thomas-0725: yes, that would work
[14:33:56] [k-_: pontiki: there is still something wrong with that order there
[14:34:05] [k-_: the subject is wrong!
[14:34:26] pontiki: kay: most people would reverse the 1 == var
[14:34:32] pontiki: but it is not incorrrect
[14:35:39] pontiki: if you mistype == with = a lot, the error shows up a lot faster if you put the immutable part on the left :)
[14:36:09] ruurd: has joined #ruby
[14:36:24] unshadow: Neon: s = TCPSocket.new(bla, 80); s.setsockpot(Socket::Option.linger(false))
[14:36:35] Thomas-0725: pontiki, ok thanks. Although I would use unless 1 == var for my example, but point taken no less
[14:36:45] [k-_: pontiki: substitude a logical error with another?
[14:36:58] unshadow: Neon: or (true, 10)
[14:37:02] pontiki: oh, sorry, Thomas-0725,you are correct: unless instead of if
[14:37:21] Thomas-0725: 1 == var is not a logical error
[14:37:55] ThatsNotJack: has joined #ruby
[14:38:02] [k-_: you are going to check if var (the subject) is equal to 1 (the object)
[14:38:06] pontiki: it's possible you may have to hunt for quite some time to find out that you typed var = 1 instead of var == 1; 1 == var will blow up right away
[14:38:21] pontiki: it's not a logical error at that point, it's a typo
[14:38:43] [k-_: it's weird to 1 == var
[14:38:51] [k-_: i always put the subject first
[14:39:21] pontiki: most people do
[14:39:25] aryaching: has joined #ruby
[14:39:26] Thomas-0725: that's your style. your style does not define logic. ;P
[14:39:30] pontiki: it still doesn't make the other wrong
[14:40:04] [k-_: by convention and maths, it is always the LHS!
[14:40:28] pontiki: well, there you are wrong for maths
[14:40:32] Thomas-0725: equality is symmetric, so by maths it does not matter. by convention, you may be on to something
[14:40:55] [k-_: you dont do 6 = x do you
[14:41:14] pontiki: THAT'S WHY IT'S AN ERROR
[14:41:20] Thomas-0725: not in Ruby, because = is an assignment operator. In maths, however, 6 = x is perfectly valid.
[14:41:34] pontiki: we're talking about ==
[14:41:37] [k-_: no, it is wrong, you cant define 6 as x!
[14:41:44] [k-_: 6 is a constant in maths!
[14:42:03] Thomas-0725: ok, well I'm going to abandon this argument in favor of something more productive. thanks for the help :)
[14:42:07] [k-_: if i marked someone's paper and they did that, i would mark them wrong
[14:42:23] ruurd: has joined #ruby
[14:42:28] pontiki: in maths, = is an equation, not an assignment; = is an operation in programmaing, in maths it denotes and equation
[14:43:04] Neon: unshadow, not working. I've made a test you can do as well, see http://pastebin.com/Ka0NszB8 if you can reproduce the delay.
[14:43:05] ruboto: Neon, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/924abbb0af319dad728e
[14:43:05] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[14:43:09] pontiki: you are creating a false equivalency on two levels, kay
[14:43:12] casadei_: has joined #ruby
[14:43:13] [k-_: it never made sense to me to put the variable for right
[14:43:18] [k-_: it never did!
[14:43:31] pontiki: kay: == is NOT an ASSIGNMENT
[14:43:38] pontiki: it's a COMPARISON
[14:43:46] [k-_: BUT THE SUBJECT IS WRONG
[14:43:50] adaedra: some people put variable on the right so, if they forgot one = by error, the compiler/interpreter throws an error
[14:43:59] adaedra: it's a safety nest
[14:44:00] pontiki: there is no subject in a comparison
[14:44:12] pontiki: adaedra: that was my point exactly above
[14:44:13] Tempesta: has joined #ruby
[14:44:41] [k-_: but i dont agree with it!
[14:44:54] pontiki: don't do it
[14:44:56] [k-_: it's fine but the subject is still wrong
[14:44:59] adaedra: anyway, it can lead, in some cases to error in ruby if you compare two objects that have a different .==() method
[14:45:18] adaedra: [k-_: you can't disagree with a general fact
[14:45:28] pontiki: they can, but they would be wrong
[14:45:36] adaedra: also, this is something inherited from C
[14:45:45] [k-_: i dont agree with the act of putting the subject after
[14:45:57] adaedra: then don't do it
[14:45:58] CustosLimen: has joined #ruby
[14:46:06] adaedra: We explained why some people do like so
[14:46:15] adaedra: We're not forcing you to do it
[14:46:41] [k-_: i never did, i argued for the sake of making others understand my view
[14:46:42] adaedra: pontiki: sorry for repeating, it seemed like the point was not made.
[14:46:58] Neon: And here is basically the same in python https://gist.github.com/Neosublimation/15a2245269b7d91f3f0f (sorry if that offends you), proving that it's not the server's fault.
[14:47:18] [k-_: it was already made, i already accepted it, but i dislike it still
[14:47:38] pontiki: you have until just the past 2 comments never indicated any acceptance
[14:47:44] [k-_: maybe my use of the word "wrong" was wrong
[14:48:09] [k-_: my use of "wrong" is wrong ok
[14:49:19] serivich: has joined #ruby
[14:49:32] skade: has joined #ruby
[14:50:33] serivich: has joined #ruby
[14:51:32] [k-_: i was busy thinking of the word: i think it's against convention. arguably a phrase but ??\_(???)_/??
[14:51:51] gwendall: has joined #ruby
[14:52:06] lukas: has left #ruby: ("WeeChat 0.4.2")
[14:52:10] Trynemjoel: has joined #ruby
[14:52:19] AnoHito: has joined #ruby
[14:53:23] adaedra: against what convention
[14:55:10] [k-_: subject == object
[14:55:24] christiandsg: has joined #ruby
[14:55:28] [k-_: John is a boy
[14:55:40] [k-_: people = 5
[14:56:01] theery: has joined #ruby
[14:56:20] Violentr: has joined #ruby
[14:56:46] pontiki: first: stop conflating different operations with left-right convetions
[14:57:18] pontiki: in ruby, you are sending messages to objects
[14:57:52] shevy: I send message objects!
[14:57:57] pontiki: subject.==(object) means something very deliberately different than subject.=(object)
[14:58:13] tubuliferous: has joined #ruby
[14:58:24] [k-_: yes they are different
[14:58:33] pontiki: object.==(subject), if object and subject match types or are convertable to matching types, are equivalent operations.
[14:58:40] pontiki: when they aren't you should get an error
[14:58:46] pontiki: THAT IS ENTIRELY THE POINT
[14:59:16] adaedra: pontiki: I think [k-_'s point is just "You must all code like I code"
[14:59:54] pontiki: frivolous trolling, then
[15:00:12] [k-: something like that, i was pushing for subject first
[15:00:20] [k-: not really to force
[15:00:29] adaedra: no, you're saying the other way is wrong.
[15:00:45] [k-: i corrected myself already :(
[15:00:46] Thomas-0725: are variables assigned within if statements local to those if statements?
[15:01:03] [k-: wait yes
[15:01:06] [k-: i misread that
[15:01:50] [k-: actually i should clear it up
[15:02:01] pontiki: probably not
[15:02:07] pontiki: if you don't really understand
[15:02:08] diegoviola: has joined #ruby
[15:02:16] adaedra: easy to try by yourself, though
[15:02:16] [k-: did you mean if (assignment) { } or if () { assignment }
[15:04:04] freerobby: has joined #ruby
[15:04:05] ragingcake: has joined #ruby
[15:05:37] dionysus69: has joined #ruby
[15:05:55] _blizzy_: has joined #ruby
[15:08:15] schaerli: has joined #ruby
[15:08:32] ChanServ: -b centrx!*@*
[15:12:59] _Aleserche_: has joined #ruby
[15:14:12] Trynemjoel: has joined #ruby
[15:14:44] marr: has joined #ruby
[15:15:39] ruurd: has joined #ruby
[15:20:16] roolo: has joined #ruby
[15:20:43] djbkd: has joined #ruby
[15:21:05] einarj: has joined #ruby
[15:21:38] jimms: has joined #ruby
[15:22:17] juanpablo_______: has joined #ruby
[15:23:45] theery: has joined #ruby
[15:24:04] Scripore: has joined #ruby
[15:24:19] gwendall: has joined #ruby
[15:24:23] einarj_: has joined #ruby
[15:26:43] Neon: I've installed the varint gem (https://github.com/liquidm/varint/blob/master/ext/varint/varint.c) and require 'varint/varint' returned true. However, neither Varint.encode nor Varint.decode are defined. As there is no documentation maybe someone here can help me with this.
[15:29:14] Neon: Ew, I need to extend the module. That's a weird concept, isn't it?
[15:29:50] [k-_: is Varint defined?
[15:30:13] Neon: Yes yes. I made a v = Object.new.extend(Varint) and then I can use v.encode and v.decode...
[15:30:24] Neon: Is that a usual design?
[15:31:04] Neon: I just saw they used rb_define_method and a method is usually an object-bound thing, but Varint is only a Module.
[15:31:18] Neon: So it was probably lacking object context
[15:31:24] [k-_: try include
[15:31:48] Neon: Instead of require?
[15:32:05] canton7: I imagine the intended use-case is that you define a class which can be encoded and decoded, and include Varint into that class, which will give you the methods #encode and #decode on that class
[15:32:22] tuelz: has joined #ruby
[15:32:26] [k-_: Neon: include is totally diffenet from require
[15:32:48] Neon: Could be, but if I understand the C code correctly you have to pass an IO object to encode and decode.
[15:33:47] Neon: [k-_, I know, isn't it used to include a Module into a Class or another Module?
[15:34:15] [k-_: yea, but you wanted to use it instead of require!
[15:34:47] khebbie: has joined #ruby
[15:34:48] Neon: [k-_, no, I asked you if you meant me to use it instead of require, because otherwise I don't understand your suggestion.
[15:35:15] Neon: Because I said it appears to work with Object.new.extend(Varint) and you suggest me to try include.
[15:35:39] [k-_: replace extend with include of course!
[15:35:57] [k-_: >> Object.new.include(Enumerable)
[15:35:58] ruboto: [k-_ # => undefined method `include' for #<Object:0x41f04308> (NoMethodError) ...check link for more (https://eval.in/410515)
[15:36:27] Thomas-0725: Can anyone suggest improvements or things that could be done differently? https://gist.github.com/thomasbcolley/94509c3d4e63abc91241
[15:36:29] Neon: What would be wrong with extend?
[15:36:52] [k-_: include is for instance methods iirc
[15:37:18] gambl0re: has joined #ruby
[15:37:41] [k-_: &ri Array#uniq
[15:37:41] `derpy: http://www.rubydoc.info/stdlib/core/Array#uniq-instance_method
[15:37:44] [k-_: ^ Thomas-0725
[15:37:50] pontiki: extend adds to an object, include adds to a class
[15:39:04] Thomas-0725: I know about uniq. uniq is not what I want, so what are you trying to tell me? :x
[15:39:08] nfk: has joined #ruby
[15:39:25] [k-_: are you sure it is not what you want?
[15:39:37] imperator: has joined #ruby
[15:39:45] Trynemjoel: has joined #ruby
[15:39:45] Thomas-0725: The method I have linked to patches the Hash class to include a new method that takes another hash as an argument and returns a new hash which includes members found in one hash or the other, but not both
[15:39:56] [k-_: oh wait, my logic is wrong
[15:40:57] canton7: Neon, I imagine usage is similar to this: http://pastie.org/10325916 ?
[15:41:29] Neon: canton7, probably.
[15:41:30] imperator: good morning
[15:42:39] Oka: has joined #ruby
[15:44:14] hakunin: has joined #ruby
[15:44:50] roolo: has joined #ruby
[15:45:08] soahccc^: has joined #ruby
[15:45:09] jjj123: has joined #ruby
[15:45:33] nfk: has joined #ruby
[15:45:34] skryking: has joined #ruby
[15:45:35] _whitelogger: has joined #ruby
[15:45:45] Trynemjoel: has joined #ruby
[15:45:46] ponga: has joined #ruby
[15:45:48] theery: has joined #ruby
[15:46:06] abdulrehman: has joined #ruby
[15:46:40] atmosx: imperator: it's 18:46 here!
[15:46:56] imperator: where you at atmosx ?
[15:46:57] whiteline: has joined #ruby
[15:47:02] atmosx: imperator: Greece
[15:47:10] atmosx: imperator: GMT +3
[15:47:21] leafybasil: has joined #ruby
[15:47:34] calleerlandsson: has joined #ruby
[15:47:35] imperator: never been, need to visit sometime
[15:47:37] shevy: this is the amount of GUI that ruby can compete with: https://www.youtube.com/watch?v=emh22gT5e9k
[15:47:51] atmosx: [k-_: where's that?
[15:48:02] atmosx: imperator: yeah, awesome beaches
[15:48:21] havenwood: atmosx: Thessaloniki \o/
[15:48:35] imperator: atmosx, got a degree in classics, i'd visit the acropolis, etc :)
[15:48:48] imperator: i guess i could do both
[15:48:56] atmosx: havenwood: hahahaha I'm like 2 hours away :-P have you ever visited Thess/niki?
[15:49:00] atmosx: imperator: oh cool then!
[15:49:04] [k-_: singapore
[15:49:08] atmosx: imperator: yeah sure, it's easy doing both.
[15:49:09] havenwood: atmosx: yup, i drove like a maniac to fit in...
[15:49:21] atmosx: [k-_: oh, awesome. I'd like to visit Singapore some time.
[15:49:33] atmosx: havenwood: hahahahahahaha, when?
[15:49:38] atmosx: when did this happen?
[15:50:02] elektronaut: has joined #ruby
[15:50:24] havenwood: atmosx: hem, years ago - more than five years ago but less than ten
[15:50:55] skryking: has left #ruby: ()
[15:50:56] atmosx: did you stay at Thess/niki or did you go to Chalkidiki (the peninsula right next)
[15:51:23] havenwood: atmosx: stayed in, then visited sis out in the countryside and went to Meteora
[15:51:32] havenwood: atmosx: good trip!
[15:51:54] phrozen77: has joined #ruby
[15:51:57] atmosx: havenwood: did you like the girls at Thess/nki? it's kinda crazy student-driven city. Lots of pubs/clubs/nightlife
[15:52:18] atmosx: meteora are great too
[15:52:27] bauruine: has joined #ruby
[15:52:32] drPoggs: has joined #ruby
[15:53:01] havenwood: atmosx: I did enjoy the nightlife. A bustling city!
[15:53:09] MatthewsFace: has joined #ruby
[15:53:13] Trieste: has joined #ruby
[15:53:18] havenwood: Fun when people go out.
[15:53:20] atmosx: yeah, it is.
[15:53:25] nateberkopec: has joined #ruby
[15:53:29] atmosx: actually you have to go out after 21:00
[15:54:03] atmosx: nice, too bad I didn't know you back then. I might have been your city-guide! :-)
[15:54:52] tmtwd: has joined #ruby
[15:55:00] Matthews_: has joined #ruby
[15:55:14] abdulrehman: has left #ruby: ()
[15:56:46] Trynemjoel: has joined #ruby
[15:58:29] imperator: atmosx, just curious, can you read ancient greek (herodotus, etc) or is it like me trying to read old english?
[15:59:48] atmosx: imperator: I studied ancient Greek at school (everybody here does, the extend ranges though) but not really. I would miss a lot. It's a lot worse than you reading Shakespeare. It's like you reading latin actually.
[16:00:38] atmosx: I'm also half Italian, I can understand some latin (I studied latin in the univ. actually) but ancient Greek is IMHO more distant to modern Greek than Latin to Italian.
[16:00:54] gwendall: has joined #ruby
[16:00:58] atmosx: imperator: can you?
[16:01:05] chris2: has joined #ruby
[16:01:08] imperator: not so much any more
[16:01:40] atmosx: how did you turn out a programmer from the classics?
[16:01:59] imperator: i got my masters then decided i needed an income
[16:02:05] imperator: so...i joined the air force
[16:02:09] imperator: and they made me a programmer
[16:03:25] pontiki: some of the best programmers i've known have been English majors
[16:03:51] imperator: btw, old english == much older than shakespeare :)
[16:03:52] leesharma: has joined #ruby
[16:04:20] imperator: here's a cool example: https://web.cn.edu/kwheeler/diagram_4English.html
[16:04:54] atmosx: ah well that's complicated too
[16:04:56] imperator: ACTION wonders if those characters are in the unicode standard
[16:05:16] pontiki: oh, it's an image :( i was wondering where you got the web typeface for that
[16:05:24] jimms: has joined #ruby
[16:05:57] Scripore: has joined #ruby
[16:06:47] cornerma1: has joined #ruby
[16:07:19] rickmasta: has joined #ruby
[16:07:36] imperator: well, i put the masters to good use - made a couple historical wargames :)
[16:08:09] atmosx: really? cool
[16:08:45] imperator: http://www.boardgamegeek.com/boardgame/43245/caesars-gallic-war
[16:08:52] dseitz: has joined #ruby
[16:08:56] imperator: http://www.boardgamegeek.com/boardgame/136955/hands-sea
[16:12:06] freerobby: has joined #ruby
[16:12:24] atmosx: is there a company that makes all the pieces?
[16:12:34] atmosx: like you give them the rules, etc. or you have to figure out everything yourself?
[16:13:23] imperator: the publisher handles the physical components
[16:13:30] imperator: but typically you make a prototype yourself
[16:13:41] imperator: you can order games bits online, or make your own
[16:15:15] jjj123: has joined #ruby
[16:16:35] patteh: has joined #ruby
[16:16:48] Trynemjoel: has joined #ruby
[16:19:41] leat: has joined #ruby
[16:21:01] spider-mario: has joined #ruby
[16:21:27] djbkd: has joined #ruby
[16:21:38] atmosx: I see, cool
[16:24:18] senayar: has joined #ruby
[16:26:19] Trynemjoel: has joined #ruby
[16:28:09] perturbation: has joined #ruby
[16:28:17] workmad3: has joined #ruby
[16:28:43] Igorshp: has joined #ruby
[16:29:04] patteh_: has joined #ruby
[16:29:09] CustosLimen: has joined #ruby
[16:29:14] akkad: has joined #ruby
[16:29:34] centrx: has joined #ruby
[16:32:03] casadei_: has joined #ruby
[16:32:19] Trynemjoel: has joined #ruby
[16:33:53] ruurd: has joined #ruby
[16:34:11] Vile`: has joined #ruby
[16:34:43] einarj: has joined #ruby
[16:35:28] schaerli: has joined #ruby
[16:37:13] ruurd: has joined #ruby
[16:39:00] Igorshp: has joined #ruby
[16:39:20] exadeci: has joined #ruby
[16:39:52] j3r0: has joined #ruby
[16:40:34] apfeluser: has joined #ruby
[16:40:34] chihhsin: has joined #ruby
[16:41:37] NeverDie: has joined #ruby
[16:42:18] blue_deref: has joined #ruby
[16:42:20] Trynemjoel: has joined #ruby
[16:43:15] chinmay_dd: has joined #ruby
[16:44:45] radgeRayden: has joined #ruby
[16:46:22] tkuchiki: has joined #ruby
[16:46:25] tubuliferous: has joined #ruby
[16:47:32] araujo: has joined #ruby
[16:47:33] araujo: has joined #ruby
[16:47:45] Igorshp: has joined #ruby
[16:47:50] dimasg: has joined #ruby
[16:48:08] pawnbox: has joined #ruby
[16:48:51] ruurd: has joined #ruby
[16:49:44] treybul: has joined #ruby
[16:50:18] phutchins: has joined #ruby
[16:52:59] treybul: maybe this is a dumb question, but in rspec can you test if two functions give the same value in the following manner: expect(subject.functionA(1)).to eq subject.functionB(1)
[16:53:17] akkad: has joined #ruby
[16:54:30] Coraline: treybul: why not just try it?
[16:54:43] treybul: doesnt work
[16:54:51] drewo: has joined #ruby
[16:54:58] Coraline: What's the result you get?
[16:55:37] christiandsg: has joined #ruby
[16:57:36] treybul: error refers to a "undefined method `each' for nil:NilClass
[16:57:36] treybul: but when i run the code in irb and test values for functiona and functionb i get the same values. strange
[16:57:54] abdulrehman: has joined #ruby
[17:00:12] Coraline: How are you defining 'subject'?
[17:00:51] diegoviola: what is % in ruby? like when you say "This is a %s in ruby" % ["string"]
[17:01:05] adaedra: &ri String#%
[17:01:05] `derpy: http://www.rubydoc.info/stdlib/core/String#%25-instance_method
[17:01:13] Coraline: Sounds like error might be with how you set that up. Somewhere in your class you're calling each on an atttribute that you didn't set in your test setup.
[17:01:15] treybul: just an instance of the class
[17:01:21] Trynemjoel: has joined #ruby
[17:02:00] adaedra: diegoviola: in a string, the format method, see the link above
[17:02:01] Coraline: treybul: track the error down using the stacktrace from the "undefined method" exception
[17:02:25] apeiros: diegoviola: note that % is a method, and like all methods, what it does depends on what you call it on.
[17:02:37] treybul: in principle though, what I am doing is allowed in rspec? that's really the answer I'm after. I have a feeling you can only use "to eq" for specific values/strings and can't compare functions
[17:02:46] bruno-: has joined #ruby
[17:03:23] diegoviola: I see, thanks
[17:03:57] treybul: i can try fixing the code, but I want to first know if what I am doing is actually allowable
[17:04:16] rickmasta: has joined #ruby
[17:04:18] pontiki: treybul: try wrapping the arguement to eq in parens: eq(subject.functionB(1))
[17:04:43] pontiki: if that doesn't work, i suspect the issue may be with using subject in the eq, but i'm not sure
[17:05:30] treybul: yeah i did that with no luck
[17:05:58] pontiki: in general, though, you should be able to pass any expression to eq()
[17:06:01] saddad: has joined #ruby
[17:06:03] jamesaxl: has joined #ruby
[17:06:21] ThatsNotJack: has joined #ruby
[17:06:43] tresmundos: has joined #ruby
[17:07:20] tresmundos: chanel in spanish or ingles
[17:08:05] bruno-: has joined #ruby
[17:08:20] treybul: how about this: expect(subject.functionA(1)).to eq subject.count -where lets say subject is an array instance. Is this a viable rspec test? You're basically checking if your function is equivalent to the .count inbuilt method
[17:08:40] NoidedSuper: has joined #ruby
[17:11:03] juanpablo_______: has joined #ruby
[17:11:17] chouhoulis: has joined #ruby
[17:11:33] Coraline: treybul: like I said, read your stack trace
[17:11:36] pontiki: i don't believe your problem is with rspec
[17:12:32] treybul: ok, but is the test i propose in my previous comment acceptable code in rspec? if the answer is yes then I can look into fixing the method, otherwise there is no point pursuing the fix
[17:12:49] m8: has joined #ruby
[17:13:04] devbug: has joined #ruby
[17:13:25] mleung: has joined #ruby
[17:13:56] pontiki: https://github.com/tamouse/example-rspec_eq_test/blob/master/spec/rspec_eq_test_spec.rb#L15
[17:14:39] kirun: has joined #ruby
[17:14:48] bruno-: has joined #ruby
[17:17:56] chouhoulis: has joined #ruby
[17:19:03] treybul: im just impressed how quickly that was put up
[17:19:48] pontiki: how long should it take to make a simple test case?
[17:20:07] bruno-: has joined #ruby
[17:20:10] treybul: for a newbie like me things take time
[17:20:28] pontiki: run: bundle gem NAME -t rspec
[17:20:36] pontiki: modify the spec file
[17:20:42] pontiki: modify the library file
[17:21:31] treybul: well it looks like it works
[17:22:14] djbkd: has joined #ruby
[17:22:36] dfockler: has joined #ruby
[17:23:42] pontiki: additionally: http://rspec.info/documentation/3.3/rspec-expectations/RSpec/Matchers.html#eq-instance_method
[17:24:48] GriffinHeart: has joined #ruby
[17:24:49] ynroot: has joined #ruby
[17:25:09] senayar: has joined #ruby
[17:26:00] treybul: thanks - really helpful
[17:26:25] ynroot: has joined #ruby
[17:27:37] tmtwd: has joined #ruby
[17:30:15] Thiru: has joined #ruby
[17:30:26] rickmasta: has joined #ruby
[17:32:31] pontiki: treybul: i make tiny little examples of things i don't understand, until i do understand them
[17:32:40] nateberkopec: has joined #ruby
[17:32:46] pontiki: i have examples folders just packed full of things
[17:33:08] Thiru: how to collaborate with yours ?
[17:33:19] dgutierrez1287: has joined #ruby
[17:33:46] Coraline: Thiru: I don't understand your question, can you rephrase it please?
[17:34:50] Thiru: I am new to this place. Is this a doubt clarification area for ruby ?
[17:35:31] pontiki: i think the answer is "yes"
[17:35:58] pontiki: "doubt clarification area for ruby" -- you can ask and answer questions about ruby
[17:36:11] codecop: has joined #ruby
[17:36:20] CustosLimen: has joined #ruby
[17:37:33] Thiru: oh ok thanks. If i have any doubts or answers i will post here.
[17:37:55] freerobby: has joined #ruby
[17:40:09] HoppingMadMan: has joined #ruby
[17:40:10] Musashi007: has joined #ruby
[17:40:33] mjs2600: has joined #ruby
[17:41:54] shevy: Thiru getting an IRC client might help, I found webchat very limited
[17:42:03] tkuchiki: has joined #ruby
[17:42:14] sdwrage: has joined #ruby
[17:42:40] hmnhf: has joined #ruby
[17:43:23] centrx: shevy, Do you use node.js in addition to PHP?
[17:43:39] shevy: I use neither of that
[17:44:10] shevy: only thing related to javascript that I use is jquery, which is actually nice. for my webstuff I just add :drag when I want to drag an element and it works \o/
[17:44:40] schaerli: has joined #ruby
[17:44:55] centrx: and all this time I thought you were a PHP guru
[17:45:06] shevy: I abandoned PHP more than 10 years ago!
[17:45:17] chuy: has joined #ruby
[17:46:04] shevy: centrx I do scan every once in a while whether http://php.net/manual/en/ has anything useful though that can be put into ruby
[17:46:17] sepp2k: has joined #ruby
[17:46:19] theery: has joined #ruby
[17:47:13] shevy: they got a fancier webpage now http://php.net/manual/en/intro.apd.php - makes the ruby website look old :(
[17:47:29] minotep: has joined #ruby
[17:47:46] pontiki: i miss the old one
[17:47:53] casadei_: has joined #ruby
[17:48:09] yfeldblum: has joined #ruby
[17:48:54] j_mcnally: has joined #ruby
[17:49:11] shevy: what gets to me is when functionality gets lost during an update
[17:49:29] shevy: the new gist.github page does not allow me to easily copy/paste anymore with middle mouse button click
[17:49:30] j_mcnally: has joined #ruby
[17:49:30] pontiki: this is common with web site facelifts
[17:49:33] zacstewart: has joined #ruby
[17:50:44] pontiki: i miss having a middle button i can click
[17:50:53] pontiki: i can't manage clicking the wheel
[17:50:55] centrx: running around in circles
[17:51:14] shevy: power-pontiki
[17:51:17] shevy: power-mouse
[17:51:21] sdwrage: has joined #ruby
[17:51:39] ragingcake: has joined #ruby
[17:51:42] pietr0: has joined #ruby
[17:51:43] pontiki: it's a logictech m570
[17:51:51] pontiki: not sure you can call it a mouse, exactly
[17:52:14] shevy: gun station
[17:52:25] Outlastsheep: Mice. Who needs them :L
[17:52:39] Outlastsheep: Exactly. And I am not a cat.
[17:52:42] pontiki: ACTION weeps
[17:52:48] firoxer: pontiki: is your mouse sticky too or is it just me?
[17:52:54] firoxer: Got the same mouse
[17:53:00] adaedra: sticky mouse?
[17:53:16] shevy: I had a mouse whose plastic covering fell apart every second month
[17:53:17] pontiki: firoxer: it gets sticky, then i clean it out
[17:53:18] Outlastsheep: I've heard of sticky keys, but sticky /mouse/?
[17:53:23] firoxer: Yeah, it's the ball that gets all sticky
[17:53:31] shevy: since that day I am all for black mice
[17:53:39] pontiki: pop out the ball, wash it, and use a pencil eraser to clean the wheels inside
[17:53:46] centrx: my mouse is made out of lasers
[17:53:49] shevy: laser mouse for the win
[17:53:49] firoxer: Pencil eraser? Gotta try that
[17:53:55] firoxer: Thanks for the tip
[17:54:15] shevy: cats stand no chance at all against a mouse with a laser
[17:54:45] ynroot: hi , i found tutorial every where about how to do many things with ruby on rails, none about what to do when your aplication is done, do you have a tutorial for that
[17:54:49] pietr0_: has joined #ruby
[17:55:02] ruboto: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[17:55:07] pontiki: firoxer: other fix: keep your hands perfectly clean while using it :>
[17:55:36] Frem: has joined #ruby
[17:55:36] ruboto: I don't know anything about trains
[17:55:54] adaedra: I like trains.
[17:56:07] centrx: Trains can be powered by a variety of energy sources including steam, diesel and electricity.
[17:56:23] christiandsg: has joined #ruby
[17:56:45] skade: has joined #ruby
[17:56:46] firoxer: pontiki: I do; I'm a Ruby programmer anyway, not a filthy Java peasant
[17:56:51] adaedra: Don't forget the hype train.
[17:57:05] pontiki: or the crazy train
[17:57:23] pontiki: lol firoxer
[17:57:25] spleeze: has joined #ruby
[17:57:42] adaedra: We don't talk about Java here.
[17:57:51] pontiki: except to belittle it
[17:58:01] shevy: firoxer ruby was your first scripting language? or did you dabble in php... perl or python
[17:58:46] firoxer: shevy, I do PHP at work and it was my first language so... I confess
[17:59:30] adaedra: Nobody expects the shevy inquisition
[17:59:35] centrx: burn him!
[17:59:47] adaedra: mysqli_real_burn()
[17:59:56] firoxer: Hey, a man's gotta do what a man's gotta do
[17:59:58] shevy: adaedra you are one monty python fan
[18:00:04] firoxer: We got Centos 5, Apache, all of that
[18:00:08] crankharder: has joined #ruby
[18:00:23] adaedra: Do you have dinosaurs, too?
[18:01:17] shevy: well they surely give one opportunity to use ruby 1.8.7
[18:01:30] nateberkopec: has joined #ruby
[18:03:01] firoxer: I do most of my work thru SSH (as opposed to SCP + Notepad++ as the guy before me used to)
[18:03:32] firoxer: And I tried to install Syntastic and all of that pompous hipster shit to actually program instead of checking for syntax errors
[18:03:49] yaw: has joined #ruby
[18:04:23] firoxer: But alas, I'd have to compile Vim 7.4 manually to get it to work... and to compile, I'd need a newer version of GCC, which, in turn, needs a newer version of coreutils
[18:04:26] firoxer: Into the rabbit hole!
[18:04:31] firoxer: </offtopic>
[18:04:38] devdazed: has joined #ruby
[18:04:47] miah: you don't do dev on your laptop/workstation? or your workstation also runs centos5?
[18:05:12] diegoviola: firoxer: just use your distro package manager
[18:05:27] shevy: firoxer I can understand that - however had for the most part, compiling into the home directory should work
[18:05:28] miah: diegoviola: that wont help
[18:05:37] firoxer: We use Git, and I'd like to have a copy of the database etc., but it's just too much of a hassle to install everything in a VM...
[18:05:44] firoxer: diegoviola, we got CentOS 5
[18:06:04] banister: has joined #ruby
[18:06:22] firoxer: shevy, I'd have to recompile 99% of the system
[18:06:34] christiandsg: has joined #ruby
[18:06:52] firoxer: diegoviola, I've suggested that and got the permission... but I'll have to wait till autumn
[18:06:57] yaw: has left #ruby: ()
[18:06:58] miah: recompile 95% of the system to compile vim? no.
[18:07:49] diegoviola: I hope you are not doing make install as root
[18:07:55] firoxer: miah, I feel obliged to give you the credentials to our backend
[18:07:59] diegoviola: because that will just break things
[18:08:07] miah: firoxer: are you going to pay me?
[18:08:07] firoxer: diegoviola, that'd be an improvement
[18:08:19] diegoviola: firoxer: not really
[18:08:33] shevy: diegoviola are you still using windows
[18:08:35] miah: you should be able to compile most of this stuff in your ~ without too much issue
[18:08:38] diegoviola: shevy: no, I quit
[18:08:51] diegoviola: shevy: serious
[18:08:55] shevy: whoa... things change quickly
[18:09:05] shevy: now I can't make windows jokes anymore :(
[18:09:08] firoxer: miah, it's just going to be easier to format and reinstall the whole shit from the ground up
[18:09:19] miah: firoxer: i agree, but you can't do that _now_
[18:09:29] miah: firoxer: you can do that in "the fall" which is months away
[18:09:47] craysiii: why does one use ruby on windows :)
[18:09:49] firoxer: miah, I'll manage
[18:09:53] miah: so concentrate on what you can do today to resolve your development woes =)
[18:09:55] diegoviola: craysiii: I don't
[18:10:03] shevy: craysiii for a job where they put you in a prison called a room with co-workers
[18:10:05] diegoviola: I've been using Linux for 15 years
[18:10:24] firoxer: miah, my to-do's way too long for concentrating on tools
[18:10:25] diegoviola: craysiii: I was forced to use Windows at some company but I quit working for this company
[18:10:35] shevy: diegoviola you quit a lot man!
[18:10:46] diegoviola: shevy: meaning?
[18:10:52] shevy: meaning you quit a lot
[18:11:03] diegoviola: that doesn't make any sense
[18:11:07] miah: firoxer: so you're complaining just to vent and not really seeking resolution to your issue?
[18:11:12] shevy: yeah then don't quit a lot!
[18:11:35] firoxer: miah, the resolution is just to wait and vent :D
[18:11:51] shevy: there are doers
[18:11:55] shevy: and then there are waiters
[18:12:05] diegoviola: shevy: I didn't quit, I was going to quit but they fired me
[18:12:07] mikecmpbll: has joined #ruby
[18:12:19] schaerli: has joined #ruby
[18:12:20] miah: getting fired is :( been there a few times.
[18:12:55] crdpink: has joined #ruby
[18:13:02] mikecmpbll: anyone any ideas how i find the first previous sibling that matches a selector, in nokogiri?
[18:13:21] diegoviola: shevy: what are you talking about?
[18:14:14] shevy: don't quit
[18:14:30] diegoviola: please be less vague
[18:14:34] diegoviola: quit from what?
[18:14:42] shevy: from what could you possibly quit?
[18:14:48] miah: dont quit the Justice League
[18:15:07] craysiii: don't stop. believing
[18:15:13] craysiii: hold on to that feeling.
[18:15:20] miah: ACTION youtubes some Journey
[18:15:22] adaedra: don't stop me now ???
[18:16:15] mikecmpbll: example, fwiw: https://gist.github.com/mikecmpbll/d95c01ae4223e9202cd4
[18:17:12] ohaibbq: has joined #ruby
[18:17:15] diegoviola: shevy: I didn't quit working for this company, I got fired
[18:17:32] shevy: <diegoviola> shevy: no, I quit
[18:17:47] diegoviola: shevy: yes, well, whatever
[18:18:09] ynroot: has left #ruby: ("Konversation terminated!")
[18:18:32] adaedra: shevy: let other people quit what they want
[18:18:33] diegoviola: shevy: the manager said I was a good programmer, he told other people my attitude was the problem
[18:18:49] shevy: adaedra but he did not quit! :(
[18:19:12] jgpawletko: has joined #ruby
[18:19:13] adaedra: I'm not talking about diegoviola but about you, shevy
[18:19:26] shevy: adaedra but he did not quit!!!
[18:19:39] adaedra: apparently you quit reading
[18:20:07] shevy: I am gonna quit with adaedra
[18:20:17] khebbie: has joined #ruby
[18:20:23] craysiii: did you work at booking ;)
[18:21:06] shevy: every failure is a step towards improvement
[18:21:27] havenwood: shevy: fail fast
[18:21:38] shevy: havenwood: more coffee!
[18:21:47] shevy: failing is no fun :(
[18:22:09] havenwood: shevy: http://elixir-lang.org/getting-started/mix-otp/supervisor-and-application.html
[18:22:24] shevy: elixir has a flashy icon
[18:22:53] andikr: has joined #ruby
[18:23:09] craysiii: shevy icons are IN right now
[18:23:16] havenwood: shevy: http://i.imgur.com/uFPdfzm.png
[18:23:43] havenwood: shevy: (yes, i've spent the time to color it red)
[18:24:13] adaedra: you mean open it in gimp and change hue?
[18:24:17] havenwood: adaedra: that
[18:24:29] adaedra: what a huge amount of time spent
[18:24:36] havenwood: adaedra: no, i one by one changed the pixels in paint
[18:24:45] havenwood: adaedra: time yourself
[18:25:04] diegoviola: shevy: it doesn't matter anymroe if I quit or not from that company, I told the manager he was dishonest
[18:25:51] GriffinHeart: has joined #ruby
[18:25:52] chinmay_dd: has joined #ruby
[18:25:55] Xiti: has joined #ruby
[18:26:51] juanpablo_______: has joined #ruby
[18:31:02] diegoviola: adaedra: the manager was speaking ill of me for time I was there and I didn't know it, but I found that up, he was telling people like the HR that I was crazy, etc
[18:31:22] shinnya: has joined #ruby
[18:31:28] adaedra: You were discussing that with shevy, not me
[18:32:25] AmBienCeD: has joined #ruby
[18:32:26] countryHick: has joined #ruby
[18:33:18] yfeldblum: has joined #ruby
[18:33:54] miah: diegoviola: sounds like a good situation to get out of.
[18:34:34] tubuliferous: has joined #ruby
[18:34:39] diegoviola: they had their company values like "Ethics, Honesty, etc" printed in their wall, and the day I left I told him "I've seen what you said about me. Ethics is not just a word in your wall, you should be more honest"
[18:35:18] miah: :( sorry you went through that. hopefully your new job is better?
[18:35:21] diegoviola: he apologized
[18:36:20] diegoviola: miah: I don't have a job yet
[18:36:29] Trynemjoel: has joined #ruby
[18:38:32] mhib: has joined #ruby
[18:38:39] miah: diegoviola: oh.
[18:38:56] symm-: has joined #ruby
[18:40:12] dseitz: has joined #ruby
[18:42:44] j3r0: has joined #ruby
[18:43:09] Musashi007: has joined #ruby
[18:44:30] Trynemjoel: has joined #ruby
[18:45:24] diego1: has joined #ruby
[18:46:06] craysiii: good luck in your hunty
[18:46:14] craysiii: (fat fingers)
[18:46:22] miah: indeed. good luck in the hunt for a good place to work.
[18:46:46] miah: its taken me quite a few jobs to find a place i enjoy working; even though im suffering through burn out currently.
[18:47:00] NeverDie: has joined #ruby
[18:47:37] diegoviola: it's the second time I actually confront that manager, the first time he was calling me by my nationality and I asked him to call me by my name
[18:47:42] diegoviola: some idiots just never learn I guess
[18:47:57] craysiii: thats really unprofessional
[18:48:48] craysiii: maybe a bad attempt to build rapport with you?
[18:49:14] fantazo: has joined #ruby
[18:49:49] miah: rapport - a close and harmonious relationship in which the people or groups concerned understand each other's feelings or ideas and communicate well.
[18:50:33] miah: i think calling somebody by their nationality vs name is a bad way to build rapport based on the definition.
[18:51:04] craysiii: hence why i said bad attempt :P
[18:52:40] craysiii: in less professional occupations though it could be seen as effective. poking fun at one another is common, but in this situation it was most likely unwarranted
[18:52:41] diegoviola: miah: I'm really not interested in close and harmonious relationship
[18:53:00] spider-mario: has joined #ruby
[18:53:30] craysiii: thats probably why he said you have an attitude
[18:53:52] craysiii: not blaming you or anything, but it could be a reason.
[18:55:06] jhubert: has joined #ruby
[18:55:42] blaines: has joined #ruby
[18:56:26] QKO: has joined #ruby
[18:56:26] mikecmpbll: work hard + be nice = win
[18:56:27] `Nibble: has joined #ruby
[18:56:27] Janusz1: has joined #ruby
[18:56:27] Janusz1: has joined #ruby
[18:56:28] greedo: has joined #ruby
[18:56:29] sts_: has joined #ruby
[18:56:30] bzf: has joined #ruby
[18:56:31] KrzaQ: has joined #ruby
[18:56:31] mikecmpbll: and don't netsplit.
[18:56:33] davidcelis: has joined #ruby
[18:56:33] davidcelis: has joined #ruby
[18:56:36] hasB4K: has joined #ruby
[18:56:37] hasB4K: has joined #ruby
[18:56:38] monsieurp: has joined #ruby
[18:56:38] monsieurp: has joined #ruby
[18:56:39] yfeldblum: has joined #ruby
[18:56:42] DylanJ: has joined #ruby
[18:56:43] \13k: has joined #ruby
[18:56:44] tchebb: has joined #ruby
[18:56:44] diegoviola: I was being nice and I worked hard, I just didn't allow him to get away with being a jackass
[18:56:47] tekk: has joined #ruby
[18:56:49] quarcu: has joined #ruby
[18:56:51] iamayam: has joined #ruby
[18:56:52] mikecmpbll: sounds like you're fine then
[18:56:55] funnel: has joined #ruby
[18:57:03] go|dfish: has joined #ruby
[18:57:05] larshaugseth: has joined #ruby
[18:57:11] Musashi007: has joined #ruby
[18:57:14] Scripore: has joined #ruby
[18:57:34] snakehsu: has joined #ruby
[18:58:32] gnarf: has joined #ruby
[18:58:56] A124: has joined #ruby
[18:59:40] malcolmva: has joined #ruby
[19:00:31] DaniG2k: has joined #ruby
[19:01:30] Jamo_: has joined #ruby
[19:02:21] weemsledeux: has joined #ruby
[19:04:38] Musashi007: has joined #ruby
[19:05:24] jenrzzz: has joined #ruby
[19:06:19] khebbie: has joined #ruby
[19:08:58] lkba: has joined #ruby
[19:10:58] dont-panic: has joined #ruby
[19:10:58] zenspider: has joined #ruby
[19:10:58] ruisantos: has joined #ruby
[19:10:58] sjohnsen: has joined #ruby
[19:11:02] SebastianThorn: has joined #ruby
[19:11:03] ptierno: has joined #ruby
[19:11:05] soosfarm: has joined #ruby
[19:11:05] ahuman: has joined #ruby
[19:11:06] M-Technic: has joined #ruby
[19:11:06] ZYPP: has joined #ruby
[19:11:06] jso: has joined #ruby
[19:11:07] danoo_: has joined #ruby
[19:11:07] allie: has joined #ruby
[19:11:09] peteyg: has joined #ruby
[19:11:10] ekem: has joined #ruby
[19:11:11] dhruvasagar: has joined #ruby
[19:11:11] edenc: has joined #ruby
[19:11:12] stevednd: has joined #ruby
[19:11:13] Koshian: has joined #ruby
[19:11:13] alexblom: has joined #ruby
[19:11:14] justinweiss: has joined #ruby
[19:11:14] adam|: has joined #ruby
[19:11:16] danshultz: has joined #ruby
[19:11:16] Schmidt: has joined #ruby
[19:11:18] perry: has joined #ruby
[19:11:19] KramerC: has joined #ruby
[19:11:20] Sou|cutter: has joined #ruby
[19:11:23] p8952: has joined #ruby
[19:11:23] xxx: has joined #ruby
[19:11:25] realDAB: has joined #ruby
[19:11:26] tskogberg: has joined #ruby
[19:11:29] headius: has joined #ruby
[19:11:54] jeaye: has joined #ruby
[19:12:06] superspring: has joined #ruby
[19:12:09] hplar: has joined #ruby
[19:12:18] Platini: has joined #ruby
[19:12:27] Bish: has joined #ruby
[19:12:39] Aeyrix: has joined #ruby
[19:12:58] ddv: has joined #ruby
[19:13:01] Trynemjoel: has joined #ruby
[19:13:07] DenSchub: has joined #ruby
[19:13:20] infernix: has joined #ruby
[19:13:44] linduxed: has joined #ruby
[19:13:49] TDJACR: has joined #ruby
[19:14:45] diegoviola: mikecmpbll: I guess the most important thing I've learned here is to not take disrespect anymore, there are people that will just take whatever because they fear losing their job
[19:15:18] mikecmpbll: sure, that's one takeaway :).
[19:15:43] diegoviola: and confronting your manager in front of other people feels good, hell yeah
[19:15:55] cookiez: has joined #ruby
[19:16:04] tmi: has joined #ruby
[19:16:11] ishahnaz: has joined #ruby
[19:17:40] tejasmanohar: has joined #ruby
[19:18:06] tejasmanohar: is #ruby or #ruby-lang more popular? on the website, it said #ruby-lang was the official irc channel pretty sure.
[19:18:15] diegoviola: tejasmanohar: they got merged
[19:18:20] baegle: has joined #ruby
[19:18:24] tejasmanohar: diegoviola: ah
[19:19:59] shevy: tejasmanohar #ruby-lang was smaller, perhaps 1/3 of #ruby
[19:20:12] DaniG2k: does anyone feel like reading some code and telling me how shitty it is? :P
[19:20:27] baegle: I'm trying to do grep a file for a pattern. open(file).grep(/p/) works just fine, unless the file is the wrong encoding. How do I get open/grep to expect the correct encoding for a file?
[19:20:37] tejasmanohar: gem worked btw :) - but airfarewatchdog turned out not to be what i wanted haha
[19:21:10] apeiros: baegle: you have to know the encoding
[19:21:23] apeiros: baegle: and you'd pass it to open
[19:21:47] baegle: apeiros: I can find the encoding by running the file utility from the command line. Is there an equivalent in Ruby?
[19:22:13] apeiros: baegle: no you can't find the encoding that way. you get a guess, at best.
[19:22:43] baegle: apeiros: is that guess what Ruby uses by default?
[19:22:49] apeiros: baegle: no
[19:22:58] apeiros: ruby doesn't guess. it does what you tell it to do.
[19:23:29] apeiros: see Encoding.default_external for the default value of encoding.
[19:23:29] schaerli: has joined #ruby
[19:23:56] HoppingMadMan: has joined #ruby
[19:24:03] baegle: apeiros: is there a utility in ruby for guessing what a file's encoding might be, akin to the BSD "file" utility
[19:24:33] Ox0dea: baegle: There's charlock_holmes.
[19:24:35] apeiros: there are some, like chardet. there's probably others.
[19:25:01] apeiros: baegle: but if you don't know the encoding, how do you want to grep?
[19:25:26] atomical: has joined #ruby
[19:25:31] baegle: GNU grep seems to have no problem doing it
[19:25:32] houhoulis: has joined #ruby
[19:25:51] zacstewart: has joined #ruby
[19:25:55] apeiros: ACTION wishes programmers would take a mandatory course in encodings
[19:26:15] apeiros: baegle: maybe dig into how gnu grep does it.
[19:26:58] apeiros: and I wouldn't be surprised if it just treated everything as binary. maybe it's even clever and special cases files with BOM.
[19:27:49] RegulationD: has joined #ruby
[19:28:02] Trynemjoel: has joined #ruby
[19:29:55] CustosLimen: has joined #ruby
[19:31:09] apeiros: eh, seems gnu grep just utterly fails with encodings like utf-16. so much for "seems to have no problem".
[19:32:10] Scripore: has joined #ruby
[19:32:12] leafybasil: has joined #ruby
[19:33:52] miah: interesting
[19:34:18] Mon_Ouie: has joined #ruby
[19:34:37] MAQ: has joined #ruby
[19:34:52] ragingcake: has joined #ruby
[19:36:47] casadei_: has joined #ruby
[19:37:29] apeiros: another thing I wish for: a universal metadata container for all files.
[19:37:38] apeiros: then we could actually store the encoding along with the file.
[19:37:48] devbug_: has joined #ruby
[19:39:38] null_ref_: has joined #ruby
[19:40:03] shevy: container all the things!
[19:40:30] apeiros: also I could have good old type & creator back. stupid file suffix doesn't even come close to that.
[19:42:33] Trynemjoel: has joined #ruby
[19:44:39] dc: has joined #ruby
[19:45:39] Ox0dea: apeiros: FUSE apparently makes it rather easy to roll your own filesystem.
[19:45:47] Ox0dea: ACTION wonders whether there are any unused inode bits.
[19:46:29] Thomas-0725: has joined #ruby
[19:47:30] tkuchiki: has joined #ruby
[19:48:04] devbug: has joined #ruby
[19:48:58] schaerli: has joined #ruby
[19:50:09] thesquidbits: has joined #ruby
[19:50:28] Yzguy: has joined #ruby
[19:51:57] umgrosscol: has joined #ruby
[19:52:10] Pupeno: has joined #ruby
[19:54:11] HoppingMadMan: has joined #ruby
[19:58:08] rakm: has joined #ruby
[19:58:50] volsus: has joined #ruby
[19:59:11] Ox0dea: apeiros, shevy: Got local trunk builds?
[19:59:25] shevy: local trunk builds?
[19:59:28] jjj123: has joined #ruby
[19:59:53] shevy: trocal bunk lilds!
[20:00:29] Ox0dea: shevy: You've mentioned that you compile many things from source, but I can never remember whether or not you do so for Ruby.
[20:00:38] Ox0dea: Was it that you compile 2.2.2 from source?
[20:01:54] shevy: I download the source into one directory; from there, I follow a simply convention, name of the program in question, downcased always. so ruby will then reside at BASE_DIR/ruby/ and inside there, is currently only the latest ruby version: ruby-2.2.2.tar.xz
[20:02:42] shevy: I have about 2700 directories there, I think in total it is about ... 10 gigabytes or so... lemme count
[20:02:56] Ox0dea: >> def sw s; s.delete('^a-z').chars.sort end; sw('local trunk builds') == sw('run, loud blacklist!')
[20:02:57] ruboto: Ox0dea # => true (https://eval.in/410546)
[20:04:02] shevy: oh .. 12.9 Gig http://shevegen.square7.ch/screenshot.png
[20:04:09] ruby-lang926: has joined #ruby
[20:05:29] shevy: here are the biggest some 37 programs http://shevegen.square7.ch/highest.png
[20:05:33] nofxx: shevy, there is homebrew for linux, did you see?
[20:05:56] nofxx: that been said .xz looks pacman, so you should have a reason to not use it
[20:05:57] shevy: I noticed one minor glitch in the display of ,... which I will fix soon
[20:06:10] shevy: I look at homebrew every once in a while, and I have heard of homebrew for linux but never tried
[20:06:20] shevy: I don't want to end up as the only person to use it, that feels too lonely :(
[20:06:23] Ox0dea: > .xz looks pacman
[20:07:12] shevy: .xz looks pacman?
[20:07:14] Ox0dea: ACTION is still trying to make sense of that.
[20:07:51] shevy: I sorta transitioned from .tar.bz2 to .tar.xz, it just is more efficient for when you have to backup like the 13 gigs every few weeks
[20:08:27] nofxx: xz is archlinux pacman default compression for pkgs
[20:09:02] nofxx: Ox0dea, does red start hav a pkg manager?
[20:09:42] devbug_: has joined #ruby
[20:10:46] Guest96767: has joined #ruby
[20:10:56] Ox0dea: nofxx: Sure, but I don't see why that's any reason to associate a specific package manager with a specific archive extension.
[20:12:06] Trynemjoel: has joined #ruby
[20:13:48] Scripore: has joined #ruby
[20:14:48] shevy: >> round(5)
[20:14:49] ruboto: shevy # => undefined method `round' for main:Object (NoMethodError) ...check link for more (https://eval.in/410551)
[20:15:00] Yzguy: has joined #ruby
[20:15:19] Yzguy: is OptionParser the best command line parser for ruby?
[20:15:35] juanpablo_______: has joined #ruby
[20:16:01] Hobbyboy: has joined #ruby
[20:16:33] shevy: I hate optionparser; there are some alternatives, not sure which one are best... get_opt_long in stdlib, thor... slop in external gems, and a few more
[20:16:34] adaedra: Define "best"
[20:17:01] lemur: has joined #ruby
[20:17:05] Hobbyboy|BNC: has joined #ruby
[20:17:11] Yzguy: like easy to use
[20:17:20] Yzguy: I'm use to like argparse in python
[20:18:25] havenwood: Yzguy: Slop's a gem that improves upon OptionParser: https://github.com/leejarvis/slop#readme
[20:19:37] kraljev11: has joined #ruby
[20:19:57] kraljev11: has joined #ruby
[20:20:12] Yzguy: I'll check it out
[20:20:23] kraljev11: has joined #ruby
[20:20:52] mxrguspxrt: has joined #ruby
[20:20:56] chouhoulis: has joined #ruby
[20:21:10] _whys_guy: Yzguy: Mine's better. :P
[20:21:12] kraljev11: has joined #ruby
[20:21:41] Yzguy: haha I'm dying laughing
[20:21:46] kraljev11: has joined #ruby
[20:21:55] _whys_guy: I trust you know who _why was, then?
[20:21:58] kraljev11: has joined #ruby
[20:22:20] miah: there are so many cli option parsers for ruby, its kinda amazing
[20:22:39] shevy: I shall add my own one one day!
[20:22:41] kraljev11: has joined #ruby
[20:22:47] tubuliferous: has joined #ruby
[20:23:02] adaedra: Great, so people would say they hate it without further reasons
[20:23:11] shevy: .parse! ARGV
[20:23:12] miah: ive been using optionparser recently, its alright. its a bit heavy on the 'lines of code' side of things but works fine
[20:23:21] havenwood: Yzguy: Here's another recently-created option: https://github.com/janlelis/rationalist#readme
[20:23:34] kraljev11: has joined #ruby
[20:23:50] shevy: adaedra http://docs.ruby-lang.org/en/2.1.0/OptionParser.html
[20:24:06] miah: also http://www.filfre.net/2013/07/the-unmaking-and-remaking-of-sierra-on-line/
[20:24:10] miah: https://github.com/chef/mixlib-cli
[20:24:14] adaedra: shevy: what now
[20:24:21] shevy: how can you like it adaedra!
[20:24:27] shevy: miah oh oh oh an old sierra gamer?
[20:24:29] adaedra: shevy: I don't know if you noticed, I know ruby docs a bit
[20:24:29] dgutierrez1287: has joined #ruby
[20:24:43] miah: ive been a gamer since the early 80's =)
[20:25:12] kraljev11: has joined #ruby
[20:25:27] kraljev11: has joined #ruby
[20:25:32] shevy: the good old games have been replaced by games in 3D worlds :(
[20:25:41] miah: i dont mind the 3d worlds so much though
[20:25:57] kraljev11: has joined #ruby
[20:26:12] j_mcnally: has joined #ruby
[20:26:22] kraljev11: has joined #ruby
[20:26:46] Helheim: has joined #ruby
[20:26:49] saddad: has joined #ruby
[20:26:51] kraljev11: has joined #ruby
[20:27:00] j_mcnally: has joined #ruby
[20:27:17] kraljev11: has joined #ruby
[20:27:40] kraljev11: has joined #ruby
[20:27:41] stef204: has joined #ruby
[20:28:10] Silus10: has joined #ruby
[20:28:18] kraljev11: has joined #ruby
[20:28:31] kraljev11: has joined #ruby
[20:29:09] gix: has joined #ruby
[20:29:17] kraljev11: has joined #ruby
[20:29:22] quimrstorres: has joined #ruby
[20:31:43] olistik: has joined #ruby
[20:32:25] scpike: shevy: I use trollop and like it, but the name is kind of unfortunate
[20:32:53] mamercad: has joined #ruby
[20:33:24] shevy: lol miah that page is hilarious... "IF HAS-GOAT 0 AND OBJHIT-EDGE 14 AND EDGE-OBJ-HIT 1 AND GOAT-GONE 0 AND SHOW-CARROT 0 THEN ASSIGN GOAT-ROOM 11, ERASE 14"
[20:33:37] shevy: IF HAS-GOAT ... they were the true originators of lolcode
[20:36:10] bodgix: has joined #ruby
[20:36:23] ragingcake: has joined #ruby
[20:38:19] _whys_guy: Can't have hyphens in LOLCODE identifiers.
[20:39:08] Trynemjoel: has joined #ruby
[20:39:26] j_mcnally: has joined #ruby
[20:39:28] saddad: has joined #ruby
[20:40:08] _whys_guy: It's still a great language. :P
[20:41:40] wasamasa: can you have hyphens in any other language than lisp as identifiers?
[20:42:03] araujo: has joined #ruby
[20:42:31] _whys_guy: Does CSS count?
[20:42:35] lwu: has joined #ruby
[20:42:49] devbug: has joined #ruby
[20:43:04] _whys_guy: Most Forth-inspired languages.
[20:43:23] _whys_guy: Concatenative languages are pretty nice in general.
[20:43:28] jhubert: has joined #ruby
[20:43:42] niiamon: has joined #ruby
[20:44:38] Trynemjoel: has joined #ruby
[20:45:01] wasamasa: I dunno, they sound even more impractical than lisp
[20:45:41] lwu: has joined #ruby
[20:46:13] Ox0dea: wasamasa: You would be hard-pressed to find something Factor's standard library couldn't tackle.
[20:47:40] fedexo: has joined #ruby
[20:48:51] tkuchiki: has joined #ruby
[20:49:39] ELCALOR: is there a better way to do something like this?
[20:49:42] Scripore: has joined #ruby
[20:49:42] ELCALOR: https://www.irccloud.com/pastebin/Dwjc1Naz/
[20:49:43] ruboto: ELCALOR, we in #ruby do not like irccloud.com, I reposted your paste to gist for you: https://gist.github.com/68fb9d9c82eee2d53af4
[20:49:43] ruboto: irccloud.com has no syntax highlighting, distracting formatting and loads slowly for most.
[20:50:03] wasamasa: Ox0dea: hmm, factor
[20:50:13] Ox0dea: wasamasa: http://docs.factorcode.org/content/article-class-index.html
[20:50:13] jamesaxl|2: has joined #ruby
[20:50:17] wasamasa: Ox0dea: got to find out why I've got a peeve when I asked a coworker about it :P
[20:50:33] wasamasa: I've heard it's got XML!
[20:50:36] ragingcake: has joined #ruby
[20:51:37] Ox0dea: wasamasa: I mean, how many languages come with a damned reddit client in the standard library?
[20:52:04] Ox0dea: Development is still extremely active: https://github.com/slavapestov/factor/commits/master
[20:52:21] wasamasa: well, that does sound fun
[20:52:34] sarkyniin: has joined #ruby
[20:53:23] bodgix1: has joined #ruby
[20:53:39] Trynemjoel: has joined #ruby
[20:54:26] Ox0dea: ELCALOR: (1..4).all? { |q| quarter_closed? q }
[20:54:59] ragingcake: has joined #ruby
[20:55:04] Ox0dea: Heh, "quarter" is a dollar word. I think that's quite humorous.
[20:55:21] ELCALOR: awesome Ox0dea.
[20:56:45] Asher: has joined #ruby
[20:56:51] Ox0dea: ELCALOR: For what it's worth, you might consider structuring your code such that you could say @quarters.all?(&:closed?).
[20:58:09] Ox0dea: Being able to write code like that is generally indicative of having organized things nicely and neatly, but it might be overkill in your present scenario.
[20:58:12] Ox0dea: Just something to keep in mind.
[20:58:30] scpike: It would be cool if there was a syntactic sugar parallel to &: for "call a method in the current namespace on this object"
[20:58:38] ELCALOR: i'm not sure how i would do that. this is my quarter_closed? function btw: http://pastebin.com/YZtESQvC
[20:58:39] ruboto: ELCALOR, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/c4ba8101fa8ddc1c3c35
[20:58:39] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[20:58:47] Ox0dea: scpike: How do you mean?
[20:59:08] Ox0dea: ELCALOR: Yikes. :P
[20:59:17] scpike: In more aggressively functional languages like clojure you don't have methods on objects, you just have functions which take an object and work on them
[20:59:52] Ox0dea: scpike: That's what you do in any non-OO language, not just Clojure.
[20:59:56] mdavid613: has joined #ruby
[21:00:03] scpike: Ox0dea: right, just giving an example
[21:00:18] Ox0dea: I don't see the gap that such sugar would fill?
[21:00:26] Ox0dea: You just... call the method with an argument?
[21:01:20] scpike: Well, in the example above where you want to do `all? { |q| quarter_closed? q }`, you can't do `all?(&:quarter_closed?)` because it sends the method to the object
[21:01:23] banister: has joined #ruby
[21:01:42] scpike: I totally agree the idiomatic thing in ruby would be for `q` to respond to closed?
[21:02:03] scpike: but sometimes (e.g., if q were a core class like String) you have reasons for wanting to call functions that aren't on the object
[21:02:18] diegoviola: has joined #ruby
[21:02:28] scpike: and then you have to write the longer { |x| thing x }
[21:02:35] ragingcake_: has joined #ruby
[21:03:07] Ox0dea: scpike: Ah, gotcha. Yes, Ruby supports that.
[21:04:05] scpike: With sugar like &: or the way I wrote?
[21:04:22] Ox0dea: >> Method.instance_method(:to_proc) # Yep.
[21:04:23] ruboto: Ox0dea # => #<UnboundMethod: Method#to_proc> (https://eval.in/410566)
[21:04:38] Ox0dea: >> def inc x; x + 1 end; [1, 2, 3].map(&method(:inc))
[21:04:39] ruboto: Ox0dea # => [2, 3, 4] (https://eval.in/410567)
[21:05:07] scpike: Ox0dea: slick
[21:05:16] davedev24: has joined #ruby
[21:05:30] Ox0dea: >> @Ruby.to_i <3 # Just to reiterate.
[21:05:31] ruboto: Ox0dea # => true (https://eval.in/410568)
[21:06:36] jwinder: has joined #ruby
[21:06:47] bffff_: has joined #ruby
[21:07:06] deavid: has joined #ruby
[21:10:22] texasmade: has joined #ruby
[21:13:27] i8igmac: has joined #ruby
[21:15:16] TheHodge: has joined #ruby
[21:15:54] hachiya: has joined #ruby
[21:17:07] swgillespie: has joined #ruby
[21:17:31] khebbie: has joined #ruby
[21:19:44] RegulationD: has joined #ruby
[21:21:28] apt-get_: has joined #ruby
[21:22:29] saddad: has joined #ruby
[21:23:23] senayar: has joined #ruby
[21:23:23] senayar: has joined #ruby
[21:25:33] casadei_: has joined #ruby
[21:26:08] vdamewood: has joined #ruby
[21:26:53] Helheim: has joined #ruby
[21:28:00] umgrosscol: has joined #ruby
[21:28:26] Channel6: has joined #ruby
[21:28:33] saddad: has joined #ruby
[21:29:50] quimrstorres: has joined #ruby
[21:36:43] yosafbridge: has joined #ruby
[21:38:40] Helheim: has joined #ruby
[21:38:51] Agoldfish: has joined #ruby
[21:38:52] hachiya: has joined #ruby
[21:38:54] |\|370: has joined #ruby
[21:41:24] mamercad: has joined #ruby
[21:43:09] shevy: I have a strange question
[21:43:24] shevy: class Foo; def self.bar(i = 'some_default'); end; end
[21:43:35] shevy: is there a way to copy the argument signature of a given method, to another method?
[21:45:02] j4cknewt: has joined #ruby
[21:45:02] yfeldblum: has joined #ruby
[21:45:11] Ox0dea: shevy: https://gist.github.com/0x0dea/ff92b5bc4887d1d04f3a
[21:45:26] Nahra: has joined #ruby
[21:45:36] Ox0dea: You can use RubyVM::InstructionSequence.of, but it's really nasty and inherently brittle.
[21:45:46] ndrei: has joined #ruby
[21:45:56] shevy: this code is not for the sane of minds
[21:46:04] ledestin: has joined #ruby
[21:46:22] shevy: guess I have to manually sync to the other method
[21:46:35] leat: has joined #ruby
[21:46:40] El3ktra: has joined #ruby
[21:46:44] Ox0dea: Well, are you going to have really complex signatures?
[21:47:10] El3ktra: has left #ruby: ()
[21:47:27] blue_deref: has joined #ruby
[21:47:38] rakm: has joined #ruby
[21:47:39] shevy: nah only 2 input, one string, then a number. I guess I can store in constants and use the constants
[21:48:12] Iskarlar: has joined #ruby
[21:48:21] ragingcake: has joined #ruby
[21:48:26] Pupeno: has joined #ruby
[21:48:27] quimrstorres: has joined #ruby
[21:48:42] Helheim: has joined #ruby
[21:48:45] Pupeno: has joined #ruby
[21:49:15] Ox0dea: Well, reconstructing an arbitrarily complex signature requires manually "interpreting" Ruby's bytecode, which is indeed crazy, but it's not so bad if you only need to look for instances of, say, :putobject.
[21:49:43] devbug__: has joined #ruby
[21:49:52] devdazed_: has joined #ruby
[21:50:00] theery: has joined #ruby
[21:50:11] Iskarlar: has joined #ruby
[21:50:13] ragingcake: has joined #ruby
[21:50:17] Ilyes512: has joined #ruby
[21:50:31] ap4y: has joined #ruby
[21:54:38] apeiros: Ox0dea: the point of the container would be that it is not on the filesystem level
[21:54:47] apeiros: all FS level info is lost once you send a file somewhere
[21:55:03] ndrei: has joined #ruby
[21:56:47] leat: has joined #ruby
[21:57:45] Helheim: has joined #ruby
[21:58:12] mamercad: has joined #ruby
[21:58:13] gwendall: has joined #ruby
[21:58:13] arooni-mobile: has joined #ruby
[21:58:44] towski_: has joined #ruby
[21:59:29] ragingcake: has joined #ruby
[22:03:21] mikepack: has joined #ruby
[22:04:39] juanpablo_______: has joined #ruby
[22:05:54] ecksit: has joined #ruby
[22:07:02] leat: has joined #ruby
[22:07:17] phutchins: has joined #ruby
[22:07:23] ecksit: hi, i am looking to write a puppet-like syntax for a custom project of mine but i'm not sure how to achieve it in ruby. i've played with blocks but i can't seem to get it right. this is the type of syntax i'd like to use - https://gist.github.com/anonymous/e19fdd7cb00a73343aa1
[22:07:31] Helheim: has joined #ruby
[22:07:57] senayar: has joined #ruby
[22:08:28] Ox0dea: ecksit: That's not very insightful.
[22:09:10] ecksit: at this stage the requirements are pretty loose. i just want to know if it's possible and what approaches i could take
[22:09:34] Ox0dea: ecksit: If... what's possible?
[22:09:41] Lewix: has joined #ruby
[22:09:42] einarj: has joined #ruby
[22:09:56] ecksit: that style of style of syntax (within ruby)
[22:09:59] Ox0dea: ecksit: In the code you posted, you're passing a Hash to the #example method, which is... obviously possible.
[22:10:12] quimrstorres: has joined #ruby
[22:11:11] tubuliferous: has joined #ruby
[22:11:43] Helheim: has joined #ruby
[22:11:57] Silox|: has joined #ruby
[22:12:04] ecksit: but you need to wrap it in parenthese for it to work. i.e. `example({ value: option })` instead i would like `example { value: option }`
[22:13:11] Mon_Ouie: example(value: option)
[22:13:20] ecksit: i can get it working with a single string, but not hashes
[22:13:45] Mon_Ouie: You can't have the latter simply because of the ambiguity with the syntax to pass a block to a method
[22:13:55] ecksit: @Mon_Ouie: that's not the syntax i _really_ wanted. i was aiming to make it fairly close to the puppet synta
[22:14:28] Mon_Ouie: Adding two characters (opening and closing parentheses) is fairly close???
[22:14:30] Ox0dea: ecksit: Look into #instance_eval and #instance_exec.
[22:15:01] yqt: has joined #ruby
[22:15:37] theery: has joined #ruby
[22:15:41] Violentr: has joined #ruby
[22:16:12] dc: has joined #ruby
[22:16:29] Ox0dea: ecksit: You're aware that Puppet's syntax isn't valid Ruby, yes?
[22:16:47] Helheim: has joined #ruby
[22:17:17] ecksit: i do understand it but i do enjoy the flexibility it provides for extending the options available and would like to mimic it where possible
[22:17:57] Scripore: has joined #ruby
[22:18:02] Ox0dea: ecksit: I trust you've seen a .gemspec?
[22:18:08] atomical: has joined #ruby
[22:18:48] Ox0dea: ecksit: Is that kind of syntax not sufficiently convenient and/or flexible?
[22:19:09] banister: ecksit you can do: example { value option }
[22:19:11] j4cknewt: has joined #ruby
[22:20:26] chouhoulis: has joined #ruby
[22:20:38] ecksit: @Ox0dea: I don't like the `Gem::Specification.new do` portion of it but perhaps i could wrap that in a method to do that instead
[22:22:05] ecksit: hmm, same issue though
[22:22:17] Ox0dea: ecksit: https://gist.github.com/0x0dea/e716f3feb95d7d333368
[22:23:07] Igorshp: has joined #ruby
[22:24:18] Ox0dea: That shows the two most conventional ways of doing the thing, and it's really quite clean compared to what you can do in most other languages.
[22:25:55] ecksit: it looks good but it's still a little way off :(
[22:26:08] ecksit: perhaps this isn't easily achievable
[22:26:16] bodgix: has joined #ruby
[22:26:21] Ox0dea: You're asking for the wrong thing, in my opinion.
[22:26:29] casadei_: has joined #ruby
[22:26:36] Ox0dea: You can change that do/end to {} if that'd better tickle your fancy.
[22:27:40] Ox0dea: If it's the case that you simply cannot abide Ruby's syntactic limitations, you get to make your own! :)
[22:28:05] pyrotecnix: has joined #ruby
[22:28:11] senayar: has joined #ruby
[22:28:25] mxrguspxrt: has joined #ruby
[22:30:21] Vile`: has joined #ruby
[22:30:33] ecksit: i was afraid of that Ox0dea :(
[22:30:35] ecksit: thanks anyway
[22:31:12] Ox0dea: ecksit: You could probably do something hackish with binding_of_caller.
[22:31:21] charliesome: has joined #ruby
[22:31:38] eL_bAmba: has joined #ruby
[22:32:17] ecksit: ehhh, that does seem very hackish
[22:33:15] zacstewart: has joined #ruby
[22:34:08] Mon_Ouie: It's easier of you allow for a method call at the end of the block
[22:34:17] Mon_Ouie: https://gist.github.com/Mon-Ouie/22f56c2927eec16ad005
[22:34:18] texasmade: has joined #ruby
[22:37:12] Blaguvest: has joined #ruby
[22:37:17] deavid: has joined #ruby
[22:37:23] glennt: has joined #ruby
[22:37:24] ecksit: i _think_ i am almost there - https://gist.github.com/anonymous/a4c1411b1e74a93513c8
[22:37:52] Ox0dea: ecksit: You're really not. :/
[22:37:59] ecksit: now i just need to work out how to get line 13 into the method
[22:38:12] ecksit: that seems to be doing exactly what i need
[22:38:37] Igorshp: has joined #ruby
[22:39:00] banister: Mon_Ouie your the best!
[22:39:00] ecksit: that seems to be doing exactly what i need
[22:39:03] Ox0dea: ecksit: `name = "Test"` is not going to end up in the Hash.
[22:39:22] Ox0dea: ecksit: Mon_Ouie's demonstration of this madness is about as simple as it can get.
[22:39:33] Mon_Ouie: 'alut banister
[22:39:44] banister: Mon_Ouie couldn't you just grab: proc.binding
[22:39:55] Ox0dea: banister: Didn't work for me. :/
[22:40:06] Mon_Ouie: I believe that returns the proc of the binding around the proc
[22:40:07] banister: it wouldn't
[22:40:15] theery: has joined #ruby
[22:40:15] Mon_Ouie: You need the binding that was used when the block was run
[22:40:18] Ox0dea: >> proc { a = 1; b = 2 }.binding.local_variables
[22:40:19] ruboto: Ox0dea # => [] (https://eval.in/410606)
[22:40:55] Ox0dea: ecksit: Why fight the language for such a minor "gain"?
[22:41:12] ecksit: ease of transition mainly
[22:41:37] ecksit: the developers that are doing work on it are familiar with puppet and the way it works for custom attributes.
[22:42:49] ecksit: i know it's far from ideal but it's worth a shot
[22:42:54] gard: has joined #ruby
[22:43:09] banister: ecksit i dont think so, at the best you're probably going to end up with a very leaky abstraction
[22:43:09] nofxx: has joined #ruby
[22:43:19] banister: that'll be riddled with edge-cases
[22:44:04] theery: has joined #ruby
[22:44:33] Ox0dea: ecksit: It's just generally a 195894762, in my opinion.
[22:45:44] Casty: has joined #ruby
[22:45:51] Mon_Ouie: >> 195894762.to_s 16
[22:45:52] ruboto: Mon_Ouie # => "bad1dea" (https://eval.in/410610)
[22:56:08] Ox0dea: Mon_Ouie: Wouldn't you like to have been able to say `.hex` there?
[22:56:29] al2o3-cr: same difference :)
[22:57:21] Mon_Ouie: >> 195894762.hex
[22:57:22] ruboto: Mon_Ouie # => undefined method `hex' for 195894762:Fixnum (NoMethodError) ...check link for more (https://eval.in/410616)
[22:57:26] Mon_Ouie: Not sure what you mean
[22:57:47] Ox0dea: Mon_Ouie: I'm saying it would be nice if that weren't an error.
[22:58:03] Ox0dea: >> 'bad1dea'.hex
[22:58:04] ruboto: Ox0dea # => 195894762 (https://eval.in/410618)
[22:58:37] Mon_Ouie: Oh, misread you. I don't think it matters very much, I usually write what you just wrote as 'to_i(16)' anyway
[22:59:10] Ox0dea: Aye, that's how most seem to feel about it. :/
[22:59:21] Ox0dea: >> ['0'.hex, '0'.oct, ('0'.bin rescue $!)] This is still unfortunate, in my opinion.
[22:59:22] ruboto: Ox0dea # => /tmp/execpad-47dfdc66bd80/source-47dfdc66bd80:2: syntax error, unexpected tCONSTANT, expecting keywo ...check link for more (https://eval.in/410619)
[22:59:30] Ox0dea: >> ['0'.hex, '0'.oct, ('0'.bin rescue $!)]
[22:59:31] ruboto: Ox0dea # => [0, 0, #<NoMethodError: undefined method `bin' for "0":String>] (https://eval.in/410620)
[22:59:44] theery: has joined #ruby
[22:59:55] Lewix: has joined #ruby
[23:00:03] Ox0dea: The lack of parity in this corner of Ruby upsets me. :(
[23:00:09] j4cknewt: has joined #ruby
[23:00:50] charliesome: has joined #ruby
[23:01:14] al2o3-cr: >> [0].pack('C').to_i
[23:01:15] ruboto: al2o3-cr # => 0 (https://eval.in/410622)
[23:02:02] Ox0dea: Needs more TIMTOWTDI.
[23:02:09] Mon_Ouie: >> [1].pack('C').to_i
[23:02:10] ruboto: Mon_Ouie # => 0 (https://eval.in/410624)
[23:02:37] aphprentice_: has joined #ruby
[23:04:25] baegle: has joined #ruby
[23:04:33] einarj: has joined #ruby
[23:04:42] charliesome: has joined #ruby
[23:04:49] n1993r: has joined #ruby
[23:05:10] jud: has joined #ruby
[23:05:56] shevy: long live ruby!
[23:06:03] al2o3-cr: speak to may
[23:07:18] Fire-Dragon-DoL: has joined #ruby
[23:07:56] htmldrum: has joined #ruby
[23:09:15] n1993r: why are rails developers paid more than other developers?
[23:09:30] Ox0dea: ?rails n1993r
[23:09:30] ruboto: n1993r, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[23:09:45] Ox0dea: I was being facetious.
[23:09:53] n1993r: sorry i thought ruby and rails were the same thing these days
[23:10:41] n1993r: why did someone kick me?
[23:10:47] Ox0dea: Nobody kicked you.
[23:10:56] n1993r: whoops wrong channel
[23:11:16] al2o3-cr: matz is no joke, everythings done for a reason!
[23:11:26] blaines: has joined #ruby
[23:11:28] Ox0dea: It's not always up to matz. :/
[23:11:47] n1993r: someone just banned me from a channel :/
[23:12:08] Ox0dea: n1993r: First day on IRC?
[23:12:09] weemsledeux: has joined #ruby
[23:12:46] al2o3-cr: well, the ruby (dev team)
[23:12:57] al2o3-cr: ain't no stuuupid
[23:13:44] mdavid613: has joined #ruby
[23:14:43] Ox0dea: >> [:&, :|, :^].map { |s| [].methods.include?(s) } # This is kind of stupid.
[23:14:44] ruboto: Ox0dea # => [true, true, false] (https://eval.in/410627)
[23:14:46] n1993r: Ox0dea: how can you tell that it's my first day on irc?
[23:14:56] avahey: has joined #ruby
[23:15:13] al2o3-cr: Ox0dea: IYO
[23:15:21] Ox0dea: al2o3-cr: Really, though?
[23:16:31] al2o3-cr: everything is done for a reason, does the inhibit the language?
[23:17:09] nr1993: someone told me that my username: [16:15] <TheJH> because your username interpreted as leetspeak reads "nigger" (which I'm sure you were already aware of). also, I'm going to stop talking to you now. bye! [16:15] <n1993r> no i wasn't aware of that [16:16] <n1993r> is this better? [16:16] <nr1993> i just thought n1993r looks cool [16:16] <nr1993> so i set it to that
[23:17:10] Ox0dea: I think it's reasonable enough to expect to be able to XOR wherever you can AND and OR.
[23:17:15] nr1993: completely offtopic
[23:17:19] theery: has joined #ruby
[23:17:19] nr1993: but i don't get it
[23:17:21] Ox0dea: nr1993: 6/10
[23:17:33] Ox0dea: I hadn't even realized.
[23:17:38] al2o3-cr: use a set then
[23:17:59] pontiki: nr1993: was it this channel?
[23:18:06] nr1993: this is the ruby channel
[23:18:15] Ox0dea: al2o3-cr: By that logic, how did Array#& and Array#| even come into existence?
[23:18:26] nr1993: according to the rules we can't talk about rails and other things besides ruby
[23:18:27] al2o3-cr: summer holidays is it?
[23:18:28] pontiki: yes, it is. was that message you received that you just pasted in here from this channel?
[23:18:43] nr1993: what's the difference between array$& and array#|?
[23:18:46] nr1993: i never saw that before
[23:19:08] nr1993: no that's a pm from one of the admins of a channel
[23:19:21] pontiki: nr1993: *WHICH* channel?
[23:19:26] Ox0dea: pontiki: Please stop feeding?
[23:19:52] banister: Mon_Ouie wtf is this https://gist.github.com/Mon-Ouie/36954e5d46e86cc00676
[23:20:32] al2o3-cr: comments and hello to you
[23:21:00] nr1993: how is that going to work? char and argv aren't set to anything?
[23:21:52] Ox0dea: al2o3-cr: There's only one comment.
[23:22:31] ndrei: has joined #ruby
[23:23:11] al2o3-cr: yeah multieada
[23:25:09] Fire-Dragon-DoL: mhhh are there any ruby method to take all indexes of an array except those specified? Basically a reverse values_at
[23:25:24] Mon_Ouie: banister: It's hello world both in C and Ruby
[23:25:47] Ox0dea: Mon_Ouie: `def int(*) end; def main(*) end; argc = argv = char = 0` would've sufficed to do away with the errors.
[23:25:49] Mon_Ouie: You used to be able to write it as 'char **argv' before keyword arguments :(
[23:26:29] Ox0dea: Fire-Dragon-DoL: Probably best to just iterate over (0...size).
[23:26:35] Mon_Ouie: I want the code to execute in both languages though
[23:26:36] bodgix: has joined #ruby
[23:26:36] zacts: has joined #ruby
[23:26:46] banister: Mon_Ouie LOL very clever
[23:26:47] Ox0dea: Mon_Ouie: Sure, just prefix that line with `//;`.
[23:27:04] Fire-Dragon-DoL: Ox0dea: no I need an array out of it, like I want an array made from index 1, 3 and 4
[23:27:06] Mon_Ouie: def main(*); end would not execute its block, surely?
[23:27:09] djbkd: has joined #ruby
[23:27:14] Ox0dea: Ah, derp.
[23:27:16] casadei_: has joined #ruby
[23:27:17] Mon_Ouie: Also you need some trickery to be able to use 'return'
[23:27:39] Mon_Ouie: I guess you may not technically need to
[23:27:40] Fire-Dragon-DoL: guess I'll stick with a reject or somethign similar
[23:27:54] Ox0dea: Fire-Dragon-DoL: You want to go from [1, 3, 4] to the elements at those indices?
[23:28:13] Ox0dea: [1, 3, 4].map { |i| foo[i] } doesn't do?
[23:28:37] theery: has joined #ruby
[23:28:41] al2o3-cr: yep, simplicity
[23:29:07] Fire-Dragon-DoL: ['a', 'b', 'c', 'd', 'e'].reverse_values_at(0, 2) # => ['b', 'd', 'e']
[23:29:19] Fire-Dragon-DoL: I was wishing for a shorter version but I'll stick with that :P
[23:29:38] Fire-Dragon-DoL: I mean not with that, I guess I'll use something like reject
[23:30:21] al2o3-cr: never heard of reverse_values_at
[23:30:37] Ox0dea: >> %w[a b c d e].select.with_index { |e, i| ![0, 2].include? i } # Fire-Dragon-DoL
[23:30:38] ruboto: Ox0dea # => ["b", "d", "e"] (https://eval.in/410640)
[23:30:52] banister: >> a = ['a', 'b', 'c', 'd', 'e']; a - a.values_at(0, 2)
[23:30:53] ruboto: banister # => ["b", "d", "e"] (https://eval.in/410642)
[23:31:10] Ox0dea: banister: That won't handle duplicate entries well.
[23:31:29] Fire-Dragon-DoL: Ox0dea: thanks. I wished for something visually shorter, that's ok. I'll avoid the `-` because it happens in a place called a lot of times, might impact performances
[23:31:31] i8igmac: has joined #ruby
[23:32:40] mdomino: has joined #ruby
[23:32:50] Fire-Dragon-DoL: thanks anyway guys
[23:33:02] weemsledeux: has joined #ruby
[23:33:21] Ox0dea: ?guys Fire-Dragon-DoL
[23:33:22] ruboto: Fire-Dragon-DoL, You probably don't mean to exclude, but not everyone relates to being "one of the guys". Maybe consider using "folks", "y'all" or "everyone" instead?
[23:33:48] bruno-: has joined #ruby
[23:34:10] mdomino: Hey guys, I'm looking at making a webapp for work that renders some device configuration templates based on form input. I really don't need a full Rails app since there is no data persistence. If I were better at JavaScript the entire thing could probably be done client-side. Is there a better fit than rails/sinatra for something as simple as 'create forms', 'submit forms', 'render templated response compiled from form data'
[23:34:16] Ox0dea: ?guys mdomino
[23:34:16] ruboto: mdomino, You probably don't mean to exclude, but not everyone relates to being "one of the guys". Maybe consider using "folks", "y'all" or "everyone" instead?
[23:34:17] Fire-Dragon-DoL: ruboto: you maybe don't consider all cultures, in my cultures "guys", translated in the male version, is considered the neutral form, I had already a long discussion about this =\
[23:34:27] Ox0dea: ?guys2 Fire-Dragon-DoL
[23:34:28] ruboto: Fire-Dragon-DoL, it doesn???t matter if it???s "normal"/gender neutral to say "guys" in your idiolect. "You guys" to refer to a mixed group is erasure. All we ask from you is to be a decent channel member and respect that. If you want to further discuss this, join #ruby-offtopic.
[23:35:08] zacstewart: has joined #ruby
[23:35:39] banister: blah blah blah
[23:35:44] Fire-Dragon-DoL: I believe in speech freedom and whoever consider me sexist for such a thing is in any way not respecting MY culture
[23:35:59] Ox0dea: mdomino: The term you're looking for is "microframework".
[23:36:07] banister: so sick of the PC-bullshit that has totally taken over the ruby community
[23:36:10] mdomino: I like the micro part ;)
[23:36:20] banister: rubyists need to get out more, that shit is so unbelievably trivial and boring
[23:36:22] apeiros: Fire-Dragon-DoL: so if it's my culture to just call you asshole, that's A-OK?
[23:36:42] Fire-Dragon-DoL: apeiros: I believe in speech freedom, you can call me asshole, I'm free to not like you though
[23:37:08] mdomino: It seems like every site wants me to create some persistent model and link everything to that. Really I need an easy way to generate HTML forms and respond with a simple plaintext response rendered from that form data. I feel like it's probably a solved problem but I just don't know where to start looking to find it
[23:37:11] apeiros: Fire-Dragon-DoL: well, you're free to behave in whatever way you want outside of #ruby. but not inside. sorry if that's not to your liking.
[23:37:27] apeiros: Fire-Dragon-DoL: and I don't think it's too much to ask.
[23:37:30] Ox0dea: mdomino: Just do it with pure Ruby and a Rack handler?
[23:37:44] mdomino: Never looked int othat
[23:37:57] senayar: has joined #ruby
[23:37:57] senayar: has joined #ruby
[23:37:59] mdomino: Thanks Ox0dea... anywhere else to check while I'm googling furiously?
[23:38:48] apeiros: Fire-Dragon-DoL: also note that freedom of speech is not freedom of consequences.
[23:39:16] shevy: hmm... how did it go from guys -> assholes ?
[23:39:55] apeiros: shevy: Fire-Dragon-DoL made a good call and moved it to #ruby-offtopic. I'm there.
[23:40:30] theery: has joined #ruby
[23:41:42] Ropeney: has joined #ruby
[23:41:55] abdulrehman: has joined #ruby
[23:42:00] lwu: has joined #ruby
[23:42:28] Hanmac: has joined #ruby
[23:43:05] bronson: has joined #ruby
[23:44:07] bruno-_: has joined #ruby
[23:45:10] theery: has joined #ruby
[23:45:42] theery: has joined #ruby
[23:46:43] Igorshp: has joined #ruby
[23:47:18] i8igmac: has joined #ruby
[23:47:21] Igorshp: has joined #ruby
[23:47:30] dgutierrez1287: has joined #ruby
[23:48:55] abdulrehman: has joined #ruby
[23:49:42] nisstyre: has joined #ruby
[23:53:02] helpa: has joined #ruby
[23:53:25] juanpablo_______: has joined #ruby
[23:53:43] towski_: has joined #ruby
[23:54:21] j4cknewt: has joined #ruby
[23:55:48] devbug: has joined #ruby
[23:58:38] lannonbr: has joined #ruby
[23:59:20] tubuliferous: has joined #ruby
[23:59:46] Antiarc: has joined #ruby