Live data from Hacker News

Cursed Knowledge

immich.app

111–120 of 165 posts

Re: Cursed Knowledge

#111
Back in 2011, I wasted an entire afternoon on some string handling code that was behaving very strangely (I don’t remember exactly what the code was).

It wasn’t until I loaded the content into a hex editor that I learned about U+00A0, the non-breaking space. Looks like a space, but isn’t.

Re: Cursed Knowledge

#112
post #10

dd/mm/yyyy date formats are cursed.... Perhaps it is mm/dd/yyyy (really?!?) that is cursed....

mm/dd/yyyy is cursed. You parse it naively with momentjs, and some times it parses (wrong), other times it doesn't parse.

It's the reason our codebase is filled with momentAmerican, parseDateAmerican and parseDatetimeAmerican.

Re: Cursed Knowledge

#113

Earlier quoted context omitted.

I agree, I usually put this sort of information in the commit message itself. That way it's right there if anybody ever comes across the line and wonders "why did he write this terrible code, can't you just ___".

As a side note, it's becoming increasingly important to write down this info in places where LLMs can access it with the right context. Unfortunately commit history is not one of those spots.

There's no reason that an LLM couldn't (or isn't) being trained on commit messages.

No difference between a git index and any other binary data (like video).

Re: Cursed Knowledge

#114
post #35

One of their line items complains about being unable to bind 65k PostgreSQL placeholders (the linked post calls them "parameters") in a single query. This is a cursed idea to begin with, so I can't fully blame PostgreSQL. From the linked GitHub issue comments, it looks like they adopted the sensible approach of refactoring their ORM so that it splits the big query into several smaller queries. Anecdotally, I've found…

I don’t think that makes intuitive sense. Whether I send 50k rows or 10x5k rows should make no difference to the database. But somehow it does. It’s especially annoying with PG, where you just cannot commit a whole lot of small values fast due to this weird limit.

Re: Cursed Knowledge

#115
post #105

Earlier quoted context omitted.

As a side note, it's becoming increasingly important to write down this info in places where LLMs can access it with the right context. Unfortunately commit history is not one of those spots.

You are sadly completely missing the point of ever-self-improving automation. Just also use the commit history. Better yet: don't be a bot slave that is controlled and limited by their tools.

> You are sadly completely missing the point of ever-self-improving automation. Just also use the commit history.

I don't think you understand the issue you're commenting on.

It's irrelevant whether you can inject commit history in a prompt.

The whole point is that today's support for coding assistants does not support this source of data, whereas comments in source files and even README.md and markdown files in ./docs are supported out of the box.

If you rely on commit history to provide context to your team members, once they start using LLMs this context is completely ignored and omitted from any output. This means you've been providing context that's useles and doesn't have any impact on future changes.

If you actually want to help the project, you need to pay attention on whether your contributions are impactful. Dumping comments into what amounts to /dev/null has no impact whatsoever. Requiring your team to go way out of their way to include in each prompt extra context from a weird source that may or may not be relevant is a sure way to ensure no one uses it.

Re: Cursed Knowledge

#116
post #108

Earlier quoted context omitted.

> Disappointing to hear about the Cloudflare fetch issue. You mean the one where explicitly configuring Cloudflare to forward requests to origin servers as HTTP will actually send requests as HTTP? That is not what I would describe as disappointing.

The behavior seems likely to mislead a lot of people even if it doesn't confuse you.

> The behavior seems likely to mislead a lot of people even if it doesn't confuse you.

You need to go way out of your way to toggle a switch to enable this feature.

The toggle says very prominently "Cloudflare allows HTTPS connections between your visitor and Cloudflare, but all connections between Cloudflare and your origin are made through HTTP."

You proceed to enable this feature.

Does it confuse you that Cloudflare's requests to your origin servers are HTTP?

Re: Cursed Knowledge

#117

Earlier quoted context omitted.

As a side note, it's becoming increasingly important to write down this info in places where LLMs can access it with the right context. Unfortunately commit history is not one of those spots.

There's no reason that an LLM couldn't (or isn't) being trained on commit messages. No difference between a git index and any other binary data (like video).

> There's no reason that an LLM couldn't (or isn't) being trained on commit messages.

You are arguing that it could. Hypotheticals.

But getting back to reality, today no coding assistant supports building system prompts from commit history. This means it doesn't. This is a statement of fact, not an hypothetical.

If you post context in commit messages, it is not used. If you dump a markdown file in the repo, it is used automaticaly.

What part are you having a hard time understanding?

Re: Cursed Knowledge

#118

This is awesome! Does anyone else wanna share some of the cursed knowledge they've picked up? For me, MacOS file names are cursed: 1. Filenames in MacOS are case-INsensitive, meaning file.txt and FILE.txt are equivalent 2. Filenames in MacOS, when saved in NFC, may be converted to NFD

Yep. Create a case-sensitive APFS or HFS+ volume for system or data, and it guarantees problems.

I’ve done this with my main drive for the last ten or so years and run into not a single problem. I recommend it.

Re: Cursed Knowledge

#119

Earlier quoted context omitted.

There's no reason that an LLM couldn't (or isn't) being trained on commit messages. No difference between a git index and any other binary data (like video).

> There's no reason that an LLM couldn't (or isn't) being trained on commit messages. You are arguing that it could. Hypotheticals. But getting back to reality, today no coding assistant supports building system prompts from commit history. This means it doesn't. This is a statement of fact, not an hypothetical. If you post context in commit messages, it is not used. If you dump a markdown file in the repo, it is use…

There are MCP Servers that give access to git repo information to any LLM supporting MCP Servers.

For example:

>The GitHub MCP Server connects AI tools directly to GitHub's platform. This gives AI agents, assistants, and chatbots the ability to read repositories and code files, manage issues and PRs, analyze code, and automate workflows. All through natural language interactions.

source: https://github.com/github/github-mcp-server

Re: Cursed Knowledge

#120
post #83

One can really sense the pain just reading the headings Also a crypto library that limits passwords to 72 bytes? That’s wild

It's written with constant memory allocation in mind. Silly of them to use such a small buffer though, make it a configuration option.

I assumed all hashes are in O(1) space? Is there any that’s not?
Post reply on HN