off-topic

https://github.com/clojurians/community-development/blob/master/Code-of-Conduct.md Clojurians Slack Community Code of Conduct. Searchable message archives are at https://clojurians-log.clojureverse.org/
lread 2021-02-03T01:17:15.452900Z

And upcoming happy birthday to all the soon to be 40 year old youngsters out there! 🎉

➕ 1
sova-soars-the-sora 2021-02-03T04:56:09.454200Z

build status: 🎉

javahippie 2021-02-03T07:24:46.457200Z

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).

sova-soars-the-sora 2021-02-10T04:43:05.208500Z

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.

javahippie 2021-02-10T08:10:43.209100Z

Thanks for the perspective, @sova!

sova-soars-the-sora 2021-02-10T20:25:37.226400Z

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]

2021-02-03T07:41:43.459300Z

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.

2021-02-03T07:44:32.461900Z

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 🙂

javahippie 2021-02-03T07:46:39.463900Z

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

2021-02-03T07:46:45.464200Z

but i am kid from the 80s, never really to into SPAs

javahippie 2021-02-03T07:47:48.465900Z

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

2021-02-03T07:48:22.466700Z

i know, we also checked rum, but decided to go with a traditional template engine as we had to have designers touch the templates

2021-02-03T07:50:21.468700Z

at the end our pages are not so dynamic, if we would have go with hiccup like syntax we wouldn’t really gain much.

orestis 2021-02-03T07:52:24.470700Z

Hiccup has a 2.0alpha which fixes the XSS hole

javahippie 2021-02-03T07:52:53.472Z

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

1
2021-02-03T07:53:09.472600Z

@orestis yes, but it’s been in alpha for quiet some time. Not really sure if it’s evern going to be released.

orestis 2021-02-03T07:53:15.472800Z

I developed some internal tools using hiccup mainly because I could use the REPL on a production server 😉

borkdude 2021-02-03T07:54:21.473700Z

Hiccup (alpha) is now also part of babashka.

borkdude 2021-02-03T07:55:00.474600Z

Selmer isn’t yet but often a str/replace works just as well for me, for templating

borkdude 2021-02-03T07:56:46.476600Z

We do use selmer in our production app. Also for email templates

nhanclassroom 2021-02-03T08:20:02.480Z

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

clyfe 2021-02-03T09:00:21.481800Z

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.

borkdude 2021-02-03T09:05:22.482700Z

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

2021-02-03T09:24:17.483600Z

I wasn’t aware of Fleet. Looks useful

2021-02-03T09:26:19.484300Z

@claudius.nicolae what’s their advantage?

clyfe 2021-02-03T09:27:25.485400Z

plain clojure templating; same arguments as smarty vs plain php templates, whatever vs ERB, whatever vs EJS

👍 2
2021-02-03T09:27:43.485800Z

actually enlive is somethig our designers would love 🙂

Mno 2021-02-03T09:31:08.486700Z

Today I learned there's more than Selmer and hiccup 😅

javahippie 2021-02-03T09:36:35.487100Z

Thanks for sharing, did not know of these

dharrigan 2021-02-03T09:39:06.488500Z

On my projects, I'm using cljstache as it works with moustache, which a lot of frontender's know.

dharrigan 2021-02-03T09:39:23.489Z

Tis rather good.

clyfe 2021-02-03T09:40:48.489700Z

Beyond <embedded lang x> I only tolerate mustache - because it's generality, and generally avoid it too. And hiccup - hiccup is a good thing.

2021-02-03T15:34:22.493100Z

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.

👀 1
🎉 1
2021-02-03T15:34:59.493300Z

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.

orestis 2021-02-03T15:45:57.494Z

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 🙂

nhanclassroom 2021-02-03T16:09:17.494300Z

That exactly a perfect answer I need. Oh god... thank you very much.

emil0r 2021-02-03T21:44:29.498300Z

@seancorfield Same with styling. Styling via the programming language removes any UI/UX person from being to work on the application / web site

clyfe 2021-02-03T22:01:37.498500Z

DHH on Bascamp UI people doing some level of programming: https://youtu.be/OltCr8AWpWw?t=657

2021-02-03T23:15:16.001800Z

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?

2021-02-04T09:14:28.009700Z

can’t recommend https://symless.com/synergy enough

2021-02-04T09:14:51.010Z

you don’t need to press any button, it just works 🙂

2021-02-03T23:18:23.002700Z

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...

2021-02-03T23:18:29.002900Z

There has to be a better way.

2021-02-03T23:33:46.003400Z

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

aaron-santos 2021-02-03T23:33:56.003500Z

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

2021-02-03T23:34:26.003700Z

Thanks! Didn't know of KVM switch

aaron-santos 2021-02-03T23:36:29.003900Z

You're welcome. I should note that my purchase was for a single monitor kvm. Three may be more expensive 😄

lread 2021-02-03T23:49:01.005300Z

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.

👍 3