python遊び場
mkdir pg-python
cd pg-python
# pyproject.toml の作成(ワークスペース定義)
cat << 'EOF' > pyproject.toml
[project]
name = "pg000"
version = "0.1.0"
description = "Python learning workspace"
readme = "README.md"
requires-python = ">=3.12"
[workspace]
members = [
"pg001",
"pg002",
]
EOF
# .gitignore の作成
cat << 'EOF' > .gitignore
.venv/
.uv/
__pycache__/
*.pyc
.vscode/
.DS_Store
EOF
# プロジェクトの作成
uv init --app pg001
uv init --app pg002
# パッケージ追加し、pg001でのみ使用する場合
uv add requests --package pg001
# pg001のmain.pyを実行
uv run --package pg001 main.py
rust遊び場
mkdir pg-rust
cd pg-rust
# Cargo.toml の作成(ワークスペース定義)
cat << 'EOF' > Cargo.toml
[workspace]
resolver = "2"
members = [
"pg001",
"pg002",
]
EOF
# .gitignore の作成
cat << 'EOF' > .gitignore
/target/
**/target/
.vscode/
.DS_Store
EOF
cargo new pg001 --bin
cargo new pg002 --bin
# チェック
cargo check
# ビルド
cargo build
# pg001実行
cargo run -p pg001
haskell遊び場
mkdir pg-haskell
cd pg-haskell
# Cargo.toml の作成(ワークスペース定義)
cat << 'EOF' > Cargo.toml
[workspace]
resolver = "2"
members = [
"pg001",
"pg001",
]
EOF
# .gitignore の作成
cat << 'EOF' > .gitignore
/target/
**/target/
.vscode/
.DS_Store
EOF
# テーマ作成
mkdir -p pg001 && cd pg001 && cabal init -n -p pg001 && cd ..
mkdir -p pg002 && cd pg002 && cabal init -n -p pg002 && cd ..
# 全てbuild
cabal build all
# pg001をrepl
cabal repl pg001
# pg001を実行
cabal run pg001