Follow Slashdot blog updates by subscribing to our blog RSS feed


Forgot your password?

New NSA-Funded Code Rolls All Programming Languages Into One 306

An anonymous reader writes "What's your favorite programming language? Is it CSS? Is it JavaScript? Is it PHP, HTML5, or something else? Why choose? A new programming language developed by researchers at Carnegie Mellon University is all of those and more — one of the world's first "polyglot" programming languages. Sound cool? It is, except its development is partially funded by the National Security Agency, so let's look at it with a skeptical eye. It's called Wyvern — named after a mythical dragon-like thing that only has two legs instead of four — and it's supposed to help programmers design apps and websites without having to rely on a whole bunch of different stylesheets and different amalgamations spread across different files.
This discussion has been archived. No new comments can be posted.

New NSA-Funded Code Rolls All Programming Languages Into One

Comments Filter:
  • Wyvern = Wyrm (Score:3, Interesting)

    by Anonymous Coward on Sunday August 10, 2014 @06:55PM (#47643981)

    Why? What's the worst that could happen? What's the best?

    Why is the NSA interested in something like that directly? What is the potential for abuse?

    Is it to make code analysis that much more centralized and (supposedly) simple?

    Why didn't this come up with itself before now?

    • The standard NSA tatctic for introducing security holes into a system is to obfuscate things so that holes are hard to spot and find. SELinux is probably such a system, and this polglot language -- which effectviely makes debugging impossible -- is likely another.

    • New filesystems and databases might show up as less people trust the same old tame providers that decrypt for the US gov as installed.
      But the good news for the USA is the data will still have connect with say international billing and other US set global standards.
      Thats where a system like this might be fun. You dont have to care what the backend was, just what is sent as known, expected, decrypted data.
      Pulling useful data from new bespoke communications streams will be like setting the old standards.
    • Re:Wyvern = Wyrm (Score:5, Insightful)

      by Bite The Pillow ( 3087109 ) on Sunday August 10, 2014 @11:24PM (#47644899)


      To write applications in one language, instead of HTML, CSS, JavaScript, SQL, and something else. Not including multiple levels of configuration files (website and web server at least).

      What's the worst that could happen?

      The NSA could insert backdoors which, unless they were incomprehensible crypto, would be easily found by both white and black hat investigators. Also, Carnegie Mellon University, which has a pile of research announcements every year, has its entire research department under suspicion of colluding with an oppressive government agency and spends decades regaining international status as someone you can do anything other than make the punchline of a joke.

      CMU losing status is, to CMU, absolutely an intolerable option. I'm not saying it won't just because of the potential impact, but you asked what is the worst that could happen. Backdoors, and a respected university bursts into flames and is disregarded for decades internationally. That's bad.

      What's the best?

      Fewer bugs.

      Why is the NSA interested in something like that directly?

      Because despite recent bad press, they are interested in security. If we can write stuff with fewer bugs, we are more secure. Maybe there are still plenty of bugs in the hardware/OS that they know about, but fewer bugs in the application level, which means the foreigners don't know about them because they don't exist.

      What is the potential for abuse?

      Pretty small. White hats will vet the libraries, black hats will try to penetrate it, and it's no more or less secure than anything else a human has written. But people can make mistakes in fewer languages. And they aren't replacing languages, from the sound of it.

      Is it to make code analysis that much more centralized and (supposedly) simple?

      I suppose you could read the article.

      Why didn't this come up with itself before now?

      Why didn't the airplane come up before it did? Are you insinuating something? Do you know something we don't know? Did someone mod you up for any particular reason, or just because you spewed thoughtless rhetorical questions?

      • Re:Wyvern = Wyrm (Score:5, Insightful)

        by Anonymous Coward on Monday August 11, 2014 @03:11AM (#47645373)

        backdoors [...] would be easily found by both white and black hat investigators.

        That's about the same as stating it is as simple to find a needle in a haystack as to put one in.

        We already have issues finding normal bugs. We have seen flaws in kernels and encryption libraries that might have well been a typo, yet were in for years.

      • by jythie ( 914043 )
        If nothing else, people need to remember that the NSA is a big organization with lots of departments in it with different sets of priorities.

        As for why someone did not come up with it before, I have not looked lately, but old versions of GCC could compile together half a dozen languages into a single binary and I worked on a team that split up the project into multiple languages using the feature.
      • Because despite recent bad press, they are interested in security.

        Your post makes various other points that sound reasonable to me, but I have to call out the above line from a couple of angles:

        1) using the phrase "bad press" implies a virtuous subject that has been distorted by a reporting industry with a non-virtuous agenda. NOTHING OF THE SORT has happened to poor lil' NSA here... they FUCKED us, straight up, and got caught red-handed.

        2) Whatever the extent to which the NSA is "interested in sec

    • by TheMCP ( 121589 )

      It *has* been done before. I worked on it years ago. One of my colleagues came up with it in 1999. []

      It was brilliant to work in, but it didn't catch on.

    • Re: Wyvern = Wyrm (Score:2, Interesting)

      by Anonymous Coward

      Not impressed. The OP obviously doesn't understand a thing about programming languages in general, or programming as an activity in particcular. Or he would know that the use of multiple files, and multiple languages, is a means to an end, not a nuisance. Namely to manage complexity, and to use the most appropriate level of abstraction to solve a particular problem. If he'd know he would not claim that wyvern is a polyglot language, but that it is a meta language to create internal DSLs, domain specific lan

    • Why didn't this come up with itself before now?

      Jack of all trades, master of none.

  • by Taco Cowboy ( 5327 ) on Sunday August 10, 2014 @06:58PM (#47643987) Journal

    I arrived at America pretty late - at the 60's - but at least at that time America had several institutions doing all kinds of wonderful basic research

    Bell Labs
    Xerox's famous lab at Palo Alto
    The Skunkworks

    And at that time Darpa funded a lot of basic research as well

    Today, all gone

    Even Darpa's funding are not aiming at basic research - such as what TFA has outlined - what they are doing at Carnegie Mellon is actually an applied research ... taking what has been known and add another layer onto it

    What's happening in America nowadays is very worrying

    • by 50000BTU_barbecue ( 588132 ) on Sunday August 10, 2014 @08:00PM (#47644289) Journal

      Of course, a lot of research was done by the private labs of corporations back then, like IBM, RCA, etc.. Engineering was a respected profession, you needed real talent to become an engineer or programmer and you could earn a good living that way in the West.

      Then one day some bright psychopath realized it would be cheaper if universities did the research with government money instead.

      Then you get the research done, your future employees come already in debt, and then they work for peanuts paying back their student loans.

      So companies used to pay YOU to do research, now YOU pay to go to university and the companies get to keep the IP!

      And social engineering and manipulation means that people will WILLINGLY do so!


    • by khallow ( 566160 )

      Today, all gone

      Yet at the same time, the US spends considerably more on research than it did then. I think here the explanation is that public funding crowded out private for basic research.

      It makes little sense to fund your own research in the cases where some government would fund it for you. Similarly, if you're a researcher, public funding is high quality and less demanding than private funding. Sure, you have to fill out a ton of paperwork. But they don't have the anything like the expectations th

  • by lsllll ( 830002 ) on Sunday August 10, 2014 @06:58PM (#47643989)
    I looked up images of Wyvern on Google images. Don't think it's a good choice. Reminds me of the NSA's overreach over our lives. I think they should have named it Pussy Cat.
  • Shit summary (Score:5, Insightful)

    by Anonymous Coward on Sunday August 10, 2014 @07:01PM (#47643999)

    CSS and HTML5 are not programming languages. You don't "choose" html5 over, say, php.
    (And don't fucking say HTML5 + CSS3 is turing complete)

    • Re:Shit summary (Score:5, Insightful)

      by Bing Tsher E ( 943915 ) on Sunday August 10, 2014 @07:51PM (#47644265) Journal

      I didn't see any programming languages in the list on the summary. Just a bunch of web shit.

    • by binarylarry ( 1338699 ) on Sunday August 10, 2014 @09:57PM (#47644677)

      Yeah and can you imagine the horrific shit sandwich that would be a combination of CSS, HTML5, PHP and JavaScript?

      666 Mark of the Techno Beast. It's like some shit Ghostbusters 2099 would be tasked with stopping.

    • stupid argument (Score:2, Insightful)

      CSS & HTML5 ***are*** code languages for programming machine behavior

      *at the presentation level*

      it's not an "original gangster" hardcore badass super 1337 C#+!'s not complex or "bragable" at a gathering of dorks trying to impress each other...

      but it's symbols that form a code that humans use to 'program' machine behavior...that's a programming language

      just accept it, once and for all, and stop all of you....just stop

      it doesnt make your skillz any less's a coding

      • Re: (Score:2, Informative)

        by nabsltd ( 1313397 )

        CSS & HTML5 ***are*** code languages for programming machine behavior

        CSS & HTML5 are data that is interpreted by a computer program. They are not "code languages". The rule of thumb is that without some sort of control structure (if/then/else, loops, etc.), it's just data.

        For HTML, this becomes obvious once you see how many real languages (JavaScript, PHP, ColdFusion, VisualBasic/ASP, etc.) have been created to overcome its lack of control structures.

        • you can't redefine "coding" by calling everything "data"

          it's instructions for a machine...that's coding...

          you're playing linguistic games & no matter how you do it you're still wrong functionally

      • But PRESENTATION (how something looks) and BEHAVIOUR (how something acts) are two different things.

        Saying "programming machine behaviour... at the presentation level" is a nonsensical statement. HTML/CSS define content & presentation. They do not "program behaviour".

        Or as Wiki puts it [], "The purpose of programming is to find a sequence of instructions that will automate performing a specific task or solve a given problem". HTML & CSS simply do not qualify. They are certainly computer languages, b

        • presentation is fact, if all you have is a monitor **all behavior is presentation**

          if use HTML5 to tell a computer to display a black background when you go to a URL

          OR i could do the same to ****PROGRAM**** the computer to display a white background when you go to a URL

          either way, user enters data (URL in browser) and computer returns a ***PROGRAMMED*** response

          programmed using HTML5 so that the browser knows it's the *background* that is to be black, not another part

          that's programming no matt

  • CSS? (Score:5, Funny)

    by Anonymous Coward on Sunday August 10, 2014 @07:01PM (#47644001)

    "What's your favorite programming language? Is it CSS?"

    Why yes, I just love writing VoIP systems in CSS.

    • Every time I see the wish to create yet another, newer, better way to program a computer, instead of the oldschool assembler, C, Basic and Pascal methods, it keeps reminding me to ask people to let's come up with a better way to represent numbers. As in Roman numerals like MCMLXXXIV truly suck compared to Hindu (called Arabic) 1984 numerals, but we shouldn't leave it at that, there's gotta be something better than that Hindu representation. But the reality is that we'd be like a dog chasing it's tail with a

  • Compiler virus (Score:5, Interesting)

    by penguinoid ( 724646 ) on Sunday August 10, 2014 @07:02PM (#47644009) Homepage Journal

    Wasn't there some discussion on how effective a special, compiler-embedded virus would be? This seems like a good candidate for that.

  • Yes! Finally, a programming language and development system from a serious organization we can all trust to help us produce secure applications! I am so happy I'm doing the little Snoopy Dog House Dance! Oh-Joy! More Exclamation Points Please!!!

  • by Anonymous Coward on Sunday August 10, 2014 @07:05PM (#47644027)
    You have n programming languages. You think "That's to many, let's invent a programming language that combines all of them!", and then do so. You now have n+1 programming languages...
    • Apologies to you, AC, for hijacking your highly upvoted comment.

      We appear to have something rather serious at work here. A registered user (jelIomizer, the second 'L' is actually an 'i' character or some Unicode variant) posted over 28 posts (all MyCleanPC spam) in under 6 minutes on this article--something neither you or I can do. This smacks of a slashcode bug or admin collusion.

      For reference []...

      Oh yeah, hello to all the friendly NSA propaganda operatives out there. Go fuck yourself.

  • by Anonymous Coward on Sunday August 10, 2014 @07:10PM (#47644067)

    As you'd expect from CMU, the papers themselves are pretty interesting. Just read the abstracts instead of trying to guess from the summary or vice article, which are both way off the mark.

  • At the NSA they KNOW a bigger haystack is a better haystack, so why not extend that idea to a programming language.

    By understanding all the languages you get the strengths of all the languages and none of the weaknesses, programmers can just ignore the weaknesses then they arent there,

    Why should programmers have to put up with those pesky syntax errors when you can just make the language accept any (stupid) command.

    Forward to the future !

  • why- just why? (Score:4, Insightful)

    by sumdumass ( 711423 ) on Sunday August 10, 2014 @07:14PM (#47644103) Journal

    Why in the hell would you need to look at something with a skeptical eye just because money came from a certain source? Is the reputation of carnegie mellon suspect or something? And if so, shouldn't that in and of itself be the reason of suspect?

    The submiter is a shallow person suffering from guilt by association which is never a valid premise. I mean i know skin heads who donate to planned patrenthood specifically because they have all their abortion clinics in areas with high minority populations and keep the minority populations in check. Does that mean we have to look at them wiyh a skeptical eye too? Of course not- or at least npt because a source of their funding has issues most of us find repulsive.

    The merrits of this will rest on its own. There is absolutely no reason to put the integrity of the development into question simply because the NSA gave funding.

    • Re:why- just why? (Score:5, Insightful)

      by Spinalcold ( 955025 ) on Sunday August 10, 2014 @08:05PM (#47644309)
      You should always look at the funding path. It tells you a lot about the quality of research. In the past 60 years funding towards 'think tanks' has gone into making bad science to combat good science research, all in an effort to move political goals. I'm not saying this particular research is bad, however it is good to know some of the funding came from the NSA.
      • No.. you are just as likely to overlook good research and settle for bad research when the source of funds is a primary role in how you accept it.

        The research and or science will stand on its own merrits. Well, that is if science is the goal and not politics. In this case, a university of good repute just had its integrity challenged by nothing more than idiots on parade trying to turn something political. There is no justification for it. Just mentioning the funding sources is one thing, but they actually

    • Re: (Score:2, Insightful)

      by TubeSteak ( 669689 )

      There is absolutely no reason to put the integrity of the development into question simply because the NSA gave funding.

      Uh yes, there is.

      As a key part of a campaign to embed encryption software that it could crack into widely used computer products, the U.S. National Security Agency arranged a secret $10 million contract with RSA, one of the most influential firms in the computer security industry, Reuters has learned.

      How much longer are you willing to be a battered spouse, making excuses for your abuser?

  • by Animats ( 122034 ) on Sunday August 10, 2014 @07:16PM (#47644121) Homepage

    No, it doesn't "roll all languages into one". It just allows embedding of the text of another language, such as HTML, into a Wyvern program. Variables can be substituted. Like this:

    let webpage : HTML = <html><body><h1>Results for {keyword}</h1
    <ul id="results">{to_list_items(query(db,
    SELECT title, snippet FROM products WHERE {keyword} in title))}

    (except that the last 3 lines above should be indented, because this language uses Python-style block notation.)

    Of course, everybody does that now, but the way they do it, especially in PHP, tends to lead to problems such as SQL injection attacks. The idea here is that Wyvern has modules for the inserted text which understand what kinds of quoting or escaping are required for the embedded language text.

    I just glanced at the paper, but that seems to be the big new feature.

    • That problem would not exist if people new how to use a database.

    • Re: (Score:2, Informative)

      by Anonymous Coward

      It's not just about quoting or escaping. It actually builds an AST for each TSL expression (for example, an HTML expression), so they can tell if the expression is valid and how to combine the Wyvern expression with the TSL expression containing it. It looks like brain-dead string concatenation, which reduces clutter and improves readability, but it gives you all the benefits of using the type system.

    • yeah, and the Java experience is that embedding code with html isn't a great idea. That's why JSP is on the way out and JSF on the way in.

  • "Wyvern is like a skilled international negotiator who can smoothly switch between languages to get a whole team of people to work together," Aldrich said. "Such a person can be extremely effective and, likewise, I think our new approach can have a big impact on building software systems."

    Yeah, about as skilled and effective as past Israeli-Palestinian negotiators...

  • by tommeke100 ( 755660 ) on Sunday August 10, 2014 @07:20PM (#47644153)
    To write better Apps and Websites?
    Are these what the kids call programming languages these days?
    It doesn't sound very serious.
    • > Are these what the kids call programming languages these days?

      Yup. A lot of 'programmers' don't even know non-web languages exist. I wish I was kidding. And a lot of employers don't know either. The whole thing is just really sad.

    • by houghi ( 78078 )

      To write better Apps and Websites?
      Are these what the kids call programming languages these days?
      It doesn't sound very serious.

      It is all the NSA needs to get access to your Internet Connected device. That means everything nowadays, including my Linux toaster.

      Yes, I am very sceptical if I see the letters N, S and A. (It isn't paranoia, because that is only when you THINK you are being followed, not when it becomes a fact.)

  • by Anonymous Coward

    CSS: not a programming language.
    HTML: not a programming language.
    PHP: not a programming language.

    Note: I'm a web developer mostly these days, I write a bucket of each of these. I'm a computer science educated professional and I also write a lot of code in Java and C++. I really like PHP. It is however not a bloody programming language, it's a scripting language.

    • by pspahn ( 1175617 )

      So in order to be a programming language it has to be compiled instead of interpreted?

      Where does compiled PHP fit into your world view?

    • by gweihir ( 88907 )

      Well, PHP is a programming language, just not really a general-purpose one.

      Anyways, web-stuff is a small part of programming, and not really an important one as it is pretty limited.

    • by Capsaicin ( 412918 ) * on Sunday August 10, 2014 @09:31PM (#47644603)

      I really like PHP. It is however not a bloody programming language, it's a scripting language.

      I really hate PHP, but what I hate even more is being confronted with this mysterious distinction between "scripting" and "programming" languages.

      A language might be strongly or weakly, dynamically or statically typed. A particular implementation might employ a compiler, a virtual machine or interpreter. These are meaningful distinctions. But what (with the possible exception of a hardware specific control language) does it even mean for a language (as distinct from its implementation) to be a "scripting" language?

      Would PHP cease to be a scripting language if an object code compiler were available for it? Is 'C' a "scripting language" just because it's interpreted []? And what about a language which has never actually been implemented, what in the language specification determines unequivocally if that language is 'scripting' or a a 'programming' language?

      • The distinction is determined solely by the prejudices of whomever is bothering to make it. Scripting is a domain in which a programming language is used, not some basic attribute of it. You could use C to write your system automation tools, but it would be a waste of time when a simple Bash script would get the job done quicker and in a far more concise manner. Likewise, you could write your virtualization software in Ruby but its going to be dog slow, and probably full of weird hacks to make shit work.

      • Agreed. Assembly is just a scripting language for microprocessors. C is just a scripting language for the compiler back-end. The OP did a terrible job of making his case.

    • [quote]
      CSS: not a programming language.
      HTML: not a programming language.

      CSS and HTML are such devious piles of junk, they should be turing complete by now.

  • Which behaviour? (Score:5, Interesting)

    by NotInHere ( 3654617 ) on Sunday August 10, 2014 @07:24PM (#47644167)
    This program is valid C and, when saved as "", valid java code. Compilation with the C compiler results in a program that doesn't behave the same way if it were compiled with java:

    #include "stdio.h"
    public class test2 {

    public static
    void main //\
    (int argc, char *argv[])//*/
      System.out.printf("hi, I'm java\n");/*
      printf("hi, I'm C\n");//*/

    • by fisted ( 2295862 )

      void main(int argc, char *argv[])

      valid C

      Nope. Not valid C. Valid would be int main(void), int main(int argc, char **argv)(and equivalent), and in some cases int main(int argc, char **argv, char **envp) (and equivalent).
      Source []

      • by gweihir ( 88907 )

        Depends on the standard. Even "main()" can be valid.

        • by fisted ( 2295862 )

          Depends on the standard.

          No. None of the C Standards ever had void a valid return type for main, and, frankly all of them (since we're talking standards, that means C89 through C11) give you int main(void) and int main(int argc, char **argv)(and equivalent).
          It's not like i didn't link a source.

          Even "main()" can be valid.

          Yes, C89 allowed leaving away the int, that's called "implicit int". Needless to point out, the return type is still int.

          • by gweihir ( 88907 )

            "main()" does not have void as return type, it has "no return type specified". You are also not going back far enough if C89 is the first thing you look at and you are constraining your search too much if you require an "IOS" Standard. There are others around, even if bodies like ISO would probably say they are not standards. Not so.

            • by fisted ( 2295862 )
              You talked about standards, and C89 is the first formal C standard. I'm sorry for your C knowledge if you are indeed oblivious of implicit int (hint: you can and must still return an int from "main([void])".
              Furthermore probably sucks to think that a function taking no parameters like foo(void) and a function taking an unspecified number of parameters like foo() and (void) were the same thing. Your mind might be a bit C++-damaged (in C++, foo() in fact means foo(void)).
              Educate much?
              Consider char (*foo(int)
  • And we know how well that worked the last time.
    • by erice ( 13380 )

      And we know how well that worked the last time.

      Nah. They've re-invented Ada.

      Ada is when they re-invented PL/1.

      Hmm. What comes after strike 2?

    • by HiThere ( 15173 )

      Sorry, but PL/1 was a decent language with atrocious subsets at rediculous prices. The compiler was also large and slow. And I had some problems with it's "intelligent type conversion"s. But you've got to remember what other languages were around at the time. It hadn't learned Object Oriented programming. Etc. But it made safe use of pointers rather easy. I wrote my first Red-Black tree in PL/1 and it was a lot easier both to do and to understand than the one I did later in C.

      OTOH, I must admit that

  • I really don't understand this. Almost every site I go to does the same damn crap with Javascript and all of it could be done with other technologies.

  • by Henriok ( 6762 ) on Sunday August 10, 2014 @08:02PM (#47644297)
    May I point out that the LLVM logo is a wyvern? []
  • It's supposed to help the NSA, and to hurt you in the end.

  • by raymorris ( 2726007 ) on Sunday August 10, 2014 @08:32PM (#47644399) Journal

    It doesn't do what the summary says.

    If it did, that would take care of half of my bugs. Within a 30-minute period, I might well work in PHP, Perl, ActionScript, JavaScript, and some other language. A large portion of my errors are things like using empty() in JavaScript. Especially, ActionScript is almost the same as JavaScript, and a lot of Perl is also valid PHP, so when switching between these it's easy to absent-mindedly tap out a line in the wrong language.

    Once upon a time, I used vim syntax highlighting, which doesn't typically catch using the right syntax, but the wrong function name, but does make missed braces and such obvious. Maybe I should right a vim plugin for "wrong language, dummy." It would look for echo (phph vs print (Perl), etc.

    • This reminds me of ls.bat and various other little .bat files people put on DOS and Windows machines for obvious reasons.

  • by rossdee ( 243626 ) on Sunday August 10, 2014 @09:52PM (#47644653)

    Does it do APL ? Forth ? 6502 assembler?

  • by msobkow ( 48369 )

    They've re-invented PL/1!

  • by Karmashock ( 2415832 ) on Sunday August 10, 2014 @10:56PM (#47644817)

    The NSA's reputation has been annihilated. There are good people that work for such organizations. People that could and do benefit our society on a regular basis. Their institution was simply coopted by irresponsible people that sadly destroyed everything. Its a shame.

  • FTFY (Score:5, Funny)

    by QilessQi ( 2044624 ) on Sunday August 10, 2014 @11:06PM (#47644841)

    "Web applications today are written as a poorly-coordinated mishmash of artifacts written in different languages, file formats, and technologies.

    "...and here's another one!"

  • Jellomizer has multiple posts all dated with 7:12 PM. Now, as a Slashdot member over the years, with excellent karma, I can't even post that fast, regardless of what I'm posting. What allows Jellomizer, without the consent of the editors/admins, to post spam repeatedly, without any time delay?

  • I can tell you now, I'll never use it.
    Anthing based upon HTML or CSS is guaranteed to be a unmaintainable crap. Put them together, and you have the largest pile of shite ever !
  • Without having looked at the post or scrutinized the language, here's a couple of guesses:
    1) looks like C: i.e. verbose, vacuous, loopy.
    2) has crappy (i.e. industry-standard) array-handling.
    3) fails to incorporate any of the decades of research about how people approach problems versus how programming languages do.

Air is water with holes in it.