22 releases (9 breaking)

0.9.0 Nov 29, 2024
0.7.0 Sep 29, 2024
0.5.0 Jul 30, 2024
0.1.0 Mar 29, 2024
0.0.1 Aug 3, 2022

#88 in Programming languages

Download history 192/week @ 2024-08-25 38/week @ 2024-09-01 8/week @ 2024-09-08 14/week @ 2024-09-15 33/week @ 2024-09-22 198/week @ 2024-09-29 7/week @ 2024-10-06 14/week @ 2024-10-13 2/week @ 2024-10-20 131/week @ 2024-10-27 46/week @ 2024-11-03 2/week @ 2024-11-10 21/week @ 2024-11-17 140/week @ 2024-11-24 28/week @ 2024-12-01

191 downloads per month
Used in 5 crates (4 directly)

MIT/Apache

475KB
17K SLoC

The Air Programming Language

The Air programming language is carefully designed to solve programming problems once and for all.

It is an experimental proof-of-concept project and is still in the very early stages of development.

Goals

The Air language seeks to solve programming problems once and for all. It should be able to

  • express any describable information, such as requirements and implementations, problems and solutions, propositions and proofs.
  • provide any information about the language and the program itself.
  • implement any theoretically possible information processing requirement, such as implementing requirements, answering questions, and proving propositions.
  • use information about the language and the program itself to perform property proofs and performance optimizations, achieving the best properties and optimal performance.
  • provides stable syntax and semantics, allowing users to learn the programming language once and for all.

Non-Goals

  • No design choices are taken for granted, and language features are not copied from other languages without review.
  • Suboptimal designs are not chosen to accommodate user habits.
  • Solutions that only solve most but not all problems are not satisfactory.
  • Impossible tasks are not attempted to be implemented.
  • The language is not constantly updated to implement more requirements.

Design

  • Decouple syntax from semantics, making syntax available as a general data exchange format.
  • Build a concise semantic core and provide rich initial context.
  • Allow functions to access context, which means that control statements are just functions that can access context.
  • Implement a universal logical framework based on computability theory, replacing type systems based on type theory.
  • Implement a universal problem framework based on reverse computation theory, used to express any describable requirement or problem, replacing interface/trait systems.
  • Implement a universal algorithm framework based on complexity theory, attempting to achieve artificial general intelligence.

Demo

"A demo of implementing a C-like for loop function" ! do ; [
    c_for = function ; {
        input_name : .args,
        context_name : .ctx,
        context_access : .mutable,
        call_mode : id,
        prelude : prelude .,
        body : do [
            [init, condition, next, body] = args,
            ctx | form ; do ; [
                .&init,
                .&condition while [
                    .&body,
                    .&next,
                ],
            ],
        ],
    },
    c_for [[i = 1, sum = 0], i <= 10, i = i + 1, sum = sum + i],
    sum
]

Dependencies

~2.4–7.5MB
~57K SLoC