Category:Phix
This programming language may be used to instruct a computer to perform a task.
Official website |
---|
Execution method: | Interpreted or compiled |
---|---|
Garbage collected: | Reference Counting |
Parameter passing methods: | By copy-on-write |
Type expression: | Explicit |
Type checking: | Dynamic, Static |
Lang tag(s): | phix, Phix |
See Also: |
Phix is a self-hosted hybrid interpreter/compiler, developed by Pete Lomax. It is very easy to use, and similar to Euphoria.
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.
My goal on rosettacode is to show that Phix is easy to understand (succinct but not terse), and easy to debug.
See also
Subcategories
This category has the following 8 subcategories, out of 8 total.
@
- Phix User (6 P)
P
- Phix/basics (123 P)
- Phix/Class (23 P)
- Phix/libcurl (19 P)
- Phix/mpfr (72 P)
- Phix/online (100 P)
- Phix/pGUI (118 P)
- Phix/xpGUI (3 P)
Pages in category "Phix"
The following 200 pages are in this category, out of 1,675 total.
(previous page) (next page)C
- Chaos game
- Character codes
- Chat server
- Chebyshev coefficients
- Check if a polygon overlaps with a rectangle
- Check if two polygons overlap
- Check input device is a terminal
- Check Machin-like formulas
- Check output device is a terminal
- Check that file exists
- Checkpoint synchronization
- Checksumcolor
- Chemical calculator
- Chernick's Carmichael numbers
- Cheryl's birthday
- Chess player
- Chinese remainder theorem
- Chinese zodiac
- Cholesky decomposition
- Chowla numbers
- Church numerals
- Cipolla's algorithm
- Circles of given radius through two points
- Circular primes
- Cistercian numerals
- Classes
- CLI-based maze-game
- Closest-pair problem
- Closures/Value capture
- Code Golf: Code Golf
- Code segment unload
- Collect and sort square numbers in ascending order from three lists
- Collections
- Color of a screen pixel
- Color quantization
- Color separation
- Color wheel
- Colorful numbers
- Colour bars/Display
- Colour pinstripe/Display
- Colour pinstripe/Printer
- Combinations
- Combinations and permutations
- Combinations with repetitions
- Combinations with repetitions/Square digit chain
- Comma quibbling
- Command-line arguments
- Commatizing numbers
- Comments
- Common list elements
- Common sorted list
- Compare a list of strings
- Compare length of two strings
- Compare sorting algorithms' performance
- Compile-time calculation
- Compiler/AST interpreter
- Compiler/code generator
- Compiler/lexical analyzer
- Compiler/Preprocessor
- Compiler/Simple file inclusion pre processor
- Compiler/syntax analyzer
- Compiler/Verifying syntax
- Compiler/virtual machine interpreter
- Composite numbers k with no single digit factors whose factors are all substrings of k
- Compound data type
- Concatenate two primes is also prime
- Concurrent computing
- Conditional structures
- Conjugate a Latin verb
- Conjugate transpose
- Consecutive primes with ascending or descending differences
- Consistent overhead byte stuffing
- Constrained genericity
- Constrained random points on a circle
- Continued fraction
- Continued fraction convergents
- Continued fraction/Arithmetic/Construct from rational number
- Continued fraction/Arithmetic/G(matrix ng, continued fraction n)
- Continued fraction/Arithmetic/G(matrix ng, continued fraction n1, continued fraction n2)
- Convert CSV records to TSV
- Convert decimal number to rational
- Convert seconds to compound duration
- Convex hull
- Conway's Game of Life
- Coprime triplets
- Coprimes
- Copy a string
- Copy stdin to stdout
- CORDIC
- Count how many vowels and consonants occur in a string
- Count in factors
- Count in octal
- Count occurrences of a substring
- Count the coins
- Count the coins/0-1
- Countdown
- Cousin primes
- Cramer's rule
- CRC-32
- Create a file
- Create a file on magnetic tape
- Create a two-dimensional array at runtime
- Create an executable for a program in an interpreted language
- Create an HTML table
- Create an object at a given address
- Create an object/Native demonstration
- Create your own text control codes
- Cross compilation
- CSV data manipulation
- CSV to HTML translation
- Cuban primes
- Cubic special primes
- Cullen and Woodall numbers
- Cumulative standard deviation
- Currency
- Currying
- Curve that touches three points
- Curzon numbers
- CUSIP
- Cut a rectangle
- Cycle detection
- Cycles of a permutation
- Cyclops numbers
- Cyclotomic polynomial
D
- Damm algorithm
- Data Encryption Standard
- Date format
- Date manipulation
- Dating agency
- Day of the week
- Day of the week of Christmas and New Year
- Days between dates
- De Bruijn sequences
- De Polignac numbers
- Deal cards for FreeCell
- Death Star
- Deceptive numbers
- Decimal floating point number to binary
- Decision tables
- Deconvolution/1D
- Deconvolution/2D+
- Decorate-sort-undecorate idiom
- Deepcopy
- Define a primitive data type
- Delegates
- Delete a file
- Deming's funnel
- Department numbers
- Descending primes
- Detect division by zero
- Determinant and permanent
- Determine if a string has all the same characters
- Determine if a string has all unique characters
- Determine if a string is collapsible
- Determine if a string is numeric
- Determine if a string is squeezable
- Determine if only one instance is running
- Determine if two triangles overlap
- Determine sentence type
- Dice game probabilities
- Digit fifth powers
- Digital root
- Digital root/Multiplicative digital root
- Dijkstra's algorithm
- Dinesman's multiple-dwelling problem
- Dining philosophers
- Diophantine linear system solving
- Disarium numbers
- Discordian date
- Discrete Fourier transform
- Display a linear combination
- Display an outline as a nested table
- Distance and Bearing
- Distinct palindromes within decimal numbers
- Distinct power numbers
- Distributed programming
- Distribution of 0 digits in factorial series
- Diversity prediction theorem
- Divide a rectangle into a number of unequal triangles
- DNS query
- Documentation
- Dominoes
- Doomsday rule
- Dot product
- Double Twin Primes
- Doubly-linked list/Definition
- Doubly-linked list/Element definition
- Doubly-linked list/Element insertion
- Doubly-linked list/Element removal
- Doubly-linked list/Traversal
- Dragon curve
- Draw a clock
- Draw a cuboid
- Draw a pixel
- Draw a rotating cube
- Draw a sphere
- Draw pixel 2
- Duffinian numbers
- Dutch national flag problem
- Dynamic variable names