Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hledger in JavaScript #1032

Open
alensiljak opened this issue May 22, 2019 · 3 comments
Open

Hledger in JavaScript #1032

alensiljak opened this issue May 22, 2019 · 3 comments
Labels
A-WISH Some kind of improvement request, hare-brained proposal, or plea. web The hledger-web tool.

Comments

@alensiljak
Copy link

alensiljak commented May 22, 2019

Talking about wild ideas... While reading through the Contributor Guide, I saw the link to Hledger compiled to JavaScript. 馃
This raises some interesting potential consequences. As I'm currently creating Cashier, a GUI app for entering transaction records in JavaScript, the prospect of having a JS version of hledger greatly increases the potential of the Progressive Web Applications (PWA) platform. So, before jumping to conclusions:

  • what are the capabilities of the JS-compiled version?
  • how official/supported is this version?
  • what are the intentions for the future?

Naturally, having the full Hledger available inside the app would be a great addition, providing immediate insights, although the transfer to the desktop would still be the main goal. As mentioned, this opens up possibilities too numerous to list here. At a minimum, I would look to use this as an engine for providing some basic reports (register, per period; account balances, etc.), if that turns out to be convenient.

Resources:

@simonmichael simonmichael added A-WISH Some kind of improvement request, hare-brained proposal, or plea. web The hledger-web tool. labels May 25, 2019
@alensiljak
Copy link
Author

There is #1944, which may be a better option, with full Hledger capability.

@simonmichael
Copy link
Owner

Status: this was a one-time tech demo, which hasn't been touched since. It uses GHCJS, which still works but does not support recent versions of GHC. But on the upside, GHCJS is planned to be included in GHC's next major release, 9.6, so it could become quite viable again.

@alensiljak
Copy link
Author

alensiljak commented Nov 5, 2022

That's interesting information! Looking at GHCJS (finally), I see it is using emscripten, which converts c/++ programs to wasm runtime or Node.js. I actually created an issue to try that with Ledger, which is written in C++.

I'm actually now more keen on direct wasm implementation as that should be more direct and potentially more performant. However, let's see how that works out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-WISH Some kind of improvement request, hare-brained proposal, or plea. web The hledger-web tool.
Projects
None yet
Development

No branches or pull requests

2 participants