Zulip Chat Archive
Stream: general
Topic: Laptops suitable for Lean
傅辰佶 (Feb 27 2024 at 19:27):
Any recommendations for laptops that are suitable for lean? Say, is MacBook Air (8-core, 8GB shared memory, 256GB storage) good enough?
Patrick Massot (Feb 27 2024 at 19:29):
This is not enough RAM for a nice use.
傅辰佶 (Feb 27 2024 at 19:36):
How about 16GB?
Timo Carlin-Burns (Feb 27 2024 at 19:52):
I think processor performance makes a difference too. It's pretty painful for me to use Lean on my laptop from 2017 with an Intel 7200U 3.1Ghz CPU.
Richard Copley (Feb 27 2024 at 19:53):
(If I understand correctly, the shared memory in a Mac is fast VRAM which is available to the GPU but can also be used by the CPU. It is in addition to ordinary DRAM.)
Matthew Ballard (Feb 27 2024 at 20:08):
I used a M1 MacBook air with those specs and the memory was limiting. But the processor was more than enough
傅辰佶 (Feb 27 2024 at 20:49):
You mean 16GB memory is not enough?
Julian Berman (Feb 27 2024 at 20:50):
I use a MacBook Air absolute base model (8GB) and honestly find it pretty fine. But maybe the secret is "don't try anything more powerful". Especially if you use GitPod though you can do all your Lean development SSHed / on the web too.
傅辰佶 (Feb 27 2024 at 21:10):
I see. Sounds good!
Kevin Buzzard (Feb 27 2024 at 21:38):
I use a Linux laptop with 16G ram and it works fine for lean, it's about three years old
Michael Stoll (Feb 27 2024 at 22:03):
Mine is a bit older, but similar (CPU is "Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz"), and does quite well. (I'll be getting a new one soon, though.)
Shreyas Srinivas (Feb 27 2024 at 22:29):
Apart from what everyone else said, do get a laptop with a lot of storage, especially if it is a Mac, since they don't seem to allow expanding the storage. Lean quickly fills up your storage if you work on many based mathlib projects (and the tooling currently works most smoothly for mathlib dependent projects and mathlib).
Eric Rodriguez (Feb 27 2024 at 22:46):
that can be dealt with mostly with cache+toolchain pruning
Kim Morrison (Feb 27 2024 at 22:50):
Echoing @Julian Berman, I do a lot of my work on a quite ancient Mac laptop, but via ssh remote session to a beefy desktop machine. Except for an annoying delay with VSCode reconnecting the session after the laptop sleeps, I find this a completely fine experience.
Rebecca Bellovin (Feb 27 2024 at 23:18):
For some reason, I've had much worse experiences trying to run VSCode on Dell XPSes than on Lenovo Thinkpads (both with 16G memory, running Ubuntu); adding another 16G of swap to the XPSes helped a lot
Jon Eugster (Feb 28 2024 at 07:10):
Eric Rodriguez said:
that can be dealt with mostly with cache+toolchain pruning
While that's true to some extend, just the amount of mathlib copies living in various .lake/packages
folder can sum up quite a bit... Currently that's 4GB per project depending on mathlib.
For the NNG I had an approach of automatically pruning some unused mathlib .olean
files in CI after building, which gets that down to 2GB, but it still adds up on the server.
Antoine Chambert-Loir (Oct 03 2024 at 06:14):
I need to have my office buy me a new laptop. I had a 2015 MacBook Pro. The new one could be a recent model with M2 chip and 16GB of “combined memory“. (This is already expensive enough.) Would that be reasonable for a comfortable use of Lean?
Antoine Chambert-Loir (Oct 03 2024 at 06:16):
Kim Morrison (Oct 03 2024 at 06:22):
I think so. Lean is not such a memory hog as it used to be, and I think many people find 16gb is fine. The M2 likes Lean. :-)
Oliver Nash (Oct 03 2024 at 10:49):
IMHO money spent on RAM is never wasted and is the single best way to extend the useful lifetime of a computer, especially for devices (like MacBooks) which cannot have more memory added later.
Shreyas Srinivas (Oct 03 2024 at 11:42):
I would recommend going for 32 GB if you plan to keep this machine for a while.
Kevin Buzzard (Oct 04 2024 at 10:07):
I sometimes run out of memory (i.e. swapping gets serious) on a 16GB machine during a "normal working session" (I have a browser open with many tabs, Discord and Zulip and Teams and Slack open, a zoom call open and I'm editing mathlib). I never have such problems with my 32GB machine.
Last updated: May 02 2025 at 03:31 UTC