3 ms·
Pixie Pi
- rasur 11y agoIn what way is this clojure inspired? (Just curious.. Does it need the JVM, or is it a brackety/syntax thing?)
- aliem 11y agoIt's distinct [features][1], mainly immutable data structures and transducers. Pixie runs over -RPython- PyPi. (The bracket "thing" is not a Clojure feature, it is lisp) [1]: https://github.com/pixie-lang/pixie#features https://github.com/pixie-lang/pixie#features
- rasur 11y agoI thought brackets ( eg '[' or ']' ) are Clojure syntactic sugar. I don't recall much use of them in Common Lisp (or Scheme), though I'm happy to be shown the error of my ways.
- Tcepsa 11y agoAFAIK, you are correct. In Clojure, square brackets are used for vector literals. Furthermore, Clojure uses vectors in some places (e.g. parameter lists in function definitions) that most Lisps use regular lists in order to help make those things more visually distinct.
- dorfsmay 11y agoPixie (1) is a Clojure-like language that is written in rpython and is run via pypy (python jit), the advantages being fast startups (Clojure compile some libraries on startup which doesn't make it very suitable for writing CLI). This particular article is about running Pixie on the Raspberry Pi, check the Pixie language page to learn more about Pixie itself. Pixie does not require the JVM. > In what way is this clojure inspired? is it a brackety/syntax thing? Have you looked at the article? It shows an example (that uses brackets and indeed looks like Clojure/lisp syntax). [1]: https://github.com/pixie-lang/pixie https://github.com/pixie-lang/pixie
- rasur 11y ago> Have you looked at the article? Well, yes briefly (it lead to the question by saying it was clojure inspired), but I didn't have time to delve fully into the minutiae, as am at work and for some reason they keep expecting me to do stuff /shrugs/
- _halgari 11y ago(author of Pixie here) It's mostly in syntax and the naming of functions. Our current though process is that we'll default to Clojure syntax/semantics where possible, but if the language will be faster or more flexible without a given aspect of Clojure's design we're pretty quick to adopt it.
- acron0 11y agoThis is interesting. I've had success in the past at running Hy [1] (a Lisp running on Python) on a Raspberry Pi as well. This could be a nice, speedier alternative, however you lose the Python ecosystem. [1] http://hylang.org http://hylang.org
- fit2rule 11y agoI want to do the same but with Lua. I think that would be a very nice environment.
- rcarmo 11y agoI tried to get the JIT to work on ARM a couple of months back. Since the author explicitly turned off the JIT, I suppose there's still work to be done...
- _halgari 11y agoThe jit works, it's just that RPython's support for cross compilation is weak, and it requires a fair amount of memory to compile. The gist of it all is that compiling pixie with a JIT for ARM requires an ARM machine with at least 1GB of RAM. I've gotten it to compile with a JIT on my Raspberry Pi 2, but it's a bit tricky. Once the interpreter is compiled it only takes about 10MB of ram to run, so my long term goals are to release pre-built binaries.
- karmakaze 11y agoClojure, Pi, FFI, oh my! (couldn't resist)
- therealmocker 11y agoThere doesn't seem to be a homebrew package for Pixie yet on OS X. I made a quick Brewfile (http://brew.sh http://brew.sh) but was bitten by pixie needing to find its standard libraries in a specific location. I should look again because the project looks like a way to use Clojure style syntax for quick one off scripts instead of making an uberjar.
- _halgari 11y agoIt's pretty trivial to fix the default locations that Pixie looks for files. Create an issue on our github page and I'll help you get it working.
- BFay 11y agoCool, I wanted to use Clojure on the Raspberry Pi, but the startup time is very slow, due more to loading the core Clojure libraries than the JVM. It makes writing a Clojure web server really impractical on the Pi. I considered using clojurescript for the server, but ended up just going back to node for my project.
- lgas 11y agoOut of curiosity, why did startup time matter for a webserver? Webservers seem to be the canonical example of long running processes where startup time doesn't matter. Also, why not clourescript on node? Seems like the best of both worlds.
- smrq 11y agoLet's say you have a widget that you want to control via a web interface. A Pi is an easy way to interface between the web and lower level hardware (via GPIO). Startup time is the time from when you plug in power for your widget until you can control your widget from the web.
- evilduck 11y agoI wouldn't get too excited just yet. Just built this on my RPi2 without JIT and ran the hello world file in the example folder: ./examples/hello-world.pxi 24.33s user 0.40s system 99% cpu 24.797 total