Hacker News new | past | comments | ask | show | jobs | submit | casperb's comments login

We use it with PHP/Laravel on the server side. It just needs HTML pages and the JavaScript of Hotwire Turbo in that page.

For the fancy streams and frames you need some extra headers being sent from the server, but also that is doable from PHP.


I don’t think this is universally true. At least not here in the Netherlands, but even in visiting the US it does not feel like that everywhere.

I think it is very sad the moral standards are so low. I find that even harder when mixed with “why does the government get involved in everything?” attitude.

I also don’t lead my company of 27 people that way.


Too often I see the attitude of "I can't believe a company would do that". Personally, I always believe it. We know companies will do everything within the law to make money, as is their purpose for being, and we also know they will break the law if they think they can get away with it. Not all companies all of the time, but we are fools if we don't expect it from some companies some of the time and on a consistent basis.

It actually reminds me of a Dutch policy (which may be apocryphal, please correct me) wherein prisoners in the Netherlands do not face further penalties for escape attempts because they are simply engaging in the only natural behavior we can expect from a person in a cage.


It is not “companies” but individuals. But yes, there are a lot of people that are only driven by greed and power. But not all by a long shot. I believe most of society would fail if everyone was doing the maximum they could get away with. So, there should be a lot of people that don’t seek the maximum they can get away with.

But I agree that a lot of companies are so big and so faceless, that they do too much bad stuff and lots of people in the company would just shrug it off with “it is not my job to say something”.


>It actually reminds me of a Dutch policy (which may be apocryphal, please correct me) wherein prisoners in the Netherlands do not face further penalties for escape attempts because they are simply engaging in the only natural behavior we can expect from a person in a cage.

This is my philosophy as well, which is why I as a juror would be soft on "crimes against law enforcement" because being a cop is part hunter, and do you expect all your game to not attempt evasion?


These blanked statements about monoliths are what made every junior dev think that microservices are the only solution.

If you cannot make a clean monolith, I have never seen any evidence that the same team can make good microservices. It is just the same crap, but distributed.

The last 2 years I see more and more seasoned devs who think the opposite: monoliths are better for most projects.


> It is just the same crap, but distributed.

Yes, but also - more difficult to refactor, more difficult to debug (good luck tracking a business transaction over multiple async services), slower with network overhead, lack of ACID transactions... Microservices solve problems which few projects have, but adds a huge amount of complexity.


monoliths are the postgres of architectures - keep it simple until you really can't, not until you think you can't.


I tried a setup with Nginx Unit and php-fpm inside a Docker container, but the way to load the config is so combersome I never was confident to use it in production. It feels like I am doing something wrong. Is there a way to just load a config file from the filesystem?


We're very actively working on improving Unit's UX/DX along those lines. Our official Docker images will pick up and read configuration files from `/docker-entrypoint.d/`, so you can bind mount your config into your container and you should be off to the races. More details at https://unit.nginx.org/installation/#initial-configuration

But that's still kinda rough, so we're also overhauling our tooling, including a new (and very much still-in-development) `unitctl` CLI which you can find at https://github.com/nginx/unit/tree/master/tools/unitctl. With unitctl today, you can manually run something like `unitctl --wait-timeout-seconds=3 --wait-max-tries=4 import /opt/unit/config` to achieve the same thing, but expect further refinements as we get closer to formally releasing it.


That sounds much better, thanks for the effort.


https://unit.nginx.org/howto/docker/#apps-in-a-containerized...

> We’ve mapped the source config/ to /docker-entrypoint.d/ in the container; the official image uploads any .json files found there into Unit’s config section if the state is empty.


I saw that, but I do like to make my own container. So I did roughly the same steps as they do. But it feels complicated.


Can you copy the official image's script? https://github.com/nginx/unit/blob/0e79d961bb1ea68674961da17...


I am building https://github.com/claceio/clace. It allows you to install multiple apps. Instead of messing with routing rules, each app gets a dedicated path (can be a domain). That way you cannot break one app while working on another.

Clace manages the containers (using either Docker or Podman), with a blue-green (staged) deployment model. Within the container, you can use any language/framework.


The docs mentions:

> The control API is the single source of truth about Unit’s configuration. There are no configuration files that can or should be manipulated; this is a deliberate design choice

(https://unit.nginx.org/controlapi/#no-config-files)

So yeah, the way to go is to run something like `curl -X PUT --data-binary @/config.json --unix-socket /var/run/control.unit.sock http://localhost/config/` right after you start your nginx-unit.

The way to manage a separate config step depends on how you manage to run the process nginx-unit (systemd, docker, podman, kubernetes...). Here's an example I found where the command is put in the entrypoint script of the container (see toward the end): https://blog.castopod.org/containerize-your-php-applications...


I did that, but sometimes it takes a short moment before Unit is started, so you need a loop to check if Unit is responding before you can send the config. In total it was around 20 lines just to load the config. It feels like doing something wrong. Or using the wrong tool.


I like restful API’s the most. Graphql is cool if you need data combined that is not nicely available in the restful endpoints. But I think that could mostly be solved with good endpoints that help with the actual use cases. When restful endpoints are hard to use, in a lot of cases it is because they are to much focused on how it is easy to write server side, then it is to consume them.


Yes he has. I have seen multiple episodes on his YouTube[1] where he absolutely grills the whole company. He also gave them a deadline to opensource the drivers or he would stop trying to make AMD stuff work.

Sorry for no direct link, but he has so many and very long videos that it is hard to find the exact spot.

https://www.youtube.com/@geohotarchive


I use this quite a lot as well. Holding the merge button on GitHub, while thinking it through one more time.

I could get used to act on press, but this is my current muscle memory after 30 years of computers.


(Physical button, but…) There are many reasons why I dislike the Apple Touch Bar, but the most important one was that – as a software developer – I’m used to resting my finger on the F5 button.


The speculation that I heard was that Tesla saw a potential government enforcement of 1 type of connector. So they made the deals with other car makers and opened their connector so that their connector would be the open standard instead of something else. So yes they gave up their advantage, but there was a possibility that is was ending either way.


I don't know the rationale, but I do know that in spite of what tech sites and their bands of commenters would have you believe Musk makes mostly rational decisions, often to a fault. The fault in this case being that if he feels your role is not directly contributing to an optimal outcome for the company, your job will be in jeopardy.

My immediate thought was that he sees that Tesla's Supercharger advantage is not going to improve enough to justify the large team. And the experience for Tesla owners is still likely to improve over time, even if Tesla is not expanding at the same rate: even though gas cars still rule, EVs now have a significant foothold, and the rate of 3rd party charger installations will continue to accelerate.

He also said they will continue to expand existing locations and will continue with installs at a slower rate. So that means either he didn't fire everyone or he has replacements in mind.

That's just my guess though, and in addition to my guess likely being flawed, the hypothetical rationale could be flawed too.

What you said about government decisions could be important too, but it seems strange to make such a drastic decision based on potential government action, especially with an election coming up that could turn the tables.


I would expect that most companies would be ashamed to publicly state that they sell your data to hundreds(!) of data providers and they would fix this before they had to disclose it. But nope, apparently the money is too good. And blaming the government is more convenient.


I just finished the last episode of The Talk Show podcast, where John Gruber says that Apple doesn’t hold a grudge and is only doing things because they make business sense. He said that because Apple approved Epic’s account and that they would be allowed their own App Store. I already that it was a bad take, but this shows it.


I find that Gruber occasionally has some interesting insight but it’s often hard to take him seriously these days — he’s effectively an unofficial PR outlet for Apple.

(Fun fact: he co-created Markdown with Aaron Swartz)

Edit: Swartz not Schwartz


It's a sad evolution. Gruber's blog is entitled Daring Fireball and in his early blogging days in the '00s he was in fact pretty daring and posted a lot of criticisms of Apple. Over time he had so thoroughly assimilated himself into the Apple way of thinking that he seldom notices whatever Apple is doing wrong.


He now gets exclusive 1 on 1 interviews with Apple execs and the blog is a full time job.

You got to shill to pay the bills.


> posted a lot of criticisms of Apple

His criticisms were all about how the NeXT folks were ruining Apple with their mach-o binaries, file paths & extensions, etc. You'd have thought that Avie Tevanian ran over his dog or something.


Really? I've always considered Gruber to be an Apple fanboy. He might write criticisms, but they read to me like a Deadhead penning an essay on why Aoxomoxoa isn't as good as Terrapin Station or something.

Ultimately, Gruber knows his audience is Apple enthusiasts and his material comes from being given access by Apple.


Swartz. Aaron Schwartz was in Mighty Ducks and Heavyweights.


Thank you. That’s an embarrassing mistake.


He's pretty critical of them in some areas. Mostly in developer-relations these days -- he doesn't like the anti-steering App Store rules, and Apple's general "we provided the successful platform; your apps contribute nothing to that" attitude.


John Gruber @gruber@mastodon.social ‪@stroughtonsmith @macrumors So much for my theory that Apple was making nice with Epic.‬ https://mastodon.social/@gruber/112050165133240095


Apple doesn’t hold a grudge

Nvidia


There is no point having rules and contracts if you aren't going to enforce them.

It is inarguable that Epic broke the terms of the contract. They could've simply done what Spotify and others did and lobby governments whilst honouring the terms of the agreement that they voluntarily chose to sign. Instead Epic chose to be petty in order to prove a point.

Is Spotify banned ? No. And they are 100x a competitor to Apple than Epic is.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: