Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

[Feature Request] neovim plugin to allow "markdown as math" #3

Open
wakatara opened this issue Apr 30, 2022 · 3 comments
Open

[Feature Request] neovim plugin to allow "markdown as math" #3

wakatara opened this issue Apr 30, 2022 · 3 comments

Comments

@wakatara
Copy link

I'm super impressed with what you've done here. I was wondering if there was nay way to take this and make it an "in document" plugin for NeoVim that would parse the doc and output the math (much like Calca does with a =>.

Cool idea you've got here, would love to see it have more legs (esp since not the biggest fan of latex and like the idea of both seeing and calculating formulas in a doc.

@pouyakary
Copy link
Owner

Dear Daryl hi :)

Sorry that probably you didn't get my emails. I recall writing to you on the same subject. I've been quite busy in the past few months but managed to have some fun translating the Nota to Go for a WebAssembly rewrite which soon will be the Nota. There are currently a few things that are ongoing. Much like you I'm a huge fan of @praeclarum's work (calca being a huge inspiration of mine everywhere). The language is now kinda solid in the grammar level, a few tiny things remaining, but then the computation engine needs a hell of a lot of work. I want to use the Big Float as the new type for storing numbers which needs much work in implementing different math functions.

Now the problem with using Big Float is that there are two ways of compiling Go into WebAssembly. One is using tinygo which emits really amazing code and supports exporting ABI. So you can for example pack something and then load the WebAssembly everywhere and then have the compile function exposed to any WebAssembly runtime. (say wasmer, wasmtime ...), and the other way is the official Go compiler which emits really really really really bad code. It produces really heavy binaries (say 5Mb vs 100Kb on Go vs tinygo) and the worse thing is that it needs a helper JavaScript loader script.

Now the problem with current version of Nota is that TinyGo has no support for Big Float and probably what my parsing library needs so I get into huge errors there. If there was a way to compile nice WASM files, then you could load the engine in any editor since wasmer is probably supported everywhere and communicate to the engine using simple JSON based strings. But now I have to register a JavaScript helper in Go and then load it from the JavaScript side. That has made it hard to have Nota in something like NeoVIM (I have no idea what neovim uses if it's not the usual vim based scripts)

However since the main goal of mine was to have a command line based app as well as UI based app. I personally really want to have a vscode "Notebook" for Nota which should be possible since the JavaScript runtime, however I also probably have to make different packages to have a pure engine package, a command line interface package and a web loader package. If I can configure the packages to work like that, then probably I add a command line json communication with nota so that you can make that, but then in the other way. I don't know probably not possible right now.

@pouyakary
Copy link
Owner

pouyakary commented May 27, 2022

@wakatara so here's a sneak peak of the new Nota :) (running inside vscode, as a WASM module :))

17.mov

@wakatara
Copy link
Author

That looks amazing. 🤩

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants