quine

安装配置

Prepare

  1. install brainfuck by downloading the package from ubuntu packages

  2. install npm & LiveScript

1
2
sudo apt install npm
sudo npm install -g LiveScript

I don’t know what happened, livescript which is installed by apt is broken and the error message shows as below or this issue

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
##################################
## 93: LiveScript -> LLVM asm ##
##################################

lsc QR.ls > QR.ll
module.js:442
throw err;
^

Error: Cannot find module 'prelude-ls'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/lib/nodejs/livescript/lib/ast.js:3:8)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)

Install prelude-ls haven’t fix it, however it is workable by using npm to install LiveScript to cover it.

Preview output

You can check the output branch which is generated on my computer or the spoiler branch which is povided by the original author of the code. I haven’t diff them

ref

quine