A categorical programming language
Rev. | Time | Author | Message RSS |
94316419 | 2024-06-30 10:09:30 | Corbin | Add a sort of Maxwell's-laws presentation. I don't perso... |
b0644bda | 2024-05-30 11:14:08 | Corbin | Clarify some notes. |
97a7a3ed | 2024-05-24 14:09:14 | Corbin | jelly: Fix the problematic rule. |
539486b9 | 2024-05-24 12:52:47 | Corbin | Add jets, resolve type-occurs issue. I think that we're ... |
eaf6455a | 2024-05-23 06:55:10 | Corbin | Remove a couple old scripts. |
b388cf33 | 2024-05-12 15:26:57 | Corbin | bk: Polish extraction and jet listing. As a result, shar... |
1fd0c73e | 2024-05-12 14:49:36 | Corbin | Move 2to3 to subcommand of bk. This was straightforward ... |
b659b9c0 | 2024-05-12 14:05:05 | Corbin | bk: Extract trees from v3 hives. I'm a tad worried about... |
0fd7d47e | 2024-05-12 13:20:56 | Corbin | bk: Switch from CHICKEN to Python 3. The main motivation... |
e4827821 | 2024-05-09 13:58:38 | Corbin | Clean up envrc. It's still kind of specific to my setup,... |
# Cammy "[Cammy is] really not a good language for anything." ~ [Me](https://lobste.rs/s/ftqp21/whatever_happened_elm_anyway#c_8fnjr6) ## Introduction Cammy is a simple syntax for bicartesian closed categories with natural numbers objects. It directly represents arrows with S-expressions. This toolchain also includes support for IEEE 754 floating-point numbers. ### jelly The `jelly` tool reads Cammy expressions and emits equivalent Cammy expressions which are usually smaller, sometimes more accurate if using floating-point maths, and sometimes more generic. ### bk The `bk` tool encodes Cammy expressions into git repositories. When we use git in this fashion, we obtain Cammy hives, a content-addressable and scalable system for managing Cammy expressions. ## Toolchain maintenance ### How to add new primitives/jets * Jet definitions in jets.json * New primitive arrows in prims.json * CAM operations in cammylib/cam.py * Parser/compiler to CAM in cammylib/arrows.py * Typechecker in cammyo.scm * Interpreters in cammyo.scm and cammy.scm * Algebraic laws (optimizations, jet introduction) in jelly/src/main.rs ### Jelly The jelly optimizer is a Cammy-to-Cammy optimizer which uses e-graphs to search for the smallest equivalent expression. The rule engine is from the `egg` library. The rules are written in a DSL embedded in Rust, along with comments explaining their provenance and correctness. To update Cargo dependencies for jelly: $ ./update-jelly.sh ### Movelist The movelist is a relational typechecker written in CHICKEN Scheme's dialect of miniKanren. It can typecheck a Cammy expression, or take a type representation and synthesize Cammy expressions with the given type. To update eggs for movelist: $ egg2nix movelist/eggs.scm > movelist/eggs.nix ### Shell Environment The environment for developing the Cammy toolchain is contained within `shell.nix`. To update eggs for the shell environment: $ egg2nix eggs.scm > eggs.nix ### Compiling to Categories The second argument to cammy-frame applies a list of functors. Each functor corresponds to a path in the hive; functor `foo` corresponds to `cats/foo/`. The list is comma-separated and applied left-to-right.
Welcome to OSDN Wiki system. Here is your chamber Wiki space.
Check Wiki Guide (English) to refer syntax and functions.
[PageInfo]
(auto generated page)
[Permissions]
view:all, edit:admins, delete/config:admins