Fork me on GitHub
#conjure
<
2022-10-08
>
grazfather11:10:51

Hey @olical: I am playing around with conjure and that run-all-tests issue. I am having some issues basically making sure that I am working on the right version of the aniseed dep. It's cloned to deps/aniseed, and compiled to lua/conjure/aniseed? Should I expect local changed to the submodule to get compiled in when I run make compile?

grazfather12:10:27

It seems that your new filter doesn't work, and it still selects a package with a metatable and it chokes later on

grazfather12:10:06

Oh... you thread through run before your filter 😄

Olical12:10:53

lol true, fixing

grazfather12:10:40

Still wondering the right way to play around with this: If I mess with a file in deps, how should I compile it into conjure?

Olical12:10:06

So you either have to symlink your aniseed into Conjure's deps dir then run make compile

Olical12:10:22

Or you can also configure the aniseed client to use another aniseed

Olical12:10:45

So instead of conjure.aniseed.* you can set it to use aniseed.* which would be your globally installed copy

Olical12:10:01

Or you can commit/push to aniseed develop and make but that's only something I can do really

Olical12:10:17

I'm adding complement and remove functions too atm

Olical12:10:19

and fixing that bug

grazfather12:10:19

thanks for the fix. So I guess flow is: symlink make compile in aniseed repo make compile in conjure repo. That seems to work

grazfather12:10:35

I had to edit the lua files directly for the aniseed dep earlier and that wasn't as much fun

Olical12:10:04

yep! symlinking in your local aniseed into Conjure's deps and make compile is probably the easiest and quickest way

grazfather12:10:15

right on, works pretty well

grazfather12:10:36

I have never run run-all-tests before seeing that bug. No idea why I got involved there lol

grazfather12:10:56

but anyway, my local fix works, lmk when you push yours and I'll verify

Olical12:10:56

Haha, just passing through helping out 😄

grazfather12:10:03

pretty much 🙂

Olical12:10:25

Alright should actually be fixed this time. It'll also handle modules that aren't exporting tables. So we can only test a module if it's a plain table with no metatable AND has the right aniseed keys inside of it.

Olical12:10:37

And now we have complement and remove in aniseed.core which work the same as Clojure.

grazfather12:10:40

Very nice. I wish a lot of these were put into fennels 'stdlib'

Olical12:10:31

Hard to push functions that make shallow clones on everyone like that though, by default anyway

Olical12:10:02

I wanted Diet Immutability at the very least, but people coming from pure lua / js etc will maybe be put off of the whole language if it pushes ideas like that

Olical12:10:14

I get why Fennel just tries to be a syntax on top of lua and nothing else 🙂

grazfather12:10:23

Yep, but then I find myself using babashka everywhere I can't use aniseed because I like qol functions like that

Olical12:10:42

True and same

grazfather12:10:46

OK so conjure always contains a compiled copy of aniseed. I wasn't sure how that worked

Olical12:10:50

I don't like langs that don't have something like clojure.core

👍 1
Olical12:10:00

Yep, so you can have any version of aniseed in any plugin, they won't conflict

grazfather12:10:24

your change looks good

🚀 1
grazfather12:10:37

Yes I'm with you

Olical12:10:39

Or you can configure Conjure to call out to your local copy of Aniseed if you so wish, then you only use one copy at runtime and never even load Conjure's bundled one because lazy loading

grazfather12:10:43

I'd like for janet to gain traction..

grazfather12:10:17

is that a config option in conjure, or does it require local changes to conjure e.g. to change the require path?

Olical12:10:27

It's config, need to look it up though

Olical12:10:08

*g:conjure#client#fennel#aniseed#aniseed_module_prefix*
`g:conjure#client#fennel#aniseed#aniseed_module_prefix`
            Prefix to put in front of all Aniseed modules Conjure relies on.
            This is set to use Conjure's internal copy of Aniseed by default
            but you can set it to `"aniseed."` to use your globally installed
            copy or even your own plugin specific prefix if you've embedded it
            within your project.
            Default: `"conjure.aniseed."
`

grazfather12:10:30

oh right on. I'll add a note for next time I hack on it. ty!

Olical12:10:49

So it's only for the Aniseed client, but Conjure will still load it's own copy to do internal work. It just means you can use another copy if you need another version for working on aniseed itself locally or maybe your own plugin that requires a specific version etc

Olical12:10:47

Built this whole bundle of stuff with "lua module names clash" in mind, so tried to prefix things everywhere and make those prefixes configurable so people can get creative

grazfather12:10:28

yeah I definitely found myself confused with that seemed like many copies of certain files

Olical12:10:55

Was a hard choice because I know things like that can put people off, but I chose pragmatism and safety over file system purity. Especially since Aniseed uses probably less storage than a web browser cache of a single small page.

grazfather12:10:43

I'm inclined to agree