HNHacker News
TopNewBestAskShowJobs

greggman3

4,044 karma · joined February 6, 2020

submissionscomments
greggman3··on The great Miyazaki watch of 2022
It's the same in Japan (15yrs in Japan)

That is not to say you can't find people of both sexes into anime. But, when I've asked at parties, unless it's specifically a nerd party, 19 out of 20 times people say they don't watch.

Back in the USA, at least at my age, it's frustrating being on the dating sites, in particular OkCupid, which has the questions "Would you date a comic book geek?". If I filter on that question it goes from thousands of people to just 3 in a 50 mile radius of SF. This dispite the fact that many famous people, especially famous movie and TV series directors are comic book geeks. Maybe the wording "geek" is enough to influence the result.

Another interesting one is "Would you enjoy a night playing video games". Just 2 women. This dispite the fact that the gaming industry says 45% of gamers are women. Either that stat is BS or else all the gaming women are in relationships.

Another one I find even more alarming and makes it feel like something fishy is going on "Do you like to wear a costume for Halloween?", just 3 women. But go to any Halloween party and it's fully mixed and seeing the Spirit costume shops all over the place someone is buying these costumes. Again one guess is that the people fun enough to wear a costume are not on the site.

greggman3··on Creativity requires solitude
Creativity is enhanced by social drinking and turning off your pre-frontal cortex

https://theinterval.org/salon-talks/02022/jun/14/drinking-10...

greggman3··on Too many Americans live in places built for cars – not for human connection
That is arguably because US cities suck. They don't have good public transportation, the kind that even well to do people choose to ride regularly like they do in say Tokyo, London, Switerland, Netherlands, etc.. They also don't have good bicycle infrustructure. And they have lots of crime or crime of the types and amounts that get people to want to live in the safer suburbs. Even the cities in the US are usually designed around cars, not people
greggman3··on GeForce Now: A Review
I used GeForce Now once

https://www.youtube.com/watch?v=ZzL3vcqvU7o

https://www.youtube.com/watch?v=Pk_BDC-juQU

Lol! Actually I was really impressed with GeForce Now. It came in super handy during a long move where my PC was on a boat for 2.5 months and a friend and I were in the middle of playing some games. Connected it to my Steam account and picked up right where I left off (kudos to steam too for syncing stuff)

greggman3··on Godot 4.0 will discontinue visual scripting
every AAA game artist I've ever worked with uses extensive keyboard shortcuts in Photoshop, Maya, 3DSMax, Blender, Zbrush, etc... Tons.
greggman3··on See what JavaScript commands get injected through an in-app browser
Wouldn't a simple solution be to require apps that aren't browser to list a limited set of domains they're allowed to access? Then you could use the WkWebKit view for your app but you couldn't use it to allow the user to browse the web.

Browsers would get a pass where Apple would come up with some rule but clearly the Instagram app, the Facebook app, the TikTok app, the Gmail app, the Google app, are not browser where as Firefox, Chrome, Brave are.

greggman3··on Google to pay $60M for misleading representations
Firefox is not better than Chrome.
greggman3··on The hacking of Starlink terminals has begun
I wonder when the first hacker will hack a satelite, fire it's retro-rockets to make it crash and cause the Kessler Syndrome, intentionally or not

https://en.wikipedia.org/wiki/Kessler_syndrome

Of course that could also happen with random bugs and no hacking I guess?

greggman3··on Google to pay $60M for misleading representations
You solve that problem by making a better browser, not by limiting user choice.
greggman3··on I 10x'd a TI-84 emulator's speed by replacing a switch-case
I like function tables. I think they are cleaner than switch statements

But, (maybe this is an invalid test), checking today my results suggest a switch is faster than a function table in 2022? At least at a base level. Maybe the more complicated the code for each case gets the less likely it is to get optimized.... which is true in general? large code blocks are less likely to get optimized and a switch is considered one large code block.

https://jsbenchit.org/?src=5c1e5bcf62448b6d1750b12893b0f0a1

greggman3··on Raw footage inside Sears with Atari 800 and 2600 (1982) [video]
The demo in the video

https://www.youtube.com/watch?v=jgT8279DVGQ

greggman3··on Fake Dog for Home Security
I grew up in suburbs and we used to leave our garage door open often up until day our bikes were stolen out of it.
greggman3··on Help pick a syntax for CSS nesting
> Contributing to web standards is not really accessible

How so? AFAICT if you want to contribute just go contribute. It's open to all. Discussions are had on public mailing lists, github, etc...

Here's one place to start

https://github.com/w3c

greggman3··on I remember feeling derisive about marketing as a young techie
My experience with marketing comes from games. In games, if you show marketing a new game they'll tell you it won't sell. They only want clones of the last hit. Where-as, IMO, their job is to get people to want your new game, not to ride off the coattails of the popularity of a previous game.

This one thing I've always admired about Nintendo. AFAIK (totally my imagination), the game dev team makes whatever they want and then they tell marketing "YOU WILL MARKET THIS AND MAKE IT A HIT!"

Examples might be Splatoon, Animal Crossing, maybe Smash Brothers, Pikman,

Where as I've been at plenty of companies where marketing effectively says "This is not a Call of Duty/GTA clone therefore it won't sell, therefore we will not waste time marketing it".

greggman3··on Ask HN: What do you code when learning a new language/framework?
I've ported this Boulderdash clone 4 times. It's arguably not a good way of exercising a language as it's pretty trivial, doesn't use any data structures or other interesting language features

https://greggman.github.io/rockfall/

greggman3··on Niantic undergoes layoffs, cancels four games
I don't think the holds. When Sony bought Columbia there's an apocryphal story of the USA executives explaining the business to the new Japanese owners and saying "We make 20 movies and only 1 is profitable". The Japanese executives talked to each other in Japanese and then replied "Please only make the 1 profitable movie". In other words, the mis-understood that the USA executives were trying to tell them they don't know which of the 20 movies is going to be a hit.

Going back to 2019 (so taking COVID out of the consideration), "Dark Phoenix" tanked, cost $200 million. "Gemini Man" tanked, cost $172 million. Plenty of 30-70 million dollar movies that didn't do well.

This page list 680 movies that came out, no list of budget but only around 1/6th made 10 million and I'm sure there's a long list of the ~500 that made less than 10 million that cost more than 10 million to make.

https://www.the-numbers.com/market/2019/top-grossing-movies

greggman3··on Visualizing Delaunay Triangulation
This is amazing! Thank you!

I wanted to point out that using `image-rendering: pixelated` ends up with extremely ugly diagrams if, like me, you're on a machine with a non-integer devicePixelRatio.

https://i.imgur.com/X3Xy4CE.png

Note: There's no way display an image in a browser 1x1 pixels, nor 1xN where N is an integer, without JavaScript. Say like your page, you set the canvas 768px, and you set its resolution to 384x256, Well on my machine with a devicePixelRatio of 1.3333333730697632 that means the requested display size 768px becomes 1024 devicePixels. 384 doesn't divide 1024 evenly and with `image-rendering: pixelated` that means every few src pixels is 3 pixels wide instead of 2.

Anyway, solutions:

1. Don't pixelate, instead go the other way, increase the resolution of the canvas and use scale or whatever other techniques to get smooth lines

2. Use JS to adjust the display size of the canvas so that it's some multiple of device pixels

Here's library for that: https://greggman.github.io/pixel-perfect.js/

Still not fully perfect because MacOS hides the true resolution of the display from apps but generally still ok as MacOS goes out of it's way to look good even with scaling.

greggman3··on Purdue Starts Comprehensive Semiconductor Degree Programs in U.S.
I didn't mean to imply they disdain the users, only the Web Platform itself and or specifically JavaScript.
greggman3··on 10 Years of Meteor
I enjoyed Meteor. Is there anything else out there right now that works as smoothly. Just install meteor and it installs a local copy of mongodb. Not a fan of mongo per-se, rather I'm a fan that meteor didn't require me to install it at a system level but instead installed it locally in the project at the version correct for that release of meteor. IIRC it even installed its own copy of node at a certain version. Loved it!

When I look into other frameworks today they all seem lacking. They expect me to setup the backend "how I want it" and then write my own glue. (and of course make all my own mistakes). Where as meteor, "it just worked" out of the box

greggman3··on Purdue Starts Comprehensive Semiconductor Degree Programs in U.S.
Not the same thing but ... In my experience, most browser developers (who write C++) don't know web development. In fact most of them disdane it, or at least that's how it feels. I find it kind of sad though I also understand it as I had the same attitude for the first 2~3 of years.
greggman3··on Write documentation first, then build
You'll find 100s or 1000s of article espousing the opposite. That you can't know what you want until you try building it. You can't see all of the issues and all of the problems and how your design really doesn't work until you actually try to build it.

Imagine a chef trying to come up with a new dish. I suspect they don't write it down first. They mix things in and then see what to add to make it better. Sometimes they fail but don't think they'd get there by making cards. Cards are not the flavor and docs are not the actual product.

Maybe it fits certain products more than others or maybe like everything it just depends, some projects succeed using the waterfall style, others need to improvise.

Generally I think I prefer the iterate and edit style to the plan everything before you start style. But I also don't like wasting time so I'd prefer to spend as little time as possible going down paths that will be discarded. But often I think you can't know it's the wrong path until you get there.

greggman3··on Challenge: Pixel perfect design
I'm only pointing out you'll get better results today, in all browser, by upscaling offline and then letting the browser downscale than upscale in the browser via `image-rendering: pixelated`

The question was "Why are they using image that's been upscaled offline" and I have a reasonable explanation why someone might want to do that.

TL,DR; because it looks better across devices.

greggman3··on Ask HN: Why does WWDC get 10x more views than Google I/O?
Do you have some evidence that OpenStreetMaps had a user experience similar to Google Maps in 2004? My recollection is it did not. It was like at best like mapquest. Click an arrow on the edge of the map, wait for the page to reload.

There were several maps before Google Maps but they didn't provide the smooth experience that Google Maps provides. Just like there were 100s of PDAs before iPhone but they didn't provide the smooth experience of iPhone.

greggman3··on Challenge: Pixel perfect design
> There is one: choose the size so that the image is displayed without scaling.

You're apparently not paying attention. There is currently no way to do that (except in Chrome via JavaScript maybe)

What size would you choose?

By default a browser will display the image at its natural size * devicePixelRatio. devicePixelRatio can be non-integer values. Further, the devicePixelRatio is fluid in Chrome and Firefox. Press Ctrl/Cmd +/- and it changes.

In Chrome (the only browser that's implemented ResizeObserver with devicePixelContentBoxSize), you can ask exactly how many devicePixels a given element is ... other browsers have not implemented this. And no, elem.getBoundingClientRect will not do it.

But, even if you have the API it would still be a pita. You'd have to take the size of your original image, figure out some integer-multiple that matches the current devicePixelRatio, pray that it still fits your design, create an element that large, then use the ResizeObverser to see if you really got that size. If not, adjust up or down a pixel at time until you do.

"pray that it still fits your design" means assume you had a 200x100 image you want displayed at 2x so 400x200 and the users DPI is 1.33. If you ask for 400x200 you'll actually get 532x266. Your 200x100 image will not scale pixel perfect to 532x266. You could, via JavaScript, compute what size to ask for to get 4x scaling. That size with a DPI of 1.33 is 300.7518796992481. You can't ask for a fractional size (well you can, but it's going to get rounded) But now your design no longer works. You expected the image to take 400 CSS units but it's only taking 300, too small. And, further, there's no guarantee you'll get 300. You might get 301. To find out requires the devicePixelContentBoxSize mentioned above

greggman3··on Challenge: Pixel perfect design
you're right, the spec changed Feb 2021

https://github.com/w3c/csswg-drafts/issues/6038

That said, my main point stands, Nearest Neighbor looks horrible when you have a non-integer devicePixelRatio which is relatively common. You'll get better results upscaling the image offline and then downscaling in the browser, rather than upscaling in the browser.

greggman3··on Challenge: Pixel perfect design
I'm saying it because I've actually read the spec. The spec

https://drafts.csswg.org/css-images/#the-image-rendering

says

> pixelated:

> The image is scaled in a way that preserves the pixelated nature of the original as much as possible, but allows minor smoothing instead of awkward distortion when necessary.

The spec does not say "use nearest neighbor". In fact in specifically allows not using nearest neighbor (end of first sentence). And further, it doesn't specify the algorithm used.

So there is no true definition of what you'll get. There is only a general definition of the intent.

greggman3··on Ask HN: Why does WWDC get 10x more views than Google I/O?
google maps? If you're going to claim mapquest existed before that then you'd need to remove ipod, iphone, ipad from the list above. All of those had products that came before but weren't hits.
greggman3··on Challenge: Pixel perfect design
There is actually no perfect solution

For one, browser's can't agree on what CSS solution to pick. Chrome and Safari have `image-rendering: pixelated` whereas Firefox has `image-rendering: crisp-edges`. The spec used to say pixelated meant "keep it looking pixelated" and that "crisp-edges" meant to keep the edges crisp and so allowed various algorithms. The spec was changed in early 2021 so that crisp-edges means "nearest-neighbor" and "pixelated" still means "keep it looking like pixels" which implies nearest-neighbor + extra.

It gets worse though. What is the web developer's intent?

Example: I put

    <img src="128x128.png" style="width: 256px; height: 256px; image-rendering: pixelated">
Seems straight forward right? I want my 128x128 pixel image displayed double size (256x256) where each original pixel is 2x2 pixels on the user's machine.

But, that's not how browsers work. My Windows Desktop has a devicePixelRatio of 1.25 so asking for a 256px by 256px CSS pixel image gives 317x317 device pixels. That means this 128x128 pixel image, scaled to 317x317 with nearest neighbor filtering is going to look really really bad as some pixels get 2x2 and others get 1x1 scaling. This is why `pixelated` = "nearest neighbor" may not actually be what the web designer wants.

Where as, if you manually scale the 128x128 image to say 512x512 using nearest neighbor and then let the browser scale it to 256x256 * devicePixelRatio using the default bilinear filtering it will likely look better.

Note: You can get these non-integer devicePixelRatio values on Chrome or Firefox just by zooming in the browsers (Cmd/Ctrl +/-). On Windows you can also go into the display settings and choose an OS level devicePixelRatio so that OS handled UI widgets and well written apps will adjust how they draw.

See example:

https://jsgist.org/?src=c65dfc4e2ed2e547a2d5aad69360be6d

Zoom in and out and, at least on my machines the right (pre-scaled externally and then scaled down) looks better than the left (original resolution with image-renedering: pixelated

greggman3··on The Birth and Death of the Office
I have a friend what has a company with ~20 employees. During COVID they all went WFH. After 12 months or so they announced they'd stay WFH forever and closed the office. 9 months later the president and office manager got new office. They realized they were more productive together than separated, more productive at a dedicated work space than at home with all the distractions, family, kids. They were also happier to be together, to spend time with their "work friends", etc... They have not asked the employees to come back to the office but several are of their own accord, finding their life better than being at home all the time alone or with just the people in their houses, rather than having a larger extended set of people to hang out with.
greggman3··on Berry is a healthy, byte-sized window manager written in C for Unix systems
This wouldn't work for me. I need to see my browser at the same time as my code. I could be referencing docs, looking up a snippet for chat, reviewing code and looking something up, all manor of things require both to be visible at the same time for me.
← PreviousPage 4 of 34Next →