Skip to content

Instantly share code, notes, and snippets.

sogaiu / main.janet
Last active May 6, 2021
leverage spork/regex to help transition to using pegs
View main.janet
(import spork/regex)
(regex/source "a")
# => "a"
(regex/source `\s`)
# => '(set "\n\t\r\v\f ")
View gist:40b063ffc6ab8135bb247e019cb5ca50
# instructions based on system crafters
# inside an ubuntu system (or any systemd-based system?)
cd /tmp
chmod +x
sudo ./
wget "" -qO - | sudo -i gpg --import -
wget "" -qO - | sudo -i gpg --import -
sogaiu / gist:912914c04e1d1948d45211767334ed14
Created May 5, 2021
listview demo with kamisori's jaylib
View gist:912914c04e1d1948d45211767334ed14
(use ./build/jaylib)
(defn- make-window
"open window with default values"
(set-config-flags :msaa-4x-hint)
(init-window 800 600 "Place")
(set-target-fps 60)
(set-exit-key 0))
sogaiu / pretty-literals.lisp
Created May 3, 2021 — forked from rmoritz/pretty-literals.lisp
pretty hash table & vector literal syntax for common lisp
View pretty-literals.lisp
;;;; pretty-literals.lisp - pretty hash table & vector literal syntax
;;;; inspired by and uses code from
(in-package #:pretty-literals)
;; vector literal syntax using brackets
(set-macro-character #\[
(lambda (str char)
(declare (ignore char))
(let ((*readtable* (copy-readtable *readtable* nil))
View gist:9e4c7e47353c43a18c5dc44b240c55c9
possible results
* janet source step debugger
* margaret source step debugger
* babashka source step debugger
* location or creation of clear description of edebug
* location or creation of clear description of cider debug
* location or creation of clear description of sly stepper
sogaiu / mypr.el
Last active Apr 30, 2021
setting up s-x (super x) as prefix key in emacs
View mypr.el
;; mypr is short for "my prefix"
(defvar mypr-map (make-sparse-keymap)
"Global keymap for custom prefix commands.")
(defalias 'mypr-prefix mypr-map)
;; XXX: change "s-x" to something else if desired
(define-key global-map (kbd "s-x") 'mypr-prefix)
(define-key mypr-map "b" 'butterfly)
View seesaw-repl-tutorial.clj
; A REPL-based, annotated Seesaw tutorial
; Please visit for more info
; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers
; Seesaw's basic features and philosophy, but only scratches the surface
; of what's available. It only assumes knowledge of Clojure. No Swing or
; Java experience is needed.
; This material was first presented in a talk at @CraftsmanGuild in
; Ann Arbor, MI.
View gist:49ef2dbd37d3b8319cc5e70dfc166326
;; Install edebug read and eval functions.
(defun edebug-install-read-eval-functions ()
(add-function :around load-read-function #'edebug--read)
(advice-add 'eval-defun :override #'edebug-eval-defun))
sogaiu / gist:e5bfea37564aec0bf59a931be67a8758
Last active Apr 27, 2021
potential quotes on issues regarding documentation
View gist:e5bfea37564aec0bf59a931be67a8758
* in multiple posts:
* another:
sogaiu /
Last active Apr 25, 2021
socket repl setup for clojureclr via an environment variable

Socket REPL Setup for ClojureCLR (>= 1.10) via an Environment Variable

For a *NIX-like setup (e.g. Linux, macos, etc.) it is possible to set an environment variable named clojure.server.repl for the purpose of launching a socket repl like this:

$ env clojure.server.repl="{:port,7650,:accept,clojure.core.server/repl}" bash

That starts a new bash that has an appropriate environment variable. Note that a straight-forward use of export to do this may not work.