
Sadly, I must say goodbye to Leaf, my programming language - ingve
https://mortoray.com/2018/08/07/sadly-i-must-say-goodbye-to-leaf-my-programming-language/
======
mikekchar
I had a similar thought process (but luckily without spending time
implementing something). I want to write a game. I thought, "None of the
current languages works quite the way I want. I know! I'll write a language
specifically for my game and just keep implementing the bits I need".

Then I thought, "Wait. If I do that, I'll spend 90% of my time writing a
language and 10% of my time writing a game".

So I was saved. Except I still haven't even started writing the game, so I
suppose it's completely moot :-D

~~~
Bekwnn
Games are still in need of a better language. I have some skepticism and hope
for Jai. I really wish D as better C worked better in that realm, but it's
missing a few crucial things. Rust asserts too much control over memory. I'm
all ears for anything that's somewhere between C and C++ as an alternative to
write games in.

Most new languages just don't get the things right that C++ did, which is why
despite it having a ton of deficiencies when it comes to game development,
it's still what everyone in AAA is using. Companies in AAA spend so much money
on software to even just somewhat improve places where C++ has gaping flaws. A
better language should have been developed by now and I don't even want to
think about how much money C++ has cost the industry as a whole, even just
purely on iteration speed.

~~~
AnIdiotOnTheNet
I was almost like OP for a while. Working on game, fed up with existing
languages (even C), wanted a better C. I was excited about Jai, but as time
goes on I'm finding it looks less and less what I want from a language.
Seriously considered making my own.

Then I started working with Zig[0]. It's about 90% the language I want and
even though it's still immature and the syntax, std lib, and semantics are in
flux, I still find the quality of life improvement so huge that all my current
projects are in Zig.

Zig is a better C to Jai's better C++, I think. It's a small language, it
favors simplicity and explicitness, it has entirely manual memory management
to the point that there isn't even a default allocator (we pass one in to
anything that requires one). It even lets you import C headers directly to
interface with C libraries.

[0] [https://ziglang.org/](https://ziglang.org/)

(skip the "stable" 2.0 download, it's way out of date from master)

~~~
ndh2
Zig is Linux-first, though. I don't think they have any dev who runs Windows.
For games especially, you don't want Windows to be an afterthought. Maybe
they'll get to it eventually, but it doesn't seem a priority.

~~~
AnIdiotOnTheNet
I pretty much exclusively dev on Windows, and the only thing that's a problem
for me is the lack of error and assert traces. Someone started implementing
the support for it, but never finished it. It is complicated by the fact that
Microsoft does not distribute DIA with Windows and Zig can't include it in its
own distribution.

------
ChrisFoster
Some people seem to be objecting to this as a fluff piece, but it speaks to me
on a deep level.

I develop free software because I like to learn and create; because good tools
make work a joy; because I like to make useful things.

And I've parted ways with several projects, some of them mine and some of them
from others. It's painful each time I leave a useful project unmaintained. And
yet, I don't find long term project maintenance sustainable as a hobby when my
personal use declines.

I suppose the best outcome is handing useful things off to a new caring
maintainer. How do other people deal with this?

~~~
brobdingnagians
I think handing it off to a maintainer when your own usage declines is a very
good idea. One of the problems with maintaining something that you don't use a
lot is that you get out of touch with how it is being used and the direction
of the community. If you are at the head of the community, it is helpful to be
an active participant; so appointing another maintainer who has an active
usage, passion, and is "in-touch" with what is going on could be very
fruitful. Eat your own dog-food

------
hyperpallium
I want to do D, and it'll be easier to do A, B, C first.

A turned out harder than expected; B had challenges, some seemly
insurmountable, some merely incredibly tedious. C looks even worse.

I'm exhausted, lost interest in D. But I "should" continue. I give up... a
failure.

All because A, B, C make D "easy".

~~~
abhgh
Interestingly, the author of D is on this comments page ... he did do D :-)

------
lifeisstillgood
This is sad, and I feel for you. Your experiences I think mirror in the macro
what many of us have in the micro - a side project becomes a love affair
becomes something that has to be left aside as the rest of life takes over.

I hope it is merely a hiatus - and I hope too find your next great passion.
Keep writing about it - we will follow ...

------
cjohansson
It's a depressing feeling but the key point is that it's not motivating you
any longer and motivation was the driving force of the project. When I face
situations like that I usually raise the requirement bar up until it feels
hard and fun again. So I suggest that instead of just doing what needs to be
done with your project, invent a novel solution to the problem that is useful
enough but most importantly - motivating you to do it

------
foota
I wonder if Rust could become used as a standard library for other languages
in the future. It seems well fitted for this role due to it's safety,
relatively easy ffi, and speed next to languages with similarly large standard
libraries.

~~~
kjeetgill
I believe rust can compile down to a shared object and thus trivially used via
any CFFI. Sure you lose the expressivness of the rust language APIs but that's
a nightmare for interop anyways.

~~~
roblabla
Only because rust has an unstable ABI. I feel like it'd be nice to have rust
provide an explicit "rust-stable" ABI for those kind of things.

~~~
kjeetgill
Really curious, is there much of a usecase for a stable rust ABI? There is no
ecosystem of "rusty shared objects" to support and cargo tends to build things
fine without it.

As an outside observer it looks like an unnecessary complication.

~~~
roblabla
Plugin systems and distributing dynamic libraries are the two big use-cases.

For the second use-case, distributions can handle that somewhat okay by simply
enforcing that all packages are compiled with the same rustc version. That
works okay, but it means that, as an external user, you can't really depend on
those libraries for your own executables, as you'll need to recompile when the
distribution updates.

------
auggierose
It is possible though to build your own stack from the ground up (hard part is
to be smart about what exactly "the ground" is). Look at Knuth and TeX. And
today we have even better tools to write programs, and much better turn around
times in terms of compiling etc. Obviously, there is some added complexity for
there are API's like Apple Metal you will need to learn, but I think that more
than evens out in total.

I think it is important to have a big goal though (like TeX) to keep you
motivated and moving forward.

------
sdegutis
> _" And would I want to work on yet another language, knowing I’ve already
> solved the interesting problems?"_

Sometimes this happens to me too, where I want to scratch an itch, and I try
to do it by writing real software and using it. In general I have found that
to be a bad idea. For those I prefer writing throw-away software, and only
writing real software when it's "boring" but useful work.

~~~
mortoray
When I started Leaf it was to scratch an itch. It was really only when the
motivation dropped that I tried to find ways to use it, to renew my interest
in pursuing it.

------
axilmar
C is a perfect language for writing games into; C++ has some extra sauce that
makes some things easier, faster to write and more correct.

There is no actual need for a new language for writing games; that's why so
many, including the author, give up. C/C++ has the 90% of what is needed to
write any application, and the rest 10% is simply elusive and might not even
exist.

~~~
Philipp__
Problem with C/C++ is maintaining and writing code. I am sure you are well
aware of Jonathan Blow's efforts in writing Jai programming language. If not
take a look at his Youtube channel. Pretty eye opening. (I am no game dev btw)

~~~
axilmar
I am a beyond-veteran C/C++ programmer, I already have studied Jai, viewed all
of Blow's videos etc.

I will not recommend Jai for any development, it doesn't offer anything
substantially better than the current C/C++ combo to justify the switch.

------
z92
For my language, instead of targeting LLVM, I targeted C. That made me take
off fast, because everything in C is available from day 1. What I did is build
an extra layer over C to make it behave more like a scripting language.

Used it for my website.

~~~
mortoray
I chose LLVM from the start since I knew some of the challenges that
interested me couldn't be done at the C level -- or rather it'd be more
complicated at that level than at the LLVM level.

~~~
rwallace
Which challenges? As far as I can see, LLVM is essentially C in SSA syntax;
what semantic differences have you come across?

------
oldandtired
What he is experiencing is the reality of most people's lives. The boredom and
drudgery of doing the hard yards every day. Most people do not have the luxury
of doing what is interesting to them. It is a case of just having to knuckle
down and complete what has been started.

From my personal perspective, it's nice to have side projects that are
interesting and learning exercises. The reality is that if these side projects
are actually worth it then they need to be completed. Otherwise they are just
a fad and not really worth the effort that might be put into them.

If something is worth starting then it is worth finishing.

~~~
JadeNB
This post seems to be just a collection of generalities judging the way that
someone else has chosen to spend his time. You seem both to be saying that he
shouldn't have started and that, since he started, he shouldn't stop. Well,
presumably the author once got some value out of the effort, so that it was
worth starting; and found that he was now no longer getting enough value out
of it, so that it was worth stopping. Do you really think that it's valid (or
even important) for you to judge either of those decisions by someone else?

~~~
oldandtired
For a private endeavour, whether he finishes or not is completely up to him.
When he puts it out for all to see, this then changes the dynamic under which
he is moving forward.

If he had said he was stopping due to life commitments or family situations,
etc, then these kinds of things take priority, as they should. No problems or
issues should arise from that. But he has stated that he is giving up because
it now involves doing the hard yards to complete the project - this does not
show him in a good light.

In essence, he is saying that once something has become non-interesting in
whatever way, then he will give up and move onto something else that will hold
his interest. In other words, he is committed to a course of action only when
it holds his focus, but that he will happily drop it when it becomes hard
work.

I really don't think that he was intentionally going out to say that he is
undependable. This is what he has said though.

~~~
hluska
A more charitable explanation is (in his words), "it’s no longer fulfilling my
goals, and it’s not as fun as it once was."

When I look at it from his point of view, I feel quite sorry for him. The
language's forum has 9 posts in the last calendar year. 4 of those are him
solving a problem using Leaf. Then, I check out the status page and realize
that, for all the work he has done, Leaf is still in a very primitive state.

I'd equate it to being like a startup. At some point, it stops making sense.
Then, you can either ride the ship down into the depths, or hop out when the
going is as good as it will get.

As for his dependability, I've got to tell you that, from my perspective,
anyone who can pull this off is more than impressive enough.

I think he should be awfully impressed with what he did. And, I don't think
it's even remotely fair to judge him as being undependable. Based on what I've
seen, I think he should have pulled the plug last year, when he first wanted
to quit.

~~~
oldandtired
Maybe it is a change of times, but when he got into the detail of why he was
quitting, it was about the hard work ahead, which is rarely fun for most
people.

I don't feel sorry for him at all. He found something that was of interest to
him and he decided to head down a path towards that interest. Good on him.
Kudos to him for giving it a go. However, the problem he has made for himself
is that he went public far too soon and is now publicly saying he is quitting
because there is too much hard work ahead for him.

Startups have a low rate of success and is about testing an idea that has a
good likelihood of failure. Different proposition to start with. The more
appropriate comparison is making some item that can be useful to you but has a
lot of tedious and fiddly work to be done. In his case it was a computer
language which always comes with implementation problems to do deal with. One
knows this up front, or at least, should know this.

The problem is, he hasn't pulled it off - there is still a long way to go. One
of my areas of interest is language design, compiler construction of virtual
machine implementation. This subject matter is highly complex, tedious in many
ways and requires a great deal of patience and perseverance. For each problem
you solve, more arise to be solved.

For an individual, this can be daunting when you finally realise that you have
undertaken a massive project. It is especially so, if the language that you
have designed doesn't strike a cord in other people. But if you have a goal in
mind, then continue on even through the tedium that will come.

Things will always get in the way of you completing side projects, that's
life, but you can still keep chipping away as the years go on.

~~~
hluska
I'm in my forties and the times have not changed that much. We have a limited
number of hours on this planet, and we don't know how limited they are until
they're already mostly spent. We can slave away doing things we don't gain
anything from, or we can go out and take control of our happiness.

This fellow doesn't get paid for his work on Leaf and he works on it during
his already spare time. He would gain more doing creative tasks - he wants to
"do graphics, write music, make some games and record some videos."

It has nothing to do with hard work and everything to do with allocating his
time in the way he most wants to. He is taking control of his own happiness
and that is admirable.

------
caiocaiocaio
Leaf is a good name for a language.

~~~
ModernMech
apparently someone else thinks so too: [https://github.com/leaf-
lang/leaf](https://github.com/leaf-lang/leaf)

------
z3t4
Giving up on something is probably harder then finishing it.

------
danbolt
I work as a programmer in the games industry, as well as make games by myself
on my spare time.

Like how the author describes, I really had to divorce myself from the thought
of being a software designer or computer scientist to even start to make the
sort of games I wanted to make. Even then I'm hardly a competent game
developer, but I'm at least somewhat proud of my work so far.

------
ghostbrainalpha
That's too bad. I never actually tried Leaf but I loved following the journey.

------
CocoaGeek
Anything that is too niche is bound to be a "barren run", at least for a while
...

------
auggierose
This is funny, I was just looking (like 2 minutes ago) at an article about GC
vs. ref counting from the mortoray blog!

------
Thaxll
Never heard about that language.

~~~
zengid
Even this doesn't help
[http://leaflang.org/faq.html](http://leaflang.org/faq.html)

