Welcome to the help page! Below is a selection of common questions with answers that may help you if you are new to Smap. See the answer to a question by clicking on the particular title.

Smap (a portmanteau for "small programs") is primarily an interactive source code editor that lets you write programs and execute them online in various programming languages. In addition, Smap allows you to save and manage your programs and make them available to other users. For these purposes Smap provides two core components: the SmapIE and the Browser.

In the header of the main Smap view, you can perform a quick search to find all programs containing a given keyword (like "quicksort") in its title, description, or list of tags. The list of such programs are shown in the Browser.

Furthermore, you can create new programs in a specific programming language with the SmapIE.

Each program stored in Smap has a unique identifier (a number). If you know this identifier, you can also use the "SmapIE" menu to open this program directly in the SmapIE.

SmapIE is an interactive source code editor and execution environment for small programs. If you are signed in and your program successfully executes, you can store your program and, thus, make it available to everybody in the world. If you want to keep it private for some time, you can also set its status to private (and make it later visible with the Browser).

If you don't want to sign in but use SmapIE just to try out some program, you cannot store your program in Smap. However, you can generate a URL to upload your program at some later time to SmapIE. For this purpose, generate an upload URL in SmapIE (via the "Options" menu) and copy the generated link.

The browser is the primary tool to search through and preview the programs stored in Smap.

You can use the Dashboard to look at all programs or filter programs by the implementation language or keywords occurring in the title, decsription, or tags.

Once you found an interesting program, you can open it in the browser or with SmapIE in order to execute and play with it. If you open a program in the browser, you see more details like a short description or the source code.

If you are signed in and you created this program, you can also delete it or make it visible to others (if it was created as private). Moreover, you can write a comment to a program or add programs from other authors to your favorites.

You can use Smap just to write and run some tiny program written in one of the currently supported languages. However, if you want to store your program in Smap so that you can improve or show it to other interested people, you must be signed in. Furthermore, writing comments to other programs or add them to your favorites is only possible if you are signed in.

If you are new to Smap and don't have an account, you can simply sign up and create an account by choosing a user name, password, and providing your email address.

In general, Smap can support any programming language provided that there exists some language mode for CodeMirror and a safe execution environment via some web service. Since the latter is more easy to install for declarative programming languages, Smap currently supports the following languages:

  • Curry: There are two execution environments provided for functional logic programs written in Curry: PAKCS, which compiles fairly fast, and KiCS2, which requires a considerably larger compilation time but is lazier for some features. For PAKCS, you can select between two systems: one computes all values of the initial expression main and the other one computes only the first value of the initial expression. KiCS2 can be used in a similar manner but has long execution times (which might cause a time out). Note that initial expressions of type IO are not allowed in all systems.
  • Haskell: Functional programs written in Haskell are executed by runghc, which is part of the Glasgow Haskell Compiler. Note that initial expressions main of type IO are not allowed.
  • Prolog: Logic programs written in Prolog are executed by SWI-Prolog. Programs are executed in a sandbox (see library sandbox of SWI-Prolog).

If you are are interested in the support for other languages, please contact the Smap maintainer.