Saturday, August 22, 2020

Keyboard Video Mouse

 Objective-C is horrible, and Xcode is a nightmare. Swift is pretty good though. It is easier to not use the object oriented bits of Swift than it is to avoid classes in C++. Type parameterized functions and classes in Swift are much easier to use than are templates in C++. Having containers builtin to the language is nice in Swift instead of including templates with impenetrable error messages in C++. Immutables and strict typing are nice in Swift, but for true functional programming with powerful searchable types not biased against function types, only Haskell will do. Lua is the only scripting language that results in code worth checking in. The best thing from GNU is make, but only if it is used properly, without implicit dependencies or rules, and without too many defines or includes. Every compiler has its quirks. Apple's compilers are the worst, with the most implicit paths, but they are still useable; I hope their frequent "updates" do not make things worse. An application on MacOS requires a call to NSApplication.shared to start, a linked list of classes between, and a call to MTLCommandBuffer:commit at the end. There are various forms of callback, including functions passed to NSEvent, functions in derivations of a class passed to a link in the list, or functions in derivations of links in the list. Passing functions to NSEvent is easiest, but some events unfortunately require derivation. MacOS makes it impossible to smoothly change a display in response to moving a window, so polytopes must appear unfortunately related to the MacOS frame. Reading Apple developer documentation is reverse engineering, and my intxface code on sourceforge is the only complete application I know of that uses make and Metal without MetalKit and Xcode.

Sunday, August 4, 2019

Untitled

Are generalizations bad? In general, is it a mistake to say something about everything? Given two sets in an unknown universe, what can we do with them? Taking the compliment is out, but some binary operations are ok. The intersection makes a set no closer to the scary universe, so that's fine. The difference also is ok. But the union makes something that may or may not be the universe. If we have a shorthand for everything, then how do we know when increasingly complex unions lose information? Losing information is bad because it wastefully heats up the thing that loses the information. In general, life evolves by reducing waste. Workers reduce waste by unionizing. Is this a pun or generalization?

Sunday, July 21, 2019

Topological Unsort

To implement program with multiple languages, the languages must communicate. C is an interface language; most other languages have a C interface. We organize data in C programs with struct and union. To communicate between C and other languages data is converted to and from struct/union. Threads and processes send messages, each of which is a different struct/union. Most languages are more powerful than C, so they can restrict portions of their data organization to conform to C struct/union. When there are many different struct/union types to send, it can become arduous to change the corresponding data types in each language. Preferably, a script would automatically generate the struct/union types in each language. Each field of a struct/union can be a pointer to one or more other contiguous struct/union instances, an array, a basic type, an enumeration type, or a string. Each field can have validity dependent on other fields, called tags. Think of the tags as dimensions; tag values are a tag space. Each field is valid in a subset of the tag space. C is limited in that without an unwieldy number of identifiers, struct/union can not have a unique representation for every point in the tag space. Instead, consecutive fields should have similar tag space subsets. My script to generate struct/union types in several languages, takes as input lists of fields, each with a tag space subset. Consecutive fields or unions with equal tag space subsets collect into structs. Consecutive fields or structs with disjoint tag space subsets collect into unions. A tag space subset opens a union. A tag space superset closes structs and unions. A topological sort of the graph is the original list of fields.

State File Sets

It is common for an application to have state that persists between invocations. It is limiting to think of an application or its state in the singular. It is confusing for an application’s state to be hidden or unreadable. Instead, go with the Unix concepts of text files and processes, such that the processes state is completely determined by the content of text files given to it at invocation. At any one time, there can be multiple instances of an application, running in parallel. As a process’ state changes, the changes are captured by one or another of the text files given to it at invocation. Two processes with the same given text files would be in the same state.

Friday, May 17, 2019

Synergetics

I’m not convinced RBF would have designed domes the way they are commonly designed. Usually, they are designed to minimize the number of piece sizes, and to minimize the thickness of the dome surface. In contrast, RBF disparaged not only cartesian coordinates, but also classical emphasis upon regularity. Classical regularity is great (group theory is all about regularity), but I find irregularity easier to design. Simply choose random planes, and make a dome from the facets between the inside and outside of the space. Such a dome would have a thick surface in which humans could live, leaving the inside of the dome for plants and animals.

Sunday, May 5, 2019

Cospace

Every region in a roundspace has an opposite and is not peripheral. Producing a roundspace from a space is easy, and results in boundaries through a center point. The boundaries through the center point map to points on a section plane in the cospace. Sections of the roundspace are great circles formed by planes through the center point. Vertices in the roundspace have diameters through the center which map to subvertices in the cospace section. The cospace section has boundaries mapped to vertices in the roundspace. By adding an equator plane to the roundspace, the cospace section has one region per roundspace section. The cospace section has peripheral regions. Thus depending on roundspace rotation, there are special sections in the space, corresponding to peripheral regions in the cospace section.

Thursday, May 2, 2019

Humanity

I’m curious what thoughts others would have while reading Kathryn Yusoff. Whites were the ones that killed the Neanderthals. Other races killed species, but were not killed by species. The survivors of the battle with Neanderthals were the most ruthless ones. Thus, whites built castles to lord it over peasants. Thus whites built ships to lord it over nonwhites. Thus whites built mines to lord it over nonhumans. Thus whites built corporations to lord it over nonvalues. Conservative character building is not enough. Liberal supplication (case in point) is not enough. To break the wheel, the dragon queen needs nonwhite values, nonwhite grades, nonwhite supporters, nonwhite language, nonwhite identity, nonwhite vitality, nonwhite technology, and nonwhite geography.