« Back to channel list

#ruby - 26 July 2017

« Back 1 day Forward 1 day »
[00:00:47] MtnGoat: has joined #ruby
[00:04:24] cdg: has joined #ruby
[00:05:12] madgen: has joined #ruby
[00:06:38] cagomez: has joined #ruby
[00:07:14] umaaji: has joined #ruby
[00:07:29] olivier__: has joined #ruby
[00:08:47] olivier__: has joined #ruby
[00:13:38] spheric: has joined #ruby
[00:13:58] brent__: has joined #ruby
[00:17:15] Moosashi: has joined #ruby
[00:17:16] guacamole: has joined #ruby
[00:18:16] rfoust: has joined #ruby
[00:20:17] olivier__: has joined #ruby
[00:20:33] olivier__: has joined #ruby
[00:21:52] umaaji: has joined #ruby
[00:26:45] knight33: has joined #ruby
[00:28:09] cagomez: has joined #ruby
[00:29:58] QualityAddict: has joined #ruby
[00:31:52] olivier__: has joined #ruby
[00:33:37] olivier__: has joined #ruby
[00:35:07] ElFerna: has joined #ruby
[00:42:40] mtkd: has joined #ruby
[00:42:42] bronson: has joined #ruby
[00:44:48] sarmiena_: has joined #ruby
[00:50:23] Moosashi: has joined #ruby
[00:51:56] raspado: has joined #ruby
[00:55:59] forgot: has joined #ruby
[00:59:19] ramfjord: has joined #ruby
[01:02:03] brent__: has joined #ruby
[01:02:15] guacamole: has joined #ruby
[01:04:14] olivier__: has joined #ruby
[01:04:17] Pacra: has joined #ruby
[01:09:12] npgm: has joined #ruby
[01:11:45] ElFerna: has joined #ruby
[01:12:28] olivier__: has joined #ruby
[01:13:06] ecuanaso: has joined #ruby
[01:22:50] cdg: has joined #ruby
[01:23:40] raspado: has joined #ruby
[01:28:10] olivier__: has joined #ruby
[01:30:12] Puffball: has joined #ruby
[01:31:37] MtnGoat: has joined #ruby
[01:33:29] raspado: has joined #ruby
[01:34:44] shakes: has joined #ruby
[01:35:33] mim1k: has joined #ruby
[01:39:11] d^sh: has joined #ruby
[01:40:48] gizmore|2: has joined #ruby
[01:42:31] olivier__: has joined #ruby
[01:43:24] bronson: has joined #ruby
[01:51:12] Dreamer3_: has joined #ruby
[01:53:26] Jameser: has joined #ruby
[01:55:30] enterprisey: has joined #ruby
[02:02:09] raul782: has joined #ruby
[02:02:20] Moosashi: has joined #ruby
[02:04:18] charliesome: has joined #ruby
[02:04:40] olivier__: has joined #ruby
[02:06:00] Fire-Dragon-DoL: anyone aware of the encoding returned by Net::IMAP::FetchData.attr["BODY[]"] (returns the full email)? I see in console it's returning utf-8, but it seems weird since internal charset might contain non-utf8 codes. I would have expected ASCII-8BIT or something along those lines
[02:07:04] milardovich: has joined #ruby
[02:07:07] uZiel: has joined #ruby
[02:16:01] tunaBee_: has joined #ruby
[02:16:32] olivier__: has joined #ruby
[02:16:55] milardovich: has joined #ruby
[02:18:29] Arahael: Fire-Dragon-DoL: Unless they specify it, I would assume it could be in any encoding.
[02:19:00] AustinIncognito: has joined #ruby
[02:19:18] Arahael: Fire-Dragon-DoL: Do you have a Content-Type?
[02:19:25] chrisarc1nd: has joined #ruby
[02:19:34] Tralin_: has joined #ruby
[02:19:40] Arahael: (And maybe, a Content-Transfer-Encoding?)
[02:19:44] Bish: has joined #ruby
[02:19:46] m27frogy: has joined #ruby
[02:19:48] genpaku_: has joined #ruby
[02:19:52] Fire-Dragon-DoL: arahael: I might be ignorant but when you use BODY[] you are fetching the whole mail, so I'm talking before even starting the parsing of it
[02:19:55] freeze: has joined #ruby
[02:19:58] ule: has joined #ruby
[02:20:01] Fire-Dragon-DoL: infact, I expected something like a raw stream of bytes :p
[02:20:02] hkdsun: has joined #ruby
[02:20:10] Didac: has joined #ruby
[02:20:39] Arahael: Fire-Dragon-DoL: In practice, I think you can at least assume ASCII to get to the headers, but then, you'll need to use the 'correct' encoding for the contents.
[02:20:55] bruno-: has joined #ruby
[02:21:06] Fire-Dragon-DoL: I thought that too, but I was wrong, looks like we found email messages with INVALID utf-8 characters
[02:21:12] KrzaQ: has joined #ruby
[02:21:13] Arahael: Fire-Dragon-DoL: Absolutely.
[02:21:15] giraffe: has joined #ruby
[02:21:23] hurricanehrndz: has joined #ruby
[02:21:25] konsolebox: has joined #ruby
[02:21:29] Fire-Dragon-DoL: and net/imap was returning BODY[] as utf-8 with headers with invalid characters
[02:21:45] jolamb: has joined #ruby
[02:22:00] Fire-Dragon-DoL: hence my question, what should I do in those cases? My idea so far is just encode in utf-8 and scrubbing/replacing any invalid character
[02:22:14] Fire-Dragon-DoL: because I can't really do anything else if the encoding is invalid
[02:22:22] Fire-Dragon-DoL: (in the headers)
[02:22:35] Arahael: Fire-Dragon-DoL: You could hope that Ruby didn't actually convert the encoding, and thus, try changing the underlying encoding.
[02:22:58] Fire-Dragon-DoL: arahael: acctually that's my fear, but I have no idea what would be the original...
[02:22:59] Arahael: Fire-Dragon-DoL: I think force_encoding does that? (I'm not really a ruby dev - spending more time in other languages)
[02:23:10] Fire-Dragon-DoL: yes it does that
[02:23:46] Arahael: Fire-Dragon-DoL: Another consideration, is that you will sometimes absolutely have mixed-encoding emails.
[02:24:23] bokayio: has joined #ruby
[02:24:25] govg: has joined #ruby
[02:24:32] ansraliant: has joined #ruby
[02:24:45] sts: has joined #ruby
[02:24:48] mtkd: has joined #ruby
[02:25:04] ozzloy: has joined #ruby
[02:25:04] ozzloy: has joined #ruby
[02:25:12] Fire-Dragon-DoL: yes but that comes later
[02:25:19] Fire-Dragon-DoL: how could net/imap return a utf-8 string
[02:25:25] Fire-Dragon-DoL: if the email is mixed encoding?
[02:25:28] Fire-Dragon-DoL: it doesn't make any sense
[02:27:54] Fire-Dragon-DoL: time to try hard "\xEC\xEE\xF1\xE9\xF8\xE4: Could you help me out?\r\n\r\nbody\u3042\x81\x00\0"
[02:28:01] Arahael: Fire-Dragon-DoL: Maybe it's the default external and internal Encoding?
[02:28:04] olivier__: has joined #ruby
[02:28:16] Arahael: https://stackoverflow.com/a/26604049/52273
[02:28:58] Fire-Dragon-DoL: that's true, so you are saying that it could be a raw stream of bytes, but Ruby is stupid and it's converting it
[02:29:27] Fire-Dragon-DoL: and it's totally possible unfortunately. It should be Encoding::BINARY and that's what I really expected from net/imap
[02:29:33] olivier__: has joined #ruby
[02:30:08] Arahael: Fire-Dragon-DoL: Could be. Incidentially, I've seen the same problem in some Haskell mbox parsers, and that group is keen on correctness.
[02:30:35] Arahael: Fire-Dragon-DoL: utf-8 works well for "most" american devs, I think.
[02:31:29] Fire-Dragon-DoL: lol, ok thanks for suffering a little bit with me arahael, I have a few ideas on how to tackle this now
[02:31:46] Arahael: Fire-Dragon-DoL: Keep in mind that I'm *not* a ruby dev.
[02:32:00] Arahael: Fire-Dragon-DoL: So could be completely wrong w.r.t. ruby. ;)
[02:32:17] Fire-Dragon-DoL: yes, no problem. I don't know a lot of devs able to answer this. I think it's a matter of checking the source of net/imap
[02:32:23] Fire-Dragon-DoL: which is something I must do by myself :P
[02:34:24] eljimbo: has joined #ruby
[02:36:37] mikeiniowa: has joined #ruby
[02:37:39] rundor: has joined #ruby
[02:38:04] jnollette: has joined #ruby
[02:40:16] astrobunny: has joined #ruby
[02:40:50] olivier__: has joined #ruby
[02:42:31] rundor: has joined #ruby
[02:43:41] astrobun_: has joined #ruby
[02:44:15] bronson: has joined #ruby
[02:47:37] rundor: has joined #ruby
[02:49:08] Moosashi: has joined #ruby
[02:52:11] Eiam_: has joined #ruby
[02:52:28] __Yiota: has joined #ruby
[02:54:35] ramfjord: has joined #ruby
[03:08:14] patr0clus: has joined #ruby
[03:08:14] duderonomy: has joined #ruby
[03:18:05] duderonomy: has joined #ruby
[03:18:36] jinie_: has joined #ruby
[03:18:49] nacsurte: has joined #ruby
[03:21:08] duderono_: has joined #ruby
[03:22:31] gix: has joined #ruby
[03:23:08] Fire-Dragon-DoL: mhhh... this isreally painful
[03:24:19] Fire-Dragon-DoL: I've been digging through ruby net/imap source but it's hard to understand the encoding type of the string. It LOOKS like they overlooked entirely the encoded fact, but then there are some regexps whcih are for ascii-8bit. It feels like they work with ascii-8bit all time and then forgot to ensure it was encoded properly when sending it to the developer
[03:25:15] kies: has joined #ruby
[03:36:01] mim1k: has joined #ruby
[03:45:38] bronson: has joined #ruby
[03:46:52] uZiel: has joined #ruby
[03:57:23] MichaelBurge: has joined #ruby
[04:08:01] jakew: has joined #ruby
[04:10:56] jackjackdripper: has joined #ruby
[04:12:35] jakew: has joined #ruby
[04:12:52] jakew: has joined #ruby
[04:13:31] DrCode: has joined #ruby
[04:17:25] deep-book-gk_: has joined #ruby
[04:19:24] deep-book-gk_: has left #ruby: ()
[04:23:07] renchan: has joined #ruby
[04:30:36] cagomez: has joined #ruby
[04:34:29] mim1k: has joined #ruby
[04:38:37] elcontrastador: has joined #ruby
[04:43:11] jenrzzz: has joined #ruby
[04:43:13] jenrzzz: has joined #ruby
[04:43:49] Dreamer3_: has joined #ruby
[04:46:28] bronson: has joined #ruby
[04:47:26] runescape07rsps: has joined #ruby
[04:52:01] nofxxx: has joined #ruby
[04:53:00] ramfjord: has joined #ruby
[04:53:29] TunaBee: has joined #ruby
[04:55:09] zapata: has joined #ruby
[05:05:59] vondruch: has joined #ruby
[05:06:29] charliesome_: has joined #ruby
[05:08:13] nacsurte: has joined #ruby
[05:14:37] brent__: has joined #ruby
[05:18:18] iceden: has joined #ruby
[05:19:12] Bock: has joined #ruby
[05:19:14] rabajaj: has joined #ruby
[05:19:56] smulverine: has joined #ruby
[05:26:51] aufi: has joined #ruby
[05:28:26] S1kx: has joined #ruby
[05:33:35] uZiel: has joined #ruby
[05:38:58] vondruch: has joined #ruby
[05:40:44] jenrzzz: has joined #ruby
[05:42:55] grant: has joined #ruby
[05:42:58] Tempesta: has joined #ruby
[05:44:58] anisha: has joined #ruby
[05:47:17] DTZUZO: has joined #ruby
[05:47:17] bronson: has joined #ruby
[05:48:27] howdoi: has joined #ruby
[05:49:06] dh64: has joined #ruby
[05:50:54] anisha: has joined #ruby
[05:56:55] roshanavand: has joined #ruby
[05:58:20] z0mbee: has joined #ruby
[06:02:20] nacsurte: has joined #ruby
[06:04:12] Jameser`: has joined #ruby
[06:04:53] ramfjord: has joined #ruby
[06:05:24] armyriad: has joined #ruby
[06:06:08] charliesome: has joined #ruby
[06:10:35] z0mbee: has joined #ruby
[06:12:23] z0mbee: has left #ruby: ()
[06:12:55] andrzejku: has joined #ruby
[06:13:29] astrobunny: has joined #ruby
[06:17:17] MrBusiness: has joined #ruby
[06:18:51] muzik: has joined #ruby
[06:20:29] ramfjord: has joined #ruby
[06:27:17] djbkd: has joined #ruby
[06:37:33] Awsy: has joined #ruby
[06:42:28] conta: has joined #ruby
[06:43:56] astrobunny: has joined #ruby
[06:44:10] astrobunny: has joined #ruby
[06:44:14] radic: has joined #ruby
[06:46:41] aupadhye: has joined #ruby
[06:47:52] djbkd: has joined #ruby
[06:48:07] bronson: has joined #ruby
[06:50:15] mzelin: has joined #ruby
[06:56:23] nacsurte: has joined #ruby
[06:59:16] radic: has joined #ruby
[06:59:54] radic: has left #ruby: ()
[07:01:07] andikr: has joined #ruby
[07:04:06] uZiel: has joined #ruby
[07:04:46] snath: has joined #ruby
[07:06:39] biberu: has joined #ruby
[07:07:05] snath: has left #ruby: ()
[07:10:18] TomyWork: has joined #ruby
[07:11:12] mark_66: has joined #ruby
[07:11:33] ramfjord: has joined #ruby
[07:17:47] stanc: has joined #ruby
[07:21:35] ineb: net/imap is a bit esoteric :)
[07:21:39] astrobunny: has joined #ruby
[07:28:46] empty_cup: has joined #ruby
[07:29:10] Fraeon: has joined #ruby
[07:32:05] snowy: has joined #ruby
[07:39:48] antgel: has joined #ruby
[07:43:25] DoubleMalt: has joined #ruby
[07:43:49] johnny56_: has joined #ruby
[07:43:52] vondruch: has joined #ruby
[07:46:40] snowy: has joined #ruby
[07:47:29] dminuoso: Fire-Dragon-DoL: As far as I can tell, net/imap is not responsible for encoding.
[07:47:37] InfinityFye: has joined #ruby
[07:48:57] bronson: has joined #ruby
[07:50:28] nacsurte: has joined #ruby
[07:52:52] marr: has joined #ruby
[07:53:55] dionysus69: has joined #ruby
[07:55:34] moeabdol: has joined #ruby
[07:55:45] astrobunny: has joined #ruby
[08:00:26] ghr: has joined #ruby
[08:00:30] ghr: has left #ruby: ()
[08:02:33] hurricanehrndz: has joined #ruby
[08:02:43] moeabdol: has joined #ruby
[08:03:52] mikecmpbll: has joined #ruby
[08:05:04] mim1k: has joined #ruby
[08:06:12] Silthias: has joined #ruby
[08:06:39] charliesome: has joined #ruby
[08:07:17] ur5us: has joined #ruby
[08:07:53] Silthias2: has joined #ruby
[08:08:56] vondruch: has joined #ruby
[08:09:28] vondruch: has joined #ruby
[08:11:15] ur5us: has joined #ruby
[08:14:16] jenrzzz: has joined #ruby
[08:14:17] jenrzzz: has joined #ruby
[08:18:04] solrize: has joined #ruby
[08:19:11] solrize: heyall. does it sound feasible to modify ruby to dump and reload images the way emacs lisp and similar systems have done in the past? the idea is to get quicker startup for an application with lots of code (big rails app + some 100s of gems)
[08:20:19] havenwood: solrize: see the bootsnap gem
[08:20:29] solrize: thanks, looking
[08:20:55] shmoon: wanted to understand csrf attack in oauth and how state param prevents it ? :/
[08:20:59] havenwood: solrize: it does something along the lines of yomikomu and a few more tricks: https://github.com/ko1/yomikomu
[08:21:33] solrize: found https://github.com/twbs/bootstrap-rubygem - readme.md doesn't explain what it does but i can poke around a little
[08:21:41] solrize: about to look at yomikomu
[08:21:45] havenwood: not bootstrap, bootsnap
[08:21:57] solrize: oh woops! thanks:)
[08:22:27] solrize: https://rubygems.org/gems/bootsnap
[08:22:44] solrize: https://github.com/Shopify/bootsnap
[08:22:59] havenwood: solrize: also note it's going to be part of the default generated rails app soon: https://github.com/rails/rails/blob/8acca896cbaa01f6fc51969601888a440e83d53a/railties/lib/rails/generators/rails/app/templates/Gemfile#L23
[08:23:07] solrize: wow nice! thanks
[08:23:58] havenwood: shmoon: https://auth0.com/docs/protocols/oauth2/oauth-state
[08:24:38] havenwood: shmoon: do you follow that much ^?
[08:26:24] shmoon: wow what is that $30m in series C
[08:27:22] shmoon: havenwood: i understand that article but it doesn't explain how XSRF happens without state token which is what I'm confused about.
[08:30:48] jaruga: has joined #ruby
[08:31:53] havenwood: shmoon: you don't want me getting you to follow a link to do something malicious on a service you're authenticated with
[08:32:11] dminuoso: I do however.
[08:33:20] havenwood: shmoon: or a script to send you there without clicks, however you get there
[08:35:39] Beams: has joined #ruby
[08:36:11] havenwood: shmoon: like you login to your bank and then inadvertently follow a link to: schoombank.com/xfer?dollars=all&acct=havenwood
[08:36:39] dminuoso: Of course that now raises the really important question:
[08:36:46] dminuoso: Why does havenwood have a schoom account?
[08:36:59] havenwood: shmoon: it's you asking, but i don't know your sekret
[08:37:03] havenwood: dminuoso: mmm, the plot thickens
[08:37:24] charliesome: has joined #ruby
[08:37:36] workmad3: has joined #ruby
[08:37:53] havenwood: shmoon: but if when you authenticate you get a uuid, it can spot the imposter when that uuid can't be repeated back
[08:38:14] havenwood: shmoon: so some rando can't get you to follow a link to do things
[08:38:21] havenwood: shmoon: make sense?
[08:38:44] dminuoso: solrize: Realistically there a couple XSRF vectors in OAuth2. All revolve in the attacker taking control over which service you authorize.
[08:39:40] ltem: has joined #ruby
[08:39:55] Silthias2: has left #ruby: ()
[08:40:06] ur5us: has joined #ruby
[08:40:56] dminuoso: solrize: This can be especially problematic in clickjacking. Imagine a transparent iframe ontop of a regular website that looks familiar to you. Now the "get latest tweets" is actually beneath a transparent "Authorize havenwood to get full details of your bank account" type of button.
[08:41:15] solrize: dminuoso, that was shmoon asking about oath xsrf
[08:41:22] dminuoso: solrize, shmoon
[08:41:24] dminuoso: whats the difference
[08:41:38] havenwood: one is orange and the other purple, in my world
[08:41:51] dminuoso: Your world is wrong.
[08:41:54] dminuoso: purple and red.
[08:42:28] dminuoso: Ah well. And the levenshtein distance between them is 6.
[08:42:31] dminuoso: So there's that
[08:43:01] garathem: has joined #ruby
[08:44:19] Silthias: has joined #ruby
[08:44:40] nacsurte: has joined #ruby
[08:46:42] high_fiver: has joined #ruby
[08:49:47] bronson: has joined #ruby
[08:50:50] pandaant: has joined #ruby
[08:55:09] jenrzzz: has joined #ruby
[08:55:09] jenrzzz: has joined #ruby
[08:56:09] shmoon: I know what xsrf is in general. but in relation to oauth2 protocol is where I am getting confused havenwood dminuoso
[08:56:24] shmoon: For example I was reading this which is on the same topic http://homakov.blogspot.in/2012/07/saferweb-most-common-oauth2.html
[08:56:41] shmoon: but the last point doesn't make sense to me "Voila, press Log In with that OAuth Provider - you are logged in directly to User's account on site.com."
[09:00:37] Beams_: has joined #ruby
[09:02:01] aupadhye: has joined #ruby
[09:08:12] sysvalve: has joined #ruby
[09:16:14] Keltia: has joined #ruby
[09:16:15] err_ok: has joined #ruby
[09:16:15] Serpent7776: has joined #ruby
[09:16:16] _whitelogger: has joined #ruby
[09:16:16] pizzaops_: has joined #ruby
[09:19:13] solrize_: has joined #ruby
[09:22:25] willymox: has joined #ruby
[09:22:25] slima_: has joined #ruby
[09:22:25] pecan: has joined #ruby
[09:22:26] tynamite: has joined #ruby
[09:22:26] tynamite: I can't figure out how to setup a reverse proxy to link my webrick server with apache like the tutorial says.
[09:22:26] tynamite: https://www.learnwithdaniel.com/2015/01/apache-puma-via-reverse-proxy/
[09:22:26] tynamite: I'm using my windows laptop
[09:22:27] tynamite: has joined #ruby
[09:22:27] slima_: has joined #ruby
[09:22:28] empty_cu1: has joined #ruby
[09:22:28] eregon_: has joined #ruby
[09:22:28] caw_: has joined #ruby
[09:22:28] caw_: has joined #ruby
[09:22:28] lel: has joined #ruby
[09:22:29] gja: has joined #ruby
[09:22:29] sarbs: has joined #ruby
[09:22:39] solrize_: has joined #ruby
[09:22:43] pskosinski: has joined #ruby
[09:22:55] ShekharReddy: has joined #ruby
[09:22:58] knight-: has joined #ruby
[09:23:30] aglorei: has joined #ruby
[09:24:20] nekomune: has joined #ruby
[09:24:33] uZiel: has joined #ruby
[09:26:01] olblak: has joined #ruby
[09:26:12] tohuw: has joined #ruby
[09:26:14] bokayio: has joined #ruby
[09:27:21] ramfjord: has joined #ruby
[09:28:41] jaruga: has joined #ruby
[09:28:44] tynamite: hello anyone here?
[09:29:00] havenwood: tynamite: folk are always here
[09:30:10] surrounder: tynamite: " can't figure out " is a little vague... what have you tried? what isn't working?
[09:30:36] brent__: has joined #ruby
[09:32:31] alamar: has joined #ruby
[09:35:05] tynamite: I'm using this tutorial
[09:35:11] tynamite: http://www.concept47.com/austin_web_developer_blog/devops/how-to-try-out-puma-with-apache-proxy-right-now/
[09:35:19] tynamite: This is what I put at the bottom of my httpd.conf
[09:36:10] tynamite: https://gist.github.com/desbest/c5d6e3794214a4db7faa63d692167179
[09:36:27] tynamite: When I put that in to setup a reverse proxy for apache, my rack app fails to start.
[09:36:35] tynamite: apache fails to start I mean
[09:36:47] ineb: and what does it say as error
[09:37:57] tynamite: apache error log is empty
[09:38:39] nacsurte: has joined #ruby
[09:38:42] tynamite: i think I see the problem
[09:39:43] lel: has joined #ruby
[09:40:00] tynamite: It's saying ProxyPassReverse takes one, two or three arguments, a virtual path and a URL for reverse proxy behaviour
[09:40:56] tynamite: How can there be a syntax error if I'm using the format the tutorial gave me?
[09:41:58] jeyraof^mbpr: has joined #ruby
[09:42:08] alex``: has joined #ruby
[09:45:48] ineb: tynamite: is the comment wrongly interpreted as argument there? i dont know
[09:46:11] ruby-lang166: has joined #ruby
[09:46:58] S1kx: has joined #ruby
[09:47:27] ruby-lang166: i want to know how can i debug a Hash object
[09:47:42] tynamite: use the .inspect method
[09:48:04] ruby-lang166: as in Hash[:key].inspect ?
[09:48:29] tynamite: then view source in your web browser
[09:48:50] tynamite: the web browser won't display <stuff> as text
[09:49:50] tynamite: arrrgh! no one's online in #httpd for me to get apache help
[09:50:09] kspencer: has joined #ruby
[09:50:27] kspencer: has joined #ruby
[09:51:32] bronson: has joined #ruby
[09:51:42] ruby-lang166: @tynamite thanks mate , it is showing the correct output in console
[09:53:15] ruby-lang166: but the real deal is the email format is printing it incorrectly (html.erb)
[09:57:28] shiranuidong: has joined #ruby
[09:57:31] tynamite: fixed it now
[10:00:41] madgen: has joined #ruby
[10:04:33] Guest32941: has joined #ruby
[10:04:33] Guest32941: has joined #ruby
[10:04:33] tynamite: I can't get this reverse proxy tutorial to work
[10:07:55] tynamite: This is what I see when I set it up http://imgur.com/a/UPJ6h
[10:08:24] tynamite: My rack app should load, but it doesn't load, I just get it saying error 404 not found on every page.
[10:11:31] romankapitonov: has joined #ruby
[10:18:02] im0nde: has joined #ruby
[10:19:08] rgtk: has joined #ruby
[10:24:25] gizmore: has joined #ruby
[10:25:59] ferr: has joined #ruby
[10:26:36] adlerdias: has joined #ruby
[10:29:06] stamina: has joined #ruby
[10:31:18] Bish: how do i check for boolean in a case block?
[10:31:23] Bish: when TrueClass,FalseClass ?
[10:32:46] nacsurte: has joined #ruby
[10:35:37] tynamite: has joined #ruby
[10:35:56] tynamite: I can't get my reverse proxy to hook up a ruby app with apache.
[10:36:25] tynamite: I get this when I try to view my app http://imgur.com/qfvUdK7
[10:36:59] Bish: u wont get people to help you by spamming
[10:37:35] tynamite: I'm not spamming
[10:37:58] tynamite: my computer had a blue screen so I lost the irc chat so if anyone did reply to me I didn't see it
[10:38:32] Bish: okay then, heres my approach to help you: take nginx
[10:39:20] Bish: and basicially this is not a ruby problem
[10:39:33] rgtk: has joined #ruby
[10:40:39] mjolnird: has joined #ruby
[10:42:56] madgen: has joined #ruby
[10:43:16] tynamite: has left #ruby: ()
[10:43:39] conta: has joined #ruby
[10:43:40] ferr_: has joined #ruby
[10:44:09] BSab: has joined #ruby
[10:44:33] gnufied: has joined #ruby
[10:45:21] diegok: has joined #ruby
[10:47:39] zacts: has joined #ruby
[10:48:16] ineb: Bish: to answer your question: yes
[10:48:36] Bish: when true would lead to problems, right?
[10:49:08] Bish: >> a=false;case a; when true; 1; else; false; end;
[10:49:19] Bish: >> a=false;case a; when true; 1; else; false; end;
[10:51:04] Bish: does not lool like it
[10:52:20] bronson: has joined #ruby
[10:53:06] ineb: Bish: 'when' comes down to using the === operator
[10:53:26] ineb: and therefore we have true === true
[10:53:56] ineb: or TrueClass === true
[10:54:55] ineb: you can do it either way, i dont see any pitfalls
[11:06:01] someuser: has joined #ruby
[11:09:59] Radar: Bish: out of interest, what other values could the value be when it's not true / false ?
[11:13:03] apparition47: has joined #ruby
[11:18:17] moeabdol: has joined #ruby
[11:22:45] jrs: has joined #ruby
[11:23:45] jrs: is there a more succinct way of writing https://gist.github.com/anonymous/21010482bc727cf4578c41562c20cd38 ? I.e. either add to an existing Hash or create it if it doesn't exist?
[11:26:52] nacsurte: has joined #ruby
[11:27:08] jrs: hmm okay so i just came up with https://gist.github.com/anonymous/3457e7ea8bfb7a615ab719660a998cd5 ... i guess that's the shortest.
[11:27:31] ramfjord: has joined #ruby
[11:37:31] Ishido: has joined #ruby
[11:41:45] naprimer2: has joined #ruby
[11:47:52] ldnunes: has joined #ruby
[11:49:13] VladGh: has joined #ruby
[11:51:01] millerti: has joined #ruby
[11:53:10] bronson: has joined #ruby
[11:53:42] Bish: can i have a case when block where i go into 2 paths
[11:53:50] Bish: ineb: thanks btw
[11:54:11] ElFerna: has joined #ruby
[11:54:58] phoo1234567: has joined #ruby
[11:55:48] tAn: has joined #ruby
[11:56:23] Bish: i mean what do i do if a case when is the same as the combination of 2
[11:56:59] Bish: when x; a; when y; b; when x,y; a;b;
[11:57:13] Bish: sorry, not verry expressive
[11:58:01] Bish: https://gist.github.com/anonymous/a952f4f7814374dea66820944a1a9743
[11:58:07] Bish: i mean stuff like that
[11:58:17] Bish: can i avoid writing the 2 lines doubled?
[11:58:33] ljarvis: when :ON_OPEN, :ON_CLICK
[11:58:34] yeticry: has joined #ruby
[11:58:51] Bish: well, but the result is different..
[11:59:00] Bish: and the input is different aswell
[11:59:03] ljarvis: right, just saw that
[11:59:14] Bish: i get :ON_OPEN_AND_CLICK, i cant realy change that
[11:59:23] naprimer2: has joined #ruby
[11:59:38] ljarvis: then I don't understand your question
[11:59:52] Bish: well, third case is a combination of first and senc
[12:00:00] Bish: i would love to not write that 2 times
[12:00:09] ljarvis: but it's a different condition
[12:00:54] Bish: can case when do fancy stuff with arrays?
[12:01:05] ljarvis: fancy? like what?
[12:01:24] Bish: well like take an array as parameter for when
[12:01:33] ljarvis: when array
[12:01:33] Bish: instead of writing :A,:B
[12:01:38] adlerdias_: has joined #ruby
[12:01:38] ljarvis: right.. you need to be specific
[12:01:41] Bish: giving it [:A,:B]
[12:01:42] ljarvis: when *array
[12:01:46] Bish: oh that works?
[12:02:01] Bish: dont tell me when is a method, i gonna flip
[12:02:13] ljarvis: it's not a method
[12:03:07] ljarvis: it just takes a comma separated list of params, and splatting an array returns a comma separated list of params (in a low level sense)
[12:05:48] hkdsun: has joined #ruby
[12:05:56] tacoboy: has joined #ruby
[12:06:21] tvw: has joined #ruby
[12:14:09] lacuna: has joined #ruby
[12:14:39] ElFerna: has joined #ruby
[12:14:44] brent__: has joined #ruby
[12:14:52] workmad3: has joined #ruby
[12:17:04] nadir: has joined #ruby
[12:17:43] sepp2k: has joined #ruby
[12:18:56] Ishido: has joined #ruby
[12:19:15] jrs: has joined #ruby
[12:20:55] nacsurte: has joined #ruby
[12:21:44] DK2: has joined #ruby
[12:24:05] Bish: can i make 2 constants point to the same reference?
[12:24:09] Bish: can i copy modules?
[12:24:26] Bish: does const_set(:new,const_get(:old))
[12:24:28] Bish: do that trick?
[12:24:44] ljarvis: did you try it?
[12:24:53] Bish: faster to ask, no
[12:25:01] jrs: has joined #ruby
[12:25:21] synthroid: has joined #ruby
[12:26:02] ljarvis: well, not really
[12:26:13] ljarvis: you'd know if you opened irb and tried it
[12:26:27] Bish: i dont know if it comes with weird implications
[12:26:33] Bish: if these 2 constants reference the same thing
[12:26:37] Bish: or the module gets copied
[12:26:41] Bish: i expected hints like that
[12:26:42] Bish: even if it works
[12:27:01] Bish: thats why i rather ask
[12:27:05] Bish: not only because of speed
[12:27:12] ldnunes: has joined #ruby
[12:27:45] jrs: has joined #ruby
[12:28:08] ljarvis: you've been here long enough to know how to ask well formed questions, and you're clearly smart enough to do the research quickly yourself, but you still seem to just ask without thinking
[12:28:29] Bish: thinking is stupid :(
[12:28:33] ljarvis: so, let me ask, what do you actually want? do you have code to show it?
[12:28:37] quobo: has joined #ruby
[12:28:58] Bish: the code is big, wouldnt give you much, i have 2 big modules which act as handler for messages
[12:29:04] Bish: and i found out that 2 handlers basicially do the same
[12:29:15] jrs: has joined #ruby
[12:29:20] ljarvis: you can always provide small examples to help people who are taking their time to help you
[12:29:25] Bish: and i have a mapping of module name => module
[12:29:40] Bish: yes something like
[12:30:05] Bish: {:ax_by_cz=>AxByCz}
[12:30:21] Bish: and AxByCz has a self.call method, which ets called if message :ax_by_cz comes in
[12:30:56] ramfjord: has joined #ruby
[12:31:00] Bish: and i noticed 2 of the modules share 90% of the code so i coul DRY it out
[12:31:11] truenito: has joined #ruby
[12:31:28] adlerdias: has joined #ruby
[12:31:34] gheegh: has joined #ruby
[12:31:52] ljarvis: so, you move that 90% into a new module that's included into the other 2
[12:32:28] Bish: hm, they both only contain that one method
[12:32:39] Bish: they dont have something else, so include is not really an option
[12:32:48] ljarvis: so they share 100% of the code?
[12:32:51] ljarvis: but there's only 1 method
[12:33:14] Bish: no the 2 methods are different
[12:33:23] ljarvis: 2 methods? there are now two of them
[12:33:48] Bish: no, each module has 1 each
[12:34:05] Bish: and those methods have alot in common
[12:34:14] ljarvis: how much code belongs to this one method?
[12:34:30] Bish: 100% :D of the module
[12:34:37] ljarvis: well there's your problem
[12:34:42] ljarvis: break it down into reusable pieces
[12:34:56] ljarvis: then extract the bits being reused into a module that's included in both other things
[12:34:58] Bish: well thats hard, since its basicially a huge database transaction
[12:35:08] ljarvis: that doesn't tell me why it's hard
[12:35:09] Bish: and it only uses 1 other class
[12:35:19] Bish: object* rather
[12:35:30] ljarvis: now you're just saying words, because i have not a zero clue about how your code works without an example
[12:35:54] Bish: ;;, yes well, i dont think it would bring us much if i posted that code here
[12:35:58] Bish: there is so much context
[12:36:10] ljarvis: ok sure, well good luck with your problem
[12:36:46] Bish: i really didnt want to be a annoying question asker.. i really think it wouldnt give you anything
[12:36:56] Bish: writing an example for that would take alot of time
[12:37:03] Bish: but thanks, i appreciate your effort
[12:37:06] ljarvis: ok, well we wouldn't want to use your time
[12:37:19] Bish: man.. i really didnt want to be like that im sorry
[12:37:27] Bish: you really dont need to help me, dont be mean :/
[12:37:46] jrs: has joined #ruby
[12:39:46] jrs: has joined #ruby
[12:41:13] Didac: has joined #ruby
[12:41:42] jrs: has joined #ruby
[12:42:15] gnufied: has joined #ruby
[12:43:00] diegobiavati: has joined #ruby
[12:43:46] jrs: has joined #ruby
[12:45:24] eelster: has joined #ruby
[12:46:52] ljarvis: Bish: I want to help, but without a well formatted question and some basic code, there's really nothing anyone can do and you're wasting your own precious time as well as others. I'm not expecting to see thousands of lines of code, but you could have created a very basic reproduction in simple terms and then outlaid 1-3 questions very easily with minimal work
[12:48:57] Bish: sorry, i am not good at that, thats why i tried to ask a general question, sorry didnt want to bother you like that
[12:49:39] lacuna: has joined #ruby
[12:51:34] octomancer: the perl guys are way better at passive-aggressive entitlement than you lot ;-)
[12:52:03] gheegh: Bish: There is a good tutorial out there about how to structure code.. i've been programming in Ruby since 2005 and I thought it was interesting/ehlpful.
[12:52:14] gheegh: let me find it
[12:52:43] gheegh: (i'm jumping on the tail end of this conversation, if its helpful only.. i might not have the right context)
[12:53:26] ljarvis: Bish: not being good at it is fine, but lets help you get better at it
[12:53:56] gheegh: Bish: https://github.com/skmetz/poodr
[12:54:10] Bish: gheegh: im coding for long time too i guess i will never be good at it, but ill give it a shot
[12:54:20] bronson: has joined #ruby
[12:54:20] gheegh: this is the code notes on Sandi Metz's book "Practical Object Oriented Design with Ruby"
[12:54:45] gheegh: The net of what i've learned is "don't fear the class"
[12:55:03] gheegh: something that is complex, should probably be in its own class
[12:56:26] Bish: ljarvis: thats why i asked a simple question in the beginning.. i didnt want to steal someones time
[12:57:29] jinie_: has joined #ruby
[12:57:44] Bish: since copying the module would do the trick i guess…
[12:58:21] ljarvis: Bish: doing X = Y doesn't copy the Y module to X, it points the X constant to the Y constant which just happens to be the name of a module
[12:59:04] ljarvis: when you look at class Foo or module Bar -- Foo and Bar are just constants. They're not even necessary, they're just a helpful way to refer to a class
[12:59:17] Bish: yeah i know that, kinda
[12:59:30] eelster: has joined #ruby
[12:59:38] Bish: it confuses me, but basicially i know all that
[12:59:44] jphase: has joined #ruby
[12:59:49] ljarvis: what part confuses you?
[12:59:54] Bish: i guess B = Module.new(A)
[12:59:56] Bish: references and stuff
[13:00:02] mim1k: has joined #ruby
[13:00:14] Bish: i mean const_set(:B,const_get(:A))
[13:00:22] Bish: should copy const A to B, wouldnt it?
[13:00:24] ljarvis: that's just B = A
[13:00:27] Bish: ah, okay.
[13:00:42] Qchmqs__: has joined #ruby
[13:00:49] Bish: but, basicially that would work, right?
[13:01:01] Bish: because B is really the module WhateverParent::B
[13:01:04] ljarvis: work in what sense? the code would work yes, but it depends what you want it to do
[13:01:32] Bish: yeah as i said, in this case, the module only has a method "call" which doesnt reference other things as much
[13:01:44] ljarvis: ok so, lets write some code.. one sec
[13:02:43] ljarvis: how's this for a high level conceptual design of your code? https://gist.github.com/leejarvis/142c87fdd0d6c2b14e7c1f6b143df01c
[13:03:53] Bish: yes i just added a module over these 2
[13:04:18] ljarvis: ok, updated, is that correct?
[13:04:36] Bish: MessageHandler.constants.map { |x| [x.to_s.gsub(/(.)([A-Z])/,'\1_\2').downcase,MessageHandler.const_get(x)] }.to_h
[13:04:39] Bish: and did this
[13:04:45] dminuoso: ljarvis | that's just B = A
[13:04:48] Bish: but Parent would be MessageHandler in this case
[13:05:01] dminuoso: ljarvis: What if there's a method B around? D:
[13:05:11] ljarvis: dminuoso: yo
[13:05:15] Bish: u can have uppercase methods?
[13:05:16] ljarvis: dminuoso: stahp
[13:05:20] dminuoso: Bish: Yes!: D
[13:05:27] ljarvis: >> Array(nil)
[13:05:29] ruby[bot]: ljarvis: # => [] (https://eval.in/837919)
[13:05:30] ljarvis: that's a method
[13:05:39] ljarvis: but anywayyyyy, thanks dminuoso for derailing
[13:05:47] dminuoso: ljarvis: You are welcome!
[13:06:37] ljarvis: Bish: ok so, since we don't want to confuse people with too much code, lets just keep it simple. This right? https://gist.github.com/leejarvis/142c87fdd0d6c2b14e7c1f6b143df01c
[13:07:08] ljarvis: what next?
[13:07:12] zebird: has joined #ruby
[13:07:26] Bish: the call methods have both 1 parameter "job"
[13:07:31] Bish: which is the job database models
[13:07:51] madgen: has joined #ruby
[13:08:41] ldnunes: has joined #ruby
[13:08:46] Bish: well, thats probably not important.. i mean my problem is the Handlers constant
[13:09:00] Bish: i want foo and bar both point to Foo
[13:09:16] Bish: but i want to keep my funny line which maps the modules to message names
[13:10:15] ElFerna: has joined #ruby
[13:11:09] ruby-lang211: has joined #ruby
[13:14:59] nacsurte: has joined #ruby
[13:15:30] grant: has joined #ruby
[13:17:54] andrzejku: has joined #ruby
[13:20:11] ljarvis: oh :| well that really wasn't obvious
[13:20:24] ljarvis: you mentioned the code in Foo.call and Bar.call was slightly different
[13:20:40] dhaller: has joined #ruby
[13:20:45] Bish: it is, minimal, but i will change it in a way, where it checks what module it is
[13:20:47] Bish: that was my plan
[13:20:54] ljarvis: just do HANDLERS[:bar] = Foo after your line
[13:20:55] Bish: or i can pull that information out of "job"
[13:21:20] Bish: yeah., but i did that weird message=>ModuleHandling to NOT have a weird routing table
[13:21:24] Bish: and have it rather implicit
[13:21:37] ljarvis: where would the alias live?
[13:21:44] ljarvis: you have to define it somehow right?
[13:21:56] Bish: thats why i wanted to "copy" the module
[13:22:23] Bish: so the the module is different, same call method
[13:22:34] ljarvis: right, so Bar = Foo should be fine
[13:26:14] Xiti: has joined #ruby
[13:26:26] Sylario: has joined #ruby
[13:32:39] banisterfiend: has joined #ruby
[13:35:38] DLSteve: has joined #ruby
[13:36:15] jrs: Sometimes I wish someone would finish my $current_programming_project for me and make me rich with it somehow.
[13:36:30] kahra: has joined #ruby
[13:37:30] Bhootrk_: has joined #ruby
[13:39:07] anisha: has joined #ruby
[13:42:31] eljimbo: has joined #ruby
[13:42:41] synthroid: has joined #ruby
[13:44:32] Bish: jrs: i can't relate
[13:51:08] bkxd: has joined #ruby
[13:51:08] __Yiota: has joined #ruby
[13:53:32] govg: has joined #ruby
[13:54:50] bronson: has joined #ruby
[13:59:22] anisha: has joined #ruby
[13:59:32] chouhoulis: has joined #ruby
[13:59:58] DoubleMalt: has joined #ruby
[14:00:30] conta: has joined #ruby
[14:03:52] Bish: jrs: echo $current_programming_project
[14:07:26] oleo: has joined #ruby
[14:08:41] olivier__: has joined #ruby
[14:09:22] olivier__: has joined #ruby
[14:09:29] ElFerna: has joined #ruby
[14:12:45] ldnunes: has joined #ruby
[14:13:15] futilegames: has joined #ruby
[14:13:19] naprimer2: has joined #ruby
[14:14:07] anisha: has joined #ruby
[14:15:29] AxelAlex: has joined #ruby
[14:18:48] jrs: Bish, a little web app to edit and view textbooks with. It's not yet online anywhere, though.
[14:18:59] Rapture: has joined #ruby
[14:19:09] jrs: The cool thing about it, though, is that I'll be allowed to make it opensource once its finished.
[14:19:12] Bish: how many people are working on it?
[14:19:34] jrs: One programmer, three content editors, at the moment.
[14:20:41] olivier__: has joined #ruby
[14:23:01] vuoto: has joined #ruby
[14:24:04] cadillac_: has joined #ruby
[14:25:00] gil_: has joined #ruby
[14:25:00] gil_: has joined #ruby
[14:26:12] dhaller: has joined #ruby
[14:27:03] rgtk: has joined #ruby
[14:29:17] cadillac_: has joined #ruby
[14:32:03] herbmillerjr: has joined #ruby
[14:35:34] chouhoul_: has joined #ruby
[14:35:49] olivier__: has joined #ruby
[14:36:29] ElFerna: has joined #ruby
[14:36:56] polishdub: has joined #ruby
[14:37:17] bruno-: has joined #ruby
[14:38:41] raspado: has joined #ruby
[14:38:42] Pacra: has joined #ruby
[14:40:32] Derperperd: has joined #ruby
[14:44:35] jefffree: has joined #ruby
[14:47:57] Derperperd: has joined #ruby
[14:48:02] chouhoulis: has joined #ruby
[14:48:44] olivier__: has joined #ruby
[14:49:19] olivier__: has joined #ruby
[14:49:42] kahra: has joined #ruby
[14:51:14] rippa: has joined #ruby
[14:53:00] olivier__: has joined #ruby
[14:55:41] bronson: has joined #ruby
[14:56:52] dhaller: has joined #ruby
[14:57:56] andikr: has joined #ruby
[14:59:35] chouhoul_: has joined #ruby
[15:01:38] dminuoso: Oh man why cant you simply do
[15:01:50] dminuoso: -> (a) -> (b) { foo }
[15:02:12] dminuoso: ljarvis: No seriously, this should be a thing.
[15:02:19] Papierkorb: ... what is that supposed to do?
[15:02:23] dminuoso: ljarvis: Partial application?
[15:02:29] dminuoso: Papierkorb: A manually curried function
[15:03:36] ElFerna: has joined #ruby
[15:04:51] dminuoso: Papierkorb: In Haskell you even _have_ to do it because a function can have only one argument. :S
[15:05:25] Papierkorb: Haskell likes to complicate things
[15:05:42] cam27: has joined #ruby
[15:06:57] dminuoso: But considering that the namegiver of both currying and haskell was "Haskell Curry" that should not come to a surprise.
[15:07:01] kculpis: has joined #ruby
[15:08:23] olivier__: has joined #ruby
[15:08:48] cagomez: has joined #ruby
[15:10:49] mikecmpbll: i'm a lamb madras kinda man.
[15:11:07] [Butch]: has joined #ruby
[15:12:35] sarmiena_: has joined #ruby
[15:13:36] tacoboy: has joined #ruby
[15:19:31] chouhoulis: has joined #ruby
[15:22:02] cdg: has joined #ruby
[15:27:22] rgtk: has joined #ruby
[15:28:27] gusrub: has joined #ruby
[15:29:46] gnufied: has joined #ruby
[15:33:33] ljarvis: silly haskell
[15:33:37] ljarvis: and its silliness
[15:36:45] sarmiena_: has joined #ruby
[15:38:42] Pacra: has joined #ruby
[15:38:56] howdoi: has joined #ruby
[15:40:44] brent__: has joined #ruby
[15:41:48] jrs: ljarvis, they *do* have a damn nice web framework
[15:46:53] barx: has joined #ruby
[15:48:26] zmo: has joined #ruby
[15:48:29] zmo: hi all o/
[15:48:43] zmo: is there a way to colourise the outputs in irb to make it look nice?
[15:48:59] zmo: I've seen that there are colours in the homebrew's irbrc
[15:49:04] zmo: but I'm running archlinux ;)
[15:49:05] zacts: has joined #ruby
[15:49:23] zmo: ljarvis - could you point me some RTFM where I can find an answer ?
[15:49:51] zmo: I tried using wirble/hirb with Hirb::View.enable
[15:49:52] ljarvis: perhaps https://github.com/janlelis/irbtools
[15:49:58] zmo: but it's still black/white
[15:50:00] ljarvis: i dunno, I googled "ruby irb colours"
[15:50:05] zmo: so did I
[15:50:11] zmo: maybe that's the english spelling
[15:50:31] herbmillerjr: has joined #ruby
[15:51:50] npgm: has joined #ruby
[15:52:49] uZiel: has joined #ruby
[15:52:57] Pacra: has joined #ruby
[15:54:57] mtkd: has joined #ruby
[15:55:18] gusrub: has joined #ruby
[15:56:53] bronson: has joined #ruby
[15:57:53] gnufied: has joined #ruby
[15:59:24] lacuna: has joined #ruby
[16:00:19] eelster: has joined #ruby
[16:04:41] tacoboy: has joined #ruby
[16:06:22] amclain: has joined #ruby
[16:09:21] olivier__: has joined #ruby
[16:09:55] olivier__: has joined #ruby
[16:10:11] haylon: has joined #ruby
[16:10:48] gusrub: has joined #ruby
[16:14:49] kwesidev: has joined #ruby
[16:15:15] gnufied: has joined #ruby
[16:17:19] baweaver: zmo: If you use Pry most of that comes built in.
[16:17:23] ruby[bot]: Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
[16:17:42] zmo: baweaver - TBH, I'm using rails console and I'm connecting to heroku remotely
[16:18:19] baweaver: Ah, Not immediately sure if you can do that on Heroku but I'd guess you can with pry-rails or similar tools.
[16:19:03] sarmiena_: has joined #ruby
[16:19:48] banisterfiend: if you set pry-rails as your console it'll 'just work' with heroku @zmo
[16:19:49] rgtk: has joined #ruby
[16:26:40] bronson: has joined #ruby
[16:27:51] nowhere_man: has joined #ruby
[16:28:10] bronson: has joined #ruby
[16:29:04] FastJack: has joined #ruby
[16:29:06] Ishido: has joined #ruby
[16:31:54] cadillac_: has joined #ruby
[16:34:48] nacsurte: has joined #ruby
[16:36:12] t-recx: has joined #ruby
[16:36:58] rgtk: has joined #ruby
[16:38:52] ar1a: has joined #ruby
[16:40:15] eelster: has joined #ruby
[16:40:18] olivier__: has joined #ruby
[16:42:32] jrs: has joined #ruby
[16:47:33] BSab: has joined #ruby
[16:52:14] conta: has joined #ruby
[16:52:44] uZiel: has joined #ruby
[16:53:32] jrs: has joined #ruby
[16:54:27] chouhoul_: has joined #ruby
[16:55:30] cdg: has joined #ruby
[16:57:04] conta: has joined #ruby
[16:58:12] KeyJoo: has joined #ruby
[17:01:35] jrs: has joined #ruby
[17:02:36] barx: has joined #ruby
[17:05:35] jrs: has joined #ruby
[17:07:23] olivier__: has joined #ruby
[17:07:26] alveric: has joined #ruby
[17:07:35] jrs: has joined #ruby
[17:09:25] mim1k: has joined #ruby
[17:09:34] jrs: has joined #ruby
[17:10:11] barx: has joined #ruby
[17:10:39] jackjackdripper: has joined #ruby
[17:14:39] jackjackdripper: has joined #ruby
[17:15:25] ColeHub: has joined #ruby
[17:19:48] BSaboia: has joined #ruby
[17:20:35] roshanavand: has joined #ruby
[17:21:33] SteenJobs_: has joined #ruby
[17:22:47] code_zombie: has joined #ruby
[17:26:14] eckhardt: has joined #ruby
[17:26:42] enterprisey: has joined #ruby
[17:28:43] DrCode: has joined #ruby
[17:29:32] andikr: has joined #ruby
[17:29:41] duderonomy: has joined #ruby
[17:29:41] kies: has joined #ruby
[17:31:21] sepp2k: has joined #ruby
[17:32:57] TomyLobo2: has joined #ruby
[17:34:22] ColeHub: has joined #ruby
[17:34:45] SteenJobs_: has joined #ruby
[17:34:45] sarmiena_: has joined #ruby
[17:37:53] conta: has joined #ruby
[17:42:43] mtkd: has joined #ruby
[17:46:44] ColeHub: has joined #ruby
[17:49:43] BSAlb: has joined #ruby
[17:54:36] AndBobsYourUncle: has joined #ruby
[17:57:27] weaksauce: has joined #ruby
[18:01:21] dliobom: has joined #ruby
[18:02:04] ColeHub: has joined #ruby
[18:05:09] DLSteve: has joined #ruby
[18:06:28] ColeHub: has joined #ruby
[18:10:38] bruno-: has joined #ruby
[18:11:34] __Yiota: has joined #ruby
[18:12:59] ColeHub: has joined #ruby
[18:13:30] WeiJunLi: has joined #ruby
[18:15:52] chrisseaton: If I have a string A, and want to replace all instances of some other string B, with string C instead, how should I best do that in Ruby? C may contain anything, so String#gsub won't work.
[18:16:36] JBlazeCoder21: has joined #ruby
[18:20:32] Eiam: has joined #ruby
[18:20:52] olivier__: has joined #ruby
[18:21:35] havenwood: chrisseaton: C isn't a string?
[18:21:47] havenwood: chrisseaton: What would example values for A, B and C be? I'm not quite sure I follow.
[18:21:59] chrisseaton: I want to do a.gsub(b, c)
[18:22:06] chrisseaton: All are strings
[18:22:18] bronson: has joined #ruby
[18:22:24] havenwood: >> 'xo24xo24xo'.gsub '24', '42'
[18:22:27] chrisseaton: But c could contain any string at all, so could include back-references, which I don't want evaluated as a regexp
[18:22:29] ruby[bot]: havenwood: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[18:22:36] havenwood: => "xo42xo42xo"
[18:23:45] chrisseaton: >> 'foo'.gsub('f', '\0')
[18:23:51] ruby[bot]: chrisseaton: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[18:24:13] conta: has joined #ruby
[18:24:16] chrisseaton: 'foo'.gsub('f', '\0') -> "foo"
[18:24:25] chrisseaton: I want '\0oo'
[18:24:29] chouhoulis: has joined #ruby
[18:24:53] havenwood: ah, right - that makes sense, mmm
[18:25:09] ljarvis: 'foo'.gsub('f', '\\\0')
[18:25:19] dviola: has joined #ruby
[18:25:27] ramfjord: has joined #ruby
[18:25:44] havenwood: >> 'xo24xo24xo'.gsub '24', Regexp.escape('\0')
[18:25:49] ruby[bot]: havenwood: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[18:25:53] havenwood: #=> "xo\\0xo\\0xo"
[18:25:56] havenwood: Well, bot is down.
[18:26:18] ljarvis: ACTION obviously read 0 backlog 
[18:26:42] havenwood: chrisseaton: The best I can think is to Regexp.escape the values.
[18:27:22] chrisseaton: I'm sure I must be overlooking some methods... surely there must be a core library method to do something as simple as substitute a string...
[18:28:02] rabajaj: has joined #ruby
[18:28:26] havenwood: String#tr won't work. I'm afraid there isn't.
[18:29:24] havenwood: Regexp.escape is no good I suppose because of the noise the escaping causes.
[18:29:37] herwin: foo = 'foo'; foo['o'] = 'a'; foo # => 'fao'
[18:29:48] havenwood: herwin: just needs to be repeated
[18:29:50] herwin: that's the only string sub I could think of
[18:30:29] herwin: but wouldn't be surprised if it used regex under the hood
[18:30:43] havenwood: chrisseaton: how about: 'xo24xo24xo'.gsub('24') { '\0' }
[18:30:45] havenwood: #=> "xo\\0xo\\0xo"
[18:30:55] hutch34: has joined #ruby
[18:31:06] chrisseaton: Ah clever, thanks
[18:32:13] havenwood: It'd set $1, $2, $`, $&, and $' but if that's okay at least it gets the value right.
[18:32:15] AndBobsYourUncle: has joined #ruby
[18:32:46] havenwood: You're welcome
[18:33:29] valkyr2e: has joined #ruby
[18:34:24] kwesidev: has joined #ruby
[18:35:33] jrs: has joined #ruby
[18:36:26] ruby[bot]: -b *!*@tor-relay.zwiebeltoralf.de$#ruby-banned
[18:39:08] olivier__: has joined #ruby
[18:39:22] ColeHub: has joined #ruby
[18:41:02] SeepingN: has joined #ruby
[18:42:37] ColeHub: has joined #ruby
[18:44:04] lasenna[m]: has joined #ruby
[18:44:12] cdg: has joined #ruby
[18:44:23] eelster: has joined #ruby
[18:44:53] olivier__: has joined #ruby
[18:45:33] cadillac_: has joined #ruby
[18:46:13] ule: has joined #ruby
[18:50:01] high_fiver: has joined #ruby
[18:50:04] runescape07rsps: has joined #ruby
[18:51:21] high_fiver: has joined #ruby
[18:54:00] anisha: has joined #ruby
[18:54:02] AndBobsYourUncle: has joined #ruby
[18:56:00] Tempesta_: has joined #ruby
[18:56:09] ElFerna: has joined #ruby
[18:56:37] dliobom: has left #ruby: ()
[18:59:24] olivier__: has joined #ruby
[19:01:25] lacuna: has joined #ruby
[19:01:49] cagomez: has joined #ruby
[19:01:54] anistor86: has joined #ruby
[19:02:22] ForeignBiscuit: has joined #ruby
[19:02:23] anistor86: has left #ruby: ("Ex-Chat")
[19:02:23] enterprisey: has joined #ruby
[19:02:43] rabajaj: has joined #ruby
[19:02:44] anistor86: has joined #ruby
[19:02:58] anistor86: hello everyone!
[19:03:18] havenwood: anistor86: hi!
[19:04:02] anistor86: i am new to the ruby world...and I really like it!
[19:04:42] anistor86: I am currently in London and studying ruby and everything in english, and I was thinking to do something for the italian comunity
[19:04:43] havenwood: anistor86: welcome!
[19:04:53] havenwood: anistor86: nice
[19:05:01] anistor86: does anyone know if the italian community is still alive?
[19:05:45] havenwood: anistor86: There is a #ruby-it channel. I'm not sure on its population.
[19:05:54] anistor86: it's just because I was web developer back in italy (long time ago) and at that time my english wasn't good and I struggled a bit to learn in english...so I wan't to help the italian community for that!
[19:05:57] havenwood: anistor86: Here's a list of channels: https://ruby-community.com/pages/channels
[19:06:38] anistor86: yep...there is...but there are 8 users...I wrote few minutes ago...but nothing yet...let's see!
[19:07:52] lxsameer: has joined #ruby
[19:08:13] anistor86: anyway...thanks for the help!
[19:09:47] ur5us: has joined #ruby
[19:11:05] andrzejku: has joined #ruby
[19:11:07] jphase: has joined #ruby
[19:13:33] JR042444__: has joined #ruby
[19:14:01] JR042444__: has joined #ruby
[19:17:30] hurricanehrndz: has joined #ruby
[19:19:02] nirix: has joined #ruby
[19:20:33] lacuna: has joined #ruby
[19:21:49] Cohedrin_: has joined #ruby
[19:22:15] kwesidev: has joined #ruby
[19:22:45] romankapitonov: has joined #ruby
[19:23:06] wilbert: has joined #ruby
[19:23:15] bronson: has joined #ruby
[19:23:43] johnny56_: has joined #ruby
[19:24:21] Fichtenstein: has joined #ruby
[19:24:24] ElFerna: has joined #ruby
[19:24:59] Cohedrin_: has joined #ruby
[19:25:11] conta: has joined #ruby
[19:25:58] mikecmpbll: has joined #ruby
[19:29:10] ar1a: has joined #ruby
[19:34:34] wald0: has joined #ruby
[19:35:57] AndBobsYourUncle: has joined #ruby
[19:36:10] ColeHub: has joined #ruby
[19:36:57] eelster: has joined #ruby
[19:37:19] johnny56_: has joined #ruby
[19:37:22] guacamole: has joined #ruby
[19:37:35] ElFerna: has joined #ruby
[19:41:21] eckhardt: has joined #ruby
[19:48:36] ForeignBiscuit: has joined #ruby
[19:50:49] vuoto: has joined #ruby
[19:53:49] WeiJunLi: has joined #ruby
[19:54:29] jphase: has joined #ruby
[20:01:06] kith: has joined #ruby
[20:03:13] olivier__: has joined #ruby
[20:03:54] _aeris_: has joined #ruby
[20:07:11] cagomez: has joined #ruby
[20:07:20] ElFerna: has joined #ruby
[20:07:34] jrs: has joined #ruby
[20:09:34] jrs: has joined #ruby
[20:10:47] cagomez: has joined #ruby
[20:11:34] jrs: has joined #ruby
[20:12:26] Rapture: has joined #ruby
[20:15:12] ule: Hey guys, I'm getting a nice deprecated warning here when I do assert_equal FOO, BAR when FOO and BAR are nil
[20:15:42] ule: I can definity replace it to assert_nil and get rid of the deprecated message but I have some tests inside loops so, some of them are nil some of them are not
[20:16:15] ule: so, What would you do? assert_equal FOO, BAR unless FOO.nil? + assert_nil FOO, BAR if FOO.nil?
[20:17:25] cahoots: has joined #ruby
[20:17:37] ForeignBiscuit: has joined #ruby
[20:17:59] sleepee: has joined #ruby
[20:18:05] ule: I don't understand why deprecating my nice assert_equal NIL, NIL
[20:18:13] cahoots: hi, if i run a command with `<command>` and then on the next line call $?.exitstatus, is it guaranteed to return the exit status of that command? or could it be overridden by some command running in parallel?
[20:19:20] Papierkorb: ule: there was never a reason for `NIL`.
[20:19:30] yorickpeterse: cahoots: $? is scoped per thread
[20:19:48] cahoots: yorickpeterse, thanks :)
[20:20:13] yorickpeterse: actually, seems behaviour contradicts the source
[20:20:43] yorickpeterse: ah no, that was just Pry messing things up
[20:21:21] ElFerna: has joined #ruby
[20:22:29] bronson: has joined #ruby
[20:24:48] AndBobsY_: has joined #ruby
[20:25:03] ozcanesen: has joined #ruby
[20:25:35] joast: has joined #ruby
[20:26:13] mtkd: has joined #ruby
[20:31:24] SeepingN: ACTION notes to "stick with wirb"
[20:36:52] weaksauce: has joined #ruby
[20:38:34] HoierM: has joined #ruby
[20:39:19] lacuna: has joined #ruby
[20:42:37] wilbert: has joined #ruby
[20:49:45] ElFerna: has joined #ruby
[20:52:22] olivier__: has joined #ruby
[20:53:12] wilbert: has joined #ruby
[20:54:34] domgetter: has joined #ruby
[20:55:17] WeiJunLi: has joined #ruby
[20:56:32] dhaller: has joined #ruby
[20:57:34] pwned: has joined #ruby
[21:00:40] Dimik: has joined #ruby
[21:01:17] mim1k: has joined #ruby
[21:02:35] lxnr: has joined #ruby
[21:03:05] wilbert: has joined #ruby
[21:09:23] dhaller: has joined #ruby
[21:14:31] aclark: has joined #ruby
[21:16:51] ledestin: has joined #ruby
[21:17:49] cagomez: has joined #ruby
[21:18:12] jphase: has joined #ruby
[21:18:18] ur5us: has joined #ruby
[21:18:38] cagomez: has joined #ruby
[21:18:55] bkxd: has joined #ruby
[21:20:00] b3ck_: has joined #ruby
[21:23:02] __Yiota: has joined #ruby
[21:23:20] bronson: has joined #ruby
[21:25:25] darix: SeepingN: pry >>> *irb :p
[21:26:38] SeepingN: not when it causes Confusion and Delay
[21:27:12] SeepingN: I'm consued enough tyring to debug new code, I don't need my interpreter to add to the mix on its own!
[21:27:36] ElFerna: has joined #ruby
[21:27:41] JBlazeCoder21: has joined #ruby
[21:29:27] xdc: has joined #ruby
[21:30:04] olivier__: has joined #ruby
[21:30:26] ecuanaso: has joined #ruby
[21:32:21] hkdsun: has joined #ruby
[21:32:31] JBlazeCoder21: has joined #ruby
[21:37:13] veex: has joined #ruby
[21:40:51] ElFerna: has joined #ruby
[21:41:05] kkiero: has joined #ruby
[21:42:34] elcontrastador: has joined #ruby
[21:47:24] duderonomy: has joined #ruby
[21:51:16] McBride36: has joined #ruby
[21:56:38] wilbert_: has joined #ruby
[21:57:08] dhaller: has joined #ruby
[21:58:11] stee_3: has left #ruby: ()
[22:04:44] cagomez: has joined #ruby
[22:07:37] cagomez: has joined #ruby
[22:08:19] cagomez: has joined #ruby
[22:12:37] ecuanaso: has joined #ruby
[22:13:41] wald0: has joined #ruby
[22:16:16] olivier__: has joined #ruby
[22:19:57] brent__: has joined #ruby
[22:20:26] bronson: has joined #ruby
[22:23:53] Cohedrin_: has joined #ruby
[22:25:20] dhaller: has joined #ruby
[22:25:34] gusrub: has joined #ruby
[22:26:07] ElFerna: has joined #ruby
[22:27:17] brent__: has joined #ruby
[22:27:27] jinie_: has joined #ruby
[22:31:20] mtkd: has joined #ruby
[22:32:27] olivier__: has joined #ruby
[22:32:47] deerskin: has joined #ruby
[22:36:04] fullstack: has joined #ruby
[22:36:18] tAn: has joined #ruby
[22:36:48] fullstack: has joined #ruby
[22:41:53] b3ck_: has joined #ruby
[22:49:29] ElFerna: has joined #ruby
[22:55:27] yorickpeterse: I'd argue Pry is no more confusing than IRB
[22:55:39] aclark: has joined #ruby
[22:56:12] ecuanaso: has joined #ruby
[22:59:21] SeepingN: not confusing itself
[22:59:41] SeepingN: but when it causes issues with libraries and code, that is confusing
[23:00:16] SeepingN: you don't want to troubleshoot code that isn't broken, that's a good way to kill a day or 2
[23:00:39] grant: has joined #ruby
[23:01:03] QualityAddict: has joined #ruby
[23:06:48] jenrzzz: has joined #ruby
[23:06:49] Pacra: has joined #ruby
[23:08:26] ElFerna: has joined #ruby
[23:12:22] nowhere_man: has joined #ruby
[23:12:49] apparition: has joined #ruby
[23:15:56] al2o3-cr: yorickpeterse: why do you say this?
[23:17:07] al2o3-cr: irb is petty !confusing too
[23:17:10] ecuanaso: has joined #ruby
[23:20:19] JusticeFries: has joined #ruby
[23:21:13] Dry_Lips: has joined #ruby
[23:21:14] Dry_Lips: has joined #ruby
[23:23:11] SeepingN: I haven't had irb screw things up too many times though.
[23:24:36] Cohedrin_: has joined #ruby
[23:24:43] conta: has joined #ruby
[23:28:41] ElFerna: has joined #ruby
[23:31:59] al2o3-cr: SeepingN: only human error fucks shit up
[23:32:37] cdg: has joined #ruby
[23:33:06] guacamole: has joined #ruby
[23:33:46] SeepingN: and when that human is "some dude who wrote this irb program" and "that other dude that updated the Great XYZ librarie of all rubies", and you discover the hard way that the 2 don't play well together, who's to blame?
[23:33:52] SeepingN: you, for not writing the whole thing in ASM yourself
[23:34:44] eljimbo: has joined #ruby
[23:35:23] uZiel: has joined #ruby
[23:35:26] eljimbo: has joined #ruby
[23:35:35] al2o3-cr: SeepingN: human error is inevitable
[23:36:14] eljimbo: has joined #ruby
[23:37:10] eljimbo: has joined #ruby
[23:38:20] JBlazeCoder21: has joined #ruby
[23:42:58] alveric1: has joined #ruby
[23:43:08] JBlazeCo_: has joined #ruby
[23:43:20] al2o3-cr: >> 1 + 1 == 3
[23:43:21] ruby[bot]: al2o3-cr: # => false (https://eval.in/838081)
[23:43:28] al2o3-cr: human error
[23:43:47] SeepingN: you did that on purpose
[23:43:54] lesce: has joined #ruby
[23:44:00] al2o3-cr: no shit sherlock
[23:44:05] SeepingN: human onpurpose
[23:44:38] cagomez: has joined #ruby
[23:44:55] kiltzman: has joined #ruby
[23:45:48] perniciouscaffei: has joined #ruby
[23:47:47] JBlazeCoder21: has joined #ruby
[23:49:07] cagomez: has joined #ruby
[23:50:57] hutch34: has joined #ruby
[23:57:04] al2o3-cr: >> "foo".clamp("fox", "foy") << ?y
[23:57:05] ruby[bot]: al2o3-cr: # => undefined method `clamp' for "foo":String (NoMethodError) ...check link for more (https://eval.in/838082)
[23:57:13] JBlazeCoder21: has joined #ruby
[23:58:57] SeepingN: give em the CLAMPS
[23:59:11] SeepingN: --[ ]-- clamp clamp
[23:59:55] al2o3-cr: i'm drinking some shit called rekorderlig