NOTE: this is a collaborative document among ALL my classes this semester. That means more people editing. Be mindful that only one person can edit the document at a time.
Only task headings have been provided. You are not expected to know how to do the task given just that description (although in some cases it can be adequately figured out). Instead, if no further information is yet present, ASK FOR DETAILS on the discord.
If something is present but needs polish: spruce it up.
If something is present but is incorrect: please fix it.
This is intended to be an informative, useful document that all can benefit from.
Those with prior experience, please be mindful not to gobble up all the low-hanging fruit from the newcomers.
The link to the Lab46 discord server can be found at the top of each course home page.
or just check your email for any invitations.
The first thing you need to do to get set up for the semester is log into the lab46 shell. If you are on a Windows or Linux device, this should be as simple as typing:
ssh jdoe123@lab46.g7n.org
into your terminal, replacing jdoe123 with the start of your CCC email
ssh is a command to have remote access to a server. Once entering the command, going through all the steps, and putting in your password (default CCCID number), you will then have all the visuals of the server on your terminal.
Once you have ssh'd into the lab, you will need to set up a repository for all of your projects for this semester.
This can be done with the fixrepo command, which will create an src/spring2025/ folder into your home folder. This folder has already been set up as a mercurial repository, and is ready to use.
Inside your spring2025 folder it might be wise to create a new folder(s) for your class/classes. This can be done with the mkdir command
mkdir FOLDERNAME
i.e
mkdir unix
will create a new folder named unix
Be sure to do this in your spring2025/ folder, or you will create the folder in the wrong place, and it will not be tracked!
if you don't have a debian based operating system or a pi, you can download a software called wsl onto your device through powershell. wsl –install.
wsl is a linux virtualize, and by default, it used the linux distribution, ubuntu.
after installation is complete, close powershell, and a new shortcut called ubuntu can be executed in order to run the terminal to ubuntu.
On your system of choice, Virtual Machine or Pi, open a terminal
Option 1
wget -q https://lab46.g7n.org/~wedge/piph/download -O piph bash ./piph
wget: website get for short, which will download something of a location you give it
Option 2
hg clone ssh://USER@lab46.g7n.org//var/repos/hg/user/USER ~/src hg clone ssh://USER@lab46.g7n.org//var/repos/hg/user/USER/spring2025 ~/src/spring2025
You can use a text editor like Vim or Nano to create info.text. Generally, it contains things like:
1) Your name
2) A good way to reach you (for example, email address)
3) Which program you are enrolled in
4) Your discord username
You can use “vim info.text” or “nano info.text” to create the file and start typing.
Create the hello.c file using a text editor There are many text editors to choose from, but depending on you experiences there are two main ones used in linux vim or nano.
nano is more beginner friendly, although vim tends to be more efficient with your time.
nano hello.c or vim hello.c
Then write a simple program that outputs “Hello World” to the console
Finally, compile the file using GCC or some other compiler
To install: sudo apt install gcc
gcc -Wall -std=gnu18 hello.c -o hello
To execute the code type in
./hello
Once you have created files you need to add them to the repository. You can use hg add to automatically add all new files (with some exceptions)
hg add
You can use hg status to see what files have been added
The command hg commit will save all of the changes that have been made (only the files that appear in hg status will be committed)
hg commit
Apply the changes to the repository with hg push
hg push
To get the changes from mercurial use hg pull from within src
you might expect to automatically receive all files after pull, but to receive the update of the pull, make sure to do update.
cd ~/src hg pull
To create files/apply changes use hg update from within src
hg update
Submit with “submit DESIG abc0 file1 file2 file3”
to edit your journal and customize the title, first you would need to navigate to the journal webpage. First login on the top right of the website for lab46. After login in, you should be able to see a journal tab on the top left. After clicking, you should be able to see your designated web page to edit and play around with. To edit, there are tiny edit icons next to the things that can be edited. The journal entries are on the bottom and can only be edited one at a time. After one week passes, you won't be able to edit the journal entry of the previous week.