« Back to channel list

#ruby - 19 September 2018

« Back 1 day Forward 1 day »
[00:04:30] cagomez: has joined #ruby
[00:05:10] cagomez: has joined #ruby
[00:05:47] cagomez: has joined #ruby
[00:06:34] cagomez: has joined #ruby
[00:07:13] cagomez: has joined #ruby
[00:07:53] cagomez: has joined #ruby
[00:10:58] havenwood: the gem name "php" is available
[00:13:26] havenwood: speaking of gem names, the "_" gem is pretty nifty...
[00:13:31] havenwood: https://github.com/mame/_
[00:14:41] havenwood: can't get it to actually work, but fancy
[00:24:05] kujira: has joined #ruby
[00:27:28] weaksauce: has joined #ruby
[00:30:11] Radar: Is there a shorter / cleaner way of doing the comparison in this code? https://gist.github.com/radar/f079875d0379600e9fc2446cb513ebf8
[00:30:32] Radar: I think asking answer to check an internal value (question) from a separate class is a smell, but I can't think of a shorter way to write rit.
[00:30:33] Radar: write it*
[00:30:39] Radar: Maybe I'm being too picky?
[00:31:04] Dark_Arc: has joined #ruby
[00:32:33] jottr: has joined #ruby
[00:36:02] havenwood: Radar: What's `question.class`?
[00:36:45] baweaver: answers.select(&Qo[question: question, value: 3])
[00:36:51] Radar: baweaver: hax
[00:37:02] baweaver: Ah, less than
[00:37:09] baweaver: answers.select(&Qo[question: question, value: ..3])
[00:37:15] Radar: does qo... of course it does
[00:37:21] Radar: Isn't that only a Ruby 2.6 syntax?
[00:37:33] baweaver: Though I assume it's 0 to 3 or so?
[00:37:38] baweaver: answers.select(&Qo[question: question, value: 0..3])
[00:37:46] Radar: 1..2 for this check
[00:37:53] Radar: answer values are 1-5
[00:37:55] Radar: low ones are 1-2
[00:37:56] baweaver: Oh, right, I have a spoiler for ya
[00:38:00] al2o3-cr: that's pretty succinct to me.
[00:38:21] apparition: has joined #ruby
[00:39:38] Radar: Here's a bigger file that I'm playing around in: https://gist.github.com/radar/26a95a7e9b6dfc2558af6e2b6dea27bd
[00:39:53] Radar: I like: answers.select(&for_question(question)).select(&:low?), but it does two loops through the questions
[00:40:07] baweaver: OH! You have methods?
[00:40:09] Radar: If there was a way somehow to combine the functions and only make one loop it'd be better
[00:40:14] baweaver: Guess what else Qo does :D
[00:40:42] baweaver: answers.select(&Qo[:low?, for_question(question)])
[00:41:10] baweaver: I _could_ make it play nice with both hash and array matchers at once to do something more like this:
[00:41:29] al2o3-cr: beautiful Ruby syntax ;)
[00:41:30] baweaver: answers.select(&Qo[:low?, question: question])
[00:41:32] baweaver: Though by that point it'd double equal the value, so...
[00:41:35] baweaver: answers.select(&Qo[:low?, question])
[00:42:09] baweaver: Xf and Qo both are used in production, so it well is now :D
[00:42:34] baweaver: Ah, nevermind, that last shorthand assumes exact equality
[00:43:32] baweaver: I may just make it do both styles (array and hash) to give more flexibility
[00:45:08] al2o3-cr: all methods <2 lines.
[00:45:11] Guest61135: has joined #ruby
[00:48:54] Radar: answers.select(&Qo[:low?, question]) <- this works? How?!
[00:49:00] Radar: Time to gem install
[00:49:21] Radar: baweaver: that doesn't work for me
[00:49:34] baweaver: noted it right after
[00:49:54] im0nde: has joined #ruby
[00:49:56] baweaver: Name punning would be nice though
[00:49:57] Radar: Both examples don't seem to work for me
[00:50:14] baweaver: the one with both array and hash won't
[00:50:18] baweaver: I'd have to fix a few things
[00:50:31] baweaver: give me a bit on that one, could have it done in a few hours or less.
[00:57:55] Radar: https://stackoverflow.com/a/16799869/15245
[00:58:05] Radar: Code like this makes me wish Ruby had Elixir's pipe operator
[00:58:14] Radar: x |> a.call |> b.call
[00:58:25] apeiros_: has joined #ruby
[00:58:36] Radar: or x |> a.() |> b.()
[01:00:44] Tempesta: has joined #ruby
[01:03:42] duderonomy: has joined #ruby
[01:09:50] Cork: has joined #ruby
[01:10:24] havenwood: Radar: Interestingly, with your code example, the multiple iterations are faster than a single pass: https://gist.github.com/havenwood/e0ac0fec4b53143603b687530d818175
[01:12:25] havenwood: At least on CRuby 2.5.1
[01:13:53] havenwood: TruffleRuby is an order of magnitude faster overall, but single iteration clearly wins.
[01:14:52] armyriad: has joined #ruby
[01:21:55] white_lilies: has joined #ruby
[01:22:26] jottr: has joined #ruby
[01:24:24] al2o3-cr: havenwood: what core processor is that on?
[01:24:45] havenwood: al2o3-cr: 4 physical
[01:24:45] baweaver: Oh right. Qo benchmarks are going to go straight to hell now XD
[01:24:55] al2o3-cr: havenwood: what speed?
[01:25:21] havenwood: al2o3-cr: 2.8 GHz Intel Core i7
[01:25:47] havenwood: TruffleRuby is two* orders of magnitude faster
[01:25:56] baweaver: 2.9GHz 6-core Intel Core i9 (8th gen)
[01:26:07] baweaver: ACTION wonders what that does to the current benchmark
[01:26:12] al2o3-cr: havenwood: gist your code i'll try on my 2 core i7 2.9 Ghz
[01:26:24] havenwood: baweaver: hahaha
[01:26:25] havenwood: it folds this one away nicely
[01:26:47] havenwood: al2o3-cr: k, sec
[01:26:52] al2o3-cr: baweaver: get an xeon platinum haha ;)
[01:26:52] baweaver: I was about to be really happy too at some of the speed improvements T_T
[01:29:31] al2o3-cr: havenwood: ok, cheers pal
[01:31:07] havenwood: al2o3-cr: https://gist.github.com/havenwood/a69ac7262062a20c7c24efc5950d9614
[01:31:22] al2o3-cr: havenwood: thank you.
[01:32:29] havenwood: baweaver: I'm curious what numbers you get on TruffleRuby with that 6-core... :)
[01:32:49] baweaver: As soon as I figure out why my Ruby install refuses to put ffi in...
[01:33:03] cagomez: has joined #ruby
[01:33:55] havenwood: baweaver: libffi isn't dynamically linking right?
[01:33:59] baweaver: Xcode is good, brew is now unborked (mac clone works great for non ruby things)
[01:34:12] baweaver: "Make sure that `gem install ffi -v '1.9.23' --source 'https://rubygems.org/'` succeeds before bundling."
[01:34:12] al2o3-cr: https://gist.github.com/gr33n7007h/15be577783b1ac97c5ff811b4e9ba114
[01:34:32] baweaver: running around doing the SO dance for now
[01:34:46] al2o3-cr: i need to upgrade my laptop haha ;)
[01:35:21] havenwood: baweaver: Sanity check?: brew --prefix libffi #=> /usr/local/opt/libffi
[01:35:34] al2o3-cr: baweaver: i'd like to see what this produces on yours
[01:36:25] havenwood: al2o3-cr: confirmed, multiple iterations with block optimizations ftw
[01:36:25] havenwood: al2o3-cr: nifty
[01:37:06] havenwood: nice when the version that reads better happens to be faster too
[01:39:30] baweaver: brew --prefix libffi
[01:39:32] baweaver: /usr/local/opt/libffi
[01:41:15] yqrashawn: has joined #ruby
[01:44:47] TheBloke: has joined #ruby
[01:44:52] baweaver: https://dpaste.de/16wL
[01:44:59] baweaver: havenwood: shenanigans ^
[01:45:55] al2o3-cr: baweaver: whats the ffi for?
[01:46:23] esrse: has joined #ruby
[01:48:29] al2o3-cr: oh, libnotify
[01:48:54] al2o3-cr: well rb-notify
[01:49:26] al2o3-cr: last time i used osx was years ago.
[01:50:48] al2o3-cr: did you run this? gem install ffi -v '1.9.23' --source 'https://rubygems.org/'
[01:52:32] baweaver: Will hunt it down later
[01:55:45] evdubs_: stupid question - if i define == in a class, do i also need to define != ?
[01:58:25] havenwood: baweaver: doesn't *happen* to get resolved after a?: brew install automake
[01:59:45] baweaver: it's installed
[01:59:58] havenwood: baweaver: ah, then that can' tbe it!
[02:01:18] al2o3-cr: evdubs: try; def ==() nil end is the bomb ;)
[02:02:20] al2o3-cr: evdubs: then def ==(*) end
[02:06:34] havenwood: evdubs: https://gist.github.com/havenwood/549e4bc6d67aeccb64bdd77b07be09fc
[02:06:59] FrankyCyborg: has left #ruby: ()
[02:08:07] baweaver: aha, got it
[02:08:11] baweaver: danged thing
[02:09:10] al2o3-cr: havenwood: def ==() end in pry
[02:13:33] baweaver: havenwood - https://gist.github.com/havenwood/a69ac7262062a20c7c24efc5950d9614#gistcomment-2710344
[02:14:55] al2o3-cr: baweaver: pretty rapido.
[02:15:29] baweaver: About to give it to Truffle once that installs
[02:16:24] al2o3-cr: baweaver: is 2.9 Ghz per core?
[02:16:43] baweaver: I just got the highest revv'd macbook I could
[02:18:10] al2o3-cr: i asked because if you not doing multiprocessing singular core will perform faster.
[02:18:24] al2o3-cr: given core/speed
[02:19:33] baweaver: Gah, now Truffle is mad at me
[02:20:29] baweaver: llvm shenanigans
[02:22:19] Xiti: has joined #ruby
[02:27:34] baweaver: whoopsie, truffle doesn't like refinements
[02:27:39] baweaver: havenwood save us
[02:45:48] Guest61135: has joined #ruby
[02:53:54] ZzZombo: has joined #ruby
[03:01:19] nowhere_man: has joined #ruby
[03:02:46] arooni: has joined #ruby
[03:03:35] zapata: has joined #ruby
[03:04:32] ivanskie: has joined #ruby
[03:07:11] evdubs: al2o3-cr, havenwood, thanks
[03:13:25] lytol_: has joined #ruby
[03:15:28] bheesham: has joined #ruby
[03:16:07] braincrash: has joined #ruby
[03:16:15] zapata: has joined #ruby
[03:23:17] jottr: has joined #ruby
[03:24:22] infernix: has joined #ruby
[03:39:55] dellavg_: has joined #ruby
[03:54:27] TheBloke: has joined #ruby
[04:02:22] jottr: has joined #ruby
[04:07:22] Terens: has joined #ruby
[04:09:31] Sembei: has joined #ruby
[04:16:23] tdy: has joined #ruby
[04:23:11] reber: has joined #ruby
[04:25:28] sheepman: has joined #ruby
[04:28:13] pwnd_nsfw: has joined #ruby
[04:35:25] za1b1tsu: has joined #ruby
[04:46:28] Guest61135: has joined #ruby
[04:55:50] idiocrash: has joined #ruby
[05:15:25] johnny56: has joined #ruby
[05:32:24] Cork: has joined #ruby
[05:42:12] _whitelogger: has joined #ruby
[05:42:36] cliluw: has joined #ruby
[05:45:01] aufi: has joined #ruby
[06:02:12] Mike11: has joined #ruby
[06:03:13] jottr: has joined #ruby
[06:12:51] snickers: has joined #ruby
[06:12:59] apeiros_: has joined #ruby
[06:13:56] Nicmavr: has joined #ruby
[06:15:16] bijan_: has joined #ruby
[06:17:21] MoritaShinobu: has joined #ruby
[06:22:59] alem0lars: has joined #ruby
[06:59:28] tuor: has joined #ruby
[07:09:23] yohji: has joined #ruby
[07:11:06] sysvalve: has joined #ruby
[07:16:07] raulp: has joined #ruby
[07:21:26] mikecmpbll: has joined #ruby
[07:22:50] nowhere_man: has joined #ruby
[07:25:02] Sylario: has joined #ruby
[07:37:46] deathwishdave: has joined #ruby
[07:38:35] salasrod: has joined #ruby
[07:39:31] Mike11: has joined #ruby
[07:39:34] ZzZombo_: has joined #ruby
[07:41:44] ZzZombo__: has joined #ruby
[07:42:38] aupadhye: has joined #ruby
[07:43:03] KramerC: has joined #ruby
[07:43:32] alicef: has joined #ruby
[07:46:40] bijan_: has joined #ruby
[07:54:02] TvL2386: hey guys, question about documentation of code: Since ruby always returns the result of the last evaluation in a method, something may be returned that the author didn't intend to or simply is not interested in. Should I then document what it returns, or should I document it returns nothing?
[07:54:40] TvL2386: I feel like I should change all my methods to return nil if I'm going to document that
[07:54:53] TvL2386: but then that makes me sad
[07:55:46] ZzZombo: Document the actual result type. Put `nil` as the last statement where necessary.
[07:56:11] TvL2386: no surprises :)
[07:57:38] ZzZombo: That's what I stick to. I always make sure the last expression produces the expected result, use explicit `return`, or put `nil` down at the end.
[08:01:07] mikecmpbll: has joined #ruby
[08:03:58] jottr: has joined #ruby
[08:05:08] TvL2386: sounds like a good plan!
[08:06:23] old_relik: has joined #ruby
[08:08:33] old_relik: can this be written this more succintly? https://pastebin.com/raw/Xue252eN
[08:08:33] ruby[bot]: old_relik: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
[08:09:08] venmx: has joined #ruby
[08:09:29] TvL2386: yes it can
[08:09:52] TvL2386: first of all I would do "if condition? or another_condition?"
[08:09:58] TvL2386: because the body is identical
[08:10:18] old_relik: sorry made a mistake, the body is actually not identical
[08:11:17] TvL2386: anyway: it looks fine and small to me
[08:21:38] Mortomes|Work: has joined #ruby
[08:25:33] RougeR: has joined #ruby
[08:26:53] apeiros_: has joined #ruby
[08:32:59] Guest61135: has joined #ruby
[08:34:55] jottr: has joined #ruby
[08:36:45] apparition: has joined #ruby
[08:37:40] MasterAsia: has joined #ruby
[08:37:53] MasterAsia: if I reopen a class, what happens to everything existing in it?
[08:38:03] MasterAsia: does my new code essentially get appended to the end?
[08:40:08] MasterAsia: https://pastebin.com/kGq8ACai
[08:40:09] ruby[bot]: masterasia: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
[08:40:28] apeiros_: masterasia: nothing happens. it will remain.
[08:40:42] MasterAsia: Does the code get added to the beginning or end?
[08:40:47] apeiros: and yes, it's just as if you'd not closed the class and added that code at the end
[08:41:03] apeiros: so if you reopen a class and define a method again, last one wins
[08:41:06] MasterAsia: It is important, specifically for before_filters in rails controllers
[08:41:11] lxsameer: has joined #ruby
[08:41:34] MasterAsia: thanks apeiros
[08:41:37] MasterAsia: is this documented anywhere?
[08:41:44] MasterAsia: or just something you know based on experience
[08:42:05] MasterAsia: I guess I could find out by digging into the implementation details
[08:50:45] apeiros: I think it is documented somewhere. no idea where, though. Been a while since I learned that :D
[08:52:07] bijan_: has joined #ruby
[08:57:48] bijan_: has joined #ruby
[09:05:58] tjbp: has joined #ruby
[09:09:35] alem0lars: has joined #ruby
[09:10:03] bijan_: has joined #ruby
[09:15:10] bijan_: has joined #ruby
[09:15:41] chichou: has joined #ruby
[09:37:34] tristanp: has joined #ruby
[09:37:38] marz_d`ghostman: has joined #ruby
[09:37:44] marz_d`ghostman: What's a good ORM for plain ruby?
[09:39:04] bijan_: has joined #ruby
[09:41:29] deathwishdave: has joined #ruby
[09:43:09] bijan__: has joined #ruby
[09:46:22] chichouw: has joined #ruby
[09:49:23] TvL2386: marz_d`ghostman: probably depends on which backend you're using
[09:50:09] TvL2386: marz_d`ghostman: I'm only used to activerecord though
[09:51:30] TvL2386: marz_d`ghostman: for plain ruby I mostly use mysql2, but that's not an ORM
[09:52:01] marz_d`ghostman: TvL2386: hmmm I'm looking into trying new technology. Perhaps MongoDB
[09:53:00] marz_d`ghostman: TvL2386: Nah, I think I'll stick with MySQL and use activerecord
[09:53:42] TvL2386: marz_d`ghostman: sounds cool! My next little rails project will also use mongodb (mostly for learning purposes)
[09:55:33] bijan_: has joined #ruby
[09:58:04] Puffball_: has joined #ruby
[09:59:44] bijan__: has joined #ruby
[10:00:47] chichouw: marz_d`ghostman: did you try sequel?
[10:01:32] marz_d`ghostman: chichou_: I tried searching for one, it appears activerecord is the most popular
[10:01:59] blackmesa: has joined #ruby
[10:02:38] TvL2386: sequel extends activerecord
[10:03:21] chichouw: I think you meant activemodel?
[10:04:48] TvL2386: arg... I'm sorry, that's not correct... I was thinking about `squeel`
[10:05:10] chichouw: the same letters in different orders :P
[10:05:36] TvL2386: yeah lol :)
[10:08:45] t0adst00l: has joined #ruby
[10:11:33] chichouw: and I wasn't right either, it doesn't even extend activemodel but it's just a development dependency somehow
[10:16:18] gnufied: has joined #ruby
[10:22:41] Sembei: has joined #ruby
[10:38:25] apeiros_: has joined #ruby
[10:59:46] AJA4350: has joined #ruby
[11:15:27] GodFather: has joined #ruby
[11:15:30] xfbs: has joined #ruby
[11:18:00] InfinityFye: has joined #ruby
[11:19:40] bijan_: has joined #ruby
[11:27:45] ZzZombo: has joined #ruby
[11:31:52] nfk: has joined #ruby
[11:33:15] za1b1tsu: has joined #ruby
[11:34:12] nfk: i can't believe i spent like 4 hours yesterday debugging firefox csp, sinatra, rack-protection and my app when the cause was NoScript running in my firefox...
[11:35:16] lupine: has joined #ruby
[11:38:14] tristanp: has joined #ruby
[11:47:19] donofrio: nfk, don't beat yourself up too much, next time "Private browsing" for your testing
[11:51:38] bmurt: has joined #ruby
[11:59:59] alireza: has joined #ruby
[12:00:06] alireza: Hey Ammigos!
[12:00:20] alireza: I have a promotion base class
[12:00:40] alireza: which has two methods, `eligible?` and `perform`
[12:00:47] nfk: donofrio, i obviously run noscript inside it as well
[12:01:28] alireza: https://dpaste.de/74Ur
[12:01:46] nfk: after all, i do about half of my googling in private or incognito just so that algorithm didn't start spamming me with lawnmover or lisp framework results
[12:02:28] clemens3: has joined #ruby
[12:02:44] alireza: How can I call `return order.total unless eligble?(order)` before children logic
[12:03:03] alireza: https://dpaste.de/sCh7
[12:03:19] alireza: that pattern always repeats in all promotion children classes
[12:03:33] alireza: but when I call `super` that doesn't work
[12:04:22] bijan_: has joined #ruby
[12:05:41] nfk: that's some code spaghetti you've got going there
[12:06:28] Liothen: has joined #ruby
[12:07:14] nfk: some easy things first: 1) it's good that you're using @percent to indicate that it's a percentage but if you're actually doing math on it, it's much safe to just keep it as a float and format it as a percentage only when shown in a human friendly manner
[12:08:45] chouhoulis: has joined #ruby
[12:09:00] alireza: nfk: thanks for your consideration
[12:09:03] nfk: that way if stuff goes sideways you'll end up with 0.2% discount where it should have been 20% instead of substacting 20, because someone forgot to do the conversion
[12:09:31] alireza: nfk: but I don't get where's the spagetti?
[12:09:39] nfk: alireza, hey, you have to be careful with money, if you bill me €-5, i'll take them and the product, thank you
[12:09:59] Fusl: has joined #ruby
[12:10:20] za1b1tsu: has joined #ruby
[12:10:21] SolarAquarion: has joined #ruby
[12:10:33] alireza: nfk: actually percent is for that, when you say 10 percent you mean 0.1
[12:10:59] alireza: so I can abstract out percentage logic outside or just provide a simple keyword argument which indicates that
[12:12:05] alireza: it's just a simple test
[12:13:17] nfk: alireza, it's just a good practice, when it comes to money, to avoid using percentage as your internal representation
[12:13:55] alireza: nfk: for sure
[12:14:24] alireza: but my question is how to call `return order.total unless eligible?(order)` in parent class
[12:14:26] alireza: https://dpaste.de/iSth
[12:15:18] bijan_: has joined #ruby
[12:15:43] nfk: alireza, and i'm sharing my opinion on how i'd avoid some pitfals, speaking of which, i would have order.base_total and order.total
[12:16:07] alireza: nfk: yeah I appricate that
[12:16:09] nfk: that way, again, if stuff goes sideways, you won't end up repeatedly applying the same discount
[12:17:36] alireza: yeah, I need line itmes
[12:17:46] alireza: and a base total
[12:18:04] alireza: but first I'm going to elminate `return order.total unless eligible?(order)` in children classes
[12:18:12] nfk: you'd likely also want to do all your discounts in one place (i.e. pass in order and some hash of all potentially applicable discounts)
[12:20:16] nfk: alireza, i think that if you redo your discounting to all happen in one place, then you won't have that issue in the first place but that's just me
[12:20:38] alireza: nfk: https://dpaste.de/etRL
[12:26:26] nfk: yeah, i see a lot of abstraction with very little code, which is why i called that code spaghetti
[12:26:47] bijan_: has joined #ruby
[12:27:13] nfk: alireza, my gut feeling without considering that spaghetti is that when you call super the self it's being called on is not what you think it is but that's just my first hunch
[12:28:01] alireza: nfk: yeah I just realized that
[12:28:07] alireza: nfk: I should consider something like before_action
[12:31:14] alireza: nfk: thanks for your time, btw.
[12:31:16] alireza: has left #ruby: ("WeeChat 2.1")
[12:36:29] bijan_: has joined #ruby
[12:37:45] Puffball: has joined #ruby
[12:37:46] jottr: has joined #ruby
[12:44:33] thy0: has joined #ruby
[12:51:41] MaiconVieira: has joined #ruby
[12:58:18] gnufied: has joined #ruby
[13:03:31] thy0: has joined #ruby
[13:12:41] kapil___: has joined #ruby
[13:14:20] t0adst00l: has joined #ruby
[13:14:32] bijan_: has joined #ruby
[13:17:06] jottr: has joined #ruby
[13:17:55] micabot: has joined #ruby
[13:22:33] alem0lars: has joined #ruby
[13:26:07] bijan_: has joined #ruby
[13:26:44] blackmesa: has joined #ruby
[13:29:52] BrainWork: has joined #ruby
[13:30:33] BrainWork: hi. i know absolutely nothing about ruby, but i am a programmer with many years of experience in other languages such as php, C++, even assembler. What is a good resource as a 'crib note' to kickstart some starting knowledge in ruby please?
[13:30:50] BrainWork: i have no goal except to learn the basics of another language relatively quickly
[13:31:26] BrainWork: there's lots of documentation out there but much of it is either a dry reference manual or assumes beginner status
[13:36:38] bijan_: has joined #ruby
[13:38:59] tristanp: has joined #ruby
[13:39:51] chichouw: BrainWork: online material only or books as well?
[13:42:38] jottr: has joined #ruby
[13:44:31] nfk: BrainWork, well, if you're just fooling around, maybe try http://rubykoans.com/
[13:45:03] nfk: i remember having quite a bit of fun with those when i started, though it was some online interpreter rather than a set of local files
[13:46:22] nfk: BrainWork, this might be of interest to you: https://news.ycombinator.com/item?id=9308684
[13:46:59] nfk: ACTION goes on a run to do some errands
[13:48:15] nowhere_man: has joined #ruby
[13:48:54] bijan_: has joined #ruby
[13:49:32] aufi: has joined #ruby
[13:57:00] snickers: has joined #ruby
[13:58:45] duderonomy: has joined #ruby
[13:59:46] vondruch_: has joined #ruby
[13:59:57] Inline: has joined #ruby
[14:00:59] MaiconVieira: has left #ruby: ()
[14:01:15] Inline: has joined #ruby
[14:12:38] Rapture: has joined #ruby
[14:25:31] thy0_: has joined #ruby
[14:29:23] jottr: has joined #ruby
[14:30:49] jordanm: has joined #ruby
[14:51:47] lomex: has joined #ruby
[14:53:25] jottr: has joined #ruby
[15:07:21] SeepingN: has joined #ruby
[15:09:37] faitswulff: has joined #ruby
[15:20:07] wojnar: has joined #ruby
[15:23:38] cagomez: has joined #ruby
[15:23:56] Cork: has joined #ruby
[15:25:53] Eiam: has joined #ruby
[15:28:22] ivanskie: has joined #ruby
[15:29:22] Cork: has joined #ruby
[15:31:21] za1b1tsu: has joined #ruby
[15:35:20] jottr: has joined #ruby
[15:44:22] blackmesa: has joined #ruby
[15:44:42] snickers: has joined #ruby
[15:45:36] akem: has joined #ruby
[15:51:11] akem: has joined #ruby
[15:56:07] blackmesa1: has joined #ruby
[16:09:19] akem: has joined #ruby
[16:10:59] lomex: has joined #ruby
[16:13:43] eckhardt: has joined #ruby
[16:20:29] thy0: has joined #ruby
[16:27:35] alem0lars: has joined #ruby
[16:28:01] Fusl: has joined #ruby
[16:30:18] apeiros_: has joined #ruby
[16:30:58] mynameisdebian: has joined #ruby
[16:33:22] dtzuzu: has joined #ruby
[16:34:04] blackmesa: has joined #ruby
[16:35:54] bijan_: has joined #ruby
[16:38:53] duderonomy: has joined #ruby
[16:40:43] baweaver: BrainWork: Book list in the channel topic
[16:40:53] baweaver: But short version: Eloquent Ruby
[16:41:24] GodFather: has joined #ruby
[16:47:33] prometheus_falli: has joined #ruby
[16:53:47] sauvin: has joined #ruby
[16:54:11] Nicmavr: has joined #ruby
[16:55:49] darkhanb: has joined #ruby
[16:56:38] schneider1: has joined #ruby
[17:02:38] cagomez: has joined #ruby
[17:03:29] cagomez: has joined #ruby
[17:04:05] cagomez: has joined #ruby
[17:04:44] cagomez: has joined #ruby
[17:05:07] thy0_: has joined #ruby
[17:05:23] cagomez: has joined #ruby
[17:06:03] cagomez: has joined #ruby
[17:06:12] thy0_: has joined #ruby
[17:06:19] howdoicomputer: has joined #ruby
[17:08:45] lxsameer: has joined #ruby
[17:15:29] blackmesa: has joined #ruby
[17:15:50] Dbugger: has joined #ruby
[17:18:47] lxsameer: has joined #ruby
[17:25:41] nfk: those were some long errands but, hey, at least i got move a bit
[17:28:47] lxsameer: has joined #ruby
[17:36:02] mynameisdebian: has joined #ruby
[17:38:35] lxsameer: has joined #ruby
[17:48:42] lxsameer: has joined #ruby
[17:57:30] RougeR: has joined #ruby
[17:58:40] lxsameer: has joined #ruby
[18:01:09] snickers: has joined #ruby
[18:06:23] johnny56: has joined #ruby
[18:08:41] lxsameer: has joined #ruby
[18:10:00] SeepingN: has joined #ruby
[18:14:28] SeepingN: has joined #ruby
[18:18:53] lxsameer: has joined #ruby
[18:18:57] sanscoeur: has joined #ruby
[18:21:12] nfk: Oh, derp, I'm testing my webapp on both firefox and google chrome and i'm getting different colors!
[18:22:08] deathwishdave: has joined #ruby
[18:28:39] lxsameer: has joined #ruby
[18:29:19] mikecmpbll: has joined #ruby
[18:33:17] blackmesa: has joined #ruby
[18:35:37] nfk: On one hand I feel like pursuing this rabbit but I know that color management is gonna be one hellish rabit hole. Especially on linux. After all, all my profiles (other than my mpv vo_gpu one) is set to a test profile with wacky colors - if anything was capable of picking them up, I'd immediately notice that
[18:36:07] nfk: s/is/are/
[18:36:58] blackmesa1: has joined #ruby
[18:37:01] SeepingN_: has joined #ruby
[18:38:35] jottr: has joined #ruby
[18:38:41] lxsameer: has joined #ruby
[18:39:21] bmurt: has joined #ruby
[18:42:11] tdy: has joined #ruby
[18:47:04] orbyt_: has joined #ruby
[18:48:12] druonysus: has joined #ruby
[18:48:36] druonysus: has left #ruby: ("http://quassel-irc.org - Chat comfortably. Anywhere.")
[18:48:45] lxsameer: has joined #ruby
[18:56:58] yorickpeterse: has joined #ruby
[18:58:42] lxsameer: has joined #ruby
[19:00:45] jottr: has joined #ruby
[19:08:52] lxsameer: has joined #ruby
[19:18:40] lxsameer: has joined #ruby
[19:21:21] ua: has joined #ruby
[19:23:19] sameerynho: has joined #ruby
[19:24:04] thy0: has joined #ruby
[19:38:07] druonysus: has joined #ruby
[19:38:29] AndreYuhai: has joined #ruby
[19:42:43] DTZUZO_: has joined #ruby
[19:44:07] TheBloke: has joined #ruby
[19:44:21] AndreYuhai: Hi, how can we test stuff on Travis which requires username and password? Any sources?
[19:46:28] havenwood: AndreYuhai: https://docs.travis-ci.com/user/encryption-keys/
[19:47:07] havenwood: AndreYuhai: https://docs.travis-ci.com/user/environment-variables/#defining-encrypted-variables-in-travisyml
[19:47:12] nowhere_man: has joined #ruby
[19:47:25] havenwood: AndreYuhai: Those ^ should get you on the right track.
[19:47:37] AndreYuhai: havenwood: Oh thank you! :) I didn't even know it was called like so.
[19:48:56] weaksauce: has joined #ruby
[19:49:00] faitswulff: has joined #ruby
[19:50:41] venmx: has joined #ruby
[19:51:45] faitswulff: has joined #ruby
[19:56:40] roshanavand: has joined #ruby
[19:57:23] akem: has joined #ruby
[19:57:25] knight33: has joined #ruby
[19:58:24] jottr: has joined #ruby
[20:02:02] blackmesa1: has joined #ruby
[20:03:42] sanscoeur: has joined #ruby
[20:04:02] faitswulff: has joined #ruby
[20:06:24] Dirak: has joined #ruby
[20:06:48] prometheus_falli: has joined #ruby
[20:07:53] code_zombie: has joined #ruby
[20:09:00] eckhardt: has joined #ruby
[20:09:37] Dirak: Hi, I'm a JS dev, and I need to learn Ruby for a company I'm interviewing with. What are the legit resources for learning Ruby on the level of 'you don't know js' and 'eloquent js'
[20:10:46] TomyLobo: has joined #ruby
[20:11:20] moei: has joined #ruby
[20:14:43] Mike11: has joined #ruby
[20:17:16] CPngN: funny you sayeloquent
[20:17:35] oz: Dirak: there's a nice list or learning material at https://www.ruby-lang.org/en/documentation/
[20:18:58] mynameisdebian: has joined #ruby
[20:20:48] deathwishdave: has joined #ruby
[20:21:48] RougeR: has joined #ruby
[20:23:55] Dirak: My friend told me Ruby is a way of thinking and a philosophy so I need my reading material to redpill me
[20:25:24] jottr: has joined #ruby
[20:25:30] nfk: and oz already linked you with pretty much the stuff everyone learns from (obviously from the ones that fit their taste)
[20:26:32] nfk: as for the ones you listed, i have no idea about their teaching style as i learned js the hard way - by writing application code before the days of node
[20:27:33] nfk: ecmascript as a language is so simple that i'm always baffled by people who need to learn it
[20:28:48] Dirak: w0w there are some serious caveats to JS u just gotta know
[20:29:09] Dirak: like that the max int is 2^58. And that callbacks take the form (err, data) as their signature
[20:30:21] nfk: i find it pretty difficult to max out anything that large
[20:31:03] jp: has joined #ruby
[20:31:24] nfk: also i was under impression that 58 usable bits for memory addresses on 64 bit arches was an implementation approach rather than a language feature
[20:31:27] Dirak: I have a friend who works at an ecommerce company. Every million transactions or so, their company magically lose a penny cuz of JS's Number imprecision. They call it the JS tax
[20:31:56] CPngN: yet they use JS
[20:32:08] CPngN: cuz silly
[20:32:47] nfk: couldn't they actually have BigInt implemented in JS?
[20:36:30] havenwood: typeof 42n; #=> 'bigint'
[20:38:39] GodFather: has joined #ruby
[20:42:57] scrptktty: has joined #ruby
[20:44:24] nfk: actually, how would they end up losing money? it was a bit less than I thought - just mere 2.8e17 but that's seems to be enough to track the world's economy at a fraction of penny/cent precision
[20:52:18] roshanavand: has joined #ruby
[20:53:28] blackmesa: has joined #ruby
[20:59:44] jp: has joined #ruby
[21:00:12] evdubs_: has joined #ruby
[21:01:11] jottr: has joined #ruby
[21:01:16] nowhere_man: has joined #ruby
[21:06:52] nine_milli_: has joined #ruby
[21:07:01] cagomez: has joined #ruby
[21:07:03] nine_milli_: is php better than ruby?
[21:07:38] cagomez: has joined #ruby
[21:07:55] oz: nine_milli_: it depends. ;)
[21:08:02] nfk: don't feed the troll
[21:08:16] cagomez: has joined #ruby
[21:08:38] CPngN: it depends. either "no", or "hell no!"
[21:09:03] cagomez: has joined #ruby
[21:09:09] oz: nfk: oh, true that. :)
[21:09:41] cagomez: has joined #ruby
[21:10:18] cagomez: has joined #ruby
[21:11:32] nine_milli_: what are the advantages of ruby over php if any?
[21:13:31] nine_milli_: also was ruby made by a 400lb man in a bed somewhere?
[21:20:08] jolamb: has joined #ruby
[21:25:00] Eiam: has joined #ruby
[21:26:18] lxsameer: has joined #ruby
[21:28:07] nine_milli_: has left #ruby: ("Leaving")
[21:29:36] xtsee: has joined #ruby
[21:32:51] jolamb: has left #ruby: ("WeeChat 1.9.1")
[21:34:28] baweaver: !troll nine_nilli_
[21:34:28] ruby[bot]: baweaver: Could not find user with nick "nine_nilli_"
[21:34:29] baweaver: !troll nine_milli_
[21:34:29] ruby[bot]: +bb nine_milli_!*@*$#ruby-banned *!*@c-76-23-234-152.hsd1.ct.comcast.net$#ruby-banned
[21:34:32] baweaver: There we go.
[21:36:09] Dirak: Does every object in Ruby have the method .nil?
[21:40:02] jottr: has joined #ruby
[21:40:16] nfk: if you meant nil?, then... you might be able to not have one if you essentially uprooted or replaced the entire runtime
[21:40:26] nfk: but as things stand, yes
[21:44:55] faitswulff: has joined #ruby
[21:45:16] nfk: Dirak, oh, i just realised i automatically removed the ? from .nil because you were asking a question, sorry
[21:52:58] bmurt: has joined #ruby
[21:54:07] apeiros_: has joined #ruby
[21:54:18] Dirak: how come the object_id of numbers follows the pattern 2n + 1?
[21:56:49] nfk: my gut feeling is that it just might be to avoid a circular definition, because object_id has to return an object?
[21:59:33] Dirak: oh wtf << isn't a bitwise operator in Ruby?
[22:00:04] nfk: is it even a bitwise operator in C++ is my first question
[22:00:10] nfk: anyway, ObjectSpace._id2ref 2
[22:00:12] nfk: try that
[22:03:01] nfk: Dirak, anyway, my bad, << is the bitwise operator, and it's also doing the same job in ruby: a = 1; puts a; a <<= 2; puts a
[22:03:30] Dirak: ooh gotcha
[22:03:39] nfk: what you might be confused about is the fact that it's just a method (just like in C++), which means that you can define your own /, + and, yes, <<
[22:03:51] Dirak: I like << syntax to push into an array
[22:14:25] jp: has joined #ruby
[22:21:59] ndr0s: has joined #ruby
[22:26:02] vondruch_: has joined #ruby
[22:26:05] RiPuk: has joined #ruby
[22:26:17] faitswulff: has joined #ruby
[22:26:51] jasmith: has joined #ruby
[22:30:03] hays_: has joined #ruby
[22:30:22] nowhere_man: has joined #ruby
[22:31:16] Puffball: has joined #ruby
[22:31:46] DTZUZO_: has joined #ruby
[22:33:21] hays_: anyone who uses rubocop--is it fair to say that driving the number of "offenses" to zero is not usually practicable
[22:33:51] hays_: I'm finding some cases where.. it doesn't make sense to make the method shorter, or ABC complexity makes sense
[22:53:24] tdy: has joined #ruby
[22:55:31] marz_d`ghostman: I'm using dispatch and I have these lines: autocmd FileType ruby let b:dispatch = 'rspec %' nnoremap <F9> :Dispatch!<CR> but I'm getting an erorr: || make: *** No targets specified and no makefile found. Stop.
[22:55:41] marz_d`ghostman: I can run :Dispatch rspec % fine though
[22:57:11] Dirak: has joined #ruby
[23:05:39] [Butch]: has joined #ruby
[23:16:23] IanMalcolm: has joined #ruby
[23:18:42] faitswulff: has joined #ruby
[23:19:09] baweaver: hays_: Depends on how pedantic one wants to be
[23:19:17] baweaver: I normally set some to warn and some to error
[23:19:29] baweaver: Difference is what you want to be build-breaking
[23:19:52] hays_: baweaver: it seems basically impossible to use optparse in a way that won't violate a rubocop rule
[23:20:14] hays_: since you end up with a big block if you have more than a few args
[23:21:07] chichouw: has joined #ruby
[23:27:03] lxsameer: has joined #ruby
[23:30:06] elphe: has joined #ruby
[23:33:21] za1b1tsu: has joined #ruby
[23:41:15] jottr: has joined #ruby
[23:42:23] esrse: has joined #ruby
[23:43:35] gnufied: has joined #ruby
[23:43:42] Azure: has joined #ruby
[23:45:10] havenwood: hays_: increase unreasonably low default values
[23:45:43] hays_: optparse might be like a page long
[23:53:11] RougeR: has joined #ruby
[23:56:26] Dirak: has joined #ruby
[23:59:13] Paraxial: has joined #ruby
[23:59:29] SanguineAnomaly: has joined #ruby