Мы используем Makefile думая, что нет альтернатив, что это стандарт и всё такое.
Но make это не запускалка команд, а система сборки. Мы фактически используем его не по назначению.
И на самом деле альтернатива есть! Некоторое время назад я открыл для себя прекрасный инструмент - just. Он решает все проблемы make.
just - это не система сборки как make, это именно исполнитель команд!
Больше никаких Phony Targets и табуляций, привет нормальный синтаксис и передача аргументов!!! 😎
⭐️Что умеет just:
✅ Автодокументирование команд
Не нужно делать отдельную команду с докой, просто добавь комментарий
# команда сборки
build:
...
$ just --list
Available recipes:
build # команда сборки
Команда с именем default запускается по умолчанию если не указано другое, так что я обычно делаю так:
default:
just --list
Теперь просто выполняем just и получаем доку из текущего файла.
✅ Удобная работа с переменными окружения
# загрузить из .env
set dotenv-load
# глобальная переменная
export PYTHONPATH := "./src"
# переменная для команды
test $TESTUNG="true":
pytest
✅ Передача аргументов
build target:
@echo 'Build {{target}}...'
команда запуска
$ just build dev
# Build dev...
✅ Выбор интерпретатора прямо в команде
Пример с инлайн-скриптом на python:
system:
#!/usr/bin/env python3
import platform
print(platform.system())
Эта же функция позволит выполнить скрипт как одну команду вместо перезапуска шела для каждой строки
foo:
#!/usr/bin/env sh
for file in ls .; do
echo $file
done
✅ Выполнение команды в определенной директории. Можно указать как релятивный путь так и абсолютный
[working-directory: 'backend']
build:
docker compose build
Также можно задать рабочую директорию глобально
Там еще много интересного:
- поддержка функций
- автокомплиты и интеграции
- экспрешены
- алиасы команд
- группировка команд
- альтернативы команды под разные ОС
- импорт других just-файлов
- цветной вывод
- ... и другие штуковины!
Так что вперёд - ➡️ читать доку!
Репозиторий: ➡️https://github.com/casey/just
Статья: ➡️https://www.chicks.net/reference/file_formats/just/
ЗЫ. Кажется, на Makefile я уже не вернусь)
#tools
🌎 Unexpected time anomalies have been observed near strong gravitational fields, like black holes, due to "gravitational time dilation." This effect was confirmed by astronauts using precise atomic clocks, which run slower closer to massive objects compared to those farther away. In 2010, scientists measured time literally ticking faster by 33 microseconds per kilometer higher in altitude on Earth. ✨
#time⚡#physics⚡#relativity
👉subscribe Interesting Planet
👉more Channels
🌎 Time perception can change when moving at high speeds or near strong gravity, as predicted by Einstein's theory of relativity. Atomic clock experiments prove that time really passes more slowly for fast-moving objects or those closer to massive bodies like Earth—astronauts on the International Space Station age about 0.01 seconds less per six months compared to people on the ground. ✨
#time⚡#relativity⚡#physics
👉subscribe Interesting Planet
👉more Channels
🌎 Einstein's theory of relativity reveals that time can actually move slower or faster depending on gravity and speed. For example, atomic clocks on fast-moving satellites tick slightly slower than those on Earth’s surface—a phenomenon confirmed by GPS systems needing corrections due to these time differences. ✨
#time⚡#relativity⚡#physics
👉subscribe Interesting Planet
🪐 In the center of the galaxy ESO 325-G004, astronomers have observed a dramatic example of space-time distortion called gravitational lensing, where the gravity from this massive galaxy bends and magnifies the light of more distant galaxies behind it. This real effect makes background galaxies appear as stretched arcs or multiple images, showing how the fabric of space can be warped by the presence of enormous masses, just as predicted by Einstein’s theory of general relativity. ✨
#wormholes⚡#relativity⚡#galaxies⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 Just outside the event horizon of the supermassive black hole in galaxy NGC 1365, time slows significantly due to the black hole’s intense gravitational pull—a phenomenon called gravitational time dilation. For an observer far from NGC 1365, minutes near the black hole’s edge could translate into hours or even days in regular space, showing how extreme environments can dramatically stretch the flow of time itself. ✨
#blackholes⚡#spacetime⚡#relativity⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In the galaxy M87, where astronomers captured the first-ever image of a black hole, time dilation is so intense near its event horizon (the boundary around a black hole from which nothing—even light—can escape) that an outside observer would see time appear to nearly stop for anything close to the edge. This real effect, predicted by Einstein’s theory of general relativity, means a clock near the event horizon would tick dramatically slower compared to one far away from the black hole. ✨
#timedilation⚡#blackholes⚡#relativity⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 Time flows differently near massive cosmic objects like black holes—an effect known as time dilation. For example, close to the supermassive black hole Sagittarius A* at the center of our galaxy, clocks would tick slower than on Earth due to its intense gravity; astronauts orbiting just outside its event horizon would age less quickly than those far away, making time itself stretch in extreme environments. ✨
#timedilation⚡#relativity⚡#blackholes⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 Deep space travelers will experience time differently than people on Earth—a mysterious effect called time dilation. If astronauts took a fast journey to the star Sirius (8.6 light-years away) on a spaceship moving near the speed of light, their onboard clocks would run much slower than those back home, so they would age less during the trip—even while years passed on Earth. This real phenomenon comes straight from Einstein’s theory of relativity and shows how speed itself can turn space voyages into journeys through time. ✨
#timedilation⚡#relativity⚡#spaceships⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 Einstein’s theory of relativity predicts dramatic space-time distortions in the violent heart of the galaxy M87, where its supermassive black hole bends not just light, but alters the very flow of time itself. As matter spirals inward, space-time warps so much that signals escaping from near the event horizon—the point of no return—are stretched and delayed, making M87’s core a real example of nature’s most extreme distortions. ✨
#wormholes⚡#spacetime⚡#relativity⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 Space-time, the "fabric" that weaves together space and time, is not always smooth—giant objects like the supermassive black hole at the center of our galaxy, Sagittarius A*, warp and stretch it so much that both light and time bend around them. These real cosmic distortions, predicted by Einstein’s theory of general relativity, are seen as stars orbit that black hole on paths twisted by its immense gravity, giving us direct evidence that space itself can be bent and curved by massive objects in the universe. ✨
#wormholes⚡#spacetime⚡#relativity⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In 1977, the Voyager 1 spacecraft passed near Jupiter, and its onboard clocks experienced a tiny but measurable time dilation due to the planet's gravity. This real effect, predicted by Einstein's theory of general relativity, means time ticked just a little slower for Voyager as it flew close to massive Jupiter than it did for clocks far from the giant planet—showing that even in our own solar system, gravity can subtly warp the flow of time. ✨
#timedilation⚡#Jupiter⚡#relativity⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 On Mercury, time passes at a different rate than on Earth because the planet orbits much closer to the Sun and feels stronger gravity—a real effect called time dilation. According to Einstein's theory of relativity, stronger gravity slows down the flow of time, so a clock sitting on Mercury's surface would actually run slightly slower than an identical clock on Earth, making time itself stretch differently across the solar system. ✨
#timedilation⚡#relativity⚡#mercury⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels