Jac Lang

I love exploring new programming languages and I came across a brand new one which combines the concept of Agent design with Code. This fascinating language is called ‘Jac’.

The website: https://jaclang.org/

This is at that exciting stage of maturity where the concepts are still being built up and sometimes examples on the slick website do not work ‘out of the box’. All of this is well compensated by the Two Ideas and the Four Concepts behind Jac.

2️⃣ The Two Ideas

Synechic Surface – this is the concept of codespaces where the same program can contain code that runs in different environments – for example the client and the server. The compiler derives the execution environment based on the code imports present in a given codespace. All the code for the app in one place. Agent-coding heaven.

Topokinetic Core – one word – graphs! Yes – graphs are first class constructs and all data is interconnected. This allows connected context to be built out and ‘walked’ over by AI Agents natively (syntax support for graph creation and navigation). The graph construct can be persisted so you can always maintain context.

4️⃣ The Four Concepts

Built on the idea of Synechic and Topokinetic we add two more to give the four concepts.

Model-backed Functions – functions natively implemented by LLMs. No more creating wrappers/boilerplate with templates for prompts. You can describe the function using semantic hints and offload to LLMs (Jac provides native integration to LLM providers).

Walkers – giving the AI Agents the flex to create and manage state as a graph and then walk over it to execute tasks on matching nodes. With a language likePpython you would need to create queries for a backing graph store with a ton of boilerplate and performance implications as data shuttles back and forth.

Are we in nerd heaven yet?

Putting it all together…

Graph + Walkers give you a fully navigable context layer that can be fed to AI via LLM-backed functions.

Add Codespaces – you get combined applications that can be assigned execution targets where the client and server can operate over different graphs and maintain their own context.

LLM-backed functions also remove the boilerplate of integrating with LLM harnesses and make the whole application ‘one with the LLM!’.

The Gotchas…

There will be a lot of magic under the hood where I expect it will be difficult to understand what is going on in an app. Currently model integration via prompts gives a clean separation between deterministic code and prompt-and-reason (then pray).

Graph + walkers are good and I feel that this will bring some relief but also graphs are difficult to reason about and cannot give the same guarantees as a well-defined table in a relational store. So walkers will need to be resilient and loosely coupled to the underlying data structure.

Codespaces are the real nightmare, as they break down the barriers between what was always considered as a ‘sacred contract’ between the client and server to allow scaled consumption.

The Verdict…

It’s still quite early in the day for Jac but it does bring some interesting concepts to life. I am going to explore it and create some examples to showcase the above.

I have created a small Open Knowledge Format style bundle for you to quiz and gain knowledge:

https://github.com/amachwe/jac_okf

Code examples:

https://github.com/amachwe/jac_test

Leave a Comment