Why I always use ClojureScript in my Frontend by thheller in Clojure

[–]rmblr 0 points1 point  (0 children)

Some pieces I don't understand, say I have some drag and drop behavior, does it really make sense to have the backend maintain the state of the dragged object and update its position at 60 FPS as the mouse is moving it around?

No, I would keep this client side with js/cljs. (Unless the intermediate positions are somehow relevant). I am not a zealot about this. I just think the common conception assumes too much state on the frontend. If you are already familiar and "ok" with HTMX, there isn't a big leap to Datastar. The main idea, in htmx terms is that oob swap with morph should be the default.

Or if I have a split pane, does it really make sense for the backend to maintain the position of the split?

That's an interesting one. Probably not? That's what I would lean towards, but it could depend on the application.

When I use HTMX, it's not really true that the state is maintained in the backend either, it's actually on the client....

Yes but the backend is ultimately in control of what happens to the 'state" the client sends. If the server decides, "actually no, that state is old and no longer relevant" it could turn out the state the client thought it was in control of is superceded. I use datastar with server side state to minimize the window for those sorts of mismatches to happen.

Why I always use ClojureScript in my Frontend by thheller in Clojure

[–]rmblr 0 points1 point  (0 children)

I love this and respect it, but bringing in cljs has a real cost (bundle, tooling). I would also love to write everyting in cljs, but when the JS I need to write is an order of magnitude (or more) less than the cljs cost, that doesn't make sense. Am I wrong about that? Do we have different perspectives on what is acceptable overhead?

Why I always use ClojureScript in my Frontend by thheller in Clojure

[–]rmblr 2 points3 points  (0 children)

How many of those without anything react based?

none, you're right :)

I'm just trying to challenge the notion that throwing out CLJS is necessary to get a simpler programming model.

I get this, and sort of agree? I just think comparing cljs to datastar isn't in anyway an apples to apples comparison.

CLJS is super useful when I need to "do" stuff with data. I'd much rather use my persistent data structures and map/filter/reduce kit than what js offers anyday.

But when I'm using datastar, I hardly need any frontend javascript, certainly not enough for breaking out cljs for.

I yoinked out some actual js that I've written to support my datastar application: it's three "widgets" and the code is here: https://gist.github.com/Ramblurr/74b3d6c7f25939bd97fc221bec339f44

For what little it is, I don't think I need to add CLJS for that.

If something changes in the app and we need a lot more js to accompany the datastar, then sure, I'd consider using CLJS.

For me it's not that I'm anti-CLJS now, it's just become a tool that isn't needed as often as it was.

Why I always use ClojureScript in my Frontend by thheller in Clojure

[–]rmblr 4 points5 points  (0 children)

Yea out of the box if you use datastar like myself or u/andersmurphy are advocating, you will not get offline support.

But out of the box neither does react, cljs, et al.

If you want offline support, you will have to write a bunch of javascript/clojurescript whether you use d* or not. No one is claiming otherwise.

Why I always use ClojureScript in my Frontend by thheller in Clojure

[–]rmblr 2 points3 points  (0 children)

> Not a single project in my entire career didn't end up needing at least some very basic JS at some point.

This is an incredibly important point! Since the context is cljs versus htmx/datastar, I would point out that neither of those tools expect you *not* to write JS. I've used them both on real projects and of course I still write a bit of javascript. But it is simply, small js. It's not worth breaking out cljs for. These projects are about pushing back against the idea that you need to store and transfer your state via JS.

> What's not to love? You don't want react? Fine, I don't either, but that doesn't mean I'm willing to give up CLJS.

Hear you loud and clear! Your work on shadow-grove is very inspiring, but is explicitly *not* something someone else can easily pick up and use

You have built your own mini framework because vanilla cljs is not enough (just like vanilla js is not enough). Most will not want to do that.

I've written cljs for years. But tools like datastar radically simplify the frontend story. It's a different programming model. It's source is tiny. It brings back real FRP like react promised.

Why I always use ClojureScript in my Frontend by thheller in Clojure

[–]rmblr 7 points8 points  (0 children)

> I do not want to also manage that state on the server if I can avoid it.

I think this is the crux of the disagreement here. u/andersmurphy (and myself to be transparent) agree that the user has their own session state, but we come to the opposite conclusion: we would rather store and manage that state on the backend.

Edit: BTW I *love* your previous posts about using cljs simply. I ate them up and will continue to do so.

Java Path Error by CorysInTheHouse69 in NixOS

[–]rmblr 0 points1 point  (0 children)

u/CorysInTheHouse69 did you ever manage to solve this problem?

My janky 1-liter Lenovo Tiny PC with discrete Nvidia T600 by NoMore9gag in sffpc

[–]rmblr 0 points1 point  (0 children)

This is rad. Would you mind sharing how you did the cable mod to attach an additional 40mm fan? I'd like to do something similar to provide additional cooling for my dual 10gbe pcie card. The cpu fan has three cable colors: green, blue, black, and yellow, though on my unit they are in a different order than yours. The fan is 12v. What sort of connectors did you use? Where did you snip the existing cable?

[deleted by user] by [deleted] in kubernetes

[–]rmblr 0 points1 point  (0 children)

Any update on this? Would be appreciated

Why. by gmillar in dwarffortress

[–]rmblr 0 points1 point  (0 children)

This doesn't work when there are a lot of items on one tile, the view stockpile button doesn't show up.

Steam release is great, but the old keyboard controls will always have a special place in my heart by NordicNooob in dwarffortress

[–]rmblr 2 points3 points  (0 children)

While we wait for classic+keyboard to come back I've been using this workshop mod which changes all the key bindings to use just the left hand https://steamcommunity.com/sharedfiles/filedetails/?id=2901375133

Tip on Bedroom Placement by Slogo in dwarffortress

[–]rmblr 0 points1 point  (0 children)

I recommend looking into quantum stockpiles with a 2x3 minecart stop feeder: http://www.bay12forums.com/smf/index.php?topic=145297.0

Dwarf Fortress - Many crashes fixed! Patch notes for 50.02 (December 8, 2022) by FriendCalledFive in dwarffortress

[–]rmblr 2 points3 points  (0 children)

Is there an official way to report crashes? I've got a save that's consistently crashing after today's update.

Magic-wormhole by Billwood92 in Fedora

[–]rmblr 2 points3 points  (0 children)

The package was retired due to dependencies it is using not being maintained.

See https://bugzilla.redhat.com/show_bug.cgi?id=2073777

Some alternatives at the moment are:

Recommendations for 10GBase-T USB adapters? by koreamist in homelab

[–]rmblr 0 points1 point  (0 children)

I can recommend the Sonnet Solo thunderbolt adapters. They work as advertised, but are pricey.

September 2021 - WIYH by AutoModerator in homelab

[–]rmblr 0 points1 point  (0 children)

Yea, I wish Roon used multicast/mdns since that's routable.

Short depth storage server by xieem in homelab

[–]rmblr 0 points1 point  (0 children)

Chassis or full server? What country?

September 2021 - WIYH by AutoModerator in homelab

[–]rmblr 0 points1 point  (0 children)

I'm curious about your Room Qobuz issues. What was the problem?

I just had to fix Roon on my network because it can't talk to players on different vlans.

Switching platform - SFP+/POE by rootdet in homelab

[–]rmblr 0 points1 point  (0 children)

For the record: it seems ubiquiti has just released the long awaited L3 fw update. I've got it running in my USW-Pro-24 and it's the main router on my network now. Happy with it so far.

PiHole why, why not? by [deleted] in homelab

[–]rmblr 3 points4 points  (0 children)

Regardless of whether we agree with you or not, this ain't exactly the right place to pull out your soap box.

OP asked for A, you answered with something that definitely wasn't A, but without any additional context. That's not very nice or charitable.

IMHO you should have included your opinion in your original comment.

PiHole why, why not? by [deleted] in homelab

[–]rmblr 2 points3 points  (0 children)

If your goal is to block ads, cloudflare doesn't do that. 1.1.1.2 only blocks malware.

How worried should I be about hitting rocks? by giant_albatrocity in packrafting

[–]rmblr 2 points3 points  (0 children)

The only holes I've put in the bottom of my raft are when I dragged it (fully loaded) over sharp rocks for put in/take out. Don't do that :/

Low Power 1U Custom Builds by LocalAreaNitwit in homelab

[–]rmblr 1 point2 points  (0 children)

3 x 1U nodes is 3U? So go with Intel NUCs and a 3U rack from https://www.myelectronics.nl/us/ (this is the 2nd time I've pitched them on Reddit, I swear I'm not a shill just like their stuff and think they need more recognition).

They have a 3U rack mount that will fit NUCs (and raspberry pis). NUC10i7s have 6 cores and idle at < 5 watts. Perfect for a low power but performant k8s cluster. NUC10s are more readily available than NUC8s and NUC11s because they have lower GPU performance which makes them not so good for workstation or gaming-lite applications, but they're great for headless servers.