HNHacker News
TopNewBestAskShowJobs

gp

242 karma · joined September 14, 2021

Solving people's problems
submissionscomments
gp··on Making a Go program faster with a one-character change
I was trying to debug and improve the performance of some parallelized C++ code over the weekend for parsing CSV files. What would happen was parsing each file (~24k lines, 8 columns) would take 100ms with one execution context, but when split across many threads, the execution time of each thread would slow down proportionally and the throughput of the whole program would strictly decrease as thread count increased.

I tried all of the obvious things, but the offender ended up being a call to allocate and fill a `struct tm` object from a string representation of a date. This doesn't have any obvious reasons (to me) that it would cause cache invalidation, etc, so I'm a little in the dark.

Still, replacing this four line block improved single threaded performance by 5x, and fixed the threaded behavior, so on the whole it is now ~70x faster and parses about 400mb of csv per second.

gp··on Nearly all binary searches and mergesorts are broken (2006)
> language whose integers are arbitrary precision

I’m not sure what this could mean. Could you please share some examples?

gp··on The initial proposal for a C++ Ecosystem International Standard
Not all organizations are in a position to make the switch or even want to. I personally like Rust and find it interesting, but that doesn't mean I would throw away my C++ codebase.

I'm sure other people will be able to share reasons their organizations use C++

gp··on U.S. public health agencies aren't ‘following the science,’ officials say
> epidemiologists aren't doctors or biologists but "social scientists" with a particular critical bent

Many, if not most of the epidemiologists at the CDC hold M.Ds, and I can speak from personal experience that many have disdain for both political parties

For example there is a lot of frustration at how the media is making a giant scare about Monkeypox, when it is isolated to certain communities and can be prevented with the smallpox vaccine which we already have stockpiled.

> they operate as surveillance organizations with the same kind of secrecy culture as intelligence work

This is blatantly false - the CDC publishes almost everything it does. Mostly boring statistics, reporting, investigating claims

>public health agencies have become a para-intelligence services with explicitly political aims

Really?

>I think they have discredited themselves over travel bans, vax passports, the objectively insane and poisonous rhetoric about the "hesitant,"

You should visit the CDC's public museum in Atlanta - I think you will see all the good that vaccines and antibiotics have done for the world. Little else in medicine matters, comparatively, in terms of increased lifespans around the globe

gp··on Core dumps, feedback loops, and a game of telephone
We are currently building a core dump based scheme to monitor crashes on our deployed devices. Devices use a different architecture than our development environments, and the deployed devices are often accessible only with limited bandwidth, so a live shell session can be more painful than waiting for the core dump to come back.
gp··on Wind Turbine Blades Can’t Be Recycled, So They’re Piling Up in Landfills (2020)
Traditional composites are difficult to recycle because of several reasons: - the thermoset polymer matrix cannot be melted or separated from the fiber in any reasonable way - the thermoset resin cannot be reformed or reshaped into a useful shape or material - graphite fiber composites in particular are very, very hard on cutting tools and are difficult to chop up (not sure about glass fiber composites, but on bulk they have similar strength characteristics to some aluminums)

These properties are difficult to separate from composites because we want composite parts to survive the elements, often high temperatures, and be robust and reliable with little fatigue

gp··on Friday.app is shutting down
First off sorry to hear that the Friday journey is ending here.

This is a really interesting response to me - some peoples gut instinct is “keep going until you figure what that something is.”

Im curious if you could elaborate here about what story you found on the ground and what made you believe that you were quite far from building the right product?

gp··on macOS Monterey shows that Zoom continues to use mic regardless of being in call
It’s an orange dot in the top right of the screen.
gp··on New lightweight material is stronger than steel
It would still sink as water has a density of 1, depending. I think your lookup for wood's density gave you a number belonging to a hardwood.
gp··on A fork() in the road – fork was a mistake [pdf]
I think you mean execution process, not thread.

That said, processes should not share virtual address spaces by default. Sharing memory between processes should be an explicit choice.

(Or should 99.9% of calls to spawn() be followed by new_address_space()? )

The researchers can write their own single address space os if they are so inclined.

gp··on Boards are dangerous to founder/CEOs
Don't want to dox, but you should be able to find it on crunchbase. I'm not surprised about the story given who's in that round.
gp··on Ask HN: What's so special about Snowflake?
Important to keep in mind sales expense often buys multi-year cashflows.

In this case, directly comparing the expense of building a customer base to the revenue from the existing customer base over the same period can lead you to wrong conclusions about the viability of the business.

I would focus instead on the cost of customer acquisition, versus the PV of the average customer's gross cash flows.

------------------------------------------------- ----------------- Lazy Analysis ----------------- -------------------------------------------------

Here is SNOW's latest Q: https://www.sec.gov/ix?doc=/Archives/edgar/data/1640147/0001...

If you look on page 32 we see that the weighted average life of large customer contracts is 1.8 years, and that net revenue retention rate is 169%!

So customers sign up for multiple years, and renew with big purchases.

Turning to the K for some annual figures: https://www.sec.gov/ix?doc=/Archives/edgar/data/1640147/0001...

----------------- Assumptions -----------------

Let's model SNOW's revenue as: The sum of prior year's revenue (existing contracts) plus new revenue cause by the prior year's sales efforts.

On page 42 of the K: We see that each year's gross income is consistently larger than the prior year's sales and marketing expense.

----------------- Example -----------------

In 2020, if we say that all 164mm of new revenue is due to the 125mm of sales expense in 2019, and contracts average 2 years, then we have ~320mm of revenue on 125mm of expense.

By this math in 2021 and forward, it looks like we can expect ~840mm of new revenue from the 293mm of sales expense in 2020, and in 2022 we might expect 1,100mm of total revenue.

----------------- Projections -----------------

In reality, SNOW has projected $1,020 in revenue for 2022. - https://www.cnbc.com/2021/05/26/snowflake-snow-earnings-q1-2...

Note my number is a little high as I did not know what portion of 2019's contracts expired in 2019, so assumed none.

gp··on WHO asks South African startup to replicate Moderna's mRNA vaccine
Many technologies only exist because of the profit motive. When should we destroy IP rights for the public benefit?

- IP for the best vaccines, vs worse ones otherwise available, so we are all healthier

- Higher yielding crop seeds, vs worse lineages, so that we can all eat better

- Efficient water purification techniques, so that we all have clean water cheaper

- Metallurgy for high performance alloys used in turbines and aircraft structures, so that we can all build safer airplanes for less

- Software to detect early cancer or heart disease from blood markers, so that we can prevent disease

Keep in mind, when you destroy the profit motive, you destroy much (Not all!) of the motivation people have to build better things

gp··on Liquid Gallium Shown to Break Down Carbon Dioxide – Sci-News.com
Ahh I missed this. Thank you!
gp··on Liquid Gallium Shown to Break Down Carbon Dioxide – Sci-News.com
In the paper the team reports roughly 50-80% estimated mechanical efficiency, 92% conversion of CO2 by mass in a 27cm / 330ml column, and ~230kw*hr/ton of CO2 energy input.

They used 6%-20% CO2 mixtures with balance nitrogen and some water to try and approximate different exhausts including flue gas.

This seems like a groundbreaking achievement. The only thing that wasn’t clear to me was the size of reactor they expect to be required to achieve meaningful throughput, and the amount of HCl replenishment required, if any, to maintain catalytic performance.

This paper gives me a lot of hope.

gp··on Home Price to Income Ratio
While it doesn't directly affect the average person's purchasing power, the same dramatic increase is happening in other asset values as well. [0] One interesting thing to note is that 2019 EV / EBITDA values were already "high," before the coronavirus was spreading.

I suspect these two phenomena have different causes overall, but low interest rates are a common factor that cause all asset prices to increase.

On the housing side, I suspect consumers purchase the house that their cashflow can comfortably support, not necessarily the one where they believe it is correctly valued, because the assumption that house values only increase means purchasing a well constructed house is almost never a "bad deal."

I'm not sure what the "solution," is, but knowing that voters hate when their home values fall does not give me confidence that prices will decrease in the long term.

[0] https://www.statista.com/statistics/953641/sandp-500-ev-to-e...

← PreviousPage 2 of 2