Spring 2017/Environment setup

From LING073
Revision as of 18:21, 16 January 2017 by Jwashin1 (talk | contribs) (Using GNU/Linux)

Jump to: navigation, search

Using a virtual machine

A virtual machine is like a computer within a computer, in that you can run a guest operating system on a host operating system. In this class we will be using GNU/Linux (Debian) on Windows workstations.

Day 1 activity: To start the virtual machine on the workstations, click the start menu, type virtualbox, and click or press enter to run it. There is a list of virtual machines. The one you want is just called Debian. Once it starts, you can log on to the virtual machine with the username swatstudent and the password provided by your instructor. You may full-screen the virtual machine (you can use the right control key to get back to Windows). Then open a web browser and load this page to continue.

Also note: In order to have your working environment and all your files and settings there when you log in next time, you should sit down at the same workstation each time you come to class. You may also make a copy of the C:\virtualbox\Debian\Home.vdi image, and replace the copy on whichever workstation you sit down at on a given day. Be courteous to your classmates and just rename the original file, and rename it back when you leave—i.e., put back the Home file that was on the workstation originally when you leave.

Also, if you'd like to use the virtual machine on your own computer (don't spend time in class trying to get this working!), then you will need to download VirtualBox, and copy the Debian directory from C:\virtualbox\ on the workstations to your computer (e.g., over the network or using some form of external storage) and point your installation of VirtualBox add it. You may copy the Home.vdi file back and forth between systems to preserver your working environment.

Using GNU/Linux

Using a desktop installation of GNU/Linux these days is much like using other desktop operating systems, like Windows or macOS, with the exception of the command line.

The command line is what makes a linux system particularly powerful, and useful for activities such as those we'll be doing in this class. There is an endless amount of information online about how to use the command line. Here's a warm-up exercise:

Day 1 activity: Use a guide to using the linux command line like this one to get the last line of the Italian morphological analyser that is in your Source/apertium/languages/apertium-ita directory—specifically the file named apertium-ita.ita.dix. Once you've found it, do not announce what you've found—instead, help your neighbour find it, or if they already have, see if it's the same.

Editing a wiki

Day 1 activity: log in to the class wiki using your Swarthmore login credentials (link above), and create a user page. Your user page will have a url ending in User:student1, where student1 is your username. It's also linked to at the top of the page after you log in (as your username in red). Write a short introduction including any information you care to share (e.g., name, major, etc.) and a short bulleted list of a couple languages you're considering for your work in this class (or any languages you're interested in, generally, if you haven't thought about this yet). Add the page to the category sp17_students by adding [[Category:sp17_students]] at the very bottom of the page.

Using IRC

Internet Relay Chat is decades-old technology that allows for convenient real-time online messaging for large groups of people, and also between individuals.

The official IRC channel for this class (and unofficial Swarthmore Computational Linguistics IRC channel) is #cl on sccs.swarthmore.edu, kindly hosted by SCCS.

Any arbitrary channel can be started by any user, though. The server must be accessed through the campus network or VPN.

There are good, Free IRC clients for nearly every operating system. The Linux installation in the virtual machine for class comes with HexChat, which is a good option for that environment.

We will be using IRC as a way to interact outside of the classroom, and sometimes in. It can be a good way to ask me for help or clarification on an assignment, in which case your classmates could benefit too. You can also use it to have general discussion among yourselves, or work remotely in groups.

There's also an IRC channel for Apertium. We will be using Apertium and related software throughout the course, so this can be a good place to ask for assistance too.

Day 1 activity: start up HexChat on your virtual machine, set your username (e.g., to match your Swarthmore login name), log into the class channel, and greet everyone in the channel. You may need to disconnect after setting your username and log in again.

Using a command line

Day 1 activity: Make a directory in ~/Documents for your work in this class. Use cat to create a file in that directory, use nano to change the contents, and use cat to display it again.

Options for text editors

In this class you will be writing a lot of code (though no programming is required!) so you will want to get comfortable with a text editor. This article outlines the main options available to you in the virtual machine. If you aren't familiar with any text editors, I recommend gedit for everyday use and nano for use within a terminal.

Using git for version control

Day 1 activity: