C++ still used in the 23rd century

Discussion in 'Trek Tech' started by marsh8472, Oct 15, 2017.

  1. marsh8472

    marsh8472 Captain Premium Member

    Joined:
    Dec 31, 2016
    [​IMG]
    This comes from S01E03 of discovery

    https://github.com/Laurelai/decompi...8DF1A2B905/37FC7C5D89F1E5A96F54318DF1A2B905.c <-- I see this code there

    In the scene they were showing the code, they were pointing out errors with commented out code. Then they expanded one of the commented out lines with a snibbit of code further down and omitted some of the code below that's not in bold.

    v5 = GetModuleHandleW(L"NTDLL.DLL");

    v4 = GetProcAddress(v5, "ZwSetInformationFile");

    if ( !v4

    || (v7 = *(_DWORD *)(a1 + 4),

    v13 = *(_DWORD *)a1,

    v8 = *(_DWORD *)a2,

    v14 = v7,

    v9 = *(_DWORD *)(a2 + 4),

    v15 = v8,
    v10 = *(_DWORD *)a3,
    v16 = v9,
    v11 = *(_DWORD *)(a3 + 4),
    v17 = v10,
    v19 = v10,
    v18 = v11,
    v20 = v11,
    v21 = 128,
    (result = ((int (__stdcall *)(void *, char *, int *, signed int, signed int))v4)(a4, &v12, &v13, 40, 4)) != 0) )
    result = SetFileTime(a4, (const FILETIME *)a1, (const FILETIME *)a2, (const FILETIME *)a3);


    It looks like a decompiled C++ app. Because it's decompiled the variables are all badly named (v1, v2, v3, ... a1, a2, a3, ...)
     
  2. USS Triumphant

    USS Triumphant Vice Admiral Admiral

    Joined:
    Dec 29, 2008
    Location:
    Go ahead, caller. I'm listening...
    It looks like C++, but it's actually a descendent programming language called NCC++. ;)
     
  3. Ronald Held

    Ronald Held Vice Admiral Admiral

    Joined:
    Feb 21, 2005
    Location:
    On the USS Sovereign
    It would work better if they used Fortran. Unlikely we would recognize any computer languages by the mid 22d century
     
    Kor and mos6507 like this.
  4. USS Triumphant

    USS Triumphant Vice Admiral Admiral

    Joined:
    Dec 29, 2008
    Location:
    Go ahead, caller. I'm listening...
    It's cyclical. They are the lords of COBOL. This has all happened before, and will happen again. Mainly because the last line is GOTO 10. ;)
     
  5. mos6507

    mos6507 Commodore Commodore

    Joined:
    Dec 22, 2010
    Shades of the 6502 assembler inside Arnie's Terminator.

    [​IMG]
     
    SolarisOne and USS Triumphant like this.
  6. Laura Cynthia Chambers

    Laura Cynthia Chambers Commodore Commodore

    Joined:
    Jun 1, 2016
    Location:
    Mississauga
  7. Santaman

    Santaman Rear Admiral Rear Admiral

    Joined:
    Jul 27, 2001
    Location:
    Steelport
    "FIRE PHASERS!" ... [nothing] .. "Your device performed an illegal action, the system will now reboot and a memory dump will be available, check you event log for debugging information."
    :p
     
    USS Triumphant and Ronald Held like this.
  8. USS Triumphant

    USS Triumphant Vice Admiral Admiral

    Joined:
    Dec 29, 2008
    Location:
    Go ahead, caller. I'm listening...
  9. DEWLine

    DEWLine Commodore Commodore

    Joined:
    Apr 27, 2003
    Location:
    Ottawa, Canada
    Whoops.
     
  10. Ronald Held

    Ronald Held Vice Admiral Admiral

    Joined:
    Feb 21, 2005
    Location:
    On the USS Sovereign
    I can see developers using a command line interface.
     
  11. Kor

    Kor Admiral Admiral

    Joined:
    Jul 31, 2001
    Location:
    Dahar Master final exams
    Strangely, this threw my suspension of disbelief for a loop because it looks just like real-life computing. :wtf:

    Kor
     
  12. 137th Gebirg

    137th Gebirg Vice Admiral Premium Member

    Joined:
    Aug 31, 2000
    Location:
    42 miles west of COVFEFE
    Ugh...C++ still used in the 23rd? Thank God I won't live that long! :p
     
  13. Ronald Held

    Ronald Held Vice Admiral Admiral

    Joined:
    Feb 21, 2005
    Location:
    On the USS Sovereign
    Let us work to remove C and its variations from 23d century programming.
     
  14. 137th Gebirg

    137th Gebirg Vice Admiral Premium Member

    Joined:
    Aug 31, 2000
    Location:
    42 miles west of COVFEFE
    Objective-C is nice. And I have always had a soft spot for good old ANSII C.

    C++ and its abomination of a successor C#, however, can disappear into the mists of time forever, as far as I'm concerned.

    And Java. Java too.

    Does anyone still use SmallTalk or Common LISP anymore? Those languages can fuck off too.
     
    Last edited: Nov 14, 2017
  15. Ronald Held

    Ronald Held Vice Admiral Admiral

    Joined:
    Feb 21, 2005
    Location:
    On the USS Sovereign
    Rather see Fortesn code, but not with the current mindset on that language.