News for hackers. Stuff that matters.

connorbrinton

Pydantic AI has a great set of abstractions over LLM providers. The documentation tends to focus on its agent loop more, but I find the LLM abstractions quite nice even on their own
Laguna S 2.1 is another fairly impressive-for-the-size American open model
My uneducated guess is that crew members in the back galley could have been injured by unsecured items they were loading falling or sliding. The service cart itself is 200-250 lbs. With the rear galley accelerating upward, then a sudden halt to the acceleration when the front nose impacts the ground, I could imagine the cart lifting off the ground and landing on feet or legs. Or putting the cart aside, other items such as drink cans, galley appliances, etc. falling from cabinets or counters could cause injury
Re:GitHub Having Issues (Again) on Thursday April 23, 2026 @10:56AM (#47876499)
I'm seeing GitHub Actions runs not occurring. A colleague is experiencing 500s (angry unicorn) and issues with Codespaces.

I always check DownDetector and Updog whenever something seems strange about GitHub behavior, they tend to pick up issues before the official status page.

Re:Shall I implement it? No on Thursday March 12, 2026 @10:38PM (#47360069)
I've found Claude Code's built-in sandbox to strike a good balance between safety and autonomy on macOS. I think it's available on Windows via WSL2 (if you're looking for a middle ground between approving everything manually and --dangerously-skip-permissions)
Re:The path to ubiquitous AI (17k tokens/sec) on Friday February 20, 2026 @07:48AM (#47087361)
Speculative decoding takes advantage of the fact that it's faster to validate that a big model would have produced a particular sequence of tokens than to generate that sequence of tokens from scratch, because validation can take more advantage of parallel processing. So the process is generate with small model -> validate with big model -> then generate with big model only if validation fails

More info:

* https://research.google/blog/looking-back-at-speculative-dec...

* https://pytorch.org/blog/hitchhikers-guide-speculative-decod...

100% agree on the better video hardware. I found out this weekend the Raspberry Pi 5 removes the dedicated video encoder present on the Pi 4B. I was getting 2-3 fps in OBS, which makes it unusable for my application. Any mini PC would do much better with dedicated encode capabilities.

To be fair, I haven't messed around with video encoding settings yet. I've seen claims the Pi 5 can do 1080p60 with 50% of the CPU. I could trade off quality for faster encoding, but with a mini PC I could get high quality encoding at real-time speeds.

I'm feeling some buyer's remorse with the Pi 5 right now...

Re:SimpleFold: Folding proteins is simpler than you think on Saturday September 27, 2025 @09:04AM (#45395382)
Technically yes. But it can take months to years to experimentally obtain the structure for a single protein, and that assumes that it's possible to crystallize (X-ray), prepare grids (cryo-EM) or highly concentrate (NMR) the protein at all.

On the other hand, validating a predicted protein structure to a good level of accuracy is much easier (solvent accessibility, mutagenesis, etc.). So having a complex model that can be trained on a small dataset drastically expands the set of accurate protein structure samples available to future models, both through direct predictions and validated protein structures.

So technically yes, this dataset could have been collected solely experimentally, but in practice, AlphaFold is now part of the experimental process. Without it, the world would have less protein structure data, in terms of both directly predicted and experimentally verified protein structures

Re:Ask HN: Why hasn't x86 caught up with Apple M series? on Tuesday August 26, 2025 @09:22AM (#45026193)
On my Framework (16), I've found that switching to GNOME's "Power Saver" mode strikes the right balance between thermals, battery usage and performance. I would recommend trying it. If you're not using GNOME, manually modifying `amd_pstate` and `amd_pstate_epp` (either via kernel boot parameters or runtime sysfs parameters) might help out.

I agree that it's unfortunate that the power usage isn't better tuned out of the box. An especially annoying aspect of GNOME's "Power Saver" mode is that it disables automatic software updates, so you can't have both automatic updates and efficient power usage at the same time (AFAIK)

Re:I'm Switching to Python and Actually Liking It on Thursday July 17, 2025 @09:00AM (#44592883)
Typer has a great feature that lets you optionally accept argument and flag values from environment variables by providing the environment variable name:

https://typer.tiangolo.com/tutorial/arguments/envvar/

It's especially nice for secrets. Best of both worlds :)

Re:Logging in Python like a pro on Friday July 01, 2022 @12:35PM (#31948973)
Another great project for Python logging is loguru: https://loguru.readthedocs.io/en/stable/overview.html

One of my favorite features of loguru is the ability to contextualize logging messages using a context manager.

  with logger.contextualize(user_name=user_name):
    handle_request(...)
Within the context manager, all loguru logging messages include the contextual information. This is especially nice when used in combination with loguru's native JSON formatting support and a JSON-compatible log archiving system.

One downside of loguru is that it doesn't include messages from Python's standard logging system, but it can be integrated as a logging handler for the standard logging system. At the company where I work we've created a helper similar to Datadog's ddtrace-run executable to automatically set up these integrations and log message formatting with loguru

My usual workflow to rebase a stacked set of feature branches off of main is:

    git checkout main
    git pull
    git checkout feature-branch-1
    git rebase -i -
    git checkout feature-branch-2
    git rebase -i -
    ...
There's most likely a more efficient way to do this, but I find that referring to the most recently checked-out branch with a single hyphen is a lesser-known feature, so perhaps it will be helpful :)
Re:Consistent Hashing for Dummies on Thursday October 28, 2021 @01:58PM (#29029033)
I've always had a hard time understanding consistent hashing, and find rendezvous hashing [1] to be much more understandable. It provides better load-balancing properties and uses less memory than consistent hashing, but requires more computation.

It seems like consistent hashing is much more popular though, which definitely makes it worthwhile to learn.

[1] https://en.wikipedia.org/wiki/Rendezvous_hashing

Re:Ask HN: Who is hiring? (October 2021) on Friday October 01, 2021 @10:41PM (#28725463)
Solvvy | Senior Python Backend Engineer | Full-Time, Fully Remote (US) | https://solvvy.com/

Solvvy is a next-gen chatbot and customer support automation platform built with AI, ML, and Natural Language Processing technology.

Solvvy is looking for a Pythoneer passionate about applying cutting-edge developments in the Python programming language and ecosystem to build amazing support experiences. You'll be responsible for coaching other team members to use advanced Python features effectively, designing system architectures for new features and products and building backend APIs for machine learning and data analytics services.

You'll be tasked with challenging technical problems and be responsible for developing innovative solutions. You'll work closely with a team of high-contributing engineers and product managers to solve user needs and work together to ensure that end-users enjoy a truly delightful support experience.

If this role sounds like a good fit for you, please apply through the job posting here: https://solvvy.com/open-positions/?gh_jid=5482901002

Re:Programmatic Video Editing with Python on Wednesday July 21, 2021 @05:17PM (#27912325)
The best you can do (without doing crazy introspection) is to set `__all__` in `mymod`. It still requires listing everything you want to be exported from `mymod`, but at least you only need to do it once.

Docs: https://docs.python.org/3/tutorial/modules.html#importing-fr...

Re:Pyre: A performant type-checker for Python 3 on Monday May 10, 2021 @02:40PM (#27109338)
I also struggle with Mypy's strict mode, but I think recursive types are different from classes that can construct each other. Mypy doesn't have any problem with the following code

    from __future__ import annotations


    class X:
        def __init__(self, value: int) -> None:
            self.value = value

        def to_y(self) -> Y:
            return Y(self.value)


    class Y:
        def __init__(self, value: int) -> None:
            self.value = value

        def to_x(self) -> X:
            return X(self.value)


    x = X(10).to_y().to_x()
    print(x.value)