« Back to channel list

#ruby - 22 June 2015

« Back 1 day Forward 1 day »
[00:03:23] Billias: has joined #ruby
[00:03:33] nopolitica: has joined #ruby
[00:03:58] renderful: has joined #ruby
[00:04:09] nopolitica: has joined #ruby
[00:04:55] sevenseacat: has joined #ruby
[00:04:59] nopolitica: has joined #ruby
[00:05:19] Cust0sLim3n: has joined #ruby
[00:05:48] datanoise: has joined #ruby
[00:18:35] towski_: has joined #ruby
[00:20:41] Torrieri: has joined #ruby
[00:20:59] totimkopf: has joined #ruby
[00:21:39] Torrieri: has joined #ruby
[00:26:14] User458764: has joined #ruby
[00:28:19] robustus: has joined #ruby
[00:30:31] freerobby: has joined #ruby
[00:32:49] fujimura: has joined #ruby
[00:32:50] t0rrieri: has joined #ruby
[00:33:24] Oog: has joined #ruby
[00:34:20] phutchins: has joined #ruby
[00:36:03] Oog: has joined #ruby
[00:41:46] robert45: has joined #ruby
[00:45:58] phizzbuzz: has joined #ruby
[00:46:48] avahey: has joined #ruby
[00:47:55] Hongo: has joined #ruby
[00:48:04] Hongo: has left #ruby: ()
[00:49:57] ltd: has joined #ruby
[00:50:50] transiency: has joined #ruby
[00:56:19] Casty: has joined #ruby
[00:57:35] al2o3-cr: has joined #ruby
[01:00:43] fujimura: has joined #ruby
[01:02:43] sharpmachine: has joined #ruby
[01:03:50] bronson: has joined #ruby
[01:04:34] dgutierrez1287: has joined #ruby
[01:05:09] ramfjord: has joined #ruby
[01:07:58] jack_rabbit: has joined #ruby
[01:08:45] freedrull: i'm getting this ssl error, but only with soundcloud. https://gist.github.com/mcfiredrill/c5a1e6d5b84bc081324f other sites seem to be fine
[01:10:12] Scripore: has joined #ruby
[01:10:23] beneggett: has joined #ruby
[01:10:38] fujimura: has joined #ruby
[01:11:20] t0rrieri: has joined #ruby
[01:19:05] senayar: has joined #ruby
[01:22:26] arescorpio: has joined #ruby
[01:22:34] ged_: has joined #ruby
[01:23:00] jacor: has joined #ruby
[01:24:19] Rubie: has joined #ruby
[01:24:30] datanoise: has joined #ruby
[01:24:40] kenichi: has joined #ruby
[01:26:18] baxx: has joined #ruby
[01:26:40] workmad3: has joined #ruby
[01:26:58] baxx: i was just wondering if there was a user flag for using Ruby gems like there is with pip --user <package>
[01:28:31] Santana: has joined #ruby
[01:29:13] dominic: has joined #ruby
[01:30:36] toretore: baxx: what does the flag do?
[01:31:57] fujimura: has joined #ruby
[01:34:05] Jarboe: has joined #ruby
[01:34:45] al2o3-cr: toretore: --user = Install to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%Python on Windows.
[01:35:00] al2o3-cr: --user-install ?
[01:35:07] CloCkWeRX: has joined #ruby
[01:35:40] JoshL: has joined #ruby
[01:36:30] jack_rabbit_: has joined #ruby
[01:37:00] Alayde_: has joined #ruby
[01:37:55] freedrull: baxx: i'm not sure, but most people use rbenv or rvm and all the gems end up getting installed to your home directory that way...
[01:38:08] Fluent: has joined #ruby
[01:40:18] freerobby: has joined #ruby
[01:40:52] Aeyrix: baxx: That's default behaviour in Ruby.
[01:40:55] Aeyrix: Or, with `gem`.
[01:41:11] Aeyrix: It's encouraged to use something like rbenv unless you know what you're doing when you install gems systemwide.
[01:42:11] Aeyrix: freedrull: error code 10: certificate has expired
[01:42:13] jtdoncas: has joined #ruby
[01:42:16] Aeyrix: I mean that's a pretty obvious error.
[01:43:15] freedrull: Aeyrix: do you know how to fix it?
[01:43:20] Aeyrix: freedrull: No.
[01:43:25] Aeyrix: Not something you can fix.
[01:43:34] Aeyrix: Either ignore the expired certificate, or use HTTP instead of HTTPS.
[01:44:03] toretore: freedrull: how recent are the certificates installed on your machine?
[01:44:25] toretore: go to https://soundcloud.com in the browser and see if you get an error
[01:44:49] freedrull: Aeyrix: i don't get this error on my other machine though https://gist.github.com/mcfiredrill/27af9ac714135c95696a
[01:45:06] Aeyrix: Fucking OpenSSL
[01:45:08] Aeyrix: such a piece of shit
[01:45:20] freedrull: toretore: no issues accessing soundcloud in my browser
[01:45:20] malconis: has joined #ruby
[01:45:43] toretore: freedrull: and this is on the same machine where you get the error?
[01:45:51] freedrull: toretore: yes
[01:46:12] freedrull: is there some cache i have to try clearing or something ?____?
[01:46:23] Aeyrix: There's a cache you have to try filling.
[01:46:41] freedrull: or can i get new certs?
[01:47:10] Aeyrix: http://curl.haxx.se/docs/sslcerts.html
[01:47:12] toretore: freedrull: which os?
[01:49:03] fedexo: has joined #ruby
[01:49:09] freedrull: toretore: osx yosemite 10.10.3
[01:50:48] Casty: has joined #ruby
[01:56:15] stardiviner: has joined #ruby
[01:57:17] uptownhr: has joined #ruby
[01:59:06] serivichi: has joined #ruby
[01:59:42] havenwood: freedrull: Homebrew?
[01:59:48] Spami: has joined #ruby
[02:00:02] havenwood: freedrull: brew tap raggi/ale && brew install openssl-osx-ca
[02:00:04] Manolo_: has joined #ruby
[02:01:02] havenwood: freedrull: But the ruby-build tool that rbenv uses ships its own openssl instead of using your package managers. I don't know what implication that has on certs if any.
[02:02:09] havenwood: I don't like it that they do it.
[02:02:22] havenwood: Use the package manager's openssl!
[02:02:22] NeverDie: has joined #ruby
[02:02:57] Hijiri: has joined #ruby
[02:04:47] havenwood: freedrull: On most distros it's the ca-certificates pacakge.
[02:05:28] A124: has joined #ruby
[02:06:06] freedrull: havenwood: yeah i'm on homebrew...i installed that...oh really? that's weird..
[02:06:09] havenwood: For common CA certs.
[02:07:08] havenwood: freedrull: Ah, already have openssl-osx-ca and still having issues? Hrm.
[02:08:55] guardianx: has joined #ruby
[02:10:44] havenwood: freedrull: One option would be to try a ruby-install installation to the rbenv location.
[02:10:57] havenwood: freedrull: git clone https://github.com/postmodern/ruby-install.git && cd ruby-install && sudo make install
[02:11:04] havenwood: freedrull: ruby-install --install-dir ~/.rbenv/versions/2.2.2 ruby 2.2.2
[02:13:27] p1k: has joined #ruby
[02:13:40] freedrull: havenwood: alright well, i haven't tried that yet so ill give it a shot
[02:13:45] freerobby: has joined #ruby
[02:14:59] freedrull: havenwood ruby-install is just ruby-build alternative? i haven't used it yet....
[02:15:00] Cust0sLim3n: has joined #ruby
[02:16:04] growlove: has joined #ruby
[02:22:42] havenwood: freedrull: Yup, it's an alternative that uses the package manager instead of shipping it's own openssl.
[02:23:03] senayar: has joined #ruby
[02:23:10] senayar^: has joined #ruby
[02:26:03] uptownhr: has joined #ruby
[02:26:42] senayar: has joined #ruby
[02:26:42] senayar: has joined #ruby
[02:30:29] iooner: has joined #ruby
[02:30:44] sevenseacat: another reason not to like rbenv? well i never.
[02:30:45] bkxd: has joined #ruby
[02:31:43] freedrull: havenwood: well, i tried it. no dice there either :|
[02:32:28] freedrull: im gonna stare at this blog article until i think of something else http://mislav.uniqpath.com/2013/07/ruby-openssl/
[02:33:57] freerobby: has joined #ruby
[02:35:58] Oog: has joined #ruby
[02:37:11] skysploit: has joined #ruby
[02:38:33] d10n-work: has joined #ruby
[02:38:40] krz: has joined #ruby
[02:41:51] p1k: has joined #ruby
[02:42:19] darkf: has joined #ruby
[02:42:29] freerobby: has joined #ruby
[02:44:25] freedrull: should this directory be empty? :| /usr/local/etc/openssl/certs/
[02:45:25] skysploit: has joined #ruby
[02:49:44] xcesariox: has joined #ruby
[02:52:40] j4cknewt: has joined #ruby
[02:54:11] fabrice31: has joined #ruby
[02:58:27] pontiki: has joined #ruby
[02:59:36] soulcake: has joined #ruby
[03:00:07] icebourg: has joined #ruby
[03:00:22] scx_: has joined #ruby
[03:00:53] bturker: has joined #ruby
[03:01:51] symm-: has joined #ruby
[03:02:21] JoshL: has joined #ruby
[03:03:41] aryaching: has joined #ruby
[03:04:39] sharpmachine: has joined #ruby
[03:06:51] x0F: has joined #ruby
[03:07:33] krz: has joined #ruby
[03:10:43] serivich: has joined #ruby
[03:11:33] braincrash: has joined #ruby
[03:12:38] redlegion: has joined #ruby
[03:13:31] nofxxx: freedrull, do you have any reason to use multiple ruby version? just use 2.2.2 from brew and have fun
[03:15:29] workmad3: has joined #ruby
[03:16:21] Plimsol: has joined #ruby
[03:16:45] auzty: has joined #ruby
[03:17:14] freedrull: nofxxx: lol, might have to try that if nothing else works. i have one 2.1 project but i can probably live without it for now....
[03:18:49] freerobby: has joined #ruby
[03:20:40] mattarse: has joined #ruby
[03:21:05] nofxxx: freedrull, it'll problably work on 2.2 ;)
[03:24:24] freedrull: nofxxx: good point
[03:30:24] ReK2: has joined #ruby
[03:30:53] HotCoder: has joined #ruby
[03:34:20] GitGud: has joined #ruby
[03:34:58] bruno-: has joined #ruby
[03:35:32] bungoman: has joined #ruby
[03:36:29] JoshGlzBrk: has joined #ruby
[03:37:39] aryaching_: has joined #ruby
[03:37:48] JoshGlzBrk: has joined #ruby
[03:40:12] linoespinoza: has joined #ruby
[03:40:46] fujimura: has joined #ruby
[03:40:59] gix: has joined #ruby
[03:43:23] krowv: HI channel. Does anyone have example code for ruby gtk3 to use the gtk_window_get_position method? https://developer.gnome.org/gtk3/stable/GtkWindow.html#gtk-window-get-position
[03:44:18] krowv: I'd like to get the current coordinates of a window and then use those coordinates to open another window relative to the location of the existing window
[03:46:26] Matt_P: has joined #ruby
[03:46:59] Matt_P: hi, im trying to install a gem, but it depends on another gem that cant install on my machine (there is a bug fix in the next minor version)
[03:47:16] Matt_P: is it possible to trick gem in to installing 1.0.4 as 1.0.3 ?
[03:48:03] Radar: install 1.0.4
[03:48:03] Matt_P: or better yet installing the other gem with an updated gem version for its dependency?
[03:48:22] Matt_P: the package i want to install depends on a specific version :(
[03:48:31] Radar: it would be helpful to know which gems you are talking about so that we can reproduce the problem on our machines
[03:48:39] Matt_P: sensu -> eventmachine 1.0.3
[03:48:57] Matt_P: on archLinux ruby 2.2
[03:49:00] baweaver: Submit a PR to sensu to not be a pain about it
[03:49:15] Radar: what baweaver said
[03:49:37] Matt_P: is there a download gem local and install from local?
[03:49:43] Matt_P: so i can just patch the gem spec?
[03:49:43] keen___________0: has joined #ruby
[03:49:46] baweaver: Most of the time it's not really needed
[03:50:03] Matt_P: https://github.com/eventmachine/eventmachine/issues/509
[03:50:04] baweaver: gemfile path
[03:50:05] Radar: I guess this is the project you're talking about: https://github.com/sensu/sensu
[03:50:11] Radar: https://github.com/sensu/sensu/blob/master/sensu.gemspec#L19
[03:50:17] Radar: Fork, change that version, `rake install`
[03:51:06] dross: has joined #ruby
[03:52:54] Radar: p.s. donations at radarlistener@gmail.com greatly appreciated ;)
[03:53:03] bronson: has joined #ruby
[03:53:37] gambl0re: has joined #ruby
[03:55:01] tangledhelix: has joined #ruby
[03:56:08] Matt_P: Radar: haha if rake install worked maybe :P
[03:56:24] michael_mbp: has joined #ruby
[03:56:30] Matt_P: ive prob messed something up with all the hackish things ive been trying to do ;_;
[03:56:45] Matt_P: .gem/ruby/2.2.0/gems/psych-2.0.13/lib/psych/deprecated.rb:19:in `block in quick_emit': stack level too deep (SystemStackError)
[03:58:37] Matt_P: ... 9618 levels...
[03:58:40] Matt_P: i can see why lol
[03:59:24] Radar: that doesn't seem good
[03:59:59] Oog: has joined #ruby
[04:00:22] Matt_P: update --system fixed that issue
[04:01:19] Matt_P: sensu (0.19.2) installed.
[04:01:31] Matt_P: \o/ thanks Radar and baweaver
[04:02:22] Ox0dea: has joined #ruby
[04:16:16] krz: has joined #ruby
[04:16:54] tangledhelix: has joined #ruby
[04:18:44] [k-: has joined #ruby
[04:21:40] theery: has joined #ruby
[04:21:44] Ox0dea: >> "#\{}"
[04:21:45] ruboto: Ox0dea # => "\#{}" (https://eval.in/385238)
[04:21:50] Ox0dea: Magical teleporting backslash.
[04:23:20] baweaver: .....how do you find these things?
[04:23:27] Radar: ^ wondering the same thing
[04:23:37] dgutierrez1287: has joined #ruby
[04:25:34] pontiki: it's the best entertainment
[04:26:17] Radar: Ox0dea meditates for days, then taps random keys and comes across these weirdness
[04:26:29] baweaver: ACTION nods
[04:27:04] pontiki: it's very zen
[04:28:30] mattrse: has joined #ruby
[04:28:36] beneggett: has joined #ruby
[04:32:12] bkxd: has joined #ruby
[04:34:39] yfeldblum: has joined #ruby
[04:36:20] xcesariox: has joined #ruby
[04:36:24] ra4king1: has joined #ruby
[04:37:43] towski_: has joined #ruby
[04:38:57] sarkyniin: has joined #ruby
[04:39:20] djbkd: has joined #ruby
[04:42:06] Aeyrix: bnagy: n e?
[04:42:17] fabrice31: has joined #ruby
[04:43:08] uptownhr: has joined #ruby
[04:43:42] arooni-mobile: has joined #ruby
[04:45:11] uber: has joined #ruby
[04:45:20] lala: has joined #ruby
[04:45:39] dfockler: has joined #ruby
[04:46:07] sinkensabe: has joined #ruby
[04:48:12] jesterfraud: has joined #ruby
[04:49:10] casadei: has joined #ruby
[04:52:17] bakedb_: has joined #ruby
[04:56:06] gianlucadv: has joined #ruby
[04:56:20] ta: has joined #ruby
[04:56:44] Hanmac: has joined #ruby
[04:59:30] revath: has joined #ruby
[05:01:29] charliesome: has joined #ruby
[05:04:13] workmad3: has joined #ruby
[05:05:17] chinmay_dd: has joined #ruby
[05:07:01] bluOxigen: has joined #ruby
[05:07:12] olistik: has joined #ruby
[05:07:45] allomov: has joined #ruby
[05:10:34] shafox_: has joined #ruby
[05:11:44] towski_: has joined #ruby
[05:11:53] GnuYawk: has joined #ruby
[05:11:53] GnuYawk: has joined #ruby
[05:11:54] shafox: has joined #ruby
[05:12:09] MVPhelp: has joined #ruby
[05:13:51] GnuYawk: has joined #ruby
[05:13:55] ndrei: has joined #ruby
[05:15:14] stardiviner: has joined #ruby
[05:16:48] MVPhelp: has joined #ruby
[05:17:14] peter_paule: has joined #ruby
[05:19:18] ndhamecom: has joined #ruby
[05:20:40] sarkyniin: has joined #ruby
[05:22:48] roolo: has joined #ruby
[05:23:17] aganov: has joined #ruby
[05:23:52] lxsameer: has joined #ruby
[05:26:09] uptownhr: has joined #ruby
[05:30:31] fsvehla: has joined #ruby
[05:30:57] CloCkWeRX1: has joined #ruby
[05:31:08] darkf_: has joined #ruby
[05:31:25] pl1ght: has joined #ruby
[05:35:07] ellisTAA: has joined #ruby
[05:35:20] ellisTAA: this is my first time coming to the challenge just to hang out
[05:35:34] lxsameer: has joined #ruby
[05:37:30] Radar: coming to the where
[05:38:03] MatthewsFace: has joined #ruby
[05:39:25] zenguy_pc: has joined #ruby
[05:40:44] darkf_: has joined #ruby
[05:40:46] uptownhr: has joined #ruby
[05:41:34] ellisTAA: has joined #ruby
[05:42:33] Tempesta: has joined #ruby
[05:42:59] sinkensabe: has joined #ruby
[05:43:29] p1k: has joined #ruby
[05:44:34] tagrudev: has joined #ruby
[05:45:04] p1k: has joined #ruby
[05:45:09] micmus: has joined #ruby
[05:46:10] charliesome: has joined #ruby
[05:47:59] uptownhr: has joined #ruby
[05:49:08] Matt_P: has left #ruby: ()
[05:51:41] CalvinnHobbes: has joined #ruby
[05:52:20] dumdedum: has joined #ruby
[05:52:20] dopie: has joined #ruby
[05:53:22] NightMonkey: has joined #ruby
[05:53:41] darkf_: has joined #ruby
[05:53:44] dhjondoh: has joined #ruby
[05:54:37] last_staff: has joined #ruby
[05:54:38] TvL2386: has joined #ruby
[05:57:42] GnuYawk: has joined #ruby
[05:57:43] GnuYawk: has joined #ruby
[05:59:55] GnuYawk: has joined #ruby
[05:59:55] GnuYawk: has joined #ruby
[06:00:17] ta: has joined #ruby
[06:00:39] C1V0: has joined #ruby
[06:01:39] dg-ratio1: has joined #ruby
[06:01:54] spider-mario: has joined #ruby
[06:02:19] Igorshp: has joined #ruby
[06:02:38] datanoise: has joined #ruby
[06:03:18] Igorshp: has joined #ruby
[06:06:43] codecop: has joined #ruby
[06:07:08] TvL2386: hi guys, I'm having an application that creates a file and writes to it for an hour and this loops indefinitely (tcpdump -G 3600). I need to upload the finished files to an ftp server. I'm wondering how I can do this. I was thinking of keeping a yaml file to register what's been uploaded. And upload based on ctime age or check if it's not in use anymore
[06:07:11] GnuYawk: has joined #ruby
[06:07:50] techsethi: has joined #ruby
[06:09:01] uptownhr: has joined #ruby
[06:09:20] jokester: has joined #ruby
[06:09:53] dhjondoh: has joined #ruby
[06:09:53] sandstrom: has joined #ruby
[06:11:15] Oog: has joined #ruby
[06:11:55] atom3: has joined #ruby
[06:13:38] atomi: has joined #ruby
[06:14:41] GnuYawk: has joined #ruby
[06:14:54] shevy: more code people
[06:15:26] dopie: anyone here good with sql?
[06:15:51] ruboto: Just ask your question, if anyone has or can, they will respond.
[06:16:11] TvL2386: haha! Last time I've been slapped with that!
[06:17:45] Stan: has joined #ruby
[06:17:54] lapide_viridi: has joined #ruby
[06:18:17] chinmay_dd: has joined #ruby
[06:24:18] dionysus69: has joined #ruby
[06:26:37] ndrei: has joined #ruby
[06:27:56] [k-: 1h blocking IO ;-;
[06:30:56] revath: has joined #ruby
[06:31:04] User458764: has joined #ruby
[06:31:57] shevy: dopie I hate SQL
[06:32:01] shevy: you can do lots of optimizations
[06:32:02] _blizzy_: has joined #ruby
[06:32:04] shevy: I hated these even more
[06:33:27] certainty: shevy is grouchy smurf
[06:33:47] shevy: other things are much cooler
[06:33:52] shevy: ruby is usually very cool
[06:35:28] [k-: do you like mongodb
[06:35:42] shevy: have no experience with it. How is its syntax?
[06:35:54] shevy: I actually used postgresql and postgresql is cool; but I still hate SQL
[06:36:20] soulcake: has joined #ruby
[06:37:41] ruby-lang381: has joined #ruby
[06:38:12] bigkevmcd: has joined #ruby
[06:38:30] [k-: I only ever used it with a binding
[06:38:37] [k-: but I forgot
[06:38:39] starfox_sf: often times I am running a ruby program which has some sort of long loop and I try to do Ctrl-c to break out of it and it does not work. I have to go and kill the process. Is there any way to make Ctrl-C interrupt the program?
[06:38:51] ndrei: has joined #ruby
[06:38:55] ddv: starfox_sf: it should work
[06:39:04] shevy: ruby can also be ugly
[06:39:10] shevy: I am looking at this here, verbatim copy:
[06:39:13] shevy: $><<"\e[2J\e[0;0H#{' '*10}_\n #{i&1==1?' '*7+'<':'Quack! >'}(*)____,\n#{' '*9}(` =~~/\n#{w*5}`---'#{w*4}"
[06:39:14] [k-: CTRL-D/CTRL-Z
[06:39:19] ddv: starfox_sf: you sure you aren't catching it with rescue?
[06:39:29] shevy: starfox_sf you can register a handle
[06:39:35] ruby-lang381: anyone in here can help with consuming API?
[06:39:41] starfox_sf: ddv: that might be it
[06:39:44] wasamasa: ACTION munches
[06:39:50] shevy: def register_sigint; Signal.trap('SIGINT') { exit };end # <--- then call that method in your .rb file
[06:40:08] ddv: starfox_sf: don't rescue from Exception
[06:40:17] shevy: anyone remembers offhand what is $> or do I have to look it up ... :P
[06:40:22] ddv: starfox_sf: but from StandardError if you really need to
[06:40:40] ruboto: [k- # => #<IO:<STDOUT>> (https://eval.in/385294)
[06:40:47] starfox_sf: people always say no matter what, never rescue from Exception... I should have listened
[06:41:04] ruboto: al2o3-cr # => ARGF (https://eval.in/385296)
[06:41:35] ddv: starfox_sf: most people are stupid
[06:41:38] ddv: including me
[06:42:05] ruby-lang381: i am with you ddv
[06:42:28] shevy: I hate those $ variables
[06:42:37] kwd: has joined #ruby
[06:42:43] shevy: I mean the short ones
[06:42:57] ruby-lang381: i am trying to consume Amazon API but i am having a hard time coding it, can anyone help
[06:42:58] starfox_sf: ddv: good point.
[06:43:09] shevy: well actually, I don't like global variables very much to begin with but I understand that it is sometimes necessary to be able to globally control or assign stuff
[06:44:38] al2o3-cr: i like these one $' and $`
[06:45:52] Xeago: has joined #ruby
[06:46:45] ruboto: [k- # => nil (https://eval.in/385313)
[06:46:51] p1k: has joined #ruby
[06:47:01] [k-: yay it's free of exceptions!
[06:49:08] timonv: has joined #ruby
[06:49:21] uptownhr: has joined #ruby
[06:49:49] revath: has left #ruby: ()
[06:50:17] rbennacer: has joined #ruby
[06:51:17] al2o3-cr: >> 1/0 rescue $@
[06:51:18] ruboto: al2o3-cr # => ["/tmp/execpad-0a7e3e2011cd/source-0a7e3e2011cd:2:in `/'", "/tmp/execpad-0a7e3e2011cd/source-0a7e3e2 ...check link for more (https://eval.in/385323)
[06:51:49] andikr: has joined #ruby
[06:52:54] dhjondoh: has joined #ruby
[06:52:57] workmad3: has joined #ruby
[06:55:34] Ox0dea: has joined #ruby
[06:55:40] Ox0dea: >> /#{'()' * 32768}/
[06:55:41] ruboto: Ox0dea, I'm terribly sorry, I could not evaluate your code because of an error: OpenURI::HTTPError:500 Internal Server Error
[06:56:07] chinmay_dd: has joined #ruby
[06:56:23] araujo: has joined #ruby
[06:56:23] araujo: has joined #ruby
[06:56:44] Ox0dea: Well, this was supposed to happen: https://eval.in/private/8ae5ebedfb986f
[06:56:49] Ox0dea: And they say Ruby isn't a Lisp.
[06:56:58] SOLDIERz: has joined #ruby
[06:57:07] krz: has joined #ruby
[06:57:33] sevenseacat: empty capture groups? nice.
[06:57:50] gagrio: has joined #ruby
[06:58:16] bronson: has joined #ruby
[06:58:46] fabrice31: has joined #ruby
[06:58:48] Ox0dea: Gotta love that Oniguruma will happily let you define a regular expression with 32,767 capture groups.
[06:59:33] User458764: has joined #ruby
[07:01:01] Zimsky_: has joined #ruby
[07:01:02] Sembei: has joined #ruby
[07:03:18] fedexo: has joined #ruby
[07:04:06] Ox0dea: >> ('a' * 10)[/#{'(a)' * 10}/]; g = global_variables; [$10, g.include?(:$9), g.include?(:$10)]
[07:04:07] ruboto: Ox0dea # => ["a", true, false] (https://eval.in/385330)
[07:04:10] Ox0dea: What's this about?
[07:04:37] workmad3: has joined #ruby
[07:04:48] wildroman2: has joined #ruby
[07:05:12] dhjondoh: has joined #ruby
[07:05:28] acke: has joined #ruby
[07:05:44] wildroman2: has joined #ruby
[07:08:42] shevy: you are trying to break ruby
[07:09:07] shevy: >> global_variables
[07:09:08] ruboto: shevy # => [:$;, :$-F, :$@, :$!, :$SAFE, :$~, :$&, :$`, :$', :$+, :$=, :$KCODE, :$-K, :$,, :$/, :$-0, :$\, :$_, ...check link for more (https://eval.in/385331)
[07:09:20] shevy: I don't think I have seen that method before
[07:09:25] last_staff: has joined #ruby
[07:10:21] [k-: >> $nerd = 0; global_variables
[07:10:22] ruboto: [k- # => [:$;, :$-F, :$@, :$!, :$SAFE, :$~, :$&, :$`, :$', :$+, :$=, :$KCODE, :$-K, :$,, :$/, :$-0, :$\, :$_, ...check link for more (https://eval.in/385332)
[07:11:30] Ox0dea: >> $foo = 1; global_variables.include?(:$foo)
[07:11:31] ruboto: Ox0dea # => true (https://eval.in/385333)
[07:11:54] Ox0dea: So what's going on with the capture groups >9?
[07:12:28] bruno-: has joined #ruby
[07:13:26] solars: has joined #ruby
[07:13:54] [k-: kernel trace? kek
[07:14:02] shevy: nobody needs more than 9
[07:14:06] msgodf: has joined #ruby
[07:14:20] datanoise: has joined #ruby
[07:14:23] fsvehla: has joined #ruby
[07:14:47] Cust0sLim3n: has joined #ruby
[07:15:13] Ox0dea: That's not the matter of contention.
[07:15:36] Ox0dea: $10 does "exist", and it's a global variable as best I can tell, so why doesn't it end up in the list?
[07:15:54] edwinvdgraaf: has joined #ruby
[07:18:06] Renich: has joined #ruby
[07:19:07] Ox0dea: https://github.com/ruby/ruby/blob/trunk/variable.c#L909-L912
[07:19:08] renderful: has joined #ruby
[07:19:08] shevy: it does not exist
[07:19:20] dg-ratio1: has joined #ruby
[07:19:46] Ox0dea: It turns out $1-$9 are just pushed into the return value for show.
[07:19:49] Ox0dea: That seems rather sily.
[07:19:57] shevy: they are cheat variables anyway
[07:20:09] htmldrum: has joined #ruby
[07:20:21] Ox0dea: How do you mean?
[07:20:30] shevy: they mysteriously disappear!
[07:20:47] pandb: has joined #ruby
[07:20:53] Ox0dea: Right, they're "magical", but they're really no different from $10+, so it seemed odd to me that they should show up in the result.
[07:21:05] mattrse: has joined #ruby
[07:22:55] SOLDIERz: has joined #ruby
[07:23:45] djbkd: has joined #ruby
[07:23:48] dgutierrez1287: has joined #ruby
[07:24:30] Rubie: has joined #ruby
[07:24:59] vondruch: has joined #ruby
[07:25:24] User458764: has joined #ruby
[07:26:29] tesuji: has joined #ruby
[07:27:33] vasilakisfil__: has joined #ruby
[07:28:14] _djbkd: has joined #ruby
[07:30:15] fabrice31: has joined #ruby
[07:30:24] sophiedeziel: has joined #ruby
[07:31:44] allomov: has joined #ruby
[07:32:26] white_bear: has joined #ruby
[07:33:50] Xeago: has joined #ruby
[07:34:09] bkxd: has joined #ruby
[07:34:21] sandstrom: has joined #ruby
[07:34:33] white_bear_: has joined #ruby
[07:35:18] Oog: has joined #ruby
[07:37:44] fusillicode: has joined #ruby
[07:38:40] Deele: has joined #ruby
[07:39:19] uptownhr: has joined #ruby
[07:40:41] alex88: has joined #ruby
[07:41:00] fabrice31_: has joined #ruby
[07:42:52] fusillicode: has joined #ruby
[07:42:53] lee-jon: has joined #ruby
[07:43:16] Iskarlar: has joined #ruby
[07:44:46] fusillicode: has left #ruby: ()
[07:44:48] livathinos: has joined #ruby
[07:45:15] User458764: has joined #ruby
[07:47:59] Juanchito: has joined #ruby
[07:50:20] jacor: has joined #ruby
[07:50:40] GnuYawk: has joined #ruby
[07:53:40] Scroff: has joined #ruby
[07:55:10] Hounddog: has joined #ruby
[07:56:36] mister_solo: has joined #ruby
[07:57:01] micmus: has joined #ruby
[07:57:13] anisha: has joined #ruby
[07:57:54] workmad3: has joined #ruby
[07:58:48] axl_: has joined #ruby
[07:59:24] subtwo: has joined #ruby
[08:00:36] mikecmpbll: has joined #ruby
[08:00:59] Hounddog: has joined #ruby
[08:02:15] zeroDivisible: has joined #ruby
[08:02:43] flughafen_: hey adaedra shevy
[08:03:13] khebbie: has joined #ruby
[08:04:08] [k-: why is there no dance for bogosort :(
[08:04:37] shevy: yo flughafen_, ready for take off? I see that you have a Landeplattform now, the _ in your nick
[08:04:58] flughafen_: oh, i guess i'm just so cool
[08:05:03] bigkevmcd: has joined #ruby
[08:06:24] shevy: the more _ the better
[08:06:29] shevy: build BIG THINGS flughafen_
[08:06:31] shevy: learn from berlin
[08:06:34] ndrei: has joined #ruby
[08:06:44] shevy: build the biggest castle with sand
[08:06:48] shevy: what could possibly go wrong
[08:08:37] dede: has joined #ruby
[08:09:45] rdark: has joined #ruby
[08:10:36] sinkensabe: has joined #ruby
[08:10:40] Renich: has joined #ruby
[08:10:53] sinkensabe: has joined #ruby
[08:11:18] pandb: has joined #ruby
[08:11:44] j4cknewt: has joined #ruby
[08:12:12] Jackneill: has joined #ruby
[08:12:47] fabrice31: has joined #ruby
[08:13:15] bruno-: has joined #ruby
[08:13:29] seitensei: has joined #ruby
[08:13:29] seitensei: has joined #ruby
[08:14:05] dseitz: has joined #ruby
[08:14:13] mgorbach: has joined #ruby
[08:14:21] j4cknewt: has joined #ruby
[08:14:43] Darkwater: has joined #ruby
[08:14:54] Sp4rKy: has joined #ruby
[08:15:13] sophiedeziel: has joined #ruby
[08:15:22] funnel: has joined #ruby
[08:15:36] datanoise: has joined #ruby
[08:15:41] robbyoconnor: has joined #ruby
[08:16:34] lee-jon: has left #ruby: ()
[08:16:54] super: has joined #ruby
[08:17:04] krz: has joined #ruby
[08:17:24] Tempesta: has joined #ruby
[08:17:28] keen___________0: has joined #ruby
[08:17:36] Macaveli: has joined #ruby
[08:17:42] al2o3-cr: has joined #ruby
[08:18:08] aganov: has joined #ruby
[08:18:58] fantazo: has joined #ruby
[08:19:26] mikecmpbll: has joined #ruby
[08:20:49] k3asd`: has joined #ruby
[08:22:49] bkxd: has joined #ruby
[08:23:50] withnale_: has joined #ruby
[08:23:52] soulcake: has joined #ruby
[08:24:58] emhs: has joined #ruby
[08:24:58] emhs: has joined #ruby
[08:25:30] duper`: has joined #ruby
[08:25:41] revath: has joined #ruby
[08:25:45] soulcake: has joined #ruby
[08:25:57] tvw: has joined #ruby
[08:27:54] jimms: has joined #ruby
[08:28:17] workmad3: has joined #ruby
[08:28:31] n008f4g_: has joined #ruby
[08:29:15] konsolebox: has joined #ruby
[08:33:51] ahmetkapikiran: has joined #ruby
[08:35:44] Xeago: has joined #ruby
[08:35:52] chthon: has joined #ruby
[08:36:31] Scroff: has joined #ruby
[08:37:39] lkba_: has joined #ruby
[08:37:40] tomaz_b: has joined #ruby
[08:38:16] negev: has joined #ruby
[08:38:52] negev: hi, i'm going crazy trying to figure out how to include subtemplates using Erubis. can anyone help? i'm doing this in a cgi wrapper: puts Erubis::FastEruby.new(File.read(ENV["PATH_TRANSLATED"])).result(binding()) but then within the .erb script that it's loading, there's no way i can see to include a subtemplate
[08:39:18] negev: for example, in index.erb if i do: puts ERB.new(File.read('menu.erb')).result(binding)
[08:39:28] negev: it will render it immediately, at the top of the output
[08:39:42] Tempesta: has joined #ruby
[08:39:44] negev: is there a buffer i can append to or something?
[08:40:43] adaedra: I think there's one, _erbout or something
[08:40:56] adaedra: Ah, Erubis
[08:41:25] Mon_Ouie: has joined #ruby
[08:41:25] bogdanteleaga: has joined #ruby
[08:42:09] Oog: has joined #ruby
[08:42:15] Xeago: has joined #ruby
[08:42:44] Igorshp: has joined #ruby
[08:43:32] negev: there must be a way to use subtemplates with erubis
[08:43:50] adaedra: Erubis or ERB?
[08:44:19] negev: either i just need it to work
[08:44:24] adaedra: I see both in your question
[08:44:32] negev: i'm using Erubis to render the initial template
[08:44:36] Rubie: has joined #ruby
[08:44:40] negev: yeah i think that's just because i was trying solutions i found online
[08:44:48] negev: they seem to do similar things
[08:45:59] adaedra: it doesn't work if you do your template rendering in a <%= %> block?
[08:49:25] dg-ratio1: has joined #ruby
[08:49:43] quimrstorres: has joined #ruby
[08:51:17] mister_solo: has joined #ruby
[08:53:18] quimrstorres: has joined #ruby
[08:54:44] c0m0: has joined #ruby
[08:55:05] ndrei: has joined #ruby
[08:55:09] quimrstorres: has joined #ruby
[08:55:39] white_bear_: is doing: path = 'foo/bar/baz'; File.join(path.split(File::SEPARATOR)) fine regarding path portability?
[08:57:15] fabrice31: has joined #ruby
[08:57:41] skade: has joined #ruby
[08:58:07] adaedra: what do you want to do?
[08:58:18] valkyrka: has joined #ruby
[08:58:25] adaedra: ensuring use of \ on Windows and / else?
[08:58:40] workmad3: has joined #ruby
[08:58:54] adaedra: You're sample won't work then
[08:59:07] adaedra: If you're Windows, it would split on '\' and thus not split anything
[08:59:16] white_bear_: i have this path: 'foo/bar/baz', i want it to be portable
[08:59:31] white_bear_: what about: File.join('foo/bar/baz'.split('/')) ?
[09:00:19] adaedra: Just do File.join('foo', 'bar', 'baz')
[09:00:29] adaedra: If your string is hardcoded
[09:00:40] canton7: also, windows handles '/' just fine :P
[09:00:54] dhjondoh: has joined #ruby
[09:01:02] adaedra: yeah, I would let the compatibility layer do its job
[09:01:06] white_bear_: it's not hardcoded
[09:01:25] jhass: there's File.split btw
[09:01:51] Xeago: has joined #ruby
[09:02:12] jhass: oh, that's basename/dirname, nvm
[09:02:17] white_bear_: File.join(%w(foo bar baz)) makes foo/bar/baz path portable right? so, path = 'foo/bar/baz; File.join(path.split('/')) should make it right?
[09:02:32] yoongkang: has joined #ruby
[09:02:55] jhass: white_bear_: what's not portable in your scenario about always using "foo/bar/baz" directly?
[09:04:36] white_bear_: jhass: foo/bar/baz is variable supplied by user at the top of the script
[09:05:03] negev: adaedra: oh yeah that does work, thanks :)
[09:05:34] DaniG2k: has joined #ruby
[09:05:36] jhass: white_bear_: I don't follow how that makes it non-portable
[09:06:19] ghormoon: has joined #ruby
[09:06:45] white_bear_: jhass: look at this sample: Dir[File.join(%W[ #{PUPPET_DIR} hieradata nodes *])]
[09:07:02] white_bear_: jhass: i'd like "#{PUPPET_DIR}/hieradata/nodes" to be dynamic
[09:07:06] adaedra: oh, puppet
[09:07:33] rafaelsales: has joined #ruby
[09:07:33] adaedra: What's wrong with File.join ?
[09:07:43] OrbitalKitten: has joined #ruby
[09:08:26] quazimodo: has joined #ruby
[09:08:33] jhass: white_bear_: as previously noted always using / should work on Windows
[09:08:36] hectortrope: has joined #ruby
[09:09:06] white_bear_: adaedra: File.join requires the path to be exploded, right? i.e., File.join("#{PUPPET_DIR}", 'hieradata', 'nodes'), while i'd like the path to be declared as "#{PUPPET_DIR}/hieradata/nodes"
[09:10:09] yh: has joined #ruby
[09:10:09] lee-jon: has joined #ruby
[09:10:12] Cust0sLim3n: has joined #ruby
[09:10:20] adaedra: Then just use your string, as jhass stated / should be able to work on Windows. But the fact you should "explode" the path with File.join is not an issue, except if you've coding in tweets
[09:10:40] konsolebox: has joined #ruby
[09:11:11] white_bear_: jhass: yeah, that's right, i just wanted to know how to handle portability correctly
[09:11:12] timonv: has joined #ruby
[09:11:51] bayed: has joined #ruby
[09:13:12] arup_r: has joined #ruby
[09:13:37] white_bear_: also, is there a way to retrieve all files in PATH without using a glob? i.e., avoid doing: Dir[DIR_PATH + '/*']
[09:13:48] white_bear_: s/PATH/DIR_PATH/
[09:13:55] jhass: Dir.entries
[09:13:59] bruno-: has joined #ruby
[09:14:34] white_bear_: jhass: cool, thanks!
[09:14:57] ahmetkapikiran: has joined #ruby
[09:15:15] [k-: Dir.entries contain . and .. iirc
[09:15:47] white_bear_: indeed, is there an idiom to skip them?
[09:16:03] ljarvis: yes, next if f == "." or f == ".."
[09:16:09] [k-: ACTION checks the docs
[09:16:15] ljarvis: or all hidden files, just check for f.start_with?(".")
[09:16:16] OrbitalKitten: has joined #ruby
[09:16:19] ljarvis: it's just a simple loop
[09:16:40] auzty: has joined #ruby
[09:16:44] adaedra: ACTION checks [k- 
[09:17:48] kp666: has joined #ruby
[09:17:56] [k-: there's no opts to skip those that I hoped :/
[09:18:21] kp666: has joined #ruby
[09:18:58] kp666: has joined #ruby
[09:19:11] okdas: has joined #ruby
[09:19:34] kp666: has joined #ruby
[09:20:11] kp666: has joined #ruby
[09:23:39] DexterLB: has joined #ruby
[09:25:28] dionysus69: has joined #ruby
[09:26:04] chinmay_dd: has joined #ruby
[09:27:06] multi_io: has joined #ruby
[09:27:36] white_bear: has joined #ruby
[09:28:32] dhjondoh: has joined #ruby
[09:28:58] workmad3: has joined #ruby
[09:29:10] adaedra: I never remember the outcome when this is discussed here: ruby-install or ruby-build?
[09:29:24] konsolebox: has joined #ruby
[09:29:35] white_bear_: has joined #ruby
[09:30:24] jhass: adaedra: the one not associated with rbenv :P
[09:30:56] white_bear_: so, how do you exclude "." and ".." in this: Dir[DIR_PATH].entries.map! ... # ?
[09:31:04] fabrice31: has joined #ruby
[09:32:05] jhass: uh, Dir[] is glob already, might just use it then
[09:32:14] chinmay__: has joined #ruby
[09:33:03] adaedra: jhass: wow, such wisdom :p
[09:33:21] ljarvis: adaedra: ruby-install
[09:33:29] al2o3-cr: does anyone use test ?<operator>, <file> in code?
[09:33:37] Scrofff: has joined #ruby
[09:33:43] ljarvis: al2o3-cr: it's not very popular no
[09:33:46] white_bear_: jhass: implying Dir[DIR_PATH + '/*'] # ?
[09:33:57] al2o3-cr: ljarvis: ah, ok :)
[09:34:19] adaedra: >> Dir['.']
[09:34:20] ruboto: adaedra # => ["."] (https://eval.in/385378)
[09:34:20] jhass: white_bear_: Dir["#{DIR_PATH}/*"] but yeah
[09:34:38] white_bear_: is / portable here? :p
[09:34:56] jhass: if DIR_PATH contains no \, yes
[09:35:13] workmad3: has joined #ruby
[09:37:36] ghostpl: has joined #ruby
[09:38:15] lee-jon: has left #ruby: ()
[09:38:18] anne-marie35: has joined #ruby
[09:38:35] tkuchiki: has joined #ruby
[09:38:59] yh: has joined #ruby
[09:40:39] [k-: there is also Dir.entries(path)
[09:41:08] ndrei: has joined #ruby
[09:41:37] white_bear_: it keeps . and .. too
[09:43:09] OrbitalKitten: has joined #ruby
[09:43:38] iamninja: has joined #ruby
[09:43:51] [k-: just opening your options
[09:44:13] ljarvis: that's exactly what was just discussed
[09:45:23] shevy: the bear!
[09:45:25] shevy: catch him!
[09:45:32] yoongkang: has joined #ruby
[09:46:43] olistik: has joined #ruby
[09:47:40] [k-: *reminding him his options
[09:47:45] exadeci: has joined #ruby
[09:48:07] anne-marie35: i'm a newbie in ruby (first time i use irc). i was wondering what kind of question i can ask to the ruby community. Many thanks
[09:48:13] [k-: I need to make my trip to the docs worthwhile, you'd know
[09:48:33] Scroff: has joined #ruby
[09:48:53] [k-: you can ask any question but you may not get a response
[09:49:21] tkuchiki: has joined #ruby
[09:49:22] ljarvis: anne-marie35: a ruby question
[09:49:55] adaedra: anne-marie35: anything!
[09:50:09] anne-marie35: ok thank you ljarvis ^^
[09:51:28] apeiros: anne-marie35: any ruby related question is fine. sometimes it needs patience to get an answer. sometimes getting no answer means that nobody understood your question.
[09:51:32] anne-marie35: so i would like to make rake tasks for a sinatra application with postgresql (no active record gem used), the purpose is to create databases with those tasks.
[09:51:34] yardenbar: has joined #ruby
[09:51:47] [k-: adaedra, why?! https://drive.google.com/file/d/0Bwc34geqbVNbOWpTY0F2ZUNFX2M/edit?usp=docslist_api
[09:52:05] apeiros: oh, adaedra - back to life again?
[09:52:22] adaedra: [k-: why not?
[09:52:54] anne-marie35: i've search and read some stackoverflow questions, the official doc for rake, etc. and i so this, put the sql in a sql file and execute it with the task. Is it a good way to do things ?the url --> https://gist.github.com/KevM/1705486
[09:52:56] adaedra: apeiros: yeah, znc got connection problems yesterday, pushed back by old nick
[09:53:01] shevy: adaedra bring back the undead in you
[09:53:10] shevy: and send him with some baguette to us too :)
[09:53:11] [k-: oops, the message before that was 174808
[09:53:17] chinmay_dd: has joined #ruby
[09:53:18] wasamasa: ACTION is imagining undead rails zombies
[09:53:23] [k-: you broke the chain of 8s
[09:53:28] [k-: huehuehue
[09:53:32] shevy: they spawn threads until the computer crashes
[09:53:46] adaedra: [k-: sorry
[09:54:12] zenspider: I can't read anything past the first tab
[09:54:25] anne-marie35: @<apeiros>ok, i will take care about the way i wrote in enlish
[09:55:18] adaedra: anne-marie35: not a lot of us speak english natively, I guess it'll be ok :)
[09:55:19] apeiros: anne-marie35: heh, from experience, most often the language is not the problem :) more that people leave out tons of context.
[09:55:54] terlar: has joined #ruby
[09:56:06] [k-: please don't wing mandarin at us
[09:56:15] startupality: has joined #ruby
[09:56:27] [k-: the horror when you fail mandarin badly
[09:56:36] adaedra: [k-: https://upload.wikimedia.org/wikipedia/commons/thumb/4/49/Mandarin_Oranges_(Citrus_Reticulata).jpg/220px-Mandarin_Oranges_(Citrus_Reticulata).jpg
[09:56:42] adaedra: huehuehuehue
[09:56:55] ndrei: has joined #ruby
[09:56:55] white_bear_: aren't you a perl guy apeiros? remind me someone...
[09:57:23] apeiros: white_bear_: perl was one of my first languages. but I think somebody else goes by a similar nick and is an active perl user.
[09:57:37] mister_solo: has joined #ruby
[09:58:06] konsolebox: has joined #ruby
[09:58:23] nopolitica: has joined #ruby
[10:00:33] apeiros: anne-marie35: I've only skimmed your gist. there's a couple of things I'd do differently stylistically. but overall it looks fine.
[10:00:40] shevy: he also did some php so he could be apephp
[10:00:45] [k-: mandarun throwing https://youtu.be/Pfo1BrYPi-E
[10:01:24] shevy: [k- write more code man!
[10:01:26] apeiros: anne-marie35: for some reason I really dislike e.g. manually invoking tasks in rake (Rake::Task["apply_sqlserver_sql"].execute()). convention in ruby is to use snake_case for variable names (se_config instead of seConfig f.ex.)
[10:02:21] apeiros: and of course 2 spaces, not tabs :)
[10:02:25] [k-: I don't write much code anymore :(
[10:03:19] ljarvis: apeiros: apeiron probably
[10:03:36] apeiros: ljarvis: that'd fit with my memory, yes
[10:03:43] ljarvis: ACTION does lots of perl
[10:03:46] apeiros: it's not the first time this came up :)
[10:04:20] adaedra: [k-: Do you have videos with even less quality? I can still see what happens.
[10:04:38] jhass: s = r, n = p, can you break the code?
[10:06:10] [k-: adaedra: no I don't ;p
[10:06:28] shevy: [k- try to write a little bit every now and then
[10:06:42] shevy: adaedra it was recorded with a potato
[10:06:55] anne-marie35: apeiros: thanks for the answer and the tip
[10:07:01] adaedra: DIe, potato
[10:07:08] shevy: and as you may now from the french cuisine, a potato has really bad eyesight
[10:07:41] bruno-: has joined #ruby
[10:07:41] Cust0sLim3n: has joined #ruby
[10:07:46] [k-: have you seen a potato budding from a potato?
[10:08:28] [k-: looks very gross
[10:08:38] bluOxigen: has joined #ruby
[10:08:43] shevy: well that's how plants tend to expand man
[10:08:55] shevy: you are killing baby plants when you eat them; you should eat stone instead
[10:09:05] adaedra: To be stoned?
[10:09:35] [k-: I'm sure stones are very nutritious!
[10:09:44] [k-: fossils power our electricity!
[10:09:58] yh: has joined #ruby
[10:10:03] [k-: think of the energy we would get!
[10:10:25] emhs: am sure, given enough time to be digested and depending on the type of stone, the enclosed minerals could be very healthy.
[10:11:44] dg-ratio1: has joined #ruby
[10:11:47] apeiros: anne-marie35: another thing you might consider: I tend to not have any code in my rake tasks themselves. I have the code in classes and call out to those.
[10:11:51] adaedra: Fascinating
[10:12:32] ndrei: has joined #ruby
[10:12:34] shevy: classes are very useful
[10:12:37] dfockler: has joined #ruby
[10:13:28] yoongkang: has joined #ruby
[10:14:18] [k-: does the community like refinements now?
[10:14:28] ddv: refinements are awesome
[10:14:32] endash: has joined #ruby
[10:14:33] shevy: I don't like its syntax
[10:14:33] ddv: and I represent the community in full
[10:14:45] shevy: the idea is ok
[10:15:03] ljarvis: dont let yorickpeterse see that
[10:15:10] yorickpeterse: I see everything
[10:15:11] antgel: has joined #ruby
[10:15:12] yorickpeterse: well mostly everything
[10:15:38] konsolebox: has joined #ruby
[10:15:44] fabrice31_: has joined #ruby
[10:15:58] apeiros: yorickpeterse's family name is Heimdall
[10:16:06] mattrse: has joined #ruby
[10:17:25] shevy: sounds mighty
[10:17:28] shevy: like a Viking
[10:17:44] shevy: Heimdall Wauki, brother of Thor Wauki!
[10:17:45] ndrei: has joined #ruby
[10:17:50] datanoise: has joined #ruby
[10:18:08] apeiros: there's those wimps who fear winter coming. they should fear ragnar??k.
[10:18:17] anne-marie35: apeiros: i saw some examples with a lot of code in a task indeed and i was wondering why they do that
[10:19:12] stardiviner: has joined #ruby
[10:20:15] [k-: is this an example of encapsulation not being followed?
[10:20:23] bluOxigen: has joined #ruby
[10:20:46] apeiros: it's an example of early convenience staying around for too long
[10:20:59] yh: has joined #ruby
[10:21:00] apeiros: small rake tasks with code you don't need anywhere else is usually where it starts
[10:21:19] apeiros: so you put all code in the task itself. and then never reconsider the pattern, even as your tasks grow.
[10:21:51] jhass: invoking other tasks is probably the last red flag that you should extract stuff
[10:22:32] apeiros: jhass: I'm actually thinking about *why* I dislike that so much. it's a gut feel and I can't rationalize it. so I wonder whether it's mistaken :-|
[10:22:58] apeiros: might also just still be those f'ing meds I'm on, preventing me from thinking clearly :<
[10:23:12] ndrei: has joined #ruby
[10:23:33] quimrstorres: has joined #ruby
[10:23:46] jhass: I'd rationalize it about above point actually, it's a big red flag that you actually want to extract stuff to a class or at least some regular methods, it indicates people forgetting that rake tasks are regular Ruby after all
[10:24:46] jhass: and I think it's also that it feels like it's not intended by Rake by not having a DSL method to do it, it looks like breaking up Rake internals
[10:25:09] farhad_hf: has joined #ruby
[10:25:42] Blaguvest: has joined #ruby
[10:25:49] jhass: (I do agree about it if you didn't figure ;D)
[10:25:50] farhad_hf: has left #ruby: ("Konversation terminated!")
[10:26:22] mister_solo: has joined #ruby
[10:26:37] al2o3-cr: has joined #ruby
[10:27:18] surs: has joined #ruby
[10:29:04] shevy: coding while being drugged rocks
[10:29:10] shevy: guess how _why was able to code so much!
[10:31:10] p1k: has joined #ruby
[10:32:59] bkxd: has joined #ruby
[10:34:02] konsolebox: has joined #ruby
[10:34:22] sandstrom: has joined #ruby
[10:34:32] denver: has joined #ruby
[10:35:23] ljarvis: baconed what his state
[10:35:47] tobiasvl: chunky bacon
[10:36:15] gr33n7007h: has joined #ruby
[10:36:16] apeiros: he never told the fox that the chunky bacon was fox bacon???
[10:36:23] duoi: has joined #ruby
[10:36:26] bar0n: has joined #ruby
[10:36:40] [k-: guess what did the fox say?
[10:37:32] jhass: apeiros: I see what you mean about the meds
[10:37:43] _blizzy_: has joined #ruby
[10:39:24] z3uS: has joined #ruby
[10:39:58] lucianob: has joined #ruby
[10:40:16] lkba: has joined #ruby
[10:40:18] [k-: I wish I could be remotely as funny but... guess not ;-;
[10:40:39] olistik: has joined #ruby
[10:40:53] baxx: has joined #ruby
[10:42:06] [k-: I hope nobody gave a blank look on that one hehe
[10:42:20] adaedra: ACTION pats [k- 
[10:42:34] jhass: nah, we're busy playing hangman
[10:42:42] uptownhr: has joined #ruby
[10:43:19] tylersmith: has joined #ruby
[10:43:19] Janusz1: has joined #ruby
[10:43:20] drewdavis: has joined #ruby
[10:43:21] nullwarp: has joined #ruby
[10:43:23] bkxd: has joined #ruby
[10:43:25] quazimodo: has joined #ruby
[10:43:29] sfr^: has joined #ruby
[10:43:31] apeiros: [k-: I was refusing to say "Ring-ding-ding-ding-dingeringeding!"
[10:43:33] Seich: has joined #ruby
[10:43:34] Stan: has joined #ruby
[10:43:35] jesterfraud: has joined #ruby
[10:43:36] DarkBushido: has joined #ruby
[10:43:37] jamon_: has joined #ruby
[10:43:37] df: has joined #ruby
[10:43:37] PlasmaStar: has joined #ruby
[10:43:37] bougyman: has joined #ruby
[10:43:37] bougyman: has joined #ruby
[10:43:38] nertzy: has joined #ruby
[10:43:38] surs: has joined #ruby
[10:43:39] CHVNX: has joined #ruby
[10:43:40] kenichi: has joined #ruby
[10:43:40] unclouded: has joined #ruby
[10:43:40] Shidash: has joined #ruby
[10:43:40] roryhughes: has joined #ruby
[10:43:41] teotwaki: has joined #ruby
[10:43:45] epochwolf: has joined #ruby
[10:43:45] prasselpikachu: has joined #ruby
[10:43:48] LBRapid: has joined #ruby
[10:43:51] Fluent_: has joined #ruby
[10:43:53] george2: has joined #ruby
[10:43:53] jalcine: has joined #ruby
[10:43:53] blackjid: has joined #ruby
[10:43:59] RazorX: has joined #ruby
[10:44:03] johnhamelink: has joined #ruby
[10:44:08] fabrice31: has joined #ruby
[10:44:13] BackEndCoder: has joined #ruby
[10:44:19] ElderFain-: has joined #ruby
[10:44:19] MVPhelp_: has joined #ruby
[10:44:21] mistym: has joined #ruby
[10:44:23] programmerq: has joined #ruby
[10:44:31] jimeh: has joined #ruby
[10:44:32] ghostpl: has joined #ruby
[10:44:53] jokester: has joined #ruby
[10:45:20] ElderFain: has joined #ruby
[10:45:30] quarcu: has joined #ruby
[10:45:35] Dwarf: has joined #ruby
[10:45:50] melter: has joined #ruby
[10:46:07] BLuEGoD: has joined #ruby
[10:46:18] Pupeno: has joined #ruby
[10:46:33] khebbie: has joined #ruby
[10:46:47] chinmay_dd: has joined #ruby
[10:46:52] shafox: has joined #ruby
[10:46:59] akahn: has joined #ruby
[10:47:52] lupine: has joined #ruby
[10:48:23] adaedra: Can we stop with this? It's dead and buried since long.
[10:48:36] [k-: ????????
[10:48:50] MiracleBlue: has joined #ruby
[10:48:51] patteh: has joined #ruby
[10:48:53] spectra: has joined #ruby
[10:50:42] DexterLB: has joined #ruby
[10:50:58] blackmesa: has joined #ruby
[10:52:05] mattrse: has joined #ruby
[10:53:01] shevy: the buried baguette
[10:53:36] shevy: most of _why's projects seem to have been able to find new maintainers
[10:53:40] tlarevo: has joined #ruby
[10:53:52] ljarvis: long live hpricot
[10:54:29] k3asd`: has joined #ruby
[10:54:50] skade: has joined #ruby
[10:55:24] shevy: wow... this is a method https://gist.github.com/anonymous/afe52ce30b4c23713576
[10:56:00] shevy: here is the full code, just a bit modified already https://gist.github.com/anonymous/dec6d9741cf08508667f
[10:56:35] renderful: has joined #ruby
[10:56:39] jhass: shevy: yeah, could use a messenger object
[10:56:40] chinmay_dd: has joined #ruby
[10:56:45] ljarvis: clear = `clear`
[10:56:55] ndrei: has joined #ruby
[10:58:08] [k-: imagine that in a constructor
[10:58:37] [k-: in a strongly typed language, even
[10:58:48] marsjani-: has joined #ruby
[11:00:10] [k-: >> $PROGRAM_NAME
[11:00:11] ruboto: [k- # => "/tmp/execpad-c1783743b833/source-c1783743b833" (https://eval.in/385433)
[11:00:16] workmad3: [k-: do you mean a strongly typed, or a staticly typed? :)
[11:00:40] [k-: The second one :)
[11:00:56] chinmay_dd: has joined #ruby
[11:01:56] rodfersou: has joined #ruby
[11:02:30] [k-: http://i.imgur.com/Jbk0cbz.png
[11:04:16] Stan: is there a cleaner way of getting a value from a list of hashes than this? [{1 => 1, 2 => 2}, {3 => 3}].find { |h| h[1] }[1]
[11:04:49] Jackneill: has joined #ruby
[11:04:51] shevy: so an Array with Hashes inside
[11:04:53] bkxd: has joined #ruby
[11:04:56] ljarvis: shevy: .map(&:values)
[11:04:58] jhass: stan: you can spare the .find in that case
[11:05:04] shevy: I am stan!
[11:05:08] shevy: he is shevy
[11:05:20] jhass: oh, mh, actually nvm
[11:05:37] jhass: that's one I'd like find_value for :/
[11:06:00] Stan: but the value of a particular key
[11:06:02] ljarvis: ah i read it wrong heh
[11:06:03] [k-: .find &:[1]
[11:06:14] jhass: that doesn't work
[11:06:23] ljarvis: it's been proposed
[11:06:23] [k-: why not :(
[11:06:36] ljarvis: bit clunky though
[11:06:55] [k-: .find &:second
[11:07:03] ljarvis: ^ active support only
[11:07:31] [k-: clearly more readable!
[11:07:37] workmad3: [k-: because a) that's not a valid symbol and b) you can't pass arguments to Symbol#to_proc like that
[11:07:48] ndrei_: has joined #ruby
[11:07:51] jhass: you'll still need .find(&:second).second :/
[11:08:00] ljarvis: beautiful...
[11:08:11] jhass: or .lazy.map(&:second).find(&:itself)
[11:08:20] [k-: I missed the second [1] part
[11:08:22] jhass: I really should write a patch for find_value
[11:08:24] noname: has joined #ruby
[11:08:35] workmad3: [k-: it's possible to patch Symbol so that .find :[].(1) would work
[11:08:40] Pupeno: has joined #ruby
[11:08:54] [k-: but that would be ugly
[11:09:10] workmad3: :[][1] ? :)
[11:09:21] tvw: has joined #ruby
[11:10:07] [k-: using &:values looks much better
[11:10:41] ta: has joined #ruby
[11:11:03] [k-: wait, that method call doesn't make sense
[11:11:07] skyrocker: has left #ruby: ()
[11:11:35] [k-: oh, I just got it
[11:11:59] jhass: stan: maybe you can restructure your stuff so that becomes unnecessary :/
[11:12:41] [k-: merging the hashes may be nice
[11:13:08] skade: has joined #ruby
[11:13:36] abyss: helo again;) I have this code: https://gist.github.com/anonymous/15b22caab60edfe9caf5. It reads ids from id_to_change_all_uniq put to array. Then loop in each, check if line contain one of the id from ids array if yes, then add 1000 to id and change old id to new id.
[11:13:52] iamninja: has joined #ruby
[11:14:17] [k-: I got a 404 :(
[11:14:19] BaconOverflow: has joined #ruby
[11:14:23] abyss: the problem is that I have to find all ids in line not only first id from array (id = ids.find), someone could help me in that?
[11:14:40] adaedra: remove the dot, [k-
[11:15:00] adaedra: ?gist_usage
[11:15:01] ruboto: To properly use gist, please enable syntax highlighting, either by choosing the language manually or by entering a proper filename. If you post multiple things, separate them into multiple files. If you have a Github account, please update your gist with new information instead of posting a new one.
[11:15:06] adaedra: ?gistusage
[11:15:06] ruboto: I don't know anything about gistusage
[11:15:18] adaedra: jhass, help me
[11:16:19] workmad3: ?gist-usage
[11:16:19] ruboto: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[11:16:22] workmad3: adaedra: :P
[11:16:42] adaedra: ruboto is slow today :(
[11:16:44] workmad3: oh wait, that looks like gist... and you already found gist_usage :D
[11:16:49] abyss: btw: it's to my code?;)
[11:16:58] rodferso1: has joined #ruby
[11:17:14] adaedra: yes, enable syntax coloring
[11:17:17] shevy: so many lines of ? bot fail, and nobdy answers this poor man's question
[11:17:48] sandstrom: has joined #ruby
[11:18:01] shevy: we have... .find .select .scan .grep we have everything man
[11:18:02] [k-: if you want to find many, use .select
[11:18:21] abyss: it's only 16 lines;p https://gist.github.com/anonymous/4a2dbf4babc1d007d6c0
[11:18:28] shevy: 16 lines!
[11:18:33] shevy: and you still don't have the solution...
[11:18:35] diegoviola: has joined #ruby
[11:18:55] shevy: I don't like this code
[11:19:09] abyss: shevy: I have but not so good I suppose because I wanted to add ids.each between 9 and 10 lines;)
[11:19:15] shevy: it would be better to separate the various concerns
[11:19:32] [k-: there is no proper indentation! *screams*
[11:19:45] shevy: oh but there is
[11:19:48] shevy: he indents with one space :)
[11:19:52] adaedra: yep, just replace your .find by .select and you'll get an array of all matches
[11:20:05] OrbitalKitten: has joined #ruby
[11:20:15] livcd: has joined #ruby
[11:20:48] abyss: adaedra: ok, but it wouldn't be better to add another line with select? If select is slower than find? Thank you.
[11:20:49] al2o3-cr: has joined #ruby
[11:21:04] k3asd`: has joined #ruby
[11:21:33] [k-: select is slower than find in the worst case scenario
[11:21:35] adaedra: abyss: they do different things. #find returns the first match (or nil), #select returns all the values which match your predicate in a new array.
[11:22:10] [k-: find and select are the same in the best case scenario :D
[11:22:12] adaedra: so instead of a if, maybe use a each
[11:22:43] abyss: yes, that why I wonder if it will be slower I mean maybe I should add another line beneath ids.find. if find something then put everything to array, or not?
[11:23:51] adaedra: I don't see well what you're trying to achieve
[11:24:25] abyss: adaedra: if I use each then always for each line the script will be try to add 1000 to id and try to change for each id (there's about 65000 ids;)), yes?
[11:24:54] adaedra: or you could just
[11:25:07] abyss: adaedra: I'd like to check each line in my file and if line contain one of the id (ids array) then add 1000 and change old value to new one.
[11:25:23] adaedra: .gsub!(/\b\d+\b/) { |n| n.to_i + 1000 }
[11:25:24] abyss: *add 10000
[11:25:31] adaedra: or something like that
[11:25:41] chthon: has joined #ruby
[11:26:03] [k-: regex is quite slow...
[11:26:07] bnagy: abyss: we gave you a bunch of ideas about optimising your regexp lookups, but doesn't look like you did any of it
[11:26:20] abyss: adaedra: I'm afraid I don't get this code;)
[11:26:43] adaedra: [k-: I don't know if it would be slower than what he's doing already
[11:26:47] User458764: has joined #ruby
[11:26:52] bnagy: another way might just be to convert ALL of the sub ids to a Hash, then get all the numbers out of each line instead
[11:27:05] [k-: yes bnagy!
[11:27:15] [k-: wait, sub ids?
[11:27:22] bnagy: so instead of checking for each possible subst if, you get the ids that are actually there, see if they're in to_substitute and then replace if so
[11:27:27] User458764: has joined #ruby
[11:27:40] endash: has joined #ruby
[11:27:45] bnagy: should change it from O n**2 to O n :/
[11:27:52] abyss: bnagy: yes, but I have different problem:) Sorry for that I didn't understand well how I should change it, so I left this one. It's works for me but only for the first occurrence
[11:27:54] bnagy: well O n*m
[11:28:21] [k-: arrays aren't really fast for that huge a number
[11:29:23] bnumfw: has joined #ruby
[11:29:30] bnagy: abyss: basically, instead of iterating ids for each input line, just turn that into a Hash
[11:29:48] [k-: you could use a set, that takes away the ugly solution of hash for you
[11:29:57] bnagy: then for each line, just get everything that might be an id
[11:30:17] bnagy: and see if a) there are any and b) if they are in the hash
[11:30:23] bnagy: that will be much lower order
[11:30:40] bnagy: [k-: set is just a hash in ruby, right?
[11:30:54] [k-: yes, its in the stdlib
[11:31:25] bnagy: ok well I don't think bikeshedding Set vs Hash is the main problem :)
[11:31:41] Zai00: has joined #ruby
[11:31:42] bnagy: compared to reducing it by a factor of ~ ids.size / 2 ;)
[11:31:43] abyss: adaedra: btw: this code: .gsub!(/\b\d+\b/) { |n| n.to_i + 1000 } As I said I can't change each number I have to change id from ids array:)
[11:32:01] abyss: bnagy: sorry for that but I don't get it how hashes will help me:(
[11:32:02] adaedra: you can add your condition in the block
[11:32:18] [k-: you can also do this: as you read the line, check if the id is in the hash, if not, insert it to the hash.
[11:32:31] bnagy: [k-: I don't think that's the problem
[11:32:50] [k-: but it would be faster :3
[11:32:56] bnagy: [k-: afaik the problem is "if any line has an id in $this_list, increase all those ids by 1000"
[11:33:06] [k-: he also wants it to be fast
[11:33:15] abyss: bnagy: exactly
[11:33:16] bnagy: so you don't need to modify your starting hit list
[11:33:24] adaedra: functional > fast
[11:33:39] [k-: of course, of course
[11:34:05] Rubie: has joined #ruby
[11:34:06] bnagy: basically my suggestion is: turn hit list into a hash, then for each line, get all things that might be ids, look up in hitlist, if they are there do gsub
[11:34:28] bnagy: so it's one scan per line, one lookup per scan result
[11:35:46] abyss: bnagy: now my script works something like this: if any line has an id in $this_list, increase first accurance of id by 1000 intead of all ids in line. Adding each after that find will add for each id 10000 even if that id doesn't accur in line :(
[11:35:57] [k-: I'm not sure how adding 10000 wouldn't result in another collision though
[11:36:22] ta: has joined #ruby
[11:36:35] bnagy: [k-: well presumably the initial list is defined like that, it's a DB dump where the ids were monotonically increasing I think
[11:36:39] abyss: yeah, you're not sure about that but I'm not sure what are you talking about ;)
[11:36:44] bnagy: but yes, you're right in theory :)
[11:37:15] bnagy: abyss: might one line contain more than one id from the replace_list ?
[11:37:22] abyss: bnagy: I have list of ids that I need to increase in my binlog file.
[11:37:29] rodfersou: has joined #ruby
[11:37:30] abyss: bnagy: yes , that's the problem
[11:37:39] [k-: by list you mean arrays?
[11:37:53] workmad3: [k-: it's fine as long as: 1) there's only a chance of 2 items having the same ID and 2) the largest id is < 10000 :)
[11:37:56] bnagy: ok then my thing still works, you just need to go through the found ids and use sub
[11:37:56] abyss: otherwise the script would be work fine
[11:39:02] Pupeno: has joined #ruby
[11:39:25] [k-: workmad3: I hope it is a one time only script then
[11:39:29] bnagy: basically say your scan for numbers in the line finds [20, 50, 20] you do found_ids.each {|id| if (replace=sub_list[id]; line.sub! id, replace; end } or something
[11:39:46] ldnunes: has joined #ruby
[11:39:52] bnagy: modulo syntax errors
[11:40:22] Iskarlar: has joined #ruby
[11:40:23] bnagy: you'll run twice for 20 there, but it's fine
[11:40:36] toretore: has joined #ruby
[11:40:41] bnagy: because it's still like 30000 times faster than what you have :)
[11:41:14] Zai00: has joined #ruby
[11:41:39] phat4life: has joined #ruby
[11:41:49] [k-: you shouldn't use arrays or regexp for 65000 things, that'll be super duper ultra mega slow
[11:41:50] MasterPiece: has joined #ruby
[11:42:26] bnagy: [k-: we had this a few days ago, and were suggesting using a Regexp.union
[11:42:28] DefV_: don't underestimate your computer
[11:42:37] bnagy: but the code has changed slightly
[11:42:55] bnagy: also, regexp is surprisingly fast :<
[11:43:03] shevy: ruby is fast!
[11:43:15] bnagy: I hate regexp and never use them, but when you're performance golfing regexp solutions do better than you'd expect
[11:43:20] shevy: once it'll become mruby
[11:43:21] bnagy: apart from the object creation
[11:43:26] OrbitalKitten: has joined #ruby
[11:43:34] dont: has joined #ruby
[11:43:43] abyss: bnagy: sorry:(
[11:44:03] DefV_: bnagy: why do you hate regexp?
[11:44:42] [k-: so... we don't need to optimise Ruby by hand? :D
[11:44:55] abyss: bnagy: I still don't know how to achieve that? First I need to find this 20,50, 20 , yes?;)
[11:45:30] abyss: no, I don't understand your code sorry
[11:45:32] [k-: abyss, show us what you have!
[11:45:38] platzhirsch: has joined #ruby
[11:45:54] abyss: I showed;p https://gist.github.com/anonymous/4a2dbf4babc1d007d6c0
[11:46:21] yeticry: has joined #ruby
[11:46:57] bnagy: abyss: https://gist.github.com/bnagy/c291f35afb8d27073972
[11:47:10] [k-: no, the new one...
[11:47:10] abyss: I know I could add between line 9 and 10 ids.each do |id| do and do everything between line 10 and 12 but i would be extremely slow:(
[11:47:12] bnagy: let's start with that. I didn't test anything so it will be buggy
[11:47:48] [k-: bnagy, you didn't indent properly!
[11:47:53] luciano__: has joined #ruby
[11:47:53] luciano__: has joined #ruby
[11:47:56] bnagy: DefV_: they rapidly become impossible to read, and people use them instead of parsing
[11:48:13] bnagy: [k-: I know, I just blatted it in the gist fork, sorry :/
[11:48:29] [k-: parsing is the only way to do things in Haskell and I don't know how to parse ;-;
[11:48:41] DefV_: bnagy: Good tests fix the impossible-to-read problem (for me)
[11:48:59] bnagy: how do tests make shit regexps less eyeburning?
[11:49:06] blackmesa: has joined #ruby
[11:49:22] bnagy: regexp is just a horrible language
[11:49:39] flughafen_: i love me some regex
[11:49:46] soulcake: has joined #ruby
[11:50:11] bnagy: abyss: do you get what I'm trying to do with that code?
[11:50:17] bougyman: bnagy: /x with comments :)
[11:50:30] abyss: bnagy: It wouldn't change each number I mean if in line is 78889 and I want to change 888 to 1888 it change 78889 to 718889 as well?
[11:50:52] DefV_: bnagy: most of the time regexes become complex when you try to catch different kinds of input and ignoring others
[11:51:02] bnagy: abyss: no, it will only change complete matches
[11:51:06] [k-: I think abyss is under a lot of stress
[11:51:09] nopolitica: has joined #ruby
[11:51:09] DefV_: bnagy: tests capture all the exceptions for which you've made your regexp complex
[11:51:48] yeticry: has joined #ruby
[11:51:49] abyss: [k-: yes;) Because we have really bad issue;) But how you uncover this?;)
[11:52:42] [k-: you said some nonsensical stuff which shows that you are facing a lot of stress
[11:52:42] abyss: and client is pissed off so I'm a bit stress because everybody in company looks at me;)
[11:52:59] abyss: [k-: uhhh, it maybe bacause of my english;)
[11:53:18] railsraider: has joined #ruby
[11:53:23] [k-: no, it's this: 195026 <abyss> bnagy: It wouldn't change each number I mean if in line is 78889 and I want to change 888 to 1888 it change 78889 to 718889 as well?
[11:53:50] quimrstorres: has joined #ruby
[11:54:02] [k-: no offense :D
[11:54:14] [k-: bnagy: time to swing some production code?
[11:55:07] abyss: [k-: uhh, because I did that;) in my script in line 9 and 11 I omitted \b \b and then it changed everything;) even that I mentioned 78889 to 718889 ;)
[11:55:11] bnagy: abyss: I updated it to fix a small bug
[11:55:29] bnagy: I am drinking beer so I won't swear 100% that it does what you want, but it lgtm
[11:56:27] bnagy: it's slightly inefficient if you have a lot of ids to replace per input line. If it's like one or two this approach is better imho
[11:56:43] abyss: bnagy: How I can list the whole code I can see only the first version:(
[11:56:47] bnagy: either way it's much more efficient than your code I think
[11:56:48] hoov: has joined #ruby
[11:56:56] bnagy: abyss: just refresh, it's gist
[11:57:30] abyss: hmmm I still see ids.each {|id| replace[id] = id.to_i + 1000} intead of +ids.each {|id| replace[id] = (Integer(id)+ 1000).to_s}
[11:57:43] [k-: :o there are multiple ids per line?
[11:58:00] abyss: [k-: yes, it's all fuss about;)
[11:58:10] bnagy: abyss: uh.. the second thing you said is the change
[11:58:34] bnagy: so if you can't see it, how did you know it was there? ;)
[11:58:34] jacor: has joined #ruby
[11:58:48] adaedra: that's why I proposed the gsub! above, got all changes in one line
[11:58:57] abyss: bnagy: yeah, but I cant see this in one file only when I click reviosions then I can see your changes - never mind;) I will stick it together:)
[11:59:00] bnagy: adaedra: the ideas can differ I think
[11:59:10] serivich: has joined #ruby
[11:59:24] bnagy: abyss: make sure you use my whole gist, I construct the hash completely differently
[11:59:38] bnagy: adaedra: s/ideas/ids/
[11:59:51] shevy: circle.rb:87:in `initialize': bignum too big to convert into `long' (RangeError)
[11:59:57] shevy: ruby does not let me count to Infinity :(
[11:59:58] bnagy: like I think a line can be like "DO SQL SHIT WITH 13, AND ALSO 15"
[12:00:23] bnagy: and we need to convert to "DO SQL SHIT TO 1013, AND ALSO 1015"
[12:01:10] droidburgundy: has joined #ruby
[12:01:37] adaedra: .gsub!(/\b\d+\b/) { |n| n.to_i + 1000 }
[12:01:40] djbkd: has joined #ruby
[12:01:44] adaedra: >> "DO SQL SHIT WITH 13 AND ALSO 15".gsub(/\b\d+\b/) { |n| n.to_i + 1000 }
[12:01:45] bnagy: you can't do that
[12:01:45] ruboto: adaedra # => "DO SQL SHIT WITH 1013 AND ALSO 1015" (https://eval.in/385458)
[12:02:00] bnagy: because you need to check each id to see if it's in the list to sub
[12:02:18] abyss: bnagy: lines could looks like: NSERT INTO codes (package_id,code,add_date,exp_date,licence_duration,students_licences,comment) VALUES ('1693', 'vvvv', 1443109600, 15381293600, '12', '1', NULL) and should looks like: NSERT INTO codes (package_id,code,add_date,exp_date,licence_duration,students_licences,comment) VALUES ('11693', 'vvvv', 1443109600, 15381293600, '1012', '1', NULL) or something, but lines could looks like: SET INSERT_ID=481699/*!*/; and it should l
[12:02:24] tvw: has joined #ruby
[12:02:45] abyss: bnagy: yes, exactly:)
[12:03:02] abyss: adaedra: I have list of ids (in array) that I want to change
[12:03:42] abyss: s/but lines could looks like/but lines could looks like
[12:03:50] abyss: s/but lines could looks like/but lines could also looks like/g
[12:04:06] adaedra: bnagy: add a if in the block
[12:04:08] shevy: your lines could look like
[12:04:18] adaedra: but that was only an idea, can be reworked
[12:04:31] olistik: has joined #ruby
[12:04:44] bnagy: abyss: in my code at the point where I'm doing sub! I'm using strings, not regexp, so it can't "overmatch" but it can undermatch :/
[12:05:15] bnagy: abyss: so it should probably be converted to a regex with boundary anchors
[12:06:07] bnagy: adaedra: gsub (without !) with a block would work
[12:06:22] unshadow: has joined #ruby
[12:06:25] bnagy: I just don't think it's any more efficient and it's harder to read (imho)
[12:06:37] otisZart: has joined #ruby
[12:06:45] bnagy: but my sub with a string is definitely buggy
[12:07:37] adaedra: Also, for the above hash, instead of storing all possible ids, just have a magic hash like h = Hash.new { |_, n| n + 1000 }
[12:08:00] bnagy: updated... how's that?
[12:08:09] abyss: adaedra: it's too complicated for me;p
[12:08:10] bnagy: adaedra: that's in my gist already ;)
[12:08:16] allenn: has joined #ruby
[12:08:17] adaedra: it sets base for unknown ids, and you can manually set replacements
[12:08:23] bnagy: https://gist.github.com/bnagy/c291f35afb8d27073972
[12:08:29] bnagy: oh.. like a default
[12:08:37] bnagy: no that's not going to work
[12:08:41] bnagy: because they're strings
[12:09:04] adaedra: I don't have the right gist then
[12:09:05] adaedra: abyss: no it isn't ;)
[12:09:33] bnagy: maybe I just don't know how updating gists works :|
[12:10:06] adaedra: then use strings ;)
[12:10:11] bnagy: adaedra: you can't have defaults like that for string values you have to use block form
[12:10:27] [k-_: has joined #ruby
[12:10:28] adaedra: >> h = Hash.new { |_, n| (n.to_i + 1000).to_s }; h[3] = 4; [ h[3], h[7] ]
[12:10:29] ruboto: adaedra # => [4, "1007"] (https://eval.in/385461)
[12:10:40] bnagy: and if you don't save them it's actually _less_ efficient
[12:10:44] hoov: has joined #ruby
[12:10:46] fabrice31: has joined #ruby
[12:10:57] adaedra: >> h = Hash.new { |_, n| (n.to_i + 1000).to_s }; h["3"] = "4"; [ h["3"], h["7"] ]
[12:10:58] ruboto: adaedra # => ["4", "1007"] (https://eval.in/385462)
[12:11:01] [k-_: the problem isnt solved yet? :(
[12:11:06] bnagy: which is why I did it the readable, simple way
[12:11:15] bnagy: [k-: it's solved, adaedra is just bikeshedding, badly
[12:11:30] [k-_: bikeshedding?
[12:11:32] adaedra: bnagy: they're saved at first lookup iirc
[12:11:33] adaedra: ah no, by bad
[12:11:40] skade: has joined #ruby
[12:11:56] flughafen: has joined #ruby
[12:11:57] abyss: please look at the example file that I want to modify: https://gist.github.com/anonymous/5c7ce3143f8756271cd8
[12:12:12] bnagy: abyss: did you try my updated gist?
[12:12:12] tlarevo_: has joined #ruby
[12:12:19] flughafen: yay! my computer froze while compile phantomjs
[12:13:06] abyss: bnagy: not yet:) I going to that, thank you:)
[12:13:46] adaedra: flughafen: congrats! your computer is now haunted
[12:13:57] canton7: has joined #ruby
[12:13:57] canton7: has joined #ruby
[12:14:00] bnagy: by javascript, at the very least
[12:14:46] jokke: has joined #ruby
[12:15:22] Iskarlar: has joined #ruby
[12:16:30] ndrei: has joined #ruby
[12:17:07] bnagy: adaedra: you can use your form if you Hash.new {|h,k| h[k] = ...
[12:17:51] bnagy: but since we have to read the target id file it's not really possible to make it truly lazy imho
[12:18:24] adaedra: I thought it added it on lookup :/
[12:18:25] CloCkWeRX: has joined #ruby
[12:18:55] sandstrom: has joined #ruby
[12:19:00] adaedra: with a merge?
[12:19:48] sinkensabe: has joined #ruby
[12:19:49] adaedra: I should go to eat, it's 14h already :x
[12:20:03] sinkensabe: has joined #ruby
[12:20:06] rodfersou: has joined #ruby
[12:20:53] edwinvdg_: has joined #ruby
[12:20:54] Palmer11: has joined #ruby
[12:21:08] bnagy: well it will if you set it in the block, but not when you _ the hash param in the block
[12:21:36] bnagy: I should eat also! \o/ EVERYBODY EAT
[12:22:10] Blaguvest: has joined #ruby
[12:22:21] shevy: flughafen hey, do you have working clocks in the berlin flughafen
[12:22:36] flughafen: shevy: no, it's stuck on lunch time
[12:22:40] flughafen: since 4 years
[12:23:06] edwinvdg_: has joined #ruby
[12:23:11] gagrio: has joined #ruby
[12:25:03] bronson: has joined #ruby
[12:25:07] ahmetkapikiran: has joined #ruby
[12:26:37] rbennacer: has joined #ruby
[12:30:35] Zai00: has joined #ruby
[12:31:14] arup_r: has joined #ruby
[12:32:09] abyss: bnagy: I get: 10: undefined local variable or method `lookup' for main:Object (NameError
[12:32:09] wildroman3: has joined #ruby
[12:32:34] [k-_: huehuehue
[12:32:50] havenwood: has joined #ruby
[12:33:12] flughafen: ACTION see's if phantomjs compiles without freezing ze computer
[12:33:41] afrianska: has joined #ruby
[12:33:58] shevy: [Some Time Later ...]
[12:34:02] shevy: damn it, the flughafen in berlin is down again
[12:34:50] hamster88: has joined #ruby
[12:35:32] [k-_: why is replace being assigned in the if statement anyway
[12:35:44] [k-_: i thought u guys use rubocop ;-;
[12:35:56] Rapier-: has joined #ruby
[12:36:51] abyss: [k-_: you're talking about my issue?;)
[12:37:04] [k-_: abyss, firstly change replace = lookup[id] into replace == lookup[id]
[12:37:27] timonv: has joined #ruby
[12:39:00] [k-_: bnagy, there seems to be another logical error
[12:39:16] jimms: has joined #ruby
[12:40:37] abyss: I thought it would be easier to do that;) I'm not sure what we're doing in bnagy script (why hash for example)
[12:40:53] [k-_: abyss, explain your problem again?
[12:41:09] [k-_: ids_to_change_all_uniq, is that the list of ids to change?
[12:41:26] abyss: [k-_: example file: https://gist.github.com/anonymous/5c7ce3143f8756271cd8
[12:41:26] ponga: has joined #ruby
[12:41:28] segfalt: has joined #ruby
[12:41:34] abyss: [k-_: yes
[12:41:41] strixd: has joined #ruby
[12:42:08] [k-_: then there isnt a logical error then actually
[12:42:30] abyss: [k-_: I'd like to check each line if contain one of the id from array if yes then increase id to change about 1000 and replace old value with new one
[12:42:35] strixd: has joined #ruby
[12:43:04] abyss: for example I have line: SET INSERT_ID=283418/*!*/; I want: SET INSERT_ID=284418/*!*/;
[12:43:16] abyss: I have line: UPDATE codes SET code='MKGB47B7', status=1, students_licences='1', licences_used='0', unlock_date=1433421747, licence_till=1465044147, user_id='21465', school_id='14363', comment='Nsomethisdfvklas fjs kasldf jasf asid.' WHERE id='46923'
[12:43:23] abyss: SET INSERT_ID=283418/*!*/;
[12:43:28] abyss: SET INSERT_ID=21477/*!*/;
[12:43:30] abyss: INSERT INTO `user` (^M
[12:43:30] strixd: has joined #ruby
[12:43:35] abyss: password,^M
[12:43:38] abyss: password_salt,^M
[12:43:40] abyss: role_id,^M
[12:43:43] abyss: firstname,^M
[12:43:45] abyss: lastname,^M
[12:43:49] OrbitalKitten: has joined #ruby
[12:43:50] abyss: processallow,^M
[12:43:53] abyss: allow_remind_email,^M
[12:43:55] abyss: created,^M
[12:43:58] abyss: sso_id,^M
[12:44:01] redlegion: Holy paste to channel
[12:44:03] abyss: trial_period_date,^M
[12:44:04] ruboto: +q abyss!*@*
[12:44:04] ruboto: -o ruboto
[12:44:12] flughafen: sevenseacat to the rescut
[12:44:21] [k-_: this will only take a moment
[12:44:23] strixd: has joined #ruby
[12:44:25] flughafen: rescue* .. you were so fast you wouldn't even think you wear an eye-patch
[12:44:53] Xeago: has joined #ruby
[12:46:51] phutchins: has joined #ruby
[12:47:43] rafaelsales: has joined #ruby
[12:48:14] [k-_: he is done now
[12:48:24] [k-_: he can be unmuted
[12:48:53] sevenseacat: !unmute abyss
[12:48:53] ruboto: -q abyss!*@*
[12:48:53] ruboto: -o ruboto
[12:49:12] abyss: thank you. Sorry again for that.
[12:49:24] Hanmac1: has joined #ruby
[12:49:38] sgambino: has joined #ruby
[12:49:41] ruboto: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[12:50:14] [k-_: so what is the purpose of ids_to_change_all_uniq?
[12:50:36] abyss: [k-_: so, there's all ids I need to change
[12:50:43] abyss: *there're
[12:50:49] [k-_: ah, so it contains all the ids you need to change
[12:51:08] abyss: wow, my english have to be really bad :D Sorry.
[12:51:37] [k-_: do you have an example of a line of yshop_14-megaslice?
[12:52:08] Al3ks: has joined #ruby
[12:52:28] Papierkorb: has joined #ruby
[12:52:48] abyss: I gave one: https://gist.github.com/anonymous/5c7ce3143f8756271cd8 an excerpt
[12:53:02] flughafen: shevy: no freezing, flughafen is still no open for business
[12:53:05] abyss: it's bunch of sqls + SET INSERT_ID
[12:53:15] [k-_: wait, so that is yshop_14-megaslice?
[12:53:21] luciano__: has joined #ruby
[12:54:39] abyss: [k-_: errr yes:)
[12:54:51] Xeago: has joined #ruby
[12:55:27] abyss: id_to_change_all_uniq - list of ids; dump-to-database-yshop - file where to write; yshop_14-megaslice - file I wanted to change
[12:55:46] renderful: has joined #ruby
[12:55:49] Hanmac1: has joined #ruby
[12:56:25] [k-_: your code will be horrible to maintain ;)
[12:56:43] stardiviner: has joined #ruby
[12:56:50] symm-: has joined #ruby
[12:57:14] OrbitalKitten: has joined #ruby
[12:58:17] abyss: [k-_: Now I need just to work this;)
[12:58:55] duoi: has joined #ruby
[13:00:02] [k-_: wait a moment, writing code :D
[13:01:30] adaedra: [k-_: you won an underscore?
[13:03:03] [k-_: yes, my client blessed me with it
[13:03:05] yh: has joined #ruby
[13:03:14] OrbitalKitten: has joined #ruby
[13:03:53] umgrosscol: has joined #ruby
[13:04:20] rafaelsales: has joined #ruby
[13:04:28] flughafen: has joined #ruby
[13:04:38] atomical: has joined #ruby
[13:04:54] musgravejw: has joined #ruby
[13:05:05] thelastinuit: has joined #ruby
[13:07:06] Papierkorb_: has joined #ruby
[13:09:05] afrianska: has joined #ruby
[13:10:22] malconis: has joined #ruby
[13:10:44] [k-_: https://gist.github.com/SkyBirdSoar/6948924e4e39c9140804
[13:10:49] [k-_: does this work?
[13:11:24] fabrice31_: has joined #ruby
[13:11:26] dANO-: has joined #ruby
[13:11:28] malconis: has joined #ruby
[13:12:08] vasilakisFiL: has joined #ruby
[13:12:59] Xeago_: has joined #ruby
[13:13:43] atom3: has joined #ruby
[13:14:17] griffindy: has joined #ruby
[13:14:20] abyss: [k-_: I get: :18:in `+': can't convert Fixnum into String (TypeError)
[13:14:40] shevy: I just came back to see that sevenseacat has once again saved this channel
[13:14:47] abyss: it's def where is: id + 1000
[13:15:11] sevenseacat: so here i come to save the day, a regular joe now on parade
[13:15:27] [k-_: i updated the gist
[13:15:29] [k-_: try that
[13:15:36] thiagovsk: has joined #ruby
[13:16:44] havenwood: No more rhymes now I mean it... Anybody wanna peanut?
[13:18:06] yqt: has joined #ruby
[13:18:15] dblessing: has joined #ruby
[13:18:32] shevy: a peanut in my hut
[13:18:47] dorei: has joined #ruby
[13:19:15] [k-_: look shevy! i coded!
[13:19:38] Scripore: has joined #ruby
[13:20:44] abyss: [k-_: I'm checking... It has done its job too fast;p Something is suspicious;)
[13:20:59] adaedra: I can code too
[13:21:00] adaedra: puts "Hello"
[13:21:11] [k-_: yay adaedra can code too
[13:21:37] shevy: [k-_ yeah
[13:21:44] shevy: [k-_ but you did not write code for yourself
[13:21:52] shevy: you just help other people write code :(
[13:21:58] whippythellama: has joined #ruby
[13:22:23] [k-_: i help other people write code to make myself happy
[13:22:48] [k-_: does that count?
[13:23:09] shevy: I don't know
[13:23:19] shevy: it seems fishy
[13:23:38] [k-_: i managed to get into insert mode in vim!
[13:23:38] [k-_: i dont know how i did it, but i did it!
[13:24:37] sdothum: has joined #ruby
[13:24:42] Thenews: has joined #ruby
[13:24:51] zeroDivisible: has joined #ruby
[13:25:45] seansith: has joined #ruby
[13:25:52] abyss: [k-_: it's extremely fast in comparison to my script - your - 5sec, my: 160min ;p
[13:25:56] e1nh4nd3r: has joined #ruby
[13:26:06] [k-_: it works?
[13:26:10] quimrstorres: has joined #ruby
[13:26:10] abyss: but it's doesn't work in some cases, instead of figures I get NULL
[13:26:18] e1nh4nd3r: has joined #ruby
[13:26:35] [k-_: do you have the line?
[13:26:37] scx: has joined #ruby
[13:27:00] Thenews: www.VALBOT.com provides domain valuations. Reporting globally on Site Traffic, Pagerank, Malware, WHOIS data, SEO & even Social Media presence.
[13:27:01] jespada: has joined #ruby
[13:27:15] kenpoint: has joined #ruby
[13:27:19] nopolitica: has joined #ruby
[13:27:26] abyss: [k-_: see the line: https://gist.github.com/anonymous/2edce6b1b49f842aef7a
[13:27:31] transiency: has joined #ruby
[13:27:31] apeiros: !kick Thenews
[13:27:31] helpa: apeiros: No.
[13:27:32] ruboto: ruboto kicked Thenews:
[13:27:32] ruboto: -o ruboto
[13:27:45] apeiros: f'ing asshole :-(
[13:28:08] jhass: sadly no pattern in the hostmask at all :/
[13:28:32] apeiros: I wish irc allowed pre-screening of messages
[13:28:38] afrianska: has joined #ruby
[13:28:42] [k-_: are we supposed to change INSERT_ID only?
[13:28:47] jhass: eh, would you really want to do that?
[13:28:52] abyss: [k-_: so the everything changed to NULL execpt last one where it increase right
[13:28:56] [k-_: apeiros, that would be moderating then
[13:29:01] devdazed: has joined #ruby
[13:29:04] flughafen: apeiros: make all messages go through ruboto
[13:29:10] jhass: apeiros: the mode would be to set +z and voice people...
[13:29:21] abyss: [k-_: no, each accurance of id in ids array
[13:29:24] jhass: aka #ruby-pro
[13:29:26] khebbie: has joined #ruby
[13:29:39] abyss: so we have to change INSERT_ID and each reference
[13:30:00] atom3_: has joined #ruby
[13:30:00] ruboto: fflush, apeiros, banisterfiend, seanstickle, Mon_Ouie, zzak, Radar, Havenn, jhass, sevenseacat, miah, workmad3, Coraline, drbrain, zenspider, slyphon, rubyhacker1, Aria, ljarvis
[13:30:14] havenwood: adaedra: hey
[13:30:15] [k-_: abyss but you have a lot of numbers @.@
[13:30:26] abyss: [k-_: errr yes:)
[13:30:45] abyss: that why I was suprised when your script finished so fast;)
[13:30:57] abyss: my scrpt lasted about 160min
[13:31:16] bnagy: abyss: oh, yeah it was just a bug, lookup should have been ids
[13:31:31] bnagy: or vice versa
[13:31:35] abyss: lookup = ids?
[13:31:44] [k-_: abyss, you should try using a diff checker with the expected result and the script's result
[13:31:58] bnagy: you got a local variable error right?
[13:32:07] flughafen: ACTION is leaving work, see you guys later
[13:32:26] bnagy: I did say I didn't actually run it :)
[13:32:29] abyss: [k-_: I did that, that why I can see it's not good:)
[13:32:50] abyss: bnagy: yes, and you said you're drinking beer as well:)
[13:32:56] ziprar: has joined #ruby
[13:32:56] ziprar: has joined #ruby
[13:33:08] Aria: Yes, adaedra?
[13:33:11] bnagy: it's just that I called the lookup hash ids when I set it up instead of lookup :/
[13:33:22] adaedra: apeiros: I think it's possible to automatically k-line on patterns
[13:33:27] [k-_: can i assume all ids are in the form ID=000000 or id='000000'
[13:33:34] adaedra: but that's server-level :/
[13:33:42] abyss: [k-_: nope;)
[13:34:09] [k-_: https://gist.github.com/SkyBirdSoar/6948924e4e39c9140804 try this
[13:34:17] adaedra: znc, what are you doing
[13:34:25] k3asd`: has joined #ruby
[13:34:33] abyss: [k-_: look here: https://gist.github.com/anonymous/5c7ce3143f8756271cd8 and look at that long INSERT, we can't assume that
[13:34:35] bnagy: [k-_: not a fan of your code
[13:34:50] bnagy: [k-_: not a fan of your code
[13:34:54] abyss: bnagy: errrr, what I should to change?;)
[13:34:58] bnagy: ugh sorry client
[13:35:06] narcan: has joined #ruby
[13:35:15] Rubie: has joined #ruby
[13:35:15] [k-_: is my code horrid ;-;
[13:35:32] bnagy: abyss: just make the names of the lookup hash match - either change both to lookup or both to ids
[13:35:32] ahmetkapikiran: has joined #ruby
[13:35:39] adaedra: has joined #ruby
[13:35:47] bnagy: [k-_: well I don't inherently mind using Set
[13:36:06] bnagy: but when you have to make a method call in each replace then it seems simpler and faster just to use a Hash in the first place
[13:36:09] adaedra: what the hell
[13:36:46] bnagy: like.. I think you fell in love with the idea of Set and then didn't reconsider
[13:36:47] [k-_: but hash []= is also a method call
[13:36:56] rbennacer: has joined #ruby
[13:36:57] imanzarrabian: has joined #ruby
[13:36:59] Xeago: has joined #ruby
[13:37:23] [k-_: and my code only calls change_id when it is needed
[13:37:24] bnagy: but you have to call change_id
[13:37:28] tedstriker: has joined #ruby
[13:37:32] [k-_: it doesnt add +1000 to everything
[13:37:41] bnagy: any time there is more than one change per line I win
[13:37:51] arup_r: has joined #ruby
[13:38:00] [k-_: method calls are indeed expensive
[13:38:13] [k-_: I can use a lambda, yes?
[13:38:14] tedstriker: has joined #ruby
[13:38:18] [k-_: worst case is to inline it
[13:38:21] bnagy: why not just not use a set?
[13:38:35] bnagy: do you get paid per line of code, or what?
[13:38:39] abyss: [k-_: why it's so fast!;)
[13:39:05] adaedra: ok, sorry about earlier Aria havenwood ??? I was responding to Thenews message, but something in my connection delayed the message
[13:39:21] abyss: [k-_: hmm I still get NULL in that updates
[13:39:25] [k-_: if i get paid per minute i would write abyss's code immediately
[13:39:28] devdazed: has joined #ruby
[13:39:32] apeiros: adaedra: the problem is that those are still post-fact
[13:39:50] adaedra: apeiros: which ones?
[13:40:19] abyss: [k-_: you've said that is just fun;p
[13:40:34] apeiros: adaedra: kline on pattern
[13:40:50] adaedra: Grmbl, maybe if FreeNode was not routing me through Chicago I wouldn't lag so much >_>
[13:41:31] arup_r: has joined #ruby
[13:41:32] apeiros: [k-_, flughafen, jhass: I mean I'd want a mode where a service has to approve of messages and/or users. i.e. message gets first sent to service, service returns accept/reject, on accept, message is sent from the original sender to the channel/user
[13:41:33] [k-_: it shouldn't replace the numbers with null ;-;
[13:41:33] rbennacer: has joined #ruby
[13:41:39] adaedra: apeiros: I think I saw it work on message send ??? so nothing was send. But that may depend on the server.
[13:42:02] [k-_: i saw something like that before adaedra
[13:42:14] [k-_: services provided a filter list
[13:42:15] abyss: [k-_: it's works for you?
[13:42:23] [k-_: no i didnt run it
[13:42:24] bnagy: [k-_: your sub is wrong in the last gist I think
[13:42:38] undeadaedra: has joined #ruby
[13:42:38] abyss: bnagy: I've changed lookup to ids, yes?
[13:43:09] bnagy: I think it has the same inside match bug mine had.. like your sub will incorrectly sub 888 inside 1888
[13:43:32] endash: has joined #ruby
[13:43:36] bnagy: I think you need to sub it with anchors
[13:43:40] GreatSUN: one question about documentation (yard or general)
[13:43:46] bnagy: abyss: should be all you need, yeah
[13:44:02] djellemah: has joined #ruby
[13:44:06] GreatSUN: if you have a parameter *attrs to gather all attributes as array
[13:44:15] bnagy: abyss: but either of these should work for you, they're pretty close to equivalent
[13:44:24] GreatSUN: how would you document that? is there some standard/default for this?
[13:44:27] bnagy: just small bugs left to fix
[13:44:37] abyss: bnagy: yes, I trying all :)
[13:44:51] shevy: I feel so lonely... who is writing in ruby-gnome
[13:44:58] blackmesa: has joined #ruby
[13:45:12] [k-_: sub with anchors?
[13:45:27] abyss: but [k-_ is very, very fast, but change some figures into NULL instead of increasing about 1000
[13:45:57] [k-_: pls wait while i steal some code
[13:46:03] dg-ratio1: has joined #ruby
[13:46:40] abyss: bnagy: 13:in `[]': can't convert String into Integer (TypeError
[13:46:51] [k-_: i updated the gist
[13:47:01] abyss: bnagy: it's a line: if (replace = ids[id])
[13:47:10] MatthewsFace: has joined #ruby
[13:47:17] adaedra: has joined #ruby
[13:47:17] NeverDie: has joined #ruby
[13:47:38] afrianska: has joined #ruby
[13:47:43] [k-_: bnagy: _replace = replace[id]
[13:47:58] adaedra: Ume?? ??? Should be better
[13:48:17] soulcake: has joined #ruby
[13:49:01] denver: has joined #ruby
[13:49:09] bnagy: abyss: that doesn't make sense, gist the whole thing you're trying
[13:49:19] soulcake: has joined #ruby
[13:49:42] bohallor: has joined #ruby
[13:49:53] abyss: bnagy: gimme a sec please
[13:49:55] coderhs: has joined #ruby
[13:49:57] [k-_: bnagy, its ur code haha
[13:50:09] bnagy: because that's not my linre 13 :)
[13:50:18] freerobby: has joined #ruby
[13:50:24] casadei: has joined #ruby
[13:50:26] abyss: bnagy: yeah I've added #! to script;p
[13:50:26] [k-_: he probably added some comments i hope
[13:50:33] abyss: [k-_: yes
[13:51:30] bnagy: oic.. when you changed it you changed lookup to ids
[13:51:33] bnagy: ids is an array
[13:51:51] abyss: [k-_: don't be angry... But I'm using ruby 1.8, sorry;)
[13:51:52] bnagy: if replace = replace[id]
[13:52:00] [k-_: omy 1.8?
[13:52:08] bnagy: possibly a poor choice of variable name :/
[13:52:14] adaedra: Here's your problem
[13:52:26] [k-_: bnagy then the hash will disappear
[13:52:35] [k-_: which was why i suggested _replace = replace[id]
[13:52:37] abyss: yeah, I do everything on server, and server has old ruby
[13:52:48] abyss: change_id-2:17: syntax error, unexpected '>'
[13:52:49] abyss: change_id = -> (id) { id + 1000 }
[13:52:50] bnagy: https://gist.github.com/bnagy/c291f35afb8d27073972
[13:53:17] hagabaka: has joined #ruby
[13:53:33] bnagy: abyss: honestly, you should be able to fix those kind of trivial bugs yourself :|
[13:53:45] [k-_: 1.8 doesnt have lambda literals ;-;
[13:54:05] adaedra: 1.8 has one thing: expiration.
[13:54:18] havenwood: adaedra: ah, thanks!
[13:54:32] [k-_: badumtss!
[13:54:32] adaedra: thanks to what?
[13:54:42] [k-_: abyss: change it to change_id = lambda { |id| id + 1000 }
[13:54:55] cpruitt: has joined #ruby
[13:54:59] havenwood: adaedra: the ping, now i'm late ;)
[13:55:15] quimrstorres: has joined #ruby
[13:55:20] adaedra: yeah, would have been better without network issues >_>
[13:55:33] [k-_: do you have special late privileges by any chance ;)
[13:55:48] musgravejw: has joined #ruby
[13:56:23] dross: has joined #ruby
[13:56:58] abyss: bnagy: you want leave me alone, I fight with this for 3 days, not only with script but whole this bunch of duplications in binlogs etc - my wise and intelligence decrease to 60;)
[13:57:05] TinkerTyper: has joined #ruby
[13:57:21] abyss: [k-_: change_id = lambda { |id| id + 1000 } , get: undefined method `change_id' for main:Object (NoMethodError)
[13:57:25] michael_mbp: has joined #ruby
[13:58:18] commondream: has joined #ruby
[13:58:27] [k-_: i updated the gist again
[13:58:59] davedev24_: has joined #ruby
[13:59:26] yoongkang: has joined #ruby
[14:00:26] skysploit: has joined #ruby
[14:01:25] revath: has joined #ruby
[14:01:25] skysploit: has joined #ruby
[14:01:34] jerius: has joined #ruby
[14:01:36] abyss: [k-_: I still get NULLs :(
[14:02:04] [k-_: do you get nulls on bnagy's?
[14:02:18] abyss: bnagy code doesn't work for me
[14:02:50] [k-_: i stole the sub code from him!
[14:03:03] [k-_: pls wait while i try to go interactive
[14:03:10] bnagy: abyss: in what way? What's the error from the latest gist?
[14:03:10] abyss: undefined local variable or method `replace' for main:Object (NameError) - but I was afraid to show this because he would beat me that it's easy to repair
[14:03:46] bnagy: oh, well change it in line 3 :|
[14:03:57] enebo: has joined #ruby
[14:04:10] lordkryss: has joined #ruby
[14:04:21] bnagy: but seriously 0_o
[14:04:48] abyss: bnagy: yeah, but I'm not sure what your code do, so I'm not sure if I thought righ to change it, Why hash for example ;)
[14:04:59] bnagy: abyss: ok well I'm out
[14:05:10] bnagy: it doesn't seem like you can actually code at all
[14:05:13] [k-_: abyss: the reason why we give you code is for you to learn from it ;-;
[14:05:19] bnagy: so this isn't really a programming question any more
[14:05:52] ta: has joined #ruby
[14:06:03] abyss: bnagy: Your patience has been exhausted by me?:(
[14:06:10] bnagy: abyss: yes
[14:06:39] imanzarrabian: has joined #ruby
[14:06:40] hutch78: has joined #ruby
[14:06:51] bnagy: the last bug was between lines 2 and 3. If you can't figure that out for yourself then you're not programming
[14:06:59] mister_solo: has joined #ruby
[14:07:11] abyss: yeah, ok sorry for that, it's my bad, I spent 3 days on it (not only that script) everybody looks at me I have knife on my neck and I stopped thinking - my bad.
[14:07:28] bnagy: I mean I apologise for my code that I'm typing untested into gist not working perfectly
[14:07:33] bnagy: that bit is clearly my fault
[14:07:45] soulcake: has joined #ruby
[14:08:49] abyss: [k-_: yes, I know, people from this channel help me many times and I learn a lot (not only ruby, but programming :)) it's my bad that I turn off thinking its because all that circumstances :/
[14:09:03] podman: has joined #ruby
[14:09:26] shevy: now you two make out and kiss and we can move on
[14:09:38] abyss: three of us
[14:09:47] datanoise: has joined #ruby
[14:09:51] shevy: that's illegal
[14:09:54] shevy: in some US states
[14:10:03] abyss: err bnagy [k-_ and me?;)
[14:10:26] emhs: abyss: Out of experience, don't let yourself being overrun by requests. Sure people want their fixes and quick, but the more stress you put on yourself, the more likely you'll be making a lot of mistakes.
[14:10:31] mallu: has joined #ruby
[14:11:05] abyss: _mh_: yes, sometimes live isn't so easy;)
[14:11:32] adaedra: <shevy> in some US states
[14:11:33] soulcake: has joined #ruby
[14:11:38] adaedra: since when the US law is a reference?
[14:11:45] shevy: since TTIP
[14:12:11] bnagy: since BIS! \o/
[14:12:19] terlar: has joined #ruby
[14:12:26] msnyon: has joined #ruby
[14:12:41] emhs: abyss: I sure as well know. But sometimes it takes a ping to take a step back, take a deep breath and realize work's going to take the time and rushing it does more harm then good.
[14:12:54] adamjleonard: has joined #ruby
[14:13:17] abyss: [k-_: yes I get NULLs with bnagy code as well.
[14:14:40] davedev24: has joined #ruby
[14:15:13] shevy: guys you are not programming
[14:15:16] shevy: this is programming:
[14:15:17] shevy: http://ww3.hdnux.com/photos/07/00/07/1835478/11/1024x1024.jpg
[14:15:29] abyss: _mh_: additionally ofcourse I have other tasks on me so it double my stress;)
[14:15:41] abyss: shevy: ;)
[14:15:47] dopie: has joined #ruby
[14:15:54] abyss: I've never said I'm a programmer;p
[14:16:04] ValicekB: has joined #ruby
[14:16:32] JakFrist: has joined #ruby
[14:16:37] [k-_: abyss, you have any versions other than 1.8?
[14:16:57] bnagy: abyss: I don't know what you mean by NULLs. What bug causes that? Obviously the code can't ever literally insert NULL
[14:17:19] abyss: bnagy: https://gist.github.com/anonymous/2edce6b1b49f842aef7a this is an example
[14:17:35] [k-_: i think it is caused by File#print of nils
[14:18:26] Al3ks: has joined #ruby
[14:18:26] bnagy: I don't think print can do that
[14:18:37] bnagy: abyss: what is that example from?
[14:18:40] Scrofff: has joined #ruby
[14:18:44] abyss: [k-_: I can move everything to my server, here I have ruby 2.x
[14:19:01] bnagy: is that a direct paste from file2?
[14:19:07] abyss: bnagy: the first line is the original file the second is modyfied by your script
[14:19:11] abyss: bnagy: yes
[14:19:15] fabrice31: has joined #ruby
[14:19:28] jpfuentes2: has joined #ruby
[14:19:37] bnagy: maybe this is some 1.8 thing I forgot
[14:20:37] abyss: errr, meeting to say about my pogress... brb ;)
[14:20:52] _ixti_: has joined #ruby
[14:20:53] [k-_: abyss: it works well on mine
[14:21:07] [k-_: i have ruby 2.2.0
[14:21:09] Rollabunna: has joined #ruby
[14:21:19] wildroman2: has joined #ruby
[14:21:22] [k-_: dun dun dun
[14:21:25] shevy: you are the man
[14:21:27] shevy: >> RUBY_VERSION
[14:21:28] [k-_: now he went for a meeting
[14:21:28] ruboto: shevy # => "2.2.0" (https://eval.in/385546)
[14:21:33] shevy: like the bot
[14:21:41] [k-_: yes i am updated!
[14:22:20] [k-_: i have 2.2.0p0 to be precise
[14:23:20] freerobby: has joined #ruby
[14:23:35] mbeasley_: has left #ruby: ("WeeChat 0.4.2")
[14:23:40] axl__: has joined #ruby
[14:23:54] adaedra: we are at 2.2.2 now no?
[14:24:23] shevy: ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
[14:24:24] adaedra: I've 2.2.2p95
[14:24:32] DoubleMalt: has joined #ruby
[14:24:41] shevy: someone update the bot!
[14:24:45] adaedra: yes, exactly like shevy, except the platform
[14:24:55] ahmetkapikiran: has joined #ruby
[14:25:56] shevy: you are not on linux?
[14:26:03] flughafe2: has joined #ruby
[14:26:12] shevy: you make matz sad
[14:26:13] [k-_: abyss: It works well on mine, on ruby 2.2.0. Files I used are all included here: https://gist.github.com/SkyBirdSoar/6948924e4e39c9140804
[14:26:30] [k-_: ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]
[14:26:33] adaedra: even if I've a linux at hand
[14:26:43] c355E3B: has joined #ruby
[14:26:55] AvidChronos: has joined #ruby
[14:27:13] adaedra: I may have had one if I has found my USB stick
[14:27:18] adaedra: Have you seen it?
[14:28:42] vasilakisFiL: has joined #ruby
[14:28:45] [k-_: i really dont have any patience for finding things
[14:30:23] GitGud: has joined #ruby
[14:30:27] shevy: find what?
[14:30:34] shevy: you mean reallife objects?
[14:30:37] shevy: or documentation :)
[14:30:56] adaedra: google.tld is here for documentation
[14:31:01] adaedra: guess I need a google.irl
[14:31:14] downwithbender: has joined #ruby
[14:31:17] [k-_: real life objects
[14:31:57] mary5030: has joined #ruby
[14:32:19] bogdanteleaga: has joined #ruby
[14:32:27] downwithbender: has joined #ruby
[14:34:20] bohallor: does the ruby interpreter v. 2.2 every use threads when a programmer does *not* use the ruby Thread class?
[14:34:28] bohallor: *ever use sorry
[14:34:48] droidburgundy: has joined #ruby
[14:35:03] bougyman: i mean, a lib you require could be doing it without your knowledge, I guess.
[14:35:07] [k-_: doesnt io spawn threads
[14:35:10] JoshL: has joined #ruby
[14:35:26] Scroff: has joined #ruby
[14:35:38] mhi^: has joined #ruby
[14:35:53] revath: has joined #ruby
[14:36:00] Synthead: has joined #ruby
[14:36:05] emhs: If I remember correctly the main context is handled as a thread and, as [k-_ mentioned, IO likely is using threads as well.
[14:36:28] Kricir: has joined #ruby
[14:36:31] Rubie: has joined #ruby
[14:36:36] [k-_: >> Threads.current
[14:36:37] ruboto: [k-_ # => uninitialized constant Threads (NameError) ...check link for more (https://eval.in/385550)
[14:36:43] [k-_: >> Thread.current
[14:36:44] ruboto: [k-_ # => #<Thread:0x41bf5a54 run> (https://eval.in/385551)
[14:36:54] _ixti_: has joined #ruby
[14:37:00] soulcake: has joined #ruby
[14:37:16] bnagy: well there has to be at least one thread
[14:37:24] jespada: has joined #ruby
[14:37:44] [k-_: his question was *ever* :3
[14:37:52] soulcake: has joined #ruby
[14:37:52] bnagy: I didn't know IO would create more though, I thought all that stuff just blocked the main thread
[14:38:07] [k-_: no, no, no
[14:38:18] [k-_: ruby is smart enough to have async io :D
[14:38:26] bnagy: no it's not
[14:38:37] [k-_: or non-blocking io
[14:38:42] [k-_: whatever the correct term is
[14:38:43] bnagy: also false premise
[14:38:46] adaedra: when was the syntax for named arguments introduced?
[14:38:55] [k-_: 2.0 i think
[14:39:00] emhs: 2.1, I believe
[14:39:02] jhass: 2.0 for optional, 2.1 for required ones iirc
[14:39:50] kobain: has joined #ruby
[14:40:16] Pupeno: has joined #ruby
[14:40:34] dudedudeman: 'marnin to you all
[14:40:37] mikecmpb_: has joined #ruby
[14:41:01] l0oky: has joined #ruby
[14:41:06] bohallor: thanks guys. so only multi-threaded during IO. and the main thread waits or tries to continue? eg loading a Ruby script with ./ruby helloworld.rb or require etc.
[14:41:07] kahuna_: has joined #ruby
[14:41:13] l0oky: unless keyword in ruby is so confusing
[14:41:31] [k-_: yes l0oky, we all agree :)
[14:41:34] havenwood: l0oky: It's like unless in real life.
[14:41:42] l0oky: can someone enlighten me hehe
[14:41:50] havenwood: l0oky: this unless that
[14:41:53] adaedra: [k-_: no I don't
[14:42:04] l0oky: unless i don't have 'this'
[14:42:20] emhs: bohallor: Your question is about 'default' parallel execution of code?
[14:42:29] [k-_: adaedra has acheived nirvana!
[14:42:50] PapaSierra: has joined #ruby
[14:43:01] bnagy: bohallor: not even multi-threaded during io
[14:43:02] bohallor: yes. default unmodified ruby 2.2, but just running (what appears to be) sequential ruby code.
[14:43:06] mary5030: has joined #ruby
[14:43:16] l0oky: unless current_user.activated? doesn't contain 'this'
[14:43:21] Scripore: has joined #ruby
[14:43:36] emhs: bohallor: Top down, no hidden paralell executions
[14:43:39] bnagy: l0oky: "if not"
[14:43:59] [k-_: just use if not
[14:44:07] bnagy: nono use unless
[14:44:11] l0oky: yeah but rubymine is being such a jerk
[14:44:14] bohallor: _mh_: that's what i was hoping for
[14:44:15] bnagy: but the semantic meaning is "if not"
[14:44:16] [k-_: nono if not is less confusing
[14:44:26] l0oky: highlighting that statement in yellow :S
[14:45:06] PapaSierra: hi. i'm learning about mixins. if i use an analogy from js, if i already have a class i could add a method to it. i understand how to do this: obj.extend(SomeMixin), but that adds the mixin to an instance. how would i add it to the *class* so all instances have the mixin?
[14:45:09] bnagy: [k-_: not and ! have different precedence :(
[14:45:22] bnagy: like and and &&
[14:45:25] micmus: has joined #ruby
[14:45:30] ndrei: has joined #ruby
[14:45:30] Xeago: has joined #ruby
[14:45:34] adaedra: l0oky: put your mouse over the keyword, it should tells you what's wrong
[14:45:35] bnagy: in general, best to just use unless
[14:45:45] IrishGringo: has joined #ruby
[14:45:49] jhass: PapaSierra: by calling include on the class
[14:46:00] jhass: PapaSierra: class Foo; include SomeMixin; end; typically
[14:46:05] dg-ratio1: has joined #ruby
[14:46:09] jhass: and that's actually the common case over extend
[14:46:11] adaedra: l0oky: iirc, it doesn't like unless if it has a else with it, it would want you to revert the cases and use if
[14:46:13] l0oky: Control flow statement with negative condition less...
[14:46:13] [k-_: I know they do
[14:46:40] aphprentice: has joined #ruby
[14:46:43] l0oky: whatever that means hahaha
[14:47:00] [k-_: i would kill someone if they use multiple unless
[14:47:05] [k-_: and unless not
[14:47:10] adaedra: "unless not"
[14:47:17] l0oky: hahhahahahaha
[14:47:30] l0oky: ACTION *derp*
[14:47:30] PapaSierra: jhass: that presumes my code declared class Foo. what if Foo is declared in a gem that i'm using and i simply want to add extra behaviour after the fact?
[14:47:45] kirun: has joined #ruby
[14:47:50] jenrzzz: has joined #ruby
[14:48:03] jhass: [k-_: l0oky worth pointing out that unless and if not are not equivalent, if not/ if ! call the ! method, unless doesn't
[14:48:11] shevy: PapaSierra ruby is open at run-time to modifications
[14:48:21] Scripore: has joined #ruby
[14:48:36] [k-_: then how does it work?!
[14:48:54] [k-_: i thought it was just syntactic sugar
[14:48:55] railsraider_: has joined #ruby
[14:48:57] bohallor: _mh_: that's what i was hoping for
[14:49:02] jhass: PapaSierra: you could just reopen the class, though you're properly better off writing a decorator, OO design wise speaking
[14:49:18] jhass: *probably
[14:49:23] dross: has joined #ruby
[14:49:33] PapaSierra: jhass: right
[14:49:48] sandstrom: has joined #ruby
[14:49:49] [k-_: >> module A;def hi;end;end; class B;end; a = B.new; B.include(A); a.hi
[14:49:50] ruboto: [k-_ # => nil (https://eval.in/385564)
[14:49:56] [k-_: yay it works!
[14:50:15] [k-_: yes you can just call include outside the class
[14:50:18] jhass: mmh, right it's no longer private
[14:50:35] jhass: 20>> Object.include(Kernel)
[14:50:36] ruboto: jhass # => private method `include' called for Object:Class (NoMethodError) ...check link for more (https://eval.in/385565)
[14:50:39] jhass: 21>> Object.include(Kernel)
[14:50:40] adaedra: [k-_: it surely enters if value is 0 or nil, as oppsed to if.
[14:50:40] ruboto: jhass # => Object (https://eval.in/385566)
[14:50:56] Roa: has joined #ruby
[14:51:12] bnagy: I guess that makes sense
[14:51:13] [k-_: i cant think in unless logic
[14:51:35] jhass: [k-_: try to read it like english, don't think about the negation
[14:51:36] bnagy: [k-_: it's much easier in postfix statements
[14:51:41] [k-_: 20>> Object.__send__(:include, Kernel)
[14:51:42] ruboto: [k-_ # => Object (https://eval.in/385567)
[14:51:52] [k-_: or you can use that hack ^
[14:52:06] jhass: eh, no need for __send__, send is available there
[14:52:16] [k-_: we need to be safe jhass
[14:52:21] subtwo: has joined #ruby
[14:52:27] troulouliou_dev: has joined #ruby
[14:52:34] havenwood: [k-_: #public_send
[14:52:41] jhass: I'd actually want to fail my code there if somebody removed send from Class
[14:52:42] [k-_: public_send doesnt work
[14:52:44] [k-_: its private
[14:52:53] havenwood: >> Object.public_send :include
[14:52:54] ruboto: havenwood # => Object (https://eval.in/385568)
[14:53:02] [k-_: havenwood: 2.0
[14:53:13] havenwood: [k-_: Maintenance mode, live in the now!
[14:53:16] uptownhr: has joined #ruby
[14:53:41] [k-_: yes, i am on a fairly recent release
[14:55:14] lalalaaa: has joined #ruby
[14:56:09] lalalaaa: Hi! Is anybody aware of a Ruby alternative to Majordomo for running small mailinglists?
[14:56:20] marr: has joined #ruby
[14:57:04] wmoxam: why Ruby? :p
[14:57:09] ta: has joined #ruby
[14:58:02] Aria: Geez. I wrote something like that a long time ago but I'm struggling to remember what I called it and where I stowed the source.
[14:58:19] lalalaaa: wmoxam: im just biased i guess lol
[14:58:19] Aria: I was using gurgitate-mail at one point and some stuff plugged into it.
[14:58:35] blackmes1: has joined #ruby
[14:58:43] lalalaaa: Aria: oh hey!
[14:59:05] lalalaaa: do let me know if you remember
[14:59:12] revath: has joined #ruby
[14:59:28] jhass: I heard discourse is the new fancy way to run a mailing list :P
[14:59:44] yh: has joined #ruby
[14:59:58] Rubie: has joined #ruby
[15:00:20] Aria: I'll try.
[15:00:53] lalalaaa: oh man, pls no more discourse =)
[15:01:03] codecop: has joined #ruby
[15:03:02] lalalaaa: cant even get discourse to send emails to localhost. nobody will help me because i dont run it inside linux/docker
[15:03:24] afrianska: has joined #ruby
[15:03:38] lalalaaa: the guys in #openbsd seem to recommend http://www.gnu.org/software/mailman/ i think ill try that out
[15:04:11] ddv: lalalaaa: pebcak
[15:04:27] pik_: has joined #ruby
[15:04:39] adaedra: #openbsd which recommend something in gnu.org?
[15:05:10] [k-_: now, now, they arent biased beasts
[15:05:20] jhass: adaedra: if you ever setup a mailman you'll know why :P
[15:05:39] dfockler: has joined #ruby
[15:05:53] snockerton: has joined #ruby
[15:06:11] Jackneill: has joined #ruby
[15:06:20] adaedra: [k-_: I thought BSD guys disliked the GPL.
[15:06:56] adaedra: jhass: Doesn't seems to be the case before long.
[15:06:57] bluish: has joined #ruby
[15:07:25] adaedra: you say that because it's difficult to do?
[15:07:59] jhass: well, it's fairly easy actually. If you start with a blank postfix and don't intend to use it for anything besides
[15:09:28] phat4life: has joined #ruby
[15:10:10] jenrzzz: has joined #ruby
[15:10:37] gambl0re: has joined #ruby
[15:10:54] Soda: has joined #ruby
[15:11:08] lalalaaa: ddv: dunno, email delivery via localhost works fine for normal rails apps but discourse has been abstracted to the point where it no longer resembles a rails app
[15:11:36] Xeago: has joined #ruby
[15:11:37] zeroDi: has joined #ruby
[15:11:45] adaedra: it ressembles a road app
[15:11:48] lalalaaa: but thats just my opinion. it works great for people who're not familiar with rails and who want a 1-click install via docker
[15:11:51] adaedra: ACTION --> []
[15:11:56] baweaver: has joined #ruby
[15:12:16] Axilla: has joined #ruby
[15:13:26] atom3: has joined #ruby
[15:13:29] [k-_: i hope your meds wear off soon
[15:13:31] uber_: has joined #ruby
[15:13:52] wookiehangover: has joined #ruby
[15:14:30] tvw: has joined #ruby
[15:14:33] [k-_: you arent taking meds?
[15:14:42] ccooke: has joined #ruby
[15:14:49] imanzarrabian: has joined #ruby
[15:15:33] tjbiddle: has joined #ruby
[15:16:01] jhass: just bacon
[15:16:06] jhass: chunky bacon
[15:16:51] chinmay_dd: has joined #ruby
[15:16:54] Aria: [k-_: not appropriate.
[15:17:44] [k-_: it must be apeiros who is/was taking meds then
[15:17:49] lalalaaa: ACTION <3 http://ariaengine.com =)
[15:18:14] Aria: ACTION raises her eyebrows at [k-_ 
[15:18:17] atom3: has joined #ruby
[15:19:06] apeiros: but that you confuse me and adaedra - shame on you
[15:19:21] Takumo: What's the simplist way to perform some sort of 'transformation' to all the keys of a hash
[15:19:42] Takumo: i.e. hash.keys.each { |key| key = key + '2' } type thing
[15:19:48] adaedra: Takumo: ActiveRecord/Facets have that, if you have it
[15:19:50] [k-_: im relatively new!
[15:20:01] theRoUS`: has joined #ruby
[15:20:06] bnagy: Takumo: create a new hash
[15:20:16] jhass: .map { }.to_h
[15:20:21] [k-_: use the Hash[]?
[15:20:40] jhass: Hash[] is so 1.9
[15:20:41] havenwood: >> {aim: true, weekend: false}.map { |k, v| [k.to_s, v] }.to_h
[15:20:42] ruboto: havenwood # => {"aim"=>true, "weekend"=>false} (https://eval.in/385613)
[15:20:59] afrianska: has joined #ruby
[15:21:15] Takumo: kadoppe: so I'd need to just replace k.to_s with k+'2' :)
[15:21:18] icebourg: has joined #ruby
[15:21:38] [k-_: you should abstract it to have a HashKeyUpdaterFactory
[15:21:39] timonv_: has joined #ruby
[15:22:12] Takumo: [k-_: ThisIsNotJ2EError
[15:22:15] jhass: ACTION hands [k-_ some chunky bacon
[15:22:20] renderful: has joined #ruby
[15:22:31] jhass: ACTION hands bnagy some chunky bacon, too
[15:22:35] shakes: has joined #ruby
[15:22:38] bnagy: effing hipsters
[15:22:45] [k-_: this is not fox bacon right
[15:22:45] adaedra: there, there.
[15:22:48] ahmadsoe: has joined #ruby
[15:23:05] DefV_: This solution needs more threads!
[15:23:29] [k-_: no, threads are too heavy
[15:23:34] [k-_: we should use fibers!
[15:23:34] n008f4g_: has joined #ruby
[15:23:49] havenwood: [k-_: At the same time that factory work exhausts the nervous system to the uttermost, it does away with the many-sided play of the muscles, and confiscates every atom of freedom, both in bodily and intellectual activity.
[15:23:52] bnagy: somewhere along the line there was this new movement where it became illegal to hit the enter key
[15:23:54] Takumo: bnagy: yeah, this DB just has some crap like "userinfofield1" "userinfofield2" "userinfofield3" etc :(
[15:23:55] DefV: We need a forking model so we can use all our cores
[15:24:04] devdazed_: has joined #ruby
[15:24:08] shevy: how do you guys keep track of news in ruby?
[15:24:11] imanzarrabian: has joined #ruby
[15:24:14] bnagy: new = {}; old.each {|k,v| #do stuff
[15:24:19] DefV: shevy: twitter
[15:24:27] [k-_: r/programming?
[15:24:33] apeiros: shevy: twitter/ruby-flow
[15:24:46] apeiros: shevy: also see ruby-community.com for links ;-)
[15:24:48] havenwood: shevy: Read the commits. ;)
[15:24:51] apeiros: suggestions welcome
[15:25:04] havenwood: shevy: https://bugs.ruby-lang.org/projects/ruby-trunk/issues
[15:25:18] havenwood: shevy: https://github.com/ruby/ruby/commits/trunk
[15:25:41] shevy: ahhh now I see... on https://twitter.com/rubyinside I just saw a link to some matz talk or something
[15:25:47] [k-_: apeiros: is it supposed to redirect to irc rules permanently?
[15:25:49] shevy: https://www.youtube.com/watch?v=bqWBB8-iEac
[15:25:51] havenwood: shevy: You can follow RubyGems on twitter to see every gem release as they're released.
[15:25:55] shevy: less than 2 weeks old
[15:26:12] havenwood: shevy: He talks about the possibility of merging Streem into Ruby 3.
[15:26:14] shevy: havenwood yeah don't flood me with too much! my brain is still stuck at DefV mention...
[15:26:28] ta: has joined #ruby
[15:26:30] shevy: my brain is linear, I need to work down that list slowly step by step
[15:26:31] havenwood: shevy: https://github.com/matz/streem
[15:26:42] Takumo: shevy: or you can use Gemnasium and get regular updates about your projects dependencies
[15:27:01] Channel6: has joined #ruby
[15:27:38] [k-_: http://ruby-community.com/pages/links
[15:28:09] ruboto: havenwood # => 83 (https://eval.in/385615)
[15:28:41] [k-_: >> 00001
[15:28:42] ruboto: [k-_ # => 1 (https://eval.in/385616)
[15:28:56] GnuYawk: has joined #ruby
[15:29:19] dg-ratio1: has joined #ruby
[15:29:29] adaedra: what's so surprising, [k-_ ?
[15:30:18] rippa: has joined #ruby
[15:30:46] railsraider: has joined #ruby
[15:31:09] ruboto: jhass # => 0 (https://eval.in/385617)
[15:31:18] ruboto: havenwood # => 0 (https://eval.in/385618)
[15:31:19] lrocksmashtime: has joined #ruby
[15:31:27] ruboto: havenwood # => 0 (https://eval.in/385619)
[15:31:28] ruboto: GarethAdams # => 0 (https://eval.in/385620)
[15:31:39] lrocksmashtime: anyone here happen to be using the Geocoder gem with yandex and having issues?
[15:31:46] ruboto: Just ask your question, if anyone has or can, they will respond.
[15:31:54] Scripore: has joined #ruby
[15:32:44] jcromartie: has joined #ruby
[15:32:48] cndiv: has joined #ruby
[15:32:48] cndiv: has joined #ruby
[15:32:52] terlar: has joined #ruby
[15:32:59] shevy: probably nobody uses that
[15:33:57] jhass: I still wonder how nobody finds time for all the stuff they do :/
[15:34:29] apeiros: [k-_: until we have a proper start page, yes
[15:34:34] treehug88: has joined #ruby
[15:35:07] jhass: [k-_: read: until you contribute a proper start page
[15:35:07] shevy: by the way, would you guys recommend rubocop?
[15:35:21] djbkd: has joined #ruby
[15:35:22] apeiros: [k-_: what jhass said :D??
[15:35:24] jhass: shevy: if you want to take the time and configure it to a sane style, es
[15:35:48] adaedra: what's this strange symbol
[15:36:03] apeiros: you haven't been to england?
[15:36:24] adaedra: when I was young
[15:36:24] djbkd: has joined #ruby
[15:36:53] MatthewsFace: has joined #ruby
[15:36:56] adaedra: Oh, but I have it on my keyboard!
[15:37:09] Takumo: jhass: what's wrong with Rubocop's style?
[15:37:14] jhass: -bo Rickmasta!*@*$#ruby-fix-your-connection jhass
[15:37:23] apeiros: -b Rickmasta!*@*
[15:37:45] apeiros: -o apeiros
[15:38:07] jhass: too slow :P
[15:38:18] [k-_: jhass such skill, did it in 1 line too
[15:38:32] apeiros: I'm handicapped, ok?!? >:-(
[15:38:37] [k-_: hehehehe
[15:38:48] adaedra: poor apeiros
[15:38:55] claw: has joined #ruby
[15:39:04] claw: has joined #ruby
[15:39:18] rickmasta: has joined #ruby
[15:39:19] nofxxx: has joined #ruby
[15:39:39] [k-_: do we actually use ?ugt
[15:40:38] diegoviola: has joined #ruby
[15:40:44] diegoviola: has joined #ruby
[15:40:58] yoongkang: has joined #ruby
[15:41:31] [k-_: There is this help page for support channels which is pretty good http://wiki.mc-ess.net/wiki/Help
[15:42:41] Xeago: has joined #ruby
[15:42:51] white_bear_: is there a canonical way to execute cygwin commands in ruby?
[15:43:43] alphaatom|pc: has joined #ruby
[15:46:08] Senjai: Good morning ruby
[15:46:13] adaedra: "Cygwin commands"
[15:46:20] adaedra: like any other binary
[15:46:52] timonv_: has joined #ruby
[15:47:53] slash_nick: has joined #ruby
[15:47:53] slash_nick: has joined #ruby
[15:47:54] gagrio: has joined #ruby
[15:48:13] [k-_: there is a lot of non-related stuff, but there are a few nice err things: http://sbnc.khobbits.co.uk/setcmd/commands/%23essentials
[15:48:51] afrianska: has joined #ruby
[15:49:10] michael_mbp: has joined #ruby
[15:49:19] timonv: has joined #ruby
[15:49:25] [k-_: minecraft help channels usually face a lot of ... idi-
[15:49:47] sinkensabe: has joined #ruby
[15:50:06] baweaver: has joined #ruby
[15:50:20] symbol: has joined #ruby
[15:51:53] jpfuentes2: has joined #ruby
[15:52:18] shevy: matz has rediscovered duck typing:
[15:52:20] shevy: http://i.imgur.com/N61bpko.png
[15:53:50] [k-_: is reddot conference in singapore?
[15:54:05] [k-_: adaedra: nice duck...
[15:54:21] adaedra: \_o< -( Thanks!
[15:54:31] ndrei: has joined #ruby
[15:55:21] hectortrope: has joined #ruby
[15:56:02] last_staff: has joined #ruby
[15:56:55] [k-_: frankly, i dont have half of any idea of what #haskell is talking about 100% of the time
[15:57:05] skade: has joined #ruby
[15:57:13] ponga: shevy: where's that photo from
[15:57:17] adaedra: [k-_: haskell.
[15:57:43] shevy: ponga I am watching matz talk on https://www.youtube.com/watch?v=bqWBB8-iEac - is your english better than this english by the way? :D
[15:57:45] [k-_: adaedra: well done!
[15:57:58] shevy: he spoke about fu-ma-ji-me
[15:58:01] adaedra: Thanks, thanks.
[15:58:01] shevy: lazy person
[15:58:39] ponga: lol shevy
[15:58:42] [k-_: fu-ma-ji-me?
[15:58:58] njs126: has joined #ruby
[15:59:01] lurkmaster: has joined #ruby
[15:59:12] shevy: [k-_ yeah... and majime means diligent hard-working person
[15:59:22] shevy: they kinda negate the word with just a leading fu- syllable
[16:01:04] ponga: fumajime is not diligent
[16:02:00] michael_mbp: when an instance has #[] as an instance method
[16:02:09] michael_mbp: how come one can call instance[...]
[16:02:16] michael_mbp: rather than instance.[..]
[16:02:16] jhass: because ruby magic
[16:02:22] [k-_: syntactic sugar
[16:02:28] jhass: it's simply a syntax rule, ruby rewrites it for you
[16:02:30] devdazed: has joined #ruby
[16:02:35] jhass: like foo += 1 is foo = foo + 1
[16:02:42] [k-_: also it should be instance.[] (...)
[16:02:44] michael_mbp: and that applies to [] specifically
[16:02:52] eggoez: has joined #ruby
[16:03:03] jhass: or a.b = c is a.b=(c)
[16:03:12] [k-_: i once tried to monkey patch Proc
[16:03:22] [k-_: instead of Proc.call, i did Proc.()
[16:03:25] adaedra: It didn't end well?
[16:03:25] jhass: or a.(b) is a.call(b)
[16:03:34] atom3: has joined #ruby
[16:03:46] bnagy: michael_mbp: most of the operators are actually methods
[16:03:50] [k-_: i tried to do Proc() too, but that didnt work
[16:03:54] mister_s_: has joined #ruby
[16:04:02] [k-_: Apparently scala can do that?
[16:04:13] michael_mbp: is there a list of where it does all this?
[16:04:20] michael_mbp: or is this all done in C?
[16:04:22] episage: has joined #ruby
[16:04:32] jhass: parse.y magic afaik
[16:04:38] jhass: you don't want to look at parse.y
[16:05:36] episage: Do you know how to implement a working loop do .. queue.pop end daemon queue?
[16:05:50] episage: i get `pop': No live threads left. Deadlock
[16:06:00] Senjai: [k-_: You tried.. to monkey patch Proc?
[16:06:12] jhass: episage: looks like you didn't spawn a thread that could fill the Queue
[16:06:16] [k-_: or lambda ?.?
[16:06:19] [k-_: i dont remember
[16:06:26] episage: jhass: i remember u
[16:06:34] [k-_: but proc { 'hello' }.() works now
[16:06:35] bnagy: >> class Fixnum; def + (other); self - other; end; end; 2+1
[16:06:36] ruboto: bnagy # => 1 (https://eval.in/385627)
[16:06:42] [k-_: >> proc { 'hello' }.() works now
[16:06:43] ruboto: [k-_ # => /tmp/execpad-9fb50764b50d/source-9fb50764b50d:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/385628)
[16:06:49] davedev24_: has joined #ruby
[16:06:58] [k-_: it works in my irb ;-;
[16:07:10] adaedra: >> proc { 'hello' }.() # works now
[16:07:11] ruboto: adaedra # => "hello" (https://eval.in/385629)
[16:07:28] episage: jhass: i want to work on the main thread, is it possible?
[16:07:37] episage: jhass: so the app blocks forever
[16:07:41] [k-_: >> proc { 'hello' }.()
[16:07:42] ruboto: [k-_ # => "hello" (https://eval.in/385630)
[16:07:43] bnagy: episage: no, Queue#pop blocks
[16:07:48] jhass: episage: so you want to quit the loop if the Queue is empty?
[16:07:57] adaedra: If you put comments in comments, it works better, [k-_
[16:08:09] episage: jhass: no, i want it to be still running, waiting for the next push
[16:08:24] jhass: episage: who's pushing if you have only one thread?
[16:08:31] [k-_: adaedra: i just replaced but with >> T^T
[16:09:38] ivanskie: has joined #ruby
[16:09:39] [k-_: 20>> proc { 'hello' }.()
[16:09:40] ruboto: [k-_ # => "hello" (https://eval.in/385638)
[16:09:45] [k-_: 19>> proc { 'hello' }.()
[16:09:46] ruboto: [k-_ # => "hello" (https://eval.in/385639)
[16:09:55] [k-_: it worked the whole time?
[16:09:57] beneggett: has joined #ruby
[16:10:09] adaedra: 18>> proc { 'hello' }.()
[16:10:10] ruboto: adaedra # => /tmp/execpad-9a6cd3110dcd/source-9a6cd3110dcd:2: syntax error, unexpected '(' ...check link for more (https://eval.in/385640)
[16:10:17] [k-_: i didnt use 18
[16:10:27] adaedra: hi ivanskie
[16:10:29] ivanskie: I'm trying to find the right tool. not sure if i should do a single page (single file too) html/javascript or.. make a ruby script...
[16:10:32] revath: has joined #ruby
[16:10:34] ponga: damn it i can't understand duck typing concept
[16:10:36] [k-_: i must have created my own class then
[16:10:41] Alayde_: has joined #ruby
[16:10:43] ivanskie: I have csv file being generated everyday. one csv per day.
[16:11:06] ivanskie: I need to read csv file, and show a count of different items... per day..
[16:11:15] bronson: has joined #ruby
[16:11:15] [k-_: ivanskie: is this frontend or backend
[16:11:24] NeverDie: has joined #ruby
[16:11:30] episage: jhass: spot on :D, i am pushing before i call run
[16:11:32] jhass: "show", elaborate on that
[16:11:42] ivanskie: front.. its not to be a hosted app.. customer wants to have something she can run/open... and view it.
[16:11:48] jhass: episage: but if it's run empty, who's pushing new items then?
[16:11:51] michael_mbp: thanks jhass and [k-_
[16:11:56] michael_mbp: I'd completely forgotten about parse.y
[16:12:24] [k-_: well you should use javascript then or opal2js
[16:12:52] ivanskie: basically.. got a printer applicator machine.. every time it prints a label.. it prints a diff label for diff product.. and software writes back into csv file of the productID.. so i want to go back into that CSV file, and count number of these different productIDs to show her a count per day.. but the csv file is different each day..
[16:12:58] michael_mbp: I do a fair bit of ecma, but not dived that much under the covers. I want to.
[16:13:06] ivanskie: with a date written in filename
[16:13:10] caseypatrickdris: has joined #ruby
[16:13:14] michael_mbp: done backbone, some ES6, node.
[16:13:21] Rollabunna: has joined #ruby
[16:13:21] ivanskie: and i'm not sure if i want to do this in Ruby.. and then instal ruby on her laptop.. or do it in JS
[16:13:43] jhass: ivanskie: do you know how to do it in either?
[16:14:02] husanu1: has joined #ruby
[16:14:05] michael_mbp: ivanskie: name the file with a certain pattern
[16:14:11] michael_mbp: like products_<date>
[16:14:16] ivanskie: ruby.. i have idea.. i know more ruby than i know JS.. and in JS i was thinking of maybe doing emberjs or angular single page thing.. in one file.. so she'd just open it and it'd show her
[16:14:19] k3asd`_: has joined #ruby
[16:14:22] michael_mbp: where date is in an isoformat
[16:14:27] lotherk: has joined #ruby
[16:14:38] ivanskie: hm.. its in 62215 right now
[16:14:39] michael_mbp: you can then regexp the date
[16:14:40] JEG2: has joined #ruby
[16:14:49] michael_mbp: FileUtils will help you some
[16:14:56] episage: jhass: i should spawn separate thread to manage it
[16:15:06] davedev24: has joined #ruby
[16:15:09] jhass: episage: sounds about right, google producer/consumer pattern
[16:15:16] sandstrom: has joined #ruby
[16:15:17] [k-_: ivanskie, check out opal
[16:16:09] ponga: shevy: what is a well known language that does not support duck typing?
[16:16:10] Senjai: has joined #ruby
[16:16:21] husanu: has joined #ruby
[16:16:27] ponga: i always thought it as a natural stuff, i can't imagine something without it
[16:16:38] jhass: ponga: basically anything statically typed - Crystal ;P
[16:16:41] Lucky_: has joined #ruby
[16:16:46] yh: has joined #ruby
[16:16:53] shevy: ponga possibly the language nim
[16:16:57] jhass: C, C++, Java,
[16:17:09] shevy: ponga http://nim-lang.org/docs/tut1.html
[16:17:13] bnagy: C possibly bad example ;)
[16:17:25] michael_mbp: File.exists?("products_#{Time.current.strftime('%d%m%y')}")
[16:17:29] michael_mbp: ivanskie_away: ^^
[16:17:30] shevy: proc yes(question: string): bool = echo(question, " (y/n)")
[16:17:35] michael_mbp: something like that.
[16:17:39] shevy: proc sumTillNegative(x: varargs[int]): int =
[16:17:54] bnagy: "cast typing" - "We'll MAKE you a duck!"
[16:17:58] shevy: and the last one... proc myWriteln(f: File, a: varargs[string]) =
[16:18:01] acke: has joined #ruby
[16:18:12] shevy: bnagy they make meat out of a duck in a factory!
[16:18:16] [k-_: abyss is having a really long meeting
[16:19:07] ponga: i can't understand it... isn't it just different objects having different methods and a programmer's job to handle them?
[16:19:28] k3asd`: has joined #ruby
[16:20:11] bnagy: ponga: "objects" and "methods" are already making assumptions
[16:20:35] shinnya: has joined #ruby
[16:20:40] Senjai: I'm putting rails on notice
[16:20:40] ponga: bnagy: i know i am but i don't have good prerequisite knowledges to explain it well
[16:20:47] endash: has joined #ruby
[16:21:05] bnagy: ponga: there are plenty of languages that don't have wither
[16:21:38] jhass: foo.to_s.upcase # duck typing; if foo.is_a?(String); foo.upcase; elsif foo.is_a?(Symbol); foo.to_s.upcase; else raise ArgumentError, "pass something I can handle!"; end # no duck typing
[16:22:26] [k-_: i am proud to present: https://eval.in/385646
[16:22:37] ponga: ok i get it now
[16:22:51] ponga: bnagy: " For example, in a non-duck-typed language, one would create a function that requires that the object passed into it be of type Duck, " this line helped me to grasp it
[16:22:52] [k-_: ACTION checks if f.oo website exists
[16:22:55] momomomomo: has joined #ruby
[16:23:00] Iarfen: has joined #ruby
[16:23:10] spider-mario: has joined #ruby
[16:23:37] shevy: ponga what I don't understand is
[16:23:37] bnagy: ponga: that's kind of wrong imho :/
[16:23:42] shevy: duck typing relies on .respond_to? right?
[16:23:46] ponga: shevy: when do you think matz will speak english comfortably?
[16:23:49] Iarfen: I wanted to ask: is Ruby a good programming language to make videogames? Comparing against c++ and objective-c?
[16:23:51] shevy: in LPC, non-existing methods return 0
[16:23:52] enebo: has joined #ruby
[16:24:03] shevy: ponga he is 50 now, perhaps when he is 99
[16:24:07] bnagy: ponga: for example you can write ruby duckishly or non-duckishly
[16:24:09] jhass: Iarfen: depends on the type of the game, but tbh. probably not
[16:24:17] _blizzy_: is there a way to run multiple class instances at the same time without them colliding?
[16:24:26] jhass: Iarfen: the ecosystem isn't too strong there
[16:24:26] _blizzy_: they can be started whenever I use a command, let's say, !foo
[16:24:28] bnagy: so it's not a langauge thing, it's a programming approach
[16:24:30] ivanskie_away: how do i undo the away thing
[16:24:35] [k-_: >> Array my_a = []
[16:24:36] ruboto: [k-_ # => [] (https://eval.in/385649)
[16:24:46] [k-_: that is duck typing
[16:24:52] jhass: [k-_: stop trolling
[16:24:58] _blizzy_: so !foo, would start 1, !foo would start a second one, but 1 and 2 wouldn't interfere with each other.
[16:25:00] j416: has joined #ruby
[16:25:07] ponga: shevy: maybe he's not willing or trying hard
[16:25:31] jhass: _blizzy_: if you have proper encapsulation (= no shared state) that should just work
[16:25:47] _blizzy_: jhass, the instances are anonymous
[16:25:52] ponga: ability to code overlaps a lot with ability of language accquisition
[16:25:55] ivanskie: if I make a visual page.. im thinking of listing all csv files, then when she clicks on each one it shows the counts on the right kinda thing hmm. you'd think it makes mose sence to write it as an excel macro. but i haven't touched VB in yeeears
[16:25:56] jhass: _blizzy_: not relevant
[16:26:04] [k-_: is that not duck typing?
[16:26:11] [k-_: how does that work then?
[16:26:27] jhass: [k-_: can't tell if you're serious...
[16:26:36] ponga: oh thank you bnagy "so it's not a langauge thing, it's a programming approach" your line really solved the last puzzle piece inside my head
[16:26:41] [k-_: ACTION goes research on the subject
[16:26:58] deric_skibotn: has joined #ruby
[16:27:01] jhass: [k-_: Kernel.Array(my_a=[])
[16:27:07] jhass: that's what you're doing there
[16:27:14] _blizzy_: jhass, so this https://gist.github.com/NotBlizzard/45990af8297c3868827e, if called twice, would start two separate Foo instances, and they wouldn't interfere with each other, and both would both be running until they finish.
[16:27:27] sarkyniin: has joined #ruby
[16:27:56] jhass: _blizzy_: in your example there's no concurrency so they wouldn't start in parallel or even run concurrently
[16:28:07] Iarfen: jhass, why not? because of performance issues respecto to c++ or because of other reasons? I prefer ruby as a programming language, it has more flexibility than c++
[16:28:18] _blizzy_: jhass, I mean like, I call !foo once, and it starts to run
[16:28:28] _blizzy_: you call !foo 5 minutes later, and a second instances runs
[16:28:28] IrishGringo: has joined #ruby
[16:28:36] _blizzy_: my instance is still running
[16:28:41] _blizzy_: while yours is now running
[16:28:54] jhass: Iarfen: you can bypass the performance issues with bindings to native libraries, I rather mean lack thereof & frameworks on top
[16:29:08] bnagy: Iarfen: you can do anything in anything
[16:29:11] _blizzy_: I'm using EventMachine if that helps. c:
[16:29:13] Iarfen: jhass, I wanted to do my own framework, frameworks are not an issue :D
[16:29:20] bnagy: notch made 2 billion bucks out of java
[16:29:21] [k-_: you shouldn't really write games in ruby...
[16:29:30] jhass: Iarfen: if all you want is some SDL/2D side scroller type of thing you should be fine with the SDL bindings or something like Gosu though
[16:29:43] _blizzy_: if you're making a game make it in C# or Java, or C++.
[16:30:07] [k-_: it becomes hell to maintain ruby when the code base gets huge
[16:30:08] Iarfen: jhass, I want to do an MMORPG, ruby is not the option then? I really prefer it
[16:30:24] bnagy: smelling trolling
[16:30:29] _blizzy_: Iarfen, i'm not jhass, but making a MMORPG in ruby is possible
[16:30:32] jhass: _blizzy_: not me, never used eventmachine yet, thus not familiar with its implementation
[16:30:33] _blizzy_: but not recommended
[16:30:43] Iarfen: blizzy_, thank you, why is not recommender
[16:30:46] [k-_: larfen, twitter shifted off ruby because it wasnt keeping up
[16:30:55] yh: keeping up in what way?
[16:30:57] _blizzy_: because there are better languages for MMORPGS.
[16:31:06] _blizzy_: Twitter now uses Scala, which is a great language btw.
[16:31:09] yh: JRuby is pretty fast
[16:31:13] havenwood: [k-_: Twitter still uses Rails as well.
[16:31:21] [k-_: minor minor
[16:31:23] _blizzy_: Twitter uses Scala now I though.
[16:31:26] blackmes2: has joined #ruby
[16:31:40] _blizzy_: jhass, minus Event Machine, how would I achieve my goal if possible.
[16:31:49] Iarfen: blizzy_, but why the other languages are best, only because of frameworks?
[16:31:56] havenwood: _blizzy_: For the backend, aye.
[16:31:58] jhass: _blizzy_: stuff that gets as big as twitter would be stupid to base on a single technology
[16:32:00] xxneolithicxx: has joined #ruby
[16:32:16] _blizzy_: jhass, yeah.
[16:32:18] bnagy: EM is dead, no?
[16:32:20] _blizzy_: havenwood, ok, thanks.
[16:32:33] _blizzy_: Iarfen, because each tool has it's use.
[16:32:42] towski_: has joined #ruby
[16:32:45] _blizzy_: I wouldn't build an airplane with just a hammer.
[16:32:52] _blizzy_: it's possible, but it would be hard as hell.
[16:32:56] dross: has joined #ruby
[16:33:02] [k-_: it's possible?
[16:33:14] _blizzy_: ok, probably not possible, but you get the point. c:
[16:33:19] jhass: Iarfen: just toying or building something specific?
[16:33:26] icebourg: has joined #ruby
[16:33:47] Iarfen: jhass, building an MMORPG, it will be specific
[16:34:14] shevy: once they grow
[16:34:15] Iarfen: trying to decide the best programming language, I don't like C++ because the syntax is really anoying
[16:34:16] shevy: they abandon ruby
[16:34:25] Iarfen: so prefer to use another if possible
[16:34:34] nofxxx: Is jruby-head >= 2.0.0 ?
[16:34:40] [k-_: ruby really isnt the right choice for this things
[16:35:09] havenwood: nofxxx: JRuby 9.0 is up to 2.2 now. :)
[16:35:10] [k-_: larfen: you should get a strongly typed language with static typing
[16:35:40] droidburgundy: has joined #ruby
[16:35:57] nofxxx: havenwood, ty. For travis CI. Gonna try jruby-head.
[16:35:59] husanu: has joined #ruby
[16:36:05] [k-_: and don't jump onto the haskell bandwagon
[16:36:17] [k-_: IO wont be easy to handle...
[16:36:30] [k-_: you could try D
[16:36:34] [k-_: it has type inference
[16:36:34] havenwood: nofxxx: For earlier JRuby you can: export JRUBY_OPTS=--2.0
[16:36:50] havenwood: nofxxx: ship in 2.2 mode.
[16:36:52] nofxxx: Iarfen, I disagree, ruby would be perfect for a lot of stuff. And when it comes to the realtime/socket part you can just choose what to use. deepstream/node, or maybe elixir/erlang
[16:36:54] jhass: Iarfen: I guess Elixir for the backend could be interesting, but for the client you'll C++ is probably still your best bet :/
[16:37:09] snath: has joined #ruby
[16:37:14] jhass: eh, s/you'll//
[16:37:26] havenwood: Iarfen: Crystal and Elixir are the answers. What is the question?
[16:37:33] Iarfen: okay, thank you all for the advices, I'll decide
[16:37:40] nofxxx: Iarfen, as said, you need a lot of tools to build an airplane. Ruby being the dewalt 20V
[16:37:40] [k-_: havenwood: hue hue hue
[16:37:55] jhass: well yeah, Crystal if you don't fear fixing language bugs :P
[16:38:00] havenwood: nofxxx: I thought Ruby was legos. ;)
[16:38:01] [k-_: please, we need more D users
[16:38:34] havenwood: ACTION flies off in a lego plane...
[16:38:37] nofxxx: havenwood, dude, with some money and a dewalt 20V you can launch to space. I've built half my furniture with it hehe
[16:39:05] [k-_: you'll be mistreating yourself and others
[16:39:21] nofxxx: Iarfen, checkout rethinkdb too
[16:39:50] jhass: use mongo because mongo is webscale. MySQL isn't wescale. use mongo
[16:39:53] cndiv: has joined #ruby
[16:39:58] nofxxx: havenwood, and thanks again
[16:40:20] [k-_: are you sure mongo is the right choice
[16:40:23] nofxxx: yeah, mongo or rethink. Love'em both.
[16:40:31] [k-_: most people have criticised mongo
[16:40:45] [k-_: they said it should be used if your data is not important @.@
[16:41:13] nofxxx: [k-_, while they talk I use, and dont waste a second migrating or shell working
[16:41:42] dudedudeman: our company uses mongo for everything. web, pipeline, production, whatever
[16:41:57] [k-_: but mongo journalling is a bit awkwardish
[16:42:04] nofxxxx: has joined #ruby
[16:42:06] eam: [k-_: those people are correct
[16:42:36] [k-_: they are? not sure who to trust @.@
[16:42:41] lrocksmashtime: has left #ruby: ()
[16:42:45] adaedra: [k-_: problem is that mongo does not guarantees data correctness iirc
[16:42:59] adaedra: it say it writes, but not really
[16:43:01] _blizzy_: is this possible? https://gist.github.com/NotBlizzard/ef0311b54c27c5822d5f
[16:43:04] jhass: I'm sorry
[16:43:09] eam: there are very few cases where a typical sql database isn't appropriate for someone who doesn't know what they're doing
[16:43:12] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[16:43:24] nofxxxx: adaedra, not true... you choose how to write, with majority or even wait for all machines to reply
[16:43:41] adaedra: meh, I'll move to the train rather
[16:44:03] jhass: _blizzy_: what do you mean? you serialize execution there so this is equivalent to using no threads at all
[16:44:46] _blizzy_: jhass, it's back to the !foo thing. when I run !foo, it starts a new thread, pushes it to @threads, then runs @threads.map(&:join)
[16:44:54] fantazo: has joined #ruby
[16:45:06] rickmasta: has joined #ruby
[16:45:10] _blizzy_: is there a way to prevent a thread from restarting when map is used if a thread is already running
[16:45:10] jhass: inside eventmachine? doubt that's a good idea
[16:45:15] [k-_: but it isnt running anything else on the main thread
[16:45:40] jhass: I have no idea what you mean by restarting or why you even think anything restarts
[16:45:43] _blizzy_: ok let's use the real example. I'm making a Pokemon battle bot. the bot can battle multiple people at the same time
[16:46:03] _blizzy_: every time a battle starts, it starts a new instance of the Battle class.
[16:46:35] _blizzy_: I'm using threads so that it's possible for the bot to battle in multiple battles at the same time
[16:46:42] jhass: keep a shared hash with nick => battle_instance
[16:46:54] jhass: dispatch input to the right instance based on nick
[16:47:03] sinkensabe: has joined #ruby
[16:47:09] jhass: no need for threads, just dispatch input
[16:48:29] rafaelsales: has joined #ruby
[16:48:31] _blizzy_: the reason why I'm using threads is because I tried your method once.
[16:48:33] _blizzy_: it got messy.
[16:48:45] bnagy: you can thread out your Battles if you want, but you'll still have to fan out input
[16:48:56] momomomomo: has joined #ruby
[16:49:09] jhass: yeah I see zero benefit in threading, it'll just add complexity and increase the mess
[16:49:13] _blizzy_: it starts a battle instance with the room in the initializer, so it knows what battle to send info to
[16:49:13] bnagy: you have one bot in the irc chan reading input, right? So it needs to mux, effectively
[16:49:24] jhass: especially if you use a event driven approach otherwise
[16:49:33] TheNet: has joined #ruby
[16:49:49] snath: has left #ruby: ("Leaving")
[16:49:49] [k-_: event driven approach seems the best for this type of bots
[16:50:11] obscured: has joined #ruby
[16:50:16] bnagy: greenthreads is going to be easier to code
[16:50:20] [k-_: what is a better way? i have been using event driven
[16:50:30] sinkensabe: has joined #ruby
[16:50:31] rjno: has joined #ruby
[16:50:31] bnagy: well ruby event libs are.. :/
[16:50:37] _blizzy_: so far I've been using threads and I haven't been having problems.
[16:50:49] [k-_: you should use fibers
[16:50:55] _blizzy_: especially since there is so much that goes on in a battle
[16:50:58] _blizzy_: it would be one big hash
[16:51:18] bnagy: using threads lets you keep your individual statemachines simple
[16:51:23] [k-_: i thought fighting was just a few moves
[16:51:37] [k-_: battles can be paused and resumed?
[16:51:39] bnagy: imho the only reason to go evented is speed
[16:51:48] _blizzy_: [k-_, it's pokemon. so I gotta factor in health, moves, evs, weather
[16:51:54] _blizzy_: it gets crazy.
[16:52:01] [k-_: oh, it is that complex
[16:52:04] _blizzy_: I'm making an AI(?) so it's crazy.
[16:52:21] [k-_: kudos to you then
[16:52:42] lkba: has joined #ruby
[16:53:06] bnagy: in my mind this is just a dispatcher fan in-out kind of thing
[16:53:17] bnagy: where your Battles have a Queue for in and out
[16:53:28] bnagy: and the irc bot does the multiplexing
[16:53:56] last_staff: has joined #ruby
[16:54:05] joshbamboo1: has joined #ruby
[16:54:20] jhass: and you can totally develop that single threaded and add in the threads later if you actually run into delays due to heavy computations
[16:54:36] jhass: one players actions blocking others
[16:55:24] yoongkang: has joined #ruby
[16:55:47] bnagy: won't you get blocky if you don't have a thread per battle?
[16:55:58] bnagy: like.. not real threads, just mri threads
[16:56:09] jhass: yes, but if response time is like 250ms on avg, why care?
[16:56:18] fabrice31: has joined #ruby
[16:57:04] [k-_: arent mri threads fibers
[16:57:18] jhass: MRI threads are backed by pthreads
[16:57:43] jhass: the GVL makes it just so that the VM is running ruby code only for one at a time
[16:57:50] bnagy: oh.. you can't select over ruby queues anyway
[16:58:18] _blizzy_: what exactly is the diff between threads and fibers anyway.
[16:58:19] bnagy: so you'd need one output queue and many input queues
[16:58:20] Excelsior2015: has joined #ruby
[16:58:27] _blizzy_: every time I hear fibers I think of anime.
[16:58:32] bnagy: fibers are more hipseter
[16:58:44] jhass: _blizzy_: fibers achieve concurrency, threads (in theory) achieve parallelism
[16:58:46] [k-_: fibers are more lightwhite
[16:58:51] bnagy: a fiber is just a thread where you have explicit control over the pause resume
[16:58:52] [k-_: lightweight*
[16:58:55] atom3: has joined #ruby
[16:59:02] _blizzy_: so why use threads over fibers.
[16:59:18] jhass: fibers are a fancy way to swap the stack of the current thread
[16:59:20] bnagy: threads are easier to map onto OS threads
[16:59:23] [k-_: arent fibers not mapped to os threads?
[16:59:51] bnagy: no fibers are always explicitly scheduled imho
[16:59:53] _blizzy_: oh, then I need concurrency
[16:59:57] bnagy: in all languages
[17:00:02] jenksy: has joined #ruby
[17:00:03] peter_paule: has joined #ruby
[17:00:08] _blizzy_: since battles can start and end at different times.
[17:00:16] jhass: bnagy: pretty sure that's not the case
[17:00:34] jhass: especially if used as IO model, they're scheduled by the IO events
[17:00:58] bnagy: jhass: hrmmmm.
[17:01:07] toretore: no, ruby fibers are always explicitly scheduled by the user
[17:01:14] bnagy: all the stuff I can think of they're scheduled by the process runtime
[17:01:16] jhass: yes, Ruby fibers
[17:01:22] bnagy: not by the OS
[17:01:25] jhass: well, yes
[17:01:34] toretore: an io loop may be in charge of the scheduling, but it's in user space, so to speak
[17:01:41] jhass: but your runtime can very well have its own scheduler opaque to the user of the language
[17:01:52] jtdowney_: has joined #ruby
[17:02:03] sdothum: has joined #ruby
[17:02:24] toretore: not the runtime, user code
[17:02:35] bnagy: to me, if it's being scheduled in-process in userland it's explicit :)
[17:02:52] nwhirschfeld: has joined #ruby
[17:02:58] lkba_: has joined #ruby
[17:03:02] jhass: https://github.com/manastech/crystal/blob/master/src/concurrent/scheduler.cr
[17:03:06] jhass: example of what I mean
[17:03:14] bnagy: but, going further, I thought that fibers were explicitly manually scheduled
[17:03:16] toretore: "ruby fibers" ;)
[17:03:36] toretore: oh right, but that's user space
[17:03:43] bnagy: otherwise they're coros or something
[17:03:58] _blizzy_: every time I hear fibers, I think of "life fibers"
[17:03:59] bnagy: but I lose track of jargon :`(
[17:04:00] toretore: fibers are coroutines
[17:04:01] jhass: eh, fiber and coroutine ah pretty much two names for the same thing
[17:04:28] toretore: coroutines may not have their own stack
[17:04:31] swgillespie: has joined #ruby
[17:04:31] rbennacer: has joined #ruby
[17:04:35] airy: has joined #ruby
[17:04:37] _blizzy_: so, concurrency is running two things that can both start and stop at separate times at the same time
[17:04:49] _blizzy_: parallelism is two things running exactly at same time
[17:04:53] toretore: don't get hung up on difference between the two
[17:04:56] bnagy: _blizzy_: concurrency is the illusion of paralellism
[17:04:59] pietr0: has joined #ruby
[17:05:06] _blizzy_: bnagy, so Golang is an illusion?
[17:05:11] bnagy: which may or may not actually be parallelism
[17:05:11] skade: has joined #ruby
[17:05:12] _blizzy_: toretore, oh ok.
[17:05:21] toretore: only that parallelism is only attainable with multiple cpus
[17:05:58] jhass: Go is running on multiple threads these days, no?
[17:06:06] peter_paule: has joined #ruby
[17:06:13] bnagy: go has always run on multiple threads
[17:06:16] toretore: yes, go uses a work-stealing scheduler
[17:06:17] jhass: thread control is just not exposed to the user
[17:06:21] bnagy: because syscalls
[17:06:43] bnagy: but GOMAXPROCS default is still 1
[17:07:07] bnagy: in 1.5 things change a bit
[17:07:15] airy: its ruby grp or go grp?
[17:07:27] toretore: there is talk of preemptive scheduling of goroutines
[17:07:48] [k-|: does this look better
[17:08:00] [k-|: (apparently not for my client)
[17:08:14] wallerdev: has joined #ruby
[17:08:20] bnagy: air_: we're just comparing concurrency models
[17:08:24] _blizzy_: https://i.imgur.com/E3vQqns.jpg multithreading expectations vs reality.
[17:08:32] _blizzy_: I get the joke now.
[17:09:45] [k-|: the first one is parallelism isnt it
[17:09:49] eam: interestingly we have parallelism in one cpu as well due to superscalar architecture
[17:09:58] super: has joined #ruby
[17:10:01] jenksy: has joined #ruby
[17:10:01] eam: though it's hidden from view at the ruby level
[17:10:06] jhass: [k-|: both are
[17:10:08] toretore: meaning? hyperthreading?
[17:10:13] nwhirschfeld: has joined #ruby
[17:10:17] jhass: [k-|: the second one is how it works out in reality ;)
[17:10:22] eam: toretore: pipelining
[17:10:23] jhass: the first one is how you planned it
[17:10:36] [k-|: but..but...
[17:10:46] eam: hyperthreading isn't hidden from view, it appears as a real cpu core to userspace
[17:10:49] [k-|: that is so much less elegant than ruby!
[17:11:25] [k-|: A superscalar CPU architecture implements a form of parallelism called instruction-level parallelism within a single processor. It therefore allows faster CPU throughput than would otherwise be possible at a given clock rate.
[17:11:29] [k-|: [Wikipedia]
[17:12:05] subtwo: has joined #ruby
[17:12:32] eam: [k-|: read that as: the CPU determines that the next X instructions don't interact with each other, so it executes them all at the same time (in a pipeline)
[17:13:15] droidburgundy: has joined #ruby
[17:13:32] toretore: why is it a pipeline if they don't interact?
[17:13:44] baweaver: has joined #ruby
[17:13:58] vikaton: has joined #ruby
[17:14:48] eam: view program code as stuff you're pushing through the cpu - an instruction pipeline
[17:15:03] s2013: has joined #ruby
[17:15:04] eam: the amount you can execute in parallel (empty the pipe fast) is the depth of your pipeline
[17:15:38] eam: all kinds of tricks are used on modern processors to set up long pipelines with maximum parallelism (branch prediction, out of order execution)
[17:16:15] toretore: yeah i was being facetious :P
[17:16:33] eam: oh well, should be interesting material for newbies
[17:16:38] toretore: usually pipeline means the result of one job goes into the next
[17:16:42] toretore: yeah for sure
[17:17:50] vkgfx: the parallel execution is just different phases of execution
[17:18:02] vkgfx: like reading instruction from memory, loading data, executing instruction, etc.
[17:18:09] vkgfx: they flow along a pipeline
[17:18:26] vkgfx: pipelining means that you can be loading the next instruction's data while you executing the previous one
[17:18:34] dblessing: has joined #ruby
[17:18:39] vkgfx: and you can be loading the instruction for the instruction after that
[17:18:53] toretore: sure, but they don't depend on each other
[17:18:58] vkgfx: sometimes they do
[17:19:01] vkgfx: that causes a stall
[17:19:12] tlarevo: has joined #ruby
[17:19:13] vkgfx: but it can also be resolved by making a data path
[17:19:27] vkgfx: so that data from one instruction can be redirected back to the next one that uses it
[17:19:28] toretore: at least in the case of "superscalar" architecture
[17:20:03] toretore: the whole point being that they can be executed in parallel because they're not waiting on each other
[17:20:35] vkgfx: pipelining and superscalar execution are not that same thing toretore
[17:20:38] charliesome: has joined #ruby
[17:20:42] [k-|: add -> mov can be in parallel but mov -> add cannot?
[17:22:37] eam: [k-|: depends on what's going on where
[17:23:04] eam: if nothing interacts with the memory being touched then there's probably no issue
[17:23:14] pipework: Did someone mention pipes?
[17:24:12] shadoi: has joined #ruby
[17:25:22] postmodern: has joined #ruby
[17:26:10] afrianska: has joined #ruby
[17:26:44] havenwood: https://github.com/matz/streem
[17:27:08] havenwood: PIPE ALL THE THINGS \o/
[17:27:11] toretore: thinking of everything as a stream is interesting
[17:27:26] havenwood: [0, 1, 1].map(&:expensive).async(:waterfall).map(&:processed_as_piped_from_expensive).async(:round_robin).to_a
[17:27:29] [k-|: isnt that haskell
[17:28:02] toretore: it's basically.. what are they calling it? the .net guys
[17:28:32] toretore: or java 8 streams
[17:28:38] blaines: has joined #ruby
[17:28:48] Excelsior2015_: has joined #ruby
[17:29:08] bronson: has joined #ruby
[17:30:03] toretore: reactive is what i was looking for
[17:30:32] havenwood: pipeline parallelism ftw
[17:33:07] revath: has joined #ruby
[17:33:50] havenwood: I'd love it if Ruby had pipeline parallelism similar to what's planned for Elixir 1.3: http://www.youtube.com/watch?v=EaP0y4pdKD0&t=47m24s
[17:34:06] baweaver: has joined #ruby
[17:34:24] airy: maybe it will bw in gsoc..
[17:34:46] aryaching: has joined #ruby
[17:35:25] [k-|: time to beg?
[17:36:04] toretore: havenwood: that can be done without explicit language support
[17:36:36] blue_deref: has joined #ruby
[17:36:39] toretore: just need someone to build it
[17:36:41] nwhirschfeld: has joined #ruby
[17:37:12] toretore: and i don't like the cutesy syntax :/
[17:37:25] msnyon: has joined #ruby
[17:37:44] two-gun: has joined #ruby
[17:38:30] lkba: has joined #ruby
[17:38:31] alphaatom|pc: has joined #ruby
[17:38:36] DLSteve: has joined #ruby
[17:39:36] Ilyas: has joined #ruby
[17:39:44] [k-|: we have <|> in haskell... whatever that is
[17:40:02] [k-|: but the elixir code looks ~beautiful~
[17:40:14] [k-|: i shall add it to my list of things to learn
[17:40:23] acke: has joined #ruby
[17:41:29] two-gun: evening all. I'm having trouble with a gem called wordmove (am i in the right channel?) the stack is vagrant/vvv/wordmove for wordpress but my problem is wordmove seems to have been install at root. if i do sudo gem list, it shows up, if i do gem list, it doesn't. this is a problem because wordmove uses rsync to push the wp site to the production server. it's no good if i can only do that as root. is it a st
[17:41:35] two-gun: raightforward thing to change the path or something? I'm not so fluent with this stuff yet. thanks
[17:42:19] crdpink: has joined #ruby
[17:42:45] Scroff: has joined #ruby
[17:43:12] havenwood: two-gun: Yup, this is the right channel. See: gem help install | grep user\-install -A1
[17:43:12] s2013: has joined #ruby
[17:43:27] diegoviola: has joined #ruby
[17:43:37] [k-|: i hardly use any gems
[17:44:05] havenwood: two-gun: You can put a `gem: --user-install` in your ~.gemrc or install the gem with: gem install foo --user-install
[17:44:05] tubuliferous_: has joined #ruby
[17:44:28] havenwood: two-gun: To install in your home directory instead of system. ^
[17:45:02] casadei: has joined #ruby
[17:45:52] two-gun: havenwood: is there anyway to modify it as it stands. it was installed as part of a shell script and i'm a little unsure if i remove it and re-install it what might fall apart. to build the vagrant virtual machine takes forever an di've already done it 3 times. thanks for your help
[17:45:53] kohgpat: has joined #ruby
[17:47:08] havenwood: two-gun: Do you have just one Ruby installed? Ubuntu system Ruby?
[17:47:40] two-gun: havenwood: how might i check that?
[17:48:00] havenwood: two-gun: uname -a
[17:48:01] havenwood: two-gun: which ruby
[17:48:12] lucianosousa: has joined #ruby
[17:48:19] havenwood: two-gun: which -a ruby
[17:48:24] two-gun: i might have 2. i just did ruby -v and sudo ruby -v
[17:48:35] two-gun: different version numbers :-O
[17:49:03] havenwood: two-gun: Do you get anything for?: command -v rvm
[17:49:21] two-gun: uname -a: Linux vvv 3.13.0-55-generic #92-Ubuntu SMP Sun Jun 14 18:33:09 UTC 2015 i686 i686 i686 GNU/Linux
[17:49:43] two-gun: which ruby: /usr/local/rvm/rubies/ruby-2.2.1/bin/ruby
[17:49:45] havenwood: So I'm guessing Ubuntu system Ruby as well as RVM.
[17:50:19] two-gun: which -a ruby/usr/local/rvm/rubies/ruby-2.2.1/bin/ruby
[17:50:20] two-gun: /usr/bin/ruby
[17:50:28] havenwood: two-gun: So when you use `sudo` it is dropping your RVM env which gives you system Ruby.
[17:50:47] trieepiee: has joined #ruby
[17:50:58] trieepiee: if I want to learn ruby today what's the best way to do so
[17:51:04] havenwood: two-gun: There's an `rvmsudo` that keeps the RVM env while elevating privileges.
[17:51:22] two-gun: havenwood: that sounds interesting...
[17:51:29] havenwood: trieepiee: This is a good place to ask questions. Here are some links: http://ruby-community.com/pages/links
[17:51:39] msnyon: has joined #ruby
[17:51:53] nofxxxx: trieepiee, codeschool, code achademy, chris pine learn to program
[17:52:39] two-gun: trieepiee: not sure what this community thinks of code academy but you could start that right now. might be nice to just dive in (i haven't done it myself)
[17:52:46] havenwood: trieepiee: The Learn to Program book ^ is a gentle introduction if this is your first foray into programming.
[17:52:47] nofxxxx: two-gun, which version ubuntu is shipping from apt? if it's > 2.2 you might just well drop rvm, it'll just cause headaches
[17:53:03] havenwood: https://www.brightbox.com/docs/ruby/ubuntu/
[17:53:13] Outlastsheep: http://mislav.uniqpath.com/poignant-guide/book/ It's outdated since it explains an older version of Ruby (most of the info's still relevant though). But it's still the most *entertaining* way to go.
[17:53:20] sdwrage: has joined #ruby
[17:53:26] trieepiee: thanks all of you
[17:53:39] havenwood: Outlastsheep: And it has a soundtrack, which is lacking from most other programming books.
[17:53:41] Outlastsheep: trieepiee: you're welcome!
[17:53:52] Outlastsheep: havenwood: and cartoon foxes! _Cartoon Foxes_, man!
[17:53:59] havenwood: Chunky. Bacon.
[17:54:07] Outlastsheep: Yeah dude, chunky bacon.
[17:54:20] two-gun: nofxxxx: not sure i understand but my ubuntu is trusty tahr About 645,000 results (0.31 seconds)
[17:54:23] two-gun: Search Results
[17:54:28] airy: rubymonk is goodone too
[17:54:33] two-gun: Ubuntu 14.04
[17:54:49] nofxxxx: two-gun, the ruby version you get from apt
[17:54:56] atmosx: out of 200 porn domains on my list, only 68 are still active (I've got the list from UK black-list website)
[17:55:08] atmosx: difficult times for the porn industry
[17:55:18] atmosx: I wonder what kind of taxes do they pay
[17:55:20] arup_r: has joined #ruby
[17:55:36] Scripore: has joined #ruby
[17:55:38] havenwood: nofxxxx: Old, but Brightbox maintains a good ruby2.2 package for Ubuntu.
[17:55:40] dfockler: If they make money, they have to pay taxes
[17:56:01] dfockler: but this is offtopic :P
[17:56:09] rbennacer: is there a function in Hash api that does something like array map ? ex h= {1=>2,3=>4} , h.map{+1}... => {1=>3,3=>5}
[17:56:25] Outlastsheep: Why's Poignant Guide was how I learnt ruby. It was amazing. Giggling to myself during school classes.
[17:56:27] sarmiena_: has joined #ruby
[17:56:41] havenwood: >> {1=>2,3=>4}.map { |k, v| [k, v.next] }.to_h
[17:56:42] ruboto: havenwood # => {1=>3, 3=>5} (https://eval.in/385688)
[17:56:46] havenwood: rbennacer: ^
[17:57:24] rbennacer: havenwood: :) L(
[17:57:25] michael_mbp: has joined #ruby
[17:57:27] vickleton: has joined #ruby
[17:57:42] airy: hey ruboto are you from ruboto grp?
[17:57:49] rbennacer: havenwood: i was trying to avoid that hehe
[17:58:31] havenwood: rbennacer: require 'hashy'; h.map_value &:next
[17:58:58] [k-|: havenwood: i prefer succ
[17:59:10] rbennacer: havenwood: it looks more like what i want, thank you
[17:59:11] havenwood: rbennacer: Or: class Hash; def map_value; each_with_object({}) { |(k, v), h| h[k] = yield(v) } end end
[17:59:19] diegoviola: has joined #ruby
[17:59:29] havenwood: rbennacer: ^ if you want to just add it yourself.
[18:00:14] flughafen_: has joined #ruby
[18:01:13] crowell: why_'s poignant guide is really not a very good oen
[18:02:01] [k-|: i read the first chapter, didnt understand it, closed it
[18:02:04] JoshGlzBrk: has joined #ruby
[18:02:14] havenwood: Chunky bacon? Check. Soundtrack? Check. Live a little!
[18:02:33] jhass: it's a good read once you know Ruby :P
[18:03:00] unshadow: has joined #ruby
[18:03:11] airy: dave thomas now with erlang left ruby it seems..
[18:03:19] momomomomo: has joined #ruby
[18:03:22] [k-|: oh, so theres the chunky bacon reference
[18:04:06] hahuang65: has joined #ruby
[18:04:10] quimrstorres: has joined #ruby
[18:04:22] Jackneill: has joined #ruby
[18:05:46] bluish: has joined #ruby
[18:05:48] djbkd: has joined #ruby
[18:05:50] droidburgundy: has joined #ruby
[18:06:43] jerius: has joined #ruby
[18:09:10] [k-|: i wished i knew some gems, but the truth is, i dont do much ??\_(???)_/??
[18:09:49] [k-|: my gems: https://gist.github.com/SkyBirdSoar/01f7b61e8dbd71925bf4
[18:10:17] [k-|: im not sure why i have so many
[18:10:34] [k-|: i just installed finishing_moves and all these gems came up
[18:10:55] Regulati_: has joined #ruby
[18:11:11] airy: k- freenode is irritating much everytime someone join or leaft it give notifiacation. which irc you all are using?
[18:11:12] baweaver: has joined #ruby
[18:11:26] dudedudeman: you can turn that feature off in options
[18:11:37] [k-|: very good irc client???
[18:11:45] dudedudeman: top left if you're already in a channel, and it's in the middle if you're at the sign on page
[18:11:45] wasamasa: air_: smartfilter ftw
[18:11:47] Stan: has joined #ruby
[18:11:56] dudedudeman: it does what i need it to
[18:11:57] wasamasa: then give up
[18:11:57] [k-|: yup i definitely turned join/parts off
[18:12:18] jhass: wasamasa: pidgin actually has a plugin that does smart filter :D
[18:12:27] wasamasa: ACTION rolls eyes
[18:12:36] dudedudeman: i think you were the on that told me about that, jhass
[18:12:48] wasamasa: guess they've got better things to do than fixing this gaping wound libpurple is
[18:12:55] [k-|: but is pidgin a real irc client
[18:13:05] jhass: [k-|: what's an unreal one?
[18:13:16] Aria: Not sure what makes something 'real' vs 'not'.
[18:13:17] Aria: It exists.
[18:13:20] Aria: Therefore it's real?
[18:13:36] jhass: oooh metaphyisics
[18:13:42] Outlastsheep: Something like "SuperLobsterMealWithCaviarIRC" doesn't exist.
[18:13:48] Outlastsheep: Because nobody has made it yet.
[18:13:53] momomomomo_: has joined #ruby
[18:13:56] two-gun: havenwood: thanks for your help. i fear i've run out of time. might get another chance to look at this later tongiht. thanks
[18:13:57] dudedudeman: ugh. i don't have time for another existential crisis today. not regarding irc at least
[18:14:06] kies: has joined #ruby
[18:14:06] icarus: has joined #ruby
[18:14:07] [k-|: i dont know how to define real
[18:14:15] [k-|: but i'll get it soon enough
[18:14:30] [k-|: i'll just fetch one from urbandictionary in the mean time
[18:14:32] havenwood: two-gun: You're welcome. Let us know if you get stuck later, I'm sure we can get you sorted.
[18:15:26] havenwood: [k-|: That's on-topic in #ruby-offtopic!
[18:15:42] Aria: friends don't let friends use urbandictionary.
[18:16:07] platzhirsch: has left #ruby: ()
[18:17:02] airy: ohoo eehich otion you are choosing for making thatshit off..
[18:18:05] two-gun_: has joined #ruby
[18:18:15] zeroDi: has joined #ruby
[18:18:25] [k-|: hide join/parts?
[18:18:33] RegulationD: has joined #ruby
[18:18:36] airy: hide join parts queue. its unlocked still its functioning.
[18:18:56] bkxd: has joined #ruby
[18:19:08] [k-|: i have no idea what you are saying
[18:19:44] airy: i have turned it off and click on save. but its not working.
[18:19:58] dudedudeman: might be worth trying a different browser
[18:20:15] geilt: has joined #ruby
[18:20:16] airy: firefox using on linux
[18:20:30] [k-|: are you considering to stay for long periods of time?
[18:20:59] failshell: has joined #ruby
[18:21:51] gagrio: has joined #ruby
[18:23:26] nveselinov: has joined #ruby
[18:24:14] air__: has joined #ruby
[18:25:00] yh: has joined #ruby
[18:25:31] [k-|: get a "real" client then
[18:25:39] [k-|: irc is srz biznuz
[18:25:47] [k-|: try hexchat
[18:25:53] n008f4g_: has joined #ruby
[18:26:08] air__: its for only 30 daystrail i think
[18:26:44] air__: now its working that option works but opposite way.
[18:26:50] [k-|: hexchat is free
[18:26:58] pietr0_: has joined #ruby
[18:27:21] ponga: shevy: matz talks about typing in ruby again.. do you like his ideas?
[18:27:27] air__: when i turns it off its on , but when i turn it on it got off
[18:27:32] Andriamanitra: has left #ruby: ("morjs")
[18:28:00] quimrstorres: has joined #ruby
[18:28:38] yqt: has joined #ruby
[18:28:51] [k-|: air__ that is really an issue you have to figure out
[18:30:52] BrianBoyko1: has joined #ruby
[18:31:20] vasilakisFiL: has joined #ruby
[18:31:20] BrianBoyko1: Hello. I could use some ruby help connecting to a postgresql database, does anyone have any experience there?
[18:31:40] ruboto: Just ask your question, if anyone has or can, they will respond.
[18:32:34] ivanskie: has joined #ruby
[18:33:12] djbkd: has joined #ruby
[18:33:17] ponga: >> p "I am here!"
[18:33:18] ruboto: ponga # => "I am here!" ...check link for more (https://eval.in/385701)
[18:33:35] kerrizor: has joined #ruby
[18:33:37] workmad3: has joined #ruby
[18:33:49] BrianBoyko1: I have a program - written by someone else - that processes Stripe payments. I'd like to create a log of those payments (just e-mail and amount) to a PG database. Difficulty: I'm a newbie programmer. Ultra Hardcore Difficulty: studying Javascript.
[18:34:28] BrianBoyko1: so basically, I just have to pass @amount and @email to a database.
[18:34:54] BrianBoyko1: This program doesn't need to retrieve anything.
[18:35:02] adaedra: Most direct way is pg. If you want a nice layer in top of that, you have Sequel.
[18:35:02] baweaver: has joined #ruby
[18:35:34] BrianBoyko1: I'm going through the pg docs now and I'm more or less lost. Especially since I can't get this program to run locally.
[18:35:36] Zai00: has joined #ruby
[18:36:06] freerobby: has joined #ruby
[18:36:15] adaedra: Which program? The code you were given?
[18:36:18] psye: has joined #ruby
[18:36:48] cir0x: has joined #ruby
[18:36:51] BrianBoyko1: Yes - I'm getting the old "you have the wrong version of ruby" error. Problem is, I've done everything to get it to the right version of Ruby and it's still thinking I have the wrong version of Ruby
[18:37:02] symm-: has joined #ruby
[18:37:36] senayar: has joined #ruby
[18:37:36] senayar: has joined #ruby
[18:37:48] adaedra: what do you mean by "to get it to the right version", what did you do?
[18:37:52] jhass: something's literally printing you "you have the wrong version of ruby"? if so what's that?
[18:37:56] dstarh: has joined #ruby
[18:39:01] BrianBoyko1: bundle install
[18:39:01] BrianBoyko1: conn = PG.connect( dbname: 'sales' )
[18:39:18] BrianBoyko1: here's the error:
[18:39:19] BrianBoyko1: Your Ruby version is 2.1.2, but your Gemfile specified 2.1.5
[18:40:05] adaedra: ok, what do you mean now by: I've done everything to get it to the right version
[18:40:06] air__: ha ha version error
[18:40:44] [k-|: its not nice to laugh at people :(
[18:40:58] Rubie: has joined #ruby
[18:40:59] [k-|: i bet he was pulling his hairs out over this
[18:41:03] Scroff: has joined #ruby
[18:41:34] BrianBoyko1: You're right.
[18:41:41] BrianBoyko1: I mean, you're mean, but you're right.
[18:41:50] RegulationD: has joined #ruby
[18:42:08] jhass: heh, I'm sure we can get through this, how did you install Ruby?
[18:42:18] BrianBoyko1: Well, I've googled how to change ruby versions, I've installed the latest version of ruby, I've installed rvm (and that was an ordeal) and at the end - I still get this error
[18:42:26] BrianBoyko1: sudo apt-get install ruby ruby-dev
[18:42:35] Scripore: has joined #ruby
[18:42:36] jhass: but you have rvm now?
[18:42:45] jhass: what's the output of?: rvm current
[18:42:53] ruboto: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[18:43:00] BanzaiJoe: has joined #ruby
[18:43:08] jhass: adaedra: it's a single line...
[18:43:35] jhass: what's the exact command you run that claims it's Ruby 2.1.2 ?
[18:43:36] GitGud: has joined #ruby
[18:43:41] BrianBoyko1: bundle install
[18:43:46] atom3: has joined #ruby
[18:43:55] yoongkang: has joined #ruby
[18:44:09] jhass: what's?: which bundle
[18:44:21] fabrice31: has joined #ruby
[18:44:35] BrianBoyko1: https://github.com/thoughtpolice/heroku-stripe-donate
[18:44:50] BrianBoyko1: my local version of *that* code which lives on my heroku.
[18:45:00] jhass: "which bundle" is a command too
[18:45:05] geiltalasdair: has joined #ruby
[18:45:09] momomomomo_: has joined #ruby
[18:45:21] jhass: calling the command which with the argument bundle
[18:45:27] BrianBoyko1: Next you'll be telling me to run WHOSE on FIRST
[18:45:52] BrianBoyko1: /usr/bin/bundle
[18:45:57] jhass: okay, suspected as much
[18:45:59] vasilakisFiL: has joined #ruby
[18:46:14] jhass: try running, without sudo or anything just plain that: gem install bundler
[18:46:18] jhass: then bundle install again
[18:46:32] BrianBoyko1: gem installed
[18:47:16] vasilakisFiL: has joined #ruby
[18:47:20] tcrypt: has joined #ruby
[18:47:20] BrianBoyko1: It's running now.
[18:48:12] BrianBoyko1: https://github.com/thoughtpolice/heroku-stripe-donate
[18:48:30] BrianBoyko1: Post-install message from httparty:
[18:48:30] BrianBoyko1: When you HTTParty, you must party hard!
[18:49:08] vasilakisfil_: has joined #ruby
[18:49:20] nobitanobi: has joined #ruby
[18:49:59] geiltadecht: has joined #ruby
[18:50:42] vasilakisfil__: has joined #ruby
[18:50:59] alphaatom: has joined #ruby
[18:51:00] Al3ks: has joined #ruby
[18:51:06] jaycee: has joined #ruby
[18:51:21] geilt: has joined #ruby
[18:51:34] geilt: has joined #ruby
[18:53:58] BrianBoyko1: Okay - new question - how do you concatinate a string in Ruby?
[18:54:19] Aria: string + string
[18:54:22] jhass: there's "string " + concatenation but we prefer "string #{interpolation}"
[18:54:27] Aria: or string << string if you don't mind modifying the original left one.
[18:54:32] BrianBoyko1: So, say, I wanted to @conn.exec("INSERT INTO donors VALUES ("@email", "@amount);")
[18:54:32] Beoran_: has joined #ruby
[18:54:48] jhass: there please please use bind params
[18:54:50] Aria: Well, for SQL, you should be using parameterized queries.
[18:55:05] Aria: Because the first Bobby Tables you run into will hose your database.
[18:55:10] BrianBoyko1: Paramatawhozamagia querwhatitzs?
[18:55:12] jhass: @conn.exec("INSERT INTO donors VALUES (?, ?)", @email, @amount)
[18:55:30] jhass: that's a feature of pg though, not ruby
[18:55:30] [k-|: "(%s, %s)" % [@email, @amount]
[18:55:38] jhass: not for this case
[18:55:56] chinmay_dd: has joined #ruby
[18:56:05] [k-|: we need to sanitize it anyway
[18:56:15] jhass: s/anyway//
[18:56:48] BrianBoyko1: So, does this text, starting at Line 151 and ending at line 158, look good to you??
[18:56:48] BrianBoyko1: https://gist.github.com/brianboyko/18962d7c16ebb548cdba#file-gistfile1-txt-L151
[18:57:32] [k-|: you can def something in begin statements? :O
[18:57:45] [k-|: also, your indentation is weird
[18:57:46] commondream: has joined #ruby
[18:57:56] BrianBoyko1: that's because I've never used ruby
[18:58:12] baroquebobcat: has joined #ruby
[18:58:25] jhass: doubt that's going to work that way :/
[18:58:48] djbkd_: has joined #ruby
[18:59:00] [k-|: inconsistent style is a code smell
[18:59:01] jhass: you have two options here, either assign the connection to a CONSTANT like it's done for LOG and pray it stays open
[18:59:01] BrianBoyko1: where should I put the def?
[18:59:16] BrianBoyko1: Yeah, well, the only lines I wrote were 151 and 156
[18:59:18] jhass: or you reconnect to the db for each query
[18:59:30] jhass: which is slower but easier to get stable
[18:59:31] [k-|: you can't put a definition in a proc!
[18:59:50] jhass: for the latter case I'd suggest you follow the example of the push_msg method you got there
[18:59:58] Channel6: has joined #ruby
[19:00:44] jhass: and then use a local_variable for conn inside the method and move the conn.exec inside too
[19:01:47] BrianBoyko1: Sounds solid, but the truth is that I don't even know what a method in ruby looks like.
[19:02:43] claw: has joined #ruby
[19:03:02] jhass: it's the things that start with def
[19:03:23] asmodlol: has joined #ruby
[19:03:47] workmad3: has joined #ruby
[19:04:09] BrianBoyko1: so, something like this https://gist.github.com/brianboyko/fb65cc80baeedb385942#file-gistfile1-txt-L93 -- line 93 and line 162?
[19:04:55] framling: has joined #ruby
[19:05:08] jhass: that's the right place, and 162 looks good too, 93 just doesn't match it yet
[19:05:19] bhorn1: has joined #ruby
[19:05:31] jhass: that is connect is never called
[19:05:45] jhass: and as said I'd say just move the connection inside log_donation
[19:05:57] air__: https://gist.github.com/aj07/4b2a791ee42578b82631 is there anything wrong in these code.. its not running
[19:06:39] BrianBoyko1: So https://gist.github.com/brianboyko/0476f6554cb0201a6e2f
[19:06:42] jhass: air__: "not running" is not a useful problem description. Detail your expectations and the behavior you observe instead
[19:07:01] jhass: BrianBoyko1: yeah, which makes the @ superfluous, just conn
[19:07:02] fantazo: has joined #ruby
[19:07:14] jhass: BrianBoyko1: btw gists have an edit button ;)
[19:07:37] BrianBoyko1: conn.exec then, not @conn.exec -- right, cause I don't have to declare the local variable twice.
[19:07:45] jhass: oh and the @'s for email and amount need to go too
[19:07:48] jhass: they're parameters now
[19:07:57] air__: jhass: i want to call addressbook via ffi and while running make command its asking .so file
[19:08:20] jhass: BrianBoyko1: @ doesn't declare a variable, they're @instance_variables
[19:08:22] BrianBoyko1: Isn't that always the way. Your little variables becoming parameters before you know it. Brings a tear to the eye.
[19:08:45] jhass: air__: keep in mind that we don't see your screen
[19:09:01] BrianBoyko1: Okay, so theoretically, this should work. (Realistically, I doubt it will, but we can debug later.)
[19:09:11] air__: ok i am posting my error too
[19:09:34] jhass: BrianBoyko1: what's "this"? did you remove the @ in @conn = PG.connect too?
[19:09:48] BrianBoyko1: no, i didn't.
[19:09:52] blackmes2: has joined #ruby
[19:09:57] Rollabunna: has joined #ruby
[19:10:04] jhass: local_variable, @instance_variable, $global, Constant
[19:10:15] jhass: so @foo and foo are two different variables
[19:11:02] jhass: oh and @@class_vars but the actual usecases for these are very rare
[19:11:24] Aria: And instance variable on a class.
[19:11:34] Aria: (which is usually what one wants instead of @@vars)
[19:11:50] air__: jhass check it.
[19:11:56] jackjackdripper: has joined #ruby
[19:12:28] jhass: air__: where's addressbook.so located?
[19:12:41] bdnelson: has joined #ruby
[19:13:05] quimrstorres: has joined #ruby
[19:13:15] BrianBoyko1: It's giving me "payment failed, unknown error"
[19:13:20] air__: it has been not made. i think it has been made by make command
[19:13:21] slawrence00: has joined #ruby
[19:13:34] asmodlol: has joined #ruby
[19:13:52] bronson: has joined #ruby
[19:14:24] jhass: air__: it has or it hasen't? either way it needs to exists before you can load it (= before you can start your ruby program)
[19:14:47] jobewan: has joined #ruby
[19:15:07] jhass: BrianBoyko1: probably just didn't setup the credentials correctly or something, check the DB whether that part worked
[19:15:12] Rubie: has joined #ruby
[19:15:41] alphaatom: has joined #ruby
[19:15:48] creakybones: has joined #ruby
[19:15:49] jhass: mmh, that is unless it failed in the stripe call even before that
[19:16:25] ringarin: has joined #ruby
[19:17:34] ringarring_: has joined #ruby
[19:18:55] rikai: has joined #ruby
[19:19:02] BrianBoyko1: Say, Jhass, can you do me a favor and send a direct message to me with your Github name, I'd love to give you credit on the blog.
[19:20:28] jhass: oh no worries, that was hardly any work ;)
[19:20:42] BrianBoyko1: No, but you're teaching me.
[19:20:55] BrianBoyko1: Sort of. I mean, it still doesn't work (you were right about the DB name though)
[19:20:57] jhass: yeah, that's what I'm here for, nothing special ;)
[19:21:57] husanu: has joined #ruby
[19:23:06] asmodlol: has joined #ruby
[19:23:23] BanzaiJoe: has joined #ruby
[19:23:48] choke: has joined #ruby
[19:24:25] peter_paule: has joined #ruby
[19:24:32] mary5030: has joined #ruby
[19:24:56] sandstrom: has joined #ruby
[19:26:10] malconis_: has joined #ruby
[19:26:37] BrianBoyko1: Well, I'm stuck...
[19:27:17] Igorshp: has joined #ruby
[19:27:19] Scroff: has joined #ruby
[19:27:32] BrianBoyko1: Are you sure I'm calling this function correctly? https://gist.github.com/brianboyko/0476f6554cb0201a6e2f#file-gistfile1-txt-L160
[19:28:35] otherj: has joined #ruby
[19:28:50] jhass: yeah, that part seems right
[19:28:51] ivanskie: perhaps a dumb question...
[19:29:01] ivanskie: warning: redefining Object#initialize may cause infinite loop
[19:29:19] ivanskie: whats wrong with me writing my own initialize block?
[19:29:47] mary5030_: has joined #ruby
[19:30:12] ivanskie: its not in a module.. just a single lonesome .rb file
[19:30:19] BrianBoyko1: Hmm... I don't understand why the code breaks when I add my logging code, but worked before...
[19:30:31] jhass: BrianBoyko1: my guess is it fails in the Stripe call before that already, we can verify if you just add a puts e.backtrace or LOG.error(e.backtrace) in lines 178, 185 and 196 and share the output
[19:30:45] jhass: oh, you had it working locally before?
[19:31:35] BrianBoyko1: okay. That'll show up in the console, correct?
[19:31:42] jhass: ?code ivanskie
[19:31:42] ruboto: ivanskie, We can't help you without your code, please post it to https://gist.github.com
[19:31:51] jhass: BrianBoyko1: I hope so
[19:32:24] ivanskie: here's my dirty code https://gist.github.com/i5okie/227f313ce78ea589dc74
[19:32:25] atomical: has joined #ruby
[19:33:04] ivanskie: im not worried about refactoring at this point.. just need basic functionality laid out then will refactor and all that.
[19:33:20] jhass: ivanskie: ah well. Okay the issue here is that toplevel methods are actually added as private methods to the class Object which is the default base class for all other classes
[19:33:28] BrianBoyko1: It's not generating anything other than POST https://thisguy-donation.herokuapp.com/charge 500 (Internal Server Error)
[19:33:39] snockerton: has joined #ruby
[19:33:45] jhass: ivanskie: so you redefine the default initialize method of all classes that don't define their own
[19:33:47] mikecmpbll: has joined #ruby
[19:33:57] jhass: best just pick a different name
[19:34:06] ivanskie: what would be the best practice here? make my own class?
[19:34:27] abyss: [k went home? bnagy thank you for your help. Tommorow I will check it on 2.x ruby.
[19:34:30] ivanskie: im usually working with rails. so this is a first doing Ruby alone stuff..
[19:34:36] jhass: BrianBoyko1: nothing in the logs? hard to believe...
[19:34:48] jhass: running on heroku? check heroku logs iirc
[19:34:54] BrianBoyko1: Heroku has logs?
[19:35:13] jhass: heroku logs as command literally
[19:35:48] workmad3: has joined #ruby
[19:35:58] zly: has joined #ruby
[19:36:00] ivanskie: okay moving on. thanks!
[19:36:14] khebbie: has joined #ruby
[19:36:43] jhass: ivanskie: btw ruby's community is strong on using snake_case instead of headlessCamlCase ;)
[19:37:27] BrianBoyko1: 2015-06-22T19:33:02.203694+00:00 app[web.1]: PG::ConnectionBad - could not connect to server: No such file or directory
[19:37:44] Aria: unix domain socket connection
[19:37:51] Aria: And it's not where it expects it to be.
[19:37:58] ivanskie: yeah this stuff is mixing with me trying to learn JS and Ember lol.. earlier I was scratching my scrambled brain head trying to remember how to declare a function in ruby.. i was like. do not ask in irc!
[19:38:29] Aria: I do wish language channels were more polyglot friendly.
[19:38:54] jhass: let's make a new channel for each combination!
[19:39:09] jhass: #cppandabitperlandjs
[19:39:31] slackbotgz: has joined #ruby
[19:39:36] BrianBoyko1: Jember. Rubescript, Javerlang
[19:39:48] ivanskie: might as well name it #brainscrambler-cppanddabitperlandjs
[19:40:00] ivanskie: no one will ever know what ur talking about
[19:40:08] jhass: BrianBoyko1: so yeah, your connect call doesn't fit what you can reach on Heroku
[19:40:21] jhass: where's the DB supposed to be?
[19:41:07] BrianBoyko1: Well, it's telling me the URL is postgres://qucsbxejiqhfnl:CQkNveZA21tUrTs046lhgHcBGg@ec2-54-227-247-161.compute-1.amazonaws.com:5432/d1e3fv1kfb1muf
[19:41:17] Aria: GOodness.
[19:42:11] baweaver: has joined #ruby
[19:42:40] freerobby: has joined #ruby
[19:42:45] jhass: https://devcenter.heroku.com/articles/heroku-postgresql#connecting-in-ruby of course heroku only has a Rails example :/
[19:42:46] BrianBoyko1: it's probably on Mars.
[19:43:26] BrianBoyko1: Can I put this ruby app on rails?
[19:43:34] BrianBoyko1: (if I knew what rails was)
[19:44:04] bronson: has joined #ruby
[19:44:11] platzhirsch: has joined #ruby
[19:44:13] jhass: so, if you peek at the python example, I think we can do something similar
[19:44:50] BrianBoyko1: ding ding ding, we're now on programming language # 4!
[19:45:01] jhass: require "uri" at the top
[19:45:19] jhass: uri = URI.parse(ENV["DATABASE_URL"]) in the method
[19:45:39] BrianBoyko1: You sure it's URI and not URL?
[19:45:53] crdpink2: has joined #ruby
[19:46:07] jhass: :database => uri.path[1..-1]
[19:46:20] jhass: :user = uri.user
[19:46:28] jhass: you get the idea
[19:46:46] ellisTAA: has joined #ruby
[19:47:03] jhass: :password => uri.password, :host => uri.host, :port => uri.port
[19:47:17] ellisTAA: why isn???t an api called an ari - application resource interface? aren???t we getting resources?
[19:47:38] jhass: not in all cases, no
[19:47:51] jhass: API is very general term
[19:47:53] ivanskie: ok I have no idea what I'm doing now
[19:48:13] ivanskie: https://gist.github.com/i5okie/227f313ce78ea589dc74
[19:48:42] ivanskie: do I add PrintJobs.new on the bottom somewhere? or.. lolz i feel dumb now. wow way out of practice
[19:48:55] asmodlol: has joined #ruby
[19:48:58] jhass: ivanskie: yep, exactly that
[19:49:18] ellisTAA: jhass: what would those other cases be doing?
[19:49:30] jhass: EllisTAA: trigger an action for example
[19:49:34] jhass: like "turn on the light"
[19:49:54] ellisTAA: so that would be using a post method?
[19:50:01] jerius: has joined #ruby
[19:50:24] atmosx: ivanskie: readData(file) <-- line 18 is not defined
[19:50:36] jhass: in a RESTful web based API, likely, or a PUT to update the state of the light resource, but you don't have to model it that way
[19:51:10] malconis: has joined #ruby
[19:51:15] atmosx: ivanskie: you probably mean read_data(file)
[19:51:37] ellisTAA: so if apis only accepted get requests it would be just a way to access resources, but since it can accept puts or delete or post it is called a programming interface
[19:52:05] ivanskie: ok now if I knew how to properly work with csv.. (reading docs, and examples)... I think the best way here.. would be to build an array of files inside the get_files block..
[19:52:18] ellisTAA: so an api is an api because you can create read update and delete?
[19:52:22] atmosx: ivanskie: you don't need the initialize method either
[19:52:26] jhass: EllisTAA: I'm sure there are API's out there that let you trigger stuff via GET's, not saying they're pretty but it doesn't disqualify them for the term API
[19:52:39] BrianBoyko1: So, like this? https://gist.github.com/brianboyko/0476f6554cb0201a6e2f
[19:52:41] ivanskie: thought it looks better with it. but..
[19:52:46] atmosx: ivanskie: you're not setting any instance variables, why do you need it?
[19:53:00] atmosx: you dont. Your class looks more like a module to me :-)
[19:53:08] jhass: BrianBoyko1: ah no, I meant to replace the parameters in the PG.connect call with that
[19:53:09] sinkensabe: has joined #ruby
[19:53:12] ivanskie: i think it is too.
[19:53:32] alphaatom: has joined #ruby
[19:53:46] jhass: BrianBoyko1: ENV accesses the environment variables, like you can see with heroku config
[19:54:08] jhass: BrianBoyko1: so literally uri = URI.parse(ENV["DATABASE_URL"])
[19:54:12] ivanskie: basically what I have to work with.. is.. something else out there.. creates a new csv file every day... then once something gets printed, the csv file gets populated with some information like what got printed, productID etc...
[19:54:22] jhass: BrianBoyko1: and then use uri to pull out the values in the PG.connect call
[19:54:34] jhass: BrianBoyko1: don't forget to pull out the host and port too
[19:54:42] Zai00: has joined #ruby
[19:54:48] ivanskie: what I need to do is read each CSV file.. and count how many times each unique productID got printed.. or is mentioned per day..
[19:54:54] BrianBoyko1: https://gist.github.com/brianboyko/0476f6554cb0201a6e2f
[19:56:23] iPdev: has joined #ruby
[19:56:24] ivanskie: man this is like most basic ruby stuff.. yet I feel like im in ruby 101 class.
[19:56:25] jhass: BrianBoyko1: yes close, like this http://paste.mrzyx.de/p4imklzsn
[19:56:43] ivanskie: if only it was an activerecord database lol
[19:57:24] MuffinPimp: has joined #ruby
[19:57:26] two-gun_: has left #ruby: ()
[19:58:00] atmosx: ivanskie: https://gist.github.com/atmosx/b598c19124a59ad0b97a
[19:58:04] skyjumpe1: has joined #ruby
[19:58:13] freerobby: has joined #ruby
[19:58:32] ivanskie: ic what u did ther
[19:58:35] BrianBoyko1: And I use the real URL, not DATABASE_URL, right?
[19:59:14] User458764: has joined #ruby
[19:59:25] atmosx: ivanskie: Well, once you read the CSV data you can do anything you want, it's not hard. Just try to analyze the problem and take one step at a time.
[19:59:44] atmosx: ivanskie: once you have a owrking version, (no matter how long/wrong/bad) you can start to optimize your code.
[19:59:44] ivanskie: yep. gonna try to play around in irb for a bit
[20:00:14] jhass: BrianBoyko1: no, ENV["DATABASE_URL"] obtains the real one
[20:00:20] charliesome: has joined #ruby
[20:00:48] ivanskie: cause one tutorial showed the headers thing.. and he was doing .to_a.map { |row| row.to_hash }.. but that doesn't work if i do my_data = CSV.read.. works only with CSV.new but then he doesn't actually show how to work with arrays of hashes later.. which sounds basic.. but i can're remember
[20:00:57] jhass: ?pry ivanskie
[20:00:57] ruboto: ivanskie, Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting ???binding.pry??? directy in your source code. Visit https://pryrepl.org/ or get it now with gem install pry pry-doc
[20:01:05] ivanskie: i've got pry installed
[20:01:16] jhass: just because you said irb ;P
[20:01:38] atmosx: jhass: what makes pry superior?
[20:01:50] jhass: atmosx: see above ;)
[20:02:14] jerius: has joined #ruby
[20:02:16] ivanskie: its got the most important improvement.. its got pretty colors :)
[20:02:30] ivanskie: its what counts right?
[20:03:17] bougyman: edit BlahObject
[20:03:20] bougyman: is the #1 best feature
[20:03:27] bougyman: repl-based iterative programming
[20:03:44] atom3: has joined #ruby
[20:03:51] momomomomo: has joined #ruby
[20:04:05] Rollabunna: has joined #ruby
[20:04:17] freerobby: has joined #ruby
[20:04:37] dudedudeman: the pry link in that above bit jhass is broken
[20:04:54] jhass: works fine here
[20:05:03] bluish: has left #ruby: ("Good Bye")
[20:05:19] dudedudeman: i get this guy: ERR_SSL_VERSION_OR_CIPHER_MISMATCH
[20:05:43] dudedudeman: ah, taking the https:// off the front worked
[20:05:48] jhass: oO ssleuth rates it 9.0, get a recent openssl
[20:05:58] romero: has joined #ruby
[20:06:06] BrianBoyko1: Now I've got Failed to load resource: the server responded with a status of 503 (Service Unavailable)
[20:06:13] BrianBoyko1: and the checkout doesn't work.
[20:06:24] BrianBoyko1: I think I may have accidentially did something to the pub key
[20:06:35] jhass: git to the rescue?
[20:07:09] atmosx: This OSX Activiy Monitor thing is really awesome.
[20:07:16] k3asd`: has joined #ruby
[20:07:19] atmosx: ACTION is playing with threads
[20:07:20] BrianBoyko1: Hold on. I forgot the commas
[20:07:24] wallerdev: has joined #ruby
[20:08:03] BrianBoyko1: 90% of the time the problem is unsolvable, it is do to a stray punctuation mark that is either where it shouldn't be, or isn't where it should.
[20:08:42] ivanskie: how can I work with an array of hashes like this: #<CSV::Row dropdate:"19/06/15" droptime:"10:07:41" drop:"03" productid:"124" serialno:"30">
[20:08:47] jhass: mmh, you could've just copy pasted my stuff :P
[20:08:49] BrianBoyko1: Still have payment failed: reason unknown error
[20:08:58] jhass: what do the logs say now?
[20:09:05] atmosx: ivanskie: show the code that result
[20:09:36] jhass: ivanskie: you can treat CSV::Row's like that like a hash
[20:09:40] jhass: row[:dropdate]
[20:10:12] symm-: has joined #ruby
[20:10:47] BrianBoyko1: 2015-06-22T20:08:35.799334+00:00 app[web.1]: PG::ConnectionBad - invalid connection option "database"
[20:10:53] __butch__: has joined #ruby
[20:11:12] jhass: I guess it was dbname
[20:11:49] atmosx: 178 seconds without threads, 78 seconds with threads.
[20:12:17] tvw: has joined #ruby
[20:12:20] BrianBoyko1: one second, gonna run to the WindowsME while this compiles.
[20:12:45] ivanskie: https://gist.github.com/i5okie/227f313ce78ea589dc74
[20:14:00] ivanskie: i might not even need to do the header stuff..
[20:14:28] ivanskie: really i just need the count of each unique productid per file..
[20:15:30] jacor: has joined #ruby
[20:15:50] jhass: ivanskie: my answer still holds...
[20:16:07] ivanskie: i was thinking of get list of files > on each file, print birthdate in human date like i did in work.rb earlier > do my count and print each product id followed by its count.
[20:16:10] jhass: .map {|row| row[:productid] }
[20:16:45] ivanskie: ooooh o.O awesome
[20:17:15] BrianBoyko1: 2015-06-22T20:15:56.094497+00:00 app[web.1]: TypeError - no implicit conversion of String into Integer:
[20:17:23] BrianBoyko1: 2015-06-22T20:15:56.094503+00:00 app[web.1]: app.rb:103:in `log_donation'
[20:17:55] BrianBoyko1: app.rb:164:in `block in <main>'
[20:18:32] jhass: BrianBoyko1: what's the code?
[20:18:45] BrianBoyko1: 103: conn.exec("INSERT INTO donors VALUES (?, ?);", email, amount)
[20:18:58] BrianBoyko1: 164: log_donation(@email, @amount)
[20:19:12] BrianBoyko1: you know, I might be at fault here.
[20:19:12] jhass: I guess you created the schema as an integer for amount?
[20:19:22] BrianBoyko1: I actually created the schema as a real for amount.
[20:19:29] BrianBoyko1: and I think it's passing an interger
[20:19:34] jhass: try email, amount.to_f)
[20:19:41] droidburgundy: has joined #ruby
[20:19:56] BrianBoyko1: well, I really should keep it as intergers.
[20:20:09] BrianBoyko1: so I'm going to change the schema in the database.
[20:20:57] jhass: it complains it's a String though
[20:21:02] jhass: so then to_i instead of to_f
[20:24:14] djbkd: has joined #ruby
[20:24:16] lfox: has joined #ruby
[20:26:04] shadoi: has joined #ruby
[20:26:07] Papierkorb: has joined #ruby
[20:26:40] BrianBoyko1: TypeError - wrong argument type String (expected Array):
[20:28:02] beneggett: has joined #ruby
[20:28:19] jhass: 103 still?
[20:28:48] BrianBoyko1: didn't give me one
[20:29:03] Pwnna: has joined #ruby
[20:29:06] ledestin: has joined #ruby
[20:29:12] jhass: try ", [email, amount.to_i]) anyway
[20:29:13] BrianBoyko1: 2015-06-22T20:25:45.320793+00:00 app[web.1]: TypeError - wrong argument type String (expected Array):
[20:29:13] Pwnna: how do you get the threadid of a thread?
[20:29:27] Pwnna: like. i'm looking for `syscall( __NR_gettid )`
[20:29:36] jhass: BrianBoyko1: the line is probably on the next line of the log
[20:29:56] BrianBoyko1: Looking at it.
[20:30:01] atom3: has joined #ruby
[20:30:28] BrianBoyko1: So, this is what we want? : log_donation([@email, @amount.to_i])
[20:31:08] soulcake: has joined #ruby
[20:31:41] BrianBoyko1: oh, then let's try this: conn.exec("INSERT INTO donors VALUES (?, ?);", email, amount.to_i)
[20:32:51] jerius: has joined #ruby
[20:32:52] Senjai: I has a question this time
[20:32:52] Cust0sLim3n: has joined #ruby
[20:33:02] Senjai: Given the following structure: https://gist.github.com/Senjai/7aa67dd16790a8db9ab1
[20:33:08] awer: has joined #ruby
[20:33:09] fabrice31: has joined #ruby
[20:33:18] Guest54: has joined #ruby
[20:33:18] BrianBoyko1: TypeError - wrong argument type String (expected Array):
[20:33:20] Lucky_: has joined #ruby
[20:33:21] momomomomo: has joined #ruby
[20:33:23] BrianBoyko1: okay, let's try this.
[20:33:38] Senjai: I want to get all ids for priority: 0 to perform an operation, then all ids for priority 1, until there are no more ids for the incrementing priority
[20:34:18] jhass: BrianBoyko1: actually looking at pg's docs: conn.exec_params("INSERT INTO donors VALUES ($1, $2)", [email, amount.to_i])
[20:34:42] Guest54: hey guys i'm looking at a code emersion class that focuses on Ruby Development.
[20:34:52] Igorshp: has joined #ruby
[20:35:19] Senjai: I'm probably going to try and change the data structure to make it easier
[20:35:20] Guest54: any front-end dev people here who use ruby regularly?
[20:35:28] Senjai: so I can do an each over the key value pairs
[20:35:37] Senjai: unless someone has a better solution
[20:35:40] Senjai: Guest54: Almost every webdev
[20:35:44] Senjai: That uses rails
[20:35:54] BrianBoyko1: Well, let's try it.
[20:36:23] baweaver: has joined #ruby
[20:36:25] Guest54: Senjai how hard to learn compared with something like php or node?
[20:36:49] patteh: has joined #ruby
[20:36:53] Senjai: PHP is a terrible language, and node requires you to write javascript
[20:36:56] BrianBoyko1: Good News/Bad News
[20:36:58] Senjai: so I would suggest Ruby, for sure
[20:37:03] BrianBoyko1: Good news - the transaction went through
[20:37:09] BrianBoyko1: Bad news, it's not in the database.
[20:37:28] Guest54: so easier then those two?
[20:37:29] failshell: has joined #ruby
[20:37:42] Guest54: mysql supported?
[20:37:44] BrianBoyko1: I probably messed up when re-creating the table to use INT instead of real#
[20:37:48] Guest54: i'm sure it is
[20:38:01] jhass: BrianBoyko1: it should error if it failed to insert though
[20:38:32] failshell: so im printing the output of a script, which has colored output. id like to remove the control codes for the color, before saving the output to a file. any idea how to do that?
[20:38:39] yh: has joined #ruby
[20:38:53] workmad3: has joined #ruby
[20:38:55] failshell: not printing, but writing
[20:41:32] freerobby: has joined #ruby
[20:41:47] dgutierrez1287: has joined #ruby
[20:41:51] BrianBoyko1: Dammit... now I'm getting Kernel Panic - not syncing: Fatal exception in interrupt
[20:42:03] BrianBoyko1: ACTION giggles
[20:42:08] BrianBoyko1: Only kidding. IT WORKED!!!!!
[20:42:20] BrianBoyko1: The transaction went through AND it's in the database!
[20:42:24] BrianBoyko1: Works perfectly!
[20:42:34] BrianBoyko1: THANKS TO YOU!
[20:42:39] failshell: kernel panic is always a great success
[20:42:41] BrianBoyko1: And our Pair Coding Skill.
[20:42:42] BanzaiJoe: ACTION wonders 'does Ruby even have Kernel Panic?'
[20:42:56] BanzaiJoe: specifically 'Panic'?
[20:42:57] BrianBoyko1: (mostly your skill and my panic)
[20:43:42] DroidBur_: has joined #ruby
[20:45:06] langlands: has joined #ruby
[20:45:14] Ray`: has joined #ruby
[20:46:01] droidburgundy: has joined #ruby
[20:47:12] sinkensabe: has joined #ruby
[20:47:14] DroidBur_: has joined #ruby
[20:47:16] ivanskie: well.. i could probably get it to look better.. but so far, this is what i got, thanks to jhass
[20:47:17] ivanskie: https://gist.github.com/i5okie/227f313ce78ea589dc74
[20:47:35] Guest54: can anyone recommend a good getting started book for ruby?
[20:48:54] jhass: ivanskie: data.uniq.size
[20:50:27] jhass: counts = data.group_by(&:itself).map {|id, occurrences| [id, occurrences.size] }.to_h
[20:50:36] ivanskie: Guest54 The Well-Grounded Rubyist
[20:50:48] tamarin: has joined #ruby
[20:50:50] Guest54: thanks ivanskie
[20:50:59] papercode: has joined #ruby
[20:51:05] Pupeno_: has joined #ruby
[20:51:12] tamarin: I'm trying to do a YAML.load, but it looks like some of my hashes are coming in as strings (ie: ":myhash"). Any idea what would cause that?
[20:51:50] Guest54: ivanskie now i'm a beginner, and i'm still unclear on the rails and ruby side of things
[20:52:19] phat4life: learn ruby first, then rails
[20:52:32] Guest54: is this still a good recommendation? for a beginner?
[20:52:36] ivanskie: im a more advanced beginner lol... but i'd recommend start with ruby.. then move into rails. rails is basically a bunch of ruby gems slapped together into a beautiful framework.. (beautiful is subjective)
[20:52:43] bougyman: don't bother learning ruby if you plan on using rails.
[20:52:58] ivanskie: it depends on how you learn better. reading, video, or class
[20:52:59] Guest54: whoa whoa here's where i'm getting confused
[20:53:15] ivanskie: and you don't need to be a pro at ruby to write rails, like bougyman said
[20:53:16] Guest54: where did you guys start?
[20:53:24] Guest54: start with ruby?
[20:53:26] ivanskie: i started with rails...
[20:53:34] ivanskie: but i always do everything backwards
[20:53:46] ivanskie: and everyone i've asked before said learn Ruby
[20:54:01] phat4life: Guest54: read https://pragprog.com/news/programming-ruby-2-0
[20:54:16] phat4life: read http://designpatternsinruby.com/
[20:54:20] Guest54: thanks phat, let me check this out and i'll be back with my questions
[20:54:28] phat4life: and lastly read http://www.poodr.com/
[20:54:35] ivanskie: also try ruby coans
[20:54:39] phat4life: and read rails anti patterns
[20:54:45] phat4life: when you get to rails
[20:54:49] ivanskie: http://rubykoans.com/
[20:55:04] ivanskie: a really good book for rails is Rails 4 in Action
[20:55:20] phat4life: i feel like most of the ruby programmers i know didn't come from oop backgrounds
[20:55:32] phat4life: and you start with Rails, its a very narrow view of oop
[20:55:33] ivanskie: it covers a lot of what basic tutorials cover, plus introduces you to more stuff that you'd usually come across when develping rails apps
[20:55:38] uber: has joined #ruby
[20:56:18] BrianBoyko1: When I get this site built, I'll learn some ruby. I thought I could get by by programming in one language and branching out to others later. But... as this project has just shown, you've got to be a polyglot to make it in the world today.
[20:56:23] asmodlol: has joined #ruby
[20:56:34] User458764: has joined #ruby
[20:57:25] phat4life: i mean, most languages are easy to pick up, just learn fp, oop, thos apply to many languages
[20:57:53] phat4life: the problem is knowing all the crazy gems or libraries, that is what differentiates you
[20:58:11] skade: has joined #ruby
[20:58:24] Guest54: word thanks phat4life, i think these design patterns might be a good starting point
[20:58:32] Rollabunna: has joined #ruby
[20:58:38] phat4life: that one is excellent
[20:59:47] void: has joined #ruby
[21:02:14] wallerdev: has joined #ruby
[21:03:26] yfeldblum: has joined #ruby
[21:04:36] snockerton: has joined #ruby
[21:05:32] Guest54: phat4life, just ordered it. thanks so much for the recommendation.
[21:08:21] tamarin: has left #ruby: ("Good Bye")
[21:09:44] baxx: has joined #ruby
[21:10:54] Ilyas: has joined #ruby
[21:11:21] phutchins: has joined #ruby
[21:14:51] skyjumper: has joined #ruby
[21:15:39] platzhirsch: has left #ruby: ()
[21:19:39] spider-mario: has joined #ruby
[21:20:12] Agoldfish: has joined #ruby
[21:20:25] subtwo: has joined #ruby
[21:21:20] rafaelsales: has joined #ruby
[21:23:12] hal_9000: has joined #ruby
[21:24:00] pengin: has joined #ruby
[21:24:56] rafaelsales: has joined #ruby
[21:25:36] beneggett: has joined #ruby
[21:25:41] d10n-work: has joined #ruby
[21:26:18] Yiota: has joined #ruby
[21:26:26] crdpink: has joined #ruby
[21:27:29] atom3: has joined #ruby
[21:27:35] danzilio: has joined #ruby
[21:29:25] sarkyniin: has joined #ruby
[21:30:31] scpike: has joined #ruby
[21:31:48] sinkensabe: has joined #ruby
[21:33:29] ivanskie: what do you guys use to compile a ruby into a windows executable
[21:33:37] ivanskie: to run on a machine without ruby and etc etc..
[21:33:59] ivanskie: im having not so great time with visualruby.. it just doesnt run.
[21:34:06] ivanskie: i found ocra so far..
[21:35:29] JakFrist: has joined #ruby
[21:35:44] doublemalt_: has joined #ruby
[21:36:34] adaedra: you can also bundle ruby with your program, or require ruby to be installed
[21:37:57] jhass: traveling ruby comes to mind
[21:38:27] sinkensabe: has joined #ruby
[21:38:33] Alayde: has joined #ruby
[21:38:40] ivanskie: traveling ruby seems nice
[21:38:41] geiltalasdair: has joined #ruby
[21:39:05] ivanskie: looks like visualruby is a relic
[21:39:23] ivanskie: ok i guess so far i want to try Shoes 4.. and Ocra or traveling ruby
[21:39:38] jenrzzz: has joined #ruby
[21:40:57] seitensei: has joined #ruby
[21:41:07] tcrypt: has joined #ruby
[21:42:38] Pupeno: has joined #ruby
[21:44:56] michael_mbp: has joined #ruby
[21:45:00] User458764: has joined #ruby
[21:47:10] unreal: has joined #ruby
[21:50:27] jerius: has joined #ruby
[21:50:39] mary5030: has joined #ruby
[21:50:40] papercode: has joined #ruby
[21:51:23] dopie: has joined #ruby
[21:51:56] seitensei: has joined #ruby
[21:52:37] weaksauce: is there anything that converts between "ModuleName" <==> "module_name" built into ruby or is it more of a roll your own thing
[21:52:41] Rollabunna: has joined #ruby
[21:53:06] jhass: activesupport/rails has some
[21:53:10] jhass: ruby, nope
[21:53:12] Senjai: weaksauce: "ModuleName".underscore
[21:53:16] Senjai: in active support
[21:53:23] yorickpeterse: brrrr activesupport
[21:53:40] dented42: has joined #ruby
[21:53:55] chris2: has joined #ruby
[21:54:03] rikai: has joined #ruby
[21:54:21] momomomomo: has joined #ruby
[21:54:32] adaedra: .gsub(/[A-Z]/) { |e| "_#{e.downcase}" }.sub(/^_/, '')
[21:54:35] skade: has joined #ruby
[21:54:53] Senjai: yorickpeterse: <3 activesupport
[21:54:55] Senjai: parts of it
[21:55:34] sypheren: has joined #ruby
[21:55:39] dseitz: has joined #ruby
[21:55:41] Senjai: weaksauce: https://gist.github.com/Senjai/41282396211b6ed6939e
[21:55:44] yorickpeterse: I've not found a single part of it that I found useful
[21:55:48] Senjai: which is active supports implimentation
[21:55:51] yorickpeterse: (that mandated ActiveSupport)
[21:55:58] mahlon: has joined #ruby
[21:56:16] foobarbaz: has joined #ruby
[21:56:22] Senjai: Wow, that underscore does a lot of passes..
[21:56:28] bkxd: has joined #ruby
[21:56:32] asmodlol: has joined #ruby
[21:57:53] super: has joined #ruby
[21:58:04] geiltadecht: has joined #ruby
[21:58:11] geilt: has joined #ruby
[21:58:13] vdamewood: has joined #ruby
[21:58:18] Senjai: yorickpeterse: That's fair.
[21:58:23] cschneid: has joined #ruby
[21:58:30] Senjai: I cant think of anything that would make me bring in active support
[21:58:41] Senjai: but when its already there, there are parts of it that are helpful
[21:58:52] Senjai: and other parts that are super silly
[21:59:12] Senjai: I would maybe want the inflector
[21:59:14] blaines: has joined #ruby
[21:59:43] Senjai: the cache maybe, and other random things
[22:00:04] sparr: has joined #ruby
[22:00:04] adaedra: you have facets implementation too https://github.com/rubyworks/facets/blob/master/lib/core/facets/string/snakecase.rb (cc weaksauce)
[22:00:04] Senjai: The mini gzip class isn't terrible either
[22:00:07] Senjai: just a bunch of random stuff
[22:00:13] BackEndCoder: has joined #ruby
[22:00:24] acke: has joined #ruby
[22:00:24] centrx: has joined #ruby
[22:00:26] yfeldblum: has joined #ruby
[22:00:29] akkad: has joined #ruby
[22:00:30] yorickpeterse: ActiveSupport is a dumpster for all crap people come up with and don't want to put in dedicated Gems
[22:00:41] Senjai: yorickpeterse: Not disagreeing :P
[22:00:48] djbkd: has joined #ruby
[22:01:05] Senjai: Some of it should be attempted to be contributed to the stdlib
[22:02:23] djbkd: has joined #ruby
[22:02:47] ddfreyne: has joined #ruby
[22:03:05] adaedra: Good night
[22:03:25] dented42: has joined #ruby
[22:03:46] jhass: Senjai: oh noes, they'll just try to make HWIA the default Hash again :O
[22:03:54] Senjai: jhass: Not that
[22:03:58] Senjai: there are obvious reasons why that is terrible
[22:04:06] ellisTAA: has joined #ruby
[22:04:07] eggoez: has joined #ruby
[22:04:12] jhass: I know, and still people proposed it! more than once1
[22:04:23] Senjai: I would care less if it was just there in the stdlib
[22:04:26] tvw: has joined #ruby
[22:04:30] Senjai: and people could use it if they choose
[22:05:01] Cork: has joined #ruby
[22:05:08] casadei: has joined #ruby
[22:05:12] FernandoBasso: has joined #ruby
[22:06:06] blackmes2: has joined #ruby
[22:06:17] freerobby: has joined #ruby
[22:06:17] Ray`: then you end up with a bloated stdlib
[22:06:43] djbkd: has joined #ruby
[22:06:46] A124: has joined #ruby
[22:06:53] duderonomy: has joined #ruby
[22:07:09] marienz: has joined #ruby
[22:07:14] Senjai: That's fair
[22:07:22] existensil: has joined #ruby
[22:07:27] Ray`: I mean, I'm using the most extreme example here:
[22:07:28] Senjai: I would probably argue about stdlib
[22:07:31] Ray`: took forever for this to get out http://php.net/manual/en/function.easter-days.php
[22:07:41] Senjai: Dude, thats php
[22:07:44] Senjai: apples and oranges
[22:07:47] Ray`: hence why I said extreme
[22:07:49] Senjai: self contained classes are a different story
[22:07:53] godemperor: has joined #ruby
[22:07:59] A205B064: has joined #ruby
[22:08:06] Senjai: The most important thing about the stdlib is that it is reliable, and easy to maintain, not that its small
[22:08:21] asmodlol: has joined #ruby
[22:08:35] yqt: has joined #ruby
[22:08:44] Senjai: and doesnt change often
[22:08:55] Senjai: many things in AS fit that description
[22:09:04] Senjai: many dont
[22:09:14] Ray`: right, I used that as a function due to the fact that it's a) useless and b) extra code to maintain
[22:09:26] LJT: has joined #ruby
[22:09:44] ivanskie: im trying the Opal thing... and it doesn't want to do anything says Opal::Builder::MissingRequire: A file required by "application" wasn't found.... and tries to look for it in opal's gem's directory..
[22:09:53] Ray`: (I didn't have a ruby example to hand)
[22:10:13] Senjai: Ray of something terrible in the stdlib?
[22:10:14] geiltalasdair: has joined #ruby
[22:10:39] jhass: ivanskie: maybe someone in #opal is alive
[22:10:44] Senjai: I have a gribe with open-uri
[22:10:56] Senjai: as it monkey patches kernel
[22:11:24] Ray`: reasonable point
[22:11:32] User458764: has joined #ruby
[22:11:52] Senjai: Also dont think http://ruby-doc.org/stdlib-2.2.2/libdoc/tempfile/rdoc/Tempfile.html needs to exist
[22:12:15] momomomomo: has joined #ruby
[22:12:19] Senjai: but I'm sure someone will tell me I'm wrong
[22:12:22] jhass: huh, what's wrong with tempfile?
[22:12:52] Senjai: Nothing, I just donth think it needs to exist :P
[22:12:58] eam: why not?
[22:13:20] jhass: why should everybody reimplement it?
[22:13:21] eam: any module that wraps a basic libc function probably should exist, IMO
[22:13:35] Senjai: I didn't know it was a libc function
[22:13:44] yh: has joined #ruby
[22:14:12] eam: http://man7.org/linux/man-pages/man3/mkstemp.3.html
[22:15:05] rjno: has joined #ruby
[22:15:54] Frem: has joined #ruby
[22:16:02] soulcake: has joined #ruby
[22:16:04] geilt: has joined #ruby
[22:16:09] soulcake: has joined #ruby
[22:16:58] ivanskie: fond a workaround
[22:16:59] FernandoBasso: has joined #ruby
[22:17:28] shinnya: has joined #ruby
[22:18:40] Senjai: https://gist.github.com/Senjai/e5f15dd38798e1c45bf7 makes me feel icky
[22:18:47] Senjai: does someone have a better idea?
[22:19:58] crdpink2: has joined #ruby
[22:21:52] fabrice31: has joined #ruby
[22:22:11] choke: has joined #ruby
[22:22:48] djbkd: has joined #ruby
[22:25:16] asmodlol: has joined #ruby
[22:25:28] geilt: has joined #ruby
[22:26:55] minibar: has joined #ruby
[22:26:57] jhass: join/includes & order, no?
[22:28:09] jenrzzz: has joined #ruby
[22:28:10] nateberkopec: has joined #ruby
[22:29:07] Rapier-: has joined #ruby
[22:29:59] Senjai: jhass: I would have to do a n-way join
[22:30:04] Senjai: to do that instead of ruby
[22:30:24] Senjai: for each group_id, I have to add another join to the option_value table, which I can do programattically
[22:30:29] Senjai: but I've been shying away from i
[22:30:59] Senjai: egh, i didn't gist that part
[22:31:08] bruno-: has joined #ruby
[22:31:22] chris2: has joined #ruby
[22:31:26] Senjai: https://gist.github.com/Senjai/ceed4175d356c9ee2d6e
[22:32:01] vasilakisfil__: has joined #ruby
[22:34:45] madhatter: has joined #ruby
[22:35:15] baweaver: has joined #ruby
[22:36:38] djbkd_: has joined #ruby
[22:37:35] senayar^: has joined #ruby
[22:37:56] minibar: has joined #ruby
[22:38:58] husanu: has joined #ruby
[22:39:49] wildroman2: has joined #ruby
[22:39:49] zeroDivisible: has joined #ruby
[22:40:46] blazes816: has joined #ruby
[22:42:35] zeroDivisible: has joined #ruby
[22:43:15] avahey: has joined #ruby
[22:43:29] Scripore: has joined #ruby
[22:45:01] Iskarlar: has joined #ruby
[22:46:56] Rollabunna: has joined #ruby
[22:47:50] jglover: has joined #ruby
[22:48:15] jglover: having some issues with a Thin server. Seems like it sporadically starts and stops reactor
[22:48:23] jglover: and sometimes doesn't start it for over an hour after deployment
[22:48:25] jglover: any ideas?
[22:48:34] baweaver: has joined #ruby
[22:49:27] havenwood: has joined #ruby
[22:49:33] kobain: has joined #ruby
[22:49:48] Casty: has joined #ruby
[22:50:36] ivanskie: well #opal's dead..
[22:50:51] ivanskie: how do you include other ruby classes? like csv for example?
[22:50:58] ivanskie: oh nevermind
[22:51:11] ivanskie: lol nevermind already solved the problem i had. forgot (got a lot of crap going on at same time)
[22:51:39] nofxxxx: ivanskie, does it work? csv on opal
[22:52:26] ivanskie: nofxxxx well.. i'll find out.. for now when I load my html console says failed to load resource.. opal is not defined... but i just realized i think i need to include opal.js separately?
[22:53:46] slumos: has left #ruby: ()
[22:54:10] nofxxxx: ivanskie, sorry never played but it's in my todo list. But iirc, doesn't it precompile??
[22:54:27] nofxxxx: ahh, even precompiled you need the main lib... I figure
[22:57:18] bkxd: has joined #ruby
[22:57:32] Rubie: has joined #ruby
[22:57:45] ivanskie: heh. i build the opal.js and load it in html.. but it still tells me opal is not defined
[22:57:58] c355E3B: has joined #ruby
[23:00:29] towski__: has joined #ruby
[23:00:46] dgutierrez1287: has joined #ruby
[23:01:29] towski___: has joined #ruby
[23:02:00] Rubie: has joined #ruby
[23:02:14] Rubie: has joined #ruby
[23:02:15] Yiota: has joined #ruby
[23:02:18] zenguy_pc: has joined #ruby
[23:02:59] Rubie: has joined #ruby
[23:03:28] dstarh: has joined #ruby
[23:03:45] Rubie: has joined #ruby
[23:03:49] ivanskie: ya dunno im still getting ReferenceError: Opal is not defined
[23:03:57] ivanskie: even tho I load opal.js before my app.js
[23:04:19] Senjai: ivanskie: This is pretty localized to opal, and doesn't sound totally related to ruby
[23:04:26] Senjai: Consider the mailing list perhaps?
[23:04:26] ivanskie: not at all.
[23:04:28] Rubie: has joined #ruby
[23:04:47] ivanskie: ok then I guess i need to go to plan b..
[23:04:55] zeroDivisible: has joined #ruby
[23:04:59] ivanskie: how else can I get ruby executed without installing ruby
[23:05:14] Rubie: has joined #ruby
[23:05:47] ivanskie: ocra is not working for me for some reason
[23:05:59] Rubie: has joined #ruby
[23:06:05] PaulCapestany: has joined #ruby
[23:06:10] mois3x: has joined #ruby
[23:06:25] havenwood: What are you trying to do? Distribute an app?
[23:06:39] nettoweb: has joined #ruby
[23:06:44] Rubie: has joined #ruby
[23:06:53] havenwood: ivanskie: https://phusion.github.io/traveling-ruby/
[23:06:55] Deele: has joined #ruby
[23:07:29] Rubie: has joined #ruby
[23:08:14] Rubie: has joined #ruby
[23:09:00] Rubie: has joined #ruby
[23:09:44] Rubie: has joined #ruby
[23:10:09] htmldrum: has joined #ruby
[23:10:29] Rubie: has joined #ruby
[23:10:57] ivanskie: I'm trying to give the app to end user..
[23:11:03] ivanskie: so in short. yes. lol
[23:11:14] Rubie: has joined #ruby
[23:11:22] TheHodge: has joined #ruby
[23:12:50] ivanskie: argh.. looks like i need to move over to my windows machine
[23:12:50] Rubie: has joined #ruby
[23:12:54] ivanskie: dredded windows
[23:12:58] zeroDivisible: has joined #ruby
[23:13:25] pengin: has joined #ruby
[23:14:00] nveselinov: has joined #ruby
[23:14:08] atom3: has joined #ruby
[23:15:25] Senjai: Are you packaging just for windows?
[23:16:06] _blizzy_: are fibers the way to prevent blocking in ruby?
[23:16:16] _blizzy_: so two things can run at the same time without them blocking each other?
[23:16:50] workmad3: has joined #ruby
[23:16:53] Senjai: _blizzy_: They cannot run at the *same* time, but fibers are like lightweight threads yeah,
[23:17:08] Senjai: They are concurrent, but not paralell
[23:18:00] _blizzy_: thanks, Senjai
[23:18:23] Senjai: _blizzy_: Unless you have a reason to use fibers, just use threads
[23:18:41] _blizzy_: Senjai, oh ok, thank you.
[23:18:52] _blizzy_: why wouldn't I use fibers then if they are light weight?
[23:20:01] olso: has joined #ruby
[23:20:26] ellisTAA: has joined #ruby
[23:20:56] baxx: has joined #ruby
[23:21:25] Senjai: Heh, depends on the operations I suppose
[23:21:41] Senjai: Looked up some material on it, I think I may have misunderstood fibers
[23:22:48] Senjai: _blizzy_: http://stackoverflow.com/questions/9052621/why-do-we-need-fibers
[23:23:05] wildroman2: has joined #ruby
[23:23:06] _blizzy_: thxs 4 the link, Senjai
[23:23:12] yh: has joined #ruby
[23:23:40] Rubie: has joined #ruby
[23:23:49] olso: why is ruby magical? take https://gist.github.com/anonymous/56d373c074169d03dfb7 replacing all occurences of substring in a string by accessing it like key => value, wtffff (coming from php)
[23:24:36] olso: actually only first occurance
[23:24:45] olso: which is even more wtf
[23:24:49] Senjai: olso: Hahahah, I didn't know about that. I would be explicit and use sub though
[23:25:33] mozzarella: olso: it works like gsub, it's not magical
[23:25:42] havenwood: olso: Try: poem.gsub 'toast', 'honeydew'
[23:25:50] havenwood: mozzarella: no g
[23:25:56] workmad3: has joined #ruby
[23:26:04] Rubie: has joined #ruby
[23:26:07] jhass: isn't String#[]= an alias for String#sub in fact?
[23:26:09] mozzarella: works like sub
[23:26:14] Senjai: jhass: I dont think it is..
[23:26:22] Senjai: I'm looking it up now
[23:26:39] olso: i dont know about this guys, i really want to dive into ruby (read rails world), i am only on first tutorial
[23:26:41] Senjai: http://ruby-doc.org/core-2.2.0/String.html#method-i-5B-5D-3D
[23:26:55] olso: where arou you looking in up Senjai?
[23:27:45] Senjai: click show source
[23:27:58] Senjai: If you have pry-doc you can use that to
[23:28:21] Senjai: I would assume subpat calls sub at some point
[23:29:28] olso: also, should i start with rails4 or wait for rails5? are "gems" (this sounds so hipsterish :D) compatible rails4 with rails5 or gems are just ruby packages, not rails packages?
[23:29:36] olso: sorry if this is too basic for you
[23:29:50] Senjai: olso: There is a RubyOnRails channel
[23:29:55] Senjai: olso: but just use 4
[23:30:38] olso: i want to learn the language first tho :P
[23:31:03] olso: starting with this http://tryruby.org/levels/3/challenges/2
[23:31:04] Senjai: olso: Do you know another language already?
[23:31:09] _blizzy_: is it me, but is using Fibers and Threads in EventMachine slow?
[23:31:54] Senjai: _blizzy_: Well, ruby is GIL'd. Also use Celluloid, EventMachine = sadness
[23:32:06] Senjai: olso: https://pragprog.com/book/ruby4/programming-ruby-1-9-2-0
[23:32:10] Senjai: I would recommend that
[23:32:19] coffeeju1: has joined #ruby
[23:32:20] Senjai: if you're sure you want to continue learning
[23:32:49] _blizzy_: what's wrong with EM?
[23:33:13] quazimodo: has joined #ruby
[23:33:28] Senjai: https://news.ycombinator.com/item?id=4695828
[23:33:59] olso: i have the luxury of learning new stuff full time, im deciding between ruby, python, scala, go?
[23:34:10] Rubie: has joined #ruby
[23:34:18] _blizzy_: olso, why not all 4?
[23:34:20] Senjai: _blizzy_: ^
[23:34:22] _blizzy_: but 1 at a time.
[23:34:28] nettoweb: has joined #ruby
[23:34:31] Senjai: olso: If you're new to the game, go with ruby or python
[23:34:43] rcs: has joined #ruby
[23:34:49] Senjai: avoid scala and go until you have more of an understanding about generic computer science principles
[23:34:50] _blizzy_: it's obv which one we'll recommend you, but both are good.
[23:35:01] olso: i have few years of symfony (php) under my belt
[23:35:04] Senjai: ruby and python will hide that from you, until you get deep enough to where you need to learn it
[23:35:12] Senjai: PHP isn't programming :P
[23:35:20] jokke: has joined #ruby
[23:35:28] Senjai: It's throwing crap against a wall until enough of it sticks :P
[23:35:45] Senjai: For reals though, you can write code well in PHP
[23:35:48] olso: thus i want to move away
[23:35:49] Senjai: it's just a horrible language
[23:35:59] _blizzy_: PHP is a ok langauge imo
[23:36:00] Senjai: olso: Go with ruby
[23:36:02] Senjai: read the book
[23:36:09] _blizzy_: and yes, PHP is programming.
[23:36:29] _blizzy_: also thxs for the link Senjai
[23:36:37] _blizzy_: i'll try the other one.
[23:36:50] olso: php is good these days, no need to hate
[23:36:51] renier: has joined #ruby
[23:37:23] Senjai: I'm going to drop this before it turns into a war :P
[23:37:33] Senjai: http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/
[23:37:37] Senjai: I'll leave that out there though
[23:37:47] _blizzy_: what olso said.
[23:37:50] Senjai: Some of that is no longer applicable, but much of it is
[23:37:58] michael_mbp: has joined #ruby
[23:38:07] _blizzy_: but php is still good at what it does.
[23:38:20] quimrstorres: has joined #ruby
[23:38:28] Senjai: It's literally the worst tool for every problem :P. I'm going to stop now
[23:38:35] bhorn1: has joined #ruby
[23:38:40] Senjai: _blizzy_: Read the article :P
[23:38:40] pengin: has joined #ruby
[23:38:42] olso: Senjai, that book looks nice, but im looking for something kind of "here is everything you should know about syntax, here is stuff you look it up in" and then i learn by doing
[23:38:48] _blizzy_: Senjai, I've read it.
[23:39:19] _blizzy_: learnxinyminutes.com
[23:39:29] bhorn1: Hey guys quick question. Creating a ruby gtk3 application as a sort of menu that I would like to stay on top of all windows at all times.
[23:40:04] bhorn1: I've figured out how to keep it on top, but I was wondering it there was a way to make the application take up a set amount of space on either side of the screen that other windows wouldn't go behind.
[23:40:33] bhorn1: So it reacted similar to the way the unity bar does, just taking up a portion of the screen and when something gets maximized it will stay to the left of my application.
[23:40:34] kaleido: has joined #ruby
[23:40:47] bronson: has joined #ruby
[23:41:07] olso: thanks _blizzy_ , thats something i like :)
[23:41:15] Rollabunna: has joined #ruby
[23:41:29] baweaver: has joined #ruby
[23:42:31] olso: whoa what a nice resource at the end https://www.ruby-lang.org/en/documentation/ruby-from-other-languages/to-ruby-from-php/
[23:42:58] Senjai: olso: I would avoid sites promising to learn things in minutes
[23:43:21] Senjai: eventually you'll have to get a complete understanding of things, the best thing I can recommend is create your own project while cusing a proper resource
[23:43:22] Senjai: each chapter
[23:43:25] davedev24_: has joined #ruby
[23:43:30] Senjai: add a feature using what you learned to your application
[23:45:23] olso: each data type is object? so i can just chain methods?
[23:45:48] Senjai: olso: They dont all return self, but the ones that do, yeah
[23:46:22] quimrstorres: has joined #ruby
[23:46:29] crdpink2: has joined #ruby
[23:47:35] baweaver: Most of the chaining is from Enumerable.
[23:47:55] arescorpio: has joined #ruby
[23:48:39] baweaver: Anything that says learn x from y perspective I'm extremely skeptical of
[23:48:54] wallerdev: has joined #ruby
[23:49:08] baweaver: Because writing Ruby like Java or PHP is likely to get you in a bad way pretty fast.
[23:49:21] Senjai: Feel free to write it like Smalltalk though.
[23:49:56] baweaver: Write Ruby like Ruby, there are enough styleguides out there to set things straight.
[23:50:05] baweaver: granted a lot came from Smalltalk and Lisp
[23:50:18] baweaver: and Perl, but that'd get you in real hot water
[23:50:19] Senjai: From Lisp too eh?
[23:50:23] Senjai: Haven't heard that story
[23:50:27] dfockler: has joined #ruby
[23:50:35] Senjai: I thought it was mostly Smalltalk and Perl
[23:50:43] Senjai: What comes from lisp?
[23:50:45] baweaver: Where do you think blocks came from?
[23:50:54] Senjai: that makes sense
[23:50:56] baweaver: and first class functions and some of the other parts like that.
[23:51:29] mizaki: has joined #ruby
[23:52:11] Senjai: I thought blocks came from smalltalk too.
[23:52:30] baweaver: keyword args, garbage collection, conditional branches, symbols, first class functions, metaprogramming
[23:52:38] baweaver: those are are lisp descendant.
[23:52:56] yoongkang: has joined #ruby
[23:53:14] Senjai: Cool, good to know
[23:53:20] _blizzy_: so, in Event Machine, I would do
[23:53:30] _blizzy_: EventMachine.run do Stuff Goes Here end
[23:53:39] _blizzy_: how would I achieve that in Celluloid?
[23:54:03] baweaver: http://www.paulgraham.com/diff.html
[23:54:25] baweaver: _blizzy_: What have you tried?
[23:54:37] acke: has joined #ruby
[23:54:41] _blizzy_: baweaver, putting "include Celluloid" inside the class
[23:54:45] yh: has joined #ruby
[23:55:05] baweaver: and have you read any of the docs yet?
[23:55:11] Senjai: _blizzy_: Gotta trudge through the celluloid wiki man
[23:55:28] _blizzy_: baweaver, no. c: Senjai, ok.
[23:55:29] Senjai: _blizzy_: Typically, try first, ask when it's not working how you expect it to :P
[23:55:55] michael_mbp: has joined #ruby
[23:56:05] husanu: has joined #ruby
[23:56:07] jsaak: has joined #ruby
[23:56:13] jasonw22: has joined #ruby
[23:56:40] RegulationD: has joined #ruby
[23:57:05] radens: has joined #ruby
[23:57:11] framling: has joined #ruby
[23:57:11] duoi: has joined #ruby
[23:57:16] radens: How do I install the ruby development headers on osx?
[23:58:06] dfinninger: has joined #ruby
[23:58:12] cpruitt: has joined #ruby
[23:58:54] baweaver: radens: What have you tried?
[23:59:39] havenwood: radens: Already have XCode installed? Which package manager are you using?