hhvm | A virtual machine for executing programs written in Hack

 by   facebook C++ Version: HHVM-3.15.0 License: Non-SPDX

kandi X-RAY | hhvm Summary

kandi X-RAY | hhvm Summary

hhvm is a C++ library. hhvm has no bugs and it has medium support. However hhvm has 18 vulnerabilities and it has a Non-SPDX License. You can download it from GitHub.

HHVM page | HHVM documentation | Hacklang page | General group | Dev group | Twitter. HHVM is an open-source virtual machine designed for executing programs written in Hack. HHVM uses a just-in-time (JIT) compilation approach to achieve superior performance while maintaining amazing development flexibility. HHVM should be used together with a webserver like the built in, easy to deploy Proxygen, or a FastCGI-based webserver on top of nginx or Apache.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              hhvm has a medium active ecosystem.
              It has 17706 star(s) with 3065 fork(s). There are 1008 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 547 open issues and 5359 have been closed. On average issues are closed in 2095 days. There are 86 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of hhvm is HHVM-3.15.0

            kandi-Quality Quality

              hhvm has 0 bugs and 0 code smells.

            kandi-Security Security

              OutlinedDot
              hhvm has 18 vulnerability issues reported (9 critical, 9 high, 0 medium, 0 low).
              hhvm code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              hhvm has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              hhvm releases are available to install and integrate.
              It has 448633 lines of code, 18625 functions and 22734 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of hhvm
            Get all kandi verified functions for this library.

            hhvm Key Features

            No Key Features are available at this moment for hhvm.

            hhvm Examples and Code Snippets

            No Code Snippets are available at this moment for hhvm.

            Community Discussions

            QUESTION

            assertion fails: __is_complete_or_unbounded
            Asked 2021-Dec-29 at 04:30

            While compiling HHVM, the code fails due to:

            ...

            ANSWER

            Answered 2021-Dec-29 at 04:26

            In C++, an array cannot have zero size.

            From Array declarators documentation:

            If the expression is a constant expression, it shall have a value greater than zero.

            Source https://stackoverflow.com/questions/70513923

            QUESTION

            HHVM 3.21 in repo authoritative mode, Drupal 7, mod_rewrite problem
            Asked 2021-Dec-08 at 14:05

            I am trying an experiment to bring up a Drupal 7 installation in Repo authoritative mode under HHVM 3.21 (which still supported PHP - latest version does not). (May sound crazy, but bear with me here.) Server is Ubuntu 18.04 running apache2 with mod_proxy, mod_proxy_fcgi. I am new to HHVM, so I have probably made an obvious mistake.

            I started with an index.php "hello world" to ensure that I had the general configuration working. That works fine, regardless of the contents of /var/www/html/index.php (per https://docs.hhvm.com/hhvm/advanced-usage/repo-authoritative)

            I am using hhvm --hphp -thhbc -o /var/cache/hhvm file_list.txt to create the repo, which is then chown'ed to www-data. (The same file I copy to /var/www/.hhvm.hhbc, since it seems that the server wants a copy there... this question I will solve later...)

            Problem #1: I have left the entire file tree in place in /var/www/html, but mod_rewrite is not working correctly. I can use the site without problems if I use the "unpretty" URLs (?q=admin/config), but not rewritten URLs.

            Problem #2: In principle HHVM in repo authoritative mode should be able to serve the entire image from the repo file if only the index.php is in place or if I specify hhvm.server.allowed_files[] = index.php, but when I try this, the server 404's.

            What follows is a ton of relevant info from config files. I am happy to add more information as needed to assist with finding my error/omission, in case I have forgotten anything here. Thank you for reading this far!

            /etc/hhvm/server.ini:

            ...

            ANSWER

            Answered 2021-Dec-08 at 14:05

            What I understand is that there is no current (free, open source) means for "compiling" PHP. This means that if we do not want to give source code for a key algorithm to a client, either we subscribe to one of the proprietary PHP compilers or move out of PHP.

            So we have decided to move all algorithm work to Java.

            Source https://stackoverflow.com/questions/69837709

            QUESTION

            PHP - correctly set cookie parameters (expire) using header() - not set-cookie()
            Asked 2021-Jan-29 at 10:56

            A site we are using is running an older HHVM version. Looking at the documentation of PHP function setcookie(), there is two signatures for parameters.

            To summarize the issue why I cannot use setcookie() is because this version does not use the $options array available of PHP7.3. When trying to use some of the alternative solutions by concatenating samesite to path will crash HHVM. Using this alternate method using normal PHP works correctly as expected.

            There seems to be a slight difference between HHVM behaviour here with cookies compared to PHP.

            So this question is about header() and not about setcookie() because I can't use it, there are slight difference in how HHVM (the version running) handles cookies.

            NOTE: This is a Magento 1 site --- and upgrading to HHVM 3.30+ breaks everything so that is also not an option - I have tried this already.

            So I managed to set the cookie using header() function by concatenating all the properties.

            ...

            ANSWER

            Answered 2021-Jan-29 at 10:56

            This is to answer how to create a raw set-cookie using header() function.

            Because setcookie()automatically changes the timestamp into the formatted string, this conversion has to be done ourselves.

            The Mozilla Set-Cookie says this:

            The maximum lifetime of the cookie as an HTTP-date timestamp. See Date for the required formatting.

            The Mozilla Headers Date format shows the format required:

            Source https://stackoverflow.com/questions/65935670

            QUESTION

            Why does Slack's files.list endpoint return an empty files array?
            Asked 2021-Jan-09 at 18:36

            I'd like to use the Slack API to delete old files from my workspace, as we are running out of space to upload new ones.

            I registered an application, installed it on the target workspace, granted the application the files:read and files:write permissions, and then generated a bot token for the application that has the prefix xoxb.

            With this token, I made a GET request to the files.list endpoint using Postman:

            ...

            ANSWER

            Answered 2021-Jan-09 at 18:36

            I don't know if this is the answer, but it's a workaround:

            • Grant the application the channels:read and channels:join scopes
            • Call the conversations.list endpoint to get a list of channels in the workspace
            • Grab the id attribute of one of the channels that you would like to list files for
            • Call the conversations.join endpoint to add the application to the channel
            • Call the files.list endpoint to get a list of files in that channel.

            Presumably, you can iterate over every public channel in the workspace, join each, list its files, and then delete the files older than a certain date.

            Source https://stackoverflow.com/questions/65646097

            QUESTION

            Builtin for checking if vec contains specified element
            Asked 2020-Dec-05 at 22:17

            Let's say, I have a vec containing a list of integers that may be non-continuous (due to element being removed from database).

            Example:

            ...

            ANSWER

            Answered 2020-Dec-05 at 07:42

            The recommendation from the HHVM/HackLang guys is to use C\contains() as you can read here but you need to install the HSL package (hhvm/hsl) using composer. This library contains loads of functions to deal with the new array-type structures: vec, dict, keyset. Those functions in the HSL Library are prefixed with C, Vec, Dict, Keyset and you'll find also Math, Str, etc., very useful for other needs.

            After installing that package it becomes available but typically it is more handy to add use namespace to avoid the long prefix:

            Source https://stackoverflow.com/questions/65152296

            QUESTION

            running minimal app with xhp-lib v4 and hhvm v 4.81.1 throws error
            Asked 2020-Nov-18 at 21:31

            I'm trying the following setup and am getting this error:

            ...

            ANSWER

            Answered 2020-Nov-18 at 21:31

            I think that you're running into the fact that hhvm-autoload hasn't caught up with the recent restrictions to top-level code. In particular, where require_once seems to no longer be allowed at the top level. With your hh_autoload.json, hhvm-autoload generates this hh_autoload.hh:

            Source https://stackoverflow.com/questions/64851683

            QUESTION

            How to properly install Hack and HHVM on Windows 7
            Asked 2020-Oct-12 at 14:25

            I am trying to install and configure Facebook programming language Hack and HHVM on Windows, probably Windows 7. I could not find any solution on it. I saw a Bitnami link which suggest HHVM Installers.

            source

            I have downloaded the installer files HHVM installer files but it cannot run on Windows due .run extension filename. How can I achieve this using HACK and HHVM installations on Windows 7.

            ...

            ANSWER

            Answered 2020-Sep-21 at 18:04

            Hack and HHVM do not support Windows. There was some work in 2015, but it doesn't seem to have continued since then.

            Recent versions of HHVM do not support PHP. The Bitnami link mentions running phpmyadmin, so it looks like it's targeting an old HHVM release.

            Source https://stackoverflow.com/questions/63983364

            QUESTION

            Vagrant cannot be started on Windows 7 64 bits requires version upgrades
            Asked 2020-Oct-02 at 14:24

            I downloaded vagrant for Windows at this link https://www.vagrantup.com/downloads

            I have just installed Vagrant on Windows 7 64 bit. When I type vagrant up to start it, it displays the following error below at command prompt. How do I upgrade from version 2 to 3

            C:\hhvm-vagrant>vagrant up

            Vagrant failed to initialize at a very early stage:

            The version of powershell currently installed on this host is less than the required minimum version. Please upgrade the installed version of powershell to the minimum required version and run the command again.

            Installed version: 2

            Minimum required version: 3

            ...

            ANSWER

            Answered 2020-Sep-25 at 22:06

            It was resolved by installing windows management Framework version 3.0

            Source https://stackoverflow.com/questions/64003964

            QUESTION

            hhvm issues \nFatal error: Uncaught Error: unknown class xhp_x__element in :\nStack trace:\n#0 /Users/user/code/xhp-js-example/example.php(12)
            Asked 2020-Aug-22 at 02:08

            I'm trying to play with xhp and I'm finding that running the one xhp example I could find https://github.com/hhvm/xhp-js-example is issuing an error \nFatal error: Uncaught Error: Found top-level code in :\nStack trace:\n#0 {main} when following the README as is on HHVM 4.71. Removing require_once(__DIR__.'/vendor/autoload.php'); resolves the top-level code error but I'm now stuck with the error \nFatal error: Uncaught Error: unknown class xhp_x__element in :\nStack trace:\n#0 /Users/user/code/xhp-js-example/example.php(12): ()\n#1 {main}. I've tried to change the code in example.php to the one found here:

            ...

            ANSWER

            Answered 2020-Aug-22 at 02:08

            There are a few roadblocks that the OP encountered to get XHP running with HHVM 4.62, as discussed in the comments.

            1. xhp-js and xhp-js-example are both outdated by a few years so they can't compile due to breaking changes to HHVM itself, as the OP saw.
            2. While the XHP syntax is built into Hack, all the standard implementations are provided by xhp-lib, so it is necessary to autoload that in order to use the standard library of tags and tag classes.
            3. New to HHVM 4.62 is mandatory FIXME whitelisting, which requires package writers to explicitly specify allowed HH_FIXME codes in the .hhconfig. These were added to XHP-lib in 4.0.0rc1, so this version is necessary when running on HHVM 4.62.

            Therefore, a minimal project with XHP on 4.62 looks like this:

            composer.json

            Source https://stackoverflow.com/questions/63512537

            QUESTION

            HHClient throw Unbound name error for functions in HSL
            Asked 2020-Aug-16 at 22:50

            I am pretty new to hacklang. I have a piece of code (copied from the HSL github page)

            ...

            ANSWER

            Answered 2020-Aug-16 at 22:50

            As discussed in the comments, ignored_paths: ["vendor/*"] (ignored_paths being an hhconfig option available since 3.23) was preventing the typechecker from knowing about HSL for the OP. Generally speaking, suppressing errors in vendor isn't straightforward, and requires a bit of research to keep the necessary definitions exposed to the typechecker.

            Source https://stackoverflow.com/questions/63419855

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install hhvm

            You can download it from GitHub.

            Support

            We'd love to have your help in making HHVM better. If you're interested, please read our guide to contributing.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular C++ Libraries

            tensorflow

            by tensorflow

            electron

            by electron

            terminal

            by microsoft

            bitcoin

            by bitcoin

            opencv

            by opencv

            Try Top Libraries by facebook

            react

            by facebookJavaScript

            react-native

            by facebookJava

            create-react-app

            by facebookJavaScript

            docusaurus

            by facebookTypeScript

            jest

            by facebookTypeScript