Functional PHP
asdf
Functional PHP | asdf | |
---|---|---|
6 | 341 | |
1,964 | 20,547 | |
- | 1.6% | |
0.0 | 7.6 | |
3 months ago | 5 days ago | |
PHP | Shell | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Functional PHP
-
I asked GPT-4 what top 5 improvements it would make to the PHP language to make it more competitive
A lot of this can be handled in userland. For examples libraries such as https://github.com/lstrojny/functional-php/blob/main/docs/functional-php.md handle a lot of this.
-
How do I become a better dev?
I’m also trying to use all of these at least once or twice to have these tools under my belt should I want them https://github.com/lstrojny/functional-php
- How to Lose Functional Programming at Work
-
PHP 8.2 Released
https://github.com/lstrojny/functional-php
The no-brainers to me are the missing array_some()/array_any() array_every()/array_all() and an array_search() that takes a predicate an iterable. I do these now in userland but an optimized native version would be nice.
-
PHP Map - PHP arrays and collections made easy
Functional PHP, which provides a lot of similar functionality, also uses pluck and has for many years https://github.com/lstrojny/functional-php
-
Simple Composition with Array.Reduce
While looking at functional-php, I saw a pretty neat way of doing composition with an array_reduce method, and wanted to recreate it in JavaScript. There are plenty of libraries that implement this (and do so more effectively), but it's pretty fun knowing that you can get this functionality with a couple lines of plain JavaScript.
asdf
-
Install Asdf: One Runtime Manager to Rule All Dev Environments
The main issue most people have with asdf is that it’s annoyingly slow. Not unusably so, but just enough that it’s irritating.
I identified [0] the source for much of it (sub-shells and pipes) and began a PR [1], but became bogged down with BATS testing, and then found mise / rtx, so kind of lost interest. Sorry. You can always implement these if you’d like.
[0]: https://github.com/asdf-vm/asdf/issues/290#issuecomment-1383...
[1]: https://github.com/asdf-vm/asdf/pull/1441
- Show HN: I made a multiple runtime version manager that can be used on Windows
-
Volta – Fastest Node version manager in Rust
Or if you need to manage more than just node, asdf has been around for over a decade and works great. You can use a .tool-versions to change runtimes for each project you have, in addition to managing your global runtime versions
https://asdf-vm.com/
-
Pyenv – lets you easily switch between multiple versions of Python
Why not just use a tool like asdf (https://asdf-vm.com/) or mise (https://mise.jdx.dev/)?
These tools have the advantage of not being multi-taskers and can manage version for all your tools. You wouldn’t need pyenv and npm and rvm and…
We’ve even started committing the .mise.toml files for projects to our repos. That way, since we work on multiple projects that may need multiple versions of the same tool, it’s handled and documented.
-
A Journey to Find an Ultimate Development Environment
The purpose of a version manager is to help you navigate or install any tools for development easily. Version Manager can be one tool for each dependency (e.g. NVM, g) or One tool for all dependencies (e.g. asdf, mise).
-
How to Install Your Python Version on Ubuntu
(asdf)[https://asdf-vm.com/] fully supports Python and almost any other language. I've been using it for Ruby, Python, Elixir, and other languages for years and never looked back.
-
Beginners Intro to Trunk Based Development
Secondly, our development environments must not drift, because then code may behave differently and a change could pass on our machine but fail in production. There are many tools for locking down environments, e.g nix, pkgx, asdf, containers, etc., and they all share the common goal of being able to lock down dependencies for an environment accurately and deterministically. And that needs to be enforced in our local workflow so we don't have to rely on CI environments for correctness. All developers must have environments that are effectively identical to what runs in CI (which itself should be representative of the production environment).
-
Practical Guide to Trunk Based Development
There are many ways this can be done (e.g nix, pkgx, asdf, containers, etc.), and we won’t get into which specific tools to use, because we'll instead cover the essential essence of preventing environment drift:
- Criando seu ambiente com ASDF
-
Kotlin version manager
I've really been enjoying asdf, which is a program that allows you to install specified versions of dev utilities as well as dynamically manage them via shims and .tool-versions files.
What are some alternatives?
Design Patterns PHP - sample code for several design patterns in PHP 8
SDKMan - The SDKMAN! Command Line Interface
PHP Option - Option Type for PHP
pyenv - Simple Python version management
Pipeline - League\Pipeline
rbenv - Manage your app's Ruby environment
Iter - Iteration primitives using generators
nvm - Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions
Monad PHP - A simple Monad library for PHP
volta - Volta: JS Toolchains as Code. ⚡
Ruler - A simple stateless production rules engine for modern PHP
HomeBrew - 🍺 The missing package manager for macOS (or Linux)