You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to learn Hack following this tutorial so I set up an Ubuntu 20.04 VirtualBox machine (guest) on my Windows 10 (host) laptop as a dev server. I successfully installed Hack and VS Code along with the Hack extension for IntelliSense, hinting, and code highlighting.
However, when I run hhvm -m server -p 8080 the server seems to launch and I can see the code results in a browser, but I get this error:
Failed to hugify the .text section
I tried changing a text string and saving it and now I get this error:
Have been unable to find anything except this post (#8168) which unfortunately did not offer a solution that I could understand as a newbie to HHVM and an Ubuntu novice.
Steps to reproduce the behavior:
Install Ubuntu server 20.04 (minimal version). (Mine was installed as VirtualBox guest, but this may not matter)
Launch localhost:8080/hello.hack in browser (Firefox)
See error 1
Change "Hello World" to "Hello ERIC" in hello.hack in VS Code and save
Refresh the browser
See error 2
Error 1
Error 2
Expected behavior
I was following a tutorial and wasn't sure what to expect. Unsure if the errors I'm reporting will cause a problem, but so far it looks like everything is ok. But, reporting in case this trips somebody else up so it can at least be addressed and known.
For posterity (in case the source website disappears ever) here are the tutorial steps I followed exactly:
Initialize A Project
Create a directory with a .hhconfig file in it. This will be the root of your project.
$ mkdir my_project
$ cd my_project
$ touch .hhconfig
Write Your First Hack Program
Create a file called my_project/hello.hack with the following code:
use namespace HH\Lib\IO;
<<__EntryPoint>>
async function main(): Awaitable<void> {
await IO\request_output()->writeAllAsync("Hello World!\n");
}
Run The Typechecker
Normally you'll get type errors and hover information from within your IDE. You can also run the typechecker directly to confirm that you have no type errors in any files in your project.
$ cd my_project
$ hh_client
No errors!
Run Your Program
HHVM provides the Hack runtime. You can run your program as follows:
$ cd my_project
$ hhvm hello.hack
Hello World!
Run A Website
Normally you'll start HHVM as a webserver, and it will automatically pick up any changes to files you make.
Hi 👋, these notices are not specific to your setup and you have followed the guide correctly. These notices have been around for a really long time. They occur in Docker and on Linux. They can be ignored without ill effect (for as far as I understand). I have been ignoring them for ages.
I am not a member of the hhvm team, nor do I work for Facebook.
Hi 👋, these notices are not specific to your setup and you have followed the guide correctly. These notices have been around for a really long time. They occur in Docker and on Linux. They can be ignored without ill effect (for as far as I understand). I have been ignoring them for ages.
I can confirm this warning is harmless: it is just saying that a performance optimization was unavailable. We can disable this perf optimization by default in open source builds, which will suppress the warning (in order to make use of the optimization you need to configure the kernel to make huge pages available at boot time, and most users won't want this). We can leave this issue open to track suppressing the warning.
I'm trying to learn Hack following this tutorial so I set up an Ubuntu 20.04 VirtualBox machine (guest) on my Windows 10 (host) laptop as a dev server. I successfully installed Hack and VS Code along with the Hack extension for IntelliSense, hinting, and code highlighting.
However, when I run
hhvm -m server -p 8080
the server seems to launch and I can see the code results in a browser, but I get this error:Failed to hugify the .text section
I tried changing a text string and saving it and now I get this error:
HardwareCounter: perf_event_open failed with: Permission denied
Have been unable to find anything except this post (#8168) which unfortunately did not offer a solution that I could understand as a newbie to HHVM and an Ubuntu novice.
Steps to reproduce the behavior:
Error 1
Error 2
Expected behavior
I was following a tutorial and wasn't sure what to expect. Unsure if the errors I'm reporting will cause a problem, but so far it looks like everything is ok. But, reporting in case this trips somebody else up so it can at least be addressed and known.
Environment
hhvm --version
hh_client --version
hackc-a9ca8db2dc64da66270a4e83a3f019dc92246c09-4.155.0
Additional context
For posterity (in case the source website disappears ever) here are the tutorial steps I followed exactly:
Create a directory with a .hhconfig file in it. This will be the root of your project.
Create a file called my_project/hello.hack with the following code:
use namespace HH\Lib\IO;
Normally you'll get type errors and hover information from within your IDE. You can also run the typechecker directly to confirm that you have no type errors in any files in your project.
HHVM provides the Hack runtime. You can run your program as follows:
Normally you'll start HHVM as a webserver, and it will automatically pick up any changes to files you make.
You can now visit http://localhost:8080/hello.hack to see "Hello World!" in your browser.
The text was updated successfully, but these errors were encountered: