My "from PACKAGE import *" (Python) simulation project (reflection)

Anything QL Software or Programming Related.
User avatar
ql_freak
Super Gold Card
Posts: 537
Joined: Sun Jan 18, 2015 1:29 am

Re: My "from PACKAGE import *" (Python) simulation project (reflection)

Post by ql_freak »

janbredenbeek wrote: Wed Jul 09, 2025 11:43 am This is normal for SBASIC. It only loads new names into the name table which are actually being used in the child job, and then they inherit their properties from their ancestors in the main SBASIC.
Ah' didn't know that.
As for your extension not working, it's generally not recommended to load extensions in SBASIC child jobs, especially not when they contain system extensions such as device drivers and interrupt servers. They will be destroyed when you quit the child job but the system will still have hooks to them in system tables etc., which may crash the machine. It's better to load them in the main SBASIC.
My Reflection toolkit does not currently load any system extensions, just S(uper)BASIC FuNctions and PROCedures. It's practical to LRESPR them in a MultiBASIC job when developping. If you change something you can kill the MultiBASIC job, start another MultiBASIC, LRESPR the new version and test it.

QPC2 has some advantages over sQLux, e.g. the scrap (clipboard) which is shared between Windows and QPC2. And it supports German keyboard. BTW with UQLX (on Windows with an X11 server) the Geman keyboard is correctly working.


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
tofro
Font of All Knowledge
Posts: 3140
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: My "from PACKAGE import *" (Python) simulation project (reflection)

Post by tofro »

ql_freak wrote: Thu Jul 10, 2025 9:01 pm My Reflection toolkit does not currently load any system extensions, just S(uper)BASIC FuNctions and PROCedures. It's practical to LRESPR them in a MultiBASIC job when developping. If you change something you can kill the MultiBASIC job, start another MultiBASIC, LRESPR the new version and test it.

QPC2 has some advantages over sQLux, e.g. the scrap (clipboard) which is shared between Windows and QPC2. And it supports German keyboard. BTW with UQLX (on Windows with an X11 server) the Geman keyboard is correctly working.
The pragmatic way to develop an S*BASIC extension on QPC2 is:

Simply give the emulator enough memory and don't care at all about old versions hanging around - Whenever you have a new version, simply LRESPR it. With 256MBytes of memory given to QPC, you can LRESPR new versions a few hundred times for debugging before memory is exhausted. The new version will completely replace the old one in the system.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Derek_Stewart
Font of All Knowledge
Posts: 4790
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: My "from PACKAGE import *" (Python) simulation project (reflection)

Post by Derek_Stewart »

ql_freak wrote: Thu Jul 10, 2025 9:01 pm
janbredenbeek wrote: Wed Jul 09, 2025 11:43 am This is normal for SBASIC. It only loads new names into the name table which are actually being used in the child job, and then they inherit their properties from their ancestors in the main SBASIC.
Ah' didn't know that.
As for your extension not working, it's generally not recommended to load extensions in SBASIC child jobs, especially not when they contain system extensions such as device drivers and interrupt servers. They will be destroyed when you quit the child job but the system will still have hooks to them in system tables etc., which may crash the machine. It's better to load them in the main SBASIC.
My Reflection toolkit does not currently load any system extensions, just S(uper)BASIC FuNctions and PROCedures. It's practical to LRESPR them in a MultiBASIC job when developping. If you change something you can kill the MultiBASIC job, start another MultiBASIC, LRESPR the new version and test it.

QPC2 has some advantages over sQLux, e.g. the scrap (clipboard) which is shared between Windows and QPC2. And it supports German keyboard. BTW with UQLX (on Windows with an X11 server) the Geman keyboard is correctly working.
If you load in the Extended Environment, (PTR_GEN, WMAN, HOTYKEY, QPAC2) this loads the SCRAP Thing onto any system that is capable of running QPAC2.

Systems like SMSQ/E, have the Pointer Environment (PTR_GEN, WMAN, HOTYKEY) built in. I am not sure if SCRAP is present till QPAC2 is loaded.


Regards, Derek
User avatar
RalfR
QL Wafer Drive
Posts: 1212
Joined: Fri Jun 15, 2018 8:58 pm

Re: My "from PACKAGE import *" (Python) simulation project (reflection)

Post by RalfR »

Derek_Stewart wrote: Fri Jul 11, 2025 7:28 amI am not sure if SCRAP is present till QPAC2 is loaded.
The Scrap extension is part of Jochen's Menu-extension. The scrap menu is synchronized with the Windows clipboard using QPC_SYNCSCRAP.


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

Re: My "from PACKAGE import *" (Python) simulation project (reflection)

Post by Derek_Stewart »

RalfR wrote: Fri Jul 11, 2025 8:11 am
Derek_Stewart wrote: Fri Jul 11, 2025 7:28 amI am not sure if SCRAP is present till QPAC2 is loaded.
The Scrap extension is part of Jochen's Menu-extension. The scrap menu is synchronized with the Windows clipboard using QPC_SYNCSCRAP.
HI Ralf,

Thank you, for the clarification, so the definition of Extended Environment should include MENU_REXT.

I used to use QD on Minerva, but QD needs MENU_REXT to run, which implements the SCRAP extensions.

So is SCRAP a Thing or a device?


Regards, Derek
User avatar
RalfR
QL Wafer Drive
Posts: 1212
Joined: Fri Jun 15, 2018 8:58 pm

Re: My "from PACKAGE import *" (Python) simulation project (reflection)

Post by RalfR »

Derek_Stewart wrote: Fri Jul 11, 2025 9:19 amSo is SCRAP a Thing or a device?
SCRAP is an Extension Thing.


7000 4E75
Post Reply