Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

HWXperl - The place for GUI apps in Perl

by gmpassos (Priest)
on Sep 22, 2002 at 03:32 UTC ( #199840=perlnews: print w/ replies, xml ) Need Help??

I'm glad to anounce the HWX project for the monks. HWX is an environment for development and execution of open source & portable GUI applications in Perl.

I have published the 1.01c Alpha Release of HWXperl (the interpreter for HWX apps). It uses wxPerl (wxWindows) for the GUI lib and GML (GUI Markup Language) for the codes. You can get it at:
http://sourceforge.net/projects/hwx/

HWX now is in Alpha stage. We are developing first the interpreter, specially the GML objects, and after this we go to the HWXeditor. Now HWXperl show all the basics of HWX and GML and now has the architecture defined.

A good improvement was the GML to write the apps. GML is like a HTML, but with some adds in the syntax to help the parser, and can insert perl codes too. The idea is to bring the easiness of Web Sites to GUI apps. And with GML you can put your app in the web too, you just need to load them, like a html. :-P

HWXperl has some differences from the Standart Perl, one is the Class::DotRef. It enables the use of dots for classes, and other things, but this was made inside toke.c, becoming native of the Perl syntax and enabled inside eval() too (thing that can't be done with Filter::Simple). It's very good to work with the GML objects (GUI Controls) and isn't case sensitive:

# For example, I want to destroy a frame (window): # without Class::DotRef: # First you need to have the variable $frame. $frame->Destroy ; # with Cladd::DotRef: # you can do this in any point of the code, since the obj. class i +s global: obj.frame.MyFrameID.destroy ; # You can use DotRef to get a object too: $frame = obj.frame.MyFrameID ; # And work in the normal way: $frame->Destroy ;
HWXperl has some tools, one of them is for publishing, where you transforms your script in to a binary (executable) without a compiler. This tool is the PerlBin, it takes any HWXperl binary, change some marks inside it and add your script in the end of the binary. You can use PerlBin with CopyLib, this will create a perl/lib with only the packages used in your app.

I will be glad for your feeback about HWX and ideas, or better, joining to the development team! :-)

Graciliano M. P.
"The creativity is the expression of the liberty".

Comment on HWXperl - The place for GUI apps in Perl
Download Code
Re: HWXperl - The place for GUI apps in Perl
by PodMaster (Abbot) on Sep 22, 2002 at 04:19 UTC
    How is GML different from XRC?

    Why would I wanna use it instead of XRC?

    Where can I find more info on this "PerlBin"?

    XRC is wxWindows's XML-based resource system. Here is some XRC:

    ____________________________________________________
    ** The Third rule of perl club is a statement of fact: pod is sexy.

      First, the XML module is slow to load! The first idea was to use XML, but since every app will use XML, I decided to make my own parser to avoid the time load. GML has some adds, the use of the + and * to tell the type of the content of a tag, or to tell that a tag need or not a closer: </tag>.

      For example, an event can be writed:

      <event type="onCreate" sub="onCreate">
      or declaring the sub with the event:
      <event type="onCreate" +> print "Obj $_[0] created!\n" ; </event>
      About XRC, the idea of GML is not another way to declare wxWindows app, is a easy and fun way! GML was design to be easy to write, and not necessary follow the same args of a wxWindow object, you can see that with the textctrl tag, you have the font arg, to do this with XML you will need to declare a font and a textattr object and set it to the textctrl, with GML you just put font="face: Arial; size: 10; color: #0000FF", like a html. You can edit GML by hand, but in the future everything will be made from a GUI editor, like delphi.

      I saw that a lot of peoples think wxPerl confuse, because wxPerl is wxWindows on Perl. In other words, the people need to know wxWindows to use wxPerl, and what I'm doing is to make this more easy. But I do not take off any merit from wxPerl (Mattia), wxPerl is very very good, for me is the best GUI lib for Perl in the moment, but the ordinary user will want something more easy, but if you know wxPerl you still can use it with HWX, since I don't cut any feature.

      > Where can I find more info on this "PerlBin"?
      Get HWXperl or take a look in the CVS at SourceForge. Note that PerlBin only works with HWXperl binarys, since they have some changes from the standart (you can see it in the CVS too).

      The best answer for your question is to see HWX with your own eyes!

      You have asked for me: Have you announced HWXperl on the wxperl mailing list?
      I was talking with Mattia about the project. When it's with more controls, probably when we have something about the editor, I will publish it on wxPerl

      Thanks for your reply,
      Graciliano M. P.
      "The creativity is the expression of the liberty".

(more questions) Re: HWXperl - The place for GUI apps in Perl
by PodMaster (Abbot) on Sep 22, 2002 at 12:11 UTC
    Where can I find discussions on the design of this thing?

    Why did you decide to limit this to perl5.8?

    Why'd you decide you had to mess with toke.c ? ( sounds dangerous, especially just for dot syntaxt... )

    Does it break perl as we have come to know it? (i cannot imagine how it could not ).

    Have you added any tests to the distribution?

    Do you still use Mattia's wxPerl stuff, or do you define your own bindings? (how dependent is HWX really on your custom perl binary , and should it be?)

    Have you had any thoughts about abstracting PerlBin (real cool) away from HWXPerl, so it can work with many perl versions?

    Does it work on different platforms other than win32?

    I modified hello.pl to use some modules, and I created the binary without issues. Adding a 'lib' with those modules to where my hello.exe was worked like a charm. I gotta say I'm real interested in this PerlBin thing.

    In fact I was so interested in this idea (an open source alternative to perl2exe or PerlApp), that one night after some cb banter The Perl Compiler (turning perl scripts into binary executables) and created http://perlcompiler.sf.net. The project kind of died, since the one person who knew enough c/c++ and perl internals to get us started got stuck behind a NDA (non-disclosure agreement), but it'd be hella cool to resurrect it.

    I'm doing the CVS dance as we speak.

    How difficult would it be to make PerlBin work on earlier versions of perl (reading the description, I imagine it wouldn't be too much work)?

    The demo did look impressive, and PerlBin especially, but I can't get over modifying toke.c for the dot syntaxt ... ;)

    nice job ++

    update: I know it's alpha stage, but documentation could use improvement, at least in aiding developers (like project direction and such), and we could probably do better than "*** empty log message ***" for the cvs commits.

    update: Here goess a diff, if anyone qualified can comment:

    update: I d/led the source, and apparently there aren't any tests (not even the ones that come with perl). Not good (even though I did compile it successfully).

    UPDATE: Ooooh, the binary thingamajigger doesn't look too complicated, Yay! (although only windoze seems to have runperl.c, which is the bulk of it ~ well on the C side ;)). Ooooh, gives me goosebumps -- excited;D!

    ____________________________________________________
    ** The Third rule of perl club is a statement of fact: pod is sexy.

      > Where can I find discussions on the design of this thing?
      In mailing list of the project on SF: http://sourceforge.net/mail/?group_id=55705

      > Why did you decide to limit this to perl5.8?
      Well, since HWX doesn't use a normal Perl, not only a Perl with some extra modules, it use the Perl that we release. We got Perl 5.8.0 to use the last resources, specially Threads! I don't see why spend time making the interpreter with earlier version! We don't have much peoples working on that yet, we need to do the priority things first!

      > Why'd you decide you had to mess with toke.c ?
      I already answer that. To enable DotRef in the native level of the syntax, this means make it works in any part of Perl, including eval() and in the check syntax of the code. Filter::Simple, the other way to do that, doesn't have all the resources that I want for DotRef, specially the use inside eval()! Well, if it doesn't do what I want, I made my own.

      > Does it break perl as we have come to know it? (i cannot imagine how it could not ).
      NO! All the normal syntax was ok. DotRef first look if the class exist, if not it return a normal concatenation. But if you stop one minut you will see that no one will write:
      obj.aaa.bbb.ccc
      because this is the same of: objaaabbbccc
      DotRef, only accept \w and no space between the dots.

      > Have you added any tests to the distribution?
      Not yet. The GUI things will be hard to make a good test, and the DotRef was ok.

      > Do you still use Mattia's wxPerl stuff, or do you define your own bindings?
      Yes, is the same wxPerl, but is my own compilation. The only thing that I have added to wxPerl is the Wx::ActiveX and Wx::ActiveX::IE modules tha I made, and wasn't in the standart wxPerl yet.

      >(how dependent is HWX really on your custom perl binary , and should it be?)
      Well, it uses Class::DotRef. But inside the HWX and GML I tried to not use it to enbale it in other Perl versions, if in the future someone want it. About the "custom perl binary", the custome thing is for the PerlBin, and PerlBin is a tool to publish your app, not to run.

      >Have you had any thoughts about abstracting PerlBin (real cool) away from HWXPerl, so it can work with many perl versions?
      If you take a look in the changes that I made in the source of Perl binarys, you will see that it will works in any OS, since was simple things with the use of basic resources of C. All the other things are made with Perl codes, you can see a small script inside the source, to make it portable and simple.

      > Does it work on different platforms other than win32?
      Yes, I think that it works in any, you just need to compile it and make the same changes in the source for each OS inside Perl-src.

      >I modified hello.pl to use some modules, and I created the binary without issues. Adding a 'lib' with those modules to where my hello.exe was worked like a charm. I gotta say I'm real interested in this PerlBin thing.
      Well, is soo simple! I say again, if it doesn't do what I want I make my own. :-P

      >In fact I was so interested in this idea (an open source alternative to perl2exe or PerlApp), that one night after some cb banter The Perl Compiler (turning perl scripts into binary executables) and created http://perlcompiler.sf.net. The project kind of died, since the one person who knew enough c/c++ and perl internals to get us started got stuck behind a NDA (non-disclosure agreement), but it'd be hella cool to resurrect it.
      Well, I think that the best way is to do some scrirpt or program that get the standart source of Perl, make the changes. And the user just compile and use Perl normally, and when it want to "compile" use something like PerlBin. In the project you can release the binarys for diffenrent OS too. I hate perl2exe and PerlApp, they are selling something soo simple to do! About PerlBin, when some other priority things was made, I will link it with Zlib, to compress your script and your lib inside the binary. Talk with Marcus, one of the other developers of HWX, it was very interested on this too. You can find the e-mail in the file Changes.HWX in the CVS.

      > How difficult would it be to make PerlBin work on earlier versions of perl (reading the description, I imagine it wouldn't be too much work)?
      I think that will be just copy and paste!

      >nice job ++
      Thanks. ;-)
      Hey, join to the HWX team, or just sign the mailing list for news.

      Graciliano M. P.
      "The creativity is the expression of the liberty".

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlnews [id://199840]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (14)
As of 2014-11-26 16:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (172 votes), past polls