Commit Graph

26 Commits

Author SHA1 Message Date
Benjamin Vedder 267eb0a204 Squashed 'lispBM/lispBM/' changes from db4994ce..0c731969
0c731969 applied small fix to malloc_reserve
50e22063 bug fixes in malloc and malloc_reserve, rearragements in event processing
3ab6cba9 There is now an artificial memory use limit that prohibits lbm_malloc from allocating all lbm_memory. To allocate without regards for the artificial limit use lbm_malloc_reserve
19745d9e flat_values are freed if event delivery not possible (no event handler). Unblock event will unblock blocked process even if there is no memory to unpack the flat_value into.

git-subtree-dir: lispBM/lispBM
git-subtree-split: 0c7319699d1150c366c1322f3ff986f45b2e4c0d
2023-02-15 15:58:44 +01:00
Benjamin Vedder bf1387e648 Squashed 'lispBM/lispBM/' changes from 1267d006..8dc4c6d9
8dc4c6d9 added updated version of test_lisp_code.c that can produce events with lists of float
49dd1d31 added event tests to punish flat_values a bit.
9a2e004a fix flat_value bug, removed dead code and correctly labeled write_word static
c9ee2c2d actually adding the flat_value files
215f3ba1 flat value implementation. A lot of testing needed
24d5184e experimental alternative way to transport values from C to LBM safely and with no need to pause. Work in progress
6d98ff61 restructuring for readability of GC and added queue locks. blocked context unblocking is done by the evaluator in a safe state. Safe state unblocking makes a bit harder to relay information about wether or not it was successful back to the thread issuing the unblock. So it may be a bad idea. It also makes the event queue obligatory
55ca904d added another arith stress test
87d21426 added another arith stress test
f64d4c04 small tweaks to the runtime-extensions
ab055958 added an arithmetic stresstest2
a802ed13 fundamentals have been unified with apply_funs. All tests pass but probably a period of bugginess ahead
f00d6b46 added lbm-version extension to runtime extensions and changed return value on allocate_list_init in case there is not enough memory
2445974a preparations for unification of apply_fun and fundamentals
114b9a60 removed rot-vector function from Math extensions and added exp
6e1e7ee0 changed return value of define and added loop extensions from Benjamin BLDC
79622417 added loop extensions. todo: add tests

git-subtree-dir: lispBM/lispBM
git-subtree-split: 8dc4c6d9c16f7fce9753737423b8700f477f75f0
2023-02-11 10:20:37 +01:00
Benjamin Vedder 65a3ed7ca4 Squashed 'lispBM/lispBM/' changes from 1eceb43f..1267d006
1267d006 added one more memory test
a9782eda added two tests that try to be quite hard on the lbm_memory.
5c0841f8 small additions to matvec
bcb1ad7f added vector multiplication by scalar
ce5025cc small additions to matvec.
1758b335 renamed blas_extensions to matvec extensions as they wont provide the same set of operations as a blas library usually does
2e48e6b4 fix silly typo in lbm_memory.c
62154010 only initialized mutices 1 time
d1dbfd7c added a test of events
cb97d623 only add events to the event queue if there is an event handler
7a642222 removed usage of send_message in process_events
e3a68115 events are moving into the evaluator
64239a9b tweaks to random extensions
d61950d9 removed a print from sierpinski
f8a1d586 added sierpinski and flake examples to sdlrepl
72d8e4f4 added random number extensions to sdlrepl
ba9c449a changed constants involved in the pseudorandom generator.
8806e369 remove left over debug printing
10cc7fab added random number generator extensions
184c756b added memory leakage tests for string extensions
4373713d work in progress linear_algebra extensions
135591bd added str-merge test
7bff0e97 added a test. more to follow
e1aad339 added a small set of runtime system related extensions
5495b5da updates to custom type interface.
4e3b408a rename strnlen to strlen_max
03644f64 pulling in string extensions from vedderb\bldc into string_extensions.c
294f013b grabbed a few extra array-extensions into array_extensions.c from Vedderb/BLDC
87f95e67 adding all the Math extensions from Vedder/BLDC to math_extensions.c

git-subtree-dir: lispBM/lispBM
git-subtree-split: 1267d006e90085920a3de720480dc2d19d71c8ff
2023-01-24 09:19:05 +01:00
Benjamin Vedder 196bb2e812 Squashed 'lispBM/lispBM/' changes from 2d281d94..1eceb43f
1eceb43f sdlrepl 1M lbm memory
d1803070 removing the done queue that is nolonger used for anything
84820a1d fix bug in recv
bb4c5f40 tweaks to SDL repl. Compiles again

git-subtree-dir: lispBM/lispBM
git-subtree-split: 1eceb43f0fa3acc88f4b79a9e0a9e5517f9e991d
2022-12-28 13:18:58 +01:00
Benjamin Vedder dccfe15135 Squashed 'lispBM/lispBM/' changes from 7756d581..b3d8a6b2
b3d8a6b2 removed functions that nolonger have a purpose
306722dc remove the possibility to step through program and reorganize the most critical loop structure
aa6eb5ca  remove encode, decode from refman
899d8579 update README and plot script
132e9364 updated readme with more detailed intro

git-subtree-dir: lispBM/lispBM
git-subtree-split: b3d8a6b21af4683af8837ad1a5106cf0d2d7eac9
2022-10-06 13:58:38 +02:00
Benjamin Vedder 76400e7ca0 Squashed 'lispBM/lispBM/' changes from 42aa0d95..be53df12
be53df12 refactoring for evaluation speed

git-subtree-dir: lispBM/lispBM
git-subtree-split: be53df12441590b855a7f706f2319447f15cba80
2022-10-02 17:51:48 +02:00
Benjamin Vedder 4105a02e10 Squashed 'lispBM/lispBM/' changes from 337ecc93..ebfa4c83
ebfa4c83 bugfix related to allowing parsing of underscore symbols, read_error specifically
926121ae bugfix related to allocation of arrays
603a58ea added spawn-trap and exit-ok and exit-error functions. All tests pass

git-subtree-dir: lispBM/lispBM
git-subtree-split: ebfa4c8393c071ce1babdf873d3adef17968b217
2022-10-02 08:36:11 +02:00
Benjamin Vedder 39a306bed0 Squashed 'lispBM/lispBM/' changes from efc1dbb7..ee23f4ab
ee23f4ab mailboxes are now arrays and of a finite size

git-subtree-dir: lispBM/lispBM
git-subtree-split: ee23f4abaf11468d0714e9ff69f881255575a711
2022-09-25 11:32:52 +02:00
Benjamin Vedder 08c0898a0e Squashed 'lispBM/lispBM/' changes from c2e0433a..aba5cf5a
aba5cf5a added a sleeping contexts iterator
5955c062 update doc readme
bb095b49 update doc readme
54e0af08 tweak documentation readme2
ecefdcec update readme slightly
a3a97657 small tweak chapter 3
c6383fc4 update concurrency in lbmref
630f1586 removed misleading comment from test_read_2.lisp
db30bd55 added self function and another concurrency test
3f6298b0 added a self function that returns the ID of the the thread that calls it and a concurrency test
95aa4b41 added comment and did whitespace pass over tokpar.c
8822052e a tiny bit more cleanup of tokpar.c
ff7e80c5 some cleaning up in tokpar.c
6bc47c40 ESP32 example now compiles again.
eb9b7e82 update sdl example repl to work with new channels
bccbad5f added documentation to lbm_channel

git-subtree-dir: lispBM/lispBM
git-subtree-split: aba5cf5ae0579c38c44b556db125bb7343d32732
2022-09-20 11:32:37 +02:00
Benjamin Vedder 9bd826e646 Squashed 'lispBM/lispBM/' changes from 60d7c83f..c0fb4af8
c0fb4af8 Streaming reading or source into the heap
540f1e9a added n-times test for low-freq concurrency bug testing
5dcf25bf update chibios examples to use new reader
7775f92d starting to look good, needs more polish...
86ecd85b On the path
b0ce4e67 tweaks to next_token
c7ed1e3d Update and discovery of nondeterministicly appearing bug
a0a1b000 Ok start
090f54e9 experiment with channel abstraction
d4c1ba41 added some tests of array syntax

git-subtree-dir: lispBM/lispBM
git-subtree-split: c0fb4af806ad8d42365a1b8695d2603f640df662
2022-09-16 09:25:46 +02:00
Benjamin Vedder b82ab77c6c Squashed 'lispBM/lispBM/' changes from 6f442405..28c56c43
28c56c43 Update README.md
d975e8b6 update readme
9e0bbcba update readme
ad38f2d0 updated readme with a note about switch of scheduler
756f2d71 Round-robin scheduling quota can be set from the C code
45edcd9d update: fix typo
dade6935 Added atomic operator
4ff6665a Mostly ok round robin scheduling at this point I think.
a6af047a experimentation and planning
e69d36e7 fair round robin scheduler running but slow
3a0e6905 Merge branch 'master' into sched0
2784f8e5 bugfix symrepr.c
c464a78e work in progress
207a0b92 Merge branch 'master' into sched0
a916a1af experimentation and preparations
b9565fbb broke out a bunch of useful definitions into an lbm_defines.h file
1fb91025 update to platform_uart for chibios
16640653 additions to chibios platform uart and some additions to string extensions
6bfbb376 added array-clear
8e2bc4a3 Improvements to revamped reader
84ff5198 Considerable rewamping of the reader - passes all tests but there are some issues to resolve
bfdf352f minor tweak
f33fde26 Modifications to uart stream in platform chibios
571a1382 low-level character stream from a uart. This has some problems!
2f49efe9 Experimentation streams
4437c69e tweaks to platform uart
dd181414 fix typo in platform_uart.c for chibios
5b9ae388 chibios repl uart tested and seems ok
49409772 untested uart extensions in chibios repl
af5d03d8 untested uart implementation for chibios repl
5bde526b added one more test case for conditionals
dceb4d26 added some new tests
0f477d09 pedantry
dc5b08d9 Some pedantic tweaks to close some jump-misses-init warnings
c5aff865 A pass to make static analysis happy
0bdd23c3 update
12a93acc update ch3 with some small tweaks
ac881933 added more text to chapter3 about concurrency and message passing
d8589b75 update
59229152 update
85ef5a79 update lbmref description of namespace
4fd7e48f added information about namespace to lbmref
b93cd379 added some tests of namespaces and updated the compressor to allow the : character
48a99c13 Merge branch 'master' of github.com:svenssonjoel/lispbm
8f019213 updated behaviour of lbm_define related to #variables and the addition of simplistic namespaces
1d824a4e Update ch3_concurrency.md
dcb2ef38 wip
a0d5971d work in progress
4c9818c6 typo
06fbaac7 work in progress ch3
26a466e0 chapter 3 in progress
f376ae8e ch3 concurrency in progress
d1399247 added some images to manual ch2
ac813050 fix bug that surfaces if no dynamic load callback is present

git-subtree-dir: lispBM/lispBM
git-subtree-split: 28c56c436d3cb621a775bb648d60660563c5352e
2022-09-04 16:08:58 +02:00
Benjamin Vedder 08da2db380 Squashed 'lispBM/lispBM/' changes from 5c7c28f5..4d6badc8
4d6badc8 Merge branch 'master' of github.com:svenssonjoel/lispbm
44b05640 adding an extension with the same name as an earlier added extension should now replace the previous extension with the new one
2e878154 added lbm_memory macros for 10, 12 and 14 K of lbm_memory
37c3bff6 store size of symbol table and provide function for getting table size and total size of strings stored in table
5658f36c fix comment

git-subtree-dir: lispBM/lispBM
git-subtree-split: 4d6badc89760869504d4dbf0e9e1c51934b10ce2
2022-05-09 16:24:00 +02:00
Benjamin Vedder 4dbe8c6837 Squashed 'lispBM/lispBM/' changes from 90b18761..be981ff1
be981ff1 added setix to refman and a way to block a context from a c extension together with a way to later unblock such a blocked context from C
8d4ec0e3 small tweak to the main evaluation case (function application).
289c69a6 a small tweak for closure argument evaluation efficiency
664347f4 added the lbm_stack_reserve function for allocation of multiple words on the stack in one go

git-subtree-dir: lispBM/lispBM
git-subtree-split: be981ff1f8e40b40dfa1dcbc43075e9e8ec9fa9c
2022-05-03 22:58:33 +02:00
Benjamin Vedder 64241f5b10 Squashed 'lispBM/lispBM/' changes from 729c0e51..c155cb49
c155cb49 remove printf
18fe416c fix assoc
74339abd added explicitly free for streams

git-subtree-dir: lispBM/lispBM
git-subtree-split: c155cb49b20e7a559031155f5a6b4e7b0707d790
2022-04-29 15:51:09 +02:00
Benjamin Vedder b28b9c8eae Squashed 'lispBM/lispBM/' changes from 1f19918d..24b8df22
24b8df22 adding text to manual ch2 and tweaking iota to enumarete up to (- n 1)
7558ee8d update manual ch2
ac09a621 work on chapter 2
a0ccae7f differentiating betwen applying to too many or too few arguments in a closure application
b002e1a6 update ch2 tiny
10efcb11 update ch2 to match current REPL formatting
f485a5f1 make REPL less verbose and update chapter 1
c7194629 work on ch2 and some additions to repl
6146a6c0 the reader will now signal via a callback when reading of source is completed

git-subtree-dir: lispBM/lispBM
git-subtree-split: 24b8df22427e05561c1dae8a60297b98a0027a74
2022-04-24 12:34:49 +02:00
Benjamin Vedder de7b14ffe2 Squashed 'lispBM/lispBM/' changes from 6deae379..ccca9778
ccca9778 update lbmred.md
e182bffd changed doc i28 to i
3b277e28 error message printing verbosity level can be toggled between high and low
0f00e692 update one of the call-cc tests
6a377f74 added some tests of call-cc
4f3e8adc update application of a call-cc continuation. zero arguments is ok, will apply to nil. More than 1 argument is an error and terminates the context
50fdd498 small tweaks to repl-cps

git-subtree-dir: lispBM/lispBM
git-subtree-split: ccca9778ee0ddad6ea44bdc309ba128c92723309
2022-04-03 12:26:23 +02:00
Benjamin Vedder 9a62433015 Squashed 'lispBM/lispBM/' changes from 6199703d..43ebce71
43ebce71 Fix formatting int print.c and constants that default to float/double
fa220f0b update gc statistics collection a small bit
25b20686 fix get_heap_state
783d774e Arrays of 64bit values passes the associated tests. More tests are needed though
ff40d02f working on 64bit arrays. more testing needed
204bea39 CMP as a macro instead of 8 different functions
44bb152d added a set of math extensions grabbed from  Benjamin's bldc repo
9c34b4cd added string extensions from benjamins bldc repo
b4370155 merge in changes on master into dev64bit
c129344b fixed masking bug in fundamentals
ed3ab5be closed down ome warnings when building 64bit
d46564c9 expanded functionality of type-of to cover 64bit types and preparations for arrays of 64bit values
f7cb5538 added more 64bit functionality to fundamentals and a tiny amount of tests
4dafbe6c added decoders for 64bit values
63026a8a added 64bit value literals
8c1f0f0f made GC aware of lbm_memory allocated values
17148ada 64 bit values allocated on lbm_memory on 32 bit version
4445e5a8 sketch of encoders for 64 bit values
f636e64d suffix for the lisp size of int and uint are now i and u instead of i28 and u28
840723ca preparations and planning for 64bit types in both 32 and 64 bit versions.
13675dda 64bit up and running. but there are many TODOs
033bfd9a small fixes following bug hunt
f5c984de fix bug in representation of important masks and constants
d40b2437 Merge branch 'master' into dev64bit
06f9603f Merge branch 'master' into dev64bit
69950ba1 32 bit tests are ok
46b6fa28 Merge branch 'master' into dev64bit
b9e2c993 work in progress
8dff9b4d work in progress
a241aded work in progress
4738e0da update year in lbm_types
ca469923 made it possible to run the same tests as on the 32 bit version on the 64 bit code
85acec30 small tweaks tp create_ctx, use correct type
bf0286a7 Merge branch 'master' into dev64bit
824e1634 Merge branch 'master' into dev64bit
04a97f17 lots of testing needed
ea862cce a bunch of changes in preparation for 64bit compatibility.

git-subtree-dir: lispBM/lispBM
git-subtree-split: 43ebce71a281f4a158b8d2dec3fc537c26766ec3
2022-03-25 15:47:05 +01:00
Benjamin Vedder 58daf1b609 Squashed 'lispBM/lispBM/' changes from 78047efe..6199703d
6199703d removed left over debug residue from destructive reverse
5f3257f4 added a destructive list reverse function
421d5a61 returning an error from an extension now terminates the context in which the error happened. There is still one retry in the case of merrot
c6d9a3cb update changelog
6332a158 added a way to register an error reason string from extensions. pretty untested at the moment
e9a7fa5d update README
f9a66bfc fix left over num-eq in doc
52c4e05f doc update
b54230f8 md doc test
80125f23 experiment
1278aa24 update
e576c4f2 md doc

git-subtree-dir: lispBM/lispBM
git-subtree-split: 6199703df06c4a5709c84cb17102a8e088caa847
2022-03-10 16:29:11 +01:00
Benjamin Vedder ba0a6ec008 Squashed 'lispBM/lispBM/' changes from fb7d3503..8a9ff6cc
8a9ff6cc remove commented out code from gc
68562022 added a way to start gc from a lisp program
3e35264a just removed a small commented piece of code that has not been active for a long time
5c84c5af update benchmarks runner slightly
87a5e88c delete benchmarks
70716612 chibios examples build and run
e3e6ab65 chibios-repl compiles and runs again
01462c32 updated the llama

git-subtree-dir: lispBM/lispBM
git-subtree-split: 8a9ff6cc69e4fcb54fd197256509c9d1c554db7c
2022-03-06 02:01:41 +01:00
Benjamin Vedder 0e09e51a45 Squashed 'lispBM/lispBM/' changes from f700e1a7..19c6ca34
19c6ca34 context ids are now set to the index into lbm_memory where the context structure is stored
1d92e257 tweak changelog
7bd40932 Process stack and context are now immediately removed from lbm_memory upon completion
3cf4ed9a Tests nolonger relies on wait_ctx to get the result of the test-program
9b21bc98 removing the context stack as soon as a process finishes

git-subtree-dir: lispBM/lispBM
git-subtree-split: 19c6ca34cfddc951f7eddcf55e4ece1cd8218462
2022-03-01 00:53:55 +01:00
Benjamin Vedder f8d35e71f1 Squashed 'lispBM/lispBM/' changes from a7e04542..34faf757
34faf757 removed some dead code and made is_error more efficient (probably)
417731d4 tweak error message for eval error
30b01841 added a first version of more human-readable error messages. This will be improved over time
8337c4b6 align with master

git-subtree-dir: lispBM/lispBM
git-subtree-split: 34faf75787b62bcfe1a2785749fe4155ca12b83d
2022-02-27 23:16:13 +01:00
Benjamin Vedder 22ef0a5861 Squashed 'lispBM/lispBM/' changes from 0a38cb96..2d78c54b
2d78c54b added callback mechanism for loading dynamic loading of missing functions

git-subtree-dir: lispBM/lispBM
git-subtree-split: 2d78c54b3aa16c2ac0a02c45b42dc991143cfa7a
2022-02-23 20:30:52 +01:00
Benjamin Vedder 84a79f8109 Squashed 'lispBM/lispBM/' changes from 1108de58..0535cf11
0535cf11 version 0.1.0
f7c1b0d1 fix bug in last commit and remove dead code
305d3dce change behaviour of spawn to take a closure + arguments. No multi-spawn in one call anymore
93697f7a cleaning and restructuring in the evaluator
1e0d70f8 tuning evaluation of functions some
419e34fd small tweaks doxy
84bec750 Removed the nil-entry from the environment. It should make no difference
09868fea update doxy
f02a9087 fixes to doxy
d2087165 more doxy and fix fundamental array operation
488a4c35 update doxy
799328fc update language ref man
050c34b9 more doxy work and some small tweaks to reader when it comes to quotes
3948e566 added bitwise operations
e777189b zephyr example compiles, testing needed
426b71e4 doxy planning
8264fd37 shift left and right
5a61bf41 tweak readme
c82f587e accepting that eval-program is a very predatory operation
728b6511 doc tweaks
41aedc57 update to doxy
7a53228e added function for sharing of arrays from C to lbm. little bit of doc.  TODO: test arrays
c4931b4a small update to doc
3e7f31fb small additions to doc
8325bf09 user now has to provide a recursion stack fro the print_value function
f1fdd5f7 The GC recursion stack has to be provided by the user now

git-subtree-dir: lispBM/lispBM
git-subtree-split: 0535cf11214a6ba8c81f86929deaad34c30b3790
2022-02-13 14:25:39 +01:00
Benjamin Vedder 6aa01e2cfc Squashed 'lispBM/lispBM/' changes from 18d9001b..1108de58
1108de58 added possibility to take n steps in the evaluator
9fb1863e added match-binders for u32 and i32
b591bd3e fix to match that allows matching on boxed types

git-subtree-dir: lispBM/lispBM
git-subtree-split: 1108de58965232fcfb2cb173db6e8696319f1bb5
2022-02-03 12:49:33 +01:00
Benjamin Vedder 0af11fc982 Squashed 'lispBM/lispBM/' changes from 748477b9..9559204f
9559204f added lbm_define to allow definitions to be added from C
d5390ade added a pause function that performs GC if less than N elements are free
9f7f015b mostly just rearrangements
2e96957d bugfix related to read after changes to array representation. New test added that shows a problem with read-program, this is a bit of a puzzle to solve. Something to ponder on for a while
aa6bfff9 can read multiple values from array to a list.
8b8daa6d Nothing of magnitude
313806c9 more preparations for lbm arrays pointing to C memory
9b361ba8 preparing for arrays that are shared between C and lbm. Dont know yet what to do about the possibility of concurrent modifications to these arrays
39257a5a doxy fix renamed files
955a5a2c update to doxy, still lots to do. Rename one file.
ae0d140f adding some built in functions for encoding and decoding to and from lists of value representing bytes

git-subtree-dir: lispBM/lispBM
git-subtree-split: 9559204fcfd0b403fdec524910c10d8bd57d0437
2022-02-01 20:40:07 +01:00
Benjamin Vedder fafa5c9779 Squashed 'lispBM/lispBM/' content from commit 748477b9
git-subtree-dir: lispBM/lispBM
git-subtree-split: 748477b953fbd06094fc17c1c6332bf5f9cea7d0
2022-01-29 17:26:45 +01:00