37 comments

[ 2.5 ms ] story [ 77.1 ms ] thread
> Wyvern is a new programming language designed to help developers be highly productive when writing high-assurance applications.

What is a "high-assurance application"? I accept that it's my own deficit for not knowing this, but I do think that the Wyvern authors should embrace my kind and tell us what this is (and why we should care). In 5 years, this may be obvious, and hopefully by that time I'll be embarrassed that I even asked.

I took this to mean code correctness and thus a measure of stability and security as added benefits. Generally assurance implies some level of confidence that the application will behave predictably even in the face of unpredictable inputs and will revert to sane defaults whenever possible.
I'm pretty sure that's just supposed to mean "applications that you really want to not have bugs in". Like code that will be dealing with large amounts of money, say. The web page is pretty light on details; I get the impression that Wyrven is something they're using more as a research platform at this point than as something for developers to actually use.
A "high-assurance application" is one that the NSA cares about, so will actually spend their money to fund a research project. Otherwise, it is awfully hard to get funding for PL research.

Edit: please read the website, this really is funded by the NSA.

I believe it is known as a buzzword
I don't know if OP is contributing to this project but FWIW having some code examples in the homepage would help with the adoption.

(I clicked to the GH page and there is no code in the readme there as well.)

(comment deleted)
There is some code in the examples directory on GitHub. https://github.com/wyvernlang/wyvern/tree/master/examples
(I work on Wyvern)

This is a research language at the moment, so our papers are the primary mode of communication about the language. There are several examples in those.

Fair enough. Thanks for the info.
(comment deleted)
Compile-time HTML parsing, &c.? Absolutely. This sort of thing is part of why I came to Rust; while it doesn’t make these sorts of things as easy as it looks like Wyvern does, it does make them readily possible (the pragmatic side of me also selected it as it’s ). I will be featuring some of the ideas of these sorts of things in my talk at Strange Loop next month (https://thestrangeloop.com/sessions/fast-secure-safe-the-web...), and a brief look at this suggests that I’ll be mentioning Wyvern.
If that is something that you are interested in then you should definitely take a look at Nimrod (if you haven't already; http://nimrod-lang.org). Nimrod's compile-time features are what makes it great, you can essentially run most Nimrod code at compile-time (ffi is limited but you can use staticRead if you wanna read your HTML templates). From a quick look at Wyvern it actually looks surprisingly similar to Nimrod, so much so that i wonder if Wyvern was perhaps a little bit inspired by it. I'm having a hard time figuring out what differentiates Wyvern from Nimrod in fact.
(I work on Wyvern) Nimrod is quite interesting to us too, though I don't know that it was at the forefront of our minds. Convergent evolution perhaps. I don't believe Nimrod supports type-specific languages or other sorts of extensible parsing (see first paper on the webpage).
Rust doesn’t have regular straightforward CTFE (though I’ll admit freely it’d be nice to have), but it does have compile-time procedural macros, so that I can write a simple macro which will take HTML tokens in some DSL or as a string and with the help of the html5ever crate (which can be loaded as a dependency of this compiler plugin as well as of the resulting binary), produce the final tree, or for that matter do anything else with it that I like.
Nimrod has that too and as far as I know it's a lot more straightforward to use in Nimrod than it is in Rust.
> (the pragmatic side of me also selected it as it’s )

I think you accidentally a word.

I'm also very interested in Rust. Still has a lot of rough edges, but it's the first new language I've seen in a long term that really feels ambitious. Ambitious as in raising the state of the art (memory-safety without GC is a big deal); ambitious as in aiming at big scary problems. The fact that your language can express quicksort or Fibonacci nicely isn't that interesting. The fact that you're planning to build a portable, performant, secure web browser in it tells me you're serious.

Oh yes. It selected it as it’s gaining popularity and looks to me likely to reach a critical mass for mainstream usage.

There have been plenty of great languages in which you can express things marvellously well, but for the most part they remain obscure. Although Rust is not the most powerful language around for some of the things I want to do, it’s sufficiently powerful and backing what already looks to be a winner means that the ideas will actually get used.

As much as it seems like a trivial complaint... Would it really have been so arduous to type "method" instead of "meth", especially when the latter is a thing that actually exists and has very negative connotations?
The usual solution is to use "def"
That sounds like "deaf" and has negative connotations, too. Same with "fun" (you're here to work, not goof off), "private" (you're not allowed to talk about genitalia at the workplace), "do" (a metaphor for sex, nsfw), "unix" (eunuchs), "bsd" (bondage, sadomasochism, domination), "curve" (whore in several languages), "fsck", "mount", "touch", "kill" (very negative connotations here)... and so on. I'm certain that nearly all one-syllable pronouncable words in English have some sort of "bad" meaning, but people are perfectly capable of keeping in mind what context they're used in, so we don't snicker each time we write "private int size;" in a class definition.
Funniest thing I've read in a while.
> I'm certain that nearly all one-syllable pronouncable words in English have some sort of "bad" meaning

Yes!

(Narrowly edging out 'this', because I don't want to do, uh, that.)

What dirty associations can you make out of "proc" or even "procedure"?
proc is basically the Greek proktos as in proctology as in anus. Now we have just made an association to anuses and proctology procedures and I'll let you take from here.
Sorry, I can't reference fsck without thinking of it as a combination of two words.
Yeah, we realized the "meth" connotations and followed this solution--but only after our first paper!
"The Wyvern project is supported by the National Security Agency lablet at Carnegie Mellon University. "

This is gonna end well.

Non-starter.
Oh its OOP, i'm outta here.
Our objects are actually much closer to functional records than to conventional objects. I'd recommend reading our most recent paper. Hold your knee jerkin' for another language!
I took a look at the papers and examples before i posted my troll comment.

Its nice that the syntax is simpler than in C-based languages, but its still OOP and you motivate people to think in OOP ways. I had some bad experiences with OOP. Most prominent is, that i spend more time with assorting functions and classes than with writing stuff and that i often lost view for the important implementation details. Your language is good for functional and OOP programming, but like Scala, its maybe not a good idea to give the developer a choice.

Interesting, JVM + Java 8 required and:

> Because Wyvern itself is an evolving language and we believe that the techniques herein are broadly applicable, we have implemented the abstract syntax, typechecking and elaboration rules precisely as specified in this paper, including the hygiene mechanism, in Scala as a stable resource.

Source code here [1]

[1] https://github.com/wyvernlang/tslwyvern

It strikes me that this ability to integrate arbitrary DSLs into a language in a typed fashion could be useful for a shell: if you aliased the built-ins to functions with parameters known to be globs, paths, filenames, regexes, etc. you might be able to add syntax highlighting or auto-completion or even just better error messages.