Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
vitaut
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
91.
▲
How Close Is Existing C/C++ Code to a Safe Subset? [pdf]
(mdpi-res.com)
1 points
by
vitaut
3y ago
|
0 comments
92.
▲
Bad Apple in CMake
(github.com)
2 points
by
vitaut
3y ago
|
0 comments
93.
▲
by
vitaut
3y ago
This is not about printing hello world but about all formatted I/O which is a significant chunk of the library. To be fair formatted I/O is pretty broken in C as well but for completely different reasons.
94.
▲
by
vitaut
3y ago
It's just one example showing a decent win with minimal efforts. {fmt} is widely used for getting better perf in formatted code.
95.
▲
by
vitaut
3y ago
{fmt} doesn't encourage "custom formatter specification to live in a template". On the contrary, if you look at the docs in https://fmt.dev/latest/api.html#formatting-user-defined-type... , none of the ex
96.
▲
by
vitaut
3y ago
{fmt} is commonly used for performance critical code because it provides some of the fastest numeric formatting and I/O: * https://vitaut.net/posts/2020/fast-int-to-string-revisited/ * https://
97.
▲
by
vitaut
3y ago
fmt/core.h has been heavily optimized for build speed and is usually faster to compile than equivalent iostream code: https://github.com/fmtlib/fmt?tab=readme-ov-file#compile-tim... . Once modularized std is availa
98.
▲
by
vitaut
3y ago
It is weird but not unique to C++. For example, python used the % operator for string formatting. It's a simple but hacky way to feed arbitrary number of arguments in a type-safe way if you don't have variadics.
99.
▲
by
vitaut
3y ago
Did you mean endling?
100.
▲
by
vitaut
3y ago
Glad you asked. I recently wrote a post about it: https://vitaut.net/posts/2023/print-in-cpp23/ .
101.
▲
std::print in C++23
(vitaut.net)
2 points
by
vitaut
3y ago
|
0 comments
102.
▲
by
vitaut
3y ago
No, thanks.
103.
▲
WG21, a.k.a. C++ Standard Committee, December 2023 Mailing
(open-std.org)
1 points
by
vitaut
3y ago
|
0 comments
104.
▲
by
vitaut
3y ago
{fmt} has internal buffering but it's not yet exposed to users. There is a feature request for it: https://github.com/fmtlib/fmt/issues/2354 . FILE buffering is not too bad but it can be easily optimized:
105.
▲
Printing double a.k.a. the most difficult problem in computer sciences
(zverovich.net)
4 points
by
vitaut
3y ago
|
0 comments
106.
▲
A lightweight (~5000 LOC) Python interpreter for game engines
(github.com)
106 points
by
vitaut
4y ago
|
76 comments
107.
▲
Rust vs. C++ Formatting
(brevzin.github.io)
163 points
by
vitaut
4y ago
|
104 comments
108.
▲
James Web Space Telescope runs on C++ code
(youtube.com)
1 points
by
vitaut
5y ago
|
1 comments
109.
▲
Round Float.pi down so that it's in [0,π]
(github.com)
2 points
by
vitaut
5y ago
|
0 comments
110.
▲
Compiler Explorer now supports multiple file compilation and linking
(godbolt.org)
2 points
by
vitaut
5y ago
|
1 comments
111.
▲
Dear ImGui 1.84 Released
(github.com)
3 points
by
vitaut
5y ago
|
0 comments
112.
▲
C++20 concepts are structural: What, why, and how to change it?
(foonathan.net)
5 points
by
vitaut
5y ago
|
0 comments
113.
▲
The Untold Story of SQLite
(corecursive.com)
6 points
by
vitaut
5y ago
|
0 comments
114.
▲
A Modern Terminal Emulator
(github.com)
4 points
by
vitaut
5y ago
|
0 comments
115.
▲
iOS SSID format string bug is preventable
(zverovich.net)
3 points
by
vitaut
5y ago
|
0 comments
116.
▲
A quest for safe text formatting API
(zverovich.net)
8 points
by
vitaut
5y ago
|
0 comments
117.
▲
by
vitaut
5y ago
And yet C++ is one of the most popular languages in the world and widely used in the industry including most (all?) tech giants.
118.
▲
C++ Functional Terminal User Interface
(github.com)
1 points
by
vitaut
5y ago
|
0 comments
119.
▲
Computing the number of digits of an integer even faster
(lemire.me)
103 points
by
vitaut
5y ago
|
56 comments
120.
▲
Computing the number of digits of an integer quickly
(lemire.me)
1 points
by
vitaut
5y ago
|
0 comments
More ›