The following are examples of various features.
At the beginning of 2030, I found this essay in my archives. From what I know today, I think it was very insightful at the moment of writing. And I feel it should be published because it can teach us, Rust developers, how to prevent that sad story from happening again.
What killed Haskell, could kill Rust, too
What killed Haskell, could kill Rust, too. Why would I even mention Haskell in this context? Well, Haskell and Rust are deeply related. Not because Rust is Haskell without HKTs. (Some of you know what that means, and the rest of you will wonder for a very long time). Much of the style of Rust is similar in many ways to the style of Haskell. In some sense Rust is a reincarnation of Haskell, with a little bit of C-ish like syntax, a very small amount.
Is Haskell dead?
-------------------------------------------------------------------------------- | |
-- | |
---- Dependently Typed Programming: Part 3 | |
-- | |
---- An Intrinsically Typed Compiler | |
-- | |
---- Josh Ko (Institute of Information Science, Academia Sinica) | |
-- | |
-------------------------------------------------------------------------------- |
module WebCheck.PureScript.TodoMVC where | |
import WebCheck.DSL | |
import Data.Array (filter, foldMap, head, last, zip) | |
import Data.Foldable (length) | |
import Data.Int as Int | |
import Data.Maybe (Maybe(..), fromMaybe) | |
import Data.String (Pattern(..), split, trim) | |
import Data.Tuple (Tuple(..)) |
{-# language Strict, LambdaCase, BlockArguments #-} | |
{-# options_ghc -Wincomplete-patterns #-} | |
{- | |
Minimal demo of "glued" evaluation in the style of Olle Fredriksson: | |
https://github.com/ollef/sixty | |
The main idea is that during elaboration, we need different evaluation |
#![feature(box_syntax)] | |
use std::time::Instant; | |
enum Expr { | |
Lit(i64), | |
Var(usize), | |
Add(Box<Expr>, Box<Expr>), | |
Assign(usize, Box<Expr>), | |
Then(Box<Expr>, Box<Expr>), |
1) Start in uefi mode. | |
At Line 216 use: | |
echo password | zpool create -f \ | |
-o ashift=12 \ | |
-O compression=lz4 \ | |
-O acltype=posixacl \ | |
-O xattr=sa \ | |
-O relatime=on \ |
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.
This gist demonstrates a trick I came up with which is defining
IsString
for Q (TExp a)
, where a
is lift
-able. This allows you
to write $$("...")
and have the string parsed at compile-time.
On GHC 9, you are able to write $$"..."
instead.
This offers a light-weight way to enforce compile-time constraints. It's
basically OverloadedStrings
with static checks. The inferred return type
# MIT License, see below | |
# | |
# These are some helpers for figuring out the derivations attributes of runtime | |
# dependencies of a derivation, in particular the function `runtimeReport`. At | |
# the bottom of the file you can see it used on `hello`. Spoiler: glibc is a | |
# runtime dependency. | |
# For more info see | |
# | |
# https://nmattia.com/posts/2019-10-08-runtime-dependencies.html |