« Back to channel list

#ruby - 14 September 2015

« Back 1 day Forward 1 day »
[00:03:06] G186: thank you mistym and Ox0dea
[00:03:14] Ox0dea: G186: Happy to help.
[00:03:43] G186: they both worked, and I see the difference as the first one does accept arbitrary numbers of inputs!
[00:04:26] Rollabunna: has joined #ruby
[00:05:17] pontiki: has joined #ruby
[00:11:47] acke_: has joined #ruby
[00:13:40] acke__: has joined #ruby
[00:15:55] mic_e: has joined #ruby
[00:19:07] choke: has joined #ruby
[00:19:32] pyon: has joined #ruby
[00:27:34] Oog: has joined #ruby
[00:31:31] bruno-: has joined #ruby
[00:31:44] psye: has joined #ruby
[00:32:01] doublemalt_: has joined #ruby
[00:34:23] znz_jp: has joined #ruby
[00:35:11] Ox0dea: There's really no refinement hook?
[00:36:51] Limix: has joined #ruby
[00:37:11] samnaples: has joined #ruby
[00:37:17] samnaples: are there any sites where i can practice html and css development besides codecademy?
[00:38:41] Ox0dea: samnaples: data:text/html;,<b><i><u>foo</u></i></b>
[00:38:46] Ox0dea: Paste that into your address bar and hit Enter.
[00:38:48] Ox0dea: Then go nuts.
[00:39:38] samnaples: can you please be helpful... trolling is not nice
[00:39:48] Ox0dea: samnaples: You're in the wrong channel, bud.
[00:41:11] Ox0dea: I think you ought to count it fortuitous that you were shown a new trick and not the door.
[00:41:46] samnaples: has left #ruby: ()
[00:44:38] mistym: Ox0dea: Seriously, be polite. It's not the right channel but you don't have to be rude.
[00:45:29] Ox0dea: mistym: Virtually anybody else would've done an ?ot and that would've been the end of it.
[00:46:13] Guest16641: has joined #ruby
[00:47:06] Ox0dea: Data URIs are remarkably useful in the right circumstances. Perhaps he'll need one someday and our exchange will set his search in the right direction.
[00:49:03] morenoh149: has joined #ruby
[00:51:29] karapetyan: has joined #ruby
[00:51:44] JDiPierro: has joined #ruby
[00:52:26] sonofflynn: has left #ruby: ()
[00:54:03] juanpablo_: has joined #ruby
[00:54:28] BlackCoyote: has joined #ruby
[00:54:58] dopiee: has joined #ruby
[00:56:53] dgutierrez1287: has joined #ruby
[00:57:53] i: has joined #ruby
[00:58:44] saddad: has joined #ruby
[01:03:18] psye: has joined #ruby
[01:04:43] slayerjain: has joined #ruby
[01:06:51] pontiki: not my night tonite
[01:08:44] psye: has joined #ruby
[01:10:03] ReK2: has joined #ruby
[01:11:00] rehat: has joined #ruby
[01:12:06] JDiPierro: has joined #ruby
[01:12:43] lampshades: has joined #ruby
[01:15:00] grenierm: has joined #ruby
[01:16:18] keen__________18: has joined #ruby
[01:16:23] Guest28285: has joined #ruby
[01:16:36] FrankD: has joined #ruby
[01:21:35] ramfjord: has joined #ruby
[01:29:42] bb010g: has joined #ruby
[01:36:02] NeverDie_: has joined #ruby
[01:36:17] leafybasil: has joined #ruby
[01:36:53] rodfersou: has joined #ruby
[01:37:56] diego1: has joined #ruby
[01:38:05] [spoiler]: has joined #ruby
[01:38:14] diego1: has joined #ruby
[01:38:33] s00pcan: has joined #ruby
[01:39:41] umgrosscol: has joined #ruby
[01:40:13] diego1: has joined #ruby
[01:42:43] snow: has joined #ruby
[01:42:58] diego1: has joined #ruby
[01:43:50] Pupeno: has joined #ruby
[01:50:45] JDiPierro: has joined #ruby
[01:51:55] devoldmx: has joined #ruby
[01:55:21] devoldmx_: has joined #ruby
[01:57:47] baweaver: has joined #ruby
[01:57:58] mgorbach: has joined #ruby
[01:58:07] Oog: has joined #ruby
[01:58:56] mordocai: has joined #ruby
[02:02:51] moss: has joined #ruby
[02:03:53] havenwood: has joined #ruby
[02:05:19] Rollabunna: has joined #ruby
[02:06:19] Yzguy: has joined #ruby
[02:09:18] CloCkWeRX: has joined #ruby
[02:11:26] jenrzzz: has joined #ruby
[02:11:32] houhoulis: has joined #ruby
[02:17:27] slayerjain: has joined #ruby
[02:20:09] michael_mbp: has joined #ruby
[02:22:54] rbennacer: has joined #ruby
[02:24:24] atomical: has joined #ruby
[02:24:36] acke: has joined #ruby
[02:25:27] seitensei: has joined #ruby
[02:33:51] tmtwd: has joined #ruby
[02:34:05] tejasmanohar: has joined #ruby
[02:35:12] sdwrage: has joined #ruby
[02:35:42] djbkd: has joined #ruby
[02:36:44] leafybasil: has joined #ruby
[02:42:48] juanpablo_: has joined #ruby
[02:44:38] ledestin: has joined #ruby
[02:49:30] diego1: has joined #ruby
[02:50:51] leat: has joined #ruby
[02:50:58] diego1: has joined #ruby
[02:51:57] shmilan: has joined #ruby
[02:53:34] sacarlson: has left #ruby: ()
[02:57:14] zotherstupidguy: has joined #ruby
[02:57:39] ruby-lang120: has joined #ruby
[02:57:44] tejasmanohar: has joined #ruby
[02:58:21] pawnbox: has joined #ruby
[03:00:50] gener1c: has joined #ruby
[03:01:55] fedexo: has joined #ruby
[03:02:02] catcher: has joined #ruby
[03:07:07] MasterPiece: has joined #ruby
[03:08:28] karapetyan: has joined #ruby
[03:09:49] braincrash: has joined #ruby
[03:10:38] ngscheurich: has joined #ruby
[03:20:43] pyon: has joined #ruby
[03:22:57] bestbrents__: has joined #ruby
[03:23:54] dgutierrez1287: has joined #ruby
[03:25:33] crdpink2: has joined #ruby
[03:25:37] jdawgaz: has joined #ruby
[03:26:04] wldcordeiro_: has joined #ruby
[03:26:36] fedexo: has joined #ruby
[03:26:51] verdoc: has joined #ruby
[03:28:52] Shidash: has joined #ruby
[03:29:06] nullwarp: has joined #ruby
[03:29:39] linc01n: has joined #ruby
[03:29:51] mjmac: has joined #ruby
[03:29:59] bruno-: has joined #ruby
[03:30:02] sfr^: has joined #ruby
[03:30:07] universa1: has joined #ruby
[03:30:31] wookiehangover: has joined #ruby
[03:30:42] MichaelSmith: has joined #ruby
[03:34:00] darkf: has joined #ruby
[03:36:42] pontiki: has joined #ruby
[03:37:15] luckyme: has joined #ruby
[03:37:36] krz: has joined #ruby
[03:40:33] xcesariox: has joined #ruby
[03:43:01] Ox0dea: What's going wrong here? https://eval.in/432497
[03:44:40] Hanmac: Ox0dea: local variables are way to lokal and dont leave the eval area
[03:44:51] gix: has joined #ruby
[03:45:38] Ox0dea: hanmac: But that's what the Binding class is for?
[03:45:46] Hanmac: and the Class new tracepoint is called after the class is already created
[03:46:02] Ox0dea: hanmac: No, it isn't. Observe the order of the outputs.
[03:46:23] Ox0dea: TracePoint has the :class event for class entry, and :end for exit.
[03:46:41] Ox0dea: That I'm specifically only capturing :class refutes that argument, I would think.
[03:49:42] flughafen: has joined #ruby
[03:51:18] JDiPierro: has joined #ruby
[03:52:24] Ox0dea: It seems TracePoint doesn't receive the class's actual Binding...
[03:54:11] iateadonut: has joined #ruby
[03:55:12] dgutierrez1287: has joined #ruby
[03:58:52] nofxx: has joined #ruby
[03:59:05] willywos: has joined #ruby
[03:59:58] DmitryBochkarev: has joined #ruby
[04:00:35] Oog: has joined #ruby
[04:00:59] dionysus69: has joined #ruby
[04:05:43] mistermocha: has joined #ruby
[04:05:53] Ox0dea: Meh: https://eval.in/432506
[04:06:11] Rollabunna: has joined #ruby
[04:09:27] nahtnam: has joined #ruby
[04:12:48] nik_-_: has joined #ruby
[04:15:19] godfat: has joined #ruby
[04:15:54] chipotle: has joined #ruby
[04:15:56] braincra-: has joined #ruby
[04:24:06] taylorrf: has joined #ruby
[04:31:18] yfeldblum: has joined #ruby
[04:31:34] juanpablo_: has joined #ruby
[04:35:08] rickmasta: has joined #ruby
[04:36:38] vdamewood: has joined #ruby
[04:37:16] oldbay: has joined #ruby
[04:41:40] psy: has joined #ruby
[04:42:01] CloCkWeRX: has joined #ruby
[04:42:40] Hrorek: has joined #ruby
[04:48:52] Narzew: has joined #ruby
[04:50:09] tkuchiki: has joined #ruby
[04:55:24] acke: has joined #ruby
[05:03:12] agent_white: has joined #ruby
[05:03:53] duncannz: has joined #ruby
[05:08:13] pawnbox: has joined #ruby
[05:09:20] karapetyan: has joined #ruby
[05:10:50] allomov: has joined #ruby
[05:12:33] ramfjord: has joined #ruby
[05:13:47] bitfurry: has joined #ruby
[05:15:19] dhjondoh: has joined #ruby
[05:18:58] zotherstupidguy: has joined #ruby
[05:24:02] djbkd: has joined #ruby
[05:24:56] astrobunny: has joined #ruby
[05:28:47] nofxx: There's nomad-cli and another one nice toolset for ios development. Anyone remember the name?
[05:30:05] Oog: has joined #ruby
[05:33:19] nofxx: found it. https://fastlane.tools/
[05:33:57] nofxx: Both ruby, nice. Wish there was same for android. Such a monkey job upload stuff to play.
[05:34:27] codenapper: has joined #ruby
[05:36:13] aganov: has joined #ruby
[05:37:10] dhjondoh1: has joined #ruby
[05:40:14] claw: has joined #ruby
[05:44:09] codecop: has joined #ruby
[05:45:19] tagrudev: has joined #ruby
[05:46:46] astrobunny: has joined #ruby
[05:46:56] renderful: has joined #ruby
[05:51:15] chouhoulis: has joined #ruby
[05:52:13] alexUaN: has joined #ruby
[05:53:10] lampshades: has joined #ruby
[05:53:38] last_staff: has joined #ruby
[05:53:40] pawnbox: has joined #ruby
[05:53:54] Salehi: has joined #ruby
[05:57:22] michael_mbp: has joined #ruby
[05:59:25] rickmasta: has joined #ruby
[05:59:26] naftilos76: has joined #ruby
[05:59:38] n008f4g_: has joined #ruby
[06:00:34] JDiPierro: has joined #ruby
[06:03:41] astrobunny: has joined #ruby
[06:03:45] nhhagen: has joined #ruby
[06:06:34] yottanami: has joined #ruby
[06:07:04] Rollabunna: has joined #ruby
[06:07:43] solars: has joined #ruby
[06:08:13] CloCkWeRX: has joined #ruby
[06:08:33] yottanami: I used Net::HTTP::Post to request and I got #<Net::HTTPFound 302 Found readbody=true> What does it means? the body different with page that I submitet in HTML
[06:10:56] eGGsha: has joined #ruby
[06:11:10] platzhirsch: has joined #ruby
[06:12:19] morenoh149: yottanami: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_Redirection
[06:14:05] lkba: has joined #ruby
[06:16:58] kp666: has joined #ruby
[06:20:19] juanpablo_: has joined #ruby
[06:20:49] bitfurry: Hey , I Just started reading about contribution to ruby . Can somebody provide some info about where to start and where I can find reported bugs ?
[06:21:42] riotjones: has joined #ruby
[06:22:15] acke: has joined #ruby
[06:22:45] karapetyan: has joined #ruby
[06:24:49] shevy: bitfurry do you mean bugs in default ruby, or addons?
[06:25:08] shevy: bitfurry if it is the core part of ruby, the dev team uses this tracker system here: https://bugs.ruby-lang.org/projects/ruby-trunk
[06:25:30] shevy: for addons it depends, many use github; a few parts of core also can be found on github
[06:25:47] bitfurry: shevy I am looking for bugs
[06:26:06] bitfurry: which a default of ruby
[06:26:28] bitfurry: and Thanks for sharing :)
[06:27:49] SCHAAP137: has joined #ruby
[06:29:53] auzty: has joined #ruby
[06:33:36] firstdayonthejob: has joined #ruby
[06:34:54] yottanami: morenoh149, I now it is wrong channel but is any chance to know how should I return (pass) this Net::HTTP result to Rails output?
[06:35:30] arup_r: has joined #ruby
[06:36:16] oldbay: has joined #ruby
[06:37:02] JDiPierro: has joined #ruby
[06:39:56] CloCkWeRX: has joined #ruby
[06:41:16] shevy: matti! you are back!
[06:41:34] matti: Hey shevy!
[06:41:53] matti: shevy: I am always here, but so busy I hardly say anything.
[06:42:03] matti: shevy: I moved to Japan from the UK (which is also different time zone now).
[06:42:31] shevy: you are near matz :)
[06:42:49] matti: Actually, he is in the US.
[06:43:11] matti: shevy: How's life been treating you?
[06:43:24] jas02: has joined #ruby
[06:43:35] shevy: dunno, so lala :D
[06:43:57] shevy: matz is in the USA?
[06:45:15] matti: I am not 100% sure, but he might have moved to San Francisco?
[06:45:33] baweaver: ACTION is in San Francisco
[06:45:52] baweaver: unless something huge changed and I missed the entire thing
[06:46:09] matti: I am not sure. I thought he is in the US.
[06:46:16] matti: Anyway :)
[06:47:00] baweaver: He's been around here a few times at least though.
[06:47:34] towski_: has joined #ruby
[06:48:39] matti: "(...) Since 1997 I have been living in Matsue City in Shimane Prefecture (...)"
[06:49:18] matti: Interesting: https://github.com/matz/streem
[06:50:00] Pupeno: has joined #ruby
[06:50:28] pawnbox: has joined #ruby
[06:50:52] voker57: has joined #ruby
[06:51:15] skullcrasher: has joined #ruby
[06:52:00] chouhoulis: has joined #ruby
[06:52:13] lsmola: has joined #ruby
[06:53:18] shevy: matz living in matz city
[06:53:24] Pupeno_: has joined #ruby
[06:59:46] allenn: has joined #ruby
[06:59:56] andikr: has joined #ruby
[06:59:58] Balzrael: has joined #ruby
[07:00:40] Oog: has joined #ruby
[07:00:56] shevy: San Franciso is a dam good town for a beaver
[07:01:39] Salehi: has joined #ruby
[07:02:15] callumacrae: has joined #ruby
[07:02:20] pawnbox: has joined #ruby
[07:03:23] shevy: look, python confuses me. they have a tarball... Python-3.5.0.tar.xz
[07:03:35] bitfurry: has joined #ruby
[07:03:42] shevy: why do they use first letter capitalized
[07:04:02] shevy: perl is not doing this... php is not doing this... lua is not doing this ... ruby is not doing this ...
[07:05:04] shevy: their logo uses downcased "python" too :D
[07:06:12] Salehi: has joined #ruby
[07:06:32] Blaguvest: has joined #ruby
[07:06:37] pawnbox: has joined #ruby
[07:07:19] vdamewood: has joined #ruby
[07:07:44] Balzrael: has joined #ruby
[07:10:09] pontiki: has joined #ruby
[07:11:33] acke: has joined #ruby
[07:13:08] jimms: has joined #ruby
[07:13:11] UtkarshRay: has joined #ruby
[07:13:16] jmarrec: has joined #ruby
[07:13:24] unclouded: has joined #ruby
[07:13:37] nhhagen_: has joined #ruby
[07:14:44] JohnnyTao: has joined #ruby
[07:14:54] dede: has joined #ruby
[07:19:30] monod: has joined #ruby
[07:21:51] JohnnyTao: has joined #ruby
[07:22:17] pawnbox: has joined #ruby
[07:23:25] Hrorek: has joined #ruby
[07:23:40] JohnnyTao: has joined #ruby
[07:24:59] bayed: has joined #ruby
[07:26:23] mlipienski: has joined #ruby
[07:26:56] greenarrow: has joined #ruby
[07:28:36] JohnnyTao: has joined #ruby
[07:31:07] howdoi: has joined #ruby
[07:31:21] edwinvdgraaf: has joined #ruby
[07:31:27] bruno-: has joined #ruby
[07:33:43] nofxx: shevy, /j #python; python sucks! /part
[07:34:30] nofxx: please someone recommend me a terminal for osx that have at least split screen. yeah, I never remember tmux commands
[07:35:43] matti: nofxx: iTerm2?
[07:36:02] apeiros: Terminal.app has splitscreen?
[07:36:33] JohnnyTao: has joined #ruby
[07:37:19] vondruch: has joined #ruby
[07:39:39] skullcrasher_: has joined #ruby
[07:41:18] TDJACR: has joined #ruby
[07:41:54] ghostlines: has joined #ruby
[07:42:00] charliesome: has joined #ruby
[07:43:26] Juanchito: has joined #ruby
[07:44:25] drptbl: has joined #ruby
[07:44:28] blackmesa: has joined #ruby
[07:47:38] maloik: nofxx: whats the difference between learning whatever terminal supports split screens vs learning tmux?
[07:47:49] maloik: just learn tmux, it's a nearly universal tool for people that use vim/emacs
[07:48:14] maloik: the most basic of features should take no longer than a day of use to learn
[07:48:29] Axy: has joined #ruby
[07:48:46] Axy: has joined #ruby
[07:49:00] baweaver: having a healthy knowledge of the terminal will serve you extremely well
[07:49:19] baweaver: If you have the time for it, read Unix Power Tools as well.
[07:49:39] anisha: has joined #ruby
[07:50:16] nofxx: totally true. Will do. Egg chicken scenario anyways here. that least non cat update f* brew. No tmux anyways heh
[07:50:25] nofxx: that last*
[07:50:40] nofxx: yosemite*
[07:50:41] michael_mbp: has joined #ruby
[07:51:00] maloik: that sentence made 0 sense
[07:51:15] baweaver: ACTION scratches head
[07:51:29] sepp2k: has joined #ruby
[07:53:03] chouhoulis: has joined #ruby
[07:53:06] nofxx: ok, all fixed. brew would't install tmux because errors with yosemite, after update now.
[07:53:43] baweaver: read through that pragmatic programmers book on TMUX, it'll help/
[07:54:00] nofxx: reinstalled brew, installed tmux. And remember what I dislike. The C-b thing. And moving config files around. But better than C-b. At least arrow to change windows
[07:54:06] devoldmx: has joined #ruby
[07:54:20] baweaver: config it to a and map C to caps lock
[07:54:23] baweaver: works for me.
[07:54:36] senayar: has joined #ruby
[07:55:03] baweaver: well, bed for me.
[07:55:05] nofxx: baweaver, as in caps turns 'work mode' than just hit letters? that's sounds nice
[07:55:18] karapetyan: https://gist.github.com/karapetyan/7613792b3e412520c696
[07:55:28] baweaver: you can remap caps lock to be another control key
[07:55:49] nofxx: didn't knew that. with the caps functionality? mean.. sticky
[07:56:31] Hounddog: has joined #ruby
[07:58:50] bweston92: has joined #ruby
[08:00:11] michael_mbp: has joined #ruby
[08:01:38] arup_r1: has joined #ruby
[08:01:41] Hounddog: has joined #ruby
[08:01:45] Pupeno: has joined #ruby
[08:01:50] jgt: has joined #ruby
[08:04:04] krisquigley: has joined #ruby
[08:06:46] sebyx07: has joined #ruby
[08:07:35] dumdedum: has joined #ruby
[08:07:38] leafybasil: has joined #ruby
[08:07:53] tno: has joined #ruby
[08:07:55] Rollabunna: has joined #ruby
[08:08:23] maloik: anyone happen to know any good and relatively objective articles on when using mongo is a good idea? I don't know the first thing about it other than hearing some horror stories
[08:08:34] terlar: has joined #ruby
[08:09:03] juanpablo_: has joined #ruby
[08:09:16] nofxx: maloik, dont wrote an article but could testimony in favor, using for years, running as we speak
[08:09:50] nofxx: and it's anyways very, very easy to bootstrap an app and use PG or something for a model or another
[08:09:56] maloik: well I'm sure thousands of people are happy with it, I'm asking when is it a good idea to use it
[08:10:04] nofxx: to bootstrap in mongo* , w/o stupid schemas
[08:10:08] wildlander: has joined #ruby
[08:10:25] nofxx: but for that there's https://github.com/nofxx/schemaless ... works, but nobody uses ;)
[08:10:29] maloik: cause using it because you get to be lazy in terms of schema doesn't sound like a good plan to me
[08:10:36] apeiros: no schema is only good if you don't care about the structure of the data in your db. which is IMO quite rare.
[08:11:20] apeiros: if you do rely on the structure of your data, you're just bound to reinvent schemas with your schemaless db.
[08:11:41] maloik: was talking to a startup last week, they had a single person prototype their app and then another person take over from there... from what I could tell it was a really simple crud app in its early stages, and their using mongo sort of threw a red flag for me
[08:11:51] pawnbox: has joined #ruby
[08:11:57] dhjondoh1: has joined #ruby
[08:12:38] nofxx: apeiros, I fail to see why of that. And the schema must follow the app anyways, so every app you wrote you got it perfect from migration 0?
[08:12:44] corpsicle: has joined #ruby
[08:12:49] platzhirsch: has left #ruby: ()
[08:12:53] apeiros: nofxx: are you kidding? your own project just shows that
[08:13:05] nofxx: maloik, for instance app here we're using mongo pg and couch... getting the fort? of each one
[08:13:18] apeiros: from your readme "Schema is defined in code" <- you just reinvented schemas.
[08:13:22] ledestin: has joined #ruby
[08:13:29] oldbay: has joined #ruby
[08:13:38] nofxx: but it should be
[08:13:45] lampshades: has joined #ruby
[08:14:30] apeiros: nofxx: you lose: constraints, indexing, enforcing.
[08:14:35] JohnnyTao: has joined #ruby
[08:14:44] apeiros: there's probably half a dozen of things I forget which you also lose by that approach.
[08:14:59] apeiros: oh, right. performance, space.
[08:15:02] leat: has joined #ruby
[08:15:15] nofxx: not true, you define field :foo, type. Indexes are created too, and enforcing is up to db not me
[08:15:23] mlipienski: I have a class that uses objects that sould be created the first time a method representing that new object is called. what should I look to in ruby's docs to achieve it? I wen't to method_missing and eval, but as I get the class name from method_missing, it comes as a symbol, and eval won't be able to create the object. I've posted an example of the code at https://gist.github.com/marcelo-lipienski/c16d2f903b5184e6f7c1
[08:15:30] nofxx: not sure FKs
[08:15:46] sebyx07: has joined #ruby
[08:15:50] nofxx: don't care about em so I problably ommited. Validation should be on code too
[08:15:54] mikecmpbll: has joined #ruby
[08:15:55] apeiros: nofxx: in other words - you're rebuilding in code what an RDBM already gives you
[08:16:06] apeiros: i.e. all the stuff you claim "not lost" is stuff you reinvent.
[08:16:17] apeiros: and make your thing no longer schemaless.
[08:16:37] apeiros: validation on code - good idea. tell me how your uniqueness validation works f.ex.
[08:16:41] maloik: mlipienski: you're basically asking for a solution based on your code, rather than based on the actual problem. could you describe the problem?
[08:16:52] apeiros: and how you ensure FK integrity
[08:16:58] nofxx: apeiros, you totally didn't understand it
[08:17:02] stevednd: has joined #ruby
[08:17:09] apeiros: ok. if you say so.
[08:17:15] nofxx: or how it works. There's schema, with all you said. It's just building it for you
[08:17:38] osmansekerlen: has joined #ruby
[08:17:50] jas02: has joined #ruby
[08:17:51] nofxx: actually the safe mode is suppose to create the migrations, the wild mode it just runs migrations w/o creating the files
[08:18:06] jgt1: has joined #ruby
[08:18:28] nofxx: apeiros, I'm not serializing or using pghash or something like that
[08:18:41] nofxx: let's say the correct name is schemaworryless
[08:19:43] apeiros: I probably should have read the first line - I see your gem is for PostgreSQL, not for Mongo
[08:19:54] apeiros: which at least just makes it a misnomer :-p
[08:20:21] JohnnyTao: has joined #ruby
[08:22:29] _blizzy_: has joined #ruby
[08:22:49] apeiros: nofxx: what I say is - if you use mongodb - or another schemaless db - you will in >90% of all cases reinvent schemas. and usually poorly so. what I said above applies to that scenario (which your schemaless-gem apparently doesn't fall into)
[08:23:17] mlipienski: maloik: really struggling to elaborate. what wasn't clear from my question?
[08:23:39] JohnnyTao: has joined #ruby
[08:23:54] moeabdol: has joined #ruby
[08:25:22] nofxx: apeiros, yeah, we were arguing different themes. Both we agree ;) what I was saying about that is that mongo and (true)schemaless rdms makes it easy to bootstrap/start an app. After all that changes we know are going to happen in the first days/weeks, just move it to a better tool for the job.
[08:25:37] araujo: has joined #ruby
[08:25:40] certainty: mlipienski: just think about how you can the name of the constant from a string. You might want to have a look at Object#const_get
[08:25:52] nofxx: I like that approach cuz I like BDD and release early/often...
[08:26:40] nofxx: apeiros, everybody is activemodel now days
[08:27:01] certainty: switching to a db with an entirely different paradigm might present you with some challenge
[08:27:13] nofxx: not at that stage of an app
[08:27:14] certainty: one that you probably didn't anticipate when you started out
[08:27:24] certainty: been there, done that
[08:27:24] CustosL1men: has joined #ruby
[08:27:35] araujo: has joined #ruby
[08:28:04] mlipienski: certainty: thanks, I just looked at it, it's exactly what I needed ^^
[08:28:17] nofxx: I mean MVP stage
[08:28:23] certainty: nofxx: also consider that most decent RDBMSs are actually pretty good at storing schemaless data
[08:28:29] certainty: so you get the best of both worlds
[08:28:42] certainty: i'm thinking about Postgres
[08:28:48] nofxx: certainty, yeah, also true
[08:29:51] rdark: has joined #ruby
[08:29:55] Oog: has joined #ruby
[08:29:57] certainty: most of the time postgres just did it for our cases. We have only one case where we employed a document database and that was elasticsearch then
[08:30:31] nofxx: ES is everywhere here too... just don't like to mention it =D
[08:30:31] certainty: and we often thought: "huh yeah we need mongo" or "oh yeah for that we need couchbase"
[08:30:43] nofxx: fulltext search ftw
[08:31:00] nofxx: there's rethink too
[08:31:17] nofxx: their focus looks like pub/sub thing
[08:31:45] nofxx: there's ROMA ;)
[08:32:39] shevy: yo atmosx
[08:33:13] c0m0: has joined #ruby
[08:33:38] platzhirsch: has joined #ruby
[08:35:01] chthon: has joined #ruby
[08:35:25] stevednd: has joined #ruby
[08:37:16] anisha: has joined #ruby
[08:37:25] atmosx: can you believe this? https://html.spec.whatwg.org/multipage/semantics.html#datetime-value
[08:38:51] DoubleMalt: has joined #ruby
[08:39:03] momon: has joined #ruby
[08:41:34] Oog: has joined #ruby
[08:41:58] bruno-: has joined #ruby
[08:46:37] certainty: i think that's a "no"
[08:48:53] shevy: I believe everything
[08:48:53] drptbl: has joined #ruby
[08:52:48] solocshaw: has joined #ruby
[08:53:17] solocshaw: has joined #ruby
[08:53:48] chouhoulis: has joined #ruby
[08:54:11] jgt1: has joined #ruby
[08:54:34] [k-: has joined #ruby
[08:55:17] ziro`: has joined #ruby
[08:55:20] Oog: has joined #ruby
[08:56:50] mprelude: has joined #ruby
[08:58:21] etvr: has joined #ruby
[08:59:25] leafybasil: has joined #ruby
[09:02:10] Stan: has joined #ruby
[09:02:27] araujo: has joined #ruby
[09:03:05] haxrbyte: has joined #ruby
[09:04:30] fxn: has joined #ruby
[09:04:55] fxn: has joined #ruby
[09:05:56] codecop: has joined #ruby
[09:09:18] Ilyes512: has joined #ruby
[09:10:43] marr: has joined #ruby
[09:10:59] pontiki: has joined #ruby
[09:13:20] [k-: morning
[09:13:43] [k-: poor yorickpeterse, only gets one greeting
[09:13:53] [k-: i wonder where ljarvis went
[09:13:56] leafybasil: has joined #ruby
[09:14:59] allomov: has joined #ruby
[09:15:21] [k-: adaedra: hi
[09:15:50] yorickpeterse: ljarvis is on holidays I believe
[09:15:56] yorickpeterse: at least according to his Twitters
[09:16:27] yorickpeterse: https://twitter.com/lee_jarvis/status/642728685863350272 apparently in Budapest
[09:19:11] ChanServ: -b ohaibbq!*@*
[09:19:28] ChanServ: -b ohaib____!*@*
[09:19:46] ChanServ: -b ohaibbq_!*@*
[09:20:06] atmosx: yorickpeterse: morning
[09:20:08] atmosx: ACTION 2 greetings
[09:20:37] ChanServ: -b ohaibbq__!*@*
[09:20:51] arup_r: has joined #ruby
[09:21:54] M-mistake: has joined #ruby
[09:21:55] M-prosodyContext: has joined #ruby
[09:22:10] ishahnaz: has joined #ruby
[09:24:40] [k-: that's nice
[09:25:13] yorickpeterse: I feel so loved
[09:27:56] alex88: has joined #ruby
[09:28:02] tesuji: has joined #ruby
[09:28:05] bruno-: has joined #ruby
[09:28:50] gener1c_: has joined #ruby
[09:29:37] tesuji: has joined #ruby
[09:32:18] bnizzle: has joined #ruby
[09:32:44] stamina: has joined #ruby
[09:34:01] charliesome: has joined #ruby
[09:36:11] allomov: has joined #ruby
[09:37:57] [k-: an exaggeration?
[09:38:03] [k-: or a true statement?
[09:38:43] bhaak: everything in ruby is true unless nil or false
[09:39:15] [k-: yes, that is correct
[09:39:45] karapetyan: has joined #ruby
[09:40:48] Mazhug: has joined #ruby
[09:41:10] shevy: we have a yes-bot again!
[09:41:27] codenapp_: has joined #ruby
[09:41:33] Hans67521: has joined #ruby
[09:41:36] Alina-malina: has joined #ruby
[09:46:17] leat: has joined #ruby
[09:49:33] karapetyan: has joined #ruby
[09:49:35] Igorshp: has joined #ruby
[09:51:15] Ilyes512: has joined #ruby
[09:51:34] pawnbox: has joined #ruby
[09:54:33] chouhoulis: has joined #ruby
[09:54:52] devoldmx: has joined #ruby
[09:57:55] juanpablo_: has joined #ruby
[09:58:11] leat: has joined #ruby
[09:59:10] zotherstupidguy: has joined #ruby
[09:59:35] osmansekerlen: has joined #ruby
[10:00:12] iateadonut: has joined #ruby
[10:00:19] DmitryBochkarev: has joined #ruby
[10:01:36] Oog: has joined #ruby
[10:04:41] Oog: has joined #ruby
[10:04:57] Oog: has joined #ruby
[10:05:53] futilegames: has joined #ruby
[10:08:50] Rollabunna: has joined #ruby
[10:09:07] Hans67521: has joined #ruby
[10:09:52] r_baron: has joined #ruby
[10:11:26] jmarrec: has joined #ruby
[10:11:40] Rurik: has joined #ruby
[10:12:47] suchness: has joined #ruby
[10:12:54] Rurik: has joined #ruby
[10:13:11] jmarrec: Hi, Is there a way to run line by line a ruby file in irb so I can keep playing with all the variables defined?
[10:14:03] Rurik: has joined #ruby
[10:14:46] ytti: jmarrec, look into 'pry'
[10:14:51] oz: _/go mex
[10:15:03] Rurik: has joined #ruby
[10:16:13] bhaak: jmarrec: also 'pry-byebug' which builds an interactive debugger on top of pry
[10:16:14] jmarrec: thanks ytti. So there's no way to do that in irb right away?
[10:16:30] CloCkWeRX: has joined #ruby
[10:16:44] osmansekerlen: has joined #ruby
[10:16:45] jmarrec: thanks bhaak
[10:17:03] ytti: jmarrec, probably not, but really, if you're debugging ruby, you need pry :)
[10:17:30] jmarrec: I was trying to install IRuby for windows (i'm really used to IPython) but it's broken right now
[10:18:57] jmarrec: ytti: do you launch pry directly or launch irb and do "require 'pry'"?
[10:20:26] rickmasta: has joined #ruby
[10:20:33] blik71: has joined #ruby
[10:21:17] Rurik: has joined #ruby
[10:22:28] blik71: hi, all real quick how could i use the sort! method on an array of user defined objects to sort by a property of that collection of object instances
[10:22:40] sdothum: has joined #ruby
[10:22:57] blackmesa: has joined #ruby
[10:23:56] nanoz: has joined #ruby
[10:24:11] jhass: blik71: yes, but it's easier with sort_by!
[10:24:14] bampersand: has joined #ruby
[10:24:26] workmad3: has joined #ruby
[10:24:35] pyon: has joined #ruby
[10:24:58] osmansekerlen: has joined #ruby
[10:25:44] TheHodge: has joined #ruby
[10:25:54] blik71: how would i use it the documentation doesnt really give a good example
[10:28:04] yfeldblum: has joined #ruby
[10:31:39] jhass: blik71: look at the name and the signature, what can you imagine? try a few variants in your local irb or pry
[10:34:47] jhass: jmarrec: pry directly. seeing_is_believing might also be interesting for you
[10:35:18] jhass: jmarrec: or to launch pry from somewhere inside your program, insert require "pry"; binding.pry where you want to break
[10:37:16] osmansekerlen: has joined #ruby
[10:37:23] jmarrec: thanks jhass
[10:38:20] JDiPierro: has joined #ruby
[10:40:45] Ilyes512: has joined #ruby
[10:41:03] rodfersou: has joined #ruby
[10:41:54] nettoweb: has joined #ruby
[10:43:23] charliesome: has joined #ruby
[10:44:05] Rollabunna: has joined #ruby
[10:46:04] leat: has joined #ruby
[10:48:04] arup_r: jhass: I raised a bug to Github .. :D
[10:48:23] arup_r: The commit messages sort order is wrong ,, I found
[10:48:27] jhass: and that concerns me why?
[10:48:40] arup_r: seems like you are right.. I should go for QA
[10:48:46] arup_r: remember you said ?
[10:48:59] ghormoon: has joined #ruby
[10:49:27] jhass: I don't follow but I'm pretty sure the answer is no
[10:49:46] arup_r: ok. I remember .. anyway
[10:51:43] xcesariox: has joined #ruby
[10:51:51] cvtsx: has joined #ruby
[10:53:26] haxrbyte_: has joined #ruby
[10:55:17] chouhoulis: has joined #ruby
[10:56:08] nhhagen: has joined #ruby
[10:57:31] Contigi: has joined #ruby
[10:58:11] alol: has joined #ruby
[10:59:32] cout: has joined #ruby
[10:59:36] shevy: he just does not remember arup_r!
[11:01:18] Oog: has joined #ruby
[11:02:05] FernandoBasso: has joined #ruby
[11:02:31] pontiki: has joined #ruby
[11:03:51] JimmyNeutron: has joined #ruby
[11:04:20] hs366: has joined #ruby
[11:04:35] sgambino: has joined #ruby
[11:05:19] charliesome: has joined #ruby
[11:07:03] dhjondoh: has joined #ruby
[11:07:08] jgt1: has joined #ruby
[11:07:56] ghormoon: has joined #ruby
[11:09:00] dionysus69: has joined #ruby
[11:09:07] phutchins: has joined #ruby
[11:11:11] CloCkWeRX: has joined #ruby
[11:14:32] tvw: has joined #ruby
[11:16:52] phutchins1: has joined #ruby
[11:18:53] CustosL1men: has joined #ruby
[11:20:50] nowhereFast: has joined #ruby
[11:24:42] Ropeney: has joined #ruby
[11:24:54] ocx: has joined #ruby
[11:26:43] greenarrow: has joined #ruby
[11:31:23] Oog: has joined #ruby
[11:31:30] nowhereFast: has left #ruby: ()
[11:31:36] [k-: has joined #ruby
[11:32:28] syath: has joined #ruby
[11:32:58] ocx: has joined #ruby
[11:33:53] but3k4: has joined #ruby
[11:34:52] chills42: has joined #ruby
[11:35:08] haxrbyte: has joined #ruby
[11:37:44] chills42: has joined #ruby
[11:38:41] senayar: has joined #ruby
[11:40:10] dgutierrez1287: has joined #ruby
[11:40:17] JDiPierro: has joined #ruby
[11:40:32] charliesome: has joined #ruby
[11:40:36] devoldmx: has joined #ruby
[11:40:57] JoshuaPaling: has joined #ruby
[11:41:31] ishahnaz: has joined #ruby
[11:43:05] karapetyan: has joined #ruby
[11:43:13] karapetyan: has joined #ruby
[11:43:20] ldnunes: has joined #ruby
[11:43:34] JohnnyTao: has joined #ruby
[11:44:09] sousvide: has joined #ruby
[11:44:51] sousvide: good morning. ruby nuby here - i think i'm having trouble with line endings when trying to compare 2 strings - either that or "string" versus "object" is not showing as equal
[11:45:08] kirun: has joined #ruby
[11:45:22] hellerbarde2: has joined #ruby
[11:45:40] sousvide: i have a text file with a single line - a "version" file - I want to compare that string to a string that I set manually elsewhere in the code - if strings are equal, then versions match
[11:46:04] yorickpeterse: we'll need some code samples to have a better understanding of what you're trying to do
[11:46:19] sousvide: I am using File.foreach(path\to\file).first to store the text file line into a variable
[11:46:21] CloCkWeRX: has left #ruby: ()
[11:46:36] juanpablo_: has joined #ruby
[11:46:37] sousvide: then comparing the vars, and they're not equal, even though printing them to screen with puts shows they look identical
[11:46:51] sousvide: ok yorick: one second, thank you
[11:47:08] apeiros: ?gist sousvide
[11:47:08] ruboto: sousvide, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[11:47:21] Rurik: has joined #ruby
[11:47:31] apeiros: preferred way to show code, input, expected output and actual output
[11:47:42] pontiki: has joined #ruby
[11:48:48] pawnbox: has joined #ruby
[11:49:39] senayar: has joined #ruby
[11:49:43] NeverDie: has joined #ruby
[11:50:05] yorickpeterse: also, 2,5 weeks until new jeb ???(???)???
[11:50:09] sousvide: oops sorry: i went with pastebin http://pastebin.com/s4zTvV3P
[11:50:10] ruboto: sousvide, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/980e413a0b5a7a84652f
[11:50:10] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[11:50:14] yorickpeterse: well, 13 working days to be exact
[11:50:28] yorickpeterse: counting down really slows things down :<
[11:50:32] platosha: has joined #ruby
[11:50:36] sousvide: noted: good to know, thanks for the gist
[11:50:45] JoshuaPaling: In a rack middleware, should it be possible to set a cookie BEFORE doing @app.call(env) - ie, passing on the cookie before the request is processed, rather than setting it after the request is processed?
[11:50:46] rbennacer: has joined #ruby
[11:50:53] yorickpeterse: sousvide: few things
[11:51:00] yorickpeterse: sousvide: the quotes aren't needed for the if statement
[11:51:00] Tempesta: has joined #ruby
[11:51:05] yorickpeterse: since both variables are already strings
[11:51:24] yorickpeterse: Also, File.foreach() includes line endings
[11:51:29] sousvide: ok. i added both of those in case it needed an implicit cast from a str_obj vs str
[11:51:29] Hans67521: has joined #ruby
[11:51:34] yorickpeterse: So you probably want File.foreach(...).first.strip
[11:51:47] yorickpeterse: There's no casting implicit casting in Ruby
[11:51:48] sousvide: i do suspect that is what's tripping me up.
[11:52:00] sousvide: ooohhhhh....strip....good to know, thank you very much and let me try that
[11:52:00] Igorshp: has joined #ruby
[11:52:04] apeiros: .chomp > .strip if all you care is line endings
[11:52:17] apeiros: otherwise " foo ".strip == "foo"
[11:52:20] yorickpeterse: apeiros: true, though doesn't chomp only remove a single line ending?
[11:52:24] yorickpeterse: >> "foo\n\n".chomp
[11:52:25] ruboto: yorickpeterse # => "foo\n" (https://eval.in/432829)
[11:52:29] apeiros: yorickpeterse: correct
[11:52:39] apeiros: but if you read with foreach, you shouldn't have any entry with more than one
[11:52:40] sousvide: .chomp just eats \n\r^m type chars? whereas .strip might be more customizable?
[11:52:41] yorickpeterse: just go with the shotgun approach, #strip never hurts :P
[11:52:48] Zai00: has joined #ruby
[11:52:52] yorickpeterse: sousvide: #strip removes all leading/trailing whitespace
[11:52:55] yorickpeterse: >> " foo ".strip
[11:52:56] ruboto: yorickpeterse # => "foo" (https://eval.in/432831)
[11:53:14] yorickpeterse: So if there's a space at the end of the line it will take care of it as well
[11:53:20] elperdut: has joined #ruby
[11:53:36] osmansekerlen: has joined #ruby
[11:53:48] sousvide: good point - certainly could be a sneaky space trailing...tyvm again, let me test this
[11:54:03] moeabdol: has joined #ruby
[11:54:34] Kallis: has joined #ruby
[11:54:39] Rurik: has joined #ruby
[11:57:19] ishahnaz: has joined #ruby
[11:59:32] emilkarl: has joined #ruby
[12:00:58] nfk: has joined #ruby
[12:01:57] beast: has joined #ruby
[12:04:19] Aces1up: has joined #ruby
[12:05:14] phutchins: has joined #ruby
[12:05:38] Aces1up: anyone know a decent proxy server gem that can handle http and https, I would also like to have hooks if possible to modify content on the fly
[12:06:29] Rurik: has joined #ruby
[12:06:46] khebbie: has joined #ruby
[12:07:55] kith: has joined #ruby
[12:07:56] exadeci: has joined #ruby
[12:08:45] Rurik: has joined #ruby
[12:08:45] hinbody: has joined #ruby
[12:09:52] Rurik: has joined #ruby
[12:10:13] victortyau: has joined #ruby
[12:11:57] pyon: has joined #ruby
[12:12:00] bruno-: has joined #ruby
[12:12:23] jhass: is this for debugging/introspection or something else?
[12:12:32] jhass: aces1up: ^
[12:17:49] voltalio: has joined #ruby
[12:18:09] pandaant: has joined #ruby
[12:19:41] sonOfRa: When I retrieve a C-String via StringValueCStr, do I have to free the result myself, or is the underlying data freed by the ruby vm?
[12:20:31] ramfjord: has joined #ruby
[12:20:45] Aces1up: jhass just want to have stats on an app i am debugging yes
[12:20:50] ferhaty: has joined #ruby
[12:21:03] Gnomethrower: has joined #ruby
[12:21:06] Aces1up: i want to build in some custom stats count requests, types of requests, where they are going etc.
[12:21:21] Aces1up: change data based on stats
[12:21:38] jhass: so nothing interactive, then I'm out sorry
[12:21:39] yorickpeterse: sonOfRa: StringValueCStr just pulls the char* from a Ruby string
[12:21:45] yorickpeterse: sonOfRa: you don't need to free anything, Ruby does this for you
[12:21:56] yorickpeterse: You just have to make sure the char* doesn't stick around longer than the Ruby string IIRC
[12:21:58] Gnomethrower: has joined #ruby
[12:21:58] cameronmalek: has joined #ruby
[12:22:11] Aces1up: jhass what do you mean interactive?
[12:22:49] voker57: has joined #ruby
[12:23:06] goodcodeguy: has joined #ruby
[12:23:33] godfat: has joined #ruby
[12:24:15] godfat: has joined #ruby
[12:25:09] Igorshp: has joined #ruby
[12:25:12] nanoz: has joined #ruby
[12:25:17] nanoz]: has joined #ruby
[12:25:17] towski_: has joined #ruby
[12:26:56] jhass: mitmproxy is a great tool to introspect and modify requests as they happen, but nothing you'd use for things you described
[12:27:07] lkba_: has joined #ruby
[12:27:38] krisquigley: has joined #ruby
[12:27:54] blackmesa: has joined #ruby
[12:28:01] sonOfRa: yorickpeterse: alright, that's what I expected. Thanks!
[12:30:08] meatherly: has joined #ruby
[12:36:18] mary5030: has joined #ruby
[12:36:19] keen__________18: has joined #ruby
[12:37:44] haxrbyte: has joined #ruby
[12:42:08] jhooker: has joined #ruby
[12:42:31] Rurik: has joined #ruby
[12:44:07] monod: has joined #ruby
[12:44:57] kgirthofer: has joined #ruby
[12:46:16] karapetyan: has joined #ruby
[12:47:03] tcopeland: has joined #ruby
[12:48:41] yalue: has joined #ruby
[12:49:12] michael_mbp: has joined #ruby
[12:50:02] chouhoulis: has joined #ruby
[12:50:18] [k-_: has joined #ruby
[12:50:28] devoldmx: has joined #ruby
[12:50:40] Pumukel: has joined #ruby
[12:52:00] beast: has joined #ruby
[12:52:35] sousvide: yorick: .split worked like a champ, thank you again.
[12:52:57] blackmesa: has joined #ruby
[12:53:53] bb010g: has joined #ruby
[12:54:07] haxrbyte_: has joined #ruby
[12:55:33] yorickpeterse: You mean strip?
[12:55:33] mary5030: has joined #ruby
[12:56:02] sousvide: wow yeah, early morning typo
[12:56:19] sousvide: i usually don't .strip this early in the day
[12:56:23] apeiros: nice typo. it's only a levenshtein distance of 3 ;-p
[12:56:43] shredding: has joined #ruby
[12:57:59] Hrorek: has joined #ruby
[12:59:17] [k-: has joined #ruby
[12:59:26] sdwrage: has joined #ruby
[12:59:39] yorickpeterse: sousvide: (???? ???? ????)
[12:59:39] bruno-: has joined #ruby
[12:59:40] karapetyan: has joined #ruby
[12:59:51] Soda: has joined #ruby
[13:00:05] dravine: has joined #ruby
[13:00:09] shredding: has joined #ruby
[13:00:10] s00pcan_: has joined #ruby
[13:00:46] voltalio: has joined #ruby
[13:02:12] DanielI: has joined #ruby
[13:02:29] decoponio: has joined #ruby
[13:04:44] dhjondoh: has joined #ruby
[13:05:43] JDiPierro: has joined #ruby
[13:07:03] riffraff: has joined #ruby
[13:07:11] cameronmalek: has joined #ruby
[13:10:48] karapetyan: has joined #ruby
[13:12:40] atomical: has joined #ruby
[13:13:31] sankaber: has joined #ruby
[13:13:38] dasher00: has joined #ruby
[13:14:20] urbanmonk: has joined #ruby
[13:14:50] osmansekerlen: has joined #ruby
[13:15:03] pawnbox: has joined #ruby
[13:15:04] cameronmalek: has left #ruby: ()
[13:15:32] jdawgaz: has joined #ruby
[13:15:53] willywos: has joined #ruby
[13:16:09] Jardayn: has joined #ruby
[13:19:43] absolutejam: has joined #ruby
[13:19:49] Flipez: has joined #ruby
[13:19:58] krz: has joined #ruby
[13:20:34] nanoz: has joined #ruby
[13:20:53] juanpablo_: has joined #ruby
[13:21:46] lavros: has joined #ruby
[13:21:49] juanpablo_: has joined #ruby
[13:22:38] poli: has joined #ruby
[13:24:03] elfuego: has joined #ruby
[13:24:21] bmurt: has joined #ruby
[13:25:26] MiW: has joined #ruby
[13:26:10] JoshL: has joined #ruby
[13:26:21] MiW: Hiya, is it possible to get ruby to send a TLSv1 ClientHello? Im seeing SSLv3 ClientHellos from a ruby client and the server is resetting straight after the ClientHello
[13:26:57] nettoweb: has joined #ruby
[13:27:01] lkba: has joined #ruby
[13:28:27] djcp: has joined #ruby
[13:29:33] malconis: has joined #ruby
[13:30:55] Xiti: has joined #ruby
[13:31:20] hellerbarde2: has joined #ruby
[13:31:53] Ox0dea: Is there a method to hook `using`?
[13:32:15] Ox0dea: Like how there's Module#included and #extended.
[13:33:27] sanguisdex: has joined #ruby
[13:34:12] ckinniburgh: has joined #ruby
[13:34:20] n1lo: has joined #ruby
[13:34:27] khebbie: has joined #ruby
[13:35:17] rbennacer: has joined #ruby
[13:35:19] shevy: perhaps it was forgotten to add one
[13:36:00] Ox0dea: That does seem to be the case.
[13:36:07] Ox0dea: Bit of a weird oversight.
[13:36:27] khebbie: has joined #ruby
[13:36:42] chouhoulis: has joined #ruby
[13:36:51] khebbie: has joined #ruby
[13:37:27] shevy: they didn't expect anyone to use using!
[13:37:32] Ox0dea: Nonsense.
[13:38:19] Ox0dea: What's the best name for it, Module#used?
[13:38:19] bodie_: has joined #ruby
[13:39:33] osmansekerlen: has joined #ruby
[13:40:15] khebbie: has joined #ruby
[13:41:55] whippythellama: has joined #ruby
[13:42:03] shevy: I don't know
[13:42:08] shevy: I found the choice of the name weird :\
[13:42:56] shevy: perhaps Module#refinement?
[13:43:22] [k-_: nah, refined
[13:43:53] [k-_: Module#used can be ambiguous
[13:44:36] mic_e: has joined #ruby
[13:45:02] statusfailed: has joined #ruby
[13:45:13] adaedra: Bonjour #ruby
[13:45:49] pawnbox_: has joined #ruby
[13:45:52] Swappticon: has joined #ruby
[13:45:53] statusfailed: I'm trying to gem install pg, but I have postgres in a non-standard location. I added --with-pg-config, but it still can't find libpq-fe.h
[13:45:56] Ox0dea: [k-_: But the Module is being used, not refined.
[13:45:58] shevy: le baguette le fromage
[13:46:43] shevy: statusfailed you could try to temporarily copy that .h file to standard header, then remove it again lateron :D
[13:46:47] shevy: it sounds like a bug though
[13:47:33] statusfailed: Trouble is I have no standard header, 'cos i'm using NixOS...
[13:48:49] statusfailed: oh. I was doing --with-pg-config <path> instead of --with-pg-config=path
[13:49:06] shevy: it works now?
[13:49:20] statusfailed: well pg installed
[13:51:41] Swappticon: has joined #ruby
[13:51:52] echojaybird: has joined #ruby
[13:52:00] statusfailed: has left #ruby: ()
[13:52:28] echojaybird: Wondering if someone can help me parse this URL. URI.parse doesn't seem to work. "http://localhost:3000/test-me/test.json"
[13:52:35] Igorshp: has joined #ruby
[13:53:40] voltalio: has joined #ruby
[13:54:05] maloik: whats the problem? "doesnt seem to work" doesn't narrow it down
[13:54:38] umgrosscol: has joined #ruby
[13:54:44] charlenopires: has joined #ruby
[13:54:47] jgt1: has joined #ruby
[13:55:02] centrx: has joined #ruby
[13:55:38] Ox0dea: https://eval.in/432940
[13:56:05] Ox0dea: It'd be nice to only enable the tracing after being explicitly using'd.
[13:56:19] farn: has joined #ruby
[13:56:30] devdazed: has joined #ruby
[13:56:30] bigmac: has joined #ruby
[13:57:02] chills42: has joined #ruby
[13:57:31] babysnoop: has joined #ruby
[13:59:13] echojaybird: Disregard last url. This is the url I'm trying to parse: "http://localhost:port/test-me/test.json". When I call URI.pase(url, 'http'), it is returning "http://localhost:"
[13:59:47] Ox0dea: echojaybird: Do you actually have "port" where a port number should go?
[14:00:19] maloik: I'm guessing that's the case. The problem should be kind of obvious :/
[14:00:26] echojaybird: I do, but because this is going to be different for each case, I'm putting "port" there as a placeholder. I'm assuming I'll need some sort of regex
[14:00:54] echojaybird: It's definitely obvious :). I was asking for help on how I could get it to parse.
[14:01:08] Ox0dea: echojaybird: Well, it's not a valid URI, so it's unclear what you're asking.
[14:01:15] catcher: has joined #ruby
[14:01:28] Ox0dea: Why not pick an awesome placeholder like 1337?
[14:01:48] echojaybird: So I'm assuming that I can't use URI. Would I need to build out my own regex then?
[14:02:10] echojaybird: It's for documentation stuff.
[14:02:13] maloik: you're asking to fix your implementation but we don't know the problem you're trying to solve, could you explain that? it'll help us to give a proper suggestion
[14:03:15] bigbadbear: has joined #ruby
[14:05:04] echojaybird: I think I have my answer. URI only parses valid URIs. Looks like I'm going to have to build out my own regex. Thanks folks
[14:06:22] TDJACR: has joined #ruby
[14:08:09] Oog: has joined #ruby
[14:11:55] karapetyan: puts i if not null else puts f
[14:12:18] Rurik: has joined #ruby
[14:12:21] karapetyan: puts ( i || f ) ?
[14:13:07] chills42: has joined #ruby
[14:13:56] juanpablo_: has joined #ruby
[14:13:59] pawnbox: has joined #ruby
[14:14:09] The_Phoenix: has joined #ruby
[14:15:08] rickmasta: has joined #ruby
[14:15:38] based_pdev: has joined #ruby
[14:15:39] bampersand: has joined #ruby
[14:16:39] wookiehangover: has joined #ruby
[14:16:51] [k-_: puts (i ? i : f)
[14:16:54] absolutejam: has joined #ruby
[14:17:02] [k-_: i || f returns a boolean
[14:17:15] allcentury: has joined #ruby
[14:17:20] dionysus69: has joined #ruby
[14:17:33] Igorshp: has joined #ruby
[14:17:35] [k-_: also, there isn't null in ruby, nil is probably what you mean
[14:17:44] ramfjord: has joined #ruby
[14:18:10] [k-_: no, it's ugly code
[14:18:16] Igorshp: has joined #ruby
[14:18:30] [k-_: i recommend against using single letter vars in ternary, at least
[14:18:52] shevy: write poetry
[14:19:06] dionysus69: has joined #ruby
[14:19:13] pawnbox: has joined #ruby
[14:19:49] karapetyan: https://gist.github.com/karapetyan/a0c2dbc5336effacfa08
[14:20:12] taylorrf: has joined #ruby
[14:21:20] karapetyan: is it ok? :)
[14:21:46] tomchapin: has joined #ruby
[14:21:58] dopamean_: has joined #ruby
[14:22:50] haxrbyte: has joined #ruby
[14:23:44] babysnoop: hi, can someone help me with this gem - https://github.com/dncrht/imgur#usage-and-overview i get an "uninitialized constant Imgurapi (NameError)" when i try to create a session object even though i installed the imgurapi gem
[14:23:47] dionysus69: has joined #ruby
[14:23:56] shevy: well it is getting better, but you forgot some basics karapetyan
[14:24:02] shevy: for instance: what do you do when the file does not exist?
[14:24:11] NeverDie: has joined #ruby
[14:24:15] maloik: babysnoop: did you require it?
[14:24:47] karapetyan: shevy: raise exception probably
[14:25:22] babysnoop: yes but i might have made a mistake there... i used require Imgurapi
[14:25:53] shevy: karapetyan what for man
[14:25:58] shevy: an exception is already raised anyway
[14:26:15] shevy: Errno::ENFILE I think
[14:26:22] shevy: or something similar
[14:26:43] jdawgaz: has joined #ruby
[14:26:48] karapetyan: shevy: ok, then i don't understand. If i don't have file i can't ready any value from ther
[14:26:56] absolutejam: has joined #ruby
[14:27:09] babysnoop: maliok: ok require "imgurapi" work, thanks for making me focus on this point
[14:27:23] cameronmalek: has joined #ruby
[14:27:46] shevy: karapetyan yes. but I can pass a non-existing file to your class, which you do not handle well at all
[14:28:28] certainty: evil shevy passes non existing files
[14:28:49] shevy: it can happen
[14:28:56] shevy: imagine if you start in a directory and then it gets deleted!
[14:29:00] karapetyan: shevy: and then exception will be raised?) Ahm do you mean i should check file exist before try to open it?
[14:29:09] shevy: karapetyan yes and yes
[14:29:14] jzigmund: has joined #ruby
[14:29:15] sousvide: easy general n00b question: does "unless" function like any other loop (flow control) pattern? unless (condition && compound condition) "big block of unless logic/code" else "other block of not unless logic" ?
[14:29:32] shevy: sousvide "unless" is about the same as "if !"
[14:29:37] sousvide: i should say it better - can i treat unless as a full "not if" control structure with all the normal bells and whistles?
[14:29:41] sousvide: yep there ya go, th anks shevy
[14:30:35] shevy: from the semantics that is... if you actually use "if !" or "if not", and also parens, then precedence rules may sometimes be weird. such as: "if foo and ! bar && (5 > blablabla) &&! @var
[14:30:52] shevy: or I forgot to add an "! foo.include? bar"
[14:30:57] karapetyan: shevy: ok, if file don't exist i should raise my own exception? :) sorry but i don't understand difference between this exceptions? :)
[14:30:58] shevy: I am half-kidding
[14:31:25] shevy: karapetyan I am saying that you should handle the possibility that the file does not exist
[14:31:26] sousvide: yeah, always an issue of logic vs reverse logic, especially when combining/nesting and switching from + to - logic hehe
[14:31:50] zotherstupidguy: has joined #ruby
[14:32:00] certainty: you might even want to try to accept the possibility that there exists no program
[14:32:07] shevy: karapetyan ruby already raises an exception if you try something like File.readlines('non_existing_file_here'), so you don't need to add or raise one on your own
[14:32:15] Ox0dea: certainty: No OS.
[14:32:29] shevy: you could either rescue that exception, or you do a "if File.exist?" check
[14:32:32] certainty: Ox0dea: true!
[14:32:47] Ox0dea: Hey, gals! How do I check that the universe exists in Ruby?
[14:32:51] arup_r: has joined #ruby
[14:33:07] [k-_: >> :universe.is_a? Object
[14:33:08] momomomomo: has joined #ruby
[14:33:08] ruboto: [k-_ # => true (https://eval.in/432976)
[14:33:13] [k-_: it exists!
[14:33:28] [k-_: >> Object.nil?
[14:33:29] ruboto: [k-_ # => false (https://eval.in/432977)
[14:33:31] shevy: Ox0dea do you really want to exclude the boys :(
[14:33:35] [k-_: Object exists too!
[14:35:18] [k-_: karapetyan: you should rescue that exception and print a useful error message
[14:38:47] bruno-: has joined #ruby
[14:39:36] paulcsmith: has joined #ruby
[14:39:43] vondruch: has joined #ruby
[14:40:14] lsmola: has joined #ruby
[14:40:19] jimbeaudoin: has joined #ruby
[14:40:59] elperdut: has joined #ruby
[14:42:05] osmansekerlen: has joined #ruby
[14:43:13] podman: has joined #ruby
[14:43:18] bigmac: has joined #ruby
[14:44:29] emilkarl: has joined #ruby
[14:45:11] Igorshp: has joined #ruby
[14:47:02] certainty: well if we assume that the universe is a space of objects we can restate it as
[14:47:09] certainty: >> ObjectSpace.nil?
[14:47:10] ruboto: certainty # => false (https://eval.in/432997)
[14:47:11] grenierm: has joined #ruby
[14:47:43] karapetyan: has joined #ruby
[14:47:50] Ox0dea: The universe *isn't* just a space of objects, though, right?
[14:47:55] Ox0dea: Is the law of gravitation an object?
[14:48:37] jhass: perhaps, we might have not yet discovered that it is
[14:49:01] NeverDie: has joined #ruby
[14:49:28] aldodelgado: has joined #ruby
[14:49:37] Ox0dea: Gluons be like "check your privilege".
[14:49:56] CustosL1men: is ther a channel for phusionpassenger ?
[14:49:56] apeiros: Ox0dea: laws.gravitation.destroy
[14:50:03] apeiros: Ox0dea: enjoy your floating around
[14:50:19] Ox0dea: apeiros: Thankfully that only returns a new Universe with floaty bits everywhere.
[14:50:33] jhass: CustosL1men: #passenger
[14:50:42] [k-_: __END__ # end of the world
[14:50:42] apeiros: Ox0dea: it might raise a Universe::Inconsistency exception
[14:50:56] jhass: CustosL1men: or more general answer: /msg alis help
[14:50:56] certainty: Ox0dea: i think we could model laws as objects as well
[14:51:07] Swappticon: has joined #ruby
[14:51:14] devoldmx: has joined #ruby
[14:51:24] Tuxero: has joined #ruby
[14:51:32] Ox0dea: certainty: As an example, you're beholden to the rules imposed by MRI as to how your Ruby objects are permitted to interact.
[14:51:36] cisco: has joined #ruby
[14:51:45] Ox0dea: Sure, you could patch MRI, but it's "the rules come from elsewhere" all the way down.
[14:51:58] certainty: Ox0dea: god :)
[14:52:04] Ox0dea: What's that?
[14:52:10] havenwood: has joined #ruby
[14:52:12] certainty: and we all know the god object
[14:52:27] certainty: or nil if you will
[14:52:30] certainty: it must start somewhere
[14:52:36] codeurge: has joined #ruby
[14:53:05] certainty: GC is reincarnation?
[14:53:11] certainty: or one step of it
[14:53:25] [k-: GC just deletes
[14:53:43] Ox0dea: [k-: GC recycles, technically.
[14:53:53] Ox0dea: It's a lot like reincarnation in the Buddhist sense.
[14:54:01] jhass: let's call it mother nature
[14:54:12] certainty: i can live with that
[14:54:29] Ox0dea: Erutan is based god.
[14:55:56] chouhoulis: has joined #ruby
[14:56:28] CustosL1men: I want to setup a kimsufi/ovh server for passenger/rack
[14:56:56] chouhoulis: has joined #ruby
[14:57:01] Jardayn: has joined #ruby
[14:57:30] certainty: i want cookies
[14:57:35] Ox0dea: ?cookie certainty
[14:57:35] ruboto: certainty, here's your cookie: ????
[14:57:37] rodferso1: has joined #ruby
[14:57:38] havenwood: ?cookie certainty
[14:57:38] ruboto: certainty, here's your cookie: ????
[14:57:48] Ox0dea: Fill your boots, mate.
[14:57:49] [k-: i have fed species greater than you
[14:58:07] [k-: and i have starved species greater than you
[14:58:15] [k-: i dont need objects
[14:58:15] certainty: poor species
[14:58:21] [k-: objects needs me
[14:58:36] JoshL: has joined #ruby
[14:58:57] [k-: x-post: watch: watch: https://www.youtube.com/watch?v=WmVLcj-XKnM
[14:59:05] allomov: has joined #ruby
[14:59:16] cantaberry: has joined #ruby
[14:59:19] Ox0dea: Naughty, naughty.
[14:59:51] ckinniburgh_: has joined #ruby
[14:59:53] havenwood: CustosL1men: How's it going so far?
[14:59:58] beneggett: has joined #ruby
[15:00:03] mary5030: has joined #ruby
[15:00:11] certainty: ACTION waits for the blue people in that movie
[15:00:31] Ox0dea: [k-: Did Julia Roberts just say I'm ~200k years old?
[15:00:35] Ox0dea: >> 4.5e9 / 22500
[15:00:36] ruboto: Ox0dea # => 200000.0 (https://eval.in/433008)
[15:01:13] mary5030: has joined #ruby
[15:01:47] c0ncealed: has joined #ruby
[15:01:51] karapetyan: has joined #ruby
[15:02:16] catphish: has joined #ruby
[15:02:42] Ox0dea: Julia Roberts made Gaia sound like a bitch. :(
[15:02:45] fostertheweb: has joined #ruby
[15:03:09] rippa: has joined #ruby
[15:03:37] catphish: is there a reason why there is no File.write class method? it seems like an omission so obvious that it must be intentional
[15:03:48] Ox0dea: catphish: Are you on Ruby 1.3?
[15:04:04] Ox0dea: >> File.method(:write) # catphish
[15:04:05] ruboto: Ox0dea # => #<Method: File(IO).write> (https://eval.in/433010)
[15:04:17] havenwood: catphish: http://ruby-doc.org/core/IO.html#method-i-write
[15:04:38] havenwood: >> File.public_method(:write).owner
[15:04:39] ruboto: havenwood # => #<Class:IO> (https://eval.in/433011)
[15:04:40] catphish: havenwood: err, that's an IO instance method
[15:04:41] Ox0dea: catphish: What even happened that caused you to believe it wasn't there?
[15:04:47] krisquigley: has joined #ruby
[15:05:05] Ox0dea: >> File < IO # catphish
[15:05:06] ruboto: Ox0dea # => true (https://eval.in/433013)
[15:05:16] catphish: >> File.write
[15:05:17] ruboto: catphish # => wrong number of arguments (0 for 2..3) (ArgumentError) ...check link for more (https://eval.in/433014)
[15:05:22] Ox0dea: ?experiment catphish
[15:05:22] ruboto: catphish, Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
[15:05:25] havenwood: catphish: Oh, did I link the wrong one? Here: http://ruby-doc.org/core/IO.html#method-c-write
[15:05:40] havenwood: catphish: Pry is really helpful for exploring, indeed!
[15:05:42] Ox0dea: &ri File.write
[15:05:43] `derpy: http://www.rubydoc.info/stdlib/core/IO#write-class_method
[15:05:56] ruboto: 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` directly in your source code. Visit https://pryrepl.org/ or get it now with: gem install pry pry-doc
[15:05:57] catphish: havenwood: ah, that's it, i was only looking in File, thanks! why would it be in IO? Isn't that file-specific?
[15:06:15] Ox0dea: catphish: No, IO is generalized quite nicely in Ruby.
[15:06:16] dfockler: has joined #ruby
[15:06:25] catphish: the docs literally say "Opens the file..."
[15:06:40] catphish: the documentation for IO.write
[15:06:49] catphish: that havenwood just linked to
[15:07:21] Ox0dea: > Opens the file, optionally seeks to the given offset, ***writes string***, then returns the length written.
[15:07:25] Ox0dea: Emphasis mine.
[15:07:30] Ox0dea: catphish: Find your glasses, bud.
[15:07:46] DanielI: has joined #ruby
[15:08:05] catphish: Ox0dea: yeah, i found the method now, thanks to havenwood :) i was just wondering why it's in IO and not File
[15:08:14] msankhala: has joined #ruby
[15:08:15] Ox0dea: You're being daft on purpose.
[15:08:29] [Butch]: has joined #ruby
[15:08:48] DanielI: has joined #ruby
[15:08:58] Ox0dea: [k-: http://i.imgur.com/KMrLwSD.jpg
[15:09:07] Ox0dea: How did modernity's gun get lipstick on the barrel?
[15:09:19] catphish: i'm just unclear why a method that specifically works on a file would be in the generic IO class
[15:09:29] bootstrappm: has joined #ruby
[15:09:33] Ox0dea: catphish: It doesn't specifically work on File. That's what generalization means.
[15:09:42] DanielI: has joined #ruby
[15:09:45] [k-_: magnificent artwork
[15:09:52] leafybasil: has joined #ruby
[15:10:26] chouhoul_: has joined #ruby
[15:10:35] okdas: has joined #ruby
[15:10:35] okdas: has joined #ruby
[15:10:36] catphish: Ox0dea: what else could it be used on? it accepts a filename as a parameter
[15:10:57] [k-_: a stream?
[15:11:07] [k-_: a socket?
[15:12:34] Ox0dea: >> require 'socket'; ObjectSpace.each_object(Module).count { |m| m.method(:write).owner == IO.singleton_class rescue nil }
[15:12:35] ruboto: Ox0dea # => 10 (https://eval.in/433027)
[15:12:46] Ox0dea: catphish: There are apparently 10 different things that piggyback on IO's #write method.
[15:12:55] Ox0dea: And that's only from requiring 'socket'; there are surely others.
[15:13:08] catphish: that's interesting, i wonder how they use it
[15:13:15] Ox0dea: With computer magicks.
[15:13:23] [k-_: puts wrap arounds write
[15:13:47] catphish: it seems to me that IO and File are quite closely linked (i'd go as far as to say muddled)
[15:14:17] catphish: IO.write accepts a filename, but conversely File operates on things that aren't regular files
[15:14:35] st1gma: has joined #ruby
[15:14:42] Ox0dea: catphish: What is a "non-regular" file by your definition?
[15:14:44] felixr: has joined #ruby
[15:14:45] yorickpeterse: Hey now, this is Ruby, there's no such thing
[15:14:46] cantaberry: has joined #ruby
[15:15:07] [k-_: ?cake ruby
[15:15:08] ruboto: ruby, here's your cake: ????
[15:15:16] catphish: as [k-_ says, unix sockets, pipes, fifos, block devices
[15:15:49] Ox0dea: catphish: Those really are files, though.
[15:16:03] catphish: i didn't say they weren't, i said they weren't regular files
[15:16:14] shevy: everything is a file
[15:16:22] [k-_: your face isnt a file!
[15:16:23] catphish: shevy: deep man
[15:16:47] shevy: I am just repeating conventional wisdom :)
[15:16:58] ngscheurich: has joined #ruby
[15:17:10] catphish: basically i thought IO operated on raw FDs, and File was an interface to open files and get their IO
[15:17:12] [k-_: con(ventional) wisdom
[15:17:20] catphish: but clearly it's not that simple
[15:17:33] Ox0dea: catphish: But see, why would you think that?
[15:17:34] [k-_: oo is not that simple
[15:17:47] Ox0dea: What about "IO" communicates "fd" to you?
[15:18:07] catphish: Ox0dea: the fact that things like socket use it, things that have FDs but aren't files
[15:18:07] Ox0dea: I trust you're close to realizing that you've projected your own assumptions onto the language.
[15:18:27] [k-_: IO is input/output
[15:18:41] Ox0dea: Is watermelons a IO?
[15:18:45] bigmac: has joined #ruby
[15:19:11] catphish: Ox0dea: also, the fact that IO is initialized with a FD ;)
[15:19:20] hahuang65: has joined #ruby
[15:19:37] cantaberry: has joined #ruby
[15:19:37] [k-_: what is a watermelons?
[15:19:57] catphish: i don't think my assumption was unreasonable :(
[15:20:21] pokmo: has left #ruby: ("AndroIRC - Android IRC Client ( http://www.androirc.com )")
[15:20:59] fostertheweb: has joined #ruby
[15:22:01] catphish: anyway, thanks for pointing out the IO.write method :)
[15:22:51] fostertheweb: has joined #ruby
[15:22:55] shevy: [k-_ your face is a watermelon!
[15:23:40] r_baron: has joined #ruby
[15:24:05] [k-_: are you colour blind? o_O
[15:24:07] Ox0dea: catphish: I'll grant that the interface isn't perfectly congruent, but convenience > consistency.
[15:26:14] catphish: no worries, I think the answer to my confusion lies in the Kernel#open interface, which IO uses, and can open various kinds of things (files, program streams)
[15:27:12] catphish: thanks for the *pointers
[15:27:23] cantaberry: has joined #ruby
[15:29:02] dgutierrez1287: has joined #ruby
[15:29:57] jhooker: has joined #ruby
[15:30:06] dionysus69: has joined #ruby
[15:33:05] yeticry: has joined #ruby
[15:34:12] Ox0dea: catphish: Can I use you as a dereference?
[15:34:30] JohnnyTao: has joined #ruby
[15:37:21] splud: has joined #ruby
[15:37:51] ecnalyr: has joined #ruby
[15:37:54] lxsameer: has joined #ruby
[15:37:54] lxsameer: has joined #ruby
[15:37:59] splud: I have an associative array of disk parameters (basically, parsed-out data from ???df??? on Linux).
[15:38:21] bl4ckpajamas: has joined #ruby
[15:38:22] badbodh: has joined #ruby
[15:38:22] badbodh: has joined #ruby
[15:38:50] splud: This is contained in an array indexed by the partition name.
[15:38:59] Ox0dea: splud: Arrays are only indexed numerically in Ruby.
[15:39:15] splud: Okay, must be a hash.
[15:39:20] Ox0dea: Ah, sorry, I see you specified "associative array"; yeah, we call that a Hash.
[15:39:54] Ox0dea: splud: Are you trying to group those with matching partition names together?
[15:40:14] splud: I???d like to have a second hash which is indexed by directory path and REFERS to the appropriate entry in the partitions array.
[15:40:17] bootstrappm: poll: what do you write APIs in?
[15:41:00] catphish: splud: you can point the values of 2 hashes to the same object
[15:41:09] splud: That is, on one system ???/usr??? and ???/var??? might be on the same filesystem, and on another, they may be different (but not inherently unique - as ???/??? may be the same as one of those as well).
[15:41:33] chouhoulis: has joined #ruby
[15:42:06] catphish: value = "223G 140G 72G 67%"; disks['sda1'] = a; mountpoints['/var'] = a; mountpoints['/opt'] = a;
[15:42:11] catphish: is that what you mean?
[15:42:15] Ox0dea: Looks about right.
[15:42:45] catphish: so you have 2 hashes, one with disk names, and one with mountpoints, both of which point to the same data
[15:43:41] catphish: more likely the data would also be a hash: a = {"size" => "223G", "used" => "140G"} etc
[15:43:46] [k-_: bootstrappm: your poll is going to get lost in the sea of text
[15:43:52] splud: well, I have the individual fields broken out for direct access.
[15:43:57] platzhirsch: has left #ruby: ()
[15:43:58] catphish: bootstrappm: ruby
[15:44:03] bootstrappm: [k-_ no worries, I'll ask again later
[15:44:09] CustosL1men: havenwood, acutally, I did not finish question, wanted to ask what linux distro is best - but settled on fedora
[15:44:11] bootstrappm: catphish: raw? sinatra? cuba?
[15:44:36] splud: don???t get your use of ???a??? there - I assue that???s supposed to be ???value??? ?
[15:44:40] catphish: bootstrappm: we have our own api framework: https://github.com/adamcooke/moonrope
[15:45:25] catphish: splud: a is a variable, i used it to hold a reference to the hash of data temporarily before putting it into the hashes
[15:45:44] splud: Anwyay, that???s sufficiently similar to what I???m doing. However, I???m also manipulating a projected use element.
[15:46:04] catphish: i don't know what that means
[15:46:13] splud: The idea is that we can???t simply go ???how much free space do you have????, but need to track it on a directory by directory basis.
[15:46:18] MichaelSmith: has joined #ruby
[15:46:38] absolutejam: has joined #ruby
[15:46:58] Ox0dea: splud: Which flags are you supplying to `df`, if you don't mind my prying?
[15:47:06] acke: has joined #ruby
[15:47:15] [k-_: pry: the better IRB
[15:47:32] splud: And some directories may be in different filesystems. If ???/etc??? and ???/bin??? are on the same filesystem, then if I add 200K to etc and 2M to bin, BOTH should modify the same underlying _filesystem_ object.
[15:47:37] [k-_: splud: method(:df).arity
[15:47:41] Ox0dea: >> 'irb'.chars.map(&:succ).join
[15:47:42] catphish: i usually use df -k
[15:47:42] ruboto: Ox0dea # => "jsc" (https://eval.in/433035)
[15:47:53] Ox0dea: JS console > irb? :'(
[15:47:59] splud: df -m #{mountpoint}
[15:48:00] greenarrow: has joined #ruby
[15:48:05] shevy: what are you people doing there
[15:48:18] catphish: splud: why would you do this rather than just asking the kernel every time you need to know?
[15:48:38] [k-_: quinne script zeta
[15:48:39] catphish: splud: are you aware you can simply execute "df -k /opt" for example
[15:48:47] splud: where mountpoint is the name of a specific directory. I iterate over a handful of known dirs we rely upon.
[15:48:57] catphish: splud: and it will find the mountpoint for that directory and give you the data
[15:49:30] splud: I am very aware. Try the command I cited.
[15:49:41] catphish: splud: oh yeah, you are doing that
[15:49:57] tjohnson: has joined #ruby
[15:50:14] splud: if /opt isn???t an explicit mount and instad is part of /, then the df output will have ???/??? as the directory.
[15:50:30] catphish: splud: precisely, i assume this is ok for you?
[15:50:48] splud: df gets me what I need, that???s not the problem.
[15:51:34] catphish: splud: so, i'd do the following: 1) make one hash containing a mapping of mountpoint to disk 2) make a second hash of disk to usage data
[15:51:58] moeabdol: has joined #ruby
[15:51:59] devoldmx: has joined #ruby
[15:52:04] catphish: splud: so the first hash would look like {"/opt" => "/dev/sda1", "/home" => "sda1"}
[15:52:19] splud: I iterate though the directories of interest, generate hashes of the resulting data, and want to subsequently say use ???x??? space in ???/etc??? and ???y??? in ???/usr/bin??? or whatever. Do this for a bunch of things (parsed from elsewhere), and then check for total exstimated consumption as it impacts the different underlying filesystems.
[15:52:27] catphish: then the second hash would be like {"/dev/sda1" => [1000, 950]}
[15:53:00] drptbl: has joined #ruby
[15:53:03] catphish: splud: does my comment answer your question at all, what i said would allow you to track the usage in one hash, but then reference it based on directory name
[15:53:07] splud: catphish: opt and home would both be full path to dev, but yea.
[15:53:15] zotherstupidguy: has joined #ruby
[15:53:16] Ox0dea: splud: If you're using `df`, why not `du`?
[15:53:21] catphish: splud: oh yeah, sorry, i was being lazy
[15:53:35] splud: du is meaningless pre-install.
[15:53:59] Ox0dea: > check for total exstimated consumption
[15:54:02] catphish: du may also be needlessly slow
[15:54:03] Ox0dea: What does that mean?
[15:54:04] splud: I???m checking to see that a series of packages for an embedded device will have enough space. This includes computed db conversions, backup files, etc.
[15:54:38] catphish: anyway, start writing some code, see if it does what you want, shout if you have questions :)
[15:54:54] petricore: has joined #ruby
[15:55:12] splud: Basically, I???m dealing with a script that assumed everything was on a monolithic filesystem. I need to wedge in support for multiple partitions.
[15:55:45] Ox0dea: splud: Why not use OverlayFS? Try to install all the packages in the overlay and just remove it if you run into space issues. :P
[15:56:51] chipotle: has joined #ruby
[15:57:09] grenierm: has joined #ruby
[15:57:13] drPoggs: has joined #ruby
[15:57:18] splud: I???m aware of OverlayFS. Did I mention this is an _embedded_ device? Also, upgrading older systems, the script needs to run on some disturbingly old ruby and Linux...
[15:57:48] pietr0: has joined #ruby
[15:58:30] Ox0dea: >> ObjectSpace.each_object(Module).select { |m| m.instance_methods.include? :| } # catphish
[15:58:30] splud: OverlayFS is really cool in environments where you have an abundance of storage. It???s even more harsh where you don???t have a lot of spare space. Say on a device with 2GB or less total flash, which might be partitioned.
[15:58:31] ruboto: Ox0dea # => [Array, Bignum, Fixnum, FalseClass, TrueClass, NilClass] (https://eval.in/433037)
[15:58:48] Swappticon: has joined #ruby
[15:59:14] catphish: i use overlayfs heavily, but i'm not clear how it would help with an install process
[15:59:34] nanoz: has joined #ruby
[15:59:43] havenwood: CustosL1men: Fedora is a good one. Nice modern Ruby with a user local setup. :)
[15:59:51] Ox0dea: catphish: I was being entirely facetious.
[15:59:54] amclain: has joined #ruby
[16:00:24] splud: OverlayFS would be handy for dealing with reversing an abortive install. No inherent need to back up things from before. So long as the overlay was a fresh one.
[16:00:44] catphish: i'm a fan of ubuntu, but i use third party repositories for ruby
[16:00:53] Ox0dea: catphish: How come?
[16:01:04] riotjones: has joined #ruby
[16:01:38] TomyLobo: has joined #ruby
[16:02:26] catphish: Ox0dea: which part? ubuntu because i have found it extremely reliable and easy to use over several years, i'm sure other distros can claim the same, but i've seen no reason to change, third party repos because it makes installing and updating a decent version of ruby easy
[16:03:28] shevy: why are you not using the ubuntu system ruby
[16:03:48] mustmodify: has joined #ruby
[16:04:37] catphish: because ubuntu provide support for 1.9.3 on their current LTS release, and that's simply too old for me, and people here shout at me when i do
[16:05:01] r_baron: has joined #ruby
[16:05:02] Iszak_: has joined #ruby
[16:05:08] adaedra: "1.9.3 is EOL"
[16:05:32] catphish: i think they also support ruby 2.0, but the package depends on ruby 1.9.3 and that's a weird arrangement, i don't like it :)
[16:06:28] Xiti: has joined #ruby
[16:06:32] Originerd: has joined #ruby
[16:07:11] mustmodify: I'm getting a weird error... "https://gist.github.com/mustmodify/bf932f892f9b7617d54a" ... is this more likely a bundler issue or a chruby issue? Or something else?
[16:07:35] mustmodify: sorry, the error is "Your Ruby version is 1.9.3, but your Gemfile specified 2.2.3"
[16:07:51] havenwood: mustmodify: gem install bundler
[16:08:19] catphish: seems like a bug in your chruby running bundle with the wrong ruby
[16:08:31] michaeldeol: has joined #ruby
[16:08:32] mustmodify: havenwood: It did install something but it still has the same error.
[16:08:49] havenwood: mustmodify: command -v bundle
[16:08:54] QORRiE: has joined #ruby
[16:08:57] livcd: has joined #ruby
[16:09:11] catphish: run "which ruby" and "which bundle", you should see which versions your shell is using
[16:09:13] mustmodify: havenwood: /usr/local/bin/bundle
[16:09:28] catphish: what about with ruby?
[16:09:31] bricker: has joined #ruby
[16:09:47] havenwood: mustmodify: So that's a gem installed by your system-wide Ruby. And with 2.2.3 selected you've for sure installed the Bundler gem?
[16:09:49] last_staff: has joined #ruby
[16:10:00] Soda: has joined #ruby
[16:10:08] jhass: mustmodify: which -a bundle ?
[16:10:22] shadoi: has joined #ruby
[16:10:38] mustmodify: updated the gist.
[16:10:41] jhass: also gem env to a gist
[16:10:41] havenwood: mustmodify: If you have installed bundler with 2.2.3 and `which -a bundle` shows it lower on the list... show us your PATH: echo $PATH
[16:10:51] catphish: "which -a bundle", "which -a gem", and "which -a ruby" would be very useful IMO
[16:11:16] jhass: wait, command -v goes to /usr/local but which goes to /opt?
[16:11:24] catphish: sorry, too many cooks, i'll shut up, make a paste with everything people have asked for
[16:11:42] voltalio: has joined #ruby
[16:11:47] mustmodify: Here's something weird though. Every time I type `gem install bundler` it says "ok installing that. Done." Also added to the gist.
[16:12:11] jhass: that's okay
[16:12:23] renderful: has joined #ruby
[16:12:47] mustmodify: which -a bundle and which -a ruby added. /opt/rubies/ruby-2.2.3/bin/{}
[16:12:57] David27: has joined #ruby
[16:13:24] jhass: bundle exec ruby -v? also gem env would still be great
[16:14:07] otacon-: has joined #ruby
[16:14:33] haxrbyte_: has joined #ruby
[16:15:12] havenwood: +1 `gem env`, and i'm still curious about `echo $PATH`
[16:15:15] mustmodify: ok, is anything missing from the gist?
[16:15:28] jhass: bundle exec ruby -v
[16:15:49] JDiPierro: has joined #ruby
[16:16:10] renderful: has joined #ruby
[16:16:19] havenwood: mustmodify: Looks to me like now that you've installed Bundler on 2.2.3 it should work. :P Try turning it off and back on again (or just restart your shell).
[16:16:57] jhass: mustmodify: are you sure your issue still reproduce? does the issue actually happen on a different shell/environment?
[16:17:09] blackjid: has joined #ruby
[16:17:19] ferhaty: has joined #ruby
[16:17:24] mustmodify: havenwood: ding. I opened a new session and it just worked.(tm)
[16:17:34] havenwood: mustmodify: :)
[16:17:49] mustmodify: jhass, havenwood, et al: Thanks.
[16:18:17] Igorshp: has joined #ruby
[16:18:51] pawnbox: has joined #ruby
[16:19:14] felixrsmith: has joined #ruby
[16:19:21] mustmodify: One question: why does it keep installing bundler every time? Or reporting that it does?
[16:19:40] jhass: it's basically reinstalling it
[16:20:20] siaW: has joined #ruby
[16:20:34] rezzack: has joined #ruby
[16:21:09] blackjid: has joined #ruby
[16:22:04] nateberkopec: has joined #ruby
[16:24:52] wldcordeiro_: has joined #ruby
[16:24:53] mleung: has joined #ruby
[16:24:56] rehat_: has joined #ruby
[16:26:40] arup_r: has joined #ruby
[16:27:04] JDiPierro: has joined #ruby
[16:27:18] JDiPierro: has joined #ruby
[16:27:37] siaW: can anyone please help me with this? https://gist.github.com/siaw23/1b4ae905cd19293d1e56
[16:27:49] Maletor: has joined #ruby
[16:27:53] siaW: i???m trying to solve some random ruby challenges
[16:29:22] d10n-work: has joined #ruby
[16:29:50] [k-_: >> (print "").class
[16:29:51] ruboto: [k-_ # => NilClass (https://eval.in/433039)
[16:30:01] [k-_: print discards the string and returns nil
[16:30:05] gregf_: >> "olleH ,ereht dna woh era ?uoy".split(/\s/).map(&:reverse).join(" ")
[16:30:06] ruboto: gregf_ # => "Hello there, and how are you?" (https://eval.in/433040)
[16:30:34] psye: has joined #ruby
[16:30:40] eam: siaw: you aren't returning the result
[16:30:45] [k-_: also, fix your indentation problems
[16:30:59] towski_: has joined #ruby
[16:31:40] siaW: ok. let me try again
[16:31:53] greenarrow: has joined #ruby
[16:32:12] diegoviola: has joined #ruby
[16:32:27] paulcsmith: has joined #ruby
[16:33:23] [k-: don't print the result, just return it
[16:34:22] siaW: @gregf: what does the \s do here?
[16:34:33] [k-: Ox0dea: i propose Array#join_
[16:35:26] [k-: \s is a regular expression that matches any whitespace character
[16:35:47] [k-: it can only be used in a regexp to get this functionality
[16:36:27] [k-: a whitespace character includes a space, a tab, and all other sorts of hidden spaces in unicode
[16:36:29] dima__: has joined #ruby
[16:36:54] siaW: [k-: thank you
[16:37:01] siaW: challenge passed
[16:38:07] [k-: s/and/or/
[16:38:09] Ox0dea: >> (9..13).map(&:chr).join.scan(/[[:space:]]/).size # [k-
[16:38:10] ruboto: Ox0dea # => 5 (https://eval.in/433050)
[16:38:29] NeverDie: has joined #ruby
[16:38:30] Ox0dea: 0x20 doesn't live near his relatives.
[16:39:44] [k-: i still propose join_ as a shorthand for join(? )
[16:39:55] ruboto: [k- # => /tmp/execpad-8cd64a02f9f4/source-8cd64a02f9f4:2: warning: invalid character syntax; use ?\n ...check link for more (https://eval.in/433051)
[16:40:08] TheRinger: has joined #ruby
[16:40:08] [k-: hm, that ought to have worked
[16:40:11] ruboto: Ox0dea # => " " (https://eval.in/433052)
[16:40:40] [k-: ruboto trimmed of the trailing space :(
[16:40:55] Ox0dea: Good riddance.
[16:40:57] greenbigfrog: has left #ruby: ()
[16:41:01] [k-: oh, it still didnt work
[16:41:11] mustmodify: has left #ruby: ()
[16:41:17] Ox0dea: Indeed not.
[16:41:17] b14d3: has joined #ruby
[16:41:46] [k-: i must have ran into a MemoryError
[16:42:11] Ox0dea: >> Time.now.year
[16:42:12] ruboto: Ox0dea # => 2015 (https://eval.in/433056)
[16:42:30] pwnd_nsfw: has joined #ruby
[16:42:53] [k-: >> Time.past.year rescue "Exception"
[16:42:54] ruboto: [k- # => "Exception" (https://eval.in/433057)
[16:43:10] Hrorek: has joined #ruby
[16:43:15] gregf_: siaw: sorry, i know you're learning. just saw your chat. // is for a regex. /s is for space. in your case your splitting it based on a space. i'm doing the same, but am using a regular expression
[16:43:53] siaW: gregf_: thanks a lot
[16:44:01] The_Phoenix: has joined #ruby
[16:44:05] gregf_: >> [ "foo bar baz".split(/\s+/); "foo bar baz".split(" ") ]
[16:44:06] ruboto: gregf_ # => /tmp/execpad-ef66a6d5ebc1/source-ef66a6d5ebc1:2: syntax error, unexpected ';', expecting ']' ...check link for more (https://eval.in/433058)
[16:44:26] [k-: use a comma
[16:44:34] nfk: has joined #ruby
[16:44:36] gregf_: >> [ "foo bar baz".split(/\s+/), "foo bar baz".split(" ") ]
[16:44:37] ruboto: gregf_ # => [["foo", "bar", "baz"], ["foo", "bar", "baz"]] (https://eval.in/433059)
[16:44:59] Mazhug: has left #ruby: ()
[16:45:00] Ox0dea: >> 'foo bar baz'.split
[16:45:00] marr: has joined #ruby
[16:45:01] ruboto: Ox0dea # => ["foo", "bar", "baz"] (https://eval.in/433060)
[16:45:05] Ox0dea: Thanks, Ruby. I knew you loved us.
[16:45:21] [k-: such behavior
[16:45:27] [k-: much wow
[16:45:30] Ox0dea: >> " foo \t\n\t\n bar \n\t\t\n baz ".split
[16:45:31] ruboto: Ox0dea # => ["foo", "bar", "baz"] (https://eval.in/433061)
[16:45:33] Ox0dea: Maybe too much love?
[16:45:46] [k-: >> RUBY_VERSION
[16:45:47] ruboto: [k- # => "2.2.0" (https://eval.in/433062)
[16:45:56] gregf_: does split take a regex by default?
[16:46:10] Ox0dea: gregf_: No, it just splits on whitespace if you don't provide an argument.
[16:46:28] Ox0dea: It's almost certainly the most common use case, so why not, right?
[16:46:30] [k-: technically, it splits using some global variable
[16:46:40] ruboto: Ox0dea # => "\n" (https://eval.in/433063)
[16:46:44] Ox0dea: That's not the one.
[16:46:49] ruboto: [k- # => nil (https://eval.in/433064)
[16:46:49] dionysus69: has joined #ruby
[16:46:55] ruboto: gregf_ # => /tmp/execpad-a0adc02f08f0/source-a0adc02f08f0:2: `$]' is not allowed as a global variable name ...check link for more (https://eval.in/433065)
[16:46:56] ruboto: Ox0dea # => nil (https://eval.in/433066)
[16:47:03] ruboto: gregf_ # => "\n" (https://eval.in/433067)
[16:47:05] [k-: ?experiment
[16:47:05] ruboto: Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
[16:47:24] Ox0dea: >> $; = 'x'; 'axbxc'.split
[16:47:25] ruboto: Ox0dea # => ["a", "b", "c"] (https://eval.in/433068)
[16:47:25] naftilos76: has joined #ruby
[16:47:26] FernandoBasso: has joined #ruby
[16:47:30] yqt: has joined #ruby
[16:47:34] shevy: what is this here
[16:47:37] gregf_: oh, so $; is the delim
[16:47:49] siaW: is my way of thinking in this challenge bad? https://gist.github.com/siaw23/1b4ae905cd19293d1e56
[16:47:56] Ox0dea: gregf_: Unless it's `nil`, in which case Ruby effectively splits on /\s+/.
[16:48:02] [k-: >> " ".split; $;
[16:48:03] ruboto: [k- # => nil (https://eval.in/433069)
[16:48:11] shevy: siaw this is strange
[16:48:19] shevy: "#{name}"
[16:48:22] gregf_: hmm, Ox0dea++
[16:48:29] shevy: but the method name already returns a String, so why is #{} used
[16:48:35] siaW: shevy: why???s that strange?
[16:48:44] eam: siaw: you can just say name
[16:48:47] gregf_: Ox0dea: you prolly know more than anyone else on this channel o_O
[16:48:56] eam: gregf_: it's just perlisms
[16:48:57] shevy: siaw why do you need the #{}
[16:49:08] gregf_: eam: yeah, i know. so i can relate ;)
[16:49:15] wldcordeiro: has joined #ruby
[16:49:22] shevy: self.name also is not needed, you can remove the self. part
[16:49:22] [k-: very Perl
[16:49:28] siaW: shevy: ah right.
[16:49:57] shevy: perl 6 will give perl a new boost!
[16:50:25] gregf_: Perl 6 is the new Ruby ;)
[16:50:39] siaW: shevy: but putting self, i meant to put the name of the current Object
[16:50:51] siaW: which would be right except that it???s redundant. yes?
[16:50:53] shevy: siaw perhaps try self.class.name ?
[16:51:06] Ox0dea: siaw: That's correct. Redundancy is generally to be avoided.
[16:51:13] greenbigfrog: has joined #ruby
[16:51:16] hahuang65: has joined #ruby
[16:51:38] shevy: someone kiss him
[16:51:40] Ox0dea: siaw: I don't think you meant to say that you meant to put the *name* of the current object, just a reference to it.
[16:51:52] siaW: Ox0dea: yes
[16:51:55] Oka: has joined #ruby
[16:52:07] greenbigfrog: I want to display he status of some code live in a browser (doesn't have to be remote)
[16:52:07] greenbigfrog: How would I do this?
[16:52:39] sepp2k: has joined #ruby
[16:52:43] [k-: "#{name}" -- 1. It creates a new string. 2. It calls to_s
[16:52:49] Ox0dea: siaw: It's conventional to use an "implicit self" whenever possible, but it is occasionally necessary.
[16:53:05] Ox0dea: You can't use `class` in place of `self.class`, as an example, since `class` is a keyword.
[16:53:13] [k-: greenbigfrog: ajax
[16:53:24] Ox0dea: [k-: Did you mean WebSockets?
[16:53:39] [k-: whatever the rage is now
[16:53:55] greenbigfrog: a guide please?
[16:53:56] Hrorek: has joined #ruby
[16:53:57] apeiros: that'd be webasm
[16:54:38] Ox0dea: gregf_: How do you mean?
[16:55:14] siaW: why am i getting ???unexpected tIDENTIFIER???? https://gist.github.com/siaw23/1b4ae905cd19293d1e56
[16:55:17] greenbigfrog: [k-: a guide please?
[16:55:29] [k-: i dont have a guide :<
[16:55:39] Ox0dea: siaw: https://eval.in/433077
[16:55:43] [k-: i don't do webdev
[16:55:48] Ox0dea: I think you must be executing your code incorrectly.
[16:55:49] ramfjord: has joined #ruby
[16:55:56] Ox0dea: siaw: Are you using a weird editor?
[16:56:09] siaW: i???m using sublime text
[16:56:13] [k-: s/say_name/say_my_name!/
[16:56:35] Ox0dea: siaw: Well, that link demonstrates that your code works just fine and does not have any syntax errors.
[16:56:38] Igorshp: has joined #ruby
[16:56:47] JoshL: has joined #ruby
[16:57:02] siaW: Ox0dea: thanks. *skipping challenge*
[16:57:15] Ox0dea: Cool tragedy, bro.
[16:57:26] fostertheweb: has joined #ruby
[16:58:09] Ox0dea: gregf_: http://i.imgur.com/dxU0aqH.jpg
[16:58:14] n1x: has joined #ruby
[16:58:15] Ox0dea: Ruby has, like, a third of those.
[16:59:23] eam: well, ruby just reuses the same operator with overloading
[16:59:54] eam: eg + works for String or any numeric type, whereas perl has + or . for numeric / string
[17:00:15] eam: oh man that's perl6
[17:00:23] eam: nevermind what I said perl6 is crazy
[17:00:43] gregf_: Ox0dea: is that real? as in are those Perl 6 operators?
[17:01:30] gregf_: a new report said php 7 was 10 times faster than Perl 6. dunno how biased that report was. but yeah Perl 5 and Perl 6 are not even 50'th cousins :/
[17:01:44] [k-: perl 6 took 10 years
[17:01:44] msankhala: has joined #ruby
[17:02:09] gregf_: er; s/took/taking/
[17:02:13] eam: gregf_: they're fairly directly related, seeing as how both are direct descendents of perl
[17:02:28] eam: descendants even
[17:02:54] gregf_: eam: honestly dunno how true that is. i know Moose is nearer to Perl 6
[17:03:19] greenbigfrog: [k-: can you google a guide for me please? so I really read up on the correct thing...
[17:03:21] eam: perl6 hasn't been productionalized; no one should expect it to be fast
[17:03:59] [k-: delegate!(:google, Ox0dea)
[17:04:15] gregf_: [k-: true that ;)
[17:04:17] Ox0dea: eam: Perl 6 is dead.
[17:04:55] Ox0dea: I do like `.=`, though. `some_descriptive_variable .= foo` > `some_descriptive_variable = some_descriptive_variable.foo`.
[17:05:33] [k-: greenbigfrog: you are going to have to learn to google yourself
[17:05:40] [k-: as i said, im not a webdev
[17:06:04] bootstrappm: greenbigfrog: could you give some more details about your question
[17:06:21] DoubleMalt: has joined #ruby
[17:07:31] bootstrappm: what do you mean the status of some code?
[17:07:36] mleung: has joined #ruby
[17:08:22] howdoicomputer: has joined #ruby
[17:08:33] elperdut: has joined #ruby
[17:08:42] juanpablo_: has joined #ruby
[17:08:58] dopamean_: has joined #ruby
[17:09:05] davedev24: has joined #ruby
[17:09:40] Rurik: has joined #ruby
[17:09:40] Rurik: has joined #ruby
[17:09:59] leafybasil: has joined #ruby
[17:10:44] yfeldblum: has joined #ruby
[17:10:59] FernandoBasso1: has joined #ruby
[17:12:01] sgambino: has joined #ruby
[17:13:16] Papierkorb: Is ruboto any good?
[17:13:38] karapetyan: has joined #ruby
[17:13:47] Ox0dea: >> :ruboto > :everything
[17:13:48] ruboto: Ox0dea # => true (https://eval.in/433081)
[17:14:03] Papierkorb: http://ruboto.org/ that thing
[17:14:25] havenwood: has joined #ruby
[17:14:31] gregf_: >> :ruboto > :something
[17:14:32] ruboto: gregf_ # => false (https://eval.in/433082)
[17:14:38] Ox0dea: gregf_: What are you even doing?
[17:14:44] Ox0dea: Papierkorb: Do you love JRuby?
[17:14:47] leat1: has joined #ruby
[17:15:13] Papierkorb: Ox0dea: never worked for me locally, but heck, it has to run somehow and JRuby sounds like a reasonable choice for a Java app
[17:15:15] Caius: has joined #ruby
[17:16:21] leat1: has joined #ruby
[17:17:47] siemprefresco: has joined #ruby
[17:18:17] dopamean_: has joined #ruby
[17:21:52] b14d3: has left #ruby: ()
[17:22:40] Hanmac: has joined #ruby
[17:22:42] niemcu: has joined #ruby
[17:22:45] Jackneill: has joined #ruby
[17:23:03] prestorium: has joined #ruby
[17:23:42] jenrzzz: has joined #ruby
[17:25:45] y_gick: has joined #ruby
[17:26:03] y_gick: I begin developement of a twitter client in ruby
[17:26:08] y_gick: and I have a question
[17:26:23] krisquigley: has joined #ruby
[17:26:27] mleung: has joined #ruby
[17:26:36] y_gick: is it better to reconnect to twitter each I refresh the timeline
[17:26:36] leat1: has joined #ruby
[17:26:53] y_gick: or is it better to use a "persistent" connection to twitter
[17:26:58] fantazo: has joined #ruby
[17:27:02] poguez_: has joined #ruby
[17:28:11] [k-_: not enough info
[17:28:38] xaxisx: has joined #ruby
[17:28:45] Tuxero: has joined #ruby
[17:28:57] apeiros: y_gick: assuming you won't be having millions of customers using your twitter client: it probably won't matter
[17:29:19] siemprefresco: has joined #ruby
[17:29:28] apeiros: but if twitter's API docs have a suggested/preferred way, you probably should choose that
[17:29:54] apt-get: has joined #ruby
[17:31:07] ndrei: has joined #ruby
[17:32:43] leafybasil: has joined #ruby
[17:33:08] saddad: has joined #ruby
[17:33:52] krisquigley: has joined #ruby
[17:34:39] mleung: has joined #ruby
[17:37:51] leat1: has joined #ruby
[17:39:22] M-Kodo: has joined #ruby
[17:42:14] craysiii: has joined #ruby
[17:43:52] M-Kodo: has joined #ruby
[17:43:55] mleung: has joined #ruby
[17:44:40] apt-get: has joined #ruby
[17:46:43] p0wn3d_: has joined #ruby
[17:50:02] leafybasil: has joined #ruby
[17:51:22] casadei_: has joined #ruby
[17:51:23] jenrzzz: has joined #ruby
[17:51:34] NeverDie: has joined #ruby
[17:51:53] mleung: has joined #ruby
[17:52:36] dopamean1: has joined #ruby
[17:52:46] devoldmx: has joined #ruby
[17:52:51] spider-mario: has joined #ruby
[17:53:58] symm-: has joined #ruby
[17:54:17] osmansekerlen: has joined #ruby
[17:54:18] jamesaxl: has joined #ruby
[17:55:18] greenbigfrog: bootstrappmsorry that I respond now... I was afk...
[17:55:18] greenbigfrog: I basically just have a script that let's say tests something. If test A is completed I somehow want to see that visual... It doesn't have to be webbased but I haven't found out how to display changing stuff with Shoes.rb
[17:55:57] fxn: has joined #ruby
[17:55:59] Ox0dea: greenbigfrog: Are you on Windows?
[17:56:16] Ox0dea: greenbigfrog: Is this just a personal thing for yourself?
[17:56:34] Ox0dea: Like, you're monitoring something, and you just want to be alerted at certain points?
[17:56:53] r0x0rZ: has joined #ruby
[17:57:09] leat1: has joined #ruby
[17:57:20] greenbigfrog: the built in notifications don't work, since they automatically get deleted... And it also might get a bit more stuff that needs to be displayed
[17:57:28] greenbigfrog: if that is whay you meant
[17:57:37] bootstrappm: greenbigfrog is that test on a webapp or somewhere remote? or is it something local that doesn't touch web?
[17:57:47] timonv: has joined #ruby
[17:57:48] amoeba`: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[17:57:51] Ox0dea: greenbigfrog: You might consider shelling out to something like `notify-send`.
[17:57:56] M-mistake: has joined #ruby
[17:57:57] M-prosodyContext: has joined #ruby
[17:58:13] Ox0dea: Then again, I suspect Shoes' notification mechanism provides a way to make them more permanent.
[17:58:28] greenbigfrog: bootstrappm: don't know it yet. and the testing thingie was just a example ;)
[17:58:31] dorei: has joined #ruby
[17:58:36] firstdayonthejob: has joined #ruby
[17:58:38] baweaver: has joined #ruby
[17:58:45] Ox0dea: greenbigfrog: You're looking at an empty editor window, aren't you?
[17:58:55] greenbigfrog: Ox0dea: I haven't found out how to tell Shoes to update...
[17:58:56] bootstrappm: eh, to be able to help we really need a more specific use case
[17:59:05] greenbigfrog: almost empty...
[17:59:14] bootstrappm: testing a local script is very different from testing something remote greenbigfrog
[17:59:14] greenbigfrog: OK... gonna be more specific
[17:59:23] Ox0dea: Probably best to flesh out what it is you intend to do before seeking help with something so nebulous.
[17:59:24] JoshL: has joined #ruby
[17:59:37] bootstrappm: yeah, I'd say figure out what you're building first
[17:59:45] greenbigfrog: It was a gerneral question also... had that on mind for various things...
[18:00:08] Ox0dea: greenbigfrog: How do I add?
[18:00:48] bootstrappm: greenbigfrog learning to ask is a process, Ox0dea's just teasing
[18:01:27] felixrsmith: has joined #ruby
[18:01:39] Ox0dea: bootstrappm: At the axiomatic level, addition is mutually recursively defined in terms of predecessors and successors, so it was a semi-genuine question. :P
[18:02:12] allomov: has joined #ruby
[18:02:21] Ox0dea: In all sincerity, greenbigfrog might do well to see whether or not he could concisely describe how to add two numbers.
[18:03:53] mleung: has joined #ruby
[18:04:24] devdazed: has joined #ruby
[18:04:41] greenbigfrog: https://github.com/green-big-frog/autohost
[18:04:41] greenbigfrog: It would be great to have a "debug" view, which channels are live and which channel did get chosen and also some nice looking stats
[18:04:41] greenbigfrog: regardin if local or not: depends how far I will continue working on this...
[18:04:50] greenbigfrog: you understand what it supposed to do?
[18:06:53] Ox0dea: greenbigfrog: Doesn't Twitch automatically spawn channels on demand?
[18:07:26] greenbigfrog: do you mean there's always a channel being displayed? yes there is...
[18:07:31] yfeldblum: has joined #ruby
[18:07:53] greenbigfrog: The bot is for offline time... IT will automatically host other channels...
[18:08:00] NeverDie: has joined #ruby
[18:08:00] greenbigfrog: ACTION searches for a link
[18:08:13] felixrsmith: has joined #ruby
[18:08:28] greenbigfrog: http://blog.twitch.tv/2014/07/host-mode-faq/
[18:08:30] momomomomo: has joined #ruby
[18:08:59] juanpablo_: has joined #ruby
[18:09:44] nateberkopec: has joined #ruby
[18:10:04] bigmac: has joined #ruby
[18:12:36] ziro`: has joined #ruby
[18:12:40] codecop: has joined #ruby
[18:12:42] codecop_: has joined #ruby
[18:15:00] based_pdev_: has joined #ruby
[18:15:11] greenbigfrog: @bootstrappm @Ox0dea you read/saw it?
[18:17:29] p0wn3d_: has joined #ruby
[18:17:42] riotjones: has joined #ruby
[18:19:51] p0wn3d_: has joined #ruby
[18:19:52] Hrorek: has joined #ruby
[18:19:59] yqt: has joined #ruby
[18:20:57] dopamean_: has joined #ruby
[18:22:28] bootstrappm: greenbigfrog yes but I don't know much how Twitch works so I'll plead the 5th ;)
[18:22:55] nanoz: has joined #ruby
[18:23:13] dfockler: has joined #ruby
[18:23:26] kraljev11: has joined #ruby
[18:25:02] ledestin: has joined #ruby
[18:25:12] osmansekerlen: has joined #ruby
[18:25:14] Trieste: has joined #ruby
[18:25:21] nanoz: has joined #ruby
[18:25:26] elperdut: has joined #ruby
[18:27:11] Jerulz: has joined #ruby
[18:27:13] DLSteve: has joined #ruby
[18:27:29] xaxisx: has joined #ruby
[18:27:40] nofxx: has joined #ruby
[18:29:12] dgutierrez1287: has joined #ruby
[18:29:44] pragmatism: has joined #ruby
[18:32:27] baweaver: has joined #ruby
[18:36:04] Jerulz: has left #ruby: ()
[18:37:27] jxv: has joined #ruby
[18:37:45] dopamean_: has joined #ruby
[18:38:04] khebbie: has joined #ruby
[18:41:45] Narzew: has joined #ruby
[18:41:55] kgirthofer: has joined #ruby
[18:43:00] siaW: has joined #ruby
[18:43:01] siaW: i need help here please https://gist.github.com/siaw23/1b4ae905cd19293d1e56
[18:43:41] dfockler: siaw: you can rescue the error or check the divisor(???)
[18:43:45] nofxx: z = x / y unless y.zero?
[18:43:59] cornerma1: has joined #ruby
[18:44:01] dfockler: discriminant?
[18:44:03] nofxx: yeah, or rescue ZeroDivisionError ^
[18:44:35] nofxx: rubocop would say avoid rescue inline heh
[18:45:00] postmodern: has joined #ruby
[18:45:05] havenwood: siaw: So you're trying to not divide by zero? Or trying to test that the exception is raised?
[18:45:35] mikecmpbll: has joined #ruby
[18:46:06] stankley: has joined #ruby
[18:46:17] havenwood: siaw: Why is it zero? Does that make sense given the context?
[18:46:40] Ox0dea: havenwood: I believe this is for a tutorial teaching how to use `if`?
[18:46:47] havenwood: Ox0dea: Aha!
[18:47:19] havenwood: I misread "test."
[18:47:26] siaW: i want to do something like
[18:47:36] siaW: i???m dividing stuff
[18:47:39] siaW: in my method
[18:47:46] siaW: and i want to test for that error
[18:47:54] choke: has joined #ruby
[18:47:58] siaW: so if, in the method
[18:48:03] jhass: siaw: you should test for input causing the error instead
[18:48:09] jhass: how was shown above
[18:48:20] Denis_: has joined #ruby
[18:48:30] siaW: someone makes the divisor 0. and there???s ZeroDivisionError??? the method should return a string say ???undefined"
[18:48:35] siaW: that???s what i want to do
[18:48:41] siaW: but not sure how to use it
[18:48:47] ytti: you need to rescue
[18:48:59] ytti: if you want to avoid rescue
[18:49:05] jhass: no, you need to check for 0 before executing the division
[18:49:06] ytti: test for divisor before dviding
[18:49:07] hakunin: has joined #ruby
[18:49:19] lucyinthesky: has joined #ruby
[18:49:49] siaW: can i do someth
[18:50:13] jhass: think then press enter?
[18:50:23] davedev24: has joined #ruby
[18:51:06] hinbody: has joined #ruby
[18:51:21] darix: >> begin ; 1/0 ; rescue ZeroDivisionError ; puts "undefined" ; end
[18:51:22] ruboto: darix # => undefined ...check link for more (https://eval.in/433117)
[18:51:26] darix: would also work
[18:51:30] Ox0dea: >> begin; 4 / 0; rescue Exception => e; e.class; end
[18:51:31] ruboto: Ox0dea # => ZeroDivisionError (https://eval.in/433118)
[18:51:42] Ox0dea: I think that's more in line with what siaw is trying to do, but I couldn't say why.
[18:52:03] siaW: does this make sense? https://gist.github.com/siaw23/1b4ae905cd19293d1e56
[18:52:30] darix: siaw: you will not reach your "if"
[18:52:38] darix: it will raise ZeroDivisionError (https://eval.in/433118)
[18:53:03] havenwood: siaw: Remember assignment `=` is different than equality check `==`.
[18:53:11] lucyinthesky: has left #ruby: ("Leaving")
[18:53:23] darix: if you want to with the "if" route then you need to check *before* doing the division
[18:53:42] darix: and then there is havenwood's remark
[18:54:12] xaxisx: has joined #ruby
[18:54:17] jhass: can we get away from recommending exceptions as control flow here please? pretty please?
[18:54:43] darix: jhass: no
[18:54:48] Swappticon: has joined #ruby
[18:54:56] siaW: ok i tried to fix it. how about this https://gist.github.com/siaw23/1b4ae905cd19293d1e56
[18:55:02] jhass: def divide(n, d) d.zero? ? "undefined" : n/d; end;
[18:55:18] jhass: yes, that's a lot better
[18:55:51] jhass: you're missing an end and don't need the return keywords
[18:56:16] darix: jhass: i dont like your method, always return a string
[18:56:26] darix: mixed return types suck
[18:56:42] siaW: ok. my tests passed now
[18:56:42] jhass: sure but until then it seemed to be the requirement
[18:56:44] M-mistake: has joined #ruby
[18:56:54] siaW: but would it have been bad to use rescue in this?
[18:57:09] darix: jhass: how so?
[18:57:12] jackjackdripper: has joined #ruby
[18:57:41] jhass: 0 is a valid value of your calculation, it's not exceptionally rare or an error
[18:57:55] jhass: it's not unexpected, it's not invalid user input
[18:58:10] jhass: it's easy to check without relying on the exception
[18:59:23] Pumukel: has joined #ruby
[18:59:37] jhass: getting into the habit of using exceptions as control flow will make you less pedantic about considering all possible input cases and properly handling them. Exceptions are not part of method signatures
[19:01:13] totimkopf: has joined #ruby
[19:02:11] toretore: has joined #ruby
[19:02:39] Zai00: has joined #ruby
[19:03:38] fostertheweb: has joined #ruby
[19:03:53] Ox0dea: </lesson>
[19:06:00] pokmo: has joined #ruby
[19:07:18] towski__: has joined #ruby
[19:07:49] hahuang65: has joined #ruby
[19:08:03] jackjackdripper: has joined #ruby
[19:08:38] ordepdev: has joined #ruby
[19:10:16] ishahnaz: has joined #ruby
[19:12:11] wookiehangover: has joined #ruby
[19:14:27] v4mpii: has joined #ruby
[19:14:37] n008f4g_: has joined #ruby
[19:14:49] iszak: has joined #ruby
[19:14:49] iszak: has joined #ruby
[19:14:55] bluOxigen: has joined #ruby
[19:17:49] prestojunkie93: has joined #ruby
[19:18:15] ramfjord: has joined #ruby
[19:19:06] jobewan: has joined #ruby
[19:19:24] momomomomo_: has joined #ruby
[19:19:27] jsuth: has joined #ruby
[19:21:47] juanpablo_: has joined #ruby
[19:22:36] choke: has joined #ruby
[19:23:41] juanpablo_: has joined #ruby
[19:24:26] kidoz: has joined #ruby
[19:24:53] howdoicomputer: has joined #ruby
[19:25:53] mary5030: has joined #ruby
[19:27:10] bungoman: has joined #ruby
[19:27:12] mjuszczak: has joined #ruby
[19:27:53] Hijiri: has joined #ruby
[19:28:08] djbkd: has joined #ruby
[19:28:12] lucyinthesky: has joined #ruby
[19:30:54] graydot: has joined #ruby
[19:32:34] lucyinthesky: has left #ruby: ("Leaving")
[19:33:13] ordepdev_: has joined #ruby
[19:34:03] linuxboy_: has joined #ruby
[19:35:00] krisquigley: has joined #ruby
[19:37:09] lucyinthesky: has joined #ruby
[19:39:47] siaW: any help here? https://gist.github.com/siaw23/1b4ae905cd19293d1e56
[19:40:53] renderful: has joined #ruby
[19:41:27] karapetyan: has joined #ruby
[19:41:47] havenwood: siaw: Just a `str.chars` is shorthand for the more verbose `str.each_char.to_a`: http://ruby-doc.org/core/String.html#method-i-chars
[19:42:06] havenwood: siaw: I'd suggest not using methods with a `!` on the end for now.
[19:43:23] acke: has joined #ruby
[19:43:27] havenwood: >> ['1', '2', '3'].map &:to_i
[19:43:28] ruboto: havenwood # => [1, 2, 3] (https://eval.in/433130)
[19:43:39] havenwood: >> ['1', '2', '3'].map { |n| n.to_i }
[19:43:41] ruboto: havenwood # => [1, 2, 3] (https://eval.in/433131)
[19:44:40] havenwood: siaw: There's an example of the shorthand or longhand for mapping an Array of Strings to a corresponding Array of Integers.
[19:44:45] Ox0dea: >> "\1\2\3".unpack 'c*'
[19:44:46] ruboto: Ox0dea # => [1, 2, 3] (https://eval.in/433132)
[19:44:50] diegoviola: what are your thoughts on crystal?
[19:44:56] Ox0dea: It's the best thing ever.
[19:45:19] NeverDie: has joined #ruby
[19:46:04] siaW: havenwood: thanks???
[19:46:55] p0wn3d_: has joined #ruby
[19:47:13] xaxisx: has joined #ruby
[19:47:33] kadoppe: has joined #ruby
[19:47:41] siaW: havenwood: question in the comment for you https://gist.github.com/siaw23/1b4ae905cd19293d1e56
[19:47:51] yfeldblum: has joined #ruby
[19:48:45] cschneid_: has joined #ruby
[19:49:27] cschneid_: I'm well aware of how ancient and unsupported ruby 1.8.7 is, but does anybody know how to get rvm to install it? I need to get some unmigrated code to run so I can look at bringing it up. RVM just bails and is unable to find a download url
[19:51:55] godfat1: has joined #ruby
[19:52:11] miah: `ruby-install ruby 1.8.7` works just fine
[19:52:16] miah: (its not rvm though)
[19:52:28] baweaver: has joined #ruby
[19:52:30] Ox0dea: cschneid_: Does RVM not accept tarballs?
[19:52:50] cschneid_: miah: that may be good enough for my purposes. hmm.
[19:53:03] Ox0dea: siaw: For all intensive porpoises, `&:foo` is functionally equivalent to `{ |x| x.foo }`, syntactically speaking.
[19:53:09] cschneid_: Ox0dea: I did it like that previously and I got it in a super odd state where ruby was there, but gem was horrifically misconfigured so it wans't all that useful
[19:53:23] Ox0dea: cschneid_: Lovely. Consider using a different version manager. :P
[19:53:33] devoldmx: has joined #ruby
[19:53:40] cschneid_: heh. they all seem to have their own gotchas. I do end up rotating between em...
[19:55:07] Ox0dea: cschneid_: What deficiency have you found with chruby?
[19:55:22] casadei_: has joined #ruby
[19:55:46] cschneid_: I actually have not tried that one.
[19:55:52] cschneid_: wonder how much effort it'd be to give it a go
[19:55:57] Ox0dea: Virtually none.
[19:56:05] Ox0dea: chruby + ruby-install = sanity and <3.
[19:56:25] lucyinthesky: has left #ruby: ("Leaving")
[19:56:26] leat1: has joined #ruby
[19:56:31] Ox0dea: postmodern for president.
[19:57:34] rdark: has joined #ruby
[19:57:56] p0wn3d_: has joined #ruby
[19:58:17] havenwood: Ox0dea: I look forward to merging the cache branch in ruby-install. Icing!
[19:59:13] havenwood: I think postmodern's idea to separate metadata out to its own ruby-versions repo is swell.
[20:00:05] havenwood: I've been using the cache branch for a while. If anyone wants to test it out it's just missing some tests to be finished: https://github.com/postmodern/ruby-install/tree/cache
[20:00:06] cschneid_: :-/ and 1.8.7 doesn't build for me.
[20:00:14] havenwood: cschneid_: 1.8.7 isn't supposed to build. :P
[20:00:21] havenwood: cschneid_: OS/distro?
[20:00:28] cschneid_: but it'd be nice if it did :) OSX / 10.10
[20:00:33] cschneid_: it's an openssl mismatch I think
[20:00:49] havenwood: cschneid_: It requires a number of broken old deps and then patches.
[20:00:59] symm-_: has joined #ruby
[20:01:17] cschneid_: havenwood: so annoying. Maybe I'll install an old ubuntu into a VM and grab the package.
[20:01:23] cschneid_: avoid mucking w/ my host system any more
[20:01:27] tejasmanohar: has joined #ruby
[20:01:29] Musashi007: has joined #ruby
[20:01:33] havenwood: cschneid_: I can point you at a ruby-install that supports 1.8, if I must.
[20:01:38] havenwood: cschneid_: But uhg!
[20:01:38] allomov: has joined #ruby
[20:01:58] cschneid_: ugh indeed. damn forward march of progress.
[20:02:50] Ox0dea: cschneid_: Try 0.49?
[20:02:56] Illusioneer: has joined #ruby
[20:03:05] Ox0dea: https://github.com/charliesome/historical-rubies
[20:03:19] pastuxso: has joined #ruby
[20:03:56] havenwood: cschneid_: brew tap homebrew/versions && brew install ruby187
[20:04:08] diegoviola: havenwood: what's the cache branch for
[20:04:42] havenwood: diegoviola: The metadata for checksums and versions now all lives in: https://github.com/postmodern/ruby-versions
[20:04:49] pastuxso: has left #ruby: ()
[20:05:33] havenwood: diegoviola: Right now from time to time I sync it over to ruby-install. If you want to update it without updating ruby-install you need to run a make task, that is really meant for release purposes.
[20:05:57] havenwood: diegoviola: In the cache branch ruby-install will check timestamps and update various branches intelligently.
[20:06:03] fantazo: has joined #ruby
[20:06:04] cschneid_: thanks guys. I'll need to check out chruby when I'm not under time pressure :)
[20:06:08] havenwood: diegoviola: So new Rubies just appear as you try to install them.
[20:06:38] havenwood: cschneid_: The brew 1.8 would be the easiest route. If you'd like to get it working with ruby-install or rvm I'd be happy to help in #chruby or #rvm.
[20:07:15] cschneid_: later, I'm punting on it for now in favor of a slightly different approach. I am using 1.9, which isn't what they're using, but hoping that the issue crops up on that too
[20:07:18] cschneid_: we shall see.
[20:07:21] siemprefresco: has joined #ruby
[20:07:22] haxrbyte: has joined #ruby
[20:07:25] rdark: has joined #ruby
[20:07:51] haxrbyte_: has joined #ruby
[20:08:06] deol: has joined #ruby
[20:08:57] Illusioneer: I am running into something rather odd. If I put a string that includes some local env's it prints in IRB but not in a running ruby script.
[20:09:12] chills42_: has joined #ruby
[20:09:21] mary5030: has joined #ruby
[20:09:26] Illusioneer: ie: puts "This is a test of #{ENV['ENVIRONMENT']"
[20:09:32] Illusioneer: this will work correctly in IRB
[20:09:46] Illusioneer: but if i run it as a ruby script, it does not show the ENV variable value
[20:10:02] eam: is that variable set?
[20:10:06] bootstrappm: Illusioneer: is it just certain environment variables or is the whole ENV hash empty?
[20:10:26] Ox0dea: Illusioneer: Do you have an .irbrc?
[20:10:40] p0wn3d_: has joined #ruby
[20:10:43] mary5030: has joined #ruby
[20:10:45] Illusioneer: bootstrappm: i've tried it with several of my ENV's none of them show
[20:10:53] Illusioneer: Ox0dea: probably not, what's taht?
[20:10:59] Ox0dea: Illusioneer: Never mind, then.
[20:11:16] Ox0dea: Illusioneer: $ ruby -e 'p ENV.empty?'
[20:11:17] bootstrappm: several of "your" envs? how are you setting them?
[20:11:21] Ox0dea: I highly doubt that prints `true`.
[20:11:33] havenwood: Illusioneer: Are you exporting the env vars?
[20:11:45] Illusioneer: bootstrappm: They are set in my profile.d shell that sets them, and they are available in my shell
[20:11:54] Illusioneer: havenwood: no just accessing the values
[20:12:00] zotherstupidguy: has joined #ruby
[20:12:02] eam: Illusioneer: how are you running your ruby script? From an interactive shell? Is sudo involved?
[20:12:15] Ox0dea: Illusioneer: You'll want to use `export FOO=BAR` in your profile.d.
[20:12:17] Illusioneer: sudo is involved
[20:12:22] eam: sudo is clearing them
[20:12:22] havenwood: Illusioneer: As in try `export ENVIRONMENT` before running your script (just thinking it's a child process that isn't inheriting the env).
[20:12:33] eam: bootstrappm: it's not export- otherwise irb wouldn't pick them up either
[20:12:33] havenwood: Ha, env dropped.
[20:12:39] bootstrappm: eam good call
[20:13:03] Ox0dea: Illusioneer: You're invoking your Ruby script with `sudo`, then?
[20:13:06] Illusioneer: yeah sudo's involved because the script runs some things that require root level priv
[20:13:07] havenwood: Illusioneer: Using a Ruby version manager?
[20:13:11] eam: Illusioneer: you can whitelist env in your sudo config (but, probably a bad direction to go)
[20:13:33] eam: sudo -i will re-run the login stuff for the user you're becoming
[20:13:39] eam: so if you've added it to /etc/profile.d ...
[20:13:45] dfockler: has joined #ruby
[20:13:45] Illusioneer: It is in the profile.d
[20:13:50] eam: try sudo -i
[20:13:59] bootstrappm: Illusioneer you could also wrap the call to ruby with a shell script where you set those variables and sudo run the shell script
[20:14:00] Ox0dea: eam: Not `sudo -E`?
[20:14:12] Illusioneer: good idea bootstrappm
[20:14:24] eam: Ox0dea: -E is config dependent
[20:14:37] eam: (I think?)
[20:14:38] Illusioneer: I've done that in some other situations, it was the fact that it showed up in IRB but not in the script that was tripping me up
[20:14:40] Ox0dea: But it'll retain the environment he's already got from his profile.d?
[20:14:55] eam: Ox0dea: if the config gives perms to do so
[20:15:01] Ox0dea: Ah, right.
[20:15:44] eam: I really don't like suod
[20:15:48] yfeldblum: has joined #ruby
[20:16:09] Ox0dea: Tell us how you feel about `machinectl`.
[20:16:24] eam: systemd :(
[20:16:34] Ox0dea: SystemXVI is coming to save us. /s
[20:16:56] bootstrappm: what do you use as an alternative to sudo eam?
[20:17:06] eam: bootstrappm: I prefer to use sshd as the priv escalation mechanism
[20:17:19] eam: sudo is very password oriented and IMO encourages insecure patterns
[20:17:38] eam: though there are some good plugins (one of which I wrote!) which let it be used with better mechanisms than a password
[20:17:41] Illusioneer: eam: kudos, the -i did it
[20:18:00] Ox0dea: So how did irb manage to get hold of the right environment?
[20:18:08] baweaver: has joined #ruby
[20:18:11] eam: he didn't sudo irb
[20:18:37] Illusioneer: my bad I should've been more precise :)
[20:18:53] Ox0dea: eam: Is one of those better mechanisms using escape sequences to draw my "pass picture" at the terminal?
[20:19:03] Ox0dea: Because I've thought that should be a thing for some time now.
[20:19:22] Ox0dea: But then authenticity becomes a heuristic, and that can't be good.
[20:19:23] eam: recommend not depending on bash startup scripts to set env for services btw - instead I'd use something like djb's envdir
[20:19:32] eam: (or the runit equiv, though runit's stuff is kinda crap)
[20:19:33] mjuszczak: has joined #ruby
[20:19:55] eam: Ox0dea: http://pamsshagentauth.sourceforge.net/ or https://github.com/square/pam_krb5_ccache
[20:20:07] eam: auto sudo via your ssh key
[20:20:22] eam: sending secrets over the wire to the remote system is insanity
[20:20:50] eam: I'd use pam_ssh_agent_auth
[20:21:02] eam: but even better, just use sshd as your escalation mechanism
[20:21:10] eam: remove all setuid binaries from your system!
[20:21:20] ordepdev: has joined #ruby
[20:21:35] bootstrappm: how does using sshd as your escalation mechanism work eam? I just googled but didn't find anything usefl
[20:21:38] eam: (that's how I run my personal servers)
[20:21:39] bootstrappm: ssh into localhost under another user?
[20:21:48] eam: bootstrappm: yeah ssh root@localhost cmd
[20:22:07] dgs: has joined #ruby
[20:22:13] bootstrappm: what's the benefit of that? commands logged?
[20:22:31] eam: there are basically two ways you can become root: 1) run a setuid program that brokers access to the subprocess running as root, or 2) connect to an already-running root process (sshd)
[20:23:12] eam: bootstrappm: the benefit is no setuid binaries (common attack vector), and by not using a password you prevent someone from taking your authentication secrets
[20:23:30] eam: when you ssh somewhere and type "sudo whatever" you've sent your password to the remote system -- and the remote system can copy it
[20:23:36] eam: can't be done with ssh-keys
[20:23:41] eam: since it's challenge-response
[20:23:44] Ox0dea: Wonder why `umount` is setuid.
[20:24:05] eam: Ox0dea: to make it friendly for non-root users; there's lots of bad stuff like that common in many distros
[20:24:13] eam: all unnecessary
[20:24:22] krisquigley: has joined #ruby
[20:24:31] eam: though sometimes people get grumpy about not being able to run ping or traceroute
[20:25:40] BraddPitt: Anyone know how to expect an error with a Minitest spec?
[20:27:12] bootstrappm: can you still use standard assertions with minitest spec BraddPitt? If so, assert_raises
[20:27:21] havenwood: BraddPitt: asset_raises
[20:27:32] nanoz: has joined #ruby
[20:27:48] BraddPitt: do I chain that to my method call or pass it a block with my method call?
[20:28:28] havenwood: BraddPitt: assert_raises(NoMethodError) { @traits.foo }
[20:28:40] havenwood: BraddPitt: http://www.mattsears.com/articles/2011/12/10/minitest-quick-reference
[20:28:50] BraddPitt: thanks havenwood
[20:28:55] havenwood: BraddPitt: you're welcome
[20:31:03] p0wn3d_: has joined #ruby
[20:31:30] mrtomme: has joined #ruby
[20:31:53] blackmesa: has joined #ruby
[20:33:22] benlieb: has joined #ruby
[20:36:08] VeryBewitching: has joined #ruby
[20:36:11] bdnchr: has joined #ruby
[20:36:14] opensource_ninja: has joined #ruby
[20:38:08] DLSteve_: has joined #ruby
[20:41:02] momomomomo_: has joined #ruby
[20:41:07] uris: has joined #ruby
[20:41:50] pastuxso: has joined #ruby
[20:43:24] Coldblackice: has joined #ruby
[20:45:05] JDiPierro: has joined #ruby
[20:46:01] BraddPitt: ah, I had misconfigured my specs
[20:46:37] BraddPitt: I was tearing down after every spec, instead of after all specs. So the error I needed caught was caught, but it was re-raised in the subsequent spec
[20:46:42] BraddPitt: anyways, figured it all out now. Thanks guys
[20:52:06] NeverDie: has joined #ruby
[20:52:28] fostertheweb: has joined #ruby
[20:55:38] SCHAAP137: has joined #ruby
[20:56:06] haxrbyte: has joined #ruby
[20:56:08] dgutierrez1287: has joined #ruby
[20:56:32] siaW: help here please https://gist.github.com/siaw23/1b4ae905cd19293d1e56
[20:57:45] baweaver: splat arguments don't work on strings
[20:58:07] baweaver: and line 2 just makes an array with 'string' as a literal value
[20:58:21] baweaver: if only there were a method to break apart a string into an array
[20:58:24] osmansekerlen: has joined #ruby
[20:58:27] baweaver: and it existed on the string class
[20:58:28] haxrbyte_: has joined #ruby
[20:58:39] siaW: https://gist.github.com/siaw23/1b4ae905cd19293d1e56
[20:58:40] BraddPitt: baweaver it would be nice if we could SPLIT apart that string
[20:58:51] Ox0dea: BraddPitt: Or obtain its CHARS.
[20:59:01] siaW: got disconnected. have to repost. any help? https://gist.github.com/siaw23/1b4ae905cd19293d1e56
[20:59:03] baweaver: I saw it the first time siaw
[20:59:16] siemprefresco: has joined #ruby
[20:59:27] baweaver: didn't show as disconnected
[20:59:41] baweaver: if only there were a method to break apart a string into an array though...
[20:59:46] Ox0dea: siaw: You're really not paying attention to what $thing is trying to teach you. :/
[21:00:22] baweaver: also, we're not going to give you any straight answers on what looks like homework
[21:00:22] haxrbyte_: has joined #ruby
[21:00:52] michaeldeol: has joined #ruby
[21:00:58] Pupeno: has joined #ruby
[21:01:03] baweaver: we'll give you hints, but you're going to do the work here.
[21:01:03] siaW: Ox0dea: i got disconntected
[21:01:16] haxrbyte_: has joined #ruby
[21:01:31] Ox0dea: siaw: Do you mind my asking which resource(s) you're using to learn Ruby?
[21:01:41] Ox0dea: baweaver: Do you reckon there was some rationale behind the current absence of a refinement hook?
[21:02:09] baweaver: vague on refinements so couldn't comment intelligibly at this point in time.
[21:02:25] jenrzzz_: has joined #ruby
[21:02:44] siaW: Ox0dea: read ???well grounded rubyist??? a year ago
[21:02:49] Ox0dea: Bollocks.
[21:02:53] siaW: Ox0dea: what do you recommend?
[21:03:04] baweaver: actually read it, cover to cover
[21:03:10] Ox0dea: Read, not lick.
[21:03:27] BraddPitt: are you telling me knowledge by osmosis doesn't work?
[21:03:48] baweaver: BraddPitt: come over to SF, I'll hit you repeatedly with TWGR until it absorbs :D
[21:03:59] BraddPitt: I live in SF baweaver
[21:04:07] BraddPitt: I think we talked about this a while ago
[21:04:13] baweaver: I forget things.
[21:04:14] siaW: baweaver: hahaha it???s not homework. i???m challenging myself with tasks on codewars.com
[21:04:18] haxrbyte: has joined #ruby
[21:04:20] siaW: baweaver: so please help if you can :)
[21:04:26] baweaver: Ah, yes, coffee things in SF later.
[21:04:29] baweaver: need to get that planned
[21:04:39] baweaver: siaw: read through the documentation of the String class
[21:04:42] baweaver: it's all in there.
[21:04:53] siaW: baweaver: ok :)
[21:05:05] dr3w: has joined #ruby
[21:05:12] BraddPitt: baweaver do work in SF?
[21:05:18] baweaver: gotta split though, cheers
[21:05:50] Ox0dea: siaw: Watch this tutorial: https://www.youtube.com/watch?v=GlKL_EpnSp8&t=29
[21:06:09] siaW: Ox0dea: thanks ;)
[21:06:14] Ox0dea: siaw: Happy to help.
[21:06:44] BraddPitt: nice, ttyl babysnoop
[21:06:52] splud: I used to head into SF for some F2F meets with webbies.
[21:07:11] splud: Adam Savage was one, once upon a time.
[21:07:34] BraddPitt: I should go to some ruby meetups here
[21:07:42] BraddPitt: I'm just jumping back into the job search market
[21:07:53] splud: used to meet at Terrazzo Works, until they lost their lease. that was SOMA.
[21:08:20] havenwood: BraddPitt: Where are you looking?
[21:08:24] splud: going into SF though largely sucks these days. Long drive, bridge toll, then cost of parking.
[21:08:42] BraddPitt: Zendesk is my #1 right now havenwood
[21:08:51] havenwood: BraddPitt: In SF?
[21:08:56] BraddPitt: my gf works at Twitter so I will be referred there as well, but I'm not sure how much ruby work they still do
[21:09:19] havenwood: I was just asked about a Rails dev in LA if anyone knows of anyone.
[21:09:35] bruno-: has joined #ruby
[21:10:17] Alayde_: has joined #ruby
[21:10:25] tacit7: has joined #ruby
[21:11:42] havenwood: BraddPitt: I thought their frontend was still all Rails, but maybe that's dated now. Dunno.
[21:11:57] momomomomo_: has joined #ruby
[21:12:36] BraddPitt: they still have ruby positions open
[21:12:37] amoeba`: has joined #ruby
[21:12:42] BraddPitt: but i'm not sure if its rails
[21:13:09] BraddPitt: I don't mind Rails work at all - even prefer it
[21:13:10] Alayde: has joined #ruby
[21:13:20] BraddPitt: The Zendesk position I want is for building out their API
[21:13:25] BraddPitt: which would be very fun I think
[21:13:34] splud: In a depressed job market, most people don???t mind _whatever_ work they can get <g>
[21:13:36] BraddPitt: but regardless I should keep networking with SF ruby people
[21:13:48] BraddPitt: Bay Area/SV developer job market is anything but depressed
[21:13:55] dfockler: What should I read after POODR, I feel like I just need to practice building things
[21:14:03] NeverDie: has joined #ruby
[21:14:26] splud: Man, that???s a bad vanity plate.
[21:14:39] lucyinthesky: has joined #ruby
[21:14:48] babysnoop: BraddPitt: what do you mean ttyl? did we chat before??
[21:14:58] but3k4: has joined #ruby
[21:15:01] BraddPitt: sorry babysnoop I didn't mean to ping you
[21:15:09] babysnoop: kk noworries
[21:15:10] BraddPitt: I meant to ping baweaver but he left and my client auto-completed your nick
[21:15:25] babysnoop: haha ok, all good
[21:15:33] BraddPitt: dfockler maybe just build things. Reading source would be great practice as well
[21:15:46] moeabdol: has joined #ruby
[21:17:12] dfockler: I wonder if there are anythings like architecture practice, but that seems so specific to the project, but I guess design patterns
[21:17:47] dfockler: maybe design patterns through the POODR lens
[21:17:57] Nahra: has joined #ruby
[21:17:58] amoeba`: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[21:18:02] BraddPitt: I still need to go through POODR
[21:18:07] BraddPitt: maybe thats a good project for this week
[21:18:19] dfockler: It reads through really well
[21:18:43] Ox0dea: dfockler: Like, there's words?
[21:19:45] dfockler: Like the author did a good job at making it readable
[21:19:51] lucyinthesky: has left #ruby: ("Leaving")
[21:19:53] Ox0dea: By using words?
[21:20:15] BlackCoyote: has joined #ruby
[21:20:22] Ox0dea: Don't most/all authors do that?
[21:20:40] centrx: has joined #ruby
[21:20:40] dfockler: If you think all programming books are readable, then sure
[21:21:22] al2o3-cr: has joined #ruby
[21:22:23] splud: The 90???s were loaded with dev books where they???d just have a few chapters on process, then document much of an API, which was out of date by the time the book went to press.
[21:22:29] rbowlby: has joined #ruby
[21:23:04] splud: You know, those 500+ page tomes that were supposed to make you go ???yea, that one, it looks like it???s worth the US$60 they???re charging for it!???
[21:23:36] capin: splud: yeah game done changed
[21:24:28] splud: Now languages and tools are popping up all over the place, and printed books are entirely out of date before they go to press.
[21:25:12] capin: yeah i think another JS framework came out today :P
[21:25:18] splud: Or, as in the case of a valgrind (debugging/profiling tool, not for Ruby) I ordered recently, was just a typeset and bound copy of the docs which come with the tool.
[21:25:50] splud: And it???s many revs old.
[21:25:57] rakm: has joined #ruby
[21:25:59] splud: I was a total sucker on that one.
[21:28:28] pastuxso: has left #ruby: ()
[21:29:02] casadei_: has joined #ruby
[21:29:43] n_blownapart: has joined #ruby
[21:30:08] djbkd: has joined #ruby
[21:30:50] warreng: has joined #ruby
[21:30:52] momomomomo: has joined #ruby
[21:32:41] dr3w: has joined #ruby
[21:34:45] havenwood: has joined #ruby
[21:35:11] siaW: can someone please https://gist.github.com/siaw23/1b4ae905cd19293d1e56
[21:36:02] bricker: siaw: you're close, the "p" method returns nil, just get rid of that
[21:36:59] siaW: bricker: thanks :)
[21:37:29] dorei: >> "apple ban".split.map {|x| "#{x} #{x.length}" }
[21:37:30] ruboto: dorei # => ["apple 5", "ban 3"] (https://eval.in/433157)
[21:37:54] lele: has joined #ruby
[21:38:27] jenrzzz: has joined #ruby
[21:39:48] nofxx: dorei, prefer size over length
[21:40:16] nofxx: That's valid for strings too btw? It's the only obj I still uses lenght... somehow makes more sense. Strings only.
[21:40:44] dorei: is there any difference between #size and #length ?
[21:40:59] nofxx: dorei, nope, just looks way better. [1,2,3].size
[21:41:07] nofxx: and reads too
[21:41:29] nofxx: dorei, it's from rubocop guidelines
[21:41:30] momomomomo_: has joined #ruby
[21:41:33] allomov: has joined #ruby
[21:41:37] nofxx: dorei, https://github.com/bbatsov/ruby-style-guide
[21:41:50] bricker: dorei: they both call the same C function. I like length, I don't know why
[21:42:10] bricker: "size" for array, "length" for String
[21:42:18] nofxx: bricker, haha same ^
[21:42:32] nofxx: but I'm ok with size for all. Shorter anyways ;)
[21:42:43] Ox0dea: Plus consistency.
[21:43:18] Ox0dea: String is essentially a collection type, so whatever logic you apply to arrays holds well enough.
[21:43:27] dfockler: Yeah this isn't Java!
[21:43:47] bricker: This is interesting, String#size and String#length is NOT an alias, however Array#size and Array#length IS an alias
[21:43:58] bricker: Array#length is the real deal, "size" is an alias
[21:44:34] Ox0dea: bricker: String#size and #length are defined by the same C function, so it's effectively the same thing.
[21:44:34] jhass: not all aliases are properly marked as such
[21:44:52] SCHAAP137: has joined #ruby
[21:44:54] Kero: has joined #ruby
[21:45:01] dfockler: ah I was thinking string length had something to do with Unicode codepoints
[21:45:30] jhooker: has joined #ruby
[21:45:37] dorei: both String#size and String#length are rb_str_length(VALUE str)
[21:46:05] shevy: we are the C source readers!
[21:46:31] dorei: shevy: not me, pry did it for me :p
[21:46:40] bricker: Ox0dea: I know, but an alias is extra stuff that the program has to do. And I wonder why the inconsistency.
[21:48:15] phutchins: has joined #ruby
[21:49:42] blueOxigen: has joined #ruby
[21:50:01] shinnya: has joined #ruby
[21:50:30] nux443: has joined #ruby
[21:51:07] Musashi007: has joined #ruby
[21:53:27] cameronmalek_: has joined #ruby
[21:53:40] Ox0dea: bricker: Whence comes your intuition that aliasing gives the interpreter more work to do than having to track another entry in the method table?
[21:54:17] devoldmx: has joined #ruby
[21:58:06] bricker: Ox0dea: more up-front cost. it's negligible of course, I
[21:58:10] bricker: just curious
[21:58:51] Ox0dea: bricker: How did you calculate that?
[21:58:56] bricker: I'm sure there's a good reason why one is an alias and the other isn't
[21:59:11] banister: has joined #ruby
[21:59:12] Ox0dea: No, it's probably completely arbitrary; it's not really a user-visible distinction.
[21:59:15] bricker: Ox0dea: by counting the number of methods that have to be called to define an alias vs. not defining an alias
[21:59:21] bricker: "1", "2", etc.
[21:59:28] arashb: has joined #ruby
[21:59:41] bricker: Ox0dea: by counting the number of methods that have to be called to define an alias vs. not defining an alias
[21:59:43] Ox0dea: We're still talking about MRI, right?
[21:59:47] bricker: "1", "2", etc.
[22:00:16] jobewan: has joined #ruby
[22:00:38] Ox0dea: You can't honestly purport to believe that '"1", "2", etc.' clarified your point in any way.
[22:01:13] bricker: Ox0dea: and "huh?" is a productive question?
[22:01:14] zotherstupidguy: has joined #ruby
[22:01:26] decoponio: has joined #ruby
[22:01:40] Ox0dea: bricker: Had you taken it at its idiomatic meaning of "please clarify", yes, we could've gotten much further by now.
[22:02:49] bricker: Ox0dea: For ruby to say ruby method "size" is an alias of ruby method "length", takes more work than to say ruby method "size" should just call "rb_ary_length"
[22:03:02] Ox0dea: bricker: But on what are you basing that conclusion?
[22:03:23] siaW: has left #ruby: ()
[22:03:24] Ox0dea: Did you look at the call chains for rb_define_method() and rb_define_alias()?
[22:03:26] bricker: Ox0dea: I counted the number of things that ruby has to do in order to define an alias ("1", "2", etc.)
[22:03:35] bricker: Ox0dea: that's right
[22:03:43] Ox0dea: bricker: How many things does Ruby have to do to define an alias?
[22:03:47] platosha: has joined #ruby
[22:03:48] linuxboytoo: has joined #ruby
[22:03:54] Fire1o6: has joined #ruby
[22:03:54] code1o6: has joined #ruby
[22:04:08] ndrei: has joined #ruby
[22:04:29] bricker: Ox0dea: Count them and get back to me :)
[22:04:59] nettoweb: has joined #ruby
[22:05:03] Ox0dea: You seem to be butthurt about (inadvertently?) ending up out of your depth, which is really not an admirable approach to such a dilemma. You are advised to stick a bandage on it and grow.
[22:05:34] bricker: Ox0dea: good advice
[22:06:41] baweaver: has joined #ruby
[22:06:46] bricker: Ox0dea: so what's the answer? which one is more work
[22:07:20] Ox0dea: bricker: I've not looked into the matter; that's sort of why I asked you?
[22:07:37] shevy: you people have no answers!
[22:07:40] bricker: Ox0dea: so you don't know but you're telling me I'm wrong?
[22:07:58] jhass: shevy: sounds like you want to point away from yourself
[22:08:00] Ox0dea: bricker: When did I tell you you were wrong? I merely asked you to substantiate your claim.
[22:08:10] jhass: shevy: how's your crystal going btw?
[22:08:37] etvr: has joined #ruby
[22:08:46] bricker: Ox0dea: I guess you never said I was wrong. I guess I don't care enough to find out the actualy answer myself, I made an assumption.
[22:08:59] Ox0dea: bricker: And you made an ass of yourself; you were warned about that in grade school.
[22:09:13] shevy: jhass I am not even sure what's going on here, I sort of am half-sleeping already; I dunno, I got side-tracked again, I have one project where I have to understand tcl sufficiently well to help implement some cluster using http://modules.sourceforge.net/ :(
[22:09:14] bricker: Ox0dea: Did I?
[22:09:35] shevy: so not really the time for more crystal right now
[22:10:08] bootstrappm: is it just me or is there more arguing in #ruby than there used to be?
[22:10:28] Ox0dea: bricker: Did you not fail to pretend to have a thorough understanding of MRI's method definition and aliasing costs?
[22:11:24] bricker: Ox0dea: I don't think so
[22:11:29] Ox0dea: You did, though.
[22:12:07] jhass: shevy: gosh, you still use sourceforge?
[22:13:03] malconis: has joined #ruby
[22:13:24] Ox0dea: bricker: In any case, rb_define_alias() essentially just sticks a reference in the right place, whereas rb_define_method() creates a completely new entry in the class's method table; it's not hard to intuit which is cheaper.
[22:14:00] Ox0dea: > For ruby to say ruby method "size" is an alias of ruby method "length", takes more work than to say ruby method "size" should just call "rb_ary_length"
[22:14:01] bricker: Ox0dea: good to know, thanks for the lesson
[22:14:18] otacon-: has joined #ruby
[22:14:37] bricker: Ox0dea: then I wonder why String doesn't define an alias
[22:14:38] shevy: jhass I didn't pick the project, others picked it, supposedly because module makes it convenient to load up programs along with working environment variables at the same time
[22:14:43] Ox0dea: bricker: Whimsy.
[22:14:46] Hrorek: has joined #ruby
[22:14:47] bricker: Ox0dea: must be
[22:15:06] baweaver: has joined #ruby
[22:15:15] Ox0dea: bricker: Let's defer to shevy and blame it on the Japanese.
[22:15:44] shevy: I don't blame the japanese
[22:15:45] shevy: I blame Ox0dea
[22:15:48] uris: has joined #ruby
[22:16:05] shevy: his snowman project lacks documentation
[22:16:27] Ox0dea: It's not even the right season yet.
[22:16:39] shevy: coming closer... it's raining every day here
[22:16:48] Ox0dea: Rain == winter?
[22:16:59] Ox0dea: > Then I don't need a jacket.
[22:17:01] shevy: well it's upcoming, just need a bit more cold
[22:17:01] jhass: in germany? yeah
[22:19:23] BenjiWiebe: has joined #ruby
[22:20:16] BenjiWiebe: I've got a mindblock. Does Ruby SQLite3's bind_param bind by value or reference?
[22:20:27] BenjiWiebe: e.g. can i update the bound variables and re-execute it?
[22:20:36] BenjiWiebe: so it will use the new variables?
[22:21:05] bootstrappm: its winter in guatemala :P
[22:21:08] JoshuaPaling: has joined #ruby
[22:21:08] Pupeno: has joined #ruby
[22:21:12] bootstrappm: i.e. rainy season
[22:21:32] musl: has joined #ruby
[22:22:21] YourMomsName: has joined #ruby
[22:22:54] benlieb: has joined #ruby
[22:23:30] YourMomsName: has left #ruby: ()
[22:25:59] Hrorek: has joined #ruby
[22:27:57] Ox0dea: BenjiWiebe: What kind of values are you binding?
[22:28:29] workmad3: has joined #ruby
[22:29:57] Ox0dea: In any case, the answer is almost certainly no. You can't bind Arrays or Hashes, and the bind_param() function makes a copy for Strings.
[22:30:07] mikecmpbll: has joined #ruby
[22:31:20] Tuxero: has joined #ruby
[22:32:43] zenguy_pc: has joined #ruby
[22:32:59] dfockler: has joined #ruby
[22:33:07] allomov: has joined #ruby
[22:33:25] acke: has joined #ruby
[22:36:30] NeverDie: has joined #ruby
[22:36:32] dr3w: has joined #ruby
[22:39:03] FernandoBasso: has joined #ruby
[22:40:46] drewo: has joined #ruby
[22:42:32] am11: has joined #ruby
[22:42:46] BenjiWiebe: Ox0dea: Well, I managed to figure out that the answer is actually yes.
[22:42:54] BenjiWiebe: At least for strings and integers.
[22:43:00] jobewan: has joined #ruby
[22:43:13] BenjiWiebe: so...it did *not* make a copy for Strings.
[22:43:17] sdothum: has joined #ruby
[22:43:34] tcopeland: has joined #ruby
[22:43:42] Rover: has joined #ruby
[22:43:47] mary5030_: has joined #ruby
[22:44:40] am11: hello people.
[22:45:50] Ox0dea: BenjiWiebe: http://git.io/vZShU
[22:45:56] Ox0dea: I suppose I must've misread that line.
[22:46:12] Ox0dea: It's binding the result of that call to FIX2LONG(), no?
[22:46:16] mjuszczak: has joined #ruby
[22:46:33] unholycrab: has joined #ruby
[22:46:37] Ox0dea: I don't see how re-assigning the bound variable would affect that.
[22:46:51] am11: I'm having some difficulty in converting some ruby style regex expressions (gsub subsituations) to an ANSI C lib friendly ones, can anyone help with this regex conversion chore?
[22:46:59] JDiPierro: has joined #ruby
[22:47:20] Ox0dea: am11: "ANSI C" isn't a regular expression engine.
[22:47:24] zenspider: am11: consultants can, for a fee
[22:47:25] Ox0dea: Do you mean PCRE?
[22:47:31] zenspider: ACTION is a consultant
[22:47:44] baweaver: zenspider: I see what you did there
[22:47:46] am11: I am using SLRE
[22:47:56] eam: I'm sure he means POSIX RE, not ANSI
[22:48:05] am11: https://github.com/cesanta/slre/
[22:48:17] am11: I mean real ISO C RE ;)
[22:48:26] Ox0dea: am11: Are you sure you're not using some feature of Onigmo that simply can't be emulated by SLRE?
[22:49:12] Rover: has joined #ruby
[22:49:14] am11: I am trying to convert these 7 lines of code: https://github.com/sass/sass-spec/blob/master/lib/sass_spec/test_case.rb#L69-L75
[22:49:43] am11: SLRE apparently doesn't provide multiline support so /m is off the table, need to figure out some other way.. :)
[22:50:22] Ox0dea: Sprinkle a few '\n's here and there.
[22:51:33] zenspider: why are you porting that to C????
[22:51:36] eam: am11: that's not an ANSI RE, that's a custom RE engine written in ANSI C
[22:51:41] nateberkopec: has joined #ruby
[22:51:47] eam: I don't think many will be familiar with it
[22:52:07] CloCkWeRX: has joined #ruby
[22:52:08] CloCkWeRX: has left #ruby: ()
[22:52:10] am11: yeah that's the plan. The thing is i am converting this ruby test runner for libsass in pure C. i am done with most part, this is the last obstacle.
[22:52:32] Ox0dea: am11: But why are you doing this?
[22:52:39] am11: yes libsass is C/C++ impl of ruby-sass
[22:53:03] Ox0dea: am11: http://git.io/vZSjy
[22:53:03] zenspider: that doesn't mean that the sass-spec needs to be ported, does it?
[22:53:05] rakm: has joined #ruby
[22:53:11] zenspider: I'd use pcre, personally
[22:53:44] am11: currently libsass rely on this ruby-runner
[22:54:02] am11: the issue is, there is tons of functionality untested this way.
[22:54:09] ledestin: has joined #ruby
[22:54:16] mwlang: has joined #ruby
[22:55:00] BenjiWiebe: Ox0dea: My guess is that Ruby/SQLite3 creates a brand new SQLite3 object each time you execute?
[22:55:01] am11: for instance, error handling can't bet tested, source-maps generation, API internal and since so forth.. which is why we are aiming for consuming native test f/w.
[22:55:03] devoldmx: has joined #ruby
[22:55:14] BenjiWiebe: So that the bind_param by reference is being emulated by the Ruby?
[22:55:23] BenjiWiebe: Because it *does* work.
[22:55:28] Ox0dea: BenjiWiebe: Aye, that follows easily enough.
[22:56:14] am11: sass-spec will be used as fixtures repo only. only the runner would be native. :)
[22:56:26] BenjiWiebe: Ox0dea: Actually, I think it is simply that sqlite3_bind_int64 is re-run each time execute is called.
[22:56:32] BenjiWiebe: That's all it would take.
[22:56:32] Ox0dea: am11: I linked you to a patch that adds multiline to SLRE.
[22:57:06] BenjiWiebe: Ox0dea: idk...anyways, it works, somehow or another.
[22:57:09] Ox0dea: BenjiWiebe: To clarify, you've got `foo = 42`, you bind it, and then you `foo = 43`, and the binding reflects the update?
[22:57:27] Ox0dea: Something's missing out of the middle, I should think.
[22:58:51] Ox0dea: That was an oversimplification, of course, but it's essentially what you're suggesting works.
[22:58:56] khebbie: has joined #ruby
[22:59:00] Ox0dea: If it does, I'd like to learn the spell.
[22:59:29] BenjiWiebe: Ox0dea: here is a link to the code http://pastebin.com/D0cHtjG6
[22:59:30] ruboto: BenjiWiebe, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/6e93f2973f4c6b79c86c
[22:59:30] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[22:59:45] BenjiWiebe: this is intended to be read by someone im teaching, so thats why the comments are as they are.
[22:59:50] BenjiWiebe: this is NOT my normal commenting style. :)
[22:59:59] zenspider: drbrain: I have a rake-compiler problem. When I build locally with rake, I wind up with lib/sdl/sdl.bundle, which seems fine. I require "sdl/sdl" to load it. But when I package and install via rubygems I get gems/graphics-1.0.0b4/ext/sdl/sdl.bundle and gems/graphics-1.0.0b4/lib/sdl.bundle and my require fails
[23:00:04] BenjiWiebe: look at lines 14-17
[23:00:21] BenjiWiebe: this code is to reformat a timestamp column in a db to iso8601, which it does successfully.
[23:00:55] Ox0dea: BenjiWiebe: Right, that makes sense. The bound parameter doesn't actually get evaluated until you execute.
[23:01:07] Ox0dea: I was thinking SQLite3 had managed to implement something along the lines of Fixnum#replace.
[23:01:13] BenjiWiebe: whats that? :)
[23:01:21] pwnd_nsfw: has joined #ruby
[23:01:21] ponga: has joined #ruby
[23:01:28] Ox0dea: Well, String#replace modifies the variable in-place.
[23:01:37] Ox0dea: >> foo = 'yay'; bar = foo; foo.replace 'boo'; bar
[23:01:38] ruboto: Ox0dea # => "boo" (https://eval.in/433170)
[23:01:52] Ox0dea: Swap the 'yay' and 'boo' depending on how that makes you feel. :P
[23:02:00] bigmac: has joined #ruby
[23:02:01] mary5030: has joined #ruby
[23:02:24] Ox0dea: You can do the same with Arrays and Hashes, but Fixnums are really just pointers under the hood, so being able to modify them in-place would've been quite a feat.
[23:02:38] BenjiWiebe: I think I catch on.
[23:02:43] zenguy_pc: has joined #ruby
[23:02:56] BenjiWiebe: Well, thanks!
[23:02:57] Ox0dea: So, to come to an answer to your question: by reference. :P
[23:03:20] BenjiWiebe: My problem is that I learned SQLite3 in PHP first...
[23:03:26] charliesome: has joined #ruby
[23:03:30] am11: Ox0dea: I just followed the link. Thank you. I have never worked with mercury, but i can def. figure out the code. :)
[23:03:30] Ox0dea: Well, you've still got prepared statements there, no?
[23:03:36] BenjiWiebe: So I wasn't sure if I could do the same steps in Ruby or not.
[23:03:41] Ox0dea: am11: The patch might even apply clean.
[23:03:45] Ox0dea: (Doubtful, though.)
[23:03:57] BenjiWiebe: Yes, SQLite3 + PHP has prepared statements.
[23:04:12] BenjiWiebe: And bound parameters can be updated/execute/updated/execute repeatedly.
[23:04:20] benlieb: has joined #ruby
[23:04:26] BenjiWiebe: Without re-preparing for each new row.
[23:04:37] BenjiWiebe: And also without re-binding. Only re-executing.
[23:06:06] SuMo_D: has joined #ruby
[23:08:41] zenspider: looks like drbrain isn't available
[23:08:51] zenspider: anyone else have experience with rake-compiler and extensions? this is odd.
[23:09:33] zenspider: problem: I have a rake-compiler problem. When I build locally with rake, I wind up with lib/sdl/sdl.bundle, which seems fine. I require "sdl/sdl" to load it. But when I package and install via rubygems I get gems/graphics-1.0.0b4/ext/sdl/sdl.bundle and gems/graphics-1.0.0b4/lib/sdl.bundle and my require fails.
[23:09:33] am11: Ox0dea: These libs (SLRE, PCRE) do not even provide the robust subsituate function OOTB. So far, I am testing the suite with the basic function provided in their unit test: https://github.com/cesanta/slre/blob/ace9f349/unit_test.c#L21-L46 (limitation: one and only one capture is supported)
[23:09:55] zenspider: am11: your problem isn't really ruby related.
[23:10:04] zenspider: or, specific to those C libraries
[23:11:51] robbyoconnor: has joined #ruby
[23:14:55] zenspider: BenjiWiebe: what's the problem?
[23:15:38] zenspider: https://github.com/sparklemotion/sqlite3-ruby/blob/master/faq/faq.yml#L83-L209
[23:16:43] kobain: has joined #ruby
[23:16:53] dopamean_: has joined #ruby
[23:18:10] mjuszczak: has joined #ruby
[23:18:57] mjuszczak: has joined #ruby
[23:20:55] juanpablo_: has joined #ruby
[23:22:52] mjuszczak: has joined #ruby
[23:23:11] dgutierrez1287: has joined #ruby
[23:24:51] Yzguy: has joined #ruby
[23:25:34] rickmasta: has joined #ruby
[23:26:49] jdawgaz: has joined #ruby
[23:30:24] bigmac: has joined #ruby
[23:34:24] r_baron: has joined #ruby
[23:34:59] luckyruby: has joined #ruby
[23:39:43] JimmyNeutron: has joined #ruby
[23:41:01] tkuchiki: has joined #ruby
[23:42:38] Ropeney: has joined #ruby
[23:43:03] Ox0dea: BenjiWiebe: Still about?
[23:44:41] darwingr: has joined #ruby
[23:45:51] K3VA: has joined #ruby
[23:47:19] taylorrf: has joined #ruby
[23:48:24] iamninja: has joined #ruby
[23:49:12] luckyme: has joined #ruby
[23:49:16] solocshaw: has joined #ruby
[23:49:24] jgt1: has joined #ruby
[23:49:45] benlieb: has joined #ruby
[23:53:55] bootstrappm: has joined #ruby
[23:54:29] darwingr: has joined #ruby
[23:55:16] K3VA: has left #ruby: ()
[23:55:22] karapetyan: has joined #ruby
[23:57:17] baweaver: has joined #ruby
[23:58:12] ereslibre: has joined #ruby
[23:58:12] ereslibre: has joined #ruby
[23:59:55] grenierm: has joined #ruby