Skip to content

Instantly share code, notes, and snippets.

@etherald
etherald / edile-0.2.py
Last active May 26, 2020 18:18
Edile is a basic but useful text editor for Linux, Mac OSX and other unix-like operating systems. Written in Python, Edile is implemented in a single source code file and requires no installation - you simply execute the source code file. Edile requires Python, PyGtk and if you have GtkSourceView installed it will use that for syntax highlightin…
#!/usr/bin/env python
########################################################################
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@chaitanyagupta
chaitanyagupta / _reader-macros.md
Last active April 29, 2024 09:09
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.

@aufflick
aufflick / emacs-pipe.pl
Last active February 9, 2018 23:44
Piping to an emacs buffer with emacsclient
#!/usr/bin/env perl
# You can use this script in a pipe. It's input will become an emacs buffer
# via emacsclient (so you need server-start etc.)
# See http://mark.aufflick.com/o/886457 for more information
# Copyright (C) 2011 by Mark Aufflick <mark@aufflick.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy