Fennel: A Practical Lisp
mattroelle.com
Fennel: A Practical Lisp
1–10 of 91 posts
Re: Fennel: A Practical Lisp
#2Re: Fennel: A Practical Lisp
#3Re: Fennel: A Practical Lisp
#4Re: Fennel: A Practical Lisp
#5So, I don't exactly see how one uses this in an already-embedded Lua. For example, my son knows Lisp, and a bit of Lua because he uses PowderToy, which (to your point) has built-in Lua. So if he wanted to program his Lua extensions to PowerToy in Lisp (Fennel) instead of Lua, how would he go about it, exactly? Compile outside of PT from Lisp to Lua and then load the Lua code into PT, or, run the Fennel Lua code on PT…
fennel -c my-fennel-code.fnl
Or you can use the lua package api to automatically load .fnl files via require seamlessly:
local fennel = require("fennel") table.insert(package.loaders or package.searchers, fennel.searcher)
Enjoy!
Re: Fennel: A Practical Lisp
#6Thanks I will give this a go. I had a long fling with Lua a while back. Wrote everything in Lua -- it is a great language. I would have used it for data science if only it had more well maintained packages. The main API for Torch was in Lua for a while before they abandoned it for Python. Had that carried on we could be using Torch with Fennel right now.
Re: Fennel: A Practical Lisp
#7So, I don't exactly see how one uses this in an already-embedded Lua. For example, my son knows Lisp, and a bit of Lua because he uses PowderToy, which (to your point) has built-in Lua. So if he wanted to program his Lua extensions to PowerToy in Lisp (Fennel) instead of Lua, how would he go about it, exactly? Compile outside of PT from Lisp to Lua and then load the Lua code into PT, or, run the Fennel Lua code on PT…
Re: Fennel: A Practical Lisp
#8Re: Fennel: A Practical Lisp
#9Calvin rose, the author of fennel is a really great programmer and an even better language designer. Personally, i dont use or like lua, but I'm a big fan of one of his other projects, janet[0] [0] https://github.com/janet-lang/janet
As a big fan of both Lua _and_ Janet, I'll just point out that a lot of what makes Janet nice and interesting are in fact inspired by Lua. Tables, fibers (coroutines), prototypes (metatables/metamethods), custom module loaders, a lot of the API, the peg parser (LPEG), etc etc. I understand no language is for everyone, but the influence can be felt throughout Janet if you're familiar with both.
Re: Fennel: A Practical Lisp
#10Thanks I will give this a go. I had a long fling with Lua a while back. Wrote everything in Lua -- it is a great language. I would have used it for data science if only it had more well maintained packages. The main API for Torch was in Lua for a while before they abandoned it for Python. Had that carried on we could be using Torch with Fennel right now.
Not sure when you used Lua but there is a package manager called LuaRocks now which has some pretty nice packages in it for many purposes. I don't think it'd be too hard to get Lua running inside of a Python env either :) https://luarocks.org/
I use lua a lot and like it fine but the build/dependency/tooling situation is a fucking mess. It exposes you to a lot of the inconvenience of C in the end.