SchemeNow - larcenists/larceny GitHub Wiki
Scheme Now! (aka Snow) should be supported by Larceny v0.94.
From Ticket #435, we can see that Felix used to test Snow via the following command sequence:
% pwd
/Users/pnkfelix/Dev/larcenydev/trunk/snow
% site_root=$HOME/snow-site ./configure
...
% make install
...
% $HOME/snow-site/current/bin/snowman list
...
Text below may be somewhat out of date, since Felix thinks it predates v0.94
Felix has gotten the self-tests to run, but we need more:
- scripts that take a command-line argument specifying an expression to evaluate
- better scripting in general
- preserving top-level macro definitions in
.faslfiles (ticket #101; should be easy) -
list-directoryon all target architectures - TCP/IP semantics that correspond to what Snow expects
-
sleep-msecsWe should work with the prerelease of Scheme Now! version 1.1.
PnkFelix remembered in the past few days that we do have a command-line-arguments parameter that is set to argv within [source:trunk/larceny_src/src/Lib/Repl/main.sch main.sch].
- The argv that it gets are all the arguments after the
--or-argsoption in the original argument list. (If there is no--or-argsthen there are no arguments.) - One easy way to support a lot of what Snow needs would be to adjust
main.schso that it does a little more parsing of the arguments beyond just trying to load each argument as if it were a Scheme source file. E.g. we could change it so that the subsequence-eEXP is treated as a command to evaluate EXP in the current global environment; but of course this is not a conservative extension if-eexists as a file in the current directory. Are we willing to make such a change?- Yes (says Will). Anyone who uses
-eas the name of a file deserves to lose.
- Yes (says Will). Anyone who uses
PnkFelix added a couple of changes that make it much easier for a user to start up (a released version of) Larceny with no output issued to the terminal:
- The
-eoption tomain.schmakes it possible for the user to set theheraldto#fand therepl-promptto a no-op (or any expression without a side-effect). (See changeset:4254.) - The
-nobanneroption to the runtime makes it possible for the user to turn off the banner (the line with version number, build date, host OS, and garbage collector technology) on released versions of Larceny. It determines whether or not we are in a release version by inspecting thelarceny_version_qualifierstring. (See changeset:4264.) - The above two changes along with some trimming out extraneous newlines (changeset:4263) is all we need. Here's how you put it all together:
% ./larceny -nobanner -- -e '(herald #f)' -e '(repl-prompt (lambda (level out) #f))'
Regaring TCP/IP semantics: PnkFelix was having problems with the Experimental/socket library on Solaris.
- After a bit of investigation, it seems that the problem might be that we are reversing the addresses (represented as lists of bytes) returned by
get-host-by-namein Experimental/socket. - This change was introduced by Lars in changeset:1815 and was propagated into the trunk by PnkFelix during the great merge of the release_2 and dotnet branches (starting at changeset:2542).
- Reverting this change (so that the
mapofreverseis replaced with identity) seems to fix sockets on Solaris. So either we need to do something endianness dependant here, or we need to get rid of some endianness dependant code somewhere else. - Yep, we had endianness dependant code "somewhere else"; see changeset:4265.