Skip to content

Instantly share code, notes, and snippets.

View moratori's full-sized avatar
😸

moratori moratori

😸
View GitHub Profile
@moratori
moratori / results.md
Last active November 21, 2021 15:11
Results of the Knuth-Bendix completion algorithm implemented in the tool Clover https://github.com/moratori/clover

Summary

title number
Completion Succeeded 65
Completion failed 6
Completion timeouted(over 30 seconds) 44
total 115

Detail

@moratori
moratori / dagger.lisp
Created December 10, 2014 05:13
dagger
(set-macro-character #\DOUBLE_DAGGER
(get-macro-character #\) ))
(set-macro-character #\DAGGER
(lambda (stream char)
(declare (ignore char))
(read-delimited-list #\DOUBLE_DAGGER stream t)))
defun fact † n‡
Inductive nat : Type :=
| O : nat
| S : nat -> nat.
Inductive bool : Type :=
| true : bool
| false: bool.
Fixpoint lessthan (n : nat) (m : nat) : bool :=
@moratori
moratori / yacc.lisp
Created July 25, 2014 15:18
example of cl-yacc
(use :yacc)
(defun integer? (ch)
(handler-case
(progn
(parse-integer (string ch))
t)
(error (c) (declare (ignore c))
nil)))
@moratori
moratori / app5.lisp
Created July 22, 2014 18:31
clim app5
(in-package :cl-user)
(ql:quickload :clx)
(ql:quickload :mcclim)
(defpackage app
(:use :clim
:clim-lisp))
(in-package :app)
@moratori
moratori / app4.lisp
Created July 12, 2014 14:43
clim app4
(in-package :cl-user)
(ql:quickload :clx)
(ql:quickload :mcclim)
(defpackage app
(:use :clim
:clim-lisp))
@moratori
moratori / app3.lisp
Created July 12, 2014 14:43
clim app3
(in-package :cl-user)
(ql:quickload :clx)
(ql:quickload :mcclim)
(defpackage app
(:use :clim
:clim-lisp))
@moratori
moratori / app2.lisp
Created July 12, 2014 14:43
clim app2
(in-package :cl-user)
(ql:quickload :clx)
(ql:quickload :mcclim)
(defpackage app
(:use :clim
:clim-lisp))
@moratori
moratori / app1.lisp
Created July 12, 2014 14:42
clim app1
(in-package :cl-user)
(ql:quickload :clx)
(ql:quickload :mcclim)
(defpackage app
(:use :clim
:clim-lisp))
@moratori
moratori / defgrammer.lisp
Created June 6, 2014 06:58
generate text automatically
(setf *random-state* (make-random-state t))
(defun make-function-name (sym)
(let ((fname
(string-upcase (concatenate 'string "MAKE-" (symbol-name sym)))))
(multiple-value-bind (sym pack) (find-package fname)
(declare (ignore pack))
(if sym sym (intern fname)))))