Moving from Go to PHP Again
351–360 of 371 posts
Re: Moving from Go to PHP Again
#352Earlier quoted context omitted.
O'caml and Haskell are extremely niche in the web server world, and are not especially faster than go. C# is not blazingly fast either. They all seem to be in the same ballpark.
They are all faster than Go in case you haven't been paying attention.
With (in my experience) go being a little faster than java and haskell, and o'caml being slightly faster than anyone, but nothing significative enough for me to expect an article titled "my Java webapp was too slow so I rewrote it in O'Caml" anytime soon.
Benchmarking is very relative, though. I'd be glad to read evidence showing go is significantly slower than any of those in some domain.
Re: Moving from Go to PHP Again
#353Earlier quoted context omitted.
They are all faster than Go in case you haven't been paying attention.
I've been paying a lot of attention and, in my experience (but also according to the highly biased benchmark game), C#/Java/OCaml/Haskell/Go are in the same league, i.e usually 3-10 times slower than C/C++/Ada/Rust/D, and 3-10 times faster than "scripting" languages like Python/PHP/Ruby/Perl. With (in my experience) go being a little faster than java and haskell, and o'caml being slightly faster than anyone, but noth…
Re: Moving from Go to PHP Again
#354Um... “Just for fun, I compared apples and oranges again by benchmarking the login page (which doesn't hit any database) for both application versions using Siege. The Symfony application (PHP 7.3, OPcache enabled, optimized autoloader) handles about 1470 req/s. The Go application (compiled using Go v1.11) averages about 18600 req/s.”
why would I need 18600 req/s ? If you're at that scale then probably symfony isn't for you.
Re: Moving from Go to PHP Again
#355For the kinds of applications people tend to build in PHP, PHP is probably a better choice than Go. I'd still do Django or Rails before PHP, but Go just isn't designed to make serverside-rendered database-backed websites especially pleasant to write.
Facebook goes into this category then, I presume?
Re: Moving from Go to PHP Again
#356Earlier quoted context omitted.
You are 100% right about that. I've nearly tried almost all PHP frameworks, quite extensively I may add and at the end of the day I found that the less framework I use the better and faster my dev is. Now I just use packages from composer as needed and never ever use them anymore. For me Laravel was a nightmare to use with Vue. Both template engines (blade, vue) use moustache tags so everything has to be declared ins…
Interesting. Coding without a framework is rare these days. I would like to hear more about how you do the basic infrastructure stuff usually provided by a framework: Routing Templating DB abstraction
composer require guzzlehttp/guzzle
Now you have GuzzleHttp available to your app. This way you include only what is needed.Re: Moving from Go to PHP Again
#357Earlier quoted context omitted.
Those mistakes aren't easy to spot or easy to fix. It's about giving code sunlight so that action at a distance and other kinds of magic don't hide errors making them harder to find, get in your way of fixing them, making reproducibility a mess and confirmation simply guesswork. Its the restrictive design trend of crippling languages which needlessly prevents the sunlight effect from happening along with "information…
You are speaking to the inmates writing the asylum. Give it up. This is the 4chan of the enlightened.
Re: Moving from Go to PHP Again
#358Earlier quoted context omitted.
I've been paying a lot of attention and, in my experience (but also according to the highly biased benchmark game), C#/Java/OCaml/Haskell/Go are in the same league, i.e usually 3-10 times slower than C/C++/Ada/Rust/D, and 3-10 times faster than "scripting" languages like Python/PHP/Ruby/Perl. With (in my experience) go being a little faster than java and haskell, and o'caml being slightly faster than anyone, but noth…
Techempower is where real benchmarks live, the highly biased benchmark game examples aren't all using the latest features or even best algorithms.
Re: Moving from Go to PHP Again
#359Earlier quoted context omitted.
I talked with a few people who wrote Go servers and while they loved almost everything about the language and ecosystem, they hates the missing generics so much, they still switched to other languages later. Writing code-generators for everything wasn't fun.
I don't miss generics in Go and I have used generics in C++ a good deal. I think the whole generics argument against Go is largely parroted by people who may not even know what generics even are. C doesn't have Generics either. It's doing OK.
I'd flip what you said and say that most of the people arguing against generics in Go don't have much or any experience with them. Which makes sense because a large number of users came from dynamically typed languages.
Re: Moving from Go to PHP Again
#360Earlier quoted context omitted.
> Do you still upload your code via FTP directly to the web server? It's pretty rare that this is even an option, since no one in their right mind would set up an FTP server with access to anything important. SFTP? I don't see why not. No need to make things more complex than is necessary. I don't remember any particular problems with code caching when I did PHP development, though maybe you use a different caching t…
>> SFTP? I don't see why not. No need to make things more complex than is necessary. You are trying to argue definitions (SFTP vs FTP when FTP just means “any file transfer protocol”) instead of arguing that uploading any amount of files by any protocol that are immediately picked up by the interpreter introduces nondeterministic behaviour of the website where the users accessing your website only see a subset of the…