VOGONS


First post, by Peter Swinkels

User metadata
Rank Oldbie
Rank
Oldbie

The QBasic project's code:

https://github.com/PeterSwinkels/QB-Brainf_ck-Interpreter

I am running into speed and memory issues and can't see a straightforward solution, so if anyone feels like having a look and offering suggestions let me know.

If anyone replies I will post more details, otherwise I will just forget about this thread.

My GitHub:
https://github.com/peterswinkels

Reply 1 of 12, by Peter Swinkels

User metadata
Rank Oldbie
Rank
Oldbie

Hmmm, noone? Okay, then I will try solving my issue using VBDOS. Which imho is still similar enough to QBasic to meet my purpose of having fun writing an interpreter in a classic BASIC language.

My GitHub:
https://github.com/peterswinkels

Reply 2 of 12, by wierd_w

User metadata
Rank Oldbie
Rank
Oldbie

Keep in mind, you are using an interpreted language, to run an interpreted language.

Consider using QB7.1, and "Compiling" it. This removes the "Interpreter" overhead handling QuickBasic.

Also, "Print" commands are.... Abysmally slow. A math loop can execute dozens of times in the same clock cycle it takes to do a single print statement. Try VERY hard to avoid using Print to write to the screen. Basically *ALL* of QB's graphics functions are painful slow. This is why many 3rd party libraries with inline assembler exist for it. 😜

Reply 3 of 12, by Max Headroom

User metadata
Rank Newbie
Rank
Newbie

I'm tempted to encourage you to write this in Forth, but I'm afraid you probably don't program in Forth? 😉

Reply 4 of 12, by Peter Swinkels

User metadata
Rank Oldbie
Rank
Oldbie

If I felt like I had the time and energy to learn Forth I might actually feel tempted to do it just to prove a point. 😀

My GitHub:
https://github.com/peterswinkels

Reply 5 of 12, by Peter Swinkels

User metadata
Rank Oldbie
Rank
Oldbie

QB 7.1 eh? If vbdos doesn't work out that is a possibility.

My GitHub:
https://github.com/peterswinkels

Reply 7 of 12, by gerry

User metadata
Rank l33t
Rank
l33t

with a quick look - its lots of string things in QB and likely slow for reasons relating to QB itself, interpreted or compiled

with smaller programs i sometimes try to implement the same approach with another tool, for instance c in this case, partly to test the tool and partly to see if doing it again yields any insights i missed first time. it's a thought anyway

Reply 8 of 12, by Peter Swinkels

User metadata
Rank Oldbie
Rank
Oldbie

Well, I am going to try porting to PowerBASIC this time. (When I feel I have the time and energy and other priorities don't get in the way.)

With pb's quirks this is gonna be fun! 😀

My GitHub:
https://github.com/peterswinkels

Reply 10 of 12, by Peter Swinkels

User metadata
Rank Oldbie
Rank
Oldbie

Okay, so now it has become the second to last post... Anyway just look for the post with *.bas files attached...

See ya.

My GitHub:
https://github.com/peterswinkels

Reply 12 of 12, by Peter Swinkels

User metadata
Rank Oldbie
Rank
Oldbie

I am closing this topic for the time being. 😀

My GitHub:
https://github.com/peterswinkels