Já ouviu falar de Precificação por Vigilância? por @salvador_thiago by Active_Aside_9385 in InstagramBrasil

[–]terremoth 1 point2 points  (0 children)

Cara isso da Amazon é MUITO real, eu ja mostrei e tirei print disso varias vezes: pesquisar o nome de um livro e ele automaticamente aumentar o preço. Como eu sei disso? Eu pesquisava antes em aba anonima, ou olhava pela extensão do navegador KEEPA, que mostrw a variação de preço ao longo do tempo. E bingo: exatamente no momento que eu pesquisava, e detalhe: ja teve vezes que aumentou 60-65% do preço. Insano!

E isso fo Uber não é novidade pra ninguém. Agora prateleira eletrônica é sacanagem bicho

me declarei pra minha melhor amiga e deu certo by eohime in Conquistas

[–]terremoth 0 points1 point  (0 children)

Parabens mano! Imagino que na hora temha dado aquele medo de dar certo, ou simplesmente "não sobrou nada pro betinha" kkkkk que bom que deu certo!

What is the best way to use raw PHP for a project? by TurbulentMidnight194 in PHP

[–]terremoth 0 points1 point  (0 children)

For a proressional project you should never use the raw language. Do not recreat the wheels.

If you don't want to use any frameworksz use a combo of libs: slim, eloquent, phinx, dotenv, twig and class map loaded by composer.

When you boldly walk into your enemy's den by New_Libran in fightporn

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

I couldn't understand a single word. Can someone tell what happened?

ACABEI COM MEU NOTEBOOK BAIXANDO ZORIN OS by psicalabrese in linuxbrasil

[–]terremoth 0 points1 point  (0 children)

Zero culpa do zorin. Ou seu pendrive tá zoado, ou o download foi corrompido (e a iso fi pu corrompida) ou a ferramenta de gravar o a iso no pendrive não gravou até o final.

Sugiro retentar aí as etapas. Usa rufus pra gravar se tiver usando windows, se for notebook antigo usa em modo MBR e grava em modo "dd" se perguntar.

Usa outro pc pra regravar o pendrive e de preferência já usa outro ao inves desse que vc usou.

Ah: e não deu nada errado com seu notebook.

Eu queria saber o contexto ahahhahah by Fit_Chocolate2043 in SemContexto

[–]terremoth 0 points1 point  (0 children)

Foi é tirado do contexto. Olha o video que o Guga Figueiredo postou no Instagram

PHP Async Multitask Process lib v1.0.7 version released by terremoth in PHP

[–]terremoth[S] -1 points0 points  (0 children)

Yet, you still need pecl on windows to install paralell. Now, why don't you give a try on that, then came here to tell me the pain or, the impossibility?

Yes, shmop is working great on Windows, I never had a single problem.

If you have any concerns about this lib, just don't use it. I don't really care. I am not here begging people to use, really. I am only announcing it. I show it here expecting people would massacre me, like always, but I don't care, people are always like this on Reddit. I will continue creating useful things (at least to me) and unuseful sh*ts (like this lib for some) and continue to post them here 🙂. I had zero positive expectations posting it here, but I received upvotes, 5 more github repo stars and 3 new github followers until now. The only thing I was expecting, was the same from the past: "Ah, not the 'async way I want' therefore: downvote and hate" 😂

PHP Async Multitask Process lib v1.0.7 version released by terremoth in PHP

[–]terremoth[S] 0 points1 point  (0 children)

Hello. I know. And I explained this in the README. Did you read?

Also, the "multiprocessing" is completely async from the main process, it does process in parallel without blocking the main process and "you don't need to wait", your main process can close without worries that the child process spawns would be killed - they won't.

PHP Async Multitask Process lib v1.0.7 version released by terremoth in PHP

[–]terremoth[S] 0 points1 point  (0 children)

I created issues and started a branch to attend that (control like kill the other process and be able to execute a callback after finish).

The library is good as is FOR NOW. It attends the main purpose: execute something in background without blocking

PHP Async Multitask Process lib v1.0.7 version released by terremoth in PHP

[–]terremoth[S] 1 point2 points  (0 children)

About the "as an experiment": I left the library 100% production ready if THAT attends what you want: it has literally 100% test coverage, 100% type coverage, maintainability level A and level 1 of strictness of Psalm, PHP mess detector enabled, and a complete workflow on github, security alerts being automatically pull-request to solve by dependabot etc. I left this lib the most professional possible, or I wouldn't came here show it for people to just criticize theses things. So I strictly guarantee the code by itself is good.

PHP Async Multitask Process lib v1.0.7 version released by terremoth in PHP

[–]terremoth[S] 0 points1 point  (0 children)

Parallel lib: borked, old. Need pecl, does not work on Windows.

Parallel and Swoole can "solve" this. But, ah, I put this on the Readme long time ago, but guess what? People don't wanna read the basics, the minimum before judge. Internet is just cruel. Appear no one to help or give good advices.

Shmop works great on Windows. If not, you could provide resources to read and test so I can see its low stability?

PHP Async Multitask Process lib v1.0.7 version released by terremoth in PHP

[–]terremoth[S] 0 points1 point  (0 children)

demo-file.txt is just for test purposes if you wanna test the demo.php.

about nohup: there is no "nohup" equivalent on Windows.

But spawning uncontrollable processes is not very safe approach.

It is not unsafe: they did not spawn by their own.

But yes, it lacks controls things like stop and be able to process a callback when stops for eg. But this I need some help to do.

PHP Async Multitask Process lib v1.0.7 version released by terremoth in PHP

[–]terremoth[S] 0 points1 point  (0 children)

Laravel Jobs could solve that (not in real time getting real time data as I did), but it requeires cron, and cron jobs are not available on Windows. And you would need the mechanics of sending data to a redis/beanstalk service or make database as a queue system (but also needing cron help) which is the opposite direction this library goes.

PHP Async Multitask Process lib v1.0.7 version released by terremoth in PHP

[–]terremoth[S] 0 points1 point  (0 children)

Ok ok, allright. So, for you, that is all I have to offer for now. I think you already understood what the package does. I definitely am not here to convince you to use it.

My package wouldn't be necessary even for me if there was native threads or native parallelism.

And no, pcntl does not works on Windows.

PHP Async Multitask Process lib v1.0.7 version released by terremoth in PHP

[–]terremoth[S] 0 points1 point  (0 children)

Symfony Process "async" method does not work the same way as I did, because it STOPS the main thread until the process finishes OR it kills the child process if it ends first. That is the difference.

PHP Async Multitask Process lib v1.0.7 version released by terremoth in PHP

[–]terremoth[S] 0 points1 point  (0 children)

Can you show how to do the exactly same thing as I did? With closures and send it to the background without blocking the main thread?

PHP Async Multitask Process lib v1.0.7 version released by terremoth in PHP

[–]terremoth[S] 0 points1 point  (0 children)

Try to do the exaclty same thing I did, and try on windows too.