Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 25 Apr 2018, 09:00
All times are UTC - 4
 Forum index » Taking the Puppy out for a walk » Announcements
Giving up bash/gtkdialog apps, moving to bash/yad and IUPLua
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
wiak

Joined: 11 Dec 2007
Posts: 541
Location: not Bulgaria

PostPosted: Thu 12 Apr 2018, 21:34    Post subject:  Giving up bash/gtkdialog apps, moving to bash/yad and IUPLua  

I am dropping bash/gtkdialog use in preference to bash/yad or IUP+Lua for my own apps/utilities. Yad or IUPLua can be used for easily creating simple dialogs and IUP+Lua can additionally be used for more complex programs where bash/gtkdialog would previously often be used.

Reasons:

1. gtkdialog not really being developed and only works with GTK2+ (or earlier GTK1 version), and personally I find gtkdialog messy, tricky, and limiting since relies on exporting/processing large enviromental variable, which holds the dialog information.

2. Both yad and IUP+Lua can be compiled to use either GTK2 or GTK3 and are both simpler to use than gtkdialog, I feel, (and similar to each other for simple dialogs).

3. IUP with Lua has a long pedigree of maintenance and ongoing development (decades) and is actively developed with professional backing.

I am soon going release my first IUP+Lua program, simply as a demonstration of how to convert a simple bash/yad app to IUPLua shortly. For that demo I am purposively simply translating fredx181's gifenc-yad program to gifenc-iup.lua version of similar simplicity and size (I hope) - I have already completed the main GUI for that (in around 40 simple lines of code, so very much like the yad version). That exemplar should hopefully inspire/help others to implement GUI's in IUP+Lua, which will as I say be particularly useful for more complex application writing (since has full power of Lua). For example something of the complexity of Pmusic could be implemented in IUP+Lua (GTK2 or GTK3 version) and a lot of the syntax of Lua itself is very much simpler than bash (though bash has the advantage of many already being familiar with it).

With IUP+Lua a developer or someone keen to become a developer could also design/program simple webbrowsers or filemanagers or texteditors (or more) in a relatively straightforward way (unlike Qt or pure GTK programming, which is somewhat 'heavy' on the brain... and I say that as someone who has long been able to program in C).

Reason I'm writing this is that my own wish would be that Puppy would start to include IUP+Lua as standard, for the future, despite it being a larger install size than either yad or gtkdialog (but basic IUP+Lua system is only just over 1 MB installed size anyway - that's uncompressed already). I'm never myself been happy with gtkdialog and wished for something more elegant/powerful. Yad is very nice, up to its limits, but for something larger gtkdialog needs superseded IMO and IUP+Lua really has little in the way of limits (and is a long established platform with a nice simple very useful IDE (zerobrane) though can also use geany.

I am particularly motivated to move to IUP+Lua, because I think longterm a small distribution like Puppy (or the Dogs for that matter) show their individuality, to some extent, via their personalised small app/utilities. Whilst some think Puppy is just for 'passengers', I don't. It is for passengers from Windows, for example, but it has also been strong as a simple distribution for experimenting and learning how to code small utils and system apps. Some, such as myself, who enjoy developing an app or utility now and then, may long for a development language more powerful than bash/gtkdialog (or bash/yad) but without having to go the full Qt/GTK compiling route. IUP+Lua can certainly fill that void - and it is cross-platform so apps created in IUP+Lua can be written to also work in other UNIX systems or on Windoze for that matter.

Anyway, any app I myself write in the future will be using either bash/yad or IUP+Lua and more often the latter. Python with some GUI widget toolkit may be nice, but it is too big by default. Of course, I realise that system builders may not with to add IUP+Lua to their builds and others may not wish to learn something new, in which case I will be alone and my IUP+Lua-based apps useful therefore to no-one but myself! C'est la vie! They will probably not be very good anyway, but entertaining and educating for me writing them at least Wink

IUP+Lua docs/install files etc:

http://www.murga-linux.com/puppy/viewtopic.php?p=988238#988238

The reason I'm wishing IUP+Lua would be available on default Puppy/Dog isos is that no-one is seriously going to use apps/utils that requires a devx or even a prior package manager install before using them. Of course, I have IUP+Lua permanently installed on my own system or the apps would be no use to me either. I'm only one potential developer though, so not much would be written by me alone anyway and without IUP+Lua inbuilt availability it seems unlikely other developers would use it for new apps, which would be sad for future Puppy progression IMO (or if there is something better fine - but Bacon, for example, didn't really take off in the end, but apps written in that needed compiling anyway, which is a major drawback for this kind of quick-app building process).

wiak
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 8529
Location: Perth, Western Australia

PostPosted: Fri 13 Apr 2018, 05:53    Post subject:  

Hi,
I am interested in what you are doing.

Certainly I will consider an alternative to bash/gtkdialog for my forks of Puppy (EasyOS and Quirky), if I can see some demonstrated advantages.

Moving ahead, yes, support for gtk3 is a plus.

Lua, I know nothing about, so don't know what challenges lie there.

In pups and also my forks, there are some apps written in BaCon with HUG. This is a compiled solution, whereas many people like to stay with scripts -- and I can certainly appreciate that.

BaCon will compile for gtk2, gtk3 and fltk. I think the HUG support for fltk is a work-in-progress.

Yeah, I might put IUP/Lua in the next release of EasyOS, as it is intended as an experimental distribution. I have added this to my to-do liist.

Regards,
Barry

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
rufwoof

Joined: 24 Feb 2014
Posts: 2260

PostPosted: Fri 13 Apr 2018, 10:38    Post subject:  

yad with sh (standard script) is more portable

Attached is a back-burner (incomplete) ROX APPDIR for a simple alarm script. I've had to strip out the alarm sound files in order to get the tar.gz file to below the 250KB board posting size limit. Script lacks code to test and switch to use the appropriate files, but that's relatively easily manually changed in the alarm shell script. All of the files are in the APPDIR, yad icons ...etc (other than the removed alarm sound files).

Contains copies of yad for OpenBSD 6.3 (i386 single processor and amd64 multi-processor) along with Debian AMD64 (Jessie). Using ROX in all of those I can just drag the alarm APPDIR to my rox panel and (after right clicking and using the look-inside ... to edit the alarm script to use the correct yad and sound files etc.) run it from there on each of Debian Jessie and OpenBSD.

I didn't even know that IUPLua existed so thanks wiak, something new to learn/investigate.
alarm.tar.gz
Description 
gz

 Download 
Filename  alarm.tar.gz 
Filesize  250.63 KB 
Downloaded  3 Time(s) 
s.png
 Description   
 Filesize   77.7 KB
 Viewed   140 Time(s)

s.png

Back to top
View user's profile Send private message 
FeodorF


Joined: 07 Jul 2010
Posts: 228
Location: Heidelberg, Germany

PostPosted: Fri 13 Apr 2018, 13:16    Post subject: Lua
Subject description: How to use Lua with graphics
 

A very well documented example on how you can use Lua.

youtube user 'CS50' "Falling in LÖVE with Lua"

... While modern AAA game engines like Unity and Unreal can make 3D cutting-edge game development exceptionally easier, they may not always be the best tool for modern 2D game development or the greatest entry point for a newcomer to the field. Enter LÖVE 2D: a simple and clean 2D game development framework utilizing Lua as its scripting language. ...

https://www.youtube.com/watch?v=3k4CMAaNCuk
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 541
Location: not Bulgaria

PostPosted: Mon 16 Apr 2018, 03:51    Post subject: gifenc-iup.lua translation of early version of gifenc-yad  

Please find a working translation of an early version of fredx181's gifenc-yad into IUP/Lua as an exemplar for developers here:

http://www.murga-linux.com/puppy/viewtopic.php?p=988818#988818

wiak
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Taking the Puppy out for a walk » Announcements
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0442s ][ Queries: 12 (0.0076s) ][ GZIP on ]