Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Web Lilt

A topic by flymasterv created 98 days ago Views: 119 Replies: 3
Viewing posts 1 to 2

Given that there is already a JS implementation of Decker, and thus Lil, how hard would it be to break out a LilJS library that would allow running of Lil code in a Node.js or browser environment? I suppose it would look a lot like the Lil playground, just packaged in a neat and tidy Lil.eval() API.

Developer (1 edit)

It would take a little bit of refactoring of lil.js to avoid producing global references, and then you could wrap it all in a closure to expose a tidy public interface. Removing some parts of the Decker DOM and utility routines would help make such a distribution smaller (Though you definitely want to retain utility interfaces like RText, Bits, Array, and Image). You'd also want to polyfill certain builtins like show[] and print[] to allow them to be re-vectored into something useful for a given application or to remove them entirely, not unlike the repl.js stub used in the regression test suite.

I'm a bit hesitant to perform this surgery on Decker's main branch, because it would add some complexity and size to web-decker. If this is a project you're interested in pursuing I encourage it!

(+1)

I promised myself I would never write another programming language after university 25 years ago, but...maybe I'll do some tweaking with this. It'd be fun. I'm sure I could at least get it working well enough for personal use.

Developer

Be sure to let us know how the project goes!