Skip to content

Instantly share code, notes, and snippets.

View sierpinskiii's full-sized avatar
🌊
Focusing

hsc sierpinskiii

🌊
Focusing
  • Keio University
  • Tetrahedron, 5F Totem Pole
  • 20:49 (UTC +09:00)
View GitHub Profile
@andrejbauer
andrejbauer / Primrec.agda
Created July 6, 2021 10:21
Primitive recursive functions in Agda
open import Data.Nat
open import Data.Fin as Fin
module Primrec where
-- The datatype of primitive recursive function
data PR : ∀ (k : ℕ) → Set where
pr-zero : PR 0 -- zero
pr-succ : PR 1 -- successor
pr-proj : ∀ {k} (i : Fin k) → PR k -- projection
@vindarel
vindarel / Common Lisp VS Racket - testimonies.md
Last active May 27, 2024 15:02
Common Lisp VS Racket. Feedback from (common) lispers.

Developer experience, libraries, performance… (2021/11)

I'll preface this with three things. 1. I prefer schemes over Common Lisps, and I prefer Racket of the Schemes. 2. There is more to it than the points I raise here. 3. I assume you have no previous experience with Lisp, and don't have a preference for Schemes over Common Lisp. With all that out of the way... I would say Common Lisp/SBCL. Let me explain

  1. SBCL Is by far the most common of the CL implementations in 2021. It will be the easiest to find help for, easiest to find videos about, and many major open source CL projects are written using SBCL
  2. Download a binary directly from the website http://www.sbcl.org/platform-table.html (even for M1 macs) to get up and running (easy to get started)
  3. Great video for setting up Emacs + Slime + Quick Lisp https://www.youtube.com/watch?v=VnWVu8VVDbI

Now as to why Common Lisp over Scheme

@kuznero
kuznero / disable-swap-nixos.md
Last active September 30, 2023 12:48
Disabling swap in NixOS permanently without removing partition

Swap is activated by systemd, so let's query which unit is responsible for it on your NixOS:

sudo systemctl --type swap

This will among other things output the name of the unit that is responsible for activating swap. Copy it to your clipboard (for me the value is dev-nvme0n1p2.swap).

Now we will need to let NixOS know that we don't need any swap.

@peti
peti / README.md
Last active January 29, 2024 00:21
Make NixOS provide version-specific LOCALE_ARCHIVE environment variables

This NixOS code ensures that the system provide version-specific $LOCALE_ARCHIVE environment variables to mitigate the effects of NixOS/nixpkgs#38991.

To deploy it, copy the file into your /etc/nixos folder using a file name like multi-glibc-locale-paths.nix. Then edit your configuration.nix file to contain the attribute:

imports = [ ./multi-glibc-locale-paths.nix ];
@tbfleming
tbfleming / main.cpp
Created January 13, 2018 02:48
cib demo: emscripten_async_wget_data
// Download a file using https. Only works with sites which support CORS.
#include <emscripten.h>
#include <stdio.h>
#include <string>
using namespace std;
void received(void *, void *data, int size) {
puts(string((char *)data, size).c_str());
}
@3noch
3noch / Distributed Builds.md
Last active January 4, 2024 14:34
How to set up distributed builds with nix

Reference: https://github.com/LnL7/nix-docker

# If on Darwin, I recommend keeping nix stuff contained
mkdir -p /nix/etc/nix
ln -s /nix/etc/nix /etc/nix  # sysconfdir; can be overridden with $NIX_CONF_DIR

cd /nix/etc/nix/
openssl genrsa -out signing-key.sec 2048
openssl rsa -in signing-key.sec -pubout &gt; signing-key.pub
@ihoneymon
ihoneymon / how-to-write-by-markdown.md
Last active June 24, 2024 15:54
마크다운(Markdown) 사용법

[공통] 마크다운 markdown 작성법

영어지만, 조금 더 상세하게 마크다운 사용법을 안내하고 있는
"Markdown Guide (https://www.markdownguide.org/)" 를 보시는 것을 추천합니다. ^^

아, 그리고 마크다운만으로 표현이 부족하다고 느끼신다면, HTML 태그를 활용하시는 것도 좋습니다.

1. 마크다운에 관하여

@miguelmota
miguelmota / README.md
Last active May 25, 2024 13:23
Multiple accounts with Mutt E-Mail Client (gmail example)

How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg

Instructions

Directories and files

~/