HNHacker News
TopNewBestAskShowJobs

gregwebs

4,566 karma · joined May 15, 2007

Software engineer.

Interests in security, startups, health, sustainability, productivity, community.

Side projects:

* eatnutrients.com * docjumper.com

github: gregwebs

gregwebs.at.hn

submissionscomments
gregwebs··on Structured Errors in Go (2022)
There are several existing Go error libraries with a similar approach sans context.

The approach I ended up taking is to use slog attributes. It allows for reuse of existing logging attributes.

This is explained here (skip to the “adding metadata” portion). https://blog.gregweber.info/blog/go-errors-library/

Go package: https://pkg.go.dev/github.com/gregwebs/errors/slogerr

gregwebs··on Pure vs. Impure Iterators in Go
Not all impure iterators can be resumed. But any pure iterator can be converted to a resumable iterator with a generic conversion function.
gregwebs··on The great displacement is already well underway?
Have you tried working with recruiters? I don’t have recommendations for how to find them, but they find me on LinkedIn and it has lead to my last 2 job opportunities and most of my interviews.
gregwebs··on How to avoid P hacking
This is one of the most disturbing articles I have seen related to reproducibility because it seems to imply that scientists don’t already know this.
gregwebs··on AI code is legacy code?
One definition of legacy code I have seen is code without tests. I don't fully agree with that, but it is likely that your untested code is going to become legacy code quickly.

Everyone should be asking AI to write lots of tests- to me that's what AI is best at. Similarly you can ask it to make plans for changes and write documentation. Ensuring that high quality code is being created is where we really need to spend our effort, but its easier when AI can crank out tests quickly.

gregwebs··on The number of new apartments is at a 50-year high, but states expect a slowdown
Luxury apartments prevent gentrification.

Unoccupied housing or otherwise housing purely for investment is certainly a problem. If they aren’t renting at least with AirBnB they would actually be better served by holding gold in many cases.

gregwebs··on Widespread power outage in Spain and Portugal
There’s an explanation that earth’s magnetic field is now so weak that a normal solar wind ended up breaking through a vulnerable spot.

Very poorly explained right now by Space Weather News. I am waiting for an updated explanation.

gregwebs··on TmuxAI: AI-Powered, Non-Intrusive Terminal Assistant
I love warp but I always turned the AI off- the GUI improvements were enough for me. I have maintained a general rule for a long time now that when manual commands are run on production, someone else must be watching what’s going on and approving commands or approve them ahead of time.
gregwebs··on New Vulnerability in GitHub Copilot, Cursor: Hackers Can Weaponize Code Agents
Is there a proactive way to defend against invisible Unicode attacks?
gregwebs··on Lead is still bad for your brain
Unfortunately I don't know. We have gotten rid of a lot of old toys and made sure our kitchen and plates are lead free and did some of that before a retest and that may have helped some. We are going to retest now that he is older and not sticking random stuff in his mouth much. He still eats a lot of sweet potatoes and I suspect that could be a source. I also just got some of the new easy to use lead testing kits and am starting to test some things with that but everything seems to come up negative so far.
gregwebs··on Lead is still bad for your brain
Most of the lead in baby food comes from the industrial processing. So if you grow your own apples and make your own apple sauce and don't put industrial processed spices in it it's likely not going to have any detectable lead in it.

The problem with our standards for baby food isn't necessarily that they are too high. The problem is that there is little enforcement. You have know way of knowing you will be getting 10ppb or be the unlucky one getting the large dosages that eventually got reported to the CDC. For much of the rest of the food supply the standards do allow for too much lead.

gregwebs··on Lead is still bad for your brain
Another poster linked to this study that states [1]

    Existing rates of lead absorption are about 30 times higher than inferred natural rates
[1] https://sci-hub.se/https://pubmed.ncbi.nlm.nih.gov/14334042/
gregwebs··on Why lead is still bad for your brain
Another poster linked to this study that states [1]

    Existing rates of lead absorption are about 30 times higher than inferred natural rates
It's not the case that all soil is contaminated with lead that then ends up in high levels in food. Top soil is composed mostly of decomposed plants. Plants only take up a small fraction of the lead in the soil. So the contamination of the top of the soil must reach some threshold. Due to leaded gasoline, there is widespread lead contamination in top soil, and I have read many parts of the world still use leaded gasoline in agriculture. Without human activity my understanding is that most soil samples would test very low or non detect and most food would as well. In some types of food (I know this is true of spices and to a lesser extent chocolate), much of the lead in food can come from processing phases after it is already harvested.

We certainly know it is the case that food produced by one producer varies dramatically in lead levels from another due to testing. Some of that may be attributed back to the soil, but it still goes to show that we could be testing soil levels and avoiding growing in lead contaminated soil.

Thank you for those links. For the nut study, they are studying finished products bought in the supermarket, so it is possible that some of the contamination may come from the processing (removing shells, etc) which is pointed out in the study itself.

[1] https://sci-hub.se/https://pubmed.ncbi.nlm.nih.gov/14334042/

gregwebs··on Lead is still bad for your brain
Often times prop 65 is a lead issue. But perhaps most often it means that the company doesn't want to bother testing for lead rather than that the item definitely has lead.

With all things, be strategic- the importance of avoiding prop 65 is relative to the likelihood of it ending up in the body- so items in your kitchen, your garden, that young children would touch.

gregwebs··on Lead is still bad for your brain
I am glad you are finding the time to avoid contaminated industrial processed food.

In the apple sauce contaminations the apple sauce is always cinnamon flavored. When tested for various heavy metals, cinnamon usually has unsafe levels of heavy metal contamination, and lead is usually one of the metals: https://tamararubin.com/2024/12/six-cinnamon-products-chart/

There is widespread contamination in spices because the machinery that processes most spices is made of metal with lead. Some of the lead may be unintentional contamination, but lead is also used intentionally because it is cheap and useful. I believe it is useful for grinding, etc because when used in an alloy the metal doesn't wear down as easily.

So if you want to replicate those apple sauce products without heavy metal you would need to buy cinnamon sticks and grate them yourself.

gregwebs··on Lead is still bad for your brain
This is a great article on the biology of lead exposure.

Unfortunately on the exposure side research wasn’t done and it propagates the myth that lead exposure is only an issue for those with lead pipes or lead paint. It’s true that these are the main sources of severe lead exposure. However the article points out that there is no safe level of exposure to lead and these aren’t the main ways we are exposed to lead in the US anymore.

Today we are mostly exposed by low level contamination and thankfully this usually results in only mildly elevated lead levels. In a toddler sticking things in the mouth this could be almost any object. For adults it is food and drinks and the objects we use to make them.

I know this because my toddler had elevated lead levels even though our neighborhood never had lead paint and our water does not have lead (I tested the water coming out of our faucets).

The US has few laws against lead contamination and they aren’t very stringent and there is little proactive enforcement. This non profit has ended up creating several recalls after reporting their own testing: https://tamararubin.com/category/recall/ Most of the recalls were products marketed for children such as baby bottles. But if a child eats off an adult plate there aren’t any laws against that being contaminated.

Some actions you can take are:

  * test children’s lead levels and your own
  * make sure toddlers aren't playing with old toys (pre 1978 really risky, after 2010 is best)
  * stop buying things that have a prop 65 warning (I know prop 65 isn’t perfect, but it’s often a lead warning).
  * Remove risky objects like the above from your children’s classrooms.
  * For cooking and food and drinks use clear glass, stainless steel, and cast iron
  * avoid processed foods. There are a lot of particulars here about what is most likely to be high in lead. Chocolate, spices, salt, and cassava products are particularly high in heavy metals.
gregwebs··on Show HN: Physical Pomodoro Timer with ESP32 and e-paper screen
I use this timer which has the advantage of being portable: https://gymboss.com/
gregwebs··on I tried making artificial sunlight at home
What you want is at odds with energy efficiency and is therefore being made illegal https://blog.medcram.com/uncategorized/new-department-of-ene...
gregwebs··on I use Cursor daily - here's how I avoid the garbage parts
AI blows me away when asked to write greenfield code. It can get a complex task using hundreds of lines of code right on the first try or perhaps it needs a second try on the prompt and an additional tweak of the output code.

As things move from prototype to production ready the productivity starts to become a wash for me.

AI doesn’t do a good job organizing the code and keeping it DRY. Then it’s not easy for it to make those refactorings later. AI is good at writing code that isn’t inherently defective but if there is complexity in the code it will introduce bugs in its changes.

I use Continue for small additions and tab completions and Claude for large changes. The tab completions are a small productivity boost.

Nice to see these tips- I will start experimenting with prompts to produce better code.

gregwebs··on Zelensky leaves White House after angry meeting
It's not being reported on much, but they have moved towards normalizing diplomatic relations and Russia and the US are negotiating the outline of the deal now. Here is a recent video with John Mearsheimer (a foreign policy expert) giving commentary on recent developments. [1] John Mearsheimer was (and still is) completely baffled by the mineral deal which as you point out seems to be a distraction.

[1] https://www.youtube.com/watch?v=I1lJBv76J5g&t=15s

gregwebs··on Zelensky leaves White House after angry meeting
It’s worth watching the full clip to appreciate how this starts with Zelensky undermining the peace process by blaming Russia right after Trump just answered by saying blame isn’t productive and Zelensky did it by directly challenging JD Vance's statement previous to the clip. [1] I would suggest changing the link in the article to the full length video clip because I couldn’t fault someone for assuming that with the current state of US Europe relations that the BBC is biased towards selective editing.

Obviously Trump & JD did not handle that well and embarrassed anyone that believes in the value of international diplomacy.

For some more backstory on Zelensky's disposition you can listen to Lex Friedman's take. He went to Ukraine to interview him with the only goal of making peace more likely and couldn't get Zelensky to move an inch in that direction during their discussion. He believes that Zelensky is an amazing leader in many respects, but poorly equipped (mentally) to make peace. [2]

[1] https://youtu.be/uqOOOR7Kr-s?si=5lbj-fGWTZzYMVwB [2] https://www.youtube.com/watch?v=4T2EL8hkwGE

gregwebs··on Jeff Bezos' revamp of 'Washington Post' opinions leads editor to quit
Breaking points is an independent media show on (YouTube and Spotify) that has both a liberal and conservative discuss current events.
gregwebs··on A new proposal for how mind emerges from matter
I don't see the word "consciousness" in the article. I thought that was the thing to figure out to understand the emergence of the mind.
gregwebs··on Decades of Research Misconduct Stalled an Alzheimer's Cure
It is now well known that serotonin uptake cannot explain the effect of SSRIs and that we don't actually know how they work- but that doesn't mean they don't work. Most drugs have many effects (we call some of them side effects) and this isn't the first drug where we thought we knew how it worked and ended up being wrong.

Some have found flaws with Kirsh's study and there is still an ongoing debate about effectiveness. [1] I am not a fan of prescribing so many people a drug that we don't know how it even works for what is often just a small improvement, but I don't think its accurate to say they are useless.

[1] https://academic.oup.com/ijnp/article/14/3/405/906146#156821...

gregwebs··on The $1.5B Bybit Hack
The state of online security hasn't changed much.

What has changed is that there is an digital (as opposed to gold) international form of money whose transactions cannot be reversed or stopped. Bybit and those holders of large crypto are operating with a fundamentally different threat model where its worthwhile for an attacker to invest millions of dollars of effort (for the Bybit payout even tens or hundreds of millions) attacking them. Everyone else just needs to worry about getting ransomed for a much smaller amount.

gregwebs··on CDC terminates flu vaccine promotion campaign
8,000 Troops got kicked out of the military for not getting the vaccine and are going to be invited back now. https://www.army.mil/article/283143/dod_prepares_invitation_...
gregwebs··on CDC terminates flu vaccine promotion campaign
Thanks you for linking to that data. Glad they got it right this year.

It would be great if we could also see the results of a placebo controlled trial every year as well to remove all doubt about whether or not it worked during the season.

gregwebs··on CDC terminates flu vaccine promotion campaign
Is there any data on whether the flu vaccine is working this year? The fundamental problem with the flu vaccine is that they make it ahead of time guessing at what the flu will look like in the next flu season. If the flu mutates or otherwise the vaccine isn’t a good match it doesn’t work well. If we are having a particularly strong flu season it is likely because the flu vaccine isn’t helping much and the advertisements might be setting false expectations.
gregwebs··on Show HN: A Fast HTTP Request CLI Powered by HTTL
Hurl is well designed for testing with marchers available for assertions. HTTL only supports strict equality assertions (for now).

Hurl is written in Rust, HTTL in node.

HTTL has an import system that can be useful for reusing an auth setup.

gregwebs··on Alice Hamilton waged a one-woman campaign to get the lead out of everything
It’s unlikely to be a truly safe situation since paint wears down and chips off. It’s most dangerous though whenever there is repainting which involves sanding existing paint.
← PreviousPage 3 of 34Next →