This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
haas:spring2020:cprog:projects:cci0 [2020/01/19 14:33] – [Personal/Per-User Lab46 Mercurial Repository] wedge | haas:spring2020:cprog:projects:cci0 [2020/01/19 14:45] (current) – [Personal/Per-User Lab46 Mercurial Repository] wedge | ||
---|---|---|---|
Line 89: | Line 89: | ||
Like the Journal, I will be looking for a minimal amount of repository-related activity PER WEEK. | Like the Journal, I will be looking for a minimal amount of repository-related activity PER WEEK. | ||
- | To set up your repository, run the " | + | To set up your repository, run the " |
+ | |||
+ | < | ||
+ | lab46:~$ fixrepo | ||
+ | </ | ||
+ | |||
+ | For basic repository operation, when you make new files you'd like to track, or see the status of any tracked files that have changed: | ||
+ | |||
+ | < | ||
+ | lab46:~$ cd src | ||
+ | lab46: | ||
+ | A .hgignore | ||
+ | lab46: | ||
+ | </ | ||
+ | |||
+ | Once cloned (to your ~/src directory), you will be able to add, commit, and push changes made: | ||
+ | |||
+ | < | ||
+ | lab46: | ||
+ | lab46: | ||
+ | lab46: | ||
+ | </ | ||
+ | |||
+ | On the push, you will be prompted to provide your lab46 password. | ||
+ | |||
+ | And that's it! Repeat this process (NOT the ' | ||
====Program to Implement==== | ====Program to Implement==== | ||
As a first week exercise, I would like you to implement, successfully compile, and verify correct execution of the best first program every great programmer writes: **Hello World** | As a first week exercise, I would like you to implement, successfully compile, and verify correct execution of the best first program every great programmer writes: **Hello World** | ||
Line 111: | Line 136: | ||
Your task will be to transcribe this code (sans line numbers), into a source file (call it **hello.c** for simplicity), | Your task will be to transcribe this code (sans line numbers), into a source file (call it **hello.c** for simplicity), | ||
+ | |||
+ | <cli> | ||
+ | lab46:~$ mkdir src/ | ||
+ | lab46:~$ cd src/ | ||
+ | lab46: | ||
+ | </ | ||
+ | |||
+ | You may want to use the **nano** text editor for this: | ||
+ | |||
+ | <cli> | ||
+ | lab46: | ||
+ | </ | ||
+ | |||
+ | The **nano** text editor is a simple editor that provides basic functionality (commands listed at the bottom of the screen. You press the CONTROL key in combination with whatever letter invokes the desired functionality). | ||
+ | |||
+ | To save the file: CTRL+o | ||
+ | |||
+ | To save and exit (or exit if there are no changes made): CTRL+x | ||
+ | |||
+ | Note that if there are any changes, you will be prompted whether or not you'd like to save them (the changes are in memory (aka the buffer), and nano will prompt if you'd like to save the modified buffer). You will then be prompted for the filename (filling in the current filename, if there is one). Just press enter to accept these changes. | ||
Verify you typed in everything correctly by compiling it; you want no warnings or errors: | Verify you typed in everything correctly by compiling it; you want no warnings or errors: | ||
Line 176: | Line 221: | ||
< | < | ||
- | 39:cci0:final tally of results (39/39) | + | 13:cci0:final tally of results (13/13) |
- | *: | + | *: |
- | *: | + | |
- | *: | + | |
*: | *: | ||
- | *: | + | *: |
- | *: | + | |
*: | *: | ||
- | *: | ||
- | *: | ||
*: | *: | ||
- | *: | + | *: |
*: | *: | ||
*: | *: | ||
- | *: | + | *: |
- | *: | + | *: |
*: | *: | ||
*:cci0:no compiler warnings for hello.c [1/1] | *:cci0:no compiler warnings for hello.c [1/1] |