| #!/bin/bash | |
| ######################################################################### | |
| # # | |
| # # | |
| # NATO String converter # | |
| # # | |
| # Description: converts string (first parameter given) # | |
| # to NATO phonetics-alphabet # | |
| # # |
extensible is a library for extensible data types. It provides extensible product and sum types parameterized by type-level lists.
This tutorial introduces extensible records, an application of the extensible products.
First, we pass a space-separated list of field names to mkField:
{-# LANGUAGE TemplateHaskell, DataKinds, TypeOperators, FlexibleContexts #-}
{-# OPTIONS_GHC -fno-warn-unticked-promoted-constructors #-}How do you send information between clients and servers? What format should that information be in? What happens when the server changes the format, but the client has not been updated yet? What happens when the server changes the format, but the database cannot be updated?
These are difficult questions. It is not just about picking a format, but rather picking a format that can evolve as your application evolves.
By now there are many approaches to communicating between client and server. These approaches tend to be known within specific companies and language communities, but the techniques do not cross borders. I will outline JSON, ProtoBuf, and GraphQL here so we can learn from them all.
Build in CMake with these params:
CMAKE_CXX_FLAGS:STRING= -fsanitize=address -fsanitize=leak -g
CMAKE_C_FLAGS:STRING=-fsanitize=address -fsanitize=leak -g
CMAKE_EXE_LINKER_FLAGS:STRING=-fsanitize=address -fsanitize=leak
CMAKE_MODULE_LINKER_FLAGS:STRING=-fsanitize=address -fsanitize=leak
Which can be done with:
nix-shell -p yarn yarn2nix nodejs- copied the Nix skeleton files in place (./z/etc/lib/{version,nixpkgs}.nix ./z/etc/overlays/default.nix)
- generated
package.nixusingyarn2nix - add these Nix expressions in the root
| -- flatparse: hackage 0.1.1.1 | |
| -- example: smaltt (demo for fast elaborator): switching from megaparsec to flatparse would speed up more than 2x overall | |
| -- 1 year ago: | |
| -- parsec : ridiculously slow, CPS implementation | |
| -- attoparsec : (resumable, CPS), "high-performance" data parsing, binary parsing, not language parsing | |
| -- fringe, modern: | |
| -- parsnip: (unpublished on hackage) (by Kmett, on github) : really the high-performance raw data parsing (not language parsing) |
This post was adapted from an earlier Twitter thread.
It's incredible how many collective developer hours have been wasted on pushing through the turd that is ES Modules (often mistakenly called "ES6 Modules"). Causing a big ecosystem divide and massive tooling support issues, for... well, no reason, really. There are no actual advantages to it. At all.
It looks shiny and new and some libraries use it in their documentation without any explanation, so people assume that it's the new thing that must be used. And then I end up having to explain to them why, unlike CommonJS, it doesn't actually work everywhere yet, and may never do so. For example, you can't import ESM modules from a CommonJS file! (Update: I've released a module that works around this issue.)
And then there's Rollup, which apparently requires ESM to be u
As I come out as trans to people, most are supportive, but a few people remain skeptical and question my feelings and experiences. I try to field their concerns to the best of my ability, but one particular concern they raise is so common and so far off the mark that I feel compelled to share my thoughts on this. My intention is not to shame them, but rather to use this as an opportunity to share my own experiences.
Their concern typically goes like this: they believe that many people who transition do so because they are too easily suggestible and that they have been over-exposed to trans role models (either friends or people on social media).