Parthorama

Parthonyte

 

Parthonyte (implemented in Java) is an open source Python dialect in which all operators precede their operands, and parentheses are used for all grouping (except string literals, which are delimited with double quotes, also statements are separated by semicolons). Parthonyte source files have a .PTHY extension. Parthotags is a text markup language, with a .POTG extension. Parthonyte boasts an ultra-simple Lisp-like syntax unlike all other languages.

Special Characters

  • Core:
    • ()  grouping
    • -  word separator
    • ;  end of stmt.
    • :  dot operator
    • "  string delimiter
    • \  escape char.
  • Operators:
    • + - * / %
    • = < >
    • & | ^ ~ ! ?
  • Other:
    • #  comment
    • {}  block comment
    • _  used in identifiers
    • $  string prefix char.

Differences from Python

  • Parentheses, not whitespace
  • Operators come before their operands
  • Integration with Parthotags
  • Information hiding: public/private
  • Single, not multiple inheritance
  • Adds interfaces: "hedron" defs.
  • Drops iterators and generators
  • Adds lambdas
  • Adds quote and list-compile functions, treating code as data
  • Adds cons, car and cdr functionality

Parthotags

Parthotags is a simplified markup language used to replace HTML. Mock JSON files using Parthotags syntax have a .POTJ extension, and include no commas. Instead of myid: val, use [myid: val]. Instead of [1, 2, 3], use [arr: [: 1][: 2][: 3]]. Arbitrary Parthotags code can be embedded in the Parthonyte echo statement. Parthotags syntax, where asterisk (*) means occurs zero or more times, is defined as follows:

  • Tags:
    • [tag]
    • [tag (fld val)*: body]
    • [tag (fld val)*| body |tag]
  • Body:
    • text
    • [(fld val)*: text]*
  • Parthonyte call:
    • [expr: <expr>]
    • [exec: <stmt>... ]
    • [pthy: <path>]
  • Note:
    • for fld = style, corresponding val = (fld val)*

Keyboard Aid

The close delim switch of the Parthonyte code editor enables the automatic insertion of a closing parenthesis, brace, or double quote whenever the open delimiter is inserted. The optional keyboard-aid feature enables hyphens, open parentheses, and close parentheses to be entered by typing semicolons, commas, and periods, respectively. When enabled, keyboard-aid can be temporarily suppressed by using the Ctrl key in conjunction with typing semicolons, commas, and periods (no character substitution takes place).

By convention, hyphens are used to separate words in multi-word identifiers, but semicolons are easier to type than hyphens. Similarly, commas and periods are easier to type than parentheses. Typing semicolon converts previous hyphen to a semicolon, and previous semicolon to a hyphen (use the Ctrl key to override this behaviour). Typing semicolon after close parenthesis simply inserts semicolon. Typing space after hyphen at end of identifier converts hyphen to underscore.

Benefits of Parthonyte

Parthonyte is simpler than any other object-oriented programming language, and integrates nicely with Parthotags, which is simpler than HTML. Operators come before their operands, also statements are semicolon-separated, so they never start with a parenthesis. Parthonyte is written in Java, so apps can be written in one or both of the Java and Parthonyte programming languages. Parthotags is simpler than HTML, based on nested rows and columns. A row cell is divided into multiple variable-width column cells, and a column cell is divided into multiple variable-height row cells.

More...

Please click on More to access miscellaneous Parthonyte documentation. Only the first 2 paragraphs of the More web page contain up-to-date info, the rest of that web page is obsolete.

[ Back to Top ]