Live data from Hacker News

Hack: a new programming language for HHVM

code.facebook.com

51–60 of 422 posts

Re: Hack: a new programming language for HHVM

#51
post #33
post #25

Earlier quoted context omitted.

On Linux, we use the inotify subsystem to be informed every time you save a source file or switch branches. The hh_server process can then update its data structures immediately, without being explicitly asked.

I don't really get why this is the second paragraph on the page of a language though. It's like touting the jar command in an overview of Java.

The fact that we wanted the type system to be instantaneous drove some of our design decisions.

Re: Hack: a new programming language for HHVM

#52
I wish these extensions came by way of the PHP core rather than a language that is superimposed on PHP. However, this is awesome.

Is this a layer that is superimposed on PHP that falls back to the default interpreter for unimplemented features or is this a fresh implementation. I suppose my question is, how reliable is this. Are the core PHP bugs going to manifest here? If a bug gets fixed on core PHP, will hack be lagging behind?

Re: Hack: a new programming language for HHVM

#53
post #33
post #25

Earlier quoted context omitted.

On Linux, we use the inotify subsystem to be informed every time you save a source file or switch branches. The hh_server process can then update its data structures immediately, without being explicitly asked.

I don't really get why this is the second paragraph on the page of a language though. It's like touting the jar command in an overview of Java.

Was it debated whether this should be a tooling feature - thinking of an IDE plugin that parses and type-checks in the background rather than a dedicated service to watch text files on disk

Re: Hack: a new programming language for HHVM

#54
post #33
post #25

Earlier quoted context omitted.

On Linux, we use the inotify subsystem to be informed every time you save a source file or switch branches. The hh_server process can then update its data structures immediately, without being explicitly asked.

I don't really get why this is the second paragraph on the page of a language though. It's like touting the jar command in an overview of Java.

In Hack's case, the language is the implementation anyway.

Re: Hack: a new programming language for HHVM

#55
post #3

I'm the manager of the team that developed Hack, and I'm sitting here with some of the language designers. Happy to answer your questions.

Hi and thanks,

Are you planning a Windows build ?

do you think Hack could replace all PHP stacks (PHP cloud stacks , not talking about shared host wordpress toys) in a 5 years time frame ?

What do you think about the current state of PHP?

what would you tell PHP core devs about that?

Does an async frameworks like React runs with Hack?

What can you answer to people that are concerned that it is Facebook who is developping this?

Re: Hack: a new programming language for HHVM

#56
post #33
post #25

Earlier quoted context omitted.

On Linux, we use the inotify subsystem to be informed every time you save a source file or switch branches. The hh_server process can then update its data structures immediately, without being explicitly asked.

I don't really get why this is the second paragraph on the page of a language though. It's like touting the jar command in an overview of Java.

Adding static typing to a dynamic language means that more work must be done at compile time than at run time.

One appeal of dynamic languages is you don't have a long compile time[1].

So I imagine they emphasize this to address the worry that this will get ruined and there will be a horrible workflow.

[1] However Turbo Pascal was a one-pass typed compiler in the early 80s that was blazingly fast with 1 MHz CPUs and 64 KB RAM. :)

Re: Hack: a new programming language for HHVM

#57

Very excited to play with this. While I know many poo-poo PHP, it still is a pretty decent gateway language. If these type of innovations introduce hobby programmers into more professional practices and concepts, I'm all for it.

Well, it's been poo-pooed for obvious reasons (like Javascript) but those are the languages that are getting all the love in the end, so maybe I should stop programming in a language that I find beautiful (Ruby) and go with the flow. Yes, I'm slightly bitter :/

You should develop in whatever you love. It's a great thing to know multiple languages, though.

Re: Hack: a new programming language for HHVM

#58
post #3

I'm the manager of the team that developed Hack, and I'm sitting here with some of the language designers. Happy to answer your questions.

Does this presentation match the current version of Hack fairly well? It has a nice explanation of the type system that is more concise than the one on the web site.

https://raw.github.com/strangeloop/StrangeLoop2013/master/sl...

The idea of bolting a static checker onto a dynamic language and using an unresolved top type to make it work is cool. The presentation refers to your system as SoA gradual typing. Are there any papers or presentations which explain that approach and how it works in more detail? Particularly in how it might differ from gradual typing?

Re: Hack: a new programming language for HHVM

#59

I am baffled as to why you'd build your castle atop a crumbling foundation. I have wondered why FB didn't use a proper language with proper typing to begin with. I mean, I "understand" logistically: they already had a giant codebase in PHP, migrating a codebase is expensive, and it's difficult to hire and train 1000s of hackers in e.g., OCaml. (They do have some OCaml people, but they are outliers. OCaml was my favor…

As far as I can tell they are using local inference, which is basically just unification. The set of possible types seems pretty narrow[1] as well so I don't see much room to go wrong. You're right that there is a lot of mathematical theory about type systems and that inference can easily go wrong (be undecidable) but that is mostly for type systems that try to do inference for higher rank polymorphism and other things, which it doesn't seem like Hack is. Also I guess the language is supposed to be a superset of "valid" PHP, although I don't know whether this is true without modifying the PHP program much.

http://hacklang.org/manual/en/hack.annotations.types.php

Post reply on HN