A minimalistic programming language written in C89.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 rivejä
1.0 KiB

  1. # This says Hello World
  2. [ 72 101 108 108 111 32 87 111 114 108 100 10 ]
  3. # This prints the array above
  4. array.print_utf8
  5. [ 72 101 108 108 111 32 87 111 114 108 100 10 ]
  6. # original
  7. dup array.clone dup
  8. # original cloned cloned
  9. 32 128 encrypt
  10. # original cloned
  11. string.dump
  12. 10 print_utf8
  13. string.dump
  14. # We encrypt 6 times in a row
  15. [ 84 104 105 115 32 105 115 32 97 110 32 101 120 97 109 112 108 101 32 111 102 32 116 101 120 116 32 116 111 32 98 101 32 101 110 99 114 121 112 116 101 100 32 116 119 105 99 101 46 ]
  16. dup array.clone
  17. dup
  18. 33 128 encrypt
  19. dup
  20. 57 128 encrypt
  21. dup
  22. 91 128 encrypt
  23. dup
  24. 33 128 encrypt
  25. dup
  26. 57 128 encrypt
  27. dup
  28. 91 128 encrypt
  29. # Print encrypted
  30. dup
  31. 10 print_utf8
  32. string.dump
  33. # We decrypt in reverse order with a key that is the modular inverse of the original (adjacent to subtraction)
  34. dup
  35. 128 91 - 128 encrypt
  36. dup
  37. 128 57 - 128 encrypt
  38. dup
  39. 128 33 - 128 encrypt
  40. dup
  41. 128 91 - 128 encrypt
  42. dup
  43. 128 57 - 128 encrypt
  44. dup
  45. 128 33 - 128 encrypt
  46. # Print encrypted then decrypted
  47. 10 print_utf8
  48. string.dump
  49. # Print never encrypted
  50. 10 print_utf8
  51. string.dump