Tuesday, November 28, 2006

Poor man's VOIP

  1. Get one of the VOIP solutions from TinyApps. You don't need to register, all is well.
  2. Go here and get yourself a free account, then register a dynamic DNS address.
  3. Get a copy of DeeEnEs, and set it up so that it updates the dynamic DNS address you got above.

Then, just give your dynamic DNS address to others, and there: free, server-less, account-worry-free VOIP.

Pong game servers available for download

Well, Arden left me a comment in the original post asking for the game servers. Sigh... please excuse this rather large omission! A new file is now available for download in the FTP. Sorry!

To play, start up one of the game servers and, in a workspace, evaluate the code below.

[ContestPlayer fork].
[ContestPlayer fork].

Enjoy!

Monday, November 27, 2006

More and more speedups

I posted a small change that speeds up opening paragraph editors in VW by a factor of about 3x (in the particular test case I had). It is in the VW NC list.

Enjoy --- there is more coming, too!

Up pipe is still red hot!

So I came back from work and I found my cpu box hdd light going off all the time. Ah, but of course: the upload pipe was sending one megabyte per second out to 7 people. This goes far beyond any expectations I had, and then far beyond again. The videos are still being furiously downloaded!

I hope you like them! Thank you thank you thank you!

Sunday, November 26, 2006

A bit of foreign law

Discussing with a friend, it came up that in Argentina there is an interesting bit of law. The act against this law is called "apology of crime" (translated literally). In other words, this means that it is a crime to offer excuses or justifications for other crimes.

For example, if John Doe claimed that Unabomber was right to mail bombs etc because of whatever reason, then John Doe would become a criminal in Argentina. He could argue that Unabomber had been irritated in some way or the other and that this irritation was wrong. Fair enough. But John Doe would not be able to argue that this bad justified the other, because otherwise he'd end up in front of a judge.

So, my friend, if you still watch TV, turn it on and watch carefully. Painful, isn't it? Then, consider that a significant amount of people just repeat what is said on TV without giving it a second's worth of thought. Hmmm...

But I digress. What we do not know is whether there are similar laws in other places. Is there a counterpart of "apology of crime" in your country?

Saturday, November 25, 2006

Old notes shining as new

As I was going through some old files, I found some notes I took down while at Smalltalk Solutions 2006. I think I posted on them already, but three paragraphs that I am almost sure I didn't use jumped at me. I wrote this only 7 months ago, and yet it seems like new to me.

So, what is this bunch of words that keep repeating themselves? Massive. Multiplayer. Global. Connection. Stuff. Out there. Play with. What is it that we want? Is it interaction because we're isolated? Because in our $ based society people don't matter? Because the idea we get to fix this is to use computers?

Difficult things to do... you have two inspectors, are the objects being inspected == or not? Global variables vs the identityHash lottery.

As there are demo competitions, do we need Smalltalk competitions? What would be the equivalents of demo, 64k, 4k and so on?

Man, I really need to get going with my stuff.

By the way, footage downloads are still going on without pause...

Video going out the door non stop!

Just 15 minutes after I posted the link to the ftp, the downloads started. They have been going out straight for the last 3.5 hours. The minimum upload speed has been around 100kb/sec, but most of the time it has been 300kb/sec or more --- such as now, when data is flowing at about 500kb/sec. In addition, outgoing traffic has spiked up to 796kb/sec, reaching 100% of the bandwidth capacity.

I am absolutely amazed --- I didn't expect this amount of interest at all! I had thought well perhaps you know 3 or 4 downloads today, then a trickle for a couple months and so on. I was happy with the video being useful for someone already. But this? Wow.

Thank you so much for this. I hope that you like the videos as much as I enjoyed making them. If you have any comments --- neutral, good, bad --- please please let me know so I can make them better.

Enjoy, and thanks again!

Smalltalk footage available for download!

The footage from my previous presentation at NYC's Smalltalk User Group is now available for download! Here is how to get to it.

ftp://sqrmax.homeip.net
user: smalltalkVideo
password: now


And if you go there, you may even get a bonus track...

Thursday, November 23, 2006

Video processing unit back in business

I caught up with the queue of raw video files to process, and after crunching about 40GB of stuff it finally came to the recording of the NYC SUG talk on the coding contest. The result will be a 700mb file (roughly speaking), lasting almost 83 minutes, and with very good resolution: 960x480!

No video editing was done on the footage*. I am not sure as to what to do with the illegible source code being projected on the wall, but on the other hand there is not that much source code to begin with.

I am still in doubt as to what to do regarding distribution... Google video? Just put it in an FTP server? Whatever ends up happening, the footage from next Wednesday's talk should be processed sooner now that the backlog is taken care of.

* The sound track was left verbatim as well, other than some postprocessing.

The highest high

If you take an aspirin, that is ok. If you drink tons of coffee to stay awake at work, I'd guess that is ok on de facto grounds. So what is it that makes something like steroids wrong?

You have these sports people that earn money based on how much and how well they perform. Take steroids, better (?) performance, better sports people, and better salaries as well. Why not? Well, because something does not sound quite right, does it? What is that thing that bothers you in the back of your mind?

Then you have things like baseball, where the player union itself seems to have an interest in that there are no doping tests. Why not? What exactly would be wrong with finding that whatever percentage of players use steroids? Let's say the number is 10%. What's wrong with that? Does it change the sport? And if the number is 50%? Does it change the sport? And if the number is 90%? Does it change the sport now?

Of course not. Steroids or no steroids, drugs or no drugs, cork bats or no cork bats, the sport remains the same. But what is wrong with that kind of proposition? Why is doping something that must be hidden? Why cannot it be in the clear?

And that question gives the answer. It must remain covered so that whoever is doping can claim that the achievements are the result of sportsmanship work. But if reality is that, roughly, any Joe Doe taking pills can achieve similar results... hey, all of a sudden the salaries of these sports people look way too high, don't they? Why would you pay anybody tons of millions of dollars to take pills, go win championships, and dedicate the victory to the pharmaceutical lab?

That is the problem: sports like this are bullshit (quite literally) because the players who dope do the following two things. First, they have a complete disregard for whether something is proper or not (believe it or not, doping can do things like getting you out of the sport forever). And second, they have a complete disregard for whether something has any connection with reality or not. In other words, they are psycopaths and liars, because they do not care what is it that they have to do as long as they can collect ever growing mountains of money.

When they celebrate, they take all the glory. We like to believe they persevered because of skill and effort. And, to a point, we are also accomplices because even when we have some hint that perhaps there was doping involved, we brush it aside so that we can also celebrate. Because we need to celebrate, we need to win too. And thus we also lie to ourselves so we can give ourselves a fake high.

So what is going to happen when getting a fake high takes more and more efforts on our part? What is going to happen when the dope of yesterday is not enough for tomorrow? Well, things like drugs that will allow you to work 24 hours a day. And obviously, the work day will be extended to 18 hours, and whoever works "half a day" quite literally will be punished with a lower salary, etc etc etc. Note how the article is written in almost fatalistic terms: it is here, it will happen, I am sorry for you, and so on. And clearly, if you are convinced that it must happen, then it surely will.

Welcome to the high life, I mean life on a high. And welcome to a Brave New World. Being a complete slave of work, a complete slave of money, of these tokens you will not keep when you die. A life full of gla$$ bead$, of doing things we really do not believe in so we can think we have things which have no intrinsic value.

Sometimes, the way in which we lie to ourselves may seem a bit innocent, or even childish. I had a plane conversation once with this lady that was very religious. Although which religion it was exactly does not matter, out of curiosity I asked her about these religious things she was describing. She went on to tell me about what she did because of her religion, and why these acts had a lot of value because they were done in the context of her religion.

I guess my straight face and lack of reaction made her see I was not buying any of it, so she said the following: "Well, I know that all of these things I believe in are more or less like believing that Santa Claus exists, but life would be too hard if I could not believe that there is something after death... life would be meaningless, so even though I know very well that all of this is foolish I choose to believe in it anyway because I would not be able to cope with life otherwise". I had not asked a single question, I had not uttered a single word, and there she was confessing her sin: knowingly lying to herself.

But some other times our lies have nastier consequences. For example, what is going to happen when getting an ever stronger high requires that some species goes extinct? Or that someone else dies? Or that many other people die? Or that some ethnic cleansing must occur? Or that we completely ruin this planet in less than 100 years? Or that we commit global suicide, so we can finally get the highest high of all highs: experiencing death in a horrific and terrifyingly slow manner, just so that we can finally bring on to ourselves what we are typically so afraid of?

Oh, you mean, you open the newspaper and read?

Thus, there is no choice other than to conclude that, on aggregate, we are such pathetic monkeys. And even though life like this is absolutely 100% bullshit, the more important fact is that it is also an option. So thanks, but no thanks --- I will take something else instead.

Wednesday, November 22, 2006

More speedups for Store

Yet another round of Store speedups. This time, reconciling against the database was made about 20% faster with two sets of changes. Hopefully these modifications prove to be correct and free of defect. To try them out, go to the VW NC list.

Tuesday, November 21, 2006

Spam comments

So finally I got comment spam in this blog, all related to Skype stuff. To make it more challenging, whoever or whatever did this decided to sprinkle my old posts with spam. Given that Blogger doesn't tell you which post the comment was posted to, this could have been a problem...

... nah. Use my web spider, update the snapshot of my blog that I keep for my own purposes, and then simply look for the right keywords. This made finding the spam very easy because Blogger produces a file per post. Go to the post in question, delete delete delete.

From now on, comments will be moderated as I'd rather not have to waste time with this again. I hope you understand.

Monday, November 20, 2006

Of DRM and addictions

Recently, James Robertson linked this page that lists 10 reasons why DRM is bad. But more than once, I've gotten the impression that DRM is supposed to work because there is this assumption that consumers will not be able to control themselves, and they will compete buy any kind of glassy bead shown to them (PS3, anyone?).

But if that is the case, and consumers are being seen in terms of being addicted to stuff, let's play word replacement with the following rules.

  • "DRM" = "Illegal drug enforcement"
  • Instances of "media", "files", etc on which DRM is desirable, but that do not have DRM applied to them yet = "illegal drugs"
  • Instances of "media", "files", etc that are only available with DRM = "prescription drugs"
  • "media", "files", etc on which there is no DRM ever = "drugs"
The idea here is that, in the same way that people addicted to illegal substances typically pay for each high they get, DRM will force us to pay for every "enjoyable experience" we live. Therefore, let's rewrite the 10 reasons why DRM is bad in these terms and let's see where this takes us.
  1. Drug enforcement doesn't prevent illegal use of drugs, it just makes it a bit more difficult to access them.
  2. All it takes is one person to give the right seeds and instructions, and then drugs can be made available to everyone.
  3. Anyone selling prescription drugs is selling drugs anyway.
  4. Illegal drug enforcement adds a lot of costs to drug manufacturers.
  5. There is a huge hidden cost in trying to sell illegal drugs.
  6. Often the costs of the illegal drugs are passed along to the consumer as well.
  7. Drugs will give you a high today and tomorrow.
  8. In the future, your body will be significantly different from what your body is today.
  9. Illegal drug enforcement fundamentally changes who is in control of your drugs.
  10. Whenever you buy legal drugs, you support the system of illegal drug enforcement.
... perhaps the analogy can be refined a bit, and I really do not want to spend too much time polishing this post, but... wow...

Powerwhammo

So... interesting times, my friend...

James had used Powergramo to record the output of the conversation between Avi, Michael and himself --- the making of last week's intended podcast. But the audio got bent out of shape, so he passed on the .ogg file exported by Powergramo to see if anything could be done.

He said the original conversation had been a bit under 40 minutes. And here was this .ogg file lasting 9:36. As I listened, it became clear: about 75% of the audio data was missing.

I asked James if there was any large file in the TMP folder, and he found a .pga file of 33mb --- about the size of the ogg file. But that was a Powergramo file, and apparently was unplayable with anything else. I suspected it was tagged .ogg data, so I asked James to pass it over.

At first, it didn't seem to make sense. Until I saw that where the exported file said "Ogg", the .pga file said "Nff". Where the exported ogg file said "vorbis", the .pga file said "wnschr". Where the exported file said "20030909", the .pga file said "31121818". Ah, so the .pga file was the original ogg data xored with 1h. Very nice. And as for the slightly larger .pga file size, there was a header at the end that said, among other things, "MVOGG [...] Encrypt1.0".

But xoring the whole .pga file with 1h didn't result in a proper .ogg file. So I xored the exported file against the .pga file and found that not all of the .pga file was xored. Only the first and last 20480 bytes (20kb) of the .ogg data were xored with 1h. Simple enough, Smalltalk takes care of that no problem.

Alas... because the, um, "decrypted" file is identical to the .ogg file exported by Powergramo, the data defect still remains. Hence, Powergramo managed to lose 75% of the sound information.

I don't know why this happened. Perhaps it's a known bug, or a known bad interaction with other software... thus, I will not claim anything else. But... "Encrypt1.0"???...

Sunday, November 19, 2006

Speedups in the public repository

I just had a chance to check my email, and it turns out that Joachim Geidel has published the Store speedups I wrote into Cincom's public repository. The packages are Tools-Speed patches and Store-Speed patches (although in the case of the Store one, I'd like to clarify Joachim added just Store.Package>>addClasses:andMetaclasses:).

I am very glad and grateful that Joachim did this. I have been extraordinarily busy as of late, and I have not had much time to do anything other than to catch up on sleep debt. Thank you so much Joachim!

Saturday, November 18, 2006

Polymorphism at its best --- NYC SUG 11/29!

I have been given the honor of giving another presentation at NYC's Smalltalk User Group. This time, it's going to be on the amazing consequences of using polymorphism to increase execution performance, and in this case, how sending regular messages beats heavily optimized things like ==.

Yes, there is no typo in the paragraph above. Normal message sends running faster than ==. And not just by a hair, no no no. I mean up to 60% faster!!! This is serious stuff.

And besides, the half-optimized, non-inlined version runs, on average, within 74% of the original unmaintainable inlined and already optimized version. But if you can get that performance without large chunks of code and things like ==, are you sure you really need to inline everything into a blanket method?

These matters and more, including some of the most absolutely beautiful code I've written, it will be all for you my friend. The one hour, extended, enhanced, polished, encore presentation of the original OOPSLA 2006 demo, "Writing Truly Efficient Smalltalk". November 29, at NYC's Smalltalk User Group meeting.

Don't miss it --- and see you there for a great fun time!

Tuesday, November 14, 2006

To publish, or not to publish: of love, overrides, and everything else

I've been asked to publish the speedups I've been making to VW in the public repository. Thank you so much for the interest!

Alas, this brings me a problem. I had decided to just publish updated versions of the base VW code in my local repository because then, when I update to a new version of VW, I can just merge stuff into the new version. In this way, I treat my changes as a branch that needs to be remerged...

... and it also saves me from dealing with overrides. Personally, I guess I have not learned to see their advantage, or that I am missing the point somehow. I tend not to use them because of two reasons.

First, Store tends to become more brittle --- my image has overrides due to loading parcels that came with VW, and now I cannot publish the parcel as a package and the modified bundle into my local repository without having at least one of them become dirty.

Second, overrides held in a separate package don't show you where the code was to begin with, and then loading them into a new version of VW just stomps over the other stuff. It becomes much harder to, say, compare the code before and after the potential changes.

But now that I am asked to share via the public repository, I can't simply publish new versions of VW 7.2.1nc, which is what I am using now. What to do...

... hmm, I wish there was some sort of "unit of work package" idea, something like a package in which you could say "all these changes are because of this reason". This unit of work would not own the changed code, which would still be published as versions of the base pundles. However, it would provide a good mechanism to load pieces of code into many different pundles in a controlled way, without owning the code by itself.

If units of work existed, I could simply publish them into the public repository, and upon loading others would get their base pundles modified. Or there could be an option on load: "load & modify", or "load & override" (in which case the unit of work would own the code).

One could even have these things have particular load requisites --- if the code in the image does not match what the unit of work expects to change, then provide a warning before loading the changes. And then, instead of talking about ARs, we could talk about "units of work" that improve a particular version of the system. Let's call these particular units of work "updates", put them in the Update Store Repository, and then you could simply invoke "Get Updates" from the menu because VW would come with a read-only anonymous account for the update repository.

I have a feeling that is what is missing here. In the meantime, I guess I will have to figure out some way to emulate it.

Saturday, November 11, 2006

Regarding online bill pay

I had always thought that paying bills online was something that would benefit the people collecting the money, rather than the people paying the money.

For instance, if you pay with checks, the company receiving the check has to process it, and either them or the bank will send you confirmation that the check has been cashed.

But with online bill pay, in particular if you go to each company website to pay, you have to print your own receipts with your expensive toner/ink cartridges. You also have to file individual pieces of paper in their corresponding hanging folders or whatever arrangement you use. And to top it off, you still have to do your own accounting, just like you did with checks!!!

In addition, I also had a feeling that all this alleged automation was actually slower than writing checks. For example, I timed myself at 2 minutes to not even successfully pay my cellular phone bill because somehow the username and password got "upgraded" or whatever. In about half that time, I wrote a check, I wrote the duplicated paper trail in case my computer files blow up, and I also updated my computer file so now my accounting is up to date as well.

In summary, it took me something like half the time, I didn't have to go get any plastic card to type in the account number, the security code, the expiration date, the funny number, the strange number, and the randomized password from my RSA keychain. Moreover, I did not have to print paper with the ridiculously expensive consumables, I did not have to file single pieces of paper, etc.

So. Who should do the secretary work? You, or the other guys? I'd rather pay 39 cents and have them spend the time I would like to use in a productive way instead.

Of course you could have your bank program to pay all these things automatically from your checking account. Alas... for most of these services you have to pay a monthly fee that is usually higher than your expenses on stamps, and in addition you still have to tell the bank how much to pay, etc.

Monday, November 06, 2006

Observation regarding sound recordings

Something I noticed when cleaning up audio recordings is that, usually when they are recorded by a computer, there are noise spikes at frequencies like 60hz, 120hz, 180hz, etc. One could say well, all multiples of the base 60hz AC current frequency, so there is some sort of leakage.

But when I analyzed mastered CD tracks with the same mechanism, I also found such spikes. What's going on here? Why should there be frequency spikes like that coming from professional equipment?

Incidentally, the CD I looked at was Behavior, by Pet Shop Boys. Besides the spikes at multiples of 60hz, I had always (although barely) noticed a very high frequency hiss in the background of the tracks of this CD. Indeed, analyzing it found the spike showing very clearly, at about 20-22khz. Slowing down the music only made it much more obvious.

Grrrr... why are there such defects in CDs?!?! As if they weren't expensive enough already!!!!

Update: ah, now I see what the hiss could be... perhaps the tracks were mastered with a resolution higher than 16 bits, and the hiss is the noise dithering that was done when converting the originals to 16 bits. Grrr!!! I just learned what not to do.

Many times faster Winamp DSP plugin

And since I was on an optimizing mood from yesterday, I also made my Winamp DSP plugin many many times faster by reducing the clutter I had from the first time I wrote it. Before: up to 20% CPU usage. Now: no more than 9%. CPU usage without the DSP plugin running: no more than 7%. Good stuff!

4 simple changes => 65% faster RB!

Sometimes, having a slow computer makes inefficiencies more obvious. I was renaming classes, and renaming selectors... a lot of them... and hey, the Refactoring Browser was making me wait. Not a whole lot, but like 5 seconds plus a garbage collect for every one of them.

I interrupted one of the operations, found a good place to install a TimeProfiler, let it finish by proceeding in the debugger, and then installed the TimeProfiler after the run was done (yet another big advantage of debuggers in which you can stop and continue, hehe!).

Then, I continued working and started getting TimeProfiler outputs after the operations were done. Based on this information, I made 4 simple changes that resulted in about 65% faster* execution. Very nice! Check out the VWNC list for the details.

* Faster refers to an increase in speed, which is typically defined as amount of work divided by amount of time (e.g., miles traveled per hour, or revolutions turned per minute). Thus, the speed of a program can be seen in terms of iterations/second, and therefore 65% faster means that the new implementation can run 65% more iterations in the same amount of time. If we compare times instead, this speedup means that the new implementation runs in about 60% of the time, because 1/1.65 is about 0.60.

Sunday, November 05, 2006

Recommended RB extension of the year

You must absolutely load RBHierarchicalClassesExtension from Cincom's public repository so you can have the partial hierarchy tab in the Refactoring Browser. Do it now, I would definitely be irritated if this feature was taken away from me.

Big thanks go to Anthony Lander for creating it!

Saturday, November 04, 2006

Farbrausch has more demos

I watched fr48 a while ago... how absolutely beautiful. Quite different was fr49... very surprising! Then there was also a couple of fr-minus releases. You should watch them too.

Get them here and enjoy!

With a friend --- first byte: post #256

I had a conversation with a friend, and among other things we commented on the state of education, mankind's level of achievement these days, and so on. I heard the following characterization, which I think is very good.

That is the distinction between "education" and "training".

Hold the thought and consider it. Train, perform repetitions... if you are to do the same thing many many times, then you might as well train for it so your defect rate is low... and then why not just build a tool to do the repetitions for you --- oh right, then we could have a code generator so it writes the program automatically for us, etc.

And you know where that goes. No thought, zero creativity, and very expensive cost of change.

Trained people put things in, because that is what they are trained to do.

Then you have to consider this. It is well known that as new parts of our brain develop, they will die off or not activate later on if they are not stimulated at the right time. In other words: do a lot of multiple choice tests while your brain is still developing, and guess what will you train yourself to do. Even worse: what you are causing yourself not to be?

So, go with an unchallenging education, and no wonder: now you have many many people having to live their lives with what in a different kind of society might be considered to be something close to irreversible brain handicap. No matter how you slice it, the point is that you just have to miss the train once, and then it's gone forever.

What is worst is that if you miss it, how would you know the difference? Your particular experience of the world will be fixed and handicapped forever. Any sort of more sophisticated perception would be something you would not even be able to think about, because you would have no direct experience of it. In other words,
  1. these more educated ways to perceive the world would not exist, as judged by whoever makes such decisions,
  2. the people that claim there are such things, and that it is possible to achieve them with proper stimulation, would be out of touch with reality, and
  3. the very few exceptional people that go through the training process, survive, and still have this ability to perform their incomprehensible "magic", are called geniuses* --- who happen to exist just by mere chance, without the slightest attribution to the nurturing environment in which they develop.
It makes me sad to realize that there is all this potential gone into the trash, all these unnecessarily handicapped lives for no good reason, just because we do not care for life enough. Besides, there is always an excuse to justify what should be seen as almost criminal. And criminal it might as well be. For example, if your kid is given a medicine and becomes cronically ill, or if a drunk driver causes life lasting paralysis because of the unspeakable negligence, wouldn't you sue the hell out of the perpetrator? Then why exactly is brain underdevelopment ok?

Alas... for when it would be convenient for us to believe whatever is wrong is actually normal and acceptable, we humans have these special gla$$ bead$ towards which we are trained to turn our heads, wag our tails and look the other way. That scene from The Wall, in which kids in school benches fall from the conveyor belt into the meat grinder, gains new meaning.

We just suck.

* Please read Brave New World, by Aldous Huxley.

Another great quote...

"We have a habit in writing articles published in scientific journals to make the work as finished as possible, to cover up all the tracks, to not worry about the blind alleys or describe how you had the wrong idea first, and so on. So there isn't any place to publish, in a dignified manner, what you actually did in order to get to do the work." --- Richard Feynman

Automatic Google results cleanup

Just by accident, I found a way to obtain much cleaner results out of Google. Enter your query terms, and just suffix them with this:

-television

Magic: the answer size was reduced by two orders of magnitude!!!

G. H. Hardy's quotes

I was looking for the "90% of everything that has been published is wrong" quote, which I think was written by Hardy. I could not find it with Google... but I remember having read it so vividly, perhaps from An Introduction to Number Theory... if you have it, would you mind posting a comment with it?

At any rate, I found this other quote that I like very much as well.

"It is not worth an intelligent man's time to be in the majority. By definition, there are already enough people to do that." --- Godfrey Harold Hardy

If my memory serves me right, this was said during or right before World War II began. So appropriate...