Showing posts with label creation. Show all posts
Showing posts with label creation. Show all posts

Saturday, 17 March 2012

"Fabric theory": talking about cultural and computational diversity with the same words

In recent months, I have been pondering a lot about certain similarities between human languages, cultures, programming languages and computing platforms: they are all abstract constructs capable of giving a unique form or flavor to anything that is made with them or stems from them. Different human languages encourage different types of ideas, ways of expression, metaphors and poetry while discouraging others. Different programming languages encourage different programming paradigms, design philosophies and algorithms while discouraging others. The different characteristics of different computing platforms, musical instruments, human cultures, ideologies, religions or subcultural groups all similarly lead to specific "built-in" preferences in expression.

I'm sure this sounds quite meta, vague or superficial when explained this way, but I'm convinced that the similarities are far more profound than most people assume. In order to bring these concepts together, I've chosen to use the English word "fabric" to refer to the set of form-giving characteristics of languages, computers or just about anything. I've picked this word partly because of its dual meaning, i.e. you can consider a fabric a separate, underlying, form-giving framework just as well as an actual material from which the different artifacts are made. You may suggest a better word if you find one.

Fabrics

The fabric of a human language stems (primarily) from its grammar and vocabulary. The principle of lingustic relativity, also known as the Sapir-Whorf hypothesis, suggests that language defines a lot about how our ways of thinking end up being like, and there is even a bunch of experimental support for this idea. The stronger, classical version of the hypothesis, stating that languages build hard barriers that actually restrict what kind of ideas are possible, is very probably false, however. I believe that all human languages are "human-complete", i.e. they are all able to express the same complete range of human thoughts, although the expression may become very cumbersome in some cases. In most Indo-European languages, for example, it is very difficult to talk about people without mentioning their real or assumed genders all the time, and it may be very challenging to communicate mathematical ideas in an Aboriginal language that has a very rudimentary number system.

Many programmers seem to believe that the Sapir-Whorf hypothesis also works with programming languages. Edsger Dijkstra, for example, was definitely quite Whorfian when stating that teaching BASIC programming to students made them "mentally mutilated beyond hope of regeneration". The fabric of a programming language stems from its abstract structure, not much unlike those of natural languages, although a major difference is that the fabrics of programming languages tend to be much "purer" and more clear-cut, as they are typically geared towards specific application areas, computation paradigms and software development philosophies.

Beyond programming languages there are computer platforms. In the context of audiovisual computer art, the fabric of a hardware platform stems both from its "general-purpose" computational capabilities and the characteristics of its special-purpose circuitry, especially the video and sound hardware. The effects of the fabric tend to be the clearest in the most restricted platforms, such as 8-bit home computers and video game consoles. The different fabrics ("limitations") of different platforms are something that demoscene artists have traditionally been concerned about. Nowadays, there is even an academic discipline with an expanding series of books, "Platform Studies", that asks how video games and other forms of computer art have been shaped by the fabrics of the platforms they've been made for.

The fabric of a human culture stems from a wide memetic mess including things like taboos, traditions, codes of conduct, and, of course, language. In modern societies, a lot stems from bureaucratic, economic and regulatory mechanisms. Behavior-shaping mechanisms are also very prominent in things like video games, user interfaces and interactive websites, where they form a major part of the fabric. The fabric of a musical instrument stems partly from its user interface and partly from its different acoustic ranges and other "limitations". It is indeed possible to extend the "fabric theory" to quite a wide variety of concepts, even though it may get a little bit far-fetched at times.

Noticing one's own box

In many cases, a fabric can become transparent or even invisible. Those who only speak one language can find it difficult to think beyond its fabric. Likewise, those who only know about one culture, one worldview, one programming language, one technique for a specific task or one just-about-anything need some considerable effort to even notice the fabric, let alone expand their horizons beyond it. History shows that this kind of mental poverty leads even some very capable minds into quite disastrous thoughts, ranging from general narrow-mindedness and false sense of objectivity to straightforward religious dogmatism and racism.

In the world of computing, difficult-to-notice fabrics come out as standards, de-facto standards and "best practices". Jaron Lanier warns about "lock-ins", restrictive standards that are difficult to outthink. MIDI, for example, enforces a specific, finite formalization of musical notes, effectively narrowing the expressive range of a lot of music. A major concern risen by "You are not a gadget" is that technological lock-ins of on-line communication (e.g. those prominent in Facebook) may end up trivializing humanity in a way similar to how MIDI trivializes music.

Of course, there's nothing wrong with standards per se. Standards, also including constructs such as lingua francas and social norms, can be very helpful or even vital to humanity. However, when a standard becomes an unquestionable dogma, there's a good chance for something evil to happen. In order to avoid this, we always need individuals who challenge and deconstruct the standards, keeping people aware of the alternatives. Before we can think outside the box, we must first realize that we are in a box in the first place.

Constraints

In order to make a fabric more visible and tangible, it is often useful to introduce artificial constraints to "tighten it up". In a human language, for example, one can adopt a form of constrained writing, such as a type of poetry, to bring up some otherwise-invisible aspects of the linguistic fabric. In normal, everyday prose, words are little more than arbitrary sequences of symbols, but when working under tight constraints, their elementary structures and mutual relationships become important. This is very similar to what happens when programming in a constrained environment: previously irrelevant aspects, such as machine code instruction lengths, suddenly become relevant.

Constrained programming has long traditions in a multitude of hacker subcultures, including the demoscene, where it has obtained a very prominent role. Perhaps the most popular type of constraint in all hacker subcultures in general is the program length constraint, which sets an upper limit to the size of either the source code or the executable. It seems to be a general rule that working with ever smaller program sizes brings the programmer ever closer to the underlying fabric: in larger programs, it is possible to abstract away a lot of it, but under tight constraints, the programmer-artist must learn to avoid abstraction and embrace the fabric the way it is. In the smallest size classes, even such details as the ordering of sound and video registers in the I/O space become form-giving, as seen in the sub-32-byte C-64 demos by 4mat of Ate Bit, for example.

Mind-benders

Sometimes a language or a platform feels tight enough even without any additional constraints. A lot of this feeling is subjective, caused by the inability to express oneself in the previously learned way. When learning a new human language that is completely different to one's mother tongue, one may feel restricted when there's no counterpart for a specific word or grammatical cosntruct. When encountering such a "boundary", the learner needs to rethink the idea in a way that goes around it. This often requires some mind-bending. The same phenomenon can be encountered when learning different programming languages, e.g. learning a declarative language after only knowing imperative ones.

Among both human and programming languages, there are experimental languages that have been deliberately constructed as "mind-benders", having the kind of features and limitations that force the user to rethink a lot of things when trying to express an idea. Among constructed human languages, a good example is Sonja Elen Kisa's minimalistic "Toki Pona" that builds everything from just over 120 basic words. Among programming languages, the mind-bending experiments are called "esoteric programming languages", with the likes of Brainfuck and Befunge often mentioned as examples.

In computer platforms, there's also a lot of variance in "objective tightness". Large amounts of general-purpose computing resources make it possible to accurately emulate smaller computers; that is, a looser fabric may sometimes completely engulf a tighter one. Because of this, the experience of learning a "bigger" platform after a "smaller" one is not usually very mind-bending compared to the opposite direction.

Nothing is neutral

Now, would it be possible to create a language or a computer that would be totally neutral, objective and universal? I don't think so. Trying to create something that lacks fabric is like trying to sculpt thin air, and fabrics are always built from arbitrarities. Whenever something feels neutral, the feeling is usually deceptive.

Popular fabrics are often perceived as neutral, although they are just as arbitrary and biased as the other ones. A tribe that doesn't have very much contact with other tribes typically regards its own language and culture as "the right one" and everyone else as strange and deviant. When several tribes come together, they may choose one language as their supposedly neutral lingua franca, and a sufficiently advanced group of tribes may even construct a simplified, bland mix-up of all of its member languages, an "Esperanto". But even in this case, the language is by no means universal; the fabric that is common between the source languages is still very much present. Even if the language is based on logical principles, i.e. a "Lojban", the chosen set of principles is arbitrary, not to mention all the choices made when implementing those principles.

Powerful computers can usually emulate many less powerful ones, but this does not make them any less arbitrary. On the contrary, modern IBM PC compatibles are full of arbitrary desgin choices stacked on one another, forming a complex spaghetti of historical trials and errors that would make no sense at all if designed from scratch. The modern IBM PC platform therefore has a very prominent fabric, and the main reason why it feels so neutral is its popularity. Another reason is that the other platforms have many a lot of the same design choices, making today's computer platforms much less diverse than what they were a couple of decades ago. For example, how many modern platforms can you name that use something other than RGB as their primary colorspace, or something other than a power of two as their word length?

Diversity is diminishing in many other areas as well. In countries with an astounding diversity, like Papua-New-Guinea, many groups are abandoning their unique native languages and cultures in favor of bigger and more prestigious ones. I see some of that even in my own country, where many young and intelligent people take pride in "thinking in English", erroreusnly assuming that second-language English would be somehow more expressive for them than their mother tongue. In a dystopian vision, the diversity of millennia-old languages and cultures is getting replaced by a global English-language monoculture where all the diversity is subcultural at best.

Conclusion

It indeed seems to be possible to talk about human languages, cultures, programming languages, computing platforms and many other things with similar concepts. These concepts also seem so useful at times that I'm probably going to use them in subsequent articles as well. I also hope that this article, despite its length, gives some food for thought to someone.

Now, go to the world and embrace the mind-bending diversity!

Monday, 6 June 2011

Ancient binary symbolism and why it is relevant today

It is a well-known fact the human use of binary strings (or even binary numbers, see Pingala) predates electronics and automatic calculators by thousands of years.

Divination was probably the earliest human application for binary arrays. There are several systems in Eurasia and Africa that assign fixed semantics to bitstrings of various lengths. The Chinese I Ching gives meanings to the 3- and 6-bit arrays, while the systems used in the Middle East, Europe and Africa tend to prefer groups of 4 and 8 bits.

These systems of binary mysticism have been haunting me for quite many years already. As someone who has been playing around with bits since childhood, I have found the idea of ancient archetypal meanings for binary numbers very attractive. However, when studying the actual systems in order to find out the archetypes, I have always encountered a lot of noise that has blocked my progress. It has been a little bit frustrating: behind the noise, there are clear hints of an underlying logic and an original protosemantics, but whenever I have tried to filter out the noise, the solution has escaped my grasp.

Recently, however, I finally came up with a solution that satisfies my sense of esthetics. I even pixelled a set of "binary tarot cards" for showing off the discovery:


For a more complete summary, you may want to check out this table that contains a more elaborate set of meanings for each array and also includes all the traditional semantics I have based them on.

Of course, I'm not claiming that this is some kind of a "proto-language" from which all the different forms of binary mysticism supposedly developed. It is just an attempt to find an internally consistent set of meanings that match the various traditional semantics as closely as possible.

Explanation

In my analysis, I have translated the traditional binary patterns into modern Leibnizian binary numbers using the following scheme:

This is the scheme that works best for I Ching analysis. The bits on the bottom are considered heavier and more significant, and they change less frequently, so the normal big-endian reading starts from the bottom. The "yang" line, consisting of a single element, maps quite naturally to the binary "1", especially given that both "yang" and "1" are commonly associated with activity.

I have drawn each "card picture" based on the African shape of the binary array (represented as rows of one or two stones). I have left the individual "stones" clearly visible so that the bitstrings can be read out from the pictures alone. Some of the visual associations are my own, but I have also tried to use traditional associations (such as 1111=road/path, 0110=crossroads, 1001=enclosure) as often as they feel relevant and universal enough.

In addition to visual associations, the traditional systems have also formed semantics by opposition: if the array 1111 means "journey", "change" and "death", its inversion 0000 may obtain the opposite meanings: "staying at home", "stability" and "life". The visual associations of 0000 itself no longer matter as much.

The two operations used for creating symmetry groups are inversion and mirroring. These can be found in all families of binary divination: symmetric arrays are always paired with their inversions (e.g. 0000 with 1111), and asymmetric arrays with their reversions (e.g. 0111 with 1110).

Because of the profound role of symmetry groups, I haven't represented the arrays in a numerical order but in a 4x4 arrangement that emphasizes the mutual relationships via inversion and mirroring. Each of the rows in the "binary tarot" picture represents a group with similar properties:
  • The top row contains the four symmetrical arrays (which remain the same when mirrored).
  • The second row contains the arrays for which mirroring and inversion are equivalent.
  • The two bottom rows represent the two groups whose members can be derived from each other solely by mirroring and inversion.
The semantics within each group are interrelated. For example, the third row ("up", "in", "out", "down") can be labelled "the directions". In order to emphasize this, I have chosen a pair of dichotomies for each row. For example, the row of the directions uses the dichotomies "far-near" and "horizontal-vertical", and the array called "up" combines the poles "far"+"vertical". All the dichotomies can be found in my summary table.

The arrays in the top two groups have an even parity while those on the bottom two groups have an odd parity. This difference is important at least in Al-Raml and related systems, where the array getting the role of a "judge" in a divination table must have an even parity; otherwise there is an error in the calculation.

The members of each row can be derived from one another by eXclusive-ORing them with a symmetrical array (0000, 1111, 0110 or 1001). For this reason, I have also organized the arrangement as a XOR table.

The color schemes used in the card pictures are based on the colors in various 16-color computer palettes and don't carry further symbolism (even though 0010 happens to have the meaning of "red" in Al-Raml and Geomancy as well). Other than that, I have abstained from any modern technological connections.

But why?

Our subjective worlds are full of symbolism that brings various mental categories together. We associate numbers, letters, colors and even playing cards to various real-world things. We may have superstitions about them or give them unique personalities. Synesthetics even do this involuntarily, so I guess it is quite a basic trait for the human mind.

Binary numbers, however, have remained quite dry in this area. We don't really associate them with anything else, so they remain alien to us. Even experts who are constantly dealing with binary technology prefer to hide them or abstract them away. This alienation combined to the increasing role of digitality in our lives is the reason why I think there should be more exposure for the various branches of binary symbolism.

In many cultures, binary symbolism has attained a role so central that people base their conceptions of the world on it. A lot of traditional Chinese cosmology is basically commentary of I Ching. The Yoruba of West Africa use the eight-bit arrays of the Ifa system as "hash codes" to index their whole oral tradition. Some other West African peoples -- the Fon and the Ewe -- extend this principle far enough to give every person an eight-bit "kpoli" or "life sign" at their birth.

I guess the best way to bring some binary symbolism to our modern technological culture might be using it in art. Especially the kind of art such as pixel art, chip music and demoscene productions that embrace the bits, bringing them forward instead of hiding them. This is still just a meta-level idea, however, and I can't yet tell how to implement in it practice. But once I've progressed with it, I'll let you know for sure!

Saturday, 9 August 2008

The development process of a new VIC-20 demo

Greetings to everyone, once again! As you can see, Countercomplex wasn't destined to become a one-post wonder, despite the six-month gap between the first post and the second.


[A photo of a VIC-20 running the demo]

What broke this wonderful silence was my urge to tell something about my latest creation, a Commodore VIC-20 demo called "The Next Level", released at the Assembly Summer 2008 demoparty a week ago. The demo ended up second in the oldskool demo competition, the winner of which (albeit with a relatively small margin) was Byterapers' 486 PC demo called "Renaissance". There were four demos in total in the competition, and mine was actually the only one for an 8-bit platform.


I'm not hyping "The Next Level" as the best thing the VIC-20 demoscene has seen since "Robotic Liberation", as it is just one step towards something greater. There's nothing in the final product that hasn't been witnessed before -- actually, there aren't any rasters or realtime effects at all. Instead, what makes this production important was the development of a set of development tools that will hopefully shorten the creation cycle of future VIC-20 demos.


First of all, the link to the video capture on YouTube. I'm also embedding it here in order to maximize the accessibility for the ADHD internet generation:



Of course, you can also go to the Pouet.net page of the production and download the actual VIC-20 binaries. A h264.mp4 video file (16 MB) prepared by the Assembly organizers is also available for download.


The five years in between


"The Next Level" is my first actual VIC-20 trackmo after Robotic Liberation, which won the oldskool demo competition at Assembly 2003. By "trackmo" I refer to a demo that does not consist of separate memory-resident "parts" but constantly loads new material from the disk. Just like Robotic Liberation, The Next Level uses a disk drive but runs without memory expansions. That is, we have the good old 5120 bytes and 1024 nybbles of RAM available.


After finishing Robotic Liberation five years ago, I decided that I'm never going to do certain things manually anymore. A large percentage of the development time was wasted in loader-linking, that is, making sure that all the required resources get loaded in the memory just in time. Finding small slots of free RAM, splitting chunks of code and data so that they fit in these slots, possibly reordering some previously allocated areas, etc. were clearly something where automation would be much more sensible.


I also felt that I had already reached everything I could on the VIC-20 platform. On one hand, I wanted to move on to a more extreme platform where technical exploration would still be possible (like Sinclair ZX81 or Atari VCS), and on the other hand, I wanted to move on to a slightly less
restricted environment where I could concentrate on the content instead of technical details. I released some small demos for the Commodore 64, but the platform didn't really respond to my needs at the time (as it proved to be more os less just as demanding as the VIC-20).


I was also thinking about trying some "PC" stuff for a chance ("PC" referring to all the (semi-)modern 32/64-bit platforms in general). There are some appealing aspects in "PC", like the virtually endless amount of processing resources (even with dumpster-dived hardware) and the possibility to slip away from the chosen set of restrictions if the art demands it. However, "PC" requires a larger amount of initial work, and using "PC" also always feels a little bit "lame" because of the unreachability of certain hard-core values as well as the absence of the strong statement of using an 8-bit platform.


The post-technical level


A kind of enlightenment arrived to me in 2007, as I was watching some demos from some Russian Spectrum groups I had already adored for a couple of years. Groups such as Cyberpunks Unity, Inward and Skrju have, in my perspective, evolved beyond the usual "technowanking" stage often associated with the harder-core branches of the demoscene. In the new "post-technical" level, the hardware platform is no longer primarily used for bragging but for self-expression, just like in "real art".


[A screenshot of Your Song Is Quiet by Inward

Perhaps the two most important realizations for me were the following ones:



  • "Post-technical" demos don't need to push the technology: the platform doesn't need to look or sound any better than what it is. The Spectrum may look just like the Spectrum traditionally looks, there's no need to hide the color-block clashes in the visuals or the square waves in the music.

  • Most "post-technical" demos seem to be technically based on an animation player. Inward's "Your Song is Quiet", for example, seems to be mostly doing primitive graphics operations (like pixel-plotting and line-drawing) in a pre-defined order. Of course, the platform dictates quite a lot about the graphical style and what kind of animation is feasible.


In August 2007, I released "Impossiblator 3", a ultimate "technowanking" piece revealing some previously unused hardware tricks. After this, opening the door to the post-technical level became an important goal in my VIC-20 work.


Development tools


Although I had done some initial planning already in 2007, the actual development work of "The Next Level" and the related custom tools didn't start until Summer 2008.


The most important tool that needed to be made, naturally, was the automatic linker-builder system that would liberate me from manual loader-linking.


[A part of the build log generated by Bob20]

"Bob20" is a Python script that gets a bunch of assembly source files that are divided in "chunks" using special directives. Inter-chunk dependencies and positioning constraints can be separately defined for each chunk. The linking process is based on a special chunk type called "SC" or "StreamChunk", which are executed in a chronological order by the VIC-20-based stream interpreter routine. Bob20 attempts to find an optimal position for each chunk so that it can be loaded as early as possible. In the final loader stream produced by Bob20, the loader is synchronized with flag commands that basically say things like "wait until we have reached
frame 123".


Another important part of the demo, of course, is the animation system, consisting of a couple of "PC"-based tools written in C (namely, an SDL-based graphics editor and a rawdata-to-sourcecode converter), and of course, a VIC-20-based decompressor/player routine. The editor was named "Brickshop32" after the native VIC-20 graphics editor I had created five years ago for drawing the still graphics for Robotic Liberation.


[A screenshot of Brickshop32]

While the original Brickshop is a combination of a character mode editor and a pixel editor, BS32 is "only a pixel editor" and thus only stores the bitmap and color data. The character allocation task is left for the post-processing tools. In addition, BS32 supports a drawing mode I've dubbed "1bpcaa" (1 bit per character, anti-aliased), which is taken advantage of in the stream format.


I already used the "1bpcaa" concept in some of my 2002-2003 work ("Impossiblator 2", "Robotic Warrior"). The basic idea is to store pictures in a 1-bit-per-character fashion and to render them context-sensitively -- that is, the shape of a "zero" depends on its upper, lower, left and right neighbor.


[A text editor showing a piece of the source code

The BS32 converter, while converting animation frames, basically first tries to represent the frame in the "1bpcaa" format and then uses bytes and nybbles to "patch" the result. It may also ignore the 1bpcaa phase completely if it is not suitable for rendering the frame. At least a dozen
different combinations of algoritmhs are attempted on each frame, and the method producing least data is chosen.


Much of the development work went to these development tools rather than the actual creation of content and native code. But I'm sure that the percentage of the tool development is going to diminish dramatically once the tools reach a certain level of maturity.


The Next Level


I decided quite early that the basic visual style of my demo would be similar to that of Robotic Warrior: a very limited number of effects, no raster tricks at all, simple silhouette-based graphics, cartoon-like characters and a shameless use of a "traditional early 1980s video game look". This was a kind of antithesis to the boundary-pussing effect demo I
had made a year before.


The speech synthesizer and the music player are mostly derived from those in Robotic Liberation. The synth may even sound worse to some ears because I decided to only assign a single melody channel and the volume register for it (instead of the two+volume in RL). I didn't want to cut out any of the drum and bass tracks this time, but I don't know whether this was a wise
choice or not.


The process of creating the actual content was quite rapid (apart from finding the voice parameters which was as tedious as always). Most of the content was actually made during the last week, and I also finished the demo unusually early (on Monday, while the compo deadline wasn't until Thursday).


As for the concept, I didn't want to get too far from the "winning PWP style" this time, despite having a totally new set of tools. The singing speech synthesis, the audiovisual style, the story and the humor are all there. Some have even argued that "The Next Level" is actually too close to Robotic Liberation in how it looks and sounds. However, there are also some things that I hadn't tried before, such as the brief "surrealist" parts. Also, I've deliberately put in far more hidden references and alternative ways of interpretation than ever before, but I'll leave them to the audience to find out.


The most entertaining part of the development process was creating the graphics. It seems that I managed to find a graphics-making concept that works for me better than anything anything I've tried prior to this. Sketching the silhouettes with "big living pixels"; using characters for finetuning the sketches; drawing backgrounds with big color blocks, almost like legos; importing some small bitmaps from the outside world, etc. etc. Not too much pixel-level work, but still enough room for perfectionist satisfaction. Overall, quite an enjoyable experience, and I hope someone (apart from myself) likes the resulting visual style.


The future


As it would be a pity to only use the development tools for a single demo, I've already decided to use them for something more. The tools will still improve a lot, as I've been planning to support a couple of general-purpose effect routines and new compression schemes.


Despite taking a step towards the "non-technical", I still have some technical ideas I'd like to try out. Audio streaming is one of them. I don't want to reveal much about it yet, I just mention that it is probably going to replace the five-year-old speech synthesis routine altogether.


I also need some actual audio tools because I don't want to hard-code all the sound in assembly language anymore. A flexible audio tool would also provide a much more satisfying means for musical experimentation, and that's something I think my musical output really needs at this time.


I have been planning to release a totally different VIC-20 demo on the next Alternative Party held in October, so look forward for it.


There are still so many things that haven't been tried out yet.