🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
sour hey, is it generally a known thing that running rakudo on windows has some hiccups? 18:23
[Coke] I am aware of issues with long paths, but that's it 18:24
sour this one liner of "shell 'dir';" causes some errors and doesn't print the result of the command (run 'dir' works ok) 18:25
i'll fiddle a bit more with it 18:26
[Coke] you need to run that as 'cmd dir' or somesuch. 18:31
I don't have a windows box in front of me at the moment, apologies. 18:33
sour no worries, you mean something like: shell "cmd dir"; ? I'm following the samples at raku.guide
[Coke] firing up a copy of windows in azure. 19:12
[Coke] I was wrong, this works: 19:28
raku -e "say shell('dir')"
so: what version of windows, raku, which shell are you using, what's your script, etc. 19:29
what errors are you seeing...
raku -e "shell 'dir'" # even better 19:32
sour it's a longer error trace i assume, the first thing being 'Use of uninitialized value @!args of type Any in string context. 19:35
Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful.
  in sub warn at 'SETTING::'src/core.c/control.rakumod line 267'
[Coke] what code are you running?
sour my $*DISTRO is mswin32 (10.0.17763.529), windows 10
[Coke] does the one liner I showed work from the command/powershell prompt? 19:36
sour your one liner
no, same thing there
[Coke] what does raku --version say?
sour v2024.04
[Coke] OOC, what dir are you in? 19:37
sour some subdir on my users' desktop, I got it opened in VSCode 19:38
hmmm, lemme check 1 thing
[Coke] maybe try a different dir, just in case?
sour yeah, just tried, same error seems like 19:39
[Coke] what shell are you using? 19:40
'command prompt', 'powershell', are you already in raku's REPL?
sour same error happens with echo
this is from git bash
I tried it with command prompt, that seems to not yield an error..
[Coke] does 'dir' work in git bash?
without raku in the mix? 19:41
sour yeah it does
[Coke] ok. it might be going out of it's way to make that work.
sour yeah it has to be tied somehow with me running the one liner from git bash
[Coke] er, its
does ls instead of dir work with git bash and raku? 19:42
sour no, same error. echo also errors out 19:43
[Coke] echo ight have been a shell builtin but ls should work. weird. pretty sure that works on my work laptop. will check when I can.
sour thx for the help. the full trace i put here: pastebin.com/9zvnB3xk 19:44
[Coke] the key error there is line 8 19:46
it failed, there was no outut, and then shell tried to print that nothing.
ugexe that output doesnt make sense 21:30
the command shown is raku -e "shell 'echo'"
why is there output mentioning dir?
line 2 shows one of the @!args is Any despite that we see it is passed 'echo' 21:31
github.com/rakudo/rakudo/blob/b6cc...#L172-L178 21:32
what does `raku -e 'say %*ENV<ComSpec>'` show? 21:34