Recent activity

range function? 17 hours 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? a day 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 days 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 days 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 days 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? 4 days 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? 4 days 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? 4 days 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?

Re: help getting readline working in repl 10 days ago

From John Gabriele to ~technomancy/fennel

On Fri, Jul 31, 2020, at 4:14 PM, John Gabriele wrote:
> 
> I emailed the maintainer of readline.lua about the possibility of a dependency
> issue with Lua v5.4.

There's a new readline.lua at luarocks (2.7-0). Readline support for
fennel is working for me now.

Re: help getting readline working in repl 10 days ago

From John Gabriele to ~technomancy/fennel

On Fri, Jul 31, 2020, at 12:59 AM, John Gabriele wrote:
> 
> The fennel setup page says, "Note: If you’ve installed with the --local 
> flag, you may need to ensure your package.path and package.cpath 
> contain its location. See the note on LuaRocks installation for 
> details." ... what are "package.path" and "package.cpath"? 

Ah, I see. These are in lua's stdlib. They visible in the Lua repl.