TL;DR
๊ต์ก์ฉ์ผ๋ก ๋ง์ด ์ฐ์ด๋ ์คํด ๋ฐฉ์ธ์ผ๋ก, ๋ฆฌ์คํ๋ฅผ ๋ฐฐ์ฐ๊ธฐ ๊ฐ์ฅ ํธํ ํ๊ฒฝ์ ์ ๊ณตํ๋ค. ์ค์ ๋ก ์๋์ฐ, ๋งฅ, ์ ๋์ค ๊ณ์ด์ ๋ค ํธํ๋๋ IDE ๋ฅผ ์ ๊ณตํ๋ฉฐ, ๊ฑฐ๊ธฐ์ GUI, ๋คํธ์ํฌ ๋ฑ ์ฌ๋งํ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ ๋ค ํฌํจ๋์ด์๊ณ ,(Batteries Included!) ์ค์ ํ๋ก๊ทธ๋๋ฐ๊ณผ ๊ธฐ๋ณธ์ ์ธ ๊ฐ๋ ์ ๋น์ทํ๋ฉด์, ๋ ธ๊ฐ๋ค๊ฐ ๋ ์ ์๋ ๋ถ์ฐจ์ ์ธ ๊ธฐ๋ฅ๋ค์ ๋จ์ํ์ํจ ํ๋ก๊ทธ๋๋ฐ ๊ต์ก์ฉ ๋ชจ๋๊น์ง ๋ฐ๋ก ํฌํจ๋์ด ์๋ค. Realm of Racket ์ด๋ผ๋ ๊ต์ฌ๋ฅผ ๋ณด๋ฉด, ์ค๊ณ ๊ต์ ๋์์ ๊ธฐ์ด์ ์ธ ์์ค์ด๊ธด ํ์ง๋ง ์คํด ๋ฌธ๋ฒ๊ณผ GUI, ๋คํธ์ํฌ ํ๋ก๊ทธ๋๋ฐ, ์ธ๊ณต์ง๋ฅ ๋ฑ์ ๊ฒ์ ํ๋ก๊ทธ๋๋ฐ ์ค์ต์ ํตํด ๊ฒจ์ฐ 300 ํ์ด์ง ์ดํ์ ๋ถ๋์ผ๋ก ์ค๋ช ํ๊ณ ์๋ค! ์ฌ์ค, ๋ฆฌ์คํ๋ผ๋ ์ธ์ด ์์ฒด๊ฐ ํ๋ก๊ทธ๋๋ฐ ์ธ์ด๋ฅผ ๋ง๋ค๊ธฐ ํธ๋ฆฌํ ์ธ์ด์ด๊ธฐ๋ ํ๊ณ , Racket ์ ์คํด์ ์ ๋ฐ ์ธ์ด ์์ฒด์ ํ์ฅ์ฑ์ ๋ค์ ๊ทน๋จ์ ์ธ ๋ ๋ฒจ๋ก ๋์ด์ฌ๋ฆฐ ์ธ์ด์ด๊ธฐ์ ๊ฐ๋ฅํ ๊ฒ.
LISP ๋ฐฉ์ธ. ๊ต์ก์ฉ ํ๋ก๊ทธ๋๋ฐ ์ธ์ด๋ก ์ต์ . ํด๊ณผ ๋ฌธ์ ๋ฑ ์ ๊ฐ์ถฐ์ ธ ์๋ค. ์ด ๋ ์์ ์ค์ฌ์ผ๋ก ํ๋ก๊ทธ๋๋ฐ ์๋ฃ๋ฅผ ๊ตฌ์ถํด์ ๋ฆฌ๋ฉํ๋ค. ํจ์ํ ์ธ์ด๋ง ์๋ฉด ๋๋ค. ๋ชจ๋ ๊ฒ์ ํ ์ ์๋ค. ํด์ ์ผ๋จ ์ฃผ๋ ๊ฑธ๋ก ํ๋ค. ๋ฐ๋ฅธ ๊ฒ์ ๊ฑด๋ค์ง ์๋๋ค. ๊ทธ๋์ผ ์ค์ฌ์ ์ก์ ์ ์๋ค.
๋ผ์ฝ raco fmt install
raco pkg install fmt
Documentation
์์ด๋ก ๋์ด ์๋ค. ์๋ฌดํผ ๊ทธ๋ ๋ค. ๊ทธ๋ฅ ํด๋ณด๋ ๊ฒ ๋ฟ์ด๋ค.
DONT OFF Translation
ํ๊ตญ์ด๋ก ๋ฒ์ญ์ ํ๋ค๋ฉด ๋ฌด์์ ํด์ผ ํ๋๊ฐ? ์ด๋์์ ๋ถํฐ ํด์ผ ํ๋๊ฐ? ๋ค ํด์ผ ํ๋ค. ๊ทธ ๊ฒ ๋ณด๋ค๋ ์์ ์ค์ฌ์ผ๋ก ์ฐ์ต ์ฝ๋๋ฅผ ๊ฒฝํํด ๋ณด๋ ๊ฒ ์ฐ์ ์ด๋ค.
์ต์ ๋ฒ์ ๋ฐ์ด๋๋ฆฌ ์ค์น
$ sudo bash racket-8.10-x86_64-linux-cs.sh
This program will extract and install Racket v8.10.
Note: the required diskspace for this installation is 681M.
Do you want a Unix-style distribution?
In this distribution mode files go into different directories according
to Unix conventions. A "racket-uninstall" script will be generated
to be used when you want to remove the installation. If you say 'no',
the whole Racket directory is kept in a single installation directory
(movable and erasable), possibly with external links into it -- this is
often more convenient, especially if you want to install multiple
versions or keep it in your home directory.
Enter yes/no (default: no) > yes
Where do you want to base your installation of Racket v8.10?
(If you've done such an installation in the past, either
enter the same directory, or run 'racket-uninstall' manually.)
1 - /usr/... [default]
2 - /usr/local/...
3 - ~/... (/root/...)
4 - ./... (here)
Or enter a different directory prefix to install in.
> 1
Target Directories:
[e] Executables /usr/bin (exists)
[o] Libraries /usr/lib/racket (exists)
[s] Shared files /usr/share/racket (exists)
[c] Configuration /usr/etc/racket (will be created)
[d] Documentation /usr/share/racket/doc (will be created)
[a] .desktop files /usr/share/applications (exists)
[m] Man Pages /usr/share/man (exists)
[l] C Libraries /usr/lib (exists)
[h] C headers /usr/include/racket (exists)
[z] Compiled at lib? yes
Enter a letter to change an entry, or enter to continue.
Checking the integrity of the binary archive... ok.
Unpacking into "/usr/racket-tmp-install" (Ctrl+C to abort)...
Done.
Moving bin -> /usr/bin
Overwrite file "/usr/bin/drracket"?
[y]es / yes to [a]ll / [n]o=abort > a
Moving collects -> /usr/share/racket/collects
Moving share/pkgs -> /usr/share/racket/pkgs
Moving doc -> /usr/share/racket/doc
Moving lib -> /usr/lib/racket
Moving include -> /usr/include/racket
Moving share/applications -> /usr/share/applications
Moving share -> /usr/share/racket
Moving etc -> /usr/etc/racket
Moving man -> /usr/share/man
Moving README -> /usr/share/racket/doc/README
Writing uninstaller at: /usr/bin/racket-uninstall...
Rewriting configuration file at: /usr/etc/racket/config.rktd...
Moving "compiled" in /usr/share/racket/collects to /usr/lib/racket/compiled/usr/share/racket/collects
Moving "compiled" in /usr/share/racket/pkgs to /usr/lib/racket/compiled/usr/share/racket/pkgs
Rewriting configuration file at: /usr/etc/racket/config.rktd...
Installation complete.
IDE
Drracket
์ด๊ฒ ๊ธฐ๋ณธ์ด๋ค. ๊ทธ๋์ ์ข์ ๊ฒ์ด๋ค.
VSCODE
Emacs
๋ค์ ๋ฌธ์์ ์์ธํ ์ค๋ช ๋์ด ์๋ค.
#์ด๋งฅ์ค #๋ํท #SICP
- ์ค์น๋ ๋ ์ด๋งฅ์ค ๋ชจ๋ ์ฌ์ฉ
- /home/junghan/sync/man/dotsamples/vanilla/hamacs-evil/ha-programming-scheme.org
Try It Out
Working for values?
(* 6 7)
42
Working for output?
(define str-1 "hello")
(define str-2 "world")
(define all (string-join (list str-1 str-2) ", "))
(display (string-titlecase all))
Hello, World
,#+results:
Hello, World
The interface is horrendously slow, as the :session
doesnโt seem to work, and starting up a Racket REPL takes a long time.
SICP and Racket
If using Racket for SICP, install the SICP language:
raco pkg install --auto --update-deps sicp
We now can give it a #lang sicp
(or better yet, use the :lang
header) to define certain SICP-specify features:
์ด์ #lang sicp=(๋๋ =:lang
ํค๋๋ฅผ ์ฌ์ฉํ๋ ๊ฒ์ด ๋ ์ข์ต๋๋ค)๋ฅผ ์ง์ ํ์ฌ ํน์ SICP ์ง์ ๊ธฐ๋ฅ์ ์ ์ํ ์ ์์ต๋๋ค:
Letโs try this now:
(inc 42)