Spyke

Replies

Comment on

The graying open source community needs fresh blood

If you look at projects in more popular languages like JS, Rust, Python. There is plenty of new blood in the contributors list. I won't speculate as to why, but it looks like the new generation doesn't like c and c++.

I think this is also backed up by the Linux kernel and thunderbird projects. Both are old c/c++ codebases and both have stated they are adopting rust in hopes of drawing interest (and contributors) from the rust community.

Comment on

The US government wants devs to stop using C and C++

I don't get why we're taking a swing at Linus here. The article only mentions him in relation to the rust for Linux project being slow going. But, it IS going and the US government has only stated that "you need a plan to move to a memory safe language by 2025 or you might be liable if something bad happens as a result of the classics (use after free/double free/buffer overflow/etc.)" but I don't think Linux would count it's free software and it does have a plan.

Comment on

What's the dumbest thing you've shipped?

ez! I work for a company that builds a SaaS end to end product.

Myself and my coworker were asked to build exports for a single client. They were json exports. To start the client would take weeks/months to get back to us, their spec was very vague and their exports had some really complex logic to sort data. We'd been going back and forth with them for almost a year when they said we should give it to them "as is". They now are the proud owners of 2 complex broken exporters.

Comment on

What programming languages aren't too criticized here?

There are only two kinds of languages: the ones people complain about and the ones nobody uses. - Bjarne Stroustrup

I think people criticise every language. I've generally got 5 languages that I use personally and for work: Rust, Go, Python, JS, PHP. I can complain about all 5 of them at the drop of a hat. No one likes everything about any language.

Comment on

Principal Skinner on Immutable Distros

I'm not against immutable distro's on principle. I imagine they still have some kinks to iron out, but I haven't looked in on them for a while.

My opinion on these things is; if it's a superior system, then it'll become the new standard, that's always what happens, and the naysayers are largely irrelevant. Just like computers, smart phones, the internet, etc.

rust

Comment on

Pretty critical PR for rust-msi is getting held up because the maintainer understands the intent but not why this works

What mantra? I think this maintainer is doing the right thing here by trying to understand why this fix works.

You should always attempt to address the root cause of an issue instead of slapping band aid patches onto everything.

To me it looks like the maintainer is trying to find out what exactly is wrong. "this doesn't happen in our C implementation" implies that there's something wrong with the rust code specifically.

rust

Comment on

My frustrations with Rust. Why is this the most loved language?

Ok, I'm going to just assume this isn't a troll.

Cargo is doing too many things at once. It’s a build system but also a package manager but also manages dependencies? Idk what to even call it.

I dont even understand your issue? It's like npm or deno which can run your code, manage your dependencies, etc. How can a JS/TS dev possibly not understand this?

Syntax is very confusing for no reason. You can’t just look at rust code and immediately know what it does. Having to pollute your code &, ? and .clone() everywhere to deal with ownership, using :: to refer to static methods instead of a “static” keyword. Rust syntax is badly designed compared to most other languages I used. In a massive codebase with tons of functions and moving parts this is unreadable.

I dislike ? because I think you should be handling errors as they come instead of sending them up the stack. I also like the explicit .clone() but if you dont want to use it, you can also add Copy to your derive's and this will make it happen automatically. module::function() generally pollutes code much less then static module.function() or static function() doesn't it?

Let’s take a look at hashmaps vs json

I hate all of this code, why arent you using struct's here? In rust its: struct Person {name String, age i32} and in typescript its type Person = {name: string age: number}

Similarly, Async code starts to look really ugly and overengineered in rust.

Sure

Multiple string types like &str, String, str, instead of just one “str” function

I know of &str and String, i've never heard of str though so you probably dont need it. &str is a string slice, aka a borrowed String. I generally say you shouldnt be using &str because generally if you get a lifetime error from using it, its because you're doing it wrong, just use String while you're learning the only real difference is that String is more verbose then ""

i32 i64 i8 f8 f16 f32 instead of a single unified “number” type like in typescript. Even in C you can just write “int” and be done with it so it’s not really a “low level” issue.

"int" from C is i32, these are int's and float's of various bit sizes. i32 = int 32bit, i62 = int 64 bit, f32 = float 32, u32 = unsigned (only positive) int32. but you dont usually need to specify this, rust has type inference. Also speaking of C, what about double, long, short, long long, unsigned long long, unsigned short...

Having to use #[tokio:main] to make the main function async (which should just be inbuilt functionality, btw tokio adds insane bloat to your program) yet you literally can’t write code without it. Also what’s the point of making the main function async other than 3rd party libraries requiring it?

I kind of agree? When async was initially designed it was done as a stackless minimal thing where we could build our own runners (like tokio) but no one really builds their own runners, they just use tokio.

Speaking of bloat, a basic get request in a low level language shouldn’t be 32mb, it’s around 16kb with C and libcurl, despite the C program being more lines of code. Why is it so bloated? This makes using rust for serious embedded systems unfeasible and C a much better option.

I don't believe you, show me this project. As a personal project I have made a monolithic web server, that handles api calls, webpage calls etc, it uses axum, tokio and serde and when I run cargo build --release it compiles down to a 1.9mb binary. The only way I can see this happening is if you're not using a release build, which is a concept you should understand as a JS dev.

With cargo you literally have to compile everything instead of them shipping proper binaries. Why??? This is just a way to fry your cpu and makes larger libraries impossible to write. It should be on the part of the maintainer to build the package beforehand and add the binary. Note that i don’t mean dependencies, I mean scripts with cargo install. There is no reason a script shouldn’t be compiled beforehand.

This argument has happened a few times that I know of. This is done for security purposes. If someone ships a binary blob you have to trust it to run, as a community, it was decided that we shouldnt do this.

Another major issue I’ve encountered is libraries in Rust, or lack thereof. Every single library in rust is half-baked.

I kinda also agree with this one, a lot of rust libraries are still in 0.x, I wouldnt call them all "half baked" though. If you search youtube you can find plenty of people using these libraries in prod.

“expect breaking changes” in the readme.

This is not specifically a rust problem this happens with every popular language & framework.

As for “memory safety”, it’s a buzzword. Just use a garbage collector. They’re invulnerable to memory issues unless you write infinite while loop and suitable for 99% of applications.

A garbage collector "freezes" you're program when it runs usually. There are plenty of cases of people benchmarking rust against go, js, c#, java, etc rust performs vastly better.

Then use C or C++ if you really need performance. Both of them are way better designed than Rust.

Microsoft and Google came out and said that "~70% of their security flaws are a result of memory issues" or something like that. C and C++ are fundamentally flawed, which is why both of those companies have adopted rust.

There are apps with billions of users that run fine on php

True, but the number is going down, which implies a growing number of people choose to stop using PHP, we're even doing it at work.

Rust is the most overwhelming proof possible to me that programmers are inheritly hobbists who like tinkering rather than actually making real world apps that solve problems

These are fighting words lol. I already mentioned Google and Microsoft have adopted rust for Windows, Chrome and Android. Other companies solving real world problems with rust include, Cloudflare, Dropbox, NPM, Yelp, Discord, Mozilla, Coursera, Figma, Facebook/Meta and Amazon.

Typescript is easy, rust is not. Typescript is therefore better at making things quick, the resourse usage doesn’t matter to 99% of people and the apps look good and function good.

What are you building where the end user doesn't care if the app performs well? Not caring about resource usage results in poor performance which results in dissatisfied users/customers which stop doing business with you. Have you heard about the unending war in JS land against bundle size?

So at this point I’m seeing very little reason to continue. I shouldn’t have to fight a programming language

No one is required to like every programming language, If you don't like rust, stop using it.

Comment on

no.. just no

Reply in thread

If you think this is more structured than traditional SQL, I really disagree. Is this a select * query, it's ambiguous. Also what table is being queried here there's no from or other table identifier.