Eigenstate : Wishlist

Wishlist: Compiler

Better match statements:

At the moment, we generate a long chain of if statements. This is slow, inefficient, and ugly. We also generate too many copies.


More Platforms:

Pretty much self explanatory. More code gen backends, more supported OSes, etc.

Self hosting:

Right now 6m is written in C. This should change. Currently being slowly worked on.

Better C ABI Compat:

Right now, we have our own ABI for function calls. It's compatible for word sized arguments and large structs, but for small structs, it would be nice to also be compatible.

We also are not currently compatible with Plan 9 C.

Packed Structs

At the moment they're not supported. It's an open question to whether they should be, but it might be necessary for C compatibility.

C Binding Autogeneration

Finishing C Binding Autogeneration. There's a good part of it done, but we should be able to generate references to other packages when binding, so that, eg, a libc package doesn't have a distinct libc.size_t from a foo package which includes a header that defines size_t.

Right now we generate all symbols in the closure of includes into one package.


At the moment, we basically don't do them. This should be fixed. This will probably be worked on as/after self hosting is completed.


Better error handling:

What will this look like? Needs thought.

Better safety:

What will this look like? Needs thought.

Thread local storage:

This goes hand in hand with threads. It's also a bit OS specific.


Debug support:

Right now, we can debug on the asm level, looking at comments. Adding line information support is trivial, but actually harmful to debugging. Proper DWARF information (or stabs on plan9) would be helpful here.



Using different assemblers on different platforms suck. 6m should use our own assembler, maybe even linked in as a library. This assembler should probably be the one actually writing out the debug info from above, as well as being able to generate usefiles. Eg:

.func foo.bar : type { ...asm... }

Or something. I haven't put enough thought into the details yet.


Wishlist: Libraries

Improved libstd:

There are a large number of deficiencies and gaps in the standard library:


Floating point is hard. Let's code it. A reasonably complete floating point math library should be available as 'use math'.


Normalization, canonicalization, collation, and all that good stuff. This is going to be big/complicated, and probably shouldn't go into libstd.


Fleshing out libthread:

Libthread has landed, but it's not very useful right now. More features should probably go in.



A cryptography library. This should have reusable interfaces to a bunch of crypto primitives. Currently, libcryptohash exists; this should continue building on that work.



Built on libcrypto, we should have an SSL library that can be used for a variety of things. I've started on it, and then run out of time.



Yep. HTTP library. HTTP is everywhere, might as well support it. HTTP2 is probably also desirable.


Restructured Text(?):

I'd like decent documentation generators. Restructured text looks sane. I'd like to be able to manipulate it from code.


Whatever else:

Librarires are useful. If it's generally useful enough, and I'm satisfied with the stability and code quality, I'll toss it in with everything else in mc/.

If not, I'll link to it.

Wishlist: Utilities

Documentation generator:

This should probably be built on a slightly extended restructured text implementation, although GFM is also probably not a bad idea.


There's a lot of potential for caching the dependency graph, and making builds lightning fast and parallel.

Parser generator:

Working on something that works like a merged lex/yacc.

IDL Generator:

Protobufs are nice. Thrift is also ok.

Package fetcher:

Should probably wait until packages are a thing; Will fetch, install, build, packages that a bit of software depends on. Probably should be part of mbld.

Static analyzer:

Pie in the sky project -- statically catching mistakes is probably a good idea.