5 ms·
Creator here: I didn't expected this to be linked here. Feel free to asked any questions about the project and I try to answer them.
by jenshaase 6y ago
Creator here: I didn't expected this to be linked here.
Feel free to asked any questions about the project and I try to answer them.
- progre 6y agoIs there a way to drop out to the REPL from a running script? Kinda like settrace in Python
- jenshaase 6y agoNo, this is not possible. However, with a better editor support it could be possible to send expression from the editor to the REPL. That way you can do "REPL Driven Development"
- progre 6y agoNice, should be easy in emacs. I'll try it! I'm currently on step 7 (quotes) of the MAL guide and my implementation lang is PHP, so this project hits close to home for me.
- progre 6y agoIs the Phel code actually compiled to PHP? From the example in the "Getting started section" it looks like the generated php is a wrapper that loads the interpreter.
- jenshaase 6y agoPhel code is compiled to PHP code (in terms of a string, not bytecode). However, the PHP Code is than interpreted by PHP using PHP's eval function.
- tasubotadas 6y agoWhy?
- capableweb 6y agoI know it's fashion to hate and question anything related to PHP. But the answer to this particular question is on the website that got linked in this submission. Here it is again: > Why Phel? > Phel is a result of my failed attempts to do functional programming in PHP. Basically I wanted: > - A LISP-inspired > - functional programming language > - that runs on cheap hosting providers > - and is easy to write and debug
- jenshaase 6y agoI'm a long term PHP developer and I always liked functional programming. However, PHP is not so good in it [1]. I think in general, PHP's shared nothing architecture is a very good fit for functional programming. You get a HTTP Request and return a HTTP Response. [1] https://phel-lang.org/blog/functional-programming-in-php/ https://phel-lang.org/blog/functional-programming-in-php/
- trizic 6y agoThe cheap hosting provider is possible by PHP only being loaded into memory when needed to run. So you can have tons code ready to run on disk with no performance impact. So it is definitely nice to see other languages compiled to PHP to make use of the cheap shared hosts.
- uDontKnowMe 6y agoI don't know Clojure or PHP completely fluently, so sorry if it's a stupid question, but why did you want to create a new language inspired by Clojure rather than a dialect of Clojure itself for PHP (in the same way as there is ClojureScript for JS and Clojure.NET for .NET)?
- jenshaase 6y agoI'm working on building a good language to target the PHP environment. There are a lot of feature that I can borrow from Clojure but not all of them are need. At some points I even go in another direction. I want to keep this freedom in order to build the best language that targets PHP.
- raspasov 6y agoThis is very cool. My two favorite languages are Clojure and PHP. Do you implement persistent data structures? (totally cool if not, just curious) Is Phel a subset/superset of Clojure? Perhaps a list of "differences from Clojure" vs "implemented features" would be useful for people looking at Phel.
- jenshaase 6y agoI currently working on persistent data structures. If I can make them fast enough they will be added.