Wow ! I've just figured out the best execve(2) Shebang line for pil scripts:
$ cat myscript.l
#!/usr/bin/pil -script (car (nth (argv) 1)) (nth (argv) 2)
(let (ars (car (rest)))
(prinl (car (nth (file) 2)) " ARGS: " (sym ars))
)
(bye)
$ chmod +x myscript.l
$ ./myscript.l
myscript.l
Hello Abraham Palmer :-)
You are now subscribed
Sent from my iPhone
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
On Sun, Aug 06, 2023 at 07:20:40AM +0100, Jason Vas Dias wrote:
> Wow ! I've just figured out the best execve(2) Shebang line for pil scripts:
>
> $ cat myscript.l
> #!/usr/bin/pil -script (car (nth (argv) 1)) (nth (argv) 2)
Just for the records, note that
(car (nth Lst 1))
is the same
On Sun, Aug 06, 2023 at 11:33:32AM +0100, Jason Vas Dias wrote:
> Yes, but please mention something about '(script ...) in the
> main 'ref' "Invocation" Section. It took me a long time to find!
Can you first explain what you are trying to achieve?
'script' in the hashbang line makes no sense to
Hi Jason,
I don't want to be rude, but to put emphasis on what Alexander Burger
wrote, your code is really bad. It doesn't follow any of the very simple
"naming conventions" of PicoLisp, and it doesn't even follow other
LISP "coding conventions". It's hard to read, difficult to grok, messy,
Hi Jason,
> ie. we should really track down what is making it coredump in the
> non-'+'-suffixed
> '(argv)' case when no error was reported when debugging is enabled by
> '+' argv suffix - that was my only picolisp specific complaint .
As I tried to explain several times in this thread (in this
Yes, but please mention something about '(script ...) in the
main 'ref' "Invocation" Section. It took me a long time to find!
On 06/08/2023, Alexander Burger wrote:
> On Sun, Aug 06, 2023 at 07:20:40AM +0100, Jason Vas Dias wrote:
>> Wow ! I've just figured out the best execve(2) Shebang line