Fork me on GitHub
#announcements
<
2024-02-23
>
onionpancakes08:02:17

Today, I'm making the initial release of https://github.com/onionpancakes/chassis, a highly optimized Hiccup-style HTML templating library. • Outperforms other Clojure HTML rendering libraries on runtime serialization alone. • True flattening and compacting HTML compiling macro. When used, serialization performance more than doubles. • User-defined "alias" elements. Define your own namespaced tags and use it like any other element vector (even with tag id/class!) Check it out and let me know your thoughts. I'm especially interested to know if these optimizations impact real world performance.

🔥 33
gratitude 6
clojure 1
pez09:02:01

Yum, alias elements! Pure data prints so much nicer in the repl, and is also so much more convenient/possible to manipulate with code.

borkdude09:02:33

Congrats on the library! One small note: the README mentions two different library names for deps.edn - this is bad practice since one might end up with two versions of your library on the classpath. It's recommended to have only one and the same name for both git and mvn deps

Adam Helins09:02:12

Very cool, I've been softly thinking about an alternative for better HTML rendering but looking at your README, that seems to be it!

onionpancakes09:02:38

@U04V15CAJ Thanks, I'll probably remove the git deps for now. If i want to support both git and mvn deps, does that mean I will have to match the mvn deps group to the git deps groupname? because for git deps as I understand, you need to use the io.github as the group name.

borkdude09:02:30

yes, you need to match and no, you don't need to use the io.github group name. there are two options: • publish to clojars with io.github group name

borkdude09:02:50

or • use the mvn group name + add an explicit :git/url

onionpancakes09:02:04

b-but my branding! lol. Thanks ill think about it.

borkdude09:02:27

if you care about your branding, just use an explicit git/url

borkdude09:02:05

I don't know if dev.foo or io.github.foo really matters for branding though ;)

borkdude09:02:35

anyway, here is what you can do:

dev.foo/chassis {:git/tag "v1.0.340" :git/sha "6babb84" :git/url ""}

onionpancakes09:02:56

i just mostly didn't want to tie my mvn deps to GitHub the company

borkdude09:02:10

then go for the latter option

tatut10:02:08

Ripley has a similar h/html but that is a macro that generates code to output the HTML

mdiin16:02:11

Nice, congratulations on the release! Out of curiosity, how does this compare to https://github.com/escherize/huff ?

onionpancakes07:02:26

@U0522J5HN I published a huff-bench branch, results in the bench folder.

👍 1