• 0 Posts
  • 40 Comments
Joined 2 years ago
cake
Cake day: June 11th, 2023

help-circle




  • Oh I see. syncthing is more for keeping 2 directories synched between machines. I guess in a sense, it’s more of a Dropbox competitor while croc and sharr are for one-off file transfers. For awhile, I ran an owncloud server at work for internal use. It was pretty good for file synching, but required some port forwarding through the router. These solutions mentioned here seem to all have a public host somewhere to eliminate that need.



  • I suppose it depends on the language? For the most part I think you’re right. Exceptions are only used (if at all) in situations where a program diverges unexpectedly from its normal flow. But take a language like Python. They’re just everywhere. Even your plain old for loop ends on an exception, and that’s just business as usual.





  • Any New Yorkers here? I’m interested in your perspective on Giuliani. I only have a cursory knowledge of him. He first came to my attention when he made headlines busting some crime family as a DA way back when. Then he was in the news a lot as the mayor of NYC during 9/11. He seemed pretty respected at the time? I dunno. And next thing you know, he resurfaces as an enforcer for the Trump administration, winding up getting disbarred and generally shunned by society. I guess I’m curious as to whether he was always a scumbag or grew into the role?



  • There were breaking changes between C and C++ (and some divergent evolution since the initial split) as well as breaking changes between different releases of C++ itself. I am not saying these never happened, but the powers that be controlling the standard have worked hard to minimize these for better or worse.

    If I took one of my earliest ANSI C programs from the 80s and ran it through a C++23 compiler, I would probably need to remove a bunch of register statements and maybe check if an assumption of 16-bit int is going to land me in some trouble, but otherwise, I think it would build as long as it’s not linking in any 3rd party libraries.


  • I think the thing with C++ is they have tried to maintain backward compatibility from Day 1. You can take a C++ program from the 80s (or heck, even a straight up C program), and there’s a good chance it will compile as-is, which is rather astonishing considering modern C++ feels like a different language.

    But I think this is what leads to a lot of the complexity as it stands? By contrast, I started Python in the Python 2 era, and when they switched to 3, I was like “Wow, did they just break hello world?” It’s a different philosophy and has its trade-offs. By reinventing itself, it can get rid of the legacy cruft that never worked well or required hacky workarounds, but old code will not simply run under the new interpreter. You have to hope your migration tools are up to the task.



  • Ah that makes sense.

    I think another thing that might be uniquely Canadian is when you’re paying at a drivethru and you see the machine emerge from the pickup window taped to the end of a hockey stick. That was a big thing during the pandemic for social distancing. I guess more recently, they’ve been moving to less improvised solutions, which is a shame. I really liked the hockey stick!


  • The cash I have on hand comes exclusively from playing pub gigs in a band. That is still very much a cash-driven economy where I am. When I accumulate enough, I usually wind up spending it on music gear, so I don’t think this hobby of mine is major wealth-builder. But while many businesses are moving away from cash, it seems music stores are used to people like me and still allow fairly hefty cash transactions.

    The other day I was settling my tab at the pub and the guy hands me a machine. I say, I’ll pay by cash thanks. He says really?!? Dude, you literally just handed me cash for the gig tonight. Oh yeah…



  • I started in C and switch to C++. It’s easy to think that the latter sort of picked up where the former left off, and that since the advent of C++11, it’s unfathomably further ahead. But C continues to develop and occasionally gets some new feature of its own. One example I can think of is the restrict key word that allows for certain optimizations. Afaik it’s not included in the C++ standard to date, though most compilers support it some non-standard way because of its usefulness. (With Rust, the language design itself obviates the need for such a key word, which is pretty cool.)

    Another feature added to C was the ability to initialize a struct with something like FooBar fb = {.foo=1, .bar=2};. I’ve seen modern C code that gives you something close to key word args like in Python using structs. As of C++20, they sort of added this but with the restriction that the named fields have to come in the same order as they were originally defined in the struct, which is a bit annoying.

    Over all though, C++ is way ahead of C in almost every respect.

    If you want to see something really trippy, though, have a look at all the crazy stuff that’s happened to FORTRAN. Yes, it’s still around and had a major revision in 2018.