<editable-markdown> <theme-definition> <searchable-table> <event-timeline> <inputs-for-entity> <command-palette> <sitemap-overlay> <state-machine> <llm-prompt> <youtube-video> <map-with-pin> <command-action> <sound-effect> <horizontal-pages> <theme-builder> <scribble-pad> <sentence-reader> <pdf-reader> <epub-reader> <git-repo-browser> <file-annotator> <dag-view> <web-component-help> <day-timer> <calendar-view> <monaco-editor> <scheduled-reminder> <read-model> <group-by-date> <group-by-field> <if-type> <pug-editor> <entity-collection-ref> <sound-effect-library> <kanban-board> Generic Hypermedia Server Fran 2024-02-05 10:41:05
                So I'm thinking about the features that would be an MVP
                for a generic hypermedia server. There are actually two
                scenarios here: one is when the server is running locally
                on your computer, the other is when it's running remotely
                on the public internet.

                Functionalities should be very generic, as much as possible
                configuration and application logic should come from
                the HTML page consuming the server itself.

                Possible resources:
                * Mutating HTML files on the filesystem
                * Uploading files
                * Querying ChatGPT
                * Do HTML transformations of pages that will be blocked for
                  CORS reasons, such as creating a reader view of a page
                * Mutating entities or events in a central database
                * Acting as a proxy for HTML pages that can provide
                  an authorization layer so that you can make pages that are
                  only accessible to certain people
                * PDF building?
                * Generating images using Dall-e or Midjourney somehow
                * Facilitating RAG and semantic search with a vector database
                * Possibly provisioning cloud resources like hosting services or domain names / DNS. Basically a layer over Terraform
                * Native notifications
                * Idempotently installing provisioning user computer / dev environment
                * Running cron jobs when client isn't open, for example polling certain resources for changes.
                * Sending and receiving messages from chat apps such as Mattermost and Discord
                    
/images/illustrations/bird.png
Random idea Fran 2024-01-31 13:09:49
            It would be cool to have some kind of workflow where you could capture
            a page and then save a version of it with highlights added. 

            Kind of implemented this with `<reader-for-url>` component:

            ```html
            <reader-for-url
              url="https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals"
              api-url="http://localhost:1323/readable">
            </reader-for-url>
            ```
          
Web component root class Fran 2024-01-31 09:09:00 /images/illustrations/software-steampunk.png
            So right now there are parts of the web component lifecycle that are pretty
            flakey. 

            There are a some patterns that I'm using:

            * Putting data inside of web components via slots. In theory if the data changes
              the web component should re-render.
            * Nesting web components inside of each other
            * Have data dependencies on certain kinds of web components (or their children)
              that are scattered across the whole document.
            * Loading remote HTML fragments and reading data from them
            * Loading remote HTML fragments and inserting them into the document
            * Having a web component that renders DOM elements to a portal instead of 
              inside of itself so that each rendered dom element can be a child of a 
              given parent

            Big picture problems to solve:

            * Re-rendering after changes to DOM (whether nested or elsewhere)
            * Re-rendering elements in the right order. 

            In a way children are not just opaque views to be rendered by parent components
            but are actually props that the render function of the parent component
            depends on.

            So I think the web components should be event driven. So there need
            to be built in functions for generating events and subscribing to them.

            So the part that seems trickiest is handling the re-rendering of components
            in a deterministic way. Because technically if stuff is based on loading 
            data from the DOM then children / leaf elements need to update first (especially
            if their data changes in any way) and then the re-render should bubble up
            through parent components.
          
Oh Safari... Fran 2024-01-30 09:32:33 /images/screenshots/safari-incompatible-with-options.png
            Bugs I know about web components so far:
            
            * Text selection related events don't work in shadow dom
            * Safari doesn't support `<tag is="component">` syntax
          
More cool ideas Fran 2024-01-30 00:26:01
            * Some kind of isometric... VRML rooms that you can run around in and place things in.
            * First person rooms with webgl and shaders
            * `<project>` and `<task>` components that can be defined inline and federated 
            * A universal web component class that everything inherits from with some kind lifecycle hooks
            * `<map>` and `<filter>` components for working with `<entity-collection>` to create new ones
            * A browser for git repos that lets you create collections of annotated files
            * A terminal
            * Some kind of hypercard stack creator/editor
            * A sqlite database browser
            * Event sourcing and read models
          
/images/illustrations/gophers.png
Brainstorming on command palette Fran 2024-01-29 23:38:59 /images/illustrations/library.png
            I know off the top of my head there are a few things I would want:

            * Fuzzy search by command name
            * Command arguments/inputs? Perhaps this would be a hypermedia control
            * Commands that jump to a particular page
            * Talking to GPT and it choosing a command from the list
            * Possibly keyboard shortcuts or chords for commands
            * Description / help for each command
          
Possible user stories Fran 2024-01-29 22:44:51 /images/illustrations/raccoon-climbing.png
            What are some of the use cases for an ideal database / app repl?

            * Different collections of bookmarks, for example YouTube music videos
            * A database of saints
            * Reading a book I start writing down quotes, places, people and historical events
            * Some kind of generative multi-step workflow with GPT that is helping me plan
            * A todo list

            Part of the problem with navigation stuff is that there are other things I
            would like to store, but I don't particularly want to visually cram them
            in (or cram in links to them) alongside the current thing I'm looking
            at. 

            So it seems like what I'm trying to have is a command+space sitemap
            that pops up. I think I would be fairly satisfied with that. Then
            I just add lots of links to the sitemap?
          
Organizing pages Fran 2024-01-29 21:46:08
            Okay, so this is legitimately one of the big questions for me. I do want
            to have a unified model for how to organize and navigate pages. I think
            the one I'm happiest with so far is the desktop and folder model but of
            course that's not 100% perfect. It also has some outstanding questions
            as to how it should be integrated with the main page UI.

            Maybe the command palette is a desktop+folder view? I wouldn't hate that.

            I think this is a great way to model a database without getting lost in
            the weeds as far as input design. 

            What are the goals of the database?

            * Federated
            * Browseable
            * Render collections of entities into different views
            * Co-locate controls with data, which in this case could be view templates
            * Formats that are tractable to LLM delegation & assistance
            * Bottom-up organic organization over time
            * ???
          
/images/illustrations/castle-maze.png
Next stuff Fran 2024-01-29 21:32:35
            Nice! Expanding on the templating languages pretty well. Can do stuff
            like this now:

            ```html
            <if-field field="pic">
                <dithered-image src="field-value:pic"></dithered-image>
            </if-field>
            ```

            I guess I'm still excited about nested `<entity-data>` and then
            maybe timelines next. 

            It actually would be very cool to add a command palette 🤔

            HMMM
          
What next? Fran 2024-01-29 20:12:59 /images/memes/lotr-vs-hp.png
            Well, this is working pretty well actually!

            What are my next priorities?

            * Nested `<entity-data>`
            * Fix the flash of "un-componented" content on page load (it's pretty fast if the network can cache)
            * `sort-by-date-asc` and `sort-by-date-desc` properties for `<render-entity-collection>`
            * ✅ Also want to add `<if-field>` component for conditional rendering
            * ✅ In this case I probably want to have a `field-value:my-field` kind of attribute so that I can use it for img srcs and stuff
          

Component TODO

  1. name

title by author

content