01:08 razetime joined 02:37 razetime left 07:00 ocomport joined 08:44 razetime joined, razetime_ joined 08:45 razetime__ joined, razetime__ left, razetime_ left 09:54 razetime left 11:38 ocomport left 11:46 ocomport joined 11:58 ocomport left
stevied the raku scripts in my bin/ directory in my module stopped working since installing new version of raku (v2022.03) 12:06
it appears the shebang line isn't finding raku: `#!/usr/bin/env raku` 12:08
but I'm not sure why because I load it with zsh
and the scripts work fine when running from command line
I also recently upgraded comma 12:09
gfldex <@563790557831495691> does `whereis raku` shows anything? 12:16
stevied on the command line, yes 12:17
Anton Antonov It might be a search path issue. I also use latest Comma and v2022.3 through rakubrew — scripts work fine.
Since I use rakubrew,I have attach/proclaim its shims path. 12:18
stevied i'm just using the binary. everything was working before with just the binary 12:20
lizmat stevied: OOC, this is the 2022.03 *release*, right, not the HEAD on the master branch ? 12:21
stevied yeah, the release
everything works fine if I put the direct path to the raku binary in the shebang line but `#!/usr/bin/env raku` not longer works 12:22
Anton Antonov Since I use rakubrew,I have to attach/proclaim its shims path.
stevied and I load the new binary in zsh. but for some reason, comma is not picking it up.
everything works fine if I put the direct path to the raku binary in the shebang line but `#!/usr/bin/env raku` no longer works 12:23
Anton Antonov Did you proclaim / set your Raku binary in Comma? 12:25
Sorry, if this question seems obnoxious…
stevied yes, tried many things with comma sdk setting
in fact, i completely deleted the old path from the raku project structure setting and only have the v2022.03 in there 12:27
Anton Antonov Hm… do you have older versions of Comma and Raku? So, you can see is the problem because of the new versions?
Again, sorry— probably a useless suggestion…
stevied yeah, i got intellij with the old comma plugin. I keep getting some kind of error when trying to load old rakudo binary 12:29
ok, got the same problem with old comma plugin with old sdk setting 12:37
gotta be zsh
Anton Antonov Well, so it you… 12:38
Ah, ok — or zsh. 12:39
Well, so it is you…
stevied what would cause rak env to load find from terminal but not from within comma, though? weird
if I open open a terminal in comma and do `which raku` it reports the path just fine. 12:41
Anton Antonov And you run your script in the Comma terminal?
And you run your scripts in the Comma terminal?
stevied no, I'm using the "Run" command from comma 12:43
the tests works fine if I put full path to raku binary in shebang, but not with `#!/usr/bin/env raku`
the tests work fine if I put full path to raku binary in shebang, but not with `#!/usr/bin/env raku` 12:44
I can do `#!/usr/bin/env bash` and the script works fine without error 12:45
but not with for raku
but not for raku
Anton Antonov Can you print out in a bash script what `/usr/bin/env` returns? 13:00
stevied ok
Anton Antonov The paths there might have different Raku directory, than the one you assume. 13:02
stevied `SHELL=/bin/zsh TERM=xterm-256color TMPDIR=/var/folders/x0/qwd9_cn55y3g5j022kfb6j6h0000gn/T/ USER=stevedondley COMMAND_MODE=unix2003 SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.aVyCkkUQC0/Listeners __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0 PATH=/usr/bin:/bin:/usr/sbin:/sbin _=/usr/bin/env __CFBundleIdentifier=com.edument.comma PWD=/Users/stevedondley/git_repos/raku/modules/steve/Vimwiki-File XPC_FLAGS=0x
"`
ok, i get much different output when running `/usr/bin/env` from command line 13:06
rakudo is in the path
but when run from inside comma, it's not
i'm going to reboot 13:08
Anton Antonov Good luck! 13:14
stevied thanks. gotta be something with zsh. no idea what 13:16
Anton Antonov Speaking of Raku CLI — How can I program a Raku CLI that uses redirected output of another CLI program?
lizmat Proc::Async with :out parameter ? 13:18
or :in :-)
Anton Antonov Something like `com1 > com2` should work. But also `com2 —opt=arg1 arg2` should work too
@lizmat Hm… I think your suggestion assumes I know what `com1` is. (The command that gives the input.) But, I do not. I am looking for CLI script that I can use in a typical UNIX pipeline. 13:22
@lizmat Hm… I think your suggestion assumes I know what `com1` is. (The command that gives the input.) But, I do not. I am looking for a CLI script that I can use in a typical UNIX pipeline.
stevied use run command with `:in` 13:23
use `run` function with `:in`
`run 'blah' :in('some input')`
`run 'blah', :in('some input')` 13:24
Anton Antonov I want to make UNIX pipelines that can have my Raku CLI script. Not run UNIX program inside Raku . 13:25
lizmat m: my $p := run <cat>, :in; $p.in.say: "foo" 13:26
camelia ( no output ) 13:27
lizmat m: my $p := run <cat>, :in; $p.in.say: "foo"; sleep 1
camelia ( no output )
lizmat hmmm
stevied everything gets via args into MAIN function in a raku script
Anton Antonov For example this shell command: `ls -al > rakuCLI`
lizmat .say for lines 13:28
??
Anton Antonov Yeah, I experimented with MAIN arts without much success. 13:29
@lizmat I will try that, thanks. (I suspect though that `lines` would expect an input from STDIN.) 13:31
Yeah, I experimented with MAIN args without much success.
lizmat but that's what you're sending it to when you do ls -al > rakuCLI ?
Anton Antonov @lizmat Ok. Let me experiment a little. If I fail I will try to explain better what I try to have. 13:37
@lizmat Your suggestion worked but 1) I had to define another `MAIN` without arguments and 2) instead of redirection `>` operator the pipeline '|' operator has to be used. (Of course both points are fine.) 13:54
lizmat :-) 13:57
stevied ok, found the issue with the environment. listen up, because others will be affected 14:10
at least those that use macos
so the problem must have started after an upgrade to macos 15.4 last week that I did
the tl;dr version is you have to give "Comma" the "Full Disk Access" permission under "Security & Privacy" setting in "System Preferences" 14:11
looks like all those permissions for "Full Disk Access" were revoked by the upgrade 14:12
lizmat stevied++ 14:13
Anton Antonov <@563790557831495691> Thanks! 14:14
stevied yeah, hopefully no one else loses a Sunday morning as a result . 14:15
i'll post a note on reddit 14:16
16:16 n1to joined 17:17 zacts joined 17:25 guifa joined 17:33 zacts left 17:35 n1to left, n1to joined
anyone know how I can make comma happy here? I'm importing a package in the t/ directory. Comma shows them as errors. 17:45
comma says "cannot find TestUtils in the ecosystem"
tried `use lib 't'` but that didn't help
guifa Are you `use lib 't'` for a script that's at t/foo.rakutest ? 17:48
stevied yeah 17:49
guifa if so, it'll be looking for TestUtils in t/t/TestUtils.rakumod 17:50
you probably want `use lib '.'` if it's at t/TestUtils.rakumod
stevied ah
let me give it a shot 17:51
guifa I'm not sure if Comma itself will understand the exported symbols when you use `use lib`, but it should run without a problem 17:52
stevied `use lib '.'` didn't help. everything still runs. but I'd just like to get rid of those errors it reports while in editing mode 17:55
only way I could get those errors quieted was by add the TestUtils file to the `provides` has in META and fully qualifying the names in my test file. 20:44
probably a better way but I couldn't figure it out
21:14 n1to left
guifa it's just that Comma probably hasn't yet been coded up to understand `use lib …` 22:13
23:40 Manifest0 left