|
1 | 1 | +++
|
2 |
| -title="The Phel Language" |
| 2 | +title = "Phel: A Functional Lisp Dialect for PHP Developers" |
3 | 3 | +++
|
4 | 4 |
|
5 |
| -Phel is a functional programming language that compiles to PHP. It is a dialect of Lisp inspired by [Clojure](https://clojure.org/) and [Janet](https://janet-lang.org/). |
| 5 | +**Phel** is a functional programming language that compiles down to PHP. It's a modern Lisp dialect inspired by [Clojure](https://clojure.org/) and [Janet](https://janet-lang.org/), tailored to bring functional elegance and expressive code to the world of PHP development. |
6 | 6 |
|
7 | 7 | <p align="center">
|
8 |
| - <img src="/images/logo_phel.svg" width="350" alt="Phel logo"/> |
| 8 | + <img src="/images/logo_phel.svg" width="350" alt="Phel language logo"/> |
9 | 9 | </p>
|
10 | 10 |
|
11 |
| -## Community |
| 11 | +## Join the Phel Developer Community |
12 | 12 |
|
13 |
| -Feel free to ask questions and join discussions on the [Phel Gitter channel](https://gitter.im/phel-lang/community). |
| 13 | +Got questions? Want to chat about macros, tail recursion, or why parentheses are awesome? |
| 14 | +Swing by the [Phel Gitter channel](https://gitter.im/phel-lang/community)—we're friendly, nerdy, and always happy to talk code. |
14 | 15 |
|
15 |
| -## Features |
| 16 | +## Key Features of Phel |
16 | 17 |
|
17 |
| -* Built on PHP's ecosystem |
18 |
| -* Good error reporting |
19 |
| -* Persistent Datastructures (Lists, Vectors, Maps and Sets) |
20 |
| -* Macros |
21 |
| -* Recursive functions |
22 |
| -* Powerful but simple Syntax |
23 |
| -* REPL |
| 18 | +Why code in Phel? Here's what makes it click: |
24 | 19 |
|
25 |
| -## Why Phel? |
| 20 | +- ✅ Runs on the rock-solid PHP ecosystem |
| 21 | +- 🧠 Helpful and human-readable error messages |
| 22 | +- 📚 Built-in persistent data structures: Lists, Vectors, Maps, Sets |
| 23 | +- 🧩 Macro system for advanced metaprogramming |
| 24 | +- 🔁 Tail-recursive function support |
| 25 | +- ✨ Minimal, readable Lisp syntax |
| 26 | +- 💬 Interactive REPL for tinkering and prototyping |
26 | 27 |
|
27 |
| -Phel is a result of my [failed attempts to do functional programming in PHP](/blog/functional-programming-in-php). Basically I wanted: |
| 28 | +## Why Choose Phel for Functional Programming in PHP? |
28 | 29 |
|
29 |
| -* A LISP-inspired |
30 |
| -* functional programming language |
31 |
| -* that runs on cheap hosting providers |
32 |
| -* and is easy to write and debug |
| 30 | +Phel started as an [experiment in writing functional PHP](/blog/functional-programming-in-php) and quickly turned into its own thing. |
33 | 31 |
|
| 32 | +It exists because we wanted: |
34 | 33 |
|
35 |
| -## Example |
| 34 | +- A Lisp-inspired functional language |
| 35 | +- That runs on affordable PHP hosting |
| 36 | +- That's expressive, debug-friendly, and easy to pick up |
36 | 37 |
|
37 |
| -The following example gives a short impression on how Phel looks like: |
| 38 | +If you've ever wished PHP was a bit more... functional, Phel is for you. |
| 39 | + |
| 40 | +## See Phel in Action — Sample Code |
38 | 41 |
|
39 | 42 | ```phel
|
40 | 43 | # Define a namespace
|
41 | 44 | (ns my\example)
|
42 | 45 |
|
43 |
| -# Define a variable with name "my-name" and value "world" |
| 46 | +# Create a variable |
44 | 47 | (def my-name "world")
|
45 | 48 |
|
46 |
| -# Define a function with name "print-name" and one argument "your-name" |
| 49 | +# Define a function |
47 | 50 | (defn print-name [your-name]
|
48 | 51 | (print "hello" your-name))
|
49 | 52 |
|
50 | 53 | # Call the function
|
51 | 54 | (print-name my-name)
|
52 | 55 | ```
|
53 | 56 |
|
54 |
| -## Try Phel |
| 57 | +If you know Lisp or Clojure, you'll feel right at home. If you don't—this is a great place to start. |
| 58 | + |
| 59 | +## Try Phel Instantly with Docker |
55 | 60 |
|
56 |
| -The quickest way to try out Phel is to run our REPL Docker container. |
| 61 | +No setup? No problem. You can run Phel's REPL right away: |
57 | 62 |
|
58 | 63 | ```bash
|
59 | 64 | docker run -it --rm phellang/repl
|
60 | 65 | ```
|
61 | 66 |
|
62 | 67 | 
|
63 | 68 |
|
64 |
| -## Getting started |
| 69 | +## Get Started with Phel in Minutes |
| 70 | + |
| 71 | +All you need is [PHP >=8.2](https://www.php.net/) and [Composer](https://getcomposer.org/). |
65 | 72 |
|
66 |
| -Phel requires [PHP >=8.2](https://www.php.net/) and [Composer](https://getcomposer.org/). |
| 73 | +> Follow our [Getting Started Guide](/documentation/getting-started) to build and run your first Phel program today. |
67 | 74 |
|
68 |
| -> Read the [Getting Started Guide](/documentation/getting-started) to create your first Phel program. |
| 75 | +## Development Status & How to Contribute |
69 | 76 |
|
70 |
| -## Status of Development |
| 77 | +Phel is approaching its 1.0 release, but we're still actively refining the language —and yes, breaking changes may happen. |
71 | 78 |
|
72 |
| -Phel is approaching completion, but it’s not yet considered fully stable. We’re committed to continuously improving the language, which means breaking changes may still happen as we refine and evolve the project. |
| 79 | +We're building this in the open. That means: |
| 80 | +- Found a bug? File an issue. |
| 81 | +- Got a cool idea? Open a pull request. |
| 82 | +- Want to shape the language's future? Let's talk. |
73 | 83 |
|
74 |
| -We actively welcome suggestions, improvements and bug reports —your feedback plays a vital role in helping us raise the quality of Phel. Whether through opening issues or submitting pull requests, every contribution helps the project grow stronger. |
| 84 | +Your feedback, ideas, and code help Phel grow into something great. |
0 commit comments