Skip to content

Instantly share code, notes, and snippets.

@chaitanyagupta
chaitanyagupta / _reader-macros.md
Last active May 19, 2024 19:25
Reader Macros in Common Lisp

Reader Macros in Common Lisp

This post also appears on lisper.in.

Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.

Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):

The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.

@tune
tune / gist:3911829
Created October 18, 2012 13:34
C/C++言語 開発環境

Windows/Linuxで両方で動作する成果物を想定。 有償のツールは理解が得られる方が稀なので除外。

仕様書

外部仕様

Word/Excelが手軽だけど差分が追いにくい。 Markdown+PandocかSphinxでPDF提出がいいかな?

@tune
tune / bom_util
Created May 1, 2010 15:19
Add/Remove BOM
#!/usr/bin/ruby
require "optparse"
mode = :help
opt = OptionParser.new
opt.on("-a", "Add BOM"){|v| mode = :add}
opt.on("-d", "Delete BOM"){|v| mode = :delete}
opt.parse!(ARGV)