This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading; | |
namespace OOP | |
{ | |
public class Program | |
{ | |
private const string QUIT = "q"; | |
public static void Main (string[] args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Build failed. | |
error: builder for '/nix/store/4nb133jpb8np159fs5c63gjn35h5pl0k-wasm32-unknown-wasi-ghc-native-bignum-9.6.5.drv' failed with exit code 1; | |
last 10 log lines: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.List (foldl', tails) | |
import Data.Map.Internal.Debug | |
import qualified Data.Map.Strict as M | |
import Data.Maybe | |
import Data.Monoid | |
import qualified Data.Set as S | |
data TrieValue v | |
= TrieValue | |
{ next :: Trie v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.List (foldl', tails) | |
import Data.Map.Internal.Debug | |
import qualified Data.Map.Strict as M | |
import Data.Maybe | |
import Data.Monoid | |
import qualified Data.Set as S | |
data TrieValue v | |
= TrieValue | |
{ next :: Trie v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.List (foldl', tails) | |
import Data.Map.Internal.Debug | |
import qualified Data.Map.Strict as M | |
import Data.Maybe | |
import Data.Monoid | |
import qualified Data.Set as S | |
data TrieValue v | |
= TrieValue | |
{ next :: Trie v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.List (foldl', tails) | |
import Data.Map.Internal.Debug | |
import qualified Data.Map.Strict as M | |
import Data.Maybe | |
import Data.Monoid | |
import qualified Data.Set as S | |
data TrieValue v | |
= TrieValue | |
{ next :: Trie v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Step 0: Download unetbootin and the latest nixos iso, put nixos iso onto unetbootin | |
Step 1: On OSX, Resize your OSX partition using disk utility (leave 25% - 75% as free space) | |
Step 2: Boot into NixOS from USB (hold down Alt-Option) | |
Step 3: Use fdisk to create 3 new partitions (nixosswap ~10GB, nixoshome ~75GB, nixosroot ~20GB) | |
Step 4: Init file systems / swaps | |
# mkfs.ext4 -L nixosroot /dev/sda4 | |
# mkswap -L nixosswap /dev/sda5 | |
# mkfs.ext4 -L nixoshome /dev/sda6 | |
Step 5: Mount | |
# mount /dev/sda4 /mnt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE DerivingVia #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE KindSignatures #-} | |
module Main where |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NixOS manual | |
nixos.org/nixos/manual/ | |
# GET ETHERNET / WIRED INTERNET FIRST | |
# Prepare USB stick - dependent on machines - this worked for an iMac | |
http://superuser.com/questions/795879/how-to-configure-dual-boot-nixos-with-mac-os-x-on-an-uefi-macbook | |
# Prepare hard disk via Disk Utility on OSX beforehand (for multiple oses) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*lower:convert c to lowercase; ASCII only*/ | |
int lower(int c) | |
{ | |
if (c >= 'A' && c <= 'Z') | |
return c +'a'-'A'; | |
else | |
return c; | |
} |
NewerOlder