25 pointsby domenukk15 days ago6 comments
  • eqvinox15 days ago
    Very high quality shitposting. Approved.
  • irishcoffee15 days ago
    This is interesting, but I wouldn't say it is valid C. main() doesn't know about greet(auto s) and wouldn't be able to call it in valid C89, right?
    • kevin_thibedeau15 days ago
      It's valid K&R since everything defaults to int. The linker will match the symbols sans prototype. That wasn't obsoleted until C23.
      • irishcoffee13 days ago
        TIL, thank you! (How embarrassing haha)
    • oguz-ismail215 days ago
      It is valid C89. greet is automatically declared as

          int greet();
      
      at call site.
  • gschizas15 days ago
    Given that CScript is the name of the "Console Based Script Host" for Windows, that can run JScript (Microsoft's old variant of JavaScript) and VBScript, and supposedly other pluggable scripting languages (I've never seen one in the wild), calling this "Cscript" is not a good idea.
    • bheadmaster14 days ago
      It's a joke language, I doubt it will cause any significant ambiguity ever.
  • krylon15 days ago
    > 0[str] is valid and asserts dominance.

    At this point I came dangerously close to spewing water all over my keyboard. :D

  • leumassuehtam15 days ago
    It looks like the B programming language.
  • TZubiri15 days ago
    To compile CScript to C:

    apt install gcc-dev

    cat hello.cs > hello.c

    gcc hello.c

    • eqvinox15 days ago
      Nope… you need to follow the instructions:

        gcc -std=gnu89 -m32 -fno-builtin
      
      because GCC defaults to ISO C23 these days, and that will not work, and neither will anything where int and a pointer aren't the same size :)
    • 15 days ago
      undefined