Search found 5 matches
- Wed Jul 12, 2017 3:10 pm
- Forum: Anything else we might add?
- Topic: and to set $it?
- Replies: 2
- Views: 4227
and to set $it?
Many lisps are taking over clojure's threading macros in some shape. Picolisp has a special variable @ that holds the result of the last computation of some functions (like newlisp's $it ). and is one of them and it enables it to use it for threading. Would something like this be welcomed in newlisp...
- Wed Jul 12, 2017 9:47 am
- Forum: Anything else we might add?
- Topic: shell-like scripting
- Replies: 4
- Views: 4848
Re: shell-like scripting
Yeah, I just felt a bit of redundancy, ! is synchronous which means it calls fork, exec and wait (or something similar, not sure how system is coded exactly). Then we call another fork and wait. But as you said process could solve this, although that requires a command-string which means I either ha...
- Tue Jul 11, 2017 8:12 pm
- Forum: Anything else we might add?
- Topic: shell-like scripting
- Replies: 4
- Views: 4848
Re: shell-like scripting
Yes, that pretty much does it, thanks! As a nitpick - is there no way to wait-pid for something that is forked only once? Looking at the sources ! uses system which is a fork+exec sh -c and you need to wrap that in another fork to get the pid. And why is the exit code shifted?
- Tue Jul 11, 2017 7:14 am
- Forum: Anything else we might add?
- Topic: Documentation improvements
- Replies: 1
- Views: 3705
Documentation improvements
There are some minor inconsistencies in the docs, namely: the Cilk API part here http://www.newlisp.org/downloads/newlisp_manual.html#cilk says the commands are available on windows, whereas each function (spawn, sync and abort) state "The function {func} is not available on Windows". So which one i...
- Tue Jul 11, 2017 7:02 am
- Forum: Anything else we might add?
- Topic: shell-like scripting
- Replies: 4
- Views: 4848
shell-like scripting
Looking at http://www.newlisp.org/downloads/newlisp_manual.html#processes I see there are several ways to start an external process, namely !, exec, process and spawn. So I thought let's write my typical toy tool - parallel git pull. It's a simple script that gets a set of root folders, looks for su...