Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

Publicaciones sobre kde (publicaciones antiguas, página 18)

IUP/Qt shows a window

Of course you know that means noth­ing, but yes, af­ter a few hours of hack­ing, I got enough of a Qt back­end for IUP so a win­dow can be dis­played.

//ralsina.me/lateral/static/diup1.png

Of course those are all the wid­gets that are im­ple­ment­ed cur­rent­ly.

If by im­ple­ment­ed you ac­cept "can't con­nect call­backs and 90% of the at­tributes are in­ac­ces­si­ble", that is!

But af­ter I get the call­backs work­ing (that's the hairy part), the rest is sim­ple mo­not­o­nous repet­i­tive work.

It's in­ter­est­ing that the Qt back­end is, of course, look­ing quite sim­pler than the Mo­tif one, and in fac­t, a fair bit sim­pler than the IUP pro­grams look.

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

OTO­H, the third step is a nicer OOP, D, wrap­per around IUP.

Or some­thing like that ;-)

My first adventure in D-Land

Yes­ter­day (or rather, like 10 hours ago?) I post­ed about my quest for a spe­cif­ic lan­guage, and men­tioned one of the can­di­dates, called D which I had found ap­peal­ing.

Well, be­cause I am a quick coder (not good, but quick) I de­cid­ed, af­ter look­ing around for about 5 min­utes, to take as my first project giv­ing the D com­mu­ni­ty a UI tool­kit.

My first choice would have been Qt, of course, but D does­n't in­ter­face well (or at al­l) with C++, and I was not about to hack a QtC bind­ing, be­cause it would be un­us­able.

So, I looked around the web for a small mul­ti­plat­form C toolk­it, and I found there are very few of those left!

You have Gtk+ and ... well, al­most noth­ing else! I found IUP though, and de­cid­ed to bind it.

Since bind­ing C libs to D is quite sim­ple, I did it most­ly by hand. And 76 files and 8872 lines of code lat­er, here is DI­UP, a D bind­ing for IUP.

Now, how do you use it?

Get IUP, then get DC, then get D, then get DI­UP, then open it, and check the ex­am­ples.

The bind­ing mod­ules them­selves are in the bind­ing fold­er, so you can com­pile ex­am­ples like this:

[ralsina@monty iupbinding]$ cd examples/elem/iupbutton/
[ralsina@monty 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
[ralsina@monty iupbutton]$ ls -lh iupbutton
-rwxrwxr-x  1 ralsina ralsina 217K Apr 18 02:30 iupbutton

You will prob­a­bly be link­ing a few libs too many, but don't wor­ry yet.

The good news:

  • IUP works on win­­dows and Unix.

  • IUP is an or­der of mag­ni­­tude smal­l­­er than WxWid­get­s.

  • Most of it seems to be work­ing.

The bad news:

  • IUP looks ug­­ly be­­cause it's mo­tif on unix.

  • IUP is pret­­ty lim­it­ed.

Some­day, when I have a free af­ter­noon, I could write a Qt back­end for IUP and avoid the suck­age plus port­ing it to OSX in the pro­cess, but...

  • IUP is damn hard to build. Luck­­i­­ly they have bi­­na­ries.

Manda­to­ry screen­shot!

So, en­joy and com­men­t!

A match made in heaven

So, RH pays 350 mil­lions for JBoss.

And here are some quotes the guys at the reg­is­ter have digged up:

Our own talks with RH broke down, RH is NOT IN THE BUSI­NESS OF PAY­ING OPEN SOURCE DE­VEL­OP­ER­S, we are, that is why we cre­at­ed JBoss in­c. RH want­ed to keep the ser­vices rev­enues all to them­selves. That is the dirty lit­tle se­cret, so for them to come out and claim they are the open source when we know the re­al­i­ty is dis­taste­ful.

Hon­est­ly? I have had my trou­bles with RH in the past about their po­si­tions on KDE, and ev­ery­thing, but hey... at least I did­n't lat­er sell my chil­dren to them ;-)

OTO­H, Fleury is quite a char­ac­ter. Or a rav­ing para­noid :

Dad­dy, why are you still work­ing on a Sun­day? Is IBM still af­ter you?

My bet: you will not hear any­thing from Fleury for a while. Then, in some time (I put the over/ un­der at oc­to­ber) he will dis­creet­ly re­sign/be fired.

What I learned moving my blog

  1. PyDS is good enough to let you change how you host your site and keep it just work­ing.

I switched from pyc­s.net (thanks for all the good work!) to a stat­ic site host­ed at my IS­P.

Since PyDS sim­ply gen­er­ates a whole lot of stat­ic HTM­L, this worked pret­ty good!

I gen­er­ate the site, and then up­load us­ing lft­p. No fuss, again, it just work­s.

  1. Stat­ic host­ing suck­­s.

On pyc­s.net I had re­fer­rer logs, stat­s, com­ments. The stat­ic tem­plate from PyDS does­n't have any of that, of course.

  1. You can work around the suck­­age.

No com­ments? Haloscan can host them for you.

No stat­s? stat­counter can do them for you.

No spam-free mail web­for­m? I haven't looked yet, but I bet it ex­ists some­place :-)

  1. You learn stuff.

I now un­der­stand how PyD­S's macros/tem­plates/nugget­s/u­pload­ings work. I thought I did. Now I do.

For ex­am­ple, I like com­ments for longer ar­ti­cles. Be­fore, I added the links by hand. Now I just hacked the tem­plates and it's done au­to­mat­i­cal­ly. I could have saved a few hours of my life if I had both­ered to learn it.

  1. Switch­ing your URL suck­­s.

Since noone knows where the hell my page is. Luck­i­ly soon clee will switch me at plan­etkde.org and things will start to flow again.

  1. De­pend­ing on free host­ing's tech sup­­port is not a good idea.

I love pyc­s.net. I loved how it worked. Un­til it stopped work­ing.

I have no right to whine, though, so I of­fered to help (got no re­sponse yet). Then I moved out.

Since mov­ing is an­noy­ing, I will prob­a­bly not be go­ing back, even if I start lov­ing it again :-(

I am get­ting and re­post­ing all the com­ments, but then gain haloscan has a 4-­month lim­it on the com­ments, so I will have to im­ple­ment some sort of com­men­t-archiv­ing and clos­ing mech­a­nis­m.

2006 resolution

I will make some of my work pub­lic.

The best can­di­date is one that will prob­a­bly not ap­peal to any­one: my per­son­al lin­ux dis­tro.

I have it, I use it all the time. It's not pub­lished yet, though, since it con­sists of a base Cen­tOS + a lot of work.

So, I will try to make it sys­tem­at­ic, call it an in­staller, and drop it on the un­sus­pect­ing au­di­ence.

Don't hold your breath, though.

Here are some of the fea­tures:

  • Serv­er ori­en­t­ed. I use it for my clients' server­s.

  • Qmail+­­couri­er+vpop­­mail+round­cube+s­­pa­­mas­sas­s­in+­­cla­­mav mail sys­tem.

  • Squid prox­­y+fw­builder fire­wall

  • Smart for pack­­age man­age­­ment

  • runit-based boot/ser­vices.

  • KDE as a GUI. Ac­c­s­si­ble via FreeNX/se­cure VNC.

  • Open­VPN for sim­­ple VPN man­age­­men­t.

  • Cus­­tom cher­rypy-based ad­min tools

  • No SeLin­ux (sor­ry, it's a pain in the but­t. Se­cure, but a pain).

  • Bac­u­la for back­­ups

  • Cus­­tom tool to back the whole disk to a bootable DVD (Sys­tem Res­cue DVD)

  • /etc in SVN+­­Trac (yes, re­al­­ly, and the ad­min tools force you to use it)

  • Prob­a­bly djbdns for DNS.

All in al­l, it's a pret­ty or­di­nary Cen­tOS-based thing, ex­cept that the switch to runit makes ser­vice man­age­ment way sim­pler and reg­u­lar ( you can do things like hav­ing a non-­root us­er that can man­age some ser­vices, yay!)

On the oth­er hand, the cher­rypy-based tools would prob­a­bly need a bit of a rewrite, since some are pret­ty crud­dy.

Most­ly, I have been gath­er­ing these pieces over the last 6 years as I re­al­ly don't like the way any of the Lin­ux serv­er dis­tros are built.

I based it on Cen­tOS be­cause do­ing the whole dis­tro by hand is way too much work.

I can prob­a­bly show it around June, if I don't get too side­tracked. Hope­ful­ly, some­one will read this list and tell me "but graxzst lin­ux al­ready does all that!" ;-)


Contents © 2000-2023 Roberto Alsina