Live data from Hacker News

Fengari – Lua for the Browser

fengari.io

11–20 of 145 posts

Re: Fengari – Lua for the Browser

#13
post #5

After I found fennel-lang I thought "all I need now is a browser that runs Lua" and now here we are, I hope they work together well. Thanks for this OP

No wokkas.

I found this today after following back to Fennel (for probably the 10th time hehe) from the recent Fullmoon post (https://news.ycombinator.com/item?id=30385759) by thinking "what if I use Fennel instead of Lua-proper there?".

I then checked out the Fennel Wiki (https://github.com/bakpakin/Fennel/wiki) where you'll spy a link to Fengari. Maybe that trail of breadcrumbs helps you find more things you might be interested in.

Re: Fengari – Lua for the Browser

#15
post #12

I’d love a “how’s it work” section. From what I gather, it’s not wasm or anything; rather, it’s transpiling lua to JS at runtime. Is that right?

According to the description, a minimal glance at the code and this [0], no, that's not it.

It is "the Lua VM written in JavaScript" and "largely a port of the PUC-Rio C implementation of Lua". It runs the Lua code on that VM, so there's no transpilation.

[0] https://hackernoon.com/why-we-rewrote-lua-in-js-a66529a8278d

Re: Fengari – Lua for the Browser

#18

For those looking for powerful async coroutines in the browser: The combination of typescript+redux+redux-saga is also quite powerful. Redux-saga uses generator coroutines to handle all sorts of asynchronous tasks.

I think you can do anything in Redux Saga without either Redux or React.
Post reply on HN