|
Sapozhnik posted:Php is the boomer programming language p. sure rasmus is literally a boomer
|
# ? Mar 4, 2020 20:39 |
|
|
# ? Jun 4, 2024 09:09 |
|
nah, he’s an Xer and surprisingly nice got to have dinner a number of years ago with him and Guido and others
|
# ? Mar 4, 2020 20:51 |
|
Antigravitas posted:I was pointed to https://github.com/php/php-src/blob/master/ext/pdo_mysql/mysql_statement.c#L235 for an example of PHP's excellence in dealing with databases. the only obvious problem with this code is that the comment should have a link to the applicable mysql bug. a mundane workaround for a bug in a different library is a pretty boring choice to show "PHP's excellence" though. eschaton posted:nah, hes an Xer and surprisingly nice rasmus gets a lot of poo poo for having designed a bad programming language, but he fully admits that he didn't do a very good job and has never pretended that php is anything other than something he hacked together to solve his particular needs. he's like the exact opposite of the go designers.
|
# ? Mar 4, 2020 22:05 |
|
Plorkyeran posted:rasmus gets a lot of poo poo for having designed a bad programming language, but he fully admits that he didn't do a very good job and has never pretended that php is anything other than something he hacked together to solve his particular needs. he's like the exact opposite of the go designers. well except for the "having designed a bad programming language" part
|
# ? Mar 5, 2020 01:52 |
|
he doesn’t put on airs and never really has though, that’s the key difference PHP is just a thing that he made Rob Pike et al insist that Go is “well-actually good”
|
# ? Mar 5, 2020 01:59 |
|
HappyHippo posted:well except for the "having designed a bad programming language" part p sure php wasnt designed, it just sprang fully formed from rasmus' loins
|
# ? Mar 5, 2020 02:20 |
|
so what you're saying is, php is a kidney stone?
|
# ? Mar 5, 2020 02:23 |
|
HappyHippo posted:well except for the "having designed a bad programming language" part he didn’t really design it to be a programming language, he just built a tool to help him make sites and poo poo. then programmers happened
|
# ? Mar 5, 2020 02:45 |
|
php is fine for making a personal home page, its just a shame that other people started using it for important stuffRalith posted:so what you're saying is, php is a kidney stone? checks out, i wouldnt use someones kidney stone for important stuff either
|
# ? Mar 5, 2020 02:46 |
|
Krankenstyle posted:php is fine for making a personal home page, its just a shame that other people started using it for important stuff i would even argue it's probably fine for a hypertext preprocessor!
|
# ? Mar 5, 2020 02:47 |
|
abraham linksys posted:i would even argue it's probably fine for a hypertext preprocessor! a personal homepage
|
# ? Mar 5, 2020 03:08 |
|
Php got there first and is easily deployed on classical shared hosting setups. Even now it's a lot easier to just ftp a bunch of poo poo to a public_html folder than it is to set up a full blown VM and configure nginx and stuff. Docker almost gets there for ease of use but not quite. Config management isn't it and never will be it for casual projects.
|
# ? Mar 5, 2020 15:30 |
|
php is so easy even dumb 15 year old me was able to make insecure webapps with it. seriously, my first php app was a news aggregator and blog and it got owned because someone figured out how to inject new articles through the comments
|
# ? Mar 5, 2020 15:52 |
|
Php's poo poo security is orthogonal to its ease of deployment. Unfortunately.
|
# ? Mar 5, 2020 15:55 |
|
akadajet posted:php is so easy even dumb 15 year old me was able to make insecure webapps with it. mine was a single page with a guestbook and a link to a video about penguins. nobody signed the guestbook, but iirc i just stored each comment as a separate file in the file system because i has never heard of a database before
|
# ? Mar 5, 2020 17:04 |
|
I wrote my lovely web apps in perl
|
# ? Mar 5, 2020 17:14 |
|
my webapps are a mix of bash and c. i am pretty sure they have no security issues whatsoever.
|
# ? Mar 5, 2020 17:18 |
|
Krankenstyle posted:I wrote my lovely web apps in perl
|
# ? Mar 5, 2020 17:19 |
|
imo if what you want to do is expose a web service that takes an http request, validates some fields, and stuffs them in a database, or takes an http request, runs a database query, and spits out results, php is actually very good and practical i would not build anything in php that took more than about 50 lines of php to write, though
|
# ? Mar 5, 2020 18:10 |
|
honestly its a shame that more languages have not approached mod_php levels of deployment. that was probably the big thing that cemented php in place in history, and somehow everything that came after requires three nginx backwards proxies, a load balancer, and an orchestration control plane
|
# ? Mar 5, 2020 18:44 |
|
I still like plain CGI because the 1:1 relationship between program and page, and the from-scratch execution on page load, makes simple things really easy to set up and keep running. I don't care about the scalability or performance of my web trash at all.
|
# ? Mar 5, 2020 18:50 |
|
it is generally sort of weird that there hasn't been more webby languages that just up-front glues themselves to a web server and a sql database, since 99.9% of usecases would be improved by just accepting e.g. apache+postgres as a default if that means that everything is wired up at the get-go and can be purchased as semi-managed hosting. cgi remains great for just knocking a tiny thing out too. but otoh this is the pl thread and probably just tearing down abstractions left and right is not on-theme.
|
# ? Mar 5, 2020 18:51 |
|
fart simpson posted:mine was a single page with a guestbook and a link to a video about penguins. nobody signed the guestbook, but iirc i just stored each comment as a separate file in the file system because i has never heard of a database before better db than mongo tbh
|
# ? Mar 5, 2020 19:09 |
|
Cybernetic Vermin posted:it is generally sort of weird that there hasn't been more webby languages that just up-front glues themselves to a web server and a sql database, since 99.9% of usecases would be improved by just accepting e.g. apache+postgres as a default if that means that everything is wired up at the get-go and can be purchased as semi-managed hosting. https://hub.packtpub.com/introducing-postgrest-a-rest-api-for-any-postgresql-database-written-in-haskell/ written in Haskell so extreme on brand for plang thread
|
# ? Mar 5, 2020 19:10 |
|
Malcolm XML posted:better db than mongo tbh mongo doesn’t throw your data in the trash by default anymore, at least
|
# ? Mar 5, 2020 19:14 |
|
Nomnom Cookie posted:mongo doesn’t throw your data in the trash by default anymore, at least if you’re sending data to mongo then it is you that is throwing it in the trash
|
# ? Mar 5, 2020 19:19 |
|
Some of our data is in mongo but people keep putting the wrong shape in (it should all be the same shape) so rather than applying a schema were writing a new validation layer from scratch.
|
# ? Mar 5, 2020 19:22 |
|
I like stuff like scgi since it allows decoupling the webserving from the app and the protocol is super simple so p much every lang supports it, while not requiring a process launch on each request like regular cgi
|
# ? Mar 5, 2020 19:50 |
|
fart simpson posted:mine was a single page with a guestbook and a link to a video about penguins. nobody signed the guestbook, but iirc i just stored each comment as a separate file in the file system because i has never heard of a database before That is perfectly valid for a number of document based workflows. You'd have to do some restructuring if it grows, because having 100k small files in one folder tends to perform like arse, but if you can compute the name of the file from the request you can get pretty good performance from this. Dokuwiki does this. Even if everything crashes and burns you can still access documentation by grepping through the plain text pages.
|
# ? Mar 5, 2020 20:18 |
|
My son is also named ../../../../etc/passwd
|
# ? Mar 5, 2020 20:22 |
|
pointsofdata posted:Some of our data is in mongo but people keep putting the wrong shape in (it should all be the same shape) so rather than applying a schema were writing a new validation layer from scratch. an external validation layer is probably the right call. every time i have a conversation about mongo schema validation i am just left with more confusion about how anyone thought the design chosen was useful or would work
|
# ? Mar 5, 2020 20:25 |
|
Cybernetic Vermin posted:it is generally sort of weird that there hasn't been more webby languages that just up-front glues themselves to a web server and a sql database, since 99.9% of usecases would be improved by just accepting e.g. apache+postgres as a default if that means that everything is wired up at the get-go and can be purchased as semi-managed hosting. i suspect that the rise in popularity of rest-style web apis was the source of the disconnect. once you start worrying about "routing" requests, encoding arguments into the hierarchical structure of a URL and dealing with different verbs you lose any meaningful mapping between directory structure and scripts that should get executed this "modern" approach is mega overkill for many simple use-cases, though, which is why i think it's good that php still exists for said simple use-cases
|
# ? Mar 5, 2020 20:54 |
|
Cybernetic Vermin posted:it is generally sort of weird that there hasn't been more webby languages that just up-front glues themselves to a web server and a sql database, since 99.9% of usecases would be improved by just accepting e.g. apache+postgres as a default if that means that everything is wired up at the get-go and can be purchased as semi-managed hosting. SQL server had a featrure that was litterrally this. you could expose your procs directly as SOAP. idk if the implementation was the right way to handle it wrt security, but the idea is good. of course web "developers" are loving morons so we get poo poo like json.
|
# ? Mar 5, 2020 20:56 |
|
Internet Janitor posted:i suspect that the rise in popularity of rest-style web apis was the source of the disconnect. once you start worrying about "routing" requests, encoding arguments into the hierarchical structure of a URL and dealing with different verbs you lose any meaningful mapping between directory structure and scripts that should get executed i remember using CGI::Application to rewrite path-style urls to query args before passing them on to my handler functions. tbh im not sure why, im sure theres an easier way
|
# ? Mar 5, 2020 21:02 |
|
Nomnom Cookie posted:mongo doesn’t throw your data in the trash by default anymore, at least i trust the fs more than I do mongo and linux fs consistency is trash, so
|
# ? Mar 5, 2020 22:06 |
|
Suspicious Dish posted:honestly its a shame that more languages have not approached mod_php levels of deployment. that was probably the big thing that cemented php in place in history, and somehow everything that came after requires three nginx backwards proxies, a load balancer, and an orchestration control plane last time i made a fart web app i just clicked publish to azure in visual studio and then it was on the internet
|
# ? Mar 5, 2020 22:10 |
|
well i guess that was the last time i made a publicly facing one. last one i made period was an internal tool so i spent a little bit of time loving around with an autogenerated dockerfile to get it to go into our docker thingy correclty. took like half an hour of blind googling and copy pasting. it was awful
|
# ? Mar 5, 2020 22:11 |
|
Malcolm XML posted:i trust the fs more than I do mongo and linux fs consistency is trash, so just follow every write() with an fsync(), and also an fsync() on the directory if the size changed! easy. this is something that even mongo (nowadays) does better than a randomly chosen php dev will
|
# ? Mar 5, 2020 22:45 |
|
Nomnom Cookie posted:just follow every write() with an fsync(), and also an fsync() on the directory if the size changed! easy.
|
# ? Mar 5, 2020 23:01 |
|
|
# ? Jun 4, 2024 09:09 |
|
Nomnom Cookie posted:just follow every write() with an fsync(), and also an fsync() on the directory if the size changed! easy. this is something that even mongo (nowadays) does better than a randomly chosen php dev will lol it's way the gently caress harder than that
|
# ? Mar 5, 2020 23:02 |