8 ms·
Mun Programming Language
- deleted 7y ago[deleted]
- adamnemecek 7y agohttps://github.com/mun-lang/mun https://github.com/mun-lang/mun
- marsrover 7y agoTo be honest, I was fatigued the moment it looked like just another programming language. After seeing there is absolutely no documentation, I don't even understand why anyone would upvote this.
- skrebbel 7y agoWhy are you on site called "hacker news"?
- JoBrad 7y agoDocumentation encourages hacking, not the other way around. People are usually substituting previously-learned docs when there isn’t any. Especially for a language, though, understanding the intended use and the direction the language is growing helps prevent undocumented or unintended usage, and early obsolescence. Edit: seems like some basic syntax docs could be generated from their source, actually. https://github.com/mun-lang/mun/tree/master/crates/mun_syntax/src https://github.com/mun-lang/mun/tree/master/crates/mun_synta...
- skrebbel 7y agoOh come on, people can't show off their projects anymore until they're perfect? This habit of immediately searching for the flaws of whatever gets posted is not helping anyone. If you want polished well presented shit, go to techcrunch or something.
- HelloNurse 7y agoOf course, but this project is like a car maker inviting the press to present a new model and showing a couple different windshields ("we aren't sure about the angle") and not even a picture. There are standards: a car needs complete prototypes, and a programming language needs something that it does better than the competition and a decent explanation of how cool it is. Every user will prefer Turing completeness (first order functons with no control structures aren't enough) to hot reloading.
- akerro 7y agoLet's say technical documentation says >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.
- dang 7y agoPlease don't respond to a bad comment by breaking the site guidelines yourself. That only makes this place even worse. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- skrebbel 7y agoGood point, thanks.
- sitkack 7y agoI think negative top level comments are discussion derailing not constructive.
- dang 7y agoThat's true, but it's easy to blame the comment more than the upvotes, which are arguably the worse problem.
- sitkack 7y agoNearly any first post comment will get upvotes, if the sentiment of a first post comment is negative, it steers the whole discussion in being over critical. First post and top comments provide a positive feedback loop that is often too hard to overcome. 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?
- dang 7y agoThe problem is identifying the critical comments. Sentiment analysis doesn't work, as far as I can tell. You're right that the problem is much worse when it's a first post. Threads are so sensitive to initial conditions.
- leshow 7y agoThe site says that it's in the very early stages of development. Would it be better if they iterated completely in private?
- lasagnaphil 7y agoThere's not that much work done to be able to comment something about this language; maybe it would be interesting after about a year or two. 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.
- crudbug 7y agoCan we have a consistent function notation 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.
- 13415 7y agoWhat's the purpose of the stylized ASCII arrow "->" / why is it needed?
- lytedev 7y agoLooks like it denotes return type? Are you implying it can be omitted syntactically because the closing paren implies the return type would follow?
- pvorb 7y agoYou mean like in Go? func add(x int, y int) int { return x + y } I doubt this is more readable, but everyone has their own taste.
- leshow 7y agoDepends on the language but in Haskell, the (->) arrow is a function type constructor (i.e. constructs function at type level) where a -> b constructs a function type from a to b. 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.
- frou_dh 7y agoThe thing about adopting the ASCII Art pseudo arrow is that it bakes in an assumption that the dash character lines up vertically with the point on the angle bracket character. This simply isn't the case in plenty of fonts. So it often looks like crap if you pay attention.
- skybrian 7y agoDart, Java, and I assume other languages have some support for hot reloading. It would be interesting to read how they plan to do it better.
- cwyers 7y agoIt looks like the intent of this language is something that can replace Lua as an embedded language in games and other applications that require scripting, without the overhead of requiring JIT compilation to be performant (which you can't have on iOS). The JVM is a bad candidate for that. I believe Dart uses JIT as well.
- swsieber 7y agoDart can do AOT compilation as well.
- HelloNurse 7y agoAfter reading the web site, I looked at the sources (e.g. mun/crates/mun_syntax/tests/data/parser/ok/) because my disbelief was unusually stretched, and it seems that the examples and explanations in the almost nonexistent documentation cover fairly well the almost nonexistent features. 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.
- gotodengo 7y agoI've been working on a game project over the past year. Everyone I had shown videos to was supportive. I felt like I got a lot done in a short few months. But no one other than myself had gotten their hands on the game proper. 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.
- bryal 7y agoWhy not publish? What's the problem with developing in public? I think it's just welcoming for potential contributors, if anything. 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.
- ohazi 7y agoToo early for KSP jokes? Munshot language?
- baszalmstra 7y agoActually: 1. Mun exists because of frustrations with Lua. 2. Lua means "moon" in Portuguese. 3. The "moon" in KSP is named: Mun. Voila
- kyberias 7y ago"Mun" means "my" in Finnish.
- cpeterso 7y agoHow do you pronounce "Mun"? Does it rhyme with "sun" or "soon"?
- baszalmstra 7y agolike sun and mundane
- baszalmstra 7y agoOne of the creators here. I appreciate the upvotes but its way too soon for that. Mun is currently in the very very early stages of development. It originated out of frustrations with Lua game development at Abbey Games. Lua is a great language but lacks performance, refactoring functionality and doesn't scale well with modern technology. However, there is no real alternative when it comes to code iteration times. 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?
- gravypod 7y agoWhat does mun plan to do that will improve performance over luajit?
- baszalmstra 7y agoLuaJIT performance on PC is very fast when its using the JIT. However, on consoles and some mobile platforms JITing is not allowed due to not being allowed to write to executable memory for security reasons. 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.
- gravypod 7y agoSince Mun targets LLVM could it also be output to WASM to be using in-browser for HTML5 builds?
- baszalmstra 7y agoIn theory yes, but we have to look into that some more. At this point we only target Windows, MacOS and Linux but WASM is definitely on our list.
- voldacar 7y agoFrom the goals and bits of code, this looks a lot like Zig. What about Mun makes it distinct from Zig and the other little imperative LLVM languages that have been coming out recently (Zig, V, and a couple others come to mind)?
- baszalmstra 7y agoMun is primarily focused on hotloading, the ability to change your code while its running. Our goal is to enable hotloading of all constructs including structs (similar to how Lua works) and without having to annotate anything.
- childintime 7y agoSo, why do we need yet another language to reap hot-reloading, instead of adding it to say Rust, Zig or (blow me) Jai? Is there something about those languages that complicates hot-reloading?
- baszalmstra 7y agoJai is actually closed source, so that was not an option. But in general there are no predefined best practices for achieving hot reloading of both functions and data. Experimenting with those while also fighting with complex compilers makes the problem space exponentially more intractable.
- dimitar 7y agoI think a modernized Lisp (the program is composed of many tiny expressions that can be reevaluated) can shine when hot-reloads are highly desirable. Isn't static typing kindof clashing with the hot reloading focus anyway? Maybe make it possible to add the types later.
- sitkack 7y agoThis is written in Rust, and the reloading mechanism looks like it aims to hot reload Rust libraries. So this could be used as a development workbench to glue together Rust libraries, think Python gluing a bunch of C++ libs together. 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 Dyon, https://github.com/PistonDevelopers/dyon https://github.com/PistonDevelopers/dyon Gluon, https://github.com/gluon-lang/gluon https://github.com/gluon-lang/gluon
- ajcodez 7y agoOff topic but it would be cool to have function types use just > for brevity, such as “add: int>int>int” and have equality operators use two characters, such as << >> >= <= ==.
- aabbcc1241 7y agoThe syntax of code snippet looks like go and typescript, they don't support hot reload thought. Why do you choose to create a new language, instead adding features you miss into existing language ?
- Phillips126 7y agoI just started learning and using Nim[0] (which recently hit release 1.0), this language appears to be very similar - statically typed, can use llvm, cross-compile, similar looking syntax. I'll be keeping an eye on this language as it looks like it will pair well with Rust. Looking forward to seeing some documentation. Keep up the good work! [0] https://nim-lang.org/ https://nim-lang.org/
- tom_mellior 7y agoStandard "new programming language" question(s): What's the memory management aspect like? Is there garbage collection? 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.)
- hybrids 7y agoTo me the most ideal form of hot-reloading and runtime compilation is probably the approach found in Scopes. While it leverages the LLVM MCJIT, it takes the approach of having compilation done when the programmer specifically wants it to be done, making it less of a "JIT" and more of a "runtime AOT"