Add this blog to Del.icio.us, Digg or Furl | Create Watchlist for this blog

Archive for the ‘programming’ Category

gedit syntax highlighting for the Google Go language

Wednesday, June 16th, 2010

Since I am writing lot’s of Go code lately I have configured a syntax highlighting description file for gedit. I am pretty sure, that it is not only for gedit, but for all of the gtk apps in gnome. To install it, just copy the go.lang file to your /usr/share/gtksourceview-2.0/language-specs/ directory.
Actually I have tested it only for a debian 5.04 installation - but I am pretty sure it will work on Ubuntu, too.

Download: download go.lang for gtk go.lang

I f you don’t have a /usr/share/gtksourceview-2.0/language-specs/ directory, check where your gnome is based and search for similar files like java.lang or c.lang. Then install go.lang and restart gedit - (more about this on gnome.org)

Please report any bugs here! Thanks.

NOTE: I am sure willing to contribute this file to the gnome base distribution, but don’t know how… so please feel free to do that - and please keep me informed. Thanks.

To have gedit detect automatically which highlighting to apply to go files, it is necessary to map a mime type. If go doesn’t yet have a mime type specified then you need to create a new one. It is good practice to also put the custom user mime types in a local user directory. For the mime type database this is: ~/.local/share/mime. You will need to add a new mime type specification file in the directory ~/.local/share/mime/packages (create it if it doesn’t exist yet). Add a file go.xml in that directory which looks like this:

<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
  <mime-type type="text/x-go">
    <comment>Go Source</comment>
    <!-- more translated comment elements -->
    <glob pattern="*.go"/>
  </mime-type>
</mime-info>

Important here is to specify a type (text/x-go) and the glob pattern to match the file to the mime type. Once you’ve created the file, go to the directory ~/.local/share and run: update-mime-database mime. The mime types should now be registered and after a restart of gedit your language should automatically be mapped to the correct files.

Starting a Go programming promotion

Wednesday, November 25th, 2009

On www.gommunity.de I am starting a Drupal community page to support the new programming language “Go”. I’d like to provide a platform for early adopters, for knowledge exchange and discussions about that language.

Please visit our Drupal platform about Go programming!

New MIMEMailPHP Version 2.2 released

Friday, April 17th, 2009

Users told me they had problems with some online mail clients (like gmx and gmail) viewing mails sent with my MIMEMailxPHP4_V2 PHP class when cid (base64 coded inline) images are contained.
This bug is fixed now, you find the current (2.2) Version for download (it’s open source) here.

Testing before productive use is strongly recommended!

Next in queue

Thursday, March 19th, 2009

EQUIRA logo
Actually I’ve lot’s of projects in my “web-queue” - but my favorite is EQUIRA. EQUIRA is a stock chart analyzer C++ software I wrote in 1999. It’s full of AI and FUZZY and GA (that’s Artificial Intelligence, Fuzzy Logic and Genetic Algorithms).
With the today available hosting technology and prices it’s ready for a public offering as webservice and a Drupal frontend for subscribers.

Stay tuned…

Microsoft is still fighting the Internet

Saturday, February 21st, 2009

Today I read an article about IE8, the MS Internet Explorer that ships with Windows 7 (successor of Vista). The good news is, that it survives the ACID2 test, the bad news is, that it fails the ACID3 test embarrassing. While Firefox, Safari, Opera and Chrome meet about 70 to 80 of the necessary 100 goals, the IE8 meets 20/100.

So, the question is: Are Microsoft programmers lousy? Or is Microsoft still offending the Internet as far as possible? While I don’t think a great deal of them, I am sure they could do it better - BUT I am almost sure, that Ballmer is not willing to believe that times change. Fat client computing is dying, all what Microsoft does with their villainously products is delaying the agony.

They’re hurting the substantial progress of our society - just for their selfish vegetate. And they’re hurting us web developers by forcing us to support their crap.

Another new Drupal 6.x project

Friday, January 9th, 2009

isartal.info Screenshot Thumb

Yesterday we went to public with another very complex Drupal 6 project. It’s kind of a “local collaboration” platform with classical news attributes.
Pretty much of the business is done in a self-developed module but we also use lot’s of contributed modules from Drupal.org:

cck - to create content types
checkbox_validate + legal - for registration issues
computed_field - for workflows and hidden attributes
content_taxonomy - for taxonomies in cck types
event - for events :-)
fivestar - for content rating
flag - for flagging content for several reasons
flatcomments - to avoid comment-threading
image - for images
masquerade - for testing
mass_contact - for mailings
nice_menus - for some dropdowns as second level navigation
pathauto - for nice URLs
privatemsg - for user postboxes
quicktabs - for tabbed blocks in the sidebar
user_stats - for some forum enrichments
views - for customized views on cck types
votingapi - for fivestar
workflow - for workflows like published purchased content

… puh, that’s a lot - and there are still some modules missing.
Maybe you wanna take a look at isartal.info?

Google Chrome - Google’s new masterpiece

Wednesday, September 3rd, 2008

Googles next masterpiece
(Illustration by Google)

Today Google released a new browser. Naturally I’ve downloaded it immediately (for Windows XP, here) - and it’s fantastic.
First impression: So so very fast, actually all pages are just there, there’s no progress to recognize.
Second impression: It looks different, it looks cool.

On the downside:

- There are no beloved plugins existing (firebug).
- Is Google watching me?

=> Think I’ll use it for browsing next time, but will still use Firefox for development (will never again use MS IE)

Proposal for a CSS ancestor grouping syntax

Wednesday, July 23rd, 2008

What we need

I am missing a syntax to apply a common ancestor to a set of rules. As far as I know, there’s no such concept in CSS selector syntax.

With the increasing usage of CSS definitions to style HTML markup, CSS files grow bigger and bigger. With this it’s getting more and more complex to find rules that apply the a special element and/or to have one’s code structured properly. When ie8 will support the more sophisticated locators like adjacent siblings or attribute selectors the locators and files likely will continue to grow.
Also CSS gets used in situations where you import content from several providers to display it inside one “mashup” site or (like in iGoogle or the Vista desktop) as “snippet”. In this situation one needs to separate the CSS rules of the different providers from each other and from the mashup’s home style.

Basically I want to grab remote content then wrap the grabbed sourcecode into a i.e. a <div id=”#GG”> and integrate that code together with it’s CSS in my site (or fridge display or whatever).

How it could work

The solution to this would be a ancestor grouping concept, i.e.:

ancestor "#GG" {
a { color: black; }
p { margin-top: 3em; }
}

This syntax should then expand to:

#GG a { color: black; }
#GG p { margin-top: 3em; }

Far more added value would be provided by the following construction:
ancestor "#GG" { @import(google.com/styles.css); }

or inside the HTML markup:
<link rel="StyleSheet" href="http://google.com/style.css" type="text/css" ancestor="#GG">

I think the goal should be clear now. (more…)

CSS Selectors - Short Reference

Monday, June 23rd, 2008

This is a “short as possible” reference for CSS selector syntax. Intended audience should be very familiar with XHTML, DOM and CSS Styling.

Basics

Type selector
Select all HTML elements of a special type.
Example: em {font-weight: bold;}
Class selector
Select all elements with a given class.
Example: .classname {font-weight: normal;}
ID selector
Select the one element with a given id.
Example: #idname {font-weight: normal;}
Concatenator
Select HTML elements of special type only with given class/id.
Example: em.classname, em#idname {font-weight: normal;}
Universal selector
Select all elements.
Example: * {padding:0;}
Descendent selector
Select all elements that are lower down in the DOM tree (descendants).
Example: p em {font-weight: normal;}
-> Applies to all em's within p's.

Advanced

Child selector
Select all elements that are children in the DOM tree (direct descendant).
Example: p > em {font-weight: normal;}
-> Applies to all em's directly within p's, not supported by ie6 and below.

Adjacent sibling selectors
Select all elements that are on the same DOM level in the same DOM subtree
Example: h3 + p {font-size:80%;}
-> Applies to all p's that "belong" to a h3

(more…)

Favorite current project

Wednesday, June 4th, 2008

My favorite current project is opentimesheet.org.
It’s about efficient online time registration and recording.
Last 14 years as freelancer I was using a horrible number of time capturing systems. Actually I am using about three at a time now. There are so many of them, and most companies invent their own - starting with excel - ending up in a very special time consumptive “solution”.

Break the rule - join the new open source project!