The Mun Programming Language
mun-lang.org
mun-lang.org
I do understand some of the comments questioning the publication of a website for a programming language that isn't even finished. Our goal was to have a platform to share progress and gauge interest on the topic to further help us develop Mun. We feel like there is no point in developing a programming language in private. Instead we want to actively engage with the community while developing Mun.
The website does state that its still in very early development. Should we emphasize this more?
Mun compiles to machine code with LLVM so it should be very fast as well, hotloading overhead can be completely removed in builds where hotloading is not required (production builds for instance). Mun should therefor be able to run as fast as native code on all platforms.
Defold is slightly different, still allowing Lua scripting, but not more than that, which is the appropriate place for Lua in a mobile-dominated market.
Yes the Work in Progress Part should swap its places with Pillars. And it should include "Pre Alpha" in it. So we know what stage it is in.
State that it is not suitable for production yet. Perhaps a link to show the most advanced program that currently exists to show where the limits are.
If you are seeking donations, be clear about _who_ you are. Otherwise you could be seen as a scam project.
1) We like this thing that fits into the following use case 2) But we feel it has the following limitations 3) Which we’re planning to address like this.
I think it’s really important to establish what ecosystem slot you’re aiming at. If it makes it to others, fine.
Come again?
I was under the impression that Lua, especially luajit, were incredibly fast languages
> We take inspiration from a scala of application, scripting, and systems programming languages
The word "scala" reads really oddly in that sentence; none of the English-language meanings of the word [1] fits, and to a technical reader it's just asking for confusion with the Scala language. Maybe replace with a clearer and less formal "bunch"?
The syntax shown looks very Rusty, and I believe this started as a thought experiment for Rust. Do you see value in keeping that link explicit? That is, using Mun as a prototyping language for early iteration, then "freezing" it to vanilla Rust with minimal syntax changes once happy with the result?
Also, if the goal here is fast iteration, it'd be interesting to see some ballpark figures for compilation times, which is one of Rust's major Achilles heels today.
Why publish a project that, while already showing technical proficiency (the Twitter timeline suggests only 2-3 months of work), is still a very long way to do something useful, let alone compete with other programming languages? The fashionable web site layout adds insult to injury instead of looking good.
I had planned on doing a single point of release when it was finished. I'd done that with a game release before however. After months of work release day came, the game flopped, and by a week later it was more or less lost to the void. Not wanting the same to happen on this project I changed my mind and released it as it was one random weekend.
It had very little documentation, and even worse known bugs and crashes. But a couple people downloaded it and one guy liked the concept enough to kick me $5. By the next week I had some more info on what those people liked and what they could live without. I had motivation to fix some bugs that I had learned to work around in my using of the game. My development rate on the game has gone up significantly since releasing it in an unfinished state, and the community is very small but two months later the game hasn't dropped into the internet void.
I can sympathize with the mindset of "I've been working on this in a vacuum and just want someone else to see it, warts (or lack of content) and all". In my case it's worked out for the benefit of the project as well.
Compare with a language like Jonathan Blow's "Jai", which is developed in private with update videos published every now and then. Sure, that's one way to do things, but personally I much prefer being able to follow the progress of a project more on my own terms, with the source in my hands.
It is entirely possible to create a statically-typed language with C-like performance and scripting-language-like interactivity (the most similar is Julia, which also uses LLVM under the hood), but the details would be pretty complex enough to make this quite a big project.
Still, it's good to see there are languages other than Jai trying to compete in the rather niche gamedev programming space.
fn name(a: int, b: int) -> void {}
This also helps with clean functional type arguments.
swift and rust support this.
A single consistent notation will be helpful for new polyglots.
func add(x int, y int) int {
return x + y
}
I doubt this is more readable, but everyone has their own taste.This is often chained to produce functions that 'take multiple arguments'. i.e. a -> b -> b. I put that in quotations because in reality all functions take only one argument, this is called currying. It gives functions flexibility in that you can partially apply them at will.
In languages like Rust and Swift, the syntax is (a: A, b: B) -> B. Because these languages are "uncurried", they use the syntax of uncurried functions. Meaning, they cannot be readily partially applied.
Funny; I'm reading this in a HN android app; I don't know which font it uses but I swear I'm staring at such a misaligned example.
A function of type `Int -> String` allows you to get a `String` from an `Int`.
The proposition `A -> B` (`A` implies `B`) means that `A` being true allows `B` to be true; we can deduce `B` from `A`.
For the link between functions and implication, see: https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspon...
I don't think it makes sense to say `fn read(s: string) -> int` as in Rust though. If an arrow were used in such a function declaration, it should probably look something more like:
fn read: (s: string) -> int
As another commenter has indicated, `fn read(s: string): int` states that `read(s)` is of type `int`, which is logical.void name(int a, int b) {}
C, C++, Java, and C# support this.
A single consistent notation will be helpful for new polyglots.
This way it would be consistent with how variable types are declared.
For example, a function that accepts a function as an argument can be written:
fn foo(f: int -> string)
Or if the argument name isn't needed in this context (e.g. think interface declarations): fn foo(int -> string)
If you see ":" as meaning "has type", then using it for a return type isn't necessarily more consistent, because it's not the function that has a type. fn foo(fn (int) -> string)
be more consistent?In Haskell, this is written:
foo :: int -> str
Of course, Haskell is based on lambda calculus, so multiple arguments are just a generalization of partial function application: foo :: int -> int -> str
(A function taking two int arguments and returning a string, which is indistinguishable from a function that takes a single int and returns a function that takes a single int and returns a string.)The Haskell language looks interesting. Maybe I should spend some time to study it.
add(a: int, b: int): int
can be read as a function 'add' when applied to the parameter tuple (a: int, b: int) has type int, I believe Ocaml, SML, actually support this syntax, whereas '->' (arrow) is a function type constructor in functional programming with 'A -> B' denoting a function from A to B. The type of add by itself in a language like Haskell would be:add :: (int, int) -> int
let sum a b = a + b
...has the type: float -> float -> float
Same in Haskell.These languages "emulate" multiple arguments through partial function application. OCaml does not use tuples for arguments.
As far as the original sugestion, using '->' (arrow) to denote a return type (like Rust) is nonsense in a functional language and kind of butchering the functional inherited syntax IMHO.
> is nonsense in a functional language
SML/OCaml and Haskell all use ->, so I'm not sure what you mean by this?
[1] https://stackoverflow.com/questions/10666913/why-prefer-curr...
let add ((a:int), (b:int)) : int = a + b
Works just fine, whereas: let add ((a:int), (b:int)) -> int = a + b
is nonsense, because '->' is a type constructer in OCaml (a function from types to types) not part of an ad-hoc syntax for function declarations (like Rust).The Rust syntax seems to emulate functional programming, but inconsistently since -> is not used purely as a type constructor or term constructor something like a mix of both in the defintion of functions, also it doesn't seem to support currying.
Language wise, it looks like it is in the Swift/Julia/Haxe space but with first class support for Rust. This looks interesting, I wish them luck and would love to use this in the future.
Two other languages to check out are
Isn't static typing kindof clashing with the hot reloading focus anyway? Maybe make it possible to add the types later.
LLVM has some support for garbage collection, but I've never heard of any language implementors actually being happy with what it offered in terms of features, correctness, and performance. (Counterexamples would be welcome.)
1. Mun exists because of frustrations with Lua.
2. Lua means "moon" in Portuguese.
3. The "moon" in KSP is named: Mun.
Voila
Edit: seems like some basic syntax docs could be generated from their source, actually. https://github.com/mun-lang/mun/tree/master/crates/mun_synta...
Every user will prefer Turing completeness (first order functons with no control structures aren't enough) to hot reloading.
>Message content is ended with \0 byte, followed by a digit between 0-10 describing font colour.
What hacker does is pass `\0\0` to check if null byte is valid digit or painfully crashes system an if invalid values are handled correctly when error handling mechanisms aren't described in documentation. I think what you mean by hacking is closer to RE.
I don't know what the answer is, but I think internet points make things worse in general. I'd love to see a forum with sentiment analysis built in and automoderators that dynamically reorder or weight posts so as to not encourage gaming the system.
Maybe upvotes on critical comments should count for less?
You're right that the problem is much worse when it's a first post. Threads are so sensitive to initial conditions.