skysight-inc/HackerNews huggingface dataset:
I used PHP several years ago and are considering trying it again for my side hustles. You basically just push files to a folder and "forget about it"

It just keeps running and auto corrects any temporary load issues because of its stateless nature. I don't have to worry about memory leakage or processes that eventually become unresponsive and needs to be restarted. If the unlikely event that the PHP process crashes, it will just restart automatically and handle the next request as if nothing happened.

Its the ideal solution for side projects, and I am definitely going back now that I don't have time to maintain complicated infrastructure.

PHP was my generation's version of AWS stateless "lamda". Just place a file in the folder, and it will be executed on demand and clean up resources after the request has ended. A server could handle many different websites at the same time. That was basically how we could get cheap webhosting. They just put a bunch of Apache-instances behind a load balancer and used a shared network drive to read the files from
> I want to ride my bikes, not spend hours fiddling with brake hydraulics and suspension seals!

Not a problem! Why not...

> I don’t (or won’t) trust any shop mechanic to touch them

Oh. That explains it.

Have you considered reverting to simpler bicycles that require less frequent and simpler maintenance. Rigid frame, cable-actuated brakes, possibly a gearbox?
i do know people who write scripts in php, however, there are no libraries like pandas in php as far as I know
https://pandas.pydata.org/
I agree. However those ‘crazy things’ you can do with PHP very easily cause security defects.

Mixing server side and front end code is bad news. I think following many PHP-MySql tutorials will result in SQL injection vulnerabilities. Not good.
Some aren't going to fall into the clown age trap at all.
Thank you for the English lesson, but it's a big leap from this supposed connotation to "painting pet projects black".
> This tempers high-frequency variation. The 2% over a full year lower-frequency variation is the problem.

Right. And that's where the e-fuels come in. Using batteries for that storage problem is absurd and unnecessary. The argument that renewables can't reach 100% because batteries can't do year-scale leveling is a strawman argument. It's bad engineering to try to use batteries for that use case. And because 2% (say) is such a small fraction of the total demand the low round trip efficiency of using e-fuels for grid storage doesn't hurt much overall.
I've heard claims that context without forgetfulness has already been reached 2 months ago, but as I'm not a domain expert I don't trust that I can differentiate breakthroughs from marketing BS, and I definitely can't differentiate either of those from a Clever Hans: https://arstechnica.com/information-technology/2024/03/claud...
Where are the engineering practices when we build a data-product?
> It seems now that it wasn't worth it.

While I'm not going to debate this particular instance, I would caution against assuming all moves (with or without blog posts written about them) are indeed the best and wisest moves that could be made given the situation.

It's incredibly hard to look at our industry at large and declare that teams/companies are doing the best thing they can at any given point (where "best" is defined here as the most prudent thing, all things considered).
I don't like Typescript because it forces me to think about types and data structures and stuff. Which is a Good Thing because I absolutely have to think about that stuff when working on large codebases with a team of colleagues: without the inline documentation and text editor help TS gives me when working on those codebases I'd be (at least!) 10x slower when refactoring old code or adding new code. And nobody wants to pay a slow developer!

However ... the one place I refuse to use Typescript is in my side project - a JS canvas library. I can justify this because: 1. it's a big codebase, but I know every line of it intimately having spent the last 10 years (re-)writing it; 2. nobody else contributes (and I kinda like it that way); and 3. I keep a close eye on competing canvas libraries and I've watched several of them go through the immense (frustrating!) work of converting their codebases to TS over the past few years and, seriously, I don't need that pain in my not-paid-for life.

Even so, I do maintain a .d.ts file for the library's 'API' (the functions devs would use when building a canvas using my library) because the testing, documentation and autocompletion help it offers is too useful to ignore. It is additional work, but it's just one file[1] and I can live with that.

[1] https://github.com/KaliedaRik/Scrawl-canvas/blob/v8/source/s...
Closure team have also deprecated a lot of the old tooling. Closue was ahead of it's time for sure and as someone who heavily used the Closure Library and Closure compiler in advanced mode, it is sad that it did not catch on.
However using TSickle you can transpile Typescript into javascript which closure compiler uses for advanced optimisations.
mod_python was supposed to be that, it's a real shame it never got enough traction.
The "push files and forget" mindset is why PHP is a nightmare for operations on a serious production.

To be fair, it shows up as a nightmare from a certain scale. Toy projects might not reach this level..
PHP is awesome if you're a pragmatic engineer who just wants to get things done, and with things like Laravel Octane, it's also a decent solution for high performance applications now, something it historically wasn't good at. That said, if you only care about the elegance of your code, refer to it as "prose" and instead of making solutions prefer to wrangle ideologies, then PHP is most definitely not for you.
I bought a bicycle with a Pinion gear box and a Gates carbon belt drive. No lube, no derailleur, no chain falling off, no maintenance, hose off after a muddy ride. The belt will last 3x longer than a chain presumably.

EDIT: autocorrect
Bud-dum tsh.
You give up on a lot of data you could otherwise have collected by doing that, data which could have helped the product in other ways.
It's the opposite: "professional" php sucks now, with all this overengineering and developers constantly trying to prove how PHP doesn't suck by adding new complexity. "Look, I've overengineered it to death! It's possible in PHP so now you can't say it sucks"
Sounds like they were inspired by the "Boar on the Floor" episode of Succession, playing a kind of dominance ritual over the prospective employee in the guise of "a bit of fun".
How does it solve the Byzantine generals problem?
Or Orion’s heatshield for that matter. Orion 2 should have the attachment mechanism redesigned, most likely as arms attached to the upper side of the reentry vehicle rather than in holes in the shield itself.
I'm strongly with GP on this. I wonder if this isn't some kind of broader difference between people, because I also disagree with the excellent examples you used. Cooking and yard work don't enhance my subsequent enjoyment of a good meal or relaxation - rather, I experience both to be annoying bullshit chores (ABC!) that, more often than not, I can't get myself to engage in, which means they deny the experience altogether instead of enhancing it.

Makes me think of the old, well-known saying, that you should focus on the journey rather than destination. In my mind, it does not compute. I often wonder if I'm broken somehow.
The problem is that PHP still has no credible competition whatsoever in core use cases like "take an HTML document and replace static part with something fetched from a database", or "take multiple HTML documents and factor out a common structure that you might want to change everywhere at once later". Of course there exist solutions in "modern, well-designed languages" for these, but I will confidently take a challenge from any node.js, Elixir or Ruby developer on who can get it done faster.

Sophistry about how my solution won't scale to a million users per day or I should have used their framework from the start rather than having a bunch of HTML files won't matter to me nor the <10k people I expect on my website. In many cases, modern languages and frameworks drive adoption for themselves by tricking you into solving a problem that is not actually the problem you have, but they happen to be adapted to.
I think the point they were making is that a suitable technology to deliver power to a moving vehicle has been around a long time, not that everyone should get rid of their cars and use trolleys.

If we combine a modern EV with 100 year old tram technology, you get the ability for a car to charge itself when travelling on roads that have a compatible system of overhead power lines. Having a huge pantograph on top of the car is kind of impractical, but powering cars from underneath via power rails embedded in slots in the road, like a full-sized version of those toy slot cars that used to be popular, is another option that's been tried on some roads in Sweden.
After 6 years of Clojure, I went back to PHP because it now has type safety and an amazing ecosystem of high quality libraries, allowing me to be very performant in my work. But then again, I was never in a abusive relationship because back when I did PHP, I didn't really know any better, so it was totally fine.
> The crux of the Fukushima costing is whether damage actually occurred to property.

The legal requirement would be if it caused land values to decline. It doesn't matter if that decline was for a reason you'd call irrational. It wouldn't even require proof of responsibility beyond a reasonable doubt; "preponderance of evidence" would be enough in the US system.
> The most crippling thing for my use cases is the single 1 Gbps connection externally, and the internal 1 Gbps Ethernet switching. It'd be nice if it did at least 2.5 Gbps.

Their Github seems to suggest they're working on getting both jacks working at the same time... it's been a couple days since I last checked, so they might have it working now.
4 hours of activity a day is a big ask for most I suspect.
Kinda incredible how nearly every comment here mentions S3. Cloud storage is not the only backend in existence :)
Not gone but no longer in fashion, just look at valuations
Super traumatic for his girlfriend though...
Wars build a fortune, help civilisation move forward and innovate on things, most modern-day inventions were the result of war-time effort.

The victims are a sad reality of wars though, but that's life :)
OpenAI Releases Its First AI-Made Music Video
> Because this method of deployment is not only unsafe but also doesn't scale.

How is a mainstream web server acting as a reverse proxy for an app server unsafe?

You get the benefits of one common approach to configuration, request logging (and possibly log shipping), rate limiting, compression, path rewriting and so on, while letting the app server handle the actual app and language runtime stuff (whether it's some Python app server, PHP, Java with Tomcat or whatever). You can even serve any static assets right there, alongside your API.

You can either include everything in a container, have separate containers for each process with overlay networking, or just have them run on the OS directly with only the web server binding to whatever ports you want to expose.

As for scaling, none of that prevents you from running anywhere between 1 or a million instances in parallel, with some load balancing (whether it's multiple servers or containers across a cluster). If it's really that bad, throw in HAProxy or something into the mix, alongside whatever cache solution tickles your fancy.

That's besides the point that I could provide a service to everyone in my country on a single rack (redundancy aside), not everyone even needs some mythical sky high scaling target.

> In the age of cloud, you just run your web application as its own server, a just have a proxy that fronts it.

Whether you use your own ingress (there's a lot of good ACME solutions out there) or something that your cloud provider gives you, using a server per app would in many cases be wasteful and there's a bunch of ways to increase the density, especially with the dynamic scheduling most container orchestrators could also give you.
>I'm allergic to this style of development, the "banging on it with a rock until it starts moving" approach tends to result in poor outcomes over the long term.

I was sold on this too, that's why I left PHP for sexier stuff and never regained my productivity. As it turns out, most of the time I don't have a complete idea on what I'm doing but instead I have a direction and banging on it with a rock until it starts moving *in the right direction* is very productive because the design happens at the same time with the development.

My PHP code was complete "garbage" but it worked as expected and made me money and/or satisfaction of building things. Later I improved my coding skills and become much more aware of patterns and structures and found myself optimising the code instead of the product, destroying my productivity because as it turns out computers don't actually care or reward you for beautiful code. All that matter is, what that code is doing regarding the expectations of the humans who benefit from it.
> How do you go into production? You put the file in a folder on the Web server. It works everywhere the same.

Well, not really because you have this massive php.ini file with tons of settings and whatnot, and scripts not working due to that was always a common point of failure back when I was using PHP. Also: not having some extension, which are almost always in C and require server installation (which is quite different from many other languages, where the user can usually specify most or all of their dependencies).

Maybe all of this changed? I don't know. But PHP in general has been the most fickle and unreliable environments I've dealt with. Give me any random servers, and I find it very hard to tell if my PHP script will run.
If you want to be pedantic then multi-byte string !== UTF-8 support. ;)

Consider the intended purpose of the language and then consider whether the abstraction offered is appropriate. IMO in the case of PHP and UTF-8 it is not.

In my specific case it made my job harder than I would like on 2 projects I used PHP for, which is why I am complaining.
Thanks for this comment. A text like this should really be present whenever medical study results are presented on HN.
But there is a difference between need when it comes to endurance (so that we can tire an animal enough that we can catch it and eat it) and the need to benefit from the physiological effects of movement.

It isn’t a given that endurance exercise is good for us (I mean, it probably is, but no more good than any other form), it is a given that humans have good stamina because we needed to eat though, that’s surely the only real conclusion we can extract?
https://github.com/google/magika

Magika is a novel AI powered file type detection tool that relies on the recent advance of deep learning to provide accurate detection.

It's not a sliver bullet, but I use it recently for inspecting file type instead of magic file.

One advantage is that detecting composed files. Take pdf+exe file for example, the library will report something like 70% pdf and 30% pebin file.
This, but hire anyone that declines.
It depends on the frame of reference, so you can correctly say that the sun goes around the earth.

You're instead thinking of heliocentrism vs geocentrism, which is about the planets as a whole revolving around the sun.

This is a common misguided gotcha question that is hilariously so confidently gotten wrong, just like what is heavier, a kilogram of lead or a kilogram of feathers? The former is heavier and I can prove it with one word.
> Can I now get EEXISTS and such out of fopen()? Looking at the docs it still just returns false and emits an uncatchable E_WARNING that can't be examined programmatically.

Sure, the most straightforward way is to first use the "x" flag for write-only, and "x+" for read/write access.

$fp = fopen('file.txt', 'x+');

From the PHP docs:

"If the file already exists, the fopen() call will fail by returning false and generating an error of level E_WARNING. If the file does not exist, attempt to create it. This is equivalent to specifying O_EXCL|O_CREAT flags for the underlying open(2) system call."

And finally to convert E_WARNING errors to exceptions, use you can use set_error_handler() to throw an exception (and even write business logic to filter them): https://www.php.net/manual/en/language.exceptions.php

They're not unhandleable.

But if you want a single function that throws a specific exception when a file exists, specific to the behavior you want, I got you:

<?php
declare(strict_types=1);

namespace Argp242;
use function fopen as php_fopen;

function fopen(
string $filename,
string $mode,
bool $use_include_path = false,
$context = null
) {
if (file_exists($filename)) {
throw new \RuntimeException('E_EXISTS');
}
return php_fopen($filename, $mode, $use_include_path, $context);
}

To run this code from outside a namespace, simply:

try {
$fp = Argp242\fopen($filename, $mode);
} catch (RuntimeException $ex) {
// Handle $ex
}

Throw it in a library somewhere, having written it once, and now you can just use that whenever you want that behavior in your PHP code.
Will Flutter be the major tech stack they hyped it to be?

My developer friends love it, but can't find decent-paying jobs in India. What am I missing here?
> 4. While the cake is in the oven draw some language trees. These indicate how populations have historically come into contact over time (population dispersal and the diversification of linguistic lineages).

Seems superfluous; there are cases where we know good and well that a story was transmitted without much in the way of cultural contact. For example, Cinderella comes from China: https://en.wikipedia.org/wiki/Ye_Xian

We don't know anything about the path of transmission or the intermediate stories that must have existed in locations between China and Italy, but it is plain that the stories are the same.
that shop could be using the latest academic language with full guarantee syntactic checks and perfect compiler and testing... you would still have the same problems.
What do you mean you don't have every disjointed combination of needle, haystack memorized? ;p

As someone who spent many years developing in (and defending) PHP, I agree with everything you just said.

Nowadays, I'd rather reach for Crystal, Go, or Rust for back-end application development, and Python or Typescript (!) for automation scripts.
I don’t get this argument. const means you can’t reassign the variable, that’s it. If you don’t plan on reassigning the variable, use const. In the rare places that you don’t use const, you’re telling me that you reassign the variable somewhere.

I don’t understand why people need const to be something it’s not. The fact that you can still mutate objects is because in js, an object assigned to a variable is best thought of as a pointer to a value in the heap. const means the variable won’t reassign the reference, Object.freeze means the referenced data can’t change. Both useful, both different use cases; needn’t be conflated.
It's a better language. Better performance, better typing, better syntax, and so on.

Build an application in Python, then as soon as it becomes pushed by load you're going to need a rewrite. A few small load balancers and virtual web servers doing PHP can handle tens of thousands of requests per second, the database is almost guaranteed to be the bottleneck.

Python is a (according to some) nicer bash, it's not a good alternative for implementing non-trivial systems and web services.
i have nightmares from PHP, too, so i get where you're coming from. but i think you'd have to go back at least a decade to find tutorials that bad
For me it's not what the language itself is like, but what's the average project I can end up working on. So PHP was magical when I was using it on my side projects, but as soon as I started commercial work on full blown projects with frameworks, it made me question my life choices. Lack of version control or test suites, editing files directly via FTP were common practices. Wordpress plugins that invited hackers to mess with your code. Maybe I was just too incompetent back then, but moving to Ruby saved me - for instance how much emphasis the community puts on writing testable code and testing it. Few years later I tried PHP again and it felt like Wild West compared to Ruby (that was 10 years ago). So while it may not suck anymore, it's not the case for all the legacy code out there.
Even on SpaceX launches I’m rooting for the rocket.
It's right there in the comment above, 100 steps/minutes. Just over one and a half steps a second. It's not ambling around window shopping, but that's not really that brisk at all if you're going somewhere.
...have you even met senior management? They're long past their usefulness and not only does everyone else around them know it, but they've caught on too. All they have left to maintain their status are power trips, since merit is no longer a metric they themselves can abide by.
A company that does this should be sued out of existence.
if you reach a certain scale and still do that, the language is the least of your worries.
> PHP and its community were dying by the time FB used it.

> Php community is still dying.

https://www.tiobe.com/tiobe-index/php/

https://w3techs.com/technologies/overview/programming_langua...

Yeah I dunno about that one.
Yeah, the person you replied to thinks of cycling as a sport, not as a form of transportation. That is the sorry state of affairs in North America and Australia.

Edit: I see now that you are in TX, so this isn't news to you.
> merit is no longer a metric

In most places it never was.
In NodeJS for example don't you have use Buffers and special decoders to deal with UTF-8 strings? I.e it's a pain there too.
Interesting quirk I noticed when accessing your site:

1. The site was shown in a light-theme version and the sun icon on the upper-right corner.
2. When clicked on the sun, it changed to a moon icon but nothing else changed, the light theme was still on.
3. When clicked again, the moon changed to the sun but this time the dark-theme was engaged. The only issue is that the dark theme is displayed but the sun icon appears.
4. When the sun icon is clicked, the light theme is engaged and the icon changes to the moon.

For some reason it feels counterintuitive. Just sharing for reference but great site!
I can't take seriously a review that includes the criticism "I found the paper to be written in a statistical analysis style, therefore not very accessible."
2 buckets:

- upload bucket

- processed bucket

upload bucket has an event triggered on new file upload which triggers a lambda, the lambda will re-encode and do wtv you deem fit and upload to new bucket

your app will use the processed bucket
Technical Artist would be the primary role. ShaderToy and other such resources for shader programming. Extremely creative field.
as poijted out already magika is useful for good file type analysis. also, scan thoroughly for viruses, potebtially using multiple engines. now this can be tricky depending on the confidentiality of the uploaded files so take good care not to submit them to sandboxes, av platforms etc. if not allowed. i would really recommend it though.

if you want to get into the nitty grit of filetype abuse, to learn how to possibly detect that good. ange albertini's work on polymorphic filetypes and the ezine poc||gtfo as well as lots of articles by AV code devs are available. its really hard problem and also depends a lot on what program is interpreting the files submitted. if its some custom tool.there might even be unique vectors to take into account. fuzzing and penteting the upload form and any tools handing these files can shed light on those issues potentially.

(edit: fat fingers)
The Case of the AI-Generated Giant Rat Penis