Cute Monkey?

BlitzMax Forums/Brucey's Modules/Cute Monkey?

Brucey(Posted 2011) [#1]
Just some tinkering with Monkey...



Example win32 app : cute_monkey_clock.rar (4 meg)

Code :


An interesting little project.
The difference between this Qt wrapper and the BlitzMax one, is that it mostly generates no wrapper code at all. Most calls are converted directly to the C++ that you'd write for native Qt apps.

Caveats :
* It's a new "target" (qt), with its own translator to generate the necessary code. Requires changes to trans to support a new target (because that's what drives the code generation).
* Haven't worked out how to do arrays yet... (hence the commented out poly stuff - the minute and hour hands should be polygons)
* Can't do "slots" yet, as there's no metadata/etc that can be applied to methods. The other way around that is to hack the language and add a new keyword for method signatures, but it would be nicer to have :
Method blah(value:int) {slot}

Or something... much like we can with BlitzMax.

On Mac, it can create 64-bit binaries...

Fun fun...

Last edited 2011


Nigel Brown(Posted 2011) [#2]
very cute, wonder how long you have been developing the qt stuff.

Last edited 2011


Brucey(Posted 2011) [#3]
Not very long.


GaryV(Posted 2011) [#4]
The difference between this Qt wrapper
Damn, Brucey has wrapped QT for Monkey already! IIRC, the over/under was four days :P


MCP(Posted 2011) [#5]
A whole 4megs for a clock?? Are all monkey apps that big?


Brucey(Posted 2011) [#6]
Haw... Qt is a cross-platform framework.
The app itself is tiny, the DLLs are the big part of it. But they are the same size regardless the complexity of your app - Skype and Google Earth are two examples of Qt-built apps.

Of course, if you have time to write your own cross-platform GUI....


Brucey(Posted 2011) [#7]
Are all monkey apps that big?

Highly unlikely, but I'm usually not interested in writing small games. It's more fun to push things a bit.

Life is rather boring if you are given a box and all you do is play inside it.

There's a much, much bigger world out there....


Nigel Brown(Posted 2011) [#8]
There was obviously some outside the box thinking, done before starting this addition. wxMonkey on the cards?


Brucey(Posted 2011) [#9]
And the same code built on OS X (32-bit Qt Libs)...


32-bit because that's what I have lying around at the moment. 64 works too, of course, and gives much more potential on 64-bit systems :-)

wxMonkey on the cards?

Unlikely for now... I'm still getting my head around the code-generation for this one - which is a non-standard affair as far as Mr Sibly is concerned (I can hear tuts and murmurs from the back-office...)


slenkar(Posted 2011) [#10]
impressive, most impressive

but you are not a jedi yet

Last edited 2011


Brucey(Posted 2011) [#11]
Something a little more interesting. A layouts example :


And the obligatory screenshot..


As you can probably see, it's not plugged into "mojo" at all (that's the game-oriented framework that comes with Monkey). No surprise there, I suppose!?


Russell(Posted 2011) [#12]
qt seems to be very popular, but what is it? A framework for building gui apps, like wxWidgets? And if so, how is it different/better?

Russell


Brucey(Posted 2011) [#13]
A framework for building gui apps, like wxWidgets?

Yes, it's similar to wxWidgets. It's also the base for KDE on Linux.
I find it easier to use than wxWidgets, but they both do very similar things.

wxWidgets has the advantage of allowing you to statically link it into your app, so you don't have external dlls/libs. (although you can do that with the commercially licensed Qt, if you want - well, what I mean is, if you statically link the LGPL version, your app must be released under the GPL).


Winni(Posted 2011) [#14]
(although you can do that with the commercially licensed Qt, if you want - well, what I mean is, if you statically link the LGPL version, your app must be released under the GPL).


I might be mistaken, but I think that problem was only there BEFORE Nokia bought Trolltech and their Qt framework and when Qt was only available in a commercially licensed and a GPL version.

As far as I know, the LGPL explicitly allows for static linking and you only need to publish the source for the changes that you made to the libraries under the LGPL that you've used - provided that you even changed them.

That is the exact point of the LGPL: You don't have to publish your entire work under the GPL if you don't want to, but the libraries that you used and maybe changed will always be Open Source. That's why it is the "Lesser" GPL.

Nokia made Qt available in an LGPL version immediately after they bought Trolltech; Trolltech was no longer financially dependent on the sale of their commercial versions and Nokia wanted/needed a wider acceptance of the Qt framework which back then was a strategic platform tool for them.

Now that Nokia has decided to drop their own software technology in favor of Microsoft Windows Mobile, I'm afraid that all the bets are off and the future of Qt - without the proper attention of the company that owns it - might be a bit cloudy.


Brucey(Posted 2011) [#15]
As far as I know, the LGPL explicitly allows for static linking

As far as I am aware, unless it explicitly states so (as it does for wxWidgets), static linking LGPL reverts it to GPL (something about it becoming a derivative of the library or something), and therefore as a consequence, your source must be opened up too.

The fact that wxWidgets specifically has the clause that it is okay to link statically implies that otherwise, it would not be.
Either way, I'm not too fussed... one gets linked in, the other get dlls...


slenkar(Posted 2011) [#16]
I see you have constructed a new lightmodule. Your skills are complete. Indeed you are powerful as the Sibly has foreseen.

Last edited 2011


slenkar(Posted 2011) [#17]
You may dispense with the pleasantries, Commander Henderson. I'm here to put you back on schedule.
The Sibly does not share your optimistic appraisal of this situation.


Brucey(Posted 2011) [#18]
Monkey is a games programming language... it has no aspirations to be anything else.


Tommo(Posted 2011) [#19]
Sorry to hear that... :)


slenkar(Posted 2011) [#20]
You have failed me for the last time.


shinkiro1(Posted 2011) [#21]
any progress on this or is it dead?
It would still be nice if we could get the source somehow.