« Back to channel list

#ruby - 07 July 2015

« Back 1 day Forward 1 day »
[00:00:52] hahuang65: has joined #ruby
[00:05:41] tkuchiki: has joined #ruby
[00:08:49] Feyn: has joined #ruby
[00:10:00] j_mcnally: has joined #ruby
[00:10:25] j_mcnally: what are the cool kids using to generate new gems these days
[00:10:33] j_mcnally: is bundler still the defacto generator?
[00:11:24] baweaver: avoid x-posting by the way
[00:11:29] phat4life: has joined #ruby
[00:11:30] baweaver: some people are touchy on that.
[00:11:50] mistermocha: has joined #ruby
[00:11:57] ledestin: has joined #ruby
[00:13:08] Musashi007: has joined #ruby
[00:13:52] jesterfraud: has joined #ruby
[00:14:39] sevenseacat: has joined #ruby
[00:15:16] Ropeney: has joined #ruby
[00:19:59] eggoez: has joined #ruby
[00:20:03] devdazed: has joined #ruby
[00:20:27] Sid05: has joined #ruby
[00:20:50] CloCkWeRX: has joined #ruby
[00:20:53] Aswebb_: has joined #ruby
[00:22:16] swgillespie: has joined #ruby
[00:22:27] freerobby: has joined #ruby
[00:23:07] DexterLB: has joined #ruby
[00:23:45] shevy: awww where is arup_r now
[00:23:55] shevy: sevenseacat is awake \o/
[00:24:06] sevenseacat: well... kinda
[00:25:35] jesterfraud: sevenseacat I don't even pretend to be awake before midday
[00:25:57] sevenseacat: I say kinda because its 8.25am and I have had no caffeine
[00:26:17] bullcitydev: has joined #ruby
[00:26:28] jesterfraud: I keep forgetting you're GMT+8, not GMT+10
[00:26:44] jesterfraud: I'll let you in on a secret - the next two hours are a rollercoaster ride
[00:26:57] sevenseacat: i like rollercoasters.
[00:27:19] jesterfraud: then you'll love the next two hours
[00:28:29] shazaum_: has joined #ruby
[00:30:43] momomomomo: has joined #ruby
[00:31:35] michael_mbp: has joined #ruby
[00:32:52] Papierkorb: I have a host name like: www.google.com. Anyone knows a smart split regex so I get this: ["www.google.com", "google.com", "com"] ?
[00:33:32] Radar: Papierkorb: lol regex
[00:33:39] Radar: URI.parse("www.google.com")
[00:33:46] tmtwd: has joined #ruby
[00:33:59] Papierkorb: yes I get that string from URI(..).host
[00:34:40] Radar: What problem are you trying to solve here?
[00:34:43] Papierkorb: The point is that I get an array with a (sub-)domain removed per element
[00:34:46] eam: Papierkorb: split "." will give you all the names, you can join 'em together as you wish
[00:35:11] blackmes1: has joined #ruby
[00:35:43] eam: >> "foo.bar.baz.cx".split(?.)[1..-1].join ?.
[00:35:44] ruboto: eam # => "bar.baz.cx" (https://eval.in/393764)
[00:35:51] Papierkorb: currently tinkering with my irc bot. I want to give rules for specific URLs to look up, and i want the rule for "youtube.com" also to match "www.youtube.com". Cheating is not allowed, as services like deviantart give each user a subdomain on their own ;)
[00:37:24] jlast: has joined #ruby
[00:37:56] Papierkorb: There's a short-cut for single character strings? oh man
[00:37:57] keen__________13: has joined #ruby
[00:38:00] RegulationD: has joined #ruby
[00:38:26] Darkwater: which is really weird imo
[00:39:27] PotatoCrisps: has joined #ruby
[00:39:41] Oog: has joined #ruby
[00:42:24] ruboto: shevy # => "l" (https://eval.in/393765)
[00:42:38] shevy: saved one char!
[00:42:40] pen: has joined #ruby
[00:42:45] shevy: save the forests... save the keyboards
[00:43:22] Sid05: has joined #ruby
[00:43:26] fmcgeough: has joined #ruby
[00:44:02] Sid05: has joined #ruby
[00:44:41] jlast_: has joined #ruby
[00:44:46] Zamyatin: has joined #ruby
[00:45:02] eam: it doesn't concat at parse time though, which is a bummer
[00:45:06] eam: >> ?? ??
[00:45:07] ruboto: eam # => /tmp/execpad-151bd5a1e066/source-151bd5a1e066:2: warning: invalid character syntax; use ?\n ...check link for more (https://eval.in/393766)
[00:45:13] eam: >> "?" "?"
[00:45:14] ruboto: eam # => "??" (https://eval.in/393767)
[00:45:31] ruboto: Papierkorb # => "?" (https://eval.in/393768)
[00:46:36] jlast: has joined #ruby
[00:47:27] gambl0re: has joined #ruby
[00:47:48] eam: >> $VERBOSE=nil or eval "????::??"
[00:47:49] ruboto: eam # => ":" (https://eval.in/393769)
[00:48:19] jlast_: has joined #ruby
[00:48:57] RegulationD: has joined #ruby
[00:49:33] Papierkorb: >> a = "www.google.com"; a.count('.').times.to_a.map{|i| a.split(/(?<=\.)/)[(i + 1)..-1].join}
[00:49:34] ruboto: Papierkorb # => ["google.com", "com"] (https://eval.in/393770)
[00:49:57] Papierkorb: >> a = "www.google.com"; a.count('.').times.to_a.map{|i| a.split(/(?<=\.)/)[i..-1].join}
[00:49:58] ruboto: Papierkorb # => ["www.google.com", "google.com"] (https://eval.in/393771)
[00:50:10] jlast: has joined #ruby
[00:51:20] Lucky_: has joined #ruby
[00:51:59] jlast: has joined #ruby
[00:53:09] jesterfraud: what's the difference between /\Ablah\z/ and /\Ablah\Z/?
[00:53:34] JeramyRR: has joined #ruby
[00:53:43] hoelzro: jesterfraud: \Z matches an optional newline
[00:53:45] sevenseacat: I've only seen the former I think
[00:53:56] Radar: hoelzro beat me to it
[00:53:56] jlast: has joined #ruby
[00:54:07] Radar: http://rick.measham.id.au/paste/explain.pl?regex=%5CAthing%5CZ
[00:54:08] jesterfraud: hoelzro: thanks
[00:54:35] sevenseacat: Radar: whoa at that page
[00:54:53] sevenseacat: is it ruby-specific?
[00:55:42] jlast_: has joined #ruby
[00:56:02] eam: sevenseacat: it's perl specific :)
[00:56:08] eam: http://rick.measham.id.au/paste/explain.pl?regex=%28%3F%7B%7Bfoo%7D%7D%29
[00:56:29] rushed: has joined #ruby
[00:56:40] sevenseacat: should have guessed that from the url
[00:57:12] bricker: Thinking about the implementation of that... it must use a regex to parse the regex
[00:57:35] sevenseacat: that hurts my brain
[00:57:37] jlast: has joined #ruby
[00:57:44] bricker: so... many... backslashes...
[00:57:52] ebbflowgo: has joined #ruby
[00:59:04] eam: maybe it just compiles the regex and looks at the result
[00:59:25] jlast_: has joined #ruby
[01:00:38] bruno-: has joined #ruby
[01:01:12] jlast: has joined #ruby
[01:01:32] dgutierrez1287: has joined #ruby
[01:02:27] stardiviner: has joined #ruby
[01:02:30] bmurt: has joined #ruby
[01:02:40] tkuchiki: has joined #ruby
[01:02:44] dseitz: has joined #ruby
[01:03:03] jlast_: has joined #ruby
[01:04:24] ivanskie: has joined #ruby
[01:05:01] jlast: has joined #ruby
[01:05:38] allomov: has joined #ruby
[01:06:42] jlast: has joined #ruby
[01:07:08] Oog: has joined #ruby
[01:08:33] jlast_: has joined #ruby
[01:09:17] Pupeno: has joined #ruby
[01:10:07] mary5030: has joined #ruby
[01:10:11] devbug: has joined #ruby
[01:10:22] jlast: has joined #ruby
[01:10:49] jesterfraud: maybe it uses an xml parser. http://stackoverflow.com/a/1732454/201487
[01:11:58] eam: perl -wle'use re Debug => "PARSE"; /foo|bar/'
[01:12:15] jlast: has joined #ruby
[01:14:03] eam: you actually can parse html with regex; indeed pretty much every parser uses a regex engine for sub-expressions
[01:14:12] jlast: has joined #ruby
[01:14:28] Lucky_: has joined #ruby
[01:14:42] eam: it's more accurate to say you can't parse it with only one regex
[01:15:00] dgutierrez1287: has joined #ruby
[01:15:14] mistermocha: has joined #ruby
[01:15:22] Scroff: has joined #ruby
[01:15:52] sepp2k: has joined #ruby
[01:15:55] jlast: has joined #ruby
[01:16:03] penzur: has joined #ruby
[01:17:44] jlast: has joined #ruby
[01:18:15] jesterfraud: I think it's more a feasibility than a possibility issue
[01:19:29] rbennacer: has joined #ruby
[01:19:43] jlast_: has joined #ruby
[01:19:49] eam: it is feasible though -- pretty much everyone does it
[01:21:25] jlast: has joined #ruby
[01:21:40] baweaver: has joined #ruby
[01:21:58] bruno-: has joined #ruby
[01:23:23] stardiviner: has joined #ruby
[01:23:24] jlast: has joined #ruby
[01:25:04] jlast: has joined #ruby
[01:25:54] scrudrv: has joined #ruby
[01:26:11] ivanskie: has joined #ruby
[01:26:57] jlast_: has joined #ruby
[01:27:01] jesterfraud: people want it for a quick and dirty though, in general
[01:27:10] jesterfraud: browsers don't :P
[01:28:18] Hobogrammer: has joined #ruby
[01:28:49] jlast: has joined #ruby
[01:29:21] eam: jesterfraud: what I'm saying is that lex(1), the C lexing utility, uses regexes to describe the parsing engine
[01:30:17] eam: rubys own grammar is defined (in part) using regexes
[01:30:28] eam: take a look in https://github.com/ruby/ruby/blob/trunk/parse.y
[01:30:35] jlast_: has joined #ruby
[01:30:50] jesterfraud: yeah, that's fine
[01:30:55] eam: it's totally fine to use regexes in conjunction with a state machine to parse arbitrary complexity stuff
[01:31:12] jesterfraud: but assuming valid html is a big assumption
[01:31:22] jesterfraud: among other complexities - are you allowing for HTML entities?
[01:31:25] jesterfraud: that kind of thing
[01:32:16] JeramyRR: has joined #ruby
[01:32:22] symbol: has joined #ruby
[01:32:28] jlast: has joined #ruby
[01:33:00] dgutierrez1287: has joined #ruby
[01:34:06] Channel6: has joined #ruby
[01:34:29] jlast_: has joined #ruby
[01:35:43] eam: jesterfraud: libxml2 is implemented with regexes, for example
[01:36:07] jlast: has joined #ruby
[01:38:09] jlast_: has joined #ruby
[01:38:45] hahuang65: has joined #ruby
[01:39:01] i8igmac: has joined #ruby
[01:39:34] Spami: has joined #ruby
[01:39:53] jlast: has joined #ruby
[01:41:10] _blizzy_: has joined #ruby
[01:41:45] jlast: has joined #ruby
[01:42:11] bullcitydev: has joined #ruby
[01:42:36] dgutierrez1287: has joined #ruby
[01:43:07] phat4life: has joined #ruby
[01:43:57] tkuchiki: has joined #ruby
[01:44:06] scrudrv: has joined #ruby
[01:44:41] christiandsg: has joined #ruby
[01:45:29] jlast: has joined #ruby
[01:46:01] dstarh: has joined #ruby
[01:47:10] devdazed: has joined #ruby
[01:47:16] jlast: has joined #ruby
[01:48:38] jlast: has joined #ruby
[01:49:08] j_mcnally: has joined #ruby
[01:51:27] jcdesimp: has joined #ruby
[01:51:31] pen: has joined #ruby
[01:52:00] Vile`: has joined #ruby
[01:54:03] chipotle: has joined #ruby
[01:54:44] balazs: has joined #ruby
[01:56:38] GriffinHeart: has joined #ruby
[01:57:02] tkuchiki: has joined #ruby
[01:59:00] GriffinHeart: has joined #ruby
[01:59:17] jerematic: has joined #ruby
[02:00:39] bronson: has joined #ruby
[02:01:03] pdoherty: has joined #ruby
[02:05:20] Azulinho: has joined #ruby
[02:06:14] scrudrv: has left #ruby: ()
[02:09:46] Aswebb_: has joined #ruby
[02:11:08] nitenq: has left #ruby: ()
[02:11:49] devdazed: has joined #ruby
[02:13:00] ValicekB: has joined #ruby
[02:19:51] mistermocha: has joined #ruby
[02:21:12] christiandsg: has joined #ruby
[02:22:20] umgrosscol: has joined #ruby
[02:22:41] bruno-: has joined #ruby
[02:23:06] mistermocha: has joined #ruby
[02:24:02] NeverDie: has joined #ruby
[02:27:05] ZeeNoodleyGamer: has joined #ruby
[02:28:20] znz_jp: has joined #ruby
[02:28:53] parabolize: has joined #ruby
[02:29:11] charliesome: has joined #ruby
[02:29:32] jlast: has joined #ruby
[02:31:15] jlast_: has joined #ruby
[02:33:08] jlast: has joined #ruby
[02:33:26] dothebar1wa: has joined #ruby
[02:34:37] leonardoajim: has joined #ruby
[02:35:07] jlast: has joined #ruby
[02:35:37] renderful: has joined #ruby
[02:36:52] rushed: has joined #ruby
[02:36:59] jlast: has joined #ruby
[02:37:15] Oog: has joined #ruby
[02:38:38] jlast: has joined #ruby
[02:40:24] XandnaX: has joined #ruby
[02:40:33] KnownSyntax: has joined #ruby
[02:49:14] fgo: has joined #ruby
[02:49:26] Santana: has joined #ruby
[02:50:38] RegulationD: has joined #ruby
[02:51:09] darkf: has joined #ruby
[02:51:38] jlast_: has joined #ruby
[02:52:53] charliesome: has joined #ruby
[02:53:25] havenwood: has joined #ruby
[02:54:13] djbkd: has joined #ruby
[02:54:16] howdoicomputer: has joined #ruby
[02:56:13] balazs: has joined #ruby
[02:56:34] yashinbasement: has joined #ruby
[02:56:41] ivanskie: has joined #ruby
[02:58:08] d0lph1n98: has joined #ruby
[02:58:18] yashinbasement: what's the point of not having () in ruby , it makes coders life easy but I don't know it's kind of bad sometimes
[02:58:27] leonardoajim: has joined #ruby
[02:59:36] sevenseacat: to reduce unnecessary noise
[02:59:46] sevenseacat: you can still use all the () if you like
[03:00:59] workmad3: has joined #ruby
[03:01:03] Torrieri: has joined #ruby
[03:01:04] Torrieri: has joined #ruby
[03:02:21] f3lp: has joined #ruby
[03:02:55] icebourg: has joined #ruby
[03:03:43] jlast_: has joined #ruby
[03:04:07] Scroff: has joined #ruby
[03:05:31] sharpmachine: has joined #ruby
[03:05:47] chipotle: has joined #ruby
[03:08:18] jesterfraud: has joined #ruby
[03:09:34] Pupeno: has joined #ruby
[03:11:34] arescorpio: has joined #ruby
[03:12:37] braincrash: has joined #ruby
[03:13:53] christiandsg: has joined #ruby
[03:14:17] eggoez: has joined #ruby
[03:16:16] baweaver: has joined #ruby
[03:23:00] di3soft: has joined #ruby
[03:24:55] CloCkWeRX: has joined #ruby
[03:26:21] olistik: has joined #ruby
[03:26:24] howdoicomputer: has joined #ruby
[03:26:35] jlast: has joined #ruby
[03:27:04] mistermocha: has joined #ruby
[03:29:00] bronson: has joined #ruby
[03:30:12] eggoez: has joined #ruby
[03:30:58] x1337807x: has joined #ruby
[03:33:44] dopie: has joined #ruby
[03:34:27] Miesco: has joined #ruby
[03:34:30] Miesco: Hi, I am getting this error when I direct my browser to my helloworld app: http://paste.debian.net/279698/
[03:34:38] Miesco: What is the first step to fixing this error?
[03:36:02] bigkevmcd: has joined #ruby
[03:38:29] konsolebox: has joined #ruby
[03:39:17] dellavg: has joined #ruby
[03:39:18] pocketprotector: has joined #ruby
[03:40:21] juanca_: has joined #ruby
[03:42:07] Oog: has joined #ruby
[03:42:47] gix: has joined #ruby
[03:44:02] werelivinginthef: has joined #ruby
[03:45:28] quazimodo: has joined #ruby
[03:45:36] hahuang65: has joined #ruby
[03:45:43] kkeuning: has joined #ruby
[03:46:22] ledestin: has joined #ruby
[03:46:37] hahuang61: has joined #ruby
[03:47:34] tkuchiki: has joined #ruby
[03:48:19] quazimodo: morning all
[03:48:23] quazimodo: sevenseacat: hey cat
[03:48:52] cochise: has joined #ruby
[03:49:46] hahuang61: has joined #ruby
[03:51:13] icebourg: has joined #ruby
[03:51:16] sevenseacat: quazimodo: good morning
[03:52:37] jesterfraud: you awake yet sevenseacat?
[03:52:46] sevenseacat: jesterfraud: yep.
[03:52:52] sevenseacat: against my better judgement.
[03:53:03] jesterfraud: know that feeling
[03:53:48] idafyaid: has joined #ruby
[03:58:16] PaulCapestany: has joined #ruby
[03:58:50] Aswebb_: has joined #ruby
[03:59:28] konsolebox: has joined #ruby
[04:00:36] kkeuning: has joined #ruby
[04:00:48] danielpclark: has joined #ruby
[04:01:05] veekram: has joined #ruby
[04:03:07] mary5030: has joined #ruby
[04:05:27] hahuang65: has joined #ruby
[04:05:56] lessless: has joined #ruby
[04:06:52] howdoicomputer: has joined #ruby
[04:07:06] MagePsycho_: has joined #ruby
[04:07:07] jaimessi: has joined #ruby
[04:07:37] tmtwd: has joined #ruby
[04:10:47] sharpmachine: has joined #ruby
[04:11:05] michael_mbp: has joined #ruby
[04:12:33] jlast: has joined #ruby
[04:13:33] crdpink2: has joined #ruby
[04:16:16] juanca_: has joined #ruby
[04:16:31] konsolebox: has joined #ruby
[04:17:33] christiandsg: has joined #ruby
[04:17:40] hahuang65: has joined #ruby
[04:18:37] Pr1zr4k: has joined #ruby
[04:20:31] jenrzzz: has joined #ruby
[04:21:10] GriffinHeart: has joined #ruby
[04:24:13] ohaibbq: has joined #ruby
[04:24:30] howdoicomputer: has joined #ruby
[04:24:36] j_mcnally: has joined #ruby
[04:26:40] towski_: has joined #ruby
[04:27:24] karols: has joined #ruby
[04:27:36] jlast: has joined #ruby
[04:27:48] baweaver_: has joined #ruby
[04:28:41] karols: has joined #ruby
[04:30:15] karols: has joined #ruby
[04:30:19] hotpancakes: has joined #ruby
[04:30:28] mistermocha: has joined #ruby
[04:31:15] jenrzzz: has joined #ruby
[04:34:19] Frem: has joined #ruby
[04:34:53] karols: has joined #ruby
[04:36:04] karols: has joined #ruby
[04:36:16] howdoicomputer: has joined #ruby
[04:37:45] karols: has joined #ruby
[04:39:04] karols: has joined #ruby
[04:39:32] RegulationD: has joined #ruby
[04:40:09] iamninja: has joined #ruby
[04:40:15] karols: has joined #ruby
[04:41:22] karols: has joined #ruby
[04:42:09] chipotle_: has joined #ruby
[04:43:02] elcuervo: has joined #ruby
[04:43:28] GitGud: has joined #ruby
[04:43:53] danielpclark: has joined #ruby
[04:44:32] konsolebox: has joined #ruby
[04:44:49] niemcu: has joined #ruby
[04:46:00] quazimodo: how do i name a collection data structure?
[04:46:16] quazimodo: class BusinessListings has instances, each of which is a collection of business listings
[04:46:19] quazimodo: is that wrong?
[04:46:34] bhuvanaurora: has joined #ruby
[04:46:51] bhuvan_aurora: has joined #ruby
[04:49:40] workmad3: has joined #ruby
[04:50:44] konsolebox: has joined #ruby
[04:51:50] davedev24_: has joined #ruby
[04:52:52] Scroff: has joined #ruby
[04:55:34] chinmay_dd: has joined #ruby
[04:57:29] devbug_: has joined #ruby
[04:57:37] balazs: has joined #ruby
[04:59:22] peter_paule: has joined #ruby
[05:01:48] Ox0dea: has joined #ruby
[05:03:13] doctorly: has joined #ruby
[05:04:15] havenwood: has joined #ruby
[05:05:34] jlast: has joined #ruby
[05:07:41] karols: has joined #ruby
[05:08:58] bnagy: quazimodo: the name seems ok, but make sure you're not just thinly wrapped a standard storage type
[05:09:10] bnagy: like don't < Array for example
[05:09:20] karols: has joined #ruby
[05:09:57] djbkd: has joined #ruby
[05:10:48] karols: has joined #ruby
[05:11:29] acke: has joined #ruby
[05:12:15] jsaak: has joined #ruby
[05:12:33] karols: has joined #ruby
[05:12:42] sharpmachine: has joined #ruby
[05:12:53] M-Technic: has joined #ruby
[05:15:03] ivanskie: has joined #ruby
[05:15:05] tmtwd_: has joined #ruby
[05:16:16] roolo: has joined #ruby
[05:17:37] baweaver: def [](x) for reader, def []=(x) for writer, define each as yielding from the collection and include Enumerable
[05:19:22] GitGud: has joined #ruby
[05:20:12] chipotle: has joined #ruby
[05:20:29] kiddorails: has joined #ruby
[05:20:38] Spami: has joined #ruby
[05:21:37] bhuvan_aurora: has joined #ruby
[05:21:38] bhuvanaurora: has joined #ruby
[05:22:04] Oog: has joined #ruby
[05:22:15] f3lp: has joined #ruby
[05:24:49] aganov: has joined #ruby
[05:25:19] eGGsha: has joined #ruby
[05:26:18] riotjones: has joined #ruby
[05:26:44] jlast_: has joined #ruby
[05:26:46] bronson: has joined #ruby
[05:27:42] Exponential: has joined #ruby
[05:27:55] tvw: has joined #ruby
[05:28:38] thalassa: has joined #ruby
[05:32:24] T3: has joined #ruby
[05:34:57] theery: has joined #ruby
[05:36:18] pontiki: latest ep of ruby tapas talks about this very thing
[05:36:55] mistermocha: has joined #ruby
[05:37:33] baweaver: avdi is making a hard run for the level of comprehensiveness that Railscasts had, and doing a pretty stellar job of it so far.
[05:37:53] baweaver: considering I now tend to say there's a Tapa for that when asked a ruby question.
[05:38:44] daas: has joined #ruby
[05:39:52] hotpancakes: has joined #ruby
[05:40:04] pontiki: still not on the order of Randall Munroe, though :D
[05:40:09] Gottaname|Mobili: has joined #ruby
[05:40:21] baweaver: that's not fair to compare anyone to :P
[05:40:28] quazimodo: bnagy: nah it has a collection + more stuff
[05:41:27] pontiki: episode 321
[05:41:39] pontiki: hint: use the delegate stdlib
[05:42:50] d0lph1n98: has joined #ruby
[05:43:35] musty: has joined #ruby
[05:44:00] daas: I'm having a bit of trouble getting shotgun to work
[05:44:03] khebbie: has joined #ruby
[05:44:49] daas: my simple app is working when I run it normally but if I use shotgun it doesnt
[05:45:11] daas: this is what happens if I go to localhost:9393: http://i.imgur.com/7Jv1GeU.png
[05:46:03] darkf_: has joined #ruby
[05:46:10] daas: and this is what the terminal shows: http://i.imgur.com/QIbdl4X.png
[05:47:30] Aswebb_: has joined #ruby
[05:48:07] whiteline: has joined #ruby
[05:48:45] solars: has joined #ruby
[05:49:58] tkuchiki: has joined #ruby
[05:50:18] acke: has joined #ruby
[05:51:42] sigurding: has joined #ruby
[05:51:53] Radar: daas: The port might already be in use. Try running `ps -e | grep ruby` and show us what that outputs please
[05:52:26] daas: 22675 ?? 0:04.51 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby /usr/bin/shotgun app.rb
[05:52:26] daas: 24294 ttys001 0:00.00 grep ruby
[05:52:41] Radar: Yup, already running.
[05:52:44] Radar: kill -9 22675
[05:52:45] Radar: try again
[05:52:55] yfeldblum: has joined #ruby
[05:53:09] daas: Thanks a lot
[05:53:28] daas: What exactly did the line `ps -e | grep ruby` do?
[05:53:44] daas: what does it show*
[05:53:54] yfeldblum: has joined #ruby
[05:54:20] Radar: "Display information about other users' processes, including those without controlling terminals."
[05:54:25] daas: Thanks baweaver too
[05:54:28] jenrzzz: has joined #ruby
[05:54:34] Radar: And then the "| grep ruby" part of it looks through that list to find a line that contains '
[05:54:42] kiddorails: has joined #ruby
[05:54:48] daas: cool, got it
[05:55:33] baweaver: netstat -anp tcp | grep 9000
[05:55:52] Radar: On my machine that doesn't show a process?
[05:55:53] baweaver: lsof -i tcp:9000
[05:56:07] baweaver: you don't have anything on 9000 do you?
[05:56:13] Radar: I changed it to 3000
[05:56:20] Radar: tcp4 0 0 127.0.0.1.3000 *.* LISTEN
[05:56:23] Radar: ruby 6894 ryanbigg 12u IPv4 0xa7ac96589d7e3db3 0t0 TCP localhost:hbci (LISTEN)
[05:56:30] Radar: the second one is the lsof output
[05:56:33] rdark: has joined #ruby
[05:56:36] Radar: 6894 is the PID
[05:56:45] andikr: has joined #ruby
[05:56:47] kreantos: has joined #ruby
[05:56:53] baweaver: probably linux vs mac implementations again
[05:57:07] MagePsycho_: unable to run: gem install mechanize
[05:57:12] christiandsg: has joined #ruby
[05:57:20] MagePsycho_: ERROR: While executing gem ... (Gem::FilePermissionError)
[05:57:30] Oog: has joined #ruby
[05:57:31] towski_: has joined #ruby
[05:57:32] MagePsycho_: i installed gem via sudo ..
[05:57:47] sevenseacat: well there was your first mistake
[05:57:53] baweaver: Are you using any ruby version manager?
[05:57:54] MagePsycho_: should i install mechanize via: sudo gem install mechanize?
[05:58:09] baweaver: sudo is off limits 9/10 times
[05:58:15] pontiki: no, MagePsycho_
[05:58:24] baweaver: it's like a rocket launcher, use liberally at your own peril
[05:58:43] pontiki: add the following line to $HOME/.gemrc:
[05:58:49] pontiki: gem: --user-install
[05:59:07] pontiki: there are much better solutions than that, however
[05:59:09] Aswebb_: has joined #ruby
[05:59:26] baweaver: rvm, rbenv, and whatever the flavor of the day is for version managers
[05:59:34] baweaver: what's the most popular now anyways?
[05:59:39] tmtwd: has joined #ruby
[05:59:43] baweaver: I always get flak for suggesting RVM anymore.
[05:59:53] pontiki: chruby + ruby-install here
[06:00:01] havenwood: chruby + ruby-install
[06:00:02] sevenseacat: ^ that combo is gaining popularity.
[06:00:09] MagePsycho_: baweaver, pontiki FYI, i installed the rvm via: \curl -sSL https://get.rvm.io | sudo bash -s stable
[06:00:10] sevenseacat: (thanks postmodern)
[06:00:11] rushed: has joined #ruby
[06:00:28] MagePsycho_: using sudo bash.. as only bash was giving write permission error
[06:00:40] RegulationD: has joined #ruby
[06:00:52] baweaver: Now you're using nuclear bombs
[06:00:56] baweaver: better hope your aim is good
[06:01:24] sevenseacat: * MagePsycho_ accidentally hits Japan
[06:01:35] pontiki: no, i mean not being able to install rvm withOUT sudo
[06:03:51] rht: has joined #ruby
[06:03:53] MagePsycho_: sevenseacat, pontiki, baweaver: I am lost. may be i need to remove all those and re-install everything
[06:03:57] saltsa: has joined #ruby
[06:05:12] lxsameer: has joined #ruby
[06:05:17] havenwood: MagePsycho_: OS/distro? Installing for development or production?
[06:05:19] bnagy: curl | sudo bash
[06:05:33] bnagy: stab stab stab stab
[06:05:51] Aeyrix: bnagy: For a blind moment I thought you were suggesting that
[06:05:54] Aeyrix: and I got really upset
[06:06:11] Pupeno: has joined #ruby
[06:06:27] MagePsycho_: FYI, i am using Ubuntu 12.04
[06:06:35] howdoi: has joined #ruby
[06:06:37] MagePsycho_: and development
[06:07:00] sevenseacat: why 12.04? :/
[06:07:06] sevenseacat: thats three years old
[06:07:17] pontiki: doesn't matter in this case, tho
[06:07:19] baweaver: Just stating probably reasons
[06:07:26] Aeyrix: 12.04 is still in support though.
[06:07:48] baweaver: unless you need to be on it though, probably best to upgrade
[06:08:06] Aeyrix: It doesn't have a new start menu to wrangle with so you'll be fine. ;)
[06:08:21] hahuang65: has joined #ruby
[06:08:22] baweaver: apt-get install gnome3 or cinnamon
[06:08:43] baweaver: Never was a fan honestly
[06:08:43] sevenseacat: unity is fine.
[06:08:49] bnagy: iterm2 :P
[06:08:52] baweaver: though that doesn't matter much
[06:09:03] baweaver: as I pretty well live in ZSH/TMUX/VIM
[06:09:05] Aeyrix: Nobody here uses Emacs as their OS?
[06:09:34] crdpink: has joined #ruby
[06:10:01] riotjones: has joined #ruby
[06:10:01] MagePsycho_: sevenseacat, pontiki, baweaver: can you help guys? I am lost
[06:10:34] havenwood: MagePsycho_: Do you want just one Ruby, like latest stable, or to be able to switch.
[06:11:01] havenwood: MagePsycho_: Working on apps that require older Rubies?
[06:12:20] wallerdev: has joined #ruby
[06:12:23] hotpancakes: has joined #ruby
[06:12:32] havenwood: MagePsycho_: As has been suggested, ruby-install to install Rubies and chruby to switch between them is a nice, flexible option.
[06:12:37] pontiki: i don't know what you did, MagePsycho_, i just fired up a clean precise64 vm, and rvm install just fine without sudo
[06:12:56] MagePsycho_: let me explain how i did
[06:12:56] havenwood: pontiki: I'd expect it to.
[06:13:10] timonv: has joined #ruby
[06:13:26] Aeyrix: Has nobody linked Radar's ruby-install thing yet?
[06:13:29] iateadonut: has joined #ruby
[06:13:33] sharpmachine: has joined #ruby
[06:14:10] MagePsycho_: http://pastebin.com/TRb3zVLT
[06:14:11] ruboto: MagePsycho_, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/dbb230df0d642ee63f80
[06:14:11] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[06:14:15] Aeyrix: Go go gadget Radar.
[06:14:19] MagePsycho_: here is the full code that i used
[06:14:23] Aeyrix: I don't have the link on hand lel
[06:14:25] Aeyrix: is it in the bot?
[06:14:32] ruboto: I don't know anything about rvm
[06:14:35] havenwood: MagePsycho_: So you installed with sudo?
[06:14:38] Radar: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you/
[06:14:39] Aeyrix: Yeah me neither, ruboto.
[06:14:43] Aeyrix: Me neither.
[06:14:56] havenwood: MagePsycho_: sudo bash -s stable <- note the sudo
[06:14:57] MagePsycho_: ruboto, thanks noted
[06:15:05] pontiki: i would really like to see what the problem was trying to install it without sudo
[06:15:12] Aeyrix: MagePsycho_: kek
[06:15:14] Aeyrix: ruboto is a bot
[06:15:24] MagePsycho_: havenwood, yeah
[06:15:32] olistik: has joined #ruby
[06:15:34] Aeyrix: > sudo bash
[06:15:47] havenwood: MagePsycho_: Why did you do a system install? Any reason?
[06:16:07] MagePsycho_: new to ruby.. so did as per the tutorial from net
[06:16:10] Xeago: has joined #ruby
[06:16:17] pontiki: [20150707|0100.27] < MagePsycho_> using sudo bash.. as only bash was giving write permission error
[06:16:23] havenwood: MagePsycho_: It's not recommended to install RVM with sudo or as root.
[06:16:26] Aeyrix: MagePsycho_: Yeah, I'm just astounded that after all this time it's still the suggested way
[06:16:31] pontiki: that was the reason i saw for using sudo bash
[06:16:54] havenwood: pontiki: Likely a previous system install's env vars.
[06:16:58] arturaz: has joined #ruby
[06:17:17] havenwood: MagePsycho_: implode your system install and start a completely new terminal session.
[06:17:47] pontiki: havenwood: you must have more psychic power than i do
[06:17:48] baweaver: Well bed for me, 'night all.
[06:18:03] havenwood: pontiki: Just seen the problem before.
[06:18:14] pengin: has joined #ruby
[06:19:18] pontiki: havenwood: i'm unfamiliar with ubuntu installations that render the user's homedir inaccessible
[06:19:25] konsolebox: has joined #ruby
[06:19:29] yardenbar: has joined #ruby
[06:19:39] havenwood: pontiki: Person installs RVM with sudo, decides that was a bad idea and either implodes and doesn't start a new shell session or doesn't implode, either way leaving the env vars in place that will cause a regular RVM installation to fail due to root locations.
[06:20:26] havenwood: pontiki: Lingering sudo install screws up non-sudo install. That's all.
[06:20:45] havenwood: pontiki: Fresh system, no prob.
[06:20:56] pontiki: havenwood: i see
[06:21:04] MagePsycho_: so guys how to fix? uninstall all and re-install using this tutorial: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you/
[06:21:12] pontiki: perhaps i shouldn't take what people say at face value...
[06:21:37] havenwood: pontiki: Users are *not* to be trusted. :)
[06:21:52] pontiki: havenwood: what about devs?
[06:22:02] jlast: has joined #ruby
[06:22:06] havenwood: pontiki: Definitely not! :)
[06:22:07] pontiki: i know we must worship the dbas
[06:22:48] havenwood: MagePsycho_: That would be a nice way. There's more than one way to do it.
[06:22:56] bruno-: has joined #ruby
[06:23:25] MagePsycho_: havenwood, my ruby says: ruby --version
[06:23:25] MagePsycho_: ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]
[06:23:44] MagePsycho_: but while installing mechanize: ERROR: Error installing mechanize:
[06:23:44] MagePsycho_: mime-types requires Ruby version >= 1.9.2.
[06:24:07] havenwood: MagePsycho_: Are you using sudo?
[06:24:30] MagePsycho_: havenwood, yeah for now just for testing sudo gem install mechanize
[06:24:43] Aeyrix: sudo ruby and ruby are not the same.
[06:24:46] havenwood: MagePsycho_: When you do you drop the RVM env. If you want to use sudo with RVM (you most certainly don't here) you can use rvmsudo to not drop the env.
[06:24:47] MagePsycho_: quickly i need to test one mechanize script for web scraping so
[06:25:32] krz: has joined #ruby
[06:25:50] MagePsycho_: havenwood, OK i want to uninstall all the ruby rvm
[06:26:01] MagePsycho_: havenwood, how to uninstall all
[06:26:01] havenwood: MagePsycho_: Either start over with RVM and follow their installation instructions or implode it go as suggested.
[06:26:06] havenwood: MagePsycho_: rvm implode
[06:26:37] pontiki: probably have to use sudo rvm implode now...
[06:27:20] MagePsycho_: Could not remove '/usr/share/rvm/', please try removing it manually.
[06:27:23] havenwood: pontiki: You mean `rvmsudo rvm implode`, as we discussed. :P
[06:27:49] MagePsycho_: rvm implode --> sudo rvm implode?
[06:28:12] pontiki: what does --> mean?
[06:28:28] MagePsycho_: sudo rvm implode OR rvmsudo implode
[06:28:28] jesterfraud: sudo should come with a built in quiz to make sure you understand what you're doing, I know I'd fail it :P
[06:28:30] MagePsycho_: which one to use
[06:28:37] Aeyrix: jesterfraud: i agree
[06:28:42] Aeyrix: MagePsycho_: Use the latter.
[06:28:44] havenwood: MagePsycho_: rvmsudo rvm implode
[06:28:45] Aeyrix: rvmsudo implode
[06:28:51] Aeyrix: ya what havenwood said
[06:28:56] Aeyrix: i forgot the middle bit
[06:29:04] lee-jon: has joined #ruby
[06:29:46] jsaak: has joined #ruby
[06:30:13] MagePsycho_: havenwood, yeha it worked
[06:30:31] MagePsycho_: now what? sudo gem insall mechanize OR ...
[06:30:36] Aeyrix: you follow that guide
[06:30:43] Aeyrix: it's pretty quick
[06:30:49] Aeyrix: and then you can `gem install mechanize`
[06:30:51] Aeyrix: stop using sudo
[06:31:33] MagePsycho_: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you/ ?
[06:31:49] jesterfraud: general rule of thumb: assume a command is run without sudo
[06:31:54] jesterfraud: because sudo is kinda evil
[06:32:14] Aeyrix: Unless anything in that guide explicitly had "sudo" at the start, run it as your user.
[06:32:22] MagePsycho_: OK got your point
[06:32:24] MagePsycho_: ruby --version
[06:32:24] MagePsycho_: ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
[06:32:35] Aeyrix: that's default
[06:32:40] MagePsycho_: why? though i just implode it
[06:32:45] Aeyrix: you imploded ruby 2.x
[06:32:51] Aeyrix: ruby 1.8.7 comes with ubuntu 12.04
[06:32:58] Aeyrix: wait, no it doesn't, you installed it with apt
[06:33:15] Aeyrix: how many versions of ruby do you have lmao
[06:33:18] MagePsycho_: thanks guys.. let me re-install
[06:34:01] MagePsycho_: yeah i installed via https://gist.github.com/dbb230df0d642ee63f80
[06:34:23] sevenseacat: ubuntu does not come with any ruby preinstalled
[06:34:40] Aeyrix: sudo apt-get purge rubygems
[06:34:42] sevenseacat: why did you sudo apt-get install rubygems
[06:34:44] Aeyrix: sudo apt-get purge ruby rubygems
[06:34:50] Aeyrix: do the second one
[06:34:52] sevenseacat: that would have installed a whole host of crap
[06:34:53] Aeyrix: follow Ryan's guide
[06:34:56] Aeyrix: you're good
[06:34:58] Aeyrix: you can do what you want
[06:35:07] MagePsycho_: sudo apt-get install build-essential --> it has sudo ;)
[06:35:14] Aeyrix: Yes, because it explicitly is mentioned.
[06:35:20] Aeyrix: It's also required to install the gnu C compiler.
[06:36:28] acke: has joined #ruby
[06:37:08] acke: has joined #ruby
[06:37:41] MagePsycho_: so far so good.. installing ruby using ruby-install
[06:38:02] havenwood: the crisp, cool breeze
[06:38:13] fabrice31: has joined #ruby
[06:38:20] workmad3: has joined #ruby
[06:38:33] lee-jon: has left #ruby: ()
[06:41:15] towski_: has joined #ruby
[06:44:28] MagePsycho_: but in my mac OSx it was working fine.. i used brew command
[06:44:38] MagePsycho_: just to note :)
[06:45:28] sevenseacat: we wouldnt typically recommend that on osx either.
[06:45:44] hotpancakes: has joined #ruby
[06:48:14] MagePsycho_: i use mac osx at home and ubuntu at work
[06:48:22] MagePsycho_: i love mac :)
[06:48:26] MagePsycho_: >>> Successfully installed ruby 2.2.0 into /home/rajendra/.rubies/ruby-2.2.0
[06:48:28] ruboto: MagePsycho_ # => /tmp/execpad-cc7154d0c89c/source-cc7154d0c89c:2: syntax error, unexpected '>' ...check link for more (https://eval.in/393917)
[06:49:16] MagePsycho_: but ruby --version says the old
[06:49:30] sevenseacat: err, what old?
[06:49:36] MagePsycho_: sorry i am too fast.. need to follow other steps as well
[06:51:01] Aeyrix: MagePsycho_: Mac's p great.
[06:51:13] Aeyrix: `brew install ruby` works for Mac though. ;)
[06:51:41] Scroff: has joined #ruby
[06:51:43] sevenseacat: Aeyrix: why bother if you just want ruby? it comes pre-installed on osx
[06:51:50] Aeyrix: sevenseacat: Older version.
[06:51:59] sevenseacat: for real use we'd still recommend a ruby version manager
[06:52:26] jlast: has joined #ruby
[06:52:29] Aeyrix: For real use I wouldn't be using OS X in production. :P
[06:52:47] sevenseacat: who said anything about production?
[06:53:02] pontiki: my everyday use of ruby on my mac is production
[06:53:15] pontiki: it's not a web site out on the internet
[06:53:22] pontiki: but it's *my* production
[06:53:44] pontiki: my scripts, my gems, my tools, etc
[06:54:22] Timba-as: has joined #ruby
[06:55:37] DoubleMalt: has joined #ruby
[06:56:00] MagePsycho_: ruby -v says: ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
[06:56:16] MagePsycho_: need to install ruby gems?
[06:56:17] sevenseacat: now you can gem install whatever you like
[06:56:20] MagePsycho_: or it's by default
[06:56:20] sevenseacat: no sudo or anything
[06:56:24] sevenseacat: it comes by default.
[06:56:31] MagePsycho_: wow.. this is cool
[06:56:40] Radar: very cool
[06:56:43] mandarinkin: has joined #ruby
[06:57:40] yayfoxes: has joined #ruby
[06:58:42] jlast: has joined #ruby
[06:59:25] yardenbar: has joined #ruby
[07:00:04] hotpancakes: has joined #ruby
[07:00:46] workmad3: has joined #ruby
[07:02:53] darkf: has joined #ruby
[07:03:19] yardenbar: has joined #ruby
[07:05:32] yardenbar: has joined #ruby
[07:06:05] MagePsycho_: gem install mechanize -> worked like a charm.. thanks a lot guys.. this channel rocks
[07:06:15] olistik: has joined #ruby
[07:06:16] MagePsycho_: now let me run the ruby script :P
[07:06:23] dhjondoh: has joined #ruby
[07:08:27] codecop: has joined #ruby
[07:08:35] Xeago: has joined #ruby
[07:08:51] sevenseacat: now you have a super-easy way of managing versions of ruby, and installing stuff.
[07:09:16] yardenbar: has joined #ruby
[07:09:37] lkba_: has joined #ruby
[07:12:28] dumdedum: has joined #ruby
[07:12:51] blackmes1: has joined #ruby
[07:13:21] chinmay_dd: has joined #ruby
[07:13:57] last_staff: has joined #ruby
[07:14:18] sharpmachine: has joined #ruby
[07:14:21] ybian: has joined #ruby
[07:14:24] tagrudev: has joined #ruby
[07:14:42] doerteDev: has joined #ruby
[07:17:57] vondruch: has joined #ruby
[07:19:32] ta: has joined #ruby
[07:20:00] flughafen: moin sevenseacat shevy certainty
[07:20:53] niemcu: has joined #ruby
[07:20:58] flughafen: how goeees it? are you level 503 yet in eso?
[07:21:09] sevenseacat: no - only veteran rank 12
[07:21:24] sevenseacat: havent played in a while actually
[07:23:49] Radar: E_TOO_MANY_GAMES
[07:24:13] apeiros: Errno::ETOOLITTLETIME
[07:24:19] sevenseacat: oh so many games
[07:24:38] sevenseacat: I think if I never bought another game for the rest of my life, I still would never finish all the ones I have.
[07:24:59] Radar: ACTION eagerly awaits Just Cause 3 and might be feeling very sick the week that comes out
[07:25:13] veekram: has joined #ruby
[07:25:33] Radar: Oh, and No Man's Sky
[07:25:33] sevenseacat: next game I'll be sinking a lot of time into is rory mcilroy pga tour 15 <_<
[07:26:05] apeiros: I think last time I played golf was on the NES
[07:26:23] ingreave_: has joined #ruby
[07:26:35] apeiros: ACTION imagines playing golf with the wiimote???
[07:26:56] sevenseacat: I've done that. its harder than it looks.
[07:27:37] senayar: has joined #ruby
[07:28:25] flughafen: sevenseacat: i have tons of games i haven't finished, buyt i did recenntly buy and finished the stick of truth.
[07:28:35] lnx: Radar: oh man, no man's sky looks so wicked
[07:28:49] sevenseacat: fallout 4 is probably the next big one i'll buy
[07:29:01] monod: has joined #ruby
[07:29:38] flughafen: ACTION still wants to get gta5, it'll look nnice collecting dust next to the other games
[07:29:58] agent_white: has joined #ruby
[07:29:58] apatite_lark: has joined #ruby
[07:30:00] sevenseacat: oh i have many hundreds of games doing that.
[07:30:09] agent_white: Evenin' folks
[07:30:19] sevenseacat: sup agent_white
[07:30:45] agent_white: sevenseacat: \o Heya 7-c!
[07:31:15] burgestrand: has joined #ruby
[07:31:21] Radar: lnx: yesss
[07:31:38] fabrice31: has joined #ruby
[07:31:39] Radar: gnight folks
[07:31:53] ta: has joined #ruby
[07:32:44] ytti: not to push anyone's buttons, but is someone really using slop4?
[07:32:48] chenillen: has joined #ruby
[07:32:57] ytti: to me it's just utter show stopper, that i can't use pry
[07:33:01] ytti: so 3.6 it is
[07:34:16] agent_white: Radar: Night!
[07:34:19] _blizzy_: has joined #ruby
[07:35:38] arooni-mobile: has joined #ruby
[07:36:08] abuzze: has joined #ruby
[07:38:17] eGGsha: has joined #ruby
[07:39:53] mandarinkin: has joined #ruby
[07:40:47] troulouliou_dev: has joined #ruby
[07:42:22] MagePsycho_: when i run the script. it says: .rb Argument Missing
[07:42:26] dhjondoh: has joined #ruby
[07:43:00] mistermocha: has joined #ruby
[07:44:09] dumdedum: has joined #ruby
[07:44:28] tjbiddle: has joined #ruby
[07:45:33] MagePsycho_: https://gist.github.com/MagePsycho/1c79bfbfebb367b1353b
[07:45:44] Scroff: has joined #ruby
[07:45:53] ndrei: has joined #ruby
[07:45:56] christiandsg: has joined #ruby
[07:46:00] lxsameer: has joined #ruby
[07:46:34] sevenseacat: and how are you tunning it?
[07:48:07] MagePsycho_: chmod +x mechanize-test.rb
[07:48:17] MagePsycho_: ruby mechanize-test.rb
[07:48:29] sevenseacat: try just ./mechanize-test
[07:48:30] MagePsycho_: even tried with: ./mechanize-test.rb
[07:48:36] michael_mbp: has joined #ruby
[07:48:46] MagePsycho_: .rb is there. typo
[07:49:33] RegulationD: has joined #ruby
[07:50:08] gagrio: has joined #ruby
[07:50:17] seal: has joined #ruby
[07:50:20] apatite_lark: has left #ruby: ()
[07:50:23] MagePsycho_: extension doesn't matter i guess
[07:50:36] MagePsycho_: in mac it worked fine
[07:50:48] sevenseacat: great. you're not on your mac.
[07:50:57] sevenseacat: rules are different on a mac.
[07:53:21] astrobun_: has joined #ruby
[07:55:20] arup_r: has joined #ruby
[07:55:59] ta: has joined #ruby
[07:56:00] MagePsycho_: sevenseacat, i got the issue
[07:56:24] MagePsycho_: sevenseacat, i am running that script from /var/www/
[07:56:29] TheHodge: has joined #ruby
[07:56:52] MagePsycho_: if i run the script from home directory(~), it works fine
[07:57:05] sevenseacat: that doesnt make a lot of sense, but sure.
[07:57:08] eGGsha: has joined #ruby
[07:57:28] MagePsycho_: in /var/www/ i have to use sudo for write permission
[07:57:41] sevenseacat: dont. use. sudo. did we not drill this into your head?
[07:58:34] bronson: has joined #ruby
[07:59:05] MagePsycho_: sevenseacat, Yeah. but here we develop in /var/www which is available for root user
[07:59:21] adaedra: should be available for another user, like www
[07:59:29] sevenseacat: thats just horrible
[07:59:38] tobiasvl: MagePsycho_: you develop directly in production?
[07:59:45] adaedra: but that should not be dev env :??
[08:01:11] krz: has joined #ruby
[08:01:23] ferr: has joined #ruby
[08:01:53] Xeago: has joined #ruby
[08:02:05] allomov: has joined #ruby
[08:02:38] axl_: has joined #ruby
[08:02:46] Scrofff: has joined #ruby
[08:03:06] michael_mbp: has joined #ruby
[08:03:32] posixpascal: has joined #ruby
[08:07:26] marr: has joined #ruby
[08:08:25] jlast: has joined #ruby
[08:09:22] ddv: MagePsycho_: you should develop locally
[08:09:52] ddv: don't carry bad habits from php to ruby
[08:10:11] sevenseacat: thats not a good idea even in php
[08:11:14] apeiros: do we need `?badidea`?
[08:11:43] sevenseacat: only if we can put a picture of Rad..... hi Radar!
[08:12:32] apeiros: and there I thought a pic of 0xABAD1DEA
[08:12:45] noname1: has joined #ruby
[08:13:42] jas02: has joined #ruby
[08:15:08] sharpmachine: has joined #ruby
[08:16:05] khebbie: has joined #ruby
[08:16:25] msgodf: has joined #ruby
[08:17:25] Hounddog: has joined #ruby
[08:17:46] arup_r: php is bad.. I lost weight in 2 days after using some php :)
[08:21:02] senayar: has joined #ruby
[08:22:04] ddv: really? I need to use php then
[08:23:41] blackmes1: has joined #ruby
[08:23:51] xcesariox: has joined #ruby
[08:27:47] olistik: has joined #ruby
[08:28:10] adaedra: hi yorickpeterse
[08:29:12] jas02: has left #ruby: ()
[08:29:33] axl_: has joined #ruby
[08:30:06] neanias: I now speak Portuguese ^
[08:30:26] dionysus69: has joined #ruby
[08:30:51] yorickpeterse: Fun for the whole family: debugging Sinatra regex routes
[08:30:54] anisha: has joined #ruby
[08:31:01] Oog: has joined #ruby
[08:31:01] yorickpeterse: and "why the heck does this not route to where it should"
[08:31:24] apeiros: and that's why I don't have routes to begin with.
[08:31:30] neanias: What's the regex?
[08:31:34] apeiros: because I'm a person entirely devoid of fun.
[08:31:37] neanias: ACTION likes regex
[08:31:51] neanias: apeiros: I'm amazed you even go as far as person!
[08:32:09] apeiros: neanias: people tend to not understand the word 'entity'
[08:32:09] MagePsycho_: ddv, php and ruby are for different purpose.. you just cant compare apple with magoes
[08:32:22] apeiros: MagePsycho_: actually, I can
[08:32:25] neanias: People aren't trying hard enough
[08:32:37] neanias: What's a magoes?
[08:32:43] apeiros: ACTION assumes mangos
[08:32:48] sevenseacat: you really can compare php and ruby
[08:33:02] MagePsycho_: typo ;) mango
[08:33:06] apeiros: you can also really compare apples & mangos & oranges & pears.
[08:33:08] neanias: You can compare anything if you try hard enough
[08:33:18] sevenseacat: one is a shitty scripting language, the other is ruby
[08:33:18] ddv: nothing compares to me tho
[08:33:31] yorickpeterse: ddv: that's because nobody wants to compare themselves to you
[08:33:39] ddv: yorickpeterse: lol
[08:33:43] iateadonut: has joined #ruby
[08:34:23] apeiros: ddv: well, yeah, difficult to go that low ;-p
[08:34:26] MagePsycho_: php > python > ruby
[08:34:44] MagePsycho_: no hard feeling.. statistics speak itself
[08:34:46] apeiros: that explains some things
[08:35:04] adaedra: using statistics to compare languages
[08:35:06] sevenseacat: there's statistics about the quality of language? are they written in php? thats the only way php will come out on top
[08:35:10] apeiros: I mean, of course somebody who thinks php > python > ruby would develop with root privileges???
[08:35:12] ddv: only amateurs use php
[08:35:14] MagePsycho_: i know . you can compare RoR with MVC frameworks of PHP
[08:35:18] sevenseacat: if they're buggy to favour php
[08:35:37] ddv: nothing comes close to rails tho, even django is always trying to be like rails and still fails
[08:36:18] MagePsycho_: there is demand of all those language.. if you guys are good at ruby then why others need to be ;) they should focus on other languages
[08:36:26] MagePsycho_: so that it's win win for all
[08:36:31] sevenseacat: you're more than welcome to focus on php :)
[08:36:49] ddv: ruby is not perfect, take a look at elixir or crystal-lang
[08:36:55] sevenseacat: cuz I really don't want to anymore
[08:37:11] MagePsycho_: nothing is perfect in the world.. you should be adopt to any language
[08:37:12] withnale_: has joined #ruby
[08:37:26] sevenseacat: I sure did, thats why I don't use php anymore
[08:37:38] ddv: come on you love php, sevenseacat
[08:37:48] sevenseacat: I thought it was the shit in like 2004
[08:37:52] neanias: ddv: only behind closed doors
[08:38:02] flughafen: sevenseacat: before you knew any better?
[08:38:15] renderful: has joined #ruby
[08:38:31] MagePsycho_: Go script > python script > ruby script > shell script
[08:38:56] sevenseacat: MagePsycho_ got all the help they needed, now they just want to sit and poke fun
[08:38:59] neanias: MagePsycho_: haskell script
[08:39:07] flughafen: python > ruby > writing binary by hand > php
[08:39:11] sevenseacat: joke's on them
[08:39:14] MagePsycho_: sevenseacat, LOL.. i appreciate you help buddy
[08:39:23] MagePsycho_: your* so many typos
[08:39:23] ddv: buddy :p
[08:39:35] sevenseacat: MagePsycho_: pretty sure the rest of us are laughing at you, not with you.
[08:40:09] adaedra: Or you know, you could just stop trying to compare languages.
[08:40:28] MagePsycho_: so flughafen agrees python > ruby
[08:40:39] neanias: All languages are good for certain purposes
[08:41:02] MagePsycho_: neanias, thats the truth
[08:41:02] adaedra: If only we had a FAQ where this was already explained.
[08:41:09] sevenseacat: I'm not sure when I would ever reach for php over another language
[08:41:25] neanias: I've never touched PHP
[08:41:29] neanias: And I don't intend to
[08:41:32] neanias: Because I don't want to
[08:41:34] adaedra: A virgin :>
[08:41:42] sevenseacat: I did it for quite a few years
[08:41:57] arup_r: has joined #ruby
[08:42:02] sevenseacat: wrote more than my fair share of monstrosities
[08:42:40] MagePsycho_: I am in the process of automating some thing.. and using shell script.. but since it's not so easy for web scraping.. heard about ruby's mechanize.. so thought giving a try
[08:42:52] MagePsycho_: mechanize is simply the best for web scraping
[08:44:36] sevenseacat: I think mechanize uses nokogiri under the hood
[08:44:51] neanias: Take out the middle man then
[08:44:51] lee-jon: has joined #ruby
[08:45:18] nofxx: ruby > python any day, any case
[08:45:37] ddv: nofxx: any arguments?
[08:45:52] adaedra: LOLCODE > *
[08:45:55] neanias: It's Will from Cake
[08:45:59] nofxx: ddv, alphabetical or my personal rank?
[08:46:22] Ox0dea: has joined #ruby
[08:46:28] ddv: oh sorry I read it wrong
[08:46:30] Ox0dea: adaedra: Do you know LOLCODE?
[08:46:51] nofxx: mechanize is good if you need to interact (forms, buttons..).. iirc if you can run inside phantojs
[08:47:00] nofxx: to crawl there's polipus
[08:47:11] adaedra: Ox0dea: from name
[08:47:15] nofxx: *you can even run inside phantom
[08:47:41] Ox0dea: adaedra: Ah, okay. You should totally learn it. :)
[08:48:38] flughafen: ACTION likes phantomjs
[08:48:47] adaedra: uuuuuuuuuugh phantomjs
[08:48:50] neanias: I might learn some more haskell
[08:48:51] mistermocha: has joined #ruby
[08:49:01] flughafen: adaedra: i take it you love phantomjs
[08:49:06] lee-jon: has left #ruby: ()
[08:49:19] ArchRogem: has joined #ruby
[08:49:37] workmad3: has joined #ruby
[08:49:43] adaedra: flughafen: s/ve/athe/
[08:50:28] sevenseacat: ACTION goes to learn more elixir
[08:50:37] sevenseacat: actually the book I'm reading uses clojure
[08:51:54] davedev24_: has joined #ruby
[08:53:02] davedev24: has joined #ruby
[08:53:14] MagePsycho_: sevenseacat, yeah nokogri is there by default in mechanize
[08:53:16] MrQuux: has joined #ruby
[08:53:27] yorickpeterse: phantomjs isn't too bad
[08:53:42] mistermocha: has joined #ruby
[08:53:58] jeanlinux: has joined #ruby
[08:53:59] davedev24: has joined #ruby
[08:54:06] shevy: sevenseacat you are addicted to that elixir!
[08:54:18] sevenseacat: its what keeps me looking so fresh and young.
[08:54:19] kislak: has joined #ruby
[08:55:09] MrQuux: Hi. I have a SOAP interface that returns an error in the form of: "de.foo.bar.SomeJavaClass: 1234: Page is dirty". I intend to match for /de\.foo\.bar\.SomeJavaClass: \d+/ and create a custom error class, where I offer an accessor for the error code, and an accessor for the actual error string ("page is dirty")
[08:55:24] MrQuux: Would this be acceptable design wise?
[08:55:47] ddv: ew soap
[08:56:06] ddv: the java world surely likes old legacy soap stuff apis
[08:56:37] arturaz: has joined #ruby
[08:56:41] ddv: MrQuux: also I have no idea what the problem is
[08:57:38] MrQuux: ddv: The idea of an error class that provides its own logic how to obtain error related data
[08:59:08] thalassa: has joined #ruby
[08:59:12] bnagy: I would reflexively do that with error subclasses
[08:59:24] Musashi007: has joined #ruby
[08:59:44] jlast: has joined #ruby
[08:59:59] jenrzzz: has joined #ruby
[09:00:25] bnagy: because it makes the rescues look prettier when people use your code
[09:00:36] sigurding: has joined #ruby
[09:00:42] solocshaw: has joined #ruby
[09:01:26] bnagy: ToplevelFooErr < StandardError FooPageDirty < ToplevelFooErr
[09:01:38] willhumphreys: has joined #ruby
[09:01:56] bnagy: then raise FooPageDirty, "page is dirty, but yolo!"
[09:02:07] MrQuux: bnagy: So I could subclass for the common errors, and just use the generic versions for the others?
[09:02:22] MrQuux: I have a couple thousand errno in this API. :)
[09:02:42] bnagy: you will always get the string, just subclass for the ones users might conceivably want to handle
[09:02:59] bnagy: or use code generation to create them all, it's like 5 loc
[09:03:50] bnagy: so you can rescue ToplevelFooErr and then just use $! for the error string if you want any errors
[09:03:55] MrQuux: bnagy: Cant, my table just lists an error code and a description what it means. You only get to know that its a PageFault if you catch it.
[09:04:16] blackmes1: has joined #ruby
[09:04:39] bnagy: well worst case you could generate FooErr1234 classes for everything
[09:04:54] bnagy: but whatever, I can't see your code :)
[09:05:31] bnagy: I'm talking about using code generation once to create a .rb file with all the class definitions, if that wasn't clear
[09:05:35] shevy: use your remote sensing powers!
[09:06:26] Oog: has joined #ruby
[09:07:35] MagePsycho_: which ruby cheatsheet you recommend - by learning so many languages confuses you the syntax
[09:08:34] ddv: just read a book
[09:08:38] konsolebox: has joined #ruby
[09:08:41] bnagy: ?cheatsheet
[09:08:42] ruboto: I don't know anything about cheatsheet
[09:09:09] bnagy: derp, it's probably quickref
[09:09:11] bnagy: http://www.zenspider.com/Languages/Ruby/QuickRef.html
[09:09:15] bnagy: ?quickref
[09:09:15] ruboto: http://www.zenspider.com/Languages/Ruby/QuickRef.html
[09:09:20] bnagy: yeah. I suck.
[09:09:46] lkba: has joined #ruby
[09:10:39] Ox0dea: Best parameters for a linear congruential generator?
[09:10:55] shevy: The Oracle is asking a question to the channel inhabitants.
[09:11:03] bnagy: ?linearcongruentialgeneratorparams
[09:11:03] ruboto: I don't know anything about linearcongruentialgeneratorparams
[09:12:12] flughafen: shevy: nothing's taking off for 18 more years
[09:12:13] bnagy: Ox0dea: "It sounds like you're about to do something dangerous with crypto! Would you like help with that?"
[09:12:18] shevy: flughafen lol
[09:12:32] Ox0dea: bnagy: Ha. You're not entirely wrong.
[09:12:34] shevy: he is hacking into the CIA?
[09:14:08] bnagy: I can't even think of a good use for LCGs, tbh
[09:14:14] MagePsycho_: FYI, http://githut.info/
[09:14:15] mistermocha: has joined #ruby
[09:14:26] bnagy: even ruby builtin is better (mersenne twister)
[09:14:37] bnagy: I guess they're really fast
[09:14:39] Ox0dea: bnagy: Right, but I, er, can't use Ruby's builtin...
[09:14:39] Igorshp: has joined #ruby
[09:15:02] bnagy: what do you need the random for?
[09:15:07] Ox0dea: Randomness.
[09:15:09] dangerousdave: has joined #ruby
[09:15:21] bnagy: what are you going to use your randomness for?
[09:15:56] sharpmachine: has joined #ruby
[09:16:03] Ox0dea: Sufficiently unpredictable sequences of numbers?
[09:16:16] platzhirsch: has joined #ruby
[09:16:28] bnagy: ok then you can't use LCGs at all
[09:16:47] yorickpeterse: man, Sinatra's route compilation is fucking wack
[09:16:54] Ox0dea: The randomness doesn't actually need to be cryptographically secure.
[09:17:32] bnagy: first you say unpredictable then you say doesn't need to be unpredictable :)
[09:17:38] ixti: has joined #ruby
[09:17:48] Ox0dea: I was careful to couch with "sufficiently".
[09:18:05] yorickpeterse: e.g. say you have a path at /foo and use get { } then it matches /foo
[09:18:15] yorickpeterse: but if you do get '' { } the regex becomes \A/foo\z
[09:18:39] yorickpeterse: and if you combine this with sinatra-namespace and regex routes you get even crazier stuff
[09:18:55] Scroff: has joined #ruby
[09:20:22] flughafen: everytime i hit play in spotify i immediately have to get up and go to another office
[09:20:25] andikr: has joined #ruby
[09:21:06] fabrice31_: has joined #ruby
[09:22:52] quazimodo: has joined #ruby
[09:25:18] fella5s: has joined #ruby
[09:28:51] workmad3: has joined #ruby
[09:32:44] danielglh: has joined #ruby
[09:34:22] jaimessi: has joined #ruby
[09:34:26] eGGsha: has joined #ruby
[09:34:36] arup_r: has joined #ruby
[09:34:42] christiandsg: has joined #ruby
[09:34:51] jlast: has joined #ruby
[09:34:51] msnyon: has joined #ruby
[09:35:23] _blizzy_: has joined #ruby
[09:36:42] tobacco_joe: has joined #ruby
[09:37:20] bruno-: has joined #ruby
[09:38:25] RegulationD: has joined #ruby
[09:39:19] meph: has joined #ruby
[09:42:11] jlast: has joined #ruby
[09:43:08] _blizzy_: has joined #ruby
[09:44:40] neanderslob_: has joined #ruby
[09:45:10] neanderslob: has joined #ruby
[09:46:31] hotpancakes: has joined #ruby
[09:47:53] ndrei: has joined #ruby
[09:48:19] Zai00: has joined #ruby
[09:49:04] konsolebox: has joined #ruby
[09:51:18] MagePsycho_: how to log in ruby
[09:51:34] futilegames: has joined #ruby
[09:55:18] MagePsycho_: fp = File.new("mechanize.log", "a+"); fp.write() ?
[09:56:17] Oog: has joined #ruby
[09:56:31] eGGsha: has joined #ruby
[09:58:40] bronson: has joined #ruby
[09:58:48] jaimessi: has joined #ruby
[09:58:50] adaedra: There are gems for that
[09:59:34] _joes_: has joined #ruby
[09:59:46] MagePsycho_: adaedra, which gems you use
[10:00:25] adaedra: I used yell
[10:01:19] DLSteve: has joined #ruby
[10:02:16] krz: has joined #ruby
[10:02:48] ndrei: has joined #ruby
[10:06:13] shevy: le french 'ell
[10:06:30] konsolebox: has joined #ruby
[10:07:01] denver: has joined #ruby
[10:07:32] stamina: has joined #ruby
[10:08:24] eightyeights: has joined #ruby
[10:08:32] icosa: has joined #ruby
[10:09:28] olistik: has joined #ruby
[10:11:18] _joes_: has joined #ruby
[10:12:14] Nick_joes: has joined #ruby
[10:12:18] emhs: morning. Trying to get an extconf.rb to run flex and bison, then to compile the results. (current extconf.rb: https://gist.github.com/mbbh/d11c164283bc160d43a5) Someone got any pointers for me? ( a working example would suffice )
[10:16:42] mistermocha: has joined #ruby
[10:16:45] sharpmachine: has joined #ruby
[10:20:17] Siyfion: has joined #ruby
[10:20:25] Ox0dea: What is the penalty for using -> do end?
[10:20:27] rickmasta: has joined #ruby
[10:20:53] shevy: someone will kill a kitten
[10:21:16] Oog: has joined #ruby
[10:21:52] MagePsycho_: -bash: /usr/share/ruby-rvm/scripts/initialize: No such file or directory
[10:22:06] tobacco_joe01: why should there be a penalty?
[10:22:09] neanias: shevy: sounds about right
[10:22:11] astrobun_: has joined #ruby
[10:22:27] MagePsycho_: whenver i do cd /path/ -> gives me the above error
[10:22:31] jlast: has joined #ruby
[10:22:51] mistermo_: has joined #ruby
[10:22:56] shevy: possibly depends on what kind of penalty. Maybe it is super slow
[10:23:06] Ox0dea: No, it just doesn't look right.
[10:23:14] shevy: FINALLY :)
[10:23:16] Ox0dea: -> {} and proc do end, but no mixing.
[10:23:26] shevy: I shall immortalize the Oracle's statement
[10:23:56] Ox0dea: To be clear, I have no problem with stabby lambdas.
[10:24:08] shevy: It just doesn't look right.
[10:24:28] shevy: I actually use {} usually
[10:24:36] shevy: I liked it as visual separator
[10:24:42] shevy: lala.each {
[10:24:52] Ox0dea: Eh, I just use Weirich's rule.
[10:25:00] ytti: shevy, you monster
[10:25:03] shevy: ytti haha
[10:25:06] Igorshp: has joined #ruby
[10:25:16] shevy: well it does not work for DSLs
[10:25:20] shevy: in sinatra I use the do/end
[10:25:27] sdothum: has joined #ruby
[10:25:55] ytti: big thing with do/end is that you need ruby specific intelligence in vim, to get '%' working
[10:26:23] shevy: or just use emacs!
[10:27:36] apeiros: Ox0dea: {} vs. do/end?
[10:27:43] apeiros: if so: jim weirich's rule++
[10:28:44] neanias: Ox0dea, what's Weirich's rule?
[10:29:03] neanias: ytti: vim-ruby obvs
[10:29:57] senayar: has joined #ruby
[10:30:27] Ox0dea: apeiros: I kvetch specifically at the combination of -> and do/end, but otherwise yeah, Weirich's rule is best rule.
[10:30:53] nettoweb: has joined #ruby
[10:31:00] k3asd`: has joined #ruby
[10:31:06] apeiros: but with ->, you always want the return value, therefore -> is always {} according to JW's rule :)
[10:31:14] Oog: has joined #ruby
[10:31:24] Ox0dea: No, that needn't be so.
[10:31:25] apeiros: I don't know what kvetching is, though :D
[10:32:05] apeiros: I'm quite curious for a case where you don't want the return value of -> ^^
[10:32:20] Oog: has joined #ruby
[10:32:26] apeiros: (if you .call it -> return value, if you assign it to a variable -> return value, if you pass it to a method -> return value???)
[10:32:43] Ox0dea: Not if you're passing it to a method simply for the side effects it'll have.
[10:32:47] Ox0dea: Which is admittedly quite unorthodox.
[10:33:06] lokulin: has joined #ruby
[10:33:11] apeiros: that's still using its return value
[10:33:18] apeiros: the return value of -> is the Proc instance you get
[10:33:20] j_mcnally: has joined #ruby
[10:33:25] lkba_: has joined #ruby
[10:33:32] apeiros: and passing that object is using it :)
[10:34:04] apeiros: ->{} doesn't have any immediate side effect. you have to invoke it. one way or another.
[10:34:05] Ox0dea: I learned "kvetch" from Guy Steele's "Growing a Language" talk, in which he limited himself to words of one syllable or those he'd previously defined (using words of one syllable).
[10:34:10] Ox0dea: It's basically "blech".
[10:34:36] apeiros: man, fuck those SAN SSL cert vendors
[10:34:57] apeiros: "we sell you a SAN, but please pay up for each domain you want to add to the cert???"
[10:34:58] konsolebox: has joined #ruby
[10:35:11] shevy: now this is how to make apeiros angry!
[10:35:14] Ox0dea: Let's Encrypt should be interesting.
[10:35:28] apeiros: are they operational already?
[10:35:30] shevy: SSL the world - and pay for it :)
[10:35:37] Ox0dea: apeiros: Coming September.
[10:36:22] khebbie: has joined #ruby
[10:36:23] apeiros: fuck them. does a CNAME to an SSL certified domain name work?
[10:37:21] Ox0dea: It seems that would be the crux of the operation, no?
[10:37:31] ljarvis: undefined method `flap_map' for #<Array
[10:37:34] ljarvis: I do this way too often
[10:37:52] apeiros: you played too much
[10:38:26] mathie: has joined #ruby
[10:38:48] wpp: has joined #ruby
[10:40:01] shevy: bird attack
[10:40:20] shevy: the map that flaps
[10:40:45] shevy: flat_flats
[10:42:02] shevy: https://github.com/ruby/ruby/blob/trunk/ChangeLog
[10:42:14] shevy: "remove mysterious fflush() introduced at r19890, maybe accidentally."
[10:42:21] shevy: mystery code!
[10:43:32] quazimodo: has joined #ruby
[10:43:34] Mon_Ouie: has joined #ruby
[10:44:03] niemcu: has joined #ruby
[10:47:27] lxsameer: has joined #ruby
[10:48:19] Ox0dea: My patch to make Kernel.global_variables not lie (https://gist.github.com/anonymous/4f39fe276dcf168ffa76#file-gvars-patch-L14) would add bewbs to the source tree, but it's probably not gonna get in.
[10:50:49] shevy: why won't it get in?
[10:51:39] agent_white: JUST PUSH IT. PUSH IT GOOD.
[10:52:06] phutchins: has joined #ruby
[10:52:13] konsolebox: has joined #ruby
[10:52:23] Ox0dea: shevy: I do think the code should be "correct" and that methods should return what they say they do, but how often does it really matter that $1-9 are always in there, or that $10+ will never be?
[10:53:38] adaedra: (O)x(0)dea
[10:54:08] Ox0dea: It still bugs me that $1-9 are artificially added to the result, if only because I can't hit upon the logic that made nobu do it.
[10:56:11] shevy: well the logic is simple!
[10:56:15] shevy: $9 is two chars
[10:56:20] shevy: $10 is three chars!!!!
[10:56:52] Ox0dea: It's still a perfectly valid global variable, of course.
[10:57:18] adaedra: $10 is a meal
[10:59:30] nfk: has joined #ruby
[10:59:31] bronson: has joined #ruby
[10:59:34] Ox0dea: >> [defined?($1), global_variables.include?(:$1), ''[/#{'()'*10}/], defined?($10), global_variables.include?(:$10)]
[10:59:35] ruboto: Ox0dea # => [nil, true, "", "global-variable", false] (https://eval.in/394095)
[10:59:39] Ox0dea: That is a very surprising result.
[11:00:34] shevy: it really bugs you
[11:01:07] ddv: rofl I have been seeing the same discussion for weeks
[11:01:24] crazydiamond: has joined #ruby
[11:01:26] Ox0dea: In my defense, `ps aux` has 11 columns.
[11:01:36] solocsha1: has joined #ruby
[11:01:46] sgambino: has joined #ruby
[11:02:05] neanias: MagePsycho_: http://githut.info if you look at Q3/14, it's Python > Ruby > PHP
[11:04:41] AxonetBE: has joined #ruby
[11:05:47] AxonetBE: I do an import of some information through csv and in my mysql database the text is : https://gist.github.com/bigbentobox/bd87b4cd22093dc54e26 You see some starts and I want to make this a html list (ul->li). I thought to use markdown -> html but as it is on the same line it is not working. What other solutions are there?
[11:05:52] blackmes1: has joined #ruby
[11:06:42] willhumphreys: has joined #ruby
[11:06:56] Ox0dea: AxonetBE: Will your list elements ever contain asterisks?
[11:07:11] AxonetBE: AxonetBE: No
[11:07:13] Nick_joes_: has joined #ruby
[11:07:31] Ox0dea: AxonetBE: Then a regular expression could do.
[11:07:40] eGGsha: has joined #ruby
[11:08:41] Ox0dea: AxonetBE: Something along the lines of gsub(/\* ([^*]+)/, '<li>\1</li>')
[11:08:46] AxonetBE: Ox0dea: I also thought about it but how to know from where to where to surround li and ul
[11:09:34] Ox0dea: AxonetBE: Are the lists always going to be introduced with a colon?
[11:10:12] Nick_joes_: has joined #ruby
[11:10:41] Igorshp: has joined #ruby
[11:11:16] AxonetBE: Ox0dea: better maybe to do first the gsub(/\* ([^*]+)/, '<li>\1</li>') part and after find the first <li> and the last </li> and surround it by ul
[11:12:16] platzhirsch: has left #ruby: ()
[11:12:24] veekram: has joined #ruby
[11:12:45] codecop: has joined #ruby
[11:13:00] Ox0dea: >> 'here comes a list * foo * bar * baz'.gsub(/\* ([^*]+)/, '<li>\1</li>').sub(/(<.*>)/, '<ul>\1</ul>')
[11:13:01] ruboto: Ox0dea # => "here comes a list <ul><li>foo </li><li>bar </li><li>baz</li></ul>" (https://eval.in/394100)
[11:13:10] Ox0dea: AxonetBE: ^ That would indeed do the trick, but it looks a little gnarly.
[11:13:38] MagePsycho_: neanias, yeah ruby is dong good, thats why i am in #ruby channel :)
[11:14:15] c355E3B: has joined #ruby
[11:14:51] Ox0dea: -1 for choosing Ruby because of its popularity and not on its merits as a language.
[11:15:20] adaedra: -1 for getting a -1 from Ox0dea
[11:15:40] jesterfraud: has joined #ruby
[11:17:31] sharpmachine: has joined #ruby
[11:17:48] neanias: +1 for something
[11:17:54] heftig: +?????1 for dong
[11:18:46] neanias: +i for dong?
[11:19:02] shevy: ding dong ding dong!
[11:19:25] AxonetBE: Ox0dea: problem with my text https://eval.in/394103 don't see from where it comes
[11:19:26] cek: has joined #ruby
[11:19:27] heftig: don't support the oppression of the number line!
[11:19:35] heftig: wake up, realpe!
[11:19:52] cek: Hi. Need json formatter with color (html) for our support dept.
[11:20:13] jhass: cek: highlight.js
[11:21:57] rodfersou: has joined #ruby
[11:22:22] Ox0dea: AxonetBE: You'll need to put the "m" flag (multi-line) on your regular expressions.
[11:22:27] ndrei: has joined #ruby
[11:23:27] christiandsg: has joined #ruby
[11:24:02] jlast: has joined #ruby
[11:25:31] Ox0dea: AxonetBE: Erm, just the second one, in the call to #sub.
[11:26:00] sigurding: has joined #ruby
[11:26:29] but3k4: has joined #ruby
[11:27:17] RegulationD: has joined #ruby
[11:27:19] diegoviola: has joined #ruby
[11:31:02] senayar: has joined #ruby
[11:32:03] y0da: has joined #ruby
[11:34:33] jeanlinux: has joined #ruby
[11:35:23] lele: has joined #ruby
[11:36:32] Soda: has joined #ruby
[11:36:36] Scroff: has joined #ruby
[11:36:50] Musashi007: has joined #ruby
[11:36:56] pyon: has joined #ruby
[11:37:58] dgutierrez1287: has joined #ruby
[11:38:05] fabrice31: has joined #ruby
[11:38:20] dangerousdave: has joined #ruby
[11:38:46] ldnunes: has joined #ruby
[11:39:02] Vile`: has joined #ruby
[11:40:12] chthon: has joined #ruby
[11:41:21] millerti: has joined #ruby
[11:41:49] joneshf-laptop: has joined #ruby
[11:42:12] chinmay_dd: has joined #ruby
[11:42:21] hotpancakes: has joined #ruby
[11:42:39] joneshf-laptop: has joined #ruby
[11:42:48] varunwachaspati: has joined #ruby
[11:43:21] eGGsha: has joined #ruby
[11:44:35] shevy: gah I can not code in this heat
[11:44:55] aryaching: has joined #ruby
[11:45:00] adaedra: ACTION throws shevy a bucket of ice
[11:47:24] sa233sad: has joined #ruby
[11:47:30] superrorc: has joined #ruby
[11:47:47] ledestin: has joined #ruby
[11:48:37] superrorc: i have string - [15:25:10] [INFO] retrieved: "nfive@mail.ru","d9b17a0af10e7b8a83b8ec04e57b9b78"
[11:49:03] superrorc: trying to select mail and hash like this " .scan(/"\d+\","\d+\"/) "
[11:49:10] superrorc: but it doesnt works
[11:49:13] mistermocha: has joined #ruby
[11:49:58] shevy: did you try rubular.com?
[11:50:53] shevy: btw \d will match for numbers
[11:50:57] Nick_joes_: has joined #ruby
[11:51:11] shevy: look here: http://rubular.com/r/fFlt83Umxx
[11:51:17] shevy: this is not the regex you should use btw, just a demo
[11:51:38] shevy: in the box "Match groups" you can see the two match groups, which will be stored in $1 and $2 respectively
[11:52:01] Pathfinder: has joined #ruby
[11:52:07] shevy: you can improve on that regex - first one for instance, might always include a "@" character
[11:52:12] Tarkers34: has joined #ruby
[11:52:38] ljarvis: >> '[15:25:10] [INFO] retrieved: "nfive@mail.ru","d9b17a0af10e7b8a83b8ec04e57b9b78"'.scan(/"([^"]+)"/)
[11:52:39] ruboto: ljarvis # => [["nfive@mail.ru"], ["d9b17a0af10e7b8a83b8ec04e57b9b78"]] (https://eval.in/394119)
[11:52:54] superrorc: shevy: ow . that is i need! thanks a lot!
[11:52:54] mutuma: has joined #ruby
[11:53:14] shevy: yeah rubular is awesome for finding regexes
[11:53:34] superrorc: yea! and for what need 2d fiels?
[11:53:43] t3k: has joined #ruby
[11:54:00] superrorc: like / reg ex / / here ?
[11:54:12] zacstewart: has joined #ruby
[11:54:13] shevy: hmm where do you see that
[11:54:15] platzhirsch: has joined #ruby
[11:54:15] yorickpeterse: Does Sinatra have a way to customize what regular expressions it generates for named parameters in paths? e.g. "/:id" results in basically /\/([^/?#]+)/ but I want it to use a different pattern (e.g. /\/(\d+)/)
[11:54:20] shevy: I only see / foo /
[11:54:36] ljarvis: yorickpeterse: I think you can use named captures?
[11:54:39] hoofed: has joined #ruby
[11:54:44] yorickpeterse: ljarvis: Yes, so here's the problem:
[11:54:55] yorickpeterse: I can't use regular expressions as paths because we use the paths in our documentation
[11:55:08] ljarvis: yes that does seem like a problem
[11:55:09] yorickpeterse: and "/:id" reads way better than /\d(?<id>\d+)/
[11:55:28] yorickpeterse: that should be /\/(?<id>\d+)/
[11:55:43] yorickpeterse: We use the paths so people actually know where to send their stuff to
[11:58:46] Scroff: has joined #ruby
[11:58:48] _ixti_: has joined #ruby
[11:59:19] khebbie: has joined #ruby
[11:59:20] yorickpeterse: hrmpf, looking at the code I'll have to hack this in
[11:59:32] Zai00: has joined #ruby
[12:01:10] zeeraw: has joined #ruby
[12:02:17] mandarinkin: has joined #ruby
[12:02:36] michael_mbp: has joined #ruby
[12:03:16] balazs: has joined #ruby
[12:06:14] zeeraw: has joined #ruby
[12:06:24] rbennacer: has joined #ruby
[12:06:27] yorickpeterse: https://github.com/sinatra/sinatra/blob/master/lib/sinatra/base.rb#L1650 hnngngng, if only I could easily hijack code here
[12:07:35] senayar: has joined #ruby
[12:09:52] [k-: has joined #ruby
[12:11:34] Igorshp: has joined #ruby
[12:12:25] acke_: has joined #ruby
[12:13:54] acke: has joined #ruby
[12:15:45] thiagovsk: has joined #ruby
[12:16:02] bruno-: has joined #ruby
[12:16:21] matp: has joined #ruby
[12:16:28] abuzze: has joined #ruby
[12:17:40] senayar: has joined #ruby
[12:17:40] senayar: has joined #ruby
[12:18:10] nateberkopec: has joined #ruby
[12:18:16] sharpmachine: has joined #ruby
[12:19:45] bayed: has joined #ruby
[12:21:13] CatMartyn: has joined #ruby
[12:21:49] arturaz: has joined #ruby
[12:22:04] astrobun_: has joined #ruby
[12:22:08] ArchRogem: has joined #ruby
[12:22:31] shevy: Symbols have an encoding?
[12:22:35] shevy: >> :foo.encoding.to_s
[12:22:36] ruboto: shevy # => "US-ASCII" (https://eval.in/394148)
[12:23:02] shum: has joined #ruby
[12:23:19] Tarkers34: has joined #ruby
[12:23:51] [k-: >> :"??".encoding.to_s
[12:23:52] ruboto: [k- # => "UTF-8" (https://eval.in/394149)
[12:23:55] Ox0dea: It makes perfect sense; Symbols are just interned strings.
[12:24:27] yorickpeterse: man it's amazing how taking a poop can give such wonderful ideas
[12:24:34] Alina-malina: has joined #ruby
[12:24:39] Ox0dea: [k-: I made you a thing: https://eval.in/394150
[12:25:07] yorickpeterse: and thanks to Ruby for actually exposing Regex named captures in a Regexp instance
[12:25:19] [k-: noice :3
[12:26:00] yorickpeterse: From the rdoc:
[12:26:03] [k-: there aren't any - tho
[12:26:09] yorickpeterse: If there are no named captures, an empty hash is returned.
[12:26:09] [k-: how does that work
[12:26:10] yorickpeterse: /(.)(.)/.named_captures
[12:26:18] yorickpeterse: somebody had a giggle there I Think
[12:26:27] [k-: ahh different base
[12:26:58] [k-: ((.).(.).(.)) is legit haskell
[12:27:15] Ox0dea: .().().().().() is legit Ruby.
[12:27:24] [k-: that is nothing special
[12:27:28] Ox0dea: You're right.
[12:27:44] varunwachaspati: has joined #ruby
[12:27:56] yorickpeterse: Ox0dea: it's not
[12:28:03] Ox0dea: yorickpeterse: It is.
[12:28:06] yorickpeterse: >> .().().().().()
[12:28:07] ruboto: yorickpeterse # => /tmp/execpad-17b24de75791/source-17b24de75791:2: syntax error, unexpected '.' ...check link for more (https://eval.in/394153)
[12:28:07] RegulationD: has joined #ruby
[12:28:16] Ox0dea: yorickpeterse: I didn't mean by itself.
[12:28:29] Ox0dea: You'd obviously need to call it on a lambda that returned a lambda that returned a lambda...
[12:28:30] [k-: >> class A def .call; self end end; A.new.().().().().().().()
[12:28:31] ruboto: [k- # => /tmp/execpad-2d3980cd969a/source-2d3980cd969a:2: syntax error, unexpected keyword_def, expecting '<' ...check link for more (https://eval.in/394154)
[12:28:50] adaedra: >> A = -> { A }; A.().().().().().()
[12:28:51] ruboto: adaedra # => #<Proc:0x40eae148@/tmp/execpad-8cea00a3f76f/source-8cea00a3f76f:2 (lambda)> (https://eval.in/394155)
[12:28:55] millerti: has joined #ruby
[12:29:12] [k-: >> class A; def call; self end end; A.new.().().().().().().()
[12:29:13] sigurding: has joined #ruby
[12:29:13] ruboto: [k- # => #<A:0x40e63fa8> (https://eval.in/394156)
[12:29:56] Nick_joes: has joined #ruby
[12:30:32] [k-: I learnt from Ox0dea that ends do not need to start on separate lines!
[12:31:02] Ox0dea: [k-: And I learned that from the Japanese.
[12:31:16] Ox0dea: They write such strange Ruby sometimes. I love it, though.
[12:32:03] jerematic: has joined #ruby
[12:32:08] symbol: has joined #ruby
[12:32:20] danielglh: has joined #ruby
[12:32:40] [k-: they know Ruby best
[12:32:52] [k-: afterall, they were the first adopters of ruby
[12:34:55] stardiviner: has joined #ruby
[12:35:21] jeanlinux: has joined #ruby
[12:36:27] Ox0dea: The language's original aesthetic, insofar as it could be said to have such a thing, has certainly become unorthodox, but I suppose that's for the better; a language is its ecosystem, after all.
[12:37:02] but3k4: has joined #ruby
[12:37:20] yorickpeterse: yay I wrote a regex to parse/find/replace regexes
[12:37:51] yorickpeterse: >> '/groups%r{/(?<id>\\d+)/reviews/(?<foo>\w+)/butts}'.gsub(/%r{|}/, '').gsub(/\(\?<([^>]+)>[^\)]+\)/, ':\\1')
[12:37:52] ruboto: yorickpeterse # => "/groups/:id/reviews/:foo/butts" (https://eval.in/394165)
[12:38:08] CloCkWeRX: has joined #ruby
[12:38:21] yorickpeterse: somewhere out there a baby seal just hung itself
[12:38:35] blackmes1: has joined #ruby
[12:38:43] canton7: I swear I wrote a regex to generate regexes at some point...
[12:39:07] eGGsha: has joined #ruby
[12:39:14] willhumphreys: has joined #ruby
[12:40:12] [k-: >> Regexp.union *%w(dog cat human bat)
[12:40:13] ruboto: [k- # => /dog|cat|human|bat/ (https://eval.in/394169)
[12:41:56] yorickpeterse: Hm, it would be nice if you could do something like X.gsub(/%r(.)|$1/, '')/
[12:42:04] yorickpeterse: X.gsub(/%r(.)|$1/, '')
[12:42:15] yorickpeterse: which would replace "%r{" and "}" with ''
[12:42:20] yorickpeterse: or "%r(" and ")"
[12:43:12] [k-: but that would break pita
[12:43:43] [k-: err what was the acronym?
[12:43:58] Ox0dea: It was "surprise" long before "astonishment", I think.
[12:44:21] jhwhite: has joined #ruby
[12:46:09] burgestrand: yorickpeterse: and it would automatically figure out that the closing brace of ( or { is ) or }? :O
[12:46:49] Ox0dea: require 'dwim'; DWIM.dwim
[12:47:18] burgestrand: Magic is scary
[12:47:25] hotpancakes: has joined #ruby
[12:48:22] paulcsmith: has joined #ruby
[12:48:26] iwishiwerearobot: has joined #ruby
[12:48:30] burgestrand: I just found this http://installrails.com/ ??? it's nice to have a how-to install guide. Are there any more similar to this somewhere else?
[12:49:11] danielglh: has joined #ruby
[12:49:14] eGGsha: has joined #ruby
[12:49:14] yorickpeterse: https://github.com/lsegal/yard/issues/835 YAY
[12:49:19] yorickpeterse: another reason not to use fucking Ripper
[12:49:24] Meow-J: has joined #ruby
[12:50:04] yorickpeterse: but surely Ripper is a well designed standard library
[12:50:18] burgestrand: Surely all the standard libraries are well designed and well written
[12:50:24] burgestrand: and well documented and tested
[12:50:52] yorickpeterse: it's been getting better
[12:50:57] yorickpeterse: but Ripper needs to burn
[12:51:22] [k-: you all sound like my online Japanese friend
[12:51:29] [k-: surely ...
[12:51:41] burgestrand: There are many dragons in the standard library, people who dare venture in those depths to slay them are heroes.
[12:51:57] yorickpeterse: My solution is far easier
[12:52:02] yorickpeterse: rm -rf lib/ripper
[12:53:38] [k-: you get commit access if you do venture!
[12:53:50] [k-: Ox0dea - in tr ;-;
[12:55:43] Ox0dea: [k-: This is bad?
[12:56:08] byroniczero: has joined #ruby
[12:56:21] fabrice31: has joined #ruby
[12:57:50] dangerousdave: has joined #ruby
[12:58:22] stardiviner: has joined #ruby
[12:58:41] jaimessi: has joined #ruby
[12:58:54] tmi: has joined #ruby
[12:58:54] sgambino: has joined #ruby
[12:59:18] neanderslob: has joined #ruby
[12:59:49] thelastinuit: has joined #ruby
[13:00:25] bronson: has joined #ruby
[13:01:09] anisha: has joined #ruby
[13:01:12] freerobby: has joined #ruby
[13:01:18] Ox0dea: yorickpeterse: Do you know the significance of those commented-out %%s, and why they differ between parse.y and ripper.y?
[13:01:34] jaimessi: has joined #ruby
[13:01:37] Ox0dea: Never mind, then.
[13:01:56] [k-: what does - mean
[13:02:10] bruno-: has joined #ruby
[13:02:11] yorickpeterse: [k-: it's a dash
[13:02:19] yorickpeterse: Ox0dea: I have no idea what you're asking
[13:02:24] solocshaw: has joined #ruby
[13:02:25] Ox0dea: yorickpeterse: Right, I got that.
[13:02:27] [k-: yorickpeterse you are losing context here
[13:02:27] Ox0dea: No worries.
[13:02:38] Ox0dea: [k-: It lets you specify a range.
[13:02:59] Ox0dea: >> 'abcdefg'.tr('a-g', 'x')
[13:02:59] sigurding: has joined #ruby
[13:03:00] ruboto: Ox0dea # => "xxxxxxx" (https://eval.in/394210)
[13:04:10] [k-: but what if the replacement String has 3 characters
[13:04:29] dblessing: has joined #ruby
[13:04:51] stardiviner: has joined #ruby
[13:05:08] neanias: What language uses '.y'?
[13:05:33] jlast: has joined #ruby
[13:05:58] neanias: Makes sense
[13:06:02] jenksy: has joined #ruby
[13:06:08] Ox0dea: And, by extension, Bison.
[13:06:31] victortyau: has joined #ruby
[13:07:03] Ox0dea: [k-: Ruby's #tr copies the coreutil in repeating the last letter of the replacement, but I think cycling would make more sense.
[13:07:06] lavros: has joined #ruby
[13:07:37] tmtwd: has joined #ruby
[13:08:28] Muhannad: has joined #ruby
[13:08:37] jhass: >> "([{foo)}]".match(/(?>(\()|(\{)|(\[))(?(1)[^\)]+\)|(?(2)[^\}]+\}|(?(3)[^\]]+\]|\A)))/)
[13:08:38] ruboto: jhass # => #<MatchData "([{foo)" 1:"(" 2:nil 3:nil> (https://eval.in/394212)
[13:08:53] jhass: those conditionals are interesting :D
[13:09:15] [k-: pls at least use #{variables}
[13:09:42] [k-: so what does this do .tr('0-2', "$ \n"))
[13:10:13] shevy: mystery code
[13:11:13] bmurt: has joined #ruby
[13:11:16] yorickpeterse: >> 'fooo 0 1 2 3".tr('0-2', "$ \n")
[13:11:17] ruboto: yorickpeterse # => /tmp/execpad-00352f458393/source-00352f458393:2: syntax error, unexpected tINTEGER, expecting keywor ...check link for more (https://eval.in/394213)
[13:11:40] yorickpeterse: >> "fooo 0 1 2 3".tr('0-2', "$ \n")j
[13:11:41] ruboto: yorickpeterse # => /tmp/execpad-e5fef05d2972/source-e5fef05d2972:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/394215)
[13:11:42] sevenseacat: has joined #ruby
[13:11:46] jerius: has joined #ruby
[13:11:46] yorickpeterse: >> "fooo 0 1 2 3".tr('0-2', "$ \n")
[13:11:47] ruboto: yorickpeterse # => "fooo $ \n 3" (https://eval.in/394216)
[13:12:07] rickmasta: has joined #ruby
[13:12:09] Ox0dea: >> puts 455991286304676962.to_s(3).tr('0-2', "$ \n")
[13:12:10] ruboto: Ox0dea # => $$$ $$$ ...check link for more (https://eval.in/394218)
[13:12:15] christiandsg: has joined #ruby
[13:12:26] fenjamin: has joined #ruby
[13:12:37] Ox0dea: [k-: Ternary represents numbers using the digits 0, 1, and 2, and I'm just translating those to the characters used for the ASCII art.
[13:12:57] jlast: has joined #ruby
[13:13:07] jlast: has joined #ruby
[13:13:13] fabrice31_: has joined #ruby
[13:13:31] [k-: but shouldn't tr take - literally?!
[13:13:41] Ox0dea: [k-: Why?
[13:13:52] Ox0dea: Being able to specify ranges is often very convenient.
[13:14:06] [k-: is there a note about this in the docs
[13:14:31] Ox0dea: [k-: I'm sure there is, but it's named after a Unix utility, so not copying the behavior would've been "astonishing".
[13:15:13] [k-: >> "foo x012345".tr "x1-4", "y$"
[13:15:14] ruboto: [k- # => "foo y0$$$$5" (https://eval.in/394223)
[13:15:44] InternetFriend: has joined #ruby
[13:15:51] [k-: this makes it clearer now
[13:16:04] fenjamin: hi, is there a better place to talk about json?
[13:16:10] mistermocha: has joined #ruby
[13:16:25] [k-: is this a bad place? :(
[13:16:29] jhass: fenjamin: what's there much to talk about? it's just a serialization format
[13:16:48] Ox0dea: What's the best cerealization format?
[13:16:54] Ox0dea: libcheerios?
[13:17:03] Bitcrusher01: has joined #ruby
[13:17:15] dangerousdave: has joined #ruby
[13:17:28] shevy: yum, cereals
[13:17:42] avril14th: has joined #ruby
[13:17:44] Ox0dea: -1 for not being able to count higher than two.
[13:18:05] [k-: were we counting?
[13:18:11] Bitcrusher01: Hi guys, I'm a Ruby user and have a question that Google can't seem to answer for me
[13:18:18] Ox0dea: Bitcrusher01: Try one more time.
[13:18:22] fenjamin: i want activity to update across servers
[13:18:29] jhass: Bitcrusher01: sup girl?
[13:18:59] jhass: fenjamin: trying to make a record in being vague?
[13:19:05] sharpmachine: has joined #ruby
[13:19:20] [k-: Ox0dea you are too impatient, he could be typing out his question!
[13:19:29] [k-: that's how irc works
[13:19:32] Ox0dea: [k-: No, I meant that Google can be finicky that way.
[13:19:35] [k-: we split it over many lines
[13:19:37] charliesome: has joined #ruby
[13:19:37] Ox0dea: Sometimes you just need to ask it again.
[13:19:39] Bitcrusher01: How do I use a variable to access a hash key? What works for me is: config[:network_interfaces]
[13:19:43] fenjamin: i can think of this for myself but i would a but of clarity
[13:19:49] [k-: you are ambiguous then!
[13:19:56] shevy: Bitcrusher01 that is a symbol though
[13:20:09] mary5030: has joined #ruby
[13:20:16] shevy: if you really need it a var: var = :network_interfaces; config[var]
[13:20:26] fenjamin: when a transaction occurs, i would like the charts to update on all servers
[13:20:45] Ox0dea: fenjamin: And you think this is a task for JSON?
[13:20:48] jpfuentes2: has joined #ruby
[13:20:57] nettoweb: has joined #ruby
[13:21:08] Bitcrusher01: but the subkey of that has is a variable, and I've tried various combinations to access it: config[:network_interfaces]["#{name}"], config[:network_interfaces][:name] and other variations, with no luck
[13:21:09] mary5030: has joined #ruby
[13:21:45] malconis: has joined #ruby
[13:22:07] Bitcrusher01: shevy: i've tried using config[:network_interfaces][name.to_s] on it as well
[13:22:10] [k-: no, no, its a task for ajax! /s
[13:22:18] Ox0dea: Could be, though.
[13:22:20] adaedra: .to_s will give you a string, you want a symbol, Bitcrusher01
[13:22:34] Ox0dea: Depends on what her Hash actually looks like.
[13:22:35] [k-: Bitcrusher01, symbols and strings are not the same
[13:22:41] adaedra: you need to use .to_sym to obtain a symbol
[13:22:43] Ox0dea: Bitcrusher01: Are you able to post the Hash you're trying to key into?
[13:22:43] jhass: Bitcrusher01: where does name come from and what does it contain
[13:22:52] fenjamin: i'll do some more homework and come back when the weather's better
[13:22:55] [k-: we know she uses symbols as keys!
[13:23:03] ESpiney: has joined #ruby
[13:23:15] fenjamin: you guys going to be around?
[13:23:21] ruboto: we're not all guys - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
[13:23:31] Bitcrusher01: name is the result of a each loop, that has an array of all network interfaces (eth0, eth1, wlan0, etc)
[13:23:39] NeverDie: has joined #ruby
[13:23:49] yorickpeterse: We were all planning on leaving this channel at 17:00
[13:23:55] willhumphreys: has joined #ruby
[13:23:58] failshell: has joined #ruby
[13:24:08] Ox0dea: yorickpeterse: UGT?
[13:24:11] [k-: yes, and its personal time!
[13:24:19] jhass: yorickpeterse: please, use space time. don't assume we're all from earth
[13:24:20] fenjamin: i'll be back a little after that - give you time to leave:-)
[13:24:22] burgestrand: Sangrias at my place.
[13:24:27] leonardoajim: has joined #ruby
[13:24:43] jhass: ?code Bitcrusher01
[13:24:43] ruboto: Bitcrusher01, We can't help you without your code, please post it to https://gist.github.com
[13:25:12] yorickpeterse: jhass: pretty sure none of us in here are in the ISS
[13:25:16] yorickpeterse: so UTC will do just fine
[13:25:25] jhass: you never know!
[13:25:37] Bitcrusher01: The full hash is here: http://pastebin.com/RXH1Jmc1
[13:25:38] ruboto: Bitcrusher01, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/61bde28ef0d4d4eadd55
[13:25:38] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[13:25:41] jvrmaia: has joined #ruby
[13:26:00] Ox0dea: Bitcrusher01: You want foo.to_sym.
[13:26:26] Papierkorb: has joined #ruby
[13:27:45] InternetFriend: has joined #ruby
[13:28:07] [k-: I prefer #intern
[13:28:08] Bitcrusher01: Ox0dea: I'll try that right now
[13:28:16] Bitcrusher01: ruboto: sorry about that
[13:28:17] i8igmac: has joined #ruby
[13:28:34] [k-: you don't have to press shift to get an underscore too, so that's a bonus
[13:29:02] RegulationD: has joined #ruby
[13:29:07] paulcsmith: has joined #ruby
[13:29:09] Ox0dea: It breaks symmetry with all the other to_* methods, though.
[13:29:37] neanias: [k-: what does #intern do?
[13:29:42] Ox0dea: It's an alias for #to_sym.
[13:30:03] Ox0dea: [k-: It's okay, though; the to_* methods are already kind of asymmetrical:
[13:30:05] Ox0dea: >> class Fixnum; def to_a; [:lol] end; def to_hash; {wt: ?f} end end; [*4, **2]
[13:30:06] ruboto: Ox0dea # => [:lol, {:wt=>"f"}] (https://eval.in/394246)
[13:30:15] decoponio: has joined #ruby
[13:30:20] Ox0dea: #to_a for * coercion, #to_hash for **.
[13:30:31] sideshowcoder: has joined #ruby
[13:31:05] [k-: I knew that!
[13:32:21] zacstewart: has joined #ruby
[13:33:20] JoshL: has joined #ruby
[13:33:47] di3soft: has joined #ruby
[13:33:51] dangerousdave: has joined #ruby
[13:34:19] di3soft: has joined #ruby
[13:34:37] shevy: hmm when do I use .force_encoding and when do I use .encode
[13:34:49] tmtwd: has joined #ruby
[13:35:14] Bitcrusher01: Ox0dea: I've tried puts config[:network_interfaces][name.to_sym], but it does not work
[13:35:16] burgestrand: shevy: source.force_encoding(target) is used when the source is already in the target encoding, but ruby doesn't know it yet.
[13:35:24] hinbody: has joined #ruby
[13:35:28] [k-: are you not using UTF-8? Monster!
[13:35:30] shevy: very strange
[13:35:54] burgestrand: shevy: source.encode(target) is used when the source is in some encoding, and you want ruby to change the data to turn it into the target encoding.
[13:36:00] shevy: [k- actually I do have to use UTF-8 as well now :(
[13:36:15] Ox0dea: Bitcrusher01: Does config[:network_interfaces][:eth0] work?
[13:36:27] [k-: Bitcrusher01, replace Hash#[] with Hash#fetch
[13:36:34] shevy: [k- ruby-gnome uses it internally and yaml require it as well
[13:36:46] [k-: shevy of course they do!
[13:36:51] [k-: you monster!
[13:37:01] devdazed: has joined #ruby
[13:37:02] tvw: has joined #ruby
[13:37:07] Bitcrusher01: Ox0dea: yes it does
[13:37:17] burgestrand: Bitcrusher01: I believe it'll be easier to help you if you post an example that can be run that is failing for you. Try to keep it short.
[13:37:19] Bitcrusher01: [k-: I don't know you mean by that
[13:37:30] shevy: Burgestrand when you handle encoding-related issues, do you ever find yourself to have to do: force_encoding() and also encode() at the same time, or in the same program?
[13:37:34] burgestrand: Bitcrusher01: as in, not just the hash, but an actual runnable example.
[13:37:55] burgestrand: shevy: yes, for example if data is coming from somewhere and the encoding associated with that string is wrong.
[13:38:18] pullphinger15: has joined #ruby
[13:38:28] [k-: I mean to replace all the object[name.to_sym] with object.fetch(name.to_sym)
[13:38:30] burgestrand: shevy: consider for example, you have data coming in from some websocket gem, in encoding BINARY. You *know* that the data coming in is ALWAYS in Latin-1, but you want it in UTF-8.
[13:38:37] mistermocha: has joined #ruby
[13:38:38] Channel6: has joined #ruby
[13:38:39] Igorshp: has joined #ruby
[13:38:55] whippythellama: has joined #ruby
[13:38:55] sngeth: has joined #ruby
[13:39:01] burgestrand: shevy: in which case you would do: websocket.read.force_encoding("ISO-8859-1").encode("UTF-8")
[13:39:10] Bitcrusher01: Burgestrand: i currently relies heavy on server_spec and other libs - I'll try to make it independent of it...
[13:39:47] Ox0dea: Bitcrusher01: Debug print the value of `name` and ensure it doesn't contain any leading or trailing spaces.
[13:39:50] theery: has joined #ruby
[13:40:05] icflournoy: has joined #ruby
[13:40:10] pullphinger: has joined #ruby
[13:40:20] Ox0dea: >> :eth0 == 'eth0'.to_sym
[13:40:21] ruboto: Ox0dea # => true (https://eval.in/394277)
[13:40:23] Ox0dea: Bitcrusher01: ^
[13:40:27] burgestrand: shevy: I guess another name for #force_encoding could have been #encoding= :)
[13:40:29] Guest54365: has joined #ruby
[13:40:38] shevy: [k- do your chinese symbols work in UTF-8?
[13:40:44] [k-: ACTION withdraws
[13:40:48] [k-: yes they do
[13:41:31] duggiefresh: has joined #ruby
[13:41:47] icebourg: has joined #ruby
[13:41:57] decoponyo: has joined #ruby
[13:42:48] pullphinger: has joined #ruby
[13:43:11] anisha: has joined #ruby
[13:43:52] pandaant: has joined #ruby
[13:45:59] joonty: has joined #ruby
[13:46:01] rbennacer: has joined #ruby
[13:46:45] hotpancakes: has joined #ruby
[13:46:54] quazimodo: has joined #ruby
[13:47:32] eGGsha: has joined #ruby
[13:47:33] darkf_: has joined #ruby
[13:47:54] charliesome: has joined #ruby
[13:48:49] Bitcrusher01: Ox0dea: sorry, was just called away
[13:49:25] Bitcrusher01: Ox0dea: it's not a problem when I have string - it's a problem when I have a variable containing a string, I want to convert to a symbol
[13:49:35] fmcgeough: has joined #ruby
[13:49:36] yeticry: has joined #ruby
[13:49:50] Ox0dea: >> foo = 'eth0'; foo.to_sym
[13:49:51] ruboto: Ox0dea # => :eth0 (https://eval.in/394296)
[13:49:55] dstarh: has joined #ruby
[13:50:13] JDiPierro: has joined #ruby
[13:50:46] havenwood: has joined #ruby
[13:51:28] [k-: >> foo = "eth0; :"#{foo}"
[13:51:29] ruboto: [k- # => "eth0; :" (https://eval.in/394300)
[13:51:32] Bitcrusher01: Here is the code standalone: https://gist.github.com/anonymous/cc565e5795cc0d19345a
[13:51:48] [k-: foo = "eth0"; :"#{foo}"
[13:52:03] [k-: >> foo = "eth0"; :"#{foo}"
[13:52:04] ruboto: [k- # => :eth0 (https://eval.in/394303)
[13:52:36] rbennacer: has joined #ruby
[13:53:06] burgestrand: Bitcrusher01: readlines also include a final \n.
[13:53:10] [k-: >> [%i(eth0).first, foo = "eth0"; %I(#{foo}).first]
[13:53:11] ruboto: [k- # => /tmp/execpad-85ae7aa15451/source-85ae7aa15451:2: syntax error, unexpected ';', expecting ']' ...check link for more (https://eval.in/394304)
[13:53:21] Scroff: has joined #ruby
[13:53:23] burgestrand: Bitcrusher01: it doesn't chop it off for every line, so each iface will have a line break at the end.
[13:53:35] Ox0dea: Bitcrusher01: I told you to check for that, by the way. :)
[13:53:49] pullphinger: has joined #ruby
[13:53:52] [k-: >> foo="eth0"; [%i(eth0).first,%I(#{foo}).first]
[13:53:53] ruboto: [k- # => [:eth0, :eth0] (https://eval.in/394306)
[13:53:56] Bitcrusher01: shit! is there a way to get readlines, without it or will I have to replace it "manually"?
[13:54:06] griffindy: has joined #ruby
[13:54:16] burgestrand: Bitcrusher01: you can do iface.rstrip.to_sym is one way, it's possible there's a #readlines without the trailing newline as well.
[13:54:17] [k-: use .chomp
[13:54:28] Ox0dea: Bitcrusher01: You could also do read.split("\n")
[13:54:54] [k-: well, that be better than chomping all the messages
[13:55:12] Ox0dea: No sense creating two arrays when one'll do.
[13:55:23] TheBrayn: isn't there a built-in way of getting ip adresses?
[13:55:33] TheBrayn: instead of calling ip addr and sed
[13:55:44] [k-: how many ways are there to obtain symbols from strings
[13:56:15] rwilcox: has joined #ruby
[13:56:23] Bitcrusher01: Ox0dea: i'll try that instead
[13:56:33] Bitcrusher01: Thanks for the input :)
[13:56:40] Ox0dea: Sure thing.
[13:56:46] burgestrand: TheBrayn: yes, through methods on Socket.
[13:57:00] TheBrayn: s/ip addresses/interfaces/
[13:57:21] [k-: I counted 5!
[13:57:31] Ox0dea: Are you counting #send?
[13:57:53] denver: has joined #ruby
[13:58:11] jpfuentes2: has joined #ruby
[13:58:18] [k-: >> Symbol.new("eth0") # haven't counted thid
[13:58:19] ruboto: [k- # => undefined method `new' for Symbol:Class (NoMethodError) ...check link for more (https://eval.in/394314)
[13:58:41] Bitcrusher01: It totally works now - thank you :)
[13:58:49] Ox0dea: >> Symbol.allocate
[13:58:50] ruboto: Ox0dea # => allocator undefined for Symbol (TypeError) ...check link for more (https://eval.in/394316)
[13:59:07] [k-: if we count send we should count public_send too!
[13:59:10] [k-: and eval
[13:59:14] [k-: instance_eval
[13:59:19] [k-: instance_exec
[13:59:24] [k-: module_exec
[13:59:29] [k-: class_exec
[14:00:13] pulgolino: has joined #ruby
[14:00:20] jvrmaia: has joined #ruby
[14:00:21] burgestrand: >> Socket.getifaddrs.map(&:addr).select(&:ip?).map(&:ip_address)
[14:00:22] ruboto: Burgestrand # => uninitialized constant Socket (NameError) ...check link for more (https://eval.in/394317)
[14:01:04] [k-: that's 3 loops!
[14:01:10] TheBrayn: and the interfaces?
[14:01:11] [k-: and many allocations!
[14:01:37] burgestrand: TheBrayn: they're all in Socket.getifaddrs, I'm just reducing the collection to find only those containing an ip address.
[14:01:56] umgrosscol: has joined #ruby
[14:01:57] burgestrand: [k-: Socket.getifaddrs.lazy.map(&:addr).select(&:ip?).map(&:ip_address).to_a
[14:02:03] burgestrand: [k-: there you go :-(
[14:02:28] neanias: >> Socket.getifaddrs.lazy.map(&:addr).select(&:ip?).map(&:ip_address).to_a
[14:02:29] ruboto: neanias # => uninitialized constant Socket (NameError) ...check link for more (https://eval.in/394321)
[14:02:35] neanias: >> require 'socket'; Socket.getifaddrs.lazy.map(&:addr).select(&:ip?).map(&:ip_address).to_a
[14:02:36] ruboto: neanias # => (https://eval.in/394322)
[14:02:50] varunwachaspati: has joined #ruby
[14:02:55] tvw: has joined #ruby
[14:02:57] Ox0dea: >> require 'fiddle'; Fiddle::Pointer.new(:x.__id__)[0]
[14:02:58] ruboto: Ox0dea # => /tmp/execpad-0a16c09770ba/source-0a16c09770ba:2: [BUG] Segmentation fault at 0x0565f2 ...check link for more (https://eval.in/394323)
[14:03:02] Ox0dea: Well, that didn't go well.
[14:03:45] dopie: has joined #ruby
[14:03:47] inoic: has joined #ruby
[14:03:57] eggoez: has joined #ruby
[14:04:01] Ox0dea: [k-: I thought maybe the class-changing trick from the other day would work to turn numbers into the Symbol at that address.
[14:04:10] christiandsg: has joined #ruby
[14:04:35] yeticry: has joined #ruby
[14:04:38] balazs: has joined #ruby
[14:04:56] Ox0dea: Symbols really do get "internalized"; they don't behave like normal objects at all.
[14:05:08] senayar: has joined #ruby
[14:05:26] Ox0dea: Internally, pretty much every object's "root" is an RBasic construct containing flags and the object's class, but not Symbols.
[14:05:28] [k-: >> {f: ?&}.keys.first
[14:05:29] ruboto: [k- # => :f (https://eval.in/394326)
[14:05:35] [k-: that's 6!
[14:05:47] Ox0dea: That's not turning a String into a Symbol, though.
[14:05:47] inoic: just wondering if the convention in Ruby for `a < 1000` is `a < 1_000` ??? is 1_000 preferred? I'm doing the full stack track at Bloc.io and that's how they write 1000, 2000, etc.
[14:05:56] hinbody: has joined #ruby
[14:06:14] [k-: wellllllllll
[14:06:23] Ox0dea: inoic: Doesn't strike me as very idiomatic.
[14:06:42] inoic: Yeah me neither, I mean 1000 is certainly more readable.
[14:07:05] burgestrand: inoic: for larger numbers I do it, but 1000 is a bit too low.
[14:07:10] Ox0dea: > Add underscores to large numeric literals to improve their readability.
[14:07:15] Ox0dea: That's all the style guide's got to say on it.
[14:07:42] inoic: Burgestrand: I guess they're just trying to introduce a convention and use 1000 as an example.
[14:07:43] [k-: >> /(?<#{"foop"}>hey)/.match("foop")
[14:07:44] ruboto: [k- # => nil (https://eval.in/394327)
[14:07:45] burgestrand: inoic: I have really bad troubles reading anything with the same number repeated more than 3 times.
[14:07:47] Ox0dea: >> 0b1001_1100_0010_0110
[14:07:48] ruboto: Ox0dea # => 39974 (https://eval.in/394328)
[14:07:54] _blizzy_: has joined #ruby
[14:07:54] inoic: Alright makes sense. Thanks!
[14:08:03] casadei: has joined #ruby
[14:08:20] [k-: >> /(?<#{"foop"}>hey)/.match("hey")
[14:08:21] ruboto: [k- # => #<MatchData "hey" foop:"hey"> (https://eval.in/394329)
[14:08:22] burgestrand: inoic: but in general, go with what the surrounding code looks like.
[14:08:34] [k-: now to extract the key
[14:08:43] inoic: Sounds good.
[14:08:44] burgestrand: >> define_method("hello") {}
[14:08:45] ruboto: Burgestrand # => :hello (https://eval.in/394330)
[14:09:03] Ox0dea: >> def hello() end
[14:09:04] ruboto: Ox0dea # => :hello (https://eval.in/394331)
[14:09:21] Ox0dea: Oh, right, strings.
[14:09:27] JDiPierro: has joined #ruby
[14:09:38] sepp2k: has joined #ruby
[14:11:49] [k-: >> eval(":foo")
[14:11:50] ruboto: [k- # => :foo (https://eval.in/394333)
[14:12:00] senayar: has joined #ruby
[14:12:00] senayar: has joined #ruby
[14:12:25] Ox0dea: >> %I(#{'foo'})
[14:12:26] ruboto: Ox0dea # => [:foo] (https://eval.in/394334)
[14:12:42] gamename: has joined #ruby
[14:12:44] Zamyatin: has joined #ruby
[14:12:52] krz: has joined #ruby
[14:13:37] [k-: I did that already
[14:13:52] [k-: it's wayyyyy above
[14:14:01] Ox0dea: Seems you did. Whoops.
[14:14:10] Ox0dea: I wonder why %s doesn't have an interpolating variation.
[14:14:11] shevy: evil == [k-
[14:14:29] shevy: the knights who said
[14:14:34] Ox0dea: evil *would* return a non-boolean for equality checks.
[14:14:37] j_mcnally: has joined #ruby
[14:14:37] [k-: shevy, you don't experiment with Ruby anymore :(
[14:14:51] shevy: well, I experiment with it if the end result is better
[14:14:56] _blizzy_: has joined #ruby
[14:15:16] EagleDelta: has joined #ruby
[14:15:25] Ox0dea: That sentence is temporally nonsensical.
[14:15:27] k3asd`: has joined #ruby
[14:15:38] shevy: The Oracle is idling.
[14:15:59] Ox0dea: How can you know the outcome of an experiment prior to doing it?
[14:16:06] Ox0dea: Have you secretly been the Oracle all along?
[14:16:13] shevy: I look at your code and notice how awful things can be!
[14:16:24] shevy: though [k- outperformed you some days ago
[14:16:38] gamename: has joined #ruby
[14:16:44] jeanjack: has joined #ruby
[14:16:57] veekram: has joined #ruby
[14:17:00] shevy: -> do end
[14:17:36] shevy: [k- show some newer code :)
[14:17:41] neanias: >> eval(1 + 2)
[14:17:42] ruboto: neanias # => no implicit conversion of Fixnum into String (TypeError) ...check link for more (https://eval.in/394336)
[14:17:48] neanias: eval('ls')
[14:17:56] neanias: >> eval('ls')
[14:17:57] ruboto: neanias # => undefined local variable or method `ls' for main:Object (NameError) ...check link for more (https://eval.in/394337)
[14:18:02] [k-: >> `ls`
[14:18:02] ruboto: neanias # => (https://eval.in/394338)
[14:18:03] ruboto: [k- # => (https://eval.in/394339)
[14:18:25] sarkyniin: has joined #ruby
[14:18:42] werelivinginthef: has joined #ruby
[14:18:47] hinbody: has joined #ruby
[14:18:56] [k-: >> LALALA="LALALA"; Module.constants # does this count
[14:18:58] ruboto: [k- # => [:Object, :Module, :Class, :BasicObject, :Kernel, :NilClass, :NIL, :Data, :TrueClass, :TRUE, :FalseC ...check link for more (https://eval.in/394340)
[14:19:07] xcesariox: has joined #ruby
[14:19:35] msnyon: has joined #ruby
[14:19:52] sharpmachine: has joined #ruby
[14:20:40] quazimodo: has joined #ruby
[14:20:43] [k-: >> Module.const_set("T", ?T); Module.constants.last(5)
[14:20:44] ruboto: [k- # => [:Queue, :SizedQueue, :MonitorMixin, :Monitor, :RUBYGEMS_ACTIVATION_MONITOR] (https://eval.in/394341)
[14:20:46] sshuff: has joined #ruby
[14:21:05] [k-: >> Module.const_set("T", ?T); Module.constants
[14:21:06] ruboto: [k- # => [:Object, :Module, :Class, :BasicObject, :Kernel, :NilClass, :NIL, :Data, :TrueClass, :TRUE, :FalseC ...check link for more (https://eval.in/394342)
[14:21:12] RegulationD: has joined #ruby
[14:21:38] hotpancakes: has joined #ruby
[14:21:58] [k-: can't see T at all
[14:22:11] blackmes1: has joined #ruby
[14:23:06] gamename: has joined #ruby
[14:23:09] enebo: has joined #ruby
[14:23:19] Ox0dea: >> Object.const_set('Foo', 1); Object.constants.grep(/Foo/)[0]
[14:23:20] ruboto: Ox0dea # => :Foo (https://eval.in/394343)
[14:23:34] GriffinHeart: has joined #ruby
[14:23:52] Ox0dea: >> Dir['*']
[14:23:53] ruboto: Ox0dea # => ["output-7cf23a8dea0a", "input-7cf23a8dea0a", "source-7cf23a8dea0a"] (https://eval.in/394345)
[14:24:08] cochise: has joined #ruby
[14:24:11] Ox0dea: >> File.read('source-7cf23a8dea0a')
[14:24:12] ruboto: Ox0dea # => No such file or directory @ rb_sysopen - source-7cf23a8dea0a (Errno::ENOENT) ...check link for more (https://eval.in/394346)
[14:24:19] axl_: has joined #ruby
[14:24:31] [k-: >> a = 1; binding.local_variables
[14:24:32] ruboto: [k- # => [:a] (https://eval.in/394347)
[14:24:45] [k-: not String tho :(
[14:24:53] Ox0dea: No need for the binding, for what it's worth.
[14:25:13] jvrmaia: has joined #ruby
[14:25:35] neanias: >> Dir.pwd
[14:25:36] ruboto: neanias # => "/tmp/execpad-27a026c001ca" (https://eval.in/394348)
[14:25:42] kies^: has joined #ruby
[14:26:16] Ox0dea: >> instance_variable_set("@foo", 1); instance_variables[0]
[14:26:17] ruboto: Ox0dea # => :@foo (https://eval.in/394350)
[14:26:27] pullphinger: has joined #ruby
[14:26:51] fella6s: has joined #ruby
[14:27:45] DLSteve: has joined #ruby
[14:29:30] TTilus: has joined #ruby
[14:29:56] Ox0dea: >> d = Dir.pwd; IO.read(d + '/output-' + d[/\h+$/])
[14:29:57] ruboto: Ox0dea # => "" (https://eval.in/394356)
[14:30:10] Ox0dea: >> d = Dir.pwd; puts IO.read(d + '/output-' + d[/\h+$/])
[14:30:11] ruboto: Ox0dea # => ...check link for more (https://eval.in/394357)
[14:30:22] [k-: >> Symbol.all_symbols
[14:30:23] ruboto: [k- # => [:!, :"\"", :"#", :"$", :%, :&, :"'", :"(", :")", :*, :+, :",", :-, :".", :/, :":", :";", :<, :"=", ...check link for more (https://eval.in/394358)
[14:30:42] [k-: >> Symbol.all_symbols.length
[14:30:43] ruboto: [k- # => 2511 (https://eval.in/394360)
[14:31:11] Ox0dea: >> ObjectSpace.each_object.count
[14:31:12] freerobby: has joined #ruby
[14:31:12] ruboto: Ox0dea # => 12221 (https://eval.in/394361)
[14:31:15] bronson: has joined #ruby
[14:31:42] quimrstorres: has joined #ruby
[14:31:47] [k-: that's 1/6!
[14:33:38] snockerton: has joined #ruby
[14:33:50] arturmartins: has joined #ruby
[14:34:02] neanias: >> 2511 / 12221
[14:34:03] ruboto: neanias # => 0 (https://eval.in/394362)
[14:34:09] dhjondoh: has joined #ruby
[14:34:13] neanias: >> 2511 / 12221.0
[14:34:14] ruboto: neanias # => 0.2054660011455691 (https://eval.in/394363)
[14:34:52] neanias: >> require 'bigdecimal'; BigDecimal.new('2511') / BigDecimal.new('12221')
[14:34:53] ruboto: neanias # => #<BigDecimal:40b9e3a4,'0.2054660011 45569102E0',18(36)> (https://eval.in/394364)
[14:35:00] [k-: I rounded off to highest placimg
[14:35:20] neanias: It's closer to 1/5
[14:35:24] [k-: >> 2000.to_rational/12000
[14:35:25] ruboto: [k- # => undefined method `to_rational' for 2000:Fixnum (NoMethodError) ...check link for more (https://eval.in/394365)
[14:35:43] [k-: >> 2000.to_r/12000
[14:35:44] ruboto: [k- # => (1/6) (https://eval.in/394366)
[14:36:07] [k-: this is called estimation!
[14:36:09] Ox0dea: [k-: Ruby has rational literals.
[14:36:19] [k-: >. 2000r
[14:36:24] ruboto: Ox0dea # => (0+(2/1)*i) (https://eval.in/394367)
[14:36:32] ruboto: [k- # => (2/1) (https://eval.in/394368)
[14:36:34] Ox0dea: But not `2ir` for some reason.
[14:36:40] [k-: o noice
[14:36:50] Ox0dea: >> ObjectSpace.each_object(Bignum).to_a
[14:36:51] ruboto: Ox0dea # => [1106001736, 1105955520, 18446744073709551615, 25823805195023478761146785925466853366, 1105147640] (https://eval.in/394369)
[14:36:53] Ox0dea: I wonder what those are.
[14:37:21] neanias: What's the ri do?
[14:37:25] ruboto: neanias # => (0+(3/1)*i) (https://eval.in/394370)
[14:37:28] Ox0dea: Imaginary rational.
[14:37:31] [k-: r is rational
[14:37:34] [k-: I is imaginary
[14:37:37] ruboto: neanias # => (3/1) (https://eval.in/394371)
[14:38:07] Ox0dea: >> [0.1 + 0.2, 0.1r + 0.2r]
[14:38:08] ruboto: Ox0dea # => [0.30000000000000004, (3/10)] (https://eval.in/394372)
[14:38:12] lkba: has joined #ruby
[14:38:13] burgestrand: >> (2 ** 64 - 1) == 18446744073709551615
[14:38:14] ruboto: Burgestrand # => true (https://eval.in/394373)
[14:38:31] sdothum: has joined #ruby
[14:38:32] Ox0dea: Burgestrand: How about the monster?
[14:38:48] burgestrand: Ox0dea: no idea, I haven't added that useless knowledge to my bank yet. :p
[14:38:52] [k-: 2 ** 128?
[14:38:57] Ox0dea: Probably something to do with SSL.
[14:39:40] [k-: SSL wasn't required?
[14:39:52] ta: has joined #ruby
[14:39:58] Ox0dea: Fair point, but maybe there's some internal preparation.
[14:40:26] Igorshp: has joined #ruby
[14:40:32] renderful: has joined #ruby
[14:40:34] burgestrand: Wonder if it's always the same.
[14:40:37] burgestrand: >> ObjectSpace.each_object(Bignum).to_a
[14:40:38] Ox0dea: It's not.
[14:40:38] ruboto: Burgestrand # => [1104318288, 1104272072, 18446744073709551615, 206469298196742749142725102654777982875, 1104548168] (https://eval.in/394376)
[14:40:59] hoofed_: has joined #ruby
[14:41:05] jonathanwallace: has joined #ruby
[14:41:11] jhass: ?experiment
[14:41:11] ruboto: Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
[14:41:12] intinig: has joined #ruby
[14:41:31] bruno-: has joined #ruby
[14:42:19] wildroman2: has joined #ruby
[14:42:52] [k-: he was demonstrating that it was not the same :3
[14:43:12] agent_white: Or as Trillian would say: Buttons are not toys!
[14:43:54] [k-: yes they are!
[14:44:40] foureight84: has joined #ruby
[14:45:05] Ox0dea: Ugh, where is that Bignum coming from?!
[14:45:48] Igorshp_: has joined #ruby
[14:46:46] [k-: >> [foo = ObjectSpace.each_object(Exception).to_a, foo.count]
[14:46:47] ruboto: [k- # => [[#<IOError: stream closed>, #<NoMemoryError: failed to allocate memory>, #<SystemStackError: stack ...check link for more (https://eval.in/394377)
[14:46:48] jeanlinux: has joined #ruby
[14:47:04] neanias: >> (2r + 1r).to_f
[14:47:06] ruboto: neanias # => 3.0 (https://eval.in/394378)
[14:47:41] [k-: rationals are just what we need to do precise calculations!
[14:47:51] neanias: >> require 'bigdecimal'; (BigDecimal.new('0.2') + BigDecimal.new('0.1')).to_f
[14:47:52] ruboto: neanias # => 0.3 (https://eval.in/394379)
[14:47:52] CloCkWeRX: has joined #ruby
[14:48:09] neanias: >> 0.001r + 0.002r
[14:48:10] ruboto: neanias # => (3/1000) (https://eval.in/394380)
[14:48:18] [k-: #<fatal: exception reentered>,
[14:48:19] neanias: >> (0.001r + 0.002r).to_f
[14:48:20] ruboto: neanias # => 0.003 (https://eval.in/394381)
[14:48:37] neanias: >> (0.001r + 0.002r).to_f == (0.001 + 0.002)
[14:48:38] ruboto: neanias # => true (https://eval.in/394382)
[14:48:45] jhass: neanias: what are you proving?
[14:48:49] jhass: and to who?
[14:48:52] mistermocha: has joined #ruby
[14:48:53] neanias: Just mucking about
[14:49:00] neanias: Should probably do that on pry
[14:49:01] jhass: ?experiment neanias
[14:49:01] ruboto: neanias, Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
[14:49:18] ruboto: I don't know anything about ddv
[14:49:20] ruboto: Please use https://gist.github.com for more than three lines of text!
[14:49:40] shevy: neanias and Ox0dea really had fun with ruboto while I was gone
[14:49:51] neanias: shevy: cheeky
[14:50:00] [k-: you don't use bots anyway shevy
[14:50:04] dopie: has joined #ruby
[14:50:15] shevy: my first ruby program was an IRC bot
[14:50:25] shevy: I broke it years ago though :(
[14:50:27] neanias: Anyway, I was fascinated by this new rational literal
[14:50:34] neanias: My IRC bot is written in Ruby
[14:50:36] neanias: It uses cinch
[14:50:44] neanias: Cinch is goo
[14:51:09] mistermocha: has joined #ruby
[14:51:13] ljarvis: some might say it's a.. cinch
[14:51:25] [k-: real irc bots use their own frameworks!
[14:51:41] ljarvis: ^ this is why there are so many broken irc bots
[14:51:41] Ox0dea: I made a ruboto "quine":
[14:51:43] Ox0dea: >> d = Dir.pwd; IO.read(d + '/source-' + d[/\h+$/]).lines[1]
[14:51:44] ruboto: Ox0dea # => " d = Dir.pwd; IO.read(d + '/source-' + d[/\\h+$/]).lines[1]\n" (https://eval.in/394385)
[14:52:58] dangerousdave: has joined #ruby
[14:53:25] adaedra: neanias: who doesn't have his cinch bot? :o
[14:53:34] [k-: >> File.open(__FILE__).readlines(__LINE__)
[14:53:35] ruboto: [k- # => ["p ", "be", "gi", "n\n", " ", "Fi", "le", ".o", "pe", "n(", "__", "FI", "LE", "__", ").", "re", "a ...check link for more (https://eval.in/394386)
[14:53:37] jschoolcraft: has joined #ruby
[14:53:49] Ox0dea: What even.
[14:54:24] Ox0dea: You told it to read in chunks of two.
[14:54:42] shevy: we need a lego-bot
[14:55:10] [k-: >> File.open(__FILE__).readlines.to_a[__LINE__]
[14:55:11] ruboto: [k- # => "rescue Exception\n" (https://eval.in/394387)
[14:55:23] jhass: >> File.readlines(__FILE__)[__LINE__-1]
[14:55:24] ruboto: jhass # => " File.readlines(__FILE__)[__LINE__-1]\n" (https://eval.in/394388)
[14:55:27] burgestrand: Ox0dea: tried to find the magic number by excluding rubygems and encdb, but no luck??? http://pastie.org/private/zyzojtrl6ouajwlldeoa
[14:55:57] shevy: if we have a file called foo.rb and one module is in it called module Bar; end, how would you let ruby know that this is the main namespace/constant of that file?
[14:56:22] burgestrand: Could it be the random seed?
[14:56:24] [k-: require "foo"; Bar
[14:56:40] shevy: [k- but you know the name!
[14:56:56] burgestrand: shevy: what do you mean by main?
[14:57:06] shevy: I have a module here which has lots of array constants
[14:57:10] Azulinho: has joined #ruby
[14:57:17] yorickpeterse: ACTION just realized it's Burgestrand and not Burgerstand
[14:57:19] shevy: so for me it works fine; but it should also support loading custom .rb files
[14:57:27] neanias: yorickpeterse: he's beachy
[14:57:29] shevy: yorickpeterse yeah I get hungry when I read his nick
[14:57:31] burgestrand: yorickpeterse: it's a common mistake :)
[14:57:37] shevy: also mozzarella makes me hungry and pizzaops
[14:57:47] [k-: ahh a problem I have tackled before
[14:57:54] agent_white: [k-: Pizza problem?!
[14:57:55] burgestrand: I'd like to open a burgerstand once. It'd be called Burgestrands Burgerstand
[14:58:02] Nick_joes_: has joined #ruby
[14:58:03] [k-: the constants
[14:58:16] pizzaops: Why have I been summoned?
[14:58:27] pizzaops: ????????????
[14:58:29] adaedra: ACTION noms pizzaops
[14:58:34] jhass: shevy: ruby has no concept of filename to constant mapping
[14:58:35] shevy: because your nick makes people hungry!
[14:58:37] [k-: before=Module.constants; load; after=Module.constants
[14:58:47] Internet_: has joined #ruby
[14:59:06] [k-: haskell has those!
[14:59:24] shevy: haskell has what? Plan B?
[14:59:38] oz: no, it has those.
[14:59:40] [k-: <jhass> shevy: ruby has no concept of filename to constant mapping
[14:59:43] zeeraw: has joined #ruby
[14:59:57] shevy: I don't even know how haskell loads its diabolic files
[15:00:07] Ox0dea: shevy: Why not module_eval?
[15:00:13] pizzaops: Continuous delivery: http://www.nestle.com/asset-library/PublishingImages/Media/News-Features/2011-November/Wagner_Headline.jpg
[15:00:19] [k-: so u have polynomial/ten.hs it would expect Polynomial.Ten
[15:00:55] yorickpeterse: but what about continuous integration and deployments of the pizza?
[15:00:56] shevy: [k- ok I guess that can be the same as in ruby... so people should write foo.rb and have module Foo or class Foo, rather than module Bar inside
[15:01:06] yorickpeterse: also I hope those pizzas come with tests
[15:01:13] shevy: how do you test a pizza?
[15:01:14] [k-: but the compiler expects it to be like that
[15:01:19] [k-: if it is not, it errors
[15:01:20] yorickpeterse: shevy: pizzaspec
[15:01:20] pizzaops: Those are not as punny so who cares.
[15:01:30] adaedra: shevy: you never tested a pizza? D:
[15:01:31] shevy: [k- hmm... so it is more strict than in ruby
[15:01:44] eGGsha: has joined #ruby
[15:01:45] [k-: yes, it is compiled afterall
[15:01:47] shevy: adaedra hawaii pizza... I am undecided whether I can eat it or not
[15:02:00] [k-: and statically typed
[15:02:03] pizzaops: Hawaiian pizza is the work of Satan.
[15:02:10] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[15:02:12] shevy: here is the pizza expert :)
[15:02:18] shevy: [k- it's his nick!!!
[15:02:23] agent_white: ACTION coughs
[15:02:31] sharpmachine: has joined #ruby
[15:02:36] shevy: bad pizza for agent_white
[15:02:39] yorickpeterse: Pizza hawaii isn't that bad
[15:02:43] yorickpeterse: if you're a monster
[15:02:47] Kully3xf: has joined #ruby
[15:02:56] agent_white: I make pizza for a living. I accept your PM's as I provide pizza-consulting.
[15:03:04] shevy: really agent_white?
[15:03:09] DLSteve: has joined #ruby
[15:03:13] solocsha1: has joined #ruby
[15:03:14] agent_white: shevy: Hm. No the pizza consulting is a lie.
[15:03:15] pizzaops: PIZZA IS NEVER OFF TOPIC. Ok, I'm done derailing now. Sorry [k-
[15:03:21] adaedra: agent_white: pics or it didn't happened.
[15:03:21] agent_white: But yes, I do roll pizza for a job.
[15:03:26] christiandsg: has joined #ruby
[15:03:27] yorickpeterse: Do the pizzas also come with built-in error reporting?
[15:03:29] agent_white: shevy: No it's awful.
[15:03:30] yorickpeterse: and Slack integration?
[15:03:32] agent_white: But that's ok.
[15:03:33] shevy: pizza rolling AND ruby coding
[15:03:37] icflournoy: has joined #ruby
[15:03:51] agent_white: Hm. I roll pizza so I can learn ruby. :)
[15:03:55] yorickpeterse: somebody start news.pizzacombinator.com
[15:03:58] adaedra: pizzaops: you can derail #ruby-offtopic. Or at least you can try.
[15:04:03] [k-: pizzas activate the taste buds in your mouth
[15:04:14] neanias: Now I want me some pizza
[15:04:16] [k-: it will raise an error if it is disgusting
[15:04:32] neanias: >> raise "Pizza isn't good enough"
[15:04:33] ruboto: neanias # => Pizza isn't good enough (RuntimeError) ...check link for more (https://eval.in/394397)
[15:04:50] shevy: [k- can we describe a living system in ruby?
[15:05:01] [k-: neanias, fail pls
[15:05:01] pizzaops: Yeah but we can't just test in production. That's like saying the website won't load if we have an error in our syntax. Technically true?
[15:05:18] neanias: [k-: I do what I want
[15:05:29] shevy: I guess you can fail and exit or fail and continue
[15:05:34] shevy: like erlang!
[15:05:40] shevy: they accepted that things are not perfect
[15:05:53] [k-: >> fail "I am better"
[15:05:54] ruboto: [k- # => I am better (RuntimeError) ...check link for more (https://eval.in/394402)
[15:05:56] agent_white: [k-: My first ever switch statement in ruby checked pizza toppings. If you gave it mushrooms it said "ICK"!
[15:06:01] agent_white: So yes, this is possible.
[15:06:12] sevenseacat: smart switch statement. i hate mushrooms.
[15:06:26] shevy: cats just don't like mushrooms
[15:06:43] agent_white: sevenseacat: \o
[15:06:45] neanias: Can't stand mushrooms either
[15:06:54] intinig: has joined #ruby
[15:06:57] slash_nick: shevy: must be composed of cells (can do); has different levels of organization (tissues, organs, etc); uses energy; responds to its environment (responds to stimulus); grows; reproduces; traits change in adapting to environment...
[15:07:03] yorickpeterse: ActivePizza::PizzaWithIndifferentTaste
[15:07:10] Ox0dea: >> require 'objspace'; mystery = ObjectSpace.each_object(Bignum).find { |n| n > 2 ** 64 }; ObjectSpace.dump(mystery)
[15:07:11] ruboto: Ox0dea # => "{\"address\":\"0x42173fa8\", \"type\":\"BIGNUM\", \"class\":\"0x42171014\", \"frozen\":true, \"mems ...check link for more (https://eval.in/394404)
[15:07:14] shevy: slash_nick ok but there is cell-cell(s) communication too
[15:07:15] Ox0dea: Burgestrand: I had hoped that would be more insightful.
[15:07:20] [k-: I like mushrooms :(
[15:07:25] [k-: well some types
[15:07:57] [k-: >> abort "test"
[15:07:58] ruboto: [k- # => test ...check link for more (https://eval.in/394405)
[15:08:08] [k-: hmm abort isn't an error
[15:08:14] stardiviner: has joined #ruby
[15:08:24] shevy: >> fail abort
[15:08:25] ruboto: shevy # => exit (SystemExit) (https://eval.in/394406)
[15:08:32] neanias: abort exits with a message
[15:08:55] shadoi: has joined #ruby
[15:09:03] Igorshp: has joined #ruby
[15:09:12] mistermocha: has joined #ruby
[15:09:13] [k-: we didn't even play hangman
[15:09:16] [k-: shevyyyyyyy
[15:09:23] [k-: you didn't keep your word!
[15:09:26] [k-: we kept ours!
[15:09:28] shevy: I have no problem with hangman!
[15:09:31] shevy: only unicode!!!
[15:09:33] rippa: has joined #ruby
[15:09:34] adaedra: shevy: unicode is life, unicode is love.
[15:09:45] Ox0dea: Burgestrand: Also, the object allocation tracer doesn't run early enough to show where the mystery number is coming from. :/
[15:09:46] adaedra: Come in the 21st century and use unicode.
[15:09:55] shevy: I still don't know from where that "x is love, x is life" quote is from
[15:10:02] Ox0dea: shevy: The Internet.
[15:10:03] adaedra: me neither
[15:10:08] [k-: shrek is love, shrek is life...
[15:10:12] [k-: I saw the video
[15:10:15] shevy: Ox0dea yeah but I heard it before and I dunno from where!
[15:10:23] [k-: hint 4chan
[15:10:31] riotjones: has joined #ruby
[15:10:31] Ox0dea: [k-: Who is that?
[15:10:35] burgestrand: Ox0dea: I'm guessing it's coming from Random.new_seed.
[15:10:40] [k-: 4chan.org
[15:10:41] shevy: I don't know what is a 4chan either
[15:11:08] Ox0dea: [k-: Does he afraid of anything?
[15:11:29] [k-: noes, he do nots
[15:11:40] ArchRogem: has joined #ruby
[15:11:46] Ox0dea: Burgestrand: Ah, yeah, that makes sense.
[15:12:19] [k-: >> Random.new_seed
[15:12:20] ruboto: [k- # => 33113697059959617379391802790303359999 (https://eval.in/394408)
[15:12:49] [k-: looks too long
[15:13:01] burgestrand: >> p Random::DEFAULT.seed; p ObjectSpace.each_object(Bignum).to_a
[15:13:02] ruboto: Burgestrand # => 335500703423792315755524711159384466299 ...check link for more (https://eval.in/394410)
[15:13:03] ta: has joined #ruby
[15:13:07] icebourg: has joined #ruby
[15:13:20] werelivinginthef: has joined #ruby
[15:13:24] burgestrand: It is the mystery number!
[15:13:32] burgestrand: Now I can go home, woop.
[15:15:45] dgutierrez1287: has joined #ruby
[15:16:42] juanca_: has joined #ruby
[15:18:48] symbol: has joined #ruby
[15:19:09] aryaching: has joined #ruby
[15:19:55] senayar: has joined #ruby
[15:22:05] hotpancakes: has joined #ruby
[15:22:49] senayar: has joined #ruby
[15:23:09] jamesaxl: has joined #ruby
[15:23:38] yorickpeterse: I have a Sinatra controller
[15:23:41] yorickpeterse: it has 96 lines of code
[15:23:45] yorickpeterse: and 662 lines of comments
[15:25:13] adaedra: dat documentation
[15:25:58] yorickpeterse: it's used for our dev/api portal, so go figure
[15:26:04] yorickpeterse: it includes examples, a bunch of tables, etc
[15:27:04] RobertBirnie: has joined #ruby
[15:27:38] bruno-: has joined #ruby
[15:29:07] brotspinne: has joined #ruby
[15:30:23] zeeraw: has joined #ruby
[15:31:17] podman: has joined #ruby
[15:31:29] momomomomo: has joined #ruby
[15:32:13] bauruine: has joined #ruby
[15:33:52] finisherr: has joined #ruby
[15:34:17] axl__: has joined #ruby
[15:34:47] NeverDie: has joined #ruby
[15:35:59] ReK2: has joined #ruby
[15:36:04] Cache_Money: has joined #ruby
[15:36:12] shevy: why is rand() called rand() and not random() ?
[15:36:29] [k-: cuz we are lazy
[15:36:38] jhass: because man 3 rand
[15:36:42] neanias: Because we're like totes rand
[15:36:51] Xeago: has joined #ruby
[15:37:01] centrx: has joined #ruby
[15:37:22] yorickpeterse: Because somewhere in the 60s somebody was too lazy to type it out in full
[15:37:34] yorickpeterse: So now we have to deal with shit like "int" and "float" and "string" and "rand"
[15:37:47] yorickpeterse: but "array" is still "array", unless you're MRI then it's sometimes ary
[15:38:05] jhass: huh, what would be the better name for string down?
[15:38:06] yorickpeterse: and thankfully "hash" is just "hash" (e.g. to_hash), and not to_hsh
[15:38:09] jhass: character array?
[15:38:19] yorickpeterse: if you want to keep it short
[15:38:31] yorickpeterse: If you're writing something inspired by Paul Graham call it "essay"
[15:38:39] sarkyniin: has joined #ruby
[15:38:44] yorickpeterse: "wow this program allocated 12389123 essays, jebus"
[15:38:50] [k-: we lacked storage space and memory in the 60s
[15:38:54] brotspinne: shevy: I think programmers like keywords with only one syllable
[15:39:01] centrx: str has no syllables
[15:39:32] neanias: So it's one
[15:39:34] yorickpeterse: well, the average floppy has space for 1468006 ASCII characters
[15:39:46] brotspinne: centrx: not sure how you do but I pronounce it "string"
[15:39:47] zanloy: has joined #ruby
[15:39:56] Ox0dea: brotspinne: It's pronounced "stir" or "struh".
[15:40:03] Scroff: has joined #ruby
[15:40:04] [k-: yorickpeterse how many chars does your controller have
[15:40:16] brotspinne: Ox0dea: who claims that?
[15:40:28] dangerousdave: has joined #ruby
[15:40:33] Ox0dea: brotspinne: Are you going to phone the authorities?
[15:40:53] brotspinne: Ox0dea: how do you pronounce ctrl from your keyboard?
[15:41:08] yorickpeterse: if you're going down the route of compression you'll probably strip docs before dumping it on a floppy
[15:41:11] shevy: a troll key!
[15:41:16] shevy: hit cotroll now
[15:41:24] yorickpeterse: has anybody ever found the Any key?
[15:41:26] agent_white: ACTION does a barrel roll
[15:41:28] yorickpeterse: I'm still looking for it
[15:41:41] shevy: same thing!
[15:41:50] agent_white: No, still trying to find a left-handed keyboard.
[15:42:00] brotspinne: yorickpeterse: https://en.wikipedia.org/wiki/Magic_SysRq_key
[15:42:02] Ox0dea: yorickpeterse: The Model 01 has an Any key.
[15:42:21] yorickpeterse: brotspinne: not sure if trying to counter troll or just super oblivious
[15:42:46] jhass: Ox0dea: brotspinne centrx I think it's pronounced like this https://youtu.be/cuCw5k-Lph0?list=PL9383CC2C6DBD902F&t=196
[15:42:46] Ox0dea: yorickpeterse: http://cdn.crowdfundinsider.com/wp-content/uploads/2015/06/Model-01-2.jpg
[15:43:02] brotspinne: yorickpeterse: the first
[15:43:35] yeticry: has joined #ruby
[15:43:48] yorickpeterse: Ox0dea: that looks more like the Hippie Key
[15:43:59] yorickpeterse: press it for a magical journey into Unix
[15:44:05] lessless: has joined #ruby
[15:44:31] pyrotecnix: has joined #ruby
[15:44:37] jhass: yorickpeterse: https://www.getdigital.eu/Any-Key.html you can order one here
[15:44:58] jpfuentes2: has joined #ruby
[15:45:07] Ox0dea: yorickpeterse: I think perhaps you've mistaken the magical butterfly key for the actual Any key at the top left.
[15:45:15] yorickpeterse: I'm sure as hell not going to replace my current topre keys with that
[15:45:25] yorickpeterse: Ox0dea: oh lol
[15:45:29] yorickpeterse: I completely missed that
[15:46:12] sharpmachine: has joined #ruby
[15:47:55] yorickpeterse: sweet, everybody is leaving the office
[15:48:07] yorickpeterse: that means the last donuts are mine
[15:48:32] ZoanthusR: has joined #ruby
[15:48:49] varunwachaspati: has joined #ruby
[15:49:19] neanias: yorickpeterse: lucky you
[15:49:20] towski_: has joined #ruby
[15:49:22] neanias: With the doughnuts
[15:49:34] a346: has joined #ruby
[15:50:06] Xeago: has joined #ruby
[15:50:36] Ilyas: has joined #ruby
[15:51:07] yorickpeterse: 2 people left, heart pounding
[15:51:13] yorickpeterse: *heavy breathing*
[15:51:22] [k-: just grab them all
[15:51:32] yorickpeterse: then people will complain I ate them all
[15:51:36] neanias: Hoard them
[15:52:20] quimrstorres: has joined #ruby
[15:52:32] Sehryn: has joined #ruby
[15:53:34] pleiosaur: has joined #ruby
[15:53:43] rehat: has joined #ruby
[15:53:46] [k-: you were planning to eat them all anyway
[15:53:47] Igorshp: has joined #ruby
[15:54:21] momomomomo: has joined #ruby
[15:54:33] wallerdev: has joined #ruby
[15:54:50] platzhirsch: has joined #ruby
[15:55:10] j_mcnally: has joined #ruby
[15:55:24] yorickpeterse: Yes but if everybody leaves I can just pretend I didn't do it
[15:55:24] [k-: might as well
[15:55:32] yorickpeterse: I can just blame it on gnomes
[15:55:36] [k-: but you are the last one!
[15:55:55] theery: has joined #ruby
[15:56:05] yorickpeterse: Yessss, they're leaving
[15:56:10] yorickpeterse: hey did you just call me a gnome?
[15:56:17] agent_white: "I wish they made a cinnamon roll incense because I don't always have time to make a pan. Perhaps I'd rather light a stick and then have my roommates wake up with false hopes."
[15:56:20] Agoldfish: has joined #ruby
[15:56:22] [k-: say you are feeling giddy and need sugar to boost your blood sugar
[15:56:33] adaedra: yorickpeterse: the place you work in seems interesting.
[15:56:40] [k-: do you wish to be addressed as a gnome
[15:56:45] shevy: pick gnome or troll
[15:56:46] zendrix: has joined #ruby
[15:56:53] avril14th: has joined #ruby
[15:56:53] shevy: or a gnoll!
[15:56:55] adaedra: he prefers to be addressed as a kde, I'm sure.
[15:57:00] adaedra: ACTION flees
[15:57:31] slash_nick: shevy: gromeroll?
[15:57:32] InternetFriend: has joined #ruby
[15:57:36] Igorshp_: has joined #ruby
[15:57:40] yorickpeterse: I'm actually an xfce user
[15:58:29] Scroff: has joined #ruby
[15:59:22] jcdesimp: has joined #ruby
[15:59:30] yorickpeterse: sweet, time to wreck my teeth with pure sugar
[15:59:53] quimrstorres: has joined #ruby
[16:00:11] casadei: has joined #ruby
[16:03:03] pullphinger: has joined #ruby
[16:03:52] ddarkpassenger: has joined #ruby
[16:04:31] platzhirsch: has joined #ruby
[16:04:41] yorickpeterse: TooMuchSugarError
[16:04:42] jxpx777: has joined #ruby
[16:05:05] neanias: ACTION is hungry
[16:05:49] yorickpeterse: tonight I'm having instant pancakes
[16:05:57] yorickpeterse: not sure, either way I can't cook for shit anyway
[16:06:02] balazs: has joined #ruby
[16:06:02] centrx: Unable to compute due to missing data.
[16:06:15] lavros: has joined #ruby
[16:06:44] yorickpeterse: I can take a picture
[16:06:48] yorickpeterse: (of the donut at least)
[16:07:04] yorickpeterse: oh hm, don't have my USB cable with me
[16:08:20] momomomomo_: has joined #ruby
[16:08:42] Alayde: has joined #ruby
[16:09:39] Xeago: has joined #ruby
[16:09:44] [k-: USB is dangerous
[16:10:55] yorickpeterse: as long as you only stick it into devices it should be safe
[16:11:08] blaines: has joined #ruby
[16:11:12] Xeago: has joined #ruby
[16:11:24] [k-: but devices are the ones that make it unsafe
[16:11:41] agent_white: s/devices/people/
[16:11:48] ddarkpassenger: has joined #ruby
[16:12:07] zeeraw: has joined #ruby
[16:12:16] woodennails: has joined #ruby
[16:12:41] [k-: people can't do it without devices
[16:12:44] [k-: check.mate.
[16:12:46] blaines_: has joined #ruby
[16:12:55] blackmes1: has joined #ruby
[16:14:29] yorickpeterse: maybe one day USB becomes self aware
[16:14:56] Lucky_: has joined #ruby
[16:15:18] bluOxigen: has joined #ruby
[16:15:57] rbennacer: has joined #ruby
[16:18:21] mistermocha: has joined #ruby
[16:18:51] lee-jon: has joined #ruby
[16:18:56] Senjai: Good morning ruby
[16:19:13] solars: has joined #ruby
[16:19:56] mleung: has joined #ruby
[16:21:38] paulcsmith: has joined #ruby
[16:21:57] Ox0dea: Senjai: Did you ever figure out the glob incantation?
[16:22:21] ledestin: has joined #ruby
[16:22:22] finisherr: has joined #ruby
[16:23:29] dagda1: has joined #ruby
[16:23:38] tvw: has joined #ruby
[16:24:01] [k-: someday I will print [k- using tr
[16:24:11] [k-: I wanted to print Ox0dea but it is too long
[16:24:11] Ox0dea: [k-: You can escape the hyphen.
[16:24:27] baweaver: has joined #ruby
[16:24:34] [k-: I haven't started trying yet :o
[16:24:58] Ox0dea: Ah, okay. It also helps that the hyphen isn't special if it's the last character.
[16:25:59] finisherr: has joined #ruby
[16:26:32] Senjai: Ox0dea: Nope
[16:26:40] Senjai: Ox0dea: We just solved it a different way
[16:26:48] Senjai: Moving things into serperate directories instead
[16:26:58] Senjai: Which was the best solution, but we were mostly just curious
[16:27:18] Ox0dea: Senjai: Well, you could've just made it so that none of the others started with an 'l'.
[16:27:29] symbol: has joined #ruby
[16:27:46] quimrstorres: has joined #ruby
[16:28:53] Senjai: Thanks for the help anyway :P
[16:29:06] Senjai: Honestly, the major problem is not being able to pass in a list of files
[16:29:09] Xeago: has joined #ruby
[16:29:13] Senjai: Which is a failure of the library
[16:29:23] Senjai: Even if we could make that glob work, it shouldn't have to
[16:29:47] Ox0dea: But, well, it's called Dir. :P
[16:29:49] danzilio: has joined #ruby
[16:29:52] symbol: Just curious if anyone thinks this is a remotely good deal or can vouch for some of the books- http://rubybookbundle.com
[16:30:08] bruno-: has joined #ruby
[16:31:49] bricker: has joined #ruby
[16:32:11] bronson: has joined #ruby
[16:32:19] dcunliffe: has joined #ruby
[16:32:22] eGGsha: has joined #ruby
[16:32:47] sepp2k: has joined #ruby
[16:33:10] pdoherty: has joined #ruby
[16:33:24] Senjai: symbol: loll
[16:33:33] Senjai: symbol: dont get any of them
[16:33:46] Senjai: symbol: Get Programming Ruby 1.9 and 2.0 for learning ruby
[16:33:47] neanias: lrthw for the win
[16:33:51] Senjai: and Rails 4 in action for rails
[16:33:58] Torrieri: has joined #ruby
[16:33:58] Torrieri: has joined #ruby
[16:34:03] Senjai: Metaprogramming ruby is a good book too, and practical object oriented design in ruby
[16:34:09] Senjai: You dont really need any other books by that point
[16:34:15] Senjai: the last two being more advanced
[16:34:18] symbol: I'm already an employed ruby dev...just always looking for ways to sharpen myself.
[16:34:21] Senjai: ACTION drop the mic
[16:34:23] sepp2k: has joined #ruby
[16:34:30] symbol: I suppose I should just build more :)
[16:34:31] Senjai: symbol: POODR & Metaprogramming ruby
[16:34:35] Senjai: also yeah, build more
[16:34:45] agent_white: <3 POODR. Sandy has such a way with words.
[16:34:48] hotpancakes: has joined #ruby
[16:34:52] Senjai: http://www.poodr.com/
[16:34:52] bullcitydev: has joined #ruby
[16:34:55] symbol: I've read POODR three times now I think
[16:35:07] agent_white: [k-: Thank you :)
[16:35:09] Senjai: Sandy can over-optimize things sometime
[16:35:13] Senjai: but the concepts are sound
[16:35:14] symbol: I'll check out Metaprogramming for sure
[16:35:22] Senjai: symbol: If you like poodr, you can check out design patterns by the gang of four
[16:35:35] ruboto: I don't know anything about poodr
[16:35:38] symbol: I found her examples a bit difficult to apply to my code but that might just be me.
[16:35:38] rehat: I want to save stuff into a mysql, do I need to use Rails in order to use require 'active_record' or can my simple Ruby script still use it
[16:35:50] symbol: Yay! More design patterns, that's really what I'm interested in.
[16:36:00] Senjai: symbol: Also Code Complete 2nd ed, and the Pragmatic Programmer
[16:36:05] Xeago: has joined #ruby
[16:36:10] shevy: [k- loooook my first ruby-gnome version of my exam-question trainer http://shevegen.square7.ch/screenshot.png totally unstyled so far
[16:36:17] Senjai: symbol: http://www.amazon.ca/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612
[16:36:29] jhass: rehat: no, you can install and use activerecord separately, a popular alternative is sequel
[16:36:34] cir0x: has joined #ruby
[16:36:37] symbol: Senjai: Is that the gang of four?
[16:36:50] rehat: jhass: sweet thanks
[16:36:58] symbol: Would you recomend that over Martin Fowlers?
[16:37:04] Senjai: symbol: What? Different books man
[16:37:13] Senjai: symbol: Martin fowler is known for the refactoring book
[16:37:17] Senjai: what book are you referencing
[16:37:35] symbol: Senjai: http://www.amazon.com/Patterns-Enterprise-Application-Architecture-Martin/dp/0321127420
[16:38:12] Senjai: Different books
[16:38:24] Senjai: Design patterns is literally an encyclopedia of patterns
[16:38:25] Senjai: with examples
[16:38:39] symbol: Oh spiffy
[16:38:52] Senjai: Just get all of them really
[16:39:00] Senjai: Also Refactoring by Martin Fowler is great too
[16:39:06] symbol: I have the workbook
[16:39:13] symbol: It was over my head when I first read it
[16:39:15] hahuang65: has joined #ruby
[16:39:46] shinnya: has joined #ruby
[16:40:15] symbol: Senjai: Thanks for redirecting my money ;)
[16:40:27] willhumphreys: has joined #ruby
[16:40:57] dcunliffe: has joined #ruby
[16:40:58] Senjai: symbol: Feel free to send some my way, I won't complain :P
[16:42:38] [k-: shevy, quite okay. but I'm a critic of interfaces :>
[16:42:52] mistermocha: has joined #ruby
[16:43:13] shevy: yeah, I am just glad it runs without erroring for now
[16:43:41] [k-: who reads books :/
[16:43:51] [k-: who even has time
[16:43:55] [k-: I has no time
[16:44:01] Aria: People who commute by train.
[16:44:10] Aria: And people who like to learn the durable parts of our craft.
[16:44:22] [k-: I commute by bus and I read Haskell :o
[16:44:28] shevy: Aria is a trainee! someone who travels by train
[16:44:35] [k-: learn by conferences!
[16:44:41] symbol: I generally wake up early to get 1-2 hours of tech reading done.
[16:44:50] [k-: I only watched the railsconf2014 half way
[16:45:17] [k-: symbol:????
[16:45:45] c_nick: has joined #ruby
[16:45:47] zendrix: has joined #ruby
[16:46:03] hotpancakes: has joined #ruby
[16:46:18] finisherr: has joined #ruby
[16:46:19] hotpanca_: has joined #ruby
[16:46:31] symbol: Heh...you asked who even has time.
[16:46:55] spider-mario: has joined #ruby
[16:47:14] JoshL: has joined #ruby
[16:47:18] Xeago: has joined #ruby
[16:47:31] prettiestPony11: has joined #ruby
[16:52:14] Gadgetoid: has joined #ruby
[16:52:19] Jackneill: has joined #ruby
[16:52:59] paulcsmith: has joined #ruby
[16:53:11] chipotle: has joined #ruby
[16:53:29] [k-: you have time, I has school :(
[16:53:55] shevy: you'll become smarter every day because of school!
[16:54:06] shevy: and then you'll be a millionaire
[16:54:11] [k-: poor shevy missing out :c
[16:54:43] [k-: has you been schooled
[16:54:45] rcvalle: has joined #ruby
[16:54:51] chipotle: good afternoon
[16:55:13] [k-: your answer: very yes/yes/no/absolute no
[16:55:24] bronson: has joined #ruby
[16:55:25] gamename: has joined #ruby
[16:55:32] c_nick: Hi my application is using active records for database connectivity to get database table entries the function uses where method passing each and every column name with last one an object of database
[16:55:57] varunwachaspati: has joined #ruby
[16:56:28] c_nick: I don't know how to get db entries with query having like
[16:57:10] jonathanwallace: has joined #ruby
[16:57:33] shevy: [k- sure but I was very lazy
[16:58:07] [k-: your reply does not match the tailored responses
[16:58:12] JDiPierro: has joined #ruby
[16:58:12] [k-: pls try again
[16:58:49] yfeldblum: has joined #ruby
[16:58:55] shevy: I was extremely lazy
[16:59:52] [k-: your responses cannot be recognised, pls give a number instead (yes 1 - 4 no)
[17:00:38] j_mcnally: has joined #ruby
[17:01:19] Soda: has joined #ruby
[17:02:56] [k-: ACTION boops shevy
[17:03:31] shevy: In fact I was so lazy that the metric system has no way of measuring that kind of laziness
[17:03:47] shevy: just like the dudedudeman here
[17:03:51] wallerdev2: has joined #ruby
[17:04:04] solocshaw: has joined #ruby
[17:04:10] dudedudeman: i can measure stuff
[17:04:12] djbkd: has joined #ruby
[17:04:18] [k-: c_nick have you finished your question? we are still waiting
[17:04:23] dudedudeman: might take some time though. gotta work it in to my schedule
[17:04:25] Spami: has joined #ruby
[17:04:41] [k-: but you can't measure how much time it would take
[17:04:48] [k-: and how much time to offset
[17:06:18] Kn|t3: has joined #ruby
[17:06:22] kotk_: has joined #ruby
[17:06:45] woodennails: has joined #ruby
[17:06:50] Kn|t3: has left #ruby: ()
[17:07:47] Igorshp: has joined #ruby
[17:08:09] Kricir: has joined #ruby
[17:08:38] InternetFriend: has joined #ruby
[17:09:35] sarkyniin: has joined #ruby
[17:10:23] varunwachaspati: has joined #ruby
[17:10:32] niemcu: has joined #ruby
[17:11:04] Antiarc: has joined #ruby
[17:12:00] Synthead: has joined #ruby
[17:13:33] RobertBirnie: has joined #ruby
[17:13:36] failshell: has joined #ruby
[17:14:06] arooni-mobile: has joined #ruby
[17:14:46] Contigi: has joined #ruby
[17:15:44] failshell: has joined #ruby
[17:17:09] bmurt: has joined #ruby
[17:17:23] parabolize: has joined #ruby
[17:17:39] [k-: but your sentence isn't complete
[17:20:01] Senjai: what's faster, set#include? or array#include?
[17:20:19] jhass: Senjai: what's faster, Array#include? or Hash#has_key?
[17:20:21] Senjai: As well as for all set related operations, like unions etc
[17:20:30] [k-: has_key?
[17:20:30] kotk: has joined #ruby
[17:20:30] Senjai: jhass: I would imagine the latter.
[17:20:38] bruno-: has joined #ruby
[17:20:39] Senjai: I was just double checking
[17:20:47] [k-: the latter is definitely faster
[17:20:47] jhass: exactly, O(n) for array, O(1) for hash key lookup
[17:20:54] jhass: and Set is just a wrapper around a hash without values
[17:21:01] eam: but not has_value? :)
[17:21:09] havenwood: has joined #ruby
[17:21:56] [k-: sets are collection of values
[17:22:26] [k-: well not exactly :)
[17:22:52] platzhirsch: has left #ruby: ()
[17:22:58] hotpancakes: has joined #ruby
[17:23:29] psye: has joined #ruby
[17:24:26] MatrixBridge: has joined #ruby
[17:24:32] astrobun_: has joined #ruby
[17:24:40] peter_paule: has joined #ruby
[17:28:08] werelivinginthef: has joined #ruby
[17:28:21] hotpancakes: has joined #ruby
[17:29:00] kinduff: has joined #ruby
[17:29:02] JDiPierro: has joined #ruby
[17:30:52] helpa: has joined #ruby
[17:30:56] cout: jhass: Hash#has_key? isn't _quite_ O(1) due to the cost of the computation of the hash, so the answer to the question of whether Array#include? or Hash#has_key? is faster depends partly on the hash function, but yeah, saying Hash#has_key? is faster is a good rule of thumb
[17:31:52] jhass: if your hash function is really really bad and throws everything into the same bucket it's O(n) too, but then you fucked up
[17:32:02] canton7: a very very very rough rule of thumb is that arrays are cheaper for fewer than around 10ish elements
[17:32:13] eam: cout: it's exactly O(1) because it doesn't change based on the size of the dataset
[17:32:18] JDiPierro: has joined #ruby
[17:32:26] canton7: 3 elements? array's probably quicker. 300 elements? go with a hash
[17:32:33] eam: a hash lookup has the same cost whether there are 1 or 1 million elements
[17:32:39] jhass: but what's said with O(n) vs O(1) is that for the hash the bigger it gets, the lookup time stays roughly constant, while for an array it grows liner with size
[17:32:43] Hanmac: shevy: Color, Point, Rect and Size now has #hash methods and eql? is an alias for == for them, and i already add them into the specs
[17:33:59] cout: eam: you're ignoring the cost of the hash function when you say that. The cost could be thought of as O(m) for string keys where m is your string length.
[17:34:05] dangerousdave: has joined #ruby
[17:34:09] eam: cout: the entire definition of big-O notation is that it ignores those things
[17:34:13] eam: that's what the symbol means
[17:34:36] joneshf-laptop: has joined #ruby
[17:34:36] eam: it tracks the change in computation cost as a function of data size
[17:34:46] eggoez: has joined #ruby
[17:35:00] eam: there are plenty of O(1) algorithms which are slower than O(n) or slower than O(n^2)
[17:35:19] eam: the formula describes the rate of change - not the efficiency
[17:35:20] herbst: has joined #ruby
[17:35:30] jidar: for specific datasets
[17:35:34] eam: jidar: yes
[17:35:35] ndogz: has joined #ruby
[17:35:35] Senjai: I need a flat_map, that also somewhat behaves like an inject
[17:35:48] Senjai: thing.flat_map{...}.inject(&:|) is what I'm seeing now
[17:35:49] herbst: hi, any ideas how i could stop to_json to make things like "-2165370312541948811" out of sha3 hashes?
[17:35:50] Senjai: and I dont like it
[17:35:55] cout: eam: I don't believe that is correct; the string length is an observation of the data size.
[17:36:05] eam: jidar: of course we could concoct an algorithm that's O(1) and never finishes :)
[17:36:17] Senjai: cout: not in ruby I don't think so.
[17:36:25] jhass: Senjai: .each_with_object([]) {|item, acc| acc.concat item }
[17:36:31] Xeago: has joined #ruby
[17:36:47] Antiarc: cout: The hash key computation time may be O(n), but n for the purpose of hash lookups is the number of entries in the hash, not the size of the hash key
[17:36:50] Senjai: jhass: ty
[17:36:50] eam: cout: sure, generally if you want to look at a second dimension you'd say something like O(m*n)
[17:36:51] jhass: Senjai: well, or |= or whatever
[17:37:03] Ox0dea: >> require 'objspace'; require 'set'; foo = Array.new(300) { rand }; [ObjectSpace.memsize_of(foo), ObjectSpace.memsize_of(foo.to_set)]
[17:37:05] ruboto: Ox0dea # => [1220, 20] (https://eval.in/394526)
[17:38:03] helpa-bot: has joined #ruby
[17:38:34] alphaatom: has joined #ruby
[17:39:50] eam: so we would say comparing two strings is O(n). Hashing a string into a lookup value is O(n). Applying the lookup value to find the Hash value is O(1). Searching an Array for a matching string is O(n) in terms of elements of the array and O(m*n) in terms of elements * string length
[17:40:03] helpa: has joined #ruby
[17:40:20] eam: compare/hash have the same big-o
[17:42:17] cout: eam: I would agree, but while the array element comparison and the hash function are computationally equivalent in terms of big-O, linear search through the array has the advantage that it can abort the comparison early if the strings don't match on the first or second character, whereas hash _has_ to iterate over the entire string to compute the hash value
[17:42:48] eam: you're talking about a radix search?
[17:42:50] railsraider: has joined #ruby
[17:42:54] eam: Array doesn't work like that
[17:43:02] cout: eam: no, just a regular linear search
[17:43:33] eam: Array does the same or more work even in the best case
[17:43:39] Antiarc: Just use benchmark/ips for your use case and measure it :P
[17:43:43] eam: Array must fully iterate the string length at least once
[17:43:46] eam: correct?
[17:43:55] eam: Hash also iterates the string length exactly once
[17:43:58] Antiarc: Not necessarily, string comparison uses length checks and memcmp
[17:43:59] cout: mean: e.g. let's say your searching for "foo" in the array [ 'abc'*10000, 'def'*10000, 'ghi'*1000, 'foo' ]
[17:44:02] yardenbar: has joined #ruby
[17:44:11] cout: s/mean/eam/
[17:44:26] eam: cout: hash(foo) has the same cost as comparing to "foo"
[17:44:29] eam: same big-o
[17:44:33] cout: eam: agreed
[17:44:54] eam: so it's not an advantage
[17:45:05] cout: eam: but in the case of array you can abort the comparison on the first character so you don't have to iterate over the entire string
[17:45:08] Mon_Ouie: The hash table implementation will only hash the key you're trying to lookup then compare it with all the elements that are in the matching buckets. Those string comparisons can be exited early just as when you perform a linear search.
[17:45:10] eam: in fact, cmp has to iterate both of them :)
[17:45:22] eam: cout: no you must iterate the full string at least once
[17:45:34] eam: cout: you said " cout> eam: agreed" to < eam> cout: hash(foo) has the same cost as comparing to "foo"
[17:45:45] cout: same big-O cost
[17:45:45] eam: comparing the full string "foo" is what you do in the final element
[17:45:49] mdarby: has joined #ruby
[17:45:49] eam: correct?
[17:45:59] eam: you traverse your entire input
[17:46:14] cout: sure, but the 1st 3 elements in the array are 30K long strings
[17:46:19] eam: so what?
[17:46:26] cout: oic, I got it backward
[17:46:27] eam: hash wouldn't traverse those either
[17:46:40] eam: hash(foo) is o(n) and "foo
[17:46:59] mistermocha: has joined #ruby
[17:47:00] eam: "foo" == "foo" is O(n) actually O(2n) if you want to count constants
[17:47:07] cout: (I've been dealing with a similar real-life problem recently, but the issue was insertion cost into the hash not lookup, which is why I stated the problem backward)
[17:47:28] eam: ah yeah
[17:47:45] howdoicomputer: has joined #ruby
[17:47:55] [k-: all the smarts talking o.o
[17:47:58] Antiarc: "f" == "foo" is O(1) though :)
[17:47:58] eam: it's sometimes counter-intuitive how these things interact
[17:48:05] Antiarc: (because length checks are just an integer comparison)
[17:48:10] eam: Antiarc: :)
[17:48:30] Mon_Ouie: I mean, "foo" == "foo" is also O(1) because you're comparing a constant with a constant which takes constant time overall???
[17:48:52] eam: yeah n can be 1 :)
[17:48:56] peter_paule: has joined #ruby
[17:49:02] Antiarc: Those will be separate string instances, so I don't think it'll be constant time in that case
[17:49:03] dellavg: has joined #ruby
[17:49:16] Antiarc: a = b = "foo"; a == b would be constant time though
[17:49:29] eam: in theory ruby could optimize a constant expression like that
[17:49:39] Antiarc: In practice it doesn't :P
[17:49:41] eam: sure :)
[17:50:25] reset: has joined #ruby
[17:50:54] eam: now, if you attack the hashing mechanism you can make Hash lookups O(n)
[17:50:58] Kully3xf: best way to sleep threads?
[17:51:09] Mon_Ouie: It doesn't matter that it doesn't with regards to that comparison being O(1). It takes constant time because the size of the string is a constant, it doesn't matter if you iterate over the string or not.
[17:51:16] j_mcnally: has joined #ruby
[17:51:16] Kully3xf: my threads are launching to quickly and AWS is giving me a resource limit (too much data being sent throgh
[17:51:34] eam: Mon_Ouie: well, we are saying n WRT elements and m WRT string size
[17:51:40] eam: "foo" is just an example
[17:51:49] cout: eam: class MyString < String; def hash; sleep(2**32); super; end; end # still O(1), right? :)
[17:51:56] eam: cout: it is :)
[17:52:00] towski_: has joined #ruby
[17:52:02] Antiarc: Kully3xf: Kernel#sleep should do it. But if threads are launching too quickly maybe you should be using a thread pool?
[17:52:09] eam: cout: or even just sleep()
[17:52:22] eam: O(1) can be slower than O(2^n)
[17:52:23] Kully3xf: i'm not sure what a thread pool is - I'll check it out
[17:52:45] Antiarc: It's just a resource pool where you create X threads and then check one out when you want to use it, check it back in when you're done with it
[17:52:46] havenwood: Kully3xf: You want to rate-limit the requests? Or are you spawning too many Threads?
[17:52:50] cout: eam: yeah but then I have to modify YARV to solve the halting problem
[17:52:54] Antiarc: That way you don't have to continually pay the thread creation overhead cost
[17:53:02] Antiarc: And you aren't going to run into FD limits
[17:53:08] RegulationD: has joined #ruby
[17:53:11] lkba: has joined #ruby
[17:53:13] __butch__: has joined #ruby
[17:53:21] Kully3xf: i'm spawning only 10 threads, but AWS doesn't like the amount of data being sent so fast, I need to slow down how fast the threads are sending the data
[17:53:34] relix: has joined #ruby
[17:54:01] Kully3xf: I am using a thread pool
[17:54:06] Antiarc: I rather doubt that the problem is "the amount of data"; AWS will happily accept throughput up to network link saturation if you can handle it
[17:54:12] davedev24_: has joined #ruby
[17:54:26] Kully3xf: error from AWS "RequestLimitExceded"
[17:54:34] havenwood: Kully3xf: See if something like ThrottleQueue suits your fancy: https://github.com/ryancalhoun/throttle-queue#readme
[17:54:37] Kully3xf: The maximum request rate permitted by the Amazon EC2 APIs has been exceeded for your account. For best results, use an increasing or variable sleep interval between requests.
[17:54:41] Antiarc: Oh, request limits. Okay, so you need to throttle your requests.
[17:54:44] shevy: hanmac \o/
[17:54:47] Kully3xf: I'll check that out @havenwood
[17:54:52] eam: Antiarc: that ain't true
[17:55:10] Antiarc: Which bit?
[17:55:23] eam: lots of aws services have per-connection throughput limits. You can do 100 parallel s3 uploads and get lots more throughput than one
[17:55:43] miah: aws is all about request limits, but also making sure you memoize results so that you dont perform lookups without reason
[17:55:47] Senjai: Today I realized how much I suck at writing recursive functions
[17:55:52] SCHAAP137: has joined #ruby
[17:55:53] Antiarc: I was thinking EC2 stuff - I figured Kully3xf was hitting actual resource limits, in the ulimit sense
[17:55:58] havenwood: Senjai: Did you realize it recursively?
[17:56:02] Kully3xf: I'm sending a knife ec2 server create request with ruby in multiple threads.
[17:56:25] Kully3xf: throttle queue is exactly what i'm looking for I think
[17:56:29] Antiarc: Senjai: To understand how much you suck at recursion, you must first understand how much you suck at recursion
[17:56:37] Senjai: Antiarc: hahahaahaha
[17:57:04] miah: depending on your account, your limits are likely going to be default, so make sure you memoize =) but if you are a customer giving aws tens of thousands of dollars per month you can have some limits increased
[17:57:14] Senjai: Antiarc: http://junk.pics/what-you-did-there.jpg
[17:57:18] Kully3xf: yes the later
[17:57:19] lokulin: has joined #ruby
[17:57:29] timonv: has joined #ruby
[17:57:36] Kully3xf: it's easier to queue in the time being than request limit increase for this error
[17:58:15] miah: you have to reach out to your aws rep and it does take time to increase limits; queing, memoizing, etc are the good ways to deal
[17:58:51] Kully3xf: day 4 of ruby = day 4 of issues lol
[17:59:05] miah: day 4 of any language is like that
[17:59:24] havenwood: if you're lucky enough to get as far as issues!
[17:59:31] Antiarc: Kully3xf: For future reference, sleep(int) in a thread will sleep that thread for that many seconds.
[17:59:45] Antiarc: (See Kernel#sleep for documentation)
[17:59:59] jcdesimp: has joined #ruby
[18:00:22] tvw: has joined #ruby
[18:00:45] anisha: has joined #ruby
[18:00:55] lkba_: has joined #ruby
[18:02:27] Senjai: havenwood: https://gist.github.com/Senjai/ad3711729f910460390f was what I was writing. Kinda meh about it
[18:02:49] craysiii: has joined #ruby
[18:03:51] pfish: has joined #ruby
[18:04:48] Frem: has joined #ruby
[18:04:53] InternetFriend: has joined #ruby
[18:06:28] MasterPiece: has joined #ruby
[18:07:11] di3soft: has joined #ruby
[18:12:17] rippa: has joined #ruby
[18:12:34] dopie: has joined #ruby
[18:12:50] hurlyburly: has joined #ruby
[18:13:09] jhwhite: has joined #ruby
[18:13:26] wallerdev2: has joined #ruby
[18:13:40] Mojo_Nixon: has joined #ruby
[18:13:48] sarkyniin: has joined #ruby
[18:13:49] freerobby: has joined #ruby
[18:14:49] blackmes1: has joined #ruby
[18:15:51] dgutierrez1287: has joined #ruby
[18:16:11] mleung: has joined #ruby
[18:16:14] monod: has joined #ruby
[18:16:16] gix: has joined #ruby
[18:16:52] Scroff: has joined #ruby
[18:17:03] Kully3xf: ok so AWS says I need to do retries intead of queuing - how can I retry a failed thread
[18:17:23] quimrstorres: has joined #ruby
[18:17:30] baweaver: has joined #ruby
[18:17:32] Kully3xf: so if I launch ten servers, test1-test10 and test6 and test7 fail, how do I handle that thread's error
[18:19:13] jhass: rescue, maybe sleep, retry
[18:19:20] jhass: forget that it's a thread
[18:19:24] jhass: just don't let it die
[18:19:33] di3soft: has joined #ruby
[18:19:51] Kully3xf: http://pasted.co/7eacd606
[18:20:47] InternetFriend: has joined #ruby
[18:21:12] kirun: has joined #ruby
[18:21:47] Axsuul: has joined #ruby
[18:21:54] jayrmotta: has joined #ruby
[18:21:56] Spami: has joined #ruby
[18:22:18] cpruitt: has joined #ruby
[18:22:24] Kully3xf: http://pasted.co/84f72fbe
[18:22:25] rbennacer: has joined #ruby
[18:22:31] Kully3xf: so my error handler I guess is incompetent
[18:22:52] finisherr: has joined #ruby
[18:23:36] shadoi: has joined #ruby
[18:24:08] djbkd: has joined #ruby
[18:24:33] Kully3xf: right now i'm just ignoring them and not letting the thread die - so if I just wait long enough will the thread retry?
[18:25:34] Antiarc: you're just shelling out to a command there; it's not likely to raise an exception. You'll need to look for exceptional text in the body of the command response, or check the return code of the command
[18:26:14] stantonnet: has joined #ruby
[18:27:07] postmodern: has joined #ruby
[18:27:24] s00pcan: has joined #ruby
[18:27:41] fmcgeough_: has joined #ruby
[18:28:14] hotpancakes: has joined #ruby
[18:28:27] workmad3: has joined #ruby
[18:28:52] thiagovsk: has joined #ruby
[18:29:23] fantazo: has joined #ruby
[18:29:29] j_mcnally: has joined #ruby
[18:31:32] sargas: has joined #ruby
[18:32:43] rqde: has joined #ruby
[18:33:59] mleung: has joined #ruby
[18:35:37] jlast: has joined #ruby
[18:36:35] symm-: has joined #ruby
[18:37:43] yardenbar: has joined #ruby
[18:38:21] jackjackdripper: has joined #ruby
[18:39:01] x1337807x: has joined #ruby
[18:39:19] hmnhf: has joined #ruby
[18:41:50] rdark: has joined #ruby
[18:42:19] renderful: has joined #ruby
[18:43:34] jmhmccr: has joined #ruby
[18:44:59] icebourg: has joined #ruby
[18:45:04] zendrix: has joined #ruby
[18:45:46] a346: has joined #ruby
[18:46:28] shevy: I feel so alone with ruby + GUIs here in this room :(
[18:47:02] dudedudeman: i'd love to learn and figure out GUIs
[18:47:06] dudedudeman: shevy: teach me
[18:47:10] dudedudeman: show me the gui way
[18:47:21] shevy: yeah lemme think
[18:47:34] woodennails: has joined #ruby
[18:47:39] shevy: I guess the first hurdle is to get things to run (the bindings)
[18:48:00] dudedudeman: bind all the things!
[18:48:01] shevy: I usually grab the source archive
[18:48:09] shevy: http://sourceforge.net/projects/ruby-gnome2/files/ruby-gnome2/ruby-gnome2-2.2.5/ruby-gnome2-all-2.2.5.tar.gz
[18:48:14] dudedudeman: what type of service are you actually writing a GUI for?
[18:48:29] shevy: everything! write all the things
[18:48:32] bhuvanaurora: has joined #ruby
[18:48:58] bhuvan_aurora: has joined #ruby
[18:49:02] woodennails: Hello guys, Im moving to a new job as a junior developer and im going to be primarily using Ruby, not necessarily Rails but definitely Ruby. They are aware i know zero Ruby and are willing to train me up on it but is there any recommeded guides or tutorials that I can practice before at so that I dont look a total noob :)
[18:49:09] shevy: right now just an exam-trainer, but I also have to port code I wrote many years ago, which was for all sorts of things, most of them incomplete; like you know mc (midnight commander?) - that thing could be in ruby-gnome too I thought once
[18:49:32] dudedudeman: woodennails: woo! congrats on the new job(i'm searching for one myself)
[18:49:38] shevy: dudedudeman are you on linux?
[18:49:39] kadoppe: has joined #ruby
[18:49:43] dudedudeman: are you a book person? video person? courses, lectures, etc?
[18:49:50] dudedudeman: shevy: yes. linux all the things
[18:49:52] dudedudeman: at least at work i am
[18:50:11] shevy: woodennails have you used another programming language before?
[18:50:28] shevy: dudedudeman ok excellent
[18:50:54] olas: how would you have a ruby script respond to external commands? for example, we have 'counter' daemon that runs and we want to run say 'counter --current-count' to get what it's currently on?
[18:51:14] woodennails: shevy im a javascript developer in my current role :)
[18:51:32] dudedudeman: oh lawd. shevy, he said it
[18:51:34] jhass: olas: via IPC, drb might the easiest for that purpose
[18:51:44] last_staff: has joined #ruby
[18:51:47] shevy: dudedudeman let's try to see if you can install two small gems on your system, I found these to be quite important for ruby-gnome; first, pkg-config: "gem install pkg-config", which I hope should work without a problem.
[18:52:11] nofxx: has joined #ruby
[18:52:11] nofxx: has joined #ruby
[18:52:18] dudedudeman: at least, it installed
[18:52:25] shevy: \o/ woooot
[18:52:27] tobacco_joe: has joined #ruby
[18:52:48] shevy: yeah that is the latest. let me look at the other one... this one has to do with cairo... ruby bindings to cairo... a moment
[18:53:46] craysiii: woodennails codecademy was good for an intro course
[18:54:00] woodennails: Yeh i've been working through that
[18:54:10] dudedudeman: woodennails: codecademy would be a good, easy place to start. free, too. from there you can pick up the pickaxe book, and so many other good books
[18:54:25] woodennails: Ive gotten hold of Chris Pine Learn to Program
[18:54:30] shevy: ok it should be "gem install cairo" but! it may require some cairo .h file, via this check here: "checking for cairo version (>= 1.2.0)... yes" not sure if your current system has it dudedudeman
[18:54:49] Senjai: woodennails: Pickaxe book for the win man
[18:54:50] craysiii: i did codecademy, and right now im running through the full-stack web course through bloc.io. hoping i can get a ruby job in 9 months or so
[18:54:53] wldcordeiro: has joined #ruby
[18:55:00] woodennails: Im not aware of that one Senjai
[18:55:06] treehug88: has joined #ruby
[18:55:16] Senjai: woodennails: https://pragprog.com/book/ruby4/programming-ruby-1-9-2-0
[18:55:31] Senjai: craysiii: I used teamtreehouse
[18:55:34] shevy: woodennails knowing javascript is good, you should not have a big problem with ruby. Chris Pine is pretty simple, perhaps boring, but after you read it, you should be able to answer questions such as "what is a block in ruby?"
[18:55:36] Senjai: craysiii: Back in the day
[18:56:05] woodennails: So Pragmatic Ruby is recommended then?
[18:56:07] shevy: pickaxe has a great reference with examples in the last 400 pages ( :P ) or so
[18:56:07] dudedudeman: i get a failure on that one, shevy
[18:56:13] shevy: dudedudeman ah dang ok
[18:56:20] dudedudeman: woodennails: yes! it's a good'en
[18:56:20] craysiii: i actually went to school for CS but then dropped out because of the calculus requirement. so far it seems easy (especially because i am already well versed in MVC from django)
[18:57:04] olas: jhass: hmm it seems like drb is limited to ruby 1.9.3
[18:57:09] Senjai: craysiii: the math is handy
[18:57:18] jhass: olas: where did you read that? oO
[18:57:38] jackjackdripper: has joined #ruby
[18:57:41] shevy: craysiii you also don't like math?
[18:57:46] craysiii: yes it is, i did this when i was younger
[18:58:05] Senjai: olas: No, http://ruby-doc.org/stdlib-2.2.2/libdoc/drb/rdoc/index.html
[18:58:20] craysiii: its not that i dont like math, i used to be really good, then took a long break from school and went back and sucked, was very frustrating
[18:58:38] workmad3: has joined #ruby
[18:59:56] shevy: dudedudeman: can you try this, in some terminal (or your current one), "wget https://rubygems.org/downloads/cairo-1.14.1.gem; gem unpack cairo-1.14.1.gem; cd cairo-1.14.1"
[19:00:13] Senjai: shevy: eek
[19:00:24] Scroff: has joined #ruby
[19:00:26] sigurding: has joined #ruby
[19:00:38] dudedudeman: huh. that did it
[19:01:26] monod: has joined #ruby
[19:01:42] shevy: dudedudeman the output should then be something like: http://pastie.org/pastes/10278144/text
[19:01:54] shevy: but I think you may lack some header or perhaps a library too... hmm
[19:01:56] leonardoajim: has joined #ruby
[19:01:59] dcunliffe: has joined #ruby
[19:02:53] blackmes1: has joined #ruby
[19:02:56] leonardoajim: has joined #ruby
[19:03:15] shevy: my system confuses me
[19:03:27] dudedudeman: no... definitely don't have that
[19:03:30] olas: jhass, Senjai: my god i was trying to gem install when it was part of the stdlib
[19:03:32] shevy: I am using some script to install .gem files ... via a system 'gem install --ignore-dependencies '
[19:03:48] tjohnson: has joined #ruby
[19:03:52] shevy: dudedudeman ok good, that is also usually what I have when I try to install ruby-gnome bindings on a fresh install
[19:04:52] craysiii: what OS you guys running?
[19:04:54] solocshaw: has joined #ruby
[19:05:06] ruboto: we're not all guys - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
[19:05:11] eam: is your operating system running?
[19:05:13] shevy: craysiii linux here but mostly I compile from source
[19:05:19] GBrawl: has joined #ruby
[19:05:21] eam: better go catch it
[19:05:23] quimrstorres: has joined #ruby
[19:05:26] craysiii: sorry i dont mean to offend
[19:05:37] mhib: has joined #ruby
[19:05:55] jhass: anyway, arch here
[19:05:57] eggoez: has joined #ruby
[19:06:07] shevy: dudedudeman ok... let's try the old way... I am sure there are better ones, but this one I know... we grab good old setup.rb ... let me find the latest version...
[19:06:12] jhass: and #ruby-offtopic if anybody feels like fighting over the best ;)
[19:06:17] Axsuul: has joined #ruby
[19:06:42] ruboto: I don't know anything about girls
[19:07:36] shevy: 2% girls here but they are hiding
[19:07:51] dagda1: has joined #ruby
[19:07:59] craysiii: 7% of statistics are made up on the spot
[19:09:25] tno: has joined #ruby
[19:09:37] shevy: ok dudedudeman this is the setup.rb from 2005, I just copy pasted it -> https://goo.gl/07U1Go, you can save it as "setup.rb" in the same directory as you are in of cairo*; you could also use the original source if you want to, which you could obtain from here: http://i.loveruby.net/en/projects/setup/ or you could also use a somewhat more recent updated variant (but by another author) at: https://github.com/r
[19:09:38] shevy: ubyworks/setup
[19:09:42] woodennails: What editors do you guys use?
[19:10:09] shevy: woodennails bluefish 1.1.7 still \o/ though if I were to start from scratch today, I would probably opt for something such as sublime
[19:10:12] GriffinHeart: has joined #ruby
[19:10:23] woodennails: im trying to get into Vim, people i know swear by it but i just find it takes longer
[19:10:47] shevy: dudedudeman once you have setup.rb (sorry for the extra steps... I don't know of a simpler way), run this please: "ruby setup.rb config"
[19:11:00] shevy: woodennails vim has nice keybindings
[19:11:14] shevy: I did not like the extension syntax much
[19:11:17] dudedudeman: shevy: this be crazy
[19:11:19] bronson: has joined #ruby
[19:11:27] juanca99: has joined #ruby
[19:11:48] woodennails: I've never bought a programming book before, i've just used online resources.. you reckon it may be better to use a paperback rather than epub/pdf?
[19:11:59] solocshaw: has joined #ruby
[19:12:13] shevy: dunno. I do have some .pdf files from paper books, but I prefer good old books in general
[19:12:22] craysiii: theres pros and cons to each. I like a physical book so i can flip to pages
[19:12:38] Igorshp: has joined #ruby
[19:12:47] shevy: woodennails for programming I started to keep local reference things/notes
[19:12:53] shevy: like tricks, hints, examples, tests
[19:13:05] shevy: for science-related stuff, I definitely prefer books
[19:13:12] woodennails: There any online tutorials for Ruby you guys can recommend
[19:13:25] dudedudeman: definitely the codecademy stuff, for free
[19:13:42] dudedudeman: the oden project has a bunch of good ruby resources if you're looking for web related development
[19:13:42] jayrmotta: has joined #ruby
[19:13:44] woodennails: Yeah i'm going through that at minute.. codeschool?
[19:13:46] bronson: has joined #ruby
[19:14:00] dudedudeman: codeschool is awesome, but doesn't have too many courses for pure ruby
[19:14:35] dudedudeman: lots of rails, lots of javascript, lots of stuff for things htat compliment ruby/rails, like sql/bootstrap/etc
[19:14:40] arescorpio: has joined #ruby
[19:14:52] shevy: woodennails ultimately one of the best ways to learn is to sit down and simply do all the basic stuff, by yourself... how to create directories... how to create symlinks... how to copy, delete, remove... how to group code into modules/class
[19:14:53] bruno-: has joined #ruby
[19:14:57] woodennails: yeah ive been doing Javascript for the past year at work, im still a junior developer... and just accepted a job where i'll be primarily doing ruby
[19:16:20] eam: the best way to learn is to assert your ideas as true and wait for people to correct you
[19:16:32] SuMo_D: has joined #ruby
[19:16:36] momomomomo: has joined #ruby
[19:17:31] DEac-: has joined #ruby
[19:17:33] _blizzy_: has joined #ruby
[19:17:36] eggoez: has joined #ruby
[19:17:50] shevy: I let my old friend, the ruby parser, correct me
[19:17:51] woodennails: im just struggling on what to create between now and hten
[19:17:53] eam: ACTION waits
[19:18:12] sarkyniin: has joined #ruby
[19:18:21] shevy: 18th october 2014: <eam> well that's super dumb; <eam> I'm disappointed in perl
[19:18:24] mistermocha: has joined #ruby
[19:18:25] craysiii: i always like to write a brainf*ck emulator / interpreter in whatever language
[19:18:39] craysiii: good first execise
[19:18:45] eam: shevy: what was that about anyway I forgot
[19:18:46] shevy: sadly I did not store the ruby-parser = devilish reference
[19:19:08] shevy: eam not entirely sure... the rest of the quote is: <eam> oh holy cow; <eam> you're right, that's insane (looks like you disable it with binmode); <eam> $^I disables it, looks like
[19:19:25] shevy: I really could not tell you what $^I means in the first place
[19:20:21] eam: oh, it was the i/o layer translating \n inside write()
[19:20:31] eam: which is why you should always use syswrite
[19:20:35] Ox0dea: craysiii: What is a "brainfuck emulator"?
[19:20:59] shevy: reminds me of puts "foo\n" versus puts "foo" now... where the one without \n is slower
[19:21:05] shevy: hmm or perhaps "more expensive"
[19:21:15] eam: shevy: both
[19:21:16] Ox0dea: shevy: They aren't the same.
[19:21:32] eam: Ox0dea: they're the same output
[19:21:34] craysiii: more of an interpreter. but if you don't know what brainf*ck is, it's an esoteric programming language
[19:21:50] eam: but letting puts add the \n is much slower
[19:21:51] ytti: puts "foo\n" likely is thread safe
[19:21:55] ytti: puts "foo" definitely is not
[19:22:01] eam: ytti: well, what's threadsafe?
[19:22:07] ytti: perhaps that is wrong word
[19:22:08] eam: you mean in terms of interleaved writes?
[19:22:27] ytti: i mean puts "foo" is "foo" and "\n" done separately
[19:22:32] sshuff: has joined #ruby
[19:22:35] ytti: and if two threads are writing to same output
[19:22:41] Ox0dea: craysiii: Right, I'd just never heard the term "emulator" used in the context of brainfuck is why I asked.
[19:22:45] ytti: it might be that output is unexpected
[19:22:51] ytti: i tink "foo\n" would produce expected output
[19:22:54] eam: puts should use writev() or have a writev() ruby i/o layer equiv
[19:23:00] craysiii: i shouldn't have used the term
[19:23:03] sharpmachine: has joined #ruby
[19:23:11] shevy: ruby has so much thread stuff... threads ... fiber... mutex... probably something else that I forgot
[19:23:17] railsraider: has joined #ruby
[19:23:34] poguez_: has joined #ruby
[19:23:49] ayonkhan: has joined #ruby
[19:24:02] icflournoy: has joined #ruby
[19:24:58] _blizzy_: has joined #ruby
[19:25:21] sharpmachine: has joined #ruby
[19:25:41] Ox0dea: So, for Kernel.puts, "foo" and "foo\n" are the same, but "foo\n" and "foo\n\n" are not. Why isn't it just defined as print + newline?
[19:26:47] eam: perlism
[19:27:56] KnownSyntax: has joined #ruby
[19:28:04] Sthebig_: has joined #ruby
[19:28:04] Sthebig_: has joined #ruby
[19:28:11] Ox0dea: It seems TNWIM hasn't caught on.
[19:28:22] sarkyniin: has joined #ruby
[19:29:29] hotpancakes: has joined #ruby
[19:29:59] alphaatom: has joined #ruby
[19:30:17] shevy: nobody else knows what that is, you fossil coders you!
[19:30:28] Muhannad: has joined #ruby
[19:30:30] shevy: born in the 1960s
[19:30:45] shevy: I have an idea... let's bring larry wall to #ruby :)
[19:31:09] blue_deref: has joined #ruby
[19:31:14] Ox0dea: shevy: You're supposed to have read The Jargon File by now. :P
[19:31:45] Ox0dea: On Larry, I think Black Perl provides some interesting insight into his psyche.
[19:32:15] howdoicomputer: has joined #ruby
[19:32:37] mjuszczak: has joined #ruby
[19:32:46] Zai00: has joined #ruby
[19:32:49] mjuszczak: In Ubuntu, what is the proper way to repoint /usr/bin/ruby to something else? Or to tell apt to never install ruby1.9 packages even if something depends on it? I installed ruby2.1 into /opt and repointed /usr/bin/ruby to it (seems there's no way to do it with alternatives like other operating systems though I could be mistaken), but any time the ruby1.9 package gets updated or installed it repoints symlinks.
[19:33:28] Ox0dea: mjuszczak: Please use a Ruby version manager.
[19:33:52] bougyman: mjuszczak: on the debuntus, you use update-alternatives to manage those links.
[19:33:54] CustosLimen: has joined #ruby
[19:34:02] bougyman: but Ox0dea's idea is much better.
[19:34:03] ayonkhan: has joined #ruby
[19:34:11] lele: has joined #ruby
[19:34:14] bougyman: use system ruby only for essential stuff (chef/puppet/system stuff)
[19:34:20] shevy: mjuszczak sounds pretty annoying - debian tells you to not use any alternatives :)
[19:34:37] bougyman: debian provides the most complete alternatives system available
[19:34:44] bougyman: so no, it doesn't tell you not to use alternatives.
[19:34:53] juanca_: has joined #ruby
[19:35:12] shevy: what business of it is it to modify a symlink made by the USER of the system?
[19:35:29] bougyman: it won't, if you use update-alternatives --install
[19:35:38] bougyman: from then on it's part of the alternatives system.
[19:36:33] bruno-: has joined #ruby
[19:37:41] SpeakerToMeat: has joined #ruby
[19:37:52] SpeakerToMeat: Hello. I'll try my hand here too
[19:37:54] Ox0dea: shevy: The system must assume the user does not know what it's doing, and vice versa. This may be the only truly insoluble conflict facing our respective species.
[19:38:03] SpeakerToMeat: I'm trying to modify an xml document with Nokogiri. I'm doing this: http://pastebin.com/f26ehTjc to try and add a namespace to the root element, but this causing the insertion of a <root> element instead... what am I doing wrong?
[19:38:03] ruboto: SpeakerToMeat, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/4058b8a3ae82529744e2
[19:38:03] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[19:38:37] SpeakerToMeat: ruboto: Thank you bot
[19:38:44] shevy: Ox0dea yeah, like a virus
[19:38:59] mjuszczak: has joined #ruby
[19:39:07] mistermocha: has joined #ruby
[19:39:10] Ox0dea: shevy: In either's eyes.
[19:39:25] Ox0dea: SpeakerToMeat: ruboto is just a really fast typer.
[19:40:02] SpeakerToMeat: I guess my xml.root call is taken as a "element named root" rather than "root element", but I wonder how to fix it
[19:40:33] SpeakerToMeat: Maybe...... reusing doc.root.node_name ? then what....
[19:41:16] Muhannad: has joined #ruby
[19:41:26] werelivinginthef: has joined #ruby
[19:42:29] hotpancakes: has joined #ruby
[19:42:46] nettoweb: has joined #ruby
[19:43:20] Carnage\: has joined #ruby
[19:44:14] momomomomo: has joined #ruby
[19:44:16] transiency: has joined #ruby
[19:45:35] solars: has joined #ruby
[19:46:04] khebbie: has joined #ruby
[19:46:06] stoodfarback: has joined #ruby
[19:47:57] bruno-: has joined #ruby
[19:48:14] Limix: has joined #ruby
[19:48:18] arup_r: has joined #ruby
[19:48:42] bashusr: has joined #ruby
[19:48:47] bashusr: has joined #ruby
[19:49:11] __butch__: has joined #ruby
[19:49:37] Axsuul: has joined #ruby
[19:50:41] nettoweb: has joined #ruby
[19:51:06] baweaver: has joined #ruby
[19:51:23] jenrzzz: has joined #ruby
[19:51:23] cpruitt: has joined #ruby
[19:52:18] Kruppe: has joined #ruby
[19:52:21] apt-get_: has joined #ruby
[19:52:47] lkba: has joined #ruby
[19:54:06] hotpanca_: has joined #ruby
[19:55:04] sargas: has joined #ruby
[19:56:02] SpeakerToMeat: I turned it to this: https://gist.github.com/Lars/8418797358c13d46befe but it fails to find the namespace if I try to use it bellow.. Even if I do this: xml.namespace_definitions.find{|ns|ns.prefix=="dsig"}
[19:58:48] sarkyniin: has joined #ruby
[19:59:16] intinig: has joined #ruby
[20:00:05] ringarin: has joined #ruby
[20:00:44] lxsameer: has joined #ruby
[20:00:44] lxsameer: has joined #ruby
[20:01:36] Helheim: has joined #ruby
[20:01:53] iwishiwerearobot: has joined #ruby
[20:02:07] hahuang65: has joined #ruby
[20:02:28] alphaatom: Is there a different channel for rails or is here okay?
[20:02:56] sdothum: has joined #ruby
[20:02:59] multi_io: has joined #ruby
[20:03:02] pipework: #RubyOnRails
[20:03:23] failshell: has joined #ruby
[20:03:36] roolo: has joined #ruby
[20:03:55] woodennails: has joined #ruby
[20:04:49] freerobby: has joined #ruby
[20:04:58] jcdesimp: has joined #ruby
[20:05:36] zendrix: has joined #ruby
[20:06:34] symbol: has joined #ruby
[20:07:07] ausec: has joined #ruby
[20:07:37] davedev24_: has joined #ruby
[20:08:19] dblessing: has joined #ruby
[20:08:49] wlknsn: has joined #ruby
[20:08:57] wlknsn: has left #ruby: ()
[20:10:02] ausec: hey all, i want to modify this: http://pastebin.com/nXwhCkr0 to loop over a certain number of lines at a time
[20:10:03] ruboto: ausec, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/665f3e878b2a9a30a7aa
[20:10:03] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[20:10:30] craysiii: what. are. ads.
[20:10:43] ausec: erm, https://gist.github.com/665f3e878b2a9a30a7aa
[20:10:50] jhwhite: has joined #ruby
[20:10:59] ausec: hey all, i want to modify this: https://gist.github.com/665f3e878b2a9a30a7aa to loop over a certain number of lines at a time
[20:11:12] slash_nick: craysiii: application developer shortcuts?
[20:11:23] craysiii: ACTION chuckles
[20:12:55] craysiii: ausec what do you mean certain number of lines at a time
[20:13:06] Senjai: zenspider: I literally see you everywhere on the internet now.
[20:13:33] Axsuul: has joined #ruby
[20:14:03] ausec: well, demo.txt contains 200 lines and i only want to print the first 100
[20:14:13] sargas: has joined #ruby
[20:14:49] wallerdev2: has joined #ruby
[20:15:00] craysiii: ausec i would create an argument to accept an int, and then do int.times do X
[20:15:46] craysiii: if you wanted to do it outside a function you could just do 100.times { |line| puts line }
[20:15:49] wlknsn: has joined #ruby
[20:16:04] crdpink2: has joined #ruby
[20:16:15] woodennails: has joined #ruby
[20:16:24] craysiii: oh wait wtf.
[20:16:56] shevy: Senjai what is he doing to become famous?
[20:17:19] Senjai: shevy: He's in my email now
[20:17:22] Senjai: some sort of ruby mailing list
[20:18:32] craysiii: ausec http://ruby-doc.org/core-1.9.3/IO.html#method-c-readlines you can specify a limit of lines to read when you open the file.
[20:18:51] craysiii: has left #ruby: ()
[20:19:02] anthony__: has joined #ruby
[20:19:08] symbol: Senjai: That gang of four book is written with C examples...would a rubyist still find it valuable?
[20:19:20] Senjai: symbol: Yes, it's all just code
[20:19:25] Senjai: It's not all C either
[20:19:57] symbol: Gotcha - I should stop being afraid of X
[20:20:12] Senjai: symbol: You'll get to a point where code is all just code.
[20:20:24] symbol: Cool, thanks!
[20:20:29] Senjai: Reading anything is a lot easier than writing anything though :P
[20:20:51] Senjai: symbol: You might want to brush up a bit on pointers and references, if anything though.
[20:21:00] Senjai: If you're not familiar with memory and how memory works
[20:21:03] Senjai: that's the only gotcha
[20:21:25] symbol: I know a bit about memory. While I know it's better to write code...writing bad practices won't improve my code quality.
[20:21:35] symbol: But I suppose that's why my workplace does peer reviews.
[20:22:07] zendrix: has joined #ruby
[20:22:42] Senjai: We have mandatory code review on every commit on gerrit, and every pr on github
[20:22:56] Senjai: It's how you get better
[20:23:53] symbol: I love them but sometimes I fear people aren't being harsh enough.
[20:24:30] slash_nick: symbol: post non-sensitive stuff here... these guys will tear your code apart ;)
[20:24:51] slash_nick: (while building you up)
[20:25:29] slash_nick: s/guys/people/
[20:25:41] Axsuul: has joined #ruby
[20:25:41] wldcordeiro_: has joined #ruby
[20:25:44] symbol: Good call!
[20:26:04] symbol: I did that once in #javascript and left weeping (in a great way)
[20:26:31] daxroc: Anyone know offhand if restclient does any session caching - seeing a strange 403 issue directly after authenticating but next auth works fine looks like to token is invalid.
[20:26:32] crdpink: has joined #ruby
[20:26:34] Kully3xf: does this solution to my earlier problem work/earlier problem - need to pause thread creation because they are launching to many api calls simoultaniously triggering a hard cutoff from the API receiver. My solution is to put a sleep(rand(5)) in before the API call
[20:26:51] Kully3xf: that should cause each thread to sleep a random amount of seconds (negligible in the over creation time)
[20:27:01] Kully3xf: thus freeing up the api calls per second
[20:27:54] Kully3xf: or even better, sleep(i) where i is the number of the thread in creation, that way there's no way it randomly creates all 2 second sleeps
[20:27:54] djbkd: has joined #ruby
[20:28:33] bubbys: has joined #ruby
[20:29:01] slash_nick: Kully3xf: why not run them serially? sounds like you're doing a lot of work to make this run *less* concurrently... serially is less concurrent.
[20:29:23] jxpx777: has joined #ruby
[20:29:31] Kully3xf: serially takes too long. Each api call takes 30-60 minutes to complete and we need to do 5-100 of them at a time
[20:29:35] GitGud: has joined #ruby
[20:29:36] Kully3xf: 100 times 30 minutes is too long
[20:30:19] simplyaubs: has joined #ruby
[20:30:47] Musashi007: has joined #ruby
[20:31:21] bricker: I have to know... what API call are you making that takes 60 minutes to complete? Can you even keep a connection open for that long?
[20:32:09] snockerton: can someone tell me how to use .map on an array and have it skip certain elements instead of putting nil back in the resultant array? https://gist.github.com/adampats/c59e77eb3f56e6d0bce3
[20:32:22] snockerton: next doesn't appear to work?
[20:32:28] ytti: not possible
[20:32:39] ytti: do each_with_object
[20:32:46] slash_nick: snockerton: just call #compact after map
[20:32:46] eam: bricker: plenty of db queries run for hours
[20:32:51] ruby-lang044: has joined #ruby
[20:33:04] slash_nick: snockerton: @arr.map {|x| x==0 ? nil : x }.compact
[20:33:10] ytti: ary = ary.each_with_object |e, new_ary|
[20:33:19] ytti: new_ary << e if poop
[20:33:26] cabreraM516: has joined #ruby
[20:34:27] snockerton: wow two answers, now i have to decide something for myself
[20:34:56] bronson: has joined #ruby
[20:35:01] hotpancakes: has joined #ruby
[20:35:06] slash_nick: yup... snockerton https://gist.github.com/rthbound/7f6d320182692dca97c9
[20:35:32] slash_nick: snockerton: you could even benchmark the two and let us know which performs best
[20:36:03] Mon_Ouie: You could also use select { |service| service[:hidden] != "true" }.map { ??? }
[20:36:09] moredhel-: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[20:36:22] Mon_Ouie: Or do that with #lazy as well
[20:36:52] slash_nick: Mon_Ouie: wouldn't that require a second iteration over the array?
[20:37:15] Mon_Ouie: That's what map + compact does too
[20:37:39] slash_nick: Mon_Ouie: I guess I never thought about how/where all the nils go lol
[20:37:40] Mon_Ouie: Also it's not obvious that two iterations vs. one iteration that does twice as much is better
[20:37:43] Kully3xf: @bricker it's a chef exec knife ec2 server create
[20:38:00] last_staff: has joined #ruby
[20:38:03] davedev24: has joined #ruby
[20:38:23] Musashi007: has joined #ruby
[20:38:55] Kully3xf: it creates a server with chef - but the thread can't complete until the server has been created - the instances are quite large 16 core in some cases and they can take quite some time to launch and register with chef, download and configure new files/settings etc
[20:39:12] slash_nick: Mon_Ouie: in that case, I'd think the select/map would be quicker... iterate over all elements, then iterate over only the remaining........ map/compact would have to iterate over all elements both times
[20:39:39] jfarmer: has joined #ruby
[20:40:33] redteam: has joined #ruby
[20:41:40] Mon_Ouie: Yes, but on the other hand the inner loop of #compact does not have to execute any Ruby code in MRI, while the select version has to switch to a block. Which one is faster probably depends on how many of the entries need to be filtered out.
[20:41:46] momomomomo: has joined #ruby
[20:42:23] KaZeR: has joined #ruby
[20:42:32] KaZeR: hey there.
[20:42:47] dgutierrez1287: has joined #ruby
[20:43:47] bricker: Kully3xf: oh :)
[20:43:59] quimrstorres: has joined #ruby
[20:45:04] jenrzzz: has joined #ruby
[20:45:15] rbennacer: has joined #ruby
[20:45:43] msnyon: has joined #ruby
[20:46:55] mistermocha: has joined #ruby
[20:47:11] Kully3xf: sleep didn't work lol - the threads wait like they're supposed too, but they get the wrong number when iterating the name
[20:47:19] ValicekB: has joined #ruby
[20:47:23] workmad3: has joined #ruby
[20:49:10] hotpancakes: has joined #ruby
[20:50:03] Kully3xf: nevermind - got it. Sleep works great! solution solved.
[20:50:22] duncannz: has joined #ruby
[20:50:57] zendrix: has joined #ruby
[20:51:09] Hanmac: has joined #ruby
[20:51:13] Sehryn: has joined #ruby
[20:51:51] blkperl: has joined #ruby
[20:52:02] blkperl: anyone know if net::ssh supports a io read timeout
[20:52:27] BeatNick_: has joined #ruby
[20:53:15] pullphinger15: has joined #ruby
[20:53:16] quimrstorres: has joined #ruby
[20:53:25] n3vtelen: has joined #ruby
[20:53:25] __butch__: has joined #ruby
[20:53:30] bruno-: has joined #ruby
[20:53:51] yfeldblum: has joined #ruby
[20:54:19] sharpmachine: has joined #ruby
[20:54:27] n3vtelen: I use this code but I get SSL error message: https://eval.in/394559
[20:54:56] quimrstorres: has joined #ruby
[20:55:04] jfarmer: n3vtelen The error message would be useful.
[20:55:35] olas: is it better to do command line arg parsing inside a class or inside a wrapper around the class?
[20:55:46] krz: has joined #ruby
[20:56:22] n3vtelen: jfarmer: sure, http://dpaste.com/0ZCY4HJ
[20:56:24] workmad3: has joined #ruby
[20:57:26] dopie: has joined #ruby
[20:57:59] jfarmer: n3vtelen When you looked up information about that error message, what did you learn? What do you currently think it means?
[20:58:41] n3vtelen: jfarmer: I saw this: http://www.rubyinside.com/how-to-cure-nethttps-risky-default-https-behavior-4010.html
[20:58:44] finisherr: has joined #ruby
[20:58:59] Yiota: has joined #ruby
[20:59:10] jfarmer: n3vtelen I don't see anything on that page about that specific error message.
[20:59:16] jfarmer: (Might be missing it.)
[20:59:23] krz: has joined #ruby
[21:00:16] n3vtelen: jfarmer: HTTP tries to verify the validity of the certificate
[21:00:49] Scroff: has joined #ruby
[21:00:52] jfarmer: https://www.google.com/search?q=ruby+OpenSSL::SSL::SSLError+certificate+verify+failed
[21:01:09] krz: has joined #ruby
[21:01:26] finisherr: has joined #ruby
[21:02:27] jfarmer: HTTPS is HTTP + TLS (https://en.wikipedia.org/wiki/Transport_Layer_Security#Description)
[21:02:51] juanca99: has joined #ruby
[21:02:52] jfarmer: The first thing that happens to establish a secure connection is the client connects to the server and the server presents the client a digital certificate.
[21:03:03] n3vtelen: jfarmer: I know that :D
[21:03:21] j_mcnally: has joined #ruby
[21:03:24] jfarmer: The error means that your client can't verify the server's certificate.
[21:03:36] workmad3: has joined #ruby
[21:03:52] jfarmer: This could be for a few reasons: (1) the certificate is actually invalid/expired/etc., (2) the certificate isn't signed by a certificate authority that your computer trusts
[21:04:06] jfarmer: And the always-present (3) neither of those because there's something I didn't think of
[21:04:18] zendrix: has joined #ruby
[21:08:35] iamse7en: has joined #ruby
[21:08:48] krz: has joined #ruby
[21:09:02] jfarmer: n3vtelen And if you look at that page of Google results I linked, the posts consistently point to (2) being the problem.
[21:09:14] msnyon: has joined #ruby
[21:10:14] astrobun_: has joined #ruby
[21:10:36] jfarmer: Some operating systems / Ruby installations don't come with all the root certificates you'd expect, causing OpenSSL to report that the certificate isn't valid / shouldn't be trusted.
[21:10:43] GBrawl: has joined #ruby
[21:11:11] Yiota: has joined #ruby
[21:11:18] zendrix: has joined #ruby
[21:11:40] jcdesimp: has joined #ruby
[21:12:14] n3vtelen: jfarmer: yes, that's ok on linux
[21:12:29] jfarmer: What operating system are you using?
[21:12:55] n3vtelen: jfarmer: windows
[21:13:10] krz: has joined #ruby
[21:13:19] mistermocha: has joined #ruby
[21:13:36] jfarmer: I would google "ruby windows openssl certificate verify failed"
[21:13:40] meph: has joined #ruby
[21:13:47] jfarmer: I'd wager there's a ton of info on the best way to correct it.
[21:13:50] Yiota: has joined #ruby
[21:14:16] ferret_guy: has joined #ruby
[21:14:41] jfarmer: Just don't ever set verify_mode to VERIFY_NONE, which folks often suggest.
[21:14:45] krz: has joined #ruby
[21:15:02] jfarmer: The solution is to get the right certificates on your machine, not to disable all SSL certificate verification. :D
[21:15:16] prettiestPony11: has joined #ruby
[21:15:36] jfarmer: "My smoke alarm won't stop going off! What do I do?" "Just remove the batteries, that'll solve it."
[21:15:45] prettiestPony11: trying to `rvm install 2.2.2` and getting `Version 2.2.2 is to confusing to select ruby interpreter.`
[21:16:04] crdpink2: has joined #ruby
[21:16:13] hotpancakes: has joined #ruby
[21:16:59] krz: has joined #ruby
[21:17:14] jfarmer: I haven't used rvm in ages, but it seems like it's saying that 2.2.2 is ambiguous
[21:17:27] jfarmer: There's a way to list out the known versions you can install with rvm.
[21:17:36] prettiestPony11: jfarmer: is rvm not widely used anymore?
[21:17:41] jfarmer: I'd guess something like rvm versions, rvm list, or the like, but rvm --help will say for sure.
[21:18:00] Senjai: prettiestPony11: chruby is recommended
[21:18:14] vickleton: has joined #ruby
[21:18:16] jfarmer: I don't have a sense of how widely used it is ??? I'm pretty sure it's still widely used ??? but lots of folks moved to rbenv and, more recently, to chruby
[21:18:19] Senjai: rvm is mostly useful for servers, and things that need gemsets, which a development system doesnt
[21:18:25] prettiestPony11: interesting. ok thanks!
[21:18:30] jfarmer: But don't worry about that right now. It's tangential to your issue.
[21:18:37] jfarmer: 2.2.2 is ambiguous, likely
[21:18:44] Senjai: I really miss function overloading
[21:18:49] shevy: we have a pony!
[21:18:59] jfarmer: e.g., JRuby might have a version 2.2.2 and MRI might have a version 2.2.2
[21:19:12] jfarmer: So rvm is like, "I don't know which you mean."
[21:19:22] slumos: has left #ruby: ()
[21:19:33] headius: our 2.2.2 means compat with and same stdlib as MRI 2.2.2
[21:19:36] jfarmer: It'd be more useful if the error printed out all the possible matches and included example commands to install them.
[21:19:45] headius: our = jruby
[21:19:51] adaedra: shevy: you can't call people ponies like that, it's mean
[21:19:51] headius: we have a separate version number for jruby itself
[21:19:57] postmodern: Senjai, you do not need a ruby manager on the server, use brightbox's packages instead: https://launchpad.net/~brightbox/+archive/ubuntu/ruby-ng
[21:20:04] shevy: adaedra hey, you even showed french ponies not long ago
[21:20:19] adaedra: those were real ponies tho
[21:20:27] jenrzzz: has joined #ruby
[21:20:30] Senjai: postmodern: what, no.
[21:20:31] shevy: might have been kids disguised as ponies!
[21:20:34] adaedra: but stop horsing around, shevy
[21:20:41] Senjai: postmodern: A jenkins server needs multiple rubies and gemsets
[21:20:56] postmodern: Senjai, ok in that case, install rubies into /opt/rubies/
[21:21:07] postmodern: Senjai, but for 99% of the time, just use brightbox's packages
[21:21:24] Senjai: postmodern: You're also assuming we're willing to add this PPA.
[21:21:27] Senjai: And that we're on ubuntu
[21:21:56] cochise_: has joined #ruby
[21:21:57] postmodern: Senjai, well you said "rvm is mostly useful on the server"
[21:22:23] Senjai: I meant that I would only use rvm on a server
[21:22:27] Senjai: that serves multiple applications
[21:23:23] postmodern: Senjai, CI is the only edge-case where you need dynamic switching on the server
[21:23:30] crdpink: has joined #ruby
[21:23:43] postmodern: Senjai, for multi-app servers you can explicitly configure the ruby via passenger or .bashrc
[21:23:43] Senjai: And we run a jenkins server
[21:24:15] Senjai: postmodern: We also dont use passenger.
[21:24:36] Senjai: Not saying that there isnt a number of solutions. I was just making a statement of the only time I would use rvm
[21:25:07] baweaver: has joined #ruby
[21:25:32] postmodern: Senjai, passenger for apps, I mean
[21:25:40] Senjai: We use unicorn
[21:26:04] postmodern: Senjai, pretty sure you can also configure the PATH in apache/nginx2 directly
[21:26:50] Senjai: As mentioned, there's a thousand different ways to do it
[21:26:53] Senjai: our way works for us
[21:27:35] postmodern: sure, and 99% of the time you don't need RVM on the server
[21:27:46] Senjai: Did I say need?
[21:28:09] postmodern: set PATH and `bundle install --deployment`, done
[21:28:13] Senjai: I said I can use rvm, and make use of the gemsets for an ideal workflow that works for me. It makes writing the init.d scripts dead simple
[21:28:33] Senjai: I dont want to set the PATH for each application, I think that's silly
[21:28:47] Senjai: but I'm going to drop this now, as mentioned, its totally subjective
[21:29:18] bougyman: what's wrong with setting PATH for each app?
[21:29:22] bougyman: that seems quite sane.
[21:29:32] postmodern: also protip: try to keep all apps running on the latest stable version of their ruby, makes managing things much simpler
[21:29:36] bougyman: any supervisor should support it.
[21:29:36] Senjai: I didn't say there was something wrong with it, I said I didn't want to..
[21:29:44] Senjai: Please dont confuse that
[21:29:45] bougyman: runit, s6, daemontools, systemd, upstart
[21:29:51] bougyman: all allow for environment variables.
[21:30:13] bougyman: you said it was silly.
[21:30:20] bougyman: I countered with: "It's sane"
[21:30:42] Senjai: Okay, sure, I will retract that. Can we move on now? :)
[21:31:09] j_mcnally: has joined #ruby
[21:31:59] n3vtelen: ruby -ropenssl -e 'puts OpenSSL::X509::DEFAULT_CERT_FILE' outputs:
[21:32:05] adaedra: I deploy my rails apps with php-fpm
[21:32:13] jhwhite: has joined #ruby
[21:32:17] n3vtelen: "C:/Users/Justin/Projects/knap-build/var/knapsack/software/x64-windows/openssl/1.0.1l/ssl/cert.pem"
[21:32:40] adaedra: That's a long path
[21:34:35] n3vtelen: how do I change that?
[21:36:47] solocsha1: has joined #ruby
[21:38:48] jayrmotta: has joined #ruby
[21:40:46] solars: has joined #ruby
[21:41:31] cochise: has joined #ruby
[21:43:35] bruno-: has joined #ruby
[21:44:17] arooni-mobile: has joined #ruby
[21:45:49] fmcgeough: has joined #ruby
[21:46:43] jlast: has joined #ruby
[21:46:50] Igorshp: has joined #ruby
[21:48:54] neohunter: has joined #ruby
[21:50:43] bronson: has joined #ruby
[21:50:55] iwishiwerearobot: has joined #ruby
[21:51:58] phutchins: has joined #ruby
[21:53:24] bruno-: has joined #ruby
[21:55:11] erma: has joined #ruby
[21:56:36] mjuszczak: has joined #ruby
[21:57:01] radens: Hey, how can I get the value of an instance variable in pry?
[21:57:17] Limix: has joined #ruby
[21:58:53] al2o3-cr: radens: instance_variable_get?
[21:59:05] xxneolithicxx: has joined #ruby
[21:59:07] bruno-: has joined #ruby
[21:59:07] michael_mbp: has joined #ruby
[22:00:01] JDiPierro: has joined #ruby
[22:00:16] al2o3-cr: radens: depends in what context
[22:00:40] radens: params.instance_variable_get('token')
[22:00:47] radens: I tried that, it's not working.
[22:01:18] al2o3-cr: radens: params is an object right?
[22:01:41] jlast: has joined #ruby
[22:01:42] al2o3-cr: so, params.instance_variable_get :@token
[22:01:42] axl_: has joined #ruby
[22:01:49] douglasssss: has joined #ruby
[22:01:56] decoponio: has joined #ruby
[22:02:05] radens: ah, thanks, I tried it without the @ sign
[22:02:23] Scroff: has joined #ruby
[22:02:28] rodfersou: has joined #ruby
[22:02:46] jhass: radens: also simply cd params
[22:02:50] drewo: has joined #ruby
[22:03:36] bruno-: has joined #ruby
[22:04:10] randiman: has joined #ruby
[22:05:18] nik_-_: has joined #ruby
[22:05:56] havenwood: Released Elixir.rb 0.1.0! \o/ https://github.com/havenwood/elixir.rb#readme
[22:07:36] havenwood: In case you were wanting the Elixir standard library in Ruby...
[22:08:35] moredhel-: has joined #ruby
[22:08:45] radens: that's an odd desire. As opposed to making your erlang look like ruby now you're making your ruby act like erlang! Still, pretty neat.
[22:09:41] dgutierrez1287: has joined #ruby
[22:09:54] Limix: has joined #ruby
[22:11:09] balazs: has joined #ruby
[22:12:16] sepp2k: has joined #ruby
[22:13:09] k3asd`: has joined #ruby
[22:13:46] jhack32: has joined #ruby
[22:14:18] whippythellama: has joined #ruby
[22:14:58] k3asd`_: has joined #ruby
[22:16:30] bruno-_: has joined #ruby
[22:16:40] platzhirsch: has joined #ruby
[22:17:13] jhack32: has joined #ruby
[22:18:51] gguggi: has joined #ruby
[22:18:52] mistermocha: has joined #ruby
[22:19:21] ledestin: has joined #ruby
[22:19:35] bruno-_: has joined #ruby
[22:20:09] jhack: has joined #ruby
[22:20:43] alphaatom: has joined #ruby
[22:21:00] PaulCapestany: has joined #ruby
[22:21:36] jhack: has joined #ruby
[22:21:39] mistermocha: has joined #ruby
[22:21:49] jhack: how do i hide my hostname?
[22:21:52] Scripore: has joined #ruby
[22:22:01] _blizzy_: has joined #ruby
[22:22:44] charliesome: has joined #ruby
[22:23:06] havenwood: jhack: Ask for a mask in the #freenode channel.
[22:23:29] jhass: well, if somebody wants to find it out they will, regardless of cloak
[22:23:39] jhack: alright, thanks @havenwood
[22:24:45] Axy: has joined #ruby
[22:24:46] zenspider: havenwood: 'grats. that looks neat
[22:25:08] jhack: has joined #ruby
[22:25:22] havenwood: zenspider: Thanks! :D
[22:25:59] astrobun_: has joined #ruby
[22:26:56] jhass: jhack: make sure to enable sasl auth at least to not make your cloak completely useless
[22:27:19] atomical: has joined #ruby
[22:27:19] i8igmac: has joined #ruby
[22:29:09] FernandoBasso: has joined #ruby
[22:29:14] eam: no advice to use a proxy? :)
[22:29:47] jhass: there's still the ctcp issues anyway
[22:30:02] _blizzy_: has joined #ruby
[22:30:16] Yiota: has joined #ruby
[22:30:40] Sehryn: has joined #ruby
[22:30:49] symbol: has joined #ruby
[22:32:02] noethics: has joined #ruby
[22:32:36] jhwhite: has joined #ruby
[22:33:57] iamse7en: anyone who is good with active record querying. I'm getting a PG::UndefinedTable and I can't figure out why. much appreciated! https://gist.github.com/austinarchibald/12ca85819db3bd6dc87f#file-games-rake-L32
[22:34:41] hahuang65: has joined #ruby
[22:34:57] bronson: has joined #ruby
[22:35:12] baweaver: has joined #ruby
[22:35:41] jhass: iamse7en: game_id: some_hash doesn't make a whole lot of sense
[22:36:21] bricker: iamse7en: does your Game table really have a "game_id" column?
[22:36:43] jhass: maybe you meant game_id: game_data[:preview] ?
[22:37:12] iamse7en: the task pulls in :preview. i'm changing the name to :game_id for my table
[22:37:24] iamse7en: like I'm doing with away_score and home_score
[22:37:30] jhass: iamse7en: don't. actually read what I wrote
[22:37:57] jhass: oh, nvm, read that as you're going to rename your table
[22:38:02] jhass: but it still applies
[22:38:20] jhass: you're passing a hash, so AR treats game_id as a table/association
[22:38:26] jhass: and that doesn't exist
[22:39:21] hotpancakes: has joined #ruby
[22:39:49] iamse7en: ok, so I want to update each game by finding the game_id, how would I do that?
[22:39:54] Soda: has joined #ruby
[22:40:03] mistermocha: has joined #ruby
[22:40:11] iamse7en: am i on the right track with find_by(game_id at least?
[22:40:32] iamse7en: it's a unique id for each game, so i want to access that, then update the values in that task
[22:40:48] jhass: so it's repeating myself five times time? fine.
[22:41:14] iamse7en: sorry, i'm pretty new
[22:41:17] jhass: you're passing a hash with Game.find_by(game_id: game_data)
[22:41:20] jhass: you're passing a hash with Game.find_by(game_id: game_data)
[22:41:22] jhass: you're passing a hash with Game.find_by(game_id: game_data)
[22:41:24] jhass: you're passing a hash with Game.find_by(game_id: game_data)
[22:41:26] jhass: is that enough?
[22:42:19] yorickpeterse: jhass: I think writing the message once would've been enough
[22:42:38] jhass: yorickpeterse: if you read back I already wrote it two times before and that wasn't
[22:42:58] iamse7en: you're saying what i'm doing wrong. i was asking what i need to do right
[22:43:10] yorickpeterse: jhass: don't lose your shit with newbies
[22:43:12] iamse7en: sorry, i'm very new to this world of programming
[22:43:17] yorickpeterse: it's a free ticket for them to never come back
[22:43:18] Senjai: jhass: ^ please, calm down :(
[22:43:26] jhass: 00:36 <jhass> maybe you meant game_id: game_data[:preview] ?
[22:43:29] yorickpeterse: Either calm the fuck down or simply stop replying
[22:44:22] renderful: has joined #ruby
[22:44:57] iamse7en: jhass: thanks for your help. that worked
[22:45:07] iamse7en: apologize for missing it. all the best!
[22:45:20] eggoez: has joined #ruby
[22:45:30] hornairs: has joined #ruby
[22:45:33] rickmasta: has joined #ruby
[22:46:13] charliesome: has joined #ruby
[22:46:49] jhass: ah and crossposter too
[22:47:23] davedev24_: has joined #ruby
[22:47:36] baweaver: Speaking of crosspost, I'll only mention it once in here, but in #ruby-offtopic I'm debating on writing a book
[22:48:05] baweaver: publishing free through leanpub, but more of getting what people are interested in. Probably going to cover FP
[22:48:08] Torrieri: has joined #ruby
[22:50:11] Igorshp: has joined #ruby
[22:52:51] Narzew: has joined #ruby
[22:53:03] Igorshp_: has joined #ruby
[22:53:12] x1337807x: has joined #ruby
[22:56:11] icebourg: has joined #ruby
[22:59:08] swgillespie: has joined #ruby
[22:59:55] quimrstorres: has joined #ruby
[23:02:33] x1337807x: has joined #ruby
[23:03:44] j4d: has joined #ruby
[23:05:25] Ropeney: has joined #ruby
[23:06:27] sphex_: hey. is there an easy way to get the amount of memory allocated for a given object?
[23:07:19] RegulationD: has joined #ruby
[23:08:25] hoofed: has joined #ruby
[23:08:45] zenspider: sphex: why?
[23:09:16] yorickpeterse: sphex: you can use the ObjectSpace module
[23:09:33] sphex: zenspider: just to get an general idea
[23:09:34] yorickpeterse: >> require 'objspace'; ObjectSpace.memsize_of('hello')
[23:09:35] ruboto: yorickpeterse # => 20 (https://eval.in/394565)
[23:10:06] yorickpeterse: not sure how accurate it is though
[23:10:29] sphex: oh ok. gonna play with it a little. thanks!
[23:10:40] sphex: 20 seems pretty low...
[23:10:59] gix: has joined #ruby
[23:11:02] wldcordeiro: has joined #ruby
[23:11:15] yorickpeterse: 20 bytes for a 5 byte string isn't really that bad
[23:11:17] Yiota: has joined #ruby
[23:11:36] snapfractalpop: has joined #ruby
[23:11:38] yorickpeterse: it's a struct + the underlying char + some metadata IIRC
[23:11:45] balazs: has joined #ruby
[23:11:59] snapfractalpop: can someone remind me of the name of a file in place
[23:12:21] sphex: yorickpeterse: hrm. that's strange I keep getting 0 out of memsize_of.
[23:12:23] snapfractalpop: like.. the start and end of the file are arbitrary, and it's used to put SQL
[23:12:28] zenspider: >> ObjectSpace.memsize_of(Object.new)
[23:12:29] zenspider: >> ObjectSpace.memsize_of("hello")
[23:12:29] ruboto: zenspider # => undefined method `memsize_of' for ObjectSpace:Module (NoMethodError) ...check link for more (https://eval.in/394566)
[23:12:30] ruboto: zenspider # => undefined method `memsize_of' for ObjectSpace:Module (NoMethodError) ...check link for more (https://eval.in/394568)
[23:12:38] yorickpeterse: needs a require
[23:12:42] zenspider: small strings get embedded inside the object's struct
[23:12:47] yorickpeterse: snapfractalpop: your question is confusing
[23:13:03] snapfractalpop: yorickpeterse: I know.. I don't know how to word it
[23:13:09] yorickpeterse: what does it do?
[23:13:40] sphex: it's a riddle!
[23:13:41] snapfractalpop: it's like.. suppose you have SQL, that would be a string, but you put it down as a file, right within your code
[23:13:45] zenspider: ObjectSpace.memsize_of("hello, this is a kinda sorta longer string. damn... how much space can this possibly take? fuck you buddy")
[23:14:01] zenspider: perhaps it isn't the most accurate function
[23:14:01] hahuang65: has joined #ruby
[23:14:07] hotpancakes: has joined #ruby
[23:14:08] yorickpeterse: snapfractalpop: you mean as a comment?
[23:14:23] yorickpeterse: zenspider: yeah the rdoc mentions the "return value is incomplete"
[23:14:26] yorickpeterse: whatever that means
[23:14:27] devdazed: has joined #ruby
[23:14:48] snapfractalpop: yorickpeterse: no.. it becomes a string, with newline literals
[23:14:58] yorickpeterse: eh, you mean just a string literal?
[23:15:00] snapfractalpop: the start and end tags have to match
[23:15:12] snapfractalpop: yes, a heredoc!
[23:15:22] snapfractalpop: I don't know why I forgot the name of it
[23:15:38] yorickpeterse: well, some call them nowdoc too I believe
[23:15:41] yorickpeterse: or maybe that was just PHP
[23:15:43] snapfractalpop: I'm not a huge fan of them.. just couldn't remember the name and it was bugging me
[23:15:56] snapfractalpop: thanks for "scratching that itch
[23:17:15] axsuul_: has joined #ruby
[23:18:50] zenspider: om nom nom... 18 oz ribeye is in the oven...
[23:20:36] Senjai: I mean I never got why they were called heredocs in the first place
[23:20:46] yorickpeterse: because they're here
[23:20:50] yizr_: has joined #ruby
[23:20:51] ruboto: Badum-Tshh! https://www.youtube.com/watch?v=oShTJ90fC34
[23:21:13] Senjai: I only use them for things like testing yaml parsers
[23:21:15] Senjai: and stuff
[23:21:30] baweaver: I kinda wish Ruby used Scala's triple quote
[23:21:33] zenspider: goes back to at least shell days. I dunno
[23:21:34] Senjai: Or when i need to use StringIO in lieu of some filesystem access
[23:21:36] xxneolithicxx: has joined #ruby
[23:21:39] baweaver: you can left brace it with pipes
[23:21:43] zenspider: baweaver: you mean python's triple quote?
[23:21:47] Senjai: I wish ruby had proper block comments
[23:21:59] zenspider: they're just ugly
[23:22:07] Senjai: and they have to be on the beginning of the line
[23:22:10] wallerdev2: theyre beautiful in their own special way
[23:22:26] baweaver: ACTION steps away from landmine issue
[23:22:31] zenspider: wallerdev_: you must be its mother :P
[23:22:33] Senjai: I would EVENT SETTLE for c-style block comments.
[23:22:36] ryan: has joined #ruby
[23:22:54] zenspider: you can probably arrange that via cpp
[23:22:56] Senjai: Or coffeescript style block comments
[23:23:06] Senjai: ### totally legit
[23:24:31] zenspider: set up cpp and we even get *cough*fake/bad*cough* macros!
[23:25:05] baweaver: L(et) O(ver) L(ambda)
[23:25:08] casadei_: has joined #ruby
[23:25:09] wallerdev2: i never found the appeal of multiline comments haha
[23:25:17] FernandoBasso: has joined #ruby
[23:25:23] wallerdev2: i prefer // or # on every line
[23:25:23] bruno-: has joined #ruby
[23:25:24] Senjai: wallerdev_: It used to bother me before I knew how to vim and comment blocks that way
[23:25:41] zenspider: baweaver: I've been trying to take a whack at that... it's really hard to get into common lisp when you love scheme
[23:25:49] wallerdev2: ah yeah i guess if you're using notepad or something and have to type in each that would suck
[23:25:57] chouhoulis: has joined #ruby
[23:25:57] baweaver: Also a dense book
[23:26:08] zenspider: the macros are so... gross.
[23:26:19] zenspider: scheme's macro system is ... hard... but so damn pretty
[23:26:29] baweaver: Clojure at least got that somewhat decently
[23:26:35] Scroff: has joined #ruby
[23:26:36] Senjai: It has been forever since I've usedd scheme
[23:26:59] zenspider: we're working through the entire little schemer series in our study group. just finishing the reasoned schemer. it's amazing what you can do with lambdas + hygenic macros
[23:27:03] baweaver: Might have tried to write a photoshop variant in scheme once when I was bored.
[23:27:23] baweaver: Peano / Church numerals abound
[23:27:45] ferret_guy: I am using passenger with apache and when I load the page I configured it shows the directory as opposed to the ruby app
[23:28:01] Senjai: zenspider: Which study group is this
[23:28:13] Senjai: have you tried that MIT book
[23:28:15] zenspider: SeaRbSg == Seattle.rb Study Group
[23:28:26] zenspider: "that MIT book" is beyond vague
[23:28:42] zenspider: they have their own press, ya know...
[23:30:02] Radar: ferret_guy: screenshot plz
[23:30:25] sharpmachine: has joined #ruby
[23:30:54] baweaver: SICP is probably what
[23:30:57] Senjai: zenspider: I've been meaning to come down to seattle sometime for one of the ruby meetups
[23:31:02] Senjai: I'm not exactly far away
[23:31:03] baweaver: Structure and Interpretation of Computer Programs
[23:31:07] baweaver: if I got that right
[23:31:10] Senjai: baweaver: Yeah
[23:31:11] Senjai: that's the one
[23:31:16] baweaver: I'll be up there in July at least.
[23:31:25] baweaver: What time does that normally happen at anyways?
[23:31:29] Senjai: baweaver: Maybe we could coordinate ;)
[23:31:30] baweaver: ACTION goes to meetups to find it
[23:31:39] baweaver: I live in the San Francisco area
[23:31:42] baweaver: just up there for vacation.
[23:31:46] baweaver: figured I'd drop by.
[23:31:48] Senjai: I live in Victoria BC, Can
[23:31:56] Senjai: Literally a clipper ride away
[23:32:00] Radar: Literally.
[23:32:07] Senjai: Literally
[23:32:28] Senjai: You should join us Radar, I'm sure its not that far for you either /s
[23:32:35] Radar: Senjai: 14hrs by plane
[23:32:45] Senjai: ik :P, if you ask me: worth it
[23:33:22] Radar: TIL: Senjai is paying for my flight to Seattle
[23:33:36] baweaver: Heh, if I really wanted to I could sign up to give a talk for July too :D
[23:33:49] baweaver: Clairvoyant should have enough to it by then to be fun
[23:33:50] zenspider: yeah. we did SICP a few years back.
[23:33:54] dented42: has joined #ruby
[23:34:03] Senjai: I still havent got through it
[23:34:08] Radar: Flights are only $1462.
[23:34:24] zenspider: Senjai: you should come! we've had canadian members before. miles used to show up fairly regularly
[23:34:46] zenspider: there's a seaplane that goes up to BC and back
[23:34:53] Senjai: It's super fast
[23:34:57] zenspider: has to have incredible views of the san juans
[23:34:59] Senjai: could go there and back in a day ez
[23:35:26] Senjai: zenspider: I have to get my passport renewed, then i'll come down for sure
[23:35:30] Senjai: possibly not july, or maybe late july
[23:35:40] zenspider: miles is in frasier valley. it's even further (but no ferry to deal with)
[23:35:51] Senjai: I dont think I want to drive
[23:35:52] bronson: has joined #ruby
[23:36:01] zenspider: not with that horrid ferry system.
[23:36:07] Senjai: It is pretty bad
[23:36:08] baweaver: zenspider: They already have a talk for this month?
[23:36:15] zenspider: tonight, yeah
[23:36:30] Senjai: baweaver: You're going on the 28th?
[23:36:43] zenspider: we only do talks / foods / booze on the first tuesday of the month
[23:36:45] baweaver: there is still a meeting then right? Or did I get that wrong?
[23:36:50] ohaibbq: has joined #ruby
[23:36:52] zenspider: julia will be speaking tonight about kubernetes (sp?)
[23:37:01] zenspider: we meet every tuesday
[23:37:05] baweaver: I get there at the last week of the month.
[23:37:21] zenspider: then you can have the best espresso you've ever had
[23:37:35] zenspider: (or beer, but I can't vouch for that)
[23:37:46] baweaver: There are a few snooty baristas around here that'd likely disagree :P
[23:37:54] zenspider: they're wrong
[23:37:57] phutchins: has joined #ruby
[23:38:13] zenspider: blue bottle is the closest I've seen SF get, but it's still only 90% or so
[23:38:33] zenspider: there was a teeny stand near github that was good... still not as good
[23:38:48] zenspider: but really, in SF they seem to focus on the "snooty" part, and not the coffee part
[23:38:51] baweaver: I'm down by Southpark
[23:38:55] zenspider: they've got that down pat
[23:38:59] baweaver: sounds par for course.
[23:38:59] Senjai: I could see if I could come by on the 28th, passport permitting
[23:39:04] al2o3-cr: has joined #ruby
[23:39:15] Axsuul: has joined #ruby
[23:39:24] zenspider: southpark was close to github iirc, so I think it is near you
[23:39:34] baweaver: 2nd and Harrison is where we're at.
[23:39:35] quazimodo: has joined #ruby
[23:39:40] jhwhite: has joined #ruby
[23:39:42] zenspider: (github may have moved since I was last in the office)
[23:39:45] iwishiwerearobot: has joined #ruby
[23:39:48] zenspider: (I don't track)
[23:39:56] Axsuul: has joined #ruby
[23:40:00] jesterfraud: has joined #ruby
[23:40:01] baweaver: Right by Twilio, Atlassian, and Ubisoft
[23:40:19] baweaver: There are so many I lose track honestly.
[23:40:22] iamninja: has joined #ruby
[23:40:42] zenspider: from the github office, it was .... west 1-2 blocks, then down an alley ... north?
[23:40:59] zenspider: who knows. may not exist anymore. it was tastyish, but not worth the wait :)
[23:41:16] zenspider: must check on beef...
[23:41:47] dseitz: has joined #ruby
[23:41:52] zenspider: man... this reverse sear is gonna take forever. :/
[23:42:07] zenspider: I guess its only been 20 minutes
[23:43:56] momomomomo: has joined #ruby
[23:45:01] chouhoulis: has joined #ruby
[23:45:50] ferret_guy: @Radar Image http://i.imgur.com/uliDnaA.png relevent config http://pastebin.com/yftwxRqj
[23:45:51] ruboto: ferret_guy, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/16dd4a908906219b4ec1
[23:45:51] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[23:46:01] jfarmer: has joined #ruby
[23:46:33] Radar: ferret_guy: Your apache config is pointing to the application dir, rather than the public dir inside the application dir.
[23:46:37] Radar: ferret_guy: change your config + restart apache
[23:46:40] Radar: HEY PRESTO it's fixed
[23:47:04] JeramyRR: has joined #ruby
[23:47:21] ferret_guy: @Radar AppRppt?
[23:47:28] ferret_guy: @Radar AppRoot?*?
[23:47:38] Radar: ferret_guy: Show me the whole VirtualHost config please (in a Gist)
[23:47:50] mistermocha: has joined #ruby
[23:48:25] Senjai: I will also take a small sidebar and suggest nginx instead
[23:48:26] zenspider: baweaver: if you have good coffee suggestions for SF, I'd love them. I always feel looked down upon (and yet, still get worse coffee) when I try to get coffee down there
[23:48:27] Senjai: ACTION runs away
[23:49:19] sharpmachine: has joined #ruby
[23:49:24] ferret_guy: @Radar https://gist.github.com/markomo/9f8fc20aabe38f5d476a
[23:49:43] baweaver: Four Barrel tends to be decent, and Small Foods is fairly nice.
[23:49:51] Radar: ferret_guy: https://gist.github.com/markomo/9f8fc20aabe38f5d476a#file-gistfile1-txt-L9 should be home/mark/dashboard/public
[23:50:11] shevy: we now have a ferret and a beaver
[23:50:31] Radar: and a spider
[23:50:41] ferret_guy: @Radar :/ no go
[23:50:47] Radar: ferret_guy: What happens now?
[23:50:48] shevy: well zenspider that's scary... I read the intro part... lemme find it ...
[23:50:53] Radar: ferret_guy: Did you restart your apache server?
[23:51:00] ferret_guy: @Radar Yep, Same thing
[23:51:08] shevy: "...they can afford to move so fucking slow, man, they'll wait years and years. Give you a whole life, just so you'll have more to lose when they come and take it away. Patient like a spider. Zen spiders."
[23:51:14] mistermocha: has joined #ruby
[23:51:19] shevy: it scared me sufficiently much so that I instantly stopped to read right there!
[23:51:24] Radar: ferret_guy: oh rly
[23:51:31] Radar: ferret_guy: Still showing a directory listing of app? Not public?
[23:51:45] hahuang65: has joined #ruby
[23:52:04] devdazed: has joined #ruby
[23:52:04] ferret_guy: Radar: hmm good point let me clear my cache
[23:52:19] jhack: has joined #ruby
[23:53:35] nofxx: has joined #ruby
[23:54:07] jhack: Hey is anyone doing or has experience with software dev Bootcamps?
[23:54:27] zenspider: 28 more degrees... huge jump in just 10 minutes.
[23:54:35] Senjai: jhack: Many of them are not fantastic
[23:54:41] Senjai: And cost quite a bit of money
[23:54:48] ferret_guy: @Radar very odd I updated my gist to be current and it still shows the root directory https://gist.github.com/markomo/9f8fc20aabe38f5d476a
[23:54:51] Senjai: jhack: Not fantastic as measured from people we get applying from them
[23:54:55] zenspider: jhack: some. just ask your q's
[23:55:05] Radar: ferret_guy: I have no idea then.
[23:55:10] Radar: ferret_guy: It all checks out to me.
[23:55:13] ferret_guy: @Radar stopped reloaded to verifyd it was stopped started and still at the same directory
[23:55:14] jhack: I've been planning on applying to flatiron
[23:55:17] zenspider: ferret_guy: perms?
[23:55:22] jhack: Don't know how to determine if I'm ready
[23:55:27] zenspider: or... verify you're not caching the old result?
[23:55:35] jhack: And I wanna get some more reviews on dev bootcamp in nyc
[23:55:37] ferret_guy: @zenspide all 777 for good mesure
[23:55:50] prettiestPony11: has joined #ruby
[23:55:51] zenspider: that might not be allowed.
[23:55:55] zenspider: turn off write
[23:56:05] yfeldblum: has joined #ruby
[23:56:17] zenspider: depends on what you're trying to do... apache is a pita with this shit
[23:56:31] zenspider: "it's wrong" "what's wrong?" "it"
[23:56:44] zenspider: always feels like that
[23:56:45] baweaver: s/with this shit// - ftfy
[23:57:22] zenspider: s/is a/is especially a/
[23:57:29] ferret_guy: @zenspider the access logs are showing the files are allowed, and obviously i can browse them
[23:57:38] zenspider: kk. ignore me then
[23:57:55] nerium: has joined #ruby
[23:58:11] Scripore: has joined #ruby
[23:58:14] nerium: Is there any lib for downloading a partial file using Ruby?
[23:58:19] ferret_guy: the passenger IRC irc dead :/ gotta wait at least a couple hours for help
[23:58:22] Senjai: ferret_guy: I know this isn't a solution to your issue, have you considered using nginx instead?
[23:58:34] Senjai: If you have the flexibility to do so
[23:58:40] ferret_guy: @Senjai kinda locked in
[23:58:46] Sehryn: has joined #ruby
[23:58:49] Senjai: That's mega unfortunate
[23:59:10] bricker: ferret_guy: what's the problemz
[23:59:18] zenspider: jhack: only you can say whether you're ready.
[23:59:30] ferret_guy: I am using passenger with apache and when I load the page I configured it shows the directory as opposed to the ruby app
[23:59:52] zenspider: if you're willing to go nose down and really work for it, you can get a lot of value out of the structure that a bootcamp can provide. if not... well... don't waste your money until you are ready
[23:59:58] ferret_guy: @bricker Image http://i.imgur.com/uliDnaA.png relevent config http://pastebin.com/yftwxRqj
[23:59:59] ruboto: ferret_guy, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/cd6fe64be9e387d0983d
[23:59:59] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.