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 19 Jun 2013, 06:03
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
BaCon - Bash-based Basic-to-C converter/compiler
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 24 of 36 Posts_count   Goto page: Previous 1, 2, 3, ..., 22, 23, 24, 25, 26, ..., 34, 35, 36 Next
Author Message
sunburnt


Joined: 08 Jun 2005
Posts: 4016
Location: Arizona, U.S.A.

PostPosted: Fri 23 Sep 2011, 16:32    Post_subject:  

That`s it... You`re the bomb GatorDog! Idea

I was thinking of using the : and start a do-nothing command to kill the LF.
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 4016
Location: Arizona, U.S.A.

PostPosted: Sat 24 Sep 2011, 01:38    Post_subject:  

Hey guys, I got a working exec. with the File and Message dialogs, and help.
The file/folder dialog is all 4 types and auto sets the winTitle for each type.
The message dialog needs all options: Type, Buttons, Width, Height, Message.
It returns both the end of the GTK response variable name, and it`s negative number.

I think add a font dialog ( maybe like my Visual Basic one ), and color?
There`s a few other dialogs, but they`re not nearly as important as these 4.

Any suggestions are welcome, it`s just the first draft... Question

# I`d like to give credit to GatorDog, vovchik, and pjot if they want it...


TEST: "hug.bac" makes a exec. file 76 KB larger than "hug_imports.bac" does.
Not much, but my stdDlgs exec. compiles to only 56 KB with "hug_imports.bac".

More damn Qs...
# Can HUG use common icons ( not Stock ) for most dlgs.? PROPERTY ?
# What`s the deal with: INTL$ ? It auto. builds foreign language files?

I`ve noticed the Bacon and HUG docs. are misleading and even wrong.
Maybe I understand it differently, but I`m sure they could be better written.

# stdDlgs.bac is posted below.
stdDlgs.bac.gz
Description  For Help, after compiling, in rxvt type: stdDlgs
gz

 Download 
Filename  stdDlgs.bac.gz 
Filesize  1.25 KB 
Downloaded  157 Time(s) 

Edited_times_total
Back to top
View user's profile Send_private_message 
GatorDog


Joined: 12 Sep 2006
Posts: 136

PostPosted: Sat 24 Sep 2011, 02:16    Post_subject:  

sunburnt,
Unless I did something wrong (possible), stdDlgs.bac wan't in package.
The stdDlgs binary was, but got a seg fault when I tried to run it.

rod
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 4016
Location: Arizona, U.S.A.

PostPosted: Sat 24 Sep 2011, 03:05    Post_subject:  

Sorry about that, rushing to get to something else.

Need to finish up my Deb. downloader and package builder app.

# Amazing, now the File Folder dialog isn`t returning anything! I`ll fix it...
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 4016
Location: Arizona, U.S.A.

PostPosted: Sat 24 Sep 2011, 03:31    Post_subject:  

Fixed... Useless code messing it up.

# Another Q: (NUMBER dialog_, int button_)
Why is dialog_ a NUMBER, and button_ an int ?
They`re both widget handles... What`s a NUMBER exactly?
Back to top
View user's profile Send_private_message 
vovchik


Joined: 23 Oct 2006
Posts: 1239
Location: Ukraine

PostPosted: Sat 24 Sep 2011, 05:40    Post_subject:  

Dear sunburnt,

NUMBER is a long int (c type) and int is a c type plain int.... Hope that helps.

Here is an explanation:

http://www.lix.polytechnique.fr/~liberti/public/computing/prog/c/C/CONCEPT/data_types.html

With kind regards,
vovchik
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 4016
Location: Arizona, U.S.A.

PostPosted: Sat 24 Sep 2011, 17:53    Post_subject:  

Many thanks vovchik; I kinda figured it might be a longer integer type.
But I was also thinking it might be a special variable type for passing handles.

### A handle is only an integer, correct? ... So the NUMBER is over-kill?


My girl friend tells me that vovchik is a Russian name or expression.
And what town in the Ukraine do you live in?
Just curiosity questions, I`m always interested in where folks are from.

Edited_time_total
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 4016
Location: Arizona, U.S.A.

PostPosted: Sun 25 Sep 2011, 01:08    Post_subject:  

Got up today and it started doing GatorDog`s Segmentation fault error.
Turned out to be the ARGUMENT parsing loop.
It really doesn`t like it if the array isn`t filled all the way...

Anyway... It`s working normally again. Sure hope it stays that way.

# I`ve re-posted the re-fixed stdDlgs above.

# I`ll post my Qs again further down. - T.

Edited_time_total
Back to top
View user's profile Send_private_message 
big_bass


Joined: 13 Aug 2007
Posts: 1736

PostPosted: Sun 25 Sep 2011, 01:48    Post_subject:  

updated so you can compile most apps from inside the geany GUI
updated Nov-5-2011 for HUG highlighting and upx compression
this is a "hack" going for geany syntax highlighting with BaCon!

geany fix with rxvt_hold
http://www.puppy2.org/slaxer/geany_bacon-2-1_SLXR.tgz

upx compression
http://www.puppy2.org/slaxer/upx-3.07-i386_linux-1_SLXR.tgz

note in geany I had to recycle the build button
so after you compile the app you click on build
which build now uses upx to compress your already compiled bin


then open geany with any *.bac and select
Document -->Set Filetype-->Programming Languages-->FreeBasic source file


just install the package
and upx
and you get the BaCon commands highlighted !

I cant use gtksourceview with my gtk version so this is how to get
another GUI going


*since FreeBasic was compiled in the GUI as an option that was used
later when all the commands are added and tested Bacon would be used and compiled into geany the right way

if we keep at we could get an official bacon filetype someday it can be done



----------------------------------------------------------------------------
as a side note

*you can also call the rxvt_hold script for other apps too
like this

Code:
 rxvt_hold ls -1   



you could change the "ls -1" for any command you want to run
it works for keeping rxvt or urxvt open after the command is executed
geany-compile-bacon.png
 Description   
 Filesize   66.05 KB
 Viewed   851 Time(s)

geany-compile-bacon.png


_________________
slackware 14

Edited_times_total
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 4016
Location: Arizona, U.S.A.

PostPosted: Sun 25 Sep 2011, 02:15    Post_subject:  

big_bass; I had to set the Programming Language to: FreeBasic

Click: Document > Set Filetype > Programming Languages > FreeBasic source file

I was surprised I didn`t have to add ".bac;" to the file: filetype_extensions.conf
Back to top
View user's profile Send_private_message 
big_bass


Joined: 13 Aug 2007
Posts: 1736

PostPosted: Sun 25 Sep 2011, 10:22    Post_subject:  

Hey sunburnt
thanks for confirming that
I had that in my first post viewtopic.php?t=48901&sort=author&start=73
but thought it wasnt needed with the new changes I made

I'll update the above post
Quote:

I was surprised I didn`t have to add ".bac;" to the file: filetype_extensions.conf


thats for when you click on any source program with the *.bac
it opens automatically with geany

*its nice to know that parts of geany are scriptable without having to
hack it and recompile it to test if it works or not


thanks
Joe

_________________
slackware 14
Back to top
View user's profile Send_private_message 
vovchik


Joined: 23 Oct 2006
Posts: 1239
Location: Ukraine

PostPosted: Sun 25 Sep 2011, 16:17    Post_subject:  

Dear Joe,

Although bacongui works on my system, I prefer your method with geany and the modded filetypes.freebasic. I guess I am just used to geany, and the syntax highlighting works perfectly.

Thanks.

With kind regards,
vovchik
Back to top
View user's profile Send_private_message 
big_bass


Joined: 13 Aug 2007
Posts: 1736

PostPosted: Sun 25 Sep 2011, 18:45    Post_subject:  

Hey vovchik

thanks for the comments
I updated the post above to fix it so it now compiles
files that have INCLUDES Very Happy

I also added a little terminal so the user can see the
progress while it compiles in geany

there is a script called rxvt_hold
that goes in /usr/sbin the ( app depends on it)

*you can also call that script for other apps too
as a side note like this
Code:
 rxvt_hold ls -1   


you could change the "ls -1" for any command you want to run
it works for keeping rxvt or urxvt open after the command is executed

Joe

_________________
slackware 14
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 4016
Location: Arizona, U.S.A.

PostPosted: Mon 26 Sep 2011, 00:55    Post_subject:  

big_bass; Now you need to add HUG highlighting and it`ll be complete!

I still think API libraries should be made of all this stuff, there`s lots of it !
I wrote shell libraries for dealing with files, file systems, lists, gtkDialog, etc.

But written in Bacon and compiled they can become far more useful.
Especially to Bacon as it`s so limited by the standard Basic language.
Back to top
View user's profile Send_private_message 
big_bass


Joined: 13 Aug 2007
Posts: 1736

PostPosted: Mon 26 Sep 2011, 11:31    Post_subject:  

sunburnt
Quote:
Now you need to add HUG high lighting and it`ll be complete


great idea
thanks
its now added in the above post

*Hey guys if you find a missing command let me know
It will be added


Joe

_________________
slackware 14
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 24 of 36 Posts_count   Goto page: Previous 1, 2, 3, ..., 22, 23, 24, 25, 26, ..., 34, 35, 36 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


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