あらかじめ、Windows環境を準備します。
- Powershellを「管理者権限で実行」します。
- 次のコマンドを実行し、Powershellスクリプトの実行を許可します:
| ARG IMAGE=mcr.microsoft.com/dotnet/framework/runtime:4.8.1 | |
| FROM ${IMAGE} | |
| SHELL ["powershell", "-command"] | |
| RUN Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointsManager]::ServerCertificationCallback = {$true}; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) | |
| RUN choco install cmake -y --installargs 'ADD_CMAKE_TO_PATH=System' | |
| RUN choco install mingw visualstudio2022buildtools -y | |
| RUN choco install rustup.install llvm -y | |
| RUN rustup default stable-gnu |
| """ | |
| 与えたプロンプト | |
| 論理式のパーサーをpyparsingで作りたい。要件は以下の通り。 | |
| 1. 各項目名はダブルクォーテーションで囲まれる。例 "anthurium" | |
| 2. ダブルクォーテーション自体を含む場合、それは2つのダブルクォーテーションとして表現される。例 "forget""me ""not" | |
| 3. 各項目の手前に!を置くことで「否定」を表現できる。例 !"rose" | |
| 4. 各項目を&演算子で繋げることができる。つまり"anthurium"&!"dandelion"|"rose" | |
| 5. 丸いカッコ()を用いて演算順序の表現ができるようにする。例 !"anthurium" & ((!"dandelion"| "rose") & "sunflower") |
| aptリポジトリを無料版に書き換え |
| apt update | |
| apt install git build-essential curl wget nano -y | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| source $HOME/.local/bin/env | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \ | |
| -y \ | |
| --default-toolchain nightly \ | |
| --target wasm32-unknown-emscripten | |
| . "$HOME/.cargo/env" |