Programming Language Checklist by Colin McMillen, Jason Reed, and Elly Fong-Jones, 2011-10-10.
You appear to be advocating a new:
- functional
- imperative
- object-oriented
- procedural
- stack-based
| let | |
| nixpkgs = builtins.fetchTarball { | |
| url = "https://github.com/NixOS/nixpkgs/archive/f3fc2f3326a23797b2c95297e68ed8e8de2a95e6.tar.gz"; | |
| sha256 = "0wsplccl8bv522zh3y8affacw9pmzsxm18i5hdgz78gxh8m7k933"; | |
| }; | |
| nixos = import "${nixpkgs}/nixos" { | |
| system = "x86_64-linux"; | |
| configuration = { pkgs, ... }: |
Programming Language Checklist by Colin McMillen, Jason Reed, and Elly Fong-Jones, 2011-10-10.
You appear to be advocating a new:
| ⊢ :let List/generate = https://prelude.dhall-lang.org/List/generate | |
| List/generate : ∀(n : Natural) → ∀(a : Type) → ∀(f : Natural → a) → List a | |
| ⊢ List/generate 10 | |
| λ(a : Type) | |
| → λ(f : Natural → a) | |
| → [ f 0, f 1, f 2, f 3, f 4, f 5, f 6, f 7, f 8, f 9 ] |
| * Importance of category theory | |
| * Answers the question: "What is a *timeless* API?" | |
| * What does "timeless" mean? | |
| * Likely to still be relevant years from now | |
| * Likely to be low maintenance (since unlikely to change) | |
| * Less likely to be subject to controversy or discussion ("obvious") | |
| * Examples: | |
| * Everything Haskell's typeclassopedia (except maybe `Foldable`) | |
| * Categories / Monoids | |
| * `(.)` / `id` |
These are my rough notes when preparing for a Haskell livestream that I
thought would be worth sharing. Some things are general comments on
contributing to the open source ecosystem whereas other notes are specific
to the stream (e.g. Haskell and the streamly package)
How things look from a maintainer's point of view (for highly active projects):
As projects become more active the maintainer's "inbox" gets pretty large. A
| {-# LANGUAGE DeriveAnyClass #-} | |
| {-# LANGUAGE DeriveGeneric #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| {-# LANGUAGE RecordWildCards #-} | |
| import Data.ByteString (ByteString) | |
| import Data.Default.Class (Default(..)) | |
| import GHC.Generics (Generic) | |
| import Network.Connection (ConnectionParams(..)) | |
| import Options.Generic (ParseRecord) |
Awake Security will be livestreaming a periodic 1-on-1 teaching session on Twitch. The subject of this session will always be one of our engineers teaching another one of our engineers how to do accomplish a practical task in Haskell while remote attendees watch, comment, and ask questions.
| let Prelude = https://prelude.dhall-lang.org/package.dhall | |
| let FN = Natural/even | |
| let a = 2 | |
| let b = 3 | |
| let c = 5 |
| {- This is a bit ugly and inefficient. See this thread for a discussion about | |
| adding a `Natural/subtract` built-in to improve this: | |
| https://github.com/dhall-lang/dhall-lang/issues/602#issuecomment-505484434 | |
| -} | |
| let Natural/predecessor : Natural → Natural | |
| = λ(n : Natural) | |
| → let result = Natural/fold | |
| n | |
| (Optional Natural) |
| -- Credit to: https://news.ycombinator.com/item?id=15186988 | |
| let iterate | |
| : (Natural → Natural) → Natural → Natural | |
| = λ(f : Natural → Natural) | |
| → λ(n : Natural) | |
| → Natural/fold (n + 1) Natural f 1 | |
| let increment : Natural → Natural = λ(n : Natural) → n + 1 |