Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
smitherfield
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
61.
▲
by
smitherfield
9y ago
>You can't put runtime assert in constexpr function. As of C++17 you can: http://en.cppreference.com/w/cpp/error/assert You can also throw exceptions in constexpr functions since C++14.
62.
▲
by
smitherfield
9y ago
Sure, there's more interest in Welsh in recent decades, but I strongly suspect it will resume declining if it hasn't already. I used Welsh, Irish, Catalan and French-in-Quebec as examples because they're all languages that de
63.
▲
by
smitherfield
9y ago
“Germany” hasn’t been a country very long, only since 1871, but an identifiable German culture has existed since Roman times. German (or precursors) was spoken in Alsace for well over a millennium before declining and dying out in the 19th
64.
▲
by
smitherfield
9y ago
But is it a sustainable road? French-Canadians have been complaining for many years that Montreal's "bilingual" neighborhoods become English-speaking in a decade or so, and "French-speaking" neighborhoods become bil
65.
▲
by
smitherfield
9y ago
> Eh, I disagree... The reason transmute is (particularly) unsafe is because it can be quite difficult to tell whether a variable is bound to a value, a (possibly implicitly-dereferenced) reference or a slice, and so, given transmute&#
66.
▲
by
smitherfield
9y ago
> "what does this language make easy" (C: raw memory manipulation!) Depending on what you mean by "raw memory manipulation" that can actually be surprisingly difficult with C, without running into undefined behavior
67.
▲
by
smitherfield
9y ago
Should be noted that so far only Visual Studio (partially) implements C++17 parallel algorithms, although there are several third-party implementations.[1] Apples to oranges comparison of course, since Rayon isn't [planned to become?]
68.
▲
by
smitherfield
9y ago
I’ve been impressed (read: found few/no obvious factual errors, which puts it in a minority of one among non-industry-specific news services I read) by Bloomberg’s technology reporting lately.
69.
▲
by
smitherfield
9y ago
I take it that theoretical physics tends to get similarly butchered.
70.
▲
by
smitherfield
9y ago
Still an odd statement, since one of the authors is deceased.
71.
▲
by
smitherfield
9y ago
Oops, I used `#pragma pack` incorrectly in my code, but it doesn't change the codegen for the 96-bit structs other than offsets. Also `restrict` is only needed on the output argument to enable full vectorization of the 128-bit structs.
72.
▲
by
smitherfield
9y ago
Packed structs are possible, to be sure, but inhibit numerous optimizations, such as (relevant to this case) the use of vector instructions and vector registers. Changing the loop to 4 iterations for compactness' sake, (aligned) struct
73.
▲
by
smitherfield
9y ago
Why couldn't you do both?
74.
▲
by
smitherfield
9y ago
1. Accesses through pointers type-punned to something other than `(un(signed)) char` are undefined behavior. uint64_t n = 0xdeadbeef; uint32_t foo = (uint32_t)n; // OK uint32_t *bar = (uint32_t*)&n; // &quo
75.
▲
by
smitherfield
9y ago
The GOP lawmaker principle: http://www.slate.com/blogs/weigel/2014/03/18/the_gop_lawmake... Tl;dr is that only one person (the neo-Nazi perennial candidate) filed to run in the GOP primary in a safe
76.
▲
by
smitherfield
9y ago
>Fast code should and probably is, totally unreadable, looking like AlphaGo optimized your program. Yes and no; multithreading and optimizing to remove branches can do a number on readability, but I find optimizing for cache locality a
77.
▲
by
smitherfield
9y ago
>in Python it's quite difficult even to reason about what's going to be in L1 The interpreter's stack?
78.
▲
by
smitherfield
9y ago
While I'm a C++ fan, I'd readily concede it's much closer kin to (verbose) German than (laconic) English. Java's even more verbose, so it probably has the stronger claim on German,* which I guess makes C++ Danish and Per
79.
▲
by
smitherfield
9y ago
You can do the same thing with no C++11 features other than C99 variadic macros. (IMO cleaner, too). #define SCOPE_EXIT(...)\ struct SE##__LINE__##_{~SE##__LINE__##_(){__VA_ARGS__;}}se##__LINE__##_
80.
▲
Intel Warned Chinese Companies of Chip Flaw Before U.S. Government
(foxbusiness.com)
5 points
by
smitherfield
9y ago
|
0 comments
81.
▲
Long-Term Capital Management
(en.wikipedia.org)
1 points
by
smitherfield
9y ago
|
0 comments
82.
▲
by
smitherfield
9y ago
To (potentially) match Rust/C++ performance Swift needs 1. Stack and static-allocated arrays. 2. True pass-by-reference for value types. 3. A sufficiently-smarter compiler that's more often able to elide dynamic allocations, refer
83.
▲
by
smitherfield
9y ago
> Ah, but what makes it an invalid reference, apart from convention? It's an invalid reference in that a reference which does not refer to an object is either dead code, or an unrecoverable error. There's no point in checking
84.
▲
by
smitherfield
9y ago
Yes, that's technically true, but you have to admit a little contrived, especially as pertaining to function pointers/references. I'll amend my statement to "unlike pointers, valid references cannot point to a null add
85.
▲
by
smitherfield
9y ago
NB: If an argument to a function is a function pointer, you can write it like a normal function declaration. So you can write void transform_string(char s[], char transform(char)); instead of having to write void transform_string
86.
▲
by
smitherfield
9y ago
Somewhat predictably, the (static, non-interactive) page took about 30 seconds to load, thanks to all the Javascript.
87.
▲
by
smitherfield
9y ago
Cases in point: Mozilla, Canonical, Apache Foundation...
88.
▲
by
smitherfield
9y ago
Link?
89.
▲
by
smitherfield
9y ago
>Turns out Swift does not have null pointers. At all! Mostly true under the hood; optional value types are tagged unions (I didn't know this before reading this article and checking for myself), but optional reference types are
90.
▲
by
smitherfield
9y ago
That was in the mid-19th century, which was a very different world from the Medieval period. From your own link, during the 18th century Swedish 10-year-olds lived on average into their mid-50’s. From that it can be reasonably extrapolated
More ›