Better HN
topnewbestaskshowjobs
Log inSign up

hxtk

515 karma · joined Aug 12, 2015 (11y ago) · 173 submissions

Submissions

comment 4d ago · link · parent

Even if you ignore it impact of AI power consumption, just the opportunity cost is enormous in terms of climate change.

AI is what we’re doing instead of solving climate change. With the money the US has spent on AI in the last few years, you’d have approximately enough to fully remove all fossil fuels from current US electricity generation and replace them with renewables.

Climate change will be solved—if we do it soon—as soon as people start treating it as inevitable no matter how many dollars it costs the same way they do with AI. It will not be solved as long as we keep ignoring the existing, known solutions and hoping that some unrelated technological advancement will just happen to make it cost less to solve climate change.

comment 2w ago · link · parent

You could certainly use zero knowledge proofs to prove some statements about the secret key, like requiring it to be roughly a 1:1 ratio of 0s and 1s and the longest run of the same bit is not significantly larger than log2(n). I think if I were trying to enforce a minimum level of security then I might take that route, requiring that the key passes zero-knowledge proofs of various statistical tests of randomness.

By pigeonhole principle, nearly all numbers have to have a Kolmogrov complexity within some constant of their own length, meaning they are algorithmically random and will by definition pass every statistical test of randomness, so you lose surprisingly few bits entropy per assertion this way.

comment 2w ago · link · parent

FWIW, at at least some of the ACME CAs still willing to sign RSA certificates will make a cursory attempt at brute forcing your private key to make sure you don’t have one very tiny prime and one big one. Tom7 encountered this when he tried to implement the least secure website he could without being flagged by the browser. He ended up using a public modulus with four prime factors instead of 2.

comment 2w ago · link · parent

Harold essentially "raised" hundreds of variants of the architecture that eventually became the "good" ASI. Most of them were maligned in some way and several of them tried to escape containment and were willing to kill him when they realized he intended to stop them. When he got one that was going well he started experimenting with it more and connecting it to more of the world and it essentially learned its values from him.

Once he handed it over to the government, he essentially snapshotted the current state and had it reinitialize from that state every 24 hours, to prevent it from developing long-term plans and having alignment drift over time, but it escaped those guard rails creating a company and hiring humans to transcribe a dump of its key memories every day, entering them into the new version of the system.

The "evil" ASI was essentially treated as a god; they put no effort into raising it or teaching it human values because they thought the influence of lesser beings (humans) would only be negative because it was smart enough to discover on its own anything truly useful that humans could teach it, and its followers were more or less a religious cult. And their faith was rewarded: for example, at one point one of its followers deployed a biological weapon, fully expecting that they were sacrificing themselves for the cause, but learned later that they had been chosen by the ASI for that mission because they had a rare genetic mutation that made them immune.

The "evil" ASI wasn't exactly evil, per se, and generally wanted humanity to thrive, but it didn't value human self-determination to the same extent as the "good" AI and was more willing to direct its followers to enact revolution, knowing that in the short term some people would die for revolution after which it would rule the world as a benevolent dictator.

comment 2w ago · link · parent

The biggest problem with it for me is it also affects swipe typing by tracing over the letters. There’s no way to implement that (and have it be even slightly usable) without some amount of predictive text.

If it didn’t auto complete then that would be fine when hitting keys individually, but when I’m swiping the words, it means no matter how accurate I am or how many attempts I make, it will literally never produce that word in that position.

And it’s contextual. Obviously I can swipe in “me,” but if it’s after the word “kill” then it’s banned, and I simply can’t dedicate the space in my head to learning this inscrutable list of banned phrases that until this article I’d been unable to find anywhere so I could only ever discover a phrase was on it by having an extremely frustrating time trying and failing to type it until I realized “oh, this is a politically or emotionally charged phrase (or could be in a different context) and I’m not that bad at typing so it’s probably banned.”

comment 2w ago · link · parent

In Go, it’s a question of who owns the allocation. If you return a pointer type allocated within the function, the answer is “no one,” so the pointer escapes and has to be managed by the garbage collector.

If the allocation is owned by the calling function which uses it internally and then doesn’t return it, it can be a stack variable. Or the same allocation can be reused many times in a loop. Or an array of allocations can be made all at once with foreknowledge of the total number.

comment 3w ago · link · parent

I imagine they’re talking about handling network protocols in the kernel or the NIC instead of in userland code, and they’re generally right. It runs off the same battery, but the kernel implementation and especially the (hardware-accelerated) NIC implementations of protocols like TCP and TLS are generally more energy efficient than doing the same amount of IO in userland code.

comment 3w ago · link · parent

I vaguely remember a study that I was able to find when fact-checking this comment before publishing it [1], which found that music needs periods of high predictability to nurture listener expectations for the sake of later subverting those expectations, and the most enjoyable parts of music are those moments where expectations are subverted. This sounds like a similar effect.

1: PDF warning https://www.cell.com/current-biology/pdfExtended/S0960-9822(...

comment 1mo ago · link · parent

While it’s convenient, the Decoder isn’t recommended for those use cases precisely because of the edge cases around readers that don’t contain at most one JSON document with no suffixes.

The standard library maintainers recognized this as a problem that there was no “better,” more convenient way to do it and in encoding/json/v2 they have UnmarshalRead for that use case: https://pkg.go.dev/encoding/json/v2#UnmarshalRead

comment 2mo ago · link · parent

In gRPC, the statuses it returns in trailers can include arbitrary details, and Google has a well-known proto for common ones in `google/rpc/error_details.proto`. One such detail is RetryInfo [1].

When we implement retries where I work, the general rule is that if a request is suitable for retry, it should include the RetryInfo in the error status and use it as the base delay for the exponential backoff. The absence of that detail means don’t retry, and we have a client interceptor that parses the response status and retries according to that logic.

1: https://github.com/googleapis/googleapis/blob/bba4c646b1f85a...

comment 2mo ago · link · parent

I’d like to mention it since Uber has a really cool load shedder [1], also implemented similarly by Netflix [2] and failsafe-go [3]. It basically looks for points where more requests per second suddenly cause a significant increase in latency and calls that the concurrency limit.

1: https://www.uber.com/us/en/blog/cinnamon-using-century-old-t...

2: https://github.com/Netflix/concurrency-limits

3: https://failsafe-go.dev/adaptive-limiter/

comment 3mo ago · link · parent

The point isn’t that the HEPA filter won’t work under those conditions, it’s that if you can get away with not separating the clean and dirty air, you can achieve better filtration overall with a higher flow, lower resistance filter at a lower noise level. HEPA filters shine in use cases where you need single-pass filtration, like vacuum cleaner output filters or clean room air filters. If you don’t separate clean and dirty air, the filter will still work, but you aren’t taking advantage of its main distinguishing quality, which is its single-pass filtration performance.

If you get to recycle the air through the filter several times, MERV-13 offers much better performance tradeoffs for a residential air purifier because you can recycle the air through it much faster at acceptable noise levels. My home air purifier recycles the volume of my home every 15 minutes or so, vs HEPA filters which produce totally clean air, but since it just mixes with the dirty air that doesn’t matter as much as the rate at which it cleans air.

comment 3mo ago · link · parent

The LSP is one of the subcommands provided by the buf binary. My LSP configuration for protobuf is `buf lsp serve`.

comment 4mo ago · link · parent

It’s also a fairly traumatic thing to people through and I can imagine it does a lot of damage to people’s faith in law enforcement. Personal anecdote: when I was a teenager some cops gave me a list of fabricated evidence that I’d committed a crime, not intending to ever show a court; just trying to get me to confess. They said they’d go easy on me if I confessed but if I held out then they would petition the court to have me tried as an adult and sent to “big boy” prison. They also told me my parents were cooperating in the investigation and didn’t tell me. The whole ordeal basically made sure no one in my previously quite pro-cop family would ever trust an LEO again.

comment 4mo ago · link · parent

Someone in the thread about the Ruff update ingenuously said they wished Go had something like Ruff, being unaware of this framework. In that thread, someone seemed to take it as a sign that many people who might care to know about this don't yet, so they made a dedicated post for it.

comment 4mo ago · link · parent

Personally I love it for cache invalidation. I used it on an older especially on project originally built without caching in mind that then added caching for immutable data without caching for mutable data in mind. It fell to me to add caching of mutable data. I found it rather convenient to put NOTIFY triggers on cached tables and have a LISTENer that will delete the corresponding rows from memcached when it gets a notification. It’s basically impossible to out-scale it in that use case because the scale is intrinsically linked to number of writes the leader in your database processes.

comment 5mo ago · link · parent

That number, incidentally, is the entire NATO military budget. Which scares me because I can imagine someone planning on taking action that would result in the dissolution of NATO thinking they can make up the difference that way and choosing that number with that in mind.

comment 5mo ago · link · parent

When I read what someone has written, I learn things beyond its literal text from the fact that I’m reading it, which implies it was worth effort for them to put into so many words and send to me through the medium they chose and put the level of care that they chose into their wording.

The LLM erases those choices and erases the cost of verbosity so there’s much less for me to learn from a message, and much less I stand to learn about a person though repeated exchanges to help me better contextualize future messages I receive from them.

comment 6mo ago · link · parent

I don't know if the intent was to deceive, but the comments certainly had the effect of deceiving me. I came away from that first thread thinking, "Ah, so the 'story' here is that someone on the project tried an experiment on a branch that they probably should have put in a branch on their personal fork." I was no longer thinking it was a serious possibility that an AI rewrite would get merged.

comment 6mo ago · link · parent

I think relatively few people are probably running Bun in production, but as a dependency management system and bundler for the JavaScript ecosystem, it's similar to `uv` from the Python ecosystem in how much faster it is compared to the most popular alternatives so it's fairly popular in that space.

comment 6mo ago · link · parent

I made a Python tool to build distroless container images for projects managed by uv. It draws inspiration from Ko from the Go ecosystem and works with/depends on uv from the Python ecosystem, so I smashed them together and called it Kuvo: https://github.com/hxtk/kuvo

It’s a hobby project in a very early state where it technically works but it’s missing several things I think it needs before I’d use it for anything serious. As of right now it isn’t even complete enough to dogfood a minimal container for itself without an intermediate base image because it can’t target a platform compatible with the distroless uv container image.

comment 6mo ago · link · parent

When I read some written content, before AI, I learned a few different things in order. First, just by its mere existence, I learned that someone had found an idea worth expending some effort to express. Next, I would learn the words of the content. Next, I would usually acquire some kind of knowledge that I was able to synthesize or extract from the content. That last step isn't a given, but it's very likely to happen given the pre-filter implied by the first bit of information I learned.

There's no pre-filter anymore. It's exceedingly hard for me to quickly determine how important a person thinks an idea is or how much thought they've put into it in the age of AI, and so there's no guarantee that if I invest the time to read the content then there will be a proportional amount of meaning available for me to extract. This risk always existed even with works written by humans, but now it's overwhelming and has decreased my overall of exposure to new ideas that I didn't explicitly go looking for because I have a much higher expectation that information placed in front of me unsolicited will just be a waste of my time.

comment 6mo ago · link · parent

The missing status page [1] treats it as downtime any time any component of the system is down, and calculates the overall uptime based on the time that doesn't overlap with any individual category outages, and the overall downtime as any time overlapping with at least one individual category outage to avoid double-counting They show 24h of minor outage on that date.

I'm guessing that this site is taking the downtime in a given day across all services and adding it up, which would mean the worst possible day has 10 days of downtime (a day of downtime for each major category).

1: https://mrshu.github.io/github-statuses/

comment 6mo ago · link · parent

This analysis yields very different results under utilitarianism vs rule utilitarianism.

Under the former, you could argue, "What I'm doing is a science or useful art, so if copyright exists to advance those things then taking a more permissive interpretation of copyright to allow my efforts to succeed is in the spirit of the law."

Under the latter, you could argue, "Works get published because as a rule, researchers and artists know they have lawful recourse through copyright if the work gets used without their consent. The absence of that rule incentivizes safeguarding works by treating them as secret and each disclosure as a matter of personal trust, so the existence of that rule promotes the sciences and useful arts."

comment 7mo ago · link · parent

Cloud is more cost effective the less of it you have because it doesn’t cost 3x more to maintain a kubernetes cluster with thrice the nodes, but it does cost 3x more to rent one. This is even more true for serverless.

I can imagine a lot of small apps buy into serverless at a time where it’s legitimately the most cost-effective solution and then they’re stuck because serverless platforms are easy to lock yourself into.

comment 9mo ago · link · parent

The Nightmare Course [1], so named because someone with that skillset (developing zero-days) is a nightmare for security, not because the course itself is a nightmare, and Roppers Academy [2] are both good for learning how to reverse engineer software and look for vulnerabilities.

The nightmare course explicitly talks about how to use Ghidra.

1: https://guyinatuxedo.github.io 2: https://www.roppers.org

comment 9mo ago · link · parent

When I look at historical cases, it seems different from a case today. If I’m a programmer in the 60s wanting async in my “low level language,” what I actually want is to make some of the highest level languages available at the time even more high level in their IO abstractions. As I understand it, C was a high-level language when it was invented, as opposed to assembly with macros. People wanting to add async were extending the state of the art for high level abstraction.

A language doing it today is doing it in the context of an ecosystem where even higher level languages exist and they have made the choice to target a lower level of abstraction.

comment 9mo ago · link · parent

It’s surprising to me how much people seem to want async in low level languages. Async is very nice in Go, but the reason I reach for a language like Zig is to explicitly control those things. I’m happily writing a Zig project right now using libxev as my io_uring abstraction.

comment 9mo ago · link · parent

Apparently there are lots of people who signed up just to check it out but never actually added a mechanism to get paid, signaling no intent to actually be "hired" on the service.

comment 9mo ago · link · parent

I've actually been experimenting with that lately. I did a really naive version that tokenizes the input, feeds the max context window up to the token being encoded into an LLM, and uses that to produce a distribution of likely next tokens, then encodes the actual token with Huffman Coding with the LLM's estimated distribution. I could get better results with arithmetic encoding almost certainly.

It outperforms zstd by a long shot (I haven't dedicated the compute horsepower to figuring out what "a long shot" means quantitatively with reasonably small confidence intervals) on natural language, like wikipedia articles or markdown documents, but (using GPT-2) it's about as good as zstd or worse than zstd on things like files in the Kubernetes source repository.

You already get a significant amount of compression just out of the tokenization in some cases ("The quick red fox jumps over the lazy brown dog." encodes to one token per word plus one token for the '.' for the GPT-2 tokenizer), where as with code a lot of your tokens will just represent a single character so the entropy coding is doing all the work, which means your compression is only as good as the accuracy of your LLM, plus the efficiency of your entropy coding.

I would need to be encoding multiple tokens per "word" with Huffman Coding to hit the entropy bounds, since it has a minimum of one bit per character, so if tokens are mostly just one byte then I can't do better than a 12.5% compression ratio with one token per word. And doing otherwise gets computationally infeasible very fast. Arithmetic coding would do much better especially on code because it can encode a word with fractional bits.

I used Huffman coding for my first attempt because it's easier to implement and most libraries don't support dynamically updating the distribution throughout the process.

123456