[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-hackers] [PATCH] Add chicken.platform module (partially)
From: |
Peter Bex |
Subject: |
[Chicken-hackers] [PATCH] Add chicken.platform module (partially) |
Date: |
Sat, 22 Apr 2017 22:29:15 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hi all,
Attached are two patches which move some stuff around and create the
chicken.platform module.
The commits should speak for themselves. While working on the patch,
I noticed that provide and provided? are not really related to feature
identifiers as such, and more to code loading, so I think this should
end up in the chicken.load module (I've updated the core-libraries-reorg
wiki page accordingly). If y'all disagree, please let me know.
I've also noticed that get-host-name is a little tricky on Windows due to
the stupid Winsock API requiring one to call WSAStart, but that's okay.
However, system-information is really quite hairy, large and OS-specific
The docs simply state it calls the UNIX uname() function, but looking at
it from a higher level it makes sense that this kind of platform
information is available from chicken.platform, so I think it's okay to
have something of the sort in there. But maybe the API should be
reconsidered?
For example, we also define "machine-type" in chicken.platform, which to
me is a bit confusing: how does machine-type differ from the "processor"
entry in system-information's list? And why do we need the hostname
to be in both get-host-name and system-information? On Windows it's
identical, but perhaps on Unix, gethostname() can return a different
name than uname()'s nodename?
Cheers,
Peter
0001-Add-chicken.platform-module-incomplete.patch
Description: Text Data
0002-Move-some-procedures-from-chicken.eval-to-chicken.pl.patch
Description: Text Data
signature.asc
Description: Digital signature
- [Chicken-hackers] [PATCH] Add chicken.platform module (partially),
Peter Bex <=