Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Programming Math

Wolfram Language Demo Impresses 216

theodp writes "The devil will be in the details, but if you were stoked about last November's announcement of the Wolfram programming language, you'll be pleased to know that a just-released dry-but-insanely-great demo delivered by Stephen Wolfram does not disappoint. Even if you're not in love with the syntax or are a FOSS devotee, you'll find it hard not to be impressed by Wolfram's 4-line solution to a traveling salesman tour of the capitals of Western Europe, 6-line camera-capture-to-image-manipulation demo, or 2-line web crawling and data visualization example. And that's just for starters. So, start your Raspberry Pi engines, kids!"
This discussion has been archived. No new comments can be posted.

Wolfram Language Demo Impresses

Comments Filter:
  • mathematica? (Score:4, Insightful)

    by goombah99 ( 560566 ) on Friday February 28, 2014 @11:23AM (#46367569)

    This looks a lot like Mathematica. When does something become programming language? Wasn't mathematica a programming language too?

  • by jeffb (2.718) ( 1189693 ) on Friday February 28, 2014 @11:23AM (#46367573)

    A picture is worth a thousand words, but most sets of 1000 words can't be succinctly described by a single picture.

    Similarly, while I'm sure that you can write a few lines of Wolfram and do amazing things, I wonder how often you can set out to do an amazing thing and end up with a few lines of Wolfram. Maybe the answer is "pretty often", which would be wonderful. But I'm waiting to hear from some outside users.

  • by spinninggears ( 551247 ) on Friday February 28, 2014 @11:25AM (#46367597)

    So we don't count the lines of code behind the "FindShortestTour" function?

  • by Qbertino ( 265505 ) <moiraNO@SPAMmodparlor.com> on Friday February 28, 2014 @11:31AM (#46367645)

    Cramming 20 commands and 8 layers of brackets into one line doesn't make your programm an 'impressive 5-liner'. It, at most, makes a neat stunt by a mathematician in a proprietary programming language he invented himself. I'd be tempted to call it shitty programming.

    Nothing to see here folks, move along.

  • Comment removed (Score:5, Insightful)

    by account_deleted ( 4530225 ) on Friday February 28, 2014 @11:33AM (#46367661)
    Comment removed based on user account deletion
  • by js3 ( 319268 ) on Friday February 28, 2014 @11:34AM (#46367669)

    All I see there is calling some method to do something complicated. It's not 2 lines of code of the actual meat is hidden somewhere.

  • by lucag ( 24231 ) on Friday February 28, 2014 @11:37AM (#46367685) Homepage

    As much as I would like to be impressed, what I see is quite underwhelming: a functional application language with some interface to "facts" and "databases" with a pattern matching engine might make some analysis easier but ... the principles of the language are mostly what you come to expect if you have seen lisp once or any modern functional language,e.g. haskell.

    I can see it as being useful, but as another commenter pointed out, "FindShortestTour" is a library function (which might be handy), but definitely not an example of how concise the language might be; the same could be said about "EdgeDetect" or the like. The power of the language can be measured in how easily it can be extended or non trivial algorithms can be implemented ... not in how many functions are offered (even if this could be more convenient none-the-less).

  • by Anonymous Coward on Friday February 28, 2014 @11:37AM (#46367687)

    Yes. Just like we don't count the lines of machine code that a perl 'one liner' gets transformed into before execution.

  • Perl (Score:4, Insightful)

    by Areyoukiddingme ( 1289470 ) on Friday February 28, 2014 @11:41AM (#46367719)

    I can do much the same thing in the same number of lines of Perl code. I don't think there are many who would claim that makes Perl a paragon of language design.

    Clickbait article is clickbait.

  • by smjames ( 463922 ) on Friday February 28, 2014 @11:48AM (#46367767)

    If you look at the output of the capitals[tour] command, then compare it to the red lines on the map, they are not the same. Somebody fudged this demo a bit.

  • by dmgxmichael ( 1219692 ) on Friday February 28, 2014 @12:02PM (#46367865) Homepage

    All I see there is calling some method to do something complicated. It's not 2 lines of code of the actual meat is hidden somewhere.

    Do you count the code that drives the compiler or interpreter as part of your program? What about the code that drives your database?? If it's abstracted away into the language then it's not "actual meat" as far as the programmer doing the work is concerned. It is two lines. And unless you're writing all your code in machine language you have no right to claim otherwise.

  • by dmgxmichael ( 1219692 ) on Friday February 28, 2014 @12:05PM (#46367877) Homepage

    As much as I would like to be impressed, what I see is quite underwhelming: a functional application language with some interface to "facts" and "databases" with a pattern matching engine might make some analysis easier but ... the principles of the language are mostly what you come to expect if you have seen lisp once or any modern functional language,e.g. haskell.

    I can see it as being useful, but as another commenter pointed out, "FindShortestTour" is a library function (which might be handy), but definitely not an example of how concise the language might be; the same could be said about "EdgeDetect" or the like. The power of the language can be measured in how easily it can be extended or non trivial algorithms can be implemented ... not in how many functions are offered (even if this could be more convenient none-the-less).

    Hello. My name is PHP. I'm the most ugly hideous language known to man, but man do I have thousands of functions to get work done. And that's why I rule the server side processing world :D

    Function libraries and ability to get stuff done quickly counts for a lot.

  • by Anonymous Coward on Friday February 28, 2014 @12:12PM (#46367933)

    Just because you call a function, it doesn't make the code more elegant or better.
    Why not just wrap all the data into the function and say" hey I did it in 1 line of code."

  • by frnic ( 98517 ) on Friday February 28, 2014 @12:20PM (#46368011)

    The traveling salesman tour - is NOT a 4 line solution. By that definition I can write "Run Linux" and have a one line operating system.

  • Re:mathematica? (Score:5, Insightful)

    by fuzzyfuzzyfungus ( 1223518 ) on Friday February 28, 2014 @12:22PM (#46368039) Journal
    Honestly, seeing that much power in a demo makes the hair on the back of my neck rise (and in the 'something vile beyond comprehension this way comes' sort of way, not the 'awe at technology indistinguishable from magic' kind of way).

    If you can do extremely complex and powerful things with very, very, short commands, that suggests that all those commands have a lot of internal magic baked in, quite possibly including some might-as-well-be-nondeterministic guessing to paper over any ambiguity in commands, or in output from one command moving to be input for another.

    In the context of a demo, where you can carefully test, and confine yourself to some highlights from the set of programs that are both cool and well behaved, fantastic. In the context of taking the language out into the wild, that sounds like every nightmare interaction with an unpredictable and opaque 3rd-party library that you'll never expunge from your nightmares....
  • by PPH ( 736903 ) on Friday February 28, 2014 @12:34PM (#46368125)

    But that's an important distinction to make. These solutions are demonstrating good library support. Not the syntax of the basic language itself. Are those libs even written in Wolfram?

    I can solve a traveling salesman problem using Perl [cpan.org] with not too many lines.

  • by abies ( 607076 ) on Friday February 28, 2014 @12:51PM (#46368293)

    You wish... you forgot about 100 extra commands you need to set up proper nvidia drivers afterwards...

    And I think you misunderstood the premise. It is not a language to write salesman algos in. It is language to data mine, connect facts, process and visualize them. And it looks pretty impressive from this point of view.

  • Re:mathematica? (Score:4, Insightful)

    by Anonymous Coward on Friday February 28, 2014 @01:54PM (#46368865)

    But that's not your job. You're not developing the language. You're just asking it to do things. Submit a bug report and pray to god that they fix it before you need to finish the project that you stupidly designed around this nondeterministic, amorphous pile of somewhat awesome but perhaps totally useless functions.

    ftfy

    captcha: formulas

  • You don't have to (Score:5, Insightful)

    by pavon ( 30274 ) on Friday February 28, 2014 @08:11PM (#46372189)

    The way this is setup isn't that that you code everything in natural language, rather it is just a shortcut to look up the correct formal language. Instead of searching/browsing documentation looking up the exact names of the functions you want and how to chain them, you just type what you want in natural language. If it interpreted you correctly, then great it saved you several minutes, and now you know the real syntax to use in the future. If not, well you only lost a couple seconds.

    The idea of mixing natural language like this isn't so weird; the first step that most programmers would take in looking up documentation when they don't even know the name of the library the functionality is located in is to perform a natural language search on web browser, and then go from there. This just takes it one step further and streamlines the process, which is perfect for a interactive language.

Thus spake the master programmer: "After three days without programming, life becomes meaningless." -- Geoffrey James, "The Tao of Programming"

Working...