Live data from Hacker News

Why Fennel?

fennel-lang.org

31–40 of 106 posts

Re: Why Fennel?

#32
Why does every single language landing page not have example code? I don't want to read justifications. The code should speak for itself.

Show me an echo server. Show me how you open a file and read data. Show me SOMETHING. Right on the landing page. How are we still doing this?

EDIT: I stand corrected - this is but a subpage. The actual landing page apparently DOES have code.

Re: Why Fennel?

#33

Why does every single language landing page not have example code? I don't want to read justifications. The code should speak for itself. Show me an echo server. Show me how you open a file and read data. Show me SOMETHING. Right on the landing page. How are we still doing this? EDIT: I stand corrected - this is but a subpage. The actual landing page apparently DOES have code.

This isn't the landing page, which does show a code example prominently.

Re: Why Fennel?

#34

Why does every single language landing page not have example code? I don't want to read justifications. The code should speak for itself. Show me an echo server. Show me how you open a file and read data. Show me SOMETHING. Right on the landing page. How are we still doing this? EDIT: I stand corrected - this is but a subpage. The actual landing page apparently DOES have code.

Linked above is a subpage. The actual homepage at https://fennel-lang.org/ has code and even an integrated place to run it.

Re: Why Fennel?

#35

Why does every single language landing page not have example code? I don't want to read justifications. The code should speak for itself. Show me an echo server. Show me how you open a file and read data. Show me SOMETHING. Right on the landing page. How are we still doing this? EDIT: I stand corrected - this is but a subpage. The actual landing page apparently DOES have code.

[deleted]

Re: Why Fennel?

#37
post #4

> Another common criticism of Lua is that it lacks arity checks; that is, if you call a function without enough arguments, it will simply proceed instead of indicating an error. Fennel allows you to write functions that work this way (fn) when it's needed for speed, but it also lets you write functions which check for the arguments they expect using lambda. I don't understand this; why is this a speed consideration?

I'm not an expert, but my understanding is the Lua has a very limited grammar that is specifically designed to be parsed in a single pass. This precluded Lua from performing arity checks on function calls. Fennel does support arity checks but it comes with a runtime cost since it's implemented as a separate Lua call after being transpiled from Fennel.

The grammar shouldn't have anything to do with arity checking – at runtime, you're going to know if you passed a function 2 arguments or 3 arguments, and due to the presence of dynamic evaluation, knowing how many arguments a function takes is not statically knowable anyway. My best guess is that they want to avoid the overhead of a runtime check for arity.

Re: Why Fennel?

#38
Related. Others?

Language Showcase: Fennel - https://news.ycombinator.com/item?id=32349491 - Aug 2022 (2 comments)

Fennel: A Practical Lisp - https://news.ycombinator.com/item?id=31029478 - April 2022 (85 comments)

Fennel – Lisp in Lua - https://news.ycombinator.com/item?id=24390904 - Sept 2020 (112 comments)

Fennel – Lisp in Lua - https://news.ycombinator.com/item?id=18016168 - Sept 2018 (62 comments)

Post reply on HN