• 0 Posts
  • 68 Comments
Joined 1 year ago
cake
Cake day: June 21st, 2023

help-circle
  • As someone who has done a lot of distro hopping in the past, I’ve found that going for a stable release that is widely used as a daily driver is superior for gaming than “gaming specific” linux distros, largely on the basis that the gaming distros have routinely had buggy UIs, driver issues, and a variety of unexpected and undesired behavioral problems tied to the array of “gaming adjacent” software installed, most of which you can install yourself with little to no effort and most of which you probably don’t want or need in the first place.





  • I’ve heard nothing but good things about HTMX

    I’ve only ever heard anything “bad” about HTMX and it was here on Lemmy, actually. I ran into someone who was absolutely certain that HTMX was unsafe by design because it leveraged HTML over the wire and was therefore susceptible to HTML injection attacks, specifically by injecting malicious scripts that could be ran from domains you didn’t control. I tried explaining that proper utilization of access-control headers innately prevented this because they worked on the browser level and couldn’t be intercepted or interfered with by HTML injection by design, but he kept insisting it was unsafe while refusing to elaborate. He was very wrong, of course, but also very confident.






  • I’ve heard similar from the worst first year CS students you could ever meet. People talk out their ass without the experience to back up their observations constantly. The indentation thing is a reasonable heuristic that states you are adding too much complexity at specific points in your code that suggests you should isolate core pieces of logic into discrete functions. And while that’s broadly reasonable, this often has the downside of you producing code that has a lot of very small, very specific functions that are only ever invoked by other very small, very specific functions. It doesn’t make your code easier to read or understand and it arguably leads to scenarios in which your code becomes very disorganized and needlessly opaque purely because you didn’t want additional indentation in order to meet some kind of arbitrary formatting guideline you set for yourself. This is something that happens in any language but some languages are more susceptible to it than others. PEP8’s line length limit is treated like biblical edict by your more insufferable python developers.



  • Yeah, but it’s still a Ship of Theseus problem. If you have a ship and replace every single board or plank with a different one, piece by piece, is it still the same ship or a completely different one, albeit an exact replica of the original. It’s important because of philosophical ideas around the existence of the soul and authenticity of the individual and a bunch of other thought-experimenty stuff.



  • I’m not. Universities aren’t places of open or free learning. They’re deeply invested in capitalism and benefit greatly from intellectual property laws. In fact, most universities function largely as state subsidized pipelines that take people without a viable, real world skill set and turn them into people who still don’t have a viable real world skill set, but who do have a piece of paper telling corporations that they’re able and willing to put up with complete bullshit, general mistreatment, and dull, grueling labor for years without incident. Which is good enough for your typical middle-class wage slave and whatever they might want to do.




  • This is the only realistic answer. Corporations have effectively decided that the future of the web is closed source proprietary javascript bloatware apps that are all functional skinner boxes. Many people, especially young people, have no clue how to use an actual computer. It’s “click the bubble to make it pop and give us your mom’s credit card number to unlock super premium bubbles.” That’s the future of the internet. But probably worse.



  • rwhitisissle@lemmy.mltoProgrammer Humor@lemmy.mlSingle-Page Application
    link
    fedilink
    arrow-up
    2
    arrow-down
    1
    ·
    edit-2
    5 months ago

    This demonstrates a profound misunderstanding of HTMX, and how websites in general operate. So much so that I would not hesitate to describe this as somewhere between a baldfaced lie and just malicious incompetence. You can’t “invoke logic via HTML attributes,” but you can describe it. HTMX is a client side javascript library that parses custom elements you define in your HTML and uses the data described by them to initiate AJAX calls via the fetch() or XMLHttpRequest browser APIs, which CSP explicitly covers via the connect-src directive: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/connect-src. It’s literally just a javascript library that parses HTML and uses it to parameterize AJAX calls. If HTMX were somehow able to bypass CSP, then every single piece of clientside JavaScript in the world could violate it.


  • “Wow, these screen doors really suck. I’ve stuck them on my submarine, but they just don’t keep the water out at all. Some people are going to say that I’m a fucking moron and don’t understand the technology I use or that I’m too goddamn lazy to actually take the necessary steps to keep water out of my submarine, but I know they’re wrong and it’s the technology’s fault.”

    In all seriousness, HTMX is a tool designed for a specific job. If you have an API that has either non-parameterized endpoints to hit or an endpoint that accepts a single integer value or UUID or…whatever to perform a database lookup and return stored values to be interpolated into the HTML that endpoint returns, then, great, you’ve got a lightweight tool to help do that in an SPA. If you’re using it to send complex data that will be immediately and unsafely exposed to other users, then…that’s not really what it’s for. So, I think the core issue here is that you don’t really understand the use case and are opposed to it because to use it in a way that is beyond or outside the scope of its established convention is unsafe without extra work involved to guarantee said safety. It also implies you are running a website with a content security policy that either explicitly allows the execution of unsafe inline scripts or which does not care about the sources to which a script connects, which is the only way you could realistically leverage HTMX for malicious ends. So, ultimately, the choice to not adopt comprehensive security measures is one you are free to make, but I wouldn’t exactly go around telling people about it.