Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×

New Whitespace-Only Programming Language 328

foobarbazquux writes "Introducing whitespace, a language designed to compensate for the "white-space doesn't count" culture of contemporary programming languages. Amaze your friends by hiding programs in your web-pages! Astound colleagues by putting a virus in your text file!" (And for those who prefer obfuscation to invisibility, Koshatul writes "This article in the Sydney Morning Herald, tells of a new programming language which 'makes it impossible to express a security vulnerability in a program's source code.'")
This discussion has been archived. No new comments can be posted.

New Whitespace-Only Programming Language

Comments Filter:
  • by apirkle ( 40268 ) on Tuesday April 01, 2003 @02:39AM (#5636705)
    This has been done. Damian Conway implemented it as a Perl module, Acme::Bleach, quite some time ago.

    Hit your nearest CPAN mirror and 'use Acme::Bleach' for great justice.
    • by Phroggy ( 441 ) <{moc.yggorhp} {ta} {3todhsals}> on Tuesday April 01, 2003 @02:45AM (#5636734) Homepage
      Hit your nearest CPAN mirror and 'use Acme::Bleach' for great justice.

      Speaking of which, have you seen http://www.cpan.org/ today? ;-)
      • Hahahaha... that one freaked me out. My hat's off to the CPAN mob :-)
    • by Adam9 ( 93947 ) on Tuesday April 01, 2003 @02:56AM (#5636780) Journal
      I checked Matt's Script Archive and they didn't have it..

      Is there another source?
  • make it past the slashdot lameness filter

    Your comment violated the "postercomment" compression filter. Try less whitespace and/or less repetition. Comment aborted.
  • Please not again... (Score:5, Interesting)

    by Fnkmaster ( 89084 ) on Tuesday April 01, 2003 @02:40AM (#5636712)
    Do the editors realize that it undermines the whole point of April Fool's Day when everything they post is a joke? Of course, this is the one day out of the year when Taco and friends actually _realize_ the stuff they are posting is BS.
  • April fools, but (Score:5, Interesting)

    by lingqi ( 577227 ) on Tuesday April 01, 2003 @02:41AM (#5636717) Journal
    Okay, not on topic with the story, but these are not serious stories:

    I just want to mention that April Fools to me has always been to make up BELIEVABLE stories that you can gloat over later - which really adds to more of the fun.

    I mean, funny as some of this may be, it gets tiring after a while. I mean, you can make a story believable but still false and a good April Fools candidate.

    So learn to write some good stories [soyouwanna.com] and THEN post to the site, eh?

    p.s. the above link provides information that helps a great deal in all sorts of situations, I highly recommend it.

    • funny as some of this may be

      Not of it is funny. Slashdot needs a fucking clue on what April Fool's day is all about.
    • by prockcore ( 543967 ) on Tuesday April 01, 2003 @03:03AM (#5636803)
      I just want to mention that April Fools to me has always been to make up BELIEVABLE stories that you can gloat over later - which really adds to more of the fun.

      Right, it's not a successful april fools joke until you get convicted of fraud.
    • Oh really? (Score:4, Funny)

      by kinnell ( 607819 ) on Tuesday April 01, 2003 @03:23AM (#5636841)
      April Fools to me has always been to make up BELIEVABLE stories that you can gloat over later

      Only 2 symbols are required to express any algorythm (1 and 0), and whitespace has 3 ([SPACE], [TAB] and [LF]). I can see no reason off hand why whitespace cannot work, and in fact without having tried it, I suspect it is probably genuine, if not entirely serious.

      • Only 2 symbols are required to express any algorythm (1 and 0)

        No. One also needs a processor/compiler/interpreter. A string of bits is meaningless per se.
      • Only 2 symbols are required to express any algorythm (1 and 0)

        Why you 2 when 1 will do?

        bin: 1001
        base 1: 111 111 111

        bin: 0101 0111
        base 1: 001 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111

        You could make a language aimed at Mac mice ;)
        • Well your are lucky to have 1s and 0s I could only program with O because the 0 was broken.

          *based off a Dilbert joke.
          • <accent style="old man" type="Dana Carvey">

            Well, you young kids with your fancy hard drives... When I was kid, all we had were VIC-4s....no fancy, schmancy hard drives or tape drive, and no monitor, so we had to use the tv. We didnt even have floppy drives. If we wanted to run a program, we typed in all the code in basic each time we turned on the computer, AND WE LIKED IT!

            </accent>
    • by cgreuter ( 82182 ) on Tuesday April 01, 2003 @03:54AM (#5636917)
      I just want to mention that April Fools to me has always been to make up BELIEVABLE stories that you can gloat over later - which really adds to more of the fun.

      Perhaps I'm being trolled here, but I went ahead and downloaded the interpreter and wrote a toy program with it, so this is a real language.

      And that is the real April Fool's joke.

      • Re:April fools, but (Score:2, Informative)

        by lingqi ( 577227 )
        wow... I tried it too and you are right.

        I am willing to take back everything I said (and maybe put it in another post) but it's a shame /. does not allow deletions. /. with authentic story on april fools? but that can't ... [head explodes]

        p.s. (pretent this was written before the exploding head) programing in this is a pain in the butt and a half, even with a hex editor.
    • This is a real language. I am not joking.
      Slashdot has posted a link to a real thing here whichis what is actually so amusing.
      Try the damn thing if you don't believe me.
      The creators intended to use their genius for evil.
    • Well, I took a peek at the site and the site's source code (It's in haskell). It's almost certainly real (I don't have an interpreter or compiler for Haskell98 atm), in that it really does work... And it compresses well to boot! I'm switching.
    • No, dude....I downloaded the interpreter...it works... really. I even wrote a silly little program with it...

      that's the real AFJ here... :)
  • ATI just released a new version of their Catalyst drivers, and it fixes every known bug in every single game in existance. ATI also mentioned this driver fully supports Duke Nukem Forever, which was also released today.
  • by Alereon ( 660683 ) on Tuesday April 01, 2003 @02:42AM (#5636720)
    I've found that GZIP is able to compress source code written in whitespace by up to 99.9%! This is truly an incredible advance in application development and distribution!
    • Compressing whitespace code is probably a good idea, and not just for the space savings. Among the many problems with the email system, one of the really annoying things is the fact that whitespace is often damaged in transit. This is especially true for trailing whitespace, and of course, whitespace code is entirely trailing whitespace, and likely to be fully trimmed from messages. So to send it via email or other messaging software, you will need to encode it somehow. GZIPping it or BASE65-encoding it
  • by Mattygfunk1 ( 596840 ) on Tuesday April 01, 2003 @02:43AM (#5636721)
    I don't have enough time to learn yet another language. This isn't fair. Management is apparently already considering this as the "future of our progressive company".

    Then again as long as it doesn't use pointers the uni students will be happy.

    _______________
    Get slashdoted at Cheap Web Site Hosting [cheap-web-...ing.com.au]

  • by ahkbarr ( 259594 ) on Tuesday April 01, 2003 @02:43AM (#5636724)
    ...at keyboards, typing forever need only hit the space and/or tab keys to create the infamous do_stuff()! A breakthrough!

    Finally, I have the monkeys.. Now, to acquire the keyboards... Quickly too, because the monkeys are starting to get stank.

    "...now strip down and get on the probulator!"
    -Capt. Leela
    • ...now strip down and get on the probulator!"
      -Capt. Leela


      Except, of course, she didn't become a captain until the end of episode 1ACV01.

      What are we supposed to believe this some kind
      of, ahem, magic ranking system?
  • by WhiteBandit ( 185659 ) on Tuesday April 01, 2003 @02:43AM (#5636726) Homepage


  • by coene ( 554338 ) on Tuesday April 01, 2003 @02:45AM (#5636735)
    Well, I WOULD post a source example if Slashdot's "whitespace filter" and "lameness filter" wouldent prevent it...

    What's a guy gotta do to post whitespace source code around here?
  • by tconnors ( 91126 ) on Tuesday April 01, 2003 @02:46AM (#5636739) Homepage Journal
    See, in .au, it is no longer April Fools. I almost fell for the NewCode thing, until about half way through!

    But I foiled the whitespace langauge. You can't see it, until you click and drag down the mozilla windows. Ha ha! I can see it now! Suckers.
  • by traskjd ( 580657 )
    All I can say is:







    and that's all I really have to say about that :D
  • i love april fools!
  • by traskjd ( 580657 ) on Tuesday April 01, 2003 @02:50AM (#5636763) Homepage
    I'm waiting for the next topic on the frontpage -

    "Gentoo Developers to recode kernal in whitespace" :D
  • Jones dismisses Microsoft's "trustworthy computing" initiative as "ridiculous" because it still allows programmers to write code that contains serious security vulnerabilities.

    Considering the article is an April fools joke that quote is an understatement of fact.

    ______________
    Ideal packages for vanity domains @ Cheap Web Site Hosting [cheap-web-...ing.com.au]

  • So perhaps the story there isn't true, but, you've been able to write Perl using white-space only for a little while now:

    Acme::Bleach [cpan.org]

    It's also worth taking a look at Clarinet's offering:

    ProleText [templetons.com]...

  • "whitespace" code broken by buffer overflow. Internationalisation of the "space" key blamed. Authorities warn not to use international versions whitespace.

    "It was horrible..one minute I was sitting in a counting loop and then the next thing I know someone pushed [TAB][SPACE][TAB][TAB] into the execution queue and all heck broke loose...."

  • Sigh (Score:5, Funny)

    by arvindn ( 542080 ) on Tuesday April 01, 2003 @02:53AM (#5636771) Homepage Journal
    I have written a truly remarkable program in whitespace which prints out a proof of Fermat's last theorem.

    Unfortunately, I'm unable to post the source code here because of slashdot's lameness filter :(

  • so when will the mono & NewCode# extensions be available?
  • Actually it's quite possibly a "legitimate" language along the lines of "brainfuck" which actually could be modified to use space and tab combinations instead of slashes and whatnot.

    If you wanted to get technical it would be very easy to use tab and space as 0s and 1s to do low level coding and then write a simple script to convert it to real hex representing x86 (or whatever) assembly. This language appears to do basically that while reducing the number of commands supported and therefore the number of c
  • From the article: Most modern programming languages do not consider white space characters (spaces, tabs and newlines) syntax, ignoring them, as if they weren't there.

    A search through slashdot itself shows two other discussions (1 [slashdot.org], 2 [slashdot.org]) that talk about Python's use of whitespace for syntax.

    But seriously, the site does have a compiler for simple whitespace terms. You can't do a heck of a lot, but it works. Or does it?

    [Space] Stack Manipulation
    [Tab][Space] Arithmetic
    [Tab][Tab] Heap access
    [LF] Flow Contro

  • by Mike Schiraldi ( 18296 ) on Tuesday April 01, 2003 @03:00AM (#5636791) Homepage Journal
    Here's a mirror [about].
  • by arvindn ( 542080 ) on Tuesday April 01, 2003 @03:01AM (#5636793) Homepage Journal
    I'm using vim, and I couldn't get any of my whitespace programs to run. I realized it was because I'd set the "expandtab" variable: it expands all tabs to spaces.

    ;^)

  • I hate April 1st on Slashdot... Just do us all a favor and repost yesterdays stories... it will probably be more informative as well as more humorous than whatever is bound to be posted today.
  • Perl has had support for whitespace oriented programming for some time. See Acme::Bleach [cpan.org] from Damian Conway [cpan.org].

    -Dom

  • by edhall ( 10025 ) <slashdot@weirdnoise.com> on Tuesday April 01, 2003 @03:21AM (#5636838) Homepage
    Bjarne Stroustrup wrote a paper [att.com] a few years back proposing overloading the C++ whitespace operator, and claimed that the next C++ standard would include this feature. This allows for intuitive pratices such as using a space to indicate multiplication:
    double x = 1.4;
    double y = 2.5 x;
    or string concatenation:
    string s("first");
    string s2 = s "post";
    Other uses, such as making whichspace equivalent to the -> operator for particular classes can go far to make C++ syntax less obscure.

    It's a cool paper; check it out. If you have problems finding it, just Google for "B Stroustrup: Generalizing Overloading for C++2000. Overload, Issue 25. April 1, 1998."

    -Ed
  • by Elladan ( 17598 ) on Tuesday April 01, 2003 @03:25AM (#5636846)

    What's with all the comments, "This is total bullsh*t! April Fools! Complete crap!" ?

    Did anyone actually read the link to the whitespace language? Anyone? Hello? I mean, I know, I know, nobody on /. reads the articles, but this is ridiculous.

    It's real! The description of the syntax is a masterwork of stunning proportions!

    This is exactly what April Fools is supposed to be about! It's real! It's just... silly.

  • by astrophysics ( 85561 ) on Tuesday April 01, 2003 @03:41AM (#5636884)
    Forget the DeCSS T-shirts. Xerox is selling boxes of DeCSS source code in whitespace at Staples. And my department has a cabinet full of backup copies of the source. That should keep the RIAA busy for a good while.
  • by patthoyts ( 598899 ) on Tuesday April 01, 2003 @03:43AM (#5636892) Homepage

    >>>>>++[<++++>-]<[<++++>-]<<<<>>++++[<+++++>-]<[ <++++++>-]<-.
    >+++++[<--->-]<.+.>++++[<+++>-]<-.>+++[<----->-]<. >+++++[<+++>
    -]<-.---.>+++++[<--->-]<.++.++.>>>.<<<++++.>++[<++ +++>-]<.>>>.
    <<<>+++[<---->-]<-.>+++[<+++>-]<.+++.>>>.<<<------ .>+++[<--->
    -]<--.>++++[<+++>-]<.>++[<---->-]<.>++++[<+++>-]<+ .+.

  • This is getting as ridiculous as it was last year. I think I will from now on just refuse to visit Slashdot on the 1st of April. I mean... it'd be ok if there were one or two jokes. It'd be ok if they were actually good. But it's NOT ok when the site gets flooded with ridiculous bogus articles that can be spotted as fake by reading the first 2 sentences.

    Programming languages consisting only of workspaces ?
    Gentoo to adopt RPM ?

    :(
  • by pesc ( 147035 ) on Tuesday April 01, 2003 @04:04AM (#5636948)
    I am looking forward to the Unicode version of whitespace. This would truly demonstrate the expressfullness of Unicode as it has several whitespace characters.

    $ grep ";WS;" UnicodeData.txt [unicode.org]
    000C;;Cc;0;WS;;;;;N;FORM FEED (FF);;;;
    0020;SPACE;Zs;0;WS;;;;;N;;;;;
    1680;OGHA M SPACE MARK;Zs;0;WS;;;;;N;;;;;
    2000;EN QUAD;Zs;0;WS;2002;;;;N;;;;;
    2001;EM QUAD;Zs;0;WS;2003;;;;N;;;;;
    2002;EN SPACE;Zs;0;WS; 0020;;;;N;;;;;
    2003;EM SPACE;Zs;0;WS; 0020;;;;N;;;;;
    2004;THREE-PER-EM SPACE;Zs;0;WS; 0020;;;;N;;;;;
    2005;FOUR-PER-EM SPACE;Zs;0;WS; 0020;;;;N;;;;;
    2006;SIX-PER-EM SPACE;Zs;0;WS; 0020;;;;N;;;;;
    2007;FIGURE SPACE;Zs;0;WS; 0020;;;;N;;;;;
    2008;PUNCTUATION SPACE;Zs;0;WS; 0020;;;;N;;;;;
    2009;THIN SPACE;Zs;0;WS; 0020;;;;N;;;;;
    200A;HAIR SPACE;Zs;0;WS; 0020;;;;N;;;;;
    2028;LINE SEPARATOR;Zl;0;WS;;;;;N;;;;;
    202F;NARROW NO-BREAK SPACE;Zs;0;WS; 0020;;;;N;;;;;
    205F;MEDIUM MATHEMATICAL SPACE;Zs;0;WS; 0020;;;;N;;;;;
    3000;IDEOGRAPHIC SPACE;Zs;0;WS; 0020;;;;N;;;;;
  • Years ago, in the April issue of Computer Language magazine, there was an article that I consider the best April Fools computer-related story ever. Not only was it funny, it was actually educational!

    It was on how to add a GOSUB statement to FORTH. (For those of you who never suffered under one of the old BASIC versions, GOSUB was the statement for calling a function which would return; as opposed to GOTO which would not return.)

    About four different ways to write GOSUB were shown, each of which worked, a
  • RPG on IBM Iron... (Score:4, Informative)

    by tonywestonuk ( 261622 ) on Tuesday April 01, 2003 @04:05AM (#5636954)
    Joking asside, but if you've ever programed in RPG, Whitespace MATTERS.... Every command/Argument/Result HAS to be positioned in a certain column ...Somthing like this

    C NUM1 ADD NUM2 RESULT
    C MOVE 'HELLO' STR 10
    C DSPLY STR

    .. etc etc.



  • It's that easy!
  • http://www.eleves.ens.fr:8080/home/madore/programs /unlambda/
  • Just yesterday I was walking around in a plain white t-shirt. Some cop arrested me claiming it had DeCSS printed on it in whitespace.
  • I found the source!!!

    &nbsp;<br>&nbsp;&nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; <br>&nbsp; <br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;
    &nbsp;&nbsp;&nbsp; <br> &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; <br>&nbsp;&nbsp;

    (Damn lameness filter won't let this thru because of excessive "co
  • The Python conformant version uses the single non-whitespace character "}" as a grouping construct. They *insist* it simplifies the language because whitespace should only be used for program text...

    Seriously, it looks parsable. This just made the Lives of the NSA people incrediblly more interesting.

    (This message may or may not compute a palemset. ... ... ..... 8-)
  • 1.

    2.

    3. PROFIT!
  • WTF? I visited the website and all I saw was a blank page. Sheesh...talk about setting a new standard for vaporware!


    ;)

  • If I claim that I got fooled by the April 1st joke, will I be modded up +5, informative ?
  • What? (Score:2, Funny)

    by thinduke ( 150173 )
    They reinvented Python?
  • I like the idea. You could write easter eggs programs in a tutorial, for example, or in the end of a C file.
  • I've developed a scrpiting langauage made up entirely of nonsense characters, I mean, it you were to just glance over it you'd swear it's line noise.

    What was that? They already made it?! Perl.. hrm, I'll hafta look into that
  • by Skreech ( 131543 ) on Tuesday April 01, 2003 @07:34AM (#5637301)
    There's a buffer overflow that can lead to root access with the hello-asking-name program. Here's a patch.

    -
    -
    +
    +
    +
    +
    +

Prediction is very difficult, especially of the future. - Niels Bohr

Working...