GithubHelp home page GithubHelp logo

sutra-gh / phix Goto Github PK

View Code? Open in Web Editor NEW

This project forked from petelomax/phix

0.0 0.0 0.0 383.16 MB

The Phix Programming Language

Home Page: http://phix.x10.mx/

License: Other

JavaScript 8.69% Python 0.20% C 0.09% PHP 0.02% Go 0.18% Assembly 28.82% CSS 0.27% HTML 0.61% Batchfile 0.03% Euphoria 61.10%

phix's Introduction

Phix is a self-hosted hybrid interpreter/compiler, developed by Pete Lomax. It is very easy to use, and similar to Euphoria.

Official site: http://phix.x10.mx/

A single 16MB download contains a pre-compiled executable, all the sources, and everything needed to recompile them, in about 15 seconds. The download also contains a full-featured programmer's editor and 130+ demo programs.

Perhaps the most striking feature of Phix is that it has just five builtin data types:

    <-------- object --------->
    |                |
    +-atom           +-sequence
      |                |
      +-integer        +-string

Despite such apparent simplicity, or perhaps precisely because of it, Phix programs are pretty fast - not quite achieving the runtime performance of C or assembly, but making up for it with a very fast edit/run cycle and proper human-readable messages should anything go wrong (even in shipped pre-compiled executables). Sequences are the real powerhouse of Phix. The one type covers lists, queues, tables, trees, and arrays, with strings being the subset that is array of character. They can grow and shrink automatically without any memory management overhead. For example if s="food" then s[2..3]="e" makes s "fed", and then s[2..1]="east" makes s "feasted".

Phix applies the principle of least surprise, for instance in some languages myproc(list) or res = myfunc(list) can mangle list, whereas in Phix if you actually want that to happen you would code list = myproc(list) (and myproc would need to become a function) or {res,list} = myfunc(list). Likewise 1/2 is 0.5 (not 0, unless you explicitly ask for the floor()) and 0-1 is -1 (not +MAXINT). A core tenet is that for any line of code there is one and only one possible interpretation of it, and said meaning is utterly intuitive.

The principle goal of Phix is to make debugging easier, a whole subject area that does not seem to get the attention it deserves. Not entirely sure I am succeeding, yet.

phix's People

Contributors

petelomax avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.