aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--basic.lsp1
-rwxr-xr-xchello.lisp7
-rw-r--r--doc/bane.21.cdr16.gmi75
-rwxr-xr-xecho.lsp4
-rw-r--r--loot.lsp1
5 files changed, 9 insertions, 79 deletions
diff --git a/basic.lsp b/basic.lsp
index 0662a09..212006c 100644
--- a/basic.lsp
+++ b/basic.lsp
@@ -1,3 +1,4 @@
+;; -*- islisp -*-
;;; BASIC interpreter
;; TODO: rewrite some cond/cases as defmethods. Look for calls to "instancep".
diff --git a/chello.lisp b/chello.lisp
index 7722770..858bb78 100755
--- a/chello.lisp
+++ b/chello.lisp
@@ -1,4 +1,7 @@
#!/usr/local/bin/sbcl --script
-(format *standard-output* "~A~%" "Hello world")
-(quit)
+(defun main ()
+ (format *standard-output* "~A~%" "Hello world")
+ (quit))
+
+(main)
diff --git a/doc/bane.21.cdr16.gmi b/doc/bane.21.cdr16.gmi
deleted file mode 100644
index dcd8d95..0000000
--- a/doc/bane.21.cdr16.gmi
+++ /dev/null
@@ -1,75 +0,0 @@
-title: POSIX API for ISLisp
-author: Darren Bane
-copyright: 2021 Darren Bane, CC BY_SA
-
-# Abstract
-
-A mapping from Scheme's SRFI-170, "POSIX API", to ISLisp is defined.
-
-# Introduction
-
-Although they are similar, Scheme and ISLisp are not the same language. This document adapts the standard Scheme POSIX interface to ISLisp accounting for:
-
-* Different naming conventions (e.g. `predicatep` rather than `predicate?`)
-* Historical practice, in particular compatibility with OpenLisp (the only commercial implementation) is prioritised
-
-# Dependencies
-
-SRFI-170 depends on at least part of several other SRFIs, in particular:
-
-* SRFI-19, "Time Data Types and Procedures"
-* SRFI-106, "Networking operations"
-* SRFI-158, "Generators and Accumulators"
-
-SRFI-39, "Parameter objects", is superseded by ISLisp's dynamic variables.
-
-Only SRFI-106 is implemented fully; the subset of required symbols is taken from the others.
-
-# Mapping
-
-Any symbols not mentioned in the following are unchanged from SRFI-170.
-
-## S3.3, "File system"
-
-```table
-┌──────────────────┬──────────────────┐
-│ Scheme │ ISLisp │
-╞══════════════════╪══════════════════╡
-│ file-info? │ file-info-p │
-├──────────────────┼──────────────────┤
-│ delete-directory │ remove-directory │
-└──────────────────┴──────────────────┘
-```
-## S3.5, "Process state"
-
-```table
-┌────────────────────────┬──────────────────┐
-│ Scheme │ ISLisp │
-╞════════════════════════╪══════════════════╡
-│ set-umask! │ set-umask │
-├────────────────────────┼──────────────────┤
-│ set-current-directory! │ change-directory │
-├────────────────────────┼──────────────────┤
-│ pid │ getpid │
-├────────────────────────┼──────────────────┤
-│ user-uid │ getuid │
-└────────────────────────┴──────────────────┘
-```
-## S3.11, "Environment variables"
-
-```table
-┌──────────────────────────┬────────┐
-│ Scheme │ ISLisp │
-╞══════════════════════════╪════════╡
-│ get-environment-variable │ getenv │
-└──────────────────────────┴────────┘
-```
-## S3.12, "Terminal device control"
-
-```table
-┌───────────┬───────────┐
-│ Scheme │ ISLisp │
-╞═══════════╪═══════════╡
-│ terminal? │ terminalp │
-└───────────┴───────────┘
-```
diff --git a/echo.lsp b/echo.lsp
index b299eab..0d78ed7 100755
--- a/echo.lsp
+++ b/echo.lsp
@@ -1,4 +1,4 @@
-#!/home/dbane/openlisp-11.0.0/uxlisp -shell
+#!/Users/dbane/openlisp-11.6.0/uxlisp -shell
(require "json")
(defpackage #:echo
(:use #:openlisp #:json)
@@ -41,7 +41,7 @@
(format s "~A" json))))
(defun echo-server ()
;; Server side (server addr : 127.0.0.1)
- (with-server-socket (server 8192 "tcp")
+ (with-server-socket (server 8192 :TCP)
(let ((client (accept server)))
;; Talk with client using standard I/O.
(with-standard-input client
diff --git a/loot.lsp b/loot.lsp
index 91f8eac..bb2176a 100644
--- a/loot.lsp
+++ b/loot.lsp
@@ -1,3 +1,4 @@
+;; -*- islisp -*-
;; #lang core-lisp
;;; Port of https://en.wikipedia.org/wiki/ModernPascal#Code_Sample[3].
;;; And then to CL and ISLisp.