« Back to channel list

#ruby - 21 October 2018

« Back 1 day Forward 1 day »
[00:01:26] c-c: ok, I'll be sure to watch that when I have extra 30 minutes
[00:01:51] phaul: you wasted a lot more already :)
[00:02:45] phaul: I have to go. good luck
[00:02:54] c-c: I'm not going to use monads. 8) Replying to a code paste with a video - thats basically blowing someone off.
[00:03:34] c-c: Sad that I couldn't use your suggestions, but remember succint, on-topic, to-the-point
[00:04:45] c-c: best accept facts: my question is broad, and its hard to provide answer to it, unles you already have a code-example.
[00:13:16] c-c: Maslows Hammer
[00:13:39] c-c: - When you've been studying/using X, all problems look like you should use X to solve them
[00:16:02] kurko_: has joined #ruby
[00:19:25] Frankenstein: has joined #ruby
[00:31:37] orbyt_: has joined #ruby
[00:34:22] marmotini_: has joined #ruby
[00:35:53] themsay: has joined #ruby
[00:39:46] mroutis: What's the name of this "early return" from functions, instead of nesting a lot of "if" cases?
[00:41:31] mroutis: guard clauses!
[00:42:10] mroutis: it was not a trivia, just me fighting my memory out loud
[00:44:43] baweaver: yep, guard clause.
[00:49:38] c-c: - that video *is* great and makes me wonder if I should monad
[00:51:01] m27frogy: has joined #ruby
[00:52:13] c-c: Ah well, 4 am soon, maybe I'll go dream of eventually optionals
[00:58:12] cxl: has joined #ruby
[00:58:46] cxl: Hi, I can't wrap my head around this one: is there a difference between using self or the class name: https://dpaste.de/UzcZ ?
[01:00:25] baweaver: one is generic and doesn't require you renaming everything if the class name changes or you want to move it somewhere else.
[01:00:45] cxl: so they are equivalent, but the first is prefered?
[01:01:04] baweaver: Pretty much.
[01:01:07] cxl: Or is there ever a good reason to use the class name instead of self?
[01:16:07] ur5us: has joined #ruby
[01:18:09] cxl: wait, there is a difference, but I can't tell what it is. In this code: https://dpaste.de/poKn, if I replace all the User. with self., and then do User.first.remember in the rails console, it can't find the new_token method. But if I use User. as it is in the dpaste, then it works. I don't understand why that is.
[01:22:57] baweaver: https://stackoverflow.com/questions/26439251/self-vs-class-name-for-class-methods-in-inheritance
[01:30:51] cxl: I still don't get why User.first can't resolve self.new_token to User.new_token
[01:31:59] rivalomega: has joined #ruby
[01:33:51] akaiiro: has joined #ruby
[01:47:34] akaiiro: has joined #ruby
[01:53:29] Tempesta: has joined #ruby
[01:57:43] akem: has joined #ruby
[02:06:51] apparition: has joined #ruby
[02:06:52] armyriad: has joined #ruby
[02:07:20] noobineer: has joined #ruby
[02:53:16] marmotini_: has joined #ruby
[03:00:47] c0ncealed3: has joined #ruby
[03:01:13] marmotini: has joined #ruby
[03:07:53] za1b1tsu: has joined #ruby
[03:08:18] marmotini_: has joined #ruby
[03:10:01] braincrash: has joined #ruby
[03:13:48] ivanskie: has joined #ruby
[03:15:06] arescorpio: has joined #ruby
[03:19:33] ur5us: has joined #ruby
[03:29:05] akaiiro: has joined #ruby
[03:32:12] mroutis: has joined #ruby
[03:37:07] nadir: has joined #ruby
[03:46:07] jetchisel: has joined #ruby
[04:07:18] marmotini: has joined #ruby
[04:34:23] agent_white: has joined #ruby
[04:42:14] _whitelogger: has joined #ruby
[04:48:12] marmotini: has joined #ruby
[05:05:29] rivalomega: has joined #ruby
[05:12:13] _whitelogger: has joined #ruby
[05:20:12] WA9ACE: has joined #ruby
[05:24:43] donofrio: has joined #ruby
[05:32:09] whysthatso: has joined #ruby
[05:36:04] rivalome_: has joined #ruby
[05:46:23] ohcibi: has joined #ruby
[05:53:41] ivanskie: has joined #ruby
[06:05:16] rippa: has joined #ruby
[06:08:03] MoritaShinobu: has joined #ruby
[06:12:04] venmx: has joined #ruby
[06:13:32] Nicmavr: has joined #ruby
[06:33:16] Puffball: has joined #ruby
[06:45:04] reber: has joined #ruby
[06:45:31] leah2: has joined #ruby
[06:46:01] reber__: has joined #ruby
[06:48:27] mangold: has joined #ruby
[06:54:03] petemoore: has joined #ruby
[06:56:18] Dbugger: has joined #ruby
[07:04:39] RougeR: has joined #ruby
[07:10:02] xuanrui: has joined #ruby
[07:21:13] _whitelogger: has joined #ruby
[07:42:53] marmotini: has joined #ruby
[07:50:28] Vashy: has joined #ruby
[07:50:48] Vashy: I recently upgraded my local ruby version from 2.4.1 to 2.5.1 and set it to the current and default with rvm
[07:51:04] Vashy: but I just tried using rails and it said the gem wasn't isntalled, and when I tried 'gem install rails' it said gem wasn't found
[07:51:18] Vashy: so I ran 'apt install rubygems'
[07:51:33] Vashy: and now when I try 'gem install rails' it tells me:
[07:51:40] Vashy: ERROR: While executing gem ... (Gem::FilePermissionError)
[07:51:40] Vashy: You don't have write permissions for the /var/lib/gems/2.3.0 directory.
[07:51:54] Vashy: any ideas how I can fix?
[08:00:03] GodFather: has joined #ruby
[08:03:32] jackrandom: has joined #ruby
[08:06:14] themsay: has joined #ruby
[08:12:52] themsay: has joined #ruby
[08:21:42] danguita: has joined #ruby
[08:29:00] venmx: has joined #ruby
[08:31:58] doubledup: has joined #ruby
[08:37:26] Nightmare: has joined #ruby
[08:42:20] sameerynho: has joined #ruby
[08:43:18] clemens3: has joined #ruby
[08:49:35] Sembei: has joined #ruby
[08:53:46] akem: has joined #ruby
[08:59:13] whysthatso: has joined #ruby
[09:11:05] rivalomega: has joined #ruby
[09:13:43] venmx: has joined #ruby
[09:19:58] c-c: Ok, moving forward with last nights imperative nil-check hell. Managed to remove about 30% of redundant lines: https://gist.github.com/csmr/31639d9172274841edc7e528e2351998
[09:21:23] c-c: ^ its as simple IPC model as I can implement. Then again, I'm no genius so I suppose its probably still kinky.
[09:23:45] c-c: - also still have funny stuff happening with .put/puts/!/flush. Seems the only way to be 100% sure the message flows into a pipe is "my_pipe.puts msg\n my_pipe.flush"
[09:24:32] c-c: (thats why the put! and get! singleton methods were not used in that snippet)
[09:27:56] themsay: has joined #ruby
[09:31:03] dellavg_: has joined #ruby
[09:31:18] ua: has joined #ruby
[09:33:12] whysthatso: has joined #ruby
[09:35:00] cd: has joined #ruby
[09:45:17] xfbs: has joined #ruby
[09:50:18] c-c: s/IPC/nonblocking IPC/
[10:01:14] c-c: - bah, looking at IO.select doc, looks like should read all pipes that a proc has open in read_line_nonblocking
[10:06:21] c-c: hehe so don't look at the snippet, it should probably be a mixin module thing anyway
[10:10:12] ur5us: has joined #ruby
[10:23:12] ur5us: has joined #ruby
[10:24:15] danguita: has joined #ruby
[10:33:10] ellcs: has joined #ruby
[10:45:02] danguita: has joined #ruby
[10:48:57] jetchisel: has joined #ruby
[10:52:27] tAn: has joined #ruby
[11:09:00] beefjoe: has joined #ruby
[11:11:03] phaul: has joined #ruby
[11:20:20] kapil____: has joined #ruby
[11:21:23] mikecmpbll: has joined #ruby
[11:28:17] roshanavand: has joined #ruby
[11:37:25] xfbs: has joined #ruby
[11:44:40] c-c: hm, maybe I should wrap that IPC code in an array with maybe. So you get IPC message-stack that only needs list of pipes and .read_next to use.
[11:52:27] c-c: hnnh, that would be two-directional named pipe in ruby
[11:58:52] c-c: hnghh, an asyncronous bidirectional named pipe in ruby, to be correct
[12:04:12] tbuehlmann: has joined #ruby
[12:11:55] blackmesa: has joined #ruby
[12:17:30] c-c: yet another async bidirectional ipc lib? pipesnow? hm, maybe I could call it fiberoptic
[12:20:47] c-c: hm, I wonder if thats easily confused with threading
[12:23:23] djellemah: has joined #ruby
[12:23:49] c-c: ACTION mumbles monologue and wondrs off
[12:30:13] _whitelogger: has joined #ruby
[12:34:06] blackmesa1: has joined #ruby
[12:54:13] DTZUZO: has joined #ruby
[12:55:17] Fusl: has joined #ruby
[12:56:36] wildermind: has joined #ruby
[12:57:23] GodFather: has joined #ruby
[12:58:47] snickers: hi, how can I do something like this in net-http?
[12:59:05] snickers: https://makandracards.com/makandra/1613-make-an-http-request-to-a-machine-but-fake-the-hostname
[13:00:43] MoritaShinobu: has joined #ruby
[13:01:42] Puffball: has joined #ruby
[13:05:13] Xiti: has joined #ruby
[13:07:16] blackmesa1: has joined #ruby
[13:12:34] rivalomega: has joined #ruby
[13:14:19] apparition: has joined #ruby
[13:37:44] conta: has joined #ruby
[13:42:14] _whitelogger: has joined #ruby
[14:12:25] blackmesa1: has joined #ruby
[14:14:44] AJA4350: has joined #ruby
[14:14:48] kurko_: has joined #ruby
[14:20:59] leah2: has joined #ruby
[14:25:48] MoritaShinobu: has joined #ruby
[14:31:44] wojnar: has joined #ruby
[14:32:19] havenwood: Vashy: You can use `sudo` for the system location your package chose for RubyGems, or use the --user-local flag to switch the location to your home directory.
[14:32:57] havenwood: Vashy: Or install a Ruby that already has RubyGems configured for home directory installs.
[14:38:55] rivalomega: has joined #ruby
[14:41:51] ivanskie: has joined #ruby
[14:41:57] kurko_: has joined #ruby
[14:46:29] GodFather: has joined #ruby
[14:53:45] dinfuehr: has joined #ruby
[15:12:17] conta: has joined #ruby
[15:15:10] cxl: Vashy: looks like your rvm doesn't work well (system is using 2.3.0). Try running `rvm` and scroll back up to see if it complains about not being in path or something of the sort. If it does, you need to fix your rvm install, #rvm could be of help.
[15:18:34] havenwood: Vashy: After reading cxl's comment I retract what I said above. i didn't read what you wrote carefully enough and I'm pre-coffee.
[15:19:31] havenwood: Vashy: You don't need the rubygems package for RVM. Does the `rvm` command work? What's `rvm current`?
[15:26:55] xfbs: has joined #ruby
[15:30:21] marmotini: has joined #ruby
[15:36:09] beefjoe: has joined #ruby
[15:38:32] i8igmac: has joined #ruby
[15:38:56] i8igmac: if i run a block can i have this block return a variable
[15:39:38] i8igmac: var=stuff.each do |x| return x end
[15:40:18] venmx: has joined #ruby
[15:43:32] i8igmac: nvm i dont know how to ask a proper question lol
[15:45:13] i8igmac: block.all? do |x| x.include?("string") end => true
[15:45:24] i8igmac: i want the block to return true
[15:45:58] havenwood: i8igmac: it would
[15:46:17] havenwood: i8igmac: (assuming they all include the string)
[15:46:36] havenwood: i8igmac: have you tried it?
[15:46:50] i8igmac: um, i just used all as a example, maybe that is my problem
[15:47:04] i8igmac: if any line includes the string... let me check
[15:47:42] i8igmac: block.any? do |x| x.include?("string") end => true
[15:49:25] i8igmac: oh, i was making a mistake with the block and nokogiri needs x.to_s.include? or it always returns false
[15:49:31] havenwood: i8igmac: for your particular example, you could write: block.all? /string/
[15:49:58] i8igmac: i just discovered any?
[15:50:12] i8igmac: its works just fine ;-)
[15:50:50] i8igmac: page.css(@href).any? do |x| if x.include?("string"); end
[15:52:25] nchambers: has joined #ruby
[15:52:44] cxl: Ugh, self and classes are confusing me even more now that I'm digging into it. Why is method1 undefined on L11? https://repl.it/repls/DualFrostyCopyleft
[15:53:24] cxl: Wouldn't self in that context be an instance of Foo, and it having not instance method called method1 then wouldn't it climb up to the class to look for it there?
[15:53:36] tAn: has joined #ruby
[15:53:42] havenwood: cxl: It isn't undefined on L11. That would return: #=> "method3 and method1"
[15:54:25] havenwood: cxl: Double check with the code you're showing us?
[15:54:41] havenwood: cxl: Foo.method3 #=> "method3 and method1"
[15:54:42] cxl: havenwood: what am I missing? If I run that code it says undefined method method1 in the repl
[15:55:03] cxl: oh my bad, it's probably tripping on L25 rather
[15:55:51] havenwood: cxl: You're defining class not instance methods here.
[15:55:58] havenwood: cxl: Foo.method1
[15:56:02] havenwood: cxl: Foo.method2
[15:56:02] cxl: but why then? on that line, wouldn't foo.method1 run the class method?
[15:56:29] havenwood: cxl: Class methods are called on the class itself, not an instance of the class.
[15:56:53] cxl: I thought ruby would look for a given method in the instance first, and then in the class if it can't find it.
[15:57:06] cxl: and so on until it ran out of superclasses
[15:57:07] havenwood: cxl: `foo` is an instance of `Foo` in your example. you can call instance methods on `foo`. you can call class methods like you've defined on `Foo`.
[15:57:14] i8igmac: thanks havenwood
[15:57:37] havenwood: i8igmac: not sure I helped, but no prob! any time!
[15:58:15] cxl: so on L11, what is `self` then? The instance?
[15:58:16] havenwood: cxl: instance methods have a separate lookup than class emthods
[15:58:33] havenwood: cxl: No, on line 11 `self` is `Foo`.
[15:58:54] havenwood: cxl: The class Foo, just like on like 19.
[15:59:24] cxl: ok, but I can't call any of these def Foo/self methods from the instance?
[15:59:29] havenwood: cxl: We just use `self` instead of `Foo` in these cases so you can change the name of the class without going through and changing everywhere it's referenced.
[15:59:44] havenwood: cxl: No, these are all class methods without an instance method equivalent.
[15:59:56] havenwood: cxl: You can't call them on an instance, unless you do: foo.class.method1
[16:00:09] cxl: so my issue is only because I thought that the pattern was look for method on instance, and then up the class and superclasses if not found, but instead it's look it up on the instance and fail if it's not there?
[16:00:14] havenwood: cxl: So basically, you can't call them on the instance. They're class methods.
[16:00:39] havenwood: cxl: Well, it'll look for instance methods in the class hierarchy.
[16:01:03] havenwood: cxl: The book "Ruby Under a Microscope" has a good explanation of method lookup.
[16:01:34] cxl: and to declare instance methods from the class, I'd have to do it in the constructor, as self.mymethod?
[16:01:40] cxl: ACTION looks that book up
[16:09:32] phaul: cxl also this explains a lot : https://www.youtube.com/watch?v=X2sgQ38UDVY (Dave Thomas - Ruby object model)
[16:09:44] cxl: thank you
[16:16:25] phaul: I don't understand what I have done here: -> x { x }.yield_self { |p| p[p] } ? and why isn't it a stack overflow ?
[16:18:29] phaul: ah never mind. I confused myself
[16:21:47] phaul: -> x { x[x] }.tap { |p| p[p] }
[16:21:56] phaul: that's what I meant :)
[16:29:53] noodle: has joined #ruby
[16:32:45] phaul: I guess it boils down to ... a = a being an infinite recursion or an assignment of an object...
[16:32:54] akaiiro: has joined #ruby
[16:35:51] phaul: as if id = x -> { x }, then id[id] could be either infinite recursion, or just a proc.
[16:41:57] mroutis: has joined #ruby
[16:43:37] amelliaa: has joined #ruby
[16:49:42] LiftLeft: has joined #ruby
[16:52:37] Nicmavr: has joined #ruby
[16:57:29] orbyt_: has joined #ruby
[17:02:21] bak1an: has joined #ruby
[17:02:45] akaiiro: has joined #ruby
[17:05:56] c-c: phaul: hey I watched the monad vid
[17:06:09] c-c: phaul: it was good stuff, thanks!
[17:08:06] phaul: c-c hi, np I enjoyed all vids from Tom Stuart, all recommended... Some are more exoteric but even more entertaining
[17:08:54] phaul: "programming with nothing" is crazzy...
[17:12:20] sanscoeur: has joined #ruby
[17:13:25] tdy: has joined #ruby
[17:14:16] orbyt_: has joined #ruby
[17:31:19] troulouliou_div2: has joined #ruby
[17:31:41] LiftLeft: has joined #ruby
[17:41:41] c-c: I'm wondering if should implement my own Maybe on Ruby 2.3.3
[17:43:24] mroutis: c-c: there's a Maybe in dry-rb
[17:43:42] mroutis: https://dry-rb.org/gems/dry-monads/
[17:44:48] patr0clus: has joined #ruby
[17:45:07] c-c: I think I mostly understand what Maybe is
[17:45:35] c-c: - but maybe should implement, to learn if nothing to learn
[17:46:11] kurko_: has joined #ruby
[17:46:30] c-c: - or Maybe something
[17:48:17] c-c: ACTION meta 
[17:58:46] GodFather: has joined #ruby
[18:07:16] marmotini: has joined #ruby
[18:16:36] clemens3: has joined #ruby
[18:31:43] LiftLeft: has joined #ruby
[18:31:55] Dimik: has joined #ruby
[18:32:37] LiftLeft2: has joined #ruby
[18:33:40] marmotini_: has joined #ruby
[18:35:07] marmotini: has joined #ruby
[18:41:27] ellcs: has joined #ruby
[18:46:01] nicesignal: has joined #ruby
[18:47:22] cats: has joined #ruby
[19:10:15] aufi: has joined #ruby
[19:20:18] JasonO: how can I change a value using find_by
[19:20:30] JasonO: for example: Recipient.find_by(name: "Frankie").available
[19:20:59] JasonO: which will return the value.. how can I set the value to something else like Recipient.find_by(name: "Frankie").available = true
[19:23:21] streiu: has joined #ruby
[19:24:30] phaul: JasonO: this is active record right? I expect your code to work. What's the issue?
[19:26:41] havenwood: I'm guessing the issue is it's not saving?
[19:27:21] JasonO: phaul: yeah it is
[19:27:27] phaul: yes, it would need an explicit save
[19:27:52] JasonO: was actually just looking at this:
[19:28:05] JasonO: test = Recipient.where(:name => 'Frankie')
[19:28:07] JasonO: test.update_all(:available => true)
[19:28:21] RedNifre: has joined #ruby
[19:28:28] JasonO: currently I've: Recipient.find_by(name: recipient)
[19:29:02] RedNifre: Hey there. What's the idiomatic ruby way for tail -f somefile | ruby somescript.rb?
[19:29:02] havenwood: JasonO: Do you want to not touch updated_at and skip validations and callbacks?
[19:29:09] JasonO: how would I save it if I did Recipient.find_by(name: "Frankie").available=true
[19:29:36] JasonO: havenwood: not at all
[19:29:46] havenwood: JasonO: Recipient.find_by(name: "Frankie").tap { |recipient| recipient.available = true }.save
[19:29:50] havenwood: JasonO: Or use multiple lines.
[19:30:01] havenwood: JasonO: Or there's #update_attribute.
[19:31:41] JasonO: havenwood: that worked, thanks!
[19:31:58] JasonO: I used multiple lines though
[19:33:24] TomyLobo: has joined #ruby
[19:33:50] akemot: has joined #ruby
[19:35:32] kapil____: has joined #ruby
[19:36:48] marmotini: has joined #ruby
[19:37:46] RedNifre: Basically I want to only read new lines as they are added to a log file.
[19:38:05] phaul: &ri IO.select
[19:38:06] rubydoc: https://ruby-doc.org/core-2.5.1/IO.html#method-c-select
[19:38:33] phaul: could work.. :) never used select from Ruby, but that's how I would start
[19:39:21] phaul: better than busy waiting in a tight loop
[19:39:24] phaul: or sleeping
[19:40:48] RedNifre: hmmm, looks somewhat complicated.
[19:40:52] mroutis: has joined #ruby
[19:41:01] phaul: althhough, does it even work for non socket descriptors...
[19:41:39] RedNifre: I wonder if there's a simpler `tail -f bla | ruby bla.rb` solution.
[19:41:40] phaul: don't know. There must be a way for the OS to wake up a process when a file is touched
[19:42:29] phaul: ACTION wanders off and looks up tail source code
[19:47:08] cats: has joined #ruby
[19:48:19] nowhere_man: has joined #ruby
[19:51:22] TheBloke: has joined #ruby
[19:52:43] phaul: if you don't care about performance, I guess the easiest is just to sleep. old_num_bytes = 0; loop { fd = File.open(); fd.seek(old_num_bytes); fd.read; old_num_bytes = fd.pos ; sleep(some_arbitrary_time)}
[19:53:25] phaul: there was this discussion https://www.reddit.com/r/ruby/comments/5oamf3/ruby_and_epoll/
[19:54:40] phaul: ^that's just a pseudo code about the idea. it's leaking file descriptors at this form.
[19:56:48] lytol_: has joined #ruby
[20:00:37] al2o3-cr: something like this: IO.open(file) { |io| f.seek(0, :SEEK_END); loop { select [io]; line = io.gets ... }
[20:01:23] phaul: just don't forget to sleep at some point :)
[20:06:43] phaul: the tail I looked at does use OS specific stuff for this. (kevents). so if tail does that then there is probably no good answer
[20:11:47] al2o3-cr: phaul: yes, i missed the sleep but you get the point ;)
[20:13:18] phaul: al2o3-cr: sure
[20:18:24] kn-928: has joined #ruby
[20:21:20] xfbs: has joined #ruby
[20:41:15] RougeR: has joined #ruby
[20:48:02] RedNifre: has joined #ruby
[20:49:41] catch22: has joined #ruby
[20:51:45] herbmillerjr: has joined #ruby
[20:54:49] beeman: has joined #ruby
[20:58:20] blackmesa: has joined #ruby
[21:01:14] phaul: RedNifre: so what does that leave you with? Are you going to implement the loop + sleep combo?
[21:01:57] baweaver: ACTION wanders in
[21:02:51] tAn: has joined #ruby
[21:14:58] GodFather: has joined #ruby
[21:17:47] im0nde: has joined #ruby
[21:18:17] daemonwrangler: has joined #ruby
[21:22:16] akemot: has joined #ruby
[21:28:23] ellcs: has joined #ruby
[21:40:31] RedNifre: Well, given that I'm rewriting my big ball of mud code to clean it up I guess I should do the proper 'select' solution
[21:41:10] armyriad: has joined #ruby
[21:41:36] RedNifre: You see, historically I used ruby to write tiny ugly prototypes and when it got too messy I rewrote it in a different language, but now I'm trying to do it properly in ruby (because I couldn't find a better scripting language)
[21:43:14] orbyt_: has joined #ruby
[21:43:29] tAn: has joined #ruby
[21:45:50] dtzuzu: has joined #ruby
[21:47:40] orbyt_: has joined #ruby
[21:55:40] kn-928: has joined #ruby
[21:58:40] marmotini_: has joined #ruby
[22:00:12] funnel: has joined #ruby
[22:04:50] RedNifre: has joined #ruby
[22:18:45] uplime: has joined #ruby
[22:22:54] xfbs: has joined #ruby
[22:32:12] orbyt_: has joined #ruby
[22:41:41] patr0clus: has joined #ruby
[22:44:21] pharma_joe: has joined #ruby
[22:48:57] stooj: has joined #ruby
[22:55:35] ur5us: has joined #ruby
[22:59:20] sameerynho: has joined #ruby
[23:06:21] pharma_joe: has joined #ruby
[23:09:12] graphene: has joined #ruby
[23:21:15] ziggylazer: has joined #ruby
[23:25:02] tAn: has joined #ruby
[23:29:56] marmotini_: has joined #ruby
[23:36:19] tdy: has joined #ruby
[23:39:33] uplime: is there a function that expands a relative path in terms of the pwd? like if pwd = "/foo/bar/baz", expand("..") -> "/foo/bar"
[23:44:54] al2o3-cr: uplime: File.expand_path('..', '/foo/bar/baz') ?
[23:45:06] uplime: perfect, thanks