BASIC to whatever language converter - basic

Is there a BASIC to some other programming language (Perl, Python, R, ...)?
Having in mind that BASIC once was very widespread - every PC had a BASIC interpreter and BASIC was even taught at schools - I would think there would be a converter from BASIC to some other language, but I could not find one.
I have been mutilated before, and took me decades to recover. I don't want to experience this yet again. I am trying to convert an old program to R, but reading some 400 lines of BASIC code and finding 35 GOTOs is alreading taking its toll.

There is a BASIC to C Translator called BaCon. It offers a modern BASIC style without the need to use GOTOs. It supports also functions for making GUIs.
https://www.basic-converter.org/
http://basic-converter.proboards.com/

Related

Is it true that anything that can be coded in one programming language can be done in any other language?

Is it true that anything that can be coded in one programming language can be done in any other language?
For instance, is it possible to code an Android App in c or c++ instead of Java?
Yes,the only difference being, some languages give inbuilt libraries for certain implementations while in others, you may have to implement it by yourself.
Take for example: consider A and B to be matrices, In Octave you can multiply them by just doing A*B, while in other languages, like C, you should write the full code yourself.
Yes of course no doubt. The only thing is that somethings can be done easily in one programming language while in other it may be a tough one.
This is my personal opinion; it is difficult to answer with 100% accuracy because I do not know the ins and outs of every language that exists but I will try to answer in two parts.
Short answer:
Yes; it is entirely possible to do anything in one language in another language. However, it may be harder to duplicate specific logic across languages.
Long answer:
Although it can be possible to implement the same program/class/software in one language in another language, this is not always the best thing to do.
For example, some languages have advantages over others in specific areas. FORTRAN, C, and C++ are all languages that can produce fast results for math operations when compared to languages like Java or C#. But C# for example, gives you much more flexibility than say C++ with object orientation.
So for example, you have millions of operations that need to be done, and time is important to you - C/C++ would be a better language to implement compared to C#.
But If you cared less about the efficiency, and wanted to leverage the benefits of OOD within C#, then you would use C#.
Note:
I tried to be simple with this example, remember a book could be written on this topic.
A programming language can do anything another can, but certain steps are put in place so they can not. You don't want Javascript calling to your windowAPI and bringing up windows outside your browser, or placing bat files on your computer without your permision

How to go about making your own programming language? [duplicate]

This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Learning to write a compiler
I looked around trying to find out more about programming language development, but couldn't find a whole lot online. I have found some tutorial videos, but not much for text guides, FAQs, advice etc. I am really curious about how to build my own programming language. It brings me to SO to ask:
How can you go about making your own programming language?
I would like to build a very basic language. I don't plan on having a very good language, nor do I think it will be used by anyone. I simply want to make my own language to learn more about operating systems, programming, and become better at everything.
Where does one start? Building the syntax? Building a compiler? What skills are needed? A lot of assembly and understanding of the operating system? What languages are most compilers and languages built in? I assume C.
I'd say that before you begin you might want to take a look at the Dragon Book and/or Programming Language Pragmatics. That will ground you in the theory of programming languages. The books cover compilation, and interpretation, and will enable you to build all the tools that would be needed to make a basic programming language.
I don't know how much assembly language you know, but unless you're rather comfortable with some dialect of assembly language programming I'd advise you against trying to write a compiler that compiles down to assembly code, as it's quite a bit of a challenge. You mentioned earlier that you're familiar wtih both C and C++, so perhaps you can write a compiler that compiles down to C or C++ and then use gcc/g++ or any other C/C++ compiler to convert the code to a native executable. This is what the Vala programming language does (it converts Vala syntax to C code that uses the GObject library).
As for what you can use to write the compiler, you have a lot of options. You could write it by hand in C or C++, or in order to simplify development you could use a higher level language so that you can focus on the writing of the compiler more than the memory allocations and the such that are needed for working with strings in C.
You could simply generate the grammars and have Flex and Bison generate the parser and lexical analyser. This is really useful as it allows you to do iterative development to quickly work on getting a working compiler.
Another option you have is to use ANTLR to generate your parser, the advantage to this is that you get lots of target languages that ANTLR can compile to. I've never used this but I've heard a lot about it.
Furthermore if you'd like a better grounding on the models that are used so frequently in programming language compiler/scanner/parser construction you should get a book on the Models of Computation. I'd recommend Introduction to the Theory of Computation.
You also seem to show an interest in gaining an understanding of operating systems. This I would say is something that is separate from Programming Language Design, and should be pursued separately. The book Principles of Modern Operating Systems is a pretty good starting place for learning about that. You could start with small projects like creating a shell, or writing a programme that emulates the ls command, and then go into more low level things, depending on how through you are with the system calls in C.
I hope that helps you.
EDIT: I've learnt a lot since I write this answer. I was taking the online course on programming languages that Brown University was offering when I saw this answer featured there. The professor very rightly points out that this answer talks a lot about parsers but is light on just about everything else. I'd really suggest going through the course videos and exercises if you'd like to get a better idea on how to create a programming language.
It entirely depends on what your programming language is going to be like.
Do you definitely want it to be compiled? There are interpreted languages as well... or you could implement compilation at execution time
What do you want the target platform to be? Some options:
Native code (which architectures and operating systems?)
JVM
Regular .NET
.NET using the Dynamic Language Runtime (like IronRuby/IronPython)
Parrot
Personally I would strongly consider targeting the JVM or .NET, just because then you get a lot of "safety" for free, as well as a huge set of libraries your language can use. (Obviously with native code there are plenty of libraries too, but I suspect that getting the interoperability between them right may be trickier.)
I see no reason why you'd particularly want to write a compiler (or other part of the system) in C, especially if it's only for educational purposes (so you don't need a 100-million-lines-a-second compiler). What language are you personally most productive in?
Take a look at ANTLR. It is an awesome compiler-compiler the stuff you use to build a parser for a language.
Building a language is basically about defining a grammar and adding production rules to this grammar. Doing that by hand is not trivial, but a good compiler-compiler will help you a lot.
You might also want to have a look at the classic "Dragon Book" (a book about compilers that features a knight slaying a dragon on the front page). (Google it).
Building domain specific languages is a useful skill to master. Domain specific languages is typically not full featured programming language, but typically business rules formulated in a custom made language tailor made for the project. Have a look at that topic too.
There are various tutorials online such as Write Yourself a Scheme in 48 hrs.
One place to start tho' might be with an "embedded domain specific language" (EDSL). This is a language that actually runs within the environment of another, but you have created keywords, operators, etc particularly suited to the subject (domain) that you want to work in.

How to create a language these days?

I need to get around to writing that programming language I've been meaning to write. How do you kids do it these days? I've been out of the loop for over a decade; are you doing it any differently now than we did back in the pre-internet, pre-windows days? You know, back when "real" coders coded in C, used the command line, and quibbled over which shell was superior?
Just to clarify, I mean, not how do you DESIGN a language (that I can figure out fairly easily) but how do you build the compiler and standard libraries and so forth? What tools do you kids use these days?
One consideration that's new since the punched card era is the existence of virtual machines already bountifully provided with "standard libraries." Targeting the JVM or the .NET CLR instead of ye olde "language walled garden" saves you a lot of bootstrapping. If you're creating a compiled language, you may also find Java byte code or MSIL an easier compile target than machine code (of course, if you're in this for the fun of creating a tight optimising compiler then you'll see this as a bug rather than a feature).
On the negative side, the idioms of the JVM or CLR may not be what you want for your language. So you may still end up building "standard libraries" just to provide idiomatic interfaces over the platform facility. (An example is that every languages and its dog seems to provide its own method for writing to the console, rather than leaving users to manually call System.out.println or Console.WriteLine.) Nevertheless, it enables an incremental development of the idiomatic libraries, and means that the more obscure libraries for which you never get round to building idiomatic interfaces are still accessible even if in an ugly way.
If you're considering an interpreted language, .NET also has support for efficient interpretation via the Dynamic Language Runtime (DLR). (I don't know if there's an equivalent for the JVM.) This should help free you up to focus on the language design without having to worry so much about the optimisation of the interpreter.
I've written two compilers now in Haskell for small domain-specific languages, and have found it to be an incredibly productive experience. The parsec library makes playing with syntax easy, and interpreters are very simple to write over a Haskell data structure. There is a description of writing a Lisp interpreter in Haskell that I found helpful.
If you are interested in a high-performance backend, I recommend LLVM. It has a concise and elegant byte-code and the best x86/amd64 generating backend you can find. There is an optional garbage collector, and some experimental backends that target the JVM and CLR.
You can write a compiler in any language that produces LLVM bytecode. If you are adventurous enough to learn Haskell but want LLVM, there are a set of Haskell-LLVM bindings.
What has changed considerably but hasn't been mentioned yet is IDE support and interoperability:
Nowadays we pretty much expect Intellisense, step-by-step execution and state inspection "right in the editor window", new types that tell the debugger how to treat them and rather helpful diagnostic messages. The old "compile .x -> .y" executable is not enough to create a language anymore. The environment is nothing to focus on first, but affects willingness to adopt.
Also, libraries have become much more powerful, noone wants to implement all that in yet another language. Try to borrow, make it easy to call existing code, and make it easy to be called by other code.
Targeting a VM - as itowlson suggested - is probably a good way to get started. If that turns out a problem, it can still be replaced by native compilers.
I'm pretty sure you do what's always been done.
Write some code, and show your results to the world.
As compared to the olden times, there are some tools to make your job easier though. Might I suggest ANTLR for parsing your language grammar?
Speaking as someone who just built a very simple assembly like language and interpreter, I'd start out with the .NET framework or similar. Nothing can beat the powerful syntax of C# + the backing of the entire .NET community when attempting to write most things. From here i designed a simple bytecode format and assembly syntax and proceeeded to write my interpreter + assembler.
Like i said, it was a very simple language.
You should not accept wimpy solutions like using the latest tools. You should bootstrap the language by writing a minimal compiler in Visual Basic for Applications or a similar language, then write all the compilation tools in your new language and then self-compile it using only the language itself.
Also, what is the proposed name of the language?
I think recently there have not been languages with ALL CAPITAL LETTER names like COBOL and FORTRAN, so I hope you will call it something like MIKELANG with all capital letters.
Not so much an implementation but a design decision which effects implementation - if you make every statement of your language have a unique parse tree without context, you'll get something that it's easy to hand-code a parser, and that doesn't require large amounts of work to provide syntax highlighting for. Similarly simple things like using a different symbol for module namespaces and object namespaces ( unlike Java which uses . for both package and class namespaces ) means you can parse the code without loading every module that it refers to.
Standard libraries - include the equivalent of everything in C99 standard libraries other than setjmp. Add whatever else you need for your domain. Work out an easy way to do this, either something like SWIG or an in-line FFI such as Ruby's [can't remember module name] and Python's ctypes.
Building as much of the language in the language is an option, but projects which start out doing either give up (rubinius moved to using C++ for parts of its standard library), or is only for research purposes (Mozilla Narcissus)
I am actually a kid, haha. I've never written an actual compiler before or designed a language, but I have finished The Red Dragon Book, so I suppose I have somewhat of an idea (I hope).
It would depend firstly on the grammar. If it's LR or LALR I suppose tools like Bison/Flex would work well. If it's more LL, I'd use Spirit, which is a component of Boost. It allows you to write the language's grammar in C++ in an EBNF-like syntax, so no muddling around with code generators; the C++ compiler compiles the grammar for you. If any of these fail, I'd write an EBNF grammar on paper, and then proceed to do some heavy recursive descent parsing, which seems to work; if C++ can be parsed pretty well using RDP (as GCC does it), then I suppose with enough unit tests and patience you could write entire compilers using RDP.
Once I have a parser running and some sort of intermediate representation, it then depends on how it runs. If it's some bytecode or native code compiler, I'll use LLVM or libJIT to process it. LLVM is more suited for general compilation, but I like the libJIT API and documentation better. Alternatively, if I'm really lazy, I'll generate C code and let GCC do the actual compilation. Another alternative, is to target an existing VM, like Parrot or the JVM or the CLR. Parrot is the VM being designed for Perl. If it's just an interpreter, I'll walk the syntax tree.
A radical alternative is to use Prolog, which has syntax features which remarkably simulate EBNF. I have no experience with it though, and if I am not wrong (which I am almost certainly going to be), Prolog would be quite slow if used to parse heavy duty programming languages with a lot of syntactical constructs and quirks (read: C++ and Perl).
All this I'll do in C++, if only because I am more used to writing in it than C. I'd stay away from Java/Python or anything of that sort for the actual production code (writing compilers in C/C++ help to make it portable), but I could see myself using them as a prototyping language, especially Python, which I am partial towards. Of course, I've never actually done any of this before, so I'm not one to say.
On lambda-the-ultimate there's a link to Create Your Own Programming Language by Marc-André Cournoyer, which appears to describe how to leverage some modern tools for creating little languages.
Just to clarify, I mean, not how do you DESIGN a language (that I can figure out fairly easily)
Just a hint: Look at some quite different languages first, before designing a new languge (i.e. languages with a very different evaluation strategy). Haskell and Oz come to mind. Though you should also know Prolog and Scheme. A year ago I also was like "hey, let's design a language that behaves exactly as I want", but fortunatly I looked at those other languages first (or you could also say unfortunatly, because now I don't know how I want a language to behave anymore...).
Before you start creating a language you should read this:
Hanspeter Moessenboeck, The Art of Niklaus Wirth
ftp://ftp.ssw.uni-linz.ac.at/pub/Papers/Moe00b.pdf
There's a big shortcut to implementing a language that I don't see in the other answers here. If you use one of Lukasiewicz's "unparenthesized" forms (ie. Forward Polish or Reverse Polish) you don't need a parser at all! With reverse polish, the dependencies go right-to-left so you simply execute each token as it's scanned. With forward polish, it's the reverse of that, so you actually execute the program "backwards", simplifying subexpressions until reaching the starting token.
To understand why this works, you should investigate the 3 primary tree-traversal algorithms: pre-order, in-order, post-order. These three traversals are the inverse of the parsing task that a language reader (i. parser) has to perform. Only the in-order notation "requires" a recursive decent to re-construct the expression tree. With the other two, you can get away with just a stack.
This may require more "thinking' and less "implementing".
BTW, if you've already found an answer (this question is a year old), you can post that and accept it.
Real coders still code in C. Just that it's a litte sharper.
Hmmm... language design? or writing a compiler?
If you want to write a compiler, you'd use Flex + Bison. (google)
Not an easy answer, but..
You essentially want to define a set of rules written in text (tokens) and then some parser that checks these rules and assembles them into fragments.
http://www.mactech.com/articles/mactech/Vol.16/16.07/UsingFlexandBison/
People can spend years on this, The above article talks about using two tools (Flex and Bison) That can be used to turn text into code you can feed to a compiler.
First I spent a year or so to actually think how the language should look like. At the same time I helped in developing Ioke (www.ioke.org) to learn language internals.
I have chosen Objective-C as implementation platform as it's fast (enough), simple and rich language. It also provides test framework so agile approach is a go. It also has a rich standard library I can build upon.
Since my language is simple on syntactic level (no keywords, only literals, operators and messages) I could go with Ragel (http://www.complang.org/ragel/) for building scanner. It's fast as hell and simple to use.
Now I have a working object model, scanner and simple operator shuffling plus standard library bootstrap code. I can even run a simple programs - as long as they fit in one file that is :)
Of course older techniques are still common (e.g. using Flex and Bison) many newer language implementations combine the lexing and parsing phase, by using a parser based on a parsing expression grammar (PEG). This works for recursive descent parsers created using combinators, or memoizing Packrat parsers. Many compilers are built using the Antlr framework also.
Use bison/flex which is the gnu version of yacc/lex. This book is extremely helpful.
The reason to use bison is it catches any conflicts in the language. I used it and it made my life many years easier (ok so i'm on my 2nd year but the first 6months was a few years ago writing it in C++ and the parsing/conflicts/results were terrible! :(.)
If you want to write a compiler obviously you need to read the Dragon Book ;)
Here is another good book that I have just read. It is practical and easier to understand than the Dragon Book:
http://www.amazon.co.uk/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=language+implementation+patterns&x=0&y=0
Mike --
If you're interested in an efficient native-code-generating compiler for Windows so you can get your bearings -- without wading through all the unnecessary widgets, gadgets, and other nonsense that clutter today's machines -- I recommend the Osmosian Order's Plain English development system. It includes a unique interface, a simplified file manager, a friendly text editor, a handy hexadecimal dumper, the compiler/linker (of course), and a wysiwyg page-layout application for documentation. Written entirely in Plain English, it is a quick download (less than a megabyte), small enough to understand in short order (about 25,000 lines of Plain English code, with just 4,000 in the compiler/linker), yet powerful enough to reproduce itself on a bottom-of-the-line Dell in less than three seconds. Really: three seconds. And it's free to all who write and ask for a copy, including the source code and and a rather humorous tongue-in-cheek 100-page manual. See www.osmosian.com for details on how to get a copy, or write to me directly with questions or comments: Gerry.Rzeppa#pobox.com

First programming language after web development? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I've been thinking of making a desktop program but I have no experience in that. I've been programming in PHP, ASP and JavaScript before. Java seems to be nice since you can run it on all OS. But what I really want is result, I do not really care what language makes me a good programmer (I'll take that later in college :P). I've tried both C# and Python before but it was only console applications.
So, what programming language do you recommend to me?
If you want Windows results, C#. If you want cross-platform results, Python.
You could also just pick randomly. Or you could try them all. Or look at the 16 trillion previous questions on this exact same topic.
UPDATE:
To find those questions, I mentioned, try some Google fun:
"what language" OR "which language" learn site:stackoverflow.com
My personal bias would be towards learning functional programming (Scala or even lisp would be nice). But, honestly, any language could improve your skills pretty dramatically at this point. Just take a look at a few of the mainstream ones, and pick the one that suits your interest the best.
For some ideas (not in any particular order):
C - Learning the low-level details of memory allocation can be useful background. If you use Linux, there's tons of sample code in Gnome apps to show you how to write reasonably elegant code in the language.
C++ - C on steroids... there's lots of complexity here if you want to learn it, but it can also be a great language to have in your arsenal.
C#/Java - Nice, high-level, reasonably portable languages. I prefer the C# language over Java, but there are advantages and disadvantages to each (Java portability is better). In the end its just a matter of preference, and external factors (legacy codebases may swing you one way or the other).
Scala - Java on Steroids - Really nice language, but the learning curve can be a bit steep, IMO.
Python/Ruby/Lisp/etc - Nice scripting languages, most of which are easy to learn, and all of which will lead to new ways of thinking about problems.
Honestly, in the end, the most important rule is just to have fun. Look through the basic "hello world" tutorials and just pick the one that looks the most pleasant. Learning never hurts.
I've found that making desktop applications in C# / VB.NET (I'd strongly recommend the former) can be much easier than other languages, particularly with a good IDE such as Visual Studio (or the free Express editions) or Sharp Develop. It will be much easier to get it going on Windows, of course (I don't know much about Mono + WinForms), but I think the easier transition is worth the tradeoff.
Many people have been suggesting low level languages such as C, C++, but frankly I'm not certain that it would be a worthwhile investment of your time. The first programming language I learned was C, from the K&R book, but if I were to teach my son how to program today I would introduce him to python or ruby.
Both python and ruby are very expressive, sophisticated languages that are easy to learn and have an intuitive, english like syntax. By all means do learn about structured programming, and older compiled languages, but initially you'll reap more benefit from learning OO concepts in a high level language.
Java and C# are excellent languages, however they are very tightly coupled with their frameworks, and you may run the risk of getting bogged down learning a framework instead of programming fundamentals.
If you were comfortable in PHP you will feel right at home with Perl, better yet, pampered. You could even turn around and use Perl on the web with your former languages via CGI.
If GUIs is what you're after, C# is your best bet for Windows and Java for other platforms.
If you want result and GUI and you don't care if it's windows only, you probably want C#.
If you want to run on different platforms, you might check out any language on the JVM since they all have access to a pretty powerful GUI toolkit. (Jython, Groovy, Java, ...)
Don't bother with the desktop just yet. Hit the command line.
Get the K&R book and really learn C. You don't know how much you've missed out on if your background is 100% high-level (PHP, Python, Ruby, JS) web dev.
Learn the fundamentals, then raise the bar by going into C# or Objective C.
You can go easy or go hard, go fast or go slow.
Many people say C#, it's nice and can also be used on Linux through mono. On the other hand you can go with C/C++ and maybe Java. You'll have fun with C/C++, learn something and be a better programmer; but it will take time. Java is simpler but "needy". If you want the easiest way to develop a desktop application, you can go with VB or Delphi. Delphi has some advantages over VB which I'm not going to go into here.
My advice would be, if you have time, are willing, and just want to experience GUI, go from low to high, slow to fast, hard to easy. Try assembler, know C/C++, use Java, crack open C# and browse thought VB and Delphi.
In the end maybe you will not create a powerful application, but you will be prepared for college, be experienced and generally "know stuff".
For someone with HTML and Javascript skills Adobe AIR could be the way to go.
It allows you to create a desktop application using HTML/DHTML or if you are familiar with Flex you can also use Flex.
See http://www.adobe.com/products/air/
Go through K&R C. Learn C and you should have a great foundation for learning other languages.
i would say that Java would give a good introduction to desktop apps. I havent had any experience with some of the other languages mentioned here.
You can do some simple stuff in Java with very little headache, as compared to some other languages that require hundreds of lines of code.
Just depends if you have been exposed to OO programming in your web experience
Consider VB.NET (not "classic" vb!) as an easy-to-start-with high-level language that can help you get your foot in the door; then get up to speed with C# as well. The two are interchangable--VB.NET and C# are really just different dialects of .NET.
There's three things VB.NET has going for it over C# for beginner programmers:
VB.NET tends to be a more descriptive (some would say chatty) language
Where C# uses symbols VB.NET will use (slightly) more descriptive words. After a while VB.NET will probably be chatty to the point it annoys you, but by then you should be quite comfortable with .NET and switching to C# will be fairly trivial
Slightly more relaxed syntax
C# will gripe if you leave off parenthesis on method calls, and gripe if you add them to Property accessors--VB isn't quite as picky. It won't let you go haywire with bad syntax (like HTML) but it won't gripe and complain over every little detail
Better pre-compilation parsing
If you work with Visual Studio in both languages you'll notice it will show most compiler errors and warnings for VB.NET right away. C# will wait until you try to compile to tell you that there's errors in your code. The difference isn't huge (C# will warn you for most errors after a delay) but it can be a concentration buster to think you've just pulled off a method and found out it's 10 errors away from compiling (4 of which are because you left the () off a method call).
Once you learn the main features of .NET it's easy to learn the C# equivalency and transition if you want to; and at some point you might decide that VB.NET is a bit too chatty and opt for C# (pretty much what I did).
The only catch to VB.NET is that you should get in the habit of always adding two lines to the top of your code files; they'll help you out immensely in terms of not letting you do stupid things :)
Option Strict On
Option Explicit On
Here's a real short example of the "words vs. symbols"... you'll see there's not much difference other than some brackets in C# and some extra words describing what's happening in VB.NET
Option Strict On
Option Explicit On
Imports System
Imports System.Windows.Forms
<Serializable> _
Public Class MyClass
Inherits SomeBaseClass
Implements SomeInterface
Public Shared Sub DoSomething()
For each item as Object in SomeCollection
Debug.Writeline(item.ToString)
Next
End Sub
Public Sub SomeInterfaceMethod() Implements SomeInterface.SomeInterfaceMethod
MessageBox.Show("Grrblah!")
End Sub
End Class
using System;
using System.Windows.Forms;
using System.Diagnostics;
[Serializable]
public class MyClass : SomeBaseClass, SomeInterface
{
public static void DoSomething()
{
foreach(Object item in SomeCollection)
{
Debug.WriteLine(item.ToString());
}
}
public void SomeInterfaceMethod()
{
MessageBox.Show(#"Grrblah!");
}
}
Try not to fall in the 'must-be-cross-platform' trap. If you're just beginning, that shouldn't be what's on your mind. I can't speak for everyone, but I myself, and I have seen this happen to others, got caught in this early on and didn't get anywhere because I was always trying to find things that were cross platform, and just because they are cross platform doesn't mean they are the best suited for your situation, especially early on.
When you become proficient at a language, you will know how to port and make things cross platform. Don't choose something solely because it is advertised as being cross platform, despite the fact that most languages today are, don't feel the need to ignore other languages that, while not necessarily platform specific, seem to be better on certain platforms, such as C# for Windows and Objective-C for Mac, which are both great languages in my opinion.
If you want to learn something that benefits you in web development as well as in desktop development, I would go with Ruby. You can look into Ruby on Rails for web development. Ruby is also pretty cross platform and you can develop desktop applications with it. There are also various bindings, so for example you can write Mac apps with it and even have access to .Net with Iron Ruby, if need be.
Python is also a possibility.

Programming language with native code support, No framework (I write the framework)

I'm looking for a programming language. It should be an easy language to learn, and should have a Garbage Collector. It should be a basic language with features like basic types (integer, boolean), arrays and etc, and I should write the framework.
It is for a game editor I want to write. The editor's designer will write the code of the UI in this programming language. The framework will be a 2D graphics and audio framework, and in the future it'll be 3D too.
I thought about the new Go language, but it doesn't have much support and theres no binding to OpenGL and etc.
Any ideas?
Thanks.
The obvious two are [C](http://en.wikipedia.org/wiki/C_(programming_language)) or C++. However, [D](http://en.wikipedia.org/wiki/D_(programming_language)) is closer to Java and C# given that it has a garbage collector in the standard, as well as an alternative standard library that is fairly closer to Java than the C++ standard library. The downside with D is that they tools are not as mature as C++ or C and the community isn't as large.
The obvious solution though it to look down the list of compiled languages on wikipedia and see which you like the look of.
Well, that's a fairly broad question and without more specific requirements it is difficult to give a focused answer, but it sounds like C (or C++) would fit the bill for you. The languages you described all owe their syntax to C. C will compile to native code. C is basic language in that there is not much to learn beyond the basic syntax and it has all the basic primitives that you require.
Now that you've added the requirement of a garbage collected language, I suppose that you could try Go, but that language is not mature and there's always a risk there.
If you don't want to manage memory all by yourself like C or C++, you can try the new Go language. It compiles to native code (albeit for Linux and MacOSX only for now) and comes with a basic framework that can be easily replaced with your own framework.
It has a very active user base, so IMO it is possible to mature quickly.
You may want to look at Lua.
Lua is a relatively tiny language which manages to be capable and universal with just a few concepts. The BNF specification for the whole language fits easily on one page. It has numbers, booleans, tables and functions, and surprisingly that's all the datatypes it needs. It can even work in an object-oriented fashion.
There's a compiler, Luac, that compiles Lua to bytecode.
Lua is already being used as a UI programming language for games. Addons for World of Warcraft and a few other games are programmed in Lua. I believe Lua is a very good fit for this kind of task.
You want OpenGL? OK... http://luagl.wikidot.com/ is an OpenGL library for Lua.
Since we don't know what you want to do, I don't know what are the chances we success. Therefor, what about a language where you have to set the probability of your statement to fail :
Meet GOTO++.
Don't say "thanks you", it's on me.
Enjoy a challenge?
Try go.
Here's a tech talk by rob pike, and here is a discussion group: http://groups.google.com/group/golang-nuts/topics
.
C++ is Great, it's not scripting lang, so you don't even need a scripting host.

Resources