“npm install” in particular is getting me.
- 1 Post
- 62 Comments
C, C++, C#, to name the main ones. And quite a lot of languages are compiled similarly to these.
To be clear, there’s a lot of caveats to the statement, and it depends on architecture as well, but at the end of the day, it’s rare for a
byteorboolto be mapped directly to a single byte in memory.Say, for example, you have this function…
public void Foo() { bool someFlag = false; int counter = 0; ... }The
someFlagandcountervariables are getting allocated on the stack, and (depending on architecture) that probably means each one is aligned to a 32-bit or 64-bit word boundary, since many CPUs require that for whole-word load and store instructions, or only support a stack pointer that increments in whole words. If the function were to have multiplebyteorboolvariables allocated, it might be able to pack them together, if the CPU supports single-byte load and store instructions, but the nextintvariable that follows might still need some padding space in front of it, so that it aligns on a word boundary.A very similar concept applies to most struct and object implementations. A single
byteorboolfield within a struct or object will likely result in a whole word being allocated, so that other variables and be word-aligned, or so that the whole object meets some optimal word-aligned size. But if you have multiple less-than-a-word fields, they can be packed together. C# does this, for sure, and has some mechanisms by which you can customize field packing.
JakenVeina@lemm.eeto
Selfhosted@lemmy.world•Self-hosting is having a moment. Ethan Sholly knows why.English
1·6 months agoI’ll take another look, but I didn’t see any such setting when I was trying to diagnose. And I haven’t changed any Plex settings since the last time we had an internet outage and it worked properly, just a month or two ago.
JakenVeina@lemm.eeto
Selfhosted@lemmy.world•Self-hosting is having a moment. Ethan Sholly knows why.English
352·6 months agoI recently discovered that Plex no longer works over local network, if you lose internet service. A) you can’t login without internet access. B) even if you’re already logged in, apps do not find and recognize your local server without internet access. So, yeah, Plex is already there.
That’s a good analogy.
It’s far more often stored in a word, so 32-64 bytes, depending on the target architecture. At least in most languages.
JakenVeina@lemm.eeto
Programmer Humor@programming.dev•AI will replace programmersEnglish
261·6 months agoYou know what we, in the industry, call a detailed specification fo requirements detailed enough to produce software? Code.
The REAL problem is that the industry collectively uses JS almost exclusively for shit it was never meant to do. Like you say, it’s intended for it to not throw errors and kill your whole web page, because it was only ever intended to be used for minor scripts inside mostly-static HTML and CSS web pages. Then we all turned it into the most-popular language in the world for building GUI applications.
JakenVeina@lemm.eeto
Selfhosted@lemmy.world•GitHub - outerbase/studio: A lightweight Database GUI in your browser. It supports connecting to Postgres, MySQL, and SQLite.English
1·7 months agoSick. I’ve tried a few times in the past to find a frontend for postgres that I liked, and was never able to. Will have to give this a try.
JakenVeina@lemm.eeto
Selfhosted@lemmy.world•How do I use HTTPS on a private LAN without self-signed certs?English
81·7 months agoThe most straightforward thing to do, on a private LAN, is to make all your own certs, from a custom root cert, and then manually install that cert as “trusted” on each machine. If none of the machines on this network need to accessed from outside the LAN, then you’re golden.
JakenVeina@lemm.eeto
AssholeDesign@lemmy.world•character.ai does not actually delete any accounts. If you try to do it, you lose the access to the account, but the account is still stored in the siteEnglish
1·8 months agoGeneral practice for JWTs is to keep a list of “revoked but not yet expired” tokens, and check against that. That list will generally be tiny, since each item only stays on the list for as long as the normal lifetime of a token is, so it’s not really burdensome to maintain and replicate.
JakenVeina@lemm.eeto
Programmer Humor@programming.dev•Git, invented in 2005. Programmers on 2004:English
3·8 months agoThank god, we STILL use TFS at work, and its core version control model is reeeeeally fucking awful.
I’ve seen forms of this joke quite a lot in the last few years, and it never fails to make me laugh.
JakenVeina@lemm.eeto
Selfhosted@lemmy.world•Solution for convenient document scanning?English
1·11 months agoWhat DOES the new scanner do with its scan output, then?
JakenVeina@lemm.eeto
Explain Like I'm Five@lemmy.world•ELI5 how tariffs work. Are they not just like taxes one country puts on another? If so why do people especially republicans keep with Trump on imposing? Would it not hurt the US?English
82·1 year agoA country putting tariffs on imports doesn’t necessarily mean it’s being anti-competitive, or anything nefarious.
In this example, the argument generally goes that China’s EV market is so cheap, compared to the US’s, because the Chinese government subsidizes it, I.E. gives EV makers free money so they can lower costs or expand infrastructure, which in turn leads to lower prices. Thus, a US tarrif is just attempting to re-level the playing field. How much truth there is to this, I don’t really know.
And this, in TURN, doesn’t necessarily mean that China is being anti-competitive either. There’s nothing wrong with them saying “Having a robust EV infrastructure is good for our country, and we think it’s going to be very important for our future, so we’re going to invest heavily into that.”
JakenVeina@lemm.eeto
Programmer Humor@programming.dev•C++ try not to add footguns challenge (impossible)English
43·1 year agoIt’s the capability of a program to “reflect” upon itself, I.E. to inspect and understand its own code.
As an example, In C# you can write a class…
public class MyClass { public void MyMethod() { ... } }…and you can create an instance of it, and use it, like this…
var myClass = new MyClass(); myClass.MyMethod();Simple enough, nothing we haven’t all seen before.
But you can do the same thing with reflection, as such…
var type = System.Reflection.Assembly.GetExecutingAssembly() .GetType("MyClass"); var constructor = type.GetConstructor(Array.Empty<Type>()); var instance = constructor.Invoke(Array.Empty<Object>()); var method = type.GetMethod("MyMethod"); var delegate = method.CreateDelegate(typeof(Action), instance); delegate.DynamicInvoke(Array.Empty<object>());Obnoxious and verbose and tossing basically all type safety out the window, but it does enable some pretty crazy interesting things. Like self-discovery and dynamic loading of plugins, or self-configuration of apps. Also often useful when messing with generics. I could dig up some practical use-cases, if you’re curious.
JakenVeina@lemm.eeto
Programmer Humor@lemmy.ml•question, When were programmers supposed to be obsolete?English
1·1 year agoI mean, I’m paraphrasing, too.
JakenVeina@lemm.eeto
Programmer Humor@lemmy.ml•question, When were programmers supposed to be obsolete?English
27·1 year agoEven better quote, I love using this one.
“So, with AI writing code for us, all we need is an unambiguous way to define, what all our business requirements are for the software, what all the edge cases are, and how it should handle them.”
“We in the industry call that ‘code.’”

Alternative image for C: Mr. Incredible: “A PARAMETER IS A PARAMETER!”