HNHacker News
TopNewBestAskShowJobs

rezmason

1,337 karma · joined October 16, 2018

People read this? That's cool.

I make code things that draw things. I try hard not to build on top of quicksand. Not a big fan of jerks.

https://www.rezmason.net

submissionscomments
rezmason··on Browsers are the most likely disruptor of the mobile duopoly
Them's citin' words! Are you sure you're as well-versed as you portray yourself to be?

The article which you linked to is from 2012; it pertains to the performance of Facebook's web client in 2010, when run on mobile devices in 2010.

Most apps today can be implemented as progressive web apps, without any user experience penalty. Instead, they are built with tools that lock developers into a platform of one type or another. That's because some handset manufacturers prioritize the platforms that have lock-in, such as the App Store and iMessage, over the platforms that do not, such as the web and RCS. It is not because the web is somehow a bad platform for apps.

If you want FaceTime to call your mom on her headset when your watch detects a spike in your heart rate, then yes, you may want to write a native app to do that. But Sudoku, Pandora and the McDonald's app can live on the web, and so can most of the rest.

rezmason··on GDScript – Custom scripting language to be used with the Godot game engine
I think you're right, and want to offer some additional perspective.

I made a very, very simple game in Godot 4 with my friend this fall. To build for the web target, I ported our C# to GDScript, and it wasn't so bad. The resulting webstuff was 50MB without audio.

I ported it again to JS, and it's 50KB without audio. Maybe 150K with audio. About the size of two favicons.

Yes, the game is very very simple ( https://rezmason.net/fluid , still refining it), but the difference between 50K and 50MB is still significant.

If we had used some kind of Python to WASM toolchain, I don't know what size the project would be, but probably more than 50MB. With C# in the mix, and mono, or whatever, it would be even larger.

One of the reasons we explored Godot this year was to try other ways of producing things. GDScript helps maintain Godot's distinction from its competitors, and I'll reach for it whenever I need to make #ThatKindOfThing.

rezmason··on Write shaders for the (sim) Vegas sphere
Got the matrix working.

I tried adjusting the UV so we could see the top of the sphere, but I gave up. For what it's worth, the threejs uniforms "projectionMatrix" and "modelViewMatrix" can be referenced in the GLSL as long as you declare them up top.

  #define PI 3.14159265359
  #define SQRT_2 1.4142135623730951
  #define SQRT_5 2.23606797749979
  
  //uniform mat4 projectionMatrix, modelViewMatrix;
  uniform float time;
  varying vec2 vUv;
  varying vec3 vNormal;
  
  highp float randomFloat( const in vec2 uv ) {
    const highp float a = 12.9898, b = 78.233, c = 43758.5453;
    highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );
    return fract(sin(sn) * c);
  }
  
  float wobble(float x) {
    return x + 0.3 * sin(SQRT_2 * x) + 0.2 * sin(SQRT_5 * x);
  }
  
  float getRainBrightness(float simTime, vec2 glyphPos) {
    float columnTimeOffset = randomFloat(vec2(glyphPos.x, 0.)) * 1000.;
    float columnSpeedOffset = randomFloat(vec2(glyphPos.x + 0.1, 0.)) * 0.5 + 0.5;
    float columnTime = columnTimeOffset + simTime * columnSpeedOffset;
    float rainTime = (glyphPos.y * 0.01 + columnTime) * 350.0;
    
    rainTime = wobble(rainTime);
    
    return 1.0 - fract(rainTime);
  }
  
  void main(){
  
    float t = fract(time / 14.487);
    vec2 animatedUv = fract(vUv + vec2(t * 0.002, 0));
  
    vec2 gridSize = vec2(3.14 / 2.0, 1.0) * 100.0;
  
    vec2 glyphUv = fract(animatedUv * gridSize);
    vec2 gridCoord = floor(animatedUv * gridSize) / gridSize;
  
    float brightness = getRainBrightness(t * 0.1, gridCoord);
  
    brightness = clamp(0.0, 1.0, brightness * 1.6 - 1.2);
  
    float coverage = 1.3 - length(glyphUv - 0.5) * 3.0;
  
    gl_FragColor = vec4(brightness * coverage * vec3(0.2, 1.0, 0.05), 1);
  
  }
rezmason··on The "computers are social actors" theory no longer applies to desktop computers
In 2006 I shipped my iBook to Apple to fix its screen bezel. I made a Flash animation where my laptop cheekily described its issue, thanking the technicians in advance, and I made it launch on startup.

The iBook came back with a factory reset. I restored from backup and stopped anthropomorphizing my computers.

rezmason··on Capturing the WebGPU Ecosystem
In many ways, you're right.

In my opinion, the main strength of WebGPU is it removes the cost of re-implementing something when targeting a different platform. If that was present in 2015, maybe we'd have more games, more interesting applications, and less pressure on people who feel locked into one vendor's ecosystem.

rezmason··on Peter Thiel is taking a Break from Democracy
Buffalo Bill is taking a Break from Victim in a Hole
rezmason··on Free Speech Is in Trouble
I'm not misinterpreting the FIRE survey, because I'm not interpreting the FIRE survey— I'm interpreting Nate Silver's stance in his article. After all, he's framing this as the left abandoning free speech.

Also, when you say "This is a purposeful misinterpretation", you're making an assumption that's disrespectful. What if I had misinterpreted the FIRE survey, as you suggest? Why do you believe I would do so purposefully? If you think I'm attacking something you're defending, I believe you've misjudged me.

rezmason··on Free Speech Is in Trouble
I'm not ignorant or acting in bad faith just for disagreeing with you. You can inspect my stance and speculate on where we agree and disagree, or you can ignore me. I'm choosing to ignore you.

But first: welcome to somewhat-anonymous online discourse. I sincerely hope you stick around. Stay hydrated!

rezmason··on Free Speech Is in Trouble
The megaphone isn't your right. You're confusing it, again and again, with speech. The megaphone isn't speech, and you aren't entitled to it.
rezmason··on Free Speech Is in Trouble
Generally, the people who get one are: - the ones who buy one - the ones who borrow one - the ones who find one - the ones who make one

And if you hurt someone with a megaphone, you should expect to lose it.

In other words, a megaphone is just like every other thing on the planet.

rezmason··on Free Speech Is in Trouble
It's wrong to equate people abandoning free speech with people not wanting to host people with specific stances at a venue.

Free speech isn't about flinging the door open to everyone. It's about not incarcerating them, and not preventing them from speaking at all.

In my opinion, the people who blast "cancel culture" are often the people who tacitly assume that they are welcome everywhere by default. That's not anyone's right. And you don't infringe on someone's right to say what they want just because you won't sell them a megaphone.

What we're seeing is a young generation of left-leaning people who are motivated to shift the Overton window back from the cliff, because they no longer assume (as older generations have) that adults can wield a megaphone responsibly.

rezmason··on Base64 Encoding, Explained
Here is my Base64 encoder shader:

https://github.com/Rezmason/excel_97_egg/blob/main/glsl/base...

I got it down to about thirteen lines of GLSL:

https://github.com/Rezmason/excel_97_egg/blob/main/glsl/base...

I use it for Cursed Mode of my side project, which renders the WebGL framebuffer to a Base64-encoded, 640x480 pixel, indexed color BMP, about 15 times per second:

https://rezmason.github.io/excel_97_egg/?cursed=1

rezmason··on Show HN: Classic Video Poker
This looks great. Audio's left-speaker only? Might be a problem on my end.

I will learn video poker, and get good at this. I wouldn't mind an option to disable the CRT simulation, but it's outstanding anyway.

rezmason··on The Gods of the Copybook Headings
I was conflicted when I first read this, because it's beautiful and speaks to the actual tenets of ideal conservative thought: preserving and making accessible the hard-learned lessons of the past.

But like real conservative thought, it conflates these with the fear of good things that are new, such as promoting equality and collective action.

The strongest rebuttal to this poem is acknowledging that comparing our wisdom and foolishness with foreign wisdom and foolishness can inform us of what is truly fundamental.

rezmason··on Aardvark'd: The Fog Creek documentary, 18 years later
I own one of only 5,000 copies?!
rezmason··on Build Your Own Flight Sim in C++ (1996)
I wonder if this book informed the programmers who created the Excel 97 magic carpet / flight simulator easter egg
rezmason··on No-more-secrets: recreate the decryption effect seen in the 1992 movie Sneakers
Not only cool looking, but good code and attention to detail!
rezmason··on Show HN: React95 – A React components library recreating the look of Windows 95
I readily admit I'm taking some pixeliberties with it. :) The font's because of me, and the purple title bar, but I think I grabbed those grays from 98.css. I might change them to values in my own color lookup table.

...God DAMN dude, don't bury the lede! You made this? http://kristopolous.github.io/BOOTSTRA.386/demo.html This is gorgeous!

rezmason··on Show HN: React95 – A React components library recreating the look of Windows 95
Another great resource to create web experiences that look like old versions of Windows is 98.css by Jordan Scales: https://jdan.github.io/98.css/

With it, you don't need to use React to get decent results, see?

https://rezmason.github.io/excel_97_egg/about.html

rezmason··on Meta releases Intermediate Graphics Library
I hope WebGPU is going to pull it off.
rezmason··on Ditherpunk – The article I wish I had about monochrome image dithering (2021)
If you're reading this from the future, I've changed the URL params in my project. Up to date ones should be in the about page:

https://rezmason.github.io/excel_97_egg/about.html

rezmason··on Ditherpunk – The article I wish I had about monochrome image dithering (2021)
I think the "Hacker News readers" and "People who like dithering" Venn diagram has converged slowly over time. I'm a happy resident of the overlapping zone.

A classic visual explainer from the team behind Myst and Riven (who had to balance image quality and disk space) is archived here: http://web.archive.org/web/20230415173939/http://cho.cyan.co...

Obligatory link to Obra Dinn's fascinating dev log post, regarding the challenge of spatial and temporal coherence when dithering realtime 3D (for aesthetic reasons, ie. deliberately noticeable to the player): https://forums.tigsource.com/index.php?topic=40832.msg136374...

Lately I've been attempting to add the original dithering from Excel 97's easter egg to my online reproduction. In the era of indexed-color graphics, developers had to dither efficiently to reduce banding. Compare these two rendering techniques of the same subject, one with 16 shades of gray and dithering, and the other with 256 shades of gray:

https://rezmason.github.io/excel_97_egg/?shadingOnly=true&l=...

https://rezmason.github.io/excel_97_egg/?shadingOnly=true&l=...

rezmason··on I want to talk about WebGPU
Also, we may be able to create those packages from parts of browsers, which wouldn't be a re-implementation, and would benefit from the rigor of the standards.

I agree that it would be kind of silly to then put this in the browser. Instead, I think it could be used to build the native target.

And just to clarify my earlier statement, I'm not a fan of phasing out the use of the DOM in the browser— it has graceful degradation and accessibility features that are really important. It's more that there are people with existing Qt or JavaFX or Cocoa dependent projects, or whatever, who are now able to deploy to the web by implementing the UI layers in WASM/WebGPU.

rezmason··on I want to talk about WebGPU
Thanks for writing this article! I am super excited about WebGPU. One not-so-fancy prospect worth commenting about on HN, though, is replacing Electron.

With WASM-focused initiatives to create hardware accelerated UI in the browser, we may soon see a toolchain that deploys to a WebGPU canvas and WASM in the browser, deploys native code linked to WGPU outside the browser, and gives the industry a roadmap to Electron-style app development without the Chromium overhead.

rezmason··on Nightdrive
If you compiled me, you'd know that you are a type who I respect ;)

I think you're right on many counts, and I appreciate the effort you took to see what TS could do for this kind of project.

If you create an issue on the repo, I can notify you if I make an attempt at using TypeScript to maintain it, in a branch at least. No guarantees, but I've considered it before, and it'd be worth my time once I have some to allocate.

rezmason··on 3dfx Voodoo 5 6000 recreated via reverse engineering (2021)
I love seeing folks pour monumental effort into their passion projects.
rezmason··on Nightdrive
That is very odd. I wonder what your Chrome browser's zoom is set to, that might affect its resolution.

If you create an issue on the repo, I'll try and figure it out when I have the bandwidth.

rezmason··on Nightdrive
Yep, my third attempt in ten years!

The original was written in "JujuScript", with strong types and novel operators. I pretended it was Haxe, and ran around fixing compiler errors it till it compiled to JavaScript. I built out a small Three.js project to hook it to, built up the features, then refactored it into something I felt was maintainable. I tried preserving the organization of the original script as best as I could.

Sidenote: I belong to the "port it" school of software preservation. My friend who runs the BlastEm project belongs to the "emulate it" school. I've seen both approaches have been employed to preserve Glider, which I think implies how important that game is to people. :)

rezmason··on Nightdrive
I agree, but the original creator put them in and they add some spice to the environs.

I like to joke that Australia (where Drivey originally comes from) has a low enough population that the pedestrians are in no real danger ;)

rezmason··on Nightdrive
Pleased to meet you! ^_^ Nightdrive is a jewel.

Some people are making a strong case (I think) for calling these types of projects "demos", but also, I think the inability to fit them in the arbitrary structure of existing nomenclature is a good quality for a project to have. :D

Have you considered using a small bokeh image in place of circles in your renderer? Their size is based on the (usually unchanging) optical properties of the eye, rather than the eye's distance to the light, so you'd fade them rather than resize them, and if you round their position to the nearest pixel you might be able to draw them with 2D canvas context speedily.

← PreviousPage 6 of 9Next →