This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-26
Channels
- # aleph (9)
- # announcements (31)
- # babashka (23)
- # beginners (35)
- # biff (2)
- # calva (5)
- # cider (10)
- # clara (11)
- # clerk (114)
- # clj-kondo (18)
- # cljdoc (37)
- # clojars (7)
- # clojure (24)
- # clojure-austin (10)
- # clojure-europe (27)
- # clojure-nl (1)
- # clojure-norway (23)
- # clojure-uk (2)
- # clojurescript (18)
- # conjure (2)
- # core-async (6)
- # cursive (21)
- # datomic (3)
- # fulcro (15)
- # introduce-yourself (7)
- # lsp (32)
- # malli (57)
- # meander (5)
- # music (1)
- # nbb (2)
- # off-topic (17)
- # pathom (6)
- # rdf (4)
- # reagent (8)
- # releases (2)
- # shadow-cljs (4)
- # slack-help (23)
- # spacemacs (6)
- # tools-build (32)
how to print nested list in hiccup? I have found this function https://gist.github.com/semperos/807755/8c0405b38cc3f8aac276aa2b02d302f6789b6ee4 but Im looking for something simpler
Unclear what exactly you want. You can just nest the :ul
and :li
elements appropriately:
[:ul
[:li "Item 1"]
[:li "Item 2 with sub-items"
[:ul
[:li "Sub-item 1"]]]]
is it possible to use clojurescript as a "scripting language" in the sense of running node and supplying a cljs file directly instead of a compiled js file? i know babashka exists but i'd rather explore my options first, and my primary target is node
This is perfect. It's exactly what I wanted for running scripts. Thanks you two! I only saw the native binary babashka and somehow missed this one 🙂
why is there helix and uix ?
At the very least, different approaches. The former uses macros to create code that AFAIK would be pretty much what an analogous JSX code produce. The latter uses Hiccup to generate React elements at run time.
Here's my take:
> Old react was object based and verbose to use. so reagent
made it much easier to use, then re-frame
wrapped around reagent
to provide a framework for it.
>
> However, react
modernised and created hooks, so a thin wrapper around react (like uix
and helix
) is all that is needed now. There is no framework (like re-frame
) for uix/helix, so projects have to implement their own structure or use something like integrant
(in frontend ClojureScript). Using uix allows you to use the existing react
ecosystem easily from ClojureScript and easily create modular/reusable frontend code.
I planned on extending this with at least a bit of meaningful detail, but got distracted by totally unrelated things. Since others have jumped in already, here is just the short-and sweet (and slightly-sarcastic) response I was starting with: Because https://github.com/lilactown and https://github.com/roman01la each had separate ideas on how React should be integrated with ClojureScript?
It's a Lisp thing. Half the people who discover Lisp immediately start work on their own implementation. In C.
There's also a UIx2: https://github.com/pitch-io/uix I believe v2 also uses macros, like helix. I'm not sure of the status of v1 vs v2.
the curse of Lisp is to blame for everything :) I recall both me and Will started working on our implementations around same time, back then it ended with hx and uix libraries, later hx transitioned into helix and uix went through a complete rewrite which is now uix v2 As for differences, I’m not sure about details, both libraries are pretty minimal, perhaps different syntactically, both are used in production. Pick yours and become a part of the curse :)
I know that Helix provides a bit of syntax sugar to make things nicer to use @U4YGF4NGM correct me if I’m wrong Oh, and uix can render on JVM, some people found it useful
I’ve even made my own some time ago https://github.com/tatut/koukku (not suggesting anyone use that for real work)