repungnant_canary,

Joke on you until the python program segfaults

Bene7rddso,

If it does it’s because of C/C++ code

Subverb,

Nevermind that the C++ program is two orders of magnitude faster when completed.

I would love to learn and use Rust but I’m a embedded systems guy. Everything of consequence is C and C++.

T156,

If the embedded system is old or poorly-maintained enough, there might be more Rust than you’d think.

cucumber_sandwich,

There’s embedded rust for a few platforms. Using it on ESPs is fun

Knock_Knock_Lemmy_In,

Rust seems pretty performant

…pages.debian.net/…/rust-gpp.html

Subverb,

I meant faster than Python, not faster than Rust. Rust is fast.

Knock_Knock_Lemmy_In,

Ah. OK. Makes more sense.

ElCanut, (edited )

Rust developer: I’d like to compile some code

Rust compiler: the fuck you are

malle_yeno,
@malle_yeno@pawb.social avatar

The rust compiler holds your hand, wraps you in blankets, makes you hot chocolate, kisses you on the forehead before it gently and politely points out what you did wrong and how you can solve it step-by-step. It would never think of something as heinous as swearing at you, shame on you for insulting my wife’s honour like this.

BautAufWasEuchAufbaut,
@BautAufWasEuchAufbaut@lemmy.blahaj.zone avatar

I need a rust compiler in my life 😍

ElCanut,

Rust compiler is passive agressive, like:

“There’s an error at line 286 because you still don’t know how to use the borrow checker after all this time ♥️”

deur,

its a compiler. That is at best projection, especially considering how the compiler’s error feedback is designed to be firm yet gentle.

theherk,

Damn right. And once it compiles… it works.

django,

Meet my friend: .unwrap()

theherk,

Fair.

planish,

The rust compiler produces a flawless understanding of your code, and then quits out because understanding that code is a Nightly-only feature and you’re using the stable build.

_xDEADBEEF,

except when it gives errors about lifetimes of some object.

boy, that makes my brain hurt

hector,

I don’t know from where this legend comes from but lifetimes/concurrency/macros errors are brain-hurting.

Most of the time I find myself dropping project because I wrote my program in a correct way but Rust just does not like how it is designed lol. I can’t get shit done with this language

Flxibit,

This C++ message has an urgency vibes to it:

“Segmentation fault!! Drop the Nuclear Reactor quick!!”

FiskFisk33, (edited )

Average C++ error

Average C++ error

ScreamingFirehawk,

Embedded C entered the chat

flubba86,

Your loop had a race condition, so we let the smoke out for you.

TheGalacticVoid,

Can’t believe that my code is racist smh

Trarmp,

Ho hoo, that isn’t smoke, it’s steam, from the steamed rams we’re having! Mmm, steamed rams.

mindbleach,

// I am responsible for every byte of this code and still don’t know why this line breaks everything.

Omega_Haxors, (edited )

C#: Time for a treasure hunt! Find the Null Reference Exception. Here’s a map. X marks the spot.

kogasa,
@kogasa@programming.dev avatar

C# tells you the call site/method name and line number right at the top. It’s only really annoying when you have aggregate exceptions, which sometimes occur because someone async’d wrong

Omega_Haxors,

Actually getting there is the other part. It’s not like java where you can go down the chain if the problem isn’t where it says it is.

Socsa,

Imagine unironically praising Java.

kogasa,
@kogasa@programming.dev avatar

Java good

Socsa,

Opinion bad

pingveno,

Java: Not all poo poo.

flubba86, (edited )

The one thing I can say about java; the kinds of people who like Java tend to really like Java. Everyone else just leaves them to it.

Lemzlez,

And the people hating on it somehow never used any version above 8, which is 10 years old and EOL.

flubba86,

Oh I’m firmly in the second camp. They can use whatever version they like, as long as I don’t have to go near it.

towerful,

Same could be said about PHP

thtroyer,

Having used PHP and Java extensively in my career, it’s always entertaining to read what people think about these languages.

zalgotext,

I haven’t touched PHP since college, so about a decade, but back then I compared it to a very disorganized but well equipped toolbox. Everything you need to do your projects is there, but it’s scattered through 12 different unorganized drawers and cubbies, there’s an annoying mix of metric and imperial stuff, plus some random bits and bobs you inherited from your grandfather that you have no idea what they do.

QuaternionsRock,

I’ve used Java 21 pretty extensively, and it’s still comically bad compared to various alternatives, even apples-to-apples alternatives like C#. The only reason to use Java is that you’ve already been using Java.

Lemzlez,

it’s still comically bad compared to various alternatives, even apples-to-apples alternatives like C#.

I’d be interested to hear why. IMO Java has the superior ecosystem, runtime(s!), and community. The best part is that you don’t even HAVE to use java to access all this - you can just use kotlin, groovy, scala,… instead.

In terms of the language itself, while it (still) lacks some more modern language features, it has improved massively in that area as well, and they’re improving at a significant rate still. It also suffers from similar issues as PHP, where it has some old APIs that they don’t want to get rid of (yet?), but overall it’s a solid language.

mindbleach,

All the ideas are good.

Only the ideas are good.

kaffiene,

Java is awesome. There ya go

humbletightband,

Java is good. Supporting Java legacy is bad

wathek,

Oh yes, let’s pick on the weak programming languages because haha funi

spacebanana, (edited )
@spacebanana@lemmy.world avatar

Java is a traditional and conservative language, which has its strong upsides, like the syntax being familiar to many people who haven’t used the language before. It’s a language that brought us the JVM, gave a job to many people and established fundamentals for other languages to inspire and improve on. If you don’t like Java, you can just use another language for the JVM, like Scala, Kotlin or Clojure.

KammicRelief,

and inspired C#, which is pretty rad! (humble opinion… preparing for downvotes because I don’t get the feeling lemmy is where M$ devs hang out)

deur,

Only a fool could miss the value C# has when used to solve the proper problems :)

KammicRelief,

Totally! Thanks 😊

docAvid,

You only named one upside, I can’t think of any other, and C-like syntax is pretty common, so it’s not much of an upside. It’s at least debatable whether the JVM is a good thing at all - the majority of languages get along perfectly well without it, and there’s no reason to believe the ones that do target it wouldn’t be doing just fine if it didn’t exist. It’s weird to say Java gave a job to anybody - the demand to have software written resulted in programmers being hired; if Java hadn’t been pushed on the market by Sun, it would have just been another language. Java didn’t establish any fundamentals at all, it just borrowed from other places. While all three of the other languages you mention are interesting, for sure, I’m not sure why somebody who doesn’t like Java should limit themselves to JVM languages.

vox, (edited )
@vox@sopuli.xyz avatar

<span style="color:#323232;">gdb ./fuck
</span><span style="color:#323232;">r
</span><span style="color:#323232;">where
</span>

you should get a complete stack trace (complete with values of some function arguments)

Zuberi,
@Zuberi@lemmy.dbzer0.com avatar

The ole’ single C++ error turning into 600 lines of issues

Strykker,

Except the C++ “Core dumped” line is telling you it just wrote a file out with the full state of the program at the time of the crash, you can load it up and see where it crashed and then go and look at what every local variable was at the time of the crash.

Pretty sure you can even step backwards in time with a good debugger to find out exactly how you got to the state you’re currently in.

neosheo,
@neosheo@discuss.tchncs.de avatar

Where does it write the file

Agent641,

Nobody knows

unionagainstdhmo,
@unionagainstdhmo@aussie.zone avatar

Probably the same place as failed sudo reports

flashgnash,

On a secret FBI server somewhere where they watch your failures and laugh

unionagainstdhmo,
@unionagainstdhmo@aussie.zone avatar

When you apply for a home loan or a passport:

“Unfortunately we will have to reject your application”

“Why?”

“We have received several reports of failed sudo attempts and segmentation faults”

elxeno,

you can set it

tl;dw: writes to the path in /proc/sys/kernel/core_pattern

Plasma,
@Plasma@lemmy.ml avatar

I believe it’s /var/lib/apport/coredump on Ubuntu.

Swedneck,
@Swedneck@discuss.tchncs.de avatar

imagine if it, like, told you this so you didn’t have to find out about it via a post on lemmy

current,

i mean you’re expected to know the basic functioning of the compiler when you use it

ysjet,

Imagine if you knew the most basic foundational features of the language you were using.

Next we’ll teach you about this neat thing called the compiler.

russjr08,

I’m not a C/C++ dev, but isn’t apport Ubuntu’s crash reporter? Why would dumps be going into there?

Though on a rhetorical thought, I am aware of systemd’s coredumptctl so perhaps its collecting dumps the same way systemd does.

ysjet, (edited )

wiki.ubuntu.com/Apport

It intentionally acts as an intercept for such things, so that core dumps can be nicely packaged up and sent to maintainers in a GUI-friendly way so maintainers can get valuable debugging information even from non-tech-savvy users. If you’re running something on the terminal, it won’t be intercepted and the core dump will be put in the working directory of the binary, but if you executed it through the GUI it will.

Assuming, of course, you turn crash interception on- it’s off by default since it might contain sensitive info. Apport itself is always on and running to handle Ubuntu errors, but the crash interception needs enabled.

russjr08,

Ah I see, that’s actually pretty cool - thanks!

ysjet,

np

PotatoesFall,

imagine if it like, read that file and gave you a stack trace

ysjet,

gdb gives you waaaaaaaaaaaaaaay more than a stack trace.

TarantulaFudge,

I love gdb! I recently had to do a debug and wow its so cool! On gentoo I can compile everything with symbols and source and can do a complete stack trace.

inetknght,

…unless you build the executable with optimizations that remove the stack frame. Good luck debugging that sucker!

TangledHyphae,

Am I the only one in this thread who uses VSCode + GDB together? The inspection panes and ability to breakpoint and hover over variables to drill down in them is just great, seems like everyone should set up their own c_cpp_properties.json && tasks.json files and give it a try.

soulsource,
@soulsource@discuss.tchncs.de avatar

If you are using systemd, there’s a tool called coredumpctl.

reverendsteveii,

puts me in mind of the old guru meditation error messages that popped up in the stone knives and bearskins era of computing.

Buttons,
@Buttons@programming.dev avatar

Why doesn’t JavaScript have tracebacks?

bartvbl,

How useful would they be when they rely to such a large extent on various callback functions?

Amaltheamannen,

More like 100 lines of template errors

DampCanary,
@DampCanary@lemmy.world avatar

If only I could show segfaul stack tracetrough looped macros.

It breaks VSCode (it would be hilarious if I wasn’t the author of said macros).

Asudox,
@Asudox@lemmy.world avatar

Where’s rust?

caseyweederman,

Rust: this garbage code is beneath me, come back when you have your shit together.

uis,

Still compiling

marcos,

Rust required you to fix all the errors before running the code.

Asudox,
@Asudox@lemmy.world avatar

Runtime errors are still a thing.

marcos,

Compared to that trio, they are a rarity that make people excited just to spot one.

Turun,

I have a graphical application that crashes regularly when I switch between displays with Ctrl+alt+number. Something in the winit stack does not like it.

Asudox, (edited )
@Asudox@lemmy.world avatar

Runtime errors are rare? Interesting. I guess it depends on how much error handling the dev additionally wants to do.

Turun,

Compilation: top row, runtime: button row.

kbal,
@kbal@fedia.io avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • programmerhumor@lemmy.ml
  • GTA5RPClips
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • tacticalgear
  • cubers
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • osvaldo12
  • ngwrru68w68
  • kavyap
  • InstantRegret
  • JUstTest
  • everett
  • Durango
  • cisconetworking
  • khanakhh
  • ethstaker
  • tester
  • anitta
  • Leos
  • normalnudes
  • modclub
  • megavids
  • provamag3
  • lostlight
  • All magazines