This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html
Set by lizmat on 8 June 2022.
00:28 deoac joined
deoac Why is `(1, 1).one !(elem) (1..10);` True? 00:29
It is not the case that exactly one of the elements is not in the Range.
`all`, `any`, and `none` behave the way I expect. 00:30
Whereas `(1, 1).any ∉ (1..10)` is `any(False, False)` 00:36
Shouldn't `!(elem)` and `∉` yield the same result?
Ooops.  Replace `any` with `one` in my last remark. 00:37
00:55 frost joined 02:00 razetime joined 02:46 jetchisel left 02:49 jetchisel joined 03:30 razetime left 03:56 razetime joined
kjp deoac: Ideally yes, but... 'A !(elem) B' is shorthand for "!(A (elem) B)", and 04:28
∉ is an operator in its own right, so the results are different. 04:29
'!∈' gives the same result as '!(elem)' 04:34
This is a known gotcha when using junctions. 04:35
05:15 frost left 07:02 jetchisel left 08:18 razetime left 08:35 razetime joined 10:02 discord-raku-bot left 10:03 discord-raku-bot joined 10:07 discord-raku-bot left, discord-raku-bot joined
deoac Is there an ASCII equivalent of `∉` ? 10:16
lizmat !(elem) 10:17
deoac No.   `(1, 1).one !(elem) (1..10);`  and  `(1, 1).one ∉ (1..10)` yield different results. 10:20
lizmat then according current doctrine, the ∉ result is wrong 10:21
deoac  `(1, 1).one ∉ (1..10);`  -->. `one(False, False)` 10:23
 `(1, 1).one !(elem) (1..10);`  -->. `True` 10:24
lizmat see discussion at: github.com/rakudo/rakudo/pull/3874 10:25
Nemokosch just posted on github.com/Raku/problem-solving/issues/319 10:27
tldr please please pretty please, do make the change lizmat PR'd back in the day
(and perhaps change the whole semantics of `!` but that seems too big to happen) 10:28
I mean: 10:32
- changing `!` to _not_ lift would fix everything immediately
- if that doesn't happen, providing ways out that aren't just ![operator] is necessary to get readable junction behavior
lizmat I'm going to recuse myself from this dicussion
on ground of burnout on the subject 10:33
Nemokosch It's not your fault really 10:34
It's painful to see that this discussion would be over for good if it weren't for the stubbornness of literally two or three people 10:36
lizmat that may be so, but these people I value very much, and I feel it is *my* fault for not having been able to convince them 10:37
gfldex m: say „If only Larry wouldn't be { ('linguist' & 'computer scientist') }!“; 10:39
camelia all(If only Larry wouldn't be linguist!, If only Larry wouldn't be computer scientist!)
deoac Thanks, everyone.  This has been illuminating to this beginner! 10:42
Nemokosch But since I see this bothers everyone apart from the 2 or 3 people who insist on it, I will even write a petition with pages of rationale, if I have to 10:44
11:00 jetchisel joined 11:19 razetime left 11:26 razetime joined 13:41 jgaz joined 13:52 jgaz left 13:54 jgaz joined 14:27 jgaz left 14:30 razetime left 15:01 jgaz joined 16:24 jgaz left, deoac left 16:28 jgaz joined 16:59 jgaz left 22:29 deoac joined 22:42 Kaipei joined 22:46 Kaiepi left
deoac Is there a rakuish way of toggling a Bool? 23:29
Apart from `$bool = !$bool;` ? 23:30