83 points by ezekg 5 days ago | 58 comments | View on ycombinator
marcellus23 5 days ago |
nabbed 5 days ago |
This page was much simpler 22 years ago (I don't remember this HSSF stuff, whatever that is), but it still looks familiar. Basically everything I needed to do had examples in there. I remember thinking that the authors cared about the users of the library (although the Javadoc seems a little bare.. but I am not sure I needed the Javadoc much).
If I ever create an OSS library, I would certainly also create a "Busy Developers' Guide".
Salgat 5 days ago |
I've always loved Microsoft's API Browser for this reason: https://learn.microsoft.com/en-us/dotnet/api/system.net.netw...
flowerbreeze 5 days ago |
In a nutshell, which type of documentation we need depends on the goal we have. Any API missing one of the kinds of documentation will feel like it is missing something. Once I read about it, I've been noticing how the documentation I like tends to have all these aspects covered.
https://www.writethedocs.org/videos/eu/2017/the-four-kinds-o...
akhil08agrawal 5 days ago |
API design isn't just about functionality. it is about discoverability and if your right-click menu uses different models than your API and your error messages don't explain why, you are just creating friction for no reason.
Sometimes the "proper" solution isn't worth the super complicated maze.
dvh 5 days ago |
frizlab 5 days ago |
The general idea is a bit like uv if I have understood uv correctly. Basically you do your imports normally and add a comment next to them that tells where the imports should be found. Then instead of running your project through swift directly you run it through swift-sh (or `swift sh`, swift will find the `swift-sh` binary automatically, just like git does for plugins). swift-sh will download and compile the dependencies, then add the proper options to swift so it will know where to find them.
It is even possible to add a regular shebang to swift-sh at the beginning of the file, chmod +x it, and just run it like a regular script!
Or use swift-sh to compile it.
(And installing swift-sh itself is as easy as `brew install xcode-actions/tap/swift-sh`.)
classicsc 5 days ago |
When working on my own projects I've found a good rule of thumb to be that if you are being told to use something low level and unintuitive like a semaphore in Swift when doing something that ought to be easy, you are probably either reading a stackoverflow answer from an objective-c developer or in the middle of a LLM session that's gone sideways. Low level libraries might need those things, they are approximately never right for application code. Just throw it out and start over (as you did), saves on sanity.
Johnny_Bonk 5 days ago |
blumenkraft 5 days ago |
alexjray 5 days ago |
Svoka 5 days ago |
talentedcoin 5 days ago |
a1o 5 days ago |
I did not knew this.
mwkaufma 5 days ago |
lacoolj 5 days ago |
> ... I found mysekf launching TextEdit just to do that
I hope everyone else enjoys it!
Shuddown 5 days ago |
VerifiedReports 4 days ago |
Maybe English is another of the API frustrations that led to this screed.
MORPHOICES 5 days ago |
footy 5 days ago |
It's clearly not enjoyable for them so why doesn't the author pivot to something else and stop doing things they hate? It's weird
> Why was that so hard? Why are the models here separate from the ones in the right click menu? Too many questions.
The very screenshot above this paragraph actually answers this, in what admittedly might be an uncharacteristically clear UI: "Siri and Safari will always run translations online."