« Back to channel list

#ruby - 11 October 2017

« Back 1 day Forward 1 day »
[00:00:39] jrabe: has joined #ruby
[00:01:05] matthewd: Yes. I use a manual install of rbenv / ruby-build too.
[00:01:07] adam12: mynameisdebian: ruby-install supports all versions and does this without requiring updates. Is that an option for you?
[00:01:25] mynameisdebian: matthewd: manual Ruby install gives me 2.1.5
[00:01:39] _whitelogger: has joined #ruby
[00:01:42] mynameisdebian: adam12: let me see
[00:02:02] matthewd: That isn't either of the pieces of software I just named, but okay
[00:02:16] mynameisdebian: adam12: Not by default
[00:02:25] adam12: mynameisdebian: No package, you mean?
[00:02:28] Hien: has joined #ruby
[00:02:48] adam12: mynameisdebian: if you're not stuck on packages, it's simple to install from source, since it'a dependency free outside of bash.
[00:02:50] mynameisdebian: matthewd: already tried rbenv
[00:03:00] adam12: mynameisdebian: I'm assuming you'd be OK without being packages considering your installing ruby from source.
[00:03:06] adam12: mynameisdebian: https://github.com/postmodern/ruby-install
[00:03:10] mynameisdebian: I'm not installing from source
[00:03:16] mynameisdebian: at least not manually
[00:03:36] adam12: Pretty sure that's what rbenv / ruby-build is doing?
[00:04:42] mynameisdebian: adam12: I just wouldn't know. I know Ruby and have been using 2.0 and below for a while. Trying to learn Rails and it seems to be a problem. Even if it is doing something like that, that does not mean I know how to do that with a different piece of software manually.
[00:05:21] adam12: mynameisdebian: can you use ppa repos? maybe the ruby-ng repo from Brightbox would work for you. I don't know if it works on Debian.
[00:05:23] matthewd: The chruby evangelism really gets old when someone's already legitimately frustrated and just trying to get something that works :/
[00:05:37] adam12: matthewd: Is that directed at me?
[00:05:42] baweaver: If you're that averse to it, just use Heroku: https://www.heroku.com/
[00:05:53] wald0: baweaver: well, maybe I was wrong in the first "=" part, basically my question was about multiple dimensions, like if i can have multiple orders in an array variable (which, each one contains multiple values)
[00:05:57] postmodern: can you use the ruby-ng PPA on Debian, or is there a repo of Debian packages for various ruby versions?
[00:06:42] matthewd: adam12: In this instance, yes.. though I'm mumbling about a wider, non-you-specific, pattern
[00:06:50] havenwood: matthewd: What's better than `sudo ruby-install --system` on AmazonLinux in his case? I think that's amongst the best options.
[00:07:11] mynameisdebian: I've already wiped out AmazonLinux
[00:07:14] mynameisdebian: I'm on Debian now
[00:07:27] havenwood: mynameisdebian: Brightbox maintains great packages.
[00:07:43] mynameisdebian: okay, I will try the brightbox ppa
[00:08:16] pilne: has joined #ruby
[00:08:23] matthewd: havenwood: Given "I tried rbenv [but got an old version]", the solution is going to be to install a version manager from its official source. The least "ruby is a tire fire" response at that point is "use a newer version of the thing you chose", not "use the one I prefer".
[00:08:34] cdg: has joined #ruby
[00:08:37] havenwood: matthewd: I think I was behind on scrollback.
[00:08:59] mynameisdebian: is the Brightbox PPA for Ubuntu? Will it work for Debian?
[00:09:09] havenwood: I just relocated and it looks like a lot has transpired. Never mind me.
[00:10:08] postmodern: appears brightbox ruby-ng is Ubuntu specific. `sudo ruby-install --system ruby` will still work, and no need for chruby since it installs into /usr/local/bin, etc
[00:11:58] jinie: has joined #ruby
[00:12:20] nowhere_man: has joined #ruby
[00:12:24] goyox86: has joined #ruby
[00:14:01] bronson: has joined #ruby
[00:14:36] mynameisdebian: I tried "ruby-full" on the advice of a website claiming this would give me 2.3.2 on Debian, and I'm still getting 2.1.5. What is wrong with this Debian install that it cannot under any circumstances locate a pacakge newer than 2.1.5? I am sure that is not the latest in Debian. What is wrong with my install?
[00:15:20] cagomez: has joined #ruby
[00:15:43] matthewd: Debian 8 is 2.5 years old
[00:16:28] matthewd: The website you're looking at is presumably talking about Debian 9
[00:17:41] chouhoulis: has joined #ruby
[00:20:52] postmodern: debian testing is actually pretty stable and up-to-date
[00:21:55] Orwell: has joined #ruby
[00:22:03] Orwell: has left #ruby: ()
[00:22:59] jenrzzz: has joined #ruby
[00:24:23] mynameisdebian: sorry for all the stupid questions, I'm on Debian 9 now. I have Ruby 2.3.3 installed. I try "gem install rails" and it fails. I think I'm just done with Rails. Ruby was nice and easy to use, but installing Rails is just totally beyond me. Thanks for all the help.
[00:24:39] havenwood: mynameisdebian: Why does it fail?
[00:24:45] havenwood: mynameisdebian: Probably Nokogiri deps.
[00:24:56] mynameisdebian: Yes, it seems to have failed on nokogiri again
[00:24:56] havenwood: mynameisdebian: It seems you made it to where you're ready to roll.
[00:24:58] matthewd: Probably no compiler
[00:25:13] havenwood: mynameisdebian: It'll probably be a pretty quick journey from here if you have anything left.
[00:25:27] matthewd: But if you're done with Rails, that's fine too
[00:25:39] havenwood: mynameisdebian: sudo apt-get install -y build-essential bison zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libffi-dev
[00:25:45] mynameisdebian: https://pastebin.com/wEQB3P3j
[00:25:46] ruby[bot]: mynameisdebian: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/5630bdb1cb04d1d88b11c41aead8171e
[00:25:46] ruby[bot]: mynameisdebian: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[00:26:01] postmodern: has joined #ruby
[00:26:25] mynameisdebian: havenwood: one moment
[00:26:41] havenwood: mynameisdebian: Amend that: sudo apt-get install build-essential patch ruby-dev zlib1g-dev liblzma-dev
[00:26:57] mynameisdebian: Where do you get these commands?
[00:27:00] havenwood: You already have ruby-full
[00:27:01] wutschkef: has joined #ruby
[00:27:30] havenwood: so you don't need ruby-dev
[00:27:35] havenwood: mynameisdebian: http://www.nokogiri.org/tutorials/installing_nokogiri.html#install_with_included_libraries__recommended_
[00:27:55] havenwood: mynameisdebian: https://github.com/postmodern/chruby/wiki/Ruby
[00:28:33] mynameisdebian: havenwood: Thank you
[00:28:39] havenwood: mynameisdebian: you're welcome
[00:29:02] mynameisdebian: I owe you one. Now I need to create and download an AMI and never do that again for a few years.
[00:29:07] matthewd: Equivalently https://github.com/rbenv/ruby-build/wiki#suggested-build-environment
[00:29:10] havenwood: mynameisdebian: There's a #RubyOnRails channel specific to Rails if you need any assistance getting rolling.
[00:29:29] havenwood: matthewd: I was just searching for that.
[00:31:03] havenwood: matthewd: It might be worth unifying installer-independent instructions since they're currently maintained in parallel. I've had multiple people request a canonical source of deps.
[00:31:31] havenwood: RVM, rbenv and chruby all track the deps.
[00:31:40] havenwood: But they change by version and are generally a pain.
[00:33:09] matthewd: Yes, feel free to wander over to #RubyOnRails for more specific help from this point. If your general problem-solving style is to scattershot a series of half-attempts, never share an actual error, and then declare that you're "just done" all within an hour, though, that is... not a repeatable strategy for getting help.
[00:34:18] havenwood: The deps and the versions/checksums are both tempting to unify.
[00:34:32] havenwood: Presenting them on a united front seems best.
[00:34:57] matthewd: Could both live on www.ruby-lang.org?
[00:34:58] havenwood: RVM could be fairly-easily modified to use ruby-versions: https://github.com/postmodern/ruby-versions
[00:35:04] havenwood: matthewd: I think that'd be ideal.
[00:36:02] cdg: has joined #ruby
[00:37:10] wutschkef: has joined #ruby
[00:37:31] havenwood: matthewd: Even if it was just the version checksums and deps for CRuby.
[00:37:55] orbyt_: has joined #ruby
[00:38:17] havenwood: Ideally I think there'd be a central source that covered all the stable released engines - JRuby, CRuby, etc.
[00:38:23] minimalism: has joined #ruby
[00:39:11] havenwood: www.ruby-lang.org hasn't traditionally handled that cross-engine responsibility but it sure seems worth doing and it'd be a nice place to do it
[00:39:26] matthewd: A single place blessing engines seems potentially.. politically difficult
[00:40:05] matthewd: JRuby's easy enough to bless, but things get murkier after that
[00:40:07] havenwood: Aye, maybe a standard way to present the two that engines could opt into providing?
[00:41:25] matthewd: Yeah, if www.ruby-lang.org offered a sane presentation of the data for MRI, then they only have to maintain their own data, and if other engines copy, and installers need only maintain an internal list of *engines* they know about.. that sounds pretty workable
[00:42:09] matthewd: I haven't dug in, but I imagine there's no getting around the installer needing some form of specific recipe for each engine anyway
[00:43:42] Cohedrin_: has joined #ruby
[00:45:12] jenrzzz: has joined #ruby
[00:45:12] jenrzzz: has joined #ruby
[00:45:25] Azure|dc: has joined #ruby
[00:46:16] imode: has joined #ruby
[00:47:49] matthewd: OTOH, if ruby-install allowed installing trunk, and had a magically DWIMy rbenv subcommand, I could just use that and ignore ruby-build entirely :P
[00:48:46] matthewd: Even the trunk thing is more nice-to-have, if I'm honest.. I've used it a few times, but it's not exactly an every-day use case
[00:54:45] goyox86: has joined #ruby
[00:57:37] goyox86: has joined #ruby
[00:58:56] marcux: has joined #ruby
[00:59:01] Cohedrin_: has joined #ruby
[00:59:51] wutschkef: has joined #ruby
[01:10:19] weaksauce: has joined #ruby
[01:10:24] lupine: has joined #ruby
[01:13:10] nadir: has joined #ruby
[01:17:32] goyox86: has joined #ruby
[01:19:57] uZiel: has joined #ruby
[01:20:22] Nuck: Anyone know if Rubocop has a setting to detect cases when you're a moron and do like `verb = verb.to_s`
[01:20:29] Nuck: Where the second one is _supposed_ to be a method call
[01:20:53] Nuck: I just failed to catch that and went "shiiiiiiiiit I forgot about syntactical ambiguity"
[01:30:51] astrobunny: has joined #ruby
[01:31:01] uZiel: has joined #ruby
[01:35:31] jphase: has joined #ruby
[01:38:12] d^sh_: has joined #ruby
[01:39:35] mostlybadfly: has joined #ruby
[01:40:49] knight33: has joined #ruby
[01:50:35] gizmore|2: has joined #ruby
[01:52:05] orbyt_: has joined #ruby
[01:54:07] Silthias: has joined #ruby
[01:58:50] wutschkef: has joined #ruby
[01:59:21] ramfjord: has joined #ruby
[02:01:28] gnufied: has joined #ruby
[02:01:29] cschneid_: has joined #ruby
[02:01:30] imode: has joined #ruby
[02:04:41] steven: has joined #ruby
[02:05:39] ramfjord: has joined #ruby
[02:06:40] amirite: has joined #ruby
[02:11:18] __Yiota: has joined #ruby
[02:15:01] bronson: has joined #ruby
[02:15:05] nicesignal: has joined #ruby
[02:15:25] DTZUZO: has joined #ruby
[02:19:42] helpa-bot: has joined #ruby
[02:20:24] AnoHito: has joined #ruby
[02:21:43] helpa: has joined #ruby
[02:22:08] amirite: has joined #ruby
[02:22:16] postmodern: has joined #ruby
[02:22:56] petems: has joined #ruby
[02:27:23] Radar: nuck: I don't understand.
[02:28:14] TinkerTyper: has joined #ruby
[02:28:19] Nuck: Okay, so, if I have a method `def verb` and in another method I do `verb = verb.to_s`, Ruby seems to interpret both `verb` as variable references (not method calls)
[02:28:36] Nuck: Which is totally understandable, it has to make that call at parse time
[02:28:41] ncthom91: has joined #ruby
[02:31:41] havenwood: musl_: You can define a #verb= method.
[02:32:11] Nuck: havenwood: It wouldn't be called, but it's also not what I'm seeking
[02:32:28] Nuck: I'm wondering if Rubocop has a cop to detect ambiguity such as that
[02:32:39] Nuck: Where you seem to be referencing a variable which didn't exist previously
[02:32:55] havenwood: nuck: Yes, they have unused variable assignment cops.
[02:33:12] Nuck: No no, the variable is used
[02:33:43] matthewd: AIUI the line "should" be `verb = self.verb.to_s` / `verb = verb().to_s`
[02:35:06] havenwood: nuck: Don't shadow methods with variables of the same name.
[02:35:22] chouhoulis: has joined #ruby
[02:35:25] Nuck: havenwood: Indeed, and I'd like a cop to enforce that :D
[02:35:32] Nuck: matthewd: Yeah
[02:35:51] Nuck: Either of those solves the ambiguity, though self.verb has the downside of not working with private methods either
[02:36:14] jrafanie: has joined #ruby
[02:37:09] havenwood: nuck: Set instance variables directly. (If that even works here. Hard to say in the abstract.)
[02:37:24] Nuck: Well, it's not an instance variable, it's just a local variable
[02:37:42] havenwood: nuck: err, so you actually want to be setting the local variable and it is doing that?
[02:37:50] havenwood: I don't get it.
[02:38:05] Nuck: havenwood: I want to set local variable `verb` to `verb().to_s`
[02:38:28] Nuck: Or rather, I want to *detect* when I make that stupid mistake
[02:38:31] Nuck: Shadowing the instance method with a local variable (which is bad)
[02:39:30] havenwood: nuck: that seems like a reasonable cop if there isn't one. (if there is i don't recall it.)
[02:39:39] matthewd: nuck: I think the answer to your question is no, no-one knows of a rubocop rule that would detect this for you :)
[02:40:34] matthewd: It's essentially the opposite of an unused assignment: variable accessed prior to assignment
[02:42:35] Cohedrin_: has joined #ruby
[02:43:54] oncall-pokemon: has joined #ruby
[02:45:04] n35xdxb0: has joined #ruby
[02:45:44] cout: has joined #ruby
[02:45:46] AustinMatherne: has joined #ruby
[02:45:48] rideh: has joined #ruby
[02:46:18] aphelion: has joined #ruby
[02:46:19] DarkBushido: has joined #ruby
[02:46:19] DarkBushido: has joined #ruby
[02:46:26] n35xdxb0: has joined #ruby
[02:46:26] cschneid: has joined #ruby
[02:47:48] epochwolf: has joined #ruby
[02:47:59] Nuck: matthewd: Yeah, it could be covered by a "variable referenced prior to assignment" cop or a "variable shadows instance method" cop
[02:49:19] matthewd: The latter would be true for the entire method... and relies on detecting that the instance method exists
[02:49:30] amirite: has joined #ruby
[02:50:52] irated: has joined #ruby
[02:50:57] wald0: has joined #ruby
[02:51:25] kies: has joined #ruby
[02:52:16] Nuck: Indeed, the latter would probably be far more complicated
[03:00:09] cadillac_: has joined #ruby
[03:01:14] govg: has joined #ruby
[03:17:51] gix: has joined #ruby
[03:22:10] cadillac_: has joined #ruby
[03:28:21] pilne: has left #ruby: ("Leaving!")
[03:28:43] Birdseye: has joined #ruby
[03:35:36] sniffer: has joined #ruby
[03:36:17] someuser: has joined #ruby
[03:38:32] jenrzzz: has joined #ruby
[03:39:30] r_rios: has joined #ruby
[03:40:01] r_rios: Hello, all. Does filepath autocompletion on Readline work on Windows?
[03:40:15] r_rios: It doesn't seem to work from here
[03:42:10] FastJack: has joined #ruby
[03:48:50] cam27: has joined #ruby
[03:57:02] gusrub: has joined #ruby
[04:02:45] Derperperd: has joined #ruby
[04:04:05] jenrzzz: has joined #ruby
[04:04:05] jenrzzz: has joined #ruby
[04:09:38] Derperperd: has joined #ruby
[04:10:47] moei: has joined #ruby
[04:10:57] uZiel: has joined #ruby
[04:12:50] nadir: has joined #ruby
[04:14:56] someuser_: has joined #ruby
[04:15:57] bronson: has joined #ruby
[04:16:26] bkxd: has joined #ruby
[04:17:29] Jameser: has joined #ruby
[04:25:51] wpostma: has joined #ruby
[04:34:31] ramfjord: has joined #ruby
[04:41:19] jenrzzz: has joined #ruby
[04:41:19] jenrzzz: has joined #ruby
[04:51:46] dionysus69: has joined #ruby
[04:52:10] ramfjord: has joined #ruby
[04:58:16] Jameser: has joined #ruby
[04:59:13] harfangk: has joined #ruby
[05:01:32] enterprisey: has joined #ruby
[05:06:58] hahuang65: has joined #ruby
[05:11:27] bkxd: has joined #ruby
[05:15:28] Bock: has joined #ruby
[05:18:03] conta: has joined #ruby
[05:20:14] ur5us: has joined #ruby
[05:22:52] DTZUZO: has joined #ruby
[05:26:25] lizard2010: has joined #ruby
[05:26:47] milardovich: has joined #ruby
[05:28:17] anisha: has joined #ruby
[05:28:54] Cohedrin_: has joined #ruby
[05:29:32] alex``: has joined #ruby
[05:35:26] SeepingN: has joined #ruby
[05:37:36] astrobunny: has joined #ruby
[05:41:21] Derperperd: has joined #ruby
[05:42:22] aufi: has joined #ruby
[05:42:43] ur5us: has joined #ruby
[05:43:30] biberu: has joined #ruby
[05:46:48] aupadhye: has joined #ruby
[05:51:28] jenrzzz: has joined #ruby
[05:51:28] jenrzzz: has joined #ruby
[05:52:50] dminuoso_: has joined #ruby
[05:54:30] csaunders: has joined #ruby
[05:55:29] wutschkef: has joined #ruby
[05:59:30] dminuoso_: More importantly
[05:59:33] dminuoso_: Where is apeiros :(
[05:59:42] dminuoso_: Need someone to throw paper at.
[06:01:19] AndBobsYourUncle: has joined #ruby
[06:01:29] baweaver: dminuoso_: hm hm?
[06:01:58] eckhardt: has joined #ruby
[06:02:10] someuser_: has joined #ruby
[06:02:18] baweaver: ohai eckhardt
[06:02:37] eckhardt: what's the word
[06:02:59] baweaver: oh hi -> ohi -> ohai
[06:03:10] eckhardt: i meant wie geht's
[06:03:23] dionysus69: has joined #ruby
[06:03:24] dminuoso_: baweaver: Fun stuff, do you ever wake up at 6 in the morning, realizing that an isomorphism is both a monomorphism and an epimorphism, but that the inverse does not hold true?
[06:03:26] baweaver: ACTION slowly puts down whisky
[06:03:37] eckhardt: so i spent way too much time today trying to uplift a rails app from 4 to 5
[06:03:38] dminuoso_: Man I should study maths. :(
[06:03:38] baweaver: rectangles and squares man
[06:03:41] eckhardt: because Reasons
[06:04:11] dminuoso_: Yes. Rectangles.
[06:04:18] baweaver: do reasons relate to internal libs that the main contributor just left from?
[06:04:32] eckhardt: Times...36.
[06:04:39] dminuoso_: main contributor?
[06:05:06] dminuoso_: eckhardt: Here we decided to rewrite our rails app from 4 to 5 to fix all our mistakes and headaches.
[06:05:16] dminuoso_: From scratch.
[06:05:16] eckhardt: one of, there are others. I just assumed the stuff for 5 was further along
[06:05:20] eckhardt: man was that a mistake
[06:05:42] baweaver: eckhardt works on another team where I'm at
[06:05:55] baweaver: So does eam
[06:05:59] dminuoso_: And you work at that place with eam?
[06:06:03] dminuoso_: Ahh, I remembered correctly.
[06:06:10] eckhardt: yeah i was tempted to just rerwrite it but the app a) isn't my team's, and b) I have deadlines
[06:06:16] jordanm: has joined #ruby
[06:06:21] baweaver: eam and xshay were the reasons for me going there
[06:06:28] dminuoso_: I need to get a new place to work at I think.
[06:06:42] eckhardt: buncha squares in that joint :)
[06:06:49] baweaver: Ever considered America?
[06:07:17] baweaver: (wait, do we have a German office?)
[06:07:19] eckhardt: don't be a rectangle http://media0.giphy.com/media/gawAL8Xum5U3K/giphy.gif
[06:07:47] eckhardt: not to my knowledge
[06:08:31] baweaver: Dublin and London at least
[06:08:50] baweaver: Kinda wish it was my Dublin XD
[06:09:10] eckhardt: you live in the easy bay too?
[06:09:21] baweaver: So, story time
[06:09:29] eckhardt: nice. Lots of offices in Alameda that would be perfect...
[06:09:44] dminuoso_: US is not something I want to consider for numerous reasons.
[06:09:46] eckhardt: but rent is kinda ridiculous there too
[06:09:48] Emmanuel_Chanel: has joined #ruby
[06:10:18] baweaver: eam was complaining about BART, I asked if he was from around the bay, found out we lived ~5-10m away, got coffee, and he said come over if I ever wanted a new gig
[06:10:19] baweaver: So I did and here I am
[06:11:10] dminuoso_: Was considering about something new earlier this year, but there were too many things I had to take care of first.
[06:11:38] eckhardt: bart just seems to get worse and worse
[06:11:48] dminuoso_: Who or what is BART?
[06:12:15] dminuoso_: Oh. Should google more frequently.
[06:12:30] dminuoso_: Time to study more cateogry theory.
[06:12:37] eckhardt: category theory > BART
[06:12:46] eam: good evening
[06:12:55] eckhardt: awww sh1t it's a party now
[06:13:25] dminuoso_: Clearly eam has been woken up by the amount of 0x07 chars he has gotten.
[06:13:44] eam: I'm getting solar installed tomorrow, I'm so excited
[06:14:06] eckhardt: clearly your future is looking bright
[06:15:23] eam: light up my week
[06:15:39] eckhardt: i think all the smokey air screwed up my delicate lungs
[06:15:47] eckhardt: my throat is unhappy
[06:16:23] eam: I ditched around 1pm, felt awful -- and I think there was concentrated smoke on the 3rd bart level of civic center
[06:16:37] dminuoso_: eckhardt: Have you considered this? http://i.ebayimg.com/00/s/NTcxWDQ2NQ==/z/8V4AAOSwHnFVnax2/$_35.JPG
[06:16:38] eam: when I left they had brought out big fans to ventilate
[06:17:32] bronson: has joined #ruby
[06:17:32] cschneid_: has joined #ruby
[06:19:10] eckhardt: already feel better just by being back in oakland, so i'm probably just gonna wfh
[06:19:42] eckhardt: you guys getting a lot of smoke over there?
[06:19:43] cam27: has left #ruby: ()
[06:22:55] eam: barely any at all
[06:23:16] eam: night all
[06:24:37] conta: has joined #ruby
[06:28:25] yuppie: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[06:32:28] dminuoso_: has joined #ruby
[06:32:38] Xiti`: has joined #ruby
[06:32:40] tsglove: has joined #ruby
[06:33:02] nowhere_man: has joined #ruby
[06:33:24] MrBismuth: has joined #ruby
[06:34:18] Mon_Ouie: has joined #ruby
[06:36:34] morfin: has joined #ruby
[06:36:43] guardianx: has joined #ruby
[06:36:51] morfin: i thought jruby won't work well with OpenJDK =)
[06:50:01] rabajaj: has joined #ruby
[06:52:23] ramfjord: has joined #ruby
[06:54:13] jenrzzz: has joined #ruby
[06:57:14] consti: has joined #ruby
[06:57:20] hs366: has joined #ruby
[06:58:30] ta: has joined #ruby
[07:00:31] paranoicsan: has joined #ruby
[07:09:29] cdg: has joined #ruby
[07:12:36] dminuoso_: has joined #ruby
[07:12:54] mjolnird: has joined #ruby
[07:13:26] kliq: has joined #ruby
[07:15:56] claudiuinberlin: has joined #ruby
[07:22:21] jenrzzz: has joined #ruby
[07:22:21] jenrzzz: has joined #ruby
[07:23:25] eckhardt: has joined #ruby
[07:24:36] Paraxial: has joined #ruby
[07:26:11] neon_icon: has joined #ruby
[07:30:59] cdg: has joined #ruby
[07:31:00] jenrzzz: has joined #ruby
[07:44:30] Paraxial: has joined #ruby
[07:44:48] burgestrand: has joined #ruby
[07:50:52] Silthias1: has joined #ruby
[07:51:08] howdoi: has joined #ruby
[07:51:17] Cohedrin_: has joined #ruby
[07:52:44] Silthias: has joined #ruby
[07:54:51] sysvalve: has joined #ruby
[07:57:48] mark_66: has joined #ruby
[07:59:07] claudiuinberlin: has joined #ruby
[08:02:17] ski7777: has joined #ruby
[08:02:45] Coming_: has joined #ruby
[08:10:45] veeti: has joined #ruby
[08:16:13] nemesit|znc: has joined #ruby
[08:17:09] ski7777: has joined #ruby
[08:18:31] bronson: has joined #ruby
[08:18:36] tripoli: has joined #ruby
[08:19:44] mim1k: has joined #ruby
[08:19:50] dinfuehr: has joined #ruby
[08:24:19] kliq: has joined #ruby
[08:24:30] mgtuiw1131: has joined #ruby
[08:27:48] marr: has joined #ruby
[08:30:36] veeti: has joined #ruby
[08:31:20] Beams: has joined #ruby
[08:31:28] kies: has joined #ruby
[08:32:51] guille-moe: has joined #ruby
[08:34:04] sniffer: has joined #ruby
[08:42:30] rabajaj: has joined #ruby
[08:42:45] rabajaj: has joined #ruby
[08:45:52] claudiuinberlin: has joined #ruby
[08:47:12] InfinityFye: has joined #ruby
[08:50:33] devgiant: has joined #ruby
[08:52:31] ramfjord: has joined #ruby
[08:58:02] lxsameer: has joined #ruby
[09:01:23] dminuoso_: super: no superclass method `username'
[09:01:39] dminuoso_: Apparently this toxic class uses method_missing? in *some* class in the ancestory.
[09:01:50] dminuoso_: Why doesn't super respect method_missing? ....
[09:03:58] ski7777: has joined #ruby
[09:04:13] matthewd: More likely it's *not* using method_missing: it's defining the method dynamically, and you're overwriting said method in the same class it would otherwise be defined
[09:04:40] dminuoso_: Oh. Indeed.
[09:05:08] matthewd: AR supports this by specifically doing the dynamic definitions in a purpose-created module instead
[09:05:35] matthewd: But otherwise, you can prepend instead ¯\_(ツ)_/¯
[09:05:38] dminuoso_: matthewd: What API would I be looking for?
[09:05:42] dminuoso_: matthewd: Yeah, already on that.
[09:06:03] matthewd: In AR? generated_attribute_methods IIRC
[09:09:16] ur5us: has joined #ruby
[09:10:00] ur5us_: has joined #ruby
[09:11:09] claudiuinberlin: has joined #ruby
[09:18:03] dminuoso_: matthewd: https://gist.github.com/anonymous/31a395404e3073eaa9e57b62f1c7ef5a it actually doesn't look too horrible with prepend and an inline module definition :)
[09:22:22] dminuoso_: Should probably use caller_locations over caller though.
[09:25:57] veeti: has joined #ruby
[09:26:46] ur5us: has joined #ruby
[09:27:07] Defenestrate: has joined #ruby
[09:32:45] cschneid_: has joined #ruby
[09:35:42] Nahra: has joined #ruby
[09:36:21] milardovich: has joined #ruby
[09:40:49] sniffer: has joined #ruby
[09:41:23] elsevero: has joined #ruby
[09:43:29] claudiuinberlin: has joined #ruby
[09:45:36] someuser: has joined #ruby
[09:46:28] cdg: has joined #ruby
[09:50:40] jinie: has joined #ruby
[09:51:22] bruno-: has joined #ruby
[09:54:34] ski7777: has joined #ruby
[09:56:58] jenrzzz: has joined #ruby
[09:59:24] ferr: has joined #ruby
[10:02:28] ski7777: has joined #ruby
[10:04:47] rgr: has joined #ruby
[10:06:54] Bhootrk_: has joined #ruby
[10:17:09] cschneid_: has joined #ruby
[10:19:47] bronson: has joined #ruby
[10:20:31] dinfuehr: has joined #ruby
[10:21:59] harfangk: has joined #ruby
[10:22:22] veeti: has joined #ruby
[10:22:32] Serpent7776: has joined #ruby
[10:26:35] quobo: has joined #ruby
[10:28:46] InfinityFye: has joined #ruby
[10:29:21] harfangk: has joined #ruby
[10:33:59] yosafbridge: has joined #ruby
[10:36:28] GodFather: has joined #ruby
[10:48:41] Jameser: has joined #ruby
[10:49:33] ski7777: has joined #ruby
[10:51:18] charliesome: has joined #ruby
[10:51:44] Mon_Ouie: has joined #ruby
[10:52:43] ramfjord: has joined #ruby
[10:58:17] shinnya: has joined #ruby
[10:58:37] wutschkef: has joined #ruby
[11:00:22] rippa: has joined #ruby
[11:02:47] elsevero_: has joined #ruby
[11:04:10] chromis: has joined #ruby
[11:05:42] skmp: has joined #ruby
[11:05:54] stephenh: has joined #ruby
[11:08:38] mostlybadfly: has joined #ruby
[11:09:27] johno84: has joined #ruby
[11:09:29] bkxd: has joined #ruby
[11:11:24] milardovich: has joined #ruby
[11:14:18] wutschkef: has joined #ruby
[11:26:23] mr_sourcerer: has joined #ruby
[11:27:24] bkxd: has joined #ruby
[11:27:54] Doow: has joined #ruby
[11:28:21] ski7777: has joined #ruby
[11:29:02] gheegh: has joined #ruby
[11:31:43] roamingdog: has joined #ruby
[11:34:17] ldnunes: has joined #ruby
[11:37:36] CrazyEddy: has joined #ruby
[11:38:16] VladGh: has joined #ruby
[11:38:41] ski7777: has joined #ruby
[11:43:08] dminuoso_: has joined #ruby
[11:45:29] bruno-: has joined #ruby
[11:46:21] Paraxial: has joined #ruby
[11:54:58] wutschkef: has joined #ruby
[11:56:34] sepp2k: has joined #ruby
[11:57:47] lukeyb: has joined #ruby
[11:58:10] lukeyb: hey all, can someone please tell me why this calc wont work in ruby 2.4.2
[11:58:12] lukeyb: 1 + ((1 – (2 / 100)) * (4.25 – 1))
[11:59:52] darix: lukeyb: what do you expect? what do you get?
[12:00:21] lukeyb: I expect 4.19, get weird errors in irb
[12:00:34] lukeyb: works if you plug it into a calculator
[12:01:01] Tempesta: has joined #ruby
[12:01:46] al2o3-cr: has joined #ruby
[12:02:33] lukeyb: works on Wolfram Alpha as well
[12:02:33] lukeyb: https://www.wolframalpha.com/input/?i=1+%2B+((1+%E2%80%93+(2+%2F+100))+*+(4.25+%E2%80%93+1))
[12:02:42] lukeyb: Just blows up in irb
[12:03:11] synthroid: has joined #ruby
[12:04:49] tbuehlmann: lukeyb: try 2.0/100
[12:05:08] darix: tbuehlmann: not the problem
[12:05:11] darix: lukeyb: the problem is
[12:05:24] darix: your "–" is not the real "-"
[12:05:32] darix: replace them with the "-" sign again
[12:05:37] darix: and it works
[12:06:02] lukeyb: Wow, nice pickup!!
[12:06:04] darix: lukeyb: it is some weird unicode character
[12:06:24] lukeyb: Thats what I get for copy paste!!
[12:06:27] tbuehlmann: also, try 2.0/100, because 2/100 is 0
[12:07:36] vondruch_: has joined #ruby
[12:07:49] darix: tbuehlmann: it actually seems to calculate something
[12:07:54] darix: ruby.ruby2.5 somecalc.rb
[12:07:57] darix: ruby.ruby2.5 somecalc.rb
[12:07:58] darix: 4.1850000000000005
[12:08:02] darix: if you make it a float
[12:10:00] ski7777: has joined #ruby
[12:11:49] milardovich: has joined #ruby
[12:12:21] jphase: has joined #ruby
[12:20:45] bronson: has joined #ruby
[12:25:07] wutschkef: has joined #ruby
[12:29:59] zapata: has joined #ruby
[12:32:28] milardovich: has joined #ruby
[12:36:37] bmurt: has joined #ruby
[12:37:02] fmcgeough: has joined #ruby
[12:37:05] claudiuinberlin: has joined #ruby
[12:39:39] ski7777: has joined #ruby
[12:42:19] InfinityFye: has joined #ruby
[12:42:24] simmaniac: has joined #ruby
[12:43:17] guille-moe: has joined #ruby
[12:51:41] truenito: has joined #ruby
[12:51:52] MarkBilk_: has joined #ruby
[12:52:05] charliesome: has joined #ruby
[12:52:52] ramfjord: has joined #ruby
[12:54:27] tripoli: has joined #ruby
[12:54:43] workmad3: has joined #ruby
[12:54:59] govg: has joined #ruby
[12:55:35] belmoussaoui: has joined #ruby
[12:56:09] waveprop: ruby > python
[12:57:24] rfoust: has joined #ruby
[12:58:24] Guest94919: has joined #ruby
[12:58:44] cabotto: has joined #ruby
[12:59:07] Cohedrin_: has joined #ruby
[13:00:02] cdg: has joined #ruby
[13:00:32] jphase: has joined #ruby
[13:05:08] zzz: has joined #ruby
[13:07:29] milardovich: has joined #ruby
[13:09:05] kliq: has joined #ruby
[13:10:35] belmoussaoui_: has joined #ruby
[13:10:56] lexruee: has joined #ruby
[13:11:10] GodFather: has joined #ruby
[13:14:59] 32NAA6FX6: has joined #ruby
[13:20:41] bmurt: has joined #ruby
[13:21:55] blackmesa: has joined #ruby
[13:24:12] belmoussaoui_: has joined #ruby
[13:27:32] DLSteve_: has joined #ruby
[13:31:54] bmurt: has joined #ruby
[13:33:37] milardovich: has joined #ruby
[13:34:33] ski7777: has joined #ruby
[13:34:57] t0th_-: has joined #ruby
[13:35:04] t0th_-: hiw, how i can solve: PG::ConnectionBad: fe_sendauth: no password supplied ?
[13:38:45] charliesome: has joined #ruby
[13:39:18] vondruch: has joined #ruby
[13:39:38] charliesome: has joined #ruby
[13:41:16] chouhoulis: has joined #ruby
[13:45:09] belmoussaoui_: has joined #ruby
[13:45:24] cabotto: has joined #ruby
[13:47:15] dminuoso_: t0th_-: Show us your pg_hba.conf and whatever code/yaml you use to configure pg.
[13:49:27] claudiuinberlin: has joined #ruby
[13:50:42] savarice: has joined #ruby
[13:53:40] Sylario: has joined #ruby
[13:56:32] TomyWork: has joined #ruby
[13:57:31] belmoussaoui_: has joined #ruby
[14:08:42] apparition: has joined #ruby
[14:09:18] claudiuinberlin: has joined #ruby
[14:10:29] orbyt_: has joined #ruby
[14:11:21] AgentBoo: has joined #ruby
[14:11:32] drptbl: has joined #ruby
[14:12:32] tcopeland: has joined #ruby
[14:12:38] Xiti: has joined #ruby
[14:12:40] Junaos: has joined #ruby
[14:20:30] ski7777: has joined #ruby
[14:21:42] bronson: has joined #ruby
[14:22:44] Rapture: has joined #ruby
[14:24:36] johno84: has joined #ruby
[14:25:40] savarice: has joined #ruby
[14:26:01] cam27: has joined #ruby
[14:26:57] zautomata: has joined #ruby
[14:27:12] Derperperd: has joined #ruby
[14:27:46] zautomata: whats a regex on a ruby string to match from a specific pattern to the end of the string?
[14:29:28] ski7777: has joined #ruby
[14:30:11] savarice: has joined #ruby
[14:30:20] havenwood: zautomata: You can anchor to the end of the string by ending your regexp with: \z
[14:32:44] wpostma: has joined #ruby
[14:32:51] zautomata: havenwood "this is string"[.....] example ?
[14:33:28] alnewkirk: has joined #ruby
[14:34:02] havenwood: zautomata: Can you give an example of the input value you have and the result you'd want?
[14:34:33] zautomata: havenwood "this 1.is string\r\n somthing \r\n"[/#{"1."}(.*?)#{"\r\n"}/m, 1]
[14:34:48] zautomata: I want from 1. till the end not till the first \r\n
[14:35:52] havenwood: zautomata: [/1\.(.*?)\z/m, 1]
[14:36:40] zautomata: havenwood THANKS
[14:36:59] marcux: has joined #ruby
[14:41:46] cadillac_: has joined #ruby
[14:43:22] imode: has joined #ruby
[14:45:54] bmurt: has joined #ruby
[14:46:45] jrafanie: has joined #ruby
[14:48:07] alnewkirk: has joined #ruby
[14:49:12] znz_jp: has joined #ruby
[14:49:33] milardovich: has joined #ruby
[14:50:22] Mweshi: has joined #ruby
[14:50:42] savarice: has joined #ruby
[14:50:53] herbmillerjr: has joined #ruby
[14:57:20] savarice: has joined #ruby
[14:59:04] AgentVenom: has joined #ruby
[15:00:13] ski7777: has joined #ruby
[15:00:15] milardovich: has joined #ruby
[15:04:57] polishdub: has joined #ruby
[15:06:55] alfiemax: has joined #ruby
[15:08:48] mtkd: has joined #ruby
[15:09:13] alex``: has joined #ruby
[15:09:54] wpostma: has joined #ruby
[15:11:00] alfiemax: has joined #ruby
[15:12:01] belmoussaoui_: has joined #ruby
[15:14:08] cschneid_: has joined #ruby
[15:14:35] Tempesta: has joined #ruby
[15:15:05] 7ITABQTQP: has joined #ruby
[15:20:28] mark_66: has left #ruby: ("PART #elixir-lang :PART #crystal-lang :QUIT :Leaving.")
[15:20:44] alfiemax: has joined #ruby
[15:22:01] belmoussaoui: has joined #ruby
[15:22:35] __Yiota: has joined #ruby
[15:23:12] milardovich: has joined #ruby
[15:23:50] wutschkef: has joined #ruby
[15:24:52] cadillac_: has joined #ruby
[15:25:28] dinfuehr: has joined #ruby
[15:25:41] 5EXAAI5ZI: has joined #ruby
[15:28:11] mson: has joined #ruby
[15:29:26] gigetoo: has joined #ruby
[15:31:12] belmoussaoui: has joined #ruby
[15:31:39] jrafanie: has joined #ruby
[15:32:59] ldnunes: has joined #ruby
[15:39:16] nofxx: has joined #ruby
[15:39:47] cagomez: has joined #ruby
[15:40:14] selim: has joined #ruby
[15:40:44] synthroid: has joined #ruby
[15:41:23] synthroid: has joined #ruby
[15:41:35] uZiel: has joined #ruby
[15:44:49] ski7777: has joined #ruby
[15:46:36] dviola: has joined #ruby
[15:47:45] blackmesa: has joined #ruby
[16:03:09] jenrzzz: has joined #ruby
[16:03:09] jenrzzz: has joined #ruby
[16:04:41] milardovich: has joined #ruby
[16:05:16] enterprisey: has joined #ruby
[16:07:19] jrafanie: has joined #ruby
[16:09:28] milardovich: has joined #ruby
[16:11:48] orbyt_: has joined #ruby
[16:12:07] Mia: has joined #ruby
[16:12:07] Mia: has joined #ruby
[16:16:16] troys: has joined #ruby
[16:16:21] ShalokShalom_: has joined #ruby
[16:16:39] blackmesa: has joined #ruby
[16:17:16] gusrub: has joined #ruby
[16:18:46] milardovich: has joined #ruby
[16:19:27] belmoussaoui_: has joined #ruby
[16:19:34] milardovich: has joined #ruby
[16:22:21] milardovich: has joined #ruby
[16:22:54] bronson: has joined #ruby
[16:26:04] pppktz1: has joined #ruby
[16:26:18] [Butch]: has joined #ruby
[16:26:43] kent\n: has joined #ruby
[16:27:49] pppktz1: Hi guys! I have started learning ruby and as a homework I am trying to write a simple code to list files in a directory with an extension, file path and extension provided by input, however I am stuck... Can someone have a look at my code?
[16:27:58] naprimer: has joined #ruby
[16:32:38] Papierkorb: pppktz_: Please use https://gist.github.com to share the relevant parts of your code. Also, describe here what you're trying to do (And *How*), and what happens instead. If you're stuck in that you don't know how to do something, please say exactly what, and what you tried already.
[16:33:35] amirite: has joined #ruby
[16:33:40] Papierkorb: pppktz_: We don't bite, we want to help you, so please share what you have with us to make things easier :)
[16:36:28] pppktz1: Papierkorb, thanks for the update, here is the code : https://gist.github.com/anonymous/38e248e0bc71026d5a4ecde1cd747706 , as I mentioned I am trying to create a script which is searching in a user specified path for file with user specified extension, however I only can print what I provide for the variable c in my code
[16:37:21] Papierkorb: pppktz_: Do you mean searching as in, in recursively in sub-folders?
[16:37:39] yeticry_: has joined #ruby
[16:40:42] Papierkorb: pppktz_: There's `Dir[x]`, where x is a wildcard glob string like you (may?) know from a shell. You can use `**` (so, star star) to match recursively. That command returns an array, so you'll have to #each over it. Can you try with that?
[16:41:44] Papierkorb: pppktz_: If you don't already, at least use `irb` to start an interactive ruby session where you can quickly try things like this. Makes learning ruby quite enjoyable once you get the hang of it, and really useful after that :)
[16:42:09] kent\n: has joined #ruby
[16:42:24] pppktz1: let me try it, thanks!
[16:42:29] workmad3: pppktz_: also note `if file = "*.#{c}"` will assign '*.#{c}' to the file variable, and that string is truthy so will always hit the 'true' path too
[16:45:11] ski7777: has joined #ruby
[16:46:40] ddffg: has joined #ruby
[16:47:33] raynold: has joined #ruby
[16:50:05] dionysus69: has joined #ruby
[16:51:04] snath: has joined #ruby
[16:52:36] snath: has left #ruby: ()
[16:52:49] claudiuinberlin: has joined #ruby
[16:52:54] Juzzika: has joined #ruby
[16:54:47] minimalism: has joined #ruby
[16:55:08] tax: has joined #ruby
[16:57:35] kies: has joined #ruby
[16:58:28] charliesome_: has joined #ruby
[17:00:25] Cohedrin_: has joined #ruby
[17:00:57] AndBobsYourUncle: has joined #ruby
[17:02:25] ski7777: has joined #ruby
[17:05:37] alnewkirk: has joined #ruby
[17:06:18] jenrzzz: has joined #ruby
[17:06:18] jenrzzz: has joined #ruby
[17:06:21] eckhardt: has joined #ruby
[17:06:23] havenwood: pppktz_: There's also a Find module in the Ruby stdlib that's great for top-down traversal of file paths.
[17:06:37] `derpy: http://ruby-doc.org/stdlib-2.4.1/libdoc/find/rdoc/Find.html
[17:07:25] claudiuinberlin: has joined #ruby
[17:09:52] naprimer: has joined #ruby
[17:11:18] alnewkirk: has joined #ruby
[17:11:55] pppktz1: thanks havenwood, almost done, workmad3 now I updated = to == and it works, Papierkorb (thanks for irb, I read about it but not tried before)the filtering works with regexp, however subfolders are still ahead :)
[17:12:10] jrafanie: has joined #ruby
[17:12:20] Papierkorb: ?pry pppktz_
[17:12:34] ruby[bot]: Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
[17:12:47] Papierkorb: pppktz_: That's like irb on crack.
[17:13:41] Papierkorb: If not today, maybe next week. Many use it about daily for various things, from trying things, to debugging or as partial replacement for a "shell"
[17:15:27] jenrzzz: has joined #ruby
[17:15:27] jenrzzz: has joined #ruby
[17:16:09] chouhoulis: has joined #ruby
[17:16:22] pppktz1: Papierkorb, thanks, I will check it out soon, first I'll try to get familiar with irb :)
[17:16:57] chouhoulis: has joined #ruby
[17:19:17] Nahra: has joined #ruby
[17:22:01] elsevero: has joined #ruby
[17:27:21] alfiemax: has joined #ruby
[17:29:36] MyMind: has joined #ruby
[17:30:13] jrafanie: has joined #ruby
[17:30:16] TomyLobo: has joined #ruby
[17:32:08] pppktz1: done and working! Thank you guys! I learned by the days practice is much more important than just reading about how to code...
[17:33:11] ldepandis: has joined #ruby
[17:33:46] Guest97372: has joined #ruby
[17:34:18] TomyLobo2: has joined #ruby
[17:35:58] jenrzzz: has joined #ruby
[17:35:58] jenrzzz: has joined #ruby
[17:36:37] nogic: has joined #ruby
[17:37:23] mim1k: has joined #ruby
[17:38:11] teatime: pppktz_: protip: that's true for pretty much everything ;)
[17:38:36] teatime: it may be an easier trap to fall into for coding, tho
[17:38:41] teatime: analysis paralysis etc.
[17:41:04] roamingdog: has joined #ruby
[17:41:54] roamingdog: has joined #ruby
[17:42:34] milardovich: has joined #ruby
[17:42:39] blackmesa: has joined #ruby
[17:42:39] roamingdog: has joined #ruby
[17:42:46] RickHull: has joined #ruby
[17:43:23] RickHull: is there any way to get ruby-rprof to respect a LOAD_PATH, e.g. `ruby-prof -I lib/` ?
[17:43:28] roamingdog: has joined #ruby
[17:43:41] RickHull: s/ruby-rprof/ruby-prof/
[17:44:16] roamingdog: has joined #ruby
[17:44:32] RickHull: it appears `ruby-prof` expects a "script" as the first argument, and it won't accept `ruby -Ilib` as that script
[17:45:20] roamingdog: has joined #ruby
[17:45:29] RickHull: this is annoying because profiling is a development thing, but ruby-prof will only execute against installed gems, not the state of dev on the filesystem
[17:48:35] Mon_Ouie: has joined #ruby
[17:49:27] jenrzzz: has joined #ruby
[17:49:41] jenrzzz: has joined #ruby
[17:50:46] ski7777: has joined #ruby
[17:51:49] simmaniac: has joined #ruby
[17:52:16] teatime: RickHull: some interpreted languages have the concept of "install-linking" (I dunno the word) an editable development tree such that the rest of the system sees and uses it as an installed module... does ruby?
[17:53:17] RickHull: in general, if you have a project on the filesystem that is structured like a gem, you can just do: `ruby -Ilib path/to/script` in order to execute your script against the state of the filesystem
[17:53:47] RickHull: or more consistently: `ruby -I path/to/lib path/to/script`
[17:54:24] RickHull: however, when using ruby-prof, there doesn't appear to be a way to prepend the local lib dir to the LOAD_PATH
[17:54:57] teatime: is it ignoring the env var(s) Ruby would normally pay attention to ?
[17:56:00] RickHull: hm, LOAD_PATH is not an env var but a built in "
[17:56:11] RickHull: but I think there is a RUBYLIB env var
[17:59:53] RickHull: yep, RUBYLIB appears to be a workable mechanism here, thx
[18:01:11] conta2: has joined #ruby
[18:02:18] ramfjord: has joined #ruby
[18:03:07] orbyt_: has joined #ruby
[18:04:47] claudiuinberlin: has joined #ruby
[18:08:32] jenrzzz: has joined #ruby
[18:09:10] eckhardt: has joined #ruby
[18:09:53] cagomez: http://www.virtuouscode.com/2011/07/26/the-procedurefunction-block-convention-in-ruby/ . if I have Foo, and am mapping over Foo and changing data (returning a new object), should I use a functional or procedural block?
[18:11:01] jrafanie: has joined #ruby
[18:11:59] orbyt_: has joined #ruby
[18:12:29] amirite: has joined #ruby
[18:15:00] cajone: has joined #ruby
[18:17:00] Cohedrin_: has joined #ruby
[18:19:18] Eiam: has joined #ruby
[18:21:11] quobo: has joined #ruby
[18:22:26] AxelAlex: has joined #ruby
[18:23:47] bronson: has joined #ruby
[18:24:34] bmurt: has joined #ruby
[18:24:51] blackmesa: has joined #ruby
[18:25:01] eckhardt_: has joined #ruby
[18:25:34] shwouchk: has joined #ruby
[18:26:57] baweaver: The thing about preference and style is it's just that: recommendations
[18:27:08] baweaver: you're not strictly _required_ to do them cagomez
[18:27:43] baweaver: That said, I tend to follow after that convention but mostly because I almost always write functional style and I hate typing out do end all the time
[18:28:51] cagomez: baweaver: ok, so if were to follow the convention, is returning a new value derived from Foo a side effect? or is a function?
[18:29:16] baweaver: Got a gist?
[18:29:33] baweaver: In general functional style is to not mutate anything.
[18:29:55] baweaver: or, more correctly in Ruby, minimize and isolate them to the edges
[18:30:27] jenrzzz: has joined #ruby
[18:30:27] jenrzzz: has joined #ruby
[18:30:40] bmurt: has joined #ruby
[18:33:22] weaksauce: has joined #ruby
[18:33:50] EXCHGR: has joined #ruby
[18:35:25] headius: morfin: JRuby should work fine with any JDK, and we recommend OpenJDK
[18:36:01] ski7777: has joined #ruby
[18:38:41] wpostma: has joined #ruby
[18:52:27] GodFather: has joined #ruby
[18:58:13] uZiel: has joined #ruby
[19:00:04] claudiuinberlin: has joined #ruby
[19:00:28] jamesaxl: has joined #ruby
[19:02:05] jrafanie: has joined #ruby
[19:03:58] consti: has joined #ruby
[19:05:53] RickHull: zenspider: is there a way to get FlogTask to respect something like the `--all` flag? looks like not, judging from https://github.com/seattlerb/flog/blob/master/lib/flog_task.rb#L55
[19:06:35] nowhereman: has joined #ruby
[19:07:18] RickHull: I have some ideas for a PR to unify the various ways to specify options between CLI and rake task and object instantiation
[19:09:10] jenrzzz: has joined #ruby
[19:09:10] jenrzzz: has joined #ruby
[19:10:31] nowhere_man: has joined #ruby
[19:11:43] consti: has joined #ruby
[19:13:49] john__: has joined #ruby
[19:14:53] nicesignal: has joined #ruby
[19:15:34] bmurt: has joined #ruby
[19:20:59] charliesome: has joined #ruby
[19:22:14] RickHull: likewise, I'm trying to do something similar with FlayTask and --liberal
[19:22:47] teatime: ACTION is not sure if legitimate technical problem or US political joke.
[19:23:36] synthroid: has joined #ruby
[19:24:02] RickHull: flay teatime --trump --liberal --checkmate --atheists
[19:24:49] bmurt: has joined #ruby
[19:24:58] Ioannis74: has joined #ruby
[19:26:52] consti_: has joined #ruby
[19:29:14] sagax: has joined #ruby
[19:35:25] RickHull: also, it looks like setting FlogTask#verbose == true has a different effect than `flay --verbose`
[19:44:23] orbyt_: has joined #ruby
[19:44:46] ski7777: has joined #ruby
[19:45:40] RickHull: oh, there is a way to execute ruby-prof on local libs without RUBYLIB: ruby -I lib `which ruby-prof` ...
[19:46:31] RickHull: not sure which I like better
[19:47:29] RickHull: (with the unstated premise of not having to edit files or create wrappers or manipulate the LOAD_PATH using ruby code)
[19:49:09] AndBobsYourUncle: has joined #ruby
[19:51:02] adlerdias: has joined #ruby
[19:53:25] ta: has joined #ruby
[19:55:44] Orwell: has joined #ruby
[19:55:48] Orwell: has left #ruby: ()
[19:57:16] ski7777: has joined #ruby
[20:00:23] P1RATEZ: has joined #ruby
[20:07:41] ur5us: has joined #ruby
[20:15:19] bkxd: has joined #ruby
[20:15:27] mostlybadfly: has joined #ruby
[20:16:38] ski7777: has joined #ruby
[20:17:25] cdg: has joined #ruby
[20:18:52] bmurt: has joined #ruby
[20:20:17] pizzaops: So I've read the docs here — https://bundler.io/v1.11/man/bundle-install.1.html — and maybe I'm missing something, but is there no way to run `bundle install` from outside a project's directory?
[20:20:52] pizzaops: E.g. with git I can do things like `git --git-dir=/path/to/project/.git --work-dir=/path/to/project checkout master`
[20:20:58] pizzaops: from any random directory
[20:20:59] havenwood: pizzaops: --gemfile=
[20:21:08] RickHull: i'd guess if you specify path/to/Gemfile and also output_dir
[20:21:22] pizzaops: havenwood RickHull thank you! <3 <3
[20:21:28] pizzaops: Don't know how I overlooked that.
[20:22:15] pizzaops: RickHull: I don't see that flag in the docs, output_dir
[20:22:28] pizzaops: (or anything like it
[20:22:38] RickHull: just a stab -- bundle install will probably want to create a Gemfile.lock and maybe some other stuff
[20:23:09] RickHull: it may not be needed -- e.g. inferred from the Gemfile location; poke around
[20:23:11] pizzaops: RickHull: agreed, but hopefully it does it in the proper directory. I'll just make a Gemfile and test it real quick.
[20:23:21] pizzaops: Thanks for your help sir!
[20:24:40] bronson: has joined #ruby
[20:25:47] bruno-: has joined #ruby
[20:28:10] kapil___: has joined #ruby
[20:29:37] Immune: has joined #ruby
[20:30:43] wutschkef: has joined #ruby
[20:31:03] bmurt: has joined #ruby
[20:31:32] cdg_: has joined #ruby
[20:34:54] pizzaops: RickHull: thanks again, can confirm that it creates the `Gemfile.lock` in the appropriate place automatically.
[20:36:03] RickHull: havenwood is da real MVP <3
[20:40:44] ltem: has joined #ruby
[20:42:08] ski7777: has joined #ruby
[20:45:38] eckhardt: has joined #ruby
[20:48:37] Rapture: has joined #ruby
[20:51:57] jinie: has joined #ruby
[20:54:31] roamingdog: has joined #ruby
[20:56:05] serhart: has joined #ruby
[20:58:43] serhart: has joined #ruby
[21:02:22] Dimik: has joined #ruby
[21:05:37] guille-moe: has joined #ruby
[21:11:56] blackmesa: has joined #ruby
[21:12:27] __Yiota: has joined #ruby
[21:16:32] cagomez: has joined #ruby
[21:21:04] milardovich: has joined #ruby
[21:22:12] jrafanie: has joined #ruby
[21:23:29] goyox86_: has joined #ruby
[21:27:29] chouhoul_: has joined #ruby
[21:29:39] jenrzzz: has joined #ruby
[21:29:59] goyox86_: has joined #ruby
[21:31:58] imode: has joined #ruby
[21:33:17] goyox86: has joined #ruby
[21:38:01] RickHull: anyone familiar with rubinius on travs-ci.org? with rubinius-3.86, I get an error about sudo inside a container
[21:38:33] RickHull: hm, I guess I need to tell travis I need sudo for this
[21:38:34] matthewd: RickHull: (from 2 hours ago) see also ruby -S
[21:39:12] RickHull: ah, for path/to/ruby-prof -- thanks :)
[21:41:41] bmurt: has joined #ruby
[21:41:58] mtkd: has joined #ruby
[21:47:41] cagomez: has joined #ruby
[21:49:53] ldnunes: has joined #ruby
[21:51:05] mim1k: has joined #ruby
[21:55:20] cagomez: what is inside the parens? some_hash.merge(k => v * 2) . is it a lambda?
[21:55:35] RickHull: it's a hash
[21:55:57] RickHull: the brackets are implicit in this context, though can say some_hash.merge({ k => v * 2})
[21:56:18] cagomez: RickHull: ah, so it's merging {k: v*2), overwriting the old value of some_hash[k]?
[21:56:51] cagomez: is it possible to convert k from string to a symbol during merge() or is that a another transformation?
[21:56:54] elomatreb: Lambda would be with a dash arrow, -> { something }
[21:57:36] elomatreb: You could call .to_sym on it, if it's really that simple
[21:57:57] cagomez: would that overwrite the old key that is of type string?
[21:58:15] elomatreb: No. That would have to be a different step then
[21:58:31] elomatreb: (Except if your Hash is one of the weird Rails HashWithIndifferentAccess thingies)
[21:58:58] ski7777: has joined #ruby
[22:00:20] Nahra: has joined #ruby
[22:00:52] cagomez: see, I have an array of hashes that I want to transform. I looked at Elixir and it can do myHash |> do_this |> then_that . is there a way to do something like, array_of_hashes { |some_hash| thenThat(doThis(hash)) }
[22:01:04] cagomez: but in a cleaner way?
[22:02:48] elomatreb: I don't know Elixir, sorry. transform_values/keys may be what you want, but if there are multiple steps you'll probably need to chain them
[22:04:40] matthewd: array_of_hashes.map { |h| doThis(h) }.map { |h| thenThat(h) } ?
[22:04:47] elomatreb: Oh, transform_keys is an activesupport method sadly
[22:05:27] jenrzzz: has joined #ruby
[22:05:58] elomatreb: matthewd: Couldn't those two calls be in a single map, thenThat(doThis(h))? If it's this I think I misunderstood the question
[22:06:03] matthewd: AIUI, the true ruby equivalent of elixir's "|>" is "."
[22:06:26] pizzaops: Is there something in Ruby comparable to Python's ctypes? Just curious.
[22:07:31] matthewd: elomatreb: Yes; the goal is "a cleaner way", so my best offering was something that put "doThis" physically ahead of "thenThat", which seems to be the generally-claimed revelation of |>
[22:08:01] elomatreb: Ah, that's what it does
[22:08:03] havenwood: In Ruby 2.5 there's #yield_self but it'll not read as nice as the pipe operator
[22:08:32] havenwood: And doesn't have the implicit first argument passing
[22:08:47] matthewd: havenwood: Right.. but how is that not what "." does?
[22:09:24] ski7777: has joined #ruby
[22:09:38] havenwood: matthewd: `hash |> do_this |> then_this` is equiv to `then_this(do_this(hash))`
[22:09:39] matthewd: Calls the named method, with an implicit first argument plus any others supplied, with minimal syntax
[22:10:46] matthewd: And so is hash.do_this.then_this
[22:11:18] RickHull: except that the middleman methods need to return self (more or less), not some other value
[22:11:19] havenwood: Yeah, if Ruby had OO and functional calls available interchangeably like Perl 6
[22:12:27] havenwood: But since Ruby doesn't equivocate between those two styles, the functional pipeline seems enviable.
[22:12:47] matthewd: I guess my argument is that Elixir doesn't have them interchangeable either, so it seems like "|>" is a direct equivalent of ".", reflective of their different function vs method distinction
[22:13:46] havenwood: matthewd: I agree it's basically the same principle, just that Ruby's doesn't actually work both ways uniformly so it's tricky.
[22:13:52] matthewd: I think it's only enviable because no-one hesitates to define their own function designed to take TypeX as the first argument in Elixir, but are very reluctant to do the equivalent in Ruby
[22:14:16] havenwood: Like in Perl 6 the "." really does suffice to replace the |>
[22:14:32] havenwood: But since Ruby doesn't mirror the OO and functional way for everything you can't just use it like that.
[22:14:50] havenwood: Perl 6 or Elixir let you choose which way you'll be calling it, always
[22:15:17] havenwood: Or F#, etc - whatever langs allow composing in both orders
[22:15:18] havenwood: 'hi'.upcase.puts
[22:18:31] consti: has joined #ruby
[22:19:01] matthewd: I'll grant that the Kernel methods are unusual warts
[22:19:04] cdg: has joined #ruby
[22:19:40] baweaver: x => x * 2 is Javascript arrow syntax
[22:19:47] baweaver: well, some other languages do it too
[22:25:59] bronson: has joined #ruby
[22:26:21] jenrzzz: has joined #ruby
[22:26:21] jenrzzz: has joined #ruby
[22:29:10] RickHull: matthewd: it's not just kernel methods. let's say I want to "pipe" 2 to Math.sqrt there is no way to chain with '.' such that "sqrt" is at the end
[22:30:32] RickHull: ruby makes a big distinction between methods that belong to an object versus methods that take an object as the first arg
[22:30:41] baweaver: 2.yield_self(&Math.method(:sqrt)) :D
[22:30:46] matthewd: So does Elixir
[22:30:51] matthewd: In the form of "one of those does not exist"
[22:30:58] matthewd: (to my understanding?)
[22:31:05] RickHull: yes, which is why pipe works reliably
[22:31:30] matthewd: But Ruby also doesn't have two sorts of method
[22:31:55] matthewd: It occasionally looks like it does, because you choose to ignore the object it's being called on
[22:32:38] matthewd: Does Elixir have a |>-like operator for "specify the first argument, but 'pipe' the second"? If it does, I'll shut up.
[22:33:24] baweaver: Currying, it might
[22:33:49] nymous: has joined #ruby
[22:33:58] havenwood: matthewd: Yeah, it does that with |> so you can do exactly that.
[22:34:21] matthewd: havenwood: Huh? |> pipes the first argument, not the second
[22:34:29] nymous: hey folks
[22:34:58] RickHull: matthewd: in Elixiry X |> Y(Z) is effectively Y(X, Z)
[22:35:10] nymous: i need an advice on concurrency
[22:35:14] jenrzzz: has joined #ruby
[22:35:14] jenrzzz: has joined #ruby
[22:35:18] havenwood: matthewd: maybe i misunderstood what you meant - they take the first argument from the left but you can provide subsequent arguments
[22:35:19] havenwood: what RickHull said
[22:35:19] nymous: never did much in that direction
[22:35:20] havenwood: nymous: as away@
[22:35:40] matthewd: RickHull: Yes. My question is whether there is an operator Q that will X Q Y(Z) --> Y(Z, X)
[22:36:13] baweaver: Ask ze question
[22:36:13] matthewd: Because I claim that's what's being asked of Ruby
[22:36:16] baweaver: get ze answer
[22:36:20] havenwood: nymous: Typo correction, I just meant please go ahead and ask. :-)
[22:36:32] nymous: ah, sure)
[22:36:55] elomatreb: Maybe away does know a lot about concurrency though, we'll never know, as they are away
[22:36:59] RickHull: matthewd: not that I'm aware of, but |> is what Ruby cannot provide
[22:36:59] nymous: so, i'm writing a small library for collecting metrics
[22:37:16] RickHull: (in as clean and consistent a manner)
[22:37:19] orbyt_: has joined #ruby
[22:37:23] nymous: external metrics, like, you know, apache metrics, elasticsearch metrics, whatever
[22:37:35] RickHull: because ruby distinguishes between 5.to_s and to_s(int)
[22:37:48] nymous: so an app using my lib should describe which metrics it wants and how to get
[22:38:12] nymous: i mean like "get json from there, parse, save as metric named whatever"
[22:38:27] matthewd: RickHull: Does Elixir not distinguish to_s(5) and to_s(some_object, 5) ?
[22:38:29] nymous: the problem is with concurrency part
[22:38:50] nymous: i mean, external service might just stuck and don't reply forever
[22:38:54] RickHull: matthewd: Elixir does so in a way that allows |> to be used consistently
[22:39:10] RickHull: pattern matching on function definitions using typed arguments
[22:39:22] nymous: i wish to run my collector check concurrently with a timeout
[22:40:09] havenwood: nymous: What kind of Ruby app is this? Rails?
[22:40:40] nymous: pure ruby with almost non dependencies
[22:40:41] elomatreb: Random question: Is it safe to have user-supplied format strings for strftime? (In Ruby) If not, what sort of sanitation would be required, if it?
[22:40:59] havenwood: nymous: Rack app?
[22:41:00] baweaver: Extract Transform Load pipeline
[22:41:02] elomatreb: *if it isn't
[22:41:15] nymous: havenwood: rather cli or daemon
[22:41:22] havenwood: nymous: aha
[22:41:22] GodFather: has joined #ruby
[22:41:29] nymous: i plan to support both scenarios
[22:41:44] baweaver: coffee time
[22:41:54] consti: has joined #ruby
[22:42:19] matthewd: RickHull: I think it comes down to inconsistency of definitions in the stdlib (and further), then, rather than a syntax-level constraint
[22:42:30] shinnya: has joined #ruby
[22:42:42] nymous: i've tried to implement something like queue executor, and it works, but without any timeout
[22:42:44] havenwood: nymous: An aside, but here's a recent ActionCable gem for offloading slow tasks to a queue then displaying results via Websocket: https://github.com/danielwestendorf/get_schwifty
[22:42:51] nymous: so my app just stuck sometimes
[22:43:14] matthewd: e.g. Math.sqrt is bad, because it ignores its first parameter
[22:43:18] havenwood: nymous: The concurrent-ruby gem has quality concurrency primatives: https://github.com/ruby-concurrency/concurrent-ruby
[22:43:33] RickHull: matthewd: I wish it did. it has to do with the fact that every ruby method has its receiver as the implicit first argument. and methods are called on receivers
[22:43:34] nymous: yeah, i'm looking at concurrent-ruby right now
[22:43:43] RickHull: matthewd: there is no method 2.sqrt
[22:44:14] nymous: but the only thing which looks good for my attempt is CountDownLatch
[22:44:16] RickHull: in ruby, Math.sqrt(2) is really sqrt(Math, 2)
[22:44:21] matthewd: RickHull: Well now I think we're agreeing
[22:44:51] RickHull: versus 'foo'.reverse is really reverse(String.new, 'foo')
[22:45:03] matthewd: |> would be of no use if Elixir had defined a sqrt method that took two arguments and ignored the first
[22:45:10] nymous: so i need an advices, not sure how to implement my thing
[22:45:38] nymous: currently, i have metrics groups - blocks of code for collecting metrics
[22:45:39] jenrzzz: has joined #ruby
[22:46:03] mattp_: has joined #ruby
[22:46:21] nymous: also i think i'll add "renderer" callback to get result and send to whatever
[22:46:28] nymous: graphite or something like that
[22:46:37] RickHull: matthewd: when Math.sqrt(2) returns a float, all I can do is call methods defined on a float object
[22:46:39] matthewd: nymous: We're probably going to need some code to talk about here. Concurrency is hard enough without trying to speak in generalities.
[22:46:41] nymous: i'm thinking of 2 approaches for dealing with it
[22:46:49] RickHull: whereas I'd like to pass that result to any method that takes a float
[22:47:13] RickHull: i gotta run
[22:47:16] matthewd: RickHull: And |> can only pass that result to functions that take a float as the first parameter
[22:47:29] travisdouce: has joined #ruby
[22:47:40] RickHull: yes, so Elixir is designed where the first arg takes primacy, and primacy is not split between the receiver and the first arg
[22:47:44] RickHull: it goes way deeper than stdlid
[22:47:58] matthewd: My contention is that any Elixir function that takes X as a first argument should equivalently be defined in Ruby as a method on X
[22:48:00] cagomez: is there the opposite of hash.except()? https://apidock.com/rails/Hash/except
[22:48:06] mson: has joined #ruby
[22:48:10] travisdouce: has left #ruby: ()
[22:48:33] RickHull: matthewd: ruby's method receivers are a big part of what makes duck typing easy to use
[22:48:34] matthewd: I don't dispute that Ruby has some very bad examples of methods that don't meet that contract -- but I think they're the problem, not a missing operator
[22:48:46] RickHull: the impedance mismatch is between typed args and pattern matching, vs duck typing
[22:48:49] nymous: 1. Main thread starts multiple collector threads in a CountDownLatch with timeout, after that, it starts multiple renderer threads with same CountDownLatch also with timeout
[22:48:49] nymous: 2. Main thread starts multiple collector+renderer threads in a CountDownLatch with timeout
[22:48:54] mattp_: has joined #ruby
[22:49:28] RickHull: gotta run, chat later :)
[22:50:07] havenwood: cagomez: #slice
[22:50:11] nymous: my current code is here https://github.com/divanikus/salus
[22:50:25] nymous: it doesn't have any concurrency yey
[22:50:51] serhart: has joined #ruby
[22:51:11] nymous: it's my first fullblown gem if any)
[22:51:45] havenwood: nymous: Typhoeus is particularly good at parallel HTTP requests if you are interested in your first gem's first gem dependency. ;-)
[22:51:53] havenwood: nymous: Grats on first full-blown gem!
[22:53:21] nymous: it should be used something like that https://gist.github.com/divanikus/874d3f79dccd41a65887c2b8ba33212e
[22:53:40] serhart: has joined #ruby
[22:53:51] nymous: i've just been tired of bunches of collector scripts for popular monitoring systems
[22:53:57] __Yiota: has joined #ruby
[22:54:09] nymous: they might be anything, python, ruby, bash, nodejs, whatever
[22:54:13] kn-928: has joined #ruby
[22:54:24] nymous: and if you wish to monitor something, you have to deal with all this zoo
[22:56:37] wpostma: has joined #ruby
[22:57:30] nymous: i plan to use cases - 1. run a collector script by external collector like zabbix or collectd
[22:57:30] nymous: 2. run as a daemon, which sends data somewhere else
[22:59:32] matthewd: nymous: Okay, so as you've identified, CountDownLatch can be used to identify when all of the things you're waiting for are done
[23:00:47] nymous: it's just a little bit awkward to use a massive lib for a small piece of code
[23:00:47] matthewd: Are you just asking which of the above two strategies you should use?
[23:01:43] nymous: well, i'm asking if i'm right with CountDownLatch approach at all, maybe you know a better one
[23:01:52] nymous: and about strategies too though
[23:01:57] goyox86: has joined #ruby
[23:02:17] matthewd: c-r really isn't that big. You could implement it yourself if you really wanted to, but that doesn't seem like a good idea.
[23:02:39] nymous: i got several good design points from c-r, like "let it fail" approach
[23:02:40] conta1: has joined #ruby
[23:03:24] nymous: but seems like CountDownLatch doesn't involve actors or something like that at all, it's just very low level algorithm
[23:04:10] matthewd: Right. concurrent-ruby provides a number of useful low-level concurrency primitives.
[23:05:59] thinkpad: has joined #ruby
[23:06:17] QualityAddict: has joined #ruby
[23:06:30] nymous: it's like, idk, i need, for example, a TimerTask primitive, it doesn't seems to combines well with CountDownLatch
[23:07:33] nymous: also, it doesn't look like i can use it with c-r thread pool
[23:07:55] ski7777: has joined #ruby
[23:09:13] matthewd: They're primitives, not lego blocks; you can use it anywhere you need a latch that will get counted down... but it's only useful if that's what you need.
[23:09:28] ldnunes: has joined #ruby
[23:11:36] bvcosta: has joined #ruby
[23:12:27] consti: has joined #ruby
[23:12:34] guille-moe: has joined #ruby
[23:13:39] cschneid_: has joined #ruby
[23:15:34] jenrzzz: has joined #ruby
[23:16:54] ur5us_: has joined #ruby
[23:18:19] tcopeland: has joined #ruby
[23:20:31] cdg_: has joined #ruby
[23:29:10] chmurifree: has joined #ruby
[23:31:02] kn-928: has joined #ruby
[23:32:25] nymous: well, looks like i should go with first approach - collect, sync, render, sync
[23:32:56] nymous: countdownlatch looks promising to me, but still unsure how to use it with a thread pool
[23:33:50] roamingdog: has joined #ruby
[23:33:56] matthewd: Well, what do you want each pool task to do?
[23:34:12] matthewd: And what do you want the main thread to do?
[23:34:32] nymous: main thread would be collect, sync, render, sync, repeat
[23:35:02] matthewd: Doesn't sound like there's much left for the pool to do if the main thread's doing all that
[23:35:08] nymous: but i don't know how many threads would i have for collect and render - because they are user defined
[23:35:33] nymous: a thread pool is for collector and renderer threads
[23:35:50] nymous: to not spawn say 100 threads if user will told so
[23:36:08] matthewd: So the main thread isn't collecting after all
[23:36:26] nymous: no, i guess
[23:36:40] nymous: it might do saving / loading
[23:36:55] nymous: but i don't plan to make it concurrent
[23:37:01] consti: has joined #ruby
[23:37:20] nymous: load cache, collect, sync, render, sync, save cache
[23:37:22] humanBird: has joined #ruby
[23:37:26] nymous: something like that
[23:37:26] humanBird: /usr/local/Homebrew/Library/Homebrew/brew.rb:12:in `<main>': Homebrew must be run under Ruby 2.3! (RuntimeError)
[23:37:35] humanBird: ruby --version ruby 2.3.4p301 (2017-03-30 revision 58214) [x86_64-darwin16]
[23:37:44] humanBird: anti social error messages are anti social :(
[23:37:56] matthewd: nymous: So it sounds like the main thread might be doing something more like: "allocate collection tasks to the pool, wait for those tasks to complete, .."
[23:38:04] humanBird: brew install maven caused this error
[23:39:15] nymous: matthewd: yes, it is intended to do that, countdownlatch is just an approach to run multiple threads with shared timeout
[23:41:28] elomatreb: humanBird: Are you sure homebrew is actually using that Ruby? If there is an older version somewhere it might still be using that
[23:41:43] humanBird: how can I check this?
[23:42:10] elomatreb: Are you using something like a ruby switcher/version manager?
[23:42:14] matthewd: nymous: No, CountDownLatch is an approach to have a latch that counts down before it releases. I'm trying to get you to a solution, but if you're already there, I'm not sure what more I can offer.
[23:43:46] nymous: matthewd: i mean i want to run say 20 threads with shared timeout of 30 seconds. if some of them didn't pass, they should just die. i've checked several solutions for that problem and the only one i think can do the thing is a countdownlatch
[23:45:04] matthewd: nymous: Can you describe, in your own words, what you understand CountDownLatch will do?
[23:45:14] orbyt_: has joined #ruby
[23:47:15] nymous: i'll start it with say 20 and timeout 30, every thread would decrease the latch. also, it has timeout, so, those threads will execute or die within 30 seconds. so i'll return to main thread in 30 seconds or earlier with whatever result
[23:47:35] nymous: decrease the latch on the thread exit
[23:48:50] humanBird: not sure elomatreb
[23:49:01] elomatreb: `which ruby`
[23:49:24] humanBird: /Users/myusername/.rvm/rubies/ruby-2.3.4/bin/ruby
[23:49:56] kn-928: has joined #ruby
[23:50:09] jenrzzz: has joined #ruby
[23:50:23] elomatreb: So you're using RVM, probably. I don't use OSX, what's the shebang in the homebrew script?
[23:50:40] ahrs: has joined #ruby
[23:50:44] humanBird: where is this homebrew script?
[23:51:02] elomatreb: `which brew` (brew is the executable, right?)
[23:51:33] mim1k: has joined #ruby
[23:53:10] elomatreb: Looking at it on Github, nevermind. The gist of my theory: RVM only modifies your current shell environment to make ruby point to the install managed by it, homebrew might not be getting that
[23:53:51] matthewd: nymous: Oh okay, you're planning on using the wait timeout. Yeah.. that won't actually stop any ongoing work.
[23:54:12] alnewkirk: has joined #ruby
[23:54:13] humanBird: i installed maven from binary
[23:58:25] nymous: matthewd: yeah, sound ok, with only one problem, i wish to restrict collector threads to say cpu cores, to not to overheat the cpu with my "background" task
[23:59:31] kn-928: has joined #ruby