Do you want to build the programming tools of the future?

We may be able to support an REU (Research Experience for Undergraduates) internship for Summer 2025. If you are an undergrad and a US citizen or permanent resident, apply here by May 21. We've been told the NSF is not funding new REUs this fiscal year. If you're still especially interested and want to work with us, I'm going to leave the application open and you can fill it out and shoot me an email, but we are unlikely to have funding for a paid position. Volunteer collaboration may still be possible. The topic will be direct manipulation programming for regular Python! (Note: the project might use AI but will not be AI-focused.)

Let's create graphical interfaces for everything you thought you had to do in code.

In the 80's, computers transitioned from text-based to graphical interfaces. The new, graphical interfaces were a great fit for document processing tasks, but computational tasks stayed in the realm of text-based programming. VisiCalc's introduction of spreadsheets brought some computation into the graphic realm, but the power gap between spreadsheets and "real" programming remains to this day.

Can we make everything you see computable? And, can that scale from end-users to professional programmers? The key is to make computation a globally available interaction. You should be able to compute on anything you can see. Click on something to "extract" it (i.e. to generate the line of code to get that item), choose an action on it from a menu (i.e. call a function on the item), and modify the action's parameters with a graphical widget (i.e. to change the function arguments). Rinse and repeat, and you are programming!

I enjoy discussing programming UIs, programming pain points, and the future of programming. If you have any questions or comments or just want to bounce your crazy ideas around, shoot me an email!

Research

The Shapes of Abstraction in Data Structure Diagrams

Devamardeep Hayatpur, Brian Hempel, Richard Lin, and Haijun Xia. CHI 2025. Paper 5min Video Figure

We developed a DSL for transforming concrete data structures, such as those displayed with print statements in a programming language, into abstract diagrams, such as what you might draw on a whiteboard or illustrate in a textbook. Our system and DSL, called Chisel, can serve as a foundation for bridging actual data in programs with more humane representations useful for teaching, documentation, communication, and runtime debugging.

Taking ASCII Drawings Seriously: How Programmers Diagram Code

Devamardeep Hayatpur, Brian Hempel, Kathy Chen, William Duan, Philip J. Guo, and Haijun Xia. CHI 2024. Paper 30sec Preview 13min Presentation Diagrams Corpus

A characterization of ASCII diagrams in several large open source code codebases. We found that developers reach for ASCII because it lives naturally not only in the code, but also in the ecosystem of text-oriented code collaboration tooling. The diagrams themselves display diverse concepts with diverse visual forms and are connected to the code, often incorporating code snippets.

Maniposynth: Bimodal Tangible Functional Programming

Brian Hempel, Ravi Chugh. ECOOP 2022. Paper 11min Video Figure 33min Presentation Slides Artifact

Maniposynth, the capstone project of my thesis, is a bimodal environment for functional programming. The key question is how to offer non-linear graphical interactions while still representing the program as ordinary, linear code.

Tangible Values with Text: Explorations of Bimodal Programming

Brian Hempel. PhD Dissertation, 2022. Dissertation 1hr Defense Presentation

Ph.D. dissertation covering Maniposynth, Sketch-n-Sketch, and Tiny Structure Editors, with Deuce in the appendix.

ManipML: Towards Bimodal Tangible Functional Programming

Brian Hempel, Ravi Chugh. LIVE 2020. Abstract 20min Presentation

An early prototype of Maniposynth. ManipML discovered a mismatch between static type systems and live programming tools: parametric polymorphism. Live tools need the concrete type of a value to display it properly, but that type is unavailable at polymorphic code locations. ManipML solved this problem by monomorphization, and Maniposynth by running the code through an interpreter rather than a compiler.

Tiny Structure Editors for Low, Low Prices! (Generating GUIs from toString Functions)

Brian Hempel, Ravi Chugh. VL/HCC 2020. Paper IEEE link Technical Supplement 5min Presentation Slides

If bimodal programming becomes more widespread, how can users easily specify a GUI for their custom data types? Tiny Structure Editors automatically transforms the output of toString functions into GUIs for manipulating the original object. The key technical idea is to track dependency provenance of substrings.

Sketch-n-Sketch: Output-Directed Programming for SVG

Brian Hempel, Justin Lubin, Ravi Chugh. UIST 2019. Paper 30sec Preview 3min Video Figure 19min Presentation Slides Poster Artifact

Sketch-n-Sketch is a direct manipulation GUI for creating programs that output vector graphics, while simultaneously representing the program as always-editable textual code. This is the paper to read if you want to learn about the project. Compared to the prior versions, many of the tools were reworked and improved, in particular, this version supports manipulating intermediate outputs (points, offsets, and lists) and editing within a function. The concept of a "shape group" was simplified to being just an ordinary list in the program.

Output-Directed SVG Programming

Brian Hempel. MS Paper 2019. MS Paper

A more verbose description of Sketch-n-Sketch, but the PhD dissertation above is better if you're looking for details.

Deuce: A Lightweight User Interface for Structured Editing

Brian Hempel, Justin Lubin, Grace Lu, Ravi Chugh. ICSE 2018. Paper 17min Presentation Slides

Instead of manipulation of output as in the other systems here, Deuce explores a streamlined interaction for quickly selecting multiple AST elements and invoking refactorings relevant to those elements.

Semi-Automated SVG Programming via Direct Manipulation

Brian Hempel, Ravi Chugh. UIST 2016. Paper 30sec Preview 5min Video Figure 21min Presentation Slides Artifact

The version of Sketch-n-Sketch that also assisted with program construction. This version introduced drawing tools, the "Make Equal" interaction that enforces alignment by inserting a shared variable, and simple abstraction capabilities.

Programmatic and Direct Manipulation, Together at Last

Ravi Chugh, Brian Hempel, Mitchell Spradlin, Jacob Albers. PLDI 2016. Paper 22min Presentation Slides Artifact

The first version of Sketch-n-Sketch. Via expression provenance and a simple solver, direct manipulations on output change the numeric literals in the program to match.

Service

Organizing CommitteeLIVE 2021, LIVE 2020
Program CommitteeVL/HCC 2025, PLDI 2025, LIVE 2024, Onward! Papers 2024, Convivial Computing Salon 2020, LIVE 2018
Artifact Evaluation CommitteePLDI 2019, PLDI 2018
ReviewerUIST 2025, ESE 2025, CHI 2025, UIST 2024, POPL 2024, UIST 2023, TOCHI 2023, PLATEAU 2023, CHI 2023, UIST 2022, UIST 2021, UIST 2020, CHI 2020, UIST 2018

Previous

For summer/fall 2022, I was a postdoc at CIWRO and the Storm Prediction Center to improve and operationalize my Nadocast severe weather predictor.

In March 2022, I finished my Ph.D. in the PL group at UChicago, advised by Ravi Chugh. Ph.D. research question: Can we augment programming with direct manipulation interactions?

Working Hypotheses

If you have any insight or reaction to any of these, feel free to shoot me an email so we can both be enriched!

Vision

The number of core, orthogonal computational concepts (types) that programmers use is fairly small, probably on the order of about 100-1000. Despite this, because UNIX mandated that everything is a list of bytes, none of these concepts have OS-level support. Instead, each application re-invents its version of those concepts, wasting programmer time and preventing users from composing their own workflows. Elevating these core concepts to have OS-level support for visualization and interactive operation could drastically improve the power of computers and the simplicity of software.

Observations

Further thoughts.

Useful

Side Projects

Class Projects

Context-Sensitive Prediction Of Haskell Type Signatures From Names. Brian Hempel. TTIC 31210 Advanced Natural Language Processing, Spring 2017.
A mostly failed experiment attempting to use RNNs to predict a Haskell type signature given the function name and the three prior type signatures in the file. A BS/MS student built on this work—this report was placed online so there was something to cite. Though my experiment failed, I'm still optimistic about the motivation. Writing specs is hard—can we use semantic information in names to suggest specifications which could then be fed to a program synthesizer? Compared to regular code, specifications have the advantage that they are an unordered set of properties. You (the human or computer) can generate them in any order and may add and remove individual items freely (unlike additions and removal of code, which generally necessitates lots of reworking and cleanup). If I were to revisit this project, I'd reformulate the problem to predicting a set of properties rather than whole type signatures. To start, the return type would be a property in the set and the input argument types would each be a a property in the set (effectively, arguments would be treated as a set rather an ordered list). But by treating properties as elements of a set, you're not limited to just predicting types: you might predict properties such as "Is this function is recursive?" or "How long is this function?" or "Does this function preserve the input size?" and all of these other properties, along with the type properties, could form the specification of the function for static checkers or a synthesizer.
One useful bit of the project is a high quality regular expression for splitting variables into words (see identifier_segmentor.py). If you also apply a stemmer afterwards you obtain very useable results like the following:
$ pip2 install nltk
$ python2
>>> from identifier_segmentor import *
>>> print "  ".join(segment2("mkNameG_tcIdKey"))
mk  Name  G  tc  Id  Key
>>> print "  ".join(segment2("unsafeTExpCoerceIdKey"))
unsaf  -e  T  Exp  Coerc  -e  Id  Key
>>> print "  ".join(segment2("M.Map"))
M  -.  Map
>>> print "  ".join(segment2("unsafeShift32R"))
unsaf  -e  Shift  32r
>>> print "  ".join(segment2("castDoubleToWord64Array"))
cast  Doubl  -e  To  Word  64  Array
>>> print "  ".join(segment2("STUArray"))
Stu  Array
>>> print "  ".join(segment2("PrimMVar"))
Prim  M  Var
>>> print "  ".join(segment2("X86.Instr.JumpDest"))
X86  -.  Instr  -.  Jump  Dest
>>> print "  ".join(segment2("Typed.TypedDefinition'"))
Type  -d.  Type  -d  Definit  -ion  ‘
The file above with the stemmer is python but the regex alone should segment correctly in any number of languages.

Ruby:

$ irb
irb(main):004:0> "mkNameG_tcIdKey".scan(/\'|(?:^[^A-Za-z0-9\s\'])?(?:[^a-z\_\s\'\.]+$|[^a-z\_\s\'\.]+[0-9\.]|[^a-z\_\s\'\.]+(?![a-z])|[A-Z][^A-Z0-9\_\s\'\.]+\.?|[^A-Z0-9\_\s\'\.]+\.?)/)
=> ["mk", "Name", "G", "tc", "Id", "Key"]

Javascript:

$ node
> "mkNameG_tcIdKey".match(/\'|(?:^[^A-Za-z0-9\s\'])?(?:[^a-z\_\s\'\.]+$|[^a-z\_\s\'\.]+[0-9\.]|[^a-z\_\s\'\.]+(?![a-z])|[A-Z][^A-Z0-9\_\s\'\.]+\.?|[^A-Z0-9\_\s\'\.]+\.?)/g)
[ 'mk', 'Name', 'G', 'tc', 'Id', 'Key' ]

Just please give me credit if you use my segmentor regex!

Faster Elm 0.18 Compiler

The Elm 0.18 exhaustiveness checker has exponential complexity for certain case statements. The following patched versions of elm-make tame this explosion somewhat and reduce Sketch-n-Sketch build times by 5x (or more). More nominal cases might see some slowdown instead of a speedup.

Replace your elm-make executable with one of the following binaries:

Humanity and the Limits of Computers

Computers can't pray.

Technical progress is not moral progress.

As your loved one dies, would you rather than a robot hold their hand?