
The Wyvern Programming Language - luu
http://www.cs.cmu.edu/~aldrich/wyvern/
======
carbocation
> 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.

~~~
seanmcdirmid
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.

------
muhuk
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.)

~~~
mzl
There is some code in the examples directory on GitHub.
[https://github.com/wyvernlang/wyvern/tree/master/examples](https://github.com/wyvernlang/wyvern/tree/master/examples)

~~~
riffraff
there are some, but see for example

[https://github.com/wyvernlang/wyvern/blob/master/examples/bo...](https://github.com/wyvernlang/wyvern/blob/master/examples/boxes-v1.wyv)

Is that a statically checked DSL? Is it part of the base language? If it's a
DSL, where is it defined?

(not a critic to parent's post, just saying it in case someone involved in the
project steps here)

------
bedane
"The Wyvern project is supported by the National Security Agency lablet at
Carnegie Mellon University. "

This is gonna end well.

~~~
dmux
Non-starter.

------
chrismorgan
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...](https://thestrangeloop.com/sessions/fast-secure-safe-the-web-that-can-
still-be)), and a brief look at this suggests that I’ll be mentioning Wyvern.

~~~
dom96
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](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.

~~~
chrismorgan
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.

~~~
dom96
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.

------
jdmichal
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?

~~~
seanmcdirmid
The usual solution is to use "def"

~~~
anon4
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.

~~~
Flow
What dirty associations can you make out of "proc" or even "procedure"?

~~~
dagw
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.

------
virtualwhys
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](https://github.com/wyvernlang/tslwyvern)

------
BruceIV
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.

------
Vektorweg
Oh its OOP, i'm outta here.

~~~
cyrus_
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!

~~~
Vektorweg
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.

