This file contains 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
*.tar.gz | |
.sentinel.* |
This file contains 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
(defun fwoar--find-lisp-project-root (dir-name) | |
(let ((root (locate-dominating-file dir-name | |
(lambda (n) | |
(directory-files n nil "^[^.#][^#]*[.]asd$"))))) | |
(when root | |
(cons 'lisp root)))) | |
(cl-defmethod project-roots ((project (head lisp))) | |
(list (cdr project))) |
This file contains 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
import java.lang.RuntimeException | |
import java.util.Arrays | |
object VariantWorld2 { | |
class Greet : World.Visitor { | |
fun visit(subject: Dog, arg: String): String { | |
return "$arg is greeted" | |
} | |
fun visit(subject: Cat, arg: String): String { |
This file contains 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
// | |
// Two kinds of animals: dogs and cats | |
// | |
// I want greet and leave to be defined such that there are four | |
// different behaviors corresponding to each combination of dog and | |
// cat | |
// | |
class Animal { | |
receive_operation(operation) { | |
console.log("the animal is unresponsive"); |
This file contains 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
(uiop:define-package :fwoar.zipfile | |
(:mix :cl :fwoar.lisputils) | |
(:export )) | |
(in-package :fwoar.zipfile) | |
(defun read-bytes (n s) | |
(with (seq (make-array n :element-type 'serapeum:octet)) | |
(values seq | |
(read-sequence seq s)))) |
This file contains 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
(ns oop-with-inheritance) | |
(defn start [arg] | |
(println "starting: " arg)) | |
(defn stop [sys] | |
(println "stopping:" sys)) | |
(defn server-system-local [& args] | |
(apply println "making server system:" args) |
This file contains 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
(defpackage :fwoar.mc-web | |
(:use :cl ) | |
(:export )) | |
(in-package :fwoar.mc-web) | |
(defclass myway-server (hunchentoot:acceptor) | |
((%mapper :initform (myway:make-mapper) :reader mapper))) | |
(defvar *current-route*) | |
(define-method-combination routing |
This file contains 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
;;; -*- Mode:Lisp; Syntax:ANSI-Common-Lisp; Package: ASDF-USER -*- | |
(in-package :asdf-user) | |
(defsystem :my-new-system | |
:description "" | |
:author "Ed L <[email protected]>" | |
:license "MIT" | |
:depends-on (#:alexandria | |
#:uiop | |
#:serapeum |
This file contains 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
(defpackage :clos-browser | |
(:use :clim-lisp :clim) | |
(:export | |
#:main)) | |
(in-package :clos-browser) | |
(define-application-frame class-browser () | |
((classes :initarg :classes :reader classes) | |
(visible-classes :initform nil :accessor visible-classes) | |
(current-class :initform nil :accessor current-class)) |
This file contains 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
;; Presupposes the binary parser from fwoar.lisputils/bin-parser: https://github.com/fiddlerwoaroof/fwoar.lisputils/blob/master/bin-parser.lisp | |
(uiop:define-package :fwoar.zipfile | |
(:mix :cl :fwoar.lisputils :fwoar.bin-parser) | |
(:export )) | |
(in-package :fwoar.zipfile) | |
(defparameter *zip-local-file-header* | |
'((signature 4) (version 2) (flags 2) (compression 2 le->int) (mod-time 2) (mod-date 2) (crc-32 4) | |
(compressed-size 4 le->int) |