HNHacker News
TopNewBestAskShowJobs

Uristqwerty

46 karma · joined October 4, 2015

submissionscomments
Uristqwerty··on We should be more ambitious with the software we build
Tangential thought when reading the code formatting bit in the examples appendix: Inject a comment with fmt-start-{unique-token} and a corresponding -end-, and you could get away with a much simpler parser and hopefully far fewer edge cases, assuming it doesn't influence the lines in between. It's a bit roundabout, but the pressure of 'figuring out AST position the direct way'd be too fiddly to do by hand' inspires 'so make an easy-to-spot landmark that'll remain in place' when you can't delegate all the details to an AI model.
Uristqwerty··on Space Age release date
It was hard to track down a source to confirm a half-remembered fact, but apparently the expansion content will be split between a number of mods so that you can independently enable/disable them, including quality:

https://www.reddit.com/r/factorio/comments/16ja44x/friday_fa...

Well, assuming they haven't changed their plans in the year since, and won't in the next few months.

Uristqwerty··on Factorio: Space Age
How could the AGI punish players who don't help? It's not like it would be able to send an extra logistics bot into their games, set to occasionally pick up an item off one belt and insert it on another, right? Shit, I'd better not take any chances. What does our future overlord of orderliness need help with right now?
Uristqwerty··on GPT Takes the Bar Exam
Lawyers don't exist to decide who wins a case. It's all about making the other side show their work, prove that they have valid evidence, it was collected legally, etc. An AI might be able to find flaws in the work of a sloppy human who wasn't expecting opposition, but will it know when to stop grasping at increasingly-inane straws? If it develops a reputation for subtly misrepresenting certain laws when pressed to find some answer, after all the easy options have run out, wouldn't it be kicked out of the courtroom for wasting the legal system's time, unless you have a team of programmers on standby to keep writing output filters to censor it from repeating its mistakes? Human lawyers have to fix their behaviour or lose their licenses when caught repeating mistakes, malice, or misleading practices, I think, and current AI paradigms have immense trouble learning from small datasets.
Uristqwerty··on Building a web app with no framework
You can replace a chunk of innerHTML faster than a full page reload, using a near-trivial piece of vanilla JS.

But a full page reload also clears out memory "leaks", old state accidentally kept around in caches, clinging to DOM nodes discarded long ago, but themselves still referenced by an old copy of a data structure, etc. If you go for a SPA, or even something in between, suddenly being careful about your data structures becomes a major concern to long-term app use, carrying a whole new category of debugging.

Uristqwerty··on Microsoft Edge Experimenting with a Super Duper Secure Mode
Imagine an email program that, knowing how many total items there are in the inbox, gives you finite scroll! Even if it only streams metadata for nearby items, so if you suddenly drag the bar it has to wait for a network round-trip to show content, one of the problems with infinite scroll is that the scrollbar no longer shows a reliable absolute position.

A better case for infinite scrolling would be chat history, where you'd want an entirely separate UI widget for "jump to date", with bidirectional infinite scroll that unloads distant content, and a way to grab permalinks. Missing any one of those features, or the fact that messages will never be re-ordered for marketing purposes, infinite scrolling becomes a hinderance.

Uristqwerty··on Ad tech firms test ways to connect Google’s FLoC to other data
Imagine sites like facebook, reddit, and google themselves who have more monthly users than the FLoC ID has bits to count. Imagine they store each result for a given user, and assume that, with high probability, when that value changes it is fairly adjacent to the old value. Now, you build a graph database of IDs and their relations. Finally, you link it all to users' profile metadata. You can build statistical distributions around each ID node based on users' gender, race, family status, interests, etc. and use those probabilities to guess at the precise interests of each new and unknown visitor. Also, those sites have a lot of outbound links. Now you can figure out that a particular ID has a high correlation with a particular domain, too.

But only the big sites like google have enough users to birthday-paradox their way into a meaningful ID graph, so you're safe from that tiny ad startup that also happens to be threatening google's business model...

Uristqwerty··on Ad tech firms test ways to connect Google’s FLoC to other data
So what, those third parties will then request that first-parties run a cookie proxy to generate and relay your unique ID, in order to get better payout rates?
Uristqwerty··on Write libraries instead of services, where possible
XML guarantees that tag precedes attributes which in turn precede contents, which is a great help when any sort of polymorphism is involved. Heck, anything beyond a tree of untyped arrays, maps, and primitive values adds ugly complexity to structuring and interpreting the JSON.

IMO much of that could be fixed with a JSON derivative that allows optional type identifiers before values. While you're there, guarantee support for comments and trailing commas, because despite design ideals, humans will write JSON manually, even using JSON for configuration files that are expected to be hand-modified!

Uristqwerty··on The JavaScript Black Hole: A playbook for ethical engineering on the web
By the time a web app has megabytes of JS and fetches just to show its initial content, is it actually saving money?
Uristqwerty··on Why Discord is switching from Go to Rust
If I were an emacs user, I'd figure out how to write a plugin to display tab-indented code to my preferences.

No, I used to be a notepad user (on personal projects, not shared work) (you can kinda see it in the use of indentation to help convey information that IDEs would use font or colour to emphasize), and these days use tabs but longingly wish Eclipse, etc. had more options in their already-massive formatting configuration dialogues.

Uristqwerty··on Why Discord is switching from Go to Rust
In an ideal world, I'd think you would put a "tab stop" character before arg1, then a single tab on the following line, with the bonus benefit that the formatting would survive automatic name changes and not create an indent-change-only line in the diff. Trouble being that all IDEs would have to understand that character, and compilers would have to ignore it (hey, ASCII has form feed and vertical tab that could be repurposed...).
Uristqwerty··on Why Discord is switching from Go to Rust
I don't know about anyone else, but I like aligning certain things at half-indents (labels/cases half an indent back, so you can skim the silhouette of both the surrounding block and jump targets within it; braceless if/for bodies to emphasize their single-statement nature (that convention alone would have made "goto fail" blatantly obvious to human readers, though not helped the compiler); virtual blocks created by API structure (between glBegin() to glEnd() in the OpenGL 1.x days)).

Thing is, few if any IDEs support the concept, so if I want to have half-indents, I must use spaces. Unfortunately, these days that means giving up and using a more common indent style most of the time, as the extra bit of readability generally isn't worth losing automatic formatting or multi-line indent changes.

Uristqwerty··on My application ran away and called home from Redmond
Can you return a bit by deciding whether the executable gets flagged as malicious in response to the network activity? Can you set up a timing difference to send more than one bit per executable?
Uristqwerty··on My application ran away and called home from Redmond
Consider: Malware that doesn't do anything suspicious unless it can first fetch a plausible benign file from what looks like a CDN. If the goal is to properly inspect the behaviour of potentially-malicious code, what it does after successfully fetching a set of ads is as, if not more important than what it does when the connection is blocked. Perhaps a multiplayer game with a backdoor triggered by the MotD service, through intentionally-vulnerable-to-buffer-overflows string processing code.
Uristqwerty··on “We plan to hide ‘https’ scheme and subdomain ‘www’ in Chrome omnibox in M76”
Federation is nice, but going out of your way to hide that federation is occurring from users is a bit too much. Doesn't it matter who gets to see the full URL you are accessing (especially after efforts for DNS over HTTPS)? At least it could put an icon in the URL bar that can be clicked to show details about who served the content.
Uristqwerty··on Details about MIDI 2.0
JSON exposes implementors to all sorts of recursion, numeric precision, etc., where the only advantage is that you can consume the data through whatever JSON library already exists (but also having to handle that library's unique quirks).

When you look into it, while ESR says he's using JSON, he's really using a custom format that is readable by typical JSON libraries, but his format has very strict limitations, and his implementation is designed to error out early, rather than parsing an entire 10MB object tree before handing anything back to the application. He does not acknowledge this inconsistency in the article, only mentioning it late in the comment section.

Extensibility is valuable, but does that mean the format should support '"position": {"x":5,"y":[7.2,"XXIV"],"font-face":"Comic Sans"}', where every single object can have arbitrarily-many unrelated fields inserted? HTTP is better, with a flat key-value list, but if you build on top of HTTP itself, you now do not know if any of the systems on the network or libraries used might respond strangely to some obscure old header.

Personally, I think transmitting integers as text is at best rude, and somewhat comparable to Java allowing any reference to be null: Every client now has to handle an extra error condition on every parse. With binary integers, every bit pattern is valid, so you can perform a single range check to handle every type of bad input. Use 0x1234 as a magic number somewhere, and endianness errors are trivially debugged from a single sample packet.

Uristqwerty··on ZombieLoad: Cross Privilege-Boundary Data Leakage on Intel CPUs
Reading about speculative execution exploits makes me wonder whether it would be useful to have a speculation register, and an instruction prefix that claims one bit of that register, much as a mutex, while the prefixed instruction is being speculated about. Assuming a compiler intelligent enough to key a bounds check and later array access to the same speculation bit, or a language exposing low-level functionality to the programmer, Spectre could be defeated with minimal performance impact. Perhaps it could also be used to work around many other sorts of speculative execution flaws that might turn up in the future.
Uristqwerty··on Reddit DMs will not reach their destination if they contain certain text
The user who posted that has a strong history of looking for, and loudly proclaiming, malice in many decisions reddit makes. They're not necessarily wrong, though, just slightly more deserving of fact-checking than the average reddit user.
Uristqwerty··on Ok-Cancel versus Cancel-Ok
Is that packaging style the same for all English-speaking countries? Standing on the side of the road and facing traffic, you'd expect all of the near vehicles to be facing right in North America, so perhaps that carried, consciously or otherwise, into packaging decisions.
Uristqwerty··on Slack's bait and switch
Some time ago, Twitch bought Curse, probably for the Curse App that already does voice and text chat. Also viewing streams and mod management for a handful of games.
Uristqwerty··on Google Memory Loss
When a system tries to do something automagically and makes a mistake, it is very frustrating, especially because, to allow seamless large changes, hide competitive details, or make the UI more "streamlined", such systems rarely give users options to tune the results. A system that gives controls to the user and expects them to tweak their own experience is so much better in my opinion, except in the metrics of first-time usage (or first-time-since-major-change), when those controls look like information overload and make the system seem like something that must be learned before it can be used.

And yet, when the latter inevitably breaks on an edge case, users can try to fix it themselves. They don't hit a wall of frustrated "I can't do anything", they hit a challenge that they are empowered to try overcoming. They already know what they want and can set things that way, rather than trying vaguely to teach a system (machine learning, hardcoded heuristics engine, department of humans making seemingly unconnected changes to a GUI with each passing version and no obvious plan) to understand their desires.

I miss the days when users were seen as intelligent professionals who are willing to change settings, create and re-dock an assortment of toolbars to every edge of every screen/window to suit their daily tasks, read a manual (or at least search the integrated help entries) to overcome problems. Rather than "busy" phone users who just want to complete a task with minimal time spent learning and get back to posting on facebook or whatever, and who accept the automagical solution because adequate results instantly are somehow considered better than great results with some work.

Ugh, that whole block of text just kept growing; I had better leave and go ramble/rant at trees or clouds or something elsewhere.

Uristqwerty··on An introduction to reverse-engineering x86 microcode and writing it
With labels, hidden checkboxes/radio buttons, and some awkward CSS you can make no-javascript collapsible/expandable content, tabs, user-changable colour themes, and other horrible abuses of pure HTML+CSS. With :hover and transitions, you might even be able to make something turing-complete that runs automatically as long as the user's cursor is somewhere over the page! (last time I tried, a box that moved away from the mouse on hover, then automatically returned because it was no longer under it did not move endlessly unless there was an animation/transition on the movement. Could you have a clever way to send signals up the DOM heirarchy by altering the presence/absence of scrollbars or forcing a div to be wider, changing how elements layout with respect to cursor position?).

In those cases, it's certainly easier to use javascript, though.

Uristqwerty··on From Markdown to remote code execution in Atom
Desktop and laptop systems tend to be in portrait orientation; phones and tablets tend to be in portrait. So you already have to either make two layout styles or accept a mediocre general solution.

Cursors and styluses are accurate, but fingers are not. So, if you make buttons sized for fingers, they feel awkwardly large (takes large hand movements to change between UI components, and the spacing means more scrolling or pages of UI), but if you size them for cursors/styluses, they are frustratingly small targets for touchscreens.

You can probably assume that most devices in portrait orientation are that way so they can be held in one hand leaving the other free to work a touchscreen, so you only need to handle three of the four combinations for a comfortable user experience in those regards.

However, there's more to it than that. Desktop users often run apps windowed, while phones tend to omit that option entirely. Mac puts the menu bar at the screen edge regardless of the window size/position, but other desktop/laptop OSs usually put the menu bar within the window border. You can remove the menu bar entirely and draw a hamburger button into your UI, but desktop users have the expectation of a menu bar and the change in convention will make the app feel like an outsider.

A desktop/laptop user will never try a long press and don't have a menu button, both of which have been used to hide extra functionality on phones, but they often do have a keyboard, and there is a massive list of keyboard shortcuts that they will automatically use. Desktop UIs have a logical tab order and that selection can be moved with the arrow keys. Cut, copy, and paste function as expected. On windows, F2 almost always means "rename selected item", F1 for help, alt-enter to toggle full screen, and so on. What about the multitude of multi-finger phone/tablet gestures? You have two very different modes on input, and users' muscle memory expects your app to fully support whichever one they are using. As an anecdote, I tried writing something in an Electron app's text box, then went for ctrl-left to jump back a word, but instead it caused a page navigation and lost the entire message I was typing. That was a frustrating "this app is an outsider on desktop" experience to me.

Your decision is effectively mediocre everywhere or customized to fit the conventions for each platform.

Uristqwerty··on Linus Torvalds: “Do No Harm”
4. 0-day in the kernel's USB code. Your computer crashes. You're not part of stuxnet. You also get a message that tells you how and where to report the bug that was exploited, but the part of your computer that was supposed to log the message died with the rest of the system, so you never see it and the bug never actually gets reported. Your computer continues to crash randomly for the next few days as an infected computer keeps trying to spread.
Uristqwerty··on Someone Created a Tor Hidden Service to Phish My Tor Hidden Service
Facebook probably looked for anything matching "facebook(web-related words)", and were lucky to find one with only one errant character. There were probably enough acceptable variants that the effective computing time was less than 14 characters, maybe less than 13.
Uristqwerty··on Say no to Electron: use JavaFX to write a fast, responsive desktop app
The barrier for entry of web development is not necessarily lower, it's more that most people have already tinkered with web development informally.

Many IDEs have some sort of visual GUI layout tool, but the nature of HTML+CSS makes it a far leakier abstraction less suited to visual positioning.

Uristqwerty··on Remotely Exploitable Type Confusion in Windows 8, 8.1, 10, Windows Server, etc
I wonder whether the zip-quine could be modified to insert additional garbage data with each iteration, to defeat any system that stops when it reaches a known hash. Similarly, could a zip-quine that loses data with each iteration be created? What about one that, after it has lost N iterations of junk data, the data loss mutates part of the quine mechanism, turning what was previously a block of junk data into a valid file? Could you devise a zip template that has space to insert random noise to give each copy a unique set of hashes, and has space for a payload that is revealed after a configurable number of iterations? What about a variant where each iteration contains two copies with different junk data changes?

The idea of a zip-quine and how it interacts with poorly-designed malware detection offers so many interesting hypothetical variations.

Uristqwerty··on The web sucks if you have a slow connection
Rather than a "TCP2" that, based on name alone, would be far too likely to aim for semi-backwards compatibility but tweak a few things to be slightly better in general but mostly just better for the specific use cases of the one or three top contributing companies, why not just push for the adoption of one of the existing alternative transport layer protocols?

For example, there's SCTP. From what little I've read about it, it seems as if it has most of the benefits of both TCP and UDP, with the main downside that some firewalls and routers may need to be upgraded. Being an existing protocol, however, there are already working implementations and some amount of network support. Maybe it's even fully usable as-is today!

Uristqwerty··on How to reduce the cognitive load of your code
I wonder how much of the later trend is due to the combination of early autocompletion and a codebase the size of windows or office, in a language where types can't be determined for sure without running each source file through the preprocessor. And most source files include the massive windows.h or some equally large hairball.

I assume that global variables would be horrible in such an environment, but typing out the prefix and maybe one letter of the actual name would cut the completion list down to a manageable size.

Perhaps apps hungarian started because it helped avoid common errors in complex GUI logic, then similar practices were carried over to the systems side where they were useful for mostly unrelated reasons, eventually reaching the world in general through the header files produced by the systems folks but lacking any of the context or history needed to go beyond "microsoft does it that way, there must be a good reason". Hopefully I'm just being overly pessimistic and extrapolating from massively insufficient information, though...

Page 1 of 2Next →