Like what you see? Subscribe here and get it every week in your inbox!
Issue #230 - August 6, 2023
If you are looking for work, check out this month's Who is hiring?, Who wants to be hired? and Freelancer? Seeking Freelancer? threads.
Here are the top threads of the week, happy reading!
1. Ask HN: Is anyone using PyPy for real work?
Top comment by ggm
I'm using pypy to analyse 350m DNS events a day, through python cached dicts to avoid dns lookup stalls. I am getting 95% dict cache hit rate, and use threads with queue locks.
Moving to pypy definitely speeded me up a bit. Not as much as I'd hoped, it's probably all about string index into dict and dict management. I may recode into a radix tree. Hard to work out in advance how different it would be: People optimised core datastructs pretty well.
Uplift from normal python was trivial. Most dev time spent fixing pip3 for pypy in debian not knowing what apts to load, with a lot of "stop using pip" messaging.
2. Ask HN: In which areas have you compared 3+ tools and formed strong preferences?
Top comment by TylerE
I've said it before, and I'll say it again. @dang Can we please ditch this very hard to read light grey OP text.
#828282 on #f6f6ef is only a 3.54:1 contrast ratio, well below the WCAG's 4.5:1 minimum for body text. Even on a pure white background it's only 3.84:1.
3. Ask HN: Do you still use a hand held/desktop calculator?
Top comment by cal85
I like to have a calculator on my desk as a kind of ‘burst capacity’ for when I’m busy keeping an important mental process running. It’s like having a dedicated chip (with its own private chunk of RAM) optimised for simple arithmetic operations, when such a need arises mid-flow, always available to use without pausing to reallocate any memory elsewhere when everything is running at capacity trying to make some complex decision. And by ‘memory’ here, I mean the combined scratchpad made up of my brain’s thought loop and the windows arranged on my desktop. If I’m at capacity, just changing the focus of windows on the desktop (eg. to bring up a software calculator overlay) can break my train of thought, meaning the spinning plates start to wobble and fall down, and then I have to start over on the wider task, all because I got stuck on something silly like 14*2.5. With a pocket calculator on my desk, I can safely turn my head to it for a moment, do the sum with almost zero effort, and turn back to the monitor, and the plates are all still spinning.
4. Ask HN: How do you monitor your systemd services?
Top comment by gjulianm
Short answer: Prometheus + Grafana + Alertmanager. prometheus_node_exporter has an option to export SystemD service status and you can alert on failed services, and you can use Alertmanager to configure multiple types of alarms, including repeats so you don't forget.
Long answer: Whenever I've started to add alerting and monitoring to a system, I end up wanting to add more things each time, so I find it valuable to start from the beginning with an extensible system. For me, Prometheus has been the best option: easy to configure, lightweight, doesn't even need to run in the host, and can monitor multiple systems. You just have to configure which exporters you want it to pull data from. In this case, prometheus_node_exporter has a massive amount of stats about a system (including SystemD), and there are default alarms and dashboards out there that will help you create basic monitoring in a minute.
You can choose to use Grafana for visualization, and then either the integrated Grafana alerting or use the Prometheus alerting + Prometheus Alertmanager. I think in the latest versions Grafana Alerting includes basically an embedded AlertManager so it should have the same features.
Regarding the type of alert itself, I send myself mails for the persistence/reminders + Telegram messages for the instant notifications. I find it the best option tbh.
5. Ask HN: Any freelancers here? I need burnout advice
Top comment by qazxcvbnmlp
Burnout comes from reward != work/effort put in over a long period of time.
Building your own thing can be very conducive to burnout b/c most of the time you’re not really getting a lot of positive ideas.
Everyone likes to say that vacation is the solution to burnout, and it can be, but it’s not the end all be all. Your brain needs to feel contentment at the end of a typical day. Contentment indicates you’re filling all your emotional needs. Just like relaxing is a need, being told your work matters is an emotional need too.
You want something “real” - eg tangible evidence that what you are doing matters.
If you have financial means - I’d recommend taking a part time job where your output is immediately visible (bartending, carpentry, landscaping, (I personally load bags on airplanes)). Remember the goal is not to make money, it’s to have people tell you what you are doing matters. Eg, have someone notice the extra 5 mins you put in to make the lawn lines straight. See the smile on a regular when you remember their order. Etc.
6. Ask HN: Anyone using proportional fonts for coding?
Top comment by Renevith
I've used Input Sans for years. I was expecting to have to deal with alignment issues but in my Java codebase there were almost none. (YMMV depending on language and coding style.) The only alignment we use is with leading spaces only, so everything still aligns as expected. The readability is great and I can fit substantially more characters horizontally than I could with a fixed-width font.
It definitely felt weird at first, like I was reading code that somebody had pasted into Microsoft Word. But that passed and now it's all upside.
I screen-share my IDE from time to time and I've never had anyone comment on it.
7. Ask HN: Room temperature superconductor: what to expect?
Top comment by worldvoyageur
Two key properties of superconducting materials are that electrical resistance vanishes and the magnetic fields that are expelled pass around the material.
If there was a viable low cost superconductor that worked at temperatures up to 50 degrees Celcuis and atmospheric pressure, the implications would include:
- way less heat generated in electronics, so faster and more efficient CPUs, GPUs and memory.
- power transmission without loss. Very long range power transmission becomes viable and low cost (buried cables near roads?). For instance, solar energy transmitted in real time from where the sun shines to where it is dark or cloudy.
- a major obstacle to fusion power is removed as superconductors make it much easier, lighter and smaller to use magnetic fields to confine plasma
- medical imaging and scanning gets much cheaper as, for instance, MRI machines get smaller, lighter and simpler.
- mag lev trains could become the lowest cost way to travel by rail. Maybe even cars and trucks become maglev and roads are replaced by magnetic rail.
8. Ask HN: Who is using small OS LLMs in production?
Top comment by boredumb
I'm integrating llama 2 7b with an application I'm building out currently and one of the biggest reasons was privacy, followed closely by price and lastly by getting it to work locally in a few minutes.
I built a now abandoned project using the GPT API and it was fine and not terribly expensive for my use case but customers didn't like the pay for usage model and the alternative was do weird UX to limit people abusing the prompts into something I couldn't afford bootstrapping as a side project.
9. Ask HN: Share one man boring internet businesses
Top comment by correa_brian
Check out this guy https://twitter.com/staticmaker1
He recently started https://boringcashcow.com/
10. Ask HN: Anyone else getting continuous adverts from YouTube?
Top comment by Waterluvian
Google seems like it’s quietly in serious trouble based on how they’ve really really cranked up the ads.
On mobile YouTube every third item is an ad. On google search I now get 5-6 YouTube links before a bunch of AI clickbait fuelled by adsense, and then maybe Wikipedia and other legit site are listed… maybe… on the first page.
I’m currently migrating my habits to avoiding search engines in general, but using DDG (which I might stick with) when I need to.