I have written on this blog before about my attempts at building a structural editor which turns the parsing equation upside down. Today I learned there is a name for what I have been trying to create: Projectional Editing. The top hit when googling that term comes from Martin Fowler; which is nice as I based some of my work on his articles on language workbenches.
I stumbled on this terminology through a presentation on InfoQ titled "The Art of Building Tools–A Language Engineering Perspective". It's showing examples of this technique in different contexts. Some pretty low-level programmer stuff, but also in the realm of requirements specification. Very cool.
A related presentation, also on InfoQ, is "Enhancing Notational Flexibility and Usability of Projectional Editors". This is showing off JetBrain's MPS, which is a language engineering workbench used as the backbone by the first presentation. I have stumbled on MPS before some years ago, but I think I may have to take a second look at it.
More interesting still is Aurora, a project being worked on by Chris Granger (of Light Table fame), which I'm desperate to take a closer look at. I'm not sure if Aurora is doing projectional editing, though it sure sounds like it. That and some other pretty crazy stuff (programming in a database !?).
I don't know about you guys and galls, but I'm looking forward to see where all this is going.
"The universe is not required to be in perfect harmony with human ambition."
Carl Sagan (1934 - 1996)
Showing posts with label skribler. Show all posts
Showing posts with label skribler. Show all posts
September 10, 2014
February 03, 2013
A New Skribler
As promised, here is an update on Skribler. I have just uploaded a new experimental version of Skribler on Sourceforge. A new website is up, as well as an online demo. And it looks a little something like this:
So, yeah, this new version of Skribler is browser-based. I'm mostly relying on three pieces to make it work:
So, yeah, this new version of Skribler is browser-based. I'm mostly relying on three pieces to make it work:
- HTML5's contentEditable, which forms the basis of everything. It makes all content editable, but for the purpose of a structured editor it is too liberal in what it allows.
- Rangy, which allows me to capture selections and caret info and manipulate these through Javascript. With a little help of JQuery this allows me to restrict the default behaviour of contentEditable.
- Knockout.js, which is an amazing Javascript library. This takes care of processing changes to the abstract syntax trees and updating the concrete syntax.
- Martin Fowler's Reader Configurations, based on an example from his Language Workbenches article.
- HTML Template Configuration Language, a DSL created by Thomas Cleenewerck with the purpose of more easily setting up websites through composition of templates.
- Knockout.js Template Language, which can be used to generate the Knockout templates for transforming abstract syntax trees into conrete syntax. In fact, this example was used to generate its own examples.
January 21, 2013
Thanks Mom...
For the hand-made, quilted, Minecraft Creeper laptop bag!
Geek chique! :-)
PS. Sorry everyone for the lack of updates. Maybe it's the winter blues... I'm working on a new version of Skribler, but I don't have much to show yet. If I get it to a more generally usable state you can expect a post on that.
Geek chique! :-)
PS. Sorry everyone for the lack of updates. Maybe it's the winter blues... I'm working on a new version of Skribler, but I don't have much to show yet. If I get it to a more generally usable state you can expect a post on that.
April 17, 2010
Progress ?
Not much to report. I've been working on the front-end for the new Skribler, but I haven't gotten to anything presentable yet. I've been sidetracked a little, trying to see if I could get JQuery to work, but it's not generating the factbase as it should. I have also been playing a little with dtrace on the mac, but I need some good documentation or a reference manual to get the traces that I want.
As usual there are a lot of crazy ideas floating around in my head, and I have a hard time ignoring them and sticking to the plan. Ah well...
As usual there are a lot of crazy ideas floating around in my head, and I have a hard time ignoring them and sticking to the plan. Ah well...
March 16, 2010
Skribler 2 – first milestone
Work on the second version of Skribler is progressing quite nicely. I just reached my first milestone: a skribel which defines a grammar for skribels which store grammars for skribels.
Too fast ? Here is what I've got, in smaller increments:
Too fast ? Here is what I've got, in smaller increments:
- A storage format for skribels (very basic trees).
- Reading and writing skribels from and to file.
- Basic tree parsing support.
- A small tool which uses tree parsing to parse a grammar stored in a skribel, and generates a tree parser from that. The generated tree parser can then be used to parse other skribels.
- A grammar stored in a skribel which defines the format for grammars stored in skribels. The tree parser generated from this can then be used to parse the grammar which generated the tree parser in the first place.
Grammar loaded from "resources/grammar.grammar.skribel". Matching skribel in "resources/grammar.grammar.skribel"... Matching SUCCESSFUL.Now that's cool. :-)
March 01, 2010
More structured editors
The following two links are related to my Skribler project.
The first shows the work of Kirill Osenkov on a structured editor for C# (though not limited to C#). The videos are especially nice to watch, as they show some of the benefits of going for structured editors. What I'm missing here is an idea of how easy it would be to set up additional languages with this editor.
The second link is for Citrus which is a tool/programming language for setting up structured editors. There is video of it in action here. Unfortunately the tool is not publicly available.
Makes me feel that I should get back to work on Skribler...
The first shows the work of Kirill Osenkov on a structured editor for C# (though not limited to C#). The videos are especially nice to watch, as they show some of the benefits of going for structured editors. What I'm missing here is an idea of how easy it would be to set up additional languages with this editor.
The second link is for Citrus which is a tool/programming language for setting up structured editors. There is video of it in action here. Unfortunately the tool is not publicly available.
Makes me feel that I should get back to work on Skribler...
February 08, 2010
Wacky Idea
I found this wacky idea on Abstract Heresies. If you take it one step further, namely storing the syntax tree rather than the text, you basically end up with what I want for Skribler. The language then ends up, as Jrm puts it, as an API on the syntax tree.
October 10, 2009
Skribler
I just released a new project on Sourceforge. It's something I have been working on quite a bit over the course of the past month or so (I had plenty of time while being unemployed ;). The project is named Skribler, and it is part structured editor, part framework for setting up a structured editor for domain-specific languages.
Skribler has two related goals. One is to make it easy to define custom domain-specific languages. The other is to get rid of the need for parsers by persisting the abstract syntax trees, not the source code. It is the latter which really started this work. It's really a very simple idea, and I don't know of any editor which takes this approach.
Below are two screenshots of Skribler in action. You'll probably notice the highlights on the text: this indicates the selected element and what you can do with it. It is the whole point of a structured editor that you can only do things which don't invalidate the structure.

Right now there are two languages defined in Skribler. One is a pure demonstrator based on Martin Fowler's Record Configuration language from his Language Workbenches article. The other is a lite version of WASA Templates, which is a high-level language for defining webpages by combining small templates. Skribler allows you to define the template composition, and has a basic compiler which then performs the compositions as specified. I'm using this right now to build a new personal website, and it's quite usable. Yes, I'm eating my own dogfood here. :-)
Anyway, it's alpha software, very much in the prototyping stage, and I love it! I welcome any feedback if you tried it out, as well as comments on the ideas that are behind it.
PS. If anyone is looking for a software engineer in the region of Aalst, keep on looking. I'm off the market again; starting a new job next monday. Jay!
Skribler has two related goals. One is to make it easy to define custom domain-specific languages. The other is to get rid of the need for parsers by persisting the abstract syntax trees, not the source code. It is the latter which really started this work. It's really a very simple idea, and I don't know of any editor which takes this approach.
Below are two screenshots of Skribler in action. You'll probably notice the highlights on the text: this indicates the selected element and what you can do with it. It is the whole point of a structured editor that you can only do things which don't invalidate the structure.

Right now there are two languages defined in Skribler. One is a pure demonstrator based on Martin Fowler's Record Configuration language from his Language Workbenches article. The other is a lite version of WASA Templates, which is a high-level language for defining webpages by combining small templates. Skribler allows you to define the template composition, and has a basic compiler which then performs the compositions as specified. I'm using this right now to build a new personal website, and it's quite usable. Yes, I'm eating my own dogfood here. :-)
Anyway, it's alpha software, very much in the prototyping stage, and I love it! I welcome any feedback if you tried it out, as well as comments on the ideas that are behind it.
PS. If anyone is looking for a software engineer in the region of Aalst, keep on looking. I'm off the market again; starting a new job next monday. Jay!
Subscribe to:
Posts (Atom)

