Skip to content

Releases: Olical/aniseed

More aniseed.core functions!

01 Apr 10:46
75e8109
Compare
Choose a tag to compare

Added to aniseed.core...

  • merge, merge various maps together, just like Clojure.
  • kv-pairs, turn a table into a sequential table of key/value tuples.
  • map-indexed, basically kv-pairs and then map. Just like Clojure.
  • with-out-str, capture anything printed by pr or println within the callback.
  • get, get-in, assoc and assoc-in. Just like Clojure but assoc will mutate.
  • butlast, everything but the last item in a table.
  • empty?, returns true if what you give it has a count of 0.
  • mapcat, like Clojure.

Misc

  • I alias aniseed.core as a now all over the place since I use it so much.
  • Use println internally over the plain Lua print so you can capture output of core functions with with-out-str.
  • More tests!

Macros with embedding and optional mappings

16 Mar 13:19
4b48527
Compare
Choose a tag to compare
  • Added a split to aniseed.string.
  • Fix defonce and improve behaviour.
  • Allow use of module macros from Aniseed embedded via scripts/embed.sh, you don't need it installed globally as a Neovim plugin now.
  • Don't load the mappings by default, you have to require aniseed.mapping and run init yourself now. This is to give people options and support Conjure in the future as a way to evaluate things through Aniseed.
  • Make aniseed.core's pr handle multiple arguments correctly.
  • aniseed.core's count supports more than just tables and nil, you can now pass it strings for example!

Module system, usability, documentation

20 Feb 16:46
0ef750f
Compare
Choose a tag to compare

This is a big release since it provides a full interactive evaluation story. You'll need to buy into it by using the module and def... macros instead of fn and local though!

  • Added last and count to aniseed.core.
  • More tests.
  • Better internal looping functions based on the run! function.
  • Update nvim.lua and fennel.
  • Ensure fennel.path matches lua.path.
  • Full module system, documented in the readme.
  • deftest module included as part of module system. Test suits are even nicer!
  • A bunch of scripts to help you fetch deps, compile Fennel, run tests and embed Aniseed within your plugin for runtime use.
  • Mappings by default when you're in a Fennel buffer. I hope they're inoffensive 😬
  • More documentation.
  • One easy step to allow you to write your Neovim config in Fennel.

I hope you enjoy! It's been a lot of hard work, I hope it allows people to go out and make all sorts of amazing plugins that run faster and are easier to maintain and extend into the future 🎉

Testing and CI!

19 Dec 13:16
ea6acf2
Compare
Choose a tag to compare

Aniseed now has a test runner and suite, see the readme for more information but it essentially means you can do this:

(fn add [a b]
  (+ a b))

{:aniseed/module :my.math
 :add add

 :aniseed/tests
 {:add
  (fn [t]
    (t.= 50 (add 30 20))
    (t.= 10 (add 10 0) "adding 0 does nothing"))}}

Then all you have to do is execute :AniseedRunAllTests (providing aniseed.mapping's init has been executed first) and you'll see the following output:

[my.math] OK 1/1 tests and 1/1 assertions passed
[total] OK 1/1 tests and 1/1 assertions passed

Aniseed's test suite actually does this in CI through a short lived Neovim instance, check out the Makefile and .circleci configuration for more information on how to do that.

aniseed.fs changes, better module reloading

09 Dec 12:36
64d8e0c
Compare
Choose a tag to compare
  • Breaking! In aniseed.fs, renamed ensure-ancestor-dirs to mkdirp and split out the code to get the basename of the file into a function called basename.
  • In aniseed.string, corrected one of the if statements to be consistent with it's other branches. They all use aniseed.core type checking functions now.
  • Evaluating a file that returns a table containing :aniseed/module :my.module will now merge the keys into the already loaded my.module. This means other modules that require it will have their tables they're holding onto in locals updated. Before the entire table was swapped out leaving the dependant modules holding onto an old version of my.module. This approach keeps everyone in sync as you change a module.

Windows support

03 Dec 22:58
5dc5512
Compare
Choose a tag to compare

Thanks to #1, Aniseed now supports Windows. I removed the use of sub-modules (semi-unrelated) and I'm now copying the compiled Lua that's required into the lua directory (instead of symlinks). That's all committed into the repo purely for distribution reasons.

This should change nothing for current users other than your plugins that depend on Aniseed will now work on Windows hosts.

Stacktraces when ahead of time compiling files or globs

01 Dec 16:51
499ac2b
Compare
Choose a tag to compare

I was accidentally throwing away the Fennel stacktrace if it encountered an error whilst compiling your files (either one at a time or within a larger glob call), that's now getting printed correctly.

You'll see error output in Neovim if your Fennel is incorrect now, hooray!

Post dog-food stabilising

25 Nov 22:43
03724d9
Compare
Choose a tag to compare

I've rewritten my dotfiles in terms of Aniseed and Fennel, I'm happy that it's usable in practice for real world use cases. Enjoy!

Initial release

14 Nov 09:06
61104fe
Compare
Choose a tag to compare

Allows statically compiling Fennel to Lua either one file at a time or as a glob of a directory.