2006-04-19 01:48

IUP/Qt shows a window

Of course you know that means nothing, but yes, after a few hours of hacking, I got enough of a Qt backend for IUP so a window can be displayed.


Of course those are all the widgets that are implemented currently.

If by implemented you accept "can't connect callbacks and 90% of the attributes are inaccessible", that is!

But after I get the callbacks working (that's the hairy part), the rest is simple monotonous repetitive work.

It's interesting that the Qt backend is, of course, looking quite simpler than the Motif one, and in fact, a fair bit simpler than the IUP programs look.

But hey, you get a sort of LUA bindings for Qt at the same price...

OTOH, the third step is a nicer OOP, D, wrapper around IUP.

Or something like that ;-)

2006-04-18 14:10

More IUP fun

After I hacked the D/IUP binding I thought... howcome I can not build IUP on my PC?

Well, their infrastructure is not auto*, but something they made which I really just don't understand.

So, I decided to hack the build system. if I intend to play with IUP, I should be able to package it!

So, after 30 minutes and some qmake doc reading, I have something I can build.

Oh, sure, I mercilessly hacked off the win32 sources, but that's not my interest ;-)

I will not upload it, but if anyone needs it, just email me.

2006-04-18 02:41

My first adventure in D-Land

Yesterday (or rather, like 10 hours ago?) I posted about my quest for a specific language, and mentioned one of the candidates, called D which I had found appealing.

Well, because I am a quick coder (not good, but quick) I decided, after looking around for about 5 minutes, to take as my first project giving the D community a UI toolkit.

My first choice would have been Qt, of course, but D doesn't interface well (or at all) with C++, and I was not about to hack a QtC binding, because it would be unusable.

So, I looked around the web for a small multiplatform C toolkit, and I found there are very few of those left!

You have Gtk+ and ... well, almost nothing else! I found IUP though, and decided to bind it.

Since binding C libs to D is quite simple, I did it mostly by hand. And 76 files and 8872 lines of code later, here is DIUP, a D binding for IUP.

Now, how do you use it?

Get IUP, then get DC, then get D, then get DIUP, then open it, and check the examples.

The binding modules themselves are in the binding folder, so you can compile examples like this:

[[email protected] iupbinding]$ cd examples/elem/iupbutton/
[[email protected] iupbutton]$ dmd -g -I../../../binding/ iupbutton.d  -L-liup -L-liupcontrols -L-L/usr/lib/iup -L-lcdiup ;
gcc iupbutton.o -o iupbutton -g -lphobos -lpthread -lm -Xlinker -liup -Xlinker -liupcontrols -Xlinker -L/usr/lib/iup -Xlinker -lcdiup
[[email protected] iupbutton]$ ls -lh iupbutton
-rwxrwxr-x  1 ralsina ralsina 217K Apr 18 02:30 iupbutton

You will probably be linking a few libs too many, but don't worry yet.

The good news:

  • IUP works on windows and Unix.
  • IUP is an order of magnitude smaller than WxWidgets.
  • Most of it seems to be working.

The bad news:

  • IUP looks ugly because it's motif on unix.
  • IUP is pretty limited.

Someday, when I have a free afternoon, I could write a Qt backend for IUP and avoid the suckage plus porting it to OSX in the process, but...

  • IUP is damn hard to build. Luckily they have binaries.

Mandatory screenshot!

So, enjoy and comment!

2006-04-17 14:55

The missing language

In the last month or two I have been writing a fair bit of C code.

I really dislike C. But I have not been able to find a language to replace it with, except C++, and that's not much of an improvement for what I did.

Maybe someone can read this and help me. I don't mind learning a new language. Really, it's no problem.

The goal is writing small programs (in the hundreds of lines region), which have the following requirements:

  1. The program MUST be correct. Can never segfault or crash in some other way.

Since the code is short, I think I have managed, using bstrlib, to get this, after quite a bit of pain, by auditing and unit-testing. But I am not sure, and I will never be.

It would be awesome if the language could be garbage-collected for this reason.

  1. It MUST have a decent string handling.

The programs handle mail. So, it's strings galore.

  1. It MUST have very low overhead. The programs should run and end quickly. Very quickly, because people may be waiting for them to end.
  2. It MUST be a reasonably simple language. I am not a great programmer, and these tools will be hacked at by people with limited programming skills (sysadmins like me!)
  3. Trivial access to C libraries.

So, let's see.

C: gives 3, 4 (in a fashion), and 5

C++: 2, 3, maybe 4, and 5

D: It seems to give me all of these, along with a C-like syntax... but I can't get it to work yet (correction, I got dmd to work, so it's looking good for D!).

So, any takers?

2006-04-12 18:30

RASCAN 0.1.0

Yet another little program.

In this case, it's called rascan, and it's a rewrite of Inter7's simscan.

What does it do? It easily hooks clamav and spamassassin into your qmail-smtpd setup, so you will not accept viruses in your server, and tag spam.

It still lacks some features, like bouncing messages based on spamassassin hits, or blocking attachments, but it has at least one feature simscan lacks (adding footers to messages).

It's still alpha, so I wouldn't put it on a production server, but it may even work ;-)

2006-04-11 11:58

Now I understand!

Rading an interview with Bruce Perens has been a real eye opener.

Consider this:

For example, when I considered being an employee one of the things standing in the way was the fact that Mark doesn't give his employees stock in his companies. If I'm going to work for someone I'm going to be a little entrepreneurial about it, so I felt that although Ubuntu and Canonical could do a great deal for Debian and be excellent community members, they were never going to be the core, and we could actually get closer to the core by following what I have set up for UserLinux.

Now I understand! In order to be "the core", a company should give Bruce Perens stock.

2006-04-11 00:50

A match made in heaven

So, RH pays 350 millions for JBoss.

And here are some quotes the guys at the register have digged up:

Our own talks with RH broke down, RH is NOT IN THE BUSINESS OF PAYING OPEN SOURCE DEVELOPERS, we are, that is why we created JBoss inc. RH wanted to keep the services revenues all to themselves. That is the dirty little secret, so for them to come out and claim they are the open source when we know the reality is distasteful.

Honestly? I have had my troubles with RH in the past about their positions on KDE, and everything, but hey... at least I didn't later sell my children to them ;-)

OTOH, Fleury is quite a character. Or a raving paranoid :

Daddy, why are you still working on a Sunday? Is IBM still after you?

My bet: you will not hear anything from Fleury for a while. Then, in some time (I put the over/ under at october) he will discreetly resign/be fired.

2006-04-09 23:40

Wee links

I had seen a few blogs that had "digg this!" or "submit to reddit" links, and I decided to add them.

Thanks to explodingboy that was rather simple, so now all items have a neat box that adds no clutter where you can do it.

Very simple thanks to PyDS and its template system.

2006-04-09 00:16

The RA SPP Plugin collection

After a very long time, I have decided to make one of my projects public.

It's a collection of qmail plugins, to be used with qmail-spp for diverse purposes.

It's C code, which I don't quite like, but I think it doesn't suck too much.

2006-04-08 12:04

What I learned about hacking anaconda...

...Don't hack anaconda!

It's pretty evil stuff. It "builds" with dietlibc (?!) in the CentOS 4 version.

The latest doesn't but it's unbuildable on anything other than FC5.

Oh, but that "builds" is really not quite true. It doesn't build at all. I don't know how they compiled it in the first place.

On the other hand, if you switch it to plain glibc, it crashes (no warning, no error) when running loader.

And how can you debug it? Well, you can't really, because there seems to be no way to run anaconda unless you are installing.

Why? Why not create some way to run it on a test setup?

There are no docs I could find on the internals, there is not even a damn explanation of what binary does what, so I have to track it down theoretically by mounting and examining the .img files!

Sure, I can probably hack it... but why?

Personally, I think it's better to wait until someone writes a sane installer. Then again, noone has in 12 years :-(

Dudes, here's what the installer should do:

  1. Get you in a GUI, or text mode. It doesn't matter.
  2. Partition disks
  3. Install basic system (about 350MB, tops!)
  4. Install bootloader
  5. Boot into said system
  6. Configure network
  7. Start package management tool

Knoppix already had all the hw autodetect figured years ago. Why are we not using it everywhere?

I am just not the guy who can do it. I don't have the stamina :-P

Contents © 2000-2019 Roberto Alsina