Programming thread

I have found good reason to not program in 32 bit, because Windows 64 bit can only emulate 32 bit software using WoW64, which reduces the efficiency of using 32 bit software from a native 32 bit operating system by 5%, and rebuilding the code for a 32 bit application to 64 bit increases efficiency anywhere from 5% to 15%.
There shouldn't really be any performance loss running a 32-bit application on a 64-bit Windows installation on x86/amd64 hardware.

Compiling a 32-bit application to run natively on 64-bit hardware doesn't automatically improve performance either in most situations, though there are some cases where it does (e.g. some loops can run quite a bit faster on amd64 since the hardware offers more general-purpose registers, allowing the processor to do more work with fewer fetches from cache or main memory).

It does confer other benefits though, like access to more memory and the ability to memory-map files larger than 4GB. If the program is doing anything "clever" that depends on basic data types being a certain size (i.e. 32-bit pointers, 32-bit integers for the int type, etc.) and hardcodes those expected sizes in some way, it'll either break in subtle or unexpected ways, or it'll still have trouble poking around beyond 4GB of memory. Updating it to remove that cleverness and rely on the standard typedefs instead will fix that and often gives the compiler a chance to optimize that code more.

The compiler is often also smart enough to automatically use optimized 64-bit instructions for some program operations that do the work more quickly or efficiently rather than an instruction that's just literally "do the same thing as its 32-bit counterpart, but on the 64-bit hardware."

For instance, if you're doing simple arithmetic with 32-bit integers and you're doing a bunch of it at once (and they happen not to depend on each other's results, e.g. you're computing separate totals for a bunch of different "things" independent of each other), there might be 64-bit instructions that can accept both 32-bit terms in a single 64-bit register and store the result into a 32-bit or 64-bit register (instead of requiring one register for each term and a third for the result). Since there are more registers available and since those simple operations use fewer registers, you can get more of them done before you need to fetch more data from cache/memory. Add out-of-order (speculative) execution and threaded execution features of the CPU, and you can end up seeing those simple arithmetic operations being performed essentially simultaneously (or really close to it). For some stuff, that's not a big deal, but for things like media encoding, compression, encryption and so on, it can provide a decent boost.

Beyond that automatic stuff, to get a noticeable performance gain from taking a program from 32-bit to 64-bit, it needs to be doing work that can actually benefit from the change, and it needs to be ported a bit so that it makes use of 64-bit APIs and CPU features that aren't present on 32-bit hardware. It doesn't usually take much effort (the new features usually get exposed through updates to the standard library or through add-on libraries) but it still needs to be done by hand.

How does C++ or regular C compare with Rust?
C/C++ are much more mature, enjoy widespread use, have an absurd amount of quality tools available, have high-quality standard libraries, are ubiquitous and available on practically every imaginable platform (OSes and hardware) from itty-bitty hobby boards to gargantuan overpriced mainframes. Rust is newer, less mature, not nearly as widely used, and is being pushed aggressively (to many people's annoyance) by Google and by trannies, which automatically makes it suspect.

So if Rust is supposed to be superior to C, then why does it take so much compile time?
I don't think it's superior to C/C++. Its compilation is slow partly because it's a new language and the toolchain hasn't matured enough, and partly because its developers are so busy pushing the language they don't spend a lot of time actually improving its tools.

Who else can achieve 6 nines of up time? Have you heard Facebook is working on a typed Erlang compiler?
Nice! I seriously need to spend some quality time learning Erlang properly to advance beyond "curious dabbler" territory with it.

If you get outside of the normal codemonkey business projects, it's used quite a bit. I programmed in it for 3 years on a gov TS project which I obviously cannot go into detail about, but let's just say it was shit involving "critical defense communication under extremely low baud rates". Shooting the shit around base with other gov contractors (if you have a TS clearance but still private sector, you're in a small pool so you know a lot of the other ppl), they all knew of or worked on previous Erlang projects.

Because of that little bit of Erlang experience, I had dropbox people pounding my phone for months asking for interview/relocations.
That's great to hear! Maybe it's time to seriously consider a career shift into that area to escape from the modern day "nodejs backend and react/vue frontend" business loop. It pays handsomely but fuck me it's super-boring shit.

I've done some DoD contracting in the past and had a Tricare-related security clearance for many years, so at least I'm "in the system." Maybe it wouldn't be such a large leap to get back into it if I've got some Erlang knowledge to sweeten the deal.

I see the Rust "community" is already tying itself into a pretzel, trying to explain why Rust didn't replace C as it was extensively "advertised" as such.

Turns out, again and again, that the best or easiest explanation for a failure is incessant goalpost moving. Now it's going to replace C++. Next up, it's going to replace Go or Java or Python or whatever.
Every "this is gonna replace C/C++!" language goes through this learning process the hard way. It's fun to watch. It also tickles me that Google is backing Rust so hard, and not its own language (Go). Talk about not having faith in your own products.
 
Nice! I seriously need to spend some quality time learning Erlang properly to advance beyond "curious dabbler" territory with it.
The problem (?) I think is Erlang's killer feature, which is Erlang being a holistic system engineered for a specific purpose, not a general purpose language, even though it could be used as such. Also, actors being unbounded always makes me itchy
 
  • Like
Reactions: moocow
I beg to differ. Alienating people like Shoggoth and World of Shit does wonderful things for my peace of mind.
Doesn't do too much for your employability and/or earnings potential, though. Granted, peace of mind is valuable in and of itself, so I can't argue with that.
 
*That's not completely true, but that would be a much deeper discussion than I want to get into on a forum thread. Memory is always *safe* however. You won't crash because you tried to use something that was previously deleted.
To expand on that, there are three high level topics:
  1. You allocate unmanaged memory by calling out to an external function, you need to clean this up yourself
  2. You allocate managed memory during the lifetime of a request or unit of work and during this time you allocate loads, i.e. loading an entire database table into RAM to find one single fucking record like Entity Framework likes to trick you into doing sometimes
  3. You allocate managed memory statically and never clear it because it's permanently attached to the live object graph.
All these activities are normally fine and go unnoticed until you're serving high traffic in production because nobody seems to load test anymore. Anyone who's ever had to deal with high traffic JSON services has learned to their horror just how big those parse trees can be, and keeping them around for longer than you thought can take your service out with little in the way of debugging info being left behind.
 
We must live in opposite sides of the world because on my end we load-test things to death. Pretty fun, too.
Well my team does under penalty of death but it amazes me about stories from new team members and their previous teams just throwing a major update into production and taking down web services and claiming the traffic was unexpected and saying shit like "you've got to move fast and break things".

I'm of course not talking about the top tier internet companies but they are still names most have heard of.
 
Well my team does under penalty of death but it amazes me about stories from new team members and their previous teams just throwing a major update into production and taking down web services and claiming the traffic was unexpected and saying shit like "you've got to move fast and break things".

I'm of course not talking about the top tier internet companies but they are still names most have heard of.
We must live in opposite sides of the world because on my end we load-test things to death. Pretty fun, too.

Same. Key thing with all testing is to make it as automatic and easy to use as possible, since developers normally hate to test their code.

In my older companies we instituted a set of automatic load-testing tests which fired before a feature was merged into master. Used gatling to build the tests: https://gatling.io/

Integrated with the build/test/load-test/deploy pipeline and anything that failed in the pipeline never made it to QA. Supported a marketplace of digital asset users of ~40-60 million (now i believe it's grown to 100+)
 
Doesn't do too much for your employability and/or earnings potential, though. Granted, peace of mind is valuable in and of itself, so I can't argue with that.
Oh, that's how you're gonna play it? You and your gaggle of cum gargling troons are going to insist that you deserve to be immune to my scorn because of the off chance that an employer might find these posts and figure out who I am? Go fuck yourself.
 
saying shit like "you've got to move fast and break things".
Ah yes, "containerization doctrine" in action. Why test or debug anything when you can just destroy the container and start up a new one over and over until you accidentally tweak the right knob and it suddenly works again?

Oh, that's how you're gonna play it? You and your gaggle of cum gargling troons are going to insist that you deserve to be immune to my scorn because of the off chance that an employer might find these posts and figure out who I am? Go fuck yourself.
wew lad

You're still an unemployable asshole. Hint: they don't need to go looking for your "insightful essays" when they can smell the bullshit wafting across the table during the interview. People like you can't help but show your ass in those situations.
 
Last edited:
wew lad

You're still an unemployable asshole. Hint: they don't need to go looking for your "insightful essays" when they can smell the bullshit wafting across the table during the interview. People like you can't help but show your ass in those situations.
Look, just because you're too autistic to separate your digital life from your professional life doesn't mean everyone has that problem. See, well adjusted adults have this thing called "theory of mind" that lets them do this magical thing called "reading the room" so they can make conscious decisions about how to behave. If it helps you to understand it's kind of like being psychic, but you don't have to be a cringy anime protagonist to do it.
 
Ah yes, "containerization doctrine" in action. Why test or debug anything when you can just destroy the container and start up a new one over and over until you accidentally tweak the right knob and it suddenly works again?


wew lad

You're still an unemployable asshole. Hint: they don't need to go looking for your "insightful essays" when they can smell the bullshit wafting across the table during the interview. People like you can't help but show your ass in those situations.

I'm going to put this here in the hopes any young person just starting out in a career watches this. The fact of the world is no one cares how smart you are. There's no shortage of smart people. And 99.99% of people want to work with someone cool and kinda smart, rather than smart and and asshole.
I fucked up a bunch of my younger years because I was a cocky asshole who had no concept of charisma, and thought I would succeed just because I was the 'smart guy'. I had to put a lot of work to change and learned this lesson too late.

 
Ah yes, "containerization doctrine" in action. Why test or debug anything when you can just destroy the container and start up a new one over and over until you accidentally tweak the right knob and it suddenly works again?
And yet when I want to put someone else's unfixable lolcow code into its own containment thread, somehow no one is interested.
 
  • Agree
Reactions: moocow
Look, just because you're too autistic to separate your digital life from your professional life doesn't mean everyone has that problem. See, well adjusted adults have this thing called "theory of mind" that lets them do this magical thing called "reading the room" so they can make conscious decisions about how to behave. If it helps you to understand it's kind of like being psychic, but you don't have to be a cringy anime protagonist to do it.
Of all the terms I might use to describe you, "well adjusted" and "adult" are not among them.
 
  • Agree
Reactions: Isam
Of all the terms I might use to describe you, "well adjusted" and "adult" are not among them.
Neither would I call you "passionate" or "competent". You're clearly just a faceless corporate cog with no spine, so why does what I have to say upset you so much? It costs you nothing to assume for 5 minutes that you're subject to some amount of normalized deviancy. Feel free to ask questions if you don't understand what I'm saying.
 
"you've got to move fast and break things".
I always found this approach baffling. The line between "fingers crossed we don't have time to write tests for everything" to "lol I added a blocking API call in an async http thread and killed the server" is not thin. The amount of heart ache, lost sleep and time spent fixing those messes could be significantly reduced by just slowing down a bit, getting up from the keyboard, drinking a cup of water, planning and review.
Move fast, break things, stop by the roadside to fix them, get there second after the competition who went a bit slower and didn't break under the weight of its own mistakes and "technical debt"
 
I always found this approach baffling. The line between "fingers crossed we don't have time to write tests for everything" to "lol I added a blocking API call in an async http thread and killed the server" is not thin. The amount of heart ache, lost sleep and time spent fixing those messes could be significantly reduced by just slowing down a bit, getting up from the keyboard, drinking a cup of water, planning and review.
Move fast, break things, stop by the roadside to fix them, get there second after the competition who went a bit slower and didn't break under the weight of its own mistakes and "technical debt"

Yeah... especially if it involves learning new technologies/stack from scratch every two months or so because your manager has new ideas. Tech debt is then creeping in like Dunning-Kruger effect on steroids.
 
Back