Live data from Hacker News

Why Fennel?

fennel-lang.org

131–140 of 174 posts

Re: Why Fennel?

#131

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/...

If only there was an editor which could act as an interpreter for Lisp directly ...

I've been using EMACS since it was TECO on TOPS-10. Not a day goes by that I don't spend at least an hour with it. But it is long in the tooth and the abstractions it exposes are as advanced as they can be without breaking reverse compatibility. It is one of the few packages I think would be improved by a fully-supported package manager. E-Lisp is a warren of inefficiency, notational paucity and half-implemented tools. If someone wanted to build an emacs-like text editor in Lua or Fennel, I would absolutely sign up as a beta tester (assuming the key bindings were mostly the same.)

Re: Why Fennel?

#132
post #52

Earlier quoted context omitted.

I haven't really touched my emacs config in years. I just set it up how I wanted and now I use it to pay my bills. It sounds like the flexibility was just too tempting for you to not hack on it when you should be doing other things.

I have set it up 50 times and it crapped the bed every time. Before anyone yells "skill issue!", I'll say that if any plugin author can make the editor crap the bed, then the editor is not good. There are degrees to freedom. Complete freedom in such environments is a liability, not an asset. Say hi to the others in the ivory tower. And remind them not to do selective omissions in their supposed counter-arguments to "…

Hey... could you write about one or two of the worst offenses? I consider myself an emacs/elisp power user, yet somehow (M)ELPA seems pretty doinked out-of-the-box on a stock Debian nox-emacs install. I just thought it was me.

Re: Why Fennel?

#133
post #65

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…

Focusing on the runtime's parser is a red herring and I think a common error in lisp advocacy. Even if I didn't the full power of a lisp macro system, it is an absolute joy to manipulate programs written in s-expressions. Being able to cut/copy/paste/jump-[forward/back] by sexpr is really convenient, and often done nowhere near as well in other languages. I think this is because until the invention of tree-sitter and…

also, for what it's worth, I've moved on to mexp in my old age. Just easier to figure out where things begin and end without all those parens. And they more-or-less mechanically convert to sexpr when you need them to.

And back in my day you couldn't get a CS degree without a class on parsing and interpreting structured data. Usually it was the compilers class. Now we don't require kids to take a compilers class so an entire generation doesn't understand why regexes don't work in all cases. When kids in my organization try to "parse" HTML or XML with regexes, I hand them a copy of the O'Reilly Lex and Yacc book. And when they come back saying they can't understand it, I hand them the Dragon book. I guess I just think we should all feel that particular pain. Sorry for the digression, but I was triggered by "regex" and "parser" used in the same sentence.

Re: Why Fennel?

#134

Earlier quoted context omitted.

It does sound interesting, and I'll look into Lisp, can you give me some advice on what's the best way to learn it? On your other point, I've programmed in many languages in many years, and mostly I did some in an environment with an IDE, or powerful language-specific tooling (not tree-sitter) that had a proper good understanding of the syntax and semantics of the language used.

If you learn better by video than by reading, the Structure and Interpretation of Computer Programs lectures by Abelson and Sussman are spectacular. I have watched the entire course multiple times. The SICP book also receives a lot of praise, but I have yet to read it myself. They specifically use Scheme, but most of the knowledge can be translated to other Lisp dialects as well. The biggest difference between the di…

Also... HtDP (How to Design Programs) is a good follow-on to SICP.

Oh... and I think we can't mention SICP without referencing this (relatively recent) video about why MIT moved from Scheme to Python for intro classes: https://youtu.be/OgRFOjVzvm0

Re: Why Fennel?

#135
post #8

Earlier quoted context omitted.

I've been working on something along those lines in eli: https://github.com/codr7/eli?tab=readme-ov-file#type-checkin...

Nice looking language! What’s the status? Is it stable?

That would be a question of definitions :)

It's mostly addition by now, rare that something disappears or changes significantly.

No prod use by anyone afaik.

Re: Why Fennel?

#136
post #94

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 tried fennel for a game jam and honestly was pretty disappointed. The way lisp languages are pitched here, I thought I was in for a mind opening experience, but instead the end experience was pretty much identical to lua in ever meaningful way, the only differences felt surface level (I.e. using closures, and parentheses). I'm forever indebt to lisp for giving JS it's saving graces (closures and FN as first class c…

Fennel isn't a "real" Lisp. It's more of an aesthetic layer on top of Lua than anything else. Try learning Scheme.

Re: Why Fennel?

#137
post #75

Earlier quoted context omitted.

>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).

How would you write this in Lisp without introducing a bunch of parens? `if (0 I’m not a Lisp hater, but there’s a reason people make this criticism. I think most people find the infix version easier to read.

Re: Why Fennel?

#138
post #75

Earlier quoted context omitted.

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).

How would you write this in Lisp without introducing a bunch of parens? `if (0 I’m not a Lisp hater, but there’s a reason people make this criticism. I think most people find the infix version easier to read.

    (if (
There is one additional set of parentheses due to the simple addition, which I already mentioned.

Re: Why Fennel?

#139

Earlier quoted context omitted.

How would you write this in Lisp without introducing a bunch of parens? `if (0 I’m not a Lisp hater, but there’s a reason people make this criticism. I think most people find the infix version easier to read.

(if ( There is one additional set of parentheses due to the simple addition, which I already mentioned.

I unwittingly chose an example that allowed you to write fewer s-expressions in Lisp… touché.

Re: Why Fennel?

#140
post #99

Earlier quoted context omitted.

Sure. Here's a comment with more of an explanation: https://news.ycombinator.com/item?id=36158974

How does it know "1970-01-01" is a date?

It wouldn't. The consumer would need to know to expect a date as a string and parse it.
Post reply on HN