At 09:26 PM 9/11/00 +0100, Simon Cozens wrote:
>On Mon, Sep 11, 2000 at 04:01:53PM -0400, Dan Sugalski wrote:
> > Are you thinking of something along the lines of FORTH or PostScript? Or
> > something else?
>
>Something else. Forth and PostScript are languages which are implemented
>through stacks; I'm talking about a language designed for manipulating stacks.
>Slight difference.

Ah. I missed the difference originally.

> > >Should I draft some kind of spec for this or am I, as usual, talking out
> > >of my backside?
> > Depends, I suppose. Are you thinking of using it to implement perl 6? If
> > so, the three big questions would be:
> >
> > 1) How fast is the C (or whatever) code it emits likely to be?
>
>It's amazing how often this question has cropped up on the list when 
>nobody at all has a single benchmark, or indeed, a single line of code for 
>anything
>whatsoever. I'm not sure whether this makes me worried or angry, or indeed
>both.

It's software--either is excessive, honestly.

If you're talking about implementing an entirely new language, it is a 
viable question. You have an idea of what you're looking to do, and how 
well it maps to the underlying implementation language. Estimates may well 
be off by a bunch, but you're likely to hit within an order of magnitude.

>"The best strategy is to use the simplest, cleanest algorithms and data
>structures appropriate for the task. Then measure performance to see if
>changes are needed."

Care to try implementing perl in Haskell and see what you get? Or Lisp?

The impedance mismatch between what language you're writing in and what one 
you're targeting is important. It may turn out not to be an issue, and 
that's fine. But you are starting from somewhere, and you probably have 
some idea what sort of code your primitives will spit out, and that means 
you've likely got some sort of ballpark feel for things. Maybe not--it may 
be too early, and that's fine.

> > 2) Would having to learn a completely new language be more of a hassle 
> than
> > it's worth?
>
>It'll only be as complex as the freaky stack manipulation we do in PP code
>anyway.

If you're essentially adding stack primitives to C, sure. If you're talking 
about a whole new language it's still an issue.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to