Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
muglug
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
33 ms
·
511.
▲
by
muglug
5y ago
The camel (in the top left corner) was the first thing I noticed!
512.
▲
by
muglug
5y ago
If this becomes the norm then it's the end of SF as a tech hub. A big move for a company paying the sorts of salaries it does.
513.
▲
by
muglug
5y ago
> I run memcached at a large scale I don't believe you run it at the scale Slack does. The people at Slack who decided to use Mcrouter (and created Mcrib) have experience running Memcached, Mcrouter and Nutcracker in production at t
514.
▲
by
muglug
5y ago
The site doesn't make it clear, but this isn't a full list, since PHP 8.2 will be accepting RFCs until mid-July (see https://wiki.php.net/todo/php82 for the release timeline). Even though it's incomplete
515.
▲
by
muglug
5y ago
A bit of one, a bit of the other. It's fairly well-optimised. I think the big remaining optimisation will be to de-allocate memory less frequently — the program creates and destroys millions of structs representing types. 20% of the
516.
▲
by
muglug
5y ago
A few minutes. It's not heavily IO-bound — it's mostly memory-bound (it's a type-checking tool for very large codebases). Further (painful) optimisations will likely involve the use of arenas to prevent so many atomic de-allo
517.
▲
by
muglug
5y ago
> When a person converts their 100 KLOC PHP command line utility(!) to Rust and that's not a bigger red flag than their negatives list, it's a world gone mad. I'm not converting, I'm just porting a good chunk of it fo
518.
▲
by
muglug
5y ago
Yes — that's after a ton of Rust-centric optimisation. About 25% of the runtime is currently consumed with deallocating memory (there are a lot of heavily-nested data structures getting cleaned up), so there's definitely some more
519.
▲
by
muglug
5y ago
It's more a CRUD app that has many features added in the first six months, and fewer features added thereafter, and then a few months go by and a new developer takes over and has to figure out how to add yet another feature. That model
520.
▲
by
muglug
5y ago
The deployment story of the PHP tool in question is pretty good thanks to the semi-official Composer package management system (it hasn't been officially endorsed, but everybody uses it). People just run `composer install --dev vimeo&#
521.
▲
by
muglug
5y ago
Thanks, I did not know about that particular solution — that adheres more closely to the idealised pseudocode than any of the other Rust alternatives.
522.
▲
by
muglug
5y ago
> don't "convert" PHP code into Rust. Re-design your program. Trust me, I am! For example, I'm rewriting all the (very-efficient) PHP regex code to a much more convoluted version because Regex::new is so costly. Less
523.
▲
by
muglug
5y ago
Yes, but IMO that makes the code a bit more abstract: You've left behind an explicit "is this collection non-empty" and you're instead relying on a property of a non-empty collection. The PHP version can also be written
524.
▲
by
muglug
5y ago
Rust has smart type checking. The really smart stuff is (IMO) the beauty of the borrow checker. In PHP, modern typecheckers can verify that the first element always exists on an array after an emptiness check: if ($some_arr) {
525.
▲
by
muglug
5y ago
> how does the KLOC count compare for the PHP and Rust versions I don't have exact numbers since it's not a straight port — the original PHP code was written to analyse a slightly different language than the Rust version I'
526.
▲
by
muglug
5y ago
Yeah, but the thing you're building is quite a bit more complex than the average consumer-focussed website.
527.
▲
by
muglug
5y ago
That's great for you and your team, but looking at https://github.com/grapl-security/grapl it seems like your needs are pretty different from most web developers.
528.
▲
by
muglug
5y ago
I've spent the last few months porting the guts of a 100 KLOC PHP command-line utility I wrote to Rust. Thanks to the wonderful Rust documentation it's been a mostly painless endeavour. What I've gained as a result: - executi
529.
▲
by
muglug
5y ago
Yes — my grandfather, who had a chest infection aged 99¾, was given an increasing amount of morphine for the pain (instead of antibiotics). The death came at the point he could no longer recognise his children, where his quality of life was
530.
▲
by
muglug
5y ago
Lots of people have studied the question of why women aren’t running Fortune 500 companies, and unsurprisingly the answers have a lot to do with sexism. The average age of a Fortune 500 CEI is 58. Talk to any female executive of that age an
531.
▲
by
muglug
5y ago
> Can a statement be x-ist, for whatever value of x, and also true? If the answer is yes, then they're admitting to banning the truth I disagree. The statement “very few women are capable of running a Fortune 500 company effectively
532.
▲
by
muglug
5y ago
> Remember that the Raspberry design team is from Britain, same as Douglas Adams. And Eben studied at St John's College, Cambridge, same as Douglas Adams
533.
▲
by
muglug
5y ago
No — I bought rubber ones which fit very snugly.
534.
▲
by
muglug
5y ago
One controversial decision does not define that team, which spends the vast majority of its time dealing with uncontroversially awful content.
535.
▲
by
muglug
5y ago
There's no mention here of moderation, a key ingredient to any social network of people who lack real-world ties to each other.
536.
▲
by
muglug
5y ago
You can buy custom tips from a bunch of places — I had the same problem (weirdly small ear canals) and unofficial tips saved the day.
537.
▲
by
muglug
5y ago
> The Hack type system, particularly the ability to express nullability, is just vastly superior. I agree the type system is superior, given the language was created to have a type system in the first place (PHP was not). But PHP has a
538.
▲
by
muglug
5y ago
It’s not really in the same vein, since the OP is referring to modern PHP and your article was written over a decade ago. Many of the points in the decade-old article still stand, but the ecosystem around PHP has papered over a lot of the
539.
▲
by
muglug
5y ago
> In terms of actual compression, HEVC has slightly better efficiency. Where are you getting that information?
540.
▲
Russia moves to declare Meta “extremist”
(twitter.com)
4 points
by
muglug
5y ago
|
0 comments
More ›