The Coalton Language
https://coalton-lang.github.io/
Recent content on The Coalton LanguageHugo -- gohugo.ioen-usTue, 06 Sep 2022 00:00:00 +0000Using Coalton to Implement a Quantum Compiler
https://coalton-lang.github.io/20220906-quantum-compiler/
Tue, 06 Sep 2022 00:00:00 +0000https://coalton-lang.github.io/20220906-quantum-compiler/By Elias Lawson-Fox, Aidan Nyquist, and Robert Smith
Table Of Contents Introduction: Coalton and the quilc compiler Towards a discrete set of operations for quantum computation An approach to discrete compilation by Ross and Selinger Coalton’s strength in implementing math Discrete compilation in quilc Inaccuracy gotchas and validating the compiler Conclusion and how to get involved Acknowledgements Introduction: Coalton and the quilc compiler Quilc is a state-of-the-art optimizing compiler for quantum computers written in Common Lisp.Numbers in a Nutshell, an Update
https://coalton-lang.github.io/20220827-numbers/
Sat, 27 Aug 2022 00:00:00 +0000https://coalton-lang.github.io/20220827-numbers/By Robert Smith
We discuss numbers and math in Coalton, as they are so far. Coalton is under active development, so this blog post may go out of date in due time.
Table Of Contents Introduction The concrete types Rudimentary classes Arithmetic Reals, rounding, and related classes Complex numbers Powers, roots, and logs Trigonometry $\pi$ and elementary functions Big floats Precision of big floats Introduction Coalton is statically typed, which presents some challenges in how we work with numbers, both syntactically and semantically.One Reason Typeclasses Are Useful
https://coalton-lang.github.io/20211212-typeclasses/
Sun, 12 Dec 2021 00:00:00 +0000https://coalton-lang.github.io/20211212-typeclasses/By Robert Smith
In this post, we explore one way that typeclasses are useful. We do so by first painting ourselves into a corner while building a toy Common Lisp program, and then seeing how Coalton’s typeclasses can ameliorate the issues.
A Graphics Library Let’s write a graphics library. Or, a tad less ambitiously, let’s write some routines for performing transformations on 2D points, which might serve as the foundation of a graphics library.AoC 2021 Coalton Contest
https://coalton-lang.github.io/20211129-aoc-contest/
Mon, 29 Nov 2021 00:00:00 +0000https://coalton-lang.github.io/20211129-aoc-contest/By Robert Smith
Update: The prizes have been matched 1:1 by a donor who wishes to remain anonymous!
Introduction Last September we announced Coalton, a statically typed language that is “just” another Common Lisp DSL. To our great surprise, there was a lot of excitement and fanfare, which made the development team feel quite honored and proud. It even made the top of Hacker News!
Unsurprisingly, as is the case with many open-source projects, that fanfare lead to little “conversion”; only a few people actually gave Coalton a shot and provided feedback.Introducing Coalton: How to Have Our (Typed) Cake and (Safely) Eat It Too, in Common Lisp
https://coalton-lang.github.io/20211010-introducing-coalton/
Fri, 10 Sep 2021 00:00:00 +0000https://coalton-lang.github.io/20211010-introducing-coalton/By Robert Smith, Elias Lawson-Fox, Cole Scott
Introduction Coalton is a statically typed functional programming language built with Common Lisp. This is Coalton computing Fibonacci numbers by exponentiating functions (not numbers!).
(coalton-toplevel (declare function-power (Integer -> (:t -> :t) -> (:t -> :t))) (define (function-power n f) (let ((build (fn (n g) (if (== n 0) g (build (- n 1) (compose f g)))))) (build n id))) (declare fib-step ((Tuple Integer Integer) -> (Tuple Integer Integer))) (define (fib-step x) (match x ((Tuple a b) (tuple b (+ a b))))) (declare fib (Integer -> Integer)) (define (fib n) (fst ((function-power n fib-step) (Tuple 0 1))))) This is Coalton greeting you by making native use of Common Lisp functions.
https://coalton-lang.github.io/reference/
Mon, 01 Jan 0001 00:00:00 +0000https://coalton-lang.github.io/reference/Reference coalton coalton-library/classes coalton-library/types coalton-library/builtin coalton-library/functions coalton-library/math/arith coalton-library/math/bounded coalton-library/math/fraction coalton-library/math/integral coalton-library/math/real coalton-library/math/complex coalton-library/math/elementary coalton-library/bits coalton-library/char coalton-library/string coalton-library/tuple coalton-library/optional coalton-library/list coalton-library/result coalton-library/cell coalton-library/vector coalton-library/slice coalton-library/hashtable coalton-library/monad/state coalton-library/iterator coalton-library/ord-tree coalton-library/ord-map Package coalton Public interface to COALTON.
fixed-size-numbers.lisp Types I8 [TYPE] Signed 8-bit integer capable of storing values in [-128, 127]. Uses (signed-byte 8).
Instances BITS I8 RUNTIMEREPR I8 EQ I8 NUM I8 ORD I8 HASH I8 INTO I8 DOUBLE-FLOAT INTO I8 SINGLE-FLOAT INTO I8 INTEGER INTO I8 IFIX INTO I8 I64 INTO I8 I32 INTO I8 I16 TRYINTO INTEGER I8 TRYINTO IFIX I8 TRYINTO UFIX I8 TRYINTO I64 I8 TRYINTO U64 I8 TRYINTO I32 I8 TRYINTO U32 I8 TRYINTO I16 I8 TRYINTO U16 I8 TRYINTO I8 UFIX TRYINTO I8 U64 TRYINTO I8 U32 TRYINTO I8 U16 TRYINTO I8 U8 TRYINTO U8 I8 REAL I8 RATIONAL I8 QUANTIZABLE I8 BOUNDED I8 COMPLEX I8 INTEGRAL I8 REMAINDER I8 U8 [TYPE] Unsigned 8-bit integer capable of storing values in [0, 255].About
https://coalton-lang.github.io/about/
Mon, 01 Jan 0001 00:00:00 +0000https://coalton-lang.github.io/about/Coalton is a statically typed, strictly evaluated functional programming language embedded in Common Lisp. It is an open-source project developed by the Coalton Lang developers.
Coalton developers can be reached on GitHub, via Discord, or via email at:
<this-project>@protonmail.com where <this-project> starts with a c and ends with an n.