Live data from Hacker News

Moving from Go to PHP Again

dannyvankooten.com

361–370 of 371 posts

Re: Moving from Go to PHP Again

#361

Earlier quoted context omitted.

>> 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…

Who says you have to upload your code directly to the deployment directory? Upload files, switch symlink. Done. You are talking about a deployment technique that has nothing to do with PHP.

Nah, I am speaking about the general/majority culture of how it is done in PHP.

Do you not see the comments in this specific thread? The guy a bit higher up the chain thinks my issue is with "FTP vs SFTP", rather than "the version of the files at a particular moment in time".

He doesn't even understand why a partial view of the files could be an issue.

And the general sentiment in PHP is that "you can change any file separately, by editing in online on the server - and that is a good thing".

Re: Moving from Go to PHP Again

#362

Earlier quoted context omitted.

What makes it a PITA? I use go for building websites and it was the first time web development really made any sense. All the other systems out there require tons of tools, and lock you into doing things their way . So, what makes GO so much of a pain? Maybe ignorance is bliss for me?

I made a very simple webapp a few months ago, where students are proposed assignments and can rank them. For that, you need authentication, and DB management: a subject table, a student table, and a ranking table. You have to do all of that manually in go, while other languages have frameworks that take care of it. Still did it in go because it was a very simple webapp and deployment is so easy with go, but for a mor…

I hear this argument a lot. I like to ask, are you writing software or using frameworks?

I am not saying you need to write all your software but if your app is on the lines of declaring a few statements and running a command to generate the rest then I have to ask what you really are doing. On top of that you have to ask how you will approach changing your program using frameworks to the specs of the task at hand?

Also, can you go into what is "manual" about autentication, db management in go? Compared to other languages? Did you mean framework?

Re: Moving from Go to PHP Again

#363

Earlier quoted context omitted.

> Laravel just has too much magic that will bite you later on. Especially when that is not explained in the docs or just in a very vague way... I tried improving the docs by pointing out where magic (e.g. fix naming conventions) is needed and where not, but the mantainer just turned that into vague mush again (after he had even agreed to the changes). Also if you need any more details that are not in the docs, everyo…

> Also if you need any more details that are not in the docs, everyone points you to paid video courses that assume you have a Mac... I assume you're referring to laracasts.com... what does having a mac have to do with the videos there?

When I watched it 2-3 years ago most of the tooling that they set up was OSX specific. Nothing tragic, but still.

Re: Moving from Go to PHP Again

#364
post #306

Earlier quoted context omitted.

Most of my work on a daily basis is PHP (Laravel) and I use Visual Studio Code as my main driver. It's pretty good with Python too, which we have a little bit of (mostly Flask apps).

Do you have any good extension recommendations for VS Cocde as it relates to PHP development?

For code copletion I use PHP Intellisense but it still doesn't support multiple root folders in the same workspace. For debugging PHP Debug. vscode-php-cs-fixer and vscode-phpstan have helped a lot. In addition I use PHP Namespace Resolver and PHP DocBlocker. Lastly, PHP Getters & Setters may be useful.

Re: Moving from Go to PHP Again

#365
post #341

Earlier quoted context omitted.

Laravel is not what it used to be either -- Laravel 5 is far more capable/usable than Rails or Django. It's ecosystem is vaster, much stronger community, better docs, faster -- pretty much every state it's better than it's competitors. Not an end-all be-all, but worth noting: https://github.com/topics/framework

Laravel may, may be better than Rails. But Django is better still.

How so?

Re: Moving from Go to PHP Again

#366
post #19
post #11

Earlier quoted context omitted.

Hm, I hate to be on the bandwagon, but why WordPress? One of the things that has made PHP become what it is today is a focus on good software engineering and the introduction of language features that are required by that. WordPress did not keep up on the engineering front and there are so many amazing options out there now for well written, well engineered platforms. Even in pre-built blog platforms. You're not alon…

I am completely out of the loop here. All I know is that I really disliked Wordpress and really-really disliked Drupal back in the day. Can you mention some of the better alternatives? Once in a while a PHP CMS is what I gotta deal with and I dread it, because of the said systems.

Check out OctoberCMS. The simplicity and ease of use of PHP while being a very modern and stable platform to build one. Disclosure: I'm the community manager :)

Re: Moving from Go to PHP Again

#367
post #345

Earlier 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…

> …in my experience (but also according to the highly biased benchmark game)…

You seem to be saying that what you see on the benchmarks game matches your experience, which makes your "highly biased" claim kind-of strange.

Please show something on that website that is "highly biased".

Re: Moving from Go to PHP Again

#368
post #353

Earlier 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.

> …examples aren't all using the latest features…

You know you can contribute what you consider to be better examples — https://salsa.debian.org/benchmarksgame-team/benchmarksgame/...

> …or even best algorithms…

Wouldn't that make the algorithm the difference ;-)

Re: Moving from Go to PHP Again

#369
post #19

Earlier quoted context omitted.

I am completely out of the loop here. All I know is that I really disliked Wordpress and really-really disliked Drupal back in the day. Can you mention some of the better alternatives? Once in a while a PHP CMS is what I gotta deal with and I dread it, because of the said systems.

FWIW, Drupal is way better now.

Yeah, I've heard that their architecture has really moved on. Good to know. Thanks for confirming!

Re: Moving from Go to PHP Again

#370
post #167

Earlier quoted context omitted.

nginx can also do it for any FCGI script.

I've seen that Nginx can remove the .php suffix, with its try_files directive. but I haven't see how it can handle PATH_INFO of arbitrary length. Can you point me to the documentation that you're thinking about?

I use a config like https://github.com/ibukanov/bergenrabbit/blob/master/webapp/... , it is pretty standard.
Post reply on HN