|
Post by johnno56 on Apr 6, 2022 7:30:29 GMT -6
I installed yabasic and it ran some simple examples just fine. I had to configure Geany as an editor as I was unable to install a GTK-server to run the GUI... Looking for some more examples...
|
|
|
Post by johnno56 on Apr 6, 2022 7:48:09 GMT -6
Not a lot of examples, but what I found, ran quite quickly....
|
|
|
Post by joe2874 on Apr 6, 2022 8:22:00 GMT -6
hello johnno56. i found this tetris pretty fast: github.com/letztes/tetristo see. there are not many examples. yabasic exists for ps2 but the examples I tested are not compatible with the latest version of yabasic... I will post links if I find more. my config for geany : interpret : yabasic "%f"Interpret into xterm : xterm -fa monaco -fs 16 -bg black -fg green -e "yabasic %f"you have to install xterm. I have configured it to display with large fonts otherwise it is unreadable. standalone compiler : yabasic -bind "%e" "%f"combine the interpreter and the source program to create a standalone executable.
|
|
|
Yabasic
Apr 6, 2022 12:10:39 GMT -6
Post by joe2874 on Apr 6, 2022 12:10:39 GMT -6
|
|
|
Yabasic
Apr 11, 2022 3:07:01 GMT -6
Post by joe2874 on Apr 11, 2022 3:07:01 GMT -6
|
|
|
Yabasic
Apr 11, 2022 6:25:40 GMT -6
Post by johnno56 on Apr 11, 2022 6:25:40 GMT -6
Ah yes. Rosetta. First place I searched for examples... Xterm is already installed and the command worked quite well... I will attempt to crate a bash script to save having to copy and paste each time... Tetris was pretty cool... Thos ps2 demos were good as well... Had to give up on some of the games... Not familiar with the controller and the keyboard layout... A simple GUI for yabasic would be nice... Command line works fine... but my typing speed is woeful... I will have to setup Geany properly to both edit and execute 'yab' files...Editing build commands are fine but I need to work out the proper config file so that the highlighting features work... I will make a copy of freebasic config file and try to modify it for yab... Many tanks for the links and commands...
|
|
|
Yabasic
Apr 11, 2022 8:47:17 GMT -6
Post by joe2874 on Apr 11, 2022 8:47:17 GMT -6
here are the steps to configure geany for a new language:
for example for yabasic whose file extension is *.yab
1/ edit file .config/geany/filetype_extensions.conf and add the following line section [Extensions] :
Yabasic=*.yab;
2/ create a new file named filetypes.Yabasic.conf in .config/geany/filedefs. in this file, it is possible to use the file filetypes.freebasic to adapt it to yabasic.
3/ do not forget to update the tools menu configuration
about yabasic. after testing the ps2 examples, this basic interpreter proves to be efficient, fast and easy to use. it lacks a gui...
|
|
|
Yabasic
Apr 11, 2022 13:45:01 GMT -6
Post by johnno56 on Apr 11, 2022 13:45:01 GMT -6
Thank you for the instructions. Much appreciated.
|
|
|
Yabasic
Apr 12, 2022 5:16:04 GMT -6
Post by joe2874 on Apr 12, 2022 5:16:04 GMT -6
when i compiled yabasic and created a deb package, i got a file of about 172kb while the original package has a size of 523kb. it seems that the author forgot to optimize the compilation. the yabasic executable has a size of about 898kb while the one i compiled has a size of about 302kb. an important difference that should impact the generation of the interpreter combined with a source code to obtain an independant program. to lighten the executable, use the strip command:
sudo strip -s yabasic
man strip for more information.
|
|
|
Yabasic
Apr 12, 2022 13:11:38 GMT -6
Post by johnno56 on Apr 12, 2022 13:11:38 GMT -6
Did not know about 'strip'. Looks like I will be doing some more reading... Cool...
|
|
|
Yabasic
Apr 13, 2022 3:17:40 GMT -6
Post by joe2874 on Apr 13, 2022 3:17:40 GMT -6
johnno56
interesting, your code runs on my computer in 17.623 seconds with the original version of rcbasic. with the one compiled with the -Ofast option the code runs in 15.225 seconds.
after adaptation to yabasic, the code runs in 11 seconds.
rcbasic
Dim start Dim endtime start = timer for n = 1 to 100000000 r = n*2-sin(88) next endTime = timer result = (endTime - start) / 1000 print "completed in: " + str(result) + " seconds" update()
yabasic
clear screen print "Wait..." print print "Start Time : " + time$ for n = 1 to 100000000 r = n*2-sin(88) next print "End Time : " + time$ print print "Completed in ... " , peek("secondsrunning") , " seconds" print end
the x11basic interpreter was very slow with a time of 226.13 seconds but after optimization in bytecode, the code runs in 6.05 seconds. after translation in c code and generation of a standalone executable, the code runs in 3.54 seconds.
x11basic
CLEARW d=TIMER for n = 1 to 100000000 r = n*2-sin(88) next n f=TIMER COLOR COLOR_RGB(1,1,0) TEXT 20,80,"Completed in " + STR$(f-d) + " seconds" SHOWPAGE KEYEVENT END
|
|
|
Yabasic
Apr 13, 2022 16:42:45 GMT -6
Post by rosy on Apr 13, 2022 16:42:45 GMT -6
Show this code in C. And I think you got the topic wrong ...
|
|
|
Yabasic
Apr 14, 2022 2:40:08 GMT -6
Post by joe2874 on Apr 14, 2022 2:40:08 GMT -6
Show this code in C. And I think you got the topic wrong ... i know that this is not a reliable test and that it depends on the type of variable used but on the same computer, it gives an idea of the speed of each language and the results seem coherent. yabasic with 11 seconds is surprising but considering the difference with x11basic, it seems that it is not a real interpreter but that it generates a pseudo-code before launching the program. this is what I wanted to check. in a loop the speed depends a lot on integer the long integer or real variable but I let the interpreters decide. this would not be possible in C where you have to declare the type of each variable. I am aware of this.
|
|
|
Yabasic
Apr 21, 2022 9:18:57 GMT -6
Post by joe2874 on Apr 21, 2022 9:18:57 GMT -6
I found a collection of yabasic source codes if it can interest some people. it's interesting to study. note that under geany you have to configure a terminal to launch some of them. you may have to slightly modify some because linux is case sensitive... galileano.tripod.com/basic/Programas.htm
|
|
|
Yabasic
Apr 21, 2022 17:24:16 GMT -6
Post by johnno56 on Apr 21, 2022 17:24:16 GMT -6
Thank you for the link. Much appreciated.
|
|