Category: Geen categorie


First post of the year. I know, It’s February
already, but better late then never, right?

So, what’s going on? Not that much, really.
Second week of classes again, after the exam
period. I’ve failed my databases exam, but,
with a 4 for my partial exam, it was kinda
to be expected, I guess.

I’ve passed statistics with an 8 and Logic and
set theory with a 7. So, my other subjects
are going well. The only subject I’m still
waiting for is Philosophy of Science.
The result should be there soon, I mean,
this *is* the 2nd week of classes!

Anyways, I have passed enough bachelor
subjects in my pre-master, so I am taking
master classes now, and also data structures,
(which is a bachelor subject, still a compulsory
pre-master subject)

And also this semester, I am taking a philosophy
class. “Philosophy and Causality”. I must say,
taking philosophy classes have a positive effect
on me. I feel much better now I am taking these
classes.

So… philosophy of science, last semester, is the
first time I was taking a philosophy class, so I
am still kinda new to the area, but, I like it.

It’s friday. The first week of classes after the exam period
has almost finished. I’m still waiting for the results though,
so I don’t know yet if I passed my exams. So, now, I’ve
started taking the statistics classes again. Another subject
I didn’t pass last time. Also, this class, Bob is taking it
too. I’m glad to have a subject together with him again.
And I like to be explaining questions, you know.

So, now, I am waiting to see if I passed linear algebra
and basic math. This is the 2nd time I took those
exams. I really hope I passed them, because if not,
I will only have once chance left to pass them. Ugh!

Logic and Databases, those exams were just intermediate
exams. Not everything is lost yet if I didn’t pass those,
but I will have to get better grades on the final exams.
So, it would be best if I passed those as well, but
the time for the databases exam was short, and the
logic exam was tougher then the older exams,
even though the teacher denies this, it seems many
other students agree with me.

But this quartile, it’s not only retakes of subjects I
failed half a year ago, I’m also taking a new subject.
Philisophy of Science. I had the first class yesterday.
I like the subject so far. Much better then those boring
math subject. Maybe Philosophy suits me better then
Science after all. Maybe…. maybe…. but yeah… isn’t
it what I have mentioned before? And the reason why
I did study computer science courses? Oh well…

I must say, I think this Operating System
is slow as shit. I am used to ArchLinux,
that is responsive on my machine. But
OpenIndiana is slow, even when I compare
it to that Microsoft OS.

Another problem I showed up was running
low on Swap space. During installation, I was
only asked for one partition. Since this is a
Solaris OS, it created slices within this
partition.

It turned out, it was using only a swap
of 512 MB, while my system has 1024 MB
of physical memory available.

A quick google told me, resizing the swap
can be done on the fly.
http://blogs.corenetworks.es/2009/08/how-to-dynamically-increase-zfs-swap-space/
This solved the out of memory problems
I was experiencing in the packet manager.

Still, the OS responses slowly, and the
pre-compiled software availability is
rather low (compared to an Linux distro)

Some more software is available from
http://www.blastwave.org/ but it seems
there is outdated software in on there.
For example vlc version 0.8.6f, which
appearently has problem with the playback
of the MPEG4 codec. It’s not the video
output since videos using the h264 codec
have correct playback.

I was thinking about compiling the current
version of VLC for my OpenIndiana, but I’ m
note sure, this Operating System feels so
unresponsive that it’s no fun anymore.

Hello from OpenIndiana. I am going to type
my post about my experiences with OpenIndiana
again. Yesterday I managed to crash my system,
and appearently Blogger.com’s auto safe function
doesn’t function on the Opera browser. So. I’m
typing my post again using Firefox, just to be
on the safe side ;)

So, yesterday, I discovered there was still an
unpartitionised hard disk sitting in my computer.
I totally forgot I installed that thing a couple of
months ago. Soooo…. free disk space!!!! What
do do with it?? Install another Operating System!!!

The Operating System of choise was OpenIndiana
(http://openindiana.org/) I’ve noticed a bug in the
installation program. The installation program
seemed frozen while it was scanning for disks.
I noticed the floppy drive led was on, so I assumed
it was scanning that drive for disks. I guess I was
right, since as soon as I inserted a floppy, the
intstallation program continued. Installation took
up about an hour.

After booting my freshly installed OpenIndiana
and logging in. I had a nice gnome desktop on
my screen. Firefox and Thunderbird were
preinstalled, so, let’ s surf the web. Soon firefox
popped up a message about missing flash plugin.
It tried to install the plugin automatically, but failed.
So, manual installation. There is an official Adobe
Flash plugin for Solaris, so downloading that one,
it turned out, it was an archive containing the plain
.so plugin file. No package. Copying the file to the
firefox plugin directory and Flash worked.

Next thing to do, my data. As I’ve discussed before,
my external hard disks use the ext3 file system.
It seems there is no ‘out-of-the-box’  support for
it, and there is no driver in the repository. A quick
google found me this page:
http://hub.opensolaris.org/bin/view/Project+ext3/Quick+howto
and it worked great.

Well…. we’ve got firefox, let’s try a different browser.
Surfing to www.opera.com and heading to the
downloads section. It displays a message Solaris
is no longer supported, and version 10.11 is the
latest available version. Okay, it’s not new,10.63
is the current version, and version 11 alpha is
already availble, but still… let’s download the thing.
It seems, Opera did create a package of the program.
Installing went without a problem. The only thing
to mention is, it didn’t install itself in the menu,
I had to create the entry manually.

Okay…. what else? I still have some partitions
on my internal hard disk using the ntfs file system.
So, looking for ntfs-3g. Again, not in the repository.
A quick google found me this
http://opensolaris.org/jive/thread.jspa?threadID=97726
and, me, just reading half of the first post, headed
over to http://www.sunfreepacks.com/ and downloaded
the fuse and ntfs-3g packages and installed them.
Installation went fine, but on attempting to
mount an ntfs partition, the system froze.
(This is the point where I lost my post yesterday.)

Reading a bit down on the page, it seems, the
system crash problem has occured by other
users as well, and it seems, I should use a
the fuse version from
http://hub.opensolaris.org/bin/view/Project+fuse/Installation
instead.

But now, removing the ‘bad’ version of fuse?
It doesn’t want to leave my system.

pkgrm SUNWlibfuse SUNWfusefs
The following package is currently installed:
SUNWlibfuse FUSE library and utilites
(i386) 2.7.1 (2b58364d0997)
Do you want to remove this package? [y,n,?,q] y

## Removing installed package instance
(A previous attempt may have been unsuccessful.)

This package contains scripts which will be executed with super-user
permission during the process of removing this package.

Do you want to continue with the removal of this package [y,n,?,q] y
## Verifying package
dependencies in global zone
## Processing package information.
## Executing preremove script.
## Removing pathnames in class
## Updating system information.

Removal of
partially failed.

There is 1 more package to be removed.

Do you want to continue with package removal? [y,n,?,q] y

The following package is currently installed:
SUNWfusefs FUSE kernel module
(i386) 94e1bb59cf91

Do you want to remove this package? [y,n,?,q] y

## Removing installed package instance
(A previous attempt may have been unsuccessful.)

This package contains scripts which will be executed with super-user
permission during the process of removing this package.

Do you want to continue with the removal of this package [y,n,?,q] y
## Verifying package
dependencies in global zone
WARNING:
The
package depends on the package
currently being removed.
Dependency checking failed.

Do you want to continue with the removal of this package [y,n,?,q] y
## Processing package information.
## Executing preremove script.
Driver (fuse) not installed.
pkgrm: ERROR: preremove script did not complete successfully

Removal of failed.

Oh great, it cannot remove fuse because it’s
not installed? Well then, install that other
version? no?

# pkgadd -d SUNWfusefs
The following packages are available:
1 SUNWfusefs FUSE kernel module
(i86pc) Dev Release 12/03/2009
Select package(s) you wish to process (or ‘all’ to process
all packages). (default: all) [?,??,q]:
Processing package instance from
FUSE kernel module(i86pc) Dev Release 12/03/2009
Current administration requires that a unique instance of the

package be created. However, the maximum number of
instances of the package which may be supported at one time on the
same system has already been met.

No changes were made to the system.

So, the seccond version doesn’t want to install
because the first, crashy, version doesn’t want
to leave the system.

Remember my old Asus Laptop?
That thing, with it’s defects:
broken dvd drive and broken usb ports.

This laptop was running a server here
at my place, until I took it down a few
months ago, when the system got exploited,
(….due me not installing updates….. stupid me…)

(The machine’s networking interface was working
fine, so it’s still fine for a server.)

I haven’t looked into getting the thing running
again after that event. I tried to backup it’s data
before, using an USB-IDE adapter, but it seems,
my adapter isn’t working correctly either.

A while ago, I moved some of my old computer
equipment to my place in Eindhoven. That equipment
contained a machine that used a 2,5″ disk with an
adapter for regular IDE cable (and a bracket…)

So…. now I’ve hooked up the laptop’s HD to my
desktop machine, and I am creating an image of that
HD.

After that’s done, I might want to look into preparing
that disk to be placed back in the laptop. So, I might
want to prepare that disk for OS installation.

As I mentioned, the machine has USB problems. It seems,
doesn’t work most of the times, but sometimes it does. I
guess that’s how I was able to install it last time… but now,
when I try to boot a live cd, it seems, the BIOS can see the
USB DVD Drive, but the OS reports USB errors while
trying to enumerating the device.

As you’ve noticed from my posts the past weeks,
I’ve been busy developing a new site.

I’ve almost, well… not almost, I’ve been working
on this like possessed. I’ve obsessive coding on this,
like starting even during breakfast.
It would have been wiser to spend my time on
studying, but I was obsessed with my project.

I knew this wasn’t a good this, obsessed like I
was, but for the moment, working on the
project, seeing the results, that’s something
that makes me feel good. But I know I would
have to ‘pay the prize’ later. I knew, when I
get into that obsessive coding stage for too
long, it would backfire on me. I knew it would
make me feel worse then before, I knew it
would make me feel even lonelier then before.

Loneliness is something that’s been haunting me
all my life. Well… maybe… since 2005. It’s not
that I wasn’t alone before 2005, but I’ve changed,
somewhen in 2005. Before 2005 it didn’t bother
me, but since 2005 it does. I hate this feeling.
Being lonely.

I feel like there are only few people I can relate
to. I only know a few people who, I think, feel and
think like me. People who I actually enjoy talking to.
People who I enjoy listening to. People who can
make me feel better, people who can take this
loneliness away for a while. Unfortunately, none
of these people lives near me. And I haven’t been
albe to talk to them in a while.

I wish I knew more people like that. I wish they
would live here in the same city as I do. I wish
I didn’t feel this lonely. I want to be happy.
Is that too much to ask?

Today, I’ve done a little browser compatibility test:

Opera version 10.63 or higher is required:
older versions don’t implement the
onHashChange event.
The site will work fine with Opera 11 Alpha too.

Firefox 3.6 or higher is required.

older versions don’t implement the
onHashChange event.
The site doesn’t work well with early 4 betas,
but with the latest beta 4.0b6 and the nightly
builds, the site will render fine.

Chrome 6.0 will render the site fine.
Chrome 7.0 will have an issue with
the image error handling code. It’s
behaviour seems like a bug to me,
since when I do a traceback, the
object still exists in the in-browser
.onerror code, but as soon at my
ImageError() function is called,
it’s suddenly undefined. And as this
code worked with Chrome 6,
and other tested browsers like
Firefox and Opera.

As announced before, Internet Explorer
is officially unsupported. That doesn’t
mean I haven’t tried

function translate_to_msie_dialect(){
  var s = document.getElementsByTagName(“script”);
  var l = s.length;
  var i;
  for ( i = 0 ; i < l ; i ++ ) {
    var src = s[i].text;
    s[i].text = src.replace(/.textContent/g, “.text”);
  }
}

This code turns standard javascript into microsoft’s dialect,
well, as for as the .text vs .textContent concerns.

This works on Internet Explorer 8. Self modifying code
seems to be allowed in the Microsoft browser. When I
try it the other way around, and try to translate a
Microsoft-dialect script to Standard JavaScript, it fails.

Oh well… now…. let me get to the problem with this
script: it only works for in-line javascript, so code
that sits inside

As I stated before,
“Internet Explorer is officially unsupported at my website”,
as this browser, made by some company named Microsoft,
does’t comply to the W3C standards, one must develop
the site twice, once for standard complaint browsers and
once for microsoft browsers (and since it differs a lot
between versions of it’s browser, maybe even more)

As I’ve noticed with the BlaatSchaap site, Internet
Explorer has improved a little, and is since version 8
capable of *rendering* the html/css correctly. WOW!

I mean…. Internet Explorer 6 and 7. When I tell it to
draw two boxes, two divs, with a border, with the same
heigth, next to each other, they will turn op with
a different heigth, and it even differs between
version 6 and 7. I’ve had these issues when I
had this separated Radio BlaatSchaap site where
Eileen insisted on Internet Explorer support. As it
was just a static site, it was not that much trouble.
But still…. seeing what Internet Explorer managed
to put on the screen…..

Well…. now…. version 8. I am surprised it seems to
support XMLHttpRequest correctly. WOW! As in
older versions it seems, one must work with
*shiver* ActiveX stuff. A nightmare!

But, as expected, the site crashed immediately.
It was reporting errors about not being able to
obtain the language strings from the server.
So, I immediately suspected the XMLHttpRequest.
But that one turned out to behave as expected,
no, the problem seems to be in the processing
of the received XML data.

var xmldoc = http.responseXML;

var xmlstrings = xmldoc.getElementsByTagName(“strings”)[0];

for(i=0; i < xmlstrings.getElementsByTagName("string").length; i++){

var xmlstring = xmlstrings.getElementsByTagName(“string”)[i];

var objstring = new Object();

alert(xmlstring.getElementsByTagName(“lang”)[0].textContent)

objstring[“lang”] = xmlstring.getElementsByTagName(“lang”)[0].textContent;

objstring[“type”] = xmlstring.getElementsByTagName(“type”)[0].textContent;

objstring[“text”] = xmlstring.getElementsByTagName(“text”)[0].textContent;

objstring[“locked”] = xmlstring.getElementsByTagName(“locked”)[0].textContent;

strings.push(objstring);

}

This script appears to work on all modern browsers
except Internet Explorer. (Internet Explorer should be
concidered a modern browser when one looks at it’s
release date.)

Hopefully it gets better next version. But I will write my
website according to the W3C standards. If some 
American company decides to invent their own ‘standards’,
then that is not my problem. My site is standards complaint,
if your browser is not, don’t blaim be. 


Oh yes, some people will say, but those n00bs don’t
know better, and will use what’s pre-installed. Well,
exactly that *is* the problem why that damn piece 
of junk is so popular. And it’s also why the EU 
government forced Microsoft so implement a browser
selection program into their Operating System,
I think it’s called ‘Windows’

Oh…. enough ranting about Microsoft now… back
to randing about Internet Exploders crappy JavaScript
implementation. So, for some reason, it doesn’t execute
the script above according to what it’s told to do.


 After debugging a bit, it seems to go wrong at the
last step.   .textContent is *NOT* supported
by Internet Explorer. After googeling a bit I found
http://www.hiteshagrawal.com/javascript/javascript-parsing-xml-in-javascript

text
Returns the text content assigned to the tag elements. This property cannot be used for reading attribute content. Also this property can only be used for Microsoft Browsers
Syntax:
xml_object.current_pointing_node.text

textContent
Returns the text content assigned to the tag elements. This property cannot be used for reading attribute content. Also this property can only be used for Mozilla, Firefox, Opera Browsers
Syntax:
xml_object.current_pointing_node.textContent

So, appearently in Microsoft JScript it’s called text and
in standard ‘rest-of-the-world’ JavaScript it’s called
textContent. Do you get my problem with Microsoft?
Do you get what I mean with non-standard-complaint?

Yes, I have been complaining about Firefox before,
but that’s still different, because, the other browsers
were supporting an extra feature, but didn’t implement
a feature completely different, and with a little tweak,
the code ran in all standards-complant browsers.

With this Microsoft Browser, I will litterly need to do a
if (microsoft) then {……text} else {…..textContent}

*and* I will need to make this change *everywhere*
where I am parsing XML data. And since I’m developing
a site that is fully AJAX driven, XML parsing in JavaScript,
this will be a pain in the ass to make it Microsoft-compatible,
and will increase the size of the scripts as well, and so
increase the load times of the site as well.

So, I stick to my statement I’ve made years ago:
Microsoft Browsers are not supported my site.

So, the audio tag, I did give them another try, I didn’t
change my html/js codes, but I’ve updated my firefox.
Chrome is still the same version.

Now, like a miracle, they decided to play music,
even though they refused to do so yesterday.

So, Opera, Firefox and Chrome are capable of
playing IceCast2 streams using the Audio tag
after all.

Yet, it’s not perfect. Chrome’s tab crashed after
an x amount of time. It did so every time I let it
play the stream. Firefox doesn’t show any crash
message, but simply stops playing after an x
amount of time. So even though they passed
the first test, it seems, Opera is still the only
browser with acceptable support for streaming
music.

Next: XMLHttpRequests, their security is rather
script. A request MUST go to the same protocol,
same domain, same port. Since the IceCast2 server
is server it’s current song xml data on a different
port then the webserver, the request will fail.

Flash has a solution to allow connections do a
different port. You need to set up a server
listening on port 843. Since this port is below 1024,
you must have root access to the server to set it up.
See the link below for more information:
http://www.adobeursurvey.com/devnet/flashplayer/articles/socket_policy_files.html

In the past, I’ve been looking, wihtout success, for a
simular feature in JavaScript. Yesterday, I’ve discovered
JavaScript requires a different approach. The server
you are requesting must set a header that tells JavaScript
it’s allowed to proceed with it’s request.
See the links below for more information:
https://developer.mozilla.org/En/HTTP_access_control
http://www.w3.org/TR/cors/

I should take a closer look at the IceCast2 configuration
if it’s possible to insert a header, or else I can modify it’s
source code to include that header. I’ve been doing
some IceCast2 source patching before since there was
a bug in it’s ShoutCast compatibility code. I think I’ve
mentioned it before in my blog. I think it was something
like it was sending one newline in stead of two.

Appearently, Blogger didn’t post the full
text I typed for some reason….

I will have to rewrite everything again.

Some additions to the audio tag story
and about cross domain scripting.

So, opera, chrome and firefox will handle the
radio stream correctly now. So, it might still
be usable after all. The caching problem might
be fixed by patching IceCast2’s http response
headers. I was thinking about patching them
anyways, as I’ve been looking into some
headers related to the XMLHttpRequest
javascript object.

As, for security reasons, cross site scripting is
not allowed. The XMLHttpRequest is very
strict about his. Must be same domain and port.
Same server different port, or a subdomain is not
allowed. I have been looking at this before,
without success. Even a redirect by HTTP
header doesn’t get around this

When using flash, one must run an application at
the server that listens on port 843.
( see http://www.adobeursurvey.com/devnet/flashplayer/articles/socket_policy_files.html )
Due it listens on a port below 1024, one must
have root access to the webserver to set this up.

I have been looking for a simular thing for
JavaScirpt without success, but I found our
JavaScript takes a totally different approach.

I’ve found out about this by looking at Chrome’s
JavaScript console. It turnes our, the receiving
HTTP server is supposed to set a certain header
to tell JavaScript it’s allowed to do a cross site
XMLHttpRequest. See:
https://developer.mozilla.org/En/Server-Side_Access_Control
http://www.w3.org/TR/cors/