« Back to channel list

#ruby - 01 February 2019

« Back 1 day Forward 1 day »
[00:08:11] spacesuitdiver: has joined #ruby
[00:08:41] mat_bug: has joined #ruby
[00:16:05] alfiemax: has joined #ruby
[00:22:37] blackmesa1: has joined #ruby
[00:22:40] AJA4350: has joined #ruby
[00:23:27] Mia: has joined #ruby
[00:23:39] rkazak: has joined #ruby
[00:24:10] clemens3: has joined #ruby
[00:24:31] yokel: has joined #ruby
[00:31:32] Dreamer3: has joined #ruby
[00:35:42] mat_bug: has joined #ruby
[00:45:54] SanguineAnomaly: has joined #ruby
[00:49:22] AJA4350: has joined #ruby
[00:54:07] DTZUZO: has joined #ruby
[01:01:19] orbyt_: has joined #ruby
[01:15:14] mat_bug: has joined #ruby
[01:18:05] Azure: has joined #ruby
[01:20:26] AJA4351: has joined #ruby
[01:21:01] orbyt_: has joined #ruby
[01:22:06] Pistos: has left #ruby: ("WeeChat 2.0.1")
[01:25:52] michael_mbp: has joined #ruby
[01:45:23] Nicmavr: has joined #ruby
[01:59:18] cnsvc: has joined #ruby
[02:05:23] mat_bug: has joined #ruby
[02:10:39] alfiemax: has joined #ruby
[02:19:53] tdy: has joined #ruby
[02:20:38] sauvin_: has joined #ruby
[02:22:47] orbyt_: has joined #ruby
[02:36:52] krawchyk: has joined #ruby
[02:42:31] alfiemax: has joined #ruby
[02:43:56] rkazak: has joined #ruby
[02:46:56] \void: has joined #ruby
[02:52:11] esrse: has joined #ruby
[02:52:48] jesfre: has joined #ruby
[02:55:13] AzizLight: has joined #ruby
[03:00:34] mat_bug: has joined #ruby
[03:17:38] \void: has joined #ruby
[03:21:53] Swyper: has joined #ruby
[03:39:18] uplime-: has joined #ruby
[03:41:00] noobineer: has joined #ruby
[03:44:22] Renich_: has joined #ruby
[03:47:53] mat_bug: has joined #ruby
[04:04:43] dinfuehr: has joined #ruby
[04:08:15] ams__: has joined #ruby
[04:09:37] braincrash: has joined #ruby
[04:24:27] Arahael: I'm attempting to use bundler, however I have a problem where `require 'xmlrpc/client'` causes a LoadError - cannot load such file, on windows. HOw can I resolve this?
[04:24:42] Arahael: (I'm testing using `bundler exec irb`)
[04:25:42] arescorpio: has joined #ruby
[04:26:43] Arahael: I'm confused because isn't this part of ruby?
[04:33:13] DTZUZO: has joined #ruby
[04:33:34] Arahael: D'oh. It's a gem.
[04:34:51] alfiemax: has joined #ruby
[04:40:40] jesfre: has joined #ruby
[05:02:15] Arahael: ACTION steps on out.
[05:02:30] alfiemax_: has joined #ruby
[05:08:59] al2o3-cr: has joined #ruby
[05:10:52] evdubs_: has joined #ruby
[05:14:56] helpa: has joined #ruby
[05:18:01] jesfre: has joined #ruby
[05:29:13] conta: has joined #ruby
[05:32:14] za1b1tsu: has joined #ruby
[05:34:33] jesfre: has joined #ruby
[05:35:59] mat_bug: has joined #ruby
[05:44:16] dellavg_: has joined #ruby
[05:53:24] themsay: has joined #ruby
[06:00:45] danst: how often do you use timeout in ruby
[06:08:32] Furai: has joined #ruby
[06:15:15] themsay: has joined #ruby
[06:17:48] DTZUZO: has joined #ruby
[06:26:07] asphyxia: has joined #ruby
[06:26:44] mat_bug: has joined #ruby
[06:36:23] dellavg_: has joined #ruby
[06:41:08] marmotini_: has joined #ruby
[06:54:12] alfiemax_: has joined #ruby
[07:05:40] rkazak: has joined #ruby
[07:08:56] aufi: has joined #ruby
[07:24:27] conta: has joined #ruby
[07:25:40] alfiemax: has joined #ruby
[07:28:51] aupadhye: has joined #ruby
[07:32:31] clemens3: has joined #ruby
[07:42:05] tdy: has joined #ruby
[07:44:43] raulp: has joined #ruby
[07:50:15] mat_bug: has joined #ruby
[07:52:58] bjpenn_: has joined #ruby
[07:58:52] BH23: has joined #ruby
[08:08:54] Leifr: has joined #ruby
[08:09:55] tpanarch1st: has joined #ruby
[08:15:15] ravenousmoose: has joined #ruby
[08:21:26] reber: has joined #ruby
[08:23:09] RiPuk: has joined #ruby
[08:26:55] kapil____: has joined #ruby
[08:33:48] Jonathan2254: has joined #ruby
[08:33:55] Jonathan2254: has left #ruby: ("Leaving")
[08:44:59] JamieD: has joined #ruby
[08:46:12] vonfry: has joined #ruby
[08:50:18] nowhereman: has joined #ruby
[08:58:30] mat_bug: has joined #ruby
[09:01:36] tAn: has joined #ruby
[09:05:24] leni1: has joined #ruby
[09:07:41] ravenous_: has joined #ruby
[09:13:42] mikecmpbll: has joined #ruby
[09:16:49] szulak_: has joined #ruby
[09:19:35] szulak_: has joined #ruby
[09:21:24] leni1: Hi all. How do I modify my PATH settings so that `gem env home` gives me `/home/user/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0` instead of `/home/user/gems`. This is what the settings look like now: https://dpaste.de/ANOv
[09:22:24] ravenousmoose: has joined #ruby
[09:23:19] szulak_: has joined #ruby
[09:26:22] duderonomy: has joined #ruby
[09:36:08] blackmesa1: has joined #ruby
[09:41:36] danst: leni1: i always used rvm but I bet you're trying to fix a project that already has passed setup?
[09:42:21] danst: also unable to open your url sorry
[09:44:51] ellcs: has joined #ruby
[09:47:15] RiPuk: has joined #ruby
[09:54:43] reber: has joined #ruby
[09:55:35] reber: has joined #ruby
[10:00:01] SanguineAnomaly: has joined #ruby
[10:01:25] dhollin3: has joined #ruby
[10:11:07] ngw: has joined #ruby
[10:18:14] Guest16678: has joined #ruby
[10:39:28] roshanavand: has joined #ruby
[10:43:55] ldnunes: has joined #ruby
[10:44:27] havenwood: danst: not often
[10:46:14] tankf33der: has left #ruby: ()
[10:50:04] matchaw: has joined #ruby
[11:02:05] szulak_: has joined #ruby
[11:13:10] za1b1tsu: has joined #ruby
[11:15:18] ravenousmoose: has joined #ruby
[11:19:07] roshanavand1: has joined #ruby
[11:21:22] ravenous_: has joined #ruby
[11:22:01] themsay: has joined #ruby
[11:22:15] bruce_lee: has joined #ruby
[11:26:35] roshanavand1: has joined #ruby
[11:29:47] ravenousmoose: has joined #ruby
[11:33:04] roshanavand: has joined #ruby
[11:34:45] ravenous_: has joined #ruby
[11:38:38] leni1: has joined #ruby
[11:45:51] leni1: Hi guys. I installed the newest version of `bundler` using `gem install bundler` successfully. But it seems to have installed in my former GEM_PATH (/home/gems/gems) rather than in the gems directory in ~/.rbenv. Is there a way I can change this behaviour?
[11:46:27] ravenousmoose: has joined #ruby
[11:50:33] za1b1tsu: has joined #ruby
[11:51:01] kke: ["abc.def", "ghi.jkl"].map(&:split['.']) i wonder why this returns an enumerator? (i know it doesn't work, i just got curious if the proc[] thing could be used to pass an argument for symbol to proc)
[11:52:29] kke: (would be handy.)
[11:57:45] roshanavand: has joined #ruby
[11:59:02] isxek: has joined #ruby
[12:01:52] ravenousmoose: has joined #ruby
[12:01:57] kke: why does symbol even have []
[12:03:18] tbuehlmann: iirc, it returns the symbol's characters as String#[] does
[12:09:42] kke: yeah it does, sym also has .downcase, .match and whatever
[12:10:20] kke: so i suppose &:split['.'] did some sort of &nil
[12:12:08] Iambchop: leni1: https://github.com/rbenv/rbenv/issues/975
[12:15:39] leni1: Iambchop: thank you.
[12:25:33] Nicmavr: has joined #ruby
[12:39:59] dellavg_: has joined #ruby
[12:40:06] nowhereman: has joined #ruby
[12:42:45] aupadhye: has joined #ruby
[12:47:10] alfiemax: has joined #ruby
[12:54:38] leni1: So I removed everything and re-installed rbenv afresh
[12:55:06] leni1: When I ran gem install bundler, it says it's successfully installed bundler-2.0.1
[12:55:23] leni1: But the version in rbenv is 1.17.2
[12:56:11] leni1: Running `~/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/bundler-2.0.1/exe/bundle -v ` gives me 1.17.2 even though it is clearly in the 2.0.1 folder
[12:56:33] leni1: Is there a compatibility issue between 2.0.1 and rbenv that I am unaware of?
[13:00:34] leni1: I've only managed to find this GitHub issue: https://github.com/bundler/bundler/issues/6930
[13:06:08] dionysus69: has joined #ruby
[13:08:13] jcalla: has joined #ruby
[13:08:26] za1b1tsu: has joined #ruby
[13:13:39] AJA4350: has joined #ruby
[13:14:57] kapil____: has joined #ruby
[13:20:14] gnufied: has joined #ruby
[13:21:15] conta: has joined #ruby
[13:22:06] roshanavand: has joined #ruby
[13:30:03] clemens3: has joined #ruby
[13:32:12] lukelukeluke: has joined #ruby
[13:34:24] blackmesa1: has joined #ruby
[13:37:15] alfiemax: has joined #ruby
[13:49:46] roshanavand: has joined #ruby
[13:50:08] Bish: has joined #ruby
[13:50:12] Bish: yo rubyist
[13:50:45] AJA4350: has joined #ruby
[13:51:36] szulak_: Bish not much, studying Udemy course about Ruby
[13:52:01] Bish: szulak_: that's an okay choice, ruby is great!
[13:52:04] szulak_: Bish planning to switch from long time c++ dev into ruby in the nearest future
[13:52:16] szulak_: yeah, enjoying it so far :)
[13:52:25] Bish: ruby will fuck you over with 2-3 things
[13:52:34] szulak_: which ones?
[13:52:43] Bish: speed, threads mostly
[13:52:45] szulak_: so far had brain fuck with '&' (blocks vs procs)
[13:52:46] Bish: it sucks at those 2
[13:53:16] Bish: there will be people telling you otherwise, but that's straight up a lie!
[13:53:24] szulak_: this's not a problem - I can always write C extenesion and load it to ruby to make a really cpu intensive things
[13:53:41] Bish: that is correct, but you will need to know about ruby internals then, quite well
[13:54:10] szulak_: I'll give myself few months still till I try any Ruby job
[13:54:14] szulak_: or well.. rails
[13:54:24] Bish: szulak_: don't do rails, rails also sucks ballz
[13:54:38] szulak_: I do have like 7 years of c and c++ experience (mainly embedded / automotive area)
[13:54:50] Bish: szulak_: when i started ruby.. i started using it for tooling.. and i thought it's fucking great(because it is)
[13:54:53] szulak_: but there are (I think) not many "pure Ruby" jobs"
[13:55:13] Bish: and everyone was doing rails.. and i could never get my head around it
[13:55:23] Bish: so i tried and tried, and still thought it sucks
[13:55:27] Bish: (still do)
[13:55:42] Bish: when i noticed there is a small minority of people using ruby as a webserver without rails
[13:56:20] Bish: i recommend looking into roda(my favourite) / sinatra
[13:56:40] Bish: but as you can see i have a strong opinions
[13:56:45] szulak_: yeah, I did already simple sinatra app
[13:56:52] Bish: roda is sinatra on crack
[13:56:53] tbuehlmann: "rails also sucks ballz" is a pretty harsh statement, it works for quite some people and companies
[13:57:10] Bish: so does php
[13:57:11] szulak_: it's a personal opinion I guess
[13:57:34] Bish: szulak_: i would disagree, as i have tried real hard to do things with it..
[13:57:42] tbuehlmann: so does php, right. I also don't think php sucks ballz
[13:57:59] Bish: when i created my startup, i even started with php, because i didn't feel ready with ruby, that was until i noticed it's IMPOSSIBLE to write a good ORM with php
[13:58:00] rippa: has joined #ruby
[13:58:34] Bish: tbuehlmann: yeah well, maybe your requirements of what a language/toolkit should do a lower than mine..
[13:58:48] Bish: but as i remember your name i know what you're talking about, sure you can do great things with php
[13:59:23] Bish: but as i said.. i tried really hard to write a ORM that fits my needs, literally impossible
[13:59:34] Bish: if you don't want to rewrite some things in C, that is
[14:02:21] rubydoc: # => nil (https://carc.in/#/r/6540)
[14:02:23] Bish: &>> [1,2,3].map { |x| x.succ }
[14:02:24] rubydoc: # => [2, 3, 4] (https://carc.in/#/r/6541)
[14:02:41] Bish: &>> [1,2,3].map(&Proc.new { |x| x.succ })
[14:02:41] rubydoc: # => [2, 3, 4] (https://carc.in/#/r/6542)
[14:02:50] Bish: &>> [1,2,3].map(&:succ)
[14:02:51] rubydoc: # => [2, 3, 4] (https://carc.in/#/r/6543)
[14:03:01] Bish: szulak_: does this help, these 3 things being the same thing ?
[14:03:34] szulak_: yeah, I undrestood it later
[14:03:42] szulak_: but it was confusing on the beginning
[14:04:27] Bish: it's a thing of beauty that &:symbol(in parameterlist) is the same thing as :symbol.to_proc which is Proc.new { |x| x.symbol }
[14:04:46] Bish: Proc.new is going to be deprecated, btw in 2.6 if i remember correctly
[14:05:00] szulak_: in favor of?
[14:05:10] Bish: it will be replaced by the stabby operator, which looks burrowed from the js people
[14:05:33] Bish: &>> (*1..3).map(&->(x){x.succ})
[14:05:34] rubydoc: # => (https://carc.in/#/r/6548)
[14:06:07] TheBrayn: 2.6 is already out
[14:06:27] Bish: uhm, where do i use the splat operator wrong there?
[14:06:55] Bish: ah, can only use it inside a parameter list, forgot about that one
[14:07:16] Bish: &>> [*1..3].map(&->(x){x.succ})
[14:07:17] rubydoc: # => [2, 3, 4] (https://carc.in/#/r/654a)
[14:07:19] szulak__: has joined #ruby
[14:07:45] szulak__: Bish sorry, had to restart my router to open port for running sinatra app
[14:07:55] Bish: szulak__: all cool
[14:07:57] Bish: &>> [*1..3].map(&->(x){x.succ})
[14:07:57] rubydoc: # => [2, 3, 4] (https://carc.in/#/r/654b)
[14:08:08] Bish: that will be it's replacement and "lambda" i guess
[14:08:38] TheBrayn: where can I find the documentation for that?
[14:08:39] al2o3-cr: no need to splat a simple (1..3).map would do ;)
[14:09:17] roshanavand: has joined #ruby
[14:10:09] szulak__: Bish http://194.42.111.38:8080 - my first sinatra app (it's a simple store for online game characters)
[14:10:13] szulak__: didn't finish it tho
[14:10:39] szulak__: (my first sinatra app ever)
[14:11:20] Bish: there he goes
[14:11:33] szulak__: it was such a pleasure to writing this
[14:11:53] Bish: szulak__: do me a favor and do it in roda :>
[14:12:04] Bish: and tell me if i am just heavily opionated
[14:12:27] Bish: https://www.youtube.com/watch?v=W8zglFFFRMM
[14:12:58] Bish: that guy is the shit
[14:13:00] szulak__: bookmarked, thanks
[14:13:13] Bish: he also maintains the best ORM on the planet
[14:13:32] szulak__: which is.. ?
[14:13:39] Bish: try it, you won't regret
[14:13:51] szulak__: so far used datamapper only
[14:13:57] szulak__: but it was really simple "Crud" app
[14:15:02] Bish: have a look at sequel and ROM in any case.. whatever you use as webserver
[14:16:40] szulak__: did you use datamapper? it looks very similiar
[14:16:47] szulak__: I mean, sequel and dm
[14:17:17] Bish: im sure i did, since i searched a long time until i found sequel, but im looking into it why i thought it's bad
[14:17:43] DTZUZO: has joined #ruby
[14:18:33] Bish: well it looks very similiar, yes, true
[14:18:49] Bish: a little less ruby idiomatic code with those "include" statements, but other than that *shrug*
[14:18:56] Bish: things might have changed the last 4 years tho
[14:20:27] szulak__: yeah.. but it's a long way still.... https://i.imgur.com/Roo1sUB.png
[14:20:40] szulak__: I've to complete these courses firstly
[14:20:55] szulak__: (without PS, this one is my wifey)
[14:22:42] phaul: does yri (yard ri) work for you ppl for local gems? I spend a lot of time looking at Generating yri index stuff on gem install but never sucessfully find anyting with it
[14:23:57] phaul: gem install rails && yri form_for -> No documentation for 'form_for'
[14:24:13] phaul: is it supposed to work, and if so what do I check?
[14:26:44] cubillosxy_py: has joined #ruby
[14:27:35] GinoMan2440: has joined #ruby
[14:28:48] Inline: has joined #ruby
[14:31:57] cd: has joined #ruby
[14:32:38] rkazak: has joined #ruby
[14:35:27] roshanavand1: has joined #ruby
[14:41:03] dellavg__: has joined #ruby
[14:44:39] phaul: or changing the question. what's the best way to get documentation for form_for after rails is installed whithout knowing more than the method name? can pry for instance do that?
[14:46:18] beefjoe: has joined #ruby
[14:46:59] spiette: has joined #ruby
[14:52:14] roshanavand1: has joined #ruby
[14:52:56] phaul: ok. pry sort of does it. find-method with a combination of show-doc
[14:53:09] marmotini_: has joined #ruby
[14:53:28] Biganon: has joined #ruby
[14:53:59] Biganon: Hi ; I'm trying to run 'gem install asciidoctor-pdf --pre', but the command hangs and produces absolutely no output, even with the -V flag
[14:54:22] Biganon: I can access the internet normally, otherwise
[14:54:44] Biganon: I'm using https://rubygems.org/ as a source
[14:56:55] AJA4350: has joined #ruby
[14:57:47] Bish: ACTION can't believe still nobody wrote a good http/2 serer for ruby
[14:57:57] Bish: i mean, okay, it's not rack compliant, but who cares
[14:58:09] Bish: freakin rails people
[14:58:45] Bish: doesn't have rails ⇒ we don't do it
[15:08:17] matchaw_: has joined #ruby
[15:10:17] polishdub: has joined #ruby
[15:11:06] roshanavand1: has joined #ruby
[15:13:13] Rapture: has joined #ruby
[15:14:19] havenwood: Bish: https://github.com/socketry/falcon
[15:28:44] kiero: has joined #ruby
[15:28:58] gnufied: has joined #ruby
[15:38:39] Renich: has joined #ruby
[15:40:19] AJA4350: has joined #ruby
[15:45:42] davidw: has joined #ruby
[15:48:02] GinoMan: has joined #ruby
[15:55:26] lukelukeluke: has joined #ruby
[15:56:59] Renich_: has joined #ruby
[15:59:24] ravenousmoose[aw: has joined #ruby
[16:03:32] mikecmpb_: has joined #ruby
[16:03:56] lfish: has joined #ruby
[16:05:38] conta: has joined #ruby
[16:10:56] darix: havenwood: how does it compare to puma?
[16:11:39] Renich: has joined #ruby
[16:12:35] mikecmpbll: has joined #ruby
[16:15:14] sticaz: has joined #ruby
[16:16:57] lukelukeluke: has joined #ruby
[16:23:30] havenwood: darix: It has some really impressive work with Fibers, including work merging Fiber performance commits to Ruby itself.
[16:23:43] havenwood: darix: And the HTTP/2 support is great to see.
[16:24:04] darix: havenwood: but yeah without fibers not much gain or?
[16:25:07] havenwood: darix: The benchmarks for number of connections, etc. look really impressive.
[16:25:12] alfiemax: has joined #ruby
[16:34:14] duderonomy: has joined #ruby
[16:40:11] havenwood: darix: https://www.codeotaku.com/journal/2018-06/improving-ruby-concurrency/index#performance
[16:41:49] cthulchu_: has joined #ruby
[16:45:12] havenwood: http://blog.scoutapp.com/articles/2018/11/14/birds-of-a-fiber
[16:47:32] helpa: has joined #ruby
[16:49:27] SeepingN: has joined #ruby
[16:50:51] nowhereman: has joined #ruby
[16:51:16] \void: has joined #ruby
[16:51:32] tdy: has joined #ruby
[17:06:54] ravenousmoose: has joined #ruby
[17:07:31] ua: has joined #ruby
[17:11:44] uplime: I have an array of hashes, and I'd like to test if any of the members of the array have a specific key/value pair, and if they do, return true (this is a condition for a select block on a different array). Is there an easy way to do this?
[17:13:27] phaul: &>> [{a: 1}, {b: 2}].any? { |h| h[:a] == 1 }
[17:13:29] rubydoc: # => true (https://carc.in/#/r/656s)
[17:13:39] uplime: oh perfect, thanks
[17:15:06] havenwood: uplime: or: [{a: 1}, {b: 2}].any?({a: 1})
[17:15:25] lxsameer: has joined #ruby
[17:15:33] havenwood: (on a recent Ruby)
[17:15:42] havenwood: &>> [{a: 1}, {b: 2}].any?({a: 1})
[17:15:42] rubydoc: # => true (https://carc.in/#/r/656t)
[17:16:27] uplime: how recent?
[17:16:27] phaul: &>> {a: 1, b: 2, c: 3} === {a: 1}
[17:16:28] rubydoc: # => false (https://carc.in/#/r/656u)
[17:16:35] uplime: I'm on 2.3
[17:16:49] phaul: havenwood: what does that use ? match? or === ?
[17:18:02] phaul: &>> [{a: 1, b: 2}].any?({a: 1})
[17:18:06] rubydoc: # => false (https://carc.in/#/r/656v)
[17:18:16] phaul: oh, it doesn't work
[17:20:23] roshanavand1: has joined #ruby
[17:23:44] phaul: &>> {a: 1} === {a: 1, b: 2, c: 3}
[17:23:45] rubydoc: # => false (https://carc.in/#/r/6570)
[17:25:17] havenwood: phaul: It iterates for match, afaik.
[17:25:47] havenwood: Not against the whole collection, one item at a time.
[17:26:43] havenwood: https://bugs.ruby-lang.org/attachments/5326
[17:28:44] phaul: yes but in your case you would only match if the array contains single key value pair hashes, as === on hashes doesn't seem to match unless equal
[17:30:04] phaul: this would work:
[17:30:54] phaul: &>> [{a:1, b: 2}].any? { |h| h.any?({a: 1})}
[17:30:55] rubydoc: # => false (https://carc.in/#/r/6571)
[17:31:11] davidw: has joined #ruby
[17:31:52] alfiemax: has joined #ruby
[17:33:33] alfiemax_: has joined #ruby
[17:33:41] tdy1: has joined #ruby
[17:34:54] Dbugger: has joined #ruby
[17:42:17] ellcs: has joined #ruby
[17:42:29] ravenousmoose: has joined #ruby
[17:59:51] lucasb: has joined #ruby
[18:00:37] cthu|: has joined #ruby
[18:01:20] houhoulis: has joined #ruby
[18:02:55] loincloth: has joined #ruby
[18:05:46] AJA4350: has joined #ruby
[18:08:32] blackmesa1: has joined #ruby
[18:12:49] mikecmpbll: has joined #ruby
[18:19:58] blackmesa1: has joined #ruby
[18:21:27] cthulchu_: has joined #ruby
[18:31:12] ravenousmoose[aw: has joined #ruby
[18:33:39] robscomputer: has joined #ruby
[18:33:49] gix: has joined #ruby
[18:34:36] Flonk: has joined #ruby
[18:36:05] dan64: has joined #ruby
[18:37:11] mozzarella: how do I unfreeze a frozen array?
[18:38:13] havenwood: mozzarella: clone it
[18:38:19] havenwood: or use Fiddle :P
[18:42:55] Flonk: has joined #ruby
[18:45:25] havenwood: mozzarella: https://gist.github.com/havenwood/0aa75f0c896a6dda0e56da5f21ed9fbd
[18:52:32] pwnd_nsfw: has joined #ruby
[19:04:16] ravenousmoose: has joined #ruby
[19:11:25] mniip: has joined #ruby
[19:12:38] AJA4351: has joined #ruby
[19:19:40] braincrash: has joined #ruby
[19:22:36] LearnRuby: has joined #ruby
[19:22:45] LearnRuby: Hi everyone
[19:23:58] LearnRuby: I'm trying to write a library to administrate an OpenBSD Box easily avoiding any shell scripting ..
[19:24:03] LearnRuby: The project is here : https://gist.github.com/wesley974/7448a63443510707c85edd8e4007daec
[19:24:29] LearnRuby: if you have time to review the code, bring me some advices, i will be very glad.
[19:24:40] LearnRuby: Thank you very much for your feedback.
[19:25:44] up|ime: LearnRuby: L25 has two spaces between 'unless' and 'openbsd?'
[19:26:42] up|ime: your tests seem weird
[19:27:53] up|ime: other than that, i'm not really sue why any of those things need a helper
[19:28:04] up|ime: i'm a bit scared of create_dir running mkdir_p undocumented
[19:28:26] LearnRuby: i don't know how to write tests for filesystem usage (touch, mkdir...)
[19:28:29] up|ime: and I really don't like how you raise the default exception either
[19:28:42] up|ime: i would create a specific exception so you don't end up try-catching all exceptions
[19:29:08] up|ime: LearnRuby: i would not put them in the same file
[19:29:22] LearnRuby: you mean using rescue instead of raise ?
[19:29:34] up|ime: no, i mean raise a specific erorr
[19:29:43] up|ime: OpenBsdHelperException or something
[19:29:58] up|ime: and your test is closer to an integration test, but the first thing your test is that you need root
[19:29:59] up|ime: nobody is going to run a testsuite using root
[19:30:32] up|ime: especially if your "delete_dir" fails the test your entire fs might well be gone
[19:30:50] up|ime: beyond that, your tests dont really assert anything is happening either
[19:31:02] LearnRuby: oh, you re right about the root usage testing.
[19:31:34] up|ime: path_exists? is also just an extension to file.exists but instead of returning a boolean you throw if false
[19:31:55] LearnRuby: in fact i'm testing all the methods (as examples)
[19:31:59] up|ime: it may be harsh, but I don't think your helper is helping anyone in its current state
[19:32:08] up|ime: they just invent a new "stdlib" for ruby
[19:32:35] LearnRuby: it is not yet finished, i need now to code the rcctl command line
[19:32:56] LearnRuby: without changing the /etc
[19:33:12] up|ime: well my point is more that for instance def need_root raise('need root privileges') unless Process.uid.zero? end is very basic programming
[19:33:36] up|ime: it'd be more work to read your documentation, instantiate the class, and then run the method
[19:34:16] up|ime: if your goal is to help yourself: great, but consider that if a stranger looks at it they will wonder why you are reinventing the wheel
[19:34:47] up|ime: I would write a OpenBsdHelper to get around quirks of openbsd, rather than to alias "file.create" to "OpenBsdHelper.create_file"
[19:34:50] LearnRuby: i understand your point of view
[19:35:22] up|ime: if this is a learning excerise: Fantastic, but I question its use in the real world
[19:36:13] LearnRuby: you re right, i need more to focus on the OpenBSD system instead of FileSystem
[19:36:20] LearnRuby: thank you so much!
[19:45:47] d10n-work: has joined #ruby
[19:49:19] code_zombie: has joined #ruby
[19:53:56] ravenousmoose: has joined #ruby
[19:55:57] Renich: has joined #ruby
[19:56:45] connermcd: has joined #ruby
[19:58:09] ldnunes: has joined #ruby
[20:06:47] cnsvc: has joined #ruby
[20:15:33] AJA4350: has joined #ruby
[20:18:03] davidw: has left #ruby: ("Leaving")
[20:26:56] ravenousmoose[aw: has joined #ruby
[20:38:55] tdy1: has joined #ruby
[20:39:59] Rapture: has joined #ruby
[20:51:04] phaul: has joined #ruby
[20:51:25] AJA4350: has joined #ruby
[20:59:54] ivanskie: has joined #ruby
[21:06:34] fmccann: has joined #ruby
[21:08:56] Zarthus: has joined #ruby
[21:18:33] blunckr: has joined #ruby
[21:19:25] blunckr: has left #ruby: ()
[21:20:00] blunckr: has joined #ruby
[21:21:40] blunckr: has left #ruby: ()
[21:24:26] Fernando-Basso: has joined #ruby
[21:33:07] fmccann: has joined #ruby
[21:40:10] alfiemax: has joined #ruby
[21:41:09] rkazak: has joined #ruby
[21:48:36] baweaver: hashes.select(&Qo[a: 1..10])
[21:48:36] baweaver: Though only on Symbol keys
[21:50:33] orbyt_: has joined #ruby
[21:52:13] ravenousmoose[aw: has joined #ruby
[21:52:29] baweaver: havenwood: Wait, since when does it do that?
[21:55:06] baweaver: Wait wait wait
[21:55:27] baweaver: When and where?
[21:55:27] baweaver: ACTION needs to write up on this
[21:56:16] baweaver: &>> {a: 1} === {a:1, b: 2, c:3}
[21:56:19] rubydoc: # => false (https://carc.in/#/r/658x)
[21:56:32] baweaver: Because I remember Matz rejected Hash#=== and Array#=== earlier
[21:56:53] phaul: but it's not doing anything special just ==
[21:57:22] phaul: havenwood's example didn't work. it was probably a misunderstanding on his part of what we were doing
[21:59:49] baweaver: ok, so it's a literal
[22:00:17] baweaver: That makes more sense
[22:00:32] baweaver: If they introduced intersection matching and I managed to miss that XD
[22:00:35] cubillosxy_py: has joined #ruby
[22:02:16] phaul: yeah, I thought the same.. :)
[22:16:26] zapata: has joined #ruby
[22:24:17] alfiemax: has joined #ruby
[22:29:06] blackmesa1: has joined #ruby
[22:38:48] blackmesa1: has joined #ruby
[22:53:45] ivanskie: has joined #ruby
[23:15:25] jcarl43: has joined #ruby
[23:16:21] Paraxial: has joined #ruby
[23:23:40] crankharder: has joined #ruby
[23:26:00] Inline: has joined #ruby
[23:30:01] shenghi: has joined #ruby
[23:31:25] ravenousmoose[aw: has joined #ruby
[23:35:12] alfiemax: has joined #ruby
[23:57:56] MuffinPimp: has joined #ruby