963 karma · joined Jun 30, 2023 (3y ago) · 1,114 submissions
comment 9mo ago · link · parent
I have a similar concept, which is roughly described as "don't extend your own arm onto the chopping block, but make use of other people doing the same". Don't make presumptions, and you will never be wrong. Don't dig holes for yourself. Be kind, respectful, genuine. Don't throw the first punch, but don't let innocent people get hurt. Find common ground. When they extend out their arm, take their hand and guide them towards truth and goodness.
comment 10mo ago · link · parent
I have a nascent theory about human feelings, which goes that the basic feelings we experience are usually perceived through extensive filtering by our personal, social, cultural, etc., beliefs/experiences. The convincing conscious perception of a feeling may be misinterpreted to an extent. Anger is an emotion that can often become misdirected. Supposedly, sexual arousal can be interpreted in translation from fear[0].
Someone who is suicidal may consider suicide seriously, but feel an urge to live in the process of suicide. Circumstance may make certain feelings clear, but by examining removed from circumstance, the person had the capacity for both feelings. There is some "essence" to the person that those feelings, brought on by circumstance, only scratch the surface of. Observing a narrow range of circumstances and assuming it is the essence is a mistake.
I think that more or less every person, in their essence, understands human decency. It may be that some people truly don't have the capacity to appreciate it (thought: aliens?), but usually, I think the real culprit is learned behavior through various factors, and innate cognitive biases. I don't mean to say that it is easy to change people, because the opposite is generally true, but I think it is worth thinking about.
That said, if there was someone who truly needed to, say, murder the way we need to eat, I say that they would do no wrong by murdering, but that we would do no wrong by apprehending them. I wish to get to people at their essences, not their accidents.
comment 10mo ago · link · parent
(Tit-For-Tat: Prefer cooperating, but if the other person defected on the previous turn, defect on the current turn.)
comment 10mo ago · link · parent
comment 10mo ago · link · parent
comment 10mo ago · link · parent
comment 10mo ago · link · parent
comment 10mo ago · link · parent
comment 10mo ago · link · parent
comment 10mo ago · link · parent
comment 10mo ago · link · parent
Given by how we talk about emotions, I think they are "rational", but operate under a different set of rules than we normally apply to "rational" thinking. In fact, feelings are deeply intertwined with our supposedly "rational" thinking, to the point where I don't think there is a significant boundary. The lack of information is prevalent when feelings are in play, and I believe the same is true in general. Even physics feels far different than pure mathematics, after all. Instead of deferring to conventions in how to act when feelings are involved, as if they belong to a wholly different and mysterious world, we can make sense of the entire world. But of course, empathy, kindness, and good judgement are not exempt. None of this conflicts with what you're saying, but I think a subtle shift in mindset will be fruitful in applying it.
comment 10mo ago · link · parent
comment 10mo ago · link · parent
comment 10mo ago · link · parent
Perhaps we're using the words in different ways. What I mean is: in order to interact with something, it must either be done directly or through abstraction. If abstraction is used, it must be realized without itself. A language such as Java or C#, at least for performance, must expose some things on a lower level that the runtime normally abstracts away. (Or, say, the OS memory manager can't use virtual memory before it enables virtual memory.) Technically, the lower level could be programmed with a dialect of Java/C# or something like that, or there may be another level of abstraction that hides the details (a compiler generating code in the background, for example). But something has to be the first step at the bottom.
> Yes, IPC is context switching.
(Considering the diversity of how OSes approach context switches/IPC, I use "context switch" to mean "CPU mode/address space switch", more or less.)
Usually, IPC is context switching and overhead. seL4's IPC has overhead involved with scheduling, threads, and message buffering. My design isolates the context switching, which is common to all IPC designs.
> Timer interrupts can cause extra context switches.
I don't see what your point is. I assure you that my system is not uniquely fragile to timer interrupts.
> It's trivial, except for the little problem that your userspace program can be killed and then you have no scheduler.
Then don't let the scheduler be killed. What is the difference between a privileged userspace program and a kernelspace program? Isn't that what microkernels demonstrate? Again, this has been done before.
> Ok. If you want to use a different description of the term syscall than is common then that's fine but you should define that up front. Your definition of a syscall simply does not match mine.
It wasn't quite a definition, though I did write poorly. In the abstract, a syscall can be seen as a message. If IPC ("to a process") is done by putting some data somewhere, setting a few registers to special values, and executing a magic syscall instruction, then a normal syscall can be considered IPC "to the kernel".
comment 10mo ago · link · parent
This Github thread is also interesting (transitively reached from the above Reddit thread):
https://github.com/rust-lang/rust/issues/32838#issuecomment-...
comment 10mo ago · link · parent
> I think it's fair to expect that it will stabilize in time.
The allocator work is facing a lot of obstacles, unfortunately. I prefer it to be unstable for as long as it needs, though.
> Quite a few have already been implemented and are available as libraries exactly as you describe, today. I wouldn't phrase that as "Rust has GC" because that might imply that the GC is required.
This is exactly my point. Rust does not prevent GC by any means, but Rust also does not encourage GC by any means. The same goes for custom allocators, aside from the highly-unstable Allocator API.
comment 10mo ago · link · parent
comment 10mo ago · link · parent
The parts that touch hardware (or similarly bare kernel interfaces) must be so. Sure, you could split device driver implementations and so on, but somewhere there's a meaningful lower level of software within the system.
> Because any other solution will quickly run into chicken-and-the-egg style problems.
No. The kernel must provide for context switching. It would be like migrating threads IPC, but one-way. No threads, no scheduler, no dedicated data transfer. In other words, the bare minimum necessary to make a sensible abstraction around switching processes.
seL4, according to its developers, is not absolutely a microkernel. I believe the rationale mainly points to the in-kernel scheduler, but seL4's IPC interacts with the scheduler and is noticeably more elaborate than a mere context switch. Even if seL4's IPC is, by most standards, minimal, I do not consider it to be so objectively. I described a meaningfully more minimal alternative.
Delegating scheduling to userspace is trivial. If necessary, designate a scheduler to run if no scheduling decision is available. It has been done before, and the only usual objection is performance.
> No. A syscall is usually defined as a call to a ring one level in from the one where you currently are. But lots of things that are syscalls right now do not necessarily have to be.
Just as hardware interrupts can be abstracted into messages, syscalls can be abstracted into messages. I'm not saying that the hardware implementation directly conforms to the abstraction.
comment 10mo ago · link · parent
comment 10mo ago · link · parent
On a different note: why should the kernel even handle IPC or scheduling? Those take the basic capabilities of context switching, timer management, and memory management. Even "core functionality" can be a context switch (or a few) away; is a syscall not just a message to a system server? Only the most basic form of communication is necessary to delegate arbitrary functionality, so a true microkernel should only introduce that as an abstraction. Everything else either follows from the hardware or is left to the whims of software.