Commit Graph

44 Commits

Author SHA1 Message Date
Benjamin Vedder c9ef4717b4 Squashed 'lispBM/lispBM/' changes from 3b309a7a..a0f97629
a0f97629 remote leftover debugcode
1b6446d8 added documentation for the trap error handling special form
09a5dbf7 a first attempt at a trap that does not require spawning a thread.
5fdaef42 added 2 tests related to the setassoc bugfix!
a430d3d2 bugfix related to setassoc
e35992d5 some experimentation
601d51c4 towards byte-code compilation
54249110 minitweak
bed397b4 If a value is returned after the call to lbm_block_ctx_from_extension, this value is protected against GC until after the context is unblocked
5855144f a way to protect data from GC while in a blocked extension added.

git-subtree-dir: lispBM/lispBM
git-subtree-split: a0f976296e4e88f24e12ca0a2b7f5d45b8aec216
2024-06-05 09:26:14 +02:00
Benjamin Vedder e2eaf24ab4 Squashed 'lispBM/lispBM/' changes from 85675e29..fe287450
fe287450 Fix bug in GC related to callcc using the lisp-array as its storage. Also renaming for compatibility with old C code that interfaces with LBM

git-subtree-dir: lispBM/lispBM
git-subtree-split: fe287450786605c3118397d25a7246e0c35eeedf
2024-05-10 10:53:33 +02:00
Benjamin Vedder 905c4f3044 Squashed 'lispBM/lispBM/' changes from f18a5c10..85675e29
85675e29 refactor of COND to be able to remove the single-use cddr function.
9d0bb92c added a reminder note in heap.c
e0f7403a small refactor in env and addition of high-level array eq comparison
463e9c32 Change to how reader flags are saved and restored.
8271b1ed fix bug: some constant values were not flattenable.
7bf86cf9 small refactor and added caching of clean-cl-env symbol in case of CLEAN_UP_CLOSURES.
ea3ec7da Marking an array is now an O(N) operation with an additional storage of one 32bit value per array.
872355a4 added a self-reminder in heap.c about how to make array marking linear in size of array.
a0c7afb9 be more explicit in what the INCREMENTA_READ context flag is set to upon launching a read
d71c218a added an example of how to implement map over an array
449075bb added note about garbage collection of arrays (so that I remember)
89bff1c9 updated array mark algorithm and added a note about why it is a bit of a tricky problem to mark arrays
fa1e1e41 adding a note about why GC for high-level arrays is a bit of a tricky problem
384c45d0 array-to-list and list-to-array, length now also returns the size of an array
1f226ec7 fixing two issues in print indicated by sa
9abbeddc clean up in print.c
059295c8 high level arrays can now be stored in flash.
32d162b4 high level arrays can be flattened and unflattened
2f96314c experimental high-level arrays
835e1f22 internal renaming of ARRAY to BYTEARRAY has begun
9e733c42 more cases where symbol decoding has been removed
d23995cf removing a number of encodes/decodes of symbols
c6171530 Version 0.24.0
0d4fb1d0 added some info about index into rest-args
9fb71256 made a few cases of floating point literals in lbmref more readable
9bd5e055 fix typo
0961f4bc update lbmref with more text about rest-args
24959852 a start of a flat-value specification in the lbmref.md
37c9fe3a updated 64 bit tests to follow same approach as run_tests.sh and run_tests_gc.sh. Also added 64bit tests to the release script
0d323069 sdlrepl has been absorbed into the standard repl and can be made by 'make sdl'
37f28977 closing some warnings when doing 64bit build. Some things should be specified better.. such as  allowed range of array sizes
376f10f8 small tweak, cleaning
05326ef2 removed old notes
a89aa19b remove old scripts related to building of previously removed examples
238d4752 removing a bunch of old examples that I will not have the endurance to keep updating
fb741051 examples have been moved into repl.
6d52ae40 tweak typo
c63863a8 rename to md
ad7dacee update README
ef0a75d9 update Makefile for change in directory hierarchy
012a82ea cleaning and updating examples in repl directory
35074ebc improved rendering of examples containing float literals
d558c580 started a section about functional and imperative in lbmref
a3c7fda1 update lbmref with latest arithmetic performance
5eb0f0d5 added new charts to show arithmetic performance. TODO update lbmref to display correct info
4d784e27 fix bug introduced into 64bit version by recent changes

git-subtree-dir: lispBM/lispBM
git-subtree-split: 85675e29a299664697476a5b8d64bd50b450f575
2024-05-09 21:26:09 +02:00
Benjamin Vedder df2034b2cb Squashed 'lispBM/lispBM/' changes from 418272ad..7bd15759
7bd15759 added clean.lisp
512cf8bc small improvements to repl make situtation. needs some work still
7231e200 added a build flag CLEAN_UP_CLOSURES that makes LBM clean the environment (and copy) of closures as they are created. This is slow, but nice on some theoretical level
fdfc63ff remove undocumented experimental feature of match
11fda640 added set-union to set-extensions
04215849 stack operation consolidation
1d3ef1eb slight code deduplication pass
5fb4e996 added some missing comparisons to lbmref
02be461c started on a extension library for the set datatype and moved member into that extension lib

git-subtree-dir: lispBM/lispBM
git-subtree-split: 7bd1575901a23ebdfde2dea60051049b0a69d837
2024-04-03 18:39:18 +02:00
Benjamin Vedder 19a0a7cc3f Squashed 'lispBM/lispBM/' changes from 1dd732d9..418272ad
418272ad added a way to load flattened environments into the heap on startup as a library. And added a library for cleaning of closure environments for future experimentation
74eefd1e bugfix in progn variables related to recursive binginds
93536f76 added a member function for list membership checks

git-subtree-dir: lispBM/lispBM
git-subtree-split: 418272ad1454ee414739fe0aef1b30aa9b56002c
2024-03-31 19:00:36 +02:00
Benjamin Vedder 009da692a8 Squashed 'lispBM/lispBM/' changes from fbc2d92b..a03e2756
a03e2756 Removal of fatal error generation where nothing fatal is going on
2472e632 Report a certain function application in a better way than just fatal error
1e3cab6c refactor
b345361f rest-args takes an optional numerical argument that is used as an index into the list of rest-args
18b152d4 adding tests to see if rest-args behaves as expected scope-wise
21166396 added a rest-args function that retreives extra arguments passed to a closure (lambda )
7b4f689a update to REPL and integration of dot->png into lbmref.lisp
6a6b39c0 added dot (graph rendering) functionality to lbmref.lisp and added exec extension to repl
51223814 planning section about evaluation rules
8d1b4bd6 lbmref.md is now generated from lbmref.lisp
672117e4 lbmref.lisp
5bf75e45 added more ref-entries to lbmref-lisp
00bdc8f2 additions to lbmref.lisp
3946725a added ref-entries to lbmref.lisp
1f8c0372 added a bunch of ref-entries to the lbmref.lisp
11bfa1e2 added more to lbmref.lisp
e337cc5e added a simplistic pretty printer to lbmref.lisp and a few more ref-entries
a7763e28 added new optional arguments to eval and eval-program for providing an environment to evaluate within
693420d3 added some ref-entries to lbmref.lisp, and some todos
43a2dc62 additions to lbmref.lisp
e91cf72e added to lbmref.lisp
447e1f7b fwrite and fwrite-str now flushes the filehandle after writing an array to file
b8e972a4 additions to lbmref.lisp and test output for github markdown viewer test
5cba626f Additions to lbmref.lisp
2eb8361f added fopen and fwrite extensions to REPL
23a74220 additions lbmref.lisp
86360788 added a ref-entry command to lbmref.lisp
229914ba small additions to lbmref.lisp
100ea80e towards LBM generated lbmref

git-subtree-dir: lispBM/lispBM
git-subtree-split: a03e2756fde8986711e34e9f403b6921d0be9bc4
2024-03-08 10:35:46 +01:00
Benjamin Vedder 4c1dd30978 Squashed 'lispBM/lispBM/' changes from edb024b7..fbc2d92b
fbc2d92b small refactor of REPL and a bugfix in LBM. equality comparison of bytes was incorrect
dea3279f added example about indexing from the end of a list using ix
8d0deca9 Merge branch 'master' of github.com:svenssonjoel/lispbm
b29cdb00 setix can now be indexed backwards using negative numbers for the index
2f47403e REPL waits for up to 1second for a binding to appear after sending the event to LBM
75ff1eea added error messages for exit code 22 and 23 in REPL
f04e5b6d trying to resolve a concurrency issue in the REPL
a4957659 fix bug in AND and OR. Environment needs restoring

git-subtree-dir: lispBM/lispBM
git-subtree-split: fbc2d92b7636fa044efd95c94df8f4612505518b
2024-02-29 17:22:23 +01:00
Benjamin Vedder 128e19cfa6 Squashed 'lispBM/lispBM/' changes from 520fde1a..edb024b7
edb024b7 BUGFIX: in lbm_is_number that would sometimes incorrectly state something is a number when it is not
a620e42c small tweak to REPL
f9911c0f terminate REPL upon problems, added error codes for traceability
c36f1e72 small tweak lbmref
04cad3d8 rearrange charts
86429f0f added images related to f32, f64 performance on various platforms
108791b9 update the reference manual
90dbbf63 added secs-since operation to repl
134c59a5 changes to perfomance plot python script
6a02f301 Update lbmref.md
b913f173 small note about usage of vesc hardware for data collection
0bbf246a update lbmref with some typo fixes
c62eec6d updates to lbmref
f6e188e0 adding some information about numerical operation performance
b8a55394 adding some information about numerical operation performance
ef58050d adding some information about numerical operation performance
e98d5b87 correct file 32bit
3002333a added perfomance examples
c74558cc adding to refman about numbers
ebca34cb type fix lbmref
3fde1dcb type fix lbmref
bfcd8247 update to lbmref
32b56fd3 added some info to lbmref

git-subtree-dir: lispBM/lispBM
git-subtree-split: edb024b75fe37c8f948fccb4e7d992cf783fd429
2024-02-27 13:39:30 +01:00
Benjamin Vedder 3c051b179a Squashed 'lispBM/lispBM/' changes from 610c2d2a..520fde1a
520fde1a fix promotion bug when converting i32 to u64
1ea55e8a fixes related to LBM BYTE type
fba7e9a9 bugfix related to subtraction of byte values
baab84c3 update lbmref with information about numbers
4a7ac41f addition of tests and changes to type promotion and flat values
7a7cf54a updates to type promotion and some changes to flat value encoding for 64 bit
0e30b53a remove some args from flatten_value_size

git-subtree-dir: lispBM/lispBM
git-subtree-split: 520fde1a9610ec05300d72a898dd477553c29624
2024-02-23 07:08:24 +01:00
Benjamin Vedder 957b720c41 Squashed 'lispBM/lispBM/' changes from 7ba933de..610c2d2a
610c2d2a added a silent mode to the REPL, --silent
79c69181 Fix bug in how errors happening inside of fundamentals are returned
de5c356b fix bug in addition that incorrectly promotes byte values to U type
64219f1b remove some printing in REPL
b24e4c39 fix bug in unflatten value related to 64bit int
baa5bfba fix bug in flatten_value related to the size of expressions that contain Byte sized data
5fc5a7df Merge branch 'master' of github.com:svenssonjoel/lispbm
52665236 minor changes to new repl
22070c29 update README
59b5144a update README
9e8c2a2a update README
582f2235 minor changes to new REPL
24d4b6e0 added storing of flattened result to the repl
412e6483 added a terminate option to the REPL
15af284f  enabled loading and storing of environment files from the new REPL
b5319ebe fix bug in 64bit version, added a NULL check after readline in the REPL
05b3eb61 fix missing include repl
300213b9 preparing for loading and storing of global environment
fc3d20b0 sequence loading and evaluation of multiple source files when using multiple instances of -s flag on repl
1370102c loading source files
4a2f1c3d preparing for accepting source files from command line to the repl
9b45e4da small changes to new repl
ba47441e promoted the experimental_repl to repl status, it is still work in progress but at a much nicer state
fe16c290 cleanup some unused code in repl.c
e6705251 adding general purpose functions from vesc_express to the REPL
a0955b93 fix to state change logic
cfbb6114 started a revamping of experiment_repl now depends on readline, more to do
41c142a3 small fixes to vesc_express hil test scripts
ee763c72 work on automated vesc express fw build with vesc_express from main and lbm from master
3a2884b5 some maintenance and clearning, removal of unused function
ade15e9d removing some unused code
e16a8598 added loging of failed tests to a unique log file for each instance of run_tests.sh
ce9bdcdd fix potential out of bounds writes found by Marcos. Also removed a few dead-writes
5e1bad69 Small tweaks to eval. Changes to test script, store failing tests to test.log and print way less during testing.
93d14889 remove a blank line
04e1dc62 small refactorings
dbadb211 Trying to make the vesc_express hil script slightly more robust
99b6540d added a TTY available check before attempting to launch the tests
fb7fbee7 Added a slightly longer running vesc_express hil test as an experiment. The run_tests scripts for hil tests needs to be made more robust
0dc4b25c vesc_express hil tests now use the new vesc_tool feature of stdout redirection, no uart needed
78781da2 Added framework for Vesc Express HIL tests

git-subtree-dir: lispBM/lispBM
git-subtree-split: 610c2d2a3b0b4724a31929150789cda70b5aacfc
2024-02-21 11:42:12 +01:00
Benjamin Vedder badbe615c6 Squashed 'lispBM/lispBM/' changes from 9e5d4044..93b566b8
93b566b8 removed a call to lbm_free from unflatten
68635765 removal of dead code, removal of pointless conditional in lbm_memory_shrink and switch to structural equality in comma-qualified symbol matching
9470f8ba small update to flatten_value that removes an superfluous call to finish_flatten
f8470b0f update cr note in lbm_memory
8b70f8ed added 0 check for malloc and malloc_reserve
87311c92 modification to how GC handles constant values. incremented version
344ce225 added a lbm_get_gc_stack_size function for easier access to this field

git-subtree-dir: lispBM/lispBM
git-subtree-split: 93b566b8a7c63f566c3408140bba01976163783b
2023-10-22 12:47:00 +02:00
Benjamin Vedder 7e82cff0b9 Squashed 'lispBM/lispBM/' changes from 948bb6bc..9e5d4044
9e5d4044 gc stack is allocated from lbm_memory, it is possible to resize the gc stack by allocating a new one and replace the old. see runtime_extensions for example
77561a9e added a function that returns maximum gc stack level and added an error message when GC stack exhausts
4dfcabf1 added a callback for when a critical unrecoverable error occurs so.
63919e22 Slight opmitmization of stack usage in GC mark phase
38c677e9 Merge branch 'master' of github.com:svenssonjoel/lispbm
fd88cd7e Small overlook of match machinery with minor changes to environment handling and gc roots
173e256b added test of match
0478d16c added 3 tests of match

git-subtree-dir: lispBM/lispBM
git-subtree-split: 9e5d4044c2d36efdd01b080d0db150186922a6d7
2023-10-06 15:54:52 +02:00
Benjamin Vedder 369b723a16 Squashed 'lispBM/lispBM/' changes from 3047e3a3..948bb6bc
948bb6bc fix example evaluator with resent changes
c1a4112b added test of var definition already existing overwrite
2bedc6fb added a test of setq and progn-var
cfe513eb added a test involving setq and closure environments
9eaef7e5 removing a plethora of needless assignments
f38f20bb fix bug related to incremental read having an incorrect flag
512acc16 merge
03727930  fix problem in assoc and cossa
46825aab fix concerning floats on 64bit version

git-subtree-dir: lispBM/lispBM
git-subtree-split: 948bb6bc44c60d63eed89de0aad100d9b281d17d
2023-09-26 16:21:00 +02:00
Benjamin Vedder ce6914364a Squashed 'lispBM/lispBM/' changes from fa3a730e..3047e3a3
3047e3a3 fix bug in unblock_unboxed when unblocking with an error value
0a87a87e extra name parameter to lbm_c_interop program evaluators
04ac2fd1 removed the wait-for flags for lack of use

git-subtree-dir: lispBM/lispBM
git-subtree-split: 3047e3a30e186c58d4f5461c98a4cbcd896c9455
2023-08-28 08:12:30 +02:00
Benjamin Vedder b60ecc8a2d Squashed 'lispBM/lispBM/' changes from a20fb514..a33d675a
a33d675a Profiler interface changed. Profiler now also reports system overhead in a category by itself. System overhead will be large if all you have are threads that do not use up their quota.

git-subtree-dir: lispBM/lispBM
git-subtree-split: a33d675ad1befd1f8046a8a3010f3afaa89db907
2023-08-06 14:47:04 +02:00
Benjamin Vedder bc8abddbc1 Squashed 'lispBM/lispBM/' changes from c1b12e9d..7ed5cc62
7ed5cc62 simplifying eval_symbol a small bit
a378c2e2 cleaning and streamlining with a small performance benefit as bonus
f4661119 removed unused statistics fields from heap_state (functionality kind of duplicates profiler). Small reorganization of eval_symbol
96a118e5 tightened up the run_eval loop a small amount
574309a6 Laptop charger just exploded so uploading what I have locally. Additions to profiler and tweaks to GC
0278230b Added arithmetic stress tests
b0ad9619 added additional arith stress tests
5cb11cdf update lbmref and lbm_version.h
04d8483b Unified sleep and blocked queue, added profiler. Needs documentation and additional testing (WiP)
4a709753 timeout functionality added and restructuring of queue handling in main loop. Much testing needed
e2605f7b flatten value calculates the size of the memory buffer needed to create a flat value. flatten now takes only one argument, the value to flatten.
b79455aa added match test for const block
df35d9a6 attempt fix of issue showing up in pattern matching from constant code.
0021d4c5 removed left over printf and fix in flatten that could leak memory
a7abb204 flat values are now part of the language. lisp values can be flattened and unflattened. Added kill function for termination of threads
ea58c616 Added a flat value constructor for symbol as string

git-subtree-dir: lispBM/lispBM
git-subtree-split: 7ed5cc621360d19577c5b14836c5ecd9fd608a1d
2023-08-03 09:53:38 +02:00
Benjamin Vedder 7b5d568437 Squashed 'lispBM/lispBM/' changes from bad046b0..c53ee21f
c53ee21f fix lbmref
cecd5f29 update buclear in lbmref
4c7dad51 Storing symtable list structure in flash when @const-symbol-strings is active
ad974fbf setting flash string counter to 0 at init of symrepr
dbc14c56 added an @const-symbol-string evaluator flag for storage of symbols in flash memory

git-subtree-dir: lispBM/lispBM
git-subtree-split: c53ee21fbaae7f419e096914d2bc5d8528037d88
2023-07-05 15:01:47 +02:00
Benjamin Vedder 96c9007314 Squashed 'lispBM/lispBM/' changes from 5f69e529..bad046b0
bad046b0 indentation fix
e7115787 bump version
fc2646ac slight improvements in read errors.
a3389b91 added env-get and env-set to runtime extensions
9ddb702d cleanup
b7472ae2 more details on flash error temporarily
0db26c7f slight cleanup, should be equivalent

git-subtree-dir: lispBM/lispBM
git-subtree-split: bad046b0ce19871caecdf061890744e6daaed095
2023-07-01 14:51:26 +02:00
Benjamin Vedder f6eeba8336 Squashed 'lispBM/lispBM/' changes from 15fd3dea..02887bfd
02887bfd Change implementation of car family in evaluator for immediate termination on error
7517c2e1 bug fix in wait-for and addition of a few tests
275a8e46 removed pointless usage of WITH_GC
143d024c bumped version
a4836c7d closing a number of warnings when building 64bits. some still remain
e61c28e9 closing some warnings on 64bit build - lots to go
68a09916 a small amount of cleaning.
bd91e152 wait-for + trigger mechanism has been added, but is untested
70c82228 adding tests of undefine
003887d8 fix severe bug in undefine
bdc30576 Added two undefine tests
4e694bc8 experimental wake-up lbm task framework, work in progress
38068776 cleaning and refactoring
7e814674 cleaning and consolidating
b05615fa cleaning and consolidation of functionality
2b986f7c small refactor for
ce05734d removed dead code in evaluation of the progn continuation
9eeae272 made global env a static variable in env.c
1eacbf3f refactoring. may save a few cpu cycles in list allocation and GC

git-subtree-dir: lispBM/lispBM
git-subtree-split: 02887bfd12a8d98f2e6f73b3dbd38b9ec222358a
2023-06-12 11:49:07 +02:00
Benjamin Vedder d664184ef8 Squashed 'lispBM/lispBM/' changes from 6a448aa3..c097f5c6
c097f5c6 cleaning pass and refactoring
5384d522 refactoring application experiment
087ede4e refactor: readability, clearity and in some places - to a small degree - correctness
89575d8b small change to one event test
ba6e7fa7 logged change
16ac6bd1 logged change
089468b3 removing make-env. in-env in the interest of keeping core language small
f18015f7 Merge branch 'master' of github.com:svenssonjoel/lispbm
5b19dfda simplification and readability refactoring.
8c492889 Update gotchas.md
754221b9 Update gotchas.md
a0931bac bump version
e49071dc Changed behavior closure application to zero args. Application of a continuation (call-cc) with 0 args still uses the old approach where 0 args is equivalent to application to nil
35f495f3 mini tweak readme
fdd01ff1 update README
b21a3fa7 Update gotchas.md
92d9f561 update gotchas
0d708de7 bugfix in incremental reader and addition of a gotchas.md file for edge-case behaviors
d9a38456 updated lbmref with take and drop
86b1cc1b take, drop, change to make-env returned result
ea29f5ec added take and drop as built-in primitives and change to result env for make-env
55a5b1f5 added some tests and  a small amount of doc
e2d2f745 tweaks
bccdee1f make-env and in-env
3a03232a added make-env and in-env for library-encapsulation
e5b5ba66 mini tweak
dce87812 removed extra ;
190b4d9e mini tweak
6864fa32 fix repl after removal of reading_done callback
ea3aba39 removed reading_done_callback and made the nonsense default variants for all remaining callback
427cb37c bugfix read-program, tightening up,  cleaning
119d9fd3 refactoring and tightening up
10573404 cleaning and readability
63b750b5 small tweaks
d44c8bdc bug fix related to row numbers in error messages while doing incremental read. Now more precise.
d0125bd1 refactoring for readability. setjmp/longjmp for escape from deeply nested errors.

git-subtree-dir: lispBM/lispBM
git-subtree-split: c097f5c66bd539442a48d41a66da1c657af502a1
2023-05-22 08:17:23 +02:00
Benjamin Vedder 8897516ade Squashed 'lispBM/lispBM/' changes from 95368f36..c9034e4a
c9034e4a fix bug related to incremental read-eval-program
018cc540 added one more const_array sharing test

git-subtree-dir: lispBM/lispBM
git-subtree-split: c9034e4aed0bb437c90c8e8d5dab14e7d6c14ab3
2023-04-14 12:39:14 +02:00
Benjamin Vedder a2113852e9 Squashed 'lispBM/lispBM/' changes from 5659e40a..cb75bd53
cb75bd53 closing warnings
aac53389 repl modification and warning closing
0d7a3006 added array-create alias for bufcreate
5e2e1552 lbm_dec_str decodes both const and non-const arrays

git-subtree-dir: lispBM/lispBM
git-subtree-split: cb75bd53098fd61c453004681d36a1f00534f128
2023-04-04 16:53:18 +02:00
Benjamin Vedder a4cbec1843 Squashed 'lispBM/lispBM/' changes from f7c74492..5659e40a
5659e40a low-level flash errors propagate into the evaluator
cd881c01 tweak lbmref
db42aac7 tweak lbmref
d1033e98 tweak lbmref
77783470 tweak refman bufcreate
d9575830 incremental read-evaluate. Removed all types of arrays except for byte-arrays
d5d5fdf1 type checking in array-extensions
ca072954 buflen is ok on constant arrays
90614b33 bugfix in lbm_channel string_write
de62dbd7 only one is_closure func

git-subtree-dir: lispBM/lispBM
git-subtree-split: 5659e40aac7a1e43b158a978e4e633ef118afeeb
2023-04-04 12:36:41 +02:00
Benjamin Vedder 5a9ec0efd6 Squashed 'lispBM/lispBM/' changes from 4c2ea9e9..ac1d06ab
ac1d06ab removed unused flash writing function pointer
bb241166 merging in move-to-flash functionality into main. Expect there to be some issues
d136d3f8 added an initial attempt at move-to-flash functionality
a3ebb098 more const tests and tweaks. Quasiquotation is NOT expanded to flash at the moment
9a6ff0ec initial flash experimentation
1ec412b4 Append works for 0 and 1 arguments
9d2d79b7 refaktoring of lbm_print_value
eae002ef changed printing of char/byte and arrayes thereof
139eb03b refactoring
9b437892 code readability refactoring
c9701a87 Refactoring for readability and perhaps to a small degree code-size. All tests pass
d56014a3 test for usage of var within atomic block

git-subtree-dir: lispBM/lispBM
git-subtree-split: ac1d06ab20170e38edcd4b204c295240b9b9a739
2023-04-02 16:35:42 +02:00
Benjamin Vedder 7e27031bb6 Squashed 'lispBM/lispBM/' changes from 07baa883..b7956e63
b7956e63 added deconstructive let bindings and local bindings within progn scope via var
7885f957 removed old extension no-longer needed from repl
c169cb8e output version number in lbm-repl
82baec1c Merge branch 'master' of github.com:svenssonjoel/lispbm
88787164 update chibios based benchmarking code
9d48ee29 Bugfix where lbm_memory_free is run twice in a row on custom-type upon gc
8bf35b4a tiny tweak readme
39c72751 update README
3b7bff88 mutex initialized check for buffered char channel
a2b1196c fix leaking mutex on tips from Benjamin
8cfa50dc Threads that are unblocked from C with an error status are terminated

git-subtree-dir: lispBM/lispBM
git-subtree-split: b7956e631b74587d5b4dd61e8b0fb51d53a149be
2023-03-20 19:49:33 +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 e96f03514f Squashed 'lispBM/lispBM/' changes from dd848f86..86722c10
86722c10 fix an off by one error in allocate_list

git-subtree-dir: lispBM/lispBM
git-subtree-split: 86722c105a3d623752002bbac9a3f387fbbd4ef6
2022-12-19 09:26:30 +01:00
Benjamin Vedder 05cbd569a6 Squashed 'lispBM/lispBM/' changes from c81eb021..8b64ae8b
8b64ae8b added some tests for matching with guards.
62e2c688 update lbm_ref
14ec7847 error message on malformed recv patterns
e9ea4e4e match with guards
0e3a29fc Pattern matching now support optional boolean guard expressions
4af283e8 some precautionary changes to certain fundamentals
a4435fb0 added a test of built in map

git-subtree-dir: lispBM/lispBM
git-subtree-split: 8b64ae8b1193fee0f9f9ca361c25ca9357a3384a
2022-10-31 21:52:58 +01:00
Benjamin Vedder 058bea75a5 Squashed 'lispBM/lispBM/' changes from bd485f20..c81eb021
c81eb021 tweak error message
12a8b067 added a built in reverse

git-subtree-dir: lispBM/lispBM
git-subtree-split: c81eb02194e1c556eef52811c11b2679bfb40908
2022-10-28 17:41:09 +02:00
Benjamin Vedder 1e2b53cbbc Squashed 'lispBM/lispBM/' changes from dde9b593..c2bd0cd0
c2bd0cd0 added some more range tests and updated the refman
d96fd1a3 reversing range if end point is smaller than starting point
15bd7eb4 update ref man and added a test of range
e83d6ca8 Added fundamental operation that creates a list numbers in a range. range
f0641f43 added a built in operation that computes the length of a proper list
952fb423 added indexing into lists from the rear. Use a negaive index to index from the rear of a list using ix
f6618b69 bugfix related to environment handling in match

git-subtree-dir: lispBM/lispBM
git-subtree-split: c2bd0cd0745acdc078e541a717ccc82642036018
2022-10-24 09:58:05 +02:00
Benjamin Vedder 898e4df503 Squashed 'lispBM/lispBM/' changes from ca26715a..e76a3deb
e76a3deb removed GC from finish_ctx. Can be taken care of from the C interface
91924e68 clean up heap after an error. Most important after an out_of_memory a bit dependent on how one interacts with the RTS
ba1c57ad new test on setvar together with let - passes.
df38cde4 small cleaning around bug fix area

git-subtree-dir: lispBM/lispBM
git-subtree-split: e76a3debc2abfd8528becb4295eb6f22492b3826
2022-10-11 19:12:37 +02: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 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 1b76c9c67e Squashed 'lispBM/lispBM/' changes from c0fb4af8..4cc6358a
4cc6358a removed uses of \#newline in test_mp.lisp
77ca267f added a channel_reader_is_closed function
e0345592 reader closes the channel when finished even on non-error
977d1439 Small tweaks to tokpar and closing some warnings related to compiling with chibios (shadow)

git-subtree-dir: lispBM/lispBM
git-subtree-split: 4cc6358ad3c377023826da6af1c0bcbab344e3fa
2022-09-16 10:45:44 +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 85ee6ead03 Squashed 'lispBM/lispBM/' changes from 3836952f..cdfd116c
cdfd116c added some tests for partial applications
46d02e9c Added the possibilty to partially apply a closure
788dfa27 debug inspection of local environments in the REPL
b28ceec1 shutting down some warnings originating in repl.c
d35ef54d small tweak example code
5fa6f453 added some sanity checking of the type of the key used in let bindings
81314729 Updates chibios xmas-dac example so that it builds again
0d1f05ca updates chibios example repl so that it builds again
4ae17fc8 small tweak to texture loading demo.
a309e37a added silly texture image for the sdl_texture.lisp example
1dc0e4e6 added texture loading extension and a blit function for drawing sprites on the window
6c249a37 proper scaling on the sleep and timestamp callbacks
e65b0b83 ESP32c3 repl up and running
24f93026 work in progress esp32 repl
958a273d work in progress esp32 repl
d4fb301b work in progress repl example for ESP platforms (esp32c3 specifically)
7e924bf6 freertos includes correctly, compiles. stiill untested
29b9e3a4 added freeRTOS platform files. Untested currently
f3931c13 update README and small tweaks
357bb438 closing one warning
205ca17e small tweak to SDL tree-demo
27c1f601 added a way to explicitly run a custom type destructor and clean up its deference trampoline
d955f26e added missing files
a94dfb5c Update README.md
0e29e692 added SDL example that draws a tree
a5417886 Bugfix in lbm_sdl.c for destructors of window and renderer
b3a0e586 Getting started with interfacing LBM and SDL2
7aa2c1d0 started towards custom types with associated destructors for when they are freed by GC
a8b33a8d safer behaviour of car and cdr in relation to pointer-types that are not really cons-cells
9fbf02ce fixed some inconsistencies
3051e8e7 update change log
8d002536 handling one warning in 64 bit compile
7794a9b2 added array tests
a83f385c Merge branch 'master' of github.com:svenssonjoel/lispbm
21c79aaf fix problem with array parsing in the case of float arrays
dc926e59 added script to generate ctags
38046a49 updates to changelog with changes up and including may 22 2022
45b5d6c0 fix potential corner case issue with call-cc on 64 bit platforms
ebb100a5 some streamlining of the bind_to_key rest continuation in eval_cps.c
1c9a7df2 Added explicit stack version of defunctionalized evaluator example
2812b7b0 added some more testcases in evaluator.lisp and evaldefunc.lisp
0393bd21 New features in evaluator.lisp and evaldefunc.lisp
c6dd4e10 found an evalutor bug related to progn thanks to writing evaluator.lisp and evaldefunc.lisp
5d1bfc75 added continuation passing style evaluator of a mini-lisp as well as a defunctionalized CPS style evaluator for the same mini-lisp
a5a6c2a2 removed commented out old code
c135b4a3 fix problem related to assoc
8ddd44cc removed some code duplication in eval_cps
c625af8e lbmref update
a1a7a4b6 lbmref update
12d9f4e9 lbmref update

git-subtree-dir: lispBM/lispBM
git-subtree-split: cdfd116c655e20bac787a2080b8c601c6bc846ca
2022-07-06 10:18:45 +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 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 5ea5b08e2c Squashed 'lispBM/lispBM/' changes from 4c19fddd..cf470a85
cf470a85 setix and rename of set! to setvar
12b2f2a3 update to chapter 2
a140ddd2 Fix potential null pointer dereference
2dc877c3 work in progress on chapter 2
415d46c7 fix environment handling bugs in pattern-matching
a6a1423b update ch2
f0a78631 update chapter 2
aca7cb5e small additions to chapter 2 in the manual
4fb9b26f starting to think about manual chapter 2
9a4c892e added rule to install the REPL as the executable file lbm into .local/bin in the home dir
3383919b update lbmref
c5ade0ab update lbm_version to better reflect reality
bde07853 reduced the set of expected failed tests
fed58b00 added some more array-syntax tests
965013e3 update refman

git-subtree-dir: lispBM/lispBM
git-subtree-split: cf470a85702aaab6e7cd73712516f22215b8bd61
2022-04-18 18:06:37 +02:00
Benjamin Vedder b0e227d28f Squashed 'lispBM/lispBM/' changes from ccca9778..db80cb7d
db80cb7d updates to how symbols are evaluated, mostly for readability but also efficiency
bb573b53 slight optimizations to mark_phase and mark_freelist
58242f41 tweaking the manual
51666fb5 update manual fix prelude situation
2c6349da work on manual
39a15fd8 update
a5310055 added a bit more text about symbols in the manual
60d59eec added a bit more text about symbols in the manual
f685819e added a bit more text about symbols in the manual
31d56d35 added a bit more text about symbols in the manual
54796c35 added a bit more text about symbols in the manual
e333c00f Small readability and efficiency tweaks to eval_cps
0d234b5e lbm_cadr added and sligth modifications to eval_cps.c using lbm_cadr
85cd864a update changelog
6d2c8685 work on manual
5203a64f work on manual
63ebbae2 work on manual
4a146954 work on manual
19a0d06f work on manual
91c1d992 work on manual
ab393f46 work on manual
26309199 work on manual
c474931b work on manual
1a822e8d work on manual
648f6433 work on manual
6737828a work on manual
2d8e7084 work on manual
3a834fce work on manual
7ae1b342 work on manual
bc5b1fd0 work on manual
d3b6ec4d work on manual
654d70f8 writing on the manual
0d66dda6 tweak readme
d846ea3b update README
2c18d1a6 small tweak
bd9f80e5 allowing more characters in symbols
61827fc2 remove the prelude library in its current form. It is still available in the REPL
f1dcea8f small tweak benchmarking code
3a761cee update manual
e9898b19 make the prelude functions load dynamically when needed by the repl and test-system
714be360 update manual
e1804e3e update lbmref, renamings
508d167c Update README.md
6f3207fa Update ch1_introduction.md
6562daef Update ch1_introduction.md
76b48adf work in progress proramming doc
91c44751 fix repl-cps makefile to correctly build deps
54e66b25 remove lbmref.dox
f0c90ffd update reference manual
5b577572 fix potential bug in cont_application_start

git-subtree-dir: lispBM/lispBM
git-subtree-split: db80cb7dd05eef9e71980a55ff7987118c32c6e9
2022-04-12 10:44:49 +02:00