Contents

Concatenative language

  • ACL
  • Ait
  • Breeze
  • Cat
  • colorForth
  • CoSy
  • Deque
  • Elymas
  • Enchilada
  • ETAC
  • Factor
  • Forth
  • Freelang
  • Gershwin
  • Joy
  • Kitten
  • Lviv
  • min
  • mjoy
  • Mlatu
  • Om
  • Onyx
  • Plorth
  • Popr
  • PostScript
  • Quackery
  • r3
  • Raven
  • Retro
  • Staapl
  • Stabel
  • Trith
  • Worst
  • xs
  • XY
  • 5th
  • 8th

Other languages

  • APL
  • C++
  • Erlang
  • FP trivia
  • Haskell
  • Io
  • Java
  • JavaScript
  • Lisp
  • ML
  • Oberon
  • RPL
  • Self
  • Slate
  • Smalltalk

Computer Science

  • Type systems
  • Language paradigms
  • Compilers
  • Interpreters
  • Garbage collection

Meta

  • Search
  • Farkup wiki format
  • People
  • Etiquette
  • Sandbox
Front Page All Articles Recent Changes Random Article

Mogun

Mogun language is currently in early design stage. Its primary target is low-level speed-critical tasks, which you do not normally write on Factor itself (cell tags, GC, etc). Core of its design is programmer-friendly static typing with transparent and precise control over any compiler optimizations. Possibly, it's going to be LLVM-backended.

Basic Principles

Local stack shuffling

Only local stack shuffling primitive is "( .. )" syntax. It can rearrange and name any constant number of top stack elements. All other simple shufflers and combinators are normal words:

: drop ( >X ) ;
: dup ( <X X ) ;
: swap ( <Y X >Y ) ;

: dip -- ( >X QUOT ) call X ;
: keep -- ( X QUOT ) call X ;

: 2drop drop drop ;
: 2dip -- swap [ dip ] dip ;

: bi -- [ keep ] dip call ;
: bi* -- [ dip ] dip call ;
: bi@ -- dup bi* ;

In combinators defititions you can see "--" word, which do not appear in shufflers. This word is unusual for Factor and its function will be described later.


CLASS: integer { min integer } { max integer } ;

CLASS: sgn ;

CLASS: positive < sgn ;
CLASS: zero     < sgn ;
CLASS: negative < sgn ;

MIMIC: integer sgn

This revision created on Thu, 4 Jun 2009 11:35:17 by Keyholder

Latest Revisions Edit

All content is © 2008-2022 by its respective authors. By adding content to this wiki, you agree to release it under the BSD license.