In regard to the slide-rule project, I'm making progress although I don't
hav much time for it, working 10-7 at my job; I'll show you the result when
done. I dropped SVG because it doesn't have very good support for print and
I went with LaTeX as originally planned. My program generates both LaTeX and
cnc gcode simultaneously. The idea with the gcode is to anodize aluminum
blue and then scratch off the anodization to reveal the shiny aluminum
underneath. The purpose of this exercise is to make slide-rules that will
last for several centuries and which can be stashed in time-capsules so
that, if our civilization collapses, the people of the future will have a
seed for a new civilization. Slide-rules are pretty much self-explanatory in
the case that the manual gets lost (or English is no longer read). Also,
slide-rules can be duplicated by hand if necessary, although the job would
be very laborious.

As you may remember, my original interest in Factor was for the generation
of gcode for cnc machines. This, btw, is my big project that will require
Berkeley DB.

I dropped Factor because it is too complicated. Also, it doesn't provide a
safe "sandbox" that the management would feel comfortable with for their
employees. I am very interested in Tim's idea of a Joy>Factor compiler. This
might be a perfect solution to the safe-sandbox issue and the complexity
issue as well. Building Joy on top of Factor is a lot better idea than
trying to cripple Factor to deal with these issues.

I agree with Slava that Joy has a fundamental problem in that lists of
instructions and lists of data are the same thing, which seriously
complicates compilation. This is the same problem that Lisp has. This
wouldn't be an issue for me because I am not concerned about execution
speed. Generating gcode is not a real-time job, and it is pretty easy
anyway. Also, the difficult aspects (the arithmetic) can be written in the
underlying language (C or Factor).

You mentioned the need for linked-list software. You might try mine:
(www.rosycrew.com/list.factor). I would not need a lot of OOP like Factor
has, but would need automatic conversion between floating-point and
integers.


> Message: 1
> Date: Tue, 25 Aug 2009 18:18:43 -0500
> From: Tim Wawrzynczak <[email protected]>
> Subject: Re: [Factor-talk] Joy
> To: [email protected]
> Message-ID:
> <[email protected]>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi Slava,
>
> Thank you much for all the advice and suggestions.  I do appreciate it :)
>
> This is only a first attempt at Joy, so there will definitely be more work
> as times goes on.
> I do intend to put some unit tests and docs in there before I put it in
> extra/.
>
> FYI, [1] [2] [3 4] ifte in my Joy does indeed work, leaving '2' on the
> stack, just like the C Joy.
>
> It sounds like your suggestion is to use a linked-list as the data stack
> in
> Joy,
> and use your 'custom' cons type for quotations in Joy, meaning I would
> have
> to implement all the words in terms of the linked-list.
>
> E.g., to execute 1 2 3 * +
> USE: lists
> +nil+ ! initial list
> 1 swons 2 swons 3 swons ! each one is added to the list
> dup car [ cdr ] dip ! get the first item
> [ dup car [ cdr ] dip ] dip ! get second item
> * swons ! do the multiplication and put result back on top of stack
> dup car [ cdr ] dip ! get first item
> [ dup car [ cdr ] dip ] dip ! get second item
> + swons
>
> The list then looks like T{ cons f 7 +nil+ } after the end of that.
> Doing things in this manner means very limited use of the Factor
> datastack.
> But I do see what you are saying, b/c then it is cheap to replace the
> "stack"
> for words like 'infra', 'ifte' and others that "technically" can dig
> arbitrarily deep
> into the stack b/c of the quotations they are passed can just reuse the
> original "stack."
>
> It looks to me like this is the process that you're referring to
> (naturally
> with better words defined for getting
> data off the "stack") ?
>
> Thanks again for your suggestions, I will be bugging you in the future
> about
>
> some of this I'm sure :)
>
> Cheers,
> - Tim


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to