Will HHVM be able to run PHP7 - hhvm

I know that PHP7 has a new compiler that is almost as fast as HHVM, but I am just curious if HHVM will also be able to run PHP7 as well as PHP5.
I can't find any details on this.
Everything I find is just a HHVM vs PHP7
Also for that matter can anyone find what versions of PHP5 will run on HHVM.
Thanks

Yes, we intend to support the new PHP7 language features in HHVM. It's on the HHVM team's roadmap for this half. Most of the features, such as the null coalesce operator, are backwards-compatible, so we can just add them. A couple of them have backwards-compatiblity issues, such as uniform variable syntax; the team is still evaluating what we want to do with this. We'd like to find a way to maintain compatibility with both PHP5 and PHP7, probably by making these backwards-compatibility-breaking options selectable via an INI option, or something like that.

Related

Compositor for RHEL?

I have Xmonad window manager installed on a RHEL 7.9 machine. The issue is I cannot seem to set the transparency for my terminal windows.
From the little previous experience I have with this, I believe I need some form of compositor.
I have tried doing a yum search for the usual suspects of compton/picom but cannot seem to find them. (This is a work machine and so I believe it has a subset of the main package repos available).
Is there any compositor like this which I should be able to use? Has anyone done this on RHEL?
If the answer is there are packages available, and I just cannot see them, I am able to request for packages to be added to our repository too, I simply need to know what they are.
Thanks in advance.

How to upgrade NuGet packages without breaking my project?

I have an old MVC application I need to make changes to. It would be nice to update all the recommended NuGet packages, but I know from experience that this can break a project.
In particular, I'm troubled by the following:
If one reads this a certain way, it appears that it's actually suggesting I upgrade to Twitter Bootstrap 5.1.2. I know for a fact that numerous breaking changes have been implemented since my current version.
I prefer not to have to rewrite the site. I thought Updates might have been a little smarter. Do I really need to know each package well enough to know if it would include breaking changes? Is there no way to specify compatible updates? Did Microsoft consider this aspect?
You do need to know each package well enough. Why? Because there's not a single way of doing versioning. Some packages, probably a lot of packages even, follow Semantic Versioning, but there's nothing to stop anyone from using any versioning they want (even if it doesn't make sense). There's nothing preventing you from going 3.0.1 to 15.14.13 with a change in an unimportant .txt file.
It's your responsibility to know what to update and when. Look at this Q&A to see how you can restrict the versions suggested: NuGet Limit max major version of a package

HipHop for PHP, deploying apps

After Googling, I found a lot of HipHop documentation, but plenty was posted between 2011 and 2013.
Earlier this year was launched a new version of HipHop that even supports Drupal and includes a lot of improvements...
I've always used the Zend Guard to deploy my commercial applications, but now I started to consider seriously the use of HipHop in production, but here comes the question:
We can run an application using only the bytecode HHBC (Without .php source code)?
Follows the reference of my research
https://github.com/facebook/hhvm/wiki/FAQ
The question may seem very obvious, but it is not so easy to find this answer in the project documentation.
Thanks in advance!
Well, yes and no.
HHVM has a so-called RepoAuthoritative mode in which the HHVM will no longer check the existence of the PHP files or how up-to-date they are; instead, it will retrieve the HHBC directly from its cache.
Theoretically, you can follow these steps:
pre-generate the HHBC for all your PHP files and insert that HHBC in HHVM's cache. This is the so-called pre-analysis phase (if you ever see it in HHVM documentation, this is what they mean by it)
turn on RepoAuthoritative mode (it's just 1 line in HHVM's config)
delete your PHP code
This way your PHP applications will run just fine without the source code being present. Doing a server restart won't change this since HHVM's bytecode cache lives on disk (it's implemented as an SQLite database).
However, it will be kind of a headache if you:
want to change something in your code. You would have to copy your code, make the change and repeat the pre-analysis phase.
want to upgrade HHVM to a newer version. HHVM uses its build ID as part of the cache key so, if you upgrade it, the bytecode cache becomes unreachable and, since you'll be running in RepoAuthoritative mode, your application will be reduced to a bunch of HTTP 404 errors. To fix this, you would have to repeat the pre-analysis phase as well.
Bottom line: no upside, big downside. There's just no point in doing it.
PS: I hope I answered your question. It's also possible that I misunderstood what you asked; if that's the case, please let me know in a comment.

I'm writing a script to install postgresql modules. How can I find the "contrib" directory?

I'm writing a script that will install some of the optional postgresql modules. Is there a way to programmatically figure out where the contrib directory is or do I have to prompt for the path? I've looked at a few examples and it seems inconsistent; doesn't appear in pg_config.
(The script might be run on OS X or linux, and I can't make assumptions about how postgresql was installed).
There is no easy works everywhere answer to this, so it's a matter of how much intelligence you want to try and put into your installer. And for some people it will be impossible to do what you hope for, the best you'll be able to do is offer guidance about what's missing. There is a lot of variation on packaging here between Linux distributions, versions of PostgreSQL, and the various ways you can install PostgreSQL on OS X (MacPorts, homebrew, etc.)
First off, only source code installs will have a contrib directory with source code in it that allows building the optional modules. In the packaged builds for Linux, all the contrib binaries may only be available via an optional package, called something like postgresql-contrib. That's the only way to make the optional modules that come with the database available: install the package the binaries are included in. You may see some variation in the OS X builds here too.
If you want to install extensions (what these are officially called as of PostgreSQL 9.1 now, rather than 'modules') using binaries you provide instead, what you then want to know is where to put the resulting shared libraries and matching SQL files that reference them. What pgconfig returns for pkglibdir will tell you where the binaries go, while sharedir points toward the default place to put the SQL. Providing binaries is a losing game though; the job of syncing with every platform to build them is a huge one.
And here are the sort of additional complications you'll run into in this area, if you wanted to ship source code and try to build things yourself in an automatic way:
PostgreSQL 9.1 now installs these using the CREATE EXTENSION
mechanism, so you'll need to handle both the pre-9.1 method and the
new one introduced there.
Not all PostgreSQL installations will have
pg_config. It's considered a development tool, and which package it
gets bundled with (and whether that package is mandatory or not)
varies. Debian/Ubuntu put it into the optional liqpq-dev, RedHat
derived RPMs have it in postgresql-devel or
postgresql-[version]-devel.
Due to pg_config being necessary for
compiling the new 9.1 extensions, packagers have started
reconsidering where pg_config goes; it's considered a lot more
important now than it used to be. 9.1 or later packages might alter which package it's contained in. That doesn't really change what you can and can't do though. It just impacts what advice you might offer for correcting situations your program can't deal with.
I've been describing the standard
Linux packaging here when I talk about that OS. There are also installers for both Linux and
OS X from EnterpriseDB, what they call their "one-click installers".
These use a different standard altogether for what people do and don't get installed in this area. I don't follow the commercial packaging to know what is actually different, but it's another variable you can expect people to encounter.
Recent OS X versions may
have some system PostgreSQL components floating around too. No idea
yet how this handle extensions though.
Basically, all three of version/packager/platform can vary how this will work, and the idea that you'll find any solution that handles even the majority of those permutations is optimistic. Installing extensions is known to be difficult in PostgreSQL, which is one thing that motivated all the 9.1 changes to turn it into a simple CREATE EXTENSION for many of them. But for now, those changes have just added another whole set of variation into the mix, actually making this harder during the transition period. It will be a while until PostgreSQL versions supporting that are the only ones in popular use.

Developing in Ruby on Windows [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm starting a new job soon where I'm going to be developing in Ruby and Rails on a Windows machine. I haven't used Windows for years, and the likes of Textmate, Git and Bash, are an integral part of the workflow using a Mac.
So, does anybody have any suggestions or recommendations as to the best tools or work strategies to use? Or pitfalls to avoid?
In particular, of course, I'm interested in the best text editor. (I'm seriously thinking about taking the opportunity to learn Vim or Emacs, or whatever the Windows ports are called, but any other thoughts would be welcome.)
Additionally, any ideas of useful plugins, tools or programs would be appreciated.
If you think that I've completely lost my mind, then feel free to tell me too ;-)
cheers !
Ruby and Rails
RubyInstaller for Windows
RubyStack installer for Windows
Rails
Development Environment
IDEs
RubyMine
NetBeans
Aptana RadRails
Text Editors
Sublime Text 2
e (aka TextMate for Windows) (seems to have been abandoned)
Vim/Ruby
bash Environment
Cygwin
Source Control
Git
Helpful Links
Setting Up Rails Development Environment on Windows XP
RubyonWindows Blog
Is Windows a First Class Platform for Ruby?
Related Questions
Why is ruby so much slower on windows?
Limitations in running Ruby/Rails on windows
Will using an IDE with Rails hinder me?
GUI editor for Ruby in Windows
What IDE / Editor do you use for Ruby on Windows?
https://stackoverflow.com/questions/826164/a-definitive-list-of-ides-for-ruby-on-rails
Ruby On Rails with Windows Vista - Best Setup?
https://stackoverflow.com/search?q=ruby+on+windows
RubyMine is supposed to be a top notch IDE. JetBrains always makes great products.
NetBeans or e as IDEs
Here's my incredibly detailed setup guide for Windows Server 2003, which works essentially unchanged on XP Pro and Vista. See this general installation list, and modify the instructions if you get different results. They're meant for people new to programming, so they'll probably be overly explicit for your purposes.
IMO, the one thing you definitely need is a *nix-style shell. This has nothing to do with whether you like dir or ls - you need to be able to run shell scripts or you won't get very far.
git bash (comes with msysgit) is my beacon in the storm of cmd.exe windows. It's essentially bash on Windows, and lets you run almost any script that you can run on *nix. This includes all the gem command line executables.
It gets weird in a few places.
File permissions - there just isn't a great way to map between Windows ACLs and POSIX file permissions. The Cygwin people have devoted years to solving it, but it still doesn't work all the time. git bash's approach is to just not do anything when asked to do a (for example) FileUtils.chmod. That means you may need to create a few more directories by hand, and you do need to be very aware of when something is changing file permissions.
For example, when I installed the Heroku gem on Windows, it tried to set the permissions of my Heroku credentials file, which has my Heroku password in plaintext, to u+r go-rwx. You'd definitely want to change the ACLs on that file if you're on a shared machine.
Scripts vs. .bat files - I wanted to change git's default editor from vi to SCiTE (not that I don't like vi; this was for a new-user workshop and I didn't want to explain editing modes). I had to create a .bat file that was actually a shell script. See the full explanation here:
How can I set up an editor to work with Git on Windows
I am using Netbeans, which is a good overall editor (at least for me).
For simple projects I use JEdit.
You can find the link at
NetBeans IDE
You can find JEdit at JEdit
git is available on Windows: http://code.google.com/p/msysgit/ or http://kerneltrap.org/Linux/Git_on_Windows
Basically, you need to decide whether you are going to go the Cygwin route or the MingW route. Both will provide you with Bash as well.
GVim works great. I use the native port rather than the Cygwin version.
If your development life is switching to Windows then you may want your employer to invest in this:
Ruby In Steel by SapphireSteel Software
I've used it in the past when I started tinkering with Ruby on Rails, quite nice and reasonably mature now. Also it's built on Visual Studio which I still think is one of the premier development environments around.
Maybe bring a LiveCD to work with you every morning..
you can even put it on a usb flash drive, if you use a small enough distro/big enough drive...
Cygwin as command line tool
The two best RoR IDE's I've used are NetBeans and Aptana Studio. However, for the most part I stick with Notepad++ and its various plugins (Explorer and HTML tags being two important ones).
This may not be applicable in your situation (IT restrictions, etc), but another option might be virtualization. You could install VirtualBox, VMWare, or some equivalent, and run Ubuntu (or your preferred Linux distribution, of course) that way, gaining access to the full UNIX toolset.
You didn't say whether you're using Windows voluntarily. However, this line suggests to me that maybe that's the case:
"If you think that I've completely lost my mind, then feel free to tell me too"
If you have any choice in the matter, I strongly recommend using a Unix-based system instead of Windows. If you have to go through inconvenience, spend money, or jump through hoops to avoid doing Ruby/Rails development on Windows, it will be worth it.
I've had to cope with Ruby and Rails on Windows a lot recently due to legacy systems and other developers' preferences. Rails development on a Unix-based system is much more efficient. The difference is not subtle.
That said, as others have mentioned, installing mysysgit even if you aren't using Git is helpful because it comes with Git Bash which gives you a usable bash command line.
As for text editors, I like Notepad++.
NetBeans is a really nice IDE for Rails development. Decent syntax highlighting, code completion, error highlighting. Handy keyboard shortcuts for navigation. It's pretty good.
IntelliJ IDEA
I developed in RoR under Windows for a few years, it's bearable, but Linux (or Mac) is much better for this. Lots of gems and plugins are considerably harder to install on Windows (quixml, for example).
My favorite text editor under Windows is Textpad, Eclipse is also pretty good.
If you want to use ls, find, grep... in Windows console, just download some package of their Win32 ports, install them and add to your PATH (Cygwin is definitely better, but also harder to install). You might also try out Powershell, it's supposed to be a replacement for unix command line by Microsoft.
I use virtual box, putty, and xming to do the development in an isolated linux environment. I blogged the full setup here
I've struggled a lot with Rails development on Windows. At some point I needed a specific gem that didn't work on Windows. I prefer working with a VM using Vagrant
Here's a blog post I wrote, how I setup my projects with the use of Chef and Vagrant

Resources