0.12.18 released

Started by chrisws, March 16, 2020, 09:30:20

Previous topic - Next topic

lettersquash

Quote from: round157 on March 24, 2020, 22:24:00
Quote from: lettersquash on March 24, 2020, 19:51:10
here's a better example for being a bit simpler.

I have tried your example. The problem of "Inkey" is typematic delay: when I press a key but don't release, the "@" will move one step, then will stop a moment, then will move again. I see, "@" did not move continuously. It is a problem.
Hmm, yes, thanks, maybe that's all it is. It is of course dependent on the typematic delay, but it will also depend on the speed the interpreter processes the command. Maybe it's as fast as it should be, whatever that means, I was just surprised that I can't write code with flow control via some keys in the way I expected. However, I checked out the same kind of test in BBC BASIC for Windows, and that wasn't any better.

The repeat rate in my keyboard settings is on maximum (it isn't continuous, of course, but repeated). I also realise the speed isn't going to be like it is in a text box, and I'm printing at the graphics cursor - changing to a suitable locate y,x command speeds up both loops to the eye and the physical distance moved across the screen - but proportionally; the keyboard polling takes a good lump of time (technical term ;) ). Oh well, another lesson. I have a feeling my old Acorn Electron from 1983 used to respond to key presses much faster - maybe because it only had a very limited set of tasks.
I'll have you know, I'm coding all the right commands, just not necessarily in the right order.

lettersquash

#16
Quote from: round157 on March 24, 2020, 23:34:27
sbasicg.exe -- It is an editor with dark texts(dark green, dark grey, etc.) and black background. Therefore, it is hard to view. If colours can be changed, this editor will be suitable for editing.

Did you see this? Scroll down to "How to help design a better looking editor color theme" https://smallbasic.github.io/pages/sdl.html

I've not tried it yet, and it describes a manual method rewriting the settings file, but I intend to have a go soon....or just trying one of the others with alt-t might suit you.
I'll have you know, I'm coding all the right commands, just not necessarily in the right order.

round157

Quote from: lettersquash on March 25, 2020, 00:01:37
Did you see this? Scroll down to "How to help design a better looking editor color theme" https://smallbasic.github.io/pages/sdl.html

Thank you!!! I have edited the text file and the file name is settings.txt. I uploaded to this forum. You can download in this post and the colour combination may be liked by you.

round157

Quote from: chrisws on March 16, 2020, 09:30:20

Cheers,

A proposal: a theme for sbasicg.exe was made by me. If you think that this theme is okay, you can set this theme as one of the default themes for the next version of SmallBASIC. Here:
https://www.syntaxbomb.com/index.php/topic,7521.msg347040931.html#msg347040931


round157

Quote from: lettersquash on March 24, 2020, 23:50:08

Hmm, yes, thanks, maybe that's all it is. It is of course dependent on the typematic delay, but it will also depend on the speed the interpreter processes the command. Maybe it's as fast as it should be, whatever that means, I was just surprised that I can't write code with flow control via some keys in the way I expected. However, I checked out the same kind of test in BBC BASIC for Windows, and that wasn't any better.


First, I am only a learner of programming. Second, I am not too familiar with SmallBASIC. I hope that chrisws will solve the keyboard control problem in the next version of SmallBASIC.

Nevertheless, I know that BBC BASIC for Windows is suitable for game development. I think that there is no keyboard control problem with BBC BASIC for Windows.:)

Many games made with BBC BASIC for Windows can be downloaded from this website. Ha...no keyboard control problem.
http://www.proggies.uk

round157

Quote from: chrisws on March 16, 2020, 09:30:20

Cheers,

Hi...

Another proposal: add this feature to the next version of sbasicg.exe: make EXE file -- pack sbasicg.exe and one source code file into one single executable file.

Two purposes:
1. SmallBASIC users can distribute their finished programs to end-users easily.
2. Source code will not be viewed easily by end-users. Thus source code will be protected.

bplus

#21
Quote from: round157 on March 26, 2020, 00:24:08
Quote from: chrisws on March 16, 2020, 09:30:20

Cheers,

Hi...

Another proposal: add this feature to the next version of sbasicg.exe: make EXE file -- pack sbasicg.exe and one source code file into one single executable file.

Two purposes:
1. SmallBASIC users can distribute their finished programs to end-users easily.
2. Source code will not be viewed easily by end-users. Thus source code will be protected.

It's a lot of work building a compiler for an interpreter!

If you want EXE's I suggest trying QB64, 0 interpreter. Funny some of the guys at that forum are asking for Interpreter too, like the old QB45 when a highly paid professional team of software engineers put together a package that could do both!

And it is a hell of allot easier to distribute SmallBASIC programs, it is not much more than a txt file, you can email them! What's so hard getting SmallBASIC to run them?

Accept it for what it is, a damn fine Basic Interpreter.
1 person likes this

round157

#22
Quote from: bplus on March 26, 2020, 14:41:31
Quote from: round157 on March 26, 2020, 00:24:08
Quote from: chrisws on March 16, 2020, 09:30:20

Cheers,

Hi...

Another proposal: add this feature to the next version of sbasicg.exe: make EXE file -- pack sbasicg.exe and one source code file into one single executable file.

Two purposes:
1. SmallBASIC users can distribute their finished programs to end-users easily.
2. Source code will not be viewed easily by end-users. Thus source code will be protected.

It's a lot of work building a compiler for an interpreter!


Hi... I didn't mean "compile". Not "compile". I said "pack". I meant "embed" or "attach". I try to explain with my insufficient knowledge:

The interpreter(sbasicg.exe) and the source code are embedded in one EXE file, but there is no compilation in the process. "Combine" may be a suitable adjective. The source code is hidden because it is inside the EXE file. Moreover, if obfuscation or encryption can be done for the source code before "comblne", the source code will be safely protected(not only hidden).

A near comparison is Python(not exactly the same). Python source code files are .py files. Some small softwares can convert .py files to EXE files, so finished program distribution will be easier.

bplus

#23
QuoteHi... I didn't mean "compile". Not "compile". I said "pack". I meant "embed" or "attach". I try to explain with my insufficient knowledge:

Oh yeah! the SDLBasic method, OK now I understand. Crypt the bas source, and attach to the end of a special version of SB that tells itself to find the encrypted part of itself at the end of normal SB.exe, decrypt and run that decryption, piece of cake!  ;-)
1 person likes this

round157

#24
Quote from: bplus on March 27, 2020, 14:20:40
QuoteHi... I didn't mean "compile". Not "compile". I said "pack". I meant "embed" or "attach". I try to explain with my insufficient knowledge:

Oh yeah! the SDLBasic method, OK now I understand. Crypt the bas source, and attach to the end of a special version of SB that tells itself to find the encrypted part of itself at the end of normal SB.exe, decrypt and run that decryption, piece of cake!  ;-)

Thanks for your kind support! Chris may not have this kind of programming knowledge or skill. I expect that Chris searches other programming webpages for this kind of programming skill and learns how to apply this kind of skill in version 0.12.19.

"Generate EXE file" feature will be very helpful to SmallBASIC users.


round157

#25
Quote from: chrisws on March 16, 2020, 09:30:20

Cheers,


One more proposal for version 0.12.19: it is about sbasicg.exe. On the "source code page", after I changed the colours of the texts, it is easy to view the texts on this page. However, the colours of the three kinds of texts on the "directory page" cannot be changed. It is still difficult to view the three colours of the texts on this page. My proposal is that SmallBASIC users can set the colours of the three kinds of texts of the "directory page" by editing the settings.txt file.

round157

#26
Quote from: chrisws on March 16, 2020, 09:30:20

Cheers,

Another proposal: typematic delay makes game control development impossible.
??? :(
https://www.syntaxbomb.com/index.php/topic,7552.0.html

round157

One more proposal: source code files of SmallBASIC are .bas files. Source code files of many other BASIC dialects are .bas files as well. Some SmallBASIC users will be in confusion. I have an idea. Using .sb as the file extension in future versions of SmallBASIC can avoid confusion.

k1

@author

Is there something like "continue" (skip a for-loop iteration)? Referece/language does not yield any such.

lettersquash

Quote from: k1 on April 01, 2020, 19:31:25
@author

Is there something like "continue" (skip a for-loop iteration)? Referece/language does not yield any such.
I noticed that. I can't find anything, and it would be useful, but you can use the goto method.
repeat
  blah
  if blah then goto misstherest
  blah blah blah
  blah, this is actually how I program, blah
  label misstherest
until damned

Unfortunately, I also find the internal NEXT doesn't work:

for x=1 to 5
blah
if x=2 then next
...
other numbers are fine blah
...
next

That gives an error about missing a NEXT on the same level as the FOR.
I'll have you know, I'm coding all the right commands, just not necessarily in the right order.