View on GitHub

Quorten Blog 1

First blog for all Quorten's blog-like writings

What "MII" in `mii-tool` stands for

2019-06-15

Categories: unix  
Tags: unix  

Debian has mii-tool for checking Ethernet status, but what does it mean? MII = Media Independent Interface. Kind of an obsolete concept from a sysadmin standpoint, but still a part of the low-level technology of computers.

20190614/https://en.wikipedia.org/wiki/Media_Independent_Interface

Okay, now let’s answer this challenge question. What kind of serial communications data rates do you need to be able to sustain a direct drive of a raster display? You pass a binary communication channel that is then processed by a very simple DAC to drive a VGA CRT display.

1280 * 960 * 32 * 60 = 2359296000 bits per second
 = 2359296 kbps
 = 288000 KiB/sec
 = 281.25 MiB/sec

Insane! There is no way you could possibly cobble together simple serial communications electronics to do that when 115.2 kbps is considered “fast” for serial communications. By contrast, 10 Mbps is considered “slow” for Ethernet, in fact this was the speed of first commercially available variant of Ethernet. Even 100 Mbps (12 MiB/sec) Ethernet is still too slow for this uncompressed HD video.

Okay, okay, fine, let’s go down to standard definition, 256 color.

640 * 480 * 8 * 60 = 147456000 bits per second
 = 147456 kbps
 = 18000 KiB/sec
 = 17.6 MiB/sec

Read on →

Suppose you have a two computers right next to each other. Both have Ethernet, but only one has Wi-Fi. The one with Wi-Fi is also running GNU/Linux. You want both to be connected to the Wi-Fi network. How do you go about doing this? Surely, this is easy. Linux provides this super-slick bridge interface that you can put both network interfaces in to join the two into one broadcast domain, and the Ethernet-only computer will ping out for its DHCP address and automatically configure just like so.

Not so fast. Wi-Fi doesn’t support bridging out of the box like that. Why not? Because Wi-Fi does not implement the full traditional Ethernet framing protocol. Therefore, it’s not possible to bridge across Wi-Fi in the same way it is done with Ethernet. This also explains why you may have had trouble setting up bridged networking in VirtualBox on a computer connected to the network via Wi-Fi.

If you want to get this working, you need to use one of a variety of tricks.

  1. Put your computer’s Wi-fi in “access point” mode rather than “station mode.” Note that this will require other magic for a typical laptop or desktop computer that probably simply won’t be worth it or work very well.

  2. Enable 4addr mode on your Wi-Fi. Note that this will not work unless both the station and the access point have support and are configured to enable it.

Read on →

Very interesting, in old style web programming and development, database field inputs for names were not properly quoted and sanitized, so if someone had the last name of “Null”, the web application would reject their input stating that last name is missing.

20190612/http://www.bbc.com/future/story/20160325-the-names-that-break-computer-systems

Offshoring? What does Wikipedia have to say about that? Oh, some interesting things. Offshoring and outsourcing are not always the same thing. Wikipedia has some, well, contrived things to say on the subject of reshoring. 3D printing has been significantly successful in reshoring and bringing manufacturing closer to its point of consumption. Of course, it would not have been possible without more advanced technology to do the work for people so that they don’t have to pay or learn how to do the work themselves. Interestingly, once a business has been running offshore operations for a while, reshoring can pose a considerable challenge in the overhead of changing all the business processes that have been set up for.

20190610/https://en.wikipedia.org/wiki/Offshoring

I have this paricular problem, well, it’s not particularly unique, I’ve encountered it time and time again before but have not had a reasonable solution to it. Until now. How do you virtually edit surfaces where the length must be kept constant, but the surface geometry may be changed? This seems like quite a difficult problem, but let’s consider a simplified case where you have a sheet of paper that can only really flex and curl around one axis, rather than two or three. Here, the solution is simple. You define a 2D Bezier with a base curve where the total length must be held constant. Now you stretch the curve in one direction, how do you know how to adjust the length? The solution is simple. By the dot product, you can split into X and Y components and measure the length of those. The total length can then be computed by the distance formula, a^2 + b^2 = c^2. c^2 is simply a constant since the total length is a constant. So after you adjust a curve along one axis, you can automatically compute the scalar value for the other axis with the given constraints.

Now there are a few other specifics of this curve editing that also need to be taken into consideration. How many points are pinned? Which parts of the curve can be flexibly adjusted and modified? Once these additional constraints are determined, the equation solving can be performed in a simplified context. One particular case that you do want to be able to support that is a bit non-trivial is if you hold one end of the curve and rotate around the other end to give a round page curl.

Windows 9?

2019-06-07

Categories: windows  
Tags: windows  

Windows 9? What does a web serach have to say about that? Oh, there are a few interesting things. Indeed, skipping Windows 9 and going to Windows 10 was a nod toward the fact that Microsoft was really trying to turn away from the terribleness of Windows 8, similar to what Windows 7 did to Windows Vista.

Also, there is this other interesting article about the user interface, and some questions on innovation, short term versus long term gain.

20190606/Bing windows 9
20190606/https://www.extremetech.com/computing/191279-why-is-it-called-windows-10-not-windows-9
20190606/https://www.extremetech.com/computing/191255-windows-10-familiarity-breeds-contempt

gcc-ia16 is the successor to bcc

2019-06-07

Categories: unlipic   dos  
Tags: unlipic   dos  

ELKS is the Embedded Linux Kernel Subset, it works on 16-bit systems, right? That is correct.

Interestingly, upon this revisit, I’ve found word of a new project, gcc-ia16. This is the successor of bcc, a version of GCC that allows you to target 16-bit Intel x86 processors. Interestingly, FreeDOS is also using it.

20190606/https://en.wikipedia.org/wiki/Embeddable_Linux_Kernel_Subset
20190606/DuckDuckGo gcc-ia16
https://sourceforge.net/p/freedos/news/2018/08/gcc-ia16-for-dos/

Again, I reiterate, because this is important! Where again is the information on getting the crtime of files on Linux? It is the statx() system call, the xstat() implementation was the one that went nowhere.

Now, although the system call is found inside modern Linux kernels, it still has yet to work its way into glibc.

20190606/DuckDuckGo linux file creation time statx
20190606/https://unix.stackexchange.com/questions/2464/timestamp-modification-time-and-created-time-of-a-file
20190606/https://lwn.net/Articles/397442/
20190606/DuckDuckGo glibc linux statx
20190606/https://www.phoronix.com/scan.php?page=news_item&px=Glibc-Statx-Support