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
jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#261 Post by jpeps »

PjotAwake wrote:
Can you please try the latest HUG and add the line 'HUGOPTIONS("BASEXFTDPI 78")' at the beginning of the 'proxy' program?

Then if you switch the Xft.dpi from 78 to 108 or any other value the GUI should show correctly.

Thanks,
Peter
works...

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

HUG etc

#262 Post by vovchik »

Dear Puppians,

Peter is trying to accommodate every whimsy and, sometimes, silly request, but he does it. I think we should all say THANKS AND HATS OFF!. He is a wonderful logician.

With kind regards,
vovchik

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

#263 Post by seaside »

Peter,

I just had to grab a moment to go on-line to tell you how much we appreciate your help in sorting out these tricky issues.

Regards,
s
NOTE: (Still in the midst of moving but couldn't resist - much to my wife's annoyance - I tried out your new HUG with everything from 54-108 and it worked nicely with all :) )

User avatar
PjotAwake
Posts: 34
Joined: Wed 03 Nov 2010, 20:58
Location: The Hague, The Netherlands
Contact:

#264 Post by PjotAwake »

I tried out your new HUG with everything from 54-108 and it worked nicely with all :)
Great! Thanks for letting know. I will upload this version as the new default.

Regards
Peter

User avatar
piratesmack
Posts: 100
Joined: Wed 16 Sep 2009, 14:22

#265 Post by piratesmack »

Great stuff, Peter.

In such a short amount of time, I have already gotten further with BASIC and BaCon than I have ever gotten with the other languages I've tried.

Thanks a lot, keep up the good work! :)

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#266 Post by BarryK »

As BaCon is continually improving, I put some code into Woof to automatically build a Puppy with the latest BaCon files. Also the bacon.bac from beta is downloaded and compiled. It will all go into the devx sfs:

http://bkhome.org/blog/?viewDetailed=02032

This is the code I put into the '3builddistro' script:

Code: Select all

#101217 get latest BaCon...
if [ -f support/fetch ];then #see http://www.basic-converter.org/fetch.bac
 if [ "`which bacon`" != "" ];then
  echo
  echo "Press ENTER key only to download latest BaCon BASIC compiler and support files."
  echo "You will need Internet access to do this."
  echo -n "ENTER to download, any other char not to: "
  read dobacon
  if [ "`$dobacon`" = "" ];then
   mkdir -p sandbox3/devx/usr/share/BaCon
   rm -f sandbox3/devx/usr/share/BaCon/* 2>/dev/null
   cp support/fetch sandbox3/devx/usr/share/BaCon/
   cd sandbox3/devx/usr/share/BaCon
   ./fetch
   sync
   wget http://www.basic-converter.org/documentation.pdf
   wget http://www.basic-converter.org/documentation.html
   wget http://www.basic-converter.org/hug.txt
   wget http://www.basic-converter.org/sqlite3.txt
   wget http://www.basic-converter.org/gmp.txt
   wget http://www.basic-converter.org/curses.txt
   wget http://www.basic-converter.org/pthreads.txt
   wget http://www.basic-converter.org/gd.txt
   wget http://www.basic-converter.org/gtk.txt
   wget http://www.basic-converter.org/gl.txt
   #fetch has already downloaded bacon.bac, but want beta version...
   mv -f bacon.bac bacon-released.bac
   wget http://www.basic-converter.org/beta/bacon.bac
   [ $? -ne 0 ] && mv -f bacon-released.bac bacon.bac
   mv -f documentation.html documentation-released.html
   wget http://www.basic-converter.org/beta/documentation.html
   [ $? -ne 0 ] && mv -f documentation-released.html documentation.html
   sync
   if [ -f bacon.bac ];then
    bacon bacon.bac
    sync
    cp -f -a bacon ../../bin/
   fi
   echo "...done"
   cd ../../../../../ #back to woof-tree project dir.
  fi
 else
  echo
  echo "WARNING: 'devx' SFS not loaded, cannot install latest BaCon BASIC compiler."
 fi
fi
But, the thought has just occurred to me, why not have a script in Puppy, say /usr/bin/bacon-upgrade, that does all of the above, so you can upgrade whenever you want?
[url]https://bkhome.org/news/[/url]

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#267 Post by big_bass »

Hey Peter (PjotAwake)

I want to add a big thanks for all your help

I got a "hack" going for geany syntax highlighting with BaCon!
of course you would have to complete it so it gets official status so it could be compiled in and maintained correctly (and having the correct name in the window)

well here´s what has to be done to get it going quickly

rename the original default file in the folder
/usr/share/geany/filetypes.freebasic to
/usr/share/geany/filetypes.freebasic-old
as a safety

then untar the attachment and install this in /usr/share/geany



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

and you get the BaCon commands highlighted !

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


look at lines 27-28
what I did was take all the commands out of the bacon *language file and added them in manually removing the "free basic keywords"
----------------------------------------------------------------------------
EDIT to add click on file to open with the correct highlighting 8)

edit this file
/usr/share/geany/filetype_extensions.conf
and add FreeBasic=*.bas;*.bi;*.bac;


Joe
Attachments
filetypes.freebasic.tar.gz
(1.75 KiB) Downloaded 433 times

User avatar
Ted Dog
Posts: 3965
Joined: Wed 14 Sep 2005, 02:35
Location: Heart of Texas

Bacon BITS

#268 Post by Ted Dog »

I've finally got a working system without dev.sys that runs bacon and tcc together. Only adds 1M to base .sfs by copied only needed includes from a working GCC to a TCC .
Its not cleaned up yet but I'm posting this if anyone else is interested in a super small Basic & C combo system. (need to relearn how to make a pet from files)

Tiny C Compiler does not have compatible includes but a subset of GCC does.

was able to recompile bacon.bas using this mini system

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

Re: Bacon BITS

#269 Post by seaside »

Ted Dog wrote:I've finally got a working system without dev.sys that runs bacon and tcc together. Only adds 1M to base .sfs by copied only needed includes from a working GCC to a TCC .
Its not cleaned up yet but I'm posting this if anyone else is interested in a super small Basic & C combo system. (need to relearn how to make a pet from files)

Tiny C Compiler does not have compatible includes but a subset of GCC does.

was able to recompile bacon.bas using this mini system
Ted Dog,

That would make a very nice and compact development package.

Cheers,
s
(You remember

Code: Select all

# dir2pet abiword-0.5.6
where abiword-0.5.6 is a directory in the same directory
in which this terminal window is open. 'abiword-0.5.6' is
just an example, and contains subdirectories and files
that will become the PET package.
:D

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

New bacon version

#270 Post by vovchik »

Dear Puppians,

Happy New Year!. Peter has released bacon v.1.0 build 20 (http://www.basic-converter.org) and v. 0.30 of HUG. You can download the latest versions, plus documentation from his site. Have fun.

With kind regards,
vovchik

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

bacon

#271 Post by L18L »

Mon 15 Nov 2010, 12:32 esmourguit wrote:
As it seems we're at the beginning of the creation (and maybe later adaptation of old scripts) of programs, written with bacon, for new versions of Wary, Quirky, etc., would it be possible to localize them now with a .mo file?
If possible of course.
Yes, it is, .pot file is included.
Attachments
de.png
German proxy-setup
(33.25 KiB) Downloaded 1828 times
proxy-setup.tar.gz
proxy-setup
proxy-setup.bac
proxy-setup.pot
(39.68 KiB) Downloaded 585 times

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#272 Post by BarryK »

I have created a PET for the Vim text editor, with color highlighting for BaCon:

http://bkhome.org/blog/?viewDetailed=02174

One of the great features of Vim is that it can convert code to color-highlighted-HTML, as I have reported here:

http://bkhome.org/blog/?viewDetailed=02173
[url]https://bkhome.org/news/[/url]

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#273 Post by jpeps »

My favorite editor. It's important to stay on top of the patches, though (which can quickly be several hundred).

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#274 Post by BarryK »

Thanks to help from Peter van Eerten and L18L, I was also able to get international language support working. It's real easy, and to show everyone else how easy it is I have written a HOWTO:

http://bkhome.org/bacon/international.htm
[url]https://bkhome.org/news/[/url]

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#275 Post by BarryK »

Ok, I have updated the proxy-setup tool, with two improvements:

1. Peter's solution so that the layout of the window remains correct regardless of the type of screen, default GTK fonts, or XFT DPI value.

2. Peter's upgrade to BaCon that supports international languages.

I have attached an image of what it looks like on my screen. I would appreciate if you guys could try it and confirm that the layout remains correct on your screens.
Attachments
proxy-setup.png
Showing correct layout on my PC
(6.42 KiB) Downloaded 1794 times
[url]https://bkhome.org/news/[/url]

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#276 Post by BarryK »

And attached is a tarball of my latest proxy-setup, along with the 'bacon' compiler and 'hug.bac' that I used.

Apart from testing the layout, if anyone who is interested in supporting internationalization, I have included 'proxy-setup.pot' -- you can use this to create a proxy-setup.mo file for your language/country -- send it to me and I will include it in Puppy -- in fact, it will be in Woof, so in all Woof-built puppies.

I have created a web page that shows how easy it is to create a .mo file from a .pot file:

http://bkhome.org/bacon/international.htm
[url]https://bkhome.org/news/[/url]

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

proxy-setup

#277 Post by vovchik »

Dear Barry,

The main screen looks perfect on my machine. The only little infelicity is in the closing message box, where the OK button abuts (pardon the pun) against the text above it. I changed the dimensions of the second message box to 400,120,0,1 and everything was fine.

With kind regards,
vovchik

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

proxy-setup

#278 Post by L18L »

I had to increase the width of mainwin and label_hdrx by 40 to get my translation legible and had to change size of message box to:
yes_dlg1=MSGDIALOG(INTL("..."),500,150,0,1)
no_dlg1=MSGDIALOG(INTL("..."),500,120,0,1)
I have been varying 'global font size', too and here is how it is looking on my screen (1280x720) now. :?
7 posts back looks better :roll:
German po-file attached. :)
Attachments
de-dpi_72.png
dpi 72
(41.45 KiB) Downloaded 1781 times
de-dpi_60.png
60 dpi
(29.95 KiB) Downloaded 1788 times
de.po.gz
de.po for proxy-setup
(1.2 KiB) Downloaded 665 times

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#279 Post by BarryK »

Thanks for the feedback.

L18L,
Puppy has default xft dpi set at 78, which is a bit low. Most Linux distros use 96. So, it is very unlikely that anyone would want to change the setting to less than 78. Test with bigger values, such as 96.
[url]https://bkhome.org/news/[/url]

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

proxy-setup

#280 Post by L18L »

is looking good so far with 96 dpi.
The input fields have to be moved to the right, of course.

And thanks for the statement
all programs will have international language support
in your blog :D :D
Attachments
de-dpi_96.png
german 96 dpi
(59.45 KiB) Downloaded 681 times

Post Reply