HNHacker News
TopNewBestAskShowJobs

turtledragonfly

914 karma · joined November 9, 2021

My company: https://festina-lente-productions.com/

email: contact@festina-lente-productions.com

submissionscomments
turtledragonfly··on The Pentium as a Navajo Weaving
Hello, fellow artist+programmer (:

What do you think of the quote: "Whatever you do will be utterly insignificant, but it is very important that you do it" ?

Personally, I think playing with little dreams is beautiful, but I do hope you find something that satisfies your soul.

In my experience, artistry and a bit of depression often go hand-in-hand. If you spend a lot of time paying attention to things, you're bound to notice the Abyss.

turtledragonfly··on Twenty Years of Valgrind (2022)
I like Valgrind, but day-to-day, I find myself typically reaching for Sanitizers[1] instead (ASan, et. al.), especially since they're built-in to many compilers these days, and are a bit faster IME.

Are there any use cases that people here have experienced where Valgrind is their first choice?

[1] https://github.com/google/sanitizers

turtledragonfly··on Ask HN: What are you working on (August 2024)?
That's pretty similar to what I'm doing!

The CPU builds an RPN expression (like "circle, square, union, triangle, subtract"), and the shader evaluates that in a loop.

I wasn't able to find examples of other people doing similar, but it seemed too useful to not be invented yet (:

Do you have any links to your work?

I'm writing some blog posts for my approach, but haven't finished them yet.

> You can tile up the screen to avoid having too many instructions per fragment.

I don't quite understand this part... If a given SDF needs N instructions to be evaluated, then how does tiling reduce N?

> performance may vary depend on what you're doing

Yeah, fill rate was not good enough with a straightforward approach, so I had to cache the evaluated distance values to a (float) texture atlas, then use those to render to screen. Luckily, standard bilinear filtering on distance values produces pretty decent results.

turtledragonfly··on Ask HN: What are you working on (August 2024)?
Am I right that the output of the lisp code is ultimately a plain GLSL shader (like one might find on shadertoy.com)?

I built a SDF-based rendering system (2D) for my game, and one of the big hurdles was how to have them be data-driven, rather than needing a new shader for each scene or object.

Would be curious if/how you tackled that problem (:

turtledragonfly··on On finishing projects
Fine I'll bite :Þ

Have a poorly-ordered braindump:

In my life, I've kindof developed a rule of thumb: if it's the more difficult path, it's probably the better path. That heuristic isn't always correct, but I find it to be pretty good. Problems can arise when I follow it blindly, though.[1]

I've just generally found that a lot of good things in life are on the other side of a barrier, and crossing that barrier usually involves effort and pain.

So, it starts to develop into an association of "if it's hard/painful, it's probably leading somewhere good." And that starts to develop into "seek out pain/difficulty."

Ironically, I'm also someone who values being comfortable in my own skin. But I feel more comfortable doing something painful for my own (masochistic?) reasons than doing something painful for an external goal.

----

I do feel like there's often an element of masochism in people who excel at some activity. Plenty of stories of top athletes or musicians etc. who do it for their own reasons, and not to win a trophy or acclaim. Getting good at something is generally a painful process of dealing with failure over and over. If you don't have a stomach for that pain, you'll give up. If you grit your teeth and force your way through it, you may become competent, but probably won't excel. If, somehow, you enjoy that pain and are drawn to it, then you will put in the hours to keep getting better and better, unboundedly.

But that's just one perspective.

The grandparent comment seems more like someone who likes to "keep their eye on the prize," whereas I'm more of a "do it because I enjoy[2] it" person. I suppose if you are motivated strongly enough by some external goal, it could push you through the hard times, too. And if the goal keeps moving, you might keep pushing, unboundedly, too. Not my path, though.

See also "Type 1,2,3 fun", eg: https://essentialwilderness.com/type-1-2-and-3-fun/ (definitions vary)

----

Also, I find taking a hard path is sort of a Great Filter for other people; there will be fewer others on that path (I'm fairly solitary, so it suits me), and what people there are will have something in common with me.

----

[1] When I hear about people trapped in abusive relationships, trying to "fix" it rather than leaving, I feel like I understand them somewhat. At the same time, some relationships are worth saving, even (especially?) in the hard times, so being able to navigate the pain rather than run away can a strength, too. Depends on the situation.

[2] with "enjoy" being somewhat perverse, at times (:

turtledragonfly··on Don't Believe the Big Database Hype, Stonebraker Warns
This article summarizes some takeaways from Stonebraker's paper “What Goes Around Comes Around…And Around…”[1]

For those unfamiliar with Stonebraker, he's a luminary in the DB field[2].

80 years old and still very active (:

[1] https://db.cs.cmu.edu/papers/2024/whatgoesaround-sigmodrec20...

[2] https://en.wikipedia.org/wiki/Michael_Stonebraker

turtledragonfly··on On finishing projects
> Better, I don't feel guilty about the stuff I don't finish.

I think this is key, and demonstrates the real personal growth, which is more valuable than being able to finish things per-se.

It's the old saw: "what's the hardest thing? To know oneself."

There's a lot of eagerness to jump on bandwagons and do whatever the motivational speakers recommend, but you're not going to find the answers specific to you until you look inside yourself.

Anyway, in short: I agree (:

I'd also add: the reasons and mindset can change not just from project to project, but from day to day as well. Very context-dependent (at least in my experience).

turtledragonfly··on Basic Mechanisms In Fire Control Computers (1953) [video]
I especially like the section on differential gears, demonstrating their use as computing units: (timestamped link) https://www.youtube.com/watch?v=gwf5mAlI7Ug&t=771s
turtledragonfly··on On finishing projects
> I start making more realistic plans and exit points because im not a masochist.

Or, you start to enjoy the pain, because you enjoy the result. But then your mind does its illogical associative thing and you start to just enjoy the pain on its own. Now you're a masochist!

I jest, but only some. Ask me how I know ...

turtledragonfly··on On finishing projects
Always glad to see articles discussing an emotional side of software development (:

I do disagree with this claim (though later points temper it a bit):

  Why is it important to share your work with the world? First, because
  there's practically no downside, and very, very high potential upside.
There is a big downside: as the author states, finishing/releasing is hard and time-consuming. You only get one life. Every hour spent doing that stuff you won't get back. So, not a direct cost, but an opportunity cost. Personally, I find it important to acknowledge this and face it head-on, rather than waving one's hands and saying "oh, there's basically no downside." Though I admit that the latter can be a useful self-mind-hack to get the ball rolling. But first you decide what you want to do, and why you want to do it, and then you tell yourself whatever lies you need to help it get done (:

The "why is it important..." question is really critical to motivation, at least for me. A person should give that question honest thought and an answer that rings true to them.

I agree about the therapeutic aspect of putting things out into the public.

  Though I don't plan to publicly share all of these proactively, just
  knowing that they're publicly viewable helps give me a stronger sense
  of accountability. I'm curious if it will make a difference.
Just getting things out of one's mind, and into the world (even if nobody sees them), can be important (helps my sanity, at least). Even just the "rubber duck" sense of imagining someone might see it, can catalyze thoughts in a way that wouldn't otherwise happen, too. Then, having people actually see them is another layer, and can be humbling and educational.

Also, apropos of nothing, this article made me think of the (mis-)quote:

  We do these things not because they are easy, but because we thought they would be easy!
Good article (:
turtledragonfly··on Designing (Procedural) Monsters (2021) [video]
I've been following this game from afar for some years now; cool to see the progress!

This is another, newer, video, showing combat: https://www.youtube.com/watch?v=9yr8MwW9yFI

Actually I'm kinda sad that it's a combat-based game. I was imagining something more interesting involving the procedural creatures than just making them fight. Maybe some RPG thing or cross-breeding idea. Oh well, it's still very cool tech and a nice visual style.

EDIT: Ah, it seems like it does have a breeding concept after all! https://www.youtube.com/watch?v=ohYIUxmxI-I

turtledragonfly··on Visual data structures cheat sheet
Ah, I was confused — this is a visual cheatsheet for various Data Structures. Not a cheatsheet for visual data structures. I was thinking it would all be about spatial partitioning and such :Þ
turtledragonfly··on The non-Riemannian nature of perceptual color space (2022)
For those interested in such topics, I'm a fan of the "Oklab"[1] color space.

It's not perfect, but well documented and discussed, has freely-available implementations, efficient shader code, etc. and overall works pretty well.

[1] https://bottosson.github.io/posts/oklab/

turtledragonfly··on Fast Lua Serialization (2023)
Lua has its own built-in low-level serialization, in the form of string.pack() and string.unpack()[1]. This is akin to Perl's pack()[2].

But note that this is a tool used for laying out bytes in a certain order (like a C struct), not a general "serialization framework" for traversing data structures and whatnot. But it can be the building block for one.

[1] https://www.lua.org/manual/5.4/manual.html#6.4.2

[2] https://perldoc.perl.org/functions/pack

turtledragonfly··on Ocean Gyre
Reminds me of this cool article, about sea turtles and the North Atlantic Gyre: https://www.fisheries.noaa.gov/feature-story/secret-route-se...

Apparently, many turtles spend some of their youth in the Sargasso Sea, in the center of the gyre, which has a lot of seaweed shelter and biodiversity, and is warmer. Then they leave when they're stronger.

turtledragonfly··on Veles: Open-source tool for binary data analysis
When these tools come up, I like to post my little list of similar tools, for those interested. Apparently it's a hobby of mine:

* fq - like jq for binary data: https://github.com/wader/fq

* Kaitai Struct - https://kaitai.io/

* visualizer, for the above: https://github.com/kaitai-io/kaitai_struct_visualizer/

* HexFiend - a hex editor, but with "binary templates" feature : https://github.com/HexFiend/HexFiend

* binary templates, for the above: https://github.com/HexFiend/HexFiend/blob/master/templates/T...

* binspector - https://github.com/binspector/binspector

* binary-parsing - a collection of links to similar such tools : https://github.com/dloss/binary-parsing

* unblob - https://github.com/onekey-sec/unblob

* ImHex - https://github.com/WerWolv/ImHex

* GNU Poke - https://www.gnu.org/software/poke/

* dtrx - https://github.com/dtrx-py/dtrx/ dtrx

* feng - https://github.com/martinlindhe/feng

** they also have a similar list of prior art: https://github.com/martinlindhe/feng/blob/main/RESOURCES.md

And some previous HN threads for similar such tools:

* https://news.ycombinator.com/item?id=34434249 (unblob)

* https://news.ycombinator.com/item?id=34986042 (GNU Poke #1)

* https://news.ycombinator.com/item?id=36182873 (GNU Poke #2)

turtledragonfly··on Geometry for Entertainment (1950)
I was talking about page 10 of the PDF [1], in Chapter 1 (odd, the original link in this HN post is now taken down).

The part starting: "The rays of the Sun falling on the Earth can be considered parallel because..."

As another commenter pointed out, the following paragraphs do mention the penumbra and solar disk, but I feel like the reasoning put forth in that initial paragraph is simply wrong (though common), even if it's briefly expanded upon afterwards. Or maybe it's just an artifact of the translation that it comes across sounding more authoritative than it is.

[1] https://gitlab.com/mirtitles/perelman-geometry/-/raw/master/...

turtledragonfly··on Geometry for Entertainment (1950)
Oh absolutely. I have no objection to the approximation. I have an objection to the shoddy reasoning put forth in its favor.

If they said "0.5 degrees is small enough to ignore in this case" that would be fine. But instead they give this argument about how the angle is 0.00138 arc seconds, when that's clearly not the full story.

turtledragonfly··on Geometry for Entertainment (1950)
I am perpetually annoyed by the argument "the Sun's rays are parallel" made here and many other places. They tell you to take a single point on the sun, and draw a big skinny triangle from there to different points on the Earth, showing that the angle is very small.

But any child can look at the sun (with eye protection :) and see that it is a disc, not a point of light. The disc is about 0.5 degrees, which is not so small.

So, two rays emanating from opposite ends of the Sun and arriving at your eye are clearly not "effectively parallel." Of course, 0.5 degrees often is small enough to not matter in some contexts, but it's just annoying to me that the "start from a single point on the Sun" reasoning is used to draw a conclusion that flies in the face of simple observation.

Sorry, rant over (:

turtledragonfly··on Bootstrapping a Forth in 40 lines of Lua code
I've had a very enjoyable experience with Lua, and kaguya for binding it to C++. Match made in heaven, for the most part (:

PUC Lua also has a very solid coherent C implementation; it's basically a masterclass in making an effective, portable, but also necessarily complex C library.

turtledragonfly··on Making a 3D modeler in C in a week
EDIT aha, the program already supports exporting to a mesh via marching cubes; see the youtube video on the site. I hadn't realized that (:

----

Be aware that since it fundamentally works with SDFs, it is a somewhat different modeling experience (and stores different data) than traditional meshes with triangles, verts, etc.

Transforming it from SDFs into meshes could be done with marching cubes or similar, but you'd likely need to "clean up" such data afterwards in a Blender-style app anyway.

SDFs are great though, if your renderer is SDF-based, too (most are not).

[sorry if you knew this already, wasn't sure]

turtledragonfly··on Stardew Valley 1.6 Changelog
Don't forget luck!

I don't mean that in a dismissive sense — hard work is obviously very important.

But more in the sense that if you're talented and hard working and aren't successful, it's not necessarily because you did something "wrong" or didn't work hard enough. Sometimes there's just no substitute for being in the right place at the right time.

turtledragonfly··on How to Structure C Projects: These Best Practices Worked for Me
Not the person you asked, but this sort of thing is pretty easy with templating languages, such as Perl's Template::Toolkit[1] or Python's Jinja2[2].

The advantage of a system like that over a plain programming language (such as Lua you mentioned) is that there's less escaping and string.format(xxx) sorts of things. The output text is the primary thing and the templating language has its own special syntax to "activate" it when you need it, rather than the other way around.

That being said, Lua's square-bracket strings are pretty good for bulk text, too (:

[1] http://template-toolkit.org/about.html

[2] https://jinja.palletsprojects.com/en/3.1.x/templates/#synops...

turtledragonfly··on Airfoil
I think I see what you're saying.

Perhaps my mention of Newton's third law gave you the impression that I was advocating for that "stone skip" theory ­— I assure you I wasn't! Especially as presented on that page, it is obviously junk (:

But surely you agree, broadly, that if birds are flying inside a sealed box, the box still weighs the same amount as if they were standing, right? (modulo some fluctuations)

All of the pressure differentials and whatnot have the net effect that an upward force on the wing results in a downward force elsewhere. The purpose of the scale is to measure that force — like measuring the weight of the box with birds in it.

In the hovering helicopter example, wouldn't you agree that a (large) scale directly under the helicopter will measure a weight corresponding to the helicopter's lift force? Like if I blow directly onto a kitchen scale — it will measure some grams.

Edit: I feel we are kinda re-hashing the Bernoulli/Newton discussion also addressed at the nasa site: https://www.grc.nasa.gov/www/k-12/VirtualAero/BottleRocket/a... — 'So both "Bernoulli" and "Newton" are correct ...'

For reference, the correct Newtonian explanation (flow turning) is also covered: https://www.grc.nasa.gov/www/k-12/VirtualAero/BottleRocket/a...

turtledragonfly··on Airfoil
I'm curious to know your reasoning more.

Certainly if we flew the plane very low over the ground, the air pretty directly pushes down on it, and the hypothetical scale would register something. Just look at the grass when a helicopter hovers over it.

As the aircraft flies further up, we'd need a bigger scale to capture the full area affected, and if it's moving there would be increasing lag between the location of the plane and the (large) area where the downward force hits the ground.

Or do you disagree with that? At what point does the scale stop working?

Obviously there would be practical limitations — that force is so spread out that it would be hard to measure. But let's not have practice get in the way of theory (:

turtledragonfly··on Look, ma, no matrices
For people interested in this topic, here's a good set of slides going over Grassman/Clifford/Geometric algebra concepts: http://www.terathon.com/gdc12_lengyel.pdf

And another good site: https://mattferraro.dev/posts/geometric-algebra

turtledragonfly··on Airfoil
I think what they were saying is that from a pure "Newton's 3rd law" standpoint, if the plane has an upwards force, then the air has a corresponding downward force, which must go somewhere. Yes, it is spread out and complicated and turbulent, etc, but ultimately must balance out.

If we could somehow "draw a box around" the entire plane+air system, then the plane's upward lift will create a corresponding downward force on the box, one way or another.

So, in the broad sense that you push the earth away from you when you jump, the plane also pushes the earth away from it when it flies (mediated by a bunch of fluid dynamics).

Or, classic example: if a (sealed) truck full of birds is jostled so that they start flying, does the truck weigh less? [1]

[1] https://www.youtube.com/watch?v=lVeP6oqH-Qo&t=35s

turtledragonfly··on Airfoil
> this duck is literally just paddling air with his wings

Grossly speaking, sure. But I feel like this simplifies away a lot of the interesting bits. It's not as simple as, say, someone on a canoe paddling. Why is the duck's wing shaped just so, and not another way? Why does it move its wings just so instead of another way?

I'm reminded of an analysis of fruit fly wings, showing how they re-capture energy from the air when flapping[1]. Maybe the duck is doing similar; I don't know.

Of course, these animals make it look easy, thanks to millions of years of evolution (:

https://www.nature.com/articles/s41598-021-86359-z

turtledragonfly··on Airfoil
Not really a full answer for you, but one thing that this page clarified for me:

I had generally previously thought of viscosity as "how slow" a fluid is. High viscosity means high "thickness," which means it flows slowly (like molasses vs. water).

But as presented on this page, viscosity is actually a measure of "how fast" — how fast the effects on one molecule can spread out from there to neighboring molecules. Perhaps you could think of sounds waves moving through a substance — a "thick" substance like solid metal propagates those waves quickly (on a molecular level), while with a "thin" substance like air it's much slower. In the more precise language from the article: "viscosity controls the diffusion of momentum..."

So, because this diffusion happens quickly in a high-viscosity situation, little whorls of turbulence are inhibited, because the forces governing those whorls get spread out/diffused quickly.

Perhaps you missed the part of the article talking about diffusion, or did not see the connection? The link between that and viscosity was not immediately apparent to me, either.

turtledragonfly··on A community site for publishing poems, journals, logs, and lists
Quality is all over the map, but I like weird little mishmash sites like this.
← PreviousPage 2 of 7Next →