SmokeMachine Logic::Ternary sent to Zef... :) 00:04
00:19 japhb left 00:20 ds7823 left 00:29 Aedil joined 00:35 japhb joined 00:37 MasterDuke joined
m_zero trand and then, course tror and trxor or if you prefer triand, trior, and trixor 00:40
(and for bonus, these are fun to say out loud! 😁 ) 00:41
00:57 japhb left
SmokeMachine I released and3, or3, xor3, not3 and so3... 00:59
01:16 hulk left 01:17 kylese joined
SmokeMachine raku.land/zef:FCO/Logic::Ternary 01:18
01:23 japhb joined 01:36 japhb left 01:41 japhb joined 01:42 MasterDuke left 01:47 japhb left 02:12 japhb joined 02:15 kylese left 02:16 kylese joined 03:06 arkiuat left 03:09 arkiuat joined 03:13 arkiuat left 03:25 arkiuat joined
Voldenet SmokeMachine: I think and3 for regular `Bool:U, Bool::True, Bool::False` values would be more obvious 03:32
m: sub infix:<and3>($x, $y) { return False if $x eqv False; return False if $y eqv False; return Bool unless $x.defined; return Bool unless $y.defined; $x and $y }; my @v = (Bool, False, True); for (@v X @v) -> ($x, $y) { say ($x,$y,$x and3 $y).map(*.gist) } 03:37
camelia ((Bool) (Bool) (Bool))
((Bool) False False)
((Bool) True (Bool))
(False (Bool) False)
(False False False)
(False True False)
(True (Bool) (Bool))
(True False False)
(True True True)
Voldenet I'm sure it can be more elegantly written maybe by even mapping Bool:U to Logic::Ternary::Unknown 03:41
current problem with Logic::Ternary is that it overrides Bool making it very non-obvious trap 03:46
m: enum Ternary ( False => -1, Unknown => 0, True => +1 ); sub thing(Bool $x) { say $x }; thing(True) # uhhhh 03:47
camelia ===SORRY!=== Error while compiling <tmp>
Calling thing(Ternary) will never work with declared signature (Bool $x)
at <tmp>:1
------> => +1 ); sub thing(Bool $x) { say $x }; <HERE>thing(True) # uhhhh
Voldenet also `Unknown` should become `Bool:U`, not False 03:49
after coercing
but really coercing should be done for internal logic, because Bool is enough 03:50
m: multi sub infix:<and3>(Bool $x, Bool $y) { given any($x, $y) { when * eqv False { False }; when not .defined { Bool }; default { $x and $y }} }; my @v = (Bool, False, True); for (@v X @v) -> ($x, $y) { say ($x,$y,$x and3 $y).map(*.gist) } 04:03
camelia ((Bool) (Bool) (Bool))
((Bool) False False)
((Bool) True (Bool))
(False (Bool) False)
(False False False)
(False True False)
(True (Bool) (Bool))
(True False False)
(True True True)
Voldenet m: multi sub infix:<and3>(Bool $x, Bool $y) { any($x, $y) eqv False ?? False !! $x and $y }; my @v = (Bool, False, True); for (@v X @v) -> ($x, $y) { say ($x,$y,$x and3 $y).map(*.gist) } 04:26
camelia ((Bool) (Bool) (Bool))
((Bool) False False)
((Bool) True (Bool))
(False (Bool) False)
(False False False)
(False True False)
(True (Bool) (Bool))
(True False False)
(True True True)
Voldenet m: multi sub infix:<and3>(Bool $x, Bool $y) { any($x, $y) !eqv False && $x and $y }; my @v = (Bool, False, True); for (@v X @v) -> ($x, $y) { say ($x,$y,$x and3 $y).map(*.gist) } 04:29
camelia ((Bool) (Bool) (Bool))
((Bool) False False)
((Bool) True (Bool))
(False (Bool) False)
(False False False)
(False True False)
(True (Bool) (Bool))
(True False False)
(True True True)
04:40 Aedil left 04:41 simcop2387 left 04:44 Aedil joined 04:51 simcop2387 joined 04:52 silug4 left 05:00 silug4 joined 05:20 halloy9957 joined 06:05 abraxxa joined 06:14 timo2 left 06:17 timo2 joined 06:31 halloy9957 left
melezhik. . 06:36
06:55 arkiuat left 06:59 arkiuat joined 07:04 arkiuat left
SmokeMachine Voldenet: Bool:U is already mapped to Unknown (github.com/FCO/Logic-Ternary/blob/...kumod#L59) 07:11
Voldenet: yes, you will need to use Bool::* if you need to use boolean values. But I don't see it as a problem... 07:12
Voldenet but raku is dynamic language, it's not java where you can count on types 07:15
m: enum X <True>; sub Y(Bool $x) { }; sub Z($x) { Y($x) }; Z(True) # consider this 07:17
camelia Type check failed in binding to parameter '$x'; expected Bool but got X (X::True)
in sub Y at <tmp> line 1
in sub Z at <tmp> line 1
in block <unit> at <tmp> line 1
Voldenet redefining those is a bit like redefining Int or Bool 07:18
m: enum X<Bool>; say Bool::True; # this is what I mean
camelia Could not find symbol '&True' in 'X'
in block <unit> at <tmp> line 1
07:23 arkiuat joined
Voldenet Yes, you can still access it through CORE::Bool::True, but it's still messy code 07:24
so I'd still use Bool:U and actual Bool values, because they already exist 07:25
07:28 arkiuat left, Sgeo left
SmokeMachine Voldenet: about Unknown -> Bool:U, I plan to do that... I only forgot about it on 0.0.2... 07:37
Voldenet it'd work, but I'd say that the module shouldn't export True/False by default either way 07:40
in fact, I think the following should be valid: `use Logic::Ternary;; sub foo(Logic::Ternary() $_) { .say }; foo(Bool); foo(Bool::True); foo(Bool::False);` 07:45
so, `True` and `False` from Bool are being used, you can convert things to and from Logic::Ternary but it doesn't override True/False anyhow 07:46
07:57 arkiuat joined 08:02 arkiuat left 08:20 lichtkind joined 08:30 arkiuat joined, melezhik joined
melezhik Sparky ci has switched to Rakudo 2025.10 , if someone wants to test their modules against fresh Rakudo … 08:30
08:35 arkiuat left 08:59 derpydoo joined 09:04 arkiuat joined 09:08 arkiuat left 09:31 arkiuat joined 09:36 arkiuat left
El_Che . 10:01
10:05 arkiuat joined 10:07 apac joined 10:13 arkiuat left 10:32 arkiuat joined 10:35 apac left 10:37 arkiuat left 10:39 apac joined 10:49 swaggboi left 11:06 arkiuat joined 11:09 melezhik left 11:11 derpydoo left, arkiuat left 11:25 apa_c joined, apac left 11:33 arkiuat joined 11:34 apa_c left 11:40 arkiuat left 11:53 arkiuat joined 11:55 apa_c joined 12:27 apa_c left 12:35 apa_c joined 12:54 apa_c left 12:58 arkiuat left 13:11 arkiuat joined 13:15 arkiuat left 13:20 apa_c joined 13:25 apac joined 13:28 apa_c left
librasteve o/ 13:34
13:34 arkiuat joined 13:35 apac left 13:39 arkiuat left 13:57 arkiuat joined 14:10 tgt joined 14:47 tgt left 15:21 tgt joined 15:28 apac joined
[Coke] not really a zef question but: if I do zef look META6 in powershell, and then hit ^C for some reason... the shell gets VERY confused, and keeps asking me More? More? More? - if this were bash, I'd try 'stty sane', but it looks completely messed up - only option is to open another powershell, run zef look again. 15:54
(and after the ^C, I appear to back in the original powershell, not the zef look shell)
ah, ^Z helps.
... ah, no, it's just not asking me more any more, still borked. 15:55
ugexe exit so shell(%*ENV<SHELL> // %*ENV<ComSpec> // %*ENV<COMSPEC>, :cwd($dist-path)) ?? 0 !! 1; 15:56
that is what zef does for zef look
16:00 tgt left 16:26 silug4 is now known as silug 16:28 tgt joined
timo2 m: my @choices = "A".."Z"; my @toggles = Bool.roll(+@choices); say (@toggles Z&& @choices).grep(*.so) 16:48
camelia (C G H I J L M O P Q W X Y)
timo2 m: my @choices = "A".."Z"; my @toggles = Bool.roll(+@choices); say (@toggles Z @choices).map({ .[1] if .[0] })
camelia (A B F I K L M N O R V X Y Z)
timo2 m: my @choices = "A".."M"; my @toggles = Bool.roll(+@choices); say @toggles; say (@toggles Zxor @choices) # this has the meanings of true and false reversed 16:52
camelia [True False False False True True False False True False True False True]
(Nil B C D Nil Nil G H Nil J Nil L Nil)
16:55 tejr left
timo2 m: my @choices = "A".."M"; my @toggles = Bool.roll(+@choices); say @toggles; say @choices[@toggles.pairs.grep(*.value).map(*.key)] # longest yet 16:55
camelia [True True False False False True True False False True False False False]
(A B F G J)
timo2 m: my @choices = "A".."M"; my @toggles = Bool.roll(+@choices); say @toggles; say @choices[@toggles.pairs.map({ .value if .key })] 16:56
camelia [True True True False True False False False True False False True True]
(B B A B A A A B A A B B)
16:56 tejr joined
timo2 m: my @choices = "A".."M"; my @toggles = Bool.roll(+@choices); say @toggles; say @choices[@toggles.pairs.map({ .key if .value })] 16:56
camelia [False True False False True True False True True True True False True]
(B E F H I J K M)
timo2 using Zxx gives me a Seq of empty and one-item Seq objects, which is ... not so bad? 16:57
16:58 apac left 17:11 tgt left, tgt joined, tgt left
librasteve_ notable6: weekly 17:12
notable6 librasteve_, 5 notes: gist.github.com/3dac00b2da8b76b97c...94c55d146c
librasteve_ notable6: weekly reset 17:14
notable6 librasteve_, Moved existing notes to ā€œweekly_2025-10-20T17:14:29Zā€
librasteve_ rakudoweekly.blog/2025/10/20/2025-...6-2025-10/ 17:41
timo2 bisectable6: releases CORE::say("hi") 17:54
bisectable6 timo2, Will bisect the whole range automagically because no endpoints were provided, hang tight
timo2, Output on all releases: gist.github.com/61e16f00c9486015d0...f7714f7200 17:55
timo2, More than 3 changes to bisect, please try a narrower range like old=2025.10 new=HEAD
timo2 i got the invocation of the bot wrong %) 17:56
bisectable6: help
bisectable6 timo2, Like this: bisectable6: old=2015.12 new=HEAD exit 1 if (^āˆž).grep({ last })[5] // 0 == 4 # See wiki for more examples: github.com/Raku/whateverable/wiki/Bisectable
SmokeMachine librasteve_: Logic::Ternary is a new module…
timo2 committable: releases CORE::say("hi") 17:57
committable6 timo2, gist.github.com/2bbf0181d59da5102e...e8aafe1ec0 17:58
timo2 not sure why, but putting a & in front of CORE and it works 17:59
committable: releases &CORE::say("hi")
committable6 timo2, ¦releases (94 commits): «hi␤» 18:00
18:45 abraxxa left 18:55 arkiuat left 19:09 arkiuat joined 19:15 mimosa left
librasteve SmokeMachine: my bad … fixing now 19:16
19:25 apac joined 20:13 arkiuat left 20:15 arkiuat joined 20:22 arkiuat left 20:47 apac left 20:49 arkiuat joined 20:53 arkiuat left 21:22 arkiuat joined 21:27 arkiuat left 21:55 arkiuat joined 22:00 arkiuat left 22:26 Sgeo joined 22:29 arkiuat joined 22:34 arkiuat left 22:56 arkiuat joined 23:00 Aedil left 23:01 arkiuat left