REPLugger icon indicating copy to clipboard operation
REPLugger copied to clipboard

Turning REPLugger from research ➡ full fleged project

Open pureooze opened this issue 6 years ago • 3 comments

@Glench

So I am interested in helping get REPLugger into a fully working project. I have experience with Javascript and React (which from what I can tell is what REPLugger uses).

What are the challenges currently preventing it from being consumed for day to day usage?

pureooze avatar Sep 08 '18 15:09 pureooze

Hi @pureooze, thanks for your interest! I appreciate your enthusiasm!

There's a buttload of work that would need to be done to turn REPLugger into a product that would work for developers. I estimate it would take 2-3 years of full-time engineering and product development work for a small team to get something good.

Why is that? Well, here are some things I can think of off the top of my head:

  • A robust model for setting up the simulated environment would need to be created. This is by far the biggest challenge. Right now, the way REPLugger works is that it runs the file once and sets up a server. The server can respond to queries about the values of specific variables and can also rerun parts of the code (in a very naive way). This system was totally hacked into place for the demo and it doesn't generalize. A better model would need to be thought-through and tested thoroughly, perhaps one that actually hooks into real debuggers.

  • Research into which languages can and should be supported given the above model. Interdependent with the first point, some research would need to be done to figure out which languages could support something like REPLugger. For example, the project I demoed in the video was actually written in Flow, but Flow compiles too slowly to support real-time feedback, so I converted it to JS for the demo. I suspect that many C++, Haskell, and other compiled languages would be too slow to support REPLugger-like functionality, too. (Jonathan Blow's Jai might be a good candidate, and I designed REPLugger in-part from watching Jonathan Blow program). Long-term, I hope languages would evolve to prioritize real-time feedback for the developer experience since that is probably the most important thing about programming.

  • Figure out how things like side effects are handled with repeated runs of code We don't want to e.g. write a new file every time someone edits a source file, so some solution would have to be provided to make sure things with side effects are handled in a way that works for developers.

  • Figure out how long-running code could be supported in this model Similarly to above, if some code takes 5 minutes to run, how might that be supported in a REPLugger-like model?

  • UI and model improvements for for loops, while loops, recursive functions I assume in many cases, developers want values recorded through multiple runs of the same code (e.g. in for loops or while loops). Someone would have to figure out how to get those values and how best to display them.

  • UI research and user testing to understand user needs and refine the UI I took my best guess about what data would be useful to see and the best ways to visualize that data, but I could see those ideas changing based on how developers actually use the product. Some close observation and discovery would probably be necessary to really give developers something useful.

  • Figure out or make a text editor REPLugger is part text-editor, so either a new text editor could be built or an existing one could be built off. Text editors are tricky products to make since people tend to want custom functionality from them.

  • A good technical model for overwrites Someone would need to figure out how to really support overwrites, how to associate them with specific parts of code (that might change over time), and how to save them to be useful in team contexts.

All of these are dependent on the first point — figuring out a model that supports REPLugger-like developer experiences. Maybe this isn't as hard as I think it is, but I don't know how to do it. I hope someone does, though!

Glench avatar Sep 08 '18 18:09 Glench

Thanks for the quick reply! Is there any documentation/writeup explaining how the current implementation works? I think I understand how certain parts work but I am still confused about the overall architecture and why parts of the code do what they do (not saying its bad, I just don't understand it).

To add to the TODO list, it might help to break out the code into smaller modules. I found it difficult to understand what was happening in certain functions — especially when there were side effects — it (ironically) became hard to predict what was going to happen after a variable was assigned a certain value.

pureooze avatar Sep 09 '18 00:09 pureooze

No, and there won’t be because it’s not a good model and the code wasn’t meant to be understandable. The whole point was to make the demo and prove the idea. The music is not in the piano.

On Sat, Sep 8, 2018 at 20:16 Uzair Shamim [email protected] wrote:

Thanks for the quick reply! Is there any documentation/writeup explaining how the current implementation works? I think I understand how certain parts work but I am still confused about the overall architecture and why parts of the code do what they do (not saying its bad, I just don't understand it).

To add to the TODO list, it might help to break out the code into smaller modules. I found it difficult to understand what was happening in certain functions — especially when there were side effects — it (ironically) became hard to predict what was going to happen after a variable was assigned a certain value.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Glench/REPLugger/issues/2#issuecomment-419681550, or mute the thread https://github.com/notifications/unsubscribe-auth/AAbjhc88vNOXyBA5V8If74_y1R8h3A7-ks5uZF3SgaJpZM4Wf6tN .

Glench avatar Sep 09 '18 02:09 Glench