Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
paavohtl
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
22 ms
·
211.
▲
by
paavohtl
5y ago
You only need atomic reference counting if you're sharing objects between multiple threads, but if you use an object from one thread at a time then non-atomic inc/dec is enough. Rust allows you to make the choice between the two k
212.
▲
by
paavohtl
5y ago
This comparison is more about the different gRPC implementations rather than the languages. There is no inherent reason why Java (as a language) should be faster than C++ or Rust in a benchmark like this. A lot of time and money have been s
213.
▲
by
paavohtl
5y ago
They do have an official not-quite tiling VM: FancyZones[1]. I don't know how good it is, but it's open source. I personally use AquaSnap [2] (commercial, 18 USD) for my window tiling & snapping needs which has definitely been
214.
▲
by
paavohtl
6y ago
I guess the big news is the support for 64-bit. Good that it didn't take them that long - the first Windows version on a 64 bit architecture is not even 20 years old yet. Windows XP for IA-64 was released in October 2001 [1]. [1] http
215.
▲
by
paavohtl
6y ago
Yes, basically. The Rust standard library has data structures and functions which require memory allocation, and _will_ panic on allocation failure. But the allocating subset of the standard library is a separate module, which is usually tu
216.
▲
by
paavohtl
6y ago
Rust doesn't have invisible allocations. The compiler doesn't even know what an allocation is.
217.
▲
by
paavohtl
6y ago
Well, remember that consoles use unified memory. A modern high end PC game can easily use 5GB of VRAM + 8GB of RAM.
218.
▲
by
paavohtl
6y ago
TS can target older versions of JS without modern features, just like Babel. If you target a more recent latest release of ES, the emitted JS should be pretty much the same as the source TS, just without type annotations.
219.
▲
by
paavohtl
6y ago
Compiling TypeScript to JavaScript is essentially just removing the type annotations. Compiling to a bytecode VM would be orders of magnitude more work, especially since TS is defined to have exactly the same runtime semantics as JavaScript
220.
▲
Rendering large 3D tilemaps with a single draw call at 3000 FPS
(blog.paavo.me)
5 points
by
paavohtl
6y ago
|
0 comments
221.
▲
Rendering large 3D tilemaps with a single draw call at 3000 FPS
(blog.paavo.me)
1 points
by
paavohtl
6y ago
|
0 comments
222.
▲
by
paavohtl
6y ago
C# implements proper reified generics. Generic types parameterised with different types are actual types in C#, while in Java generics is basically just syntax sugar for avoiding type casts. Each element in a List<byte> in C# takes 8
223.
▲
by
paavohtl
6y ago
There are generally speaking no breaking changes. Upgrading the toolchain practically never requires any changes to code.
224.
▲
by
paavohtl
6y ago
Rust has a very strict backwards compatibility policy, and as a result has had ~0 breaking changes since 1.0, with the notable exception of opt-in Rust 2018 edition. Best practises might get out of date, but generally speaking nothing break
225.
▲
by
paavohtl
6y ago
Rust has a release every 6 weeks, but there haven't been any new major new features in stable since async await, which was in November 2019. The situation is not too different from Chromium.
226.
▲
by
paavohtl
6y ago
It's a nice thought, but generally speaking you can't port these ideas over to C without effectively creating a new backwards incompatible language.
227.
▲
by
paavohtl
6y ago
I don't understand how Tailwind would make writing CSS easier if you're not an expert. The complexity of CSS is in learning how the layout algorithm works, and how to implement common UI patterns. You're still writing exactly
228.
▲
by
paavohtl
6y ago
> To me it would be conceptually simpler to consider one named variable as analogous to a memory location. But that's how it already is! The variable x is conceptually a single memory location within the stack frame. The match state
229.
▲
by
paavohtl
6y ago
> suddenly I had an ownership error, because `x` was moved by the first match statement How do you propose it should work instead? Disallow using match with owned values, so that match never moves? Disallow assigning to a variable where
230.
▲
by
paavohtl
6y ago
You're ignoring the fact computer science has advanced since the 1970s when C was created. C is not full of footguns because that's the only way to build a fast language, it's unsafe because it's old and full of legacy b
231.
▲
by
paavohtl
6y ago
Let's say 1.0. Languages can change significantly between the first publicly released build and the first stable release.
232.
▲
by
paavohtl
6y ago
Has any language successfully added memory safety as a "feature" after the initial release? To me memory safety seems like a fundamental aspect of a language that is very hard if not impossible to change afterwards, without so man
233.
▲
by
paavohtl
6y ago
Ah, but it does. Statements are separated by newlines. That is the same as significant whitespace (or a statement separator; you can interpret it either way).
234.
▲
by
paavohtl
6y ago
As far as I know, a (C-like) language must either have: - A statement separator (semicolons) - Significant whitespace Otherwise parsing the language is very likely ambiguous, e.g JavaScript [1] [2]. [1] https://flaviocopes.com&#x
235.
▲
by
paavohtl
6y ago
Sounds like EA and Frostbite.
236.
▲
by
paavohtl
6y ago
Ehh, not really. It depends on how you define functional programming. C# supports first class functions, tuples, some form of pattern matching and LINQ extensions support basic FP collection operations like map (Select), filter (Where) and
237.
▲
by
paavohtl
6y ago
Well, that's not exactly correct. You can create a scheduled order up to a week in advance.
238.
▲
by
paavohtl
6y ago
To run Tensorflow and other ML libraries in WSL.
239.
▲
by
paavohtl
6y ago
TypeScript supports ADTs (discriminated unions) and not-quite-pattern matching using a combination of features: union types, literal types and control-flow based type narrowing. Here's an example from the TS handbook: https:/
240.
▲
by
paavohtl
6y ago
Even though the concepts weren't invented for C#, you are technically correct in that C# pioneered the keywords async and await.
More ›