| [Coke] | welcome aboard | 00:00 | |
|
00:53
arkiuat left
00:58
deoac joined
01:09
arkiuat joined
|
|||
| korvo | Solved it! Humming-Bird::Core::listen() requires a :no-block argument in order to actually `start` concurrently. | 01:13 | |
| disbot7 | <aruniecrisps> @librasteve sure I can do that, what exactly are you looking for? | 02:28 | |
| <aruniecrisps> Or can it just be any snippet? | 02:30 | ||
|
02:36
kylese left
02:37
kylese joined
02:49
deoac left
|
|||
| disbot7 | <jubilatious1_98524> @aruniecrisps have you tried NFKD decomposition? docs.raku.org/routine/NFKD | 03:04 | |
|
03:07
deoac joined
03:15
kylese left,
kylese joined
03:28
itaipu left
03:44
itaipu joined
04:11
Aedil joined
04:13
cm left
04:15
deoac left
04:20
lichtkind_ joined
04:21
cm joined
04:23
lichtkind left
04:38
itaipu left
|
|||
| Voldenet | jubilatious1_98524: it's not a contradiction – to group things you need a container for the grouping (a scope) and another value that escapes that scope is the only one preserved | 05:16 | |
| disbot7 | <jubilatious1_98524> @Voldenet so what's the 'escape key'? | 05:17 | |
| Voldenet | 'escape key' hm? | 05:18 | |
| what do you mean | |||
| m: my $result = do { my $a = 1; my $b = 2; $a + $b }; say $result # this is the pattern - $result gets assigned, but $a and $b are not preserved | 05:19 | ||
| camelia | 3 | ||
| Voldenet | it can get a lot more complicated with FINALIZER module for instance | 05:20 | |
| disbot7 | <jubilatious1_98524> Have you posted this do { ... } idiom previously? I might have missed it. | 05:21 | |
| Voldenet | yes a while earlier, but without 'do' | ||
| disbot7 | <jubilatious1_98524> It doesn't seem exactly like the Rust code you posted, which talked about immutability of variables manipulated in that blog code-example. | 05:23 | |
| Voldenet | in C# there's `using(var x = new SomeIDisposableImpl()) { … }` for tracking IDisposable values | ||
| it's a bit similar to using do-block | |||
| where you can `my $item = do { using FINALIZER; my $x = FoosRepository.new(:conn(await $connections.connect()); $x.items.fetch(:id(42)); }; ` | 05:25 | ||
| disbot7 | <jubilatious1_98524> In my Raku one-liners, I use BEGIN blocks all the time: unix.stackexchange.com/search?q=us...7738+BEGIN | ||
| Voldenet | obviously rust is a different kind of language, but you can make things immutable by turning it into List on the end | 05:26 | |
| for example | |||
| disbot7 | <jubilatious1_98524> Here are some (other) examples with state variables: unix.stackexchange.com/search?q=us...7738+state | ||
| <jubilatious1_98524> So I thought a hypothetical {STATE .... } keyword would replicate what you wanted to bring over from Rust. | 05:28 | ||
| Voldenet | I agree that BEGIN blocks are very useful, I still do time things with `now - BEGIN now` :> | ||
| though I guess do-block is just something that's totally unnecessary | |||
| it hardly does anything | |||
| so using it in this context is just not very obvious | 05:29 | ||
| disbot7 | <jubilatious1_98524> (Never heard of FINALIZER before...). | ||
| Voldenet | very cool module, it's something that should be in stdlib, basically it implements the IDisposable (C#) AutoCloseable (java) or Drop (rust) patterns | 05:31 | |
| so instead of directly using DBIish, you'd use method attaching .dispose to current scope | 05:33 | ||
| disbot7 | <jubilatious1_98524> do blocks make for loops imperative, I'll use it instead of (complicated)map calls: unix.stackexchange.com/a/734258/227738 | 05:37 | |
| Voldenet | I use for loops if I plan for them to have side effects | 05:38 | |
| .map is for things without side effects | 05:39 | ||
|
05:39
[Coke] left
|
|||
| disbot7 | <jubilatious1_98524> As long as you assign outside the do for loop, there doesn't seem to be any difference from map. | 05:41 | |
|
05:42
[Coke] joined
|
|||
| Voldenet | m: say do for ^10 { $_ * 10 } # this feels a bit weird to write compared to `(^10).map({ $_ * 10 })` | 05:42 | |
| camelia | (0 10 20 30 40 50 60 70 80 90) | ||
| Voldenet | of course, in the end they're both equivalent in what they do, so it's only a matter of preference | 05:45 | |
| disbot7 | <jubilatious1_98524> m: my @a = 0..9; @a = do for @a { <a b c d e f g h i j>[ $_ ] }; .say for @a.pairs; | 05:48 | |
| <jubilatious1_98524> raku -e 'my @a = 0..9; @a = do for @a { <a b c d e f g h i j>[ $_ ] }; .say for @a.pairs;' 0 => a 1 => b 2 => c 3 => d 4 => e 5 => f 6 => g 7 => h 8 => i 9 => j | |||
|
05:48
arkiuat left
|
|||
| SmokeMachine | For making stuff immutable, one could also use something like this: raku.land/zef:FCO/ValueClass | 05:48 | |
| Or maybe something like these: raku.land/zef:FCO/Functional::LinkedList raku.land/zef:FCO/Functional::Queue or raku.land/zef:FCO/Functional::Stack | 05:50 | ||
| Voldenet | (it's not the same as in rust - in rust mutability will stop some optimizations and immutability could make them possible) | 05:51 | |
| rust is just very different | |||
| SmokeMachine | Sorry, I’m not comparing with rust… (I don’t know rust) | 05:52 | |
| Voldenet | I mean, language knows the concept of mutability | ||
| in raku, language will asume that ValueClass is mutable | 05:53 | ||
| the only thing preventing mutation is Proxy STORE dying | 05:54 | ||
|
06:18
arkiuat joined
06:23
arkiuat left
|
|||
| Voldenet | the above example doesn't need for btw | 06:27 | |
| m: my @a = 0..9; @a = do for @a { <a b c d e f g h i j>[ $_ ] }; .say for @a.pairs; # this | |||
| camelia | 0 => a 1 => b 2 => c 3 => d 4 => e 5 => f 6 => g 7 => h 8 => i 9 => j |
||
| Voldenet | m: my @a = <a b c d e f g h i j>[0..9]; .say for @a.pairs; | 06:28 | |
| camelia | 0 => a 1 => b 2 => c 3 => d 4 => e 5 => f 6 => g 7 => h 8 => i 9 => j |
||
| korvo | LangJam GameJam is done. I made a little S-expression language declaring an idle game and a friend wrote a little scenario. I'll have a blog post ready in a day or two. | ||
| Voldenet | m: my $a = 0; my $b = 1; say do for ^10 { my $n = $b + $a; $b = $a; $a = $n; $n } # this is something that totally wouldn't work with .map | 06:29 | |
| camelia | (1 1 2 3 5 8 13 21 34 55) | ||
|
06:52
arkiuat joined
06:57
arkiuat left
07:26
arkiuat joined
07:31
arkiuat left
|
|||
| disbot7 | <jubilatious1_98524> m: my $a = 0; my $b = 1; for ^10 { my $n = $b + $a; $b = $a; $a = $n; print "$n " }; put(); | 07:44 | |
| <jubilatious1_98524> raku -e 'my $a = 0; my $b = 1; for ^10 { my $n = $b + $a; $b = $a; $a = $n; print "$n " }; put(); ' 1 1 2 3 5 8 13 21 34 55 | 07:45 | ||
| <jubilatious1_98524> @Voldenet did you not just show that the code worked without map? | 07:46 | ||
|
08:00
arkiuat joined
08:05
arkiuat left
08:18
Aedil left
08:28
arkiuat joined
08:33
arkiuat left
08:41
Sgeo left
|
|||
| Voldenet | yes, maybe I mistyped, but from my understanding it might not work with map | 08:54 | |
| m: my $a = 0; my $b = 1; my $x = (^10).map({ my $n = $b + $a; $b = $a; $a = $n; $n }); say $x, $x | |||
| camelia | (1 1 2 3 5 8 13 21 34 55)(1 1 2 3 5 8 13 21 34 55) | ||
| Voldenet | Yes, it happens to work as expected, maybe it's even documented | ||
|
08:55
jjidozzz joined
|
|||
| Voldenet | but side effects feel wrong in such snippet – it might just work because initial sequence is ^10 or it might work for lists etc. | 08:56 | |
| It doesn't conceptually map values at all, so it might not work | 08:58 | ||
|
09:02
arkiuat joined
|
|||
| Voldenet | in all other languages such things may or might not work: dotnetfiddle.net/Widget/zNieq1 | 09:03 | |
|
09:07
arkiuat left
|
|||
| Voldenet | m: my $a = 0; my $b = 1; my $x = (1..*).race(:1batch).map({ my $n = $b + $a; sleep rand; $b = $a; sleep rand; $a = $n; $n }); say $x[^10] # just throwing in "race + sleep" makes it not work | 09:22 | |
| camelia | (1 1 1 2 1 1 3 3 3 4) | ||
|
09:29
arkiuat joined
09:34
arkiuat left
10:03
arkiuat joined
10:08
arkiuat left
10:23
arkiuat joined
10:30
Aedil joined
10:36
arkiuat left
10:48
arkiuat joined
10:54
arkiuat left
11:08
arkiuat joined
11:12
arkiuat left
11:26
arkiuat joined
11:35
arkiuat left
12:05
arkiuat joined
|
|||
| tbrowder | if you are interested in tonyo's help on DateTime formatters, check my code at github.com/tbrowder/LocalTime. Besides the published code you can see code based on tonyo's suggestion in the ./tools directory. if you can still search #raku look for tonyo / tbrowder/ formatter in 2022 novemberish | 12:07 | |
|
12:10
arkiuat left
12:12
Ekho left
|
|||
| tbrowder | also see tonyo's name in the file names and code in the ./dev directory | 12:13 | |
|
12:21
itaipu joined
12:25
jjidozzz left
12:31
arkiuat joined
12:34
melezhik joined
12:36
arkiuat left
|
|||
| lizmat | Q: what do you think was a noticeable new module in the Raku Ecosystem? (yes, you can mention your own :-) | 12:38 | |
|
12:46
sibl joined
12:47
arkiuat joined
12:50
sibl left
12:52
arkiuat left
13:11
arkiuat joined
13:16
arkiuat left
|
|||
| disbot7 | <antononcube> @lizmat How about 5 answers? | 13:26 | |
| lizmat | sure! | ||
| disbot7 | <antononcube> Agh, you are too gracious. I thought you might prompt me to reduce to 1, at most two. | ||
| lizmat | there's no guarantee I'll include all 5 :-) | 13:28 | |
| disbot7 | <antononcube> Hmm... this can be a motivation to provide ML supplied answers, across the whole ecosystem. | 13:29 | |
| <antononcube> Or, just using "plain" statistics. | 13:30 | ||
| lizmat | using "plain" statistics is not really an issue | 13:31 | |
| I'm more interested with what resonated in the community (rather than just with me) | |||
| disbot7 | <antononcube> First of all, I think simple metrics, like, frequencies of updates, number of lines, discussions on IRC, do not tell the whole picture. | 13:32 | |
| lizmat | indeed, they do not | ||
|
13:32
arkiuat joined
|
|||
| disbot7 | <antononcube> But, that can be used to support certain candidates -- post-selection. | 13:32 | |
| lizmat | take e.g. raku.land/zef:patrickb/Anolis | 13:33 | |
| just a simple module, 1 release so far, but I know how much work went in there to get to that point | |||
| disbot7 | <antononcube> Yes, I looked at/browsed the page but did not install it yet. | 13:34 | |
| lizmat | see also raku-advent.blog/2025/12/21/a-terminals-tale/ :-) | ||
| disbot7 | <antononcube> Just about to read it -- it was published "later" than I thought. | ||
| <antononcube> (Meaning, not at midnight UTC-0.) | |||
| lizmat | yeah, technically it was on time, just not easily found :-) | ||
| disbot7 | <antononcube> Agh, yeah -- some of my posts were like that too. | 13:35 | |
| <antononcube> Back to my statistics angle -- I was looking for an excuse to try and use "Draku" by Brian Duggan for those. | 13:36 | ||
| <antononcube> *those statistics. | 13:37 | ||
|
13:37
arkiuat left
13:42
itaipu left
13:45
arkiuat joined
13:52
arkiuat left
13:59
itaipu joined
|
|||
| disbot7 | <librasteve> lizmat: my top modules are Jupyter::Chatbook and FatRatStr (wot i rote) | 14:15 | |
| <librasteve> first because I use it every day and it has “taught me” LLM best practice prompt engineering, second because it demonstrates the usefulness Allomorphs and makes FatRat more practical | 14:17 | ||
|
14:18
arkiuat joined
|
|||
| disbot7 | <antononcube> @librasteve I think @lizmat said "new modules" which I interpret as "2025 modules." | 14:22 | |
| <antononcube> "Jupyter::Chatbook" is, of course, great, but it is also an "old" module. | 14:23 | ||
| <antononcube> And thanks for proposing it! | |||
|
14:53
melezhik left
|
|||
| tbrowder | i second the FatRatStr package--very allomorph helpful | 15:40 | |
| arkiuat | tbrowder: thanks for the info on DateTime :formatter. I still wish I could find those ruminations about the original design that I remember reading somewhere. | 15:45 | |
|
15:54
itaipu left
16:10
itaipu joined
16:24
melezhik joined
|
|||
| lizmat | librasteve you don't need sets to be able to use set operators! | 17:00 | |
| m: my @cities = <London Oslo Paris Amsterdam Berlin>; my @visited = <Berlin Oslo>; say "I still need to visit the following cities: " ~ (@cities (-) @visited); | |||
| camelia | I still need to visit the following cities: Paris London Amsterdam | ||
| lizmat | in response to news.ycombinator.com/item?id=46346132 | 17:02 | |
|
17:06
silug left
|
|||
| Geth | advent/main: d7804d25d0 | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | raku-advent-2025/authors.md Update an move review to the 25th |
17:08 | |
| lizmat | One slot in the Advent Calender opened up! | 17:09 | |
|
17:14
silug joined
17:42
[Coke] left,
[Coke] joined
17:48
arkiuat left
17:51
arkiuat joined
|
|||
| disbot7 | <jubilatious1_98524> m: my @cities = <London London Oslo Paris Amsterdam Berlin>; my @visited = <Berlin Oslo Oslo>; say "I still need to visit the following cities: " ~ (@cities (-) @visited); | 18:00 | |
| <jubilatious1_98524> raku -e 'my @cities = <London London Oslo Paris Amsterdam Berlin>; my @visited = <Berlin Oslo Oslo>; say "I still need to visit the following cities: " ~ (@cities (-) @visited);' I still need to visit the following cities: London Paris Amsterdam | |||
|
18:13
arkiuat left
18:28
arkiuat joined
|
|||
| grondilu got: '===> Failed to find dependencies: pq:ver<5>:from<native>' when trying to install Red (raku.land/zef:FCO/Red) | 19:05 | ||
| oh nevermind that's documented in the readme | 19:08 | ||
|
19:13
melezhik left
19:21
abraxxa-home joined
19:23
arkiuat left
19:28
arkiuat joined
19:33
arkiuat left
19:38
abraxxa-home left
19:42
arkiuat joined
19:44
Sgeo joined
19:54
Ekho joined
|
|||
| disbot7 | <librasteve> lizmat: ah - should have stringified - thanks! | 20:02 | |
| lizmat | librasteve also lose the .Set :-) | 20:03 | |
| disbot7 | <librasteve> holy moly - that's cool | ||
| lizmat | m: dd <a b c> (-) <a> | ||
| camelia | Bool = Set.new("c","b") | ||
| lizmat | m: dd ~<a b c> (-) <a> | 20:04 | |
| camelia | Bool = Set.new("a b c") | ||
| lizmat | m: dd ~(<a b c> (-) <a>) | ||
| camelia | "c b" | ||
| lizmat | set operators either produce a QuantHash, or a Bool | ||
| but the input doesn't have to be a QuantHash | 20:05 | ||
|
20:05
abraxxa-home joined
|
|||
| lizmat | m: dd <a b c> (elem) <a b c d e f> | 20:05 | |
| camelia | Bool::False | ||
| lizmat | m: dd "a" (elem) <a b c d e f> | ||
| camelia | Bool::True | ||
| lizmat | m: dd <a b c> (<) <a b c d e f> | ||
| camelia | Bool::True | ||
| lizmat | m: dd <a b g> (<) <a b c d e f> | 20:06 | |
| camelia | Bool::False | ||
| disbot7 | <librasteve> wonders how to retain the list order | ||
| lizmat | well... it doesn't as a Set is a QuantHash | ||
| disbot7 | <librasteve> just an idle wonder in case that's a requirement of "array math" ... didnt expect to get it from Set | 20:07 | |
| lizmat | m: my @c = <a b c d e f g>; my @s = <a e>; dd (@c (-) @s){@c}:k | 20:08 | |
| camelia | ("b", "c", "d", "f", "g") | ||
| lizmat | that would keep the order | 20:09 | |
| disbot7 | <librasteve> .oO - very glad I asked that is awesome | 20:11 | |
| <librasteve> betcha can't do that in Ruby | |||
| lizmat | :-) | 20:12 | |
| disbot7 | <librasteve> finally groks index adverbs (about time) | 20:16 | |
| <antononcube> @lizmat "One slot in the Advent Calender opened up!" -- fairly late notice... | 20:37 | ||
|
21:38
Aedil left
21:39
abraxxa-home left
|
|||
| tonyo | . | 21:55 | |
| whew, glad it was a mention from tbrowder and not something with the eco ;) | 21:56 | ||