Recent activity

Re: Fennel Rationale document a month ago

From John Gabriele to ~technomancy/fennel

Hi, Phil. Good to see this. I was thinking something like
this was missing after in the readme I saw "Why not Fennel?".

Some comments on the text of the article:

> Partly because it is so small, Lua is also extremely fast.

I'd always guessed that Lua is fast primarily because it
checks so little for you (nil for non-existent table entries
and other variables, no fn arity checks). Do you think that
plays a major role in Lua's speed?

> the result is a powerful antidote to prevailing trends in
> technology of treating programs as black boxes out of the

Re: range function? 2 months ago

From John Gabriele to ~technomancy/fennel

On Tue, Aug 11, 2020, at 3:47 PM, Phil Hagelberg wrote:
> John Gabriele <jgabriele@fastmail.fm> writes:
> 
> > Does Fennel have a `range` function? I don't see one, nor do I see one
> > in lume. Though, maybe it doesn't need one, since it has numeric `for`
> > loops?
> 
> Fun fact: Fennel doesn't really have *any* functions, other than the
> compiler API. It's all macros and special forms (which might as well be
> macros.) I think in this case Luafun will be your best bet:
> 
>     https://luafun.github.io/generators.html

Thanks. Will have a look at luafun. Looks like it's intended for use

range function? 2 months ago

From John Gabriele to ~technomancy/fennel

Does Fennel have a `range` function? I don't see one, nor do I see one in lume. Though, maybe it doesn't need one, since it has numeric `for` loops?

Re: Fennel library/module example? 2 months ago

From John Gabriele to ~technomancy/fennel

On Sun, Aug 9, 2020, at 1:00 PM, Phil Hagelberg wrote:
> John Gabriele <jgabriele@fastmail.fm> writes:
> 
> > Put this into a wiki page:
> > https://github.com/bakpakin/Fennel/wiki/Cookbook-your-own-modules
> 
> I guess one thing I forgot to mention that might be a point of confusion
> is that the package.searcher stuff is only necessary if you're launching
> the program from Lua; either using the `lua` command or inside some
> other system that supports Lua, such as Love2d. When you launch with the
> `fennel` command from the shell, the package.searcher is already set for
> you.
> 
> I'll see if I can make that clearer in the tutorial. But in the cookbook

Re: Fennel library/module example? 2 months ago

From John Gabriele to ~technomancy/fennel

> Ooof! There's my mistake; unnecessary second call to `require`, then
> neglected to call like `(my-module.say-hi "Me")`.

Put this into a wiki page:
https://github.com/bakpakin/Fennel/wiki/Cookbook-your-own-modules

Re: Fennel library/module example? 2 months ago

From John Gabriele to ~technomancy/fennel

On Sun, Aug 9, 2020, at 2:33 AM, John Gabriele wrote:
> On Sat, Aug 8, 2020, at 8:21 PM, Phil Hagelberg wrote:
> > John Gabriele <jgabriele@fastmail.fm> writes:
> > 
> {snip}
> 
> and in my-program.fnl:
> 
> ~~~
> #!/usr/bin/env fennel
> 
> (local fennel (require :fennel))
> (table.insert package.searchers fennel.searcher)
> (local my-module (require :lib.my-module))

Re: Fennel library/module example? 2 months ago

From John Gabriele to ~technomancy/fennel

On Sat, Aug 8, 2020, at 8:21 PM, Phil Hagelberg wrote:
> John Gabriele <jgabriele@fastmail.fm> writes:
> 
> > Can you please give me a "Hello, Fennel Module!" example? That is:
> >
>
> Modules almost always end in a table; that table is then returned when
> you call (require :my-module). {snip}

Ok, I'm running Lua 5.4 with Fennel 0.5.0. Here's the files in my project
directory:

~~~
$ tree

Re: wiki, or directory of markdown files? 2 months ago

From John Gabriele to ~technomancy/fennel

On Fri, Aug 7, 2020, at 2:20 PM, Justin Smith wrote:
> correcting myself, it's a separate repo, but the contents can still be
> checked out and migrated

Ah, didn't know that. Thanks for the info and the link.

-- John

Fennel library/module example? 2 months ago

From John Gabriele to ~technomancy/fennel

Can you please give me a "Hello, Fennel Module!" example? That is:

  * what would the my-module.fnl file contain? (Did I get the name
    right? Can it contain dashes, or must they be underscores?)

  * Regarding the code to `require` it, it looks like, [according to the
    tutorial](https://fennel-lang.org/tutorial#modules-and-multiple-files),
    that would be:

    ~~~
    (local fennel (require :fennel))
    (table.insert (or package.loaders package.searchers) fennel.searcher)
    (local my-module (require :lib.my-module))
    ~~~

wiki, or directory of markdown files? 2 months ago

From John Gabriele to ~technomancy/fennel

I see that [the Fennel wiki](https://github.com/bakpakin/Fennel/wiki)
already has a selection of articles present.

I've actually spent a lot of time experimenting with different wikis and
doc formats in the past. In the end, while I like the convenience of a wiki,
I found that they tend to turn into messes over time (the Fennel wiki
is still small and tidy). The best form for docs I've found is a directory
(containing subdirs, as needed) of markdown files. (I can list the
reasons why if anyone's interested.)

Anyhow, is Fennel going to stick with and grow its github wiki, or
do you think it would benefit from transitioning those wiki pages
into plain text files under the project /doc dir?