forked from pahihu/picoLisp
-
Notifications
You must be signed in to change notification settings - Fork 0
Enhanced picoLisp 19.12
License
Grahack/picoLisp
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Changes
=======
All bugs introduced are mine.
This picoLisp fork can be built in 32bit/64bit mode and pil32 has all the
documented features of pil64: namespaces, native C calls, coroutines,
destructuring bind in let, list target in put and =: The external symbols
and the database format follows the pil32 tradition.
So where you see in the documentation "6bit-only", you can try out the
examples. They should work.
Note, to call a C function with variable number of arguments, the number of
fixed arguments must be marked with T, eg:
(native "@" "printf" "abc%d%s^J" T 7 "XYZ")
The arguments before T are the fixed arguments, the number of arguments
after the T are variable. This change is due to the native C call
implementation which uses libffi.
What is included?
Coroutines
(co 'sym [. prg]) -> any
(stack ['cnt]) -> cnt | (.. sym . cnt)
(yield 'any ['sym]) -> any
Database
(blk fd cnt siz [fd2]) -> lst
(blk fd 0) -> (cnt . siz)
(pool2 'sym . prg) -> any
Debug
(bt ['flg]) -> flg
(trail ['flg]) -> lst
(up [cnt] sym ['val]) -> any
Misc
*CPU
(byte 'num ['cnt]) -> cnt
(errno) -> cnt
(gc ['cnt [cnt2]) -> cnt | NIL
*Tstp1, *Tstp2
(let (lst 'any ...) . prg) -> any
destructuring bind
(put ..)
(=: ...)
final destination as list
Namespaces
(nsp 'sym) -> sym
pico
(symbols) -> lst
(symbols 'lst) -> lst
(symbols 'lst . prg) -> any
(symbols 'sym1 'sym2 ..) -> lst
(intern 'sym ['flg]) -> sym
(all ['T | '0 | 'sym]) -> lst
Native C Call
(native 'cnt1|sym1 'cnt2|sym2 'any 'any ..) -> any
(lisp 'sym ['fun]) -> num
(struct 'num 'any 'any ..) -> any
long lisp(char*,long,long,long,long,long);
* fixed coroutine issues, all tankf33der tests passed
* tankf33der ping-pong.l works, pil64 core dumps ;)
* added lst target in put and =:
* fixed coroutine issues, tankf33der tests are running, except advent2019
* added coroutines co,yield,stack
* fixed float/double scaling in native calls
* fixed float/double result/argument type decoding, both 32bit/64bit target uses
lib/math64.l (ie. native calls)
* fixed 32bit libffi native C calls
* native C calls thru libffi float/double return values/arguments supported
* added native, struct, lisp (callbacks), and external lisp() call
float/double return values/arguments in native calls not supported (yet)
* reduced overhead of nested Apply and exe tracking in bindFrame
* can be used to regenerate pil21 sources
* fixed up to return any call, load to preserve namespace, nested Apply
* fixed 64bit seed/rand to match pil64
* added destructuring bind in let, fixed trail, modified gc
* added trail, modified up, bt now works
* fixed namespace deallocation in 32bit target
* added nsp, pico, symbols, %CPU, modified all, intern
* added pool2
* added byte, *Tstp1, *Tstp2
* added errno, blk, lib/dbgc.l runs
* passed misc/bigtest
* pil 64bit target uses the same short/bigNum fmt as pil64, the 32bit target
supports shortNums
* added gcc -O3 target, run with pilx
* fixed SIGSEGV on UTF-8 character tables
* added build scripts m and m32 in src/ dir
* pil supports short numbers in 32bit/64bit versions
* pil default target is 64bit, build the 32bit version with "make target=pil32"
seed and rand is not compatible with 32bit build.
The 64bit version passes the picoLisp tests except the seed and rand tests,
and passes tankf33der's huge.l
* set the stack size to the allowed maximum, when cannot be set to unlimited
* the 64bit emu version could be compiled on macOS
* the 32bit version could be compiled with clang on macOS
pahihu 22 / 5 / 2020
02nov17abu
(c) Software Lab. Alexander Burger
Perfection is attained
not when there is nothing left to add
but when there is nothing left to take away
(Antoine de Saint-Exupery)
The PicoLisp System
===================
_PI_co Lisp is not _CO_mmon Lisp
PicoLisp can be viewed from two different aspects: As a general purpose
programming language, and a dedicated application server framework.
(1) As a programming language, PicoLisp provides a 1-to-1 mapping of a clean
and powerful Lisp derivate, to a simple and efficient virtual machine. It
supports persistent objects as a first class data type, resulting in a database
system of Entity/Relation classes and a Prolog-like query language tightly
integrated into the system.
The virtual machine was designed to be
Simple
The internal data structure should be as simple as possible. Only one
single data structure is used to build all higher level constructs.
Unlimited
There are no limits imposed upon the language due to limitations of the
virtual machine architecture. That is, there is no upper bound in symbol
name length, number digit counts, or data structure and buffer sizes,
except for the total memory size of the host machine.
Dynamic
Behavior should be as dynamic as possible ("run"-time vs. "compile"-time).
All decisions are delayed till runtime where possible. This involves
matters like memory management, dynamic symbol binding, and late method
binding.
Practical
PicoLisp is not just a toy of theoretical value. PicoLisp is used since
1988 in actual application development, research and production.
The language inherits the major advantages of classical Lisp systems like
- Dynamic data types and structures
- Formal equivalence of code and data
- Functional programming style
- An interactive environment
PicoLisp is very different from any other Lisp dialect. This is partly due to
the above design principles, and partly due to its long development history
since 1984.
You can download the latest release version at http://software-lab.de/down.html
(2) As an application server framework, PicoLisp provides for
NoSQL Database Management
Index trees
Object local indexes
Entity/Relation classes
Pilog (PicoLisp Prolog) queries
Multi-user synchronization
DB Garbage collection
Journaling, Replication
User Interface
Browser GUI
(X)HTML/CSS
XMLHttpRequest/JavaScript
Application Server
Process management
Process family communication
XML I/O
Import/export
User administration
Internationalization
Security
Object linkage
Postscript/Printing
PicoLisp is not an IDE. All program development in Software Lab. is done using
the console, bash, vim and the Lisp interpreter.
The only type of GUI supported for applications is through a browser via HTML.
This makes the client side completely platform independent. The GUI is created
dynamically. Though it uses JavaScript and XMLHttpRequest for speed
improvements, it is fully functional also without JavaScript or CSS.
The GUI is deeply integrated with - and generated dynamically from - the
application's data model. Because the application logic runs on the server,
multiple users can view and modify the same database object without conflicts,
everyone seeing changes done by other users on her screen immediately due to the
internal process and database synchronization.
PicoLisp is free software, and you are welcome to use and redistribute it under
the conditions of the MIT/X11 License (see "COPYING").
It compiles and runs on current 32-bit GNU/Linux, FreeBSD, NetBSD, OpenBSD,
SunOS (illumos), HP-UX, AIX, IRIX64, Cygwin/Win32 (and possibly other) systems.
A native 64-bit version is available for arm64/Linux, x86-64/Linux, ppc64/Linux,
x86-64/FreeBSD, x86-64/OpenBSD and x86-64/SunOS (illumos).
--------------------------------------------------------------------------------
Alexander Burger
Software Lab. / 7fach GmbH
Bahnhofstr. 24a, D-86462 Langweid
abu@software-lab.de, http://www.software-lab.de, +49 8230 5060
About
Enhanced picoLisp 19.12
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- PicoLisp 71.0%
- C 19.3%
- Emacs Lisp 3.5%
- Common Lisp 2.1%
- JavaScript 1.2%
- C++ 1.1%
- Other 1.8%