All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog
39.0 - 2024-08-10
fn
defined for 0 place functions.
38.3 - 2024-05-13
- Removed unnecesary external symbols, arities and duplicated definitions
- Recover dynamic
demod
funcionality so that it is not updated through aneval
that redefines it.
38.2 - 2024-05-12
- Bug in the handling of % and ! in the REPL.
38.1 - 2024-03-19
- More portable code for the application of user-defined macros
38.0 - 2024-03-09
- Shen macros factorised resulting in a 2X faster reader.
- Use Shen/Scheme as the default implementation for building klambda.
37.1 - 2024-01-12
- Redundant factorisation eliminated.
37.0 - 2024-01-12
- Replaced factorisation algorithm with a simplified, improved version.
36.0 - 2024-01-10
- Prolog calls run in their own memory space.
assert
andretract
recycle memory.
35.0 - 2024-01-10
- Type
==>
simplified for YACC.
34.6 - 2024-01-10
- Tweaks for Yggdrasil
34.5 - 2023-08-19
assert
andretract
functions restored.
34.4 - 2023-07-02
- Type of
==>
. - Type of
destroy
. (protect X)
now works insidedefcc
forms.
- Old unused prolog code.
34.3 - 2023-04-02
- Bug in
destroy
function caused by duplicateunassoc
definition.
34.2 - 2022-12-10
- Support for polymorphic types in YACC functions.
34.1 - 2022-11-27
- Correctness bug in the typechecker.
34.0 - 2022-11-27
assert
andretract
: https://shenlanguage.org/TBoS/assert&retract.html
- Bug in compilation of shadowed pattern match variables.
33.1.2 - 2022-10-09
- Made
pvar?
,tuple?
andvector?
more optimizable by backends (like in the pre-S-kernel versions).
33.1.1 - 2022-10-09
- When factorising
defun
definitions, abstract evaluation of branch functions in ashen.eval-factorised-branch
function that ports can override to customize behavior.
shen.*platform-native-call-check*
variable for customizing the check for native calls got removed (not needed anymore with the addition offoreign
).
33.1 - 2022-09-10
foreign
form for marking native platform functions.
- Support for % and ! in the REPL in platforms that don't normalize line-endings.
32.3 - 2022-07-31
- Fixed bug in the compilation of mode forms in sequent calculus.
- Fixed compilation of lambda forms in Shen prolog code.
32.1 - 2022-05-21
- Function overapplication.
32.0 - 2022-03-06
- Integrated changes from the new S-kernel series.
22.4 - 2020-03-07
- Fixed compilation of empty vector pattern matching.
22.3 - 2020-02-23
- New experimental
programmable-pattern-matching
extension. - Extensible selector rules on
factorise-defun
extension. - Benchmarks.
- Fixed bug in typechecking function that made user-defined typechecking rules for lambdas to never run.
- Fixed handling of prolog cuts in some corner cases.
- The t* algorithm now respects user-defined rules for lambdas.
22.2 - 2019-10-11
factorise-defun
extension: Avoid generating unnecessary labels for%%return
expresions for literal values or variable references.
22.1 - 2019-09-29
- New
factorise-defun
extension that performs a pattern matching factorisation optimization on defuns.
- Split initialisation function into many.
22.0 - 2019-09-26
- Premature expansion of some dynamic code when generating
.kl
files so that it doesn't have to be evaluated during startup. Some ports should see a huge speedup in startup times from this change. - Extensions (see
doc/extensions.md
). - New document with instructions for porters on how to upgrade to new kernel releases (see
doc/port-upgrade.md
).
shen.shen
has been renamed toshen.repl
.- A new file
init.kl
has been added and it needs to be included along the other.kl
files. - A new
shen.initialise
function has been added. This function has to be called before anything else. - Load order of
.kl
files doesn't matter anymore.
21.2 - 2019-09-17
- variables that shadow a pattern match variable no longer get ebr'd.
print-vector?
will now handle empty absvectors, returningfalse
.- Removed
<>
from initialisation ofshen.external-symbols
. - Fix
preclude*
andinclude*
not working for datatypes defined inside packages.
tests.shen
no longer resets pass/fail counters when test suite is finished.
21.1 - 2018-10-06
- Support for cons syntax in type signatures (via Mark).
- Make prolog's
call
work with properly with pvars.
prolog?
macro now expands code inline like in SP instead of usingdefprolog
(via Mark).(map F X)
now returns(F X)
whenX
is not a list. The type signature ofmap
remains unchanged. Matches SP's behaviour.map
is no longer tail-recursive. Matches SP's behaviour.
21.0 - 2018-02-17
- Moved code that prints errors at the toplevel to the
shen.toplevel-display-exception
function that can be overrided by ports to customize printing of errors (to for example, include error location).
command-line
function and*argv*
variable.fold-right
andfold-left
.get/or
,value/or
,<-address/or
,<-vector/or
and<-dict/or
.filter
.exit
.- Handling of EOF in the REPL.
for-each
was made internal to theshen
package.dict
,dict?
,dict-count
,dict->
,<-dict
,dict-rm
,dict-fold
,dict-keys
anddict-values
made internal to theshen
package.
- Remove repetition from code generated by
defcc
which made some cases very slow to compile and run. - Fixed the expansion of non-null packages generated by macros.
- Increased space allocated for prolog, fixes issues in bigger programs.
- Made
,
external. - Fixes
nth
for cases where the element is not on the list or invalid arguments are passed.
20.1 - 2017-05-01
(command-line)
function that returns a list of command line fragments. By default it returns["shen"]
, ports can override this function or set the value of the*argv*
variable on startup.
- Fixed
dict-fold
. - Handle integer overflows in prolog's complexity calculation function. Solves issues in ports with 32bit integers.
- In the 20.0 release,
*sterror*
was not properly set as external inmake.shen
, fixed now.
20.0 - 2017-04-23
- Documentation for system functions (
doc/system-functions.md
). - Character based I/O, makes Shen work on environments where I/O streams are multibyte encoded (SBCL >= 1.1.2 on Windows).
- Dict datatype with API:
(dict Size)
— returns dictionary object.(dict? Dict)
— predicate.(dict-count Dict)
— returns dictionary items count.(dict-> Dict Key Value)
— stores value.(<-dict Dict Key)
— retrieves value if it exists or throws an error.(<-dict/or Dict Key OrDefault)
— like<-dict
but returns the result of thawingOrDefault
instead of throwing an error when the key is missing.(dict-rm Dict Key)
— removes value from a dictionary.(dict-fold F Dict Acc)
— walks the dictionary, calling(F Key Value Acc)
for each item in it. The result of each call is the new value ofAcc
, once no more items are left, the final value ofAcc
is returned.(dict-keys Dict)
— Returns a list containing all keys inDict
.(dict-values Dict)
— Returns a list containing all values inDict
.
- Added
get/or
,value/or
,<-address/or
and<-vector/or
. These work like their/or
-less counterparts, but accept as an extra argument a continuation ((freeze ...)
). Whenever their original versions would raise an exception, these variants will insteadthaw
the continuation and return it's result. - Added
(fold-left F Acc List)
. Calls(F Acc Elt)
for everyElt
element inList
. The result of each call toF
is used as the newAcc
for the next call. The final result is the return value of the last call toF
. - Added
(fold-right F List Acc)
. Calls(F Elt Acc)
for everyElt
element inList
. The result of each call toF
is used as the newAcc
for the next call. The final result is the return value of the last call toF
. - Added
(for-each F List)
. CallsF
on every element ofList
(in order), ignoring the results. - Added
(filter Predicate List)
. Returns a new lost with all elements to which(Predicate Elt)
returns true. - Added
(exit ExitCode)
. Exits the program using the specified error code. The default implementation just ends the REPL loop, ports have to overrideexit
if they want the exit code to have any effect. - Added
*sterror*
and(sterror)
, STDERR port. Defaults to an alias of*stoutput*
. - Added
(read-char-code Stream)
. Reads a character from a stream, and returns its numeric value. - Added
(read-file-as-charlist Name)
. Reads the contents of a file as a sequence of characters. The result if a list of numeric character codes.
- Reader is now built on top of
read-char-code
instead ofread-byte
. As a result, Shen's REPL now works on multibyte environments, like SBCL >= 1.1.2 on Windows. - Reimplemented
put
andget
on top of dicts. - Reimplemented runtime function lookup using
put
andget
. - Changed
hash
so that 0 is a valid return value. - Changed
make.shen
so that 19.2 can correctly compile the new version without needing two passes. - Ctrl+D (EOF) in the REPL when the line is empty, exits Shen.
- Declared arity for system functions that were missing it.
- Fixed package prefix handling for internal package symbols.
19.3.1 - 2017-02-19
- New
CHANGELOG.md
file with new format.
- Whitespace cleanup and code reformatting.
19.3 - 2017-02-17
- Fixed Prolog tests.
- Fixed
untrack
function. - Made
<!>
external and declared arity. *home-directory*
is not set anymore if it already has a value.
19.2 - 2015-05-07
receive
made external.- Call failure in
shen.next-50
corrected.
19.1 - 2015-04-28
lambda
introduced as exception forebr
.
19 - 2015-04-02
EQL
introduced in Common Lisp backend.internal
introduced.
18.1 - 2015-03-31
- Kl sources recompiled through Shen 18.
18 - 2015-03-31
function
designed to work with symbol table.
- Dynamic binding for
function
fixed. abort
andabsvector?
given arities.
17.3 - 2015-03-01
- Changed
function
macro to not usefreeze
.
17.2 - 2015-02-23
- Fixed
result-type
.
17.1 - 2015-02-11
function
introduced into standard tests.
17 - 2015-02-02
- BSD license.
- Easy source install (
make.shen
). - Shen standard dot notation native Lisp interface code introduced.
- Non-left linear type checker.
SVREF
fast vector access introduced for CL.speed 3
compiler setting for CL.- Shen standard dot notation native Lisp interface code introduced.
intprolog
and dependent code removed.
sum
made systemf (totals a list).quit warn macro *macros* strong-warning ==>
removed as systemf.unput package?
added to system functions.systemf
returns its argument.- Macro list no longer requires symbol disambiguation.
protect
not stripped properly - fixed.((* 7 8)) = 56
in Lisp backend fixed.- Bugfix in YACC.
(it)
introduced
subst
debugged- read accepts ^ gracefully
- type given correct arity
- expt'l code removed from type checker
- optimise.lsp restored -
shen.
notshen-
- new CL backend
- kill reinstituted
- synonyms becomes a complete demod
- arity error in YACC fixed
- read-byte becomes optional 0-place (bugfix)
- profiler debugged
- read+ removed
- prolog? fixed
- YACC handles lists
- kill removed
- 'type' fixed
- os, port, porters, implementation, version, language introduced as 0-place
- exec in SBCL
- tc? is 0 place
- write-to-file corrected
- variable sharing bug eliminated in type checker
- system becomes byte based
- input/input+/read become relative to streams
- BNF for numbers corrected in spec
- kill added to Shen-YACC
- defmacro returns unit to type checker
- equal?, greater? ... etc. placed in shen package
- preclude etc. fixed
- defcc works in packages
- \ single line comments enabled
- intern, tlstr given arities
- ?x removed from YACC
- absvector given arity
- in systemfed
- absvector redefined for CL
- pr redefined for CL
- duplicated rcons form removed
- read-error fixed
- type checking demodulation fixed
- type checker refactored
- ps given a type
- concat has no type
- string->symbol introduced
- stinput, stoutput, inferences 0 place
- Shen-YACC II brought in - types and guards
- compiler warnings and print hangs removed from SBCL
- printer refactored
- zero place functions brought in
- read-from-string brought in
- write-file corrected
- get-time given arity
- unix systemfed
- stoutput corrected
- str prints streams and closures
- hush removed
- failure object printed as ...
*dump*
removed- all globals initialised in declare.shen
- ?x introduced for YACC
- stinput type corrected
- stoutput introduced
- stoutput type introduced
- fill-vector corrected
<!>
introduced- $ for strings introduced
- UNIX time introduced
- type of intern corrected
- adjoin given a type
- protect introduced for free variables
- \ removed as escape character
- str changed STRINGP for ATOM
- T can be used as a variable
- vectors do not print in reverse
- standard-output works
- map and remove tail recursive
- y-or-n? fixed
- compiler warnings suppressed in CLisp