Jump to content

Although i know that we can make programs,softwares,games etc with programming languages( it's the backbone of a computer)  . but the thing that i don't know is that can we make new languages?

 

like you can make a new program from c++ ...etc etc.

can i make a new language and name it something like c2+ or anything?

 

if yes,how to do it? i have microsoft visual c++ i guess! can i do it in it if i want to?

 [spoiler=CORMAC]CPU:Intel celeron 1.6ghz RAM:Kingston 400mhz 1.99gb MOBO:MSI G31TM-P21 GPU:Will add one later on! CASE:local ROUTER D-Link 2750U, D-LINK 2730U MOUSE:HP,DELL,ViP KEYBOARD: v7 SPEAKERS:Creative 245  MONITOR:AOC E970Sw HEADSET: Sony MDRx05s UPS:conex ups avr 500va PSU:idk OD:Samsung super writemaster STORAGE:80 gb seagate+ Seagate 1TB OS:Windows xp sp3 themed to Windows 7 + Linux |Rest all pc in my house will be updated from time-time

COMING SOON

 

 

Link to comment
https://linustechtips.com/topic/44846-can-i-make-a-new-language/
Share on other sites

Link to post
Share on other sites

You can make a new programming language. How good are you with 011011110110111001100101011100110010000001100001011011100110010000100000011110100110010101110010011011110010011101110011

I am good at computer

Spoiler

Motherboard: Gigabyte G1 sniper 3 | CPU: Intel 3770k @5.1Ghz | RAM: 32Gb G.Skill Ripjaws X @1600Mhz | Graphics card: EVGA 980 Ti SC | HDD: Seagate barracuda 3298534883327.74B + Samsung OEM 5400rpm drive + Seatgate barracude 2TB | PSU: Cougar CMX 1200w | CPU cooler: Custom loop

Link to comment
https://linustechtips.com/topic/44846-can-i-make-a-new-language/#findComment-588736
Share on other sites

Link to post
Share on other sites

Sure you can make a new language, but to make it usable you'd have to write the compilers which turn the language into executable code.

 

Someone had a similar question answered over at SO: http://programmers.stackexchange.com/questions/84278/how-do-i-create-my-own-programming-language-and-a-compiler-for-it

Cheers,

Linus

Link to comment
https://linustechtips.com/topic/44846-can-i-make-a-new-language/#findComment-588749
Share on other sites

Link to post
Share on other sites

You can, but I doubt anybody would adopt it, nor would it be convenient to do so.

Link to comment
https://linustechtips.com/topic/44846-can-i-make-a-new-language/#findComment-588750
Share on other sites

Link to post
Share on other sites

  • 2 weeks later...

What low level languages do you know ?

Before writing a language you must understand how code works on a computer.

 

I'm personally the type of guy who will tell you to get started with Linux and make text software by learning C to start with. After you're confortable with basic programming (like making an infinite number calculator that can evaluate expression), you should take a look at the syscalls.

 

For example trying to recode malloc is interesting to understand how memory is allocated when you call it.

 

You must also understand how parsing works when defining the grammar behind your language.

My dream in life is to live of quality internet fiber and junk food.

Link to comment
https://linustechtips.com/topic/44846-can-i-make-a-new-language/#findComment-633679
Share on other sites

Link to post
Share on other sites

The key to creating a language would be the compiler/interpreter, which does all of the work translating from written code to binary/machine code. The compiler would need to be able to parse the written code, figure out if the syntax is correct (if not, spit out the error), then convert it to binary. If you can do that, you can create your own language.

 

Is it worth the time? Not really. You're better off learning how to use a language thoroughly, and at some point, if you wish, help improve the language through extensions. Python is a good example of a language that can be extended via plugins and modules to add infinitely more functionality (as tons of people have already done).

Interested in Linux, SteamOS and Open-source applications? Go here

Gaming Rig - CPU: i5 3570k @ Stock | GPU: EVGA Geforce 560Ti 448 Core Classified Ultra | RAM: Mushkin Enhanced Blackline 8GB DDR3 1600 | SSD: Crucial M4 128GB | HDD: 3TB Seagate Barracuda, 1TB WD Caviar Black, 1TB Seagate Barracuda | Case: Antec Lanboy Air | KB: Corsair Vengeance K70 Cherry MX Blue | Mouse: Corsair Vengeance M95 | Headset: Steelseries Siberia V2

 

 

Link to comment
https://linustechtips.com/topic/44846-can-i-make-a-new-language/#findComment-637032
Share on other sites

Link to post
Share on other sites

You know the more simpler method could be to create a pseudo language....I don't know what it is actually called so I am calling it that :p

 

The premise behind this pseudo language it would sacrifice the speed of the language with the ease of not writing a compiler.  This is the general premise behind it:

1) Determine the type of syntax you want for your code

2) Parse the code (sadly you will always have this step)

3) Interpret the code, but instead of compiling to binary use internal c++ variable to store your variables and function calls are interpreted at run time

 

e.g.

IF[x==2]

parsed into

if variable(x) == 2

runs c++ code ifstatement(variable(x) == 2) goto (line)

 

Anyways just spit-balling here...don't mind me :p

0b10111010 10101101 11110000 00001101

Link to comment
https://linustechtips.com/topic/44846-can-i-make-a-new-language/#findComment-638035
Share on other sites

Link to post
Share on other sites

Anyways just spit-balling here...don't mind me :P

That's basically an interpreter, which essentially replaces the role of a compiler. Python is an example. Interprets what code you write, and figures out what to do from there. Think the Python interpreter is written in C/C++.

Interested in Linux, SteamOS and Open-source applications? Go here

Gaming Rig - CPU: i5 3570k @ Stock | GPU: EVGA Geforce 560Ti 448 Core Classified Ultra | RAM: Mushkin Enhanced Blackline 8GB DDR3 1600 | SSD: Crucial M4 128GB | HDD: 3TB Seagate Barracuda, 1TB WD Caviar Black, 1TB Seagate Barracuda | Case: Antec Lanboy Air | KB: Corsair Vengeance K70 Cherry MX Blue | Mouse: Corsair Vengeance M95 | Headset: Steelseries Siberia V2

 

 

Link to comment
https://linustechtips.com/topic/44846-can-i-make-a-new-language/#findComment-642392
Share on other sites

Link to post
Share on other sites

That's basically an interpreter, which essentially replaces the role of a compiler. Python is an example. Interprets what code you write, and figures out what to do from there. Think the Python interpreter is written in C/C++.

oh yes your right :p Guess I shouldn't comment on things with a few hours of sleep.

 

Anyways some of my points still stands, you could avoid the complicatedness of making a binary file by interpreting the code into equivalent c++ statements.

0b10111010 10101101 11110000 00001101

Link to comment
https://linustechtips.com/topic/44846-can-i-make-a-new-language/#findComment-643553
Share on other sites

Link to post
Share on other sites

Please don't, the fact that you ask if you can do it or not, tells us that you are no where able of creating a new programming language :)

 

Also why would you make a new language? What are the specific needs you have that you cant find in another language?

Best regards Zahlio,
Unity asset developer - Game developer (http://playsurvive.com) - Computer Science student

Link to comment
https://linustechtips.com/topic/44846-can-i-make-a-new-language/#findComment-649856
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×