
PilOS – A Stand-Alone Operating System - daveloyall
http://picolisp.com/wiki/?PilOS
======
analog31
Oddly enough I've been looking for a REPL that I can stick on a
microcontroller. MicroPython is a candidate, and in fact I have one of the
boards from the original Kickstarter. I looked into PicoLisp but see that it
doesn't support floating point numbers. In fact I don't even know if floating
point is "supposed" to be part of Lisp at all, and have read some comments to
the effect that it might be frowned on by some. But my intended use would
really benefit from it.

I tried adding floating point support to a small Lisp or Scheme interpreter
(can't remember which one), and quickly got lost, as I'm not a great
programmer.

This definitely looks cool, and I will play around with it. Maybe it's
nostalgia, but I grew up with computers that booted into the BASIC prompt, so
it brings back the fun of exploring computers for me.

~~~
tptacek
Interesting. Which microcontrollers are you considering? I didn't know about
MicroPython but it's kind of blowing my mind; I mean, it feels weird to
dynamically allocate anything in a microcontroller.

~~~
analog31
MicroPython was originally written for an ARM chip. Since then it's been
ported to a number of other systems. What I do know is that it requires a
fairly "big" micro. I have a particular interest in PIC chips, but would be
happy with any version where I could compile and load the program on a circuit
that I'm capable of building myself.

I have tried downloading and compiling large C programs in the past, and it's
one of those things where if it works, great, but if the basic "make" comes
back with an error for some reason, then I'm kinda lost. My experience with C
programming has tended to be with programs numbering no more than a few
hundred lines, that all fit in one file and didn't need any kind of
"interesting" build process.

Wow, talk about a weird set of customer requirements. ;-)

These micro's have a fair amount of RAM, and the C compilers support memory
management, e.g., basics such as malloc() and free(). I suppose somebody could
even implement garbage collection.

~~~
joeyo
In case you aren't aware of them, eLua [1] or PIC32Lua [2] may fit your needs.

    
    
      1. http://www.eluaproject.net/overview/status
      2. https://github.com/FMMT666/PIC32Lua

~~~
_sh
Also picobit for scheme goodness:
[https://github.com/stamourv/picobit](https://github.com/stamourv/picobit)

Doesn't support full numeric tower (no floats), but does implement 'unbound
precision integers'. See §5.1 of this paper:
[http://www.iro.umontreal.ca/~feeley/papers/StAmourFeeleyIFL0...](http://www.iro.umontreal.ca/~feeley/papers/StAmourFeeleyIFL09.pdf)

------
nickpsecurity
Check out OSkit [1]. It was designed for people experimenting in OS's who
might not want to reimplement all the low-level crap like memory management.
It's been used in high-level language OS's from LISP to ML.

[1] [http://www.cs.utah.edu/flux/oskit/](http://www.cs.utah.edu/flux/oskit/)

~~~
jeffreyrogers
Do you know how this deals with drivers? Those seem to be the main impediment
to making any useful new OS.

~~~
justincormack
You can use the NetBSD drivers for other operating systems pretty easily - see
[http://rumpkernel.org/](http://rumpkernel.org/) \- you can get filesystems,
IP stack, network card drivers, etc. Several new OSs are using them.

~~~
jeffreyrogers
Thanks, that site was really interesting! I hadn't heard of rump kernels
before.

------
ackalker
I'm filled with joy to see that PicoLisp runs on OpenWRT. I would love to see
PilOS itself running on a wireless router, if only to be able to brag: "My
router runs Lisp!" :-)

~~~
FreeFull
Might want to implement networking for PilOS first, before putting it on your
router ;-)

------
akhilcacharya
I have yet to understand the Lisp craze, no matter how many blog articles I
read about it's beauty.

Although I will admit Lisp machines were pretty neat.

~~~
tptacek
Some of Lisp appreciation is like appreciating the Pixies: it's hard to see
what's so amazing about it when so many of its good points have been
expropriated by later projects. It's easy to see what's so powerful about Lisp
when your only comparison is C, but it's not 1998 anymore, and most new code
is written in high-level garbage collected languages.

The rest of Lisp you appreciate by learning to appreciate real macros.

~~~
agumonkey
I've read a few books about lisp tininess, beauty etc. I don't know it was
late 70s research bias or not. But it seems that no matter how many lisp genes
are picked up by other language. Its symbolic/recursive nature can't be
matched, and everything else is secondary.

~~~
jarcane
It's the syntax. The elementary nature of s-expressions makes it fairly
trivial to mangle them freely, and define all kinds of clever tree structures
and so on, all in an easy and consistent way. It also means you never have to
remember much symbolic weirdness, you just have to remember (operator atom
atoms ...), and that's it.

I think only the functional languages like Haskell and F# come close to the
same expressiveness, just from very different angles; auto-currying and lazy
evaluation save a lot of boilerplate, and the former is tricky to do in Lisp
for precisely one of the reasons it's so flexible (easy variable arguments).

~~~
agumonkey
It's a little more than syntax to me, even though it's part of it. Maybe a
~rapprochement between syntax semantics evaluation of recursive
domains/categories. The fact that the construction of data through sexps
belongs to that same philosophy as valuation between any domains. That the
same recursive idea permeates through the whole system.

------
giancarlostoro
I thought about having a shell that is lisp based for Linux, as a way of
forcing myself to use lisp more often, since I'm on and off with it. Though
running things like apt-get and such would be interesting (sudo (apt-get
(install racket chromium-browser))) or so

~~~
icebraining
One of the (many) lisp-like shells is Scsh
([http://scsh.net/](http://scsh.net/)), which incidentally also has the best
acknowledgments page by an open source project:
[http://scsh.net/docu/html/man.html](http://scsh.net/docu/html/man.html)

Though I believe your example would just be written as

    
    
      (sudo apt-get install racket chromium-browser)

~~~
reirob
It would be great to have Scsh as an installable package for the major Linux
distributions? For example, on Ubuntu 14.04 LTS it exists but is not
installable, says something about "unresolvable dependencies". Don't know
about other distributions.

Then, there was an effort to port Scsh to the GNU Scheme, but the work was
lost or abandoned somehow if I understood it correctly.

For people spending a lot of time on with Unix shell(s), a great Lisp/Scheme
shell might have been the entering point. But somehow the great work that has
been done at the beginning cannot be brought to masses.

It's a pitty.

~~~
henesy
14.10+ checking in here, it's very much installable.

------
SagelyGuru
Good work but the name is rather unfortunate; it is just too much like piles.

~~~
foz
I first read the name as "Pile of %&!#". Definitely consider a rename. It
looks like a fascinating project, and the use of Lisp/Prolog is really
interesting.

