Fork me on GitHub
Vincent Cantin05:02:47

I would like to contribute for the, but first I wanted to ask a few questions.

Vincent Cantin05:02:20

Does garden have any sort of visitor, a spec about the garden data format or anything like that ?

Vincent Cantin05:02:16

It would be handy for writing any kind of garden-rewriting function.


@vincent.cantin No, but I’m sure it’s possible to fit something on top of it. The design is pretty bad; it was one of my first “serious” Clojure projects. You probably noticed, a second version in the works — the aleph branch — but it too needs work.


A zipper traversal is probably possible. I tend to stay away from spec these days.

Vincent Cantin06:02:23

I did not know about the aleph branch. I made a library which is creating garden data (, that’s the reason I am interested in improving Garden.


Oh man would I love help


I’m very busy with meander, my day job, and family.


I would be happy to explain in detail where the aleph branch needs to be in terms of release quality.

Vincent Cantin06:02:00

Maybe I could write a data model for the Garden format using Minimallist and use it to visit the nodes.


Apologies if I sound desperate! 🙂

Vincent Cantin06:02:44

I am equally desesperate for help with my projects, I totally understand you 😅


If you would like to work on the current released version that’d be great too.


I think what would really help would be to have a proper “parse” phase to get the data into a format which can be more easily manipulated.


This is what I was doing on the aleph branch: a protocol for parsing stuff into AST nodes (maps) and separate phases for manipulating /compiling those.


Two things need to happen on that branch: 1. the parser needs to be written in vanilla clojure, no spec, no conform, etc. 2. finish up the docs (but this is less important than the first)


For the current branch, I think fitting a proper parser could work just as well.

Vincent Cantin06:02:29

By “vanilla clojure”, what do you mean? what is your goal exactly?


(garden.parse/parse ["h1" {:font-weight "bold"}])
;; =>
[:rule [:block [:selector "h1"] ,,,]]]
Something like this or whatever (probably maps not hiccup though)


By “vanilla clojure” I just mean no spec or other libraries.

Vincent Cantin06:02:06

Your goal is not to have dependencies ?


spec can be nice for annotating stuff on the side but conform is too slow.


Yes, no dependencies.


Otherwise, I’d just write the whole thing using Meander.


It’s way easier. 🙂


FWIW, I think the idea you mentioned on the ticket is similar to what happens on aleph branch IIRC


Basically pulling the media query up.

Vincent Cantin06:02:02

I will take a look at the aleph branch in the next couple of days.

Vincent Cantin06:02:16

In the near future, do you plan to maintain both branches master and aleph or do you plan to replace master when you can?


I think this could be done with a zipper by finding the media query node, replacing it with it’s contents, then replacing that path along the tree with the media query e.g.

[,,, [,,, (at-media {,,,} <stuff>)]]
;; =>
(at-media {,,,} [,,, [,,, <stuff>]])


No, I would want stick with aleph after.


I always support accepting patches, etc though.

Vincent Cantin06:02:58

I think that you should write it somewhere in the, because many contributors may not know that and will work only on master.

Vincent Cantin06:02:30

Communicate on the direction of the project so that people can be side by side with you.

Vincent Cantin06:02:22

Small detail: the git branch is spelled alef , not aleph


My mistake 🙂


I certainly mean that


Re: communication: I’ve mentioned needing help on main README.

Vincent Cantin06:02:27

At some point in Girouette, I will want to group CSS rules which belong in the same media queries. It’s at that point that having all the media queries at the root will be useful.

Vincent Cantin06:02:03

For now, I use a work around in my code to construct my data with the media query at the root, but it’s a little hacky.


TBH, and I’ve mentioned this in the #meander channel as well, I’m very bad a writing documentation/sending emails. OTOH I’m usually very good at replying here in this format.


The reason is that between the things I enumerated earlier which occupy my time and mind is a head in the clouds.


tl;dr I’m happy to help here and also in DMs

Vincent Cantin06:02:48

I also struggle with time, having a full time job not even related to Clojure and a family to take care of. I got your point.


Young kids take a lot of input 🙂

Vincent Cantin06:02:15

I might have time next week to look at alph and see what I can do on it.


I have 3 😛

Vincent Cantin06:02:35

You +1 me, I have 2


Any number of kids beyond one is difficult


I think someone said the difficulty is squared for each one you have 😄


But I promise you, if you want to work on the project I will give you my full support

👍 3
Vincent Cantin04:02:36

@noprompt I will cut a first release for Girouette first, then see how to improve Garden right after.


Works for me. Keep in touch.

Vincent Cantin06:02:25

I would say it’s log if you can teach them to take care of each other.


I look forward to that day. 🙂


If you want to add something to what is on master you could do it before here:


You could create a separate step for finding the media queries and properly hoisting them to the top level as you suggested.