Engineering Tools for AI

程式設計

依語言分類的執行環境

整理執行常見程式語言所需的 runtime、compiler、套件管理器與設定檔。

34 個項目

共通概念

Runtime

Runtime

node index.js

意思

A program or environment that actually runs code.

使用時機

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

範例

node index.js

請求範例

Explain which runtime this project needs.

共通概念

Compiler

Compiler

gcc main.c -o main

意思

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

使用時機

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

範例

gcc main.c -o main

請求範例

Tell me which compiler command is needed for this file.

共通概念

Interpreter

Interpreter

python3 main.py

意思

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

使用時機

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

範例

python3 main.py

請求範例

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

共通概念

PATH

PATH

echo $PATH

意思

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

使用時機

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

注意

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

範例

echo $PATH

請求範例

Check whether the needed runtime command is on PATH.

共通概念

Version check

Version check

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

意思

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

使用時機

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

範例

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

請求範例

List the version check commands for this language.

共通概念

Package manager

Package manager

pip install requests

意思

A tool that installs and records third-party libraries.

使用時機

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

範例

pip install requests

請求範例

Explain which package manager this project uses.

Python

python3

python3

python3 main.py

意思

The common command for running Python 3 scripts.

使用時機

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

範例

python3 main.py

請求範例

Show how to run this Python file.

Python

venv

venv

python3 -m venv .venv

意思

A per-project Python environment for isolating installed packages.

使用時機

Use it when different projects need different package versions.

注意

After creating it, activate the environment before installing packages.

範例

python3 -m venv .venv

請求範例

Create and explain a Python virtual environment for this project.

Python

Activate venv

activate

source .venv/bin/activate

意思

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

使用時機

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

範例

source .venv/bin/activate

請求範例

Tell me whether the Python virtual environment is active.

Python

pip

pip

pip install requests

意思

Python's package installation tool.

使用時機

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

注意

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

範例

pip install requests

請求範例

Check which Python environment this pip command uses.

Python

requirements.txt

requirements.txt

pip install -r requirements.txt

意思

A text file listing Python packages to install.

使用時機

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

範例

pip install -r requirements.txt

請求範例

Install packages from requirements.txt in the active venv.

C

gcc

gcc

gcc main.c -o main

意思

A common compiler for C source files.

使用時機

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

注意

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

範例

gcc main.c -o main

請求範例

Compile this C file and explain the output executable.

C

clang

clang

clang main.c -o main

意思

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

使用時機

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

範例

clang main.c -o main

請求範例

Check whether clang is installed and compile this C file.

C

.h header file

.h header file

#include "math_utils.h"

意思

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

使用時機

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

範例

#include "math_utils.h"

請求範例

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

C

Makefile

Makefile

make

意思

A file that defines build commands and dependencies for make.

使用時機

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

範例

make

請求範例

Explain what this Makefile builds.

C++

g++

g++

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

意思

A common compiler command for C++ source files.

使用時機

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

範例

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

請求範例

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

C++

C++ standard

C++ standard

-std=c++20

意思

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

使用時機

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

注意

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

範例

-std=c++20

請求範例

Tell me which C++ standard this code needs.

C++

CMake

CMake

cmake -S . -B build

意思

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

使用時機

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

範例

cmake -S . -B build

請求範例

Explain the CMake configure and build commands for this project.

Go

go

go

go version

意思

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

使用時機

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

範例

go version

請求範例

Check the installed Go version.

Go

go run

go run

go run main.go

意思

Compiles and runs Go code in one command.

使用時機

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

範例

go run main.go

請求範例

Run this Go program and explain any errors.

Go

go.mod

go.mod

go mod init example.com/my-app

意思

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

使用時機

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

範例

go mod init example.com/my-app

請求範例

Explain what this go.mod file defines.

Go

go mod tidy

go mod tidy

go mod tidy

意思

Adds missing Go module requirements and removes unused ones.

使用時機

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

範例

go mod tidy

請求範例

Run go mod tidy and summarize dependency changes.

JavaScript / Node.js

Node.js

Node.js

node index.js

意思

A runtime for running JavaScript outside the browser.

使用時機

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

注意

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

範例

node index.js

請求範例

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

JavaScript / Node.js

npm

npm

npm install

意思

The default package manager installed with Node.js.

使用時機

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

範例

npm install

請求範例

Explain the npm scripts in this package.json.

JavaScript / Node.js

package.json

package.json

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

意思

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

使用時機

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

範例

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

請求範例

Tell me what commands this package.json exposes.

JavaScript / Node.js

nvm

nvm

nvm use

意思

A tool for switching Node.js versions per project.

使用時機

Use it when a project requires a specific Node version.

範例

nvm use

請求範例

Check whether this project specifies a Node version.

Rust

rustup

rustup

rustup show

意思

The recommended tool for installing and managing Rust toolchains.

使用時機

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

範例

rustup show

請求範例

Check the active Rust toolchain.

Rust

rustc

rustc

rustc main.rs

意思

The Rust compiler.

使用時機

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

範例

rustc main.rs

請求範例

Explain whether this Rust project should use rustc or cargo.

Rust

cargo

cargo

cargo run

意思

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

使用時機

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

範例

cargo run

請求範例

Run this Rust project with cargo and explain the output.

Rust

Cargo.toml

Cargo.toml

[dependencies]

意思

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

使用時機

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

範例

[dependencies]

請求範例

Explain the dependencies in this Cargo.toml.

Java

JDK

JDK

java -version

意思

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

使用時機

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

範例

java -version

請求範例

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

Java

javac

javac

javac Main.java

意思

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

使用時機

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

範例

javac Main.java

請求範例

Compile this Java file and explain the generated class file.

Java

java

java

java Main

意思

Runs compiled Java classes on the JVM.

使用時機

Use it after compiling a simple Java program with javac.

注意

Run java Main, not java Main.class.

範例

java Main

請求範例

Show the compile and run commands for this Java file.

Java

Maven / Gradle

Maven / Gradle

mvn test / ./gradlew test

意思

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

使用時機

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

範例

mvn test / ./gradlew test

請求範例

Tell me whether this Java project uses Maven or Gradle.