44 points · by lg · 17y ago · 43 comments
http://mythryl.org/book153.html
And for the code examples:
http://mythryl.org/book117.html
It looks like they've put a familiar, scriptish, face on an old gladiator. SML/NJ has more academic street cred than any other compiler that I know of. It did for the compiler research of FPLs what the Fortran H compiler did for procedural languages on pipelined architectures. It has been hacked on by the who's who of compiler research groups; Princeton, Stanford, UT Austin, etc. (thank god CMU had better things to do, staying a Lisp shop ;-)
P.S. Dr. Norman Ramsey, I know you read Reddit but I am not sure if you come here; old man, you turned me to FPLs in 1998 with your original "hacker challenge" :-) I stumbled upon your site looking for blackhat "hacking" materials and ended up writing a linker a month later because I stayed and read your papers.
Mythryl handles (as part of language defn) printf format strings => type safe library call (I think Ocaml did this too).
The only thing I found that seemed substantial (more than syntax) was explicit support for an eval facility (also in SML/NJ, but not officially) -
eval: String -> Void;
evali: String -> Int;
evalf: String -> Float;
evals: String -> String;
evalli: String -> List( Int );
evallf: String -> List( Float );
evalls: String -> List( String );
But only for those result types (!)Syntax difference table: http://mythryl.org/book135.html
I definitely prefer mythryl's syntax on the whole, to SML's.
This reads like programmers' dialect of a marketing speak. It's bold, flashy, presumably based on some facts that are not immediately obvious and it also trashes competitors along the way :)
Ruby: lots of nice things, but err on the "bag of features"
side.
Lisp: syntax stripped of almost all sugar. Stripped down to the
basics. Scheme is the Ariel Atom of programming
languages.
Smalltalk: add just enough syntax sugar to lose some power of
Lisp, but retain enough to be a complete meta-language.
(Not enough syntax to please most of the non CS crowd.)
I interpret "not just a bag of features" as another way to say that there are unifying design concepts, as there are in Smalltalk and Lisp.I wouldn't call Python clever, per se. I'd call it sensible. Possibly conservative. Maybe hoity toity.
Furthermore, they talk about things being built in from the start, but the site says that one of the current projects is implementing object oriented programming. How in the world is that not going to be bolted on? If there's anything that you need to bake into a language (if it's going to have them) it's objects.
Finally, there is a lot of talk on that page to not have any sense of organization or "here is some cool stuff you can do now that you couldn't before."
Usually I'm excited to read about new languages. (Potion looks AWESOME.) This... was disappointing. Sure, it may perform well, but I really don't care. I'd rather ease of programming and maintenance any day. Python and Ruby for the win (at least until Potion is done).
Also, they say they're putting the "fun" in "hacking", but as mentioned before, the page looks like it was written for managers and certainly not for hackers.
end
end
end
end
But I don't think the syntax is bad. In fact, "fi" and "esac" give some hints to the reader in deeply nested structures (I can hear it already: then don't deeply nest)The two line = { is only for compound functions; a single expression with a "where" seems fine. I do agree that code layout conventions that reduce the usable vertical space are questionable; scrolling sucks.
I didn't especially like SML (or Ocaml) syntax, but they're both solid languages.
http://www.smlnj.org/dist/working/index.html seems to contradict the story by Mythryl's author that SML/NJ isn't maintained. His fork doesn't seem to do 64-bit, while SML/NJ does.
I'd be interested in hearing more about the reason this project is not just a set of libraries for SML/NJ. I guess the author has strong opinions about syntax and didn't like ML's.
The problem with having a built-in object system is that you're stuck with it. People mean very, very different things by OOP, and being able to add an OO system when it's useful is probably a better approach. Using OO without "bolting it on" works well for the Lisp family and for Lua. (Adding a prototype-based, class-based, or message-passing object system with via metatables is quite easy.) You just need to have a sufficiently flexible core language.
Of course, doing it in a fully static-typing-safe manner is tricky, but since OO is arguably defined by late binding, that's naturally works against pinning as much as possible down at compile time. (Lisp and Lua are just dynamic and don't worry about it.)
Robin Milner started working on ML around 1973-1974. Finished by 1978. So it's a 6 year leap at best.
It sounds cool, but bootstrapping elsewhere would probably be a huge pain. (I port stuff, and generally work on 64-bit AMD OpenBSD.)
Too bad, really - I would love to see a more "mainstream" dialect of ML than OCaml.
F# gets the full backing of the world's biggest software vendor in VS 2010...
2. Haskell seems to be getting most of the attention in that niche. (This is arguably the biggest factor.) Its community is somewhat small, and it doesn't have the general presence, marketing, word-of-mouth, etc. that Haskell does, and it had years and years to do so.
3. There are lots of cases in the OCaml implementation where they could have made it much, much more friendly to people trying to learn its typing, but didn't. ("Error: This expression has type t but is here used with type t" is baffling.) The exception system has a lot of rough edges, too - Debugging a program throwing the exception of "Not_found" without any context provided is rather irritating.
4. It cuts more than a few usability corners for sake of pure speed. Some people consider this a feature, but I don't like it as a default.
5. Its support for concurrency is not great (though this may have gotten better lately).
OCaml is one of my favorite languages, but there are a lot of ways it could be made nicer. While I don't use the .NET languages, it's at least reassuring to see that other languages are using the good ideas from the ML family.
I agree that the docs + stdlib aren't great.
But the performance is very good, and the type checker is awesome. I like it (in my experience on toy problems).
You mentioned performance vs. usability - Not_found is vague for a reason; it's the way you find out if a key is in a hashtable (no null or Maybe return). Exceptions without payload are apparently very efficient in Ocaml; they're used often in "non-exceptional" cases in the library.
No! This is a regression into darkness! Unit should stay unit!
According to type theorists: Unit is the data type inhabited with exactly one value (the zero-tuple). That's why it's called "unit". Void is the data type not inhabited with any values. Therefore, a function that typechecks to return type Void never terminates, because there is no value it could return. (The use of "void" in mainstream programming languages corresponds to "unit" in academic settings).
Also, if our notion of "function" is an expression with exactly one argument and one return value (like in lambda calculus), then tuples come in handy as function arguments. Especially the zero-tuple, for functions with side effects that need no input data. Like...
exit ()
And that syntax is quite familiar. I understand Mythryl still uses this syntax... but don't conflate void and unit.It's a shame that it's only available on Linux. Anyone tried to get it running on OS X?
I love statically typed functional languages with type inferencing. But look forward a few years. Hasn't F# definitively won, except for people who prefer Java libraries (Scala), and people who like lazy computation and/or extreme purity (Haskell)?
Yes, F# performance in Mono is bad right now. But there's no reason the language itself can't be implemented (perhaps as a skin on top of the Ocaml code base - or does the license not permit it?)
The size of a language community does matter. It's not "most popular 1-3 in each niche live, others die" but "15 years from now, will it still exist, or will the 1-3 hardcore hackers have moved on?"
I'm a bit put off by the way the documentation repeatedly says "continuation" where it means "closure".
Man ... how do I get a job like that?! I really want that job!
(Actually I'm not sure Slashdot was the first, though I was aware of "slashdotting" as a verb more than 10 years ago. Anyone know of predating claim to "the effect" by another site?")
http://www.reddit.com/r/programming/comments/906yc/mythryl_p...
I'm not sure what your post added to the discussion, but his alerted other people that the problem wasn't on their side, and it also stated that there was a discussion on reddit.