planckforth: 손으로 작성한 작은 ELF 바이너리에서 Forth 인터프리터 부트스트래핑

발행: (2026년 2월 16일 오후 08:44 GMT+9)
2 분 소요

Source: Hacker News

PlanckForth: 손으로 작성한 1KB 바이너리에서 인터프리터 부트스트래핑

빌드 방법

PlanckForth를 빌드하려면 xxd만 필요합니다.

git clone https://github.com/nineties/planckforth.git
cd planckforth
make
# The makefile runs:
# xxd -r -c 8 planck.xxd > planck
chmod +x planck

다른 언어로 된 구현은 others 디렉터리에 있습니다.

Hello World

작은 바이너리를 직접 실행하기:

./planck
kHtketkltkltkotk tkWtkotkrtkltkdtk!tk:k0-tk0k0-Q

bootstrap.fs 로 부트스트랩한 후:

./planck  b)

내장 단어

단어의미스택 효과설명
=equal( a b — c )c = (a == b)
(shl( a b — c )c = a > b (logical)
%sar( a b — c )c = a >> b (arithmetic)
vargv( — a‑addr u )인자 벡터와 개수
Vversion( — c‑addr )런타임 정보 문자열

바이너리 레이아웃

binary layout

구현

구현빌드 명령테스트 상태
Handwritten ELF binary for i386‑linuxmaketesting i386-linux-handwritten
Cmake ctesting c
Python 3.xmake pythontesting python

벤치마크

위키의 Benchmarks 페이지를 보세요.

0 조회
Back to Blog

관련 글

더 보기 »

SoundBoardio: GitHub 기반 사운드보드

GitHub 리포지토리를 공유 가능한 soundboard로 바꾸세요. 간단한 config, PWA‑ready, 그리고 완전히 무료. 완벽한 타이밍의 sound bite는 종종 천 마디 말보다 가치가 있습니다.