View on GitHub

Quorten Blog 1

First blog for all Quorten's blog-like writings

Where was the Wikipedia article that talked about congestion on the early NSFNET until the last node was upgraded to use cubic backoff?

Failed search.

I’m probably better off searching my existing notes than Wikipedia. Nevertheless, I found some other interesting articles. Indeed, Wikipedia’s bias is evident here.

20180630/https://en.wikipedia.org/wiki/National_Science_Foundation_Network
20180630/https://en.wikipedia.org/wiki/CSNET
20180630/https://en.wikipedia.org/wiki/ARPANET

Important! Want to design a source-to-source translator or compiler that easily links the original and translated versions, and can propagate edits made to the translated version to the original version? Rather than using the traditional read from input stream and write to output stream approach, use an in-text substitution approach. This way, if you use my versioning buffer backend, you will automatically get links between consistent text on both ends, and even a means to insert translated statements on-demand.

This can even be used to speed translation of compiled code, when the programmer goes in and only but makes a few text edits here and there to the source. Sure, some changes would need to be implemented on the compilation system, but it is totally doable.

So, about your shared memory buffer implementation? If you have a memory buffer you can concurrently edit across a network, how do you extend that implementation so that it not only supports concurrent text editing, but can actually be the back-end memory for a database? Here’s how.

First of all, the underlying concepts. For the sake of efficiency, you can define segments in a shared memory buffer. The alternative would be to define separate shared memory buffers and an array structure that points to all of them, but we’ll support that built-in right off the bat.

Each defined segment can be locked so that writes cannot happen to it until it is unlocked. Similarly, a segment can be locked so that only a single writer can make changes to it. Even more advanced, a single segment can be locked so that multiple writers can make changes to it. This could, for example, be used for access control to a simple text buffer. Even more advanced, multiple segments can be locked at the same time.

Generally speaking, a database defines some internal data structure that must be held consistent. You can do a consistency check on any segment. Often times a segment must be guaranteed to be consistent before further operations can be performed, and to make this guarantee, a segment must be locked before the consistency check can be executed. More advanced, you could do a consistency check on multiple segments.

Read on →

So, I was wondering, how exactly does a B-tree stay balanced? So, I’ll provide my simple explanation here. Think of a heap. Only the last two levels are imbalanced. Now a B-tree has nodes that can store a variable number of elements. In effect, the last two levels can be contained in a single B-tree node, therefore keeping the tree completely level at all times.

Also, you’re wondering how elements can be added while keeping the tree balanced and within its min and max fragmentation bounds? The root node is allowed to be less than half full.

How about element deletes? Here is the trick. When you delete items, you may have a node that is less than half full, so you try to merge your contents with the adjacent node. In the worst case, you need to merge with the adjacent two nodes, and this will always work for the following reason: each of the two adjacent nodes are between half full and totally full.

  • Worst case 1: 1 < 1/2 + 1/2 + 1/2 < 2
  • Worst case 2: 1 + 1/2 < 1 + 1 + 1/2 < 3

So, it will always be possible to join nodes together correctly considering two adjacent neighbors and stay within fragmentation bounds. In cases of high fullness, the solution to satisfy the invariant will be to move elements from full nodes to the node that is not full enough.

Also, worthy of note is that a typical B-tree stores keys and data items not just in the leaf nodes, but in the higher level nodes too. Yeah, when you think about this, this is practical so that you do not need to copy updated keys all the way up the tree.

20180630/https://en.wikipedia.org/wiki/B-tree
20180630/https://en.wikipedia.org/wiki/Self-balancing_binary_search_tree
20180630/https://en.wikipedia.org/wiki/Order_statistic_tree

So, as it stands, it should be fairly easy for me to implement a B-tree on top of my tree datastructure implementation, originally written to implement filesystems. Matter of fact, I could even write a special abstract list implementation that dynamically switches from a simple expandable array to a B-tree. Likewise with memory buffers when they grow to be huge.

Now, what about minimal features for text editors? Okay, now we have to make two distinctions here. Basic text editors for any user, and text editors for programmers.

Basic text editors for any user:

  • Text entry (obvious)
  • Visual browsing of already entered text
  • Visual editing of already entered text
  • Mouse support
  • Menu of available commands
  • Delete region
  • Cut, copy, and paste
  • Multi-level undo and redo
  • Search and replace
  • Spell checking on demand
  • Continuous spell checking

  • Optional, typically used on phones: Abbreviations/auto-type/autocompletion
  • Word processors and smartphones only: Auto-correction

  • Lookup a word in a dictionary or other reference
  • Follow a hyperlink

  • Graphical widgets for rich text editing

Read on →

Acid-free paper. Suppose you want to recycle some random paper for archival purposes, but don’t know if it is acid-free paper or not. How do you check for acid contents in paper? There are “acid pens” that you can use to draw across the paper and check if it is acidic or not. However, this is not viable for checking if there is ligin in the paper that will degrade and make it become acidic over time.

Also, beware if you do buy “acid-free paper,” as it may actually be acidic.

Testing ligin contents requires more complex chemicals, but among the different ways, one is fairly easy: Aniline sulfate.

20180629/DuckDuckGo how to test if paper is actually acid free
20180629/https://practicalarchivist.blogspot.com/2007/12/when-acid-free-isnt-actually-acid-free.html
20180629/https://web.archive.org/web/*/https://practicalarchivist.com/ermadenefollowsmyadvice/
20180629/https://web.archive.org/web/20160316201642/http://practicalarchivist.com/ermadenefollowsmyadvice/
20180629/DuckDuckGo how to test paper for ligin
20180629/http://cool.conservation-us.org/byorg/abbey/an/an17/an17-1/an17-112.html
20180629/https://en.wikipedia.org/wiki/Lignin

So, more websites to find old terminals at other than that old-computers.com website? Well, let’s take a look. I found at least one that might contain what I am looking for. The point that at least one if those old terminals was really big, really heavy, and required a large, sturdy desk, but I don’t know which one it was.

20180629/https://en.wikipedia.org/wiki/ADM-3A
20180629/DuckDuckGo adm terminal
20180629/http://terminals-wiki.org/wiki/index.php/Lear_Siegler_ADM-3A

Oh, these might be it. No, I think close, but not quite.

20180629/http://terminals-wiki.org/wiki/index.php/Category:Lear_Siegler
20180629/http://terminals-wiki.org/wiki/index.php/Lear_Siegler_7700A
20180629/http://terminals-wiki.org/wiki/index.php/File:Lear_Siegler_ADM-1A-1.jpg

Current status of SourceForge.net?

2018-06-28

Categories: misc  
Tags: misc  

I haven’t used SourceForge.net in a long time. Worthy of note, I bought my solar charger through ThinkGeek, that I saw through an ad link on SourceForge.net. What ever happened to SourceForge.net? Well, we know that GitHub has since taken away most of the market share from SourceForge.net. But the real showstopper for SourceForge.net was some malbehavior in 2013 where they modified the Windows installers for some software, without the project owner’s permission, that installed adware. The goal was an “additional revenue option” as traditional ads revenue was dwindling (not surprisingly because the user base was dwindling too). This feature was touted to be optional and opt-in by project owners, but SourceForge staff got greedy, “declared projects to be abandoned,” and took over projects with SourceForge staff accounts. This even happened with active projects like GIMP? The result? Active projects got quite angered and decided to wholeheartedly move off of SourceForge.net. Then that was the end of it.

SourceForge.net gets new owners who promptly stop this malpractice? Nope, those who left aren’t coming back… ever, again! Because the “software profession” is unforgiving, as it is a swarm of millions of independent organizations and individuals that are not in constant, perfect communication and synchronization with the whole of each other.

20180628/https://en.wikipedia.org/wiki/SourceForge

Solar power notes.

So. what is a deep cycle battery? A lead-acid battery that is designed for deeper discharges, but that means to 50%, not to 0%. Normally lead-acid batteries are used for car starters (well, at least the vast majority still in use as of 2018) and do not go through such deep cycles.

20180628/DuckDuckGo deep cycle battery
20180628/https://en.wikipedia.org/wiki/Deep_cycle_battery

Motor? What does Wikipedia have to say about this? A redirect to “engine,” the word was originally used to distinguish internal combustion engines from steam engines. This discussion is heavily biased on vehicle motors.

20180627/https://en.wikipedia.org/wiki/Engine

Steamroller? Indeed, early forms were indeed steam-powered. The main reason these became wildly popular was because they were more economic than the horse-drawn alternatives.

20180627/https://en.wikipedia.org/wiki/Steamroller

The precursor of the tractor, the steam-powered traction engine. Too heavy to drive across ground as regularly as a modern tractor, so compromises had to be made. Most often used to power farm equipment that would otherwise be manual.

Read on →