Oxygen Basic
Information => Introducing Oxygen => Topic started by: o2admin on October 01, 2010, 01:38:36 AM
-
O2 was conceived nearly three years ago as a machine script, in essence machine code with a linker. It was an experiment to see how minimal a compilable language could be. Then came the Assembler shortly followed by a macro language. Eros Olmi (of thinBasic) suggested more people would be able to understand it if I added Basic-like syntax. So I thought okay, I'll have this ready in a few weeks. Little did I know how much work was involved in producing a high level compilable language. A compiler has to spend much of its time doing invisible things like automatic type conversion and operator precedence and one is not fully aware of these complexities until you try to encode them.
Even before adding Basic, I had OOP capability in place. I think retrofitting it to a straight procedural language would have been much more difficult which I think is why many Basics have got stuck in their development.
I use the term JIT (Just in Time) compiler to describe Oxygen because it compiles directly to an executable memory image which may be used immediately without first storing it to an EXE file. For programs up to about 40-50k of source code, the compilation time is barely noticeable. This is good for ad-hoc programming where you are not building a static application. The source code is the only item that needs to be stored. Since Oxygen is a single modestly sized DLL it is easy to embed in Applications which require programmability in Basic or a Domain-specific dialect.
Currently O2 compiled executables depend on Oxygen.dll for the run-time library, but I am working on the 'independent' mode where the run-time library is included. This is of course essential when generating 64bit code with a 32 bit compiler.
It will take about three more months to approach Beta quality releases. Much of the testing at this stage involves exposing Oxygen to as many different situations as possible and testing with various APIs.
-
Hello
I know I'm just curious here.
but I would like to ask a question
what will be the direction of Oxygen after this new update?
though, I think the first question should be, What is the purpose of Oxygen?
What is the target audience?
What is the concept? independence or compatibility?
I think being independent when writing the routines is not the same as compatibility.
of course it can be a great auxiliary tool, for me it is being mainly for ease of use, but is that all that is sought?
strength the oxygen has, and I see a great passion, especially for its idealizer, Charles Pegge
Sorry, I do not want to be misunderstood.
but I think they are questions that have to be asked to see what direction it will take.
What's lacking for me?
tutorial and some more examples for those who want to start using.
stability that does not affect older users.
as more participating users appear, we have the attention of experienced users and even collaborators
I see a great future in the oxygen, and I would like to contribute something, but unfortunately I am limited both in $ and programming knowledge.
what I will do is post here where I participate examples in use in excel is where I use
-
So I thought okay, I'll have this ready in a few weeks.
.......................
It will take about three more months to approach Beta quality releases.
Seven years later and still there, Charles? :D
(https://emojipedia-us.s3.amazonaws.com/thumbs/120/samsung/100/thumbs-up-sign_1f44d.png)
-
Well, I decided that rushing the project would be a waste of time :) and I will refrain from any further attempts at futurology. You never see the whole picture in all its detail.
I think the core language is quite stable now, though there may be some minor additions to macros, which are the key to creating higher-level expressions. I like the diminutive size (141k compressed) which makes it highly distributable, and hope that we can keep it that way, opposing code inflation. I've trimmed off a few surplus features, like inner functions, which turned out to be less useful than anticipated.
I won't make any firm commitments to further documentation and tutorials, but it should be a lot easier when the thing being described does not keep changing.
-
thanks for listening
about the changes, I just saw the requests, inclussive in the syntax,
but I can not talk about it, because although I follow up and just now I ventured to try to use
Charles Pegge
I'm going to apologize in advance, so I'll ask, why I do not know how it will be understood after translating
What is your personal interest in Oxygen, as the founder and provider of the project?
What do you dream for Oxygen?
for example, for me the way it is up is enough because my use is limited.
and to everyone who asks, will answer something different.
I could cite several ideas myself,
but if I am not able to help in their implementation, they are of little value, and I do not know if they are implementable.
-
@edcronos:
You shouldn't worry so much whether your translated messages are understandable enough. Surprisingly, Google Translate does a pretty good job translating Spanish to English on the fly. I am still in the habit of browsing Latin American VB6 sites regularly placing the respective links directly in the Google Translate text field, and I find the English translations about 98% coherent for my native Russian-speaking self barring minor Spanish typos here and there that Google Translate quite expectedly isn't yet able to correct automatically.
Regretfully, direct English-to-Russian, French-to-Russian or Spanish-to-Russian Google Translate services are much, much poorer to the extent that Russian-only coders can't even grasp the original's main subject let alone its gist or minor details.
-
I'm from Brazil, and we have words that have different meanings depending on the context
sometimes I write in the translator and I go back to the Portuguese to see if it is understandable,
and a comma can change a lot, often have to change a few words for the phrase to go to the expected context, "that's what I think happens"
and the preoccupation with the formal form of writing, something very difficult.
-
Ah OK OK, my bad,
My apologies for Spanish, of course it should have been Portuguese instead. ;)
But even so, the more compliments go to Google Translate for its ability to cope with both these languages equally well. :)
-
really is a tool that breaks down borders
Spanish has a similarity with the Portuguese, for example, although I do not speak Spanish I can read until well, I even read manga in Spanish on an online manga page.
the Russian really, I visited some pages at a time, and it really is a bit difficult to understand the translation
I think some languages have more complexity in forming ideas, or the idea can be very broad, just as a single word can have several meanings, several words can have the same meaning depending on the phrase.
seems a little Oxygen with the broadest syntax
it would be good to have a world language, English is accepted in a way as a language of greater acceptance, but in most countries where school is part curriculum is very poorly taught
-
Eduardo,
I have always been interested in the internals of programming languages, and wanted a more flexible, high performance Basic to work with. 64-bit compiling was also an interest.
In the past, I have worked with various Assemblers and processors, BBC-basic, AppleII and Pet-Basic, MBasic Archimedes-Basic, TurboBasic/PowerBasic and FreeBasic but not Visual-Basic.
-
so I understand, it's an old project that you defined as a hobby and that is going forward because of its professionalism and willingness to see as functional as possible,
very good, I would like to have this capacity, I have a lot of ideas but I can not materialize them, one of them a few years ago I took the lead with a friend like sicios, but the society was not cool, and since I do not had financial conditions I quit,
I transitioned into a tk95 "ZX Spectrum" in childhood, my dream at the time was an msx
when I started with the excel vba I took a long time to realize that it was a basic,
after that I activated the old procedural memory. which gave me more fluency in writing than I wanted to do, but with a lot of goto and gosub,
I did not even know what were functions and variables byref which led me to mount a macro that had the flow controlled by a handful of gosub's, I took a lot of ear jerking, but okay it worked very well and for me it's just one hobby
-
from what I understand from what I read here,
Oxygen has an independent syntax
on top of this has the fact that it is a compiler, and it is also compatible with 64bit
you can write something in the C structure but do not accept all of the C. "so it's not just copy and paste to work"
but ok, Basic is the focus, it supports multiple writing modes, but it's also not 100% compatible with some other Basic.
I just do not understand why even basic instructions with simple if's, for next, variables and arrays do not work copied from one to another, especially the arrays.
Oxygen boasts simplicity and superb flexibility.
but that same flexibility looks like torture and a trap when it comes to the lack of documentation.
as they said in the forum there is a lot of things to get going, but there are also a lot of old versions that do not work in the newer versions, and all spread out.
and what is the Sys type, I see in the examples, but I can not determine the use, and in the help does not have specifying.
I'm sorry if I said some bullshit,
-
-
-
sys is a signed integer that changes its size according to compiled binary mode: 32-bit or 64-bit. This is an essential type for all pointers and handles, including those inside UDTs, to maintain compatibility.
PS: I will be making operators && || ^^ true logical operators, as in C.
-
Aurel
I think even simplicity has to have certain rules,
and you have to agree that it is precisely because you do not have rules that Basic, although simple, easy to learn and program that has never been taken seriously by the professional market.
and each one that creates a Basic creates it within its own criteria, and soon leaves aside,
and to change to another Basic, one has to learn and adapt practically everything and not just one or another fuction that had in one and not in the other. of course you have key functions that can put a project to waste
the problem is the type of variable determines the type of data that will work, selecting a wrong type may work in the test but cause intermittent errors.
joining this with the flexibility of the oxygen one can do wrong things without realizing it.
so I wondered the absence of blocks of simtaxe, for asm and C
this must have led to many Oxygen error testing, and a much greater complexity
Charles Pegge
I hope you do not just modify Oxygen to fulfill the requests, many ideas often turn into just an alphabet soup
of course a greater compatibility may be good to reuse codes "but after all who had the brilliant idea of using && || ^^ as operators ??"
but I know that sometimes we get new ideas to install on our Frankenstein
-
-
-
The fusion of Basic, Assembler, and C notation is intentional, and works rather well without the necessity of language block switches. I have often been tempted to add LISP syntax as well. It's technically possible but might be taking things a bit too far :)
However, we do have switches for controlling case-sensitivity, auto-dim and name-redefinition.
The logical operators are going to be very useful, especially when porting in C-code.
-
Aurel
I'm waiting for the new version,
I get vices very easily and I have difficulty decorating words,
so I practically only use if's loops and arrays, even the "Do Loops" I forget how to write and use, and I end up using the same conditional Goto,
it's usually easier for me to create a new function than to remember the name and syntax of one that does what I want. even variable names I usually use only 3 letters
If Loi = OLi Or Loi = OLf Then
T = 1
If Oquadante_L = True Then GoSub OCoL: If T = 1 Then OLf = OLf + OqL: OLi = OLi + OqL: T = 0: Loi = Loi + OqL
' If OZig_LN = 4 Then
Lig = Lig * -1: Loi = Loi + Lig
' Else
' OZig_LN = OZig_LN + 1
' End If
End If
End If
part of one of the first routines I did in vba after I related to Basic, nowadays I already know how to use functions
I've been reprimanded a lot about it, but when I'm writing something, I do not think much, I get the idea, I think about the logic and I write
and variable types are an important part of the good functioning of routines
so my early warning of the correct use
Charles Pegge
Wow, lisp?
I imagine the knot that should give in the head of one who knows more than one language,
I think without delimiters it should create many programming vices and disrupt those who are learning, as with "=" and "==" inside and outside an "if"
I tried to use C, but I spent more time defining what function was the "}" and looking for where the ";" I've never been able to make anything useful
-
-
-
Aurel
of course if you want to wait for some specific reasons :)
basically it's popcnt that Charles said he'd add.
even in blocks of 32 bit is already a great saving of processing.
nor do I know if in oxygen it has Bitwise Shift Function,
although I also have to learn how to correctly use the Array of oxygen
Charles Pegge
Did you speak in lisp,
particularly I think it can create mistakes in programming mixing so many possibilities, Oxygem would be the proper paradox,
basic and C for me does not have much difference off some details and symbologies, but Basic if a beginner look at the code can have an idea of what is being done, and in C still have to learn the symbologies.
, lisp is another story,
with their learning and being able to mix a language like Basic or C could be a lot easier to write really complex and very fast routines,
I think that there is logic that fits better in one language than in another
-
Here is a 32-bit popcnt emulation demo:
'mov eax,0xaaa
'popcnt ecx,eax
'print ecx '6
'
'popcnt emulation:
xor ecx,ecx
mov eax,0xaaa
mov esi,32
(
dec esi
jl exit
shl eax
jnc bitnotset
inc ecx
bitnotset:
repeat
)
print ecx
The simplicity of LISP syntax is intriguing. We have 2 LISP interpreter experiments: projectsA/LeanLisp and projectsC/OxyScheme. But the distinctive and explicit structure of Basic makes it much easier to read, and we can use macros to accomplish similar flexibility without creating a forest of brackets.
-
My interest in LISP passed when Rob did. :'(