typographic driven programming

73 views
Skip to first unread message

Josh Marinacci

unread,
Sep 12, 2014, 6:27:40 PM9/12/14
to augmented-...@googlegroups.com
I can’t believe I forgot to post here.

I’ve been working on some ways to improve the programming experience through how we edit and render source code. I started a blog series that was posted on Hacker News, to overwhelmingly negative response. So I must be doing something right. :)

Anyway, here’s the stuff:

Typographic Programming Language
http://joshondesign.com/2014/08/22/typopl

Typographic Programming: Fonts
http://joshondesign.com/2014/08/25/typopl2

tabs vs spaces, the pointless war
http://joshondesign.com/2014/09/02/bar

The Cybernetically Enhanced Programmer
http://joshondesign.com/2014/09/10/cyberprog

I’ve got a few more posts that I’m working on. I tried writing a simple raytracer in a fictional math-ish language. It was mostly a failure. Using vector syntax didn’t significantly reduce the code size and it didn’t make it much easier to read. I’ve also got a post coming about how we can redo regex to actually be useful.

I’d *love* your constructive feedback. I got little from HN.

thx,

- J

Tom Lieber

unread,
Sep 12, 2014, 7:48:10 PM9/12/14
to augmented-...@googlegroups.com
Not much to say except, cool, and keep it up!

Last time I checked, the code wasn't publicly available, but the formatting and goals reminded me of Barista, and if you want to make interactive prototypes, that might be a good place to start!


--
You received this message because you are subscribed to the Google Groups "Augmented Programming" group.
To unsubscribe from this group and stop receiving emails from it, send an email to augmented-progra...@googlegroups.com.
To post to this group, send email to augmented-...@googlegroups.com.
Visit this group at http://groups.google.com/group/augmented-programming.
For more options, visit https://groups.google.com/d/optout.

--
Tom Lieber
http://AllTom.com/
http://infinite-sketchpad.com/

Sean McDirmid

unread,
Sep 12, 2014, 7:49:42 PM9/12/14
to augmented-...@googlegroups.com
Inspired by John's first two essays (I haven't read the last two yet, but will now :) ), I did my own essay to document what I've done in YinYang:

http://research.microsoft.com/en-us/projects/liveprogramming/typography.aspx

The design has already gone a few revisions due to comments from LtU. Oh, and if you haven't seen it yet:

http://research.microsoft.com/en-us/people/smcdirm/managedtime.aspx

I'm presenting the work at SPLASH if anyone is attending form the list.

britefury

unread,
Sep 14, 2014, 6:38:45 AM9/14/14
to augmented-...@googlegroups.com
I have implemented some of these ideas in my project, The Larch Environment.
It features a structured source code editor for Python that behaves like a text editor; the underlying data structure is similar to an abstract syntax tree.
It uses proportional rather than monospaced fonts and it indents according to the syntax and content of the source code. While strings are delimited with quotes, escape sequences are displayed in boxes in similar fashion to your typographic programming post. Indentation is simply 30 pixels; no spaces or tabs. It also features visual rendering for certain constructs, e.g. regular expressions. These can be rendered and editing in-line within code.

Hope it's of interest.

Kind Regards

Geoffrey French
To unsubscribe from this group and stop receiving emails from it, send an email to augmented-programming+unsub...@googlegroups.com.

Roly Perera

unread,
Sep 14, 2014, 7:20:06 AM9/14/14
to augmented-...@googlegroups.com
Hey, this is great. (I especially liked the assembler example where
you add a new instruction via a tabular/spreadsheet view with embedded
Python code.)

keep up the good work!
Roly
>> email to augmented-progra...@googlegroups.com.
>> To post to this group, send email to augmented-...@googlegroups.com.
>> Visit this group at http://groups.google.com/group/augmented-programming.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Augmented Programming" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to augmented-progra...@googlegroups.com.

Sean McDirmid

unread,
Sep 14, 2014, 8:00:21 AM9/14/14
to <augmented-programming@googlegroups.com>
So much to take in, I especially like your domain specific renderings (code that looks like technical literature). One of the problems I'm trying to solve regards navigation and organization of complex code. The classic linear text file model doesn't feel right anymore and something tabular would be more appropriate (not to mention better organizing logic inside methods and classes). Some of the more graphical visualizations remind me of Philip Guo's python tutor work. 

The tree rendering is a bit too much for me though. But then, I've never really seen a tree visualization that I like very much. There is just something about trees that makes it hard to improve beyond linear parened text. 
To unsubscribe from this group and stop receiving emails from it, send an email to augmented-progra...@googlegroups.com.

Josh Marinacci

unread,
Sep 14, 2014, 12:29:44 PM9/14/14
to augmented-...@googlegroups.com
Yes. I watched one of your videos on it. I love the concepts. How did you build the structured editor to map between text and ast cleanly? That's the part I'm really struggling with. 

Sent from planet Earth
To unsubscribe from this group and stop receiving emails from it, send an email to augmented-progra...@googlegroups.com.

Tom Lieber

unread,
Sep 14, 2014, 2:28:48 PM9/14/14
to augmented-...@googlegroups.com
I ran across this paper and it reminded me of this thread: Design Principles for the Enhanced Presentation of Computer Program Source Text.

It’s paywalled, but this figure gives a good idea.

Josh Marinacci

unread,
Sep 16, 2014, 11:34:47 PM9/16/14
to augmented-...@googlegroups.com
I found an open PDF of it here.


1986!!!

Sometimes I get really depressed doing research. I discover that everything was invented long ago and still no one uses it.

Sean McDirmid

unread,
Sep 16, 2014, 11:37:08 PM9/16/14
to augmented-...@googlegroups.com

I’ve read this paper a few times (I assume it’s the CHI 86 one) and have access to the book. It is more about reading on paper, and I haven’t really gleaned any wisdom from it. It’s like “here is what we did, and here are some vague principals for it;” also known as “design.”

Tom Lieber

unread,
Sep 17, 2014, 12:16:18 AM9/17/14
to augmented-...@googlegroups.com
Many areas of research are staked out, but not necessarily fleshed out. :)

It’d be depressing if what you designed looked like what they designed, but it doesn’t. How come?

Raoul Duke

unread,
Sep 17, 2014, 2:00:04 PM9/17/14
to augmented-programming
> 1986!!!
>
> Sometimes I get really depressed doing research. I discover that everything
> was invented long ago and still no one uses it.


somebody should do a study of why that is ;-)

Raoul Duke

unread,
Sep 17, 2014, 2:12:09 PM9/17/14
to augmented-programming
> It’s paywalled, but this figure [http://cl.ly/image/0i0H452R213a] gives a good idea.

when i look at that i just want to shake my fist at the sky and demand
that all IDEs enforce a no-more-than 4 or 5 or at most 6 :-) lines of
code per function/procedure/method rule, so that instead of writing
comments everywhere, the code has to invent names so that the code
reads more like natural language.

getop() {
- skip blanks, tabs, and newlines()
- return if not a number() // sometimes i wish a subroutine could
easily cause the calling routine to return, sorta like exceptions only
different.
- get rest of number()
- collect fraction()
- finish number()
}

Boaz Rosenan

unread,
Sep 17, 2014, 2:54:35 PM9/17/14
to augmented-...@googlegroups.com
There is a long list of ideas that were invented a long time ago, but did not catch on, until much much later.  One thing that comes to mind is the "Mother of all demos" (https://www.youtube.com/watch?v=yJDv-zdhzMY) from 1968 (!), where Douglas Engelbart demonstrates the use of a mouse, copy and paste, and something that looks awfully like a Web browser...  The fact something does not catch on, does not mean it is not good.  It may mean it came too advanced for its time...

I presented my own "typographical" programming language, Cedalion, three years ago in SPLASH11.  The feedback I got consisted of a few repeating concerns which I think is relevant for the entire field:
  • How would team development work?  SCMs like Git assume text files.  How would one resolve merge conflicts in such an editor?
  • Developers are used to "normal" syntax.  The freedom to create your own shiny syntax with all the bell and whistles can be hard to learn.
  • Typing text is both fast and easy, assuming you know the syntax, of-course.  "typographic" languages require either the use of the mouse (which is slower), or the use of keyboard shortcuts, that require learning.  People do not like learning new things...
I think there are good answers to all these concerns (and all the other concerns I don't currently recall), but I don't know what can convince our audience.  My strategy is to try to solve a really tough problem, one that is impossible to solve any other way.  I don't know if it will cause people to go this direction, but at least when they do (maybe when I'm old enough), I'll show people my own demo on youtube, and say: "I told you so"!

@Sean
I'll be at SPLASH next month, presenting a paper at Onward.  On which track are you presenting?

}

Raoul Duke

unread,
Sep 17, 2014, 3:13:05 PM9/17/14
to augmented-programming
> not catch on, until much much later. One thing that comes to mind is the
> "Mother of all demos" (https://www.youtube.com/watch?v=yJDv-zdhzMY) from
> 1968 (!), where Douglas Engelbart demonstrates the use of a mouse, copy and
> paste, and something that looks awfully like a Web browser... The fact
> something does not catch on, does not mean it is not good. It may mean it
> came too advanced for its time...

what is worse is that Doug Engelbart was around the sf bay area until
pretty recently (RIP) and yet didn't seem to have much attention? I
mean everybody is always like "oh yeah, of course i know about the
mother of all demos, of course it blows me away, etc." and you hear
about things like xanadu etc., but then the people and the projects
don't seem to get day to day exposure? i was fortunate enough to
briefly meet D.E. as we worked on hyperscope, and i've been fortunate
enough to be a gadfly at meetings with people who did Xanadu, Electric
Communities, etc., and some of it is at least now getting into actual
systems and products that really ship and really get traction. and yet
we're still so far off.

it was so weird to actually have lunch with D.E. since i was like i
didn't even know he was around the bay area etc.

ditto meeting Jef Raskin and being at his house for demos of his
on-going work on The Humane Interface stuff, a year or so before his
passing.

i'm just a regular Shmoe, a B student, so i was/do pinch myself when i
get to attend such things. i guess some people get to move in those
circles due to their research and brain power. but there are even a
lot of people who are smart and motivated who probably only know of
them.

so much interesting ideas & people who to me seem to get lots in the
din of silicon valley somehow? it is really weird to me. i guess
BayCHI is something to be thankful for but with family obligations let
alone work obligations i haven't managed to get to a meeting in years
:-( and when i do it just depresses me that i haven't sculpted a
better day job life for myself anyway.

Josh Marinacci

unread,
Sep 17, 2014, 3:19:47 PM9/17/14
to augmented-...@googlegroups.com
Splash is in Portland, right? I think I may need to come up for that.

-j

Sean McDirmid

unread,
Sep 17, 2014, 5:10:56 PM9/17/14
to <augmented-programming@googlegroups.com>
Onward, before lunch on Thursday, unless the schedule changed. 

Sean McDirmid

unread,
Sep 17, 2014, 8:13:50 PM9/17/14
to augmented-...@googlegroups.com

Just a quick suggestion: you should put the screenshot from your research page on the language main page.

 

From: augmented-...@googlegroups.com [mailto:augmented-...@googlegroups.com] On Behalf Of Sean McDirmid
Sent: Thursday, September 18, 2014 5:10 AM
To: <augmented-...@googlegroups.com>
Subject: Re: typographic driven programming

 

Onward, before lunch on Thursday, unless the schedule changed. 

britefury

unread,
Sep 19, 2014, 7:38:28 AM9/19/14
to augmented-...@googlegroups.com

It's a syntax-recognising editor; it re-parses segments of the code - expressions, statements or blocks - after each key-press, converting back to a structured form. It then regenerates the visual representation of that sub-tree. In order to keep the caret in place, it takes the textual representation of the code, along with the modification that you typed (insert/remove a character), takes the textual representation of the newly generated visual representation (they can differ in terms of whitespace etc) and computes the diff of the two to get some edit operations to transform one into the other. It applies these edit operations to the position of the caret and puts it in the correct place.

Similar systems are Andrew Ko's Barista and Martijn Schrage's Proxima.

There is more detail section 5.1 of my MSc thesis, which can be found in the publications section of the Larch website (http://www.larchenvironment.com).


Kind Regards

Geoffrey French

Sean McDirmid

unread,
Sep 19, 2014, 7:47:51 AM9/19/14
to <augmented-programming@googlegroups.com>
It seems a bit complicated, but I don't know much about projectional editors. Instead, I make formatting decisions based on an annotated token stream that includes white space info. Injecting syntactic information into the editor simply has the parser annotate the tokens it grabs hold of. 

Language aware rather than structured/projectional seems to be the sweet spot between usability and feedback. For single line constructs, I don't think structured has any advantages. Multiline constructs (like tables) could tilt the advantage close to projectional, but I haven't tried yet. 


Josh Marinacci

unread,
Sep 19, 2014, 1:32:32 PM9/19/14
to augmented-...@googlegroups.com
Oh yeah. I recall running across Cedalion in my research. Are you still working on it?
I’d love to hear more about the concerns you’ve heard about alternative programming systems. SCM is definitely a big issue that has to be solved. I’ve been thinking of a way to store the AST in some sort of graph format that supports clean diffs. Rather than just a canonical source text file we could serialize the graph as a list of nodes with IDs. Then a global rename of a symbol would be a diff of a single line.

- Josh

Josh Marinacci

unread,
Sep 19, 2014, 1:34:31 PM9/19/14
to augmented-...@googlegroups.com
I don’t mind finding that I’ve redesigned something smart people invented a few decades. Following the footsteps of giants means on in the right path.  The depressing part is twofold. First that CS majors aren’t taught about these things. We don’t teach our own history. Second, that these great ideas still haven’t been adopted.  On the other hand, it took OO programming a few decades to catch on in the mainstream, so maybe projectional editing and the typographic programming will catch on eventually too.

- Josh

Josh Marinacci

unread,
Sep 19, 2014, 2:03:33 PM9/19/14
to augmented-...@googlegroups.com
It sounds like you solved a lot of tricky problems to make this work. I look forward to reading the thesis.

Sean McDirmid

unread,
Sep 19, 2014, 8:18:52 PM9/19/14
to augmented-...@googlegroups.com

Our history is short, and that means time hasn’t yet sorted out the crap from the gems. So a lot of things were done in the past, they were published in Tier 1 conferences, but many of them are duds. So figuring out what you can learn from and what is just noise is quite daunting; word of mouth is still the best way to discover what could be gems.

 

Code typography (or typographical programming if you wish) is basically a virgin field with a couple of early notable attempts, but nothing much yet to build off of. Projectional editing is a budding field in the SLE community, and I’ve seen wonderful demos with JetBrains MPS (but had to go Dutch to see them).

 

From: augmented-...@googlegroups.com [mailto:augmented-...@googlegroups.com] On Behalf Of Josh Marinacci
Sent: Saturday, September 20, 2014 1:35 AM
To: augmented-...@googlegroups.com
Subject: Re: typographic driven programming

 

I don’t mind finding that I’ve redesigned something smart people invented a few decades. Following the footsteps of giants means on in the right path.  The depressing part is twofold. First that CS majors aren’t taught about these things. We don’t teach our own history. Second, that these great ideas still haven’t been adopted.  On the other hand, it took OO programming a few decades to catch on in the mainstream, so maybe projectional editing and the typographic programming will catch on eventually too.

Corecubist

unread,
Sep 19, 2014, 11:44:12 PM9/19/14
to augmented-...@googlegroups.com
Gentlemen,

I have following this thread and suggest that you visit www.cubicon.com to understand a technology that can transition software engineering into a true systems engineering discipline. Follow the single link at the bottom for a set of talks on the Cubicon technology suite. 

There is abundant life beyond source code languages ...

Regards,

Sandy Klausner
Founder & CEO
Cubicon Corporation

Sent from my iPad

Boaz Rosenan

unread,
Sep 21, 2014, 10:46:08 AM9/21/14
to augmented-...@googlegroups.com
I once heard that in order to achieve something you really want, you sometimes need to abandon it completely.  This is Cedalion and I for now.  After a failing attempt to build a Web-based IDE (performance was awful), I more or less stopped working on it.

My main focus right now is on the version control (or SCM) aspect.  This is not only to make Cedalion and similar languages viable for team development, but also (and mainly) to pursue the vision I have for Cedaion of not only being a language for programming applications, but also for holding the state of applications.

Imagine a Twitter-like application, where users can post tweets, and can also follow other users.  One can define a language that contains a "tweet" statement and a "follows" statement.  The semantics of that language would be a calculation of a user's "time-line", but aggregating all the tweets made by all the user's followees.  This language is not a programming language anymore.  It's a "state language", as it expresses the state of a running program.  The main advantage of this approach is that it kind-of eliminates state (state is evil).  We only have a program.  Our program can change with time, but that's OK, since the program itself is stateless.

It obviously means that the program becomes huge (think of all the tweets on Twitter).  This means our programming language needs to be well suited for this size.  A pure declarative logic programming language has an advantage here.  In addition, the program changes rapidly (think of how many tweets are written per second on Tweeter).  This is where we need version control.  "Normal" SCMs will not work here.  Regardless of the fact that the program is not text, it is too big for any existing SCM.  So we need to think out of the box.

This is where I'm at right now.  Next month I'm presenting a paper at SPLASH on version control for application state.  I have an early prototype of this, not yet a full-functioning system.


Boaz Rosenan

unread,
Sep 21, 2014, 11:02:03 AM9/21/14
to augmented-...@googlegroups.com
Looks like schedule has changed...  You're on Wednesday, as the conference's very first talk.  I'm on the same session, two talks after.

See you there :-)

nejaka osoba

unread,
Sep 21, 2014, 2:24:58 PM9/21/14
to augmented-...@googlegroups.com
dont give up. For me, an example is
http://www.reddit.com/r/programming/comments/137kd9/18_months_ago_termkit_a_nextgeneration_terminal/
Its been how long? 4 years? Termkit wasnt that bad back then. Imagine
if he kept slowly working on it, where could it have been now?
If the performance sucks, it wont suck that bad in 5 years.
>> <http://cedalion.org/>, three years ago in SPLASH11. The feedback I got
>> consisted of a few repeating concerns which I think is relevant for the
>> entire field:
>>
>> - How would team development work? SCMs like Git assume text files.
>> How would one resolve merge conflicts in such an editor?
>> - Developers are used to "normal" syntax. The freedom to create your
>> own shiny syntax with all the bell and whistles can be hard to learn.
>> - Typing text is both fast and easy, assuming you know the syntax,
>> of-course. "typographic" languages require either the use of the
>> mouse
>> (which is slower), or the use of keyboard shortcuts, that require
>> learning. People do not like learning new things...
>>
>> I think there are good answers to all these concerns (and all the other
>> concerns I don't currently recall), but I don't know what can convince
>> our
>> audience. My strategy is to try to solve a really tough problem, one
>> that
>> is impossible to solve any other way. I don't know if it will cause
>> people
>> to go this direction, but at least when they do (maybe when I'm old
>> enough), I'll show people my own demo on youtube
>> <https://www.youtube.com/watch?v=crzEgyijQ4s>, and say: "I told you so"!

Josh Marinacci

unread,
Sep 21, 2014, 11:42:58 PM9/21/14
to augmented-...@googlegroups.com
Reading through the hold comment thread it seems like he gave up because he got so much negative feedback, and no patches.  Working on something for a long time is hard if it feels like it might not be worthwhile. I understand that.  I’ve been writing variations on programming languages, GUI builders, and drawing tools for near to 20 years in my fruitless pursuit of the perfect tool for thinking.

- J

Sean McDirmid

unread,
Sep 22, 2014, 2:25:48 AM9/22/14
to augmented-...@googlegroups.com

Oh…why would Shriram do that?  Well, I guess I better get started on the talk early. I’m hoping to just do a 15 minute demo, but maybe I’ll throw in a few slides for framing.

 

Your paper looks interesting (and kind of related to what I’m doing). Do you have a copy up yet?

 

From: augmented-...@googlegroups.com [mailto:augmented-...@googlegroups.com] On Behalf Of Boaz Rosenan
Sent: Sunday, September 21, 2014 11:02 PM
To: augmented-...@googlegroups.com
Subject: Re: typographic driven programming

 

Looks like schedule has changed...  You're on Wednesday, as the conference's very first talk.  I'm on the same session, two talks after.

See you there :-)

Reply all
Reply to author
Forward
0 new messages