frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

History of mass surveillance in the United Kingdom

https://en.wikipedia.org/wiki/History_of_mass_surveillance_in_the_United_Kingdom
1•xyzzy3000•2m ago•0 comments

Chartifact – Declarative, interactive data documents

https://microsoft.github.io/chartifact/
1•nikolay•3m ago•0 comments

Arenas in Rust

https://russellw.github.io/arenas
2•welovebunnies•3m ago•0 comments

CommetJacking attack tricks Comet browser into stealing emails

https://www.bleepingcomputer.com/news/security/commetjacking-attack-tricks-comet-browser-into-ste...
1•bubblehack3r•3m ago•0 comments

Netflix will pay you up to $700K per year–and let you work remote

https://fortune.com/2025/10/02/netflix-gen-ai-product-manager-240k-700k-salary-fully-remote/
1•fcpguru•3m ago•1 comments

Show HN: SAI – A Reinforcement Learning Competition Platform

https://competesai.com/
1•jeaniebeir•4m ago•0 comments

Newsom threatens state funding for CA universities that agree to Trump demands

https://www.sfchronicle.com/politics/article/newsom-trump-education-funding-21081560.php
2•mikhael•4m ago•0 comments

Google confirms Android dev verification will have tiers, no public list of devs

https://arstechnica.com/gadgets/2025/10/google-confirms-android-dev-verification-will-have-free-a...
3•stalfosknight•6m ago•0 comments

Looking for Co-Founders / Partners (For a Web3 Project)

1•tradedb•6m ago•0 comments

Amazon, Stripe and Shopify use lending inside their platforms

https://richie.ai/blogs/real-use-cases-of-embedded-lending-marketplaces-payment-processors-logistics
1•salleisha•6m ago•0 comments

WireGuard topologies for self-hosting at home

https://garrido.io/notes/wireguard-topologies-for-self-hosting-at-home/
1•todsacerdoti•7m ago•0 comments

Show HN: A VS Code Extension for Genesis DB – The event sourcing database

https://www.genesisdb.io/blog/posts/2025-03-10/genesisdb-vscode-extension
2•patriceckhart•8m ago•0 comments

OpenAI now worth $500B, most valuable startup in history

https://finance.yahoo.com/news/openai-now-worth-500-billion-195534705.html
1•donsupreme•8m ago•0 comments

It's 30 for a reason road safety advert [video]

https://www.youtube.com/watch?v=HeUX6LABCEA
1•kamaraju•8m ago•0 comments

Startups binge on AI while big firms sip cautiously, study shows

https://www.theregister.com/2025/10/03/startups_binge_on_ai/
3•rntn•15m ago•0 comments

Microsoft-backed startup could dissipate 10kW GPUs, its founder confirms

https://www.techradar.com/pro/4kw-is-certainly-possible-but-it-can-go-much-higher-microsoft-backe...
1•mikece•18m ago•0 comments

Show HN: FLE v0.3 – Claude Code Plays Factorio

https://jackhopkins.github.io/factorio-learning-environment/versions/0.3.0.html
9•noddybear•18m ago•0 comments

Can you think like a YC partner? This game will help you find out

https://techcrunch.com/2025/10/03/can-you-think-like-a-yc-partner-this-game-will-help-you-find-out/
1•warrenm•20m ago•0 comments

Creator of Ghostty Talks Zig over Go

https://www.youtube.com/watch?v=YQnz7L6x068
2•fuzztester•20m ago•0 comments

Stop Wasting Brainpower

https://yusufaytas.com/stop-wasting-brainpower/
8•yusufaytas•21m ago•0 comments

Ghost in the Cloud: Weaponizing AWS X-Ray for Command and Control

https://medium.com/@dhiraj_mishra/ghost-in-the-cloud-weaponizing-aws-x-ray-for-command-control-75...
1•rootup•25m ago•0 comments

Microsoft's Rusty Revolution – RustConf 2025 [video]

https://www.youtube.com/watch?v=uDtMuS7BExE
1•jsheard•29m ago•0 comments

Detection of phosphine in a brown dwarf atmosphere raises more questions

https://phys.org/news/2025-10-phosphine-brown-dwarf-atmosphere.html
2•divbzero•29m ago•0 comments

Open Source Scientific Validation Framework – A Start

https://claude.ai/share/42ceb662-5120-4db8-a440-761c079ad78a
1•FakeBlueSamurai•33m ago•0 comments

The Underground Clocks of Paris [video]

https://www.youtube.com/watch?v=gol_p2aWrJg
1•m-hodges•33m ago•0 comments

Ask HN: What happens to founders after their startup fails or fizzles?

4•pkdpic•34m ago•2 comments

The Pixboom Spark Is a 4.6K Cinema Camera with 1k FPS Global Shutter

https://petapixel.com/2025/09/15/the-pixboom-spark-is-a-4-6k-cinema-camera-with-1000-fps-global-s...
1•PaulHoule•35m ago•0 comments

Ask HN: One-person SaaS apps that are profitable?

1•commodorepet•35m ago•0 comments

List of 2x-resolution Xkcd Cartoons

https://mtlynch.io/notes/xkcd-2x-resolution-list/
1•welovebunnies•37m ago•0 comments

Procedural Generation with Wave Function Collapse

https://www.gridbugs.org/wave-function-collapse/
2•todsacerdoti•37m ago•0 comments
Open in hackernews

PEP 810 – Explicit lazy imports

https://pep-previews--4622.org.readthedocs.build/pep-0810/
74•azhenley•1h ago

Comments

TheMrZZ•46m ago
Feels like a good feature, with a simple explanation, real world use cases, and a scoped solution (global only, pretty simple keyword). I like it!
12_throw_away•35m ago
Yeah, I think this is one of the cleanest PEPs to come around in quite a while, at least from the userspace perspective. Interested to see what happens after the traditional syntax bikeshedding ritual has been completed.
oofbey•13m ago
Hopefully they learned lessons from why PEP-690 was rejected. I've spent quite a while trying to build this stuff for our codebase and it's never worked well enough to use.
sedatk•44m ago
I wonder how much things would break if all imports were lazy by default.
simlevesque•41m ago
Maybe nothing would break ?

edit: ok well "xxx in sys.modules" would indeed be a problem

IshKebab•37m ago
Yeah unfortunately in real world Python code people put side effects in their modules all the time.
kstrauser•26m ago
In Python? I almost never see that. And I’ve certainly never signed off on a PR that did that.
oofbey•16m ago
Maybe your code is awesome, but you're almost certainly using a library which does it.
eesmith•20m ago
All my code which uses import probing would fail, such as fallbacks:

  try:
    import module
  except ImportError:
    import slow_module as module
Conditional support testing would also break, like having tests which only run if module2 is available:

  try:
    import module2
  except ImportError:
    def if_has_module2(f):
      return unittest.skip("module2 not available")(f)
  else:
    def if_has_module2(f):
      return f

  @if_has_module2
  class TestModule2Bindings(....
The proto-PEP also gives an example of using

  with suppress_warnings():
    import module3
where some global configuration changes only during import.

In general, "import this" and "import antigravity" - anything with import side-effects - would stop working.

Oh, and as the proto-PEP points out, changes to sys.path and others can cause problems because of the delay between time of lazy import and time of resolution.

Then there's code where you do a long computation then make use of a package which might not be present.

  import database  # remember to install!!
  import qcd_simulation

  universe = qcd_simulation.run(seconds = 30*24*60*60)
  database.save(universe)

All of these would be replaced with "import module; module.__name__" or something to force the import, or by an explicit use to __import__.
Galanwe•41m ago
That seems really great, .moving imports in-line for CLI tools startup and test discovery has always been a pain.
hoten•38m ago
For posterity, as the submitted link seems temporary: https://github.com/python/peps/pull/4622
IshKebab•37m ago
Wake me up when we can import a module by relative file path.
Spivak•16m ago
You… can? I mean in the strictest sense you're technically not importing by file path but if you make your folder a module by slapping an __init__.py in there then your relative imports will follow the directory tree. I think as of Python 3.3 the init file is optional so it will do it by default but I can't remember if there are still some cases where it's required. The only thing you can't do is go "up" to a higher directory than the root module.

Also if that doesn't strike your fancy all of the importlib machinery is at your disposal and it's really not very much work to write an import_path() function. It's one of the patterns plug-in systems use and so is stable and expected to be used by end users. No arcane magic required.

wrmsr•27m ago
If anyone's interested I've implemented a fairly user friendly lazy import mechanism in the form of context managers (auto_proxy_import/init) at https://pypi.org/project/lazyimp/ that I use fairly heavily. Syntactically it's just wrapping otherwise unmodified import statements in a with block, so tools 'just work' and it can be easily disabled or told to import eagerly for debugging. It's powered primarily by swapping out the frame's f_builtins in a cext (as it needs more power than importlib hooks provide), but has a lame attempt at a threadsafe pure python version, and a super dumb global hook version.

I was skeptical and cautious with it at first but I've since moved large chunks of my codebase to it - it's caused surprisingly few problems (honestly none besides forgetting to handle some import-time registration in some modules) and the speed boost is addictive.

film42•27m ago
I'm a fan because it's something you can explicitly turn on and off. For my Docker based app, I really want to verify the completeness of imports. Preferably, at build and test time. In fact, most of the time I will likely disable lazy loading outright. But, I would really appreciate a faster loading CLI tool.

However, there is a pattern in python to raise an error if, say, pandas doesn't have an excel library installed, which is fine. In the future, will maintainers opt to include a bunch of unused libraries since they won't negatively impact startup time? (Think pandas including 3-4 excel parsers by default, since it will only be loaded when called). It's a much better UX, but, now if you opt out of lazy loading, your code will take longer to load than without it.

the__alchemist•25m ago
Does this fix the circular imports problem that comes up if you don't structural your programs in a hierarchical way?
colpabar•21m ago
This is what I thought of too. I really only know python, do other languages not have that issue? In python it does not seem like a "problem" to me - whenever I have seen circular import issues it is because the code is organized poorly. I worry that this feature will lead to devs "fixing" circular import issues by using lazy imports.
matsemann•10m ago
Sometimes it's hard to avoid cyclic imports, without blaming the design. Like if a Parent has a Child, and the Child needs to know of the parent. Only way to solve that in python is to put everything in the same file, which also feels like bad deisgn.
Spivak•21m ago
It should, when you do lazy imports on your own it fixes the problem.
keeganpoppen•21m ago
YES!!!
behnamoh•16m ago
Make Python more like Haskell, LFG!
charliermarsh•16m ago
Lazy imports have been proposed before, and were rejected most recently back in 2022: https://discuss.python.org/t/pep-690-lazy-imports-again/1966.... If I recall correctly, lazy imports are a feature supported in Cinder, Meta's version of CPython, and the PEP was driven by folks that worked on Cinder. Last time, a lot of the discussion centered around questions like: Should this be opt-in or opt-out? At what level? Should it be a build-flag for CPython itself? Etc. The linked post suggests that the Steering Council ultimately rejected it because of the complexity it would introduce to have two divergent "modes" of importing.

I hope this proposal succeeds. I would love to use this feature.

forrestthewoods•14m ago
I don’t want lazy imports. That’s just makes performance shitty later and harder to debug. It’s a hacky workaround.

What I want is for imports to not suck and be slow. I’ve had projects where it was faster to compile and run C++ than launch and start a Python CLI. It’s so bad.

Alir3z4•10m ago
I wish all imports were lazy by default.

I know/heard there are "some" (which I haven't seen by the way) libraries that depend on import side effects, but the advantage is much bigger.

First of all, the circular import problem will go away, especially on type hints. Although there was a PEP or recent addition to make the annotation not not cause such issue.

Second and most important of all, is the launch time of Python applications. A CLI that uses many different parts of the app has to wait for all the imports to be done.

The second point becomes a lot painful when you have a large application, like a Django project where the auto reload becomes several seconds. Not only auto reload crawls, the testing cycle is slow as well. Every time you want to run test command, it has to wait several seconds. Painful.

So far the solution has been to do the lazy import by importing inside the methods where it's required. That is something, I never got to like to be honest.

Maybe it will be fixed in Python 4, where the JIT uses the type hints as well /s

f311a•2m ago
Lazy imports mean late errors. Fail fast is a good design principle.
f311a•7m ago
I don't like the idea of introducing a new keyword. We need a backward compatible solution. I feel like Python needs some kind of universal annotation syntax such as in go (comments) or in Rust (macros). New keyword means all parsers, lsps, editors should be updated.

I’m pretty sure there will be new keywords in Python in the future that only solve one thing.

Alir3z4•1m ago
Me neither.

Introducing new keyword has become a recent thing in Python.

Seems Python has a deep scare since Python2 to Python3 time and is scared to do anything that causes such drama again.

For me, the worst of all is "async". If 2to3 didn't cause much division, the async definitely divided Python libraries in 2. Sync and Async.

Maybe if they want backward compatible solution, this can be done by some compile or runtime flag like they did with free threading no-gil.

jeremyscanvic•6m ago
Really excited about this - we've recently been struggling with making imports lazy without completely messing up the code in DeepInverse https://deepinv.github.io/deepinv/
Spivak•4m ago
I love the feature but I really dislike using the word lazy as a new language keyword. It just feels off somehow. I think maybe defer might be a better word. It is at least keeps the grammar right because it would be lazily.

    lazily import package.foo
    defer import package.foo
the_mitsuhiko•2m ago
I like the approach of ES6 where you pull in bindings that are generally lazily resolved. That is IMO the approach that should be the general strategy for Python.