Skip to content

Instantly share code, notes, and snippets.

View SeungheonOh's full-sized avatar

SeungheonOh SeungheonOh

View GitHub Profile
@park-sewon
park-sewon / practice_coq_1.v
Created April 16, 2023 09:32
A simple Coq practice session
(* Context와 state가 있는 프로그래밍 언어를 정형화하고자 합니다.
프로그래밍 변수로는 De Brujin index를 사용할 것이며,
따라서 context는 단순히 데이터 타입들의 리스트 입니다.
(예를 들어서 int :: int :: boolean :: nil 이 하나의 context입니다.
리스트를 사용해서 생기는 문제를 해결해 봅시다.
16 April 2023 -- Sewon Park *)
Require Import List.
@ejohnso49
ejohnso49 / flake.nix
Last active July 30, 2023 23:26
Zephyr Nix Flake
{
description = "Flake used to setup development environment for Zephyr";
# Nixpkgs / NixOS version to use.
inputs.nixpkgs.url = "nixpkgs/nixos-21.11";
# mach-nix used to create derivation for Python dependencies in the requirements.txt files
inputs.mach-nix.url = "mach-nix/3.5.0";
outputs = { self, nixpkgs, mach-nix }:
Pipewire is the replacement for JACK and PulseAudio, Pipewire allows low latency compared to any pulseaudio tweaks
Here is a short list of what you should do to get the lowest latency in Osu!
Higher audio rate equals less latency always, unless you increase your quantum
to calculate node latency for your audio device take the quantum size divided by your audio rate
so 64/96000 = 0.00066666666 * 1000 = 0.6ms this is 0.6ms node latency
To check client latency use pw-top, take the quantum size and the audio rate of the client then use quantum / audio rate * 1000
to get overall latency for the client
@nattybear
nattybear / functor.md
Last active May 27, 2021 02:50
하스켈 Functor

이 글은 위키북스 하스켈을 읽고 정리한 것이다.

안에 들어있는 것 바꾸기

함수 map을 이용하면 리스트 안에 들어있는 것들을 바꿀 수 있다.

GHCi> map (+1) [1,2,3]
[2,3,4]
@citruz
citruz / QEMU_ON_M1.md
Last active June 6, 2024 08:29
Create Ubuntu and Windows VMs with QEMU on Apple Silicon

Running Linux and Windows on M1 with QEMU

30.11.2020: Updated with the new patchseries and instructions for Windows

02.12.2020: Added tweaks

08.12.2020: Updated with patchseries v4

31.01.2020: Updated with patchseries v6

# Instructions for fresh install
$ sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume --daemon
# reboot
$ source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
$ echo 'export NIX_PATH=darwin-config=$HOME/.nixpkgs/darwin-configuration.nix:$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH' | tee -a ~/.zshrc
$ echo 'source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh' | tee -a ~/.zshrc
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable
$ nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin
$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
@graninas
graninas / What_killed_Haskell_could_kill_Rust.md
Last active July 11, 2024 21:10
What killed Haskell, could kill Rust, too

At the beginning of 2030, I found this essay in my archives. From what I know today, I think it was very insightful at the moment of writing. And I feel it should be published because it can teach us, Rust developers, how to prevent that sad story from happening again.


What killed Haskell, could kill Rust, too

What killed Haskell, could kill Rust, too. Why would I even mention Haskell in this context? Well, Haskell and Rust are deeply related. Not because Rust is Haskell without HKTs. (Some of you know what that means, and the rest of you will wonder for a very long time). Much of the style of Rust is similar in many ways to the style of Haskell. In some sense Rust is a reincarnation of Haskell, with a little bit of C-ish like syntax, a very small amount.

Is Haskell dead?

@TheSirC
TheSirC / v4l2.nix
Last active March 27, 2023 19:30
My Nix module to work with v4l2loopback
{ lib, config, pkgs, ... }:
with lib;
{
options.v4l2 = mkEnableOption "Enable the confguration to use the reflex as a webcam";
config = mkIf config.v4l2 {
# 20.03: v4l2loopback 0.12.5 is required for kernel >= 5.5
# https://github.com/umlaeute/v4l2loopback/issues/257
@mjlbach
mjlbach / gccEmacs.md
Last active December 6, 2023 10:34
Installing gccEmacs (native-comp) with Nix

WARNING: THIS GIST IS OUT OF DATE AND NO LONGER RELEVANT

  • Native-comp was enabled by default in nixpgks
  • Pgtk is not enabled by default, for that you can either override the derivation or use emacsPgtk from the nix-community emacs overlay if you don't want to build it yourself

Nix

Adding the overlay and configuring cachix