« Back to channel list

#ruby - 21 August 2015

« Back 1 day Forward 1 day »
[00:00:08] northfurr: has joined #ruby
[00:00:32] charliesome: has joined #ruby
[00:00:40] Ox0dea: shevy: Have events transpired not in correlation with what you had planned?
[00:01:03] al2o3-cr: bamboozle, wish that was still on teletext :p
[00:01:07] Aeyrix: Has my careful abstraction of the truth led you to a frustration?
[00:01:22] Aeyrix: Ox0dea: Are your
[00:01:24] Aeyrix: whizzbangs
[00:01:25] Aeyrix: shellacked?
[00:02:26] Ox0dea: My jimmies remain sufficiently unrustled.
[00:02:52] al2o3-cr: pull your trollies up
[00:02:56] dopie: has joined #ruby
[00:03:19] Ox0dea: The first rule of Troll Club is that you must pay the troll toll.
[00:03:32] nb_bez___: has joined #ruby
[00:03:48] Aeyrix: So you'd say your jimmies aren't jambleD?
[00:04:23] platzhirsch: has left #ruby: ()
[00:05:09] miah: they're not jimmies, they're sprinkles!
[00:05:10] Anon_: has joined #ruby
[00:05:29] frozen3: has joined #ruby
[00:06:02] Aeyrix: meant to say jimbles
[00:06:04] Aeyrix: fucked up
[00:06:30] Yzguy: has joined #ruby
[00:06:42] shevy: Ox0dea what Aeyrix wrote!
[00:06:59] Ox0dea: al2o3-cr: What shevy wrote!
[00:07:19] Aeyrix: wait did al2 say something?
[00:07:22] Aeyrix: i have a lot of people on ignore
[00:08:04] Ox0dea: Aeyrix: Issue the appropriate IRC command and monitor your traffic?
[00:08:16] Aeyrix: ok al2 isn't ignore
[00:08:25] Aeyrix: I think I did temporarily due to the spamming of ? ot
[00:08:43] robh71: has joined #ruby
[00:09:06] Ox0dea: Non-initial ?ot is safe.
[00:09:24] Aeyrix: Can't be too careful fam.
[00:10:15] Ox0dea: ????ot is borked?
[00:10:22] Ox0dea: ????ot is borked.
[00:11:11] michael_mbp: has joined #ruby
[00:11:17] doublemalt_: has joined #ruby
[00:11:43] Aeyrix: might be offtopic
[00:11:46] Aeyrix: maybe ssc removed it
[00:11:49] Aeyrix: i wouldn't be surprised
[00:11:51] bruno-: has joined #ruby
[00:12:11] charliesome: has joined #ruby
[00:12:55] silkfox: has joined #ruby
[00:14:19] chouhoulis: has joined #ruby
[00:14:23] xxneolithicxx: has joined #ruby
[00:14:51] Aeyrix: Ox0dea: give me reaction images
[00:15:31] havenwood: Looking forward to immutable String literals?
[00:15:46] decaff: has joined #ruby
[00:15:49] northfurr: has joined #ruby
[00:16:20] chouhoulis: has joined #ruby
[00:18:09] Mia: has joined #ruby
[00:18:53] jenrzzz: has joined #ruby
[00:19:20] Ox0dea: Aeyrix: I don't has. :/
[00:19:39] Ox0dea: havenwood: 3.0 this Christmas?
[00:20:13] havenwood: Ox0dea: 2.3 this Christmas with a flag, 3.0 by default.
[00:20:50] yfeldblum: has joined #ruby
[00:21:17] takenory: has joined #ruby
[00:21:38] ramfjord: has joined #ruby
[00:24:42] stardiviner: has joined #ruby
[00:25:54] jenrzzz: has joined #ruby
[00:27:01] northfurr: has joined #ruby
[00:27:09] stardiviner: has joined #ruby
[00:28:19] plshelpmeee: has joined #ruby
[00:28:20] devoldmx: has joined #ruby
[00:28:35] rfmind: has joined #ruby
[00:28:49] plshelpmeee: Hello -- anyone ever able to run a Ruby file from a shell script?
[00:29:06] djbkd: has joined #ruby
[00:29:08] CloCkWeRX: has joined #ruby
[00:29:20] uber: has joined #ruby
[00:30:06] lkba_: has joined #ruby
[00:30:23] charliesome: has joined #ruby
[00:30:34] BraddPitt: I believe it is the same as running it from the command line, plshelpmeee
[00:30:42] BraddPitt: i.e. `ruby my_script.rb`
[00:30:43] SenpaiSilver: has joined #ruby
[00:30:56] plshelpmeee: @BraddPitt - my thoughts exactly
[00:30:58] plshelpmeee: However, no avail
[00:31:06] BraddPitt: is there any output?
[00:31:16] plshelpmeee: works fine from the command line without encompassed in a shell script
[00:31:23] BraddPitt: can you paste your shell script?
[00:31:35] plshelpmeee: only one line needed for testing, really
[00:32:10] Raboo: has joined #ruby
[00:32:12] plshelpmeee: #!/usr/bin/ruby
[00:32:18] northfurr: has joined #ruby
[00:32:18] plshelpmeee: ruby file.rb "input data"
[00:32:23] bronson: has joined #ruby
[00:32:26] plshelpmeee: the file is in root of a rails app
[00:32:30] Mia: has joined #ruby
[00:32:31] Mia: has joined #ruby
[00:32:31] SenpaiSilver: has joined #ruby
[00:32:37] tsigo: has joined #ruby
[00:32:40] plshelpmeee: does require a file in config/constants
[00:33:23] plshelpmeee: too which i get
[00:33:29] plshelpmeee: "/Users/rudd/.rvm/rubies/ruby-2.1.4/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- bundler/setup (LoadError)"
[00:34:52] jenrzzz: has joined #ruby
[00:36:07] blackmesa: has joined #ruby
[00:36:07] xxneolithicxx: has joined #ruby
[00:36:45] tsigo: I've got a regex question! I'm trying to exclude certain characters at the end of links found in a string. I've got it working for excluding periods and commas, but I seem to have trouble excluding HTML entities (like >) as well. Rubular is here: http://rubular.com/r/cxjPyZc7Sb
[00:37:05] tsigo: The regex I've currently got is `([a-z][a-z0-9\+\.\-]+:\/\/\S+)(?<!,|\.)`
[00:37:31] xxneolithicxx: has joined #ruby
[00:37:32] barhum2013: has joined #ruby
[00:37:47] plshelpmeee: @BraddPitt -- just going to give up
[00:37:50] plshelpmeee: I put this up tho
[00:37:50] plshelpmeee: http://stackoverflow.com/questions/32130352/execution-of-ruby-file-fails-from-within-shell-script
[00:37:58] plshelpmeee: so fingers crossed
[00:41:01] Polysics: has joined #ruby
[00:41:09] cibs_: has joined #ruby
[00:41:52] n_blownapart: has joined #ruby
[00:42:11] dented42: has joined #ruby
[00:44:27] Ox0dea: tsigo: http://stackoverflow.com/a/1732454
[00:44:37] tkuchiki: has joined #ruby
[00:46:08] bb010g: has joined #ruby
[00:46:16] tsigo: Ox0dea: Not what I'm trying to do ;) I just want to find links inside text. I want to get rid of the HTML entity.
[00:46:29] nofxx: tsigo, I'm trying something like this: (\()?([a-z][a-z0-9\+\.\-]+:\/\/\S+)(?<!,|\.|^\\1)
[00:46:39] nofxx: use a match to see if the ( was before
[00:46:53] nofxx: not working , just so you might fix it faster, an idea
[00:47:00] snath: has joined #ruby
[00:47:24] tsigo: nofxx: Hmm, I'm not sure how that helps
[00:47:39] snath: has left #ruby: ()
[00:50:00] ledestin: has joined #ruby
[00:50:23] nofxx: tsigo, can't think of another way w/o look-behind
[00:50:59] nolbuk: has joined #ruby
[00:52:11] arooni-mobile: has joined #ruby
[00:53:41] Aeyrix: How can plshelpmeee not work out that error
[00:53:43] Aeyrix: fucking hell just read
[00:56:28] sphex_: hey. is there any way to call a method found by starting at a certain point in the ancestor chain? specifically, calling a method from the same module as the one of the current method being invoked.
[00:56:46] Oog: has joined #ruby
[00:59:35] hmsimha_: has joined #ruby
[00:59:51] wollner: has joined #ruby
[01:00:33] houhoulis: has joined #ruby
[01:01:22] Oog: has joined #ruby
[01:01:37] diegoviola: has joined #ruby
[01:02:39] Ox0dea: sphex_: Alas, __callee__ and __method__ both return paltry ol' Symbols. :/
[01:02:42] ohaibbq: has joined #ruby
[01:02:46] Soviet_Jesus_: has left #ruby: ()
[01:03:59] Ox0dea: sphex_: Does `self` not refer to the relevant Module for your purposes?
[01:04:24] dgutierrez1287: has joined #ruby
[01:04:32] sphex_: Ox0dea: ok. I just found info on "calling a super-super-method": self.class.superclass.superclass.instance_method(:method).bind(self).call
[01:04:54] baweaver: has joined #ruby
[01:05:01] sphex_: dunno if it works yet... or how it'll handle "super".
[01:05:03] RegulationD: has joined #ruby
[01:05:33] frozen3: has joined #ruby
[01:05:56] keen_________: has joined #ruby
[01:06:55] sphex_: Ox0dea: what I'm trying to do is a method that "translates" unhandled behavior by calling other methods, but it should skip the modules that handled it, and jump to the fallback methods starting from the current module only. there's a lot of "super" going on.
[01:07:08] wollner: guys need a help with a YAML syntax (not sure if I can achieve that) https://gist.github.com/anonymous/ca39d53313634a42546f
[01:08:40] Aeyrix: wollner: no
[01:09:01] meph: has joined #ruby
[01:09:24] wollner: Aeyrix: tks
[01:09:34] Limix: has joined #ruby
[01:11:09] mary5030: has joined #ruby
[01:11:32] Ox0dea: wollner: Yes.
[01:13:17] Ox0dea: wollner: https://gist.github.com/0x0dea/ddf1f5d23467bc82675b
[01:14:32] Aeyrix: Ox0dea: that is fucking awful
[01:15:07] Ox0dea: Aeyrix: Anchors considered harmful?
[01:15:38] Aeyrix: You actually made yaml look like a bag of dicks
[01:15:41] Aeyrix: I didn't know that was possible.
[01:16:28] shevy: it is not valid yaml
[01:16:36] Ox0dea: This guy.
[01:17:05] Ox0dea: shevy: It should take you at most ten seconds to execute a gist.
[01:17:13] diegoviola: http://sprunge.us/VjBZ?rb <-- vending machine simulator I've wrote in ruby
[01:17:17] diegoviola: any ideas what I can improve?
[01:19:18] Ox0dea: diegoviola: #chomp before #to_i is unnecessary.
[01:19:24] Ox0dea: >> "42\n\n\n".to_i
[01:19:25] ruboto: Ox0dea # => 42 (https://eval.in/419997)
[01:19:35] nofxx: diegoviola, make beer cheaper... kidding, I'd rather take the coffee =D
[01:19:48] diegoviola: nofxx: rofl ok
[01:20:44] cibs: has joined #ruby
[01:21:13] Ox0dea: diegoviola: You shouldn't impose heterogenous data upon yourself.
[01:22:58] jenrzzz: has joined #ruby
[01:23:08] diegoviola: Ox0dea: what do you mean?
[01:23:19] davedev24: has joined #ruby
[01:24:00] wollner: Ox0dea: that doest no accomplish what I want...you are still repeating the values
[01:24:46] mary5030: has joined #ruby
[01:25:03] jaycee: has joined #ruby
[01:25:23] dented42: has joined #ruby
[01:25:31] robh71: has joined #ruby
[01:29:04] devoldmx: has joined #ruby
[01:29:11] mistym: has joined #ruby
[01:29:13] Ox0dea: wollner: How do you mean?
[01:29:43] danielpclark: has joined #ruby
[01:30:05] Ox0dea: diegoviola: Your price data.
[01:30:08] jhn: has joined #ruby
[01:30:21] diegoviola: Ox0dea: ok but this data is not real
[01:30:23] elepedus: has joined #ruby
[01:30:31] diegoviola: Ox0dea: it's just made up
[01:31:02] robbyoconnor: has joined #ruby
[01:31:02] diegoviola: actually, it's not far from the real data
[01:31:16] diegoviola: Ox0dea: I still don't understand your point in saying that though
[01:31:26] Ox0dea: >> (1.methods - 1.0.methods).size # diegoviola
[01:31:26] diegoviola: imposing data on myself? wat?
[01:31:27] ruboto: Ox0dea # => 22 (https://eval.in/419999)
[01:31:30] Ox0dea: Just something to bear in mind.
[01:32:00] jenrzzz: has joined #ruby
[01:32:13] Ox0dea: diegoviola: Not sure how you missed that big-ass "heterogenous" back there.
[01:32:48] jiada: has joined #ruby
[01:32:52] diegoviola: Ox0dea: sorry that still doesn't make sense for me
[01:33:18] bronson: has joined #ruby
[01:33:25] dopieee: has joined #ruby
[01:33:28] shevy: the Oracle can be cryptic
[01:35:53] lore-: has joined #ruby
[01:35:58] northfurr: has joined #ruby
[01:36:01] lore-: I"m trying to print a int but leading 0's, for instance my int of 5 I want it output'd like 05. is there a method I can use to do that similar to decimal places with .round
[01:36:12] Ox0dea: >> '%02d' % 5 # lore-
[01:36:13] ruboto: Ox0dea # => "05" (https://eval.in/420000)
[01:36:25] ReK2GnULinuX: has joined #ruby
[01:36:56] Ox0dea: &ri sprintf
[01:36:56] `derpy: No results
[01:37:07] Ox0dea: adaedra: ^?
[01:37:53] blackmesa: has joined #ruby
[01:38:16] lore-: Ox0dea: what do you call that?
[01:38:25] DelDotB: has joined #ruby
[01:38:27] Ox0dea: lore-: String formatting, in the most general sense.
[01:38:30] lore-: what did I do there, it worked
[01:38:57] Ox0dea: You told Kernel.sprintf to print a number to width 2 using leading 0s.
[01:39:17] Ox0dea: More or less.
[01:39:43] segy: has joined #ruby
[01:39:45] Ox0dea: lore-: http://ruby-doc.org/core-2.2.2/String.html#method-i-25
[01:41:27] barhum2013: has joined #ruby
[01:41:40] nofxx: still trying to fix this regex, going to use it... any help with this look-behind, got invalid patter in look-behind trying a \1 on the escapes in the end
[01:41:42] nofxx: http://rubular.com/r/KTmRdzfuFW
[01:41:51] nofxx: match 6 and 7
[01:42:08] xxneolithicxx: has joined #ruby
[01:42:10] xwct: has joined #ruby
[01:42:15] tkuchiki: has joined #ruby
[01:42:21] nofxx: might be easier just clean it up laters with another regex =/
[01:45:13] diego2: has joined #ruby
[01:46:06] diego2: has joined #ruby
[01:46:54] User458764: has joined #ruby
[01:48:53] riskish: has joined #ruby
[01:51:35] allcentu1: has joined #ruby
[01:52:31] segy: has joined #ruby
[01:52:46] lore-: thanks Ox0dea
[01:56:28] shevy: a new version of perl is out, it's the ultimate showdown battle - ruby versus perl, who will prevail with released versions \o/
[01:56:55] robh71: has joined #ruby
[01:58:30] tkuchiki: has joined #ruby
[02:01:18] Rubie: has joined #ruby
[02:01:56] frozen3: has joined #ruby
[02:06:51] northfurr: has joined #ruby
[02:07:42] weemsledeux: has joined #ruby
[02:08:40] sevenseacat: has joined #ruby
[02:09:15] workmad3: has joined #ruby
[02:09:39] Oog: has joined #ruby
[02:10:35] dopie: has joined #ruby
[02:11:35] Polysics: has joined #ruby
[02:12:41] fullofcaffeine: has joined #ruby
[02:14:12] robh71: has joined #ruby
[02:14:53] hmsimha_: has joined #ruby
[02:15:04] Maletor: has joined #ruby
[02:15:37] banghouse2: has joined #ruby
[02:16:08] bronson: has joined #ruby
[02:21:14] Raidboss: has joined #ruby
[02:21:22] Raidboss: has left #ruby: ()
[02:22:03] _blizzy_: has joined #ruby
[02:24:50] dimasg: has joined #ruby
[02:29:33] lucyinthesky: has joined #ruby
[02:30:52] baweaver: has joined #ruby
[02:36:15] j_mcnally: has joined #ruby
[02:36:20] robh71: has joined #ruby
[02:36:55] tkuchiki: has joined #ruby
[02:37:01] gambl0re: has joined #ruby
[02:37:22] mclee: has joined #ruby
[02:38:32] ericwood: has joined #ruby
[02:39:44] blackmesa: has joined #ruby
[02:41:59] modern: has joined #ruby
[02:41:59] modern: has joined #ruby
[02:44:45] dented42: has joined #ruby
[02:45:03] bruno-: has joined #ruby
[02:46:02] j_mcnally: has joined #ruby
[02:48:39] bjmllr: has joined #ruby
[02:49:51] ivanskie: has joined #ruby
[02:52:01] danielpclark: has joined #ruby
[02:53:39] Ox0dea: diegoviola: I can has more than one item?
[02:54:21] wallerdev: has joined #ruby
[02:56:20] diegoviola: Ox0dea: not currently
[02:56:36] Ox0dea: This vending machine a shit.
[02:56:38] shevy: give him fish
[02:57:24] diegoviola: Ox0dea: I'm happy to add that feature if you can help
[02:57:35] Ox0dea: diegoviola: Do you know how to loop?
[02:58:29] diegoviola: Ox0dea: I add a loop in the main method and add the items in an array?
[02:58:46] Ox0dea: Why do you figure you need an array?
[02:59:18] diegoviola: where else to add the items?
[03:00:03] Ox0dea: diegoviola: For telling me what all I bought, do you mean?
[03:00:09] diegoviola: Ox0dea: also, do real machines allow you to have more than one item at the same time?
[03:00:23] sarkyniin: has joined #ruby
[03:00:34] Ox0dea: diegoviola: I expect there must be some out there, sure.
[03:00:51] Ox0dea: diegoviola: I thought you thought you needed an array to properly issue a potential refund.
[03:01:37] diegoviola: please don't insult my vending machine
[03:01:57] Ox0dea: Machines love constructive criticism.
[03:02:41] havenwood: has joined #ruby
[03:02:46] Ox0dea: An aesthetic consideration: display prices right-aligned and to two decimal places in the left "column", and then item names will naturally align as well.
[03:03:11] Ox0dea: UX is very important when it comes to vending machines.
[03:03:52] Ox0dea: Also, look what happens if I have a dollar and buy something that costs seventy cents:
[03:03:56] Ox0dea: >> 1 - 0.7
[03:03:57] ruboto: Ox0dea # => 0.30000000000000004 (https://eval.in/420007)
[03:04:43] Ox0dea: Even Bitcoin isn't that granular.
[03:06:24] diegoviola: Ox0dea: how do I align in the CLI? \t?
[03:06:31] RegulationD: has joined #ruby
[03:06:39] diegoviola: I mean with puts
[03:06:47] diegoviola: can you give me an example?
[03:06:50] Aria: has joined #ruby
[03:08:01] Ox0dea: diegoviola: Right-align the prices and left-align the item names.
[03:08:09] Ox0dea: A natural "divide" will form right down the middle.
[03:09:50] braincrash: has joined #ruby
[03:10:14] diegoviola: Ox0dea: like this you mean? http://sprunge.us/UUAa
[03:11:35] dented42_: has joined #ruby
[03:12:14] User4587_: has joined #ruby
[03:12:23] Polysics: has joined #ruby
[03:13:41] shevy: diegoviola you can align with .ljust and .rjust
[03:13:45] shevy: >> "abc".ljust(12) +'|'+ 'def'.rjust(10)
[03:13:46] ruboto: shevy # => "abc | def" (https://eval.in/420008)
[03:14:45] Ox0dea: diegoviola: Oh, right. I forgot you were numbering the options.
[03:14:53] grenierm: has joined #ruby
[03:15:56] RandyT_: has joined #ruby
[03:16:32] Ox0dea: diegoviola: http://git.io/vs49A
[03:16:48] Oog: has joined #ruby
[03:16:49] Ox0dea: The "scannability" is quite good in either case, but the latter is more appropriate for your purposes.
[03:17:15] devbug: has joined #ruby
[03:18:21] hydrozen: has joined #ruby
[03:18:38] diego3: has joined #ruby
[03:18:46] diego3: has joined #ruby
[03:18:57] diegoviola: Ox0dea: yes, numbering
[03:19:09] bronson: has joined #ruby
[03:19:18] darkf: has joined #ruby
[03:19:46] Ox0dea: diegoviola: Aye, but you want users to be able to operating your thingamajig efficiently and painlessly.
[03:19:50] Ox0dea: Think of the children!
[03:20:12] diegoviola: numbers are easy
[03:20:26] diegoviola: what's so hard about them
[03:20:49] saddad: has joined #ruby
[03:21:02] diegoviola: not that I'm against changing my program, but what's better?
[03:21:14] Ox0dea: I'm talking about displaying the prices more legibly.
[03:22:11] Ox0dea: I'm almost ninety, and my vision is thus not quite what it used to be, so I have to stick my finger on the screen and slowly move along the line to ensure I know how much I'm going to be wasting on this exorbitantly priced beer.
[03:23:21] iateadonut: has joined #ruby
[03:23:29] Musashi007: has joined #ruby
[03:24:02] shevy: twice pontiki's age!
[03:24:10] Ox0dea: Isn't she Heinz?
[03:24:25] shevy: No that is ketchup
[03:24:50] Ox0dea: s/ketch/cats/, I think.
[03:25:22] Ox0dea: diegoviola: If you wanted to get duper-fancy, you could ditch the numbers and highlight a "selection character" in a different color.
[03:25:47] Ox0dea: 'c' for coffee, 'b' for beer, 'h' for chocolate and whatnot.
[03:26:13] Ox0dea: And then you could require 'io/console' and use STDIN.getch so that the user doesn't even have to press Enter to make their selection.
[03:26:17] Ox0dea: The future is now!
[03:26:18] luckyme: has joined #ruby
[03:26:19] diegoviola: Ox0dea: that's cool
[03:26:35] shevy: he is a marketing salesman
[03:26:37] n_blownapart: has joined #ruby
[03:26:50] EminenceHC: has joined #ruby
[03:26:53] Ox0dea: ACTION promises he doesn't process insurance claims.
[03:27:48] diegoviola: my machine has Coffee and Chocolate
[03:27:59] Ox0dea: That it does, so you'll need to disambiguate somehow.
[03:28:23] diegoviola: I can't use c
[03:28:30] Ox0dea: Well, you can use it once?
[03:29:24] diegoviola: but when you go to an elevator, you also press numbers, numbers work well
[03:29:50] devoldmx: has joined #ruby
[03:29:53] diegoviola: but this is different
[03:30:04] Ox0dea: >> $vending_machine == $elevator
[03:30:05] ruboto: Ox0dea # => true (https://eval.in/420009)
[03:30:09] Ox0dea: Dammit, ruboto!
[03:30:13] diegoviola: what about STDIN.getch?
[03:30:19] ruboto: Why don't you try it and see for yourself?
[03:30:59] shevy: diegoviola you could just use numbers
[03:31:22] dgutierrez1287: has joined #ruby
[03:31:54] ngscheurich: has joined #ruby
[03:32:00] elepedus: has joined #ruby
[03:33:48] Ox0dea: diegoviola: http://git.io/vs45u
[03:34:03] Ox0dea: That should clearly demonstrate the utility of `STDIN.getch`.
[03:35:40] pontiki: has joined #ruby
[03:36:00] Ox0dea: diegoviola: Also, the relevant authorities are likely to get on your case if chocolate is the only foodstuff your machine vends.
[03:37:12] Maletor: has joined #ruby
[03:37:54] n_blownapart: hi does ruby have math modules like python numpy et al ?
[03:38:35] shevy: n_blownapart depends on what you need
[03:38:36] Ox0dea: >> %w[cmath mathn matrix].each(&method(:require)) # n_blownapart
[03:38:37] ruboto: Ox0dea # => ["cmath", "mathn", "matrix"] (https://eval.in/420011)
[03:38:44] Ox0dea: So, yeah, sort of.
[03:38:59] shevy: PI can be found in Math :)
[03:39:05] Ox0dea: Alas, Ruby's facilities in this domain still pail in comparison. :/
[03:39:36] shevy: there is SciRuby https://github.com/SciRuby
[03:40:03] n_blownapart: Ox0dea, shevy yeah I went to an ipython talk today. yeah looked at SciRuby thanks.
[03:40:31] n_blownapart: it is huge at UC Berkeley but I hate looking at python code.
[03:40:43] shevy: well python has like 3x the people that ruby has :(
[03:40:47] diegoviola: Ox0dea: what else would you add in a machine?
[03:41:10] diegoviola: Ox0dea: I had pizza previously in my machine but then figured out machines don't sell pizza
[03:41:12] shevy: diegoviola a shotgun
[03:41:28] Ox0dea: diegoviola: I've seen vending machines with pizza in.
[03:41:29] khebbie: has joined #ruby
[03:41:30] shevy: bread. cookies
[03:41:53] shevy: this will be the best vending machine ever
[03:41:57] Ox0dea: diegoviola: ^
[03:42:03] n_blownapart: I am planning to start learning ruby over. shevy will teach it to me.
[03:42:05] pontiki: isn't there a pizza vending machine that actually cooks the pizza, too?
[03:42:06] Ox0dea: Make it better than any vending machine ever devised.
[03:42:27] shevy: n_blownapart \o/ btw if you already know another programming language then it should be easy to transition
[03:42:35] Ox0dea: diegoviola: Are you familiar with combo boxes?
[03:42:50] shevy: the key to ruby is to keep it small and elegant
[03:42:50] Ox0dea: diegoviola: Your vending machine should totally use them.
[03:43:09] Ox0dea: "Small and elegant" does not mean "paltry".
[03:43:16] n_blownapart: shevy do you remember my moniker? I am notorious for asking basic questions. my other moniker is crucify_me ..
[03:43:21] diegoviola: Ox0dea: I don't know how to do combo boxes in the CLI, will I have to use GTK+?
[03:43:50] Ox0dea: diegoviola: I didn't mean that you should use "actual" combo boxes, only that the notion is applicable to a full-featured vending machine.
[03:43:57] n_blownapart: I dropped programming and started looking at math again. I love pencil and paper
[03:44:31] Ox0dea: diegoviola: Food -> Hot -> Pizza
[03:44:36] diegoviola: I appreciate all the help and advice though, this is an amazing channel
[03:44:41] Ox0dea: Alcohol -> Best -> Crown
[03:44:53] diegoviola: Ox0dea: right, I can see doing something like that, maybe with ncurses?
[03:45:12] Ox0dea: That might be overkill, but why not?
[03:45:17] diegoviola: that's probably overkill yeah
[03:46:53] qiukun: has joined #ruby
[03:46:56] diegoviola: time for me to add some specs
[03:47:10] CloCkWeRX: has joined #ruby
[03:47:15] shevy: n_blownapart not entirely sure... I have an ultra-short memory on IRC, no timestamps, it's a never-ending scroll to me
[03:47:18] diegoviola: I just want to practice some rspec
[03:47:31] diegoviola: should I only be testing input and output for different methods?
[03:47:44] shevy: diegoviola you can use ncurses. but did you actually finish the non-combo box CLI variant already?
[03:47:55] bronson: has joined #ruby
[03:47:56] Ox0dea: diegoviola: Ideally, but the world is not an ideal place.
[03:47:56] diegoviola: shevy: not yet
[03:48:00] diegoviola: shevy: one step at a time
[03:48:03] shevy: and how do you have so much time to ask questions, aren't you coding anything at all? :D
[03:48:38] Ox0dea: n_blownapart: What means "dropped programming"?
[03:48:48] diegoviola: shevy: I don't know about that
[03:49:10] shevy: he gave up!
[03:49:17] n_blownapart: shevy, you've helped me a lot so a retroactive thanks. I do have the best monikers at least.
[03:49:34] Ox0dea: Aye, but I'm curious as to whether he went so far as to switch majors or something.
[03:49:54] Ox0dea: Math -> CS is fairly common, but not so much the reverse.
[03:50:01] n_blownapart: Ox0dea, it means I was teaching myself and annoying people here, then I stopped working on it after an injury.
[03:50:54] n_blownapart: Ox0dea, dropped means to give up in idiomatic English
[03:50:58] diegoviola: incidentally, I've been trying to find some examples of vending machines written in Ruby and I couldn't find any before I started writing this
[03:51:31] Ox0dea: n_blownapart: Did you just call me an idiom?
[03:51:42] Ox0dea: Sorry, this is my first day on the English.
[03:52:16] Ox0dea: diegoviola: There are any number of menu-like systems written in Ruby, and many of the ideas transfer seamlessly.
[03:52:31] diegoviola: Ox0dea: right
[03:53:19] n_blownapart: no Ox0dea an idiom is for example "to see the light." (it means to understand). you cannot tell its meaning by the individual words.
[03:53:31] Ox0dea: This guy.
[03:54:06] gix: has joined #ruby
[03:54:33] n_blownapart: Ox0dea, you were joking, sorry.
[03:55:41] tkuchiki: has joined #ruby
[03:57:58] Oog: has joined #ruby
[03:58:28] grenierm: has joined #ruby
[03:58:48] shevy: Ox0dea is a very serious Oracle
[03:59:13] shevy: when he writes "This guy." it is a statement of utter disapproval
[04:00:06] EminenceHC: has joined #ruby
[04:01:09] diegoviola: I'm trying to write some specs for my code... but when I do require "./vending_machine" my script will just execute and termite, I want to test each method separately
[04:01:16] diegoviola: what I'm doing wrong?
[04:01:47] siovene: has joined #ruby
[04:02:49] siovene: Hi, sorry about the possibly stupid question, I'm new to this. Also sorry if this is about the language and not other things, but can you help with this? http://dpaste.com/08JXNTR
[04:03:47] shevy: strange error
[04:04:37] siovene: shevy: I instaled ruby 2.0.0 with rvm because Ubuntu has 1.9 by default, and it looks like sup needs 2.0.0.
[04:04:38] jacaballero: has joined #ruby
[04:04:41] shevy: only reason I can think of is that you must have installed more than one ruby version
[04:04:44] darkf: has joined #ruby
[04:04:58] siovene: shevy: yeah that's right. I'll try uninstalling the system one.
[04:05:11] shevy: I guess it is using the gem from the 1.9 one then
[04:05:32] sevenseacat: ubuntu does not 'have 1.9 by default'
[04:05:52] sevenseacat: it comes with no version of ruby preinstalled and offers 1.9, 2.0, and i believe 2.1 now in its repos
[04:06:13] Ox0dea: diegoviola: It's likely the case that the building isn't up to code. I seem to recall modern architects use some sort of lacquer on the wood to prevent such incursions.
[04:06:22] siovene: sevenseacat: what I meant is apt-get install ruby installs 1.9 on 15.04.
[04:06:32] Ox0dea: What a tragedy.
[04:06:41] sevenseacat: siovene: yes, you wanted apt-get install ruby2 .
[04:06:49] siovene: sevenseacat: oh thanks.
[04:06:53] xxneolithicxx: has joined #ruby
[04:06:58] diegoviola: Ox0dea: no really, can you actually help?
[04:07:09] sevenseacat: not that you should be using apt-packaged rubies anyway. just wanted to clear up the misconception.
[04:07:30] Ox0dea: diegoviola: If your program has termites, you need to stop and reconsider some things.
[04:07:50] diegoviola: Ox0dea: my terminal emulator is called termite, not my program
[04:08:04] diegoviola: https://github.com/thestinger/termite
[04:08:08] shadoi: has joined #ruby
[04:08:44] diegoviola: anyway, any ideas?
[04:08:53] Ox0dea: Extract testable pieces.
[04:09:07] Ox0dea: Your thing is pretty much all IO right now.
[04:10:27] diegoviola: yes, and that can't be tested with rspec?
[04:10:38] Ox0dea: It would be ill-advised at this point in your journey.
[04:11:14] rbowlby: has joined #ruby
[04:11:19] diegoviola: that's fine, thanks
[04:11:27] fedexo: has joined #ruby
[04:11:36] toretore: diegoviola: your library should function independently of any user input or other io
[04:13:01] jbw: has joined #ruby
[04:13:06] khebbie: has joined #ruby
[04:13:17] Polysics: has joined #ruby
[04:13:29] danielpclark: has joined #ruby
[04:14:21] braincra-: has joined #ruby
[04:14:26] diegoviola: toretore: yes I agree
[04:14:30] dudedudeman: has joined #ruby
[04:14:40] dudedudeman: wasssup #ruby
[04:15:13] hydrozen: has joined #ruby
[04:15:24] diegoviola: toretore: I'm not sure how I'll go into writing a library that is independently of input though for this purpose... are there any examples?
[04:15:27] spewbaby: has joined #ruby
[04:16:00] nofxx: diegoviola, pass what the input will be to it on init
[04:17:17] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[04:17:22] dudedudeman: ah. i forgot what that one was
[04:17:47] diegoviola: nofxx: oh so I just remove my gets and I pass the data from my specs instead?
[04:17:57] toretore: diegoviola: class VendingMachine;end; machine = VendingMachine.new; loop{ cmd = gets.chomp; case cmd; when /^buy (.+)$/ then machine.buy($1); end }
[04:18:38] moss: has joined #ruby
[04:18:53] diegoviola: toretore: cool thanks
[04:18:54] toretore: def test_buying_chocolate; assert_equal 'chocolate bar', machine.buy('chocolate'); end
[04:19:40] astrobun_: has joined #ruby
[04:19:46] toretore: and don't complicate things with this spec bs
[04:20:02] framling: has joined #ruby
[04:20:02] Ox0dea: Belay that.
[04:21:04] blue_deref: has joined #ruby
[04:21:25] toretore: once you're become familiar with minitest and understand what xspec gives you that it doesn't, then make the switch
[04:21:55] nofxx: ok, after giving up, had a supper and a coffee, I'm about to give up again with this bloody regex http://rubular.com/r/KTmRdzfuFW match 6 & 7 .. any tips please.
[04:24:25] bougyman: most of them seem wrong.
[04:24:31] bougyman: not just 6 and 7
[04:24:46] nofxx: bougyman, why? how?
[04:24:58] Ox0dea: nofxx: Look at the start of the matches?
[04:25:10] Ox0dea: Only #4 is correct.
[04:25:18] nofxx: Ox0dea, that's what I'm trying with the first match and the \1 , but doesn't work
[04:25:24] luckymeerza: has joined #ruby
[04:25:32] nofxx: the \1 inside the look-behing gives crazy parse error, would be a fit
[04:25:57] nofxx: bloody parenthesis
[04:26:01] yfeldblum: has joined #ruby
[04:26:47] nofxx: jez, didn't updated, sorry just a sec
[04:26:59] nofxx: http://rubular.com/r/QTgJw3exS0
[04:27:13] Ox0dea: It got worse.
[04:27:42] nofxx: Ox0dea, but there's the idea...
[04:28:18] nofxx: thinking of making a gem out of it, a information grabber ... out of any chunk of text: txt, html, pdf, retrieve all URL, phonenumber, and address... the latter the trickier
[04:28:42] toretore: http://rubular.com/r/EYkzgvQDLN - path must be defined more narrowly probably
[04:28:51] Ox0dea: nofxx: For your consideration: http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/
[04:28:59] toretore: address haha good luck
[04:29:15] yfeldblum: has joined #ruby
[04:29:28] toretore: you need some deep learning neural shit for that
[04:29:30] nofxx: toretore, heheh... yeah, my only hope: all geonames DB to match. at least match city or zip
[04:29:41] bougyman: it's too late and i'm too many beers in
[04:29:41] nofxx: grab the line, hope for the best
[04:30:13] khebbie: has joined #ruby
[04:30:18] Ox0dea: >> $too_many_beers == true
[04:30:19] bougyman: I don't know how you solve Link (http://the.link) as well as http://wikipedia/link_(with_parens)
[04:30:19] ruboto: Ox0dea # => false (https://eval.in/420018)
[04:30:25] nofxx: toretore, with a geocoding service (paid) you might check for validity... then I see a great success ratio
[04:30:29] bougyman: http://rubular.com/r/XvmKmwI2Bo that's close.
[04:30:42] toretore: regex tip #345: it's often easier to say what you don't expect than what you do
[04:30:54] bougyman: you really need an engine for this, not a single regex.
[04:31:12] toretore: nofxx: try putting a japanese, chinese or nigerian address into that
[04:31:43] bougyman: mine wouldn't much care about language or encoding.
[04:31:59] bougyman: but the two parenthetical expressions aren't really differentiatable by regex.
[04:32:03] RandyT_: has joined #ruby
[04:32:03] bougyman: there's just no math for it.
[04:32:28] Ox0dea: See: Markdown.
[04:33:16] nofxx: Ox0dea, I totally agree name is impossible. Only way is join all that's left with a space. =D
[04:33:37] Ox0dea: (As a demonstration of the infeasibility of matching nested parentheses with regular expressions, to clarify.)
[04:33:56] bougyman: it's not the nesting, it's the sample data.
[04:33:59] toretore: markdown sucks tho
[04:34:01] Ox0dea: nofxx: The regular expression for matching human names is /.*/.
[04:34:09] bricker: has joined #ruby
[04:34:11] bougyman: nofxx: did you look at http://rubular.com/r/XvmKmwI2Bo ?
[04:34:14] nofxx: toretore, named matches are nice, ty. But the bug persists here. I'm on the right rubular?
[04:34:24] toretore: nofxx: what's the bug?
[04:34:42] nofxx: no one, just missed that link
[04:34:49] nofxx: thank you guys, who did it ??
[04:34:55] arooni-mobile: has joined #ruby
[04:35:10] nofxx: ah.. match 4 is a invalid, but anyways is better... gonna try it a lil
[04:35:38] toretore: you have to define what is valid and invalid
[04:35:44] toretore: it's a machine
[04:36:01] bougyman: nofxx: you can't diff between 4 and 5 with regular expression
[04:36:03] bougyman: .you just can't.
[04:38:33] bougyman: if you want to see what a proper (?really?) url regex looks like, take a look at some of these: https://mathiasbynens.be/demo/url-regex
[04:38:52] nofxx: bougyman, submatch inside and permit it to have parenthesis and brackets only if it's matched inside... ( i was trying the opposite w/o lock: matching if it starts )
[04:39:08] bougyman: I recommend @scottgonzales (1347 chars)
[04:39:35] siovene: Hey again. Attempting to apt-get install ruby2.0 on Ubuntu also tries to install ruby1.9. That doesn't sound normal... is it?
[04:39:51] bougyman: siovene: sometimes debuntu would name 2.0 1.9
[04:39:51] nofxx: siovene, add the brightbox repo
[04:39:52] siovene: Here's the list of the packages that would be installed: libruby1.9.1 libruby2.0 ruby ruby1.9.1 rubygems-integration
[04:40:20] bougyman: siovene: apt-cache show ruby1.9.1
[04:40:26] bougyman: is it actually 1.9.1?
[04:40:32] bougyman: or is it 1.9.1-2.0.0 ?
[04:40:54] nofxx: bougyman, ahh.. I see now, I can't match for opening ( and use \1 I would want ending )
[04:41:05] bougyman: nofxx: exactly.
[04:41:10] hmsimha_: has joined #ruby
[04:41:11] bougyman: you'd need logic in the engine.
[04:41:15] bougyman: not much, but a little.
[04:41:30] jpfuentes2: has joined #ruby
[04:42:41] siovene: bougyman: actually 1.9.1. No mention of anything 2.0.
[04:43:22] siovene: nofxx: yeah that repo seems to work, now installing only 2.0.0
[04:43:42] blackmesa: has joined #ruby
[04:47:47] RandyT_: has joined #ruby
[04:48:09] djbkd: has joined #ruby
[04:51:09] Antiarc: has joined #ruby
[04:51:35] wollner: has joined #ruby
[04:54:00] NivenHuH: has joined #ruby
[04:54:24] ivanskie: has joined #ruby
[04:55:54] psy: has joined #ruby
[04:55:56] icharlie: has joined #ruby
[04:58:35] robbyoconnor: has joined #ruby
[04:58:51] pawnbox: has joined #ruby
[04:59:06] khebbie: has joined #ruby
[05:00:42] cgfbee: has joined #ruby
[05:03:21] sdwrage: has joined #ruby
[05:05:19] flegercovateam: has joined #ruby
[05:06:21] dudedudeman: has left #ruby: ()
[05:06:32] fullofcaffeine: has joined #ruby
[05:06:35] ohaibbq_: has joined #ruby
[05:06:57] neilnorthrop: has joined #ruby
[05:08:06] pawnbox_: has joined #ruby
[05:08:23] tkuchiki: has joined #ruby
[05:10:14] nickenchuggets: has joined #ruby
[05:10:27] neilnorthrop: has joined #ruby
[05:12:27] krz: has joined #ruby
[05:13:25] ruby-lang426: has joined #ruby
[05:13:32] towler: has joined #ruby
[05:13:55] Polysics: has joined #ruby
[05:13:58] pawnbox: has joined #ruby
[05:16:13] qiukun: has joined #ruby
[05:17:04] benlovell: has joined #ruby
[05:20:42] dhjondoh: has joined #ruby
[05:23:46] howdoi: has joined #ruby
[05:25:20] fgo: has joined #ruby
[05:25:49] nahtnam: has joined #ruby
[05:28:42] aganov: has joined #ruby
[05:30:03] blueOxigen: has joined #ruby
[05:30:39] devoldmx: has joined #ruby
[05:33:39] elepedus: has joined #ruby
[05:34:24] Musashi007: has joined #ruby
[05:36:47] Fevrale: has joined #ruby
[05:36:53] last_staff: has joined #ruby
[05:38:19] benlovell: has joined #ruby
[05:38:59] diego2: has joined #ruby
[05:42:07] pawnbox: has joined #ruby
[05:42:55] Oog: has joined #ruby
[05:43:16] jeadre: has joined #ruby
[05:43:31] duncannz: has joined #ruby
[05:43:34] Contigi777: has joined #ruby
[05:44:21] AlexAltea: has joined #ruby
[05:44:22] blackmesa: has joined #ruby
[05:45:10] User458764: has joined #ruby
[05:45:25] kriskropd: has joined #ruby
[05:46:46] workmad3: has joined #ruby
[05:47:28] v0n: has joined #ruby
[05:47:41] inversesquarelaw: has joined #ruby
[05:48:07] tagrudev: has joined #ruby
[05:49:28] Pupp3tm4st3r: has joined #ruby
[05:54:29] mrodrigues: has joined #ruby
[05:55:16] Pupp3tm4st3r: has joined #ruby
[05:56:15] yardenbar: has joined #ruby
[05:57:29] mrodrigues: I have some code where a user can pass a block as a callback. The callback gets run in a separate thread. If the user's code raises an error it kills the thread without warning until #join is called on the thread. Should I be trusting users to handle errors here? Should I be notifying them if their block fails? https://github.com/mikerodrigues/orderbook/blob/master/lib/orderbook.rb#L173
[05:58:18] joe2: has joined #ruby
[05:58:43] benlovell: has joined #ruby
[05:58:47] DelDotB: has joined #ruby
[05:59:17] AnoHito_: has joined #ruby
[06:00:04] jokester: has joined #ruby
[06:02:21] User4587_: has joined #ruby
[06:03:12] Oog_: has joined #ruby
[06:03:55] AnoHito: has joined #ruby
[06:05:03] AnoHito_: has joined #ruby
[06:07:42] Pupp3tm4st3r: has joined #ruby
[06:08:26] dymk: jesus, some guy is suggesting that it's bizzare for ruby to be used for string manipulations
[06:08:38] dymk: he's asking for an example program on github that does string manipulation
[06:08:59] dymk: Does ActionView still append to an internal string buffer? In which case any rails app counts...
[06:09:17] bronson: has joined #ruby
[06:10:00] jackjackdripper: has joined #ruby
[06:10:19] freeze: has joined #ruby
[06:10:34] baweaver: Ruby, Perl, and Python are pretty well meant for string manipulation
[06:10:37] dymk: at this point i can't tell if the fella is serious or not
[06:10:38] dymk: wat in question: https://www.reddit.com/r/ruby/comments/3hqky4/string_literals_are_frozen_immutable_by_default/cuadbav?context=3
[06:10:38] dymk: or maybe I'm totally misinterpreting what he's asking
[06:10:49] baweaver: ed -> sed -> awk -> perl -> ruby
[06:11:09] tkuchiki: has joined #ruby
[06:11:17] timonv: has joined #ruby
[06:11:44] baweaver: I'll let you in on a secret though
[06:11:48] baweaver: listen closely
[06:11:52] sevenseacat: ACTION listens
[06:12:00] dymk: ACTION scoots his chair in
[06:12:00] baweaver: a majority of ruby reddit has no idea what they're talking about
[06:12:06] htmldrum: has joined #ruby
[06:12:08] dymk: no kidding
[06:12:21] dymk: they're asking for a better C api, and i'm sitting here like "have you even used it before?"
[06:12:47] baweaver: Honestly most of reddit tends to be frustrated males between the ages of 20-30
[06:13:01] sevenseacat: I knew there was a reason I didn't use it.
[06:13:12] dymk: there was an announcement post from the new CTO today
[06:13:16] mrodrigues: what's the general makeup of #ruby-lang?
[06:13:20] baweaver: I consider myself a tolerable frustrated male between the ages of 20 and 30
[06:13:29] dymk: someone was saying that reddit costs something on the order of $20M per year to run
[06:13:41] baweaver: I'd believe it.
[06:13:50] sevenseacat: I bet someone else argued
[06:13:50] baweaver: You should see our AWS costs some time.
[06:13:53] sevenseacat: for the sake of it
[06:14:00] hs366: has joined #ruby
[06:14:06] baweaver: not that I can share though.
[06:14:13] sevenseacat: 'nuh uh, if they were using linode it would be cheaper' or some shit
[06:14:14] dymk: baweaver, seriously? damn, remind me never to scale
[06:14:29] baweaver: dymk: I seriously doubt you scale to our level
[06:14:31] dymk: sevenseacat, there was something in that vein in there, hah
[06:14:43] Polysics: has joined #ruby
[06:14:45] dymk: baweaver, i'll have you know i store gigabytes (gigabytes!) of porn on my little home server
[06:14:50] sevenseacat: I've been on the internet a long time.
[06:14:55] baweaver: not meant as a challenge, mind.
[06:15:06] dymk: just sayin', gigabytes
[06:15:09] sevenseacat: dymk: do you know where baweaver works? >_>
[06:15:15] dymk: do you know where *i* work?
[06:15:17] tkuchiki: has joined #ruby
[06:15:19] baweaver: We extract something on the order of 100 TB of data every hour
[06:15:24] dymk: but no, where do you work baweaver?
[06:15:42] fatsum: No Amazon employees?
[06:15:50] baweaver: I know a few
[06:15:56] sevenseacat: my former boss just got a job at amazon, does that count?
[06:15:57] Ox0dea: baweaver: Enjoy your nightmare fuel: http://git.io/vsBsf
[06:15:59] baweaver: they're very keen on switching
[06:16:03] nofxx: you can get 1500 linodes with 120gb ram / 20 cores / 2TB SSD for an year
[06:16:08] fatsum: baweaver: http://cturt.github.io/ps4.html
[06:16:12] fatsum: I found that interesting.
[06:16:12] baweaver: Not my division :D
[06:16:14] dymk: baweaver, that's pretty cool, i'm only an intern, so I can't wave my apple around too much :P
[06:16:23] fatsum: dymk: What do you do at AAPL?
[06:16:25] fatsum: Ah, intern.
[06:16:26] ndrei: has joined #ruby
[06:16:31] dymk: core kernel
[06:16:42] Aeyrix: I almost worked for Apple/
[06:16:43] dymk: so that ps4.html link is pretty nifty looking
[06:16:45] baweaver: Hm, I'll have to read that one later.
[06:16:49] baweaver: Aeyrix: same
[06:16:55] fatsum: Wrote an XNU fuzzer once, was pretty ugly.
[06:17:00] sevenseacat: didnt mean to get all name-droppy like that >_>
[06:17:04] baweaver: infrastructure automation here
[06:17:10] baweaver: my name is bigger sevenseacat
[06:17:14] dymk: sevenseacat, something something you should see the CS page of my uni ;_;
[06:17:18] Aeyrix: AWS is pretty damn expensive.
[06:17:20] fatsum: baweaver: Not sure if I want a console or not.
[06:17:24] Aeyrix: Source: Currently competing with AWS.
[06:17:29] dymk: fatsum, XNU is ugly, only fitting the fuzzer is too
[06:17:35] fatsum: Aeyrix: I have 17 instances on AWS, and I don't use them. :(
[06:17:38] baweaver: Source: I see the contracts and weep
[06:17:42] Macaveli: has joined #ruby
[06:17:42] fatsum: yorickpeterse: Touche.
[06:17:46] fatsum: dymk: Touche.
[06:17:52] sevenseacat: fwiw I think the string immutability idea is good
[06:18:04] dymk: sure, as long as they have a fallback for having mutable strings
[06:18:06] baweaver: As long as GC keeps up
[06:18:10] dymk: it won't
[06:18:15] nofxx: or, 30.000 cores + 150.000gb of ram for an year
[06:18:23] baweaver: Haskell / Scala do fine with it.
[06:18:28] sevenseacat: also means the difference between symbols and strings is getting smaller
[06:18:33] fatsum: dymk: Sure you heard 2006 wants its null pointer dereferences back ;p
[06:18:37] fatsum: And the DYLD mess.
[06:18:48] dymk: don't remind me D:
[06:18:48] sinkensabe: has joined #ruby
[06:18:54] Aeyrix: What's the current proposal on instantiating an immutable string versus a mutable one?
[06:19:01] fatsum: So many local privilege escalation bugs in OS X - a bit of a surprise that "HackingTeam" had none.
[06:19:04] Aeyrix: "dongs" is still mutable?
[06:19:07] dymk: baweaver, sure, but their type system is built around immutability, and nice thread local heaps, etc
[06:19:08] AnoHito: has joined #ruby
[06:19:09] Aeyrix: String.new("dongs") is not?
[06:19:13] benlovell: has joined #ruby
[06:19:31] baweaver: I have a feeling Ruby is going to borrow a lot from Scala coming up here soon.
[06:19:41] dymk: it's gonna be interesting to see how they bolt immutable whatnots onto the current vm
[06:19:43] Aeyrix: I'll just move to Elixir.
[06:19:45] DelDotB: has joined #ruby
[06:19:47] freeze: has joined #ruby
[06:19:52] fatsum: I've heard good things about rust.
[06:19:56] Aeyrix: No you haven't.
[06:20:00] dymk: Aeyrix, i tried it, it's.... not a great story yet
[06:20:06] dymk: elixir/phoenix that is
[06:20:09] Aeyrix: dymk: Tell that to sevenseacat or Radar?
[06:20:29] Aeyrix: dymk is calling Elixir not great.
[06:20:29] dymk: i hope i didn't wake the phoenix evangelicals ;)
[06:20:36] sevenseacat: phoenix is an awesome story
[06:20:38] Macaveli: has joined #ruby
[06:20:38] dymk: and I like the language... as a concept
[06:20:39] arup_r: has joined #ruby
[06:20:58] dymk: not to be hostile, I really do like the language
[06:21:05] dymk: and phoenix is on the right track
[06:21:07] baweaver: run quickly
[06:21:11] baweaver: before Radar sees
[06:21:13] dymk: ACTION ducks for cover
[06:21:17] Radar: before who
[06:21:24] dymk: stop pinging him on irc! he'll see me!
[06:21:26] baweaver: ACTION grabs popcorn
[06:21:35] dymk: uh hi radar
[06:21:40] Radar: ACTION would like to share baweaver's popcorn
[06:21:44] Radar: dymk: continue
[06:21:47] baweaver: ACTION passes some over
[06:21:53] sevenseacat: btw phoenix 1.0 is due soon.
[06:22:00] baweaver: Is it now? Nice.
[06:22:19] dymk: Radar, I tried phoenix, its ORM is nowhere near activerecord's
[06:22:21] sevenseacat: bonan tagon, certainty
[06:22:36] sevenseacat: sure, activerecord's is 10 years more mature
[06:22:41] certainty: sevenseacat: did you just put a spell on me?
[06:22:45] dymk: well yeah and that's what I'm saying :P
[06:22:48] Aeyrix: Does anyone use DataMapper?
[06:22:51] dymk: it's not a good story, right now
[06:22:54] baweaver: sevenseacat: heh, you win. My portuguese is weak right now.
[06:23:00] sevenseacat: lotus does, and i've just started looking at lotus today
[06:23:02] fatsum: I need to learn Catalan.
[06:23:09] certainty: sevenseacat: lotus is great
[06:23:16] Aeyrix: certainty: Talk Lotus to me.
[06:23:16] baweaver: Well honestly I never judge a book too much by its first chapter or two
[06:23:19] dymk: also docs could use some love
[06:23:28] arup_r1: has joined #ruby
[06:23:28] baweaver: some go amazingly and flop later
[06:23:33] baweaver: and the converse is true as well
[06:23:37] sevenseacat: seems to have lots more smaller parts, compared to a ruby app
[06:23:46] Aeyrix: You mean inverse, right?
[06:23:52] Aeyrix: Converse means to engage in conversation.
[06:23:53] dymk: there also aren't many good resources on what a "good" elixir application should look like out there
[06:23:59] Aeyrix: Oh wait it also means the opposite
[06:24:03] Aeyrix: English is so fucking broken
[06:24:06] Aeyrix: English is like Python 3
[06:24:11] sevenseacat: dymk: welcome to the scenario of early adopters.
[06:24:18] baweaver: wow aliases work here too
[06:24:22] dymk: sevenseacat, indeed
[06:24:31] MasterPiece: has joined #ruby
[06:24:41] baweaver: ACTION needs to remember that later so he doesn't alias an entire rails controller into chat
[06:24:43] certainty: to me lotus looks very appealing. It's way closer to what i'd build outside the rails context.
[06:24:57] dymk: oh, elixir's metaprogramming story: it's way more difficult than even D is
[06:24:57] sevenseacat: I have not yet built anything significant in Elixir/Phoenix (nor have I even looked at Ecto) but it looks very promising
[06:25:07] Aeyrix: I tried Haskell again like
[06:25:09] baweaver: Now you want to see fun
[06:25:10] Aeyrix: two days ago
[06:25:11] dymk: things like not being able to extend structs at compile time
[06:25:11] jenksy: has joined #ruby
[06:25:15] baweaver: Aeyrix: Big Data
[06:25:31] wallerdev: has joined #ruby
[06:25:32] certainty: Aeyrix: didn't you like it?
[06:25:33] tubbo: has joined #ruby
[06:25:46] Aeyrix: certainty: no
[06:25:49] sevenseacat: ACTION keeps following the lotus Getting Started guide
[06:25:54] Aeyrix: I dislike functional programming as a whole tbq
[06:26:01] baweaver: it's definitely something that takes a bit
[06:26:02] Aeyrix: I don't need my shit to be mathematically provable.
[06:26:05] dymk: it's like they tried to keep the core language as small as possible and thus nerfed the usefulness of things like structs
[06:26:11] WilfredTheGreat: has joined #ruby
[06:26:17] dymk: but there's still techncially special language support for structs?
[06:26:40] dymk: things like that which might get fixed in v2.x
[06:26:47] certainty: Aeyrix: oh ok i see. It's not about being mathematically provable most of the time though. Having a mathematical foundation can be good, since there is strong theory about how things compose
[06:27:03] Aeyrix: certainty: I write Ruby though.
[06:27:04] Aeyrix: It's like
[06:27:06] Aeyrix: why bother
[06:27:10] Aeyrix: Ruby is so much easier to write
[06:27:13] Aeyrix: 99% of the time, if not more
[06:27:16] dymk: anyways, that's why i think the story isn't that great (re: sevenseacat and Radar)
[06:27:28] Aeyrix: dymk: Rails 4 in Action isn't a story book
[06:27:35] Aeyrix: it's a nonfiction guide to origami
[06:27:52] sevenseacat: ACTION checks so many things right now
[06:27:57] dymk: you mean artesian, hand crafted with love, non GMO code?
[06:28:11] Aeyrix: It's even locally grown.
[06:28:19] benlovell: has joined #ruby
[06:28:33] Tempesta: has joined #ruby
[06:28:33] pawnbox: has joined #ruby
[06:28:35] dymk: all it needs now is an Our Amazing Journey bankruptcy Medium blog entry
[06:28:44] baweaver: sevenseacat: welcome to programming
[06:28:46] Aeyrix: "Why we Failed"
[06:28:50] Aeyrix: "We fucked up p hard tbh"
[06:28:55] certainty: Aeyrix: the ideas apply equally to all languages
[06:28:58] baweaver: dymk: dangit
[06:28:59] dymk: "Would I do it again? Of-fucking-course"
[06:29:10] dymk: i'll be here all night folks
[06:29:21] baweaver: Don't forget to post links on HN and Reddit
[06:29:21] dymk: but really i won't, because work calls tomorrow
[06:29:25] baweaver: or it didn't really happen
[06:29:26] dymk: into the intern silos
[06:29:39] Aeyrix: tfw no internship
[06:29:41] baweaver: How much interning do you have left
[06:29:43] Aeyrix: tfw full time job insteafd
[06:29:49] dymk: 1 month or thereabouts, then back to school
[06:30:00] nofxx: need a cool name for my gem... it fetches useful (url, phones and emails currently) information out of text
[06:30:03] baweaver: or seattle?
[06:30:07] dymk: bay area
[06:30:22] baweaver: we'll be getting some type of Ruby thing going again for Coffee
[06:30:25] Aeyrix: nofxx: Forager
[06:30:30] baweaver: ACTION lives in East Bay
[06:30:34] baweaver: ACTION works in SoMA
[06:30:41] Aeyrix: South Maryland?
[06:30:57] dymk: I'm from norcal, dunno what these areas are
[06:31:07] khebbie: has joined #ruby
[06:31:09] baweaver: South of Market Area in San Francisco.
[06:31:12] nofxx: Aeyrix, that's a cool name. And rubygems available.
[06:31:17] Aeyrix: nofxx: :D
[06:31:24] dymk: baweaver, oh solid, are there ruby meetups often?
[06:31:25] Aeyrix: I'm good with project names.
[06:31:35] baweaver: I just managed to knick rapture as a gem name :D
[06:31:47] zenspider: ACTION doesn't want to rewrap libsdl...
[06:31:47] jbw: has joined #ruby
[06:31:51] dymk: nofxx: prism_on_a_budget
[06:31:52] zenspider: there's no place like home. there's no place like home. there's no place like home.
[06:31:54] Aeyrix: don't make me
[06:31:54] baweaver: already got clairvoyant too
[06:31:56] Aeyrix: define:knick
[06:32:45] Aeyrix: i'm kinda worried about what this immutable string thing will do to Ruby
[06:33:09] Oog: has joined #ruby
[06:33:21] dymk: baweaver, but please do let me know about dev meetups, i'm always down for that
[06:33:22] baweaver: english slang is nick, american slang on top of it is knick in some cases.
[06:33:30] dymk: gotta make the best out of my time in the bay
[06:33:32] Aeyrix: baweaver: Brits say 'lift'
[06:33:34] baweaver: Probably next Friday is when I plan
[06:33:52] dymk: please do pm me with details
[06:33:54] skade: has joined #ruby
[06:34:21] baweaver: watch the ruby meetup group
[06:34:24] baweaver: should be posting soon.
[06:34:38] dymk: meetup.com meetup group?
[06:35:06] nofxx: dymk, didn't find, some sort of this one? https://www.parsehub.com/
[06:36:00] baweaver: Aeyrix: American english you can literally make crap up and someone will believe you.
[06:36:08] russt: has joined #ruby
[06:37:08] dymk: baweaver, http://www.meetup.com/sfruby/ ?
[06:37:34] ddv: has joined #ruby
[06:37:55] baweaver: We're working on getting devs to take back over
[06:38:06] baweaver: bunch of project managers and business men got a hold of the scheduling
[06:38:08] dymk: cool, joined the group
[06:38:25] baweaver: zenspider: SeattleRB is far better at this point, we might steal a few ideas ;)
[06:38:44] zenspider: steal away. I gave a talk about this
[06:39:09] baweaver: What was the title on that one?
[06:39:17] zenspider: nerd party v3.1
[06:39:19] baweaver: (looks through zenspider's site)
[06:39:40] baweaver: ah, very nice,
[06:39:42] alphaatom: has joined #ruby
[06:40:03] arup_r: has joined #ruby
[06:40:12] zenspider: ugh... FFI or C... I'm fucked either way. :(
[06:40:30] jiada: has joined #ruby
[06:40:39] zenspider: esp fucked with FFI
[06:40:43] baweaver: SF Ruby consists of (that I remember on the channel) eam, cirwin, miah, xshay, and a few others I don't remember
[06:42:10] baweaver: but seriously, zenspider, just look at the names of most of the meetups we have :'(
[06:43:20] sevenseacat: "How to Make Users Win: Customer Development "
[06:43:25] baweaver: lean guides, making the user win, etc etc
[06:43:42] zenspider: ya got hijacked by douchebags. you let them.
[06:44:00] baweaver: oi, been here for a year
[06:44:18] baweaver: Working on fixing.
[06:45:27] zenspider: you, collectively. not YOU
[06:45:27] jbw: has joined #ruby
[06:45:57] krz: has joined #ruby
[06:46:05] blackmesa: has joined #ruby
[06:46:22] codecop: has joined #ruby
[06:46:25] codecop_: has joined #ruby
[06:46:41] baweaver: still working on fixing that
[06:46:53] baweaver: it'd help if there was more support for open source and meetups here.
[06:46:54] bruno-: has joined #ruby
[06:47:03] baweaver: referring to my work
[06:49:24] Aeyrix: baweaver: Has Sony tried git?
[06:49:28] Aeyrix: More specifically
[06:49:30] Aeyrix: git --gud
[06:49:45] baweaver: Working on OSS, legal is a freaking pain.
[06:49:55] Aeyrix: kek i think that joke went over your head
[06:50:09] Aeyrix: "get good"
[06:50:12] Aeyrix: "git good"
[06:50:14] Aeyrix: "git gud"
[06:50:29] baweaver: didn't think it was that funny, or that it was a joke
[06:50:32] Ox0dea: Joke is kill.
[06:50:48] Aeyrix: yeah that's what we thought about sony's sec :^)
[06:50:51] Aeyrix: okay shitposting over
[06:50:57] Aeyrix: http://new2.fjcdn.com/comments/5186846+_5caa2b539c1151cd82f2c7b249307f61.png
[06:51:14] dumdedum: has joined #ruby
[06:51:16] Aeyrix: that's a pretty good reworking of the League of Legends logo tbh
[06:53:25] Pupp3tm4st3r: has joined #ruby
[06:53:37] Aeyrix: http://news.usni.org/2015/08/19/exploring-the-wreck-of-uss-macon-the-navys-last-flying-aircraft-carrier
[06:53:39] Aeyrix: this is really cool
[06:53:50] r0bby_: has joined #ruby
[06:54:29] dionysus69: has joined #ruby
[06:54:42] michael_mbp: has joined #ruby
[06:56:59] zenspider: not as cool as britian's 1.2km long pycrete aircraft carrier
[06:57:00] sts_: has joined #ruby
[06:57:11] Aeyrix: wait what
[06:57:52] weemsledeux: has joined #ruby
[06:58:47] nirix: has joined #ruby
[06:59:00] sevenseacat: still doing the getting started guide for lotus, but so far I'm not sold
[06:59:51] zenspider: sevenseacat: wherefore?
[07:00:26] juanpaucar: has joined #ruby
[07:00:37] sevenseacat: seems to be very verbose and explicit, which isnt necessarily a bad thing, but it is a tedious thing
[07:01:31] sevenseacat: and a view deciding which template to render just squicks me out a little bit
[07:01:53] sevenseacat: though that may be because I'm not used to it
[07:01:58] baweaver: http://www.ruby.or.jp/en/certification/examination/index.data/ruby_silver_prep.pdf
[07:02:06] Aeyrix: just read about the aircraft carrier zenspider
[07:02:09] Aeyrix: you're right, that's cooler
[07:02:10] baweaver: #14 be broke
[07:02:12] Aeyrix: because it was an iceberg :^)
[07:02:25] juanpauc_: has joined #ruby
[07:02:33] baweaver: they said ruby test, was curious, going through practice. Lots of fun little typos
[07:02:44] Oog: has joined #ruby
[07:03:23] zenspider: Last update: Aug 3, 2015
[07:03:46] baweaver: will eventually, writing down it all for now
[07:03:51] n_blownapart: has joined #ruby
[07:03:54] dhjondoh: has joined #ruby
[07:04:07] Meow-J: has joined #ruby
[07:04:22] juanpaucar: has joined #ruby
[07:04:25] vondruch: has joined #ruby
[07:04:53] baweaver: while laughing at their ruby code
[07:04:56] baweaver: I should feel bad
[07:05:09] baweaver: I was also correcting parts of that Mazes book I bought
[07:05:34] baweaver: Not sure why people do this: ary = []; ary << v if v; ary << x if x
[07:05:45] baweaver: instead of just doing this: ary = [v,x].compact
[07:05:53] n_blownapart: hi why can't I use a comma in this parallel assignment at line 2? http://pastie.org/10365649
[07:06:00] baweaver: or select(&:itself) if it's false
[07:06:11] elepedus: has joined #ruby
[07:06:15] fatsum: baweaver: disturbing that people pay $150 for a certification that shows they know what chomp, for and if means. ;o
[07:06:17] juanpauc_: has joined #ruby
[07:06:19] RTG`: has joined #ruby
[07:06:20] baweaver: n_blownapart: that's not parallel
[07:06:23] fatsum: Seen worse things, but christ.
[07:06:55] sevenseacat: thats enough lotus for me
[07:06:56] zenspider: n_blownapart: that's not assignment, nor is it parallel
[07:07:11] baweaver: ACTION is half asleep
[07:07:23] sevenseacat: ACTION goes back to phoenix
[07:07:35] zenspider: n_blownapart: you can do that with `return a, b` if you want
[07:07:58] Polysics: has joined #ruby
[07:07:58] zenspider: or an array
[07:08:02] n_blownapart: baweaver, zenspider oh line 2 is missing return ?
[07:08:13] juanpauc_: has joined #ruby
[07:08:16] baweaver: not sure if trolling
[07:08:26] baweaver: ruby implies returns
[07:08:26] fatsum: n_blownapart: Read a book.
[07:08:42] zenspider: fatsum: knock it off
[07:08:49] n_blownapart: does Tolstoy count fatsum ?
[07:08:50] baweaver: what are you trying to return there?
[07:09:02] baweaver: n_blownapart: not helping, ignore it.
[07:09:03] zenspider: baweaver: it does, but explicit return allows multiple expressions sans-array
[07:09:25] baweaver: ACTION goes to experiment
[07:09:29] zenspider: I would do an array, personally... but the explicitness is sometimes nice
[07:09:44] n_blownapart: it's an example: http://stackoverflow.com/questions/2895957/parallel-assignment-operator-in-ruby
[07:10:01] fatsum: I'd use an array for clarity, really.
[07:10:08] juanpaucar: has joined #ruby
[07:10:14] baweaver: well I'll be
[07:10:19] stanc: has joined #ruby
[07:10:20] fatsum: All of this is well documented in Chapter 2 of pickaxe, but I suppose that's a bad recommendation.
[07:10:42] baweaver: fatsum: his point was more of saying just read a book does little to help
[07:11:02] baweaver: recommending a book and a chapter however may be valid in conjunction with an immediate reference
[07:11:16] fatsum: baweaver: Bleh.
[07:11:26] baweaver: though I don't pretend to know what he's thinking either.
[07:11:43] zenspider: assuming you can also stifle the asshattery and condescending tone
[07:11:52] fatsum: baweaver: He's a competent scripter.
[07:12:13] juanpauc_: has joined #ruby
[07:12:26] nofxx: is there some similar to %w{} but uses newlines instead of space to split?
[07:12:46] baweaver: nofxx: try it with newlines
[07:12:47] zenspider: you can use any whitespace
[07:12:47] Timba-as: has joined #ruby
[07:13:09] nofxx: that doesn't split the spaces... to write a big array of phrases
[07:13:38] zenspider: ah. you can either escape the spaces (ugly), or do a heredoc and split on newline
[07:14:04] nofxx: yeah, was using a heredoc... what's the escape?
[07:14:12] zenspider: ary = <<-EOD.split(/\n/)
[07:14:16] juanpaucar: has joined #ruby
[07:14:24] zenspider: just a backslash on each space. it gets ugly fast
[07:14:35] Jackneill: has joined #ruby
[07:14:39] baweaver: or just use a regular array
[07:14:47] nofxx: could swear the backslash wasnt working... something else. Ty zenspider
[07:15:01] nofxx: zenspider, yeah, heredoc better
[07:15:03] zenspider: nofxx: %w vs %W probably
[07:15:33] zenspider: little is like '', big is like ""
[07:15:43] zenspider: tho... backslash _should_ work in both?
[07:16:14] juanpauc_: has joined #ruby
[07:16:22] baweaver: >> %w(word\ maybe) + %W(word\ maybe)
[07:16:23] ruboto: baweaver # => ["word maybe", "word maybe"] (https://eval.in/420080)
[07:16:51] Aeyrix: http://www.asx.com.au/asxpdf/20150821/pdf/430pk1ymtb2qmq.pdf
[07:17:08] jenrzzz: has joined #ruby
[07:17:13] baweaver: >> "This works" " too by the way"
[07:17:14] ruboto: baweaver # => "This works too by the way" (https://eval.in/420081)
[07:17:44] baweaver: and is actually faster than + or <<
[07:17:47] fatsum: apeiros: Around?
[07:17:58] cornerma1: has joined #ruby
[07:18:09] baweaver: not very nice to rely on parser tricks though.
[07:18:10] juanpaucar: has joined #ruby
[07:18:17] baweaver: >> ?a # is another one.
[07:18:18] ruboto: baweaver # => "a" (https://eval.in/420082)
[07:18:26] ruboto: I don't know anything about dongs
[07:18:29] Aeyrix: >> ?dongs
[07:18:30] ruboto: Aeyrix # => /tmp/execpad-73924e292cd7/source-73924e292cd7:2: syntax error, unexpected '?' ...check link for more (https://eval.in/420083)
[07:18:32] Aeyrix: nice meme
[07:18:37] Ox0dea: >> ?w'tf'
[07:18:38] ruboto: Ox0dea # => "wtf" (https://eval.in/420084)
[07:19:38] baweaver: huh, guess it works that way too. Of course you know that Ox0dea
[07:20:03] zenspider: dongs? really? are we 10?
[07:20:07] juanpauc_: has joined #ruby
[07:20:12] n_blownapart: zenspider , sorry, to regress, why is that return not implied as said earlier?
[07:21:22] fatsum: n_blownapart: The last statement of a method is implied to return from that method; explicitly using a `return` allows for multiple expressions to be returned.
[07:21:24] baweaver: I want to say because return behaves like a method that can take multiple values.
[07:21:41] mutuma: has joined #ruby
[07:21:41] baweaver: though I wouldn't rely on that
[07:21:48] Kedare: has joined #ruby
[07:21:56] baweaver: instead just return an array: [(x-y), (x + y)]
[07:22:04] juanpaucar: has joined #ruby
[07:22:07] fatsum: Cleaner, yes.
[07:22:16] baweaver: not sure how common that return bit is
[07:22:26] zenspider: n_blownapart: in short: because it is a syntax error
[07:22:27] baweaver: but I've not seen that before myself anywhere.
[07:22:42] fatsum: I use `system` way too much in irb.
[07:23:13] baweaver: well, bed for me. 'night
[07:23:16] fatsum: Should use pry a little.
[07:24:00] juanpauc_: has joined #ruby
[07:24:02] n_blownapart: fatsum, zenspider baweaver thanks all . so the example was just an oversight?
[07:24:03] roolo: has joined #ruby
[07:25:02] Ox0dea: That's a new one.
[07:25:04] zenspider: n_blownapart: afaik, there's no version of ruby that works with that code.
[07:25:13] Ox0dea: zenspider: Did you try 0.49?
[07:25:53] zenspider: never got that one to build
[07:25:55] juanpaucar: has joined #ruby
[07:25:57] icharlie: has joined #ruby
[07:26:16] Ox0dea: charliesome has a patch.
[07:26:21] zenspider: I only have 1.8 - 2.2 right now. had 1.6 but it didn't like 64bit or something w/ my compiler setup
[07:26:27] Ox0dea: https://github.com/charliesome/historical-rubies
[07:26:28] fatsum: Think I'm going to get this 27" retina thingy.
[07:26:46] Ox0dea: zenspider: multilib?
[07:26:46] zenspider: old 1.8 and 1.6 would build before you could blink tho... it was great to hack on
[07:27:04] Ox0dea: ccache makes mucking about with current trunk not terrible.
[07:27:36] qiukun: has joined #ruby
[07:27:39] zenspider: unfamiliar with multilib... historical-rubies looks awesome tho
[07:27:55] juanpauc_: has joined #ruby
[07:27:58] fatsum: Is Ruby 2.2.x supported by debugger?
[07:28:00] rbowlby: has joined #ruby
[07:29:51] juanpaucar: has joined #ruby
[07:31:21] devoldmx: has joined #ruby
[07:31:30] lsmola: has joined #ruby
[07:31:47] juanpaucar: has joined #ruby
[07:32:21] benlovell: has joined #ruby
[07:32:33] charliesome: has joined #ruby
[07:32:42] choke: has joined #ruby
[07:32:50] terlar: has joined #ruby
[07:33:18] blackmesa: has joined #ruby
[07:33:25] Iskarlar: has joined #ruby
[07:33:42] juanpaucar: has joined #ruby
[07:34:11] fatsum: I need to sort out my .emacs.d/init.el for rc files sometime in the next two years.
[07:35:34] workmad3: has joined #ruby
[07:35:41] juanpaucar: has joined #ruby
[07:35:53] xhosae: has joined #ruby
[07:37:06] matled-: has joined #ruby
[07:37:29] benlovel1: has joined #ruby
[07:37:37] juanpauc_: has joined #ruby
[07:39:40] juanpaucar: has joined #ruby
[07:41:34] qiukun: has joined #ruby
[07:41:36] juanpaucar: has joined #ruby
[07:42:54] qiukun: has joined #ruby
[07:43:39] juanpauc_: has joined #ruby
[07:45:36] juanpaucar: has joined #ruby
[07:47:35] juanpaucar: has joined #ruby
[07:48:22] choke: has joined #ruby
[07:49:32] juanpauc_: has joined #ruby
[07:49:43] kloeri: has joined #ruby
[07:51:27] juanpauc_: has joined #ruby
[07:51:58] astrobun_: has joined #ruby
[07:52:39] blarghlarghl: I've noticed that RSpec 2.99 and above (maybe even some lower versions) no longer raise at the end of spec execution if there was a failure in the spec run. My 'run all specs' task list did: begin; Rake::Task[t].invoke; rescue; failed << t; end. this no longer works since rspec no longer raises. can I get rspec to raise again if one of the specs failed?
[07:52:53] blarghlarghl: I don't mean fail-fast, because I want it to finish the run despite the failure.
[07:53:22] anisha: has joined #ruby
[07:53:24] juanpaucar: has joined #ruby
[07:55:22] juanpauc_: has joined #ruby
[07:56:29] towski_: has joined #ruby
[07:57:05] joonty: has joined #ruby
[07:57:27] juanpaucar: has joined #ruby
[07:58:21] fatsum: Yeah, that's better. http://i.imgur.com/gaJOYDl.png
[07:58:34] mikecmpbll: has joined #ruby
[07:58:44] adaedra: wow that spacing
[07:59:15] fatsum: adaedra: font character spacing?
[07:59:20] juanpauc_: has joined #ruby
[07:59:46] Ox0dea: fatsum: Is this real?
[08:00:04] fatsum: Yes, why wouldn't it be?
[08:00:16] Ox0dea: Because you seem to be sighted?
[08:00:16] fatsum: adaedra: Smaller is much too close together on OSX.
[08:00:47] devdazed: has joined #ruby
[08:01:20] Ox0dea: sighted == !blind
[08:01:22] juanpaucar: has joined #ruby
[08:01:30] fatsum: You're an odd little ferret.
[08:02:01] fatsum: adaedra: I'll try other fonts, OSX terminal fonts are horrible when you aren't using urxvt or something.
[08:02:12] charliesome: has joined #ruby
[08:03:24] juanpaucar: has joined #ruby
[08:03:27] astrobun_: has joined #ruby
[08:03:45] fatsum: Meh. http://i.imgur.com/w7fIi4N.png
[08:04:17] Ox0dea: It must look different on your screen or something.
[08:04:31] fatsum: What are you using to view it on?
[08:04:31] adaedra: Personal tastes, I'd guess. Nothing wrong with that.
[08:04:47] Ox0dea: People can be wrong about themselves, for what that's worth.
[08:04:54] fatsum: adaedra: scrot your terminal.
[08:05:20] fatsum: Ox0dea: Certainly, but I'm not sure what I'm wrong about here when it comes to font char spacing.
[08:05:23] juanpaucar: has joined #ruby
[08:05:29] Ox0dea: >> 'Gdkkn'.gsub /./, &:succ # fatsum
[08:05:30] ruboto: Ox0dea # => "Hello" (https://eval.in/420097)
[08:05:36] Ox0dea: Slightly fancier, methinks.
[08:05:50] Musashi007: has joined #ruby
[08:05:55] Ox0dea: fatsum: To clarify, I'm only poking fun.
[08:05:58] rht: has joined #ruby
[08:06:03] fatsum: You have a habit of doing this.
[08:06:25] Ox0dea: Are you going to phone the authorities?
[08:06:31] fatsum: I am the authority.
[08:07:04] adaedra: fatsum http://i.imgur.com/FOYt3H1.png
[08:07:24] juanpauc_: has joined #ruby
[08:07:33] fatsum: adaedra: Which mac are you using?
[08:07:52] adaedra: Which version, you mean? Yosemite
[08:07:57] fatsum: No, which mac.
[08:08:06] fatsum: Retina/non-retina.
[08:08:10] adaedra: Non-retina
[08:08:12] Iskarlar: has joined #ruby
[08:08:43] krz: has joined #ruby
[08:09:18] bronson: has joined #ruby
[08:09:21] juanpaucar: has joined #ruby
[08:09:32] zenspider: fatsum: your authority: https://www.youtube.com/watch?v=gx4jn77VKlQ
[08:10:01] Pupp3tm4st3r: has joined #ruby
[08:11:08] zenspider: "oh no! nothing's worse than Cartman with authoritah"
[08:11:29] juanpauc_: has joined #ruby
[08:11:43] fatsum: zenspider: Are you trying to be funny?
[08:12:34] fatsum: Don't believe I watched that.
[08:12:42] fatsum: Sets zenspider on ignore.
[08:13:23] juanpaucar: has joined #ruby
[08:13:43] fatsum: adaedra: I've been a stickler for terminal font settings for a while, and never quite managed to get it right where character spacing is involved; but I do have sight problems. So it's excusable I suppose.
[08:13:54] Ox0dea: And much was explained.
[08:14:14] ndrei: has joined #ruby
[08:14:14] adaedra: fatsum: note that I was not saying it's wrong. I was just surprised.
[08:14:42] Ox0dea: fatsum: Apologies for making light of your disability.
[08:14:59] NivenHuH: has joined #ruby
[08:15:03] bumbar_: has joined #ruby
[08:15:17] fatsum: adaedra: Oh no, I'd like a "prettier" terminal if I could find a way of having one - I spend 90% of my computer usage in it.
[08:15:21] juanpaucar: has joined #ruby
[08:15:44] fatsum: Ox0dea: You're so bad at trolling, you should speak to weev for lessons.
[08:16:16] fatsum: (add-to-list 'auto-mode-alist '("\\.*rc$" . conf-unix-mode))
[08:16:32] zenspider: hrm... can he see me type !mute if I'm on ignore?
[08:16:51] sevenseacat: depends on the client i think.
[08:16:55] rolfb: has joined #ruby
[08:17:02] adaedra: I don't think he would see you typing it, but would see the mode change.
[08:17:17] zenspider: coming from ruboto... not me.
[08:17:19] juanpaucar: has joined #ruby
[08:17:21] Ox0dea: zenspider: Gonna do some science?
[08:17:33] zenspider: well... if it is for science... I guess I must
[08:17:40] Ox0dea: For the good of all of us.
[08:17:51] m8: has joined #ruby
[08:18:07] Musashi007: has joined #ruby
[08:18:30] zenspider: I kinda want to give them a chance to hang themselves one more time... seems only fair. they were on a very short leash to begin with
[08:18:46] Ox0dea: Short leashes do not good nooses make.
[08:19:08] adaedra: Verb at end? Is that german?
[08:19:17] juanpauc_: has joined #ruby
[08:19:24] m8: has joined #ruby
[08:19:44] hyy: has joined #ruby
[08:20:10] Ox0dea: adaedra: http://english.stackexchange.com/q/27420
[08:20:42] Ox0dea: I concede that my usage was incorrect in this case.
[08:21:01] jas02: has joined #ruby
[08:21:04] zenspider: you didn't use "doth" :P
[08:21:11] charliesome: has joined #ruby
[08:21:13] Ox0dea: Nor an initial action phrase. :/
[08:21:17] juanpaucar: has joined #ruby
[08:21:26] hyy: http://vpaste.net/lxwcN
[08:21:34] hyy: ahahahah my program is funny
[08:21:35] rolfb: i thought it was Yoda
[08:21:39] hyy: it's a WIP
[08:22:17] zenspider: hyy: you might want to look at the method called 'even?'
[08:22:41] zenspider: and then learn string interpolation. it'll clean up a fair amount
[08:23:04] Ox0dea: hyy: You've almost got yourself a Collatz sequence generator there.
[08:23:05] adaedra: everyone hides, yorickpeterse is here
[08:23:16] juanpauc_: has joined #ruby
[08:23:32] fatsum: Need to figure out how to get *rc files working nicely in this editor.
[08:23:49] fatsum: zenspider: You could mute me if you want, I'm not sure I care a whole lot eitherway.
[08:24:10] fatsum: Ah, I'm an idiot.
[08:24:21] Ox0dea: !quote fatsum
[08:24:25] fatsum: Figured it out.
[08:24:40] zenspider: bad regexps. :P
[08:24:56] fatsum: No. My regexp is perfectly fine, spider.
[08:25:00] hyy: 0x0dea: I'm wanting to learn if statements
[08:25:08] adaedra: Regular exceptions lead to irregular problems.
[08:25:10] fatsum: I was using emacsclient instances, instead of a new emacs instance.
[08:25:14] hyy: so have I really learned them?
[08:25:15] adaedra: er, exceptions
[08:25:18] adaedra: expressions*
[08:25:19] juanpaucar: has joined #ruby
[08:25:20] hyy: where's the nested if statement?
[08:25:23] zenspider: adaedra: heh
[08:25:43] zenspider: adaedra: I liked your original version better :)
[08:25:43] fatsum: zenspider: Do you have a problem with me you'd like to address, or are you just grumpy?
[08:25:50] einarj: has joined #ruby
[08:25:59] hyy: I'm at chapter 5 of Learn to Program by Chris Pine
[08:26:12] workmad3: has joined #ruby
[08:26:16] Ox0dea: Leash looks long enough to me.
[08:26:21] marr: has joined #ruby
[08:26:24] zenspider: hyy: what editor are you using?
[08:26:30] zenspider: Ox0dea: yeah?
[08:26:35] fatsum: hyy: That's a nice introdocutry book.
[08:26:40] hyy: zenspider: Pe on Haiku/BeOS
[08:26:40] Ox0dea: zenspider: Well, he's certainly going for it.
[08:26:46] zenspider: a very good book
[08:26:53] zenspider: !mute fatsum
[08:26:54] ruboto: +q fatsum!*@*
[08:26:54] ruboto: -o ruboto
[08:26:56] Ox0dea: Does Learn to Program teach using `then`?
[08:27:24] juanpauc_: has joined #ruby
[08:27:28] hyy: um, not sure, let me check...
[08:27:30] zenspider: Ox0dea: IIRC.... I don't think so. but I'm in the minority on that keyword
[08:27:37] Ox0dea: You... like it?
[08:27:53] ruboto: I don't know anything about banned
[08:28:02] zenspider: fatsum, you're welcome to take it up in #ruby-banned
[08:28:13] zenspider: Ox0dea: I do
[08:28:23] adaedra: ruboto: no snack for you
[08:29:11] tesuji: has joined #ruby
[08:29:24] Ox0dea: hyy: Implementing the Collatz sequence is a good way to apply a rudimentary understaning of loops and conditionals.
[08:29:30] juanpaucar: has joined #ruby
[08:29:42] zenspider: except, then you're confused by collatz because it is crazy
[08:29:55] Ox0dea: I expect it'll remain unproved.
[08:30:18] benlovell: has joined #ruby
[08:30:56] hyy: LOL if it infinite loops the conjecture is wrong!
[08:30:57] Thomas-0725: has joined #ruby
[08:31:02] Ox0dea: I can't even say why it feels intuitively obvious that all Ns converge.
[08:31:03] Thomas-0725: is rails written in Ruby?
[08:31:11] htmldrum: has joined #ruby
[08:31:24] juanpaucar: has joined #ruby
[08:31:24] zenspider: Thomas-0725: what do you mean by exclusively?
[08:31:50] adaedra: https://github.com/rails/rails/search?l=ruby
[08:32:22] finges_: has joined #ruby
[08:32:25] zenspider: according to cloc, it's got a minority of CSS, YAML, JS, HTML, yacc (?!?), SQL, and DTD... but is otherwise all ruby
[08:32:41] Thomas-0725: Oh cool. Thanks adaedra! Still not used to using github.
[08:33:06] zenspider: and I mean TINY minority
[08:33:13] adaedra: There's a small bar on project main page with quick language statistics, always
[08:33:16] hyy: I'm going to get some more tea
[08:33:25] juanpauc_: has joined #ruby
[08:33:27] Thomas-0725: zenspider, yeah what I meant I guess is "Is Rails written in just Ruby, or does it have compiled components written in C?" I don't really understand how Rails works, honestly.
[08:33:32] ruby-lang708: has joined #ruby
[08:33:53] zenspider: Thomas-0725: it certainly uses some gems that have compiled components... but it doesn't have any itself
[08:34:34] sevenseacat: google has decided that it wants to be german again. sigh.
[08:35:20] ruby-lang708: for some reason, my intellij ruby debugger ain't working right, I am getting the following; https://gist.github.com/AbdulR3hman/7a0a1e9c8ae0b456a504
[08:35:27] juanpaucar: has joined #ruby
[08:35:54] zenspider: ze germans?
[08:35:56] thiagovsk: has joined #ruby
[08:36:02] chthon: has joined #ruby
[08:36:31] zenspider: ruby-lang708: I'd start hunting down 'linecache', whatever that is
[08:37:03] Pupp3tm4st3r: has joined #ruby
[08:37:15] zenspider: looks like it might be a problem trying to run debugger + jruby according to some quick googling
[08:37:24] juanpauc_: has joined #ruby
[08:37:40] hyy: I have a question, how do I start this program?
[08:37:43] Musashi007: has joined #ruby
[08:37:53] hyy: this Collatz conjecture program
[08:37:58] zenspider: hyy: `ruby <scriptname.rb>`
[08:38:03] platzhirsch: has joined #ruby
[08:38:17] hyy: zenspider; no like as in actually starting to code it
[08:38:20] zenspider: or... what are you asking? :)
[08:38:26] zenspider: haha. ok. sorry.
[08:38:30] Ox0dea: hyy: Take an integer n and apply the sequence?
[08:38:39] hyy: from the user you mean?
[08:38:39] ruby-lang708: I have no idea what on earth it is
[08:38:40] zenspider: um... I implemented it out of wikipedia's definition, iirc.
[08:38:52] Ox0dea: ruby-lang708: https://github.com/jruby/jruby/wiki/UsingTheJRubyDebugger
[08:38:54] ruby-lang708: I assume its a bloody cache gem or something
[08:39:00] Ox0dea: That document is quite thorough.
[08:39:10] yorickpeterse: oh what's this, we append to a CSV forever and ever? Sounds webscale
[08:39:12] yorickpeterse: (??????????)?????? ?????????
[08:39:13] ruby-lang708: Ox0dea: thanks, I will have a look
[08:39:15] hyy: ok, how do I get command line arguments from the user?
[08:39:21] yorickpeterse: and it's especially fun now that it triggers encoding errors
[08:39:23] Ox0dea: hyy: They're in ARGV.
[08:39:24] zenspider: there's a lot of stuff w/ linecache jruby on google
[08:39:27] juanpauc_: has joined #ruby
[08:39:32] rolfb: anyone have any tips on getting more readable backtraces when programming ruby? indentation, wrapping, highlights and so on?
[08:39:35] Ox0dea: hyy: But I think you meant input, in which case you'll want `gets`.
[08:39:59] Ox0dea: rolfb: better_errors
[08:40:23] adaedra: that's for rack though
[08:40:28] rolfb: Ox0dea; thanks, but I meant for terminal use
[08:41:05] Ox0dea: rolfb: better_errors + wkhtmltopdf + libcaca, maybe?
[08:41:09] jenrzzz: has joined #ruby
[08:41:11] zenspider: hyy: either way, ARGV and gets will return strings. use to_i to convert
[08:41:11] Ox0dea: I'll stop.
[08:41:16] rolfb: Ox0dea: haha :)
[08:41:23] juanpaucar: has joined #ruby
[08:41:47] hyy: how do I test for invalid input i.e. not a number? Just walk through the string and if it's not a 0 through 9 character it's bogus?
[08:42:16] Ox0dea: hyy: String#to_i will return 0 for non-numeric strings.
[08:42:20] zenspider: >> Integer("a")
[08:42:21] ruboto: zenspider # => invalid value for Integer(): "a" (ArgumentError) ...check link for more (https://eval.in/420111)
[08:42:26] zenspider: >> Integer("42")
[08:42:27] rolfb: adaedra: i am using rack-test, but better_errors still reports to a web page?
[08:42:27] ruboto: zenspider # => 42 (https://eval.in/420112)
[08:42:48] zenspider: but I wouldn't worry about it. do the simplest thing that works for now
[08:43:13] elepedus: has joined #ruby
[08:43:24] juanpauc_: has joined #ruby
[08:43:37] adaedra: rolfb: better_errors is for rack applications and displays always in a webpage, yes. I take that's not what you need.
[08:43:46] Ox0dea: rolfb: https://gist.github.com/mikepfirrmann/3820663
[08:43:52] Ox0dea: It's not terrible.
[08:44:06] rolfb: rescue all the things?
[08:44:09] livathinos: has joined #ruby
[08:44:23] zenspider: not all... most
[08:44:34] adaedra: jruby and rbx should have different stacktrace formatters too, but that's something else
[08:44:35] Ox0dea: rolfb: More meant to inspire you than anything else, really.
[08:44:42] rolfb: Ox0dea: thanks, appreciated
[08:44:46] Ox0dea: Sure thing.
[08:44:49] rolfb: zenspider: not all?
[08:45:01] Ox0dea: rolfb: Not SyntaxError, for instance.
[08:45:18] zenspider: rolfb: nope. not all. default rescue is StandardError and all subclasses
[08:45:25] rolfb: ah, right
[08:45:28] juanpaucar: has joined #ruby
[08:45:36] zenspider: NoMemoryError, LoadError, SyntaxError, etc. all outside
[08:45:37] rolfb: thanks for reminding me, been away for a while :)
[08:45:57] zenspider: ?quickref rolfb
[08:45:57] ruboto: rolfb, http://www.zenspider.com/Languages/Ruby/QuickRef.html
[08:46:04] zenspider: there's a full list there
[08:46:43] rolfb: ah yes, the quickref was always one of my favorites
[08:47:08] hyy: http://vpaste.net/nN7QN
[08:47:16] Ox0dea: >> [StandardError < Exception, ObjectSpace.each_object(Exception).include?(StandardError)]
[08:47:17] ruboto: Ox0dea # => [true, false] (https://eval.in/420113)
[08:47:27] juanpauc_: has joined #ruby
[08:47:58] Ox0dea: hyy: But the sequence! Where is the sequence?!
[08:48:05] sdwrage: has joined #ruby
[08:48:32] zenspider: hyy: `a = a OP b` can often be rewritten as: `a OP= b`
[08:48:48] Ox0dea: s/often/always/?
[08:48:52] hyy: then it requires what? nested while loops?
[08:49:05] Ox0dea: Why are you saying such crazy things?
[08:49:23] juanpauc_: has joined #ruby
[08:49:34] pranny: has joined #ruby
[08:49:42] hyy: well erm obviously I don't understand how to code yet
[08:49:51] zenspider: hyy: you're gettin' there
[08:49:56] testing-shout: has joined #ruby
[08:50:04] zenspider: don't mind Ox0dea ... he's flipping ME shit, not you
[08:50:07] Ox0dea: But I wonder if you might be able to explain what makes you feel you'd need more than one loop here.
[08:50:44] hyy: to start over with a new starting number I believe
[08:51:02] zenspider: I obviously need to write a /fool cmd for ERC
[08:51:19] juanpaucar: has joined #ruby
[08:51:31] zenspider: Ox0dea: I think always... but I fudged just in case
[08:51:39] Ox0dea: zenspider: Fair enough.
[08:51:48] Ox0dea: On a related note, do you also envy Perl 6's .= operator?
[08:51:56] hyy: :( well if he's flipping you stuff zenspider and not me then I best be quiet
[08:52:02] Ox0dea: `foo .= bar` > `foo = foo.bar`, I feel.
[08:52:31] zenspider: hrm and/or are ops.... but they aren't methods. :)
[08:52:49] whiteline: has joined #ruby
[08:53:06] c0m0: has joined #ruby
[08:53:14] juanpauc_: has joined #ruby
[08:53:26] Ox0dea: hyy: Have you learned about arrays just yet?
[08:53:42] michael_mbp: has joined #ruby
[08:54:35] zenspider: I don't remember what all is introduced by ch3
[08:54:42] Ox0dea: He said he's up to 5, no?
[08:54:52] zenspider: so many numbers in my head
[08:55:11] juanpauc_: has joined #ruby
[08:56:21] astrobun_: has joined #ruby
[08:56:39] Ox0dea: hyy: In that case, you can just print each new element of the sequence as you arrive at it.
[08:57:12] juanpaucar: has joined #ruby
[08:57:21] paradoja: has joined #ruby
[08:57:29] arup_r: has joined #ruby
[08:57:35] hyy: when I get good I want to make device drivers, kernels, and do the programming for the video games I'd want to make
[08:58:34] fatsum: has left #ruby: ()
[08:58:37] fatsum_: has joined #ruby
[08:58:44] fatsum_: hyy: Then you ought to learn C.
[08:58:46] sevenseacat: good luck with that.
[08:58:59] sevenseacat: you're really going to need it.
[08:59:08] fatsum_: hyy: There's not much to writing loadable kernel modules, but it's just a bit of a bore at this point.
[08:59:12] juanpauc_: has joined #ruby
[08:59:28] fatsum_: hyy: Then easiest way would be to look at the kernel.org git, and see the patchsets submitted. Often you find easy bugs to fix.
[08:59:33] hyy: my IQ might be a pencil and my math knowledge is atrocious
[08:59:49] fatsum_: You don't need to know much mathematics to fix kernel bugs.
[09:00:04] zenspider: !ban fatsum_
[09:00:13] platzhirsch: has joined #ruby
[09:00:16] fatsum_: God you're an annoying little gnat.
[09:00:30] zenspider: !mute fatsum_
[09:00:31] ruboto: +q fatsum_!*@*
[09:00:31] ruboto: -o ruboto
[09:00:35] Thomas-0725: has joined #ruby
[09:00:58] bronson: has joined #ruby
[09:01:07] zenspider: apeiros: do you really need all that syntax to use !ban ? what if you don't want to provide a timeframe?
[09:01:15] juanpaucar: has joined #ruby
[09:01:30] jhass: zenspider: no, we'll have shortcuts
[09:02:06] zenspider: he's done. gone.
[09:02:31] zenspider: hyy: I'm doing some games in pure ruby (+ C libraries via ruby)
[09:02:35] zenspider: not a bad way to learn this stuff
[09:03:00] fatsum_: has left #ruby: ()
[09:03:17] juanpaucar: has joined #ruby
[09:03:38] suchness: has joined #ruby
[09:04:17] hyy: but yes I might need help with the basics
[09:04:19] tsvenson: has joined #ruby
[09:04:19] fatsum: has joined #ruby
[09:04:46] Ox0dea: hyy: Don't be this guy: http://i.imgur.com/V0p2o3z.gif
[09:05:09] Ox0dea: That's what happens if you try to hack on the Linux kernel before understanding loops.
[09:05:11] juanpaucar: has joined #ruby
[09:06:09] hyy: ok, i won't be that guy then :)
[09:06:37] hyy: how do I begin to understand loops?
[09:07:10] juanpaucar: has joined #ruby
[09:07:46] Ox0dea: To understand iteration, you must first do this, and then do it again.
[09:08:05] hyy: you must read that sentence again and again
[09:08:17] yorickpeterse: ok, tricky encoding question:
[09:08:27] yorickpeterse: I have strings such as "Gr\\u00e4umige Zimmer. Gastronomie durchschnittlich" (note the escaped \u)
[09:08:39] yorickpeterse: I need a way to turn that into \\u00e4 into \u00e4
[09:08:50] yorickpeterse: But since it's a literal \u the usualy encoding methods don't work
[09:08:54] Ox0dea: hyy: Yes, that's the crux of the thing, although loops tend to have termination conditions.
[09:09:00] yorickpeterse: and you can't gsub something with "\u" since that itself is invalid
[09:09:08] zenspider: yorickpeterse: eval?
[09:09:12] juanpaucar: has joined #ruby
[09:09:20] Ox0dea: yorickpeterse: It's the same problem as for "\\n" and friends.
[09:09:24] yorickpeterse: zenspider: euh
[09:09:37] charliesome: has joined #ruby
[09:09:38] zenspider: I KNOW! RUBY_PARSER! :P
[09:09:40] Motoservo: has joined #ruby
[09:09:43] diegoaguilar: has joined #ruby
[09:09:49] yorickpeterse: this is a CSV file, sadly not actual Ruby code
[09:09:59] yorickpeterse: Ox0dea: not entirely
[09:10:08] yorickpeterse: Ox0dea: replacing "\\n" with "\n" is valid
[09:10:13] yorickpeterse: but just "\u" is not a valid string
[09:10:13] diegoaguilar: has joined #ruby
[09:10:16] ruboto: yorickpeterse # => /tmp/execpad-4332a4882bef/source-4332a4882bef:2: invalid Unicode escape ...check link for more (https://eval.in/420121)
[09:10:38] Ox0dea: Right, I was only referring to the age-old problem of turning escaped special characters back into their true selves.
[09:10:45] Ox0dea: The saner approach is to use #gsub's Hash form.
[09:10:56] Ox0dea: But you can't do that here. :/
[09:11:03] yorickpeterse: I suppose I could replace all cases of \uXXXX with the actual unicode form
[09:11:03] diegoaguilar: has joined #ruby
[09:11:11] chinmay_dd: has joined #ruby
[09:11:12] roolo: has joined #ruby
[09:11:15] yorickpeterse: but then I'd have to know how long the unicode sequence would be
[09:11:16] juanpaucar: has joined #ruby
[09:11:37] zenspider: yorickpeterse: \u isn't valid, but you can certainly lex the rest of the code out
[09:11:39] yorickpeterse: so that it doesn't replace \\u00e4umige with just \u00e4 (removing the "umige")
[09:11:42] zenspider: it SUCKS... but you can
[09:12:12] Ox0dea: hyy: In the hopes that it proves to be of some value, here is precisely how *not* to generate Collatz sequences: https://eval.in/420119
[09:13:14] Guest32: has joined #ruby
[09:13:16] juanpauc_: has joined #ruby
[09:13:28] hyy: WOW that's inefficient!
[09:14:26] icarus: has joined #ruby
[09:14:56] Ox0dea: That's got virtually nothing to do with the program itself, mind.
[09:14:59] charliesome: has joined #ruby
[09:15:14] juanpaucar: has joined #ruby
[09:15:56] hyy: but then why shouldn't I use this program? Why is it not the way to generate these Collatz sequences?
[09:17:18] juanpaucar: has joined #ruby
[09:17:57] claw: yorickpeterse: "Gr\\u00e4umige Zimmer. Gastronomie durchschnittlich".gsub("\\u00e4","\u00e4")
[09:18:36] yorickpeterse: claw: if only that was the only Unicode sequence I had to replace
[09:18:52] yorickpeterse: and if only I knew the sequences beforehand
[09:19:10] juanpauc_: has joined #ruby
[09:19:28] yorickpeterse: Hm, seems all of them are in the pattern \\u[a-z0-9]{4}, so that should be easy enough
[09:19:56] Ox0dea: yorickpeterse: Erm, did you expect otherwise?
[09:20:21] claw: yorickpeterse: just match them
[09:20:57] Pupp3tm4st3r: has joined #ruby
[09:21:14] juanpauc_: has joined #ruby
[09:21:18] yorickpeterse: claw: gee, I hadn't thought of that just yet
[09:21:25] Ox0dea: >> '\\u0061\\u0062\u0063'.gsub(/\\u(\h{4})/) { '' << $1.hex }
[09:21:26] ruboto: Ox0dea # => "abc" (https://eval.in/420131)
[09:21:28] Ox0dea: It's not terrible.
[09:21:37] charliesome: has joined #ruby
[09:23:15] htmldrum: has joined #ruby
[09:23:21] juanpaucar: has joined #ruby
[09:23:32] hyy: ok 0x0dea, can we discuss programming exercises that will teach me loops and conditionals?
[09:23:46] jbw: has joined #ruby
[09:24:04] sevenseacat: has someone told you to read chris pine's learn to program yet?
[09:24:23] crdpink2: has joined #ruby
[09:24:28] zenspider: he's on chapter 5 or so
[09:24:32] hyy: I am reading it
[09:24:41] hyy: should I just go back to it
[09:24:54] zenspider: hyy: it's a really good book. I've pushed it on a lot of ppl
[09:24:56] Ox0dea: But if you're itching, write a guessing game thingy.
[09:24:57] hyy: ? I mean, I like to hang out here
[09:25:03] zenspider: even gushed at chris pine about it over lunch once
[09:25:05] zenspider: poor bastard
[09:25:19] zenspider: hang out here as long as you'd like
[09:25:20] juanpauc_: has joined #ruby
[09:25:33] zenspider: number guessing game would be a good one
[09:25:35] mutuma: has joined #ruby
[09:26:07] zenspider: have the computer guess the user's number, between 1-100. computer guesses, the user responds with higher / lower / equal
[09:26:12] Ox0dea: >> rand(42) # hyy
[09:26:13] ruboto: Ox0dea # => 1 (https://eval.in/420135)
[09:26:19] Ox0dea: That was slightly unhelpful.
[09:26:24] hyy: ok page 1 of chapter 6 is open before me
[09:26:36] Iskarlar: has joined #ruby
[09:26:40] nettoweb: has joined #ruby
[09:26:43] Hounddog: has joined #ruby
[09:27:20] juanpaucar: has joined #ruby
[09:27:25] ledestin: has joined #ruby
[09:27:43] lukaszk: has joined #ruby
[09:28:15] kr3ssh: has joined #ruby
[09:28:27] _AbdulRehman: is it possible to change the gem path from the command line using the gem tool?
[09:28:38] _AbdulRehman: or where do I find gem configs?
[09:28:57] hyy: so, list all the methods we've seen so far. reverse, ljust, rjust, center, capitalize, lower, upper, .+, .*, .-, to_s, to_f, to_i
[09:28:59] Cust0sLim3n: has joined #ruby
[09:29:00] zenspider: change where it installs?
[09:29:02] icarus: has joined #ruby
[09:29:12] zenspider: _AbdulRehman: ^^
[09:29:16] juanpaucar: has joined #ruby
[09:29:26] _AbdulRehman: no, this is not what I mean,
[09:29:29] zenspider: or change where it finds them?
[09:29:35] _AbdulRehman: when I hit the gem env command, I get two paths for the gem
[09:29:40] Ox0dea: hyy: #lower and #upper are not Ruby methods.
[09:29:43] _AbdulRehman: I do not want it in the second path,
[09:29:59] _AbdulRehman: - GEM PATHS: - C:/jruby-1.7.21/lib/ruby/gems/shared - C:/Users/alab/.gem/jruby/1.9
[09:30:07] zenspider: _AbdulRehman: GEM_HOME=xxx GEM_PATH=yyy:zzz ruby blah.rb
[09:30:13] jhass: _AbdulRehman: you can influence it over the environment variables, GEM_HOME for the default installation directory and GEM_PATH for a colon separated list of lookup directories besides GEM_HOME. That's what Ruby version managers generally set
[09:30:15] _AbdulRehman: I want to remove the second path cause that's where my intellij is looking at
[09:30:16] zenspider: that's for temporary override
[09:30:25] hyy: 0x0dea; where's to_lowercase and to_uppercase then?
[09:30:34] Ox0dea: hyy: They're called #downcase and #upcase.
[09:30:36] hyy: for a string, that is
[09:30:43] _AbdulRehman: jhass: thanks
[09:30:45] _AbdulRehman: I'll try that
[09:30:49] Ox0dea: hyy: They're more "message-y" that way.
[09:30:50] zenspider: intellij might have its own settings tho.
[09:31:11] _AbdulRehman: I have set it up to look at the first directory zenspider
[09:31:21] _AbdulRehman: but for some reason gems installed in the other path
[09:31:22] juanpauc_: has joined #ruby
[09:31:29] _AbdulRehman: so I'll try to remove that and see what happens...
[09:31:35] zenspider: _AbdulRehman: you can just clear out GEM_PATH
[09:31:54] Hounddog: has joined #ruby
[09:32:07] devoldmx: has joined #ruby
[09:32:31] _AbdulRehman: zenspider: That's what killing me, I can't see gem_path in my system variables, or user varibles (enviroment variables)
[09:32:38] elepedus: has joined #ruby
[09:33:08] zenspider: _AbdulRehman: they're not set by default. they're there so you can override
[09:33:24] zenspider: the gem paths you see in `gem env` are the default paths
[09:33:37] zenspider: they _should_ be there unless you're trying to do something odd
[09:33:49] zenspider: intellij can also be setting its own
[09:34:56] arup_r: has joined #ruby
[09:35:01] zenspider: _AbdulRehman: what's your actual problem you're trying to address?
[09:35:24] stardiviner: has joined #ruby
[09:36:01] arup_r1: has joined #ruby
[09:36:11] testing-shout: has joined #ruby
[09:36:33] arup_r1: has joined #ruby
[09:38:37] Pupp3tm4st3r: has joined #ruby
[09:39:17] hmsimha_: has joined #ruby
[09:39:37] arup_r1: has joined #ruby
[09:40:11] krz: has joined #ruby
[09:41:14] jbw: has joined #ruby
[09:41:43] arup_r: has joined #ruby
[09:44:21] nfk: has joined #ruby
[09:44:41] Motoservo: has joined #ruby
[09:45:04] Karpah: has joined #ruby
[09:46:17] renderful: has joined #ruby
[09:47:03] khebbie: has joined #ruby
[09:49:09] Soda: has joined #ruby
[09:49:35] loveablelobster: has joined #ruby
[09:51:32] choke: has joined #ruby
[09:52:17] loveablelobster: has left #ruby: ()
[09:52:48] loveablelobster: has joined #ruby
[09:53:08] rodfersou: has joined #ruby
[09:53:37] _AbdulRehman: zenspider: for some reason, my intellij can't see the first path and only looks at the second path.
[09:53:41] livathinos: has joined #ruby
[09:54:00] _AbdulRehman: I do not want to install my gems in the later default, I want it in the shared/gem folder which is set be default
[09:54:16] loveablelobster: have an IO problem, working with an activrecord connection that reads setup from a yml file, now I want to get user input, but 'gets' will just read yml rows, what to do?
[09:55:06] ruby-lang461: has joined #ruby
[09:55:15] [k-: has joined #ruby
[09:55:29] relic: has joined #ruby
[09:55:36] _AbdulRehman: SPEC CACHE DIRECTORY is what causing the issue I think,
[09:56:58] alexcf: has joined #ruby
[09:57:24] astrobun_: has joined #ruby
[09:57:35] alexcf: I'm trying to install "sassc" on Centos 6.4, however I keep getting "Rakefile:3: syntax error, unexpected ':', expected $end"
[09:58:10] alexcf: Tried many different versions of sassc, always getting the same. Maybe issue with version of Rake I have?
[09:58:39] zenspider: _AbdulRehman: unfortunately, I've never used intellij and I can't help on that side. You might want to contact their support or see if there is a channel on here for it
[09:58:57] [k-: has sassc worked on any other machines on that os?
[09:59:14] zenspider: AlexC_: what's on line 3 of the Rakefile?
[09:59:28] charliesome: has joined #ruby
[09:59:39] zenspider: it's probably oooold <= 1.8 code trying to run on 1.9+
[09:59:56] alexcf: zenspider: "task default: libsass:compile"
[10:00:12] zenspider: or... just bad code
[10:00:15] jhass: zenspider: didn't read? CentOS 6, more the other way around :P
[10:00:25] Iskarlar: has joined #ruby
[10:00:25] jhass: AlexC_: ruby -v ?
[10:00:33] zenspider: AlexC_: is that your code, or where did it come from?
[10:00:37] alexcf: jhass: 1.8.7
[10:00:42] alexcf: zenspider: No, that's within sassc gem
[10:00:45] jhass: there's your issue
[10:00:49] rikai: has joined #ruby
[10:00:49] jhass: can't use 1.9 style hashes
[10:00:53] zenspider: ok. then you're running 1.9 in 1.8
[10:01:07] zenspider: and being on centos... it'll be a pain to get anything newer :)
[10:01:23] alexcf: Yep ... I really do not like CentOS. No idea why people keep going for it
[10:01:35] Ox0dea: loveablelobster: The YAML file is coming in on standard input?
[10:01:37] zenspider: STABLE!! and unable to run anything new :)
[10:01:53] jhass: AlexC_: get RVM or chruby + ruby-install
[10:02:02] zenspider: AlexC_: you might want to try uninstalling ruby via system pkgs and use rvm or others
[10:02:25] relic: what's wrong with rbenv/rvm on centos?
[10:02:27] alexcf: jhass: zenspider Wish I could, unfortunately I wont be able to get such a change approved for this!
[10:02:44] benlovell: has joined #ruby
[10:02:45] jhass: AlexC_: you can (and in fact should) just install them to your user
[10:03:03] zenspider: AlexC_: well... short of overhauling all the code in the project, you will NOT get it running on centos w/ the system packaged ruby
[10:03:11] jhass: AlexC_: 1.8 is EOL, even 1.9 is EOL and 2.0 will EOL soon enough, that's why stuff breaks, the rest of the world moves on
[10:03:25] relic: alexc: see rvm.io.
[10:03:42] alexcf: jhass: Oh, I'm fully aware - it's not my choice their architecture is on CentOS unfortunately
[10:03:43] Ox0dea: loveablelobster: I suspect using `STDIN.gets` explicitly is the solution to your problem.
[10:03:50] zenspider: relic: won't matter if they're blocked by corporate change policy
[10:04:43] relic: redhat based linux distributions are a pain to deal with, without rb in the mix; why people even tolerate them is beyond me.
[10:05:53] zenspider: AlexC_: that said... we did have centos and we bypassed everything using chef recipes to install our own stuff
[10:07:20] alexcf: Too much red tape here for that :( Looking at another solution, maybe node-sass
[10:07:53] jhass: AlexC_: well, I guess there's some ancient sass version you could use
[10:07:59] rolf: has joined #ruby
[10:08:12] alexcf: jhass: I do have sass working, using the sass gem, however it's rather slow
[10:08:36] zenspider: you can't possibly have more red tape
[10:08:37] elepedus: has joined #ruby
[10:08:47] zenspider: you just aren't stubborn enough to wade through it :P
[10:08:57] loveablelobster: Ox0dea: thanks, that did the trick!
[10:09:19] Ox0dea: For future reference, bare `gets` reads from ARGF.
[10:09:26] jhass: AlexC_: wait a sec, where exactly does that Rakefile come from?
[10:10:24] alexcf: jhass: https://github.com/sass/sassc-ruby/blob/master/ext/Rakefile
[10:10:54] Ufinii: has joined #ruby
[10:11:00] loveablelobster: Oc0dea: I see... That explains a lot
[10:11:21] Ufinii: orning, we're having troubles upgrading our Rails application from Ruby 2.0.0 to 2.2.3 on Heroku (EU), an analysis of the performance on New Relic reveals that we're spending 2x amount of time in 'Ruby' and much less time in GC, it basically made our whole app unresponsive. Has anyone experienced the same issue? Why would Ruby 2.2 be so much slower?
[10:11:32] jhass: AlexC_: so you cloned the repo and try to build the gem?
[10:11:47] alexcf: jhass: No, just running "gem install sassc"
[10:11:49] _AbdulRehman: zenspider: thank you...
[10:12:31] jhass: AlexC_: yeah no dice, that thing is written against 1.9+ from the start
[10:12:42] alexcf: Yep, no worries - trying the node route
[10:12:43] zenspider: Ufinii: your app is nonresponsive because you're spending LESS time in GC?
[10:13:58] kies: has joined #ruby
[10:14:26] MasterPiece: has joined #ruby
[10:14:44] zenspider: ruby 2.2 is measurably faster in all my tests, not slower. spending less time in GC means you get more stuff done
[10:15:19] [k-: zenspider: 2:1 is not really a very nice ratio :o
[10:15:48] m1lt0n: has joined #ruby
[10:16:12] [k-: i presume thats what she/he means
[10:16:22] zenspider: [k-: it is if it is getting-stuff-done:not-getting-stuff-done
[10:16:41] silverdust: How do I update from 2.1.2 to 2.2.3 ?
[10:16:47] sepp2k: has joined #ruby
[10:16:59] pawnbox: has joined #ruby
[10:17:10] zenspider: of course... this is one of those cases where you ask for clarification and they never ever get back to you... I love it.
[10:17:14] jhass: silverdust: how did you get 2.1.2?
[10:17:16] benlovell: has joined #ruby
[10:17:26] silverdust: I can't remember sadly
[10:17:45] silverdust: It was my first time upgrading a ruby version
[10:17:51] jhass: silverdust: "which ruby" says what?
[10:18:13] jhass: which ruby
[10:18:18] jhass: it's a command, run it
[10:18:19] silverdust: /home/bl4ckdu5t/.rvm/rubies/ruby-2.1.2/bin/ruby
[10:18:24] bruno-: has joined #ruby
[10:18:37] jhass: silverdust: rvm get latest; rvm install 2.2.3; rvm use --default 2.2.3
[10:18:53] northfurr: has joined #ruby
[10:18:56] silverdust: ok thanks jhass
[10:19:14] pandaant: has joined #ruby
[10:19:41] zenspider: argh. mkmf is such an ugly unhelpful mess
[10:20:05] zenspider: you can't get anything out of it! fuck you if you want to keep the failing test files around
[10:20:25] rickmasta: has joined #ruby
[10:20:34] jhass: write a replacement, the ruby community will thank you ;)
[10:21:45] anker: >> `which ruby`
[10:21:46] ruboto: anker # => (https://eval.in/420176)
[10:22:01] bgiouaeg: has joined #ruby
[10:22:17] [k-: ruboto uses 2.2.1 iirc
[10:22:52] allcentu1: has joined #ruby
[10:22:53] anker: they should his name to mrrubot
[10:23:08] zenspider: there was mkrf back in the day
[10:23:20] adaedra: >> RUBY_VERSION # [k-
[10:23:21] ruboto: adaedra # => "2.2.0" (https://eval.in/420178)
[10:23:22] zenspider: it's just such an unwieldy thing to take on...
[10:23:41] jhass: oh, I should clarify, "write and maintain" :P
[10:23:47] zenspider: ok. ~3:30 here... need sleep
[10:23:59] [k-: >> RUBY_ENGINE # anker
[10:24:00] ruboto: [k- # => "ruby" (https://eval.in/420179)
[10:24:08] jhass: >> RUBY_DESCRIPTION
[10:24:09] ruboto: jhass # => "ruby 2.2.0p0 (2014-12-25 revision 49005) [i686-linux]" (https://eval.in/420180)
[10:24:37] B5X: has joined #ruby
[10:25:56] Thomas-0725: has joined #ruby
[10:26:07] B5X: has joined #ruby
[10:27:28] Ox0dea: 18>> RUBY_COPYRIGHT
[10:27:29] ruboto: Ox0dea # => "ruby - Copyright (C) 1993-2012 Yukihiro Matsumoto" (https://eval.in/420183)
[10:28:11] [k-: grab all the Ruby constants and run them!
[10:29:01] Ox0dea: >> Object.constants.grep(/^RUBY/).map { |c| [c, Object.const_get(c)] }.to_h
[10:29:02] gregf_: >> RbConfig::CONFIG.keys.grep(/^RUBY/)
[10:29:02] ruboto: Ox0dea # => {:RUBY_VERSION=>"2.2.0", :RUBY_RELEASE_DATE=>"2014-12-25", :RUBY_PLATFORM=>"i686-linux", :RUBY_PATCH ...check link for more (https://eval.in/420186)
[10:29:03] ruboto: gregf_ # => ["RUBY_INSTALL_NAME", "RUBY_SO_NAME", "RUBY_SEARCH_PATH", "RUBY_EXEC_PREFIX", "RUBY_LIB_VERSION", "R ...check link for more (https://eval.in/420187)
[10:29:52] jellyjellyrobot: has joined #ruby
[10:30:14] EminenceHC: has joined #ruby
[10:32:22] ledestin: has joined #ruby
[10:32:49] benlovell: has joined #ruby
[10:35:48] chouhoul_: has joined #ruby
[10:35:48] claptor: has joined #ruby
[10:36:01] [k-: }{{{{{end{
[10:36:12] [k-: may the world be forever disturbed
[10:36:51] wasamasa: some day I'll quit IRC and leave these nicks for someone else to wield
[10:37:07] wasamasa: even if it's just to annoy an admin using vim to view irc logs
[10:37:58] relic: ACTION wanders off
[10:40:00] bgiouaeg: has left #ruby: ("WeeChat 1.3")
[10:40:18] sdfgsdfg: has joined #ruby
[10:40:19] sdfgsdfg: has joined #ruby
[10:43:27] Timba-as: has joined #ruby
[10:43:39] qiukun: has joined #ruby
[10:43:52] Neon: has joined #ruby
[10:44:00] Diabolik: does anyone have any suggestions for how i can improve on this?
[10:44:01] Diabolik: https://gist.github.com/askl56/f85db49e8c1591d0bd51
[10:44:39] Neon: I'm having some issues with passing a pipe end to a new process. Any idea why I get an ArgumentError (wrong file descriptor)? https://gist.github.com/Neosublimation/da3b47a8dc7912a26ec8
[10:47:31] qiukun: has joined #ruby
[10:47:40] nerium: has joined #ruby
[10:48:03] nerium: Is there a way to tell bundler not to download a repo everytime ???bundle install??? is ran?
[10:48:51] nerium: I???ve a gem which points to a 100mb gem on github. Everytime I run ???bundle install???, it has to download the whole repo which takes 3 min
[10:50:19] Ufinii: zenspider: less time in GC but much more in 'Ruby execution'
[10:51:14] jhass: Diabolik: I'd prefer something like def self.number?(value); !value[/\A\d+\z/].nil?; end; for is_number? (note that i dropped the is_ prefix)
[10:51:34] [k-: is it relative or percentage?
[10:51:43] jhass: Diabolik: parser sounds like it should return some kind of parser object, not do the parsing
[10:52:26] jhass: Diabolik: use #public_send over #send
[10:52:37] Pupp3tm4st3r: has joined #ruby
[10:53:37] stamina: has joined #ruby
[10:54:17] Diabolik: jhass how would you modify the parser function?
[10:54:35] jhass: Neon: switch around the ends, err should get a write end, in should get a read end, out should get a write end
[10:54:39] qiukun: has joined #ruby
[10:55:02] jhass: not sure what data_out => data_out is supposed to do
[10:55:21] jhass: Diabolik: I'd name it parse
[10:55:30] Neon: I just swapped them all, because I thought they were the wrong way round. :S
[10:55:31] Azulinho: has joined #ruby
[10:56:06] Neon: jhass: If I understand the documentation correctly, it should provide the subprocess the file descriptor.
[10:56:12] Diabolik: anything else jhass
[10:56:21] jhass: Diabolik: nope, looks good otherwise
[10:56:48] jhass: maybe some evil input detection but not strictly necessary
[10:57:43] jhass: Neon: FD => FD is redirection, no?
[10:57:53] Neon: ???If a file descriptor need to be inherited, io=>io can be used.???
[10:58:08] Neon: (http://ruby-doc.org/core-2.0.0/Process.html#method-c-spawn)
[10:58:22] Neon: Maybe a platform-dependent issue?
[10:58:25] jhass: anyway, try without it for a sec to eliminate that as error source at least
[10:59:01] jhass: is there something special about your platform?
[10:59:17] roolo: has joined #ruby
[11:01:22] dhjondoh: has joined #ruby
[11:02:18] Neon: jhass: No. So the pipe variables seem to be in the right order. I get errors if I swap them again (not opened for writing). When I return the data_out => data_out, no errors get raised (but the application doesn't work as expected either).
[11:02:20] jhass: Neon: little sidenote, you need neither the parens nor the * in that case
[11:02:41] bronson: has joined #ruby
[11:02:48] Neon: jhass: What're these for then?
[11:03:08] Neon: I learned it like this somewhere and did it like this since then.
[11:03:13] jhass: for what you use them, just implicitly there in this simple case
[11:03:35] Neon: Ah, so letting them out would be more syntactic sugar?
[11:03:35] jhass: and yeah, they were right, your variables are just confusingly labeled
[11:03:43] jhass: IO.pipe returns [read, write]
[11:03:53] amigojapan: has joined #ruby
[11:04:22] benlovell: has joined #ruby
[11:04:29] Neon: Yeah, I tried to label them so I write to *_out and read from *_in, analogous to stdin and stdout.
[11:04:32] binaryplease1: has joined #ruby
[11:04:37] amigojapan: hi, I am trying to do a get on an https, this code works for short urls but for this url it says invalid url, but the url is not invalid, any ideas? http://pastebin.com/U2jSxK2z
[11:04:38] ruboto: amigojapan, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/15bee3677c8c601130e5
[11:04:38] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[11:04:42] gregf_: Diabolik: is there any reason to make it a kindof a 'static' class?
[11:05:36] jhass: amigojapan: it is, your query string should be percent encoded
[11:06:01] amigojapan: ah ok jhass , what is the ruby function for doing that?
[11:06:37] jhass: amigojapan: CGI.escape and URI.escape provide two slightly different ways of doing it, you'll likely need some handwork to disambiguate
[11:07:02] amigojapan: thanks jhass
[11:07:52] Diabolik: not really gregf_ it's somewhat incidental why
[11:09:52] gregf: has joined #ruby
[11:10:34] bruno-: has joined #ruby
[11:10:38] Neon: Actually, my code doesn't work at all. In the subproces, I'm simply writing a line (puts) and the parent process just gets nil.
[11:10:44] jhass: Neon: if I try to make a minimal reproducer from your snippet it works just fine here http://paste.mrzyx.de/ptguk1gc6
[11:10:49] Neon: (literally gets returns nil)
[11:11:17] Neon: Doesn't gets block until it gets a line or EOF?
[11:11:31] jhass: Neon: what's with ruby #{__FILE__} anyway, do you maybe seek Kernel#fork ?
[11:11:46] jhass: yes, and nil means it's EOFed
[11:12:03] marr: has joined #ruby
[11:12:03] Neon: jhass: fork isn't available on Windows.
[11:12:12] jhass: that's sad
[11:12:34] adaedra: Windows prefers spoons
[11:12:36] Neon: jhass: And your code gives me the same wrong file descriptor error, so like I assumed, it appears to be a platform-dependent error.
[11:12:46] jhass: I guess so
[11:12:49] Neon: Yeah, I would have used fork in first place.
[11:13:33] Neon: I was even surprised as pipes appeared to work on Windows.
[11:13:53] Neon: But they don't seem to actually.
[11:13:55] xxneolithicxx: has joined #ruby
[11:15:17] dgutierrez1287: has joined #ruby
[11:16:13] iamninja: has joined #ruby
[11:18:25] bigkevmcd: has joined #ruby
[11:18:36] lannonbr: has joined #ruby
[11:20:38] amigojapan: jhass: I tried passing the result of URI.escape but now I just get error as the output https://gist.github.com/anonymous/9f3a8cf8896a7cf3eeb4
[11:21:23] jhass: I said you'll likely need some handwork to disambiguate
[11:21:28] gregf_: Diabolik: well you can split that into 2 classes, a Parser(which parses the string) and a ArithmeticExpCalculator(which does the calculation). like so class Parser; def parse();end;end ArithmeticExpCalculator; def self.calculate;end;end
[11:21:29] rodfersou: has joined #ruby
[11:21:31] jhass: ?gist_usage amigojapan
[11:21:31] ruboto: amigojapan, To properly use gist, please enable syntax highlighting, either by choosing the language manually or by entering a proper filename. If you post multiple things, separate them into multiple files. If you have a Github account, please update your gist with new information instead of posting a new one.
[11:21:32] Macaveli: has joined #ruby
[11:22:12] amigojapan: jhass: what do you mean by handwork?
[11:22:17] Diabolik: jhass is there a way of shortening or simplifying the calculate method?
[11:22:22] gregf_: Diabolik: also create a service that uses those 2. my 2 cents :/
[11:23:08] rodfersou: has joined #ruby
[11:24:05] skade: has joined #ruby
[11:24:14] jhass: amigojapan: slice the querystring into its parts by hand, pass them to CGI.escape, join the result back together
[11:24:50] amigojapan: jhass: I know the querystring works on my browser
[11:25:40] amigojapan: jhass: that does not seem reasonable
[11:25:58] jhass: amigojapan: your browser has about 5k manhours in guessing logic to handle all kind of weird user input
[11:26:11] binaryplease: has joined #ruby
[11:26:52] amigojapan: jhass: I had no problem when I was not trying to use https
[11:27:11] jhass: I strongly doubt the URL was suffering from the same issues
[11:27:52] amigojapan: but it does not say what the issue is
[11:28:30] jhass: amigojapan: the first I see is ? being invalid after a ?
[11:28:51] jhass: but let's ignore that and look at just ?url=https://chart.googleapis.com/chart?cht=lc&chs=500&
[11:29:11] jhass: is &chs=500 part of the value of url or a new param? how should URI know?
[11:29:58] keen__________: has joined #ruby
[11:31:01] amigojapan: jhass: seems like valid get to me, and as I said, I tried the same thing withought https, and it was working with HTTP.get , so I dont see why it would make a difference in https
[11:31:30] jhass: your browser has heuristics in seeing things like url=, saying "okay given there's url= what comes is probably part of the value even when we would hit a delimiter of the value normally we ignore it now"
[11:32:06] amigojapan: it was workin in ruby, I coudl revert the code and show you that
[11:32:29] jhass: amigojapan: you can try to understand the issue and fix it or just shut up, your whining will get you nowhere
[11:32:29] amigojapan: the problem is only after https
[11:32:55] amigojapan: jhass: I dont think you are giving me good advice
[11:32:57] devoldmx: has joined #ruby
[11:33:29] jhass: alright, let's play this game, who's up for repeating what I said?
[11:34:17] phutchins: has joined #ruby
[11:34:43] jhass: amigojapan: I also accept citations from http://tools.ietf.org/html/rfc3986 (or http://tools.ietf.org/html/rfc2396 which is closer to what URI currently implements) disproving what I said
[11:35:05] sevenseacat: not me, if this person doesnt want to be helped.
[11:35:51] amigojapan: sevenseacat: I want to be helped, but just to see how to do https, not to reconstruct my url, which is working in a normal ruby get... so the url is not broken
[11:35:51] sevenseacat: the json gem doesnt work properly on ruby 2.2.3. nice.
[11:36:42] sevenseacat: amigojapan: your URL is not valid.
[11:37:26] [k-: u should escape the / and the & at least
[11:37:54] banister: has joined #ruby
[11:38:06] mutuma: has joined #ruby
[11:39:06] timonv: has joined #ruby
[11:39:20] jhass: >> URI.parse("https://tinyurl.com/api-create.php?url=#{CGI.escape "https://chart.googleapis.com/chart?cht=lc&chs=500&chd=t:43,100,21,64,0,43,100,21,64,0&chxt=x,y&chxl=0:|2015%206|7|8|9|10|2016%206|7|8|9|10|1:|0|1162|mid%202325|3487|max%204650&chdl=amigojapan&chco=ff0000"}")
[11:39:21] ruboto: jhass # => uninitialized constant URI (NameError) ...check link for more (https://eval.in/420255)
[11:39:29] jhass: >> require "uri"; URI.parse("https://tinyurl.com/api-create.php?url=#{CGI.escape "https://chart.googleapis.com/chart?cht=lc&chs=500&chd=t:43,100,21,64,0,43,100,21,64,0&chxt=x,y&chxl=0:|2015%206|7|8|9|10|2016%206|7|8|9|10|1:|0|1162|mid%202325|3487|max%204650&chdl=amigojapan&chco=ff0000"}")
[11:39:29] [k-: &ri URI::Escape.escape
[11:39:30] `derpy: No results
[11:39:30] ruboto: jhass # => uninitialized constant CGI (NameError) ...check link for more (https://eval.in/420256)
[11:39:43] jhass: >> require "uri"; require "cgi"; URI.parse("https://tinyurl.com/api-create.php?url=#{CGI.escape "https://chart.googleapis.com/chart?cht=lc&chs=500&chd=t:43,100,21,64,0,43,100,21,64,0&chxt=x,y&chxl=0:|2015%206|7|8|9|10|2016%206|7|8|9|10|1:|0|1162|mid%202325|3487|max%204650&chdl=amigojapan&chco=ff0000"}")
[11:39:44] ruboto: jhass # => #<URI::HTTPS https://tinyurl.com/api-create.php?url=https%3A%2F%2Fchart.googleapis.com%2Fchart%3Fcht ...check link for more (https://eval.in/420257)
[11:39:48] jhass: sorry for the noise
[11:39:56] [k-: http://ruby-doc.org/stdlib-2.1.1/libdoc/uri/rdoc/URI/Escape.html#method-i-escape
[11:40:12] infiniteNOP: has joined #ruby
[11:40:43] [k-: use: URI.escape("link", "/&%") and stuffs
[11:41:59] [k-: better than requiring TWO! libraries
[11:42:36] kekkis_: has joined #ruby
[11:43:36] [k-: there's lots of bloat :(
[11:43:56] ldnunes: has joined #ruby
[11:44:01] jhass: [k-: URI.escape and CGI.escape are different beyond minor things like %20 vs +
[11:44:33] [k-: i do not know :s
[11:44:38] jhass: specially URI.escape tries to be "smart"
[11:45:12] jhass: whereas CGI.escape makes sure to escape everything, which we want here
[11:45:12] adaedra: "try to be smart" => ALARM
[11:45:39] anker: try to be smart and use ruby
[11:45:41] [k-_: has joined #ruby
[11:46:25] gregf_: amigojapan: you can do uri.query = URI::encode_www_form(URI::decode_www_form(uri.query) << args.to_a)
[11:46:59] amigojapan: ok gregf_ let me try that, thanks
[11:47:32] totimkopf: has joined #ruby
[11:47:33] jhass: ACTION sighs
[11:48:04] anker: why the sigh
[11:48:21] gregf_: amigojapan: honestly dunno what you;re trying to do. perhaps just make that request? and see that it returns a 200?
[11:48:48] adaedra: why the why the sigh
[11:48:50] [k-_: he is trying to embed a url in a url
[11:48:59] adaedra: urlception.
[11:49:06] adaedra: [INCEPTION HORN]
[11:49:07] amigojapan: gregf_: just trying to change an http request to an https get request
[11:49:10] [k-_: whytheception
[11:49:18] gregf_: ah whatever - dont have time for r&d :/
[11:49:27] anker: because im confused why he sighed
[11:50:16] [k-_: amigojapan chose to completely ignore the facts stated by jhass?
[11:51:15] amigojapan: I dont have patients for angry people now, see you later
[11:51:21] amigojapan: has left #ruby: ()
[11:51:50] adaedra: why the anger, jhass
[11:51:54] adaedra: why the anger, [k-_
[11:52:01] jhass: disappointment rather
[11:52:14] adaedra: ah, I have a method for that
[11:52:19] adaedra: never expect anything.
[11:52:38] jhass: yeah not working, I need to work on my expect the worst + 1 philosophy
[11:53:11] adaedra: "I expect nothing and I'm still let down"
[11:53:14] sarkyniin: has joined #ruby
[11:53:40] [k-_: i got upset yesterday after nothing came out of my help
[11:54:11] adaedra: you can only have good surprises when you expect nothing.
[11:54:29] but3k4: has joined #ruby
[11:54:34] timonv: has joined #ruby
[11:54:47] workmad3: has joined #ruby
[11:55:32] skade: has joined #ruby
[11:55:36] user1138: has joined #ruby
[11:55:53] [k-_: is do not expect the same as expect nothing?
[11:56:08] jhass: mmh, probably not
[11:56:24] [k-_: > i do not have patients for angry people now :/
[11:56:44] adaedra: Look at all the patients I have.
[11:56:52] jhass: I think humans always have some sort of expectation though, and be it that they expect that they don't expect anything
[11:57:32] adaedra: I expect that [k-_ bakes me a cake.
[11:57:43] adaedra: I have no cake => I'm let down.
[11:58:05] jhass: yeah, doing it wrong, you should expect that [k-_ will never bake any cake
[11:58:15] adaedra: here you go!
[11:58:23] [k-_: you didnt even give me time to read
[11:58:29] jhass: or use an oven for the matter
[11:58:46] [k-_: i...might burn the house down or something
[11:59:00] adaedra: I don't know for .sg, but here it's 112
[12:00:11] adaedra: But I think I'll get trouble if I call 112 to say that an IRC buddy in .sg may cake me a cake and burn his house down.
[12:00:16] revoohc: has joined #ruby
[12:00:35] sevenseacat: ah. emergency phone number.
[12:00:57] auzty: has joined #ruby
[12:01:02] [k-_: you're right, i wont bake a cake
[12:01:13] [k-_: i'll send you an emoji of a cake, though
[12:02:18] wldcordeiro_: has joined #ruby
[12:03:38] rbowlby: has joined #ruby
[12:05:16] xxneolithicxx: has joined #ruby
[12:05:39] sideshowcoder: has joined #ruby
[12:05:39] [k-_: adaedra: ????
[12:06:37] ItSANgo: has joined #ruby
[12:11:41] paradoja: has joined #ruby
[12:18:55] Maako: has joined #ruby
[12:19:30] Maako: has left #ruby: ()
[12:20:34] amystephen: has joined #ruby
[12:20:45] r0x0rZ: has joined #ruby
[12:21:07] Diabolik: can anyone recommend how to make my calculate function more succinct?
[12:21:09] Diabolik: https://gist.github.com/askl56/f85db49e8c1591d0bd51
[12:21:10] northfurr: has joined #ruby
[12:22:22] tmtwd: has joined #ruby
[12:22:32] dimasg: has joined #ruby
[12:23:25] ljarvis: Diabolik: you.. had a LOAD of suggestions yesterday
[12:23:29] ljarvis: did you just ignore them all?
[12:23:37] Cust0sLim3n: has joined #ruby
[12:23:58] Pupp3tm4st3r: has joined #ruby
[12:24:01] Diabolik: as you can see if you scroll up i spoke with others about tihs earlier
[12:24:21] gregf_: Diabolik: did you not see what yorickpeterse had suggested?
[12:24:30] Diabolik: he linked me to his own repo
[12:24:41] Diabolik: which was a gem in and of itself
[12:25:38] ljarvis: those class methods are not private
[12:25:43] ljarvis: private doesn't work like that
[12:25:49] sevenseacat: Diabolik has been talking about the same thing for like three days
[12:26:09] unver: has joined #ruby
[12:26:09] Diabolik: ok il stop asking about it
[12:26:10] ljarvis: >> class A; private; def foo; "here"; end; end; A.foo
[12:26:12] ruboto: ljarvis # => undefined method `foo' for A:Class (NoMethodError) ...check link for more (https://eval.in/420331)
[12:26:12] jbw: has joined #ruby
[12:26:17] ljarvis: >> class A; private; def self.foo; "here"; end; end; A.foo
[12:26:18] ruboto: ljarvis # => "here" (https://eval.in/420332)
[12:26:28] jeanlinux: has joined #ruby
[12:26:37] ljarvis: >> class A; class << self; private; def foo; "here"; end; end; end; A.foo
[12:26:38] ruboto: ljarvis # => private method `foo' called for A:Class (NoMethodError) ...check link for more (https://eval.in/420333)
[12:27:18] Gmi: has joined #ruby
[12:27:31] benlovell: has joined #ruby
[12:27:42] [k-_: i never knew that...
[12:27:55] ljarvis: lots of people dont, i see it everywhere
[12:30:46] ljarvis: another neat one:
[12:30:52] ljarvis: >> File.basename('foo.txt', '.*')
[12:30:53] ruboto: ljarvis # => "foo" (https://eval.in/420335)
[12:31:23] ljarvis: (see lots of File.basename(file, File.extname(file))
[12:31:59] gregf_: Diabolik: %w{1 + 3 - 2}.reduce { |l,r| l.is_a?(Array) ? l.first.to_i.send(l.last,r.to_i) : [l, r] } <= this was what was suggested by yorickpeterse
[12:32:19] ljarvis: that doesnt look like code yorickpeterse would write
[12:32:37] gregf_: ljarvis: well almost similar, i lost that :/
[12:33:05] Pupp3tm4_: has joined #ruby
[12:33:39] gregf_: Diabolik: %w{1 + 3 - 2}.reduce { |left,right| left.is_a?(Array) ? left[0].to_i.send(left[1],right.to_i) : [left, right] } #ljarvis - happy?
[12:33:47] gregf_: s/Diabolik//
[12:33:54] rideh: has joined #ruby
[12:34:31] gregf_: *hopes your not a rocketscientist *
[12:36:35] rideh: has joined #ruby
[12:38:15] Pupp3tm4st3r: has joined #ruby
[12:38:38] Diabolik: gregf_ i didn't see this...
[12:38:38] [k-_: >> lhs, op, rhs = p("53 PLUS 9 TIMES 43 MINUS 2".partition(/TIMES/)); lhs.sub("PLUS", "+"); rhs.sub("MINUS", "-"); lhs = eval lhs; rhs = eval rhs; lhs * rhs; # being lazy here, do not use eval unnecessarily!
[12:38:39] ruboto: [k-_ # => ["53 PLUS 9 ", "TIMES", " 43 MINUS 2"] ...check link for more (https://eval.in/420343)
[12:38:44] hfp: How can I write an expectation that would match a method with a specific method only once, even though this method is called more than once with different arguments?
[12:38:48] [k-_: check the link for more
[12:38:55] yorickpeterse: ljarvis: I did
[12:39:08] yorickpeterse: well, minus the single letter variables
[12:39:14] yorickpeterse: https://gist.github.com/YorickPeterse/c8533d9acedb3de4ceb2
[12:39:24] hfp: I tried `expect(foo).to receive(:bar).at_least(:once).with(/blah/)
[12:39:29] ElderFain: has joined #ruby
[12:39:30] ElderFain: has joined #ruby
[12:39:45] abbe: has joined #ruby
[12:39:45] hfp: but it fails because the second call to this method comes without /blah/
[12:39:49] [k-_: >> lhs, op, rhs = "53 PLUS 9 TIMES 43 MINUS 2".partition(/TIMES/); lhs.sub!("PLUS", "+"); rhs.sub!("MINUS", "-"); lhs = eval lhs; rhs = eval rhs; lhs * rhs; # being lazy here, do not use eval unnecessarily!
[12:39:50] ruboto: [k-_ # => 2542 (https://eval.in/420345)
[12:40:12] [k-_: this would be some form of precedence
[12:40:19] dorei: has joined #ruby
[12:40:56] gregf_: yorickpeterse++
[12:41:12] [k-_: somehow the answer is wrong ??\_(???)_/??
[12:41:21] rickmasta: has joined #ruby
[12:42:10] andywojo: has joined #ruby
[12:42:25] [k-_: oh it's correct, does ruby not have precedence for operators by default
[12:42:33] [k-_: or did i get my math wrong
[12:42:59] Pupp3tm4st3r: has joined #ruby
[12:43:04] [k-_: i tried 53-9*43-2 ??? 438
[12:43:18] [k-_: oh, i did get my math wrong
[12:43:23] [k-_: hehe oops
[12:43:37] gregf_: it should be -ve?
[12:44:07] [k-_: i have no idea
[12:44:42] [k-_: oh, i put +9 instead of -9
[12:45:54] spectra: has joined #ruby
[12:45:58] ndrei: has joined #ruby
[12:46:28] Mia: has joined #ruby
[12:47:25] roolo: has joined #ruby
[12:47:56] joonty: has joined #ruby
[12:49:17] yashinbasement: has joined #ruby
[12:49:29] ytti: has joined #ruby
[12:49:30] [k-_: im probably hopeless
[12:49:35] bmurt: has joined #ruby
[12:50:55] yashinbasement: has joined #ruby
[12:51:49] paradoja: has joined #ruby
[12:52:33] rolfb: `ruby -e "ObjectSpace.each_object(Class) { |c| c = c.freeze };"`
[12:54:39] [k-_: c=c.freeze?
[12:54:46] fibbel: has joined #ruby
[12:55:02] rolfb: [k-_: basically, it turns of monkey patching for all loaded classes
[12:55:10] rolfb: turns off*
[12:55:29] [k-_: i question the c = part
[12:56:15] rolfb: [k-_: how so? it just redefines every class to be a frozen version of itself
[12:56:26] jeanlinux: has joined #ruby
[12:56:26] sgambino: has joined #ruby
[12:56:26] rolfb: so it's monkeypatching to avoid monkeypatching
[12:56:29] [k-_: Object.freeze; Object.send(:define_method, :hello) { "g" }
[12:56:29] [k-_: => RuntimeError: can't modify frozen class
[12:56:40] [k-_: you dont have to reassign it
[12:56:40] lkba: has joined #ruby
[12:56:48] eightyeight: getting the following error with a weechat ruby script: "NameError, uninitialized constant Encoding::ASCII_8BIT"
[12:56:53] eightyeight: ruby script here: https://weechat.org/scripts/source/zmq_notify.rb.html/
[12:56:58] eightyeight: how can i fix the error, so the plugin will execute?
[12:57:00] rolfb: [k-_: well, that's interesting
[12:57:08] [k-_: so, the code can be further simplified to &:freeze
[12:57:17] msnyon: has joined #ruby
[12:57:20] rolfb: [k-_: hah, that's awesome
[12:57:56] chouhoulis: has joined #ruby
[12:58:11] Diabolik: [k-_ i thought using eval was bad
[12:58:33] [k-_: i was being lazy
[12:58:37] [k-_: dont use it
[12:58:56] [k-_: rolfb: A = Class.new ??? RuntimeError: can't modify frozen #<Class:Object>
[12:59:24] [k-_: you basically break everything
[13:00:34] chouhoulis: has joined #ruby
[13:01:16] centrx: has joined #ruby
[13:01:25] tchebb: has joined #ruby
[13:02:19] whippythellama: has joined #ruby
[13:03:12] [k-_: you cant declare classes, how bad is that
[13:03:54] bronson: has joined #ruby
[13:04:40] rolfb: [k-_: wow, that is crazy
[13:04:41] baphled: has joined #ruby
[13:05:26] adaedra: oooh, cake
[13:05:56] Macaveli: has joined #ruby
[13:07:01] paulcsmith: has joined #ruby
[13:08:30] Thermatix: has joined #ruby
[13:09:15] d2dchat: has joined #ruby
[13:09:56] joneshf-laptop: has joined #ruby
[13:10:26] nuttermb: has joined #ruby
[13:10:42] robh71: has joined #ruby
[13:10:51] northfurr: has joined #ruby
[13:11:13] hinbody: has joined #ruby
[13:11:28] iko1: has joined #ruby
[13:12:22] skade: has joined #ruby
[13:13:45] Cust0sLim3n: has joined #ruby
[13:14:13] j_mcnally: has joined #ruby
[13:14:21] terlar: has joined #ruby
[13:14:22] AlexRussia_: has joined #ruby
[13:15:55] shmilan: has joined #ruby
[13:18:06] victortyau: has joined #ruby
[13:18:28] Pupp3tm4st3r: has joined #ruby
[13:18:57] duggiefresh: has joined #ruby
[13:18:57] wprice: has joined #ruby
[13:20:00] juanpaucar: has joined #ruby
[13:21:06] Psi-Jack: The cake is a lie.
[13:21:12] MadMartigan: has joined #ruby
[13:21:45] ashleyhindle: Does anybody else not like cake?
[13:22:19] `derpy: No results
[13:22:21] casadei_: has joined #ruby
[13:22:30] Psi-Jack: Going for the cake will mean your death. :)
[13:24:06] Pupp3tm4st3r: has joined #ruby
[13:24:32] davedev24: has joined #ruby
[13:25:11] ndrei: has joined #ruby
[13:27:36] bruno-: has joined #ruby
[13:27:40] alveric: has joined #ruby
[13:28:22] MadMartigan: has joined #ruby
[13:31:07] jerius: has joined #ruby
[13:31:38] umgrosscol: has joined #ruby
[13:33:39] devoldmx: has joined #ruby
[13:34:06] unreal_: has joined #ruby
[13:34:58] malconis: has joined #ruby
[13:35:47] lannonbr: has joined #ruby
[13:36:44] malconis: has joined #ruby
[13:37:00] bin_false: has joined #ruby
[13:37:32] sdwrage: has joined #ruby
[13:37:41] khebbie: has joined #ruby
[13:38:31] Mia: has joined #ruby
[13:38:31] Mia: has joined #ruby
[13:39:07] devdazed: has joined #ruby
[13:39:57] nzst: has joined #ruby
[13:42:35] Mia: has joined #ruby
[13:42:35] Mia: has joined #ruby
[13:44:31] unver: has joined #ruby
[13:44:37] banghouse2: has joined #ruby
[13:44:46] tkuchiki: has joined #ruby
[13:45:03] dopamean1: has joined #ruby
[13:45:24] xxneolithicxx: has joined #ruby
[13:47:13] ta: has joined #ruby
[13:49:19] skade: has joined #ruby
[13:49:41] devdazed: has joined #ruby
[13:50:28] tkuchiki: has joined #ruby
[13:50:57] Macaveli: has joined #ruby
[13:52:02] dblessing: has joined #ruby
[13:53:28] joast: has joined #ruby
[13:55:16] j_mcnally: has joined #ruby
[13:57:03] afrianska: has joined #ruby
[13:58:29] aiesec: has joined #ruby
[13:58:33] silkfox: has joined #ruby
[13:58:53] revoohc: has joined #ruby
[13:59:02] jhack: has joined #ruby
[13:59:48] [H]unt3r: has joined #ruby
[14:00:59] r0uder: has joined #ruby
[14:02:18] anon: has joined #ruby
[14:02:18] anon: Hey there guys, I'm taking a Codeacademy course and it asks me to "add a new route that maps requests to /tags to the Tags controller's index action.". I'm stuck, what route should I write there?
[14:02:42] Psi-Jack: That's more of a rails question than a ruby question.
[14:03:40] ruboto: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[14:03:59] Psi-Jack: Yep. no nickserv identification. :)
[14:04:06] dstarh: has joined #ruby
[14:04:33] bronson: has joined #ruby
[14:04:42] gamename: has joined #ruby
[14:04:54] Psi-Jack: codecadamy though I have to say, was not bad. I went through their ruby course and liked how they dug into quite a few things, including rubyist methods specifically.
[14:06:31] mwlang: has joined #ruby
[14:07:09] radgeRayden: has joined #ruby
[14:08:48] gregf: has joined #ruby
[14:09:52] hfp: I have a method called within an object and I would like to mock this method. But I don't know which object it is a method of so I don't know how to mock it. How should I proceed?
[14:11:37] socialjackie: has joined #ruby
[14:11:41] Psi-Jack: Read the source, Luke. :)
[14:11:46] eightyeight: new error loading my ruby weechat script. this seems to be wholly ruby-specific: http://ae7.st/p/4hu
[14:12:00] [k-_: ruby can tell you which class it belongs too
[14:12:04] [k-_: erm, let me think
[14:12:05] eightyeight: i have the 'zmq' library installed via rubygems
[14:12:09] [k-_: Ox0dea did it
[14:12:25] tkuchiki: has joined #ruby
[14:12:28] [k-_: >> Object.method(:equal?).owner
[14:12:29] ruboto: [k-_ # => BasicObject (https://eval.in/420367)
[14:12:44] adaedra: That was part of `derpy some time ago
[14:13:41] Psi-Jack: eightyeight: Seems like it can't find it in those paths.
[14:13:50] Cache_Money: has joined #ruby
[14:13:54] [k-_: adaedra: `derpy is less powerful
[14:14:12] adaedra: it was when #owner was used
[14:14:21] axl_: has joined #ruby
[14:14:42] adaedra: ot is here for all your criticism on it, though :)
[14:14:58] binaryplease: has joined #ruby
[14:15:18] gamename: has joined #ruby
[14:15:33] eightyeight: Psi-Jack: so, how do i fix?
[14:16:15] astrobun_: has joined #ruby
[14:16:27] Psi-Jack: eightyeight: First of all, how did you install the gem?
[14:16:51] sinkensabe: has joined #ruby
[14:17:03] TheHodge: has joined #ruby
[14:17:13] eightyeight: 'gem install zmq'
[14:17:19] Psi-Jack: As root, or as your user?
[14:17:43] mblagden_: has joined #ruby
[14:17:46] gamename: has joined #ruby
[14:18:01] eightyeight: i don't have permission to execute as my unpriv user
[14:18:03] rbennacer: has joined #ruby
[14:18:32] eightyeight: $ gem install zmq
[14:18:34] eightyeight: ERROR: While executing gem ... (Gem::FilePermissionError)
[14:18:36] eightyeight: You don't have write permissions for the /var/lib/gems/2.1.0 directory.
[14:18:47] adaedra: gem install --user-install whatever
[14:18:48] Psi-Jack: 2.1.0? What I'm seeing on your paste is 2.2.0
[14:19:04] blue_deref: has joined #ruby
[14:19:36] camilasan: has joined #ruby
[14:19:44] workmad3: has joined #ruby
[14:19:52] eightyeight: hmm. on debian sid. possible disconnect between gems and ruby then?
[14:20:07] jtdoncas: has joined #ruby
[14:20:10] Psi-Jack: heh, sid. Yeah, could easily be, since sid isn't stable. :p
[14:20:18] prestorium: has joined #ruby
[14:20:26] JoshL: has joined #ruby
[14:21:19] TomyLobo: has joined #ruby
[14:21:41] IrishGringo: has joined #ruby
[14:22:03] ArnaudM: has joined #ruby
[14:22:20] ArnaudM: hey! I'm trying to write a systemd service file to run my thin
[14:22:33] ArnaudM: But nothing works as expected
[14:23:01] Psi-Jack: ArnaudM: Hmmm.. OKay? Why are you asking in #ruby? This is a #systemd question.
[14:23:23] eightyeight: ah. ruby2.2 and ruby2.2-dev was not installed. however, after installing, and running 'gem2.2 install zmq', still getting the same error
[14:23:26] ArnaudM: and if i go there they will tell me its a ruby querstion ?
[14:23:27] jhass: Psi-Jack: not really. ArnaudM show your attempt, describe your app environment/Ruby setup and show the errors
[14:23:32] ruboto: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[14:23:35] _blizzy_: if I have a hash, say foo = {:bar => [1,[2,3]], :baz => [1,[2,3]]}, how would I flatten each array without calling each key/value
[14:23:40] _blizzy_: is there a way to map it?
[14:23:49] ArnaudM: I will try jhass
[14:24:25] riotjones: has joined #ruby
[14:24:56] ArnaudM: here is my .service file https://www.zerobin.net/?706833785f596654#JkbCOL/uCParwBYeTwLW52pvIn8Q/VqRaDxUYUlXMpM=
[14:25:12] ArnaudM: I tried type=simple type=forking... I tried thin -d or without -d
[14:25:25] ArnaudM: and always the same result, my service is inactive
[14:25:30] ArnaudM: its like its launching
[14:25:32] ArnaudM: then nothing
[14:25:52] jhass: ArnaudM: you want to read up on Environment in man systemd.exec
[14:26:17] allcentury: has joined #ruby
[14:26:24] skade: has joined #ruby
[14:26:26] ArnaudM: damn bad syntax
[14:26:28] jhass: ArnaudM: drop the -d and use Type=simple (the default, so just drop the line)
[14:26:37] ips|malc: has joined #ruby
[14:26:39] ArnaudM: ok jhass I will try
[14:27:09] j_mcnally: has joined #ruby
[14:28:09] Pupp3tm4st3r: has joined #ruby
[14:28:14] jhack: has joined #ruby
[14:28:14] jhack: has joined #ruby
[14:28:15] [k-_: _blizzy_: mapping is the same as calling each key/value
[14:28:23] _blizzy_: [k-_, thanks.
[14:28:26] _blizzy_: I figured it out btw.
[14:28:40] [k-_: &ri Hash#map
[14:28:41] `derpy: No results
[14:28:44] jhass: .each_value(&:flatten!) if modifying the arrays is an option
[14:28:46] _blizzy_: if I have hash = {:foo => [1,[2]], :bar => [2,[1]]}
[14:28:53] [k-_: hash is enumerable!
[14:29:00] [k-_: adaedra: complaint
[14:29:04] adaedra: Issue #3, iirc
[14:29:04] ArnaudM: Environment="RAILS_ENV=production" "PATH=/home/netvibes/.rbenv/shims:$PATH" And i got Aug 21 16:28:23 puppetdashboard thin[32146]: /usr/bin/env: bash: No such file or directory
[14:29:06] _blizzy_: hash.values.each.map(&:flatten!)
[14:29:11] saddad: has joined #ruby
[14:29:19] ArnaudM: Maybe my syntax is not good yet?
[14:29:29] jhass: ArnaudM: actually I think $PATH is not populated there
[14:29:39] hotpancakes: has joined #ruby
[14:29:54] jhass: idk rbenv, but are you sure you need to patch it?
[14:29:55] ljarvis: _blizzy_: map is pointless there
[14:30:06] _blizzy_: ljarvis, oh.
[14:30:08] jhass: I mean you have to specify the full path the thin shim anyhow
[14:30:15] ljarvis: _blizzy_: jhass' code is fine, no?
[14:30:21] adaedra: Ah no, I did not open an issue for that
[14:30:24] _blizzy_: ljarvis, yes.
[14:30:27] Psi-Jack: $PATH should be already populated.
[14:30:27] [k-_: ljarvis: you mean each is pointless
[14:30:32] ljarvis: _blizzy_: ok cool
[14:30:36] ljarvis: [k-_: no..
[14:30:39] ArnaudM: jhass if i remove this PATH var (I think its useless btw) I got the same result than before : inactiv after a fresh start
[14:30:42] ljarvis: the each is the necessary part
[14:30:47] [k-_: why would map be pointless
[14:30:51] _blizzy_: well, since I'm still learning, which is unnecessary?
[14:30:52] ndrei: has joined #ruby
[14:30:54] _blizzy_: each or map
[14:30:55] [k-_: im confuzzled
[14:31:09] [k-_: oh, i get it
[14:31:11] adaedra: _blizzy_: both have different usages
[14:31:11] ljarvis: _blizzy_: you're modifying the values, you don't care about the returning array
[14:31:17] ljarvis: hence each is useful here
[14:31:18] ljarvis: map is not
[14:31:21] [k-_: yes, i got it!!
[14:31:31] [k-_: praise me ~o~
[14:31:34] _blizzy_: ruby is cool af.
[14:31:39] eightyeight: seems i've got it worked out
[14:31:45] ljarvis: you could also use map!(&:flatten)
[14:32:02] jhass: ArnaudM: maybe we get some useful output with -D ?
[14:32:09] Macaveli: has joined #ruby
[14:32:13] [k-_: that would be more expensive
[14:32:28] eightyeight: hmm. maybe not
[14:32:56] adaedra: [k-_: opened issue #5
[14:32:58] jhass: ArnaudM: also check for a log/thin.log
[14:33:07] eightyeight: Disabling plugin due to error: NameError, uninitialized constant Encoding::ASCII_8BIT
[14:33:53] fullofcaffeine: has joined #ruby
[14:34:10] ljarvis: eightyeight: what ruby version?
[14:34:37] jhass: ArnaudM: could also imagine -s implies -d so we'd need indeed Type=forking
[14:34:46] eightyeight: does something need to be added to the script?
[14:34:57] ngscheurich: has joined #ruby
[14:35:02] jhass: ArnaudM: and just to check for the obvious, keep in mind to daemon-reload after editing the service file
[14:35:14] ArnaudM: I do that every time
[14:35:17] dgutierrez1287: has joined #ruby
[14:35:23] ArnaudM: thanks for your help, testing..
[14:35:30] jhass: figured, but better safe than sorry ;)
[14:35:35] roolo: has joined #ruby
[14:36:09] ArnaudM: yeah !! working great jhass
[14:36:15] ArnaudM: thanks a lot man
[14:36:36] eightyeight: ljarvis: do i need to add something to the script?
[14:36:36] ArnaudM: I did so much change.. my PATH syntax was not good : sure
[14:36:45] dopie: has joined #ruby
[14:36:50] ArnaudM: and use forking I must
[14:36:50] RegulationD: has joined #ruby
[14:36:54] ljarvis: eightyeight: what does Encoding.list return?
[14:37:13] xxneolithicxx: has joined #ruby
[14:37:37] jhass: >> Encoding::ASCII_8BIT
[14:37:38] ruboto: jhass # => #<Encoding:ASCII-8BIT> (https://eval.in/420374)
[14:37:48] jhass: eightyeight: how sure are you it's actually using 2.2?
[14:37:52] jhass: 18>> Encoding::ASCII_8BIT
[14:37:53] ruboto: jhass # => uninitialized constant Encoding (NameError) ...check link for more (https://eval.in/420375)
[14:38:01] jhass: 19>> Encoding::ASCII_8BIT
[14:38:01] ruboto: jhass # => #<Encoding:ASCII-8BIT> (https://eval.in/420376)
[14:38:05] jhass: that's weird
[14:38:14] ljarvis: it's possible for that to not be available
[14:38:24] jhass: :o, really?
[14:39:10] diegoaguilar: has joined #ruby
[14:39:49] eightyeight: http://ae7.st/p/24n
[14:39:54] eightyeight: ^ Encoding.list
[14:40:09] ljarvis: lol it's right there too :D
[14:40:24] yorickpeterse: oh hey, I had a usecase for **foo
[14:40:34] jhass: ?cookie yorickpeterse
[14:40:34] ruboto: yorickpeterse, here's your cookie: ????
[14:40:36] yorickpeterse: def foo(*args, **options); end # <= basically this
[14:40:42] ljarvis: >> Encoding.find "ASCII-8BIT"
[14:40:43] yorickpeterse: which is actually pretty neat
[14:40:44] ruboto: ljarvis # => #<Encoding:ASCII-8BIT> (https://eval.in/420377)
[14:40:53] yorickpeterse: I eagerly await ***foo
[14:40:57] DelDotB: has joined #ruby
[14:41:17] ljarvis: >> Encoding.find "filesystem"
[14:41:18] jhass: that would do what?
[14:41:18] ruboto: ljarvis # => #<Encoding:UTF-8> (https://eval.in/420378)
[14:41:28] yorickpeterse: jhass: No idea
[14:41:42] ljarvis: it would splat the splat the splat
[14:41:50] jhass: ACTION hopes for turning anything into cookies
[14:41:56] axl_: has joined #ruby
[14:41:59] ruboto: here's your cake: ????
[14:42:07] fmcgeough: has joined #ruby
[14:42:12] ruboto: I don't know anything about pizza
[14:42:29] adaedra: here's your pizza: ????
[14:42:41] yorickpeterse: is this some twisted Portal joke?
[14:42:48] ljarvis: !fact add pizza here's your pizza: ????
[14:42:48] ruboto: ljarvis, I will remember that pizza is here's your pizza: ????
[14:42:51] ngscheurich: Sounds like it might be.
[14:42:55] yorickpeterse: or is it supposed to be an unicode cake my terminal doesn't show?
[14:43:01] ljarvis: yorickpeterse: yep
[14:43:23] Psi-Jack: Yeah, my IRC client doesn't show that character either.
[14:43:27] Psi-Jack: And I'm using unicode. :p
[14:43:27] jhass: yorickpeterse: install ttf-symbola :P
[14:43:39] ljarvis: poor folks
[14:43:54] yorickpeterse: ACTION installs ttf-symbola
[14:44:23] kies^: has joined #ruby
[14:44:26] jhass: eightyeight: got the link to the code again?
[14:44:28] yorickpeterse: "resolving dependencies"
[14:44:36] yorickpeterse: ...it doesn't even have dependencies
[14:44:38] eightyeight: ah. it was using 2.1. now i'm 100% confident it's using 2.2, and new error:
[14:44:39] yorickpeterse: what the hell pacman
[14:44:49] eightyeight: Disabling plugin due to error: NoMethodError, undefined method `split' for nil:NilClass
[14:44:50] Psi-Jack: I blame pacman for 100% of problems. :p
[14:44:54] ruboto: here's your cake: ????
[14:45:02] ckinniburgh: has joined #ruby
[14:45:14] jhass: must be your clunky bitmap font messing up :P
[14:45:18] eightyeight: jhass: https://weechat.org/scripts/source/zmq_notify.rb.html/
[14:45:24] yorickpeterse: it shows hangul just fine
[14:45:28] jhass: yorickpeterse: with pleasure
[14:45:54] Thomas-0725: has joined #ruby
[14:46:07] bustrarm: has joined #ruby
[14:46:28] deg-: has joined #ruby
[14:46:32] jhass: eightyeight: make sure plugins.var.ruby.zmq_notify.ignore_tags is non-empty
[14:46:59] jhass: eightyeight: alternatively provide the backtrace so we can make sure it's actually that
[14:47:29] khebbie: has joined #ruby
[14:47:43] icharlie: has joined #ruby
[14:48:47] EminenceHC: has joined #ruby
[14:48:47] paradoja: has joined #ruby
[14:50:03] shmilan: has joined #ruby
[14:51:12] tonios57: has joined #ruby
[14:51:58] axl_: has joined #ruby
[14:52:05] jiada: has joined #ruby
[14:52:08] mary5030: has joined #ruby
[14:52:58] unver`: has joined #ruby
[14:53:05] rbowlby: has joined #ruby
[14:55:12] michael_mbp: has joined #ruby
[14:56:35] Psi-Jack: in ruby, is def initialize the only method that is called internally by ruby calls, or are there others beyond just initialize?
[14:56:49] ljarvis: Psi-Jack: there any many more
[14:57:11] Psi-Jack: Hmm, okay. Is there a web page that shows them?
[14:57:40] ljarvis: it depends what you mean exactly though, initialize is unique. But there's looks of hook methods for example
[14:58:08] jhass: and converters
[14:58:16] ljarvis: here's some of the hook methods: http://stackoverflow.com/questions/5127819/is-this-a-comprehensive-list-of-ruby-hook-methods
[14:58:37] jhass: >> class Foo; def to_s; "Bar"; end; end; "#{Foo.new}"
[14:58:38] ruboto: jhass # => "Bar" (https://eval.in/420393)
[14:59:08] ljarvis: >> class A; def to_ary; ["wot"]; end; end; Array(A.new)
[14:59:08] Psi-Jack: Hmm.. Trying to see if post_init is one of those methods that are normally called when instantiating an object.
[14:59:09] ruboto: ljarvis # => ["wot"] (https://eval.in/420394)
[14:59:23] jhass: that's some libraries doing
[14:59:37] ljarvis: medling libraries
[14:59:42] [k-: jhass, also, coerce
[14:59:54] jhass: yeah, counted that to the converters
[15:00:02] EagleDelta: has joined #ruby
[15:00:43] dhollinger: has joined #ruby
[15:01:03] Psi-Jack: Hmmm.. Welp. now I can start re-writing my sensu extension to work with rabbitmq. :)
[15:01:15] ljarvis: >> class A; def +@; p ":|"; end; end; +A.new
[15:01:16] ruboto: ljarvis # => ":|" ...check link for more (https://eval.in/420395)
[15:01:17] DexterLB: has joined #ruby
[15:02:15] pawnbox: has joined #ruby
[15:03:57] The_Phoenix: has joined #ruby
[15:04:26] Psi-Jack: mwlang: Heh, it's funny too. I had asked in #sensu if re-writing my bridge extension to utilize RabbitMQ would be advisable to handle varrying diferent types of external communications, tcp, http, etc.. And was told that the resources used to serialize, push, and fetch data from rabbitmq may exceed those to just send to the correct endpoint.
[15:04:52] victortyau: has joined #ruby
[15:04:59] Psi-Jack: May be right... But, em-http-request itself has no queuing and retry system, like EM::Connection does.
[15:05:01] The_Phoenix: has joined #ruby
[15:05:46] eightyeight: jhass: hmm. not sure how to get tracebacks of scripts with the weechat client
[15:06:00] The_Phoenix: has joined #ruby
[15:06:32] eightyeight: however, the current error is: NoMethodError, undefined method `split' for nil:NilClass
[15:06:59] umgrosscol: has joined #ruby
[15:07:08] jhass: yeah, I'm afraid that's impossible to debug without a backtrace
[15:07:17] blackjid: has joined #ruby
[15:07:52] eightyeight: looks like the split() function is only called twice in the script, if that error isn't a red herring
[15:07:56] The_Phoenix: has joined #ruby
[15:09:10] IrishGringo: I need assistance with my MBP 10.10.5 machine setting up cocoapods... can someone look at this please... http://pastebin.com/fgkYq0eC
[15:09:11] ruboto: IrishGringo, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/e659a81262386cfe883f
[15:09:11] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[15:09:36] ArnaudM: About rbenv... anyone succeed setting PATH var in .service systemd files ?
[15:09:37] fgo: has joined #ruby
[15:10:16] adaedra: IrishGringo: don't use sudo while installing gems
[15:10:25] snockerton: has joined #ruby
[15:10:41] IrishGringo: i'll give that a try
[15:10:56] adaedra: You're using rvm as it seems, so you should be able to do it
[15:11:02] marguerite: has joined #ruby
[15:11:45] IrishGringo: is there a better way than rvm?
[15:12:05] adaedra: rvm should be ok
[15:12:33] adaedra: but if you use rvm, don't use sudo
[15:13:20] chohe: has joined #ruby
[15:13:40] adaedra: also, 1.9.3 is EOL, you may want to update your ruby
[15:13:51] ruboto: I don't know anything about eol
[15:14:19] adaedra: - RUBY VERSION: 2.0.0 (2014-05-08 patchlevel 481) [universal.x86_64-darwin14]
[15:14:19] adaedra: - INSTALLATION DIRECTORY: /usr/local/rvm/gems/ruby-1.9.3-p194
[15:14:22] adaedra: what the heck
[15:15:26] diegoaguilar: has joined #ruby
[15:15:26] bruno-: has joined #ruby
[15:15:56] The_Phoenix: has joined #ruby
[15:17:06] The_Phoenix: has joined #ruby
[15:17:16] havenwood: has joined #ruby
[15:17:21] lannonbr: has joined #ruby
[15:18:28] marguerite: hello, how can nokogiri automatically skip unrecognized characters? some part of my needed text was skipped because they appeared after the unrecognized characters...my code please see http://paste.opensuse.org/98409697
[15:18:38] [Butch]: has joined #ruby
[15:18:57] robh71: has joined #ruby
[15:18:58] The_Phoenix: has joined #ruby
[15:20:16] The_Phoenix: has joined #ruby
[15:21:04] jokester: has joined #ruby
[15:21:08] IrishGringo: adaedra: I am going to attempt to update my ruby using these instrutions... make sense ? https://www.ruby-lang.org/en/documentation/installation/#homebrew
[15:21:36] adaedra: Why does my Internet hates me
[15:21:46] The_Phoenix: has joined #ruby
[15:22:48] polpak: has joined #ruby
[15:23:20] The_Phoenix: has joined #ruby
[15:23:48] [k-: you kept giving fake cakes
[15:23:51] [k-: thats why
[15:24:16] adaedra: ACTION slaps [k- with ????
[15:24:32] The_Phoenix: has joined #ruby
[15:25:25] The_Phoenix: has joined #ruby
[15:26:06] jhass: marguerite: open(url, &:read).encode("UTF-8", replace: "") seems to help
[15:26:58] The_Phoenix: has joined #ruby
[15:27:25] pdoherty: has joined #ruby
[15:27:43] erts: has joined #ruby
[15:27:53] n008f4g_: has joined #ruby
[15:28:23] nettoweb: has joined #ruby
[15:28:30] northfurr: has joined #ruby
[15:28:33] The_Phoenix: has joined #ruby
[15:28:39] Rubie: has joined #ruby
[15:29:45] The_Phoenix: has joined #ruby
[15:29:59] marguerite: jhass: thanks! it helps
[15:30:44] petricore: has joined #ruby
[15:30:56] The_Phoenix: has joined #ruby
[15:31:08] adaedra: IrishGringo: if you're using rvm, use it to update your ruby
[15:31:38] scyth: has joined #ruby
[15:31:50] biske: has joined #ruby
[15:31:51] scyth: has left #ruby: ("Leaving")
[15:32:07] IrishGringo: I'm hearing from some others I should not be using rvm... just googling it now to see what the issue is...
[15:32:23] The_Phoenix: has joined #ruby
[15:32:29] adaedra: There's alternatives, like rbenv or chruby
[15:32:49] adaedra: But in that case, you may want to start by completely nuking your rvm and cleaning system-installed gems
[15:33:18] The_Phoenix: has joined #ruby
[15:33:53] rcvalle: has joined #ruby
[15:33:59] nofxx: has joined #ruby
[15:34:16] northfurr: has joined #ruby
[15:34:24] devoldmx: has joined #ruby
[15:34:35] The_Phoenix: has joined #ruby
[15:34:58] j_mcnally: has joined #ruby
[15:35:06] failshell: has joined #ruby
[15:35:32] The_Phoenix: has joined #ruby
[15:38:28] JDiPierro: has joined #ruby
[15:38:57] war_pigs: has joined #ruby
[15:39:21] Ropeney: has joined #ruby
[15:39:31] diegoaguilar: has joined #ruby
[15:39:31] gregf_: not gcse's?
[15:39:36] gregf_: oops sorry :/
[15:42:55] dfockler: has joined #ruby
[15:43:26] ips|malc: has joined #ruby
[15:43:28] diegoaguilar: akira .not @room
[15:44:00] robh71: has joined #ruby
[15:45:00] diegoaguilar: has joined #ruby
[15:45:42] icarus: has joined #ruby
[15:46:08] hotpancakes: has joined #ruby
[15:48:09] GnuYawk: has joined #ruby
[15:48:22] xhosae: has joined #ruby
[15:49:23] renderful: has joined #ruby
[15:49:46] DEac-: has joined #ruby
[15:51:32] kies^: has joined #ruby
[15:52:22] luckyme: has joined #ruby
[15:53:21] khebbie: has joined #ruby
[15:53:40] marguerite: has left #ruby: ()
[15:54:09] towski_: has joined #ruby
[15:54:35] wallerdev: has joined #ruby
[15:54:44] ips|malc: has joined #ruby
[15:54:50] skade: has joined #ruby
[15:54:51] Thomas-0725: has joined #ruby
[15:56:40] northfurr: has joined #ruby
[15:59:30] baweaver: has joined #ruby
[15:59:34] Maletor: has joined #ruby
[15:59:50] renderful: has joined #ruby
[16:02:07] amclain: has joined #ruby
[16:02:56] shmilan: has joined #ruby
[16:02:57] bricker: has joined #ruby
[16:03:23] Thomas-0725: has joined #ruby
[16:03:26] Torrieri: has joined #ruby
[16:03:47] Torrieri: has joined #ruby
[16:04:27] nettoweb: has joined #ruby
[16:05:28] bronson: has joined #ruby
[16:06:51] fantazo: has joined #ruby
[16:06:54] gh: has joined #ruby
[16:07:09] hotpancakes: has joined #ruby
[16:08:47] bronson: has joined #ruby
[16:09:18] lagweezle: <groot>I am root.</groot>
[16:09:24] baroquebobcat: has joined #ruby
[16:09:57] Spami: has joined #ruby
[16:12:21] [Butch]: has joined #ruby
[16:15:17] psye: has joined #ruby
[16:15:20] [Butch]: has joined #ruby
[16:15:39] baweaver: shevy: I eat root
[16:15:41] mary5030: has joined #ruby
[16:16:12] psye: has joined #ruby
[16:18:15] mutuma: has joined #ruby
[16:18:54] UtkarshRay: has joined #ruby
[16:20:06] Rinzlit2: has joined #ruby
[16:21:50] jhass: eek, go away
[16:22:00] Hanmac: has joined #ruby
[16:23:15] leat: has joined #ruby
[16:23:22] biske: has joined #ruby
[16:23:46] roolo: has joined #ruby
[16:23:52] jpfuentes2: has joined #ruby
[16:24:15] moshe_: has joined #ruby
[16:24:32] greymeister: has joined #ruby
[16:26:11] kies^: has joined #ruby
[16:26:39] moshe_: anyone here experienced with using OmniAuth with multiple models? I???ve done everything stated here https://github.com/plataformatec/devise/wiki/OmniAuth-with-multiple-models but it doesnt seem to work. The omniauth url methods are not being generated, so I???m getting undefinied ???user_omniauth_authorize_path???
[16:26:41] pawnbox: has joined #ruby
[16:27:49] dfockler: has joined #ruby
[16:28:31] leafybasil: has joined #ruby
[16:28:45] nertzy: has joined #ruby
[16:29:31] Asher: has joined #ruby
[16:30:47] Alayde: has joined #ruby
[16:32:01] jhass: ?rails moshe_
[16:32:01] ruboto: moshe_, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[16:32:23] moshe_: sorry, I???ll ask there.
[16:33:34] A124: has joined #ruby
[16:33:46] A124: has joined #ruby
[16:33:53] RobertBirnie: has joined #ruby
[16:34:35] eightyeight: i commented out the ignored stuff: http://ae7.st/p/2m0
[16:34:41] greenbigfrog: has joined #ruby
[16:35:13] rehat: has joined #ruby
[16:35:18] jhass: and that helped?
[16:35:30] eightyeight: yeah. the plugin isn't getting disabled now
[16:35:38] NeverDie: has joined #ruby
[16:35:41] greenbigfrog: http://hastebin.com/atitubawuf.rb
[16:35:41] greenbigfrog: Everything is written in the file. I'm getting an connection reset by peer and don't know how to fix it...
[16:36:21] fantazo: has joined #ruby
[16:36:27] jhass: greenbigfrog: do you also get that for nc api.twitch.tv 443 ?
[16:36:57] mleung: has joined #ruby
[16:37:02] eightyeight: i've emailed the plugin developer. we'll see where it goes from there
[16:37:17] khebbie: has joined #ruby
[16:37:57] greenbigfrog: jhass: no respond till now
[16:38:02] tenderlove: has joined #ruby
[16:38:44] jhass: greenbigfrog: press Ctrl+D. Next up: openssl s_client -connect api.twitch.tv:443
[16:39:15] greenbigfrog: jhass: all responses go over api.twitch.tv/kraken as far as I know
[16:40:06] jhass: /kraken is part of the request path, not the host
[16:40:07] greenbigfrog: jhass: http://hastebin.com/nuviqobola.avrasm
[16:40:09] arooni-mobile: has joined #ruby
[16:40:18] jhass: good, Ctrl+D again
[16:40:31] tjohnson: has joined #ruby
[16:40:35] pietr0: has joined #ruby
[16:40:38] jhass: okay one odd thing in the code, :use_ssl == 'https' is always false
[16:40:46] jhass: where did you pick that up?
[16:41:33] Jacky: has joined #ruby
[16:41:41] Ilyes512: has joined #ruby
[16:41:46] greenbigfrog: jhass: http://ruby-doc.org/stdlib-2.2.3/libdoc/net/http/rdoc/Net/HTTP.html
[16:41:46] greenbigfrog: I messed it up I guess ;)
[16:41:48] jhass: should probably be use_ssl: true
[16:42:27] xet7: has joined #ruby
[16:42:50] astrobun_: has joined #ruby
[16:43:08] greenbigfrog: jhass: still not working
[16:43:17] jhass: did the error change at least?
[16:43:22] pawnbox: has joined #ruby
[16:43:32] greenbigfrog: jhass: one sec
[16:43:37] jhass: btw your indentation is all messy, you should be pedantic about that
[16:44:20] alfajor: has joined #ruby
[16:44:33] jhass: actually you don't even do anything with the first request but do a second one ?!
[16:44:42] jamesaxl: has joined #ruby
[16:44:46] jhass: the messy indentation got me confused enough that I didn't notice
[16:45:56] einarj: has joined #ruby
[16:46:12] jonee: has joined #ruby
[16:47:33] jhass: JSON.parse(Net::HTTP.get(URI.parse("https://api.twitch.tv/kraken/streams/ESL_CSGO"))) works just fine here
[16:47:49] jhass: no need for anything else
[16:48:15] [H]unt3r: has joined #ruby
[16:48:46] rbennacer: has joined #ruby
[16:48:51] pawnbox: has joined #ruby
[16:49:30] hahuang65: has joined #ruby
[16:50:05] ngscheurich: has joined #ruby
[16:50:40] baweaver: has joined #ruby
[16:51:14] emma_: has joined #ruby
[16:52:59] andybernard: has joined #ruby
[16:54:39] prestorium: has joined #ruby
[16:54:41] rakm: has joined #ruby
[16:55:01] casadei_: has joined #ruby
[16:55:37] baweaver: has joined #ruby
[16:56:19] anonoz: has joined #ruby
[16:56:34] lethan: has joined #ruby
[16:56:36] djbkd: has joined #ruby
[16:56:44] greenbigfrog: jhass: I had a lag and had to reconnect: did you or anyone else write something?
[16:56:53] lannonbr: has joined #ruby
[16:56:56] jhass: ?logs greenbigfrog
[16:56:56] ruboto: greenbigfrog, You can find a log of this channel at http://irclog.whitequark.org/ruby/
[16:58:12] tangledhelix: has joined #ruby
[16:58:33] Frem: has joined #ruby
[16:58:38] greenbigfrog: jhass: can you edit the hastebin maybe for me please? with the fix you mean and also right intendation? that would be really kind
[16:59:05] jhass: nah, I'm not here to spoon feed you
[16:59:17] nettoweb: has joined #ruby
[16:59:42] Rinzlit: has joined #ruby
[17:00:03] treehug88: has joined #ruby
[17:00:08] jenksy: has left #ruby: ()
[17:00:13] greenride: has joined #ruby
[17:00:19] djbkd: has joined #ruby
[17:01:44] unver`: has joined #ruby
[17:02:04] Anon_: has joined #ruby
[17:02:14] tmtwd: has joined #ruby
[17:02:29] djbkd_: has joined #ruby
[17:02:58] flegercovateam: has joined #ruby
[17:03:24] towler: has joined #ruby
[17:03:48] andybernard: has joined #ruby
[17:04:05] JDiPierro: has joined #ruby
[17:06:41] greenbigfrog: Still the same error: http://hastebin.com/amaqemuzem.rb
[17:08:40] dgutierrez1287: has joined #ruby
[17:09:10] timonv: has joined #ruby
[17:09:24] mary5030: has joined #ruby
[17:10:12] IrishGringo: has joined #ruby
[17:10:24] einarj: has joined #ruby
[17:10:44] jhass: greenbigfrog: why do you do it twice?
[17:11:19] fgo: has joined #ruby
[17:11:31] mary5030: has joined #ruby
[17:12:09] DelDotB: has joined #ruby
[17:12:46] jhass: jruby -rjson -r'net/http' -e 'p JSON.parse(Net::HTTP.get(URI.parse("https://api.twitch.tv/kraken/streams/kingkongor")))' works for me
[17:12:49] jhass: guess they blocked you
[17:14:55] Musashi007: has joined #ruby
[17:15:26] benlieb: has joined #ruby
[17:15:54] towski_: has joined #ruby
[17:16:52] greenbigfrog: jhass: no Idea why I was doing it twice (again)
[17:16:53] greenbigfrog: /me should concentrate more
[17:17:02] greenbigfrog: ACTION should concentrate more
[17:17:38] EminenceHC: has joined #ruby
[17:17:52] greenbigfrog: jruby -rjson -r'net/http' -e 'p JSON.parse(Net::HTTP.get(URI.parse("https://api.twitch.tv/kraken/streams/kingkongor")))' doesn't work for me
[17:18:23] jhass: then I doubt there's anything we can do about it
[17:18:25] jenrzzz: has joined #ruby
[17:18:26] jhass: get a new IP
[17:18:42] greenbigfrog: thanks for helping
[17:18:53] last_staff: has joined #ruby
[17:19:31] nb_bez___: has joined #ruby
[17:19:37] rideh: has joined #ruby
[17:20:44] dh64: has joined #ruby
[17:21:29] einarj_: has joined #ruby
[17:22:02] choke: has joined #ruby
[17:22:57] baweaver: has joined #ruby
[17:23:09] nofxx: is there some pry/irb nicety to show a gem README? > just_plain_forgot_how_to_use('gemname')
[17:23:19] northfurr: has joined #ruby
[17:24:45] pawnbox: has joined #ruby
[17:26:12] northfurr: has joined #ruby
[17:27:00] nettoweb: has joined #ruby
[17:29:28] fantazo: has joined #ruby
[17:30:07] bluOxigen: has joined #ruby
[17:30:28] chohe: has joined #ruby
[17:30:33] snockerton: has joined #ruby
[17:32:13] bronson: has joined #ruby
[17:32:48] greenbigfrog: jhass: I don't get it... (http://hastebin.com/ebilexisuk.rb)
[17:32:48] greenbigfrog: I can access the API via browser but not over the code... WHY? (I know you'll probably not be able to tell me)
[17:33:01] d2dchat: has joined #ruby
[17:33:02] shinnya: has joined #ruby
[17:33:17] DoubleMalt: has joined #ruby
[17:33:26] jaycee: has joined #ruby
[17:33:30] jhass: as said, works here
[17:33:47] Papierkorb: is maybe just your IP+user-agent pair banned?
[17:34:29] greenbigfrog: how could I test that?
[17:34:36] jeadre: has joined #ruby
[17:34:41] Papierkorb: change your UA or IP
[17:35:10] devoldmx: has joined #ruby
[17:35:28] greenbigfrog: how do I change my UA? (Browser works as I already said)
[17:36:02] kidoz: has joined #ruby
[17:36:11] xxneolithicxx: has joined #ruby
[17:37:15] RegulationD: has joined #ruby
[17:38:01] unver`: greenbigfrog: You can do it in chrome through the developer tools
[17:38:42] greenbigfrog: unver`: as I already said it's working with my browser but not with my code
[17:40:14] radgeRayden: has joined #ruby
[17:40:28] greenbigfrog: http://stackoverflow.com/questions/5798037/how-to-set-a-custom-user-agent-in-ruby
[17:40:28] greenbigfrog: found this... But I'm not sure on how I have to use it...
[17:40:32] lannonbr: has joined #ruby
[17:40:46] rippa: has joined #ruby
[17:41:05] einarj: has joined #ruby
[17:42:08] unver`: https://github.com/justintv/twitch-api , https://discuss.dev.twitch.tv/ looks like there's an irc channel too, #twitch-api
[17:42:33] nofxx: greenbigfrog, use on your get. Also, try setting your editor to 2 spaces for identation. Ruby looks better that way.
[17:43:00] greenbigfrog: nofxx: I like it with 4/8 more
[17:43:14] hydrozen: has joined #ruby
[17:44:07] nofxx: 10 man, 10 colors: good japanese saying =D
[17:44:08] Kallis: has joined #ruby
[17:45:06] nofxx: greenbigfrog, use a browser one.. chrome, IE
[17:45:08] casadei_: has joined #ruby
[17:45:29] Kallis: has joined #ruby
[17:45:45] greenbigfrog: changing the UA like said in the link posted further up didn't help...
[17:45:56] greenbigfrog: still the same error
[17:46:04] rbowlby: has joined #ruby
[17:47:07] bronson: has joined #ruby
[17:47:12] greenbigfrog: ACTION will have to let the issue sleep till tommorow
[17:47:16] greenbigfrog: thanks for all the help
[17:48:57] astrobun_: has joined #ruby
[17:48:59] RegulationD: has joined #ruby
[17:51:31] postmodern: has joined #ruby
[17:54:28] einarj_: has joined #ruby
[17:54:38] A124: has joined #ruby
[17:55:36] Musashi007: has joined #ruby
[17:55:47] [Butch]: has joined #ruby
[17:56:14] petricore: has joined #ruby
[17:56:57] B5X: has joined #ruby
[17:57:44] B5X: has joined #ruby
[17:59:07] B5X: has joined #ruby
[17:59:50] cajone: has joined #ruby
[18:00:33] diegoaguilar: has joined #ruby
[18:01:39] anon: has joined #ruby
[18:05:32] choke: has joined #ruby
[18:05:50] tmtwd: has joined #ruby
[18:06:41] DexterLB: has joined #ruby
[18:07:08] bmcginty: has joined #ruby
[18:08:49] Anon_: has joined #ruby
[18:09:13] iamninja: has joined #ruby
[18:11:03] failshell: has joined #ruby
[18:11:21] [Butch]: has joined #ruby
[18:11:53] roolo: has joined #ruby
[18:12:03] war_pigs: has joined #ruby
[18:12:47] webuser20: has joined #ruby
[18:13:08] cball: has joined #ruby
[18:13:23] fgo: has joined #ruby
[18:13:41] webuser20: Good morning - I'm running into abit of an issue with some code - https://gist.github.com/anonymous/e8696c8e4fa1bf9f849c -- When I run the attached with a longer file (1500 lines or so) (full.txt) I quickly exhaust all the connections to my Mongo instance. This is because as I read through my file, I am instantiating another object, with it's database connection, for every line. It appears that the Ruby Mongo driver is not properly cl
[18:13:56] webuser20: his is alluded to in https://jira.mongodb.org/browse/RUBY-910 and another bug issue I can't point to right now. I've tried a variety of things to work around this - reset the object to nil after it has been inserted, run a garbage collection, etc, but none helped. So my question is, what's the right way to share a database connection between multiple objects of a class?
[18:14:19] mhib: has joined #ruby
[18:14:53] jhass: webuser20: can't you use a connection pool?
[18:15:33] apeiros: better question: why on earth a new connection for each insert?
[18:16:04] webuser20: jhass: that would be great, but I'm not sure how to do so. I shouldnt be creating a new connection for every insert, that's a bit silly
[18:16:36] jhass: well actually apeiros has a point, why not a single connection?
[18:16:38] webuser20: but, I'm not sure how to create a connection pool except creating a global or at least class level connection
[18:16:56] webuser20: and.. I dont know if that would cause problems. I'm a bit new to the whole object programming ideas
[18:17:05] dgutierrez1287: has joined #ruby
[18:17:16] jhass: just pass the client into the constructor
[18:17:37] jhass: tbh that class seems to be a bit arbitrary "let's use a class!"
[18:17:47] webuser20: object.insert(data, @client)?
[18:18:52] jeanlinux: has joined #ruby
[18:19:34] webuser20: from my understanding, passing the client to the constructor still creates a new connection for each object
[18:19:54] C1V0: has joined #ruby
[18:20:14] user1138: has joined #ruby
[18:20:28] jhass: More like client[:bar].insert LogEntry.new(line).record
[18:20:48] jhass: I think that's getting somewhere
[18:21:20] jhass: just the parsing seems like good domain for a class, no need for it to know about how to use a mongodb client
[18:21:43] jhass: but no, Ruby is pass by reference, it wouldn't create a new client
[18:21:59] nofxx: spec/ test/ folders (all that's within) is packed in gem right?
[18:22:05] paulcsmith: has joined #ruby
[18:22:26] nofxx: hence the s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") line
[18:22:47] tmtwd: has joined #ruby
[18:24:04] Thermatix: has joined #ruby
[18:24:10] veduardo_: has joined #ruby
[18:25:22] pragmatism: has joined #ruby
[18:26:01] nuttermb: has joined #ruby
[18:26:18] decoponio: has joined #ruby
[18:28:19] jeanlinux: has joined #ruby
[18:28:35] webuser20: jhass: hrm, I see what you're saying, it's one thing I considered, but it felt..backward to me. Thanks, I'll refactor to something like that
[18:29:29] DLSteve: has joined #ruby
[18:30:07] duggiefresh: has joined #ruby
[18:31:16] jeadre: has joined #ruby
[18:31:21] xet7: has joined #ruby
[18:32:57] kies^: has joined #ruby
[18:33:55] Cust0sLim3n: has joined #ruby
[18:34:42] toretore: has joined #ruby
[18:34:45] greenride: has left #ruby: ()
[18:35:40] chohe: has joined #ruby
[18:36:28] malconis_: has joined #ruby
[18:37:01] umgrosscol: has joined #ruby
[18:37:10] symm-: has joined #ruby
[18:37:38] carlosoliveira: has joined #ruby
[18:41:46] fullofcaffeine: has joined #ruby
[18:43:41] lannonbr: has joined #ruby
[18:44:46] prestorium: has joined #ruby
[18:45:30] bruno-: has joined #ruby
[18:47:29] mary5030: has joined #ruby
[18:47:45] carlosoliveira: has joined #ruby
[18:47:51] northfurr: has joined #ruby
[18:48:56] Vitor_: has joined #ruby
[18:49:03] carlosoliveira: has left #ruby: ()
[18:49:39] veduardo_: has joined #ruby
[18:49:53] Pupp3tm4st3r: has joined #ruby
[18:50:42] einarj: has joined #ruby
[18:50:58] choke: has joined #ruby
[18:54:13] jgpawletko: has joined #ruby
[18:54:42] einarj: has joined #ruby
[18:55:41] certainty: erm, evening
[18:55:54] baweaver: has joined #ruby
[18:57:19] noethics: has joined #ruby
[19:01:33] tubulife-: has joined #ruby
[19:01:50] einarj: has joined #ruby
[19:02:27] ruby-lang878: has joined #ruby
[19:02:35] ruby-lang878: hi, is anyone here?
[19:02:53] relic: Certainly.
[19:03:54] Dd: has joined #ruby
[19:04:25] kirun: has joined #ruby
[19:04:38] Dd: need to write a script
[19:04:50] certainty: cool. do it :)
[19:04:52] Dd: where i have files populated given each line as something similar to this: 0 AUE_NULL STD { int nosys(void); } syscall nosys_args int
[19:04:55] shevy: need to throw the cat
[19:04:59] Dd: what i want is
[19:05:01] certainty: need to catch the cat
[19:05:06] lurkmaster: has joined #ruby
[19:05:19] Dd: for the resulting output to be: { 0, nosys, 0 }
[19:05:22] MasterPiece: has joined #ruby
[19:05:36] Dd: where the last 0 represents the arguments in nosys
[19:05:52] Dd: but if given arguments like (int, float, struct), it would return 3.
[19:06:00] Dd: or if given the argument (int) it would give one.
[19:06:22] Dd: I think it would be easy to go about getting the first number (the first 0)
[19:06:30] lurkmaster: hey guys, i'm getting this weird error message when I try to start a new rails app. anyone know what's going on here? http://pastie.org/10366950
[19:06:45] Dd: But I'm really new
[19:06:49] jhass: ?crosspost lurkmaster
[19:06:50] ruboto: lurkmaster, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
[19:06:53] Dd: can you help shevy, certainty
[19:07:13] jhass: _d: http://ruby-community.com/pages/user_rules#rule_2_7
[19:07:36] Ilyes512: has joined #ruby
[19:07:37] relic: Someone's playing with syscalls, fun.
[19:08:06] relic: That's pretty trivial to do, but I wonder what comes afterward.
[19:08:06] einarj_: has joined #ruby
[19:08:19] lurkmaster: this is a crosspost, no one replied, and so there were no suggestions
[19:08:33] relic: Clearly some BSD variant, perhaps a fuzzer of some kind.
[19:08:50] Vitor_: has joined #ruby
[19:08:55] relic: Linux syscalls are listed rather differently, note: AUE_NULL STD.
[19:08:57] relic: Oh he left.
[19:09:01] certainty: no I can't help shevy
[19:09:05] pullphinger15: has joined #ruby
[19:09:08] relic: Damn /ignore * join part quit crap.
[19:09:20] zenspider: WHY DID YOU NOT WRITE IT FOR ME?!?!?
[19:09:47] relic: zenspider: You've been yelling since before you woke up.
[19:09:55] relic: 10:04 < zenspider> STABLE!!!
[19:09:57] arooni-mobile: has joined #ruby
[19:10:29] lurkmaster: so no one has any clue why rails won't let me start a new app?
[19:10:49] relic: Was _d expecting someone to write it for him, or to guide him on how to write it? :\
[19:10:56] relic: lurkmaster: This channel isn't about rails.
[19:11:06] relic: There's another channel down the hall to the left regarding that.
[19:11:46] relic: (It's called #rubyonrails.)
[19:11:50] lurkmaster: relic: that channel is completely unresponsive and fucking sucks
[19:12:04] relic: Well then, that's not very nice.
[19:12:10] lurkmaster: relic: but its true
[19:12:25] einarj: has joined #ruby
[19:12:36] choke: has joined #ruby
[19:12:40] ruby-lang055: has joined #ruby
[19:12:41] zenspider: relic: haha. uh. hopefully not my timezone. IMPOSTER!
[19:12:50] astrobun_: has joined #ruby
[19:12:51] jackjackdripper: has joined #ruby
[19:13:09] relic: ACTION eyes zenspider.
[19:13:18] zenspider: lurkmaster: no, it isn't completely unresponsive. I've gotten help there several times in the past month or so
[19:13:29] B5X: has joined #ruby
[19:13:32] jhass: lurkmaster: welcome to IRC, sometimes it just takes an hour or two
[19:13:39] ruby-lang055: can you hear me now?
[19:13:40] zenspider: try asking your question better... in a way that conveys your intent and is actually answerable
[19:13:49] User458764: has joined #ruby
[19:14:19] sepp2k: has joined #ruby
[19:14:30] fgo: has joined #ruby
[19:14:50] ruby-lang055: any suggestions for loading a constant from a gem? it seems to not be able to find the new gem
[19:15:08] ruby-lang055: if I run $gem which analytics-ruby, it says ERROR: Can't find ruby library file or shared library analytics-ruby
[19:15:26] ruby-lang055: in my code or in the console, it gives NameError (uninitialized constant Segment):
[19:15:31] ruby-lang055: I'm using rails
[19:15:49] Asher: has joined #ruby
[19:15:57] lurkmaster: zenspider: my intent is to solve an error message. i have written a line of code yet, rails won't even generate a new app. what would make my query more answerable?
[19:16:19] zenspider: ruby-lang055: there's no rule about the gem name that is requirable
[19:16:31] zenspider: ruby-lang055: try `gem contents analytics-ruby | grep lib`
[19:16:33] lurkmaster: and suck is a relative term. in absolute terms maybe the rails channel doesn't suck but in relative terms it sure does. someone would've responded in #django or #nodejs or #python or #javascript
[19:16:33] luksaur: has joined #ruby
[19:16:36] ruby-lang055: I see it when I run bundle: "Using analytics-ruby 2.0.12"
[19:17:06] ruby-lang055: oh I see this zenspider:
[19:17:18] ruby-lang055: .rvm/gems/ruby-2.2.2/gems/analytics-ruby-2.0.12/lib/segment.rb
[19:17:24] ruby-lang055: and a bunch of others
[19:17:28] ruby-lang055: so it is there?
[19:17:36] tmtwd: has joined #ruby
[19:17:39] ruby-lang055: how come it's not loading in console or my rails app?
[19:17:42] zenspider: lurkmaster: you're not providing the cmd. you're not providing version info... you're not providing a lot.
[19:17:56] zenspider: ruby-lang055: remove the grep. might have c exts
[19:17:59] zenspider: gotta go to lunch...
[19:18:18] lurkmaster: zenspider: cmd - rails new app
[19:18:35] ruby-lang055: I see a bunch of stuff with $ gem contents analytics-ruby
[19:18:48] ruby-lang055: but I don't know how to load it in the console :(
[19:18:52] pullphinger: has joined #ruby
[19:18:54] ruby-lang055: require doesn't do the trick
[19:19:06] pullphinger: has joined #ruby
[19:20:20] _Cronon_: has joined #ruby
[19:21:18] towski_: has joined #ruby
[19:21:33] lannonbr: has joined #ruby
[19:23:37] Hamled: Does the ruby core library have anything similar to eval that would prevent any function calls (e.g. if you want to [de]serialize a ruby data structure)
[19:24:02] jhass: Hamled: check the literal_parser gem or yet better don't do such stuff
[19:24:15] Hamled: jhass, oh yah I agree dont' do such stuff
[19:24:19] Hamled: and thanks for the tip
[19:24:19] jhass: Hamled: use a proper serialization, like JSON, YAML, Marshal
[19:25:11] symm-: has joined #ruby
[19:27:10] rfmind_: has joined #ruby
[19:27:28] pawnbox: has joined #ruby
[19:27:47] astrobun_: has joined #ruby
[19:28:40] certainty: lurkmaster: you can skip the bundle. See options for the rails new command but that doesn't solve your problem. It only delays it
[19:28:46] linuxboy_: has joined #ruby
[19:29:09] nofxx: Hamled, there's even BSON if you're sexually inclined to binaries
[19:29:29] lurkmaster: certainty: thanks for being the first person to respond to my question, ill try that
[19:29:44] lurkmaster: certainty: do you know how i might go about fixing the underlying problem?
[19:29:59] lurkmaster: certainty: everything fine just a day or two ago, and now I'm getting this random error message
[19:30:44] certainty: lurkmaster: no unfortunatelly not. What ruby and rails version is this. Did you do anything special?
[19:31:06] riskish: has joined #ruby
[19:31:23] lurkmaster: certainty: ruby 2.0.0p481
[19:31:58] lurkmaster: certainty: when i try to run ruby -v i get the same error message so I'm not sure what version i have but i reinstalled rails yesterday so it must be the newest version of rails
[19:32:22] bruno-: has joined #ruby
[19:32:28] certainty: ruby -v gives you that error?
[19:32:33] jienahma: has joined #ruby
[19:32:33] jienahma: has left #ruby: ()
[19:32:33] jienahma: has joined #ruby
[19:33:05] nofxx: is 'chunk' a somesort of reserved word ? got the craziest w/o trace error: 'ArgumentError: no block given'
[19:33:08] lurkmaster: certainty: i meant rails -v sorry
[19:33:22] j_mcnally: has joined #ruby
[19:33:29] lurkmaster: certainty: i did edit the .bash_profile while doing a codecademy exercise, could that be it?
[19:34:01] nofxx: ahh.... enumerable
[19:34:50] radgeRayden_: has joined #ruby
[19:35:56] devoldmx: has joined #ruby
[19:36:55] renderful: has joined #ruby
[19:37:24] certainty: lurkmaster: what did you change?
[19:37:37] radgeRayden__: has joined #ruby
[19:37:39] EminenceHC: has joined #ruby
[19:38:14] certainty: lurkmaster: in any case you can check that by starting a shell with bash --noprofile and run the command again
[19:38:21] sphex: has joined #ruby
[19:38:25] pandaant: has joined #ruby
[19:38:39] codecodecode123: has joined #ruby
[19:38:40] lurkmaster: certainty: I don't remember what i originally changed, but after i started having issues with rails i deleted its contents because i thought i added some faulty code and i was going crazy over it
[19:39:29] lurkmaster: certainty: just ran the command without a profile ??? same error
[19:39:44] radgeRayden: has joined #ruby
[19:39:51] certainty: so we can conclude it's probably not your change to the profile
[19:40:08] certainty: it however is something that's specific to your environment because generally this kind of stuff works
[19:40:27] codecodecode123: Hi, can someone help me? http://pastie.org/10367031 I am having trouble with a script i made.
[19:40:56] jhass: codecodecode123: is this a guessing game?
[19:41:06] doodleha_: has joined #ruby
[19:41:14] crdpink: has joined #ruby
[19:41:21] codecodecode123: its a script that runs with console params
[19:41:29] saphafee: has joined #ruby
[19:41:30] certainty: guessing game?
[19:41:32] jhass: codecodecode123: alright, maybe let's fix the obvious stuff
[19:41:34] codecodecode123: it saves or loads ips by label
[19:41:54] codecodecode123: there is a ips.json file which stores the ips and labels
[19:42:04] jhass: codecodecode123: ARGV[0] = "-a" is not ARGV[0] == "-a" is not ARGV[0].start_with? "-a"
[19:42:09] saphafee: has left #ruby: ()
[19:42:27] nzst: has joined #ruby
[19:42:29] jhass: codecodecode123: please oh please have a look at File.read and File.write, you're writing Ruby, not a shellscript
[19:42:51] codecodecode123: but i want it to work with shellscript
[19:42:53] xwct: has joined #ruby
[19:43:01] jhass: that's okay
[19:43:06] jhass: work with != it is
[19:43:14] ivanskie: has joined #ruby
[19:43:50] jhass: rename get_ips to read_ips or parse_ips we generally frown upon get_, is_, set_ in method names
[19:43:52] mary5030: has joined #ruby
[19:44:38] mary5030: has joined #ruby
[19:44:57] jhass: I hope the fancy " are just osx being silly as you copy pasted or pastie rendering silly
[19:45:32] codecodecode123: ill fix the doublequotes
[19:45:40] diegoaguilar: has joined #ruby
[19:45:46] jhass: ah nvm, it's pastie
[19:47:14] jhass: prefer "string #{interpolation}" over "string" + concatenation
[19:47:28] dgutierrez1287: has joined #ruby
[19:48:02] jhass: and the general structure could benefit from extracting the individual commands to methods and perhaps using OptionParser or even slop
[19:48:21] codecodecode123: well, i considered OptionParser
[19:48:47] codecodecode123: but the structure seemed a bit needlessly complex to me
[19:49:15] pawnbox: has joined #ruby
[19:49:16] dgutierrez1287: has joined #ruby
[19:49:23] codecodecode123: i guess a 12 year old can't understand that well
[19:50:03] wasamasa: slop is another fine option
[19:50:16] wasamasa: ACTION wonders what this script is for
[19:50:24] radgeRayden_: has joined #ruby
[19:50:42] codecodecode123: i told it before
[19:50:52] wasamasa: <codecodecode123> it saves or loads ips by label
[19:50:54] codecodecode123: it stores and retrieves ips
[19:50:57] wasamasa: that's not the real purpose, is it
[19:51:07] wasamasa: for that you could just use the shell
[19:51:32] codecodecode123: i wanted to make a ruby script for it
[19:51:50] codecodecode123: it gives me more opportunities for other features
[19:52:01] wasamasa: hence my question what the real purpose is :>
[19:52:03] bstrarm: has joined #ruby
[19:52:05] ItSANgo: has joined #ruby
[19:52:10] wasamasa: what do you intend to turn it into?
[19:52:25] codecodecode123: an ip retrieving and storing system
[19:52:36] jenrzzz: has joined #ruby
[19:53:18] hahuang65: has joined #ruby
[19:53:26] wasamasa: what would an eleven-year old do with ip addresses?
[19:54:03] codecodecode123: i am selling this script to him
[19:54:13] codecodecode123: the script itself is free
[19:54:23] codecodecode123: additional features are paid
[19:54:40] yxhuvud: spoken like a true entrepeneur!
[19:54:46] choke: has joined #ruby
[19:55:00] wasamasa: why the heck would anyone pay for editing and saving a file
[19:55:00] codecodecode123: my core goal: script entrepeneur
[19:55:35] codecodecode123: never gained any money by work in my whole ligfe
[19:55:58] wasamasa: looks like doing physical work has become uncool
[19:56:18] yxhuvud: wasamasa, well, you are in a programming channel after all..
[19:56:21] codecodecode123: don't prefer completing errans to get money
[19:56:45] atmosx: wasamasa: Actually, working on the computer (writing code or text) it's exhausting. At that point, you wanna do some physical work (work with the hands and set the mind free).
[19:56:55] wasamasa: atmosx: yes, exactly
[19:57:08] wasamasa: atmosx: I did even go as far as working for three months at the fast food chain with the big m
[19:57:17] atmosx: wasamasa: it's a huge relief when I get to do it. Then I go back working on the computer. I think humans need a fair amount of both. I need to exercise a lot more though
[19:57:22] wasamasa: atmosx: and was shocked it paid better than my previous internships
[19:57:29] codecodecode123: but i still do not prefer profit by physical labor
[19:57:29] atmosx: physical works != execrise
[19:57:54] codecodecode123: well, i do exercise
[19:58:27] atmosx: wasamasa: does it? I don't know, engineers in DO (sys-admins shit) start from 60k/year. You can't go for that kind of money in big M
[19:59:16] yxhuvud: atmosx: certain countries think that it is a good idea to not pay interns. Which is idiotic, but that is how it is.
[19:59:25] wasamasa: they did pay, just ridiculously little
[19:59:39] atmosx: codecodecode123: a retrieving and storing system I know is called database, you might wanna check it out
[19:59:55] shinnya: has joined #ruby
[19:59:56] certainty: sup wasamasa
[20:00:01] codecodecode123: this is a json system
[20:00:01] wasamasa: certainty: hi
[20:00:02] atmosx: yxhuvud: I see. What interns 'do' actually?
[20:00:03] roolo: has joined #ruby
[20:00:12] wasamasa: codecodecode123: make it to hackernews
[20:00:48] atmosx: yxhuvud: write code, like real code... or just do photocopies?!
[20:00:59] atmosx: this MrRobot series was extremely dissapointing
[20:01:06] certainty: lurkmaster: did you solve your problem or narrow the cause down?
[20:01:09] yxhuvud: atmosx: you should ask wasamasa, I never was one
[20:01:14] The_Phoenix: has joined #ruby
[20:01:24] codecodecode123: my opinions are that json and xml shouldn't just be used for data transfering
[20:01:37] wasamasa: *serialization
[20:01:48] codecodecode123: they have potential for data storing, im ny opinion
[20:01:58] nzst: has left #ruby: ("ERC (IRC client for Emacs 24.5.1)")
[20:03:02] lannonbr: has joined #ruby
[20:03:06] atmosx: codecodecode123: txt has a lot of potential too
[20:03:08] wasamasa: you'll be delighted to know then that xml and json databases have been failures in many aspects
[20:03:10] atmosx: unexploited unfortunately
[20:03:15] wasamasa: object databases, too
[20:03:24] roolo_: has joined #ruby
[20:03:24] wasamasa: relations are where it's at
[20:03:58] certainty: if you have a database available on the net that's public relations
[20:04:05] codecodecode123: well, you can make two json/xml file, one is storage and other is relation
[20:04:11] lurkmaster: certainty: nope, still int he dark
[20:04:45] wasamasa: codecodecode123: real databases are magic
[20:04:46] cornerma1: has joined #ruby
[20:04:56] nettoweb: has joined #ruby
[20:05:23] codecodecode123: ACTION doesn't believe in magic, digital or not
[20:05:27] yxhuvud: codecodecode123, you can but it turn unwieldy pretty quickly. But the easiest way to learn that is to code some of that, and then code some using other databases.
[20:05:29] certainty: lurkmaster: could you pleas pastie your env
[20:05:49] codecodecode123: yxhuvud: EXACTLY!
[20:05:57] jenrzzz: has joined #ruby
[20:06:09] wasamasa: codecodecode123: http://coding-geek.com/how-databases-work/
[20:06:39] wasamasa: codecodecode123: please don't invent yet another crappy database, use something existing
[20:06:41] certainty: i have no idea how databases work
[20:06:49] pullphinger: has joined #ruby
[20:07:06] certainty: i should ask andjbp
[20:07:07] wasamasa: simple, it's magic
[20:07:11] codecodecode123: not invention, reinvention, updated with more potential
[20:07:12] yxhuvud: wasamasa: sheesh. he is young still. plenty of time to make mistakes and learn from them
[20:07:30] shevy: Microsoft 2.0
[20:07:50] codecodecode123: ACTION claps at shevy
[20:08:48] lurkmaster: certainty: http://pastie.org/10367067
[20:08:59] diegoviola: has joined #ruby
[20:09:07] ta: has joined #ruby
[20:10:03] certainty: lurkmaster: hmm that looks pretty normal
[20:10:26] certainty: lurkmaster: do you have a .bundle file in your ~
[20:10:49] codecodecode123: why has chat died down?
[20:11:04] roolo: has joined #ruby
[20:11:13] lurkmaster: certainty: nope
[20:11:40] codecodecode123: you shouldn't just stop chatting about a topic just because it is off-topic
[20:11:55] arup_r: has joined #ruby
[20:12:09] bap1313: has joined #ruby
[20:12:16] Soda: has joined #ruby
[20:12:33] kadoppe: has joined #ruby
[20:13:04] Dd: has joined #ruby
[20:13:29] Dd: Given "{ int lpathconf(char *path, int name); }" how would I return '2' (for two arguments) in a script?
[20:13:43] lurkmaster: certainty: yesterday i had the same problem and i just reinstalled rails and it solved it. today that doesn't seem to work
[20:13:57] jhass: _d: doesn't sound like ruby
[20:14:19] Dd: jhass: not ruby, but its a file i want ruby to parse
[20:14:25] Dd: so given that as input
[20:14:30] certainty: _d: the general idea is. Parse the text into a datastructure that allows you to count the number of arguments and then return that
[20:14:51] Dd: certainty: yeah how would i count the number of arguments though is what im having trouble with
[20:14:51] jhass: or better yet use an existing C parser
[20:15:00] ruboto: _d, We can't help you without your code, please post it to https://gist.github.com
[20:15:01] certainty: for that task you need code that knows how to decompose your textual representation into the desired one. probably there are several phases
[20:15:24] Dd: jhass: one sec
[20:15:37] certainty: _d: jhass is right. If that's C then you probably can jus reuse a existing parser
[20:15:38] fgo: has joined #ruby
[20:15:45] certainty: it certainly looks like C
[20:15:48] pls-help: has joined #ruby
[20:15:57] Dd: certainty: like which?
[20:16:02] certainty: lurkmaster: what version of bundler is this?
[20:16:04] pls-help: anyone know why I might be getting: 027 > require 'analytics-ruby' LoadError: cannot load such file -- analytics-ruby
[20:16:10] chohe: has joined #ruby
[20:16:17] pls-help: I have the gem installed and in my bundle file
[20:16:26] pls-help: Gemlist* file
[20:16:42] choke: has joined #ruby
[20:16:49] pls-help: I keep getting NameError (uninitialized constant Segment): as if it doesn't know about the gem
[20:17:00] pls-help: both in my project and the console
[20:17:05] certainty: _d: dunno, have a look at https://www.ruby-toolbox.com
[20:17:15] Dd: jhass: certainty this is the file i want to parse https://gist.github.com/anonymous/acef42d3bc3000c4a7b9
[20:17:24] Dd: and this is my script to parse it https://gist.github.com/anonymous/7f6f7f93860b3f7ee97f
[20:17:30] certainty: pls-help: because analytics-ruby is not in your load path?
[20:17:42] jhass: _d: btw gist supports multiple files
[20:17:56] pls-help: @certainty, how do I add it to my load path?
[20:18:00] Dd: jhass: ok..
[20:18:17] lurkmaster: certainty: Bundler version 1.10.6
[20:18:31] pls-help: when I do a gem contents analytics-ruby, I see /.rvm/gems/ruby-2.2.2/gems/analytics-ruby-2.0.12/Gemfile
[20:18:32] Dd: i jut want to count the arguments returned by definition
[20:18:37] certainty: _d: is that from an update right before merge master?
[20:18:37] Dd: @ jhass
[20:18:50] Dd: certainty: no
[20:19:01] Coldblackice: has joined #ruby
[20:19:01] Dd: and sorry if its uglyr uby
[20:19:05] chohe: has joined #ruby
[20:19:07] Dd: not exactly _why :)
[20:19:28] jhass: _d: well, a bit pointless, the class at least. The code runs as it's parsed since it's not inside any method ;)
[20:19:46] Dd: jhass: ok i will rm that
[20:19:53] pls-help: certainty, I'm using rails
[20:19:56] Dd: but it still doesnt solve the problem of the args
[20:20:25] codecodecode123: jhass: Thank you, now my script is working.
[20:20:25] momomomomo: has joined #ruby
[20:20:42] jhass: codecodecode123: great
[20:21:07] yfeldblum: has joined #ruby
[20:21:17] codecodecode123: only remove feature and the paid ones, which are fairly easy
[20:21:32] raju: has joined #ruby
[20:21:54] pls-help: certainty: doesn't rails add gems to your load path automatically?
[20:22:15] certainty: pls-help: i can reproduce the problem
[20:22:22] jhass: _d: I feel like we can write a regex that parses each line to extract the fields you want and the argument list, then just count the ,
[20:22:37] pls-help: certainty: oh, do you think it's a gem issue
[20:22:47] Dd: jhass: yeah but i really have no idea how :p :(
[20:22:53] codecodecode123: im good at regex, tell me what you need and ill give regex
[20:23:34] Dd: jhass: i get it, sorry
[20:24:03] webuser20: has left #ruby: ()
[20:24:47] Dd: codecodecode123: given "int a(int b, char c)" i want 2 as output, or given "char d(float f)" i want 1 as output, etc.
[20:25:46] codecodecode123: _d: can you give more examples for the etc part?
[20:26:15] Dd: codecodecode123: just any argument really
[20:26:28] Dd: doesn't matter what sort of argument, as long as its an argument
[20:26:55] Dd: the type of arguments will all be handled in c later on, this is just to get the arguments at all
[20:27:14] certainty: pls-help: try require "segment"
[20:27:15] juanpaucar: has joined #ruby
[20:27:17] prestorium: has joined #ruby
[20:27:23] Dd: going to have to manually handle each and every system call by hand so that's another 400+ files i'd have to mangle :(
[20:27:41] Dd: is the ruby code so far really bad though, jhass codecodecode123 certainty
[20:27:44] certainty: from what i can tell it provides it's functionality from there
[20:27:47] Dd: this one https://gist.github.com/anonymous/7f6f7f93860b3f7ee97f
[20:28:07] pls-help: certainty: what?
[20:28:19] saddad: has joined #ruby
[20:28:34] codecodecode123: i'm working on regex, cant chek rb code right now
[20:28:47] pls-help: certainty: oh I didn't see your earlier message... let me try
[20:28:59] Dd: takes years to master this
[20:29:22] certainty: everybody stand back! I know regexp!
[20:29:33] pls-help: certainty: that's it! how did you figure that out? also, where do I put that require statement in my rails project?
[20:29:42] jhass: _d: http://rubular.com/r/SDxMP15nFr first rough approach, as said count the , and special case for == "void"
[20:29:59] jhass: _d: slurp the file in as a whole and .scan
[20:30:02] certainty: pls-help: it's the gem structure that told me. That's what zenspider was after when he told you to list the content
[20:30:08] pls-help: certainty: also, how can I add it so it is automatically required by default when I open up a console
[20:30:46] pls-help: certainty: oh, so you got it from seeing /lib/segment.rb?
[20:30:46] certainty: pls-help: in your gemfile (in the rails project) do gem "analytics-ruby", require: "segment"
[20:30:47] mleung: has joined #ruby
[20:30:51] certainty: then it should be there
[20:30:57] certainty: pls-help: yeah that's how gems work
[20:31:04] pls-help: certainty: you're amazing. thanks!
[20:31:18] gdd229: has joined #ruby
[20:31:50] mleung: has joined #ruby
[20:31:54] Dd: jhass: making my entire code base completely useless lol
[20:32:07] gamename: has joined #ruby
[20:32:08] kamyl_: has joined #ruby
[20:32:18] icharlie: has joined #ruby
[20:32:55] jhass: ah, it doesn't handle the UNIMPL ones
[20:32:57] Dd: thanks jhass
[20:33:13] bruno-: has joined #ruby
[20:33:17] jhass: I said first rough version ;)
[20:33:27] Dd: yeah i know, it's cool
[20:33:28] certainty: now you have to further process the arguments
[20:33:31] Dd: you're amazing
[20:33:33] certainty: but that's straight forward
[20:33:47] shevy: certainty is so hyperactive today
[20:33:51] Dd: certainty: yeah that bit is
[20:34:00] certainty: shevy: i drank a coke
[20:34:09] certainty: i only drink tea normally
[20:34:27] codecodecode123: _d: i just realized something, you can do str.split('(')[1].split(" ").length / 2
[20:34:31] htmldrum: has joined #ruby
[20:34:40] weemsledeux: has joined #ruby
[20:34:55] codecodecode123: but be careful for spaces before the closeing parantheses
[20:34:58] jhass: codecodecode123: not really, that fails on the multiline cases already
[20:35:28] Dd: jhass: soryr but is it possible for you to put the script in gist.github.com
[20:35:44] lannonbr: has joined #ruby
[20:35:58] jhass: no, see channel rule 1.3 ;)
[20:36:00] Dd: jhass: because i have no idea how to insert this regexp into the code, or call it with the file given the regex string
[20:36:24] jhass: 210 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int what's with these?
[20:36:39] whooza_: has joined #ruby
[20:36:42] certainty: channel rule 1.3?
[20:36:49] ruboto: Please respect the channel rules: http://ruby-community.com/pages/user_rules
[20:36:57] xet7: has joined #ruby
[20:36:58] icharlie: has joined #ruby
[20:37:07] certainty: alright i see
[20:37:37] shevy: lkmnosys ... this is cthulhu
[20:37:46] Dd: jhass: the syscall number, the audit event, the type, the name, the alternative name and the name of the arguments struct tag.
[20:37:47] jhass: certainty: you can generally decide to do otherwise of course, it's about the demands you can make
[20:38:07] certainty: jhass: jepp I understand
[20:38:25] Dd: jhass: i just want the number, the name, and the number of arguments
[20:38:38] Dd: the rest can go to highgarden
[20:38:39] jhass: _d: yeah, but there are no arguments in that example
[20:38:48] nerium: has joined #ruby
[20:38:52] jhass: not even sure if there's a name tbh
[20:38:54] sphex: has joined #ruby
[20:39:10] Dd: 3 AUE_NULL MNOPROTO { ssize_t read(int fd, char *buf, \ ssize_t nbyte); }
[20:39:22] jhass: 210 AUE_NULL NODEF lkmnosys lkmnosys nosys_args int
[20:39:25] jhass: talking about this one
[20:39:53] jhass: 241 AUE_NULL UNIMPL nosys
[20:39:56] Dd: yeah that's not on the list
[20:40:02] Dd: lkmnosys
[20:40:10] certainty: oh i just saw that there is a parsec gem now
[20:40:15] Dd: 0AUE_NULLMNOPROTO{ int nosys(void); }
[20:40:21] jhass: if we can just skip both of these cases that makes it easy
[20:40:23] Dd: that's the nosys one.
[20:40:58] jhass: 418 AUE_NULL UNIMPL __xstat
[20:41:10] Dd: we can skip those ones.
[20:41:21] einarj: has joined #ruby
[20:41:30] Dd: this one is cleaner http://src.gnu-darwin.org/src/sys/alpha/osf1/syscalls.master
[20:41:35] certainty: next if skip?(line)
[20:42:03] Dd: "The following are reserved for loadable syscalls"
[20:42:19] northfurr: has joined #ruby
[20:42:22] Dd: jhass: that one is unimplemented
[20:42:28] yfeldblum: has joined #ruby
[20:42:31] Dd: UNIMPL is unimplemented/outdated
[20:42:49] jhass: I can infer that much, what I can't infer is whether you need to parse it and what data from it
[20:43:05] Dd: nah, those ones don't need to be parsed
[20:43:13] choke: has joined #ruby
[20:43:19] nertzy: has joined #ruby
[20:43:21] hyy1: has joined #ruby
[20:43:35] Dd: there's no function definition to parse with either, they just exist as old syscalls for completness
[20:43:56] hyy1: how do I program the deaf grandma program?
[20:44:25] shevy: you write the code necessary
[20:44:28] Dd: is that like the traveling salesman problem?
[20:44:41] shevy: the traveling salesman has a grandma
[20:44:49] tkuchiki: has joined #ruby
[20:44:49] decaff: has joined #ruby
[20:44:51] shevy: get to know his family now \o/
[20:45:10] hyy1: it says: Whatever you say to Grandma (w/e you type in), she responds with "HUH?! SPEAK UP, SONNY!" unless you type it all in capital letters
[20:45:23] howdoicomputer: has joined #ruby
[20:45:23] jhass: _d: http://rubular.com/r/UfH14DTe7c
[20:45:30] jhass: I think that's all variations then
[20:45:42] nettoweb: has joined #ruby
[20:45:46] hyy1: so, while str = gets.chomp
[20:45:53] hyy1: is that how to start it?
[20:45:55] shevy: that gets user input into variable str
[20:46:03] shevy: that is one way. this is ruby so there are many ways
[20:46:10] hyy1: but where's the exit condition for the loop?
[20:46:30] shevy: yeah that is your loop
[20:46:38] Dd: jhass: thanks
[20:46:43] Dd: jhass: but soryr, i have another question
[20:46:51] shevy: I would use loop {} get the user input inside, and perform a break when necessary
[20:46:54] Dd: given /^(?<number>\d+)\s+\w+\s+[\w|]+\s+{\s+int\s+(?<name>\w+)\s*\((?<arguments>[^;]+)\);\s*}/m
[20:46:54] certainty: hyy_: the exit condition is that all input is uppercase
[20:47:12] Dd: do i just attach it to the string like string.^(?<number>\d+)\s+\w+\s+[\w|]+\s+{\s+int\s+(?<name>\w+)\s*\((?<arguments>[^;]+)\);\s*} :/
[20:48:14] Dd: nvm, i'll try to figure it out. you've done enough tbh
[20:48:16] Dd: thanks again
[20:48:28] iamninja: has joined #ruby
[20:48:30] hyy1: certainty: no it's not, if that were the case grandma couldn't speak to you anymore after you told her something anymore
[20:48:53] hyy1: the exit condition should be this: is the input "BYE"?
[20:49:16] dfockler: has joined #ruby
[20:49:35] jhass: &ri String#scan
[20:49:35] `derpy: http://www.rubydoc.info/stdlib/core/String#scan-instance_method
[20:49:49] tkuchiki: has joined #ruby
[20:50:05] Dd: jhass: thanks you're really cool
[20:50:25] war_pigs: has joined #ruby
[20:50:45] Dd: best regards
[20:50:51] shevy: hyy_ then use a case when menu and exit upon that input
[20:51:09] shevy: hyy_ you can copy paste that one here http://www.skorks.com/2009/08/how-a-ruby-case-statement-works-and-what-you-can-do-with-it/
[20:51:12] adaedra: you're the coolest jhass
[20:51:23] hyy1: while (str = gets.chomp) != "BYE"
[20:51:27] shevy: you can also use regexes in: when /foo/
[20:51:31] hyy1: can't you just do that?
[20:51:39] jhass: adaedra: mmh, 25??C room temperature, not sure about that
[20:51:40] shevy: looks ugly like shit
[20:52:15] shevy: since there is more than one way in ruby you can have many solutions
[20:52:22] hyy1: shevy: what's "The Ruby way" to do it?
[20:52:28] hyy1: or another way to do it
[20:52:43] shevy: is there a ruby way if there are many ways? I myself would break things up into smaller chunks
[20:53:07] shevy: like, first get the user input, then check on it; in your example you do everything at the same time. If that works for you that is great
[20:56:17] nettoweb: has joined #ruby
[20:56:48] baweaver: has joined #ruby
[20:58:05] chinmay_dd: has joined #ruby
[20:59:05] shevy: hyy_ here is one variant that works https://gist.github.com/shevegen/b01e2097684756582ff5
[21:00:03] certainty: hyy_: well that was just a wild guess :)
[21:00:09] certainty: shevy: there is so much work todo!
[21:00:33] pls-help: I defined a variable called analytics in application.rb, but I can't seem to access it in models/user.rb. Is there a special flag I need to add?
[21:00:46] shevy: certainty yeah, I need me to find some slave hackers
[21:00:56] hyy1: certainty: I've done it!
[21:00:58] pls-help: def analytics @analytics ||= Analytics.new(current_user) end
[21:00:59] hyy1: my program works!
[21:01:14] pls-help: hyy_: congrats!
[21:01:38] hyy1: http://vpaste.net/qlE9r
[21:02:21] yeticry: has joined #ruby
[21:02:41] jgpawletko: has joined #ruby
[21:02:51] tkuchiki: has joined #ruby
[21:03:10] certainty: pls-help: no you don't need a special flag. What's the error method you get?
[21:03:22] Ox0dea: hyy_: Line 7 could just be `if str.upcase!`, but you probably don't need to know about that just yet.
[21:04:16] hyy1: how would I extend it so that if I shout bye 3 times in a row I exit the program but not if I shout bye 2 times then something else?
[21:04:21] axl_: has joined #ruby
[21:04:39] pls-help: certainty: I just tried adding it to ApplicationHelper too, but I'm not having success. I get undefined local variable or method `analytics' for #<User:0x007fd850625630>
[21:04:53] shevy: simply keep track with a variable how often you counted hyy_
[21:05:00] certainty: Ox0dea: would you like to see that in your codebase? I'm not sure. It does the job but also somehow shadows the fact that the nature of that block is a query
[21:05:58] certainty: where by block i don't mean ruby block but rather block of code
[21:06:28] Ox0dea: certainty: I disagree; some bang methods have this behavior precisely so that they can be used in conditionals.
[21:07:02] crdpink2: has joined #ruby
[21:07:15] einarj_: has joined #ruby
[21:08:03] certainty: Ox0dea: i certainly would agree if i wanted to actually upcase the input and as a second task know if it had something to upcase. But the upcasing itself seems to be the prominent action buy this mixture of command and query
[21:08:16] hyy1: http://vpaste.net/WT86G
[21:08:47] shevy: buy this mixture!
[21:08:56] shevy: certainty the alchemist
[21:08:56] hyy1: 0x0dea: I have a question in my code. Can you answer it?
[21:09:08] hyy1: "Why do I have to put 2 instead of 3 here to make the program exit when BYE is shouted 3x
[21:09:10] hyy1: puts "BYE SON!""
[21:09:15] yqt: has joined #ruby
[21:09:55] Devils: has joined #ruby
[21:10:02] phutchins: has joined #ruby
[21:10:02] hyy1: the problem is it is looping and checking when bye_ctr == 0
[21:10:16] andybernard: you didn't put any code except for the random output
[21:10:49] np0: has joined #ruby
[21:10:51] astrobun_: has joined #ruby
[21:11:48] andywojo: has joined #ruby
[21:12:03] baweaver: has joined #ruby
[21:15:09] alphaatom: has joined #ruby
[21:15:27] revoohc: has joined #ruby
[21:15:56] Ox0dea: Command and Query: Tim Toady Edition
[21:16:05] Ox0dea: certainty: You're right, of course. It's generally not the best thing to do.
[21:16:10] Ox0dea: But sometimes it's just the thing.
[21:16:15] alphaatom: has joined #ruby
[21:16:37] finisherr: has joined #ruby
[21:16:40] fgo: has joined #ruby
[21:16:41] einarj: has joined #ruby
[21:17:13] Ox0dea: hyy_: Congratulations! You've learned to play the OBOE.
[21:17:24] shevy: You gain 10 xp.
[21:19:15] certainty: Ox0dea: yeah. I know what you mean
[21:19:22] Ox0dea: hyy_: You check `bye_ctr` only when the user has entered "BYE"; thus, when `bye_ctr` is 2 and they say "BYE" again, it's the third time.
[21:19:32] hyy1: 0x0dea that's what I said! :)
[21:20:01] hyy1: the problem is it is looping and checking when bye_ctr == 0
[21:20:17] hyy1: ^^ that's what I said
[21:20:32] shellie_: has joined #ruby
[21:20:46] Ox0dea: hyy_: If you wish to say 3 instead of 2, increment `bye_ctr` *before* checking its value.
[21:20:57] hyy1: first iteration of user inputting BYE is when bye_ctr == 0
[21:21:00] ledestin: has joined #ruby
[21:21:04] hyy1: so it checks when bye_ctr == 0
[21:21:12] hyy1: now do I make sense?
[21:21:40] Ox0dea: You never compare `bye_ctr` with 0.
[21:21:43] shevy: https://rubygems.org/gems/rails/versions wheeee... rails 0.8.0 was so tiny ... October 25, 2004 (20.5 KB)
[21:21:43] veduardo_: has joined #ruby
[21:21:58] hyy1: lol yes I do
[21:22:15] Ox0dea: hyy_: Please note well the distinction between `=` and `==`.
[21:22:26] blarghlarghl: Rake.application.tasks.first.scope #=> LL("my_task") why would this be happening? and what the heck is "LL"?
[21:22:38] Ox0dea: blarghlarghl: It's a linked list.
[21:22:49] hyy1: 0x0dea: I did note that distinction :-P
[21:23:06] Ox0dea: hyy_: Then would you mind pointing out where in your code you're comparing `bye_ctr` with 0?
[21:23:17] hyy1: OH, I see
[21:23:45] axl_: has left #ruby: ()
[21:23:50] renderful: has joined #ruby
[21:23:54] hyy1: but on the first time the user enters BYE it does this for bye_ctr: 0 == 2
[21:24:08] Ox0dea: Yes, that's right.
[21:24:11] blarghlarghl: Ox0dea: Thanks :) Moment of stupid.
[21:24:16] Ox0dea: No worries.
[21:24:35] arooni-mobile: has joined #ruby
[21:25:00] Ox0dea: hyy_: Better, I think, would be to increment `bye_ctr` immediately, such that that comparison is instead 1 == 3.
[21:25:09] howdoicomputer: has joined #ruby
[21:25:11] hyy1: 0x0dea: that's what I thought as well
[21:25:16] hyy1: but I haven't made that change yet
[21:25:33] hyy1: I wondered if that would work
[21:25:37] Ox0dea: Indeed it would.
[21:26:39] arooni-mobile: has joined #ruby
[21:27:00] hyy1: ok how do I make when saying BYE it does not say "NO, NOT SINCE " ...?
[21:27:22] Ox0dea: More conditionals! Condition all the things!
[21:27:29] baweaver: has joined #ruby
[21:27:49] einarj: has joined #ruby
[21:27:58] Ox0dea: hyy_: I see you've learned `break`; how about `next`?
[21:28:01] dopamean_: has joined #ruby
[21:28:20] Dd: has joined #ruby
[21:28:44] Dd: sorry, jhass (or anyone) but given "/^(?<number>\d+)\s+\w+\s+\w+\s+{\s+int\s+(?<name>\w+)\s*\((?<arguments>[^;]+)\);\s*}/m"
[21:28:48] hyy1: 0x0dea: next should start the next iteration of the loop immediately
[21:28:54] Dd: how do i match void as well as int
[21:28:57] Ox0dea: hyy_: That's exactly right.
[21:29:02] Dd: with the name instance
[21:29:28] jhass: _d: that is meant to give you arguments which you should process further
[21:29:42] bronson: has joined #ruby
[21:29:42] hyy1: but I'm getting angry, I have 'str != str.upcase || str != "BYE"' to try and make it say nothing when you enter BYE in there
[21:29:45] astrobun_: has joined #ruby
[21:29:53] Dd: jhass: when i print `number` it doesn't output those with types like void or ssize_t
[21:29:55] hyy1: but it doesn't work
[21:30:13] ruboto: _d, We can't help you without your code, please post it to https://gist.github.com
[21:30:56] hyy1: got it fixed with a nested if
[21:31:03] anon: has joined #ruby
[21:31:05] ta: has joined #ruby
[21:31:17] Ox0dea: hyy_: But... next?
[21:31:33] Ox0dea: You really ought to stick a `next` in the appropriate place for this one.
[21:31:36] bronson: has joined #ruby
[21:31:42] hyy1: 0x0dea if str == "BYE" next
[21:31:59] Ox0dea: Bit early.
[21:32:25] Dd: jhass: https://gist.github.com/anonymous/877a6b08bc0ed84f8881
[21:33:00] jhass: _d: again, you should read the file entirely, not linewise and run scan on it
[21:33:11] Dd: jhass: ok
[21:33:23] hyy1: 0x0dea: this ok? http://vpaste.net/QoIIX
[21:33:44] shevy: hyy_ you can simplify a bit
[21:33:46] shevy: bye_ctr = bye_ctr + 1
[21:33:50] shevy: bye_ctr += 1
[21:33:52] bronson: has joined #ruby
[21:33:59] Ox0dea: shevy: But that's implicit behavior!
[21:34:02] bruno-: has joined #ruby
[21:34:05] lannonbr: has joined #ruby
[21:34:06] Ox0dea: Naughty, naughty.
[21:34:23] shevy: assignment
[21:34:29] andybernard: hyy_ you got a while issue there
[21:34:34] Ox0dea: shevy: Compound assignment, though.
[21:34:42] arooni-mobile: has joined #ruby
[21:34:42] choke: has joined #ruby
[21:34:58] shevy: you always try to make things complicated!
[21:35:02] baweaver: has joined #ruby
[21:35:12] Ox0dea: You're the one that suggested this crazy += operator!
[21:35:14] timanema: has joined #ruby
[21:35:15] shevy: except for your readline code
[21:35:18] shevy: that was brilliant
[21:35:20] hyy1: andybernard: what while issue? it's supposed to loop indefinetly until the user enters BYE 3 times
[21:35:22] Maletor: has joined #ruby
[21:35:39] andybernard: yeah sorry my bad :p I saw that one equals and didnt read the rest
[21:35:55] haylon: has joined #ruby
[21:35:57] andybernard: my instinctual programmerness told me it was wrong
[21:36:08] hyy1: ooh ooh let's do leap years!
[21:36:21] haylon: Am I able to require a gem in a def function, or woudl that break something?
[21:36:30] Ox0dea: haylon: Nope, works just fine.
[21:36:38] shevy: haylon you can require it anywhere, but the best is to require on top usually
[21:36:42] bronson: has joined #ruby
[21:36:43] devoldmx: has joined #ruby
[21:36:54] Ox0dea: You should only require elsewhere if it's conditional.
[21:36:59] haylon: Ok, I'm just trying to think of a way to make ti load only the external library when I need it
[21:37:06] shevy: sometimes you may have to do in a method... I do that when I disable or enable colour support
[21:37:36] shevy: haylon have you looked at autoload?
[21:37:40] haylon: I have not
[21:38:09] nettoweb: has joined #ruby
[21:38:27] bronson: has joined #ruby
[21:38:29] shevy: haylon this is an ok summary I think: http://ablogaboutcode.com/2011/01/17/ruby-autoloading-explained/
[21:38:34] allcentury: has joined #ruby
[21:38:40] shevy: nope wrong link sorry a moment
[21:39:00] bstrrm: has joined #ruby
[21:39:09] haylon: I found one on RubyInsider
[21:40:05] DelDotB: has joined #ruby
[21:40:20] shevy: yeah, autoload :NameOfTheConstantHere, 'path/bla.rb'
[21:40:23] bronson: has joined #ruby
[21:40:31] nitenq: has joined #ruby
[21:40:45] shevy: http://ruby-doc.org/core-2.1.0/Module.html#method-i-autoload
[21:40:57] shevy: The docu is so tiny :(
[21:41:09] beefcakeba: has joined #ruby
[21:41:23] hyy1: if (start_year % 4 == 0) && !(start_year % 100 == 0) || (start_year % 400 == 0)
[21:41:33] nitenq: Hi there, I am trying to install on a OSX client a specific gem who needs ruby-dev and ruby >= 1.9 . It doesn???t have any access to internet and has only 1.8 install on it and not even ruby-dev. Is there a way to get through this
[21:41:42] ght: You doing the whole leap year check?
[21:41:42] hyy1: is this the correct way to calculate leap years?
[21:41:46] hyy1: ght: yes
[21:41:55] ght: hyy: I have code where I did this manually, hang on.
[21:42:06] baweaver: nitenq: plug it into the internet.
[21:42:22] bronson: has joined #ruby
[21:42:52] baweaver: Could you theoretically hack it? Yes, but it would be far far worse for it.
[21:43:02] shevy: nitenq you can rebuild the .gem by changing the .gemspec file
[21:43:06] ght: hyy_: Here you go - https://gist.github.com/anonymous/78511251e81fa031bc67
[21:43:16] ght: That's some old code, now I just use DateTime / Date objects.
[21:43:25] nitenq: shevy: what do you mean ?
[21:43:27] baweaver: so why can't you connect to the internet?
[21:43:28] ght: But back before I knew to do that, I did a lot of manual date manipulation.
[21:43:46] ght: when 2 is when month is 2, to determine how many days are in feb
[21:43:52] baweaver: there's a reason they lock versions on those, I would not do that if I were you.
[21:44:00] nitenq: shevy: actually I can???t install any gem cause I don???t have ruby-dev installed. Is it an issue ?
[21:44:02] baweaver: besides, 1.8.x has serious breaking changes
[21:44:09] bronson: has joined #ruby
[21:44:17] baweaver: why can you not get online?
[21:44:33] nitenq: baweaver: I can connect it to the internet
[21:44:43] baweaver: then do it, problem solved
[21:44:50] baweaver: trying to hack this is a bad idea
[21:45:02] baweaver: define can't
[21:45:36] BraddPitt: gem-dependent project development without internet connection is not going to be fun
[21:45:44] nitenq: baweaver: ? It???s impossible to connect it to the internet
[21:46:02] bronson: has joined #ruby
[21:46:05] nitenq: cause it???s in a company who doesn???t allow this machine to access internet
[21:46:30] BraddPitt: you can put the ruby install on a usb drive
[21:46:37] baweaver: tell security you're SOL without it
[21:46:39] shevy: nitenq I don't know what is ruby-dev
[21:46:53] ght: I not know computer pls to halp
[21:46:55] baweaver: the hackery required to get around it will be far worse than forcing NetSec to be reasonable.
[21:47:14] shevy: nitenq in regards to rebuilding a .gem, the .gemspec specifies things such as minimal ruby version required. you can edit that line, then rebuild a new .gem from the .gemspec file
[21:47:15] ght: The "hackery"
[21:47:28] CloCkWeRX: has joined #ruby
[21:47:32] baweaver: shevy: for 1.8? Don't
[21:47:40] verdoc: has joined #ruby
[21:47:40] ght: You mean deploying a remote ssh tunnel listening on 443/tcp so that sysadmins think you're just grabbing https traffic?
[21:47:49] ght: Which is what I did previously to bypass our content filter.
[21:47:52] shevy: I am using ruby 2.2.3
[21:47:58] bronson: has joined #ruby
[21:48:00] baweaver: they're not
[21:48:14] baweaver: compiling down to 1.8 for gems will fail
[21:48:24] baweaver: and if not, will have extremely annoying bugs
[21:48:32] rapest: has joined #ruby
[21:48:36] nitenq: baweaver: there is no way to connect it to the internet. However it is connected to another machine who does have internet access
[21:49:06] ftj: has joined #ruby
[21:49:15] baweaver: Connection bridging is viable.
[21:49:46] bronson: has joined #ruby
[21:49:55] hyy1: ght: how's this? http://vpaste.net/aX7kL
[21:50:01] lkba: has joined #ruby
[21:50:03] sphex_: has joined #ruby
[21:51:29] adaedra: or tunelling.
[21:51:32] baweaver: Look into connection bridging or SSH tunneling
[21:51:41] baweaver: bridging will be easier
[21:51:43] bronson: has joined #ruby
[21:51:51] baweaver: especially if you don't know what ssh tunneling is
[21:53:39] bronson: has joined #ruby
[21:53:48] juanpaucar: has joined #ruby
[21:53:51] ta: has joined #ruby
[21:54:20] verdoc: can someone explain why using "--version" on the optparse example from ruby-doc.org isn't working please? http://pastebin.com/Tc2nJiKC
[21:54:20] ruboto: verdoc, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/cf87b9c57fc4fa502ba8
[21:54:20] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[21:55:00] roolo: has joined #ruby
[21:55:05] beef-wellington: has joined #ruby
[21:55:28] bronson: has joined #ruby
[21:56:55] felltir: has joined #ruby
[21:57:03] Thermatix: has joined #ruby
[21:57:45] bronson: has joined #ruby
[21:59:38] bronson: has joined #ruby
[22:01:19] einarj_: has joined #ruby
[22:01:31] bronson: has joined #ruby
[22:02:30] Randroid: has joined #ruby
[22:02:38] jhass: verdoc: how do you run it?
[22:03:22] bronson: has joined #ruby
[22:03:25] jhass: verdoc: alternatively expand on "not working"
[22:04:05] bruno-: has joined #ruby
[22:04:28] zenspider: what'd I miss?
[22:04:31] zenspider: lots of excitment I hope
[22:04:56] zenspider: ugh. don't use OpenStruct
[22:05:19] bronson: has joined #ruby
[22:05:55] CBX: has joined #ruby
[22:06:21] sgambino: has joined #ruby
[22:06:37] jhass: zenspider: send a doc patch I guess :P
[22:07:08] bronson: has joined #ruby
[22:07:37] verdoc: jhass: look at either the pastebin or gist
[22:08:18] zenspider: jhass: doc patch?
[22:08:22] jhass: oh, totally interpreted the comment as noise
[22:08:34] jhass: verdoc: where do you expect Version to come from?
[22:08:37] zenspider: oh, you mean against openstruct itself...? not a terrible idea
[22:08:55] jhass: zenspider: http://ruby-doc.org/stdlib-2.2.3/libdoc/optparse/rdoc/OptParse.html#class-OptParse-label-Complete+example
[22:09:02] bronson: has joined #ruby
[22:09:20] verdoc: jhass: good question, but it's not a working complete example is it?
[22:09:42] dfockler: just leave a comment in a module - "Don't use this module"
[22:10:13] zenspider: not every ruby example is meant to be 100% standalone
[22:10:28] jhass: verdoc: yeah idk, time for your first contribution to Ruby I guess :P
[22:10:46] jhass: zenspider: states "The following example is a complete Ruby program. You can run it and see the effect of specifying various options." though
[22:11:02] bronson: has joined #ruby
[22:11:07] abdulrehman: has joined #ruby
[22:11:25] mikecmpbll: has joined #ruby
[22:11:40] zenspider: hah. well... I'll shut up now :)
[22:11:58] baweaver: has joined #ruby
[22:12:36] nofxx: has joined #ruby
[22:12:48] bronson: has joined #ruby
[22:13:28] dgutierrez1287: has joined #ruby
[22:13:31] zenspider: that is some seriously contrived shit. "Specific Options" vs "Common Options", OpenStruct, octal??? ugh
[22:14:45] bronson: has joined #ruby
[22:16:15] verdoc: jhass / zenspider - what would you change to fix it?
[22:16:38] bronson: has joined #ruby
[22:16:40] jhass: either define Version or don't reference it
[22:17:26] dimasg: has joined #ruby
[22:17:31] Anon_: has joined #ruby
[22:17:47] fgo: has joined #ruby
[22:17:56] radgeRayden_: has joined #ruby
[22:18:47] zenspider: nuke the :: and define it at the top w/ the other constants. it's dumb to begin with, but having the example have Version defined outside is even dumber
[22:18:53] bronson: has joined #ruby
[22:18:58] jeanlinux: has joined #ruby
[22:20:22] bronson: has joined #ruby
[22:21:15] jackjackdripper1: has joined #ruby
[22:21:49] jackjackdripper1: has joined #ruby
[22:22:06] Soda: has joined #ruby
[22:22:19] bronson: has joined #ruby
[22:22:51] andybernard: has joined #ruby
[22:22:58] mary5030_: has joined #ruby
[22:23:01] Asher: has joined #ruby
[22:23:23] ngscheurich: has joined #ruby
[22:24:08] bronson: has joined #ruby
[22:25:59] doublemalt_: has joined #ruby
[22:26:01] bronson: has joined #ruby
[22:26:02] verdoc: jhass & zenspider - thanks
[22:28:01] bronson: has joined #ruby
[22:29:41] lkba_: has joined #ruby
[22:29:47] bronson: has joined #ruby
[22:30:34] ckinniburgh_: has joined #ruby
[22:30:53] WillAmes: has joined #ruby
[22:31:40] bronson: has joined #ruby
[22:31:40] einarj: has joined #ruby
[22:33:34] tkuchiki: has joined #ruby
[22:33:52] bronson: has joined #ruby
[22:34:25] choke: has joined #ruby
[22:35:26] xet7_: has joined #ruby
[22:35:44] bronson: has joined #ruby
[22:36:59] nitenq: has joined #ruby
[22:37:36] bronson: has joined #ruby
[22:39:31] bronson: has joined #ruby
[22:41:23] bronson: has joined #ruby
[22:43:15] bronson: has joined #ruby
[22:43:47] Maletor: has joined #ruby
[22:45:12] bronson: has joined #ruby
[22:47:01] bronson: has joined #ruby
[22:48:55] bronson: has joined #ruby
[22:49:37] phutchins: has joined #ruby
[22:50:52] bronson: has joined #ruby
[22:51:52] dopie: has joined #ruby
[22:52:19] mois3x: has joined #ruby
[22:52:42] bronson: has joined #ruby
[22:53:18] war_pigs: has joined #ruby
[22:54:34] bronson: has joined #ruby
[22:55:12] jenrzzz: has joined #ruby
[22:56:30] bronson: has joined #ruby
[22:56:51] felltir: has joined #ruby
[22:57:10] chohe: has joined #ruby
[22:58:20] bronson: has joined #ruby
[23:00:16] bronson: has joined #ruby
[23:01:12] shevy: I have sort of inherited this code from before ~2009; https://gist.github.com/shevegen/b083b15ad6900dd0037b - would you rewrite the :foo => syntax to a foo: syntax? (There are more examples like that)
[23:01:36] Zackio: has joined #ruby
[23:02:11] bronson: has joined #ruby
[23:02:39] pontiki: i wouldn't, particularly
[23:04:03] bronson: has joined #ruby
[23:05:54] bronson: has joined #ruby
[23:07:04] renanoronfle: has joined #ruby
[23:07:28] zenspider: shevy: absolutely not. much harder to keep the columns aligned
[23:07:39] decaff: has joined #ruby
[23:07:45] nerium: has joined #ruby
[23:07:54] bronson: has joined #ruby
[23:09:08] einarj_: has joined #ruby
[23:09:42] bronson: has joined #ruby
[23:09:58] postmodern: what is the real intended purpose of the === operator?
[23:10:02] mois3x: has joined #ruby
[23:10:34] apeiros: postmodern: docs say that quite straight away: "Case Equality"
[23:10:40] apeiros: so purpose is case/when
[23:11:13] apeiros: and some methods hook into the same mechanic, like Enumerable#grep
[23:11:36] bronson: has joined #ruby
[23:12:13] banister: it's more 'matches' rather than equality
[23:13:30] bronson: has joined #ruby
[23:14:20] baweaver: has joined #ruby
[23:15:19] bronson: has joined #ruby
[23:17:13] bronson: has joined #ruby
[23:17:15] revoohc: has joined #ruby
[23:17:44] stardiviner: has joined #ruby
[23:18:55] fgo: has joined #ruby
[23:19:14] bronson: has joined #ruby
[23:20:17] jhack: damn, just binge watched Mr.Robot
[23:20:21] jhack: shows amazing
[23:20:31] charliesome: has joined #ruby
[23:20:36] fedexo: has joined #ruby
[23:21:01] bronson: has joined #ruby
[23:21:10] jhack: also, is there a softwaredev channel?
[23:21:15] einarj: has joined #ruby
[23:21:28] banister: jhack ugh, i thought it ws stupid
[23:21:41] jhack: banister: really?
[23:22:01] banister: jhack Yes, i'm not interested in some emotionally stunted dude with aspgers
[23:22:18] banister: and his little 'speech' made me cringe, just a flood of cliches
[23:22:20] ndrei: has joined #ruby
[23:22:20] jhack: banister: HAHA, yeah the main characters pretty awkard as fuck
[23:22:52] bronson: has joined #ruby
[23:23:09] banister: everything about the show is just stupid, IMO, obvious, unintesting, cliche, and badly written and acted
[23:23:48] davedev24: has joined #ruby
[23:24:13] tkuchiki: has joined #ruby
[23:24:53] bronson: has joined #ruby
[23:26:36] EminenceHC: has joined #ruby
[23:26:38] bronson: has joined #ruby
[23:26:52] haylon: has joined #ruby
[23:27:03] baweaver: banister: thank you
[23:27:04] jhack: banister: any interesting shows youd recommend?
[23:27:47] baweaver: As a guy with aspergers, that guy makes my skin crawl
[23:27:57] haylon: If I wanted to go through the pain of compiling and installing ruby by hand without the use of RVM, what are some of the libraries or extensions I'd need to make it work as close to what RVM does? I know I need readline,, bu some of the others, I'm not sure of.
[23:28:03] banister: jhack i watch this one https://en.wikipedia.org/wiki/Tribe_(TV_series)
[23:28:35] bronson: has joined #ruby
[23:29:51] baweaver: wget it, tar -zxvf it, sudo make && sudo make install
[23:30:04] DelDotB: has joined #ruby
[23:30:07] baweaver: probably only gcc, though could be wrong.
[23:30:11] baweaver: haven't bothered.
[23:30:30] bronson: has joined #ruby
[23:31:40] sarkyniin: has joined #ruby
[23:32:18] bronson: has joined #ruby
[23:32:59] Coldblackice: has joined #ruby
[23:33:00] baweaver: banister: people don't understand why that show bugs me so much, and I just can't put it into words why.
[23:33:14] Ilyes512: has joined #ruby
[23:33:54] choke: has joined #ruby
[23:34:13] bronson: has joined #ruby
[23:34:29] banister: baweaver i tried pretty hard to like it but it annoyed me so much i gave up. Plenty of better stuff out there IMO
[23:35:13] baweaver: Yeah. If you want super genius with aspergers, Sherlock, The Imitation Game, Big Bang Theory, and others do a much better job.
[23:35:19] Rubie: has joined #ruby
[23:35:25] ecksit: has joined #ruby
[23:35:44] baweaver: not confirmed per se, but not a hard leap to make
[23:35:52] haylon: I ususally use RVM, but I'm trying to get it installed manually
[23:35:58] haylon: so i can do it on a platform taht RVM doesn't support
[23:36:04] haylon: like RHEL 4/5
[23:36:08] bronson: has joined #ruby
[23:36:15] baweaver: You did see me mention it above right?
[23:36:42] zenspider: YAY! I have rubysdl hacked down to 1 file and I can start over cleanly
[23:36:49] luckyme: has joined #ruby
[23:37:00] baweaver: ACTION claps
[23:37:10] ndrei: has joined #ruby
[23:37:19] baweaver: ACTION non-ironically or sarcastically claps
[23:37:27] devoldmx: has joined #ruby
[23:37:59] bronson: has joined #ruby
[23:38:00] revoohc: has joined #ruby
[23:38:15] shevy: swing the beaver tail for clap!
[23:38:23] zenspider: ~3800 lines to go. :/
[23:38:38] zenspider: tho it's gonna take a while to get traction... I should be able to get to first pixel pretty quickly
[23:39:55] bronson: has joined #ruby
[23:40:06] neilnorthrop: has joined #ruby
[23:41:39] user1138: has joined #ruby
[23:41:51] bronson: has joined #ruby
[23:43:07] roolo: has joined #ruby
[23:43:28] tkuchiki: has joined #ruby
[23:43:40] bronson: has joined #ruby
[23:44:20] edwinvdgraaf: has joined #ruby
[23:44:51] shevy: yay for zenspider-games in ruby \o/
[23:44:54] bruno-: has joined #ruby
[23:45:32] bronson: has joined #ruby
[23:46:45] edwinvdgraaf: has joined #ruby
[23:47:27] bronson: has joined #ruby
[23:48:53] northfurr: has joined #ruby
[23:49:17] bronson: has joined #ruby
[23:50:17] northfurr: has joined #ruby
[23:50:28] mary5030: has joined #ruby
[23:50:42] edwinvdg_: has joined #ruby
[23:51:14] bronson: has joined #ruby
[23:51:17] einarj: has joined #ruby
[23:51:29] rapest: has joined #ruby
[23:53:08] helpa: has joined #ruby
[23:54:57] bronson: has joined #ruby
[23:56:54] bronson: has joined #ruby
[23:57:10] [H]unt3r: has joined #ruby
[23:58:18] webopsx: has joined #ruby
[23:58:50] lolsregginyag: has joined #ruby
[23:58:51] bronson: has joined #ruby
[23:58:54] lolsregginyag: can i have a fully fledged cpanel running on my localhost that's not connected to the internet?
[23:59:43] andybernard: has joined #ruby