Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jwatzman
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
My Favourite Diff
(essays.jwatzman.org)
205 points
by
jwatzman
7y ago
|
84 comments
32.
▲
by
jwatzman
7y ago
Back in 2015, I somehow ended up as part of a panel discussion at the end of a conference. The panel was going to include Joe Armstrong, Don Syme (inventor of F#), Tony Hoare (!), and myself (a nobody compared to any of them). During the co
33.
▲
by
jwatzman
7y ago
For better or worse, the US is far from unique in this, e.g., this high-profile case here in the UK from the past few weeks: https://www.bbc.co.uk/news/uk-47847740
34.
▲
by
jwatzman
9y ago
> Apache placed React's BSD + PATENTS in "Category-X", banning it from being used in Apache projects: The GPL, LGPL, and AGPL are also in that list, so by itself this isn't much of an indictment of the license itself.
35.
▲
by
jwatzman
11y ago
> I was actually most interested to hear about HHIR and their general compiler pipeline. You might also be interested in this post, which goes into some more detail about HHBC and HHIR, and gives some examples of what it looked like abou
36.
▲
by
jwatzman
11y ago
FB engineer here. We did migrate slowly, to Hack http://hacklang.org/ . It's a typed dialect of PHP, notably with full backwards compatibility, so we didn't have to rewrite all of our code as we converted over and
37.
▲
HHVM: Announcing Experimental Mac OS X Support
(hhvm.com)
5 points
by
jwatzman
11y ago
|
0 comments
38.
▲
by
jwatzman
11y ago
I don't know the history of threads/NPTL on Linux. However, the distinction between "thread" and "process" in the Linux kernel is mostly a human one, not a technical one. Take a look at the clone() syscall -- s
39.
▲
by
jwatzman
11y ago
> The second option is to do an oldschool fork() and communicate with message-passing. Or have a master that manages workers and communicates with ZMQ, HTTP, TCP, IPC, etc. Or use a library that does it all for you like parmap, Async Par
40.
▲
by
jwatzman
11y ago
It's worth pulling out what I think is the most fundamental difference between the two type systems, from the end of the article: After writing a couple small programs in Hack I've realized that it's not types themselves tha
41.
▲
by
jwatzman
12y ago
The async support you linked, while useful, isn't really the same thing. It requires explicit, manual coordination between different parts of the code that want to fetch data. You're responsible yourself for batching fetches, poll
42.
▲
by
jwatzman
12y ago
It's not on the list since it was released a few versions ago! Try it in the latest stable version, and please file issues on GitHub if you run into problems. There are already a couple of known issues filed there that are being looked
43.
▲
Coming Soon in HHVM
(hhvm.com)
114 points
by
jwatzman
12y ago
|
58 comments
44.
▲
by
jwatzman
12y ago
Take a look at the homepage: http://hacklang.org/
45.
▲
by
jwatzman
12y ago
The reason we called it a transpiler here is that the output is source code in another language that is intended as the input to another compiler (well, the PHP5 runtime in this case, but same general idea). It doesn't execute code, or
46.
▲
Hacklang: Overriding Constructors, “new Static”, and __ConsistentConstruct
(hhvm.com)
2 points
by
jwatzman
12y ago
|
0 comments
47.
▲
by
jwatzman
12y ago
It's not that the tyepchecker will miss things, it's that, for folks coming from other languages, it's not clear that there even exists a separate typechecker you have to run! There isn't a mailing list right now. A few
48.
▲
by
jwatzman
12y ago
Can you elaborate on these incompatibilities, particularly generators? I work on the project and the only generator incompatibility I know of is that what PHP5 calls "Generator" we call "Continuation", but only since we
49.
▲
by
jwatzman
12y ago
HHVM enforces the checks purely dynamically as it actually executes code. There's a totally separate tool that does the full static type analysis. See my sibling comment for details: https://news.ycombinator.com/item?id
50.
▲
by
jwatzman
12y ago
Unfortunately the only way to get type errors statically right now is to run `hh_client` at the command line (see http://docs.hhvm.com/manual/en/install.hack.bootstrapping.ph... ) -- this is what vim-hack will do f
51.
▲
by
jwatzman
13y ago
> type hints which are required (I think) Only in strict mode; in partial or decl mode, you can leave off the annotations. In fact, a large fraction of PHP files are also valid Hack files in partial mode. The article has a decent explana
52.
▲
by
jwatzman
13y ago
Many engineers here use vim and emacs. We ship integration scripts for both of them -- in `/usr/share/hhvm/hack` in the Debian and Ubuntu binaries, in `hphp/hack/editor-plugins` in the github repo.
53.
▲
by
jwatzman
13y ago
I'm not sure why you think this is un sound. We check traits in isolation -- we ensure that methods you call are either defined in the trait or declared abstract (and so must be defined in the including class). We also added "tra
54.
▲
by
jwatzman
13y ago
At runtime, we check and enforce parameter types at function entry and return types at function exit. The extra type information can also enable the JIT to emit more efficient code in some cases, and work is ongoing to make that even more e
55.
▲
by
jwatzman
13y ago
It depends on what you mean by "with Hack". You cannot do this in Hack code -- we disallow the dynamic features of the language you need to do this; they are impossible to statically typecheck and verify. However, Hack code iterop
56.
▲
by
jwatzman
13y ago
The js_of_ocaml bits are actually what are powering our interactive tutorial ( http://hacklang.org/tutorial/ ) -- the tutorial is actually a full build of the typechecker running in your browser :) The source for it is m
57.
▲
by
jwatzman
13y ago
You are reading the documentation right. I wasn't here when the syntax was codified, but my understanding is the following. For parameter types our hands were tied, since PHP actually already has this syntax for object types (unless we
58.
▲
by
jwatzman
13y ago
Engineer working on Hack here. We don't do any type inference across function boundaries, so we largely dodge the issue that I think you are getting at. (Please elaborate if I misunderstand!) We rely on interface and class definitions
59.
▲
by
jwatzman
13y ago
Not Bryan, but I am an engineer who works on Hack :) We don't (statically) protect against type errors when you cross from untyped into typed code. If you call an untyped function, we assume the programmer knows what they are doing --
60.
▲
by
jwatzman
13y ago
Engineer working on Hack here. Yeah, I think Hack is a good language to start a new project in. For as much flak as PHP gets, there are actually a lot of good things about the language. The fast development cycle -- edit php script, refresh
More ›