One Paragraph of project description goes here
Describe what dose this project mainly do
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.
import "math/big" | |
// simulate python 2.7 built-in __hash__ of string object | |
func hash(s string) *big.Int { | |
if len(s) == 0 { | |
return big.NewInt(0) | |
} | |
value := big.NewInt(int64([]byte(s)[0]) << 7) | |
for _, v := range []byte(s) { | |
value = value.Xor(value.Mul(value, big.NewInt(1000003)), big.NewInt(int64(v))) |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
osascript -e "set volume input volume 100" | |
# Check every minute for mic input < 100%; if it is, dial it up elegantly | |
* * * * * while (( `osascript -e "input volume of (get volume settings)"` < 100 )); do osascript -e "set volume input volume (input volume of (get volume settings) + 3)"; sleep 0.1; done; |