Thursday, May 27, 2004

Jtoxification is radioactive. Wear protective clothing at all times.



Tuesday, May 18, 2004

I'm movin' out.

Monday, May 17, 2004

I have a vision that one day, 3d graphics shall be integrated into the desktop like a First person perspective game ... that one day, servers/email(not just in-game)/chat/gaming/business/ and even aspects of office and file management will be done via an abstracted layer of objects via MMORPG elements. People roam the streets of server-browser cities, and enter server-buildings linked to them, (but only when the "seating capacity" has not been reached. Otherwise one will have to detour to the next room/building/city/state/country/planet. You have an ehome ... always local and available to you, but available to your "buddies" whenever you set it online. You could drive along a server-highway ... carry persistent objects out-of-game ... attach software execution to objects in your e-home such as a typing program to a 3d typewriter, or internet access via an in-game wall-screen ... or a music media player to an e-home stereo system or headphones (regardless if you're actually wearing headphones) (maybe even connect these to outputs of the computer via your real home, such as the home stereo system !) ... A place where people can customize themselves, their animations, and their homes via portable object models, skin graphics, custom vehicles and items, ... only moderated and censored upon reaching actively moderated servers. You would drive friends to chat-bars, frag-fest servers, or ONLINE PAY-PER-VIEW events such as a movie theatre or a virtual ring stadium showing LIVE BOXING VIDEO FEED in the actual ring. You could go to a virtual auction (3d ebay) or online shop. You could host truly meaningful and impressive meetings, or finish work in a secure/encrypted building. Networked resources such as faxes and printers could be attached as well. A free range of exploration and customization possible in each e-home ... a museum, a yacht on the open sea, a train in space, or a combination of these in an MC Escher-like environment with view-portals to change perspectives in impossible ways, and user-relative gravity. Of your own preference, you could have a fight-fest of weapons, speed, and skill, or a place of puzzles, mystery, and magic, or even places of virtual parks, to sit down as if at yahoo or msn games, and play board games. It's all been done before ... but never all in one ... only in science fiction has it all been done ...
It would be AOL Online meets SIMS Online meets Tribes meets Everquest meets Furcadia meets File Explorer meets Command and Conquer meets OS the Internet meets Virtual Reality.

It will come. One day, it will come. It will come, when computer and networking has reached every empoverished point of the earth ... and its coming shall rock the senses of mankind, putting businessman and sweat shop worker on the same footing, with the same features, and items. One day, not only will a homeless man be able to profit off of the Internet, thus helping to tear down the class walls that attempt to rise (as have many done even now), but can, via the face of virtual reality, present a completely different and unhindered side of the self, which could not have been expressed or even taken seriously before. Where everyone and every group has power over themselves ... from the child living in Micronesia to the membership of a corporation spanning several countries.

Corporations and Opensource communities alike shall vi for control of this market, but by then it'll be so Global, that no world power can fully control it ... only host it and sponsor it, as the businesses and comminuties continually shift in an ameobic, yet symbiotic ecosystem.

It all already exists ...

but not in one package.

One day... it will come.


Wednesday, May 05, 2004

So what's really cool about C++, you ask ? After all, all those extra features must really slow it down, right ? Or maybe it makes code harder to read ? Perhaps it's harder to track meory leaks ? (in comparison to C or Java)


It's ALL About Good Coding Practices (Overused & trite, but true)
It's all in how you code.

For instance,

(unoptimized)C code is WYSWYG (What you see is what you get), where you can access any part of memory and change much of it, etc. It's also dangerous because you can easily access parts of memory you didn't intend to, due to a mistake.

C++ code can literally do everything that C can ... although some implicit side effects must be explicitly labelled in C++ rather than C. C++ code can also directly link to C code via a "preprocessor" statement called extern "C" {/*This is where C code or links to C code would be*/}
C++ has more features, and a few of those features can slow down the program if you don't know what you're doing.
The major features are:

1.) default function parameters (you can instruct a function to take certain extra "optional" inputs )

Speed: No slowdown.

2.) function overloading (you can create two functions with different inputs but have the same name)

Speed: No slowdown -- the compiler gives functions seperate names based on their inputs, and thus differentiates by input sizes, similarities, and order of functions.
Java has this, too.

3.) Objects that syntactically encapsulate both objects and operations. C has objects that encapsulate other objects, but not operations ... they can link to operations and functions, though.

Speed: (NO slowdown !)
Java has this, too. (In fact, in java, you cannot define functions outside of objects)

4.) More syntax and grammar for dynamic memory allocation:

This is where most of the danger comes in: the slowdown occurs when someone decides to use a lot of dynamic memory. C++, like C, gives you the option to allocate memory to objects from the system, and even from other objects. Allocating memory from the system is slow, due to memory management. C++ also allows you to delete objects, and even specify how each is allocated and/or deleted.
Java is ALL ABOUT dynamic memory: unlike C and C++, Java does NOT allow you to also statically allocate composite objects.

5.) Object inheritance (A form of creating composite objects off of existing composite objects)
You can create objects as a sort of subclass of another object, that "inherit" pieces of code and data types held by this "superclass" object. In this way, you can build a tree of objects that acts like a species heirarchy, where any subclass is also an instance of its superclass. Thus if you made an object of type "music cd" and it has a superclass of type "music storage" then, by specifying the context, you can treat your object as a music CD OR as music storage in C++/java. But a "music cassette" and "music CD" would not be the same unless you viewed them from the context of music storage. (But it gets more complicated in that you can inherit multiple items ... that is, you could have a setup where a DVD would be of types "DIGITAL" and "VIDEO" whereas a video tape would be of types "ANALOG" and "VIDEO" ... they're both video objects, but their data formats differ. So they're not really classes so much as contexts ... but I didn't make the language, so I wouldn't know the reasoning behind it. :-D

This is where the second half of the slowdown takes place : inheritance hides object size. In C++ and java, if you had the above heirarchy and created a dvd object, you'd also implicitly be making a hiden digital object and video object, and whatever memory they allocate.

There are certainly many other things in different languages that slow them down. For instance Ralph Griswold's Icon has arbitrary number sizes ... i.e. if you had enough processing power and computer speed, you could calculate pi to the 999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999,999th decimal point easily, and store it in an Icon primitive1 floating point2 type.
The downside, of course, is that it's SLOW !

Take Icon's long number handling and create even a 14-bit RSA3program, (the standard is around 128 bits or so. follow the explanation at the bottom(3) to find out what that means.) and compare its speed with one made in SML (Standard Meta Language) and while the average implementation in SML runs within a second, Icon's average implementation runs between a minute and 20 minutes, depending on which language features are used and how well the algorithm is coded ... but part of this can be due to how good the compiler is. The compiler takes source code written by a programmer and turns it into a program. (that is, it translates source code into machine language.) Now a good compiler will optimize the code in a way that allows the computer to read it faster and with less memory ... in other words, quickly and concisely. So, say if Icon was ported to GCC 4, etc, etc, etc ... but then, we could conjecture the same "what if" to SML.)

So what can be said of all this ? Java's new features are really nice. The C programming language is perfect for low-level programming, and C++ can do everything C can do, and if you're careful, you can still use C++'s extra features without noticeable slowdown. Finally, since there are weird quirks to all languages, there may yet be some things that are actually done faster in various languages than other even if such languages are "high-level".

1-Primitive: in programming, this defines a type of variable/container (like a math variable) that is built into the language, and is used "like a lego block" to create other data types. Primitives are traditionally easy to create, usually from a standard "stack" of memory set aside especially for these "primitive" data types, and are automatically destroyed when no longer in use/accessible.
2Floating-point: this defines a term in mathematics used to describe numbers with fractions, (i.e. -- numbers that have a "floating point," like 3.2 or 241.002351 and even 2.000 )
3RSA - A (computation-intensive) form of public key cryptography introduced by Rivest, Shamir, and Adleman - 1977. In cryptography, the number used in front describes how many possible guesses one would have to make in order to unlock encrypted data. This number is known in mathematics as the key space. In this case, the key space is 14-bits long, where 14 is an exponent, and "bit" describes the counting base raised to the power of that exponent :

bit:binary = 2 [0 1]
octet:octal = 8 [0 - 7]
digit:decimal = 10 [0 - 9]
hex-digit:hexidecimal = 16 [ 0 1 2 3 4 5 6 7 8 9 a b c d e f ]

In this case it's two, so all they're really saying is that there are less than
214(16384) combinations. So, in general, a higher bit-size is associated with better protection, but that's not necessarily true.
4GCC - The GNUC programming languge Compiler. (GNU: GNU is Not Unix - the definition stems from a joke regarding recursive acronyms) GCC is an incredible, legally free (and protected), feature-packed, legally-hackable/modifiable, multi-language compiler of cult status among programmers who enjoy the GNU free software foundation. However, many people like to polarize the status into Microsoft vs. GNU, because Microsoft's Visual Studio.NET is the "GCC" of Windows (Even though GCC is also available for Windows, runs java, and there are multiple ports for .NET available, too), yet Microsoft's has automatic memory management and is bundled with "beautifully visual" tools that make programming much faster and produces more aesthetic results at the cost of bulkiness, slowdowns at odd times for no apparent reason, and a layer of abstraction that makes it difficult to know what third-party operations take place while your own code runs, and whether a particular function is optimized. It's also impossible to directly change memory locations. The efficiency and ease, while too advantageous to ignore, also allows for people with insufficient knowledge to create working programs. While a good thing, (beginners can learn the ropes while still producing significant results) these fancy tools won't stop you from writing bad code. So it's bad for job security and industry, but a professional-looking user interface made in one hour, for a complex program made in 240 hours, can make all the difference.


1 The Free Software Foundation
2 Java
3 Microsoft's .NET platform
4 .GNU: .NET compatibility for GCC
5 The SML/NJ programming language
7 The Icon programming language
8 java to c++ and vice versa converter (only does certain window and utility libraries, but that's still enough!)

9 Lamda- a place to discuss programming languages... just found this place and I think it rocks.

Saturday, May 01, 2004

For those of you who don't know, bloggers get to betatest Google's free 1-gig email system, gmail.

It's awesome, I tell you. Get one if you can.
So many ideas, so little time.

I will be driving one of these within the next two decades.

n.s. graduated ! Holy Karma, man. Go make some money !

Interesting. Apparently I've been added to the Blog Hunter last year, and I don't even remember it ! They've got a slick interface, though.

My friends addicted me to SlashDot

Go visit Foamy, cyberspace's resident "lord and master" squirrel.