[-] arendjr@programming.dev 3 points 10 months ago

Balanced people tend not to burn time and emotional energy on politics for free, basically. Yes, I know that's a self-own.

As someone who’s literally currently writing a book/philosophy called Philosophy of Balance this one struck a chord 😅

But you are right, I’m burning a lot of time and energy on exactly this and I feel it makes people wary and skeptical of what’s wrong with me… When really, I don’t think anything is wrong with me now. Hasn’t always been like that though, so if I can help others ease their struggle by writing about my own, I think that’s worth it.

[-] arendjr@programming.dev 3 points 2 years ago* (last edited 2 years ago)

Yeah, I mix them too, although I apply quite a bit of functional techniques especially at the architectural level as well. OO I use mostly for dealing with I/O and other areas where statefulness cannot be avoided.

If you’re interested, I also wrote an in-depth blog where I touch on these topics: https://arendjr.nl/blog/2024/07/post-architecture-premature-abstraction-is-the-root-of-all-evil/

[-] arendjr@programming.dev 3 points 2 years ago

JSON patch is a dangerous thing to use over a network. It will allow you to change things inside array indices without knowing whether the same thing is still at that index by the time the server processes your request. That’s a recipe for race conditions.

[-] arendjr@programming.dev 3 points 2 years ago

I greatly fear refactoring in Rust. Making a single conceptual change can require a huge number of code changes in practice, especially if it’s a change to ownership.

I think this is a fair criticism, but I think you and the poster you responded to are talking about different things. Usually when people use the term “fearless” in relation to Rust, it means the language provides a high level of confidence that what you’re delivering is free of mistakes. This certainly applies to refactoring too, where usually after you are done, and things compile again, you can be reasonably confident things work as before (assuming you didn’t make other changes the type system can’t catch for you).

The kind of fear you are describing sounds more like a discouragement because of the amount of work ahead of you. That’s fair, because Rust does sometimes make things harder. I just think many Rust developers will disagree with you, not because you’re wrong, but because they may not feel the same type of discouragement, possibly because they’ve learned to appreciate the rewards more.

[-] arendjr@programming.dev 3 points 2 years ago

Surely it would be easier to leave that to the TypeeScript devs and just focus on linting and formatting, no?

Almost nobody uses the TypeScript compiler for transpilation. I think most people nowadays use either Esbuild or SWC for that. The advantage that Biome has is that we already have the parsing and the serialization infrastructure and can add features like that with relative ease. For users that means fewer dependencies, less configuration, and less room for error.

[-] arendjr@programming.dev 2 points 2 years ago

the formatter doesn’t support pure HTML, or Vue

Both are being worked on 😉

There’s already partial Vue support now, but only the JS part so far. CSS formatter is also on the way.

[-] arendjr@programming.dev 2 points 2 years ago

I use Astro, because it allows me to write posts in Markdown and publish as a static website, though there are certainly other solutions that allow you to achieve the same thing. I just bundle it up in an Nginx Docker image and host it on Fly.io. If you want you can look at my setup here, though beware it isn’t documented (even the README is already out of date): https://github.com/arendjr/phebe

[-] arendjr@programming.dev 2 points 2 years ago

I would suggest writing blog posts about topics that you’re familiar with. Make sure you write the posts such that also people not too familiar with the material can follow it. Share your posts, and ask for questions and feedback.

[-] arendjr@programming.dev 2 points 2 years ago* (last edited 2 years ago)

Nah, 40 years ago this discussion already existed and it was between C and FORTRAN at the time. FORTRAN was often faster than C, precisely because of aliasing rules that Rust now benefits from as well: https://stackoverflow.com/questions/146159/is-fortran-easier-to-optimize-than-c-for-heavy-calculations

Btw, are these the Debian benchmarks you were referring to? Because I can see C and Rust trading blows with one another, but neither taking a consistent lead. Nothing that points to an undisputed performance lead surely. https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/rust-gcc.html

But I still agree with your premise that performance isn’t the deciding factor. Which means that other than legacy reasons, C (and C++) really doesn’t have much going for it anymore.

[-] arendjr@programming.dev 2 points 2 years ago

Looks like a true case of Stockholm syndrome.

[-] arendjr@programming.dev 2 points 2 years ago

Generally, I don't think it really matters how many people are involved for the conflict resolution how many people are editing. There is one person who will reach the server first, and then the other(s) need to apply transformation(s).

But I think in your example the tricky part is when you say "each want to add their item as 3rd in the list because it is a todo list and its place in the list is important". The algorithm will be able to resolve for each of them that their item will come after the 2nd, and before what was originally the 3rd. But it will not be able to put them all on the 3rd position, of course, so it will sort their items and insert them adjacent to one another. So with 3 people inserting simultaneously into the 3rd position, one will end up in the 4th position and one in the 5th.

view more: ‹ prev next ›

arendjr

0 post score
0 comment score
joined 2 years ago