QLCOMMANDER - testers and help needed

Anything QL Software or Programming Related.
User avatar
7alken
ROM Dongle
Posts: 48
Joined: Tue Apr 18, 2023 2:23 am

Re: QLCOMMANDER - testers and help needed

Post by 7alken »

Andrew, thanks a lot for reply. I need to clarify more. I touched QL only for few minutes in mid 80ties, when one friend got one (and was alone here), while we all had Atari XL (mine) or Spectrum or Sharp MZ-800 (they played with CP/M also). At that time, we were experimenting with graphics and games, sure. But for me, home computer was learning tool about computers mostly. On Atari, most interesting part of ROM was probably "CIO" system of devices (may be Paul Laughton wrote this?, nice history video on youtube)...

I rediscovered QL only few months back, while testing XorA "qdos-devel" docker compilation of my small C project. Then 14 days ago, I discovered QPC2/SMSQ/E and started to investigate more about internals and entire history of this computer and QDOS and all things past that... Because QPC2 is FAST, in fact ED editor behaves like "embedded hardware" on my Win10/NUC10 core-i7. I now understand surface of PE/WMAN/HOTKEY above QDOS, so integrated SMSQ/E but most interesting for me is SBASIC interactive interpreter for FAST PROTOTYPING. I know its simple language, only integers/strings (I ignore floats, intentionally), only arrays, no structs, no hastables/dictionaries (sad?), the raw SBASIC integrates/mixes commands for text display IO, at least some colors (not much, but again, its FAST), but these are all nice constraints for simple/old language which mimics quite lot something I need to develop for my VMEX engine (RV32EM-like) as native "high-level assembler, slightly below C". And I can use SBASIC as transpilation target to model/prototype this thing, while having existing (G)UI features inside, having some real example app (yours great QLC, as norton-like commander is for me simply mandatory shell for everything with CPU inside ... on win, TotalCommander for decades, with notepad replaced by FAST SciTE). So, having QLC in source, right under hands to experiment and use INTERACTIVE INTERPRETER for quick changes/experiments with access to FAST ED (I wish to have this editor with almost "embedded speed" had syntax highlight, indentation awarenes, for "lineless ssb or my own syntax" ... this is something I can imagine to write as compiled extension, ya, but can live without that).

For me, this interpreter interactivity is KEY now. SBASIC is mixture of myriad commands, ya, no structs/records, no hash/dict but you DID real application in it - 4K lines is not bad for norton-like commander, IMHO, its now for me more readable and I can try some more refactorings around it, I can imagine more constants/styles/sharing for UI, even more simplified - sure, SBASIC has not "C printf", its now probably harder to externalize messages (but simple indexed preloaded array may be OK for this), it absolutely is OLD hairy style of mixture of logic and UI, so no MVC, no passive views, data model and controller (but I have some experience with this, as I in fact injected MVC-style in early 90ties into pascal-like interpreted DB environment and it WAS EASY... the final result). I simply saw QL(X)C as great example of REAL application with that simple features, where I can try to develop/model behavior of my own language, more near to "C" in syntax, but even simpler (targeting in fact VMEX "processor" in future, elsewhere, out of QDOS/SMSQ/E ...), testing whats possible to express in it, how easy and READABLE it is (for me, the KEY for swdev; forth-guys, excuse me ))).

I am also quite fine with simple text IO and few colors, while 4/8 is not much, but text screen is okay - as the VMEX is in fact mostly "embedded" thing, down to 8bit MCUs, while there I can imagine more terminal-style serial channel with few FAST control codes (even simpler than ADM/ANSI, may be near to C-Plus/4 only or so). Again, in SBASIC its integrated/glued into language. I only need to maintain more separation of things by organizing code, if possible, at least to try it, with so low lang features. BTW, in my lang, the ASLIX, even "for is considered harmfull; and goto is back;" :-)))

So, to not clash with the QLC, I will probably name it really QLXC, I understand my approach of "eXperimental reseaarch, almost" can be confusing for oldtimer QLer's... nearly crazy, ya )))


User avatar
7alken
ROM Dongle
Posts: 48
Joined: Tue Apr 18, 2023 2:23 am

Re: QLCOMMANDER - testers and help needed

Post by 7alken »

For those interested, here is my SciTE editor current state (win), usable for rendering this "simplified ssb" as VisualBasic (vb.properties) lexer. I hope configs are applicable to linux also.
Attachments
231126a SciTE (mixworx).zip
(2.36 MiB) Downloaded 324 times


Derek_Stewart
Font of All Knowledge
Posts: 4790
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: QLCOMMANDER - testers and help needed

Post by Derek_Stewart »

Hi,

Created a new thread for this:
viewtopic.php?t=4581

I install SciTE from the Linux Mint/Debian repository, seems SciTE is a well supported editor.

Here it is editing a Sinclair Spectrum Game: Haunted Bell Tower:
SciTE.png
It looks to be running with LUA, which was another ideal for a QL Port.

I just have to setup up the links to sQLux or other QL emulator, to run the programme.
Last edited by Derek_Stewart on Mon Nov 27, 2023 11:20 am, edited 2 times in total.


Regards, Derek
User avatar
Andrew
QL Wafer Drive
Posts: 1048
Joined: Tue Jul 17, 2018 9:10 pm

Re: QLCOMMANDER - testers and help needed

Post by Andrew »

7alken wrote: Sun Nov 26, 2023 10:16 pm ... SBASIC has not "C printf",...
It has PRINT_USING, which is close to C printf
https://superbasic-manual.readthedocs.i ... using.html


User avatar
7alken
ROM Dongle
Posts: 48
Joined: Tue Apr 18, 2023 2:23 am

Re: QLCOMMANDER - testers and help needed

Post by 7alken »

Andrew wrote: Sat Nov 25, 2023 8:29 pm I do not understant this. I mean, running QLCommander in interpretor it's not really ok, as some functionality will be lost (you will not be able to load another basic source or run a program that has a basic loader). Also in the event that QLCommander's execution is not correctly stopped then the allocated memory will not be released.
Hi Andrew after many months, this is still living as QLXC using (now) LSB (light super basic) having that informally simplified parsing, which I just now teached the GPT to process and analyze because of trying to formalize fetching of big picture from your already so clean and simple great norton-like thing :-) Here is described entire journey how is possible to talk with machine which IS in fact thinking quite a lot, I feel - at least its enough that I can now at the morning get some whisky and go to bed )))
https://chatgpt.com/share/672f0016-397c ... 1f6582a4c7

you probably meant limited usage on BBQL, but I am in QPC2+SMSQ/E, where interpreting has no limits on loading and executing another SB code, and I even load and execute directly that LSB (line numbers injected on the fly) - no more my work on the QLXC since last contact, but its SO SIMPLE that syntax and everything, that I was immediately able to work with the code again after many months and even teach its structure and basic syntax the machine ... primitive manual high-level parser speaks volume, this SB and QL world was beauty ...
Petr


User avatar
7alken
ROM Dongle
Posts: 48
Joined: Tue Apr 18, 2023 2:23 am

Re: QLCOMMANDER - testers and help needed

Post by 7alken »

here is result of python just now (copied form html table, grrr) ... it will continue as I love simplicity of mostly line oriented syntax and will adapt it to my needs, using emulator to model on transpiled code from ASLIX for VMEX later (dont want to push it here by force - but QL was first 32bit machine where I compiled C by xora docker image):

Code: Select all


Subroutine Usage Analysis

Lowercase Subroutines
Type	Subroutine Details	Usage Count
defproc	x	213
defproc	q	23
defproc	r	18
defproc	l	16
defproc	c
    local ssb_fn$, test_fn$	12
defproc	s	9
defproc	w	6
defproc	h	6
defproc	n(i)	5
defproc	dbg(s$)	5
defproc	e	4
defproc	u	3
defproc	xc	2
defproc	readConfig
    local a$, ch	2
deffn	isBasicRunning	2
deffn	isBasicProgramLoaded	2
deffn	isBasicProgramEdited	2
defproc	dbginit	2
defproc	dbgstop	1

Uppercase Subroutines
Type	Subroutine Details	Usage Count
deffn	GetFFlg(fList$, fIndex)	43
defproc	ListFiles(FileList$, StartPos, Index, ch)
    local a$, i, size, EndPos, nochars, x, DFlen1, DFLen2	35
defproc	MessageWnd(width, height, type, text$)
    local ch, k$, AtX, AtY	28
defproc	PutFFlg(fList$, fIndex, newVal)	20
deffn	Find(str$, id, FileList$, no, size)
    local top, bot, mid, nextFNam$	19
defproc	ShowHideCursor(Linepos, Index, FileList$, SoH)
    local a$, x, DFlen1, DFLen2	19
deffn	GetFLen(fList$, fIndex)	13
deffn	Insert(str$, id, FileList$, DoF, r_SizeDir, r_SizeFile, fLength$)
    local i, size	12
deffn	IsDir(_)
    local k	9
deffn	DlgWnd(width, height, title$, text$)
    local ch, a$, k, AtX, AtY, loopa	9
defproc	LoadDir(dev$, FileList$, Chan, r_SizeDir, r_SizeFile)
    local ch, i, head_start, totrim, flength, file$, ftype, size2, res, DirOrFile, id, filelen$, k$, no_files	7
defproc	ExecXchange(path$, filename$)
    local savedDATAD$, savedPROGD$	7
defproc	JumpTo(a, what)
    local x, start	6
defproc	Copy1File(name$, source$, dest$, filelen$, UpdateList)
    local x, page	5
defproc	ReloadPanel(panel, Index)
    local page, x
    dim LeftFiles$(MaxFiles, _fMax), RightFiles$(MaxFiles, _fMax)	5
defproc	PutFLen(fList$, fIndex, newVal)	5
defproc	MoveTop(fList$, r_StartPos, r_Index, ch)
    local top, x, size	5
deffn	CopyFullDir(name$, source$, dest$, panel, UpdateWnd, CheckNoQ, UpdateList)
    local x, ch, loop, d$, fp, newname$, newsource$, newdest$, totrim	5
deffn	DeleteDirectory(source$, name$)
    local ch, loop, d$, newsource$, newname$, fp, totrim, x	5
defproc	CloseProgram
    local ch	4
defproc	LShowLeftDir
    local i
    dim LeftFiles$(MaxFiles, _fMax)	4
defproc	LShowRightDir
    local i
    dim RightFiles$(MaxFiles, _fMax)	4
defproc	ViewImage(a$, m)
    local ch, ch1, scrSz, scrBuf, maxScrSz	4
deffn	DirExists(name$)
    local er, ch, d$, dname$	4
deffn	IsQuillDoc(a$)
    local ch, q$, i, k	4
defproc	OnEnter
    local ext$, path$, a$, x, i	4
defproc	CopyRec(fList$, fIndex, fListDest$, fDestIndex)	4
defproc	DrawWindows(reload)
    local left, ch, w, h, x, y, c, px, py	3
defproc	MoveDown(FileList$, MinPos, r_Index, r_StartPos, SizeFile, SizeDir)
    local size, idx	3
defproc	MoveUp(FileList$, MinPos, r_Index, r_StartPos, SizeFile, SizeDir)
    local size, idx	3
defproc	MovePageDown(FileList$, r_StartPos, r_Index, ch)
    local size, x	3
defproc	MovePageUp(FileList$, r_StartPos, r_Index, ch)
    local top, x, size	3
defproc	OpenSubDir(FileList$, Index, ch)
    local a$, size, d$, x, page
    dim LeftFiles$(MaxFiles, _fMax), RightFiles$(MaxFiles, _fMax)	3
defproc	InputDir(ch)
    local a$, olddir$	3
defproc	ViewFont(file$, type, ch)
    local lng, i, base, type$	3
deffn	Create1Dir(DirName$, FullDirName$, panel, UpdateWnd, CheckNoQ, UpdateList)
    local res, fres, page, msg$	3
deffn	CountSelected(_)
    local i, counter	3
deffn	IsZipFile(a$)
    local ch, q$, i, k	3
defproc	WriteCommands(ch)
    local l, r, px, px1, i, x, lat	3
deffn	IsReadOnly(a$)
    local res	3
deffn	CopyAListFile(name$, source$, dest$, filelen$, panel)
    local k	3
defproc	AttachBasFileShell(filename$)	3
defproc	LoadBasFile(filename$)
    local x	3
deffn	CompileSsb2Bas(ssb_filename$, bas_filename$)
    local i, x$	3
defproc	PutFNam(fList$, fIndex, newVal$)
    local nVLen	3
defproc	MoveLast(fList$, r_StartPos, r_Index, ch)
    local top	3
defproc	QLC_INIT	3
defproc	StopWithError(errorMessage$)	2
defproc	OpenWindows
    local ch, titleFountFN$, titleFountLen, mainFountFN$, mainFountLen, comFountFN$, comFountLen	2
defproc	InitialiseVars
    dim cmdText$(9, 9)	2
defproc	MainLoop
    local a$, x, y$	2
deffn	FindFirst(a, what)
    local i, istart, iend, found	2
defproc	ChangePanel	2
defproc	SelectFile	2
defproc	ViewFile
    local ext$, a$, x, i, ch, ch1, ch2, ch3, left, windef$, wid, hgt, top	2
defproc	CreateDir
    local x, DirName$, FullDirName$	2
deffn	TestQubideRestriction(DirName$, panel)
    local i, name$	2
defproc	RenameFile
    local NewFileName$, filename$, sourcepath$, res, i, x, filelen$, page	2
defproc	ShowInfo
    local filename$, path$, chf, ch, ch1, ch2, x, k$, windef$, left, top	2
defproc	CopyFiles
    local k, x, name$, source$, dest$, filelen$, panel	2
defproc	CopyMultipleFiles(k)
    local ch, ch1, i, x, a$, Index, panel, page, id, left, windef$, hgt, wid	2
defproc	DeleteFiles
    local source$, name$, panel, x, k, a$, ch, ch1, Index, left, windef$, hgt, wid	2
defproc	EXecFile
    local filename$, path$, chf, x	2
defproc	UnzipFile(filename$)
    local path$, ch, ch1, ch2	2
defproc	EditFile(path$, filename$)
    local savedDATAD$, savedPROGD$	2
defproc	LoadSsbFile(filename$)
    local ssb_filename$, bas_filename$, i, x$	2
defproc	DoEdit
    local path$, a$	2
defproc	DoLrespr(filename$)
    local x	2
deffn	IsAbacusDoc(a$)
    local ch, q$, i, k	2
deffn	IsArchiveDoc(a$)
    local ch, q$, i, k	2
defproc	SelectAll
    local i	2
defproc	UnSelectAll
    local i	2
defproc	Set78CharSet	2
deffn	TestFount(fountBase)
    local fountMask, fountMax, char, row	2
defproc	LRUNBasic
    local i, a$, path$, ext$	2
defproc	SetPalletteQL	2
defproc	CopySingleDir(name$, source$, dest$, panel)
    local ch, ch1, i, x, a$, Index, page, id, left, windef$, hgt, wid	2
deffn	IsDirEmpty(DirName$)
    local ch, fp, d$, loop, res	2
defproc	CompareDirs
    local i, res	2
defproc	InvertSelection
    local i	2
defproc	CopyDirFiles(name$, source$, dest$, CreateWnd)
    local ch, ch1	1
deffn	GetFTyp(fList$)	1
deffn	GetFDat(fList$, fIndex)	1
deffn	GetFPar(fList$, fIndex)	1
defproc	PutFTyp(fList$, fIndex, newVal)	1
defproc	PutFDat(fList$, fIndex, newVal)	1
defproc	PutFPar(fList$, fIndex, newVal)	1
deffn	GetParentDir$(ch)
    local i, dir$	0
deffn	InputWnd$(width, height, title$, text$, start$)
    local ch, ch1, k$, AtX, AtY	0
deffn	GetKey$(c)
    local k$	0
deffn	GetFNam$(fList$, fIndex)	0

Undeclared Internal Functions
Type	Function	Usage Count
string	chr$	115
numeric	len	58
numeric	fopen	32
string	inkey$	17
numeric	ftest	12
numeric	code	12
numeric	flen	6
numeric	alchp	6
numeric	fop_dir	5
numeric	peek	5
string	fill$	5
numeric	LONGINTEGER	4
numeric	ftyp	4
numeric	peek_l	4
numeric	keyrow	4
string	lower$	4
numeric	respr	3
numeric	BASIC_B	3
numeric	BASIC_W	3
numeric	eof	3
string	in$	3
string	INTEGER$	3
numeric	fop_in	2
numeric	INT	2
numeric	fop_over	2
numeric	fmake_dir	2
string	input$	2
string	upper$	2
string	edit$	2
string	date$	2
string	LONGINTEGER$	2
numeric	rechp	1
numeric	PEEK_W	1
numeric	EOF	1
numeric	BASIC_L	1
string	get$	1
string	VER$	1
string	STRING$	1
Last edited by 7alken on Sat Nov 09, 2024 10:31 pm, edited 1 time in total.


Derek_Stewart
Font of All Knowledge
Posts: 4790
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: QLCOMMANDER - testers and help needed

Post by Derek_Stewart »

HI,

What is QXC and LSB?


Regards, Derek
User avatar
7alken
ROM Dongle
Posts: 48
Joined: Tue Apr 18, 2023 2:23 am

Re: QLCOMMANDER - testers and help needed

Post by 7alken »

Derek_Stewart wrote: Sat Nov 09, 2024 7:13 am What is QXC and LSB?
here on page, last mods I did year ago was "231125e qlc - NO integers.zip":
viewtopic.php?t=2669&start=120

QLXC = manually modified original QLC (current at that time) to remove line numbers, make it lowercase, "mostly" remove multi statement lines with ":" to be more visually linear (I was learning SB, and like rather code flowing top-down) except very simple for loops or so, manually replaced DEFine PROCedure by "defproc" and DEFine FUNCtion by "deffn" and all the "end some" glued into single keywords for better coop with SciTE syntax coloring definitions, REMark changed to '' double(!) apostrophe (again aligns with SciTE vb lexer), and finally, again for clarity, I removed all the "%" integers suffix (knowing the consequences, but even interpreter as I read somewhere isnt much slower then) I added also lot of spaces into code for more readability (for me, learning SB, C# clarity rules) and not expecting use of BBQL (I have no flash MDV on it yet, also - I am not oldtimer QL'er, but fell in love with QPC2+SMSQ/E) and probably some few more changes, its all in code ... this is basically SSB-like, now rather LSB to not clash this variant with SSB, but its similar ... then I added into QLC way to open such LSB code, edit it and transpile/run even directly as SB (it injects at the lines above 32700 some single letter tools also), its not absolutely robust, but I did best I can at that time, ... now I will probably return to it and continue, because entire concept of norton-like QLC is ADDICTION for me and I want to have simple tool without line numbers, integrated int QLXC as tiny IDE for that purpose (my own things not realted only to QL but down to small 8-bit chips) - being UNCOMPILED always, being dynamic (ya, TB directives also commented out - it was lot of manual work by learning and learning by work, few days) ...

Andrew told that it must have some limitations as it is not compiled - I cant see any, or I am not experienced enough - ya, its more fragile, as you can modify even QLXC itself while is running then save and kill it, happened more than once ))))

so, they are simply my toys around QLC and SB :) ... why QLXC? because I run it as "xc" ))
Petr

below is year old example, win-edited file extension still SSB, but will change it to LSB soon;
I just feel its almost perfectly (for me) formatted code for readability now,
ignoring the runtime memory overhead,
prioritizing readability and dynamic execution/quickmods in win QPC2+SMSQ/E emu;
Attachments
qlxc+lsb code example -- Screenshot 2024-11-09 234817.png
qlxc_lsb.zip
(20.06 KiB) Downloaded 58 times


User avatar
7alken
ROM Dongle
Posts: 48
Joined: Tue Apr 18, 2023 2:23 am

Re: QLCOMMANDER - testers and help needed

Post by 7alken »

hi all, from todays night shift with LSB specifically, we tried with GPT to grasp basics of syntax from existing QLXC_LSB example,
nice journey after all ... and it forces me to think more, nice :-)
https://chatgpt.com/share/67301579-3220 ... 54d4bb58f9

yeah, "Even the journey can be the destination." ))
https://www.youtube.com/watch?v=3PypweyDO_g


Derek_Stewart
Font of All Knowledge
Posts: 4790
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: QLCOMMANDER - testers and help needed

Post by Derek_Stewart »

HI

Looks great, but how do you know which is builtin commands from the S*BASIC interpreter or Procedures/Functions and variables.


Regards, Derek
Post Reply