A categorical programming language
Révision | l'heure | Auteur | Message: RSS |
06d54b68 | 2024-11-25 06:23:56 | Corbin | Allow pairing of domains. I'm so pissed that I couldn't ... |
c29e69ca | 2024-11-24 16:54:49 | Corbin | Convert to final encoding. This means the end of cammyli... |
0c80c027 | 2024-11-13 11:24:51 | Corbin | bk: With a flag, allow updating refs. I was able to use ... |
4ad8a592 | 2024-11-13 11:04:48 | Corbin | bk: Parse S-expressions. Obviously cribbed from cammylib... |
68c4802b | 2024-10-30 09:21:36 | Corbin | bk: Correctly extract templates. I don't know why the co... |
2db0900f | 2024-10-29 12:21:41 | Corbin | bk: Hack together a basic insertion command. It works, I... |
d3fcc592 | 2024-10-29 09:43:27 | Corbin | cammylib/pixel: Make RGB sampling work again. |
d269da5d | 2024-10-29 09:43:06 | Corbin | bk: Spit out a big list of names. |
505caa1c | 2024-10-27 08:52:43 | Corbin | Save inputs for AFL. |
6bcb0678 | 2024-10-27 08:52:08 | Corbin | Further harden the parser. This is enough to cause afl-f... |
# 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 ### 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