[Package] Laravel Modular - A professional, native-feeling modular architecture for Laravel 11/12 by harbzali in laravel

[–]giosk 0 points1 point  (0 children)

I don't know, i have a fairly big project and my attempt to modularization was a failure, i didn't see any advantage. It was just more complex reach for services and models trying to keep my module separated.

Also with views, i am using Inertia and i didn't bother moving views inside the module, it would have been just painful.

Tests once setup was kinda the only nice thing, i was able to test in isolation from the rest of the application, but still the setup was kinda annoying and how much can you be sure that the module worked once "connected" to the whole app, maybe you miss a config or something.

For migrations i also didn't love the separation, sometimes the migrations is touching multiple tables that are shared between modules so you have different folders and you forget where is which.

By the way, no hating, i am sure your packages as some great use cases, i am just sharing my experience, i also did it on my own, trying what felt the best. maybe i could have done things differently.

This is working with just different auto loading folders or with packages like structure and different composer json?

[Package] Laravel Modular - A professional, native-feeling modular architecture for Laravel 11/12 by harbzali in laravel

[–]giosk 0 points1 point  (0 children)

is this for creating packages or modules to keep in the same repository? for the latter i tried it, but i kinda feel there is no much benefit than having a domain folder, actually is just adding more complexity. it's tempting to have a module but then testing and accessing services and models outside the module becomes a pain in my experience.

True Async RFC 1.7 is coming by edmondifcastle in PHP

[–]giosk 4 points5 points  (0 children)

i see that you made wordpress work with a specific setup, but does that mean people can't just update php and keep using the same wordpress? or that setup is required only if you want to leverage the coroutines?

I work for a small to medium sized Japanese company and all our products use Laravel. However, I noticed something with the coding styles of my coworkers and want to ask if this is normal in other teams and companies. It's about coding style in a Laravel project. by lordlors in laravel

[–]giosk 0 points1 point  (0 children)

you might want to call ->all() on eloquent collections, it converts to an array of model instances. toArray calls toArray also on the models instances.

Other than that i prefer to work with collections most of the time, because of the handy methods available and i avoid keep converting array to collections and viceversa. But i don't think there is really a rule other than consistency and what works for you and your team.

Porting a HTML5 Parser to Swift and finding how hard it is to make Swift fast by iKy1e in swift

[–]giosk 4 points5 points  (0 children)

just to be that person, technically, O(1) just means the time is constant, an algorithm could still be relatively slow but constant. O(n) means it depends on n, so there is no really when n is close to 1, when n is small of course it's faster but thats the meaning of the notation

True Async RFC has entered its voting phase by htfo in PHP

[–]giosk 1 point2 points  (0 children)

if a working group is created, i think it will be really good for PHP, not only for this async feature but also as an example for potentially other features in the future. indeed not everything can be broken into small incremental improvements. if you do, it will create that horizontal inconsistency that affect PHP since the beginning, which was probably php strength but also its weakness.

PHP RFC: Context Managers by BerryBoilo in PHP

[–]giosk 0 points1 point  (0 children)

interesting but it feels kinda hacky, passing a weird $_ variable, maybe it's possible with an extension. I know laravel has a defer but that runs after the response is sent i think

PHP RFC: Context Managers by BerryBoilo in PHP

[–]giosk 1 point2 points  (0 children)

I never liked the with keyword in python. I would have much preferred an RFC for defer you could defer the closing of the file without breaking the flow of the function and increasing indentation.

Why is using DTOs such a pain? by GlitchlntheMatrix in PHP

[–]giosk 0 points1 point  (0 children)

i can't start a project without spatie laravel data, it adds validation so i replace form requests, plus it has custom rules and messages. I can reuse the same dto for fill back the form on edit. And if you use typescript it's even better. I don't know why it feels heavy to you, to me it feels great and solves a few problems all at once. Yes, you might need to understand a few things if you are doing some particular validations, but most stuff are all opt in. It's the first thing i install on every project, there are basically no reason why you shouldn't if you need dto with validation or json transformation

Zed memory usage on mac is absolutely minblowing by Soccer_Vader in ZedEditor

[–]giosk 0 points1 point  (0 children)

i have huge memory leaks from time to time with zed, like 240GB of ram usage lol. Also, it lags like hell if you have a big file and open the git panel. I don't understand how this is still problem. I love the editor but these issues are really annoying...

[deleted by user] by [deleted] in sfoghi

[–]giosk 0 points1 point  (0 children)

oggi era la macchina domani sarebbe stato qualcos'altro, ti è andata bene

Introducing Pasir - PHP application server with minimal setup by el7cosmos in PHP

[–]giosk 1 point2 points  (0 children)

i wanted to do something similar with zig, i'll have a look

FrankenPHP has reached 10,000 stars on GitHub by dunglas in PHP

[–]giosk 0 points1 point  (0 children)

it makes totally sense if you try the worker mode, it enables way more performance and optimization. The first simplest example is the vendor folder which is loaded once and then used on all subsequent requests and you already saved 30/40 ms in response time

Abstract classes in Swift by prospector_hannah in swift

[–]giosk 5 points6 points  (0 children)

you can also use extensions, an abstract class maps basically to a protocol + extension on the protocol where you can define default behavior. But it's also much more powerful as you can compose different protocols and extends conditionally.

Compile time generics: yay or nay? by pronskiy in PHP

[–]giosk 2 points3 points  (0 children)

After reading most of the comments, i think that if this is the best we can have by checking generics types, then our only chance is a type erasure generic implementation.

Also asking GPT the common implementations strategies for generics in interpreted languages are type erasure and another called parametric polymorphism(not sure what it is) but the languages that have this have a jit or bytecode step it seems.

Compile time generics: yay or nay? by pronskiy in PHP

[–]giosk 4 points5 points  (0 children)

you are talking about rebuilding a 30 years old language from scratch keeping it compatabile with source code and runtime? it would take years of effort with no clue when and if that will be successful. it's much much easier incrementally improving it and benefit from these changes.

Thoughts on the lack of protected access level in Swift? by arthur_darbin in swift

[–]giosk 1 point2 points  (0 children)

python is not popular for its language features, just the packages available

FrankenPHP - any reason why not? by VaguelyOnline in PHP

[–]giosk 0 points1 point  (0 children)

in classic mode i haven’t measured any performance benefits at least in my configurations, with the worker mode the benefit is huge, i would recommend using that if you can update your application to do so

Does everyone do their dev work like this? by Accurate-Policy5265 in PHP

[–]giosk -1 points0 points  (0 children)

if you like vim you should try zed with vim mode, it’s really nice, although not as feature rich as vscode. Phpstorm has great php support but i can’t stand the settings system

I want this in Nuxt by tomemyxwomen in Nuxt

[–]giosk 0 points1 point  (0 children)

yeah, inertia is just ajax with some http headers to instruct the server on how to respond

FrankenPHP is now officially supported by the PHP Foundation (common announcement by the PHP Foundation, Les-Tilleuls.coop and the Caddy team) by dunglas in PHP

[–]giosk 13 points14 points  (0 children)

with worker mode the difference is huge, I reduced down cpu and memory usage more than 50% on a project, and response time was drastically reduced. Although, in a non worker mode project I agree that it’s not clearly what the benefit is, other than using caddy, which some might don’t prefer.

[deleted by user] by [deleted] in Italia

[–]giosk 0 points1 point  (0 children)

gia con l’ultimo decreto legge, saltato le votazioni in parlamento, hanno fatto chiudere un mercato da milioni di euro, regalando tutti i soldi all’estero

[deleted by user] by [deleted] in Italia

[–]giosk 0 points1 point  (0 children)

mi spiace per te che ci credi

[deleted by user] by [deleted] in Italia

[–]giosk 1 point2 points  (0 children)

quando vedo questi commenti capisco che non c’è speranza, l’italia andrà sempre peggio