9 ms·
PicoLisp
- shakna 9y agoI used to use Picolisp for quick prototypes - inbuilt DBA, access to C and Java for GUI and other library integrations. However, the docs are short and do sort of assume you'll pick up lots of shorthand quickly. I used Picolisp by Example [0], and Picolisp Works [1] extensively when I was learning. Both were released under the GNU Free Documentation Licence. [0] https://github.com/tj64/picolisp-by-example https://github.com/tj64/picolisp-by-example [1] https://github.com/tj64/picolisp-by-example https://github.com/tj64/picolisp-by-example
- deleted 9y ago[deleted]
- tankfeeder 9y agopicolisp code in wild: https://bitbucket.org/mihailp/tankfeeder/src https://bitbucket.org/mihailp/tankfeeder/src https://bitbucket.org/mihailp/signify-pil/src https://bitbucket.org/mihailp/signify-pil/src https://bitbucket.org/mihailp/wireguard-pil/src https://bitbucket.org/mihailp/wireguard-pil/src
- madmax96 9y agoDid anyone else have trouble getting PicoLisp to compile on MacOS? I was eventually able to get it to work, but I had to tweak some source.
- nistur 9y agoThe 32 bit version should compile pretty easily if you use gcc rather than clang. Unfortunately it uses variable sized arrays, which clang says will never be supported, and the 32 bit code is unlikely to get a rewrite. The 64 bit version however, I'm currently trying to get working on macOS. The 'normal' 64 bit version won't compile as it targets x86_64 ASM, in a GNU as dialect. MacOS, even using gcc appears to use clang as, I haven't found a GNU as which supports mach-O. There is an 'emulated' 64 bit version which I've been working to get running with Alex, but it currently seems to be hanging indefinitely on some of the unit tests and I haven't yet had the time to establish which bit.
- deleted 9y ago[deleted]
- iuguy 9y agoEven smaller: uLisp for Microcontrollers - http://www.ulisp.com/ http://www.ulisp.com/
- VLM 9y agoRather than more, it might be a symmetry relationship where picolisp seems to try to give a simple small lisp for giant computers, whereas ulisp tries to provide a giant lisp for small computers. Both look like a lot of fun.
- mathnode 9y agoJust like Erlang, my favourite feature of picolisp is the built-in database format: https://software-lab.de/doc/ref.html#dbase https://software-lab.de/doc/ref.html#dbase Discloure: I am a DBA. And a Lisp addict. The database tutorial: https://software-lab.de/doc/tut.html#db https://software-lab.de/doc/tut.html#db EDIT: This not supposed to be a reply.
- FractalLP 9y agoCool! Most DBA's I know tend to stay on the side of what is popular like Java. Do you use Lisp at work? If so, any pushback?
- mathnode 9y agoTons of pushback. But at the end of the day, the people who moan don't manage the databases. I stick with that is available in centos+EPEL, which includes sbcl, and use ODBC for most of my work. The common tooling for open source databases is varied. A lot of what makes mariadb and postgresql happen is c, shell scripts and perl. A lot of 3rd party tools are still php. pgloader is a common lisp tool, and very useful.
- crasch4 9y agoNeat! How would you differentiate picolisp from say, Clojure (which also interoperates well with Java libraries). When would you use picolisp vs Clojure?
- FractalLP 9y agoClojure compiles to JVM bytecode, so it should run much much faster than an interpreted picolisp. Clojure works on Windows too, while Picolisp needs Cygwin I think. Picolisp is really simple from a language point of view. It has a small group of core users who think very differently about software. There aren't many picolisp libraries, but you can hook into C & Java libraries when needed. It has an integrated prolog like DB. Clojure runs Walmart during black Friday online sales...I would not recommend that with picolisp.
- jacobush 9y ago"Erzats" PicoLisp runs anywhere Java runs, that was it's original reason for existance - to be used in bootstrapping the compilation of PicoLisp, IIRC. However, nowadays, I think Erzats PicoLisp, AKA the Java version of PicoLisp, gots too little love. It's an interesting way of accessing the JVM, just like Groovy or Clojure. Also, I don't have benchmarks, but PicoLisp is pretty damn fast owing to minimal datastructures and I would expect that to spill over into the Java implementation. http://picolisp.com/wiki/?NeedForSpeed http://picolisp.com/wiki/?NeedForSpeed http://picolisp.com/wiki/?ErsatzReflection http://picolisp.com/wiki/?ErsatzReflection
- FractalLP 9y agoAlexander has a "Need for Speed" article where he shows it's in the neighborhood of Clisp, but Clisp isn't really all that fast. Comparing to SBCL would be more useful as it is very fast.
- flavio81 9y agoThey are entirely different languages altogether, the only thing in common is the use of s-expressions and the homoiconoicity.
- jacquesm 9y agoThis was posted a while ago but didn't get much traction, an OS based on picolisp: https://picolisp.com/wiki/?PilOS https://picolisp.com/wiki/?PilOS
- tonyg 9y agoIt's fascinating! It looks like there's no C or unix-assembly code in there at all: it could be very close to self-supporting!
- sigotirandolas 9y agoThere are three files in the ZIP for PilOS with x86_64 assembly, totaling about 2000 lines, dedicated to the boot and lower-level details, as usual. From a quick look I think that two of the files (the big ones) are mutually exclusive, so it may really be closer to about 1000 lines of x86_64 assembly to get it minimally working.
- mark_l_watson 9y agoCool. I wonder if it runs in Virtualbox.
- matte_black 9y agoCool I suppose but the memefied/youtuber tone of voice this landing page has is a bit of a turn off.
- heowbert 9y agoPicolisp also runs blazingly fast on Android via Termux! https://picolisp.com/wiki/?TermuxPentiPicoLisp https://picolisp.com/wiki/?TermuxPentiPicoLisp
- patrickg_zill 9y agoSomething cool is a user's work on putting Picolisp onto an FPGA and making a softcore that runs Picolisp natively, which is called "PilMCU" : https://www.youtube.com/watch?v=mMgIvITAMBc&feature=youtu.be https://www.youtube.com/watch?v=mMgIvITAMBc&feature=youtu.be Note: video is 1h long, so, you may wish to fast forward :-)
- snaky 9y agoThat's very interesting, and I quote short summary from 2014 > PilMCU is an implementation of 64-bit PicoLisp directly in hardware. A truly minimalistic system. PicoLisp is both the machine language and the operating system: >* Memory management is trivial, just the Lisp heap and the stack >* The built-in database is extended to hold a "file system" >* One SSD per database file for mass storage >* "Processes" run as tasks and coroutines >* Events (timing and interrupts) via a 'wait' instruction >* Complex I/O protocols are delegated to peripheral chips > The final hardware can be very lightweight. Low transistor count and power consumption. No overhead for an OS. It is conceivable for a later stage to put many interconnected CPUs on a single chip. > At present, we have it running in the Verilog simulator, and in an emulator (adaption of the PicoLisp 'emu' architecture). So, what's the state of affairs for 2018?
- patrickg_zill 9y agoThe last update was April 2017. The person working on it moved to Japan and presumably is quite busy. see: https://www.mail-archive.com/picolisp@software-lab.de/msg07330.html https://www.mail-archive.com/picolisp@software-lab.de/msg073... beginning of the most recent thread I can find: https://www.mail-archive.com/picolisp@software-lab.de/msg07326.html https://www.mail-archive.com/picolisp@software-lab.de/msg073... announcement of video I linked: https://www.mail-archive.com/picolisp@software-lab.de/msg07351.html https://www.mail-archive.com/picolisp@software-lab.de/msg073...
- wwweston 9y agoBuilt in db / prolog is nice indeed, and it seems to be mature (30+ years old!).
- FractalLP 9y agoAlexander Burger has some free books out on it, but a lot of it still requires more work to really learn it than I can put in right now. I'd love to see a book on building really small business apps with it though.
- cturner 9y agoThis is a distraction from the post. But the thread may attract minds who are glad to correct. The post shows an example where code calls into shared-object files from picolisp. Something I have been wondering: why are the inspection options so weak for SO files? I expect you should be able to introspect a SO. In response, you would receive function and struct documentation, and clear type information about functions. Relevant stack overflow question, https://unix.stackexchange.com/questions/61940/introspection-of-the-interface-of-a-shared-library https://unix.stackexchange.com/questions/61940/introspection.... "For C-type functions, you'll only get function names, not argument types or return values. For C++ functions, you'll get mangled names - pipe the output of that command through c++filt to get function names and argument types (still no return values though)." You could change Elf to fix it. An alternative, the compiler could do it. Gcc could run an early preprocessor round to pick up metadata and type information. It would freeze this metadata to blobs in the code area. Through this, you could have a standard set of introspection methods built with that compiler. I have been programming on Windows recently. In some situations, in order to build against a DLL you need need an accompanying "lib" file. If you do not have one, you can perform a circus to create one from the DLL. What have I missed?
- skissane 9y agoI like the idea of this tool: https://github.com/rpav/c2ffi https://github.com/rpav/c2ffi (Although despite planning to use it for some personal project I haven't got around to it yet...) It parses C/C++/Objective-C into JSON metadata. It uses clang/LLVM so the parsing/etc should be very accurate. So, to implement your idea, you could just embed this JSON into an ELF section. (Or, if you don't like JSON, convert your JSON to some other format, such as S-expressions or protobuf or whatever.)
- emmelaich 9y agoSome people are trying. See Stephen Kell's[1] work: https://www.thestrangeloop.com/2014/liberating-the-smalltalk-lurking-in-c-and-unix.html https://www.thestrangeloop.com/2014/liberating-the-smalltalk... https://slideslive.com/38902419/adding-runtime-type-information-to-the-gnu-toolchain-and-runtime https://slideslive.com/38902419/adding-runtime-type-informat... [1] http://www.cl.cam.ac.uk/~srk31/ http://www.cl.cam.ac.uk/~srk31/
- mark_l_watson 9y agoWow, I thought (setq foo (1 2 3)) was a typo because the inner literal list is not quoted. Strangely, a list with the first element being a number auto-quotes the whole list. I have been a heavy Lisp user since the the late 1970s and I don’t recall seeing this before. That said, picolisp is cool. I just installed it in 10 seconds. BTW, it does not include a read line clone, so alias picolisp to wrap it in wlwrap.
- angus-g 9y agoIt's not quite readline, but if you start the interpreter as `pil +', you get better editing and history and some nice things like `(doc 'sym)'
- girzel 9y agoThat seems like an awful convenience -- isn't it far easier to recall that all lists must be quoted, than to remember which are auto-quoted under which circumstances?
- deleted 9y ago[deleted]
- kencausey 9y agoDid you mean rlwrap rather than wlwrap?
- mark_l_watson 9y agoyes I did thanks for the correction
- rurban 9y agoThis forbids any numeric function names. But ok, the trick is nice.
- kazinator 9y agoThat could be a backward-compatible extension in any mainstream Lisp, because the form (1 ...) is otherwise invalid.