Viewing profile — ynik
ynik
HN member- Joined
- Fri, Oct 25, 2013, 2:07 AM UTC
- HN karma
- 1,014
- Public activity
- 229 items
- HN profile
- View on Hacker News ↗
About ynik
No profile information was provided.
Recent public activity
-
comment
Comment #46137442
`s[0] == 'h'` isn't sufficient to guarantee that `s[3]` can be access without a segfault, so the compiler is not allowed to perform this optimization. If you use `&` instead of `&&…
-
comment
Comment #46056439
C# doesn't erase all generics; but there's also some type erasure happening: nullable reference types, tuple element names, and the object/dynamic distinction are all not present i…
-
comment
Comment #46044774
Windows NT started supporting unicode before UTF-8 was invented, back when Unicode was fundamentally 16-bit. As a result, in Microsoft world, WCHAR meant "supports unicode" and CHA…
-
comment
Comment #45591119
Autovectorization / unrolling can maybe still be handed with a couple of additional tests. The main problem I see with doing branch coverage on compiled machine code is inlining: i…
-
comment
Comment #45503258
Using a second partition D: is already twice as fast at small-file-writes compared to the system partition C:. This was on Windows 10 with both partitions using NTFS on the same SS…
-
comment
Comment #45450691
Only if you measure the life cycle starting from the initial release. Windows 10 dropped out of support only 3 years after its successor (Win11) was available; when Windows 8.1 sti…
- comment
-
comment
Comment #44982194
Python 3 internally uses UTF-32. When exchanging data with the outside world, it uses the "default encoding" which it derives from various system settings. This usually ends up bei…
-
comment
Comment #44518975
You are not testing what you think you are testing. "let &mut a2 = &mut a;" is pattern-matching away the reference, so it's equivalent to "let a2 = a;". You're not actually casting…
-
comment
Comment #44396796
But adding 1 to a pointer will add sizeof(T) to the underlying value, so you actually need to reserve more than two addresses if you want to distinguish the "past-the-end" pointer …
-
comment
Comment #44386336
Under your interpretation, neither gcc nor clang are POSIX compliant. Because in practice all these optimizing compilers will reorder memory accesses without bothering to prove tha…
-
comment
Comment #44354416
That applies only if you take "memory model" to mean modeling the effects of concurrent accesses in multithreaded programs. But the term could also be used more generally to includ…
-
comment
Comment #44005901
Bytecode instructions have never been atomic in Python's past. It was always possible for the GIL to be temporarily released, then reacquired, in the middle of operations implement…
- comment
-
comment
Comment #43780887
Are there any embedded compilers left that try to implement their own C++ frontend? To me it looks like everyone gave up on that and uses the clang/gcc/EDG frontends.
-
comment
Comment #43491636
At least on Debian, installing the `atop` package will automatically install a background service running atop as root. (by default, logging some stats to /var/log/atop/ every ten …
-
comment
Comment #43399468
Destructors/drop have issues though: * cannot return errors/throw exceptions * cannot take additional parameters (and thus do not play well with "access token" concepts like pyo3's…
-
comment
Comment #43398943
Even the trivial specification "given a valid input, the program exits successfully with some arbitrary output" will already get you very far: to prove this trivial specification a…
-
comment
Comment #43159494
Codegen bugs are not particularly rare either; but you usually run into them if doing "weird stuff" (which hits an edge case somewhere within the compiler). And the first instinct …
-
comment
Comment #42432199
The crucial bit for Vec::drain is in these two lines of code, which the article lists but does not discuss: // set self.vec length's to start, to be safe in case Drain is leaked se…
-
comment
Comment #42408068
The big differences are: 1. Rust closures are by-value structs; whereas Java closures are heap objects. 2. Rust generics are monomorphized; whereas Java type-erases them -> lots of…
-
comment
Comment #42388386
Probably because they did not think of this special case when writing the standard, or did not find it important enough to consider complicating the standard text for. In C89, ther…
-
comment
Comment #42308509
You misunderstood. N, M are supposed to be integers (const generics); in your example code you've made them types. Also, your `type Output = Foo >::Output>;` just means "multiplica…
-
comment
Comment #42235370
That only works for C++ code using C++20 modules (i.e. for approximately nothing). With textual includes, you need to be able to switch back and forth the edition within a single c…
-
comment
Comment #41943687
The main big philosophical difference regarding templates is that Rust wants to guarantee that generic instantiation always succeeds; whereas C++ is happy with instantiation-time c…