I am switching to blogspot.com | Wednesday, 30 June 2010 |
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
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.
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).
What happened to XRaiseWindow? | Saturday, 26 June 2010 |
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.
CRiSP Windows update (build 5866) | Tuesday, 22 June 2010 |
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.
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 fox5860* 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'
Fourier Transforms | Sunday, 20 June 2010 |
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.
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
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
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.
Windows/7 - I really like it! | Sunday, 06 June 2010 |
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.).
zencoding for crisp | Sunday, 06 June 2010 |
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).
nepomukstrigiservice | Tuesday, 01 June 2010 |
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 !