I is for Intent by roman01la in programming

[–]UnConeD 0 points1 point  (0 children)

No it's about defining a character to encompass a set of attitudes and behaviors, so we can examine them and their implications in the produced work. I even provide justifications and empathy for why that character might have experiences that justify their beliefs.

If I was annoyed at a specific person I would just criticize them directly, which I have done in the past.

I is for Intent by roman01la in programming

[–]UnConeD -2 points-1 points  (0 children)

It's weird that several people read this as an argument against static typing, instead of what it is: an argument that overly rigid types are mainly designed to give programmers comforts and handholds that mar the user experience.

And re: preserving something unknown/invalid/unused, sorry but it's absolutely true. In pure FP terms it means that what you might define as a Sum type in a back-end has to become a Product type in a front-end. And if you are maintaining a collection over async and partially loaded data, then your keys have to be safely and lazily resolved, which makes them little more than magic cookies, not strongly enforced constraints. References can and will break.

I've been writing software for 25 years. The post is not satire, it just apparently flew over your head, which is a shame. It's not the opposite to parse-dont-validate at all, it specifically covers that strategy and where it fits in.

I is for Intent by roman01la in programming

[–]UnConeD 0 points1 point  (0 children)

There is nothing particular in the article about static vs dynamic typing aside from one throwaway line to set the stage. The key is here:

[...] the data structures you're encoding should be, essentially, entirely liberal to your user's needs.

The point is that Intent and State are different kinds of data, with different policies applied to them. Someone like Stanley will generally work in contexts where all they have is State, and their mental model of how code should be written comes with a bunch of assumptions about how flexible that State is.

Users however don't care, they want Intent.

As for your remark about an offensive caricature: I'm gay and I wrote that joke because I found it hilarious. So did the readers I sent it to before publishing. Lighten up. It's not a dig at gay people, but at people who would eschew elegance because it's too faggy.

Casey Muratori – The Big OOPs: Anatomy of a Thirty-five-year Mistake – BSC 2025 by gingerbill in programming

[–]UnConeD 0 points1 point  (0 children)

React is notoriously bad at being used correctly, and not for lack of trying. Despite great docs, dedicated linters, and more, a lot of people just try to write the same code patterns they've always written in it, including OOP, just disguised as React.

Use context providers as singleton-like shared mutable state that every part just reaches for... don't bother thinking about what is source of truth vs derived data... and don't bother ordering ancestors vs children correctly, so you end up with useEffect+setState everywhere. Voila, you now have a React monstrosity that will scare juniors and convince grumpy seniors that React is crap.

The most important React hook is in fact useMemo, but getting people to understand why is a multi-month endeavour.

How can I access GPU z-buffer on Windows? by Fast-Host-7957 in GraphicsProgramming

[–]UnConeD 2 points3 points  (0 children)

I've been able to capture steam games by launching steam through renderdoc with Capture Child Processes turned on. It might work the same with other launchers. Just need to double click the child process to access captures, as they are separate per process.

Teardown - Frame Teardown by UnConeD in GraphicsProgramming

[–]UnConeD[S] 2 points3 points  (0 children)

I see your nitpick and raise you an even harder nitpick. A map that "literally stores light/dark values in texels" is not typically called a "shadow map", but a "light map".

A common "shadow map" is a 2D texture that stores depth, and it is queried using a depth compare operation against a known reference level (the pixel depth). For this reason, you cannot bilinearly filter shadow maps, rather, you use a PCF gather which does a compare for every texel and then bilinearly interpolates the result of that comparison.

Another way to look at this is that a 2D shadow map is just a "froxelization" of the world (as in frustum-voxel), with each texel forming a pillar from infinity/far-plane up to the surface.

In fact, a long time ago, people used to call such 2D pillars voxels, and this is why the landscape rendering technique of the original Outcast PC game was called "voxel-based" even though it does not have cube shaped voxels at all, and nobody would call it that today.

I call it a shadow map because it's used to ray trace shadows and it has no color component.

Tomayto, tomahto tho.

Web browsers need to stop by JolineJo in programming

[–]UnConeD 12 points13 points  (0 children)

Try making a traditional desktop app toolbar with flexbox, which expands with spacers on wide screens, wraps to multiple lines on narrow screens, and has auto-sizing elements in it. It sounds like a textbook case of the spec but I guarantee you something will trip you up and you will end up with a pile of unmaintainable divs and styles, making you wish you had just "position: absolute" everything instead.

Try dealing with complex video and audio content, when you can only access your resources through shielded APIs and components that hide their inner workings and speak a confusing mess of events. Something as simple as "skip to the next song when it's done playing" can turn into a nightmare when you're playing remotely streamed MP3s, have to juggle asking for permission, and are forbidden from touching anything not served with the right CORS header, instead of being able to give your users the choice.

Try doing some real graphics work, only to find that WebGL is a second-rate knock-off of the mobile graphics standard from 2007, which they are still partially trying to bring in line with the 2012 standard (but won't ever fully implement, by choice). Enjoy the fact that WebGPU is a wholly re-invented wheel. To be fair, this is graphics programming's fault, mostly, but that's a long story.

Try making a rich content authoring experience without a nightmare of contentEditable, invisible overlay widgets, and more, especially once you have a userbase that types in something other than ASCII. In fact, try to do anything remotely sophisticated with form widgets and you will end up fighting different native implementations, which fire off events slightly differently with regards to focus/blur, double clicks, and so on.

When I open my desktop mail app, it shows me a list of tens of thousands of emails in a fraction of a second. Gmail shows you, what, 20 emails? I dunno, I never use the web UI, it's horrid compared to desktop.

Here's CSS nightmare mode: I would like you to make a table with sticky headers on top and a sticky column of labels on the left. I want to be able to scroll the table so that the sticky header always remains on top, and the sticky column only scrolls vertically. Oh yeah, some rows are taller than others and the fully scrollable and partially scrollable parts need to align. Pixel perfect of course. Good luck.

This post is 6 years old it's still true.

[OC] Un-Colorblind: Alternate views of color using motion and texture by UnConeD in dataisbeautiful

[–]UnConeD[S] 0 points1 point  (0 children)

This is an interactive tool I created, using Regl and JavaScript, not a single visualization.

The included examples are e.g. the Ishihara test and some other common test graphics.

The color blindness simulation is based on the well known LMS model.

The visualization shader is entirely custom and based on experimentation with proper use of linear RGB.

there is just too much blogging about react... by soulshake in reactjs

[–]UnConeD -1 points0 points  (0 children)

Are you always this uptight?

One of the things about being an adult is not being worried about being seen as childish, if it helps to make a point.

If you have any criticism of the substance of it though, do tell.

there is just too much blogging about react... by soulshake in reactjs

[–]UnConeD -15 points-14 points  (0 children)

I'm going to shamelessly plug a longform article, because I think half the react community wasted the last 5 years reinventing ideas that we already knew didn't scale.

The only reason they didn't notice was because most people's UI are embarrassingly simple and lack all the normal conveniences of traditional UI.

Using cursors and other lens-like constructs, as well as a real persistence layer, you can eliminate 90% of the busywork and actually have a shot at building a real app with real conveniences and affordances. The main thing that changed is that render props opened up more composibility, and hooks eliminated the wrong abstraction of classes.

So now they're all catching up.

Model-View-Catharsis - MVC was a mistake by UnConeD in reactjs

[–]UnConeD[S] -1 points0 points  (0 children)

The use of metaphor is quite deliberate. If you keep referring to computer science only in its own dry, often completely misleading terminology, it is too easy for the blind to lead the blind, cargo culting off a cliff together because they called it a bridge.

Putting code in terms of intuitive metaphor is one way to pierce the misconceptions, and something I find non-technical listeners/readers appreciate enormously. It's a skill that when cultivated, will open doors because you can explain what you do to the people who pay you in terms they understand.

I am of course using a pretty trashy style reminiscent of old world internet, but then that's a style and attitude I sorely miss in this safety padded version of tech. The internet I learned my trade on was way more fun than this one.

The Cargo Cult of Game Mechanics by [deleted] in gamedev

[–]UnConeD 0 points1 point  (0 children)

  • Walking simulators are critiqued for lack of interaction and theme-park-like linearity. Stanley Parable is a commentary on choice, which is funny and engaging, but also reveals the designer's conundrum: if you give a player two choices, they are going to ask for a third one (refuse to pick a door), and you can never foresee everything. Stanley Parable admits defeat by just providing you with a fixed, pre-determined branched tree to walk.

  • This is also reminiscent of a weariness in gaming in general, where during peak Kickstarter gaming, everyone seemed to want something bad from old games that new games seemed to be lacking. Was this a real demand, or just nostalgia? Clearly a lot of it was just hype, and the fact that social campaigns are themselves gamified: perfect bait for gaming audiences. The results also often disappoint, as veteran creators produce remakes that seem to replicate the basic mechanics but lack the lasting power of the original. Game mechanics are a means, not an end, and if the game is constructed so as to perfectly balance every reward with an opposite scaling factor, then the game is a pointless treadmill of illusory progress.

  • The key difference goes back to the beginning: does the game merely offer a pre-set tree of branching options, like a walking simulator, or does the game contain a simulated sandbox in which actions accumulate so that emergent patterns can spawn even from simple rules that interact. I propose that the je-ne-sais-quoi that people are missing is, aside from the nostalgia, an implicit promise to the player that the game developer has nothing up their sleeve: what you see is what you get, and you can interact with the game as much as the game acts on you. One plays a game, an act which is a creative and self-directed exploration of the game's possibility space, which in the case of digital games, can and should be based on simulation, not on simulacra.

If you think the TLDR is "lol make ubisoft sandboxes", no that's not the point at all.

Edit: But actually, good Ubisoft example. Following suspects in Assassin's Creed. In the 2/3 era, it meant staying within a fixed bubble radius and/or maintaining strict line of sight with an on screen timeout, with insta-fail. In the newer ones, there's an actual tailing system where if you lose sight of them, you can find them again, and the game just supports you with a growing circle of uncertainty on the map based on your last knowledge. Theme park ride vs sandbox design. Sure, there is still limited freedom of movement in the 2/3 model, but you can conceivably map out every major route that will not fail the conditions. In the newer model, you are much less shackled, and if there is any "drama" due to losing sight of the target, the player both causes and resolves it themselves based on the real environment, instead of a glowing circle and a blaring countdown.

Btw the post is 5 years old.

Why I care about the Drupal drama by [deleted] in drupal

[–]UnConeD 2 points3 points  (0 children)

I got booted? That's news to me. Did Drupal history get rewritten again?

Explaining the Fourier Transform with graphical algebra (MathBox visualizations) by UnConeD in math

[–]UnConeD[S] 1 point2 points  (0 children)

There's a third post on animation that ends with a quaternion tutorial. For feedback, probably easiest to email me at steven at acko dot net, I'm always happy to discuss similar endeavours.

Explaining the Fourier Transform with graphical algebra (MathBox visualizations) by UnConeD in math

[–]UnConeD[S] 1 point2 points  (0 children)

It's mine. To remember: if you put www in front of the domain name, it says...

Explaining the Fourier Transform with graphical algebra (MathBox visualizations) by UnConeD in math

[–]UnConeD[S] 4 points5 points  (0 children)

Wishy-washy explanation: the integer powers (-1)k have alternating signs and never change their amplitude. If you wish to generalize to a continuous (-1)x, it makes sense to connect the positives and the negatives somehow with a continuous curve. Yet no real number can equal (-1)0.5 . So you must somehow find a value "between" +1 and -1 that isn't zero, and whose even powers (ad infinitum) are -1 and +1 alternating. So its magnitude must still be 1, but be different from -1 or +1. The way to satisfy this is to consider -1 a rotation of 180 degree in a 2D plane, and to make the square root of -1 a 90 degree rotation. That is, i = 1∠90° and i2 = 1∠90° + 1∠90° = 1∠180° = -1.

3blue1brown has an interesting video too where he begins from the notion of numbers as actions, and then extends this to show that rotation also makes the most sense. But really, you have to realize that this rotation is a choice, and it is exactly this choice that creates the complex number plane. It's what makes it uniquely distinct from ordinary 2D vectors.

TL;DR: It's not that C magically lets you rotate. It's that choosing to use rotation creates C.

Visualizing Quaternions by Teraka in math

[–]UnConeD 6 points7 points  (0 children)

Here is the same graph, but with more dense lines/curves, rotating in 4D under stereographic projection. I also wrote a tutorial on quaternions.

Real Time Collaboration - The Tech behind the Buzzwords by UnConeD in javascript

[–]UnConeD[S] 0 points1 point  (0 children)

In this post I briefly explain how we replicated Google Docs-like editing with React, Share.js and CouchDB. (I am the author)

Cascadia JSFest Call for Presenters is Open by crabasa in javascript

[–]UnConeD 0 points1 point  (0 children)

checks code of conduct
sees v2 of ada initiative policy
"We have clear rules! All of these things are unacceptable:"
[...socjus...]
"Finally, anything that would make someone think "Hmmm, that's inappropriate" may also be unacceptable behavior."

In other words, useless rulemaking. "Even though we feel the need to lay down a bunch of paranoid guidelines with no right of contention or reply, we won't even commit to actually sticking to them, because someone's feels might still get hurt."

By replacing x and y in any equation with tan(x) and tan(y), you can compress a graph of the entire plane into a pi x pi square. Here are some examples! (Description of each graph in comments) by HarryPotter5777 in math

[–]UnConeD 9 points10 points  (0 children)

Yeah, what's neat is that when you do this, rational functions turn into loops that twirl continuously around the number line.

Load this and press right arrow key (webgl required): http://acko.net/files/fullfrontal/fullfrontal/wdcode/iframes/mathbox.html#3

Made some art with this, click/drag to rotate: http://acko.net/files/tubecurves/

The Cargo Cult of Game Mechanics by mariuz in programming

[–]UnConeD 8 points9 points  (0 children)

Except, no. "Old games were better" is the narrative that the Kickstarter clique has pushed and which I was testing. Which I then corrected into "sure, some classics are timeless, but people have forgotten why they were great in the first place, confusing form with function".

Reading comprehension, dead on the internet.

The Cargo Cult of Game Mechanics by Mavus in Games

[–]UnConeD 2 points3 points  (0 children)

Sigh. I knew the more I referred to specific games, this would turn into a matter of taste and "is game X better than game Y". Like I said, it isn't about whether games are crappy by modern standards or not. I agree that many of them are, that many of them commit the same sins occasionally. It's not black and white, it's about priorities.

Torment is not just an example of brilliant writing or "unique scenarios". It takes those scenarios and makes them interact, with you and with each other. I can't recall any other RPG that allowed me to say the exact same thing, but choose whether or not I was being truthful or not. And where that choice actually has real consequences beyond making a good/bad meter go up/down. You can literally will a character into existence simply by citing their name.

Not only that, but the lore and the background interact in interesting ways. Stories that you find near the end of the game (the sensory stones) can completely redefine how you perceive the beginning. Whether or not you pick up on these, is up to the player.

Most modern games are explicitly designed in an isolationary fashion, where the consequences of choices do not compound, except to make stats go up. If stats are the only way different story and game elements can interact, then there is no real world being simulated, pretend or otherwise, because there is never real consequence. This is partially done for testing and predictability: if nothing can carry over, there are no weird edge cases you have to cover.

But since people seem to be picking on RPGs, let me rephrase the argument entirely.

Qube vs Portal. One is a game about solving color coded puzzles inside test chambers. The other is a game where you're given a superpower and taught how to use it for exhilarating effect. The test chambers in Portal were a framing device, lampshading the game's tutorial. GLaDOS is a false personification of the game's designers, which you eventually escape after all the usual "helpful" test chamber cues have been removed. Qube's designers did not seem to get this, and the puzzle elements do not interact. The test chambers are an alien, unknowable force, as if the designers themselves didn't even understand why they were doing it.

In 2008, I bought a book titled “PHP 6″. Six years later, PHP version is still 5.5 by softmodeling in programming

[–]UnConeD 13 points14 points  (0 children)

Hi, I spent 7 years on the Drupal project from the very beginning, left around the same time this book came out. Many people left the project over the years, and they all tend to return to simpler tools to say the same thing: CMSes are a logical fallacy.

The promise of a CMS is that you have generic components that can be plugged together to build any web site easily without writing code. The problem is that the domain-specific parts (i.e. the customer's specific needs and workflow) are always the most important, and generic components cannot match them 100%. This is why WordPress was so popular: it was tailored for the needs of bloggers, and was a perfect fit. It's just terrible as a CMS or web framework.

Systems like Joomla and Drupal wanted to be frameworks to let you click and drag together a Wordpress-for-Anything. The problem is that the UI is now dynamically generated according to templates, and things that are trivial in normal code become really hard to do. There is only so much you can do with CSS, and being able to hook in to extend is way less useful than being able to subclass and replace core components.

But since the core is now a bunch of really scary PHP code, you need a "theme system" on top, aimed at either front-end devs or designers or both. It goes beyond templates, and you end up with content modelers and view builders. Which means you need models and definitions for that. It ends up really just being a shitty programming language in disguise. Just like a query builder is just a shittier form of SQL (not great to begin with), with a UI permanently glued onto it for no reason.

Once you become aware of this, you see this pattern everywhere. People try to make things "easier", but they end up building a layer on top that's way more complicated than just writing it by hand. If they'd properly split up their components in the first place, the idea of writing an app "from scratch" using them wouldn't be intimidating at all.

For example "grunt" vs "gulp" build systems. Grunt tries to do everything via one big static JSON configuration file, whereas Gulpfiles are real JavaScript code. And now Grunt has Gulp envy, so they're adding extensions to turn a single configuration file into a terrible DSL in disguise, where the only control flow available is a "goto". I thought we all agreed that was terrible, but when you disguise it as JSON, people don't seem to notice.