You are browsing the archive for Linux.

Open source project website

April 2, 2009 in .NET, Cocoa, Delphi, Elements, Free Pascal, Linux, Mac, Mono, MonoDevelop, RemObjects, Tools, Visual Studio, Windows, Xcode

For a while we’ve been looking for a good way of working with the open source projects we’re working on but never could find a good community website that was simple enough to install and maintain, but had all the features we needed.

So now we setup a simple website at for 3 projects:

  • ShineOn the delphi/Win32 compatibility library for Delphi Prism
  • Pascal Script the free script engine for Delphi
  • C# to Oxygene a new (unofficial) project I’ve been working on for a while to convert C# code to Oxygene.

Comments on the website appreciated, it’s not definitive yet but I like it so far.

Migrating from Delphi to Lazarus

September 9, 2008 in Delphi, Free Pascal, Linux

Not to me on time, even to this boring, but again I got a challenge on my shoulders is really difficult to meet.

The fact is migrating an application from Delphi to Lazarus is easy, by the way, but specifically this beautiful Delphi library im wornking on make a heavy use of Windows API messages…

Reviewing the steps to begin to migrate an application to Delphi Lazarus are very simple.

1) Create a new structure, independent of the one containing the Delphi application, so that you touches does not affect your Delphi application (is basic but very few do it).
2) For each Delphi project file (only for the dpr)

makepasx Proyect1.dpr

3) For each .pas file executes the following command

makepasx unit1.pas

4) For each delphi form execute this command

dfmtolfm unit1.dfm

5) Lazarus uses a resource file for each form, with extension lrs. To generate:

lazres unit1.lrs unit1.lfm lazres unit1.lrs unit1.lfm

Made. We already have everything we need to take the first step in our journey of 1000 miles (the more important).Now just compile and see what happens.

Usually some functions or calls vary somewhat between Delphi and Lazarus. It could put some of them here, but it makes no sense because they are many. Instead I will give you a way to resolve discrepancies in the simplest way, or by various methods that generally make me reach the correct result:

1) If you can not find an identifier or method just look in the sources references in the sources of Lazarus. Sounds silly? Is the simplest way, this way you can know that unit is defined and objects that use it.

2) If the identifier or method does not exist in lazarus, go to the forums Lazarus and looking for. Sure someone before you crash with that stone and found how to setp out ;)

3) If none of that works, the friend google comes to the rescue. You might try Lazarus discrepantname or add the word replacement, and so on.

Finally, as the case may happen in the library that attempt to migrate, that there are too many calls to the Windows API. In this case point 2 and 3 are generally much help.

4) Subscribe to groups Lazarus and fpc. Who better than those who have already been there can help you? Even if a feature is not suported they will help you to implement it and produce the miracle of Lazarus and fpc library get enriched. :)

In other deliveries i will comment about my progress in the conversion and as the problems were resolved.


Delphi 2007 IDE incompatible with Virtualbox

April 8, 2008 in Delphi, Linux

Bad news. VirtualBox version 1.5.6 eats 30-45% of cpu time when you start Delphi 2007 IDE.

The problem is related to a need for the IDE of higher timer resolution than provided by the OS (Ubuntu in my case).

According to a developer of Virtualbox:

‘Your guest uses a 1kHz timer, whereas your host probably just provides 250Hz resolution. so 1.5.6 uses a rather expensive way (busy waiting) to emulate proper timing. there isn’t much that can be done. 1.6 (whenever it’ll be out) will be slightly better, but probably not all that much. try to find out what windows app requires that 1kHz timer resolution. by default windows xp…
…just uses a 100Hz timer. ‘

Just to warn to Virtualbox + Delphi users. There’s no workaround rigth now. :-/

BTW, VMWare don’t suffer of that ‘problem’.

Using Ubuntu like host OS

October 1, 2007 in Linux

Hi finally take the trip and after a lot of troubles with D2007 Updates and XP i prefer to use a Virtual machine running XP on a Ubuntu Box.

That way will guarantee after any problem i will always have a backup copy of a working VM , and can work again in just a few minutes.

The last time i try that, i must say, was a bad experience. VMWare lack of of a good communication between Host OS (LINUX) and VM. That was at beta 4 of VMWare i think. And the virtualizer options lack of many other features.

I hear about VirtualBox and think is a great chance to give a try.

I have to say i was surprised. VirtualBox is a OS app wich integrate lovely with Ubuntu Desktop. BTW, ubuntu grow up and is a really ‘just work’ distro. I have a HP dv9233cl notebook, and ALL the hardware works out of the box, except the web cam, working thanks to a easy to install core module.

VirtualBox offer a seamless mode, and i take some pictures from you.

I hope you like.

D2007 Update 3 Start.

Delphi 2007 ubuntu Box

BTW, the image on the background is a forest in the Patagonia Argentina, taked in my last vacation

D2007 Coding a Remobjects Solution

Delphi 2007 Ubuntu box 2

Any comments apreciated.

Going from Windows only to anywhere with RemObjects.

June 10, 2007 in Data Abstract, Delphi, Free Pascal, Linux

My current challenge is to migrate a RemObjects SDK server working in Win32 Delphi/VCL to Linux.

I am analyzing the technology to use. A few months ago I had only one option: Chrome/Mono.
I am not displeased because I now have an additional option and, because of it, I am pleased with RemObjects. If there is something that defines the technologies that RemObjects offers, it is in giving options to the developer.

Provided that Remobjects’ next version named ‘Vinci’ brings support to Free Pascal Compiler, now I can choose to use this tecnology or Chrome/Mono.

The server to migrate is a RemObjects SDK server working 24x7x365. The tasks that it fulfills are sophisticated and are mission critical:

  • Control of industrial hardware in real time across serial ports (using Async 32).
  • Control of industrial hardware in real time across ethernet UDP (using Synapse with self build threading).
  • Remote access to information and business tier (RemObjects SDK / Data Abstract).
  • Visualization of objects used in the industrial control through RemObjects’ message tiers.

All that stuff is separated in own and shared tasks, with communication channels via RemObjects SDK version 4.

Stay tuned, I will present a report of my selection and the justification.

My first step will be to migrate from Remobjects Version 4 to VINCI, the new and exciting technology offered by RemObjects.

Meanwhile, I will cetainly listen to ideas. Open for discussion!

Profile photo of fischer

by fischer

Chrome goes Linux

June 5, 2007 in Elements, Linux, Mono

This is my first article in this blog, but I hope many more will follow – Chrome and Vinci is a great experience for me, and I really would like to share this experience with as many of you as possible.

I have been developing Linux server applications with Kylix, but after this product died, I was at a loss how to continue. But soon the Mono project caught my eye, and after my first lines written in Chrome, I knew what to do…

As Delphi still does not support .NET 2.0 yet, a few weeks ago I decided to leave behind my .NET 1.1 tries with Delphi and concentrate on Chrome as my main development language. Coming from Delphi’s Object Pascal, the first steps with Chrome are taken quickly, and the additional power of full-blown .NET support is great to discover deeper areas…

What attracts me additionally is the ability to create RemObjects SDK servers for Linux, written in Chrome, running on Mono. My first small Linux Data Abstract server is already up and running, and I am currently working on an ASP .NET web application, acting as a Data Abstract client. All this stuff is currently running very well, and I am looking forward to every minute I can spend on this project. It’s not only great technology – it’s pure fun!

Vinci Part #7 – “Internet Pack” for Delphi

May 4, 2007 in Data Abstract, Delphi, Free Pascal, Linux, Mac, Windows

When we started working on the Super HTTP Channel for Delphi, we soon realized that none of the TCP/IP socket wrappers we currently use were a good idea for the server part of the channel, as Indy, Synapse and BPDX all use one thread per connection – which would amount to 2 thread per client and wouldn’t scale very well.

What we had to do is write our own socket wrapper that would work 100% async, like the .NET code does, and still would scale properly. Our new socket class uses Begin/End pairs for every method that would be blocking and accept a callback as a parameter for when the data was available, the connection accepted or the socket was ready to send data. The actual implementation uses the portable “select” call on 64 sockets at once, keeping the thread usage down quite a lot. On top of that we wrote our own simple Http server class, using only async callbacks.

We didn’t tie the Super HTTP Channel to this socket implementation, however, instead we wrote an abstract implementation and a subclass that implements it based on the async IP code. So it’s always possible to implement it on top of alternative HTTP server implementations.

We’re considering the async socket and http layer to be the first step towards an “Internet Pack for Delphi” – although will be treating is a part of the RemObjects SDK, for now.

Vinci Part #5 – Super HTTP Channel

April 28, 2007 in .NET, Delphi, Free Pascal, Linux, Mac, Mono, MonoDevelop, Visual Studio, Windows

One of the new features of RemObjects SDK for Delphi and .NET in version 5 will be the Super HTTP Channel. This channel is a variation on the regular HTTP channel but supports two way traffic like the Super TCP Channel. Because it uses HTTP, it works through HTTP proxies and strict firewalls, it does however cause slightly more traffic than the TCP version.

The new HTTP Channel allows you to send multiple requests without having to use multiple HTTP channels. It also makes it possible to send an event from the server to the client without having to explicitly poll for it. It works by using two connections at once, one for sending, the other for receiving.

As side-effect of the implementation for .NET, we have introduced a new “normal” HTTP server component in Internet Pack: AsyncHTTPServer. The Async HTTP Server uses Windows built in IO Completion Ports to handle requests, which uses less threads than the traditional blocking sockets model. Besides the Internet Pack based server, we also have an ASP.NET “Handler” and an http.sys async implementation.