choco msys2 emacs
Press Windows button, in ‘Type to search’ type cmd, right-click on Command Promp Desktop app and select Run as administrator.
;;; tree traversal | |
(defparameter tr '((s | |
(num | |
(dig | |
(1)) | |
(diga | |
(da | |
(2a)) | |
(da |
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import qualified GI.Gtk as GI (init, | |
main) | |
import GI.Gtk (boxNew, | |
binGetChild, | |
boxPackStart, | |
checkButtonNew, |
https://www.haskell.org/platform/
pacman -Syu
, then kill the terminal when prompted restart it and resume update
with pacman -Su
pacman -S mingw64/mingw-w64-x86_64-pkg-config mingw64/mingw-w64-x86_64-clutter mingw64/mingw-w64-x86_64-gobject-introspection
require 'csv' | |
# helper code for importing csv orders | |
class ReceiptImporter | |
attr_reader :found_errors, :invalid_receipts, :skipped_receipts, :imported_receipts, :total_receipts | |
def initialize(filepath, mode) | |
@depot = Depot.find Depot.current | |
@mode = mode | |
@record_types = { 'FH' => :file_header, | |
'RH' => :receipt_header, |
(defun max-int (a) | |
(cond ((null a) | |
(error "empty list")) | |
((null (cdr a)) | |
(car a)) | |
(T | |
(max (car a) | |
(max-int (cdr a)))))) |
;; you can use this function to unfold s-exps so that newline follows after one or more closing brackets | |
(defun unfold-lisp () | |
"Unfold lisp code." | |
(interactive) | |
(search-forward ")") | |
(backward-char) | |
(search-forward " ") | |
(newline-and-indent)) | |
(global-set-key (kbd "s-0") 'unfold-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.
<html> | |
<head> | |
<title>Colour selection</title> | |
<style> | |
.grey{color:#777;} | |
.red{color:red;} | |
.yellow{color: yellow;} | |
.orange-red{color: #ff4500;} | |
.tomato{color: #ff6347;} | |
.light-coral{color: #f08080;} |