Skip to content

Instantly share code, notes, and snippets.

View dmjio's full-sized avatar
:octocat:
🍜

David M. Johnson dmjio

:octocat:
🍜
View GitHub Profile
This file has been truncated, but you can view the full file.
{
"id": "0x7fb639848808",
"kind": "TranslationUnitDecl",
"loc": {},
"range": {
"begin": {},
"end": {}
},
"inner": [
{

Raison D'être - miso

Miso was written for those who want the simplicity of an Elm interface without sacrificing typeclasses and allowing type-sharing between server and client.

Type sharing

A lot of web dev becomes boilerplate -- serializing and transferring state is a large part of the work of web dev. Type sharing ensures correct-by-construction serialization between server / client amidst any changes to your business logic data types, allows you to focus on your apps core offerings as opposed to minutia.

Rich ecosystem

The Haskell ecosystem has many great libraries that compile w/o any problems on the frontend.

@dmjio
dmjio / Main.hs
Last active January 7, 2023 17:21
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
module Main where
diff --git a/rts/Linker.c b/rts/Linker.c
index 7bd2e67278..6d54b60793 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -338,33 +338,33 @@ int ghciInsertSymbolTable(
call this function again to trigger the duplicate error. */
return 1;
}
-
- pathchar* archiveName = NULL;
#include <stdio.h>
#include <iostream>
#include <memory>
typedef std::unique_ptr<int> Ptr;
int main()
{
printf("Hello, world!\n");
std::cout << "hey" << std::endl;
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
import Control.Monad
import qualified Data.ByteString.Lazy.Char8 as BL8
import qualified Data.Csv as CSV
import Data.List
import qualified Data.Vector as V
nix-env -iA cachix -f https://cachix.org/api/v1/install
cachix use haskell-miso
git clone https://github.com/dmjio/miso
cd miso
nix-build -A miso-arm
We can't make this file beautiful and searchable because it's too large.
35.660090000000 0.000000000000 0.100816000000 0.000000000000 0.001950000000 0.000000000000 2.748620000000 -9.779669000000 0.000000000000 0.000000000000 0.085995000000 -1.409030000000 0.015096000000 0.296944000000 0.209385000000 0.000000000000 0.720343000000 0.281412000000 0.126335000000 0.156896000000 0.000000000000 41.948000000000 0.065610000000 0.101986000000 -28.946522000000 -17.829714000000 0.772905000000 0.000000000000 0.000000000000 0.000000000000 0.000000000000 20.317928000000 0.154752000000 0.012792000000 0.000000000000 0.007100000000 1.547482000000 0.000000000000 0.398666000000 0.179767000000 0.158847000000 -9.307796000000 0.000000000000 11.301102000000 0.012628000000 0.000000000000 6.989943000000 0.000000000000 0.000000000000 0.000000000000 0.000000000000 0.000000000000 0.000000000000 0.000000000000 0.000000000000 0.237148000000 0.000000000000 0.036556000000 0.000000000000 49.332983000000 0.000000000000 0.000000000000 0.000000000000 -82.545786000000 -18.509172000000 0.000000000000 0.000000000000 0.0
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ViewPatterns #-}
module Main where
import Control.Monad
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
import Data.Char
import Data.List
parted /dev/nvme0n1 -- mklabel gpt
parted /dev/nvme0n1 -- mkpart primary 512MiB -8GiB
parted /dev/nvme0n1 -- mkpart primary linux-swap -8GiB 100%
parted /dev/nvme0n1 -- mkpart ESP fat32 1MiB 512MiB
parted /dev/nvme0n1 -- set 3 boot on
cryptsetup luksFormat /dev/nvme0n1p1
cryptsetup luksOpen /dev/nvme0n1p1 cryptroot
mkfs.ext4 -L nixos /dev/mapper/cryptroot
mkswap -L swap /dev/nvme0n1p2
mkfs.fat -F 32 -n boot /dev/nvme0n1p3