Skip to content

KC3 v0.1.17

Latest

Choose a tag to compare

@thodg thodg released this 02 Aug 14:10

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_mutex and pthread_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
      .kc3c files, like Python does. Gives 5x faster loading times
      for all .kc3 files. env_load automatically handles this.
    • fixed a bug in ht_iterator_next where 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
  • Facts

    • Facts.connect/accept allows for bi-directional synchronization of
      an existing Facts.database() over a TLS encrypted connection
      after a successful HMAC-SHA256 shared secret authentication
      challenge/response
    • Facts.accept accepts connections one by one
    • Facts.acceptor_loop starts a thread that calls accept()
      in a loop
    • Facts.acceptor_loop_join() stops the acceptor loop cleanly
    • Fixed hash table lookup in marshall reducing every dump by 30%
  • HTTPd

    • allow for configuration of unveil paths in config/unveil.kc3
    • allow for custom log messages in error and request log
  • HTTPS

    • HTTPS.Client with libtls and automatic or manual connection
      • GET method
      • POST method
      • JSON response
  • JSON

    • fixed parser
      • boolean true or false → Bool
      • map {"key", "value"} → Map %{"key" => "value"}
      • array [1, 2, 3] → List [1, 2, 3]
  • 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