Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

最近の作業部屋活動履歴

2023-10-21
2023-09-26
2023-09-19
2023-06-05
2023-04-25
2023-04-03
2023-03-28
2023-03-13
2023-03-03
2023-02-26

最近のWikiの更新 (Recent Changes)

No changes on this wiki.

Wikiガイド(Guide)

サイドバー (Side Bar)

Cammy

  • R/O
  • R/O (HTTP)
  • R/W (SSH)
  • R/W (HTTPS)
Fork

A categorical programming language

Release Files

No download files.

Recent Commits

Rev.TiempoAutorMensaje RSS
97a7a3ed2024-05-24 14:09:14Corbinjelly: Fix the problematic rule.
539486b92024-05-24 12:52:47CorbinAdd jets, resolve type-occurs issue. I think that we're ...
eaf6455a2024-05-23 06:55:10CorbinRemove a couple old scripts.
b388cf332024-05-12 15:26:57Corbinbk: Polish extraction and jet listing. As a result, shar...
1fd0c73e2024-05-12 14:49:36CorbinMove 2to3 to subcommand of bk. This was straightforward ...
b659b9c02024-05-12 14:05:05Corbinbk: Extract trees from v3 hives. I'm a tad worried about...
0fd7d47e2024-05-12 13:20:56Corbinbk: Switch from CHICKEN to Python 3. The main motivation...
e48278212024-05-09 13:58:38CorbinClean up envrc. It's still kind of specific to my setup,...
4c3ba20b2024-04-27 10:18:15CorbinAdd rpypkgs; bump zaha. Didn't mean to bump zaha, really...
cfdc50df2024-04-27 10:16:51CorbinMake a plan. I wanted to add rpypkgs, but I effectively ...
# 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.

Latest updated Tickets

No tickets

About Chamber Wiki

Welcome to OSDN Wiki system. Here is your chamber Wiki space.

Check Wiki Guide (English) to refer syntax and functions.