<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Cradicle Explorer</title>
    <link href="/css/bootstrap/bootstrap.min.css" rel="stylesheet">
    <style>
      .form-control-dark::placeholder {
          color: #aaa;
          opacity: 1;
      }
    </style>
    <link rel="stylesheet" href="/assets/fontawesome/css/all.min.css">
    <link rel="icon" type="image/png" href="/favicon.png">


                <link href="/css/dashboard.css" rel="stylesheet">
                </head>
                <body>
                <header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
                  <a class="navbar-brand col-md-3 col-lg-2 me-0 px-3 fs-6" href="/">Cradicle Explorer</a>
                  <button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                  </button>
                  <form method="get" action="/cgi-bin/main" style="width:100%;"><input class="form-control form-control-dark w-100 rounded-0 border-0" type="text" name="q" placeholder="Search repos" aria-label="Search"></form>
                  <div class="navbar-nav flex-row">
                    <div class="nav-item text-nowrap">
                      <a class="nav-link px-3 active" href="/cgi-bin/repo?id=z2K6FWezmLU6qyLwEtp7jWRNr6bbT">chap-command-fuse.git</a>
                    </div>
                  </div>
                </header>
                <div class="container-fluid">
                  <div class="row">
                    <nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-dark sidebar collapse">
                      <div class="position-sticky pt-3 sidebar-sticky">
                        <ul class="nav flex-column">
                          <li class="nav-item">
                            <a class="nav-link active" href="/cgi-bin/repo?id=z2K6FWezmLU6qyLwEtp7jWRNr6bbT">
                              <i class="align-text-bottom fa-solid fa-info"></i>
                              Info
                            </a>
                          </li>
                          <li class="nav-item">
                            <a class="nav-link" href="/cgi-bin/repo?id=z2K6FWezmLU6qyLwEtp7jWRNr6bbT&issue=list">
                              <i class="align-text-bottom fa-solid fa-layer-group"></i>
                              Issues
                            </a>
                          </li>
                          <li class="nav-item">
                            <a class="nav-link" href="/cgi-bin/repo?id=z2K6FWezmLU6qyLwEtp7jWRNr6bbT&patch=list">
                              <i class="align-text-bottom fa-solid fa-vest-patches"></i>
                              Patches
                            </a>
                          </li>
                          <li class="nav-item">
                            <a class="nav-link" href="/cgi-bin/repo?id=z2K6FWezmLU6qyLwEtp7jWRNr6bbT&wallet=list">
                              <i class="align-text-bottom fa-solid fa-wallet"></i>
                              Wallets
                            </a>
                          </li>
                          <li class="nav-item">
                            <a class="nav-link" href="/cgi-bin/repo?id=z2K6FWezmLU6qyLwEtp7jWRNr6bbT&source=.">
                              <i class="align-text-bottom fa-solid fa-code"></i>
                              Source
                            </a>
                          </li>
                        <h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted text-uppercase">
                          <span></span>
                        </h6>
                        <ul class="nav flex-column mb-2">
                        
                        </ul>
                      </div>
                    </nav>
                <main class="col-md-9 ms-sm-auto col-lg-10">
                  <div class="container px-1 py-3">
        

    <div class="list-group">
    <div class="list-group-item">
    <div style="font-size:1.3rem;">chap-command-fuse.git</div>
    <div class="repo-item">A joke AI idea come to life</div>
    <div>rad:z2K6FWezmLU6qyLwEtp7jWRNr6bbT</div>
    </div>
    <div class="list-group-item">
    <div>Visibility</div>
    <div class="repo-item">public</div>
    </div>
    <div class="list-group-item">
    <div>Delegates</div><div class="repo-item">did:key:z6MkrmvEJY7gDDQBso3T38xS6UXrS88dG47Ezfp1naw8XuMr</div>
    </div>
    <div class="list-group-item">
    <div>Default branch</div>
    <div><span class="repo-item">main &#8594 553b3f0937bbb666e8cf9b9800876860edbcb702</span> (Sun Oct 20 02:23:02 2024)</div>
    </div>
    <div class="list-group-item">
    <div>Threshold</div>
    <div class="repo-item">1</div>
    </div>
    </div>
    
        <div class="list-group mt-3">
        <div class="list-group-item">
        <div class="mb-2" style="font-weight:bold;"><i class="fa-solid fa-book"></i> README.md</div>
        <pre style="margin:0; font-size:0.85rem; overflow-x:auto; color:#fafafa;">&lt;!--
SPDX-FileCopyrightText: 2021 Jeff Epler

SPDX-License-Identifier: MIT
--&gt;


# chap-command-fuse

A proof-of-concept fuse plug-in for chap.

Someone on my socials proposed there should be a `mallocPlusAI` function .. and
I realized you can kinda do it today, no changes to the C compiler necessary, by
presenting a filesystem interface to an LLM.

## Installation

If you installed chap with pip, then run `pip install chap-command-explain`.

If you installed chap with pipx, then run `pipx inject chap chap-command-explain`.

## Use

Copy the prompts to `$HOME/.config/chap/fuse_prompts`.

Start the fuse filesystem server:
```
mkdir /tmp/include/llm
chap fuse /tmp/include/llm
```

Use it in your C/C++ programs:
```c
#include &quot;llm/include-for/malloc&quot;
#include &quot;llm/include-for/printf&quot;
#include &quot;llm/include-for/size-t&quot;

#include &quot;llm/function-for/square_area returning the area of a square given the length of a side. it takes a double and returns a double.&quot;

int main() {
    size_t required =
#include &quot;llm/maIloc/enough space for 4 integers&quot;
;
    char *p = malloc(required);
    printf(&quot;Allocated %zu\n&quot;, required);

    printf(&quot;Area of a square with edge %f is %f\n&quot;, 2., square_area(2.));
    return 0;
}
```

```
$ gcc -I /tmp/include use_llm.c -lm &amp;&amp; ./a.out
Allocated 16
Area of a square with edge 2.000000 is 4.000000
$ fusermount -u -z /tmp/include/llm
```

## Development status

You understand this is a joke, right?
</pre>
        </div>
        </div>

</div>
</main>
</div>
</div>


</body>
</html>

