Hacker News
The Tao of Topic Maps (2000)
Article URL: https://ontopia.net/topicmaps/materials/tao.html
Comments URL: https://news.ycombinator.com/item?id=42211685
Points: 1
# Comments: 0
Quantum Error Correction [pdf]
Article URL: https://www.scottaaronson.com/qclec/27.pdf
Comments URL: https://news.ycombinator.com/item?id=42211683
Points: 1
# Comments: 0
FPS on NES [video]
Article URL: https://www.youtube.com/watch?v=dXSUhJXSv-c
Comments URL: https://news.ycombinator.com/item?id=42211679
Points: 1
# Comments: 0
Gut microbiome strain-sharing within isolated village social networks
Article URL: https://www.nature.com/articles/s41586-024-08222-1
Comments URL: https://news.ycombinator.com/item?id=42211659
Points: 1
# Comments: 0
A multi-emulator Gameboy tracer
Article URL: https://bernsteinbear.com/blog/gbtracer/
Comments URL: https://news.ycombinator.com/item?id=42211633
Points: 1
# Comments: 0
AI eats the world
Article URL: https://www.ben-evans.com/presentations
Comments URL: https://news.ycombinator.com/item?id=42211616
Points: 3
# Comments: 0
Major improvements for Powerboard Tyche despite adversity
The iOS to GrapheneOS Migration Guide and Review
Article URL: https://blog.okturtles.org/2024/06/the-ultimate-ios-to-grapheneos-migration-guide-and-review/
Comments URL: https://news.ycombinator.com/item?id=42211606
Points: 2
# Comments: 0
Embedding Model Benchmark Tool
Article URL: https://github.com/voyage-ai/embedding_bench
Comments URL: https://news.ycombinator.com/item?id=42211604
Points: 2
# Comments: 0
Usage statistics of server-side programming languages
Article URL: https://w3techs.com/technologies/history_overview/programming_language/ms/y
Comments URL: https://news.ycombinator.com/item?id=42211568
Points: 1
# Comments: 0
Misinformation expert cites non-existent sources in Minnesota deep fake case
Why Americans Are Obsessed with Poor Posture
Article URL: https://www.thenation.com/article/culture/slouch-back-pain-history/
Comments URL: https://news.ycombinator.com/item?id=42211561
Points: 2
# Comments: 0
The Rust Foundation's 2nd bad draft trademark policy
Article URL: https://diziet.dreamwidth.org/19151.html
Comments URL: https://news.ycombinator.com/item?id=42211552
Points: 2
# Comments: 0
Understanding CSRF in Depth
Article URL: https://blog.logto.io/csrf
Comments URL: https://news.ycombinator.com/item?id=42211547
Points: 1
# Comments: 0
0x90n/InfoSec-Black-Friday: All the deals for InfoSec related software/tools
Article URL: https://github.com/0x90n/InfoSec-Black-Friday
Comments URL: https://news.ycombinator.com/item?id=42211533
Points: 1
# Comments: 0
UFOs and Defense: What Should We Prepare For? [pdf]
Article URL: https://www.narcap.de/dokumente/COMETA-Report-englisch.pdf
Comments URL: https://news.ycombinator.com/item?id=42211529
Points: 1
# Comments: 0
Apple will now be treated like a bank
Article URL: https://9to5mac.com/2024/11/21/apple-will-now-be-treated-like-a-bank-says-us-consumer-financial-protection-bureau/
Comments URL: https://news.ycombinator.com/item?id=42211525
Points: 6
# Comments: 0
Show HN: C, C++, and Java formatter based on Clang for Node.js
Hello,
I’m excited to share the release of a new C, C++, and Java formatter based on Clang for the Node.js environment. This project is a fresh take inspired by Angular’s deprecated `clang-format` package.
I previously introduced this project a month or two ago, but I’m sharing it again as it has become even more stable and new features have been added. Thanks to the interest and support from the community, and the adoption by legacy users, the package recently hit over 10,000 weekly downloads. I am deeply grateful for this support.
This package now has full test coverage and a PR is in progress to replace the old Angular `clang-format` in the Node.js core with this updated package. While it’s thoroughly tested, there could still be edge cases I might have missed, so any feedback is welcome!
---
The package leverages Clang’s `clang-format`, known for its widespread use in formatting C, C++, and Java code. Think of it as similar to Prettier, but specifically for languages like C, C++, and Java, which Prettier does not support.
This formatter is especially useful in the Node.js environment when you’re working on projects that mix JavaScript with C/C++ code, such as core Node.js development. The package eliminates the need to install additional dependencies for using `clang-format`. While the previous `clang-format` package was challenging to integrate into Node.js and npm workflows, this new package streamlines the process. You can easily set it up in CI by simply downloading it via npm and configuring your scripts, which makes it much easier to use in automated environments.
---
With the recent update to version 1.2.0, we’ve added several new features, notably the `git-clang-format` package.
Let’s consider a scenario where you want to introduce code formatting for a C/C++ project. In smaller projects, you can reformat all the code at once without causing too much disruption. However, in larger projects, reformatting the entire codebase at once can make commit history harder to track.
Now, let’s imagine a developer modifies 100 lines within a 1,000-line codebase. Instead of reformatting the entire file, it would be better to check and format only the modified lines. This keeps the commit history clean and consistent. Additionally, as the project evolves, formatting becomes more uniform over time. `git-clang-format` helps achieve this by allowing formatting to be applied only to modified lines, similar to how `lint-staged` checks only staged files to optimize CI speed.
I’ve also wrapped `git-clang-format` as a standalone package, leveraging LLVM’s native support for this feature. The detailed instructions are available in the official documentation, though currently only in English.
Thank you for reading, and please feel free to leave any questions or feedback!
Official Documentation: [https://clang-format-node.lumir.page](https://clang-format-n... Repository: [https://github.com/lumirlumir/npm-clang-format-node](https:/...
Comments URL: https://news.ycombinator.com/item?id=42211507
Points: 1
# Comments: 0
Aralkum Desert
Article URL: https://en.wikipedia.org/wiki/Aralkum_Desert
Comments URL: https://news.ycombinator.com/item?id=42211502
Points: 2
# Comments: 1
Companies are spritzing smells in office to make return-to-office more pleasant
Article URL: https://www.wsj.com/lifestyle/workplace/workers-return-office-mood-fragrance-1751be44
Comments URL: https://news.ycombinator.com/item?id=42211501
Points: 1
# Comments: 0