yeah fair enough. that wasn’t really my point and I wasn’t paying attention
yeah fair enough. that wasn’t really my point and I wasn’t paying attention
yeah it’s incorrect bc it destroys multibyte characters, but no idea what you’re saying about u8 being a different type from unicode. the original code was reading bytes and converting them too? the typing isn’t the issue, you can still store utf8 as a series of bytes
python isn’t the only language to do “execute everything imported from a particular file and all top level statements get run”. both node and c# (but with restrictions on where top level statements can be) can do that type of thing, I’m sure there’s more.
python conventions are unique because they attempt to make their entrypoint also importable itself without side effects. almost no one needs to do that, and I imagine the convention leaked out from the few people that did since it doesn’t hurt either.
for instance in node this is the equivalent, even though I’ve never seen someone try before:
if (path.resolve(url.fileURLToPath(import.meta.url)).includes(path.resolve(process.argv[1])))
{
// main things
}
because with things that the compiler does, like padding for alignment, it frequently takes up more space than that. that was my argument the whole time. what til are you talking about? I’m talking about an extra layer you’ve decided doesn’t count. ofc sizeof bool will be a byte in all of those languages.
a bool taking up a single byte is a fantasy that those languages use because developers generally don’t need to think about all the other stuff going on.
for some people it’s nice to start from nothing and build up config, I’d recommend doom for anyone else. it’s nice to be given a file with all the settings you can change instead of having to do it all yourself.
a bool is actually a single bit, the rest is all padding
c++ guarantees that calls to malloc are aligned https://en.cppreference.com/w/cpp/memory/c/malloc .
you can call malloc(1)
ofc, but calling malloc_usable_size(malloc(1))
is giving me 24, so it at least allocated 24 bytes for my 1, plus any tracking overhead
yeah, as I said, in a stack frame. not surprised a compiler packed them into single bytes in the same frame (but I wouldn’t be that surprised the other way either), but the system v abi guarantees at least 4 byte alignment of a stack frame on entering a fn, so if you stored a single bool it’ll get 3+ extra bytes added on the next fn call.
computers align things. you normally don’t have to think about it. Consider this a TIL moment.
sure, but if you have a single bool in a stack frame it’s probably going to be more than a byte. on the heap definitely more than a byte
things that store it as word size for alignment purposes (most common afaik), things that pack multiple books into one byte (normally only things like bool sequences/structs), etc
I can’t imagine a sandbox would help. what can an an extension do that doesn’t touch some arbitrary code that gets run? it could add a line to the middle of a giant file right before you run and remove it immediately after. even if you run the whole editor in a sandbox you do eventually deploy that code somewhere, it can change something inconspicuous like a url in a dependency file that might not get caught in a pr
the only solution is to audit everything you install, know all the code you run, etc. ofc that’s not reasonable, but idk what else there is. better automated virus check things maybe? identity verification for extension publishers? idk if there’s an actual solution
it legitimately is a neutral network, I’m not sure what you’re trying to say here. https://en.wikipedia.org/wiki/Generative_pre-trained_transformer
I can use insomnium for almost everything, but it’s not as complete as postman. randomly I’ll run into some problem that makes me go back.
for instance, there’s no way to just enter binary data on a readable format to send over websocket. with postman there’s an obvious dropdown to send hex encoded data as a binary message.
you don’t think they’ll just use some app to verify it? my state’s mdl doesn’t even show any personal info other than name, if they want birthday they have to scan it
fwiw, my state’s mobile id app doesn’t even ask for the location permission. so maybe some, but it’s not universal
your phone isn’t safe from anyone unless it’s been restarted since last unlocked, and is reasonably new. they have exploits for after it’s been unlocked incl while things are pinned
you realize they’re more than just your picture on a screen, right? there’s a whole public key private key verification process that happens, which covers your photo and personal info, at least from what I understand of ISO 18013-5.
if anything it should be almost impossible to make a fake mobile id, barring exploits in reader software or the govt leaking their private key.
but stability isn’t something that would drive a gentoo user away either.
a lot of the draw of gentoo from what I saw was being able to configure everything down to how it gets compiled. it’s simple to apply a patch to a package before it gets built or maintain a custom kernel config in nixos, as well as all the advantages of declarative os
doesn’t matter if they don’t know who you are, Nintendo can still offer you a ton of money to delete it. it wasn’t necessarily legal threats or I assume they would have sent the cease and desist to GitHub and gotten the repo removed first
pinecil can be battery powered too and I’ve had a good time with mine. granted the battery is either a laptop power bank or a drill battery, but it’s still portable enough for me
repr is generally assumed to be side effect free and cheap to run, so things like debuggers tend to show repr of things in scope, including possibly
exit
also then it behaves differently between repl and script, since repr never gets run. to do it properly it has to be a new repl keyword I imagine, but I still don’t know if I’m sold on the idea