~welt/public-mail

IsaacScript article and some information (with correction)

Details
Message ID
<f713ff0d-286a-a1ae-a2ef-36962860145c@spiderden.net>
DKIM signature
pass
Download raw message
I was gonna write an article about IsaacScript but you've beaten me to 
it. Good article.

I'm the one who did that long rant you quoted in Lamb's Discord guild 
(with the spider emoji as the username).

 > From a skim of the outputted code [IsaacScript] seemed to have 
quadrupled the line count in most of the functions I looked at compared 
to normal Lua (ignoring the branching functions where it tries to 
emulate some features)

I wanted to include more details about what I was testing at the time, 
and share some data and source code.

At the time I was experimenting with transpiling Go code to Lua via 
IsaacScript (Go -> J$ -> Lua). This not only provides a doubling of 
overhead, but introduces the GopherJS runtime. This works as an 
excellent stress test against the TS2L transpiler.

You can find the source for my experiments here:
https://git.sr.ht/~welt/naked

(I forgot I wrote that README lol)

Going back, quadrupled is inaccurate. More accurately it doubled/tripled 
to the code size. Still pretty bad. Your mileage may vary.

Go -> JS: 
https://paste.sr.ht/~welt/63fb1630630884791b72ddd26e3d8c51237edddd#GopherJS%20output
JS -> Lua: 
https://paste.sr.ht/~welt/63fb1630630884791b72ddd26e3d8c51237edddd#TS2L%20output%20from%20GopherJS

TS2L introduced about 89 functions starting with __TS__. Many of which 
are called throughout the code.

This is using the example package in the naked repository. You can test 
it for yourself. You'll notice a couple of things:

1. TS2L spams the console with complaints about unsupported features and 
other errors
2. It decides to compile them anyways and output a file

Which goes to show how flimsy it is. A fatal error like *not supporting 
a feature* should not output a file. And the mod did not load 
successfully (if I recall it was complaining about a missing TS2L 
function or something?)

P.S. Is your Matrix correct? I'm not getting any profile information. 
The formatting on your site is incorrect, it's supposed to be 
@user:example.com.
Reply to thread Export thread (mbox)