1. Writing a language in Euphoria

I'm attempting to write a new language in Euphoria. I don't really know what I'm doing. And I've never tried this before, but... I do have an AST at this point. Feel free to follow along if you'd like.

BzScript on Github

Ronald Weidner

new topic     » topic index » view message » categorize

2. Re: Writing a language in Euphoria

building an AST from this:

{#n=((((#x+1)*2)-((3/(#y+4))+5)));}

was just a bit humbling.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Writing a language in Euphoria

Do you have any plans for a debugger? I'm currently thinking about writing a "fake" debugger,
as in a complete mock-up to show what the world's best ever debugger might feel like to use,
without a care in the world at this stage whether any of it is practical. For instance, stepping
backwards through the code (aka time travel or omniscient debugging).

Some early thoughts on the latter are: don't go down the rr multi-gigabyte core dumps route,
instead just keep a simple short-ish history of what has actually been displayed and don't
let anything be modifiable - but also allow a "restart" button which quits the debugger and
gets back to where you are, this time without having run anything further on and allowing
what is displayed to be modified as usual. (Very much like a movie director: what you say
"now" has effect, as soon as you rewind what you've filmed, it don't matter how loud you
bark at it, nothing changes. Plus you'd have the whole "take 2/from" thing.)

It would never be possible to step back from the first point the debugger was "woken up",
though you might be able to restart with an earlier wake-up point. The latter is a line plus
a set of variables that have [relop] specific values.

An ex.err file could contain an additional section to fire up the debugger at the point of
failure, and perhaps have a short record of the last few actions by the user so no more
"can't remember" or "no I didn't press that key" when they really did (which has sometimes
included me point blank lying to my own face).

I should admit I've thought very little about dealing with non-determinism, and no plans on
rolling back disk updates other than "restore these files on restart". The ex.err side might
however need to fake mouse/keyboard input, probably limited to say 100 such events.

I rather suspect better ways to show/visualise the data you really need is more of a matter
of encouraging additions to the program source code, in a more dynamic/restart-able way.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu