Engineering Tools for AI

Programmation

Environnements d'exécution par langage

Guide consultable des runtimes, compilateurs, gestionnaires de paquets et fichiers de configuration des langages courants.

34 éléments

Concepts communs

Runtime

Runtime

node index.js

Sens

A program or environment that actually runs code.

Quand l'utiliser

Node.js runs JavaScript, Python runs .py files, and the JVM runs compiled Java bytecode.

Exemple

node index.js

Exemple de demande

Explain which runtime this project needs.

Concepts communs

Compiler

Compiler

gcc main.c -o main

Sens

A tool that turns source code into another form, often an executable file.

Quand l'utiliser

C, C++, Rust, Go, and Java usually need a compilation step before or during execution.

Exemple

gcc main.c -o main

Exemple de demande

Tell me which compiler command is needed for this file.

Concepts communs

Interpreter

Interpreter

python3 main.py

Sens

A program that reads and runs source code directly or with minimal preparation.

Quand l'utiliser

Python is commonly run through an interpreter, while C is commonly compiled first.

Exemple

python3 main.py

Exemple de demande

Explain whether this language is interpreted or compiled in normal use.

Concepts communs

PATH

PATH

echo $PATH

Sens

A list of folders the terminal searches when you type a command.

Quand l'utiliser

If python, node, go, cargo, or javac is not found, PATH is one of the first settings to check.

Attention

Editing PATH incorrectly can make normal commands disappear from the terminal.

Exemple

echo $PATH

Exemple de demande

Check whether the needed runtime command is on PATH.

Concepts communs

Version check

Version check

python3 --version && node -v && go version

Sens

A command pattern for confirming which runtime or compiler version is installed.

Quand l'utiliser

Use it before debugging version-specific build or package errors.

Exemple

python3 --version && node -v && go version

Exemple de demande

List the version check commands for this language.

Concepts communs

Package manager

Package manager

pip install requests

Sens

A tool that installs and records third-party libraries.

Quand l'utiliser

pip, npm, cargo, go modules, Maven, and Gradle all handle dependencies in different ecosystems.

Exemple

pip install requests

Exemple de demande

Explain which package manager this project uses.

Python

python3

python3

python3 main.py

Sens

The common command for running Python 3 scripts.

Quand l'utiliser

Use it to run a .py file directly or to create a virtual environment.

Exemple

python3 main.py

Exemple de demande

Show how to run this Python file.

Python

venv

venv

python3 -m venv .venv

Sens

A per-project Python environment for isolating installed packages.

Quand l'utiliser

Use it when different projects need different package versions.

Attention

After creating it, activate the environment before installing packages.

Exemple

python3 -m venv .venv

Exemple de demande

Create and explain a Python virtual environment for this project.

Python

Activate venv

activate

source .venv/bin/activate

Sens

Switches the terminal to use the Python and pip inside the virtual environment.

Quand l'utiliser

Use it before pip install or python commands in that project.

Exemple

source .venv/bin/activate

Exemple de demande

Tell me whether the Python virtual environment is active.

Python

pip

pip

pip install requests

Sens

Python's package installation tool.

Quand l'utiliser

Use it to install libraries listed by a project or needed by a script.

Attention

Make sure pip belongs to the same Python environment you will run.

Exemple

pip install requests

Exemple de demande

Check which Python environment this pip command uses.

Python

requirements.txt

requirements.txt

pip install -r requirements.txt

Sens

A text file listing Python packages to install.

Quand l'utiliser

Use it to recreate a project's Python package environment.

Exemple

pip install -r requirements.txt

Exemple de demande

Install packages from requirements.txt in the active venv.

C

gcc

gcc

gcc main.c -o main

Sens

A common compiler for C source files.

Quand l'utiliser

Use it to turn main.c into an executable file.

Attention

Compiling creates an executable; it does not automatically run it.

Exemple

gcc main.c -o main

Exemple de demande

Compile this C file and explain the output executable.

C

clang

clang

clang main.c -o main

Sens

A C compiler commonly available on macOS through Xcode Command Line Tools.

Quand l'utiliser

Use it as an alternative to gcc for compiling C files.

Exemple

clang main.c -o main

Exemple de demande

Check whether clang is installed and compile this C file.

C

.h header file

.h header file

#include "math_utils.h"

Sens

A file that usually declares functions, types, constants, or shared interfaces for C code.

Quand l'utiliser

Use it when multiple .c files need to share declarations.

Exemple

#include "math_utils.h"

Exemple de demande

Explain how this header file connects to the C source files.

C

Makefile

Makefile

make

Sens

A file that defines build commands and dependencies for make.

Quand l'utiliser

Use it when compiling a C or C++ project needs multiple repeated commands.

Exemple

make

Exemple de demande

Explain what this Makefile builds.

C++

g++

g++

g++ main.cpp -std=c++20 -o main

Sens

A common compiler command for C++ source files.

Quand l'utiliser

Use g++ instead of gcc when compiling C++ code.

Exemple

g++ main.cpp -std=c++20 -o main

Exemple de demande

Compile this C++ file with the right standard option.

C++

C++ standard

C++ standard

-std=c++20

Sens

A setting that tells the compiler which C++ language version to use.

Quand l'utiliser

Use it when code depends on features from C++17, C++20, or another standard.

Attention

A project can fail if the compiler is too old for the selected standard.

Exemple

-std=c++20

Exemple de demande

Tell me which C++ standard this code needs.

C++

CMake

CMake

cmake -S . -B build

Sens

A build configuration tool often used for C and C++ projects.

Quand l'utiliser

Use it when a project has CMakeLists.txt instead of a simple single-file compile command.

Exemple

cmake -S . -B build

Exemple de demande

Explain the CMake configure and build commands for this project.

Go

go

go

go version

Sens

The main command for running, building, testing, and managing Go modules.

Quand l'utiliser

Use it for go run, go build, go test, go mod, and dependency management.

Exemple

go version

Exemple de demande

Check the installed Go version.

Go

go run

go run

go run main.go

Sens

Compiles and runs Go code in one command.

Quand l'utiliser

Use it while developing a small Go program or testing a main package quickly.

Exemple

go run main.go

Exemple de demande

Run this Go program and explain any errors.

Go

go.mod

go.mod

go mod init example.com/my-app

Sens

The file that defines a Go module and its dependency requirements.

Quand l'utiliser

Use it as the project boundary for Go dependency and import resolution.

Exemple

go mod init example.com/my-app

Exemple de demande

Explain what this go.mod file defines.

Go

go mod tidy

go mod tidy

go mod tidy

Sens

Adds missing Go module requirements and removes unused ones.

Quand l'utiliser

Use it after changing imports or before committing Go dependency changes.

Exemple

go mod tidy

Exemple de demande

Run go mod tidy and summarize dependency changes.

JavaScript / Node.js

Node.js

Node.js

node index.js

Sens

A runtime for running JavaScript outside the browser.

Quand l'utiliser

Use it for backend scripts, build tools, and web framework tooling such as Next.js.

Attention

Browser JavaScript and Node.js do not have exactly the same APIs.

Exemple

node index.js

Exemple de demande

Check whether this JavaScript code is meant for Node.js or the browser.

JavaScript / Node.js

npm

npm

npm install

Sens

The default package manager installed with Node.js.

Quand l'utiliser

Use it to install packages and run scripts defined in package.json.

Exemple

npm install

Exemple de demande

Explain the npm scripts in this package.json.

JavaScript / Node.js

package.json

package.json

"scripts": { "dev": "next dev" }

Sens

A Node.js project file that records scripts, dependencies, and package metadata.

Quand l'utiliser

Use it to understand npm run dev, npm run build, and required packages.

Exemple

"scripts": { "dev": "next dev" }

Exemple de demande

Tell me what commands this package.json exposes.

JavaScript / Node.js

nvm

nvm

nvm use

Sens

A tool for switching Node.js versions per project.

Quand l'utiliser

Use it when a project requires a specific Node version.

Exemple

nvm use

Exemple de demande

Check whether this project specifies a Node version.

Rust

rustup

rustup

rustup show

Sens

The recommended tool for installing and managing Rust toolchains.

Quand l'utiliser

Use it to install Rust, switch stable/nightly, or add targets.

Exemple

rustup show

Exemple de demande

Check the active Rust toolchain.

Rust

rustc

rustc

rustc main.rs

Sens

The Rust compiler.

Quand l'utiliser

Use it for simple single-file Rust experiments, though real projects usually use cargo.

Exemple

rustc main.rs

Exemple de demande

Explain whether this Rust project should use rustc or cargo.

Rust

cargo

cargo

cargo run

Sens

Rust's package manager, build tool, test runner, and project runner.

Quand l'utiliser

Use cargo run, cargo build, and cargo test for normal Rust projects.

Exemple

cargo run

Exemple de demande

Run this Rust project with cargo and explain the output.

Rust

Cargo.toml

Cargo.toml

[dependencies]

Sens

The manifest file that defines a Rust package, metadata, and dependencies.

Quand l'utiliser

Use it to understand which crates the Rust project depends on.

Exemple

[dependencies]

Exemple de demande

Explain the dependencies in this Cargo.toml.

Java

JDK

JDK

java -version

Sens

The Java Development Kit includes tools needed to compile and run Java programs.

Quand l'utiliser

Use it when a project needs javac, java, Maven, Gradle, or another Java build tool.

Exemple

java -version

Exemple de demande

Check whether a JDK is installed and which version is active.

Java

javac

javac

javac Main.java

Sens

The Java compiler that turns .java files into .class bytecode files.

Quand l'utiliser

Use it for simple Java files or to understand what build tools do internally.

Exemple

javac Main.java

Exemple de demande

Compile this Java file and explain the generated class file.

Java

java

java

java Main

Sens

Runs compiled Java classes on the JVM.

Quand l'utiliser

Use it after compiling a simple Java program with javac.

Attention

Run java Main, not java Main.class.

Exemple

java Main

Exemple de demande

Show the compile and run commands for this Java file.

Java

Maven / Gradle

Maven / Gradle

mvn test / ./gradlew test

Sens

Common Java build tools for dependencies, tests, packaging, and project tasks.

Quand l'utiliser

Use Maven when a project has pom.xml and Gradle when it has build.gradle or gradlew.

Exemple

mvn test / ./gradlew test

Exemple de demande

Tell me whether this Java project uses Maven or Gradle.