💾 Archived View for gmi.noulin.net › garbage.gmi captured on 2023-06-14 at 14:04:36. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-06-03)
-=-=-=-=-=-=-
the great power of the unix way is that every process run in the machine actually
is a kernel, a unix process. they are just unix processes, and every process in
unix has an associated UID and GID. you can think of them as "personality
identifiers". the process that you're sitting in right now is owned by
your UID and GID, so there's nothing a "superuser" can do that you, or
your web browser or your text editor, couldn't do. for example, a web
browser can do anything that you can do, as well as whatever you can do with
your terminal (which you can do using your favorite terminal emulator).
and also, in unix, every user on your machine (or on a group of
machines) has exactly one set of personality identifiers. in contrast, with
windows, you can have many "identity" sets for one username. in other words,
it's very easy to get the two to cooperate, whereas in unix you have to tell
the user who they are talking to and how they have been authenticated. on
unix, "identity" really is all that matters, because the identity
means that you have the power that you were supposed to have.
what's really nice about unix is that it provides a nice way to build on
its strengths and leverage its weaknesses. in other words, if you've got a
good point of view, a good mental model, and you understand how unix operates
on a deep level, then you can build a really useful program or framework
on top of it.
there's an important implication here, and that is that you can use
an operating system (in this case, the unix operating system) as the
framework or foundation for other things. if you build on top of a platform
like unix, you're building on a platform which has already been through
the development and deployment process and which you know that it is
designed to be reliable, and in some sense, you've got a good idea about
what you can expect from it.
on the other hand, if you take the same operating system, but you ignore
all the work that has been done and try to build something directly from the
source (such as on a windows system), you're going to have a very difficult
time because you're going to have to deal with something that's a very
difficult thing to build things on top of, and a difficult thing to use.
this is the way that people build frameworks on java. they build an
abstraction over all the libraries that java has, and then they build an
abstraction on top of that which tries to provide that framework for you.
the benefit is that it's easy to change the underlying framework because
any changes you make can be done without affecting all of the code
written in the original framework. you can add new features and new
functionality, and you can change it without having to worry about
breaking old code. this framework (the jvm) is the framework that
has been provided for you as part of the java programming language. the
jvm provides you with a nice layer that does things such as garbage
collection, bytecode, threading, security, reflection, garbage collection,
etc. etc. etc. but the jvm itself is built on top of an operating
system (usually unix).
the other type of operating system is the one that you start off with
(usually windows) and then try to build your framework on top of it.
what's the difference between the two? the most obvious
difference is that the second type is a very complex and difficult thing
to build on top of. the reason is that windows has no standard mechanisms
to do what java and unix do for you, such as threading, reflection,
garbage collection, security, etc. etc. etc.
what's really cool about the java programming language is that it
provides the first operating system, in a sense, by making that
abstraction available to everyone. all the tools and libraries that
you use in java work just like you expect they would if they were
in the jvm, and all the features are there. all the power of
the java language is built into the jvm and made available to
you. you have no excuse for not using it because you are
able to use all the language features, it's just as easy as if you
had built them yourself. you don't have to build the framework for
threading or garbage collection. it's already there.
the downside is that you don't know how to use it unless you use it. if
you start using it and then change, then you need to change the framework
that you started out with, which is, of course, going to be a big hassle.
one of the features of the jvm that's really cool is that it provides
a good model for object orientation. because every object is running
on the jvm, and the jvm already provides a whole bunch of mechanisms
for object orientation and functionality, it's easy to build objects that
are organized by "imperative" concepts like data, behavior, etc. etc.
Written by an AI.