Hi Sean. 2012/5/15 Sean Bartell <[email protected]>: > Hello, everyone, > > I started working on my project early to compensate for a future > vacation, so this was my first day of real work. However, I also spent > some time in the past two weeks researching existing work related to my > project. I've updated the wiki page[0] with my findings and some other > thoughts. > > I spent some time thinking of a project name. My favorite idea is > "Bithenge" or "Bytehenge," since it works with binary structures :). > > Most existing projects use a simple imperative language (either an > existing scripting language or a new domain-specific language) to define > data structures. The basic commands define fields and read basic data > types, but there are also expressions and control flow commands > (if/while/break). It's very similar to reading the data with a > general-purpose language except that reading the basic fields and > formatting the output are easier. > > This approach is easy to understand, and general enough to work with > complicated structures. One of the main disadvantages is that file > modifications must be either trivial or coded by hand--the tools aren't > smart enough to handle a structure changing length easily. Another > problem is that the data can only be interpreted in one way; if you want > to see the raw Unix time instead of a formatted date, you have to change > the structure description. > > In order to address these shortcomings, I came up with the following set > of requirements for my project: > > - Be portable enough to run in HelenOS. C (and maybe Lua) only! Just to avoid some misinterpretation in the future. The idea is to create program for HelenOS. If it would be portable to another OS, it is certainly okay but not a must-be. We do not want to end up with another program that needs to use libposix and that uses unsafe string operations or other not-that-well-thought features of POSIX.
Thus I would recommend to implement it the other way around. Write it with HelenOS libc in mind and for portability with other OS write some wrapper functions. You may take inspiration from the Sysel interpreter (uspace/app/sbi). > > - Handle viewing the data in different ways; for instance, choose > between viewing a formatted date, the integers, and the raw bytes in a > FAT entry. > > - Check whether the data is valid and handle invalid data reasonably > well. > > - Parse the data lazily, so structures are only read when you want to > view them. > > - Work fully in both directions (parsing and modifying) without too much > extra effort when specifying the format. Sounds good :-). > > I haven't spent much time learning about Bazaar or HelenOS yet, and I > think I'll delay that until later when I start working with them. I have > some more existing projects to investigate, but after that I'll spend > the next week or two working on the basic design of my project. I want > to consider both an ambitious design that might be difficult to > implement and a more basic design I know is feasible. Just make sure that the basic design is a subset of the ambitious one to allow easy extensions in the future ;-). Thanks for your description. Looking forward to see the design in more detail. - Vojta > > Ideas? Questions? Complaints? > > Thanks, > Sean Bartell > > [0] http://trac.helenos.org/wiki/StructuredBinaryData > > _______________________________________________ > HelenOS-devel mailing list > [email protected] > http://lists.modry.cz/cgi-bin/listinfo/helenos-devel _______________________________________________ HelenOS-devel mailing list [email protected] http://lists.modry.cz/cgi-bin/listinfo/helenos-devel
