Showing posts with label articles. Show all posts
Showing posts with label articles. Show all posts

Monday, November 30, 2009

How we can once again become UNIX-ish

Eleven is Louder writes about the unix philosophy and linux today. Well, hes right and wrong, but mostly he misses the point!

As a programmer, atleast for me, the Unix philosophy is more about making the programmers life simple by making the tools "ortagonal" and standardizing the interfaces on read/write semantics, then it is about the command line interface.

Of course we can have a modern system based on those ideas! For example:

Sound: Instead of this horrible buggy complex mess that is alsa+pulseaudio, we can archieve the same thing, today, with OSS4¹ and NFS, SSH or Samba. And we get portability, higher quality mixing, lower latency and an easier programming interface for free.

KIO-slaves: Whats the point of of the KIO subsystem when FUSE exists? NIH in all its glory. Fortunatly KIO-FUSE exists, so you can access a textfile inside a tarfile on a remote webdav share with any program, not just KDE centric ones.

X: Lets drop the whole mess! The only thing it does nice is forwarding, but even that is botched compared to what it could be! Try using it without a hacky NX server over anything but a local link and you know what im talking about! Wayland seems like a clean codebase to replace it with, and it can even run X within itself!
But even Wayland dosn't adhere to the Unix philosophy: the way to do X unixy would be to make every application window a bitmap, toolkits into generators of bitmaps, all manipulated by unix tools like imagemagick, which in turn can be accelerated by opengl/cl. All shared over NFS, Samba or SSH.
Check out plan9 from bell labs, its in many ways the successor to Unix.

Then of course there is uzbl, etoile, gobolinux....

We can have a modern system, based on the spirit of the Unix philosophy!

¹ Not the OSS of the 90s. Yeah, it sucked, get over it.


Very late edit: I have since learned that my own experience of sound networking only worked by dumb luck, and wouldnt in reality. Still, the P9P networkprocol for device sharing could be ported.

Thursday, October 8, 2009

TDDC10 Föredrag: Determinism (lätt omskriven)


Som ni kanske förstå av inledningsbilden, så kommer jag prata om filosofin determinism, d.v.s. tanken att allt är en produkt av allt som hä innan och att allt hänger samman i ett nät av orsak o verkan; och vad den ideen leder till om vi applicerar den på vår mänsklighet.


Säg att jag sitter o läser en bok, magen kurrar till. Kanske en smörgås o en kopp te vore nice, tänker jag Slår på plattan. Va på smörgåsen? Smör o örtsalt? Chiliörtsalt mm.. Vem vare som snacka om the med chiliblad? Elin..?
*RIING*
Gissa vem?

Känns igen? Lite spooky när det händer.. hur stor kan chansen va? Måste va övernaturligt, va?

Då vi har en konstant ström av mer eller mindre medvetna tankar, som oftare än inte kretsar runt personer, är då chansen att den personen ringer samtidigt som tanken hälsar på så liten? om man ser över en längre tidsperiod?

Om vi ser det hela från Elin sida så kanske det såg ut såhär.. Hon är på konsum o handlar middag: Flygande jakobs? Nej, för mkt jobb.. Grekisk sallad? Nej, ja är sugen på nåt riktigt.. Nåt nytt vore gott.. Ja ringer hmm... Henrik!

Hur random det än verkar att samtalet kom precis då, så var det en kedja som ledde upp till att jag tänkte på henne precis då, och en annan som ledde till att hon ringde just då. Handlingar är bara en produkt av vad som hänt innan; tankar, samtal, interaktioner. På en nivå mellan folk o folk; men på en annan nivå molekyler, atomer, kvarkar o kanske tillochmed strängar; mellan energi.

Det finns i svenskan inget bra ord som sammanfattar vad som gör oss mänskliga, men ja skulle säga att engelskans mind är ett ganska bra ord¹:


Är inte ordet mind ett concept utan förankring i verkligheten, en förenkling?
Ett koncept på samma sätt som ordet "tomt"?







Mellan den här och raden ovan, vad finns där?² Tomt rum? Vad är tomt, det är ett svart uttrymme? Utrymmet har ju ingenting som är tomt i sig, det är ju bara... blankt..
Tomt finns altså inte, utan är ett concept för att förenkla förklaringarna.. På samma sätt som mind.

Är inte vad konceptet mind refererar till, resultatet av summan av interaktionerna av materian som bygger upp vår hjärna? Materia som följer universums lagar, matematik.

Hur kan matematik ge upphov till fri vilja? Om allt är en produkt av allt innan? vad är då fritt?

Om vår fria vilja är skiljt från universums lagar, hur påverkar den då universum? Om den inte kan påverka, hur är den relevant?

Det är sant att kvantfysiken omöjliggör determinismen, men den byter bara ut kugghjulen mot tärningar; allt är fortfarande lika lagbundet.
Oavsett om kvanteffekterna är stora nog att påverka objekt stora nog som neuronerna i vårt huvud eller inte, är utrymmet för fri vilja lika liten, då båda sätten att se på energins interaktioner är lika lagbundna.

Den stora frågan är om fri vilja kan existera, och vad svaret på den frågan leder till.




Vad tror Du?³




Hur kan interaktion mellan materian i vårt huvud ge upphov till en subjektiv verklighet?

I ett lagbundet universum, vilken roll har individen, annat än att spela sin roll efter Ödets manus?

På samma sätt som tron på ingen gud kan leda till antingen en känsla av meningslöshet eller realisationen att ansvaret för livet är ens eget; vad kan det här tankesättet leda till?

Hur kan straff vara etiskt försvarbart i ett deterministisk universum? Hur kan det det i ett utan koppling mellan handling och konsekvens?

Om vårt mind bara är interaktion mellan materia, och materia kan simuleras i datorer: kan en människas mind simuleras? Eller laddas upp i en dator? Kopieras?
Vad för rättigheter har ett sådant medvetande?
Hur påverkar den här tanken conceptet individualitet?

¹Altså minden är inte vår mänsklighet, utan vår mänsklighet ett utryck av vår mind.
²Tom bild i presentationen igentligen.
³Detta var också en bild i presentationen.

Sunday, July 5, 2009

Nearly the silver bullet for software design or -A wise man has learned from his mistakes, a smart man learns from others.

If we study the world the best method to develop the most widespread complex product seems to be evolution. Genetic individual evolution is familiar to most, the individual receiving the highest progeny spread their genes most. Quite selfevident.
Genetic cooperative evolution is the theory that a behavior or characteristics that benefit the group as a whole, spreads even tho it penalizes the individual.
Then we have memes. A meme is an idea, and as everyone knows an interesting idea is spread more than an uninteresting. As the smallest child knows, someones word is not spread as a perfect copy. Memes therefore possess the three characteristics required for evolution, a method of replication, a replication value and mutation.

A complex very successful example of cooperative genetic and memetic evolution is religion. If there were an original religion, it probably rose from genetic cooperative evolution, as to spend a seveth of the weeks idle, or to not eat meat, certainly is a disadvantage the individual. (Here's a small logical trap, the assumption that religion is a disadvantage to the individual is based on today's religions.)
Religion is also apparently a victim of memetic evolution, as we no longer believe in Zeus, Athena and Apollo, or, for that matter, Odin and Loki. The idea of eternal life is found in most major religions in some form, which is trivial to explain with memetic evolution.

Evolution happens faster the larger the population, as a larger population allows more mutations and a smaller population quickly becomes homogeneous due to the commonization of the, at the moment, 'best' genes.

What the hell has this to do with software? Yeah.. Evolution can be compared with:
The development of parallel products that compete for the user base. Capitalism.
Iterative design, release a close to viable product and expand and refactorize continually.
Open Source, or software communism. As the software is a product of the developers, more developers are equivalent to larger population.

Are there any projects that live by these guidelines? Yes, many! One example is that 40 years ago, an operating system was created to port a game to the PDP-7. It was written in a few weeks, and was worthless as real operating system. But the virus was released, AT & T sent the source code to universities, companies and the U.S. government. It was called Unix. Today Unix is more or less a niche product, but before its 'death' it gave birth to several offsprings, and a bastard, Linux.
The only thing I know, that prevents Linux from being a fully-fledged Unix, as it follows the posix standard, is that the certification is pricy as hell, and applies to the entire operating system, ie each distrubition need separate certificate.
On the top500 list of the world's fastest super computers, more than 85% are running linux, on top 10 on the list 100% are linux-based. Although computers are sold with Windows preinstalled, Linux is the choice for about 4% of users. It is also popular on everything from netbooks, mobile phones to integrated solutions.

Which is a great testament to the soundness of the evolutionary software design principles.

However, the open source model is driven by meritocracy, which means that an optimal solution converges slowly, as either very influential and many developers have to understand both the problem and the solution well. If it converges at all, since the iterative design allows applications to build on 'unfinished' solutions, the problem of switching infrastructure can become to great to be practicly doable. X is a great example..
But perhaps the question is irrelevant? I cannot see how a centrally controlled and marketing-driven software production can create better solutions.