Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
majorexception
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
majorexception
2y ago
I don't think there's real difference between Python and C. With Python you can't make your program use more than 4 GB of address space if you run it with a 32-bit interpreter. You have to swap the interpreter. In C the same
2.
▲
by
majorexception
3y ago
I did that, but then adding 0_degC + 0_degC gave 273.15_degC. I think that would be surprising to many people. In reality I don't remember ever having to deal with physics formulas that used °C instead of Kelvins, so the only time I ne
3.
▲
by
majorexception
3y ago
Something like this: auto operator"" _rpmPerVolt (long double x) { return decltype (1_rpm / 1_V)(x); } I have a macro for that: #define SI_DEFINE_LITERAL(xUnit, xliteral) \ [[nodiscard]] \
4.
▲
by
majorexception
3y ago
Yup. So I explicitly deleted operators for °C, so things like 5_degC + 10_degC won't compile.
5.
▲
by
majorexception
3y ago
I have a project for which I wrote a simple units library. I don't think I'd be able to write any physics-related project now without using it (or a similar library). My Quantity class has a set of 8 parameters (7 SI base units an
6.
▲
by
majorexception
8y ago
Hmm. I have 4-core i7-4770, but the UI on this thing lags a lot, all widgets generally feels sluggish. Such graphics operations don't require a lot of CPU, though, remember that we used to have 200 MHz Pentiums? On Firefox it's ev