Skip to content

Instantly share code, notes, and snippets.

View jolby's full-sized avatar

Joel Boehland jolby

View GitHub Profile
@CFiggers
CFiggers / keychords.ahk
Last active February 28, 2024 21:25
Keychords in Autohotkey
; Tested and working using AutoHotkey v1.1.33.09
awaitKeypress(){
ih := InputHook()
ih.KeyOpt("{All}", "ES") ; End and Suppress
; Exclude the modifiers
ih.KeyOpt("{LCtrl}{RCtrl}{LAlt}{RAlt}{LShift}{RShift}{LWin}{RWin}", "-ES")
ih.Start()
ErrorLevel := ih.Wait() ; Store EndReason in ErrorLevel
result := ih.EndMods . ih.EndKey
@danmack
danmack / nix-alpine.org
Last active April 4, 2024 18:44
install NIX package manager on Alpine Linux

NIX Package Manager Install on Alpine Linux

System Information

  • alpine 3.17.1, 3.18, 3.19 and edge x86-64
  • multiple linux kernels worked 6.1.8-lts w/zfs and 6.6.8-lts
  • edge, testing apk repos enabled

Preparation

@vindarel
vindarel / rlwrap-for-sbcl.md
Last active November 13, 2023 15:07
RLWRAP settings for SBCL

The ReadLine Wrapper (rlwrap) utility is actually a must have when you want to run SBCL from the command line, because by default, SBCL in the terminal:

  • doesn't offer symbol completion
  • doesn't offer a history of commands
  • doesn't even understand the arrow keys, left and right (they input [[[A instead), nor any default readline keybindings, the ones we find in bash et all: C-e, C-a, C-u, C-k, Alt-b, Alt-f etc.

We can actually fix this with rlwrap options.

@phoe
phoe / README.md
Last active January 9, 2023 01:12
GOOPS-like generic dispatch in CL, a quick sketch

GOOPS has GFs which can have a variable number of arguments while still permitting the programmer to specialize on them. This is a quick draft of a CL version that I've done recently and decided to share for fun and profit.

The main issue here is to avoid the fact that methods which agree on parameter specializers and qualifiers as per CLHS 7.6.3 are gonna get overwritten, and we don't want that. GOOPS-like dispatch must mean a maximum of 0 required arguments in defmethod, which means that we get to specialize on exactly 0 arguments, which means that, trivially, 7.6.3 points 1 and 2 are always going to be true.

Hence, only 7.6.3 point 3 is left for us - and that means qualifiers. I (ab)use those in this example, by using a lax method combination (to still have :before/:after/:around) and passing class names this way. It also means that all method lambda lists are effectively (&rest args) or something similar, since we have no req

;;;; Experimenting with 3D rendering in McCLIM
(ql:quickload '(mcclim 3d-matrices 3d-vectors 3d-quaternions))
(defpackage #:3d-test
(:use #:clim #:clime #:clim-lisp #:org.shirakumo.flare.quaternion
#:org.shirakumo.flare.matrix #:org.shirakumo.flare.vector))
(in-package :3d-test)
@veekaybee
veekaybee / chatgpt.md
Last active April 12, 2024 20:16
Everything I understand about chatgpt

ChatGPT Resources

Context

ChatGPT appeared like an explosion on all my social media timelines in early December 2022. While I keep up with machine learning as an industry, I wasn't focused so much on this particular corner, and all the screenshots seemed like they came out of nowhere. What was this model? How did the chat prompting work? What was the context of OpenAI doing this work and collecting my prompts for training data?

I decided to do a quick investigation. Here's all the information I've found so far. I'm aggregating and synthesizing it as I go, so it's currently changing pretty frequently.

Model Architecture

@vurtun
vurtun / nn.c
Last active November 1, 2023 16:13
Neural Network
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <float.h>
#include <string.h>
#include <assert.h>
#include <stdint.h>
#include <stdarg.h>
#include <math.h>

Why not: from Common Lisp to Julia

This article is a response to mfiano’s From Common Lisp to Julia which might also convey some developments happening in Common Lisp. I do not intend to suggest that someone coming from a Matlab, R, or Python background should pickup Common Lisp. Julia is a reasonably good language when compared to what it intends to replace. You should pickup Common Lisp only if you are interested in programming in general, not limited to scientific computing, and envision yourself writing code for the rest of your life. It will expand your mind to what is possible, and that goes beyond the macro system. Along the same lines though, you should also pickup C, Haskell, Forth, and perhaps a few other languages that have some noteworthy things to teach, and that I too have been to lazy to learn.

/I also do not intend to offend anyone. I’m okay with criticizing Common Lisp (I myself have done it below!), but I want t

sb-simd: Multiplying a 4x4 matrix with a 4-length vector (AVX)

(require 'sb-simd)
(defpackage :simd-pack-user
  (:use :sb-simd-avx :cl))
(in-package :simd-pack-user)

I'm assuming you are referring to the following operation:

@perpen
perpen / db_sqflite.clj
Created July 27, 2022 16:10
cljd sqflite experiment
;;;;;;;;;;;;;;;; db.cljd
(ns mu.db
(:require
[mu.utils :as u]))
(defprotocol Db
(init- [db opts] "***")
(show- [db] "dumps tables contents")
(save-blobby- [this bytes] "save Uint8List to blobbies table")