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
| -- | Foo | |
| { bar :: Baz | |
| -- | Blah | |
| , fizz :: Buzz | |
| -- | Fizzbuzz | |
| , blah :: Etc | |
| } |
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
| (ql:quickload "fare-matcher") | |
| (defpackage :derive | |
| (:use :common-lisp | |
| :fare-matcher)) | |
| (in-package :derive) | |
| (defvar *variable*) |
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
| Object -- Unary 1; the root trait, very first one created; 1 is its "tag" | |
| Foo = Object clone -- Union (Unary 2) (Unary 1) (@clone might become @derive or something) | |
| Bar = Foo clone -- Union (Unary 3) (Union (Unary 2) (Unary 1)) | |
| Fizz = Foo clone -- Union (Unary 4) (Union (Unary 2) (Unary 1)) | |
| -- defines on trait: | |
| -- Intersection (Unary 2) (Unary 3) | |
| -- note that the unions are gone; it only intersects on the "heads" | |
| (f: Foo) x: (b: Bar) := 1 |
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
| website: Blog: { | |
| "/" -> page: { | |
| Post all (sort-by: { a b | a created-at < b created-at }) | |
| each: { p | join: p pretty } | |
| } | |
| "/post" -> page: { | |
| (Post get: (parameter: "id")) match: { | |
| @(ok: p) -> super join: p pretty | |
| @none -> not-found |
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
| Timer do: { | |
| Session all each: { s | | |
| when: (Timer now - s created-at > 1 month) do: { | |
| "Cleaning up expired session " (.. s id) print | |
| s delete! | |
| } | |
| } | |
| } every: 1 day |
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
| "/login" -> | |
| { h1: "hi!" | |
| { prompt: { url | | |
| form: { | |
| input: "password" | |
| submit: "log in" | |
| } action: url method: "post" | |
| } | |
| } until: { parameter: "password" == "secret" } |
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
| define: *variable* as: @no-variable | |
| (b: Block) derive := | |
| with: *variable* as: b arguments head name do: { | |
| Block: b contents (map: @derive) arguments: b arguments | |
| } | |
| `(~x ^ ~y) derive := | |
| condition: { | |
| -- constant exponent |
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
| use: "web" | |
| Site = Website new: [ | |
| "/" -> | |
| { form: { | |
| input: "foo" | |
| submit | |
| } action: { | |
| foo = parameter: "foo" | |
| link: "click here" to: { |
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
| [ui] | |
| username = Alex Suraci <snipped@email.com> | |
| [extensions] | |
| bookmarks = | |
| color = | |
| convert = | |
| crecord = ~/.hgext/crecord | |
| eol = | |
| extdiff = |
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
| [0]> for-macro 1 print | |
| 1 | |
| @ok | |
| [0]> { for-macro 1 print } | |
| 1 | |
| 1 | |
| { for-macro 1 print } | |
| [0]> { { for-macro 1 print } } | |
| 1 | |
| 1 |