HN2new | past | comments | ask | show | jobs | submit | macote's commentslogin

The author is misusing .gitkeep. I use it to keep source code folders that don’t contain any code yet, but whose structure is already defined.

Truly, what purpose does this serve? Defining a hierarchy without using is injecting immediate debt. Just introduce it when stuff goes there! If you really insist then at least put something in the folder. It doesn't take much effort to make the change at least a tiny bit meaningful.

Better yet just do the work. If you want make a commit in a branch that's destined to be squashed or something, sure, but keep it away from the shared history and certainly remove it when it's not needed anymore.


I play around with ComfyUI on my computer to make silly images.

To manually install it, you must clone the repo. Then you have to download models into the right place. Where's the right place? Well, there's an empty directory called models. They go in there.

IMO that's an effective use of gitkeep.


It's not.

    echo >repo/models/README.md "this is the directory you place models in"
Is infinitely better.

It could be better sure. In fact I think they use a file called PUT_MODELS_HERE not gitkeep

https://github.com/Comfy-Org/ComfyUI/blob/master/models/diff...

But in any case, that instruction was already in the readme as well.


    echo >repo/models/README.md "this is the directory in which you place models"
x

Pedant


> Truly, what purpose does this serve?

The simplest answer is that sometimes other existing software that I need to use treats an empty directory (or, hopefully, a directory containing just an irrelevant file like .gitkeep) differently from an absent directory, and I want that software to behave in the first way instead of the second.

A more thorough answer would be: Filesystems can represent empty directories, so a technology that supports versioned filesystems should be able to as well. And if that technology can't quite support fully versioned filesystems -- perhaps because it was never designed with that goal in mind -- but can nevertheless support them well enough to cover a huge number of use cases that people actually have, then massaging it a bit to handle those rough edges still makes sense.


Legitimately asking, please share the name of software that expects/requires an empty directory and interprets .gitkeep in this way, but chokes on a README file.

Many filesystems cannot represent empty directories. Many archive formats also do not. I don't think this a problem in practice. I find this argument extremely weak.


> please share the name of software that expects/requires an empty directory and interprets .gitkeep in this way, but chokes on a README file.

Every mail server since postfix supports Maildir, in which every email is a file in one of 3 subdirectories (tmp, new or cur) of a user directory. If there's no jbloggs/tmp dir, postfix will think user jbloggs does not exist. So if you want to take a restorable snapshot of this with git, there needs to be a file there. I don't know if jbloggs/tmp/README would cause a problem, because I don't know how postfix will treat the presence of a file with a name that violates its expected syntax (which includes a timestamp and other metadata), but what I do know is that, after running `git clone any-repo`, I can safely delete every .gitkeep file to restore the system to its original state without having to understand that repo in detail -- while I cannot safely delete every README file. That's because the commonly understood semantics of .gitkeep is "I exist solely to shoehorn this empty dir into git", which does not apply to other files.

> Many filesystems cannot represent empty directories

Your turn -- name one.


> Many filesystems cannot represent empty directories.

Like which ones? And how does mkdir(1) work on such filesystems?


You can rename `.gitkeep` to `.gitignore` and both be happy in that case.


The thread about memory leak is here: https://hackernews.hn/item?id=46461061


And the same diagnosis in the blog post was reported by a user in discussions a month ago but ignored https://github.com/ghostty-org/ghostty/discussions/9786#disc...


That doesn't sound like the actual issue, or am I not understanding it correctly?


I think you’re correct. the reproduction isn’t very precise and the solution doesn’t seem right (I’m not seeing anything about the non-standard pages not being freed). I’d guess this was ignored because it was wrong…


How about asking Gemini how to add dark mode to Gmail?


Don’t be surprised if it tells you to click on the moon icon in the top right corner. Or it might not, but there is a slight probability.


Original title: All the other cool languages have try…finally. C++ says “We have try…finally at home.”


You don't need to add a UUIDv4 column, you could just encrypt your UUIDv7 with format-preserving encryption (FPE).


What's the computational complexity of doing that conversion vs the lookup table of uuidv4 for each uuidv7?


DB lookups + extra index are way more expensive then hardware assisted decoding.

If your UUIDv4 is cached, your still suffering from extra storage and index. Not a issue on a million row system but imagine a billion, 10 billion.

And what if its not cached. Great, now your hitting the disk.

Computers do not suffering from lacking CPU performance, especially when you can deploy CPU instruction sets. Hell, you do not even need encryption. How about making a simple bit shift where you include a simple lookup identifier. Black box sure, and not great if leaked but you have other things to worry about if your actual shift pattern is leaked. Use extra byte or two for iding the pattern.

Obfuscating your IDs is easy. No need for full encryption.


Hardware assisted is a red herring here. As you noted the real problem is that random reads have poor data locality, which degrades your database performance in a way that is expensive to resolve.


Why would it be computationally complex? The encryption is implemented in the silicon, it is close to free for all practical purposes. The lookup table would be wildly more expensive in almost all cases due to comparatively poor memory locality.


I used ANTLR to create a grammar file for MK (Manufacturing Knowledge). I plugged the JavaScript parser and lexer into Ace editor. Good memories.


I think 'local' in this context could also simply mean 'wall', as in wall clock time. When my friend asks me the date and time, I don't have to bother with time zones.

This type of date/time is also very useful to store in a computer.


Yes but you agree on the same time zone.

If you are on a phone call when you are in London and the other end is in New York - what is the time?


Now.

Having had decades of this in geophysical exploration, the time is now AND (where relevant) it's the current UTC Zulu time AND it's both local times.

Any data collected is logged against a UTC sync for start of recording (and continues with lapsed time AND logging raw GPS times .. which sorts out leap second issues).

Any discussion re: start of next data collection is relative to the local time at the field end, the planes et al are often bound by daylight - so field operation local dawn and sunset are relevant.

Any discussion re: software changes | hardware support is relevant to the local time at the home office end as that'll rest on when the office staff or aircraft mechanics come in or free up.

For ease of communication many such discussions are along the lines of "we'll ring back in four hours and ...". That's a NOW relative epoch.



https://github.com/etiennefd/hhr-tech-tree/blob/main/src/scr... this is kind of how I expected it. Honestly I would have done https://dumps.wikimedia.org/ and then parsed it.

Additionally I've always wanted institutions to be part of the timeline of technology. Corporations, Nation-states, Universities, Guilds, International Organizations - the ways people innovatively organize make things possible that otherwise wouldn't be.

The higgs boson experiments, for example wouldn't have been possible without the complex international institutions that orchestrated it. Manhattan project, Moon landing, the internet ... the iphone ...


This was originally in the HN submission title, but this comment from the maintainer is mind-boggling:

> GitHub has confirmed that the block.txt file in the repo has been responsible for over 1 petabyte of bandwidth per day — mainly due to automated downloads (likely from Adobe’s Chrome extension). This is way beyond what a single repo is designed to handle and poses a risk of the repository being temporarily disabled as early as June 13.

https://github.com/Bon-Appetit/porn-domains/discussions/70#d...


Adobe appears to be actually responsible for the DDoS.

> i think we might have finally tracked it to the GenAIWebpageBlocklist for Adobe Reader plugin on Chrome

> Adobe has acknowledged the issue and removed the URL reference from their Chrome extension. The updated version is already submitted to the Chrome Web Store and should roll out to users in the coming days

> GitHub has removed the content warning from the repository and will continue to monitor bandwidth usage


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: