Chris could you expand on this this please, I am interested in what you are thinking.
It just occurred to me that an interpreter could be stored in a database (I'm for SQLite!) and executed from there by using a loader program. Would ThinBASIC "work" in this context?
Chris could you expand on this this please, I am interested in what you are thinking.
Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370
Hi Chris,
Do you mean storing TB scripts in a database?
Hi Charles,
I was thinking about also storing the interpreter, then executing a loader program(load <table> <column>) which loaded it. I imagine that it would drive Windows firewall crazy.
Hi Michael,
It was just thinking that it would be a neat way of distributing an application, or maybe a step on the road to platform independence. The application user (as opposed to developer) doesn't really need an interpreter, just an application.
Just knocked up a PowerBASIC applcaition to store any file type in BLOBs in a SQLITE DB and execute exes. To my shame I have forgotten what changes would be required to create a TB script from this application, so it's RTFM time!
Hi Chris,
I am not sure if it is exactly what you want, but you can bundle script to single EXEcutable (Script/Bundle).
Maybe you could embed the final EXE to the table.
Problem could be that the bundle once executed, temporarily extracts DLLs in the directory it is executed in, and cleans it up after execution.
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Hi Petr,
Yes, I see what you mean, but was thinking about running an interpreter from the DB without creating any files outside the DB.
An example would be a SQL script interpreter with a command line interface, the scripts being stored in the DB.
Hi Chris,
I can see the possible uses for this sort of system, for instance a database of demo programs would make the task of building applications much easier. What sort of programs would you envisage storing in the database?
At present I don't think you can retrieve a TB script in a string variable and then execute it directly within the same instance of TB.
However it is possible to do this with Oxygen source code which will JIT compile to machine code in a fraction of a second and be executed in memory. (without generating an EXE file). You could also store the compiled Oxygen binary strings (blobs?!) in the database if so desired, and invoke them directly within thinBasic.
Hi Charles,
Although - as usual - I was thinking about a specific application when I started, there seems to be some interesting territory here, maybe not unexplored, but seldom visited. Encapsulating all an application's code and data in a single file has attractions if you are distributing code, and the installation and software CM of same is also greatly simplified. By simplifying, you also potentially make the thing more reliable on the "fewer parts" principle.
It would be nice to get some familiarity with this approach by developing an application to inhabit such a database. One problem is passing control between different modules, whether scripts or exes. It could be done by using a loader application which "knew" it was running in a DB enivronment, and could perform a "shell" type function.
I have a feeling that I need to bone up on Oxygen! Yet another gap in my education.
Chris, This idea is well worth pursuing so I am posting a barebones conceptual example where ThinBasic provides
the database and user i/o, and the programs are held as oxygen source strings - retrieved then dynamically compiled.
Bookmarks