Oxygen Basic

Information => Open Forum => Topic started by: Peter on August 30, 2011, 03:11:27 AM

Title: Observation
Post by: Peter on August 30, 2011, 03:11:27 AM
Deleted
 
Title: Re: Observation
Post by: Charles Pegge on August 30, 2011, 03:42:56 AM
Hi Peter

John is better qualified to answer this than me but I suppose it is all about transparency and freedom of choice. Microsoft has to do all kinds of black box things to protect their products from piracy. It is also a monopoly, and there are many who feel that monopolies if left unchecked, become tyrannies.

Linux distributions usually come with a much wider range of development tools than Microsoft, though this requires a technical mind to use them, and perhaps growing up in the Unix culture.

Charles
Title: Re: Observation
Post by: JRS on August 30, 2011, 07:32:50 AM
Quote
it is all about transparency and freedom of choice.

Linux runs well and I don't miss Windows one bit. I suggest getting evolved in an open source project and learn what Linux is all about.

The BCX Basic to C translator for Linux and the Mac is looking for developer help. Lending a hand to that project would be a win/win for everyone.

Title: Re: Observation
Post by: efgee on August 30, 2011, 09:00:15 AM
The BCX Basic to C translator for Linux and the Mac is looking for developer help. Lending a hand to that project would be a win/win for everyone.

I've looked into BCX once but disregarded it and here is why:
The code is done in a strange way, not really easy to maintain, with a code base this size there should be all sorts of syntax and semantic checks, error reports etc. instead of just translating BASIC to C. Bottom line: 500kB of BASIC should do more...
(If I remember correctly it doesn't even have dynamic strings or arrays - could be wrong on this though...)

I applaud every one willing to work on it, but as I said with this code base you only can get this far... not far enough.
Title: Re: Observation
Post by: JRS on August 30, 2011, 12:32:11 PM
Before Armando left, he was looking at adding C++ string and garbage collection support to the MBC version of BCX. James was more omni platform centric and a wxWidgets fan. James has been MIA with the project lately so I don't know what is to become of the translator.

I find using ScriptBasic for most of my programming needs works out great when getting the job done is the primary objective. If I run into a section of code that would benefit by writing it in C, the SB extension module API makes it seamless to integrate. I'm looking forward to the Linux version of O2. The SB macro layer may make using O2 a bit more challenging from an extension module approach.
Title: Re: Observation
Post by: Aurel on December 14, 2011, 03:33:24 AM
Because this topic is about observation about linux and i think futer programming.
I would like to know what you think about Microsoft tension that remove
complete win32 api from new Windows 8?
If this will really heapend i see big chance for linux or maybe im totally wrong...
Title: Re: Observation
Post by: Charles Pegge on December 14, 2011, 08:51:27 AM

Microsoft would not dare to remove the 32 bit API. It would exclude thousands of programs and  render millions of 32 bit PCs obsolete.

Maybe in 2022

Charles
Title: Re: Observation
Post by: Aurel on December 14, 2011, 09:40:34 AM
Quote
I ask me, what will  Aurel then do?
Me...?
I would then create my own OS :D
Title: Re: Observation
Post by: efgee on December 14, 2011, 09:57:54 AM
Win32 will be history, the question is not IF but rather WHEN.

On the x86/x64 computer:
Windows 8 will have both Win32 and the new WinRT and Metro stuff.
Windows 9 could be the first to drop Win32 completely (or offer a version with and without Win32).

On ARM computer:
Windows 8 will exclude Win32 from the start as there are no legacy apps for Windows on ARM.

When Apple introduced OSX they made a clear cut with the past, Microsoft needs to do the same with Win32.
They might offer a VM as a sandbox and load WindowsXP in it (AFAIR Apple did something similar for OS9)


Title: Re: Observation
Post by: Aurel on December 14, 2011, 10:21:18 AM
Heh...
This WinRT remind me on VisualBasic Runtime sounds similiar...
I dont like to much this thing in the past but who knows maybe would work OK.
Title: Re: Observation
Post by: kryton9 on December 16, 2011, 09:34:36 PM
I'm glad I read this thread. Here I am busting my behind with win32 making my classes when by the time I am done making them, it will be useless!!!

What is safe to develop on?  I did see this, but my understanding at this level is seen as magic. Would this be a true cross platform savior?
http://pressroom.nvidia.com/easyir/customrel.do?easyirid=A0D622CE9F579F09&version=live&prid=831864&releasejsp=release_157&xhtml=true

to sign up:
http://developer.nvidia.com/content/cuda-platform-source-release
Title: Re: Observation
Post by: Petr Schreiber on December 17, 2011, 01:23:50 AM
Hi,

I remember the talks the Win32 will be removed when COM appeared.

I remember the talks the Win32 will be removed when .NET appeared.

I see the talks the Win32 will be removed when WinRT appeared.

I think it is here to stay for some time :)


Petr
Title: Re: Observation
Post by: Charles Pegge on December 17, 2011, 03:24:08 AM
As a high-level assembler, LLVM catches my interest! Looking at the instruction set, I believe it would be quite simple for Oxygen to emit LLVM instructions, in fact a lot simpler than it was to produce x86 stuff.

LLVM

http://llvm.org
http://llvm.org/docs/LangRef.html

users

http://llvm.org/Users.html


NVIDIA:

(http://media.marketwire.com/attachments/201112/TN-51765_NVIDIACUDALLVM-basedcompiler.jpg)

Charles
Title: Re: Observation
Post by: efgee on December 17, 2011, 12:12:23 PM
As a high-level assembler, LLVM catches my interest! Looking at the instruction set, I believe it would be quite simple for Oxygen to emit LLVM instructions, in fact a lot simpler than it was to produce x86 stuff.

 :o

Please reconsider... because if you do it:


Are you willing to risk it?

 ;D

Title: Re: Observation
Post by: kryton9 on December 17, 2011, 02:54:38 PM
Hi,

I remember the talks the Win32 will be removed when COM appeared.

I remember the talks the Win32 will be removed when .NET appeared.

I see the talks the Win32 will be removed when WinRT appeared.

I think it is here to stay for some time :)


Petr

Petr, I did more searches last night and can't find now where I read this, but basically they are saying that 32 bit will be dropped and relegated to dedicated small hand held devices soon. I guess like how 8 bit and 16 bit are now. They will probably make a 32 bit Arduino in a couple of years :)
Title: Re: Observation
Post by: kryton9 on December 17, 2011, 03:01:58 PM
Charles, I am very excited to read what you wrote. I think not only for Oxygen, but for any language and even for developing any major project it would be nice to know that it will be viable for some time to come and be able to run on multiple platforms. As Eros pointed out in the thinBasic forums, he has so many lines of code for thinBasic, it is not possible(desirable) to redo all of that work to change to another foundation.

I am happy that in your research that you feel that this could be an even easier foundation for you than x86!
Title: Re: Observation
Post by: Charles Pegge on December 17, 2011, 06:08:49 PM

I think this will give us the best opportunity to go cross platform, and also tap into the power of the multi core GPUs.

The online compiler demo shows what it looks like. Human readable after a fashion. And it is encouraging that the instruction set is quite small.

http://llvm.org/demo/index.cgi

Nvidia only announced their intention to use LLVM on the 16th Dec. We don't know how long it will take to produce the product. ATI have also made an announcement abut using LLVM and will doubless be following in haste.

Charles
Title: Re: Observation
Post by: kryton9 on December 17, 2011, 08:34:46 PM
Will you use LLVM from the their site or register with NVidia to use theirs?
Title: WinRT, replaces win32
Post by: kryton9 on December 17, 2011, 08:49:09 PM
http://www.winsupersite.com/blog/supersite-blog-39/windows8/winrt-replacing-win32-140605

Quote
But after conferring with others and studying Microsoft's documentation, I can make the following general statement: WinRT (the new Windows Run Time) is not a replacement for Silverlight or .NET, it's a replacement for Win32. And that means that it's the new native runtime for Windows, and not a managed code layer that sits higher on the stack.
Title: Re: Observation
Post by: kryton9 on December 17, 2011, 09:03:05 PM
I went and looked at WinRT and here is a listing for Graphics. I don't see anything for OpenGL or WGL!!!!
http://msdn.microsoft.com/en-us/library/windows/apps/br205756

I don't know what is going on now?
No OpenGL for Metro Apps:
http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/a861db02-dce8-4f61-9969-b8a7a7cd55c7
Title: Re: Observation
Post by: Petr Schreiber on December 18, 2011, 01:19:12 AM
Kent,

with Windows 8, we could look at it as 2 different platforms:

WinRT
In the future, if it catches, it might become full replacement. For now, I would rely on info directly from MS.

I checked out the official, work-in-progress documentation, it looks very .NET style to me :)
http://msdn.microsoft.com/en-us/library/windows/apps/hh464942%28v=VS.85%29.aspx

Interesting note is this:
Quote
The Windows Runtime packs core functionality for building Metro style apps into a small API surface
So it seems it is primarly targeted at Metro apps, which are from what we saw not designed for desktop use in first place.

Here Microsoft hosted blog:
http://blogs.microsoft.co.il/blogs/sasha/archive/2011/09/15/winrt-and-net-in-windows-8.aspx
Quote
To summarize, WinRT does not replace .NET, nor does it compete with .NET – and the same applies to Win32.

I don't think Metro style apps are something to be used as platform for writing AutoCAD or AAA games, it has different purpose (a bit more of gadget style) so I would not be surprised to not see OpenGL there.
On Windows phones you also have just Direct3D like coding for long time, although it is not problem of different CPU architecture (judging from OpenGL ES running happily on Android devices).

Windows 8 for x86/x64
Regarding OpenGL on Windows 8 Preview, Eros tested thinBASIC and TBGL scripts there, not a single issue observed (http://www.thinbasic.com/community/content.php?36-thinBasic-under-Windows-8).


Petr
Title: Re: Observation
Post by: kryton9 on December 18, 2011, 02:13:08 PM
Thanks Petr, it is a little bit assuring... but, since WinRT is not a layer above win32 but its equivalent, it means the win32 is gone sooner or later.
Just like now, I can run 32 or 64 bit versions of programs like Blender. I always choose the 64 bit version if I have a choice.

I have been using my android phone and tablet now and all I can say is everyone can use those interfaces from Babies to very old people, the size of the tablet more so than the phone.

Anyways, once people have a choice of a fullscreen, no windows, no menus, touch interface or the same old windows they have seen with mouse and keyboard, the choice will be solid for
the new technology.

The win32 will be dead and removed you will see in a couple of years, it just has to be for Windows to survive.

The next big question is will Microsoft make DirectX run on ARM and other hardware platforms, like OpenGL does? If so, that could mean the death of OpenGL.
John Carmack says already DirectX is better than OpenGL now. It is the trend setter and not the laggard like it was. He said he will still use OpenGL because of
all the code he has into it and all his tools.
Title: Re: Observation
Post by: efgee on December 19, 2011, 07:36:34 PM
As a high-level assembler, LLVM catches my interest! Looking at the instruction set, I believe it would be quite simple for Oxygen to emit LLVM instructions, in fact a lot simpler than it was to produce x86 stuff.

If portability is needed:
Don't have any experience in Java but what about Jasmin (http://jasmin.sourceforge.net/).

Jasmin (http://jasmin.sourceforge.net/) is an assembler for the Java Virtual Machine. It takes ASCII descriptions of Java classes, written in a simple assembler-like syntax using the Java Virtual Machine instruction set. It converts them into binary Java class files, suitable for loading by a Java runtime system.
Maybe someone else has more input on Java.

Another solution would be to target tcc (http://bellard.org/tcc/). (here is the repository (http://repo.or.cz/w/tinycc.git/shortlog/refs/heads/mob))
Tcc creates executables for Win/Linux/Unix/BSD/PE/ELF/x86/x64/ARM.
This way only the conversion from Basic to C is needed.
(There is also libtcc so no c file needs to be created, all happens in memory)
Title: Re: Observation
Post by: Charles Pegge on December 20, 2011, 12:42:11 AM
Thanks Frank, I'm looking at the logistics of providing various emitters. There are at leat 2 levels. One being high-level assemblers like CIL,JVM, LVMM and the other being compiler-level C or C++.

In an ideal scheme, one would one would simply tap into the code production line at two points and reformat the outputs.

Unlike the others LVMM is not a stack machine. It had me puzzled for a few days but I can now see a way to convert oxygen's stack-based expressions.

Example:

a=b+c*d

left bracket push. right bracket pop

a=b+(c*d)

load b
push b
load c
mul d
pop-add

in LLVMish

%1=%c * %d
%a=%a+%1


Charles