Interpreter Library organization

Whatever is on your mind, whether Lisp related or not.
Post Reply
Posts: 8
Joined: Mon Jul 04, 2011 7:00 am

Interpreter Library organization

Post by underablackrainbow » Tue Mar 13, 2012 1:30 am

Hello guys. I've a problem with my interpreter. I'm trying to organize functions in libraries with some logic ... but I haven't found this logic yet. The intention is to provide group of functions in libraries....for example....everything concern string manipulation in a "string.dll", what concern sequences in a "sequence.dll". I need this to load what I need on demand and not at startup time. But this is not always the right way. Part of string functions (and others) are needed by the core of the interpreter. For example, I cannot make an "object.dll" and a "type.dll" because part of "type.dll" is used by "object.dll" and part of "object.dll" is used by "type.dll"...this mean a DLL reference loop that cause interpreter to crash.

Then with what logic I can organize my functions in libraries?

I've take a look to Scheme....SRFI's....I don't like this organizations. And I don't like the idea to make a single dll for everything.

If someone have understood what i've written...pleeaaaase help me.

Thank you all.

Posts: 538
Joined: Sat Aug 09, 2008 10:44 am
Location: Newton, MA

Re: Interpreter Library organization

Post by nuntius » Tue Mar 13, 2012 8:11 pm

I think you should try to distinguish between logical separation (strings here, lists there, ...) and implementation details (dll 1, 2, ...). As you note, the two don't overlap the same way, and they don't have the same effect on the end user.

Agreed that SRFI organization doesn't apply to your problem space.

Here's a possible approach. Focus on the user API first, and lump everything into one or two dlls. Then get a system for tracking dll dependencies and using that information for load-on-demand. Then look at usage patterns to find the appropriate splits for your users.

Be careful not to optimize too much until you have something that provides the full solution.

Post Reply