BaCon - Bash-based Basic-to-C converter/compiler

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
rodin.s
Posts: 344
Joined: Wed 22 Sep 2010, 19:50
Location: Ukraine

Russian locale for proxy-setup

#316 Post by rodin.s »

I have found out today that proxy-setup can be translated and have made .po file for Russian.
Attachments
proxy-setup_ru.po.gz
Russian for proxy-setup
(1.24 KiB) Downloaded 526 times

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Re: Russian locale for proxy-setup

#317 Post by L18L »

Hi rodin.s
you wrote:I have found out today that proxy-setup can be translated and have made .po file for Russian.
Barry is waiting for you to email the po file to him, see http://murga-linux.com/puppy/viewtopic. ... &start=275.

Did you find gxlat too ?

rodin.s
Posts: 344
Joined: Wed 22 Sep 2010, 19:50
Location: Ukraine

proxy-setup

#318 Post by rodin.s »

I've left the message on Barry's blog. I'll look at gxlat.

User avatar
GatorDog
Posts: 138
Joined: Tue 12 Sep 2006, 16:43

#319 Post by GatorDog »

.
Puppy 525
BaCon and HUG in 525 devx
_______________________
From Barry's proxy_setup program I'm trying the xalign property.
REM param 0.0 means left-align label, 0.5 centre-align, 1.0 right-align...
PROPERTY(label_1, "xalign", 1.0)
But getting this error:
ERROR: could not parse line 9 in file 'xalign_test.bac'!
Sample program;

Code: Select all

REM use shared /usr/lib/hug.so instead of including hug.bac...
INCLUDE "/usr/share/BaCon/hug_imports.bac"
INIT

mainwin = WINDOW("xalign testing", 400, 300)

label_1 = MARK("Label 1:", 200, 25)
REM param 0.0 means left-align label, 0.5 centre-align, 1.0 right-align...
PROPERTY(label_1, "xalign", 1.0)
ATTACH(mainwin, label_1, 5, 10)

ok_btn = BUTTON("OK", 65, 25)
ATTACH(mainwin, ok_btn, 240, 260)

CALLBACK(ok_btn, QUIT)

DISPLAY
Are the BaCon/HUG in 525 devx outdated? Or am I just missing something?

rod

.

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Bacon

#320 Post by L18L »

GatorDog wrote:....
Are the BaCon/HUG in 525 devx outdated? Or am I just missing something?
...
Yes and yes.
1 - I am in wary now and have compiled your example successfully.
2 - The programm does not do anything.
IIRC I had downloaded bacon, runtime and dev from
http://bkhome.org/blog/?viewDetailed=02207

Code: Select all

# bacon -v
BaCon version 1.0 build 22 beta - (c) Peter van Eerten - GPL v3.
# 
HTH
edit
switching to 525 now

Another edit
Now in 525 without devx, pets installed: your result reproduced....wait a moment

Oh no, sorry I cannot help.

@all
Has anyone compiled a bacon source in Puppy 525
:?: :?: :?:

User avatar
GatorDog
Posts: 138
Joined: Tue 12 Sep 2006, 16:43

#321 Post by GatorDog »

Sorry, forgot to state my bacon version is also
BaCon version 1.0 build 22 beta - (c) Peter van Eerten - GPL v3.

Downloaded latest pet devx from here:
http://bkhome.org/blog/?viewDetailed=02207
but still same issue.

Downloaded and compiled BaCon GUI.
Still had problems.

But if I use

Code: Select all

INCLUDE "/usr/share/BaCon/hug.bac"
instead of

Code: Select all

INCLUDE "/usr/share/BaCon/hug_imports.bac"
the program compiles and runs properly.
However, it takes quite a bit of time to compile
for such a short program.
Has anyone compiled a bacon source in Puppy 525
Yes, I've compiled a few short bacon programs in 525.
But so far the only bug I had run into was with this PROPERTY ...xalign.

So I guess my issue now is how to turn the hug.bac into the hug_imports.bac

rod

Edit:
Somehow in the process of installing the pet packages the
hug.so file disappeared. hug_imports.bac uses hug.so
A search for hug.so found /usr/lib/libhug.so
I edited hug_imports.bac to use /usr/lib/libhug.so but
there was no joy. I eventually got the hug.so from the
pet package and the hug_imports.bac (and other .bac prgs)
from the pet devx package. Everything seems to be working
correctly from both command line and the BaCon GUI.

While writting this edit, maxerro came up with the latest
versions of bacon, hug_imports.bac and hug.so .
I just installed them and they work fine.

Thank you maxerro!

rod
Last edited by GatorDog on Wed 29 Jun 2011, 06:05, edited 1 time in total.

User avatar
maxerro
Posts: 53
Joined: Sun 10 Oct 2010, 16:11

#322 Post by maxerro »

GatorDog wrote:...So I guess my issue now is how to turn the hug.bac into the hug_imports.bac...
Erase that thought.

Try this, Gator:
Attachments
bacon-1.0.22-hug-0.57.tar.gz
Extracts to the same directory: bacon v1.0.22, hug_imports.bac and hug.so v0.57
(112.97 KiB) Downloaded 495 times

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

BaCon

#323 Post by L18L »

Thank you, maxerro :)

I have compiled successfully the example in wary512 devx loaded, no bacon*.pet now. (Before I have always used wary511q.)

This might confirm that lupu525_devx is outdated.

Another thought that I like to share:

Code: Select all

INCLUDE "/usr/share/BaCon/hug_imports.bac"
compiles very fast, use it (TRAP LOCAL) in the process of developing.
and switching to

Code: Select all

INCLUDE "/usr/share/BaCon/hug.bac"
REM TRAP LOCAL
in the end will produce a smaller executable. :?:

User avatar
GatorDog
Posts: 138
Joined: Tue 12 Sep 2006, 16:43

#324 Post by GatorDog »

I've looked through the documentation and do not see
a method of changing the Font color. Is there a way?

Something like this would be nice.

Code: Select all

FONT(widget, "color #ffffff")
'or
FONT(widget, "color BLUE")
Usage then would be something like:

Code: Select all

label_1 = MARK("Color me Blue", 100, 25)
FONT(label_1, "color #0000FF")
ATTACH(mainwin, label_1, 10, 10)
rod

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

#325 Post by L18L »

GatorDog wrote:I've looked through the documentation and do not see a method of changing the Font color. Is there a way?
I think : NO
The only way I have found to colorize text is using CANVAS and OUT.
But I am hoping Peter can give you better advice.

Code: Select all

INCLUDE "/usr/share/BaCon/hug_imports.bac"
INIT

mainwin = WINDOW("color on canvas", 300, 100)
can = CANVAS(70,18)
ATTACH(mainwin,can,20,20)
OUT("hello world", "#FF0000", "#FFFFEE", 0, 0)

can = CANVAS(70,18)
ATTACH(mainwin,can,170,20)
OUT("hello world", "#00FF00", "#FFFFEE", 0, 0)

ok_btn = STOCK("gtk-ok", 65, 25)
ATTACH(mainwin, ok_btn, 230, 70)

SHOW(mainwin)

CALLBACK(ok_btn, QUIT)

DISPLAY
Attachments
bacon_color.png
(3.31 KiB) Downloaded 1193 times

User avatar
GatorDog
Posts: 138
Joined: Tue 12 Sep 2006, 16:43

#326 Post by GatorDog »

L18L

I saw the canvas command. That seems kinda' messy but I
guess that's an option if you really need it.

You used

Code: Select all

SHOW(mainwin)
before the CALLBACK.
Is that for good form or does it do something that DISPLAY
doesn't accomplish?

'---------------------------
I ran a compiled bacon program on a non-puppy system.
It ran fine except the image file didn't display.
I erroneously thought the image file would be sucked
into the binary when the program was compiled.
The total package size would be about the same whether
the image is compiled in or carried along as a seperate
file. I guess the upside is that a set of image files
could be renamed during runtime to reflect different
stages of opperation.

So, is there any convention of where to store image files
that need to travel with the binary program? With Puppy,
there's my-applications and my-documents folders. But
those probably won't exist on other operating systems.
Typically the binay would be located somewhere in the $PATH.
And you probably wouldn't want to be storing image files
or other auxiliary files in the same place.

/usr/local/share seems to be a common directory across
systems, but maybe that's taboo.

just wondering,
rod

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

BaCon

#327 Post by L18L »

GatorDog wrote:I saw the canvas command. That seems kinda' messy but I guess that's an option if you really need it.
Rethinking now about colours I have come to the conclusion: do NOT use it. You can never know which theme the user has choosen.
GatorDog wrote:You used

Code: Select all

SHOW(mainwin)
before the CALLBACK. Is that for good form or does it do something that DISPLAY
doesn't accomplish?
Forget SHOW in this context. I had tried it because in first attempts there was no window at all displayed. But that was because there was no new line after DISPLAY. At the BaCon forum I was told that the latest version does not need the new line any more, but here in puppy I can live with this little trick. The SHOW is helpful if you have more than 1 window or if you have used HIDE(..) before.
/usr/local/share seems to be a common directory across
systems, but maybe that's taboo.

I did not think that there is any taboo in puppy but looking in my /usr/local/share it appears there is a taboo using /usr/local/share :lol:
Attachments
bacon_color_theme_bubble.png
same as before but other theme
(2.9 KiB) Downloaded 1048 times

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

text colours

#328 Post by vovchik »

Dear Puppians,

I have attached a sample showing how to do text colours. Basically you use "span".

With kind regards,
vovchik
Attachments
notify.tar.gz
(18.56 KiB) Downloaded 483 times

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

text colours

#329 Post by L18L »

:)
Edited:
Change line 489 in pnotify.bac from
my_duration = 10
to
my_duration = 30
and compile it then you will have 20 Seconds more time to read :wink:
Attachments
notify.png
(6.82 KiB) Downloaded 1072 times

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#330 Post by seaside »

vovchik,

Thanks for posting pnotify again. It reminded me of how much nicer it is to have something just s-l-i-d-e onto the screen with information. The tray is sometimes too subtle and the full screen splash - too abrupt..

Now if pnotify only had a menu for further actions..... :)

Best regards,
s

User avatar
GatorDog
Posts: 138
Joined: Tue 12 Sep 2006, 16:43

#331 Post by GatorDog »

I guess I'm having an extended senior moment. I tried this, but of course it
didn't fly.

Code: Select all

label_title = MARK("<span color=\"red\">Color me red</span>",  50, 30)
ATTACH(mainwin, label_title, 30, 5)
Just printed the literal <span color=\"red\">Color me red</span> :?:

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

OT

#332 Post by L18L »

Off Topic but this flies :D

Code: Select all

# yad --text="<span color=\"red\">Color me red</span>"
More on colors in yad see http://www.murga-linux.com/puppy/viewto ... 2&start=16 :oops:
Attachments
color_me_red.png
(3.61 KiB) Downloaded 1144 times

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#333 Post by sunburnt »

Is there a way to change blank line spacing in HUG`s List and Combo Boxes?

A medium length list becomes really long, there must be a way to set it...

User avatar
GatorDog
Posts: 138
Joined: Tue 12 Sep 2006, 16:43

#334 Post by GatorDog »

sunburnt,
There may be a way to do it with "Import the GTK functions". (above my paygrade).
For a LIST widget, you can use FONT(List_, " 10") to set the font size.
However the line spacing still has same space to text proportions, but you
can get more (or less) lines in the same size LIST widget.

FONT works for a COMBO widget also, but not as you'd probably expect :wink:

gDog

User avatar
GatorDog
Posts: 138
Joined: Tue 12 Sep 2006, 16:43

#335 Post by GatorDog »

forum server hiccup / posted twice.

Post Reply