FreeBASIC on iOS
FreeBASIC on iOS
I was lookin' around the Apple app store and saw a couple of apps that let you write code and then run it. I was wondering how hard that is to make something like that and if FreeBASIC might consider making an app? I know I would thoroughly enjoy it, having a FreeBASIC code-writer/compiler with me in my pocket. So... Why not?
I have no idea how to do it as 'm only a beginner programmer, but I thought it would be a great project for the community to work on.
Thoughts?
I have no idea how to do it as 'm only a beginner programmer, but I thought it would be a great project for the community to work on.
Thoughts?
-
- Posts: 1186
- Joined: May 08, 2006 21:58
- Location: Crewe, England
Re: FreeBASIC on iOS
Not knowing what you have seen, I'm guessing these apps are most likely interpreters http://en.wikipedia.org/wiki/Interpreter_(computing), rather than compliers,which is what Freebasic is. Running a compiler on a mobile device would likely be messy.
FreeBasic currently exists for Windows on Intel x86 processors and Linux on x86. I believe somebody has been trying to adapt for Apple on x86 desktop; AFAIK they haven't published this yet.
Most mobile devices are based on ARM cpus, whereas FreeBasic currently generates Intel x86 assembler, so you would have to re-write all the code generation parts of the compiler. You could use the C code generation facility, but then you would have to run that through a C compiler - so why not write C code in the first place?
However, I note that the Orange phone company in the UK is now offering an Intel Atom based mobile phone running Android 2.3 (the "San Diego"); I guess these are available elsewhere in the world. The only problem then would be to develop a version of the compiler to run under the Android operating system.
Long story short: unless somebody has an app development system and a test machine, a burning need to run FreeBasic on a mobile device, and the requisite knowhow, I can't see this happening.
FreeBasic currently exists for Windows on Intel x86 processors and Linux on x86. I believe somebody has been trying to adapt for Apple on x86 desktop; AFAIK they haven't published this yet.
Most mobile devices are based on ARM cpus, whereas FreeBasic currently generates Intel x86 assembler, so you would have to re-write all the code generation parts of the compiler. You could use the C code generation facility, but then you would have to run that through a C compiler - so why not write C code in the first place?
However, I note that the Orange phone company in the UK is now offering an Intel Atom based mobile phone running Android 2.3 (the "San Diego"); I guess these are available elsewhere in the world. The only problem then would be to develop a version of the compiler to run under the Android operating system.
Long story short: unless somebody has an app development system and a test machine, a burning need to run FreeBasic on a mobile device, and the requisite knowhow, I can't see this happening.
Re: FreeBASIC on iOS
True. Moreover note that there is no general "arm". There are a lot of different ones, and there are also platform (ABI,OS) aspects on codegeneration.Most mobile devices are based on ARM cpus, whereas FreeBasic currently generates Intel x86 assembler, so you would have to re-write all the code generation parts of the compiler.
Why bother with Basic to Assembler compiler then, why not write assembly in the first place? Answer: Not all languages are the same.You could use the C code generation facility, but then you would have to run that through a C compiler - so why not write C code in the first place?
Btw, one should keep in mind that most mobile OSes limit what apps can access using sandboxes. One iOS you have to declare in a manifest what directories and OS privileges you are going to access, and you can't access anything outside.
It is not like e.g. Windows where an application can access the bulk even with admin rights.
And jailbreak the phone I guess to get access at all.However, I note that the Orange phone company in the UK is now offering an Intel Atom based mobile phone running Android 2.3 (the "San Diego"); I guess these are available elsewhere in the world. The only problem then would be to develop a version of the compiler to run under the Android operating system.
Re: FreeBASIC on iOS
= dalvik Java machine byte code... so the task remains the same.The only problem then would be to develop a version of the compiler to run under the Android operating system.
Re: FreeBASIC on iOS
No. Android was only kept jvm bytecode only while it was in development (the idea was system software native for speed and batterysaving, and all "apps" only bytecode to have a safe VM, but they abandoned it, because heavier apps would be too slow).codeFoil wrote:= dalvik Java machine byte code... so the task remains the same.The only problem then would be to develop a version of the compiler to run under the Android operating system.
When Android went into production the appstores afaik all allowed native code. The native code must be in a library though, with a very minimal Java application skeleton routing the events into it.
-
- Posts: 1186
- Joined: May 08, 2006 21:58
- Location: Crewe, England
Re: FreeBASIC on iOS
With regard to Apple devices, the other key question is what hoops you have to jump through to get your product into the Apple store (and how much it would cost).
Re: FreeBASIC on iOS
The first times a lot, expect to get it back several times before you get all the little details right (specially for new compilers/targets).jevans4949 wrote:With regard to Apple devices, the other key question is what hoops you have to jump through to get your product into the Apple store (and how much it would cost).
The recent sandbox requirements add another layer of complexity.
But that is for FB generated apps. As for FB, on iOS afaik you can't generate anything. The cross-binutils only exist for OS X.
As to cost, $199 annually IIRC.
Re: FreeBASIC on iOS
It is easy to see whats the point in this discussion, Apple is enticing developers by creating apps that looks similar if not portable to freebasic . Then what, yearly subscription? Hard to find libs? Im sticking to win/linux
-
- Posts: 5494
- Joined: Sep 12, 2005 20:06
- Location: California
Re: FreeBASIC on iOS
No way. Objective-C is awesome.
Okay, I'm lying. XCode wasn't too bad of an environment, though. Even having to work in XCode, dev'ing for iPhones was more enjoyable than Android devices, IMO.
Okay, I'm lying. XCode wasn't too bad of an environment, though. Even having to work in XCode, dev'ing for iPhones was more enjoyable than Android devices, IMO.
Re: FreeBASIC on iOS
Windows and Linux are full, open operating systems. The point is that iOS is not.roook_ph wrote:It is easy to see whats the point in this discussion, Apple is enticing developers by creating apps that looks similar if not portable to freebasic . Then what, yearly subscription? Hard to find libs? Im sticking to win/linux
The only thing that iOS has going for it is that everybody has a drive to get on the train. For most of those people, that drive is irrational.
Re: FreeBASIC on iOS
Microsoft is about to launch the 'Surface' tablet, an x86 version which will run win8. It may well be possible to get FreeBASIC running under win8 as that is a full on OS which runs on x86
There are also a few tablets which use win7. There a a large number of atom based tablets and a few atom based smart phones in the pipeline. Be nice to have full x86 integration across all these platforms. Im not sure how far win8 will act as that bridge.
The latent consumer demand for full on windows tablets is very high indeed. Msoft and Intel have been dithering for some time in this market but are now making aggressive moves. Intel under threat from ARM and Msoft under threat from various OS used in smart phones and tablets.
As soon as 'surface' hits the stores ill run down and try out a few FB exe's on it....end of October the release date
A midranged smart phone has 10x the CPU speed and 10x the ram of the first win95 desktops, the processing power to run windows on tablets and phones has been around for a few years, its just that the architecture manufactures use is different, non 86. Computational wise there is no reason why a lite version of windows could not run on a mid-ranged smart phone or tablet. Its more a case of gross industry sagacity than a technological short fall.
There are also a few tablets which use win7. There a a large number of atom based tablets and a few atom based smart phones in the pipeline. Be nice to have full x86 integration across all these platforms. Im not sure how far win8 will act as that bridge.
The latent consumer demand for full on windows tablets is very high indeed. Msoft and Intel have been dithering for some time in this market but are now making aggressive moves. Intel under threat from ARM and Msoft under threat from various OS used in smart phones and tablets.
As soon as 'surface' hits the stores ill run down and try out a few FB exe's on it....end of October the release date
A midranged smart phone has 10x the CPU speed and 10x the ram of the first win95 desktops, the processing power to run windows on tablets and phones has been around for a few years, its just that the architecture manufactures use is different, non 86. Computational wise there is no reason why a lite version of windows could not run on a mid-ranged smart phone or tablet. Its more a case of gross industry sagacity than a technological short fall.
Re: FreeBASIC on iOS
For the current desktops it's something like 30x in terms of clock speed, and much more in terms of performance, and 100x.TESLACOIL wrote: A midranged smart phone has 10x the CPU speed and 10x the ram of the first win95 desktops...
Re: FreeBASIC on iOS
it's just too bad that smartphones have a touch-screen, which makes them useful for almost doing almost nothing =)
most types of games are out of the question, and it's positively annoying to type anything on those keyboards
for the record i have a galaxy s3 which i actually like as a phone.. but i dont use it for much else :)
it's nice for reading books and such though
i also developed a few small apps for the android os'es.. i didn't like it very much
a little bit restrictive and the gpu's on those phones aren't exactly strong
but it works at least :) good for anything 2D
i don't think i'd want to code anything on android unless they suddenly got 5-10x faster
most types of games are out of the question, and it's positively annoying to type anything on those keyboards
for the record i have a galaxy s3 which i actually like as a phone.. but i dont use it for much else :)
it's nice for reading books and such though
i also developed a few small apps for the android os'es.. i didn't like it very much
a little bit restrictive and the gpu's on those phones aren't exactly strong
but it works at least :) good for anything 2D
i don't think i'd want to code anything on android unless they suddenly got 5-10x faster
Re: FreeBASIC on iOS
Trust me, when you get used to a 6" E-ink ebook reader, you never want to go back :-)Gonzo wrote:it's just too bad that smartphones have a touch-screen, which makes them useful for almost doing almost nothing =)
most types of games are out of the question, and it's positively annoying to type anything on those keyboards
for the record i have a galaxy s3 which i actually like as a phone.. but i dont use it for much else :)
it's nice for reading books and such though
But I agree with your sentiment wholeheartly. It is all nice and dandy to talk "revolutionary" about conquering the mobile market, but you need to think if it is actually worth the trouble.
Since not all trouble will be one off (doing the port), since there will also be matter of getting each device either rooted (the happy fews favourite choice), or provisioned via the App market, which comes with associated annual pricetag.
I think development never will be done on such devices (in theory, the largest tablets could, but if it happens it will be fairly marginal), so it is more a crosscompile item.
And for iOS you almost _NEED_ to crosscompile from a Mac (OS X), so if you want to go there, advance the Mac port first :-)
The reason for this is that the binutils for IOS only exist for (recent!) OS X