

I’m sure all of them are just cherrypicked hotfixes from main tho
I’m sure all of them are just cherrypicked hotfixes from main tho
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
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
}
ones that can run cli tools do great, they just use npm
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
gitea has had some organizational problems so a lot of people have been using forgejo instead, which is just a community fork of gitea plus some more features
well the language server plugins all run a binary language server out of sandbox so zed doesn’t really do anything safer in particular there either. no ide has solutions, solutions don’t really exist right now. it’s not a problem of features of the language as much as it is features developers expect in extensions. I suppose there is a hypothetical “the extension wants to make this change to this file, approve” type flow like AI tools have now, but that sounds unpleasant to use. it still doesn’t get around things like language servers being designed to run as standalone processes out of sandbox.
by audits I meant you individually go and read all the code of all the extensions you use. of course that’s impossible too, but that was my point
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
they are the first thing that comes up when searching “cursor” in both ddg and google, so I think they’re doing ok
not sure what you’re talking about but there’s two things here.
TRAMP is great and you can run the lsp on the remote machine without installing anything assuming the linters and lsp are already installed. for comparison, vscode remote downloads and runs a shim thing when you connect.
I use doom emacs at work for large codebases all the time and haven’t run into any problems. why does it only work for really small projects?
yeah that should just be a pip package instead, then install it any normal way
it doesn’t matter how it was made once it’s secondhand since it doesn’t support the manufacturer
I suppose there’s people that bought the original item since it had resale value, but I really doubt that’s significant overall, especially at most thrift stores