59 karma · joined May 20, 2022 (4y ago) · 30 submissions
comment 4w ago · link · parent
comment 4mo ago · link · parent
It's been normal for me for the past 3 years thanks to using NixOS for all server infrastructure.
comment 7mo ago · link · parent
> Anyone who disagrees should consider why you’re on a venture capitalist website.
Not limiting yourself to an ideological bubble is actually a good thing, regardless of what website you're on.
comment 10mo ago · link · parent
I have written from scratch an SSG and used my website to dogfood it. A lot of it is/was experimenting and learning how web works bottom up, so it is rough around the edges nearly everywhere, but practically everything is my own work - both the website and the way it is built.
I have a lot of ideas on how the website can be made better, but there is always way more things to do than time to actually do the things...
comment 2y ago · link · parent
The way the async feature works in Rust is that the asynchronous function is just a syntax sugar that gets desugared into a state machine struct during compilation. The way this state machine works is similar to how one could achieve async in a language like C. It's unfair to dismiss everything as excuses given that the fundamental aim of the language is different.
In Rust async functions are not really colored because again - the async function is just a syntax sugar for a struct you can create and use in a sync context. The colors analogy is only really applicable in a language like JavaScript, where there's no way to poll an async function in a sync context.
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
I feel like this won't necessarily happen with Rust, because Rust isn't locked down by any standard, breaking changes can happen and there are also Rust editions which help with the whole process of updating the language. The "better Rust" might just be another revised edition of Rust
comment 2y ago · link · parent
data List a = Nil | Node a (List a)
data Tree a = Leaf a | Node (Tree a) (Tree a)
there is nothing stopping you from writing something like this in JS const list = { kind: 'node', val: 3, next: { kind: 'nil' } };
And then using a switch case to navigate the list/tree matching on the kind field.comment 2y ago · link · parent
comment 2y ago · link · parent
-- PVP summary: +-+------- breaking API changes
-- | | +----- non-breaking API additions
-- | | | +--- code changes with no API change
version: 0.0.0.1
[0]: https://pvp.haskell.org/comment 2y ago · link · parent
I used Python type hints and MyPy since long before I used TypeScript, and I have to say that TypeScript's take on types is just plain better (that doesn't mean it's good though).
1. More TypeScript packages are properly typed thanks to DefinitelyTyped. Some Python packages such as Numpy could not be properly typed last I checked, I think it might change with 3.11 though. Packages such as OpenCV didn't have any types last I checked.
2. TypeScript's type system is more complete, with better support for generics, this might change with 3.11/3.12 though.
3. TypeScript has more powerful type system than most languages, as it is Turing-complete and similar in functionality to a purely functional language (this could also be a con)