A ``primitive oriented'' scripting language core.


The libprim[1] project has two somewhat independent goals, which are
mostly inherited from the PacketForth project[2].

1. Construct a collection of primitive C modules to build scripting

2. Collect basic C modules for image processing which are easily
   bolted onto any kind of scripting language.

All core C modules are designed in such a way that they can be used
stand-alone in a C application, but are easily ``lifted'' into a more
expressive data/code model for prototyping and debugging.

The scripting language part of libprim constists of 3 main layers:

  * LEAF: C objects (bytes, symbol, port, parser, tuple, ...) with
    manual malloc()-based memory management.

  * EX: graph memory with automatic asynchronous mark/sweep GC, used
    for representing data expressions.  (i.e. a Scheme memory model)

  * PF/SC: VMs implementing two execution models using the EX data
    structures.  SC is a standard Scheme tree-walking interpreter.  PF
    is a linear stack language (a Scheme/Forth hybrid).

[1] http://zwizwa.be/darcs/libprim
[2] http://zwizwa.be/packetforth

20170107 Erlang cont
20160827 Erlang marriage
20160403 linear language
20160124 Binary tree rewriter
20151103 API coupling
Next, be serious
20151101 Next
20151031 Renamed LIN -> UNIQ
What did we learn?
A linear core
The point of LIN
Prim types: free
lin types
Data buffers
PF revisited
Linear engine
20150718 Inspired by UBF
20140907 Future of libprim
20140820 Functional interface
20140817 swig
20140816 Merging libprim from eyes
20140809 containers
20131213 simple pdp / forth
20130830 AT91SAM7S256.h not annotated with __ASSEMBLY__
Weird crt0.S problem:
20130113 c++ build rules
20121226 Sync to VBLANK
Xmonad floating windows
Makefile bug
Removing old makefiles *.mk
20121225 Imported zl from pdp
Graph nudging GUI
Build system.. how does it work?
Change of focus
20121204 Added AT91SAM7 project
20121130 A practical goal
20121123 Wrappers: The point
How this works
Integrating media stuff in PDP
20121107 Next?
20121101 Working on PDP
20120123 Wrapper generators
20111201 What do we have here?
20110608 VM structure
20110607 eCos
20110520 Generated interpreter
Memory allocation and tagging rehash
20110506 Abstract code addresses
20110504 Next
20110503 Simplified op_prim
Towards abstract code
Weird bug
20110501 From structured to linear code
One continuation type
serial vs parallel `let'
ANF compiler
20110430 Lambda & app.
Hmm.. learning?
20110428 Dead end; new start?
Keep code out of RAM
20110212 cell123 on AT91
eCos CVS
20110211 AT91
20110207 Running on the AT91
Cell on ARM
20101016 ANF vs. CPS
Sweet spot: simple self-bootstrapping VM (without BC compiler).
20101015 Separate interpreter from decoder
20101011 Out of steam..
Kelsey Scheme48 papers
20101010 PICOBIT VM
Generating byte code from ANF trees..
Scheme is Forth with data stack swapping
Tree walking vs byte code
arm uClibc
Answer original question: better GC for SC? NO.
EX on top of CELL? NO -> split EX code
Cell questions
Byte code
20101009 Arbitrary cell sizes
C primtives in new VM
Cells in flash for storing VM code.
lambda as EXP
Tagging w. fixed cell store.
20101008 Interpreter on top of CELL
Trying to implement pointer reversal mark GC
20101002 c.plt is fixed
20100928 Serialize core
20100925 Boot expand
Know your arena
20100923 Dump image w. closures
20100920 Memory opti
libprim on ARM7TMDI
20100919 Building eCos / arm libprim
Now that..
Hack to improve RAM usage
Scheme implementation design space
.h_prims generation
Meta system : which one to pick?
GC and consts
20100918 separating out posix?
Compilation to .a for eCos
Strings or pre-parsed source?
const wrapped in bytes
leaf init methods
Booting from string.
20100917 Port to eCos
20100901 A metaprogrammed core
20100823 Semiphere collector
20100815 PF impressions: what's still there after a couple of months?
20100814 Tree permutation machine
20100721 gdb as an application console
20100704 Status
20100203 gdb in emacs
20100202 Wrapping
20100201 Task communication
20100131 Automatic wrapping
Fixed exceptions
No restriction on pointers?
Automatic wrapping: reifying LEAF type information at run time.
20100130 Back to the basic idea
The future of libprim
Guaranteed tail calls
20100129 SC VM1 done?
Making it run faster
LEAF scaffolding
Cross compilation
ANF: let* code
A stack VM
20100128 EX
20100127 Defunctionalization
Closure conversion
20100126 Compilation
Incrementally fixing VM1
20100125 Dybvig-style VM
20100124 Modifying VM1
More about tethering
More snooping
20100123 Mangled shared object names
Embedded use and debugging
Build system
VM cont..
Why box variables?
Encoding `let' non-tail calls as SC primitives
ANF again
The `let' form: understanding ANF
20100122 VM fixes
20100119 contd..
Non-recursive make
20100117 Compiler + VM cleanup
A simple match form
20100110 Unrolling a sequential bootstrap
Practical bootstrapping with embedded VM
Reflection and self-hosted compilation
How do deal with improper phase separation?
Poor man's module system
20100109 A simple pattern matcher
Now generalize
What's next
What did I learn about bootstrapping?
Compiling the compiler
Bootstrapping the VM
20100105 Dalvik-style small footprint
20100104 ANF
20100103 Display data structure (implementing environments)
Self-hosting compiler
Match in match
More VM
20100102 VM status
ANF or not?
Experiments - trying to understand defunctionalized continuations
CPS and `if'
20091231 VM primitives
EX code generator working
Bootstrapping a Scheme VM in MZ
VM refactoring again
20091227 LLVM
20091224 Interpreter replacement
20091223 insidious TCP console bug
20091220 evaluation last to first
20091216 --eval or --load options + java pass-through
20091215 separate build dirs
20091214 getDeclaredField
20091213 Mapping numbers
20091212 Testing: call arbitrary methods + send/return integers
Simpler interface C->Java
20091211 Other problem
global instead of local refs
JAVA calls -> running VM loop
JNI w/o type signatures
Java JNI fixed
20091210 Reflection
JNI object -> class
20091209 sc in Java on linux
More java reflection
20091208 Mapping tuples to method invocations
More reflection
simplifying exceptions : no more multiple entries
20091207 JNI & reflection
20091206 Memory and stack management questions
Implementing RC
reflection on future
20091204 EX and LEAF compilers
JNI interface with type checking
20091203 simplifications
Java JNI
20091202 Java comm (converting any rep to java data structures)
Code reps
select and FILE*
20091201 build system fixes
20091130 #< ... >
wish list
Detached console
20091127 Dybvig heap machine
20091128 A better approach
20091127 remove support for towers
Coroutine interface C <-> VM
VM change roadmap
Scheme Resources
20091126 `apply'
kawa scheme
20091125 VM ideas
Compile to AST
20091124 arm cross build + test with qemu
R4RS compliance
20091122 setbuf fgetc
Simpler PF
select() based event loop
20091121 to thread or not to thread
20091120 channel problems + external processes
channel teardown
20091119 testing channel
External filters
20091118 Re-introducing packets
yuv type
Wrapper-independent code
20091117 TODO: fix generic functions for numbers
global _type() access
20091116 compile "display lists"
Grids & Folds
Primitive errors
20091115 treewalker vs. bytecode
cond -> hygiene
compact VM
20091114 Memory usage
preventing GC restarts
Proposed changes
20091113 sockets working
GC restarts: disallowed by default.
fdopen and read + write
20091112 lowlevel errors
sc_eval_step debugging
String repl
printing to string ports
20091111 object structuring + exceptions
20091110 boot speed
IO to string
class pointers as global variables
string ports
20091109 source distro w/o mzcsheme dep
libprim dependency structure
20091108 macro expansion
20091107 s-expression parser
Representing tokenized streams
tokenized tree parser -> postfix stream
Architecture summary
manual parsing?
20091106 parsing
dynamic linking
20091105 GC restarts and reading
libprim classes
finding home
20091104 Muxing
ffmpeg external codecs
ffmpeg delayed frames
Missing functionality
Are classes/types global?
More formal architecture
The media lib
20091103 The big plan
Automatic wrapper generation
installed libprim scheme
building a custom Scheme interpreter
Next: usability + test case
20091022 Gstreamer
20091014 PLT Scheme
20091007 C parsing
20091006 Images
20090920 Onward
20090831 Using Partial Continuations
20090830 Factor-like syntax
Using C's `const' to distinguish between PURE and LINEAR
A fully linear concatenative VM needs interpretation
PF: clear staging
20090829 Combining CDR-coding with vectors
Linear `compile'
Fully linear PF machine
Primitive exceptions should be linear
20090828 GC restarts: clear separation between PURE and LINEAR functions.
Partial Continuations in a Concatenative Language
20090827 simpler primitives
Concatenative languages and Full continuations
20090826 Shift / reset
PF: Linear code composition with `compose'
Partial Application
Abstract continuations
20090825 Re: rewriting
PLT Redex
What is a continuation?
Metacircular interpretation: Maxwell's equiations of software
Real-time GC
rewriting -> Factor list
20090824 JOY: Intensional quotation
Rant about reflection
SEQ -- why encode the byte code as a binary tree instead of nested lists?
A Joy machine
Different continuation types
20090823 peg/leg leaky?
Writing linear tree transformations
Tree permutations
Making partial continuations abstract
20090822 Asymmetric Coroutines in Lua
Quote of the day
Closures / Different continuation types
Ocaml and tagged interpreters
PF closure
The return stack should contain XTs
Remarks about the PF interpreter
20090821 PF interpreter in Haskell
PF interpreter in Ocaml
20090820 Terminology
Scheme -> EX compilation
Pattern matching for EX
Error prone
Delimited Continuations
20090819 Lowhanging fruit
No >r, nor r> : towards call/cc
Multiple dispatch
Merging SC and PF
Static linearity checks
PF design choices
PF read needs to be linear
GC restarts
PF compiler: SC < PF ?
GC and read -> need C suspensions
20090818 Next
REPL working
First PEG grammar
Weird error
20090817 `Harvard' PF in Flash ROM
Does PF need real-time GC?
Making PF expressions available to scheme.
20090816 Autosnarf
Linear cons cells
New PF interpreter
PF compiler
20090815 Knot tying
EX errors
EX printing
PF / PX primitives
Static scope.
EX: expression language
Code bootstrap
More sharing between Scheme and PF
Linear pairs
20090814 Packet Forth Interpreter
Scheme Primitives in the Stack Machine
Code and Variables
Packet Forth
Moving the stack language into the Scheme interpreter.
20090813 Reusing primitives
Dual regime
Stack language
Naming conventions
Leaf: small object model
Current scheme implementation wrt. generated code.
Restating goals
Simpler k_apply
20090812 Cheney GC
20090811 GC stuff
Real-time Garbage Collection
removing optimizations
Dynamic languages workshop
Compiling to C and pattern matching
Local macros
CPS conversion
Compressing an s-expression into a serial protocol.
bootstrap in forth
Sequential code
20090810 Dybvig Danfest 2004
Alloc before call
Tasks: one-shot + continuations
Scheme interpreter next:
20090809 More library code
Byte code
Keeping track of value names
Reader task
Loop without cons
20090808 Interesting
magic values
closures and values
letcc -> apply
20090807 Bootstrapping
Two Kinds of Primitives
Really done?
20090806 Coroutines
Testing gc preemption
Lists vs. applications
CEK primitives
constants vs. closures
First interpreter run
20090805 constant strings
mixing GC and C
Unsafe pointers
Representing constants
Confused about primitives
Objects and Lambdas
20090804 Continuations
Garbage Collector
Aspect oriented programming
Primitives and Composition, an OS?
Lightweight tasks
CEKS machine
A bit less cryptic