Мы используем 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
“The greater and greater awakening of consciousness and its climb to a higher and higher level and a wider extent of its vision and action is the condition of our progress towards that supreme and total perfection which is the aim of our existence.”
~ Sri Aurobindo
#consciousness
💖@OfLoveAndGrace💖
🌎 The phenomenon of synesthesia allows some people to experience a blending of senses—like seeing colors when hearing music or tasting flavors from words. This rare trait reveals how flexible and interconnected the human brain’s sensory pathways can be. ✨
#neuroscience⚡#consciousness⚡#perception
👉subscribe Interesting Planet
🌎 Humans can perceive their own thoughts by using the brain’s “default mode network” (DMN), a group of regions active during self-reflection and daydreaming. The DMN uses up to 20% of the brain’s total energy when awake. ✨
#brain⚡#consciousness⚡#neuroscience
👉subscribe Interesting Planet
👉more Channels
🌎 Consciousness studies reveal that some patients in vegetative states still show minimal awareness. Brain scans detect distinct patterns when they are asked to imagine specific activities. These brain responses resemble those of healthy people, showing hidden layers of awareness even without outward signs. ✨
#brain⚡#consciousness⚡#neuroscience
👉subscribe Interesting Planet
👉more Channels
🌎 Brains process language mostly on the left side, but imaging studies reveal that understanding jokes or irony also activates areas on the right. This pattern appears in over 90% of right-handed people. ✨
#brain⚡#neuroscience⚡#consciousness
👉subscribe Interesting Planet
👉more Channels
🌎 The phenomenon of "predictive coding" means your brain constantly generates guesses about what's coming next, allowing you to react faster to new information. This system helps you interpret sights, sounds, and even social cues by comparing real signals to expectations, updating your perception in real time. Brain scans show this process is most active in the cerebral cortex. ✨
#brain⚡#neuroscience⚡#consciousness
👉subscribe Interesting Planet
👉more Channels
🌎 The brain’s default mode network activates when you daydream or let your mind wander. This network is involved in self-reflection and retrieving personal memories. MRI studies show it consumes nearly as much energy as active, focused thinking. ✨
#brain⚡#consciousness⚡#neuroscience
👉subscribe Interesting Planet
👉more Channels
🌎 Locked inside your skull, the human brain contains over 86 billion neurons. These nerve cells communicate through trillions of connections, forming complex circuits that create consciousness. Remarkably, all our thoughts, memories, and perceptions arise from electrical and chemical signals passing between these tiny cells. ✨
#brain⚡#neuroscience⚡#consciousness
👉subscribe Interesting Planet
🌎 The phenomenon called "blindsight" occurs when people with damage to their visual cortex can respond to visual stimuli without conscious awareness. Their eyes and optic nerves work, but the brain's primary visual center is injured—yet they can still guess locations or movements of objects correctly. Studies show blindsight patients perform above chance when identifying light or motion in their blind field. ✨
#brain⚡#consciousness⚡#neuroscience
👉subscribe Interesting Planet
🌎 When you recognize a friend’s face, your brain’s fusiform gyrus handles the task. Damage here can cause prosopagnosia, a condition where people cannot recognize faces—even those of loved ones. ✨
#brain⚡#neuroscience⚡#consciousness
👉subscribe Interesting Planet