Hacker News new | ask | show | jobs
by Scriptor 4592 days ago
I've been putting some thought into how I might implement some sort of type system that might at least partially help with separating IO and other side-effects. It's probably impossible to guarantee 100% purity, but I was thinking at the very lease I could use reflection to see if any functions called in a piece of code had arguments of or returned values of PHP's 'Resource' type.

What kinds of things make the repl crash for you? I know that most kinds of errors immediately cause it to exit. I should probably get around to adding an error handler to prevent that...

Phake (the build system) is pretty bare-bones right now and since I'm working on more optimization-related stuff I'm probably not working on it in the near future. However, I do want to work on making deployment in Pharen a lot easier and Phake'll help with that.

If you ever want to discuss this stuff more feel free to shoot an email on the mailing list (https://groups.google.com/forum/#!forum/pharen) or drop by #pharen on Freenode.

1 comments

Yeah, just various errors make it crash pretty hard. I've attempted to wrap an error handler into it but had no luck, I might try again and send a PR if I can get it to work.

Phake, that's the one. I was curious about it, as I think a nice LISP styled build system that can be bootstrapped with only PHP and the Pharen runtime-lib would be really awesome as a build system for PHP in general. With Composer and a lot of other projects, tooling in PHP is moving forward at a rapid pace, but we're all hacking together shitty build systems from scratch (or using Phing, which is painful in my experience). Phake could be a nice alternative. For now, I'm using Make and calling into Pharen directly :)