HN user

kroltan

1,940 karma

Game developer passionate about user-generated-content games. (think Mario Maker, not NFTs!)

https://kroltan.me/

"<the initialism of the orange company> at <an email provider that only I would use>", thanks for not offering products or services, and not storing this information in mass systems.

Posts3
Comments739
View on HN

The internet doesn't need to be the cloud.

Security cameras are the classic example of widespread self hosted but internet-accessible.

Even the ones that have proprietary apps are often just alternative frontends to a web server running on the home network.

If the time comes to discuss operating systems, I always suggest an exercise of downloading a Windows 11 Home ISO and installing it into a virtual machine, look at how much of it is installing an OS versus upselling into services using every dark pattern in the book. (With such hits as "the No button is hidden under a link-button called Learn More and only appears if you choose an advanced installation")

Once you're using it for >month, it's easy to see the BS as just an occasional inconvenience because saying yes is so much easier.

You would assume wrong, many (asshat) employers require them, so much that I actually have to screen that kind of sillyness when interviewing. Works a treat to filter out toxic workplaces, but exists nontheless.

As for leaking assets, maybe it does not affect the company at large, but that literally does not matter for this discussion. It will definitely affect your relationship, most often negatively.

And in any case, my usage of assets was clearly general, substitute the example for "clicking on the wrong stored tab while screensharing" can just as well lead you to leaking a plan.

And to spell it out:

- Stylesheet encoded as base64 in the Link header;

- Browsers always implicitly have at least the html and body tags;

- CSS cannot create new elements, but it does get 2 free pseudo-elements per actual element, ::before and ::after;

- CSS can set textual content for pseudo-elements;

So, it sets content to a pseudo element of an implicitly created tag, that's why the page is so minimal.

(Well, it could be up to 4 times as complicated I think, by using the other 3 pseudo-elements. Or cheat by using a big SVG as a background-image with more complex contents, but then you start running into header size limits and whatnot)

- Endpoint monitoring software may compromise more than it strictly needs to;

- If you're a contractor, risk of leaking other clients' assets (running `tree` in the wrong folder while screensharing or more subtle variations);

- Shredder policy, done with the work = destroy hardware (though I don't think companies with shredder policy would incentivise personal laptops, you never know)

PHP 8.4 2 years ago

The `field` keyword also already existed in C#, to add attributes to the backing field of automatic properties, so I think the argument was easier there.

I used it in Unity projects to have serialized/inspectable values exposed through properties:

    [field: SerializeField]
    public int MyProperty { get; private set; }

I think the issue with a very long line is akin to writing without punctuation because code is usually much more information dense than prose it becomes hard to follow what it is supposed to mean than if there were pauses for you to consider points in isolation but otherwise I don't see a problem with long lines if you have for example some very long silly OOP getter chain which is essentially one expression as for tons of nested blocks the general argument is it's a hint that your single unit of base indentation is doing too much and there is possibly something to be done about it though like everything it is usually taken to a unhelpful extreme.

Yeah, I've had to explain that a couple times already, usually when dealing with customer support or in-person registrations.

And a "malicious" actor can get away with pretending to be another company by spoofing the username if they know your domain works like that. I don't think this has reached spammers' repertoire yet, but I wouldn't be surprised.

Eventually I'd like to have a way of generating random email addresses that accept mail on demand, and put everything else in quaraintine automatically.

Yeah I don't think I ever saw one either, but at least over here you can bring it over to a counter, or request an employee to turn it on and test.

Obviously not viable for evaluating continued operation for something like a fridge, but just turning it on for the panels is usually possible.

Did you happen to have used uBlock Origin during your stay?

It's the most common source of browser-load latency, as it by default blocks the main page request until it is able to load its blocklists, so when you open the browser afresh, or reopen a window, it takes a while until the browser gets to continue loading the thing you asked.

I think by default it comes as enabled in Firefox, go to the "uBlock settings > Filter Lists > Suspend network activity until all filter lists are loaded", though of course it is a tradeoff.

From the Wiki: https://github.com/gorhill/uBlock/wiki/Dashboard:-Filter-lis...

In Firefox-based browsers, this setting is enabled by default. Disabling it gives the option to potentially speed up page load at browser launch, at the cost of possibly not properly filtering network requests as per filter lists or rules.

In Chromium-based browsers, this setting is disabled by default, since Chromium-based browsers do not support natively suspending network requests.2 Enabling this setting in Chromium-based browsers may lead to negative side-effects at browser launch.

For e-mail addresses as an authentication tool, you don't really need to be able to send emails at all, just receive them, and I think that is pretty feasible to not run afoul of the usual shenanigans.

It is a popular design convention, there are even generators to convert regular screenshots into this angled and depth-of-field style. There are 2 important properties this convention has:

First, it makes it obvious that the UI being presented is not part of the website, but a screenshot, so people don't trying to mess with it like it's an interactive widget.

Second, it showcases a general feature without inviting scrutinising the details of the UI, which a general product page isn't the best place to do so anyways.

---

(Personally I do love a good software Screenshots page, but that can be a separate thing IMO)

Canvas would still be faster even if you used a full-screen box. Just the string concatenation overhead of doing this with box-shadows is insanely wasteful.

Which isn't to demerit the hackish creativity of taking one thing and running with it! But if you wanted to do a ball painting effect like that outside this "what if" context, it would be technically irresponsible to do it with box-shadows.

Bento3D 2 years ago

What does MCAD stand for? Is it a different version from regular SolveSpace, or are you just describing what it is?

How do we add more colours (besides just picking a random colour, which wouldn't be helpful)?

By sampling the signal more often ("multi-sample anti aliasing"), also known as increasing the resampling rate, then representing that with a wider bit depth (not just 1 bit "yes/no", but multiple bits forming a color/opacity), since we do have more than 1 bit per pixel that can be used already.

I'll give it to you that this is "anti aliasing", not "not having aliasing in the first place", but the Fourier argument above is the reason why in computer graphics we practically always have to "settle for" AA instead.

These are the same thing. A shape with a solid boundary is a a signal with a discontinuous step: If you Fourier it, it has infinite nonzero terms, therefore you can't represent it exactly with any finite amount of frequencies, and therefore a finite amount of samples.

In the case of Moiré patterns in pictures, we have lines in the real world that need to fit into pixels that fit a larger area than the Nyquist rate of those lines. The Moiré effect in pictures is just the interference pattern caused by this aliasing.

If you look at just a column of the image, and imagine the signal as being the brightness varying over the Y coordinates, you can imagine the mortar being an occasional regular pulse, and when your sampling rate (the pixel density) isn't enough, you get aliasing: you skip over, or overrepresent, the mortar to brick ratio, variably along the signal.

https://imgur.com/a/BiZcxG5

Now if you look at the graph in that picture, doesn't that look awfully similar to what happens if you try to sample an audio file at an inferior rate for display purposes?

In fact, try it right now, download Audacity, go to Generate>Tone, click OK with whatever settings it's fine, press Shift+Z to go down to sample level zoom, then start zooming out. Eventually, you'll see some interesting patterns, which are exactly the sort of aliasing caused by resampling I'm talking about:

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

Sure it is, it's the first thing to be said just after the title and widgets

This article is about aliasing in signal processing, including computer graphics.

In computer graphics, the relevant aliasing is spatial aliasing, in fact mentioned in the article: the signal is the fundamental shape (such as a font glyph or a triangle mesh or whatever), and the samples are the pixels.

In the specific application of a waveform, a typical "CD quality" audio file has 44.1 thousand samples per second, and say, 16 bits per sample. If we want to display the waveform of one second of audio horizontally on an entire standard low-density full HD computer screen, we have 1920 samples to fit our 1 second of audio data, and 1080 samples of amplitude with which to paint the amplitude.

Putting it into signal processing terms, The signal frequency here is 44.1Khz, and the sampling frequency is 1.92Khz. Do you see how aliasing applies now? We want to represent f_Signal / f_Sample = 22.96875 samples of audio with 1 sample.

In practice you get an even worse ratio, because we usually want more than 1 second of waveform to be visible on a region that isn't the entire screen.

I don't think "unresolved variable" is listed as an actual error in plain JS in WebStorm? At least by default.

In any case, like any inspection, you can adjust its severity to whatever you find appropriate, including "don't show it at all".

File > Settings > Editor > Inspections > Javascript and Typescript > General > Unresolved reference.

Or directly from the "Show Context Actions" action (Alt+enter or whatever you have it set to, the same combination that shows refactoring actions), you can navigate the inspection like a submenu and select "Edit inspection profile setting".

https://i.imgur.com/3XCwxI1.png

Not really at all, the type checker understands it is a field reference (it's just an alternative syntax after all, it is absolutely 0% difference in behaviour.

However, it's a common typed-javascript idiom to use string-indexing when you're probing a value of unknown type. Even Typescript has settings to accept this.

For (the vast majority of) games the player can be looking at anything on screen, not just a specific point.

In real life, eyes track objects in order to minimise blur.

But realtime motion-blur implementations just blur everything that moves relative to the camera, which is not correct, and makes the human looking at the screen lose track of the objects they were looking at.

If we had pervasive perfect low latency eye tracking then a game could pull off something that actually looks plausible, but that is not the case, so the only games that can get away with it are the ones that are largely a movie and can take advantage of the motion blur cinematographically.

Ok, thanks, then I'm not missing something obvious, heh.

You make a good point of caching the XSLT file itself though, I hadn't considered that. Simple server outputs XML data, browser renders into a page.

I just recently moved my personal homepage to XML + XSLT. Not a pro at it at all though. I did enjoy the process, I like the idea of building the website out of data + templates, but that's not unique to XSLT.

Besides some papercuts / browser bugs like "refreshing the page desyncs the inspector", the main issue I find with it is I don't see how I can modify things dynamically?

By the time JS runs, it's on the resulting HTML DOM, not the XML source, so I can't add elements dynamically respecting the XSLT stylesheet?

Also, XML must be well-formed and have a single root, I can't stream it out on the server piecewise?

With those 2 limitations, I don't see any advantages over any other server-side templating language, it just duplicates work that could happen once in a SSG or at least cached in a CDN, onto every client computer.

Go Enums Suck 2 years ago

I'm assuming because of erasure?

In C#, List<T> and List<U> follows the same assignment rules as T and U, and at runtime are represented by distinct types. That means that going from List<T> to object to List<U> causes a runtime error at the point of casting.

In Java, every generic type is erased to object at runtime, so the runtime type is just List, and you could cast List<T> to object to List<U> and only get an error later, when you try calling U methods on the contents of the list.

(Yes in C# List is a concrete vector type and in Java it is a random-access collection interface, but that is not relevant here)