HNHacker News
TopNewBestAskShowJobs

zanecodes

461 karma · joined September 27, 2016

submissionscomments
zanecodes··on Barrier: Share mouse and keyboard between computers
According to the Particle Photon docs [1] it's actually capable of moving the mouse to absolute coordinates, but I haven't tried that yet.

[1] https://docs.particle.io/reference/device-os/firmware/#movet...

zanecodes··on Barrier: Share mouse and keyboard between computers
I can't install Barrier on my work laptop for policy reasons, but I don't want to buy a KVM, so a project I've been interested in building when I have time is porting enough of the Barrier/Synergy protocol to the Particle Photon [1] or BeagleBone Black [2] I've had lying around for a while, and then configuring it to emulate a keyboard and mouse via its USB gadget driver, allowing it to control my work laptop over USB.

On the Photon at least, emulating a keyboard and mouse is incredibly easy and is baked into the firmware, but implementing the Barrier protocol so that it can appear as a client on the network and pass on the keyboard/mouse input seems like it's going to take some effort.

[1] https://docs.particle.io/photon/ [2] https://beagleboard.org/black

zanecodes··on Universe Splitter
Is it? For one reason or another I thought there was a distinction, although reading back what I wrote a second time I can't figure out what it would be.

It's interesting to consider the implications of this line of thinking though; it seems like it would imply that causally-disconnected regions of spacetime (i.e. things outside of our light cone) are forever in a superposition of all possible quantum states, from our perspective, among other things.

zanecodes··on Universe Splitter
This relates to an interpretation of QM that I have not personally found much reading material on, the idea that wavefunction collapse is actually just entanglement; that is to say that as soon as a system in a superposition interacts with the outside universe, the outside universe becomes entangled with the system, thus putting the entire universe into a superposition where both outcomes are observed.
zanecodes··on Wordle is pretty damn smart in many subtle ways
Another cool instance of this was 2048, when it first came out. I was in college at the time, and for at least a month you could see a half dozen or more games of 2048 on the screens of any given classroom's laptops.
zanecodes··on Intel's $20B Ohio factory could become world's largest chip plant
And Rose-Hulman!
zanecodes··on Is human behavior just elaborate running and tumbling?
Run-and-tumble sounds an awful lot like stochastic gradient descent
zanecodes··on Long Error Messages
Also good points, I suppose the printing mechanism couldn't use the type's implementation of toString() and would instead have to use an implementation built into the runtime. Still, even being able to see just the raw bytes would be better than nothing in a lot of cases.
zanecodes··on Long Error Messages
That's a good point. I would also like very much if languages included a sensible and useful default implementation of toString() or the equivalent for all types (e.g. print all the object's private & public property names & values, recursively, stopping if cycles are found).

Of course, this is probably only remotely feasible in languages that can guarantee that toString() won't have any side effects.

zanecodes··on Long Error Messages
Agreed, but this would help force developers to deal with treating secrets with the care they should have been treating them with all along, in my opinion.

PowerShell's [SecureString] type is something of a step in the right direction, although its execution is lacking in some respects.

In any case, stack traces should _always_ be treated as secrets.

zanecodes··on Long Error Messages
One thing I've never understood is why stack traces don't, at a bare minimum, contain the values of the arguments passed to the function that threw the exception. That would be immensely helpful for reproducing the error.

Even better would be including the current values of any local variables introduced within the function, and any global variables referenced within the function.

zanecodes··on Hubble Space Telescope captures rare Herbig-Haro object in detail
As a recent hire to the Space Telescope Science Institute which produces the software packages used to process and analyze Hubble (and soon Webb and Roman) imagery, I'd be happy to answer any questions on the topic to the best of my ability. I'm more on the DevOps side so it will be an opportunity for me to learn more about it too!
zanecodes··on My Tungsten Cube (2019)
The Amazon seller mentions that pure tungsten is typically too brittle to machine.
zanecodes··on Binary Trees are optimal except when they’re not
Ideally the decision would occur at compile time rather than runtime, to eliminate the dispatch overhead, so I think it would be likely to require macros, constexprs, or whatever compile-time execution mechanism is available in your language of choice
zanecodes··on Binary Trees are optimal except when they’re not
You're right, and I think a lot of data structures (all of them?) can be seen as special cases of relational databases. I also feel like there are similarities to logic programming languages like Prolog and Datalog, and a language that combined them while still allowing the programmer to finely tune performance through explicit hints could be powerful.
zanecodes··on Binary Trees are optimal except when they’re not
This makes me wish that we had a language (or library, or runtime, take your pick) that abstracted away performance concerns.

As an example of how this might work, suppose you want a data structure that provides an ordered collection of items, with the ability to insert, randomly access, remove, and iterate over them. The compiler/library/runtime might be able to supply any of a binary tree, a linked list, or an array. You, the programmer, have some idea of the distribution of the data that will be stored in the collection (e.g. the collection will contain integers between a specific range) and the operations your program will perform on it (e.g. the collection will never be iterated over, insertions will be twice as common as removals, only the first/last elements will ever be accessed at any given time). The compiler knows the performance characteristics of each of the operations over various distributions of data (e.g. linked list insertion has a cost of O(1), random access has a cost of O(n), removal has a cost of O(1)). The language would allow the programmer to provide the compiler with hints about the expected distributions of data and operations, and the compiler would use this to pick the optimal data structure for the use case. Another example might be the compiler picking a sorting algorithm automatically, based on the expected distribution of collection sizes and data (e.g. automatically pick insertion sort of the collections are typically small and already partially sorted, but pick merge sort if they are typically large and unsorted).

It would also be interesting if this language/runtime could enable sampling of statistics on the actual observed distributions of data/operations under production workloads, and make it easy to update the programmer's specified distributions to get better performance with minimal effort. Or if the compiler could be given the performance characteristics of the target hardware as well, which could impact its choices. Maybe the program will be reading from an SSD, making the overhead of caching something in memory no longer worth it?

More broadly, it would be very cool if program semantics and performance could be decoupled entirely, and the compiler could have the ultimate freedom to pick the optimal data structures and algorithms so long as the program's observed behavior remained the same.

zanecodes··on NASA Returns Hubble Space Telescope to Science Operations
It probably won't ever be serviced or upgraded, for several reasons:

It's orbiting at the Earth-Sun L2 Lagrange point, with a perigee of 374,000 km

While we can put astronauts in space, we don't currently have any orbital vehicles with on-orbit satellite maintenance capabilities, since none of them have airlocks

The latter could very well change over the next few decades though, and the former may become economical, so I guess it can't be entirely ruled out.

zanecodes··on I made an eInk newspaper
Interesting; found a few words about it here: https://www.eink.com/e-ink-film.html Very curious as to how it works.
zanecodes··on I made an eInk newspaper
As far as E-Ink goes, my understanding is that it works by moving charged ink particles from one end of a microscopic capsule to the other, so that white and black particles switch places, resulting in a visible color change. All this is to say that the display surface isn't exactly changing color or opacity, it's just moving it around, so I doubt it could be used to create a surface that goes from transparent to opaque and vice versa.

On the other hand, LCD could be used to create an opacity-changing window, but LCD panels block a lot of light even when they're fully "transparent," which is why they consume so much power (their backlights have to be very bright).

zanecodes··on Tesla's “full self driving” beta is potentially dangerous
Yeah, it's something I'd be interested in reading more about: how do we define "better" in this context? Better for whom: society as a whole? Pedestrians? Drivers of self-driving cars? Passengers of self-driving cars? Drivers of non-self-driving cars? And so on...
zanecodes··on Tesla's “full self driving” beta is potentially dangerous
Personally, I would consider success to be when it drives statistically better than _me_, not just _most people_. It really depends on how you choose to aggregate your data; if it's better on average, well, the average crash rate per mile driven for human drivers could be dragged down by a minority of very bad drivers. If that's the case, then if everyone bought a Tesla and used FSD, the total crash rate per mile driven would go up, despite FSD being "statistically better than most people" by that measure.
zanecodes··on Azure Active Directory down
Nope. Their load balancer seems to strip the `@db_name` from connections, and anyway some software doesn't like having an @ in Postgres usernames (which is probably also a sign it's vulnerable to SQL injections)
zanecodes··on Azure Active Directory down
Their managed PostgreSQL offering also has fun quirks, such as that you have to connect using `username@db_name`, but your actual username in the database is still just `username`, so any third party software needs to support using a different username to connect than it uses to perform user-related queries (they have some sort of application-level load balancer in front of it that uses `db_name` to route the connection).
zanecodes··on An experiment in giving cash to recently homeless people [video]
I believe they mean Land Value Tax [0] in the Geoism/Georgism [1] sense, not in the traditional property tax sense; the main difference being that a land value tax does not take into account improvements to the property (e.g. buildings, parks, or any other development).

Personally, I would be in favor of UBI, even as someone who would see a net loss on it after taxes, since it would mean that if I ever lose my job (or choose to quit), I will still have the UBI to support myself with while I look for a new one, making it a less stressful event.

[0] https://en.wikipedia.org/wiki/Land_value_tax [1] https://en.wikipedia.org/wiki/Georgism

zanecodes··on Preparing to Issue 200M Certificates in 24 Hours
I'm somewhat familiar with certificate handling in general, I had just forgotten how Let's Encrypt performs domain validation; it's been a few years since I used it and it's worked so well that I haven't had to think about it since, which is probably a testament to its stability!

To be sure, PKI and certificates in particular have a lot of room for improvement in the UX department. Especially on Windows, where one frequently has to deal with not just .pem files but .cer, .pfx (with or without private keys), and more.

zanecodes··on Preparing to Issue 200M Certificates in 24 Hours
This makes me wonder about the feasibility of performing an attack by

  * man-in-the-middling Let's Encrypt and a particular domain (or DNS, depending on the domain validation challenge)
  * requesting a new certificate for that domain
  * spoofing the HTTP resource response (or DNS response, if applicable)
I suppose this is mitigated by the way Let's Encrypt validates the agent software's public key on first use though, at least for websites that are currently using Let's Encrypt.
zanecodes··on Preparing to Issue 200M Certificates in 24 Hours
Ah yes, that makes sense. Let's Encrypt requires proof of domain ownership, which at least ensures that the entity you're connecting to is the entity that owns the domain. Encryption without authentication wouldn't be very helpful, since a man-in-the-middle could just present their own self-signed certificate during the handshake...
zanecodes··on Preparing to Issue 200M Certificates in 24 Hours
Very probably I'm missing something, and I love Let's Encrypt and the service that they provide, but... the point of Let's Encrypt is to bring SSL/TLS to more websites, right (and not necessarily to provide identity verification, since the automated renewal process doesn't really require any proof of identity for the entity requesting the certificate)? Why couldn't that have been accomplished using self-signed certificates, and having browser vendors remove their big scary warning pages for sites using self-signed certificates for SSL/TLS? Do certificates from Let's Encrypt provide any security benefits over a self-signed certificate?
zanecodes··on Change your MAC address with a shell script (2019)
Since most paid wifi networks let you log in without a network password and then gate internet access by redirecting HTTP/DNS requests to a captive portal, it should be possible to launch an ARP spoofing attack [0] to impersonate the default gateway, causing all clients to route their traffic to your device, whereupon you can examine it with WireShark or tcpdump to get at their MAC addresses. I've tried something similar while bored on a flight, but sadly the Surface Pro 7's Windows network drivers don't seem to let you change your MAC address.

[0] https://en.wikipedia.org/wiki/ARP_spoofing

zanecodes··on Apple urged to root out rating scams as developer highlights enforcement failure
Maybe what app stores should do is give apps a 3-star "implicit" review by default, when the user downloads and installs the app. This could possibly also be deleted when the user uninstalls the app. This way, users who don't feel strongly enough about the app either way to give an "explicit" review are still represented in the app's overall rating, and the impact of early good/bad reviews is diminished.

On the other hand, this would probably cause app ratings to tend much more strongly towards the median, which could make them less effective signals of quality.

← PreviousPage 4 of 5Next →