this post was submitted on 25 Sep 2024
388 points (92.9% liked)

Programmer Humor

19648 readers
2580 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 122 points 1 month ago (11 children)

It is so weird when people idolize programming languages. They are all flawed and they all encourage some bad design patterns. Just chill and pick yours.

[–] [email protected] 86 points 1 month ago* (last edited 1 month ago) (17 children)

Yeah, but that makes it sound like they're all equal, and there hasn't been any progression, which is untrue. You're either insane or a historical reenactor if you write something new in COBOL.

I think Rust is genuinely a huge leap forwards compared to C/C++. Maybe one day it will be shitty and obsolete, and at the very least it will become a boring standard option, but for now...

[–] [email protected] 15 points 1 month ago (1 children)

I now want a community led historical reenactment of loose tie wearing software devs in the 60s where they are just chain smoking and banging out COBOL or Fortran punch cards

[–] [email protected] 9 points 1 month ago

[email protected]

I don't think much happens in person, but the community for it definitely exists.

[–] [email protected] 15 points 1 month ago (2 children)

Rust is already obsolete, compared to Stingpie's excellent assembly language, paired with object oriented programming!

This is the SEALPOOP specification:

  1. an assembler must create a binary program which satisfies the programmer's specifications.
  2. a compiler must translate the programmer's code into SEALPOOP's parallel instruction set source, which should be fed into the SEALPOOP PISS assembler.
load more comments (2 replies)
[–] [email protected] 8 points 1 month ago (2 children)

C++ when it was new was exactly like this. Rust still hasn't had 30 years of legacy, all these Rust prophets will shit on it's name in 15 years when they have to maintain huge codebases with it

Besides, C++ is very likely to adopt memory safety

load more comments (2 replies)
load more comments (14 replies)
[–] BatmanAoD 20 points 1 month ago* (last edited 1 month ago) (1 children)

[warning: "annoying Rust guy" comment incoming]

I don't think Rust is perfect, but arguably I do "idolize" it, because I genuinely think it's notably better both in design and in practice than every other language I've used. This includes:

  • C
  • C++
  • Java
  • C#
  • Kotlin
  • Scala
  • Python
  • Ruby
  • JavaScript (...I've barely used this, but I doubt my opinion would change on this one)
  • Perl
  • Go
  • Bash (...look, I've had to write actual nontrivial scripts with loops and functions, so yes, Bash is a real language; it just sucks)
  • Tcl/Tk (if you don't know, don't ask)
  • CommonLisp (...again, I've barely used this, and I wish I had more experience with this and other Lisps)

In a literal sense, I agree that all (practical) languages "are flawed." And there are things I appreciate about all of the above languages (...except Tcl/Tk), even if I don't "like" the language overall. But I sincerely believe that statements like "all languages are flawed" and "use the best tool for the job" tend to imply that all (modern, mainstream) languages are equally flawed, just in different ways, which is absolutely not true. And in particular, it used to be true that all languages made tradeoffs between a fairly static, global set of binary criteria:

  • safety/correctness versus "power" (i.e. low-level system control)
  • safety/correctness versus run-time efficiency (both parallelism and high single-thread performance)
  • ease-of-use/ease-of-learning versus "power" and runtime-efficiency
  • implementation simplicity versus feature-richness
  • build-time versus run-time efficiency
  • type-safety versus runtime flexibility

Looking at these, it's pretty easy to see where most of the languages in my list above fall on each side of each of these criteria. What's special about Rust is that the core language design prevents a relatively novel set of tradeoffs, allowing it to choose "both" for the first two criteria (though certainly not the latter three; the "ease-of-use" one is debatable) at the expense of higher implementation complexity and a steeper learning curve.

The great thing about this isn't that Rust has "solved" the problem of language tradeoffs. It's that Rust has broadened the space of available tradeoffs. The assumption that safety necessarily comes at a runtime cost was so pervasive prior to Rust that some engineers still believe it. But now, Rust has proven, empirically, that this is not the case! And so my ultimate hope for Rust isn't that it becomes ubiquitous; it's that it inspires even better languages, or at least, more languages that use concepts Rust has brought to the mainstream (such as sum-types) as a means to explore new design tradeoff spaces. (The standard example here is a language with a lightweight garbage-collecting runtime that also has traits, sum-types, and correct-by-default parallelism.)

There are other languages that, based on what I know about them, might inspire the same type of enthusiasm if I were to actually use them more:

  • Erlang
  • Gleam
  • OCaml
  • Swift

...but, with the exception of Swift, these are all effectively "niche" languages. One notable thing about Rust is that its adoption has actually been rather astounding, by systems language standards. (Note that D and Ada never even got close to Rust's popularity.)

[–] [email protected] 12 points 1 month ago (1 children)

I know religious people who could not explain their faith so specifically.

[–] [email protected] 8 points 1 month ago (1 children)

Because they just have their own brain chemistry as the basis of it whereas the above comment clearly states:

Rust has proven empirically that the tradeoff between performance and safety doesn't need to exist.

Which is truth. And it's much easier to base a coherent argument on truth rather than vibes.

load more comments (1 replies)
[–] [email protected] 15 points 1 month ago (4 children)

Have you actually ever seen an example of such an annoying rust dev? Cause I haven't, only a ton of people who see rust as their enemy number 1 because of such people. Those who are "annoyed" are way more annoying…

[–] refalo 15 points 1 month ago

I have. You just don't hang out in the "right" places

[–] [email protected] 9 points 1 month ago

I have made experiences with annoying PHP devs and I don't hate them.

My critic wasn't towards rust devs or any devs of any language but towards idolization of a language instead of studying the nature of those languages the flaws and advantages and use the best tool available or attempting to create a better tool.

load more comments (2 replies)
[–] [email protected] 11 points 1 month ago (1 children)

I just villainize languages. C++ is the devil.

load more comments (1 replies)
load more comments (7 replies)
[–] bgschaid 96 points 1 month ago (1 children)

How can a rewrite in a completely different language violate this license? There should also be a clause "Once you looked at the source code you must not write anything with similar functionality .... in any programming language"

[–] [email protected] 44 points 1 month ago (1 children)

Leaked Windows code made Wine and ReactOS devs anxious, since MS could sue over it. On the other hand, I've looked up the keycodes from the Linux kernel for X11 (it's literally just PS/2 with the unused codes being used in place of the E0 keys), and they haven't yet came after us.

[–] [email protected] 47 points 1 month ago* (last edited 1 month ago) (1 children)

It made them nervous because someone might put parts of the original source into Wine. You can't do that in a rewrite in a different language, it doesn't even make sense. The thing the people in this screenshot are gloating about isn't even relevant to this license.

[–] [email protected] 8 points 1 month ago

It made them nervous for the same reason emulator devs don't touch leaks with a ten foot pole, giving the megacorp any reason to argue your clean house reimplantation is anything but clean is just asking for trouble.

[–] [email protected] 68 points 1 month ago (3 children)

That's a lot of words for "I don't understand the borrow checker"

In all seriousness, yeah rust users are annoying, but I think rust is a welcome change over C/C++

[–] [email protected] 46 points 1 month ago (2 children)

Hey I'm both an annoying Rust user and I also don't understand the borrow checker. I just put & and * in front of things until it works.

[–] [email protected] 14 points 1 month ago

I found this tutorial pretty helpful for that: http://intorust.com/

You can presumably skip the first two chapters...

load more comments (1 replies)
[–] 5C5C5C 38 points 1 month ago

Speaking as an annoying Rust user, you're being bigoted. I'm annoying, but the vast majority of Rust users are normal people who you wouldn't even know are using Rust.

Don't lump all the others in with me, they don't deserve that.

[–] [email protected] 15 points 1 month ago (1 children)

While the borrow checker has its downsides, so its legitimate uses. A few people in the D community were thinking about implementing it as a library.

[–] [email protected] 8 points 1 month ago (1 children)

Didn't know D still had an active community, that's pretty awesome. Wonder if someone has ever worked on a borrow checker for Nim.

[–] [email protected] 8 points 1 month ago

D seems to getting traction yet again, and some stuff might get better (D3, new GC, new standard library, etc).

[–] [email protected] 58 points 1 month ago

It really whips the crab's ass.

[–] [email protected] 49 points 1 month ago (2 children)

Lol rust winamp clone let's gooooo

[–] [email protected] 10 points 1 month ago (1 children)

Agreed, crab that anti-foss activist in particular

[–] [email protected] 18 points 1 month ago (1 children)

ironic that winamp is was built on open formats and widespread IP theft (music ripped and shared)..... but they're strangely prickly when it comes to their code.

:|

[–] [email protected] 15 points 1 month ago (1 children)

The guy who wrote Winamp Sold it decades ago. So you should clarify who is defensive about their code :-) The original coder is really good - he also wrote the awesome AVS visualization plugin for Winamp which among other things utilizes a special programming language called "eel". After selling Winamp he went on to create Reaper which also uses eel I think.

load more comments (1 replies)
load more comments (1 replies)
[–] [email protected] 44 points 1 month ago

That’s insanely dumb

[–] [email protected] 39 points 1 month ago

Rust (derogatory)

[–] [email protected] 34 points 1 month ago (3 children)

you may not create, maintain, or distribute a forked version of the software

ok, i'm just gonna host it on my website for archival purposes and if someone happens to download it that's not my fault

[–] [email protected] 17 points 1 month ago

Huh weird, these pull requests just magically accepted themselves

[–] [email protected] 8 points 1 month ago

host it on my website

That's distributing and barred under the other license item. Sorry to burst your bubble.

load more comments (1 replies)
[–] [email protected] 29 points 1 month ago (2 children)
[–] [email protected] 25 points 1 month ago

Some of these people are Javascript web developers idealizing system development and the C language.

load more comments (1 replies)
[–] [email protected] 24 points 1 month ago

The license, even if it's truly just to avoid rust (for whatever dumbass reason they have), is enough to me to hardpass on the entire project.

[–] [email protected] 23 points 1 month ago* (last edited 1 month ago)
[–] [email protected] 20 points 1 month ago* (last edited 1 month ago)

No distribution, but he didn't say no distributing a language parser to change it into rust and then microcompile a new executable on the spot.

Tell me you are having a midlife crisis over not wanting to change over from the programming language you grew up mastering without telling me you are having a midlife crisis over not wanting to change over from the programming language you grew up mastering.

[–] [email protected] 18 points 1 month ago

Is it really just old men saying stuff should remain in C/C++ to preserve their nostalgia? What a bunch of petty bullsh!t.

[–] [email protected] 15 points 1 month ago (1 children)
load more comments (1 replies)
[–] [email protected] 12 points 1 month ago (2 children)

I want to use Rust, but it lacks an Specification. Until that is done it's a no go.

[–] [email protected] 11 points 1 month ago (2 children)

What is this abi and standard calling methods you speak off? Are you a rust-non-believer or some shit! Rewrite it all in rust, no questions asked!

( i too like the ideas of rust, but without a decent abi or not constantly changing interface, its useless to me. I dont want to rebuild all code, including libraries every time i update 1 library in my application )

[–] [email protected] 8 points 1 month ago (9 children)

You're aware that Rust gives you access to the full C ABI?

What language are you going to use instead that has a better ABI story? Swift? Or maybe a dynamic language like Python?

[–] [email protected] 8 points 1 month ago* (last edited 1 month ago) (3 children)

I know that exists, but whats the point of that? You loose all advantages of rust when you use the library then because it cant predict application state with the library code. There is a reason all those rust libraries are compiled locally when you compile a rust application. Its a major lacking point for rust, and as long as it lacks that its dead in the water for big projects.
Again, i like strong type stuff and i like the ideas of rust but it is not grown up enough for me

load more comments (3 replies)
load more comments (8 replies)
load more comments (1 replies)
[–] [email protected] 11 points 1 month ago

TIL about this problem.

[–] [email protected] 8 points 1 month ago* (last edited 1 month ago)
load more comments
view more: next ›