00:05 david7832 left 00:24 oodani left 00:27 oodani joined 00:42 tejr left 01:08 hulk joined 01:09 kylese left 01:10 tejr joined 02:15 hulk left, kylese joined 03:06 soverysour joined 03:11 soverysour left 03:37 annamalai left 03:38 annamalai joined, annamalai left, annamalai joined
[Coke] m: say shell("echo $SHELL"); 04:09
evalable6__ (exit code 1) ===SORRY!=== Error while compiling /tmp/LMEdYd_zpr
Variable '$SHELL' is not declared. Did you mean '&shell'?
at /tmp/LMEdYd_zpr:1
------> say shell("echo <HERE>$SHELL");
[Coke] m: say shell('echo $SHELL'); 04:10
evalable6__
Proc.new(in => IO::Pipe, out => IO::Pipe, err => IO::Pipe, os-error => Str, exitcode => 0, signal => 0, pid => 15078, command => ("echo \$SHELL",))
[Coke] m: shell('echo $SHELL', :out).out.say;
evalable6__ (exit code 1) This pipe was opened for reading, not writing
in block <unit> at /tmp/fnOTh3b7rv line 1
[Coke] ... I get /bin/zsh when running that in the REPL. Should we override it to /bin/sh? 04:11
any ideas why github.com/Raku/doc/actions/runs/2...9919740054 doesn't have a rakudo that knows about exits-ok? 04:14
04:54 Aedil joined 06:46 soverysour joined 06:50 soverysour left 07:13 ShimmerFairy left, ShimmerFairy joined 07:19 soverysour joined 07:24 soverysour left 07:40 sibl joined 07:42 Aedil left, soverysour joined, soverysour left, soverysour joined 08:25 sibl left 08:33 soverysour left 08:58 soverysour joined, soverysour left, soverysour joined 09:01 Sgeo left 09:08 soverysour left 09:24 soverysour joined, soverysour left, soverysour joined 09:37 soverysour left 10:16 david7832 joined
david7832 ab5tract: Thanks! 10:17
tellable6 2026-04-03T11:09:36Z #raku <ab5tract> david7832: you might be interested in the ‘is item’ trait
david7832 While I couldn't get is-item to show an infuence on precedence, it's definitely interesting. 10:18
10:22 soverysour joined 10:32 soverysour left 10:51 annamalai left 10:58 soverysour joined, soverysour left, soverysour joined 11:36 david7832 left 11:57 annamalai joined 11:59 ds7832 joined, ds7832 left, ds7832 joined 12:01 soverysour left, soverysour joined, soverysour left, soverysour joined 12:06 soverysour left
ab5tract Yeah it is designed for tweaking dispatch, rather than precedence 12:18
ds7832 Ah, by precedence I meant to say "precedence with regard to multiple dispatch", not operator precedence (I guess that's what you understood?). So what I was trying to say was, I couldn't see any effect on the priority of multis in multi dispatch, or at least not the desired effect that e.g. f(@a is item) should take priority over f(@a) for 12:36
f($[1,2,3])
Coke: I think you have to use shell 'echo $0'.  For echo $SHELL, I get /bin/bash even when running it directly from sh, fish or zsh (outside from any raku). So I think $SHELL is just the environment variable saying what your system's default shell is, so it's the same everywhere 12:39
lizmat % echo $0 12:40
-zsh
% echo $SHELL
/bin/zsh
on my MBP
ds7832 What happens when you run that from another shell than zsh? 12:42
(presuming it's zsh from MBP and the % ) 12:43
lizmat bash-3.2$ echo $0
bash
bash-3.2$ echo $SHELL
/bin/zsh 12:44
ds7832 Thanks, I think that fits the picture: $0 gives the executable (if used inside a shell that understands $0 as such – zsh, bash and sh do, while fish does not), $SHELL your system default 12:45
(I use OpenSUSE with bash as default shell, which explains what I got) 12:46
I actually just yesterday looked into shell-independent ways to print the current shell's name. These seem to be the best: 12:48
sh -c 'ps -p $$ -o ppid=' | xargs ps -o comm= -p
sh -c 'ps -p $$ -o ppid=' | xargs -I'{}' readlink -f '/proc/{}/exe'
from askubuntu.com/a/1022440
12:50 soverysour joined 12:54 soverysour left
ds7832 ... although these two differ when run from inside raku: the first gives me sh, the second /usr/bin/bash.   (But no difference between REPL and a raku program called via raku program.raku) 12:55
13:27 ds7832 left 13:38 soverysour joined