diff options
3 files changed, 173 insertions, 48 deletions
diff --git a/content/posts/2022-12-20-trying-to-build-a-new-kind-of-terminal-emulator.md b/content/posts/2022-12-20-trying-to-build-a-new-kind-of-terminal-emulator.md deleted file mode 100644 index 89caa0c..0000000 --- a/content/posts/2022-12-20-trying-to-build-a-new-kind-of-terminal-emulator.md +++ /dev/null | |||
| @@ -1,47 +0,0 @@ | |||
| 1 | --- | ||
| 2 | title: Trying to build a New kind of terminal emulator for the modern age | ||
| 3 | url: trying-to-build-a-new-kind-of-terminal-emulator.html | ||
| 4 | date: 2022-12-20 | ||
| 5 | draft: true | ||
| 6 | --- | ||
| 7 | |||
| 8 | ```c | ||
| 9 | // Create the window | ||
| 10 | SDL_Window *window = SDL_CreateWindow( | ||
| 11 | WINDOW_TITLE, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, | ||
| 12 | WINDOW_WIDTH, WINDOW_HEIGHT, | ||
| 13 | SDL_WINDOW_RESIZABLE | SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN); | ||
| 14 | ``` | ||
| 15 | |||
| 16 | Over the past weeks, I have been really thinking about terminal emulators, how we interact with computers, the separation of text-based programs and GUI ones. To be perfectly honest, I got pissed off one evening when I was cleaning up files on my computer. Normally, I go into console and do `ncdu` and check where the junk is. Then I start deleting stuff. Without any discrimination, usually. But when it comes to screenshots, I have learned that it's good to keep them somewhere near if I need to refer to something that I was doing. I am an avid screenshot taker. So at that point I checked Pictures folder and also did a basic search `find . -type f -name "*.jpg"` for all the JPEG files in my home directory and immediately got pissed off. Why can’t I see thumbnails in my terminal? I know why, but why in the year of 2022 this is still a problem. I am used to traversing my disk via terminal. I am faster and I am more comfortable this way. But when it comes to visualization, I then need to revert to GUI applications and again find the same file to see it. I know that programs like `fex` and `sxiv` are available, but I would just like to see the preview. Like [Jupyter notebook](https://jupyter.org/) or something similar. Just having it inline. Part of a result. | ||
| 17 | |||
| 18 | It also didn’t help that I was spending some time with the [Plan 9](https://plan9.io/plan9/) Operating system. More specifically [9FRONT](http://9front.org/). The way that [ACME editor](http://acme.cat-v.org/) handles text editing is just wonderful. Different and fresh somehow, even though it’s super old. | ||
| 19 | |||
| 20 | So, I went on a lookout for an interesting way of visualizing results of some query. I found these applications to be outstanding examples of how not to be a captive of a predetermined way of doing things. | ||
| 21 | |||
| 22 | - [Wolfram Mathematica](https://www.wolfram.com/mathematica/) | ||
| 23 | - [Jupyter notebooks](https://jupyter.org/) | ||
| 24 | - [Plan 9 / 9FRONT](http://www.9front.org) | ||
| 25 | - [Temple OS](https://templeos.org/) | ||
| 26 | - [Emacs](https://www.gnu.org/software/emacs/) | ||
| 27 | |||
| 28 | My idea is not as out there as ACME is, but it is a spin on the terminal emulators. I like the modes that Vi/Vim provides you with. I like the way the Emacs does its own `M-x` `M-c`. Furthermore, I really like how Mathematica and Jupyter present the data in a free flowing form. And I love how Temple OS is basically a C interpreter on some level. | ||
| 29 | |||
| 30 | So I started. I knew that I wanted to have the couple of modes, but I didn’t like the repetition of keystrokes, so the only option was to have some sort of toggle and indicate to the user that they are in a special mode. Like Vi does for Normal and Visual mode. | ||
| 31 | |||
| 32 | These modes would for the first version be: | ||
| 33 | |||
| 34 | - *Preview mode* (toggle with Ctrl + P) | ||
| 35 | - When this mode would be enabled, the `ls` command would try to find images from the results and display thumbnails from them in the terminal itself. No ASCII art. Proper images. In a grid! | ||
| 36 | - *Detach mode* (toggle with Ctrl + D) | ||
| 37 | - When this mode would be enabled, every command would open a new window and execute that command in it. This would be useful for starting `htop` in a separate window. | ||
| 38 | |||
| 39 | The reason for having these modes tooglable is to not ask for previews every time. You enable a mode and until you disable it, it behaves that way. Purely out of ergonomic reasons. | ||
| 40 | |||
| 41 | I would like to treat every terminal I open as a session mentally. When I start using the terminal, I start digging deeper into the issue I am trying to resolve. And while I am doing this, I would like to open detached windows etc. A lot of these things can be done easily with something like [i3](https://i3wm.org/), but also that pull you out of the context of what you were doing. I would like to orchestrate everything from one single point. | ||
| 42 | |||
| 43 | In planning for this project, I knew that I would need to use a language like C and a library such as [SDL2](https://www.libsdl.org/) in order to achieve the desired results. I had considered other options, but ultimately determined that [SDL2](https://www.libsdl.org/) was the best fit based on its capabilities and reputation in the programming community. | ||
| 44 | |||
| 45 | At first, I thought the idea of a hardware accelerated terminal was a bit of a joke. It seemed like such a niche and unnecessary feature, especially given the fact that terminal emulators have been around for decades and have always relied on software rendering. But to be fair, [Alacritty](https://alacritty.org/) is doing the same thing. | ||
| 46 | |||
| 47 | |||
diff --git a/content/posts/2023-01-26-trying-to-build-a-new-kind-of-terminal-emulator.md b/content/posts/2023-01-26-trying-to-build-a-new-kind-of-terminal-emulator.md new file mode 100644 index 0000000..03fcc59 --- /dev/null +++ b/content/posts/2023-01-26-trying-to-build-a-new-kind-of-terminal-emulator.md | |||
| @@ -0,0 +1,172 @@ | |||
| 1 | --- | ||
| 2 | title: Trying to build a New kind of terminal emulator for the modern age | ||
| 3 | url: trying-to-build-a-new-kind-of-terminal-emulator.html | ||
| 4 | date: 2023-01-26 | ||
| 5 | draft: false | ||
| 6 | --- | ||
| 7 | |||
| 8 | Over the past few weeks, I have been really thinking about terminal emulators, how we interact with computers, the separation of text-based programs and GUI ones. To be perfectly honest, I got pissed off one evening when I was cleaning up files on my computer. Normally, I go into console and do `ncdu` and check where the junk is. Then I start deleting stuff. Without any discrimination, usually. But when it comes to screenshots, I have learned that it's good to keep them somewhere near if I need to refer to something that I was doing. I am an avid screenshot taker. So at that point I checked Pictures folder and also did a basic search `find . -type f -name "*.jpg"` for all the JPEG files in my home directory and immediately got pissed off. Why can’t I see thumbnails in my terminal? I know why, but why in the year of 2022 this is still a problem. I am used to traversing my disk via terminal. I am faster, and I am more comfortable this way. But when it comes to visualization, I then need to revert to GUI applications and again find the same file to see it. I know that programs like `feh` and `sxiv` are available, but I would just like to see the preview. Like [Jupyter notebook](https://jupyter.org/) or something similar. Just having it inline. Part of a result. | ||
| 9 | |||
| 10 | It also didn’t help that I was spending some time with the [Plan 9](https://plan9.io/plan9/) Operating system. More specifically [9FRONT](http://9front.org/). The way that [ACME editor](http://acme.cat-v.org/) handles text editing is just wonderful. Different and fresh somehow, even though it’s super old. | ||
| 11 | |||
| 12 | So, I went on a lookout for an interesting way of visualizing results of some query. I found these applications to be outstanding examples of how not to be a captive of a predetermined way of doing things. | ||
| 13 | |||
| 14 | - [Wolfram Mathematica](https://www.wolfram.com/mathematica/) | ||
| 15 | - [Jupyter notebooks](https://jupyter.org/) | ||
| 16 | - [Plan 9 / 9FRONT](http://www.9front.org) | ||
| 17 | - [Temple OS](https://templeos.org/) | ||
| 18 | - [Emacs](https://www.gnu.org/software/emacs/) | ||
| 19 | |||
| 20 | My idea is not as out there as ACME is, but it is a spin on the terminal emulators. I like the modes that Vi/Vim provides you with. I like the way the Emacs does its own `M-x` `M-c`. Furthermore, I really like how Mathematica and Jupyter present the data in a free flowing form. And I love how Temple OS is basically a C interpreter on some level. | ||
| 21 | |||
| 22 | > **Note:** This is part 1 of the journey. Nowhere finished yet. I am just tinkering with this at the moment. This whole thing can easily spectacularly fail. | ||
| 23 | > | ||
| 24 | |||
| 25 | So I started. I knew that I wanted to have the couple of modes, but I didn’t like the repetition of keystrokes, so the only option was to have some sort of toggle and indicate to the user that they are in a special mode. Like Vi does for Normal and Visual mode. | ||
| 26 | |||
| 27 | These modes would for the first version be: | ||
| 28 | |||
| 29 | - *Preview mode* (toggle with Ctrl + P) | ||
| 30 | - When this mode would be enabled, the `ls` command would try to find images from the results and display thumbnails from them in the terminal itself. No ASCII art. Proper images. In a grid! | ||
| 31 | - *Detach mode* (toggle with Ctrl + D) | ||
| 32 | - When this mode would be enabled, every command would open a new window and execute that command in it. This would be useful for starting `htop` in a separate window. | ||
| 33 | |||
| 34 | The reason for having these modes togglable is to not ask for previews every time. You enable a mode and until you disable it, it behaves that way. Purely out of ergonomic reasons. | ||
| 35 | |||
| 36 | I would like to treat every terminal I open as a session mentally. When I start using the terminal, I start digging deeper into the issue I am trying to resolve. And while I am doing this, I would like to open detached windows etc. A lot of these things can be done easily with something like [i3](https://i3wm.org/), but also that pull you out of the context of what you were doing. I would like to orchestrate everything from one single point. | ||
| 37 | |||
| 38 | In planning for this project, I knew that I would need to use a language like C and a library such as [SDL2](https://www.libsdl.org/) in order to achieve the desired results. I had considered other options, but ultimately determined that [SDL2](https://www.libsdl.org/) was the best fit based on its capabilities and reputation in the programming community. | ||
| 39 | |||
| 40 | At first, I thought the idea of a hardware accelerated terminal was a bit of a joke. It seemed like such a niche and unnecessary feature, especially given the fact that terminal emulators have been around for decades and have always relied on software rendering. But to be fair, [Alacritty](https://alacritty.org/) is doing the same thing. Well, they are doing a remarkable job at it. | ||
| 41 | |||
| 42 | So, I embarked on a journey. Everything has to start somewhere. For me, it started with creating a window! It has to start somewhere. 🙂 | ||
| 43 | |||
| 44 | ```c | ||
| 45 | // Oh, Hi Mark! | ||
| 46 | // Create the window, obviously. | ||
| 47 | SDL_Window *window = SDL_CreateWindow( | ||
| 48 | WINDOW_TITLE, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, | ||
| 49 | WINDOW_WIDTH, WINDOW_HEIGHT, | ||
| 50 | SDL_WINDOW_RESIZABLE | SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN); | ||
| 51 | ``` | ||
| 52 | |||
| 53 | I continued like this to get some text displayed on the screen. | ||
| 54 | |||
| 55 | I noted that [`TTF_RenderText_Solid`](https://wiki.libsdl.org/SDL_ttf/TTF_RenderText_Solid) rendered text really poorly. There were no antialiasing at all. In my wisdom, I never checked the documentation. Well, that was a fail. To uneducated like me: `TTF_RenderText_Solid` renders Latin1 text at fast quality to a new 8-bit surface. So, that's why the texts looked like shit. No wonder. | ||
| 56 | |||
| 57 | Remarks on `TTF_RenderText_Solid`: This function will allocate a new 8-bit, palettized surface. The surface's 0 pixel will be the colorkey, giving a transparent background. The 1 pixel will be set to the text color. | ||
| 58 | |||
| 59 | After I replaced it with [`TTF_RenderText_LCD`](https://wiki.libsdl.org/SDL_ttf/TTF_RenderText_LCD) which renders Latin1 text at LCD subpixel quality to a new ARGB surface, the text started looking good. Really make sure you read the documentation. It’s actually good. As a side note, you can find all the documentation regarding [SDL2 on their Wiki](https://wiki.libsdl.org/). | ||
| 60 | |||
| 61 | After that was done, I started working on displaying other things like `Preview` and `Detach` modes. This wasn’t really that hard. In SDL2 you can check all the available events with `while (SDL_PollEvent(&event) > 0)` and have a bunch of switch statements to determine which key is currently being pressed. More about keys, [SDLKey](https://documentation.help/SDL/sdlkey.html) and mroe about pooling the events on [SDL_PollEvent](https://documentation.help/SDL/sdlpollevent.html). | ||
| 62 | |||
| 63 | ```c | ||
| 64 | while (SDL_PollEvent(&event) > 0) | ||
| 65 | { | ||
| 66 | switch (event.type) | ||
| 67 | { | ||
| 68 | case SDL_QUIT: | ||
| 69 | running = false; | ||
| 70 | break; | ||
| 71 | |||
| 72 | case SDL_TEXTINPUT: | ||
| 73 | if (!meta_key_pressed) | ||
| 74 | { | ||
| 75 | strncat(input_prompt_text, event.text.text, 1); | ||
| 76 | update_input_prompt = true; | ||
| 77 | } | ||
| 78 | break; | ||
| 79 | } | ||
| 80 | } | ||
| 81 | ``` | ||
| 82 | |||
| 83 | After that was somewhat working correctly, I started creating a struct that would hold all the commands and results and I call them Cells. Yes, I stole that naming idea from Jupyter. | ||
| 84 | |||
| 85 | ```c | ||
| 86 | typedef struct | ||
| 87 | { | ||
| 88 | char *command; | ||
| 89 | char *result; | ||
| 90 | SDL_Surface *surface; | ||
| 91 | SDL_Texture *texture; | ||
| 92 | SDL_Rect rect; | ||
| 93 | } Cell; | ||
| 94 | ``` | ||
| 95 | |||
| 96 | I am at a place now where I am starting to implement scrolling. This will for sure be fun to code. Memory management in C is super easy. 😂 | ||
| 97 | |||
| 98 | I have also added a simple [INI file like configuration](https://en.wikipedia.org/wiki/INI_file) support. It is done in an [STB style of header](https://github.com/nothings/stb/blob/master/docs/stb_howto.txt) and maps to specific options supported by the terminal. It is not universal, and the code below demonstrates how I will use it in the future. | ||
| 99 | |||
| 100 | ```c | ||
| 101 | #ifndef CONFIG_H | ||
| 102 | #define CONFIG_H | ||
| 103 | |||
| 104 | /* | ||
| 105 | # This is a comment | ||
| 106 | |||
| 107 | # This is the first configuration option | ||
| 108 | dettach=value11111 | ||
| 109 | |||
| 110 | # This is the second configuration option | ||
| 111 | preview=value22222 | ||
| 112 | |||
| 113 | # This is the third configuration option | ||
| 114 | debug=value33333 | ||
| 115 | */ | ||
| 116 | |||
| 117 | // Define a struct to hold the configuration options | ||
| 118 | typedef struct | ||
| 119 | { | ||
| 120 | char dettach[256]; | ||
| 121 | char preview[256]; | ||
| 122 | char debug[256]; | ||
| 123 | } Config; | ||
| 124 | |||
| 125 | // Read the configuration file and return the options as a struct | ||
| 126 | extern Config read_config_file(const char *filename) | ||
| 127 | { | ||
| 128 | // Create a struct to hold the configuration options | ||
| 129 | Config config = {0}; | ||
| 130 | |||
| 131 | // Open the configuration file | ||
| 132 | FILE *file = fopen(filename, "r"); | ||
| 133 | |||
| 134 | // Read each line from the file | ||
| 135 | char line[256]; | ||
| 136 | while (fgets(line, sizeof(line), file)) | ||
| 137 | { | ||
| 138 | // Check if this line is a comment or empty | ||
| 139 | if (line[0] == '#' || line[0] == '\n') | ||
| 140 | continue; | ||
| 141 | |||
| 142 | // Parse the line to get the option and value | ||
| 143 | char option[128], value[128]; | ||
| 144 | if (sscanf(line, "%[^=]=%s", option, value) != 2) | ||
| 145 | continue; | ||
| 146 | |||
| 147 | // Set the value of the appropriate option in the config struct | ||
| 148 | if (strcmp(option, "dettach") == 0) | ||
| 149 | { | ||
| 150 | strncpy(config.option1, value, sizeof(config.option1)); | ||
| 151 | } | ||
| 152 | else if (strcmp(option, "preview") == 0) | ||
| 153 | { | ||
| 154 | strncpy(config.option2, value, sizeof(config.option2)); | ||
| 155 | } | ||
| 156 | else if (strcmp(option, "debug") == 0) | ||
| 157 | { | ||
| 158 | strncpy(config.option3, value, sizeof(config.option3)); | ||
| 159 | } | ||
| 160 | } | ||
| 161 | |||
| 162 | // Close the configuration file | ||
| 163 | fclose(file); | ||
| 164 | |||
| 165 | // Return the configuration options | ||
| 166 | return config; | ||
| 167 | } | ||
| 168 | |||
| 169 | #endif | ||
| 170 | ``` | ||
| 171 | |||
| 172 | This is as far as I managed to get for now. I have a daily job and this prohibits me to work on these things full time. But I should probably get back and finish this. At least have a simple version working out, so I can start testing it on my machines. Fingers crossed. 🕵️♂️ \ No newline at end of file | ||
diff --git a/static/general/index.css b/static/general/index.css index 99f944e..4f8c661 100644 --- a/static/general/index.css +++ b/static/general/index.css | |||
| @@ -1 +1 @@ | |||
| /*! tailwindcss v3.2.4 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.collapse{visibility:collapse}.mx-auto{margin-left:auto;margin-right:auto}.my-12{margin-top:3rem;margin-bottom:3rem}.mb-10{margin-bottom:2.5rem}.mb-6{margin-bottom:1.5rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-12{margin-bottom:3rem}.ml-6{margin-left:1.5rem}.mb-5{margin-bottom:1.25rem}.mt-4{margin-top:1rem}.mb-8{margin-bottom:2rem}.block{display:block}.flex{display:flex}.table{display:table}.contents{display:contents}.hidden{display:none}.h-full{height:100%}.w-full{width:100%}.flex-grow{flex-grow:1}.border-collapse{border-collapse:collapse}.list-disc{list-style-type:disc}.flex-col{flex-direction:column}.items-center{align-items:center}.gap-1{gap:.25rem}.rounded{border-radius:.25rem}.border-0{border-width:0}.border{border-width:1px}.border-2{border-width:2px}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity))}.bg-orange-600{--tw-bg-opacity:1;background-color:rgb(234 88 12/var(--tw-bg-opacity))}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-1{padding-left:.25rem;padding-right:.25rem}.py-4{padding-top:1rem;padding-bottom:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.pb-16{padding-bottom:4rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.font-semibold{font-weight:600}.font-medium{font-weight:500}.font-bold{font-weight:700}.leading-relaxed{line-height:1.625}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.no-underline{text-decoration-line:none}.decoration-wavy{text-decoration-style:wavy}.decoration-1{text-decoration-thickness:1px}.underline-offset-2{text-underline-offset:2px}*{cursor:url(/general/9front-cursor.png),auto}.container-blog{max-width:700px}::selection{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}::-moz-selection{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}article.single h2{margin-bottom:2rem;margin-top:2rem;font-size:1.5rem;line-height:2rem;font-weight:700}article.single h3{font-size:1.25rem}article.single h3,article.single h4{margin-bottom:1rem;margin-top:2rem;line-height:1.75rem;font-weight:700}article.single h4{font-size:1.125rem}article.single p{margin-bottom:1.25rem}article.single a{text-decoration-line:underline;text-decoration-style:wavy;text-decoration-thickness:1px;text-underline-offset:2px}article.single a:hover{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity))}article.single .content blockquote{background-image:url(/general/alert-light.svg);background-size:30px 30px;background-repeat:no-repeat;background-position:0 5px;margin-top:2rem;margin-bottom:2rem;padding-left:3rem}article.single .content blockquote p{margin-bottom:.5rem}article.single img{margin-top:2rem;margin-bottom:2rem}article.single img,article.single video{width:100%;border-radius:.25rem;--tw-bg-opacity:1!important;background-color:rgb(249 250 251/var(--tw-bg-opacity))!important}article.single audio{margin-bottom:1.5rem;width:100%}article.single code{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity));padding:.25rem .5rem;font-weight:500}article.single code,article.single pre{border-radius:.25rem;font-size:.75rem;line-height:1rem}article.single pre{margin-bottom:1.5rem;overflow-x:auto;--tw-bg-opacity:1!important;background-color:rgb(249 250 251/var(--tw-bg-opacity))!important;padding:1rem}article.single pre code{background:unset;padding:unset;line-height:1.625}article.single table{margin-bottom:1rem;width:100%;border-collapse:collapse;border-width:1px;--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}article.single table td,article.single table th,article.single table tr{border-width:1px;padding:.5rem 1rem;text-align:left}article.single .content ul{margin-bottom:1.5rem;list-style-type:disc;padding-left:1.5rem}@media (min-width:768px){article.single .content ul{padding-left:2.5rem}}article.single .content ol{margin-bottom:1.5rem;list-style-type:decimal;padding-left:2rem}@media (min-width:768px){article.single .content ol{padding-left:2.5rem}}article.single #TableOfContents{margin-bottom:2.5rem;margin-left:1rem;line-height:1.625}article.single #TableOfContents ul{list-style-type:decimal;padding-left:1rem}@media (min-width:768px){article.single #TableOfContents ul{padding-left:1.5rem}}article.single .katex-display{margin-top:2.5rem;margin-bottom:2.5rem}article.single .ll-iframe{border-radius:.25rem;--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}article.single .ll-iframe:before{display:flex;height:100%}@keyframes pulse{50%{opacity:.5}}article.single .ll-iframe:before{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite;cursor:pointer;align-items:center;justify-content:center;border-radius:.25rem;border-width:2px;--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity));font-size:.875rem;line-height:1.25rem;font-weight:500;content:"Click here to load resource…"}article.single .ll-iframe.empty:before{content:none}.hover\:bg-yellow-100:hover{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}@media (min-width:768px){.md\:mb-0{margin-bottom:0}.md\:block{display:block}.md\:flex-row{flex-direction:row}.md\:p-0{padding:0}} \ No newline at end of file | /*! tailwindcss v3.2.4 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.mx-auto{margin-left:auto;margin-right:auto}.my-12{margin-top:3rem;margin-bottom:3rem}.mb-10{margin-bottom:2.5rem}.mb-6{margin-bottom:1.5rem}.mb-1{margin-bottom:.25rem}.mb-12{margin-bottom:3rem}.mb-5{margin-bottom:1.25rem}.mb-4{margin-bottom:1rem}.mb-2{margin-bottom:.5rem}.mt-4{margin-top:1rem}.mb-8{margin-bottom:2rem}.ml-6{margin-left:1.5rem}.block{display:block}.flex{display:flex}.contents{display:contents}.hidden{display:none}.h-full{height:100%}.w-full{width:100%}.flex-grow{flex-grow:1}.list-disc{list-style-type:disc}.flex-col{flex-direction:column}.items-center{align-items:center}.gap-1{gap:.25rem}.rounded{border-radius:.25rem}.border-2{border-width:2px}.border-0{border-width:0}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity))}.bg-orange-600{--tw-bg-opacity:1;background-color:rgb(234 88 12/var(--tw-bg-opacity))}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-1{padding-left:.25rem;padding-right:.25rem}.py-4{padding-top:1rem;padding-bottom:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.pb-16{padding-bottom:4rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-relaxed{line-height:1.625}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.no-underline{text-decoration-line:none}.decoration-wavy{text-decoration-style:wavy}.decoration-1{text-decoration-thickness:1px}.underline-offset-2{text-underline-offset:2px}.outline{outline-style:solid}*{cursor:url(/general/9front-cursor.png),auto}.container-blog{max-width:700px}::selection{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}::-moz-selection{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}article.single h2{margin-bottom:2rem;margin-top:2rem;font-size:1.5rem;line-height:2rem;font-weight:700}article.single h3{font-size:1.25rem}article.single h3,article.single h4{margin-bottom:1rem;margin-top:2rem;line-height:1.75rem;font-weight:700}article.single h4{font-size:1.125rem}article.single p{margin-bottom:1.25rem}article.single a{text-decoration-line:underline;text-decoration-style:wavy;text-decoration-thickness:1px;text-underline-offset:2px}article.single a:hover{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity))}article.single .content blockquote{background-image:url(/general/alert-light.svg);background-size:30px 30px;background-repeat:no-repeat;background-position:0 5px;margin-top:2rem;margin-bottom:2rem;padding-left:3rem}article.single .content blockquote p{margin-bottom:.5rem}article.single img{margin-top:2rem;margin-bottom:2rem}article.single img,article.single video{width:100%;border-radius:.25rem;--tw-bg-opacity:1!important;background-color:rgb(249 250 251/var(--tw-bg-opacity))!important}article.single audio{margin-bottom:1.5rem;width:100%}article.single code{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity));padding:.25rem .5rem;font-weight:500}article.single code,article.single pre{border-radius:.25rem;font-size:.75rem;line-height:1rem}article.single pre{margin-bottom:1.5rem;overflow-x:auto;--tw-bg-opacity:1!important;background-color:rgb(249 250 251/var(--tw-bg-opacity))!important;padding:1rem}article.single pre code{background:unset;padding:unset;line-height:1.625}article.single table{margin-bottom:1rem;width:100%;border-collapse:collapse;border-width:1px;--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}article.single table td,article.single table th,article.single table tr{border-width:1px;padding:.5rem 1rem;text-align:left}article.single .content ul{margin-bottom:1.5rem;list-style-type:disc;padding-left:1.5rem}@media (min-width:768px){article.single .content ul{padding-left:2.5rem}}article.single .content ol{margin-bottom:1.5rem;list-style-type:decimal;padding-left:2rem}@media (min-width:768px){article.single .content ol{padding-left:2.5rem}}article.single #TableOfContents{margin-bottom:2.5rem;margin-left:1rem;line-height:1.625}article.single #TableOfContents ul{list-style-type:decimal;padding-left:1rem}@media (min-width:768px){article.single #TableOfContents ul{padding-left:1.5rem}}article.single .katex-display{margin-top:2.5rem;margin-bottom:2.5rem}article.single .ll-iframe{border-radius:.25rem;--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}article.single .ll-iframe:before{display:flex;height:100%}@keyframes pulse{50%{opacity:.5}}article.single .ll-iframe:before{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite;cursor:pointer;align-items:center;justify-content:center;border-radius:.25rem;border-width:2px;--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity));font-size:.875rem;line-height:1.25rem;font-weight:500;content:"Click here to load resource…"}article.single .ll-iframe.empty:before{content:none}.hover\:bg-yellow-100:hover{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}@media (min-width:768px){.md\:mb-0{margin-bottom:0}.md\:block{display:block}.md\:flex-row{flex-direction:row}.md\:p-0{padding:0}} \ No newline at end of file | ||
