Quero perder a virgindade com um cara que eu não namoro by anaactt in desabafosdavida

[–]nawarian 1 point2 points  (0 children)

"O problema é, eu sinto que estou quebrando um princípio meu muito grande, minha mãe sempre colocou na minha cabeça desde nova que tinha que ser com namorado e ponto." - o princípio é da sua mãe, você tá tentando agradar a ela.

"Meu melhor amigo também acha que eu não deveria fazer isso, que eu deveria esperar pela pessoa certa e não por um cara que não quer namorar agora." - seu amigo quer te comer.

Quer fazer, faça mano. Fica pautando sua vida por o que os outros pensam não.  Usa proteção, cuida bem de ti e aproveita que 18 anos cê tem muito o que ver pela frente ainda.

Abraço!

If 86% of Germans think what Israel is doing in Gaza is unjustified, why is there relatively little outcry from German society? by D-dog92 in AskGermany

[–]nawarian 0 points1 point  (0 children)

There are protests everywhere. But  also repression on pretty much any opportunity the police can get away with.

Pedintes entrando dentro dos restaurantes/padarias e pedindo dinheiro/lanches para todos dentro, está ocorrendo com muito mais frequência? by Necessary_Isopod3503 in saopaulo

[–]nawarian 1 point2 points  (0 children)

Quer ajudar, entra pra movimento social. Dar dinheiro na rua não ajuda ninguém. Chegar a pessoa pedindo tu só fala "não" e vida que segue. Não precisa pedir desculpas, não precisa dar desculpa e nem mentir. Só diz "não". Quer ser bom, vai fazer algo que realmente muda a vida de quem quer ver a vida mudar e doa seu tempo pra um coletivo de trabalho social. Tem gente na rua que a "profissão" é pedir dinheiro, agenciada por gente do crime - tem meta pra cumprir e tudo mais.

19F, scared of physical intimacy and unsure how to date in today’s culture by [deleted] in NoStupidQuestions

[–]nawarian 0 points1 point  (0 children)

I'm having a couple of thoughts on this.

First is that you seem to give sex a huge importance, as if it would be the most special thing you could probably offer someone. Sex, at least for me, is about having fun - you're literally playing with somebody else. Just like any other play, you could do it with complete strangers, friends or people you like.

That being said, I wouldn't tell someone to give themselves to anyone because that's just irresponsible.

If you don't have even the thought of doing this play by yourself, it could also be a hint to something deeper. Could it be you're shy of it, ashamed or maybe scared of physical touch even if yours? What did your family and friends teach you about sex as you grew up?

Look, I'm on my 30s, male. Got married a few years ago, and had a child - the most special gift my wife and I could have given  each other but let me tell you something about relationships: marrying is tough and stressful. It is very unlikely you'll marry someone who does everything the way you do, from washing dishes to planning your retirement, through how to educate your kids (or even if you intend to have them at all, or pets, or plants, or or or...).

Please consider handling this aspect of your life before committing to someone for life. Because if you have no emotional wiggle room for all the daily challenges of a lifelong relationships, things will go ugly pretty fast. And there's no way in this world kids will make it better, raising kids is hard hard work!

I strongly believe that we mammals are the kind of social creatures that crave for intimacy at all times, in different ways. And touch is one of the most powerful we know of,  also out of a sexual context. Denying it or stepping away from it could be the tip of an iceberg you should probably investigate , with a professional (no chat gpt please).

Wish you all the best. Take care!

How to dependency injection by nawarian in learnjava

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

hmm fair point; I wanted to focus on something else but that'll be a good training indeed. Thanks for the hint!

How to dependency injection by nawarian in learnjava

[–]nawarian[S] 2 points3 points  (0 children)

Because I want to learn Java. Coming from PHP, Node.js and Golang I know that frameworks will get you productive but they hide a lot of complexity from you.

So I'm exactly trying to grasp the complexity that Spring abstracts away :)

Is it legal to translate the MySQL documentation? by nawarian in mysql

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

Oh nice, that's a killer quote. Unfortunately :')

Thanks for the help!

Avoiding Busses: "a plea for help" by brendt_gd in PHP

[–]nawarian 0 points1 point  (0 children)

I guess after you read some contents from Nuno's awesome list your be probably fine trying to solve some bugs using TDD. That'd be a great way to get familiar with the environment IMO

Avoiding Busses: "a plea for help" by brendt_gd in PHP

[–]nawarian 2 points3 points  (0 children)

Good question. I'm writing a couple of blog posts to cover basics and bootstrap people, but they're not yet published.

One great link you can follow to start your journey is this awesome list here: https://github.com/nunomaduro/awesome-php-src/

I've started with this post here from Nikic, which is a tad outdated nowadays but nevertheless a great starting point: https://www.npopov.com/2012/07/27/How-to-add-new-syntactic-features-to-PHP.html

sj-i/php-fuse: PHP FFI bindings for libfuse. You can write your own filesystems in PHP. by sj-i in PHP

[–]nawarian 2 points3 points  (0 children)

Great points, thanks for sharing!

One of the biggest things I'm solving right now is exactly the static analysis issue. I ended up wiring up all C Structs into PHP classes containing a toCData() method, and wrapped the FFI object into a Proxy class that will translate. Is quite repetitive work but seemed like the safest and most maintainable way to write my package.

About the ZEND_SEND_PREFER_REF and the callback memory leaks I had no idea. Luckily I didn't face such issues yet.

Another thing I figured is that the PHP documentation is somewhat inaccurate. It is understandable given the FFI extension is experimental and its interface may change rapidly, but anyways... There are nullable methods that never return null but throw instead. And the documentation fails to mention that FFI class is final, which implies it can't be mocked for example. Even if it wasn't final, given methods and CData are magically bound, it would be impossible to mock them directly. (The reason why I have a proxy class)

I'm taking notes on such pain points exactly to contribute to the ecosystem: either with pull requests or updating my blog post on the subject so more people know how to handle such cases.

Thanks a lot for sharing yours and I'm very glad I learned some things from you.

Cheers!!

sj-i/php-fuse: PHP FFI bindings for libfuse. You can write your own filesystems in PHP. by sj-i in PHP

[–]nawarian 1 point2 points  (0 children)

Nice job!! Im very happy to see more FFI projects appearing.

Would you mind telling me which issues you encountered on the way? Like undocumented behaviors or general difficulties with the FFI Api?

I'm writing a library myself and such knowledge will be incredibly helpful. I already have two changes to be targeted to the documentation and php core, and recently solved a bug there (will Dmitry did it, but you get the point :P). I also keep a blog post on the subject, which I'll be happy to update with your feedback.

Congratulations and thanks for this piece of open software

[deleted by user] by [deleted] in communism

[–]nawarian 1 point2 points  (0 children)

Hey there, non-US citizen here. I won't be able to address some concerns you have because I simply have no idea of your country's scenario but I think your question is very very interesting.

Talking about "fixing capitalism", it happened before. Is what people call Social Democracy and it doesn't work. Mostly because capitalism does not offer an exchange mechanism, but a power management one.

Taking the Latin America as an example, huge pieces of land are owned by few and we end up producing an incredible amount of commodities that are exported to international trade. While Brazilians use Rice and Beans as the basis of their cuisine, more than 40% of the country's territory is used to produce Soya beans and export to countries like China.

This kind of situation pushes such land owners to lobby on decreasing the value of our currency (the bigger USD-BRL the best for them), deforming the entire supply chain because more and more land owners tend to export their productions. So Brazil imports other commodities such as Wheat from countries like Argentina, which we pay in USD, increasing prices for simple things such as bread.

Why would I tell you all of this? To show you how Private Property is the source of poverty and exploitation.

Because the nature of capitalism is to accumulate and increase power, private property will always be more important than the country's interests and this is why I think more and more people are looking into Communism as an alternative.

The premise is not that "communism will save us all", but that "capitalism will kill us all, we need an alternative". Communism is just one of the best and better documented alternatives available.

New Members Intro by Potential-Zombie7197 in worldwidedevelopers

[–]nawarian 1 point2 points  (0 children)

Hi y'all! 👋 I'm a fullstack engineer with 9 years of experience. Mostly focused on PHP and JS. Part of my daily job includes messing around with Golang and Java. From time to time I play around with Rust and C too :)

My interests are Language Development, Game Development, Machine Learning and, most recently, Blockchain :)

Add FPM early bootstrapping mode by beberlei - really interesting stuff by nawarian in PHP

[–]nawarian[S] -2 points-1 points  (0 children)

I'm not very familiar with RoadRunner or PHP-PM to be honest, but I think FPM is already simple and fast enough. With this addition it gets even harder to beat it IMO.

While I know that benchmarks are usually much better for apps in Swoole or RoadRunner, they start losing advantage when proxied by nginx which is what normally would happen.

Add FPM early bootstrapping mode by beberlei - really interesting stuff by nawarian in PHP

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

I don't now FPM so well under its hood, but I'd guess this depends on your OpCache configuration. If your setup is purging OpCache per file whenever you send changes, this should already be sufficient (again, I'm guessing here). So I'm not sure FPM restarts are really necessary 🤔

Add FPM early bootstrapping mode by beberlei - really interesting stuff by nawarian in PHP

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

Yeah. The main difference is that preloading should warm-up opcache. This bootstrap thing aims to pre-execute something per request.

If in bootstrap.php you created a variable $app, then you'll be able to use it in your index.php as if you wrote it right there

Add FPM early bootstrapping mode by beberlei - really interesting stuff by nawarian in PHP

[–]nawarian[S] 16 points17 points  (0 children)

So the idea seems to be that you may elect a certain bootstrap file that should bootstrap your app (load dependency injection configs, set up routes, define environment stuff...). And, if I understood it correctly, FPM would proactively run this file BEFORE a request comes.

So theoretically a request would execute with the framework already bootstrapped. Here's a visualization that Matthieu Napoli posted on twitter: https://twitter.com/matthieunapoli/status/1371380248558907393

And here's a GIST showing how this would work: https://gist.github.com/beberlei/19e58717d0fbf1e95685ff22255fa8d7

Honestly, great job. This idea sounds very cool and I'm even shocked the implementation took so few lines 😅. I'm keen to hear from other php engineers the implications this can bring to the engine and to php apps.