This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang racket | |
| (provide define-macro) | |
| (define-syntax define-macro | |
| (lambda (x) | |
| (syntax-case x () | |
| ((_ (macro . args) body ...) | |
| #'(define-macro macro (lambda args body ...))) | |
| ((_ macro transformer) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Adapted from `make chibi-scheme-static SEXP_USE_DL=0` | |
| CC = musl-gcc | |
| CFLAGS = -Iinclude -DSEXP_USE_NTPGETTIME -DSEXP_USE_INTTYPES -Wall -DSEXP_USE_DL=0 -g -g3 -O3 | |
| all: libchibi-scheme-static.a | |
| libchibi-scheme-static.a: gc.o sexp.o bignum.o gc_heap.o opcodes.o vm.o eval.o simplify.o | |
| ar rcs $@ $^ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; Defining macros simply on chez scheme. This code is in the public domain. | |
| (define-syntax define-macro | |
| (syntax-rules () | |
| ((k (name . args) body ...) | |
| (define-macro name (lambda args body ...))) | |
| ((k name transformer) | |
| (define-syntax name | |
| (lambda (stx) | |
| (syntax-case stx () |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @font-face { | |
| font-family: "sans-chinese"; | |
| src: local("WenQuanYi Micro Hei"), local("PingFang SC"), local("Noto Sans SC"), local("Noto Sans CJK SC"), local("Source Han Sans CN"), local("Microsoft YaHei"), local("PingFang TC"), local("Noto Sans TC"), local("Noto Sans CJK TC"), local("Source Han Sans TW"), local("Microsoft JhengHei"), local("sans-serif"); | |
| unicode-range: U+2000-FFFF | |
| } | |
| body { | |
| font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", sans-chinese, monospace; | |
| // .... | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; This is a new version of pmatch (August 8, 2012). | |
| ;; It has two important new features: | |
| ;; 1. It allows for a name to be given to the pmatch if an error ensues. | |
| ;; 2. A line from the specification has been removed. (see below). Without | |
| ;; that line removed, it was impossible for a pattern to be (quote ,x), | |
| ;; which might be worth having especially when we write an interpreter | |
| ;; for Scheme, which includes quote as a language form. | |
| ;;; Code written by Oleg Kiselyov | |
| ;; (http://pobox.com/~oleg/ftp/) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| exec rlwrap /usr/bin/guile "$@" 2> >(grep -E -v '^;;; ' >&2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // typst compile doc-template.typ | |
| // Output: doc-template.pdf | |
| #set text(font: ( | |
| "Libertinus Serif", | |
| "Source Han Serif", | |
| )) | |
| #set heading(numbering: "1.") | |
| #set page( | |
| paper: "a4", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # usage: echo '$$E=mc^2$$' | tex2jpg out.jpg | |
| PPWD=$(pwd) | |
| DIR=/tmp/$(head -c10 /dev/urandom | base32) | |
| mkdir -p $DIR | |
| cd $DIR && \ | |
| echo '\documentclass{minimal}' > input.tex && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (import (chicken syntax)) | |
| (define-syntax define-macro | |
| (er-macro-transformer | |
| (lambda (exp r c) | |
| (let ((def (cadr exp)) | |
| (body (cddr exp))) | |
| `(define-syntax ,(car def) | |
| (er-macro-transformer | |
| (lambda (e2 r2 c2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| default-lease-time 600; | |
| max-lease-time 7200; | |
| subnet 192.168.50.0 netmask 255.255.255.0 { | |
| option domain-name-servers 8.8.8.8, 8.8.4.4; | |
| option routers 192.168.50.1; | |
| option subnet-mask 255.255.255.0; | |
| range 192.168.50.100 192.168.50.200; | |
| } |