Readit News logoReadit News

Deleted Comment

CrendKing commented on uv: An extremely fast Python package and project manager, written in Rust   github.com/astral-sh/uv... · Posted by u/chirau
theLiminator · 2 months ago
uv and ruff are a great counterexample to all those people who say "never reinvent the wheel". Don't ever do it just for the sake of doing it, but if you have focused goals you can sometimes produce a product that's an order of magnitude better.
CrendKing · 2 months ago
I believe most of the time this phrase is said to an inexperienced artisan who has no idea how the current system works, what's the shortcoming of it, and how to improve upon it. Think of an undergraduate student who tries to solve the Goldbach conjecture. Usually what ended up is either he fails to reinvent the wheel, or reinvent the exact same wheel, which has no value. The phrase certainly does not apply to professionals.
CrendKing commented on Rust compiler performance   kobzol.github.io/rust/rus... · Posted by u/mellosouls
kibwen · 3 months ago
> This is an effect of the language not having a proper ABI for compiling libraries as dynamically loadable modules

No, this is a design decision of Cargo to default to using project-local cached artifacts rather than caching them at the user or system level. You can configure Cargo to do so if you'd like. The reason it doesn't do this by default is because Cargo gives crates great latitude to configure themselves via compile-time flags, and any difference in flags means you get a different compiled artifact anyway. On top of that, there's the question of what `cargo clean` should do when you have a global cache rather than a local one.

CrendKing · 3 months ago
Why can't Cargo have a system like PyPI where library author uploads compiled binary (even with their specific flags) for each rust version/platform combination, and if said binary is missing for certain combination, fallback to local compile? Imagine `cargo publish` handle the compile+upload task, and crates.io be changed to also host binaries.
CrendKing commented on The humble for loop in Rust   blog.startifact.com/posts... · Posted by u/todsacerdoti
CrendKing · 9 months ago
Maybe I'm dumb, but I can't see how the code in the "Errors and map" section can compile. "transform_list" returns a Result<>, yet "result" is just a Vec. I thought you always need to wrap it with Ok()? Is that a new nightly feature?
CrendKing commented on The two factions of C++   herecomesthemoon.net/2024... · Posted by u/cyclopeanutopia
adambatkin · 9 months ago
Something that Rust got _really_ right: Editions. And not just that they exist, but that they are specified per module, and you can mix and match modules with different Editions within a bigger project. This lets a language make backwards incompatible changes, and projects can adopt the new features piecemeal.

If such a thing came to C++, there would obviously be limitations around module boundaries, when different modules used a different Edition. But perhaps this could be a way forward that could allow both camps to have their cake and eat it too.

Imagine a world where the main difference between Python 2 and 3 was the frontend syntax parser, and each module could specifically which syntax ("Edition") it used...

CrendKing · 9 months ago
But Edition can exist only because Rust intrinsically has the concept of package, which naturally defines the boundary. C++ has nothing. How do you denote a.cpp be of cpp_2017 edition which b.cpp be cpp_2026? Some per-file comment line at top of each file?

C++ is a mess in that it has too much historic baggage while trying to adapt to a fiercely changing landscape. Like the article says, it has to make drastic changes to keep up, but such changes will probably kill 80% of its target audiences. I think putting C++ in maintenance mode and keep it as a "legacy" language is the way to go. It is time to either switch to Rust, or pick one of its successor languages and put effort into it.

CrendKing commented on I Replied 'Stop' to a Political Text Message. I Got 100 More   wsj.com/tech/personal-tec... · Posted by u/pcl
CrendKing · 10 months ago
I don't understand the strategy from the election spammer here. They clearly want the recipient to vote/donate. But if someone spends time to type "STOP" instead of ignoring, he has clearly read the message and not interested in the solicitation. Then why spam this particular number? The more flood the more he hates you, the less he's gonna to anything positive to you. It is a extremely low quality "live number" for the campaign, and waste of money.
CrendKing commented on How I write code using Cursor   arguingwithalgorithms.com... · Posted by u/tomyedwab
CrendKing · 10 months ago
I've been using AI to solve isolated problems, mainly as a replacement of search engine specifically for programming. I'm still not convinced of these "write whole block of code for me" type of use case. Here's my arguments against the videos from the article.

1. Snake case to camelCase. Even without AI we can already complete these tasks easily. VSCode itself has command of "Transform to Camel Case" for selection. It is nice the AI can figure out which text to transform based on context, but not too impressive. I could select one ":, use "Select All Occurrences", press left, then ctrl+shift+left to select all the keys.

2. Generate boilerplate from documentation. Boilerplate are tedious, but not really time-consuming. How many of you spend 90% of time writing boilerplate instead of the core logic of the project? If a language/framework (Java used to be, not sure about now) requires me to spend that much time on boilerplate, that's a language to be ditched/fixed.

3. Turn problem description into a block of concurrency code. Unlike the boilerplate, these code are more complicated. If I already know the area, I don't need AI's help to begin with. If I don't know, how can I trust the generated code to be correct? It could miss a corner case that my question didn't specify, which I don't yet know existing myself. In the end, I still need to spend time learning Python concurrency, then I'll be writing the same code myself in no time.

In summary, my experience about AI is that if the question is easy (e.g. easy to find exactly same question in StackOverflow), their answer is highly accurate. But if it is a unique question, their accuracy drops quickly. But it is the latter case where we spend most of the time on.

CrendKing commented on A near impossible literacy test Louisiana used to suppress the black vote   openculture.com/2024/10/t... · Posted by u/rcarmo
valval · 10 months ago
I think the weight of your vote should come from the amount of taxes you pay, up to some cap. Can someone explain to me like I’m 12 why this is a bad idea?
CrendKing · 10 months ago
1. The richest 1% vote whoever makes them even richer, at the expense of all the other 99% poorer than them. 2. The other 99% people no longer play the "democracy" game with the rich, form their own government without the "voting power corresponds to how much tax paid". 3. The rich people country loses its foundation, thus can no longer sustain. The rich join the poor people country.
CrendKing commented on __init__.py files are optional. Here's why you should still use them   dev.arie.bovenberg.net/bl... · Posted by u/todsacerdoti
CrendKing · 10 months ago
I don't know why didn't PEP 420 make one file at root of the package that describe the structure of all the sub-directories, rather than going the controversial, lazy route to remove __init__.py. That way you get both the explicitness and avoid the litering of empty marking files.
CrendKing commented on QtCS2024: Compile once, Run everywhere   wiki.qt.io/QtCS2024_Compi... · Posted by u/mmphosis
CrendKing · a year ago
The page 8 ("Building") of the slides has the badger picture to the right. His right hand has some weird "nails". Another example of AI-generated image.

u/CrendKing

KarmaCake day561October 21, 2016View Original