Is this modeled after any particular Lisp? It looks a little bit like Clojure.
(:some-list 1)
Here, some-list is just a variable while the : prefix tells Pharen that you are trying to index into it.21–30 of 43 posts
Is this modeled after any particular Lisp? It looks a little bit like Clojure.
(:some-list 1)
Here, some-list is just a variable while the : prefix tells Pharen that you are trying to index into it.My current project involves generating php from a declarative definition and this could be just the right tool for the job! Maybe it will make switching to common lisp a lot easier once I learned enough of it :D
Hi everyone, I'm the creator of Pharen. Feel free to ask me questions or remind me why this is a terrible idea. :) Yes there are a lot of issues with cross-language compilers. That said, Coffeescript: http://coffeescript.org , which compiles its own language to Javascript has had a lot of success and is being used in production. So it's at least possible to use languages like this. The extra layer of abstraction is a…
You could always just add the S-Expression that became the php code as a comment. From there it should be trivial to find it in the Pharen code.
Earlier quoted context omitted.
HAH! I think, strictly, the former. (I actually laughed out loud at this :_)
Fair enough. I've never programmed in lisp. I just assumed that lisp didn't have native server abstractions like $_REQUEST - and that Pharen may expose those.
Earlier quoted context omitted.
What is it for?
Originally, for fun! It gives you a chance to use Lisp's syntax and mentality if you're stuck with PHP on the backend. Moreover, you have features like macros and lexical scope, which can be useful.
I just wondered if it had been built for a specific project and if so what problems it was trying to solve.
It's funny - I've spent the past few years thinking about high-level languages that would compile down to lisp. Recently I've seen a number that go the other way.
I pretty much like the partial such as (map (* 2) [1 2 3]). Do you plan on adding something like (map (/ _ 2) [1 2 3]) like Arc or a #(.. % ..) clojure equivalent?
Hi everyone, I'm the creator of Pharen. Feel free to ask me questions or remind me why this is a terrible idea. :) Yes there are a lot of issues with cross-language compilers. That said, Coffeescript: http://coffeescript.org , which compiles its own language to Javascript has had a lot of success and is being used in production. So it's at least possible to use languages like this. The extra layer of abstraction is a…
One thing I don't understand is why there is special unnatural-looking syntax for dictionaries. It is inconsistent that comma=whitespace everywhere else. Perhaps something like:
(array "a"=>1 "b"=>2)
Note that this currently compiles to array("a", =>1, "b", =>2)