7 ms·
Picolisp
- rubiquity 10y agoHilarious introduction text.
- overcast 10y agoThat Share Tech Mono font gives me a headache.
- squimmy 10y agoFor a monospace font, the characters aren't nearly distinctive enough.
- eyan 10y agoLong time fan. Great docs. And a 'native' Prolog interpreter: http://software-lab.de/doc/ref.html#pilog http://software-lab.de/doc/ref.html#pilog
- allendoerfer 10y agoI love how everything is pico until these Java namespaces come along and crash the party. I think it should make it clearer whether you can actually use this and how. It seems to be run inside a VM and call C and Java functions. They advertise this prominently, but having to run both Picolisp and JVM does not seem very attractive to me. Can we use it reasonably without Java? Is it production ready? How fast is it? How old is it? I think a programming language is hard to sell, so they should work on that a bit (if that's there goal, of course).
- eggy 10y agoThe standard PicoLisp is not java-based or VM bound; there is a java implementation called Ersatz [1] that is older, and is there just for the Java hook. It is smaller than Lua considering how much is built-in PicoLisp is written in C, or the 64-bit version in assembler. It is Posix-dependent, so you need to run it in Cygwin for Windows, although somebody is working on a platform independent version based upon Midipix to eliminate the Posix dependency [2]. The creator of PicoLisp, Alex Burger, created it for his own use decades ago. It has a built-in database and Prolog interpreter. It is very fast for an interpreted Lisp, and there are lots of examples on rosettacode.org. It is fexprs-based instead of sexprs as far as I know. I like it a lot, but since I am on Windows for my livecoding / game dev hobby, I have not gone too far with it. I am hoping the Midipix work takes off. I also run Linux on my notebook, but all of my work nowadays is on Windows. .NET Core might change that. Most games still run on Windows, and the ones on Linux have compatibility issues across the various Linux distros. There may be a glowing white Apple on most web-dev's notebooks, but my 3 year old Alienware plays games with a Technicolor LED show that would put the F&F film franchise to shame ;) [1] http://picolisp.com/wiki/?javacode http://picolisp.com/wiki/?javacode [2] http://midipix.org/ http://midipix.org/
- paines 10y agoDo you use Lisps ( CL or Scheme) for your games?
- eggy 10y agoTrying to. You will not find many game frameworks for Lisp, but all of the pieces are there. I mainly use Lisps for livecoding. I am currently trying to learn Extempore for livecoding. It has two languages: xtlang, a Lisp language that is strongly typed and compiled for close to C speed via LLVM, and a scheme for doing more high-level scripting stuff in the Extempore environment [1]. There are binaries available for all platforms. I run it in Spacemacs on Windows 8.1. It's very snappy, and powerful, for coding music/sound at the signal or note level, and it has OpenGL and Nanovg for graphics. Watch Andrew Sorensen rock it on YouTube or Vimeo - just search for Extempore and/or Andrew Sorensen. I hope there will be a way to distribute things created with it someday. Then it would be a kick ass game dev platform. I tried Racket and SBCL briefly specifically for games. Both are very capable. I will probably go back to SBCL, since it worked well with SDL2, OpenGL and was fast on both my Windows and Linux boxes. CEPL is great for working with OpenGL in Lisp [2]. I would love to use PicoLisp. I almost did use it for a game jam, but you would need to create the game framework from the pieces it has, and again, the Posix / Windows issue. I'm really hoping for the Midipix solution. You can learn PicoLisp fast in a week or so by following along with the two great books - PicoLisp Examples, and PicoLisp Works. The PDFs are freely available on Scribd and the source code is available online [3][4]. Even Erlang is available as a Lisp - LFE, or Lisp Flavored Erlang, created by one of the original designers of Erlang, Robert Virding. Would be great for a game server with many connections. Elixir is becoming very popular but LFE has true macros, and why not, it's a Lisp! [5] [1] http://extempore.moso.com.au/ http://extempore.moso.com.au/ [2] https://github.com/cbaggers/cepl https://github.com/cbaggers/cepl [3] https://github.com/tj64/picolisp-by-example https://github.com/tj64/picolisp-by-example [4] https://github.com/tj64/picolisp-works https://github.com/tj64/picolisp-works [5] http://lfe.io/ http://lfe.io/
- qwertyuiop924 10y agoHave you tried Hypergiant for CHICKEN scheme? I've heard it's good for 3d work. For 2d, there's doodle. Both are in Chicken's egg repository. Guile's Sly is also quite good for 2d work. Finally, I think both have bindings to raw OpenGL/SDL, if you want them.
- ww520 10y agoI quite like it to be able to interop with Java and C. This allows the leveraging of existing libraries of those languages.
- bschwindHN 10y agoThen why not just use Clojure?
- ww520 10y agoClojure is too heavy weight. These little lisp packages consume very little resource and are perfect for embedding.
- nilved 10y agoClojure is incredibly light weight, unless you're including the host platform.
- qwertyuiop924 10y agoBecause clojure is really weird, and it doesn't implement lists right, and it's covered in JVM stuff, which is kind of gross...
- eggy 10y agoCheck out the RC Simulator the creator programmed many years ago in assembler. It's all pixel pushing, no OpenGL, and no texture mapping, but still incredible. I posted about it on HN a year ago too [1,2]. Work has been done to run it on bare metal too - a sort of LISP Machine in PicoLisp! [1] http://picolisp.com/wiki/?rcsim http://picolisp.com/wiki/?rcsim [2] https://news.ycombinator.com/item?id=9954773 https://news.ycombinator.com/item?id=9954773
- Kabie 10y ago`de` and `prin`, wut?
- eggy 10y ago'define' - Scheme, Shen, others; 'defn' - Clojure; 'fn'; 'lambda' - are all just syntax to get used to in any language you learn. The online documentation, rosettacode.org examples, or the two reference books for PicoLisp should help get you started.
- fredmorcos 10y agoI think they were referring to the fact that 'de' isn't much of a shorthand for 'def' and that 'prin' isn't much of a shorthand for 'print'.
- eggy 10y agoI would say they are much more shorthanded than 'define' for define. Then again, I program in J too, so I am used to one character or two character tokens. Wut? I understood as shorthand for 'What?' ;)
- qwertyuiop924 10y agoYeah, someone said that Scheme was like the Java of the Lisp world. It's not that verbose. But it can be fairly verbose at times.
- eggy 10y agoI never heard that one. I mean you can just use shorter names. After all, you define the functions, or at least most of them, and the built-in ones are not unusually long. The Scheme programs are usually much shorter than most of their counterparts on rosettacode.org. I program in J, and that is even shorter! For me, the slight against Java is the length of the class names themselves (e.g. TransactionAwarePersistenceManagerFactoryProxy), and all of the curly braces mixed with all sorts of other line noise ;
- darkseas 10y agoHas the story for PicoLisp on OSX changed at all? My daily drive is El Capitan and there were issues compiling the source because of Clang/gcc incompatibilities last time I tried. Precompiled binaries were around but are no longer linked I think.
- tankfeeder 10y ago4clojure on PicoLisp https://bitbucket.org/mihailp/tankfeeder/src https://bitbucket.org/mihailp/tankfeeder/src
- edem 10y agoWhy use this over Clojure if I'm into Java?
- Pitarou 10y agoNobody's forcing you, are they? But seriously, Clojure is designed from scratch to work well with the JVM, so if the JVM's where you live then Clojure is the obvious choice.
- qwertyuiop924 10y agoUnless you like a more traditional lisp model, in which case go for ABCL or Kawa...
- qwertyuiop924 10y agoDon't. I, however, am not into Clojure, so this excites me.
- pvinis 10y agoI see the answers below and I want to ask everyone. Is there any other lisp besides Clojure right now, that is actively developed but not early stage, and also not old? I want to use lisp and I don't care about the JVM. But whenever I search for lisps, I find some for C, Go, Rust that are too young, or Common Lisp which I read is too old and weird, and complicated. I really like Clojure and that's what I use for now, but a lisp without the JVM mighty be cool.
- qwertyuiop924 10y agoClojure... well, I wouldn't go so far as to say it's "not a lisp" (some people would), but it's quirky. It's like that weird guy who's just as competent as the rest of us, but has an "interesting" perspective on how he tackles problems. The example I got in another thread on this is: (list? '(1 2 3)) ;;; => true (= '(1 2 3) (cons 1 '(2 3))) ;;; => true (list? (cons 1 '(2 3))) ;;; => false That's actually psychotic: if your lists aren't lists, than don't call them lists! Anyways, Scheme is the part of the lisp family tree that actually evolves, albeit slowly. The spec is minimal, so compatability between implementations is low. I'd reccomend either Chicken or Guile scheme to most people, as both have pretty good FFI, decent performance (Chicken's is better), and good libraries (for a scheme). Racket isn't a Scheme, although it started as one. The official implementation of Arc runs on an old version of Racket, from when it was closer to Scheme (we should probably port it to another scheme at some point...). It's not really my thing, but you might like it, and it has some of the best library support of any lisp outside Common Lisp. OTOH, you may like Common Lisp. Bits of it are idiosyncratic, and it's huge and inelegant, but it's a tremendously powerful language, and very well supported and documented. There are actively developed implementations, and the most popular is probably SBCL.
- Grue3 10y ago(setq foo (1 2 3)) So how does evaluation work here? Why isn't (1 2 3) evaluated? Or is it not evaluated because 1 is not a function? In which case, is it not possible to create a literal list where the first element is a function?
- marklgr 10y agosetq is called a 'special form', which does not evaluate its args as other s-expr would.
- masklinn 10y agosetq would in fact evaluate its second argument (and bind it to the name specified by the 1st). Picolisp has a special rule for (literal) lists starting with a (literal) number, they're implicitly quoted instead of the CAR being interpreted as a function: > if the CAR of the list is a number, the whole list is returned as it is This makes more sense considering a second quirk of Picolisp: numbers can be used as functions, in which case they're interpreted as a pointer to the executable code to run. And from what I understand Picolisp's execution model doesn't have special forms as such, rather function definition specifies whether they receive their arguments evaluated or not.
- qwertyuiop924 10y agoIt also has macros now, but they're rarely used.
- provemewrong 10y agoI think I found the explanation in the PicoLisp reference [1]. > [...] as a special case - if the CAR of the list is a number, the whole list is returned as it is [...] This is not really a function call but just a convenience to avoid having to quote simple data lists. [1]: http://folk.uio.no/jkleiser/pico/doc/ref.html#ev http://folk.uio.no/jkleiser/pico/doc/ref.html#ev
- cmrx64 10y agoIt's neat to see a "modern" web page and extensive documentation for such an incredibly old piece of software. While hacking on some old computers (one of my hobbies) I came across picolisp but never thought to look for it on the web. I assumed it was dead, like a large portion of the rest of the software on the box.
- TheMagicHorsey 10y agoRacket has some of the same properties. But it lacks the performance and simplicity. But with Racket you gain other things like more powerful macros, an integrated environment, and perhaps more libraries.
- qwertyuiop924 10y agoRacket is a little too complex for my tastes. It's a little too big, a little to exerimental, a little too complex, a little too magical. I lean towards R7RS and CHICKEN myself, which are on the opposite end in terms of Scheme implementations. Guile's nice too.
- TheMagicHorsey 10y agoI do agree, that it gets too big. I mentioned complexity for that reason. Its also not very performant, BUT you can call C functions quite easily, and you can embed Racket programs into your existing C/C++ programs.
- qwertyuiop924 10y agoYeah, but Chibi, CHICKEN, Gambit, and Guile are all excellent at FFI, and fairly good at embedding (although for CHICKEN and Gambit, it depends on the given value of embedding... That's more Chibi and Guile's forte, as it was for SCM, SIOD, and TinyScheme before them.)