
The JOS Window System - ingve
http://ryanrussell.me/portfolio/os/
======
russellsprouts
Hey everyone. Didn't expect to see this here. I made this for my operating
systems class a few years ago. Unfortunately I can't share the code because
the rest of the OS is used as assignments for the class, but it was a fun
project.

It's not highlighted much in the writeup, but most of the interaction takes
place in the terminal. The original assignments just use text mode. The
graphics mode got started when I tried to implement ANSI escape codes in the
terminal, but some of the effects weren't possible in text mode. I changed the
bootloader to switch the system into a known graphics mode, then implemented a
terminal emulator on top of that. From there it was just a small matter of
mouse drivers and windowing commands.

JOS is a unix-inspired exokernel. It has virtual memory with thread isolation,
a pre-emptive scheduler (round-robin, I think), and IPC. Everything else lives
in user-land. As alluded to, the disk drivers even run in a user-land process
which has been given access to the disk IO port. My windowing system is also a
user-land process, which leases out buffers of memory as windows and has been
given access to the memory-mapped screen buffer.

~~~
aidenn0
RE: transparency

see
[https://en.wikipedia.org/wiki/Bit_blit](https://en.wikipedia.org/wiki/Bit_blit)

This was used for sprites on pretty much any 1980s target that didn't support
hardware sprites.

------
kiddico
JsonTransform[1] by the same author made me giggle.

"Transforms JSON to JSON using JSON"

[1]:[https://github.com/RussellSprouts/JsonTransform](https://github.com/RussellSprouts/JsonTransform)

~~~
russellsprouts
Haha, my Github has some projects of questionable usefulness, yeah. In that
case, I was building a UI for an internal monitoring app at an internship. It
had to make requests to lots of internal API and couldn't really ask for
custom endpoints or changes. Having a declarative way to transform the
responses into UI models was really useful. That also explains the '!json'
operator, because inevitably in legacy systems there will be responses that
contain stringified JSON that needs to be parsed.

~~~
fusiongyro
For fun, you should make sure to make the identity transform be super complex,
like it is for XSLT:

[https://en.wikipedia.org/wiki/Identity_transform#Using_XSLT](https://en.wikipedia.org/wiki/Identity_transform#Using_XSLT)

~~~
russellsprouts
Um, it's been a while, but I think it fails that test -- the identity template
is "$"

