« Back to channel list

#ruby - 18 November 2015

« Back 1 day Forward 1 day »
[00:00:01] tubulife-: has joined #ruby
[00:00:11] xxneolithicxx: has joined #ruby
[00:00:19] dotix: has joined #ruby
[00:00:23] Daneel: well time to sleep for me
[00:01:02] weemsledeux: has joined #ruby
[00:01:06] adaedra: I don't understand why, it's only 1.
[00:01:29] Ox0dea: Sleep is for Animalia.
[00:01:55] adaedra: Ox0dea: also, plenking.
[00:02:08] Ox0dea: Is plenking quite a French thing, then?
[00:02:23] Ox0dea: shevy introduced me to the term and he's not particularly French.
[00:02:46] adaedra: The language requires an unbreakable space before ! ? and some other punctuation
[00:02:55] Xeago: has joined #ruby
[00:03:00] mary5030: has joined #ruby
[00:03:13] AndyBotwin: has joined #ruby
[00:03:19] adaedra: So it's a common error for us, even if someone plenking is not always french-speaking, of course.
[00:03:40] adaedra: I have no idea if other languages do it, though.
[00:03:54] Ox0dea: What happens if an unbreakable space meets an unhyphenable word?
[00:04:17] CustosLimen: http://termbin.com/0vgf
[00:04:26] adaedra: more spaces than letters in the line.
[00:04:32] CustosLimen: How do I call the function inside module Something ?
[00:05:17] Ox0dea: CustosLimen: You want `def self.test`.
[00:05:23] Ox0dea: It needs to be a singleton method on the module.
[00:05:40] Ox0dea: As it stands, you're invoking Kernel#test with an explicit receiver.
[00:05:44] Ox0dea: >> method(:test)
[00:05:45] ruboto: Ox0dea # => #<Method: Object(Kernel)#test> (https://eval.in/470809)
[00:05:48] gambl0re: has joined #ruby
[00:06:06] riotjones: has joined #ruby
[00:06:22] Ox0dea: That's why the error mentions privacy rather than nonexistence.
[00:10:09] htmldrum: has joined #ruby
[00:12:29] shinnya: has joined #ruby
[00:12:30] roxtrongo: has joined #ruby
[00:13:29] jessemcgilallen: has joined #ruby
[00:13:54] tejasmanohar: is Rack::Auth::Basic just http basic authentication? do most browsers just know the pop up an alert-ish box asking for user/pass when they visit a page that requires this?
[00:13:58] dnewkerk: has joined #ruby
[00:14:57] Ox0dea: tejasmanohar: Yep.
[00:15:20] Ox0dea: It's essentially just a header.
[00:15:36] adaedra: And a status code, to trigger the dialog.
[00:16:06] Ox0dea: Oh, right.
[00:16:37] adaedra: You server says "You're not allowed to access this page, I require a password.", so the browser shows the dialog, and retries with the information provided.
[00:17:44] jdawgaz: has joined #ruby
[00:17:46] adaedra: HTTP Basic is rather old tech now, so you can expect all browser to know it.
[00:18:19] freerobby: has joined #ruby
[00:19:10] Inoperable: has joined #ruby
[00:19:40] nej_: has joined #ruby
[00:19:43] baweaver: has joined #ruby
[00:20:12] sanjayu: has joined #ruby
[00:21:22] stannard: has joined #ruby
[00:22:23] arooni: has joined #ruby
[00:22:48] arooni: has joined #ruby
[00:23:43] shaileshg: has joined #ruby
[00:25:06] Ilyes512: has joined #ruby
[00:26:32] rgrmatt: has joined #ruby
[00:26:49] pwnd_nsfw: has joined #ruby
[00:30:10] n_blownapart: has joined #ruby
[00:32:24] colegatron: has joined #ruby
[00:32:31] jatb: has joined #ruby
[00:35:26] jetpackjoe: has joined #ruby
[00:40:26] stannard: has joined #ruby
[00:42:00] Moyst: has joined #ruby
[00:42:31] diegoviola: has joined #ruby
[00:44:43] aeontech: has joined #ruby
[00:45:11] setient: has joined #ruby
[00:45:13] rgrmatt: has joined #ruby
[00:45:41] gregf_: has joined #ruby
[00:45:41] karapetyan: has joined #ruby
[00:46:01] DLSteve: has joined #ruby
[00:49:43] catphish: has joined #ruby
[00:50:33] catphish: is there a correct way to write this: @variable ||= do; block; end
[00:51:29] RegulationD: has joined #ruby
[00:51:39] catphish: where block returns a value to set variable to
[00:51:53] Radar: catphish: real code plz
[00:52:41] catphish: @variable ||= do; 1; end
[00:53:02] uri: has joined #ruby
[00:53:07] catphish: where i want to set @variable to 1 if it's not already set
[00:53:37] catphish: obviously in reality "1" will actually involve some processing, but i wanted to keep it simple :)
[00:54:46] catphish: ah, i think the correct answer is: @variable ||= begin; 1; end
[00:54:50] adaedra: just do `@variable ||= expression`
[00:55:10] adaedra: @variable ||= 1 # is valid
[00:55:29] catphish: adaedra: my point was that instead of 1, i wanted a block of code
[00:55:40] catphish: that ultimately returns a value to assign
[00:55:51] adaedra: ||= has the same semantics than =
[00:56:08] adaedra: so yes, you can use begin; ...; end if it's a long calculation, or call a method
[00:56:09] catphish: sorry, i think a better example would be: @variable ||= begin; 1 + 2 + n; end
[00:56:25] adaedra: why not `@variable ||= 1 + 2 + n` ?
[00:56:27] Ox0dea: catphish: That's not really "processing".
[00:56:33] tkuchiki: has joined #ruby
[00:56:52] Ox0dea: If you don't need to do anything stateful, just nix the `begin` wrapper.
[00:57:03] catphish: sorry, i was trying to make my example fit on one line :)
[00:57:05] adaedra: you may want to explain what you want to do in the first place, the whole picture.
[00:57:18] catphish: anyway, the answer is that the keyword is "begin" not "do"
[00:57:48] symbol: has joined #ruby
[00:58:12] catphish: sorry for the poor question, slightly tired
[00:58:59] Ox0dea: catphish: http://c2.com/cgi/wiki?ExtractMethod
[00:59:45] catphish: Ox0dea: that makes sense i guess, i'm usually guilty of writing overly long methods
[01:00:35] rgtk: has joined #ruby
[01:00:53] sdothum: has joined #ruby
[01:00:59] dotix: has joined #ruby
[01:00:59] dotix: has joined #ruby
[01:02:05] Ox0dea: Metrics/MethodLength:
[01:02:14] Ox0dea: Problem solved.
[01:02:26] rgtk: has joined #ruby
[01:03:18] northfurr: has joined #ruby
[01:05:24] abucha: has joined #ruby
[01:06:16] rgtk_: has joined #ruby
[01:06:52] riotjones: has joined #ruby
[01:08:11] rgtk: has joined #ruby
[01:09:06] mistermo_: has joined #ruby
[01:10:00] rgtk: has joined #ruby
[01:11:38] Emmanuel_Chanel: has joined #ruby
[01:11:55] rgtk: has joined #ruby
[01:12:44] catphish: has left #ruby: ("Leaving")
[01:13:11] yoongkang: has joined #ruby
[01:13:35] stannard_: has joined #ruby
[01:13:52] rgtk: has joined #ruby
[01:15:31] rgtk: has joined #ruby
[01:17:40] tubulife-: has joined #ruby
[01:19:26] ruby-lang803: has joined #ruby
[01:19:45] IrishGringo: has joined #ruby
[01:20:38] kies: has joined #ruby
[01:20:46] karapetyan: has joined #ruby
[01:22:01] stannard: has joined #ruby
[01:23:00] solocshaw: has joined #ruby
[01:23:02] ruby-lang803: has left #ruby: ()
[01:23:07] cjbottaro: has joined #ruby
[01:23:09] cwong_on_irc: has joined #ruby
[01:23:41] nettoweb: has joined #ruby
[01:23:44] bruce_lee: has joined #ruby
[01:24:04] bruce_lee: has joined #ruby
[01:26:07] benlovell: has joined #ruby
[01:26:55] rgrmatt: has joined #ruby
[01:31:28] Respek: has joined #ruby
[01:32:37] trosborn: has joined #ruby
[01:33:06] northfurr: has joined #ruby
[01:36:07] craysiii: has joined #ruby
[01:41:17] RegulationD: has joined #ruby
[01:44:11] antoniobeyah: has joined #ruby
[01:48:12] rakm: has joined #ruby
[01:48:16] sdfgsdfg: has joined #ruby
[01:50:28] jdawgaz: has joined #ruby
[01:51:11] Rodya_: has joined #ruby
[01:52:01] tkuchiki: has joined #ruby
[01:52:27] beneggett: has joined #ruby
[01:54:43] Musashi007: has joined #ruby
[01:54:49] trav408: has left #ruby: ("WeeChat 1.2")
[01:55:58] jackjackdripper: has joined #ruby
[01:57:02] roxtrongo: has joined #ruby
[01:58:17] slackbotgz: has joined #ruby
[02:00:13] baweaver: has joined #ruby
[02:01:13] Fire-Dragon-DoL: has joined #ruby
[02:01:47] roxtrongo: has joined #ruby
[02:04:35] moei: has joined #ruby
[02:05:46] vestinst: has joined #ruby
[02:05:47] roxtrongo: has joined #ruby
[02:07:32] riotjones: has joined #ruby
[02:09:03] weemsledeux: has joined #ruby
[02:09:04] roxtrongo: has joined #ruby
[02:12:03] CorySimmons: has joined #ruby
[02:12:26] dlitvak: has joined #ruby
[02:12:40] TheNet: has joined #ruby
[02:12:54] roxtrongo: has joined #ruby
[02:15:05] jetpackjoe: has joined #ruby
[02:15:19] haraoka: has joined #ruby
[02:16:24] Unarmed: has joined #ruby
[02:17:28] DLSteve: has joined #ruby
[02:19:47] bosh: has joined #ruby
[02:20:00] mistermocha: has joined #ruby
[02:22:21] tubulife-: has joined #ruby
[02:24:08] kiki_lamb: What's the simplest way of inquiring whether an object can be .dup-ed?
[02:24:39] northfurr: has joined #ruby
[02:24:59] droidburgundy: has joined #ruby
[02:25:05] roxtrongo: has joined #ruby
[02:25:32] kiki_lamb: .respond_to?(:dup) doesn't seem adequate - nilclass responds true, but then throws 'can't dup nil' if you try.. fixnums don't exen have .respond_to? available.
[02:26:52] Fire-Dragon-DoL: has joined #ruby
[02:27:30] Musashi007: has joined #ruby
[02:28:18] johnny56: has joined #ruby
[02:30:32] skweek: has joined #ruby
[02:31:31] howdoico1: has joined #ruby
[02:32:27] jhass: >> 1.respond_to? :+
[02:32:28] ruboto: jhass # => true (https://eval.in/470821)
[02:33:17] zenguy_pc: has joined #ruby
[02:34:32] rgrmatt: has joined #ruby
[02:37:07] jamto11: has joined #ruby
[02:37:36] bruno-: has joined #ruby
[02:39:17] jhass: kiki_lamb: given activesupport defines duplicable?, there's probably none in stdlib and you have to rescue http://api.rubyonrails.org/classes/Object.html#method-i-duplicable-3F
[02:39:21] rgrmatt: has joined #ruby
[02:40:23] antoniobeyah: has joined #ruby
[02:40:29] diegoaguilar: has joined #ruby
[02:41:40] kiki_lamb: jhass: yeah, i looked back and i mistyped my respond_to? check on fixnum, sorry. Hmm, okay... so I should basically just go with 'o.dup rescue o'.
[02:42:37] northfurr: has joined #ruby
[02:42:39] jhass: kiki_lamb: well, why are you so unsure about what you get but want to copy it all? seems a bit odd
[02:45:47] zenguy_pc: has joined #ruby
[02:45:48] CanTonic: has joined #ruby
[02:46:28] mistermocha: has joined #ruby
[02:47:02] roxtrongo: has joined #ruby
[02:47:25] UtkarshRay: has joined #ruby
[02:48:46] kiki_lamb: jhass: i'm writing some attribute helper methods for a set of classes, which accept an optional default. if the default is mutable, like a hash, we need to dup it so that instances don't end up sharing references to the same default object... but for other default values, like integers or boolean values, we don't need to call dup, and just want to pass the value straight to instance_variable_set to set the underlying storage variable.
[02:49:26] moeabdol: has joined #ruby
[02:50:24] roxtrongo: has joined #ruby
[02:50:50] kiki_lamb: jhass: if you're interested, specifically, I'm working on the first method shown in this file, into which i've just stuck a 'default.dup rescue default' expression on line 15 -> https://github.com/kiki-lamb/drumtool/blob/devel/lib/drumtool/models/bubbles/traits/klass.rb
[02:52:14] Rodya_: has joined #ruby
[02:52:23] jhass: kiki_lamb: stdlib solves this by storing blocks that are called when needed, compare for example Hash#default and Hash#default_proc
[02:53:04] Rodya_: has joined #ruby
[02:53:17] s2013: has joined #ruby
[02:53:52] roxtrongo: has joined #ruby
[02:54:12] TheRokh1: has joined #ruby
[02:56:06] Pupp3tm4_: has joined #ruby
[02:57:27] roxtrongo: has joined #ruby
[02:58:06] Melpaws: has joined #ruby
[02:58:57] kiki_lamb: jhass: makes sense. is there anything particularly wrong with the rescue version, though? I'm already using my block parameter for an &after Proc that happens after the setter sets, and it's a little easier on the eye for this method's user to just pass a value instead of a big cumbersome Proc.new { value }.
[03:00:23] jhass: Proc.new { value } is indeed odd, it's be proc { value }, lambda { value } or -> { value } rather.
[03:00:28] xcesariox: has joined #ruby
[03:01:26] howdoico1: has joined #ruby
[03:01:41] jhass: so the sad state is that few people implement .dup / .initialize_copy correctly
[03:02:14] kent\n: has joined #ruby
[03:02:21] jhass: so while it probably will most likely work for stdlib stuff, for user/library defined datatypes it might break subtly
[03:02:36] jhass: also think about cases where sharing the same instance might even be desired
[03:02:40] dotix: has joined #ruby
[03:02:40] dotix: has joined #ruby
[03:03:32] kiki_lamb: Okay... the likely defaults are pretty much all stdlib items or classes I'm writing, so it's probably alright.
[03:04:10] kiki_lamb: Yeah, I considered that - the only case I can think of, so far, where sharing a default makes for these atrribute would be when the default is a Module or Class.
[03:04:36] kiki_lamb: So, on that basic I've revised the expression to: (Module === default ? default : (default.dup rescue default)))
[03:04:45] willardg: has joined #ruby
[03:06:19] nateberkopec: has joined #ruby
[03:06:23] M-prosodyContext: has joined #ruby
[03:07:07] kiki_lamb: I can't think of another situation where sharing state would make sense for these. They're arranged in a tree structure, and behaviour covering when they should access each others state is already implemented (and working well) elsewhere, so sharing state via shared default objects seems at best unnecessary and more often than not a source for cconfusion and errors.
[03:07:29] jrhorn: has joined #ruby
[03:08:21] riotjones: has joined #ruby
[03:09:37] safe: has joined #ruby
[03:09:38] kies: has joined #ruby
[03:09:41] kiki_lamb: Plus, these aren't really used to hold a mutating state over time, so any benefits related to that are moot. Once the objects have been built, they're essentially used as is, the only thing that's mutated over time after building them is literally a single Fixnum counter value on the topmost scope.
[03:10:33] s2013: has joined #ruby
[03:11:04] Yzguy: has joined #ruby
[03:11:06] xcesariox: has joined #ruby
[03:14:20] benlovell: has joined #ruby
[03:15:10] Bloomer: has joined #ruby
[03:15:33] kiki_lamb: (these 'bubbles' are essentially nodes in an AST created from the program's DSL, which is, at the moment, purely declarative and does not include mutable states... mutable states will probably be added in the future, but when that happens the DSL's AST and it's current program state will likely be held in separate objects, since, in addition to mutating state while keeping the same AST, here we're actually also going to need the ability to rebuild the
[03:16:15] BrunoSaboia: has joined #ruby
[03:16:33] northfurr: has joined #ruby
[03:17:02] CloCkWeRX: has joined #ruby
[03:18:10] kiki_lamb: it's a livecoding tool for performing music, so being able to update the code while it's running is kind of the entire point... mutable state would only be useful here if I can continue to update the program's code during execution without destroying that state. :) fun stuff.
[03:18:17] Guest97: has joined #ruby
[03:18:25] pwnd_nsfw: has joined #ruby
[03:18:59] jetpackjoe: has joined #ruby
[03:19:29] trosborn: has joined #ruby
[03:21:11] jdawgaz: has joined #ruby
[03:21:13] big|bad|wolf: has joined #ruby
[03:22:22] jrhorn_: has joined #ruby
[03:25:29] Tempesta: has joined #ruby
[03:25:33] s00pcan_: has joined #ruby
[03:26:03] jrhorn424: has joined #ruby
[03:27:58] mjwhitta: has joined #ruby
[03:31:44] Oli`: has joined #ruby
[03:32:07] jrhorn424: has joined #ruby
[03:32:49] dlitvak: has joined #ruby
[03:35:55] sekrit: has joined #ruby
[03:36:12] rickmasta: has joined #ruby
[03:38:00] TheNet: has joined #ruby
[03:38:36] bruno-: has joined #ruby
[03:43:55] xaxisx: has joined #ruby
[03:44:47] chipotle: has joined #ruby
[03:45:49] jgpawletko: has joined #ruby
[03:49:37] tmtwd: has joined #ruby
[03:50:28] Oli`: has joined #ruby
[03:50:51] djbkd: has joined #ruby
[03:58:54] derailed: has joined #ruby
[04:01:53] ibouvousaime: has joined #ruby
[04:01:59] howdoico1: has joined #ruby
[04:02:07] beneggett: has joined #ruby
[04:02:35] northfurr: has joined #ruby
[04:03:21] qiukun: has joined #ruby
[04:04:52] peppers: has joined #ruby
[04:05:42] iateadonut: has joined #ruby
[04:09:09] riotjones: has joined #ruby
[04:09:53] braincrash: has joined #ruby
[04:11:02] patrick: has joined #ruby
[04:11:31] Musashi007: has joined #ruby
[04:13:22] killsomehiggers: has joined #ruby
[04:13:55] benlieb: has joined #ruby
[04:14:26] ta: has joined #ruby
[04:15:31] dopie: has joined #ruby
[04:15:47] Bloomer: has joined #ruby
[04:15:53] benlieb: has joined #ruby
[04:16:24] shortdudey123: has joined #ruby
[04:17:35] diegoviola: has joined #ruby
[04:18:43] Meow-J: has joined #ruby
[04:18:59] diegoviola: has joined #ruby
[04:18:59] ruby-lang104: has joined #ruby
[04:19:10] ruby-lang104: could someone help me, i need a quick fix
[04:20:39] Eiam_: has joined #ruby
[04:20:58] towski_: has joined #ruby
[04:21:17] jessemcgilallen: has joined #ruby
[04:22:07] fedexo: has joined #ruby
[04:22:54] qiukun: has left #ruby: ()
[04:25:06] Axsuul: has joined #ruby
[04:28:18] araujo: has joined #ruby
[04:28:53] ruby-lang104: if i use the same words for a class and the code is created by 2 different person who do not know one another, how do i solve the problem
[04:29:21] afaris: has joined #ruby
[04:29:45] yoongkang: has joined #ruby
[04:30:33] Aria: Namespace collision?
[04:30:37] Aria: That's tough. Rename one.
[04:31:11] ruby-lang104: i tried to but it crashes
[04:31:12] Emmanuel_Chanel: has joined #ruby
[04:31:19] Aria: But what crashes?
[04:31:39] Aria: Right. Renaming isn't simple.
[04:31:45] Aria: Where do these two classes come from
[04:31:52] ruby-lang104: the class is actually used in the main program, the script i am talking about are extensions\
[04:32:00] ruby-lang104: so its not like i thought
[04:32:53] ruby-lang104: i have a question
[04:33:02] ruby-lang104: if i write class < class2
[04:33:04] ruby-lang104: what does that mean
[04:33:35] jetpackjoe: has joined #ruby
[04:33:41] darkf: has joined #ruby
[04:36:06] cmoneylulz: has joined #ruby
[04:37:26] ICantCook: has joined #ruby
[04:37:41] moeabdol: has joined #ruby
[04:37:56] shinenelson: has joined #ruby
[04:38:12] ruby-lang104: would anyone be willing to do some ruby work for 5$
[04:38:34] krz: has joined #ruby
[04:38:58] killsomehiggers: what kind of work?
[04:39:05] ruby-lang104: compatibility
[04:39:24] ruby-lang104: do you have paypal
[04:39:40] bruno-: has joined #ruby
[04:42:44] bosh: has joined #ruby
[04:42:48] skweek: has joined #ruby
[04:44:20] Emmanuel_Chanel: has joined #ruby
[04:46:22] jetpackjoe: has joined #ruby
[04:47:06] xaxisx_: has joined #ruby
[04:47:08] graffix: has joined #ruby
[04:48:44] qiukun: has joined #ruby
[04:50:20] benlovell: has joined #ruby
[04:50:29] psy: has joined #ruby
[04:51:47] psy: has joined #ruby
[04:52:49] Aria: +b *!321ffc40@gateway/web/freenode/ip.50.31.252.64
[04:52:49] Aria: Aria kicked killsomehiggers: name is not allowed by our code of conduct
[04:53:13] Bloomer: has joined #ruby
[04:53:19] weemsledeux: has joined #ruby
[04:53:33] Guest38: has joined #ruby
[04:53:34] Guest38: has joined #ruby
[04:55:52] Melpaws: what am i doing wrong here ? Using mongo and trying to use insert for a new document
[04:55:53] Melpaws: https://gist.github.com/dylnnlsn/74edb2335883ee2cc132
[04:57:12] jetpackjoe: has joined #ruby
[04:57:40] gambl0re: has joined #ruby
[05:00:12] gix: has joined #ruby
[05:01:40] antoniobeyah: has joined #ruby
[05:02:31] latemus: has joined #ruby
[05:02:49] crdpink: Melpaws: if using newer driver use insert_one. Also you're wrapping single values in interpolated strings, just use the value.
[05:04:27] dotix: has joined #ruby
[05:05:07] Melpaws: yay ! you da ' bess @crdpink . Thank you
[05:05:41] crdpink: Melpaws: cool beans. FYI https://api.mongodb.org/ruby/current/Mongo/Collection.html
[05:06:24] Melpaws: thank you. I think a lot of the guides i'm using online are out dated :(
[05:08:48] crdpink: has joined #ruby
[05:09:55] riotjones: has joined #ruby
[05:10:33] ruby-lang104: anybody wanna work for 5 or 10$
[05:12:40] yes`r: has joined #ruby
[05:13:49] Aria: ruby-lang104: class Class1 < Class2 means that it makes a new class Class1 based on Class2 (inheritance)
[05:13:58] duoi: has joined #ruby
[05:14:43] lkba_: has joined #ruby
[05:15:32] Musashi007: has joined #ruby
[05:16:55] mistermocha: has joined #ruby
[05:17:12] rbowlby: has joined #ruby
[05:17:35] ruby-lang104: inheritance means inherit all attributes?
[05:18:14] rbowlby: has joined #ruby
[05:18:38] agent_white: has joined #ruby
[05:18:52] agent_white: has left #ruby: ()
[05:20:23] cmoneylulz: has joined #ruby
[05:25:56] patdohere: has joined #ruby
[05:25:57] Emmanuel_Chanel: has joined #ruby
[05:26:12] CloCkWeRX: has joined #ruby
[05:26:29] Emmanuel_Chanel: has joined #ruby
[05:28:15] bosh: has left #ruby: ("ERC Version 5.3 (IRC client for Emacs)")
[05:29:34] peppers: has joined #ruby
[05:31:16] rakm: has joined #ruby
[05:31:35] benlieb: has joined #ruby
[05:33:47] krz: has joined #ruby
[05:34:28] BSab: has joined #ruby
[05:34:33] zenguy_pc: has joined #ruby
[05:38:37] tildes: has joined #ruby
[05:41:02] quazimodo: has joined #ruby
[05:41:11] bruno-: has joined #ruby
[05:43:54] griffindy: has joined #ruby
[05:44:23] antoniobeyah: has joined #ruby
[05:44:39] graffix: has joined #ruby
[05:45:11] jetpackjoe: has joined #ruby
[05:45:47] wprice: has joined #ruby
[05:47:26] freerobby: has joined #ruby
[05:48:22] freerobby1: has joined #ruby
[05:48:46] jessemcgilallen: has joined #ruby
[05:51:43] cwong_on_irc: has joined #ruby
[05:52:05] qiukun: has joined #ruby
[05:52:31] sanjayu: has joined #ruby
[05:52:47] nofxx: ruby-lang104: yup.. and methods and all
[05:52:47] cwong_on_irc: has joined #ruby
[05:53:05] nofxx: Melpaws: use the new gem site, there's a single page readme/doc
[05:53:47] ruby-lang104: is there an online ruby debugger that i could use
[05:54:58] tubulife-: has joined #ruby
[05:55:09] Gadgetoid: has joined #ruby
[05:55:57] nofxx: ruby-lang104: so much easy just install it on yr machine
[05:56:42] ruby-lang104: i use notepad++
[05:58:26] nofxx: ruby-lang104: nah, I don't do drugs.
[06:00:39] Radar: online ruby debugger? What?
[06:02:02] rbowlby: has joined #ruby
[06:05:17] EminenceHC: has joined #ruby
[06:06:38] bmalum: has joined #ruby
[06:10:45] riotjones: has joined #ruby
[06:11:40] bmalum: has joined #ruby
[06:11:55] lurch_: has joined #ruby
[06:12:04] lxsameer: has joined #ruby
[06:12:04] lxsameer: has joined #ruby
[06:13:48] dhjondoh: has joined #ruby
[06:15:12] janelleb: has joined #ruby
[06:15:30] chrissonar: has joined #ruby
[06:15:41] rgtk: has joined #ruby
[06:15:44] vdamewood: has joined #ruby
[06:19:46] axsuul_: has joined #ruby
[06:22:33] tubulife-: has joined #ruby
[06:22:43] cagmz: has joined #ruby
[06:22:53] Ca1us: has joined #ruby
[06:24:04] pabs: has joined #ruby
[06:24:54] cagmz: anyone know why my jekyll install is failing? maybe its my ruby install? anyone know why my install is failing? https://bpaste.net/show/31aca15438cc
[06:25:50] moeabdol: has joined #ruby
[06:26:40] Radar: "rvm" well there's your problem
[06:26:46] Radar: (I kid, I kid)
[06:27:09] Radar: cagmz: Weird error to be getting. Did you install "apt-get install build-essential"?
[06:27:31] cagmz: Radar, yes it's installed already, so is ruby-dev
[06:27:49] Radar: cagmz: Then I don't know, sorry.
[06:28:07] cagmz: i just want to be cool and use ruby :(
[06:28:14] chipotle: has joined #ruby
[06:28:34] yfeldblum: has joined #ruby
[06:29:39] EminenceHC: has joined #ruby
[06:30:12] duncannz: has joined #ruby
[06:30:57] yoongkang: has joined #ruby
[06:31:55] colegatron: has joined #ruby
[06:32:23] favadi: has joined #ruby
[06:32:49] arup_r: has joined #ruby
[06:33:04] ibouvousaime: has joined #ruby
[06:34:54] ICantCook: has joined #ruby
[06:36:04] lxsameer: has joined #ruby
[06:38:57] Fire-Dragon-DoL-: has joined #ruby
[06:39:52] komanda3: has joined #ruby
[06:40:20] Mon_Ouie: cagmz: Did you also install libffi and its development headers?
[06:40:24] komanda: http://1.6km.me/blog/2013/05/25/pow-plus-php-plus-livereload-plus-anvil-equals-yum/
[06:40:32] hinbody: has joined #ruby
[06:40:32] komanda: i'm trying to follow that tutorial
[06:40:58] komanda: i created the config.ru, but when i reate a php file nothing happens
[06:41:34] cagmz: Mon_Ouie, yes, they are installed
[06:41:44] cagmz: Reading state information... Done libffi-dev is already the newest version. libffi6 is already the newest version.
[06:42:13] shevy: Komanda come on man - php for ##php, ruby for #ruby
[06:42:16] aufi: has joined #ruby
[06:42:29] komanda: shevy: it has nothing to do with php
[06:42:43] komanda: it's a ruby tool, a ruby ecosystem
[06:42:49] bruno-: has joined #ruby
[06:43:01] Mon_Ouie: Okay, Try having a look at the log files mentioned at the end of the message you pasted. Do they mention a more specific error?
[06:43:24] komanda: it's about POW, i don't know how i can "let it know" of the existence of the config.ru
[06:43:33] komanda: do i have to execute the config.ru or whut?
[06:43:39] aganov: has joined #ruby
[06:44:26] yardenbar: has joined #ruby
[06:45:44] Fire-Dragon-DoL-: has joined #ruby
[06:46:41] jetpackjoe: has joined #ruby
[06:49:46] tagrudev: has joined #ruby
[06:54:48] UtkarshRay: has joined #ruby
[06:57:03] perrier: has joined #ruby
[06:59:00] riotjones: has joined #ruby
[06:59:37] Musashi007: has joined #ruby
[07:00:57] AndyBotwin: has joined #ruby
[07:01:24] anisha: has joined #ruby
[07:01:59] Emmanuel_Chanel: has joined #ruby
[07:02:33] sinkensabe: has joined #ruby
[07:03:22] juddey: has joined #ruby
[07:06:00] rgtk: has joined #ruby
[07:06:44] skade: has joined #ruby
[07:06:56] norc: has joined #ruby
[07:09:34] linocisco: has joined #ruby
[07:10:25] Guest0099: what is the best ruby book who knows only a few programming syntax like C,C++?
[07:10:37] Guest0099: what is the best ruby book for one who knows only a few programming syntax like C,C++?
[07:10:43] joonty: has joined #ruby
[07:12:24] Guest97: has joined #ruby
[07:12:55] bronson: Guest0099: I don't know of any good ruby books. I tried the pickeaxe book and hated it -- terrible examples. And it's really dated now.
[07:13:19] bronson: I mostly tried programming stuff, googling and asking on irc when I got stuck.
[07:14:09] norc: Guest0099: There is a couple books around. Pickaxe used to be the one and only, though as bronson mentioned, it is a bit outdated.
[07:14:15] Guest0099: bronson, honestly, I learnt programming like C, Pascal long time ago and I now remember only hello world program and forgot all syntax. now want to start learning ruby because want to develop rails
[07:14:23] norc: There is also "The Ruby Programming Language" by Matz himself, pretty decent book.
[07:14:31] bronson: Maybe Learn Ruby the Hard Way, I've heard good things about that series.
[07:14:33] Guest0099: norc, thanks
[07:14:45] bronson: but haven't heard anything about the Ruby version itself.
[07:15:10] bronson: I agree with learning Ruby before Rails, it will seem a lot less magic that way.
[07:15:26] norc: Also it will drastically improve your code in the short run.
[07:16:00] norc: Too many people who start using Rails, and think of all their classes as magical things, forgetting that they are dealing with just normal Ruby classes and modules.
[07:16:34] Guest0099: norc, yes. that is why I want to start with ruby learning first
[07:16:47] segmond: has joined #ruby
[07:18:06] ponga: has joined #ruby
[07:18:35] noobsu: has joined #ruby
[07:21:09] codecop: has joined #ruby
[07:22:03] Coldblackice: has joined #ruby
[07:23:02] anisha_: has joined #ruby
[07:24:06] xcesariox: has joined #ruby
[07:24:37] subscope: has joined #ruby
[07:25:16] tkuchiki: has joined #ruby
[07:25:41] jackjackdripper: has joined #ruby
[07:26:02] kiki_lamb: How can I ask a class what it's instances respond to without instantiating one?
[07:26:33] moeabdol: has joined #ruby
[07:26:40] _blizzy_: has joined #ruby
[07:27:03] jackjackdripper: has joined #ruby
[07:27:45] Mon_Ouie: Module#method_defined?
[07:28:31] jetpackjoe: has joined #ruby
[07:30:20] norc: &ri Module#instance_methods
[07:30:20] `derpy: http://www.rubydoc.info/stdlib/core/Module#instance_methods-instance_method
[07:30:24] norc: kiki_lamb: ^^
[07:30:53] andikr: has joined #ruby
[07:31:48] norc: kiki_lamb: You will have to walk through the ancestors chain to get a near complete list (you will be missing singleton_methods however, but you cannot know that without instantiating)
[07:33:10] bigkevmcd: has joined #ruby
[07:33:49] kiki_lamb: Mon_Ouie, norc: perfect, makes sense... thanks, I'll give it a go. :)
[07:33:52] norc: >> String.ancestors.map(&:instance_methods)
[07:33:54] ruboto: norc # => [[:<=>, :==, :===, :eql?, :hash, :casecmp, :+, :*, :%, :[], :[]=, :insert, :length, :size, :bytesize ...check link for more (https://eval.in/470923)
[07:34:04] johnny56_: has joined #ruby
[07:34:27] Xeago: has joined #ruby
[07:35:01] dlitvak: has joined #ruby
[07:36:05] AndyBotwin: has joined #ruby
[07:36:15] cgfbee: has joined #ruby
[07:36:51] Mon_Ouie: instance_methods includes inherited methods, unless you explicitly give it a parameter set to false
[07:37:03] vestinst: has joined #ruby
[07:37:45] norc: Oh yeah, silly me. :)
[07:39:16] kiki_lamb: So... if instance_methods walks the tree for me, then that's probbly a simpler way to do it than method_defined?, it sounds like.
[07:39:54] Mon_Ouie: method_defined? also returns true for inherited methods
[07:40:34] kiki_lamb: Mon_Ouie: okay, so norc's original comment that I'd have to walk the ancestors chain was incorrect?
[07:40:35] apeiros: -o apeiros
[07:40:54] apeiros: ACTION stealer of wizard (witch?) hats
[07:41:11] apeiros: sorceress hats. there :)
[07:43:32] bruno-: has joined #ruby
[07:44:09] solars: has joined #ruby
[07:44:35] Macaveli: has joined #ruby
[07:46:14] Fire-Dragon-DoL: has joined #ruby
[07:46:30] yoongkang: has joined #ruby
[07:46:31] aibot: has joined #ruby
[07:47:00] Macaveli_: has joined #ruby
[07:47:54] aibot: has joined #ruby
[07:48:23] mistermocha: has joined #ruby
[07:49:25] Macaveli: has joined #ruby
[07:49:32] aibot: has joined #ruby
[07:52:56] patdohere: has joined #ruby
[07:53:25] troulouliou_div2: has joined #ruby
[07:53:29] red_horned_rihno: has joined #ruby
[07:53:53] Fire-Dragon-DoL: has joined #ruby
[07:54:00] bmalum: has joined #ruby
[07:54:37] houhoulis: has joined #ruby
[07:58:24] mark2: has joined #ruby
[08:00:25] Musashi007: has joined #ruby
[08:02:07] TomyWork: has joined #ruby
[08:03:21] Macaveli_: has joined #ruby
[08:04:56] norc: kiki_lamb: Indeed.
[08:04:56] tubulife-: has joined #ruby
[08:06:05] ta: has joined #ruby
[08:06:52] norc: kiki_lamb: I was just thinking in terms of the object model, forgetting that Module#instance_method walks the ancestry chain already.
[08:09:29] nofxx: has joined #ruby
[08:09:33] howdoi: has joined #ruby
[08:11:35] quazimodo: has joined #ruby
[08:11:56] djellemah_: has joined #ruby
[08:12:37] it-m: has joined #ruby
[08:12:46] djellemah__: has joined #ruby
[08:15:20] Macaveli: has joined #ruby
[08:15:32] SCHAAP137: has joined #ruby
[08:16:06] speakingcode: has joined #ruby
[08:16:12] Macaveli: has joined #ruby
[08:18:13] emilkarl: has joined #ruby
[08:18:14] Macaveli: has joined #ruby
[08:18:14] montagne_goat: has joined #ruby
[08:18:41] Fire-Dragon-DoL1: has joined #ruby
[08:18:55] Macaveli: has joined #ruby
[08:21:25] kp666: has joined #ruby
[08:21:57] kp666: has joined #ruby
[08:22:38] kp666: has joined #ruby
[08:22:53] bmalum: has joined #ruby
[08:23:50] kp666: has joined #ruby
[08:24:41] kp666: has joined #ruby
[08:25:44] jackjackdripper1: has joined #ruby
[08:25:57] kp666: has joined #ruby
[08:27:18] moeabdol: has joined #ruby
[08:30:50] desmondhume: has joined #ruby
[08:30:53] adac: has joined #ruby
[08:32:21] DoubleMalt: has joined #ruby
[08:33:07] zachrose_: has joined #ruby
[08:33:16] benlovell: has joined #ruby
[08:37:16] nettoweb: has joined #ruby
[08:40:09] rdark: has joined #ruby
[08:40:26] skade: has joined #ruby
[08:41:13] rdark: has joined #ruby
[08:41:55] dhjondoh: has joined #ruby
[08:43:04] joonty: has joined #ruby
[08:43:21] bweston92: has joined #ruby
[08:44:11] Zai00: has joined #ruby
[08:44:31] czsr: has joined #ruby
[08:44:39] bruno-: has joined #ruby
[08:44:48] lipoqil: has joined #ruby
[08:45:30] linocisco: has joined #ruby
[08:48:04] simplyianm: has joined #ruby
[08:49:07] kimegede: has joined #ruby
[08:49:52] marr: has joined #ruby
[08:50:06] yes`r: has joined #ruby
[08:52:57] nixmaniack: has joined #ruby
[08:52:57] nixmaniack: has joined #ruby
[08:58:19] senayar: has joined #ruby
[08:58:29] pandaant: has joined #ruby
[08:58:40] c0m0: has joined #ruby
[09:00:00] dhjondoh: has joined #ruby
[09:01:28] neanderslob: has joined #ruby
[09:02:52] jackjackdripper: has joined #ruby
[09:04:08] jackjackdripper1: has joined #ruby
[09:04:23] bigkevmcd: has joined #ruby
[09:05:22] Billias: has joined #ruby
[09:09:17] apeiros: moin linocisco
[09:09:21] linocisco: i have installed ruby on ubuntu using apt-get install ruby. but it is only ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
[09:09:37] Jackneill: has joined #ruby
[09:09:49] havenwood: linocisco: Brightbox maintains up-to-date Ruby packages for Ubuntu: https://www.brightbox.com/docs/ruby/ubuntu/
[09:12:03] Fredrich010: has joined #ruby
[09:14:26] Pupp3tm4st3r: has joined #ruby
[09:14:30] lukaszes: has joined #ruby
[09:15:49] Fredrich_: has joined #ruby
[09:17:55] tulak: has joined #ruby
[09:19:48] lurch_: has joined #ruby
[09:20:16] linocisco: has joined #ruby
[09:21:43] nixmaniack: has joined #ruby
[09:24:11] darkf: has joined #ruby
[09:25:04] Stan: has joined #ruby
[09:28:03] desmondhume: has joined #ruby
[09:28:21] dhjondoh: has joined #ruby
[09:30:10] benhuda: has joined #ruby
[09:30:11] Ilyes512: has joined #ruby
[09:30:55] nixmaniack: has joined #ruby
[09:32:19] blackmesa: has joined #ruby
[09:33:30] Peg-leg: has joined #ruby
[09:34:09] karapetyan: has joined #ruby
[09:35:21] simplyianm: has joined #ruby
[09:37:25] dmolina: has joined #ruby
[09:38:56] TPBallbag: has joined #ruby
[09:42:14] futilegames: has joined #ruby
[09:43:31] Xeago: has joined #ruby
[09:43:56] jas02: has joined #ruby
[09:44:46] bluOxigen: has joined #ruby
[09:45:38] bruno-: has joined #ruby
[09:46:11] dfdfdf: has joined #ruby
[09:46:52] Pupeno: has joined #ruby
[09:47:15] yoongkang: has joined #ruby
[09:50:06] sonOfRa: has joined #ruby
[09:50:22] diegoviola: has joined #ruby
[09:50:27] timonv: has joined #ruby
[09:51:31] leafybasil: has joined #ruby
[09:51:42] jimms: has joined #ruby
[09:53:00] bluOxigen: has left #ruby: ()
[09:53:08] leafybasil: has joined #ruby
[09:53:28] jimms: has left #ruby: ()
[09:54:12] linocisco: has joined #ruby
[09:55:20] benhuda: has joined #ruby
[09:55:54] colli5ion: has joined #ruby
[09:56:24] RegulationD: has joined #ruby
[09:57:38] nixmaniack: has joined #ruby
[09:58:39] rodfersou: has joined #ruby
[10:00:24] moeabdol: has joined #ruby
[10:01:14] noobsu: has joined #ruby
[10:02:48] yashinbasement: has joined #ruby
[10:04:47] iateadonut: has joined #ruby
[10:05:15] maashsa: has joined #ruby
[10:06:22] maashsa: Is there an easy way to convert YARD doc for specific classes into wiki pages in Github markdown?
[10:07:01] Macaveli: has joined #ruby
[10:08:07] SCHAAP137: has joined #ruby
[10:10:28] CloCkWeRX: has joined #ruby
[10:12:59] Rollabunna: has joined #ruby
[10:13:42] dhjondoh: has joined #ruby
[10:14:21] lxsameer: has joined #ruby
[10:14:36] soloone: has joined #ruby
[10:18:28] SCHAAP137: has joined #ruby
[10:18:41] mistermocha: has joined #ruby
[10:21:30] SenpaiSilver: has joined #ruby
[10:23:06] platzhirsch: has joined #ruby
[10:23:55] skade: has joined #ruby
[10:31:03] platzhirsch: has joined #ruby
[10:31:28] futilegames: has joined #ruby
[10:35:50] Axsuul: has joined #ruby
[10:36:48] marr: has joined #ruby
[10:36:51] karapetyan: has joined #ruby
[10:38:16] Xeago: has joined #ruby
[10:38:56] dlitvak: has joined #ruby
[10:40:20] platzhirsch: has joined #ruby
[10:41:03] ldnunes: has joined #ruby
[10:41:56] Tempesta: has joined #ruby
[10:42:28] lurch_: has joined #ruby
[10:44:37] beast: has joined #ruby
[10:45:54] Macaveli: has joined #ruby
[10:46:02] shredding: has joined #ruby
[10:46:23] Pumukel: has joined #ruby
[10:47:05] bruno-: has joined #ruby
[10:47:33] jackjackdripper: has joined #ruby
[10:48:01] svkurowski: has joined #ruby
[10:48:42] jackjackdripper1: has joined #ruby
[10:48:43] Guest97: has joined #ruby
[10:50:30] zenguy_pc: has joined #ruby
[10:50:49] dhjondoh: has joined #ruby
[10:51:04] Spami: has joined #ruby
[10:51:53] johnzorn: has joined #ruby
[10:52:25] cyb3rspy: has joined #ruby
[10:52:51] codecop: has joined #ruby
[10:53:35] gregf_: has joined #ruby
[10:54:52] araujo: has joined #ruby
[10:54:52] araujo: has joined #ruby
[10:55:51] roxtrongo: has joined #ruby
[10:57:10] neanderslob: has joined #ruby
[10:57:52] roxtrongo: has joined #ruby
[10:58:36] jackjackdripper: has joined #ruby
[10:58:49] chipotle: has joined #ruby
[10:59:49] Hounddog: has joined #ruby
[11:00:25] chriscoffee: has joined #ruby
[11:02:20] gizmore: has joined #ruby
[11:03:10] yoongkang: has joined #ruby
[11:03:52] ruid: has joined #ruby
[11:04:39] Hounddog: has joined #ruby
[11:07:21] dhjondoh: has joined #ruby
[11:07:58] prestorium: has joined #ruby
[11:08:01] arup_r: has joined #ruby
[11:08:41] Hounddog: has joined #ruby
[11:10:24] Scripore: has joined #ruby
[11:12:54] bruno-: has joined #ruby
[11:14:00] blueOxigen: has joined #ruby
[11:14:16] akem: has joined #ruby
[11:16:01] wickedau8: has joined #ruby
[11:16:11] dlitvak: has joined #ruby
[11:17:05] Ox0dea: has joined #ruby
[11:19:43] yoongkang: has joined #ruby
[11:19:53] kstuart: has joined #ruby
[11:20:00] Ox0dea: Bon matin.
[11:20:11] Ox0dea: (Look how French I'm not.)
[11:20:21] rickmasta: has joined #ruby
[11:24:42] bob_f: has joined #ruby
[11:28:35] mostlybadfly: has joined #ruby
[11:28:58] jackjackdripper1: has joined #ruby
[11:29:09] ta: has joined #ruby
[11:30:25] jackjackdripper1: has joined #ruby
[11:30:44] prestorium: has joined #ruby
[11:31:06] vondruch: has joined #ruby
[11:32:16] CloCkWeRX: has joined #ruby
[11:34:40] terabytes: has joined #ruby
[11:34:41] tvw: has joined #ruby
[11:35:02] adac: has joined #ruby
[11:36:30] terabytes: has joined #ruby
[11:37:13] big|bad|wolf: has joined #ruby
[11:38:54] Xeago: has joined #ruby
[11:41:03] grepwood: has joined #ruby
[11:41:07] grepwood: hi everyone
[11:41:12] grepwood: I've a problem with a chef recipe
[11:41:58] pontiki: not to put you off, grepwood; there is a #chef channel. i've gotten some good help there. but please ask your question
[11:42:24] subscope: has joined #ruby
[11:42:28] grepwood: pontiki, the chef recipe I have seems to be completely ignoring parts of itself
[11:42:28] GarethAdams: has joined #ruby
[11:42:43] GarethAdams: has joined #ruby
[11:43:12] pontiki: can you post it?
[11:43:41] pontiki: what's it trying to do?
[11:43:48] grepwood: http://pastebin.com/2RUXhPpZ
[11:43:48] ruboto: grepwood, as I told you already, please use https://gist.github.com
[11:45:09] pontiki: which part seems to be ignored?
[11:45:36] GarethAdams: I don't know what I'm doing wrong that my field interpolation isn't working for nested fields. `mutate { add_field => { "field" => "%{event}" } }` correctly replaces with the dynamic value, but `mutate { add_field => { "field" => "%{[properties][userId]}" } }` adds the literal value "%{[properties][userId]}" to the field
[11:45:43] grepwood: that recipe should be run, but isn't
[11:45:58] grepwood: it's even specified as a dependency for this cookbook
[11:46:02] GarethAdams: oops, wrong channel
[11:46:04] grepwood: nope, completely ignored
[11:46:35] Macaveli: has joined #ruby
[11:46:50] tubulife-: has joined #ruby
[11:46:59] pontiki: no error, no message?
[11:47:36] desmondhume: has joined #ruby
[11:47:56] sepp2k: has joined #ruby
[11:48:03] Ox0dea: grepwood: http://stackoverflow.com/q/25956950
[11:48:47] karapetyan: has joined #ruby
[11:48:57] Ox0dea: You're certain you're specifying the dependency correctly?
[11:51:44] pontiki: ACTION shrugs
[11:51:52] grepwood: Ox0dea, yes, I got "depends 'apt'" in metadata.rb
[11:55:38] grepwood: and this is the output, http://pastebin.com/raw.php?i=HNpvxXEu
[11:55:39] ruboto: grepwood, as I told you already, please use https://gist.github.com
[11:56:13] basex: has joined #ruby
[11:58:17] Ox0dea: > failed to find gem net-ldap
[11:58:19] Ox0dea: That can't be good.
[11:58:31] Ox0dea: Why isn't it using HTTPS?
[11:59:34] _blizzy_: has joined #ruby
[11:59:36] jas02: has left #ruby: ()
[12:00:02] pontiki: grepwood: what led you to the conclusion that it's line 2 that is the source of the issue?
[12:00:37] pontiki: is the error with chef_gem a result of something in apt? the output does show it didn't ignore apt
[12:00:57] ibouvousaime: has joined #ruby
[12:01:18] Guest54: has joined #ruby
[12:02:11] pontiki: grepwood: to Ox0dea's point, what sources are you telling chef_gem to use?
[12:03:12] Xeago: has joined #ruby
[12:03:29] Guest54: has joined #ruby
[12:04:39] bmalum: has joined #ruby
[12:06:05] lipoqil: has joined #ruby
[12:06:14] leafybasil: has joined #ruby
[12:07:11] grepwood: pontiki, the issue can be fixed by running apt-get update before invoking chef-client to run the ldap-thingy recipe
[12:07:57] grepwood: and I've no idea what sources are called
[12:08:55] KrzaQ: has left #ruby: ("undefined")
[12:09:03] KrzaQ: has joined #ruby
[12:10:47] KrzaQ: Is here anyone knowledgeable in ruby-graphviz? I'm trying to force position of nodes, but I have no idea how to achieve it, and the docs are less than useful, and so is the code.
[12:10:57] Pupeno: has joined #ruby
[12:11:44] Mon_Ouie: has joined #ruby
[12:12:03] KrzaQ: Alternatively, I could use an another gem that could create images out of graphs
[12:16:43] haxrbyte: has joined #ruby
[12:19:41] karapetyan: has joined #ruby
[12:20:10] pontiki: grepwood: this would be more for the #chef channel, i think, but does the apt recipe run the update even if you're not running apt to install/update/remove an apt package?
[12:20:28] yoongkang: has joined #ruby
[12:21:02] grepwood: pontiki, Ox0dea I really don't think so http://pastebin.com/raw.php?i=ymhJgutb
[12:21:02] ruboto: grepwood, as I told you already, please use https://gist.github.com
[12:21:10] subscope: has joined #ruby
[12:21:44] CloCkWeRX: has left #ruby: ()
[12:22:37] pontiki: grepwood: are you purposely ignoring ruboto ?
[12:22:59] grepwood: I've an account on pastebin :/
[12:24:12] CloCkWeRX: has joined #ruby
[12:25:22] CloCkWeRX: has left #ruby: ()
[12:25:24] gerep: has joined #ruby
[12:27:04] CloCkWeRX: has joined #ruby
[12:27:25] emilkarl: has joined #ruby
[12:27:54] kp666: has joined #ruby
[12:28:07] CloCkWeRX: has left #ruby: ()
[12:28:35] CloCkWeRX: has joined #ruby
[12:29:23] Scripore: has joined #ruby
[12:30:10] vigintas: has joined #ruby
[12:30:25] emilkarl: has left #ruby: ()
[12:31:59] colegatron: has joined #ruby
[12:32:11] gerep: Hello good people. I was tasked to fix a problem on a server where when trying to run 'ruby' it returns ' cannot load such file -- rubygems.rb'. I noticed that the ruby, gem and bundle binaries are located at '/opt/ruby/install/bin' I tried to install rubygems 'rubygem-bundler-1.3.1-1.noarch.rpm' but it says it is installed already
[12:32:18] gerep: Maybe it is a problem with environment variables?
[12:32:47] gerep: Any suggestions?
[12:35:29] senayar: has joined #ruby
[12:36:35] gerep: The rubygems folder is this one: /opt/ruby/ruby-2.0.0-p353/lib/rubygems
[12:36:59] karapetyan: has joined #ruby
[12:38:06] senayar: has joined #ruby
[12:38:06] senayar: has joined #ruby
[12:38:07] gerep: Ant the binary: /opt/ruby/install/lib/ruby/2.0.0/rubygems
[12:38:29] gerep: Not binary, the libs folder :)
[12:38:34] benlovell: has joined #ruby
[12:38:40] wprice: has joined #ruby
[12:39:13] apeiros: grepwood: I can tell you that there's a couple of high profile helpers here who'll simply ignore your questions for using pastebin.com (myself included)
[12:40:14] skade: has joined #ruby
[12:40:41] yokel: has joined #ruby
[12:42:56] diegoaguilar: has joined #ruby
[12:42:59] tulak: has joined #ruby
[12:43:02] Ox0dea: Dat modesty.
[12:43:07] grepwood: well that really makes ruby an inclusive language
[12:43:18] grepwood: I feel oppressed </joke>
[12:44:10] ta: has joined #ruby
[12:45:01] KervyN: has joined #ruby
[12:46:20] johnny56: has joined #ruby
[12:46:24] dellavg: has joined #ruby
[12:46:42] yokel: has joined #ruby
[12:46:54] mikecmpbll: has joined #ruby
[12:46:54] tvw: has joined #ruby
[12:47:06] grepwood: is this better? https://sucs.org/Tools/PasteBin/869/plain
[12:47:07] TPBallbag: has joined #ruby
[12:47:33] grepwood: not really a fan of github
[12:47:58] arup_r: has joined #ruby
[12:48:10] mistermocha: has joined #ruby
[12:49:13] CloCkWeRX: has joined #ruby
[12:49:31] prestorium_: has joined #ruby
[12:49:34] desmondhume: has joined #ruby
[12:49:41] desmondhume: has joined #ruby
[12:50:47] Zai00: has joined #ruby
[12:52:30] Icey: has joined #ruby
[12:53:15] desmondhume: has joined #ruby
[12:54:06] roxtrongo: has joined #ruby
[12:54:36] anisha: has joined #ruby
[12:54:46] norc: has joined #ruby
[12:55:07] desmondhume: has joined #ruby
[12:55:37] bluOxigen: has joined #ruby
[12:55:53] sdothum: has joined #ruby
[12:57:45] skade: has joined #ruby
[12:57:52] RegulationD: has joined #ruby
[13:00:25] Xeago: has joined #ruby
[13:01:20] joonty: has joined #ruby
[13:01:51] ruby-lang359: has joined #ruby
[13:02:27] ruby-lang463: has joined #ruby
[13:03:50] solocshaw: has joined #ruby
[13:04:12] ruby-lang463: Hello. I have a Sinatra App and i want to run someAcceptance tests using Watir. it works when i test my production environment but when i make changes and want to run those test doesnt work .
[13:04:35] ruby-lang463: do you know if there is a way to connect watir and Rack::Test
[13:04:52] prestorium_: has joined #ruby
[13:05:08] aryaching: has joined #ruby
[13:06:12] anisha: has joined #ruby
[13:07:10] tulak: has joined #ruby
[13:09:18] k3asd`: has joined #ruby
[13:09:19] benlovell: has joined #ruby
[13:10:10] bmalum: has joined #ruby
[13:10:20] shredding: has joined #ruby
[13:14:36] favadi: has joined #ruby
[13:15:32] synthroid: has joined #ruby
[13:16:23] quazimodo: has joined #ruby
[13:17:32] abc: has joined #ruby
[13:17:33] sgambino: has joined #ruby
[13:17:43] roxtrongo: has joined #ruby
[13:18:17] htmldrum: has joined #ruby
[13:18:28] Guest22559: Hey, I'm having a bit of trouble using Curl's ruby wrapper 'curb' and timeout. I set c.timeout= 5 and/or c.timeout_ms= 5000, but it looks as if the timeout is not being applied (i.e. the request runs for longer). Any hints?
[13:19:14] decoponio: has joined #ruby
[13:20:06] avahey: has joined #ruby
[13:22:55] Encapsulation: has joined #ruby
[13:23:29] tkuchiki: has joined #ruby
[13:26:14] ibouvousaime: has joined #ruby
[13:27:07] Macaveli: has joined #ruby
[13:27:17] bradland: has joined #ruby
[13:27:34] rikkipitt: has joined #ruby
[13:29:08] chipotle: has joined #ruby
[13:30:02] nomadic: has joined #ruby
[13:30:44] TheNet: has joined #ruby
[13:31:04] GarethAdams: has joined #ruby
[13:31:53] towler: has joined #ruby
[13:32:06] codex: has joined #ruby
[13:32:18] root3d: has joined #ruby
[13:32:19] ibouvousaime: has joined #ruby
[13:32:25] johnernaut: has joined #ruby
[13:33:12] gusTester: has joined #ruby
[13:34:27] gusTester: has left #ruby: ()
[13:35:52] root3d: has left #ruby: ()
[13:36:04] krz: has joined #ruby
[13:37:59] desmondhume: has joined #ruby
[13:38:14] ItSANgo: has joined #ruby
[13:38:32] karapetyan: has joined #ruby
[13:39:32] sdothum: has joined #ruby
[13:39:52] SHyx0rmZ: has joined #ruby
[13:41:54] kobain: has joined #ruby
[13:42:23] pl1ght: has joined #ruby
[13:43:08] mikecmpbll: has joined #ruby
[13:44:47] desmondhume: has joined #ruby
[13:45:45] Pumukel: has joined #ruby
[13:46:13] wilsonc91: has joined #ruby
[13:46:49] umgrosscol: has joined #ruby
[13:47:20] roxtrongo: has joined #ruby
[13:48:50] rwilcox: has joined #ruby
[13:49:45] atomical: has joined #ruby
[13:50:01] krz: has joined #ruby
[13:50:13] voker57: has joined #ruby
[13:51:12] codecop: has joined #ruby
[13:51:19] davedev24: has joined #ruby
[13:52:11] Ilyes512: has joined #ruby
[13:52:53] tomaz_b: has joined #ruby
[13:55:09] zenguy_pc: has joined #ruby
[13:57:06] The_Phoenix: has joined #ruby
[13:58:22] grepwood: has left #ruby: ("Leaving")
[13:58:52] casadei: has joined #ruby
[13:59:02] mikecmpbll: has joined #ruby
[13:59:28] houhoulis: has joined #ruby
[14:02:09] ESpiney: has joined #ruby
[14:05:01] sankaber: has joined #ruby
[14:05:40] Macaveli: has joined #ruby
[14:05:49] vdamewood: has joined #ruby
[14:06:03] dmitch: has joined #ruby
[14:06:42] shevy: people rejoice!
[14:06:45] shevy: it is a Caturday again
[14:07:43] lulzmachine: has joined #ruby
[14:11:41] Xeago: has joined #ruby
[14:12:28] HZun: has joined #ruby
[14:13:10] malconis: has joined #ruby
[14:15:29] malconis: has joined #ruby
[14:17:34] sankaber: has joined #ruby
[14:17:39] TomPeed: has joined #ruby
[14:21:07] cdg: has joined #ruby
[14:21:09] bkxd: has joined #ruby
[14:23:48] TheNet: has joined #ruby
[14:24:42] ibouvousaime: has joined #ruby
[14:25:08] livcd: has left #ruby: ()
[14:25:19] grill: has joined #ruby
[14:27:22] tflat: has joined #ruby
[14:28:38] tomphp: has joined #ruby
[14:29:36] lsmola: has joined #ruby
[14:32:47] noobsu: has joined #ruby
[14:34:58] futilegames: has joined #ruby
[14:35:26] babblebre: has joined #ruby
[14:35:50] Silex: has joined #ruby
[14:36:23] whippythellama: has joined #ruby
[14:37:39] djcp1: has joined #ruby
[14:40:18] tkuchiki: has joined #ruby
[14:41:27] zotherstupidguy`: has joined #ruby
[14:41:36] GarethAdams: has joined #ruby
[14:41:39] GarethAdams: has joined #ruby
[14:42:09] IrishGringo: has joined #ruby
[14:43:37] desmondhume: has joined #ruby
[14:44:42] brainfire: has joined #ruby
[14:45:16] brainfire: anyone here knows regular expressions?
[14:45:55] havenwood: brainfire: Regexp question?
[14:46:19] brainfire: havenwood: yeah I've been trying for a while but don't seem to get it
[14:47:32] cyb3rspy: you know what brainfire / havenwood... I can't seem to get the hang of it either... it just seems so alien to me!
[14:48:11] lipoqil: has joined #ruby
[14:48:39] brainfire: I have a large mysql database dump, the data I'm looking for is in the form (number, 'string') with many of those occuring in the same line. I get a positive match if I do /\(*,*\)/.match(line) in ruby but whenever I try to be a little more specific like /\(\d{1,3},'*'\)/.match(line) it fails
[14:49:16] roxtrongo: has joined #ruby
[14:49:19] brainfire: also I can't seem to get the actual matches, the match object just has the length 1 though the file should have hundreds of matches
[14:49:41] rippa: has joined #ruby
[14:50:09] gregf_: brainfire: /\(*,*\)/ is'nt what you think its doing
[14:50:25] gregf_: s/is\'nt/doesnt do/
[14:51:04] kirun: has joined #ruby
[14:51:25] brainfire: gregf_: the asterisk * is a placeholder for any character type and number right?
[14:51:47] apeiros: * is a quantifier
[14:51:57] gregf_: >> "(foo,bar)".scan(/\(.*,.*\)/)
[14:51:58] ruboto: gregf_ # => ["(foo,bar)"] (https://eval.in/471273)
[14:52:03] apeiros: it says that the previous pattern is matched 0 to ??? times
[14:52:22] apeiros: . is a placeholder for "any character" (except \n if used without the //m flag)
[14:52:22] gregf_: >> "(foo,bar)".scan(/\(*,*\)/) # thats what you're trying
[14:52:23] ruboto: gregf_ # => [")"] (https://eval.in/471274)
[14:52:52] apeiros: i.e., \(* is "zero or more left-parens"
[14:53:07] brainfire: that explains it
[14:53:57] gregf_: >> "(1,234) (12,456)".scan(/\(\d{1,3},\d{1,3}\)/) # this will probably get you what you're after
[14:53:58] ruboto: gregf_ # => ["(1,234)", "(12,456)"] (https://eval.in/471275)
[14:55:09] UniFreak: has joined #ruby
[14:55:33] wilsonc91: has joined #ruby
[14:55:43] absolutejam: has left #ruby: ("WeeChat 1.3")
[14:55:48] weemsledeux: has joined #ruby
[14:56:06] flak: has joined #ruby
[14:56:06] solocshaw: has joined #ruby
[14:56:09] s2013: has joined #ruby
[14:56:14] TheNet: has joined #ruby
[14:56:16] UniFreak: I'm tring to install jekyll and redcarpet in cygwin, but here is the error output:http://paste.ubuntu.com/13330689/
[14:56:17] erbeshar1: has joined #ruby
[14:56:22] UniFreak: it said I didn't install rdoc
[14:56:44] brainfire: thanks guys I'll play around with it.. may have more questions later though :)
[14:56:53] UniFreak: but I checked with the cygwin's installer, I did install it
[14:57:08] lsmola: has joined #ruby
[14:57:38] karapetyan: has joined #ruby
[14:57:41] apeiros: ?guys brainfire
[14:57:41] ruboto: brainfire, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[14:57:59] shinnya: has joined #ruby
[14:59:24] RegulationD: has joined #ruby
[14:59:29] havenwood: UniFreak: An easy workaround would be to not generate docs. You can add `gem: "--no-document"` to your ~/.gemrc.
[14:59:50] havenwood: UniFreak: Or do you want docs generated?
[15:00:46] UniFreak: havenwood: I don't even know what that mean
[15:01:12] apeiros: brainfire: not quite sure what the "?" is supposed to ask :)
[15:01:35] havenwood: UniFreak: After installing each gem Ruby generates documentation. Since that takes time it's fairly popular to disable documentation generation.
[15:01:59] antoniobeyah: has joined #ruby
[15:02:02] brainfire: apeiros: I wasn't sure what the problems with "guys" is
[15:02:08] tmtwd: has joined #ruby
[15:02:16] havenwood: UniFreak: Ruby Documentation (rdoc).
[15:02:41] roxtrongo: has joined #ruby
[15:03:04] apeiros: brainfire: I think the message from the bot is pretty understandable?
[15:03:23] brainfire: apeiros: is this a gender thing?
[15:03:43] solocshaw1: has joined #ruby
[15:04:25] UniFreak: havenwood: I did that, now the installation is silence
[15:04:34] Papierkorb: brainfire: you have as much the right to be offended by anything just as much as you have the right to not care if you don't want. (Oh, when I use that method it's for trolling purposes.)
[15:05:04] havenwood: UniFreak: I'm not sure why rdoc isn't found with your cygwin install. Hem.
[15:05:09] havenwood: UniFreak: But that works!
[15:06:25] apeiros: Papierkorb: just that people who don't care about certain things in this channel can be shown the door.
[15:06:46] apeiros: (which in no way inhibits their right to still not care)
[15:07:01] brainfire: no one's offended right?
[15:07:14] apeiros: brainfire: no, not at this point :)
[15:08:26] subscope: has joined #ruby
[15:08:45] Guest36: has joined #ruby
[15:08:45] mistermocha: has joined #ruby
[15:09:45] dhollinger: has joined #ruby
[15:09:55] tubulife-: has joined #ruby
[15:10:53] brainfire: ok so if I may ask another question: the scan method for the string object should return an array which contains all the matches of the regular expression that it was invoked with right?
[15:11:21] tkuchiki: has joined #ruby
[15:11:56] apeiros: if your regex contains capturing groups, the result will be an array of arrays, with the inner array being the captured values
[15:12:14] tvw: has joined #ruby
[15:12:35] B1n4r10: has joined #ruby
[15:12:39] apeiros: >> "x=2, y=3, z=4".scan(/\w=\d/)
[15:12:40] ruboto: apeiros # => ["x=2", "y=3", "z=4"] (https://eval.in/471295)
[15:12:46] apeiros: >> "x=2, y=3, z=4".scan(/(\w)=(\d)/)
[15:12:47] ruboto: apeiros # => [["x", "2"], ["y", "3"], ["z", "4"]] (https://eval.in/471296)
[15:12:57] brainfire: ok, so I've tried string.scan(/\(\d*,'.*'\)/) on that string containing all this data in the brackets like I mentioned earlier, it's all in a single line because mysqldump did it that way. It returns a match, but the array only has length one with this one containing all the matches ...
[15:13:12] brainfire: apeiros: yeah I tried that too, same deal -.-'
[15:13:33] apeiros: brainfire: the .* happily matches as far as it can
[15:13:53] apeiros: you probably want [^']*' or .*?'
[15:14:03] momomomomo: has joined #ruby
[15:14:24] podman: has joined #ruby
[15:14:26] karapetyan: has joined #ruby
[15:14:35] TheNet: has joined #ruby
[15:15:31] mistermocha: has joined #ruby
[15:15:50] benhuda: has joined #ruby
[15:15:59] blubjr`: has joined #ruby
[15:16:12] brainfire: the .*? seems to be working.
[15:16:29] brainfire: apeiros: could you tell me what exactly that did?
[15:16:30] sankaber: has joined #ruby
[15:17:14] mistermocha: has joined #ruby
[15:17:16] Papierkorb: brainfire: .*? makes .* non-greedy
[15:17:48] Papierkorb: >> "foo|bar|baz"[/.*\|/]
[15:17:49] ruboto: Papierkorb # => "foo|bar|" (https://eval.in/471300)
[15:17:51] Papierkorb: >> "foo|bar|baz"[/.*?\|/]
[15:17:52] ruboto: Papierkorb # => "foo|" (https://eval.in/471301)
[15:17:55] Papierkorb: brainfire: ^
[15:18:06] countryHick: has joined #ruby
[15:18:07] G: has joined #ruby
[15:18:24] lancetw: has joined #ruby
[15:18:24] jevs: has joined #ruby
[15:18:44] blackdev1l: has joined #ruby
[15:18:48] n1ftyn8_: has joined #ruby
[15:19:06] htmldrum: has joined #ruby
[15:19:09] blackjid: has joined #ruby
[15:19:12] mistermo_: has joined #ruby
[15:19:19] teotwaki: has joined #ruby
[15:19:19] brainfire: hm I think I get it now
[15:19:22] krak3n: has joined #ruby
[15:19:27] Rollabunna: has joined #ruby
[15:19:30] DanKnox[away]: has joined #ruby
[15:19:32] brainfire: thought if I enclose it with ' it would work
[15:19:35] cschneid: has joined #ruby
[15:19:39] brainfire: anyway, thanks folks ;)
[15:19:50] tpendragon: has joined #ruby
[15:19:51] linc01n: has joined #ruby
[15:20:25] gregf_: brainfire: what does the string look like?
[15:21:12] apeiros: >> "x=2, y=3, z=4".scan(/(.)=(\d)/)
[15:21:13] ruboto: apeiros # => [["x", "2"], ["y", "3"], ["z", "4"]] (https://eval.in/471302)
[15:21:34] brainfire: gregf_: in the dump file it's (number,'string') including the single quotes
[15:21:39] apeiros: brainfire: take ^, the . matches a single char, but any. now if we want "any amount of", and simply add *, see what happens
[15:21:44] apeiros: >> "x=2, y=3, z=4".scan(/(.*)=(\d)/)
[15:21:45] ruboto: apeiros # => [["x=2, y=3, z", "4"]] (https://eval.in/471303)
[15:21:57] axl_: has joined #ruby
[15:22:01] rickmasta: has joined #ruby
[15:22:03] apeiros: since "=2, " all are "any character" too, the .* will continue to match
[15:22:09] gregf_: brainfire: ah - ok
[15:22:38] zenguy_pc2: has joined #ruby
[15:23:06] momomomomo: has left #ruby: ()
[15:23:24] momomomomo: has joined #ruby
[15:23:27] apeiros: brainfire: and one strategy is to replace "any character" with "any character *except*":
[15:23:40] freerobby: has joined #ruby
[15:23:41] apeiros: >> "foo=2, bar=3, z=4".scan(/([^=]*)=(\d)/)
[15:23:42] ruboto: apeiros # => [["foo", "2"], [", bar", "3"], [", z", "4"]] (https://eval.in/471308)
[15:23:47] brainfire: apeiros: it takes anything left of the last "=" right
[15:23:49] roxtrongo: has joined #ruby
[15:24:12] apeiros: yes. because the last = is needed to still satisfy the expression
[15:24:43] _stu_: has joined #ruby
[15:25:01] apeiros: basically the .* will match until the end of the string, notice that it then can't satisfy the "=(\d)" part, and backtrack until it can.
[15:25:16] apeiros: (a modern regex engine will probably optimize how it does this, though)
[15:25:20] ruby-lang798: has joined #ruby
[15:26:12] zenguy_pc2: has joined #ruby
[15:26:21] brainfire: the ^ matches something to the beginning of the string though?
[15:26:22] karapetyan: has joined #ruby
[15:26:36] johnhamelink: has joined #ruby
[15:27:03] apeiros: [] is a character class. and [^] is a negated character class. [^a] is "any character except a"
[15:27:14] apeiros: [^abc] is "any character except a, b or c"
[15:27:27] brainfire: right. I remember actually lol
[15:27:35] brainfire: apeiros: thank you, you've been very helpful
[15:28:17] grill: has joined #ruby
[15:28:26] Spami: I'm trying to run a cronjob on my macbook that execute a script every 10min
[15:29:10] Spami: I know the script is running because the log file is being created every 10minutes but nothing happens: nothing in the log files and the API supposed to be hit isn't being hit
[15:29:21] Spami: (the scripts uses capybara)
[15:29:39] Spami: any idea of what can be the issue?
[15:30:15] apeiros: Spami: it crashes?
[15:30:44] |ifei5g00d: has joined #ruby
[15:30:51] norc: Spami: Also it is possible I keep deleting your log files.
[15:32:37] arup_r: has joined #ruby
[15:32:41] zenguy_pc2: has joined #ruby
[15:32:53] emilkarl: has joined #ruby
[15:33:54] Spami: apeiros, where could I see it a log of it crashing?
[15:34:12] aufi: has joined #ruby
[15:34:25] apeiros: Spami: you'll have to make it write one. e.g. by instructing cron to redirect stderr to a file.
[15:34:30] mark2: has left #ruby: ("PART #RubyOnRails :PART #jquery :PART #reactjs :PART ##javascript :PART #elixir-lang :PART #debian :PART #zsh :PART #nethunter :PONG :verne.freenode.net")
[15:34:35] mistermocha: has joined #ruby
[15:34:36] apeiros: (and/or stdout)
[15:35:22] gregf_: brainfire: what apeiros said. but yeah, a quantifier comes after what you want. \d,\w,., \s,\S etc and then you append a quantifier to it
[15:36:31] aibot: has joined #ruby
[15:37:18] Spami: apeiros, I do: */10 * * * * /bin/bash -l -c 'ruby /Users/charly/Projects/job-distribution/postingjob.rb > /Users/charly/Projects/logs/crontab.log'
[15:37:33] apeiros: that iirc only redirects stdout
[15:38:31] apeiros: Spami: http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-3.html useful
[15:38:41] aibot: has joined #ruby
[15:38:41] apeiros: !fact add redirection http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-3.html
[15:38:41] ruboto: apeiros, I will remember that redirection is http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-3.html
[15:40:18] maddmaxx: has joined #ruby
[15:40:34] jimms: has joined #ruby
[15:41:32] Spami: apeiros, super useful thanks. I'll see the result in 9minutes :)
[15:42:51] ibouvousaime: has joined #ruby
[15:43:54] sapslaj: has joined #ruby
[15:44:04] purplexed-: has joined #ruby
[15:44:04] purplexed-: has joined #ruby
[15:44:52] nettoweb: has joined #ruby
[15:44:55] dmitch: has joined #ruby
[15:50:05] fr: has joined #ruby
[15:50:27] zenguy_pc2: has joined #ruby
[15:51:41] yes`r: has joined #ruby
[15:51:46] aibot: has joined #ruby
[15:52:08] ruurd: has joined #ruby
[15:52:32] iateadonut: has joined #ruby
[15:52:35] fr: Hello, I've a question. I'm beginner and I trying to have a non breakable space after a colon using haml.
[15:53:23] fr: %h3 row : &nbsp;
[15:53:40] tvw: has joined #ruby
[15:53:49] sinkensabe: has joined #ruby
[15:54:03] fr: someone has an idea ?
[15:54:23] komanda3: has joined #ruby
[15:54:34] xcesariox: has joined #ruby
[15:54:43] komanda: http://pastebin.com/dxN8tXaJ
[15:54:44] ruboto: Komanda, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/64a43de605d142b1397f
[15:54:44] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[15:54:45] maikowblue: has joined #ruby
[15:55:14] blackmesa: has joined #ruby
[15:55:25] komanda: So i'm trying to follow this tutorial; i get the pastebin error
[15:55:25] komanda: http://stuff-things.net/2011/05/16/legacy-development-with-pow/
[15:56:03] komanda: (only when using .php file; in general for html things work fine
[15:56:28] crankharder: fr: works for me. what are you seeing
[15:57:10] crankharder: Komanda: something is probably already running on 61987, probably your app
[15:57:48] komanda: crankharder: the port number seems to be random
[15:57:54] komanda: every time i refresh it changes
[15:58:58] skade: has joined #ruby
[15:59:07] Jardayn: has joined #ruby
[15:59:11] casadei: has joined #ruby
[15:59:28] crankharder: no idea. never used pow
[15:59:37] crankharder: localhost works fine for me
[15:59:43] Mia: has joined #ruby
[15:59:43] Mia: has joined #ruby
[15:59:59] pwnd_nsfw: has joined #ruby
[16:00:08] atomical: has joined #ruby
[16:00:09] fr: @crankharder . I mean when I reduce a the window of my app the colon go down
[16:00:21] komanda: i found the #rack channel, any other places people might know about #pow
[16:00:21] arooni: has joined #ruby
[16:00:34] komanda: i'm new to the ruby ecosystem
[16:01:27] gizmore: has joined #ruby
[16:03:18] psye: has joined #ruby
[16:03:31] mary5030: has joined #ruby
[16:04:55] aspiers: has joined #ruby
[16:07:20] mary5030: has joined #ruby
[16:07:29] aibot: has joined #ruby
[16:07:29] i: has joined #ruby
[16:08:02] hohenfall: has joined #ruby
[16:08:45] riotjones: has joined #ruby
[16:10:06] brainfire: has joined #ruby
[16:13:52] banister: has joined #ruby
[16:14:23] EminenceHC: has joined #ruby
[16:15:28] Xeago: has joined #ruby
[16:16:08] afaris: has joined #ruby
[16:16:08] afaris: has joined #ruby
[16:16:57] Ilyes512: has joined #ruby
[16:17:51] moeSeth: has joined #ruby
[16:19:17] _blizzy_: has joined #ruby
[16:20:38] B1n4r10: has joined #ruby
[16:21:58] dorei: has joined #ruby
[16:23:52] Guest33405: has joined #ruby
[16:25:52] pwnd_nsfw: has joined #ruby
[16:26:21] gregf: has joined #ruby
[16:26:52] benlieb: has joined #ruby
[16:28:11] ochkoffein: has joined #ruby
[16:28:52] rbowlby: has joined #ruby
[16:29:15] benlieb: has joined #ruby
[16:29:48] wilsonc91: has joined #ruby
[16:30:36] nateberkopec: has joined #ruby
[16:31:47] blunckr: has joined #ruby
[16:31:54] hohenfall: Hey all, I've got some questions about multiple assignment. The code works as-is, but I'm trying to clean it up a bit.
[16:32:17] hohenfall: I posted the relevant part on Gist: https://gist.github.com/rirel/5a94724b29eb2fe1ba55
[16:32:21] mistermocha: has joined #ruby
[16:32:41] beanHolez: has joined #ruby
[16:32:59] jackjackdripper: has joined #ruby
[16:33:01] jimbeaudoin: has joined #ruby
[16:35:57] sinkensabe: has joined #ruby
[16:36:46] atomicjolt: has joined #ruby
[16:37:43] adaedra: Whay did you try, hohenfall
[16:38:55] peitera: has joined #ruby
[16:39:00] last_staff: has joined #ruby
[16:39:36] hohenfall: adaedra: Primarily what I'm looking for a way to discard uneeded in a multiple assignment operation
[16:39:52] adaedra: ok, what did you try?
[16:40:04] hohenfall: sorry, I'm not sure what you mean by that
[16:40:11] adaedra: I see `_, y, z = %w{a b c}` in your code, what's wrong with it?
[16:40:23] adaedra: >> _, y, z = %w{a b c}; [y, z]
[16:40:24] ruboto: adaedra # => ["b", "c"] (https://eval.in/471333)
[16:41:08] hohenfall: doesn't seem to work in irb
[16:41:32] yes`r: has joined #ruby
[16:41:43] hohenfall: I'm using 2.3.0
[16:42:00] hohenfall: if I execute this: _, y, z = %w{a b c}
[16:42:09] hohenfall: the underscore contains the entire list
[16:42:31] adaedra: can you gist your IRB session?
[16:42:35] snockerton: has joined #ruby
[16:43:07] adaedra: Also, 2.3.0 is still preview at this time :/
[16:43:08] hohenfall: I pasted it at the end of the existing gist
[16:43:40] jhass: hohenfall: that's because irb reassings _ to the last expressions value. The value of an assignment is its right hand side
[16:43:41] adaedra: try _ again after that
[16:44:06] symm-: has joined #ruby
[16:44:12] hohenfall: so _ is a built-in variable?
[16:44:21] adaedra: more or less
[16:44:22] jhass: hohenfall: compare _, y, z = %w{a b c}; _ in irb
[16:44:35] jhass: not really built-in, irb just uses it
[16:44:48] terminalrecluse: has joined #ruby
[16:44:49] hohenfall: ah, so only in irb
[16:45:00] tkuchiki: has joined #ruby
[16:45:10] adaedra: _ is often used to discard things
[16:45:13] nanoz: has joined #ruby
[16:45:24] pdoherty: has joined #ruby
[16:45:44] hohenfall: didn't realize irb was reassigning it
[16:46:03] adaedra: depending on your needs, you can also use * to discard things (but it works differently): *, y, z = %w[a b c]
[16:46:19] adaedra: In your case, I think you want _.
[16:46:35] adaedra: Also, for the nested assignment, you can use () instead of [].
[16:46:52] adaedra: >> a, (b, c) = [1, [2, 3]]; [a, b, c]
[16:46:52] hohenfall: ah, so that's what it was
[16:46:53] ruboto: adaedra # => [1, 2, 3] (https://eval.in/471334)
[16:47:31] adaedra: _ will take one element from an array, * will take all remaining.
[16:47:39] hohenfall: all remaining?
[16:47:42] jhass: _ is really just a variable name
[16:48:03] adaedra: >> a1, *, a2 = (1..5).to_a; b1, _, b2 = (1..5).to_a; [[a1, a2], [b1, b2]]
[16:48:04] ruboto: adaedra # => [[1, 5], [1, 3]] (https://eval.in/471335)
[16:48:09] jhass: the only special thing is that ruby -w won't warn about reusing it inside a single expression and it won't warn about it never being read
[16:48:09] yqt: has joined #ruby
[16:48:14] s2013: has joined #ruby
[16:48:37] jhass: and that holds true for all variables starting with _, so _foo, _bar and so on
[16:48:49] jhass: _ is too just a variable starting with _ so to say ;)
[16:49:02] hohenfall: thanks guys ^_^
[16:49:05] Kero: has joined #ruby
[16:49:06] hohenfall: that pretty much explains everything
[16:50:14] treehug88: has joined #ruby
[16:53:54] Guest33405: has joined #ruby
[16:55:22] Kero: has joined #ruby
[16:55:50] Spami: apeiros, nothing in the log still: "*/10 * * * * /bin/bash 'ruby /Users/theonegri/Projects/job-distribution/postingjob.rb &> /Users/theonegri/Projects/logs/crontab.log'"
[16:57:28] Axsuul: has joined #ruby
[16:58:28] dionysus69: has joined #ruby
[16:58:28] fedexo: has joined #ruby
[16:58:50] voker57: has joined #ruby
[16:59:04] UniFreak1: has joined #ruby
[16:59:38] crankharder: Spami: I don't think that redirection catches all output
[17:00:10] crankharder: think you want.... command > file.log 2>&1
[17:00:22] crankharder: specifically, it might not be logging error output
[17:00:37] simplyianm: has joined #ruby
[17:00:54] wldcordeiro: has joined #ruby
[17:01:19] ruurd: has joined #ruby
[17:03:08] karapetyan: has joined #ruby
[17:04:06] mary5030: has joined #ruby
[17:04:34] RegulationD: has joined #ruby
[17:05:06] EminenceHC: has joined #ruby
[17:06:26] Papierkorb: Does someone know the fatal error "No live threads left. Deadlock?" in rubys thread.rb? Getting that message (with an abort afterwards) when trying to use xmpp4r to connect to an XMPP server
[17:06:31] sankaber: has joined #ruby
[17:06:47] Papierkorb: Googling shows that it occurs for a bunch of ruby tools
[17:07:05] mary5030: has joined #ruby
[17:07:24] yoongkang: has joined #ruby
[17:08:31] Papierkorb: ah, no, the error is raised from within xmpp4r, sorry
[17:09:21] |ifei5good: has joined #ruby
[17:09:33] riotjones: has joined #ruby
[17:11:28] loechel: has joined #ruby
[17:11:56] |ifei5g0_: has joined #ruby
[17:12:23] tubulife-: has joined #ruby
[17:12:52] mary5030: has joined #ruby
[17:12:54] aphprentice: has joined #ruby
[17:13:35] |ifei5g00d: has joined #ruby
[17:13:49] mary5030: has joined #ruby
[17:15:52] lubarch: has joined #ruby
[17:18:01] momomomomo: has joined #ruby
[17:18:51] Eminence_: has joined #ruby
[17:19:21] rakm: has joined #ruby
[17:20:05] Rollabunna: has joined #ruby
[17:20:12] wldcordeiro: has joined #ruby
[17:20:36] idefine: has joined #ruby
[17:21:14] SCHAAP137: has joined #ruby
[17:22:01] htmldrum: has joined #ruby
[17:24:13] skade: has joined #ruby
[17:24:56] woodruffw: has joined #ruby
[17:25:18] djbkd: has joined #ruby
[17:27:01] aryaching_: has joined #ruby
[17:27:48] amclain: has joined #ruby
[17:28:07] nofxx: has joined #ruby
[17:28:07] Eminence_: has joined #ruby
[17:29:35] lxsameer: has joined #ruby
[17:29:35] lxsameer: has joined #ruby
[17:30:44] towski_: has joined #ruby
[17:31:19] rbowlby: has joined #ruby
[17:32:17] atomical: has joined #ruby
[17:32:35] dancer_: has joined #ruby
[17:32:43] arthurix_: has joined #ruby
[17:32:44] nertzy2: has joined #ruby
[17:34:33] dancer_: has joined #ruby
[17:34:47] baweaver: has joined #ruby
[17:36:07] Jardayn: has joined #ruby
[17:36:38] tubulife-: has joined #ruby
[17:37:50] benlieb: has joined #ruby
[17:37:51] roxtrongo: has joined #ruby
[17:39:18] ibouvousaime: has joined #ruby
[17:40:29] yashinbasement: has joined #ruby
[17:41:00] skweek: has joined #ruby
[17:41:25] desmondhume: has joined #ruby
[17:41:40] nofxx1: has joined #ruby
[17:42:07] pietr0: has joined #ruby
[17:43:59] jimms: has joined #ruby
[17:44:11] beanHolez: has joined #ruby
[17:46:32] zenguy_pc: has joined #ruby
[17:46:52] bmalum: has joined #ruby
[17:48:09] Daneel: has joined #ruby
[17:48:27] Ilyes512: has joined #ruby
[17:48:47] terminalrecluse: has joined #ruby
[17:48:57] zenguy_pc: has joined #ruby
[17:49:28] yardenbar: has joined #ruby
[17:49:36] Daneel: i am absolut newby in ruby
[17:49:51] Daneel: i would like to write multi line in a file
[17:50:14] Daneel: i found out to create a file descriptor : http://ruby-doc.org/core-2.2.3/File.html#method-c-new
[17:50:38] Daneel: but then i am blocked
[17:50:43] TPBallbag: has joined #ruby
[17:50:51] jhass: Daneel: File.write("foo.txt", "first line\nsecond line")
[17:50:52] Daneel: can some one explain how to use this FD ?
[17:51:10] Daneel: jhass: how to write several line like with EOF in Bash ?
[17:51:29] jhass: google "Ruby heredoc"
[17:51:34] Daneel: the nearer i found is this http://www.tutorialspoint.com/ruby/ruby_syntax.htm
[17:51:47] jhass: ?quickref
[17:51:47] ruboto: http://www.zenspider.com/Languages/Ruby/QuickRef.html
[17:51:53] mostlybadfly: has joined #ruby
[17:53:00] Daneel: jhass: i am reading
[17:53:09] jhass: lengthy version: File.open("foo.txt") do |file| file.puts "first line"; file.puts "second line"; end
[17:53:16] ZhdispjJHD: has joined #ruby
[17:53:17] mrtomme: has joined #ruby
[17:53:18] s2013: has joined #ruby
[17:53:31] jhass: er, File.open("foo.txt", "w") actually
[17:53:35] tubuliferous_: has joined #ruby
[17:53:39] ZhdispjJHD: has left #ruby: ()
[17:54:54] Daneel: jhass: i don't want to have to make one line then a second line etc
[17:55:15] Daneel: i want to put all lines like they will be in the futur file
[17:55:44] tobiasvl: so a heredoc
[17:56:21] thither: has joined #ruby
[17:56:31] tobiasvl: or just "foo
[17:56:46] tobiasvl: or %{string \n strang}
[17:56:59] tobiasvl: %Q|foo\n bar|
[17:57:01] tobiasvl: lots of ways
[17:57:52] Daneel: with the heredoc method the use the puts command
[17:58:04] Daneel: but the put command does not write to a file
[17:59:07] blunckr: has joined #ruby
[17:59:10] jhass: Daneel: File.write "foo.txt", <<MY_DIARY
[17:59:24] blunckr: has left #ruby: ()
[17:59:39] Daneel: ah it looks what i am looking for
[17:59:42] Daneel: i make some checks
[18:01:01] EminenceHC: has joined #ruby
[18:01:02] Daneel: jhass: the write method is not in http://ruby-doc.org/core-2.2.3/File.html
[18:01:48] jhass: it's actually inherited from IO http://ruby-doc.org/core-2.2.3/IO.html#method-c-write
[18:02:23] Daneel: it looks like climbing a huge mountain for me but simple for you :D
[18:02:27] Daneel: thank you for the help
[18:02:35] secretsignal: has joined #ruby
[18:02:52] secretsignal: has left #ruby: ()
[18:03:01] jhass: btw you can use newlines inside a regular "quoted string" too
[18:03:51] dmolina1: has joined #ruby
[18:03:56] secretsignal: has joined #ruby
[18:05:35] s2013: has joined #ruby
[18:06:49] baweaver: has joined #ruby
[18:07:00] thither: has left #ruby: ("WeeChat 1.0.1")
[18:07:52] shadoi: has joined #ruby
[18:09:08] demonlove: has joined #ruby
[18:10:24] riotjones: has joined #ruby
[18:11:08] demonlove: hello m going to partivipate in my first hackthon, i want to make some awesome app in ruby any idea?
[18:11:34] jhass: isn't coming up with your own idea sorta the deal with these?
[18:11:34] afaris: has joined #ruby
[18:11:34] afaris: has joined #ruby
[18:12:11] demonlove: no i ahve some api making idea
[18:12:55] demonlove: actually this will be my first hackthon so getting confused how much they are expexting?
[18:13:48] jhass: I don't think there's some standard for that, aim for something you'll be proud of to realize
[18:13:52] jhass: in that timeframe
[18:14:06] banister: has joined #ruby
[18:16:01] demonlove: like stock market teding api
[18:16:38] grill: has joined #ruby
[18:16:39] Papierkorb: demonlove: flappy bird with the level being generated out of live stock trading data
[18:17:18] tomphp: has joined #ruby
[18:17:19] demonlove: Papierkorb explain litle bit..
[18:18:38] tulak: has joined #ruby
[18:19:18] Papierkorb: demonlove: well you must've heard of flappy bird. you control a flying 'object' (a bird or so), and can only really interact with it by telling it to fly up a bit, after which it quickly descends again. then, the original ripped sprites out of super mario (or something), and put pipes from the bottom and the top, creating a course which you have to navigate through. The object goes to the right by itself. that course could technically be
[18:19:19] Papierkorb: generated out of stock data.
[18:19:26] lorn: has joined #ruby
[18:19:36] Papierkorb: demonlove: not claiming it's a good game mechanic though :P
[18:20:02] ta: has joined #ruby
[18:20:58] ellisTAA: has joined #ruby
[18:22:30] jericon: has joined #ruby
[18:22:52] htmldrum: has joined #ruby
[18:23:31] Papierkorb: demonlove: flappy bird was basically a rip off mechanically wise from the 'helicoptergame' http://www.helicoptergame.net/ (warning, requires flash)
[18:24:09] beanHolez: has joined #ruby
[18:24:29] jamto11: has joined #ruby
[18:24:59] lipoqil: has joined #ruby
[18:25:12] pdoherty: has joined #ruby
[18:25:14] Daneel: i i made somes tests here my code and error message
[18:25:15] Daneel: https://gist.github.com/anonymous/a65768d9d692b90ba9bb
[18:25:33] Daneel: what is wrong ?
[18:25:42] s2013: has joined #ruby
[18:25:56] adaedra: The comma after write.
[18:27:26] ruurd: has joined #ruby
[18:28:47] secretsignal: has left #ruby: ()
[18:29:01] demonlove: Papierkorb: is it built on ruby?
[18:29:11] kimegede: has joined #ruby
[18:29:23] Papierkorb: demonlove: what? That game? Nah, original was ActionScript2/Flash, there are also a bunch of Javascript clones of it
[18:29:41] Papierkorb: demonlove: and flappy bird .. probably java. not noteworthy. everything of it was an rip off anyway.
[18:30:07] spider-mario: has joined #ruby
[18:30:20] Eiam_: has joined #ruby
[18:30:39] demonlove: that was what i guesiing
[18:30:50] demonlove: i want to do in ruby
[18:30:58] demonlove: not a to-do like app
[18:31:24] Papierkorb: Then I guess this is the right moment to learn about doing graphics in ruby :)
[18:31:27] dhollinger: has joined #ruby
[18:32:51] tomphp: has joined #ruby
[18:32:52] ht__: has joined #ruby
[18:32:54] demonlove: Papierkorb: one more thing do you have any idea about the making of game which appear on chrome homepage at the time of dns error
[18:33:09] Frem: has joined #ruby
[18:33:20] Papierkorb: demonlove: no idea, I don't use chrome
[18:33:38] EminenceHC: has joined #ruby
[18:34:08] demonlove: i prefer firefox but sometimes i use chrome and when there no internet connection that game works fine
[18:34:32] demonlove: complete timewaster
[18:34:37] Papierkorb: Doesn't work in Chromium. Oh, and "doesnotexist.com" is a shim, it does exist
[18:34:43] benhuda: has joined #ruby
[18:35:47] demonlove: chrome and chromium are different i guess
[18:36:30] al2o3-cr: has joined #ruby
[18:37:27] grill: has joined #ruby
[18:37:32] Daneel: jhass: thank you for help
[18:38:16] jhass: Daneel: I intentionally didn't show you that way to do it, it's the least favorable
[18:38:46] jhass: Daneel: also note that MY_DIARY was aribtrary, actually to highlight that the identifier you can choose is arbitrary
[18:38:56] roxtrongo: has joined #ruby
[18:39:46] jhass: Daneel: use File.open with a block or File.write
[18:40:12] Ilyes512: has joined #ruby
[18:40:24] tomphp: has joined #ruby
[18:42:36] st1gma: has joined #ruby
[18:42:38] psmolen: has joined #ruby
[18:42:43] adac: has joined #ruby
[18:42:53] tubuliferous_: has joined #ruby
[18:43:07] dlitvak: has joined #ruby
[18:44:57] Mon_Ouie: has joined #ruby
[18:45:42] adaedra: <demonlove> chrome and chromium are different i guess
[18:45:47] centrx: has joined #ruby
[18:45:53] lukaszes: has joined #ruby
[18:46:09] adaedra: chromium is the full open-source version, without some components like Flash or the PDF reader, afaik
[18:46:24] nofxx1: pdf is there, flash thankfully don't
[18:47:00] adaedra: I actually have Chrome on my computer only for the rare cases I need Flash
[18:47:01] nofxx: has joined #ruby
[18:47:04] Eminence_: has joined #ruby
[18:47:36] codecop: has joined #ruby
[18:47:48] blackmesa: has joined #ruby
[18:49:36] Daneel: jhass: yep i know this is a TAG
[18:50:07] Daneel: jhass: it is normal to not give all the keys and lets search. it is better for learning
[18:50:24] Daneel: jhass: your are a good teacher :D
[18:51:36] TPBallbag: has joined #ruby
[18:52:12] jetpackjoe: has joined #ruby
[18:52:58] symbol: has joined #ruby
[18:53:25] Daneel: oups adaedra :D
[18:54:08] shadoi: has joined #ruby
[18:54:44] B1n4r10: has joined #ruby
[18:54:46] rgtk: has joined #ruby
[18:55:03] rgtk: has joined #ruby
[18:55:40] leitz: has joined #ruby
[18:56:11] leitz: On antiquated Ruby, what do you have to "require" for an "exit" to end the program?
[18:56:34] adaedra: define ???antiquated???
[18:57:10] renderful: has joined #ruby
[18:58:45] ht__: has joined #ruby
[18:58:55] adaedra: 18>> method(:exit)
[18:58:56] ruboto: adaedra # => #<Method: Object(Kernel)#exit> (https://eval.in/471363)
[18:59:07] simplyianm: has joined #ruby
[18:59:07] wilsonc91: has joined #ruby
[18:59:11] adaedra: it should be there, leitz
[18:59:56] leitz: I thought so too, but it kept complaining about a syntax error after the exit.
[19:00:05] jsageryd: has joined #ruby
[19:00:34] nettoweb: has joined #ruby
[19:01:00] arthurix: has joined #ruby
[19:02:12] _blizzy_: has joined #ruby
[19:03:40] st1gma: has joined #ruby
[19:03:55] dravine: has joined #ruby
[19:04:14] s2013: has joined #ruby
[19:04:23] Kabaka: has joined #ruby
[19:04:26] teemo_shrooms: has joined #ruby
[19:04:47] shevy: what code did you use
[19:05:07] linocisco: has joined #ruby
[19:05:08] ur5us: has joined #ruby
[19:05:15] Kabaka: has joined #ruby
[19:05:19] ur5us: has joined #ruby
[19:05:36] leitz: shevy, I just put the exit before the offending code to isolate it. Wound up putting it before everything and it still choked.
[19:05:59] leitz: I've fixed the offending issue, as it was operator error. Just confused about the exit.
[19:06:27] leitz: Now I'm confused about gets. My confusion grows! Home ill today, so even more confused than normal.
[19:08:08] leitz: Before I get too far in gets, is there a more "secure" option? I know the C crowd pales at using their gets.
[19:08:48] adaedra: It depends on your needs
[19:09:46] Eminence_: has joined #ruby
[19:10:17] adaedra: You can also take a look at https://github.com/JEG2/highline
[19:10:17] leitz: Well, let me share a personal challenge. I've been trying to understand the whole "put stuff in and out of a datastore" thing for a few years and in more than one language.
[19:10:37] leitz: In this case I'm working on editing stuff in a JSON file. https://gist.github.com/LeamHall/9367e672672da3ac6eef
[19:10:45] krak3n: has joined #ruby
[19:11:05] build22_: has joined #ruby
[19:11:09] riotjones: has joined #ruby
[19:11:39] mg^: gets in C is broken because it has no bounds checking and the target buffer is fixed size.
[19:12:01] mg^: that's not the case in Ruby so it's fine if you just want to read a little bit of stuff
[19:12:16] linocisco: I am reading "Learn the ruby the hard way" by Zee Shaw
[19:12:26] leitz: Every once in a while I come back to an attempt to finally figure this out. SInce my wife is out of town on a trip, I figured this might be the time. May also keep me out of trouble...
[19:12:42] ht__: has joined #ruby
[19:13:00] leitz: mg^, thanks.
[19:13:27] leitz: One day I'd like to look at more secure coding skills. Right now I'm still in coder kindergarden.
[19:13:47] ellisTAA: if you were asked to search one???s genome for a specific set of proteins, what would be the most efficient way to do that? i got asked this in an interview yesterday
[19:14:06] shevy: EllisTAA just run a BLAST search on it
[19:14:17] juddey: has joined #ruby
[19:14:19] ellisTAA: shevy: i???ve never heard of it, ill look it up
[19:14:49] shevy: the algorithm is explained somewhere... k-mer search ... https://en.wikipedia.org/wiki/BLAT_%28bioinformatics%29#Search_stage
[19:14:52] mg^: Sounds like the interview questions I got asked at Google
[19:15:10] ellisTAA: shevy: interesting ???.
[19:15:28] jsageryd: has joined #ruby
[19:15:50] duncannz: has joined #ruby
[19:15:58] momomomomo: has joined #ruby
[19:15:59] mg^: EllisTAA: does the job involve genetics or was this one of those random ethings?
[19:16:06] ellisTAA: mg^: random
[19:16:12] mg^: don't know how that e snuck in there
[19:16:41] ht__: has joined #ruby
[19:16:41] shevy: I guess you could abstract it for any other needle-in-haystack search whenever you have a huge haystack (and no needle hidden inside hahaha)
[19:16:45] duncannz: has joined #ruby
[19:16:47] baweaver: has joined #ruby
[19:17:12] mg^: One of the google interview questions I got was a "how would you search X to find Y" and I stupidly said "oh, I'd probably write a regex for it"
[19:17:20] mg^: and the guy hands me a whiteboard marker
[19:17:26] duncannz: has joined #ruby
[19:17:32] mg^: then proceeded to tell me how each attempt was wrong
[19:17:34] ellisTAA: mg^: lol was he at least a nice guy
[19:17:49] ellisTAA: mg^: sounds like a good appracoh to me
[19:18:00] duncannz: has joined #ruby
[19:18:02] shevy: depends on whether they hired him or just lectured him!
[19:18:27] joshf_: has joined #ruby
[19:18:32] mg^: They offered me a job (RHEL sysadmin) but not the job I was interviewed for (site reliability engineer).
[19:18:45] duncannz: has joined #ruby
[19:19:13] DoubleMalt: has joined #ruby
[19:19:21] mg^: I didn't really have the experience they were looking for for that SRE job anyway, good call on their part
[19:19:21] leitz: Hmm...I could use a job like that. Either one,actually.
[19:19:21] duncannz: has joined #ruby
[19:19:36] baweaver: Their phone screen is horrid
[19:19:48] mg^: Also had a good job as a Linux admin at another giant company, so I ultimately said no
[19:19:49] baweaver: you have to remember pointless details of man pages for some of it
[19:19:55] slash_nick: it's unbelievable how many roles they have
[19:20:01] leitz: I interviewed for an SRE job there a while back. The interviewer didn't thiink Bash was a programming language.
[19:20:39] jetpackjoe: has joined #ruby
[19:20:42] ht__: has joined #ruby
[19:20:43] bb010g: has joined #ruby
[19:21:00] leitz: Still not getting the gets thing to work yet.
[19:21:18] Rollabunna: has joined #ruby
[19:21:35] shevy: user_input = gets.chomp
[19:21:41] tulak: has joined #ruby
[19:22:01] jetpackjoe: has joined #ruby
[19:23:08] hackeron: has joined #ruby
[19:23:24] leitz: shevy, see the comment. https://gist.github.com/LeamHall/9367e672672da3ac6eef
[19:23:52] kadoppe: has joined #ruby
[19:23:58] lapide_viridi: has joined #ruby
[19:24:41] ht__: has joined #ruby
[19:24:42] Musashi007: has joined #ruby
[19:24:45] nertzy2: has joined #ruby
[19:25:09] leitz: Note that my expectation is "operator error", just haven't figured out the paticular error. Off to make a little coffee, back shortly.
[19:26:27] Zai00: has joined #ruby
[19:26:32] htmldrum: has joined #ruby
[19:26:38] jamto11_: has joined #ruby
[19:27:16] casadei: has joined #ruby
[19:28:27] tomphp: has joined #ruby
[19:28:45] umgrosscol: has joined #ruby
[19:28:55] st1gma: has joined #ruby
[19:29:31] al2o3-cr: has joined #ruby
[19:31:18] mg^: leitz: a bare gets is equivalent ARGF.gets, so the result is the first line of the first file you gave it on the command line. Try STDIN.gets instead
[19:31:20] stannard: has joined #ruby
[19:32:42] ht__: has joined #ruby
[19:32:56] mg^: http://ruby-doc.org/core-2.2.3/Kernel.html#method-i-gets
[19:34:46] leitz: mg^, STDIN.gets did the trick, thanks!
[19:37:12] diegoaguilar: has joined #ruby
[19:37:31] trosborn: has joined #ruby
[19:39:01] linuxboytoo: has joined #ruby
[19:39:50] socialjackie: has joined #ruby
[19:40:47] rehat_: has joined #ruby
[19:42:45] ht__: has joined #ruby
[19:43:11] Renich: has joined #ruby
[19:43:36] postmodern: has joined #ruby
[19:43:43] Renich: has joined #ruby
[19:45:16] sp4rrow: has joined #ruby
[19:47:59] ciwolsey: has joined #ruby
[19:48:01] ciwolsey: has left #ruby: ("Leaving")
[19:50:25] EminenceHC: has joined #ruby
[19:52:07] karapetyan: has joined #ruby
[19:52:41] chipotle: has joined #ruby
[19:53:08] pkrnj: has joined #ruby
[19:54:04] ibouvousaime: has joined #ruby
[19:54:07] newdan: has joined #ruby
[19:56:29] Icey: has joined #ruby
[19:56:52] leitz: In an attempt to graduate Coder Kindergarden, any suggestions on improving the code? #!/usr/bin/env ruby
[19:56:52] leitz: # edit_json.rb
[19:56:52] leitz: require 'json'
[19:56:52] leitz: $my_hash = Hash.new
[19:56:54] leitz: def valid_json?(json)
[19:56:58] leitz: data = JSON.parse(json)
[19:57:00] leitz: return data, true
[19:57:04] leitz: rescue Exception => e
[19:57:06] leitz: return false
[19:57:12] leitz: def show_keys(hash)
[19:57:13] newdan: leitz: Use dpaste.org or something
[19:57:14] leitz: hash_keys = Array.new
[19:57:16] leitz: hash.each_key do |key|
[19:57:19] newdan: leitz: Don't paste code right into IRC
[19:57:20] leitz: hash_keys << key
[19:57:26] leitz: hash_keys.sort!
[19:57:28] leitz: return hash_keys
[19:57:34] leitz: def edit_key(key)
[19:57:36] leitz: if $my_hash.has_key?(key)
[19:57:38] leitz: puts "Okay, we'll edit #{key}."
[19:57:40] leitz: subkeys = Array.new
[19:57:42] leitz: $my_hash[key].each_key do |subkey|
[19:57:44] leitz: subkeys << subkey
[19:57:50] leitz: subkeys.sort!
[19:57:54] leitz: subkeys.each do |sk|
[19:57:56] leitz: print "#{sk} "
[19:57:58] demonlove: has joined #ruby
[19:58:04] leitz: puts "Which subkey do you want to edit?"
[19:58:06] leitz: subkey_to_edit = STDIN.gets.chomp
[19:58:08] leitz: puts "Okay, fixing #{subkey_to_edit}."
[19:58:09] centrx: What are you doing
[19:58:10] leitz: puts "That subkey is currently #{$my_hash[key][subkey_to_edit]}."
[19:58:11] atomical: are you live coding?
[19:58:11] Mon_Ouie: !kick leitz
[19:58:12] ruboto: ruboto kicked leitz:
[19:58:12] ruboto: -o ruboto
[19:58:23] newdan: Haha thank you Mon_Ouie
[19:58:38] leitz: has joined #ruby
[19:58:42] leitz: keys_list = show_keys($my_hash)
[19:58:44] leitz: puts "There are #{keys_list.count} keys. Which would you like to edit?"
[19:58:46] centrx: You just failed Coder Kindergarten
[19:58:46] leitz: STDOUT.flush
[19:58:50] idefine: has joined #ruby
[19:58:50] leitz: key_to_edit = STDIN.gets.chomp
[19:58:53] ruboto: +q leitz!*@*
[19:58:53] ruboto: -o ruboto
[19:59:15] mg^: well, that went downhill fast
[19:59:35] atomical: leitz: https://gist.github.com/atomical/5b293204094df4128b46
[19:59:38] atomical: that's how you do it
[20:00:22] Thaxll: has joined #ruby
[20:00:42] ht__: has joined #ruby
[20:01:07] benlovell: has joined #ruby
[20:01:17] newdan: No need to berate him for not knowing not to paste in IRC. Everyone's new at some point...
[20:02:44] Thaxll: pastebin is down
[20:03:36] newdan: There's tons, gist is mentioned in the topic and https://dpaste.de is one I use a lot for some reason
[20:03:52] ChanServ: +o Mon_Ouie
[20:03:55] Mon_Ouie: -q leitz!*@*
[20:03:55] blackmesa: has joined #ruby
[20:04:08] Mon_Ouie: -o Mon_Ouie
[20:04:31] dmitch: has joined #ruby
[20:04:33] shevy: leitz man what up!!!
[20:05:00] leitz: Yeah, shevy. I tried to cut and paste too fast.
[20:05:11] leitz: I *thought* was I was pasting the Gist URL...
[20:05:28] shevy: what IRC client do you use?
[20:05:40] shevy: curious :)
[20:05:50] shevy: I had similar problems with irssi and weechat... I never managed to get it right
[20:05:53] leitz: I run on a CentOS 6 laptop.
[20:06:04] leitz: Nyah, this was purely operator error.
[20:06:09] Thaxll: anyone good with deep knowledge of system and os related to ruby?
[20:06:14] shevy: I hate laptop keyboards... I can't write as quickly on them as I can on my desktop machine at home
[20:06:34] solars: has joined #ruby
[20:06:35] yashinbasement: has joined #ruby
[20:06:36] subscope: has joined #ruby
[20:06:38] leitz: That's why I have a big one plugged into mine. :)
[20:07:07] leitz: There's really no good excuse for that last bit.
[20:07:38] leitz: I will point out, though, that no one seemed to see the apology before booting me or calling me a dumba$$.
[20:07:52] shevy: Thaxll best you can do is to try and ask anyway
[20:08:06] atomical: leitz: I don't think your apology came through
[20:08:07] shevy: leitz spammers must die early!
[20:08:08] atomical: i didn't see it
[20:08:17] arescorpio: has joined #ruby
[20:08:35] Mon_Ouie: No one saw the apology because it wasn't sent to us
[20:09:08] leitz: It was at the :57 mark, right after the spam.
[20:09:20] leitz: Odd it didn't come through.
[20:09:24] Mon_Ouie: Your client probably throttled the amount of messages that it actually sent to avoid getting killed for spam, that's what happens when you try sending many messages at once
[20:09:27] Thaxll: I have a realy weird problem it's related to puppet + passenger on Centos 7, I got that error first: http://pastebin.com/EjDAqMV1 for some reason it can't execute hostname and env
[20:09:27] mg^: I'm pretty sure that either your client or the IRC server was rate limiting you
[20:09:28] ruboto: Thaxll, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/0ce88c18cb15bd1e2834
[20:09:28] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[20:09:28] darix: shevy: irssi actually asks before sending more than 5 lines
[20:09:39] matp: has joined #ruby
[20:10:03] shevy: I can try to test that!!!
[20:10:10] yoongkang: has joined #ruby
[20:10:11] subscope: has joined #ruby
[20:10:12] shevy: I don't actually remember, it was a long time ago
[20:10:40] ht__: has joined #ruby
[20:10:42] Thaxll: hostname and env are available to all users after doing some strace() on passenger process I found that it was trying to execute those commands with the wrong path
[20:10:54] leitz: Interesting. My client shows the entire mess.
[20:11:22] Mon_Ouie: The last message I saw before muting you was "key_to_edit = STDIN.gets.chomp", FYI
[20:11:51] moei: has joined #ruby
[20:11:55] Mon_Ouie: Anyway feel free to paste in a link to your code if you want us to actually answer your question :p
[20:12:01] leitz: Ah, okay, Mon_Quie,
[20:12:16] dhollinger: has joined #ruby
[20:12:44] nertzy2: has joined #ruby
[20:12:44] leitz: ACTION tests his paste first...
[20:12:48] Ilyes512: has joined #ruby
[20:13:16] riotjones: has joined #ruby
[20:13:18] leitz: https://gist.github.com/LeamHall/cebfd94450fb8a5a8beb
[20:14:22] sye: has joined #ruby
[20:14:29] mistermocha: has joined #ruby
[20:14:52] beanHolez: has joined #ruby
[20:14:58] Mon_Ouie: You should probably have a look at the list of methods in Hash, some of the things you implement are already available as methods on that class
[20:15:16] Mon_Ouie: For example, collecting an array with all the keys of a hash is simply hash.keys
[20:17:09] v0n: has joined #ruby
[20:18:18] mg^: For that matter, you also shouldn't rescue Exception. You should get as specific as possible, in this case a JSON::ParseError I believe.
[20:18:31] simplyianm: has joined #ruby
[20:18:40] jackjackdripper: has joined #ruby
[20:19:11] isjaylee1: has joined #ruby
[20:19:36] haxrbyte: has joined #ruby
[20:19:52] jetpackjoe: has joined #ruby
[20:20:02] leitz: Mon_Quie, thanks! I've made that change and eliminated the show_keys method.
[20:20:15] hohenfall: this is more of a stylistic choice I guess, but you may want to consider putting this functionality into a class instead of using global variables
[20:20:25] Renich: has joined #ruby
[20:20:41] ht__: has joined #ruby
[20:20:41] leitz: mg^, I'm still learning to use Exceptions, lemme go read up on JSON::ParseError.
[20:21:17] mg^: The main thing is that you want to rescue things you expect, so that unexpected things don't cause mystery errors.
[20:21:33] leitz: hohenfall, I'm even worse at classes than I am at IRC. :) Still, your point is vaild and I'd really like to put this into a class.
[20:21:35] sye: has joined #ruby
[20:22:22] mg^: For example if you manage to delete require 'json', then JSON doesn't exist anymore, but your valid_json? simply starts to return false for everything
[20:23:10] mg^: and while in a small thing like this that's easy to spot, once you get into bigger things you'll tear your hair out and start shouting "BUT THAT IS VALID JSON!!!" at your monitor
[20:25:00] shevy: so this is how you lost your hair
[20:25:25] pwnd_nsfw: has joined #ruby
[20:26:04] al2o3-cr: has joined #ruby
[20:26:42] futilegames: has joined #ruby
[20:27:07] htmldrum: has joined #ruby
[20:27:25] mg^: I don't think I lost any that way, though in my early days transitioning from a lazy bash/perl programmer to a Ruby programmer, I certainly rescued more than my fair share of Exceptions :)
[20:28:09] sankaber: has joined #ruby
[20:30:35] baweaver: has joined #ruby
[20:30:51] skade: has joined #ruby
[20:31:33] shredding: has joined #ruby
[20:31:33] craysiii: has joined #ruby
[20:33:57] EminenceHC: has joined #ruby
[20:35:24] baweaver: has joined #ruby
[20:37:15] juddey: has joined #ruby
[20:39:06] benlovell: has joined #ruby
[20:40:03] roxtrongo: has joined #ruby
[20:41:06] dikaio: has joined #ruby
[20:41:37] lukaszes: has joined #ruby
[20:42:09] bkxd: has joined #ruby
[20:42:23] momomomomo: has joined #ruby
[20:42:42] ht__: has joined #ruby
[20:44:00] VeryBewitching: has joined #ruby
[20:46:14] TPBallbag: has joined #ruby
[20:46:30] jwaldrip: has joined #ruby
[20:48:04] howdoicomputer: has joined #ruby
[20:48:34] adac: has joined #ruby
[20:48:48] renderful: has joined #ruby
[20:50:03] lukaszes: has joined #ruby
[20:50:26] shevy: hello bery vewitching
[20:50:37] _stu_: has joined #ruby
[20:50:57] s2013: has joined #ruby
[20:52:31] moeabdol: has joined #ruby
[20:53:27] B1n4r10: has joined #ruby
[20:54:28] diegoaguilar: has joined #ruby
[20:55:07] baweaver: shevy: I can tell you have some reverseations about their name
[20:55:58] futilegames: has joined #ruby
[20:56:42] ht__: has joined #ruby
[20:57:36] shinnya: has joined #ruby
[20:57:48] isjaylee1: has left #ruby: ()
[20:58:43] TPBallbag: has joined #ruby
[20:59:23] Musashi007: has joined #ruby
[21:00:12] benlovell: has joined #ruby
[21:01:10] cdg: has joined #ruby
[21:01:40] leitz: ACTION crosses his fingers before pasting...
[21:01:44] leitz: https://gist.github.com/LeamHall/cebfd94450fb8a5a8beb
[21:02:17] leitz: I've started on some exceptions.
[21:03:59] bitri: has joined #ruby
[21:04:07] jwaldrip: has joined #ruby
[21:04:11] leitz: Still have a couple things to fix. There's no clean way to exit out before updating. Also, it assumes a two depth hash. Some of the ones I need to work on are one deep or more than two.
[21:06:26] newdan: leitz: your valid_json? method is real weird conceptually
[21:06:39] tubuliferous_: has joined #ruby
[21:07:50] newdan: leitz: Usually methods ending with ? return true/false, but yours returns [data, true] *or* raises a ParserError
[21:07:54] leitz: newdan, how so? It came from my errors editing json manually. vaild_json is mainly a way to ensure I'm actually using json.
[21:08:19] tubuliferous_: has joined #ruby
[21:08:35] leitz: The parser error is about half an hour old. I heard about it somewhere.
[21:08:46] leitz: The other bits, yeah, I see what you mean.
[21:08:49] newdan: newdan: I would name it maybe something like try_parse_json and have it return [data, true] or [nil, false]
[21:09:20] skweek: has joined #ruby
[21:10:03] leitz: What about the exception? That was mg^'s point, I thought. To show more than just "it broke".
[21:10:26] kies: has joined #ruby
[21:11:07] tomphp_: has joined #ruby
[21:12:01] newdan: leitz: Either let it propagate (meaning don't even bother rescue-ing it if you're just gonna raise it again), or handle it there
[21:12:59] newdan: leitz: Returning [data, true] in one case makes it seem like your method is *meant* to handle invalid data in the bad case, by doing something like returning [nil, false]. But instead it just raises a ParserError, which doesn't buy you anything over just calling JSON.parse directly instead of calling valid_json?
[21:13:44] rakm: has joined #ruby
[21:14:04] riotjones: has joined #ruby
[21:14:13] DoubleMalt: has joined #ruby
[21:14:14] newdan: In your calling code you still need to begin/rescue JSON::ParserError, so the question then is why use valid_json? instead of JSON.parse?
[21:15:00] leitz: Hmm...lemme go try that.
[21:15:01] s2013: has joined #ruby
[21:15:34] newdan: leitz: You don't seem to be handling the ParserError at the call site anyway. So you could probably just delete valid_json? altogether and use JSON.parse directly
[21:15:52] trosborn: has joined #ruby
[21:16:36] Musashi007_: has joined #ruby
[21:17:20] s2013: has joined #ruby
[21:20:29] mistermocha: has joined #ruby
[21:20:30] Scripore: has joined #ruby
[21:21:11] Scripore: has joined #ruby
[21:21:19] mistermocha: has joined #ruby
[21:21:38] leitz: Is there a way to get just a very short message on an exception"? The JSON::ParserErrror gives me an IRC paste worth of screen.
[21:21:44] EminenceHC: has joined #ruby
[21:21:57] leitz: I can do my own error, but wasn't sure if there's a more Ruby way to do it.
[21:22:01] Rollabunna: has joined #ruby
[21:22:23] shevy: you can do your own error?
[21:22:33] shevy: you should not be doing any errors!
[21:22:44] newdan: shevy: I think he means show an error to the user
[21:22:55] saddad: has joined #ruby
[21:23:19] leitz: I think I'm quite prficient at errors! Wanna see some code? :P
[21:24:02] newdan: leitz: Oh and I was mistaken when I said you weren't rescuing the error anyway. You are on line 54. So instead of outputting "bang" you can just, say, puts "Error: JSON is invalid"
[21:24:06] simplyianm: has joined #ruby
[21:24:41] al2o3-cr: has joined #ruby
[21:24:55] baweaver: has joined #ruby
[21:25:00] newdan: leitz: Although it's generally good to write to STDERR and return a nonzero status code to the OS. #abort does both of those
[21:25:33] newdan: leitz: So on line 55 you can do `abort "JSON is invalid"`
[21:25:36] nertzy2: has joined #ruby
[21:25:41] s2013: has joined #ruby
[21:25:47] ixti: has joined #ruby
[21:26:06] newdan: leitz: And since you don't use the exception object you might as well turn line 54 into just `rescue JSON::ParserError` (taking away the `=> bang` at the end)
[21:26:11] Icey: has joined #ruby
[21:26:23] ta: has joined #ruby
[21:26:45] momomomomo: has joined #ruby
[21:27:19] mg^: ALso get used to using single-quoted strings when you don't need interpolation, or someday Rubocop is going to come around and shoot you in the nethers
[21:28:44] rbowlby: has joined #ruby
[21:31:28] adaedra: Or just disable this warning, it's not really important
[21:31:50] ljarvis: yeah, fuck using single-quoted strings just because you dont need interpolation
[21:32:14] casadei: has joined #ruby
[21:34:02] Icey: has joined #ruby
[21:34:57] wilsonc91: has joined #ruby
[21:35:32] mg^: I'm kind of on board with it a bit, but mostly due to habit formed from using languages that are more fast and loose with interpolation
[21:36:12] Icey: has joined #ruby
[21:36:32] skweek: has joined #ruby
[21:37:25] mg^: e.g echo "That will cost $50" in bash
[21:37:30] amoeba_: has joined #ruby
[21:37:49] ta: has joined #ruby
[21:37:54] yfeldblum: has joined #ruby
[21:37:58] leitz: https://gist.github.com/LeamHall/f955cd23407970f42f1f#file-edit_json-rb-L14-L17
[21:38:17] idefine: has joined #ruby
[21:38:35] leitz: Tried to just use the Hash.keys option but it puts all the subkeys into one string as opposed to an array item each.
[21:38:46] leitz: Line 14 failed.
[21:39:09] mg^: You're concatenating when you use <<
[21:39:13] mg^: doesn't do what you expect
[21:39:59] Pumukel: has joined #ruby
[21:40:14] lukaszes: has joined #ruby
[21:40:18] leitz: Why doesn't L15-L17 do the same?
[21:40:43] mg^: well, your line 14 concatenates an array as a single element
[21:40:51] mg^: that is, it's an array nested in an array
[21:41:35] mg^: your 15-17 are concatenating individual keys, so that's getting what you want
[21:41:42] jpfuentes2: has joined #ruby
[21:42:31] momomomomo: has joined #ruby
[21:43:16] leitz: Okay, I'll stick with 15-17.
[21:43:19] DrShoggoth: has joined #ruby
[21:43:38] k3asd`: has joined #ruby
[21:44:18] Icey: has joined #ruby
[21:44:41] pwnd_nsfw: has joined #ruby
[21:44:43] leitz: I need to take a break and see if I can figure out the multi-level issue.
[21:45:14] mg^: After your break, read the docs on what Hash#keys does
[21:45:24] mg^: specifically what it returns
[21:45:49] newdan: leitz: Also don't be afraid to play around with small snippets and methods in irb/pry
[21:45:56] mg^: yeah pry is your friend
[21:48:57] EminenceHC: has joined #ruby
[21:49:50] EminenceHC: has joined #ruby
[21:49:51] zeroDivisible: has joined #ruby
[21:49:58] idefine: has joined #ruby
[21:50:27] sinkensabe: has joined #ruby
[21:51:01] Icey: has joined #ruby
[21:53:10] maddmaxx: has joined #ruby
[21:53:54] maikowblue: has joined #ruby
[21:56:25] Icey: has joined #ruby
[21:57:36] tenderlove: has joined #ruby
[21:59:58] kiki_lamb: Hey, I've noticed that when I use Object.send(:remove_const,blah) to undefine a class and then re-load, it's instances seemingly retain their old behaviour. Is there a way to have the instances adopt the behaviour of the reloaded class?
[22:00:32] s2013: has joined #ruby
[22:01:27] jetpackjoe: has joined #ruby
[22:01:43] Icey: has joined #ruby
[22:02:07] s2013: has joined #ruby
[22:02:41] chipotle_: has joined #ruby
[22:05:30] webopsx: has joined #ruby
[22:05:45] jottr: has joined #ruby
[22:05:56] idefine: has joined #ruby
[22:07:16] idefine: has joined #ruby
[22:08:12] aef: has joined #ruby
[22:08:22] EminenceHC: has joined #ruby
[22:10:03] s2013: has joined #ruby
[22:10:46] yoongkang: has joined #ruby
[22:10:47] fifi-v: has joined #ruby
[22:11:19] rgtk: has joined #ruby
[22:14:53] riotjones: has joined #ruby
[22:15:13] CloCkWeRX: has joined #ruby
[22:15:40] benlovell: has joined #ruby
[22:17:52] Rollabunna: has joined #ruby
[22:18:34] Melpaws: has joined #ruby
[22:19:04] Rollabunna: has joined #ruby
[22:19:57] Ox0dea: has joined #ruby
[22:20:05] moeabdol: has joined #ruby
[22:20:47] Ox0dea: kiki_lamb: Classes don't undergo garbage collection, so you'll almost certainly have to drop down to C or do some hackery with Fiddle to completely forget a class definition.
[22:21:14] TTilus: kiki_lamb: you are asking for changing object's class on the fly
[22:21:22] waxjar: has joined #ruby
[22:21:23] Axsuul: has joined #ruby
[22:21:37] TTilus: afaik it is not possible in pure ruby
[22:21:42] Ox0dea: TTilus: Fiddle.
[22:22:14] TTilus: ok, yes, with fiddle
[22:22:20] sgambino: has joined #ruby
[22:23:38] TTilus: i reserve the right to feel that fiddle isn't "pure ruby" ;)
[22:24:06] iTim: has joined #ruby
[22:24:36] Ox0dea: An artificial limitation at best.
[22:25:32] eam: why don't classes undergo garbage collection?
[22:25:33] DoubleMalt: has joined #ruby
[22:25:37] iTim: has left #ruby: ()
[22:25:56] Ox0dea: kiki_lamb: https://eval.in/471388
[22:26:47] Ox0dea: There's surely a way to do it without creating an instance of the new class, but the simplicity of this approach is nice.
[22:26:57] eam: Ox0dea: they look like they gc to me
[22:27:06] eam: loop { Class.new } is memory-stable
[22:27:58] TTilus: Ox0dea: why wouldn't classes gc?
[22:28:09] TTilus: afaik they do
[22:28:32] TTilus: it might be that at some point they didn't
[22:28:57] Ox0dea: It seems only anonymous classes get collected.
[22:29:23] Ox0dea: s/seems/is the case that/
[22:29:35] Ray`: I was trying to figure out how to use the equivalent of destructors in ruby classes
[22:29:42] Ray`: there is a way, it's not particularly clean though
[22:30:52] TTilus: hmm, does class become anonymous if you unbind the name with remove_const?
[22:31:13] Axsuul: has joined #ruby
[22:31:18] Ox0dea: It's still alive in ObjectSpace.
[22:31:20] TTilus: Ray`: define_finalizer?
[22:31:23] Ox0dea: eam, TTilus: https://eval.in/471392
[22:31:45] Ox0dea: On my machine, that prints C and a RangeError because the second has been recycled.
[22:31:56] moei: has joined #ruby
[22:31:59] Ox0dea: Not sure why the results are different on eval.in.
[22:32:20] TTilus: Ox0dea: object space, good point
[22:32:35] Ox0dea: >> ObjectSpace
[22:32:36] ruboto: Ox0dea # => ObjectSpace (https://eval.in/471393)
[22:33:11] Ox0dea: Even assigning the new class to a local instead of a constant prevents it being collected.
[22:34:03] Ox0dea: Does this mean we should try to use only anonymous classes?
[22:34:37] quazimodo: has joined #ruby
[22:34:50] Coldblackice: has joined #ruby
[22:36:29] TTilus: or that there should only exist a finite (and limited) set of classes during the lifetime of a process
[22:36:31] nettoweb: has joined #ruby
[22:36:43] benlovell: has joined #ruby
[22:36:58] s2013_: has joined #ruby
[22:37:09] TTilus: corollary: classes should be thought as static stuff
[22:38:36] Synthead: has joined #ruby
[22:39:55] baweaver: has joined #ruby
[22:40:15] TTilus: didn't rails dev mode used to leak classes just because of non-anonymous classes not being collected?
[22:40:25] kiki_lamb: Ox0dea: okay, so if I decide to actually try doing this i'll go with anon classes, then.
[22:40:53] kiki_lamb: Ox0dea: also, thanks, you always have really good answers to my perverse questions, heh.
[22:40:54] TTilus: kiki_lamb: if you need them to be collected, apparently you have to
[22:41:32] Ox0dea: kiki_lamb: How come? You're almost certainly approaching your problem the wrong way, but it's been demonstrated that it's quite easy to just swap a class in.
[22:41:37] waka: has joined #ruby
[22:41:42] Ox0dea: I suppose you'll want to use anonymous ones if you'll end up creating millions of 'em.
[22:42:01] Ox0dea: And you're welcome, of course. I quite enjoy the perverse questions. ^_^
[22:43:08] gizmore: has joined #ruby
[22:43:14] kiki_lamb: Ox0dea: this question's not immediately applicable to any particular problem I'm having, it's more just speculation at this point.
[22:43:16] pwnd_nsfw: has joined #ruby
[22:44:18] Ox0dea: I see. Well, the slightly saner way to juggle behavior is Module#prepend.
[22:44:57] Rollabunna: has joined #ruby
[22:45:17] neanderslob_: has joined #ruby
[22:45:40] Ox0dea: It's essentially redefinition, except you still have the option to "super down" into the old behavior.
[22:47:36] sanjayu: has joined #ruby
[22:47:39] kiki_lamb: hahah. you might recall, i'm working on that drum livecoding thing... so, I'm sitting there working on it, editing code in one pane and watching it's output scroll in another, hammering the save button in the text editor and then tabbing over to the other pane to start/stop my tool every minute or two to see the result of the changes I just made...
[22:48:08] kiki_lamb: soo, the thought had occured to me that i could save a lot of starting/stopping of the tool if I just made it undefine and reload half it's class structure on every clock tick. :P
[22:48:14] Can-ned_Food: has joined #ruby
[22:48:45] kiki_lamb: but apparently this is not that practical, and as that behaviour has no serious value in the finished product, it's not worth putting a lot of work into, I suppose.
[22:49:01] NeverTired: has joined #ruby
[22:49:20] Ox0dea: kiki_lamb: Why not practical? https://vimeo.com/36579366
[22:49:32] Ox0dea: Bret Victor is a visionary.
[22:50:09] trosborn: has joined #ruby
[22:51:00] kiki_lamb: Ox0dea: eh, I've already got enough weird fun things to implement for the end use without sinking a lot of time into writing things solely useful for my own use during development
[22:51:50] Ox0dea: kiki_lamb: Users and developers are mutually exclusive, you say? :P
[22:51:58] howdoicomputer: has joined #ruby
[22:51:59] kiki_lamb: i mean, really, in practical terms, i can basically get the effect i want on that front by setting my program to play 1 bar and then die and wrapping it in a bash while loop
[22:52:43] kiki_lamb: Ox0dea: well... clearly not very exclusive, given the nature of what i'm making in the first place
[22:53:24] Spaceghost|work: kiki_lamb: You could get a bit nutty and use something like guard?
[22:53:43] Ox0dea: Guard isn't nutty.
[22:53:56] maxz: has joined #ruby
[22:54:13] myztic: has joined #ruby
[22:55:34] kiki_lamb: spaceghost|work: hahah, I can only handle so many layers of nuttiness at once.
[22:55:45] Spaceghost|work: kiki_lamb: No, seriously, try it.
[22:56:21] Spaceghost|work: It is a nice fs watcher that can do different configurable things when fs events match what you specify.
[22:56:27] cornerma1: has joined #ruby
[22:56:33] Spaceghost|work: There's bunches of plugins available too.
[22:56:48] diegoaguilar: has joined #ruby
[22:57:08] kiki_lamb: if the goal is merely saving me some hammering of 'C-cC-c!!\n' in bash, a while loop suffices, and lets me focus all the nuttiness at the heart of my actual program, where it belongs.
[22:57:19] Oli``: has joined #ruby
[22:57:37] benlovell: has joined #ruby
[22:57:54] kiki_lamb: spaceghost|work: oh, sure, i'm definitely not saying it's bad. from a cursory glance, it looks like i could probably use this to reimplement the loader class I use to read this thing's input language more cleanly.
[22:58:14] Spaceghost|work: kiki_lamb: It'd give you new processes!
[22:58:20] kiki_lamb: but, for now, that component is working fine and I have a long list of fun and useful features to add elsewhere before revisiting it.
[22:58:26] Spaceghost|work: Use something like spring or a preloader too.
[22:59:17] karapetyan: has joined #ruby
[22:59:19] banister: has joined #ruby
[23:00:14] kiki_lamb: maybe someday, sure. one day the loader will be visited, and some of that stuff could probably be handy.
[23:00:55] zeroDivisible: has joined #ruby
[23:01:02] tkuchiki: has joined #ruby
[23:02:08] Ropeney: has joined #ruby
[23:02:33] Cache_Money: has joined #ruby
[23:02:50] Rollabunna: has joined #ruby
[23:04:21] Xeago: has joined #ruby
[23:04:31] Cache_Money: What should I change so that I write to a tab-separated file instead of a csv? https://gist.github.com/anonymous/0da192d0ba7a9ad0a748
[23:04:59] myztic: has joined #ruby
[23:04:59] kiki_lamb: right now though, i've got a full plate: more advanced loop manipulation features, MIDI CC events, 'multiplayer mode', nodes that evolve on their own over time and figuring out how to produce some event models based on more complex math, like geometry and physics simulations, are all currently higher on the list than tampering with the loader.
[23:05:17] gusTester: has joined #ruby
[23:05:43] sp4rrow: has joined #ruby
[23:06:22] shevy: you build a game?
[23:06:40] kiki_lamb: i've got some ideas for some genetic algorithm like behaviour to toy with too, once i've got the randomly mutating nodes
[23:06:43] kiki_lamb: shevy: nah, music tool
[23:07:13] gizmore: has joined #ruby
[23:07:16] Can-ned_Food: hi everybody! quick question: i can't find use of the word ???recipe??? outside Ruby, so it originated with it? synonym for script or is there a nuance i'm missing?
[23:07:17] EminenceHC: has joined #ruby
[23:07:43] adaedra: That's chef vocabulary, no?
[23:08:48] kiki_lamb: right now it basically just lets you write interesting drum beats a lot more quickly, but if I manage to implement all those features it should be able to do about 80% of the composition required to produce a fairly decent techno tune with little more than a gentle nudge.
[23:09:23] mg^: yeah that's a Chef thing
[23:09:30] Can-ned_Food: i thought so, but i've seen it on some generic ruby webpages.
[23:09:50] baweaver: has joined #ruby
[23:09:52] Can-ned_Food: guess it was a retroactive adoption there.
[23:09:54] mg^: well, I think there's been a longstanding use of the word "recipe" for "brief instructions" for a long time
[23:09:57] Ox0dea: Can-ned_Food: Just fluffy language, then.
[23:10:05] Can-ned_Food: cool beans, thanks all.
[23:10:15] mg^: I am sure you can find things like "here's a bash recipe for doing X"
[23:10:27] mg^: that pre-date Chef or even Ruby
[23:10:46] mg^: its just that your major search engine results are going to bury those pretty deep
[23:10:46] mary5030: has joined #ruby
[23:11:00] mjwhitta: has joined #ruby
[23:11:15] Ox0dea: From which we could reasonably conclude that it's simply not the right terminology.
[23:11:41] Scripore: has joined #ruby
[23:11:51] Cache_Money: Has anyone worked with writing to Tab-Seperated files before?
[23:12:15] zeroDivisible: has joined #ruby
[23:12:26] ruboto: Just ask your question, if anyone has or can, they will respond.
[23:12:37] CloCkWeRX: has joined #ruby
[23:12:38] ahmetkapikiran: has joined #ruby
[23:12:41] Can-ned_Food: Ox0dea i agree, it sounds too much like a human-user set of instructions
[23:12:43] Cache_Money: adaedra: I did above: What should I change so that I write to a tab-separated file instead of a csv? https://gist.github.com/anonymous/0da192d0ba7a9ad0a748
[23:13:41] stannard: has joined #ruby
[23:14:01] adaedra: Change the separator to the tab character?
[23:15:19] elcontrastador: has joined #ruby
[23:15:34] Cache_Money: adaedra: How would I do that? I tried https://gist.github.com/anonymous/be4dd2960709c8615954 but got an error
[23:15:42] riotjones: has joined #ruby
[23:15:50] Ox0dea: Cache_Money: CSV.open('foo', 'w', col_sep: "\t") { ... }
[23:16:25] pdoherty: has joined #ruby
[23:17:06] nofxx: has joined #ruby
[23:17:14] Cache_Money: OxOdea: Sweet, that worked. Thanks!
[23:17:16] exadeci: has joined #ruby
[23:17:26] djcp1: has joined #ruby
[23:17:27] Ox0dea: Cache_Money: Happy to help.
[23:17:36] yfeldblum: has joined #ruby
[23:18:16] Azure: has joined #ruby
[23:18:29] sepp2k: has joined #ruby
[23:20:53] smallpeen: has joined #ruby
[23:21:10] heinrich5991: has joined #ruby
[23:21:12] smallpeen: hello everyone what is a good way to find the middle value of an array?
[23:21:31] Ox0dea: smallpeen: Do you mean the median or the mode?
[23:21:46] Ox0dea: I'm phoning the authorities.
[23:21:53] smallpeen: the median means the middle number but if it's even you add up the two middle numbers and divide by 2
[23:22:20] mjwhitta: has joined #ruby
[23:22:20] Ox0dea: Well, look how smurt you are. Sounds like you have everything you need?
[23:22:37] smallpen: well i have no idea how to code it
[23:22:40] s2013: has joined #ruby
[23:22:44] Ox0dea: Use a keyboard.
[23:22:49] krz: has joined #ruby
[23:22:51] adaedra: *woop* *woop* here iz polis
[23:23:26] Ox0dea: I meant mean, not mode.
[23:25:38] smallpen: i mean median
[23:25:43] smallpen: the middle number if it's even
[23:26:00] komanda3: has joined #ruby
[23:26:05] Ray`: well, you have the size of the array
[23:26:06] Ox0dea: You mean the middle number if the number of elements is odd.
[23:26:19] smallpen: [1,2,3,4,5,6]
[23:26:21] Ray`: you also have functions to tell if it's odd or even
[23:26:32] Ox0dea: smallpen: What's the median there?
[23:26:33] Ray`: I mean, you can go from there
[23:26:47] lkba: has joined #ruby
[23:26:49] smallpen: Ox0dea: the median there is 3.5
[23:26:53] Ox0dea: smallpen: Yes, and in [1,2,3]?
[23:27:18] heinrich5991: has joined #ruby
[23:27:31] jpfuentes2: has joined #ruby
[23:27:32] smallpen: 2 + 3 is 5 and 5 / 2 is 2.5
[23:27:36] smallpen: can you not count?
[23:27:43] smallpen: why are there trolls in here?
[23:27:49] komanda3: https://github.com/eric1234/rack-legacy/blob/master/lib/rack/legacy/cgi.rb#L23-L28
[23:28:16] Ray`: smallpen: http://www.alcula.com/calculators/statistics/median/
[23:28:19] Ox0dea: Komanda: I suspect you have a question?
[23:28:27] komanda: i want to add an additional condition, the path shouldnt end with .css or .js
[23:28:29] Ox0dea: Ray`: I don't know why I fed it for so long, but please let it starve.
[23:28:34] idefine: has joined #ruby
[23:28:38] arthurix_: has joined #ruby
[23:28:42] Ray`: yeah good point
[23:28:49] komanda: Ox0dea: had to think about how i should formulate my question :')
[23:28:55] Can-ned_Food: speaking of starving
[23:28:57] smallpen: Ray`: that's exactly what i'm saying
[23:28:58] zenguy_pc: has joined #ruby
[23:28:59] Liothen: has joined #ruby
[23:29:03] banister: has joined #ruby
[23:29:05] Ox0dea: Komanda: Fair enough; are you wanting to monkey-patch this exact method, then?
[23:29:40] komanda: basically this is my config.ru
[23:29:42] komanda: https://github.com/eric1234/rack-legacy/blob/master/share/rack_legacy.ru
[23:30:01] s2013: has joined #ruby
[23:30:28] komanda: when i comment out "use Rack::Legacy::Cgi" it works fine with .js & .css files but obviously not with cgi files
[23:30:55] komanda: if i don't comment out that line, the cgi works fine but .js files & .css files throw errors
[23:31:14] komanda: https://github.com/eric1234/rack-legacy/blob/master/lib/rack/legacy/cgi.rb#L23-L28
[23:31:26] Ox0dea: Komanda: Adding `&& path !~ /\.(css|js)$/` should do the trick.
[23:31:45] solocshaw: has joined #ruby
[23:32:13] komanda: i'm completely new to ruby, i have located the cgi.rb on my harddrive
[23:32:26] Ox0dea: Komanda: You can just reopen the class and directly redefine the method. ^_^
[23:32:34] komanda: ok awesome
[23:33:03] Can-ned_Food: anyone here who contributed to tryruby.org ? i've caught a bug (and i'm going fishing)
[23:33:27] Ox0dea: Can-ned_Food: Are you sure?
[23:33:29] Liothen: has joined #ruby
[23:34:01] Can-ned_Food: yes, Ox0dea, but it's a small one. it inspects results, not input.
[23:34:19] Liothen: has joined #ruby
[23:34:54] komanda: Ox0dea: HOLY SHIT I HAVE IT WORKING
[23:35:13] nofxx1: has joined #ruby
[23:36:16] Can-ned_Food: Ox0dea: well, when it wants you to try the to_s method on an integer, then reverse it, i can prompt it to advance in the tutorial simply by reversing the string myself viz. "40".reverse ??? meh
[23:36:48] adaedra: bed << self
[23:36:56] SCHAAP137: has joined #ruby
[23:36:57] blue_deref: has joined #ruby
[23:36:58] Can-ned_Food: the cartoon characters are cute, though.
[23:37:01] Ox0dea: adaedra: The call is coming from inside the mattress!
[23:37:03] diegoviola: has joined #ruby
[23:37:43] Rollabunna: has joined #ruby
[23:37:57] Ox0dea: Can-ned_Food: You're right that it does do that, but it's really for the best; spending an inordinate amount of time parsing your input to determine if you're up to no good wouldn't make much sense.
[23:38:48] quazimodo: has joined #ruby
[23:39:06] Can-ned_Food: sure, that's why i appended the ???meh??? when i'd finished writing that. time for supper.
[23:39:19] Ox0dea: Don't you have to catch it first?
[23:39:22] Croves: has joined #ruby
[23:39:56] Can-ned_Food: bug -> minnow -> trout
[23:40:00] eam: what is "is your ruby interpreter running" alex
[23:40:15] baweaver: has joined #ruby
[23:41:05] lemur: has joined #ruby
[23:42:46] shadoi: has joined #ruby
[23:44:30] bb010g: has joined #ruby
[23:47:07] Cache_Money: has joined #ruby
[23:48:12] trosborn: has joined #ruby
[23:49:35] ohcibi: has joined #ruby
[23:49:54] jrvlima: has joined #ruby
[23:49:57] tlaxkit: has joined #ruby
[23:50:52] ismaelga: has joined #ruby
[23:51:24] krustykoder: has joined #ruby
[23:56:35] roxtrongo: has joined #ruby
[23:56:42] dnewkerk: has joined #ruby
[23:58:59] segmond: has joined #ruby
[23:59:24] yfeldblum: has joined #ruby