Skip to content

Instantly share code, notes, and snippets.

@iconmaster5326
Last active February 18, 2018 20:04
Show Gist options
  • Save iconmaster5326/be8a231b8e2f8b9d83697d5952ab2483 to your computer and use it in GitHub Desktop.
Save iconmaster5326/be8a231b8e2f8b9d83697d5952ab2483 to your computer and use it in GitHub Desktop.
Typhon: Quick start

Typhon Quick Start

This is a short guide to using TnClipse to inspect and run Typhon files.

Installing Eclipse

If you don't already have an Eclipse installation, download Eclipse here. Any configuration of Eclipse should do. The process should be guided by Eclipse, so no explanation is necesary here.

Getting the Source Code

For this guide, you'll need the Typhon repo checked out of Git. From the command line, this is as simple as:

git clone https://github.com/TyphonLang/Typhon.git

To see what else is part of the Typhon project, look at the orginization page.

Installing TnClipse

TnClipse is a plugin for Eclipse that lets you manipulate Typhon files.

To install TnClipse in your IDE, go to the Help menu, go to Install new software..., and then you will see the installation dialog. In the Work with field, there is a button labeled Add...; click on that and enter http://typhonlang.github.io/tnclipse/ in the Location field. Name it whatever you want. Hit OK, and soon enough the Typhon plugin will appear in the dialog. Check the checkbox called Typhon, and hit Next. Follow any further instructions, and TnClipse should now be installed.

Using TnClipse

First, switch to the Typhon perspective. Go to Window > Perspective > Open Perspective > Other... and select Typhon from the list.

Now that you are in the perspective for Typhon, let's import some Typhon examples into Eclipse. Right-click the blank area in the Naviagtor view, go to Import..., and select Existing projects into workspace. Navigate to the Typhon repo you checked out, and select the examples directory. Eclipse should indicate there is a project called TyphonExamples in that folder; import it. Now you should see a Typhon project in your Navigator view! Click on some .tn files and look in them.

Running Typhon programs

You can right-click the project, go to Run As, and select TnBox. From there, you will be asked for a main function to run. You can right-click individual files to run as well.

Alternately, you can set up a dedicated launch configuration for yourself. Go to Run As, select Run Configurations..., and create a new one under TnBox.

Thanks for the interest in my major project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment