Zulip Chat Archive

Stream: mathlib4

Topic: package for mathport?


Yury G. Kudryashov (Jun 30 2023 at 17:39):

Is it hard to turn mathport into an installable executable? Does it rely on relative paths?

I think about writing a build.nix file that installs a mathport command that does "the right thing": either runs on 1 file or on the current git project.

Yury G. Kudryashov (Jun 30 2023 at 17:40):

(then add a debian package so that Ubuntu instruction can be "add this PPA, install mathport, run it")

Notification Bot (Jun 30 2023 at 17:41):

2 messages were moved here from #mathlib4 > mathport recompiles mathlib by Yury G. Kudryashov.

Mario Carneiro (Jun 30 2023 at 19:15):

It doesn't rely on any hard-coded paths AFAIK, but it does rely on a lot of external files given to it via LEAN_PATH, config.json and the command line

Mario Carneiro (Jun 30 2023 at 19:15):

i.e. it needs mathlib4 oleans to be available somewhere on disk

Yury G. Kudryashov (Jun 30 2023 at 20:39):

Do you know why it rebuilds the parts of mathlib4 it depends on?

Mario Carneiro (Jun 30 2023 at 21:07):

with Compiling or Building?

Mario Carneiro (Jun 30 2023 at 21:08):

Compiling is expected, it has to actually produce an executable and so it has to compile relevant parts of mathlib into an object file, which is not something we cache because it is architecture dependent.

Mario Carneiro (Jun 30 2023 at 21:09):

Building should not happen if you ran lake exe cache get

Mario Carneiro (Jun 30 2023 at 21:10):

It should be pretty quick to "compile" mathlib because most files have no computational content so it's just compiling a bunch of empty C files

Mario Carneiro (Jun 30 2023 at 21:11):

Note that this is getting worse over time because mathport depends on Mathlib.Mathport.Syntax and the dependencies of this file keep growing as people implement more tactics that depend on more parts of mathlib

Mario Carneiro (Jun 30 2023 at 21:12):

(I would guess this spiked recently because the witt vector tactics got implemented)

Yury G. Kudryashov (Jun 30 2023 at 21:49):

Indeed, it's "Compiling". Thank you for the explanation!


Last updated: Dec 20 2023 at 11:08 UTC