Thursday, April 03, 2014

Graphs: Improved Grid and labels

Lots of new stuff in OresmeKit, the graphing toolkit for GNUstep and Mac! As an Example, an advanced dashboard based on DataBasin that displays the system load of Salesforce.com. It is not generally available yet, but I hope it will be!

Grid-sizing is now selectable so it gets spaced in 1K or 1M intervals (depending on the data-range available), like it is used in both screenshots in this example.

 - (void)setYAxisGridSizing:(OKGridSizing)sizing;

Can take now: OKGridConstantSize, OKGridKiloMega

Also, one can decide to draw Just the label of the minimum and maximum value or a label for every grid:

- (void)setYAxisLabelStyle:(OKLabelStyle)style;

Can take:  OKNoLabels, OKMinMaxLabels, OKAllLabels

1000-unit Grid



To complement this kind of visualization, a new kind of Label formatting can be used. In the example above, the numbers are plain, 10.000 is written as such, in the example below, it is formatted as 10K, if we were using 10.000.000, it would me 10M

1000 - grid with K formatting

Monday, February 17, 2014

Tailoring OpenBSD for an old strange computer

I have an ol' OmniBook 800CT. A small, interesting computer, for its time, extremely advanced!
Small form factor, but still a very nice keyboard, something unmatched on modern netbooks. The unique pop-out mouse. The series started out with 386 processor, b&w display and ROM expansions.
The 800CT is one of the latest models: same form factor, SCSI connector, but color screen (800x600) and a hefty Pentium 133Mhz!
But only 32 MB of ram (the kernel report 31 of real mem, 24 avail mem)

Original 5.4 kernel: 9.2M
Custom kernel: 5.0 M

This shrinkage is quite hefty! almost 50%! More than raw disk usage, this new kernel boots faster and leaves  more free memory. Enough more that X11 is now almost usable

How can this be achieved? essentially by removing unused kernel options. If you remove drivers which you know you don't need because you don't have the hardware (and won't use it, e.g. you know you won't plug-in a certain card in the future) then you configure it out, it won't be built and it won't get in your kernel.
On an old laptop with no expansion except the ports and the PCMCIA port it has, this is relatively easy.

To build your custom kernel, follow the OpenBSD FAQ.

The main theory is to take the kernel configuration file, skim over it line by line it and see if you have the hardware, which you know by checking your dmesg. Dmesg shows which devices and drivers were loaded.Remember that you do not modify GENERIC, but a copy of it.

You can automate this with a tool called dmassage: it will parse your GENERIC configuration and produce an optimal tuned version, however it will not work out of the box.
Why? there are drivers which do not compile if other drivers are not present.

I'm unsure if this is really a bug, in my opinion it is at least "unclean" code, however since mostly this kind of extreme driver-picking is not done, it is not fatal and probably won't be fixed.

 If you remove all drivers at once, you won't easily find out one which one breaks, so my suggestion is to remove them in sets. One by-one is surely too tedious, since for each you need to make a build.
  1. remove X drivers
  2. build, if it works, copy the configuration file as a backup
  3. test the kernel, optionally, by booting it
  4. continue removal

Thus, in case of breakage, you can narrow it down to a less options.

If your mahcine doesn't have a certain bus, you may remove all drievrs attached to each. But proceed from the leaves, not the trunk: gradually remove the peripheral drivers before removing the bus support.

In my case, I found that an unremovable driver is:
et*    at pci?                # Agere/LSI ET1310


Remember that you are running an unsupported kernel, if you want support for a problem, better try it with the original kernel, of which you should anyway for safety retain a backup copy during the iterative building process.

Friday, February 14, 2014

GAP moves to SVN

The GNUstep Application Project transitioned its source repository from CVS to SVN.

The sources were migrated with full-history and the same directory structure.

Connections detail, at the project's page about svn: https://savannah.nongnu.org/svn/?group=gap

Browsing can be done here: SVN Surfing

The CVS repsoitory will remain open for some time, in case something went wrong during the migration process, but it is not official or current anymore.

Thursday, December 12, 2013

GWorkspace, how to easily mount/unmount volumes

GWorkspace allows for easy mounting and unmounting of volumes (disks, usb sticks, CD-ROMs) like you would do manually on console, without the requirement of daemons or other tools.

Here is how.

First, be sure your underlying operating system is correctly configured to allow you to do that. I'll show as example how I configured my Debian system.

Your current user needs to have the permissions to mount the volume(s), this is usually done by being part of the correct group. For Debian we find cdrom and floppy as ready groups

cdrom:x:24:multix

The predefined mount-point for the cdrom is /mnt/cdrom, since I usually handle with USB sticks I added a mount point for it:

$ ls -l /media/
total 8
lrwxrwxrwx 1 root root    6 Jan  1  1970 cdrom -> cdrom0
drwxr-xr-x 2 root root 4096 Jan  1  1970 cdrom0
drwxr-xr-x 2 root root 4096 Nov 27 14:01 usb


Now, let's add the correct lines to /etc/fstab for our usb entry. The cdrom entry is usually already configured by Debian.

/dev/hdc        /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/sdb        /media/usb      auto    defaults,users  0       0


I auto shall determine the file system automagically, while users allows for user permissions for the mounted files. You can check if everything is configured fine if you can "mount" from the command line with your current user.

Then open SystemPreferences and configure the managed paths as shown here:

SystemPreferences - Mount points
Configure the mount points for removable media, here I have enabled the cdrom and the usb mount points. The mtab path is currently ignored by GWorkspace, so don't bother and the default value is anyway correct for Linux.

Now, in GWorkspace we can select Check for disks under the Tools menu.
GWorkspace - check for disks
If everything goes well, voilĂ , your volume will get mounted. It will appear on the destkop if you have the Desktop enabled and you can show its content. In any case it shall be visible in the File Viewer in its mount place.

Usb stick contents




If all options are set correctly as suggested, the volume is readable, writable as you can check with the Attributes Inspector. Also we can open the .zip file with Zipper easily.

Zipper and Attributes


To unmount a volume, just drag its icon to the Recycle Bin.

GWorkspace, fixed mount bug on Linux

Fixed a nasty bug (I was using the wrong macro) that was causing GWorkspace not to mount removable volumes (like an USB key) on Linux.

Sunday, November 24, 2013

Graphos supports Cusps!

Since many years, Graphos supports nice-looking and well known bezier-paths. However it always supported, by the design inherited by GDraw, symmetric handles. Since the handle points define the curve's tangent to the control point, there will be no discontinuity. That is, each control point's handles are equal and symmetric, allowing for smooth curves like here:



I added now support for splitting handles and making them a-symmetric, thus being able to draw cusps in a line.

While in path-editing (white arrow) a contextual menu will allow you to choose what kind of type the node is.

To support this new kind of information which is associated with each node, I changed the file format. Paths are now saved as a series of control points with their associated type, instead of the older format that was essential PS data, where each line-to and move-to was described. The latter format split information about each control-point between left-and-right and while more compact, did not allow to add the new information.

Anyway, here the result, left a smooth path, right the same path where the central point has been "split".





Note to self: this will allow to draw Graphos' own logo in Graphos much better. Something to do the next time I'm bored!

Saturday, November 23, 2013

Graphos 0.5 released

The GNUstep Application Project announced a new release of its vector drawing application, Graphos on Oct 15th.

Improved text object and handling, improved selection handling (e.g. for multiple objects that are group selected) and many other bugs. The format is 0.4 compatibile, although text object might be placed differently if loaded from old files, due to the old bug.

Tuesday, September 10, 2013

WindowMaker-style menus in GNUstep?

Did you know it was possible?
I got that question asked more than once!
Or horizontal menus? or Macintosh-style?

Well the obvious way is to install theme enabling this feature. However, you may want to tweak just a certain feature or customize the default look.

Now you need to set a certain default. If you do not want to fiddle with the defaults write NSInterfaceStyleDefault GSWindowMakerInterfaceStyle, then the "Defaults" preference panel will be your friend!
The Panel has been long around a long time! It is easy to enable things. But once you need to set 

I just completed two useful enhancements in System Preferences:

  • New editor type for fixed-list choices, as is the case for the interface styles!
  • All values can have now a localized description!






You can see the new editor in action with WindowMaker style menus which, by the way, are more convenient when using the "stick" pointer instead of a Mouse, as found on ThinkPads and certain other laptops.