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 Thu 18 Dec 2014, 08:27
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 5 of 36 Posts_count   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, ..., 34, 35, 36 Next
Author Message
vovchik


Joined: 23 Oct 2006
Posts: 1287
Location: Ukraine

PostPosted: Mon 08 Nov 2010, 19:09    Post_subject: nicoedit and bacon  

Dear 2lss,

I tried the same today - to get nicoedit to recognize the BaCon lang file and failed. I copied it to the location where nicoedit keeps its lang files and could not find any other nicoedit config file where lang files would be listed. I was also too lazy to look at the nicoedit source. So, I am back to geany.

With kind regards,
vovchik

PS. Peter's little bacon-IDE has great potential here. It would need tabs (and multiple buffers), command-line arguments, comment/uncomment code, indent/unindent and search/replace. Anybody willing to take on the task?
Back to top
View user's profile Send_private_message 
vovchik


Joined: 23 Oct 2006
Posts: 1287
Location: Ukraine

PostPosted: Mon 08 Nov 2010, 19:38    Post_subject: Better version of bac-notify  

Dear Puppians,

Here is an improved version of bac-notify. It doesn't flicker and you can now kill a popup window immediately with a mouse click, thanks to Peter, who added a bit to the code.

With kind regards,
vovchik
bac-notify-src.tar.gz
Description 
gz

 Download 
Filename  bac-notify-src.tar.gz 
Filesize  25.47 KB 
Downloaded  290 Time(s) 
Back to top
View user's profile Send_private_message 
BarryK
Puppy Master


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

PostPosted: Tue 09 Nov 2010, 08:50    Post_subject:  

2lss wrote:
Thanks vovchik and BarryK for your suggestions.

I gave nicoedit a try but for some reason the syntax highlighting does not want to work for bacon. (works ok for c, xml, etc)

I copied bacon.lang to /use/share/gtksourceview-2.0/language-specs and then ran "check.sh" on it, which said "bacon.lang validates."

I'm also getting a gtksourceview related error when I start Nicoedit (regardless of the extension)
Code:
(nicoedit:18591): GtkSourceView-CRITICAL **: gtk_source_language_manager_get_language: assertion `id != NULL' failed


I don't think the problem is the bacon.lang file since it works for me in gEdit on Ubuntu. (using puppeee 4.3 now)


Anyway, I'm going to give vovchik's file a go and see what I can come up with


I have just tried it in Wary. The file bacon.lang is already present.

Running direct from commandline:

# nicoedit demo.bac

...and it comes up syntax highlighted.

Start nicoedit, choose File -> Open to open demo.bac, I also get syntax highlighting.

However, looking in View -> Coloration mode, it lists as "Text". It seems that the source code of nicoedit needs to be modified to include BaCon in the list.

But apart from that, I do get syntax highlighting.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send_private_message Visit_website 
ttuuxxx


Joined: 05 May 2007
Posts: 10843
Location: Ontario Canada,Sydney Australia

PostPosted: Tue 09 Nov 2010, 09:55    Post_subject:  

If you go t o the link below it explains how to add bacon to gtksourceview

http://www.allbasic.info/mboard/index.php?action=printpage;topic=888.0

ttuuxxx

_________________
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games Smile
Back to top
View user's profile Send_private_message Visit_website 
ttuuxxx


Joined: 05 May 2007
Posts: 10843
Location: Ontario Canada,Sydney Australia

PostPosted: Thu 11 Nov 2010, 09:59    Post_subject:  

compiled the latest bacon bin for 2.14X and added the bacon TinyIde to the package
http://www.murga-linux.com/puppy/viewtopic.php?p=466156#466156
Smile until I get/workout the updates for geany
ttuuxxx

_________________
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games Smile
Back to top
View user's profile Send_private_message Visit_website 
ttuuxxx


Joined: 05 May 2007
Posts: 10843
Location: Ontario Canada,Sydney Australia

PostPosted: Thu 11 Nov 2010, 10:04    Post_subject:  

There's 3 things I would like to see in TinyIde
1- word search, kind of a pain manually searching code
2 for it to remember where things are like when you set the location of bacon as the compiler, and then you shut down the editor and restart it, you have to set it again. maybe just hardcode that its located in usr/bin
Plus it states to have xterm, would be nice if you could set that to rxvt
3 like alway, I would like tabs Smile
ttuuxxx

_________________
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games Smile
Back to top
View user's profile Send_private_message Visit_website 
NinerSevenTango

Joined: 17 Jun 2007
Posts: 186

PostPosted: Fri 12 Nov 2010, 00:09    Post_subject:  

BarryK wrote:
Guys,
I have it on my to-do list to play a bit with BaCon!

To that end, I put BaCon in the 'devx' sfs in Wary and Quirky. The BaCon compiler is a compiled binary, so does not need Bash4. But of course, to compile BaCon I had to install Bash4 -- and the Puppy Package Manager has a Bash4 PET package, in case you want it.

The latest Wary, 0.9.6, has BaCon 1.0.17.

The 'devx' sfs also has documentation:

/usr/share/BaCon/documentation.pdf.

Wary Puppy:
http://bkhome.org/blog/?viewCat=Wary


After reading that you had temporarily installed Bash4 to compile BaCon, I installed KSH and compiled it, then uninstalled KSH.
I ran into some problems compiling some of the demo programs. Turns out you need to have Bash4 installed even if BaCon is compiled properly.

I was worried that installing Bash4 and leaving it might break some scripts.

Well, after running into library hell trying to get it all working and eventually borking that Lupu 511 install, I'm now running a full install of Quirky. I've gone ahead and installed Bash4 (wish I'd known about that PET, hehe). I haven't seen anything broken yet, but I'm waiting for something to show up.

Now, to start over with BaCon again .....

--97T--
Back to top
View user's profile Send_private_message 
BarryK
Puppy Master


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

PostPosted: Fri 12 Nov 2010, 03:28    Post_subject:  

The next Wary Puppy, probably version 097, that I expect to release in 2-3 days, has BaCon support all setup and ready to go. See blog announcement:

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

Also, see my BaCon intro page:

http://bkhome.org/bacon/

_________________
http://bkhome.org/news/
Back to top
View user's profile Send_private_message Visit_website 
NinerSevenTango

Joined: 17 Jun 2007
Posts: 186

PostPosted: Fri 12 Nov 2010, 08:26    Post_subject:  

Awesome, Barry.

Thanks for all you do!

--97T--
Back to top
View user's profile Send_private_message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15122
Location: Paradox Realm

PostPosted: Fri 12 Nov 2010, 09:15    Post_subject:  

Quote:
Open a terminal in the download folder and type:
./bacon.bash bacon.bac


Hey mechanic, fellow Baconites,
did all that . . .

Code:
# ./bacon.bash bacon.bac
Starting conversion... 659   Segmentation fault
# ./bacon.bash bacon.bac
Starting conversion... 644   
ERROR: variable in LOCAL statement at line 644 in file 'bacon.bac' was defined previously!
#


does it not like my 64bit processor?

_________________
Puppy WIKI
Back to top
View user's profile Send_private_message Visit_website 
vovchik


Joined: 23 Oct 2006
Posts: 1287
Location: Ukraine

PostPosted: Fri 12 Nov 2010, 17:54    Post_subject: Lobster's 64 bits  

Dear Lobster,

I am not on 64 bits but Peter, the developer of BaCon, is and has no problems. You should probably have the 64-bit version of bash installed Actually, everybody has been talking about how you need version 4.0, but I blithely work with GNU bash version 3.2.29(2)-release i486-slackware-linux-gnu and have NO problems. . I have been using this version of bash since discovering BaCon way back.

One of these days I will switch to bash 4.0, but, at the moment, I don't want to break anything. One small irritation I have with my bash, however, is that I have to have a line feed chr(10) after the last line of code, otherwise the compiler won't grab it. So I always just hit enter after the last command in the source. Try that, too.

And please report your results. We have to get you to be able to compile stuff....

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

Joined: 12 Apr 2009
Posts: 29

PostPosted: Fri 12 Nov 2010, 18:46    Post_subject: BaCon problems  

Lobster wrote:
Quote:
Open a terminal in the download folder and type:
./bacon.bash bacon.bac


Hey mechanic, fellow Baconites,
did all that . . .

Code:
# ./bacon.bash bacon.bac
Starting conversion... 659   Segmentation fault
# ./bacon.bash bacon.bac
Starting conversion... 644   
ERROR: variable in LOCAL statement at line 644 in file 'bacon.bac' was defined previously!
#


does it not like my 64bit processor?


Eeek! I don't know about the 64bit processor but I doubt that is the problem. Here is what I get on my system:

Puppy Lucid 5.01

# uname -a
Linux puppypc 2.6.33.2 #1 SMP Mon Apr 5 12:55:04 Local time zone must be set--see zic m i686 GNU/Linux

# gcc --version
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# bash --version
bash --version
GNU bash, version 4.1.5(1)-release (i486-pc-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

# ./bacon.bash -v

BaCon version 1.0 build 18 - (c) Peter van Eerten - GPL v3.

# ./bacon.bash bacon.bac
Starting conversion... done.
Starting compilation... done.
Program 'bacon' ready.

# bacon -v
bacon -v

BaCon version 1.0 build 19 - (c) Peter van Eerten - GPL v3.

As you can see, I used version 18 of bacon.bash to compile version 19 of the bacon binary here. I just did it again to make sure it works as I described and it does. I had to update bash here in order for bacon to work (version 4.1.5) but vovchik is using a older version and it works fine for him.

I would look at updating bash and see if that helps. Sorry your having so much trouble, we need you compiling apps. Smile

_________________
regards,
mechanic
Back to top
View user's profile Send_private_message 
seaside

Joined: 11 Apr 2007
Posts: 888

PostPosted: Fri 12 Nov 2010, 21:27    Post_subject:  

Some points to mention again:

Most Puppys are bash 3 and won't compile bacon.

Check bash version in terminal
Code:
bash --version


Temporarily install bash 4 by renaming /bin/bash to /bin/bashFORMER and copying the bash 4 file to /bin/bash.

You can then
Code:
./bacon.bash bacon.bac
to compile a bacon executable.

You can now remove /bin/bash and rename /bin/bashFORMER to /bin/bash and you're back to bash 3.

The bacon executable you just made will operate in the bash 3 environment merryily translating and compiling away. If a new version of bacon is released, you MAY be able to compile it with the existing bacon executable, but don't count on it and you might have to temporarily
install bash 4 again.

One other thing that caught me was saving files from the www.basic-converter.org site. If you save code examples, using the browser-save-as-text file option, errant characters crop up in the source code. So, be sure to use copy and paste only.

Cheers,
s
Back to top
View user's profile Send_private_message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Sat 13 Nov 2010, 00:25    Post_subject:  

two small scripts to get started with BaCon
first script auto downloads complies bacon and installs it
nice for when a new version comes out

*you have to have a devx or a " compiler" installed
TXZ pup has the latest bash built in

the second ¡s a dragNdrop script that compiles any *.bac
automatically

Code:
#!/bin/bash

# getting started with bacon by  Joe Arose
# this will download and compile the latest bacon and install it
rm -f  bacon.bash*
rm -f  bacon.bac*
rm -f  bacon

xterm  -geometry 40x30+150+40 -e wget http://www.basic-converter.org/bacon.bash
chmod a+x bacon.bash


xterm  -geometry 40x30+150+40 -e wget http://www.basic-converter.org/bacon.bac
chmod a+x bacon.bac


xterm  -geometry 40x30+150+40 -e ./bacon.bash bacon.bac

# copy bacon bin into the path
cp bacon /usr/sbin


Xdialog --title "Complete" \
           --infobox "\nInstalling bacon has finished.\n" 0 0 3000




a drag N drop bac compiler just drag N drop any *.bac file on the script to compile it to a binary

Code:

#!/bin/sh

# call this dnd-bac-compiler

# a drag N drop bac  compiler    jut drag N drop any *.bac file on the 
# script to compile it to a binary
# run the binary by opening a terminal ./name of the binary

xterm  -geometry 40x30+150+40 -e ./bacon.bash "$@"

_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send_private_message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15122
Location: Paradox Realm

PostPosted: Sat 13 Nov 2010, 00:56    Post_subject:  

seaside wrote:

Most Puppys are bash 3 and won't compile bacon.


Wot?
I am at the cutting edge of 5.2 Lucid usage . . .

This is what I get:

Code:
# bash --version
GNU bash, version 3.00.16(1)-release (i486-t2-linux-gnu)
Copyright (C) 2004 Free Software Foundation, Inc.
#


Embarassed
. . . not even cutting edge Rolling Eyes

All I want is bacon and hugs
(The Bacon GUI environment)

Appreciate your support guys
Will see if I can update Bash

Theoretically Bacon wrote the plays of Shakespeare
(yep another tin hat, tin pot conspiracy theory)

To Bacon or not to Bacon
That is the Question

[Lobster rambles off into the distance . . .]

Puppy Linux
Tin Hat Friendly

_________________
Puppy WIKI
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 5 of 36 Posts_count   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, ..., 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.1092s ][ Queries: 13 (0.0089s) ][ GZIP on ]