• 1 Post
  • 86 Comments
Joined 2 years ago
cake
Cake day: June 14th, 2023

help-circle
  • I’m in this photo and I don’t like it.

    More specifically, my programming background is in industrial automation and I’d like to add some more ‘robust and flexible’ algorithms to CoolerControl so I can control my system fans / temperature better, but it’s written in a mix of TypeScript and Rust.

    I’ve spent 20 years programming hard real-time z80 assembly and know quite a few higher-level languages. (Although I prefer the lower-level ones.) Not those ones, however, so it’s not just a couple of hours work to raise a PR against that project. Going to need to crack some books.


  • The industrial design has improved enormously since then, as well. The days of using the same connector for different voltages, or connectors which can be rotated are gone. Everything has a keyed connector or similar pokayoke that means it only fits to the correct place, and only one way around. CPUs don’t suicide if you forget to attach their system cooler, they just throttle. Much better, and obvious in retrospect that it should always have been that way.

    Apart from the front panel connectors on a motherboard, of course. Those fiddly little bastards can get straight to hell.






  • Vim is my preferred ‘IDE’ for C++, Python, Bash, and general configuration file editing. It’s got some big pluses:

    • its text editing is superb once you’ve mastered it, but that’s a small part of its benefits when used as an IDE, and ‘Vim mode’ in other environments kind of undersells what else it can do

    • Vim has some great plugins for development. YouCompleteMe is awesome for predictive completion and showing docs, but NerdTree for file management and TagBar for showing structure are amazing as well. They’re all very configurable and they get out of your way.

    • Vim lives in your terminal window, so you can do splits and tabs using whichever terminal you like. Kitty is very fast and configurable and keeps out your way. Being able to have multiple tabs of Vim open, a tab for compilation, a tab for debugging, a tab for version control, a tab for man pages, and being able to flip between them without taking your fingers off the keyboard makes for a very fast workflow

    • Vim makes it very easy to edit binary files and be precise about whitespace changes, so it’s easy to make a minimal change for raising a PR.

    If you assign a hotkey to run a macro in Vim, then that can be made very flexible - saving and formatting all open windows, then invoking CMake to do a build and CTest to run all your unit tests can be put on a function key if you like. Trying to tell Eclipse to “just run CMake to do the build” seems to be an exercise in frustration; so many IDEs are terrible at “just getting out of the way”.

    Work pays for an IntelliJ licence for using Java. Java is so unwieldy without a proper IDE that it’s hard to code in it without it. I certainly don’t love it, though, and they seem determined to make every new version worse with bizarre new features. Flexible minimalist editing with configurable plugins is all that you really need, and on that basis Geany looks pretty good - will give it a try.



  • addie@feddit.uktocats@lemmy.worldSpeed, I am speed
    link
    fedilink
    arrow-up
    3
    ·
    3 months ago

    Yeah, but that one doesn’t have the right gear on. Section 4 of the laws of the game say:

    3(a) For ease of identification, players’ clothing must have the numbers 1 to 13 with additional numbers for the substitutes.

    4(b) A player’s normal gear shall consist of a numbered jersey of distinctive colour and/or pattern, a pair of shorts, socks of a distinctive colour and/or pattern and studded boots or shoes.

    4(f) Studs on boots or shoes shall not have sharp edges or pose a risk of injury to other players.

    If there’s one thing I know about cats, it’s that their booties have sharp edges that pose a risk of injury. That cat is going to get a red card as soon as it enters the playing field. Only language some players understand.


  • addie@feddit.uktoMemes@sopuli.xyzLiving the dream
    link
    fedilink
    arrow-up
    2
    ·
    3 months ago

    Was expecting it to be “vodka without beer is just waste of money”, in that case.

    Looking it up, most sources seem to have it the other way around - “beer without vodka”, as in there’s no point wasting money on drinking unless you’re going to do some hard drinking?







  • What you can achieve in a couple of pages of Python can be pretty spectacular. It’s also mostly very easy-to-read, with the possible exception of class inheritance, which is confusing mess.

    If you need to write more than a couple of pages, then its lack of types becomes a hindrance to me - doing refactors when functions can take basically any arguments is quite painful, for instance. Not requiring any particular structure is great, up until you start to struggle with lack of structure.

    Ideal programming language for when you’re wanting to do something that would be a bit too unwieldy for a shell script. It also makes network requests and json parsing very straightforward, so it’s great for interacting with REST APIs and writing simple microservices. Fast to write and runs quite quickly, so a good choice for Advent Of Code-like tasks. Would probably choose a different language for larger projects or when working in a team, though.




  • I learned z80 assembly back when the cutting edge of technology was a ZX Spectrum, and 68k assembly when I upgraded to an Amiga. That knowledge served me quite well for my early career in industrial automation - it was hard real-time coding on eZ80’s and 65c02 processors, but the knowledge transfers.

    Back in the day, when input got mapped straight into a memory location and the display output was another memory location, then assembly seems like magic. Read the byte they corresponds to the right-hand middle row of the keyboard, check if a certain bit is set in that byte, therefore a key is held down. Call your subroutine that copies a sequence of bytes into a known location. Boom, pressing a key updates the screen. Awesome.

    Modern assembly (x64 and the like) has masses of rules about pointer alignment for the stacks, which you do so often you might as well write a macro for it. Since the OS doesn’t let you write system memory any more (a good thing) then you need to make system calls and call library functions to do the same thing. You do that so often that you might as well write a macro for that as well. Boom, now your assembly looks almost exactly like C. Might as well learn that instead.

    In fact, that’s almost the purpose of C - a more readable, somewhat portable assembly language. Experienced C developers will know which sequence of opcodes they’d expect from any language construction. It’s quite a simple mapping in that regard.

    It’s handy to know a little assembly occasionally, but unless you’re writing eg. crypto implementations, which must take the exact same time and power to execute regardless of the input, then it’s impractical for almost any purpose nowadays.


  • Well, at least she looks good in it.

    Having hired suits and whatnot before to go to weddings, I’m not quite seeing the logic here. $19k “tax the rich” dress seems a bit of a tasteless disconnect between medium and message, but renting it for $1k doesn’t seem crazy. Committee “did their own research” and thought $3k would be more appropriate, when most attendees pay nothing at all? Surely getting her fee refunded would be more in-line?