Live data from Hacker News

Why Fennel?

fennel-lang.org

71–80 of 174 posts

Re: Why Fennel?

#72

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 would love to see a stripped back ML-style language that targets lua, just something like ocaml's type system and exhaustive pattern match right on top would be all I need. There have been a few attempts but nothing I know of that got usably far and is maintained. 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 b…

I think that LunarML [1] could fit this niche quite well. It's a StandardML compiler that targets Lua. I can't tell much more as I've only played with it a little and don't have much experience with ML languages in general, but it looks promising.

[1] https://github.com/minoki/LunarML

Re: Why Fennel?

#73
post #45

Earlier quoted context omitted.

I do not understand the appeal of non-LISPy languages. I get that most people are used to reading it and that they are efficent, 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 combersome and unnecessarily symbol heavy, and reading it isn't really nice as well. I'd rather have the language add those extra parens i…

This doesn't really resonate with people though, as most people are more familiar with C-style notation. Also: >Writing code like this is combersome and unnecessarily symbol heavy Does not make sense in this context, as it mainly applies to Lisp-like languages that uses parentheses heavily.

>Does not make sense in this context, as it mainly applies to Lisp-like languages that uses parentheses heavily.

I had read, some years back, that someone did an actual calculation / demonstration that showed that the number of symbol / punctuation characters in Lisp is actually less than in C-based languages, for a block of code with equal functionality in both languages.

I don't have the reference handy. Someone here may know of it, and post it.

Re: Why Fennel?

#74

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

The appeal can be seen with paredit-style [1] editor plugins. They give you the power of working on trees rather than text. When you master the paredit way of editing you’ll wish you could do that with every language.

[1] https://paredit.org/

Re: Why Fennel?

#75

Earlier quoted context omitted.

This doesn't really resonate with people though, as most people are more familiar with C-style notation. Also: >Writing code like this is combersome and unnecessarily symbol heavy Does not make sense in this context, as it mainly applies to Lisp-like languages that uses parentheses heavily.

>Does not make sense in this context, as it mainly applies to Lisp-like languages that uses parentheses heavily. I had read, some years back, that someone did an actual calculation / demonstration that showed that the number of symbol / punctuation characters in Lisp is actually less than in C-based languages, for a block of code with equal functionality in both languages. I don't have the reference handy. Someone he…

It's obvious to anyone who is familiar with both.

    (f x y)
vs

    f(x, y);
Note the extra comma and semicolon. The only place this breaks down is for simple arithmetic expressions like (+ a b) vs a + b, which is trivial enough to ignore (and also goes back in favor of Lisp when you start having more operands).

Re: Why Fennel?

#76

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

The unmatched beauty of the Lisp is the elegance of writing code generators (macros). Code is list and main structure is list. This is genius.

It's called https://en.m.wikipedia.org/wiki/Homoiconicity

Re: Why Fennel?

#77
post #45

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

I do not understand the appeal of non-LISPy languages. I get that most people are used to reading it and that they are efficent, 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 combersome and unnecessarily symbol heavy, and reading it isn't really nice as well. I'd rather have the language add those extra parens i…

Let's be real in most situations it doesn't matter. One "statement" per line is bog standard. Whether that statement is surrounded by parens or ended in a semicolon isn't impactful for reading.

LISP is only better when you add source code transformation (which is way easier with its source code looking like the transformed code). But then you introduce "everyone can write their own syntax" which is good and bad given the history of DSLs...

Re: Why Fennel?

#78
post #64

Earlier quoted context omitted.

This doesn't really resonate with people though, as most people are more familiar with C-style notation. Also: >Writing code like this is combersome and unnecessarily symbol heavy Does not make sense in this context, as it mainly applies to Lisp-like languages that uses parentheses heavily.

Yeah was going to change that part too for something like "Writing code like this is verbose and spans too many lines", but then I just thought it'd be better if it sounded more like the parent comment. And I understand it doesn't resonate with most, I just wanted to highlight how the initial parent comment was very subjective and not very substantive, some people didn't take the joke so well, I guess it could've sou…

It's your comment that seems to add the least, because the majority agree with the OP. The point is that ergonomics is not as good, of course there are contrary opinions. The existence of a contrary and minority opinion doesn't detract from the point.

Re: Why Fennel?

#79

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

Consider the following LISP function that performs a transformation of an MxN matrix:

(defun transpose (matrix) (apply #'mapcar #'list matrix))

Based on my own experience I think I can say that It isn't until one has acquired a reasonable amount of experience with the language that they can fully appreciate its power.

Re: Why Fennel?

#80

Earlier quoted context omitted.

This doesn't really resonate with people though, as most people are more familiar with C-style notation. Also: >Writing code like this is combersome and unnecessarily symbol heavy Does not make sense in this context, as it mainly applies to Lisp-like languages that uses parentheses heavily.

>Does not make sense in this context, as it mainly applies to Lisp-like languages that uses parentheses heavily. I had read, some years back, that someone did an actual calculation / demonstration that showed that the number of symbol / punctuation characters in Lisp is actually less than in C-based languages, for a block of code with equal functionality in both languages. I don't have the reference handy. Someone he…

I never got people’s objections to the parentheses when the bottom of most js/ts files is a soup of three different flavors of closing bracket. Even more “fun” in languages like PHP that make you sprinkle ceremonial semicolons into some parts to satisfy the compiler. Hunting for the right brace is tedious, whereas in a lisp I just bounce on close paren til the open paren highlight is where I want it.
Post reply on HN