222 points · by colinprince · 3y ago · 84 comments
document.querySelectorAll('a[href]').forEach(it => it.style.textDecoration='underline')
It drives me absolutely batshit when I have to wave my cursor all over the place to find hyperlinks that the browser has been displaying since the 90sFortunately, if there is such a top-level comment, any other comments can be replies to that and so you do not need to fill up the top-level comments with such kind of complaints, I think.
Does it really require that much cursor waving? It's nice to have the distinction, and I personally like the visual impact.
I'll try to bear your "new site, new visual iconography" preferences in mind when I build out my site and decide that Captialized links are offsite links, MiXeDcaSe are dynamically generated ones, and all text except hyperlinks will be blue underlines
This person's site is clearly packed full of innovative idea; I don't understand why CSS tomfoolery needs to be one of them in order to make it stand out
Am I missing something?
// ==UserScript==
// @name Underline links
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Underline all the links!
// @author mdaniel
// @match https://*/*
// @match http://*/*
// @grant none
// ==/UserScript==
(() => {
document.querySelectorAll('a[href]').forEach(it => it.style.textDecoration='underline');
})();.niarfer ot semit dna
The author lives on a boat, using only electricity generated with solar panels. Xcode didn't work out that well under those circumstances, which was one of the driving forces to create uxn. Another is the desire to make programs that can run pretty much anywhere, and will remain possible to run in the future. Similar to how you can run NES roms on lots of devices.
Also, "Devine Lu Linvega" is just the name of someone you'd follow in battle, even if it's a battle that will lead you to your certain death. Just saying.
Uxn: Small permacomputing VM designed for easy implementability - https://news.ycombinator.com/item?id=32158816 - July 2022 (2 comments)
MicroFLENG – concurrent logic programming for CP/M, C64 and the “uxn” VM - https://news.ycombinator.com/item?id=31506240 - May 2022 (4 comments)
Uxn – Virtual AV Computer - https://news.ycombinator.com/item?id=27561463 - June 2021 (5 comments)
uxn: a portable 8-bit virtual computer - https://news.ycombinator.com/item?id=27185950 - May 2021 (47 comments)
Uxn is a 8-bit virtual stack machine - https://news.ycombinator.com/item?id=26258991 - Feb 2021 (5 comments)
I had done a few writing uxn programs, and figured out some tricks with programming with this.
I think that there are a few problems with it, one of which is the delete/append ports of the file device, which I had proposed a change, to allow seeking and a few other things. (Deleting files in a uxn code is probably not that important anyways. Uxn32 allows deleting directories too, although since there is no way to create directories using uxn, deleting directories seems worthless.)
I also made some enhancements to the assembler. Some of these do not match what other people had done, so due to this sometimes there are two ways of doing the same thing. It was before the symbol file output, so instead it has its own symbol file format (although it might be possible to use the official assembler to convert the symbol file). If necessary, I might need to add switches to control some options, e.g. different versions of the uxn assembly language (since sometimes changes will break some old programs, even if the target instruction set has not changed), symbol file format, etc.
I have not implemented any optimizations in the assembler, since I think that the writer can make the optimization by themself (or, possibly, can have a high-level programming language capable of uxn, but I do not have such a thing).
I dislike the proposed metadata formats. For one thing, I think that it is unnecessary for a device port to be allocated for this purpose. Also, specifying capabilities would be useful, I think; at least to me, it seems more useful than including icons.
1. Make a header similar to Game Boy. The first four bytes are jump past the header (which might also be used to define the length of the header, in case of being extended in future), and then there is some sort of logo or code to identify the presence of the header, and then the data of the header.
2. Put metadata in a separate file, to avoid using up memory in the program file.
3. Put all of the files together in a Hamster archive file. Lump names starting with a underscore can be used for the special use, e.g. "_default.rom" for the program code and "_metadata" for the metadata. In this case an extra step is required to run the program if the emulator does not support it, but I wrote a program in uxn which is capable of doing this, therefore it can be used with any implementation of uxn.
So, any of these should be able to work with any emulator, even existing implementations which do not implement metadata.
What we could do is just not expect the #xxxx #f0 DEO2 bytes as magic number, so you can just ";meta POP2" at the start. That wouldn't "use" anything, I mean, in its current state, it doesn't really occupy a port, vectors can always be overwritten, even if some day the #f0 device does become something, we could immediately write the same vector with another address in the reset vector.
> Uxn is to Varvara, what the 6502 is to the Classic Nintendo.
https://metasyn.github.io/learn-uxn/
I don’t have a lot of time on my hands, but this is a rabbit hole I wouldn’t mind dropping into on occasion.
> I have this implementation of the uxn virtual machine that has 32 instructions, how can we add a few more instrucions do implement memory pagination? (code here)
To implement memory pagination, we can add a few instructions to the existing set of 32 instructions in the uxn virtual machine. These instructions could include:
1. PAGE_IN - This instruction would be used to load a specific page of memory from the underlying storage device into the virtual machine's RAM. 2. PAGE_OUT - This instruction would be used to save a specific page of memory from the virtual machine's RAM to the underlying storage device. 3. SET_PAGE - This instruction would be used to set the current page of memory that is being accessed by the virtual machine. 4. GET_PAGE - This instruction would be used to retrieve the current page of memory that is being accessed by the virtual machine.
These instructions could be implemented as follows:
#define PAGE_IN(x) { u->page = (x); u->dev[0x0f] = 1; }
#define PAGE_OUT(x) { u->dev[0x0f] = 1; }
#define SET_PAGE(x) { u->page = (x); }
#define GET_PAGE(x) { x = u->page; }
int
uxn_eval(Uxn *u, Uint16 pc)
{
...
switch(instr & 0x1f) {
...
case 0x1a: /* PAGE_IN */ PEEK(a, pc) PAGE_IN(a) pc += 1 + bs; break;
case 0x1b: /* PAGE_OUT */ PEEK(a, pc) PAGE_OUT(a) pc += 1 + bs; break;
case 0x1c: /* SET_PAGE */ PEEK(a, pc) SET_PAGE(a) pc += 1 + bs; break;
case 0x1d: /* GET_PAGE */ GET_PAGE(a) PUSH(src, a) break;
...
}
...https://git.sr.ht/~rabbits/uxn/tree/main/item/src/uxn.c
Less than 150 lines, each opcode is defined in a single line in terms of a dozen or so basic operations which are single line macros themselves.
Found it: https://compudanzas.net/uxn_tutorial.html
So you need to write assembly sort of, I wonder what language anyone would pick to compile for this little VM.
Also I lack networking!
Here is a video introduction: https://www.youtube.com/watch?v=LrNuq_JgaOA&t=794s
It's taking longer than anticipated but the talk will be published soon this month where you can download [0] presentations for free.
Sign up for the newsletter [1] if you'd like (we're indie and the extra eyeballs help.)
Don't know if it was a long trip for you to get here, but I hope you return :)
I've never actually thought about low power/tech constrained programming, I feel like this could be something that would fire me up again in the tech industry, so sick of the more more faster faster approach.
I wrote a couple of notes that might interest you:
It seems smaller than that --- more like a business card. After all, the Z80's instruction set fits on one standard page too:
https://ia600604.us.archive.org/view_archive.php?archive=/1/...
More amusingly, the mascot looks like the Go gopher grew a few more appendages.
[1] https://en.wikipedia.org/wiki/Massively_parallel_processor_a...
Perhaps with using memory banking, it could run Chrome.
At that point you might as well just write an AArch64 emulator in uxn and run Chrome that way. It wouldn't be much slower than the "native" build.