perryprog | what does it mean for a PL's core to be orthogonal? | 00:10 | |
Voldenet | probably that the language's core is so simple that every feature can work independently | 00:23 | |
and you won't see problems like `i've used dynamic variables in react block and they didn't work` | 00:27 | ||
perryprog | ah yeah that tracks | ||
Voldenet | m: my $*T = 42; my $ch = Channel.new; start react whenever $ch { say $*T }; $ch.send(1); sleep 1; | 00:28 | |
camelia | Unhandled exception in code scheduled on thread 4 A react block: in code at <tmp> line 1 Died because of the exception: Dynamic variable $*T not found in block at <tmp> line 1 |
||
Voldenet | m: my $*T = 42; my $ch = Channel.new; start { say $*T }; $ch.send(1); sleep 1; | ||
camelia | 42 | ||
Voldenet | m: my $*T = 42; my $ch = Channel.new; $ch.send(1); react whenever $ch { say $*T; $ch.close; }; | 00:29 | |
camelia | 42 | ||
Voldenet | so you can use two of: dynamic variables, start, react | ||
there's plenty of problems like that caused by having a lot of features, well, dynamic variables are horrible practice in the first place | 00:31 | ||
so I get the author's perspective, but "let's simply not have concurrency at all and make the programmer implement it - we're not responsible for UBs ;p" is very C thing to do | 00:33 | ||
perryprog | I mean yeah, dynamic variables are pretty out there | 00:36 | |
00:51
apogee_ntv left
00:52
apogee_ntv joined
01:28
hulk joined
01:29
kylese left
02:15
hulk left,
kylese joined
03:36
Aedil left
04:15
librasteve_ left
04:26
icicled joined
05:15
swaggboi left
05:20
swaggboi joined
05:34
Sgeo left
05:53
crnlskn joined
06:01
Aedil joined
06:14
gabiruh left,
gabiruh joined
06:16
DarthGandalf joined
06:47
icicled left
06:51
abraxxa joined
06:57
abraxxa left,
abraxxa joined
07:20
lichtkind joined
07:21
crnlskn left
07:32
Aedil left
07:55
dakkar joined
08:50
apac joined
09:08
abraxxa left
09:09
crnlskn joined
09:10
abraxxa joined
09:44
librasteve_ joined
09:46
abraxxa left
09:47
abraxxa joined
|
|||
lizmat | Voldenet: if a dynamic variable isn't visible, you get a failure | 09:48 | |
m: my $*T = 42; my $ch = Channel.new; start react whenever $ch { say $*T }; $ch.send(1); sleep 1; | |||
camelia | Unhandled exception in code scheduled on thread 4 A react block: in code at <tmp> line 1 Died because of the exception: Dynamic variable $*T not found in block at <tmp> line 1 |
||
lizmat | m: my $*T = 42; my $ch = Channel.new; start react whenever $ch { .say with $*T }; $ch.send(1); sleep 1; | 09:49 | |
camelia | ( no output ) | ||
lizmat | using "with" for dynamic variables having concrete values, is the best way to deal with this | 09:50 | |
alternately, if you want the dynvar to be visible inside all threads: | 09:51 | ||
m: PROCESS::<$T> = 42; my $ch = Channel.new; start react whenever $ch { say $*T }; $ch.send(1); sleep 1; | |||
camelia | 42 | ||
disbot | <librasteve> ugexe: I made an issue for the raku.org concern you have github.com/Raku/raku.org/issues/255 ... please can you confirm that you are happy with the change I propose... | 09:58 | |
Geth | ¦ raku.org: librasteve self-assigned Fix wording on semver github.com/Raku/raku.org/issues/255 | 09:59 | |
10:16
mc2 joined
|
|||
mc2 | hello people | 10:16 | |
disbot | <librasteve> you mean us? | 10:18 | |
<librasteve> hello! | |||
lizmat | also some bots here :-) | 10:20 | |
.tell lizmat hello | |||
tellable6 | lizmat, I'll pass that message to your doctor | ||
crnlskn | .oO( ubiquitous psychiatric surveillance?? ) |
10:34 | |
10:50
abraxxa left
10:51
abraxxa joined
10:53
apac left
11:17
abraxxa1 joined
11:18
abraxxa left
12:15
abraxxa1 left
12:34
abraxxa joined
|
|||
disbot | <antononcube> UPS | 12:39 | |
12:40
DavidSch__ joined
12:50
abraxxa1 joined
12:51
crnlskn left,
abraxxa left
12:57
abraxxa1 left,
abraxxa joined
13:09
abraxxa left
13:11
abraxxa joined
13:17
lichtkind left
13:25
apac joined
14:36
apac left
14:39
gabiruh left,
gabiruh joined
14:41
librasteve_ left
14:43
gabiruh left,
gabiruh joined
14:58
crnlskn joined
15:18
abraxxa left
15:59
apac joined
16:08
apac left
16:11
apac joined
|
|||
Voldenet | lizmat: but `start` normally makes that dynamic variable visible | 16:23 | |
m: my $*T = 42; my $ch = Channel.new; start { say $*T; react whenever $ch { say $*T }}; $ch.send(1); sleep 1; | |||
camelia | 42 Unhandled exception in code scheduled on thread 4 A react block: in block at <tmp> line 1 Died because of the exception: Dynamic variable $*T not found in block at <tmp> line 1 |
||
Voldenet | first $*T works, second (in react block) doesn't, but react block normally works in other place | 16:24 | |
tho I was just giving an example, there's many features that will cause cross-thread problems | |||
in most languages such features don't exist, so there's no problems :> | 16:25 | ||
lizmat | the problem is probably caused by the fact that "react"ed code is being executed with a different call stack | ||
Voldenet | yes, most likely, in fact `start { say $*T; start { say $*T; }}` will have similar problem | 16:27 | |
so I'm guessing is that this scope' in 'start' is in some way magical and knows how to use parent dynamic variables, but it's not inherited anyhow | 16:28 | ||
m: my $*T = 42; start { say $*T; start { CATCH { default { .say }}; say $*T }}; sleep 1; | 16:29 | ||
camelia | 42 Dynamic variable $*T not found in block at <tmp> line 1 |
||
16:35
dakkar left
|
|||
Voldenet | the simplest repro would be: | 16:49 | |
m: my $*T; await start await start say $*T | |||
camelia | An operation first awaited: in code at <tmp> line 1 Died with the exception: Dynamic variable $*T not found in code at <tmp> line 1 |
||
16:49
human-blip left
16:51
human-blip joined
17:18
melezhik joined
17:54
DavidSch1_ joined
17:55
librasteve_ joined
18:33
Geth__ joined,
Geth left
18:35
Geth__ left,
Geth joined
18:56
crnlskn left
|
|||
librasteve_ | notable6: weekly | 19:17 | |
notable6 | librasteve_, 5 notes: gist.github.com/668581cb742df22bea...0df843f92e | ||
librasteve_ | notable6: weekly reset | 19:19 | |
notable6 | librasteve_, Moved existing notes to “weekly_2025-09-08T19:19:02Z” | ||
librasteve_ | rakudoweekly.blog/2025/09/08/2025-...rg-reboot/ | ||
19:27
melezhik left
|
|||
tonyo | that seems pretty straight forward .. the *T isn't defined when the `start` block runs .. | 19:53 | |
Voldenet | but it's not, it's not defined when the `second` start block runs | 20:36 | |
m: my $*T; await start say $*T # this works | |||
camelia | (Any) | ||
Voldenet | librasteve_: minor typo in last weekly – `Add Str.spurt method to 6.e by Elizabeth Mattijsen.` has nested link | 20:41 | |
disbot | <librasteve> voldenet: thanks … that was some messed up link! | 20:52 | |
tbrowder | librasteve: good job on the weekly! | 20:54 | |
how can we on "normal" irc pm with the growing number of ppl on discord and other strange places? | 20:58 | ||
disbot | <librasteve> click the Discord link on raku.org and you will get am invite | 21:25 | |
tbrowder | well, is that another pit where i have to enter a password every flipping time i go there? no way if so | 21:28 | |
disbot | <librasteve> password manager? | 21:36 | |
22:49
apac left
23:04
Sgeo joined
23:10
DavidSch__ left,
DavidSch1_ left
23:34
librasteve_ left
|