1. Re: Ideas

From:    Andy Kurnia
>    That's something "simple", i.e. something I would want to make.
>    Details please?

     Well, working out the details is what would make it a project for you.
<g>
You could handle byte-sized variables either through allocate or just by
storing 4 of them in an atom and manipulating the appropriate 8 bits as
needed.  So that if you read in a 100k binary file to a sequence, it'd take
102400 bytes of memory instead of 409600.  But either way, you'd need to
keep track of the position of the bytes..  Doing it simply, so that the
programmer doesn't have to jump through too many hoops to use it, and with
the least amount of overhead is the challenge.  The programmer should only
need to know the offset, like I want to set bytes 35..40 of the file to
"ABCDEF", or set a = byte 675, without worrying about the positions within
the atoms of the sequence or offsets of an allocated space.

     As far as the structures part, the closest thing I've seen is Ralf's
OOP implementation.  But instead of classes/objects we'd be making typed and
untyped structures of data.
Like say I want a sequence that'll hold file info, structured like
    Name as string,
    Extension as string,
    Size, Date, and Time as atoms,
    Attributes as sequence of characters.
But I don't want the types totally hard-coded because there'll be
differences.  On a DOS-only
system prior to 6.22, I want to limit the size of the Name and Extension to
8 and 3, but on a
DOS or Windows version with lfn support, I want to make use of it in the
file info block.
   Further I may want to be able to make sequences of those fileinfoblocks,
and structures containing say, a fileinfoblock and other assorted data of
different types and structures, some of which may not be typechecked, but
keeping the typechecking on the elements of the fileinfoblock.
   I could do that easy enough.  But making it generic, so that it works
with whatever structure,
and you don't have to code separate, long, intricate, type-checking routines
for each structure and combination of structures you want is the challenge.

   Run-time typing of user-defined complex, compound, and compound complex
structures.  Heh.  In case you're wondering, I'd like to see a database
wherein the user would have full control not only of the number and types of
fields in a record, and whether those fields where type-checked, but the
organizational structure of the records as well.  Combining the
functionality of a relational database with a tree-structure and/or chart
organizer, and improving a bit.  I think Euphoria's flexibility makes it
about the perfect language to do it in.

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu