I am switching to blogspot.com Wednesday, 30 June 2010  
Link is here:
http://crtags.blogspot.com/

This makes it easier to get blogs posted from inside crisp, but also allows comments. I may mirror this blog with the blogspot, but for now if you are looking for news on crisp, dtrace or other stuff, use that link.

thanks


Posted at 23:22:15 by Paul Fox | Permalink
  What happened to XRaiseWindow() - part 2 Wednesday, 30 June 2010  

Found the solution. On KDE (and probably on GNOME) window managers, we need to raise a dialog to the top - but the WM will intercept the call and flash the taskbar. ICCCM never knew we would have a task bar.

Heres the code from CRiSP, culled from a posting on the net :

	e.xclient.type = ClientMessage;
	e.xclient.message_type = net_active_window;
	e.xclient.display = xdsp->dpy;
	e.xclient.window = win;
	e.xclient.format = 32;
	e.xclient.data.l[0] = 2l;
	e.xclient.data.l[1] = CurrentTime;
	e.xclient.data.l[2] = None;
	e.xclient.data.l[3] = 0l;
	e.xclient.data.l[4] = 0l;
	XSendEvent( xdsp->dpy, DefaultRootWindow( xdsp->dpy), False, SubstructureRedirectMask|SubstructureNotifyMask, &e );

Now, i just need to fix the problem with the wrong widget getting input focus when the dialog re-gets the focus back again.


Posted at 23:20:00 by fox | Permalink
  New Dtrace release Wednesday, 30 June 2010  

This is a small bug fix/optimisation which may help stability on newer kernels. Newer kernels erratically crash but I noticed the compiler was not happy with the disassembler (which we dont need/want) since the stack frame can be large (nicely, gcc tells me the stack size of bigger than 1024 bytes for the code in instr_size.c), so we avoid using lots of space for the opcodes (which should never kick in because we arent using the disassembler to get text output, but to get instruction sizes).


Posted at 23:18:00 by fox | Permalink
  What happened to XRaiseWindow? Saturday, 26 June 2010  
http://lists.x.org/archives/xorg/2006-January/012305.html

Search google for "xraisewindow not working".

A reason to love KDE and many other window managers, since they are deciding how the application should be managed and not the application. This is pretty appalling as far as I can tell.

Heres the deal. XRaiseWindow is the fundamental X windows call to make a window visible and float to the top. In KDE and other desktops, the X server has been deliberately broken to forward the request to the window manager. The window manager can then flash an entry on the task bar.

On my desktop, the colors are awful and I dont notice the flashing - but even if I did, I clicked an entry in my application to, e.g. bring up a search dialog, and KDE is preventing the application from working properly. So, now I need to do more work to bypass KDE.

Thanks KDE, gotta love you for doing that.


Posted at 23:49:00 by fox | Permalink
  CRiSP Windows update (build 5866) Tuesday, 22 June 2010  
Looks like I forgot to refresh the http://www.crisp.demon.co.uk/download.html website with the fix for the broken \tmp\config issues which were recently fixed. I had previously attempted to fix a nuisance issue when faced with read-only home-directories, which is what triggered the Unix and Windows issues.

One might ask why you would possibly have a read-only home directory? Well, in a production environment, it can be very useful that a home area is write only and changed only under approved circumstances. Production jobs running from a batch system may break if people tamper with .profile/.bashrc type information, so its useful to have an alternative when the state info is not savable to the default location.

Eager eyes may spot the version bump to v10.0.2a. There are only some minor changes to the macro engine to better supports hash data structures (bug fixes to handle lists-of-hashes and hashes-of-lists); some issues still remain in this area, but I stumbled on the bad ones when trying to code up some new macros.

The 'draw' macro has been updated a bit - ready for the next ramp up to add support for drawing lines between diagram elements.


Posted at 22:14:00 by fox | Permalink
  CRiSP Changelog Sunday, 20 June 2010  

In case anyone is interested in recent changes to crisp, here they are:

Sat Jun 19 00:07:10 2010  fox

5860* mac1.c: (switch) Fix match problem if the arg is an int, but the case statements are strings.

5859* packages.cr: Autodetect /usr/bin/python scripts.

5858* blog.cr: New macro to publish to Googles blogspot.com

5857* debug.cr: Add support for other symtypes.

Wed Jun 16 21:39:53 2010 fox

5856* col.cr: Fix 'col pretty'


Posted at 10:49:00 by fox | Permalink
  Fourier Transforms Sunday, 20 June 2010  
I thought I would visit a topic I know very little about - Fourier transforms. Theres a very nice tutorial on this subject here:

http://www.student.kuleuven.be/~m0216922/CG/fourier.html

It starts with a gentle introduction to what they are and how they work, but, alas, quickly gets into integrals and complex numbers. If your math is rusty and you want to brush up a little, take a browse.

Why am I looking at these? No reason - just want to improve an area I am no good at. What am I going to do with them? Probably nothing.

My HP48 calculator can do transforms - so wondered if I should know more than my calculator; Fourier transforms are the heart of many video and audio encoding packages, so its worth understand the computation power that todays tiny MP3/H.264 audio/video players have to contend with.


Posted at 10:45:00 by fox | Permalink
  ASCII Art and drawing packages Saturday, 19 June 2010  

There are many tools out there to do graphics design - both bitmap based and structural. I have never found them good to use, mainly because I am not an artist. I use "pixmap" (legacy X11 bitmap application) or MSPaint. (Windows 7 has a much better full featured application for drawing).

I am bemused by the many ascii art programs out there - a simple google search will show artwork, webtools and downloadable apps.

What I want is a "JFDI" (Just Flaming Do it!) approach to drawing, mainly to quickly describe code or process diagrams. I have started building a "draw" package into CRiSP. Its primitive, but heres some trivial artwork.

					       o
					    ooo ooo
+--------+				   o	   o
|	 |		     / \	  o	    o
|	 |		   /	 \	  o	    o
|	 |		 /	   \	  o	    o
|	 |	       /	     \	 o	     o
|	 |  +---+    /		       \  o	    o
|	 |  |	|  /			 \o	    o
|	 |  |	|/			  o\	    o
|	 |  |  /___________________________o__	   o
+--------+  +---+			    ooo ooo
					       o

This is what I typed into the command prompt:

box 10 10
box 5 5
triangle 8
circle 6
circle 6


Posted at 18:12:00 by fox | Permalink
  Lets see if the signature works Saturday, 19 June 2010  

This auto-adds a crisp signature so we can see which release is being used to publish.

This is another attempt - bit too much spacing added


Posted at 18:00:00 by fox | Permalink
  This is a blog publication from CRiSP Saturday, 19 June 2010  

Ok - this seems to work now. 20-30 lines of macro code to fit in to my idea about creating a blog entry. I can now log the blogs in my own directory and quickly publish them.

We'll see how this goes for now. May want to extend the macro to do more stuff, but at least people can now respond to my postings, which my own "blog.pl" perl macro couldnt support (not without opening myself up to security headaches).

Oops - just fixed a few bugs. See if this is better.


Posted at 17:50:00 by fox | Permalink
  Windows/7 - I really like it! Sunday, 06 June 2010  
I lied. Just fired up my Win7 system inside a VirtualBox emulator. It tells me my copy of Win7 isnt genuine. I think not.

Hopefully it will kick me off in 2 hours of use - about as much as I can stomach.

The operating system is just too dull.

Am taking a look at Android...not because I think it is better than any other OS, but because I am contemplating a project underneath it. But it has too many horrible dependencies (like Java, and Java 1.5 at that).

I think I might go back to MacOSX/Cocoa - because at least that is a sane environment (well nearly).

Maybe I will do a series of articles on what is wrong with these operating systems, from my point of view. (Do I think I could do better? No.).


Posted at 21:58:06 by Paul Fox | Permalink
  zencoding for crisp Sunday, 06 June 2010  
I stumbled across an interesting technology for command line types - Zencoding.

http://code.google.com/p/zen-coding/
http://mattn.github.com/zencoding-vim/

Its a very simple way to describe a nested HTML structure using an almost cryptic command line. The above links, especially the VIM link are very good at illustrating what you can do.

Now, CRiSP has support for this. It complements the existing HTML template expansions - and I need to tidy it up a little more, but you can do some complex things.

The source is located in the distro (src/crunch/zencoding.xml).


Posted at 21:27:25 by Paul Fox | Permalink
  nepomukstrigiservice Tuesday, 01 June 2010  
What is it? Its stuff I dont want near my computer. After a reboot it goes off and indexes your hard disk. You would be hard pushed to figure out what it is from its documentation or the web, but anything with nepo on it doesnt need to be anywhere close to my computers.

Its a cpu, memory, electricity hog. My laptop was frantic running that to play catchup. Kill -9 and "rm /usr/bin/nepomuk*" did the trick. Now my laptop is quiescent.

I find it infuriating trying to figure out what this is - apropos, apt-cache dont tell you and from what I have read on the web there are lots of debates about whether you want/need this.

I dont.

So there !


Posted at 20:32:39 by Paul Fox | Permalink