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 Tue 12 Nov 2019, 06:51
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Getting BASIC programs compiled in Puppy?
Post new topic   Reply to topic View previous topic :: View next topic
Page 4 of 4 [58 Posts]   Goto page: Previous 1, 2, 3, 4
Author Message
nosystemdthanks


Joined: 03 May 2018
Posts: 696

PostPosted: Fri 09 Nov 2018, 07:59    Post subject:  

Quote:
Did you formalise your comparisons of BASIC versions in any way?


that would be an awesome endeavour. i dont think it will ever happen (unless an ai is tasked with it) because the people most interested in formalising that sort of task wouldnt be interested in an objective measure of the merits.

i would, but for my evaluations i would need to cross reference decades of research around usability and human psychology to get the results that mean the most to me. instead, i just went for the more conventional trial-and-error/iterative approach. its cheaper, and better yet its not limited to existing solutions.

short version: most people just want to convince you to use their own solution. i encourage (and teach) people to create their own solutions to this, but i am happy to provide my example(s) for inspirations.

i prefer fig, but for just one person i created a new dialect based on fig, called rose. one of the cool things about rose is that it marries the ordered python list with the dictionary-- and it is based on the dictionary, thus taking in all of its advantages, but when you use the array features in an ordered fashion you lose a bit of speed. the advantage is that you only have to learn one type of array to get the benefits of two. for beginners i think this is cool.

Quote:
And you think q64 might be a better way to reinvigorate auld structured and unstructured games/programs rather than a BaCon-yad route to convert the code into tiny modern apps?


for most people, sure. if you prefer bacon for some reason, use that. ive used yad before, its a good tool. qb64 would probably get you to a result with less effort, but my experience with bacon is limited. you might find a better quality result doing it your way. but do note i was comparing qb64 to fb, not to bacon.

Quote:
I guess I wanted a project/environment/hobby I could work on to create something while retaining my original sense of discipline - without having to learn the foibles of a "new" computer language.


i assumed so. i doubt anyone is going to go farther than qb64 for compatibility-- though be sure you look at pc-basic too: https://sourceforge.net/projects/pcbasic/

because for very old stuff, it is a full-featured basica interpreter/emulator.

i tried adding features once. pc-basic isnt just an interpreter, it is a full-on retrocomputing experience. the way its designed is intended to replicate the same environment for basic programs-- with the same limitations, and it is meticulously implemented in a way that makes it incredibly tedious to work around. at least thats what i found. i was able to change screen 9 (gw-basic had no screen 12, that was a qb mode) to be higher resolution.

Quote:
But your insights have encouraged me to look seriously at supplanting my interest with Python. Unfortunately, no hobby-time for me


i hear you.

Quote:
In a related project I have been writing a paper related to the evolution of the Western alphabet. Current thinking is that many of the modern letters were based on the hieroglyphics (literally "sacred text") of the Ancient Egyptians. They were a combination of pictograms/logograms depicting entire concepts, syllables and even a few phoneme sounds - the latter being the basis for the modern alphabet system. However, over time the hieroglyphs expanded from about 200 commonly-used symbols that basically everyone could read - to over 6000 that only the scribes and priests had a working knowledge of. They preserved their own self-importance by bamboozling everyone else - the original "knowledge economy"?


we are lucky we dont have proprietary alphabets today. the dewey decimal system used by libraries is under copyright, and very expensive. we could make a free version sure, but it would be unfamiliar, so theres a library using 20th century (technically 19th century) technology with microsoft/apple-like "lock-in."

i was confused by the part about the alphabet, i thought it was common knowledge (from school, before wikipedia existed) that we got our letters from the phoenicians. but going to wikipedia for more information (theyve never been wrong about anything before, heh) i guess i learned something today, thanks:

Quote:
The earliest certain ancestor of "A" is aleph (also written 'aleph), the first letter of the Phoenician alphabet,[3] which consisted entirely of consonants (for that reason, it is also called an abjad to distinguish it from a true alphabet). In turn, the ancestor of aleph may have been a pictogram of an ox head in proto-Sinaitic script[4] influenced by Egyptian hieroglyphs, styled as a triangular head with two horns extended.


Quote:
I guess I am wary of modern computer languages which might similarly work to alienate the common folk with more esoteric functions and constructs... or maybe I'm just being a neophyte. Dunno.


its very tedious work to teach something esoteric to everyone. i was interested in python partly because basic no longer held the ground it did with beginners. it has features i always wanted in basic-- multitype arrays, dynamic typing, but i didnt want "fancy" i just wanted "easier."

problem is, python has some features that are easier to use than basic-- and basic has some that are easier than python.

i wanted the best of both. but these languages that have everything in the kitchen sink-- they do take a little of the old fun out of it.

which is why i used < 100 commands, made the very most of those, and made it expandable via a second language-- just like basic did in the 80s.

i really wanted the locate and color commands back though. pity that inkey$ is such a pain to implement from python, and platform-specific too. input$(1) can be implemented in puppy/debian/arch/etc by using read with arrshell, at least for most uses. its not a built-in because all the other features are cross platform.

_________________
"microsoft is unique among proprietary software companies: they are the only ones who have actively tried to kill [floss]. it’s not often someone wants to be your friend after trying to kill you for ten years" -- bradley m. kuhn
Back to top
View user's profile Send private message Visit poster's website 
puppy_apprentice


Joined: 07 Feb 2012
Posts: 300

PostPosted: Tue 20 Nov 2018, 14:34    Post subject:  

PC-BASIC
Quote:
A free, cross-platform emulator for the GW-BASIC family of interpreters.

PC-BASIC is a free, cross-platform interpreter for GW-BASIC, Advanced BASIC (BASICA), PCjr Cartridge Basic and Tandy 1000 GWBASIC.
It interprets these BASIC dialects with a high degree of accuracy, aiming for bug-for-bug compatibility.
PC-BASIC emulates the most common video and audio hardware on which these BASICs used to run.
PC-BASIC runs plain-text, tokenised and protected .BAS files.
It implements floating-point arithmetic in the Microsoft Binary Format (MBF) and can therefore
read and write binary data files created by GW-BASIC.

PC-BASIC is free and open source software released under the GPL version 3.


http://robhagemans.github.io/pcbasic/



It is written in Python so maybe nosystemdthanks will be curious how it works.
Back to top
View user's profile Send private message 
nosystemdthanks


Joined: 03 May 2018
Posts: 696

PostPosted: Tue 20 Nov 2018, 14:44    Post subject:  

puppy_apprentice wrote:

It is written in Python so maybe nosystemdthanks will be curious how it works.


ive already spent loads of time with the sourcecode. at the top of this page i said to puppyt,

Quote:
i assumed so. i doubt anyone is going to go farther than qb64 for compatibility-- though be sure you look at pc-basic too: https://sourceforge.net/projects/pcbasic/

because for very old stuff, it is a full-featured basica interpreter/emulator.

i tried adding features once. pc-basic isnt just an interpreter, it is a full-on retrocomputing experience. the way its designed is intended to replicate the same environment for basic programs-- with the same limitations, and it is meticulously implemented in a way that makes it incredibly tedious to work around. at least thats what i found. i was able to change screen 9 (gw-basic had no screen 12, that was a qb mode) to be higher resolution.

_________________
"microsoft is unique among proprietary software companies: they are the only ones who have actively tried to kill [floss]. it’s not often someone wants to be your friend after trying to kill you for ten years" -- bradley m. kuhn
Back to top
View user's profile Send private message Visit poster's website 
puppy_apprentice


Joined: 07 Feb 2012
Posts: 300

PostPosted: Tue 20 Nov 2018, 14:47    Post subject:  

Ok. I've missed this.
Back to top
View user's profile Send private message 
rockedge


Joined: 11 Apr 2012
Posts: 1280
Location: Connecticut, United States

PostPosted: Tue 20 Nov 2018, 15:16    Post subject:  

I like DosBox with QuickBasic 4.5....works really well.

Runs almost every program I wrote for QB4.5 all those years ago..plus DosBox runs all those DOS games and software as well. Also installed the qbasic interpreter and that worked great for some of the older style basic like with line numbers....

https://www.dosbox.com/
Back to top
View user's profile Send private message Visit poster's website 
zzz000abc

Joined: 17 Jan 2019
Posts: 1

PostPosted: Thu 17 Jan 2019, 14:38    Post subject: suitable basic for puppy
Subject description: i use Just basic and free basic
 

Hi friends,
after going through the discussion on best suitable basic for puppy I thought it's better to put my views on this topic.
I found just basic http://www.justbasic.com/jb20setup.exe
is simple and complete. you can use it without any problems once you install wine.I am using it on puppy for years without any problems.

Recently a few days ago and I found FreeBasic linux version.It is more interesting and powerful with number of external libraries.I was able to write few short programs within a couple of days.
Now I am planning to add a GUI to blue tooth streaming pet shown herehttp://murga-linux.com/puppy/viewtopic.php?t=97456.

you can download FreeBasic herehttps://sourceforge.net/projects/fbc/files
Back to top
View user's profile Send private message 
6502coder


Joined: 23 Mar 2009
Posts: 648
Location: Western United States

PostPosted: Sat 02 Feb 2019, 23:24    Post subject: Dodgem implemented in VintageBasic  

I have posted before about the free VintageBasic BASIC interpreter:
www.vintage-basic.net
and I was surprised at the (relative) amount of interest in my conversions
of two classic BASIC programs to VintageBasic:
http://murga-linux.com/puppy/viewtopic.php?p=962120#962120

This time I'm posting a VintageBasic version of the board game "Dodgem."
https://en.wikipedia.org/wiki/Dodgem
It should run with little or no further tweaking on any BASIC interpreter
that supports the old-school line-numbered BASIC.
Edit: confirmed works fine with Bywater BASIC. Chipmunk not so much:
apparently Chipmunk doesn't implement the ASC() function.


My starting point was the version printed in the book "More BASIC Computer
Games" by David Ahl. I found a typo-ridden OCR-generated copy of the
listing online, fixed the typos, rewrote the game instructions, added comments
and indentation to make the spaghetti-code somewhat easier to follow,
and fixed a couple of apparent bugs. Nonetheless, if you exclude the game
instructions, my version is clearly nearly the same as the original.
You are free to do what you like with my version, but of course the original
program listing is presumably covered by the copyright on the book, so....

Currently, the Linux binary for the VintageBasic interpreter is available in
64-bit only, but I have the 32-bit binary I downloaded back in July 2017 and
in fact that is what I used for this project. If you're interested in the 32-bit
binary, just PM me. I don't see a huge problem with me doing this given that
the source is open-source (BSD license) and posted publicly online for anyone
to grab and compile themselves, although apparently you need to have
Haskell installed. Edit: No worries, I'm good. I read the license and
redistribution is OK as long as I include the licensing document.
Dodgem.vbas.zip
Description  Remove fake ".zip" extension. The "Dodgem.vbas" file is plain text. This is an improved version.
zip

 Download 
Filename  Dodgem.vbas.zip 
Filesize  10.34 KB 
Downloaded  30 Time(s) 

Last edited by 6502coder on Tue 05 Feb 2019, 19:52; edited 3 times in total
Back to top
View user's profile Send private message 
Puppyt

Joined: 09 May 2008
Posts: 894
Location: Gatton, Queensland

PostPosted: Sun 03 Feb 2019, 00:36    Post subject:  

Hi 6502coder - thanks so much for posting this! I regret that I haven't been notified of new posts to this thread, just caught it using "View posts since last visit" whenever I am procrastinating. Regret I won't be able to test this for a while - thanks for your dedication to the Ahl volume(s), by the way. I think I have an archive somewhere of BAS games I have collected over the years, meaning to work through them at some stage but alas - real life issues... Cheers Smile
_________________
Search engines for Puppy
http://puppylinux.us/psearch.html; Google Custom Search; http://wellminded.net63.net/ others TBA...
Back to top
View user's profile Send private message Visit poster's website 
6502coder


Joined: 23 Mar 2009
Posts: 648
Location: Western United States

PostPosted: Sun 03 Feb 2019, 01:11    Post subject:  

Hi Puppyt,

Understood! I only took on this little project because it's been a dreary rainy day with a big snowstorm coming, making power iffy, and I needed something I could do on an ancient laptop powered off a small UPS. This fit the bill. To be honest I haven't done anything else with BASIC since I posed that How-To on making BASIC programs click-to-run.

Cheers!
Back to top
View user's profile Send private message 
6502coder


Joined: 23 Mar 2009
Posts: 648
Location: Western United States

PostPosted: Mon 04 Feb 2019, 01:34    Post subject:  

The question of the relative merits of various BASICs having been broached earlier
in this thread, I humbly offer my own evaluations, on the off chance they might
be useful to others.

The question "Which is best?" immediately begs the question, "For what?"
Hence I want to make it clear that my own requirements are probably very
different from Puppyt's.

My own interest is limited to BASIC interpreters that support the old-school
line-numbered style BASIC, for the purpose of implementing classic BASIC
programs from the 1980s--or new programs in that style.

The only graphics capabilities I need are what can be drawn on a terminal.
Color would be nice but monochrome is sufficient. The only user-input device
I need to have supported is a keyboard.

I want an interpreted BASIC, preferably in the form of a single Linux executable
with no dependencies beyond the most basic, standard libraries that any
Puppy would have by default. I need it to run on 32-bit hardware.

If I'm not willing to tolerate having to install additional libs, you can
guess what my attitude is to running anything in WINE or DOSBox. As they say
back in Texas where I used to reside, "That dog don't hunt."

I am explicitly NOT interested in modern, structured BASIC -- my needs for a
simple structured language to implement simple games are fully met by
Javascript, as exemplified by the game I wrote a while back for the
Puppy Newsletter. For fancier stuff I use Python and Tk/Tcl.

I am also NOT interested in being able to compile BASIC programs into
standalone Linux executables. So I have no interest in FreeBASIC or BaCon.

So with those stipulations in mind, and having looked at some of the BASICs
mentioned in this thread, here are my conclusions so far.

Bywater BASIC is my first choice. It has the ability to implement a number of
different dialects of BASIC, which eases the task of getting ancient classic
programs running. The interpreter is standalone and "only" about 610 KB,
which although absurdly enormous compared to the 8 KB Atari BASIC and 16-32 KB
Microsoft BASICs of the good old days, is apparently not bad for a Linux BASIC.
Bywater BASIC also has the merit of having been under development for a VERY
long time (since at least 1993), so one can hope it has relatively few bugs.

VintageBASIC is a close second. It does everything I need. The interpreter
is about 1 MB. However, Bywater BASIC can grok the VintageBASIC dialect, so
that gives Bywater an edge.

SmallBASIC is also about 1 MB, but the dependency on SDL libs is a show-stopper.
Also, development for the 32-bit version apparently ceased in 2017.

Chipmunk BASIC is admirably small at about 196 KB, but alas is missing fundamental
stuff like the ASC() function. No wonder it's so small...

FreeBASIC I've already mentioned as disqualified because it's a compiler, and
I want an interpreter. Moreover, the executable is a pudgy 1.9 MB --
3 times the size of the Bywater BASIC executable.

These are MY opinions based on MY requirements, so no offense to
fans of the BASICs I have rejected. Your mileage will no doubt vary.
Back to top
View user's profile Send private message 
6502coder


Joined: 23 Mar 2009
Posts: 648
Location: Western United States

PostPosted: Tue 05 Feb 2019, 02:48    Post subject: new version of Dodgem.vbas  

I uploaded a new version of Dodgem.vbas, posted above.
This improves the game by making the computer's moves less predictable.
Back to top
View user's profile Send private message 
Puppyt

Joined: 09 May 2008
Posts: 894
Location: Gatton, Queensland

PostPosted: Wed 06 Feb 2019, 01:09    Post subject:  

Cheers again 6502coder - you are a man after my own heart Smile Much appreciated views on your BASIC approach, and might I add that the 80's -vintage BASIC programmes that Usborne Press gave out online links for are still active, if you wanted motivation Wink

Although we are of similar vintage and I guess inclination, I had to search up on "compilers versus interpreters", to ensure I was reading from the right pages. https://www.programiz.com/article/difference-compiler-interpreter and Here https://www.thecrazyprogrammer.com/2014/07/compiler-vs-interpreter.html sorted me out with dot-points. Yay. And then I had to do a quick trawl to update my memory banks to find this neat summary of free (and current?) BASICS https://www.thefreecountry.com/compilers/basic.shtml.
Although, I like where rockedge was going earlier with Geany/BaCon, and the compilation of some naff stand-alone applications to replace the standard "Fun" selection in official Puppy lines seems like a cause I could take up... Dammit - back to the grindstone. Cheers again

[off-stage can be heard singing "I'm a grind stone cowboy..." Badly.]

_________________
Search engines for Puppy
http://puppylinux.us/psearch.html; Google Custom Search; http://wellminded.net63.net/ others TBA...
Back to top
View user's profile Send private message Visit poster's website 
6502coder


Joined: 23 Mar 2009
Posts: 648
Location: Western United States

PostPosted: Wed 27 Feb 2019, 03:09    Post subject: The L-Game in BASIC  

Here's another BASIC program for your retro-amusement. The "L-Game" appeared in David Ahl's 1979 book "More BASIC Computer Games." I've done a completely new implementation in Bywater BASIC, which I've settled on as the best BASIC for my purposes. The program should run in most line-numbered BASICs with little or no modification.

The zip file contains the BASIC program, "LGame.wbas", and a "Readme.txt"; both are plain text files.
LGame.zip
Description  Unzip anywhere: contains "LGame.wbas" and "Readme.txt"
zip

 Download 
Filename  LGame.zip 
Filesize  5.51 KB 
Downloaded  20 Time(s) 
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 4 of 4 [58 Posts]   Goto page: Previous 1, 2, 3, 4
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
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.1408s ][ Queries: 12 (0.0217s) ][ GZIP on ]