-
Notifications
You must be signed in to change notification settings - Fork 33
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
success story with ASCIIMathML.js — thanks! :) #19
Comments
Hi Mateusz, Thanks a lot for your feedback! And wow that's great what you did with ASCIIMathML. About creating a math rendering feature on top of it, without any insight, I'd be slightly worried about what could be the resulting performances (especially if you're going to use regular Lua VM and not the JIT). But that's a great experiment you are conducting and I'm happy to hear about it :) For 1. upfront it looks like it should be pretty easy to fix. What is the JS code that lead to this weird Lua code? For 2. that looks more tricky, I'd have to deep dive, but I remember I already had trouble back in the time with sorting... not sure it's easily fixable... |
Re. 1: asciimath.js, l.32-34 Re. 2: It shouldn't be really hard to observe, if you copy the core logic from what happened in my code into some unit test. Related areas of code:
|
For 1. I just tried to transpile asciimath.js with the latest version of castl and the resulting output had a semi-colon after |
Wanted to write by email, but given that there are two small tweaks worth reporting, I decided to write via github.
So, firstly, big thanks for the tool! :) I used it to successfully translate the ASCIIMathML.js tool from JS to Lua 5.2. I'm hoping to use it to build a math rendering feature into the SILE typesetter.
As an aside, I had to do two tiny but really tricky tweaks after the initial port:
x = {} (function() end)
is treated by Lua as an attempt to call an array; I had to insert a comma;
to fix such a situation and it took me some time to realize this was the reason for a weird Lua error message;<
, while castl.sort resulted in<=
semantics in my case. I tweaked the translated code to fix the issue in my code, as it was easier for me in this case than tweaking castl.sort.Thanks again!
EDIT: added link to the fix I did regarding castl.sort; forgot to add the link originally :/
The text was updated successfully, but these errors were encountered: