HNHacker News
TopNewBestAskShowJobs

skgough

200 karma · joined October 25, 2019

submissionscomments
skgough··on SVG: The Good, the Bad, and the Ugly (2021)
Usually when I have to use text in SVG I give up and use HTML in a <foreignObject> [1] tag. The article mentions that SVG is in an awkward halfway point between being useful for humans or a compile target for vector graphics. Text is where this becomes really obvious. Trying to generate SVG with <text> elements in it that end up where you want them is hopeless, especially if you don't know what font the text will be rendered in. I prefer specifying the x,y, width,height of a box that HTML goes into in a <foreignObject> tag and letting the browser reflow the text as necessary within that space. But that's still often not perfect, and I have run into browser incompatibilities when doing any more than basic CSS rules on the HTML inside.

[1] https://developer.mozilla.org/en-US/docs/Web/SVG/Element/for...

skgough··on The Rust calling convention we deserve
related, I thought the minimap was using the CSS element() function [0], but it turns out it's actually just a copy of the article shrunk down real small.

[0] https://developer.mozilla.org/en-US/docs/Web/CSS/element

skgough··on Activating Browser Modes with Doctype
I wonder how the Ladybird [0] project handles Quirks mode. Since it's more of a hobby project, it might not be fun to get pages designed for IE6 running well in Ladybird. I'm fine with that, especially as time goes on and less and less of the well-trafficked web is using these old undefined behaviors. Perhaps now would be a good time to start working on projects to build an HTML5 compatibility layer around the old stuff, kind of like the Ruffle [1] project.

[0] https://ladybird.dev/ [1] https://ruffle.rs/

skgough··on After Appalachian hospitals merged, their ERs became much slower
The line we (Johnson City) were sold is that these hospitals would have gone out of business if they didn't consolidate.
skgough··on Ludic: New framework for Python with seamless Htmx support
Airium is close: https://gitlab.com/kamichal/airium
skgough··on Ask HN: Do you also marvel at the complexity of everyday objects?
I will sometimes look at certain products and think about the labor involved to make them. Especially things that are packaged such that you know somebody in China or Indonesia was sitting there 10hrs+ a day to put on the zip ties or put something in a plastic bag. This sometimes influences my decision to purchase those things.
skgough··on Genetically engineering koji mold to create a meat alternative
I hope this is where sustainable agriculture focuses it's attention in the future. Genetically modifying more energy-efficient organisms to be nutritionally useful to humans, while having free reign to make them taste however we want, seems like the way to go to me, instead of trying to grow beef in a lab. Lab-grown meat solves the ethical issues, but I imagine for a while it will be prohibitively expensive for the people who need nutritious food the most, while also being very energy-intensive to produce.
skgough··on Care
The view transitions API addresses this: https://developer.mozilla.org/en-US/docs/Web/API/View_Transi...
skgough··on Plasticity: CAD for Artists
There are two aspects of CAD that are very technically complex: parametric modelling and constraint solving.

Parametric modelling is similar to 2D vector graphics formats in that instead of defining where vertices are placed in a coordinate space, it builds the model based on an instruction set that includes primitive shapes like circles but can also include complex curves defined using splines (NURBS)[0].

Constraint solving is a way of mathematically deriving the possible shapes an object can take based on the geometric constraints applied to it. For example, a 2D equilateral triangle could be defined by setting the length of one edge and then constraining all edges to be of equal length. The coordinates of the vertices are derived from these constraints.

SolveSpace [1] is an open source parametric modeler with a constraint-based solver that you can explore if this is something you're interested in.

[0] https://en.wikipedia.org/wiki/Non-uniform_rational_B-spline [1] https://solvespace.com/index.pl

skgough··on Behind the design: A deep dive into Aptos
It seems that neo-grotesques have fully supplanted the humanist typefaces in modern designs, with Aptos joining Inter and San Francisco. I wonder if Microsoft will replace Segoe at some point.
skgough··on The internet turned into a crowded mall. Now you need a corner shop
I think the big difference now is how these sites stay alive. Now that we know things like Nebula or Kagi can work using a paid model, more of these types of user-supported communities will pop up. What's interesting about this, I think, is that in order for places like these to collect enough users to support themselves, the creator class of the community will have to become famous on one of the free-to-publish communities, like Twitter or YouTube, and then encourage their fans to come with them to the paid community. I imagine at some point YouTube and Tiktok et al will start restricting these types of promotional material to retain users, which is not fun to think about.
skgough··on In loving memory of square checkbox
I also think the visual idiom doesn't hold up, especially since implementers don't use radio buttons correctly half the time. To help people get the idea that they are possible choices for the same attribute, I like to wrap them in a <fieldset> with a <legend> that explains what their [name] attribute is associated with. I think this is how Win95 did it back in the day too
skgough··on Asking your customers what they want doesn't work
If people knew how to solve their own problems they wouldn't be giving you their money. I know there's a modicum of technical ability necessary to do certain things with computers, but for the most part, those can be solved by following rules and creative use of Excel.

The value comes from giving people a framework to solve their problems, doing the thinking for them while accounting for the edge cases that they didn't get to, and then compiling that system of rules into a program.

skgough··on Freeaim VR Shoes
This technology is called galvanic vestibular stimulation and I found a relatively recent paper that actually tried to reduce VR motion sickness using it

https://ieeexplore.ieee.org/document/9714040 https://youtu.be/z91PZpejFeE?feature=shared

Pretty neat

skgough··on Freeaim VR Shoes
I remember a video years ago that showed a device you put on your head that could affect your balance using electrical signals directed at your inner ear. They were demoing it in this news report as a human remote control sort of thing. You could control the direction the people wearing it were walking using a wireless joystick. I want to say everyone was Japanese but they could've been from anywhere in Asia. Hopefully somebody can dig it up.

I wonder if there has been any progress on increasing the capabilities of that system. It could just be another component attached to the HMD. I bet as it is now though, even with improvements, it would make you sick, which VR already has trouble with.

skgough··on I Love Ruby
I always understood the question mark to mean that the method returns a boolean value, eg. the include? method on Arrays returns a bool.
skgough··on Behavior belongs in the HTML
I personally like the separation of concerns that HTML/CSS/JS evangelizes and I feel like it lines up well with how the old school MVC frameworks want you to think about things.

I think a good middle ground here is that HTML web components article that was shared here a few weeks ago: https://gomakethings.com/html-web-components/

I like this because it's still fairly low-code but you get cool stuff out of the box like attributeChangedCallback. You don't have to mess with build tools, which is what I like the most about this strategy. I can just drop these components into my Rails views like any other element, and their custom functionality gets mounted up as soon as they get folded into the DOM. No more document.querySelectorAll(".foo-bar").forEach(foo => bar()). Much cleaner, and the intent is more clear too. With <foo-bar>, it's much more obvious that the element has scripting attached to it than <div class=”foo-bar">.

skgough··on Mirage – A programming framework for building type-safe, modular systems
The FAQ mentions that this can run in QEMU. Are there cloud providers that support hosting a custom ISO? I feel like that would be hard to secure.
← PreviousPage 2 of 2