Re: How to write let in idiomatic PicoLisp?
(de mylet (Val Var . Body) (bind (cons (cons Val (eval Var))) (run Body) ) ) Here is a version that do not (explicitly) depend on let or bind: (de mylet X ((cons (list (pop 'X)) (cdr X)) (eval (car X)) ) ) /meingbg
Re: understanding transient symbols, (====) and dynamic binding
(wishful thinking: alternative syntax for representing transient symbols without embedded spaces. maybe something like \xxx) Yeah, that's something I'm missing too. Transient symbols which represent not just strings simply look ugly. There is in fact another option: using 'zap'. If you need a transient symbol which represent something else than a string, you can use an internal symbol throughout the file, then at the end of the file (zap 'TheVariable). This will transform it to a transient symbol. This is however dangerous if the symbols has been used previous to the current file, and is probably not preferable if you're just going for a better syntax for the current functionality of transient symbols. /meingbg
Empty functions and (( construct
There was a discussion in irc:#picolisp about the ((if test fun1 fun2) arg) syntax, and also about the various empty functions in picolisp. Here's a list of them: | evaluate | return | definition | name | |--+++---| | none | 1 | '(X (car X)) | | | none | 2 | '(X (cadr X)) | | | none | last | '(X (last X)) | | | none | all| '(X X) | quote | | none | NIL| '(NIL) | | | none | T | '(NIL T) | | | all | 1 | '((X . @) X) | prog1 | | all | 2 | '((Y X . @) X) | prog2 | | all | last | '(@ (last (rest))) | prog | | all | all| '(@ (rest))| list | | all | NIL| '(@ NIL) | nil | | all | T | '(@ T) | t | Btw, what other programming languages do you know that support the ((return function) arg) construct with (function dependent) run-time decision of whether to evaluate the arguments? /meingbg
Re: Inferior processes and access to foreign libraries
I believe FFI or Foreign function interface is a term previously used for this, at least in the lisp world. http://en.wikipedia.org/wiki/Foreign_function_interface http://en.wikipedia.org/wiki/Foreign_function_interface/meingbg On Thu, Mar 24, 2011 at 4:21 PM, Alexander Burger a...@software-lab.dewrote: Hi Jon, This overview of the different ways of integration with other software is very good! It deserves a place in the wiki. ;-) Good idea! I'm still not sure, however, if it is complete. I'm getting a bit confused about that, it is the only place where pil32 and pil64 are substantially different. What might be a proper title? Foreign Code Integration? Cheers, - Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Tcpdump and getopts
Does 'file' help in this case? Is suspect rather not. It returns the 'file' is exactly what I was looking for, but with a set directory structure the operation itself is not needed. //meingbg
Re: Tcpdump and getopts
Hi Meinbg, I'm the current maintainer of the picolisp-addons repo at google code, if you want to put your tool in that repo drop me a line, I'll have to make some little modifications to accommodate for the directory structure and documentation :) (that may still change because we haven't set everything in stone) Sure, go on. If you want to, you could move getopts to it's own file and (load ) it from tcphex.l, thereby making it possible to use getopts as a library. //meingbg
Re: Tcpdump and getopts
On Thu, Mar 3, 2011 at 2:46 PM, dexen deVries dexen.devr...@gmail.com wrote: Your message got cut at that point :-( In any case, there is already a rather popular tool named `tcpdump', so re- using this name may lead to poor discoverability via web search. Thanks. I've changed the name to tcphex. Let's see if this mail gets through: Tcphex is a tcp proxy that gives a realtime hexdump of data sent both ways. The packet also includes a getopts function for processing GNU-style cmdline arguments. It's in public domain and written in picolisp. All comments appreciated. You can download it in one of the following ways: wget --no-check-certificate https://github.com/meingbg/tcphex/tarball/master-O - | tar -xz git clone g...@github.com:meingbg/tcphex.git Browse to https://github.com/meingbg/tcphex and click on Downloads //meingbg
Subscribe
Subscribe