When You Get Rid of Warts Do You Always Have the Possibility Im Getting Them Again

I'll take the bait and provide evidence on why you should write a programming language.

First, it's technically very difficult, only you will gain deeper insight into the art of the craft. So, if you are a TC chaser or career minded person, so spending half a yr writing a linguistic communication volition help you lot principal the coding aspect of the game. I've started many languages since I started college, and each 1 was instructional. (I'm now twoscore and an early on retiree)

2d, it's fun.

Third, it may turn into something new. If some people don't write a new programming linguistic communication, and so we are stuck with what we take. This advice basically admits that the condition quo is good enough.

The authors saying that the language, as a project, is a lifetime date? Well, this reveals everything. I believe if y'all want to practise a programming language, and so you must be willing to invest at to the lowest degree a decade or ii.

So, hither, I am at forty preparing to launch a SaaS around a language that I designed ( http://www.adama-lang.org/ ). The kicker, I believe, is that a project like this requires wandering the desert lonely for quite a while.

I'm preparing to launch, and I just started to load test my shiny new production cluster. Depression and behold, it sucks. Fortunately, I have a tremendous number of dashboards and isolated it to how I'm interacting with RDS. I've got my work cut out for me which I'll write about.

Yet, I accept a potentially interesting business precisely because I evolved a language which solved a niche apply-case. The number of problems that I have had to solve upwards to this point is non for the faint of heart. Life and reality are harsh mistresses.

And then, maybe, yeah, you can save yourself some heartache by not writing a language. Perhaps, a amend way to think or stage this is "Writing a programming language is a solitary thing that volition most likely stop in tragedy after a long expiry march".

With respect to your first betoken, I'm reminded of Peter Alvaro's annotate "the only good reason to pattern a programming language is to shape your agreement of the problem". He points out that he was the only user of his starting time PL, simply he had no regrets of about that, considering it shaped all his later idea in his inquiry.

From http://lambda-the-ultimate.org/node/5569 - Three Things I Wish I Knew When I Started Designing Languages. Alvaro's talk led to an HN discussion at https://news.ycombinator.com/item?id=19428433

> Third, it may turn into something new. If some people don't write a new programming language, then nosotros are stuck with what we accept. This communication basically admits that the condition quo is good plenty... The authors saying that the language, as a project, is a lifetime appointment? Well, this reveals everything. I believe if you desire to practise a programming linguistic communication, then you must be willing to invest at least a decade or two.

Sounds like someone should persuade some big-proper noun academy to hand out honorary PhDs to people who build new languages that produce demonstrable value (even if the value is not business value).

Seems to be the criteria for a PhD, anyway.


To solve a problem virtually 23 years ago I wrote a programming language + interpreter. It was meant to be a uncomplicated language to write phone surveys in, so basically a kind of DSL for a unmarried purpose. The programmers who built the survey taking system that would use my linguistic communication discovered they could write much of it in the linguistic communication itself, which surprised me a lot. Was a actually fun project. No idea what happened to it.

The problem with writing a _general-purpose_ programming language (as a solo-programmer), is the fact that writing the language (i.due east defining the syntax+semantics, writing the parser/compiler) is but one-half the boxing - the rest of your time is spent on less technically interesting QoL features, similar an IDE, standard library, debugger, syntax highlighting etc. which are nevertheless vital for making the programming language actually usable. (I still remember writing your ain PL is a useful do just to encounter how the sausage is fabricated, but it should exist fabricated clear that there is a world of difference between a toy language and one that people would really want to use)

It's for this reason that nowadays I rarely write my ain "new" programming languages from scratch, but rather embed them as DSLs inside existing programming languages using macros. This way you get the full ecosystem of the host language for gratuitous, leaving you more fourth dimension to work on designing the language to suit your needs. If you combine macros with clever uses of GADTs y'all can even go the host language to "type-check" programs written in your DSL. OCaml and Lisp/Noise are my favourite host languages to utilize for this approach.


Concord with all of this. Don't do any yak-shaving you don't want to practice just for the fun of it; build your language and its tooling on existing systems and so you can spend your fourth dimension on what makes information technology special, instead of what doesn't.

> Information technology'southward for this reason that nowadays I rarely write my own "new" programming languages from scratch, but rather embed them as DSLs inside existing programming languages using macros. This way you get the full ecosystem of the host linguistic communication for gratuitous

I don't understand what you lot mean by this, then I'yard hoping yous tin can clarify. What's the advantage of doing this over the alternative way: writing a parser which would compile to code in the host linguistic communication, or some primitives that you've bundled in the host language that would represent the bytecode of your linguistic communication interpreter. From at that place you tin can leverage whatever in the host language you want, including its blazon system, packages, language semantics, FFI admission to other languages. Really whatever yous like.

What y'all're suggesting is leveraging a macro system to help you write what is essentially a parser/compiler, which is a skilful win. Only I don't see what that buys you past that bespeak. If I do things the other way, by writing a parser that consumes a *.my_lang file and compiles it to primitives or actual source code in the host language, I tin still leverage all the benefits of the host linguistic communication simply every bit you depict doing with a macro system. The advantage of doing things this fashion is y'all're non limited to languages with tolerable metaprogramming capabilities.


Ecosystem of packages and language interop (east.g. C bindings) are besides criminally underrated.

Exactly, the days that a plain syntax+semantics, with parser/compiler were enough to win the hearts of the market are long gone, decades ago.

It is still a fun exercise, though.

Yeah it's pretty bad these days. If yous tell someone yous are writing a PL, they expect:

- a complete parser/compiler and debugger toolchain

- a complete linguistic communication server implementation, and language modes for all popular IDEs including VSCode, VIM, Emacs, etc.

- a packet manager with a large, secure, and vibrant package ecosystem

- a community with alive chat back up and a potent Stack Overflow presence

- robust documentation with copious examples, tutorials, guides, and technical info. These days even a multi-hundred page volume with professional editing available for complimentary is expected.

- That you will be responsive to bugs, provide patches promptly, and review/merge community characteristic requests asap. They volition get very mad with y'all if you lot don't, and probable write a blog post about how much of a tyrant yous are over your project.

- your language is expected to have undergone a full independent security audit, and to exist up-to-date on the latest security problems. Information technology's expected to exist stable with complete backwards compatibility.

- you have to manage the community and deal with petty interpersonal conflicts or else word gets out that your language has a "toxic community"

- support for all major operating systems and hardware architectures including Mac, Windows, and all distributions of Linux, likewise as esoteric hardware.

- support for the web through wasm, so you need experts at that too equally x86 and ARM platforms now.

- And on top of all that, your project needs to be completely open source, with a free and open license that permits royalty free, patent free, commercial use. Oh, and your users both corporate and personal expect your work to be completely free every bit in beer. They won't pay anything for information technology. Non even a dollar. And if you enquire them to pay something they don't counterbalance the value of your product versus the contest, they cramp immediately and don't even consider it. It's been a non-starter to ask for money for a PL for decades.

It used to be the case that you could write down a spec on paper and call information technology a PL. Back in the 60s you could call that a "programming linguistic communication" without even writing an implementation of the parser. Today a programming language is a massive undertaking and the saddest office of information technology all is that it'south been commoditized. I've even seen a sentiment out in that location that programming languages are washed, that nosotros've invented all we demand to. All hereafter languages are unnecessary, and all current languages are largely the same. Could you imagine? And then as hard as programming languages are, DO write them. That'southward my bulletin. Just exercise so responsibly and with clear eyes and expectations.

At very to the lowest degree, considering the baton eventually needs to be passed on to younger generations.

Regarding language innovation, I will oversimplify and assert that due the resistance to modernization (for whatever reasons), we have spent the last decades making Algol 68, Lisp and ML highly-seasoned to mainstream, smuggling their capabilities into more adequate packaging.

This is so strangely sad. Go ahead and write a programming linguistic communication. Take a weird hobby y'all clank away on that might non run into the light of day. If you burn out on it, that'southward one thing and that'due south okay; you've exhausted the medium. Move on to something else you enjoy. Abound for the sake of growing.

Just considering something hasn't become large doesn't mean it'due south a failure. I've labored in dark early hours over paintings and music that will never see the low-cal of day, but it's a vital office of how I express and cultivate myself. My journal.

99% of art is unknown personal projects. Encompass yours. Why be bitter?


For me it'southward a question of what my goals are. If I have three equally fascinating projects I could spend my free fourth dimension on, which one advances me towards my goals.


Thanks then much for these words. I take „wasted" around 5 years designing my own and was recently bitter about that „wasted" time. Simply now I started shifting my perspective that this was a thrilling hobby that I really liked and information technology wasnt wasted at all. Your words were final nail in that coffin of bitterness. Thank you, kind internet stranger, you inverse my life for the better


Back in the 80'south when I started my career creating a PL was a correct of passage. You got bonus cred if it were compiled and not interpreted! About people weren't writing general-purpose languages and the languages were very domain-focused - only they were languages nonetheless. It'southward been kinda sad to see that die. So I hold with yous - go write that programming language if that floats your boat and just have fun doing it for the sake of doing it.

FWIW: Information technology didn't come up across as bitter to me. More like a full general warning from a hardened battle hero.

A alert that many naive young recruits ought to give credence to, earlier information technology'southward besides tardily (when the cost has been sunk, and you're knee deep in it).

For anyone who doesn't recognize the story by the description, click the link and read it now.

And then read the rest of the stories on the site.

They're all both extremely technically interesting and very skillful brusk fiction.

I have likewise been working on a programming language, merely longer than the author of this piece (since 2011), and the author is correct.

Designing a language consumes you; y'all never come across programming the aforementioned manner again. Whenever I write C (I'chiliad implementing the interpreter in C), I get annoyed because I have to work effectually C's warts to practice what I want, and that is simply happening because I think in my language.

And the design never stops. Equally mentioned, I've been designing mine since 2011, and I'm only at present writing an interpreter later on ii failed attempts to bootstrap a compiler.

And so the author is correct: don't write a programming linguistic communication unless you lot are prepared to be marked and scarred for life.

> I get bellyaching because I have to piece of work around C's warts to do what I desire, and that is only happening because I think in my language

That is exactly what motivated me to start thinking about my own linguistic communication and what made me want to continue working on information technology in the early to mid 1990s. Luckily, I started learning several languages so that I'd have a meliorate idea of the design space. Someone suggested I take a look at a relatively unknown language chosen Python because it fit how I was thinking about things. He was right and that was the chestnut for me - finding a language that fit how I thought about programming well enough to eliminate enough of the annoyances that were my motivation.

The lesson... If you're thinking about designing a language, study as many other languages as y'all can so that you become a amend sense for the design choices involved and how various concepts fit together. Inquire people experienced with those languages what they similar / dislike nigh them. Write something challenging enough to get a outset mitt understanding of some of those pros and cons. If you push on with your own language, this will help your efforts significantly. If y'all get lucky, you lot might find a language that stops your descent into the rabbit hole.

The to a higher place might only work if you can accept that languages are sufficiently complex that they all have real issues, even yours when information technology's "done".

> If you lot're thinking most designing a language, study as many other languages as you can and then that you get a better sense for the design choices involved and how diverse concepts fit together.

I've written C, C++, Python, Cerise, Lua, Bash, POSIX sh, C#, Coffee, JavaScript, Common Lisp, Racket, Haskell, bc, dc, Zig, BASIC, Tcl, and some others I'm probably forgetting, and I've studied Rust, D, Ada, Idris, Coq, Isabelle/HOL, HAL/S, OpenGL shaders, Cilk, Cyclone, Ceylon, Scala, Clojure, Kotlin, F#, Scheme Lisp, Jai, Julia, Perl, Nim, and probably even more that I am forgetting.

Does all of that count? :)

> Ask people experienced with those languages what they similar / dislike about them. Write something challenging enough to go a first hand agreement of some of those pros and cons. If you push button on with your own linguistic communication, this volition assist your efforts significantly.

Aye, I agree. And I have washed all of that.

> If you go lucky, y'all might find a language that stops your descent into the rabbit hole.

"Lucky" is the operative word. Unfortunately, I'grand picky and oasis't been that lucky.


It is interesting to see such an extensive list that doesn't include Smalltalk or Along. The lack of Pascal/Modula-two/Oberon is not a problem given Ada. Not having APL (or J or K) might not hurt if you lot get the needed ideas from Julia. Other languages such as Cobol (or the microcomputer equivalent such as dBase) most people can probably alive without.

Ah, whoops. Smalltalk and Forth are two languages that I have written a scrap of lawmaking in and studied extensively. I did say that I was probably missing some.

Oh, and Go. I've written some Go.

> don't write a programming language unless you lot are prepared to be marked and scarred for life

I can vouch for that! Fortunately, I have a not bad squad to interact with.

I was looking for your comment in this thread and I'g not disappointed.

It'south fortunate you went ahead despite every thing telling y'all to do otherwise. And then tricked other people into joining you. A bit evil probably merely they consented, in the stop. You are probably only partly responsible.


D doesn't need a Reality Baloney Field. People that take the time to larn it find it very pleasant and productive.

Article author here. The ii years mentioned in the post is the time spent actually implementing it. I spent a few more years thinking about information technology prior, and I idea that implementing the basic ideas would bear witness, our not, whether it worked, and then I'd be washed.

Well, guess what, it didn't really plough out that way. At least I'm more agreement of people who annoyingly promote their own languages all the time.

> So the author is correct: don't write a programming language unless you lot are prepared to be marked and scarred for life.

I write and wrote internal languages by and large; a bunch of them made it to production inside larger (for my country) companies for years and even a decade. The scarring part is that I always add the features I want and when I become to a mainstream language, I always miss those features. And then since 2018 we have been doing a new language and one of them will be publicly launched this or next year so I tin can at to the lowest degree use that for day to day programming without being bellyaching by missing features. Note that I already accept that using Racket with a bunch of macros but in my business information technology is easier to introduce your ain language than use Racket...

> Annotation that I already have that using Dissonance with a agglomeration of macros but in my business it is easier to introduce your own language than use Noise...

Why is it easier?

Most people are allergic for lisp likes. Non certain why but it has since always been blocked. I fifty-fifty did a lispy but with <> instead 20 years ago and that was OK (it was the xml for everything hype) while with () it was rejected. I had a talk with the cto of one of our bigger infra construction partners and he had exactly the aforementioned issue, so he replaced the () with [] and suddenly it was fine. So he has had scheme in their products for over 10 years but with [] considering people are allergic to ().

I tin can apparently do the aforementioned with racket just if no () then I rather have another syntax all together.

Ah, it'due south pitiful to hear that. People tin can exist so emotional, just because of a bit of syntax.

But since you have full control, you could introduce some extra syntactic sugar also and desugar it into regular lisp/racket syntax before parsing, no?

As an alternative with a completely different syntax, I plant Scala to be extremely squeamish for building DSLs. Probably the best typesafe language for DSLs out there. It'south only really expert on the JVM though.

> I go annoyed because I accept to work effectually C'southward warts to do what I want, and that is only happening because I think in my linguistic communication.

What'due south worse is that PL authors are usually students of PL history, and the history of PLs is littered with "We did things this manner out of necessity. We wouldn't have done this if we had more than time/resources." Which would be fine but then we are all stuck using those tools with all their arbitrary limitations and quirks for 50 years. If you lot always thought "I could write something to brand this and so much easier", the impulse is 100x worse every bit a PL designer, because y'all realize how many things nosotros practice are done for no reason at all beyond history and happenstance.


On the bright side, information technology probably better equips you to actually argue about where C (or any language) has faults from a language design perspective, which is a relatively rare bespeak of view.

> I've been designing mine since 2011, and I'k just at present writing an interpreter afterwards ii failed attempts to bootstrap a compiler.

You are lucky (or unlucky) that you accept reached that phase. I'thousand trying since 2004 and had at least 6 failed attempts on blueprint and 3 different implementations that never finished. Fortunately for me, since I had a lot of failed designs (as opposed to implementations) I ameliorate capeesh existing designs fifty-fifty with their warts.

> I get annoyed because I have to work around C'south warts to practise what I desire, and that is only happening considering I think in my language

You lot "just" have to get to the indicate where your compiler is written in your own language. This may have a while. Become got there in V1.5:

https://go.dev/physician/go1.v


Information technology's funny/interesting that an 1kloc implementation of minimal cocky hosting Go exist, or C/pascal/oberon compilers ; perfect hindsight view etc. Y'all theoretically could (well if nobody does, no you can't) create a squeamish language and its implementation quickly.

Wirth was even more drastic in what concerns writing bootstraped compilers.

I don't recall in what paper from him I have read this, so accept the story with a grain of common salt, also open up to corrections.

He actually wrote the initial version of the compiler directly in Pascal.

How did he perform such matter, one would ask.

By writing it on paper using a Pascal subset good enough as stage 0, and so manually compiling the source code into corresponding Assembly instructions that he would then actually type into the cards.

So when he finally got the compiler washed, it was already bootstrapped from the become get.

Additionally, P-Code originally wasn't designed to be an interpreter, rather to repeat the above procedure in an easier style across calculator systems.

He was initially surprised that others took information technology to write Pascal interpreters instead of a bootstrapping tool.

I've never been megalomaniac enough to think I could design a new linguistic communication. Just I did once write a Pascal source-level debugger; I think the compiler was Intel Pascal (long fourth dimension ago). It taught me a lot about how the compiler worked, and how the language worked.

I've used to suffer quite badly from Impostor Syndrome, and that project did a lot to alleviate my symptoms.

I never shared the project with anyone else; it was never completely finished.

Nice story, thanks for sharing.

My hard drive is full of unfinished projects, started to larn virtually programming language, or try out new design approaches, quickly abandoned after the initial goal was accomplished.

Regarding imposter syndrome, ii guidelines that take helped me in such situations, are "only repent for paths not taken", "failure is improve that not knowing at all".

Obviously those quotes aren't from me.

> It's funny/interesting that an 1kloc implementation of minimal self hosting Go exist

Does information technology? That's not the technique Get introduced, they started by rebuilding Go from before versions written in C - but in fact the bootstrapping process may alter soon, see https://github.com/golang/go/problems/44505

A programming language is a tool. And similar all tools, the situation is very different depending on if you are writing a personal tool that solves your bug or if you are trying to solve other's problems.

I used to lurk in a programming language design grouping. I joined it considering I wanted to "solve everyone'southward problem" with a new language because I had some success with solving my ain issues with a previous language (which is not for everyone; information technology's a Along dialect).

For few year I saw some people theorizing and analyzing with petty practical results. It's fascinating how people tin know about "assay paralysis" and still fall for it. Meanwhile, I lost interest in my own attempt and returned to my Along dialect.

Today it powers a few programs that run 24/7. And information technology is likewise my goto scripting language. It's not available on Github/Gitlab/whateve because I'm likewise lazy to do something that will certainly have zero benefits for me ( however curiously, it is half-documented because writing docs helps with spotting giddy decisions sometimes).

It is truthful that you are never done with that sort of plan, at that place'southward e'er something to ameliorate or fine tune. Too, since you are the sole user you cannot rely on a ecosystem and just "import their.stuff".

But I think the corking fault is actually to start making a tool, a programming language, with no plans on what to use information technology for; or worse, expect others to use it. The Internet is indeed littered with born-dead or curt-lived languages. They are solutions without a problem to solve.

Information technology is truthful: it's a deep pit you'll enter. But the decision is incorrect. If you feel it's fun -- then practice write your own programming linguistic communication. Even if you won't terminate (which is probable). Only you'll think about things that are a lot of fun, and you will have more clarity most what y'all do non similar nigh existing languages, and why. And you'll learn that there are things y'all need to solve that you did not recall about before. That some things cannot exist combined, and that you will have to choose.

Information technology is a very skillful feel, at that place is a lot to larn. As long as your goal is not to get it washed chop-chop...

The central to writing a PL and surviving is to have an go out strategy. Effigy out alee of time how long yous volition spend on this projection, otherwise information technology's liable to final half a decade or more than before your interest wanes.

PL blueprint is like crack for programmers. It is a lot of fun, which is why you see hundreds of trivial languages posted hither every month.

The danger is that some people get don't accept a articulate thought. About what information technology takes to write a pl. They can get quick wins with a parser generator and maybe some easy semantics, which give a expert taste of how fun PLs are but also belie the fact that the hardest parts are exponentially harder than that.

Anyone embarking on a PL needs to be clear eyed about a few things.

ane. You'll never make money off of information technology. No ane sells compilers anymore, and there are like 2 big for-profit languages out in that location out of thousands. If y'all do make money, let us all know how.

2. The odds are your language volition have exactly 1 user, yourself. Get comfy with the possibility you will spend years on something and no one will really appreciate it.

iii. The real work in creating a language is non technical but customs edifice. Languages demand people who speak/write it to thrive, so as much or more work needs to exist put into the community effort for the language to succeed. If all you want to practice is work on technical problems that's fine, but technical prowess doesn't make a language pop.

4. Get set up for criticism. Every developer has their opinions about languages and they volition be sure to tell y'all their opinion of your language. It will non be skillful. The only people who volition capeesh your language are other linguistic communication designers. Most everyone else will kickoff past telling y'all how you're doing things the incorrect way, and they'll terminate by asking why you're eating your time with all this anyway. Go ready for that and steel yourself against it.


Matlab and Mathematica. In that location are probably more, and Microsoft makes a ton of coin with .Net of form, only I'm thinking more than forth the lines of pure PL products and not something in a vast enterprise software ecosystem like Microsoft offers.


Who cares? I'm not writing my programming language for you: I'1000 writing it for myself. It's about the journeying, not virtually the destination. (Btw, the author is correct)

I started creating a language nearly xv years agone.

It started as a project to acquire C: implement an interpreter in C that lets you interactively call C library functions and organization calls.

Simply, little past niggling it become my own implementation of my ain dialect of lisp and the language I use for virtually everything.

My only merits for the language is that I like information technology, I similar it a lot.

I guess I will release it at some point, to the indifference, no doubt, of the world, but that's non the bespeak. If you design and build your platonic house, it doesn't matter if no i else builds the same design, or fifty-fifty appreciates it, as long equally you love living there.


Eventually … all the same demand to practice the actually difficult things like decide on a proper name and license, and write some documentation …


I disagree with the author's view that any project that isn't used by other people is a waste material of fourth dimension. Does that mean that all homework projects in college are a waste of time? Or that beginner programmers should skip writing elementary programs and spring straight into writing a sellable product? Of course non. The signal of those projects is to acquire, not to brand anything that will change the globe. If a project is enjoyable to y'all and you learn something useful from it, then it is not a waste of time.


I approximate it depends on what your goal is. If it is simply your own personal learning, and then no, information technology cannot mayhap be a waste of time. Simply if not…


The author mentions that writing a programming language entails writing your own GUI (which linguistic communication doesn't need an IDE). Surely writing a plugin to an existing IDE is what most people would exercise in that situation, and I can't see many arguments to the opposite. This alone fabricated me question the writer'southward advice somewhat. If they are such a perfectionist every bit to care to have a custom IDE for their linguistic communication maybe a more reasonable person wouldn't get and then deep downwardly the rabbit hole

As someone whose spent the last 9 years writing a programming language, I would say this author is correct. Not necessarily well-nigh the GUI in particular, but about the larger point that there are any number of aspects in PL design which will swallow an infinite amount of time. For them in was a gui, for others information technology'due south a type organization, compiler, bundle director, linguistic communication server, memory direction, parallelism, or whatever number of other infinitely complex subtopics in the field.

I made a comment yesterday to this effect yesterday, so I'll just leave that here: https://news.ycombinator.com/detail?id=30484632

I did blueprint a linguistic communication and information technology is still beingness used. I did it as role of my job at that fourth dimension. It started as a simple query language inside the application nosotros were developing. One by one features were added. Some colleague likewise decided to used it program certain functionality of the application, which caused more and more people to use it.

I implemented it with a parser that I developed myself. And so, actually, I vicious in the trap of developing a language myself, not a programming language, but a developing my own language developing tools. And I have doing it for more than twenty years now, on and off. I do recognize the self promoting bit. (I am kind of doing it right now.)


I call back that a big tenant of whatsoever modern language should be interoperability, such that you can easily import/export code from some other pop language. That not only clears up the issue around libraries, but also makes it a safer bet for usage by people who otherwise wouldn't exist able to use a niche language


These all sound like pros... A projection that makes you intimately familiar with a huge latitude of deep, foundational domains and that forces you lot to make opinions about esoteric concepts, all while pushing yous to go deeper.

I'g really confused by it. It's almost like some strange species of humblebrag. "Look at my _____, isn't it horrible?"

I tin't understand why the writer seems so bitter about spending and so much time on something they clearly beloved... I mean, what else is there to do? Lots of boring obligatory stuff!

I totally get where the author is coming from and it'southward definitely not a humblebrag. The best way I can describe it is that the author feels like the character Cypher from the Matrix, who regrets taking the red pill and waking up to reality, and wished he was warned ahead of fourth dimension non to exercise it. That's the spirit in which the author writes this.

The graphic symbol gained something, which is knowledge, only lost something, which is the ability to be satisfied ever again.

Perhaps another adept analogy is vampirism. Aye you proceeds amazing powers like the ability to live forever, shapeshifting, and super force/healing, who could mutter most that? Just at what cost? You can't even go outside in the dominicus anymore or eat garlic knots, so possibly it'southward not that great.

> some other good analogy is vampirism

No, that'southward a dandy analogy. I tin neither condone nor dispute it on rhetorical grounds, just aesthetically it is rad.

> You can't even go outside in the dominicus anymore

Perfectly describes the hero programmer stuck in the rabbit hole.


Haha it does, only I think the illustration falls apart at the garlic knots. Aint going to stop a developer from eating those.


I felt the same. I was waiting for the punchline, the twist, or at least an "All that said it's totally worth it" at the end.

I observe writing a library is commonly enough for the types of problems I encounter. You tin even design it to be linguistic communication-similar using fluent interfaces; take FluentAssertions for instance: `bodily.Should().StartWith(expected);`.

Beyond that, I tend to accomplish for:

- A config file. Can the problem be solved declaratively through a config file that a program reads and bases its behavior on?

- Templates, generators, and macros. Along the lines of syntax, would templates or generators solve problems with an existing GPPL?

- A domain-specific linguistic communication. Does the problem lend itself to composable patterns or statements? Could a DSL help organize and simplify them?

- A transpiler. Is the syntax of an existing GPPL the problem? Would syntactic sugar be plenty?

Of grade, there are plenty of other reasons to write a new GPPL, like for your own learning or merely as a hobby. Just know what you're getting yourself into.

Configuration files are such a useful thing to showtime with - I call up one of my near productive changes was to hack on a local copy of mutt:

* If the configuration file had mode 0755 then execute it, and parse the output.

* Otherwise read as-is.

That was my solution to writing a complex configuration file, which behaved differently upon different hosts - write the thing in perl, and have it "impress" blocks and configuration values appropriately.


Ok but why not merely accept dissever, simpler configuration files for each host?

Finally a bit of sanity!

The same goes for an Os or a game engine or whatever other large scope (Or collection of pocket-size scope) tool.

The other people who kinda care are those similarly engrossed in their own project, pregnant... they do non actually accept fourth dimension to intendance.

My first priority with computing is to become rid of all the custom stuff. I won't even think about refactoring or any other improvement till I've weeded out all the handwritten reimplementations of library functions, made certain that there's no advertizing hoc string.divide() based data formats that should be JSON, or UDP packets that should exist MQTT.

Honestly, I don't even like that macros exist. I understand that in depression level languages sometimes ane needs metaprogramming, only it's more of an unfortunate reality than a cool feature.

What does "sanity" mean? Without the curiosity to drive united states, we wouldn't have moved out of chilly caves.

Aye, like most initiatives, you are set for failure, if you define success by how popular a cosmos of yours becomes. You can still acquire a lot.

And still, considering "success" is such a rare breed, we really need more people to practice challenging stuff, then we'd get more than success in absolute numbers.

The OP actually lacks sanity in recognizing that their project did non take off, and they don't have a articulate idea of why they are doing their programming language project.

Basically, they are realising information technology's non a success, and they don't necessarily care about learning much out of information technology, and even so are notwithstanding non letting go. If anything, that'due south a definition of insanity :)

It'due south more than similar addiction than insanity. They aren't doing the same thing and expecting unlike results exactly... They're doing the aforementioned thing just... because it's part of their identity now, even though they aren't all that happy.

Real insanity would be notwithstanding thinking information technology was gonna be the next big striking.

I remember we'd get more than successes if people didn't didn't do this stuff and instead joined existing projects, or started with the business stuff first and tried to offset their ain foundations and such.

In that location are large wins, but they're incredibly rare and seem very random. And many of them are almost guaranteed to fail.

Y'all'll learn a lot, but what can you actually utilize that knowledge for? Niche DIY stuff doesn't teach yous much about mainstream methods.

The result is 1000 garage tinkerers for every Guido Van Rossum, and sometimes it'southward even actively detrimental to a projection to endeavour to cater to the tinkerers.

The issue I have with your approach is twofold: the 1000 garage tinkerers are harmless, and your approach forgoes the Guido Van Rossums, Rich Hickeys, Chris Lattners and so on.

I've met a agglomeration of people who practice things like write their own typed concatenative language. And then I can tell y'all, commencement of all, that they tend to spend the week merrily contributing to, say, orchestrating Kube clusters, and second, the time they spend bit banging their pet programming linguistic communication wasn't going to become towards more than orchestrating Kube clusters. Or any it is you think is actually important.

That'southward fine, but it seems like the target audition of the article is the people who hope to get the adjacent Van Rossum.

It might even exist aimed at people deciding whether their team at work should pursue a new language for some specific task.

Maybe this could be solved with a special badge that tells people which of the Iii Tribes of Programmers you're writing for...

For purely toy projects, I'm not sure if whatever code web log communication at all is that helpful, except possibly "Make stuff really minor if you want to print other programmers".

Best Practices don't apply the same way to this kind of thing, since in a real manufacture project the best do would probably exist "Just don't".

> I call up we'd get more than successes if people didn't didn't do this stuff and instead joined existing projects, or started with the business stuff start and tried to start their ain foundations and such.

I retrieve that you're working from a very different definition of "success" than your parent annotate. "Success" doesn't have to hateful "contributed to Gross domestic product". For some people "success" means "I had fun, learned stuff, and expanded myself as a person".

I'm using the definition the original commodity seems to imply.

Not so much contributed to the Gross domestic product, but "Avant-garde the state of the art in some way" or "Solved a trouble of interest outside the programming community".

I would imagine only the very most dedicated would actually enjoy doing a new language, maybe a third of programmers, and probably only those who fully accepted their thing was probably not going to be an enterprise form solution.


I've been spending a lot of time myself designing and prototyping my "ideal" language (mainly to accost gripes with other languages) and I totally agree with the OP nigh information technology beingness a near total waste matter of time. Only at the same time, albeit being a gargantuan corporeality of piece of work it helps yous learn alot about programming up and down the stack. Skilful language design requires lots of thought, devotion, trial and mistake and self moderation to come downwards to something consistent and coherent that's not a mess of all the absurd little features you thought information technology would be a good idea to put in.

> Programming linguistic communication design is at the same time the most interesting technical challenge you lot can take on, while at the same time being for the most part an utter waste material of fourth dimension.

Yeah that'southward a difficult disagree for me dawg.

But when you lot write a programming language understand that yous're writing it for yourself, so that you lot tin can look at other programming languages and sympathise the tradeoffs.

Just the process of going through "holy shit, this matter I'd like to build is going to exist then much harder than I thought" is useful. Particularly if you come to empathise that some things y'all want are at odds with each other and you can't build it the way you thought you could. Then you can look at other languages and understand that to have characteristic A they had to give upward feature B.

Give up pretty speedily on things once you start to go the experience that they're pretty intractable and you kickoff to hate thinking about them. If you enjoy something in particular then jump down the rabbit hole. Understand that you're going to air current upwardly with something simply 10% done that nobody will use.

Then maybe when yous larn a new programming linguistic communication go write your language in the new language to acquire it. Wash, rinse, repeat to learn new languages. Get good at rewriting your toy language.

Writing a programming linguistic communication is easy, when compared to making an actually useful programming language, which once again is easy, when compared to actually maintaining and developing a programming language.

My heuristic is that the departure in piece of work required is effectually three orders of magnitude between cosmos, usefulness and maintenance.

That being said, I recall every programmer would benefit greatly, simply by attempting to write a language.

> Don't Write a Programming Language

Is why we've arrived at using JSON for declarations instead of a nice domain-specific language. So while I would agree that you well-nigh certainly don't need a "programming linguistic communication", you should definitely consider a DSL over just using JSON.

JSON config formats are DSLs—they're embedded in JSON for syntax, but the semantics have to be divers separately.

Yes, for some applications a JSON DSL is inappropriate, and lots of people dislike the syntax. But it'south not a option between "JSON" and "DSL", it's a choice between using an established syntax or defining your own.


Okay. I probably should take said "Domain Specific Syntax". But DSL is the standard term.


I created a language without lots of trouble. The pull a fast one on was low expectations. I named it "lila" (limited language), and then they were right in that location in the proper name. It did very piddling, it had no compilation phase, but served its didactic purpose. It showed how to build a linguistic communication using ANTLR.

Started noodling with ANTLR 2.x. Still consider myself a noob.

FWIW, IMHO, ii aspects of ANTLR 4.0 dramatically lowered the implementation barriers. Practical stuff that doesn't get much attention.

With Fifty(*) grammars (inspired by packrat, IIRC), parse trees and ASTs can be merged into one. Makes post-processing and so much easier.

API now supports interpreting, vs iterating, over the parse tree. Retrieve XML-SAX vs a Visitor. And then you craft your Interpreter to drive a Builder. This simple conceptual change profoundly simplifies everything.

I would rephrase this. First do you desire to blueprint a language or implement one? Unremarkably y'all will want to do both, but where are your motivations and interests? The post starts with a desire to design one simply then seems to have spent the most time on implementing it rather than iterating its pattern. Perhaps information technology became a sort of vanity project, idk.

Secondly, don't write more than you lot need to. Look for existing 'narrow waists' that tin can save having to build much of it. E.g. target a VM ecosystem, utilize language server tools for editor integration, etc.

Information technology'southward expert to have an idea what you lot want to do and why, but in a higher place all every bit others say do what yous savour and acquire forth the way.


The same arguments could be applied to almost any field of research. If you become to spend your time doing something that gives yous pleasure and challenges you, then information technology's worth that fourth dimension. If information technology results in something that is also of use to others, all the ameliorate. There are countless examples in history of how people take worked on something, often despite lack of understanding or even rejection by others, and that very work later on became very relevant, oft many decades afterwards. You lot could have spent the same amount of time watching TV instead of writing a programming language. Wouldn't you accept institute that an "utter waste product of time" too?


I never really got into it that deep: I thought i should relish information technology, but afterwards writing a small toy language I realised I don't. What I accept realised is I get much more joy from building things than building the tools but that is only me. Im having much more fun knocking up stuff in nextjs! I am glad there are people who love edifice the tools and frameworks though such that I am spoilt for choice.

Almost people volition not need or desire to pattern or implement their ain language.

However, information technology is not every bit hard as the author suggests. First, at that place are first-class tutorials, textbooks (Wirth, Dragon book) and tools available (lex, yacc, LLVM, Loving cup, Jflex, Lemon, ...).

You should give it a attempt just for the fun of learning.

You will not often _need_ to do information technology, as well-nigh capabilities can maybe be realized equally libraries (including network and mobile functionality mentioned by the author).

Once you lot pattern something useful, other people will probable chime in and annunciate for your, write documentation etc.

Most complex software system incorporate compiler techniques or Domain Specific Languages (DSLs), for parsing configuration files or as a basis for edifice higher-level functionality (AutoLISP -> AutoCAD, ELISP -> Emacs).

Graydon Hoare wrote a really nice intro to the state of compiler engineering in 2019: http://venge.cyberspace/graydon/talks/CompilerTalk-2019.pdf

He shouts out to Nanopass, a way of writing highly compositional compilers adult in the Scheme world and much ported elsewhere. This kind of approach much reduces the pain of designing and maintaining compilers and can lead to very efficient compilers: it is the technology used in Chez Scheme. It'southward not got much accept-up outside of the Scheme-enlightened world, despite the beingness of many ports of the essential thought to other languages; I notation that interesting Nanopass links keep getting submitted to HN without getting commented on: https://hn.algolia.com/?q=nanopass

I tin can experience the author pain, even though I didn't invent a programming language, I just wrote the interpreter for ane (specifically a Lua interpreter written in C# - moonsharp).

Why I did it: in 2013-2014 I was SUPER bored and burned-out, I needed a challenge and I picked that one. Oh, I was wrong.

The GOOD: the challenge has been fun, I learned A LOT. I learned how to use ANTLR, and so I learned that ANTLR was getting in the fashion and at present I'm wary of ever using a parser generator at all, for sure not that i. I learned how to write a recursive descent parser, even if I did it by reversing engineering (i.e. mostly copying) the original rd-parser of puc Lua. And I learned that no matter what I practise, what I discover the hardest is respecting the correct operator priority in math expressions. I know that shouldn't be the hardest thing, but brains are fun. It also ended up getting used. It was used in the OnePassword client for windows, and it's for sure used in the Shenzen IO and TIS-100 videogames. I'm sure there are many more users using that. Information technology's stuck somewhat in between of "nobody uses it" and "information technology has plenty traction that the community will take information technology forrard and you can forget information technology even existed", and that, turns out, is non a nifty identify to be.

The BAD: I picked C#, equally that'south the language I was using at the time and I had an involvement in seeing it used in Unity. Big mistake. Don't get me wrong: C# is a great language and if you're planning to base of operations your visitor on it, I don't see large reasons not to (I wouldn't, probably, but every linguistic communication has its pros and cons). Just C#, and in 2014 to boot, was a mistake for such a project. First, however multiplatform C# became, a lot of development is still Windows only (at to the lowest degree, if you want to target the primary frameworks). And 2nd, 2014 is precisely the year when C# started changing radically with the core / standard frameworks. The state of affairs now is probably more stable, but in 2014/2015 it was a mess, and half of the reflection frameworks were broken to say the to the lowest degree.

The UGLY: I merely didn't consider how much punches life tin can hitting your face with. I changed task, twice. Changed platform from Windows to MacOS, to Linux, to MacOS over again, now I program for multiple platforms in Rust most of the fourth dimension, and my interest in C# is close to not-real. Family members passed away, new kids were born, situations changed, and life hit me hard enough. Energy got focused on daily jobs, or on other side projects. Every other side project, by the style, has been met with humongous amounts of guilt, because I'm/was leaving moonsharp users (withal few they might exist) behind.

So where I'k now? I tried to delegate the project to other people, but I'm non effective at information technology (maybe they are, simply in reality, I'm but absent-minded). I tried to get back active into the project but failed a couple of times and now I fear doing it once again and creating expectations. Sometimes I feel similar contributing something, but I can't even get a proper dev setup running. I don't recall details well enough to not interruption something when fixing major bugs, nothing major just usually information technology goes over the amount of free energy that I would like to spend. Sometimes I read some question on MoonSharp, and I try to answer, but more ofttimes I read a question and before answering I have a guilt trip considering I'1000 answering to this question and left alone all the others and then I simply avoid this one too.

Near of all, the project is not aligned anymore to my interests, so it feels like a chore.

So, if you are reading this: think twice earlier making the same mistake. If you want a side projection, pick one that is either modest, or has a clear end to information technology.

I've never written a programming language. I have built a number of synthetic languages[1] over the by few decades, which is an equally selfish (and thankless) task.

Less tangentially, I've worked for the by 8 years on edifice a HTML5 canvas library in Javascript[2]. I don't ever see people talking near JS libraries in terms of computer language design simply I think, in a mode, that is finer what a (skillful) library is doing: building new, sometimes more programmer-friendly, ways of conceptualising and creating programs that practice stuff using novel APIs, syntax, state, etc.

There's a lot in the OP that resonates with my experience:

- "once you design a programming language you fall down a rabbit hole" - I've lost eight years of my life to my projection; but I've besides gained 8 years of learning skills and insights that exercise translate to my everyday work equally a frontend developer. For instance, almost all of my knowledge about accessibility comes from trying out many (many) dissimilar approaches to making the canvas element more than attainable.

- "Yous keep adding new features that are really absurd" - Guilty! My library doesn't need an integrated reaction-improvidence engine, but somehow information technology's acquired ane along the way. Similar story with the reduced palette filter which, while a lot of fun to build and play with, remains too tedious for utilise in production eg dithering live-stream video.

- "It likewise affects your advice with the rest of the programming community" - Because of the need for speedy calculations, I've developed an arroyo to programming Javascript which tends to avert slower functionality. This sometimes leads to me writing code that could/should be written in a clearer, more concise and understandable fashion: 99% of JS code doesn't demand to exist super-fast, just fast enough!

[1] - for case, this one: https://gevey.rikweb.org.united kingdom of great britain and northern ireland/

[2] - Scrawl-canvas - https://github.com/KaliedaRik/Scrawl-canvas

> your language needs an IDE, right?

If it does, it's a bad language.

(IDEs can be beneficial for many languages. When those benefits become "needs", that'due south a sign that language is pushing complexity onto the editing tools, which has many bad consequences)

You haven't been bitten hard enough by the PL bug to know what the author is referencing here. The "need" used here is meant to mean desire, not necessity.

Once you kickoff adding all the crazy features to your programming linguistic communication, the adjacent obvious step is to add IDE support for those features. It's part and parcel of the PL bug; it never stops at the language proper. The feature creep is so overwhelming, and that's what acquired the author to write this post.

If anyone is wondering how bad it gets, afterwards the IDE stage of the PL bug, the next stage is to run your language on bare metal, and then that opens the whole OS door, as if in that location weren't enough massive planet sized doors of complexity already open before that. The terminal stage is when you decide to run your PL on custom designed hardware. Afterward that... legend has it you turn into a fauna resembling Gollum, and you are driven to live deep with the bowels of the Earth, never to be seen once more.


clojure has pretty good infrastructure for hosting new programming languages that can do good from standard syntax, data structures and data model (immutability / abstract map reduce), foreign phone call conventions, macros, js/jvm targets. at hyperfiddle we are developing a multi-tier programming language specialized for server streamed user interfaces and hosting it with clojure lets us inherit a ton of complimentary infrastructure, ecosystem, community and immediate commercial utility (which gets you lot serious use cases quickly - so of import)

> I'm sure yous've all seen the person, that guy who tin can't aid himself from answering programming questions with an caption how it's done in their ain linguistic communication.

Agree, this tin can be quite annoying, particularly if you're looking for a practical solution to something.

> The person that discusses software optimisation techniques with regards how they implemented it in their compiler.

This on the other manus is often gilt. I'd encourage the author and anyone else to share this noesis whenever they feel the urge!

> The answer to the Infamous Question is always the aforementioned, and if the weasels ever inquire information technology of you, snap dorsum as quickly every bit possible, "Because I want to know how it works."

Jeff Duntemann

Literally why I took my first CS course. I just had to know how computers worked. Pure curiosity drove me.

Loved Jeff'southward book on x86 assembly dorsum in the twenty-four hour period. I even so recall him (in the volume) introducing a DOS interrupt that I could invoke I recollect through DEBUG that rebooted the computer. And in the text he says something like that: that's the feeling of power. And he was right, that was exactly how I felt.

Of grade, you can salvage yourself a ton of trouble by implementing your language on top of the GCC toolchain — the purpose for which it was invented.

Or yous can write a translator which converts yourLang into existinglang, and then interpret/compile the latter.

Or you can write an interpreter, which is more often than not less endeavour than a compiler.

All these are less aggressive undertakings than the full set of subtasks you enumerate.


Out of interest, does anyone have any book/article/resource recommendations for writing a programming linguistic communication? This is something I would similar to revisit, not to write a 'good' language, but to revisit all the concepts I was introduced to in college in practice rather than in theory.


No, write whatever the hell y'all feel similar writing. Write any scratches your itch. End of conversation.

don't write a programming linguistic communication because i couldn't do information technology. also, don't host your ain mail server, considering i couldn't practise that either. /s

don't listen to these naysayers, practise it and larn. "Succeed" or "fail"; yet y'all define these, there is dandy benefit to be gained.

beingness able to write a compiler, at whatever level of complexity, is immensely powerful and helpful. don't listen to the naysayers that the compilers grade is "difficult" -- no matter how far you lot get, it'll will pay dividends and help you solve more difficult problems more efficiently.


I recall folks are misunderstanding the slight sarcasm in this article. The way writing a language volition alter your brain is a good thing.


Only wanted to say I've been working on mine for a yr or so at present, and well-nigh of this doesn't line up with my experience


Creating a programming linguistic communication must be both 1 of the hardest and about unthankful jobs in the globe.


Y'all tin can probably suit an existing small language to your needs if those are custom needs.


If y'all hateful a Domain Specific Language, i think that's precisely what the author is advocating for. If you can brand a expert library or DSL, at that place is no reason to invent an entirely-new programming language: you'll spend less time reinventing the bicycle and more time delivering on loftier-level features.

This is a really really half-backed commodity or half-a__ed experience.. Sorry it's getting on my nerves.

Please, do not ever preach someone that if you cannot do something.


This argument makes no sense. Just because I tin't implement new plumbing in my house myself doesn't mean I tin can't complain nearly my neighbour doing a shit job with his. This board is a Belfry of Babel with lots of pointless languages - just because y'all can doesn't hateful y'all should.

hineliventintles.blogspot.com

Source: https://news.ycombinator.com/item?id=30485604

0 Response to "When You Get Rid of Warts Do You Always Have the Possibility Im Getting Them Again"

Postar um comentário

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel