Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

edited body
Source Link
SuperJedi224
  • 12k
  • 2
  • 46
  • 68

ForceLang

ForceLang (name proposed by TanMath) is a programming language I published on January 12.

Functionality includes arbitrary-precision rational numbers, both console and GUI IO, and file input (file output has not yet been added, but will likely be added later)

Control flow is currently handled using gotoes, evaluated gotoes, and conditionals.

Length 1 snippet: 0

A number literal for the rational number 0/1.

Length 2 snippet: io

The io namespace contains the language's console and file IO functionality. GUI IO is located in a separate namespace.

Length 3 snippet: nil

A constant field containing the null reference.

Length 4 snippet: 0xFF

A hexadecimal number literal for the rational number 255/1 (hexadecimal literals can only be used for integers).

Hex literals are useful as color codes for the language's (currently somewhat limited) graphics library.

Length 5 snippet: 11/13

A number literal for the rational number 11/13, which is stored exactly as a BigRational.

Length 6 snippet: !!TRUE

Obviously, this returns TRUE.

Length 7 snippet: def a a

An abuse of the def instruction that causes any successivesubsequent attempts to evaluate the expression a to result in an infinite loop.

Length 8 snippet: gui.show

A method that produces a simple gui alert.

Length 9 snippet: math.sqrt

Estimates the square root of a number as another BigRational. It does this by doing some math to find a BigIntegeran integer which approximates this value, then applying four iterations of the Babylonian Method to this initial approximation.

Length 11 snippet: random.rand

The function random.rand can be used to produce random numbers on [0, (2^m-1)/(2^m)] for arbitrary positive integer values of m (effectively on [0,1) as m becomes large). When called with no arguments (random.rand()) it uses m=80.


Some other answers in this language:

ForceLang

ForceLang (name proposed by TanMath) is a programming language I published on January 12.

Functionality includes arbitrary-precision rational numbers, both console and GUI IO, and file input (file output has not yet been added, but will likely be added later)

Control flow is currently handled using gotoes, evaluated gotoes, and conditionals.

Length 1 snippet: 0

A number literal for the rational number 0/1.

Length 2 snippet: io

The io namespace contains the language's console and file IO functionality. GUI IO is located in a separate namespace.

Length 3 snippet: nil

A constant field containing the null reference.

Length 4 snippet: 0xFF

A hexadecimal number literal for the rational number 255/1 (hexadecimal literals can only be used for integers).

Hex literals are useful as color codes for the language's (currently somewhat limited) graphics library.

Length 5 snippet: 11/13

A number literal for the rational number 11/13, which is stored exactly as a BigRational.

Length 6 snippet: !!TRUE

Obviously, this returns TRUE.

Length 7 snippet: def a a

An abuse of the def instruction that causes any successive attempts to evaluate the expression a to result in an infinite loop.

Length 8 snippet: gui.show

A method that produces a simple gui alert.

Length 9 snippet: math.sqrt

Estimates the square root of a number as another BigRational. It does this by doing some math to find a BigInteger which approximates this value, then applying four iterations of the Babylonian Method.

Length 11 snippet: random.rand

The function random.rand can be used to produce random numbers on [0, (2^m-1)/(2^m)] for arbitrary positive integer values of m (effectively on [0,1) as m becomes large). When called with no arguments (random.rand()) it uses m=80.


Some other answers in this language:

ForceLang

ForceLang (name proposed by TanMath) is a programming language I published on January 12.

Functionality includes arbitrary-precision rational numbers, both console and GUI IO, and file input (file output has not yet been added, but will likely be added later)

Control flow is currently handled using gotoes, evaluated gotoes, and conditionals.

Length 1 snippet: 0

A number literal for the rational number 0/1.

Length 2 snippet: io

The io namespace contains the language's console and file IO functionality. GUI IO is located in a separate namespace.

Length 3 snippet: nil

A constant field containing the null reference.

Length 4 snippet: 0xFF

A hexadecimal number literal for the rational number 255/1 (hexadecimal literals can only be used for integers).

Hex literals are useful as color codes for the language's (currently somewhat limited) graphics library.

Length 5 snippet: 11/13

A number literal for the rational number 11/13, which is stored exactly as a BigRational.

Length 6 snippet: !!TRUE

Obviously, this returns TRUE.

Length 7 snippet: def a a

An abuse of the def instruction that causes any subsequent attempts to evaluate the expression a to result in an infinite loop.

Length 8 snippet: gui.show

A method that produces a simple gui alert.

Length 9 snippet: math.sqrt

Estimates the square root of a number as another BigRational. It does this by doing some math to find an integer which approximates this value, then applying four iterations of the Babylonian Method to this initial approximation.

Length 11 snippet: random.rand

The function random.rand can be used to produce random numbers on [0, (2^m-1)/(2^m)] for arbitrary positive integer values of m (effectively on [0,1) as m becomes large). When called with no arguments (random.rand()) it uses m=80.


Some other answers in this language:

added 518 characters in body
Source Link
SuperJedi224
  • 12k
  • 2
  • 46
  • 68

ForceLang

ForceLang (name proposed by TanMath) is a programming language I published on January 12.

Functionality includes arbitrary-precision rational numbers, both console and GUI IO, and file input (file output has not yet been added, but will likely be added later)

Control flow is currently handled using gotoes, evaluated gotoes, and single-line conditionals.

Length 1 snippet: 0

A number literal for the rational number 0/1.

Length 2 snippet: io

The io namespace contains the language's console and file IO functionality. GUI IO is located in a separate namespace.

Length 3 snippet: nil

A constant field containing the null reference.

Length 4 snippet: 0xFF

A hexadecimal number literal for the rational number 255/1 (hexadecimal literals can only be used for integers).

Hex literals are useful as color codes for the language's (currently somewhat limited) graphics library.

Length 5 snippet: 11/13

A number literal for the rational number 11/13, which is stored exactly as a BigRational.

Length 6 snippet: !!TRUE

Obviously, this returns TRUE.

Length 7 snippet: def a a

An abuse of the def instruction that causes any successive attempts to evaluate the expression a to result in an infinite loop.

Length 8 snippet: gui.show

A method that produces a simple gui alert.

Length 9 snippet:math.sqrt

Estimates the square root of a number as another BigRational. It does this by doing some math to find a BigInteger which approximates this value, then applying four iterations of the Babylonian Method.

Length 11 snippet:random.rand

The function random.rand can be used to produce random numbers on [0, (2^m-1)/(2^m)] for arbitrary positive integer values of m (effectively on [0,1) as m becomes large). When called with no arguments (random.rand()) it uses m=80.


Some other answers in this language:

ForceLang

ForceLang (name proposed by TanMath) is a programming language I published on January 12.

Functionality includes arbitrary-precision rational numbers, both console and GUI IO, and file input (file output has not yet been added, but will likely be added later)

Control flow is currently handled using gotoes, evaluated gotoes, and single-line conditionals.

Length 1 snippet: 0

A number literal for the rational number 0/1.

Length 2 snippet: io

The io namespace contains the language's console and file IO functionality. GUI IO is located in a separate namespace.

Length 3 snippet: nil

A constant field containing the null reference.

Length 4 snippet: 0xFF

A hexadecimal number literal for the rational number 255/1 (hexadecimal literals can only be used for integers).

Hex literals are useful as color codes for the language's (currently somewhat limited) graphics library.

Length 5 snippet: 11/13

A number literal for the rational number 11/13, which is stored exactly as a BigRational.

Length 6 snippet: !!TRUE

Obviously, this returns TRUE.

Length 7 snippet: def a a

An abuse of the def instruction that causes any successive attempts to evaluate the expression a to result in an infinite loop.

Length 8 snippet: gui.show

A method that produces a simple gui alert.


Some other answers in this language:

ForceLang

ForceLang (name proposed by TanMath) is a programming language I published on January 12.

Functionality includes arbitrary-precision rational numbers, both console and GUI IO, and file input (file output has not yet been added, but will likely be added later)

Control flow is currently handled using gotoes, evaluated gotoes, and conditionals.

Length 1 snippet: 0

A number literal for the rational number 0/1.

Length 2 snippet: io

The io namespace contains the language's console and file IO functionality. GUI IO is located in a separate namespace.

Length 3 snippet: nil

A constant field containing the null reference.

Length 4 snippet: 0xFF

A hexadecimal number literal for the rational number 255/1 (hexadecimal literals can only be used for integers).

Hex literals are useful as color codes for the language's (currently somewhat limited) graphics library.

Length 5 snippet: 11/13

A number literal for the rational number 11/13, which is stored exactly as a BigRational.

Length 6 snippet: !!TRUE

Obviously, this returns TRUE.

Length 7 snippet: def a a

An abuse of the def instruction that causes any successive attempts to evaluate the expression a to result in an infinite loop.

Length 8 snippet: gui.show

A method that produces a simple gui alert.

Length 9 snippet:math.sqrt

Estimates the square root of a number as another BigRational. It does this by doing some math to find a BigInteger which approximates this value, then applying four iterations of the Babylonian Method.

Length 11 snippet:random.rand

The function random.rand can be used to produce random numbers on [0, (2^m-1)/(2^m)] for arbitrary positive integer values of m (effectively on [0,1) as m becomes large). When called with no arguments (random.rand()) it uses m=80.


Some other answers in this language:

replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

ForceLang

ForceLang (name proposed by TanMath) is a programming language I published on January 12.

Functionality includes arbitrary-precision rational numbers, both console and GUI IO, and file input (file output has not yet been added, but will likely be added later)

Control flow is currently handled using gotoes, evaluated gotoes, and single-line conditionals.

Length 1 snippet: 0

A number literal for the rational number 0/1.

Length 2 snippet: io

The io namespace contains the language's console and file IO functionality. GUI IO is located in a separate namespace.

Length 3 snippet: nil

A constant field containing the null reference.

Length 4 snippet: 0xFF

A hexadecimal number literal for the rational number 255/1 (hexadecimal literals can only be used for integers).

Hex literals are useful as color codes for the language's (currently somewhat limited) graphics library.

Length 5 snippet: 11/13

A number literal for the rational number 11/13, which is stored exactly as a BigRational.

Length 6 snippet: !!TRUE

Obviously, this returns TRUE.

Length 7 snippet: def a a

An abuse of the def instruction that causes any successive attempts to evaluate the expression a to result in an infinite loop.

Length 8 snippet: gui.show

A method that produces a simple gui alert.


Some other answers in this language:

ForceLang

ForceLang (name proposed by TanMath) is a programming language I published on January 12.

Functionality includes arbitrary-precision rational numbers, both console and GUI IO, and file input (file output has not yet been added, but will likely be added later)

Control flow is currently handled using gotoes, evaluated gotoes, and single-line conditionals.

Length 1 snippet: 0

A number literal for the rational number 0/1.

Length 2 snippet: io

The io namespace contains the language's console and file IO functionality. GUI IO is located in a separate namespace.

Length 3 snippet: nil

A constant field containing the null reference.

Length 4 snippet: 0xFF

A hexadecimal number literal for the rational number 255/1 (hexadecimal literals can only be used for integers).

Hex literals are useful as color codes for the language's (currently somewhat limited) graphics library.

Length 5 snippet: 11/13

A number literal for the rational number 11/13, which is stored exactly as a BigRational.

Length 6 snippet: !!TRUE

Obviously, this returns TRUE.

Length 7 snippet: def a a

An abuse of the def instruction that causes any successive attempts to evaluate the expression a to result in an infinite loop.

Length 8 snippet: gui.show

A method that produces a simple gui alert.


Some other answers in this language:

ForceLang

ForceLang (name proposed by TanMath) is a programming language I published on January 12.

Functionality includes arbitrary-precision rational numbers, both console and GUI IO, and file input (file output has not yet been added, but will likely be added later)

Control flow is currently handled using gotoes, evaluated gotoes, and single-line conditionals.

Length 1 snippet: 0

A number literal for the rational number 0/1.

Length 2 snippet: io

The io namespace contains the language's console and file IO functionality. GUI IO is located in a separate namespace.

Length 3 snippet: nil

A constant field containing the null reference.

Length 4 snippet: 0xFF

A hexadecimal number literal for the rational number 255/1 (hexadecimal literals can only be used for integers).

Hex literals are useful as color codes for the language's (currently somewhat limited) graphics library.

Length 5 snippet: 11/13

A number literal for the rational number 11/13, which is stored exactly as a BigRational.

Length 6 snippet: !!TRUE

Obviously, this returns TRUE.

Length 7 snippet: def a a

An abuse of the def instruction that causes any successive attempts to evaluate the expression a to result in an infinite loop.

Length 8 snippet: gui.show

A method that produces a simple gui alert.


Some other answers in this language:

Post Made Community Wiki by Dennis
added 126 characters in body
Source Link
SuperJedi224
  • 12k
  • 2
  • 46
  • 68
Loading
added 252 characters in body
Source Link
SuperJedi224
  • 12k
  • 2
  • 46
  • 68
Loading
added 67 characters in body
Source Link
SuperJedi224
  • 12k
  • 2
  • 46
  • 68
Loading
added 108 characters in body
Source Link
SuperJedi224
  • 12k
  • 2
  • 46
  • 68
Loading
added 99 characters in body
Source Link
SuperJedi224
  • 12k
  • 2
  • 46
  • 68
Loading
added 50 characters in body
Source Link
SuperJedi224
  • 12k
  • 2
  • 46
  • 68
Loading
added 154 characters in body
Source Link
SuperJedi224
  • 12k
  • 2
  • 46
  • 68
Loading
added 481 characters in body
Source Link
SuperJedi224
  • 12k
  • 2
  • 46
  • 68
Loading
added 80 characters in body
Source Link
SuperJedi224
  • 12k
  • 2
  • 46
  • 68
Loading
added 11 characters in body
Source Link
SuperJedi224
  • 12k
  • 2
  • 46
  • 68
Loading
Source Link
SuperJedi224
  • 12k
  • 2
  • 46
  • 68
Loading

AltStyle によって変換されたページ (->オリジナル) /