[#86787] [Ruby trunk Feature#14723] [WIP] sleepy GC — ko1@...

Issue #14723 has been updated by ko1 (Koichi Sasada).

13 messages 2018/05/01
[#86790] Re: [Ruby trunk Feature#14723] [WIP] sleepy GC — Eric Wong <normalperson@...> 2018/05/01

ko1@atdot.net wrote:

[#87095] [Ruby trunk Feature#14767] [PATCH] gc.c: use monotonic counters for objspace_malloc_increase — ko1@...

Issue #14767 has been updated by ko1 (Koichi Sasada).

9 messages 2018/05/17

[ruby-core:87127] [Ruby trunk Feature#14105] Introduce xor as alias for Set#^

From: gotoken@...
Date: 2018-05-17 09:45:52 UTC
List: ruby-core #87127
Issue #14105 has been updated by gotoken (Kentaro Goto).


knu (Akinori MUSHA) wrote:
> I'm afraid aliasing `^` to `xor` is not like aliasing `&` to `intersection` and `|` to `union`, because the latter two are the terms defined in the set theory whereas `xor` is (apparently) not.

Yep, that is usually called the symmetric difference in elementary set theory. Even so, some text books introduce the relation between them as 

a△b = {x | x∈a ⊕ x∈b}

where △ and ⊕ stand for symmetric difference and XOR respectively. 

By the way I recently wrote this set theoretical operation to find all uncommon files in two file collections then I reminded this feature request :)

----------------------------------------
Feature #14105: Introduce xor as alias for Set#^
https://bugs.ruby-lang.org/issues/14105#change-72112

* Author: ana06 (Ana Maria Martinez Gomez)
* Status: Assigned
* Priority: Normal
* Assignee: knu (Akinori MUSHA)
* Target version: 
----------------------------------------
Not sure if I should also add feautures for the `Set` class here or if I should do it somewhere else.

I would like to add a more readable method for the exclusive or, currently as `^` in set. It is in both mathematics, hardware and many other programming languages known as `xor`, so I think this will help to use it.

---Files--------------------------------
firefox.desktop (528 Bytes)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next