Alex McLean

Making music with text

New text editor

by Alex on November 4, 2010

I stopped using feedback.pl, a self-modifying live code editor written in Perl, some time ago, in favour of editing Haskell in emacs.  It’s about time I made a specialised editor for the pattern stuff I’ve been doing with Haskell.  Actually I have been dreaming of a visual programming language editor for some time, which for the moment I’m just calling `Text’.  Here’s a screen shot of its current state:

I’ve noticed that Visual Programming Languages like Max and PD are still based around text, using e.g. distance as secondary notation, not actually part of the language syntax.  In Text, words that are closest together are automatically connected if their types are compatible.  You can see that I haven’t quite got the ‘closest together’ algorithm nailed yet, I’ve no idea why its decided to parse this as three separate, overlapping statements.  However I have got currying working, which I’m happy with.  At the moment it’s written in C using the clutter library, which I’m finding fun.  Anyway just a quick update, I’ve got a lot more ideas to implement before I know whether this idea has legs or not…

5 thoughts on “New text editor

  1. Andy Stewart says:

    Hi Alex,

    Looks my Haskell OS : http://goo.gl/MkVw
    Include : editor, file-manager, multimedia-player, pdf-viewer, image-viewer, irc-client, webkit-browser, process-manager, RSS/Atom reader.

    — Andy

  2. Giorgos says:

    Well, PD actually uses spatial information (although not distance, but box coordinates) to find which object to run first. Since an object may fan-out its results and “trigger” objects are not mandatory, PD uses the position of an object to reason about order of execution…

  3. Alex says:

    Hi Giorgos,

    I think you’re wrong there, PD uses the order in which boxes are created for execution order. Trigger objects aren’t mandatory but are strongly recommended, because creation order is completely invisible!

    I think you’re thinking of Max which does indeed use right-left ordering for execution order (still with [trigger] preferred). But then so does C, Java, ruby, in fact all mainstream programming languages! Right-left ordering hardly sets Max apart as a VPL…

    All programming languages involve spatial layout. PD and Max allow unusually free layout, but this layout is syntactically meaningless. That is, it allows layout freedom because there is *less* spatial syntax than mainstream languages.

  4. okmijn says:

    all the things in this {article, comments} are quite wonderful

  5. Paul says:

    Looking good. Perhaps you can eliminate variable names? I look forward to hearing more!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>