Skip to content

Instantly share code, notes, and snippets.

@applePrincess
applePrincess / FunDep.idr
Created May 14, 2023 02:13
Functional Dependencies not working in Idris2?
interface Custom (a : Type) (b : Type) | a where
Custom Nat Nat where
Custom Nat Bool where
f : Custom a b => a -> b -> Unit
f _ _ = ()
g : Unit
g = let x : Nat = 3
@applePrincess
applePrincess / configuration.nix
Last active January 1, 2022 14:31
Test router
{config, pkgs, modulesPath, ...}:
{
imports = [
./hardware-configuration.nix
(modulesPath + "/profiles/minimal.nix")
(modulesPath + "/profiles/qemu-guest.nix")
];
@applePrincess
applePrincess / log.txt
Created October 1, 2021 18:26
python3Packages.django_taggit Fail log
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Using setuptoolsShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
@applePrincess
applePrincess / log.txt
Created September 20, 2021 17:43
AWS Workspaces build log
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
building
no Makefile, doing nothing
@applePrincess
applePrincess / configuration.nix
Last active July 21, 2021 15:27
Fira-code fail to build
{pkgs, ...}:
{
imports = [
./hardware-configuration.nix
];
boot = {
kernelPackages = pkgs.linuxPackages_zen;
cleanTmpDir = true;
loader.grub = {
@applePrincess
applePrincess / log.txt
Created June 18, 2021 03:49
pecan build failed
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Using setuptoolsShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
logged: server *esup-server*, connection *esup-server* <127.0.0.1:40388>, message accept from 127.0.0.1
name: *esup-server* <127.0.0.1:40388>, sentinel: proc: *esup-server* <127.0.0.1:40388>, event open from 127.0.0.1
logged: server *esup-server*, connection *esup-server* <127.0.0.1:40392>, message accept from 127.0.0.1
name: *esup-server* <127.0.0.1:40392>, sentinel: proc: *esup-server* <127.0.0.1:40392>, event open from 127.0.0.1
Set information from port 40388 to be the log process
LOG: starting esup-child on '/tmp/foobar.el' port=35557 max-depth=1
module Main where
import Data.List.Split
main :: IO ()
main = do
putStrLn "hello world"
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeApplications #-}
module Day1 (main) where
import qualified Data.Text as T
import qualified Data.Text.IO as TIO
main = TIO.interact (T.pack . solve . T.splitOn "," . T.replace "+" " ")
where solve = show . sum . map (read @Int . T.unpack)
@applePrincess
applePrincess / Foo.cs
Created August 30, 2018 08:11
何となく作ってみました。
class Foo
{
/// <summary>
/// Splits bytes up to chunk of bytes which represents a `character`.
/// Which throws Exception when invalid UTF-8 byte array is given.
/// </summary>
public static System.Collections.Generic.List<byte[]> splitCharsFromUTF8(byte[] utf8)
{
var ret = new System.Collections.Generic.List<byte[]>();
for(int i = 0; i < utf8.Length; i++)