Better HN
topnewbestaskshowjobs
Log inSign up

slashdev

17,493 karma · joined May 14, 2013 (13y ago) · 5,498 submissions

Founder of revscope.co

Revenue focused web analytics to help you quickly identify where to focus your effort to best increase revenue.

And embersofvictory.com

Retro turn-based strategy game.

Submissions

comment 6y ago · link · parent

It's a decent ballpark estimate, but it's definitely not a constant factor. People with really huge database deployments (like machines with 4TB of ram) must be crazy if they're not aggressively using pgbouncer to keep the number of connections down.

I'm actually quite heartened to hear that the attitude among Postgres developers is changing. Back in the day whenever people would bring up threads vs processes they got shouted down because processes are clearly superior and threads were "just implemented as processes on linux anyway". That's going to be one hell of a job to change now though.

To Tom Lane: I told you so :)

comment 6y ago · link · parent

He works hard, but his contribution to humanity in the form of Twitter is a tire fire. It's even questionable if humanity is better off for having it.

Square is a fine company, but let's face it, it is not changing the world. It's just another payments company with nothing particularly special to make it stand out.

I don't think you can compare him to Elon Musk, except again, the fact that they both work hard. Plenty of people do.

comment 6y ago · link · parent

There's this political correct thing where people act like there's no objective truth and everything is subjective.

That's just not how reality works, there is usually an objective truth even when we can't agree on what it is. You can use a hammer and a screwdriver for putting screws into drywall, but one tool is objectively better, under most conditions, regardless of your personal opinion.

Python is superior to C and Rust for most kinds of scripting tasks, given equal mastery of both. It has a REPL, it doesn't have a compile time, it has a great batteries included standard library. There are plenty of specific tasks that will be exceptions, but that's my subjective opinion. I also think it's closer to the objective truth - and that people who have a different opinion are simply wrong. I'm not afraid of calling it how I see it. I could be wrong here, but I don't think that's the smart money bet.

comment 6y ago · link · parent

Yes. US construction in general takes longer and costs almost an order of magnitude more for large infrastructure. Why? Higher standards certainly. Higher pay too. But you can't tell me Russia is less corrupt with a straight face. So what accounts for the difference? I think it's disturbing that the US is forgetting how to make things in general.

comment 6y ago · link · parent

I love rust, but Python is still my goto for scripting, small tasks, calculations, etc. It's more convenient for nearly all tasks of that shape.

I remember telling my uni professor about that 15 years ago, but she swore by using C for that purpose. It's what you know I suppose, but if you know both languages, Python is much better suited to the task.

comment 6y ago · link · parent

Yeah, the world could use more people like him. He's mostly not motivated by the money. After making $1B from the PayPal exit he could have just retired and bought a yacht or an island. He wants to de-carbonize transport and colonize Mars. Both to give humanity a better chance at surviving into the future.

That's three billion dollar companies so far and counting. Is there anybody else who's done that? Not to my knowledge.

He quite likely has some kind of savior complex, he's quite literally trying to save the world.

A fascinating and incredible human being.

comment 6y ago · link · parent

Doing one doesn't preclude doing the other, that's a false dichotomy.

comment 6y ago · link · parent

It's trite, but it's never too late to start. Certainly starting now is better than doing nothing in this case, and nuclear may be a good option. I'm not convinced that old nuclear tech is economically viable anymore compared to batteries + renewables. New nuclear tech may be. We need investment there.

comment 6y ago · link · parent

That's an interesting tidbit from Zero to One that I've forgotten. It's very rare to find someone who has founded more than one billion dollar plus company.

There are some good reasons for this:

- If you created such a company, you may still be running it. Jeff Bezos, Mark Zuckerburg, Larry Ellison. By the time you retire from that you're super wealthy and old, there's little reason to start over.

- Founding a company is HARD. Few people who went through that once are interested in doing it again. Paul Graham wrote about how he feels that way, although he did do it again with YC.

But I think the point is fair that success at that level requires not just skill but a lot of luck of being in the right place at the right time with the right idea and the right combination of skill and connections to pull it off. It's extremely unlikely.

You can certainly say Bill Gates and Mark Zuckerburg are skilled and they work hard. But it's clear they were also very lucky.

comment 6y ago · link · parent

I think these measurements include the page table entries in the kernel? It's my fuzzy understanding that page table entries are 64bit on amd64, so if you have 64GB of shared buffers (which is quite a lot) you'd have 128 mb overhead just to map that with 4kb pages. Which is to say the overhead is proportional to both the shared buffers size and the page size.

It is not a constant factor. Saying it is about 2mb is misleading.

It's possible I'm missing something special about postgres, but that's how shared memory between processes works on Unix systems in general.

MySQL uses threads which are much lighter weight because they don't need their own page table entries, and they don't need to do as many TLB flushes when switching contexts between them. It's one of the architectural decisions they did right I think. Postgres went with processes so it's easier to kill a connection cleanly, without leaving a things in a bad state. I think there are other ways of solving that problem though.

comment 6y ago · link · parent

To be clear, I mean they're using it relatively more aggressively for new projects than other large enterprises. It's obviously early days and the vast majority of AWS services are implemented in other languages (probably java, but that's just an educated guess.)

comment 6y ago · link · parent

Programming languages can be a very personal thing. But I will offer my perspective having used C++ extensively (both modern and awful), Go, Rust, a little Haskell and some 20 other languages in my two decades career.

Rust is one of the nicest languages out there. Very well thought out, elegant, full low-level control for real systems programming (sorry Go!) AWS uses it a lot, Microsoft is starting to use it.

Go, or even Python is better if you just want to make a backend API for a (web) app. You'll be more productive with it over Rust because you have a GC and can ignore the whole ownership issue for the most part. Python for very small teams likely to stay small for a long time, Go otherwise.

C++ has come a long way, but it's still hairy and loaded with footguns and baggage. I would only use it these days if I needed to use a big C++ library (like a game engine).

I am no longer willing to use Haskell, PHP, Perl, Java or JVM languages, .NET or anything else that's not Go, Rust or Python. With the same caveat as C++ above. I pass over job postings that require them. That's not saying those languages are bad, just that in my personal opinion there are better tools out there, and if I'm going to work with it day in and day out, it had better be in something at the top of my list - because life is short.

comment 6y ago · link · parent

Neither is glass, which I'd hazard lasts longer in the environment as well - although glass at least doesn't float so it can't "wander off".

comment 6y ago · link · parent

Why would you need to recycle wood? It's biodegradable and cheap.

Recycling is overrated for cheap products. Plastic is practically impossible to recycle effectively. If it were made to be biodegradable that would make much more sense. But even failing that, there is no shortage of landfill space, as long as it goes to the garage and not to the environment - a huge problem in the developing world and where the plastic in the ocean originates from.

comment 6y ago · link · parent

It's a very rough analogy. The brain doesn't work like a computer chip, but it does work much slower than modern chips in neuron firings per second.

comment 6y ago · link · parent

One hundred billion operations. The machine didn't have ECC memory, so a bit flip is a possible explanation. I should have checked if it was reproducible with ECC.

I still think a logic bug or compiler bug was at fault though.

comment 6y ago · link · parent

That's an interesting take on the pipeline. If market demand for heavy oil and oil sands supply are unlimited, then it would indeed function like that. Both are finite though. It's a possibility, I just don't have the information to say which would be the more likely outcome.

There's little doubt the pipeline is what's best for Canada. What's best for humanity is another question.

comment 6y ago · link · parent

Yes, this is true. In countries like China or Vietnam with lax environmental controls.

comment 6y ago · link · parent

I think I'm in favor of the pipeline, the alternative is shipping oil via rail which is riskier and burns more oil. Sadly it doesn't stay in the ground without a pipeline.

However, Canada should get smart here and do what Norway does with their oil profits. Invest it in a sovereign wealth fund that's diversified away from oil. Because the oil age is ending and it will hit the most expensive producers, like the oil sands the hardest.

That seven billion spent on converting to renewable energy might have made more sense.

comment 6y ago · link · parent

Yes, it's sad. It's a possible argument against old leaders - they're likely to be less forward thinking than someone with more life left. Plus people of that generation care a lot less about the environment.

It's obviously also a consequence of the short term focus of having fixed term limits.

I don't know how to fix these things, but it's irritating that nobody even tries to fix it.

comment 6y ago · link · parent

Exceptions don't make the rule though. There has been lots of information on the results of the clean water act. One example: https://www.sciencedaily.com/releases/2018/10/181009115102.h...

comment 6y ago · link · parent

Hardly anything is cleaner post industrial revolution. Not only are there more people but we use more resources per person and produce more waste products. That shouldn't be surprising to anyone.

There are exceptions though, sewers and sewage treatment have been a great invention. And big cities aren't drowning in horse shit which was a major issue in London and New York at the turn of the twentieth century.

comment 6y ago · link · parent

Yet the waterways in the USA have never been cleaner in the last hundred years. There are regulations and they are enforced, imperfectly like everything.

I live in Canada where we take the environment more seriously still.

comment 6y ago · link · parent

Looks like that military base dumped something yellow and very toxic into the river (or some other organization, but we only hear of the military base being in the area).

I wonder what kind of chemicals fit that profile?

It's nice to live in a country where doing that means lawsuits and jail time usually. I doubt there will be justice in this case.

comment 6y ago · link · parent

If you like using my software and it makes your life better in some way, I absolutely want to hear that - it will help keep me motivated the next time working on it feels like a chore.

comment 6y ago · link · parent

It took about ten minutes at full system utilization on all cores, running the "torture test" in a loop in each thread.

comment 6y ago · link · parent

The only bug that ever beat me in my two decades coding was in a custom lock free data structure using an early version of c++11. I spent a month on it, including writing custom visualization and logging tools, but I never found the issue that caused a crash once every few hundred billion operations.

Later I saw some suspicious compiler bug fixes around compare and swap, and I still wonder if that was maybe it.

comment 6y ago · link · parent

At the slow "clock speed" the brain runs at, it produces a lot of heat. A quick search turns up 10-20 watts as a rough estimate. It's still petty competitive given what it's capable of.

comment 6y ago · link · parent

I don't think he ever did it with the intention of being around to spend the money. He lives off his modest salary, drives an old vehicle, and still is in the same normal house as decades ago.

The money is more like points in a game to him I think, he just loves the game.

comment 6y ago · link · parent

No, if one cared one could spend the couple dollars to buy carbon credits to offset your flight. That would do a lot more than a shaving a fraction of a percent of fuel. I notice some airlines have a checkbox for this at checkout, it makes it quite easy to do. I wonder if it really offsets the carbon from the flight though, it seems so cheap. Like any one of the dozen taxes you pay for the flight is more than that. If it's the case one could mandate a tax to cover it and all flights in the country could be carbon neutral instantly and nobody would notice the difference.
1
108109110
184