[HN Gopher] MoonBit compiler is available on GitHub
       ___________________________________________________________________
        
       MoonBit compiler is available on GitHub
        
       Author : frou_dh
       Score  : 26 points
       Date   : 2024-12-18 13:30 UTC (3 days ago)
        
 (HTM) web link (www.moonbitlang.com)
 (TXT) w3m dump (www.moonbitlang.com)
        
       | zoezoezoezoe wrote:
       | I'm a little confused what this is, look interesting, I like the
       | rust-adjacent language (I mean I dont like that fn main cannot
       | have parenthesis, but other functions must have parenthesis, but
       | pretty interesting), I'm just a little confused as to what makes
       | it different. I see they seem to have their own compiler, so no
       | LLVM overhead, but also no LLVM legacy, and they seem to be
       | targeting small WASM compiles, is that just it? I'm just a little
       | confused on what makes it special, I think it's stack based,
       | there doesnt seem to be a concept of pointers as far as I can see
       | in the documentation, it looks cool, but what makes it different?
        
       | tinco wrote:
       | This looks like a fun language. I don't like the idea of wasm,
       | but I do like the idea of moving away from JavaScript at some
       | point. With big software like Figma using wasm to get proper
       | performance in the browser the benefits of such a language are
       | obvious in my opinion.
       | 
       | Wasm is a move back to the flash days, though most developers
       | nowadays probably weren't there to know why that sucked. Even 15
       | years later there still isn't a decent replacement for its main
       | use case, it got sacrificed for the cause of the free and open
       | web. Maybe the market for it disappeared with a certain early web
       | culture. Most flash iconic content was probably created with
       | pirated copies of Flash anyway.
       | 
       | Since I'm in the old person yells at cloud rant mood, I'll just
       | continue on and rant at OSI as well. This project is yet another
       | example of a project that would have been and should have been
       | proper approved open source if OSI had not failed to get with the
       | times and protect the open source community against the large
       | cloud providers, the very same cloud providers that are their
       | largest sponsors and donors.
        
         | baq wrote:
         | I don't understand the wasm is flash argument. Flash was a
         | closed runtime full of security issues. wasm is basically
         | JavaScript stripped down to the absolute minimum (see asm.js)
         | and then stripped down again - the browser controls all aspects
         | of execution in the same way it controls js.
        
           | tinco wrote:
           | That it was a closed runtime full of security issues wasn't
           | the reason it was rejected by the open web community, or even
           | rejected by Steve Jobs from the Apple ecosystem. Closed
           | runtimes and security issues have always been warmly embraced
           | by the web.
           | 
           | It's just that supplying binaries to the web is less open
           | than supplying html and js. It's not an especially strong
           | argument, less so given how minified and uglified JS is
           | nowadays, but that's what it is.
        
       | jacobp100 wrote:
       | A bit of background on this project: it was started by the guy
       | leading BuckleScript (now ReScript), the OCaml to JS compiler.
        
       | trollbridge wrote:
       | I noticed they chose the SSPL licence. I'm working on a similar
       | sort of project and am evaluating AGPL3 vs SSPL. (If my project
       | is successful, it has a high risk of cloud providers both large
       | and small co-opting it, and I'd like to proactively head that
       | off.)
        
       | childintime wrote:
       | Discussion: https://news.ycombinator.com/item?id=37174619
        
       | ptx wrote:
       | The license seems a bit iffy. The blog says it's "open source",
       | but the license is a modified version of the SSPL, which is not
       | recognized as an open source license in the customary sense of
       | the term.
       | 
       | They also don't say explicitly what modifications they made
       | compared to the SSPL. Some diffing shows that the changes consist
       | of:
       | 
       | 1. Search/replace of license and publisher name.
       | 
       | 2. Renumbering sections with 1-based indexing.
       | 
       | 3. Adding the words "commercially or competitively" to section 13
       | (which is renumbered to 14).
       | 
       | In the process of doing this, they seem to have accidentally
       | replaced the publisher name with the license name in one place
       | ("any version ever published by the MoonBit Public Source
       | License") and introduced an off-by-one error where section 18
       | (which used to be 17) refers to sections 15 and 16.
        
       | egonschiele wrote:
       | Not to be confused with Moonscript, which is a cool language that
       | compiles to Lua: https://moonscript.org
        
       | dartos wrote:
       | A friend of mine worked on https://github.com/libriscv/godot-
       | sandbox
       | 
       | Which uses libriscv as the sandboxed compute target.
       | 
       | IIRC They tried for years to get a wasm backend to work and
       | eventually abandoned it citing, among other reasons, something
       | about how it was difficult to wrangle a stack machine with a
       | register machine.
       | 
       | I don't really see what benefits wasm runtimes have over
       | something like libriscv which is very fast and maps more closely
       | to hardware.
        
         | apitman wrote:
         | First I've heard of libriscv. What exactly is it? A wasm
         | alternative that uses RISCV byte code?
        
       ___________________________________________________________________
       (page generated 2024-12-21 18:01 UTC)