|
01:22
itaipu left
01:27
itaipu joined
01:37
Aedil joined
01:43
oodani left
01:48
oodani joined
02:02
guifa joined
|
|||
| Voldenet | that new LogicTernary is nice, but `True3 Unknown3 False3` would be better defaults | 03:41 | |
| so all things exported by ternary contains 3, it's very obvious | |||
| it's just my opinion though | 03:42 | ||
| I've been struggling with "5 types of enum with the same name" a lot | |||
| in fact, in C# I've been struggling with enums with exactly the same but different namespaces | 03:46 | ||
| the same name* | |||
| though that's inevitable | 03:47 | ||
|
04:02
mimosa joined
04:03
guifa left
|
|||
| jubilatious1_98524 | tri-True, tri-False, tri-Unknown ?? | 04:40 | |
|
05:24
Aedil left
05:25
Aedil joined
|
|||
| Voldenet | just postfix 3 is a bit easier to type, tri-* would be noisy | 05:33 | |
|
05:49
abraxxa joined
05:56
abraxxa left
05:58
abraxxa joined
06:19
Sgeo left
06:20
Aedil left
06:24
Aedil joined
07:13
apac joined
07:41
arkiuat joined,
dakkar joined
|
|||
| arkiuat | I also wouldn't mind if True3/Unknown3/False3 were exported by default. | 07:42 | |
| now that I've thought it over some more | |||
|
07:45
melezhik joined
07:50
lizmat left
08:06
arkiuat left
|
|||
| librasteve | o/ | 08:07 | |
| is ,= supposed to work? | 08:08 | ||
| Voldenet | but it works, doesn't it | 08:09 | |
| m: my $x = 4; $x ,= 5; say $x | |||
| camelia | (\List_6095617942944 = (List_6095617942944 5)) | ||
| librasteve_ | m: my @numbers = 1, 2, 3; say @numbers ,= 4, 5; | ||
| camelia | (\Array_3301976132616 = [Array_3301976132616 (4 5)]) | ||
| librasteve_ | yeah that seems like a bug to me | ||
| Voldenet | m: my @numbers = 1, 2, 3; say @numbers = @numbers, (4, 5); | 08:10 | |
| camelia | (\Array_3427642784496 = [Array_3427642784496 (4 5)]) | ||
| Voldenet | the output is exactly the same though | ||
| librasteve_ | I excpet the outcome to be [1,2,3,4,5] | 08:11 | |
| for both | |||
|
08:11
arkiuat joined
|
|||
| Voldenet | m: my @numbers = 1, 2, 3; say @numbers = |@numbers, (4, 5); # like this? | 08:12 | |
| camelia | [1 2 3 (4 5)] | ||
| Voldenet | but having this would prevent you from constructing list of lists | 08:13 | |
| librasteve_ | no | ||
| m: my %a = :11a, :22b; %a ,= :33x; say %a; | |||
| camelia | {a => 11, b => 22, x => 33} | ||
| librasteve_ | well it works for Hashs | ||
| but not for Lists or Arrays | |||
| docs.raku.org/language/operators#postfix_,= | 08:14 | ||
| SmokeMachine | m: my @numbers = 1, 2, 3; say @numbers = |@numbers, |(4, 5) | 08:15 | |
| camelia | [1 2 3 4 5] | ||
|
08:16
arkiuat left
|
|||
| Voldenet | m: my @numbers = 1, 2, 3; say @numbers .= append: 4, 5 | 08:16 | |
| camelia | [1 2 3 4 5] | ||
| SmokeMachine | m: my @numbers = 1, 2, 3; say @numbers ,= |(4, 5); say @numbers | 08:17 | |
| camelia | (\Array_5838662526592 = [Array_5838662526592 4 5]) (\Array_5838662526592 = [Array_5838662526592 4 5]) |
||
| Voldenet | you'd need to somehow slip the @numbers into numbers | 08:20 | |
| iirc there's more differences between Hash/Array - like .Hash doesn't clone but .Array does for example | 08:21 | ||
| librasteve_ | but it works with Hash … so seems like a bug to me | ||
| Voldenet | I'm not even sure if they should work the same | ||
| librasteve_ | my point is that the intent is the same with Hash and List and Array | ||
| Voldenet | however, it'd require changing how , operator behaves | 08:22 | |
| and it sounds dangerous | |||
| because suddenly @c = (@a, @b) would autoslip its arguments | 08:23 | ||
| librasteve_ | ok - lets say we keep it how it is - please give me an example to show how it works with Array (the most obvious situation) that does involve say dumping the Array_ident | ||
| s/does/doesn’t/ | |||
| i’m synpathetic that this | 08:24 | ||
| Voldenet | though I agree that the result with @c = (@c, @b) is a bit weird and I am not sure what it'd be useful for | ||
| librasteve_ | say (%(:a(0)), %(:b(1))) | 08:25 | |
| evalable6 | ({a => 0} {b => 1}) | ||
| Voldenet | but the , op doesn't know if it's invoked with syntax `@c = (@c, @b)` or `@c ,= @b`, does it? | 08:26 | |
| librasteve_ | what i mean to say is that Im sympathetic that `,`works differently with Hash than Array (ie no slip stuff) | ||
|
08:26
melezhik_ joined
|
|||
| Voldenet | Not really - in hash case first value doesn't contain any key at all | 08:27 | |
| in array case first values doesn't need any index | |||
| librasteve_ | sorry not explaining myself very well - snippet coming | ||
| Voldenet | I mean, in hash case `%x = (%x, :34x)` pretty obviously doesn't ask hash to nest hash as its value | 08:28 | |
| m: my %x = :33y; %x = (%x, :34z); say %x # obvious | 08:29 | ||
| camelia | {y => 33, z => 34} | ||
| Voldenet | m: my %x = :33y; %x = (:%x, :34z); say %x # also obvious, similar to list case | ||
| camelia | (\Hash_4498526920320 = {x => Hash_4498526920320, z => 34}) | ||
| Voldenet | the problem with , is that it is always used to construct new list | 08:30 | |
| and all the operands are elements of the new list | |||
|
08:35
arkiuat joined
|
|||
| librasteve_ | ok I guess I get it … missed opportunity imo … but I’m not gonna ask to redefine the language | 08:37 | |
| Voldenet | yeah, I think it would've been better if list construction needed first array as item | 08:38 | |
| e.g @c = (\@c, @b) | |||
| it'd solve this particular case and prevent this :( | 08:39 | ||
|
08:40
arkiuat left
|
|||
| Voldenet | in fact, I'd do @numbers.push: 4, 5 | 08:40 | |
| not as short, but not lengthy either | |||
|
08:45
melezhik_ left
09:06
arkiuat joined
09:10
arkiuat left
|
|||
| librasteve | changing the subject - the docs say that prefix // is a thing in v6 | 09:11 | |
| docs.raku.org/language/operators#prefix_// | |||
| but I cannot get it to work - probably I am holding it wrong - can someone show me an example | |||
| please? | 09:12 | ||
| ab5tract | m: use v6.*; dd //Nil | 09:13 | |
| camelia | Bool::False | ||
| ab5tract | m: use v6.*; dd //1 | ||
| camelia | Bool::True | ||
| ab5tract | m: use v6.*; dd //0 | ||
| camelia | Bool::True | ||
| ab5tract | seems like it's workin? | ||
| librasteve | oh - my bad - thanks for the help! | 09:14 | |
| ab5tract | cheers :) | 09:26 | |
|
09:40
arkiuat joined
09:45
arkiuat left
|
|||
| jubilatious1_98524 | @librasteve I believe @Nemokosh posted a Github Issue on,= ? I can't find it atm. | 09:49 | |
| @librasteve Here are Raku-Study-Group notes on ,= : github.com/doomvox/raku-study/blob...nt.raku#L8 | 09:51 | ||
| More notes on ,= from Raku-Study-Group: github.com/search?q=repo%3Adoomvox...;type=code | 09:54 | ||
| Looks like ,= has been under discussion since 2020, on the mailing list: www.nntp.perl.org/group/perl.perl6...g9384.html | 09:55 | ||
|
10:04
arkiuat joined
10:09
arkiuat left
|
|||
| Voldenet | if anything, "Hash" is more convenient and harder to explain :P | 10:38 | |
|
10:38
arkiuat joined
10:43
arkiuat left
|
|||
| jubilatious1_98524 | @Voldenet What would a newbie need to know, in order to move forward with the language? | 11:01 | |
|
11:05
melezhik left
11:06
arkiuat joined,
patrickb left,
cpli left,
atweedie left,
thatonelutenist left,
greenfork left
11:11
arkiuat left
|
|||
| SmokeMachine | Voldenet: I like the default to "override" the logic. But your argument of all exports have 3... what is your other people's opinion? | 11:23 | |
|
11:25
kylese joined
11:33
Ekho left
11:34
melezhik joined
11:37
librasteve_ left
11:38
arkiuat joined
11:45
arkiuat left
11:48
lizmat joined
11:50
apac left
|
|||
| Voldenet | SmokeMachine: the overriding kinda works, but you have to remember to use it, I like KnownTrue, KnownFalse and Unknown for being very obvious, but "just add 3 to everything if you need ternary" makes this very obvious | 11:50 | |
| I mean, you have to read the manual to understand what True3 does | |||
| it's not obvious… | |||
| but once you do, every single thing just having '3' postfix is sane | 11:51 | ||
| and immediately visible when you read the code | |||
|
11:56
lizmat left
|
|||
| Voldenet | jubilatious1_98524: If I had to put it into words - arrays/lists are stricter - .Array always copies, ,= will nest. On the other hand .Hash only coerces (not copies) and ,= doesn't nest things | 11:58 | |
| and also this behavior is container-dependant | 12:00 | ||
| m: my %l = :1a; %l ,= :2b; say %l # understandable | |||
| camelia | {a => 1, b => 2} | ||
| Voldenet | m: my $l = :1a; $l ,= :2b; say $l # uhhhh??? | ||
| camelia | (\List_4530704967216 = (List_4530704967216 b => 2)) | ||
| Voldenet | well in that case :1a is just a pair, so to make sure | 12:02 | |
| m: my $l = (:1a).Hash; $l ,= :1b; say $l | |||
| camelia | (\List_4517452484112 = (List_4517452484112 b => 1)) | ||
| SmokeMachine | m: my $l = %(:1a); $l ,= :2b; say $l | ||
| camelia | (\List_4613851695696 = (List_4613851695696 b => 2)) | ||
| Voldenet | It's… surprising if you don't know ¯\_(ツ)_/¯ | ||
| SmokeMachine | m: my $l = %(:1a); %($l) ,= :2b; say $l | 12:06 | |
| camelia | {a => 1, b => 2} | ||
| SmokeMachine | m: my $l = :1a; %($l) ,= :2b; say $l | ||
| camelia | a => 1 | ||
| jubilatious1_98524 | @SmokeMachine overriding logic is difficult without some way to introspect which logic is being followed. | ||
|
12:07
arkiuat joined
|
|||
| SmokeMachine | you can just `dd True` and see if it prints Bool::True or Logic::Ternary::True | 12:07 | |
| or `True ~~ Logic::Ternary`... | 12:09 | ||
| jubilatious1_98524: | |||
| jubilatious1_98524: ☝️ | |||
|
12:11
arkiuat left
|
|||
| jubilatious1_98524 | @SmokeMachine The R programming language uses TRUE, FALSE, and NA. Maybe you could try True-na, False-na, and NA. | 12:11 | |
| (@SmokeMachine:I don't understand the distinction between Unknown and Nil here. If there is no distinction then Nil is probably better). | 12:13 | ||
| SmokeMachine | why na? and now you can use whatever you want, you can just do `use Logic::Ternary <True-na NA False-na>` and it will work the way you want | ||
| jubilatious1_98524 | That sounds pretty cool. | 12:14 | |
| SmokeMachine | usercontent.irccloud-cdn.com/file/.../image.png | 12:19 | |
|
12:19
atweedie joined,
thatonelutenist joined,
greenfork joined,
patrickb joined,
cpli joined
12:25
Ekho joined
12:27
lizmat joined
12:28
lizmat_ joined,
lizmat left
12:29
lizmat_ left
12:36
apac joined
12:38
arkiuat joined
12:42
arkiuat left
12:45
rba left
12:52
lichtkind joined
13:00
rba joined
13:06
arkiuat joined
13:10
apa_c joined,
arkiuat left
13:11
apac left
13:15
lizmat joined
13:16
lizmat left,
lizmat_ joined
13:19
lizmat_ left
|
|||
| SmokeMachine | Sorry, I forgot to post it here, the way you want: usercontent.irccloud-cdn.com/file/.../image.png | 13:21 | |
| jubilatious1_98524: ☝️ | |||
|
13:32
librasteve_ joined
|
|||
| librasteve | @jubilatious1_98524 - I see a bunch of discussion on ,= and I was surprised it dwims on Hashs but not Arrays & Lists ... but it's not clear to me what the "ask" is ... I would say to change the logic of , - well that ship has sailed. | 13:37 | |
|
13:39
arkiuat joined
13:45
arkiuat left
|
|||
| SmokeMachine | for Lists it shouldn't work, right? Once Lists are "immutable"... | 13:45 | |
| Voldenet | well it depends, do you like lisp? :> | 13:47 | |
|
13:48
andinus2 left
|
|||
| SmokeMachine | just saw it... my last Ternary related image looks buggy... | 13:48 | |
| Voldenet | huh | 13:52 | |
| it looks correct with the last zef version: `use Logic::Ternary <True-na NA False-na>; say True-na or3 NA` `True-na` | 13:53 | ||
|
13:53
andinus joined
|
|||
| SmokeMachine | that might be a change I've done after releasing it... thanks | 13:54 | |
|
13:55
arkiuat joined,
melezhik left
13:59
arkiuat left
14:00
arkiuat joined
14:04
arkiuat left
14:10
apa_c left
14:12
melezhik_ joined
|
|||
| jubilatious1_98524 | Sorry, or3 just looks wrong to me... . | 14:13 | |
| ...but maybe there's no way to use/extend standard and , or. | 14:18 | ||
| SmokeMachine | jubilatious1_98524: the return for `or3` on the image I shared is a bug I created only here locally. As Voldenet shared and I confirmed locally with the released version, `or3` looks correct: `use Logic::Ternary <True-na NA False-na>; say True-na or3 NA` returns `True-na`. | 14:28 | |
| usercontent.irccloud-cdn.com/file/.../image.png | 14:29 | ||
|
14:30
arkiuat joined
|
|||
| SmokeMachine | usercontent.irccloud-cdn.com/file/.../image.png | 14:30 | |
|
14:34
arkiuat left
|
|||
| jubilatious1_98524 | @SmokeMachine I'd just rather see or there... . | 14:38 | |
| SmokeMachine | jubilatious1_98524: Sorry, what do you mean? | 14:39 | |
|
14:48
melezhik_ left,
melezhik_ joined
14:52
arkiuat joined
14:57
cwiggins123 joined
14:58
arkiuat left
|
|||
| cwiggins123 | hi everyone, new to raku here. planning on making a full system install script for krak3n.my with raku for gigglez. wish me luck | 15:03 | |
| [Coke] | good luck. | 15:07 | |
|
15:15
oodani left
15:16
arkiuat joined
|
|||
| SmokeMachine | cwiggins123: maybe something like this could help you? github.com/FCO/Configuration | 15:18 | |
|
15:18
oodani joined
|
|||
| cwiggins123 | oh wow I've never seen that before. thanks | 15:23 | |
|
15:26
apa_c joined
|
|||
| cwiggins123 | yeah so basically I would need to boostrap perl and then raku with a posix script and then do the rest in raku | 15:27 | |
| this configuratino module looks interesting | |||
|
15:41
melezhik_ left
15:45
cwiggins123 left
15:46
cwiggins123 joined
|
|||
| Voldenet | jubilatious1_98524: or3 vs or is very similar to == vs cmp - semantic difference is very useful here, because if you forget to use module, you're going to get errors and not wrong results at runtime | 15:48 | |
| [Coke] | wonder if there's a way to say "which module in the ecosystem has the most dependencies (including transitive) | 15:50 | |
|
15:56
melezhik_ joined
16:01
melezhik_ left
16:02
melezhik_ joined
16:11
apa_c left
16:18
timo2 is now known as timo
|
|||
| [Coke] | m: my $x = Nil; say //$x ?? 'yo' !! 'no'; # try without... | 16:22 | |
| camelia | ===SORRY!=== Error while compiling <tmp> Null regex not allowed. Please use .comb if you wanted to produce a sequence of characters from a string. at <tmp>:1 ------> my $x = Nil; say //<HERE>$x ?? 'yo' !! 'no'; # try without... |
||
|
16:24
melezhik_ left,
melezhik_ joined
16:27
melezhik_ left
|
|||
| ugexe | [Coke]: you could probably code up such a query fairly easy by putting something like github.com/ugexe/zef/blob/2c6ab9ff...od#L41-L43 in a loop | 16:28 | |
|
16:28
melezhik_ joined
|
|||
| ugexe | be recording @dependencies-candidates.elems for each module | 16:29 | |
| [Coke] | Thanks | ||
|
16:35
dakkar left
16:37
melezhik_ left,
melezhik_ joined
17:00
cwiggins123 left
17:07
melezhik_ left,
melezhik_ joined
17:13
melezhik_ left
17:14
melezhik_ joined
17:19
arkiuat left
17:21
melezhik_ left,
melezhik_ joined
17:24
melezhik_ left
17:27
arkiuat joined
17:33
arkiuat left
17:39
melezhik_ joined
17:46
mimosa left
17:48
melezhik_ left
17:50
kylese left
17:51
melezhik_ joined
17:59
melezhik_ left,
melezhik_ joined
18:03
arkiuat joined
18:08
arkiuat left
18:15
melezhik_ left
18:16
melezhik_ joined
18:21
melezhik_ left,
melezhik_ joined
18:26
melezhik_ left
18:27
melezhik_ joined
18:32
melezhik_ left,
melezhik_ joined
18:34
andinus left
18:36
andinus joined
18:38
melezhik_ left,
melezhik_ joined,
arkiuat joined
18:45
melezhik_ left,
melezhik_ joined
18:52
melezhik_ left,
melezhik_ joined
18:57
melezhik_ left,
melezhik_ joined
|
|||
| thowe | does anyone know what time zone libresteve might be in? | 18:58 | |
|
19:02
melezhik_ left
|
|||
| librasteve | hi i’m in the UK | 19:06 | |
| that’s UTC+1 (8pm) right now | 19:08 | ||
|
19:10
apa_c joined
|
|||
| [Coke] | m: use v6.*; my $x = Nil; say //$x ?? 'yo' !! 'no'; | 19:30 | |
| camelia | no | ||
| [Coke] | librasteve_: ^^ | ||
| m: use v6.e.PREVIEW; my $x = Nil; say //$x ?? 'yo' !! 'no'; | 19:33 | ||
| camelia | no | ||
| [Coke] | m: use v6.d; my $x = Nil; say //$x ?? 'yo' !! 'no'; | ||
| camelia | ===SORRY!=== Error while compiling <tmp> Null regex not allowed. Please use .comb if you wanted to produce a sequence of characters from a string. at <tmp>:1 ------> use v6.d; my $x = Nil; say //<HERE>$x ?? 'yo' !! 'no'; |
||
| librasteve | ha - now I try in vi on my local machine it works too! must have been something wrong in my incantation to summon v6.e | 19:34 | |
| glad to see it is working! | 19:35 | ||
|
20:03
orangebot joined
20:23
orangebot left
|
|||
| thowe | libresteve, OK. the address parsing thing has come back around to my radar and I have gone down a bit of a rabbit hole with it. In the US there is some new data formats being adopted as part of the NG 911 initiative. Maybe we can chat sometime about it... Actually awaiting some info from Oregon state about a thing. Anyway. | 20:46 | |
| I may have a need to do some tooling for my GIS stuff. If so, that will involve a lot of different states. | 20:47 | ||
| librasteve_ | thowe: cool - my general idea is that Raku could benefit from an address parser that works at scale using Grammars … and since Grammars are classes, then we can start with a very general one and then override specifics to accord with country / state / language specific conventions | 20:50 | |
| I kinda started to sketch this out with github.com/librasteve/raku-Contact/tree/main | 20:51 | ||
| please can you take a look and see if your general approach would align with that? - perhaps the code you already worked on would be a more robust version of that? | 20:53 | ||
| sorry … I am turning in for the night, but feel free to start a discussion (eg as an issue on that repo…) - maybe you can also point me to the code you have already | 20:54 | ||
| &afk for now | |||
| thowe | Yeah. A Grammar is what I am after... It may need some additional bells and whistles. I doubt my code will be the base, but maybe can help inform requirements. I'm a barely functional hobbyist. | 20:58 | |
|
20:58
arkiuat left
20:59
apa_c left
21:10
arkiuat joined
21:15
arkiuat left
21:16
arkiuat joined
21:50
oodani left,
oodani joined
22:08
Sgeo joined
22:25
Voldenet left
22:27
Voldenet joined
22:33
lichtkind left
22:36
arkiuat left
22:40
lizmat joined,
lizmat left
22:49
arkiuat joined
22:53
arkiuat left
22:56
Aedil left
23:14
arkiuat joined
23:27
Guest10 joined
23:53
Guest10 left
|
|||