1,984 karma · joined Jun 19, 2017 (9y ago) · 3,410 submissions
comment 6mo ago · link · parent
I agree that pointer and length is better than null-terminated strings (although it is difficult in C, and as they mention you will have to use a macro (or some additional functions) to work this in C).
Making the C standard library directly against syscalls is also a good idea, although in some cases you might have an implementation that needs to not do this for some reason, generally it is better for the standard library directly against syscalls.
FILE object is sometimes useful especially if you have functions such as fopencookie and open_memstream; but it might be useful (although probably not with C) to be able to optimize parts of a program that only use a single implementation of the FILE interface (or a subset of its functions, e.g. that does not use seeking).
comment 6mo ago · link · parent
If nobody else knows then they might not access, but I looked; at least some of the parts looks like interesting to me.
> The protocols in use here are quite nice and there's always Gemini if you want a protocol that is pure document oriented.
As well as others, depending on what you want to do; it is not quite as simple as "pure document oriented" (e.g. Gemini does have inputs (1x status code) and TLS as well, including authentication with client certificates).
> Perhaps a HTTP browser that only `Accept`s `text/markdown`
It might also be made to be modular so that the file formats and other features can be added separately (including HTTP, HTML, Unicode, etc also would not be forcibly built-in, and the different protocols, file formats, character sets, and other features can be done by adding them on (which can be static or dynamic; static might allow some possible optimizations but would require recompiling and/or relinking it when you want to change it)).
comment 6mo ago · link · parent
What is "TLC" meaning here? Furthermore, for the purpose of keeping out commercial entities, it would be necessary to have the details of what is intended to be avoided and in what contexts, as well as how to avoid certain things; I think simply "keeping out commercial entities" won't do (except perhaps for such things like e.g. indexing services, which can choose not to link to them).
comment 6mo ago · link · parent
comment 6mo ago · link · parent
comment 6mo ago · link · parent
Or, if a program requests access to a camera, you can provide a capability with a still picture, a video file, a filter (e.g. that resizes the picture or modifies the colour) from some source (including, but not limited to, a camera), etc; this can be helpful in case e.g. you do not have a camera on your computer, or for testing.
(Other people have similar ideas, sometimes independently than I do.)
There is also a way to transmit capabilities across a network; I had thought of how a protocol would be made to do such a thing.
comment 6mo ago · link · parent
comment 6mo ago · link · parent
There are still considerations when designing parts of the system to be secure, while also making them have the functions that are desired (although a proxy capability system can be used to add arbitrary further restrictions if needed), but the core system can use proxy capabilities as the core security system.
Hashes would still be useful, but that is if you want to check that the package is the one that you intended; it does not prevent you from installing or writing whatever program you want to do, nor to make the program secure, which would be done by separate mechanisms; however, knowing that the package is the one that you intended can be one of the steps of the security, but not the main one.
However, security is not the only issue in a computer and operating system design, although it is a significant issue.
comment 6mo ago · link · parent
I don't know if it includes "every operating system I can think of". I can think of some things: TempleOS, BTRON (there might be more than one implementation; I know of an (apparently) abandoned FOSS implementation), Serenity OS, and some others that I do not remember what they are called.
Also, what might be useful for preservation is, in addition to the files and emulation, also the documentation for programming those operating systems. There would also be such a thing of consideration as documentation of old computers (including their instruction sets), which might be a separate project but potentially might be useful in combination with this.
Another thing would be somehow you can download individual systems together with information about the emulation, in case you want to use your own emulators for it instead of installing an existing collection with its own installers and launchers etc.
Some people mention uncommon features (and features that work in an unusual way). I think that would be worth making a article about too, and just because a feature is common does not necessarily make it good.
comment 6mo ago · link · parent
For example, you can also switch out (to activate a different pokemon) instead of attacking (switching has priority over attacking, so if you switch out then the opponent's attack will hit your newly active pokemon).
There are also many calculations involved, and it can be helpful to know how most of them work.
comment 6mo ago · link · parent
comment 7mo ago · link · parent
(There are game engines that have their own programming language for those kind of game (and some of them are the ones I had made up too).)
comment 7mo ago · link · parent
I think 404 probably makes the most sense as the response if a query string is not expected but is present anyways, although 400 might also be suitable.
comment 7mo ago · link · parent
However, it might also be reasonable to have a key or key combination (some programs use ^V) to enter control characters as data rather than as commands.
It might also be a consideration when designing a new computer (which does not have to be the same as existing ones); I had thought about such things and may make such a consideration.
comment 7mo ago · link · parent
This is one of the problems, but it is not only one. To be better, should be:
1. It should be visible in the UI for entering the commit message, to make it clear what it is doing.
2. It should not add such a thing if the Copilot is disabled. (It is mentioned by dmitriv and would hopefully be fixed soon enough)
I do not use Copilot nor any other LLMs nor VS Code, but if the problems are corrected then I think the feature would probably be reasonable.
comment 7mo ago · link · parent
comment 7mo ago · link · parent
Nevertheless, what I was saying is that many programs seem to be designed as though other character sets do encode subsets of Unicode, but actually they are different character sets and are not Unicode.
However, what I meant was, in addition to things like the examples that you have, other less obvious cases. Even if characters do correspond to Unicode (and sometimes there is more than one way to do it, which is the case for several PC characters), they are not necessarily supposed to work in the same way.
At best, Unicode could be used as an approximation if the other character sets cannot be used, although sometimes there are other ways to do it.
comment 7mo ago · link · parent
(As another comment says, it is still not good, but at least it is something.)
comment 7mo ago · link · parent
I still sometimes see mojibake in Japanese web pages, but sometimes it works; if it works, it is because the character encoding is declared properly.
In my opinion, EUC-JP is a generally better encoding of JIS (especially in e.g. C source code, which should not use Shift-JIS but EUC-JP is OK), but Shift-JIS does have some benefits in some circumstances (such as making a character grid with one byte per character cell; if using Shift-JIS for a Pascal source code then you should use (* *) instead of { } for comments please).
comment 7mo ago · link · parent
It is worse than that; you can also get different characters with the same code points, and also same code points and characters that should be different according to some uses, and also different code points and characters that should be same according to some uses, etc.