« Back to channel list

#ruby - 05 April 2019

« Back 1 day Forward 1 day »
[00:09:13] orbyt_: has joined #ruby
[00:13:07] shortdudey123: has joined #ruby
[00:14:45] leftylink: I would think `false` for `(0..).cover?(..0)`, as I reason that there is at least one member of `..0` not in `0..`
[00:18:11] shortdudey123: has joined #ruby
[00:18:29] jenrzzz_: has joined #ruby
[00:19:24] havenwood: leftylink: Ruby 2.7 agrees
[00:19:39] havenwood: leftylink: what's the member not in 0..?
[00:19:43] havenwood: leftylink: nil?
[00:20:11] havenwood: &>> (0..).cover?(0..0)
[00:20:13] rubydoc: # => true (https://carc.in/#/r/6npp)
[00:21:00] havenwood: leftylink: ahhh, ..0 includes negatives! right.
[00:21:09] havenwood: (..0).cover?(-1) #=> true
[00:21:27] havenwood: leftylink: 👍🏽
[00:39:11] _whitelogger: has joined #ruby
[00:50:12] AJA4350: has joined #ruby
[01:03:42] shortdudey123: has joined #ruby
[01:04:51] kapil____: has joined #ruby
[01:08:18] gell5: has joined #ruby
[01:10:52] gell5: has joined #ruby
[01:15:13] gell5_: has joined #ruby
[01:16:13] jenrzzz: has joined #ruby
[01:17:31] brool: has joined #ruby
[01:35:12] kaleido: has joined #ruby
[01:42:03] mangold: has joined #ruby
[01:54:39] ricekrispie2: has joined #ruby
[01:55:17] leftylink: ah... yeah I could have done slightly better by explicitly naming a member I was thinking of instead of making you puzzle it out havenwood . but looks like you got it so it is all good
[01:57:32] AJA4351: has joined #ruby
[02:02:37] ur5us: has joined #ruby
[02:02:51] AzizLight: has left #ruby: ("WeeChat 2.2-dev")
[02:03:04] leftylink: s/done slightly better/been more helpful/
[02:06:53] orbyt_: has joined #ruby
[02:11:23] wallace__: has joined #ruby
[02:15:12] _whitelogger: has joined #ruby
[02:18:41] DTZUZO: has joined #ruby
[02:29:48] helpa: has joined #ruby
[02:30:34] i1nfusion: has joined #ruby
[02:35:15] DTZUZO: has joined #ruby
[02:52:59] arescorpio: has joined #ruby
[02:54:50] rf: has joined #ruby
[02:58:51] envex: has joined #ruby
[02:59:49] vsss: has joined #ruby
[03:09:52] braincrash: has joined #ruby
[03:17:43] cd: has joined #ruby
[03:20:01] grilix: has joined #ruby
[03:27:10] _whitelogger: has joined #ruby
[03:30:07] i1nfusion: has joined #ruby
[03:50:09] wallace__: has left #ruby: ()
[03:54:05] t0xik: has joined #ruby
[04:05:40] ur5us_: has joined #ruby
[04:06:21] dellavg_: has joined #ruby
[04:09:04] AJA4350: has joined #ruby
[04:22:42] AJA4350: has joined #ruby
[04:25:45] AJA4350: has joined #ruby
[04:29:14] baweaver: havenwood: Did you write an article on it yet?
[04:31:46] Nicmavr: has joined #ruby
[04:32:40] AJA4350: has joined #ruby
[04:36:10] _whitelogger: has joined #ruby
[04:41:52] Hobbyboy: has joined #ruby
[05:00:12] _whitelogger: has joined #ruby
[05:06:27] orbyt_: has joined #ruby
[05:08:28] sauvin: has joined #ruby
[05:10:12] reber: has joined #ruby
[05:14:11] v01d4lph4: has joined #ruby
[05:25:33] shortdudey123: has joined #ruby
[05:30:11] _whitelogger: has joined #ruby
[05:45:32] aufi: has joined #ruby
[05:52:50] sidx64: has joined #ruby
[06:03:06] Xiti: has joined #ruby
[06:11:06] schleppel: has joined #ruby
[06:18:11] _whitelogger: has joined #ruby
[06:26:43] Dbugger: has joined #ruby
[06:30:25] dtzuzu: has joined #ruby
[06:31:57] helpa-bot: has joined #ruby
[06:34:27] helpa: has joined #ruby
[06:35:29] vsss: has joined #ruby
[06:35:44] vsss: has joined #ruby
[06:35:59] vsss: has joined #ruby
[06:36:13] vsss: has joined #ruby
[06:36:25] irdr: has joined #ruby
[06:39:50] hightower2: has joined #ruby
[06:41:51] cgfbee: has joined #ruby
[06:42:53] bastilian: has joined #ruby
[06:49:31] vondruch: has joined #ruby
[06:51:58] dtzuzu: has joined #ruby
[06:52:50] andikr: has joined #ruby
[06:55:21] Terens: has joined #ruby
[06:56:34] ferr: has joined #ruby
[07:00:40] gigetoo: has joined #ruby
[07:00:50] v01d4lph4: has joined #ruby
[07:01:56] dionysus69: I have some free time, does anyone have any project that would need contribution? plus I would like to gain experience in FOSS contribution flow
[07:07:14] esrse: has joined #ruby
[07:11:20] TomyWork: has joined #ruby
[07:11:36] orbyt_: has joined #ruby
[07:13:07] clemens3: has joined #ruby
[07:13:38] prestorium: has joined #ruby
[07:13:38] turt2live: has joined #ruby
[07:13:38] sepp2k: has joined #ruby
[07:13:38] jonjitsu: has joined #ruby
[07:13:39] Turnikov[m]: has joined #ruby
[07:13:39] supergeek[m]: has joined #ruby
[07:16:07] sidx64: has joined #ruby
[07:18:18] helpa: has joined #ruby
[07:21:31] snickers: has joined #ruby
[07:33:28] v01d4lph4: has joined #ruby
[07:42:21] rubydoc_: has joined #ruby
[07:42:26] sidx64: has joined #ruby
[07:43:13] lxsameer: has joined #ruby
[07:45:40] phaul: has joined #ruby
[07:56:24] aupadhye: has joined #ruby
[07:58:37] alem0lars: has joined #ruby
[07:59:52] Mia: has joined #ruby
[07:59:53] Mia: has joined #ruby
[08:01:08] alem0lars: has joined #ruby
[08:07:00] conta1: has joined #ruby
[08:15:21] phaul: has joined #ruby
[08:15:32] kyrylo: has joined #ruby
[08:23:43] CrazyEddy: has joined #ruby
[08:27:47] jottr: has joined #ruby
[08:35:47] RiPuk: has joined #ruby
[08:43:21] sidx64: has joined #ruby
[08:46:50] alem0lars_: has joined #ruby
[08:51:46] rubydoc: has joined #ruby
[09:00:09] hightower2: has joined #ruby
[09:26:31] Bish: has joined #ruby
[09:40:31] jottr_: has joined #ruby
[09:42:12] jottr: has joined #ruby
[09:50:19] za1b1tsu: has joined #ruby
[09:55:54] sidx64: has joined #ruby
[09:56:34] irdr: has joined #ruby
[09:57:07] vsss: has joined #ruby
[09:57:22] vsss: has joined #ruby
[09:57:37] vsss: has joined #ruby
[09:58:17] vsss: has joined #ruby
[09:58:35] daemonwrangler: has joined #ruby
[09:58:37] jacksoow: has joined #ruby
[10:00:21] Davey: has joined #ruby
[10:00:22] Davey: has joined #ruby
[10:00:43] DTZUZO: has joined #ruby
[10:01:34] Inline: has joined #ruby
[10:03:49] bastilian: has joined #ruby
[10:07:33] tjbp: has joined #ruby
[10:08:47] aupadhye: has joined #ruby
[10:11:36] conta1: has joined #ruby
[10:12:05] sidx64_: has joined #ruby
[10:20:58] mangold: has joined #ruby
[10:23:29] RiPuk: has joined #ruby
[10:29:41] evdubs: has joined #ruby
[10:31:12] aqd: has joined #ruby
[10:32:13] jonjitsu: has joined #ruby
[10:32:13] turt2live: has joined #ruby
[10:32:13] sepp2k: has joined #ruby
[10:32:13] supergeek[m]: has joined #ruby
[10:32:13] Turnikov[m]: has joined #ruby
[10:38:43] RiPuk: has joined #ruby
[10:47:08] AlHafoudh: has joined #ruby
[11:02:04] mikecmpbll: has joined #ruby
[11:33:00] doodlebug: has joined #ruby
[11:34:22] ldnunes: has joined #ruby
[11:35:09] xfbs: has joined #ruby
[11:48:35] AJA4350: has joined #ruby
[11:51:23] aufi: has joined #ruby
[12:00:15] jhill: has joined #ruby
[12:02:54] danielsju6: has joined #ruby
[12:11:01] Blaguvest: has joined #ruby
[12:11:49] Ai9zO5AP: has joined #ruby
[12:12:14] jhill: has joined #ruby
[12:26:16] brendan-: has joined #ruby
[12:28:06] v01d4lph4: has joined #ruby
[12:47:56] hightower2: has joined #ruby
[12:58:42] ae84: has joined #ruby
[12:59:29] Bish: can someone bring conditionvariables closer to me?
[12:59:31] darix: dionysus69: my usual recommendation would be: pick one where you are personally interested because you use it for your work/hobby
[12:59:46] Bish: i am using them and they increase my performance, but i really don't get why this is needed for performant shared state
[13:00:23] darix: Bish: conditionwhat?
[13:01:39] phaul: &ri ConditionVariable
[13:01:40] rubydoc: https://ruby-doc.org/core-2.6/ConditionVariable.html
[13:02:30] stryek: has joined #ruby
[13:05:30] phaul: yeah I mean you could just lock a mutex and that waits until it becomes available. sounds like it's the same concept as a mutex just different interface , but I dont know
[13:06:48] phaul: docs say "it is possible to suspend while in the middle of a critical section", but wait, what. why? Sounds like recipe for dead locks
[13:07:42] dviola: has joined #ruby
[13:08:52] jcalla: has joined #ruby
[13:09:47] dviola: has joined #ruby
[13:13:29] phaul: I guess I just proved that I don't understand them either, but in that example in the docs, how does thread b get to resource.signal if it can't even enter the synchronize block as thread a has already taken the mutex
[13:18:24] jhass: ConditionVariable#wait unlocks the mutex
[13:20:16] phaul: that explains it
[13:20:41] jhass: I can see performance benefits for coordinating between two threads of a set of n threads that contend for the same mutex
[13:22:10] jhass: since you can target which thread that's waiting for the thread first
[13:23:22] jhass: they're the same as Java's Object.wait/.notify/.notify_all
[13:24:44] jhass: pthread has them too, see the phtread_cond_* manpages
[13:27:34] jhass: eh, that once sentence came our garbled, I mean "since you can target which thread that's waiting for the mutex is woken up first"
[13:29:34] phaul: i dont see the interface for that, signal just wakes up the first from the queue, broadcast wakes them all up
[13:30:54] jhass: well in my scenario only two of them would coordinate with the condition variable, the others would just wait on the mutex
[13:32:11] jhass: https://en.wikipedia.org/wiki/Monitor_(synchronization)
[13:44:24] tjbp: has joined #ruby
[13:45:24] doodleb25: has joined #ruby
[13:46:21] doodlebug: has joined #ruby
[13:46:28] SeepingN: has joined #ruby
[14:05:27] iNs: has joined #ruby
[14:08:02] lucasb: has joined #ruby
[14:10:24] drowze: has joined #ruby
[14:13:12] drowze: is it possible to use the Proc#>> operator for functions that receive two parameters?
[14:13:20] snickers: has joined #ruby
[14:13:26] drowze: e.g.: ->(x) { [x-1, x+1] } >> ->(x, y) { x*2 + y*2 }
[14:14:39] drowze: I can't really compose those two procs (error: ArgumentError: wrong number of arguments (given 1, expected 2))
[14:15:36] drowze: I have to, instead, do something like: ->(x) { [x-1, x+1] } >> ->(x_and_y) { x_and_y.first*2 + x_and_y.last*2 }
[14:15:41] drowze: which is certainly less than ideal
[14:20:25] phaul: &>> (->(x) { [x-1, x+1] } >> ->((x, y)) { x*2 + y*2 })[10]
[14:20:28] rubydoc: # => 40 (https://carc.in/#/r/6nu7)
[14:22:50] drowze: indeed works. But why does it work simply with an extra set of parenthesis?
[14:23:26] phaul: because in argument passing when you parenthesise positional arguments it splats an array into them
[14:24:34] tjbp: has joined #ruby
[14:24:58] phaul: &>> def foo(a, (b, c)); {b => c}; end; foo 1, [2, 3]
[14:24:58] rubydoc: # => {2=>3} (https://carc.in/#/r/6nu8)
[14:25:41] drowze: oh. Fair enough! That's also applied on blocks (such as e.g.: [1, {a: :b}].map { |n, (k, v)| .... })
[14:25:55] drowze: thanks for the tip! I woulnd't have think about it :)
[14:27:28] grilix: has joined #ruby
[14:30:53] kapil____: has joined #ruby
[14:31:37] phaul: map calls the block for each elem of the array. you meant .yeild_self
[14:33:36] al2o3-cr: phaul: they're talking about proc composition, surely?
[14:34:33] phaul: al2o3-cr: I guess
[14:35:27] phaul: &>> [1, {a: :b}].map { |n, (k, v)| "n: #{n} k: #{k} v: #{v} }
[14:35:28] rubydoc: stderr: -e:4: unterminated string meets end of file (https://carc.in/#/r/6nua)
[14:35:33] phaul: &>> [1, {a: :b}].map { |n, (k, v)| "n: #{n} k: #{k} v: #{v}" }
[14:35:33] rubydoc: # => ["n: 1 k: v: ", "n: {:a=>:b} k: v: "] (https://carc.in/#/r/6nub)
[14:36:17] phaul: which is probably not what was meant
[14:36:24] doodleb64: has joined #ruby
[14:36:36] al2o3-cr: phaul: probably not
[14:38:00] drowze: sure, you're right there!
[14:39:30] polishdub: has joined #ruby
[14:40:05] doodlebug: has joined #ruby
[14:42:30] kyrylo: has joined #ruby
[14:42:59] al2o3-cr: phaul: i jumped the queue, indeed what you showed, was indeed correct. :P
[14:43:25] phaul: how unbritish of you ;)
[14:43:53] al2o3-cr: phaul: i know, right? :)
[14:52:47] shtirlic: has joined #ruby
[14:55:54] xfbs: has joined #ruby
[14:56:11] ldnunes: has joined #ruby
[14:58:22] grilix: has joined #ruby
[15:00:55] tdy: has joined #ruby
[15:05:42] lel: has joined #ruby
[15:07:08] havenwood: baweaver: nope!
[15:08:24] TvL2386: has joined #ruby
[15:11:31] Nicmavr: has joined #ruby
[15:22:57] cameron_: has joined #ruby
[15:24:06] cameron_: has joined #ruby
[15:24:46] tjbp: has joined #ruby
[15:25:24] camertron: Hello there rubyists! I'm curious if anyone could point me in the right direction. I'm just getting started with MRI's C API and trying to find out how to call rb_mod_refine with a block. Any ideas? Thanks!
[15:27:19] camertron: has joined #ruby
[15:31:05] cameron_: has joined #ruby
[15:31:23] shtirlic: has joined #ruby
[15:32:29] tjbp: has joined #ruby
[15:32:34] grvgr: has joined #ruby
[15:38:28] brendan-: has joined #ruby
[15:49:01] tjbp: has joined #ruby
[15:50:58] bougyman: has joined #ruby
[15:54:08] havenwood: camer, oh, they left. I was going to suggest rb_block_call, but dunno if that's what they were looking for.
[15:54:51] shtirlic: has joined #ruby
[15:56:55] doodleb26: has joined #ruby
[16:00:06] doodlebug: has joined #ruby
[16:09:50] mangold: has joined #ruby
[16:14:45] orbyt_: has joined #ruby
[16:20:50] houhoulis: has joined #ruby
[16:35:23] mangold: has joined #ruby
[16:42:46] cthu|: has joined #ruby
[16:45:13] govg: has joined #ruby
[16:50:42] Tau: has joined #ruby
[16:52:50] shtirlic: has joined #ruby
[16:52:53] mangold: has joined #ruby
[16:58:58] orbyt_: has joined #ruby
[17:00:50] shtirlic: has joined #ruby
[17:01:23] nameless_cl: has joined #ruby
[17:03:02] orbyt_: has joined #ruby
[17:04:54] Renich: has joined #ruby
[17:06:14] tdy: has joined #ruby
[17:07:25] dviola: has joined #ruby
[17:08:47] hightower2: has joined #ruby
[17:08:48] segy: has joined #ruby
[17:08:58] hightower2: has joined #ruby
[17:09:36] cthulchu_: has joined #ruby
[17:13:43] agent_white: has joined #ruby
[17:20:36] Renich: has joined #ruby
[17:23:31] conta2: has joined #ruby
[17:26:32] shtirlic: has joined #ruby
[17:27:13] Renich: has joined #ruby
[17:31:33] wallace_mu: has joined #ruby
[17:36:22] queip: has joined #ruby
[17:41:59] LtHummus: has joined #ruby
[17:50:51] spacesuitdiver: has joined #ruby
[17:55:58] rippa: has joined #ruby
[17:56:58] queip: has joined #ruby
[18:00:30] lxsameer: has joined #ruby
[18:03:04] cthu|: has joined #ruby
[18:12:22] DmitryBochkarev: has joined #ruby
[18:18:08] cloaked1: has joined #ruby
[18:20:36] Renich: has joined #ruby
[18:22:42] sidx64: has joined #ruby
[18:25:43] sidx64_: has joined #ruby
[18:32:06] tdy: has joined #ruby
[18:34:01] Renich: has joined #ruby
[18:42:56] moei: has joined #ruby
[18:42:59] v01d4lph4: has joined #ruby
[18:56:45] zachk: has joined #ruby
[18:58:55] zachk: has joined #ruby
[18:59:28] mikecmpbll: has joined #ruby
[19:02:23] orbyt_: has joined #ruby
[19:03:50] zachk: has joined #ruby
[19:04:10] StarSeed0000: has joined #ruby
[19:16:01] catbusters: has joined #ruby
[19:18:01] dar123: has joined #ruby
[19:24:19] griffindy: has joined #ruby
[19:28:05] Renich: has joined #ruby
[19:33:31] reber: has joined #ruby
[19:48:07] eckhardt: has joined #ruby
[19:55:44] nowhereman: has joined #ruby
[20:01:39] jrafanie: has joined #ruby
[20:09:05] jinie: has joined #ruby
[20:16:40] SuperLag: has joined #ruby
[20:17:38] grilix: has joined #ruby
[20:19:39] hightower2: has joined #ruby
[20:44:26] Renich_: has joined #ruby
[21:14:00] rubydoc: has joined #ruby
[21:18:35] envex: has joined #ruby
[21:31:12] akem: has joined #ruby
[21:55:35] silviu9: has joined #ruby
[21:56:07] Xiti`: has joined #ruby
[21:56:27] wallace__: has joined #ruby
[21:56:29] lxsameer: has joined #ruby
[21:56:48] SeepingN_: has joined #ruby
[21:56:55] yaewa: has joined #ruby
[21:57:29] mozzarel1: has joined #ruby
[21:57:43] kaleido_: has joined #ruby
[21:58:02] darkphnx48: has joined #ruby
[21:58:03] fyber7: has joined #ruby
[21:58:21] Junaos_: has joined #ruby
[21:58:24] flips_: has joined #ruby
[21:58:28] paraxial8: has joined #ruby
[21:58:31] stooj_: has joined #ruby
[21:58:37] salasrod_: has joined #ruby
[21:59:02] robotcars1: has joined #ruby
[21:59:05] mr_rich102: has joined #ruby
[21:59:16] reber: has joined #ruby
[21:59:23] tarptaeya_: has joined #ruby
[21:59:43] jmcgnh_: has joined #ruby
[21:59:48] irdr_: has joined #ruby
[21:59:57] teclator_: has joined #ruby
[22:00:05] jrafanie_: has joined #ruby
[22:00:19] wget_: has joined #ruby
[22:00:24] Phage-: has joined #ruby
[22:00:25] jacksoow_: has joined #ruby
[22:00:35] _Caerus: has joined #ruby
[22:00:41] VladGh_: has joined #ruby
[22:00:43] rprimus_: has joined #ruby
[22:00:51] daemonwrangler_: has joined #ruby
[22:01:01] agent_wh1te: has joined #ruby
[22:01:07] cranq_: has joined #ruby
[22:01:17] adam12: has joined #ruby
[22:01:18] KramerC_: has joined #ruby
[22:01:18] contradictioned_: has joined #ruby
[22:01:21] connor_g1odwolf: has joined #ruby
[22:01:21] guardian: has joined #ruby
[22:01:22] KramerC_: has joined #ruby
[22:01:36] Prira: has joined #ruby
[22:01:46] miah: has joined #ruby
[22:01:51] agent_white: has joined #ruby
[22:01:54] agent_white: has joined #ruby
[22:01:54] ablackack: has joined #ruby
[22:01:56] m27frogy: has joined #ruby
[22:01:56] xlued: has joined #ruby
[22:01:57] Ropeney_: has joined #ruby
[22:02:05] NightMonkey: has joined #ruby
[22:02:08] mkroman: has joined #ruby
[22:02:22] haylon: has joined #ruby
[22:02:27] aspiers: has joined #ruby
[22:02:32] Linuus: has joined #ruby
[22:02:35] Mon_Ouie: has joined #ruby
[22:02:45] reber__: has joined #ruby
[22:02:48] wget: has joined #ruby
[22:02:49] wget: has joined #ruby
[22:02:53] riceandb1ans: has joined #ruby
[22:02:54] akemot: has joined #ruby
[22:02:54] bga57: has joined #ruby
[22:03:08] ellcs: has joined #ruby
[22:04:14] queip: has joined #ruby
[22:05:42] SuperLag: has joined #ruby
[22:06:10] polishdub: has joined #ruby
[22:09:21] Ekho: has joined #ruby
[22:14:14] varesa: has joined #ruby
[22:26:04] xfbs: has joined #ruby
[22:29:06] reber: has joined #ruby
[22:33:58] jhass: has joined #ruby
[23:12:50] doodleb30: has joined #ruby
[23:29:29] code_zombie: has joined #ruby
[23:33:11] _whitelogger: has joined #ruby
[23:46:42] apparition: has joined #ruby
[23:50:21] bga57: has joined #ruby
[23:52:36] t0x: has joined #ruby