swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Infile usage/replacement


From: Marcus G. Daniels
Subject: Re: Infile usage/replacement
Date: 31 Mar 2000 09:45:30 -0800
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4

>>>>> "PJ" == Paul E Johnson <address@hidden> writes:

PJ> I understand the deprecation of Swarm's InFile. How would you
PJ> replace this functionality?

Swarm models are written in a C dialect, Objective C, and C comes with a
standard library with a more flexible and better documented API to
streams and files than is provided by InFile.  If for some reason you
want to do I/O of raw data, then you can always use stdlib.  (The main
problem with InFile is that error codes are conflated with end conditions.)

But rather than hacking out ad-hoc code to do I/O in C, you might
consider using a tool to precondition the data into a form that it can
be loaded by the HDF5 or Lisp archivers to instantiate objects.  If
you don't want or don't have time to learn a some things about R
(which can read and write text and HDF5) or Scheme (which can be used
to write text->Lisp converters in a few lines of code), you can always
write a standalone Objective C program that converts from, say, raw
text into the Lisp-like format (you don't need to understand Scheme,
just mimic the format), and make the .scm file a dependency in the
model Makefile.  That's about the same amount of work as writing
text-parsing code in the model itself, and will give you an extra
confidence that the the parsing is right.

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]