• 0 Posts
  • 271 Comments
Joined 2 years ago
cake
Cake day: June 13th, 2023

help-circle
  • in your case the user list would be rendered by the server and the client wouldn’t care, it would receive a new rendered copy when you changed pages.

    it seems like their argument was all just sites that should have been fully static to begin with, and for some reason have made it sound like that’s the main use of SPAs. It’s a silly article and I wouldn’t change anything I’m doing based on it. if your site is a content based site(showing docs/articles/etc.) then you shouldn’t be using an SPA, especially just for page transitions. otherwise you have a valid use for an SPA and should continue regardless of these new APIs


  • briantoClojureWriting your tests in EDN files
    link
    fedilink
    arrow-up
    1
    ·
    14 days ago

    I’m not sure if I understand why. I like snapshot testing, but I’m not sure what you gain from using this dsl approach instead of a snapshot library and a more typical test framework, but there are some notable downsides:

    • you have to write typical tests in a different place from your snapshot tests. some things are more complex than “this value never changes”, you might just care about a property holding, it produces the same value for several different inputs, etc. properly capturing a big for a regression test is more than a snapshot
    • you lose editor tooling, I can’t just send tests to the repl from my editor, I don’t have autocomplete, etc
    • need edn serializers for all values you care about. seems easy enough to return a host language object without a proper representation
    • may just be me but I’m not a fan of the added levels of nesting


  • I have a GL.iNet GL-MT6000, works great. not sure about newer models but people generally seem to like their higher end ones

    it ships with almost vanilla openwrt, and it’s easy to install an upstream build if you’d like. the big advantage of GL.iNet is that it’s officially supported, so I’ve been able to send emails to support about openwrt stuff and they’ve been helpful

    AdGuard works great and is built in to their version, so you wouldn’t even need the separate device for pihole

    I also like supporting a company that supports oss software


  • NixOS, plasma rn but sometimes jump to sway. I’d say distro is more relevant. for the most part I just have an editor and a browser open, DE doesn’t change much about my workflow. NixOS definitely does though

    chosen by my team, company at large doesn’t care but it’s nice for everyone to be on something consistent. company devices

    NixOS is a nice balance of the two

    I generally just copy my personal setup, which I’ve spent a decent amount of time on, but because I enjoy it

    not particularly, but nix supports all of the big ones

    language and stack a little bit, it’s all stuff that has good integration with nix. we deploy nix containers and then have consistent environment everywhere without having to work in a container. my team is a pretty standard team maintaining some full stack web stuff


  • briantoProgrammingThe Jank programming language
    link
    fedilink
    arrow-up
    1
    ·
    22 days ago

    idk if clojure has really faded though. some dialects have done well (jvm, js) and some haven’t gotten much use (go, clr), but it feels like a reasonable path. there’s a good chance you can tap into a decent chunk of the existing clj ecosystem too



  • I feel like it’s probably not a high priority, but the company I worked at that selfhosted gitlab was also paranoid about dependencies disappearing and so mirrored every repo they had a dep on.

    I imagine that’s not that rare of a situation and it would have been a nice qol kinda thing if we could have federated with the upstream and gotten a backup of issues and such and could do everything on the one platform. definitely not important and requires upstream to also federate, which will never happen for github so not important



  • I’m saying we weren’t taught when react was the way people wrote sites. if I was writing a site with pure html, css is great, especially modern css.

    but if I’m already using react and their abstractions, opinions on that part aside, I’d personally rather lean on the react component as the unit of reuse. tailwind removes the abstraction that you don’t need, since many people in react tend towards one scoped css file per component with classes for each element anyway

    at this point I’d be more inclined to say for many sites the api and data fetching things are the content and html+css is presentation. csszengarden is cool but I haven’t seen the html/css split help an end user, or really even me as a developer.


  • instead of using classes you just use whatever your ui library provides for reuse. stick a classname string in a variable and you have a class. use a component and it just contains all its styles.

    unless you mean that if you look in the inspector you see a mess of classnames. I don’t have a solution there


  • shadcn is the primary one for react at least. they’ve done a great job filling the space where you’re trying to build up a design system but don’t want to start from scratch, but they’re great if you just want prebuilt components too

    all the components build on something else like radix, and are pretty simple themselves. normally just the radix component with styles. Installing a component just copypastes the source into your project at configured locations.

    if you’ve ever fought against something like mui to get it to fit design changes or change specific behavior, shadcn is great. at some point the extension points of a library aren’t enough, but if you own all the code that’ll never be a problem.


  • briantoProgrammer Humor[ComiCSS] Benefits of Tailwind
    link
    fedilink
    arrow-up
    8
    arrow-down
    2
    ·
    1 month ago

    except we generally use higher level abstractions now, like component based frameworks. If you’re writing raw html with tailwind and no library you’re doing it wrong and css is a better fit.

    well written straight css ends up building it’s own tree of components. if you’re using react too you’re either only selecting a single component (inline styles but have to open two files) or writing good css (duplicating the component hierarchy in css).

    tailwind is just the former but better since it encourages using a projectwide set of specific sizes/colors/breakpoints and small scope, the two actual problems with inline styles after organization and resuse, which react etc solves.


  • you could look at the user agents and have 2 versions, one for normal browsers and one for Links and similar.

    you could also probably do something terrible with having an initial page that supports both, adding a cookie and detecting if the css file gets downloaded, then after that point serving them the css styled if they did or the table styled if not. you could even reload the page with js if it’s enabled and you detect the css was downloaded. this hinges on Links and similar not even downloading the css, which I’m not sure if is true.


  • even without hotswappable switches there’s a good chance you’d be able to replace the switch anyway

    if cleaning it doesn’t work, you should be able to look up how to desolder and then replace the switch yourself. you should only need a cheap soldering iron, some wick, some solder, and a new switch.

    as long as it’s easy to physically get the keyboard apart, the switches should be just about the easiest thing to solder there is





  • briantoProgrammer Humorexit
    link
    fedilink
    arrow-up
    5
    ·
    2 months ago

    repr is generally assumed to be side effect free and cheap to run, so things like debuggers tend to show repr of things in scope, including possibly exit

    also then it behaves differently between repl and script, since repr never gets run. to do it properly it has to be a new repl keyword I imagine, but I still don’t know if I’m sold on the idea