VM For FreeBasic as Target?

General discussion for topics related to the FreeBASIC project or its community.
Post Reply
mrminecrafttnt
Posts: 131
Joined: Feb 11, 2013 12:23

VM For FreeBasic as Target?

Post by mrminecrafttnt »

My Idea is to add an VM to the Freebasic Compiler as target so that the apllication(binary file) runs everywhere, its simply needed to translate the vm/emulator to the platform.
Is that a good idea? :)
angros47
Posts: 2321
Joined: Jun 21, 2005 19:04

Re: VM For FreeBasic as Target?

Post by angros47 »

One of the current targets available is the Emscripten VM, another is LLVM. Which I there virtual machine would you like to add?
mrminecrafttnt
Posts: 131
Joined: Feb 11, 2013 12:23

Re: VM For FreeBasic as Target?

Post by mrminecrafttnt »

Hmm.. i think Python Bytecode can be the future :D
marcov
Posts: 3455
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Re: VM For FreeBasic as Target?

Post by marcov »

mrminecrafttnt wrote: Mar 21, 2023 8:19 Hmm.. i think Python Bytecode can be the future :D
Keep in mind that there is pointer use in FB. It might be wise to do a feasibility check first (and see how the other VMs handle it).

Just to avoid that you put in a lot of work into something that works, but can only be used for new, specially crafted code.
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: VM For FreeBasic as Target?

Post by caseih »

Are you posting this to inform us you are have started work on this project, @mrminecrafttnt?
angros47
Posts: 2321
Joined: Jun 21, 2005 19:04

Re: VM For FreeBasic as Target?

Post by angros47 »

mrminecrafttnt wrote: Mar 21, 2023 8:19 Hmm.. i think Python Bytecode can be the future :D

Sounds like the worst possible choice: it is one of the slowest virtual machines (Java, JavaScript or Lua are much faster), it doesn't use the just in time compiling, and it doesn't come by default with most systems, so you'd have to install it manually
adeyblue
Posts: 299
Joined: Nov 07, 2019 20:08

Re: VM For FreeBasic as Target?

Post by adeyblue »

Without considering any of the practicalities I keep thinking a .Net IL generator would be a fun project. Then I do think of those things like how would you work with its exceptions, assembly statements, what to do with strings, etc and I go back to just thinking it would be fun rather than finding out it wouldn't.
Post Reply