Skip to content

Instantly share code, notes, and snippets.

@luksamuk
luksamuk / example-requests.fnl
Last active August 25, 2022 01:50
Plan 9 REST Requests (with Fennel and Lu9)
(local p9 (require :p9))
(local clone (p9.open "/mnt/web/clone" "read"))
(local n (math.tointeger (clone:read)))
(local webpath (.. "/mnt/web/" n "/")) ; /mnt/web/n/
(print (.. "Using " webpath))
(fn open-webfile [file mode]
(p9.open (.. webpath file) mode))

Keybase proof

I hereby claim:

  • I am luksamuk on github.
  • I am luksamuk (https://keybase.io/luksamuk) on keybase.
  • I have a public key ASCPTHW6aUO1B2Qu0ZaT2hlQDEiu2IvPlJsC6Hp7UZDP8wo

To claim this, I am signing this object:

@luksamuk
luksamuk / escalona.apl
Created August 23, 2019 00:18
Escalonando Matrizes em APL: Código
∇R←IDENTITY N
R←(N N)⍴(1,N⍴0)
∇R←EXTENDBOTTOM MAT
R←(((↑⍴MAT)⍴1),0)\[1]MAT
∇R←EXTENDRIGHT MAT
R←(((2⌷⍴MAT)⍴1),0)\MAT
@luksamuk
luksamuk / main.tex
Last active June 30, 2022 17:19
Template abnTeX2 para a UFVJM (beta)
% main.tex
% Parte do projeto abntex2-ufvjm.
% Copyright (c) 2019 Lucas Vieira
% Este arquivo é provido sob a licença BSD 2-Clause (simplificada),
% e pode ser utilizado livremente. Para mais informações, veja
% o website choosealicense.com.
\documentclass[article,
12pt,
openany,
@luksamuk
luksamuk / clos-test.lisp
Created May 17, 2019 14:21
Testing Common Lisp Object System's method dispatch
(defgeneric thing (x y))
(defclass foo () ())
;; BAR inherits FOO
(defclass bar (foo) ())
(defmethod thing ((x foo) (y foo))
(format t "Both are of type FOO~%"))
@luksamuk
luksamuk / .travis.yml
Last active April 28, 2019 23:51
post-docker-travis-commonlisp3
services:
- docker
script:
- make docker-build
- make docker-test
@luksamuk
luksamuk / Dockerfile
Last active April 28, 2019 21:43
post-docker-travis-commonlisp2
FROM debian:9
RUN apt update && apt install -y curl make bzip2 libcurl3-gnutls &&\
curl -L -O https://github.com/roswell/roswell/releases/download/v19.4.10.98/roswell_19.4.10.98-1_amd64.deb &&\
dpkg -i *.deb && rm *.deb
ENV PATH="/root/.roswell/bin:${PATH}"
RUN ros install sbcl-bin && ros use sbcl-bin
RUN ros install qlot
@luksamuk
luksamuk / run-tests.lisp
Last active April 28, 2019 21:17
post-docker-travis-commonlisp1
(ql:quickload :cl-jackc/test)
(in-package :cl-jackc/test)
(rove:run :cl-jackc/test)
(unless (first rove/core/suite:*last-suite-report*)
(uiop:quit -1))