Comment by DeathArrow
20 hours ago
I had some thoughts about designing a new language. However it's a huge undertaking and I don't know the answers to some questions:
1. Is there a need for the programming language?
2.If the answer to the previous question is yes, can I find enough people to help and enough resources?
3. If the answer to the previous question is yes, can we release a MVPin a reasonable amount of time?
4. If the answer to the previous question is yes, what is the chance it will gather a reasonable amount of users?
There are literally tons of programming languages that didn't make it. I wouldn't want to waste my and other people resources.
I made a language for using in another project, so I'll answer your questions
https://www.npmjs.com/package/wang-lang
- this new language looks and behaves exactly like javascript, except it doesnt have "eval" and "new Function", so it is CSP safe. That's the only difference. I wanted to execute dynamically generated code in chrome extension
- llm did most of the work of creating a nearley grammar and associated interpreter (whole thing is bundled, nearley is not a final dependency), elaborate tests make this quite sane to handle
- took me about total of 1 weeks for the initial mvp to try out, and then have been fixing bugs and inconsistencies with javascript behavior, about 1 day a month of effort
- mostly 0
The only reason to create was I couldnt find something similar and it was low effort thanks to llm
I also created another even smaller DSL you can say
https://www.npmjs.com/package/free-text-json-parser
It parses json embedded in plain text
I once made a hacked version of javascript for work, starting with rhino. I adjusted it to make `.` and `[]` on null/undefined return undefined. Kind of like the `?.` in modern javascript, but it didn't exist back then. I was inspired by ObjectiveC's message send behavior.
The language was for some configuration in a reporting system. The scripts were written by non-engineers, and the changes made the language more user friendly for them. I started from javascript because I expected it would be easier for them to find documentation.
Nice. I built something basically just like this for work for the same reason last year. It only look a few hours though, cause I just used Acorn [0] to parse my JS, then directly evaluated the AST. It also had an iteration limit and other configurable limits so I can eval stuff in the browser without crashing the tab. I did not use an LLM.
[0]: https://github.com/acornjs/acorn
This is exactly what I wanted and couldn't find. Ended up creating along with an interpreter (so slightly easier then walk and execute)
> safe
> llm did most of the work
> it was low effort
I really wouldn’t trust its supposed safety.
csp safe has a particular meaning associated it with. its not a "safe" language whatever that is. chrome webstore team is okay with it and serves my purpose. if you have submitted extensions to google chrome then you would know that any sign of "eval" or new Function in the code will lead to rejection.
2 replies →
"Just for fun" is always a valid default option. Though many authors don't stop there ;-)
I think most popular languages were started as an experiment in some feature, or to solve a specific problem someone had. Those are good reasons to make a language. I see no reason to make a language just to take attention away from other existing languages. Instead, make a language so you can understand how to make languages. It is 100% doable by one person. It's fun and educational.
Sometimes it might just be a fun project to push yourself. Maybe such a complex undertaking can't be fun indeed lol
My idea of for fun is to release something people will use. I have more fun if I work on something useful. For me is less the journey than the end goal.
I love working on software, architecture, design but only if I see some use.
Of course, for other people, the journey is more interesting than the destination and they have fun hacking stuff just for the sake of it. They discover things and learn new stuff they wouldn't have learned otherwise. And this is a path at least as valid as the other.
I'll try to answer your questions best I can.
1. Yes, as long as there are new machines that need programming, new programming languages will be needed. Today's top languages were built for the machines of the 1970, 80s, and 90s. Tomorrow's languages will be built for machines of today and tomorrow. As Alan Kay put it, if you want to invent a new language, first invent the machine of the future and then build a language for it.
2. No, you cannot. First of all, PL devs are cats, it's very difficult collecting them without financial compensation. So if your plan is to post a language and hope that people will come help you, you'll likely be disappointed. The problem is that everyone else interested in building PLs has their own itch to scratch, and they're not going to scratch yours without some compensation.
You might think "Well I can just raise money to do this", and you would be wrong. First, it's very hard to raise money for PLs. Usually you have to have come sort of cred to do it. I know of only 3 projects to have raised VC money for a PL project, and they each had some success before they had done so: Chris Granger (Light Table), Paul Biggar (CircleCI), and Chris Lattner (Swift/LLVM). Granger's project Eve raised $2M and ran out of money after 3 years; Biggar's project Dark also raised money, then fired all the devs when he realized he was burning cash too fast, then he slow-burned development for years, then he gave up and handed development over to someone else; and Lattner raised almost $100M for Mojo, which is probably going to end much the same way as Eve and Dark, but I wish them the best.
Anyway, the point is that you personally (no offense) don't have the profile to raise $100M like Lattner. $2M is not enough for a PL project. Lattner is keeping Mojo closed source for now because there's no good answer for how they're going to make enough money as an open source language to justify raising $100M.
And the reason it's so hard to raise money is because there's no money to be made. No one pays for PLs. No one pays for PL dev tools. They have to be open source or they're rejected by the dev community. The only ones these days who can reasonably pay for all of this with no potential revenue stream are giant corporations, who use the lang as a hook into their ecosystem.
3. Even though the answer is no, you yourself can still get an MVP off the ground in a pretty reasonable amount of time. It's never been easier to make a PL. The problem with PLs is building them is kind of like measuring the coastline; language projects are fractals -- there's an infinite amount of detail you can work on in any given direction. It's very easy for a language project to become a language + editor project, and it's easy for that to turn into language + editor + operating system if you're not disciplined. Plenty of PL devs have fallen into that trap.
4. Rounds to 0% chance. You'll be lucky if you build something that even you will use. Rather, most PL devs end up working on their language in some other language, because working on languages is what they want to do!
That said, it's still important to write languages that you understand no one will use. First it allows you to try new things that may good but unpopular. If PL devs only did what was popular with devs, PLs would go nowhere as a field.
Consider the so called "Hornet's nest" of programming languages [1], which is the tightly related cluster of imperative programming languages which have been the most researched and used over the last 50 years. There is a vaaaaaaaast design space outside that nest, begging for more language development. No one will use most of them, but it's important to understand what those languages might look like to maybe find some new ideas that work.
Also "didn't make it" is kind of an unfair judgement. Gaining popularity doesn't have to be a goal. In fact, it shouldn't be a goal if you want to have any fun at all. There's an infinite amount of work to be done, and if you're not doing it for you, you won't get far at all. That's really the only way to fail at this.
Good luck!
[1] https://tomasp.net/techdims/#footer=index,navigation;left=ca...
Bold plus, making PLs is a lifestyle, not a business. Most PLs clones each other and absorb features. The only difference is QOL and tooling. Users expect to have a full set of batteries, an IDE/LSP, jobs, OOP style, and minimal effort to learn. Being popular contradicts with the idea of pushing the boundaries and shifting paradigms.
> Bold plus, making PLs is a lifestyle, not a business.
Yeah, whenever I encounter a new language, to see how serious they are, I take a look at their github commit history. Usually they are all green every day, there's a sort of obsessive compulsion behind working on these projects.
It's pretty amazing how the boundary of what a PL actually is has expanded. It's really the story of "If you give a mouse a cookie"....
Used to be back in the day you didn't even have to implement the thing (ISWIM). But if you give the people a programming language they're going to expect a compiler to use it. Then devs started expecting a whole standard library sometime after the 70s. By the 80s and 90s IDEs were all the range -- you needed to provide at least syntax highlighting for sure. A breakpoint debugger was starting to become standard expectation.
In the 90s - 00s, open source rose to prominence and communities of open source developers works to create robust community-driven language ecosystems, which then became an expectation for new langs. Quite the paradox there -- how do you create a community around a new language if the new members expect a community??
But once you have a robust package ecosystem, devs start expecting ways to manage it. So now you not only need a package manager, but also a package repository and all the issues which come with that.
Now with all these packages you also need to provide a robust build system to download them all, build each one, link the binary, and it should be compatible with all major operating systems, all major architectures, and of course the web.
Today, LSPs were the most recent "must have", before "AI integration" took over and now you need to have AI assistants that know your language and all the libraries.
All that before you even start talking about the language specifics. To be popular, your language must a) be severely limited in its "weirdness budget" (the degree to which you break from tratitional languages must be a small delta or potential users complain) b) be imperative-first c) and most importantly, be open source and charge exactly $0 for all of this.
That's why the quickest way to build a new and different language is actually to create a cult around it. If you're gonna make any money at all, it'll be in selling plushies of your mascot. I wrote a whole novel about that route here a couple weeks ago. https://news.ycombinator.com/item?id=45806741