I hereby claim:
- I am pnathan on github.
- I am pnathan (https://keybase.io/pnathan) on keybase.
- I have a public key ASBc-_Xn5rpPgnyAGz9BneeRsN4dVEUa9I9RRFdgkdVEVwo
To claim this, I am signing this object:
| // -*- mode: Scala; -*- | |
| import mill._ | |
| import mill.scalalib._ | |
| import coursier.maven.MavenRepository | |
| object project extends ScalaModule { | |
| def scalaVersion = "2.12.6" |
I hereby claim:
To claim this, I am signing this object:
| # Licensed under AGPL3 | |
| from pprint import pprint, pformat | |
| from enum import Enum | |
| world = [] | |
| buf="" | |
| def flush(): | |
| global buf | |
| print(buf) |
| ;; this code is (C) Paul Nathan (@[email protected]), licensed | |
| ;; under AGPL3, or CC0, or Public Domain. Whichever the reader | |
| ;; desires. | |
| ;; | |
| ;; essential instructions: | |
| ;; | |
| ;; download and unzip the archive file, IN JSON FORMAT, from the Zuckerland. | |
| ;; this file goes in the toplevel of that directory. | |
| #!/bin/bash | |
| # Example usecase: | |
| # inotify_exec_on_file_change.sh /path/phd paper.tex pdflatex paper.tex | |
| dirn="$1" | |
| filen="$2" | |
| shift 2 | |
| echo "Watching directory $dirn for changes of file $filen . Watching directory insteaf of file to overcome behaviour of many text editors that replace file - Thanks to Giles and see his answer https://superuser.com/a/181543/81861 for more details. In case of matching even I execute:" $@ |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ;;;; flexijects. An object system for CL. | |
| ;;;; | |
| ;;;; Uses closures and lists. | |
| ;;;; | |
| ;;;; CC0 - Paul Nathan, 2015. | |
| ;;;; | |
| ;;;; | |
| (defparameter *known-classes* nil |
| (yason:parse | |
| (flexi-streams:octets-to-string | |
| (drakma:http-request "https://mastodon.social/oauth/token" | |
| :method :post | |
| :parameters | |
| `(("client_id" . ,*client-key*) | |
| ("client_secret" . ,*client-secret*) | |
| ("grant_type" . "authorization_code") | |
| ("code" . ,*token*) | |
| ("scope" . "read") |
I hereby claim:
To claim this, I am signing this object:
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ;;;; pnathan.com | |
| ;;;; | |
| (ql:quickload '(:cl-who | |
| :alexandria | |
| :cl-fad | |
| :cl-ppcre | |
| :cl-markdown |
| let table_to_json table = | |
| let open Ezjsonm in | |
| let row_to_triple row = | |
| json_of_triple { row.(0) ; row.(1) ; row.(2) } in | |
| list (Array.to_list (Array.map row_to_triple table)) |