Skip to content

Instantly share code, notes, and snippets.

Rainer Joswig lispm

Block or report user

Report or block lispm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View queens.lisp
;;; Paper:
;;; Code:
;;; Lisp Code:
;;; Changes/extensions to the original Common Lisp code: Rainer Joswig,, 2020
;; * using bitvectors is faster than 'boolean' arrays (which typically aren't supported in CL)
;;; In Common Lisp
;;; * use Quicklisp
;;; * compile and load this file
View mi.lisp
; Common Lisp: Rainer Joswig,, 2019
;;; ======================================================
;;; Features
(defclass walk ()
View maze.lisp
; CL version, by Rainer Joswig,, 2019
; changes
; maze is a 2d array, contents are symbols/numbers
; pass directions as symbols
; use paths as position histories
View occurences.lisp
(defun occurrences (list)
(let ((ht (make-hash-table)))
(let ((holder nil))
(dolist (x list)
(if (not (member x holder :test #'eq))
(push x holder)
lispm / insults.lisp
Created Nov 14, 2018
Shakesperian insults by Jerry Maguire in Lisp
View insults.lisp
;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Author:; Coding: latin-1; Base: 10; Readtable: CL -*-
; Shakesperian insults by Jerry Maguire
; Lisp code: Rainer Joswig, 2018,
(defparameter *insult-data*
#(#("artless" "bawdy" "beslubbering" "bootless" "churlish" "cockered" "clouted"
"craven" "currish" "dankish" "dissembling" "droning" "errant" "fawning"
"fobbing" "froward" "frothy" "gleeking" "goatish" "gorbellied"
"impertinent" "infectious" "jarring" "loggerheaded" "lumpish" "mammering"
View mccarthy-eval.lisp
; John McCarthy, Artificial Intelligence Laboratory, Stanford University
; for CL : Rainer Joswig,
; this version runs in a Common Lisp
View maze.lisp
; Common Lisp Maze 20030311 by Joe Wingbermuehle
; Changes Rainer Joswig,, 2018
; Interface: the width and height of the maze. Both must be odd.
View check-slot-writes.lisp
; adapted from , Pascal Costanza
;;;; checking CLOS slot writes at runtime for the correct type
;;; LispWorks
(defclass slot-writes-checking-class (standard-class)
(defmethod validate-superclass
View evaluate.lisp
; this version: 2018, Rainer Joswig,
; we create a bunch of structures for the expression types
; each structure defines a constructor of the same name
; each expression knows the corresponding Lisp function
(defstruct (val (:constructor val (e))) e)
(defstruct (bop :conc-name) e1 e2 op)
View puzzle.lisp
; John McCarthy. Puzzle Solving Program in LISP. Memo 20, Artificial Intelligence Project
; 1960
; Common Lisp translation: Rainer Joswig, 2016,
; basically the code is unchanged, but using s-expression syntax in Common Lisp
(defparameter pzl
'((a1 (a2 a5) 7.5)
(a2 (a1 a5 a9 a3) 3.5)
You can’t perform that action at this time.