κeenです。 先日、先輩社員と話してるとシェルを作る話になりました。 だいたいのコンピュータサイエンスの学生なら学部生の頃に課題でシェルを作りますが数学科にいた私は作ったことありませんでした。 でも、その時「今ならシェルなんて作ろうと思えばすぐに作れますよ」なんて言っちゃったのでなんか作りました。 まあ、習作程度の雑なものです。 作ったのはこれ、KeenS/igaguri: my toy shell written in Rust。 名前は、Shellは木の実を覆う殻のようにカーネルを覆う殻とのことなのでRustのロゴに似てる毬栗を選びました。 パーサ パーサコンビネータライブラリのnomを使いました。 雰囲気こんな感じ。 named!(token<String>, map!(map_res!(is_a!("abcdefghijklmnopqlrstuvwxyzABCDEFGHIJKLM
はじめに 自作シェルを書いてみた記事はよく見かけるのですが、そのほとんどが fork -> exec という流れです。仕組みを学ぶという点で非常に有効なのでそれはそれで良いとして、 Rust では標準ライブラリの std::process::Command を使用してもっと簡単にコマンド実行ができるよ! という記事があまりないので書いてみました。 コマンドの実行 REPL パース処理はできるだけシンプルに書きます。 標準入力から1行読み取り、Command::spawn() で実行します。 それを繰り返すのが REPL (Read-Eval-Print Loop)です。 これだけでシェルと言い張っても良いと思っています🤔 use std::io::{self, Write}; use std::process::Command; fn main() { loop { // プロンプト p
Toybox: all-in-one Linux command line. --- Getting started You can download static binaries for various targets from: http://landley.net/toybox/bin The special name "." indicates the current directory (just like ".." means the parent directory), and you can run a program that isn't in the $PATH by specifying a path to it, so this should work: wget http://landley.net/toybox/bin/toybox-x86_64 chmod
Es: A shell with higher-order functions Paul Haahr -- Adobe Systems Incorporated [Errata note 1] Byron Rakitzis -- Network Appliance Corporation Abstract In the fall of 1990, one of us (Rakitzis) re-implemented the Plan 9 command interpreter, rc, for use as a UNIX shell. Experience with that shell led us to wonder whether a more general approach to the design of shells was possible, and this paper
Why am I seeing this?You are seeing this because the administrator of this website has set up Anubis to protect the server against the scourge of AI companies aggressively scraping websites. This can and does cause downtime for the websites, which makes their resources inaccessible for everyone. Anubis is a compromise. Anubis uses a Proof-of-Work scheme in the vein of Hashcash, a proposed proof-of
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く