start auto-generate mode (interval: 10sec)
dark/light theme

(0,0)

(127,0)

a playground for flure, a stack-based programming language

to create procedural binary graphic (1-bit), inspired by FORTH language

this playground consists of REPL mode (Enter) and Build mode

(Shift+Enter)

Quickstart

  • copy, x y ^ 5 % !to the console (right handside) then Shift+Enter
  • to clear a screen just hit Esc

  • Guides

    flure use reverse polish notation (RPN) eg 10 10 + will return 20

  • x and y correspond to x,y coordinates
  • arithmatics = +, -, *, /
  • bitwise = &, |, ^, <<, >>
  • stack = pop, push, show
  • function declaration (or word in FORTH's term): <args> ; eg. : loop 1 - dup 0 = if else loop then ;
  • compile mode = :, delimited compile mode = ;
  • basic control flow <case> if <if_case> else <else_case> then ;
  • comments = ( <...comments> )
  • immediately call a function = eg. : bob 20 20 + ; immediate, will return 40 without calling bob
  • core = (-1 = true, 0 = false)
  • =(equal) , <>(not equal)
  • and , or , >(greater_than), <(less_than)
  • dup(duplicate) , 2dup(double duplicate) , swap , rot(rotate)
  • abs(absolute number)
  • %(modulo), !(cast to 0 or 1)
  • to exit = bye

  • Examples

    each line below will computes a different results

    [note] current computed image size = 128px * 128px (these numbers (128 and 128) can be substituted by w and h).


  • x y ^ 5 % !
  • x y + abs x y - abs 1 + ^ 2 << 5 % !
  • x 2 * y % !
  • x w 2 / - w 4 / * y w 2 / - % !
  • MIT License, 2023, Bangkok Thailand https://github.com/karnpapon/flure

    (127,0)

    (127,127)

    .pbm (portable bitmap file format): 128px * 128px