I have to ask what this language is trying to provide that isn't already provided by lua or python when it already looks almost identical to them. Has it got an end goal that I cannot see or is it just being done out of an interest in programming languages?
> or is it just being done out of an interest in programming languages
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.
> That would be enough. I believe more people should be thinking about programming languages - even if it's just for fun or learning.
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.
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.
I have no idea. Probably an interesting project for the author, or maybe they are trying to fix some backwards-compatibility debt from the aforementioned languages. Either way, it would be good to see this mentioned as the first point on the page because it will be the first thing everyone will be thinking.
"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.
For those of you wondering about the motivations of this, I'd like to explain that it's mostly an enthusiast project but it might have some utility down the road.
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
end
Take a look at http://createyourproglang.com/ - it's very good for making language creation seem less magical. Well worth the price. It's not a replacement for a "proper" discussion of PLT and compiler design and such, but it's nice as the first step.
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.
Only barely related, but it'd be nice if more languages had something similar to BASIC at the end of a loop (NEXT <VAR>). That way, if you're looking at the tail end of several nested IFs and loops, it's easier to know where you are.
Going through the language forming stage I've really been at a loss to how other languages accomplish certain features. Revisiting some older code I had written I had to start contemplating syntax like var_name$ for strings or decmial_number#.