Search the web
Sign In
New User? Sign Up
concatenative · Discuss the concatenative variety of computer languages: Joy, Forth, Postscript
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.

Messages

  Messages Help
Advanced
The Factor workspace   Message List  
Reply Message #1866 of 4681 |
Hi all,

I'm currently working on a 'workspace' feature for improved startup
speed and transparent persistence.

In 0.59, it is now stable enough to try out briefly. However, it has
problems with the compiler. This will be fixed in 0.60. In the meantime
use the -no-compile switch.

Try running the interpreter like so (all on one line):

java -cp factor.FactorInterpreter
-db:factor.db.BTreeStore:factor.db:64
-no-compile

The first time, this will create a b-tree database 'factor.db',
bootstrap the interpreter and save all objects from the user environment
to the database. Subsequent times, no source files are read -- the
database is simply opened and the interpreter begins executing words,
loading them as necessary.

Try defining words in a non-default vocabulary, they will persist;

IN: user
: hello-world "Hello world" print ;

... restart interpreter

hello-world
==> "Hello world"

The default vocabulary, 'scratchpad', does not persist.

Variable values are saved as well.

In particular, the following types of objects are persited:

- Tables. A table is a persistent namespace, created with <table>
(workspace vocabulary). Apart from being persistent, it does not differ
from a namespace created with <namespace> in any way. The global
namespace is a table. Vocabularies are also tables under the hood.

- Words and word definitions (except in the scratchpad vocabulary).

- Any object with a readable representation, such as strings, numbers,
lists, and so on.

- Compiled word definitions -- in theory anyway. Don't count on it
working in this release just yet.

It is possible that a persitent object might become unreachable -- at
present, no on-disk garbage collection is performed so it will continue
taking up space. Also, the b-tree still has bugs and sometimes the
database is corrupted.

Slava



Tue Jun 8, 2004 6:31 am

slava@...
Send Email Send Email

Message #1866 of 4681 |
Expand Messages Author Sort by Date

Hi all, I'm currently working on a 'workspace' feature for improved startup speed and transparent persistence. In 0.59, it is now stable enough to try out...
Slava Pestov
slava@...
Send Email
Jun 8, 2004
6:31 am
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help