grmpyprogrammer, (edited )
@grmpyprogrammer@phpc.social avatar

And while I am on the topic, here some challenges I’d like to see other devs take up for PHP:

  • langchain support
  • our own version of numpy
  • abstraction layer around FFI, similar to how FrankenPHP/Swoole provides an implementation/framework for Fiber usage
  • Jupyter notebooks with first-class PHP support

I know there are folks out there looking to sink their teeth into some #php-adjacent projects

ralphschindler,
@ralphschindler@phpc.social avatar

@grmpyprogrammer more specifically, I think I meant more like an abstraction layer around FFI, similar to how FrankenPHP/Swoole provides an implementation/framework for Fiber usage

anthony,
@anthony@bitbang.social avatar

@grmpyprogrammer is NumPHP not what you're looking for?

https://numphp.org/

Is it more about NumPY's API specifically?

grmpyprogrammer,
@grmpyprogrammer@phpc.social avatar

@anthony I could be wrong but numpy is backed by some external libraries and would want that approach for “numpy for PHP”

Girgias,
@Girgias@phpc.social avatar

@grmpyprogrammer @anthony The "problem" is that numpy and libraries based on it (like pandas) can't truly work in PHP, as multiplication is assumed to be commutative.

A thing that matrices are famously not.

I really do not have the will power to fight Dmitry on this topic at this point in time (c.f. https://github.com/php/php-src/pull/9218) so if someone wants to drum-up support and possibly write the required RFC, then please do it.

grmpyprogrammer,
@grmpyprogrammer@phpc.social avatar

@Girgias @anthony I appreciate the context — I am not sure if I could even write an RFC for this given that I couldn’t do any of the work (no C/C++ skills)

Girgias,
@Girgias@phpc.social avatar

@grmpyprogrammer @anthony The C/C++ is really not hard, it is just modifying one line of code in one specialization: https://github.com/php/php-src/pull/9218/files#diff-773bdb31563a0f907c75068675f6056b25f003e61f46928a31d9837ae107460dL165-R165

One could make it more complete by creating a new specialized multiplication handle for int/float, similar to what addition does. (As + in PHP is not always commutative (because array "addition")).

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • kavyap
  • ngwrru68w68
  • Durango
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • thenastyranch
  • Youngstown
  • khanakhh
  • slotface
  • everett
  • vwfavf
  • rosin
  • osvaldo12
  • provamag3
  • GTA5RPClips
  • ethstaker
  • tacticalgear
  • InstantRegret
  • cisconetworking
  • cubers
  • tester
  • anitta
  • modclub
  • Leos
  • normalnudes
  • megavids
  • JUstTest
  • All magazines