Discussion:
PicoLisp on NuttX
jerome moliere
2014-09-19 23:12:08 UTC
Permalink
Hi all,
this is my first post here.
I am not a Lisp expert , I have a strong Java background & I discovered
Lisp one year ago with Clojure...
I am working on a connected watch project running on a very tiny hardware
(MCU running a Cortex ARM 3 from ST microelectronics). I'd like to know if
you have experience running PicoLisp in such environment ?
It seems that my post is not far from the hot topic on this list today...
The OS would be NuttX (RTOS).

Any feedback welcome....
Kind regards
PS:
I have seen that PicoLisp may be too heavyweight in the standard
distribution , the tiny version would be better suited for my needs but I
am really excited by the idea to embed a database into the language.

PS2:
I am really excited by the tiny LISP machine idea , buying such device is a
very exciting idea...
--
J.MOLIERE - Mentor/J
Alexander Burger
2014-09-20 07:41:52 UTC
Permalink
Hi Jerome,
Post by jerome moliere
I am working on a connected watch project running on a very tiny hardware
(MCU running a Cortex ARM 3 from ST microelectronics). I'd like to know if
you have experience running PicoLisp in such environment ?
...
I have seen that PicoLisp may be too heavyweight in the standard
distribution , the tiny version would be better suited for my needs but I
am really excited by the idea to embed a database into the language.
I think so too. For a really minimalistic system, a modification of
miniPicoLisp is a good idea. In contrast to that, the PilMCU is targeted
at a more powerful system, being a 64-bit architecture and needing more
RAM and persistent storage.

If a database is needed, however, miniPicoLisp is not an option.

♪♫ Alex
jerome moliere
2014-09-20 08:01:45 UTC
Permalink
Thanks Alex for your answer.
Is it possible/adviseable to slim down the PicoLisp to drop all unused
libraries (XML/JSON) to have a miniPicoLisp superset ?
The system running NuttX is a 120Mhz MCU with 128Ko RAM + 1 Mo Flash
PicoLisp reduced in size on disk (with database options) + one AMQP broker
could be the only components on my system and may fit the small size. Do
you have an idea of the typical memory footprint?
Thanks for your expert advices
Kind regards
Jerome
Post by Alexander Burger
Hi Jerome,
Post by jerome moliere
I am working on a connected watch project running on a very tiny
hardware
Post by jerome moliere
(MCU running a Cortex ARM 3 from ST microelectronics). I'd like to know
if
Post by jerome moliere
you have experience running PicoLisp in such environment ?
...
I have seen that PicoLisp may be too heavyweight in the standard
distribution , the tiny version would be better suited for my needs but I
am really excited by the idea to embed a database into the language.
I think so too. For a really minimalistic system, a modification of
miniPicoLisp is a good idea. In contrast to that, the PilMCU is targeted
at a more powerful system, being a 64-bit architecture and needing more
RAM and persistent storage.
If a database is needed, however, miniPicoLisp is not an option.
♪♫ Alex
--
--
J.MOLIERE - Mentor/J
Alexander Burger
2014-09-20 08:32:00 UTC
Permalink
Hi Jerome,
Post by jerome moliere
Is it possible/adviseable to slim down the PicoLisp to drop all unused
libraries (XML/JSON) to have a miniPicoLisp superset ?
This will not help much, I'm afraid. XML or JSON are separate libraries
anyway, not part of the base system.
Post by jerome moliere
The system running NuttX is a 120Mhz MCU with 128Ko RAM + 1 Mo Flash
PicoLisp reduced in size on disk (with database options) + one AMQP broker
could be the only components on my system and may fit the small size. Do
you have an idea of the typical memory footprint?
Hmm, that's very tight.

Form some measurements I made some time ago: Just loading "lib.l" and a
reduced version of "lib/misc.l" takes 48 KB on startup. If you load any
runtime sources, this will quickly grow. In addition to that, you'll
also have to reserve some stack space.


This sounds rather like a task for Forth to me. Or, you might look at a
8kLisp, a predecessor of PicoLisp

http://software-lab.de/8kLisp.tgz

The interpreter is exaclty 8 KB in size, and runs in a total memory of
64 KB. But it is written in Z80 assembly ;-)

♪♫ Alex
jerome moliere
2014-09-20 09:38:17 UTC
Permalink
Thanks for the details...
for 8KLisp , Z80 won't be helpful on ARM MCU ..
I should try to make some tests , but I don't have the dev kits yet ...

Kind regards
Post by Alexander Burger
Hi Jerome,
Post by jerome moliere
Is it possible/adviseable to slim down the PicoLisp to drop all unused
libraries (XML/JSON) to have a miniPicoLisp superset ?
This will not help much, I'm afraid. XML or JSON are separate libraries
anyway, not part of the base system.
Post by jerome moliere
The system running NuttX is a 120Mhz MCU with 128Ko RAM + 1 Mo Flash
PicoLisp reduced in size on disk (with database options) + one AMQP
broker
Post by jerome moliere
could be the only components on my system and may fit the small size. Do
you have an idea of the typical memory footprint?
Hmm, that's very tight.
Form some measurements I made some time ago: Just loading "lib.l" and a
reduced version of "lib/misc.l" takes 48 KB on startup. If you load any
runtime sources, this will quickly grow. In addition to that, you'll
also have to reserve some stack space.
This sounds rather like a task for Forth to me. Or, you might look at a
8kLisp, a predecessor of PicoLisp
http://software-lab.de/8kLisp.tgz
The interpreter is exaclty 8 KB in size, and runs in a total memory of
64 KB. But it is written in Z80 assembly ;-)
♪♫ Alex
--
--
J.MOLIERE - Mentor/J
a***@public.gmane.org
2014-09-20 10:07:32 UTC
Permalink
Sadly not PicoLisp, but another alternative you could look at if you need a really, *really* tiny Lisp is PICOBIT: https://github.com/stamourv/picobit

It's a Scheme. Claims (perhaps pinch of salt needed) to be able to run in as little as 1KB RAM. The original developer was the guy behind Gambit, so there's probably something to it (I haven't used it myself).




-----Original Message-----
From: jerome moliere <jerome-***@public.gmane.org>
To: picolisp-***@public.gmane.org
Sent: Sat, 20 Sep 2014 10:44
Subject: Re: PicoLisp on NuttX


Thanks for the details...
for 8KLisp , Z80 won't be helpful on ARM MCU .
I should try to make some tests , but I don't have the dev kits yet ...


Kind regards



On Sat, Sep 20, 2014 at 10:32 AM, Alexander Burger <abu-***@public.gmane.org> wrote:

Hi Jerome,
Post by jerome moliere
Is it possible/adviseable to slim down the PicoLisp to drop all unused
libraries (XML/JSON) to have a miniPicoLisp superset ?
This will not help much, I'm afraid. XML or JSON are separate libraries
anyway, not part of the base system.
Post by jerome moliere
The system running NuttX is a 120Mhz MCU with 128Ko RAM + 1 Mo Flash
PicoLisp reduced in size on disk (with database options) + one AMQP broker
could be the only components on my system and may fit the small size. Do
you have an idea of the typical memory footprint?
Hmm, that's very tight.

Form some measurements I made some time ago: Just loading "lib.l" and a
reduced version of "lib/misc.l" takes 48 KB on startup. If you load any
runtime sources, this will quickly grow. In addition to that, you'll
also have to reserve some stack space.


This sounds rather like a task for Forth to me. Or, you might look at a
8kLisp, a predecessor of PicoLisp

http://software-lab.de/8kLisp.tgz

The interpreter is exaclty 8 KB in size, and runs in a total memory of
64 KB. But it is written in Z80 assembly ;-)


♪♫ Alex
--
UNSUBSCRIBE: mailto:picolisp-***@public.gmane.org?subject=Unsubscribe
--
J.MOLIERE - Mentor/J
jerome moliere
2014-09-20 10:29:26 UTC
Permalink
Thanks for this feedback Alex.
I ll have a look tonight
Kind regards
Post by a***@public.gmane.org
Sadly not PicoLisp, but another alternative you could look at if you need
https://github.com/stamourv/picobit
It's a Scheme. Claims (perhaps pinch of salt needed) to be able to run in
as little as 1KB RAM. The original developer was the guy behind Gambit, so
there's probably something to it (I haven't used it myself).
-----Original Message-----
Sent: Sat, 20 Sep 2014 10:44
Subject: Re: PicoLisp on NuttX
Thanks for the details...
for 8KLisp , Z80 won't be helpful on ARM MCU ..
I should try to make some tests , but I don't have the dev kits yet ...
Kind regards
Post by Alexander Burger
Hi Jerome,
Post by jerome moliere
Is it possible/adviseable to slim down the PicoLisp to drop all unused
libraries (XML/JSON) to have a miniPicoLisp superset ?
This will not help much, I'm afraid. XML or JSON are separate libraries
anyway, not part of the base system.
Post by jerome moliere
The system running NuttX is a 120Mhz MCU with 128Ko RAM + 1 Mo Flash
PicoLisp reduced in size on disk (with database options) + one AMQP
broker
Post by jerome moliere
could be the only components on my system and may fit the small size.
Do
Post by jerome moliere
you have an idea of the typical memory footprint?
Hmm, that's very tight.
Form some measurements I made some time ago: Just loading "lib.l" and a
reduced version of "lib/misc.l" takes 48 KB on startup. If you load any
runtime sources, this will quickly grow. In addition to that, you'll
also have to reserve some stack space.
This sounds rather like a task for Forth to me. Or, you might look at a
8kLisp, a predecessor of PicoLisp
http://software-lab.de/8kLisp.tgz
The interpreter is exaclty 8 KB in size, and runs in a total memory of
64 KB. But it is written in Z80 assembly ;-)
♪♫ Alex
--
--
J.MOLIERE - Mentor/J
Loading...