Lurker News
Hi HN, we’re building Haystack Editor (https://haystackeditor.com/), a canvas-based IDE that automates the boring stuff (plumbing, refactoring, and finding code) so that you can focus on the exciting parts of software development! You can see a quick overview of Haystack at https://www.youtube.com/watch?v=c2uZnR5D_cc!

(It's currently only on Mac OS but we're working on Linux and Windows. Edit: just added a Linux download!)
Haystack was born out of our frustrations with working in large and mature codebases, specifically with navigating and editing functional flows (e.g. the code flow for adding an item to the Amazon shopping cart).
Oftentimes dealing with such flows would involve navigating a maze of files and functions, and making any edits would involve a lengthy process of doing corresponding downstream/upstream plumbing.
Haystack attempts to address this in the following ways:

    1. It allows you to explore your codebase as a directed graph of functions, classes, etc on the canvas. We feel like this better fits how your mind understands your codebase and helps you find and alter functional flows more intuitively. We especially want to utilize this for pull request reviews!

    2. It has a navigational copilot that makes edits across files or functions much easier. After you make some changes, Haystack will try to predict your next action and create functions/methods or refactor upstream/downstream code for you. Haystack will surface these speculative edits on the canvas in a way that you can easily dismiss or incorporate them, allowing you to make large changes with a few clicks or keystrokes.

    3. Haystack will utilize natural language search so you don’t have to play “Where’s Waldo” to find a functional flow in your codebase. This is coming soon!

We’re still pretty early in development and we really want to perfect the experience of navigating and editing code on a canvas. Any feedback would be much appreciated!

PSA: Since Haystack is a VS Code fork, you should be able to move your extensions and keyboard shortcuts. Please let us know if you have any issues with this!

Comments (214) 89 threads

Earlier comments
azhenley6 replies#
I published a paper comparing navigation time with a canvas-based editor (Code Bubbles) vs. traditional tab-based editor (Eclipe) vs. a carousel-based editor (Patchworks, a tool I designed).

We found the canvas provided too much freedom.
https://austinhenley.com/pubs/Henley2014CHI_Patchworks.pdf

fredamaral#
amazing analysis. for me, either canvas- or carousel-based editor solves the mental issue of having to also load a significant amount of cognitive data all time you deal with very large codebases. (it also automatically require you to have a wide screen sufficient to make use of the tool properly).

only point here is to get used to deal with files on the horizontal, not vertically way of thinking, which is kind of rooted in the way we program first hello world.

fao_#
Interesting! Patchworks somewhat mirrors how I setup my Doom Emacs, with 4 - 6 panes of code, across multiple workspaces (which can be flipped between via SPC TAB (number)
heresie-dabord1 reply#
Tantalising research!

Is the source-code for the Patchwork editor publically available?

jacobsimon2 replies#
This is cool - I haven’t really thought much about the spatial organization of my IDE before. Reflecting on it now, I realize I don’t even use the tabs in VS Code anymore because I have way too many files open. I just look at one file at a time, and when I need to switch I use Cmd-P to search or jump between recent files. Works well but requires me to keep the names of files/directories in my head all the time.
kalaksi1 reply#
I mainly use ctrl-tab to switch between tabs for the same reason. Recently active tabs are first on the list so it's a fast way to switch between recent tabs. For not-recent tabs, I still don't use the tab bar but press ctrl-tab and then select a file using mouse in the ctrl-tab dialog (or just tabbing many times)
jacobsimon#
Oh wow didn't know that existed. You should try cmd-p too! If you hold down Cmd and press P repeatedly, it acts like ctrl-tab, but you also have the option to search files at the top. I suppose you could remap it to ctrl-tab and then you'd get it for free.
jenscow#
This is why I set a limit on the tabs in my IDE.
Calzifer#
> Based on our qualitative observations, participants’ long navigation times in Eclipse appeared largely due to time spent scrolling through files full of irrelevant code (as opposed to switching tabs), and failing to see the methods they wanted among that code.

> [...]
> Because users of Code Bubbles and Patchworks were able to open code at the granularity of methods, they had the advantage of never having to scroll through code to reach their navigation targets.
Have only read a bit of this paper but from this discussion over Eclipse it seem that the participants could be a lot more efficient if they used it more like an IDE than a multi-tab editor. Finding methods should be much less of an issue having an (alphabetically ordered) outline view.

akshaysg#
This is super interesting. We have thought about having a grid vs a canvas, but decided to go with the canvas as we actually thought it was easier to navigate. I'd love to talk with you (I'll email you) if you're OK with that!
enobrev1 reply#
Congrats on the release. This looks like an excellent, well implemented in tool. I look forward to trying it out.

It reminds me of a feature I've always wanted, and even built manually a couple times, but never in a shareable way, which is to unravel a code path into a single script or source file.
I've want to be able to set something like a breakpoint and hit an "unravel" button and be left with a single file that shows every action that occurs leading up to that point. Ideally it would be runnable as a single script as well. This is essentially the view a step debugger gives you, but I want to see it all in a single file from start to finish rather than I. Multiple layers referencing multiple files.

reachableceo1 reply#
Why? What problem are you trying to resolve? What outcome do you want?

I find that when folks focus on specific implantation details instead of sharing requirements / parameters / outcomes that much gets lost in translation.
Why do you want this implementation? What function / purpose would it serve?

enobrev1 reply#
I want to be able to look at an entire codepath as if it were the only thing the application does. I don't want to step through multiple files and look for references between layers of a codebase, with all the alternative codepaths in view. I want everything laid out in a single view, serially, so I can see from start to finish how the code was run with the pre-determined inputs. And then I want to be able to debug that one file to see how changes affect it.

And then, ideally, I'd like to be able to have that file map back to the original so that the changes I implemented can be directly implemented in the original code.
I'm not sure what folks you're referring to, or implementation details you're asking about. It's a feature I want and that I've even implemented in hackish ways, and I'm surprised it hasn't already shown up in more advanced IDEs yet.

akshaysg#
This is an interesting idea! I've thought of something similar, where you can play with the inputs (or ask AI to generate it) so that you can see how that specific code flow behaves.

I'd love to see the hacks you've done to make this work if possible!

20after45 replies#
This looks really interesting and well thought out. Nonetheless, I feel like the OS window manager should provide this kind of experience, with appropriate hooks so that an IDE can implement this sort of experience with native windows.

I really liked using PaperWM¹ for a while, however, I'm still waiting for it to get more stable.
Another system that is sort of similar to this concept, Pipeworld² (part of the Arcan project) is an impressive research UI experiment which is a bit too far out for my daily use.
1. https://github.com/paperwm/PaperWM?tab=readme-ov-file#paperw... 2. https://arcan-fe.com/2021/04/12/introducing-pipeworld/

TuringTest1 reply#
OS windows are a hindrance for any workflow needing semi-permanent layout. It's ok to place two or three monolithic apps side by side, and maybe to pull apart separate working sessions at different virtual spaces. It also requires constant bookkeping to clean up all the individual windows you no longer need.

That's very different from a spatial layout, where you can juxtapose related code elements near each other, and they remain in those places for as long as you're using them, and then get rid of all them together by closing their common container.
There have been attempts to create new, more spatial work styles on window managers, but the industry is too set in their ways on how windows should be managed, and WMs are complex beasts with many moving parts. So it's usually better to keep those experimental tools self-contained within their own window or app.

PinkSheep#
Alright, I have a mismatched setup: a 1080p and a 4K screen. No matter how you twist it, the virtual screen* will have dead zones. Self-management of a single full-screen canvas is easy (browser F11). But then I will want to use the entire physical screen estate with the editor and it'll end up re-implementing large parts of the window manager just to position the windows where they belong, rendering at the correct monitor DPI.

Further, just from the shown animation I can already see the same problems you'd encounter with a lot of screen space and old style window managers: you grow tired _very fast_ of moving and resizing additional windows yourself to fit more on the screen. "Maximize (on current screen)" is the only automation step in this direction and it is decades old. Windows' "snap to edges" is a semi-manual attempt at assisted window management.
* in Win32 terms, a rectangle encompassing the entire region with all visible screens

jsiepkes2 replies#
> I feel like the OS window manager should provide this kind of experience

GIMP (the OSS Photoshop-style tool) had this idea for literally over a decade and eventually gave up on it because they never got it to work well.

account421 reply#
They didn't give up on it, they simply added alternative options for those that didn't like it.
bowsamic#
The issue is that for GIMP it didn't really serve a particularly obvious function, and it was very different to what users of other software expected
tarruda1 reply#
Not related to the main thread, but I want to mention that as a display server, Arcan is superior to everything else out there (x11, Wayland and whatever proprietary software is used in Mac/windows).

To make things even more impressive, it is:
- Also a game engine
- Also a multimedia Framework/Library
- Implemented over the course of many years as a side project of a single programmer.
It is one of the most impressive projects I've seen (if not the most impressive) and the dev is a true genius of software design and hard work.

junon#
This is exactly the kind of window manager I've had in mind for years for the OS I'm making. Glad others feel similarly. Here's to hoping I get that far!
KronisLV1 reply#
This is pretty cool!

Reminds me of the now defunct SourceTrail tool: https://github.com/CoatiSoftware/Sourcetrail
Actually, seeing lines between the code and where you opened it from would most likely be useful!

akshaysg1 reply#
Yes we were definitely inspired by SourceTrail! Will add to the feature list!

Load more comments