# Is there anything like common lisp's describe and/or dissassemble?

**URL:** https://racket.discourse.group/t/is-there-anything-like-common-lisps-describe-and-or-dissassemble/377
**Category:** General
**Created:** [December 7, 2021, 9:41pm UTC](https://racket.discourse.group/t/is-there-anything-like-common-lisps-describe-and-or-dissassemble/377 "2021-12-07T21:41:30Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![decuser](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@decuser](https://racket.discourse.group/u/decuser)
#### Post date: [December 7, 2021, 9:41pm UTC](https://racket.discourse.group/t/is-there-anything-like-common-lisps-describe-and-or-dissassemble/377/1 "2021-12-07T21:41:30Z")

</div>

In common lisp, it is possible to:

```scheme
(describe '+)

```

which results in:

```scheme
+ is the symbol +, lies in #<PACKAGE COMMON-LISP>, is accessible in 14
packages ...
---snip
 #<SYSTEM-FUNCTION +> is a built-in system function.
 Argument list: (&REST SYSTEM::OTHER-ARGS)
 For more information, evaluate (DISASSEMBLE #'+).
---snip

```

and

```scheme
 (DISASSEMBLE #'+)

```

which shows the disassembly of the procedure.

---

<div class="post-metadata">

### Author: ![samth](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/samth/32/3_2.png) [@samth](https://racket.discourse.group/u/samth)
#### Post date: [December 7, 2021, 10:14pm UTC](https://racket.discourse.group/t/is-there-anything-like-common-lisps-describe-and-or-dissassemble/377/2 "2021-12-07T22:14:36Z")

</div>

Yes, you can use the `disassemble` package: [disassemble](https://pkgs.racket-lang.org/package/disassemble). Also, if you have that package installed, then the `raco decompile` command will show the disassembly of procedures in the relevant compiled module.

Here's an example of it running:

```scheme
[samth@huor:~] r
Welcome to Racket v8.3.0.8 [cs].
> (require disassemble)
> (disassemble +)
       0: 4883fd02 (cmp rbp #x2)
       4: 7569 (jnz (+ rip #x69)) ; => 6f
       6: 4889f9 (mov rcx rdi)
       9: 4c09c1 (or rcx r8)
       c: f6c107 (test cl #x7)
       f: 750c (jnz (+ rip #xc)) ; => 1d
      11: 4c89c5 (mov rbp r8)
      14: 4801fd (add rbp rdi)
      17: 7004 (jo (+ rip #x4)) ; => 1d
      19: 41ff6500 (jmp (mem64+ r13 #x0))
      1d: 49836e6801 (sub (mem64+ r14 #x68) #x1) ; <=
      22: 753f (jnz (+ rip #x3f)) ; => 63
      24: 4d894508 (mov (mem64+ r13 #x8) r8)
      28: 49897d10 (mov (mem64+ r13 #x10) rdi)
      2c: 4983c518 (add r13 #x18)
      30: 488d0d20000000 (lea rcx (mem+ rip #x20)) ; => 57
<many more lines of code snipped>

```

---

<div class="post-metadata">

### Author: ![sorawee](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@sorawee](https://racket.discourse.group/u/sorawee)
#### Post date: [December 7, 2021, 11:36pm UTC](https://racket.discourse.group/t/is-there-anything-like-common-lisps-describe-and-or-dissassemble/377/3 "2021-12-07T23:36:54Z")

</div>

Additionally, the package [`whereis`](https://docs.racket-lang.org/whereis/) (not installed by default, you need to install it manually) can tell you where the binding comes from

```scheme
> (whereis-binding #'+)
whereis-module: built-in module has no path: '#%runtime
> (whereis-binding #'make-list)
#<path:.../racket/collects/racket/list.rkt>

```
