mirror of
https://github.com/Interlisp/maiko.git
synced 2026-01-13 15:18:14 +00:00
* Remove useless VersionArray parameter in maintain_version()
The 2nd argument, FileName *varray, is only ever NULL, so
remove it and simplify the code.
* Remove useless and unused VersionArray cache mechanism
* Simplify setting of file times on file close
The futimes(fd, ...) function allows changing the times of a file with
reference to an open file descriptor which allows us to avoid trying to
find a pathname by which utimes(path, ...) would operate on the inode
corresponding to the fd we have just closed.
* Remove unnecessary temporary variable for VersionArray
* In get_version_array() do not mix array and pointer access to VersionArray
* Improve {DSK} device handling of files with many versions
Somewhat dynamically allocate the version array storage, in chunks of
VERSIONARRAYCHUNKLENGTH (currently 200) allowing for up to
VERSIONARRAYMAXLENGTH (currently 2000) entries before reporting an
error. These numbers could be adjusted, or the limit could be removed.
Sorts the version array in descending order of version number to
improve the performance of check_vless_link() which stats every file
in the version array until it finds one linked to the versionless name
(which should be the highest version). Sorting, and tracking the
number of active entries, also allows for future optimization of other
operations that currently walk through the version array.
* futimens() appears more widely available than futimes() - so use it
* Rework caching of version array for files
While enumerating the entries in a directory is relatively fast,
on some systems (macOS) stat() of a file is slow.
While there is not general agreement on the name in the stat structure
of the timespec field for the modification time, POSIX specifies it
as "st_mtim", and it is possible to #define st_mtim to be the
system-specific name in "version.h" (macOS: st_mtimespec).
* FindHighestVersion can make use of sorted order of filename/version cache
Since the list of filename and versions is maintained in descending order
by version number (see get_version_array) the highest version is trivially
located at index 0 of the filename array.
Maiko
Maiko is the implementation of the Medley Interlisp virtual machine, for a byte-coded Lisp instruction set and some low-level functions for connecting with Lisp for access to display (via X11) and disk etc.
For an overview, see Medley Interlisp Introduction.
See the Medley repository for
- Issues (note that maiko issues are there too)
- Discussions (Q&A, announcements, etc)
- Medley's README
Bug reports, feature requests, fixes and improvements, support for additional platforms and hardware are all welcome.
Development Platforms
We are developing on FreeBSD, Linux, macOS, and Solaris currently on arm7l, arm64, PowerPC, SPARC, i386, and x86_64 hardware.
Building Maiko
Building requires clang, make, X11 client libraries (libx11-dev). For example,
$ sudo apt update
$ sudo apt install clang make libx11-dev
$ cd maiko/bin
$ ./makeright x
- The build will (attempt to) detect the OS-type and cpu-type. It will build binaries
ldeandldexin../ostype.cputype(with .o files in..ostype.cputype-x. For example, Linux on a 64-bit x86 will uselinux.x86_64, while macOS 11 on a (new M1) Mac will usedarwin.aarch64. - If you prefer using
gccoverclang, you will need to edit the makefile fragment for your configuration (makefile-ostype.cputype-x) and comment out the line (with a #) that definesCCforclangand uncomment the line (delete the #) for the line that definesCCforgcc. - There is a cmake configuration (TBD To Be Described here).
Building For macOS
- Running on macOS requires an X server, and building on a Mac requires X client libraries. An X-server for macOS (and X11 client libraries) can be freely obtained at https://www.xquartz.org/releases
Building for Windows 10
Windows 10 currently requires "Docker for Desktop" or WSL2 and a (Windows X-server). See Medley's README for more.
Description
Languages
C
95.6%
Assembly
3.4%
CMake
0.5%
Shell
0.3%
sed
0.2%