Programming Language Project Ideas

AI Thread Summary
The discussion revolves around ideas for creating a new programming language or alternative project for a class focused on programming language concepts and design. Suggestions include writing a compiler that translates an existing or invented language into JavaScript, developing an Unlambda interpreter, or creating a language that incorporates physical units for type checking in expressions, enhancing the accuracy of calculations like velocity. The importance of understanding the hardware architecture and existing instruction sets, such as x86 or GPU programming, is emphasized for building a new language. Additionally, the potential of creating a macro language to control multiple languages is highlighted, as well as the significance of JavaScript as a platform for modern applications. The conversation encourages exploring data-driven environments and analyzing existing languages to identify areas for innovation.
Luxe
Messages
10
Reaction score
0
I am in a class where we are studying concepts and design of programming languages. For a project we are suppose to design our own programming language or come up with some alternative project idea to do for the class.

So, my question is... do ya'll have any ideas for an interesting and useful new programming language?

or Any ideas for an alternative project?

Thanks-
 
Technology news on Phys.org
Write a compiler that compiles a language (existing or invented) into JavaScript.

Write an Unlambda interpreter.

...write a program that compiles Unlambda into JavaScript?
 
Create a programming language that uses units (meters, kilograms, meters/second^2, grams/electron volt, etc) instead of the usual type system and automatically checks types in expressions. Then things like velocity=distance/time will check for appropriate units on both sides of that.

There was some discussion about implementing this about 25 years ago in the ACM SIGPLAN publications, if you want to do some background research.
 
Luxe said:
I am in a class where we are studying concepts and design of programming languages. For a project we are suppose to design our own programming language or come up with some alternative project idea to do for the class.

So, my question is... do ya'll have any ideas for an interesting and useful new programming language?

or Any ideas for an alternative project?

Thanks-

There are many things you can do.

The first thing you need to do is decide on the scope and context of the language and where/how it will be applied.

Here's three examples that are in the real world:

1) Assembly x86

This is basically the standardized instruction set that most PC CPU's recognize and execute. Every instruction in the set, the flow-control, data structures (ie registers and their size, memory and how it is addressed), and everything related to the executable code and its context is dependent on the instruction set.

Most high level languages have to at some point run machine code (the binary format that is converted from the "literal assembler definition") and thus the functionality of what you can do is restricted by the domain of the assembly instruction set (assuming it maps directly to the machine language definition).

If you wanted to say write some new kind of Java/C++ etc you need to see how this relates to the instruction set of the actual machine and then based on that you can build your new high level execution language based on whatever new particular paradigm you are introducing.

In a nutshell, if you understand your hardware architecture, and how you can get your new language to relate to the language used by your CPU (either directly or indirectly) then you will be in a good position when writing the compiler to compile your executable language into assembler and then machine code which is needed to run your program.

2) Markup

An example of a markup language is HTML.

Although you can get and execute code from web pages, the main feature of the markup language is that it is a descriptive language as compared to say an executable language like C++ or Java. Rather than providing literal code to do something, the language provides a high level descriptive language like "Write this text" and "Write this at size 21 in italics and bold and make it a hyperlink" and so on. In relation to the executable code above the context and scope of the language is vastly different and as such everything from syntax to semantics is also different.

Using the above example, you might want to pick some kind of software that you are familiar with (web browser, popular game that allows modifications, computer graphics software) and if the application is data driven (web browser, Quake III, some computer animation products) basically anything with a data driven front end will provide you with some ideas about language and how it fits in with a specific domain and will help you come up with innovations on that particular paradigm.

3) GPU programs

GPU programs are programs that execute on modern graphics cards. They have a particular instruction set and are a lot more limited than your standard x86 instructions.

They provide you with a new environment and scope very different to the generalized notion of the x86. They are built for performing many parallel instructions at once (ie they have many core units not just one) and are tailored specifically to two pipelines: vertex and texture/pixel.

If you are interested in computer graphics you can get good development kits for these and good integrated development environments for these and see what its all about.

So in closing up I'll state a good way to go about your project

1) Pick an area that you are interested in where the area is completely data drive
2) Look at the area and see the kind of language that is used to describe that data
3) Analyze and learn the "language" and think about improvements or additions or
perhaps merging of different languages/scopes/ideas etc

Good luck!
 
Your teacher will love a macro language that controls multiple languages. This method allows very complicated and time consuming compilers to be controlled from one directive.
 
Bill Simpson said:
Create a programming language that uses units (meters, kilograms, meters/second^2, grams/electron volt, etc) instead of the usual type system and automatically checks types in expressions. Then things like velocity=distance/time will check for appropriate units on both sides of that.

There was some discussion about implementing this about 25 years ago in the ACM SIGPLAN publications, if you want to do some background research.

*thinks*

You know, I bet you could fully implement this (both the checking and the automatic conversion) using C++ templates if you tried. And since the C++ template system can be considered a metaprogramming language, it would probably be appropriate for this class.

Also, I'm going to take a moment to explain my suggestion: javascript is an incredibly important platform that several kinds of modern applications cannot be written without using, and it is increasing in importance since HTML5 is supposedly going to be a "flash killer". However it is also an awkward, inconvenient language with an ad hoc design, which relatively few people have sufficient training with to write sophisticated software in. Since applications which consume javascript (like web browsers) take in and interpret source files written in the actual javascript language, options for targeting Javascript-based platforms while using any language other than Javascript are limited and often require unacceptable tricks like browser plugins or browser-specific extensions (like ABC or NaCl). One solution which would inherently work anywhere Javascript itself would be to take some other language and "compile" it into idiomatic Javascript. (There are projects that do this already, such as Haxe, Scheme2Js and Script#, but they are not ubiquitous and only cover a few languages.) If the source language chosen were fairly simple (as would be appropriate for a proof of concept type project turned in for a class) this would not be overly difficult to implement.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top