Skip to content

Instantly share code, notes, and snippets.

@akkartik
Last active October 24, 2021 07:16
Show Gist options
  • Save akkartik/834531127fb0f12cd139c125edc62ac6 to your computer and use it in GitHub Desktop.
Save akkartik/834531127fb0f12cd139c125edc62ac6 to your computer and use it in GitHub Desktop.
Brainstorming Mu task list for FoC Review Jam

Review Jam

Vocabulary goals:

  • shell
  • sandbox
  • instruction, operation, inouts, outputs
  • strings, arrays, streams
  • addresses, handles
  • ...

Prerequisites:

  • Linux
  • git
  • fluency with typing in commands at the terminal and interpreting their output
  • fluency with some text editor, undo, saving work in files. Autocomplete is nice as well since Mu has some really long function names in its vocabulary.

Resources to keep open:

Task list for learning Mu:

  1. -- Read the first section of the Readme, and run the program described.
  2. -- Read the first section of mu.md
  3. Write an instruction to store 42 to register eax.
  4. Write an instruction to define a variable y on the stack.
  5. Write an instruction to add 3 to a var x in a register.
  6. Write an instruction to add 3 to a var x on the stack.
  7. ...filling in the blanks on a more complex function. Which one? c2f requires floating point...
  8. -- Read the second section of mu.md
  9. Write the header for a function that takes two int arguments and returns their sum. Do you need to make any assumptions?
  10. Implement the body of the function.
  11. ...some exercises involving control flow...
  12. .../comments on magic constants...
  13. ...floating point...
  14. ...drawing text on screen; std lib reference...
  15. Here's a working counter app. Add a button/hotkey to decrement the counter. You might want to consult ___ in the docs.
  16. ...some exercise involving a single gap buffer...
  17. Here's a working temperature converter. Turn it into a miles/km converter.
  18. Build a simple CRUD app. You'll need the button widget from the counter and the input widget from the temperature converter.

Task list for learning the shell of the Mu computer:

Task list for learning the low-level SubX notation for machine code

  • add 2 numbers
  • convert celsius to fahrenheit
  • reimplement writing a string to a stream

Task list for understanding the Mu toolchain

  • Open translate0 to get a sense for what it does.
  • Here's a function written in Mu. Pass it through translate0. Try to map Mu instructions to the SubX generated for them.
  • Here's a function in SubX. Pass it to translate_subx.
  • Open the following files in sequence: a.subx, a.braces, a.calls, a.sigils, a.tests, a.dquotes, a.pack, a.survey. Try to roughly map instructions in each file to the next.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment