QL Tinkering

Helpful tips and guides, also new users can ask for help here.
User avatar
ql_freak
Trump Card
Posts: 216
Joined: Sun Jan 18, 2015 1:29 am

Re: QL Tinkering

Postby ql_freak » Wed May 27, 2020 12:23 am

RalfR wrote:In Sedit, I always saved SV_DDLST and set that to "0" so the TK2 default directories does not use them, as I want to find the real path. After that, I patched the var to its original state.


Nice trick, BUT VERY BAD ON A MULTITASKING (better Multithreading) system. If the sheduler switches to another job, after SV_DDLST has been set to 0 and this job will open a directory device file, it will fail.


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE§() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
User avatar
RalfR
Gold Card
Posts: 396
Joined: Fri Jun 15, 2018 8:58 pm

Re: QL Tinkering

Postby RalfR » Wed May 27, 2020 9:35 am

Well it is just a tick of a second, I usually do not use file manipulations, loading or saving in multitasking. :D

I also never use the TK2 default diectories as you are sometimes not sure, where you are. It can be more worse, if you also use the DEV mechanism.


User avatar
ql_freak
Trump Card
Posts: 216
Joined: Sun Jan 18, 2015 1:29 am

Re: QL Tinkering

Postby ql_freak » Fri May 29, 2020 12:22 am

The problem is if you have a program which programmatically opens a file/files (e.g. on RAM-disk) automatically very often (e.g.) in a loop. Such types of programs may fail.

But you are right that the implementation of default directories in SB is error prone :-(

A solution would be, if we had a kind of locking (as e.g. in C#, wonderful language BTW) in SB, than you could set a lock (preventing the scheduler to switch to another job), set DDLST to 0, open the file and release the lock.

A simpler solution would be a file open function which ignores the default directories. Isn't there an implementation in TurboToolkit, it's now free and IMO TurboToolkit should AS TK2 ALWAYs be loaded. There are a lot of useful programs requiring TurboToolkit, e.g. "The Editor" (still the only one AFAIK which supports column blocks - sometimes VERY useful).


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE§() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
User avatar
ql_freak
Trump Card
Posts: 216
Joined: Sun Jan 18, 2015 1:29 am

Re: QL Tinkering

Postby ql_freak » Fri May 29, 2020 12:55 am

@RalfR: BTW, is this (SU QL 1) your real KFZ-Kennzeichen?


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE§() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
User avatar
RalfR
Gold Card
Posts: 396
Joined: Fri Jun 15, 2018 8:58 pm

Re: QL Tinkering

Postby RalfR » Fri May 29, 2020 7:01 pm

The question I asked elsewhere: Does DEVICE_STATUS bypass the TK2 default directories? To say in DP things: YES. But I do not know. As noone has complained my way, this seems to be ok. I do not think, that you do several I/O things during loading a file in an editor ;) .

I even wish to find a way, to make all the TK2 Fxxx functions work without these grmpf... directories. They may be good from the command line, but no good in programs. Do you really want them to look for win1_flp1_myfile? I think, not.
Last edited by RalfR on Fri May 29, 2020 7:06 pm, edited 2 times in total.


User avatar
RalfR
Gold Card
Posts: 396
Joined: Fri Jun 15, 2018 8:58 pm

Re: QL Tinkering

Postby RalfR » Fri May 29, 2020 7:02 pm

ql_freak wrote:@RalfR: BTW, is this (SU QL 1) your real KFZ-Kennzeichen?
Yes :D


User avatar
ql_freak
Trump Card
Posts: 216
Joined: Sun Jan 18, 2015 1:29 am

Re: QL Tinkering

Postby ql_freak » Sun May 31, 2020 12:18 am

RalfR wrote:Well it is just a tick of a second, I usually do not use file manipulations, loading or saving in multitasking. :D


Sorry, this doesn't matter(!). Assume you are unzipping a very large ZIP archive (perhaps over a network connection) and in the meantime you want to edit other files. If you then open a file in the editor and the sheduler switches to UNZIP when the editor has set SV.DDLST to 0, but NOT opened the file, and at the same time UNZIP needs to open a new file for unzipping, UNZIP will fail.


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE§() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
qbits
Chuggy Microdrive
Posts: 67
Joined: Sun Dec 11, 2016 3:32 pm

Re: QL Tinkering

Postby qbits » Mon Jun 01, 2020 11:27 am

Hi,
Seems work is picking up, I have some books to edit and Web site pages to review, so I guess less time to spend on QL SuperBASIC.
I shall return and keep track when I can of events transpiring.

I’ve uploaded QBITS Organiser v03 some small changes to try to suite the various platforms running S/SuperBASIC.
As a minimum you will need extended memory and TKII.
For operation BBQL speed is going to be slow so any multiple increases with other platforms will be an asset.

If you find any problems hopefully the pdf explanation will be enough for you to reach a solution, any of which I and others no doubt will be interested in.
All the best to you my premise being to encourage and extend the life and use of QL S/SuperBASIC.

QBIITS
Attachments
QBOrg_v03.zip
(14.29 KiB) Downloaded 2 times
QBOrganiser_v03_compressed.pdf
(1.81 MiB) Downloaded 8 times
QBITS Organiser.jpg



Who is online

Users browsing this forum: No registered users and 1 guest