« Back to channel list

#ruby - 07 October 2015

« Back 1 day Forward 1 day »
[00:00:25] gregf: has joined #ruby
[00:00:40] andersoldahl: has joined #ruby
[00:00:45] slash_nick: neither of those should return true though
[00:01:35] slash_nick: i don't get it shevy
[00:02:17] cdg: has joined #ruby
[00:02:27] slash_nick: wherps. baweaver ^^
[00:02:29] jaxxstorm: has joined #ruby
[00:02:51] slash_nick: >> [:baweaver] === [:baweaver]
[00:02:53] ruboto: slash_nick # => true (https://eval.in/445929)
[00:03:00] shevy: tis be true
[00:03:15] baweaver: === isn't defined on array explicitly
[00:03:20] shevy: perhaps ruby tries to assume that the full input is to match
[00:03:20] baweaver: it's the same as ==
[00:04:16] baweaver: as to why in the world someone would want that: case data when %w(it's in this set) then true end
[00:04:50] shevy: yeah. I usually use a leading * for these cases
[00:04:55] eam: >> x = rand(2**31); x.object_id === x * 2 + 1
[00:04:56] ruboto: eam # => true (https://eval.in/445930)
[00:05:00] shevy: when *HELP_OPTIONS; show_help
[00:05:17] slash_nick: when takes a list, so splat it baweaver
[00:05:31] tkuchiki: has joined #ruby
[00:05:47] shevy: splat the beaver, spank the beaver!
[00:06:12] lkba: has joined #ruby
[00:06:34] slash_nick: and don't forget to thank the beaver.
[00:07:11] jellyjellyrobot: has joined #ruby
[00:09:00] jellyjellyrobot: has joined #ruby
[00:09:03] Miron: has joined #ruby
[00:09:28] shevy: then we can prank the beaver
[00:09:40] inanepenguin: has joined #ruby
[00:09:54] andersoldahl: has joined #ruby
[00:09:56] zemmihates: has joined #ruby
[00:10:00] eam: too easy
[00:10:06] shevy: why don't we actually have something like the jvm on the whole OS level?
[00:10:16] eam: shevy: we do
[00:10:23] shevy: so like people could write in ruby but it would be lightning fast
[00:10:30] eam: well hang on
[00:10:38] craysiii: dont let go..
[00:10:44] eam: ruby being slow isn't related to needing something like the jvm
[00:11:27] jellyjellyrobot: has joined #ruby
[00:12:02] shevy: there is also a reason I state this right now; I just reinstalled my OS, went back to archaic slackware, but I find myself compiling stuff again
[00:12:12] shevy: with ruby scripts! but it still takes some time...
[00:12:25] calleerlandsson: has joined #ruby
[00:13:36] sulky: has joined #ruby
[00:14:24] riotjones: has joined #ruby
[00:15:22] ngscheurich: has joined #ruby
[00:15:56] andersh: has joined #ruby
[00:19:45] stardiviner: has joined #ruby
[00:19:55] Guest123456666: has joined #ruby
[00:20:46] ZucchiniZe: has joined #ruby
[00:22:16] goobagar: has joined #ruby
[00:23:44] Shoutsid: has joined #ruby
[00:25:10] iateadonut: has joined #ruby
[00:27:48] solocshaw: has joined #ruby
[00:28:13] TheWhip: has joined #ruby
[00:28:18] renderful: has joined #ruby
[00:29:04] `tim`: has joined #ruby
[00:30:18] nKulo: has joined #ruby
[00:35:36] Guest123456666: has joined #ruby
[00:43:02] platzhirsch: has left #ruby: ()
[00:43:52] rickmasta: has joined #ruby
[00:44:59] lethjakman: has joined #ruby
[00:46:11] Seich: has joined #ruby
[00:47:24] willardg: has joined #ruby
[00:51:01] shevy: slash_quit don't quit man, don't you ever quit!
[00:51:53] slash_quit: huge facepalm... so... i spent half an hour thinking ATT was censoring my information (forcing 404 for certain content or something)...i checked this url in chrome, firefox, lynx, on verizon, on att... nothing!
[00:52:11] uberjar: has joined #ruby
[00:52:15] slash_quit: shevy: http://abc.com/foo/bar-
[00:52:27] slash_quit: irssi doesn't make the - clickable... i was missing the -... i have to quit.
[00:52:59] shevy: funny explanation though
[00:54:30] slash_quit: it even 404d on a virtual private server, shevy... wtf :)
[00:54:49] slash_quit: meanwhile everyone else can read the article... censorship, i tell ya
[00:55:27] Guest123456666: has joined #ruby
[00:55:57] wookiehangover: has left #ruby: ("Leaving...")
[00:58:57] TheWhip: has joined #ruby
[01:00:50] Rollabunna: has joined #ruby
[01:02:54] casadei: has joined #ruby
[01:03:33] SenpaiSilver: has joined #ruby
[01:03:39] _djbkd: has joined #ruby
[01:05:42] andersoldahl: has joined #ruby
[01:07:37] inanepenguin: has joined #ruby
[01:11:44] Maletor: has joined #ruby
[01:14:05] User458764: has joined #ruby
[01:15:14] riotjones: has joined #ruby
[01:20:13] kobain: has joined #ruby
[01:20:34] imperator: has joined #ruby
[01:21:26] phutchins: has joined #ruby
[01:21:37] mondayrain: has joined #ruby
[01:23:03] _djbkd: has joined #ruby
[01:26:17] ellisTAA: has joined #ruby
[01:26:30] tmtwd: has joined #ruby
[01:27:48] rfi: has joined #ruby
[01:31:13] Limix: has joined #ruby
[01:32:24] blackmesa: has joined #ruby
[01:35:01] hephaestus_rg: has joined #ruby
[01:37:24] rakm: has joined #ruby
[01:39:06] dstarh: has joined #ruby
[01:39:10] TheWhip: has joined #ruby
[01:39:46] datanoise: has joined #ruby
[01:44:58] tkuchiki: has joined #ruby
[01:46:47] aaeron: has joined #ruby
[01:47:04] blowmage: has joined #ruby
[01:47:05] aaeron: How can I insert escape sequence to a string
[01:47:43] slash_nick: "" << "escape sequence"... what are you trying to do?
[01:48:37] jenrzzz: has joined #ruby
[01:50:12] patchedmonkey: has joined #ruby
[01:50:38] aaeron: slash_nick I am trying to create this string: (echo {\\\"tenant\\\": \\\"dummytest\\\"})
[01:51:18] aaeron: I got it working using this: echo {\\\\\\\"tenant\\\\\\\": \\\\\\\"dummytest\\\\\\\"}
[01:51:24] aaeron: I dont know if there is an easier way
[01:54:11] tkuchiki: has joined #ruby
[01:54:57] billylinder: has joined #ruby
[01:56:00] devoldmx: has joined #ruby
[01:57:45] hephaestus_rg: has joined #ruby
[01:59:35] davedev24: has joined #ruby
[02:01:52] gdd229: has joined #ruby
[02:04:11] slash_nick: << "(echo {\\\"tenant\\\": \\\"dummytest\\\"})"
[02:04:24] slash_nick: >> "(echo {\\\"tenant\\\": \\\"dummytest\\\"})"
[02:04:25] ruboto: slash_nick # => "(echo {\\\"tenant\\\": \\\"dummytest\\\"})" (https://eval.in/445934)
[02:05:31] casadei: has joined #ruby
[02:07:41] Pupeno: has joined #ruby
[02:10:19] PhantomS_: has joined #ruby
[02:10:24] psye: has joined #ruby
[02:11:14] TheWhip: has joined #ruby
[02:12:26] ICantCook: has joined #ruby
[02:13:01] ValicekB: has joined #ruby
[02:13:51] wildlander: has joined #ruby
[02:14:44] krz: has joined #ruby
[02:15:35] jun: has joined #ruby
[02:15:53] SylarRuby: has joined #ruby
[02:16:34] riotjones: has joined #ruby
[02:17:57] riotjones: has joined #ruby
[02:19:48] jamesaxl: has joined #ruby
[02:20:20] mdih: has joined #ruby
[02:22:52] Shoutsid: has joined #ruby
[02:26:47] baweaver: has joined #ruby
[02:26:59] Guest123456666: has joined #ruby
[02:31:43] bruno-: has joined #ruby
[02:32:26] uberjar: Hi I have a question about Time..
[02:33:16] haraoka: has joined #ruby
[02:33:23] uberjar: in the rdocs about the method #getlocal it says: Returns a new Time object representing time in local time (using the local time zone in effect for this process). If utc_offset is given, it is used instead of the local time.
[02:33:24] uberjar: getlocal(utc_offset) ??? new_time
[02:34:16] uberjar: I wish to pass in that utc_offset parameter and I wanted that to basically tell ruby to pretend that the local operating system time is whatever I set that parameter to.. but apparently it's not working
[02:34:26] blackmesa: has joined #ruby
[02:35:05] uberjar: Time.iso8601("2015-04-05T00:00:00").getlocal("+00:00").iso8601 => "2015-04-05T04:00:00Z"
[02:35:54] evillution: has joined #ruby
[02:35:57] uberjar: but it *should* return "2015-04-05T00:00:00Z" if I am understanding the documentation correctly??? (my local system's time zone is Z-04:00)
[02:36:26] fullofcaffeine: has joined #ruby
[02:37:14] bnagy: the time you gave it was midnight your local (-4) and it gave back 4am at 0
[02:37:23] bnagy: that seems correct to me?
[02:38:27] uberjar: well that would have been correct if I had called #getlocal() but instead I passed in a parameter to #getlocal which specified that I wanted Ruby to pretend that my system timezone is +00:00
[02:38:45] uberjar: therefor it should have given me midnight UTC
[02:38:58] bnagy: it gives you the time at the offset you specify
[02:39:06] bnagy: If utc_offset is given, it is used instead of the local time.
[02:39:51] uberjar: I assume that means that it will completely ignore the local time and assume offset is the new localtime
[02:40:09] uberjar: which would be UTC
[02:40:23] bnagy: it takes a time, then represents it in the offset you pass
[02:40:28] bnagy: which is what it has done here
[02:40:44] bnagy: 0 your time (-4) is 4am zulu
[02:41:12] inanepenguin: has joined #ruby
[02:41:21] bl0ndie: has joined #ruby
[02:41:48] uberjar: is there a way to take an iso8601 timestamp which does not specify Zulu (asumes localtime) and then have Ruby process it as if my system time were UTC ?
[02:42:48] uberjar: I basically want to output 2015-04-05T00:00:00Z from the time object even if the user specifies something ambiguous like "2015-04-05T00:00:00"
[02:42:59] uberjar: but I dont' want to actually change my system time to UTC
[02:43:26] stardiviner: has joined #ruby
[02:43:36] Yzguy: has joined #ruby
[02:43:47] chipotle: has joined #ruby
[02:44:09] bnagy: there are probably a few ways
[02:44:18] simplyianm: has joined #ruby
[02:44:27] bnagy: you could add your offset, or you could strftime the stamp from the user
[02:44:52] Channel6: has joined #ruby
[02:45:13] uberjar: strftime the stamp to a certain length then concat Z on the end then Time.iso8604 that string ?
[02:45:37] uberjar: that sounds like it should work??? magnificent!
[02:45:51] ThaiWood: has joined #ruby
[02:46:46] bnagy: imho adding your offset (or subtracting obvs) might be more reliable
[02:47:24] bnagy: but it's a pretty scary specification, like what happens when the user _does_ specify a zone?
[02:47:52] simplyianm: has joined #ruby
[02:48:26] Shoutsid: has joined #ruby
[02:48:41] havenwood: has joined #ruby
[02:49:49] simplyianm: has joined #ruby
[02:49:55] uberjar: well from what I can tell it should be possible to rule out the idea that a timezone has been specified by checking to see if the length of the string is less than a certain size and the string does not contain the letter Z
[02:50:27] uberjar: but I agree it's pretty gnarly.. https://tools.ietf.org/html/rfc3339
[02:50:27] zhkirill: has joined #ruby
[02:50:40] TheWhip: has joined #ruby
[02:51:28] uberjar: I can't find a way to specify a timezone without using Z or without using more than 19 characters though
[02:51:59] uberjar: so I hopefully I'll be OK. thanks for the idea about adding the offset though
[02:52:23] DmitryBochkarev: has joined #ruby
[02:52:27] bnagy: looks like ActiveSupport has better stuff for this
[02:52:47] bnagy: and also looks like you can set ENV['TZ'] in your ruby process to override /etc/localtime
[02:53:12] blowmage: has joined #ruby
[02:53:33] bnagy: which both sound closer to what I think you want
[02:53:40] bnagy: http://stackoverflow.com/questions/4703830/set-time-zone-offset-in-ruby
[02:53:48] korolyov: has joined #ruby
[02:54:25] shadoi: has joined #ruby
[02:54:36] uberjar: the ENV thing sounds scarry because I dont' want to assume that this code might not be extracted one day and used in a different context where the programmer might not be aware
[02:54:54] uberjar: where should I look in ActiveSupport ?
[02:54:56] marienz: has joined #ruby
[02:55:00] uberjar: I thought I checked it out
[02:55:18] bnagy: check that SO answer
[02:56:13] bnagy: hmm... actually no, you really want the env variable, not in_time_zone I think
[02:56:41] bnagy: that's just a tzdata aware version of getlocal, really
[02:56:41] uberjar: oh interesting, he sets the ENV and then returns it back.. I wonder though is that threadsafe ?
[02:56:55] uberjar: and what about on JRuby
[02:56:56] bnagy: oh god no
[02:57:13] bnagy: I wouldn't set it back, that sounds crazypants
[02:57:23] bnagy: but env is per process so you don't break anything else
[02:57:48] bnagy: it should be fine on jruby
[02:58:21] uberjar: https://gist.github.com/anonymous/02a10850c8c32e3acb81
[02:58:34] dEPy: has joined #ruby
[02:59:03] bnagy: very not-threadsafe
[02:59:35] bnagy: although on MRI you'd probably get away with it
[03:00:32] gener1c_: has joined #ruby
[03:00:59] uberjar: well believe it or not I'm deploying into a Java application server (Wildfly) and I have a requirement where the application server log timestamps need to match my service's timestamps
[03:01:10] uberjar: so ENV is pretty much a no-go
[03:01:38] EminenceHC: has joined #ruby
[03:01:41] Rollabunna: has joined #ruby
[03:02:06] uberjar: if you happen to see something in particular in ActiveSupport that might be nicer than the string manipulation / offset math let me know I'd apprecaite it.. otherwise I'll probably end up having to hope my understanding of iso 8601 is up to par
[03:02:58] uberjar: (using Torquebox 4)
[03:03:39] TheWhip: has joined #ruby
[03:06:18] andersoldahl: has joined #ruby
[03:07:06] darkf: has joined #ruby
[03:07:23] rakm: has joined #ruby
[03:11:01] braincrash: has joined #ruby
[03:11:49] Guest123456666: has joined #ruby
[03:14:10] lkba: has joined #ruby
[03:14:41] uberjar: hrmm I could monkeypatch a certain function to prefer a different environment variable ahead of ENV['TZ']
[03:14:50] User458764: has joined #ruby
[03:16:33] codecop: has joined #ruby
[03:16:58] SylarRuby: has joined #ruby
[03:18:41] riotjones: has joined #ruby
[03:19:47] Soda: has joined #ruby
[03:19:57] gix: has joined #ruby
[03:20:35] EminenceHC: has joined #ruby
[03:22:13] uberjar: as far as I can tell this shouldn't break the format https://gist.github.com/anonymous/116e03043eec4c731d29
[03:23:39] uberjar: oops https://gist.github.com/anonymous/54229ffad079680c559b
[03:25:40] TheWhip: has joined #ruby
[03:26:23] uberjar: maybe I'll send a variant of it as a pull request to Ruby core.. then if somebody finds a proper reason to reject it I'll at least know that it's flawed and maybe a better way will be recommended
[03:26:40] xcesariox: has joined #ruby
[03:26:50] uberjar: after all it seems to me at least like this should exist
[03:28:58] cndiv: has joined #ruby
[03:29:20] uberjar: maybe matz will agree
[03:29:39] otacon-: has joined #ruby
[03:32:42] SylarRuby: has joined #ruby
[03:33:04] solocshaw: has joined #ruby
[03:33:31] astrobun_: has joined #ruby
[03:33:42] solocshaw: has joined #ruby
[03:34:33] jenrzzz: has joined #ruby
[03:35:19] blackmesa: has joined #ruby
[03:35:25] uberjar: I'm not going to make a big deal out of it though.. because I like to respect people's Time =^o
[03:35:48] howdoi: has joined #ruby
[03:38:56] _djbkd: has joined #ruby
[03:40:57] shadoi: has joined #ruby
[03:42:51] leslie1: has joined #ruby
[03:42:56] Shoutsid: has joined #ruby
[03:47:34] jenrzzz: has joined #ruby
[03:53:47] Oka: has joined #ruby
[03:56:48] devoldmx: has joined #ruby
[04:00:06] aaeron: has joined #ruby
[04:00:16] pocketprotector2: has joined #ruby
[04:00:30] kp666: has joined #ruby
[04:01:27] devoldmx: has joined #ruby
[04:01:39] rushed: has joined #ruby
[04:01:53] FrankD: has joined #ruby
[04:03:49] swgillespie: has joined #ruby
[04:04:19] dEPy: has joined #ruby
[04:04:48] zenguy_pc: has joined #ruby
[04:10:30] moeabdol: has joined #ruby
[04:11:05] evillution: has left #ruby: ()
[04:15:29] SenpaiSilver: has joined #ruby
[04:15:48] moeabdol: has joined #ruby
[04:17:20] todd: has joined #ruby
[04:17:50] favadi: has joined #ruby
[04:19:27] EasyCo: has joined #ruby
[04:19:32] riotjones: has joined #ruby
[04:21:03] Joufflu: has joined #ruby
[04:23:20] solofounder: has joined #ruby
[04:24:33] braincra-: has joined #ruby
[04:27:46] lkba: has joined #ruby
[04:27:53] keen___________5: has joined #ruby
[04:29:37] renderful: has joined #ruby
[04:35:52] TheWhip: has joined #ruby
[04:35:59] blackmesa: has joined #ruby
[04:36:13] Eiam_: has joined #ruby
[04:40:25] psk17_: has joined #ruby
[04:45:27] sami: has joined #ruby
[04:46:32] lkba: has joined #ruby
[04:47:16] Gnomethrower: has joined #ruby
[04:49:27] Shoutsid: has joined #ruby
[04:49:39] skade: has joined #ruby
[04:50:53] Opettaja: has joined #ruby
[04:54:01] EminenceHC: has joined #ruby
[04:54:34] [k-: has joined #ruby
[04:56:57] EminenceHC: has joined #ruby
[05:00:00] EminenceHC: has joined #ruby
[05:01:00] bb010g: has joined #ruby
[05:02:36] Rollabunna: has joined #ruby
[05:03:14] davedev24: has joined #ruby
[05:03:30] astrobun_: has joined #ruby
[05:03:49] fedexo: has joined #ruby
[05:04:57] Oka: has joined #ruby
[05:05:31] roshanavand: has joined #ruby
[05:05:33] devoldmx_: has joined #ruby
[05:08:03] mbff: has joined #ruby
[05:09:37] bluOxigen: has joined #ruby
[05:10:27] rushed: has joined #ruby
[05:11:52] natevick: has joined #ruby
[05:12:35] chrissonar: has joined #ruby
[05:14:15] krz: has joined #ruby
[05:14:22] mbff: has left #ruby: ("Leaving")
[05:15:43] User458764: has joined #ruby
[05:18:40] mclee_: has joined #ruby
[05:18:55] jun: has joined #ruby
[05:20:14] dhjondoh: has joined #ruby
[05:20:17] riotjones: has joined #ruby
[05:22:36] davedev24: has joined #ruby
[05:25:16] grenierm: has joined #ruby
[05:26:09] agit0: has joined #ruby
[05:27:05] r0x0rZ: has joined #ruby
[05:27:24] EminenceHC: has joined #ruby
[05:27:42] balazs_: has joined #ruby
[05:28:15] tmtwd: has joined #ruby
[05:28:21] auzty: has joined #ruby
[05:29:57] reset: has joined #ruby
[05:32:40] psye: has joined #ruby
[05:33:38] sanjayu: has joined #ruby
[05:34:52] Trynemjoel: has joined #ruby
[05:36:23] aganov: has joined #ruby
[05:36:51] blackmesa: has joined #ruby
[05:40:29] Macaveli: has joined #ruby
[05:45:56] favadi: has joined #ruby
[05:46:23] willardg: has joined #ruby
[05:47:45] tagrudev: has joined #ruby
[05:48:00] mark3: has joined #ruby
[05:51:40] last_staff: has joined #ruby
[05:53:32] mar1: has joined #ruby
[05:57:22] riotjones: has joined #ruby
[05:57:22] Oka: has joined #ruby
[05:57:41] mark3: has joined #ruby
[05:57:46] eGGsha: has joined #ruby
[05:58:50] wottam: has joined #ruby
[05:59:05] neanderslob: has joined #ruby
[05:59:49] lxsameer: has joined #ruby
[06:02:27] neanderslob__: has joined #ruby
[06:05:04] joonty: has joined #ruby
[06:05:32] Spami: has joined #ruby
[06:06:22] yardenbar: has joined #ruby
[06:08:19] segy: has joined #ruby
[06:08:28] amystephen: has joined #ruby
[06:09:25] User458764: has joined #ruby
[06:09:28] arup_r: has joined #ruby
[06:09:43] Pupeno: has joined #ruby
[06:10:55] DoubleMalt: has joined #ruby
[06:11:35] claw: has joined #ruby
[06:11:37] Shoutsid: has joined #ruby
[06:17:44] leslie1: has left #ruby: ()
[06:19:32] Pharaoh2: has joined #ruby
[06:19:45] scottstamp: has joined #ruby
[06:21:37] symm-: has joined #ruby
[06:22:40] dionysus69: has joined #ruby
[06:23:03] karapetyan: has joined #ruby
[06:25:31] fullofcaffeine: has joined #ruby
[06:26:39] firstdayonthejob: has joined #ruby
[06:26:44] fullofcaffeine: has joined #ruby
[06:28:31] cndiv: has joined #ruby
[06:28:37] platzhirsch: has joined #ruby
[06:29:09] ta: has joined #ruby
[06:34:14] giuseppesolinas: has joined #ruby
[06:34:17] giuseppesolinas_: has joined #ruby
[06:35:59] moeabdol: has joined #ruby
[06:37:18] yeticry: has joined #ruby
[06:37:32] blackmesa: has joined #ruby
[06:39:40] karapetyan: has joined #ruby
[06:39:49] _blizzy_: has joined #ruby
[06:41:25] _djbkd: has joined #ruby
[06:42:51] DoYouKnow_: has joined #ruby
[06:43:31] DoYouKnow: has joined #ruby
[06:43:31] DoYouKnow: has joined #ruby
[06:43:49] karapetyan: has joined #ruby
[06:44:49] anisha: has joined #ruby
[06:46:41] jas02: has joined #ruby
[06:48:22] marr: has joined #ruby
[06:48:55] IanV0rn2341: has joined #ruby
[06:52:47] Macaveli: has joined #ruby
[06:57:54] mondayrain: has joined #ruby
[07:00:52] UtkarshRay: has joined #ruby
[07:00:53] TheWhip: has joined #ruby
[07:03:26] Rollabunna: has joined #ruby
[07:05:16] TheWhip_: has joined #ruby
[07:05:25] SCHAAP137: has joined #ruby
[07:08:02] tkuchiki: has joined #ruby
[07:10:33] pandaant: has joined #ruby
[07:11:12] Asher: has joined #ruby
[07:11:15] tkuchiki: has joined #ruby
[07:16:51] nfk|laptop: has joined #ruby
[07:17:46] andikr: has joined #ruby
[07:18:35] Faduo: has joined #ruby
[07:20:09] Faduo: anybody here?
[07:20:16] hephaestus_rg: has joined #ruby
[07:21:32] mark3: has joined #ruby
[07:22:29] DEA7TH: has joined #ruby
[07:22:57] fullofcaffeine: has joined #ruby
[07:23:05] sebyx07: has joined #ruby
[07:25:41] [k-: patience.
[07:26:22] Faduo: who are you?
[07:26:35] [k-: nobody of use to you
[07:27:00] baweaver: and we are not
[07:27:11] pawnbox: has joined #ruby
[07:27:36] Faduo: why do you join the #ruby?
[07:27:48] baweaver: why does one not?
[07:27:55] adac: has joined #ruby
[07:28:33] sebyx07: Faduo: do you have a problem that is related with ruby ?
[07:28:41] roshanavand: has joined #ruby
[07:28:45] baweaver: sebyx07: aw, you're no fun
[07:29:17] baweaver: vague questions tend to get vague answers :P
[07:29:27] pecpec: has joined #ruby
[07:29:41] Faduo: not, i prefer sebyx07
[07:29:48] sebyx07: baweaver: we should help ppl out, already there is a lot of talk about moving away from ruby
[07:30:00] Faduo: 1 # encoding: utf-8 2 3 a = Thread::start() do 4 i = 0 5 while true do 6 print i++ 7 end 8 end 9 10 a.run 11 12 j = 0 13 while true do 14 print j++ 15 end
[07:30:15] ruboto: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[07:30:24] baweaver: every time I mix those up
[07:30:30] baweaver: paste your code in there
[07:30:41] Faduo: yes ! sebyx07 says right
[07:30:42] baweaver: sebyx07: you don't honestly believe that do you?
[07:30:43] IanV0rn2341: has joined #ruby
[07:31:04] baweaver: trends come and go
[07:31:53] [k-: Faduo: do you like being questioned your identity? i feel we aren't to blame for your provocative question
[07:31:59] ruboto: Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
[07:32:30] Trynemjoel: has joined #ruby
[07:32:53] baweaver: on the note of ruby losing people / dying, it's as nonsense today as it is any other day. Languages don't die in programming
[07:33:33] baweaver: source: I know RPG, COBOL, and a smidge of ALGOL. All of which are still very much alive and being used in production, despite being made in the 60s and being heralded as "dead"
[07:34:00] baweaver: now as to whether or not I want a job in them, that's a different matter...
[07:35:58] IanV0rn2341: has joined #ruby
[07:36:39] Faduo: Souds bad that i can't open the gist :(
[07:37:04] baweaver: define can't open
[07:37:58] alienaut: has joined #ruby
[07:38:04] [k-: i++ does not exist in Ruby
[07:38:10] blackmesa: has joined #ruby
[07:38:16] blaxter: has joined #ruby
[07:38:19] Shoutsid: has joined #ruby
[07:38:29] baweaver: and print doesn't put a newline, making that very hard to read
[07:38:42] [k-: while true results in an infinite loop
[07:38:46] baweaver: that and `loop do` is preferred to `while true`
[07:38:53] baweaver: it's in a thread
[07:39:08] [k-: there is also one in the main thread
[07:39:19] dvxam: has joined #ruby
[07:39:29] baweaver: hard to read a one-liner with line numbers
[07:39:49] [k-: it will probably die of a syntax error before anything else
[07:39:53] baweaver: Faduo: still not seeing a question out of this
[07:40:14] baweaver: we can't exactly answer something that hasn't been asked.
[07:40:48] roshanavand: has joined #ruby
[07:41:21] darkf_: has joined #ruby
[07:43:13] platzhirsch: has joined #ruby
[07:44:29] favadi: has joined #ruby
[07:45:48] soforchunet: has joined #ruby
[07:46:18] ta: has joined #ruby
[07:46:40] baweaver: that and thread.run is a bit pointless.
[07:47:06] baweaver: Thread.start (which is new) does that already.
[07:47:15] skade: has joined #ruby
[07:48:16] baweaver: I guess there's no question then.
[07:48:20] IanV0rn2341: has joined #ruby
[07:48:53] [k-: printing will slow things down, io is slow
[07:49:04] [k-: we need faster IO!
[07:49:24] Timba-as: has joined #ruby
[07:49:54] system64: has joined #ruby
[07:52:09] moty66: has joined #ruby
[07:52:10] Macaveli: has joined #ruby
[07:55:01] Feyn: has joined #ruby
[07:55:02] drptbl: has joined #ruby
[07:55:26] karapetyan: has joined #ruby
[07:55:27] it_tard: has joined #ruby
[07:55:49] it_tard: has joined #ruby
[07:56:02] moty66: Hello, looking for help to find a way how to filter submethods of a list of objects, please take a look here https://paste.debian.net/314743/
[07:56:19] senayar: has joined #ruby
[07:56:41] roshanavand: has joined #ruby
[07:57:00] giuseppesolinas_: has joined #ruby
[07:57:02] giuseppesolinas: has joined #ruby
[07:57:58] Log1x: has joined #ruby
[07:58:52] techsethi: has joined #ruby
[08:00:37] techsethi: Hi Folks, could someone please help me find a ruby library for TTS that can speak small sentence(s) in like a "song" melody format. For instance, I wan't it to read and
[08:01:17] [k-: firstly, you need to call the method containing the arrays on obj1 and obj2
[08:01:34] techsethi: "sing" Happy birthday <name>". I have found this library. it works fine for simple text but I want something that can kind of "sing" the sentence. https://github.com/c2h2/tts thanks much in dvance.
[08:01:37] ndrei: has joined #ruby
[08:02:03] brazenbraden: has joined #ruby
[08:02:11] [k-: if you have a mac, i believe you can rely on the underlying tts on it
[08:02:24] moty66: [k-: i have to each loops, one for objects and one for mehtods which I want to get the submehtods
[08:02:51] moty66: [k-: but I don't know to to handle the hashes or the array for the results
[08:02:54] roshanavand: has joined #ruby
[08:03:00] techsethi: hi [k- I have mac but how to use the underlying tts to close to "sing" the text.
[08:04:56] anisha: has joined #ruby
[08:04:57] joonty: has joined #ruby
[08:05:00] [k-: http://osxdaily.com/2010/11/09/make-your-mac-sing-songs/
[08:05:59] [k-: >> { :a, :b, :c }
[08:06:00] ruboto: [k- # => /tmp/execpad-bd0ad2110e0f/source-bd0ad2110e0f:2: syntax error, unexpected ',', expecting => ...check link for more (https://eval.in/446035)
[08:06:10] [k-: such syntax does not exist
[08:07:26] roshanavand: has joined #ruby
[08:07:30] krisquigley: has joined #ruby
[08:07:57] [k-: you can merge an array using +
[08:08:05] mdih: has joined #ruby
[08:08:08] [k-: merge 2* arrays
[08:08:25] baweaver: >> [1] + [2]
[08:08:26] ruboto: baweaver # => [1, 2] (https://eval.in/446039)
[08:08:36] mdih: has joined #ruby
[08:08:38] baweaver: >> [1].concat [2]
[08:08:38] ruboto: baweaver # => [1, 2] (https://eval.in/446041)
[08:09:08] [k-: and you can use map afterwards to get the value :submethod1A... out
[08:09:31] alienaut: has joined #ruby
[08:09:55] skade: has joined #ruby
[08:10:34] chthon: has joined #ruby
[08:10:53] datanoise: has joined #ruby
[08:10:57] User458764: has joined #ruby
[08:12:21] tomphp: has joined #ruby
[08:12:38] moty66: [k-: thanks, I did like this, in the first loop i crate a @out[m] = [] and in the subloop i di @out[m].push(s)
[08:12:50] moty66: [k-: m is the method name and s is the submethod :)
[08:13:57] hephaestus_rg: has joined #ruby
[08:14:39] User4587_: has joined #ruby
[08:14:59] [k-: okay, now, you need to 1. have only 1 of each submethod present in the array, and 2. make sure the submethods are in alphabetical order
[08:15:23] [k-: &ri Array @moty66
[08:15:23] `derpy: moty66: http://www.rubydoc.info/stdlib/core/Array
[08:15:33] roshanavand: has joined #ruby
[08:15:45] [k-: i want you to look through that link and tell me the methods you can use to achieve those things
[08:16:51] shevy: moty66 did you use .select already
[08:17:12] gigetoo: has joined #ruby
[08:17:26] shevy: since you will work on arrays and hashes anyway, you can select inside the {} block what you want from your datastructure
[08:17:51] IanV0rn2341: has joined #ruby
[08:19:25] [k-: shevy: this is a special case, s/he wants one of each submethod to appear, there is already a method for that
[08:19:46] fullofcaffeine: has joined #ruby
[08:20:07] [k-: select involves more work, let's point him/her to the other method?
[08:20:07] shevy: I don't know what is a submethod
[08:20:22] stardiviner: has joined #ruby
[08:20:44] [k-: it's just the value of the symbols s/he is using
[08:20:46] roshanavand: has joined #ruby
[08:20:52] [k-: :submethod1A, etc
[08:21:08] shevy: ah ok so symbols
[08:21:48] hephaestus_rg: has joined #ruby
[08:25:55] jellene4eva: has joined #ruby
[08:26:47] roshanavand: has joined #ruby
[08:27:05] ndrei_: has joined #ruby
[08:29:18] blackmesa: has joined #ruby
[08:29:28] leo19: has joined #ruby
[08:29:52] rdark: has joined #ruby
[08:30:31] the_drow: has joined #ruby
[08:31:20] renderful: has joined #ruby
[08:31:47] roshanavand: has joined #ruby
[08:33:18] roshanavand: has joined #ruby
[08:33:39] ta: has joined #ruby
[08:33:48] roshanavand: has joined #ruby
[08:33:51] yfeldblum: has joined #ruby
[08:36:08] lenwood: has joined #ruby
[08:36:50] soc42: has joined #ruby
[08:37:09] dmolina: has joined #ruby
[08:39:00] tvw: has joined #ruby
[08:41:33] TheWhip: has joined #ruby
[08:41:48] pawnbox: has joined #ruby
[08:42:12] ndrei: has joined #ruby
[08:45:25] moty66: shevy: not really, I'll check the docs for the select method, thanks
[08:48:17] vdamewood: has joined #ruby
[08:51:47] subscope: has joined #ruby
[08:56:52] Shoutsid: has joined #ruby
[08:57:11] lxsameer: has joined #ruby
[08:57:20] jenrzzz: has joined #ruby
[08:58:04] lalalaaa: has joined #ruby
[08:58:06] mdih: has joined #ruby
[08:59:32] mdih: has joined #ruby
[09:00:04] mdih: has joined #ruby
[09:02:39] TheWhip_: has joined #ruby
[09:03:28] sepp2k: has joined #ruby
[09:04:21] Rollabunna: has joined #ruby
[09:05:21] jgt: has joined #ruby
[09:05:59] AnoHito_: has joined #ruby
[09:06:16] Prawnzy: has joined #ruby
[09:06:35] howardg: has joined #ruby
[09:07:22] spider-mario: has joined #ruby
[09:07:26] howardg: good day. lets say there's a function called "fun" whose origin I do not know, is there a way to find out to which module the function belongs at runtime?
[09:08:18] certainty: >> method(:puts).owner
[09:08:20] ruboto: certainty # => Kernel (https://eval.in/446128)
[09:08:56] howardg: pretty close, thanks very much
[09:09:31] [k-: there is also the fun way, using ObjectSpace to get all known classes and querying them using respond_to?
[09:11:18] gremax: has joined #ruby
[09:11:51] yorickpeterse: Did somebody just suggest using ObjectSpace?
[09:11:54] yorickpeterse: ACTION likes slapping people and randomly picks [k- to slap
[09:12:45] howardg: ObjectSpace looks like java unsafe :D
[09:13:32] howardg: actually it looks safer
[09:14:19] apeiros: ACTION thinks yorickpeterse's prng is rigged
[09:14:27] apeiros: ACTION also thinks that's probably a good thing in this case
[09:14:47] niemcu: has joined #ruby
[09:15:10] [k-: it's labeled as a fun way for a reason
[09:15:17] [k-: you all are no fun
[09:15:28] certainty: because it's fun to see you get slapped :D
[09:15:54] waheedi: has joined #ruby
[09:16:32] waheedi: anyidea how to know which source list gem is using and how to update it?
[09:16:37] maloik: yorickpeterse: I just broke gitlab.com :( signed in via twitter for the first time, filled in email to complete my profile, 500
[09:16:56] waheedi: it seems its using rubygems.rubyforge.org
[09:16:57] maloik: can I braindump a simple issue here real quick? I might forget about it
[09:17:06] [k-: ?ot maloik
[09:17:07] ruboto: maloik, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
[09:17:14] datanoise: has joined #ruby
[09:17:32] maloik: pssh :D I'll take it there
[09:18:36] maloik: oh, I did get an email and am signed in... so it's just that flow that's somehow broken
[09:18:41] maloik: I can create issues now I think!
[09:18:41] waheedi: gem sources
[09:18:50] waheedi: its using http://rubygems.org/
[09:18:52] yorickpeterse: maloik: yes please
[09:19:07] waheedi: but I???m not able to install this gem https://rubygems.org/gems/amq-client/versions/1.0.2
[09:19:28] waheedi: did i miss anything?
[09:19:30] blackmesa: has joined #ruby
[09:19:46] waheedi: ERROR: Could not find a valid gem '1.0.2' (>= 0) in any repository
[09:20:21] darix: what is your gem cmdline?
[09:20:23] waheedi: its working now!
[09:20:52] waheedi: it seems i forgot my ???-v??? option
[09:22:00] maloik: hmm my colleague is mistaken about the initial issue... :D
[09:22:23] lalalaaa: has joined #ruby
[09:23:33] arup_r: has joined #ruby
[09:24:23] jgt: has joined #ruby
[09:27:32] lalalaaa: has joined #ruby
[09:27:55] beast: has joined #ruby
[09:28:22] User458764: has joined #ruby
[09:30:20] Kendos-Kenlen: has joined #ruby
[09:30:54] favadi: has joined #ruby
[09:31:46] ndrei: has joined #ruby
[09:32:28] Peg-leg: has joined #ruby
[09:34:12] nettoweb: has joined #ruby
[09:34:41] alienaut: has joined #ruby
[09:35:17] drptbl: has joined #ruby
[09:35:36] Shoutsid: has joined #ruby
[09:38:06] maloik: I'll start by firing myself ^^
[09:38:13] [k-: your face should be on fire
[09:41:46] Peg-leg1: has joined #ruby
[09:41:58] htmldrum: has joined #ruby
[09:43:43] matp: has joined #ruby
[09:43:52] dmolina: has joined #ruby
[09:46:40] favadi: has joined #ruby
[09:46:41] bougyman: what are the bad things about using /remember=(?<memory>\d+)/ =~ line ?
[09:46:53] bougyman: I hear that it shouldn't be used, but it's ever so convenient.
[09:47:05] bougyman: as opposed to MatchData#captures
[09:47:12] jhass: for the locals?
[09:47:24] jhass: the bad thing is that it adds locals
[09:47:33] jhass: do you know any other method call that does that?
[09:47:47] jhass: how would you like it if it's a common thing?
[09:47:47] bougyman: well otherwise i'd do a memory = /regex/.match(string)
[09:47:50] bougyman: and still make a local.
[09:48:12] jhass: yes. List me the ways you know to create a local variable.
[09:48:29] [k-: you can make it a local because you do not have any other variables named memory in the first place
[09:48:42] krisquigley: has joined #ruby
[09:48:42] bougyman: with the named captures trick, and by assignment.
[09:48:50] jhass: no, in general
[09:49:05] jhass: ah, sorry. so
[09:49:15] jhass: there's usually one way, assignment
[09:49:22] bougyman: but there's two.
[09:49:30] jhass: everything else are special cases you have to learn extra
[09:49:34] jhass: and constantly check extra
[09:49:38] bougyman: so the only objection to it is that it's surprising?
[09:49:47] jhass: it's a quite big objection
[09:49:57] jhass: say you have FOO =~ bar
[09:50:04] howardg: has left #ruby: ()
[09:50:06] jhass: will it create locals? which?
[09:50:12] bougyman: I have FOO =~ bar
[09:50:21] troulouliou_div2: has joined #ruby
[09:50:29] jhass: will it conflict with other locals? which locals am I safe to use around it?
[09:50:48] jhass: gotta scroll to wherever that constant is defined to find out
[09:51:02] jhass: or ignore it and risk subtle bugs
[09:51:35] [k-: you have to check the jungle before you do something
[09:51:50] Azure|dc: has joined #ruby
[09:51:50] [k-: doing // =~ is an implicit assumption
[09:52:28] jhass: a big part of keeping methods small is keeping their scope small, the amount of locals you have to track
[09:52:51] jhass: =~ adds locals to the scope out of potentially nowhere
[09:52:56] [k-: scope is mad, state is mad, checking regexes to see if they had assigned a variable with the name you wanted to use is mad
[09:53:24] [k-: i would want this for perl
[09:53:26] bougyman: None of these objections are swaying me.
[09:53:53] [k-: code slinging mega quick
[09:54:08] bougyman: seeing as i'm 1: not using a variable as a regex, 2: using this in a method where the only local var is the one created from the named capture, and 3: prefer the method to be shorter rather than longer.
[09:54:15] [k-: I would now like to quote my teacher
[09:54:38] [k-: We can teach slow students, but we cannot teach stubborn students
[09:55:03] bougyman: isn't the // =~ more efficient by not having to create a MatchData object, too?
[09:55:05] mprelude: has joined #ruby
[09:55:16] jhass: what's $~ ?
[09:55:24] jhass: oh, MatchData object
[09:55:26] jhass: always there
[09:55:27] bougyman: jhass: something that doesn't get created til you access it, I thought.
[09:55:46] jhass: is that so?
[09:55:55] bougyman: I don't know, I was told that once upon a time in here.
[09:56:07] bougyman: I didn't look into the guts to verify that.
[09:56:16] Rollabunna: has joined #ruby
[09:56:37] porfa: has joined #ruby
[09:56:58] jhass: anyway, I dislike =~, it has a rarely useful return value, I always mistype it as ~= first and it has surprising behavior (you know it, do others reading your code?)
[09:57:05] stamina: has joined #ruby
[09:57:20] roshanavand: has joined #ruby
[09:57:21] jhass: it's 95% String#match and String#[] for me these days
[09:58:20] porfa: hello guys.. i've ran into a problem i have no idea on how to handle this??? so i have a entry in my database and I'm trying to put that into an array, the entry is a long string with product specifications.. BUT.. for instance, it's a JUG, and one of the specs is??? "1,5 Liters" all of the specs are separated by commas so my .split(',') is splitting the JUG capacity :( is there a workaround on this?
[09:59:26] bougyman: binding.local_variable_set is funky
[09:59:28] wottam: has joined #ruby
[09:59:38] dhjondoh: has joined #ruby
[10:00:52] jhass: Porfa: sounds like CSV? is it properly escaped?
[10:01:01] porfa: hmmmm I'm storing the data on the DB, and i am joining it with (',') so it's my choice??? can anyone suggest me another field separator? would it be too bad if i used TILDE as a field separator? or some weird character that i will never ever encounter during one of my scrappings
[10:01:21] devoldmx: has joined #ruby
[10:01:30] jhass: Porfa: uhm
[10:01:34] jhass: why don't you normalize it?
[10:01:37] User458764: has joined #ruby
[10:01:38] jhass: make a table with the fields?
[10:01:48] jhass: or whatever
[10:01:57] herbst: has joined #ruby
[10:02:02] porfa: oh i see.. so, a different table just to keep the product details, nice
[10:02:06] jhass: (I have no idea what JUG is btw)
[10:02:20] porfa: JUG is a thing you put liquids in? or is it a MUG? ...
[10:02:30] porfa: i though MUG would be small JUG.
[10:02:30] [k-: both can be used
[10:02:34] jhass: why do you capitalize it?
[10:02:43] jhass: makes it look like an acronym
[10:02:53] porfa: because i was trying to be more??? forget it, I'm just dumb i talk on IRC like i do in real life, sorry man :(
[10:03:12] jhass: you shout whenever you say jug?
[10:03:25] voker57: has joined #ruby
[10:03:33] [k-: use a non breaking space character, that'd be /fun/
[10:03:34] voker57: has joined #ruby
[10:03:45] [k-: or a zero-width space, even
[10:04:33] TTilus: Porfa: how about you tell us what your app does
[10:05:00] TTilus: Porfa: and what does your db structure look like now
[10:05:49] FrankD: has joined #ruby
[10:07:15] fullofcaffeine: has joined #ruby
[10:07:38] [k-: shevy: http://www.indiatimes.com/news/india/it-takes-adult-programmers-3-hours-to-clear-this-java-exam-but-this-10yearold-champ-aced-it-in-18-minutes-245881.html
[10:07:56] mark77: has joined #ruby
[10:08:10] karapetyan: has joined #ruby
[10:09:12] porfa: jhass: yeah, i DO because when i say it people thing I'm drunk and try to get advantage on me
[10:09:17] jokke-: has joined #ruby
[10:09:33] mr_blue: has joined #ruby
[10:09:42] jhass: glad I'm not in your office then :P
[10:09:51] porfa: and i steal their wallets to get munnies, then i go into freelancer websites and get them to work on my rubbiez
[10:10:15] jhass: wait, you _are_ drunk right now, right?
[10:10:47] porfa: i mean, i think i am because I'm considering using @ or even ^ as a field separator
[10:11:08] [k-: too much info ????????????
[10:11:30] [k-: why do you want to join the fields together?
[10:11:30] jhass: Porfa: that's the wrong approach
[10:11:40] [k-: to display?
[10:11:50] jhass: either properly normalize your data (google database normalization) or use a proper serialization (CSV, JSON, YAML)
[10:11:56] porfa: because each of them will be inserted into a different field with selenium
[10:11:58] jhass: the former is most likely to prefer
[10:12:17] porfa: will do, thank you
[10:15:12] bubbys: has joined #ruby
[10:18:55] roshanavand: has joined #ruby
[10:18:57] TheWhip: has joined #ruby
[10:19:13] datanoise: has joined #ruby
[10:20:13] Macaveli: has joined #ruby
[10:20:19] rickmasta: has joined #ruby
[10:20:29] ndrei: has joined #ruby
[10:21:51] Shoutsid: has joined #ruby
[10:23:00] waheedi_: has joined #ruby
[10:27:02] subscope: has joined #ruby
[10:28:17] roshanav_: has joined #ruby
[10:28:36] karapetyan: has joined #ruby
[10:29:14] krisquigley: has joined #ruby
[10:29:49] Azure: has joined #ruby
[10:32:10] renderful: has joined #ruby
[10:34:06] karapetyan: has joined #ruby
[10:36:22] skade: has joined #ruby
[10:36:42] nfk|laptop: has joined #ruby
[10:36:56] darkf_: has joined #ruby
[10:37:14] User4587_: has joined #ruby
[10:40:26] roshanavand: has joined #ruby
[10:41:28] ta: has joined #ruby
[10:44:23] blackmesa: has joined #ruby
[10:46:26] blueOxigen: has joined #ruby
[10:46:45] dionysus69: has joined #ruby
[10:50:23] Peg-leg: has joined #ruby
[10:50:36] mdih: has joined #ruby
[10:52:05] karapetyan: has joined #ruby
[10:54:02] darkxploit: has joined #ruby
[10:56:47] ByronJohnson: has joined #ruby
[10:56:56] CloCkWeRX: has joined #ruby
[10:56:57] roshanavand: has joined #ruby
[10:59:17] norc: has joined #ruby
[10:59:36] norc: Why does "Module.is_a? Class" evaluate to true?
[11:00:01] karapetyan: has joined #ruby
[11:00:11] adaedra: Because Module is a Class
[11:00:36] adaedra: >> module Foo; end; Foo.class
[11:00:37] ruboto: adaedra # => Module (https://eval.in/446170)
[11:01:00] jokke-: has joined #ruby
[11:01:00] fullofcaffeine: has joined #ruby
[11:01:13] norc: And Class is also a Module...
[11:01:22] adaedra: `module Foo` is the same as `Foo = Module.new`
[11:01:27] [k-: stricter equality can be used using instance_of? i believe
[11:01:34] workmad3: norc: that's because Class is a subclass of Module
[11:01:46] adaedra: &ri Class#instance_of?
[11:01:46] `derpy: http://www.rubydoc.info/stdlib/core/Object#instance_of%3F-instance_method
[11:02:03] workmad3: >> Class.ancestors
[11:02:03] krisquigley: has joined #ruby
[11:02:04] ruboto: workmad3 # => [Class, Module, Object, Kernel, BasicObject] (https://eval.in/446171)
[11:04:21] norc: How can Module be a class then?
[11:04:42] norc: Naively I would expect Module.new to fail.
[11:04:59] jhass: it's self referential at that point, yes
[11:05:02] jhass: &ri Module
[11:05:02] `derpy: http://www.rubydoc.info/stdlib/core/Module
[11:05:10] phutchins: has joined #ruby
[11:05:17] jhass: mmh, where was the diagram
[11:05:20] jhass: &ri Class
[11:05:20] `derpy: http://www.rubydoc.info/stdlib/core/Class
[11:05:46] workmad3: norc: there's a couple of cycles in the dependency graph at the lowest levels in ruby, which get bootstrapped into existence in the interpreter with C
[11:06:15] Guest40271: has joined #ruby
[11:06:20] ndrei: has joined #ruby
[11:06:26] norc: workmad3: Alright. I was worried that I saw a circular dependency when there was none.
[11:06:43] norc: jhass: Oh yeah, that graph helps.
[11:07:03] shredding: has joined #ruby
[11:07:20] herbst: has joined #ruby
[11:08:08] rodfersou: has joined #ruby
[11:09:56] shredding: has joined #ruby
[11:10:20] ByronJohnson: has joined #ruby
[11:10:37] [k-: they should make it clear that the arrow head ^ means inherited from
[11:10:57] nateberkopec: has joined #ruby
[11:10:59] [k-: i had a natural tendency to think that ^ meant inherits
[11:11:34] giuseppesolinas: has joined #ruby
[11:13:21] joonty: has joined #ruby
[11:14:25] shredding: has joined #ruby
[11:15:37] pontiki: has joined #ruby
[11:15:58] ljarvis: aren't those the same thing
[11:16:05] DEA7TH: has joined #ruby
[11:16:35] [k-: oh yea, i meant ... i have no idea
[11:16:59] [k-: oh ^ means is the superclass of
[11:17:19] steeljav: has joined #ruby
[11:17:22] doddok: has joined #ruby
[11:18:29] Shoutsid: has joined #ruby
[11:18:37] workmad3: [k-: yeah, it uses an ascii representation of fairly standard UML diagrams there ;)
[11:18:41] jgt: has joined #ruby
[11:19:24] [k-: not everyone knows uml diagrams
[11:19:37] [k-: (i clearly show i don't)
[11:19:54] beast: Keep calm and code in Ruby
[11:20:02] datanoise: has joined #ruby
[11:21:08] unshadow: has joined #ruby
[11:21:54] cgfbee: has joined #ruby
[11:24:10] waheedi: has joined #ruby
[11:27:01] dionysus69: has joined #ruby
[11:27:26] TheTrueBrot: has joined #ruby
[11:28:41] davedev24: has joined #ruby
[11:30:06] TheTrueBrot: has left #ruby: ("Leaving")
[11:30:14] syath: has joined #ruby
[11:30:19] arup_r: has joined #ruby
[11:32:46] charliesome: has joined #ruby
[11:35:07] davedev24: has joined #ruby
[11:37:46] arup_r: has joined #ruby
[11:38:24] arup_r1: has joined #ruby
[11:38:48] Spami: has joined #ruby
[11:39:18] Ilyes512: has joined #ruby
[11:41:58] ldnunes: has joined #ruby
[11:42:00] darkxploit: has joined #ruby
[11:42:16] JDiPierro: has joined #ruby
[11:43:18] phutchins1: has joined #ruby
[11:43:47] leo19: has joined #ruby
[11:47:08] devoldmx: has joined #ruby
[11:47:32] dionysus69: has joined #ruby
[11:51:09] _el_fer_: has joined #ruby
[11:52:00] cfjk: has joined #ruby
[11:52:55] norc: >> foo = []; def foo.bar; 1; end; foo.bar
[11:52:56] ruboto: norc # => 1 (https://eval.in/446179)
[11:53:05] norc: How does this work? Which class is bar being added to?
[11:53:26] jhass: >> [].singleton_class
[11:53:27] ruboto: jhass # => #<Class:#<Array:0x4169c47c>> (https://eval.in/446182)
[11:53:33] joonty: has joined #ruby
[11:53:48] jhass: norc: https://www.youtube.com/watch?v=by5fFOBhtPQ
[11:53:51] sdothum: has joined #ruby
[11:54:40] norc: jhass: Awesome. I think I have been craving for something like this. :)
[11:55:17] ndrei: has joined #ruby
[11:55:25] lkba: has joined #ruby
[11:55:38] jokke-: has joined #ruby
[11:56:26] cfjk: hello. what is the best way to set instance variables dynamically? send("#{my_var}=", value)? instance_variable_set("@#{my_var}", value)? is there any other proper or correct way?
[11:56:58] jhass: the latter, the former just calls a method that may or not set an instance variable of the same name
[11:57:08] jhass: if you do that a lot, chances are you meant to use a hash instead
[11:57:13] fullofcaffeine: has joined #ruby
[11:58:10] cfjk: i have to add that all those variables are attr_accessor if that changes anything.
[11:58:35] apeiros: IMO even if you don't do it often (chances are that you want/should use a hash)
[11:58:58] cfjk: thank you.
[11:59:36] rubybeginner: has joined #ruby
[11:59:42] [k-: if those are attr_accessors already, use =
[11:59:55] jhass: [k-: why?
[12:00:12] apeiros: job security device through increase of abstraction
[12:00:12] [k-: he wants to mutate the value, no?
[12:00:26] apeiros: always a good move</sarcasm>
[12:00:41] [k-: myclass.my_already_attr_writeable = something
[12:01:12] [k-: it is optimised in ruby and its clear and straight to the point
[12:01:13] jhass: so what's your argument for using the former over the latter?
[12:01:15] apeiros: ok, if they don't use ivar_set on self, then I'm onboard with using the accessor
[12:01:29] [k-: im not arguing for send
[12:01:30] apeiros: otherwise ivar_set > setter IMO
[12:01:42] [k-: im arguing for using the = directly
[12:01:44] apeiros: I guess you missed the question then
[12:01:53] apeiros: you know, the *dynamically* part ;-)
[12:01:54] jhass: [k-: how do you do that _dynamically_?
[12:02:05] [k-: welllllllll
[12:02:57] tknz: has joined #ruby
[12:04:25] ddv: via magic
[12:05:22] subscope: has joined #ruby
[12:06:08] apeiros: ACTION hands ddv some pixie dust
[12:06:23] apeiros: I hear wizards sand helps with such problems too
[12:06:34] [k-: those are by far not the only ways tho *wink*
[12:06:38] apeiros: oh, sorcerer's sand
[12:07:29] skade: has joined #ruby
[12:07:32] tvw: has joined #ruby
[12:08:24] [k-: public_send (since attr_accessor), instance_eval, eval, etc
[12:08:51] Trynemjoel: has joined #ruby
[12:10:00] bruno-: has joined #ruby
[12:10:13] k3asd`: has joined #ruby
[12:10:27] Kendos-Kenlen: has joined #ruby
[12:11:01] apt-get: has joined #ruby
[12:15:02] bruno-: has joined #ruby
[12:15:31] Shoutsid: has joined #ruby
[12:15:44] shmoon_: has joined #ruby
[12:17:19] jun: has joined #ruby
[12:19:14] unshadow: has joined #ruby
[12:20:01] bruno-: has joined #ruby
[12:20:15] s00pcan: has joined #ruby
[12:20:30] jun: has joined #ruby
[12:20:39] jgt: has joined #ruby
[12:21:44] dhjondoh: has joined #ruby
[12:22:30] hectortrope: has joined #ruby
[12:23:50] DoubleMalt: has joined #ruby
[12:23:52] Trynemjoel: has joined #ruby
[12:24:09] atmosx: has joined #ruby
[12:25:04] bruno-: has joined #ruby
[12:26:23] krz: has joined #ruby
[12:26:33] unshadow: has joined #ruby
[12:27:39] ndrei: has joined #ruby
[12:28:03] xcesariox: has joined #ruby
[12:28:10] hal_9000_: has joined #ruby
[12:29:34] Ilyes512: has joined #ruby
[12:29:51] krz: has joined #ruby
[12:30:02] bruno-: has joined #ruby
[12:33:06] renderful: has joined #ruby
[12:33:56] icbm: has joined #ruby
[12:35:00] bruno-: has joined #ruby
[12:37:22] gusTester: has joined #ruby
[12:37:22] TheWhip: has joined #ruby
[12:37:28] beast: Ruby Ruby Ruby...
[12:37:59] sgambino: has joined #ruby
[12:38:18] sdwrage: has joined #ruby
[12:39:31] alienaut: has joined #ruby
[12:40:02] bruno-: has joined #ruby
[12:40:55] ddv: the song?
[12:41:26] mwlang: has joined #ruby
[12:41:51] _blizzy_: has joined #ruby
[12:42:00] Cyther: has joined #ruby
[12:43:23] roshanavand: has joined #ruby
[12:43:31] [k-: has joined #ruby
[12:44:06] evanjs: has joined #ruby
[12:45:03] bruno-: has joined #ruby
[12:45:53] dstarh: has joined #ruby
[12:45:54] ddv: don't leave me hanging here
[12:47:19] adaedra: ACTION cuts ddv's rope
[12:47:32] karapetyan: has joined #ruby
[12:47:53] antgel: has joined #ruby
[12:48:14] UtkarshRay: has joined #ruby
[12:49:20] patchedmonkey: has joined #ruby
[12:49:43] ndrei: has joined #ruby
[12:50:04] bruno-: has joined #ruby
[12:50:28] devoldmx: has joined #ruby
[12:55:02] bruno-: has joined #ruby
[12:56:06] amystephen: has joined #ruby
[12:56:21] dorei: has joined #ruby
[12:57:22] arup_r1: has left #ruby: ()
[12:58:28] skweek: has joined #ruby
[12:59:17] joonty: has joined #ruby
[12:59:49] Skelz0r: has joined #ruby
[13:00:07] e1senhorn: has joined #ruby
[13:00:07] bruno-: has joined #ruby
[13:00:10] greenarrow: has joined #ruby
[13:00:14] roshanavand: has joined #ruby
[13:00:14] tier: has joined #ruby
[13:01:42] JDiPierro: has joined #ruby
[13:05:06] bruno-: has joined #ruby
[13:05:15] spcmastertim: has joined #ruby
[13:06:37] cdg: has joined #ruby
[13:06:57] cdg: has joined #ruby
[13:07:00] umgrosscol: has joined #ruby
[13:08:02] voker57: has joined #ruby
[13:08:41] Jackneill: has joined #ruby
[13:10:08] bruno-: has joined #ruby
[13:11:12] `tim`: has joined #ruby
[13:12:03] blackmesa: has joined #ruby
[13:12:23] atomical: has joined #ruby
[13:12:25] freerobby: has joined #ruby
[13:12:26] krisquigley: has joined #ruby
[13:12:33] User458764: has joined #ruby
[13:12:39] pawnbox: has joined #ruby
[13:14:26] Guest53: has joined #ruby
[13:14:27] odigity: rubydoc is down (503 error): http://www.rubydoc.info/
[13:14:55] pontiki: try ruby-doc.org
[13:15:54] ericjphillips: has joined #ruby
[13:16:44] dhjondoh: has joined #ruby
[13:16:57] odigity: ruby-doc.org is doing fine, but that's fore ruby core/stdlib, not gems.
[13:17:04] S_Walker: has joined #ruby
[13:17:18] adaedra: odigity: can happens on some pages. Try to get to the page of the gem you want directly.
[13:17:35] odigity: adaedra, I tried the home page. the whole site is down.
[13:17:46] odigity: wait, now it's back
[13:17:47] adaedra: Works for me.
[13:18:03] odigity: was down two min ago. guess it's fixed
[13:18:25] ndrst: has joined #ruby
[13:18:33] [k-: the world temporary ended, when a gem died
[13:19:54] bruno-: has joined #ruby
[13:21:18] UtkarshRay: has joined #ruby
[13:21:27] TheWhip: has joined #ruby
[13:21:36] datanoise: has joined #ruby
[13:23:08] gizmore: has joined #ruby
[13:24:37] shinnya: has joined #ruby
[13:25:10] newdan: has joined #ruby
[13:25:14] ndrei: has joined #ruby
[13:25:23] bruno-: has joined #ruby
[13:25:41] trautwein: has joined #ruby
[13:26:03] davedev24: has joined #ruby
[13:26:23] shevy: your face ended!
[13:27:36] bkulbida: has joined #ruby
[13:29:44] platzhirsch: hello madames and sirs
[13:29:56] platzhirsch: as it happens, I am now a Node developer
[13:30:10] certainty: shevy: lol, that was unexpected
[13:30:14] platzhirsch: Announcement complete
[13:30:27] bruno-: has joined #ruby
[13:30:36] shevy: platzhirsch damn
[13:30:37] certainty: you have my condolence
[13:30:48] platzhirsch: shevy: I know, this came unexpected
[13:31:00] shevy: rename pending to "nodehirsch"
[13:31:47] chthon: has joined #ruby
[13:32:06] blackmesa: has joined #ruby
[13:32:35] casadei: has joined #ruby
[13:33:40] jgpawletko: has joined #ruby
[13:33:41] nfk|laptop: has joined #ruby
[13:34:04] platzhirsch: yorickpeterse: can you paste your "Emoji"
[13:34:06] platzhirsch: I can't find it
[13:35:28] bruno-: has joined #ruby
[13:35:38] [k-: ???/(0>0)_\
[13:35:47] [k-: i think it looks like this, somewhat
[13:36:00] devdazed: has joined #ruby
[13:37:56] adaedra: ???( ??? )???
[13:38:37] ankhers: has joined #ruby
[13:39:51] davispuh: has joined #ruby
[13:40:27] bruno-: has joined #ruby
[13:41:55] ankhers: has joined #ruby
[13:42:24] InternetFriend: has joined #ruby
[13:42:41] krisquigley: has joined #ruby
[13:43:29] fullofcaffeine: has joined #ruby
[13:43:32] techsethi: has joined #ruby
[13:43:37] balazs_: has joined #ruby
[13:44:53] ankhers: has joined #ruby
[13:45:30] bruno-: has joined #ruby
[13:47:09] whippythellama: has joined #ruby
[13:47:10] ponga: has joined #ruby
[13:47:11] kobain: has joined #ruby
[13:48:22] riotjones: has joined #ruby
[13:48:41] tkuchiki: has joined #ruby
[13:50:00] roshanavand: has joined #ruby
[13:50:30] bruno-: has joined #ruby
[13:54:31] sanguisdex: has joined #ruby
[13:55:31] bruno-: has joined #ruby
[13:56:06] lkba: has joined #ruby
[13:56:12] CloCkWeRX: has joined #ruby
[13:57:15] benlieb: has joined #ruby
[13:58:48] sankaber: has joined #ruby
[13:59:54] bigmac: has joined #ruby
[14:00:14] mrchris: has joined #ruby
[14:01:13] naztharune: has joined #ruby
[14:02:48] balazs_: has joined #ruby
[14:05:04] antgel: has joined #ruby
[14:06:10] TheWhip: has joined #ruby
[14:06:44] ksteck: has joined #ruby
[14:07:27] Motoservo: has joined #ruby
[14:13:33] moty66: what do you recommend to use Apache2 or nginx to deploy a rails app on a 2 core server and 2GB of ram? my app uses about 100MB of ram for each process and I expect t oget 1K users each day
[14:13:47] pwnd_nfsw: has joined #ruby
[14:14:11] Timba-as_: has joined #ruby
[14:15:05] Shoutsid: has joined #ruby
[14:15:40] apeiros: moty66: 1k users is "low traffic". either should handle it easily.
[14:16:01] moty66: yes, I don't expect to get lot of traffic
[14:16:04] DoubleMalt: has joined #ruby
[14:16:09] [k-: that is like a slap in the face
[14:16:27] [k-: poor moty66
[14:16:44] moty66: [k-: 1K is good enough for me :D
[14:16:45] beauby: has joined #ruby
[14:16:51] User458764: has joined #ruby
[14:17:44] Rodya_: has joined #ruby
[14:18:24] axl_: has joined #ruby
[14:19:06] bruno-: has joined #ruby
[14:19:15] moty66: so apache2 and passenger is a good idea?
[14:19:42] ankhers: has joined #ruby
[14:20:48] p0wn3d_: has joined #ruby
[14:21:11] tkuchiki: has joined #ruby
[14:22:13] apeiros: moty66: it works well, yes
[14:22:28] apeiros: [k-: I don't think that's a slap in the face
[14:22:43] sankaber: has joined #ruby
[14:22:48] apeiros: 1K/d is more than many sites will get
[14:22:50] codeurge: has joined #ruby
[14:23:06] krisquigley: has joined #ruby
[14:23:45] InternetFriend: has joined #ruby
[14:24:36] [k-: i wouldn't know, i wouldn't know
[14:25:24] simplyianm: has joined #ruby
[14:25:29] rickmasta: has joined #ruby
[14:25:36] apeiros: your face would know
[14:25:48] rdark: has joined #ruby
[14:26:24] moty66: it also depend on how much each single user pay for your service
[14:26:37] marr: has joined #ruby
[14:26:40] [k-: your face is a joke!
[14:26:41] moty66: my customers pay 1024??? each day to use my app
[14:26:45] moty66: ACTION is kidding
[14:27:04] evanjs: has joined #ruby
[14:27:27] niftylettuce: has joined #ruby
[14:28:07] chouhoulis: has joined #ruby
[14:28:50] WizJin: has joined #ruby
[14:29:26] karapetyan: has joined #ruby
[14:30:26] victortyau: has joined #ruby
[14:30:40] based_pdev: has joined #ruby
[14:32:34] ndrei: has joined #ruby
[14:33:03] decoponio: has joined #ruby
[14:36:00] pawnbox: has joined #ruby
[14:37:24] sanguisdex: has joined #ruby
[14:39:23] davispuh: has joined #ruby
[14:39:31] EminenceHC: has joined #ruby
[14:39:36] David27: has joined #ruby
[14:40:29] podman: has joined #ruby
[14:41:23] noethics: has joined #ruby
[14:43:10] arup_r: has joined #ruby
[14:44:26] atomical_: has joined #ruby
[14:45:45] fullofcaffeine: has joined #ruby
[14:46:25] r00t_: has joined #ruby
[14:46:32] ndrei: has joined #ruby
[14:46:35] slash_nick: moty66: bitcoin trading site?
[14:46:55] moty66: no, it is a speakers site, it was really kidding
[14:47:06] KnownSyntax_: has joined #ruby
[14:47:20] HammyJammy: has joined #ruby
[14:47:21] nertzy3: has joined #ruby
[14:47:37] tercenya_: has joined #ruby
[14:47:41] JDiPierro: has joined #ruby
[14:48:42] face: has joined #ruby
[14:49:59] leafybasil: has joined #ruby
[14:49:59] Kharma: has joined #ruby
[14:49:59] Kharma: has joined #ruby
[14:50:36] darkxploit: has joined #ruby
[14:50:37] roshanavand: has joined #ruby
[14:50:57] Antiarc: has joined #ruby
[14:51:04] m4rCsi: has joined #ruby
[14:51:10] absolutejam: has joined #ruby
[14:51:11] shortdudey123: has joined #ruby
[14:51:12] Sigma00: has joined #ruby
[14:51:13] devoldmx: has joined #ruby
[14:51:18] Scient: has joined #ruby
[14:51:23] doddok: has joined #ruby
[14:51:31] kurzweil: has joined #ruby
[14:51:45] amoeba`: has joined #ruby
[14:52:08] claw: has joined #ruby
[14:53:11] xcesariox: has joined #ruby
[14:53:36] patrick_star: has joined #ruby
[14:53:41] yorickpeterse: platzhirsch: ???(???)???
[14:55:09] maikowblue: has joined #ruby
[14:55:30] leafybas_: has joined #ruby
[14:55:43] tjohnson: has joined #ruby
[14:56:10] fullofcaffeine: has joined #ruby
[14:56:41] baroquebobcat: has joined #ruby
[14:57:05] Puffball: has joined #ruby
[14:57:22] Guest6328: has joined #ruby
[14:58:03] DmitryBochkarev: has joined #ruby
[14:58:04] erasmus: has joined #ruby
[14:59:12] EminenceHC: has joined #ruby
[15:00:01] cschneid_: has joined #ruby
[15:00:19] atomical: has joined #ruby
[15:00:19] Pupp3tm4st3r: has joined #ruby
[15:00:23] mary5030: has joined #ruby
[15:02:34] bubbys: has joined #ruby
[15:03:25] fedexo: has joined #ruby
[15:03:40] trautwein: has joined #ruby
[15:04:26] dionysus69: has joined #ruby
[15:04:53] InternetFriend: has joined #ruby
[15:05:50] voker57: has joined #ruby
[15:07:05] cantaberry: has joined #ruby
[15:07:39] Alayde: has joined #ruby
[15:09:35] p0wn3d_: has joined #ruby
[15:10:03] rippa: has joined #ruby
[15:12:06] Jardayn: has joined #ruby
[15:12:54] joonty: has joined #ruby
[15:13:02] roshanavand: has joined #ruby
[15:13:06] datanoise: has joined #ruby
[15:13:07] tier_: has joined #ruby
[15:13:35] The_Phoenix: has joined #ruby
[15:13:37] fullofcaffeine: has joined #ruby
[15:16:27] apt-get: has joined #ruby
[15:17:32] astrobunny: has joined #ruby
[15:17:38] tynamite___: has joined #ruby
[15:18:09] InternetFriend: has joined #ruby
[15:20:01] Pupeno_: has joined #ruby
[15:20:02] snockerton: has joined #ruby
[15:20:22] asxbr: has joined #ruby
[15:20:51] mark3: has left #ruby: ("PART ##javascript :PART #RubyOnRails :PART #debian :PART #elixir-lang :PART #git :PART #mysql :PART #nethunter :PART #zsh :PONG :barjavel.freenode.net")
[15:20:52] roshanavand: has joined #ruby
[15:21:32] jokke-: has joined #ruby
[15:21:53] ndrei: has joined #ruby
[15:23:09] eGGsha: has joined #ruby
[15:24:50] Pupeno_W: has joined #ruby
[15:26:20] areologist: has joined #ruby
[15:26:55] areologist: Anyone using the Atom editor for Ruby?
[15:27:12] tynamite___: I prefer sublime text. Microsoft forked Atom to make their own code editor.
[15:28:16] subscope: has joined #ruby
[15:29:01] haylon: has joined #ruby
[15:31:42] Pupeno: has joined #ruby
[15:31:42] Pupeno: has joined #ruby
[15:32:14] riotjones: has joined #ruby
[15:33:04] riotjones: has joined #ruby
[15:33:05] bazbing80: has joined #ruby
[15:33:25] CVTJNII: has joined #ruby
[15:33:34] lenwood: has joined #ruby
[15:33:40] yardenbar: has joined #ruby
[15:33:58] ReK2: has joined #ruby
[15:33:58] ReK2: has joined #ruby
[15:34:05] bl0ndie: has joined #ruby
[15:34:58] havenwood: has joined #ruby
[15:35:30] ngscheurich: has joined #ruby
[15:36:06] tomchapin: has joined #ruby
[15:36:49] tomchapin: has joined #ruby
[15:37:56] bazbing80: class Awesome; def self.go; puts 'class go'; end; def go; puts 'instance go!' end; end;
[15:38:24] bazbing80: I can unbind #go with Awesome.new.instance_method(:go) How can I unbind self.go?
[15:39:17] Zamyatin: has joined #ruby
[15:39:20] [k-: what are you trying to achieve?
[15:39:48] bazbing80: im thinking of making a mocking framework but im not sure how to store the old method in order to reinstate it.
[15:40:18] bazbing80: Awesome (unbound)#go()
[15:40:29] bazbing80: love to be able to get that unbound method for .go
[15:40:43] s00pcan_: has joined #ruby
[15:41:04] wallerdev: has joined #ruby
[15:41:16] darix: bazbing80: because we do not have enough mocking frameworks yet?
[15:41:46] [k-: you could try accessing the singleton class of Awesome
[15:42:03] The_Phoenix: has joined #ruby
[15:42:13] psye: has joined #ruby
[15:42:31] bazbing80: darix: that's the spirit!
[15:42:44] bazbing80: [k-: yeah im trying that
[15:42:58] bazbing80: should work..
[15:43:09] psye: has joined #ruby
[15:43:20] [k-: ah, it's singleton_method
[15:43:30] [k-: a quick look through the docs help
[15:43:37] [k-: try that next time :)
[15:43:47] nfk: has joined #ruby
[15:44:14] [k-: >> Math.singleton_method(:sin)
[15:44:15] ruboto: [k- # => #<Method: Math.sin> (https://eval.in/446284)
[15:44:43] erasmus: has joined #ruby
[15:44:55] jgt: has joined #ruby
[15:45:03] gregf__: >> class Foo; def bar; puts "Bar";end;end; Foo.instance_method(:bar)
[15:45:04] ruboto: gregf__ # => #<UnboundMethod: Foo#bar> (https://eval.in/446285)
[15:45:17] bayed: has joined #ruby
[15:45:21] jpfuentes2: has joined #ruby
[15:45:34] gregf__: [k-: that says unbound method. why does what you;ve done not show it as an unbound method?
[15:45:47] [k-: method will give you a bound method, instance_method will give you an unbound method
[15:46:11] [k-: instance_method is actually defined in Module
[15:46:26] gregf__: but unbind from what :|. a class is the parent of everything
[15:46:34] [k-: whereas singleton_method, public_method and method is defined in Object
[15:46:48] [k-: it is unbounded from the class Foo
[15:46:58] gregf__: ok, fair enough. the reason i asked it was. bazbing80 wanted an unbound class method
[15:47:05] dfockler: has joined #ruby
[15:47:10] ItSANgo: has joined #ruby
[15:47:15] bazbing80: yeah I'm wondering if there's a difference?
[15:47:20] [k-: well, your question wasn't clear then :>
[15:47:38] [k-: there is a difference, that's why they are separate classes!
[15:47:41] bazbing80: I mean a class method is still "bound" to that class? If I understand the meaning of "bound"?
[15:47:44] Sheperson: has joined #ruby
[15:48:13] [k-: yes, that means the context, the jungle, the bananas are located in the Method object
[15:48:35] [k-: everything that the method requires will be in the closure of a Method
[15:48:45] [k-: i dont think that holds true for UnboundMethods
[15:48:50] [k-: let me check
[15:49:26] bazbing80: [k-: is it possible to have an unbound class method? thanks for checking
[15:49:39] [k-: ah, you can also create a UnboundMethod by calling unbind on the Method object
[15:49:51] [k-: >> Math.singleton_method(:sin).unbind
[15:49:52] ruboto: [k- # => #<UnboundMethod: #<Class:Math>#sin> (https://eval.in/446292)
[15:50:10] [k-: http://ruby-doc.org/core-2.2.3/UnboundMethod.html
[15:50:14] bazbing80: nice, thankyou very much let's try this out :)
[15:50:28] bazbing80: that was an ahh of enlightenment, not fear
[15:51:33] [k-: note that you can only bind methods to instances which are kind_of? the class
[15:52:12] [Butch]: has joined #ruby
[15:52:20] [k-: that means the class of the instance must be either the class of the Method, or any derived classes only
[15:52:34] [k-: no other instances of other classes are allowed
[15:53:16] bazbing80: yes I see...that should be fine
[15:53:42] inteq: has joined #ruby
[15:54:08] dagda1: has joined #ruby
[15:54:20] bazbing80: oh hold on, you say bind to instances? Can't bind to uninitialized classes?
[15:55:04] fullofca_: has joined #ruby
[15:55:08] [k-: i believe you can
[15:55:27] WellSaggy: has joined #ruby
[15:55:29] [k-: >> Math.singleton_method(:sin).unbind.bind(Math).call(67)
[15:55:30] ruboto: [k- # => -0.8555199789753223 (https://eval.in/446301)
[15:56:10] jokke|: has joined #ruby
[15:56:23] tkuchiki: has joined #ruby
[15:56:29] bazbing80: [k-: seems good :) thanks again...I'll muck about in pry
[15:56:29] [k-: to define a method on a class, you probably need define_method
[15:57:27] [k-: http://ruby-doc.org/core-2.2.3/Module.html#method-i-define_method
[15:58:13] renderful: has joined #ruby
[15:58:15] Peg-leg: has joined #ruby
[15:58:27] tkuchiki: has joined #ruby
[15:58:31] jokke-: has joined #ruby
[16:00:13] treehug88: has joined #ruby
[16:01:36] havenwood: !kick WellSaggy Be polite.
[16:01:37] ruboto: ruboto kicked WellSaggy: polite.
[16:01:37] ruboto: -o ruboto
[16:02:06] tynamite___: I would have ignored the troll.
[16:02:19] Rutix: has joined #ruby
[16:02:19] Rutix: has joined #ruby
[16:02:28] haylon: Better to kick before it just gets out of hand
[16:02:45] [k-: you will have to take this to #ruby-community
[16:03:27] adaedra: Bring what
[16:03:37] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
[16:03:58] tynamite___: Can anyone help me on this? http://stackoverflow.com/questions/32995744/why-am-i-getting-argumenterror-invalid-encoding
[16:04:04] aquiles: has joined #ruby
[16:04:05] nKulo: has joined #ruby
[16:04:58] G186: has joined #ruby
[16:05:03] dopie: has joined #ruby
[16:05:21] bricker: has joined #ruby
[16:05:35] G186: has joined #ruby
[16:08:26] rcvalle: has joined #ruby
[16:09:26] ta: has joined #ruby
[16:09:59] atomical_: has joined #ruby
[16:11:14] SCHAAP137: has joined #ruby
[16:11:30] tynamite___: Can anyone help me on this? http://stackoverflow.com/questions/32995744/why-am-i-getting-argumenterror-invalid-encoding
[16:11:52] jhass: it came through the first time
[16:13:13] amclain: has joined #ruby
[16:13:21] salmon42: has joined #ruby
[16:13:45] atomical: has joined #ruby
[16:15:50] towski_: has joined #ruby
[16:15:52] krisquigley: has joined #ruby
[16:17:42] inanepenguin: has joined #ruby
[16:17:50] snockerton: has joined #ruby
[16:18:14] InternetFriend: has joined #ruby
[16:18:25] DmitryBochkarev: has joined #ruby
[16:18:41] freerobby: has joined #ruby
[16:21:54] Pupeno: has joined #ruby
[16:21:54] Pupeno: has joined #ruby
[16:22:18] karapetyan: has joined #ruby
[16:22:38] skweek: has joined #ruby
[16:24:48] wallerdev: has joined #ruby
[16:25:11] jokke|: has joined #ruby
[16:25:23] arup_r: How can I refactor my method using ternary operator https://gist.github.com/aruprakshit/e194aa4f719175a6e662
[16:25:28] arup_r: advise please
[16:25:34] arup_r: it seems ugly
[16:25:55] jhass: yes you're using ternary for control flow
[16:25:59] pocketprotector2: has joined #ruby
[16:25:59] jhass: that's usually ugly
[16:26:15] Pupeno_: has joined #ruby
[16:26:21] treehug88: he means how can I refactor this code that's currently using ternary operator. I read it the other way first, too
[16:26:27] treehug88: use if/then
[16:26:28] mary5030: has joined #ruby
[16:26:37] grenierm: has joined #ruby
[16:26:38] fullofcaffeine: has joined #ruby
[16:27:18] Pupeno_: has joined #ruby
[16:27:44] arup_r: ok. No shortcut. Humm
[16:27:59] tkuchiki: has joined #ruby
[16:28:01] bukowski: has joined #ruby
[16:28:05] arup_r: if exist delete..otherwise add.
[16:28:27] bukowski: Hey everyone, where's the triviabot here?
[16:28:52] mary5030: has joined #ruby
[16:29:11] DexterLB: has joined #ruby
[16:29:38] sagax: has joined #ruby
[16:30:12] Pupeno: has joined #ruby
[16:30:30] RobertBirnie: has joined #ruby
[16:31:16] bukowski: has left #ruby: ()
[16:33:14] p0wn3d_: has joined #ruby
[16:33:50] baweaver: has joined #ruby
[16:34:02] simplyianm: has joined #ruby
[16:34:03] riotjones: has joined #ruby
[16:34:16] Kendos-Kenlen: has joined #ruby
[16:34:29] dravine: has joined #ruby
[16:35:33] gguggi: has joined #ruby
[16:36:21] queequeg1: has joined #ruby
[16:38:38] Shoutsid: has joined #ruby
[16:39:06] zenguy_pc: has joined #ruby
[16:39:26] fullofcaffeine: has joined #ruby
[16:40:05] ruboto: I don't know anything about facts
[16:40:14] [k-: ?factoids
[16:40:15] ruboto: you can find an overview of the factoids I know about at http://ruby-community.com/ruboto/facts
[16:40:23] Tuxero: has joined #ruby
[16:41:21] slash_nick: arup_r: you could `params[:asset_id].in?(session[:shared_items]) and session[:shared_items].delete(params[:asset_id]) or session[:shared_items] << params[:asset_id]`
[16:41:37] jhass: ugh, please don't
[16:41:47] [k-: such line
[16:41:56] [k-: why would i even read it
[16:42:25] [k-: >> %%params[:asset_id].in?(session[:shared_items]) and session[:shared_items].delete(params[:asset_id]) or session[:shared_items] << params[:asset_id]%.length
[16:42:27] ruboto: [k- # => 145 (https://eval.in/446361)
[16:42:28] tynamite___: has left #ruby: ()
[16:42:29] adaedra: That's awesome
[16:42:34] Ilyes512: has joined #ruby
[16:42:34] adaedra: Awesomely disgusting
[16:42:54] [k-: oh, a burn
[16:43:48] slash_nick: "lipstick on a pig"
[16:44:37] [k-: hue hue hue
[16:44:39] slash_nick: jhass: i figured if you didn't like using a ternary for control flow, you'd prefer using the control flow operators or whatever they're called
[16:44:43] [k-: what a nice expression
[16:44:52] jhass: no, I prefer if/else
[16:45:30] [k-: did you know that in Agda, if then else is a library function
[16:45:31] slash_nick: [k-: "you can paint gold wings on a piece of shit, but that won't make it fly"
[16:45:34] aquiles: has joined #ruby
[16:45:36] [k-: not a built in
[16:45:46] vondruch: has joined #ruby
[16:45:59] [k-: that is too vulgur
[16:46:04] blackmesa: has joined #ruby
[16:46:09] [k-: and not a nice expression
[16:46:14] apeiros: and/or aren't control flow
[16:46:16] slash_nick: [k-: i'm sorry
[16:46:19] dagda1_: has joined #ruby
[16:46:27] arup_r: I went with if/else.. `? :` was a freaking code.. hehehe
[16:46:34] [k-: i wasn't upset
[16:46:42] amclain_: has joined #ruby
[16:46:46] [k-: apeiros why are they not?
[16:46:51] [k-: what are they then?
[16:47:10] eam: anything flies given enough kinetic energy
[16:47:22] slash_nick: where the hell are the documented? google finds nothing but SO and blog posts
[16:47:25] apeiros: they are logic/logical operators
[16:47:39] slash_nick: apeiros: like && and ||?
[16:47:47] apeiros: yes. with different precedence.
[16:48:01] [k-: avdi suggested to use them for control flow
[16:48:07] eam: apeiros: and/or can do control flow
[16:48:11] apeiros: I guess I disagree with avdi there.
[16:48:14] eam: you can write any ?: as and/or
[16:48:16] TheWhip: has joined #ruby
[16:48:20] apeiros: eam yes, just like ternary can.
[16:48:35] slash_nick: apeiros: and the other bloggers :/ i know they have different precedence (aren't aliases of each other)
[16:49:14] eam: and/or/not are buggy in ruby though
[16:49:27] apeiros: in what way? o0
[16:49:29] eam: >> [true and false]
[16:49:30] ruboto: eam # => /tmp/execpad-7b322bcbbbad/source-7b322bcbbbad:2: syntax error, unexpected keyword_and, expecting ']' ...check link for more (https://eval.in/446362)
[16:49:32] slash_nick: eam: when you sub them in for && and ||
[16:49:34] eam: parser is busted
[16:49:58] apeiros: interesting
[16:50:12] slash_nick: >> [[true and true], [false and false]]
[16:50:14] ruboto: slash_nick # => /tmp/execpad-f0e908f646f7/source-f0e908f646f7:2: syntax error, unexpected keyword_and, expecting ']' ...check link for more (https://eval.in/446364)
[16:50:23] eam: apeiros: remember back when I was commenting on how absolutely ugly the ruby parser was? I was investigating fixing this
[16:50:37] slash_nick: eam: whelp... that is weird
[16:51:07] ericjphillips: has joined #ruby
[16:51:41] eam: def f(x);x;end;"f(true)!f(not true)!f((not true))!f not true!f (not true)".split(?!).map { |exp| begin; eval exp; rescue Exception; "busted: "+exp;end }
[16:51:47] eam: >> def f(x);x;end;"f(true)!f(not true)!f((not true))!f not true!f (not true)".split(?!).map { |exp| begin; eval exp; rescue Exception; "busted: "+exp;end }
[16:51:48] ruboto: eam # => [true, "busted: f(not true)", false, "busted: f not true", false] (https://eval.in/446366)
[16:51:51] slash_nick: >> { foo: true and false } rescue { foo: (true and false) }
[16:51:52] ruboto: slash_nick # => /tmp/execpad-3a4482455afd/source-3a4482455afd:2: syntax error, unexpected keyword_and, expecting '}' ...check link for more (https://eval.in/446367)
[16:52:00] devoldmx: has joined #ruby
[16:52:06] eam: "not true" invokes the same parser bug as "true and false"
[16:52:25] eam: slash_nick: only kinda
[16:52:30] eam: function parens don't work
[16:52:33] eam: f((x)) works
[16:52:39] eam: f(x) doesn't
[16:52:40] slash_nick: >> [(true and false)]
[16:52:41] ruboto: slash_nick # => [false] (https://eval.in/446368)
[16:52:42] eam: f (x) does :)
[16:52:48] User458764: Hi, how do you refer to the instance in class definition?
[16:52:58] eam: >>def f(x); x; end; f (true and false)
[16:52:59] ruboto: eam # => false (https://eval.in/446369)
[16:53:03] eam: >>def f(x); x; end; f(true and false)
[16:53:04] ruboto: eam # => /tmp/execpad-fe3461104202/source-fe3461104202:2: syntax error, unexpected keyword_and, expecting ')' ...check link for more (https://eval.in/446370)
[16:53:14] User458764: jhass like the class strange
[16:53:27] eam: slash_nick: f (x) is parsed as f((x))
[16:53:27] gregf: has joined #ruby
[16:53:34] eam: ruby's parser :(
[16:54:32] apeiros: eam: don't really remember. but I remember whitequark's woes
[16:54:48] apeiros: and I have no difficulty imagining that ruby's parser is horribly complex
[16:54:49] eam: anyway that's why I avoid and/or/not in ruby, because I keep hitting these weird parse issues
[16:55:04] eam: apeiros: it's roughly 10x the size of perl's, if that gives any indication
[16:55:14] [k-: yea, the parser is just weird
[16:55:21] [k-: got caught a few times :(
[16:55:23] jenrzzz: has joined #ruby
[16:55:47] apeiros: eam: heh, ouch
[16:56:04] workmad3: eam: how does it compare to a C++ parser? :)
[16:56:09] apeiros: you're coming from perl? explains why you like and/or for control flow, I guess :D
[16:56:19] eam: thing() or raise "omg"
[16:56:21] apeiros: workmad3: does C++ support trigraphs like C?
[16:56:23] Eiam: has joined #ruby
[16:56:27] eam: workmad3: no clue
[16:56:27] workmad3: apeiros: probably
[16:56:51] eam: to be fair no one builds with trigraph support
[16:57:26] workmad3: apeiros: a quick check seems to indicate 'yes', as the C++ standard has basically imported a large chunk of the C standard there
[16:57:30] treehug88: " In C++17, trigraphs wlil be removed but digraphs will remain."
[16:58:02] ta: has joined #ruby
[16:58:04] eam: I wonder if C++17 will simply not be able to include C headers with trigraphs then (I'm sure there aren't any, because everyone -Wno-trigraphs anyway)
[16:58:17] _djbkd: has joined #ruby
[16:59:21] lkba: has joined #ruby
[16:59:22] EdwardIII: how come "people.each do |p|"? why not "people.each do p"?
[16:59:39] apeiros: EdwardIII: because the former is valid, the latter isn't
[16:59:39] eam: huh, acutally trigraphs are already disabled by default in gcc
[16:59:50] workmad3: EdwardIII: because | is the ruby syntax for block parameters
[17:00:02] apeiros: or well, the latter is valid too, but then you don't get a block param.
[17:00:49] EdwardIII: you know what seems weird? is that there's two of them
[17:00:49] rakm: has joined #ruby
[17:01:39] EdwardIII: this is my first time poking around in ruby, but i've done a lot of python/php/c# etc
[17:02:29] jokke-: has joined #ruby
[17:02:33] petricore: has joined #ruby
[17:02:46] EdwardIII: the equivalent is js would be people.each(function(p){ p.something }); right?
[17:03:02] skade: has joined #ruby
[17:03:03] apeiros: almost, yes
[17:03:13] EdwardIII: mmm almost? how does it differ?
[17:03:19] apeiros: the difference being that in js it's an ordinary argument, while in ruby you can only have one of the special block syntax args
[17:03:25] last_staff: has joined #ruby
[17:03:49] apeiros: you can do people.custom_each(->(p) { p.something }) in ruby too, though. which would be an ordinary argument as well.
[17:03:50] symm-: has joined #ruby
[17:04:15] firstdayonthejob: has joined #ruby
[17:04:18] EdwardIII: so what's the design idea behind ||?
[17:04:28] apeiros: it delimits the arguments of the block
[17:05:09] workmad3: EdwardIII: no, syntactically
[17:05:14] apeiros: syntactically. but I guess it gives a nice visual effect too.
[17:07:16] EdwardIII: i'm just curious that's all
[17:07:29] dagda1: has joined #ruby
[17:07:33] EdwardIII: like, what else could be there if not an argument? how come the parser just can't assume "everything after do but before \n means a block argument?"
[17:07:38] EminenceHC: has joined #ruby
[17:07:56] workmad3: EdwardIII: because '[1,2].each do p "hi" end' is valid
[17:07:56] apeiros: the fact that the \n is not required
[17:08:43] chipotle: has joined #ruby
[17:08:50] workmad3: EdwardIII: or '.each { ... }' as well... the same || syntax for args is used for both do/end and {} blocks :)
[17:09:18] EdwardIII: right, got it
[17:10:13] Trynemjoel: has joined #ruby
[17:10:27] EdwardIII: workmad3: what's the p in this? [1,2].each do p "hi" end
[17:10:32] datanoise: has joined #ruby
[17:10:51] InternetFriend: has joined #ruby
[17:11:38] kobain: has joined #ruby
[17:11:39] [k-: this is the same case in haskell, \x -> x...
[17:11:52] [k-: and in coffeescript x => x
[17:11:58] [k-: and in java 8
[17:12:03] jhass: &ri Kernel#p
[17:12:04] `derpy: http://www.rubydoc.info/stdlib/core/Kernel#p-instance_method
[17:12:11] inanepenguin: has joined #ruby
[17:12:11] nonnatus: has joined #ruby
[17:12:42] [k-: the arguments in the block are actually optional
[17:12:44] EdwardIII: but not like python lambda? f = lambda x: x**2 + 2*x - 5
[17:12:51] _djbkd: has joined #ruby
[17:12:59] n008f4g_: has joined #ruby
[17:13:08] [k-: it is the same, : separates the x as the argument
[17:13:53] [k-: >> (proc do |optional_arg| 1 end).call()
[17:13:54] ruboto: [k- # => 1 (https://eval.in/446411)
[17:14:17] adac: has joined #ruby
[17:14:21] [k-: you notice that i did not supply an argument to .call()
[17:14:31] apeiros: >> f = lambda { |x| x**2 + 2*x - 5 }; f.call(10)
[17:14:32] ruboto: apeiros # => 115 (https://eval.in/446412)
[17:14:59] [k-: >> (lambda do |optional_arg| 1 end).call()
[17:15:00] ruboto: [k- # => wrong number of arguments (0 for 1) (ArgumentError) ...check link for more (https://eval.in/446413)
[17:15:13] [k-: this changes when you use a lambda
[17:15:22] EdwardIII: hmm but then i'd expect to see their names here: https://gist.github.com/EdwardIII/17291e0bb94080b555dc
[17:16:15] [k-: p is a method
[17:16:22] Guest53: has joined #ruby
[17:16:37] [k-: you are calling it without an argument
[17:16:42] Hanmac: has joined #ruby
[17:16:48] Soda: has joined #ruby
[17:16:54] [k-: i think that results in a newline printed or something
[17:16:58] [k-: and it will return nil
[17:17:08] [k-: puts will then print nil
[17:17:15] jhass: p(puts(p()))
[17:17:37] gizmore: has joined #ruby
[17:18:14] [k-: let me show you Something
[17:18:36] EdwardIII: hmm hang on is p() some built-in ruby thing?
[17:18:44] jhass: it's a method
[17:18:50] jhass: see the link above
[17:19:01] EdwardIII: ah, i didn't realise
[17:19:14] jhass: it's similar to puts but calling inspect on the argument and returning it instead of nil
[17:19:30] eam: >> p = :p; p p p p p p p p p
[17:19:31] ruboto: eam # => :p ...check link for more (https://eval.in/446416)
[17:19:33] [k-: https://gist.github.com/SkyBirdSoar/40e0d855b073b9ea16ff
[17:19:53] jhass: eam: not sure if helpful at this point :p
[17:20:44] EdwardIII: i think i've got it
[17:20:47] [k-: https://eval.in/446421
[17:21:06] EdwardIII: i just wanted to understand it a bit better rather than just slavishly writing it
[17:21:09] inanepenguin: has joined #ruby
[17:21:18] subscope: has joined #ruby
[17:22:16] Pharaoh2: has joined #ruby
[17:25:10] EdwardIII: whenever i've seen blocks being used in ruby, they use the magic $_ to handle that job, right? like my @doubles = map {$_ * 2} @numbers;
[17:25:34] EdwardIII: so a ruby block is kinda like that but with a proper name, not magic?
[17:25:56] s2013: has joined #ruby
[17:26:19] towski_: has joined #ruby
[17:26:27] EdwardIII: er sorry heh
[17:26:32] EdwardIII: whenever i've seen blocks being used in perl
[17:27:12] roshanavand: has joined #ruby
[17:28:27] eam: EdwardIII: yes, and more to the point it's really @_ in perl
[17:28:53] eam: which is the equivilent of def f(*args) in ruby
[17:29:11] hooper: has joined #ruby
[17:29:22] EdwardIII: neat ok got it
[17:29:24] EdwardIII: thanks chaps
[17:29:44] hooper: has joined #ruby
[17:30:08] hooper: has joined #ruby
[17:30:15] leat: has joined #ruby
[17:30:43] eam: because in perl you're write map() like sub mymap(&@) { my ($func, @list) = @_; $func->($_) for @list # so $_ is set }
[17:31:20] eam: || is a nice way to structure the my (named args) = @_ boilerplate that perl has
[17:31:38] EminenceHC: has joined #ruby
[17:32:12] eam: (and yeah that perl example doesn't work since I did for ...)
[17:32:57] billylinder: has joined #ruby
[17:34:14] Axy: has joined #ruby
[17:34:43] riotjones: has joined #ruby
[17:34:57] postmodern: has joined #ruby
[17:35:11] ladmin: has joined #ruby
[17:38:04] kirun: has joined #ruby
[17:38:15] Trynemjoel: has joined #ruby
[17:39:22] JDiPierro: has joined #ruby
[17:40:27] blackmesa: has joined #ruby
[17:41:55] null_ref: has joined #ruby
[17:42:25] tkuchiki: has joined #ruby
[17:42:53] aaeron: has joined #ruby
[17:43:55] Sirecote: has joined #ruby
[17:45:03] ta: has joined #ruby
[17:45:06] keypusher: has joined #ruby
[17:45:14] dopamean_: has joined #ruby
[17:45:41] blackmesa: has joined #ruby
[17:45:51] tomphp: has joined #ruby
[17:46:07] havenwood: has joined #ruby
[17:46:32] ht__: has joined #ruby
[17:46:34] Shoutsid: has joined #ruby
[17:48:09] Eiam_: has joined #ruby
[17:49:43] bruno-: has joined #ruby
[17:50:34] Asher: has joined #ruby
[17:51:39] prefixed: has joined #ruby
[17:51:53] prefixed: YO. what's the simplest way to check if a process exists in ruby?
[17:52:26] sankaber: has joined #ruby
[17:53:30] zenguy_pc: has joined #ruby
[17:53:32] jhass: send the 0 signal with Process.kill I guess
[17:53:41] pocketprotector-: has joined #ruby
[17:53:53] Pupeno_: has joined #ruby
[17:53:56] dravine: has joined #ruby
[17:54:22] based_pdev_: has joined #ruby
[17:54:53] shmoon_: has joined #ruby
[17:55:09] codecop: has joined #ruby
[17:55:19] shmoon_: any of you make use of state machine ?
[17:55:47] prefixed: ok. let's change that question a bit: how can i determine if a program is running in ruby?
[17:56:01] rushed: has joined #ruby
[17:56:50] Mia: has joined #ruby
[17:57:12] prefixed: ? is not a valid command
[17:57:43] slash_nick: prefixed: i'm confused... you didn't really respond to the suggestion jhass gave you...
[17:57:53] krisquigley: has joined #ruby
[17:58:22] jhass: or waitpid with WNOHANG apparently
[17:58:46] prefixed: how can i get a processes' pid without knowing that the process exists?
[17:58:54] prefixed: this sounds like a chicken / egg issue
[17:59:08] jhass: if you don't have the pid, how do you identify it?
[17:59:10] apeiros: how do you identify a process without a pid?
[17:59:31] prefixed: or ps -ef | grep "program name"
[17:59:32] apeiros: and you grep for what?
[17:59:40] slash_nick: i guess parse for a comand name
[17:59:43] jhass: so your question is "how can I know if any process with the given procname exists"
[17:59:45] prefixed: pgrep "program name"
[17:59:58] jhass: it's not what you asked
[17:59:59] RegulationD: has joined #ruby
[18:00:11] prefixed: good thing you know what i meant now
[18:00:23] slash_nick: high levels of sarcasm detected...
[18:00:25] eam: prefixed: is it a server?
[18:00:26] baweaver: has joined #ruby
[18:00:36] eam: if it's a server, I suggest using the listen socket as the selector
[18:00:45] prefixed: I could just use pgrep, but i'd like a pure-ruby solutiuon
[18:00:50] eam: much more reliable than grepping the commandline
[18:01:07] eam: prefixed: these are all just wrappers around /proc
[18:01:18] jhass: I'm not aware of a stdlib API that allows to list all processes
[18:01:33] eam: jhass: there isn't one, not specified by posix =/
[18:01:51] eam: the commands like ps and so on are, which is why portable code either does the implementation dirty work, or shells out
[18:02:14] eam: (but the formatting isn't well specified either sooo)
[18:02:23] bigmac: has joined #ruby
[18:02:50] eam: prefixed: fuser -n tcp 80 => list of pids listening on :80
[18:02:56] aaeron: has joined #ruby
[18:03:09] eam: if you want to do that in ruby, you'll be looking at /proc/net/tcp and /proc/*/fd/*
[18:03:11] EminenceHC: has joined #ruby
[18:03:19] pocketprotector-: has joined #ruby
[18:03:24] eam: that's by far the most reliable way to get the pid of a server
[18:03:57] fullofcaffeine: has joined #ruby
[18:04:02] haylon: has joined #ruby
[18:06:02] apeiros: eam: fuser over lsof?
[18:06:07] eam: lsof is fine too
[18:06:24] prefixed: eam sorry. it's not a server. I thought you meant "are you running this code on a server"
[18:06:28] eam: prefixed: ah
[18:07:02] eam: prefixed: well, all the data you might use to select a process can be found in /proc - go hunt around and see what you can use
[18:07:16] prefixed: so, it sounds like check the OS and use pgrep if the environment supports it
[18:08:06] atmosx: has joined #ruby
[18:09:11] Sheperson: has joined #ruby
[18:10:14] Sheperson: I am writing a class which is a wrapper around an API
[18:10:33] flyinprogrammer: has joined #ruby
[18:10:38] Sheperson: there are other methods calling my wrapper class methods
[18:10:49] Sheperson: In the dev environment everything works fine
[18:11:00] Sheperson: but for the test env
[18:11:09] Sheperson: I don???t want to call the API
[18:11:09] baweaver: has joined #ruby
[18:11:36] Swappticon: has joined #ruby
[18:11:41] Sheperson: Any idea about how to do this?
[18:12:26] eam: speaking of "no stdlib to enumerate processes" -- anyone know why `ps` used to be setuid root on FreeBSD?
[18:12:44] eam: (it's also the reason why you'd have to recompile userland when upgrading the kernel)
[18:13:03] poguez_: has joined #ruby
[18:13:25] Shoutsid: has joined #ruby
[18:13:31] hephaestus_rg: has joined #ruby
[18:13:45] flyinprogrammer: has left #ruby: ()
[18:14:13] skweek: has joined #ruby
[18:14:20] weaksauce: has joined #ruby
[18:15:05] darix: prefixed: the cleanest way is to launch the program yourself and then have the program running without daemonize. that way you can easily track it
[18:15:12] keypusher: prefixed: many processes will write their pid out to a file somewhere. on my servers, they are under /var/run, ymmv
[18:15:35] darix: and i would look at what bluepill/unicorn do for process management
[18:16:04] freezevee: has joined #ruby
[18:16:17] jhass: or god/monit/eye/daemontools/systemd/whatever, but ++ for a supervisor
[18:16:50] bb010g: has joined #ruby
[18:17:04] Pharaoh2: has joined #ruby
[18:17:31] baweaver: hehe, eye has a mess of a codebase
[18:17:44] baweaver: considered contributing once but man is that thing a monster
[18:17:45] darix: since i got systemd i stopped using other supervisors
[18:18:16] jhass: baweaver: but the least worst config DSL IMO
[18:18:37] baweaver: I just remember it taking 3 hours to run their "unit" tests
[18:18:48] keypusher: sheperson: problem is often solved by mocking out the API. you could have static files in your test env that contain json similar to what the API returns, and use those in the mock
[18:19:20] Sheperson: keypusher: Do you know of any examples?
[18:19:24] jhass: baweaver: sure we're talking about the same eye? https://travis-ci.org/kostya/eye
[18:19:55] chrisja: has joined #ruby
[18:19:56] tomchapin: has joined #ruby
[18:20:16] Sheperson: keypusher: Like a gem or something
[18:20:36] baweaver: jhass: it's been a few years
[18:20:47] prestorium: has joined #ruby
[18:21:04] EminenceHC: has joined #ruby
[18:21:10] baweaver: but still enough of an annoyance that I didn't want to go back after that.
[18:21:48] keypusher: sheperson: https://github.com/rspec/rspec-mocks you would use something like this i think. the basic idea is to replace certain methods of your class with stubbed/mocked out methods
[18:21:55] atmosx: eam: -r-xr-xr-x 1 root wheel 42264 17 ?????? 15:47 /bin/ps <--- it's not +s
[18:22:06] Sheperson: thanks keypusher
[18:22:09] keypusher: sheperson: i've done this in other languages but not personally familiar with the ruby tools for it
[18:22:14] atmosx: eam: if it were, it would reside in /sbin/ anyway..
[18:22:40] atmosx: eam: an 'used to be'. No idea.
[18:24:08] tomchapin: has joined #ruby
[18:24:22] p0wn3d__: has joined #ruby
[18:24:23] jackjackdripper: has joined #ruby
[18:25:00] dmolina: has joined #ruby
[18:25:14] eam: atmosx: it's not anymore
[18:25:24] eam: hasn't been since FreeBSD got a /proc ;)
[18:25:43] eam: it used to open up /dev/kmem and walk the kernel structures directly ...
[18:26:07] EdwardIII: hmm if i try and access a key that doesn't exist in a hash, it doesn't error?
[18:26:12] DoubleMalt: has joined #ruby
[18:26:17] jackjackdripper: has joined #ruby
[18:26:34] EdwardIII: just returns nil, hmm
[18:26:41] jhass: EdwardIII: not with #[], some invocations of #fetch do
[18:26:44] davedev24: has joined #ruby
[18:26:49] eam: atmosx: which is why you'd have to rebuild userland -- because if those structures changed and ps wasn't aware -- a kernel upgrade could cause it to segv
[18:27:15] jhass: and nil is just the default, you can set it to other values, see #initialize, #default, #default_proc
[18:27:31] fullofcaffeine: has joined #ruby
[18:27:49] bubbys: has joined #ruby
[18:29:16] EdwardIII: this is all so flexbile, it's a bit scary heh
[18:31:48] _aeris_: has joined #ruby
[18:32:17] tomchapin: has joined #ruby
[18:33:02] mprelude: has joined #ruby
[18:33:44] p0wn3d_: has joined #ruby
[18:34:25] `based_pdev`: has joined #ruby
[18:34:56] giuseppesolinas: has joined #ruby
[18:35:30] riotjones: has joined #ruby
[18:35:40] Guest53: has joined #ruby
[18:36:23] cdg: has joined #ruby
[18:37:20] skade: has joined #ruby
[18:37:23] EminenceHC: has joined #ruby
[18:40:07] leafybasil: has joined #ruby
[18:41:54] ericjphillips: has joined #ruby
[18:43:09] p0wn3d__: has joined #ruby
[18:43:43] naftilos76: has joined #ruby
[18:43:48] anisha: has joined #ruby
[18:44:25] rushed: has joined #ruby
[18:44:39] sepp2k: has joined #ruby
[18:45:11] fullofcaffeine: has joined #ruby
[18:45:21] Macaveli: has joined #ruby
[18:45:42] rushed: has joined #ruby
[18:45:47] User4587_: has joined #ruby
[18:45:57] Macaveli: has joined #ruby
[18:46:24] ellisTAA: has joined #ruby
[18:47:31] michaeldeol: has joined #ruby
[18:47:59] s2013: has joined #ruby
[18:48:52] ndrei: has joined #ruby
[18:49:02] diegoviola: has joined #ruby
[18:49:11] atomical: has joined #ruby
[18:49:13] tangentstorm: has joined #ruby
[18:49:39] InternetFriend: has joined #ruby
[18:51:39] inanepenguin: has joined #ruby
[18:52:29] gizmore: has joined #ruby
[18:52:44] devoldmx: has joined #ruby
[18:53:30] paulcsmith: has joined #ruby
[18:55:30] jamesaxl: has joined #ruby
[18:56:13] alveric: has joined #ruby
[18:57:28] bap1313: has joined #ruby
[18:57:42] xaoz: has joined #ruby
[18:57:48] Agoldfish: has joined #ruby
[18:57:51] ta: has joined #ruby
[18:59:08] Pharaoh2: has joined #ruby
[19:00:08] simplyianm: has joined #ruby
[19:00:36] dstarh: has joined #ruby
[19:02:51] jessemcgilallen: has joined #ruby
[19:04:19] tier: has joined #ruby
[19:04:46] zenguy_pc: has joined #ruby
[19:05:42] rushed: has joined #ruby
[19:07:00] Kendos-Kenlen: has joined #ruby
[19:08:37] BlackCoyote: has joined #ruby
[19:08:37] chandlerbing: has joined #ruby
[19:08:50] dagda1_: has joined #ruby
[19:09:03] patchedmonkey: has joined #ruby
[19:09:22] gusTester: has joined #ruby
[19:09:33] chino: has joined #ruby
[19:10:20] prefixed: does RUBY_PLATFORM not work in some environments?
[19:10:25] romain_t: has joined #ruby
[19:10:25] jenrzzz: has joined #ruby
[19:11:31] tangentstorm: has joined #ruby
[19:11:37] mikecmpbll: has joined #ruby
[19:12:09] shevy: you have so many fake questions prefixed
[19:12:29] agit0: has joined #ruby
[19:12:54] prefixed: this is a real question
[19:13:22] prefixed: It looks like it works on my platform.
[19:13:32] shevy: you don't have any "real" questions
[19:13:47] shevy: you probably scavenge on stackoverflow for some arbitrary fake ones to ask and waste people's time
[19:14:08] prefixed: that'd be pretty insidious actually. nice
[19:14:23] prefixed: look for the most downvoted questions to ask in here
[19:14:40] SenpaiSilver: has joined #ruby
[19:14:45] pipework: Crowdsourcing answers so you can claim the internet points? Lul.
[19:14:49] shevy: ACTION downvotes prefixed 
[19:15:38] prefixed: anyway, so i take it you have no idea what RUBY_PLATFORM is about shevy
[19:15:38] karapetyan: has joined #ruby
[19:15:40] pipework: I don't understand why people think "?" is a response that's ever worth giving.
[19:16:04] shevy: prefixed you don't want to know, that is the problem
[19:16:05] prefixed: pipework it means: "your statement was unclear. please rephrase"
[19:16:09] Kendos-Kenlen_: has joined #ruby
[19:16:11] pipework: prefixed: ?
[19:16:16] shevy: prefix: ?
[19:16:22] shevy: prefixed: ?
[19:16:26] cornerma1: has joined #ruby
[19:16:45] pipework: It doesn't say what was misunderstood or where the confusion is. It's a useless response.
[19:16:48] jokke|: has joined #ruby
[19:17:12] pipework: I usually just ignore the person until they come up with a cogent question that's actually informing about their confusion
[19:17:21] Trynemjoel: has joined #ruby
[19:17:41] prefixed: shevy i think you are a bot
[19:17:44] apeiros: prefixed: where did this question come up for you?
[19:18:17] DEA7TH: has joined #ruby
[19:18:47] prefixed: apeiros I'm trying to detect my OS flavor. Stackoverflow suggests all of these seemingly-overcomplicated methods. I don't understand why people don't just use RUBY_PLAYFORM
[19:18:55] prefixed: *RUBY_PLATFORM
[19:19:02] shevy: a playform
[19:19:55] apeiros: prefixed: I'd use a gem. those usually use RUBY_PLATFORM and/or something from rbconfig
[19:20:17] prefixed: is RUBY_PLATFORM not bullet-proof? if so, why not?
[19:20:21] apeiros: but reinventing that yourself is prone to error. e.g. mistakes like =~ /win/ -> windows - whoops, wrong. darwin matches too.
[19:20:52] fullofcaffeine: has joined #ruby
[19:21:11] Coldblackice_: has joined #ruby
[19:21:15] aquiles: has joined #ruby
[19:22:39] tobyx: has joined #ruby
[19:25:24] romain_t: has joined #ruby
[19:25:29] ascarter_: has joined #ruby
[19:26:08] paulcsmith: has joined #ruby
[19:26:56] LoganG: has joined #ruby
[19:27:39] ndrei: has joined #ruby
[19:27:40] jokke-: has joined #ruby
[19:28:05] EasyCo: has joined #ruby
[19:28:12] ICantCook: has joined #ruby
[19:28:17] chino: it seems that class methods support `super` yet they don't support `super_method`? https://gist.github.com/chino/38cd33fba4eea9613f1e
[19:28:42] jsrn: has joined #ruby
[19:28:55] davedev24: has joined #ruby
[19:29:31] baweaver: has joined #ruby
[19:30:30] apeiros: chino: from where should super_method come?
[19:31:01] chino: B.x calls A.x via super
[19:31:04] apeiros: because I don't think that's in vanilla ruby???
[19:31:15] jhass: apeiros: it actually is
[19:31:23] jhass: new in 2.2 iirc
[19:31:35] chino: http://ruby-doc.org/core-2.2.0/Method.html#method-i-super_method
[19:31:35] yfeldblum: has joined #ruby
[19:32:10] apeiros: interesting. can't call it in an instance either.
[19:32:14] apeiros: that's 2.2.2
[19:32:27] romain_t: has joined #ruby
[19:32:39] apeiros: because it's Method#super_method
[19:32:48] apeiros: chino: you have to get a Method instance first
[19:33:11] apeiros: class B.x; method(:x).super_method; end
[19:33:18] apeiros: in your code example
[19:33:22] jhass: method(__method__).super_method # need more methods
[19:33:31] apeiros: err, s/class/def/ (or just def self.x)
[19:34:16] chino: hm... i swear i was able to use super_method before without doing that
[19:34:25] chino: trying to reproduce
[19:34:40] jm0: has joined #ruby
[19:34:54] s2013: has joined #ruby
[19:35:48] n008f4g_: has joined #ruby
[19:37:57] chino: well thanks I guess I was doing something wrong before
[19:38:06] Kyhz: has joined #ruby
[19:39:09] baweaver: has joined #ruby
[19:40:19] jhass: now I wonder where the , in that sentence is :P
[19:40:54] ddv: everyone makes mistakes
[19:40:55] ddv: no problem
[19:42:12] wottam: has joined #ruby
[19:42:21] ericjphillips: has joined #ruby
[19:44:49] Guest53: has joined #ruby
[19:46:00] mahlon_: has joined #ruby
[19:46:07] slash_nick: prefixed: ? is not a valid command
[19:47:10] umgrosscol: has joined #ruby
[19:47:10] steeljav: has joined #ruby
[19:47:25] diegoaguilar: has joined #ruby
[19:47:46] zz_barkerd427: has joined #ruby
[19:48:06] LiquidInsect: has joined #ruby
[19:48:11] csmb: has joined #ruby
[19:48:16] rushed: has joined #ruby
[19:48:35] xxneolithicxx: has joined #ruby
[19:48:37] yosafbridge: has joined #ruby
[19:49:05] bodie_: has joined #ruby
[19:50:04] yqt: has joined #ruby
[19:51:14] baweaver: has joined #ruby
[19:51:21] beauby: has joined #ruby
[19:51:41] p0wn3d__: has joined #ruby
[19:51:51] niftylettuce: has joined #ruby
[19:52:13] cdg: has joined #ruby
[19:53:32] tahon_: has joined #ruby
[19:54:48] wasamasa: has left #ruby: ("Bye")
[19:56:45] BlackCoyote: has joined #ruby
[19:56:46] unclouded: has joined #ruby
[19:58:45] Pumukel: has joined #ruby
[19:58:47] krisquigley: has joined #ruby
[19:59:13] devoldmx: has joined #ruby
[20:00:40] EminenceHC: has joined #ruby
[20:01:13] baweaver: has joined #ruby
[20:01:21] baroquebobcat_: has joined #ruby
[20:01:31] tier: has joined #ruby
[20:02:06] InternetFriend: has joined #ruby
[20:02:54] hhuijhfdcghhjj: has joined #ruby
[20:04:42] northfurr: has joined #ruby
[20:05:52] ericjphillips: has joined #ruby
[20:06:47] platzhirsch: has left #ruby: ()
[20:07:45] riotjones: has joined #ruby
[20:08:43] riotjones: has joined #ruby
[20:08:54] doddok: has joined #ruby
[20:09:48] sparverius: has joined #ruby
[20:10:06] sparverius: has left #ruby: ()
[20:10:07] jamesaxl|2: has joined #ruby
[20:10:52] jenrzzz: has joined #ruby
[20:12:25] moeabdol: has joined #ruby
[20:12:59] ddtblues: has joined #ruby
[20:13:08] RobertBirnie: has joined #ruby
[20:13:25] _djbkd: has joined #ruby
[20:14:22] datanoise: has joined #ruby
[20:14:37] jamesaxl|2: has joined #ruby
[20:15:29] jamesaxl|3: has joined #ruby
[20:16:36] michaeldeol: has joined #ruby
[20:16:45] ddtblues: has joined #ruby
[20:17:08] ksteck: has joined #ruby
[20:17:32] btrs: has joined #ruby
[20:18:52] arthurix: has joined #ruby
[20:19:41] aaeron: has joined #ruby
[20:20:12] aaeron: has joined #ruby
[20:20:59] wottam: has joined #ruby
[20:23:34] [Butch]: has joined #ruby
[20:23:58] mordocai: has joined #ruby
[20:24:01] D-unit: has joined #ruby
[20:24:37] Kendos-Kenlen_: has joined #ruby
[20:25:26] nettoweb: has joined #ruby
[20:25:30] beast: I'm in love with Ruby, she's so elegant and beautiful that I never want to leave her...!!!
[20:26:48] scottj: has joined #ruby
[20:26:49] CooloutAC: has left #ruby: ("Selakem Shalom, PEACE")
[20:27:49] hhuijhfdcghhjj: has joined #ruby
[20:28:32] inanepenguin: has joined #ruby
[20:29:59] moeabdol: has joined #ruby
[20:30:27] adac: has joined #ruby
[20:30:42] Contigi777: has joined #ruby
[20:31:03] EminenceHC: has joined #ruby
[20:32:01] troulouliou_dev: has joined #ruby
[20:32:12] shevy: beast I like your nick
[20:33:49] beast: 11461173985121.to_s.split(/[356]/).map(&:to_i).map(&:chr).join
[20:35:10] tenderlove: has joined #ruby
[20:35:52] goldfish6744: has joined #ruby
[20:36:13] Oog: has joined #ruby
[20:37:42] inanepenguin: has joined #ruby
[20:37:45] rickmasta: has joined #ruby
[20:38:04] Kyhz: has joined #ruby
[20:40:28] QORRiE: has joined #ruby
[20:43:29] lxsameer: has joined #ruby
[20:43:29] lxsameer: has joined #ruby
[20:44:05] fullofcaffeine: has joined #ruby
[20:44:53] havenn: has joined #ruby
[20:44:56] shevy: yeah, ruby can be very terse
[20:45:05] ndrei: has joined #ruby
[20:45:26] EminenceHC: has joined #ruby
[20:46:16] NeverDie: has joined #ruby
[20:46:45] Nuck: has joined #ruby
[20:47:01] User458764: has joined #ruby
[20:47:54] nettoweb: has joined #ruby
[20:47:55] krisquigley: has joined #ruby
[20:49:47] Kendos-Kenlen: has joined #ruby
[20:49:48] hobodave: has joined #ruby
[20:50:44] renderful: has joined #ruby
[20:52:31] skade: has joined #ruby
[20:53:22] craysiii: has joined #ruby
[20:54:54] bap1313: has joined #ruby
[20:56:02] naftilos76: has joined #ruby
[20:56:58] haylon: Hey everyone, what would putting a class in a class get me? I'm trying to think of a way to put an object in an object. Does that sound like a good idea, or should I look for something different?
[20:57:15] pipework: haylon: 'get me' in what way?
[20:57:30] haylon: could I create an object inside of an object?
[20:57:34] pipework: You can have usages of the `class` keyword inside a class that's also using the `class` keyword.
[20:57:37] haylon: I'm not sure if that's how that works
[20:57:42] pipework: haylon: You can always create objects in objects.
[20:57:48] pipework: haylon: What do you have for code?
[20:58:04] haylon: Nothing yet, pseudo coding, and planning
[20:58:35] pipework: haylon: Ah, well, when you get to code, we'll be here.
[20:58:41] haylon: Thanks for your input though pipework
[20:59:05] haylon: I most definitely will. I needed to rubber ducky with someone who knew what I was asking
[21:00:29] TheWhip: has joined #ruby
[21:01:23] doddok: has joined #ruby
[21:01:25] shmilan: has joined #ruby
[21:02:51] noodles``: has joined #ruby
[21:04:43] noodles``: has left #ruby: ()
[21:05:14] lenwood: has joined #ruby
[21:05:44] BraddPitt: can anyone help me with a design decision for a gem I'm making? Not really asking about code, per se
[21:06:31] ruboto: Just ask your question, if anyone has or can, they will respond.
[21:07:03] havenn: BraddPitt: I'm for it!
[21:07:15] treehug88: don't ask to ask
[21:07:15] BraddPitt: ah, right. Was making sure this was the right place. Anyways, let me explain quickly
[21:07:35] asxbr: has joined #ruby
[21:07:46] BlackCoyote: has joined #ruby
[21:07:49] BraddPitt: I'm making a gem quite similar to Hashicorps Vault. It encrypts secrets.yml, stores it in S3, and allows a client to retrieve and decrypt. I have all that down fine
[21:08:01] BraddPitt: my question is, in order for that to happen the user needs to supply their S3 credentials
[21:08:34] sankaber: has joined #ruby
[21:08:38] BraddPitt: so should I have them supply this by command line (dont like because of bash history), supply in the same secrets.yml file that gets encyrpted and uploaded (feels like security theater) or have them supply it in a 2nd secrets.yml file that never gets uploaded anywhere
[21:08:40] mdih: has joined #ruby
[21:10:34] wnd: has joined #ruby
[21:12:04] jhass: well, what's the point of uploading, backup or is there a retrieval story?
[21:12:22] karapetyan: has joined #ruby
[21:13:01] BraddPitt: retrieval, yes
[21:13:15] AccordLTN: has joined #ruby
[21:13:26] darix: jhass: nobody wants backup, everyone just wants restore.
[21:13:32] BraddPitt: the idea is you add fellow team members as an authenticated IAM user (or whitelist an IP range in AWS) so they can get the secrets.yml for the project without having to pass it around offline
[21:13:38] jhass: so if you put the into the file that's uploaded itself, how would that look?
[21:14:06] jhass: given it wasn't downloaded yet, so it's not an update
[21:14:12] tangentstorm: has joined #ruby
[21:14:17] dikaio: has joined #ruby
[21:14:27] BraddPitt: what do you mean, how would it look?
[21:14:41] jhass: you need the keys to download it, right?
[21:14:56] jhass: or is the S3 public?
[21:15:00] BraddPitt: you need the "master key" to decrypt, and valid AWS credentials for that S3 bucket
[21:15:08] anisha: has joined #ruby
[21:15:11] BraddPitt: that is up to the user but most likely it will be private
[21:15:18] dorei: it's so funny i can't resist spamming it to you xD
[21:15:19] dorei: https://github.com/auchenberg/volkswagen
[21:15:42] BraddPitt: the more I think about it, the more I think it makes sense to have a 2nd yml file that holds master key and S3 credentials
[21:15:42] jhass: so, what's the UX for when doing the initial download, where do the credentials come from if they're stored in the file to be downloaded?
[21:15:47] k3asd`: has joined #ruby
[21:15:59] BraddPitt: no UX, it is a rake task that auto loads it into ENV hash
[21:16:01] goldfish6744: then why not a challenge-response authentication? That way the decryption key never needs to leave the server, and the user still can have access...
[21:16:03] Guest53: has joined #ruby
[21:16:08] KensoDev: has joined #ruby
[21:16:17] jhass: UX means user experience, that's not limited to GUIs
[21:16:27] jhass: a CLI is a UI too
[21:16:43] BraddPitt: rake install or rake refresh
[21:16:46] BraddPitt: the latter simply updates it
[21:16:49] galeido: has joined #ruby
[21:17:17] jhass: shall I ask my question a third time?
[21:17:27] fullofcaffeine: has joined #ruby
[21:17:35] BraddPitt: i'm sorry, i don't intend to be vague
[21:17:48] BraddPitt: I'm not sure I understand what exactly you're requesting
[21:18:00] BraddPitt: im an idiot
[21:18:08] BraddPitt: I just re-read your question
[21:19:24] BraddPitt: well I think that solves it. There should be 2 yml files. 1 has the contents of your secrets and gets de/encrypted, the other simply has the master password for crypto and S3 credentials for the client. The latter never leaves your local machine
[21:19:40] BraddPitt: does this seem sane?
[21:19:42] jhass: sounds about right
[21:19:50] jhass: might even put the latter in $XDG_CONFIG_HOME
[21:19:59] craysiii: seems like security through obscurity
[21:20:08] BraddPitt: thanks jhass, sometimes it just helps to bounce an idea around and talk about it
[21:20:50] xcesariox: has joined #ruby
[21:20:53] pipework: I'd really consider something closer to goldfish6744, unless you like having to re-encrypt when someone is no longer allowed to access the data.
[21:21:08] BraddPitt: yes pipework that was the original idea (to re-encrypt)
[21:21:15] BraddPitt: goldfish6744 can you expand on your idea?
[21:21:49] tomphp: has joined #ruby
[21:21:53] pipework: A challenge-response would allow you to not have to decrypt and not expose the master key. The only thing you'd expose is the actual passphrases they've been able to access that are sent to the client.
[21:21:56] jhass: something that might work better for your design over S3 is to require your team members to have an openpgp key and encrypt for each
[21:22:49] jhass: could even go as far and integrate over something like keybase and validate the associated github account
[21:22:52] pipework: When someone leaves you'll have to change the encrypted secrets, but you'd not have to change the symmetric key which the secrets are encrypted with.
[21:23:28] Timba-as_: has joined #ruby
[21:23:33] BraddPitt: I'm not tied to S3 btw, I chose it because it has easy to implement envelope encryption
[21:23:42] pipework: https://www.meldium.com/ is a thing too.
[21:23:43] BraddPitt: in fact, the upload destination would (ideally) be left up to the user
[21:24:07] dfockler: has joined #ruby
[21:24:14] goldfish6744: BraddPitt, it's how my bank login ID passkey device works like, sort of. The bank, at login, sends you a challenge value (it's a max 8-digit wide number), you type that and your PIN code into the device, and with these two you get a number that's sent back to the bank. They always result in the same hash (by whatever mechanism they use) in the end, so the bank needs to only compare those two.
[21:24:19] jhass: but then I mean they'll have the plaintext keys on their machines anyway, you'll have to change all shared credentials if you want to truly revoke, not just prevent access to new credentials
[21:24:31] goldfish6744: Then it uses its own password to decrypt the stuff you need
[21:24:50] pipework: What I'm curious about but haven't explored myself is how does meldium not hand credentials for a service whose credentials are encrypted in meldium to a team member in a way that would cause you to need to change the service credentials if they leave?
[21:28:26] jhass: I'd love to see more DNSSEC based auth schemes developed. Just list allowed public keys in your DNS, tell services the names that are allowed access, service fetches public key from there, poses challenge to client, client signs challenge, service validates
[21:28:27] existensil: has joined #ruby
[21:28:39] eikood: has joined #ruby
[21:28:40] jhass: revoke access? tell service a name has no longer access
[21:28:46] jhass: change key? just update the DNS
[21:29:02] EminenceHC: has joined #ruby
[21:31:06] mary5030: has joined #ruby
[21:31:09] symm-_: has joined #ruby
[21:31:18] [Butch]: has joined #ruby
[21:31:44] mary5030: has joined #ruby
[21:32:07] BraddPitt: jhass with my current implementation they will have the plaintext secrets.yml regardless
[21:32:08] arthurix_: has joined #ruby
[21:32:19] BraddPitt: but, as most companies currently operate, this is how it is anyways
[21:32:36] jhass: damn shared credentials everywhere
[21:32:46] jhass: kinda sad
[21:32:49] BraddPitt: I mean, regardless, if someone really wanted it they could just print out the ENV hash
[21:32:56] BraddPitt: its a hard problem to solve
[21:33:18] jhass: the hard problem is solved, the open stuff is building nice integrations and UX
[21:34:22] sepp2k1: has joined #ruby
[21:36:21] pipework: jhass: That works for services that either implement that or you control, but most places just do username+password(+totp)
[21:36:33] jhass: that's what I mean with integrations
[21:37:11] pipework: It seems tedious to automate password resets through existing systems though.
[21:37:56] Shoutsid: has joined #ruby
[21:37:57] Kache: has joined #ruby
[21:38:24] Kache: has left #ruby: ()
[21:39:17] k3asd`: has joined #ruby
[21:39:29] jhass: you'd basically replace "enter password" with "enter public key" or better just derive a hostname based on the mail address to retrieve it (me@jhass.eu -> me._pka.jhass.eu TXT) during registration, the WebCryptoAPI then should make login fairly painless too, challenge -> sign challenge -> validate signature
[21:40:04] pipework: I mean, I get it.
[21:40:09] jhass: CLI tools could hook into gpg
[21:40:19] pipework: I've even implemented a neat enough TLS mutual auth system
[21:40:39] diegoaguilar_: has joined #ruby
[21:40:42] chino: has joined #ruby
[21:41:17] chino: so playing with super_method again and seeing some strange behavior? https://gist.github.com/chino/8c7f9833804305d2c498
[21:41:37] stamina: has joined #ruby
[21:42:21] diegoaguilar: has joined #ruby
[21:42:48] jhass: chino: self is B, B#method(:x) gets B#x
[21:42:56] mary5030: has joined #ruby
[21:42:58] ericjphillips: has joined #ruby
[21:43:44] fullofcaffeine: has joined #ruby
[21:44:50] chino: right but it's calling method(:x) from inside of super() call?
[21:44:54] bubbys: has joined #ruby
[21:45:00] jhass: super doesn't change self
[21:46:12] tzl: has joined #ruby
[21:46:23] hephaestus_rg: has joined #ruby
[21:46:59] yfeldblum: has joined #ruby
[21:47:15] symm-: has joined #ruby
[21:47:16] chino: so is there no way to really properly detect if a super method is defined before you call super?
[21:47:28] patchedmonkey: has joined #ruby
[21:48:09] Shoutsid: has joined #ruby
[21:48:16] jhass: superclass.instance_methods.include?(__method__) perhaps?
[21:48:22] ctx: has joined #ruby
[21:48:44] drbrain: defined? super
[21:48:44] chino: i tried that but for example let's assume a layout like A > B > C where it's defined on an A and not B
[21:48:50] wottam: has joined #ruby
[21:49:00] jhass: then you want false?
[21:49:39] chino: like manually walking the superclass chain just felt like I was doing something wrong
[21:50:17] skullcrasher: has joined #ruby
[21:50:41] drbrain: chino: defined? super is the check you want, but you shouldn't care if your parent, grantparent, great-great-grandparent, etc. has an implementation you can super to
[21:51:33] chino: I agree I don't really want to care but I do want to call it if it exists
[21:51:39] jhass: superclass.instance_methods(false).include?(__method__) # if you care, I guess
[21:52:54] chino: oh interesting didn't even know that instance_methods has a include_super arg
[21:52:54] davedev24: has joined #ruby
[21:53:20] jhass: must stuff has, methods, respond_to?
[21:54:31] chino: I did get this to work by crawling the superclass chain but it just felt like I shouldn't have to do that
[21:54:40] chino: let me try out the define? super
[21:56:11] drbrain: >> class A; def m() defined? super; end; end; class B < A; def m() [defined? super, super] end; end; B.new.m
[21:56:12] ruboto: drbrain # => ["super", nil] (https://eval.in/446549)
[21:56:27] matp: has joined #ruby
[21:57:08] yfeldblum: has joined #ruby
[21:57:20] Pupeno: has joined #ruby
[21:57:32] matp: has joined #ruby
[21:58:15] gizmore: has joined #ruby
[21:58:37] matp: has joined #ruby
[21:59:42] matp: has joined #ruby
[22:00:55] devoldmx: has joined #ruby
[22:01:27] fullofcaffeine: has joined #ruby
[22:01:50] baweaver: has joined #ruby
[22:03:19] jenrzzz_: has joined #ruby
[22:03:44] minimalism: has joined #ruby
[22:03:47] tahon__: has joined #ruby
[22:03:55] JDiPierro: has joined #ruby
[22:04:36] Shoutsid: has joined #ruby
[22:04:59] chino: I wonder if the Method#super_method implementation/docs makes sense given this behavior? Ruby docs say, "Returns a Method of superclass, which would be called when super is used". Which to me gave me the impression that it would only return a value if super() would actually work at that moment?
[22:05:33] djcp: has joined #ruby
[22:06:14] lkba_: has joined #ruby
[22:07:09] chino: well I guess since the Method returned was B's then it did work properly it's just confusing
[22:07:12] dorei: chino: it says it returns a method, so i guess it does that
[22:07:51] chino: ok well thanks for help
[22:09:34] riotjones: has joined #ruby
[22:10:40] Seich: has joined #ruby
[22:12:27] tomchapin: has joined #ruby
[22:12:41] Pumukel: has joined #ruby
[22:13:04] agent_white: has joined #ruby
[22:13:22] jhass: chino: in relation to the given Method object. whether you obtained the "right" Method object is a distinct issue from #super_method
[22:14:00] jhass: so the question is rather which Method object #method inside a super call should return
[22:14:43] jhass: now #method is a normal method call itself, if it changes behavior depending on the invocation of the method it is called from, that might be equally confusing
[22:15:46] jhass: say you have def x; method(:y); end; and an override for y in in the subclass and x called through super, would you not expect it to return the y of the subclass?
[22:16:15] Shoutsid: has joined #ruby
[22:16:28] baweaver: has joined #ruby
[22:16:46] htmldrum: has joined #ruby
[22:16:54] chino: right I agree
[22:17:03] chino: honestly I never ever used defined? before
[22:17:22] jhass: s/before// for me
[22:17:42] jhass: haven't decided yet if I'd use it or just rescue in your case yet
[22:17:56] rickmasta: has joined #ruby
[22:18:17] fullofcaffeine: has joined #ruby
[22:20:04] mrchris: has joined #ruby
[22:20:40] chino: rescue crossed my mind but I just felt there should be a way to check similar to block_given?
[22:21:18] infernix: has joined #ruby
[22:21:24] neanderslob: has joined #ruby
[22:24:20] cwong_on_irc: has joined #ruby
[22:26:10] cwong_on_irc: how do i do a if staetment that will be like: if file exist AND shell output returns none 0?. so like the file /path/to/file exist, AND the command output failed, do x
[22:26:29] phutchins1: has joined #ruby
[22:28:20] benlieb: has joined #ruby
[22:30:39] havenwood: has joined #ruby
[22:30:47] michaeldeol: has joined #ruby
[22:30:47] axl_: has joined #ruby
[22:31:50] Shoutsid: has joined #ruby
[22:31:59] datanoise: has joined #ruby
[22:33:42] _aeris_: has joined #ruby
[22:34:17] yfeldblum: has joined #ruby
[22:35:06] jenrzzz: has joined #ruby
[22:36:29] nateberkope: has joined #ruby
[22:36:39] based_pdev_: has joined #ruby
[22:37:05] EminenceHC: has joined #ruby
[22:37:42] mosez: has joined #ruby
[22:37:48] unshadow: has joined #ruby
[22:38:41] ekleog: has joined #ruby
[22:41:31] havenwood: cwong_on_irc: if File.exist?(path) && !system(cmd, path)
[22:42:36] davedev24: has joined #ruby
[22:42:39] havenwood: cwong_on_irc: Kernel#system returns `false` for non-zero exit statuses.
[22:47:52] User458764: has joined #ruby
[22:47:55] Channel6: has joined #ruby
[22:49:15] northfurr: has joined #ruby
[22:49:56] davedev24: has joined #ruby
[22:51:54] teclator: has joined #ruby
[22:52:28] hephaestus_rg: has joined #ruby
[22:52:37] BraddPitt: is there any easy way for a gem to find the root of a project that it is being used in?
[22:52:52] Pharaoh2: has joined #ruby
[22:53:32] mary5030: has joined #ruby
[22:54:11] blackmesa: has joined #ruby
[22:54:22] drbrain: BraddPitt: no, it could parse Kernel#caller which is not an easy or reliable way to determine that
[22:55:38] BraddPitt: right, ok ill just have the user specify then
[22:56:52] ksteck: has joined #ruby
[22:57:57] drbrain: if you're called from `rake`, Dir.pwd is set by default to the directory of the Rakefile
[22:58:03] s2013: has joined #ruby
[22:58:48] luckyme: has joined #ruby
[23:00:51] djcp: has joined #ruby
[23:01:34] fullofcaffeine: has joined #ruby
[23:01:37] fmcgeough: has joined #ruby
[23:02:11] sanjayu: has joined #ruby
[23:03:55] jgt: has joined #ruby
[23:04:14] chipotle: has joined #ruby
[23:04:54] cwong_on_irc: havenwood: let me try that thanks.
[23:04:56] crdpink: has joined #ruby
[23:05:15] johnzorn: has joined #ruby
[23:05:17] yfeldblum: has joined #ruby
[23:10:51] yfeldblum: has joined #ruby
[23:11:24] BraddPitt: oh thanks drbrain didn't think about that
[23:13:21] arthurix: has joined #ruby
[23:14:24] BTRE: has joined #ruby
[23:14:43] fullofcaffeine: has joined #ruby
[23:15:30] matp: has joined #ruby
[23:16:10] bkulbida: has joined #ruby
[23:17:04] Ropeney: has joined #ruby
[23:18:31] davedev24: has joined #ruby
[23:24:49] rushed: has joined #ruby
[23:26:41] BraddPitt: similar to how rails can do rake_tasks(&block) to load external rake tasks in a railtie, can I do something similar for a non-rails app?
[23:27:13] diegoviola: has joined #ruby
[23:29:15] drbrain: BraddPitt: you can require them from anywhere
[23:31:23] matp: has joined #ruby
[23:31:37] fullofcaffeine: has joined #ruby
[23:32:07] Pharaoh2: has joined #ruby
[23:32:35] riotjones: has joined #ruby
[23:34:00] atomical: has joined #ruby
[23:34:34] lethjakman: has joined #ruby
[23:36:07] BraddPitt: i mean automatically do it, as the railtie would do for rails
[23:38:54] shinnya: has joined #ruby
[23:39:18] aaeron: has joined #ruby
[23:39:32] drbrain: the user would need to trigger it somehow
[23:39:53] drbrain: you can run code on require, so that's an option
[23:43:18] arthurix_: has joined #ruby
[23:43:50] alveric_: has joined #ruby
[23:44:17] nateberkopec: has joined #ruby
[23:45:17] v4n: has joined #ruby
[23:48:43] Pharaoh2: has joined #ruby
[23:50:02] rushed: has joined #ruby
[23:50:17] Shoutsid: has joined #ruby
[23:50:54] paulcsmith: has joined #ruby
[23:51:39] chouhoulis: has joined #ruby
[23:52:11] workmad3: has joined #ruby
[23:52:33] aaeron: has joined #ruby
[23:54:12] deg-: has joined #ruby
[23:57:14] FernandoBasso: has joined #ruby
[23:57:24] RegulationD: has joined #ruby
[23:58:04] fullofca_: has joined #ruby