about summary refs log tree commit diff stats
path: root/doc/bane.21.cdr16.gmi
blob: dcd8d956501412ccbc77d4fd80f97f332116ce36 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
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 │
└───────────┴───────────┘
```