• README.md

  • KC3 v0.1.14

    KC3 is a programming language with meta-programmation and a graph database embedded into the language. It aims to be the language for semantic programming, and programming the semantic web.

    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 C99 with an extremely small set of dependencies.

    Supported operating systems (additional dependencies) :

    • BSD
    • Linux (libbsd, libmd)
    • MacOS X (libmd)
    • Windows (MSys2)

    Supported architectures :

    • aarch64 (arm64, Apple M1, Apple M2)
    • amd64
    • i386
    • sparc64

    To install and test KC3 for yourself, you can follow the KC3 Installation Guide.

    There are four programs now written in KC3 :

    • The KC3 Cairo demo which you can run with make demo
    • The KC3 SDL2 OpenGL demo which you can run with make demo_gl
    • The KC3 website which you can launch locally with make test_httpd
    • The www.kmx.io website which is closed source.

    New in this release

    • pretty printer
      • auto indent KC3 code
    • map
      • access
      • get (get key value)
      • put (return a new map)
    • struct
      • access
      • get
      • put
    • facts database (triple store) in KC3
      • new database (Ptr)
      • add_tags
      • remove_tags
      • with_tags
      • with
    • HTTPd v0.2.0
      • dynamic pages (MVC)
        • controllers are defined in ./app/controllers/
        • templates are defined in ./app/templates/
        • dynamic router is defined in ./config.router.kc3
          • For now we don’t match request method and just match the start of the URL with Str.starts_with?(url, route.path)
        • views are defined in ./app/views/
    • fx v0.2.0
      • file explorer
      • preview files
        • text
        • image
        • video
        • audio
        • binary (hexdump -C)
      • properties
        • create
          • POST “/properties/*path”
        • delete
          • DELETE “/properties/*path

    Discord invite

    Join us on kmx.io Discord server !

    Guides

    Follow the KC3 guides to discover how to use KC3 for your own projects.

    TODO

    • fx v0.2.0
      • chaining of audio and video previews (folder as a playlist)
      • tags
        • create
          • POST “/tag/:tag/*path”
        • delete
          • DELETE “/tag/:tag/*path”
        • recursive
      • properties
        • recursive
    • HTTPd v0.2.1
      • dynamic router
        • HTTPd.Router.get(“/user/:id/articles/*slug/edit”, UserArticlesController.show)
    • libkc3
      • operators dispatch
        • list of matching operators (facts_with)
      • base-specific big floats
      • macro cast : (Macro) fn (x) { x }
      • pretty printer
        • 80 columns (\n)
      • tags
        • walker
        • height function (TAG_VOID: 1, TAG_TUPLE: (1+ (max (height tuple->tags))))
        • has_ident
        • collect_idents
      • facts
        • negative facts : 4 + 2n = not 3 + 2n
        • with ignore variables
      • math
        • arbitrary precision floating point numbers (decimals)
      • enums
      • unions
      • errors (setjmp, longjmp)
        • stacktrace
          • ffi ?
            • libdwarf
      • control structures
        • when
        • unless
        • switch/case/cond
      • unwind protect
      • functions
        • return
      • livebook
        • gaussian
      • buf_sha256
      • buf_popen
      • tests