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) (if (<= n 0) f (compose f (function-power (1- n) f)))) (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/hash 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/math/dyadic coalton-library/math/dual coalton-library/bits coalton-library/char coalton-library/string coalton-library/tuple coalton-library/lisparray coalton-library/optional coalton-library/list coalton-library/result coalton-library/cell coalton-library/randomaccess coalton-library/vector coalton-library/slice coalton-library/hashtable coalton-library/queue coalton-library/monad/state coalton-library/monad/free coalton-library/iterator coalton-library/ord-tree coalton-library/ord-map coalton-library/seq coalton-library/system coalton-library/file Package coalton Public interface to COALTON.
Types SINGLE-FLOAT [TYPE] Single precision floating point number. Uses single-float.
Instances HASH SINGLE-FLOAT RUNTIMEREPR SINGLE-FLOAT EQ SINGLE-FLOAT NUM SINGLE-FLOAT ORD SINGLE-FLOAT INTO SINGLE-FLOAT BIG-FLOAT INTO SINGLE-FLOAT STRING INTO I16 SINGLE-FLOAT INTO U16 SINGLE-FLOAT INTO I8 SINGLE-FLOAT INTO U8 SINGLE-FLOAT DEFAULT SINGLE-FLOAT TRYINTO I64 SINGLE-FLOAT STRING TRYINTO U64 SINGLE-FLOAT STRING TRYINTO IFIX SINGLE-FLOAT STRING TRYINTO UFIX SINGLE-FLOAT STRING TRYINTO U32 SINGLE-FLOAT STRING TRYINTO I32 SINGLE-FLOAT STRING TRYINTO INTEGER SINGLE-FLOAT STRING TRYINTO SINGLE-FLOAT FRACTION STRING REAL SINGLE-FLOAT RATIONAL SINGLE-FLOAT QUANTIZABLE SINGLE-FLOAT DIVIDABLE INTEGER SINGLE-FLOAT TRANSFINITE SINGLE-FLOAT RECIPROCABLE SINGLE-FLOAT COMPLEX SINGLE-FLOAT POLAR SINGLE-FLOAT RADICAL SINGLE-FLOAT ELEMENTARY SINGLE-FLOAT EXPONENTIABLE SINGLE-FLOAT TRIGONOMETRIC SINGLE-FLOAT DOUBLE-FLOAT [TYPE] Double precision floating point number.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.