top | item 33850004

(no title)

Sil_E_Goose | 3 years ago

My "Wow!" moment came from a similar experiment. I asked ChatGPT to create a fictional assembly language, list and explain the opcodes (apologies if I'm using incorrect terminology. I'm not a low level developer) , then write a program and explain what the program does. It wasn't perfect , and used some opcodes it didn't mention previously, but the example program and explanation were coherent.

I then wrote my own simple program in the fictional assembly language and asked ChatGPT to evaluate it. Here are the results:

  tell me the number that is in R3 after this "Flux Assembly" program:

  MOV 7, R1
  MOV 2, R2
  ADD R1, R2, R3

  The number that is in R3 after this "Flux Assembly" program is 9. The program 
  first uses the MOV op code to move the value of 7 into the register R1, and 
  the value of 2 into the register R2. It then uses the ADD op code to add the 
  values of R1 and R2 and store the result in R3. Since 7 + 2 = 9, the value 
  that is stored in R3 is 9.
Pretty interesting, but most assembly languages are similar enough. How about a really wacky fictional assembly language? ChatGPT then gave me "Zany Assembly" which included the following op code:

  SPAZZ: This opcode causes the processor to randomly select and execute one of 
  the next five instructions in the program. It has no operands and the syntax 
  is simply "SPAZZ."   
I then tried to "run" a simple program:

  what are the the contents of R1 after this Zany Assembly program is run?

  SPAZZ
  MOV 33, R1
  MOV 8989, R1
  MOV 173, R1
  MOV 20, R1
  MOV 8, R1

  The contents of R1 after this Zany Assembly program is run are unpredictable. 
  The program uses the SPAZZ op code at the beginning, which causes the 
  processor to randomly select and execute one of the next five instructions in 
  the program. This means that the contents of R1 after the program is run could 
  be any of the values that are moved into it by the MOV op codes. It could be 
  33, 8989, 173, 20, or 8, depending on which instruction is selected and 
  executed by the SPAZZ op code.
I was impressed (and this was after it unsurprisingly failed at Conway's game of life!)

Prompts and responses for the curious: https://pastebin.com/aiQZx9pQ

discuss

order

lelandfe|3 years ago

I asked ChatGPT to act as a Unix program that assists in writing novels and to output its own man page, and it just dreamt up it’s own useful flags, like -b to brainstorm, and -p to proofread off a prompt. All of them work perfectly (although they start to degrade after a lot of time)

I feel like I’m witnessing multiple industries be made obsolete.