From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sun, 4 Jan 2015 11:45:47 -0800 From: Ori Bernstein To: Ryan Message-Id: <20150104114547.7055970afa580fbd9e9e8160@eigenstate.org> In-Reply-To: <2de32b2c-d7e4-47b0-bd2a-77300e79ef0b@email.android.com> References: <20150104005900.d146d56df0f6cdab930a0fc8@eigenstate.org> <2de32b2c-d7e4-47b0-bd2a-77300e79ef0b@email.android.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Subject: Re: [9fans] New Language [Myrddin] On Plan 9/amd64 Topicbox-Message-UUID: 3879210a-ead9-11e9-9d60-3106f5b1d025 I could do it pretty easily, although I'd be curious to see what you think makes it harder to write a kernel with bounds checks. At least for me, I'd rather keep them the same. At least on with Intel's current out of order processors, they are shockingly cheap, and can be made much cheaper with (not-yet-implemented) optimizations like value range propagation. If it actually does make a significant performance difference (benchmarks, please), I'd gladly add in a flag. For doing the benchmarks, just delete line 780 of 6/simp.c On Sun, 04 Jan 2015 09:13:20 -0600 Ryan wrote: > That looks really neat! One question: are runtime bound checks really necessary? I would at least like a seperate release mode that gets rid of them. Writing a kernel with bound checks would be a mixed nightmare! > > FYI, please tell me I'm not the only person reminded of Rust... > > Ori Bernstein wrote: > >Myrddin is a language that I put together for fun, but which has > >developed > >delusions of usefulness. It's a complete reinvention of the wheel, from > >the > >ground up. Some of the major things you'll notice about it: > > > > - Type inference. Types are inferred across the whole program. > > - Algebraic data types. > > - And their friend, pattern matching. > > - Generics. > > - A package system. > > - Low level control over memory and such. > > - (Almost) no runtime library. > > - Self contained. > > > >For more details, you can look at the language website: > > > > http://eigenstate.org/myrddin > > > >Myrddin has been ported to Plan 9/amd64, tested on 9front. I haven't > >been able > >to get 9atom's amd64 kernel to boot on virtual hardware yet, so it > >hasn't been > >tested there. > > > >The compiler and libstd should build out of the box using the provided > >mkfiles. The libs used for mbld currently need either mbld or gnu make > >in > >order to build, or you can run myrbuild by hand. I've provided a script > >that > >does the latter. > > > >Almost all Plan 9 system calls are directly supported in libsys. > >As with Linux/Unix, only amd64 targets are supported at the moment. > > > >To bootstrap the code on Plan 9, the following script is provided: > > > > http://eigenstate.org/myrddin/getmyr.rc > > > >You can grab the script and run it as follows: > > > > ; hget http://eigenstate.org/myrddin/getmyr.rc > getmyr.rc > > ; chmod +x getmyr.rc > > ; getmyr.rc > > ...a lot of cloning and building happens... > > ; sam helloworld.myr > > > >For ease of hacking on Plan 9, I've added mercurial mirrors of the > >compiler and some libraries to bitbucket: > > > > http://bitbucket.com/oridb/mc > > http://bitbucket.com/oridb/libbio > > http://bitbucket.com/oridb/libregex > > http://bitbucket.com/oridb/libcryptohash > > http://bitbucket.com/oridb/libdate > > http://bitbucket.com/oridb/mbld > > > >There are a number of TODOs, of course: > > > > - Libdate needs to learn how to parse Plan 9 timezone files. > > - Libstd needs to get a smarter allocator for large allocations. > > - More libraries: lib9p, libdraw, etc... all need to be written. > > - A bit more thought needs to be given nicer, portable APIs. > > - More Plan 9 integration. > > > >And general work to get Myrddin to the point of day to day usability, > >int terms of faster binaries, more libraries, and so on. > > > >Still, if anyone finds this interesting/useful -- have at it. If you > >manage to do something neat, let me know! > > > >-- > >Ori Bernstein > > -- > Sent from my Android phone with K-9 Mail. Please excuse my brevity. > Check out my website: http://kirbyfan64.github.io/ -- Ori Bernstein