Re: nooby question re lists and quoting

2014-04-17 Thread Simon Luetzelschwab
Thanks for the response Mansur and Henrik - much appreciated. Mansur - Great, this looks much better! Henrik - I have been looking ath the articles on ProDevTips and some of the libs on bitbucket - very helpful as well. What I'm really trying to do is have an easy way to invoke arbitrary shell

Re: nooby question re lists and quoting

2014-04-17 Thread Henrik Sarvell
Hi Simon, if we take the classic ps aux | grep X Obviously you can just input one function into the next like this: (println (excmd~exe (excmd~script 'ps T 'aux) T 'grep 'bash)) Not so elegant, so I added this to cmd.l: (de chain @ (let Str (in (next) (till NIL T)) (while (next)

Re: nooby question re lists and quoting

2014-04-17 Thread Alexander Burger
Hi Simon, What I'm really trying to do is have an easy way to invoke arbitrary shell commands that may be piped, process the result in pico and maybe use that as the input for another command. I haven't found a generic example yet that doesn't specify the command specifically that allows

Re: nooby question re lists and quoting

2014-04-17 Thread Simon Luetzelschwab
Awesome! Thanks Henrik and Alex. Henrik - Yes, that's what I was envisioning. Thank you for the quick update to the repository. Alex - I hadn't thought about calling a shell - thanks for pointing this out! The main use case is that I'm calling a combination of command line tools to pull in data

Re: nooby question re lists and quoting

2014-04-16 Thread Мамкин Мансур Таипович
Hi, Simon, you can use apply here: (de exe2 (X) (apply 'call X) ) because call needs multiple arguments, but not one list. Best regards, Mansur Mamkin 17.04.2014 7:17, Simon Luetzelschwab пишет: Hi, PicoLisp is my first LISP dialect and I'm trying to move some of the things I do on the

Re: nooby question re lists and quoting

2014-04-16 Thread Henrik Sarvell
Hi Simon, this is similar to stuff in my own system command helper script, I use it a lot: https://bitbucket.org/hsarvell/ext/src/tip/cmd.l?at=default It might give you some ideas. On Thu, Apr 17, 2014 at 10:13 AM, wrote: Hi, Simon, you can use apply here: (de exe2 (X) (apply 'call X)