Author here. If you've got any questions, I'd be happy to answer.
I'm a little sad that this got posted before I had a chance to write a good tutorial and upgrade the documentation. So, imagine that this project was just about to step into the shower when Hacker News came knocking on the front door. "A package? I like packages but.. damn it. I'm not presentable yet."
All the code in compiled binaries is in Myrddin, other than a few assembly stubs: There is no dependency on any installed library, although you can bind to C if you want -- for example, http://git.eigenstate.org/ori/cbind-example.git/tree/
"Are you tired of your compiler Just Working? Are you tired of having your standard library having the basic functionality you need? Do you long for the days when men were men, and debuggers operated on the assembly level? If so, Myrddin is for you."
That was awesome. Either you're delivering a refreshing amount of honesty or like to under-promise then over-deliver like me. ;)
Funny you should ask. The project I'm on at work is written in D, and actually had Andrei working on it at one point.
The two languages are very different. D feels very much like an attempt to resolve the warts of C++ and extend its strengths, and it does a good job of that. If you like C++, you'll probably like D, although in many ways I feel that it has an immature implementation. (That's a rant for a different time, and it's not like Myrddin is more mature.)
Myrddin is going in a different direction, I think. It's far simpler than D. The best example of this is probably generics, where in D, they're seen as an opportunity to do complex metaprogramming on types, and idiomatic D uses generics. In Myrddin, they mean that your function is not allowed to care at all about types.
If you like both C and the ML family of languages, I think there's a good chance you'll like Myrddin.
Every new language suffers the same problem in its docs. The docs will show you:
* Hello world (yay, printing to console, wow!)
* How to declare functions (impressive.... most impressive </s>)
* Their type system (cool, you have ints, bools, floats... I'm drooling over here!)
Please folks, for your language's own good, please put the unique distinguishing features FIRST in your docs. I don't care what your printf looks like! Just show me the 3 things I can do in your lang that I can't do anywhere else, and then you might actually hook me into trying it out.
I think the Main features could be shifted above status.
But I would like to point out the first example shows type inference, arrays/slices that know their own size, and tuples, all of which are very interesting in a language that is otherwise the same as C. Perhaps it can be made more obvious though.
Couldn't agree more. Even worse are GitHub READMEs that usually go on and on about how to download, compile, install and run the compiler (how about making it so simple you could do it in 2 lines?!) and how to contribute code, without actually explaining what makes the language different.
I would argue that, for many users, manually installing software leads to a greater understanding of that software.
Take Linux/Bash as an example. What better way to learn Linux than to agonize over a Linux From Scratch installation, building CUPS, and successfully printing a test page to your printer?
I don't see how installing a compiler would improve your understanding of the language the compiler is for. If anything, it would improve your understanding of whatever installing software (bash, makefiles, etc.).
I agree, and I've been thinking of replacing what I have with a better sample program. The problem is finding a small example.
I mean, sure, I could post the code for my memory allocator, which showcases lower level raw memory manipulation, or a the formatting code, which showcases runtime type information, or some of the traits for iterables, but all of these take some time to digest, especially without first reading an introduction to the language.
Actually the "Hello ..." program is not so bad to show first. After all, it is a tradition, and like other introductions in the social universe, greetings serve a purpose. "Hello world" instantly tells me, ah, "this language is a lot like C with some interesting differences".
From there quickly getting into the features that make the language unique will prevent reader boredom. Overall your site was nicely done. One aspect I particularly liked is that you described all of the syntax in the examples. I really dislike when a new language is presented without making clear what symbols mean, as if I would just automatically know.
It will be interesting to see how Myrddin comes along.
Myrddin language has very similar ideology in syntax to ACPUL.
http://acpul.org/ (see api & samples, also screenshots with minimal working code for DOTA game prototype)
But ACPUL is different, main idea in minimal touch programming on mobiles with full livecoding using self-development tools. Not only language. For example, editor & debugger is used and developed in real-time (also as other parts). By this, ACPUL syntax is very limited. It don't have strings, because strings is form of data. ACPUL don't have standart console log, because your console is whole GPU-accleated screen. And many others things.
I think Myrddin in right way, but additional tools is needed. I like it!
No. It is memory dangerous. Please use appropriate personal protective equipment when using this, or you may find you have lost all memory of your family.
More seriously: no, it makes no guarantees, but it tends to a much safer style by default: Bounds are checked, raw pointer arithmetic is ugly, clunky, and rarely used (although useful within, eg, the memory allocator), implicit conversions are gone, and null pointers aren't present in either the language or the library. You can define your own, even in a generic manner, but nothing uses this ability. Uninitialized variables are generally a compile time error (barring some bugs in the data flow analsyis), and so on. You can poke holes in the type system, but these holes are explicit.
As a result, most code written is going to be far safer than, say, C.
> Myrddin is not a language designed to explore the forefront of type theory or compiler technology. It is not a language that is focused on guaranteeing perfect safety. It is satisfied to be a practical, small, fairly well defined, and easy to understand language for code that needs to be close to the hardware.
Memory safety is also absent from the 'Major features' list.
>Just show me the 3 things I can do in your lang that I can't do anywhere else
You won't find such a new language. Most languages in use are already known to be Turing-complete. There is no new computation that "can't [be done] anywhere else [, except in some new language]".
It would be highly useful to give examples of things that are easier to do in your new language though.
A user downmod is when someone pushes the "upside down triangle" next to a person's name and/or point score for a particular post, or, in some other way decrements a person's "karma".
When downmods serve to censor my content, they become my business. I don't know where you pulled 'upvote' from, though; I'm not sure there is much value in knowing them.
Edit: Someone is getting a feed of something...or they are just furiously refreshing this thread. hehe
Go would show channels. Rust would show the prevention of a memory ownership bug. Elm would show reactivity. Haskell would show that a monad is just a monoid in the category of endofunctors. what's the problem?
If you haven't got something interesting and at least unusual to show off very early in your docs, it's something to think about in your language design.
Now, you may have to build up a bit, and I'd certainly say you shouldn't bend your entire language around the "one cool demo", but I do think your early docs should make a hard burn towards whatever it is that sets your language apart. It's just basic sales.
(Elsewhere in this thread ori_b says this was not an intentional release, so I mean this as general advice, not targeted at this case. I don't know how to prevent too-early linking on social media sites short of not releasing anything public, which has its own problems!)
Python and Javascript should be able to compute exactly the same things (assuming an appropriate compiler/runtime and infinite time & space): any computable function.
Exactly. And yet they are profoundly different. That's my point. Obviously the things you can do in JS that you can't do in Python, or vice versa, have nothing to do with computation, so your original comment here is kind of pointless.
aerovistae is talking about the abstractions provided by the language. Yes, all Turing-complete languages can all compute all computable functions. But not all languages structure those computations in the same way, or make the same things easy or hard.
For example, Python has the concept of a decorator: https://docs.python.org/2/glossary.html#term-decorator. You can achieve the same thing in a variety of ways in JavaScript, but Python makes the concept of "a function that wraps another function" a central abstractions by providing syntax directly for it.
In a discussion like this, it's best to assume that all parties understand the ramifications of Turing-completeness. The charitable interpretation is that aerovistae meant what I said - which is apparently the case.
I agree, however kzhahou made a claim that there could be a language that could do something another couldn't.
The discussion with aerovistae about computation came from their initial post:
>Unless of course you're trying to argue that the difference between python and javascript, for instance, is what each is capable of computing?
If we are talking about ideal machines, there is no argument to be made that there is a difference between what the two named languages are capable of computing.
In real life I am very happy to have very extended conversations explaining things to people who don't get it, but on the internet, it's really just not worth it. I'm sorry you have misunderstood so much of this thread.
Maybe it is you who misunderstands? I see your point, but my point is different. If you can give me the specific words of mine that you believe show a misunderstanding, I could try to clarify.
You read my comment way too literally. I did not mean that a new language should have a feature that can literally not be done anywhere else. I meant: what are the uncommon features? What sets this language apart from the (dominant) other langs?
As someone else pointed out, in golang this would be goroutines or channels or golang's approach to composition vs inheritance. You can certainly implement those in another language, but they're not first-class features in most other langs. Put together, those elements give golang it's characteristic flavor.
For this new lang, I'm interested in learning (as early in the docs as possible) what sets it apart from C, C++, golang, python, ruby, JS, haskell, erlang, D, etc. The hello world example teaches the reader something, but it's not the thing a person first landing on that page probably cares about.
And going back to my original statement, there's lots of things that are still missing from programming langs and associated ecosystems. Just look at JS, and how even today people are still furiously trying to extend it and work around it just to build simple reactive websites.
kzhahou, sorry for reading you way to literally. I actually only have the words that you post :)
I think the important thing is to find the new things, but to realize that they aren't really new, just different ways of using the old. All of the languages you listed are really just specialized, assembly, or other, programs. Yes, most of the hard work has been automated away, but it's still there.
I like JS because it can be extended (though it can be very difficult to keep track of). I think there was a workaround phase when the VMs/interpreters/machines were slower, but pretty much everything can be compiled to JS these days. You don't even need to do that though, as JS embeds first class functions, so pretty much anything is within easy reach.
That (tab) looks pretty cool. I didn't say that nothing new can be invented though, only that you won't find a new language that can compute a function that no other existing language can.
I'm a little sad that this got posted before I had a chance to write a good tutorial and upgrade the documentation. So, imagine that this project was just about to step into the shower when Hacker News came knocking on the front door. "A package? I like packages but.. damn it. I'm not presentable yet."
All the code in compiled binaries is in Myrddin, other than a few assembly stubs: There is no dependency on any installed library, although you can bind to C if you want -- for example, http://git.eigenstate.org/ori/cbind-example.git/tree/
But everything else is in Myrddin. For example, memory allocations: https://github.com/oridb/mc/blob/master/lib/std/alloc.myr
Or regexes: https://github.com/oridb/mc/tree/master/lib/regex
The various system calls are all here: https://github.com/oridb/mc/tree/master/lib/sys
And so on.
If you want to play with it, there's a playground here: http://eigenstate.org/myrddin/playground
And there's even a neat little regex debugger it ships with that I find useful: