Why Fennel?
41–50 of 174 posts
Re: Why Fennel?
#42I love seeing new languages targeting the Lua runtime. I've been adding Lua scripting support to pretty much everything I make now. I recently made my SSE server programmable with Lua and it's extended the functionality far beyond what I would have had the patience and time to do myself. Highly recommend Lua with mlua-rs Rust bindings. [0] https://tinysse.com [1] https://github.com/benwilber/tinysse [2] https://githu…
There might be a way to get standard ML to output lua or something but I'm not that familiar with it. I think it would be an incredible fit for a third backend for gleam, but they say they aren't adding any more beyond erlang and js.
Re: Why Fennel?
#43Writing code like this is cumbersome and unnecessarily symbol heavy, and reading it isn't really nice as well.
I'd rather have the language add that extra complexity into the parser than have me stare down these endless paretheses. Parsing something C-like is not that, hard, trust me, I've done it
Re: Why Fennel?
#44Earlier quoted context omitted.
> Fennel's approach of compiling to Lua while maintaining meta-programming capabilities is elegant. Yeah, it is very nice to work with. The only tiny "complaint" I have is that it doesn't compile to pure Lua, but instead assumes you'll be running it together with Lua's libraries. I say this because, for me, the places where I'd like to use Fennel have a lot of overlap with the places where I'd like to use Lua without…
Wait what do you mean? If I understand you correctly I use fennel for this all the time, I just copy the compiled lua into the place the program expects to find lua scripts.
Re: Why Fennel?
#45I do not understand the appeal of LISPy languages. I get that the parser is simple and elegant, but I believe the developer (of the compiler in this case) should serve the convenience of the user, not the other way around. Writing code like this is cumbersome and unnecessarily symbol heavy, and reading it isn't really nice as well. I'd rather have the language add that extra complexity into the parser than have me st…
Writing code like this is combersome and unnecessarily symbol heavy, and reading it isn't really nice as well.
I'd rather have the language add those extra parens into the parser than have me stare down these endless semi-colon, linebreaks or indentation. Parsing something Lisp-like is not that, hard, trust me, I've done it.
Re: Why Fennel?
#46Earlier quoted context omitted.
Wait what do you mean? If I understand you correctly I use fennel for this all the time, I just copy the compiled lua into the place the program expects to find lua scripts.
Sandboxed lua can't assume it has access things like debug libraries or any of the file IO, among other things. Many setups pretty aggressively remove and/or patch libraries and even large parts of the default global table. Assuming a vanilla lua library environment can make a project like this unusable in many places.
Re: Why Fennel?
#47I do not understand the appeal of LISPy languages. I get that the parser is simple and elegant, but I believe the developer (of the compiler in this case) should serve the convenience of the user, not the other way around. Writing code like this is cumbersome and unnecessarily symbol heavy, and reading it isn't really nice as well. I'd rather have the language add that extra complexity into the parser than have me st…
Code is list and main structure is list. This is genius.
Re: Why Fennel?
#48Earlier quoted context omitted.
> Fennel's approach of compiling to Lua while maintaining meta-programming capabilities is elegant. Yeah, it is very nice to work with. The only tiny "complaint" I have is that it doesn't compile to pure Lua, but instead assumes you'll be running it together with Lua's libraries. I say this because, for me, the places where I'd like to use Fennel have a lot of overlap with the places where I'd like to use Lua without…
Wait what do you mean? If I understand you correctly I use fennel for this all the time, I just copy the compiled lua into the place the program expects to find lua scripts.
I just know that I tried to use it without loading Lua's libraries (i.e. without calling the `luaL_openlibs` function or equivalent) and was unable to.
> I just copy the compiled lua into the place the program expects to find lua scripts.
Yeah most existing programs just load all Lua libraries by default, so that's generally not an issue.
My post is more from the point of view of embedding a restricted Lua interpreter into a program (i.e. only Lua-the-language, not Lua-the-language-plus-its-libraries) while still supporting Fennel.
---
EDIT: Just checked, the Fennel code `(lambda [foo bar] bar)` compiles to Lua code that calls `_G.assert`.
Re: Why Fennel?
#49I do not understand the appeal of LISPy languages. I get that the parser is simple and elegant, but I believe the developer (of the compiler in this case) should serve the convenience of the user, not the other way around. Writing code like this is cumbersome and unnecessarily symbol heavy, and reading it isn't really nice as well. I'd rather have the language add that extra complexity into the parser than have me st…
Re: Why Fennel?
#50I do not understand the appeal of LISPy languages. I get that the parser is simple and elegant, but I believe the developer (of the compiler in this case) should serve the convenience of the user, not the other way around. Writing code like this is cumbersome and unnecessarily symbol heavy, and reading it isn't really nice as well. I'd rather have the language add that extra complexity into the parser than have me st…