This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-02-03
Channels
- # announcements (2)
- # atom-editor (1)
- # babashka (6)
- # beginners (49)
- # calva (39)
- # clj-kondo (20)
- # clojure (41)
- # clojure-australia (1)
- # clojure-europe (33)
- # clojure-germany (8)
- # clojure-italy (2)
- # clojure-losangeles (1)
- # clojure-norway (3)
- # clojure-spec (5)
- # clojure-uk (48)
- # clojurescript (147)
- # conjure (24)
- # core-logic (1)
- # datahike (6)
- # datomic (14)
- # emacs (10)
- # events (1)
- # fulcro (11)
- # garden (1)
- # girouette (2)
- # honeysql (16)
- # jobs (3)
- # kaocha (3)
- # malli (5)
- # meander (7)
- # off-topic (49)
- # pathom (50)
- # portal (3)
- # reagent (4)
- # reitit (7)
- # rewrite-clj (3)
- # ring (3)
- # sci (4)
- # shadow-cljs (46)
- # spacemacs (10)
- # sql (3)
- # tools-deps (57)
build status: đ
What would you use for serverside rendering of HTML if performance ins important? I am seeing Selmer and Hiccup being used, but also rum being an option for SSR (and claiming to be faster than hiccup).
Currently in production with Selmer -- you can turn page cache on or off as well. I have also used Rum SSR because of a dynamic cljs app and wanted the SSR for SEO and for the perception of very fast page loads -- it works đ i don't think it's very hard to be faster than hiccup xD and it's unclear if selmer is faster than rum but the {% inject a variable into the page %} notation is very helpful to selectively render components. if you are building an SPA and also want SEO benefits for pages, rum is the way to go, if you are just doing html / low dynamism then selmer is recommended by me. Don't know about htmx.
Thanks for the perspective, @U3ES97LAC!
you got it. rum is excellent for spa and the fact that it can do SSR correctly without much difficulty is very nice -- of course, the components have to be identical in order for dynamic loading of components to work -- so aside from making sure the rendered HTML from the js object [cube, sphere, saltwater code tentacle creature] and the SSR'd version are abso-flippin-lutely the same, it's a joy for SPA w/ SSR. [single page apps with sever-side rendering, for the casual reader]
i would be very surprise if any of them is faster than Selmer also be aware that hiccup doesnât have a good story against XSS.
and between selmer and rum, do you need really need react? I think Selmer with a bit of https://htmx.org/ can take you far. Thatâs the choice we made a couple of weeks ago at least đ
Thanks! You can use rum entirely on the backend like hiccup, without any React: https://github.com/tonsky/rum#server-side-rendering But itâs more of a niche
Me neither, Iâm trying SSR with progressive enhancement, so HTMX also looks promising, thanks! And Iâm also leaning towards Selmer, doing most of the templating in HTML is really appealing
i know, we also checked rum, but decided to go with a traditional template engine as we had to have designers touch the templates
at the end our pages are not so dynamic, if we would have go with hiccup like syntax we wouldnât really gain much.
The thing I liked about hiccup is consistency in the markup, Iâm often âvisually overwhelmedâ when mixing markup with tags. Having everything as Clojure code sounds nice, but in the end, itâs not easy to read a whole document written in Hiccup, either

@orestis yes, but itâs been in alpha for quiet some time. Not really sure if itâs evern going to be released.
I developed some internal tools using hiccup mainly because I could use the REPL on a production server đ
Selmer isnât yet but often a str/replace works just as well for me, for templating
Sorry if this question is unrelated to Clojure. But I think I can find the answer here. Please don't me if this question is not suitable. ⢠Because I am not living in the USA or study at Stanford or similar university, or similar education system. I wonder what demands a normal top school's students need to achieve to become a junior engineer or computer science. ⢠This picture make me confuse, so what we need 200-300 is minimum requirement course to become junior engineer or 300-400/or even 500-600 (?) ⢠I am confusing that what is the different between undergraduate and graduate. Is graduate is belong to the level of doctor/master or still in bachelor level ?. ⢠( I am understanding that doctor/master degree is a higher academic level compare with bachelor.) ⢠I try to googling about this problem several hours it seem complex than I think.
The first digit of a CS course number indicates its general level of difficulty:
0-99 service course for non-technical majors
100-199 other service courses, basic undergraduate
200-299 advanced undergraduate/beginning graduate
300-399 advanced graduate
400-499 experimental
500-599 graduate seminars
In the USA at least, it is typical to finish high school at about age 17 or 18, and that is often the youngest that one begins attending college or university. The most common is to attend for 4 years, which if you complete the requirements you graduate and get a bachelor's degree. Many people stop there and get a job. Some immediately (or several years later) take graduate-level classes with the goal of achieving a master's degree (usually 2 to 3 years of class work, and sometimes writing a master's thesis or doing a project is a requirement for some master's programs). A smaller fraction continue on to get a doctorate degree.
People who do not have a bachelor's degree yet are called undergraduates. People who have a bachelor's degree, but not yet a master's or doctorate degree, are called graduates.
That exactly a perfect answer I need. Oh god... thank you very much.
It'd be nice if people would choose less of Selmer and Enlive and more of https://github.com/weavejester/comb and https://github.com/Flamefork/fleet. Methinks.
If you need to work with UI/UX folks and they need to be able to read/edit your HTML templates, picking Selmer makes a lot of sense since "Django-style" templates are a lot more accessible to those folks than either Comb or Fleet.
@U04V70XH6 Same with styling. Styling via the programming language removes any UI/UX person from being to work on the application / web site
DHH on Bascamp UI people doing some level of programming: https://youtu.be/OltCr8AWpWw?t=657
comb also works from source with babashka. I once did a port of the Clojure Toolbox which uses babashka instead of ruby: https://github.com/borkdude/clojure-toolbox.com-babashka
@claudius.nicolae whatâs their advantage?
plain clojure templating; same arguments as smarty vs plain php templates, whatever vs ERB, whatever vs EJS
Thanks for sharing, did not know of these
On my projects, I'm using cljstache
as it works with moustache, which a lot of frontender's know.
Beyond <embedded lang x> I only tolerate mustache - because it's generality, and generally avoid it too. And hiccup - hiccup is a good thing.
I use hbs because we have some handlebar templates lying around. But Iâm converting some of those to hiccup so I can make components đ
If you need to work with UI/UX folks and they need to be able to read/edit your HTML templates, picking Selmer makes a lot of sense since "Django-style" templates are a lot more accessible to those folks than either Comb or Fleet.
I have my home PC and my work laptop hooked up to the same three monitors, the laptop has a docking station that has some USB ports so I plug my keyboard and mouse into that hub when I use laptop, then unplug them and plug them into PC when I'm finished with work. I also have to go hit the input buttons on the three monitors as well. Is their a simpler way that I Can reduce this down to pushing one button and not moving dongles?
Yes. You're looking for a KVM switch. I got one for $36 and it does exactly what you're describing. One button and everything switches
You're welcome. I should note that my purchase was for a single monitor kvm. Three may be more expensive đ
canât recommend https://symless.com/synergy enough
Also annoying if I've been on work laptop all day and I switch keyboard back to my PC (Ubuntu) and it's on the lock screen, it doesnt' always recognise the keyboard is plugged in, so Ihave to plug and unplug it a few times...
In the good old days there used to be KVM switches, but I donât know how reliable that is in the newly digitized world
I donât currently have a need for it, but this https://mtlynch.io/tinypilot/ looks kind of interesting. Would have to make sure security is up to snuff tho.