Hacker Newsnew | past | comments | ask | show | jobs | submit | rezmason's commentslogin


Also s4nake, the concept in a 4k binary from the demoscene circa 2013

https://www.pouet.net/prod.php?which=61035


Oh yeah! I was playing MacSwear quite a bit on my friends MacBook (I think with a PowerPC CPU)

I contributed one earlier this year! The community's a great bunch and I learned a lot.

Always remember, folks: the best feature request is a pull request ;)


base64 is embarrassingly parallel. So just pipe it to the GPU:

  precision highp float;
  uniform vec2 size;
  uniform sampler2D src,tab;
  void main(){
    vec4 a=(gl_FragCoord-.5)*3.,i=vec4(0,1,2,0)+a.y*size.x+a.x,y=floor(i/size.x),x=i-y*size.x;
    #define s(n)texture2D(src,vec2(x[n],y[n])/size)[0]
    #define e(n)texture2D(tab,vec2(a[n],0))[0]
    a=vec4(s(0),s(1),s(2),0)*255.*pow(vec4(2),-vec4(2,4,6,0)),a=fract(a).wxyz+floor(a)/64.,gl_FragColor=vec4(e(0),e(1),e(2),e(3));
  }


HN user: Ah yes let me casually scribble down a tweet-sized base64 encoder that runs parallel on GPU.

Bravo, that is a thing of beauty.


Uhhh no, it's a huge net loss because the cost of sending it to the GPU and back greatly exceeds the cost of just doing it then and there in CPU; even on iGPU the kernel launch latency etc will kill it, and that's assuming the kernel build is free. Not to mention this is doing pow calls (!!), which is so ridiculous it makes me wonder if this was a kneejerk AI prompt.

Another post in this thread mentioned V8 sped this up by removing a buffer copy; this is adding two buffer copies, each about an order of magnitude slower.

Come on guys...


Don't make me upload my web-browser-in-a-GLSL-shader snippet


Uhhh, go for it? You're welcome to link anything you like of course, but do you maybe want to address my actual points if you have any objections? Let's do some measurements, it sounds like you might be surprised by the outcome.

Web browser in a shader also sounds extremely inefficient, for obvious fundamental reasons.


Sorry, I was cracking a joke about the browser in a shader.

The GLSL I originally posted is from the "cursed mode" of my side project, and I use it to produce a data URI of every frame, 15 times per second, as a twisted homage to old hardware. (No, I didn't use AI :P )

https://github.com/Rezmason/excel_97_egg

That said, is `pow(vec4(2),-vec4(2,4,6,0))` really so bad? I figured it'd be replaced with `vec4(0.25, 0.0625, 0.015625, 1.0)`.


There goes my evening.


Just as long as we don't observe it reeeeally closely, I imagine.


Bravo! I love color and color spaces.

I've been researching the way classic Macs quantize colors to limited palettes:

https://rezmason.net/retrospectrum/color-cube

This cube is the "inverse table" used to map colors to a palette. The animated regions are tints and shades of pure red, green, and blue. Ideally, this cube would be a voronoi diagram, but that would be prohibitively expensive for Macs of the late eighties. Instead, they mapped the palette colors to indices into the table, and expanded the regions assigned to those colors via a simultaneous flood fill, like if you clicked the Paint Bucket tool with multiple colors in multiple places at the same time. Except in 3D.


I can appreciate the passion and consideration that went into this presentation of the subject!


hundredrabbits' game Verreciel uses a reimplementation of webgl-lines, to pretty good effect, if I may say so:

https://github.com/mattdesl/webgl-lines

https://hundredrabbits.itch.io/verreciel

PS— I still play Retro, and dream of resuscitating it :)


Ah cool, thanks for that!

Oh man, that was about 3 lifetimes ago. I'm on linkedin (every couple months hah) if you ever want to chat.

It was a fun project, but we released it just in time for the Dot Bomb to wipe us out. Our last month, my partner and I got about $600 each from shareware game sales ($1200 with inflation today), enough to pay rent and my student loans for the first time. After the pop, the next month we got one sale. $12. The fun was over and never came back in the same way.

The powers that be conspired to end the 90s climb towards FU money and UBI, and there was no tech investment for about 6-7 years until 2007 when the iPhone and Facebook came out, which started the mobile bubble. Lots of people made $100k those first years, but mostly not established players, who had too much time, effort and money sunk into the old desktop platforms.

Then Google and Facebook took the lion's share of ad money, which removed the avenues to scale a business. Everyone moved into other models like in-game ads, in-app purchases and going viral through influencers, but none of those worked for the vast majority. To leave us where we are today, where long tail effects ensure a winner-take-all sales distribution.

Now that AI is here, even apps will begin disappearing. I predict that within 3 years, nobody will be using the web or buying software anymore. We'll just ask the AI to do everything, and it will make it so. Thus ends the mobile bubble too.

I basically missed every bubble due to unfortunate life choices. So let this be a cautionary tale to any young people who read this. You need to do the opposite of what people say. Nobody gets rich pulling themselves up by their bootstraps, they get rich by borrowing someone else's money and investing it in sure things like Bitcoin 15 years ago. If you feel yourself clinging to a project or situation because you have a lot invested in it or don't want to let someone down, that's the time to explore other options. You won't make yourself poor - your empathy will. That's why the rich demonize it. But empathy is where the true meaning in life is found. You can choose to skim money off other people's backs through investment, or "earn" it yourself, but there is a karmic cost no matter how you obtain it. So just have fun and do your best and at least pay your taxes so that society can progress forward, or we'll never stop repeating these systems of control and suffering IMHO.

When I was making Retro, I was trying to capture the feeling of the golden age of arcade video games, even if I maybe missed the mark. But I didn't realize that I was in a golden age at the time. I believe that we're in one of those now, maybe the last one. But also the first one, from a certain perspective.

Maybe it's time to dust off the old compiler and make a game..


I think of bone conducting headphones as the most realistic foundation for augmented reality on the market. Hearing things without plugging your ears up, weighing you down or taking you out of your surroundings is underrated and underutilized. To match the weight of an Oculus Quest 3 on my head, I'd have to wear seventeen pairs of Shockz OpenMove. Compare the dread of a video ad over your eyes to the dread of an audio ad in your ears.

We really should have a broader conversation about the practical applications of this stuff.


I'm not especially familiar with this, but I believe making the SVG element larger can increase its filter effects' resolution, and then using CSS transforms to scale the element's parent will return it to its original size, but with a higher resolution result. From there, additional changes to the filter effect (to incorporate a subtle blur for instance) may help it over the finish line.

Regardless, this is a great writeup for changes I wish to never see in ordinary UI.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: