Stories
Slash Boxes
Comments

SoylentNews is people

SoylentNews is powered by your submissions, so send in your scoop. Only 17 submissions in the queue.
posted by LaminatorX on Monday August 11 2014, @03:27PM   Printer-friendly
from the this.way.lies(["Madness",Libraries"]) dept.

Most programming languages come with built in support for handling common data types, however using and manipulating user-defined data types has to be done via general purpose syntax. This often leads to using Strings rather than structured data. Computer scientists have designed a safe way to use multiple programming languages within the same program, which will allow programmers to use the language most suitable for each function while also guarding against code injection. Their language, called Wyvern, is available as an Open Source Project.

The full paper is available as a PDF.

Wyvern determines which sublanguage is being used within the program based on the type of data the programmer is manipulating. Types specify the format of data, such as alphanumeric characters, floating-point numbers or more complex data structures, such as Web pages and database queries.

The type provides context, enabling Wyvern to identify a sublanguage associated with that type in the same way that a person would realize that a conversation about gourmet dining might include some French words and phrases, explained Joshua Sunshine, ISR systems scientist.

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

Many programming tasks can involve multiple languages; when building a Web page, for instance, HTML might be used to create the bulk of the page, but the programmer might also include SQL to access databases and JavaScript to allow for user interaction. By using type-specific languages, Wyvern can simplify that task for the programmer, Aldrich said, while also avoiding workarounds that can introduce security vulnerabilities.

One common but problematic practice is to paste together strings of characters to form a command in a specialized language, such as SQL, within a program. If not implemented carefully, however, this practice can leave computers vulnerable to two of the most serious security threats on the Web today - cross-site scripting attacks and SQL injection attacks. In the latter case, for instance, someone with knowledge of computer systems could use a login/password form or an order form on a Web site to type in a command to DROP TABLE that could wipe out a database.

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 3, Funny) by c0lo on Monday August 11 2014, @11:06PM

    by c0lo (156) Subscriber Badge on Monday August 11 2014, @11:06PM (#80271) Journal

    How is mixing different liqueurs supposed to get you drunk faster?

    The main mechanism comes indeed from making you ingest more alcohol in the same amount of time. E.g. one of the most perverse mixture that I tried is beer "fortified" with vodka - the taste of beer will mask the usual dryness of vodka (which sorta slows your drinking in down); the likely effect is you'll tend to drink the mixture more like the way you drink beer than vodka. What make it so perverse: drunkenness is slow-ish to install (there's this delay until your stomach lining let pass enough alcohol, no matter how much of it you'd have) then it hits you like a train (because you likely had too much of it without realizing)
    Not a fan of tequila myself, but the lime+salt combo will drive you to drink more of it

    Translate this into "mixing programming languages" and you'll see the risk is pretty much the same: the taste of one language will mask the nastiness of other, so you'll write code faster and very likely not allow you enough time to think.

    --
    https://www.youtube.com/watch?v=aoFiw2jMy-0 https://soylentnews.org/~MichaelDavidCrawford
    Starting Score:    1  point
    Moderation   +1  
       Funny=1, Total=1
    Extra 'Funny' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   3