• 6 Posts
  • 53 Comments
Joined 4 years ago
cake
Cake day: May 31st, 2020

help-circle


  • Yeah, learning Rust has given me greater appreciation for C/C++. Like, the selling feature of all three is that they don’t use a runtime, which means you’re not locked into that ecosystem. You can create libraries with them, that can be used from virtually any other language.

    It’s also easy to say that the performance of Java, Python et al is fine, but having a larger application start up in 1 rather than 20 seconds is still always appreciated.


  • To be honest, I’m not the best to ask about Python. I need more rigid languages for my daily job, so it’s much quicker for me to just throw down a small project in one of those.

    I do know, though, that Python comes with Tkinter out of the box. People usually don’t praise that all too much, but it’s probably fine for small GUIs.

    However, it’s almost certainly worse than Powershell/.NET for creating Windows-only GUIs.

    If you’d like to write GUIs on the Linux side, then I would frankly recommend not doing that.
    No Linux sysadmin wants a GUI to deal with. If you give them a CLI, then they can automate that, i.e. integrate it into yet another (probably Bash) script.
    Not to mention that most Linux servers don’t even have a graphics stack installed…


  • People use Bash for quick and dirty scripts, because it’s pretty much just a few symbols in between all the commands that they know and use all the time anyways. You don’t really ‘learn’ Bash in a dedicated manner, you rather just pick up on tricks and tidbits over years.

    For more than that, you’d use Python, Ruby or a full-fledged programming language.
    Personally, I would even go so far that Powershell hardly added something new that wasn’t already covered by a programming language…






  • Problem is, even if they are capable of explaining it, it’s basically our job to learn things 8 hours a day. Trying to catch someone up on that, who doesn’t have that same job, that’s nearly impossible. Well, and you still want to rant/tell about your day for social interaction purposes.

    Like, my mum would also sometimes ask what my (programmer) workday was like and I’d start telling that we had to deploy onto a really old Linux system. Wait hang on, Linux is an operating system. And an operating system is the software that makes computers go. Do you know what “software” is? Hmm, it’s like…
    …And yeah, basically one computer science lecture later, I still haven’t told anything about my workday.

    Sometimes, I can try to leave out such words, like “we had to roll out our software onto a really old computer”, but then I can practically only say “that was really annoying”. To actually explain how I slayed the beast, I do need to explain the scene.


  • Ephera@lemmy.mltoProgrammer Humor@lemmy.mlOf course
    link
    fedilink
    arrow-up
    13
    arrow-down
    1
    ·
    1 month ago

    Wut? Are we talking about one of those “salads” with mayo, eggs, bacon strips, croutons, sugary dressing and whatnot?

    Because if not, then cherry tomatoes are going to be pretty much the sweetest thing you’ll find for your salad. I’d definitely still call them healthy, but not more so than the other ingredients of a salad…


  • Yeah, it’s intentionally obscure. Basically, x86 assembly code is a way of telling a processor what to calculate, at a very low level.
    So, it’s similar to programming languages, but those actually get translated into x86 assembly code, before it’s told to the processor. (“x86” is a certain processor architecture. Others exist, too, most prominently “ARM”.)

    But yeah, even with me knowing that much, I’d need to guess what ret and int3 might do.

    Everyone knows jmp and nop, though, of course. 🙃





  • Rule of thumb, which I feel gets you 80% there:

    If you store data in a struct, you want that struct to have ownership of that data. So, avoid storing references in structs.
    If you need to pass data into a function, you usually want to pass it as a reference.

    This makes it so you have your data stored in some place with the ownership and from there you just pass data down into functions as references. It forces you to structure your program like a tree (which is often a very good idea to begin with).