KC3 is currently a programming language project, inspired by C, Elixir and Common Lisp.
It could be described as C with Elixir modules, pattern matching, and a semantic object system.
The idea is to plug modules, closures, pattern matching, a graph database and
metaprogramming into C11 with a small set of dependencies.
New in this release
-
libkc3
- copying temporary variables for
pthread_mutexandpthread_rwlock
would cause undefined behaviour as per POSIX, this fixes pthread on
macOS - allow for log hooks (a C function callback with a user pointer)
in the facts database - incremental compilation with cached parser results in
.kc3cfiles, like Python does. Gives 5x faster loading times
for all.kc3files.env_loadautomatically handles this. - fixed a bug in
ht_iterator_nextwhere the iterator would not
go through the first collision list - database logging now supports and defaults to binary format
(marshall + marshall_read) - fixed marshall + marshall_read hash table usage
- str: fixed display of floating point numbers
- copying temporary variables for
-
Facts
- Facts.connect/accept allows for bi-directional synchronization of
an existingFacts.database()over a TLS encrypted connection
after a successful HMAC-SHA256 shared secret authentication
challenge/response Facts.acceptaccepts connections one by oneFacts.acceptor_loopstarts a thread that callsaccept()
in a loopFacts.acceptor_loop_join()stops the acceptor loop cleanly- Fixed hash table lookup in marshall reducing every dump by 30%
- Facts.connect/accept allows for bi-directional synchronization of
-
HTTPd
- allow for configuration of unveil paths in
config/unveil.kc3 - allow for custom log messages in error and request log
- allow for configuration of unveil paths in
-
HTTPS
HTTPS.Clientwith libtls and automatic or manual connection- GET method
- POST method
- JSON response
-
JSON
- fixed parser
- boolean
trueorfalse→ Bool - map
{"key", "value"}→ Map%{"key" => "value"} - array
[1, 2, 3]→ List[1, 2, 3]
- boolean
- fixed parser
-
RUsage
- current-process statistics for user and system CPU time, current and
maximum resident memory, virtual memory, and open files RUsage.stats()returns all statistics in a single map
- current-process statistics for user and system CPU time, current and