Live data from Hacker News

Why Fennel?

fennel-lang.org

31–40 of 174 posts

Re: Why Fennel?

#31
The comparison with Closure is really interesting. They make the point that they do less reinvention of Lua than Closure does with Java - functions, standard library, tooling. I'd love to know why. Is it just that Lua has less problems than old-Java

Re: Why Fennel?

#32

The comparison with Closure is really interesting. They make the point that they do less reinvention of Lua than Closure does with Java - functions, standard library, tooling. I'd love to know why. Is it just that Lua has less problems than old-Java

Clojure

Re: Why Fennel?

#34

The comparison with Closure is really interesting. They make the point that they do less reinvention of Lua than Closure does with Java - functions, standard library, tooling. I'd love to know why. Is it just that Lua has less problems than old-Java

I'm not sure if this was the up front reasoning but a lot of lua code is run in situations where you don't have full control over the runtime or distribution method.

So anything that requires C libs would automatically rule out fennel for a lot of projects that are essentially using someone's lua api as the target platform. Roblox, mud client scripting, openresty, that sort of thing.

And these environments usually have so much added to them, pcre, stdlib extensions, class systems etc fennel works best not making any assumptions about any of that. It's just straight up the lua semantics, and so anywhere lua works it works. I've used it a lot and originally recoiled from this decision but now I think it is genius.

Re: Why Fennel?

#35

[dead]

Another spot it's great for is in legacy lua programs that you inherit from who knows where, which in my experience is a lot of the live lua out there. It hooks into the module loader system so you can just freely mix functions and tables between the two.

Re: Why Fennel?

#36

I 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…

I don't have any use cases in mind right now, but this looks cool. You should try posting another Show HN.

Re: Why Fennel?

#37

Earlier quoted context omitted.

Interesting. I saw another link here of someone who insists on making C# run everywhere, now someone who insists on LISPs. I really want to try making a language that is imperative, like really imperative, where every line must start with a verb, just to see what it would look like.

> I really want to try making a language that is imperative, like really imperative, where every line must start with a verb, just to see what it would look like. It would look like Tcl.

A bit but I don't like "set foo 32"

One way I think I can get rid of that is like this

    32 = foo;
But why do we even need variables? I think the perfect language design would be if you could just do this:

    pow(x, 2);
    pow(y, 2);
    sqrt() = result;
And maybe you could do this

    {
        pow(x, 2);
        pow(y, 2);
        sqrt();
    } + 1;
    pow(2) = result;
Instead of result = pow(sqrt(pow(x, 2), pow(y, 2)) + 1, 2); that we have today.

Re: Why Fennel?

#38

[dead]

> 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 loading any of the provided libraries (e.g. embedding Lua into other software, instead of using it standalone).

Re: Why Fennel?

#39

[dead]

> 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?

#40
post #9

Fennel is nice. I converted my neovim config[1] to fennel and haven't looked back. [1]: https://github.com/Grazfather/dotfiles/blob/master/nvim/fnl/...

Fennel is indeed nice and I rewrote my config in it too, but looked back ~2 years later and rewrote it again in Lua. I think Fennel for configuration is not justified and just adds complexity. Also the tools are not there: two existing language servers[1][2] can't compete with Sumneko's Lua language server[3] and they are fennel-exclusive and clueless about Lua code. I still like Fennel for writing more complicated c…

I’ve been dipping my toe in Lua and found some ways to achieve pattern matching of sorts and there’s a package called Tamale too but I’m not sure if that is used much.
Post reply on HN