Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
An experiment: A duck-typed, object-oriented, syntax-driven (and potentially awesome) programming language.
JavaScript
Tag: v0.2.0-alpha1

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
build
jscc
lib
sample
.gitignore
LICENSE
README.md
makefile
version.txt

README.md

Magnet

An interpreted awesome programming language

Magnet is an object-oriented programming language, that is prototype-based to the point of real types being absent in favor of duck types.
E.g. every object providing a read method that returns a readable, is considered "readable" (meaning it can represent a string). Since this causes a recursion, there must be some "primal" readable to end that: Such primal readable is also known as a String Object in Magnet.

Furthermore, Magnet is syntax driven. This means: Everything that can be done to reduce code, retain simplicity and to amaze the developer, IS done!

Example

5 * {puts '5 times'}

Displays '5 times' five times.

'Hello':split.each({char :: puts char})

Displays 'Hello', with each character on a new line.

Learn more about Magnet in the docs.

Install

  1. Make sure node.js is installed.
  2. Download Magnet: stable | bleeding edge (recommended)
  3. Run make.

That's it. Now try
> magnet sample/test.mg on Windows
$ ./magnet sample/test.mg on UNIX

License

Copyright (c) 2012 by Marcel Klehr
MIT License (see LICENSE)

Third-party software

This software uses a slightly modified version of JS/CC - A LALR(1) Parser Generator written in JavaScript (contained in /jscc)
Copyright (c) 2007, 2008 by J.M.K S.F. Software Technologies, Jan Max Meyer jscc!AT!jmksf.com, http://www.jmksf.com
3-clause BSD License (see jscc/jscc.js for more information)

Something went wrong with that request. Please try again.