Skip to content

success story with ASCIIMathML.js — thanks! :) #19

@akavel

Description

@akavel

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:

  1. 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;
  2. castl.sort is potentially slightly broken when translating JS sort to Lua table.sort — Lua expects the compare func to implement <, 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 :/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions