Uni

1, Uni

Uni is a unified collaborative development environment, and an ideal frontend for GNUnet,
with command'based user interface
command'based user interfaces (using keyboard, voice, gesture) are faster, more convenient and more powerful,
than pointer'based user interfaces (using mouse, touch, pen)
pointer'based interface seems appealing at first sight, because of its discoverability
but with simple uniform GUI (ie the oposite of what we see in websites),
there is no need for a pointer based user interface
touch interface has an additional problem: interaction at a distance is not possible
note that, touch interface can be useful in special cases, but it's not good as a general purpose interface
detection of voice commands is a relatively simple process (compared to general speech recognition),
because we only need to match against a relatively small set of commands
for those who neither can use all their fingers, nor can talk, gesture based (2d) input can be implemented
list of all projects will appear in a floating layer, at the center of the screen, called overview layer
overview layer:
, left panel:
, roots: home directory, plus attached devices
, project groups: content of roots
, main view:
projects: content of project groups
uni.png
in a project view, the list of files of a project will be displayed in the left side'bar
opened files will be slightly highlighted
files and directories with names starting with a dot, will be hidden
".cache" directory inside a project is for files we don't want to share or backup
each opened file will have a side'bar at right showing its sections
there we can create new view corresponding to a section
sections with views will be slightly highlighted
text files will be opened in a text editor
directories containing media files, will be opened in a gallery view
files and directories inside a gallery, will be opened in a floating layer
non'local projects, web pages, PDF documents, etc, accessed from links inside the main project,
will be opened in a floating layer
web pages: move caret between visual elements (ignoring structural elements)
actions:
, next/previous word, line, paragraph, section
ask before crossing files
, next/previous section view, opened file
, go to the list of files to open a file view
, go to the list of sections to open a section view
, start and end selection, then copy or cut
, paste
, undo
, navigation: move, search
, selection
, completion
right click or ctrl+enter: show a list of available commands and their key bindings
collaborative development
flaws of version control systems:
, they double the storage (working directory, local repository)
, their design makes it difficult to modify the history
so in practice, the whole history must be kept indefinitely, even if not needed
when we download a project, a pristine copy is kept untouched in ".cache/ude/pristine",
and ref links will be created in the working directory, and then we can work on our own branch
after a while when we want to pull and merge changes made in the main branch,
first a three'way diff will be shown, based on the main branch, pristine, and the working directory,
then the user will be asked to accept all or some parts of the diff
to send a pull request to the main branch, first publish the pristine and the working directory (except .cache),
then send the two addresses to the main developer
the main developer will make a diff based on these two, plus her own working directory
we can use GNUnet to share files in a P2P (a opposed to client'server) network
https://www.gnunet.org/en/
https://docs.gnunet.org/latest/
"the GNUnet system" by Christian Grothoff (https://grothoff.org/christian/habil.pdf)

2, computers

computers can help people to easily access and improve human knowledge,
and as a result do things to improve the quality of human life
an ideal computer would be a combination of a smart'phone and a PC
, in smart'phone mode, CPU works in cool mode, which doesn't need a fan
, in PC mode, it will be put on a cooler
the computer itself contains CPU, RAM, SSD, TPM2, Bluetooth, and a USB4 2.0 port that will connect to a hub
the hub provides:
, power, powerful GPU and WiFi
, a USB dock (to connect peripherals like display, camera ...)
, compatibility ports for older devices: ethernet, audio jack, DP and HDMI
to act as a smart'phone it also has battery, integrated GPU, a small display, camera, speaker, microphone, WiFi and cell
during boot, the integrated GPU is used, to prevent any vulnerability due to the OptionROM of external GPU
the ideal keyboard
keyboard.png
navigation keys (arrows, page up, page down, home, end, esc), and ctrl/shift/alt based keybindings,
are available by pressing and holding "mod" key
pressing one "mod" key while holding the other one, is equivalent to Super key
to insert punctuations (in insert mode), press "pun"
after entering a punctuation charactor, it automatically returns to normal mode
unless the "pun" key is still pressed, in which case, it will return to normal mode after releasing "pun"
to insert numbers, press and hold "num"
pressing and releasing "Fn", sends "Super+L" key press (usually bound to session locking)
holding "Fn" and pressing a number eg 1, sends "F1" key
to insert capital letters, press comma then press the letter
to insert an all capital word, press two commas
the following letters will be inserted in capitalized form, until space is pressed
this is how it is implemented:
when comma key is pressed, keyboard enters the cap mode in which:
, pressing a letter key, sends a "backspace" key, and then the capitalized form of that letter,
and then the cap mode will be canceled
, pressing comma again, sends a "backspace" key, and activates caps mode,
which remains active until space (or enter or mod) is pressed
, pressing any other keys, acts like normal, and cancels the cap mode
https://jasoncarloscox.com/writing/my-strange-keyboards/
https://jasoncarloscox.com/creations/kyria/
https://jasoncarloscox.com/creations/lego-keyboard-stand/
https://splitkb.com/
https://shop.keyboard.io/
https://github.com/abstracthat/dactyl-manuform
https://zealot.hu/absolem/
https://github.com/foostan/crkbd
https://github.com/nglgzz/42
https://github.com/adereth/dactyl-keyboard
Kinesis Advantage 2 keyboard
http://www.allthingsergo.com/the-best-ergonomic-mechanical-keyboards/
digital circuits
in conventional digital circuits when the inputs change, the outputs can have temporary invalid values,
until they stabilize to the valid values
but for the circuit to do its job, gates with memory (registers),
must operate only when the inputs have correct values
one solution is to synchronize registers with a global clock signal
the period of clock signal is made long enough for the circuit to become stable
disadvantages of synchronous circuits:
, we have to split long operations into several smaller ones,
which can be performed in successive clock cycles (a technique known as pipelining)
otherwise the circuit would be slow and inefficient
, distributing a high'fan'out, timing'sensitive clock signal can be complicated
, electromagnetic interference at the clock frequency and its harmonics
, widely distributed clock signal takes a lot of power, and must run whether the circuit is receiving inputs or not
although "clock gating" can help to reduce some of the problems of synchronous circuits,
i think the real solution is to use asynchronous circuits
the only sane kind of asynchronous circuit which i could imagine is this:
, next to any data wire, there is a control wire which determines if the data is valid or not
, when a register wants to change its outputs, it first invalidates them,
for a duration equal to the delay of one gate
, any gate receiving an invalid input, invalidates its outputs
, this way all data which is going to change in the future, is first invalidated
, registers operate only when all inputs are valid
computer architecture
cpu, memory, peripherals, this seems to be the only practical architecture for the hardware of computers
cpu runs a sequence of simple computations, called instruction codes, one by one
compilers are special programs that generate instruction codes,
from a program written in a structured and human readable language
https://www.bottomupcs.com/
backdoors are always a possibility for closed'source CPU with closed'source boot firmware
specially after the introduction of "trusted execution environment" (TEE) in the boot firmwares
TEE is a full'blown, always'running mini operating system,
with full access to the whole system (including memory and network)
furthermore they have made it practically impossible for users to disable it
this mess of a design cries out for hidden and quite sophisticated backdoors
https://www.fsf.org/blogs/licensing/intel-me-and-why-we-should-get-rid-of-me
https://libreboot.org/faq.html#intel
https://en.wikipedia.org/wiki/Intel_Management_Engine
https://blog.invisiblethings.org/papers/2015/x86_harmful.pdf
in the case of X86 architecture, the default boot firmware of nearly all systems are closed source
flashing a CoreBoot based boot firmware is possible, but there still will be closed source parts (Intel FSP)
in addition, there is no easy way to get rid of the TEE part, ie Intel ME (or AMD PSP),
though there are some hacks to disable (but not completely remove) it:
https://puri.sm/posts/deep-dive-into-intel-me-disablement/
ARM architecture is closed source too, but some vendors (eg Rockchip) use an open source boot firmware (EDK2)
there is even an open source implementation of ARM TrustZone: https://www.trustedfirmware.org/projects/op-tee/
GPU with open source driver: Qualcomm/Adreno
open source CPU: RISC-V, Power ISA
programs usually do not run directly on computer hardware
instead they run on a more sophisticated software machine (a virtual machine) called the kernel
in theory we can live without a kernel (an idea sometimes called a library operating system),
and it can be useful for some use cases (like embedded systems),
but a kernel based operating system makes developing and testing programs, much easier
Linux is a highly developed, constantly evolving, open'source kernel

3, installation

Uni is build and installed using UPM (unified package manager)
UPM uses a simple method to unify software building and package management
UPM can be used as a software builder and package manager, on any Posix system
you just need to have either "curl" or "wget" on your system
if "bubblewrap" is available, UPM will use it to sandbox packages
to bootstrap from source, these extra programs are required too:
clang git ssh-keygen
now just run this command:
; sh upm/install.sh
UPM can also be used to build and maintain a Linux based operating system, from scratch,
with a user interface based on UShell and Uni
first we must create a bootable installer on a removable storage device
to do that, we must be in a Linux system with these programs installed:
curl (or wget) mkfs.vfat (dosfstools)
to bootstrap from source, these extra programs are required too:
clang git ssh-keygen
now just run this command as root:
; sh upm/mkinst.sh
now boot into the installation media, and follow the instructions
packages in the installed system will be updated automatically
this is safe, since the process of updating packages is atomic
note that, UPM is still a work in progress
so the above instructions actually installs a prototype based on APK and Alpine Linux
Ushell
Ushell is a Wayland shell, based on QuickShell (https://quickshell.org/)
there is an application launcher which can be toggled by pressing "super" (mod+mod) or "alt+tab"
applications will be opened in their own workspace, that will also contain any extra windows opened by that application
to close the focused window, press "super+backspace" or "alt+escape"
entering "space" as the first character in application launcher, opens terminal emulator
the entered command will be run in a new terminal view, inside a list at the right column
when terminal view finishes its job, if there is any output, it'll be transfered to the history list under the prompt
to navigate between terminal views, use "ctrl+pageup" and "ctrl+pagedown" keys
to go back to the prompt, press "ctrl+tab"
to navigate in history list, use "up" and "down" arrow keys
you can press enter on an entry to rerun the command, or press space to first edit it
to close a terminal view (that will also kill any running process) press "super+backspace" or "alt+escape"
the first item in the application launcher is "system", which opens the system menu:
, session (lock, suspend, exit, reboot, poweroff)
, connections
, timezone
, passwords
, packages (install, remove, update, make installation media)
, backup (create, restore)
to have a really fail'safe system, redundant units are necessary
you can create a backup on a removable storage device
backups will be done using "BTRFS send", so they will be incremental and fast
the backup device is encrypted, and contains a backup of your home directory
dencryption can be done using a password, as well as a key stored on the computer
each time the device is connected, the backup procedure will be run automatically
even in case of bit rot for data in home directory, this procedure repairs it automatically
this backup can be easily restored on a new system
these systems will then form an F2F network using GNUnet, through which they will be synced to each other