« Back to channel list

#ruby - 11 August 2015

« Back 1 day Forward 1 day »
[00:00:26] TheMysticWyvern: has joined #ruby
[00:00:33] Philipp__: has joined #ruby
[00:00:53] TheMysticWyvern: I'm having a slight issue with my Ruby. Whenever I try to run a Ruby file from the command prompt, it wants me to open it in an external program.
[00:01:41] TheMysticWyvern: I do have Ruby installed.
[00:02:37] shevy: jtdoncas lol yeah, even goes with one arm too \o - pontiki loves the one-armed variant
[00:03:23] jtdoncas: haha, I love it
[00:03:42] jtdoncas: TheMysticWyvern: what are you entering exactly? What OS?
[00:04:13] shevy: sounds like windows
[00:04:35] TheMysticWyvern: jtdoncas: I'm doing "cd C:\Ruby" which is where my .rb files are saved to. Then, I type in "methods.rb," and it opens up the prompt to select an external program. I'm using Windows 10 64-bit.
[00:05:02] zenspider: why is it always windows?
[00:05:09] TheMysticWyvern: Back when I first installed Ruby, I don't recall it ever doing this.
[00:05:11] jtdoncas: ehhhhhh, windows :(
[00:05:24] TheMysticWyvern: But, I took a months' hiatus from it, and now it's all weird.
[00:05:33] BraddPitt: software dev on windows is a huge pain in the ass
[00:05:34] djstorm: has joined #ruby
[00:05:47] jtdoncas: TheMysticWyvern: aren't you supposed to type: "ruby methods.rb"
[00:06:23] BraddPitt: (assuming ruby is in your $PATH variable)
[00:06:36] Alayde: has joined #ruby
[00:06:41] TheMysticWyvern: jtdoncas: ...Yes, yes I am. I can't believe I didn't remember that. I feel a tad foolish now, even though I am new to Ruby.
[00:06:49] zenspider: and/or somehow associate ".rb" with ruby. ass-backwards if you ask me
[00:06:59] jtdoncas: :D hehe, nice!
[00:07:05] Azure: has joined #ruby
[00:07:26] TheMysticWyvern: jtdoncas: Thanks for the assist, mate.
[00:07:36] r_baron: has joined #ruby
[00:07:40] baweaver: has joined #ruby
[00:07:46] jtdoncas: TheMysticWyvern: np, have fun
[00:07:52] zenspider: something something registry something
[00:08:31] charliesome: has joined #ruby
[00:09:54] M-Technic: has joined #ruby
[00:10:36] mhenrixon: has joined #ruby
[00:10:42] omegamike: has joined #ruby
[00:11:42] shinnya: has joined #ruby
[00:11:47] Musashi007: has joined #ruby
[00:11:58] kies: has joined #ruby
[00:15:16] jbw_: has joined #ruby
[00:15:53] mistermocha: has joined #ruby
[00:17:03] Mojo_Nixon: has joined #ruby
[00:18:01] hashrocket: has joined #ruby
[00:21:28] bronson: has joined #ruby
[00:21:55] jbwiv: has joined #ruby
[00:25:38] casadei: has joined #ruby
[00:26:31] bruno-: has joined #ruby
[00:28:03] Inside: has joined #ruby
[00:29:02] Feyn: has joined #ruby
[00:29:15] paulcsmith: has joined #ruby
[00:29:38] hotpancakes: has joined #ruby
[00:32:30] rickmasta: has joined #ruby
[00:32:51] burgestrand: has joined #ruby
[00:34:54] sevenseacat: has joined #ruby
[00:39:04] Oog: has joined #ruby
[00:41:19] icedp: has joined #ruby
[00:41:28] workmad3: has joined #ruby
[00:43:04] charliesome: has joined #ruby
[00:43:43] djstorm: has joined #ruby
[00:44:47] josh1: has joined #ruby
[00:45:50] dr3w: has joined #ruby
[00:47:41] prateekp: has joined #ruby
[00:47:54] prateekp: i am trying to use yardoc for documnetation
[00:48:03] prateekp: but it has frameset in its templates
[00:48:37] prateekp: how can i get the same templates as http://www.rubydoc.info/github/tubbo/hibachi/master i.e rubydocinfo which uses iframe
[00:50:55] prateekp: any insights
[00:51:31] ellisTAA: has joined #ruby
[00:51:54] howdoi: has joined #ruby
[00:55:27] havenwood: has joined #ruby
[00:55:36] ellisTAA: has joined #ruby
[00:58:01] avitzurel: has joined #ruby
[00:59:09] devoldmx: has joined #ruby
[00:59:50] shevy: the document on the right is probably a markdown .md file
[01:00:04] shevy: and I would assume that yard may generate the navigation box on the right
[01:00:14] shevy: the old rdoc thing used to use iframes I think
[01:01:30] RegulationD: has joined #ruby
[01:02:07] lwu: has joined #ruby
[01:04:49] millerti: has joined #ruby
[01:04:54] tkuchiki: has joined #ruby
[01:05:11] jamto11: has joined #ruby
[01:05:35] dr3w: has joined #ruby
[01:09:41] blue_deref: has joined #ruby
[01:10:17] havenwood: has joined #ruby
[01:11:00] rehat: has joined #ruby
[01:18:11] jcdesimp: has joined #ruby
[01:19:23] michaeldeol: has joined #ruby
[01:20:17] hashrocket: has joined #ruby
[01:22:13] Musashi007: has joined #ruby
[01:22:22] al2o3-cr1: has joined #ruby
[01:23:43] pauly_oc: has joined #ruby
[01:24:21] millerti: has joined #ruby
[01:26:32] shevy: hmm anyone give me a hand ... sha256
[01:26:42] shevy: something like sha256='ca5c3e3c0e4f9e43b9dceafceb866acb1ea575cb9f2d94e0d959303e4fc4e602' for a package
[01:26:49] shevy: I could find out that number via ruby too?
[01:27:07] shevy: (reason I ask - I want to target some bash shell script, and one entry is this sha256 thingy)
[01:29:29] Frem: has joined #ruby
[01:29:45] hotpancakes: has joined #ruby
[01:29:59] lampshades: has joined #ruby
[01:30:28] lampshades: has joined #ruby
[01:30:48] christiandsg: has joined #ruby
[01:32:19] millerti: has joined #ruby
[01:33:14] allcentury: has joined #ruby
[01:33:18] arescorpio: has joined #ruby
[01:34:21] lampshades: has joined #ruby
[01:36:55] pietr0: has joined #ruby
[01:38:28] juanca_: has joined #ruby
[01:38:44] hj2007: has joined #ruby
[01:38:51] Suzeanne: has joined #ruby
[01:38:52] sepp2k: has joined #ruby
[01:40:28] kies: has joined #ruby
[01:40:48] jamto11: has joined #ruby
[01:41:13] avitzurel: has joined #ruby
[01:41:56] rbennacer: has joined #ruby
[01:42:44] tectonic: has joined #ruby
[01:45:55] basmoura: has joined #ruby
[01:49:02] tvw: has joined #ruby
[01:49:15] Vile`: has joined #ruby
[01:53:56] Lildirt: has joined #ruby
[01:54:20] Muhannad: has joined #ruby
[01:57:27] existensil: has joined #ruby
[01:58:05] Oog: has joined #ruby
[01:59:53] devoldmx: has joined #ruby
[02:00:17] shred45: has joined #ruby
[02:03:29] phutchins1: has joined #ruby
[02:03:37] baroquebobcat: has joined #ruby
[02:06:20] ramfjord: has joined #ruby
[02:06:41] weemsledeux: has joined #ruby
[02:07:00] [H]unt3r: has joined #ruby
[02:07:00] Musashi007: has joined #ruby
[02:07:44] sdwrage: has joined #ruby
[02:09:09] willywos: has joined #ruby
[02:11:36] dr3w: has joined #ruby
[02:13:59] KnowledgeOwl: has joined #ruby
[02:17:54] symm-: has joined #ruby
[02:18:32] njr: has joined #ruby
[02:20:52] rgb-one: has joined #ruby
[02:20:52] ChanServ: -b BotchlaOffUrself!*@*
[02:22:17] mistermocha: has joined #ruby
[02:23:40] lwu_: has joined #ruby
[02:25:11] joelataylor: has joined #ruby
[02:25:42] lwu: has joined #ruby
[02:26:36] Vile`: has joined #ruby
[02:27:43] mary5030: has joined #ruby
[02:29:25] rbennacer: has joined #ruby
[02:29:42] hotpancakes: has joined #ruby
[02:30:11] workmad3: has joined #ruby
[02:34:23] michael_mbp: has joined #ruby
[02:34:28] bmurt: has joined #ruby
[02:35:09] tkuchiki: has joined #ruby
[02:37:29] bruno-: has joined #ruby
[02:38:19] dopie: has joined #ruby
[02:40:15] christiandsg: has joined #ruby
[02:42:30] darkf: has joined #ruby
[02:42:42] Maletor: has joined #ruby
[02:44:56] Channel6: has joined #ruby
[02:45:13] fedexo: has joined #ruby
[02:45:31] kies: has joined #ruby
[02:47:53] zenguy_pc: has joined #ruby
[02:49:25] baweaver: has joined #ruby
[02:50:03] crdpink2: has joined #ruby
[02:50:43] RegulationD: has joined #ruby
[02:50:45] tmtwd: has joined #ruby
[02:51:41] zenguy_pc: has joined #ruby
[02:54:44] hays: what would be a reasonable way to create a persistent connection and then have non-blocking ways to talk over it?
[02:54:45] dopie: has joined #ruby
[02:54:55] tubuliferous_: has joined #ruby
[02:54:55] hays: this library in particular... https://github.com/flipback/rmodbus
[02:57:52] arooni-mobile: has joined #ruby
[02:58:03] dgutierrez1287: has joined #ruby
[02:58:18] hays: is that something that can be done with a yield?
[02:58:55] cscheib: for anyone around while I was complaining about homebrew/boxen/ruby json-1.8.2 on OSX El Capitan public beta... turns out that XCode is at 6.4, but the cli tools are at a higher version... you need the CLI tools (and possibly remove Xcode, that's what I did)
[03:00:25] tjbiddle: has joined #ruby
[03:02:21] bazbing80: has joined #ruby
[03:02:34] dimasg: has joined #ruby
[03:02:38] maletor_: has joined #ruby
[03:02:46] kristofferR: has joined #ruby
[03:03:03] dr3w: has joined #ruby
[03:03:52] maletor__: has joined #ruby
[03:04:37] bazbing80: do you include your compiled .gem in your develop branch? Or do you ignore it? Your gems are stored on rubygems / private server so why also version control them? It would be no worry having them in git as well, what's the best practise?
[03:05:04] toretore: hays: a thread
[03:05:46] hays: is it as simple as @cl=TCPClient.connect('127.0.0.1' 502); @slave=cl.with_slave(1) and then have methods that use methods in the slave object?
[03:06:52] al2o3-cr1: has joined #ruby
[03:06:53] Oog: has joined #ruby
[03:08:33] hays: toretore: can I give two threads the same object and it will play nicely?
[03:08:46] toretore: probably not
[03:09:28] hays: not sure how to deal with that
[03:09:37] braincrash: has joined #ruby
[03:10:02] al2o3-cr: has joined #ruby
[03:10:17] hays: what can i assume is atomic in ruby
[03:10:26] bronson: has joined #ruby
[03:10:43] Kwhy: has joined #ruby
[03:11:16] cabreraM516: has joined #ruby
[03:13:54] Kwhy: has joined #ruby
[03:13:57] hays: hmm maybe i need a semaphore
[03:15:05] Oog: has joined #ruby
[03:18:08] shevy: bazbing80 after I publish a .gem, I remove it again. There is no point in retaining it because I can rebuild it since I have a .gemspec file; however had, when I publish an updated version, I also push a copy of the .gem to a remote ftp site, just in case anyone else wants to have an older .gem
[03:18:19] shevy: (remove it again locally that is)
[03:21:14] yh: has joined #ruby
[03:22:51] j4cknewt: has joined #ruby
[03:23:08] kies: has joined #ruby
[03:23:37] hololeap: has joined #ruby
[03:24:05] mistermocha: has joined #ruby
[03:25:29] Kwhy: has joined #ruby
[03:26:28] ellisTAA: has joined #ruby
[03:26:42] user1138: has joined #ruby
[03:26:45] icebourg: has joined #ruby
[03:27:37] devbug: has joined #ruby
[03:28:46] auzty: has joined #ruby
[03:28:48] Kwhy: has joined #ruby
[03:29:38] hotpancakes: has joined #ruby
[03:31:24] Kwhy: has joined #ruby
[03:31:41] saddad: has joined #ruby
[03:33:14] Kwhy: has joined #ruby
[03:35:21] wallerdev: has joined #ruby
[03:36:03] dopie: has joined #ruby
[03:36:12] Yiota: has joined #ruby
[03:42:31] Kwhy: has joined #ruby
[03:42:39] dopie: has joined #ruby
[03:43:30] tjbiddle: has joined #ruby
[03:44:32] kies: has joined #ruby
[03:45:07] Kwhy_Not: has joined #ruby
[03:50:53] christiandsg: has joined #ruby
[03:51:35] v0n: has joined #ruby
[03:52:18] Oog: has joined #ruby
[03:54:24] nux443: has joined #ruby
[03:55:05] deepu: has joined #ruby
[03:56:12] NsOmNiAc: has joined #ruby
[03:59:04] Meow-J: has joined #ruby
[04:00:30] michaeldeol: has joined #ruby
[04:00:39] devoldmx: has joined #ruby
[04:02:53] whiteline: has joined #ruby
[04:04:46] gix: has joined #ruby
[04:05:02] jbw_: has joined #ruby
[04:08:08] devoldmx: has joined #ruby
[04:13:09] devoldmx: has joined #ruby
[04:14:03] ascarter: has joined #ruby
[04:14:55] ivanskie: has joined #ruby
[04:17:31] vdamewood: has joined #ruby
[04:17:55] nahtnam: has joined #ruby
[04:18:57] workmad3: has joined #ruby
[04:21:34] Oog: has joined #ruby
[04:23:33] deepu: has joined #ruby
[04:24:16] rehat: has joined #ruby
[04:26:09] n_blownapart: has joined #ruby
[04:27:38] halcyone3: has joined #ruby
[04:30:23] khebbie: has joined #ruby
[04:30:52] hotpancakes: has joined #ruby
[04:31:07] mistermocha: has joined #ruby
[04:32:08] deepu: has joined #ruby
[04:33:39] jbwiv: has joined #ruby
[04:34:27] ndrei: has joined #ruby
[04:35:01] crdpink: has joined #ruby
[04:37:35] deepu: has joined #ruby
[04:37:49] jackjackdripper: has joined #ruby
[04:40:19] Butch128: has joined #ruby
[04:40:27] kp666: has joined #ruby
[04:41:22] yfeldblum: has joined #ruby
[04:43:10] tubuliferous_: has joined #ruby
[04:43:17] martinium: has joined #ruby
[04:43:25] CloCkWeRX: has joined #ruby
[04:44:29] hotpancakes: has joined #ruby
[04:45:26] devoldmx: has joined #ruby
[04:45:48] christiandsg: has joined #ruby
[04:46:02] jamto11: has joined #ruby
[04:46:16] youngbaks: has joined #ruby
[04:46:55] Butch128: has left #ruby: ()
[04:47:41] Mendenhall: has joined #ruby
[04:48:27] ascarter: has joined #ruby
[04:49:46] deepu: has joined #ruby
[04:50:13] devoldmx: has joined #ruby
[04:51:58] Inside: has joined #ruby
[04:51:58] Inside: has joined #ruby
[04:54:34] mclee: has joined #ruby
[04:58:15] ellisTAA: has joined #ruby
[04:59:51] kies: has joined #ruby
[05:00:31] pawnbox: has joined #ruby
[05:00:54] rehat: Just wondering if I should skip the last chapter of this ruby book. How important are callbacks, hooks, and runtime introspection?
[05:01:52] last_staff: has joined #ruby
[05:03:53] havenwood: has joined #ruby
[05:06:06] ramfjord: has joined #ruby
[05:06:50] hotpancakes: has joined #ruby
[05:07:45] Ropeney: rehat: All the importance!
[05:15:24] riotjones: has joined #ruby
[05:16:24] riotjones: has joined #ruby
[05:17:31] fedexo: has joined #ruby
[05:17:34] yardenbar: has joined #ruby
[05:18:52] dhjondoh: has joined #ruby
[05:19:25] yardenbar: has joined #ruby
[05:19:36] crdpink2: has joined #ruby
[05:24:40] TomyLobo: has joined #ruby
[05:25:08] christiandsg: has joined #ruby
[05:25:28] aganov: has joined #ruby
[05:25:48] astrobunny: has joined #ruby
[05:26:12] Guest32: has joined #ruby
[05:29:59] h4ckurate: has joined #ruby
[05:30:50] Chau: has joined #ruby
[05:33:18] astrobun_: has joined #ruby
[05:35:38] mistermocha: has joined #ruby
[05:37:48] ferhaty: has joined #ruby
[05:39:12] ascarter: has joined #ruby
[05:39:46] Liam`: has joined #ruby
[05:40:48] DanielI: has joined #ruby
[05:41:34] sbhatore: has joined #ruby
[05:43:58] sbhatore: has joined #ruby
[05:44:08] crdpink: has joined #ruby
[05:46:45] khebbie: has joined #ruby
[05:48:53] Mendenhall: has joined #ruby
[05:50:09] sbhatore: has joined #ruby
[05:50:56] lxsameer: has joined #ruby
[05:51:18] TinkerTyper: has joined #ruby
[06:00:09] rht: has joined #ruby
[06:00:30] RegulationD: has joined #ruby
[06:01:22] Radar: rehat: which book?
[06:02:30] astrobunny: has joined #ruby
[06:02:48] howdoi: has joined #ruby
[06:03:06] sbhatore: has joined #ruby
[06:05:39] roolo: has joined #ruby
[06:06:09] sepp2k: has joined #ruby
[06:07:43] workmad3: has joined #ruby
[06:07:45] devoldmx: has joined #ruby
[06:12:04] claptor: has joined #ruby
[06:13:33] rushed: has joined #ruby
[06:16:40] coban2k: has joined #ruby
[06:17:53] bluOxigen: has joined #ruby
[06:21:23] blueOxigen: has joined #ruby
[06:24:25] khebbie: has joined #ruby
[06:25:52] jsaak: has joined #ruby
[06:28:07] khebbie: has joined #ruby
[06:28:14] halcyone3: has joined #ruby
[06:28:54] hololeap: has joined #ruby
[06:30:31] rehat: Radar: The Well-Grounded Rubyist
[06:30:43] Radar: rehat: Yeah read all of it otherwise you will only be partially grounded
[06:31:19] tubuliferous_: has joined #ruby
[06:31:24] niemcu: has joined #ruby
[06:37:06] mistermocha: has joined #ruby
[06:37:43] swgillespie: has joined #ruby
[06:38:08] krz: has joined #ruby
[06:38:13] Macaveli: has joined #ruby
[06:38:54] pawnbox: has joined #ruby
[06:40:11] pawnbox: has joined #ruby
[06:40:46] crdpink2: has joined #ruby
[06:40:54] michael_mbp: has joined #ruby
[06:41:05] Muhannad: has joined #ruby
[06:41:22] bruno-: has joined #ruby
[06:44:24] KnowledgeOwl: has joined #ruby
[06:46:26] KnowledgeOwl: has joined #ruby
[06:46:35] alayek: has joined #ruby
[06:47:21] pawnbox: has joined #ruby
[06:47:23] alayek: hey guys, I am new to Ruby. I was doing some ruby practice from the test-first series, and I am stuck at a problem.
[06:47:27] KnowledgeOwl: has joined #ruby
[06:47:48] astrobunny: has joined #ruby
[06:48:04] alayek: It's to do with a method that takes a key and a value; and sets a dictionary entry based on that.
[06:48:20] alayek: I tried a lot of different syntax, but could not get it right
[06:49:12] Shoutsid: has joined #ruby
[06:49:24] KnowledgeOwl: has joined #ruby
[06:50:00] alayek: bnagy: ok, but how do I pass k and v in the function?
[06:50:12] rdark: has joined #ruby
[06:50:22] Violentr: has joined #ruby
[06:50:26] CloCkWeRX: has joined #ruby
[06:50:32] pawnbox: def set_dictionary(k, v)
[06:50:40] alayek: Here's how I am currently doing it
[06:50:52] alayek: def add(key, value=nil)
[06:50:53] jph98: has joined #ruby
[06:51:04] jph98: has left #ruby: ()
[06:51:05] alayek: @entries[key] = value
[06:51:28] alayek: Yeah, but the test case provided, is calling the method like this
[06:51:33] tjbiddle: has joined #ruby
[06:51:44] bnagy: don't paste code in the channel
[06:51:46] tkuchiki: has joined #ruby
[06:51:59] Obfuscate: What's the least convoluted way to compact an array which naively represents a multiset e.g. [[1,a],[1,b],[1,c],[2,d],[2,e]] into [[1,[a,b,c]],[2,[d,e]]]?
[06:52:00] rdark: has joined #ruby
[06:52:09] alayek: @d.add('fish', 'aquatic animal')
[06:52:11] Oog: has joined #ruby
[06:52:12] alayek: @d.entries.should == {'fish' => 'aquatic animal'}
[06:52:17] bnagy: Obfuscate: group_by ?
[06:52:47] Obfuscate: bnagy: Perfect. Thanks. :)
[06:54:11] bnagy: >> [[1,:a],[1,:b],[1,:c],[2,:d],[2,:e]].group_by(&:first).map {|k,v| [k,v.map(&:last)]}
[06:54:12] ruboto: bnagy # => [[1, [:a, :b, :c]], [2, [:d, :e]]] (https://eval.in/415073)
[06:54:25] bnagy: possibly a little squirrely, but, uh, short :)
[06:57:23] therod: has joined #ruby
[06:57:34] therod: has left #ruby: ()
[06:57:42] norc: has joined #ruby
[06:58:26] KnowledgeOwl: has joined #ruby
[06:58:45] alayek: has joined #ruby
[06:59:32] Obfuscate: I've seen more terrible things. It does the trick.
[06:59:33] Cust0sLim3n: has joined #ruby
[07:01:02] apeiros: toretore: ping - around? are you still maintaining semacode?
[07:01:19] terlar: has joined #ruby
[07:01:33] tomphp_: has joined #ruby
[07:01:35] greenarrow: has joined #ruby
[07:02:08] cheeti: has joined #ruby
[07:02:27] alayek: Hey guys, here's my code: https://gist.github.com/anonymous/e913129eab146175fb72
[07:02:35] Hanmac: Objhm is that multiset-array already sorted?
[07:02:44] Hanmac: i mean Obfuscate
[07:02:47] alayek: When I run the test cases using rspec, I get failure
[07:02:58] yfeldblum: has joined #ruby
[07:03:08] andersh: has joined #ruby
[07:03:16] pawnbox: has joined #ruby
[07:03:37] bnagy: ?guys alayek
[07:03:37] ruboto: alayek, You probably don't mean to exclude, but not everyone relates to being "one of the guys". Maybe consider using "folks", "y'all" or "everyone" instead?
[07:03:47] norc: How does Ruby decide what encoding is used for strings?
[07:04:03] alayek: Ok, sorry, umm...English is not my native tongue
[07:04:27] bnagy: alayek: what error are you getting? (I see your bug, but so should you, from the error)
[07:04:27] Obfuscate: hanmac: Negative, although efficiency isn't a concern for this.
[07:04:33] Hanmac: alayek: entries is not available, you need attr_reader :entries
[07:04:44] alayek: I am getting this error when I run rake from terminal
[07:04:46] bnagy: or you know hanmac could just do your homework for you :)
[07:04:57] norc: I mean, I have a library that suddenly changes its internal encoding when its called from Rails magic. So Im trying to understand the mechanisms that Ruby uses that could possibly cause this.
[07:04:59] Hanmac: Obfuscate: ok i though i could use chunk, but that didnt work as i wanted
[07:05:12] alayek: expected: {'fish' => 'aquatic animal'}
[07:05:19] bnagy: norc: it's a bit weird. There are magic encoding comments.
[07:05:35] alayek: got: {{'fish' => 'aquatic animal'} => nil}
[07:05:48] Timba-as: has joined #ruby
[07:05:56] apeiros: bnagy: those only concern literals in code
[07:05:58] andersh: has joined #ruby
[07:06:01] ljarvis: alayek: now show us the rest of your code you're hiding
[07:06:10] Hanmac: alayek: @d.add('fish' => 'aquatic animal') need to be changed to @d.add('fish', 'aquatic animal')
[07:06:22] gwl_: has joined #ruby
[07:06:24] apeiros: norc: for input, Encoding.default_external and .default_internal are relevant
[07:06:31] Stan: has joined #ruby
[07:06:40] alayek: hmm....I figured that; but that's in the test case given in the test-first series I cloned from github
[07:06:55] towski_: has joined #ruby
[07:07:49] Obfuscate: hanmac: The group_by solution works well enough and it's only needed to generate a static table, so I think I'll leave it at that for now. Thanks though.
[07:08:30] devoldmx: has joined #ruby
[07:08:36] norc: apeiros: They are both Encoding:UTF-8 at all times. But when called from Rails strings with special characters get encoded with ASCII-8BIT (it does not happen when I call the function with the same data myself)
[07:08:54] norc: Though.. by input I suppose you meant STDIN
[07:09:11] gwl_: has left #ruby: ()
[07:09:17] andersh: has joined #ruby
[07:09:17] apeiros: norc: any IO, not just stdin.
[07:09:36] apeiros: and a strings encoding is determined by its .encoding value
[07:09:49] alayek: Anyway, my question was if the add function is going to be invoked like that : add('a' => 'b'); how should I write the body of add function to get desired output
[07:09:55] DeweyD: has joined #ruby
[07:09:57] apeiros: which is set when the string is created. how it is created defines from where ruby takes the initial value.
[07:10:06] hotpancakes: has joined #ruby
[07:10:29] norc: apeiros: So if Savon decided to set the encoding of that particular string to ASCII-8BIT, I should take a closer look at Savon?
[07:11:06] apeiros: how do you figure that savon "decides"? how do you figure that savon sets the encoding? what's your methodology to determine those things?
[07:11:16] solars: has joined #ruby
[07:11:25] KnowledgeOwl: has joined #ruby
[07:11:30] norc: apeiros: It was just hypothetical.
[07:11:45] norc: Im trying to understand what I need to look for.
[07:11:49] startupality: has joined #ruby
[07:11:50] bnagy: alayek: add doesn't take a key and a value (as you were saying above)
[07:12:07] bnagy: it takes a hash. So write it as def add hsh and go from there
[07:12:19] bnagy: hint ri Hash#merge
[07:12:20] alayek: ohh..cool
[07:12:30] alayek: Thanks, will try now and let you know
[07:14:01] sameerynho: has joined #ruby
[07:15:27] KnowledgeOwl: has joined #ruby
[07:15:45] norc: apeiros: You are right. Im just calling encode('utf-8', 'binary', :invalid => :replace, :undef => :replace, :replace => '') on the string before writing it to my log. Not sure whether that is a great idea, but it seems to solve the immediate issue at least.
[07:16:26] apeiros: norc: is your log supposed to be binary or utf-8?
[07:16:34] norc: apeiros: utf-8
[07:16:52] sinkensabe: has joined #ruby
[07:17:11] arup_r: has joined #ruby
[07:17:24] apeiros: then use .scrub
[07:17:46] apeiros: don't explicitly give a source encoding unless you know the string's .encoding is wrong.
[07:18:25] KnowledgeOwl: has joined #ruby
[07:19:15] startupality: has joined #ruby
[07:19:16] norc: apeiros: Since Im getting an ASCII_8BIT string to begin with, isnt that the wrong encoding?
[07:19:51] apeiros: norc: does the string's .encoding itself already say 'ascii-8bit'?
[07:20:14] norc: apeiros: If the string contains non-ascii characters yes, otherwise it says utf-8
[07:20:29] j4cknewt: has joined #ruby
[07:20:38] apeiros: then why do you provide 'binary' as the second param to .encode?
[07:21:26] KnowledgeOwl: has joined #ruby
[07:22:33] norc: apeiros: I suppose in my ignorance I just copy pasted the first snipped I found without looking at it, just to realize it somehow works... :(
[07:22:58] norc: At least Im honest about being silly.
[07:23:10] apeiros: norc: the second param of .encode gives the string's current encoding. if not provided, it is taken from string.encoding.
[07:23:27] apeiros: so unless string.encoding is expected to be wrong, you don't set it.
[07:23:39] apeiros: and if you expect it to be wrong, that's something to investigate.
[07:23:43] norc: Ah I see.
[07:24:27] troulouliou_div2: has joined #ruby
[07:25:23] KnowledgeOwl: has joined #ruby
[07:26:06] apeiros: and you setting it *always* to binary has a rather bad side effect - it'll remove *everything* which is beyond ascii:
[07:26:14] apeiros: >> "??".encode('utf-8', 'binary', :invalid => :replace, :undef => :replace, :replace => '')
[07:26:15] ruboto: apeiros # => "" (https://eval.in/415101)
[07:26:23] KnowledgeOwl: has joined #ruby
[07:27:08] apeiros: that's because only 0x00-0x7f in ascii-8bit are mapped to characters. all other bytes are just that - bytes. so it can't be translated to utf-8.
[07:27:23] KnowledgeOwl: has joined #ruby
[07:27:34] lxsameer_: has joined #ruby
[07:27:35] apeiros: you saying "that string is binary" strips ruby from the information to which characters some valid utf-8 byte sequences map to.
[07:28:43] yh_: has joined #ruby
[07:28:54] apeiros: norc: https://gist.github.com/apeiros/39acc5b486f932403638 - if you want to learn more. feedback welcome.
[07:30:09] norc: apeiros: Oh that is pretty neat. I have always gotten headaches wrapping my head around strings and encoding. I will surely take a look at that. :)
[07:30:23] KnowledgeOwl: has joined #ruby
[07:31:26] KnowledgeOwl: has joined #ruby
[07:32:20] haxrbyte: has joined #ruby
[07:34:15] k3asd`: has joined #ruby
[07:35:50] lampshades: has joined #ruby
[07:37:03] Meeh: has joined #ruby
[07:37:22] niemcu: has joined #ruby
[07:37:27] KnowledgeOwl: has joined #ruby
[07:38:15] Philipp__: has joined #ruby
[07:38:27] KnowledgeOwl: has joined #ruby
[07:39:05] linduxed: has joined #ruby
[07:41:27] KnowledgeOwl: has joined #ruby
[07:41:31] Iskarlar: has joined #ruby
[07:41:33] mistermocha: has joined #ruby
[07:41:48] araujo: has joined #ruby
[07:42:07] skade: has joined #ruby
[07:42:11] bruno-: has joined #ruby
[07:42:49] tomphp_: has joined #ruby
[07:43:04] adaedra: do you expand that to "grueezi"?
[07:43:49] apeiros: s/expand/transliterate/ - if you're a brute who doesn't have an adequate computer, yes :)
[07:44:09] apfeluser: has joined #ruby
[07:44:22] erowlin: has joined #ruby
[07:44:57] djbkd: has joined #ruby
[07:46:25] KnowledgeOwl: has joined #ruby
[07:48:27] KnowledgeOwl: has joined #ruby
[07:48:49] TheHodge: has joined #ruby
[07:49:24] norc: apeiros: Your "full-length article" points to a funny domain.
[07:50:07] apeiros: it's a placeholder
[07:50:18] pawnbox: has joined #ruby
[07:50:26] apeiros: example.com is the canonical example domain :)
[07:51:03] norc: apeiros: Hehe. Well, now that I read your article my problem makes even less sense.
[07:51:17] norc: Though I think I got a grasp on encoding in Ruby at least.
[07:51:27] KnowledgeOwl: has joined #ruby
[07:51:30] youngbaks: has joined #ruby
[07:53:28] KnowledgeOwl: has joined #ruby
[07:54:27] KnowledgeOwl: has joined #ruby
[07:54:37] norc: apeiros: Based on this article I would think that there is no difference between force_encode('utf-8') and encode('utf-8') if the string is already ASCII-8BIT encoded.
[07:54:59] matti: has joined #ruby
[07:55:06] apeiros: norc: there is. think of 0x80-0xff
[07:55:21] apeiros: with force-encode if your binary *actually is* utf-8, those will remain
[07:55:34] senayar: has joined #ruby
[07:55:47] apeiros: with encode it will tell you that it can't map those values.
[07:56:03] norc: apeiros: Im getting that exact issue - but with \xC3
[07:56:23] apeiros: yes, which is part of a sequence
[07:56:25] KnowledgeOwl: has joined #ruby
[07:56:28] workmad3: has joined #ruby
[07:56:44] Oog: has joined #ruby
[07:56:49] norc: apeiros: Can we assume for a second I didn't make that stupid remark?
[07:56:56] norc: Nice, that explains my behavior!
[07:57:25] _blizzy_: has joined #ruby
[07:57:43] Mia: has joined #ruby
[07:58:34] alex88: has joined #ruby
[07:58:58] adaedra: ????????????
[07:59:18] rdark: anyone recommend a gem for working with transferring relatively large files over http(s)?
[07:59:53] rdark: or is net::http still the gem de jure?
[08:00:04] adaedra: it's not a gem, it's stdlib
[08:00:36] rdark: apart from it being stdlib
[08:00:48] mikecmpbll: has joined #ruby
[08:02:24] KnowledgeOwl: has joined #ruby
[08:02:49] rdark: http seems pretty nice https://github.com/httprb/http
[08:03:38] troulouliou_div2: has joined #ruby
[08:03:46] troulouliou_div2: has joined #ruby
[08:04:05] ta: has joined #ruby
[08:04:28] KnowledgeOwl: has joined #ruby
[08:05:32] DexterLB: has joined #ruby
[08:05:46] platzhirsch: has joined #ruby
[08:06:26] KnowledgeOwl: has joined #ruby
[08:06:38] Renich: has joined #ruby
[08:07:25] KnowledgeOwl: has joined #ruby
[08:07:49] conor_: has joined #ruby
[08:08:15] joonty: has joined #ruby
[08:08:31] senayar: has joined #ruby
[08:09:26] krz: has joined #ruby
[08:09:51] adaedra: HTTP library is a personal choice I guess, there is no "best one"
[08:11:24] KnowledgeOwl: has joined #ruby
[08:11:51] rdark: adaedra: seems that net::http will do what I want to do anyway (streaming in chunks to a stringIO, that I can then stream to s3)
[08:12:00] norc: apeiros: Oh. Im beginning to get it. This is because this code point uses 2 bytes. What does Ruby try to do when the encoding is set to ascii-8bit and you use encode?
[08:13:25] KnowledgeOwl: has joined #ruby
[08:13:50] Pathfinder: has joined #ruby
[08:14:28] charliesome: has joined #ruby
[08:14:37] yh: has joined #ruby
[08:15:27] KnowledgeOwl: has joined #ruby
[08:15:37] cron: has joined #ruby
[08:16:19] Pupeno: has joined #ruby
[08:18:05] yfeldblum: has joined #ruby
[08:18:16] Cust0sLim3n: has joined #ruby
[08:18:44] Renich: has joined #ruby
[08:19:28] tubuliferous_: has joined #ruby
[08:21:24] KnowledgeOwl: has joined #ruby
[08:22:22] leafybasil: has joined #ruby
[08:23:26] KnowledgeOwl: has joined #ruby
[08:25:36] tomphp_: has joined #ruby
[08:27:01] startupality: has joined #ruby
[08:28:57] apeiros: norc: as said, encode maps characters. say "A" is 0x30 in the source encoding and 0x41 in the target encoding, then that means encode from source to target translates 0x30 to 0x41. and "A" will remain "A". same character, different bytes to represent it.
[08:29:42] apeiros: norc: but in binary, e.g. 0xC3 is not mapped to a character. if it's not mapped to a character, you can't translate the bytes to keep the character the same (because, as said, there is no character)
[08:30:05] apeiros: so ruby does the sensible thing and raises. it tells you that there's bytes in the string it can't translate.
[08:30:23] norc: apeiros: By which mapping fails Ruby to recognize the related character? Is it assuming a binary encoding of ascii?
[08:30:27] KnowledgeOwl: has joined #ruby
[08:31:07] apeiros: norc: it assumes nothing. you tell it the source encoding. String#encoding is the value it uses for the source (or the second arg passed to .encode)
[08:31:10] dumdedum: has joined #ruby
[08:31:40] apeiros: and ruby does not fail to recognize the character. the encoding *does not specify* a related character.
[08:31:54] norc: "But as the name insists, its characters in the range of ASCII are considered as ASCII characters"
[08:31:57] apeiros: ascii-8bit does *not have* characters in the 0x80-0xff range
[08:32:02] norc: Its all falling together now.
[08:32:12] apeiros: yes, the range of ascii characters is 0x00-0x7f
[08:32:18] apeiros: and those it can translate.
[08:32:30] apeiros: (from ascii to utf-8 even trivially - the bytes are the same there)
[08:33:50] norc: apeiros: Ah. Im guessing that is why utf-8 is called "downwards compatible" to ASCII?
[08:34:01] terlar: has joined #ruby
[08:34:07] norc: Because the bytes for the codepoints are the same for the characters defined by ASCII
[08:36:25] KnowledgeOwl: has joined #ruby
[08:36:34] norc: apeiros: So I understand why my force_encode solves this problem. Guess I have to figure out why some library down the stack changes the encoding to ASCII-8BIT when a non-ascii character is encountered - and more to the point why that only happens when Rails calls it.
[08:36:59] apeiros: yes @ ascii compatible. many encodings are ascii compatible (but not all! and that's important to know)
[08:37:09] norc: apeiros: Thank you for taking your time and explaining encoding basics to me.
[08:37:51] tvw: has joined #ruby
[08:38:45] casadei: has joined #ruby
[08:39:09] marr: has joined #ruby
[08:39:28] KnowledgeOwl: has joined #ruby
[08:40:14] norc: This makes me wish there was a Ruby debugger that supported reverse debugging.
[08:41:27] halcyone3: has joined #ruby
[08:44:00] yorickpeterse: reverse debugging?
[08:44:14] wnd: introducing bugs?
[08:44:27] bweston92: has joined #ruby
[08:44:39] quimrstorres: has joined #ruby
[08:45:52] norc: yorickpeterse: http://www.gnu.org/software/gdb/news/reversible.html
[08:45:54] leafybasil: has joined #ruby
[08:47:07] riotjones: has joined #ruby
[08:47:13] mrmist: has joined #ruby
[08:47:25] KnowledgeOwl: has joined #ruby
[08:47:30] erowlin: has joined #ruby
[08:48:51] sameerynho: has joined #ruby
[08:49:01] yeticry: has joined #ruby
[08:50:31] christophe971: has left #ruby: ()
[08:52:08] platzhirsch: has left #ruby: ()
[08:53:12] lxsameer: has joined #ruby
[08:53:12] lxsameer: has joined #ruby
[08:54:01] matcouto: has joined #ruby
[08:55:34] workmad3: has joined #ruby
[08:55:58] eGGsha: has joined #ruby
[08:56:32] pawnbox: has joined #ruby
[08:56:51] dumdedum: has joined #ruby
[08:58:31] dionysus69: has joined #ruby
[08:58:43] arup_r: has joined #ruby
[08:59:19] davedev24: has joined #ruby
[09:01:16] Vile`: has joined #ruby
[09:02:32] charliesome: has joined #ruby
[09:02:44] pawnbox: has joined #ruby
[09:03:40] bodgix: has joined #ruby
[09:04:59] DoubleMalt: has joined #ruby
[09:05:35] halcyone3: has joined #ruby
[09:07:53] dhjondoh: has joined #ruby
[09:09:16] devoldmx: has joined #ruby
[09:09:43] pawnbox: has joined #ruby
[09:12:52] symm-: has joined #ruby
[09:13:26] tonios57: has joined #ruby
[09:13:59] quimrstorres: has joined #ruby
[09:16:31] KnowledgeOwl: has joined #ruby
[09:17:33] yh: has joined #ruby
[09:19:33] thebastl: has joined #ruby
[09:19:43] Karpah: has joined #ruby
[09:19:47] Ropeney: has joined #ruby
[09:19:58] Cust0sLim3n: has joined #ruby
[09:23:56] sideshowcoder: has joined #ruby
[09:25:09] hotpancakes: has joined #ruby
[09:26:15] sbhatore: has joined #ruby
[09:27:39] startupality: has joined #ruby
[09:30:01] erowlin: has joined #ruby
[09:31:22] millerti: has joined #ruby
[09:32:19] oleksandriuzikov: has joined #ruby
[09:33:07] Amun-re: has joined #ruby
[09:33:08] eGGsha: has joined #ruby
[09:33:12] Amun-re: has left #ruby: ()
[09:33:27] KnowledgeOwl: has joined #ruby
[09:34:29] KnowledgeOwl: has joined #ruby
[09:34:31] joonty: has joined #ruby
[09:35:12] fella6s: has joined #ruby
[09:36:07] cornerma1: has joined #ruby
[09:36:27] radgeRayden: has joined #ruby
[09:37:20] hotpancakes: has joined #ruby
[09:38:29] KnowledgeOwl: has joined #ruby
[09:39:05] sameerynho: has joined #ruby
[09:42:09] startupality: has joined #ruby
[09:42:40] Macaveli: has joined #ruby
[09:43:44] Oog: has joined #ruby
[09:43:55] AndChat345984: has joined #ruby
[09:45:13] senayar: has joined #ruby
[09:46:58] jacyzon: has joined #ruby
[09:47:45] DLSteve: has joined #ruby
[09:47:54] AlexRussia: has joined #ruby
[09:48:31] riffraff: has joined #ruby
[09:50:54] kp666: has joined #ruby
[09:52:02] sbhatore: has joined #ruby
[09:53:26] KnowledgeOwl: has joined #ruby
[09:56:57] yeticry: has joined #ruby
[09:57:12] jacyzon: has joined #ruby
[09:58:08] Feyn: has joined #ruby
[09:58:09] conor_: has joined #ruby
[09:58:24] hololeap: has joined #ruby
[09:59:40] mcgain: has joined #ruby
[09:59:48] alfajor: has joined #ruby
[10:00:09] jacyzon: has joined #ruby
[10:01:54] RegulationD: has joined #ruby
[10:01:56] ferhaty: has joined #ruby
[10:02:20] ndrei: has joined #ruby
[10:02:59] jacyzon: has joined #ruby
[10:03:09] jacyzon: has left #ruby: ()
[10:04:18] krz: has joined #ruby
[10:04:19] Oog: has joined #ruby
[10:04:19] hotpancakes: has joined #ruby
[10:04:26] erowlin: has joined #ruby
[10:05:25] stamina: has joined #ruby
[10:05:59] jacyzon: has joined #ruby
[10:06:50] jacyzon: has joined #ruby
[10:07:37] tubuliferous_: has joined #ruby
[10:08:00] leat: has joined #ruby
[10:08:09] anisha: has joined #ruby
[10:09:35] mcgain_: has joined #ruby
[10:09:45] anisha_: has joined #ruby
[10:09:55] sbhatore: has joined #ruby
[10:10:00] devoldmx: has joined #ruby
[10:10:05] darix: norc: i had this issue with a feedparsing library a few weeks ago
[10:10:20] jacyzon: has joined #ruby
[10:10:31] norc: darix: which issue?
[10:10:42] darix: simple-rss
[10:10:59] darix: that it marked things as 8bit ascii when the content wasnt
[10:12:07] khebbie: has joined #ruby
[10:12:16] dhjondoh: has joined #ruby
[10:12:50] Cust0sLim3n: has joined #ruby
[10:13:12] yorickpeterse: encodings are hard m'kay
[10:13:25] darix: yorickpeterse: amen
[10:13:39] darix: UTF-8 everything
[10:13:57] adaedra: shevy: it's for you ^
[10:14:36] ndrei: has joined #ruby
[10:16:32] [k-: has joined #ruby
[10:17:14] shevy: I don't use UTF
[10:18:49] zanloy: has joined #ruby
[10:20:21] rickmasta: has joined #ruby
[10:22:04] bluOxigen: has joined #ruby
[10:25:40] suchness: has joined #ruby
[10:25:42] jacyzon: has joined #ruby
[10:25:47] leat: has joined #ruby
[10:27:37] bluOxigen: has joined #ruby
[10:27:52] casadei: has joined #ruby
[10:27:56] startupality: has joined #ruby
[10:28:21] sbhatore: has joined #ruby
[10:30:27] shevy: are structs used a lot?
[10:30:52] lxsameer_: has joined #ruby
[10:31:12] [k-: not really
[10:31:45] [k-: so unappreciated
[10:32:00] jhass: some do, some don't
[10:32:18] jhass: it's kind of a style question
[10:32:31] spider-mario: has joined #ruby
[10:32:37] sdothum: has joined #ruby
[10:32:38] [k-: no one knows about structs
[10:32:46] ccooke: I use them sometimes.
[10:33:00] ccooke: (And OpenStruct, too)
[10:33:13] lxsameer: has joined #ruby
[10:34:37] apeiros: I love structs
[10:34:43] apeiros: they're fast and easy to use
[10:34:53] apeiros: excellent for proper data classes instead of using array/hash
[10:35:39] ccooke: It very much depends what the data you're modelling is
[10:35:57] eGGsha: has joined #ruby
[10:36:44] sameerynho: has joined #ruby
[10:36:44] bluOxigen: has joined #ruby
[10:38:04] bgh13: has joined #ruby
[10:39:17] senayar: has joined #ruby
[10:39:17] senayar: has joined #ruby
[10:40:32] hotpancakes: has joined #ruby
[10:40:47] troulouliou_div2: has joined #ruby
[10:41:10] reverse_1ight: has joined #ruby
[10:41:17] bluOxigen: has joined #ruby
[10:42:39] mathie: has joined #ruby
[10:44:25] marr: has joined #ruby
[10:45:08] Oog: has joined #ruby
[10:47:37] iamninja: has joined #ruby
[10:50:18] bgh13: has joined #ruby
[10:51:28] pawnbox: has joined #ruby
[10:53:21] mistermocha: has joined #ruby
[10:53:32] shevy: hmm... in which language is 16 == [16] true
[10:54:16] shevy: I haven't tested it, just reading up on http://whydoesitsuck.com/why-does-javascript-suck/
[10:54:30] Macaveli: has joined #ruby
[10:55:33] ndrei: has joined #ruby
[10:55:44] lxsameer_: has joined #ruby
[10:56:04] adaedra: php > var_dump(16 == [16]);
[10:56:07] adaedra: bool(false)
[10:56:52] apeiros: hah, was just there too
[10:57:00] apeiros: took me ~5min to figure out the right command???
[10:57:06] apeiros: Fatal error: Call to undefined function dump_var() in php shell code on line 1
[10:57:10] shevy: adaedra you also used php when you were young and innocent?
[10:57:11] apeiros: Fatal error: Call to undefined function puts() in php shell code on line 1
[10:57:14] apeiros: Fatal error: Call to undefined function r_dump() in php shell code on line 1
[10:57:27] shevy: apeiros and php are no longer friends
[10:57:29] apeiros: try & error :) the way php is meant to be used.
[10:57:40] Zarthus: you got so close though
[10:57:41] apeiros: though unlike other language, error remains.
[10:58:00] apeiros: Zarthus: I actually found the right one in the end. just seconds before adaedra wrote here.
[10:58:02] darix: if i recall correctly
[10:58:18] apeiros: print_r shows 1 and "" (nothing) for true/false
[10:58:26] apeiros: var_dump is more revealing wrt type
[10:58:35] Zarthus: I did it in the background and satisfied myself - but never bothered to share it here :<
[10:58:59] adaedra: shevy: tbh, I /enjoyed/ PHP when I was young and innocent. But since I saw the light.
[10:59:02] shevy: to satisfy oneself with php hmmm
[10:59:04] bruno-: has joined #ruby
[10:59:15] Zarthus: ??\_(???)_/?? it's still my first and main language.
[10:59:17] DoubleMalt: has joined #ruby
[10:59:53] [k-: you twisted phper!
[10:59:55] adaedra: darix: like the name kind of implies, it's for priniting arrays
[11:00:21] [k-: hm, phpist
[11:00:26] [k-: sounds like rapist
[11:00:38] [k-: they raped my will to live!
[11:01:07] adaedra: Zarthus: does this satisfies you too? 16 == "16" => true, 016 == "016" => false
[11:01:07] Zarthus: phpist is as much rapist as potato is tomato
[11:01:33] Zarthus: adaedra: I like the ones where the hex comparisons somehow yield true more.
[11:02:23] bronson: has joined #ruby
[11:02:36] Zarthus: zarthus@amberline.zarth.us ~$ php -r 'var_dump("1e3" == "1000");'
[11:02:37] Zarthus: bool(true)
[11:03:11] yorickpeterse: ooook.....I go to lunch and there's shit like this
[11:03:14] adaedra: but it's scientific form, not hexa
[11:03:35] Zarthus: there's ones in hex format too, this is just the first one I found
[11:03:45] rodfersou: has joined #ruby
[11:03:50] yorickpeterse: [k-: keep your rape "jokes" to yourself please
[11:04:10] adaedra: How many sites does this shit run again?
[11:04:12] shevy: scientific php?
[11:04:36] shevy: adaedra php powers the web!
[11:04:52] cgrieger^away: has joined #ruby
[11:05:03] terlar: has joined #ruby
[11:05:08] Zarthus: I'm more worried about "100%" of the sites running javascript than the ones running PHP personally.
[11:06:17] allcentury: has joined #ruby
[11:06:54] adaedra: You don't really have a choice there
[11:07:11] phutchins1: has joined #ruby
[11:07:38] pontiki: 1e3 is not hex
[11:07:54] pontiki: it exponential notation
[11:08:25] apeiros: adaedra: webasm. soon.
[11:08:47] adaedra: apeiros: ok, I was missing an optimistic "yet"
[11:08:53] apeiros: (where "soon" is 3y until the first support it and 8y until you can reliably use it on >80% of browsers)
[11:09:12] Drager: has joined #ruby
[11:09:19] startupality: has joined #ruby
[11:12:25] shevy: pontiki hexponential notation!
[11:13:20] einarj: has joined #ruby
[11:13:50] omegamike: has joined #ruby
[11:14:16] dhjondoh: has joined #ruby
[11:16:31] dgutierrez1287: has joined #ruby
[11:17:41] knu: has joined #ruby
[11:19:50] PlasmaStar: has joined #ruby
[11:20:13] but3k4: has joined #ruby
[11:20:27] anisha: has joined #ruby
[11:20:30] hotpancakes: has joined #ruby
[11:21:20] jerius: has joined #ruby
[11:21:51] yardenbar: has joined #ruby
[11:21:52] davedev24: has joined #ruby
[11:22:43] hotpancakes: has joined #ruby
[11:25:32] jmhmccr: has joined #ruby
[11:25:35] psye: has joined #ruby
[11:26:59] sameerynho: has joined #ruby
[11:29:46] yottanami: has joined #ruby
[11:29:50] blue_deref: has joined #ruby
[11:30:10] yottanami: I want to create a new gem using bundle but I got this error http://dpaste.com/0N0PA1W
[11:30:13] yottanami: How can I fix it?
[11:30:26] arup_r: has joined #ruby
[11:31:44] adaedra: Sounds like an issue with your gemspec
[11:31:53] jhass: yottanami: there's bundler 1.10.6, try updating
[11:34:10] hoov: has joined #ruby
[11:34:27] but3k4: has joined #ruby
[11:34:45] davedev24: has joined #ruby
[11:34:52] f3ttX]: has joined #ruby
[11:36:00] hotpancakes: has joined #ruby
[11:38:03] pontiki: i'm a bit more curious about what they typed in response to the prompts
[11:38:53] ldnunes: has joined #ruby
[11:40:05] j4cknewt: has joined #ruby
[11:40:59] erowlin: has joined #ruby
[11:41:40] Spami: has joined #ruby
[11:41:43] lxsameer_: has joined #ruby
[11:42:58] conor_: has joined #ruby
[11:45:05] pawnbox: has joined #ruby
[11:48:50] mgorbach: has joined #ruby
[11:48:54] eGGsha: has joined #ruby
[11:48:58] pontiki: that version of bundler works just fine with that version of ruby and rubygems
[11:49:17] conor_: has joined #ruby
[11:49:52] sameerynho: has joined #ruby
[11:51:53] einarj: has joined #ruby
[11:52:07] basmoura: has joined #ruby
[11:52:38] startupality: has joined #ruby
[11:52:56] akkad: has joined #ruby
[11:53:31] bmurt: has joined #ruby
[11:54:39] cron: has joined #ruby
[11:55:26] _blizzy_: has joined #ruby
[11:55:31] codecodecode123: has joined #ruby
[11:56:08] tubuliferous_: has joined #ruby
[11:57:35] codecodecode123: how do i turn a range with floats to an array? eg: (1.1..1.5).to_a #=> [1.1, 1.2 ,1.3 ,1.4 ,1.5]
[11:58:34] senayar: has joined #ruby
[11:58:56] yorickpeterse: At least not without some manual code that determines the step size
[11:59:03] codecodecode123: with to_a i cant
[11:59:26] yorickpeterse: note the "without some manual code"
[11:59:29] codecodecode123: but i have got some code at least: [self.min.to_s.split(".")[1].length, self.max.to_s.split(".")[1].length]
[11:59:37] codecodecode123: [self.min.to_s.split(".")[1].length, self.max.to_s.split(".")[1].length].max
[11:59:45] ljarvis: >> (1.1..1.5).step(0.1).to_a # lol'd
[11:59:46] ruboto: ljarvis # => [1.1, 1.2000000000000002, 1.3, 1.4000000000000001, 1.5] (https://eval.in/415199)
[12:00:00] yorickpeterse: ljarvis: oh TIL
[12:00:05] yorickpeterse: also nice floats in action there
[12:00:06] workmad3: ljarvis: gotta love those unrepresentables :)
[12:00:19] yorickpeterse: codecodecode123: never use #to_s to determine the amount of decimals
[12:00:26] mistermocha: has joined #ruby
[12:00:57] yorickpeterse: IIRC there was some method that could give back the amount of decimals, but that might've been in Rational
[12:00:59] workmad3: >> 1.1.step(1.5, 0.1).to_a # this also works
[12:01:00] ruboto: workmad3 # => [1.1, 1.2000000000000002, 1.3, 1.4000000000000001, 1.5] (https://eval.in/415202)
[12:01:15] adaedra: these floats.
[12:01:18] lxsameer_: has joined #ruby
[12:01:25] codecodecode123: how can you say that works?
[12:01:35] ljarvis: because it's what you asked for
[12:01:54] codecodecode123: what is 1.200000000002 etc.?
[12:02:07] workmad3: codecodecode123: the closest that 1.2 can be represented in a float
[12:02:20] yorickpeterse: codecodecode123: welcome to floating points
[12:02:25] ljarvis: welcome to the world floating point
[12:02:27] adaedra: >> 1.1 + 0.1
[12:02:28] ruboto: adaedra # => 1.2000000000000002 (https://eval.in/415203)
[12:02:31] yorickpeterse: codecodecode123: https://www.youtube.com/watch?v=PZRI1IfStY0
[12:02:36] DoubleMalt: has joined #ruby
[12:02:43] yorickpeterse: >> 0.3 + 0.3 + 0.3
[12:02:44] ruboto: yorickpeterse # => 0.8999999999999999 (https://eval.in/415204)
[12:02:54] Yiota: has joined #ruby
[12:02:54] yorickpeterse: ^ why computers are terrible
[12:03:17] _blizzy_: has joined #ruby
[12:03:18] yorickpeterse: >> (0.3r + 0.3r + 0.3r).to_f
[12:03:19] ruboto: yorickpeterse # => 0.9 (https://eval.in/415205)
[12:03:44] adzuci: has joined #ruby
[12:03:46] ljarvis: not a rationale response
[12:03:50] ljarvis: i'll see myself out
[12:03:59] Muhannad: has joined #ruby
[12:04:05] workmad3: >> require 'bigdecimal'; BigDecimal.new('1.1').step(BigDecimal.new('1.5'), BigDecimal.new('0.1')).to_a.map(&:to_s)
[12:04:06] ruboto: workmad3 # => ["0.11E1", "0.12E1", "0.13E1", "0.14E1", "0.15E1"] (https://eval.in/415206)
[12:04:06] pawnbox: has joined #ruby
[12:04:11] bougyman: (BigDecimal(0.3, 1) * 3).to_f
[12:04:22] bougyman: ah, someone inb4 me with bigdecimal
[12:04:22] sameerynho: has joined #ruby
[12:04:32] thang: has joined #ruby
[12:04:50] ndrei: has joined #ruby
[12:04:57] yorickpeterse: but yeah, floats are annoying
[12:05:15] yorickpeterse: I wonder how many bitcoin exchanges use/have used floats
[12:05:31] workmad3: >> 1.1r.step(1.5r, 0.1r).to_a # fun :D
[12:05:32] yorickpeterse: wouldn't be surprised if magic the gathering internet exchange used it
[12:05:32] ruboto: workmad3 # => [(11/10), (6/5), (13/10), (7/5), (3/2)] (https://eval.in/415207)
[12:05:58] yorickpeterse: errr magic the gathering _online_ exchange
[12:06:38] codecodecode123: https://gist.github.com/nolcay/ae06bc3b7610b462d478 is what i wanna do
[12:06:48] [k-_: has joined #ruby
[12:06:57] yorickpeterse: codecodecode123: we showed plenty of examples
[12:07:22] codecodecode123: but i can't see them working for my purpose
[12:07:35] lxsameer_: has joined #ruby
[12:07:38] adaedra: what is your purpose
[12:07:43] shevy: to conquer the world
[12:07:47] shevy: together with pinky and brain
[12:07:49] codecodecode123: https://gist.github.com/nolcay/ae06bc3b7610b462d478 the #code part
[12:08:15] yorickpeterse: codecodecode123: explain, that code snippet is not very helpful
[12:08:23] adaedra: if you use '.rb' as extension in gist, it triggers syntax colors
[12:08:34] yorickpeterse: If you want to turn a Range of Floats into an Array of Floats you _have_ to use "step" as shown earlier
[12:08:48] yorickpeterse: You _can't_ convert a Range of Floats to an Array using just to_a
[12:09:21] fgo: has joined #ruby
[12:09:36] pawnbox: has joined #ruby
[12:09:36] yottanami: has joined #ruby
[12:09:40] codecodecode123: whatever, i'll create it myself
[12:09:47] yorickpeterse: codecodecode123: you can read right?
[12:10:01] yorickpeterse: codecodecode123: then look at what we've shown and adapt that
[12:10:05] yorickpeterse: Instead of being stubborn and ignoring it
[12:10:21] codecodecode123: not getting what you want is not stubborn
[12:10:32] ljarvis: that's *exactly* what you asked for
[12:10:33] adaedra: you got what you want
[12:10:40] jhass: to_r is for to rational, not to range, no?
[12:10:45] devoldmx: has joined #ruby
[12:10:48] yorickpeterse: codecodecode123: if it's not then you need to do a better job at explaining what you're looking for
[12:11:03] jhass: >> 0.2.to_r
[12:11:04] ruboto: jhass # => (3602879701896397/18014398509481984) (https://eval.in/415215)
[12:11:11] ljarvis: jhass: the important questions :D
[12:11:56] [k-_: im sure that is a cheap operation to perform
[12:12:06] codecodecode123: maybe You should learn to read because i clearly said [1.1, 1.2 ,1.3 ,1.4 ,1.5], not [1.1, 1.2000000000000002, 1.3, 1.4000000000000001, 1.5]
[12:12:09] [k-_: the cheapest kinds!
[12:12:18] ljarvis: well that's me out
[12:12:31] yorickpeterse: codecodecode123: you didn't read above did you?
[12:12:34] adaedra: codecodecode123: you read the explanation on floats right?
[12:12:45] yorickpeterse: (that's a rhetorical question)
[12:12:51] yorickpeterse: We explained exactly why that happens
[12:12:53] yorickpeterse: and what to do about it
[12:12:57] yorickpeterse: Yet you seemingly ignore that
[12:13:05] yorickpeterse: I even linked you to a video that explains why this happens
[12:13:06] meph: has joined #ruby
[12:13:10] SilentEcho: has joined #ruby
[12:13:22] codecodecode123: but it is not impossible for me to get [1.1, 1.2 ,1.3 ,1.4 ,1.5]
[12:13:32] adaedra: Like said above
[12:13:34] [k-_: did you not show him 1.1 + 0.1 = 1.20000000000000002
[12:13:42] adaedra: [k-_: I did
[12:13:46] codecodecode123: i want to get [1.1, 1.2 ,1.3 ,1.4 ,1.5], not [1.1, 1.2000000000000002, 1.3, 1.4000000000000001, 1.5]. period.
[12:13:48] yorickpeterse: codecodecode123: last time I'm going to say it: read the message we all left
[12:13:56] exadeci: has joined #ruby
[12:13:56] yorickpeterse: because the answer is there
[12:14:04] apeiros: there is no 1.2
[12:14:11] apeiros: >> "%.40f" % 1.2
[12:14:12] ruboto: apeiros # => "1.1999999999999999555910790149937383830547" (https://eval.in/415217)
[12:14:20] apeiros: this is what 1.2 gets you
[12:14:26] apeiros: >> "%.40f" % (1.1 + 0.1)
[12:14:27] ruboto: apeiros # => "1.2000000000000001776356839400250464677811" (https://eval.in/415219)
[12:14:32] apeiros: and this is what 1.1 + 0.1 gets you
[12:14:42] yorickpeterse: apeiros: already explained above, learn to read :D
[12:14:58] [k-_: yorickpeterse: moar!
[12:15:08] ljarvis: meh might as well repeat it
[12:15:14] apeiros: yorickpeterse: yes, you've explained. and I gave a readable example for the explanation.
[12:16:57] casadei: has joined #ruby
[12:17:35] govg: has joined #ruby
[12:17:59] quimrstorres: has joined #ruby
[12:18:43] codecodecode123: of course there is a 1.2! http://imgur.com/notdrKo, http://imgur.com/ngqUoSu, bye; i think the ruby smartasses arent on currently,
[12:19:02] jtdoncas: has joined #ruby
[12:19:37] shevy: who is a ruby smartass here!
[12:19:44] pontiki: ACTION waves
[12:19:54] [k-_: SO CLeVeR
[12:20:07] Cust0sLim3n: has joined #ruby
[12:20:11] startupality: has joined #ruby
[12:20:18] adaedra: ??? ??? ???
[12:20:43] Pisuke: has joined #ruby
[12:20:47] [k-_: i bet shevy cant see that!
[12:21:07] adaedra: shevy's asleep, post unicode characters!
[12:21:15] chris2: anyone have a ruby 1.8.6 around?
[12:21:16] dkphenom: has joined #ruby
[12:21:40] codecop: has joined #ruby
[12:21:49] adaedra: yes, next to my dinosaur
[12:22:02] apeiros: ruby-1.8.6-p420
[12:22:04] pontiki: move along, li'l dinosaur
[12:22:05] shevy: [k-_ yeah I don't see it :)
[12:22:14] shevy: oh the chrisosaur is alive
[12:22:17] chris2: apeiros: can it run lambda { |foo, &bar| bar }.call(5) { nil }
[12:22:17] apeiros: what do you need?
[12:22:26] apeiros: can tell you without running it :D
[12:22:29] chris2: but 1.8.7 can?
[12:22:35] chris2: i didnt know that. thought 1.9 only
[12:22:37] apeiros: I don't think so. but lets see
[12:22:41] adaedra: 18>> lambda { |foo, &bar| bar }.call(5) { nil }
[12:22:42] ruboto: adaedra # => #<Proc:0x40226d30@/tmp/execpad-1ec068515fb2/source-1ec068515fb2:2> (https://eval.in/415241)
[12:22:44] apeiros: 1.9 introduced that
[12:22:44] chris2: that works
[12:22:50] chris2: i know 1.9 can do it
[12:22:57] chris2: so i was amazed to see 1.8.7 can do it
[12:23:10] apeiros: 1.8.6-p420 :001 > lambda { |foo, &bar| bar }.call(5) { nil }
[12:23:10] apeiros: SyntaxError: compile error
[12:23:17] apeiros: interesting that 1.8.7 backported that
[12:23:28] apeiros: didn't know. I thought only 1.9 had the syntactical changes.
[12:23:31] shevy: they wanted to make 1.8.7 the best version ever!
[12:23:51] blackmesa: has joined #ruby
[12:24:03] chris2: >> ->() { nil }
[12:24:04] ruboto: chris2 # => #<Proc:0x4059c078@/tmp/execpad-7822c4a3cc32/source-7822c4a3cc32:2 (lambda)> (https://eval.in/415242)
[12:24:06] chris2: 18>> ->() { nil }
[12:24:07] ruboto: chris2 # => /tmp/execpad-a59a22d41e26/source-a59a22d41e26:2: syntax error, unexpected '>' ...check link for more (https://eval.in/415243)
[12:24:16] chris2: at least they didnt backport this mess :P
[12:24:32] apeiros: I actually grew to like ->{}
[12:24:34] adaedra: ACTION stabs chris2 with a proc
[12:24:45] workmad3: I'm still not fond of ->(args) {} though
[12:24:45] chris2: fucking ugly. just like foo: bar
[12:24:46] greenarrow: has joined #ruby
[12:24:55] adaedra: foo: bar is cool
[12:25:10] workmad3: I like that "foo": bar is supported now too
[12:25:19] [k-_: how do you stab someone with a colon
[12:25:28] chris2: workmad3: making the syntax more inconsistent, yay
[12:25:30] startupality: has joined #ruby
[12:25:30] adaedra: ACTION stabs [k-_ with a colon
[12:25:31] apeiros: you don't. you through it like a bola
[12:25:46] workmad3: hmm... lunch time
[12:25:56] shevy: foo: bar has one nice thing in that it may be shorter, -> on the other hand just is soooo ugly
[12:26:00] apeiros: oh, english uses plural for that. bolas.
[12:26:01] yorickpeterse: oh god that codecodecode123 person really missed it
[12:26:22] yorickpeterse: and here I was writing a rant yesternight about how newbies can be so darn stubborn at times
[12:26:26] apeiros: yorickpeterse: yupp, and managed to make an ass of themselves in the process too???
[12:26:26] oddmunds: what he wanted was bigdecimal
[12:26:28] adaedra: yorickpeterse: but no look, I can haz 1.2 with irrelevant calculation!
[12:26:28] yorickpeterse: hoping it was just me being grumpy
[12:26:39] yorickpeterse: apeiros: in all seriousness, we might need a wiki of sorts
[12:26:42] omegamike: has joined #ruby
[12:26:50] apeiros: yorickpeterse: you meaaaaan, like an FAQ?
[12:26:53] yorickpeterse: so we can just do "?float" and the bot goes "HAVE YOU CHECKED THE WIKI?????111"
[12:27:02] apeiros: yorickpeterse: liiiike http://ruby-community.com/faq
[12:27:03] yorickpeterse: apeiros: well, a wiki is basically a FAQ
[12:27:11] adaedra: We have a FAQ?
[12:27:19] oddmunds: I already told you 1.9999999999906 times!
[12:27:23] yorickpeterse: except dumping that on a single page might not be the best approach
[12:27:27] apeiros: the wiki aspect happens through PR :D
[12:27:35] rideh: has joined #ruby
[12:27:44] shevy: swiss discipline
[12:27:44] yorickpeterse: oh shoot, floats are already covered
[12:27:48] ta: has joined #ruby
[12:27:51] yorickpeterse: can't link directly to it though :/
[12:28:03] apeiros: I forgot how, though :D
[12:28:19] bruno-: has joined #ruby
[12:28:21] apeiros: or maybe that's the one where I haven't added proper anchoring yet?
[12:28:29] yorickpeterse: http://ruby-community.com/faq#collapse-24 supposed to be the link, but nothing happens when visiting it directly
[12:28:47] adaedra: yorickpeterse: open an issue noob
[12:28:52] yorickpeterse: adaedra: fite me
[12:28:59] [k-_: books hasnt even been added :(
[12:29:01] yorickpeterse: but yeah ugh, to Github we go
[12:29:04] apeiros: ACTION fites yorickpeterse
[12:29:07] apeiros: what's fiting?
[12:29:20] adaedra: Bro, do you even fit?
[12:29:27] apeiros: [k-_: oh, did I miss an open issue?
[12:29:27] [k-_: fit into adaedra
[12:29:34] apeiros: aaah, missing release!
[12:29:40] apeiros: ACTION hides
[12:30:01] apeiros: well??? part of the plan is to enable releases by people who are not apeiros :D
[12:30:14] apeiros: but the plan has a deadline of "end of this year".
[12:30:17] ljarvis: ACTION fites
[12:30:18] adaedra: [k-_: that's... dirty o_O
[12:30:22] ljarvis: yorickpeterse: u wunt sum bruv
[12:30:26] ljarvis: i'll give it ya
[12:30:49] [k-_: ??\_(???)_/??
[12:30:56] yorickpeterse: ljarvis: I know kara-te and taekwon-do, I'll fite you irl
[12:31:13] adaedra: watch out, I know sudoku
[12:31:15] blackmesa: has joined #ruby
[12:31:21] rideh: has joined #ruby
[12:31:31] anisha: has joined #ruby
[12:31:31] yorickpeterse: apeiros: wait, the website is a Rails app?
[12:31:44] adaedra: let's go eat for real
[12:31:47] ljarvis: it needs to scale bro
[12:31:50] radgeRayden_: has joined #ruby
[12:32:01] yorickpeterse: https://github.com/apeiros/ruby-community/blob/master/app/controllers/pages_controller.rb#L4 hm, this looks interesting
[12:32:09] apeiros: yorickpeterse: sure. I'm most familiar with that.
[12:32:36] apeiros: I got to do a release asap.
[12:33:09] yorickpeterse: hey what the hell, path traversal doesn't work
[12:33:12] yorickpeterse: unless I'm doing it wrong
[12:33:26] apeiros: the exploitability is limited, though, since the file has to end with .html.slim
[12:33:35] yorickpeterse: Though going to /pages/../ redirects you to /pages/user_rules
[12:33:56] apeiros: I probably better don't tell you what you're doing wrong :-p
[12:34:16] [k-_: security through non-obscurity
[12:34:34] apeiros: security through telexecution
[12:34:44] apeiros: telermination?
[12:35:07] yorickpeterse: bro just use nanoc
[12:35:16] apeiros: telectrocution
[12:35:17] yorickpeterse: can't exploit the HTMLs
[12:35:28] shevy: security through closing-ones-eyes
[12:35:28] ljarvis: i can explot ur htmls
[12:35:39] yorickpeterse: ljarvis: http://yorickpeterse.com try me you nerd
[12:35:52] ljarvis: u wnt sum pwn?
[12:35:55] apeiros: yorickpeterse: rebuild the log site on every message?
[12:35:57] jhass: can we have a channel aware of basic html rights please?
[12:36:11] ljarvis: ruby-html-rights?
[12:36:21] yorickpeterse: apeiros: log site?
[12:36:21] apeiros: ACTION is a ruby-html-left
[12:36:32] [k-_: so clever, putting your email in plaintext!
[12:36:36] apeiros: yorickpeterse: that which is currently covered by whitequark's irc log
[12:36:45] yorickpeterse: why would that have to be rebuilt?
[12:37:03] lannonbr: has joined #ruby
[12:37:29] apeiros: because the content is dynamic?
[12:37:56] jhass: s/is/will be/
[12:38:01] sameerynho: has joined #ruby
[12:38:31] yorickpeterse: apeiros: euh, the ruby-community website exposes logs?
[12:38:41] apeiros: it will, yes
[12:38:45] yorickpeterse: If so, either just use irc.whitequark.org instead, or keep it separate
[12:39:04] shevy: big apeiros is watching you!
[12:39:19] yorickpeterse: There's no particular reason for using Rails for a pretty much static website, but that's just my POV
[12:39:34] shevy: rails all the things
[12:39:55] yorickpeterse: which reminds me, I need to restrict access to my S3 bucket
[12:40:01] apeiros: wrt static part I mostly agree. but I see no point in learning another tool if rails does just fine, even if it's overpowered for what it does.
[12:40:03] [k-_: ajax all the things
[12:40:11] yorickpeterse: oh yeah, which I can't do
[12:40:14] yorickpeterse: because fucking cloudfront
[12:40:26] yorickpeterse: well, S3 in this case doesn't redirect /foo to /foo/index.html
[12:41:12] apeiros: also while most content is static right now, doesn't mean it will always be.
[12:41:46] pawnbox: has joined #ruby
[12:42:13] yottanami: jhass, I upgrade my bundler to 1.10.6 but I got error yet
[12:42:23] [k-_: apeiros: dont worry, we still have all the way to the end of the year!
[12:42:30] rideh: has joined #ruby
[12:42:40] apeiros: [k-_: I don't worry :)
[12:42:43] jhass: yottanami: copy paste the full output then, including invocation and all your inputs
[12:42:49] apeiros: or: don't worry [k-_, I don't worry.
[12:43:22] yottanami: jhass, http://dpaste.com/01CBGHE
[12:44:05] jhass: yottanami: you don't hit any key on the question?
[12:44:10] sarkyniin: has joined #ruby
[12:44:11] jhass: where does the C come from?
[12:45:05] ndrei: has joined #ruby
[12:45:08] startupality: has joined #ruby
[12:45:26] rbennacer: has joined #ruby
[12:45:37] codecodecode123: has joined #ruby
[12:46:32] jhass: yottanami: what's your terminal emulator? can you try a different one?
[12:47:11] yorickpeterse: yottanami: install libreadline, recompile ruby
[12:47:24] yorickpeterse: IIRC rb-readline isn't always compatible with regular readline
[12:47:38] hinbody: has joined #ruby
[12:48:32] yorickpeterse: or, if readline is already installed, just uninstall rb-readline
[12:48:41] yorickpeterse: (ruby --disable=gems -r readline -e 'p Readline' should output "Readline" if it's there)
[12:49:06] jbw_: has joined #ruby
[12:49:29] [k-_: isnt it just -rreadline for requiring
[12:49:50] bmurt: has joined #ruby
[12:50:43] sgambino: has joined #ruby
[12:51:18] yorickpeterse: The --disable=gems is to ensure rb-readline doesn't somehow hijack it
[12:52:03] rickmasta: has joined #ruby
[12:52:40] Drager: has joined #ruby
[12:53:17] cibs_: has joined #ruby
[12:56:46] Sumi: has joined #ruby
[12:57:14] Sumi: <Sumi> "/I have an issue with Passegnerruby vs PassegnerDefaultRuby alis list *ruby*"
[12:57:40] Sumi: "/I am using the passegner 4.0.50 alis list *ruby*"
[12:57:41] rideh: has joined #ruby
[12:58:17] Sumi: Always stayin only one ruby version
[12:58:43] bradland: Sumi: there's a #passenger channel on Freenode as well. you may get a reply here, but #passenger would be a better bet.
[12:59:04] Kallis: has joined #ruby
[12:59:21] startupality: has joined #ruby
[12:59:36] Sumi: /I have an issue with Passegnerruby vs PassegnerDefaultRuby alis list *ruby* I am using passener 4.0.50 When I use PassegnerDefaultRuby 2 X and then try to load Passegnerruby .. its not loading
[12:59:46] victortyau: has joined #ruby
[12:59:54] Sumi: Can any one guide me?>
[13:00:57] yorickpeterse: Sumi: #passenger
[13:01:14] atomical: has joined #ruby
[13:01:19] Sumi: yorickpeterse
[13:01:26] cibs: has joined #ruby
[13:01:29] Sumi: I tried there but they redirectdd me here
[13:01:48] Sumi: yorickpeterse: I tried there but they redirectdd me here
[13:01:48] norc: Sumi: Wonderful, now listen to yorickpeterse and find out what a redirect loop is!
[13:02:19] yorickpeterse: well, nice for the #passenger people to not provide support for their own product
[13:03:02] tkuchiki: has joined #ruby
[13:03:20] startupality: has joined #ruby
[13:03:27] RegulationD: has joined #ruby
[13:03:46] yorickpeterse: "Is this #passenger?" "Yes" "Can I ask a question about Passenger here?" "No, go to #ruby"
[13:03:53] mistermocha: has joined #ruby
[13:04:56] [k-_: they need the apeiros administration!
[13:05:55] shevy: they are just lazy
[13:06:14] sbhatore: has joined #ruby
[13:06:15] darix: yorickpeterse: unicorn/rainbow/puma >>> passenger anywy
[13:06:40] yh_: has joined #ruby
[13:06:42] jhass: well, there's also the possibility that they pushed for the actual error and not loading means their app just crashes
[13:06:50] jhass: ACTION joins #passenger
[13:06:59] sdwrage: has joined #ruby
[13:07:24] startupality: has joined #ruby
[13:08:26] yorickpeterse: darix: dunno, never used passenger
[13:08:34] yorickpeterse: But after their Raptor bullshit I have little interest in using it
[13:08:48] melter: has joined #ruby
[13:08:50] yorickpeterse: "hurrhurr we know hello world means fuck all but we're going to benchmark it anyway"
[13:09:26] startupality: has joined #ruby
[13:09:33] superspring: has joined #ruby
[13:10:00] dhruvasagar: has joined #ruby
[13:10:15] hj2007: has joined #ruby
[13:10:22] jmignault: has joined #ruby
[13:11:13] failshell: has joined #ruby
[13:11:15] startupality: has joined #ruby
[13:11:17] darix: yorickpeterse: well strictly speaking if you just want to measure your own overhead the hello world thingie is ok. most apps will be outperformed by their app server in any case. just lots of people dont understand that.
[13:11:27] hotpancakes: has joined #ruby
[13:11:32] headius: has joined #ruby
[13:12:02] malconis: has joined #ruby
[13:12:21] yorickpeterse: hello world in every context is completely useless
[13:12:29] yorickpeterse: especially if you start talking about turbo caching or w/e they called it
[13:12:33] yorickpeterse: since the response is just a static string
[13:12:51] malconis: has joined #ruby
[13:12:54] gregf: has joined #ruby
[13:12:58] yorickpeterse: Hm, maybe I should add some JIT code in Rbx so it JITs hello world
[13:13:30] Cust0sLim3n: has joined #ruby
[13:14:18] yorickpeterse: "Rubinius 2.5.9: we can now JIT hello-world for maximum webscale"
[13:14:38] dblessing: has joined #ruby
[13:16:02] joelataylor: has joined #ruby
[13:16:08] yalue: has joined #ruby
[13:17:24] dimasg: has joined #ruby
[13:17:38] casadei: has joined #ruby
[13:17:56] mrtg9970: has joined #ruby
[13:19:05] skakri: has joined #ruby
[13:19:23] chrisseaton: yorickpeterse: the new basic-block-versioning approach to JITs would allow you to JIT hello world
[13:19:40] chrisseaton: (I know you're joking, but it would)
[13:19:52] darix: yorickpeterse: we could precompute fib :p
[13:20:17] droidburgundy: has joined #ruby
[13:21:35] gamename: has joined #ruby
[13:21:42] hotpancakes: has joined #ruby
[13:22:16] [k-_: and store it where?
[13:22:37] gamename: has joined #ruby
[13:22:45] y0da: has joined #ruby
[13:22:57] yh: has joined #ruby
[13:26:51] hashrocket: has joined #ruby
[13:27:49] allcentury: has joined #ruby
[13:28:21] bweston92: has joined #ruby
[13:28:38] adaedra: ??? jhass joins #passenger
[13:28:52] adaedra: jhass, searching for all cases of cross-post to report :o
[13:31:56] devdazed: has joined #ruby
[13:33:04] ffledgling: has left #ruby: ()
[13:33:18] bruno-: has joined #ruby
[13:33:20] rideh: has joined #ruby
[13:33:30] JoshL: has joined #ruby
[13:34:14] weemsledeux: has joined #ruby
[13:34:50] startupality: has joined #ruby
[13:36:50] havenwood: has joined #ruby
[13:39:14] apt-get_: has joined #ruby
[13:39:43] whippythellama: has joined #ruby
[13:40:18] rideh: has joined #ruby
[13:40:24] failshell: has joined #ruby
[13:40:33] RandyT: has joined #ruby
[13:41:25] ZeeNoodleyGamer: has joined #ruby
[13:42:00] sinkensabe: has joined #ruby
[13:42:32] rideh: has joined #ruby
[13:42:55] gamename: has joined #ruby
[13:42:56] juanpaucar: has joined #ruby
[13:43:48] jeremy04: has joined #ruby
[13:43:57] pawnbox: has joined #ruby
[13:44:33] bmurt: has joined #ruby
[13:44:34] jgpawletko: has joined #ruby
[13:44:39] tubuliferous_: has joined #ruby
[13:45:09] umgrosscol: has joined #ruby
[13:45:20] paulcsmith: has joined #ruby
[13:45:54] silkfox: has joined #ruby
[13:46:35] yottanami: has joined #ruby
[13:47:28] joonty: has joined #ruby
[13:47:58] riotjones: has joined #ruby
[13:51:12] Chau: has joined #ruby
[13:51:16] solars: anyone here familiar with the oauth2 gem and can help with the basic authenticatio for google apis? :/
[13:51:42] [k-_: what do you mean by "help"
[13:51:58] rideh: has joined #ruby
[13:52:02] _blizzy_: has joined #ruby
[13:52:23] machinewar: has joined #ruby
[13:52:38] centrx: has joined #ruby
[13:54:21] startupality: has joined #ruby
[13:55:22] shevy: he wants you to write stuff [k-_ !
[13:55:24] rbennacer: has joined #ruby
[13:55:45] Ropeney: has joined #ruby
[13:55:45] rbennacer: has joined #ruby
[13:56:34] [k-: don't have no time for that
[13:58:04] bronson: has joined #ruby
[13:59:08] jeremy04_: has joined #ruby
[13:59:09] joonty: has joined #ruby
[13:59:10] stryek: has joined #ruby
[13:59:13] eGGsha: has joined #ruby
[13:59:35] _blizzy_: has joined #ruby
[14:00:07] solars: [k-, no :) I'm having a hard time accessing the google apis, there is a basic sample in python: https://gist.github.com/solars/4630bd14cddcb5c9bdac and I'm trying to use https://github.com/intridea/oauth2 but after creating the client I'm stuck with what method to use to fetch the token
[14:00:55] devdazed_: has joined #ruby
[14:01:46] Torrieri: has joined #ruby
[14:01:46] Torrieri: has joined #ruby
[14:01:49] khebbie: has joined #ruby
[14:02:43] [k-_: token = client.auth_code.get_token('authorization_code_value', :redirect_uri => 'http://localhost:8080/oauth2/callback', :headers => {'Authorization' => 'Basic some_password'})
[14:02:51] mary5030: has joined #ruby
[14:02:52] humd1ng3r: has joined #ruby
[14:03:55] deepu: has joined #ruby
[14:04:16] deepu: has joined #ruby
[14:04:25] csaunders: has joined #ruby
[14:05:56] lwu: has joined #ruby
[14:06:27] kaps: has joined #ruby
[14:06:46] pdoherty: has joined #ruby
[14:07:13] dopie: has joined #ruby
[14:07:25] banister: has joined #ruby
[14:08:27] kitallis: does anyone have thoughts on this? https://gist.github.com/kitallis/88d68e2acb0da38cf975
[14:08:51] solars: [k-_, obviously - but what's the input
[14:09:19] kitallis: it seems to be behaving very oddly in terms of file writes
[14:09:24] [k-_: why dont you try and see for yourself?
[14:09:35] mistermocha: has joined #ruby
[14:09:42] kitallis: the index.html file ??? it tends to be writing things slowly but in bulk
[14:10:03] solars: [k-_, well I did, that's the reason I'm asking
[14:10:57] [k-_: thats what the documentation says ??\_(???)_/??
[14:11:31] devoldmx: has joined #ruby
[14:12:01] haylon: has joined #ruby
[14:12:05] jeremy04: has joined #ruby
[14:12:17] solars: [k-_, ...
[14:13:35] [k-_: kitallis: that's due to buffering
[14:14:20] einarj: has joined #ruby
[14:14:49] rideh: has joined #ruby
[14:15:22] kitallis: [k-_, hm, yeah figured
[14:15:42] saddad: has joined #ruby
[14:17:12] kitallis: won't bother with $stdout.sync = true, because it flushes it consistently enough
[14:18:24] Rutix: has joined #ruby
[14:18:45] yorickpeterse: You can manually call flush whenever needed
[14:18:45] pyrotecnix: has joined #ruby
[14:18:47] Rutix: has joined #ruby
[14:18:47] dudedudeman: has joined #ruby
[14:21:13] darkf_: has joined #ruby
[14:22:01] dgutierrez1287: has joined #ruby
[14:22:22] uber: has joined #ruby
[14:23:04] conor__: has joined #ruby
[14:24:44] Scripore: has joined #ruby
[14:24:51] Juanchito: has joined #ruby
[14:27:03] baroquebobcat: has joined #ruby
[14:27:09] sbhatore: has joined #ruby
[14:27:19] christiandsg: has joined #ruby
[14:28:34] josh2: has joined #ruby
[14:29:50] Oog: has joined #ruby
[14:29:57] GnuYawk: has joined #ruby
[14:30:16] kies: has joined #ruby
[14:30:19] Thermatix: has joined #ruby
[14:30:57] Thermatix: having wierd ass problem with ruby gems
[14:31:06] Thermatix: it keeps goin
[14:31:09] Thermatix: Bundler could not find compatible versions for gem "sprockets"
[14:31:15] RegulationD: has joined #ruby
[14:31:30] Thermatix: version is "~> 3.2"
[14:31:40] Thermatix: why is gem doing this?
[14:31:51] Thermatix: well, specificly bundler
[14:32:08] apeiros: because your gemfile specifies directly or indirectly two incompatible versions of sprockets
[14:32:09] yorickpeterse: Thermatix: maybe another Gem depends on another version?
[14:32:45] hashrocket: has joined #ruby
[14:32:49] apeiros: but iirc bundler tells you which gems conflict
[14:33:00] apeiros: if your bundler does not, update bundler
[14:33:14] RobertBirnie: has joined #ruby
[14:33:31] Thermatix: is sprockets-sass needed?
[14:33:39] Thermatix: becuase that's whats causing the problem
[14:33:44] jhass: it's needed if you need it
[14:33:49] Thermatix: what I mean
[14:34:23] Thermatix: sprockets sass is suposed to fix @import and stuff not working in sprockets, but is that working normmaly in sprockets 3 or above
[14:34:48] ruboto: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[14:35:15] Thermatix: haven't touched rails in a while, truth be told
[14:35:24] jhass: still, you'll find people more familiar with sprockets there
[14:35:32] khebbie: has joined #ruby
[14:35:33] apeiros: Thermatix.enable_buffering!
[14:35:34] Thermatix: ah i see what you mean
[14:35:36] hashrocket: has joined #ruby
[14:35:38] Thermatix: you meant the channel!
[14:35:45] apeiros: Thermatix: you can write more than two words in a single message.
[14:36:01] Thermatix: not the gem >_<
[14:36:14] Thermatix: ok thanks for the suggestion I'll go ask them
[14:36:51] pawnbox: has joined #ruby
[14:38:36] m8: has joined #ruby
[14:38:50] startupality: has joined #ruby
[14:39:24] conor_: has joined #ruby
[14:39:55] dionysus69: has joined #ruby
[14:40:03] youngbaks: has joined #ruby
[14:40:11] quimrstorres: has joined #ruby
[14:40:15] Thermatix: how to log in?
[14:41:23] hobodave: has joined #ruby
[14:41:45] jhass: Thermatix: did you read the message? /msg NickServ help
[14:41:51] freerobby: has joined #ruby
[14:41:56] Igor2__: has joined #ruby
[14:42:00] tmtwd: has joined #ruby
[14:42:07] dudedudeman: there is a #sinatra channel as well, i have gotten some good help from there, even if it is a little quieter
[14:42:24] krz: has joined #ruby
[14:42:32] Igor2__: hi all; I have some C code that used to work with ruby 1.8 but the API has changed with 1.9
[14:43:17] jhass: Igor2__: and with 2.0, 2.1 and 2.2. 1.9 is EOL, 2.0 will be soon enough, port it to 2.2 ;)
[14:43:18] Igor2__: the code wants to use rb_define_global_function to register multiple global functions to a single C function
[14:43:33] hobodave: has joined #ruby
[14:43:43] Igor2__: and there is a dispatcher in the C function that figures out the actual function name used in ruby
[14:43:58] Igor2__: sure, API changes are normal ase stuff evolve
[14:44:17] paulcsmith: has joined #ruby
[14:44:20] Igor2__: my problem is that I can't seem to find how to get this function name info with later versions
[14:44:43] Igor2__: (i am indeed trying with 2.2, but I wouldn't be too unhappy if the solution worked with older versions)
[14:45:22] Igor2__: the old code uses ruby_frame->orig_func (ugly hack)
[14:45:35] tjohnson: has joined #ruby
[14:45:39] Oog: has joined #ruby
[14:47:12] coban2k: has joined #ruby
[14:47:16] paulcsmith: has joined #ruby
[14:47:37] ndrei: has joined #ruby
[14:47:44] Thermatix: has left #ruby: ("Leaving")
[14:48:59] Igor2__: all I seem to find is for 1.8
[14:50:02] Igor2__: (it would have been really cool to have this info in argv[0])
[14:50:32] EagleDelta: has joined #ruby
[14:51:02] kaleido: has joined #ruby
[14:51:44] astrobunny: has joined #ruby
[14:52:10] jhass: I guess if everything else fails you could write some macro that binds them to individual functions that call your dispatcher with the name as argument
[14:52:19] [spoiler]: Igor2__, if I understood right, you want to access the name of the method that's being called?
[14:52:21] Igor2__: the thing is dynamic
[14:52:29] Igor2__: that would require generating C functions runtime
[14:52:37] kaleido: has left #ruby: ()
[14:52:42] Igor2__: [spoiler]: exactly
[14:54:13] pyrotecnix: has joined #ruby
[14:54:49] jespada: has joined #ruby
[14:55:09] hotpancakes: has joined #ruby
[14:55:25] Oog: has joined #ruby
[14:56:55] [spoiler]: Hmm. Global function is a method defined on Kernel ? (ie, `def a; dostuff; end` without a )?
[14:57:10] adaedra: >> def a; end; method(:a)
[14:57:11] ruboto: adaedra # => #<Method: Object#a> (https://eval.in/415292)
[14:57:29] Oog_: has joined #ruby
[14:58:08] pawnbox: has joined #ruby
[14:58:12] Igor2__: i am not really sure, i'm on the C side of this, not on the ruby side
[14:58:52] Igor2__: all I know is that the dispatcher function is registered using rb_define_global_function()
[15:00:04] chipotle: has joined #ruby
[15:00:35] failshell: has joined #ruby
[15:01:05] DoubleMalt: has joined #ruby
[15:01:37] Thermatix: has joined #ruby
[15:01:42] jamto11: has joined #ruby
[15:01:54] rippa: has joined #ruby
[15:01:59] Thermatix: welp, I asked in #RubyOnRails and managed to kill the conversation
[15:02:21] adaedra: he's dead jim
[15:02:21] burgestrand: has joined #ruby
[15:02:23] [spoiler]: Igor2__: I forgot what rb_define_global_function does, but you can define a `method_missing` method on Object and check in there if the called method name is
[15:03:03] Thermatix: as a doornail XD
[15:03:07] [spoiler]: on the list of method names, or just use alias_method
[15:03:16] Igor2__: i'm a bit confused now
[15:03:29] Thermatix: I think rb_define_global_function is a way to define a method on the global name-space
[15:03:30] Igor2__: I'm in plain C, so I don't have methods or clases there; you mean ruby methods right?
[15:03:34] khebbie: has joined #ruby
[15:04:28] Thermatix: found this ruby c api cheat-sheet : http://inferior-products.com/docs/userdocs/ruby19/html/d7/d19/group__defmethod.html
[15:04:40] Thermatix: it says rb_define_global_function defines a global function
[15:04:40] [spoiler]: Igor2__: use rb_define_method
[15:04:55] radgeRayden_: has joined #ruby
[15:06:00] Igor2__: let's say I switch to rb_define_method and my dispatcher C func is called, what's the name of the function i need to use to get to the method name?
[15:06:11] skade: has joined #ruby
[15:06:27] [spoiler]: you define rb_missing which will then dispatch your function
[15:06:36] [spoiler]: sorry method_missing
[15:07:13] [spoiler]: or you can add aliases
[15:07:51] [spoiler]: to a single method, that method would then call the c function, or be the c function
[15:09:27] jamto11: has joined #ruby
[15:10:10] ValicekB: has joined #ruby
[15:11:42] hotpancakes: has joined #ruby
[15:11:44] bruno-: has joined #ruby
[15:12:00] mistermocha: has joined #ruby
[15:12:31] juanpaucar: has joined #ruby
[15:13:24] djstorm: has joined #ruby
[15:13:26] dr3w: has joined #ruby
[15:13:31] Igor2__: this is going to be more complicated than i thought :/
[15:13:35] Igor2__: (i don't have a klass)
[15:13:48] jhack: has joined #ruby
[15:14:27] Blaguvest: has joined #ruby
[15:14:38] polpak: has joined #ruby
[15:14:53] conor_: has joined #ruby
[15:15:07] [spoiler]: your klass is Object
[15:15:13] [spoiler]: or you can define the method on Kernel
[15:15:29] prestorium: has joined #ruby
[15:15:49] Igor2__: rb_mKernel?
[15:15:55] paulcsmith: has joined #ruby
[15:16:05] [spoiler]: which is included by Object (or was when the last time I was writing a C extension)
[15:16:11] [spoiler]: And yes that should do it
[15:16:30] Igor2__: thank you guys, I will try this
[15:18:06] bruno-: has joined #ruby
[15:18:25] Thermatix: no response in #sinatra either :(
[15:18:50] adaedra: sinatra is not very populated, answers can be slow
[15:19:24] Thermatix: my response got ignored in rubyonrails and there's 600 people XD
[15:19:57] Thermatix: I don't think It's going to be an issue
[15:20:15] shevy: nobody does ruby + web anymore
[15:20:17] Thermatix: any way, thanks for trying at lease :)
[15:20:18] adaedra: no one likes the matrix
[15:21:26] Thermatix: the first one at any rate, the others were.... ok
[15:22:02] icebourg: has joined #ruby
[15:22:59] andersh: has joined #ruby
[15:23:40] Cache_Money: has joined #ruby
[15:23:45] josh3: has joined #ruby
[15:23:49] dr3w: has joined #ruby
[15:24:39] gregf: has joined #ruby
[15:25:08] juanpaucar: has joined #ruby
[15:27:00] petersaints: has joined #ruby
[15:27:32] [spoiler]: adaedra: I'm glad I wasn't the only one who read his username wrong
[15:27:37] hobodave: has joined #ruby
[15:27:59] failshell: has joined #ruby
[15:28:11] adaedra: [spoiler]: [spoiler] I didn't.
[15:28:57] [spoiler]: So I am the only one
[15:28:58] sarkyniin: has joined #ruby
[15:29:17] [spoiler]: ACTION sulks.
[15:29:24] adaedra: there there.
[15:29:30] adaedra: ACTION feeds [spoiler]
[15:29:36] rcvalle: has joined #ruby
[15:29:40] adaedra: Snape kills Dumbeldore
[15:29:59] Igor2__: i've read it wrong too
[15:30:11] startupality: has joined #ruby
[15:30:12] Vile`: has joined #ruby
[15:30:15] MudkipFan: has joined #ruby
[15:30:21] Igor2__: ogg, there's no ruby_exec() either
[15:30:22] MudkipFan: is there a codeschool for comuter security?
[15:30:25] Igor2__: s/ogg/ohh/
[15:30:55] [spoiler]: ACTION omnomnoms
[15:31:04] Igor2__: i guess porting from 1.8 is not the few minutes task i though it'd be :/
[15:31:27] [spoiler]: Igor2__: oh, no it definitely won't be :P
[15:31:47] [spoiler]: why are you using ruby_exec() anyway?
[15:31:49] eGGsha: has joined #ruby
[15:31:51] gambl0re: has joined #ruby
[15:31:57] Igor2__: i'm not sure, it's not my code
[15:32:16] Igor2__: btw, the whole thing is 184 lines of C, this why I had high hopes for an easy update)
[15:32:31] roger_rabbit: has joined #ruby
[15:32:33] Igor2__: the idea is that it loads a script, binds some functions to a dispatcher than runs the script
[15:32:49] tubuliferous_: has joined #ruby
[15:32:54] quimrstorres: has joined #ruby
[15:33:05] Igor2__: (I guess it's clear by now that I have 0 idea about ruby, so I don't know why it does this the way it does - I only know it works with 1.8)
[15:33:15] startupality: has joined #ruby
[15:33:22] [spoiler]: the way it works sounds to me like it could work better, to be honest
[15:33:54] Igor2__: the C project is not OOP, and honestly, I'd like to go for the simplest approach possible
[15:34:31] Igor2__: it's a multi-language project that tries to provide a common intrface independent of the scripting lagnuage so instead of trying to do the most advanced stuff in each language it goes for a common minimum
[15:34:44] Igor2__: which is generally function calls in script->c and c->script directions
[15:35:05] Igor2__: (this why it scars me that I need to use methods with ruby)
[15:36:21] [spoiler]: anyway I think a replacement for `ruby_exec` cold be rb_eval_string
[15:36:43] icebourg: has joined #ruby
[15:36:51] Igor2__: i am not sure abou that:
[15:37:18] Igor2__: normally the script (written in whatever language) has a dedicated init part that runs once then the C code calls functions
[15:38:23] Igor2__: in ruby, the init part is not in any function, it's just there at the end of the script
[15:38:33] Igor2__: so I need something that runs that part
[15:38:42] [spoiler]: Can you show the source, or is it proprietary/in house?
[15:39:11] ivanskie: has joined #ruby
[15:39:35] yh: has joined #ruby
[15:39:38] [spoiler]: this is the signature is `VALUE rb_eval_string(const char *str);` so it evaluates a NULL-terminated C string. So, if your script is a string, that should do it
[15:40:50] Igor2__: it's public
[15:41:01] Igor2__: svn://repo/hu/gpmi/trunk is the parent project
[15:41:29] Igor2__: the script is a file i load with rb_load_file()
[15:41:48] Igor2__: the ruby-specific glue is in trunk/src/modules/ruby
[15:42:04] jhass: uhm, repo == ?
[15:42:13] Igor2__: oops, sorry, typo
[15:42:21] Igor2__: svn://repo.hu/gpmi/trunk
[15:42:45] adaedra: that's far away
[15:42:59] deepu: has joined #ruby
[15:43:00] Igor2__: from where?
[15:43:53] gemgemcli: has joined #ruby
[15:43:58] adaedra: everywhere
[15:44:06] Igor2__: i happen to live in .hu
[15:44:12] Igor2__: so it's pretty close to me
[15:45:37] Scripore: has joined #ruby
[15:45:50] jhack: has joined #ruby
[15:46:34] gemcli: has joined #ruby
[15:47:03] [spoiler]: damn I don't have svn installed
[15:47:12] Igor2__: there are some releases, moment
[15:47:35] Igor2__: http://repo.hu/projects/gpmi/releases/gpmi-0.9.3.tar.gz
[15:47:53] youch: has joined #ruby
[15:48:03] Igor2__: the svn HEAD version is far ahead already, although the ruby part is broken at the moment
[15:48:28] Igor2__: anyway the ruby module didn't change any since 0.9.3 so for reference that's good enough
[15:48:43] coban2k: has joined #ruby
[15:48:55] Igor2__: i guess i could run the main part by the eval() trick, but i guess the script context wouldn't persist
[15:48:59] youch: what is the difference between calling an instance var with `@var` and `self.var`?
[15:49:09] Igor2__: so i couldn't make further calls into it
[15:49:10] [spoiler]: youch: self.var uses public access
[15:49:19] jhass: youch: first accesses the var directly, self.var is a method call
[15:49:21] polpak: youch: self.var calls a method
[15:49:35] [spoiler]: and is actually a method; so if you didn't define attr_accessor or attr_reader, it won't work
[15:50:00] dfockler: has joined #ruby
[15:50:03] RegulationD: has joined #ruby
[15:50:16] [spoiler]: Igor2__: hmm where's the ruby script file? I don't see a .rb file in modules/ruby
[15:50:20] youch: ah ok so the method may or may not return the actual instance var? it could be the var+10 or something like that depending on your method?
[15:50:20] jhass: youch: to clarify, attr_reader :var just defines a method that looks like this: def var; @var; end
[15:50:41] [spoiler]: youch: yes, indeed
[15:50:43] youch: jhass: i see
[15:50:54] Igor2__: it's in src/scripts/ruby
[15:51:04] youch: thanks guys
[15:51:11] jhass: ?guys youch
[15:51:11] ruboto: youch, You probably don't mean to exclude, but not everyone relates to being "one of the guys". Maybe consider using "folks", "y'all" or "everyone" instead?
[15:51:33] adaedra: that eye blink is offensive to one-eyed people who can't do that
[15:51:34] Igor2__: I thank you for spending time on this
[15:51:42] ruboto: I don't know anything about odin
[15:51:47] luckyme: has joined #ruby
[15:51:52] youch: ruboto thanks for the advice, i wasnt even thinking about that
[15:51:56] [spoiler]: adaedra: I tried
[15:52:14] arup_r: has joined #ruby
[15:52:16] [spoiler]: ruboto: ruboto is a bot; jhass prompted it to tell you that
[15:52:25] ruboto: I'm the channel bot, linker of the rules, adept of the facts, wielder of the banhammer.
[15:52:32] [spoiler]: I'm sorry I called you an it, ruboto. I
[15:52:38] dfockler: has joined #ruby
[15:52:45] pothibo: has joined #ruby
[15:52:46] [spoiler]: Igor2__: there's no src dir in here, or I'm blind
[15:52:59] Igor2__: let me check what's the root of the gz
[15:53:11] [spoiler]: inside the /scripts/ are just example directories
[15:53:25] Igor2__: 0.9.3/scripts/example_ruby/
[15:53:36] [spoiler]: oh durrr, ok sorry
[15:54:00] Igor2__: it seems my packagign is slightly broken so src got ripped out
[15:54:02] startupality: has joined #ruby
[15:54:16] Alayde: has joined #ruby
[15:54:42] Igor2__: so the idea is that gpmi'd like to load the script once
[15:54:48] Igor2__: the "init part" should run then
[15:55:13] Igor2__: and the script (and its context) should stay in memory so later gpmi could call ruby functions
[15:55:32] Igor2__: ideally there could be multiple script contexts in memory, but the original code fails on this
[15:55:40] Igor2__: (probably because the hackish way it loads the script)
[15:56:12] OrbitalKitten: has joined #ruby
[15:57:08] pietr0: has joined #ruby
[15:57:54] tkuchiki: has joined #ruby
[15:58:11] [spoiler]: I'm not sure you can have moltiple intepreter instances anyway; ruby has lots of global state
[15:58:19] [spoiler]: you could use mruby if you wanted something embedded
[15:58:27] [spoiler]: it has a much, much nicer API
[15:59:04] dkphenom: has joined #ruby
[16:00:43] jhass: keep in mind that mruby is dialect of Ruby though
[16:00:46] hashrocket: has joined #ruby
[16:01:06] luckyme: has joined #ruby
[16:01:25] [spoiler]: But it does support most of Ruby
[16:01:38] Igor2__: my user base count is 1
[16:01:55] Igor2__: so there won't be anything broken if i switch ruby dialects
[16:02:00] [spoiler]: there's a few things it doesn't support
[16:02:13] [spoiler]: what springs to mind is `defined?` operator
[16:02:33] [spoiler]: there's more but meh
[16:02:43] freerobby: has joined #ruby
[16:02:59] Igor2__: it looks promising: has documentation, releases, it's even in debian testing
[16:03:02] [spoiler]: Igor2__: it might be a bit of extra work, but switching to Ruby might be worth in in the long run
[16:03:16] [spoiler]: asdfghjkl; mruby*
[16:03:51] higuys: has joined #ruby
[16:03:52] Igor2__: I mostly agree; currently I think it may be even less work
[16:04:06] conor_: has joined #ruby
[16:04:16] Igor2__: I really have no idea about ruby, so the question is whether i learn more about ruby or mruby, starting both from 0
[16:04:35] Igor2__: if mruby is generally smaller, I guess it's less work to gt it working to my small use case
[16:04:54] [spoiler]: Well, the APIs are very similar; if you learn either you can easily adapt to the other in terms of the C api
[16:05:21] [spoiler]: the language is *essentially* the same (both are Ruby, but mruby doesn't support some features because it's designed to work on embedded systems)
[16:07:14] [spoiler]: also, with mruby you might need to sometimes tango with the gc arena
[16:07:24] [spoiler]: in case you generate a lot of objects
[16:07:30] troulouliou_div2: has joined #ruby
[16:08:08] devoldmx: has joined #ruby
[16:08:09] [spoiler]: `int mrb_gc_arena_save(mrb)l and `mrb_gc_arena_restore(mrb, int);` are your friends
[16:08:12] troulouliou_div2: has joined #ruby
[16:09:17] Channel6: has joined #ruby
[16:10:54] Scripore: has joined #ruby
[16:10:56] Igor2__: good, thanks for the idea
[16:10:57] Oka: has joined #ruby
[16:11:01] Igor2__: ACTION is saving the irc log
[16:11:26] Igor2__: especially because of the multiple instance support, i think i'll go for mruby first
[16:11:34] pyon-nanon: has joined #ruby
[16:11:58] [spoiler]: `int arena_offset = mrb_gc_arena_save(mrb); /* generate lots of bullshit objects */ mrb_gc_arena_restore(mrb, arena_offset);
[16:12:19] sinkensabe: has joined #ruby
[16:13:06] [spoiler]: any Ruby object generated between these two will be destroyed
[16:13:50] [spoiler]: *unless* there's a live reference to it
[16:14:11] [spoiler]: (is a reference from a previously generated object)
[16:14:13] leat: has joined #ruby
[16:14:53] hobodave: has joined #ruby
[16:14:55] Igor2__: I think the C part won't create dyamic objects (there are no communication through variables or antyhing like that)
[16:15:11] linuxboytoo: has joined #ruby
[16:15:15] [spoiler]: That's good then
[16:15:19] ylluminarious: has joined #ruby
[16:16:21] shevy: we need more C gurus in ruby
[16:16:45] dcarmich: has joined #ruby
[16:16:57] farn: has joined #ruby
[16:17:28] punkerplunk: has joined #ruby
[16:17:44] jhass: shevy: because Ruby is so slow? :P
[16:17:51] ndrei: has joined #ruby
[16:17:53] Igor2__: at least the user/developer support is excellent so far
[16:17:55] Timba-as: has joined #ruby
[16:17:57] nofxx: has joined #ruby
[16:18:18] [spoiler]: jhass, shevy: lol
[16:18:52] [spoiler]: jhass: It's not slow, it just likes to take its time :)
[16:19:00] AlexAltea: has joined #ruby
[16:19:02] [spoiler]: Y'know, there's no need to rush things
[16:19:10] jhass: I know I know
[16:19:12] Torrieri: has joined #ruby
[16:19:15] [spoiler]: It has a "take it easy" attitude
[16:19:30] jhass: I have Crystal for when I need to rush
[16:19:39] ta: has joined #ruby
[16:19:45] [spoiler]: Ooh I played with that actually, Crystal is <3
[16:20:09] khebbie: has joined #ruby
[16:20:13] Maletor: has joined #ruby
[16:20:23] [k-_: Hindley Millner is <3
[16:20:25] punkerplunk: guys, I need help. Suppose I have an ordered array of numerics and I have this other value and I want to find the index for the nearest number in the array. How would that look?
[16:21:01] [spoiler]: ACTION waits for someone to do questionmarkguys
[16:21:18] punkerplunk: I'm sure there is a regular expression
[16:21:21] ruboto: I don't know anything about guis
[16:21:29] gambl0re: has joined #ruby
[16:21:40] dfockler: punkerplunk: are they numeric strings?
[16:21:48] punkerplunk: they are ints
[16:21:49] [spoiler]: punkerplunk: how about array.index number
[16:21:49] jhass: punkerplunk: mmh, only have a O(3n) algo in mind: map to distance, find minimum, find index in distance map
[16:21:59] OrbitalKitten: has joined #ruby
[16:22:00] jhass: [spoiler]: closest
[16:22:01] dangerousdave: has joined #ruby
[16:22:06] [spoiler]: what does closest mean
[16:22:07] joonty: has joined #ruby
[16:22:21] dfockler: what if it's equal between two numbers?
[16:22:22] apeiros: O(3n) is still O(n) ;-)
[16:22:29] punkerplunk: the number I have is not necessary contained in the array
[16:22:40] [spoiler]: Okay i get it
[16:22:40] [k-_: fiddlesticks
[16:22:48] punkerplunk: it could be between two numbers, yeah
[16:22:54] jhass: now that we helped
[16:22:57] jhass: ?guys punkerplunk
[16:22:57] ruboto: punkerplunk, You probably don't mean to exclude, but not everyone relates to being "one of the guys". Maybe consider using "folks", "y'all" or "everyone" instead?
[16:23:17] hoelzro: you could use a binary search to find the index where the number *would* reside, and compare the number at that index, or adjacent indices
[16:23:17] apeiros: the numbers are ordered - then you can do in O(logn)
[16:23:20] apeiros: binary search
[16:23:29] apeiros: even in stdlib/core now
[16:23:37] punkerplunk: sorry! omg I even went to school in oregon and I forgot my pronoun ediquite!
[16:23:37] Igor2__: [spoiler]: I'm off now, thanks again for the support. I may be back to ask more questions
[16:23:48] ndrei: has joined #ruby
[16:23:48] Hanmac: has joined #ruby
[16:23:55] [spoiler]: Igor2__: good luck with your project! :)
[16:24:00] Igor2__: thank you!
[16:24:02] punkerplunk: numbers are ordered
[16:24:14] apeiros: &ri Array#bsearch
[16:24:14] `derpy: http://www.rubydoc.info/stdlib/core/Array#bsearch-instance_method
[16:24:18] apeiros: punkerplunk: ^
[16:24:25] ChoiKyuSang: has joined #ruby
[16:24:43] apeiros: punkerplunk: yupp, I read that. I said it as a fact :)
[16:24:58] jhass: meh, now I wonder what's faster on unsorted, sorting first and doing bsearch or calculating distances
[16:25:01] apeiros: maybe could have worded it better (the numbers are ordered, therefore you can ???)
[16:25:01] mleung: has joined #ruby
[16:25:17] [spoiler]: ok but I am confused. What if someone searches for number `2.5` and there are `1.5` and `3.5` in the array? Which one is closer? :/
[16:25:20] apeiros: jhass: on unsorted, sorting first scales worse
[16:25:25] apeiros: sorting is nlogn
[16:25:33] apeiros: whereas 3 passes is n
[16:25:51] jhass: but in reality the extra array alloc would probably kill it
[16:25:57] ybian: has joined #ruby
[16:26:00] bradland: [spoiler]: that's exactly what I was thinking. going to have to calculate the difference in order to determine closeness.
[16:27:01] apeiros: [spoiler]: matter of definition
[16:27:25] ybian: has joined #ruby
[16:27:27] punkerplunk: okay, i'll do some tests with bsearch
[16:27:30] apeiros: mathematically, both have the same distance of course. but you define what you want back in such a situation.
[16:27:50] apeiros: same problem with repeat numbers, if the list isn't unique.
[16:28:05] punkerplunk: I suppose it would be enough to have the value, not strictly the index
[16:28:27] apeiros: punkerplunk: afair bsearch supports returning the index
[16:28:31] punkerplunk: we can assume I have time to unique and sort the array if needed
[16:28:38] leafybasil: has joined #ruby
[16:29:20] dkphenom: has joined #ruby
[16:29:58] pyon-nanon: has joined #ruby
[16:30:20] Asher: has joined #ruby
[16:31:02] ybian: has joined #ruby
[16:31:07] dorei: has joined #ruby
[16:31:15] chipotle: has joined #ruby
[16:31:49] michaeldeol: has joined #ruby
[16:31:54] [spoiler]: zoehe texted me again :(
[16:32:16] [k-_: apeiros: no one uses afair
[16:32:22] punkerplunk: thanks YA'LL much love unto its
[16:32:24] [spoiler]: ACTION pretends nothing happened.
[16:32:32] dfockler: [spoiler]: huh?
[16:32:35] apeiros: [k-_: correct. I use it.
[16:32:40] [spoiler]: I use AFAIR
[16:32:48] apeiros: oh wait, you said no one. you should have said nobody.
[16:32:50] apeiros: now you're just wrong.
[16:32:52] lannonbr: has joined #ruby
[16:33:18] ybian: has joined #ruby
[16:33:33] dopie: has joined #ruby
[16:34:42] rehat: has joined #ruby
[16:35:40] rideh: has joined #ruby
[16:35:42] MatthewsFace: has joined #ruby
[16:38:50] startupality: has joined #ruby
[16:40:25] michael_mbp: has joined #ruby
[16:40:56] wheresmyjetpack: has joined #ruby
[16:41:22] chills42: has joined #ruby
[16:42:46] kaps: http://hastebin.com/ficejowuve.tex can anyone help me with this server code
[16:42:57] kaps: it wont send response to browser
[16:43:31] govg: has joined #ruby
[16:43:36] adaedra: why did you copy the file numbers in the paste ;_;
[16:43:37] jhass: why paste with line numbers
[16:43:48] shevy: so that you can know where the paste ends!
[16:44:07] jhass: so, is this a game? guess the error message?
[16:44:22] shevy: kaps the problem is that with line numbers, other people can not run the code without getting rid of them
[16:44:49] kaps: oh sorry haven't seen that
[16:44:56] raypulver: has joined #ruby
[16:44:59] deol: has joined #ruby
[16:45:18] jhass: kaps: is this supposed to get something real world or are you just playing with reimplementing HTTP?
[16:45:23] ivanskie: has joined #ruby
[16:45:31] kaps: just playing
[16:46:24] jhass: does the 404 case work?
[16:46:38] rbennacer: has joined #ruby
[16:46:43] kaps: https://gist.github.com/anonymous/81f1187084f6fb6f0068
[16:46:48] kaps: no 404 does not work
[16:46:56] ramfjord: has joined #ruby
[16:46:57] kaps: but stderr output is fine
[16:47:43] khebbie: has joined #ruby
[16:47:54] alphaatom: has joined #ruby
[16:48:07] jhass: curl says curl: (18) transfer closed with 19 bytes remaining to read
[16:48:15] jhass: so I guess you should flush before you close
[16:48:29] hotpancakes: has joined #ruby
[16:48:33] pyon-nanon: has joined #ruby
[16:48:56] johnathon: has joined #ruby
[16:48:57] jhass: mmh, no that doesn't help
[16:49:36] paulcsmith: has joined #ruby
[16:49:43] rakm: has joined #ruby
[16:49:52] jhass: kaps: ah, you miss the blank line between the headers and the body
[16:50:10] jhass: the headers should be terminated by \r\n\r\n, not \r\n
[16:50:53] rickmasta: has joined #ruby
[16:51:04] allcentury: has joined #ruby
[16:51:39] kaps: damn still nothing
[16:52:16] jhass: mmh, I left the flush in, maybe it's both
[16:52:31] kaps: how to add flush
[16:52:35] jhass: socket.flush
[16:52:50] kaps: at the end right ?
[16:52:58] anisha: has joined #ruby
[16:53:00] jhass: before the .close
[16:53:31] tomphp_: has joined #ruby
[16:53:35] kaps: but still nothing
[16:53:41] Meow-J: has joined #ruby
[16:53:42] yfeldblum: has joined #ruby
[16:53:50] jhass: at least the 404 case works here then
[16:54:05] kaps: on chromiun nothing also
[16:54:23] kaps: can you paste your changes
[16:55:01] jhass: literally just the flush and adding \r\n
[16:55:16] fowl: has joined #ruby
[16:55:41] fowl: !guys | fowl
[16:55:49] fowl: Hey guys
[16:56:01] fowl: Show me the sexism messahe plz
[16:56:16] fowl: Jhass is enforcing summary judgement in #ruby-offtopic
[16:56:43] jhass: !mute fowl
[16:56:43] ruboto: +q fowl!*@*
[16:56:43] ruboto: -o ruboto
[16:56:53] jhass: here neither, discuss bans in #ruby-banned
[16:56:56] blueOxigen: has joined #ruby
[16:57:32] sepp2k: has joined #ruby
[16:58:32] dfockler: Is there a way for a child thread to communicate back to the parent thread?
[16:58:55] adaedra: in what? fork? thread?
[16:58:59] andersh: has joined #ruby
[16:59:00] adaedra: oops, misread
[16:59:10] bronson: has joined #ruby
[16:59:52] kaps: it works now
[17:00:00] kaps: i copied the code from tut site
[17:00:06] OrbitalKitten: has joined #ruby
[17:00:09] [k-_: 1. globals, 2. thread variables, 3. shared objects (MessageQueues)
[17:02:03] towski_: has joined #ruby
[17:02:14] tkuchiki: has joined #ruby
[17:03:27] porfa: has joined #ruby
[17:04:03] jpfuentes2: has joined #ruby
[17:04:12] jhass: dfockler: there's no real such thing as child and parent threads, there's the main thread but that's nothing special beyond being the first one and automatically spawned by the OS
[17:04:36] failshell: has joined #ruby
[17:04:46] dfockler: so I can just return a value from the thread and it should work ok?
[17:05:01] jhass: communicate by the standard threading primitives, queues, shared locked datastructures, exchangers etc
[17:05:06] [spoiler]: Where would it be returned?
[17:05:27] dfockler: I'm basically collecting the results after each thread is complete
[17:05:37] wasamasa: TIL that an exception in a ruby thread does neither terminate the thread nor show an exception
[17:05:38] gambl0re: has joined #ruby
[17:05:39] havenwood: Rinda::TupleSpaces
[17:05:51] mikecmpbll: has joined #ruby
[17:06:00] bnagy: wasamasa: there's methods for that
[17:06:00] havenwood: wasamasa: Thread.abort_on_exception = true
[17:06:07] wasamasa: havenwood: yeah, I've set that for debugging
[17:06:11] vt102: has joined #ruby
[17:06:15] wasamasa: havenwood: still, I thought everything was fine and dandy
[17:06:31] bnagy: ruby is basically not very good at real threads
[17:06:54] bnagy: it's even more amusing when you look at MRI vs jruby
[17:07:01] wasamasa: doesn't matter for the task, I'm just surprised about this behaviour
[17:07:14] startupality: has joined #ruby
[17:07:17] [spoiler]: rbx does it nicely actually
[17:07:21] kaps: has left #ruby: ()
[17:07:22] [spoiler]: not sure about jruby
[17:07:33] jhass: dfockler: .map(&:value)
[17:07:33] bnagy: well traditional threads, imho, are fire and forget
[17:07:34] [spoiler]: never looked, since I'm not a java fan
[17:07:48] bnagy: so you never expect to hear from them again
[17:08:11] bricker: has joined #ruby
[17:08:11] dfockler: jhass: cool thanks, I think it worked
[17:08:34] [spoiler]: bnagy: well, that's why callbacks exist
[17:08:54] bnagy: what's a "callback" in ruby?
[17:09:05] [spoiler]: I don't mean in ruby, i was speaking generally
[17:09:17] choke: has joined #ruby
[17:10:06] pawnbox: has joined #ruby
[17:11:33] user1138: has joined #ruby
[17:12:21] dfockler: a callback in ruby is whatever is waiting for your method to finish
[17:15:01] sross07: has joined #ruby
[17:16:57] blackmesa: has joined #ruby
[17:17:18] mistermocha: has joined #ruby
[17:18:23] khebbie: has joined #ruby
[17:18:37] rbennacer: has joined #ruby
[17:19:54] ItSANgo: has joined #ruby
[17:20:04] juanpaucar: has joined #ruby
[17:20:58] tubuliferous_: has joined #ruby
[17:21:12] DanielI: has joined #ruby
[17:22:00] dgutierrez1287: has joined #ruby
[17:24:07] universa1: has joined #ruby
[17:24:08] TomyLobo: has joined #ruby
[17:24:21] psye: has joined #ruby
[17:24:23] porfa: hello I'm doing some mechanize tutorial on how to fill forms and submit them..
[17:24:28] porfa: here's my gist https://gist.github.com/anonymous/e9f99140d758c0a9cee6
[17:24:51] porfa: the error i get is "ArgumentError: wrong number of arguments (1 for 0)"
[17:25:05] porfa: can't i pass the data i want in the forms by argument?
[17:25:13] jhass: Porfa: line number?
[17:25:16] hotpancakes: has joined #ruby
[17:25:20] psye: has joined #ruby
[17:25:42] jhass: so fields doesn't take an argument
[17:26:40] [spoiler]: Maybe it returns an enumerator, Porfa (so it could accept a block, perhaps)
[17:26:49] [spoiler]: Are you following a tutorial?
[17:26:59] jhass: http://www.rubydoc.info/gems/mechanize/Mechanize/Form#fields-instance_method
[17:27:02] porfa: (not anymore, it got way to complicated for what i was doing)
[17:27:16] jhass: I think you want http://www.rubydoc.info/gems/mechanize/Mechanize/Form#[]%3D-instance_method
[17:27:20] porfa: thank you jhass
[17:27:39] porfa: how do i submit ? the error continues :/
[17:27:52] porfa: fill.rb:23:in `<main>': undefined method `submit' for main:Object (NoMethodError)
[17:28:06] mleung: has joined #ruby
[17:28:19] jhass: http://www.rubydoc.info/gems/mechanize/Mechanize/Form#submit-instance_method
[17:28:21] ruby-lang103: has joined #ruby
[17:31:06] andersh: has joined #ruby
[17:31:13] ramfjord: has joined #ruby
[17:32:26] sargas: has joined #ruby
[17:32:43] rideh: has joined #ruby
[17:33:23] kirun: has joined #ruby
[17:33:43] MasterPiece: has joined #ruby
[17:34:44] millerti: has joined #ruby
[17:38:46] chabil: has joined #ruby
[17:38:54] jamto11: has joined #ruby
[17:39:44] msnyon: has joined #ruby
[17:42:57] casadei: has joined #ruby
[17:43:48] startupality: has joined #ruby
[17:45:18] jamto11: has joined #ruby
[17:45:27] Timba-as: has joined #ruby
[17:48:14] rideh: has joined #ruby
[17:48:36] big|bad|wolf: has joined #ruby
[17:49:34] arturhoo: has joined #ruby
[17:49:56] conor_: has joined #ruby
[17:51:46] TomyLobo: as any electrician would tell you, there is no such thing as partially grounded
[17:52:04] TomyLobo: whoops, i was scrolled up
[17:52:16] eam: it's good advice regardless
[17:52:42] TomyLobo: it was in reply to this: <rehat> Radar: The Well-Grounded Rubyist
[17:52:42] TomyLobo: <Radar> rehat: Yeah read all of it otherwise you will only be partially grounded
[17:53:01] tubbo: has joined #ruby
[17:53:12] tubbo: is there a method i can override that's basically "method_missing for constants"?
[17:53:31] shevy: not sure that this can be possible
[17:53:34] tubbo: like say someone refers to a class called Product, but if that class doesn't exist, I want to replace it with something else
[17:53:38] shevy: remember, in class Foo Foo is also a constant
[17:53:43] kenichi: how about Kernel.const_get and rescue a NameError
[17:53:52] shevy: you could try to rescue the exception
[17:54:02] stoodfarback: Object.const_missing
[17:54:27] startupality: has joined #ruby
[17:54:28] tubbo: so here's what i want to do, essentially: I want to have a class, say Product...gonna initially ship that class in MyEngine::Product, but i want a host app to just be able to do class Product < MyEngine::Product to override it
[17:54:32] rideh: has joined #ruby
[17:54:38] tubbo: in the controller, it will be referred to as @products = Product.all
[17:54:57] tubbo: lol sorry forgot this was just #ruby :P
[17:55:36] tubbo: stoodfarback: thank you
[17:55:41] big|bad|wolf: has joined #ruby
[17:55:50] havenwood: http://ruby-doc.org/core/Module.html#method-i-const_missing
[17:56:21] tsvenson: has joined #ruby
[17:56:30] codecop: has joined #ruby
[17:57:32] towski__: has joined #ruby
[18:00:40] rideh: has joined #ruby
[18:00:41] pietr0_: has joined #ruby
[18:00:56] TomyLobo: https://docs.atlassian.com/jira/REST/latest/#d2e737 woohoo, atlassian can write docs
[18:00:58] scottschecter: has joined #ruby
[18:01:15] howdoico1: has joined #ruby
[18:01:17] niemcu: has joined #ruby
[18:01:42] postmodern: has joined #ruby
[18:05:18] pyrotecnix: has joined #ruby
[18:06:27] mordocai: has joined #ruby
[18:07:58] fantazo: has joined #ruby
[18:08:39] elton: has joined #ruby
[18:08:44] skade: has joined #ruby
[18:08:54] devoldmx: has joined #ruby
[18:09:02] sinkensabe: has joined #ruby
[18:10:07] noethics: has joined #ruby
[18:10:31] gard: has joined #ruby
[18:11:34] n008f4g_: has joined #ruby
[18:11:59] big|bad|wolf: has joined #ruby
[18:12:26] TomyLobo: is there a shorter version of myhash.map { |entry| entry['key'] }?
[18:12:42] miah: myhash.keys
[18:12:45] TomyLobo: is there a shorter version of myarrayofhashes.map { |entry| entry['key'] }?
[18:12:46] bruno-: has joined #ruby
[18:12:51] hobodave: has joined #ruby
[18:13:41] lannonbr: has joined #ruby
[18:14:00] TomyLobo: not structurally shorter anyway, i guess :)
[18:14:18] shevy: best is to have simple datastructures in the first place
[18:14:25] juanpaucar: has joined #ruby
[18:14:25] TomyLobo: tell atlassian
[18:14:35] jackjackdripper: has joined #ruby
[18:14:36] startupality: has joined #ruby
[18:14:44] elton: has joined #ruby
[18:14:54] TomyLobo: @jira.get("/search?fields=key&jql=project%3D#{params[:project]}")['issues'].map { |entry| entry['key'] }
[18:15:10] andersh: has joined #ruby
[18:15:54] shevy: does this code make you happy
[18:16:26] TomyLobo: it makes my jira fuse driver work and that makes me happy
[18:17:30] jackjackdripper: has joined #ruby
[18:17:37] DLSteve: has joined #ruby
[18:19:14] stoodfarback: TomyLobo: I like `its-it`: `.map(&it['key'])
[18:19:43] chinmay_dd: has joined #ruby
[18:19:57] TomyLobo: stoodfarback, is that an extra gem i need?
[18:20:01] chills42: has joined #ruby
[18:20:12] govg: has joined #ruby
[18:20:40] ndrei: has joined #ruby
[18:20:58] stoodfarback: TomyLobo: It is indeed a gem. I happen to like it quite a bit, but you don't have to use it.
[18:21:56] TomyLobo: anyway, here's the source: https://github.com/TomyLobo/jirafuse/
[18:22:45] TomyLobo: so far it only lists comments :)
[18:22:56] startupality: has joined #ruby
[18:22:56] TomyLobo: route_add :read, '/projects/:project/issues/:issue/comments/:comment', to: :read_comment
[18:23:05] renanoronfle: has joined #ruby
[18:23:16] alphaatom: has joined #ruby
[18:24:38] zitar: has joined #ruby
[18:24:41] tubuliferous_: has joined #ruby
[18:25:17] anisha: has joined #ruby
[18:26:32] kidoz: has joined #ruby
[18:26:53] MikeKuntz: has joined #ruby
[18:27:04] MikeKuntz: does anyone know the difference between or and and in sql?
[18:27:21] tkuchiki: has joined #ruby
[18:27:32] tcrypt: has joined #ruby
[18:27:46] TomyLobo: is that a trick question?
[18:27:52] shevy: isn't it the same as in a programming language?
[18:28:00] Antiarc: (Chance of troll: 99.97348%)
[18:28:13] jhass: There's #sql
[18:29:14] hotpancakes: has joined #ruby
[18:29:30] MikeKuntz: because if you do select * from days where days > 5 or days = 7 it will give you back days greater than 5 AND the days that are 7
[18:29:49] MikeKuntz: i'm confused
[18:29:51] ljarvis: MikeKuntz: this is not a channel to discuss SQL. Please try #sql or join #ruby-offtopic
[18:30:15] TomyLobo: MikeKuntz, and if you use and instead of or, you get only the days that are 7
[18:30:46] MikeKuntz: thanks TomyLobo could we take this conversation to the offtopic channel before we get banned please?
[18:31:35] zitar: has joined #ruby
[18:33:00] ascarter: has joined #ruby
[18:33:16] Mendenhall: has joined #ruby
[18:33:52] OrbitalKitten: has joined #ruby
[18:33:53] quimrstorres: has joined #ruby
[18:33:54] zitar: has joined #ruby
[18:33:54] gregf: has joined #ruby
[18:34:15] Musashi007: has joined #ruby
[18:34:29] i_care: has joined #ruby
[18:34:46] i_care: any girls from UK ?
[18:35:34] hololeap: has joined #ruby
[18:35:37] yfeldblum: has joined #ruby
[18:35:58] vF3hNGxc47h5: has joined #ruby
[18:36:05] ndrei: has joined #ruby
[18:37:20] SCHAAP137: has joined #ruby
[18:37:26] JimmyNeutron: has joined #ruby
[18:37:31] big|bad|wolf: has joined #ruby
[18:39:31] bruno-: has joined #ruby
[18:39:55] jhass: i_care: welcome to the Ruby programming language channel, how's your Ruby?
[18:39:59] freerobby: has joined #ruby
[18:42:25] roolo: has joined #ruby
[18:45:11] solars: has joined #ruby
[18:47:38] Cust0sLim3n: has joined #ruby
[18:49:02] swgillespie: has joined #ruby
[18:49:58] TomyLobo: you dont ask other people about their Ruby, that's naughty
[18:50:54] whippythellama: has joined #ruby
[18:51:45] arup_r: has joined #ruby
[18:53:58] az7ar: has joined #ruby
[18:54:02] bmurt: has joined #ruby
[18:56:38] ramfjord: has joined #ruby
[18:57:07] allcentury: has joined #ruby
[18:58:24] autrilla: has joined #ruby
[18:58:38] chills42: has joined #ruby
[18:59:27] tkuchiki_: has joined #ruby
[19:00:30] hotpancakes: has joined #ruby
[19:00:41] Adran: has joined #ruby
[19:01:06] roolo_: has joined #ruby
[19:01:29] jordanm: has joined #ruby
[19:01:32] wldcordeiro: has joined #ruby
[19:01:38] bradland: anyone try rbkit? is it a rabbit hole, or reasonably usable?
[19:01:48] bradland: ref: http://rbkit.codemancers.com
[19:02:24] nfk: has joined #ruby
[19:04:57] shinnya: has joined #ruby
[19:06:19] jeremy04_: has joined #ruby
[19:07:17] josh3: has joined #ruby
[19:07:26] andersh: has joined #ruby
[19:07:29] cpruitt: has joined #ruby
[19:07:53] pawnbox: has joined #ruby
[19:09:05] jpfuentes2: has joined #ruby
[19:09:06] JoshL: has joined #ruby
[19:09:16] kadoppe: has joined #ruby
[19:10:27] sinkensabe: has joined #ruby
[19:12:11] wldcordeiro_: has joined #ruby
[19:13:17] hahuang61: has joined #ruby
[19:13:21] maxiu: has joined #ruby
[19:14:51] ItSANgo: has joined #ruby
[19:14:59] duderonomy: has joined #ruby
[19:15:20] bradland: wow, it seems to work as advertised
[19:15:25] blue_deref: has joined #ruby
[19:15:33] bradland: it's so easy i'm suspicious
[19:15:56] sargas: has joined #ruby
[19:16:00] miah: rbkit looks neat, i havent used it.
[19:16:10] n_blownapart: has joined #ruby
[19:16:33] bradland: literally gem install rbkit, drop a require in your app and Rbkit.start_profiling
[19:16:50] bradland: well, you have to grab the rbkit-client app, which was easy enough on OS X
[19:16:59] bradland: then... ZOMG graphs @_@
[19:17:02] pawnbox: has joined #ruby
[19:17:50] einarj: has joined #ruby
[19:18:19] miah: there is also; https://github.com/ruby-prof/ruby-prof which seems to do more
[19:18:38] bradland: ruby-prof is really nice too
[19:18:42] Hanmac: i dont think profiling would work for my stuff because i mostly use compiled stuff ... i dont think profiler are good for that too
[19:18:50] bradland: but the ZOMG graphs that rbkit provides is so slick
[19:19:02] miah: profilers exist for compiled languages too
[19:19:28] miah: https://en.wikipedia.org/wiki/Gprof
[19:19:38] bradland: yeah hanmac, i'm not sure how the new Ruby profiling features handle C extensions
[19:20:18] miah: i'd imagine you'd have to profile the C code with something else (like gprof) and then ruby-prof your adapter
[19:20:40] Hanmac: miah ... the problem is how to profile my binding, and not profile the library below (so i detect only my bugs) or other libraries where the library below is build against
[19:21:12] Hanmac: i never worked with profilers deep enough to work something like that out
[19:21:14] miah: seems very tricky
[19:22:03] codecop: has joined #ruby
[19:22:18] ndrei: has joined #ruby
[19:22:57] burgestrand: You can profile Ruby C code quite nicely (and your own bindings), assuming you install debug symbols for the Ruby source and compile your binding with GDB symbols enabled.
[19:23:09] banister: Burgestrand lol, ltns
[19:23:14] banister: Burgestrand what u been doing these days
[19:23:22] burgestrand: I've used https://github.com/tmm1/perftools.rb in the past to do it for my own C stuff!
[19:23:51] sdwrage: has joined #ruby
[19:23:52] jbw: has joined #ruby
[19:23:57] yqt: has joined #ruby
[19:24:02] burgestrand: banister: indeed! Been working with Ruby professionally which made it less attractive to sit with Ruby at home. :)
[19:24:15] banister: Burgestrand me too
[19:24:18] burgestrand: Burgestrand: and I don't hang out on IRC during work hours ;)
[19:24:19] banister: Burgestrand still in sweden?
[19:24:26] burgestrand: ??? nice to mention myself, derp.
[19:24:33] burgestrand: banister: Yep, still in Sweden!
[19:24:42] amclain: has joined #ruby
[19:24:47] banister: Burgestrand i'm now in netherlands, not sure i mentioned that last time we talked
[19:24:49] burgestrand: banister: You got out of your island though didn't you? I recall you had plans.
[19:24:55] banister: living in NL
[19:25:26] burgestrand: banister: You miss living in LOTR-land?
[19:25:32] gamename: has joined #ruby
[19:25:37] banister: Burgestrand yes, NL has no mountains or landscape to speak of
[19:25:40] banister: it's just flat, flat flat
[19:25:45] banister: exceptionally boring place
[19:25:51] rickmasta: has joined #ruby
[19:26:09] burgestrand: Haha, yes, tulip land all over the place
[19:27:33] ndrei: has joined #ruby
[19:27:44] Scripore: has joined #ruby
[19:29:02] jbw: has joined #ruby
[19:29:35] braincra-: has joined #ruby
[19:29:43] linuxboy_: has joined #ruby
[19:29:45] banister: Burgestrand i'm going to visit visby in gotland soon
[19:29:48] banister: have you been there?
[19:30:55] NeverDie: has joined #ruby
[19:31:10] burgestrand: banister: Cool! You going for the medieval week? I haven't been on the island itself, but I'd like to visit some time, there's lots of places there allegedly named by my ancestors.
[19:31:20] banister: Burgestrand no, just because of kiki
[19:31:29] mistermocha: has joined #ruby
[19:32:02] burgestrand: banister: Ha, TIL.
[19:32:18] banister: ha you googled?
[19:32:27] burgestrand: banister: professional programmer always googles ;)
[19:32:35] alphaatom: has joined #ruby
[19:32:44] burgestrand: banister: apparently medieval week was last week
[19:32:48] momomomomo: has joined #ruby
[19:33:08] jbw: has joined #ruby
[19:33:23] burgestrand: banister: once a year the Gotland island has a medieval festival with all kinds of things, tour games, theaters, markets etc.
[19:33:49] Maletor: has joined #ruby
[19:33:52] Jackneill: has joined #ruby
[19:34:57] banister: Burgestrand any interesting OSS you're working on or so?
[19:35:10] devn: has joined #ruby
[19:35:15] jbw: has joined #ruby
[19:35:19] unver: has joined #ruby
[19:35:43] unver: Hi, can I shorten this method somehow? http://hastebin.com/owiresufet.rb
[19:35:48] devn: is there anything for ruby that I could use to take some existing code, and automatically log /all the things/, results of if statements, method calls, variable values, etc?
[19:35:48] JakFrist: has joined #ruby
[19:35:57] burgestrand: banister: don't think so! looking at elixir at the moment.
[19:36:07] ddubs: has joined #ruby
[19:36:10] jhass: devn: seeing_is_believing
[19:36:36] OrbitalKitten: has joined #ruby
[19:36:38] burgestrand: unver: for one you could use flat_map!
[19:36:40] banister: jhass that's more of an interactive thing though isn't it?
[19:36:46] ddubs: hey guys, before i go reinventing the wheel, I need to create a gem that can work with a 3rd party REST API that provides hypermedia links in the JSON
[19:36:51] unver: Burgestrand: ooh, nice, that's what I'm talking about
[19:36:56] tmtwd: has joined #ruby
[19:37:03] ddubs: is ther ea library that can parse the JSON and create methods that map to those links/actions for me?
[19:37:30] burgestrand: devn: only thing I can think of is thte tracepoint API: http://ruby-doc.org/core-2.0.0/TracePoint.html
[19:38:03] woobywoob: has joined #ruby
[19:38:03] jhass: unver: I'm confused, your .flatten! ensures there are no arrays left, yet you use empty array as default/fallback?
[19:38:29] woobywoob: is there an elegant way to put a parameter in a method if it exists?
[19:38:58] jhass: woobywoob: def foo(param=default) ?
[19:39:05] unver: jhass: [].flatten returns []
[19:39:23] woobywoob: such as someMethod(@animal, @car, @chocolate if @chocoloate if isn't blank)
[19:39:46] unver: jhass: ugh, but not flatten! thanks for the eye
[19:39:54] jhass: unver: yes, and [].first returns nil, [1].first returns 1, so a.flatten.first || [] confuses me
[19:40:11] burgestrand: unver: the return value isn't interesting since you're not using it :)
[19:40:33] woobywoob: it's different because i have to check if it's blank or not
[19:40:33] jhass: woobywoob: how is blank defined?
[19:40:44] burgestrand: unver: but jhass is correct since you're effectively making sure that you temp.first can never be an array, since you first flatten temp.
[19:40:47] woobywoob: it's a string
[19:41:05] jhass: woobywoob: so?
[19:41:12] unver: jhass: Burgestrand: I see, that is a silly return
[19:41:14] ddubs: anyone know if there is a gem that can take a REST JSON response and dynamically create "methods" that map the the "link": "whatever" items in the JSON response?
[19:41:35] woobywoob: i mean i guess i could use nil? rather than blank
[19:41:42] alphaatom: has joined #ruby
[19:41:47] burgestrand: ddubs: no personal experience, but perhaps googling for JSON API client, assuming your API is following the JSON API specification?
[19:41:54] woobywoob: bui just don't know how to go about doing this with multiple parameters
[19:41:56] jhass: woobywoob: nil isn't a string, so my question remains, how do you define blank?
[19:41:59] haylon: ddubs: do you have an example of the JSON you're sending, or receiving?
[19:42:09] ddubs: yea i just dont want to do a whole bunch of manual work and meta programming to achieve it
[19:42:18] ddubs: so was hoping it had been done
[19:42:19] woobywoob: blank? is nil, false or ""
[19:42:22] ddubs: ROAR gem looked promising
[19:42:25] banister: woobywoob or []
[19:42:33] banister: woobywoob and {}
[19:42:34] ddubs: but it appears its for generating apis
[19:42:41] skade: has joined #ruby
[19:42:43] devn: jhass: hmm, im looking to run this across a bunch of code, and hit it from the outside
[19:42:44] ddubs: haylon: sec
[19:42:46] jhass: woobywoob: so you're inside Rails/ActiveSupport and want that definition of blank?
[19:42:47] alphaatom: has joined #ruby
[19:42:53] burgestrand: woobywoob: my_method(@cat, @dog, *@optional.presence)
[19:43:12] devn: jhass: the lib example shows wrapping your code in a string
[19:43:30] yardenbar: has joined #ruby
[19:43:33] pfish: has joined #ruby
[19:43:35] burgestrand: It's a bit weird, but sure that'll call with either two arguments or three arguments depending on if @optional is blank or not.
[19:43:41] ndrei: has joined #ruby
[19:43:48] pfish: is there a place in the c code where global variables are stored?
[19:43:56] burgestrand: pfish: what C code?
[19:44:09] pfish: specifically
[19:44:30] pfish: like is there a function that is called to store a value in a global variable?
[19:44:35] woobywoob: thanks Burgestrand, that worked
[19:44:40] Thermatix: has joined #ruby
[19:44:51] Torrieri: has joined #ruby
[19:44:55] woobywoob: i knew of that method but for some reason i asked before trying it out
[19:44:56] ddubs: haylon: http://pastebin.com/8b1Af2Nx
[19:44:57] ruboto: ddubs, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/3f6c4dbffb41ff923ee2
[19:44:57] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[19:45:03] burgestrand: pfish: there's a C API to store a global, yes! I can't recall the name yet though.
[19:45:25] chabil: has joined #ruby
[19:45:30] woobywoob: that's neat how the bot reposts to gists
[19:45:55] dmmoody_: has joined #ruby
[19:46:02] code1o6: has joined #ruby
[19:46:10] burgestrand: pfish: https://github.com/ruby/ruby/blob/trunk/doc/extension.rdoc#global-variables-shared-between-c-and-ruby
[19:46:46] burgestrand: pfish: reading your question again perhaps that wasn't what you asked for. What do you want to do?
[19:46:58] ddubs: haylon: so if you check that json there is a bunch of items with reference links - those are like sub objects that I should be able to retreive by just doing a get
[19:47:23] davedev24: has joined #ruby
[19:47:39] haylon: And you're wanting to go through the Json structure and then if you reach a "link" get that link, and do whatever you need to with it?
[19:48:01] ddubs: i'm looking for something that can iterate those references and create something like object.endpoint.pools and perform a method against it when I call it
[19:48:02] krz: has joined #ruby
[19:48:10] unver: This should work, right? http://hastebin.com/vonuqeboso.avrasm
[19:48:29] jhass: oO why avrasm
[19:48:29] haylon: Ahh, got ya, I think I have an example. Let me dig it up. i'm currently at work, so it might take a bit
[19:48:36] ddubs: np! thanks!
[19:48:49] unver: jhass: idk, picked it did that automatically
[19:48:58] jeremy04: has joined #ruby
[19:49:00] dgutierrez1287: has joined #ruby
[19:49:01] haylon: ddubs: you're using the json libraries and stuff right?
[19:49:04] dmmoody: has joined #ruby
[19:49:29] jhass: unver: yes, gotchas: it creates more arrays, flat_map is more like .map { }.flatten(1) instead of .map { }.flatten
[19:50:10] unver: jhass: oh, so it can still contain deeper nested arrays
[19:50:14] mandarinkin: has joined #ruby
[19:50:31] shevy: jhass are you working on some cool project lately?
[19:50:37] ddubs: right now json and rest-client
[19:50:46] jhass: shevy: last one was http://carc.in
[19:50:47] mandarinkin: how increase each element of array by 1
[19:50:59] jhass: mandarinkin: what did you try so far?
[19:51:11] ytti: json library should have option to force ijson compliency
[19:51:16] mandarinkin: array.each{|x| x+=1 } doesnot work
[19:51:18] hashrocket: has joined #ruby
[19:51:20] jhass: &ri Array#map
[19:51:20] `derpy: http://www.rubydoc.info/stdlib/core/Array#map-instance_method
[19:51:31] ddubs: haylon: i was thinking about something like define method
[19:51:39] haylon: ytti: who was that at?
[19:51:45] OrbitalKitten: has joined #ruby
[19:51:54] mandarinkin: map create new array
[19:52:07] shevy: jhass ah still crystal; lately there even was a guy on gobolinux mailing list, he wanted to rewrite all the shell scripts in crystal http://lists.gobolinux.org/pipermail/gobolinux-devel/2015-July/004464.html
[19:52:18] ddubs: that could iterate and create a method and provide a get function with the link as a way to access it quickly
[19:52:21] jhass: mandarinkin: look through the docs, I'm sure you can find a method that does what you want
[19:52:48] jhass: shevy: interesting
[19:53:00] ytti: haylon, anyone writing json library, i may had misunderstood and that ddubs is not writing one
[19:53:35] Maletor: has joined #ruby
[19:53:36] unver: Can I do soemthing like assert_in_delta with dates / times? I want to check that one matches within 5.seconds or so
[19:53:43] troulouliou_div2: has joined #ruby
[19:54:06] bb010g: has joined #ruby
[19:54:28] mandarinkin: jhass, i only found such variant (1..map.w).each{|x| gg[x]-=1 if gg[x]>i}
[19:54:46] jhass: mandarinkin: you didn't seem to look very hard
[19:54:51] jhass: &ri Array#map!
[19:54:51] `derpy: http://www.rubydoc.info/stdlib/core/Array#map%21-instance_method
[19:54:51] darix: unver: you can just do assert (x-y)<5.seconds
[19:54:54] alphaatom: has joined #ruby
[19:55:01] gambl0re: has joined #ruby
[19:55:14] mandarinkin: imho, map is not good
[19:55:24] jhass: mandarinkin: map != map!
[19:55:33] mandarinkin: map create new array but i want only chage several items
[19:55:36] jpfuentes2: has joined #ruby
[19:56:00] last_staff: has joined #ruby
[19:56:33] unver: darix: clever, thanks
[19:56:38] blackmesa: has joined #ruby
[19:57:44] nym: has joined #ruby
[19:58:09] burgestrand: >> ary = [1, 2, 3, 4]; ary.map!(&:succ); ary
[19:58:10] ruboto: Burgestrand # => [2, 3, 4, 5] (https://eval.in/415445)
[19:58:21] momomomomo: has joined #ruby
[19:58:35] burgestrand: No new array, just in-place modification of old array
[19:58:58] burgestrand: mandarinkin: jhass has been trying to tell you that map! (notice !) is not creating a new array
[19:59:00] miah: ruby methods with ! tend to do 'in-pace' operations
[19:59:36] matcouto: has joined #ruby
[19:59:53] coban2k: has joined #ruby
[20:01:22] chouhoul_: has joined #ruby
[20:03:24] lapide_viridi: has joined #ruby
[20:04:45] tmtwd: has joined #ruby
[20:05:52] haylon: wait, did ruboto just do an IRB function?
[20:06:50] pocketprotector: has joined #ruby
[20:07:58] jbw: has joined #ruby
[20:08:50] adaedra: >> %w{You mean like this?].join(' ')
[20:08:51] ruboto: adaedra # => /tmp/execpad-92904b3b9b27/source-92904b3b9b27:2: unterminated string meets end of file ...check link for more (https://eval.in/415450)
[20:09:01] adaedra: erf, if I can't type
[20:09:21] haylon: that's awesome
[20:09:39] vdamewood: has joined #ruby
[20:09:39] devoldmx: has joined #ruby
[20:09:41] zendrix: has joined #ruby
[20:09:44] adaedra: useful for demonstrations
[20:09:45] dseitz: has joined #ruby
[20:09:50] haylon: totally need one of those in my internal IRC
[20:09:59] adaedra: you have full ruboto guide on website, see topic
[20:10:08] ruboto: I'm the channel bot, linker of the rules, adept of the facts, wielder of the banhammer.
[20:10:17] gamename: has joined #ruby
[20:10:34] unver: What if I want to do this http://hastebin.com/inakivobuc.avrasm , but the return before iso8601 might be nil?
[20:10:40] jhass: haylon: charliesome provides the backend, hit him up on details / usage grant ;)
[20:10:50] Trynemjoel: has joined #ruby
[20:11:05] Frem: has joined #ruby
[20:11:18] jhass: unver: Rails/ActiveSupport?
[20:11:21] sinkensabe: has joined #ruby
[20:11:29] [spoiler]: adaedra: "erf, if I can't type" made me laugh! :D especially the 'erf'
[20:11:41] ytti: unver, i know that that lot of peeps don't like this, but i seomtimes add ' ... rescue some_default_value'
[20:11:50] ytti: unver, that is large hammer
[20:11:53] [spoiler]: The sound/onomatopoeia seems hilarious
[20:12:13] jhass: no, no, no. It's not stylistic bad, it hides unexpected errors
[20:12:15] bronson: has joined #ruby
[20:12:17] jhass: makes your code harder to debug
[20:12:25] ytti: hence large hammer
[20:12:46] mistermocha: has joined #ruby
[20:13:03] jhass: unver: will you answer my simple follow up question?
[20:13:10] [spoiler]: ytti: if you rescue for only a particular exception type, then it's no *that* bad, I guess
[20:13:18] [spoiler]: but it does impact performance, a lot
[20:13:26] jhass: ... which modifer-rescue doesn't allow
[20:13:29] [spoiler]: any rescue will
[20:13:40] [spoiler]: that kind of rescue
[20:13:46] unver: jhass: I'm using rails, yes
[20:14:06] jhass: unver: http://api.rubyonrails.org/classes/Object.html#method-i-try then
[20:14:10] [spoiler]: I thought it was a begin...rescue...end block
[20:14:22] kaps: has joined #ruby
[20:14:33] ascarter: has joined #ruby
[20:14:37] unver: jhass: wow, i did not know that existed, thanks
[20:14:56] segy: has joined #ruby
[20:15:39] alphaatom: has joined #ruby
[20:15:51] omegamike: has joined #ruby
[20:16:45] momomomomo: has joined #ruby
[20:19:12] troulouliou_div2: has joined #ruby
[20:21:05] ruby-lang905: has joined #ruby
[20:21:14] sdwrage: has joined #ruby
[20:21:48] dmmoody: has joined #ruby
[20:22:40] hobodave: has joined #ruby
[20:22:46] mistermo_: has joined #ruby
[20:23:26] ctalr: has joined #ruby
[20:23:58] chouhoulis: has joined #ruby
[20:24:10] freerobby: has joined #ruby
[20:25:28] ctalr: has joined #ruby
[20:25:56] havenwood: If anyone would like a release of RVM sometime soon (for TravisCI or otherwise) any help or feedback on Issues would expedite: https://github.com/rvm/rvm/issues
[20:26:07] havenwood: Or review pull requests: https://github.com/rvm/rvm/pulls
[20:26:26] havenwood: Any feedback appreciated.
[20:27:12] yh_: has joined #ruby
[20:27:21] bruno-: has joined #ruby
[20:27:32] jhass: havenwood: might be worth to keep things like http://www.codetriage.com/ a shot
[20:27:34] havenwood: Even just a thumbs up. Or this seems not broken. Anything. ;)
[20:27:42] havenwood: jhass: Mmm, good idea.
[20:28:27] sdwrage: has joined #ruby
[20:28:41] _blizzy_: has joined #ruby
[20:28:55] Maletor: has joined #ruby
[20:29:01] mistermocha: has joined #ruby
[20:30:01] rickmasta: has joined #ruby
[20:30:07] NeverDie: has joined #ruby
[20:30:40] havenwood: The code for this PR is simple. Worth adding the feature?: https://github.com/rvm/rvm/pull/3454
[20:32:01] havenwood: I don't even use Gemsets. Anyone who does use Gemsets want to thumbs up or thumbs down this?? https://github.com/rvm/rvm/pull/3473
[20:32:04] shevy: havenwood you are working on rvm?
[20:32:26] havenwood: shevy: Trying to get a release out.
[20:32:29] shevy: oh he is! https://github.com/rvm/rvm/commit/da616fc0d76548e3a3b24df91859d03588bf02c7
[20:32:34] havenwood: shevy: Just need to triage tickets.
[20:32:51] shevy: helping Devuan against the oppression that is systemD \o/
[20:33:00] havenwood: adaedra: Need RVM working for chruby's test-suite on TravisCI. :P
[20:33:18] mistermocha: has joined #ruby
[20:33:19] lagweezle: jhass: The code triage thing ... that's neat! Thanks!
[20:33:28] ArchBeOS: has joined #ruby
[20:33:38] ArchBeOS: any bundler guys that can help me figure out my problem?
[20:33:43] yfeldblum: has joined #ruby
[20:33:49] ruboto: jhass is anybody
[20:33:57] ruboto: I don't know anything about anyony
[20:33:59] ruboto: Just ask your question, if anyone has or can, they will respond.
[20:34:03] ruboto: apeiros is nobody
[20:34:05] jhass: ACTION hides
[20:34:15] otisZart: has joined #ruby
[20:34:33] ArchBeOS: i answered my own damn question.
[20:34:46] ArchBeOS: isorry gents
[20:34:49] ArchBeOS: and ladygents
[20:34:54] adaedra: That's the IRC effect
[20:34:56] shevy: am I a mangent?
[20:34:59] jhass: ?guys ArchBeOS
[20:34:59] ruboto: ArchBeOS, You probably don't mean to exclude, but not everyone relates to being "one of the guys". Maybe consider using "folks", "y'all" or "everyone" instead?
[20:35:12] adaedra: jhass: he said ladygents!
[20:35:18] shevy: that isn't even a word!
[20:35:28] jhass: shevy: you can be anything you want to be
[20:35:31] programmerq: has joined #ruby
[20:35:40] shevy: dunno... mangent looks like a typo of magnet...
[20:35:42] adaedra: shevy isn't either a word, do we make such a mess about it?
[20:35:52] shevy: he is creating new words!
[20:36:06] adaedra: that's called "neologisms" I think
[20:36:13] DLSteve: has joined #ruby
[20:36:18] shevy: pronounce it in french
[20:36:23] j4cknewt: has joined #ruby
[20:36:32] lagweezle: ArchBeOS: For those of us playing the home game, what was the problem, and what is the solution? I ask, as I'm still somewhat blindly groping about bundler.
[20:36:33] adaedra: n??ologismes?
[20:36:45] shevy: UTF again :(
[20:37:05] adaedra: shevy: your IRC client is badly configured
[20:37:06] shevy: groping bundler... yum
[20:37:19] drbrain: o_O? UTF-8 is the channel encoding ????
[20:37:28] ArchBeOS: How to require a single lib while using Bundler.require. Default had a ton of libs I didnt need, only needed rails, so after Bundler.require :test, :qe I just added require 'rails'
[20:37:34] shevy: as long as there is no unicode hangman I am safe
[20:37:42] adaedra: even if you're in another charset yourself, it should at least convert chars, and ?? is valid ISO-8859-1, so you shouldn't have problems with it
[20:37:45] ArchBeOS: i am ashamed of myself for not thinking of that
[20:37:57] adaedra: drbrain: it is, just shevy who wants to live in the past
[20:38:31] shevy: without the snowman, unicode would be worthless
[20:38:49] jhass: ?cookie shevy
[20:38:49] ruboto: shevy, here's your cookie: ????
[20:38:52] yqt: has joined #ruby
[20:38:56] burgestrand: ArchBeOS: a typical use-case would also be to do Bundler.setup, and then manually require each thing that you need :)
[20:38:56] adaedra: ?????????????????? ????????????????????? ??????????????? ??????????????? ????????????
[20:39:30] shevy: I can't read that
[20:39:34] burgestrand: hm, or even just require "bundler/setup" and then require whatever.
[20:39:42] ArchBeOS: Burgestrand: hmm. bundler setup. gotta read up on that, thanks
[20:39:44] ArchBeOS: thnks everyone
[20:39:58] gambl0re: has joined #ruby
[20:40:03] adaedra: shevy: it's true, an encoding system made to have a common encoding and ease communication between all parts of the world is absolutely worthless.
[20:40:09] ArchBeOS: and i will try to remember gents and ladygents and transitionalgents from here on out (or just say y'all. it's easier)
[20:41:09] baweaver: has joined #ruby
[20:42:06] shevy: adaedra why didn't ruby use it prior to 1.9.x
[20:43:00] Vile`: has joined #ruby
[20:43:13] adaedra: shevy: ask matz
[20:43:20] ndrei: has joined #ruby
[20:43:55] drbrain: it did, just poorly
[20:44:44] adaedra: PHP still doesn't support it
[20:45:00] mistermocha: has joined #ruby
[20:45:16] shevy: isn't php7 the one that will save the world?
[20:45:25] adaedra: And even today, ruby has some failures with unicode
[20:45:50] adaedra: shevy: the only way PHP can stop being a joke is by becoming a completely different language.
[20:46:26] alphaatom: has joined #ruby
[20:46:43] mistermocha: has joined #ruby
[20:46:58] deavid: has joined #ruby
[20:47:24] haylon: has left #ruby: ()
[20:48:43] dopie: has joined #ruby
[20:49:18] wasamasa: has joined #ruby
[20:49:18] wasamasa: has joined #ruby
[20:50:42] finisherr: has joined #ruby
[20:50:46] OrbitalKitten: has joined #ruby
[20:51:55] gambl0re: has joined #ruby
[20:52:20] danman: has joined #ruby
[20:52:38] irctc980: has joined #ruby
[20:52:38] robbyoconnor: has joined #ruby
[20:52:43] irctc980: hello, im developing a iOS application where i will be needing to be able to make a REST/HTTP request to my Rails App for Stripe payments. How do i go about doing this?
[20:53:30] jhass: sounds like an objective C/Swift/whatever question
[20:53:30] baweaver: has joined #ruby
[20:54:27] RegulationD: has joined #ruby
[20:54:44] irctc980: but wont i also need to create rest api?
[20:54:45] tvw: has joined #ruby
[20:54:53] baweaver_: has joined #ruby
[20:54:57] Bloop_: has joined #ruby
[20:55:13] olivierrr: has joined #ruby
[20:55:14] irctc980: like do ruby server side.
[20:55:40] shevy: olivierrr !
[20:55:50] shevy: more french power to reinforce adaedra and Mon_Ouie
[20:56:23] allcentury: has joined #ruby
[20:57:00] mandarinkin: created simple code for this contest http://theaigames.com/competitions/ai-block-battle/rules
[20:57:07] TheMysticWyvern: I'm trying to learn Ruby. It's harder than I thought.
[20:57:14] Bloop_: Hows everyone doing?
[20:57:15] mandarinkin: https://github.com/kolyan1981by/tetris_bot
[20:57:39] leafybasil: has joined #ruby
[20:57:43] adaedra: TheMysticWyvern: learning a language can be hard sometimes. Have an issue blocking you you want to discuss?
[20:57:50] Bloop_: Make sure you read the ruby pragmatic programmer TheMysticWyvern
[20:58:49] TheMysticWyvern: adaedra: Not a specific issue. I have extreme, and I do mean extreme, ADHD, so it's very, very hard for me to sit down and teach myself something. I leave it for a few weeks, come back, and have forgotten everything I've learned, and need to start over from the beginning.
[20:58:56] fowl: has left #ruby: ()
[20:59:18] leafybasil: has joined #ruby
[20:59:37] TheMysticWyvern: I've tried PHP, C++, and Ruby, now.
[20:59:44] shevy: you have come to the best
[20:59:50] gambl0re: has joined #ruby
[21:00:07] shevy: TheMysticWyvern what may be best is to limit to a "small" subset of ruby, and just keep on using that part
[21:00:09] TheMysticWyvern: I mean, I couldn't even remember how to access the Interactive Ruby Shell. xD
[21:00:18] TheMysticWyvern: shevy: A subset?
[21:00:21] mistermo_: has joined #ruby
[21:00:21] shevy: or you alias
[21:00:29] shevy: like "rubyshell" then you won't forget
[21:00:36] shevy: yes, a subset of the features it has
[21:00:40] TheMysticWyvern: Well, I did eventually remember "irb" and "irb --simple-prompt," but that's it.
[21:01:07] TheMysticWyvern: If it helps, I'm attempting to learn Ruby for use in RPG Maker, which involves its own subset, I guess, called RGSS.
[21:01:14] adaedra: I don't really what to say, this is not a problem I'm used to :|
[21:01:21] shevy: I think hanmac here was using RPG maker
[21:01:29] mistermocha: has joined #ruby
[21:01:31] shevy: adaedra you forgot a word there :D
[21:01:44] adaedra: RPG Maker, now this is somthing I haven't heard in a long time
[21:01:58] adaedra: shevy: Ah yes, I accidently a word
[21:02:07] TheMysticWyvern: They're releasing a new version in the near future, with mobile support, and all that. RPG Maker MV.
[21:02:13] TheMysticWyvern: I want to be prepared for its release, with Ruby.
[21:02:22] adaedra: Let me find it
[21:02:30] Bloop_: I do have a question. Mostly Ruby specific, but its in rails
[21:02:36] shevy: cool use case TheMysticWyvern
[21:02:50] shevy: I came to ruby from php. I got tired of php, choice was between ruby and python. ruby won due to matz being kickass
[21:02:58] adaedra: Last time I used RPG maker was in 2006
[21:03:03] shevy: yeah, that you want to learn a language due to some application, in this case RPG Maker
[21:03:18] TheMysticWyvern: adaedra: They've been converting older versions to English and throwing it onto the Steam store.
[21:03:24] Bloop_: has joined #ruby
[21:03:30] shevy: I actually never used rpg maker myself, hanmac wanted to do openrmk or so
[21:03:44] adaedra: Bloop_: go on
[21:03:48] TheMysticWyvern: shevy: Well, the truth is, I really don't know what else I would use Ruby for. I'd never heard of Ruby until I began using RPG Maker.
[21:04:02] adaedra: Bloop_: If you don't ask, we can't answer or redirect you :)
[21:04:23] Trynemjoel: has joined #ruby
[21:04:44] shevy: TheMysticWyvern yeah as I said, cool use case
[21:04:53] Bloop_: So I have a rake task that imports a lot of models. Under 300k lines. But after a while it is really slow. So when running it on a server its slow.
[21:04:59] shevy: mine was worse, php was so annoying that I had to leave
[21:05:25] shevy: I tried to re-learn php for drupal (for a job), I still have not decided if I can do so, it kills my brain
[21:05:26] TheMysticWyvern: shevy: Oh, a use case. I thought you were just saying random words. xD
[21:05:32] Bloop_: Takes about 45 min to import. Is there something I am missing? Or is this more rails specific?
[21:05:47] TheMysticWyvern: shevy: I used Drupal at the company I used to work for.
[21:06:26] adaedra: Bloop_: how do you import?
[21:06:26] shevy: yah I don't understand it, but surprisingly, the head professor of bioinformatics at one university here, uses drupal for internal management of all projects - and he doesn't even know php...; he also uses tcl, strangely enough
[21:06:44] adaedra: You don't need to know php to use drupal
[21:07:07] TheMysticWyvern: shevy: The good thing about Drupal is that you don't need to know PHP to use it effectively. There's an overwhelming amount of third-party support for it, including themes and modifications.
[21:07:44] Bloop_: I am using a CSV Reader, reading it line by line, and committing batch transactions since a single transaction was even slower. In fact it ran out of memory.
[21:08:08] adaedra: Do you build full objects?
[21:08:09] shevy: TheMysticWyvern it so scares me... imagine if ruby would be like that
[21:08:33] Bloop_: I've gotten to the point where I think doing a raw sql query would be my best solution since I am not sure what I am doing wrong. Let me see if I can create a Gist
[21:08:37] TheMysticWyvern: shevy: Not requiring ultimate knowledge to make use of it?
[21:08:50] shevy: TheMysticWyvern no, I mean, offer something like drupal
[21:08:57] allcentury: has joined #ruby
[21:09:06] Motoservo: has joined #ruby
[21:09:11] TheMysticWyvern: shevy: How could it? I mean, can Ruby be used for web development?
[21:09:21] shevy: php has like ... wordpress... drupal ... joomla
[21:09:27] rakm: has joined #ruby
[21:09:34] TheMysticWyvern: Is it more powerful in web development than PHP?
[21:09:42] shevy: as language, ruby has the better design
[21:09:48] f-a: has joined #ruby
[21:09:56] shevy: php has some cool projects. mediawiki... phpBB ...
[21:10:09] sbhatore: has joined #ruby
[21:10:29] TheMysticWyvern: My first encounter with PHP was using WoltLab Burning Board. Those are the good old days I miss.
[21:10:31] adaedra: phabricator
[21:10:31] shevy: the local technical university is using rails (ruby) for student pages, that was a surprise to me
[21:10:32] timanema: has joined #ruby
[21:10:47] f-a: has left #ruby: ()
[21:11:05] adaedra: it's not because the language is awful that you can't build good things upon it
[21:11:40] adaedra: <shevy> as language, ruby has the better design | that's subjective.
[21:12:00] sinkensabe: has joined #ruby
[21:12:03] adaedra: except if you mean just between ruby and PHP
[21:12:43] shevy: what is that czech error message in php
[21:12:50] shevy: PAAMAYIMNEKUDOTAYIM
[21:12:55] timanema: has joined #ruby
[21:12:59] dfockler: has joined #ruby
[21:13:07] msnyon: has joined #ruby
[21:13:16] shevy: for some reason I thought it was czech
[21:14:11] TheMysticWyvern: Well, my next step on this path is learning about object types.
[21:14:16] TheMysticWyvern: It sounds drier than a desert.
[21:14:46] adaedra: I hope you success.
[21:14:58] dudedudeman: shevvvvvvyyyy
[21:15:07] TheMysticWyvern: The last time I went through this stuff, I thought I was going to die.
[21:15:14] dudedudeman: ACTION is dead
[21:15:26] FernandoBasso: has joined #ruby
[21:16:03] Bloop_: https://gist.github.com/andy-at-work/8ee60d8143a05f6b161b
[21:17:15] dudedudeman: what are we looking at here, Bloop_
[21:17:31] GnuYawk: has joined #ruby
[21:17:35] adaedra: looks complex
[21:18:15] Bloop_: I am reading a CSV file.
[21:18:27] Bloop_: Cleaning it up, and creating a model for it.
[21:18:53] Bloop_: task.rb uses the csv_reader
[21:19:53] choke: has joined #ruby
[21:20:08] Bloop_: Then it gets saved to a postgre DB
[21:21:08] startupality: has joined #ruby
[21:22:31] mleung: has joined #ruby
[21:23:31] Bloop_: One of my plans is to avoid saving to the DB very much. Since a single model could appear on multiple lines. Let me know if anything doesn't make sense.
[21:23:41] momomomomo: has joined #ruby
[21:24:23] [spoiler]: Lmao, for some reason my IRC client pooped when it tried to render that gist
[21:24:54] Bloop_: Haha. Damn that bad huh :D
[21:24:56] cantaberry: has joined #ruby
[21:25:01] [spoiler]: #embeddedhtml5problems
[21:25:06] [spoiler]: Nah, it is fine now
[21:25:24] jenrzzz: has joined #ruby
[21:25:36] [spoiler]: I use Glowing Bear; I'm all ears if anyone knows a better weechat frontend that doesn't look like poo
[21:26:07] [spoiler]: I like terminal apps, but prefer this, tbf
[21:26:20] [spoiler]: s/this/GUIs
[21:26:24] cantaberry: has left #ruby: ()
[21:26:25] [spoiler]: for this type of thing, at least
[21:26:33] cantaberry: has joined #ruby
[21:26:43] adaedra: I have a ZNC and alternate between Textual and weechat
[21:27:51] cantaberry: has joined #ruby
[21:30:33] [spoiler]: adaedra: I am a lazy shit, so I just have a weechat instance running on a VPS, to which I connect through ssh, or frontends haha
[21:30:49] adaedra: yeah, that what I was doing for a while
[21:31:00] [spoiler]: Depends on what I am doing on what I'll ue
[21:31:28] [spoiler]: What are the benefits of znc for you?
[21:31:37] [spoiler]: Or, what prompted you to s--let's move to ot
[21:31:43] Bloop_: So any ideas how to speed up the insertion of the file to the DB?
[21:31:53] Bloop_: Or what I am doing wrong?
[21:32:17] [spoiler]: bougyman: a postgresql
[21:32:29] bougyman: it's a ton faster than inserts.
[21:32:40] Bloop_: part.save!
[21:33:03] bougyman: you can use COPY with the CSV file directly.
[21:33:07] Bloop_: i wanted to avoid using any pure sql. Just Rails' ActiveRecord.
[21:33:08] bougyman: it's one of pg's strengths.
[21:33:12] [spoiler]: Bloop_: oh do you use active record?
[21:33:17] bougyman: ok, use the wrong tool, then.
[21:33:20] ellisTAA: has joined #ruby
[21:33:23] [spoiler]: bougyman: he's cleaning it up first
[21:33:23] Bloop_: And the CSV has to be cleaned. And its not formatted correctly
[21:33:25] bougyman: I'm just letting you know how to speed this process up a bunch.
[21:34:06] Bloop_: Yes, i thought about that. But I need relations (join tables).
[21:34:21] Bloop_: Believe me, I would have totally gone with importing it with postgre
[21:34:56] Bloop_: But the file is a dump of crap that needs to be cleaned up a bit, validated, then placed into different tables and related together.
[21:35:22] ledestin: has joined #ruby
[21:35:41] Bloop_: And yes, I use ActiveRecord.
[21:35:42] jhass: activerecord-import might help
[21:37:14] otisZart: has joined #ruby
[21:37:21] Bloop_: jhass, I think I read somewhere it does not support the associations. If I misinterpreted that, I would totally give it a try
[21:38:44] shevy: jhass do you think crystal will replace ruby in the long run?
[21:38:52] jhass: shevy: no
[21:38:59] k1v4n: has joined #ruby
[21:39:11] jhass: I don't think that any language will fully replace another one ever
[21:39:32] TheMysticWyvern: Sapphire is ultimate.
[21:39:36] blazes816: has joined #ruby
[21:41:56] n_blownapart: has joined #ruby
[21:45:48] [spoiler]: shevy. I love Crystal, but I also doubt it'll ever replace Ruby.
[21:46:02] prestorium: has joined #ruby
[21:46:05] [spoiler]: for the record: I also love Ruby
[21:47:04] [spoiler]: Even in the unlikely event that they merge, I can see purists forking the languages and continuing separate development. :/
[21:47:10] Kallis: has joined #ruby
[21:47:21] [spoiler]: I like them as sibiling languages, anyway
[21:47:28] jhass: it can develop into a great extension language for ruby for example
[21:47:40] jhass: https://github.com/manastech/crystal_ruby
[21:48:27] [spoiler]: Oh never thought of that, but yes, it'd be a good idea, actually
[21:48:42] jhass: look at the PoC code :P
[21:49:22] banister: jhass what is poc
[21:49:31] jhass: proof of concept
[21:49:49] startupality: has joined #ruby
[21:50:03] [spoiler]: I was looking at the src dir
[21:50:09] hj2007: has joined #ruby
[21:50:11] [spoiler]: and this thing is cool as fuck
[21:50:35] Quandl: has joined #ruby
[21:50:44] SuMo_D: has joined #ruby
[21:51:19] snockerton: has joined #ruby
[21:51:44] TheMysticWyvern: What is Crystal?
[21:52:32] [spoiler]: TheMysticWyvern: http://crystal-lang.org/
[21:53:04] TheMysticWyvern: It looks like Ruby.
[21:53:06] [spoiler]: It's "Ruby that compiles to machinecode" (I generalised a lot)
[21:53:14] jhass: TheMysticWyvern: only on the first look ;)
[21:53:21] [spoiler]: It's similar on the surface
[21:53:34] startupality: has joined #ruby
[21:53:40] jhass: we're thinking about printing t-shirts with "no, it's not a compiled ruby" though :P
[21:53:59] [spoiler]: Even, most Ruby will compile as Crystal just fine
[21:54:02] TheMysticWyvern: Is it also used for web development?
[21:54:32] jhass: yes, there are a couple of projects exploring how to write a nice web framework
[21:55:18] [spoiler]: no, of course it's not, but it's a good way to over-generalise when explaining people what it is
[21:55:46] [spoiler]: ooh! I had no idea there was #crystal-lang
[21:55:48] Coldblackice: has joined #ruby
[21:55:56] jhass: we should develop a slogan, something like "A compiled language for the Rubyist" or so
[21:56:06] shevy: that's actually funny considering :) <[spoiler]> shevy. I love Crystal
[21:56:38] [spoiler]: shevy: I cloned it ages ago and never went to the website after that
[21:56:39] shevy: jhass why do they have the -lang addition?
[21:56:48] [spoiler]: I just saw there's a new website, too
[21:56:52] shevy: #ruby-lang got destroyed by somebody - or anybody
[21:57:10] shevy: [spoiler] I only know it because people here use it
[21:57:13] jhass: I guess because #crystal is regged and they know nothing about how freenode operates ;)
[21:57:39] shevy: but the days of wild experiments are over for me... I have become a boring conformist :(
[21:57:56] malconis_: has joined #ruby
[21:57:59] [spoiler]: shevy: I tried to push it into an internal project at work, but I was greeted by a lot of "fuck no"s
[21:58:18] jhass: well, it kinda still is unstable
[21:58:32] [spoiler]: I'm the only C and Rubist developer there. They're all Pythonistas. :/
[21:58:36] jhass: perfectly usable for hobbyists and building the base ecosystem
[21:58:36] shevy: [spoiler] yeah damn boring conformists everywhere
[21:58:41] Zeroe: has joined #ruby
[21:59:04] jhass: but having important stuff depend on it.. maybe wait another year ;)
[21:59:08] [spoiler]: jhass: no, it was just an internal tool, nothing major or for production
[21:59:24] [spoiler]: they just don't like new languages
[21:59:38] [spoiler]: correction: they don't like learning new languages
[21:59:57] [spoiler]: there's only one other developer, and he's a PHP developer (and he doesn't even like PHP)
[22:00:38] [spoiler]: They hired me because I had both sysops knowledge and C, and C++ knowledge
[22:01:17] decoponio: has joined #ruby
[22:01:31] TheMysticWyvern: Are there really cutesy terms for people who use specific languages? Pythonista? xD
[22:03:25] TheMysticWyvern: What's the term for PHP?
[22:03:34] nofxx: has joined #ruby
[22:03:44] deepu: has joined #ruby
[22:03:46] nofxx: has joined #ruby
[22:03:53] jhass: uhm... junior dev?
[22:03:55] adaedra: There's none.
[22:04:00] adaedra: You can't dev in PHP.
[22:04:16] sinkensabe: has joined #ruby
[22:04:23] deepu: has joined #ruby
[22:04:27] burgestrand: I have an ElePHPant but I don't think that's it.
[22:04:57] adaedra: \/(,?? ,)'
[22:05:12] adaedra: good night here too
[22:05:15] burgestrand: I guess PHPists aren't HIP enough.
[22:05:18] jhass: that one needs a loot of fantasy
[22:05:47] hj2007: has joined #ruby
[22:07:37] bruno-: has joined #ruby
[22:07:51] hashrocket: has joined #ruby
[22:08:14] prestorium: has joined #ruby
[22:08:16] crdpink: has joined #ruby
[22:09:43] failshell: has joined #ruby
[22:10:23] devoldmx: has joined #ruby
[22:11:13] TheMysticWyvern: Could anyone recommend any books for learning Ruby development? Ones that aren't outdated? Most of them seem to be from pre-2000's, which is... probably outdated?
[22:11:22] TheMysticWyvern: Er, pre-2010's.
[22:14:09] lwu: has joined #ruby
[22:15:34] msnyon: has joined #ruby
[22:15:58] dgutierrez1287: has joined #ruby
[22:16:34] zendrix: has joined #ruby
[22:18:06] ndrei: has joined #ruby
[22:18:12] yfeldblum: has joined #ruby
[22:18:41] shevy: semi-outdated
[22:18:56] shevy: if you have never read it before, you can give the pickaxe a try
[22:19:14] shevy: https://pragprog.com/book/ruby4/programming-ruby-1-9-2-0
[22:19:25] sross_work|2: has joined #ruby
[22:19:42] DLSteve_: has joined #ruby
[22:19:45] jhack32: has joined #ruby
[22:19:49] shevy: you can also work through this here online: https://pine.fm/LearnToProgram/chap_01.html
[22:19:56] leafybas_: has joined #ruby
[22:19:57] shevy: there is also eloquent ruby but I have not read it
[22:20:02] TheMysticWyvern_: has joined #ruby
[22:20:08] kenichi: wat http://twitter.com/headius/status/631227787282518017
[22:20:08] Burgestr_: has joined #ruby
[22:20:19] ItSAN____: has joined #ruby
[22:20:21] shevy: I think the best way to learn may be to store information locally, in a snippet-like fashion, and ask on #ruby for constant improvements to your guide, and keep on writing more and more code
[22:20:23] burgestrand: TheMysticWyvern: A lot of them are still quite relevant. Ruby has been good at keeping backwards-compatibility.
[22:20:25] choke: has joined #ruby
[22:20:31] MyMind: has joined #ruby
[22:21:20] Burgestr_: TheMysticWyvern: What's your experience with programming? Do you want something to explain concepts like variables, loops, or something more advanced?
[22:21:59] wldcordeiro: has joined #ruby
[22:22:28] olivierrr: has joined #ruby
[22:22:35] nopc0de: has joined #ruby
[22:23:10] silkfox: has joined #ruby
[22:23:26] Trieste: has joined #ruby
[22:23:44] avahey: has joined #ruby
[22:23:46] rickmasta: has joined #ruby
[22:23:56] ddv: has joined #ruby
[22:24:00] whippythellama: has joined #ruby
[22:24:05] tcrypt: has joined #ruby
[22:24:07] coban2k: has joined #ruby
[22:24:14] ghormoon: has joined #ruby
[22:24:33] sdwrage: has joined #ruby
[22:26:39] cabreraM516: has joined #ruby
[22:28:22] bruno-: has joined #ruby
[22:30:39] casadei: has joined #ruby
[22:32:51] northfurr: has joined #ruby
[22:34:05] cornerma1: has joined #ruby
[22:34:31] omegamike: has joined #ruby
[22:36:30] qubitz: has joined #ruby
[22:37:25] michael_mbp: has joined #ruby
[22:38:46] [Butch]: has joined #ruby
[22:39:28] nirvdrum: has joined #ruby
[22:39:40] phutchins1: has joined #ruby
[22:39:40] choke: has joined #ruby
[22:40:00] keyvan-: has joined #ruby
[22:40:50] qubitz: I was messing around with Enumerable#inject and found a behavior I don't understand, wondered if someone could give some insight. I was doing basically an Enumerable#any? (which is actually what I should use) there I want to return false if any element doesnt meet a condition. This works just fine though I've found that when the array is size 1 I don't get true/false, I get the value of the first element. Can
[22:40:56] qubitz: t someone explain what is happening here? [2].inject{|p,v| break false if v==2; true}
[22:45:02] rakm: has joined #ruby
[22:45:50] crdpink2: has joined #ruby
[22:46:42] apeiros: qubitz: inject without a starting value will start with the first element
[22:46:52] apeiros: since there's no further element left, your block isn't even invoked
[22:48:45] lagweezle: Er, what are some good examples of where passing a block of code to a method greatly reduces the amount of code necessary while increasing readaiblity?
[22:50:35] roolo: has joined #ruby
[22:50:46] northfurr: has joined #ruby
[22:51:02] lotherk: has joined #ruby
[22:52:38] nirvdrum: Does anyone happen to have any insight as to why a TracePoint event won't be emitted for a Fixnum#+ call like "3 + 5", but will for something like "3 + rand"?
[22:52:48] qubitz: apeiros: i figured that's what it was doing, but wondered if that is really expected? does that assum you're trying to do a sum?
[22:53:01] bronson: has joined #ruby
[22:53:26] apeiros: qubitz: I'm a bit puzzled. yes, it is expected. it is the documented behavior. no assumptions necessary.
[22:53:27] startupality: has joined #ruby
[22:53:47] shevy: It is set in stone.
[22:53:55] shevy: "Not a bug - it is a feature."
[22:54:16] apeiros: you quite correctly said it was the wrong tool for what you used it
[22:54:30] qubitz: apeiros: i understand its documented that if you dont set a memo the first value is used. im just surprised that the block doesnt execute if there is only one value. is that documented?
[22:55:10] jackjackdripper: has joined #ruby
[22:55:48] roolo: has joined #ruby
[22:56:03] apeiros: qubitz: it follows from the first element being used for the memo and no element remaining to be yielded
[22:56:17] apeiros: qubitz: what should it yield as v to your block?
[22:57:00] [H]unt3r: has joined #ruby
[22:57:01] qubitz: apeiros: ah, well that makes sense
[22:57:06] qubitz: i'll accept that :)
[22:57:55] Guest21711: has joined #ruby
[22:58:50] baweaver: has joined #ruby
[22:59:01] shevy: qubitz on his way into the dark secrets of the ruby
[22:59:28] shevy: will he ever come back... or will the big black void swallow him alive...
[22:59:29] gambl0re: has joined #ruby
[22:59:37] qubitz: i think the reason its concerning to me is if you think of inject as reduce, and you expect to run an operation over a bunch of values. its surprising to see the block not execute. what if i had an array of strings and wanted to do a word count across all of them. if i only had one string in the array i would get that string, not a word count
[22:59:38] hj2007: has joined #ruby
[23:00:44] qubitz: though i guess its less concerning if you dont set a memo
[23:01:01] qubitz: now that I can explain what happened here, I'll let it go :)
[23:03:09] apeiros: qubitz: show me how you do a count without an explicit memo and I show you how terrible that code is :-p
[23:03:38] apeiros: (an explicit +initial memo)
[23:03:59] Musashi007: has joined #ruby
[23:04:46] Soviet_jesus: has joined #ruby
[23:04:51] hj2007: has joined #ruby
[23:05:04] qubitz: yep point taken, i really just wanted to understand why the block wasnt executing and now i do, if you use the first/only value for the memo, theres nothing else to pass in
[23:05:35] SuMo_D: has joined #ruby
[23:06:25] dopie: has joined #ruby
[23:06:32] Rixius: has joined #ruby
[23:07:32] Musashi007: has joined #ruby
[23:08:28] NeverDie: has joined #ruby
[23:08:32] dimasg: has joined #ruby
[23:08:38] josh3: has joined #ruby
[23:08:46] Soviet_jesus: So, this may be a uselessly general question but here it goes: I want to get "better" at ruby, but am not all that creative. This makes it hard to think of programs I want to write. A book I'm reading suggests reading the code in the standard library as a way to get better at reading and writing ruby. This seems like a good idea to me but I'm at something of a loss of where to start looking (in terms of classes/files, not "Where'
[23:09:04] Soviet_jesus: recommendations of what class I should try and look at first?
[23:09:44] Mendenhall: has joined #ruby
[23:11:10] devoldmx: has joined #ruby
[23:11:56] pyon: has joined #ruby
[23:13:01] BraddPitt: I generally enjoy things using network communications. My first big ruby learning project was an IRC bot Soviet_Jesus
[23:13:14] BraddPitt: maybe something that interacts with a well defined api?
[23:15:21] Soviet_jesus: Interesting...I'll have to give that some serious thought. Thanks BraddPitt
[23:15:47] BraddPitt: just think about something you would want to make - the possibilities are endless
[23:16:33] [spoiler]: BraddPitt: I didn't read the nick, so I thuoght you wrote a bot called Soviet_Jesus and started to type "That's an odd name for a bot... What did I do?"
[23:17:05] symm-: has joined #ruby
[23:17:51] northfurr: has joined #ruby
[23:17:54] [spoiler]: The first thing I wrote in Ruby was a chat server (which I ended up writing most of in C, for various reasons)
[23:17:55] graft: Soviet_Jesus: read the String class, it's a pretty good one. Also Enumerable
[23:18:06] xaxisx: has joined #ruby
[23:18:22] [spoiler]: It's still used actually, by a few people :/
[23:18:51] swgillespie: has joined #ruby
[23:18:54] MatthewsFace: has joined #ruby
[23:18:55] [spoiler]: It was for my old roleplay group, but most of us grew up and kinda lef tit behind
[23:19:05] shevy: tit behind?
[23:19:12] [spoiler]: ACTION is getting all nostalgic and has fuffy feelings
[23:19:23] shevy: similar happened to my group too, family kicked in, people had less and less time
[23:19:38] [spoiler]: tsl. It's 1 am; I can't type even when I'm fully awake
[23:19:41] shevy: fuffy tit? man your words are off by one today
[23:20:09] shevy: when I first came to ruby, I thought about writing a mud
[23:20:26] [spoiler]: now I wanna play a mud!
[23:20:30] shevy: Aria here I think also was active in the ancient days about that... FaerieMUD... as Aridrel (but I may misremember)
[23:20:35] Soviet_jesus: haha endless possibilities are kinda the issue I'm having. Though I do like the idea of some kinda of text based DnD kinda thingy. And I'll be sure to give string and enumerable a read. God knows I need to understand enumerable much better
[23:20:42] havenwood: Soviet_Jesus: +1 Enumerable
[23:21:05] BraddPitt: the first programs you write are the best
[23:21:12] diegoviola: has joined #ruby
[23:21:21] Soviet_jesus: Well, string for that matter too
[23:21:53] matugm: has joined #ruby
[23:21:53] matugm: has joined #ruby
[23:21:55] BraddPitt: idk if i would suggest reading class API documentation
[23:21:57] BraddPitt: thats so fucking boring
[23:22:03] [spoiler]: Enumerable is one of Roby's nicest featutes, yeah
[23:22:05] BraddPitt: just reference it when you're lost/when you need it
[23:22:16] [spoiler]: Okay that's it
[23:22:18] [spoiler]: I'm going to bed
[23:22:38] [spoiler]: Good night, folk! Kisses and hugs all around
[23:22:51] [spoiler]: ACTION e-besmooches everyone
[23:23:00] dfockler: ACTION hugs
[23:23:18] centrx: has joined #ruby
[23:24:27] shevy: [spoiler] really is a wild typer at night
[23:26:12] Soviet_jesus: Am I a crazy person or is string located in /1.9.1/rake/ext/string.rb?
[23:26:12] Inside: has joined #ruby
[23:26:13] Inside: has joined #ruby
[23:27:31] Soviet_jesus: Oh, its one of the c files, isn't it?
[23:28:14] zendrix: has joined #ruby
[23:28:15] dfockler: oh yeah it's in the C files
[23:28:20] northfurr: has joined #ruby
[23:28:26] Me1: has joined #ruby
[23:28:27] BraddPitt: Soviet_Jesus http://ruby-doc.org/core-2.2.0/String.html
[23:28:50] ellisTAA: has joined #ruby
[23:28:58] Soviet_jesus: I have that tab open twice ;)
[23:29:02] dfockler: Soviet_Jesus: see that little In Files box? That has all the C files for modules
[23:29:04] jtdoncas: has joined #ruby
[23:29:10] momomomomo: has joined #ruby
[23:30:10] Adran: has joined #ruby
[23:31:17] Soviet_jesus: hells yeah, I dont know C lol. alrighty I'm gonna see what I can make.
[23:31:38] centrx: has joined #ruby
[23:32:52] tmtwd: has joined #ruby
[23:34:18] Soviet_jesus: alrighty, well I'm gonna go piss myself off till learning happens. Thanks all!
[23:34:34] hostess: has joined #ruby
[23:35:14] omegamike: has joined #ruby
[23:35:39] advorak: has joined #ruby
[23:35:58] AustinMatherne: has joined #ruby
[23:38:53] Pisuke: has joined #ruby
[23:41:08] irb1: has joined #ruby
[23:42:11] ruby-lang321: has joined #ruby
[23:42:14] fowl: has joined #ruby
[23:42:38] ruboto: I don't know anything about hi
[23:42:38] B1n4r10: has joined #ruby
[23:42:47] ruby-lang321: newbie question but what is the difference in a gem when 1) is net-ldap and 2) is net/ldap
[23:42:51] ruby-lang321: are they the same?
[23:43:40] shevy: hmm is it an acceptable practice to subclass from StringIO? I need a logger-object that can temporarily grab all output going to stdout, but also lateron restore to default ruby behaviour again
[23:43:49] centrx: ruby-lang321, Where do you see that?
[23:43:54] centrx: shevy, You're a monkey. Patch it
[23:44:22] baweaver: has joined #ruby
[23:44:34] ruby-lang321: in examples when i query for ldap in ruby i see there are 2 different require statements
[23:44:54] ruby-lang321: one is require 'net-ldap' and the other is require 'net/ldap'
[23:45:00] BraddPitt: the "/" means ldap is a sub-directory of the "net" directory
[23:45:11] BraddPitt: wherea net-ldap is all one directory
[23:45:14] BraddPitt: does that make sense?
[23:45:45] baweaver_: has joined #ruby
[23:45:54] ruby-lang321: so if i do require 'net-ldap' i get the parent and all subdirectories?
[23:45:59] nicechap: has joined #ruby
[23:46:20] ruby-lang321: and if i do require 'net/ldap' i get everything under the net/ldap directory
[23:47:29] BraddPitt: require 'net-ldap' will only require what is in that parent dir
[23:47:44] BraddPitt: but its possible that in that dir, there is a require statement that pulls in all the sub-dirs
[23:47:52] BraddPitt: (this is a common idion in gems)
[23:50:00] senoralastair: has joined #ruby
[23:51:01] charliesome: has joined #ruby
[23:52:19] startupality: has joined #ruby
[23:52:38] casadei: has joined #ruby
[23:53:13] otisZart: has joined #ruby
[23:53:23] senoralastair: hey folks. can someone help me out? I can't quite work out how to phrase what I'm after, so my google-fu is returning nothing too helpful. What I'm trying to work out is this: How do I access an attr of a class, using a variable. Eg: attrs = [ 'name', 'age' ], and I want to loop through and pull the values for person.name and person.age? (My actual array has about 12 elements, and it's all done within another loop)
[23:53:51] BraddPitt: senoralastair do you mean retrieve all variables of an object?
[23:54:16] BraddPitt: or rather, all the values of all the variables of an object?
[23:54:56] senoralastair: BraddPitt: In this instance I'm just after the values they hold, but it would be good to know both for future use
[23:55:06] rickmasta: has joined #ruby
[23:55:40] BraddPitt: hmm you could do something like
[23:56:09] BraddPitt: instance_variables.map{ |ivar| instance_variables_get(ivar) }
[23:56:35] BraddPitt: senoralastair: http://ruby-doc.org/core-2.2.2/Object.html#method-i-instance_variable_get
[23:56:39] Aeyrix: Is here an appropriate place for Sinatra questions?
[23:56:49] Aeyrix: It's not directly Sinatra related, but I'm using the framework.
[23:56:53] shevy: senoralastair you access info from an object by calling a method usually; the method will return however things are stored, which typically means that internally a @instance_variable is used
[23:56:55] bigmac: has joined #ruby
[23:56:55] BraddPitt: no sure Aeyrix, but I bet there is a sinatra channel somewhere on freenode
[23:57:05] Aeyrix: BraddPitt: There is, but I know a lot of people in here. :^)
[23:57:10] Aeyrix: Fuck it, asking anyway. \o/
[23:57:13] shevy: senoralastair if it follows the common attr-pattern then you could use .send()
[23:57:33] Aeyrix: https://gitlab.com/Aeyrix/Crate/blob/master/app/crate.rb#L42
[23:57:38] Aeyrix: This line does not execute.
[23:57:54] Aeyrix: As a consequence, temporary files build up and are never cleared.
[23:58:04] Aeyrix: I had a brief discussion about it with pipework a few months ago.
[23:58:09] Aeyrix: But he was under the influence of something IIRC.
[23:58:26] shevy: he normally is
[23:58:53] Aeyrix: But yeah, does anyone know how I can make that line execute? I think it's happening due to the fact that send_file `return`s.
[23:58:59] Aeyrix: Which makes sense, but is a pain in the ass for me.
[23:59:35] Aeyrix: Putting it before the send_file obviously has other repercussions in the way of trying to send a now-nonexistent file.