Jump to content

How do people create new programming languages?

I was always curious on how people did this? Do they use an already existing code to help create a new one? Is it something in the source code of an operating system that allows them too? 

01101100 01110110 01101100 00100000 00110101 00100000 01101101 01100001 01100111 01101001 01101011 01100001 01110010 01110000 

Link to post
Share on other sites

Assembly language... telling the machine language to tell the actual hardware what to do

The projects never end in my line of work.

CPU: Dual Xeon E5-2650v2 || GPU: Dual Quadro K5000 || Motherboard: Asus Z9PE-D8 || RAM: 64GB Corsair Vengeance || Monitors: Dual LG 34UM95, NEC MultiSync EA244UHD || Storage: Dual Samsung 850 Pro 256GB in Raid 0, 6x WD Re 4TB in Raid 1 || Sound: Xonar Essense STX (Mainly for Troubleshooting and listening test) || PSU: Corsair Ax1500i

CPU: Core i7 5820k @ 4.7GHz || GPU: Dual Titan X || Motherboard: Asus X99 Deluxe || RAM: 32GB Crucial Ballistix Sport || Monitors: MX299Q, 29UB65, LG 34UM95 || Storage: Dual Samsung 850 EVO 1 TB in Raid 0, Samsung 850 EVO 250GB, 2TB Toshiba scratch disk, 3TB Seagate Barracuda || PSU: EVGA 1000w PS Platinum

Link to post
Share on other sites

I was always curious on how people did this? Do they use an already existing code to help create a new one? Is it something in the source code of an operating system that allows them too? 

I know they use the language 'C', but not sure what more.

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to post
Share on other sites

A programming language is what is between the binary code and what you want to be displayed.

"01101100 01110110 01101100 00100000 00110101 00100000 01101101 01100001 01100111 01101001 01101011 01100001 01110010 01110000"
Is translated to lvl5 magicarp, But first it has to go through a decoder, The other way around it needs a Encoder, A engine is(usually) both a Encoder and a Decoder.

My Gaming PC

|| CPU: Intel i5 4690@4.3Ghz || GPU: Dual ASUS gtx 1080 Strix. || RAM: 16gb (4x4gb) Kingston HyperX Genesis 1600Mhz. || Motherboard: MSI Z97S Krait edition. || OS: Win10 Pro
________________________________________________________________

Trust me, Im an Engineer

Link to post
Share on other sites

I know they use the language 'C', but not sure what more.

 

or assembly

i5-4690k @ 4.2GHz | Asus Radeon R9 290 DirectCU II | Hyper 212 EVO | ASRock Z97 Extreme3 | Corsair Vengeance 8GB 1866MHz, Corsair XMS 4GB | 850 EVO 250GB, random 1TB drive | Corsair 200R | EVGA SuperNOVA 750W | Rosewill RK-9000BR | Logitech G700s | Logitech G930 | ViewSonic VG2427wm, Dell S2209W, Dell S2009W

Dell Inspiron 3147

Latitude E5420, Samsung 840 EVO 250gb, 12gb RAM, 1600x900 display

Pentium G3258 @ 3.2GHz | WD Red 2TB x3 in RAID-Z, Crucial MX100 128GB(cache drive) | Fractal Design Node 304 | Gigabyte GA-H97N-WIFI | Crucial Ballistix Sport 8GB | EVGA 500B

HTC One M8 64GB, Droid Razr M

Link to post
Share on other sites

You create a new programming language by defining all its rules. What will the syntax and semantics be? What is allowed and what isn't? Then to make that programming language useful, you'll need to build a compiler/interpreter for it. Once you have those two things in place, you'll be able to write and run programs with your new language.

 

While there may be some restrictions on the languages you can use to build your compiler, I expect you have plenty of choice (Assembly, C, C++, C#, Java, Python, Ruby, etc). Obviously there are pros and cons to each of them and the languages you use will depend on your goals. If you're just doing a personal project for fun or just want to get a working version finished more quickly, then efficiency might not be a high priority. In that case you can just choose your favourite language which may or may not be amongst the fastest options out there. If you're working on a version that'll be ready for release, you might use a different language where speed and efficiency is a large goal. There's also the option to use different languages for different parts of the compiler.

Link to post
Share on other sites

In the olden days they wrote poked binary into punch cards, this is stuff the circuitry can understand (so say if you gave it 1001 electricity would be sent on those lines and would go through a load of logic gates then spit out an answer), they used that to make assemblers which translated assembly code into the binary representation directly (kind of like a word by word translator) then they kept making higher and higher level programming languages.

"My game vs my brains, who gets more fatal errors?" ~ Camper125Lv, GMC Jam #15

Link to post
Share on other sites

For a tiny bit of humour, I found this

 

But seriously, it takes a lot to write a language. Usually based on machine code, you then create keywords, classes and such. From there, you build low level functions, and build those into high level functions. You would also need a compiler that turns it into machine code, and makes it an executable file. Not to mention specifications and documentation.

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

×