r/ProgrammingLanguages • • 6d ago

Discussion What do you do with your language when finished?

This question applies to any solo language developer, either as a personal learning project or to try out some features or unique syntax. What happens when your language is finished? Do you end up incorporating it as a scripting language in your other projects? Use it stand alone as a daily driver? Does it get put on a shelf and part of your personal portfolio? Do you try to make it general purpose, put it out there and hope it finds some niche for others?

Or does it never really reach a state of done, where you hack in it madly for a while then gradually slow down as it gets harder and harder to add the features you want. I'm trying to gauge what I'm in for on my second attempt after a 20 year break.

48 Upvotes

50 comments sorted by

114

u/drinkcoffeeandcode mgclex, mgcpgen, & owlscript 6d ago

Finished? That’s funny

32

u/gremolata 5d ago

As some French dude said

Un ouvrage n'est jamais achevé... mais abandonné

A work of art is never completed, only abandoned.

9

u/matthieum 5d ago

"ouvrage" is a little more than just "work of art", it would apply to regular craftsman work or construction work as well.

11

u/gremolata 5d ago

Yes, it's more of a "result of work" or a "work piece".

The "work of art" just seemed more ... erm ... appropriate in this sub's context :)

4

u/DaweSlayer 5d ago

Yeah, that is really cute that he thinks it's a thing.
I'm doing language that has to be finished. But now when I think about what that state actually would be and when. Yeah it's a myth!

54

u/useerup ting language 5d ago edited 5d ago • Popcorn Bravo

Far out in the uncharted backwaters of the unfashionable end of a OneDrive folder lies a small, unregarded markdown file. The file contains the specification of a programming language called Ting, and the file's author has, for some considerable time now, been almost done with it.

"Almost done", it should be noted, is a technical term in language design, roughly equivalent to the Vogon term for "we have begun thinking about scheduling a meeting to discuss the agenda."

Nevertheless, the language will one day be finished. This is a mathematical certainty, in the same way that it is a mathematical certainty that any sufficiently long-lived civilization will eventually invent the Pan Galactic Gargle Blaster, regret it, and invent it again.

Then, the Hitchhiker's Guide to the Galaxy - in its characteristically helpful way - will add an entry reading:

Ting. A logic programming language from the planet Earth (see: Harmless, formerly Mostly Harmless, currently Demolished). Ting unifies the logic, functional and object-oriented paradigms, which is widely considered impressive, given that most civilizations that attempted this went on to unify themselves into a smoking crater. Its most remarkable feature is that the compiler proves things about your program before running it, making it the only known piece of software more pedantic than a Vogon customs official. A program in Ting is simply an expression; this has caused several philosophers on Betelgeuse V to declare that the universe itself is probably a Ting program, mid-evaluation, and that the frequent reports of nondeterminism are therefore expected behavior.

edit: Typos, markdown

2

u/titaniumalt 5d ago

best comment on reddit award

1

u/Inconstant_Moo 🧿 Pipefish 1d ago

Ting unifies the logic, functional and object-oriented paradigms, which is widely considered impressive, given that most civilizations that attempted this went on to unify themselves into a smoking crater.

And you've learned nothing from history?

1

u/useerup ting language 16h ago

I willan haven been plananed to learn from history by the time I reach the future I was intending to visit after this experience—unless future-me has already unlearnan it

18

u/InviteQueasy3739 6d ago

I don’t have any public projects (or truly significant ones) but what I do is create, reach a certain point of dissatisfaction, evaluate my mistakes, and start a new project. I think that, this way, I’m able to maintain control over what I’m doing and learn more about what I produce. Eventually, I create something better.

Although the kind of language I develop is quite unconventional, I believe many others do the same.

5

u/omniuni 6d ago

Unconventional? That sounds interesting.

Have you considered trying to get them to at least a stable enough point to share? I think it would be cool to see unique proof of concepts, and see even failed ideas.

4

u/InviteQueasy3739 6d ago

I've thought about it a few times, but I think it's pretty messy and not very innovative. Although they're unconventional, interactive proof assistants are very common and plentiful.

If you shake one tree, three fall down.

13

u/bitcompost 5d ago

You write your own operating system in it, of course :)

4

u/dak91 3d ago

this is the only correct answer

9

u/Head_Mix_7931 6d ago

I want to self-host. I have an ISA that I’ve designed a CPU around. I want to write an emulator for my CPU with my language. Then I want to create a cross compiling backend for my ISA. Then I want to write a kernel for my CPU.

6

u/AustinVelonaut Admiran 5d ago

After that, learn VHDL / Verilog and code your CPU into an FPGA!

2

u/Falcon731 5d ago

I'm on the same path as you - currently I've got the CPU working (on an FPGA), and the compiler mostly stable (still occasionally finding bugs). Not got very far on the OS yet - I keep getting side-tracked implementing various games to run on my hw.

8

u/AustinVelonaut Admiran 6d ago

You're never finished. There's always something to do: bug fixes, performance enhancements, new library code, new language features to explore and possibly add, etc. If you get bored working in one area, you can shift to something else. Or spend the next month writing Advent of Code solutions using your language!

14

u/Inconstant_Moo 🧿 Pipefish 5d ago

People start using it in production, it makes life easier for white-collar workers everywhere, and the first adverts start appearing on LinkedIn demanding 20 years experience as a Pipefish dev and the latest Microsoft certifications, giving us all a good laugh. People write less Java. Things break less often, and we use slightly less electricity. I spend the rest of my life employed full-time as BDFL for the Pipefish Foundation. (My main function is to emerge from my burrow once a year and say "You will implement those new feature proposals over my dead body" before returning to hibernation.) Prestigious organizations give me awards for being clever. That sort of thing. I haven't planned in detail which awards they're going to give me, but other than that my roadmap is pretty solid.

4

u/Imaginary-Deer4185 4d ago

Future's so bright you gotta wear shades! 😂

5

u/Inconstant_Moo 🧿 Pipefish 3d ago

Sounds like poor UX, I'll put in a feature request for the future to have a dark/light mode button.

7

u/koflerdavid 5d ago

Take it apart for spare parts and use it to implement a new language.

2

u/Imaginary-Deer4185 4d ago

Yes that is a common problem in software dev, having to physically dismantle some old stuff, in order to extract the good parts. It is sad, but that's just how software works.

6

u/kwan_e tonal-lang 6d ago

No one uses finished languages.

Any language that gets used widely is basically on a path to reinvent most of Common Lisp, per Greenspun's 10th.

5

u/lgastako 6d ago

Try to take over the world, obviously.

3

u/kwan_e tonal-lang 6d ago

You were pondering what I was pondering!

4

u/Key_Detail15 5d ago edited 5d ago

What do I do with it? Use it of course!

99% of my coding over several decades has been with my personal, self-hosted languages.

(Shortened.)

2

u/Imaginary-Deer4185 4d ago

Yes, me too. I see no point in creating a language that I will not want to use myself. Where will one get ideas for improvements and additions if not through use?

3

u/MCWizardYT 6d ago

I don't think there are any programming languages that are actually "finished", except for ancient ones that people have stopped developing tools for, or DSLs that never need to be changed.

All the most popular programming languages have been constantly evolving since they came out

3

u/Falcon731 5d ago

I'm using my own language and compiler to build some reasonably non-trivial programs with it. Best example I have is a (partial) port of Outrun :- https://www.reddit.com/r/FPGA/comments/1v88z85/something_more_than_a_basic_riscv/

I'm still occasionally finding bugs in the compiler - but they are becoming rarer.

I plan to eventually write an OS in my language - but keep getting distracted writing games first...

Eventually I'd like to get it self-hosting - but I'm not sure if I will ever get to that stage as I have loa

1

u/derekp7 5d ago edited 5d ago

Looks like I struck a deep nerve here. So I guess I should state where I'm at. A couple decades I thought I could write an interpreter. I had some ideas, ended up making a stack machine, then an over extended shunting yard algorithm that took something that looked like program code and compiled it to postfix notation for the stack machine to execute. Problem is I didn't really have much for memory management, although I could write some toy programs with it.

Earlier this year I got the bug again. What I produced was something based loosely on PostScript (stack based language, first class user dictionaries with dictionary stack, first class anonymous functions, etc). Main deviations at this point is usage of symbols (+, -, etc) instead of words (add, sub, etc). And double-quoted strings instead of strings in parentheses, thought that made more sense. And the strings support C type escapes.

Added true lexical closures (by use of a "parentdict" keyword to grab the active dictionary at the time of lexical function definition -- probably not true closures but I can create a factory function that spits out independent accumulator functions as an example).

Each operator or procedure (user defined function) has access to multiple dispatch, so I can assign a name to a type_dispatch variable that includes the dispatch tables that not only applies to built in operators but also user procedures. And any data item not only carries the native data type but also a user type (i.e. useful for compound data types) that the dispatcher works off of.

The only built in operator that resembles any type of flow control is "?:" (pattern after the C ternary expression). It takes three arguments on the stack, the first is a true/false indicator, second and third are the true and false conditions, the result is the appropriate second or third operand returned back to the stack. These can be { user functions } so you can follow it with "exec" now you get the same thing as an "if/else".

So I have a user-mode if, else, and while functions. Oh yeah, I added TCO (tail call optimization) to the exec_handler so function recursion can be infinite, which works with the user code implementation of "while".

I also have green threads, where I implemented a "spawn_handler" function. So you give an array containing one or more user functions, followed by "spawn", and they get executed via a preemptive scheduler, that also follows yield operations (such as sleep or file I/O).

There are a bunch of other nice things in the language that would have to go into a more detailed tutorial to explain. But next on my list is to work on optimizing the mark and sweep garbage collection (I'm going to start by reducing the garbage that is naturally created in a stack language, by using NaN boxing in the data stack). Then I need to nail down message passing between threads (may implement a buss or mailbox architecture, that will probably live in user space with minimal changes to the core interpreter).

Then I need to start working on libraries, such as a web server library, database connector, things like that.

I have snapshot directories at each feature level, so I think I could arrange these in the form of blog entries to discuss the diffs that add each feature and what compromises went into it. May be useful to someone.

1

u/AustinVelonaut Admiran 4d ago

But next on my list is to work on optimizing the mark and sweep garbage collection (I'm going to start by reducing the garbage that is naturally created in a stack language, by using NaN boxing in the data stack).

If your system doesn't rely upon fixed addresses for (e.g. FFI), moving to a generational compacting garbage collector can give a good performance boost. I used Appel's simple 2-stage GC in my system, and it has worked well.

1

u/derekp7 4d ago

All data items get put in a heap, which is indexed by heap location (simple integer starting with 0) which I use in the data stack and dictionaries, etc. So not a raw memory pointer. I s this what you are referring to?

1

u/AustinVelonaut Admiran 4d ago

So your heap is a fixed array of objects, where the objects are allocated from system memory and explicitly freed when the GC reclaims that heap index? In that case a moving compacting garbage collector wouldn't work, because there is no "sweep" phase of heap indices that haven't been marked as in-use to allow them to be freed up.

Where a generational compacting collector works well is on a large contiguous chunk of memory from a malloc or mmap, and you manage that raw memory explicitly, allocating individual objects with a "bump allocator". Then, when the bump allocator runs out of space, you copy reachable objects to the old space, freeing up all of the new space (without having to perform a sweep phase).

2

u/Embarrassed-Crow9283 6d ago

I don't think a programming language is ever "done". Look at Python or Rust. They're mature languages with countless developers and many years and they are still not "done". A programming language solves an open list of problems, not a closed system, which means it is never complete.

If you have no desire to develop it further, you can shelf the project (or hand it off if your project has more than 1 developer and others still want to continue).

But I wouldn't ever call it "done", rather discontinued.

2

u/L8_4_Dinner (Ⓧ Ecstasy/XVM) 6d ago
  1. Write programming language
  2. ???
  3. Profit!

2

u/jcastroarnaud 5d ago

I'm nowhere near to complete my languages. [pout] I keep moving to other projects after a while, and retake old projects from scratch instead of trying to understand the mess of the previous ones. Since late 2013, when I caught the compiler bug (the fictional disease, not the actual bug), I've got upwards of 50 ideas for languages, started an interpreter for about a dozen, maybe 4 or 5 run actual code, and only completed Brainfuck. :-(

If/when I complete a language: if DSL, use it for its intended purpose. If general, stress it with Advent of Code challenges, or use it instead of JavaScript. If esoteric, post it on esolangs and share the goodies with everyone. :-)

2

u/drunken_thor 5d ago

Tooling is fun, add an lsp, formatter, linter, syntax highlighting, built in test tooling, auto documentation generation tooling and on and on.

2

u/EggplantExtra4946 5d ago edited 5d ago

Write programs in it, duh. Otherwise what is the point?

Research? The goal of PL research is to eventually produce a useful language someday.

Programming languages are tools, programming tools.

1

u/Imaginary-Deer4185 4d ago

Building good tools can be a hobby all on its own, but I agree, if you don't plan to use it yourself, it is dead from the start.

2

u/mc_pm 5d ago

"What do I do with this house once I've finished building it?" Umm... live in it? You built it for a reason.

If you haven't written anything non-trivial with it, then you haven't written a language. You've written something language-shaped that has never been proven, and that's not worth anything to anyone.

1

u/PhosXD 6d ago

im doing all of the above lolll

1

u/busres 6d ago

One of the goals for Mesgjs is to keep it fairly straight-forward - something approachable by beginning programmers. Part of that is expecting that the language itself will change very little (keeping fairly minimal syntax), and that it will just gain capabilities through additional libraries.

I expect to use it as an extension-and-control language in other software.

1

u/kidsiddidlit 5d ago

I don't think it'll ever complete. But after I have a stable frontend I'll work on optimizations, self hosting and language tooling.

1

u/dreamingforward 5d ago

Just like any natural language, a computer language must evolve to incorporate more sophisticated structures/syntax to make expressing complex tasks easier.

1

u/adityazero 5d ago

If it is finished, then it is finished. A language that is designed for adoption would never really finish.

1

u/Imaginary-Deer4185 4d ago

I have created four major languages, three interpreted and one compiled, although to bytecode, so still interpreted, but at a lower level than before.

The first is a postscript-inspired language for partitioning and generating forms on PDF format. It was written around 2004 and isn't really used anymore.

Then follows a language for implementing web backends. It was created around 2008 or so, and is still in use, including production for a few projects at work. Written in Java.

The third is an automation-oriented shell, which I'm using daily, both at work and at home (Windows and Linux, written in Java). I use it for searching, for working with XML and JSON, and lots of other things.

And the last is my "toy" Forth-like language for Arduino. It is a just for fun project, kind of wanting hands-on to see how a relatively simple core can be expanded upon, as most of the functionality in Forth is traditionally written in Forth. It is also the fourth (!) attempt at a bytecode-compiled Forth. Great fun! Written in C using Arduino IDE.

The web backend language is rarely changed these days. The shell sees script updates multiple times a month, and the forth-clone is pure hobby. The last dev over the weekend was creating an S-expression compiler, for Lisp-like syntax. Intended as alternative to the somewhat cryptic Forth code (stack based).

1

u/TheRealUprightMan 3d ago

I'm designing the language with specific intentions and use cases. What I wanted didn't exist, so I have to do it myself. Its designed to be used, not sat on a shelf.

I'm not gonna put in all that work just to hang it on a wall and look pretty. If you don't use it, what's the point?

1

u/DriNeo 1d ago

A text editor, the commands will be expressions in my language. Then I don't know

1

u/Gojo9 1d ago

A specific version of a language can be finalized as version like 1.0 with a fixed binary build of the compiler. For example, when Solidity was first being developed there were around 500 different compiler versions.

A language should be fully capable of creating what it was originally designed for.

When I designed the ACPUL language 14 years ago, I built in the minimum set of features needed to create any program. As a result, it ended up with just three keywords and two language versions: the first stable version, 1.0, which was used to build the OS and version 1.01, which introduced additional bug fixes and improvements, such as the variable declaration operator like 'let a=1'.

Of course, the language can be improved by adding more operators and I've been thinking for a long time about version 1.02, which would introduce some changes to the rules. However, I don't see much point in making further changes beyond that. Version 1 is already self-sufficient. Any major improvements would essentially result in a completely different, incompatible language version 2 just as happened with Python 3.

So, once a language is complete, the focus should shift to using it and expanding its library ecosystem and community.