The Duck Programming Language
ducklang.org
ducklang.org
That would be enough. I believe more people should be thinking about programming languages - even if it's just for fun or learning.
> what this language is trying to provide that isn't already provided by [...]
Most languages don't provide things that aren't technically also provided by others. It's more about how they are provided, what the language's strengths are, and how it wants programmers to approach problems.
Showing people what your language is all about is harder than it seems at first. Duck could probably do with a more in-depth tutorial and some talking points in order to better inform people about its features.
This made me look at the website of my own perpetually unfinished language project, and even though I knew I had to make an effort to showcase the thing in the tutorial section, upon reviewing it now I don't think it was particularly successful. Arguably, there are even some high profile languages that don't do a good enough job explaining what they're about, though website quality has picked up dramatically across the board in recent years.
Yes. Having a solid understanding of how languages work makes exploiting particular strengths of any one easier. It makes polyglot approach viable. It makes you less dependent on external tools and support from other people, as you can always roll your own linter, autocompleter or other such things. Being able to debug and modify your language is rather extreme, but very effective measure against some development problems.
It doesn't even need to be that great of a time investment to learn the basics. I see no reason for not doing this if you're a professional programmer. Language design and implementation is a thing that you'll interact with every day working as a programmer. It really makes no sense not to have at least basic grasp of it.
"It is easy to port libraries to Duck. Function hooks are implemented as pointers, of the form int (function_pointer)(int) where the argument count is passed as the only parameter. Arguments are bound as string identifiers, and are accessed dynamically in the bound-function's body."
I don't know the details but in my experience reducing the impedance mismatch to low level libraries is often a strong motivator to create one's own dsl instead of adopting a standard scripting language.
The end goal is much farther along than what's being presented now. This has, for the most part, been a one person effort. I was motivated by my Compilers course and a minimal Java compiler we developed targeting MIPS to start a project creating my own language.
Much of my experience with programming languages has been with interpreted or scripted languages. I find that they have a really low barrier to entry. But ideally Duck would have its own binary compiler and other tools. It's just that right now, in the language forming stage, it makes sense to formalize all aspects of the programming language first. In the future, it might be the case that Duck has significantly better performance than Lua or Python, but I can't really tell at the moment, especially without some tweaks to the language that move it towards static/strongly typed code. This is just the nature of reality.
So yes, it's mainly a toy language at this stage, but I would like to see it optimally used as a game language. I think it may be extremely easy to have it facing several different platforms, and use it as a high-level abstraction for loading 3D meshes and manipulating an interactive world.
Honestly, I don't see anyone else using this language besides me. I just enjoy implementing projects from the ground-up, so this was a chance to really do that. Originally, this was going to be part of a project to design a minimal computer from the CPU down to the operating system, but I don't really have time for that.
I'm hoping some day that Duck will find its uses, somewhere.
function fixed_point(f)
function curry(g, i)
function recurse(j)
return g(g, j)
end
return f(recurse, i)
end
function apply(k)
return curry(curry, k)
end
return apply
endBut I wonder, is this means for me to use, and then why should I use it? The text had great examples of how to use it, but I couldn't find the why.
Again, super cool that you wrote a language!
Obviously, depending on what you want to do, it might take more effort on your part, but I think that's a large part of the point in programming.
For me, the motivation is mainly researching garbage collection/memory management and function closures.
The curly braces of the other language in the examples look in place to me. But seeing all the ends and loops I feel it would be cleaner if they had been left away and the dev had opted for indentation based blocks.
But unless you actually do that, it won't help. If the language requires you to do it, everyone will.
I might be wrong, but it seems kinda close to it on first look.