Hacker News new | past | comments | ask | show | jobs | submit login

Hi, thanks :)

Why WASM:

One of the primary goal of NoteCalc is to be easily accessible (e.g. it was mainly born because Soulver is MacOS only). So the browser-based client was obvious choice, and I chosed WASM for

- performance reasons

- to be able to use rust

- to avoid as much JS (and related technologies) as possible

Why Canvas:

I answered here: https://github.com/bbodi/notecalc3/issues/6#issuecomment-749...

In a previous versions, only the changed areas were re-rendered, but the code was much more complex and error-prone, and it did not bring any performance improvement, so now I just rerender everything, still excellent performance but much simpler code. However this is different for calculations, only changed/affected lines are reparsed and recalculated.




Cool! Makes sense.

Any advice / learnings on using canvas from wasm for this kind of GUI stuff? If I get it right, you just implemented the editor yourself, not using any sort of widget system.

People often recommend not trying to implement editors on top of canvas because of ... reasons [1] [2], but it seems your implementation ended up being pretty simple? (at least in terms of lines of code...).

1: https://www.w3.org/TR/2dcontext/#best-practices

2: https://stackoverflow.com/questions/12425111/creating-canvas...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: