If anyone is interested in learning a new language, I just pushed an update/overhaul for the Hack language (@HackLang) to the Learn X in Y Minutes site. Hadn't had a major update in >7 years!
learnxinyminutes.com/docs/hack/
If you’re having trouble with breakpoints in VSCode outside of lambdas, add hhvm.debugger.enable_debugger=1 to your configuration. This is only intended to be necessary for hphpd, but was accidentally used elsewhere. We’re also working on the lambda issues.
Initially we've open-sourced indexers and schemas for Javascript (Flow) and Hack/PHP, there also exist indexers for Python, Rust, C++/Objective C, and Java that we hope to open-source in the future. We'd welcome community-contributed indexers for other languages.
[6/8]
Glean is designed for high-performance large-scale source code indexing. Store information about your source code and query it efficiently, to power things like IDEs, code browsers, and analysis tools.
[2/8]
I'm delighted that we're finally able to open source Glean, the system we're building at Facebook for collecting and querying information about code:
glean.software
[1/8]
Sorry y’all, we’re delaying this weeks release (we’re expecting Thursday) to fix an assertion failure we’re seeing in many open source projects on our nightly builds
The Hack Standard Library (HSL) is now built in to HHVM 4.108 and the typechecker, including HSL-IO, which is no longer experimental
hhvm.com/blog/2021/05/0…
@SergiiShymko@azjezz@mattbrowndev@OndrejMirtes@psalmphp@phpstan This is often useful to convert a different - but common - error reporting mechanism to exceptions. e.g. a `throw_errno(posix_get_last_error())` helper which might throw a NotFoundException, AlreadyExistsException, IsADirectoryException, IsNotADir… as appropriate
@HackLang@azjezz@mattbrowndev@OndrejMirtes@psalmphp@phpstan Interesting. Thanks for this example. My only concern would be that such "noreturn" functions are rather rare. Most functions will throw exceptions (or exit() which they shouldn't) conditionally. In this case "noreturn" won't apply to them and won't help with the static analysis.
@azjezz@mattbrowndev@OndrejMirtes@psalmphp@phpstan@HackLang What do you mean by "halt execution"? Exceptions do not halt execution, they just interrupt the sequential execution flow. I don't see a conceptual different between ordinary functions/methods that occasionally throw exceptions and ones that always throw. Why distinguish them?