Slashdot videos: Now with more Slashdot!

View

Discuss

Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

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.

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.

To properly need to debug such a language, you would need to be aware of all of the possible rules, pitfalls, bugs, and race conditions of every language under its hood.

At a basic level, is your "if else" condition running on it's Java or C++ or C version? Does it catch exceptions? Where is data being handled in memory? Are buffer overruns possible in some of these languages?

No one human could possibly we simultaneously cognisant of all possible sources of error. Programs in such a language would be a secur

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.

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?

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.

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.

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

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 LabsXerox's famous lab at Palo AltoThe 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

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!

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

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.

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 [wikipedia.org], "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

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

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

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.

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.

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

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?

Except that one wonders *why* are they funding it. How will it make our communications less secure?

Off hand the only thing that comes to mind is that there would be fewer components of the browser that the NSA needed to compromise if all the languages used the same interpreter. Perhaps that's all there is. It's even possible that they didn't fund the project with a malign intent. That, however, is not the way I'd bet given their "improvements" of encryption methods.

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

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.

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

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.

That's a distinction without a difference. All "scripting languages" are programming languages, quibbling over whether the particular domain a language is used in makes it a "real" language or not is fodder for arrogant asses who need to make others seem smaller to boost their own pathetic egos.

Obviously, different languages have different strengths and weaknesses. You wouldn't write an OS kernel in JavaScript, and you wouldn't write system administration automation in C++. Sneering at the domain of one

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 [softintegration.com]? 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.

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.

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

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)

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.

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.

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.

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?

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.

What I really want to know is... how the fuck does a registered user post over 20+ posts in under 6 minutes without being filtered by the "you must wait X minutes" filter. This smacks of a slashcode exploit or editor collusion. I'm a registered user with Excellent karma, and I can't post anywhere NEAR that fast.

Jelly's comments suffer in quality when his Ritalin prescription is used up only half way through the month.

There's a comment threshold feature that effectively eliminates your ability to see low rated comments, which these ravings are rendered to with a quickness thanks to a rather decent moderation scheme.

Caveat: two or three of the smartest things I've ever read on here were, at least at one point, low threshold.

Allowing blatant spam to drown AC comments is likely the goal. Still not sure how Jellomizer posts over 20 (20+!!!) posts in under 6 minutes even IF they had excellent karma. This smacks of a slashcode bug or editor collusion. Normal users won't suffer because of the karma bonus, but affected users will include any ACs making relevant points. Allowing the spam to continue unabated will simply result in controversial viewpoints (held legitimately, posted AC to preserve reputation) being drowned out. For furt