• Wyrframe (unregistered)

    "They'll double our funding if all our applications run on FORTRAN."

    [image] [image]
  • anonymous (unregistered) in reply to EnterpriseIdiot
    EnterpriseIdiot:
    anonymous:
    eric76:
    I used to write a fair bit of things in assembly language on PDP-11s and Vaxen.

    However,the least portable program I ever wrote was 0 bytes long and ran on a PDP-11 with RSTS/E. It was actually quite useful.

    Ok, I'll bite. How did you write a 0-byte program, and what was it useful for?

    http://www.ioccc.org/1994/smr.hint It's simply an empty file, where the actual program was written in the preprocessor. Running the executable would simply output the source code of the program (an empty file).

    That's nice, but not quite "useful", much less "quite useful".

  • (cs) in reply to ¯\(°_o)/¯ I DUNNO LOL
    ¯\(°_o)/¯ I DUNNO LOL:
    Just for the hell of it, I tried it from an old OSX 10.5 PPC system I have. It says my browser is too old and wants me to go to browserhappy.com. Way to go guys, browser ageism, too lazy to have a fallback to even allow some kind of view-only with older browsers. Now that's a real WTF.
    There actually is a fallback: You can read the comments (but only read) when you disable Javascript.

    Yes, you read that right: Discourse is the only forum software that shows you less content (to be precise: no content at all) when you enable Javascript.

    From Jeff Atwood, the guy that brought you http://blog.codinghorror.com/. Now he does it literally.

  • Norman Diamond (unregistered) in reply to EnterpriseIdiot
    EnterpriseIdiot:
    anonymous:
    eric76:
    I used to write a fair bit of things in assembly language on PDP-11s and Vaxen.

    However,the least portable program I ever wrote was 0 bytes long and ran on a PDP-11 with RSTS/E. It was actually quite useful.

    Ok, I'll bite. How did you write a 0-byte program, and what was it useful for?
    http://www.ioccc.org/1994/smr.hint It's simply an empty file, where the actual program was written in the preprocessor. Running the executable would simply output the source code of the program (an empty file).
    IOCCC judges:
    While strictly speaking, smr.c is not a valid C program, it is not an invalid C program either!
    Wrong.

    ISO C committee:
    6.9 External definitions Syntax translation-unit: external-declaration translation-unit external-declaration external-declaration: function-definition declaration
    Therefore, if the result of preprocessing a source file results in something that doesn't contain at least one external-declaration, then the something isn't a translation unit.

    Notice that the definition of translation-unit is in a Syntax section.

    ISO C committee:
    5.1.1.3 Diagnostics A conforming implementation shall produce at least one diagnostic message (identified in an implementation-defined manner) if a preprocessing translation unit or translation unit contains a violation of any SYNTAX rule or constraint, even if the behavior is also explicitly specified as undefined or implementation-defined.
  • JimTheJam (unregistered) in reply to EnterpriseIdiot
    EnterpriseIdiot:
    anonymous:
    eric76:
    I used to write a fair bit of things in assembly language on PDP-11s and Vaxen.

    However,the least portable program I ever wrote was 0 bytes long and ran on a PDP-11 with RSTS/E. It was actually quite useful.

    Ok, I'll bite. How did you write a 0-byte program, and what was it useful for?

    http://www.ioccc.org/1994/smr.hint It's simply an empty file, where the actual program was written in the preprocessor. Running the executable would simply output the source code of the program (an empty file).

    Frist: "What was it useful for?" -- is still unanswered.

    2nd, petty point: The source is 0-bytes, the program it produces is not.

  • JimTheJam (unregistered) in reply to Norman Diamond
    Norman Diamond:
    ...
    IOCCC judges:
    While strictly speaking, smr.c is not a valid C program, it is not an invalid C program either!
    Wrong.
    ISO C committee:
    6.9 External definitions Syntax translation-unit: external-declaration translation-unit external-declaration external-declaration: function-definition declaration
    Therefore, if the result of preprocessing a source file results in something that doesn't contain at least one external-declaration, then the something isn't a translation unit.

    Notice that the definition of translation-unit is in a Syntax section.

    ISO C committee:
    5.1.1.3 Diagnostics A conforming implementation shall produce at least one diagnostic message (identified in an implementation-defined manner) if a preprocessing translation unit or translation unit contains a violation of any SYNTAX rule or constraint, even if the behavior is also explicitly specified as undefined or implementation-defined.
    I thought my point was petty ...

    I see nothing in your quoted documentation that specifies that there has to be anything in the "6.9 External definitions". And the "shall produce...", well the 0-byte source does not seem to be in violation "of any SYNTAX rule or constraint" -- at least that's the way it seems to me.

    IMHO if the compiler/make produces a runnable executable, it seems to satisfy what real people consider a "program" (committees don't count as "real people"--IMO).

  • QJo (unregistered) in reply to Coyne
    Coyne:
    Evil contributor [grinning evilly]: ...and I'll triple your funding if you'll take this sledgehammer and smash your toes with it!
    DO TOE = 1, 5
       CALL SMASH_WITH_SLEDGEHAMMER (TOE)
    END DO
    
  • QJo (unregistered) in reply to QJo
    QJo:
    Coyne:
    Evil contributor [grinning evilly]: ...and I'll triple your funding if you'll take this sledgehammer and smash your toes with it!
    DO TOE = 1, 5
       CALL SMASH_WITH_SLEDGEHAMMER (TOE)
    END DO
    

    Sorry:

    DO FOOT = 1, 2
       DO TOE = 1, 5
          CALL SMASH_WITH_SLEDGEHAMMER (FOOT, TOE)
       END DO
    END DO
    
  • Carrie (unregistered) in reply to RFox
    RFox:
    "I don't know what the programming language of the year 2000 will look like, but I know it will be called FORTRAN" - C.A.R. Hoare

    Whew it's 2014 -- and yes I paid my Fortran dues.

    I first learned to program in FORTRAN. In 2010.

  • Norman Diamond (unregistered) in reply to JimTheJam
    JimTheJam:
    Norman Diamond:
    ...
    IOCCC judges:
    While strictly speaking, smr.c is not a valid C program, it is not an invalid C program either!
    Wrong.
    ISO C committee:
    6.9 External definitions Syntax translation-unit: external-declaration translation-unit external-declaration external-declaration: function-definition declaration
    Therefore, if the result of preprocessing a source file results in something that doesn't contain at least one external-declaration, then the something isn't a translation unit.

    Notice that the definition of translation-unit is in a Syntax section.

    ISO C committee:
    5.1.1.3 Diagnostics A conforming implementation shall produce at least one diagnostic message (identified in an implementation-defined manner) if a preprocessing translation unit or translation unit contains a violation of any SYNTAX rule or constraint, even if the behavior is also explicitly specified as undefined or implementation-defined.
    I thought my point was petty ...
    The IOCCC judges wrote "it is not an invalid C program either!" which is false. The standard REQUIRES conforming implementations to issue diagnostics for this source file.
    JimTheJam:
    I see nothing in your quoted documentation that specifies that there has to be anything *in* the "6.9 External definitions".
    I suppose that's possible. Maybe you quoted it without seeing it. My eyes are bad too, I sometimes quote things without seeing them.

    translation-unit: external-declaration translation-unit external-declaration

    It is impossible to make a syntactically valid translation-unit without at least one external-declaration.

    external-declaration: function-definition declaration

    An external-declaration is either a function-definition or a declaration.

    You can look up function-definition and declaration. I'm getting new eyeglasses tomorrow; you can too.

    A conforming implementation is allowed to proceed as it wishes together with issuing at least one diagnostic. The implementation can say "That looks fine to me" (though accompanying documentation must inform the user that this wording is a diagnostic) and the implementation can proceed to format your hard drive, or do nothing, or whatever it wishes.

  • Neil (unregistered) in reply to eric76
    eric76:
    [the least portable program I ever wrote was 0 bytes long and ran on a PDP-11 with RSTS/E. It was actually quite useful.
    I can do something similar with a Research Machines 380Z with CP/M. There, attempting to launch a 0-byte program simply re-executes the previous program (assuming that it doesn't depend too much on statically initialised memory). Useful when the program and its data didn't fit on the same diskette.
  • radarbob (unregistered) in reply to Shoreline
    Shoreline:
    amomynous:
    RFox:
    "I don't know what the programming language of the year 2000 will look like, but I know it will be called FORTRAN" - C.A.R. Hoare
    "I don't know what the programming language of the year 2035 will look like, but I know it will not be called Java, VB, PHP, C#, Python..." - Me, a Java guy

    Yep, technology is going too fast... only thing I know is that I'll be a dinosaur if I remain on my first language.

    The language of 2035 will be called RealScript with a syntax relatively close to English and will still require developers because of the few remaining native speakers who understand grammar or logic.

    RealScript, thy name is COBOL

  • Anthony Vicari (unregistered)

    Two words: FORTRAN decompiler. Ugly, ridiculous, but it could work. Or not. As long as you have FORTRAN source code to show, I doubt anyone proposing that requirement has any idea what they're talking about anyway

Leave a comment on “The Joys of Interdisciplinary Work”

Log In or post as a guest

Replying to comment #:

« Return to Article