« Back to channel list

#ruby - 13 November 2015

« Back 1 day Forward 1 day »
[00:00:24] charliesome: has joined #ruby
[00:00:35] solocshaw: has joined #ruby
[00:01:42] lemur: has joined #ruby
[00:01:58] Yzguy: has joined #ruby
[00:02:10] mattwildig: has joined #ruby
[00:02:44] zacts: has joined #ruby
[00:03:26] guest192123: has joined #ruby
[00:03:34] dikaio: has joined #ruby
[00:04:21] tomphp: has joined #ruby
[00:04:39] pwnd_nsfw: has joined #ruby
[00:04:50] IrishGringo: has joined #ruby
[00:08:09] Yzguy: has joined #ruby
[00:10:06] _stu_: has joined #ruby
[00:10:38] jdawgaz: has joined #ruby
[00:10:43] opensource_ninja: has joined #ruby
[00:11:19] riceandbeans: isn't parens the old style for arguments?
[00:11:36] riceandbeans: like foo.include?('bar')
[00:11:40] riceandbeans: isn't that the old way?
[00:11:53] neonalpine: has joined #ruby
[00:11:55] riceandbeans: and foo.include? 'bar' the new way?
[00:12:45] axl_: has joined #ruby
[00:13:34] null2: has joined #ruby
[00:13:36] JammyHammy: has joined #ruby
[00:15:26] Ox0dea: riceandbeans: It's mostly a stylistic preference, but parens are sometimes mandatory.
[00:16:24] Arkon: has joined #ruby
[00:18:45] TomPeed: has joined #ruby
[00:20:30] kies: has joined #ruby
[00:21:32] droidburgundy: has joined #ruby
[00:21:47] grill: has joined #ruby
[00:22:35] PaulCapestany: has joined #ruby
[00:24:00] dlitvak: has joined #ruby
[00:24:21] tomphp: has joined #ruby
[00:25:23] tomphp: has joined #ruby
[00:25:34] Sidoniuns: has joined #ruby
[00:26:16] devoldmx: has joined #ruby
[00:26:32] Tricon: has joined #ruby
[00:27:42] null2: Question: I'm trying to troubleshoot why my terminal output with funky characters (colors and stuff) is not being encoded into valid JSON by JSON.generate
[00:28:37] null2: They payload is being sent by Net::HTTP, and I'm thinking of serializing the object using to_yaml, but what's the best way to view the deserialized content? Puts eats some of the funky encoding
[00:30:09] VeryBewitching: Oh, not present?
[00:31:11] predator217: has joined #ruby
[00:33:45] stannard: has joined #ruby
[00:37:13] bubbys: has joined #ruby
[00:38:11] simplyianm: has joined #ruby
[00:38:32] Croves: has joined #ruby
[00:39:48] B1n4r10: has joined #ruby
[00:41:16] patrick99e99: has anyone here used Stomp for publishing messages ?
[00:41:26] jackjackdripper: has joined #ruby
[00:42:12] neonalpine: has joined #ruby
[00:42:16] bubbys: has joined #ruby
[00:43:09] jhass: null2: inspect / p
[00:43:10] rickmasta: has joined #ruby
[00:44:18] devl: has joined #ruby
[00:44:56] opensource_ninja: has joined #ruby
[00:45:45] Ox0dea: has joined #ruby
[00:45:58] Ox0dea: VeryBewitching: You rang?
[00:46:29] VeryBewitching: Oh, yes, resolved. Was playing with variations of "deprecate"
[00:46:38] baweaver: has joined #ruby
[00:46:53] VeryBewitching: Thanks though :D
[00:47:04] Ox0dea: Are there variations, then?
[00:47:08] Ox0dea: > Try and enjoy programming with Ruby 2.3.0-preview1
[00:47:58] a346: has joined #ruby
[00:49:51] Ox0dea: "Deprecatively" is a mouthful.
[00:50:19] VeryBewitching: I have a class Component that can be deprecated by another Component; both remain relative, but one definition is the more widely accepted definition.
[00:51:04] VeryBewitching: I wanted to refer to the deprecator and had a stupid moment. Or rather I allowed the spell checker in RubyMine tell me that deprecator wasn't a word, then searched Google for "deprecater"
[00:51:19] Tref: has joined #ruby
[00:51:39] VeryBewitching: s/relative/relevant
[00:51:48] Ox0dea: Does RubyMine not permit custom dictionaries, then?
[00:51:59] dtordable: has joined #ruby
[00:52:27] leafybas_: has joined #ruby
[00:53:11] minimalism: has joined #ruby
[00:53:29] freerobby: has joined #ruby
[00:53:34] VeryBewitching: You can save the word to the dictionary (which I've now done) but initially, no, it didn't recognize the word.
[00:53:44] shevy: patrick99e99 never heard of Stomp before
[00:54:38] Ox0dea: VeryBewitching: Some cursory research into the matter reveals it's quite easy to add your own wordlist to RubyMine's spellchecker.
[00:54:43] abucha: has joined #ruby
[00:54:44] Ox0dea: I recommend words-insane: https://aur.archlinux.org/packages/words-insane/
[00:55:12] scmx: has joined #ruby
[00:55:13] Ox0dea: Its contents are as the tin suggests.
[00:55:27] blubjr: big Ox0dea
[00:55:30] VeryBewitching: Thing is, RubyMine normally gets it very right, but that's an interesting package.
[00:55:39] Ox0dea: It's even got Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch!
[00:56:17] Ox0dea: Which I can more or less pronounce after having gotten this jingle stuck in my head: https://www.youtube.com/watch?v=1BXKsQ2nbno
[00:57:08] patrick99e99: shevy: ok thanks... stackoverflow it is
[00:58:42] Sidoniuns: has left #ruby: ("Saindo")
[00:59:08] rgrmatt: has joined #ruby
[00:59:34] h99h9h88: has joined #ruby
[01:00:42] h99h9h88: has joined #ruby
[01:01:53] zapata: has joined #ruby
[01:02:19] lemur: has joined #ruby
[01:03:07] VeryBewitching: Ox0dea: When they talk about "the proper noun", it's that one.
[01:03:16] VeryBewitching: What a mouthful.
[01:03:27] Ox0dea: Welsh is bonkers.
[01:03:51] Ox0dea: One of those four consecutive Ls is basically pronounced like a K.
[01:05:07] karapetyan: has joined #ruby
[01:06:26] blackmes1: has joined #ruby
[01:06:34] bruno-: has joined #ruby
[01:07:09] chipotle: has joined #ruby
[01:07:37] rgrmatt: has joined #ruby
[01:07:40] zeroDivisible: has joined #ruby
[01:08:18] unknowns2k2: has joined #ruby
[01:08:30] jackjackdripper: has joined #ruby
[01:08:30] podman: has joined #ruby
[01:08:47] segfalt``: has joined #ruby
[01:10:55] ta: has joined #ruby
[01:10:58] Axsuul: has joined #ruby
[01:11:40] jackjackdripper: has joined #ruby
[01:13:31] axl_: has joined #ruby
[01:14:49] Axsuul: has joined #ruby
[01:15:12] s00pcan: has joined #ruby
[01:16:37] grill: this is more of a general software engineering question than a ruby question, but how would I initialize a static class?
[01:16:59] dlitvak: has joined #ruby
[01:17:10] blubjr: what do you mean
[01:17:53] jhass: grill: I tend to use a singleton if I feel the urge to do that
[01:18:02] bruce_lee: has joined #ruby
[01:18:08] grill: I need to set some class variables before I call a class' methods
[01:18:11] neonalpine: has joined #ruby
[01:18:39] jhass: have a look at the singleton stdlib
[01:18:48] grill: i'd rather not have to instantiate an object at all though
[01:18:50] Fire-Dragon-DoL: has joined #ruby
[01:19:06] jhass: any good reason?
[01:20:00] Ox0dea: grill: There's #class_variable_set?
[01:20:24] dlitvak_: has joined #ruby
[01:20:39] jhass: I don't think it's about doing it dynamically
[01:20:40] grill: i'm writing chef code, and i'd prefer to keep my code's gating statements (idempotency stuff) as concise as possible. If i use class methods, i can do it with one line. if i have to instantiate and object every time, I can't
[01:21:03] jhass: grill: seriously, actually look at what I proposed
[01:21:18] ekinmur: has joined #ruby
[01:22:02] B1n4r10: has joined #ruby
[01:22:27] grill: jhass I still have to instantiate an object once, right?
[01:22:38] jhass: it's implicitly done when you call instance
[01:22:53] jhass: the first time you call it I should specify
[01:23:18] grill: sure, but I'd still have to do the assignment, i.e. a = Example.instance
[01:23:34] grill: on the other hand, with a static class, i could just do Example::dosomething
[01:23:49] jhass: don't use :: to call methods
[01:23:59] jhass: Example.foo -> Example.instance.foo
[01:24:06] jhass: you can even sed that change
[01:24:41] grill: ok. reasonable
[01:24:44] grill: but what about this
[01:24:45] grill: http://stackoverflow.com/questions/5231534/ruby-on-rails-static-method
[01:25:04] grill: there's an answer with: MyModel::do_something # => "this is a static method"
[01:25:32] jhass: that's equivalent, :: works for calling methods, but it's bad style
[01:25:58] jhass: >> "it's not restricted to 'static' methods either"::size
[01:25:59] ruboto: jhass # => 46 (https://eval.in/467975)
[01:26:02] MacroniSalad: has joined #ruby
[01:27:30] northfurr: has joined #ruby
[01:29:15] grill: ok, so this singleton class looks like it could be workable. how would I go about giving it paramaters when calling instance? a = SomeClass.instance(parama, paramb) ?
[01:29:20] willharrison: has joined #ruby
[01:30:03] NeverDie: has joined #ruby
[01:30:39] Scripore: has joined #ruby
[01:30:48] goodcodeguy: has joined #ruby
[01:31:34] jhass: grill: I don't think it supports that
[01:31:37] Glenny: has joined #ruby
[01:31:49] Zafer: has joined #ruby
[01:32:00] grill: yeah. it doesn't
[01:32:03] Zafer: has left #ruby: ()
[01:33:09] jhass: it'd be weird if you don't know whether your arguments are used or ignored in a call to it anyway
[01:33:23] jhass: pass them to the method you're calling / define setters?
[01:33:45] jhass: but then it probably shouldn't initialize without the data present
[01:33:57] jhass: so ideally the initializer would pull the data
[01:35:14] gusrub: has joined #ruby
[01:36:38] grill: so, can i create an object and run one of its methods on a single line?
[01:37:27] skweek: has joined #ruby
[01:37:38] jhass: sure, just Foo.instance.method
[01:38:00] grill: I mean a non-singleton one
[01:38:19] shevy: I see in a .gemspec s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") and also s.rubygems_version used
[01:38:21] grill: so something like Foo.new(param).somemethod()
[01:38:32] ledestin: has joined #ruby
[01:38:43] grill: does that work in ruby?
[01:39:08] shevy: is it recommended to use .required_rubygems_version=? so far I have only been using .rubygems_version?
[01:39:32] shevy: aha I guess I was using it incorrectly lol
[01:39:34] jhass: grill: sure
[01:39:40] jhass: grill: new is just a method call too
[01:39:44] grill: that'll have to do for now
[01:40:33] jhass: shevy: I never used it and wouldn't unless I'm made aware that something I do needs a particular one
[01:42:38] htmldrum: has joined #ruby
[01:42:40] RegulationD: has joined #ruby
[01:43:24] uri: has joined #ruby
[01:44:15] shevy: jhass sorry, which one variant do you mean? you are using .rubygems_version= ? or .required_rubygems_version= ?
[01:45:28] tkuchiki: has joined #ruby
[01:46:48] Ox0dea: Spoken like a true Archer.
[01:47:17] jhass: "You're not using the latest version of something? [Closed Won't fix]"
[01:48:02] rgrmatt: has joined #ruby
[01:48:16] shevy: that sounds mean like Ulrich Drepper!
[01:49:22] abucha_: has joined #ruby
[01:51:24] mattwildig: has joined #ruby
[01:51:41] sgambino: has joined #ruby
[01:53:37] opensource_ninja: has joined #ruby
[01:53:57] wldcordeiro: has joined #ruby
[01:54:17] SigmundFried: has joined #ruby
[01:54:36] rgrmatt: has joined #ruby
[01:57:16] XxionxX: has joined #ruby
[01:57:39] XxionxX: just testing that my IRC client works
[01:57:55] tlolczyk: has joined #ruby
[01:58:29] ruboto: FailBit # => :| (https://eval.in/468001)
[01:58:45] bubbys: has joined #ruby
[01:59:18] tlolczyk: I need to either use the same ruby temp file or generate about 5000 files. Now I can rewind the file and rewrite, but how can I empty the file?
[02:00:05] jhass: tlolczyk: iirc there's IO#truncate or something
[02:00:08] Ox0dea: FailBit: Idle harder.
[02:00:10] luckyme: has joined #ruby
[02:00:17] FailBit: I am busy fixing my app kthx
[02:00:21] jhass: tlolczyk: http://devdocs.io/ruby/file#method-i-truncate
[02:00:27] FailBit: new relic should fucking fix theirs
[02:01:35] opensource_ninja: has joined #ruby
[02:03:09] lemur: has joined #ruby
[02:05:12] jhass: tlolczyk: btw sounds like you're using it for testing etc, if you just need an IO like interface StringIO might be interesting too
[02:06:17] dlitvak: has joined #ruby
[02:07:34] tlolczyk: jhass, thanks twice.
[02:08:35] bruno-: has joined #ruby
[02:08:55] tlolczyk: Oh no. Actually I use the temp to pipe data to another program in a popen command. So I think it almost has to be written to a file.
[02:09:49] Karunamon: has joined #ruby
[02:10:52] Ox0dea: tlolczyk: Definitely not.
[02:11:14] jhass: tlolczyk: why not pipe it over stdin?
[02:11:36] tlarevo: has joined #ruby
[02:11:43] Ox0dea: tlolczyk: IO.popen accepts a block and yields the process's stdin.
[02:13:06] mghaig: has joined #ruby
[02:13:11] tlolczyk: Hmmm. I will if it turns out to slow. I think even now the file is so short it does not actually save it to disk.
[02:14:04] axl_: has joined #ruby
[02:14:33] roxtrongo: has joined #ruby
[02:15:01] jhass: another option is to open a pipe (IO.pipe, pipe(2)), and let the process inherit the read end and then tell it the FD (parameter, environment)
[02:15:16] jhass: that's basically how systemd/launchd socket activation works btw
[02:16:27] mistermocha: has joined #ruby
[02:20:27] jhass: but if stdin free, that's basically the same for free
[02:21:20] dlitvak_: has joined #ruby
[02:22:28] hagabaka: has joined #ruby
[02:22:30] levifig: has joined #ruby
[02:22:39] an0ma1y: has joined #ruby
[02:22:49] spastorino: has joined #ruby
[02:22:55] null__: has joined #ruby
[02:23:11] purplexed-: has joined #ruby
[02:23:51] sumark_: has joined #ruby
[02:24:08] droidburgundy: has joined #ruby
[02:24:20] mhenrixon_: has joined #ruby
[02:24:32] mistym: has joined #ruby
[02:24:32] mistym: has joined #ruby
[02:24:34] rgrmatt: has joined #ruby
[02:25:28] nirix_: has joined #ruby
[02:26:16] jhass: tlolczyk: and if the process you pipe the data too is awkward and demands a "file", a named pipe would ensure there's no disk access no matter where you create it
[02:26:22] iamdevnul: has joined #ruby
[02:27:02] devoldmx: has joined #ruby
[02:27:17] rickmasta: has joined #ruby
[02:27:33] papercode: has joined #ruby
[02:27:43] arescorpio: has joined #ruby
[02:27:46] fedexo: has joined #ruby
[02:28:06] cjk101010: has joined #ruby
[02:28:19] MuffinPimp: has joined #ruby
[02:28:26] dannluciano: has joined #ruby
[02:29:26] yaewa: has joined #ruby
[02:29:50] Trynemjoel: has joined #ruby
[02:30:07] sdothum: has joined #ruby
[02:30:25] connor_goodwolf: has joined #ruby
[02:32:34] UtkarshRay: has joined #ruby
[02:32:35] bmalum: has joined #ruby
[02:33:14] doll: has joined #ruby
[02:33:54] null__: has joined #ruby
[02:33:57] banister: has joined #ruby
[02:35:28] exadeci: has joined #ruby
[02:35:53] null__: has joined #ruby
[02:36:07] vdamewood: has joined #ruby
[02:36:13] Sirecote: has joined #ruby
[02:36:20] ja: has joined #ruby
[02:36:26] doll: I'm making a fake online book store with activerecord and mysql; I need to create a promotions table (2 for 1 books, 3 for 2 books, etc). I'm having a hard time finding any documentation for something like this and #mysql is asleep. Any suggestions?
[02:36:38] dlitvak: has joined #ruby
[02:36:47] htmldrum: has joined #ruby
[02:37:05] sunya7a_1: has joined #ruby
[02:37:56] funnel: has joined #ruby
[02:37:57] sparr: has joined #ruby
[02:38:48] pabs: has joined #ruby
[02:38:57] moss: has joined #ruby
[02:42:16] zly: has joined #ruby
[02:42:28] rdema: has joined #ruby
[02:42:29] slash_ni1k: has joined #ruby
[02:42:35] dtordabl1: has joined #ruby
[02:42:52] lianj_: has joined #ruby
[02:42:57] bewie_: has joined #ruby
[02:43:02] Muz_: has joined #ruby
[02:43:03] Drakevr_: has joined #ruby
[02:44:20] null__: has joined #ruby
[02:44:20] ekinmur: has joined #ruby
[02:44:20] dtordable: has joined #ruby
[02:44:20] brushbox: has joined #ruby
[02:44:20] solars: has joined #ruby
[02:44:20] Muz: has joined #ruby
[02:44:20] slash_nick: has joined #ruby
[02:44:20] tiwillia: has joined #ruby
[02:44:20] fluchtreflex: has joined #ruby
[02:44:20] beagles: has joined #ruby
[02:44:20] Drakevr: has joined #ruby
[02:44:20] eboaz: has joined #ruby
[02:44:20] Elysia: has joined #ruby
[02:44:20] rdema_: has joined #ruby
[02:44:20] OmegaA: has joined #ruby
[02:44:20] wnd: has joined #ruby
[02:44:20] adamholt: has joined #ruby
[02:44:21] SilentEcho: has joined #ruby
[02:44:21] Nanuq: has joined #ruby
[02:44:21] SebastianThorn: has joined #ruby
[02:44:21] bewie: has joined #ruby
[02:44:21] lianj: has joined #ruby
[02:44:21] ozzloy: has joined #ruby
[02:44:21] cookiez: has joined #ruby
[02:44:21] bascht: has joined #ruby
[02:44:21] danoo_: has joined #ruby
[02:44:22] cookiez: has joined #ruby
[02:44:23] ozzloy: has joined #ruby
[02:44:23] SebastianThorn: has joined #ruby
[02:44:23] ozzloy: has joined #ruby
[02:44:41] cjk101010: has joined #ruby
[02:45:02] null__: has joined #ruby
[02:45:05] SilentEcho: has joined #ruby
[02:45:06] jokke: has joined #ruby
[02:45:07] tiwillia: has joined #ruby
[02:45:08] blue_deref: has joined #ruby
[02:45:19] Trieste: has joined #ruby
[02:46:09] mistermocha: has joined #ruby
[02:46:21] Elysia: has joined #ruby
[02:46:23] bascht: has joined #ruby
[02:47:07] skcin7: has joined #ruby
[02:47:17] sdwrage: has joined #ruby
[02:47:18] adamholt: has joined #ruby
[02:47:20] PhilK: has joined #ruby
[02:48:00] ElSif: has joined #ruby
[02:48:40] nibbo: has joined #ruby
[02:50:39] qiukun: has joined #ruby
[02:50:58] unknowns2k2: has joined #ruby
[02:51:22] blackmes1: has joined #ruby
[02:51:34] neonalpine: has joined #ruby
[02:56:16] sankaber: has joined #ruby
[02:57:36] dlitvak_: has joined #ruby
[02:57:39] astrobunny: has joined #ruby
[03:03:49] sdothum: has joined #ruby
[03:04:55] chastised: has joined #ruby
[03:05:08] A124: has joined #ruby
[03:05:56] Ox0dea: It seems even Fiddle can't be finagled into unprepending a module.
[03:06:01] inteq: has joined #ruby
[03:07:07] makenoise: has joined #ruby
[03:07:27] doll: did you jiggle the keys and give it gas?
[03:08:36] danoo_: has joined #ruby
[03:08:54] Ox0dea: It's a musical instrument.
[03:09:29] Senjai: has joined #ruby
[03:09:35] bruno-: has joined #ruby
[03:10:15] mistym: has joined #ruby
[03:10:15] mistym: has joined #ruby
[03:12:25] chastised: hi I just installed ruby on a debian machine with apt-get . but it won't run a ruby file or invoke irb
[03:12:55] tlarevo: has left #ruby: ()
[03:13:32] |ifei5g00d: has joined #ruby
[03:14:00] Coldblackice: has joined #ruby
[03:14:35] dlitvak: has joined #ruby
[03:14:51] Ox0dea: https://eval.in/468010
[03:14:51] axl_: has joined #ruby
[03:15:08] Ox0dea: I can't even tell if this is a bug.
[03:16:27] DLSteve: has joined #ruby
[03:16:38] chastised: well, my ruby command must be ruby2.1 and I still cannot invoke irb. is there somewhere I make an alias or something?
[03:17:26] Ox0dea: chastised: What happens when you try to invoke irb?
[03:17:43] shevy: normally debian has these as symlinks ruby -> ruby2.1
[03:18:00] shevy: look in /usr/bin/ for *ruby* and *irb* as pattern match
[03:18:09] shevy: but apt-get takes care of that normally
[03:18:41] chastised: shevy weird . Ox0dea irb returns command not found
[03:19:20] Ox0dea: chastised: You ran `apt-get install ruby2.1`, then?
[03:19:30] favadi: has joined #ruby
[03:19:56] chastised: Ox0dea, yeah I tried apt-get install ruby-full but it wouldn't work
[03:20:00] shevy: it must have installed it
[03:20:13] nomadam: has joined #ruby
[03:20:25] Ox0dea: chastised: What does `dpkg-query -L ruby2.1 | grep irb` return?
[03:20:28] NeverDie: has joined #ruby
[03:21:01] doll: @Ox0dea holy mother it just took a dump
[03:21:07] Ox0dea: doll: That it did.
[03:21:10] shevy: https://packages.debian.org/jessie/i386/ruby2.1/filelist
[03:21:21] EminenceHC: has joined #ruby
[03:21:21] shevy: it lists /usr/bin/ruby2.1 but no /usr/bin/ruby
[03:21:33] subscope: has joined #ruby
[03:21:34] shevy: is the symlink-creation part of a post-installation step?
[03:21:36] Ox0dea: Doesn't Debian have a package where it sticks all its symlinks?
[03:21:49] Ox0dea: Or... some program for building them or something.
[03:21:53] shevy: I think it has some shell file that may do those things... yeah
[03:22:00] iateadonut: has joined #ruby
[03:22:02] chastised: Ox0dea, shevy no clue working on it...
[03:22:24] shevy: but that is weird, I recall apt-get install ruby having worked and created /usr/bin/ruby properly. no idea why it does not in chastised's case
[03:22:32] shevy: anyway if it is just one symlink you can create it manually :D
[03:22:53] chastised: the only thing in /usr/bin/ is ruby2.1
[03:22:57] VeryBewitching: You might have to run update-alternatives to set that ruby.
[03:23:03] Ox0dea: That's the one!
[03:23:16] chastised: that's an apt-get command?
[03:23:24] VeryBewitching: which update-alternatives
[03:23:34] shevy: debian has those /etc/alternatives/ thingies
[03:23:39] Ox0dea: What a mess.
[03:23:45] chastised: kindly explain
[03:23:47] shevy: where it attempts to allow multiple versions of programs
[03:24:00] chastised: like rvm on mac?
[03:24:08] shevy: I think rvm only handles ruby
[03:24:15] Ox0dea: chastised: `update-alternatives` is a program you almost certainly already have installed.
[03:24:16] VeryBewitching: chastised: You could run Ruby 1.8.x, 1.9.x and 2.0.x and 2.1.x with update-alternatives
[03:24:28] shevy: /etc/alternatives/ could in theory maintain every program, so you could have multiple different versions
[03:24:30] shevy: of programs
[03:24:40] VeryBewitching: I install ruby with ruby-install and use rubies with chruby
[03:24:48] shevy: that is one reason why debian installs /usr/bin/ruby2.1 btw and not /usr/bin/ruby
[03:25:02] northfurr: has joined #ruby
[03:25:18] chastised: I'm losing you guys. what should I do to get a normal ruby command and irb up?
[03:25:19] shevy: I don't know which other programs are managed like that though... perhaps python?
[03:25:30] Ox0dea: chastised: Did you run that `dpkg-query` line from earlier?
[03:25:30] VeryBewitching: chastised: one sec, finding an article
[03:25:32] shevy: chastised if you have only one ruby installed, just do a manual symlink
[03:25:42] Ox0dea: But why don't they have irb?
[03:25:48] VeryBewitching: chastised: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you//
[03:25:49] shevy: I think he has irb2.1
[03:26:07] shevy: Ox0dea does arch also version binaries like that?
[03:26:14] Ox0dea: You sick fuck.
[03:26:21] chastised: oh yeah irb2.1 works!
[03:26:45] shevy: good! now you can enter ruby code \o/
[03:27:02] VeryBewitching: chastised: I'd recommend reading through the article above, it doesn't take long to go through the steps and still works on 15.10
[03:27:02] Ox0dea: chastised: Your OS really ought to have automatically built the appropriate symlink, though.
[03:27:03] shevy: never trust a debian ruby fully though ...
[03:27:14] shevy: yeah read through it just in case when you want to switch one day
[03:27:33] Ox0dea: chastised: 2.3 is coming out in a little over a month; any particular reason you decided on 2.1?
[03:27:51] VeryBewitching: I think it.s the 2.x stable on Debian
[03:28:03] dented42: has joined #ruby
[03:28:09] VeryBewitching: Ubuntu should be on 2.2.x though by now
[03:28:11] doll: how the fuck can i make a 2 for 1 sale in ruby http://pastie.org/private/b7eygi3nrm5myjwxvheta
[03:28:15] Ox0dea: > Bugs? You must be kidding; there are no bugs in this software.
[03:28:36] Ox0dea: From pacman's manpage. :P
[03:29:06] shevy: ubuntu is faster than debian?
[03:29:25] Ox0dea: Debian has flavors.
[03:29:34] tlolczyk: I feel sort of embarassed to ask this, but I can't quite figure out the docs. I have a hash call it h. The keys are md5 values. The values are arrays of objects having the same md5 as the key. I would like to generate an array of keys sorted by the number of elements in each array.
[03:30:01] shevy: well you can .sort or .sort_by in any way you want to
[03:30:30] Ox0dea: tlolczyk: Are you finding collisions?
[03:30:35] tlolczyk: shevy, that's the part I can't figure out.
[03:31:01] Ox0dea: tlolczyk: h.sort_by { |_, v| v.size }.map(&:first)
[03:31:28] Ox0dea: Hash#sort_by gives you back a nested array of key-value pairs.
[03:31:53] chastised: shevy new to linux: could you hint at how to create the symlink? I've done alias' in .bashrc before that's it.
[03:32:08] tlolczyk: Ox0dea, collisons? That's why there are arrays of objects, and I want them to collide a bit.
[03:32:19] VeryBewitching: chastised: ln -s /path/to/source /path/to/destination
[03:32:36] Ox0dea: tlolczyk: Well, you said you have arrays whose MD5s are all the same? That means they collide.
[03:32:54] Ox0dea: *arrays whose elements' MD5s
[03:33:22] makenoise: has joined #ruby
[03:34:52] dlitvak: has joined #ruby
[03:35:03] tlolczyk: Ox0dea, and what are the two arguments to the block, and what is the block used for?
[03:35:10] shevy: chastised cd /usr/bin; ln -s ruby2.1 ruby
[03:35:24] makenoise: has joined #ruby
[03:35:30] tlolczyk: That's the confusing part.
[03:35:40] Ox0dea: tlolczyk: The key and the value for each element of the hash; I've called the first `_` there to indicate that we've no interest in the key for the purposes of our sort.
[03:35:42] shevy: you have a hash so you have key,value
[03:36:02] shevy: VeryBewitching you have to ask for permission? BECOME THE SUPERUSER!!!
[03:36:05] Ox0dea: And the block just explains how to do the sorting; in this case, you want to sort based on the size of the array in `v`.
[03:36:10] VeryBewitching: chastised: You have to put sudo before any of these commands
[03:36:45] VeryBewitching: shevy: I try to make my occupation of root prompts quick-lived events :)
[03:37:14] shevy: I am scared when I am superuser and on /
[03:37:20] shevy: I usually chicken out and go to a safe directory instead
[03:37:22] VeryBewitching: I've accidentally done things, bad things, and though it was long ago, I remember how badly it hurts when you've chowned something incorrectly
[03:37:32] shevy: I once did a wrongful tab-complete
[03:37:49] chastised: thanks shevy VeryBewitching
[03:38:02] shevy: ended up doing something like: rm -rf /foo/bar <tab-space-press> / <quick-enter-press>
[03:38:32] Ox0dea: shevy: Was this about ten years ago, then?
[03:38:57] shevy: I think I used linux perhaps 2 years or so; the biggest surprise was about the tab completion itself btw, not about rm
[03:39:02] tlolczyk: Ox0dea, yes but how does the block tell the sort how to arrange the elements. The traditional way in other languages is two give two key value pairs and return a value based on which is bigger.
[03:39:21] Ox0dea: tlolczyk: Right, that's what the block to #sort needs to do.
[03:39:39] Ox0dea: But #sort_by is nice and convenient and just lets you specify the "sort key", so to speak.
[03:39:39] VeryBewitching: I've been on Linux since '99, RedHat Mahnattan
[03:39:51] waka: has joined #ruby
[03:39:51] shevy: you can not be very young anymore VeryBewitching!
[03:40:12] shevy: the usual tell-tale sign of old age is nostalgi
[03:40:15] shevy: erm nostalgia
[03:40:24] shevy: and when you think that the 1980s and 1990s had great music
[03:40:25] VeryBewitching: That wasn't nostalgia, I hate RH :D
[03:40:31] tlolczyk: VeryBewitching, beat you by three years and slackware!
[03:40:39] shevy: yay slackware!
[03:40:42] pontiki: VeryBewitching: then that's nastaligia :>
[03:40:50] tlolczyk: On a 75MHZ PackardBell.
[03:40:58] shevy: yay for no resources!
[03:41:10] VeryBewitching: Pentinum 90 w/8Mb RAM
[03:41:17] IrishGringo: has joined #ruby
[03:41:26] shevy: good old days
[03:41:35] Ox0dea: >> 'landline'.tr 'denial', '-/ fmr'
[03:41:36] ruboto: Ox0dea # => "rm -rf /" (https://eval.in/468028)
[03:41:53] Ox0dea: `echo landline | tr denial -/\ fmr` for the bold.
[03:43:39] tlolczyk: and I had to get the source to olvwm myself.
[03:43:45] Ox0dea: Spooky computer magicks.
[03:43:47] tlolczyk: The sad thing is that it's now hard to find a good linux for a Pi even though it is several orders of magnitude more powerful.
[03:44:05] RegulationD: has joined #ruby
[03:44:06] Ox0dea: tlolczyk: Arch runs on the Pi.
[03:44:06] VeryBewitching: I like a blunt tool: perl -e "while(true) { fork(); }"
[03:44:30] Ox0dea: :(){ :|:& };:
[03:44:40] shevy: you can do this in ruby!
[03:44:54] Ox0dea: >> loop { fork }
[03:44:55] ruboto: Ox0dea # => (https://eval.in/468029)
[03:45:00] VeryBewitching: It can be done in man languages.
[03:45:03] shevy: ruby is the cleaner perl
[03:45:07] Eiam_: has joined #ruby
[03:45:09] shevy: man languages!
[03:45:20] shevy: real man languages, like grunt and stomp and whack
[03:45:32] shevy: cave man programming
[03:45:40] VeryBewitching: BASH NOT WORKING
[03:45:40] shevy: they scribbled algorithms on the cave wall
[03:46:10] shevy: imagine if they discover a cave man writing code
[03:46:24] Ox0dea: I wrote my entire solution to Project Euler #54 on paper in C.
[03:46:28] VeryBewitching: I think I could program reality.
[03:46:46] lubarch: has joined #ruby
[03:47:04] Ox0dea: (I seriously did, but I'll spare us all the embarrassment of saying where and why.)
[03:47:27] VeryBewitching: I still write in C sometimes.
[03:48:51] shevy: you could write in ruby-qt
[03:49:12] shevy: my new year's task was to learn C in 2015
[03:49:15] VeryBewitching: Ya, the bindings on Ubuntu are bound to the system ruby
[03:49:15] shevy: I didn't do it :(
[03:49:19] VeryBewitching: Which I've removed
[03:49:47] VeryBewitching: But I could. Kross support in KDE will soon allow for writing scripts for the KDE desktop in Ruby; though I don't know how far along it is.
[03:50:22] shevy: what desktop environment are you using right now?
[03:50:22] VeryBewitching: C isn't so much difficult to learn as it is challenging to do well with, all the time. At least that's how it was for me.
[03:50:41] shevy: ruby spoiled me
[03:50:47] shevy: but there is no way around C
[03:51:29] mattwildig: has joined #ruby
[03:51:32] nateberkopec: has joined #ruby
[03:52:08] sankaber: has joined #ruby
[03:52:31] VeryBewitching: https://dl.dropboxusercontent.com/u/1422687/shevy_shot.png
[03:52:45] shevy: http://blog.michelada.io/ruby-2-3-0-preview-1
[03:52:53] shevy: did you shot shevy? :(
[03:53:04] VeryBewitching: A screenshot for you, that's Plasma 5
[03:53:05] shevy: I don't even know what that is... a mac?
[03:53:18] shevy: looks like a mac to me!!!
[03:53:32] shevy: doesn't look like kde
[03:53:37] shevy: I am on fluxbox right now btw
[03:54:39] VeryBewitching: KDE allows you to create the desktop, essentially. I change it under certain scenarios.
[03:55:09] pontiki: Ox0dea: when you write out your solutions, do you do it in free verse, or do you use a coding sheet? :D
[03:55:32] VeryBewitching: Ox0dea: How did you do on #54?
[03:55:40] Ox0dea: pontiki: In this particular case, I just lay in the hammock for a while, then wrote the damned thing top-to-bottom.
[03:55:45] slawrence00: has joined #ruby
[03:55:47] northfurr: has joined #ruby
[03:55:54] Ox0dea: VeryBewitching: I... solved it?
[03:55:54] baweaver: has joined #ruby
[03:56:19] VeryBewitching: Ox0dea: Excellent. :D
[03:57:55] pontiki: Ox0dea: was there beach nearby?
[03:57:58] gambl0re: has joined #ruby
[03:58:05] Ox0dea: pontiki: After a fashion.
[03:58:56] pontiki: so mysterious
[03:59:31] howdoi: has joined #ruby
[03:59:46] Ox0dea: In any case, here it is: https://eval.in/468030
[03:59:54] VeryBewitching: I used to throw a gel stress ball up and down and walk around my house for a few hours and then go write code for 10 hours.
[04:00:39] quazimodo: has joined #ruby
[04:00:44] Ox0dea: It's excessively optimized, but that's what C is for these days.
[04:00:47] pontiki: koosh balls here
[04:00:51] quazimodo: has ruby 2.2+ got a way to 'uninclude' a module?
[04:01:02] quazimodo: i see that there have been several attempts at a library to do this
[04:01:13] quazimodo: but it appears that they are a little older
[04:01:15] pontiki: your courier penmanship is impeccable
[04:01:22] Ox0dea: quazimodo: It can be done from a C extension, but banister hasn't touched remix in forever.
[04:01:34] Ox0dea: pontiki: Ha!
[04:01:37] beast_: has joined #ruby
[04:01:59] Ox0dea: I couldn't even begin to say where the original resides.
[04:02:04] quazimodo: Ox0dea: hrm ok.
[04:02:08] pontiki: ACTION ponders, writing software in roundhand
[04:02:19] quazimodo: I'll use another approach then :)
[04:03:11] Ox0dea: quazimodo: I've been trying to "unprepend" with Fiddle, but no luck.
[04:03:49] zachrose__: has joined #ruby
[04:04:13] diegoaguilar: has joined #ruby
[04:04:57] Ox0dea: Each non-singleton Ruby object's first 16 bytes in memory are some flags and its class; I thought copying these from the original before prepending then sticking them back in after might do the trick, but it didn't.
[04:06:49] Ox0dea: quazimodo: I have good news.
[04:07:11] quazimodo: Ox0dea: they invented teleportation that can be used to teleport food out of your stomach so you can eat and eat and eat ?
[04:07:25] Ox0dea: No, but you can uninclude modules. :P
[04:07:58] diegoaguilar: has joined #ruby
[04:08:23] Ox0dea: quazimodo: https://eval.in/468033
[04:08:30] Ox0dea: That `n` will need to be 20 if you're on 64-bit.
[04:09:12] gix: has joined #ruby
[04:09:28] devbug: has joined #ruby
[04:09:41] abucha: has joined #ruby
[04:09:54] quazimodo: Ox0dea: that seems scary
[04:09:58] Ox0dea: quazimodo: Just do it.
[04:10:19] Ox0dea: What could possibly go wrong?
[04:10:19] bruno-: has joined #ruby
[04:10:27] Ox0dea: (I'm not being facetious, mind.)
[04:10:41] Ox0dea: Ruby's method lookup algorithm is remarkably simple; if you remove the module from the ancestor chain, it won't participate.
[04:10:54] quazimodo: so you need to hold onto the old pointer location
[04:10:56] braincrash: has joined #ruby
[04:11:05] quazimodo: before you do your include
[04:11:15] Ox0dea: Well, yeah; is that a dealbreaker?
[04:11:16] quazimodo: and if in between your include & uninclude 10 other things get included what happens
[04:11:34] quazimodo: which in a testing scenario
[04:11:39] quazimodo: since i'm only doing this in specs
[04:11:49] Ox0dea: This is your fault for wanting to uninclude, you know.
[04:12:06] Ox0dea: Why not just `include` into anonymous classes instead?
[04:12:22] quazimodo: that's an incredible idea
[04:12:31] Ox0dea: Yay, Ruby!
[04:12:33] quazimodo: here's another one
[04:13:16] quazimodo: how do you mock a method on a class (this is in rspec) if that method is defined on an anonymous module (the class actually doesn't have that method so rspec doesn't let you mock it)f
[04:13:41] Ox0dea: Probably just reconsider some things.
[04:14:23] ESpiney: has joined #ruby
[04:14:32] Ox0dea: >> Class.new.include(Module.new { def foo; end }).new.respond_to? :foo # quazimodo
[04:14:33] ruboto: Ox0dea # => true (https://eval.in/468034)
[04:14:44] Ox0dea: All that anonymity and it still responds just fine.
[04:15:05] quazimodo: Ox0dea: i like you
[04:15:09] quazimodo: why is your name Ox0dea
[04:15:17] Ox0dea: They're my initials.
[04:15:45] Ox0dea: ~ $ whoami
[04:15:50] axl_: has joined #ruby
[04:17:06] Ox0dea: If you were asking why I'm using a capital O in a hexadecimal prefix, it's because some IRC RFC somewhere is stupid and dumb.
[04:17:55] shevy: god your nick is so weird Ox0dea
[04:19:33] dimasg: has joined #ruby
[04:20:42] vdamewood: has joined #ruby
[04:20:57] sankaber: has joined #ruby
[04:21:18] pontiki: weirder than mine?
[04:22:48] VeryBewitching: Only I am VeryBewitching
[04:23:02] shevy: pontiki you don't have any O disguised as 0!
[04:23:05] pontiki: ACTION squeeqs @ VeryBewitching 
[04:23:27] quazimodo: Ox0dea: can't do it mate
[04:23:30] quazimodo: everything's fuckd
[04:23:39] quazimodo: it's because of how grape works
[04:23:40] pontiki: hummm. it always seemed so obvious to me...
[04:23:42] VeryBewitching: l2monospace people
[04:23:43] Ox0dea: pontiki: That word is very nearly palindromic and onomatopoeic.
[04:23:55] VeryBewitching: It's clearly a O and not a 0 to those with the will to change fonts.
[04:23:58] northfurr: has joined #ruby
[04:24:07] Ox0dea: Slashed zero best zero.
[04:24:31] Ox0dea: VeryBewitching: Font of choice?
[04:24:39] rbowlby: has joined #ruby
[04:24:48] Ox0dea: (There are only two correct answers.)
[04:24:58] VeryBewitching: Source Code Pro 9
[04:25:09] pontiki: usually i spell it "sqeeqs" dunno why i put in the 'u' this time
[04:25:11] Ox0dea: It's so tall! :<
[04:25:42] Ox0dea: Tamsyn forever, OhSnap when I'm feeling silly.
[04:25:45] djbkd: has joined #ruby
[04:26:02] VeryBewitching: Mine is set to Semibold though
[04:26:11] VeryBewitching: I like dense lettering on the desktop.
[04:26:34] pontiki: screenshot?
[04:26:35] quazimodo: Ox0dea: why does fiddle give you pointer access?
[04:26:45] Ox0dea: quazimodo: Because Ruby is awesome?
[04:27:22] quazimodo: yeah but why does -fiddle- have that
[04:27:47] devoldmx: has joined #ruby
[04:28:14] VeryBewitching: pontiki: https://dl.dropboxusercontent.com/u/1422687/shevy_shot.png
[04:28:49] Ox0dea: quazimodo: It's for interfacing with C, why wouldn't it?
[04:29:03] pontiki: that's a *seriously* awesome backdrop, VeryBewitching
[04:29:35] VeryBewitching: Ya, I like that one.
[04:29:40] VeryBewitching: I like grayscale.
[04:30:08] pontiki: when i shot analog film, black&white was my film / paper of choice
[04:30:18] pontiki: still love it so much
[04:30:44] pontiki: colour sometimes really gets in my way in painting class too, weird as that sounds
[04:31:07] Ox0dea: This is OhSnap: http://i.imgur.com/38a4ypy.png
[04:31:17] Ox0dea: I pretty much exclusively use it when I'm writing LOLCODE. ^_^
[04:31:19] bruce_lee: has joined #ruby
[04:31:31] VeryBewitching: pontiki: Colour reminds you what the mind won't accept if you're willing to colour against the norm.
[04:31:34] pontiki: haha, that is awesome! great playtime font
[04:32:06] Ox0dea: VeryBewitching: Should we morally oppose the rainbow?
[04:32:18] Ox0dea: Rather, are we morally obligated to do so?
[04:32:25] pontiki: the grey-bow flag?
[04:32:35] Ox0dea: That is a thing, I think.
[04:32:44] pontiki: might be, there's tons of them
[04:32:48] VeryBewitching: Ox0dea: Don't get me started in that direction, cause this channel will become #metaphysical
[04:32:57] Ox0dea: Bring it.
[04:33:05] Ox0dea: Metaphysics is my shit.
[04:33:59] VeryBewitching: If you vary the colours in the rainbow, in a painting, whathaveyou, you are creating two many new uses in the process of finding the tone you're looking for.
[04:34:40] qiukun: has joined #ruby
[04:34:53] pontiki: for me, trying the make the colour right causes me to lose the picture itself
[04:35:03] _whitelogger: has joined #ruby
[04:35:31] Ox0dea: VeryBewitching: But what is really lost in that process? Ought we have any investiture in the fates of the hues unused?
[04:35:59] pontiki: shape, line, texture, pattern still seem to do best for me
[04:36:41] pontiki: lots of people like my value studies, not so much the colour versions
[04:36:47] VeryBewitching: pontiki: Could be that you're more interested in definition and structure than in impact beyond yourself at this time in your process. Keep painting. :)
[04:37:03] pontiki: oh yeah, i'm not looking for answers
[04:37:11] astrobunny: has joined #ruby
[04:37:12] pontiki: just questions to explore
[04:37:37] quazimodo: Ox0dea: the gem says it's about reporting?
[04:37:48] Ox0dea: I don't particularly like to have to say it, but color is very important.
[04:37:56] Ox0dea: quazimodo: Fiddle is in the standard library?
[04:37:58] quazimodo: https://github.com/bsm/fiddle
[04:38:02] Ox0dea: Wrong one.
[04:38:03] pontiki: VeryBewitching: for a stretch of a few months, i had a moratoreum on colour painting
[04:38:05] Yzguy: has joined #ruby
[04:38:08] Ox0dea: >> require 'fiddle'; Fiddle # quazimodo
[04:38:09] ruboto: Ox0dea # => Fiddle (https://eval.in/468041)
[04:38:22] VeryBewitching: Ox0dea: Lost and gained.
[04:38:23] quazimodo: that's a rails engine
[04:38:54] Ox0dea: quazimodo: I mean, I demonstrated right there on eval.in? :P
[04:39:04] VeryBewitching: pontiki: I like to sketch concepts.
[04:39:50] pontiki: is pictionary your favourite game, too?
[04:39:58] lubarch: has joined #ruby
[04:40:07] VeryBewitching: Uh, no, because my sketches only make sense to me :D
[04:40:41] VeryBewitching: Like I sketch the concept of 'hanging' and it does.. not look like that
[04:41:01] quazimodo: Ox0dea: I am dumb ok
[04:41:09] Ox0dea: quazimodo: Okay.
[04:41:49] devoldmx: has joined #ruby
[04:42:38] Ox0dea: pontiki, VeryBewitching: What color should her dress be? http://i.imgur.com/qdb1ZX3.jpg
[04:43:08] Ox0dea: Or do you feel that the image is impactful enough as is?
[04:43:11] solars: has joined #ruby
[04:43:25] blackmes1: has joined #ruby
[04:43:39] Ox0dea: I do appreciate that it would've been painted very differently if they'd done it in grayscale from the first.
[04:43:59] Arkon: has joined #ruby
[04:44:01] charliesome: has joined #ruby
[04:44:30] VeryBewitching: If it were coloured and I was bound to that task, since it looks more like hide than cloth, I would chose soft-hide tanning tones.
[04:45:12] Oatmeal: has joined #ruby
[04:45:25] VeryBewitching: But... I parsed the image for a girl in the dress.
[04:45:41] Ox0dea: How do you mean?
[04:45:52] VeryBewitching: I didn't parse her situation, just her.
[04:46:01] VeryBewitching: I didn't look at the *whole* picture
[04:46:03] tlarevo_: has joined #ruby
[04:46:24] Ox0dea: I guess I'll cut to the chase: http://i.imgur.com/l7w63lK.jpg
[04:46:46] Ox0dea: That she and her flower alone contribute color to the scene is quite poignant.
[04:47:21] Ox0dea: Much is lost without color in this particular case, is the point I'm driving toward.
[04:49:40] pontiki: is just the dress to have colour and the rest of the image to remain b&w mono?
[04:50:08] VeryBewitching: The flower isn't noticable in the B&W
[04:50:22] Ox0dea: The background of the colored image could well be described as "gray", in my estimation.
[04:50:23] pontiki: i see it quite well
[04:50:38] VeryBewitching: I do now that I've seen the coloured image, but I didn't before.
[04:50:53] pontiki: i'd colour the petals bright yellow, the dress deep red and leave the rest as it currently is
[04:51:23] rickmasta: has joined #ruby
[04:51:25] Ox0dea: Sin City-style, then?
[04:51:35] pontiki: i wouldn't know
[04:51:35] x-light: has joined #ruby
[04:53:28] pontiki: yellow flowers denote friendship, and red denotes passion and sex
[04:53:42] VeryBewitching: Also mortality and pain.
[04:53:47] VeryBewitching: Depending on whom you ask.
[04:54:25] pontiki: i was asking me
[04:55:33] diegoaguilar: has joined #ruby
[04:55:33] Ox0dea: Virtually every speaking culture has words for black, white, red, and yellow.
[04:55:58] Ox0dea: Are these the most "natural" colors?
[04:56:27] pontiki: of that, i have no idea
[04:56:30] VeryBewitching: They might be the most common.
[04:56:41] shinenelson: has joined #ruby
[04:57:02] Ox0dea: Surely we'd expect to find green in there, and yet even Japanese isn't on solid ground there.
[04:57:13] Ox0dea: Minus a "there" somewhere.
[04:57:48] tkuchiki: has joined #ruby
[04:57:54] pontiki: there's *tons* of variation in "green" -- very hard to pin down
[04:58:08] VeryBewitching: ACTION is blue/green colourblind.
[04:59:31] Ox0dea: Oh, Stage III is apparently "green or yellow": https://en.wikipedia.org/wiki/Basic_Color_Terms:_Their_Universality_and_Evolution
[05:00:46] VeryBewitching: So their description of it would have survived earliest language formation.
[05:00:57] VeryBewitching: As you often have to refer to a colour to refer to an object
[05:01:23] pontiki: ACTION passes VeryBewitching an orange
[05:01:35] VeryBewitching: ACTION is diabetic :)
[05:01:46] VeryBewitching: Keep the sugar away from me
[05:01:57] pontiki: i didn't say you had to eat it
[05:02:18] pontiki: i'm keeping the red for myself :P
[05:02:19] wa_r_ch_i__ld1: has joined #ruby
[05:02:26] wa_r_ch_i__ld1: does Ruby have the equivalent of Java's KeyEvent (i.e to generate a keyboard input)?
[05:02:41] BraddPitt: to generate or capture?
[05:02:49] tomdp: It doesn't.
[05:02:57] nateberkopec: has joined #ruby
[05:03:22] VeryBewitching: pontiki: I like puns, too.
[05:03:39] Ox0dea: wa_r_ch_i__ld1: But that's not what Java's KeyEvent does.
[05:03:45] tomdp: I'm sure you can interface with it via JRuby though. I don't know anything about JRuby
[05:04:08] wa_r_ch_i__ld1: I meant KeyPress on a keyevent ;)
[05:04:29] dionysus69: has joined #ruby
[05:04:33] Ox0dea: wa_r_ch_i__ld1: Are you making a game?
[05:04:58] wa_r_ch_i__ld1: trying to fill in a browser based authentication popup
[05:05:18] Ox0dea: wa_r_ch_i__ld1: There are several Ruby libraries for browser driving.
[05:05:21] dionysus69: has joined #ruby
[05:05:22] tomdp: You could try browser automation using watir or something
[05:05:34] tomdp: Beat me to it :)
[05:05:41] wa_r_ch_i__ld1: watir 0.0.1 needs ruby >=1.9.2
[05:06:07] Ox0dea: Are you on Ruby 0.49?
[05:06:16] Ox0dea: Same thing.
[05:06:18] gix: has joined #ruby
[05:11:22] bruno-: has joined #ruby
[05:12:50] Ox0dea: wa_r_ch_i__ld1: Is this to be run on your local machine, then?
[05:13:12] wa_r_ch_i__ld1: eventually on a server
[05:13:19] tomdp: An old version of mechanize might run on 1.8
[05:13:28] Ox0dea: Then you're really gonna want a headless browser. ^
[05:14:11] wa_r_ch_i__ld1: @Ox0dea not an options here ;)
[05:14:26] Ox0dea: Whale, you're SOL, I reckon.
[05:14:30] zachrose: has joined #ruby
[05:14:51] wa_r_ch_i__ld1: @tomdp I dont think mechanize can get to a browser generated popup
[05:15:18] pontiki: switch to node and use phantomjs
[05:15:25] Ox0dea: He can't.
[05:15:38] Ox0dea: It's 2001 wherever he is.
[05:16:00] shevy: and the nick
[05:16:02] pontiki: HAL could do it
[05:16:06] shevy: he deliberately picked it with the _
[05:16:11] Ox0dea: I've been trying to fill in the blanks since he joined.
[05:16:12] tomdp: @wa_r_ch_i__ld1 is it a JS popup, outside the DOM?
[05:16:25] Ox0dea: Are you sure?
[05:16:36] tomdp: What generates the popup?
[05:16:41] axl_: has joined #ruby
[05:17:02] pontiki: well, i'm stumped. i don't know any browsers than can generate events without javascript
[05:17:14] pontiki: even way back in 2001
[05:17:17] tomdp: what code that the browser is reading? Is it like an apache basic auth style thing?
[05:17:21] wa_r_ch_i__ld1: http://stackoverflow.com/questions/27878208/webdriver-http-authentication-dialog
[05:17:24] wa_r_ch_i__ld1: second answer first paragraph
[05:17:57] bb010g: has joined #ruby
[05:18:05] tomdp: Ah! So, yeah, you need deep browser automation, outside the DOM
[05:18:25] Ox0dea: wa_r_ch_i__ld1: Is the server running Linux and a GUI?
[05:18:33] darkf: has joined #ruby
[05:18:33] Ox0dea: xdotool it is!
[05:18:34] darkf: has joined #ruby
[05:18:42] Ox0dea: It's like AutoIt for Unix.
[05:18:43] wa_r_ch_i__ld1: ah i heard of that
[05:18:55] wa_r_ch_i__ld1: I will try some things out brb
[05:18:59] Ox0dea: Happy to help.
[05:21:39] Rodya_: has joined #ruby
[05:21:57] Tref: has joined #ruby
[05:22:48] mary5030: has joined #ruby
[05:22:55] anfeardubh: has joined #ruby
[05:24:51] Rodya_: has joined #ruby
[05:25:47] pdoherty: has joined #ruby
[05:27:05] Maletor: has joined #ruby
[05:27:42] Arkon: has joined #ruby
[05:28:51] tomphp: has joined #ruby
[05:30:22] yfeldblum: has joined #ruby
[05:30:59] ReK2: has joined #ruby
[05:34:40] Rodya_: has joined #ruby
[05:36:55] VeryBewitching: Causes the browser to generate a prompt without JS
[05:37:00] simplyianm: has joined #ruby
[05:37:31] VeryBewitching: Usually implemented in .htaccess files
[05:41:57] sdwrage: has joined #ruby
[05:42:26] Rodya_: has joined #ruby
[05:44:10] XxionxX: has left #ruby: ()
[05:44:12] blackmes1: has joined #ruby
[05:44:53] RegulationD: has joined #ruby
[05:45:30] Rodya_: has joined #ruby
[05:48:34] zotherstupidguy: has joined #ruby
[05:49:50] h99h9h88: has joined #ruby
[05:50:43] araujo__: has joined #ruby
[05:52:09] luckyme: has joined #ruby
[05:53:30] rickmasta: has joined #ruby
[05:53:32] Arkon: has joined #ruby
[05:54:28] Arkon_: has joined #ruby
[05:54:49] shevy: so what are you people doing
[05:54:53] shevy: who is writing the next breakthrough
[05:56:00] ramfjord: has joined #ruby
[05:58:59] pontiki: no one will know until it breaks through
[06:00:11] simplyianm: has joined #ruby
[06:00:58] baweaver: well my break is about through
[06:01:00] baweaver: does that count?
[06:01:15] Ox0dea: shevy: I found out that the four bytes after an Object's RBasic struct contain its included ancestors, so I wrote this: https://eval.in/468047
[06:01:34] djbkd: has joined #ruby
[06:01:35] Ox0dea: Why you would realistically need ephemeral inclusion is difficult to say.
[06:01:48] VeryBewitching: I got a 500 at that URL
[06:01:52] zotherstupidguy: shevy i dont think the people who write the next breakthrough hanghout here :)
[06:02:46] nofxx: has joined #ruby
[06:02:59] VeryBewitching: shevy: I'm usually always working on something that I find is of use to me, at this time of night :D
[06:03:42] nateberkopec: has joined #ruby
[06:03:49] Ox0dea: I'm checking under every rug for a workaround around the fact that we can refine #method_missing but not #const_missing.
[06:04:00] pontiki: lemur: did you write your break? through? :D
[06:05:11] shevy: zotherstupidguy :(
[06:05:25] zotherstupidguy: shevy its ok, its fun here :)
[06:05:30] pimpin: has joined #ruby
[06:05:56] shevy: Ox0dea, https://eval.in/468047 you did it... I see an "Internal Server Error"
[06:06:10] Ox0dea: It's loading just fine over here.
[06:06:11] baweaver: oh I've made one for rails, I just can't Open Source it yet....
[06:06:35] zotherstupidguy: shevy alibaba looks like sh*t and got a lot of billions in one day :D i don't think they do breakthroughs :)
[06:06:37] trosborn: has joined #ruby
[06:06:57] baweaver: let's just say you can do some real fun things with ActiveRecord when you hack it a bit.
[06:07:14] Ox0dea: Alibaba was something of a cultural breakthrough.
[06:07:47] zotherstupidguy: thats very true!! the funny thing for me i was hangzhou, alibaba's base a couple of month ago, i didnt know the whole story of alibaba then
[06:07:50] Ox0dea: shevy, VeryBewitching: In case you're real keen on seeing it: http://ideone.com/qvD2LB
[06:08:48] Ox0dea: I think it's nifty, but it's not enough to emulate the scope magic of `using`.
[06:08:52] shevy: I don't know what you are doing
[06:09:12] Ox0dea: I want fine-grained control over constant resolution at the top level!
[06:09:18] Ox0dea: This is the language to sate that desire, dammit.
[06:09:26] Ox0dea: And yet, it's not. :<
[06:10:31] VeryBewitching: shevy: He's playing with fire, imo
[06:11:27] shevy: he is trying to break things
[06:11:36] mattwildig: has joined #ruby
[06:11:42] VeryBewitching: I wouldn't go that far.
[06:12:05] VeryBewitching: You know the phrase "It's not your driving I worry about, it's the other people on the road?"
[06:12:21] bruno-: has joined #ruby
[06:13:01] nofxx: has joined #ruby
[06:13:40] Ox0dea: Bloodletting actually has medicinal value in rare cases.
[06:13:50] VeryBewitching: Ox0dea: Exactly.
[06:14:09] Ox0dea: I like that we're on the same page in this weird book.
[06:14:21] diegoaguilar: has joined #ruby
[06:14:40] pontiki: the on ewith leeches on the cover
[06:14:54] Ox0dea: There's an O'Reilly animal I've not seen.
[06:14:57] VeryBewitching: pontiki: k, definitely in different books
[06:17:02] last_staff: has joined #ruby
[06:17:15] VeryBewitching: I'm in the book where I play myself playing myself.
[06:17:16] dhjondoh: has joined #ruby
[06:17:23] axl_: has joined #ruby
[06:18:05] x-light: has joined #ruby
[06:19:30] framling: has joined #ruby
[06:19:56] VeryBewitching: Every day we put on a face to meet the faces we'll meet.
[06:20:13] VeryBewitching: It's not just meta, it's true. If it weren't, I'd be worried.
[06:21:36] tvw: has joined #ruby
[06:22:24] framling: M-x buffer-face-set
[06:22:25] Ox0dea: Okay, Arya Stark.
[06:22:44] framling: thought I'd bring it around to #emacs
[06:22:46] kerunaru: has joined #ruby
[06:22:54] framling: I'm in #ruby
[06:23:02] framling: I was in #emacs
[06:23:07] Ox0dea: framling: #ruby is just the face you're currently wearing.
[06:23:51] framling: I feel silly
[06:24:33] framling: #e\t is close to #r\t
[06:24:39] Ox0dea: framling: Hey, what actually happens in butterfly mode?
[06:25:57] Ox0dea: Never mind; the Internet knew.
[06:27:35] framling: well that was funny
[06:27:50] astrobunny: has joined #ruby
[06:27:54] framling: yeah, not really
[06:27:55] qiukun: has joined #ruby
[06:29:16] framling: and anyway, you can't actually type the real version, since you don't have a butterfly key
[06:29:18] framling: https://xkcd.com/378/
[06:29:51] Ox0dea: Who says I don't have a butterfly key?
[06:30:05] arup_r: has joined #ruby
[06:30:12] pontiki: everyone with a mac has at least two
[06:30:31] rickmasta: has joined #ruby
[06:30:36] arup_r: Ruby doc is down ? http://ruby-doc.org/core/IO.html
[06:30:46] arup_r: it effects my productivity :p
[06:30:46] VeryBewitching: Ox0dea: Tleilaxu.
[06:31:10] arup_r: lets lest here..
[06:31:12] arup_r: >> IO.new
[06:31:13] ruboto: arup_r # => wrong number of arguments (0 for 1..2) (ArgumentError) ...check link for more (https://eval.in/468080)
[06:31:20] mozzarella: has joined #ruby
[06:31:26] pimpin: has joined #ruby
[06:31:30] arup_r: oh. That is why I need the doc to read :D
[06:31:44] Ox0dea: arup_r: You have ri, don't you?
[06:31:57] jessemcgilallen: has joined #ruby
[06:32:04] Ox0dea: VeryBewitching: Gesserit?
[06:32:23] VeryBewitching: Tleilaxu == FaceDancer
[06:32:29] Ox0dea: Oh, I see.
[06:32:33] arup_r: Here https://github.com/teampoltergeist/poltergeist, in this option `phantomjs_logger` I need to give a IO like object, so that I can suppress the JS console.log .. What is the good IO object for this ?
[06:32:42] VeryBewitching: Or rather Tleilaxu.is_a? FaceDancer would be more appropriate
[06:32:49] arup_r: Ox0dea: No I didn't install it
[06:32:58] Ox0dea: framling: The Model 01 has an Any key *and* a butterfly key: http://i.imgur.com/T8a3s92.jpg
[06:33:17] framling: ooh, that's nice
[06:34:28] Ox0dea: >> IO::NULL # arup_r
[06:34:29] ruboto: Ox0dea # => "/dev/null" (https://eval.in/468081)
[06:34:35] Ox0dea: It's a shame that doesn't return an IO, though.
[06:34:46] arup_r: Never heard of it.. thanks Bro!
[06:34:53] tenderlo_: has joined #ruby
[06:34:53] pontiki: VeryBewitching: i thought the face dancers were made by the tleilaxu
[06:34:58] Ox0dea: arup_r: It won't serve your purpose; I just wanted to showcase its existence.
[06:35:05] arup_r: Ox0dea: it wouldn't work
[06:35:10] pontiki: it's been aeons since i've read any dune
[06:35:12] Ox0dea: arup_r: How about a StringIO, then?
[06:35:18] VeryBewitching: pontiki: Bene Tleilax, some of there order were Face Dancers.
[06:35:21] arup_r: Ox0dea: Tempfile.new(IO::NULL)
[06:35:25] VeryBewitching: Others were genecists.
[06:35:28] Ox0dea: arup_r: Yep, that'll do.
[06:35:34] Ox0dea: But so would a StringIO.
[06:35:38] arup_r: Ox0dea: You are my Rubyist
[06:35:54] pontiki: not master / servant?
[06:36:03] arup_r: Ox0dea: How to use StringIO ? the doc is down :( couldn't see
[06:36:23] arup_r: StringIO.new
[06:36:34] Ox0dea: I mean, yeah, that's how you get hold of one?
[06:36:44] Ox0dea: There are dozens of Ruby documentation sites, mate.
[06:36:56] VeryBewitching: pontiki: Kind of, but can you be a servant if you're genetically loyal?
[06:36:59] pontiki: you can even generate the docs afterwards
[06:37:01] arup_r: I always look over there..
[06:37:20] pontiki: VeryBewitching: an interesting existential questy, which herbert ignores?
[06:37:24] arup_r: I became unprodictive due to this..
[06:37:35] framling: this model 01...
[06:37:40] VeryBewitching: pontiki: I think Herbert left a lot up to the reader to decide.
[06:37:42] framling: $299 for one
[06:37:49] Ox0dea: framling: But don't you just love it?
[06:37:51] arup_r: They don't bother India timezone before stopping the doc server
[06:38:01] framling: $2900 for ten ("startup pack")
[06:38:24] framling: but... it's cheaper to buy 5 2-packs at $2745
[06:38:33] framling: what on earth
[06:38:44] dimasg: has joined #ruby
[06:38:45] pontiki: arup_r: it's up from the states
[06:38:46] mary5030: has joined #ruby
[06:38:49] devoldmx: has joined #ruby
[06:39:24] charliesome_: has joined #ruby
[06:40:16] tkuchiki: has joined #ruby
[06:40:27] dtordable: has joined #ruby
[06:42:23] devoldmx_: has joined #ruby
[06:42:51] aganov: has joined #ruby
[06:43:26] Axsuul: has joined #ruby
[06:45:12] mary5030: has joined #ruby
[06:45:45] aufi: has joined #ruby
[06:47:15] Paradox: has joined #ruby
[06:48:43] AnoHito: has joined #ruby
[06:50:54] VeryBewitching: arup_r: http://devdocs.io/ <-- offline browsing ftw
[06:51:18] VeryBewitching: Ox0dea: I want one of these http://www.bambooki.com/impecca-usa-usb-wired-hand-carved-designer-bamboo-keyboard-mahogany-color
[06:52:36] Ox0dea: VeryBewitching: Is this yours? http://i.imgur.com/pqcPtl6.jpg
[06:52:44] Spami: has joined #ruby
[06:53:24] VeryBewitching: Now that's a sight that can use consideration.
[06:54:26] charliesome: has joined #ruby
[06:55:10] zotherstupidguy: has joined #ruby
[06:56:00] andikr: has joined #ruby
[06:56:06] dionysus69: has joined #ruby
[06:57:53] abucha_: has joined #ruby
[06:59:14] cesario: has joined #ruby
[06:59:30] dionysus69: has joined #ruby
[06:59:37] norc: has joined #ruby
[07:00:02] roxtrongo: has joined #ruby
[07:00:10] xcesariox: has joined #ruby
[07:00:49] ibouvousaime_: has joined #ruby
[07:00:51] Pupp3tm4st3r: has joined #ruby
[07:02:45] Arkon: has joined #ruby
[07:03:17] qiukun: has joined #ruby
[07:04:29] nateberkopec: has joined #ruby
[07:04:44] dlitvak: has joined #ruby
[07:05:21] beast__: has joined #ruby
[07:06:05] arup_r: has joined #ruby
[07:06:52] grill: has joined #ruby
[07:08:48] beast: has joined #ruby
[07:10:45] psye: has joined #ruby
[07:12:29] Mon_Ouie: has joined #ruby
[07:13:05] mooe: has joined #ruby
[07:13:07] bruno-: has joined #ruby
[07:14:13] whitesn: has left #ruby: ("WeeChat 1.0.1")
[07:14:14] kerunaru: has joined #ruby
[07:15:12] pimpin: has joined #ruby
[07:16:10] wa_r_ch_i__ld1: @Ox0dea so xdotool is working and i know how to send the key value and check for the window etc, but now I have the issue of only calling it if the popup has already been rendered, trying to figure out how I can check for that in the JS
[07:16:33] wa_r_ch_i__ld1: apparently its impossible ;)
[07:17:57] axl_: has joined #ruby
[07:20:12] favadi: has joined #ruby
[07:21:31] h99h9h88: has joined #ruby
[07:23:25] VeryBewitching: That prompt precedes the DOM being loaded.
[07:23:50] VeryBewitching: Or I would be quite surprised if it didn't.
[07:24:21] x-light: has joined #ruby
[07:24:58] rgtk: has joined #ruby
[07:25:06] wa_r_ch_i__ld1: @VeryBewitching ah so document ready should work
[07:26:16] VeryBewitching: When you receive a challenge for that type of authentication, no data has transfered hands yet.
[07:26:23] VeryBewitching: Other than the request to authenticate.
[07:27:02] ruurd: has joined #ruby
[07:27:29] VeryBewitching: Unless you authenticate, you shouldn't see the result HTML/JS that would be served at that location.
[07:28:27] ta: has joined #ruby
[07:28:41] abucha: has joined #ruby
[07:29:09] Vile`: has joined #ruby
[07:29:27] wa_r_ch_i__ld1: i'd hate to rely on sleep()
[07:30:22] Arkon: has joined #ruby
[07:30:36] devl: has joined #ruby
[07:31:49] pimpin: has joined #ruby
[07:31:56] tmtwd: has joined #ruby
[07:31:56] Arkon: has joined #ruby
[07:34:28] Ox0dea: wa_r_ch_i__ld1: You're probably gonna have to poll the window title. :<
[07:34:52] wa_r_ch_i__ld1: ive got something like
[07:34:52] wa_r_ch_i__ld1: a = `if wmctrl -l|awk '{$3=""; $2=""; $1=""; print $0}' | grep "Authentication Required"; then echo true; fi`
[07:34:59] wa_r_ch_i__ld1: but trying to keep it running in rails
[07:35:21] framling: has joined #ruby
[07:36:07] beast_: has joined #ruby
[07:36:12] krz: has joined #ruby
[07:36:55] Ox0dea: I decided to recreate M-x butterfly for the midkeks: https://asciinema.org/a/azri7gk1547wfj0j1j7ew75pg
[07:37:25] Ox0dea: framling: ^
[07:37:38] framling: an appropriate use of time if I've ever seen one!
[07:38:02] Ox0dea: I used `tput civis` to hide the cursor, but asciinema didn't pick it up.
[07:38:13] rickmasta: has joined #ruby
[07:38:28] Axsuul: has joined #ruby
[07:39:13] sinkensabe: has joined #ruby
[07:39:46] qiukun: has joined #ruby
[07:39:47] lsmola: has joined #ruby
[07:43:22] stamina: has joined #ruby
[07:43:58] symm-: has joined #ruby
[07:44:58] blackmes1: has joined #ruby
[07:45:39] RegulationD: has joined #ruby
[07:46:10] User458764: has joined #ruby
[07:46:33] clauswitt: has joined #ruby
[07:46:38] skade: has joined #ruby
[07:46:47] qiukun: has joined #ruby
[07:47:06] ghormoon: has joined #ruby
[07:49:31] neanderslob: has joined #ruby
[07:50:00] makenoise: has joined #ruby
[07:50:44] Stan: has joined #ruby
[07:51:47] VeryBewitching: wa_r_ch_i__ld1: http://stackoverflow.com/questions/2716990/http-basic-authentication-credentials-passed-in-url-and-encryption
[07:52:22] pimpin: has joined #ruby
[07:52:37] wa_r_ch_i__ld1: @VeryBewitching i've tried that, it wont work for NTLM (microsoft auth)
[07:53:15] Pumukel: has joined #ruby
[07:53:33] wa_r_ch_i__ld1: i just need rails to execute xdotool when the auth renders
[07:53:38] ruurd: has joined #ruby
[07:54:19] Averna: has joined #ruby
[07:54:35] ta: has joined #ruby
[07:55:04] lubarch: has joined #ruby
[07:55:13] beast: has joined #ruby
[07:55:32] scmx: has joined #ruby
[07:55:50] mary5030: has joined #ruby
[07:55:51] qiukun: has joined #ruby
[07:56:35] Xeago: has joined #ruby
[07:57:39] mikecmpbll: has joined #ruby
[07:58:41] VeryBewitching: wa_r_ch_i__ld1: https://msdn.microsoft.com/en-ca/library/windows/desktop/aa378749(v=vs.85).aspx read the comment to this article.
[07:59:16] wa_r_ch_i__ld1: :) yeah it isnt my call
[08:00:04] clauswitt: has joined #ruby
[08:00:35] riotjones: has joined #ruby
[08:00:43] VeryBewitching: It unfortunately sounds like you're trying to catch a bear with a grapefruit.
[08:01:14] naftilos76: has joined #ruby
[08:02:56] clauswitt: has joined #ruby
[08:03:20] lubekpl: has joined #ruby
[08:03:30] Vile`: has joined #ruby
[08:03:45] DEA7TH: has joined #ruby
[08:04:33] astrobun_: has joined #ruby
[08:05:11] trosborn: has joined #ruby
[08:07:03] Axsuul: has joined #ruby
[08:07:34] Ox0dea: I think wa_r_ch_i__ld1 is one of those people who's really been far as decided to use even go want to do look more like.
[08:08:43] hahuang65: has joined #ruby
[08:09:59] nateberkopec: has joined #ruby
[08:12:26] codecop: has joined #ruby
[08:12:33] mattwildig: has joined #ruby
[08:13:40] Arkon: has joined #ruby
[08:13:52] bruno-: has joined #ruby
[08:17:40] moeabdol: has joined #ruby
[08:18:45] axl_: has joined #ruby
[08:19:02] duncannz: has joined #ruby
[08:19:17] Eiam_: has joined #ruby
[08:19:32] _blizzy_: has joined #ruby
[08:22:33] dionysus69: has joined #ruby
[08:25:25] DoubleMalt: has joined #ruby
[08:25:41] [spoiler]: VeryBewitching: do bears even like grapefruits?
[08:25:58] trosborn: has joined #ruby
[08:26:31] subscope: has joined #ruby
[08:26:33] h99h9h88: has joined #ruby
[08:28:00] moeabdol: has joined #ruby
[08:28:30] sjums: [spoiler] Bears do not like grapefruit
[08:28:43] Ox0dea: sjums: Prove it.
[08:28:49] sjums: I'm a bear
[08:28:54] sjums: I don't like grape fruit
[08:29:00] [spoiler]: sjums: do you like belly rubs?
[08:29:17] sjums: OHH PLEASE WHERE ARE THEY?! :D
[08:30:15] Ox0dea: sjums: That is a sufficiently large sample size from which to draw meaningful conclusions; I rescind my credulity.
[08:30:53] VeryBewitching: [spoiler]: Catch not lure ;)
[08:32:12] tubuliferous_: has joined #ruby
[08:34:32] vondruch: has joined #ruby
[08:35:08] VeryBewitching: OK, time for sleep.
[08:35:45] [spoiler]: http://thesiswhisperer.com/2013/02/13/academic-assholes/ I feel this is present in general CS/IT, though (might be carried over from previous academic environments).
[08:35:50] Ox0dea: *incredulity
[08:37:11] sjums: Ox0dea, I'm glad you corrected that. My non-native englished combined with a dictionary didn't make sense out of your sentence, and I felt stupid ._.
[08:37:16] bmalum: has joined #ruby
[08:37:29] sjums: ACTION roars
[08:37:55] Ox0dea: English are hard sometime.
[08:38:06] Pupp3tm4_: has joined #ruby
[08:38:12] Ox0dea: I used up all my fancy before the semicolon.
[08:38:23] sjums: damn.. you're trolling :b
[08:38:34] Ox0dea: I really did mean "incredulity", though.
[08:38:54] sjums: You win this time, Ox0dea ! :D
[08:39:09] Ox0dea: There's a comma even most native writers don't use! <3
[08:39:43] Ox0dea: So many cannibalized Susans.
[08:39:47] sjums: In danish (my native tounge) that's a pretty require comma in such a sentence
[08:39:59] Ox0dea: Aye, it is required, but most people don't use it.
[08:40:13] Ox0dea: "Let's eat Susan." vs. "Let's eat, Susan.".
[08:40:22] sjums: Susan!! :(
[08:40:33] Ox0dea: Susan, wait! Don't get eated!
[08:40:53] sjums: you're not trolling again, are you?
[08:41:00] Ox0dea: All in good fun.
[08:41:55] sjums: From now on I believe your every mistake is intentional! :b
[08:42:34] Ox0dea: I shall deeply enjoy abusing this immunity.
[08:43:45] lxsameer: has joined #ruby
[08:43:52] TomyWork: has joined #ruby
[08:44:00] Ox0dea: Many moons ago, I made the mistake of trying to convince a Dane to support UTF-8 because otherwise he wouldn't even be able to write in his own language.
[08:44:22] Ox0dea: I ate a particularly scrumptious crow when I realized Danish can be written with ASCII.
[08:44:36] Ox0dea: </storytime>
[08:45:00] sjums: didn't even know that ??, ?? and ?? is in ASCII :3
[08:45:01] pimpin: has joined #ruby
[08:45:57] Ox0dea: Whoops. He was Dutch.
[08:46:33] Ox0dea: My profound lack of linguistic culture is, as I'm sure you're aware, entirely intentional.
[08:46:53] norc: Ox0dea: I once tried to convince a colleague that 0 - 0.25 equals -0.75. Suffice it to say the stare in my face when I tried to prove my point with a calculator....
[08:47:02] norc: was priceless...
[08:47:18] Ox0dea: norc: That is cringe-worthy. :P
[08:47:24] Ox0dea: Oh, hey, you got merged!
[08:47:55] norc: Didn't feel a thing.
[08:48:34] bhaak: well, the ij is certainly not in ASCII :)
[08:48:51] Ox0dea: Think "Dijkstra".
[08:48:58] bhaak: but of course there's an obvious ASCII representation
[08:49:07] bhaak: https://en.wikipedia.org/wiki/IJ_%28digraph%29
[08:49:26] Ox0dea: norc: The dead code is now double-dead.
[08:49:51] Ox0dea: > And it's all thanks to you. Thank you, Mar^Wnorc.
[08:50:00] [spoiler]: > "I once tried to convince a colleague that 0 - 0.25 equals -0.75."; for a good three seconds I was like "it doesn't?"
[08:50:19] Ox0dea: [spoiler]: Would you like me to show you how 0.999... == 1?
[08:50:25] apeiros: thanks. early morning and faith in humanity already lost.
[08:50:28] sjums: Rule #2 Always double tap
[08:50:28] [spoiler]: Ox0dea: I know that one :P
[08:50:51] astrobunny: has joined #ruby
[08:51:05] bubbys: has joined #ruby
[08:51:05] advorak: has joined #ruby
[08:51:16] sjums: sorry apeiros, it's my fault, isn't it?
[08:51:23] senayar: has joined #ruby
[08:51:30] [spoiler]: Ox0dea: aren't mathematicians splut between for and against that, though?
[08:51:45] apeiros: splut, splotted, splotten
[08:51:51] [spoiler]: Sounds like an onomatopoeia
[08:51:53] Ox0dea: [spoiler]: No, I think not.
[08:51:57] matti: Hey apeiros
[08:52:03] [spoiler]: sounds, reads, whatevs
[08:52:37] Ox0dea: [spoiler]: There's really no room for opinion on the matter; it just takes a slightly unintuitive leap to see the correctness of it.
[08:53:03] apeiros: I love how all my migrations have `def down; raise "NO!"; end`
[08:53:15] Ox0dea: There are no numbers between 0.999... and 1, so they must be equal.
[08:53:32] apeiros: Ox0dea: uh, that argument is weak
[08:53:46] apeiros: in IN, there's no number between 1 and 2. they are not equal.
[08:54:03] Ox0dea: What differentiates two numbers except the ability to place another between them?
[08:54:04] Scripore: has joined #ruby
[08:54:13] apeiros: they're just adjacent
[08:54:35] araujo: has joined #ruby
[08:54:58] Ox0dea: Sure, but we're obviously talking about R.
[08:54:58] SCHAAP137: has joined #ruby
[08:55:11] [spoiler]: apeiros: it's "a thing" in general, but I find it strange even if I know about it. basically any X.000... == X-1.999... (same applies for X.Y000... == X.(Y-1)999...)
[08:55:14] norc: apeiros: adjacency in real numbers... ?
[08:55:32] bhaak: in R, they can't be adjacent as there are no adjacent numbers in R. you don't have a successor function there
[08:55:32] [spoiler]: oh the thing has a wiki page
[08:55:34] [spoiler]: https://en.wikipedia.org/wiki/0.999...
[08:55:45] araujo: has joined #ruby
[08:56:12] Ox0dea: And the "move the decimal" "proof" is rather convincing, even for most laypeople.
[08:56:13] apeiros: hrm, IN is not easy to find in the special chars table :(
[08:56:46] araujo: has joined #ruby
[08:57:07] lukaszes: has joined #ruby
[08:57:29] apeiros: probably should have said s/weak/bad/. it's correct. but as I understood it the idea was that it should be an intuitive argument. and IMO it's not intuitive.
[08:58:02] marr: has joined #ruby
[08:58:14] apeiros: the concept of no adjacency in IR is not intuitive (IMO)
[08:58:18] Kuukunen: apeiros: I think "there's no numbers between them" is a proper argument if we're talking about real numbers... or hell, even rational numbers
[08:58:19] araujo: has joined #ruby
[08:58:39] nfk|laptop: has joined #ruby
[09:00:14] Xeago: has joined #ruby
[09:00:19] bhaak: Kuukunen: but natural numbers are much more intuitive to most of us and there the "no number between them means equal" doesn't hold
[09:00:48] Kuukunen: bhaak: but we're talking about decimals here :P
[09:00:59] Ox0dea: 0.999... is an integer. :P
[09:01:24] Kuukunen: but you have to prove it is
[09:01:38] moeabdol: has joined #ruby
[09:01:44] Kuukunen: so you can't start from "it's obviously a natural number, therefore it's a natural number"
[09:02:06] Ox0dea: Well, I didn't do that?
[09:02:22] jinie: has joined #ruby
[09:02:45] bhaak: it helps if you first state that there are multiple ways to represent the same number. that's often forgotten and leads to easy confusion.
[09:02:47] Ox0dea: I'm gonna try to represent 0.999... in Ruby.
[09:02:49] Kuukunen: Ox0dea: sure, but I was responding to bhaak
[09:02:54] Ox0dea: Kuukunen: Right, sorry.
[09:03:39] Ox0dea: bhaak: s/multiple/infinite/, mind.
[09:03:59] Ox0dea: Well, most numbers, anyway.
[09:04:10] bhaak: Kuukunen: the difference between a real number and a decimal with an infinite representation is ... not obvious
[09:04:26] bhaak: Ox0dea: I'm a programmer. there is only 0, 1, and infinity :)
[09:04:27] sjums: >> 0.99999999999999999
[09:04:28] ruboto: sjums # => 1.0 (https://eval.in/468183)
[09:04:38] Ox0dea: bhaak: I like it and concur.
[09:04:47] yosiat: has joined #ruby
[09:04:48] Ox0dea: Wait, no, that's not right.
[09:05:02] bhaak: sjums: floating point numbers are no real numbers
[09:05:08] Kuukunen: bhaak: 0.111... == 1 then!
[09:05:23] tulak: has joined #ruby
[09:05:29] sjums: I'm pretty certain I'm not imagining this
[09:05:32] Ox0dea: sjums: We're gonna need more 9s!
[09:05:40] [spoiler]: >> (0.999..1).size
[09:05:41] ruboto: [spoiler] # => 1 (https://eval.in/468188)
[09:05:58] Kuukunen: bhaak: hm... is there a difference between real number and infinite decimal tho?
[09:06:01] Ox0dea: Using IEEE754 for mathematical proofs.
[09:06:10] bhaak: Kuukunen: I don't know :)
[09:06:12] Mon_Ouie: >> 0.9999...9 == 1
[09:06:14] Kuukunen: bhaak: they should be the same
[09:06:18] ruboto: Mon_Ouie, I'm terribly sorry, I could not evaluate your code because of an error: OpenURI::HTTPError:500 Internal Server Error
[09:06:27] djbkd: has joined #ruby
[09:06:27] Ox0dea: Mon_Ouie: Crafty.
[09:06:40] Kuukunen: bhaak: yea, pretty sure they're the same
[09:06:57] [spoiler]: ruboto: got confused
[09:07:08] joonty: has joined #ruby
[09:07:44] ruurd: has joined #ruby
[09:07:44] Ox0dea: Mon_Ouie: Bless your fortune, though; you'd've been bit by ...'s silly precedence.
[09:07:52] Mon_Ouie: charliesome: ^ we probably shouldn't get an internal server error when doing this type of stuff, should we?
[09:08:03] Ox0dea: eval.in is on the fritz.
[09:08:10] Ox0dea: It's nothing to do with the code to be evaluated.
[09:08:21] charliesome: oh yeah seems bad
[09:08:50] Ox0dea: Wait, is it? I've been bumping into 500s on the site itself this evening.
[09:09:05] Mon_Ouie: >> (0.999...9) == 1
[09:09:07] rodfersou: has joined #ruby
[09:09:10] ruboto: Mon_Ouie, I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[09:09:41] [spoiler]: http://www.wired.com/2014/11/be-mean-online/
[09:09:47] Ox0dea: >> (0.999...9) === 1
[09:09:48] ruboto: Ox0dea # => true (https://eval.in/468199)
[09:09:57] Ox0dea: Thanks, math.
[09:10:20] kstuart: has joined #ruby
[09:10:33] Mon_Ouie: Looks like it's fixed ;)
[09:10:47] sjums: [spoiler], bug off!
[09:11:10] sjums: amidoingitright?
[09:11:19] bhaak: Kuukunen: thinkinh about it, an infinite decimal representation without a repeating pattern is _still_ a decimal. so yeah, they are probably the same, although intuitively, I would want to put those into another category
[09:11:40] [spoiler]: doesn't Range#=== call Range#unclide? though?
[09:11:44] Ox0dea: bhaak: But not in the technical sense of the word, right?
[09:11:46] [spoiler]: lol unclide
[09:11:48] Kuukunen: bhaak: why?
[09:11:49] [spoiler]: Unbonnie and unclide
[09:12:01] Kuukunen: bhaak: or... which ones in different categories?
[09:12:35] Ox0dea: [spoiler]: It does use #include?, which just compares against the start and end.
[09:12:37] [spoiler]: sjums: no u
[09:13:15] [spoiler]: Ox0dea: I know, but using === is mathematically wrong, even though it is a clever trick
[09:13:22] [spoiler]: in the example
[09:13:26] Ox0dea: [spoiler]: Well, yes, you've foiled my ruse.
[09:13:34] [spoiler]: I'm such evil
[09:13:39] certainty: Ox0dea: isn't that #cover? that just compares against the start end end?
[09:13:44] bhaak: Kuukunen: the infinite decimals without a pattern. it feels like cheating. for example for pi, "yeah, you can write this number as a decimal, you just need the precomputed value to write it and an infinite amount of paper to write it down on".
[09:13:48] moeabdol: has joined #ruby
[09:14:20] Kuukunen: bhaak: well, welcome to the wonderful world of infinities :P
[09:14:23] Ox0dea: certainty: You're right.
[09:14:31] bhaak: Kuukunen: OTOH, 0.9999... is easily expressed (or compressable). but that might be my programmer mind.
[09:14:36] roxtrongo: has joined #ruby
[09:14:43] Ox0dea: The difference tends to only crop up in weird cases like String#succ.
[09:14:53] Kuukunen: bhaak: "precomputed value" in there doesn't really make much sense from math point of view though
[09:14:57] certainty: Ox0dea: phew, thought for a minute i broke code :)
[09:15:14] Ox0dea: >> ('a'..'z').cover? 'c' * 42
[09:15:15] ruboto: Ox0dea # => true (https://eval.in/468203)
[09:15:22] bruno-: has joined #ruby
[09:15:27] Kuukunen: bhaak: thinking from programmer point of view, math often allows for "infinite computational power"
[09:15:27] tbuehlmann: has left #ruby: ()
[09:15:54] bhaak: Kuukunen: yes. but as we are talking about "representation", you need a way to know what you want to write (even though of course, the value exists already in a platinoc sense in the world of math)
[09:16:23] certainty: does it exist until it's somehow represented?
[09:16:38] moeabdol: has joined #ruby
[09:16:38] certainty: representation can also be a thought I guess
[09:16:44] bhaak: that's not a problem as such
[09:17:00] Kuukunen: bhaak: well, in math you don't have to know HOW to write a representation to prove it exists :P
[09:17:48] Kuukunen: or well, I guess that also deals with the constructivism debate :P
[09:17:49] bhaak: certainty: for example in information theory, you have the idea that information is already existing. you only extract it and put it into a different form. so it already existed, even though you didn't see it.
[09:18:10] blackmes1: has joined #ruby
[09:18:34] Ox0dea: Well, don't we have to conclude that information in and of itself is without a spatial component?
[09:18:42] Ox0dea: Lest Pi would fill the universe.
[09:19:02] Kuukunen: Ox0dea: but the information in pi isn't infinite
[09:19:04] moeabdol1: has joined #ruby
[09:19:16] Ox0dea: But that's what it means to be irrational.
[09:19:27] axl_: has joined #ruby
[09:19:34] norc: Our common decimal representation is just infinite.
[09:19:40] bhaak: the information in pi is probably quite low as you can easily represent it in a few simple formulas
[09:19:43] norc: Not the information in pi.
[09:19:56] Kuukunen: Ox0dea: that would be like saying the information in "1.0000..." is infinite
[09:20:35] leafybas_: has joined #ruby
[09:20:43] Kuukunen: "pi" exists outside of its decimal representation :P
[09:21:00] Hounddog: has joined #ruby
[09:21:21] Ox0dea: That was a bit of a straw man, but I take your point.
[09:21:30] Ox0dea: It's not as if circles have any trouble existing.
[09:21:34] Kuukunen: I don't think it's really a strawman
[09:22:24] Kuukunen: like, you could say "but 1.000... is not infinite! it's just one, followed by 0 after 0 after 0"... so you're describing a way of generating infinite stream of 0s... but you can also describe a way of generating infinite stream of pi decimals
[09:22:25] Ox0dea: We can quite easily compress the "notion" of pi, as it were, but not pi itself.
[09:23:08] Kuukunen: but that's not how it goes, you don't have to "compress" pi, it's just one number... it's like compressing the number 2
[09:23:23] Kuukunen: it's just that decimal representation for pi is not a good one
[09:23:27] bhaak: what is pi itself? that looks to me as if asking if the universe has a preferred number notation
[09:24:53] ibouvousaime: has joined #ruby
[09:25:05] Ox0dea: Kuukunen: Start gzip on /dev/urandom and we'll resume when it finishes. :P
[09:25:29] apeiros: in base??, ?? is 1
[09:26:00] apeiros: but I prefer base????, and there ?? is 0.5
[09:26:09] Ox0dea: ??? n ??? ???: 10??? = n??????
[09:26:12] yoongkang: has joined #ruby
[09:26:21] moei: has joined #ruby
[09:26:40] Kuukunen: apeiros: hm, I don't think you can use pi for a base :P
[09:26:40] apeiros: can't read the symbols. they render too small here :D
[09:26:47] certainty: too brainy for me
[09:26:47] Ox0dea: Kuukunen: Of course you can.
[09:26:47] apeiros: Kuukunen: sure can.
[09:26:55] benlovell: has joined #ruby
[09:27:06] Ox0dea: Any n not {0, 1} can be used as the base of a positional number system.
[09:27:14] Kuukunen: apeiros: I mean "base" deals with the representation of a number... the way you write it down
[09:27:39] Ox0dea: Kuukunen: But you just voiced your opposition to that line of defense.
[09:27:40] apeiros: yupp. and base?? makes writing multiples of ?? trivial :)
[09:27:43] Kuukunen: apeiros: you would have to redefine "base" for it to work
[09:27:52] apeiros: no, I wouldn't
[09:28:02] apeiros: base conversion works the same
[09:28:20] Kuukunen: apeiros: but how would you write 2 in base???
[09:28:25] rbowlby_: has joined #ruby
[09:28:42] Kuukunen: apeiros: and before you start using 0, 1, ... 9, remember, those are base 10
[09:28:58] Ox0dea: Kuukunen: The notion of "digits" breaks down a bit, but the concept of a base holds.
[09:29:10] Kuukunen: but "base" deals with the digits
[09:29:15] Ox0dea: It needn't.
[09:29:21] [spoiler]: Kuukunen: it deals with values
[09:29:33] [spoiler]: you can represent digits differently
[09:29:38] Kuukunen: https://en.wikipedia.org/wiki/Radix
[09:29:39] j416: 9:45:00 sjums | didn't even know that ??, ?? and ?? is in ASCII :3
[09:29:43] j416: sjums: they're not
[09:29:49] akem: has joined #ruby
[09:30:04] Ox0dea: Kuukunen: https://en.wikipedia.org/wiki/Radix_economy#e_has_the_lowest_radix_economy
[09:30:38] Ox0dea: e is a perfectly acceptable base, and so is every other real except 0 and 1.
[09:31:08] Kuukunen: well, I can be wrong too :V
[09:32:12] vigintas: has joined #ruby
[09:32:18] blaxter: has joined #ruby
[09:32:41] [spoiler]: Kuukunen: you weren't wrong, you were just left right
[09:32:46] Kuukunen: oh right, we're talking about different base here
[09:32:50] [spoiler]: I need coffee
[09:33:19] certainty: but there is only one base that's the real deal. Which is the 3. base
[09:33:22] Kuukunen: it's the exponential base vs. the numeral system base
[09:33:59] leafybas_: has joined #ruby
[09:34:14] certainty: or was it the 4th?
[09:35:25] Musashi007: has joined #ruby
[09:36:04] gregf: has joined #ruby
[09:36:12] TheHodge: has joined #ruby
[09:36:25] hahuang65: has joined #ruby
[09:37:05] Musashi007: does anyone have an idea how to get the ip address of the wireless bridge point they are connected to ?
[09:38:35] pimpin: has joined #ruby
[09:38:40] dimasg: has joined #ruby
[09:38:49] advorak: has joined #ruby
[09:38:58] tubuliferous_: has joined #ruby
[09:38:58] [spoiler]: I literally just typed my password backwards twice in a row
[09:40:08] apeiros: [spoiler]: your password is a palindrome?
[09:40:20] [spoiler]: apeiros: unfortunately, not
[09:40:46] apeiros: then that's quite a fascinating feat. do you often think in backwards? :D
[09:40:57] Musashi007_: has joined #ruby
[09:41:15] sjums: or did you do it backwards upon last forced renew on the AD server?
[09:41:28] rodferso1: has joined #ruby
[09:41:36] Ox0dea: [spoiler]: Your UNIX password?
[09:42:07] [spoiler]: yeah unix password
[09:42:15] Ox0dea: [spoiler]: You can use your arrow keys. :P
[09:42:25] Ox0dea: (But don't.)
[09:42:39] Ox0dea: Musashi007_: Nothing of interest in the output of `ip addr`?
[09:43:11] Musashi007_: @Ox0dea running on osx. ifconfig doesn???t show much.
[09:43:17] Musashi007_: Nor does traceroute.
[09:43:35] erbesharat: has joined #ruby
[09:44:19] [spoiler]: apeiros: i can talk and write backwards relatively fast, especially when I warm up after a few minutes
[09:44:20] hakunin: has joined #ruby
[09:44:39] Ox0dea: Okay, da Vinci.
[09:44:51] Musashi007_: funny thing is that I know I???m connected via the rogue access point
[09:44:59] Ox0dea: Musashi007_: One approach is apparently to ping scan yourself?
[09:45:02] tobiasvl: [spoiler]: ask David Lynch if he needs your expertise in the third season of Twin Peaks
[09:45:11] [spoiler]: but I don't do it normally, not sure why it happened now. is tarted typing it backwards the third time when I realised it
[09:45:25] Ox0dea: How does that even happen?
[09:45:35] Spami: has joined #ruby
[09:45:37] [spoiler]: Ox0dea: I know a few other people that can do it from HS
[09:45:51] Musashi007_: oh? how is that different from a regular ping?
[09:45:51] [spoiler]: well, few being 2 girls from book club
[09:46:14] Ox0dea: Musashi007_: Well, you just try every address in a given range, and only the ones that're up will respond.
[09:46:27] RegulationD: has joined #ruby
[09:47:29] quazimodo: has joined #ruby
[09:48:37] Ox0dea: [spoiler]: Do you mean you started typing "staplebattery", or "elpatsyrettab"?
[09:50:11] shredding: has joined #ruby
[09:51:28] TPBallbag: has joined #ruby
[09:52:24] [spoiler]: what, no I didn't mean backwards like letter for letter backwards, more as in... split.reverse.join(' ') or inverting syllables. or talking in little endian with syllables
[09:52:28] Musashi007_: @Ox0dea scanning now.. Hesitantto do so because I don???t ahve a program to do this and I???m always nervous to install new programs
[09:53:12] Hounddog: has joined #ruby
[09:53:37] Ox0dea: Musashi007_: You really ought to use `nmap`; it's pretty well vetted.
[09:53:57] [spoiler]: my password is like a little sentence thingy and I typed the "groups" backwards. instead of typing aa 22 cc, i typed cc 22 aa
[09:54:07] Ox0dea: [spoiler]: Yes, that's what I meant.
[09:54:08] Musashi007_: @Ox0dea thank you.. looking into it now
[09:54:12] Ox0dea: Musashi007_: Sure thing.
[09:54:23] Ox0dea: [spoiler]: I was using "correcthorsebatterystaple" as your password.
[09:54:36] Ox0dea: !xkcd 936
[09:55:10] tulak: has joined #ruby
[10:00:06] nateberkopec: has joined #ruby
[10:00:17] platzhirsch: has joined #ruby
[10:01:01] teclator: has joined #ruby
[10:01:47] h99h9h88: has joined #ruby
[10:01:59] tulak: has joined #ruby
[10:04:14] Tref: has joined #ruby
[10:05:33] roxtrongo: has joined #ruby
[10:06:24] nfk|laptop: has joined #ruby
[10:06:30] karapetyan: has joined #ruby
[10:07:26] subscope: has joined #ruby
[10:08:04] rodfersou: has joined #ruby
[10:08:07] vigintas: has joined #ruby
[10:11:04] pimpin: has joined #ruby
[10:11:13] davedev24: has joined #ruby
[10:13:21] mattwildig: has joined #ruby
[10:14:30] arne_: has joined #ruby
[10:14:42] arne_: Hello Folks, is there a way to do select and reject at the same time?
[10:14:58] Peg-leg: has joined #ruby
[10:15:00] arne_: like splitting an array with a condition
[10:15:13] Mon_Ouie: See Enumerable#partition
[10:15:18] arne_: great, thank you
[10:15:25] qiukun: has joined #ruby
[10:15:34] bruno-: has joined #ruby
[10:16:43] pimpin: has joined #ruby
[10:18:17] sysanthrope: has joined #ruby
[10:18:18] dlitvak: has joined #ruby
[10:18:56] arne_: Mon_Ouie, and when doing it with a hash, is there some way i clean keep my hash?
[10:19:28] arne_: [["fullSearchQuery", "asdas"], ["page", "0"]] <= right now im getting this as result
[10:20:17] Mon_Ouie: So you'd want 2 hashes as a result?
[10:20:34] axl_: has joined #ruby
[10:20:42] Ox0dea: arne_: map(&:to_h)
[10:21:05] arne_: yeah that's great, but not as easy than everything else in ruby, right?
[10:21:39] Ox0dea: How do you mean?
[10:21:57] Ox0dea: >> {a:1, b:2, c:3, d:4}.partition { |_, v| v.even? }.map(&:to_h) # arne_
[10:21:58] ruboto: Ox0dea # => [{:b=>2, :d=>4}, {:a=>1, :c=>3}] (https://eval.in/468226)
[10:22:26] Ox0dea: That is remarkably little code for such an operation.
[10:22:26] arne_: if i do it this way, it creates a new hash from an array, right?
[10:22:50] apeiros: it creates two hashes from two arrays, yes
[10:22:54] shinenelson: has joined #ruby
[10:23:17] Ox0dea: arne_: The vast majority of the methods Hash gets from Enumerable return nested arrays of key-value pairs.
[10:23:19] pimpin: has joined #ruby
[10:23:20] arne_: so i could just walk over the original hash with .each and have the same effect
[10:23:34] arne_: which i have to do either way
[10:23:35] dlitvak_: has joined #ruby
[10:23:51] Ox0dea: Then you didn't really need to partition?
[10:24:06] arne_: well, i would love to use it, because of the one-liner
[10:24:06] Mon_Ouie: You can do everything that's done by the Enumerable module by using #each
[10:24:30] Xeago: has joined #ruby
[10:24:32] pandaant: has joined #ruby
[10:24:41] DEA7TH: has joined #ruby
[10:24:45] arne_: yeah, i know, but i have to "split" this hash by a condition, and if i have to transform the result into a hash first, there is no benefit form using partition
[10:25:13] Ox0dea: You don't actually have to transform it back into a Hash.
[10:25:29] arne_: that's true but it's not a hash then :/
[10:25:50] Ox0dea: What's the difference between a Hash and an array of key-value pairs for your current objective?
[10:26:20] Oli`: has joined #ruby
[10:26:31] arne_: well code is prettier if i filter stuff by their keys
[10:26:41] arne_: with key value pairs it wouldn't be as pretty.
[10:26:53] arne_: too bad partition does not output hashes :/
[10:27:24] arne_: why does select do that, though?
[10:27:57] Ox0dea: It's true enough that a lot of Hash's Enumerable methods should probably return Hashes, but they just don't. :<
[10:28:11] moeabdol: has joined #ruby
[10:28:23] arne_: >> {:or=>:doesnt_it}.select { |x| x=:or}
[10:28:24] ruboto: arne_ # => {:or=>:doesnt_it} (https://eval.in/468227)
[10:28:38] Ox0dea: It looks like you don't know what you're doing. :P
[10:28:53] tlolczyk_: has joined #ruby
[10:28:53] arne_: why is that?
[10:29:16] arne_: select and reject do exactly what i want, just asking myself if i can do it in one step
[10:29:38] dhjondoh: has joined #ruby
[10:29:46] sdwrage: has joined #ruby
[10:29:47] gregf_: arne_: you partition with to_h should work?
[10:29:57] Ox0dea: It does, but it's not "pretty" or whatever.
[10:30:01] arne_: it works, but doesn't give me anything
[10:30:16] gregf_: pretty? its quite simple
[10:30:19] arne_: hash => partition => array => hash
[10:30:28] arne_: it bothers me, that a array has to be created, while not needed
[10:30:31] jackjackdripper: has joined #ruby
[10:30:32] Ox0dea: arne_: Are you *certain* you need that last step?
[10:30:35] Ox0dea: I bet you don't.
[10:30:42] yoongkang: has joined #ruby
[10:30:44] gregf_: well then just use inject. but those wrappers do all the work for you
[10:30:50] arne_: i don't need it, but it makes the complete rest of that code unpretty aswell
[10:30:58] Ox0dea: arne_: What do you mean?
[10:31:15] arne_: i have to use the result of partition, in the rest of the code
[10:31:17] futilegames: has joined #ruby
[10:31:22] arne_: which i access like hashes
[10:31:47] gregf_: arne_: else this: {a:1, b:2, c:3, d:4}.inject([{},{}]){ |a1,h| a1[h.last.even? ? 0 : 1][h.first] = h.last; a1 } *and... how bad it looks*
[10:31:48] cotcot: has joined #ruby
[10:32:08] Ox0dea: arne_: https://eval.in/468228
[10:33:10] arne_: Ox0dea, yeah, i don't know how that helps me, if im using keys to find something in a hash
[10:33:15] Ox0dea: You're just iterating, right? So you don't really need Hash's semantics, and an array of key-value pairs serves the same purpose.
[10:33:16] arne_: which is now a key value pair
[10:33:22] arne_: no, never said i was just iterating
[10:33:39] Ox0dea: Ah, then maybe you want #assoc.
[10:33:45] [spoiler]: arne_: what do you need to do in the end, though?
[10:33:45] cotcot: que dis sens n'a tu ce aucun
[10:33:58] Ox0dea: >> [[:a, 1], [:b, 2], [:c, 3]].assoc :b # arne_
[10:33:59] ruboto: Ox0dea # => [:b, 2] (https://eval.in/468232)
[10:33:59] arne_: both, iterating over it, and using []
[10:34:03] [spoiler]: cotcot: i agree, but I prefer vanilla.
[10:34:16] erbesharat: has joined #ruby
[10:34:18] Mon_Ouie: Someone else's typing their password backwards it looks like
[10:34:43] [spoiler]: Mon_Ouie: LOL
[10:34:52] arne_: cool, i didn't know about assoc, atleast learned somethig
[10:35:08] pimpin: has joined #ruby
[10:35:48] jackjackdripper: has joined #ruby
[10:36:23] Ox0dea: arne_: The essential justification is that it would be unnecessary duplication to give Hash custom methods when defining Hash#each to yield key-value pairs and including Enumerable gives us so much functionality for free.
[10:37:00] Ox0dea: I agree with you that it's a minor pain point, but invoking #to_h to get back actual Hashes isn't going to end the world.
[10:37:13] arne_: i understand, but it confuses me, do it 100% or 0% but not 73%
[10:37:27] arne_: imho, select and reject shouldn't do it then either
[10:37:42] [spoiler]: Per-for-mance! Per-for-mance! Ex-ter-mi-nate! Ex-ter-miiii-naaaateeeeeeee!
[10:38:19] [spoiler]: Maybe Hash is too Dry, it needs to be moisturized
[10:38:23] Ox0dea: >> 2.0 / Enumerable.instance_methods.size # arne_
[10:38:24] ruboto: Ox0dea # => 0.0392156862745098 (https://eval.in/468237)
[10:38:45] Ox0dea: WET = Write Everything Twice.
[10:38:49] Ox0dea: arne_: Do you want WET code?
[10:38:57] arne_: no, i said you can also do 0 %
[10:39:09] Ox0dea: So you're boycotting Hash#select?
[10:39:10] vpc: has joined #ruby
[10:39:30] arne_: if i had to, yes
[10:39:32] dhjondoh: has joined #ruby
[10:39:34] leafybas_: has joined #ruby
[10:40:05] arne_: but know im getting confused what does return a hash and what not, and at some point i will think, while it's not true, "select doesn't return a hash, i won't use it"
[10:40:05] cotcot: aucun n'a que ce dis sens tu
[10:40:08] ldnunes: has joined #ruby
[10:40:15] [spoiler]: I am not sure if it's really a pain point. I actually expect methods from Enumerable to return arrays when used on Gashes
[10:40:30] arne_: so you're not using select?
[10:40:59] Ox0dea: arne_: It's only #select, #reject, and their mutative counterparts that return Hashes.
[10:41:17] skade: has joined #ruby
[10:41:19] roxtrongo: has joined #ruby
[10:41:28] Ox0dea: #select! is nice for paring a Hash down in-place, so I won't be joining your boycott.
[10:42:28] devoldmx: has joined #ruby
[10:42:45] pimpin: has joined #ruby
[10:43:14] arne_: what about the principle of the least surprise, did i hit the tiny amount of surprise there is in ruby?
[10:43:14] cotcot: sens n'a aucun tu ce dis que
[10:43:21] kimegede: has joined #ruby
[10:43:21] Mon_Ouie: !kick cotcot not a nice bot
[10:43:22] ruboto: ruboto kicked cotcot: a nice bot
[10:43:22] ruboto: -o ruboto
[10:44:07] Mon_Ouie: Other inconsistencies between Hash and Enumerable: #member? and #include? operate on keys only and not on key/value pairs
[10:46:06] [spoiler]: arne_: what do you mean? Hash#select *does* return a Hash
[10:46:08] roxtrongo: has joined #ruby
[10:46:32] arne_: yeah, and partition does not, which left me really surprised
[10:46:45] arne_: ACTION <= :OOO
[10:47:16] Ox0dea: arne_: Think you'll be able to bounce back?
[10:47:47] arne_: bounce back, where?
[10:47:53] Ox0dea: To loving Ruby.
[10:47:55] vpc: has left #ruby: ("Leaving")
[10:48:00] Ox0dea: Or is this the straw that puts you on the camel's back?
[10:48:17] Ox0dea: (Not that Perl's hashes are any saner.)
[10:48:19] arne_: i'll stick to brainfuck, it's ugly, but it doesn't surprise me
[10:48:26] Ox0dea: You think brainfuck is ugly?!
[10:48:44] tlolczyk_: has joined #ruby
[10:48:50] arne_: the beauty is in the operations
[10:49:28] Ox0dea: For what it's worth, you'd be in for quite the surprise if you didn't write your program to be interpreted with varying cell sizes.
[10:49:45] Ox0dea: I realize you were being facetious, but every language has a gotcha or ten.
[10:49:45] dimasg: has joined #ruby
[10:51:02] Ox0dea: I'm just gonna leave this here.
[10:51:04] Ox0dea: > Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
[10:51:08] [spoiler]: arne_: that's why Array#to_h works so nicely, so you can convert to hash nicely
[10:51:20] Ox0dea: [spoiler]: But that's so unclever!
[10:51:32] Ox0dea: arne_ doesn't want to be able to debug his code.
[10:51:32] arne_: i already said something about it
[10:52:14] Ox0dea: arne_: Your apparent fixation with "pretty" and lines and minimizing invocations gives ample reason to suspect that the above quotation is applicable; please read it several times.
[10:52:16] dented42_: has joined #ruby
[10:52:43] arne_: i don't optimize by lines, that's the point i do not safe lines nor performance when using to_h
[10:52:48] arne_: so it's not good, that's my point
[10:53:13] certainty: ACTION waits for that damn test suite to finish
[10:53:31] apofis: has joined #ruby
[10:53:44] doddok: has joined #ruby
[10:53:50] Ox0dea: certainty: ^C is cruise control for "the tests don't not unfail".
[10:53:51] arne_: and besides that, it's not even easy to read
[10:54:00] arne_: so it's ugly, slow and +1 line code
[10:54:22] corehook: has joined #ruby
[10:55:15] arne_: instead i can just hash.each do |k,v| hash1[k]=v, if condition else hash2[k]=v, which is nicer to read, probably faster(no clue), and not even more code
[10:55:56] arne_: which renders partition in hashes useless to me, all i am saying
[10:56:39] bmalum: has joined #ruby
[10:57:18] Ox0dea: arne_: But you would use #partition if it returned Hashes?
[10:57:35] arne_: ofc, it would be as cool as select and reject
[10:57:56] Ox0dea: "Cool"? Wouldn't it be "harder to read" by your definition?
[10:58:24] Ox0dea: So it's the `map(&:to_h)` part of the solution that kills the legibility?
[10:58:38] arne_: Which is ugly, slow and hard to read.
[10:59:01] arne_: if it was fast, or easy to read, but it's nothing, not even fast, because the array is useless in the first place
[10:59:01] Ox0dea: Wrong language, bud.
[10:59:07] leafybas_: has joined #ruby
[10:59:15] arne_: i can't understand how you can not see what i mean
[10:59:37] arne_: i only want one benefit from this .map to_h stuff, but i have none
[10:59:51] leafybas_: has joined #ruby
[11:00:30] bruno-: has joined #ruby
[11:00:52] nateberkopec: has joined #ruby
[11:01:21] [spoiler]: technically, this could be optimised by the VM, but alas MRI VM does almost no optimising (if any)
[11:01:42] [spoiler]: no actually, it couldn't really be optimised because so much mutants
[11:01:42] certainty: ACTION understands arne
[11:01:47] certainty: time for my walk
[11:02:14] [spoiler]: arne_: open a pull request which implements partition the way you want it to work
[11:02:19] arne_: [spoiler], that also goes for every method, that is not written i C already
[11:03:00] [spoiler]: arne_: not all C methods can be optimised either, because they just rely on API calls mostly
[11:03:22] arne_: i actually i have no opinion on how it has to work, i would even be fine if every enum-method would return key value pairs
[11:03:39] arne_: im bothered about "something yes, sometimes no"
[11:03:42] [spoiler]: even on arrays?
[11:04:02] arne_: [spoiler], "c-methods" dafuq?
[11:04:24] [spoiler]: arne_: methods implemented in C?
[11:04:26] krz: has joined #ruby
[11:04:51] arne_: [spoiler], oh i get it, well, methods written in c doesn't get optimized at all, are they?
[11:05:04] dhjondoh: has joined #ruby
[11:05:10] davedev24: has joined #ruby
[11:05:13] arne_: it's the bytecode which gets optimized in rubinius/jvm, am i wrong?
[11:05:15] [spoiler]: arne_: by humans only
[11:05:25] [spoiler]: nah not really
[11:05:31] arne_: yeah but you were talking about vms
[11:05:48] [spoiler]: maybe a little by LLVM(Rubinius)/JVM, but there's not much that can be done about it
[11:06:26] [spoiler]: You'd have to drop some language features that rely on mutation and meta programming
[11:06:35] Ox0dea: arne_: MRI/YARV is a virtual machine that interprets compiled bytecode.
[11:07:11] arne_: Ox0dea, yeah but no JIT, yet right?
[11:07:16] Xeago: has joined #ruby
[11:07:17] Ox0dea: Indeed not.
[11:07:29] corehook: has joined #ruby
[11:07:40] clauswitt: has joined #ruby
[11:07:52] dzejrou: has joined #ruby
[11:08:23] Ox0dea: >> insns = RubyVM::INSTRUCTION_NAMES; [insns.size, insns.grep(/opt/).size] # arne_
[11:08:24] ruboto: Ox0dea # => [88, 27] (https://eval.in/468247)
[11:08:38] Ox0dea: So a little under a third of them are "optimized".
[11:10:12] stamina: has joined #ruby
[11:10:39] arne_: :o interesting, why would they have VM instructions visible in ruby?
[11:10:58] Ox0dea: This language wants you to be happy.
[11:11:07] Ox0dea: Are you happy when you can't find something?
[11:11:11] dlitvak: has joined #ruby
[11:11:19] norc: arne_: Because its damn useful to be able to peak into everything. Whether you want to look at the AST, compiled ByteCode or peak into the internals of objects...
[11:11:33] norc: Without the need to have a debugger.
[11:11:48] [spoiler]: s/peak/peek/g
[11:11:53] arne_: :o you can access the bytecode?
[11:11:56] arne_: that's cool
[11:12:13] symm-: has joined #ruby
[11:12:29] [spoiler]: you can even generate/run it
[11:13:10] Ox0dea: [spoiler]: No?
[11:13:25] Ox0dea: RubyVM::InstructionSequence#load is currently commented out. :<
[11:13:35] Ox0dea: Because there's no "verifier".
[11:13:53] norc: Ox0dea: You know what sucks?
[11:14:17] [spoiler]: maybe rubinius can, then? I don't remember if it was rubinius or mri or both
[11:14:35] Ox0dea: norc: Hm?
[11:14:40] [spoiler]: norc: vacuum cleaners?
[11:14:58] norc: Ox0dea: I really want the damn CPDBEUG on trunk x_x
[11:15:10] norc: [spoiler]: I was thinking black holes. But close.
[11:15:15] Ox0dea: norc: I thought it was there?
[11:15:23] norc: Ox0dea: Try it.
[11:16:55] norc: I mean its reported, but I wanted to play around with it yesterday Q.Q
[11:16:56] roxtrongo: has joined #ruby
[11:17:15] Ox0dea: norc: It's dp() for AST nodes, yeah?
[11:17:40] arne_: sure you can do it in rubinius, since everything but the vm is ruby, but i was surprised MRI has it, too
[11:18:14] norc: Ox0dea: Its a deeper debug flag that steps through the entire compiler in each stage, showing you the AST as it processes it.
[11:18:20] prestorium: has joined #ruby
[11:18:23] arne_: does that mean you can have compiled ruby code in ruby and have some sort of obscurification ( with mri? )
[11:18:54] Ox0dea: No, not yet.
[11:19:18] arne_: too bad, that would be useful
[11:19:34] subscope: has joined #ruby
[11:19:41] Ox0dea: arne_: https://github.com/ruby/ruby/blob/trunk/iseq.c#L2358-L2363
[11:19:51] Ox0dea: Not serializable or loadable at this time.
[11:20:11] gguggi: has joined #ruby
[11:20:17] sdwrage: has joined #ruby
[11:20:27] rickmasta: has joined #ruby
[11:20:55] Ox0dea: Here's tenderlove playing with it before it was commented out: https://gist.github.com/tenderlove/3536045
[11:21:06] arne_: im writing some code which will be on customer-servers, would be nice to be able to protect it from "theft"
[11:21:09] gizmore: has joined #ruby
[11:21:15] norc: Ox0dea: That is one of the best documented pieces of code in the ruby trunk.
[11:21:18] axl_: has joined #ruby
[11:21:26] norc: While this is sarcastic, it is also rather true.
[11:21:45] norc: Whatever a verifier is. :-/
[11:21:56] Ox0dea: norc: Heh, yeah, there's a lot of crazy in MRI.
[11:22:07] Ox0dea: And so little documentation! :<
[11:22:27] subscope: has joined #ruby
[11:22:28] arne_: ACTION wants a cazy example
[11:22:36] Ox0dea: But hey, ko1 and nobu seem to have a firm enough understanding of how it all hangs together.
[11:22:55] norc: Ox0dea: The best way to get documentation is to git blame, pray that you find a feature request on the japanese bug tracker, and then hope that google translate doesn't produce complete nonsense.
[11:23:12] Ox0dea: That sounds about right.
[11:23:24] arne_: ACTION really wants a example for crazy in the MRI
[11:23:24] Ox0dea: I think even nobu doesn't quite grok refinements: https://bugs.ruby-lang.org/issues/11655
[11:23:43] Musashi007: has joined #ruby
[11:24:12] tulak: has joined #ruby
[11:24:32] Ox0dea: arne_: Well, the parser is just insane, but have a more concentrated example.
[11:24:56] norc: Ox0dea: With everything that I have learned now it is fairly easy to understand why the parser is so massively complicated though.
[11:25:23] arne_: i really like the way rubinius is doing it, wish it was faster and less buggy
[11:25:36] Ox0dea: arne_: https://eval.in/468262
[11:25:45] Ox0dea: There's the function that makes String#tr go.
[11:25:47] arne_: thought about contributing but i am lazy and stupid
[11:26:13] Ox0dea: > /* retrieve last replacer */
[11:26:15] Ox0dea: The only comment.
[11:26:56] [spoiler]: this requires some serious mental context tracking
[11:27:03] arne_: by the way, you will hate me but, there isn't a way to do x = x.method, pretty, right?
[11:27:13] norc: arne_: There is.
[11:27:14] Ox0dea: arne_: No, but I wish there were; Perl 6 has it. :<
[11:27:29] Ox0dea: norc: arne_ is thinking of a .= operator.
[11:27:33] norc: Ox0dea: Ah.
[11:27:52] norc: Thought he wanted plain #method
[11:27:58] [spoiler]: I don't wish there's such a thing
[11:28:12] Ox0dea: arne_: Have fun(?): http://www.ozonehouse.com/mark/periodic/
[11:28:14] c355E3B: has joined #ruby
[11:28:21] [spoiler]: Also, I am still conflicted about `.?` in 2.3.0
[11:28:24] arne_: im adding conditions to a sequel model, table = table.where x is so ugly
[11:28:24] norc: [spoiler]: The amazing unmaintainable code you can do with op overloading in C++ is downright amazing.
[11:28:28] Ox0dea: [spoiler]: It's `&.` now.
[11:28:31] norc: Can secure your job for a lifetime.
[11:28:53] [spoiler]: norc: lol i don't know why people abuse C++ that much
[11:29:04] Ox0dea: Because it's there.
[11:29:16] [spoiler]: Ox0dea: isn't `&.` different from `?.`?
[11:29:28] Ox0dea: [spoiler]: There is no longer any such thing as `.?` in Ruby.
[11:29:44] arne_: already forgot what &. did
[11:29:47] norc: ?. however
[11:29:48] [spoiler]: I write C/C++ as my job, and I've very rarely had to abuse operators
[11:29:55] [spoiler]: overload* lol
[11:30:03] [spoiler]: Well I write more C and C++ wrappers for the C
[11:30:17] arne_: according to norc, you maybe should.
[11:30:21] norc: [spoiler]: If you want to get a feeling for unmaintainable, just look at all the boost headers. Its downright disgusting how many compiler bugs they actively abuse.
[11:31:03] arne_: Ox0dea, never liked perl
[11:31:13] Ox0dea: arne_: It seems right up your alley?
[11:31:20] [spoiler]: I actually try to avoid using boost whenever pissible. I am not sure why people like it so much. Sure, it's convenient, but so i a bullet to the head when you're tired
[11:32:22] arne_: Ox0dea, how is that?
[11:32:40] Ox0dea: arne_: It lets you squeeze a lot of functionality into a small space if that's what you want to do.
[11:32:52] Ox0dea: So does Ruby, mind, but apparently not enough for you. :P
[11:34:03] arne_: stop mocking me :( i only had trouble with that one piece of .. opinion
[11:34:11] [spoiler]: Ox0dea: Wasn't `?.` rejected because it conflicts with `a.foo?.bar` because `#foo?`, so it was a `a.?foo.bar` and I remember there being talk about `&.`, but i thought it would be `.?`s raising sister or something
[11:34:13] arne_: doesn't mean im unable to do it
[11:34:26] waka: has joined #ruby
[11:34:42] htmldrum: has joined #ruby
[11:34:42] ht__: has joined #ruby
[11:34:45] Ox0dea: [spoiler]: It was `.?`, and it was rejected for numerous reasons.
[11:34:57] Ox0dea: I concur.
[11:35:47] segfalt``: has joined #ruby
[11:36:00] Ox0dea: It felt weird at first, but I've taken a liking to `foo &. bar`.
[11:36:32] Ox0dea: It parses, it's easier to scan, and it better clarifies intent.
[11:36:36] Ox0dea: I hope it catches on.
[11:36:55] tulak_: has joined #ruby
[11:37:11] AnoHito: has joined #ruby
[11:37:49] [spoiler]: Yeah, I don't mind `&.`, but all the ?s and .s and more ?s were too confusing (and we established I don't like too many symbols in one place :P)
[11:38:04] sross07: has joined #ruby
[11:38:17] hakunin: has joined #ruby
[11:39:00] Ox0dea: [spoiler]: It's dangerous to go without symbols; here, take this: http://i.imgur.com/94jou4v.png
[11:40:01] jud: has joined #ruby
[11:40:26] Ox0dea: I wish a clever way to hide all the encoded strings had occurred to me.
[11:40:27] [spoiler]: I love how whoever wrote this tried to add white space, as if to make it more readable lol
[11:40:41] Ox0dea: I... I wrote it.
[11:40:49] [spoiler]: you wrote this?!
[11:40:56] Ox0dea: And... I did add the whitespace to make it more readable.
[11:41:01] [spoiler]: I thought it was just a thing floating about
[11:41:09] Ox0dea: I put it in the air.
[11:41:46] ht__: has joined #ruby
[11:42:43] arne_: fuck this im going back to lisp
[11:42:56] arne_: Ox0dea, do you know sequel?
[11:43:04] Ox0dea: arne_: The gem?
[11:43:47] arne_: i want to do a regex search on some columns which i have in a Hash, but they vary in count
[11:43:58] arne_: how do i do it :/
[11:44:15] Ox0dea: Do you know about #grep?
[11:44:49] Ox0dea: Yay, Ruby! <3
[11:45:08] arne_: wow what the fuck that is so useful,
[11:45:16] Ox0dea: It's one of the best methods.
[11:45:21] Ox0dea: Because case equality is the shit.
[11:46:04] Ox0dea: >> [1, 'a', 3.14, :b, 2ri, {}].grep(Numeric)
[11:46:05] ruboto: Ox0dea # => [1, 3.14, (0+(2/1)*i)] (https://eval.in/468267)
[11:46:23] Ox0dea: That works because Module#=== is #is_a?.
[11:46:48] Ox0dea: But Regexp#=== is #=~, Proc#=== is #call, and Range#=== is #include?.
[11:47:16] RegulationD: has joined #ruby
[11:47:27] sepp2k: has joined #ruby
[11:47:36] Ox0dea: Basically, threequals is the reason matz is God.
[11:47:40] FailBit: o wow nice
[11:49:31] arne_: holy shit
[11:50:25] arne_: Ox0dea, just because im interested, how would've done that without grep
[11:50:29] arne_: i didn't get .or to work
[11:50:55] ht__: has joined #ruby
[11:51:01] Ox0dea: arne_: Are you determining which columns to query dynamically, or?
[11:51:16] arne_: yes, i have the symbols in an array
[11:51:55] arne_: 500ms response time for a query though :/ only 60k rows
[11:52:18] Ox0dea: Using prepared statements?
[11:52:38] norc: Ox0dea: Well, === is just used wrong often because they assume it to be syntactic sugar for #is_a?
[11:52:39] sdothum: has joined #ruby
[11:52:55] arne_: Ox0dea, nah just table.grep
[11:53:55] Ox0dea: Oh, I was talking about Enumerable#grep, since you said you already had your data in a Hash.
[11:54:10] arne_: haha, lol but you actually were right :D
[11:54:19] arne_: it works like a charm.
[11:54:31] arne_: the guy who wrote sequel is a very clever man
[11:54:37] pusewicz: has joined #ruby
[11:54:53] arne_: at first i was like "why he fuck is he using symbols for table names, how can i do a concat with that"
[11:54:59] arne_: and then i was like "WOOOOOOOO"
[11:55:07] Xeago: has joined #ruby
[11:55:39] roxtrongo: has joined #ruby
[11:55:45] Ox0dea: I almost always think of Julia Evans (http://jvns.ca) when I see Jeremy Evans' name, and I'm not sure why.
[11:56:07] Ox0dea: She's quite an interesting person, and I guess her passion kinda lingered.
[11:56:11] UtkarshRay: has joined #ruby
[11:56:25] certainty: that is left to be discovered by the psychologists
[11:56:55] Ox0dea: certainty: I moved my appointment to Thanksgiving.
[11:57:20] akem: has joined #ruby
[11:57:21] tubuliferous_: has joined #ruby
[11:58:04] arne_: >> "test 123".split
[11:58:05] ruboto: arne_ # => ["test", "123"] (https://eval.in/468268)
[11:58:20] arne_: is space default or /\s/ ?
[11:58:23] exadeci: has joined #ruby
[11:59:03] Ox0dea: >> "foo \s\t\n bar \s\t\n baz".split # arne_
[11:59:04] ruboto: Ox0dea # => ["foo", "bar", "baz"] (https://eval.in/468269)
[11:59:06] certainty: it's /\s+/ irrc
[11:59:22] certainty: IIRC, even and Ox0dea was faster again
[11:59:39] iateadonut: has joined #ruby
[12:00:05] Ox0dea: >> "foo \f\v bar".split # But who the hell uses form feeds and vertical tabs?
[12:00:06] ruboto: Ox0dea # => ["foo", "bar"] (https://eval.in/468270)
[12:00:59] arne_: regexes = query["fullSearchQuery"].split.map { |x| /#{x}/i } <= this is why i love ruby
[12:01:36] Ox0dea: That's pretty pretty.
[12:01:41] arne_: isn't it!?
[12:02:08] Ox0dea: >> %w[foo bar baz].map &Regexp.method(:new) # I'll leave this here, but you should maybe ignore it.
[12:02:09] ruboto: Ox0dea # => [/foo/, /bar/, /baz/] (https://eval.in/468271)
[12:03:17] arne_: can you put that into 1 regex somehow?
[12:03:32] Ox0dea: There's Regexp.union for just that purpose.
[12:03:49] ht__: has joined #ruby
[12:03:52] sapslaj: Quick question: Is there a convention for executable path in gems? (bin/, exe/, script/, etc.)
[12:04:09] Ox0dea: sapslaj: bin/ and exe/ are both quite common.
[12:05:06] Ox0dea: sapslaj: bin/ is more for development, exe/ for runnables.
[12:05:16] sapslaj: Ox0dea: Yep, have seen both. Just wondering which was the more acceptable way.
[12:05:29] Ox0dea: sapslaj: You can't go wrong with exe/.
[12:05:39] CloCkWeRX: has joined #ruby
[12:06:24] Scripore: has joined #ruby
[12:06:28] sapslaj: Ox0dea: I've always had a preference for script/ being development stuff and bin/ being for runnables, but that's just me.
[12:07:06] Ox0dea: sapslaj: script/ is pretty unorthodox, but I suppose I see the logic.
[12:07:45] arne_: wooo~ cool
[12:08:36] arne_: im back to loving ruby already, uh uh /hype
[12:09:17] Ox0dea: That was almost too easy.
[12:09:30] Ox0dea: I guess you don't believe that picture back there was really Ruby code?
[12:09:47] karapetyan: has joined #ruby
[12:09:55] ht__: has joined #ruby
[12:10:31] jackjackdripper1: has joined #ruby
[12:10:35] AimlessRAven: has joined #ruby
[12:10:57] sapslaj: has joined #ruby
[12:11:19] sapslaj: has joined #ruby
[12:11:56] HammyJammy: has joined #ruby
[12:11:59] AimlessRAven: hi guys, can someone explain me how to use pdf prawn gem in rails.. i mean how to create new pdf doc and link_to with my view?
[12:12:37] [spoiler]: I didn't know this is a thing... http://www.urbandictionary.com/define.php?term=Darude+-+Sandstorm
[12:12:46] xcesariox: has joined #ruby
[12:13:09] Ox0dea: [spoiler]: Welcome to the Internet. :P
[12:13:21] [spoiler]: Ox0dea: Lol :P
[12:13:22] kstuart: has joined #ruby
[12:13:23] Ox0dea: AimlessRAven: Are you sure you want to generate a link and not just initiate a download?
[12:13:53] ht__: has joined #ruby
[12:14:01] AimlessRAven: ok download also is good for me
[12:14:07] mattwildig: has joined #ruby
[12:14:21] Ox0dea: AimlessRAven: That'd be the #send_data method.
[12:15:07] arne_: Ox0dea, not using MRI right now :)
[12:15:08] sgambino: has joined #ruby
[12:15:33] Ox0dea: AimlessRAven: Well, I reckon you'll still need a tempfile on disk, so #send_file is a little more intention-revealing.
[12:15:43] arne_: the sequel guy let's me use sql functions in block, i read the code but didn't get it, how does he do that? does he overwrite method missing for the block?
[12:16:17] Ox0dea: arne_: #instance_eval is much more likely.
[12:16:31] Ox0dea: It lets you execute a block "as" some other object.
[12:16:44] arne_: ruuuuubyyyyyyyyyyyyyyyyyyyyyyyyy
[12:17:14] arne_: yeah, but i can use any function i want, even functions that doesn't exist like blaaaah(:name,something)
[12:17:34] arne_: is that method missing, atleast?
[12:18:03] Ox0dea: Yes, that's method_missing. :P
[12:18:26] sapslaj: method_missing in the context of the block.
[12:18:41] Oli`: has joined #ruby
[12:19:12] favadi: has joined #ruby
[12:21:48] DrCode: has joined #ruby
[12:22:04] axl_: has joined #ruby
[12:25:31] Rollabunna: has joined #ruby
[12:25:53] ht__: has joined #ruby
[12:30:34] badeball: has joined #ruby
[12:33:51] ht__: has joined #ruby
[12:36:04] certainty: context_missing is the method of the block
[12:36:20] arne_: context_missing is how i feel right now
[12:36:58] last_staff: has joined #ruby
[12:37:06] arne_: certainty, someone wrote a lisp dialect for the rubinius vm
[12:37:35] certainty: arne_: what's it called?
[12:38:15] arne_: https://github.com/apricot-lang/apricot
[12:38:34] arne_: https://github.com/txus/lambra
[12:38:48] certainty: looks like clojure
[12:39:06] arne_: yeah i meant the other one, just googled
[12:39:27] yoongkang: has joined #ruby
[12:40:04] nateberkopec: has joined #ruby
[12:40:07] certainty: interesting
[12:40:16] davedev24: has joined #ruby
[12:40:26] arne_: jitted lisp erlang-thingy
[12:41:53] ht__: has joined #ruby
[12:42:38] arne_: and native threads, woo~
[12:43:12] devoldmx: has joined #ruby
[12:43:28] corehook: has joined #ruby
[12:44:11] certainty: that guy has some interesting projects
[12:44:49] corehook: has joined #ruby
[12:44:53] arne_: monitor says "monitor is going into power saving mode, press any button to abort" /me presses power button, /me feels retarded
[12:45:20] shevy: you must press the any button man
[12:46:19] scmx: has joined #ruby
[12:47:18] blackmes1: has joined #ruby
[12:47:19] krz: has joined #ruby
[12:47:29] badeball: has joined #ruby
[12:47:38] _blizzy_: has joined #ruby
[12:48:09] Scripore: has joined #ruby
[12:51:01] blue_deref: has joined #ruby
[12:51:16] jdawgaz: has joined #ruby
[12:51:20] DrCode: has joined #ruby
[12:52:05] clauswitt: has joined #ruby
[12:53:45] millerti: has joined #ruby
[12:54:06] ale-: has joined #ruby
[12:54:43] badeball: has joined #ruby
[12:55:54] ht__: has joined #ruby
[12:56:00] corehook: has joined #ruby
[12:58:05] wprice: has joined #ruby
[13:00:41] badeball: has joined #ruby
[13:01:36] k3asd`: has joined #ruby
[13:01:56] badeball: has joined #ruby
[13:02:35] mghaig: has joined #ruby
[13:02:38] brushbox: has joined #ruby
[13:06:37] Emmanuel_Chanel: has joined #ruby
[13:07:03] Emmanuel_Chanel: has joined #ruby
[13:07:52] ht__: has joined #ruby
[13:07:59] synthroid: has joined #ruby
[13:08:09] RegulationD: has joined #ruby
[13:08:32] hackeron: has joined #ruby
[13:11:49] ht__: has joined #ruby
[13:12:41] Scripore: has joined #ruby
[13:12:54] krz: has joined #ruby
[13:13:55] quazimodo: has joined #ruby
[13:14:56] zotherstupidguy: has joined #ruby
[13:15:54] ht__: has joined #ruby
[13:17:01] claw: has joined #ruby
[13:18:42] trosborn: has joined #ruby
[13:19:16] tkuchiki: has joined #ruby
[13:20:36] tulak: has joined #ruby
[13:21:12] tulak_: has joined #ruby
[13:21:52] ht__: has joined #ruby
[13:22:34] axl_: has joined #ruby
[13:24:22] lukaszes: has joined #ruby
[13:25:49] ht__: has joined #ruby
[13:26:16] B1n4r10: has joined #ruby
[13:26:37] rippa: has joined #ruby
[13:27:59] rgtk: has joined #ruby
[13:28:22] samu: has joined #ruby
[13:29:29] futilegames: has joined #ruby
[13:30:26] mostlybadfly: has joined #ruby
[13:33:54] teclator: has joined #ruby
[13:36:17] stannard: has joined #ruby
[13:37:34] freerobby: has joined #ruby
[13:38:47] suchness: has joined #ruby
[13:39:02] sgambino: has joined #ruby
[13:39:56] Xeago: has joined #ruby
[13:40:41] zotherstupidguy: has joined #ruby
[13:43:23] Xeago: has joined #ruby
[13:43:39] bdnelson: has joined #ruby
[13:44:04] _stu_: has joined #ruby
[13:45:35] huyderman: has joined #ruby
[13:46:24] ht__: has joined #ruby
[13:50:23] binaryplease: has joined #ruby
[13:50:31] ESpiney: has joined #ruby
[13:53:12] freerobby: has joined #ruby
[13:53:38] ht__: has joined #ruby
[13:53:49] goodcodeguy: has joined #ruby
[13:54:06] _0mega: has joined #ruby
[13:55:43] rippa: has joined #ruby
[13:56:57] ekinmur: has joined #ruby
[13:57:38] JDiPierro: has joined #ruby
[13:58:44] mattwildig: has joined #ruby
[13:59:26] Hounddog: has joined #ruby
[14:00:51] RegulationD: has joined #ruby
[14:02:52] dmitch: has joined #ruby
[14:03:17] rickmasta: has joined #ruby
[14:04:33] gusTester: has joined #ruby
[14:05:37] Yzguy: has joined #ruby
[14:05:38] ht__: has joined #ruby
[14:06:04] _0mega: has joined #ruby
[14:07:24] Musashi007: has joined #ruby
[14:07:33] lubarch: has joined #ruby
[14:08:23] TomPeed: has joined #ruby
[14:09:15] atomical: has joined #ruby
[14:09:36] ht__: has joined #ruby
[14:10:07] sankaber: has joined #ruby
[14:10:27] ekinmur: has joined #ruby
[14:11:10] dionysus69: has joined #ruby
[14:12:53] dlitvak: has joined #ruby
[14:13:17] Hounddog: has joined #ruby
[14:13:51] wildlander: has joined #ruby
[14:16:47] malconis: has joined #ruby
[14:17:26] malconis: has joined #ruby
[14:17:31] grepwood: has joined #ruby
[14:17:49] grepwood: why does it take extremely long to sha1 a file in ruby? the file is only 385MB large
[14:17:59] prestorium_: has joined #ruby
[14:19:21] Tref: has joined #ruby
[14:19:52] avril14th: has joined #ruby
[14:21:12] IrishGringo: has joined #ruby
[14:22:07] jgpawletko: has joined #ruby
[14:23:04] adaedra: It's faster than shasum binary on my computer ._.
[14:23:31] gusTester: has left #ruby: ()
[14:23:38] axl_: has joined #ruby
[14:24:15] decoponio: has joined #ruby
[14:25:43] a346: has joined #ruby
[14:27:06] kobain: has joined #ruby
[14:28:12] jhass: adaedra: but more than their patience apparently
[14:30:45] babblebre: has joined #ruby
[14:31:24] dlitvak: has joined #ruby
[14:32:17] dorei: has joined #ruby
[14:32:20] B1n4r10: has joined #ruby
[14:35:39] matcz: has joined #ruby
[14:36:21] whippythellama: has joined #ruby
[14:36:22] dlitvak_: has joined #ruby
[14:36:32] _0mega: has joined #ruby
[14:36:47] samu: has joined #ruby
[14:37:36] ht__: has joined #ruby
[14:39:40] daivyk: has joined #ruby
[14:41:15] [k-: has joined #ruby
[14:43:27] dhollinger: has joined #ruby
[14:43:33] monthy: has joined #ruby
[14:43:53] Xeago: has joined #ruby
[14:43:58] devoldmx: has joined #ruby
[14:44:24] riotjones: has joined #ruby
[14:44:31] n00: has joined #ruby
[14:44:39] _stu_: has joined #ruby
[14:45:19] riotjones: has joined #ruby
[14:46:15] simplyianm: has joined #ruby
[14:46:19] B1n4r10: has joined #ruby
[14:46:20] urbanmonk: has joined #ruby
[14:46:32] tlarevo: has joined #ruby
[14:46:36] futilegames: has joined #ruby
[14:47:14] sankaber: has joined #ruby
[14:47:15] bmalum: has joined #ruby
[14:47:19] simplyianm: has joined #ruby
[14:47:39] n00py: has joined #ruby
[14:47:40] ht__: has joined #ruby
[14:47:40] Melpaws: has joined #ruby
[14:48:11] Melpaws: has left #ruby: ()
[14:49:07] lavros: has joined #ruby
[14:49:51] apeiros: adaedra: I bet they calculated the sum via ruby
[14:50:20] adaedra: apeiros: you mean, do the algorithm themselves?
[14:50:29] apeiros: (as opposed to just using Digest::SHA1.file)
[14:50:34] freerobby: has joined #ruby
[14:50:50] apeiros: no, I mean, create a SHA1 instance, read the file in ruby, and increment the SHA1 instance
[14:50:51] RegulationD: has joined #ruby
[14:51:38] ht__: has joined #ruby
[14:51:53] lubarch: has joined #ruby
[14:53:34] lubarch: has joined #ruby
[14:54:05] sdwrage: has joined #ruby
[14:54:20] lubarch: has joined #ruby
[14:54:25] JDiPierro: has joined #ruby
[14:54:42] polishdub: has joined #ruby
[14:56:40] RegulationD: has joined #ruby
[14:59:54] ht__: has joined #ruby
[15:00:22] mistermocha: has joined #ruby
[15:01:20] riotjones: has joined #ruby
[15:04:09] moeabdol: has joined #ruby
[15:05:03] DexterLB: has joined #ruby
[15:05:41] favadi: has joined #ruby
[15:05:46] senayar: has joined #ruby
[15:07:56] maikowblue: has joined #ruby
[15:07:57] ht__: has joined #ruby
[15:08:50] wa_r_ch_i__ld1: has joined #ruby
[15:09:04] neonalpine: has joined #ruby
[15:10:04] atomical: has joined #ruby
[15:11:07] tulak: has joined #ruby
[15:13:44] ht__: has joined #ruby
[15:14:20] troulouliou_div2: has joined #ruby
[15:14:22] grill: has joined #ruby
[15:14:30] nateberkopec: has joined #ruby
[15:15:47] htmldrum: has joined #ruby
[15:18:51] varesa: has joined #ruby
[15:20:08] dlitvak: has joined #ruby
[15:20:39] _stu_: has joined #ruby
[15:20:50] lukaszes: has joined #ruby
[15:23:08] jobewan: has joined #ruby
[15:23:23] axl_: has joined #ruby
[15:23:27] dmitch: has joined #ruby
[15:23:27] atomical: has joined #ruby
[15:23:40] ht__: has joined #ruby
[15:24:49] Zurg_: has joined #ruby
[15:25:04] tkuchiki: has joined #ruby
[15:26:04] be_erik: has joined #ruby
[15:27:00] arne_: JOIN WHAT?
[15:27:09] kerunaru: has joined #ruby
[15:27:15] Zurg_: guys, i'm new in ruby and i have a question, i'm trying to program a little game, is really a small one based on basic functions, more like an exercise than a real game :D.
[15:27:20] Zurg_: here's my problem
[15:27:51] Zurg_: i don't really know how to put more than one "if"
[15:28:13] arne_: put "if"*2
[15:28:19] avril14th: well, you can type as many if as your keyboard allows
[15:28:21] tjohnson: has joined #ruby
[15:28:46] Zurg_: yeah funny
[15:28:50] dopie: has joined #ruby
[15:28:51] arne_: >> puts "it's easy" if 1==1 and 1==2
[15:28:52] ruboto: arne_ # => nil (https://eval.in/468358)
[15:28:56] havenwood: >> if true; if true; if true; :friday! end end end
[15:28:57] ruboto: havenwood # => :friday! (https://eval.in/468359)
[15:28:57] chouhoulis: has joined #ruby
[15:29:09] avril14th: arne_: ahah
[15:29:12] Xeago: has joined #ruby
[15:29:32] avril14th: >> puts "it's easy" if 1==1 && 1==2
[15:29:33] ruboto: avril14th # => nil (https://eval.in/468360)
[15:29:57] erbesharat: has joined #ruby
[15:29:58] bruno-_: has joined #ruby
[15:30:01] varesa: has joined #ruby
[15:30:02] huyderman: if foo; do_something; elsif bar; do_something_else; end
[15:30:04] adaedra: && is logical "and"
[15:30:15] avril14th: Zurg_: I think you should read a bit more tutorials on ruby to clear a bit your head first
[15:30:26] ruby-lang512: has joined #ruby
[15:30:34] grilled-cheese: has joined #ruby
[15:30:36] adaedra: now, maybe you want to explain what you mean exactly by "puting more than one if", what are you trying to do, Zurg_
[15:30:37] arne_: >> puts "it's easy" if true and true
[15:30:37] ruboto: arne_ # => it's easy ...check link for more (https://eval.in/468361)
[15:30:45] Zurg_: yeah i know but there aren't a lot of tutorials on my language
[15:30:52] aramiscd: has joined #ruby
[15:30:54] avril14th: Zurg_: http://www.tutorialspoint.com/ruby/ruby_if_else.htm try this
[15:31:12] arne_: off he goes!
[15:31:37] avril14th: looks like a timeout
[15:31:40] arne_: haha, ah i see, he used webirc and clicked the link
[15:31:46] arne_: hilarious
[15:31:48] avril14th: maybe the guy is indeed in a far far country with a weird language
[15:32:13] arne_: next i will tell him to join #0,0, they usually help out
[15:32:25] p0wn3d: has joined #ruby
[15:32:59] adaedra: Italia, according to IP.
[15:33:15] darkxploit: has joined #ruby
[15:33:18] dionysus69: has joined #ruby
[15:33:26] avril14th: these italians, always exaggerating...
[15:33:54] teclator: has joined #ruby
[15:34:01] adaedra: So yeah, with a weird language :p
[15:34:11] arne_: papapopepi
[15:34:15] The_Phoenix: has joined #ruby
[15:34:18] treehug88: has joined #ruby
[15:34:19] atomical: has joined #ruby
[15:37:08] diegoaguilar: has joined #ruby
[15:38:51] beauby: has joined #ruby
[15:39:16] astrobunny: has joined #ruby
[15:41:09] tubuliferous_: has joined #ruby
[15:41:25] Rodya_: has joined #ruby
[15:42:02] arup_r: has joined #ruby
[15:45:11] Xeago: has joined #ruby
[15:45:49] matcz: has joined #ruby
[15:45:52] Channel6: has joined #ruby
[15:51:04] unknowns2k2: has joined #ruby
[15:51:19] Guest53: has joined #ruby
[15:53:27] NeverDie: has joined #ruby
[15:55:33] yoongkang: has joined #ruby
[15:57:25] symm-: has joined #ruby
[15:57:39] mary5030: has joined #ruby
[15:58:13] ruurd: has joined #ruby
[15:58:35] devoldmx: has joined #ruby
[15:58:40] mary5030: has joined #ruby
[15:58:51] agentmeerkat: has joined #ruby
[16:00:05] Xeago: has joined #ruby
[16:01:14] riotjones: has joined #ruby
[16:02:59] jenaiz: has joined #ruby
[16:03:02] jenaiz: has left #ruby: ()
[16:03:33] ht__: has joined #ruby
[16:05:38] ruby-lang705: has joined #ruby
[16:07:06] Hounddog: has joined #ruby
[16:07:15] Fire-Dragon-DoL: has joined #ruby
[16:07:51] urbanmonk: has joined #ruby
[16:08:10] RegulationD: has joined #ruby
[16:08:18] yosiat: has joined #ruby
[16:08:25] freerobby: has joined #ruby
[16:09:53] pimpin: has joined #ruby
[16:10:11] momomomomo: has joined #ruby
[16:10:24] beauby: has joined #ruby
[16:10:33] subscope: has joined #ruby
[16:13:16] Hounddog: has joined #ruby
[16:14:11] stannard: has joined #ruby
[16:15:31] ruby-lang402: has joined #ruby
[16:16:01] urbanmonk: has joined #ruby
[16:16:34] umgrosscol: has joined #ruby
[16:17:01] kies: has joined #ruby
[16:17:15] kerunaru: has joined #ruby
[16:18:34] chouhoulis: has joined #ruby
[16:18:51] ruby-lang402: Hello, I have a very specific question. Is there any place in Warden that passes user requests as method names?
[16:19:08] terminalrecluse: has joined #ruby
[16:19:33] rcvalle: has joined #ruby
[16:20:40] jhass: ruby-lang402: maybe elaborate a bit on where you're coming from
[16:21:16] yeticry: has joined #ruby
[16:22:32] shinnya: has joined #ruby
[16:24:02] northfurr: has joined #ruby
[16:24:17] cdg: has joined #ruby
[16:24:53] ruby-lang402: jhass: Sorry if I'm asking a bad question...let's see how to clarify. I'm trying to get up to speed on the Warden codebase and I want to know if user input is passed to Warden in a way that would take the user request and initialize a new method for authentication.
[16:24:54] unreal: has joined #ruby
[16:25:25] ruby-lang402: i.e. can a user directly impact a method name
[16:25:42] cdg_: has joined #ruby
[16:27:09] Maletor: has joined #ruby
[16:28:17] dlitvak_: has joined #ruby
[16:28:53] ruby-lang402: to add a bit more color, obviously not an admin user who is setting up the server, but an end user who would potentially send requests to be auth validated by warden
[16:29:29] norc: has joined #ruby
[16:30:10] rbowlby: has joined #ruby
[16:30:18] norc: So... What is the best way to request a backport for a bugfix already committed on trunk nearly a year ago?
[16:30:29] d0lph1n98: has joined #ruby
[16:30:44] norc: Ox0dea you surely know
[16:30:46] tulak: has joined #ruby
[16:31:21] jhass: ruby-lang402: the potential offenders are quite easily found with grep: http://p.jhass.eu/x.txt It's not that many, what you want to do is find the sources of the first argument primarily. For manager.rb that's easy stroked off, it's a static value
[16:32:06] jhass: ruby-lang402: I would expect everything in hook to come from the library user, but that remains to be verified of course
[16:32:15] arup_: has joined #ruby
[16:32:19] ruby-lang402: jhass - thanks, that's really helpful :)
[16:33:44] jhass: ruby-lang402: the call in errors.rb is inside method_missing, so it can only be triggered by explicit calls or one of the reaming send's
[16:33:52] vallen: has joined #ruby
[16:34:32] ruby-lang402: so basically that call could not be triggered by a user sending a malformed or invalid request
[16:34:37] atomical: has joined #ruby
[16:34:44] jhass: very unlikely
[16:35:05] EminenceHC: has joined #ruby
[16:35:10] jhass: https://github.com/hassox/warden/blob/master/lib/warden/session_serializer.rb#L33 for this call the amount of callable methods is greatly minimized even if scope is user provided
[16:35:16] dsimon: has joined #ruby
[16:35:17] norc: Silly me. This is actually documented on bugs.ruby-lang.org
[16:35:38] jhass: I only used warden through devise, so I'm not sure, but I'd be surprised if scope is actually not coming from the library user either
[16:35:51] jhass: same for the other send above
[16:36:48] arup_r: has joined #ruby
[16:37:01] uri: has joined #ruby
[16:37:18] Channel6: has joined #ruby
[16:41:46] erbesharat: has joined #ruby
[16:41:50] hahuang65: has joined #ruby
[16:42:02] pimpin: has joined #ruby
[16:44:34] Hounddog: has joined #ruby
[16:45:03] ruurd: has joined #ruby
[16:45:51] h99h9h88: has joined #ruby
[16:46:01] droidburgundy: has joined #ruby
[16:47:40] Fredrich_: has joined #ruby
[16:48:08] lukaszes: has joined #ruby
[16:48:08] [Butch]: has joined #ruby
[16:49:39] Hounddog: has joined #ruby
[16:50:42] dionysus69: has joined #ruby
[16:52:07] norc-2: has joined #ruby
[16:52:40] devoldmx: has joined #ruby
[16:53:22] mistermocha: has joined #ruby
[16:53:25] Hounddog: has joined #ruby
[16:53:38] zapata: has joined #ruby
[16:55:03] Spami: has joined #ruby
[16:55:37] blue_deref2: has joined #ruby
[16:58:04] _blizzy_: in ruby, is it better to use symbols for my keys, or strings?
[16:58:36] barhum2013: has joined #ruby
[17:00:56] jhass: _blizzy_: is it better to use integers or floats? They serve different purposes
[17:01:37] _blizzy_: jhass, I guess so. if I'm just using a basic hash, should I use strings or symbols. v:
[17:01:54] NeverDie: has joined #ruby
[17:02:01] riotjones: has joined #ruby
[17:02:13] jhass: same answer, there's no canonical definition of "basic hash" and how you use it is what matters
[17:02:31] _blizzy_: ok. I'll just use symbols.
[17:02:35] yqt: has joined #ruby
[17:03:35] dlitvak: has joined #ruby
[17:05:38] Fire-Dragon-DoL: has joined #ruby
[17:05:48] Hounddog: has joined #ruby
[17:08:36] ramfjord: has joined #ruby
[17:11:22] ajaiswal: has joined #ruby
[17:11:32] Hounddog: has joined #ruby
[17:11:33] kimegede: has joined #ruby
[17:12:40] cdg: has joined #ruby
[17:12:41] fedexo: has joined #ruby
[17:14:24] bb010g: has joined #ruby
[17:14:53] Hounddog: has joined #ruby
[17:15:25] rgtk: has joined #ruby
[17:16:13] trosborn: has joined #ruby
[17:16:32] gusrub: has joined #ruby
[17:23:05] pimpin: has joined #ruby
[17:24:43] be_erik: has joined #ruby
[17:27:09] _0mega: has joined #ruby
[17:27:51] EminenceHC: has joined #ruby
[17:27:58] hashpuppy: has joined #ruby
[17:28:35] tulak: has joined #ruby
[17:28:42] FailBit: you can't specify a user-agent with net::http, no?
[17:29:32] _blizzy_: mfw I was wondering why my bot was crashing for 10 minutes, only to realize I wasn't changing the string to a symbol.
[17:29:37] adaedra: If you can define headers, you can define an user-agent, I'd say.
[17:29:47] lorn: has joined #ruby
[17:29:55] tubuliferous_: has joined #ruby
[17:29:58] arne_: >> "".to_sym
[17:29:59] ruboto: arne_ # => :"" (https://eval.in/468412)
[17:31:11] imperator: has joined #ruby
[17:31:16] slash_nick: has joined #ruby
[17:32:00] nertzy: has joined #ruby
[17:32:09] h99h9h88: has joined #ruby
[17:34:06] mary5030_: has joined #ruby
[17:35:45] leafybas_: has joined #ruby
[17:36:28] mistermocha: has joined #ruby
[17:38:22] dlitvak: has joined #ruby
[17:38:51] mary5030: has joined #ruby
[17:38:54] be_erik: has joined #ruby
[17:40:01] skweek: has joined #ruby
[17:41:35] momomomomo_: has joined #ruby
[17:41:45] DexterLB: has joined #ruby
[17:41:49] mistermocha: has joined #ruby
[17:43:19] _0mega: has joined #ruby
[17:44:19] yoongkang: has joined #ruby
[17:46:16] be_erik: has joined #ruby
[17:46:47] AndroidLoverInSF: has joined #ruby
[17:47:47] lemur: has joined #ruby
[17:47:54] fantazo: has joined #ruby
[17:49:14] dfockler: has joined #ruby
[17:49:30] dopie: has joined #ruby
[17:51:01] tulak: has joined #ruby
[17:52:21] unknowns2k2: has joined #ruby
[17:52:46] mrtomme: has joined #ruby
[17:54:42] _stu_: has joined #ruby
[17:57:45] Jardayn: has joined #ruby
[17:57:48] syg: has joined #ruby
[17:58:13] RegulationD: has joined #ruby
[17:58:35] syg: i am having trouble getting my compass gem to run from cli, also i seem to have to install it with sudo even with rvm installed, ubuntu 15.10
[17:58:36] Tref: has joined #ruby
[17:59:06] Eiam_: has joined #ruby
[18:01:05] karapetyan: has joined #ruby
[18:01:13] AndroidLoverInSF: has joined #ruby
[18:01:55] B1n4r10: has joined #ruby
[18:02:32] freerobby: has joined #ruby
[18:02:56] ramfjord: has joined #ruby
[18:03:10] corehook: has joined #ruby
[18:07:12] ThatsNotJack: has joined #ruby
[18:07:32] kerunaru: has joined #ruby
[18:07:54] freerobby1: has joined #ruby
[18:07:54] lemur: has joined #ruby
[18:08:24] AndroidLoverInSF: has joined #ruby
[18:09:51] _0mega: has joined #ruby
[18:11:04] mrsolo: has joined #ruby
[18:12:21] JDiPierro: has joined #ruby
[18:12:30] momomomomo_: has joined #ruby
[18:12:35] rakm: has joined #ruby
[18:12:56] barhum2013: has left #ruby: ()
[18:13:50] kerunaru: has joined #ruby
[18:14:16] dlitvak: has joined #ruby
[18:16:24] Arkon: has joined #ruby
[18:17:03] justin_herrick: has joined #ruby
[18:18:30] corehook_: has joined #ruby
[18:19:41] djbkd: has joined #ruby
[18:19:45] norc-2: has joined #ruby
[18:20:16] ruurd: has joined #ruby
[18:20:20] stannard: has joined #ruby
[18:21:17] Jackneill: has joined #ruby
[18:22:44] jackjackdripper: has joined #ruby
[18:24:36] mrmargolis: has joined #ruby
[18:25:22] syg: has left #ruby: ("WeeChat 1.2")
[18:25:44] skweek: has joined #ruby
[18:27:09] dmj: has joined #ruby
[18:27:29] dmj: hi, I'm trying to edit some exsting ruby code, how would I rebuild it to produce an executable?
[18:27:41] dmj: I see there is rake, gem, and bundle
[18:27:52] dmj: is there like a 'build' command
[18:28:44] eam: dmj: ruby is interpreted, so there's no building. "bundle install" will install dependencies, but you can just run it and it will be interpreted at runtime
[18:29:13] eam: you may need to "bundle exec ..." to run your thing with the bundled dependencies in its environment
[18:29:24] malconis_: has joined #ruby
[18:30:18] shevy: good morning #vietnam!
[18:30:21] shevy: I mean, #ruby
[18:31:51] h99h9h88: has joined #ruby
[18:32:00] uo119: has joined #ruby
[18:32:22] EminenceHC: has joined #ruby
[18:33:41] malconis: has joined #ruby
[18:33:59] htmldrum: has joined #ruby
[18:35:44] _0mega: has joined #ruby
[18:36:18] eam: shevy: good morning
[18:37:45] arthurix: has joined #ruby
[18:37:55] riotjones: has joined #ruby
[18:38:06] Meow-J: has joined #ruby
[18:39:45] leafybas_: has joined #ruby
[18:40:44] darkxploit: has joined #ruby
[18:43:09] robbyoconnor: has joined #ruby
[18:44:04] Fire-Dragon-DoL: has joined #ruby
[18:44:55] clauswitt: has joined #ruby
[18:45:21] yfeldblum: has joined #ruby
[18:45:33] jamesaxl: has joined #ruby
[18:46:05] Xeago: has joined #ruby
[18:46:37] dmj: eam: so I call 'bundle install *.gemspec' and then 'bundle exec' ?
[18:46:44] AndroidLoverInSF: has joined #ruby
[18:47:32] eam: just bundle install - it will read the Gemfile in the current directory
[18:47:40] DoubleMalt: has joined #ruby
[18:47:42] dmj: so it produces a gem file from a gemspec
[18:47:46] jhass: if you have the sources of a gem and want to build and install it, it's gem build *.gemspec && gem install *.gem
[18:48:21] DEA7TH: has joined #ruby
[18:48:25] eam: a gemspec is an instruction on how to build a gem package
[18:48:38] eam: it's similar to a spec file for rpm, if you're familiar with that
[18:48:40] bubbys: has joined #ruby
[18:48:48] blackmes1: has joined #ruby
[18:50:29] dmj: jhass: so that will put it in my /usr/bin/<proj>
[18:50:30] last_staff: has joined #ruby
[18:51:13] dmj: eam: so does it copy the source code somewhere else?
[18:51:18] dmj: to interpret it
[18:51:33] jhass: if the gemspec defines any .executables it will install them to what `gem env` prints as executable directory or what you specify with the -n flag to gem install
[18:51:37] dmj: like a gem library or something or rather, and put the execute scripts in /usr/local/bin
[18:52:13] jhass: gem build will package the library up in a gem file, which is a zip + metadata
[18:52:24] jhass: gem install can install gem files into the system
[18:52:36] jhass: by extracting the files into the right locations
[18:53:27] devoldmx: has joined #ruby
[18:55:31] shortdudey123: has joined #ruby
[18:55:44] sphex: has joined #ruby
[18:55:52] dmj: jhass: nice, very cool
[18:55:52] tkuchiki: has joined #ruby
[18:56:03] dmj: jhass: have you played with sinatra?
[18:56:12] jhass: a bit, sure
[18:56:36] doodleha_: has joined #ruby
[18:57:03] Ox0dea: has joined #ruby
[18:57:07] eam: dmj: no, interpreted languages on unix work by reading the file being run
[18:57:14] roxtrongo: has joined #ruby
[18:57:40] dmj: jhass: do you know if the order in which you declare your handlers in the do blocks has an impact on routing, http://lpaste.net/145194
[18:57:53] JDiPierro: has joined #ruby
[18:57:56] roxtrongo: has joined #ruby
[18:58:15] platzhirsch: has left #ruby: ()
[18:58:20] Ox0dea: dmj: It does; the first match is the one that gets used.
[18:58:30] jhass: "Routes are matched in the order they are defined. The first route that matches the request is invoked." http://www.sinatrarb.com/intro.html#Routes
[18:58:31] htmldrum: has joined #ruby
[18:58:58] Tref: has joined #ruby
[18:59:33] Ox0dea: dmj: Try using `#!/usr/bin/cat` as the shebang to get a feel for what's happening when interpreted languages are run as "executables".
[18:59:38] mistermo_: has joined #ruby
[18:59:41] mattwildig: has joined #ruby
[18:59:52] shevy: stop putting cats in your shebangs!
[19:00:03] Ox0dea: But this isn't a UUoC!
[19:00:06] be_erik: has joined #ruby
[19:00:33] dented42: has joined #ruby
[19:00:38] Ox0dea: That said, you can't spell "demonstrative" without summoning a few demons.
[19:01:25] EvilDMP: has joined #ruby
[19:01:33] symm-: has joined #ruby
[19:03:21] Xeago: has joined #ruby
[19:03:27] roxtrongo: has joined #ruby
[19:03:49] EvilDMP: Hello, I hope you can help me. I want to get Jekyll working again on OS X 10.11. gem install jekyll tells me "You don't have write permissions for the /usr/bin directory.", so I think that's Apple's Ruby, not Homebrew's, but brew install ruby tells me "Warning: ruby-2.2.3 already installed"
[19:03:58] EvilDMP: how would you advise me to proceed?
[19:04:33] RegulationD: has joined #ruby
[19:05:37] FailBit: does homebrew still insist on making /usr worldwritable
[19:05:55] FailBit: because whether it does is going to be directly proportional to my ability to assist you
[19:06:07] FailBit: s/ability/willingness
[19:07:00] EvilDMP: FailBit: I don't know; what I know is Python, I want everything else to work as simply as a pencil or a fork
[19:07:02] adaedra: homebrew wants /usr/local as root:admin and 0775
[19:07:11] `based_pdev`: has joined #ruby
[19:07:18] EvilDMP: but I can munge permissions if required
[19:07:29] FailBit: EvilDMP: prepend /usr/local/bin to your path
[19:07:32] FailBit: that should get it
[19:07:59] unreal_: has joined #ruby
[19:08:20] adaedra: EvilDMP: OS X 10.11 locks /usr (except /usr/local), so you can't install gems system wide. You can install gems at user level if you want.
[19:08:37] EvilDMP: adaedra: user level's good enough for me I think
[19:08:42] freerobby: has joined #ruby
[19:09:11] adaedra: gem install --user-install jekyll
[19:09:19] EvilDMP: adaedra: why is it good enough for me? because I only plan to run things as myself
[19:09:19] charliesome: has joined #ruby
[19:09:31] adaedra: well that's perfect then
[19:09:37] mistermocha: has joined #ruby
[19:09:39] adaedra: aaaah wait
[19:10:08] EvilDMP: adaedra: http://dpaste.com/3YZFY0W
[19:10:32] adaedra: You'll have to add the missing directory to your PATH and you're ok to roll.
[19:11:19] ta: has joined #ruby
[19:11:47] adaedra: Also, it seems it uses the OS X provided ruby (2.0)
[19:12:39] ramfjord: has joined #ruby
[19:13:20] fschuindt: has joined #ruby
[19:13:26] EvilDMP: adaedra, FailBit: I once more have a working jekyll, much appreciated
[19:13:55] sdothum: has joined #ruby
[19:14:22] fschuindt: there's any way to distribute an Ruby software as a closed-source binary for Windows? (Ocra don't protects the code)
[19:14:44] doddok: use c++ instead
[19:15:07] fschuindt: I don't know any C++, or C :(
[19:15:25] doddok: it very bad
[19:15:28] fschuindt: I think its going to be quite hard to replicate what's already done in ruby
[19:15:32] freerobby1: has joined #ruby
[19:16:08] rgtk: has joined #ruby
[19:16:13] fschuindt: By the way the software is done and I just realized it may become a good source of income if I go commercial
[19:16:52] doddok: ruby is toy lang , try to finf more powerful lang
[19:17:09] fschuindt: oh, that offends me hahaha
[19:17:42] fschuindt: I take it very seriously, I am ruby professional
[19:17:54] kirun: has joined #ruby
[19:17:58] fschuindt: All my income come from it, you know
[19:18:00] adaedra: Don't take trolls too seriously.
[19:18:25] shinnya: has joined #ruby
[19:18:25] doddok: first y need learn googling
[19:18:32] fschuindt: adaedra: Yea, I just forgot about the trolls
[19:18:35] fschuindt: doddok: bye
[19:18:42] tubuliferous_: has joined #ruby
[19:18:55] doddok: strange dude
[19:19:45] rgrmatt: has joined #ruby
[19:20:27] shevy: <doddok> first y need learn googling
[19:20:27] Arkon: has joined #ruby
[19:20:48] jhass: fschuindt: are you sure you need to keep the source hidden from your customers? There are quite a few examples that don't in the dynamic language world
[19:20:51] shevy: the trollpowers are rising along with the moon cycle
[19:21:13] sepp2k: has joined #ruby
[19:21:18] adaedra: no feeding.
[19:21:31] shevy: he just wants to get rich quickly via ruby!
[19:22:51] _blizzy_: yeah, don't feed, or else the other team will win.
[19:22:59] _blizzy_: (dota2 ref)
[19:22:59] doddok: interesting what kind of software he wants create?
[19:23:14] shevy: twitter 3.0 in brazil probably
[19:23:51] Mon_Ouie: has joined #ruby
[19:23:51] jhass: mh, what's twitter 2.0?
[19:24:04] shevy: though, he could use e. g. C++ and mruby as scripting language
[19:24:06] rehat_: has joined #ruby
[19:24:18] shevy: dunno... the post-rewrite from twitter away from ruby :(
[19:24:29] rehat_: how do most script auto install gems needed for a script to run correctly
[19:24:31] _blizzy_: scala's a good language though
[19:25:11] adaedra: rehat_: what scripts
[19:25:18] shevy: rehat_ do you mean via a gem or e. g. bundler? proper .gemspec files will have dependencies list, Gemfile should as well, then it just is resolvement
[19:26:06] jhass: rehat_: most are packaged up as gems for easier distribution on top, the rest generally uses bundler these days
[19:26:31] pdoherty: has joined #ruby
[19:26:40] rehat_: so would a user need to manually install a gem that is needed for my script to work?
[19:26:45] fschuindt: it's a MMO bot haha
[19:27:43] yqt: has joined #ruby
[19:27:47] adaedra: rehat_: package your script as a gem, so dependencies are pulled with when the gem is installed
[19:27:56] jhass: fschuindt: so "modification allowed" is actually a huge selling point IMO
[19:28:00] doddok: y a serious person, you a plaing games?
[19:28:02] shevy: rehat_ you need to have the user install add-ons
[19:28:06] momomomomo: has joined #ruby
[19:28:21] shevy: if your script has require 'foobar' and foobar is some gem, then the user will have to do "gem install foobar" first, or run bundle(r)
[19:28:47] rehat_: ok thanks, for now I will add it in the readme or something. Its just one gem but if I start needing more I'll make my script a gem
[19:28:47] kadoppe: has joined #ruby
[19:28:50] _blizzy_: which is why you pull all your gems in a Gemfile
[19:29:01] _blizzy_: so they can just run 'gem install bundler && bundle install'
[19:29:05] jhass: fschuindt: a proper license can restrict legal redistribution at least down to only diffs, depending on your and the customers jurisdiction
[19:29:29] shevy: rehat_ these things will become a lot clearer when you built your own first gem btw
[19:29:31] fschuindt: jhass: yes, but people who uses mmo bots dont care about this
[19:29:33] adaedra: rehat_: if you don't bundle as a gem (which you should), write a Gemfile so people can `bundle install` or `gem install -g` to install automatically from project's folder.
[19:30:15] rehat_: adaedra: thanks will do
[19:30:29] _blizzy_: yeah, it's what I did with my Pokemon bot.
[19:30:32] _blizzy_: I just added a Gemfile.
[19:30:47] jhass: fschuindt: true, but they'd share an opaque binary likewise
[19:31:35] jhass: fschuindt: you only truly get around that with a thin client that has as much logic as possible on a server that requires a login. And even then you can expect logins shared
[19:31:57] fschuindt: jhass: my plan was a login based system... A site with a http API
[19:32:14] doddok: shhtp API!!!
[19:32:18] fschuindt: jhass: restricted by a hardware-id system
[19:32:24] doddok: shttp API!!!
[19:32:43] fschuindt: can someone just mute this guy, please?
[19:32:45] doddok: dont use http
[19:32:50] adaedra: doddok: stop it
[19:33:23] _blizzy_: hmm, I'm tempted to make a youtube clone in either Ruby, Java, or PHP. Though I already know what you all will recommend. :p
[19:33:42] gusrub: has joined #ruby
[19:33:46] Steve_Jobs: has joined #ruby
[19:34:24] jhass: _blizzy_: crystal, obviously
[19:34:33] _blizzy_: jhass, ofc. :)
[19:34:40] _blizzy_: I should look into crystal.
[19:34:46] doddok: go ideally for youtube
[19:35:03] fschuindt: _blizzy_: you protected your software using gems?
[19:35:07] Papierkorb: "Let's create a new language which inherits unreadable syntax from Erlang with a mix of ActionScript"
[19:35:07] adaedra: If you're going to start ague about languages, do it in -offtopic, please.
[19:35:08] doddok: after youtube u can create new fb
[19:35:14] _blizzy_: fschuindt, no?
[19:35:26] _blizzy_: doddok, lol, it';s funny because im working on a facebook clone in .NET
[19:35:32] shevy: how is the gem variant in crystal called? shard?
[19:35:39] fschuindt: _blizzy_: ty, I was not sure if I had understood
[19:35:40] jhass: shevy: yeah
[19:35:45] _blizzy_: adaedra, lol, I wasn't going to argue.
[19:35:48] shevy: \o/ I remembered without googling
[19:35:51] shevy: ACTION does a happy dance
[19:35:55] rgrmatt: has joined #ruby
[19:36:01] _blizzy_: I wish I could install ruby 2.2.x
[19:36:09] havenwood: _blizzy_: You can't?
[19:36:10] _blizzy_: but gems seem to work with 2.1.x
[19:36:19] _blizzy_: the gems I need work with 2.1.x but not 2.2.x
[19:36:22] shevy: you can do it _blizzy_ come on
[19:36:24] havenwood: _blizzy_: Which gems?
[19:36:29] doddok: adaedra, lets ban genious scoolboys
[19:36:37] waxjar: has joined #ruby
[19:36:39] grilled-cheese: has joined #ruby
[19:36:44] [Butch]: has joined #ruby
[19:36:49] shevy: damn ok I understand now
[19:36:49] Papierkorb: _blizzy_: huh? works great in 2.2.3
[19:36:51] dsimon: nokogiri doesn't support 2.2? :-O
[19:36:57] jhass: it sure does
[19:37:02] _blizzy_: oh, nokogiri works with 2.2.3? let me download it then!
[19:37:25] Papierkorb: Rails needs nokogiri, and that alone is pretty much reason enough to expect it to work with the latest ruby
[19:37:57] shevy: ruby is all about rails
[19:38:08] rdavila: has joined #ruby
[19:38:11] havenwood: shevy: Ruby par Avion!
[19:38:18] _blizzy_: rails is great. my favorite mvc framework
[19:38:41] zwdr: I love Ruby but abbhor Rails
[19:38:45] trav408: has joined #ruby
[19:38:50] zwdr: different folks different strokes etc
[19:39:00] shevy: and different cats
[19:39:03] zwdr: but it really feels wrong to say "Ruby is all about Rails"
[19:39:29] mwlang: has joined #ruby
[19:39:33] adaedra: well, Rails is a well know Ruby thing, some people do come to ruby by rails (including me)
[19:39:54] Papierkorb: wat hitting ^D in pry in a rspec3 test crashes MRI. I'm positive that I'll never be able to reproduce this in a small example though.
[19:40:04] havenwood: ACTION pokes Rails with a stick
[19:40:10] bougyman: adaedra: that's one of my least favorite things about ruby
[19:40:20] bougyman: being in ruby pre-rails gives some a bad taste about rails.
[19:40:31] shevy: adaedra :(
[19:40:39] shevy: bougyman yeah!
[19:40:40] havenwood: Rails is nifty. I do like Roda!
[19:40:43] neonalpine: has joined #ruby
[19:41:45] unknowns2k2: has joined #ruby
[19:42:17] Papierkorb: Ok, so I have a minimalistic HTML parser written in Ruby (Can't use nokogiri there). I have the HtmlParser::Error class, which inherits from RuntimeError. Should this error inherit from StandardError instead? To me, it happens at run-time, and thus, is a RuntimeError?
[19:42:32] havenwood: Papierkorb: Use Oga?
[19:42:56] havenwood: shevy: I think crystalline entities form shards.
[19:43:06] havenwood: shevy: Like a Rubyist custs gems.
[19:43:31] havenwood: shevy: Or maybe a Crystalist cuts shards?
[19:43:32] Papierkorb: havenwood: no native extensions. also, no big gems at all there.
[19:43:42] havenwood: Papierkorb: ah
[19:43:44] Papierkorb: havenwood: Opal code, that is, Ruby -> JS transpiling to run that stuff on the client
[19:45:04] baweaver: has joined #ruby
[19:45:10] krak3n: has joined #ruby
[19:45:29] allcentury: has joined #ruby
[19:45:52] shevy: havenwood yeah, nice mnemonic
[19:46:28] Ox0dea: Tim Toady : Perl :: Chris Tull : Crystal
[19:46:31] NeverDie: has joined #ruby
[19:46:47] riotjones: has joined #ruby
[19:46:55] Ox0dea: jhass: You should totally change your name to Chris Tull.
[19:47:12] jhass: I'm afraid I don't get the reference
[19:47:26] Papierkorb: jhass: say it out loud
[19:48:48] eam: Mina Swan
[19:48:57] imperator: has joined #ruby
[19:49:12] _blizzy_: I remember why I downgraded.
[19:49:21] _blizzy_: nokogiri doesn't play nice with windows on 2.2.3
[19:49:37] Papierkorb: Windows? Condolences man!
[19:49:41] imperator: _blizzy_, how's that?
[19:49:44] _blizzy_: I actually like windows.
[19:50:13] _blizzy_: "cannot load such file -- nokogiri/nokogiri" even though it's installed.
[19:50:32] cornerma1: has joined #ruby
[19:50:54] imperator: oh, i wonder if they didn't ship a binary for 2.2 yet
[19:51:01] imperator: i thought so, though - let me check
[19:51:03] Papierkorb: _blizzy_: have you rebuilt your gems after updating?
[19:51:06] doddok: you a looser
[19:51:09] dmj: has joined #ruby
[19:51:12] ruboto: +q doddok!*@*
[19:51:13] ruboto: -o ruboto
[19:51:26] havenwood: what's loose?
[19:51:28] _stu_: has joined #ruby
[19:51:30] _blizzy_: gefootloose
[19:51:30] imperator: foot looser?
[19:51:32] havenwood: hanging loose?
[19:51:44] imperator: get your sunday shoes
[19:51:49] _blizzy_: Papierkorb, yes.
[19:51:51] eam: set loose the dogs of snark
[19:52:49] erbesharat: has joined #ruby
[19:52:53] Ox0dea: eam: s/loose/slip/
[19:53:19] _blizzy_: heh, rails 4.2.0
[19:53:20] havenwood: I need a good pair of Ruby slippers.
[19:53:38] adac: has joined #ruby
[19:53:47] strgbrew: has joined #ruby
[19:55:20] AndroidLoverInSF: has joined #ruby
[19:55:25] EminenceHC: has joined #ruby
[19:56:18] AndroidLoverInSF: has joined #ruby
[19:56:18] _blizzy_: well, I got ruby 2.2.3 working with Nokogiri \o/
[19:56:22] _blizzy_: thanks to this line "gem 'nokogiri', '>= 1.6.7.rc3'
[19:57:23] mistermocha: has joined #ruby
[19:57:29] sdothum: has joined #ruby
[19:57:34] eam: Ox0dea: such a prescriptivist
[19:57:35] chipotle: has joined #ruby
[19:57:53] Ox0dea: eam: The original line just sounds really good.
[19:58:35] Ox0dea: That Billy Shakes fellow sure had a way with words.
[19:59:11] shevy: Billy Shakes it loose
[19:59:17] goodcodeguy: has joined #ruby
[19:59:40] sdothum: has joined #ruby
[19:59:54] Ox0dea: They say he might've been a eunuch.
[20:00:49] eam: eunuchs! I know this!
[20:00:56] dtordable: has joined #ruby
[20:01:37] Ox0dea: It's a eunuch's system!
[20:01:41] momomomomo: has joined #ruby
[20:02:59] ramfjord_: has joined #ruby
[20:03:25] SteveC: has joined #ruby
[20:03:41] DroidBur_: has joined #ruby
[20:04:56] DEA7TH: has joined #ruby
[20:05:16] Ox0dea: drbrain: You beat me to it.
[20:05:25] drbrain: Ox0dea: hehehe
[20:06:14] zachrose: has joined #ruby
[20:06:29] charliesome: has joined #ruby
[20:06:49] poguez_: has joined #ruby
[20:07:37] mistermocha: has joined #ruby
[20:07:40] drbrain: I had a hard time wording it
[20:07:44] drbrain: I hope its adequate
[20:09:19] opensource_ninja: has joined #ruby
[20:09:25] tkuchiki: has joined #ruby
[20:09:37] Musashi007: has joined #ruby
[20:09:54] Ox0dea: >> 0.1r + 0.2r # drbrain: Why not this way?
[20:09:55] ruboto: Ox0dea # => (3/10) (https://eval.in/468503)
[20:10:17] drbrain: I was following the other examples in the output that used 1/10
[20:10:22] drbrain: and forgot you could do that
[20:10:29] Ox0dea: Fair enough.
[20:10:46] _stu_: has joined #ruby
[20:11:01] duncannz: has joined #ruby
[20:11:02] grill: has joined #ruby
[20:11:07] x-light: has joined #ruby
[20:13:12] grilled-cheese: If I have a ruby script with a require for win32/registry, but I want it to be cross platform how do I exclude that windows specific section of coding?
[20:13:43] dmj: has left #ruby: ("ERC (IRC client for Emacs 24.5.2)")
[20:14:08] Papierkorb: grilled-cheese: require "win32/registry" if RUBY_PLATFORM =~ /win/
[20:14:13] adaedra: You may use RUBY_PLATFORM to see under what you run
[20:14:23] Papierkorb: grilled-cheese: I don't know what the exact value for it is, but it's stored in RUBY_PLATFORM
[20:17:57] leafybas_: has joined #ruby
[20:18:11] justin_herrick: has joined #ruby
[20:18:23] momomomomo_: has joined #ruby
[20:18:54] m8: has joined #ruby
[20:19:27] tubuliferous_: has joined #ruby
[20:19:38] mattwildig: has joined #ruby
[20:20:09] freerobby1: has joined #ruby
[20:20:44] leifg: has joined #ruby
[20:22:31] dsimon: has left #ruby: ("Leaving")
[20:23:49] blackmes1: has joined #ruby
[20:23:58] dviola: has joined #ruby
[20:24:15] ruboto: -q doddok!*@*
[20:24:15] ruboto: -o ruboto
[20:24:46] B1n4r10: has joined #ruby
[20:25:29] petricore: has joined #ruby
[20:25:30] FailBit: that's so unnecessary
[20:25:36] FailBit: chanserv has its own mute/unmute commands
[20:25:46] jessemcgilallen: has joined #ruby
[20:26:18] skweek: has joined #ruby
[20:26:29] jackjackdripper: has joined #ruby
[20:26:35] havenwood: FailBit: The important thing is that a robot is in charge!
[20:26:44] chris2: has joined #ruby
[20:27:58] Ox0dea: > I know not with what weapons World War IV will be fought, but World War III will be fought with bits and clones.
[20:28:16] slash_nick: the more bots are involved, the better
[20:28:28] Ox0dea: Let's make it all bots.
[20:29:02] duncannz: has joined #ruby
[20:29:04] dlitvak: has joined #ruby
[20:29:32] doddok: chuvachki
[20:30:47] doddok: did u see os on rust?
[20:31:45] dmitch: has joined #ruby
[20:32:35] h99h9h88: has joined #ruby
[20:33:51] jackjackdripper: has joined #ruby
[20:34:48] n_blownapart: has joined #ruby
[20:34:53] grill: has joined #ruby
[20:35:24] dikaio: has joined #ruby
[20:35:59] VeryBewitching: has joined #ruby
[20:37:05] charliesome: has joined #ruby
[20:38:40] nateberkopec: has joined #ruby
[20:39:40] hahuang65: has joined #ruby
[20:39:42] FernandoBasso: has joined #ruby
[20:40:01] absolutejam: has joined #ruby
[20:40:49] dlitvak_: has joined #ruby
[20:41:26] EminenceHC: has joined #ruby
[20:41:33] lacrymology: has joined #ruby
[20:42:39] zeroDivisible: has joined #ruby
[20:42:49] lacrymology: I'm looking for temporal expressions, this seems to be the "standard" (read: first google result), but the project seems frozen for the last 2 years and I'm always wary of still projects, should I use it, or find something more active? https://github.com/mlipper/runt
[20:43:21] djbkd: has joined #ruby
[20:43:22] joonty: has joined #ruby
[20:44:19] htmldrum: has joined #ruby
[20:46:17] aef: has joined #ruby
[20:46:36] SCHAAP137: has joined #ruby
[20:47:40] yoongkang: has joined #ruby
[20:48:10] baweaver: has joined #ruby
[20:48:27] matcz: has joined #ruby
[20:49:15] baweaver: has joined #ruby
[20:49:50] sdwrage: has joined #ruby
[20:51:33] matthewhill: has joined #ruby
[20:51:55] matthewhill: has joined #ruby
[20:52:10] pdoherty: has joined #ruby
[20:52:15] matthewhill: has joined #ruby
[20:52:55] rgtk: has joined #ruby
[20:53:09] rgrmatt: has joined #ruby
[20:53:58] Xeago: has joined #ruby
[20:54:14] devoldmx: has joined #ruby
[20:54:44] doddok: try to find
[20:55:24] B1n4r10: has joined #ruby
[20:58:48] hahuang65: has joined #ruby
[20:59:03] spider-mario: has joined #ruby
[21:00:20] maikowblue: has joined #ruby
[21:01:02] Coldblackice: has joined #ruby
[21:02:55] CloCkWeRX: has joined #ruby
[21:03:57] sdwrage: has joined #ruby
[21:07:37] axl_: has joined #ruby
[21:09:14] hakunin: has joined #ruby
[21:09:48] BTRE: has joined #ruby
[21:10:07] CloCkWeRX: has joined #ruby
[21:10:54] mistermocha: has joined #ruby
[21:11:30] shevy: if rust can build an OS then so must ruby
[21:11:41] Musashi007_: has joined #ruby
[21:12:51] goodcodeguy: has joined #ruby
[21:14:41] patdohere: has joined #ruby
[21:14:54] Musashi007: has joined #ruby
[21:16:50] n_blownapart: has joined #ruby
[21:16:55] nateberkopec: has joined #ruby
[21:18:19] mistermocha: has joined #ruby
[21:18:22] jackjackdripper1: has joined #ruby
[21:18:44] AccordLTN: has joined #ruby
[21:18:54] Spaceghost|work: shevy: Get on it!
[21:19:00] skade: has joined #ruby
[21:19:14] ramfjord: has joined #ruby
[21:19:28] FooMunki: has joined #ruby
[21:20:33] jackjackdripper: has joined #ruby
[21:20:44] dtordable: has joined #ruby
[21:20:46] Ox0dea: shevy: Use Toaru for inspiration! https://www.youtube.com/watch?v=Wp5kl-NfpM8
[21:20:54] bruno-: has joined #ruby
[21:22:20] shevy: spaceghost|work slowly!
[21:22:44] Spaceghost|work: shevy: slowly is all I know.
[21:23:05] jackjackdripper2: has joined #ruby
[21:23:12] shevy: Ox0dea pretty cool but it should happen through several different people rather :P
[21:23:37] dented42_: has joined #ruby
[21:23:57] k3asd`: has joined #ruby
[21:24:29] Ox0dea: shevy: Where would we be if Linus had felt that way?
[21:24:34] PaulCapestany: has joined #ruby
[21:24:35] _lazarevsky: has joined #ruby
[21:24:42] _lazarevsky: this is not really a ruby question per se
[21:24:46] Ox0dea: Then GTFO.
[21:24:53] _lazarevsky: more of an programming question
[21:24:57] _lazarevsky: well let me shoot away
[21:25:03] _lazarevsky: and then i'll gtfo
[21:25:08] _lazarevsky: so I'm prepping for an interview
[21:25:17] _lazarevsky: and I came across this question which tripped me
[21:25:24] _lazarevsky: I decided I'm gonna do the interview in ruby
[21:25:36] _lazarevsky: -> Describe a program that could detect whether a chunk of text in a document is a list or not. There are no obvious indicators like "1." or "-" or "*" however each list entry is on a new line. An example list would be:
[21:25:41] _lazarevsky: dsfsdfsdfsdf sdfsdf sdfsdf
[21:25:58] _lazarevsky: so I'm iterate over the lines of a document
[21:26:09] Zarthus: The real test is how to properly ask and formulate questions. You failed.
[21:26:12] Ox0dea: Sounds like you need a heuristic!
[21:26:40] A124: has joined #ruby
[21:26:41] Ox0dea: There are only so many sane ways to prefix list elements.
[21:27:00] northfurr: has joined #ruby
[21:27:07] sdwrage: has joined #ruby
[21:27:17] Ox0dea: Oh, wait, never mind; you're apparently trying to do NLP
[21:27:39] dn5: has joined #ruby
[21:27:41] adaedra: _lazarevsky: how many channels did you ask this question to at the same time?
[21:27:51] _lazarevsky: this is the second one
[21:27:57] _lazarevsky: I asked it in rails
[21:28:01] _lazarevsky: hang on though
[21:28:12] Ox0dea: _lazarevsky: You're being very bad.
[21:28:23] dn5: How do I append new value inside key with out replacing the old one, regarding arrays
[21:28:28] _lazarevsky: can't I detect \n from the doc?
[21:28:35] _lazarevsky: if there's a line break
[21:28:46] jhass: dn5: show current state, input and desired output please
[21:28:55] _lazarevsky: in succession
[21:28:59] doddok: read_lines. group(start with "line") >1
[21:29:19] dn5: jhass: pseudo: @hash = {key => value}
[21:29:31] Ox0dea: _lazarevsky: How does that have anything to do with detecting lists?
[21:29:36] duncannz: has joined #ruby
[21:29:37] jhass: dn5: without pseudo please
[21:29:44] jhass: dn5: that's called hash and not array btw
[21:29:45] _lazarevsky: Ox0dea: im just thinking out loud here
[21:29:45] dn5: jhass: one second please, let me paste it
[21:29:49] mistermocha: has joined #ruby
[21:30:14] _lazarevsky: Ox0dea: like.. if there are multiple lines which end with \n in succession
[21:30:19] _lazarevsky: then that's one indicator of a list..
[21:30:21] Ox0dea: _lazarevsky: How are you to differentiate between paragraphs and lists?
[21:30:23] Sam0163141155: has joined #ruby
[21:30:32] _lazarevsky: Ox0dea: that's the second problem
[21:30:33] mistermocha: has joined #ruby
[21:30:34] Ox0dea: All lines end with '\n', silly.
[21:31:26] _lazarevsky: fair enough..
[21:31:36] _lazarevsky: it's not a straight forward answer at least
[21:31:43] _lazarevsky: I was thinking for a sec whether I'm missing something obvious
[21:31:46] _lazarevsky: alright.. thanks guys
[21:32:44] be_erik: has joined #ruby
[21:32:59] PaulCapestany: has joined #ruby
[21:33:17] jackjackdripper: has joined #ruby
[21:33:25] dn5: jhass: https://gist.github.com/dn5/0b9fb6a6edd518708783
[21:33:34] h99h9h88: has joined #ruby
[21:33:42] gusrub: has joined #ruby
[21:34:31] sdwrage: has joined #ruby
[21:34:34] sepp2k1: has joined #ruby
[21:34:35] jhass: dn5: I take it the puts is actually in another method?
[21:34:57] dn5: jhass: No, it's in the same function
[21:35:00] Ox0dea: >> h = {foo: 'bar'}; h[:foo] << 'baz'; h # dn5
[21:35:01] ruboto: Ox0dea # => {:foo=>"barbaz"} (https://eval.in/468530)
[21:35:06] Ox0dea: Just shovel the new data in there.
[21:35:22] jhass: dn5: then how do you know whether to do it or not? Why would the first call not produce any output?
[21:35:41] uri: has joined #ruby
[21:35:59] dn5: Ox0dea: Thanks, let me try that.
[21:36:23] _lazarevsky: Ox0dea: I think I came up with a solution which makes one small assumption
[21:36:24] dn5: jhass: It does produce the output, but it replaces the description
[21:36:55] jhass: dn5: no, in your example in the desired version the first call doesn't produce any output
[21:36:55] Ox0dea: _lazarevsky: Two newlines before and after a list? Indentation?
[21:36:56] dn5: I want only to append the new string into description and not rewrite it
[21:36:58] _lazarevsky: Ox0dea: let's assume that a list item, for tihs particular scenario, would not span over more than 1 line
[21:37:29] jhass: dn5: so you want delete already made output?
[21:37:38] jhass: kind of like an interactive CLI tool?
[21:37:50] _lazarevsky: Ox0dea: then the line count should be equal to the number of \n's
[21:38:05] Ox0dea: _lazarevsky: That is always the case.
[21:38:32] Ox0dea: The number of lines in a file is equal to the number of occurrences of '\n'.
[21:38:52] nertzy: has joined #ruby
[21:39:23] yfeldblum: has joined #ruby
[21:39:31] moeabdol: has joined #ruby
[21:39:32] _lazarevsky: shame.. I thought \n was only added when you press return :)
[21:39:38] ss_much: has joined #ruby
[21:39:59] Ox0dea: >> File.read($0).count("\n")
[21:40:00] ruboto: Ox0dea # => 6 (https://eval.in/468531)
[21:40:03] dn5: jhass: Sorry, no, thats not what I'm trying to do. I don't know how to explain it very well :<. I want key "description" to have (assing) two seperate gets.chomp
[21:40:23] sparr: has joined #ruby
[21:40:42] Musashi007: has joined #ruby
[21:41:08] PaulCapestany: has joined #ruby
[21:41:28] Ox0dea: >> h = Hash.new(''); h[:foo] << 'bar'; h[:foo] << 'baz'; h[:foo] # dn5: Something like this?
[21:41:29] ruboto: Ox0dea # => "barbaz" (https://eval.in/468533)
[21:42:24] _lazarevsky: Ox0dea: so I guess I need a way to identify when enter was pressed..
[21:42:37] Ox0dea: _lazarevsky: Why on earth are you talking about keyboards?
[21:42:51] _lazarevsky: this is a list
[21:42:54] Ox0dea: Your task is to process some text.
[21:43:14] _lazarevsky: I see you point
[21:43:26] _lazarevsky: ahaaaa I got it!
[21:43:34] _lazarevsky: if the first word of each sentence
[21:43:48] Ox0dea: It simply can't be done in the general case given the current state of the art in NLP.
[21:43:52] dn5: Ox0dea: that still owerwrites the value from before, let me try again
[21:43:59] shevy: Ox0dea well linus only worked on the kernel
[21:43:59] _lazarevsky: could fit in the line above
[21:44:12] jhass: Ox0dea: uh, bad example. that's the same string for all keys
[21:44:20] peppers: has joined #ruby
[21:44:21] _lazarevsky: then that means that it's a new list item
[21:44:31] ebbflowgo: has joined #ruby
[21:45:06] _lazarevsky: Ox0dea: did I make sense?
[21:45:11] Ox0dea: _lazarevsky: Not really.
[21:45:13] _lazarevsky: Ox0dea: I had an epiphany here :)
[21:45:18] htmldrum: has joined #ruby
[21:45:31] _lazarevsky: Ox0dea: so get the character count of the first word of a line
[21:45:40] Ox0dea: > I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones.
[21:45:47] _lazarevsky: and check how many spaces there are between the last word of the line above and the end of line
[21:46:09] Ox0dea: _lazarevsky: That's a very complicated way to say you're going to detect lists based on indentation.
[21:46:10] _lazarevsky: if the first word of the new line could fit on the line above
[21:47:24] crankharder: not sure the verb i'm looking for. it's not combination/permuation, is there a way to combine all elements of two arrays e.g. [1,2].something([3,4]) => [[1,3],[1,4],[2,3],2,4]] ??
[21:47:27] peppers: has joined #ruby
[21:47:33] Ox0dea: crankharder: #product.
[21:48:00] rakm: has joined #ruby
[21:48:24] Ox0dea: Sure thing.
[21:49:24] mgorbach: has joined #ruby
[21:50:20] symm-: has joined #ruby
[21:52:54] doddok: a.map {|x| b.map {|y| f(x,y) } }.flatten
[21:53:09] Ox0dea: Needs more #flat_map.
[21:53:43] hxegon: has joined #ruby
[21:53:44] Ox0dea: Also, #product is variadic, so your implementation sucks.
[21:55:13] Ox0dea: > ruby is toy lang , try to finf more powerful lang
[21:55:17] Ox0dea: I hope you like the taste of crow.
[21:56:08] adaedra: why do you dig so deep, Ox0dea, especially to unbury low-level trolls.
[21:56:38] mistermo_: has joined #ruby
[21:56:41] shevy: you guys like doddok
[21:57:03] Nahra: has joined #ruby
[21:58:27] freerobby: has joined #ruby
[21:58:51] rodfersou: has joined #ruby
[21:58:58] shevy: what kind of variables do we have in ruby ... we have local variables, @instance_variables and @@class_variables. did I forget any other?
[21:59:23] Ox0dea: adaedra: Scarcely any digging was involved; that was the second thing he said today, and / isn't a particularly hard key to hit. He momentarily came out of his troll costume to demonstrate his smurts, and I felt it appropriate to put him down.
[21:59:32] EvilDMP: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[21:59:50] VeryBewitching: Ox0dea: The humane thing?
[21:59:53] northfurr: has joined #ruby
[21:59:59] djbkd: has joined #ruby
[22:00:06] Ox0dea: No, I wouldn't say it was overly humane, but it was appropriate.
[22:00:19] VeryBewitching: So, pragmatism then?
[22:00:22] Ox0dea: The glad suffering of fools and/or haters benefits neither party.
[22:00:25] jhass: shevy: $globals / $pseudo_globals (thread locals/read only), Constant's are kinda variable too in Ruby
[22:00:48] Ox0dea: jhass: They're not "thread-local", really.
[22:00:52] Ox0dea: They're "scope-local".
[22:01:05] Ox0dea: That documentation has been wrong since forever.
[22:01:13] jhass: ah, oh well
[22:01:36] lacrymology: has joined #ruby
[22:01:38] shevy: $globals may behave differently in threads?
[22:01:49] jhass: none you can define
[22:01:56] Ox0dea: From Ruby, anyway.
[22:02:09] Ox0dea: rb_define_hooked_variable() is available in C extensions.
[22:03:42] shevy: you know the hidden secrets of ruby
[22:03:56] VeryBewitching: Those secrets are on Github.
[22:04:00] shevy: I remember set_trace_var
[22:04:01] postmodern: has joined #ruby
[22:04:08] shevy: it's like snooping on an object
[22:04:35] Ox0dea: I'm reasonably sure that's how Pry implements watching.
[22:04:49] shevy: VeryBewitching yeah. I let Ox0dea and havenwood read through these secrets and explain it to the rest of #ruby :)
[22:04:49] karapetyan: has joined #ruby
[22:04:58] ramfjord_: has joined #ruby
[22:05:17] Ox0dea: shevy: You forgot norc.
[22:06:11] Musashi007: has joined #ruby
[22:06:12] shevy: nah norc is not really real
[22:06:25] Ox0dea: Is he really not un-fake, though?
[22:06:31] Eiam_: has joined #ruby
[22:06:43] shevy: I don't know so much what he is, I only know what he is not!
[22:07:23] towski_: has joined #ruby
[22:07:45] segy: has joined #ruby
[22:08:46] djbkd: has joined #ruby
[22:08:53] Ox0dea: It's like the exact reverse opposite of a false positive.
[22:08:56] ilhami_: has joined #ruby
[22:09:08] ilhami_: can I have some advice on a website?
[22:09:14] neanderslob: has joined #ruby
[22:10:09] ruboto: Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
[22:10:23] ilhami_: design wise I need advice :D
[22:10:25] ilhami_:
[22:10:31] ilhami_: how can I improve the front page?
[22:10:49] jhass: maybe rather a question for #css or #webdev or whatever?
[22:11:04] ilhami_: banned from CSS
[22:11:20] adaedra: seri??stly?
[22:11:31] shevy: adaedra you can't believe that this is a troll man!
[22:11:57] ilhami_: eeeh what?
[22:12:24] ilhami_: now I am a troll.. :/
[22:12:33] ilhami_: apparently.
[22:12:52] jhass: well, how did you get yourself banned?
[22:13:03] peppers: has joined #ruby
[22:13:06] diegoaguilar: has joined #ruby
[22:13:32] Ox0dea: Religious bigotry.
[22:14:27] ilhami_: I was banned because they didn't like me..
[22:14:31] ilhami_: OP got scared of me.
[22:14:45] shevy: you can try #html
[22:14:59] ilhami_: I am muted in there.
[22:15:02] jhass: mh, that's a troll answer tbh
[22:15:22] doddok: yeah, he is real troll
[22:15:24] jhass: what didn't they like?
[22:15:39] shevy: trollwars! grab the popcorn
[22:15:40] Ox0dea: ilhami_: Should we be terrified of you?
[22:15:45] adaedra: You succeeded at getting out of many places, I see
[22:15:53] adaedra: Mh, I a word.
[22:15:59] ilhami_: adaedra: it's not my fault seriously.
[22:16:13] sdwrage: has joined #ruby
[22:16:15] adaedra: ilhami_: I'm not judging.
[22:16:16] doddok: shevy and adaedra a trolls too
[22:16:19] jhass: ilhami_: try to see it as your fault for a moment. What was your fault?
[22:16:20] Ox0dea: ilhami_: What did you do and/or say that was 3spooky5them?
[22:16:29] rgrmatt: has joined #ruby
[22:16:41] ilhami_: Ox0dea: I think they felt I was too active sometimes and asked too many questions. :P
[22:16:46] havenwood: doddok: You seem to be malfunctioning today. Get yourself checked out!
[22:16:47] ilhami_: well I dunno really.
[22:16:50] Ox0dea: ilhami_: That's not frightening at all.
[22:16:50] Papierkorb: doddok: you're on to say.
[22:16:58] jhass: ilhami_: you want to inform yourself on the term help vampire then
[22:17:11] shevy: a vampire troll dual class
[22:17:25] AndyBotwin: has joined #ruby
[22:17:36] ilhami_: lol why are you accusing me? You don't know me guys.
[22:17:52] shevy: you already revealed too much information
[22:17:53] doddok: because they generate a lot of messages
[22:17:58] jhass: ilhami_: I'm not saying you did that on purpose
[22:18:17] ilhami_: jhass: I had some problems with them in the past. But I am really not acting like that anymore. :D
[22:18:24] Ox0dea: ilhami_: Acting like what?
[22:18:31] ilhami_: annoying the ops
[22:18:31] Papierkorb: I see, friday nights are really popcorn time in #ruby channels. Great.
[22:18:36] shevy: Papierkorb hehe
[22:18:43] Ox0dea: ilhami_: "Annoying" or being hateful toward?
[22:18:44] shevy: Papierkorb weekends on the other hand are so dead quiet :(
[22:18:54] ilhami_: I am not hateful??
[22:18:59] Ox0dea: ilhami_: Do you promise?
[22:18:59] Papierkorb: shevy: fucking casuals
[22:19:04] rgrmatt: has joined #ruby
[22:19:36] Ox0dea: ilhami_: You never made "jokes" about jihad or anything of that nature?
[22:19:51] ilhami_: why would I joke about jihad?
[22:20:02] ilhami_: I am a muslim... so that would not make sense.
[22:20:11] shevy: ok this is getting weird
[22:20:16] Yzguy: has joined #ruby
[22:20:17] ilhami_: you don't joke about your own religion dude
[22:20:18] brushbox: has joined #ruby
[22:20:22] shevy: Ox0dea is training him
[22:20:37] Papierkorb: shevy: I just started steam, and it advertises two of those youtube physic sandbox games. I just got reminded of the current discussion in here. Weeeird.
[22:20:50] ilhami_: So guys you want to play CS?
[22:20:58] shevy: go learn ruby ilhami_
[22:21:18] Ox0dea: Let's play Computer Science together!
[22:21:48] FooMunki: has joined #ruby
[22:21:50] VeryBewitching: ACTION gets his playmat
[22:22:00] ilhami_: Hehehe Ox0dea :D
[22:22:03] dn5: Is there a way to add string after second line in file?
[22:22:04] shevy: a playmat?
[22:22:13] Ox0dea: dn5: No, you have to do a complete write. :/
[22:22:14] ilhami_: Is Ruby more powerful than PHP?
[22:22:16] VeryBewitching: shevy: toddlers play on playmats
[22:22:16] ilhami_: be honest to yourself.
[22:22:20] shevy: dn5 sure! File.readlines, then you got an array, insert at the right position
[22:22:27] Papierkorb: dn5: after the second line of the file, or after EVERY second line of the file?
[22:22:32] shevy: VeryBewitching oh right. thought it was for adults there :D
[22:22:42] VeryBewitching: ilhami_: I think Ruby is monstrously more expressive than PHP
[22:22:47] shevy: something like "I'm gonna roll out my mahagony chess set"
[22:22:48] jhass: ilhami_: powerful is vague. It's more expressive and consistent
[22:22:57] ilhami_: Ok so I should use Ruby over PHP?
[22:22:58] dn5: Ox0dea: I hope thats a joke ahh.. shevy: Let me check it. Papierkorb: The first one.
[22:23:02] ilhami_: Is Ruby based on Lua?
[22:23:05] VeryBewitching: ilhami_: You should try both
[22:23:11] ilhami_: I have tried PHP
[22:23:12] jhass: ilhami_: most of the time you should. No, it's not
[22:23:22] VeryBewitching: <-- former PHP developer
[22:23:35] Ox0dea: dn5: shevy and Papierkorb explained how to actually insert the line, but you'll have to write the entire file to disk to persist the insert.
[22:23:45] eam: ruby is based on perl
[22:23:52] jhass: conceptually
[22:24:02] ilhami_: Perl is not known for being a good language though?
[22:24:09] VeryBewitching: Perl is awesome.
[22:24:10] eam: but admitting this is extremely contentious
[22:24:13] VeryBewitching: If you like Perl.
[22:24:20] tomdp: Ruby's only really a spiritual successor to perl that inherits a few things
[22:24:30] shevy: dn5 that step is simple, once you have the array; you can use File to store the array -> http://stackoverflow.com/questions/2777802/how-to-write-to-file-in-ruby but remember! take small steps
[22:24:31] eam: ilhami_: perl is known for being a HUGE success, basically the lingua franca of the internet for the 90s
[22:24:31] dn5: Ox0dea: So, file.each do |line|; if line == 2 -> add_string
[22:24:33] VeryBewitching: Inline regex ftw
[22:24:42] shevy: perl was cool when there was less competition
[22:24:51] dn5: shevy: Hey, thanks, let me try it.
[22:24:55] eam: was there less competition?
[22:25:01] VeryBewitching: It was C or Perl
[22:25:03] shevy: the pre-php days :)
[22:25:07] VeryBewitching: For a long time
[22:25:08] eam: VeryBewitching: or awk, rexx
[22:25:19] VeryBewitching: eam: Well, OK, I concede to that
[22:25:26] Ox0dea: eam: There are, like, five people who know about REXX.
[22:25:30] VeryBewitching: LISP makes me blind
[22:25:36] eam: Ox0dea: not in the early 90s!
[22:25:39] shevy: (lisp(is(not(so(bad
[22:25:43] eam: not my fault they're all dead now
[22:25:50] Ox0dea: Fair enough.
[22:25:55] Ox0dea: VeryBewitching: It's not an acronym or an initialism.
[22:25:58] shevy: Ox0dea the closing ) are just line noise
[22:26:04] Ox0dea: shevy: Okay, Python guy.
[22:26:05] eam: also let's not forget basic (and not the MS basic)
[22:26:12] Ox0dea: QBasic > *
[22:26:17] VeryBewitching: Ox0dea: Emphasis
[22:26:26] eam: basic from which all of these dynamic languages borrow
[22:26:34] shevy: hey... optional indent wouldn't be so bad... it's just mandatory indent that's annoying! I get that whenever i compare copy/paste between irb and the interactive python
[22:26:34] Papierkorb: Hey my first programming language was QBasic! That was .. 2002 .. well .. it worked alright okay?
[22:26:58] Ox0dea: Papierkorb: Do you remember anything you made?
[22:27:04] shevy: I started with BASIC too. 10 ... 20 ... goto 10 ... it actually was fun!
[22:27:11] VeryBewitching: My first language was BASIC, C64
[22:27:27] Ox0dea: Back in a sec; gotta figure out who's cutting onions.
[22:27:39] Papierkorb: Ox0dea: Um .. Well, barely. After QBasic, yes, most of the stuff.
[22:27:41] EminenceHC: has joined #ruby
[22:27:56] Xeago: has joined #ruby
[22:30:05] apofis: has joined #ruby
[22:30:16] krak3n: has joined #ruby
[22:30:17] VeryBewitching: ilhami_: Read this about PHP, then start learning Ruby; once you're comfortable with Ruby read it again then decide: http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/
[22:30:33] shevy: the github follow link should be renamed to ... "stalk" :D
[22:31:18] VeryBewitching: I follow no one on Github.
[22:31:52] ilhami_: VeryBewitching: after this current project. :)
[22:33:05] Tref: has joined #ruby
[22:34:05] h99h9h88: has joined #ruby
[22:34:41] Musashi007: has joined #ruby
[22:35:09] sdwrage: has joined #ruby
[22:35:37] dn5: Regarding that 2nd line append system: does each_line have line index/number function?
[22:36:05] Ox0dea: dn5: Use #each_with_index.
[22:36:42] dn5: Ox0dea: That might help. That returns an index right?
[22:36:47] N1993|2: has joined #ruby
[22:36:58] Ox0dea: dn5: It yields each element and its index to the block you provide.
[22:37:10] Ox0dea: So you'd say `each_with_index { |line, number| ... }`.
[22:37:18] Ox0dea: You might be going about it wrong, though.
[22:37:20] doddok: did you hear about paris?
[22:37:47] doddok: 100 hostages held at Le Bataclan concert hall
[22:37:49] dn5: Ox0dea: Ah, I get it now. And it's possible that I'm doing it wrong. Totally new in ruby.
[22:37:52] ilhami_: 60 killed so far.
[22:38:36] doddok: fucked muslim became angry
[22:38:46] ilhami_: how do you know it's a muslim?
[22:38:50] ilhami_: prejudices again
[22:38:53] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
[22:39:25] Ox0dea: dn5: Do you want to append some text to the second line, or do you want to insert a brand-new line after it?
[22:40:14] adaedra: !kick doddok Racism
[22:40:14] ruboto: ruboto kicked doddok:
[22:40:14] ruboto: -o ruboto
[22:40:17] dn5: Ox0dea: I want to append some text after 2nd line
[22:40:33] Ox0dea: dn5: And write it back to the same file, or?
[22:40:40] dn5: Ox0dea: Excatly!
[22:41:04] Ox0dea: dn5: Okay, but as I've mentioned, you're gonna have to write back the entire file, not just the updated second line.
[22:41:24] Ox0dea: No filesystem in common use supports arbitrary appends.
[22:41:50] nofxx: has joined #ruby
[22:42:02] dn5: Ox0dea: My try > @file = File.open("file.txt"); @file.each_with_index{|item, index| if #{index} == 2 < this is where I don't have idea how to proceed with update
[22:42:42] shevy: save back after you have modified your dataset
[22:43:01] doddok: has joined #ruby
[22:43:03] matcz: has joined #ruby
[22:43:24] h99h9h88: has joined #ruby
[22:43:33] dn5: shevy: Mind if you explain a bit detailed?
[22:43:47] shevy: you need to modify some line in that file
[22:44:10] shevy: if it is a small file, you can use File.readlines(); then you have an array. modify that array, then save it back
[22:44:48] shevy: if you know at which line, you can manipulate directly; if you have to grep, you can use .scan or .grep, I always forget which one
[22:45:15] doddok: muslims is not racism, its religion position
[22:45:39] ilhami_: doddok: you have evidence that it was a muslim? otherwise please shut up
[22:45:44] dn5: shevy: The file have small amount of data. I know the line number (2) and line string so I don't worry. But Bellow the second line is more data, lets call it X. I need to put my string between second line and data-X
[22:45:45] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
[22:45:53] ChanServ: +o havenwood
[22:46:39] Ox0dea: dn5: data-X will be in the Array you get from `File.readlines`.
[22:46:52] DEA7TH: has joined #ruby
[22:46:55] shevy: dn5 ok so it becomes simple: x = File.readlines(location); x[2,0] = 'your new string here' # or something like that, you probably have to deduct 1 because arrays start at index 0 count
[22:47:12] Ox0dea: He doesn't want to overwrite the whole line.
[22:47:18] northfurr: has joined #ruby
[22:47:37] Musashi007: has joined #ruby
[22:48:39] dn5: Ox0dea: I'm trying readlines atm. Will post results. shevy: let me try that, but as Ox0dea said, I don't want to owerwrite at the 2nd line, but place string bellow (and above data-X).
[22:48:53] Ox0dea: dn5: Below?
[22:49:00] PaulCapestany: has joined #ruby
[22:49:07] Ox0dea: Please take a second to determine whether you want to append to the second line or insert another line beneath it.
[22:49:08] shevy: if you insert at the right position you have that
[22:49:10] Ox0dea: They are different operations.
[22:49:39] shevy: he wants to do both :)
[22:49:47] Ox0dea: dn5: Be also advised that the lines you get from File.readlines will have a literal "\n" at the end.
[22:50:10] dn5: Ox0dea: Excuse me for my bad english. Will it be simpler if I write a gist with example of a data?
[22:50:14] eam: dn5: you want something like this? perl -ple'$_ .= "appended" if $. == 2' inputfile
[22:50:26] Ox0dea: dn5: I suppose it might. Please do so, if it's not too much trouble.
[22:50:27] eam: Ox0dea: do you know if ruby kept $NR aka $.?
[22:50:33] Ox0dea: eam: It did.
[22:50:45] eam: what's it called?
[22:50:49] ruboto: Ox0dea # => 0 (https://eval.in/468570)
[22:50:55] Ox0dea: Thanks, matz.
[22:51:28] sgambino: has joined #ruby
[22:52:16] arthurix_: has joined #ruby
[22:52:59] eam: so ruby -pe'($_.chop!; $_ += "append string\n") if $. == 2' /etc/passwd ?
[22:53:07] hxegon_: has joined #ruby
[22:53:11] shredding: has joined #ruby
[22:53:12] Ox0dea: Looks about right, yep.
[22:53:15] ta: has joined #ruby
[22:53:23] Ox0dea: You know, it's a shame `sed` seems to have become synonymous with `s///`.
[22:53:30] Ox0dea: I mean, somebody wrote Tetris!
[22:53:36] ChanServ: -o havenwood
[22:53:51] Ox0dea: https://github.com/uuner/sedtris
[22:53:55] adaedra: Ta tatata tatata tatata tatata tatata tata ta ta *note*
[22:54:04] adaedra: oops, sorry for the highlight.
[22:54:17] Ox0dea: They deserved it.
[22:54:21] nofxx: $NR stands for what?
[22:54:38] Ox0dea: Er, "number of record", even.
[22:54:48] dn5: Ox0dea: https://gist.github.com/dn5/98b729fbf2d5f836f91d
[22:54:59] devoldmx: has joined #ruby
[22:55:18] Ox0dea: dn5: This is JSON.
[22:55:20] nertzy: has joined #ruby
[22:55:37] dn5: Ox0dea: I know that.
[22:55:39] Ox0dea: You should not be operating on lines.
[22:55:53] Ox0dea: You should parse it and modify the resultant data structure.
[22:56:18] PaulCapestany: has joined #ruby
[22:56:29] dn5: Ox0dea: I know. I initially wanted to do it like that. But the problem is I won't have access to the file so I can't read it. Though I have writeable access to it.
[22:56:58] h99h9h88_: has joined #ruby
[22:57:02] Ox0dea: File.readlines isn't going to work if you don't have read access.
[22:57:29] Ox0dea: You're not going to be able to append anywhere but the end of the file if you can't read it.
[22:57:31] shevy: if you can not read the file
[22:57:34] dn5: Ox0dea: Oh god, fuck me and my english. I don't mean access rights like that.
[22:57:35] shevy: how can you grab data from it?
[22:57:36] dn5: Stop guys.
[22:57:45] dn5: Let me explain please
[22:57:52] Ox0dea: dn5: You will not be able to justify operating on JSON as lines.
[22:58:21] hahuang65: has joined #ruby
[22:58:28] unreal: has joined #ruby
[22:59:39] dn5: Ox0dea: :/ Why is that?
[22:59:42] swgillespie: has joined #ruby
[22:59:59] Ox0dea: dn5: It's a very silly thing to do.
[23:00:02] tulak: has joined #ruby
[23:00:12] nofxx: Ox0dea: ty
[23:00:23] Ox0dea: dn5: You have structured data and you want to ignore the structure; where's the sense in that, you know?
[23:00:35] matcz: has joined #ruby
[23:00:44] dn5: Ox0dea: I agree honestly.
[23:00:54] Azure: has joined #ruby
[23:00:57] dn5: Ox0dea: I don't know. It seems easier for me.
[23:01:02] dn5: Wrong, but easier.
[23:01:17] Ox0dea: dn5: You know there's a JSON standard library?
[23:01:27] dn5: Ox0dea: Yes.
[23:03:41] unreal_: has joined #ruby
[23:04:26] dn5: Ox0dea: But look why it seems easier for me like this: I won't have to use JSON lib, I don't have to parse my string to JSON (already stuffed/concat like that)
[23:06:25] h99h9h88: has joined #ruby
[23:06:28] zenspider: wait. what???
[23:06:49] zenspider: dn5: keyword: "SEEMS easier"... but it isn't
[23:08:07] sanjayu: has joined #ruby
[23:08:37] leafybas_: has joined #ruby
[23:08:51] Musashi007: has joined #ruby
[23:10:12] dn5: zenspider: Possible.
[23:10:28] tkuchiki: has joined #ruby
[23:10:34] _stu_: has joined #ruby
[23:10:42] Hanmac: has joined #ruby
[23:11:08] ZeeNoodley: has joined #ruby
[23:11:55] zenspider: compare whatever horrible thing you're hacking to: JSON.dump(JSON.parse(blah) << new_data, out)
[23:12:04] mistermocha: has joined #ruby
[23:12:31] mattwildig: has joined #ruby
[23:13:09] Ox0dea: dn5: As a perfect case in point, you forgot the commas in your desired output example.
[23:13:35] Ox0dea: It's just really dumb to operate on lines when you have something more than lines.
[23:15:09] passcod: Tbh, if the input is massive, it might be more efficient not to parse and stringify for a "simple" insert
[23:15:22] passcod: but for every other usecase, just use json
[23:16:00] yuung: has joined #ruby
[23:16:09] h99h9h88: has joined #ruby
[23:16:49] mary5030: has joined #ruby
[23:17:49] dlitvak: has joined #ruby
[23:18:09] vigintas: has joined #ruby
[23:20:10] mistermocha: has joined #ruby
[23:21:33] SteveC: has joined #ruby
[23:21:35] lipoqil: has joined #ruby
[23:22:11] rgrmatt: has joined #ruby
[23:24:52] mistermocha: has joined #ruby
[23:25:28] Musashi007: has joined #ruby
[23:26:04] grill: has joined #ruby
[23:30:00] baweaver: has joined #ruby
[23:30:23] _kfpratt: has joined #ruby
[23:31:01] user1138: has joined #ruby
[23:31:57] yoongkang: has joined #ruby
[23:33:27] okdas: has joined #ruby
[23:33:45] okdas: has joined #ruby
[23:34:32] IrishGringo: has joined #ruby
[23:35:32] ramfjord: has joined #ruby
[23:37:01] lukaszes: has joined #ruby
[23:39:35] framling: has joined #ruby
[23:39:47] rgtk: has joined #ruby
[23:41:20] bruno-: has joined #ruby
[23:43:07] Scripore: has joined #ruby
[23:43:30] ebbflowgo: has joined #ruby
[23:45:15] OrbitalKitten: has joined #ruby
[23:46:04] htmldrum: has joined #ruby
[23:49:10] mooe: has joined #ruby
[23:49:43] northfurr: has joined #ruby
[23:49:49] EminenceHC: has joined #ruby
[23:51:18] dn5: why does puts hash prints without backslash yet when I use File.write it adds backslashes to the values?
[23:52:08] Musashi007_: has joined #ruby
[23:52:51] zenspider: it probably doesn't. how are you testing the result of File.write vs puts?
[23:52:54] Yzguy: has joined #ruby
[23:55:16] djbkd: has joined #ruby
[23:56:25] arta82: has joined #ruby
[23:56:32] Musashi007: has joined #ruby
[23:57:07] tubuliferous_: has joined #ruby
[23:57:38] karapetyan: has joined #ruby
[23:58:03] shevy: dn5 make sure that you store a string when you use File.write; a trivial way may be to use yaml + YAML.dump() (if you have a yaml format that is)