Giter VIP home page Giter VIP logo

het's Introduction

HET

Build Linux Windows Coverity
status GitHub CI build status AppVeyor CI build status Coverity Scan Build Status

HET is a very simple educational programming language dating from 1976 and described in this document, pages 59-78 and in this report.

Overview

HET looks like an imperative version of Joy. The abstract machine that the language implements offers a working stack (WS), a program stack (PS), and memory (MEM). The datatypes of the language are: word, list, and 16 special characters. Whitespace characters are needed to separate words from each other.

Datatypes

The specials are described in the following table. The arity in this table tells how many items are taken from the WS and how many are returned.

Special Arity Description
! 1/0 Move an item from the WS to the PS, unpacking list items.
$ 1/0 Execute a foreign function. Addition
% 2/1 Create a new local name and assign the next item from the WS. Addition
# 0/0 Ignore the rest of the line. Addition
* 1/1 Replace a word on the WS with its definition.
+ 2/1 Add an item to a list.
. 1/0 Print an item from the WS and a newline. Remove the item. Addition
/ 1/2 Divide a non-empty list into rest and first.
: 2/1 Take a word and an item from the WS and store the assignment in MEM.
; 1/0 Remove an item from the WS.
< 1/1 Take a word from the WS and push a list with the characters of the word.
= 2/1 Take the top two items from the WS and push t or f depending on equality.
> 1/1 Take a list of characters from the WS and push the concatenated word.
? 1/1 Take an item from the WS and push its type: w, l, or s.

Changes

The document has up-arrow and down-arrow as specials. These are non-ASCII characters, so I have changed them into * and :. The report has ^ instead of the up-arrow and \ instead of /.

Additions

The document allows debug output, so I am adding ., allowing normal output and making debug output optional; # can be used to comment out the rest of the line; $ adds foreign functions; % adds local definitions.

Installation

There is a bootable floppy-image with the version from the report.

Install and start DOSBox. At the prompt type: boot c:/HET_flop_image or whatever.

Note: The links to the report and the floppy-image are currently dead. They are mentioned here.

The version presented here can be built with these commands:

cmake .
cmake --build .

het's People

Contributors

wodan58 avatar

Watchers

 avatar  avatar

Forkers

gnodvi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.