kjs now with more emscripten-qt fun!

April 12th, 2013

Just a quick note, I finally got Emscripten-qt working with khtml/kjs!

kjs-emscripten4

transformations

kjs-emscripten5

painterpaths

You can find more demos on
http://vps2.etotheipiplusone.com:30176/redmine/projects/emscripten-qt/wiki/Demos.
Well not all demos currently work with khtml/kjs and the speed is… slow, but some work! ;-)

kjs finally under 1000 fails!

January 30th, 2013

Hello again planet,

I finally got time to konquer the kjs world once more. I was kinda busy in the past month and I still am. Many month have past and kjs was still over 1000(1004) fails in the ECMAScript Testsuite. But finally I broke the 1000 fails border, with implementing Function.prototype.bind, there are now under 1000 fails, even better also under 900! „Only“ 895 fails now.

ecma-under-1000-min

But if you look more closely at those 895 fails… ~700 are from strict testcases, which is like no gain for the user, ~100 are some not deletable properties of the standard builtin Objects, minor gain in some special situations for the user, and ~50 are because of some special call usage with null and undefined, maybe minor gain. So overall kjs is not in a bad shape…. function wise…

But sadly… I couldn’t commit any patches, they are still waiting for review, so don’t be surprised if your konq still shows 4147 fails.
Anyway… hurray! personal goal reached! My patch-bomb makes the fails go down from 4147 to 895 :)

Why kjs can not rule the web

August 31st, 2012

Dear Planet,

I feel like writing a bit about what I did for kjs, only about the new features (ignore bug fixes for now).

Lets start with the things I already got in a released version:
- Array.isArray
- Object.prototypeOf
- Object.keys
- Object.getOwnPropertyNames
- String.trim, trimLeft, trimRight
Not that much hm?

Now lets look at the Stuff I am trying to get in for 4.9.2:
- JSON.parse
- JSON.stringify
still not much…

And the rest with is implemented but still needs cleanup, or review, or something else to get in:
- Object.getOwnPropertyDescriptor
- Object.defineProperty
- Object.defineProperties (blocked by Object.defineProperty)
- Object.isExtensible (mainly blocked by Object.defineProperty)
- Object.preventExtensible (mainly blocked by Object.defineProperty)
- Object.seal (mainly blocked by Object.defineProperty)
- Object.isSealed (mainly blocked by Object.defineProperty)
- Object.freeze (mainly blocked by Object.defineProperty)
- Object.isFrozen (mainly blocked by Object.defineProperty)
- Object.create (blocked by Object.defineProperty)
- Date.toISOString
- Date.toJSON
Ok, thats a bit more.

With the already present functions that would nearly complete ECMAScript Edition 5. Doesn’t sound bad huh?
But still, with all those new functions (and some bugfixes), kjs has no chance to rule the web-world.
Why? Its not because it is to slow, or some other major bugs that keep websites from working. The reason is much simpler…
Let me show you the problem by (I think) simple js code, taken from battle.net (reduced).

var version;
if (browser == 'ff')
version = /firefox\/([-.0-9]+)/.exec(userAgent);
else if (browser == 'ie')
version = /msie ([-.0-9]+)/.exec(userAgent);
else if (browser == 'chrome')
version = /chrome\/([-.0-9]+)/.exec(userAgent);
else if (browser == 'opera')
version = /opera\/([-.0-9]+)/.exec(userAgent);
else if (browser == 'safari')
version = /safari\/([-.0-9]+)/.exec(userAgent);

UserAgent.version = version[1].substring(0, 1);

“version” is still undefined for khtml/kjs. And trying to access undefined[1] will cause an exception, so thats it for kjs, the exception is not caught and all the following javascript code will never be executed.

So the main reason is, kjs/khtml fails at the browser detection…
This could be solved if they add a sane “else”. Talking about sane “else”, there are really many websites that have an else in this case. But many of them have an insane else, which means hitting non-standard-javascript code, code that only one browser ever supported.

Maybe you are thinking “oh come on.. that only happens on some exotic websites”, and I wish that was the case. But its not. I looked at SOME websites why they don’t work with khtml/kjs, from the javascript point of view, and for the last 30 of them this was the case, and thats for some pretty big websites.

NOTE: Not for all websites its so easy to find the core problem, sometimes it looks very different at the beginning.

So thats it, no matter how fast or how bugfree kjs/khtml will become, it will never work this those websites.

P.S.: I know you can change the browser detection in konqueror, but that is not a solutions for the users.

When I get bored…

June 18th, 2012

Its Saturday night, Germany just won again Denmark (soccer), and I am bored, so what can I do?

Lets code something fun, like I used to do back then, just to see if I can do it. And there is something I always wanted to do but never did. A webcam-ascii-dcc-chat.
And here it is:

As I always do the konversation DCC stuff this was no problem, but even the webcam and ascii part, thanks to aalib and HAsciiCam, was really easy. But this will never end up in a real konversation, or at least I won’t do it, because beside from the fun fact its utterly useless. So no gain, only pain maintaining it. If you still want to try it
git://anongit.kde.org/clones/konversation/buschinski/konv-hacks.git

Thanks to my weak git rebase –interactive skills I managed to the change the author of my
“Implement DCC HasciiCam” commit, I didn’t even know that this was possible but if you can tell me how to change it again I would be happy :)

In other more sane konversation news. Konversation(currently only git master) support SASL for quite a while now and we have a very nice userbase page about how to use it.
http://userbase.kde.org/Konversation/Configuring_SASL_authentication. There are more new features, but this might be the most important one for all mobile-freenode users.

kjs, its over 9000!!

March 25th, 2012

Its over 9000!!
Over 9000 tests passes in the ecmascript test :)

Yes, I am still working on kjs, not as fast as I expected to be but… it’s coming along :)

Plus Bonus: We have more than 100 tests that kjs passes and firefox-11 & rekonq(with Qt 4.8.1 webkit) fail. Most of them are related to Object.defineProperty(array, “length”, ..) which firefox simply does not really support. I am not really sure if it is used in real world anyway.
NOTE: this is not array.length = foo;

But yes, as you can see kjs still has over 2500 fails and we are not faster. So kjs is not yet teh javscript thing, but please grant me this tiny moment of joy :)

Yay for kjs/khtml

February 28th, 2012

Just a quick note: kjs/khtml can run the ecmascript tests :D
previously it would just freeze in test S.15.4.4.12_A3_T1 (Bug 276629)
Fix is currently in review, so not yet commited and may need more cleanup.

Here the screenshot you are all waiting for

The results are currently “not so good”(compared to other browser), but I hope I can improve them :)
And now time for a *happy dance*

My quick wish for 2012

January 11th, 2012

My wish for 2012 is that every developer of <insert your project here>, assuming you use your own project, should use its own project with debugging symbols and enabled asserts.
If you feel sporty enough you can even enable asserts in your underlying lib.

That’s all, make real use of asserts, detect bugs early and we can all live in a happy world!

HINT: debugging symbols need not always mean that asserts are enabled, and please note that Q_ASSERT behaves different from assert.
Even if you are sure that you already do that, please do me a favor and double check.

I am writing this because some projects seem to ignore asserts completely. And I am not talking about super special situations… more like start with nearly default config -> hit assert + crash.

My personal top programs of 2011

January 9th, 2012

In case you didn’t notice it’s already 2012!
Time to honor my personal top programs of 2011. Yeah I am a bit late, this is usually done before the end of the year.. but I had to think about it very carefully! *caught*

Top Dominator – KDevelop
KDevelop really is teh IDE. And now even for python!

Top Coloriser – Krita
Krita, what a wonderful painting and illustration suite. I am not an artist but this program really feels like this is how a painting program should be. I even brought a graphics tablet for it. And even if you don’t know what to draw, or can’t draw at all, playing around with the different brushes is fun enough :)

Top Underdog – Calligra Words
Calligra Words, it was so much fun watching how much it has improved since koffice. It’s not perfect yet, but it already displays *.docx way better than LibreOffice (compared to LibreOffice 3.4.3, “for my needs, may be different for you”). The editing part currently doesn’t seem as good, but I am sure it will improve 2012 a lot!

Top Playground – Blender
Yeah not a KDE program, but really worth mentioning. Blender, also improved a lot since 2.4, I would say since 2.5 its finally “useable” for me. I only use it for playing around, first for physic simulations and since 2.61 it offers more nice features like cycles. Again I am no artist, but I am sure a real artist could do amazing things with blender. Here is a little evening project (with the help of a nice tutorial) which was fairly easy to do in blender 2.61 (blender internal render, no cycles).

If you don’t like my personal top XYZ of the year, or have some more, feel free to leave a comment :)
HINT: they are moderated

Konversation 1.4 Beta 1 released

November 4th, 2011

Yeah! It’s been quite a while but finally Konversation 1.4 Beta1 is here! The first pre-release of our next major release, with many changes and fixes.

A brief selection of highlights:

  • URL and email detection in text views has been rewritten from scratch, greatly improving the handling of various types of URLs and the contexts they might appear in.
  • Extensive improvements to IRC formatting code handling, including the return of background color support.
  • Extensive, sometimes full rewrites of user interface elements such as nearly all context menus, the URL Catcher and the Warning Dialogs system for a long list of user interface improvements and bug fixes.
  • Improved SSL connection behavior.
  • Translation support and various other improvements in several bundled scripts.
  • Expanded Python scripting support via the introduction of an API support package.
  • Support for more IRC numerics.
  • Various bugfixes to input line command handling and connection behavior.

A full list of all new features and changes is available on http://konversation.kde.org/.
I really really love those long and detailed changelogs. :)

In case you are still using Konversation 1.3.1 and experience strange crashes since Qt 4.7.4 update, I highly recommend you to use this 1.4 Beta 1. Or if you really want to stay with 1.3.1 you could fetch the latest commit from the 1.3.1 branch.
Please also note that we have at least one minor style fix for Qt-4.7, so again update is recommend.

bkodama v0.3 released

November 17th, 2010

Hello planet,
maybe you have already heard of my simple-minded kodama

it wanders on your desktop and disappears again. In case you never heard about it you might want to read this or just go ahead and install it from here.

The good news version 0.3 is released with many bug fixes and the long awaited option to control the time between the appearance. It is still just a random value, so you basically only set the maximum, wouldn’t be fun otherwise ;-)
The only new major feature is the hourly special event, the kodama appears every hour and tries to do something cool, it will not happen every hour and has a very low chance to successfully happen. Some of you might think it is not very kodama like to do something like this, but don’t fear you can disable it in the settings.

The bad news bkodama is dead, errr no it isn’t. But let’s say I learned quite a bit about plasmoids and animation and the current codebase is horrible ugly. Please don’t look at it, it will only cause serious headache.
So it is not dead, but I need to start from the scratch, for the greater good. I have great ideas about how to make it much nicer and easier to extend. Well, it’s not extendable at all currently…
I have a vision and I know how to realize it, whats left? Oh yeah… time, so don’t expect anything anytime soon, but it will happen :)

Now it’s time to try out bkodama v0.3 and I hope you enjoy the release :)