Skip to content

Instantly share code, notes, and snippets.

@sogaiu
sogaiu / gist:a13512e146e8f5c0e94d1804838558ee
Last active June 27, 2023 14:13
prepare emacs master / emacs-29 branch with tree-sitter on ubuntu for janet-ts-mode (2023-04-02)
# adapted from content at https://www.reddit.com/r/emacs/comments/z25iyx/treesitter_has_been_merged_into_master/
# install tree-sitter
cd ~/src
git clone https://github.com/tree-sitter/tree-sitter.git
cd tree-sitter
# NOTE: update version in Makefile to 0.20.7
sed -i 's/^VERSION := 0\.6\.3$/VERSION := 0.20.7/' Makefile
make
# NOTE: manually correct 'pkgname', 'pkgversion', and 'provides'
@ahungry
ahungry / gist:0965a4efea7d0946d2dcc981d9a06fb3
Last active November 19, 2022 17:28
DAOC Eden on GNU/Linux
#/bin/bash
# Tested with Arch Linux
# Customize as desired - duh (should match where you plan to play Eden)
export WINEPREFIX=/mnt/windows/daoc/eden
# Used to create initial prefix - maybe run "winecfg" and set windows 7 after
wineboot
@felixr
felixr / janet_repos.md
Last active September 28, 2021 01:58
janet repos
URL Stars Created
http://github.com/ahungry/ahungry-janet 3 2020-05-29 02:54:07
http://github.com/ahungry/ahungry-janet-user 0 2020-05-29 04:28:45
http://github.com/ahungry/janet-code 8 2019-07-28 05:10:59
http://github.com/ahungry/janet-p99-map 1 2020-05-10 04:13:27
http://github.com/ahungry/janet-pobox 7 2020-05-27 04:36:08
http://github.com/ahungry/janet-xbuild 2 2020-05-28 14:17:09
http://github.com/ahungry/puny-gui 83 2020-04-24 02:52:59
http://github.com/ahungry/puny-server 1 2020-04-23 01:42:38
@vindarel
vindarel / Common Lisp VS Racket - testimonies.md
Last active April 20, 2024 03:18
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

@sogaiu
sogaiu / janet.ctags
Last active February 28, 2024 09:36
~/.ctags.d/janet.ctags -- for indexing top-level things in janet code -- usage: `ctags -R <dir>` or for emacs, `ctags -e -R <dir>` -- sorry, no destructuring support
--exclude=.git
--langdef=Janet
--langmap=Janet:.janet
--regex-janet=/^\([ \t]*def[ \t]+([^0-9:#][^ \t\[{(]+)/\1/D/
--regex-janet=/^\([ \t]*def-[ \t]+([^0-9:#][^ \t\[{(]+)/\1/d/
--regex-janet=/^\([ \t]*defglobal[ \t]+([^0-9:#][^ \t\[{(]+)/\1/g/
--regex-janet=/^\([ \t]*defmacro[ \t]+([^0-9:#][^ \t\[{(]+)/\1/M/
--regex-janet=/^\([ \t]*defmacro-[ \t]+([^0-9:#][^ \t\[{(]+)/\1/m/
--regex-janet=/^\([ \t]*defn[ \t]+([^0-9:#][^ \t\[{(]+)/\1/N/
--regex-janet=/^\([ \t]*defn-[ \t]+([^0-9:#][^ \t\[{(]+)/\1/n/
@Francesco149
Francesco149 / docker-cross-device-link.md
Last active October 27, 2023 08:51
docker error creating new backup file '/var/lib/dpkg/status-old': Invalid cross-device link
#!/bin/sh
# install needed curl package
sudo apt install --no-install-recommends curl -y
# install kubectl
# https://github.com/kubernetes/minikube/issues/3437#issuecomment-449408316, maybe use https://storage.googleapis.com/minikube/releases/v0.30.0/docker-machine-driver-kvm2
curl -Lo /tmp/kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \
chmod +x /tmp/kubectl && \
sudo mv /tmp/kubectl /usr/local/bin/kubectl
# kubectl tab completion
sudo sh -c 'echo "source <(kubectl completion bash)" > /etc/bash_completion.d/kubectl'
@dust321
dust321 / arch-linux-install-encryption
Last active April 2, 2021 23:43 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing Arch Linux on an DOS/BIOS system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system, for BIOS. Dustin dut n ex 5 a t g ma il
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
@chaitanyagupta
chaitanyagupta / _reader-macros.md
Last active March 29, 2024 19:56
Reader Macros in Common Lisp

Reader Macros in Common Lisp

This post also appears on lisper.in.

Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.

Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):

The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.

@mattiaslundberg
mattiaslundberg / arch-linux-install
Last active March 29, 2024 08:38
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap