Skip to content

Instantly share code, notes, and snippets.

View kamahen's full-sized avatar

Peter Ludemann kamahen

View GitHub Profile
@kamahen
kamahen / deadfish2.pl
Last active October 15, 2023 23:58
deadfish code improved
:- module(deadfish,
[deadfish/0,
deadfish/3, % for debugging
score_deadfish/1]).
% Deadfish is one of the best known non Turing-complete programming languages.
% It has only one accumulator (which starts at 0) to store data, and only four commands:
%
% i - Increment the accumulator
% s - Square the accumulator
@kamahen
kamahen / why-japanese-writing-is-so-weird.md
Last active December 17, 2023 21:04
Why Japanese Writing is so Weird

Why Japanese Writing is so Weird

  • Peter Ludemann, November 2023

Creative Commons license "BY" - may use, but must attribute the author.

This is an aggregation of what I've learned over the years about the Japanese writing system. You'll have to take my word for many of things, or find the references on your own — it would take too long to dig up references.

Classical Japanese and Middle Chinese are not related (nor is Korean or Vietnamese)

@kamahen
kamahen / swipy-context-manager.diff
Created April 12, 2024 14:55
WIP context manager for swipy
$ git diff stash@{1}
diff --git a/janus.doc b/janus.doc
index fafbae8..dc1836d 100644
--- a/janus.doc
+++ b/janus.doc
@@ -431,7 +431,7 @@ Loading janus into Python is realized using the Python package
\const{janus-swi}, which defines the module \const{janus_swi}. We do
not call this simply \const{janus} to allow coexistence of Janus for
multiple Prolog implementations. Unless you plan to interact with
-multiple Prolog systems in the same session, we advise importing janus