|
00:34
BinGOs left,
bingos joined
00:35
bingos is now known as BinGOs
00:36
leont left,
leont joined
00:37
maylay left
00:40
maylay joined
00:45
maylay left
00:47
maylay joined
00:51
[Coke] left
00:53
maylay left
00:58
maylay joined
01:19
maylay left
01:26
maylay joined
01:32
sftp left
01:33
sftp joined,
sftp left,
sftp joined
01:43
maylay left
01:45
maylay joined
|
|||
| refactus | samebchase: so since you were going to try under openbsd, I figured I'd try netbsd on a vm for more coverage. moar build fails for me at the 3rd party zmji lib. do you encounter that on openbsd also? spent some time poking at zmji even though I don't know c or c++, got it to build eventually but fails a test related to my hamfisted changes, that's where I'm probably stopping for tonight | 01:45 | |
|
01:57
maylay left
01:59
maylay joined
02:06
maylay left
02:13
maylay joined
02:14
hulk joined
02:15
kylese left
02:27
maylay left
02:29
maylay joined
02:39
maylay left
02:44
maylay joined
02:48
[Coke] joined
03:02
maylay left
03:12
maylay joined
03:15
hulk left,
kylese joined
03:16
maylay left
03:17
maylay joined
03:27
maylay left
03:29
maylay joined
03:47
leifgunnar left,
leifgunnar joined
03:49
maylay left
03:53
maylay joined
03:57
lizmat_ joined
04:00
lizmat left
04:33
maylay left
04:38
maylay joined
04:48
maylay left
04:52
maylay joined
05:14
[Coke] left
05:31
disbot5 left,
maylay left,
disbot6 joined
05:40
maylay joined
06:03
maylay left
06:10
vasko45355861699 joined
06:15
maylay joined
06:33
maylay left
06:34
maylay joined
06:39
maylay left
06:42
maylay joined
06:53
maylay left,
Sgeo left
06:57
maylay joined
07:04
maylay left,
maylay joined
|
|||
| japhb | BSD folks: What are the BSD variants and versions you would like in our CI? We of course can use any of the ones that GitHub Actions supports natively, and some time back someone added DragonflyBSD for MoarVM using vmactions.org/ , but we don't have any others yet. Any that y'all would volunteer to port our CI to? | 07:07 | |
| (We don't have infinite CI compute, so we'd prefer to use the root of any major families where we can, assuming like the Debian family that features and packages tend to more-or-less flow from the root out over time.) | 07:09 | ||
|
07:11
maylay left,
[Coke] joined
07:13
maylay joined
07:21
luxi joined
07:22
maylay left
07:27
maylay joined
07:37
maylay left
07:40
maylay joined
07:58
mahlay joined
08:00
maylay left
08:09
mahlay left
08:13
maylay joined
08:18
maylay left
08:19
jrjsmrtn left,
jrjsmrtn joined
08:25
maylay joined
08:35
simcop2387 left
08:36
simcop2387 joined
08:50
dakkar joined
09:01
swaggboi left,
swaggboi joined
09:03
maylay left
09:06
maylay joined
09:19
mtj left
09:21
lizmat_ left,
lizmat joined
09:39
maylay left
09:42
mtj joined
09:43
maylay joined
09:58
maylay left,
maylay joined
11:03
maylay left
11:04
maylay joined
11:12
maylay left
11:13
maylay joined
|
|||
| refactus | japhb: personally I'm looking at moving my server to either netbsd or openbsd. freebsd is the most popular desktop bsd afaik. openbsd probably most popular for server use. netbsd is having a resurgence (hit like 250% of their funding goal this year) because they're actively anti-ai. dragonfly is quite niche even for a bsd | 11:19 | |
|
11:20
maylay left
|
|||
| refactus | I am not an experienced bsd user, but those are my general impressions. if you need something ported, not sure I'd be qualified but I do know how to spend a few hours/days looking up errors and reading docs and stackoverflow until I get something to work :) | 11:23 | |
|
11:23
maylay joined
11:36
maylay left
11:45
maylay joined
11:52
maylay left
11:54
maylay joined
12:32
maylay left
12:33
maylay joined
12:38
maylay left
12:44
maylay joined
13:24
mahlay joined
13:25
maylay left
14:16
mahlay left
14:18
maylay joined
|
|||
| Geth | raku-mode: 8d00a6a1a5 | (Donald Hunter)++ | raku-font-lock.el Add highlighting for regex, rule, token Add a face and an entry in the font lock keywords to highlight the regex, rule and token symbols. |
15:09 | |
| raku-mode: 4e6d5625bf | Faye++ (committed using GitHub Web editor) | raku-font-lock.el Merge pull request #64 from donaldh/font-lock-fix Add highlighting for regex, rule, token |
|||
| refactus | netbsd experiments: current moar doesn't compile, there are a couple issues in the zmij lib we bumped around or after 2026.08. 2026.07 compiles but doesn't link, probably just need some flag or path or something passed if I had to guess because the function it complains about does exist in netbsd. 2026.02 is still broken at linking but 2025.02 does build and install and run. haven't tried roast on it | 15:12 | |
| those aren't specific bisections, just the only versions I tried so far | 15:13 | ||
| lizmat | refactus: please make a MoarVM issue for the zmij lib ones | ||
| perhaps that would need to be fixed upstream | 15:14 | ||
| refactus | yeah I was thinking about an issue to zmij more than moar | ||
| lizmat | that would work as well :-) | ||
| refactus | pulling it directly and building on netbsd fails the same way. they have an open issue already for openbsd which addresses almost all of the issues I encountered on netbsd | 15:15 | |
| lizmat | good to hear it's on the radar | ||
| refactus | hopefully. no response so far but it's only been up for a week | 15:21 | |
|
15:28
Sgeo joined
16:38
human-blip left
16:39
human-blip joined
16:40
maylay left
16:41
maylay joined
16:43
stanrifkin joined
17:01
maylay left
17:05
maylay joined
17:15
maylay left
17:20
maylay joined
17:30
Aedil left
17:32
dakkar left
17:42
Aedil joined
17:46
El_Che left,
El_Che joined
17:57
maylay left,
mahlay joined
18:07
mahlay left
18:14
maylay joined
18:25
maylay left
18:26
maylay joined
18:29
notna joined,
notna left
18:40
stanrifkin left
18:54
abraxxa joined
18:56
abraxxa left
18:57
abraxxa joined
19:04
maylay left
19:06
maylay joined
|
|||
| disbot6 | <beato3> Hello everyone, I'm new to Raku. I was looking at lizmat's App::Rak to learn from it, and I'm confused about some things | 19:29 | |
| <beato3> my $reading-from-stdin := !$*IN.t; my $writing-to-stdout := $*OUT.t; my $writing-to-stderr := $*ERR.t; Why bind here, rather than a normal assignment? I would've guessed it's to alias in case the runtime somehow mutates those values, but that's not applicable since t is a method | 19:31 | ||
| lizmat | eh,.. if you're starting with Raku, I wouldn't recommend starting with App::Rak | ||
| I generally bind to variables if they're supposed to be immutable in that scope | 19:32 | ||
| disbot6 | <beato3> Ahh I see, and I guess constant is not applicable since it's compile-time | ||
| lizmat | I think you meant: is not compile time | 19:33 | |
| in that case, yes | |||
| disbot6 | <beato3> I mean that constant is evaluated at compile time | ||
| lizmat | but: that's a purely personal style choice | ||
| ok, yes, gotcha :-) | |||
| disbot6 | <beato3> Hmm, but I see you do mutate reading-from-stdin at line 539 | 19:34 | |
| <beato3> Or re-assign, effectively the same thing anyway here I think | |||
| <beato3> Err... re-bind | 19:35 | ||
| lizmat | well,, I also program a lot in NQP, and that doesn't know assignment, so sometimes it sorta bleeds into Raku for me | ||
| and using binding is also a nano-opt: saves one Scalar object creation :-) | 19:36 | ||
| but that's really nano :-) | |||
| so I guess in App::Rak I could have used assignment, indeed | |||
| disbot6 | <beato3> What's a good codebase to learn from? I don't particularly care to see something familiar (coming from Perl 5), just something that reflects what's idiomatic | ||
| <beato3> I'd prefer if it exposes me to a lot of the Raku features actually | 19:37 | ||
| Voldenet | I think people have so much different code styles that there's not one style to use | 19:38 | |
| lizmat | if you're coming from Perl, there's dev.to/lizmat/migrating-perl-to-raku-1c47 | ||
| also, github.com/lizmat/SBOM-CycloneDX/ is my biggest Raku project code-wise, using a lot of features :-) | 19:43 | ||
| disbot6 | <beato3> Thank you, I'll look at those | 19:46 | |
| <beato3> I've another question. What's the point of dynamic variables? | |||
| <beato3> I would think they are not very useful with the presence of temp | |||
| lizmat | they are *very* useful, and they're not anything like temp | 19:47 | |
| m: sub a() { dd $*FOO }; { my $*FOO = "foo"; a } | 19:48 | ||
| camelia | $*FOO = "foo" | ||
| lizmat | m: sub a() { dd $*FOO }; { my $*FOO = "foo"; a }; a | ||
| camelia | $*FOO = "foo" Failure.new(exception => X::Dynamic::NotFound.new(name => "\$*FOO")) |
||
| lizmat | they're like super globals, but scoped by the stack | 19:49 | |
| disbot6 | <beato3> Yeah I understand what they do I'm just not sure why they'd be useful. Wouldn't it also work here to declare our $FOO or such and then temp $FOO = "whatever" when needed? | 19:50 | |
| lizmat | note that the dynvar would not need to be declared in the same file / compunit :-) | 19:51 | |
| see e.g. raku.land/zef:lizmat/Trap | 19:52 | ||
| disbot6 | <beato3> Can you elaborate please? | 19:55 | |
| Voldenet | dynvars are necessary or useful when you need to pass variables around the code that doesn't let you pass variables | 19:59 | |
| for example see raku.land/cpan:FCO/Red | |||
| `my $*RED-DB = database "SQLite"; | |||
| this lets you not pass the config to every single operation, but it's not a global | 20:00 | ||
| the problem is, if any module also uses `$*RED-DB`, they would collide with each other | |||
| disbot6 | <beato3> This is also solved with temp is it not? | 20:02 | |
| <beato3> RED can declare our $RED-DB | |||
| <beato3> And that'd solve the issue of collisions | |||
|
20:04
iwuvmika_ joined,
iwuvmika left
|
|||
| lizmat | our would make it visible to the outside world, dynamic variables are only visible on the stack | 20:05 | |
| disbot6 | <beato3> Well it is a symbol that is part of the interface, declaring that using our is cleaner than keeping it hidden I would think | 20:06 | |
| lizmat | dynvars are only symbols in the scope where they're defined | 20:08 | |
| clients of a dynvar don't need to know where they live, just that they can be found on the stack, and act differently if not found | |||
|
20:08
iwuvmika_ is now known as iwuvmika
|
|||
| lizmat | m: with $*FOO -> $foo { "FOO is $foo } else { say "FOO not found" } | 20:09 | |
| camelia | ===SORRY!=== Error while compiling <tmp> Unable to parse expression in double quotes; couldn't find final '"' (corresponding starter was at line 1) at <tmp>:1 ------> O is $foo } else { say "FOO not found" }<HERE><EOL> |
||
| Voldenet | temp doesn't quite do the same thing as it operates on global variable | ||
| lizmat | m: with $*FOO -> $foo { "FOO is $foo" } else { say "FOO not found" } | ||
| camelia | WARNINGS for <tmp>: FOO not found Useless use of "FOO is $foo" in expression "FOO is $foo" in sink context (line 1) |
||
| Voldenet | m: my $tenant = "unknown"; sub log-tenant { say "using tenant $tenant" }; sub do-request($t) { temp $tenant = $t; sleep 1; log-tenant; }; await <foo bar>.map({ start do-request $_ }); | ||
| camelia | using tenant bar using tenant unknown |
||
| lizmat | m: with $*FOO -> $foo { say "FOO is $foo" } else { say "FOO not found" } | 20:10 | |
| camelia | FOO not found | ||
| Voldenet | for dynamic vars, every call gets its own context | ||
| m: my $*tenant = "unknown"; sub log-tenant { say "using tenant $*tenant" }; sub do-request($t) { my $*tenant = $t; sleep 1; log-tenant; }; await <foo bar>.map({ start do-request $_ }); | |||
| camelia | using tenant foo using tenant bar |
||
| lizmat | m: my $FOO = "bar"; with $*FOO -> $foo { say "FOO is $foo" } else { say "FOO not found" } | ||
| camelia | FOO not found | ||
| lizmat | m: my $*FOO = "bar"; with $*FOO -> $foo { say "FOO is $foo" } else { say "FOO not found" } | ||
| camelia | FOO is bar | ||
| SmokeMachine | On Red, you can have multiple connections, so one can: `red-do :with<a-connection>, { ok $*RED-DB, āhere it is setā }` | ||
| lizmat needs to go afk& | |||
|
20:12
belluzj joined
20:16
maylay left
|
|||
| Voldenet | in practice, you could avoid dynamic variables and pass a big hash `%context` with the same stuff and clone the context on mutation, but dynvars are just a lot nicer syntax | 20:17 | |
| + it wouldn't work across module boundaries without cooperation on propagating `%context` everywhere | |||
|
20:20
maylay joined
|
|||
| disbot6 | <beato3> I can see the use of dynamic variables in e.g. passing context to a callback, though my Perl solution to that would just be capturing the context in a closure that invokes the real handler | 20:21 | |
| <beato3> lizmat: > clients of a dynvar don't need to know where they live, just that they can be found on the stack, and act differently if not found I still don't get why that's useful. The client of the dynvar can just declare it as part of its interface, and the issue of where it lives is solved. But, hmm, it's interesting you say "clients" | 20:25 | ||
| Voldenet | m: sub foo { say "foo" }; my $captured = ""; { my $*OUT = class { method print($str) { $captured ~= $str } }; say "foo"; }; say $captured.elems # more practical example - testing stdout | 20:26 | |
| camelia | 1 | ||
| Voldenet | erm | ||
| m: sub foo { say "foo" }; my $captured = ""; { my $*OUT = class { method print($str) { $captured ~= $str } }; say "foo"; }; say $captured.chars # more practical example - testing stdout | |||
| camelia | 4 | ||
|
20:27
iwuvmika left
|
|||
| disbot6 | <beato3> That makes it sound like you might have several different libraries that want to be controlled by the same dynvar, but where there's no common place they can declare it | 20:27 | |
| <beato3> How often does that actually happen? It seems very niche, and in that case I'm not sure why e.g. ENV and and IN/OUT/ERR are all dynamic | |||
| <beato3> Yeah I've seen that use | 20:28 | ||
| <beato3> How much info does this bridge convey btw? | |||
| <beato3> Does it show which message I'm replying to? | 20:29 | ||
| Voldenet | I think yes | ||
|
20:30
iwuvmika joined,
belluzj left
|
|||
| disbot6 | <beato3> Voldenet: I've seen that use but it still doesn't convey the usefulness of dynvars to me, since $*OUT lexically refers to the same variable in both places, so temp can be used in that outside block | 20:32 | |
| <beato3> I'm sorry, I'm really not trying to be obtuse | |||
| Voldenet | well, it's a complex feature | 20:33 | |
| the `$*OUT` used by say lives inside stdlib, so without dynamic variables there would be no way to pass it anyhow | 20:34 | ||
| disbot6 | <beato3> I'm kinda sorta familiar with dynamic binding through Emacs where it's mostly used to set values for a call without actually passing them to the function, i.e. a "temporary" value for those variables... | 20:35 | |
| Voldenet | predefined global variables would be the only option | ||
| disbot6 | <beato3> Yes that's what's done in most other languages, IN/OUT/ERR are exported by the stdlib | 20:36 | |
| <beato3> If Raku doesn't do that, why? | |||
| Voldenet | because then you can't really override it easily without some hacky unix magic | 20:37 | |
|
20:37
maylay left
|
|||
| disbot6 | <beato3> Hacky unix magic? | 20:37 | |
| <beato3> Is that due to some quirk of Raku itself? | 20:38 | ||
| Voldenet | No, when you use things like "print things to console" in other languages, there's no real way to capture stdout inside the application | ||
| so you'd have to resort to starting the program differently to capture the output for later use⦠| 20:39 | ||
| disbot6 | <beato3> In those languages including Perl 5 all code is referencing those same IN/OUR/ERR variables so overriding them is trivial, you just set them | ||
| Voldenet | yes, but they're global, so you can't capture output of one thread to one variable, second to the other | 20:40 | |
| (not always you can though, it's just thanks to how languages are built) | |||
|
20:41
maylay joined
|
|||
| Voldenet | in fact, raku could easily not support $*OUT either | 20:41 | |
| either way, replacing $*OUT is just one thing you can do with dynamic variables | |||
| disbot6 | <beato3> No that's not true. For example in Python you would just set sys.stdout to a stream (something implementing write and flush), same as in Raku | 20:43 | |
| Voldenet | uhm, and in C you simply use dup2 :> | 20:44 | |
| disbot6 | <beato3> Hmm... | 20:45 | |
| <beato3> I feel like there's a much simpler solution to that issue | |||
| <beato3> But anyway it's besides the point | 20:46 | ||
| <beato3> Since I think that would just be a side-effect of dynvars | |||
| <beato3> I still don't get them! | 20:47 | ||
| Voldenet | Well, dynamic vars are similar to AsyncLocal<T> in C# or AsyncLocalStorage in nodejs | ||
| disbot6 | <antononcube> @beato3 "What's a good codebase to learn from?" -- Depends what kind of problem areas you are interested in. | ||
| Voldenet | you could for instance use dynamic variables to set DI scope in process root | 20:48 | |
| and then just use $*DI like a global variable | |||
| even if you're multi-threaded | |||
| in fact, without multithreading, I think it's not distinguishable from `temp` entirely | 20:49 | ||
| disbot6 | <antononcube> @beato3 The official documentation is very good for the "best" or most distinguishing features of Raku: grammars and CLI. | ||
| Voldenet | of course, a lot of dynamic variables are just handled by vm, and in a lot of code you will not even feel like you need them | 20:55 | |
| though if I use dynamic vars, that's mostly for this: | 20:57 | ||
| m: my $*dbg; sub a { say "state" if $*dbg }; sub b { a }; sub c { my $*dbg = 1; b }; c # print debug state only if i pass through right method | 20:58 | ||
| camelia | state | ||
|
20:58
iwuvmika left
21:07
iwuvmika joined
|
|||
| refactus | personally, lexical dynamics are fairly low on my list of most awesome features I'd want to point out about raku if someone came asking | 21:09 | |
|
21:09
maylay left
|
|||
| refactus | (though they are a good example of having a multitude of tools with which to approach any given problem) | 21:09 | |
| the regexes and grammars are awesome. the sets and bags and mixes and all their wide array of useful methods. metaops and hyperops. the ease of defining your own operators | 21:11 | ||
|
21:12
maylay joined
|
|||
| refactus | the strings and quoting constructs I haven't seen matched in any language, honestly. so many syntaxes for every use case | 21:12 | |
| phasers | 21:13 | ||
| Whatever * syntax | 21:14 | ||
| to someone who doesn't know it that last one probably sounds like I mean any/all raku syntax. * itself is a specific feature I'm referring to, to be clear | 21:16 | ||
| nativecall | 21:17 | ||
|
21:41
iwuvmika left
21:47
maylay left
21:49
maylay joined
22:02
maylay left
22:07
maylay joined
22:14
abraxxa left
22:20
maylay left
22:21
maylay joined
22:29
abraxxa joined
22:34
abraxxa left
22:36
maylay left
22:38
maylay joined
22:44
maylay left
22:48
maylay joined
23:03
maylay left
23:04
iwuvmika joined
23:09
maylay joined
23:24
maylay left
23:28
maylay joined
23:29
vasko45355861699 left
23:30
vasko45355861699 joined
23:45
maylay left
23:47
maylay joined
|
|||