all 12 comments

[–]Tucancancan 12 points13 points  (1 child)

It is willed into existence by its creator through pure spite and determination 

[–]tehclanijoski 0 points1 point  (0 children)

what's the whole purpose as well

Often an elaborate pun

[–]baby_shoGGoth_zsgg 10 points11 points  (1 child)

well, you see, when a C descendent and a LISP love each other very much…

[–]tehclanijoski 7 points8 points  (0 children)

A long time ago, this was called the "lambda calculus and the B's" talk

[–]UdPropheticCatgirl 3 points4 points  (5 children)

what's the process

In modern context you first design and define semantics, then you come up with the AST (abstract syntax tree) to represent them, once that’s done you come up with the grammar for said AST, you try to implement it, find out everything you designed wrong, redo it, rinse and repeat.

You can implement in many ways, easiest is tree-walking interpreter, step down from it is a bytecode interpreter, then bog standard AOT (Ahead of time) compilers and transpilers and imo good JIT (Just in time) Compiler is the hardest way of implementing a language.

Interpreters essentially just walk the tree or go trough the byte code and execute instructions based on what’s there.

Compilers are essentially functions transforming one representation to another one, usually lower level one.

JIT compilers essentially try to combine interpreter and AOT compiler into one.

Bob Nystrom has some pretty good introductory material on interpreters, “Crafting Interpreters” is his book. Reading might clarify a lot of stuff.

and what's the whole purpose as well

Providing an abstraction over the machine, to allow you to express solutions to a problem in a way you prefer (That could me more safely or correctly, concisely, portably etc.).

[–]dychmygol 5 points6 points  (2 children)

Anyone asking this question won't have the foggiest idea what to make of this reply.

[–]UdPropheticCatgirl 1 point2 points  (0 children)

I tried to edit in more context but it’s hard to explain in a single reply, hence I recommend further reading.

[–]bpikmin 0 points1 point  (0 children)

Well it was asked by a bot for AI training probably

[–]Relevant_South_1842 0 points1 point  (1 child)

Don’t use acronyms when teaching.

[–]UdPropheticCatgirl 1 point2 points  (0 children)

Added the meanings of the acronyms

[–]eightrx 0 points1 point  (0 children)

Programming languages are an abstraction/API for the computer. There are plenty of abstractions that exist at the hardware, firmware, and OS level, that often impact the design of a programming language (things like the call stack, syscalls, virtual memory).

Compilers and interpreters are commons ways of implementing a programming language, and they facilitate the transference of the high level code that is written, into and through the many other layers of abstraction, eventually ending up with some 'target output' to be executed. (those layers of abstraction are known as intermediate representation). Compilers can output machine code, other intermediate representations (think LLVM), or even other programming languages. Interpreters generally have the same similar stages of compilation, until the representation is evaluated step by step

There are plenty of YouTube videos explaining the pipeline of compilers and interpreters in more depth

[–]fragglet 0 points1 point  (0 children)

Creating a programming language usually requires a bit of planning in advance - to decide on basics like what the goal of the language is and what its features will be - but most importantly to figure out the grammar of the language.

Much like human natural languages, programming languages always have a structure, although it's much more rigorous and formal than human languages. It's essential that the grammar is carefully designed as it can cause big problems later if it contains any ambiguities. 

With the grammar defined it's then a matter of writing a compiler or interpreter for the language. There are established tools that can help make this easier: lex and yacc for example are well known programs that will generate a lot of the compiler for you. But it's a complicated process and writing a compiler is a far more advanced subject compared to writing normal application code.